Documentation

HexMvPoly.Ring

@[instance_reducible]
instance Hex.MvPoly.instNatCast {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] :
NatCast (MvPoly n R cmp)

Natural number numerals, as constant polynomials.

Equations
@[instance_reducible]
instance Hex.MvPoly.instOfNat {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] (k : Nat) :
OfNat (MvPoly n R cmp) k
Equations
@[instance_reducible]
instance Hex.MvPoly.instNSMul {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] :
SMul Nat (MvPoly n R cmp)
Equations
@[instance_reducible]
instance Hex.MvPoly.instIntCast {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] :
IntCast (MvPoly n R cmp)
Equations
@[instance_reducible]
instance Hex.MvPoly.instZSMul {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] :
SMul Int (MvPoly n R cmp)
Equations
@[simp]
theorem Hex.MvPoly.coeff_ofNat {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] (k : Nat) (m : Mono n) :

Numerals are constant polynomials.

@[simp]
theorem Hex.MvPoly.coeff_natCast {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] (k : Nat) (m : Mono n) :
coeff m k = if m = Mono.zero then k else 0

The canonical map from the natural numbers lands in the constants.

theorem Hex.MvPoly.pow_zero {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] (p : MvPoly n R cmp) :
p ^ 0 = 1

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.

@[simp]
theorem Hex.MvPoly.neg_zero {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] :
-0 = 0

Negating zero gives zero.

@[simp]
theorem Hex.MvPoly.neg_neg {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] (p : MvPoly n R cmp) :
- -p = p

Negation is an involution.

theorem Hex.MvPoly.neg_add_cancel {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] (p : MvPoly n R cmp) :
-p + p = 0

Negation is the left inverse of addition.

theorem Hex.MvPoly.sub_eq_add_neg {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] (p q : MvPoly n R cmp) :
p - q = p + -q

Subtraction is addition of the negation.

theorem Hex.MvPoly.nsmul_eq_natCast_mul {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] (k : Nat) (p : MvPoly n R cmp) :
k p = k * p

Multiplying by a natural numeral is scalar multiplication.

theorem Hex.MvPoly.ofNat_succ {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] (k : Nat) :

Successor numerals add one.

theorem Hex.MvPoly.ofNat_eq_natCast {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] (k : Nat) :
OfNat.ofNat k = k

Numerals agree with the canonical map from the natural numbers.

@[instance_reducible]

Multivariate polynomials over a lightweight commutative ring form a lightweight semiring.

Equations
  • One or more equations did not get rendered due to their size.
@[instance_reducible]
instance Hex.MvPoly.instGrindRing {n : Nat} {R : Type u} {cmp : Mono nMono nOrdering} [Std.TransCmp cmp] [Std.LawfulEqCmp cmp] [BEq R] [LawfulBEq R] [Lean.Grind.CommRing R] [DecidableEq R] :

Multivariate polynomials over a lightweight commutative ring form a lightweight ring.

Equations
  • One or more equations did not get rendered due to their size.
@[instance_reducible]

Multivariate polynomial multiplication is commutative when coefficient multiplication is.

Equations