Metamath Proof Explorer


Theorem lgsqrmod

Description: If the Legendre symbol of an integer for an odd prime is 1 , then the number is a quadratic residue mod P . (Contributed by AV, 20-Aug-2021)

Ref Expression
Assertion lgsqrmod AP2A/LP=1xx2modP=AmodP

Proof

Step Hyp Ref Expression
1 lgsqr AP2A/LP=1¬PAxPx2A
2 eldifi P2P
3 prmnn PP
4 2 3 syl P2P
5 4 ad2antlr AP2xP
6 zsqcl xx2
7 6 adantl AP2xx2
8 simpll AP2xA
9 moddvds Px2Ax2modP=AmodPPx2A
10 5 7 8 9 syl3anc AP2xx2modP=AmodPPx2A
11 10 biimprd AP2xPx2Ax2modP=AmodP
12 11 reximdva AP2xPx2Axx2modP=AmodP
13 12 adantld AP2¬PAxPx2Axx2modP=AmodP
14 1 13 sylbid AP2A/LP=1xx2modP=AmodP