Metamath Proof Explorer


Theorem aks4d1p5

Description: Show that N and R are coprime for AKS existence theorem. Precondition will be eliminated in further theorem. (Contributed by metakunt, 30-Oct-2024)

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

Proof

Step Hyp Ref Expression
1 aks4d1p5.1 φ N 3
2 aks4d1p5.2 A = N log 2 B k = 1 log 2 N 2 N k 1
3 aks4d1p5.3 B = log 2 N 5
4 aks4d1p5.4 R = sup r 1 B | ¬ r A <
5 aks4d1p5.5 φ 1 < N gcd R R N gcd R A ¬ R N gcd R A
6 simpr φ 1 < N gcd R R R N gcd R R R N gcd R
7 1 2 3 4 aks4d1p4 φ R 1 B ¬ R A
8 7 simpld φ R 1 B
9 elfznn R 1 B R
10 8 9 syl φ R
11 10 nnred φ R
12 eluzelz N 3 N
13 1 12 syl φ N
14 0red φ 0
15 3re 3
16 15 a1i φ 3
17 13 zred φ N
18 3pos 0 < 3
19 18 a1i φ 0 < 3
20 eluzle N 3 3 N
21 1 20 syl φ 3 N
22 14 16 17 19 21 ltletrd φ 0 < N
23 13 22 jca φ N 0 < N
24 elnnz N N 0 < N
25 23 24 sylibr φ N
26 gcdnncl N R N gcd R
27 25 10 26 syl2anc φ N gcd R
28 27 nnred φ N gcd R
29 27 nnne0d φ N gcd R 0
30 11 28 29 redivcld φ R N gcd R
31 30 adantr φ 1 < N gcd R R N gcd R
32 11 adantr φ 1 < N gcd R R
33 31 32 ltnled φ 1 < N gcd R R N gcd R < R ¬ R R N gcd R
34 33 biimprd φ 1 < N gcd R ¬ R R N gcd R R N gcd R < R
35 34 imp φ 1 < N gcd R ¬ R R N gcd R R N gcd R < R
36 4 a1i φ 1 < N gcd R R = sup r 1 B | ¬ r A <
37 ssrab2 r 1 B | ¬ r A 1 B
38 37 a1i φ r 1 B | ¬ r A 1 B
39 elfznn o 1 B o
40 39 adantl φ o 1 B o
41 40 nnred φ o 1 B o
42 41 ex φ o 1 B o
43 42 ssrdv φ 1 B
44 38 43 sstrd φ r 1 B | ¬ r A
45 44 adantr φ 1 < N gcd R r 1 B | ¬ r A
46 fzfid φ 1 B Fin
47 46 38 ssfid φ r 1 B | ¬ r A Fin
48 47 adantr φ 1 < N gcd R r 1 B | ¬ r A Fin
49 1 2 3 aks4d1p3 φ r 1 B ¬ r A
50 rabn0 r 1 B | ¬ r A r 1 B ¬ r A
51 49 50 sylibr φ r 1 B | ¬ r A
52 51 adantr φ 1 < N gcd R r 1 B | ¬ r A
53 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
54 45 48 52 53 syl3anc φ 1 < N gcd R x r 1 B | ¬ r A y r 1 B | ¬ r A x y
55 breq1 r = R N gcd R r A R N gcd R A
56 55 notbid r = R N gcd R ¬ r A ¬ R N gcd R A
57 1zzd φ 1 < N gcd R 1
58 3 a1i φ B = log 2 N 5
59 2re 2
60 59 a1i φ 2
61 2pos 0 < 2
62 61 a1i φ 0 < 2
63 1red φ 1
64 1lt2 1 < 2
65 64 a1i φ 1 < 2
66 63 65 ltned φ 1 2
67 66 necomd φ 2 1
68 60 62 17 22 67 relogbcld φ log 2 N
69 5nn0 5 0
70 69 a1i φ 5 0
71 68 70 reexpcld φ log 2 N 5
72 ceilcl log 2 N 5 log 2 N 5
73 71 72 syl φ log 2 N 5
74 58 73 eqeltrd φ B
75 74 adantr φ 1 < N gcd R B
76 25 nnzd φ N
77 divgcdnnr R N R N gcd R
78 10 76 77 syl2anc φ R N gcd R
79 78 adantr φ 1 < N gcd R R N gcd R
80 79 nnzd φ 1 < N gcd R R N gcd R
81 79 nnge1d φ 1 < N gcd R 1 R N gcd R
82 75 zred φ 1 < N gcd R B
83 10 nnrpd φ R +
84 83 adantr φ 1 < N gcd R R +
85 27 nnrpd φ N gcd R +
86 85 adantr φ 1 < N gcd R N gcd R +
87 32 recnd φ 1 < N gcd R R
88 84 rpne0d φ 1 < N gcd R R 0
89 87 88 dividd φ 1 < N gcd R R R = 1
90 simpr φ 1 < N gcd R 1 < N gcd R
91 89 90 eqbrtrd φ 1 < N gcd R R R < N gcd R
92 32 84 86 91 ltdiv23d φ 1 < N gcd R R N gcd R < R
93 31 32 92 ltled φ 1 < N gcd R R N gcd R R
94 elfzle2 R 1 B R B
95 8 94 syl φ R B
96 95 adantr φ 1 < N gcd R R B
97 31 32 82 93 96 letrd φ 1 < N gcd R R N gcd R B
98 57 75 80 81 97 elfzd φ 1 < N gcd R R N gcd R 1 B
99 simpr φ 1 < N gcd R ¬ R N gcd R A ¬ R N gcd R A
100 exmidd φ 1 < N gcd R R N gcd R A ¬ R N gcd R A
101 5 99 100 mpjaodan φ 1 < N gcd R ¬ R N gcd R A
102 56 98 101 elrabd φ 1 < N gcd R R N gcd R r 1 B | ¬ r A
103 lbinfle r 1 B | ¬ r A x r 1 B | ¬ r A y r 1 B | ¬ r A x y R N gcd R r 1 B | ¬ r A sup r 1 B | ¬ r A < R N gcd R
104 45 54 102 103 syl3anc φ 1 < N gcd R sup r 1 B | ¬ r A < R N gcd R
105 36 104 eqbrtrd φ 1 < N gcd R R R N gcd R
106 32 31 lenltd φ 1 < N gcd R R R N gcd R ¬ R N gcd R < R
107 105 106 mpbid φ 1 < N gcd R ¬ R N gcd R < R
108 107 adantr φ 1 < N gcd R ¬ R R N gcd R ¬ R N gcd R < R
109 35 108 pm2.21dd φ 1 < N gcd R ¬ R R N gcd R R R N gcd R
110 6 109 pm2.61dan φ 1 < N gcd R R R N gcd R
111 83 rpred φ R
112 111 adantr φ 1 < N gcd R R
113 92 107 pm2.21dd φ 1 < N gcd R N gcd R
114 113 nnrpd φ 1 < N gcd R N gcd R +
115 112 recnd φ 1 < N gcd R R
116 115 88 dividd φ 1 < N gcd R R R = 1
117 116 90 eqbrtrd φ 1 < N gcd R R R < N gcd R
118 112 84 114 117 ltdiv23d φ 1 < N gcd R R N gcd R < R
119 78 nnred φ R N gcd R
120 119 111 ltnled φ R N gcd R < R ¬ R R N gcd R
121 120 adantr φ 1 < N gcd R R N gcd R < R ¬ R R N gcd R
122 118 121 mpbid φ 1 < N gcd R ¬ R R N gcd R
123 110 122 pm2.21dd φ 1 < N gcd R N gcd R = 1
124 simpr φ ¬ 1 < N gcd R N gcd R = 1 N gcd R = 1
125 27 adantr φ ¬ 1 < N gcd R N gcd R
126 125 nnred φ ¬ 1 < N gcd R N gcd R
127 126 adantr φ ¬ 1 < N gcd R N gcd R 2 N gcd R
128 59 a1i φ ¬ 1 < N gcd R N gcd R 2 2
129 1red φ ¬ 1 < N gcd R N gcd R 2 1
130 28 63 lenltd φ N gcd R 1 ¬ 1 < N gcd R
131 130 biimprd φ ¬ 1 < N gcd R N gcd R 1
132 131 imp φ ¬ 1 < N gcd R N gcd R 1
133 132 adantr φ ¬ 1 < N gcd R N gcd R 2 N gcd R 1
134 64 a1i φ ¬ 1 < N gcd R N gcd R 2 1 < 2
135 127 129 128 133 134 lelttrd φ ¬ 1 < N gcd R N gcd R 2 N gcd R < 2
136 eluzle N gcd R 2 2 N gcd R
137 136 adantl φ ¬ 1 < N gcd R N gcd R 2 2 N gcd R
138 127 128 127 135 137 ltletrd φ ¬ 1 < N gcd R N gcd R 2 N gcd R < N gcd R
139 127 ltnrd φ ¬ 1 < N gcd R N gcd R 2 ¬ N gcd R < N gcd R
140 138 139 pm2.21dd φ ¬ 1 < N gcd R N gcd R 2 N gcd R = 1
141 elnn1uz2 N gcd R N gcd R = 1 N gcd R 2
142 125 141 sylib φ ¬ 1 < N gcd R N gcd R = 1 N gcd R 2
143 124 140 142 mpjaodan φ ¬ 1 < N gcd R N gcd R = 1
144 123 143 pm2.61dan φ N gcd R = 1