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 A B P A B / L P = A / L P B / L P

Proof

Step Hyp Ref Expression
1 simpl1 A B P P = 2 A
2 simpl2 A B P P = 2 B
3 lgsdir2 A B A B / L 2 = A / L 2 B / L 2
4 1 2 3 syl2anc A B P P = 2 A B / L 2 = A / L 2 B / L 2
5 simpr A B P P = 2 P = 2
6 5 oveq2d A B P P = 2 A B / L P = A B / L 2
7 5 oveq2d A B P P = 2 A / L P = A / L 2
8 5 oveq2d A B P P = 2 B / L P = B / L 2
9 7 8 oveq12d A B P P = 2 A / L P B / L P = A / L 2 B / L 2
10 4 6 9 3eqtr4d A B P P = 2 A B / L P = A / L P B / L P
11 simpl1 A B P P 2 A
12 simpl2 A B P P 2 B
13 11 12 zmulcld A B P P 2 A B
14 simpl3 A B P P 2 P
15 prmz P P
16 14 15 syl A B P P 2 P
17 lgscl A B P A B / L P
18 13 16 17 syl2anc A B P P 2 A B / L P
19 18 zcnd A B P P 2 A B / L P
20 lgscl A P A / L P
21 11 16 20 syl2anc A B P P 2 A / L P
22 lgscl B P B / L P
23 12 16 22 syl2anc A B P P 2 B / L P
24 21 23 zmulcld A B P P 2 A / L P B / L P
25 24 zcnd A B P P 2 A / L P B / L P
26 19 25 subcld A B P P 2 A B / L P A / L P B / L P
27 26 abscld A B P P 2 A B / L P A / L P B / L P
28 prmnn P P
29 14 28 syl A B P P 2 P
30 29 nnrpd A B P P 2 P +
31 26 absge0d A B P P 2 0 A B / L P A / L P B / L P
32 2re 2
33 32 a1i A B P P 2 2
34 29 nnred A B P P 2 P
35 19 abscld A B P P 2 A B / L P
36 25 abscld A B P P 2 A / L P B / L P
37 35 36 readdcld A B P P 2 A B / L P + A / L P B / L P
38 19 25 abs2dif2d A B P P 2 A B / L P A / L P B / L P A B / L P + A / L P B / L P
39 1red A B P P 2 1
40 lgsle1 A B P A B / L P 1
41 13 16 40 syl2anc A B P P 2 A B / L P 1
42 eqid x | x 1 = x | x 1
43 42 lgscl2 A P A / L P x | x 1
44 11 16 43 syl2anc A B P P 2 A / L P x | x 1
45 42 lgscl2 B P B / L P x | x 1
46 12 16 45 syl2anc A B P P 2 B / L P x | x 1
47 42 lgslem3 A / L P x | x 1 B / L P x | x 1 A / L P B / L P x | x 1
48 44 46 47 syl2anc A B P P 2 A / L P B / L P x | x 1
49 fveq2 x = A / L P B / L P x = A / L P B / L P
50 49 breq1d x = A / L P B / L P x 1 A / L P B / L P 1
51 50 elrab A / L P B / L P x | x 1 A / L P B / L P A / L P B / L P 1
52 51 simprbi A / L P B / L P x | x 1 A / L P B / L P 1
53 48 52 syl A B P P 2 A / L P B / L P 1
54 35 36 39 39 41 53 le2addd A B P P 2 A B / L P + A / L P B / L P 1 + 1
55 df-2 2 = 1 + 1
56 54 55 breqtrrdi A B P P 2 A B / L P + A / L P B / L P 2
57 27 37 33 38 56 letrd A B P P 2 A B / L P A / L P B / L P 2
58 prmuz2 P P 2
59 eluzle P 2 2 P
60 14 58 59 3syl A B P P 2 2 P
61 simpr A B P P 2 P 2
62 ltlen 2 P 2 < P 2 P P 2
63 32 34 62 sylancr A B P P 2 2 < P 2 P P 2
64 60 61 63 mpbir2and A B P P 2 2 < P
65 27 33 34 57 64 lelttrd A B P P 2 A B / L P A / L P B / L P < P
66 modid A B / L P A / L P B / L P P + 0 A B / L P A / L P B / L P A B / L P A / L P B / L P < P A B / L P A / L P B / L P mod P = A B / L P A / L P B / L P
67 27 30 31 65 66 syl22anc A B P P 2 A B / L P A / L P B / L P mod P = A B / L P A / L P B / L P
68 11 zcnd A B P P 2 A
69 12 zcnd A B P P 2 B
70 eldifsn P 2 P P 2
71 14 61 70 sylanbrc A B P P 2 P 2
72 oddprm P 2 P 1 2
73 71 72 syl A B P P 2 P 1 2
74 73 nnnn0d A B P P 2 P 1 2 0
75 68 69 74 mulexpd A B P P 2 A B P 1 2 = A P 1 2 B P 1 2
76 zexpcl A P 1 2 0 A P 1 2
77 11 74 76 syl2anc A B P P 2 A P 1 2
78 77 zcnd A B P P 2 A P 1 2
79 zexpcl B P 1 2 0 B P 1 2
80 12 74 79 syl2anc A B P P 2 B P 1 2
81 80 zcnd A B P P 2 B P 1 2
82 78 81 mulcomd A B P P 2 A P 1 2 B P 1 2 = B P 1 2 A P 1 2
83 75 82 eqtrd A B P P 2 A B P 1 2 = B P 1 2 A P 1 2
84 83 oveq1d A B P P 2 A B P 1 2 mod P = B P 1 2 A P 1 2 mod P
85 lgsvalmod A B P 2 A B / L P mod P = A B P 1 2 mod P
86 13 71 85 syl2anc A B P P 2 A B / L P mod P = A B P 1 2 mod P
87 21 zred A B P P 2 A / L P
88 77 zred A B P P 2 A P 1 2
89 lgsvalmod A P 2 A / L P mod P = A P 1 2 mod P
90 11 71 89 syl2anc A B P P 2 A / L P mod P = A P 1 2 mod P
91 modmul1 A / L P A P 1 2 B / L P P + A / L P mod P = A P 1 2 mod P A / L P B / L P mod P = A P 1 2 B / L P mod P
92 87 88 23 30 90 91 syl221anc A B P P 2 A / L P B / L P mod P = A P 1 2 B / L P mod P
93 23 zcnd A B P P 2 B / L P
94 78 93 mulcomd A B P P 2 A P 1 2 B / L P = B / L P A P 1 2
95 94 oveq1d A B P P 2 A P 1 2 B / L P mod P = B / L P A P 1 2 mod P
96 23 zred A B P P 2 B / L P
97 80 zred A B P P 2 B P 1 2
98 lgsvalmod B P 2 B / L P mod P = B P 1 2 mod P
99 12 71 98 syl2anc A B P P 2 B / L P mod P = B P 1 2 mod P
100 modmul1 B / L P B P 1 2 A P 1 2 P + B / L P mod P = B P 1 2 mod P B / L P A P 1 2 mod P = B P 1 2 A P 1 2 mod P
101 96 97 77 30 99 100 syl221anc A B P P 2 B / L P A P 1 2 mod P = B P 1 2 A P 1 2 mod P
102 92 95 101 3eqtrd A B P P 2 A / L P B / L P mod P = B P 1 2 A P 1 2 mod P
103 84 86 102 3eqtr4d A B P P 2 A B / L P mod P = A / L P B / L P mod P
104 moddvds P A B / L P A / L P B / L P A B / L P mod P = A / L P B / L P mod P P A B / L P A / L P B / L P
105 29 18 24 104 syl3anc A B P P 2 A B / L P mod P = A / L P B / L P mod P P A B / L P A / L P B / L P
106 103 105 mpbid A B P P 2 P A B / L P A / L P B / L P
107 18 24 zsubcld A B P P 2 A B / L P A / L P B / L P
108 dvdsabsb P A B / L P A / L P B / L P P A B / L P A / L P B / L P P A B / L P A / L P B / L P
109 16 107 108 syl2anc A B P P 2 P A B / L P A / L P B / L P P A B / L P A / L P B / L P
110 106 109 mpbid A B P P 2 P A B / L P A / L P B / L P
111 dvdsmod0 P P A B / L P A / L P B / L P A B / L P A / L P B / L P mod P = 0
112 29 110 111 syl2anc A B P P 2 A B / L P A / L P B / L P mod P = 0
113 67 112 eqtr3d A B P P 2 A B / L P A / L P B / L P = 0
114 26 113 abs00d A B P P 2 A B / L P A / L P B / L P = 0
115 19 25 114 subeq0d A B P P 2 A B / L P = A / L P B / L P
116 10 115 pm2.61dane A B P A B / L P = A / L P B / L P