The first supplementary law of quadratic reciprocity
ProvedFamousTheorems.first_supplementary_law_qrThe first supplementary law of quadratic reciprocity. Let be a prime. Then is a square modulo if and only if .
Equivalently, for odd . Fermat and Euler used this law in the theorem on sums of two squares: an odd prime is a sum of two squares if and only if . The prime is included, since is a square.
Formalization note. Mathlib's ZMod.exists_sq_eq_neg_one_iff. IsSquare (-1 : ZMod p) says that is a square in .
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem first_supplementary_law_qr {p : ℕ} [Fact p.Prime] : IsSquare (-1 : ZMod p) ↔ p % 4 ≠ 3 := by sorry
end FamousTheoremsSource
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `ZMod.exists_sq_eq_neg_one_iff`. Proof here reduces to that Mathlib result.