Metamath Proof Explorer


Theorem lgssq

Description: The Legendre symbol at a square is equal to 1 . Together with lgsmod this implies that the Legendre symbol takes value 1 at every quadratic residue. (Contributed by Mario Carneiro, 5-Feb-2015) (Revised by AV, 20-Jul-2021)

Ref Expression
Assertion lgssq AA0NAgcdN=1A2/LN=1

Proof

Step Hyp Ref Expression
1 simp1l AA0NAgcdN=1A
2 simp2 AA0NAgcdN=1N
3 simp1r AA0NAgcdN=1A0
4 lgsdir AANA0A0AA/LN=A/LNA/LN
5 1 1 2 3 3 4 syl32anc AA0NAgcdN=1AA/LN=A/LNA/LN
6 zcn AA
7 6 adantr AA0A
8 7 3ad2ant1 AA0NAgcdN=1A
9 8 sqvald AA0NAgcdN=1A2=AA
10 9 oveq1d AA0NAgcdN=1A2/LN=AA/LN
11 lgscl ANA/LN
12 1 2 11 syl2anc AA0NAgcdN=1A/LN
13 12 zred AA0NAgcdN=1A/LN
14 absresq A/LNA/LN2=A/LN2
15 13 14 syl AA0NAgcdN=1A/LN2=A/LN2
16 lgsabs1 ANA/LN=1AgcdN=1
17 16 adantlr AA0NA/LN=1AgcdN=1
18 17 biimp3ar AA0NAgcdN=1A/LN=1
19 18 oveq1d AA0NAgcdN=1A/LN2=12
20 sq1 12=1
21 19 20 eqtrdi AA0NAgcdN=1A/LN2=1
22 12 zcnd AA0NAgcdN=1A/LN
23 22 sqvald AA0NAgcdN=1A/LN2=A/LNA/LN
24 15 21 23 3eqtr3d AA0NAgcdN=11=A/LNA/LN
25 5 10 24 3eqtr4d AA0NAgcdN=1A2/LN=1