Documentation

Lean.Meta.Sym.Arith.Reify

Reification of arithmetic expressions #

Converts Lean expressions into CommRing.Expr (ring) or CommSemiring.Expr (semiring) for reflection-based normalization.

Instance validation uses pointer equality (isSameExpr) against cached function expressions from Functions.lean.

Differences from grind's Reify.lean #

Converts a Lean expression e into a RingExpr.

If skipVar is true, returns none if e is not an interpreted ring term (used for equalities/disequalities). If false, treats non-interpreted terms as variables (used for inequalities).

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Converts a Lean expression e into a SemiringExpr. Only recognizes add, mul, pow, natCast, and numerals (no sub, neg, intCast).

    Equations
    • One or more equations did not get rendered due to their size.
    Instances For