Denotation of reified expressions #
Converts reified RingExpr, Poly, Mon, Power back into Lean Exprs using
the ring's cached operator functions and variable array.
Convert an integer to a numeral expression in the ring. Negative values use getNegFn.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Denote a Power (variable raised to a power).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Denote a Mon (product of powers).
Equations
- Lean.Meta.Sym.Arith.denoteMon Lean.Grind.CommRing.Mon.unit = Lean.Meta.Sym.Arith.denoteNum 1
- Lean.Meta.Sym.Arith.denoteMon (Lean.Grind.CommRing.Mon.mult pw mn_2) = do let __do_lift ← Lean.Meta.Sym.Arith.denotePower pw Lean.Meta.Sym.Arith.denoteMon.go✝ mn_2 __do_lift
Instances For
Denote a Poly (sum of coefficient × monomial terms).
Equations
- Lean.Meta.Sym.Arith.denotePoly (Lean.Grind.CommRing.Poly.num k) = Lean.Meta.Sym.Arith.denoteNum k
- Lean.Meta.Sym.Arith.denotePoly (Lean.Grind.CommRing.Poly.add k mn p_2) = do let __do_lift ← Lean.Meta.Sym.Arith.denotePoly.denoteTerm✝ k mn Lean.Meta.Sym.Arith.denotePoly.go✝ p_2 __do_lift
Instances For
Denote a RingExpr whose variables are the current ring's, looked up with getVar.
Equations
Instances For
Denote a RingExpr whose variables index vars instead of the current ring's variables.
Proof terms rename the variables of an expression to the compact range 0 .. n-1 of the
variables it actually uses (see renameVars), and build an RArray context out of those
n terms; the denotation of the renamed expression must use that same array.
Equations
- Lean.Meta.Sym.Arith.denoteRingExpr' vars e = Lean.Meta.Sym.Arith.denoteRingExprCore✝ (fun (x : Nat) => pure vars[x]!) e
Instances For
Convert a natural number to a numeral expression in the semiring.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Denote a SemiringExpr whose variables index vars, using the semiring's operators.
Fails on the constructors that have no semiring denotation (sub, neg, intCast, negative numerals).