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. - rhsVarMask : Nat
Instances For
Collection of simplification theorems available to the simplifier.
Instances For
Instances For
Instances For
def
Lean.Meta.Sym.Simp.Theorems.getMatchWithExtra
(thms : Theorems)
(mctx : MetavarContext)
(e : Expr)
:
Instances For
@[reducible, inline]
Environment extension storing a set of Sym.Simp theorems.
Each named set gets its own extension, created by registerSymSimpAttr.