Metamath Proof Explorer


Theorem aks4d1p8

Description: Show that N and R are coprime for AKS existence theorem, with eliminated hypothesis. (Contributed by metakunt, 10-Nov-2024) (Proof sketch by Thierry Arnoux.)

Ref Expression
Hypotheses aks4d1p8.1 φ N 3
aks4d1p8.2 A = N log 2 B k = 1 log 2 N 2 N k 1
aks4d1p8.3 B = log 2 N 5
aks4d1p8.4 R = sup r 1 B | ¬ r A <
Assertion aks4d1p8 φ N gcd R = 1

Proof

Step Hyp Ref Expression
1 aks4d1p8.1 φ N 3
2 aks4d1p8.2 A = N log 2 B k = 1 log 2 N 2 N k 1
3 aks4d1p8.3 B = log 2 N 5
4 aks4d1p8.4 R = sup r 1 B | ¬ r A <
5 4 a1i φ 1 < N gcd R p p R ¬ p N R N gcd R A R = sup r 1 B | ¬ r A <
6 ssrab2 r 1 B | ¬ r A 1 B
7 6 a1i φ r 1 B | ¬ r A 1 B
8 elfznn o 1 B o
9 8 adantl φ o 1 B o
10 9 nnred φ o 1 B o
11 10 ex φ o 1 B o
12 11 ssrdv φ 1 B
13 7 12 sstrd φ r 1 B | ¬ r A
14 13 adantr φ 1 < N gcd R r 1 B | ¬ r A
15 14 adantr φ 1 < N gcd R p r 1 B | ¬ r A
16 15 adantr φ 1 < N gcd R p p R ¬ p N r 1 B | ¬ r A
17 16 adantr φ 1 < N gcd R p p R ¬ p N R N gcd R A r 1 B | ¬ r A
18 fzfid φ 1 B Fin
19 18 7 ssfid φ r 1 B | ¬ r A Fin
20 1 2 3 aks4d1p3 φ r 1 B ¬ r A
21 rabn0 r 1 B | ¬ r A r 1 B ¬ r A
22 20 21 sylibr φ r 1 B | ¬ r A
23 fiminre r 1 B | ¬ r A r 1 B | ¬ r A Fin r 1 B | ¬ r A x r 1 B | ¬ r A y r 1 B | ¬ r A x y
24 13 19 22 23 syl3anc φ x r 1 B | ¬ r A y r 1 B | ¬ r A x y
25 24 adantr φ 1 < N gcd R x r 1 B | ¬ r A y r 1 B | ¬ r A x y
26 25 adantr φ 1 < N gcd R p x r 1 B | ¬ r A y r 1 B | ¬ r A x y
27 26 adantr φ 1 < N gcd R p p R ¬ p N x r 1 B | ¬ r A y r 1 B | ¬ r A x y
28 27 adantr φ 1 < N gcd R p p R ¬ p N R N gcd R A x r 1 B | ¬ r A y r 1 B | ¬ r A x y
29 breq1 r = R p r A R p A
30 29 notbid r = R p ¬ r A ¬ R p A
31 1zzd φ 1 < N gcd R p p R ¬ p N R N gcd R A 1
32 3 a1i φ B = log 2 N 5
33 2re 2
34 33 a1i φ 2
35 2pos 0 < 2
36 35 a1i φ 0 < 2
37 eluzelz N 3 N
38 1 37 syl φ N
39 38 zred φ N
40 0red φ 0
41 3re 3
42 41 a1i φ 3
43 3pos 0 < 3
44 43 a1i φ 0 < 3
45 eluzle N 3 3 N
46 1 45 syl φ 3 N
47 40 42 39 44 46 ltletrd φ 0 < N
48 1red φ 1
49 1lt2 1 < 2
50 49 a1i φ 1 < 2
51 48 50 ltned φ 1 2
52 51 necomd φ 2 1
53 34 36 39 47 52 relogbcld φ log 2 N
54 5nn0 5 0
55 54 a1i φ 5 0
56 53 55 reexpcld φ log 2 N 5
57 56 ceilcld φ log 2 N 5
58 32 57 eqeltrd φ B
59 58 ad4antr φ 1 < N gcd R p p R ¬ p N R N gcd R A B
60 simplrl φ 1 < N gcd R p p R ¬ p N R N gcd R A p R
61 prmnn p p
62 61 adantl φ 1 < N gcd R p p
63 62 ad2antrr φ 1 < N gcd R p p R ¬ p N R N gcd R A p
64 63 nnzd φ 1 < N gcd R p p R ¬ p N R N gcd R A p
65 62 nnne0d φ 1 < N gcd R p p 0
66 65 ad2antrr φ 1 < N gcd R p p R ¬ p N R N gcd R A p 0
67 1 2 3 4 aks4d1p4 φ R 1 B ¬ R A
68 67 simpld φ R 1 B
69 elfznn R 1 B R
70 68 69 syl φ R
71 70 ad4antr φ 1 < N gcd R p p R ¬ p N R
72 71 adantr φ 1 < N gcd R p p R ¬ p N R N gcd R A R
73 72 nnzd φ 1 < N gcd R p p R ¬ p N R N gcd R A R
74 anass φ 1 < N gcd R p p R ¬ p N φ 1 < N gcd R p p R ¬ p N
75 74 anbi1i φ 1 < N gcd R p p R ¬ p N R N gcd R A φ 1 < N gcd R p p R ¬ p N R N gcd R A
76 75 imbi1i φ 1 < N gcd R p p R ¬ p N R N gcd R A R φ 1 < N gcd R p p R ¬ p N R N gcd R A R
77 73 76 mpbi φ 1 < N gcd R p p R ¬ p N R N gcd R A R
78 dvdsval2 p p 0 R p R R p
79 64 66 77 78 syl3anc φ 1 < N gcd R p p R ¬ p N R N gcd R A p R R p
80 60 79 mpbid φ 1 < N gcd R p p R ¬ p N R N gcd R A R p
81 63 nncnd φ 1 < N gcd R p p R ¬ p N R N gcd R A p
82 81 mulid2d φ 1 < N gcd R p p R ¬ p N R N gcd R A 1 p = p
83 75 72 sylbir φ 1 < N gcd R p p R ¬ p N R N gcd R A R
84 64 83 jca φ 1 < N gcd R p p R ¬ p N R N gcd R A p R
85 dvdsle p R p R p R
86 85 imp p R p R p R
87 84 60 86 syl2anc φ 1 < N gcd R p p R ¬ p N R N gcd R A p R
88 82 87 eqbrtrd φ 1 < N gcd R p p R ¬ p N R N gcd R A 1 p R
89 1red φ 1 < N gcd R p p R ¬ p N R N gcd R A 1
90 70 nnred φ R
91 90 adantr φ 1 < N gcd R R
92 91 adantr φ 1 < N gcd R p R
93 92 adantr φ 1 < N gcd R p p R ¬ p N R
94 93 adantr φ 1 < N gcd R p p R ¬ p N R N gcd R A R
95 63 nnrpd φ 1 < N gcd R p p R ¬ p N R N gcd R A p +
96 89 94 95 lemuldivd φ 1 < N gcd R p p R ¬ p N R N gcd R A 1 p R 1 R p
97 88 96 mpbid φ 1 < N gcd R p p R ¬ p N R N gcd R A 1 R p
98 90 ad2antrr φ 1 < N gcd R p R
99 58 ad2antrr φ 1 < N gcd R p B
100 99 zred φ 1 < N gcd R p B
101 62 nnred φ 1 < N gcd R p p
102 100 101 remulcld φ 1 < N gcd R p B p
103 elfzle2 R 1 B R B
104 68 103 syl φ R B
105 104 adantr φ 1 < N gcd R R B
106 105 adantr φ 1 < N gcd R p R B
107 58 zred φ B
108 9re 9
109 108 a1i φ 9
110 9pos 0 < 9
111 110 a1i φ 0 < 9
112 32 107 eqeltrrd φ log 2 N 5
113 39 46 3lexlogpow5ineq4 φ 9 < log 2 N 5
114 56 ceilged φ log 2 N 5 log 2 N 5
115 109 56 112 113 114 ltletrd φ 9 < log 2 N 5
116 115 32 breqtrrd φ 9 < B
117 40 109 107 111 116 lttrd φ 0 < B
118 40 107 117 ltled φ 0 B
119 118 adantr φ 1 < N gcd R 0 B
120 119 adantr φ 1 < N gcd R p 0 B
121 62 nnge1d φ 1 < N gcd R p 1 p
122 100 101 120 121 lemulge11d φ 1 < N gcd R p B B p
123 98 100 102 106 122 letrd φ 1 < N gcd R p R B p
124 62 nnrpd φ 1 < N gcd R p p +
125 98 100 124 ledivmul2d φ 1 < N gcd R p R p B R B p
126 123 125 mpbird φ 1 < N gcd R p R p B
127 126 adantr φ 1 < N gcd R p p R ¬ p N R p B
128 127 adantr φ 1 < N gcd R p p R ¬ p N R N gcd R A R p B
129 31 59 80 97 128 elfzd φ 1 < N gcd R p p R ¬ p N R N gcd R A R p 1 B
130 93 recnd φ 1 < N gcd R p p R ¬ p N R
131 62 adantr φ 1 < N gcd R p p R ¬ p N p
132 131 nnzd φ 1 < N gcd R p p R ¬ p N p
133 simplr φ 1 < N gcd R p p R ¬ p N p
134 71 anasss φ 1 < N gcd R p p R ¬ p N R
135 133 134 pccld φ 1 < N gcd R p p R ¬ p N p pCnt R 0
136 132 135 zexpcld φ 1 < N gcd R p p R ¬ p N p p pCnt R
137 136 zcnd φ 1 < N gcd R p p R ¬ p N p p pCnt R
138 131 nncnd φ 1 < N gcd R p p R ¬ p N p
139 65 adantr φ 1 < N gcd R p p R ¬ p N p 0
140 135 nn0zd φ 1 < N gcd R p p R ¬ p N p pCnt R
141 138 139 140 expne0d φ 1 < N gcd R p p R ¬ p N p p pCnt R 0
142 130 137 141 divcan1d φ 1 < N gcd R p p R ¬ p N R p p pCnt R p p pCnt R = R
143 142 eqcomd φ 1 < N gcd R p p R ¬ p N R = R p p pCnt R p p pCnt R
144 pcdvds p R p p pCnt R R
145 133 134 144 syl2anc φ 1 < N gcd R p p R ¬ p N p p pCnt R R
146 134 nnzd φ 1 < N gcd R p p R ¬ p N R
147 dvdsval2 p p pCnt R p p pCnt R 0 R p p pCnt R R R p p pCnt R
148 136 141 146 147 syl3anc φ 1 < N gcd R p p R ¬ p N p p pCnt R R R p p pCnt R
149 145 148 mpbid φ 1 < N gcd R p p R ¬ p N R p p pCnt R
150 38 47 jca φ N 0 < N
151 elnnz N N 0 < N
152 151 a1i φ N N 0 < N
153 150 152 mpbird φ N
154 153 nnzd φ N
155 34 36 107 117 52 relogbcld φ log 2 B
156 155 flcld φ log 2 B
157 34 recnd φ 2
158 40 36 gtned φ 2 0
159 logb1 2 2 0 2 1 log 2 1 = 0
160 157 158 52 159 syl3anc φ log 2 1 = 0
161 160 eqcomd φ 0 = log 2 1
162 2z 2
163 162 a1i φ 2
164 34 leidd φ 2 2
165 0lt1 0 < 1
166 165 a1i φ 0 < 1
167 1lt9 1 < 9
168 167 a1i φ 1 < 9
169 48 109 107 168 116 lttrd φ 1 < B
170 48 107 169 ltled φ 1 B
171 163 164 48 166 107 117 170 logblebd φ log 2 1 log 2 B
172 161 171 eqbrtrd φ 0 log 2 B
173 0zd φ 0
174 flge log 2 B 0 0 log 2 B 0 log 2 B
175 155 173 174 syl2anc φ 0 log 2 B 0 log 2 B
176 172 175 mpbid φ 0 log 2 B
177 156 176 jca φ log 2 B 0 log 2 B
178 elnn0z log 2 B 0 log 2 B 0 log 2 B
179 178 a1i φ log 2 B 0 log 2 B 0 log 2 B
180 177 179 mpbird φ log 2 B 0
181 154 180 zexpcld φ N log 2 B
182 fzfid φ 1 log 2 N 2 Fin
183 154 adantr φ k 1 log 2 N 2 N
184 elfznn k 1 log 2 N 2 k
185 184 adantl φ k 1 log 2 N 2 k
186 185 nnnn0d φ k 1 log 2 N 2 k 0
187 183 186 zexpcld φ k 1 log 2 N 2 N k
188 1zzd φ k 1 log 2 N 2 1
189 187 188 zsubcld φ k 1 log 2 N 2 N k 1
190 182 189 fprodzcl φ k = 1 log 2 N 2 N k 1
191 181 190 zmulcld φ N log 2 B k = 1 log 2 N 2 N k 1
192 2 a1i φ A = N log 2 B k = 1 log 2 N 2 N k 1
193 192 eleq1d φ A N log 2 B k = 1 log 2 N 2 N k 1
194 191 193 mpbird φ A
195 194 ad3antrrr φ 1 < N gcd R p p R ¬ p N A
196 simprl φ 1 < N gcd R p p R ¬ p N p R
197 134 133 196 aks4d1p8d3 φ 1 < N gcd R p p R ¬ p N R p p pCnt R gcd p p pCnt R = 1
198 138 exp0d φ 1 < N gcd R p p R ¬ p N p 0 = 1
199 pcelnn p R p pCnt R p R
200 133 134 199 syl2anc φ 1 < N gcd R p p R ¬ p N p pCnt R p R
201 196 200 mpbird φ 1 < N gcd R p p R ¬ p N p pCnt R
202 201 nngt0d φ 1 < N gcd R p p R ¬ p N 0 < p pCnt R
203 101 adantr φ 1 < N gcd R p p R ¬ p N p
204 173 ad3antrrr φ 1 < N gcd R p p R ¬ p N 0
205 prmgt1 p 1 < p
206 205 adantl φ 1 < N gcd R p 1 < p
207 206 adantr φ 1 < N gcd R p p R ¬ p N 1 < p
208 203 204 140 207 ltexp2d φ 1 < N gcd R p p R ¬ p N 0 < p pCnt R p 0 < p p pCnt R
209 202 208 mpbid φ 1 < N gcd R p p R ¬ p N p 0 < p p pCnt R
210 198 209 eqbrtrrd φ 1 < N gcd R p p R ¬ p N 1 < p p pCnt R
211 136 zred φ 1 < N gcd R p p R ¬ p N p p pCnt R
212 70 nnrpd φ R +
213 212 adantr φ 1 < N gcd R R +
214 213 adantr φ 1 < N gcd R p R +
215 214 adantr φ 1 < N gcd R p p R ¬ p N R +
216 211 215 ltmulgt11d φ 1 < N gcd R p p R ¬ p N 1 < p p pCnt R R < R p p pCnt R
217 210 216 mpbid φ 1 < N gcd R p p R ¬ p N R < R p p pCnt R
218 124 adantr φ 1 < N gcd R p p R ¬ p N p +
219 218 140 rpexpcld φ 1 < N gcd R p p R ¬ p N p p pCnt R +
220 93 93 219 ltdivmul2d φ 1 < N gcd R p p R ¬ p N R p p pCnt R < R R < R p p pCnt R
221 217 220 mpbird φ 1 < N gcd R p p R ¬ p N R p p pCnt R < R
222 93 211 141 redivcld φ 1 < N gcd R p p R ¬ p N R p p pCnt R
223 222 93 ltnled φ 1 < N gcd R p p R ¬ p N R p p pCnt R < R ¬ R R p p pCnt R
224 221 223 mpbid φ 1 < N gcd R p p R ¬ p N ¬ R R p p pCnt R
225 4 a1i φ 1 < N gcd R p p R ¬ p N R = sup r 1 B | ¬ r A <
226 225 breq1d φ 1 < N gcd R p p R ¬ p N R R p p pCnt R sup r 1 B | ¬ r A < R p p pCnt R
227 226 notbid φ 1 < N gcd R p p R ¬ p N ¬ R R p p pCnt R ¬ sup r 1 B | ¬ r A < R p p pCnt R
228 224 227 mpbid φ 1 < N gcd R p p R ¬ p N ¬ sup r 1 B | ¬ r A < R p p pCnt R
229 elfznn f 1 B f
230 229 adantl φ f 1 B f
231 230 nnred φ f 1 B f
232 231 ex φ f 1 B f
233 232 ssrdv φ 1 B
234 7 233 sstrd φ r 1 B | ¬ r A
235 234 adantr φ 1 < N gcd R r 1 B | ¬ r A
236 235 adantr φ 1 < N gcd R p r 1 B | ¬ r A
237 236 adantr φ 1 < N gcd R p p R ¬ p N r 1 B | ¬ r A
238 19 adantr φ 1 < N gcd R r 1 B | ¬ r A Fin
239 238 adantr φ 1 < N gcd R p r 1 B | ¬ r A Fin
240 239 adantr φ 1 < N gcd R p p R ¬ p N r 1 B | ¬ r A Fin
241 infrefilb r 1 B | ¬ r A r 1 B | ¬ r A Fin R p p pCnt R r 1 B | ¬ r A sup r 1 B | ¬ r A < R p p pCnt R
242 241 3expa r 1 B | ¬ r A r 1 B | ¬ r A Fin R p p pCnt R r 1 B | ¬ r A sup r 1 B | ¬ r A < R p p pCnt R
243 242 ex r 1 B | ¬ r A r 1 B | ¬ r A Fin R p p pCnt R r 1 B | ¬ r A sup r 1 B | ¬ r A < R p p pCnt R
244 243 con3d r 1 B | ¬ r A r 1 B | ¬ r A Fin ¬ sup r 1 B | ¬ r A < R p p pCnt R ¬ R p p pCnt R r 1 B | ¬ r A
245 237 240 244 syl2anc φ 1 < N gcd R p p R ¬ p N ¬ sup r 1 B | ¬ r A < R p p pCnt R ¬ R p p pCnt R r 1 B | ¬ r A
246 228 245 mpd φ 1 < N gcd R p p R ¬ p N ¬ R p p pCnt R r 1 B | ¬ r A
247 1zzd φ 1 < N gcd R p p R ¬ p N 1
248 99 adantr φ 1 < N gcd R p p R ¬ p N B
249 137 mulid2d φ 1 < N gcd R p p R ¬ p N 1 p p pCnt R = p p pCnt R
250 dvdsle p p pCnt R R p p pCnt R R p p pCnt R R
251 136 134 250 syl2anc φ 1 < N gcd R p p R ¬ p N p p pCnt R R p p pCnt R R
252 145 251 mpd φ 1 < N gcd R p p R ¬ p N p p pCnt R R
253 249 252 eqbrtrd φ 1 < N gcd R p p R ¬ p N 1 p p pCnt R R
254 48 adantr φ 1 < N gcd R 1
255 254 ad2antrr φ 1 < N gcd R p p R ¬ p N 1
256 255 93 219 lemuldivd φ 1 < N gcd R p p R ¬ p N 1 p p pCnt R R 1 R p p pCnt R
257 253 256 mpbid φ 1 < N gcd R p p R ¬ p N 1 R p p pCnt R
258 100 adantr φ 1 < N gcd R p p R ¬ p N B
259 121 adantr φ 1 < N gcd R p p R ¬ p N 1 p
260 203 135 259 expge1d φ 1 < N gcd R p p R ¬ p N 1 p p pCnt R
261 nnledivrp R p p pCnt R + 1 p p pCnt R R p p pCnt R R
262 134 219 261 syl2anc φ 1 < N gcd R p p R ¬ p N 1 p p pCnt R R p p pCnt R R
263 260 262 mpbid φ 1 < N gcd R p p R ¬ p N R p p pCnt R R
264 106 adantr φ 1 < N gcd R p p R ¬ p N R B
265 222 93 258 263 264 letrd φ 1 < N gcd R p p R ¬ p N R p p pCnt R B
266 247 248 149 257 265 elfzd φ 1 < N gcd R p p R ¬ p N R p p pCnt R 1 B
267 breq1 r = R p p pCnt R r A R p p pCnt R A
268 267 notbid r = R p p pCnt R ¬ r A ¬ R p p pCnt R A
269 268 elrab3 R p p pCnt R 1 B R p p pCnt R r 1 B | ¬ r A ¬ R p p pCnt R A
270 269 con2bid R p p pCnt R 1 B R p p pCnt R A ¬ R p p pCnt R r 1 B | ¬ r A
271 266 270 syl φ 1 < N gcd R p p R ¬ p N R p p pCnt R A ¬ R p p pCnt R r 1 B | ¬ r A
272 246 271 mpbird φ 1 < N gcd R p p R ¬ p N R p p pCnt R A
273 134 ad2antrr φ 1 < N gcd R p p R ¬ p N q q N q R R
274 153 adantr φ 1 < N gcd R N
275 274 adantr φ 1 < N gcd R p N
276 275 adantr φ 1 < N gcd R p p R N
277 276 adantr φ 1 < N gcd R p p R ¬ p N N
278 74 277 sylbir φ 1 < N gcd R p p R ¬ p N N
279 278 ad2antrr φ 1 < N gcd R p p R ¬ p N q q N q R N
280 133 ad2antrr φ 1 < N gcd R p p R ¬ p N q q N q R p
281 simplr φ 1 < N gcd R p p R ¬ p N q q N q R q
282 196 ad2antrr φ 1 < N gcd R p p R ¬ p N q q N q R p R
283 simprr φ 1 < N gcd R p p R ¬ p N q q N q R q R
284 simplrr φ 1 < N gcd R p p R ¬ p N q ¬ p N
285 284 adantr φ 1 < N gcd R p p R ¬ p N q q N q R ¬ p N
286 simprl φ 1 < N gcd R p p R ¬ p N q q N q R q N
287 273 279 280 281 282 283 285 286 aks4d1p8d2 φ 1 < N gcd R p p R ¬ p N q q N q R p p pCnt R < R
288 simpr φ 1 < N gcd R 1 < N gcd R
289 288 ad2antrr φ 1 < N gcd R p p R ¬ p N 1 < N gcd R
290 255 289 ltned φ 1 < N gcd R p p R ¬ p N 1 N gcd R
291 290 necomd φ 1 < N gcd R p p R ¬ p N N gcd R 1
292 278 134 prmdvdsncoprmbd φ 1 < N gcd R p p R ¬ p N q q N q R N gcd R 1
293 292 bicomd φ 1 < N gcd R p p R ¬ p N N gcd R 1 q q N q R
294 293 biimpd φ 1 < N gcd R p p R ¬ p N N gcd R 1 q q N q R
295 291 294 mpd φ 1 < N gcd R p p R ¬ p N q q N q R
296 287 295 r19.29a φ 1 < N gcd R p p R ¬ p N p p pCnt R < R
297 211 93 ltnled φ 1 < N gcd R p p R ¬ p N p p pCnt R < R ¬ R p p pCnt R
298 296 297 mpbid φ 1 < N gcd R p p R ¬ p N ¬ R p p pCnt R
299 225 breq1d φ 1 < N gcd R p p R ¬ p N R p p pCnt R sup r 1 B | ¬ r A < p p pCnt R
300 299 notbid φ 1 < N gcd R p p R ¬ p N ¬ R p p pCnt R ¬ sup r 1 B | ¬ r A < p p pCnt R
301 298 300 mpbid φ 1 < N gcd R p p R ¬ p N ¬ sup r 1 B | ¬ r A < p p pCnt R
302 infrefilb r 1 B | ¬ r A r 1 B | ¬ r A Fin p p pCnt R r 1 B | ¬ r A sup r 1 B | ¬ r A < p p pCnt R
303 302 3expa r 1 B | ¬ r A r 1 B | ¬ r A Fin p p pCnt R r 1 B | ¬ r A sup r 1 B | ¬ r A < p p pCnt R
304 303 ex r 1 B | ¬ r A r 1 B | ¬ r A Fin p p pCnt R r 1 B | ¬ r A sup r 1 B | ¬ r A < p p pCnt R
305 304 con3d r 1 B | ¬ r A r 1 B | ¬ r A Fin ¬ sup r 1 B | ¬ r A < p p pCnt R ¬ p p pCnt R r 1 B | ¬ r A
306 237 240 305 syl2anc φ 1 < N gcd R p p R ¬ p N ¬ sup r 1 B | ¬ r A < p p pCnt R ¬ p p pCnt R r 1 B | ¬ r A
307 301 306 mpd φ 1 < N gcd R p p R ¬ p N ¬ p p pCnt R r 1 B | ¬ r A
308 211 93 258 252 264 letrd φ 1 < N gcd R p p R ¬ p N p p pCnt R B
309 247 248 136 260 308 elfzd φ 1 < N gcd R p p R ¬ p N p p pCnt R 1 B
310 breq1 r = p p pCnt R r A p p pCnt R A
311 310 notbid r = p p pCnt R ¬ r A ¬ p p pCnt R A
312 311 elrab3 p p pCnt R 1 B p p pCnt R r 1 B | ¬ r A ¬ p p pCnt R A
313 309 312 syl φ 1 < N gcd R p p R ¬ p N p p pCnt R r 1 B | ¬ r A ¬ p p pCnt R A
314 313 con2bid φ 1 < N gcd R p p R ¬ p N p p pCnt R A ¬ p p pCnt R r 1 B | ¬ r A
315 307 314 mpbird φ 1 < N gcd R p p R ¬ p N p p pCnt R A
316 149 136 195 197 272 315 coprmdvds2d φ 1 < N gcd R p p R ¬ p N R p p pCnt R p p pCnt R A
317 143 316 eqbrtrd φ 1 < N gcd R p p R ¬ p N R A
318 317 adantr φ 1 < N gcd R p p R ¬ p N R N gcd R A R A
319 67 simprd φ ¬ R A
320 319 ad5antr φ 1 < N gcd R p p R ¬ p N R N gcd R A ¬ R A
321 75 320 sylbir φ 1 < N gcd R p p R ¬ p N R N gcd R A ¬ R A
322 318 321 pm2.21dd φ 1 < N gcd R p p R ¬ p N R N gcd R A ¬ R p A
323 30 129 322 elrabd φ 1 < N gcd R p p R ¬ p N R N gcd R A R p r 1 B | ¬ r A
324 lbinfle r 1 B | ¬ r A x r 1 B | ¬ r A y r 1 B | ¬ r A x y R p r 1 B | ¬ r A sup r 1 B | ¬ r A < R p
325 17 28 323 324 syl3anc φ 1 < N gcd R p p R ¬ p N R N gcd R A sup r 1 B | ¬ r A < R p
326 5 325 eqbrtrd φ 1 < N gcd R p p R ¬ p N R N gcd R A R R p
327 207 adantr φ 1 < N gcd R p p R ¬ p N R N gcd R A 1 < p
328 1rp 1 +
329 328 a1i φ 1 < N gcd R p p R ¬ p N R N gcd R A 1 +
330 215 adantr φ 1 < N gcd R p p R ¬ p N R N gcd R A R +
331 329 95 330 ltdiv2d φ 1 < N gcd R p p R ¬ p N R N gcd R A 1 < p R p < R 1
332 327 331 mpbid φ 1 < N gcd R p p R ¬ p N R N gcd R A R p < R 1
333 130 adantr φ 1 < N gcd R p p R ¬ p N R N gcd R A R
334 333 div1d φ 1 < N gcd R p p R ¬ p N R N gcd R A R 1 = R
335 332 334 breqtrd φ 1 < N gcd R p p R ¬ p N R N gcd R A R p < R
336 98 101 65 redivcld φ 1 < N gcd R p R p
337 336 adantr φ 1 < N gcd R p p R ¬ p N R p
338 337 adantr φ 1 < N gcd R p p R ¬ p N R N gcd R A R p
339 338 94 ltnled φ 1 < N gcd R p p R ¬ p N R N gcd R A R p < R ¬ R R p
340 335 339 mpbid φ 1 < N gcd R p p R ¬ p N R N gcd R A ¬ R R p
341 326 340 pm2.65da φ 1 < N gcd R p p R ¬ p N ¬ R N gcd R A
342 1 2 3 4 aks4d1p7 φ p p R ¬ p N
343 342 adantr φ 1 < N gcd R p p R ¬ p N
344 341 343 r19.29a φ 1 < N gcd R ¬ R N gcd R A
345 344 adantr φ 1 < N gcd R R N gcd R A ¬ R N gcd R A
346 1 2 3 4 345 aks4d1p5 φ N gcd R = 1