fix: simp have in Sym (#12370)
This PR fixes a proof construction bug in `Sym.simp`. Closes #12336
This commit is contained in:
parent
9f2f33bd65
commit
03dc334f73
2 changed files with 8 additions and 2 deletions
|
|
@ -318,12 +318,13 @@ For each application `f a`:
|
|||
-/
|
||||
def simpBetaApp (e : Expr) (fType : Expr) (fnUnivs argUnivs : Array Level)
|
||||
(simpBody : Simproc) : SimpM Result := do
|
||||
return (← go e 0).1
|
||||
let numArgs := argUnivs.size
|
||||
return (← go e (numArgs - 1)).1
|
||||
where
|
||||
go (e : Expr) (i : Nat) : SimpM (Result × Expr) := do
|
||||
match e with
|
||||
| .app f a =>
|
||||
let (rf, fType) ← go f (i+1)
|
||||
let (rf, fType) ← go f (i-1)
|
||||
let r ← match rf, (← simp a) with
|
||||
| .rfl _, .rfl _ =>
|
||||
pure .rfl
|
||||
|
|
|
|||
5
tests/lean/run/sym_cbv_12336.lean
Normal file
5
tests/lean/run/sym_cbv_12336.lean
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
import Std
|
||||
set_option cbv.warning false
|
||||
|
||||
def test : ((Std.TreeSet.empty : Std.TreeSet Nat).insertMany [1]).toList = [1] := by
|
||||
conv => lhs; cbv
|
||||
Loading…
Add table
Reference in a new issue