Metamath Proof Explorer


Theorem lgsdirprm

Description: The Legendre symbol is completely multiplicative at the primes. See theorem 9.3 in ApostolNT p. 180. (Contributed by Mario Carneiro, 4-Feb-2015) (Proof shortened by AV, 18-Mar-2022)

Ref Expression
Assertion lgsdirprm ABPAB/LP=A/LPB/LP

Proof

Step Hyp Ref Expression
1 simpl1 ABPP=2A
2 simpl2 ABPP=2B
3 lgsdir2 ABAB/L2=A/L2B/L2
4 1 2 3 syl2anc ABPP=2AB/L2=A/L2B/L2
5 simpr ABPP=2P=2
6 5 oveq2d ABPP=2AB/LP=AB/L2
7 5 oveq2d ABPP=2A/LP=A/L2
8 5 oveq2d ABPP=2B/LP=B/L2
9 7 8 oveq12d ABPP=2A/LPB/LP=A/L2B/L2
10 4 6 9 3eqtr4d ABPP=2AB/LP=A/LPB/LP
11 simpl1 ABPP2A
12 simpl2 ABPP2B
13 11 12 zmulcld ABPP2AB
14 simpl3 ABPP2P
15 prmz PP
16 14 15 syl ABPP2P
17 lgscl ABPAB/LP
18 13 16 17 syl2anc ABPP2AB/LP
19 18 zcnd ABPP2AB/LP
20 lgscl APA/LP
21 11 16 20 syl2anc ABPP2A/LP
22 lgscl BPB/LP
23 12 16 22 syl2anc ABPP2B/LP
24 21 23 zmulcld ABPP2A/LPB/LP
25 24 zcnd ABPP2A/LPB/LP
26 19 25 subcld ABPP2AB/LPA/LPB/LP
27 26 abscld ABPP2AB/LPA/LPB/LP
28 prmnn PP
29 14 28 syl ABPP2P
30 29 nnrpd ABPP2P+
31 26 absge0d ABPP20AB/LPA/LPB/LP
32 2re 2
33 32 a1i ABPP22
34 29 nnred ABPP2P
35 19 abscld ABPP2AB/LP
36 25 abscld ABPP2A/LPB/LP
37 35 36 readdcld ABPP2AB/LP+A/LPB/LP
38 19 25 abs2dif2d ABPP2AB/LPA/LPB/LPAB/LP+A/LPB/LP
39 1red ABPP21
40 lgsle1 ABPAB/LP1
41 13 16 40 syl2anc ABPP2AB/LP1
42 eqid x|x1=x|x1
43 42 lgscl2 APA/LPx|x1
44 11 16 43 syl2anc ABPP2A/LPx|x1
45 42 lgscl2 BPB/LPx|x1
46 12 16 45 syl2anc ABPP2B/LPx|x1
47 42 lgslem3 A/LPx|x1B/LPx|x1A/LPB/LPx|x1
48 44 46 47 syl2anc ABPP2A/LPB/LPx|x1
49 fveq2 x=A/LPB/LPx=A/LPB/LP
50 49 breq1d x=A/LPB/LPx1A/LPB/LP1
51 50 elrab A/LPB/LPx|x1A/LPB/LPA/LPB/LP1
52 51 simprbi A/LPB/LPx|x1A/LPB/LP1
53 48 52 syl ABPP2A/LPB/LP1
54 35 36 39 39 41 53 le2addd ABPP2AB/LP+A/LPB/LP1+1
55 df-2 2=1+1
56 54 55 breqtrrdi ABPP2AB/LP+A/LPB/LP2
57 27 37 33 38 56 letrd ABPP2AB/LPA/LPB/LP2
58 prmuz2 PP2
59 eluzle P22P
60 14 58 59 3syl ABPP22P
61 simpr ABPP2P2
62 ltlen 2P2<P2PP2
63 32 34 62 sylancr ABPP22<P2PP2
64 60 61 63 mpbir2and ABPP22<P
65 27 33 34 57 64 lelttrd ABPP2AB/LPA/LPB/LP<P
66 modid AB/LPA/LPB/LPP+0AB/LPA/LPB/LPAB/LPA/LPB/LP<PAB/LPA/LPB/LPmodP=AB/LPA/LPB/LP
67 27 30 31 65 66 syl22anc ABPP2AB/LPA/LPB/LPmodP=AB/LPA/LPB/LP
68 11 zcnd ABPP2A
69 12 zcnd ABPP2B
70 eldifsn P2PP2
71 14 61 70 sylanbrc ABPP2P2
72 oddprm P2P12
73 71 72 syl ABPP2P12
74 73 nnnn0d ABPP2P120
75 68 69 74 mulexpd ABPP2ABP12=AP12BP12
76 zexpcl AP120AP12
77 11 74 76 syl2anc ABPP2AP12
78 77 zcnd ABPP2AP12
79 zexpcl BP120BP12
80 12 74 79 syl2anc ABPP2BP12
81 80 zcnd ABPP2BP12
82 78 81 mulcomd ABPP2AP12BP12=BP12AP12
83 75 82 eqtrd ABPP2ABP12=BP12AP12
84 83 oveq1d ABPP2ABP12modP=BP12AP12modP
85 lgsvalmod ABP2AB/LPmodP=ABP12modP
86 13 71 85 syl2anc ABPP2AB/LPmodP=ABP12modP
87 21 zred ABPP2A/LP
88 77 zred ABPP2AP12
89 lgsvalmod AP2A/LPmodP=AP12modP
90 11 71 89 syl2anc ABPP2A/LPmodP=AP12modP
91 modmul1 A/LPAP12B/LPP+A/LPmodP=AP12modPA/LPB/LPmodP=AP12B/LPmodP
92 87 88 23 30 90 91 syl221anc ABPP2A/LPB/LPmodP=AP12B/LPmodP
93 23 zcnd ABPP2B/LP
94 78 93 mulcomd ABPP2AP12B/LP=B/LPAP12
95 94 oveq1d ABPP2AP12B/LPmodP=B/LPAP12modP
96 23 zred ABPP2B/LP
97 80 zred ABPP2BP12
98 lgsvalmod BP2B/LPmodP=BP12modP
99 12 71 98 syl2anc ABPP2B/LPmodP=BP12modP
100 modmul1 B/LPBP12AP12P+B/LPmodP=BP12modPB/LPAP12modP=BP12AP12modP
101 96 97 77 30 99 100 syl221anc ABPP2B/LPAP12modP=BP12AP12modP
102 92 95 101 3eqtrd ABPP2A/LPB/LPmodP=BP12AP12modP
103 84 86 102 3eqtr4d ABPP2AB/LPmodP=A/LPB/LPmodP
104 moddvds PAB/LPA/LPB/LPAB/LPmodP=A/LPB/LPmodPPAB/LPA/LPB/LP
105 29 18 24 104 syl3anc ABPP2AB/LPmodP=A/LPB/LPmodPPAB/LPA/LPB/LP
106 103 105 mpbid ABPP2PAB/LPA/LPB/LP
107 18 24 zsubcld ABPP2AB/LPA/LPB/LP
108 dvdsabsb PAB/LPA/LPB/LPPAB/LPA/LPB/LPPAB/LPA/LPB/LP
109 16 107 108 syl2anc ABPP2PAB/LPA/LPB/LPPAB/LPA/LPB/LP
110 106 109 mpbid ABPP2PAB/LPA/LPB/LP
111 dvdsmod0 PPAB/LPA/LPB/LPAB/LPA/LPB/LPmodP=0
112 29 110 111 syl2anc ABPP2AB/LPA/LPB/LPmodP=0
113 67 112 eqtr3d ABPP2AB/LPA/LPB/LP=0
114 26 113 abs00d ABPP2AB/LPA/LPB/LP=0
115 19 25 114 subeq0d ABPP2AB/LP=A/LPB/LP
116 10 115 pm2.61dane ABPAB/LP=A/LPB/LP