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:
poly d— the defining polynomialX² − dX + (d² − d)/4QuadraticOrder d— the order, asAdjoinRoot (poly d)tau— the rootτ = (d + √d)/2tau_minimal_poly—τsatisfies its defining polynomialbasis— the rank-2ℤ-power basis{1, τ}, with thebasis_repr_*coordinate-extraction helpersdvd_four_of_valid_disc—4 ∣ d² − dunderd ≡ 0, 1 (mod 4)(shared by the discriminant computations downstream)
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.
The defining polynomial of QuadraticOrder d.
Equations
- poly d = Polynomial.X ^ 2 - Polynomial.C d * Polynomial.X + Polynomial.C ((d ^ 2 - d) / 4)
Instances For
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
- QuadraticOrder d = AdjoinRoot (poly d)
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 element τ corresponding to (d + √d)/2 in the order.
Equations
Instances For
Layer 1: Basic algebraic properties #
τ is a root of the defining polynomial poly d in QuadraticOrder d.
QuadraticOrder d is a free ℤ-module (of rank 2).
QuadraticOrder d is a finite ℤ-module.
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'.
The basis-representation coefficient at index i is the i-th coefficient
of the unique polynomial of degree < 2 representing α (its modByMonic
remainder).