A simplification theorem for the structural simplifier.
Contains both the theorem expression and a precomputed pattern for efficient unification during rewriting.
- expr : Expr
The theorem expression, typically
Expr.const declNamefor a named theorem. - pattern : Pattern
Precomputed pattern extracted from the theorem's type for efficient matching.
- rhs : Expr
Right-hand side of the equation.
- perm : Bool
If
true, the theorem is a permutation rule (e.g.,x + y = y + x). Rewriting is only applied when the result is strictly less than the input (usingacLt), preventing infinite loops.
Instances For
@[implicit_reducible]
Equations
@[implicit_reducible]
Equations
- Lean.Meta.Sym.Simp.instBEqTheorem = { beq := fun (thm₁ thm₂ : Lean.Meta.Sym.Simp.Theorem) => thm₁.expr == thm₂.expr }
Collection of simplification theorems available to the simplifier.
Instances For
@[implicit_reducible]
Equations
Equations
Instances For
Equations
- thms.getMatch e = Lean.Meta.Sym.getMatch thms.thms e
Instances For
Equations
- thms.getMatchWithExtra e = Lean.Meta.Sym.getMatchWithExtra thms.thms e
Instances For
Equations
- Lean.Meta.Sym.Simp.isPerm numVars lhs rhs = match (ReaderT.run (Lean.Meta.Sym.Simp.isPermAux✝ lhs rhs) 0).run (Array.replicate numVars none) with | Except.ok a => true | x => false
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
Environment extension storing a set of Sym.Simp theorems.
Each named set gets its own extension, created by registerSymSimpAttr.
Equations
Instances For
Equations
- ext.getTheorems = do let __do_lift ← Lean.getEnv pure (Lean.ScopedEnvExtension.getState ext __do_lift)
Instances For
Equations
- One or more equations did not get rendered due to their size.
Instances For
@[reducible, inline]
Equations
Instances For
Equations
- One or more equations did not get rendered due to their size.