Metamath Proof Explorer


Theorem sqff1o

Description: There is a bijection from the squarefree divisors of a number N to the powerset of the prime divisors of N . Among other things, this implies that a number has 2 ^ k squarefree divisors where k is the number of prime divisors, and a squarefree number has 2 ^ k divisors (because all divisors of a squarefree number are squarefree). The inverse function to F takes the product of all the primes in some subset of prime divisors of N . (Contributed by Mario Carneiro, 1-Jul-2015)

Ref Expression
Hypotheses sqff1o.1 S = x | μ x 0 x N
sqff1o.2 F = n S p | p n
sqff1o.3 G = n p p pCnt n
Assertion sqff1o N F : S 1-1 onto 𝒫 p | p N

Proof

Step Hyp Ref Expression
1 sqff1o.1 S = x | μ x 0 x N
2 sqff1o.2 F = n S p | p n
3 sqff1o.3 G = n p p pCnt n
4 fveq2 x = n μ x = μ n
5 4 neeq1d x = n μ x 0 μ n 0
6 breq1 x = n x N n N
7 5 6 anbi12d x = n μ x 0 x N μ n 0 n N
8 7 1 elrab2 n S n μ n 0 n N
9 8 simprbi n S μ n 0 n N
10 9 simprd n S n N
11 10 ad2antlr N n S p n N
12 prmz p p
13 12 adantl N n S p p
14 simplr N n S p n S
15 14 8 sylib N n S p n μ n 0 n N
16 15 simpld N n S p n
17 16 nnzd N n S p n
18 nnz N N
19 18 ad2antrr N n S p N
20 dvdstr p n N p n n N p N
21 13 17 19 20 syl3anc N n S p p n n N p N
22 11 21 mpan2d N n S p p n p N
23 22 ss2rabdv N n S p | p n p | p N
24 prmex V
25 24 rabex p | p n V
26 25 elpw p | p n 𝒫 p | p N p | p n p | p N
27 23 26 sylibr N n S p | p n 𝒫 p | p N
28 cnveq y = k if k z 1 0 y -1 = k if k z 1 0 -1
29 28 imaeq1d y = k if k z 1 0 y -1 = k if k z 1 0 -1
30 29 eleq1d y = k if k z 1 0 y -1 Fin k if k z 1 0 -1 Fin
31 1nn0 1 0
32 0nn0 0 0
33 31 32 ifcli if k z 1 0 0
34 33 rgenw k if k z 1 0 0
35 eqid k if k z 1 0 = k if k z 1 0
36 35 fmpt k if k z 1 0 0 k if k z 1 0 : 0
37 34 36 mpbi k if k z 1 0 : 0
38 37 a1i N z 𝒫 p | p N k if k z 1 0 : 0
39 nn0ex 0 V
40 39 24 elmap k if k z 1 0 0 k if k z 1 0 : 0
41 38 40 sylibr N z 𝒫 p | p N k if k z 1 0 0
42 fzfi 1 N Fin
43 ffn k if k z 1 0 : 0 k if k z 1 0 Fn
44 elpreima k if k z 1 0 Fn x k if k z 1 0 -1 x k if k z 1 0 x
45 37 43 44 mp2b x k if k z 1 0 -1 x k if k z 1 0 x
46 elequ1 k = x k z x z
47 46 ifbid k = x if k z 1 0 = if x z 1 0
48 31 32 ifcli if x z 1 0 0
49 48 elexi if x z 1 0 V
50 47 35 49 fvmpt x k if k z 1 0 x = if x z 1 0
51 50 eleq1d x k if k z 1 0 x if x z 1 0
52 51 biimpa x k if k z 1 0 x if x z 1 0
53 45 52 sylbi x k if k z 1 0 -1 if x z 1 0
54 0nnn ¬ 0
55 iffalse ¬ x z if x z 1 0 = 0
56 55 eleq1d ¬ x z if x z 1 0 0
57 54 56 mtbiri ¬ x z ¬ if x z 1 0
58 57 con4i if x z 1 0 x z
59 53 58 syl x k if k z 1 0 -1 x z
60 59 ssriv k if k z 1 0 -1 z
61 elpwi z 𝒫 p | p N z p | p N
62 61 adantl N z 𝒫 p | p N z p | p N
63 prmssnn
64 rabss2 p | p N p | p N
65 63 64 ax-mp p | p N p | p N
66 dvdsssfz1 N p | p N 1 N
67 66 adantr N z 𝒫 p | p N p | p N 1 N
68 65 67 sstrid N z 𝒫 p | p N p | p N 1 N
69 62 68 sstrd N z 𝒫 p | p N z 1 N
70 60 69 sstrid N z 𝒫 p | p N k if k z 1 0 -1 1 N
71 ssfi 1 N Fin k if k z 1 0 -1 1 N k if k z 1 0 -1 Fin
72 42 70 71 sylancr N z 𝒫 p | p N k if k z 1 0 -1 Fin
73 30 41 72 elrabd N z 𝒫 p | p N k if k z 1 0 y 0 | y -1 Fin
74 eqid y 0 | y -1 Fin = y 0 | y -1 Fin
75 3 74 1arith G : 1-1 onto y 0 | y -1 Fin
76 f1ocnv G : 1-1 onto y 0 | y -1 Fin G -1 : y 0 | y -1 Fin 1-1 onto
77 f1of G -1 : y 0 | y -1 Fin 1-1 onto G -1 : y 0 | y -1 Fin
78 75 76 77 mp2b G -1 : y 0 | y -1 Fin
79 78 ffvelrni k if k z 1 0 y 0 | y -1 Fin G -1 k if k z 1 0
80 73 79 syl N z 𝒫 p | p N G -1 k if k z 1 0
81 f1ocnvfv2 G : 1-1 onto y 0 | y -1 Fin k if k z 1 0 y 0 | y -1 Fin G G -1 k if k z 1 0 = k if k z 1 0
82 75 73 81 sylancr N z 𝒫 p | p N G G -1 k if k z 1 0 = k if k z 1 0
83 3 1arithlem1 G -1 k if k z 1 0 G G -1 k if k z 1 0 = p p pCnt G -1 k if k z 1 0
84 80 83 syl N z 𝒫 p | p N G G -1 k if k z 1 0 = p p pCnt G -1 k if k z 1 0
85 82 84 eqtr3d N z 𝒫 p | p N k if k z 1 0 = p p pCnt G -1 k if k z 1 0
86 85 fveq1d N z 𝒫 p | p N k if k z 1 0 q = p p pCnt G -1 k if k z 1 0 q
87 elequ1 k = q k z q z
88 87 ifbid k = q if k z 1 0 = if q z 1 0
89 31 32 ifcli if q z 1 0 0
90 89 elexi if q z 1 0 V
91 88 35 90 fvmpt q k if k z 1 0 q = if q z 1 0
92 86 91 sylan9req N z 𝒫 p | p N q p p pCnt G -1 k if k z 1 0 q = if q z 1 0
93 oveq1 p = q p pCnt G -1 k if k z 1 0 = q pCnt G -1 k if k z 1 0
94 eqid p p pCnt G -1 k if k z 1 0 = p p pCnt G -1 k if k z 1 0
95 ovex q pCnt G -1 k if k z 1 0 V
96 93 94 95 fvmpt q p p pCnt G -1 k if k z 1 0 q = q pCnt G -1 k if k z 1 0
97 96 adantl N z 𝒫 p | p N q p p pCnt G -1 k if k z 1 0 q = q pCnt G -1 k if k z 1 0
98 92 97 eqtr3d N z 𝒫 p | p N q if q z 1 0 = q pCnt G -1 k if k z 1 0
99 breq1 1 = if q z 1 0 1 1 if q z 1 0 1
100 breq1 0 = if q z 1 0 0 1 if q z 1 0 1
101 1le1 1 1
102 0le1 0 1
103 99 100 101 102 keephyp if q z 1 0 1
104 98 103 eqbrtrrdi N z 𝒫 p | p N q q pCnt G -1 k if k z 1 0 1
105 104 ralrimiva N z 𝒫 p | p N q q pCnt G -1 k if k z 1 0 1
106 issqf G -1 k if k z 1 0 μ G -1 k if k z 1 0 0 q q pCnt G -1 k if k z 1 0 1
107 80 106 syl N z 𝒫 p | p N μ G -1 k if k z 1 0 0 q q pCnt G -1 k if k z 1 0 1
108 105 107 mpbird N z 𝒫 p | p N μ G -1 k if k z 1 0 0
109 iftrue q z if q z 1 0 = 1
110 109 adantl N z 𝒫 p | p N q z if q z 1 0 = 1
111 62 sselda N z 𝒫 p | p N q z q p | p N
112 breq1 p = q p N q N
113 112 elrab q p | p N q q N
114 111 113 sylib N z 𝒫 p | p N q z q q N
115 114 simprd N z 𝒫 p | p N q z q N
116 114 simpld N z 𝒫 p | p N q z q
117 simpll N z 𝒫 p | p N q z N
118 pcelnn q N q pCnt N q N
119 116 117 118 syl2anc N z 𝒫 p | p N q z q pCnt N q N
120 115 119 mpbird N z 𝒫 p | p N q z q pCnt N
121 120 nnge1d N z 𝒫 p | p N q z 1 q pCnt N
122 110 121 eqbrtrd N z 𝒫 p | p N q z if q z 1 0 q pCnt N
123 122 ex N z 𝒫 p | p N q z if q z 1 0 q pCnt N
124 123 adantr N z 𝒫 p | p N q q z if q z 1 0 q pCnt N
125 simpr N z 𝒫 p | p N q q
126 18 ad2antrr N z 𝒫 p | p N q N
127 pcge0 q N 0 q pCnt N
128 125 126 127 syl2anc N z 𝒫 p | p N q 0 q pCnt N
129 iffalse ¬ q z if q z 1 0 = 0
130 129 breq1d ¬ q z if q z 1 0 q pCnt N 0 q pCnt N
131 128 130 syl5ibrcom N z 𝒫 p | p N q ¬ q z if q z 1 0 q pCnt N
132 124 131 pm2.61d N z 𝒫 p | p N q if q z 1 0 q pCnt N
133 98 132 eqbrtrrd N z 𝒫 p | p N q q pCnt G -1 k if k z 1 0 q pCnt N
134 133 ralrimiva N z 𝒫 p | p N q q pCnt G -1 k if k z 1 0 q pCnt N
135 80 nnzd N z 𝒫 p | p N G -1 k if k z 1 0
136 18 adantr N z 𝒫 p | p N N
137 pc2dvds G -1 k if k z 1 0 N G -1 k if k z 1 0 N q q pCnt G -1 k if k z 1 0 q pCnt N
138 135 136 137 syl2anc N z 𝒫 p | p N G -1 k if k z 1 0 N q q pCnt G -1 k if k z 1 0 q pCnt N
139 134 138 mpbird N z 𝒫 p | p N G -1 k if k z 1 0 N
140 108 139 jca N z 𝒫 p | p N μ G -1 k if k z 1 0 0 G -1 k if k z 1 0 N
141 fveq2 x = G -1 k if k z 1 0 μ x = μ G -1 k if k z 1 0
142 141 neeq1d x = G -1 k if k z 1 0 μ x 0 μ G -1 k if k z 1 0 0
143 breq1 x = G -1 k if k z 1 0 x N G -1 k if k z 1 0 N
144 142 143 anbi12d x = G -1 k if k z 1 0 μ x 0 x N μ G -1 k if k z 1 0 0 G -1 k if k z 1 0 N
145 144 1 elrab2 G -1 k if k z 1 0 S G -1 k if k z 1 0 μ G -1 k if k z 1 0 0 G -1 k if k z 1 0 N
146 80 140 145 sylanbrc N z 𝒫 p | p N G -1 k if k z 1 0 S
147 eqcom n = G -1 k if k z 1 0 G -1 k if k z 1 0 = n
148 8 simplbi n S n
149 148 ad2antrl N n S z 𝒫 p | p N n
150 24 mptex p p pCnt n V
151 3 fvmpt2 n p p pCnt n V G n = p p pCnt n
152 149 150 151 sylancl N n S z 𝒫 p | p N G n = p p pCnt n
153 152 eqeq1d N n S z 𝒫 p | p N G n = k if k z 1 0 p p pCnt n = k if k z 1 0
154 75 a1i N n S z 𝒫 p | p N G : 1-1 onto y 0 | y -1 Fin
155 73 adantrl N n S z 𝒫 p | p N k if k z 1 0 y 0 | y -1 Fin
156 f1ocnvfvb G : 1-1 onto y 0 | y -1 Fin n k if k z 1 0 y 0 | y -1 Fin G n = k if k z 1 0 G -1 k if k z 1 0 = n
157 154 149 155 156 syl3anc N n S z 𝒫 p | p N G n = k if k z 1 0 G -1 k if k z 1 0 = n
158 24 a1i N n S z 𝒫 p | p N V
159 0cnd N n S z 𝒫 p | p N 0
160 1cnd N n S z 𝒫 p | p N 1
161 0ne1 0 1
162 161 a1i N n S z 𝒫 p | p N 0 1
163 158 159 160 162 pw2f1olem N n S z 𝒫 p | p N z 𝒫 p p pCnt n = k if k z 1 0 p p pCnt n 0 1 z = p p pCnt n -1 1
164 ssrab2 p | p N
165 164 sspwi 𝒫 p | p N 𝒫
166 simprr N n S z 𝒫 p | p N z 𝒫 p | p N
167 165 166 sseldi N n S z 𝒫 p | p N z 𝒫
168 167 biantrurd N n S z 𝒫 p | p N p p pCnt n = k if k z 1 0 z 𝒫 p p pCnt n = k if k z 1 0
169 id p p
170 148 adantl N n S n
171 pccl p n p pCnt n 0
172 169 170 171 syl2anr N n S p p pCnt n 0
173 elnn0 p pCnt n 0 p pCnt n p pCnt n = 0
174 172 173 sylib N n S p p pCnt n p pCnt n = 0
175 174 orcomd N n S p p pCnt n = 0 p pCnt n
176 9 simpld n S μ n 0
177 176 adantl N n S μ n 0
178 issqf n μ n 0 p p pCnt n 1
179 170 178 syl N n S μ n 0 p p pCnt n 1
180 177 179 mpbid N n S p p pCnt n 1
181 180 r19.21bi N n S p p pCnt n 1
182 nnle1eq1 p pCnt n p pCnt n 1 p pCnt n = 1
183 181 182 syl5ibcom N n S p p pCnt n p pCnt n = 1
184 183 orim2d N n S p p pCnt n = 0 p pCnt n p pCnt n = 0 p pCnt n = 1
185 175 184 mpd N n S p p pCnt n = 0 p pCnt n = 1
186 ovex p pCnt n V
187 186 elpr p pCnt n 0 1 p pCnt n = 0 p pCnt n = 1
188 185 187 sylibr N n S p p pCnt n 0 1
189 188 fmpttd N n S p p pCnt n : 0 1
190 189 adantrr N n S z 𝒫 p | p N p p pCnt n : 0 1
191 prex 0 1 V
192 191 24 elmap p p pCnt n 0 1 p p pCnt n : 0 1
193 190 192 sylibr N n S z 𝒫 p | p N p p pCnt n 0 1
194 193 biantrurd N n S z 𝒫 p | p N z = p p pCnt n -1 1 p p pCnt n 0 1 z = p p pCnt n -1 1
195 163 168 194 3bitr4d N n S z 𝒫 p | p N p p pCnt n = k if k z 1 0 z = p p pCnt n -1 1
196 eqid p p pCnt n = p p pCnt n
197 196 mptiniseg 1 0 p p pCnt n -1 1 = p | p pCnt n = 1
198 31 197 ax-mp p p pCnt n -1 1 = p | p pCnt n = 1
199 id p pCnt n = 1 p pCnt n = 1
200 1nn 1
201 199 200 eqeltrdi p pCnt n = 1 p pCnt n
202 201 183 impbid2 N n S p p pCnt n = 1 p pCnt n
203 simpr N n S p p
204 pcelnn p n p pCnt n p n
205 203 16 204 syl2anc N n S p p pCnt n p n
206 202 205 bitrd N n S p p pCnt n = 1 p n
207 206 rabbidva N n S p | p pCnt n = 1 = p | p n
208 207 adantrr N n S z 𝒫 p | p N p | p pCnt n = 1 = p | p n
209 198 208 syl5eq N n S z 𝒫 p | p N p p pCnt n -1 1 = p | p n
210 209 eqeq2d N n S z 𝒫 p | p N z = p p pCnt n -1 1 z = p | p n
211 195 210 bitrd N n S z 𝒫 p | p N p p pCnt n = k if k z 1 0 z = p | p n
212 153 157 211 3bitr3d N n S z 𝒫 p | p N G -1 k if k z 1 0 = n z = p | p n
213 147 212 syl5bb N n S z 𝒫 p | p N n = G -1 k if k z 1 0 z = p | p n
214 2 27 146 213 f1o2d N F : S 1-1 onto 𝒫 p | p N