Documentation

Lean.Meta.Sym.Arith.Functions

Cached function expressions for arithmetic operators #

Synthesizes and caches the canonical Lean expressions for arithmetic operators (+, *, -, ^, intCast, natCast, etc.). These cached expressions are used during reification to validate instances via pointer equality (isSameExpr).

Each getter checks the cache field first. On a miss, it synthesizes the instance, verifies it against the expected instance from the ring structure using isDefEqI, canonicalizes the result via canonExpr, and stores it.

The embedding OfSemiring.toQ of the semiring into its envelope ring.

Instances For

    The AddRightCancel instance of the semiring, if any. The result of the search is cached.

    Instances For