Natural number numerals, as constant polynomials.
Equations
- Hex.MvPoly.instOfNat 0 = { ofNat := Zero.zero }
- Hex.MvPoly.instOfNat 1 = { ofNat := One.one }
- Hex.MvPoly.instOfNat k_2.succ.succ = { ofNat := Hex.MvPoly.C (OfNat.ofNat (k_2 + 2)) }
Equations
- Hex.MvPoly.instNSMul = { smul := fun (k : Nat) (p : Hex.MvPoly n R cmp) => ↑k * p }
Equations
- Hex.MvPoly.instIntCast = { intCast := fun (i : Int) => match i with | Int.ofNat k => ↑k | Int.negSucc k => -↑(k + 1) }
Equations
- Hex.MvPoly.instZSMul = { smul := fun (i : Int) (p : Hex.MvPoly n R cmp) => match i with | Int.ofNat k => k • p | Int.negSucc k => -((k + 1) • p) }
Numerals are constant polynomials.
The canonical map from the natural numbers lands in the constants.
The zeroth power is one.
npowBySq is defined by well-founded recursion, so it is @[irreducible] and
rfl does not see through it; the equation lemma does.
Negating zero gives zero.
Negation is an involution.
Negation is the left inverse of addition.
Subtraction is addition of the negation.
Multiplying by a natural numeral is scalar multiplication.
Successor numerals add one.
Numerals agree with the canonical map from the natural numbers.
Multivariate polynomials over a lightweight commutative ring form a lightweight semiring.
Equations
- One or more equations did not get rendered due to their size.
Multivariate polynomials over a lightweight commutative ring form a lightweight ring.
Equations
- One or more equations did not get rendered due to their size.
Multivariate polynomial multiplication is commutative when coefficient multiplication is.
Equations
- Hex.MvPoly.instGrindCommRing = { toRing := Hex.MvPoly.instGrindRing, mul_comm := ⋯ }