Documentation

LeanPool.SingularModuli.QuadraticOrder.Prime.PolyMod

Prime classification, part 1: the reduced polynomial polyMod d p #

Thesis. §3.2, Proposition 3.2.1 and Remark 3.2.3 — the splitting behaviour of a rational prime p in O_d is governed by the factorisation of the defining polynomial mod p, i.e. by the Kronecker/Legendre symbol (d/p).

This file is the polynomial-level scaffolding for that classification: reduction of poly d mod p, its degree/coefficients, the discriminant identity disc = d (mod p), and the bridge from roots of polyMod to the Legendre symbol:

The ideal-level consequences are split across QuotientIso.lean (the ring iso), Inert.lean, Split.lean, and Ramified.lean.

Note. This file also carries the shared Mathlib import block for the whole Prime/ directory; the other Prime/* files import this one and inherit it.

noncomputable def QuadraticOrder.polyMod (d : ) (p : ) :

Reduction of the defining polynomial poly d modulo p, as a polynomial in (ZMod p)[X].

Equations
Instances For

    Explicit form: polyMod d p = X² - d·X + ((d² - d)/4) over ZMod p.

    theorem QuadraticOrder.polyMod_monic (d : ) (p : ) :

    The mod-p reduction is monic.

    The mod-p reduction has degree 2 (requires p prime so ZMod p is nontrivial).

    @[simp]
    theorem QuadraticOrder.polyMod_coeff_two {d : } {p : } :
    (polyMod d p).coeff 2 = 1

    Coefficient of in polyMod d p is 1.

    @[simp]
    theorem QuadraticOrder.polyMod_coeff_one {d : } {p : } :
    (polyMod d p).coeff 1 = -d

    Coefficient of X in polyMod d p is -d (mod p).

    @[simp]
    theorem QuadraticOrder.polyMod_coeff_zero {d : } {p : } :
    (polyMod d p).coeff 0 = ↑((d ^ 2 - d) / 4)

    Constant coefficient of polyMod d p is (d² - d)/4 (mod p).

    theorem QuadraticOrder.polyMod_discrim_eq {d : } {p : } (hd : d % 4 = 0 d % 4 = 1) :
    discrim 1 (-d) ↑((d ^ 2 - d) / 4) = d

    Discriminant identity: when d ≡ 0 ∨ 1 (mod 4), the (coefficient-level) discriminant of the monic-quadratic form of polyMod d p equals d in ZMod p. This is the key bridge connecting poly d's splitting behaviour to the Kronecker symbol (d / p).

    theorem QuadraticOrder.polyMod_eval {d : } {p : } (x : ZMod p) :
    Polynomial.eval x (polyMod d p) = x ^ 2 - d * x + ↑((d ^ 2 - d) / 4)

    Evaluation of polyMod d p at xZMod p: a closed-form expansion.

    This reduces evaluation to a quadratic expression in x over ZMod p.

    theorem QuadraticOrder.polyMod_exists_root_iff_isSquare_d {d : } {p : } [Fact (Nat.Prime p)] (hp2 : p 2) (hd : d % 4 = 0 d % 4 = 1) :
    (∃ (x : ZMod p), Polynomial.eval x (polyMod d p) = 0) IsSquare d

    For p an odd prime and d ≡ 0 ∨ 1 (mod 4), polyMod d p has a root in ZMod p iff d is a quadratic residue mod p (i.e. IsSquare (d : ZMod p)).

    This is the polynomial-level bridge connecting poly d's splitting behaviour to the Kronecker / Legendre symbol (d / p).

    theorem QuadraticOrder.polyMod_exists_root_iff_legendreSym_ne_neg_one {d : } {p : } [Fact (Nat.Prime p)] (hp2 : p 2) (hd : d % 4 = 0 d % 4 = 1) :
    (∃ (x : ZMod p), Polynomial.eval x (polyMod d p) = 0) legendreSym p d -1

    polyMod d p has a root in ZMod p iff the Legendre symbol (d/p) is not -1. Equivalently, d is either zero (ramified case) or a quadratic residue (split case) mod p.

    theorem QuadraticOrder.polyMod_no_root_iff_legendreSym_eq_neg_one {d : } {p : } [Fact (Nat.Prime p)] (hp2 : p 2) (hd : d % 4 = 0 d % 4 = 1) :
    (¬∃ (x : ZMod p), Polynomial.eval x (polyMod d p) = 0) legendreSym p d = -1

    polyMod d p has no root in ZMod p iff (d/p) = -1 — the inert case.

    The ramified case: (d/p) = 0 ↔ p ∣ d.

    A monic-quadratic polynomial in (ZMod p)[X] splits iff it has a root. For polyMod d p this is the bridge from polyMod_exists_root_iff_isSquare_d to the Polynomial.Splits predicate.

    theorem QuadraticOrder.polyMod_splits_iff_legendreSym_ne_neg_one {d : } {p : } [Fact (Nat.Prime p)] (hp2 : p 2) (hd : d % 4 = 0 d % 4 = 1) :

    polyMod d p splits in (ZMod p)[X] iff the Legendre symbol (d/p) is not -1. This combines polyMod_splits_iff_exists_root with the previously proved polyMod_exists_root_iff_legendreSym_ne_neg_one.

    theorem QuadraticOrder.polyMod_eq_X_sq_of_p_dvd_d {d : } {p : } [Fact (Nat.Prime p)] (hp2 : p 2) (hd : d % 4 = 0 d % 4 = 1) (hpd : p d) :

    The ramified case at the polynomial level: when p is an odd prime dividing d (with d ≡ 0 ∨ 1 (mod 4)), the reduction polyMod d p is identically in (ZMod p)[X]. In particular it has the unique root 0 with multiplicity 2, witnessing the ramified behaviour of (p) in QuadraticOrder d.

    theorem QuadraticOrder.polyMod_exists_two_distinct_roots_of_legendreSym_eq_one {d : } {p : } [Fact (Nat.Prime p)] (hp2 : p 2) (hd : d % 4 = 0 d % 4 = 1) (h_split : legendreSym p d = 1) :
    ∃ (r : ZMod p) (s : ZMod p), r s Polynomial.eval r (polyMod d p) = 0 Polynomial.eval s (polyMod d p) = 0

    The split case at the polynomial level: when p is an odd prime, d ≡ 0 ∨ 1 (mod 4), and the Legendre symbol (d/p) = 1 (so d is a non-zero quadratic residue mod p), polyMod d p has two distinct roots in ZMod p. These two roots witness the splitting (p) = P₁ · P₂ in QuadraticOrder d.

    theorem QuadraticOrder.polyMod_irreducible_iff_legendreSym_eq_neg_one {d : } {p : } [Fact (Nat.Prime p)] (hp2 : p 2) (hd : d % 4 = 0 d % 4 = 1) :

    polyMod d p is irreducible in (ZMod p)[X] iff the Legendre symbol (d/p) = -1. Combines the monic-degree-two irreducibility characterisation with the polynomial-level Legendre bridge already established.