Metamath Proof Explorer


Theorem prmpwdvds

Description: A relation involving divisibility by a prime power. (Contributed by Mario Carneiro, 2-Mar-2014)

Ref Expression
Assertion prmpwdvds K D P N D K P N ¬ D K P N 1 P N D

Proof

Step Hyp Ref Expression
1 oveq1 k = K k P N = K P N
2 1 breq2d k = K D k P N D K P N
3 oveq1 k = K k P N 1 = K P N 1
4 3 breq2d k = K D k P N 1 D K P N 1
5 4 notbid k = K ¬ D k P N 1 ¬ D K P N 1
6 2 5 anbi12d k = K D k P N ¬ D k P N 1 D K P N ¬ D K P N 1
7 6 imbi1d k = K D k P N ¬ D k P N 1 P N D D K P N ¬ D K P N 1 P N D
8 oveq2 x = 1 P x = P 1
9 8 oveq2d x = 1 k P x = k P 1
10 9 breq2d x = 1 D k P x D k P 1
11 oveq1 x = 1 x 1 = 1 1
12 11 oveq2d x = 1 P x 1 = P 1 1
13 12 oveq2d x = 1 k P x 1 = k P 1 1
14 13 breq2d x = 1 D k P x 1 D k P 1 1
15 14 notbid x = 1 ¬ D k P x 1 ¬ D k P 1 1
16 10 15 anbi12d x = 1 D k P x ¬ D k P x 1 D k P 1 ¬ D k P 1 1
17 8 breq1d x = 1 P x D P 1 D
18 16 17 imbi12d x = 1 D k P x ¬ D k P x 1 P x D D k P 1 ¬ D k P 1 1 P 1 D
19 18 ralbidv x = 1 k D k P x ¬ D k P x 1 P x D k D k P 1 ¬ D k P 1 1 P 1 D
20 19 imbi2d x = 1 D P k D k P x ¬ D k P x 1 P x D D P k D k P 1 ¬ D k P 1 1 P 1 D
21 oveq2 x = n P x = P n
22 21 oveq2d x = n k P x = k P n
23 22 breq2d x = n D k P x D k P n
24 oveq1 x = n x 1 = n 1
25 24 oveq2d x = n P x 1 = P n 1
26 25 oveq2d x = n k P x 1 = k P n 1
27 26 breq2d x = n D k P x 1 D k P n 1
28 27 notbid x = n ¬ D k P x 1 ¬ D k P n 1
29 23 28 anbi12d x = n D k P x ¬ D k P x 1 D k P n ¬ D k P n 1
30 21 breq1d x = n P x D P n D
31 29 30 imbi12d x = n D k P x ¬ D k P x 1 P x D D k P n ¬ D k P n 1 P n D
32 31 ralbidv x = n k D k P x ¬ D k P x 1 P x D k D k P n ¬ D k P n 1 P n D
33 32 imbi2d x = n D P k D k P x ¬ D k P x 1 P x D D P k D k P n ¬ D k P n 1 P n D
34 oveq2 x = n + 1 P x = P n + 1
35 34 oveq2d x = n + 1 k P x = k P n + 1
36 35 breq2d x = n + 1 D k P x D k P n + 1
37 oveq1 x = n + 1 x 1 = n + 1 - 1
38 37 oveq2d x = n + 1 P x 1 = P n + 1 - 1
39 38 oveq2d x = n + 1 k P x 1 = k P n + 1 - 1
40 39 breq2d x = n + 1 D k P x 1 D k P n + 1 - 1
41 40 notbid x = n + 1 ¬ D k P x 1 ¬ D k P n + 1 - 1
42 36 41 anbi12d x = n + 1 D k P x ¬ D k P x 1 D k P n + 1 ¬ D k P n + 1 - 1
43 34 breq1d x = n + 1 P x D P n + 1 D
44 42 43 imbi12d x = n + 1 D k P x ¬ D k P x 1 P x D D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D
45 44 ralbidv x = n + 1 k D k P x ¬ D k P x 1 P x D k D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D
46 45 imbi2d x = n + 1 D P k D k P x ¬ D k P x 1 P x D D P k D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D
47 oveq2 x = N P x = P N
48 47 oveq2d x = N k P x = k P N
49 48 breq2d x = N D k P x D k P N
50 oveq1 x = N x 1 = N 1
51 50 oveq2d x = N P x 1 = P N 1
52 51 oveq2d x = N k P x 1 = k P N 1
53 52 breq2d x = N D k P x 1 D k P N 1
54 53 notbid x = N ¬ D k P x 1 ¬ D k P N 1
55 49 54 anbi12d x = N D k P x ¬ D k P x 1 D k P N ¬ D k P N 1
56 47 breq1d x = N P x D P N D
57 55 56 imbi12d x = N D k P x ¬ D k P x 1 P x D D k P N ¬ D k P N 1 P N D
58 57 ralbidv x = N k D k P x ¬ D k P x 1 P x D k D k P N ¬ D k P N 1 P N D
59 58 imbi2d x = N D P k D k P x ¬ D k P x 1 P x D D P k D k P N ¬ D k P N 1 P N D
60 breq1 x = D x k P D k P
61 breq1 x = D x k D k
62 61 notbid x = D ¬ x k ¬ D k
63 60 62 anbi12d x = D x k P ¬ x k D k P ¬ D k
64 breq2 x = D P x P D
65 63 64 imbi12d x = D x k P ¬ x k P x D k P ¬ D k P D
66 65 imbi2d x = D P k x k P ¬ x k P x P k D k P ¬ D k P D
67 simplrl x P k x k P P
68 simpll x P k x k P x
69 coprm P x ¬ P x P gcd x = 1
70 67 68 69 syl2anc x P k x k P ¬ P x P gcd x = 1
71 zcn k k
72 71 ad2antll x P k k
73 prmz P P
74 73 ad2antrl x P k P
75 74 zcnd x P k P
76 72 75 mulcomd x P k k P = P k
77 76 breq2d x P k x k P x P k
78 simpl x P k x
79 74 78 gcdcomd x P k P gcd x = x gcd P
80 79 eqeq1d x P k P gcd x = 1 x gcd P = 1
81 77 80 anbi12d x P k x k P P gcd x = 1 x P k x gcd P = 1
82 simprr x P k k
83 coprmdvds x P k x P k x gcd P = 1 x k
84 78 74 82 83 syl3anc x P k x P k x gcd P = 1 x k
85 81 84 sylbid x P k x k P P gcd x = 1 x k
86 85 expdimp x P k x k P P gcd x = 1 x k
87 70 86 sylbid x P k x k P ¬ P x x k
88 87 con1d x P k x k P ¬ x k P x
89 88 expimpd x P k x k P ¬ x k P x
90 89 ex x P k x k P ¬ x k P x
91 66 90 vtoclga D P k D k P ¬ D k P D
92 91 impl D P k D k P ¬ D k P D
93 73 zcnd P P
94 93 exp1d P P 1 = P
95 94 ad2antlr D P k P 1 = P
96 95 oveq2d D P k k P 1 = k P
97 96 breq2d D P k D k P 1 D k P
98 1m1e0 1 1 = 0
99 98 oveq2i P 1 1 = P 0
100 73 ad2antlr D P k P
101 100 zcnd D P k P
102 101 exp0d D P k P 0 = 1
103 99 102 eqtrid D P k P 1 1 = 1
104 103 oveq2d D P k k P 1 1 = k 1
105 71 adantl D P k k
106 105 mulid1d D P k k 1 = k
107 104 106 eqtrd D P k k P 1 1 = k
108 107 breq2d D P k D k P 1 1 D k
109 108 notbid D P k ¬ D k P 1 1 ¬ D k
110 97 109 anbi12d D P k D k P 1 ¬ D k P 1 1 D k P ¬ D k
111 101 exp1d D P k P 1 = P
112 111 breq1d D P k P 1 D P D
113 92 110 112 3imtr4d D P k D k P 1 ¬ D k P 1 1 P 1 D
114 113 ralrimiva D P k D k P 1 ¬ D k P 1 1 P 1 D
115 oveq1 k = x k P n = x P n
116 115 breq2d k = x D k P n D x P n
117 oveq1 k = x k P n 1 = x P n 1
118 117 breq2d k = x D k P n 1 D x P n 1
119 118 notbid k = x ¬ D k P n 1 ¬ D x P n 1
120 116 119 anbi12d k = x D k P n ¬ D k P n 1 D x P n ¬ D x P n 1
121 120 imbi1d k = x D k P n ¬ D k P n 1 P n D D x P n ¬ D x P n 1 P n D
122 121 cbvralvw k D k P n ¬ D k P n 1 P n D x D x P n ¬ D x P n 1 P n D
123 simprr n D P k k
124 73 ad2antrl n D P k P
125 123 124 zmulcld n D P k k P
126 oveq1 x = k P x P n = k P P n
127 126 breq2d x = k P D x P n D k P P n
128 oveq1 x = k P x P n 1 = k P P n 1
129 128 breq2d x = k P D x P n 1 D k P P n 1
130 129 notbid x = k P ¬ D x P n 1 ¬ D k P P n 1
131 127 130 anbi12d x = k P D x P n ¬ D x P n 1 D k P P n ¬ D k P P n 1
132 131 imbi1d x = k P D x P n ¬ D x P n 1 P n D D k P P n ¬ D k P P n 1 P n D
133 132 rspcv k P x D x P n ¬ D x P n 1 P n D D k P P n ¬ D k P P n 1 P n D
134 125 133 syl n D P k x D x P n ¬ D x P n 1 P n D D k P P n ¬ D k P P n 1 P n D
135 nnnn0 n n 0
136 135 ad2antrr n D P k n 0
137 zexpcl P n 0 P n
138 124 136 137 syl2anc n D P k P n
139 simplr n D P k D
140 divides P n D P n D x x P n = D
141 138 139 140 syl2anc n D P k P n D x x P n = D
142 89 adantll n x P k x k P ¬ x k P x
143 prmnn P P
144 143 ad2antrl n x P k P
145 144 nncnd n x P k P
146 135 ad2antrr n x P k n 0
147 145 146 expp1d n x P k P n + 1 = P n P
148 144 146 nnexpcld n x P k P n
149 148 nncnd n x P k P n
150 149 145 mulcomd n x P k P n P = P P n
151 147 150 eqtrd n x P k P n + 1 = P P n
152 151 oveq2d n x P k k P n + 1 = k P P n
153 71 ad2antll n x P k k
154 153 145 149 mulassd n x P k k P P n = k P P n
155 152 154 eqtr4d n x P k k P n + 1 = k P P n
156 155 breq2d n x P k x P n k P n + 1 x P n k P P n
157 simplr n x P k x
158 simprr n x P k k
159 144 nnzd n x P k P
160 158 159 zmulcld n x P k k P
161 148 nnzd n x P k P n
162 148 nnne0d n x P k P n 0
163 dvdsmulcr x k P P n P n 0 x P n k P P n x k P
164 157 160 161 162 163 syl112anc n x P k x P n k P P n x k P
165 156 164 bitrd n x P k x P n k P n + 1 x k P
166 dvdsmulcr x k P n P n 0 x P n k P n x k
167 157 158 161 162 166 syl112anc n x P k x P n k P n x k
168 167 notbid n x P k ¬ x P n k P n ¬ x k
169 165 168 anbi12d n x P k x P n k P n + 1 ¬ x P n k P n x k P ¬ x k
170 151 breq1d n x P k P n + 1 x P n P P n x P n
171 dvdsmulcr P x P n P n 0 P P n x P n P x
172 159 157 161 162 171 syl112anc n x P k P P n x P n P x
173 170 172 bitrd n x P k P n + 1 x P n P x
174 142 169 173 3imtr4d n x P k x P n k P n + 1 ¬ x P n k P n P n + 1 x P n
175 174 an32s n P k x x P n k P n + 1 ¬ x P n k P n P n + 1 x P n
176 breq1 x P n = D x P n k P n + 1 D k P n + 1
177 breq1 x P n = D x P n k P n D k P n
178 177 notbid x P n = D ¬ x P n k P n ¬ D k P n
179 176 178 anbi12d x P n = D x P n k P n + 1 ¬ x P n k P n D k P n + 1 ¬ D k P n
180 breq2 x P n = D P n + 1 x P n P n + 1 D
181 179 180 imbi12d x P n = D x P n k P n + 1 ¬ x P n k P n P n + 1 x P n D k P n + 1 ¬ D k P n P n + 1 D
182 175 181 syl5ibcom n P k x x P n = D D k P n + 1 ¬ D k P n P n + 1 D
183 182 rexlimdva n P k x x P n = D D k P n + 1 ¬ D k P n P n + 1 D
184 183 adantlr n D P k x x P n = D D k P n + 1 ¬ D k P n P n + 1 D
185 141 184 sylbid n D P k P n D D k P n + 1 ¬ D k P n P n + 1 D
186 185 com23 n D P k D k P n + 1 ¬ D k P n P n D P n + 1 D
187 186 a2d n D P k D k P n + 1 ¬ D k P n P n D D k P n + 1 ¬ D k P n P n + 1 D
188 71 ad2antll n D P k k
189 124 zcnd n D P k P
190 138 zcnd n D P k P n
191 188 189 190 mulassd n D P k k P P n = k P P n
192 189 190 mulcomd n D P k P P n = P n P
193 189 136 expp1d n D P k P n + 1 = P n P
194 192 193 eqtr4d n D P k P P n = P n + 1
195 194 oveq2d n D P k k P P n = k P n + 1
196 191 195 eqtrd n D P k k P P n = k P n + 1
197 196 breq2d n D P k D k P P n D k P n + 1
198 nnm1nn0 n n 1 0
199 198 ad2antrr n D P k n 1 0
200 zexpcl P n 1 0 P n 1
201 124 199 200 syl2anc n D P k P n 1
202 201 zcnd n D P k P n 1
203 188 189 202 mulassd n D P k k P P n 1 = k P P n 1
204 189 202 mulcomd n D P k P P n 1 = P n 1 P
205 simpll n D P k n
206 expm1t P n P n = P n 1 P
207 189 205 206 syl2anc n D P k P n = P n 1 P
208 204 207 eqtr4d n D P k P P n 1 = P n
209 208 oveq2d n D P k k P P n 1 = k P n
210 203 209 eqtrd n D P k k P P n 1 = k P n
211 210 breq2d n D P k D k P P n 1 D k P n
212 211 notbid n D P k ¬ D k P P n 1 ¬ D k P n
213 197 212 anbi12d n D P k D k P P n ¬ D k P P n 1 D k P n + 1 ¬ D k P n
214 213 imbi1d n D P k D k P P n ¬ D k P P n 1 P n D D k P n + 1 ¬ D k P n P n D
215 nncn n n
216 215 ad2antrr n D P k n
217 ax-1cn 1
218 pncan n 1 n + 1 - 1 = n
219 216 217 218 sylancl n D P k n + 1 - 1 = n
220 219 oveq2d n D P k P n + 1 - 1 = P n
221 220 oveq2d n D P k k P n + 1 - 1 = k P n
222 221 breq2d n D P k D k P n + 1 - 1 D k P n
223 222 notbid n D P k ¬ D k P n + 1 - 1 ¬ D k P n
224 223 anbi2d n D P k D k P n + 1 ¬ D k P n + 1 - 1 D k P n + 1 ¬ D k P n
225 224 imbi1d n D P k D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D D k P n + 1 ¬ D k P n P n + 1 D
226 187 214 225 3imtr4d n D P k D k P P n ¬ D k P P n 1 P n D D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D
227 134 226 syld n D P k x D x P n ¬ D x P n 1 P n D D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D
228 227 anassrs n D P k x D x P n ¬ D x P n 1 P n D D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D
229 228 ralrimdva n D P x D x P n ¬ D x P n 1 P n D k D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D
230 122 229 syl5bi n D P k D k P n ¬ D k P n 1 P n D k D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D
231 230 expl n D P k D k P n ¬ D k P n 1 P n D k D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D
232 231 a2d n D P k D k P n ¬ D k P n 1 P n D D P k D k P n + 1 ¬ D k P n + 1 - 1 P n + 1 D
233 20 33 46 59 114 232 nnind N D P k D k P N ¬ D k P N 1 P N D
234 233 com12 D P N k D k P N ¬ D k P N 1 P N D
235 234 impr D P N k D k P N ¬ D k P N 1 P N D
236 235 adantll K D P N k D k P N ¬ D k P N 1 P N D
237 simpll K D P N K
238 7 236 237 rspcdva K D P N D K P N ¬ D K P N 1 P N D
239 238 3impia K D P N D K P N ¬ D K P N 1 P N D