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:
Kim Morrison 2024-08-28 12:38:57 +10:00 committed by GitHub
parent 44366382d3
commit 0dc317c73c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View file

@ -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

View file

@ -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