Chapter 5: quadratic reciprocity
ProvedProofsInTheBook.Chapter05.chapter05_quadratic_reciprocitynumber-theoryproofs-from-the-bookquadratic-reciprocity
Let and be distinct odd primes. Writing for the Legendre symbol modulo an odd prime , we have
The primality, oddness, and distinctness assumptions are all retained. The source proof invokes Mathlib's quadratic reciprocity theorem.
Preamble
import Mathlib
Formal statement
theorem ProofsInTheBook.Chapter05.chapter05_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)) := by sorrySource
Aigner and Ziegler, Proofs from THE BOOK, sixth edition (2018), Chapter 5; https://doi.org/10.1007/978-3-662-57265-8. Exact Lean declaration: https://github.com/xiangyazi24/proof_in_the_book/blob/88d88d141768cded75e782c525ef1bf04b8fe220/ProofsInTheBook/Chapter05.lean#L27-L30