Documentation

HexGF2.Field.Grind

@[simp]
theorem Hex.GF2nPoly.natCast_succ {f : GF2Poly} {hirr : f.Irreducible} (k : Nat) :
natCast (k + 1) = natCast k + 1

Natural literals step by one, which in characteristic two alternates.

@[simp]
theorem Hex.GF2nPoly.nsmul_eq_natCast_mul {f : GF2Poly} {hirr : f.Irreducible} (k : Nat) (a : GF2nPoly f hirr) :
k a = natCast k * a

Scalar multiplication by a natural is multiplication by its cast, since both depend only on parity.

@[simp]
theorem Hex.GF2nPoly.pow_zero {f : GF2Poly} {hirr : f.Irreducible} (a : GF2nPoly f hirr) :
a ^ 0 = 1

The zeroth power is one, through the linear reference.

@[simp]
theorem Hex.GF2nPoly.pow_succ {f : GF2Poly} {hirr : f.Irreducible} (a : GF2nPoly f hirr) (n : Nat) :
a ^ (n + 1) = a ^ n * a

Each successor power multiplies by one more factor, through the linear reference: the executable power is square-and-multiply, so this is not definitional.

@[simp]
theorem Hex.GF2nPoly.neg_eq_self {f : GF2Poly} {hirr : f.Irreducible} (a : GF2nPoly f hirr) :
-a = a

Negation is the identity in characteristic two.

@[simp]
theorem Hex.GF2nPoly.neg_add_cancel {f : GF2Poly} {hirr : f.Irreducible} (a : GF2nPoly f hirr) :
-a + a = 0

Additive inverses cancel, which in characteristic two is add_self.

@[simp]
theorem Hex.GF2nPoly.sub_eq_add_neg {f : GF2Poly} {hirr : f.Irreducible} (a b : GF2nPoly f hirr) :
a - b = a + -b

Subtraction is addition of the negation, which here is addition.

@[instance_reducible]

Additive and multiplicative structure for the packed quotient field.

Equations
  • One or more equations did not get rendered due to their size.
theorem Hex.GF2nPoly.neg_zsmul {f : GF2Poly} {hirr : f.Irreducible} (i : Int) (a : GF2nPoly f hirr) :
-i a = -(i a)

Integer scalar multiplication negates with its scalar, which in characteristic two is trivial on both sides.

theorem Hex.GF2nPoly.intCast_neg {f : GF2Poly} {hirr : f.Irreducible} (i : Int) :
↑(-i) = -i

Integer casts negate trivially, since negation is the identity.

@[instance_reducible]

Additive inverses for the packed quotient.

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

Multiplication is commutative, inherited from the packed polynomial ring.

Equations
@[simp]
theorem Hex.GF2nPoly.zpow_zero {f : GF2Poly} {hirr : f.Irreducible} (a : GF2nPoly f hirr) :
a ^ 0 = 1

The zeroth integer power is one.

theorem Hex.GF2nPoly.zpow_succ {f : GF2Poly} {hirr : f.Irreducible} (a : GF2nPoly f hirr) (n : Nat) :
a ^ (n + 1) = a ^ n * a

Successor integer powers multiply by one more factor.

theorem Hex.GF2nPoly.zero_ne_one_of_degree_pos {f : GF2Poly} {hirr : f.Irreducible} (hdeg : 0 < f.natDegree) :
0 1

Zero and one are distinct when the modulus is nonconstant.

theorem Hex.GF2nPoly.inv_one_of_degree_pos {f : GF2Poly} {hirr : f.Irreducible} (hdeg : 0 < f.natDegree) :
1⁻¹ = 1

One is its own inverse.

theorem Hex.GF2nPoly.inv_ne_zero_of_degree_pos {f : GF2Poly} {hirr : f.Irreducible} (hdeg : 0 < f.natDegree) {a : GF2nPoly f hirr} (ha : a 0) :

A nonzero element has a nonzero inverse.

theorem Hex.GF2nPoly.inv_inv_of_degree_pos {f : GF2Poly} {hirr : f.Irreducible} (hdeg : 0 < f.natDegree) (a : GF2nPoly f hirr) :

Inversion is an involution, by cancelling through the defining identity.

theorem Hex.GF2nPoly.zpow_neg_of_degree_pos {f : GF2Poly} {hirr : f.Irreducible} (hdeg : 0 < f.natDegree) (a : GF2nPoly f hirr) (n : Int) :
a ^ (-n) = (a ^ n)⁻¹

Negating an integer exponent inverts the power.

@[instance_reducible]

Field laws for the packed quotient, given a nonconstant irreducible modulus.

Not an instance: see the note above on why irreducibility alone is not enough.

Equations
  • One or more equations did not get rendered due to their size.
Instances For

    Characteristic two, given a nonconstant irreducible modulus.