Definitional Simplifier for SymM #
DSimp mirrors Sym.Simp but does not produce proof terms. Every rewrite must hold
by definitional equality, so the kernel checks e ≡ e' at the use site and we only need
to return the simplified expression.
Configuration options for the definitional simplifier.
- maxSteps : Nat
Maximum number of steps that can be performed by the simplifier.
Instances For
Equations
The result of definitionally simplifying an expression e.
The done flag controls whether simplification should continue after this result:
done = false(default): Continue with subsequent simplification steps. If apre/postmethod returns.step e' false,dsimprecurses one'.done = true: Stop processing, return this result as final.
Unlike Sym.Simp.Result, this carries no proof term and no contextDependent flag.
- rfl
(done : Bool := false)
: Result
No change. If
done = true, skip remaining simplification steps for this term. - step
(e' : Expr)
(done : Bool := false)
: Result
Simplified to
e'. Ifdone = true, skip recursive simplification ofe'.
Instances For
Equations
Instances For
Read-only context for the definitional simplifier.
- config : Config
Simplifier configuration options.
Instances For
Cache mapping expressions (by pointer equality) to their simplified results.
Instances For
Monad for the definitional simplifier, layered on top of SymM.
Equations
Instances For
Equations
- Lean.Meta.Sym.DSimp.instInhabitedDSimpM = { default := Lean.throwError (Lean.toMessageData "<default>") }
Equations
Instances For
Equations
Equations
Instances For
Equations
- Lean.Meta.Sym.DSimp.getMethods = do let __do_lift ← read pure __do_lift.toMethods
Instances For
Runs a DSimpM computation with the given methods, configuration, and state.
The cache and numSteps from s are preserved (cache entries persist across
invocations because results are not context-dependent).
Equations
Instances For
Equations
- Lean.Meta.Sym.DSimp.getConfig = do let __do_lift ← readThe Lean.Meta.Sym.DSimp.Context pure __do_lift.config
Instances For
Equations
- Lean.Meta.Sym.DSimp.pre e = do let __do_lift ← Lean.Meta.Sym.DSimp.getMethods __do_lift.pre e
Instances For
Equations
- Lean.Meta.Sym.DSimp.post e = do let __do_lift ← Lean.Meta.Sym.DSimp.getMethods __do_lift.post e
Instances For
Equations
- One or more equations did not get rendered due to their size.