Eisenstein's lemma on quadratic residues
ProvedFamousTheorems.eisenstein_lemma_quadratic_residuesEisenstein's lemma. Let be an odd prime and an odd natural number not divisible by . Then
where is the Legendre symbol.
Eisenstein used this lattice-point form of Gauss's lemma to give his well-known geometric proof of quadratic reciprocity: for distinct odd primes the two exponents count lattice points under the diagonal of a rectangle.
Formalization note. Mathlib's ZMod.eisenstein_lemma. The sum runs over Finset.Ico 1 (p / 2).succ, i.e. , with natural-number floor division x * a / p. The condition is (a : ZMod p) ≠ 0.
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem eisenstein_lemma_quadratic_residues {p : ℕ} [Fact p.Prime] (hp : p ≠ 2) {a : ℕ} (ha1 : a % 2 = 1) (ha0 : (a : ZMod p) ≠ 0) :
legendreSym p a = (-1) ^ ∑ x ∈ Finset.Ico 1 (p / 2).succ, x * a / p := by sorry
end FamousTheoremsSource
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `ZMod.eisenstein_lemma`. Proof here reduces to that Mathlib result.