fix: missing whnf at tryLemma?
This commit is contained in:
parent
79938056ad
commit
ce47000e33
2 changed files with 5 additions and 1 deletions
|
|
@ -67,7 +67,7 @@ where
|
|||
let val ← lemma.getValue
|
||||
let type ← inferType val
|
||||
let (xs, bis, type) ← forallMetaTelescopeReducing type
|
||||
let type ← instantiateMVars type
|
||||
let type ← whnf (← instantiateMVars type)
|
||||
let lhs := type.appFn!.appArg!
|
||||
if (← isDefEq lhs e) then
|
||||
unless (← synthesizeArgs lemma.getName xs bis discharge?) do
|
||||
|
|
|
|||
4
tests/lean/run/simpRwBug.lean
Normal file
4
tests/lean/run/simpRwBug.lean
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
open Nat
|
||||
|
||||
theorem add_assoc (m n k : Nat) : m + n + k = m + (n + k) :=
|
||||
Nat.recOn (motive := fun k => m + n + k = m + (n + k)) k rfl (fun k ih => by simp [Nat.add_succ, ih]; done)
|
||||
Loading…
Add table
Reference in a new issue