Metamath Proof Explorer


Theorem lgscllem

Description: The Legendre symbol is an element of Z . (Contributed by Mario Carneiro, 4-Feb-2015)

Ref Expression
Hypotheses lgsval.1 F=nifnifn=2if2A0ifAmod81711An12+1modn1npCntN1
lgsfcl2.z Z=x|x1
Assertion lgscllem ANA/LNZ

Proof

Step Hyp Ref Expression
1 lgsval.1 F=nifnifn=2if2A0ifAmod81711An12+1modn1npCntN1
2 lgsfcl2.z Z=x|x1
3 1 lgsval ANA/LN=ifN=0ifA2=110ifN<0A<011seq1×FN
4 2 lgslem2 1Z0Z1Z
5 4 simp3i 1Z
6 4 simp2i 0Z
7 5 6 ifcli ifA2=110Z
8 7 a1i ANN=0ifA2=110Z
9 4 simp1i 1Z
10 9 5 ifcli ifN<0A<011Z
11 simplr AN¬N=0N
12 simpr AN¬N=0¬N=0
13 12 neqned AN¬N=0N0
14 nnabscl NN0N
15 11 13 14 syl2anc AN¬N=0N
16 nnuz =1
17 15 16 eleqtrdi AN¬N=0N1
18 df-ne N0¬N=0
19 1 2 lgsfcl2 ANN0F:Z
20 19 3expa ANN0F:Z
21 18 20 sylan2br AN¬N=0F:Z
22 elfznn y1Ny
23 ffvelcdm F:ZyFyZ
24 21 22 23 syl2an AN¬N=0y1NFyZ
25 2 lgslem3 yZzZyzZ
26 25 adantl AN¬N=0yZzZyzZ
27 17 24 26 seqcl AN¬N=0seq1×FNZ
28 2 lgslem3 ifN<0A<011Zseq1×FNZifN<0A<011seq1×FNZ
29 10 27 28 sylancr AN¬N=0ifN<0A<011seq1×FNZ
30 8 29 ifclda ANifN=0ifA2=110ifN<0A<011seq1×FNZ
31 3 30 eqeltrd ANA/LNZ