Documentation

LeanPool.SingularModuli.QuadraticOrder.Basic

The quadratic order O_d — definition and power basis #

Thesis. §1.2 (Notation) and §3.2, the order O = O_d = ℤ[(d + √d)/2] ≅ ℤ[x]/(x² − dx + (d² − d)/4).

This file defines the core object and its most basic structure:

The norm form lives in Norm.lean; the discriminant identity (τ − tauConj)² = d in Discriminant.lean.

Divergence from thesis. The thesis works over an honest discriminant d (so d ≡ 0, 1 (mod 4)). Here QuadraticOrder d is defined for every d : ℤ via Euclidean division in the constant term; the congruence hypothesis is introduced only where it is actually needed (see Discriminant.lean). For d ≢ 0, 1 (mod 4) the object is still a well-defined quadratic -algebra but no longer matches the order of discriminant d.

noncomputable def poly (d : ) :

The defining polynomial of QuadraticOrder d.

Equations
Instances For
    @[reducible, inline]
    abbrev QuadraticOrder (d : ) :

    QuadraticOrder d is the quadratic -algebra ℤ[x] / (x^2 - d * x + (d^2 - d) / 4), where the constant term is formed using Euclidean division in .

    For integers d with d ≡ 0, 1 (mod 4), this ring coincides with the (imaginary) quadratic order of discriminant d in the quadratic field ℚ(√d). When d does not satisfy these congruence conditions, this definition should simply be understood as this explicit quadratic quotient ring over .

    Equations
    Instances For

      Defining polynomial #

      We define poly before the variable command so the auto-binder does not add a second implicit d to its signature.

      The defining polynomial is monic of degree 2.

      The natural degree of the defining polynomial is 2.

      The degree of the defining polynomial is 2.

      noncomputable def QuadraticOrder.tau {d : } :

      The element τ corresponding to (d + √d)/2 in the order.

      Equations
      Instances For

        Layer 1: Basic algebraic properties #

        theorem QuadraticOrder.tau_minimal_poly {d : } :
        tau ^ 2 - d tau + ((d ^ 2 - d) / 4) 1 = 0

        τ is a root of the defining polynomial X² - dX + (d²-d)/4.

        Proof sketch: aeval τ (poly d) = mk (poly d) (poly d) = 0 by AdjoinRoot.aeval_eq and AdjoinRoot.mk_self.

        @[simp]

        τ is a root of the defining polynomial poly d in QuadraticOrder d.

        QuadraticOrder d has a -module power basis {1, τ} of rank 2.

        Equations
        Instances For

          QuadraticOrder d is a free -module (of rank 2).

          theorem QuadraticOrder.dvd_four_of_valid_disc {d : } (hd : d % 4 = 0 d % 4 = 1) :
          4 d ^ 2 - d

          For an honest discriminant (d ≡ 0 ∨ 1 (mod 4)), 4 ∣ d² − d. This is the shared arithmetic fact underlying the discriminant computations in Discriminant.lean and Prime/PolyMod.lean.

          Basis helpers #

          These extract (basis.basis.repr α) i — the τ-component (or 1-component) of a ring element — via the modByMonic representation underlying AdjoinRoot's powerBasis'.

          @[simp]

          The dimension of the power basis equals the degree of the defining polynomial, namely 2.

          The basis-representation coefficient at index i is the i-th coefficient of the unique polynomial of degree < 2 representing α (its modByMonic remainder).

          The τ-coefficient (index 1) of τ itself is 1.