Metamath Proof Explorer


Theorem lgsdi

Description: The Legendre symbol is completely multiplicative in its right argument. Generalization of theorem 9.9(b) in ApostolNT p. 188 (which assumes that M and N are odd positive integers). (Contributed by Mario Carneiro, 5-Feb-2015)

Ref Expression
Assertion lgsdi A M N M 0 N 0 A / L M N = A / L M A / L N

Proof

Step Hyp Ref Expression
1 3anrot A M N M N A
2 lgsdilem M N A M 0 N 0 if A < 0 M N < 0 1 1 = if A < 0 M < 0 1 1 if A < 0 N < 0 1 1
3 1 2 sylanb A M N M 0 N 0 if A < 0 M N < 0 1 1 = if A < 0 M < 0 1 1 if A < 0 N < 0 1 1
4 ancom M N < 0 A < 0 A < 0 M N < 0
5 ifbi M N < 0 A < 0 A < 0 M N < 0 if M N < 0 A < 0 1 1 = if A < 0 M N < 0 1 1
6 4 5 ax-mp if M N < 0 A < 0 1 1 = if A < 0 M N < 0 1 1
7 ancom M < 0 A < 0 A < 0 M < 0
8 ifbi M < 0 A < 0 A < 0 M < 0 if M < 0 A < 0 1 1 = if A < 0 M < 0 1 1
9 7 8 ax-mp if M < 0 A < 0 1 1 = if A < 0 M < 0 1 1
10 ancom N < 0 A < 0 A < 0 N < 0
11 ifbi N < 0 A < 0 A < 0 N < 0 if N < 0 A < 0 1 1 = if A < 0 N < 0 1 1
12 10 11 ax-mp if N < 0 A < 0 1 1 = if A < 0 N < 0 1 1
13 9 12 oveq12i if M < 0 A < 0 1 1 if N < 0 A < 0 1 1 = if A < 0 M < 0 1 1 if A < 0 N < 0 1 1
14 3 6 13 3eqtr4g A M N M 0 N 0 if M N < 0 A < 0 1 1 = if M < 0 A < 0 1 1 if N < 0 A < 0 1 1
15 simpl2 A M N M 0 N 0 M
16 simpl3 A M N M 0 N 0 N
17 15 16 zmulcld A M N M 0 N 0 M N
18 15 zcnd A M N M 0 N 0 M
19 16 zcnd A M N M 0 N 0 N
20 simprl A M N M 0 N 0 M 0
21 simprr A M N M 0 N 0 N 0
22 18 19 20 21 mulne0d A M N M 0 N 0 M N 0
23 nnabscl M N M N 0 M N
24 17 22 23 syl2anc A M N M 0 N 0 M N
25 nnuz = 1
26 24 25 eleqtrdi A M N M 0 N 0 M N 1
27 simpl1 A M N M 0 N 0 A
28 eqid n if n A / L n n pCnt M 1 = n if n A / L n n pCnt M 1
29 28 lgsfcl3 A M M 0 n if n A / L n n pCnt M 1 :
30 27 15 20 29 syl3anc A M N M 0 N 0 n if n A / L n n pCnt M 1 :
31 elfznn k 1 M N k
32 ffvelrn n if n A / L n n pCnt M 1 : k n if n A / L n n pCnt M 1 k
33 30 31 32 syl2an A M N M 0 N 0 k 1 M N n if n A / L n n pCnt M 1 k
34 33 zcnd A M N M 0 N 0 k 1 M N n if n A / L n n pCnt M 1 k
35 eqid n if n A / L n n pCnt N 1 = n if n A / L n n pCnt N 1
36 35 lgsfcl3 A N N 0 n if n A / L n n pCnt N 1 :
37 27 16 21 36 syl3anc A M N M 0 N 0 n if n A / L n n pCnt N 1 :
38 ffvelrn n if n A / L n n pCnt N 1 : k n if n A / L n n pCnt N 1 k
39 37 31 38 syl2an A M N M 0 N 0 k 1 M N n if n A / L n n pCnt N 1 k
40 39 zcnd A M N M 0 N 0 k 1 M N n if n A / L n n pCnt N 1 k
41 simpr A M N M 0 N 0 k 1 M N k k
42 15 ad2antrr A M N M 0 N 0 k 1 M N k M
43 20 ad2antrr A M N M 0 N 0 k 1 M N k M 0
44 16 ad2antrr A M N M 0 N 0 k 1 M N k N
45 21 ad2antrr A M N M 0 N 0 k 1 M N k N 0
46 pcmul k M M 0 N N 0 k pCnt M N = k pCnt M + k pCnt N
47 41 42 43 44 45 46 syl122anc A M N M 0 N 0 k 1 M N k k pCnt M N = k pCnt M + k pCnt N
48 47 oveq2d A M N M 0 N 0 k 1 M N k A / L k k pCnt M N = A / L k k pCnt M + k pCnt N
49 27 ad2antrr A M N M 0 N 0 k 1 M N k A
50 prmz k k
51 50 adantl A M N M 0 N 0 k 1 M N k k
52 lgscl A k A / L k
53 49 51 52 syl2anc A M N M 0 N 0 k 1 M N k A / L k
54 53 zcnd A M N M 0 N 0 k 1 M N k A / L k
55 pczcl k N N 0 k pCnt N 0
56 41 44 45 55 syl12anc A M N M 0 N 0 k 1 M N k k pCnt N 0
57 pczcl k M M 0 k pCnt M 0
58 41 42 43 57 syl12anc A M N M 0 N 0 k 1 M N k k pCnt M 0
59 54 56 58 expaddd A M N M 0 N 0 k 1 M N k A / L k k pCnt M + k pCnt N = A / L k k pCnt M A / L k k pCnt N
60 48 59 eqtrd A M N M 0 N 0 k 1 M N k A / L k k pCnt M N = A / L k k pCnt M A / L k k pCnt N
61 iftrue k if k A / L k k pCnt M N 1 = A / L k k pCnt M N
62 61 adantl A M N M 0 N 0 k 1 M N k if k A / L k k pCnt M N 1 = A / L k k pCnt M N
63 iftrue k if k A / L k k pCnt M 1 = A / L k k pCnt M
64 iftrue k if k A / L k k pCnt N 1 = A / L k k pCnt N
65 63 64 oveq12d k if k A / L k k pCnt M 1 if k A / L k k pCnt N 1 = A / L k k pCnt M A / L k k pCnt N
66 65 adantl A M N M 0 N 0 k 1 M N k if k A / L k k pCnt M 1 if k A / L k k pCnt N 1 = A / L k k pCnt M A / L k k pCnt N
67 60 62 66 3eqtr4rd A M N M 0 N 0 k 1 M N k if k A / L k k pCnt M 1 if k A / L k k pCnt N 1 = if k A / L k k pCnt M N 1
68 1t1e1 1 1 = 1
69 iffalse ¬ k if k A / L k k pCnt M 1 = 1
70 iffalse ¬ k if k A / L k k pCnt N 1 = 1
71 69 70 oveq12d ¬ k if k A / L k k pCnt M 1 if k A / L k k pCnt N 1 = 1 1
72 iffalse ¬ k if k A / L k k pCnt M N 1 = 1
73 68 71 72 3eqtr4a ¬ k if k A / L k k pCnt M 1 if k A / L k k pCnt N 1 = if k A / L k k pCnt M N 1
74 73 adantl A M N M 0 N 0 k 1 M N ¬ k if k A / L k k pCnt M 1 if k A / L k k pCnt N 1 = if k A / L k k pCnt M N 1
75 67 74 pm2.61dan A M N M 0 N 0 k 1 M N if k A / L k k pCnt M 1 if k A / L k k pCnt N 1 = if k A / L k k pCnt M N 1
76 31 adantl A M N M 0 N 0 k 1 M N k
77 eleq1w n = k n k
78 oveq2 n = k A / L n = A / L k
79 oveq1 n = k n pCnt M = k pCnt M
80 78 79 oveq12d n = k A / L n n pCnt M = A / L k k pCnt M
81 77 80 ifbieq1d n = k if n A / L n n pCnt M 1 = if k A / L k k pCnt M 1
82 ovex A / L k k pCnt M V
83 1ex 1 V
84 82 83 ifex if k A / L k k pCnt M 1 V
85 81 28 84 fvmpt k n if n A / L n n pCnt M 1 k = if k A / L k k pCnt M 1
86 oveq1 n = k n pCnt N = k pCnt N
87 78 86 oveq12d n = k A / L n n pCnt N = A / L k k pCnt N
88 77 87 ifbieq1d n = k if n A / L n n pCnt N 1 = if k A / L k k pCnt N 1
89 ovex A / L k k pCnt N V
90 89 83 ifex if k A / L k k pCnt N 1 V
91 88 35 90 fvmpt k n if n A / L n n pCnt N 1 k = if k A / L k k pCnt N 1
92 85 91 oveq12d k n if n A / L n n pCnt M 1 k n if n A / L n n pCnt N 1 k = if k A / L k k pCnt M 1 if k A / L k k pCnt N 1
93 76 92 syl A M N M 0 N 0 k 1 M N n if n A / L n n pCnt M 1 k n if n A / L n n pCnt N 1 k = if k A / L k k pCnt M 1 if k A / L k k pCnt N 1
94 oveq1 n = k n pCnt M N = k pCnt M N
95 78 94 oveq12d n = k A / L n n pCnt M N = A / L k k pCnt M N
96 77 95 ifbieq1d n = k if n A / L n n pCnt M N 1 = if k A / L k k pCnt M N 1
97 eqid n if n A / L n n pCnt M N 1 = n if n A / L n n pCnt M N 1
98 ovex A / L k k pCnt M N V
99 98 83 ifex if k A / L k k pCnt M N 1 V
100 96 97 99 fvmpt k n if n A / L n n pCnt M N 1 k = if k A / L k k pCnt M N 1
101 76 100 syl A M N M 0 N 0 k 1 M N n if n A / L n n pCnt M N 1 k = if k A / L k k pCnt M N 1
102 75 93 101 3eqtr4rd A M N M 0 N 0 k 1 M N n if n A / L n n pCnt M N 1 k = n if n A / L n n pCnt M 1 k n if n A / L n n pCnt N 1 k
103 26 34 40 102 prodfmul A M N M 0 N 0 seq 1 × n if n A / L n n pCnt M N 1 M N = seq 1 × n if n A / L n n pCnt M 1 M N seq 1 × n if n A / L n n pCnt N 1 M N
104 27 15 16 20 21 28 lgsdilem2 A M N M 0 N 0 seq 1 × n if n A / L n n pCnt M 1 M = seq 1 × n if n A / L n n pCnt M 1 M N
105 27 16 15 21 20 35 lgsdilem2 A M N M 0 N 0 seq 1 × n if n A / L n n pCnt N 1 N = seq 1 × n if n A / L n n pCnt N 1 N M
106 18 19 mulcomd A M N M 0 N 0 M N = N M
107 106 fveq2d A M N M 0 N 0 M N = N M
108 107 fveq2d A M N M 0 N 0 seq 1 × n if n A / L n n pCnt N 1 M N = seq 1 × n if n A / L n n pCnt N 1 N M
109 105 108 eqtr4d A M N M 0 N 0 seq 1 × n if n A / L n n pCnt N 1 N = seq 1 × n if n A / L n n pCnt N 1 M N
110 104 109 oveq12d A M N M 0 N 0 seq 1 × n if n A / L n n pCnt M 1 M seq 1 × n if n A / L n n pCnt N 1 N = seq 1 × n if n A / L n n pCnt M 1 M N seq 1 × n if n A / L n n pCnt N 1 M N
111 103 110 eqtr4d A M N M 0 N 0 seq 1 × n if n A / L n n pCnt M N 1 M N = seq 1 × n if n A / L n n pCnt M 1 M seq 1 × n if n A / L n n pCnt N 1 N
112 14 111 oveq12d A M N M 0 N 0 if M N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt M N 1 M N = if M < 0 A < 0 1 1 if N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt M 1 M seq 1 × n if n A / L n n pCnt N 1 N
113 97 lgsval4 A M N M N 0 A / L M N = if M N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt M N 1 M N
114 27 17 22 113 syl3anc A M N M 0 N 0 A / L M N = if M N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt M N 1 M N
115 28 lgsval4 A M M 0 A / L M = if M < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt M 1 M
116 27 15 20 115 syl3anc A M N M 0 N 0 A / L M = if M < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt M 1 M
117 35 lgsval4 A N N 0 A / L N = if N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt N 1 N
118 27 16 21 117 syl3anc A M N M 0 N 0 A / L N = if N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt N 1 N
119 116 118 oveq12d A M N M 0 N 0 A / L M A / L N = if M < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt M 1 M if N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt N 1 N
120 neg1cn 1
121 ax-1cn 1
122 120 121 ifcli if M < 0 A < 0 1 1
123 122 a1i A M N M 0 N 0 if M < 0 A < 0 1 1
124 nnabscl M M 0 M
125 15 20 124 syl2anc A M N M 0 N 0 M
126 125 25 eleqtrdi A M N M 0 N 0 M 1
127 elfznn k 1 M k
128 30 127 32 syl2an A M N M 0 N 0 k 1 M n if n A / L n n pCnt M 1 k
129 128 zcnd A M N M 0 N 0 k 1 M n if n A / L n n pCnt M 1 k
130 mulcl k x k x
131 130 adantl A M N M 0 N 0 k x k x
132 126 129 131 seqcl A M N M 0 N 0 seq 1 × n if n A / L n n pCnt M 1 M
133 120 121 ifcli if N < 0 A < 0 1 1
134 133 a1i A M N M 0 N 0 if N < 0 A < 0 1 1
135 nnabscl N N 0 N
136 16 21 135 syl2anc A M N M 0 N 0 N
137 136 25 eleqtrdi A M N M 0 N 0 N 1
138 elfznn k 1 N k
139 37 138 38 syl2an A M N M 0 N 0 k 1 N n if n A / L n n pCnt N 1 k
140 139 zcnd A M N M 0 N 0 k 1 N n if n A / L n n pCnt N 1 k
141 137 140 131 seqcl A M N M 0 N 0 seq 1 × n if n A / L n n pCnt N 1 N
142 123 132 134 141 mul4d A M N M 0 N 0 if M < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt M 1 M if N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt N 1 N = if M < 0 A < 0 1 1 if N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt M 1 M seq 1 × n if n A / L n n pCnt N 1 N
143 119 142 eqtrd A M N M 0 N 0 A / L M A / L N = if M < 0 A < 0 1 1 if N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt M 1 M seq 1 × n if n A / L n n pCnt N 1 N
144 112 114 143 3eqtr4d A M N M 0 N 0 A / L M N = A / L M A / L N