Kronecker symbol and fundamental discriminants
DefinitionClassNumberFormula_KroneckerThis file defines the two arithmetic notions used to state Dirichlet's class number formula.
-
Fundamental discriminant. An integer is a fundamental discriminant if and either and is squarefree, or with or and squarefree. These are exactly the discriminants of quadratic number fields.
-
Kronecker symbol. For an integer and a natural number , write with odd. The Kronecker symbol is
where is the Jacobi symbol and equals if is even, if and if . For the value is if and otherwise.
For a fundamental discriminant , the map is the real Dirichlet character modulo appearing in Dirichlet's class number formula.
Formalization Note kroneckerTwo d is Mathlib's character ZMod.χ₈ evaluated at ; the odd part uses Mathlib's jacobiSym. The value at never enters an -series.
import Mathlib
namespace ClassNumberFormula
/-- The Kronecker symbol `(d/2)`: `0` if `d` is even, `1` if `d ≡ ±1 (mod 8)`,
`-1` if `d ≡ ±3 (mod 8)`. -/
def kroneckerTwo (d : ℤ) : ℤ := ZMod.χ₈ (d : ZMod 8)
/-- The Kronecker symbol `(d/m)` for an integer `d` and a natural number `m`.
For `m ≥ 1`, writing `m = 2^k * m'` with `m'` odd, it is `(d/2)^k * (d/m')`, where `(d/m')`
is the Jacobi symbol. For `m = 0` it is `1` if `d = ±1` and `0` otherwise. -/
def kroneckerSymbol (d : ℤ) (m : ℕ) : ℤ :=
if m = 0 then (if d = 1 ∨ d = -1 then 1 else 0)
else kroneckerTwo d ^ (m.factorization 2) * jacobiSym d (m / 2 ^ (m.factorization 2))
/-- `d` is a fundamental discriminant: `d ≠ 1` and either `d ≡ 1 (mod 4)` is squarefree, or
`d = 4m` with `m ≡ 2, 3 (mod 4)` squarefree. -/
def IsFundamentalDiscriminant (d : ℤ) : Prop :=
d ≠ 1 ∧ ((d % 4 = 1 ∧ Squarefree d) ∨
(∃ m : ℤ, d = 4 * m ∧ (m % 4 = 2 ∨ m % 4 = 3) ∧ Squarefree m))
end ClassNumberFormula
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.