: the coefficients of count sums of two squares
ProvedClassNumberFormula.gaussian_ideal_count_eq_two_squaresclass-number-formulanumber-theory
Let be a quadratic number field containing a square root of , that is, , whose ring of integers is the Gaussian integers. Then for every the -th coefficient of , the number of ideals of norm , is
The right-hand side is one quarter of the number of representations of as a sum of two squares of integers. This makes precise the source's remark that the coefficient is "essentially the number of representations of as a sum of two squares of nonnegative integers".
Formalization Note The source's "essentially" is made exact by counting pairs with , (one representative per unit class ); counting pairs of non-negative integers instead would overcount, e.g. for .
Preamble
import Mathlib open NumberField NumberField.InfinitePlace NumberField.Units Filter Topology Real
Formal statement
namespace ClassNumberFormula
theorem gaussian_ideal_count_eq_two_squares (K : Type*) [Field K] [NumberField K]
(hK : Module.finrank ℚ K = 2) (hi : ∃ i : K, i ^ 2 = -1) (n : ℕ) (hn : 1 ≤ n) :
Nat.card {I : Ideal (𝓞 K) // Ideal.absNorm I = n} =
Nat.card {p : ℤ × ℤ // 0 < p.1 ∧ 0 ≤ p.2 ∧ p.1 ^ 2 + p.2 ^ 2 = n} := by sorry
end ClassNumberFormulaSource
Wikipedia, "Class number formula" (revision oldid=1366411311), https://en.wikipedia.org/w/index.php?title=Class_number_formula&oldid=1366411311, section "Proof", second paragraph ("The n-th coefficient of the Dirichlet series is essentially the number of representations of n as a sum of two squares")
Human review
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.