The imaginary quadratic field ℚ(√−d): characters, Frobenius and splitting of primes
Lib.General.NumberTheory.ImaginaryQuadraticField.lean
Reading
Upstream documentation written by Claude
This file studies the imaginary quadratic field
K = ℚ(√-d)(New.QuadField) ford ≡ 3 mod 4, realised insideℂ, and the Dirichlet characters attached to it. Throughout,New.chiK d pis the Legendre symbol(p / d)ofpmodulo the primed, andNew.QuadField.betaK dis the algebraic integer(1 + √-d) / 2. A finite place ofK(New.FinPlace) is a nonzero prime of its ring of integers. Below,wis a finite place that contains the rational primep, andw.qis its absolute norm. For a primed ≡ 7 mod 8the file determines the ring of integers and the different ofK. Ford ≡ 3 mod 4it shows how a rational primepdecomposes inK. It also proves two consequences of lifting the exponent at2for integers, which do not involveK.
Copyright 2026 Anthropic, PBC. Apache License 2.0 · Upstream notice.
Rest of upstream introduction
Main definitions and results
New.chiK,New.quadTwist: the Legendre symbol(·/d)as an integer-valued character, and its product with a complex characterχmoduloN, a character moduloN * d.New.QuadField: the field. Ford ≡ 3modulo4it is a quadratic CM field (the degree isNew.QuadField.finrank_eq_two). For a primed ≡ 3modulo4it embeds in any field of characteristic zero with a primitived-th root of unity (New.QuadField.embOfPrimitiveRoot).New.QuadField.different_eq_span_and_adjoin_betaK: for a primed ≡ 7modulo8, the integers ofKareℤ[(1 + √-d) / 2]and the different is(√-d).New.FinPlace.q_eq_pow_inertiaDeg,New.FinPlace.inertiaDeg_dvd_iff_forall_pow_eq: the norm ofwisp ^ fwithfthe residue degree, andfis the order of Frobenius;New.FinPlace.exists_q_eq_powstates both together.New.QuadField.q_eq_iff_chiK_ne_neg_one: forda prime≡ 7 mod 8(New.PrimeSevenModEight),whas degree one iff the Legendre symbol(p / d)is not-1.New.QuadField.span_eq_or_exists_span_eq_mul:pis inert inK, or it is the product of two places of degree one;New.QuadField.prime_inert_or_eq_mulalso lists the places abovep.
Declarations
lemma prime_inert_or_eq_mul (hw : (p : 𝓞 (QuadField d)) ∈ w.asIdeal) : ∃ J : FinPlace (QuadField d), (∀ u : FinPlace (QuadField d), (p : 𝓞 (QuadField d)) ∈ u.asIdeal ↔ u = w ∨ u = J) ∧ (w = J ∧ w.q = p ^ 2 ∨ w.q = p ∧ J.q = p ∧ span {(p : 𝓞 (QuadField d))} = w.asIdeal * J.asIdeal)
Import route to Main
Lib.General.NumberTheory.ImaginaryQuadraticField → Lib.Analytic.EntireLFunction (pinned import) → Lib.Analytic.Landau (pinned import) → New.Reduction.Zeros.Criterion (pinned import) → New.Reduction.OneSidedBound (pinned import) → New.Main (pinned import) → Main (pinned import)