Metamath Proof Explorer


Theorem oddprmdvds

Description: Every positive integer which is not a power of two is divisible by an odd prime number. (Contributed by AV, 6-Aug-2021)

Ref Expression
Assertion oddprmdvds K ¬ n 0 K = 2 n p 2 p K

Proof

Step Hyp Ref Expression
1 2prm 2
2 pcndvds2 2 K ¬ 2 K 2 2 pCnt K
3 1 2 mpan K ¬ 2 K 2 2 pCnt K
4 pcdvds 2 K 2 2 pCnt K K
5 1 4 mpan K 2 2 pCnt K K
6 2nn 2
7 6 a1i K 2
8 1 a1i K 2
9 id K K
10 8 9 pccld K 2 pCnt K 0
11 7 10 nnexpcld K 2 2 pCnt K
12 nndivdvds K 2 2 pCnt K 2 2 pCnt K K K 2 2 pCnt K
13 11 12 mpdan K 2 2 pCnt K K K 2 2 pCnt K
14 13 adantr K ¬ 2 K 2 2 pCnt K 2 2 pCnt K K K 2 2 pCnt K
15 elnn1uz2 K 2 2 pCnt K K 2 2 pCnt K = 1 K 2 2 pCnt K 2
16 nncn K K
17 nncn 2 2 pCnt K 2 2 pCnt K
18 nnne0 2 2 pCnt K 2 2 pCnt K 0
19 17 18 jca 2 2 pCnt K 2 2 pCnt K 2 2 pCnt K 0
20 11 19 syl K 2 2 pCnt K 2 2 pCnt K 0
21 3anass K 2 2 pCnt K 2 2 pCnt K 0 K 2 2 pCnt K 2 2 pCnt K 0
22 16 20 21 sylanbrc K K 2 2 pCnt K 2 2 pCnt K 0
23 22 adantr K ¬ 2 K 2 2 pCnt K K 2 2 pCnt K 2 2 pCnt K 0
24 diveq1 K 2 2 pCnt K 2 2 pCnt K 0 K 2 2 pCnt K = 1 K = 2 2 pCnt K
25 23 24 syl K ¬ 2 K 2 2 pCnt K K 2 2 pCnt K = 1 K = 2 2 pCnt K
26 10 adantr K K = 2 2 pCnt K 2 pCnt K 0
27 oveq2 n = 2 pCnt K 2 n = 2 2 pCnt K
28 27 eqeq2d n = 2 pCnt K K = 2 n K = 2 2 pCnt K
29 28 adantl K K = 2 2 pCnt K n = 2 pCnt K K = 2 n K = 2 2 pCnt K
30 simpr K K = 2 2 pCnt K K = 2 2 pCnt K
31 26 29 30 rspcedvd K K = 2 2 pCnt K n 0 K = 2 n
32 31 ex K K = 2 2 pCnt K n 0 K = 2 n
33 pm2.24 n 0 K = 2 n ¬ n 0 K = 2 n p 2 p K
34 32 33 syl6 K K = 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
35 34 adantr K ¬ 2 K 2 2 pCnt K K = 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
36 25 35 sylbid K ¬ 2 K 2 2 pCnt K K 2 2 pCnt K = 1 ¬ n 0 K = 2 n p 2 p K
37 36 com12 K 2 2 pCnt K = 1 K ¬ 2 K 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
38 exprmfct K 2 2 pCnt K 2 q q K 2 2 pCnt K
39 breq1 q = 2 q K 2 2 pCnt K 2 K 2 2 pCnt K
40 39 biimpcd q K 2 2 pCnt K q = 2 2 K 2 2 pCnt K
41 40 adantl K q q K 2 2 pCnt K q = 2 2 K 2 2 pCnt K
42 41 necon3bd K q q K 2 2 pCnt K ¬ 2 K 2 2 pCnt K q 2
43 42 ex K q q K 2 2 pCnt K ¬ 2 K 2 2 pCnt K q 2
44 prmnn q q
45 5 13 mpbid K K 2 2 pCnt K
46 nndivides q K 2 2 pCnt K q K 2 2 pCnt K m m q = K 2 2 pCnt K
47 44 45 46 syl2anr K q q K 2 2 pCnt K m m q = K 2 2 pCnt K
48 eqcom m q = K 2 2 pCnt K K 2 2 pCnt K = m q
49 16 ad2antrr K q m K
50 simpr K q m m
51 44 ad2antlr K q m q
52 50 51 nnmulcld K q m m q
53 52 nncnd K q m m q
54 11 ad2antrr K q m 2 2 pCnt K
55 54 19 syl K q m 2 2 pCnt K 2 2 pCnt K 0
56 divmul K m q 2 2 pCnt K 2 2 pCnt K 0 K 2 2 pCnt K = m q 2 2 pCnt K m q = K
57 49 53 55 56 syl3anc K q m K 2 2 pCnt K = m q 2 2 pCnt K m q = K
58 48 57 syl5bb K q m m q = K 2 2 pCnt K 2 2 pCnt K m q = K
59 simpr K q q
60 59 adantr K q m q
61 60 anim1i K q m q 2 q q 2
62 eldifsn q 2 q q 2
63 61 62 sylibr K q m q 2 q 2
64 63 adantr K q m q 2 2 2 pCnt K m q = K q 2
65 breq1 p = q p K q K
66 65 adantl K q m q 2 2 2 pCnt K m q = K p = q p K q K
67 54 50 nnmulcld K q m 2 2 pCnt K m
68 67 nnzd K q m 2 2 pCnt K m
69 44 nnzd q q
70 69 ad2antlr K q m q
71 68 70 jca K q m 2 2 pCnt K m q
72 71 adantr K q m q 2 2 2 pCnt K m q
73 dvdsmul2 2 2 pCnt K m q q 2 2 pCnt K m q
74 72 73 syl K q m q 2 q 2 2 pCnt K m q
75 2nn0 2 0
76 75 a1i K 2 0
77 76 10 nn0expcld K 2 2 pCnt K 0
78 77 ad2antrr K q m 2 2 pCnt K 0
79 78 nn0cnd K q m 2 2 pCnt K
80 nncn m m
81 80 adantl K q m m
82 44 nncnd q q
83 82 ad2antlr K q m q
84 79 81 83 3jca K q m 2 2 pCnt K m q
85 84 adantr K q m q 2 2 2 pCnt K m q
86 mulass 2 2 pCnt K m q 2 2 pCnt K m q = 2 2 pCnt K m q
87 85 86 syl K q m q 2 2 2 pCnt K m q = 2 2 pCnt K m q
88 74 87 breqtrd K q m q 2 q 2 2 pCnt K m q
89 88 adantr K q m q 2 2 2 pCnt K m q = K q 2 2 pCnt K m q
90 breq2 2 2 pCnt K m q = K q 2 2 pCnt K m q q K
91 90 adantl K q m q 2 2 2 pCnt K m q = K q 2 2 pCnt K m q q K
92 89 91 mpbid K q m q 2 2 2 pCnt K m q = K q K
93 64 66 92 rspcedvd K q m q 2 2 2 pCnt K m q = K p 2 p K
94 93 a1d K q m q 2 2 2 pCnt K m q = K ¬ n 0 K = 2 n p 2 p K
95 94 exp31 K q m q 2 2 2 pCnt K m q = K ¬ n 0 K = 2 n p 2 p K
96 95 com23 K q m 2 2 pCnt K m q = K q 2 ¬ n 0 K = 2 n p 2 p K
97 58 96 sylbid K q m m q = K 2 2 pCnt K q 2 ¬ n 0 K = 2 n p 2 p K
98 97 rexlimdva K q m m q = K 2 2 pCnt K q 2 ¬ n 0 K = 2 n p 2 p K
99 47 98 sylbid K q q K 2 2 pCnt K q 2 ¬ n 0 K = 2 n p 2 p K
100 43 99 syldd K q q K 2 2 pCnt K ¬ 2 K 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
101 100 rexlimdva K q q K 2 2 pCnt K ¬ 2 K 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
102 101 com12 q q K 2 2 pCnt K K ¬ 2 K 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
103 102 impd q q K 2 2 pCnt K K ¬ 2 K 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
104 38 103 syl K 2 2 pCnt K 2 K ¬ 2 K 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
105 37 104 jaoi K 2 2 pCnt K = 1 K 2 2 pCnt K 2 K ¬ 2 K 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
106 15 105 sylbi K 2 2 pCnt K K ¬ 2 K 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
107 106 com12 K ¬ 2 K 2 2 pCnt K K 2 2 pCnt K ¬ n 0 K = 2 n p 2 p K
108 14 107 sylbid K ¬ 2 K 2 2 pCnt K 2 2 pCnt K K ¬ n 0 K = 2 n p 2 p K
109 108 ex K ¬ 2 K 2 2 pCnt K 2 2 pCnt K K ¬ n 0 K = 2 n p 2 p K
110 3 5 109 mp2d K ¬ n 0 K = 2 n p 2 p K
111 110 imp K ¬ n 0 K = 2 n p 2 p K