feat: explain reduce steps in trace.Debug.Meta.Tactic.simp (#5054)

This commit is contained in:
Joachim Breitner 2024-08-19 17:05:13 +02:00 committed by GitHub
parent 78146190e5
commit efbecf272d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -210,6 +210,7 @@ private partial def reduce (e : Expr) : SimpM Expr := withIncRecDepth do
if e' == e then
return e'
else
trace[Debug.Meta.Tactic.simp] "reduce {e} => {e'}"
reduce e'
instance : Inhabited (SimpM α) where
@ -624,6 +625,7 @@ where
visitPreContinue (cfg : Config) (r : Result) : SimpM Result := do
let eNew ← reduceStep r.expr
if eNew != r.expr then
trace[Debug.Meta.Tactic.simp] "reduceStep (pre) {e} => {eNew}"
let r := { r with expr := eNew }
cacheResult e cfg (← r.mkEqTrans (← simpLoop r.expr))
else