RH Lean Explorer Sernau readable · Comparator passedChecked

Readable edition · 803 Lean files

The imaginary quadratic field ℚ(√−d): characters, Frobenius and splitting of primes

Lib.General.NumberTheory.ImaginaryQuadraticField.lean

Open interactive viewer Raw Lean source · Pinned source

Reading

Upstream documentation written by Claude

This file studies the imaginary quadratic field K = ℚ(√-d) (New.QuadField) for d ≡ 3 mod 4, realised inside ℂ, and the Dirichlet characters attached to it. Throughout, New.chiK d p is the Legendre symbol (p / d) of p modulo the prime d, and New.QuadField.betaK d is the algebraic integer (1 + √-d) / 2. A finite place of K (New.FinPlace) is a nonzero prime of its ring of integers. Below, w is a finite place that contains the rational prime p, and w.q is its absolute norm. For a prime d ≡ 7 mod 8 the file determines the ring of integers and the different of K. For d ≡ 3 mod 4 it shows how a rational prime p decomposes in K. It also proves two consequences of lifting the exponent at 2 for integers, which do not involve K.

Copyright 2026 Anthropic, PBC. Apache License 2.0 · Upstream notice.

Rest of upstream introduction

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 χ modulo N, a character modulo N * d.
  • New.QuadField: the field. For d ≡ 3 modulo 4 it is a quadratic CM field (the degree is New.QuadField.finrank_eq_two). For a prime d ≡ 3 modulo 4 it embeds in any field of characteristic zero with a primitive d-th root of unity (New.QuadField.embOfPrimitiveRoot).
  • New.QuadField.different_eq_span_and_adjoin_betaK: for a prime d ≡ 7 modulo 8, the integers of K are ℤ[(1 + √-d) / 2] and the different is (√-d).
  • New.FinPlace.q_eq_pow_inertiaDeg, New.FinPlace.inertiaDeg_dvd_iff_forall_pow_eq: the norm of w is p ^ f with f the residue degree, and f is the order of Frobenius; New.FinPlace.exists_q_eq_pow states both together.
  • New.QuadField.q_eq_iff_chiK_ne_neg_one: for d a prime ≡ 7 mod 8 (New.PrimeSevenModEight), w has degree one iff the Legendre symbol (p / d) is not -1.
  • New.QuadField.span_eq_or_exists_span_eq_mul: p is inert in K, or it is the product of two places of degree one; New.QuadField.prime_inert_or_eq_mul also lists the places above p.

Pinned source lines

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)

X Reddit Email LinkedIn