lean4-htt/tests/lean/run/1118.lean
2022-08-01 13:54:36 -07:00

37 lines
686 B
Text

theorem CongrGood {x y: Nat}: x + y = y + x := by
conv =>
congr
. rw [Nat.add_comm]
. rfl
theorem CongrBad {x y: Nat}: x + y = y + x := by
have I: True := True.intro;
conv =>
congr
. rw [Nat.add_comm]
. rfl
theorem CongrBad' {x y: Nat}: x + y = y + x := by
let I: True := True.intro;
conv =>
congr
. rw [Nat.add_comm]
. rfl
theorem CongrBad'' {x y: Nat}: x + y = y + x := by
let I: True := True.intro;
try rfl;
conv =>
congr
. rw [Nat.add_comm]
. rfl
theorem CongrGood' {x y: Nat}: x + y = y + x := by
cases x;
have I: True := True.intro;
rw [Nat.add_comm]
conv =>
congr
. rw [Nat.add_comm]
. rfl