Quadratic Reciprocity
Statement
For distinct odd primes and :
where is the Legendre symbol — equal to if is a quadratic residue mod , and otherwise.
In words: is a square mod and is a square mod , unless both , in which case exactly one is a square mod the other.
Supplements
The first supplement states:
The second supplement states:
Historical Note
Gauss called this the "golden theorem" (theorema aureum) and published six different proofs during his lifetime. Over 240 proofs are now known, using techniques from combinatorics, algebra, analysis, and algebraic geometry.
Connections
The proof relies on Fermat's Little TheoremFermat's Little TheoremFor prime p, a^p is congruent to a mod pRead more →. Some modern proofs use ideas from Galois theoryFundamental Theorem of Galois TheoryBijection between intermediate fields and subgroups of the Galois groupRead more →.
Lean4 Proof
/-- Quadratic reciprocity for distinct odd primes. The Legendre symbol
`legendreSym p q` is Mathlib's `(a/p)` defined via Euler's
criterion. For odd `p`, the integer division `p / 2` equals
`(p-1) / 2`, so the exponent matches the textbook form
`((p-1)/2) · ((q-1)/2)`. -/
theorem quadratic_reciprocity {p q : ℕ} [Fact p.Prime] [Fact q.Prime]
(hp : p ≠ 2) (hq : q ≠ 2) (hpq : p ≠ q) :
legendreSym q p * legendreSym p q = (-1) ^ (p / 2 * (q / 2)) :=
legendreSym.quadratic_reciprocity hp hq hpqReferenced by
- Primitive RootsNumber Theory
- Jacobi SymbolNumber Theory
- Fermat's Little TheoremNumber Theory
- Multiplicative FunctionsNumber Theory
- Sum of Two SquaresNumber Theory
- Sum of Two SquaresNumber Theory
- Legendre SymbolNumber Theory
- Pell's EquationNumber Theory
- Wilson's TheoremNumber Theory
- Quadratic ResiduesNumber Theory
- Frobenius EndomorphismField Theory
- Finite FieldsField Theory