Documentation

CompPoly.Fields.KoalaBear.Ext6.SexticIrreducible

Irreducibility of X^6 + X^3 + 1 over KoalaBear #

The sextic X^6 + X^3 + 1 is the ninth cyclotomic polynomial Φ₉, so it is irreducible over KoalaBear.Field exactly because p has multiplicative order 6 modulo 9 (p ≡ 2 mod 9); its root is a primitive 9th root of unity. It is the defining polynomial of the degree-6 extension in CompPoly/Fields/KoalaBear/Ext6.lean.

No degree-6 binomial does the job, for the same reason as at degree 5 but one step stronger: p - 1 = 2^24 · 127, so 3 ∤ p - 1, x ↦ x^3 is a bijection on KoalaBear, and every W is a cube V^3 — whence X^6 - W = (X^2 - V)(X^4 + V X^2 + V^2) factors for every W.

Φ₉ is chosen among the irreducible sextics for arithmetic reasons. Every entry of the reduction table X^6 … X^10 mod f is ±1, so reduction costs no base-field multiplications, and the same holds for the Frobenius matrix (θ ↦ θ^2, since p ≡ 2 mod 9). It also exposes the 2-then-3 tower for free: θ^3 is a primitive cube root of unity, and F_p(θ^3) = F_p² because Y^2 + Y + 1 is irreducible over KoalaBear.

Certificates #

Degree 6 is composite, so Rabin's test needs the trace condition plus one coprimality check per prime factor of 6 — at p^3 (for ℓ = 2) and p^2 (for ℓ = 3). The collapsed prime-degree form is not just weaker but unsound here: (X^3 + X + 4)(X^3 + X - 4) divides X^(p^6) - X and is coprime to X^p - X, so it would pass. The three conditions are discharged by kernel-checked certificates from CompPoly/Fields/KoalaBear/Ext6/SexticCertData.lean (generated by scripts/gen_rabin_certificate.py): a 258-step chain for the trace, 121 and 75 steps plus a Bézout identity for the two coprimality checks. Each chain is verified by a single kernel reduction of CompPoly.RabinCert.runChainNat arithmetic only, no native_decide.

Main statements #

The defining sextic X^6 + X^3 + 1 = Φ₉ of the degree-6 KoalaBear extension.

Instances For

    The sextic's little-endian -coefficient encoding. Every coefficient of Φ₉ is 0 or 1, so unlike the quintic this needs no p - 1 literal to spell a negative coefficient.

    Instances For

      The -coefficient encoding denotes the sextic.

      The kernel-checked certificates #

      Each theorem below is one kernel reduction: runChain re-verifies every step of the generated chain (cur² = q·f + r, coefficientwise mod p), and chainExp recomputes the exponent the chain reaches. eqModP checks the Bézout identities for coprimality.

      The 258-step chain for X^(p^6) mod f verifies and ends at the residue X.

      Coprimality with X^(p^3) - X, the check for the prime factor 2 of 6 #

      The 121-step chain for X^(p^3) mod f verifies and ends at the recorded residue.

      Coprimality with X^(p^2) - X, the check for the prime factor 3 of 6 #

      The 75-step chain for X^(p^2) mod f verifies and ends at the recorded residue.

      X^6 + X^3 + 1 is irreducible over KoalaBear, by Rabin's test at a degree with two prime factors, with kernel-checked certificates for all three conditions.