Documentation

HexPoly.Instances

Dense-polynomial negation is involutive.

@[irreducible]
def Hex.DensePoly.natPow {R : Type u} [Zero R] [One R] [Add R] [Mul R] [DecidableEq R] (p : DensePoly R) (n : Nat) :

Natural powers by binary exponentiation.

Equations
Instances For
    @[simp]
    theorem Hex.DensePoly.natPow_one {R : Type u} [Zero R] [One R] [Add R] [Mul R] [DecidableEq R] (p : DensePoly R) :
    p.natPow 1 = p

    Exponent one returns the input without polynomial multiplication.

    @[simp]
    theorem Hex.DensePoly.natPow_two {R : Type u} [Zero R] [One R] [Add R] [Mul R] [DecidableEq R] (p : DensePoly R) :
    p.natPow 2 = p * p

    Exponent two performs just the required polynomial square.

    theorem Hex.DensePoly.natPow_succ {R : Type u} [Lean.Grind.CommRing R] [DecidableEq R] (p : DensePoly R) (n : Nat) :
    p.natPow (n + 1) = p.natPow n * p
    @[instance_reducible]

    Natural-number casts are constant polynomials, reusing zero and one.

    Equations
    @[instance_reducible]

    Numerals are constant polynomials, reusing zero and one.

    Equations
    @[instance_reducible]

    Natural scalar multiplication is multiplication by the cast constant.

    Equations
    @[instance_reducible]

    Natural powers of dense polynomials.

    Equations
    @[instance_reducible]

    Integer casts are signed constant polynomials.

    Equations
    @[instance_reducible]

    Integer scalar multiplication is signed natural scalar multiplication.

    Equations
    @[simp]

    A numeral polynomial stores its value in coefficient zero only.

    @[simp]
    theorem Hex.DensePoly.coeff_natCast {R : Type u} [Lean.Grind.CommRing R] [DecidableEq R] (n i : Nat) :
    (↑n).coeff i = if i = 0 then ↑n else 0

    A cast-natural polynomial stores its value in coefficient zero only.

    @[instance_reducible]

    Dense 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]

    Dense 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]

    Dense polynomial multiplication is commutative when coefficient multiplication is.

    Equations