lean4-htt/tests/lean/run/4462.lean
2024-06-17 22:01:25 +00:00

26 lines
829 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def Matrix (α β R : Type) := α → β → R
instance [DecidableEq α] : OfNat (Matrix α α Nat) 1 where
ofNat x y := if x = y then 1 else 0
example [DecidableEq α] (x y : α) (h : x ≠ y) :
(1 : Matrix α α Nat) x y = 0 := by
guard_target =ₛ (1 : Matrix ..) x y = 0
fail_if_success simp
guard_target =ₛ (1 : Matrix ..) x y = 0
sorry
example [DecidableEq α] (x y : α) (h : x ≠ y) :
(1 : Matrix α α Nat) x y = 0 := by
guard_target =ₛ (1 : Matrix ..) x y = 0
fail_if_success dsimp
guard_target =ₛ (1 : Matrix ..) x y = 0
sorry
theorem one_eq [DecidableEq α] : (1 : Matrix α α Nat) x x = 1 := by
simp [OfNat.ofNat]
example [DecidableEq α] (x y : α) (h : x ≠ y) :
(1 : Matrix α α Nat) x y = 0 := by
guard_target =ₛ (1 : Matrix ..) x y = 0
simp [OfNat.ofNat, h]