Metamath Proof Explorer


Theorem lgsne0

Description: The Legendre symbol is nonzero (and hence equal to 1 or -u 1 ) precisely when the arguments are coprime. (Contributed by Mario Carneiro, 5-Feb-2015)

Ref Expression
Assertion lgsne0 A N A / L N 0 A gcd N = 1

Proof

Step Hyp Ref Expression
1 iffalse ¬ A 2 = 1 if A 2 = 1 1 0 = 0
2 1 necon1ai if A 2 = 1 1 0 0 A 2 = 1
3 iftrue A 2 = 1 if A 2 = 1 1 0 = 1
4 ax-1ne0 1 0
5 4 a1i A 2 = 1 1 0
6 3 5 eqnetrd A 2 = 1 if A 2 = 1 1 0 0
7 2 6 impbii if A 2 = 1 1 0 0 A 2 = 1
8 zre A A
9 8 ad2antrr A N N = 0 A
10 absresq A A 2 = A 2
11 9 10 syl A N N = 0 A 2 = A 2
12 sq1 1 2 = 1
13 12 a1i A N N = 0 1 2 = 1
14 11 13 eqeq12d A N N = 0 A 2 = 1 2 A 2 = 1
15 9 recnd A N N = 0 A
16 15 abscld A N N = 0 A
17 15 absge0d A N N = 0 0 A
18 1re 1
19 0le1 0 1
20 sq11 A 0 A 1 0 1 A 2 = 1 2 A = 1
21 18 19 20 mpanr12 A 0 A A 2 = 1 2 A = 1
22 16 17 21 syl2anc A N N = 0 A 2 = 1 2 A = 1
23 14 22 bitr3d A N N = 0 A 2 = 1 A = 1
24 7 23 syl5bb A N N = 0 if A 2 = 1 1 0 0 A = 1
25 oveq2 N = 0 A / L N = A / L 0
26 lgs0 A A / L 0 = if A 2 = 1 1 0
27 26 adantr A N A / L 0 = if A 2 = 1 1 0
28 25 27 sylan9eqr A N N = 0 A / L N = if A 2 = 1 1 0
29 28 neeq1d A N N = 0 A / L N 0 if A 2 = 1 1 0 0
30 oveq2 N = 0 A gcd N = A gcd 0
31 gcdid0 A A gcd 0 = A
32 31 adantr A N A gcd 0 = A
33 30 32 sylan9eqr A N N = 0 A gcd N = A
34 33 eqeq1d A N N = 0 A gcd N = 1 A = 1
35 24 29 34 3bitr4d A N N = 0 A / L N 0 A gcd N = 1
36 eqid n if n A / L n n pCnt N 1 = n if n A / L n n pCnt N 1
37 36 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
38 37 neeq1d A N N 0 A / L N 0 if N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt N 1 N 0
39 neeq1 1 = if N < 0 A < 0 1 1 1 0 if N < 0 A < 0 1 1 0
40 neeq1 1 = if N < 0 A < 0 1 1 1 0 if N < 0 A < 0 1 1 0
41 neg1ne0 1 0
42 39 40 41 4 keephyp if N < 0 A < 0 1 1 0
43 42 biantrur seq 1 × n if n A / L n n pCnt N 1 N 0 if N < 0 A < 0 1 1 0 seq 1 × n if n A / L n n pCnt N 1 N 0
44 neg1cn 1
45 ax-1cn 1
46 44 45 ifcli if N < 0 A < 0 1 1
47 46 a1i A N N 0 if N < 0 A < 0 1 1
48 nnabscl N N 0 N
49 48 3adant1 A N N 0 N
50 nnuz = 1
51 49 50 eleqtrdi A N N 0 N 1
52 36 lgsfcl3 A N N 0 n if n A / L n n pCnt N 1 :
53 elfznn k 1 N k
54 ffvelrn n if n A / L n n pCnt N 1 : k n if n A / L n n pCnt N 1 k
55 52 53 54 syl2an A N N 0 k 1 N n if n A / L n n pCnt N 1 k
56 55 zcnd A N N 0 k 1 N n if n A / L n n pCnt N 1 k
57 mulcl k x k x
58 57 adantl A N N 0 k x k x
59 51 56 58 seqcl A N N 0 seq 1 × n if n A / L n n pCnt N 1 N
60 47 59 mulne0bd A N N 0 if N < 0 A < 0 1 1 0 seq 1 × n if n A / L n n pCnt N 1 N 0 if N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt N 1 N 0
61 43 60 bitr2id A N N 0 if N < 0 A < 0 1 1 seq 1 × n if n A / L n n pCnt N 1 N 0 seq 1 × n if n A / L n n pCnt N 1 N 0
62 gcd2n0cl A N N 0 A gcd N
63 eluz2b3 A gcd N 2 A gcd N A gcd N 1
64 exprmfct A gcd N 2 p p A gcd N
65 63 64 sylbir A gcd N A gcd N 1 p p A gcd N
66 57 adantl A N N 0 p p A gcd N k x k x
67 56 adantlr A N N 0 p p A gcd N k 1 N n if n A / L n n pCnt N 1 k
68 mul02 k 0 k = 0
69 68 adantl A N N 0 p p A gcd N k 0 k = 0
70 mul01 k k 0 = 0
71 70 adantl A N N 0 p p A gcd N k k 0 = 0
72 simprr A N N 0 p p A gcd N p A gcd N
73 prmz p p
74 73 ad2antrl A N N 0 p p A gcd N p
75 simpl1 A N N 0 p p A gcd N A
76 simpl2 A N N 0 p p A gcd N N
77 dvdsgcdb p A N p A p N p A gcd N
78 74 75 76 77 syl3anc A N N 0 p p A gcd N p A p N p A gcd N
79 72 78 mpbird A N N 0 p p A gcd N p A p N
80 79 simprd A N N 0 p p A gcd N p N
81 dvdsabsb p N p N p N
82 74 76 81 syl2anc A N N 0 p p A gcd N p N p N
83 80 82 mpbid A N N 0 p p A gcd N p N
84 49 adantr A N N 0 p p A gcd N N
85 dvdsle p N p N p N
86 74 84 85 syl2anc A N N 0 p p A gcd N p N p N
87 83 86 mpd A N N 0 p p A gcd N p N
88 prmnn p p
89 88 ad2antrl A N N 0 p p A gcd N p
90 89 50 eleqtrdi A N N 0 p p A gcd N p 1
91 84 nnzd A N N 0 p p A gcd N N
92 elfz5 p 1 N p 1 N p N
93 90 91 92 syl2anc A N N 0 p p A gcd N p 1 N p N
94 87 93 mpbird A N N 0 p p A gcd N p 1 N
95 eleq1w n = p n p
96 oveq2 n = p A / L n = A / L p
97 oveq1 n = p n pCnt N = p pCnt N
98 96 97 oveq12d n = p A / L n n pCnt N = A / L p p pCnt N
99 95 98 ifbieq1d n = p if n A / L n n pCnt N 1 = if p A / L p p pCnt N 1
100 ovex A / L p p pCnt N V
101 1ex 1 V
102 100 101 ifex if p A / L p p pCnt N 1 V
103 99 36 102 fvmpt p n if n A / L n n pCnt N 1 p = if p A / L p p pCnt N 1
104 89 103 syl A N N 0 p p A gcd N n if n A / L n n pCnt N 1 p = if p A / L p p pCnt N 1
105 iftrue p if p A / L p p pCnt N 1 = A / L p p pCnt N
106 105 ad2antrl A N N 0 p p A gcd N if p A / L p p pCnt N 1 = A / L p p pCnt N
107 oveq2 p = 2 A / L p = A / L 2
108 lgs2 A A / L 2 = if 2 A 0 if A mod 8 1 7 1 1
109 75 108 syl A N N 0 p p A gcd N A / L 2 = if 2 A 0 if A mod 8 1 7 1 1
110 107 109 sylan9eqr A N N 0 p p A gcd N p = 2 A / L p = if 2 A 0 if A mod 8 1 7 1 1
111 simpr A N N 0 p p A gcd N p = 2 p = 2
112 79 simpld A N N 0 p p A gcd N p A
113 112 adantr A N N 0 p p A gcd N p = 2 p A
114 111 113 eqbrtrrd A N N 0 p p A gcd N p = 2 2 A
115 114 iftrued A N N 0 p p A gcd N p = 2 if 2 A 0 if A mod 8 1 7 1 1 = 0
116 110 115 eqtrd A N N 0 p p A gcd N p = 2 A / L p = 0
117 simpll1 A N N 0 p p A gcd N p 2 A
118 simprl A N N 0 p p A gcd N p
119 118 adantr A N N 0 p p A gcd N p 2 p
120 simpr A N N 0 p p A gcd N p 2 p 2
121 eldifsn p 2 p p 2
122 119 120 121 sylanbrc A N N 0 p p A gcd N p 2 p 2
123 lgsval3 A p 2 A / L p = A p 1 2 + 1 mod p 1
124 117 122 123 syl2anc A N N 0 p p A gcd N p 2 A / L p = A p 1 2 + 1 mod p 1
125 oddprm p 2 p 1 2
126 122 125 syl A N N 0 p p A gcd N p 2 p 1 2
127 126 nnnn0d A N N 0 p p A gcd N p 2 p 1 2 0
128 zexpcl A p 1 2 0 A p 1 2
129 117 127 128 syl2anc A N N 0 p p A gcd N p 2 A p 1 2
130 129 zred A N N 0 p p A gcd N p 2 A p 1 2
131 0red A N N 0 p p A gcd N p 2 0
132 18 a1i A N N 0 p p A gcd N p 2 1
133 119 88 syl A N N 0 p p A gcd N p 2 p
134 133 nnrpd A N N 0 p p A gcd N p 2 p +
135 0zd A N N 0 p p A gcd N p 2 0
136 112 adantr A N N 0 p p A gcd N p 2 p A
137 dvdsval3 p A p A A mod p = 0
138 133 117 137 syl2anc A N N 0 p p A gcd N p 2 p A A mod p = 0
139 136 138 mpbid A N N 0 p p A gcd N p 2 A mod p = 0
140 0mod p + 0 mod p = 0
141 134 140 syl A N N 0 p p A gcd N p 2 0 mod p = 0
142 139 141 eqtr4d A N N 0 p p A gcd N p 2 A mod p = 0 mod p
143 modexp A 0 p 1 2 0 p + A mod p = 0 mod p A p 1 2 mod p = 0 p 1 2 mod p
144 117 135 127 134 142 143 syl221anc A N N 0 p p A gcd N p 2 A p 1 2 mod p = 0 p 1 2 mod p
145 126 0expd A N N 0 p p A gcd N p 2 0 p 1 2 = 0
146 145 oveq1d A N N 0 p p A gcd N p 2 0 p 1 2 mod p = 0 mod p
147 144 146 eqtrd A N N 0 p p A gcd N p 2 A p 1 2 mod p = 0 mod p
148 modadd1 A p 1 2 0 1 p + A p 1 2 mod p = 0 mod p A p 1 2 + 1 mod p = 0 + 1 mod p
149 130 131 132 134 147 148 syl221anc A N N 0 p p A gcd N p 2 A p 1 2 + 1 mod p = 0 + 1 mod p
150 0p1e1 0 + 1 = 1
151 150 oveq1i 0 + 1 mod p = 1 mod p
152 149 151 eqtrdi A N N 0 p p A gcd N p 2 A p 1 2 + 1 mod p = 1 mod p
153 133 nnred A N N 0 p p A gcd N p 2 p
154 prmuz2 p p 2
155 119 154 syl A N N 0 p p A gcd N p 2 p 2
156 eluz2b2 p 2 p 1 < p
157 155 156 sylib A N N 0 p p A gcd N p 2 p 1 < p
158 157 simprd A N N 0 p p A gcd N p 2 1 < p
159 1mod p 1 < p 1 mod p = 1
160 153 158 159 syl2anc A N N 0 p p A gcd N p 2 1 mod p = 1
161 152 160 eqtrd A N N 0 p p A gcd N p 2 A p 1 2 + 1 mod p = 1
162 161 oveq1d A N N 0 p p A gcd N p 2 A p 1 2 + 1 mod p 1 = 1 1
163 1m1e0 1 1 = 0
164 162 163 eqtrdi A N N 0 p p A gcd N p 2 A p 1 2 + 1 mod p 1 = 0
165 124 164 eqtrd A N N 0 p p A gcd N p 2 A / L p = 0
166 116 165 pm2.61dane A N N 0 p p A gcd N A / L p = 0
167 166 oveq1d A N N 0 p p A gcd N A / L p p pCnt N = 0 p pCnt N
168 zq N N
169 76 168 syl A N N 0 p p A gcd N N
170 pcabs p N p pCnt N = p pCnt N
171 118 169 170 syl2anc A N N 0 p p A gcd N p pCnt N = p pCnt N
172 pcelnn p N p pCnt N p N
173 118 84 172 syl2anc A N N 0 p p A gcd N p pCnt N p N
174 83 173 mpbird A N N 0 p p A gcd N p pCnt N
175 171 174 eqeltrrd A N N 0 p p A gcd N p pCnt N
176 175 0expd A N N 0 p p A gcd N 0 p pCnt N = 0
177 167 176 eqtrd A N N 0 p p A gcd N A / L p p pCnt N = 0
178 104 106 177 3eqtrd A N N 0 p p A gcd N n if n A / L n n pCnt N 1 p = 0
179 66 67 69 71 94 84 178 seqz A N N 0 p p A gcd N seq 1 × n if n A / L n n pCnt N 1 N = 0
180 179 rexlimdvaa A N N 0 p p A gcd N seq 1 × n if n A / L n n pCnt N 1 N = 0
181 65 180 syl5 A N N 0 A gcd N A gcd N 1 seq 1 × n if n A / L n n pCnt N 1 N = 0
182 62 181 mpand A N N 0 A gcd N 1 seq 1 × n if n A / L n n pCnt N 1 N = 0
183 182 necon1d A N N 0 seq 1 × n if n A / L n n pCnt N 1 N 0 A gcd N = 1
184 51 adantr A N N 0 A gcd N = 1 N 1
185 53 adantl A N N 0 A gcd N = 1 k 1 N k
186 eleq1w n = k n k
187 oveq2 n = k A / L n = A / L k
188 oveq1 n = k n pCnt N = k pCnt N
189 187 188 oveq12d n = k A / L n n pCnt N = A / L k k pCnt N
190 186 189 ifbieq1d n = k if n A / L n n pCnt N 1 = if k A / L k k pCnt N 1
191 ovex A / L k k pCnt N V
192 191 101 ifex if k A / L k k pCnt N 1 V
193 190 36 192 fvmpt k n if n A / L n n pCnt N 1 k = if k A / L k k pCnt N 1
194 185 193 syl A N N 0 A gcd N = 1 k 1 N n if n A / L n n pCnt N 1 k = if k A / L k k pCnt N 1
195 simpll1 A N N 0 A gcd N = 1 k A
196 prmz k k
197 196 adantl A N N 0 A gcd N = 1 k k
198 lgscl A k A / L k
199 195 197 198 syl2anc A N N 0 A gcd N = 1 k A / L k
200 199 zcnd A N N 0 A gcd N = 1 k A / L k
201 200 adantr A N N 0 A gcd N = 1 k k N A / L k
202 oveq2 k = 2 A / L k = A / L 2
203 195 adantr A N N 0 A gcd N = 1 k k N A
204 203 108 syl A N N 0 A gcd N = 1 k k N A / L 2 = if 2 A 0 if A mod 8 1 7 1 1
205 202 204 sylan9eqr A N N 0 A gcd N = 1 k k N k = 2 A / L k = if 2 A 0 if A mod 8 1 7 1 1
206 nprmdvds1 k ¬ k 1
207 206 adantl A N N 0 A gcd N = 1 k ¬ k 1
208 simpll2 A N N 0 A gcd N = 1 k N
209 dvdsgcdb k A N k A k N k A gcd N
210 197 195 208 209 syl3anc A N N 0 A gcd N = 1 k k A k N k A gcd N
211 simplr A N N 0 A gcd N = 1 k A gcd N = 1
212 211 breq2d A N N 0 A gcd N = 1 k k A gcd N k 1
213 210 212 bitrd A N N 0 A gcd N = 1 k k A k N k 1
214 207 213 mtbird A N N 0 A gcd N = 1 k ¬ k A k N
215 imnan k A ¬ k N ¬ k A k N
216 214 215 sylibr A N N 0 A gcd N = 1 k k A ¬ k N
217 216 con2d A N N 0 A gcd N = 1 k k N ¬ k A
218 217 imp A N N 0 A gcd N = 1 k k N ¬ k A
219 breq1 k = 2 k A 2 A
220 219 notbid k = 2 ¬ k A ¬ 2 A
221 218 220 syl5ibcom A N N 0 A gcd N = 1 k k N k = 2 ¬ 2 A
222 221 imp A N N 0 A gcd N = 1 k k N k = 2 ¬ 2 A
223 222 iffalsed A N N 0 A gcd N = 1 k k N k = 2 if 2 A 0 if A mod 8 1 7 1 1 = if A mod 8 1 7 1 1
224 205 223 eqtrd A N N 0 A gcd N = 1 k k N k = 2 A / L k = if A mod 8 1 7 1 1
225 neeq1 1 = if A mod 8 1 7 1 1 1 0 if A mod 8 1 7 1 1 0
226 neeq1 1 = if A mod 8 1 7 1 1 1 0 if A mod 8 1 7 1 1 0
227 225 226 4 41 keephyp if A mod 8 1 7 1 1 0
228 227 a1i A N N 0 A gcd N = 1 k k N k = 2 if A mod 8 1 7 1 1 0
229 224 228 eqnetrd A N N 0 A gcd N = 1 k k N k = 2 A / L k 0
230 simpr A N N 0 A gcd N = 1 k k
231 230 ad2antrr A N N 0 A gcd N = 1 k k N k 2 k
232 231 206 syl A N N 0 A gcd N = 1 k k N k 2 ¬ k 1
233 simplr A N N 0 A gcd N = 1 k k N k 2 k N
234 231 196 syl A N N 0 A gcd N = 1 k k N k 2 k
235 203 adantr A N N 0 A gcd N = 1 k k N k 2 A
236 simpr A N N 0 A gcd N = 1 k k N k 2 k 2
237 eldifsn k 2 k k 2
238 231 236 237 sylanbrc A N N 0 A gcd N = 1 k k N k 2 k 2
239 oddprm k 2 k 1 2
240 238 239 syl A N N 0 A gcd N = 1 k k N k 2 k 1 2
241 240 nnnn0d A N N 0 A gcd N = 1 k k N k 2 k 1 2 0
242 zexpcl A k 1 2 0 A k 1 2
243 235 241 242 syl2anc A N N 0 A gcd N = 1 k k N k 2 A k 1 2
244 208 ad2antrr A N N 0 A gcd N = 1 k k N k 2 N
245 dvdsgcd k A k 1 2 N k A k 1 2 k N k A k 1 2 gcd N
246 234 243 244 245 syl3anc A N N 0 A gcd N = 1 k k N k 2 k A k 1 2 k N k A k 1 2 gcd N
247 233 246 mpan2d A N N 0 A gcd N = 1 k k N k 2 k A k 1 2 k A k 1 2 gcd N
248 235 zcnd A N N 0 A gcd N = 1 k k N k 2 A
249 248 241 absexpd A N N 0 A gcd N = 1 k k N k 2 A k 1 2 = A k 1 2
250 249 oveq1d A N N 0 A gcd N = 1 k k N k 2 A k 1 2 gcd N = A k 1 2 gcd N
251 gcdabs A k 1 2 N A k 1 2 gcd N = A k 1 2 gcd N
252 243 244 251 syl2anc A N N 0 A gcd N = 1 k k N k 2 A k 1 2 gcd N = A k 1 2 gcd N
253 gcdabs A N A gcd N = A gcd N
254 235 244 253 syl2anc A N N 0 A gcd N = 1 k k N k 2 A gcd N = A gcd N
255 211 ad2antrr A N N 0 A gcd N = 1 k k N k 2 A gcd N = 1
256 254 255 eqtrd A N N 0 A gcd N = 1 k k N k 2 A gcd N = 1
257 218 adantr A N N 0 A gcd N = 1 k k N k 2 ¬ k A
258 dvds0 k k 0
259 234 258 syl A N N 0 A gcd N = 1 k k N k 2 k 0
260 breq2 A = 0 k A k 0
261 259 260 syl5ibrcom A N N 0 A gcd N = 1 k k N k 2 A = 0 k A
262 261 necon3bd A N N 0 A gcd N = 1 k k N k 2 ¬ k A A 0
263 257 262 mpd A N N 0 A gcd N = 1 k k N k 2 A 0
264 nnabscl A A 0 A
265 235 263 264 syl2anc A N N 0 A gcd N = 1 k k N k 2 A
266 simpll3 A N N 0 A gcd N = 1 k N 0
267 208 266 48 syl2anc A N N 0 A gcd N = 1 k N
268 267 ad2antrr A N N 0 A gcd N = 1 k k N k 2 N
269 rplpwr A N k 1 2 A gcd N = 1 A k 1 2 gcd N = 1
270 265 268 240 269 syl3anc A N N 0 A gcd N = 1 k k N k 2 A gcd N = 1 A k 1 2 gcd N = 1
271 256 270 mpd A N N 0 A gcd N = 1 k k N k 2 A k 1 2 gcd N = 1
272 250 252 271 3eqtr3d A N N 0 A gcd N = 1 k k N k 2 A k 1 2 gcd N = 1
273 272 breq2d A N N 0 A gcd N = 1 k k N k 2 k A k 1 2 gcd N k 1
274 247 273 sylibd A N N 0 A gcd N = 1 k k N k 2 k A k 1 2 k 1
275 232 274 mtod A N N 0 A gcd N = 1 k k N k 2 ¬ k A k 1 2
276 prmnn k k
277 276 adantl A N N 0 A gcd N = 1 k k
278 277 ad2antrr A N N 0 A gcd N = 1 k k N k 2 k
279 dvdsval3 k A k 1 2 k A k 1 2 A k 1 2 mod k = 0
280 278 243 279 syl2anc A N N 0 A gcd N = 1 k k N k 2 k A k 1 2 A k 1 2 mod k = 0
281 280 necon3bbid A N N 0 A gcd N = 1 k k N k 2 ¬ k A k 1 2 A k 1 2 mod k 0
282 275 281 mpbid A N N 0 A gcd N = 1 k k N k 2 A k 1 2 mod k 0
283 lgsvalmod A k 2 A / L k mod k = A k 1 2 mod k
284 235 238 283 syl2anc A N N 0 A gcd N = 1 k k N k 2 A / L k mod k = A k 1 2 mod k
285 278 nnrpd A N N 0 A gcd N = 1 k k N k 2 k +
286 0mod k + 0 mod k = 0
287 285 286 syl A N N 0 A gcd N = 1 k k N k 2 0 mod k = 0
288 282 284 287 3netr4d A N N 0 A gcd N = 1 k k N k 2 A / L k mod k 0 mod k
289 oveq1 A / L k = 0 A / L k mod k = 0 mod k
290 289 necon3i A / L k mod k 0 mod k A / L k 0
291 288 290 syl A N N 0 A gcd N = 1 k k N k 2 A / L k 0
292 229 291 pm2.61dane A N N 0 A gcd N = 1 k k N A / L k 0
293 pczcl k N N 0 k pCnt N 0
294 230 208 266 293 syl12anc A N N 0 A gcd N = 1 k k pCnt N 0
295 294 nn0zd A N N 0 A gcd N = 1 k k pCnt N
296 295 adantr A N N 0 A gcd N = 1 k k N k pCnt N
297 neeq1 x = A / L k k pCnt N x 0 A / L k k pCnt N 0
298 expclz A / L k A / L k 0 k pCnt N A / L k k pCnt N
299 expne0i A / L k A / L k 0 k pCnt N A / L k k pCnt N 0
300 297 298 299 elrabd A / L k A / L k 0 k pCnt N A / L k k pCnt N x | x 0
301 201 292 296 300 syl3anc A N N 0 A gcd N = 1 k k N A / L k k pCnt N x | x 0
302 dvdsabsb k N k N k N
303 197 208 302 syl2anc A N N 0 A gcd N = 1 k k N k N
304 303 notbid A N N 0 A gcd N = 1 k ¬ k N ¬ k N
305 pceq0 k N k pCnt N = 0 ¬ k N
306 230 267 305 syl2anc A N N 0 A gcd N = 1 k k pCnt N = 0 ¬ k N
307 208 168 syl A N N 0 A gcd N = 1 k N
308 pcabs k N k pCnt N = k pCnt N
309 230 307 308 syl2anc A N N 0 A gcd N = 1 k k pCnt N = k pCnt N
310 309 eqeq1d A N N 0 A gcd N = 1 k k pCnt N = 0 k pCnt N = 0
311 304 306 310 3bitr2rd A N N 0 A gcd N = 1 k k pCnt N = 0 ¬ k N
312 311 biimpar A N N 0 A gcd N = 1 k ¬ k N k pCnt N = 0
313 312 oveq2d A N N 0 A gcd N = 1 k ¬ k N A / L k k pCnt N = A / L k 0
314 200 adantr A N N 0 A gcd N = 1 k ¬ k N A / L k
315 314 exp0d A N N 0 A gcd N = 1 k ¬ k N A / L k 0 = 1
316 313 315 eqtrd A N N 0 A gcd N = 1 k ¬ k N A / L k k pCnt N = 1
317 neeq1 x = 1 x 0 1 0
318 317 elrab 1 x | x 0 1 1 0
319 45 4 318 mpbir2an 1 x | x 0
320 316 319 eqeltrdi A N N 0 A gcd N = 1 k ¬ k N A / L k k pCnt N x | x 0
321 301 320 pm2.61dan A N N 0 A gcd N = 1 k A / L k k pCnt N x | x 0
322 319 a1i A N N 0 A gcd N = 1 ¬ k 1 x | x 0
323 321 322 ifclda A N N 0 A gcd N = 1 if k A / L k k pCnt N 1 x | x 0
324 323 adantr A N N 0 A gcd N = 1 k 1 N if k A / L k k pCnt N 1 x | x 0
325 194 324 eqeltrd A N N 0 A gcd N = 1 k 1 N n if n A / L n n pCnt N 1 k x | x 0
326 neeq1 x = k x 0 k 0
327 326 elrab k x | x 0 k k 0
328 neeq1 x = y x 0 y 0
329 328 elrab y x | x 0 y y 0
330 mulcl k y k y
331 330 ad2ant2r k k 0 y y 0 k y
332 mulne0 k k 0 y y 0 k y 0
333 331 332 jca k k 0 y y 0 k y k y 0
334 327 329 333 syl2anb k x | x 0 y x | x 0 k y k y 0
335 neeq1 x = k y x 0 k y 0
336 335 elrab k y x | x 0 k y k y 0
337 334 336 sylibr k x | x 0 y x | x 0 k y x | x 0
338 337 adantl A N N 0 A gcd N = 1 k x | x 0 y x | x 0 k y x | x 0
339 184 325 338 seqcl A N N 0 A gcd N = 1 seq 1 × n if n A / L n n pCnt N 1 N x | x 0
340 neeq1 x = seq 1 × n if n A / L n n pCnt N 1 N x 0 seq 1 × n if n A / L n n pCnt N 1 N 0
341 340 elrab seq 1 × n if n A / L n n pCnt N 1 N x | x 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 0
342 341 simprbi seq 1 × n if n A / L n n pCnt N 1 N x | x 0 seq 1 × n if n A / L n n pCnt N 1 N 0
343 339 342 syl A N N 0 A gcd N = 1 seq 1 × n if n A / L n n pCnt N 1 N 0
344 343 ex A N N 0 A gcd N = 1 seq 1 × n if n A / L n n pCnt N 1 N 0
345 183 344 impbid A N N 0 seq 1 × n if n A / L n n pCnt N 1 N 0 A gcd N = 1
346 38 61 345 3bitrd A N N 0 A / L N 0 A gcd N = 1
347 346 3expa A N N 0 A / L N 0 A gcd N = 1
348 35 347 pm2.61dane A N A / L N 0 A gcd N = 1