Metamath Proof Explorer


Theorem lgsquad

Description: The Law of Quadratic Reciprocity, see also theorem 9.8 in ApostolNT p. 185. If P and Q are distinct odd primes, then the product of the Legendre symbols ( P /L Q ) and ( Q /L P ) is the parity of ( ( P - 1 ) / 2 ) x. ( ( Q - 1 ) / 2 ) . This uses Eisenstein's proof, which also has a nice geometric interpretation - see https://en.wikipedia.org/wiki/Proofs_of_quadratic_reciprocity . This is Metamath 100 proof #7. (Contributed by Mario Carneiro, 19-Jun-2015)

Ref Expression
Assertion lgsquad P2Q2PQP/LQQ/LP=1P12Q12

Proof

Step Hyp Ref Expression
1 simp1 P2Q2PQP2
2 simp2 P2Q2PQQ2
3 simp3 P2Q2PQPQ
4 eqid P12=P12
5 eqid Q12=Q12
6 eleq1w x=zx1P12z1P12
7 eleq1w y=wy1Q12w1Q12
8 6 7 bi2anan9 x=zy=wx1P12y1Q12z1P12w1Q12
9 oveq1 y=wyP=wP
10 oveq1 x=zxQ=zQ
11 9 10 breqan12rd x=zy=wyP<xQwP<zQ
12 8 11 anbi12d x=zy=wx1P12y1Q12yP<xQz1P12w1Q12wP<zQ
13 12 cbvopabv xy|x1P12y1Q12yP<xQ=zw|z1P12w1Q12wP<zQ
14 1 2 3 4 5 13 lgsquadlem3 P2Q2PQP/LQQ/LP=1P12Q12