Featured suggested at https://leanprover.zulipchat.com/#narrow/stream/270676-lean4/topic/Pattern.20matching.20lambda.20body.20in.20conv/near/257193307
25 lines
480 B
Text
25 lines
480 B
Text
def twice : Nat → Nat := λ n => 2*n
|
|
|
|
def foo1 : (λ x : Nat => id (twice (id x))) = twice := by
|
|
conv in (id _) =>
|
|
trace_state
|
|
conv =>
|
|
enter [1,1]
|
|
trace_state
|
|
simp
|
|
trace_state
|
|
trace_state -- `id (twice x)`
|
|
|
|
|
|
theorem foo2 (y : Nat) : (fun x => x + y = 0) = (fun x => False) := by
|
|
conv =>
|
|
trace_state
|
|
conv =>
|
|
lhs
|
|
trace_state
|
|
intro x
|
|
rw [Nat.add_comm]
|
|
trace_state
|
|
trace_state
|
|
trace_state
|
|
sorry
|