Global properties of the Hilbert symbol over ℚ #
The Hilbert symbol (a,b)_v is defined at every place v of ℚ — the finite places
v = p (a prime, giving ℚ_[p]) and the archimedean place v = ∞ (giving ℝ).
This file records the two global properties:
almost_all_one— for fixed nonzeroa b : ℚ, the symbol(a,b)_pis1for all but finitely many primesp. This is a genuinely local fact: forpnot dividing the numerator or denominator ofaorb, both arguments arep-adic units, and the case00of Serre's formula gives1.Hilbert reciprocity
∏_v (a,b)_v = 1(hilbertReciprocity). The hard input is quadratic reciprocity (legendreSym.quadratic_reciprocity); the proof reduces to the square-class generators-1and the primes, using the case in which one argument is a square (prod_eq_one_of_isSquare, where every local symbol is1) as a step.
A prime bundled as a natural number carries its own Fact instance.
Almost all local symbols are trivial #
For a rational q, padicValRat p q = 0 precisely when p divides neither the numerator
nor the denominator of q; such a q is a p-adic unit. There are only finitely many
primes dividing a fixed nonzero rational, so for fixed a, b the symbol (a,b)_p is 1
for all but finitely many p.
Corollaries: squares give the trivial symbol #
If a is a nonzero rational square, then (a,b)_v = 1 at every place v (both the
finite places and the archimedean one), because the conic z² - a x² - b y² = 0 then has
the obvious point (c, 1, 0) with a = c². Consequently the product over all places is
1; this is the special case of Hilbert reciprocity that needs no quadratic reciprocity.
The general statement (not proved here) #
Hilbert reciprocity — the product of (a,b)_v over all places v of ℚ equals 1 —
is the deep quadratic-reciprocity input. Its proof requires the full explicit formulas at
every place (including p = 2, where only the unit case is available locally) and the
quadratic reciprocity law assembled over all primes; that is beyond what this file
formalises. We record the statement as a Prop for downstream reference.
Hilbert reciprocity for ℚ: for nonzero rationals a, b, the product of the local
Hilbert symbols over all places (the finite places ℚ_[p] and the archimedean place ℝ)
is 1. Stated for reference; not proved in this file.
Equations
- HasseMinkowski.HilbertReciprocity = ∀ (a b : ℚ), a ≠ 0 → b ≠ 0 → (∏ᶠ (p : Nat.Primes), HasseMinkowski.hilbertSym ↑a ↑b) * HasseMinkowski.hilbertSym ↑a ↑b = 1
Instances For
Phase 1: reduction of Hilbert reciprocity to square classes #
Write hilbertProd a b for the product of the local symbols of a, b over every place of
ℚ. Every local symbol is bimultiplicative in each argument, so hilbertProd is too; and
multiplying an argument by a nonzero square (or inverting it) leaves hilbertProd unchanged.
Hence hilbertProd factors through the square-class group ℚ*/ℚ*², which is generated by
-1 and the primes. So Hilbert reciprocity follows from its restriction to pairs of
generators g ∈ {-1} ∪ {primes}: this is hilbertReciprocity_of_generators. The generator
cases themselves (the content of quadratic reciprocity) are Phase 2.
The product of the local Hilbert symbols of a and b over all places of ℚ: the
finite places ℚ_[p] together with the archimedean place ℝ.
Equations
- HasseMinkowski.hilbertProd a b = (∏ᶠ (p : Nat.Primes), HasseMinkowski.hilbertSym ↑a ↑b) * HasseMinkowski.hilbertSym ↑a ↑b
Instances For
A generator of the square-class group ℚ*/ℚ*²: -1 or a prime.
Equations
- HasseMinkowski.IsGen g = (g = -1 ∨ ∃ (p : Nat.Primes), g = ↑↑p)
Instances For
The square-class decomposition #
Every nonzero rational is a generator product times a nonzero square. Write q = ±u/v with
u = |q.num|, v = q.den; apply Nat.sq_mul_squarefree_of_pos to u * v, so that
u * v = b² · a with a squarefree. Then u/v = a · (b/v)², and the squarefree a is the
product of its (prime) factors.
Phase 1: reduction to the generator cases #
Phase 2: the generator cases #
hilbertReciprocity_of_generators reduces HilbertReciprocity to the values on pairs of
generators g, h ∈ {-1} ∪ {primes}. Those are exactly the quadratic-reciprocity
computations:
hilbertProd (-1) (-1) = 1: the archimedean and2-adic symbols are both-1, and the finite product over the remaining places is-1, so the two cancel;hilbertProd (-1) p = 1: the two non-trivial places2andpboth contribute(-1)^{(p-1)/2};hilbertProd p p = 1: the supplementary laws at2and atp;hilbertProd p q = 1for distinct primes, the quadratic reciprocity law(p/q)(q/p) = (-1)^{(p-1)/2 · (q-1)/2}(Mathlib.NumberTheory.LegendreSymbol.QuadraticReciprocity).
Each case is a finite finprod with support among {2, p, q}; applying
hilbertReciprocity_of_generators to them yields HilbertReciprocity itself
(hilbertReciprocity, at the end of the file).
Phase 2, infrastructure #
finprod_hilbertSym_eq_finset_prod reduces the infinite product over all primes to a finite
product over an explicit small set. hilbertSym_padic_odd_units handles every odd place that
divides neither argument, and quadraticChar_padicUnit_nat identifies the quadratic character
of the unit part of a rational prime with Mathlib's legendreSym.
Phase 2, the 2-adic supplementary laws #
The 2-adic unit formulas of Two.lean are stated for units of ℤ_[2]; we package an odd
natural n as the unit unitTwo n. The three evaluations needed below are
(-1,-1)_2 = -1, (-1,n)_2 = χ₄ n and (n,n)_2 = χ₄ n, the last two being the
supplementary laws at 2 rewritten as values of the Dirichlet character χ₄.
Phase 2, the odd-prime evaluations #
Phase 2, the generator cases #
Phase 2, the case (p,q) of distinct primes #
The final generator case is genuinely quadratic reciprocity. At the two odd places p and
q the local symbols are (q/p) and (p/q); at 2 the symbol is the quadratic-reciprocity
sign (-1)^{(p-1)/2 · (q-1)/2}; and the archimedean symbol is 1 because both primes are
positive. The product is 1 by legendreSym.quadratic_reciprocity.