feat: restore reduceCtorEq in norm_cast tactic (#5187)
#5167 removed `reduceCtorEq` from the default simproc set. `norm_cast` relies on it, so we add it back in there.
This commit is contained in:
parent
44366382d3
commit
0dc317c73c
2 changed files with 6 additions and 1 deletions
|
|
@ -198,10 +198,12 @@ def derive (e : Expr) : MetaM Simp.Result := do
|
|||
let post := upwardAndElim (← normCastExt.up.getTheorems)
|
||||
r.mkEqTrans (← Simp.main r.expr { config, congrTheorems } (methods := { post })).1
|
||||
|
||||
let simprocs ← ({} : Simp.SimprocsArray).add `reduceCtorEq false
|
||||
|
||||
-- step 3: casts are squashed
|
||||
let r ← withTrace "squashing" do
|
||||
let simpTheorems := #[← normCastExt.squash.getTheorems]
|
||||
r.mkEqTrans (← simp r.expr { simpTheorems, config, congrTheorems }).1
|
||||
r.mkEqTrans (← simp r.expr { simpTheorems, config, congrTheorems } simprocs).1
|
||||
|
||||
return r
|
||||
|
||||
|
|
|
|||
|
|
@ -82,3 +82,6 @@ theorem b (_h g : true) : true ∧ true := by
|
|||
constructor
|
||||
assumption_mod_cast
|
||||
assumption_mod_cast
|
||||
|
||||
example : ¬n - k + 1 = 0 := by
|
||||
norm_cast
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue