Metamath Proof Explorer


Theorem 2lgsoddprm

Description: The second supplement to the law of quadratic reciprocity for odd primes (common representation, see theorem 9.5 in ApostolNT p. 181): The Legendre symbol for 2 at an odd prime is minus one to the power of the square of the odd prime minus one divided by eight ( ( 2 /L P ) = -1^(((P^2)-1)/8) ). (Contributed by AV, 20-Jul-2021)

Ref Expression
Assertion 2lgsoddprm P22/LP=1P218

Proof

Step Hyp Ref Expression
1 eldifi P2P
2 2lgs P2/LP=1Pmod817
3 1 2 syl P22/LP=1Pmod817
4 simpl 2/LP=1Pmod817P22/LP=1
5 eqcom 1=1P2181P218=1
6 5 a1i P21=1P2181P218=1
7 nnoddn2prm P2P¬2P
8 nnz PP
9 8 anim1i P¬2PP¬2P
10 7 9 syl P2P¬2P
11 sqoddm1div8z P¬2PP218
12 10 11 syl P2P218
13 m1exp1 P2181P218=12P218
14 12 13 syl P21P218=12P218
15 2lgsoddprmlem4 P¬2P2P218Pmod817
16 10 15 syl P22P218Pmod817
17 6 14 16 3bitrd P21=1P218Pmod817
18 17 biimparc Pmod817P21=1P218
19 18 adantl 2/LP=1Pmod817P21=1P218
20 4 19 eqtrd 2/LP=1Pmod817P22/LP=1P218
21 20 exp32 2/LP=1Pmod817P22/LP=1P218
22 2z 2
23 prmz PP
24 1 23 syl P2P
25 lgscl1 2P2/LP101
26 22 24 25 sylancr P22/LP101
27 ovex 2/LPV
28 27 eltp 2/LP1012/LP=12/LP=02/LP=1
29 simpl 2/LP=1P2¬Pmod8172/LP=1
30 16 notbid P2¬2P218¬Pmod817
31 30 biimpar P2¬Pmod817¬2P218
32 m1expo P218¬2P2181P218=1
33 12 31 32 syl2an2r P2¬Pmod8171P218=1
34 33 eqcomd P2¬Pmod8171=1P218
35 34 adantl 2/LP=1P2¬Pmod8171=1P218
36 29 35 eqtrd 2/LP=1P2¬Pmod8172/LP=1P218
37 36 a1d 2/LP=1P2¬Pmod817¬2/LP=12/LP=1P218
38 37 exp32 2/LP=1P2¬Pmod817¬2/LP=12/LP=1P218
39 eldifsn P2PP2
40 simpr PP2P2
41 40 necomd PP22P
42 39 41 sylbi P22P
43 2prm 2
44 prmrp 2P2gcdP=12P
45 43 1 44 sylancr P22gcdP=12P
46 42 45 mpbird P22gcdP=1
47 lgsne0 2P2/LP02gcdP=1
48 22 24 47 sylancr P22/LP02gcdP=1
49 46 48 mpbird P22/LP0
50 eqneqall 2/LP=02/LP0¬Pmod817¬2/LP=12/LP=1P218
51 49 50 syl5 2/LP=0P2¬Pmod817¬2/LP=12/LP=1P218
52 pm2.24 2/LP=1¬2/LP=12/LP=1P218
53 52 2a1d 2/LP=1P2¬Pmod817¬2/LP=12/LP=1P218
54 38 51 53 3jaoi 2/LP=12/LP=02/LP=1P2¬Pmod817¬2/LP=12/LP=1P218
55 28 54 sylbi 2/LP101P2¬Pmod817¬2/LP=12/LP=1P218
56 26 55 mpcom P2¬Pmod817¬2/LP=12/LP=1P218
57 56 com13 ¬2/LP=1¬Pmod817P22/LP=1P218
58 21 57 bija 2/LP=1Pmod817P22/LP=1P218
59 3 58 mpcom P22/LP=1P218