Documentation

Lean.Meta.Sym.Simp.Theorems

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 declName for 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 (using acLt), preventing infinite loops.

Instances For
    @[implicit_reducible]

    Collection of simplification theorems available to the simplifier.

    Instances For
      def Lean.Meta.Sym.Simp.isPerm (numVars : Nat) (lhs rhs : Expr) :
      Instances For

        Create a Theorem from a proof expression. Handles equalities, ¬, , and propositions.

        Instances For
          @[reducible, inline]

          Environment extension storing a set of Sym.Simp theorems. Each named set gets its own extension, created by registerSymSimpAttr.

          Instances For
            def Lean.Meta.Sym.Simp.mkSymSimpExt (name : Name := by exact decl_name%) :
            Instances For
              @[reducible, inline]
              Instances For