Step | Hyp | Ref
| Expression |
1 | | prmoval 16762 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ (#p‘𝑁) = ∏𝑘 ∈ (1...𝑁)if(𝑘 ∈ ℙ, 𝑘, 1)) |
2 | | eqidd 2734 |
. . . . . 6
⊢ (𝑘 ∈ (1...𝑁) → (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1)) = (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))) |
3 | | simpr 484 |
. . . . . . . 8
⊢ ((𝑘 ∈ (1...𝑁) ∧ 𝑚 = 𝑘) → 𝑚 = 𝑘) |
4 | 3 | eleq1d 2818 |
. . . . . . 7
⊢ ((𝑘 ∈ (1...𝑁) ∧ 𝑚 = 𝑘) → (𝑚 ∈ ℙ ↔ 𝑘 ∈ ℙ)) |
5 | 4, 3 | ifbieq1d 4486 |
. . . . . 6
⊢ ((𝑘 ∈ (1...𝑁) ∧ 𝑚 = 𝑘) → if(𝑚 ∈ ℙ, 𝑚, 1) = if(𝑘 ∈ ℙ, 𝑘, 1)) |
6 | | elfznn 13313 |
. . . . . 6
⊢ (𝑘 ∈ (1...𝑁) → 𝑘 ∈ ℕ) |
7 | | 1nn 12012 |
. . . . . . . 8
⊢ 1 ∈
ℕ |
8 | 7 | a1i 11 |
. . . . . . 7
⊢ (𝑘 ∈ (1...𝑁) → 1 ∈ ℕ) |
9 | 6, 8 | ifcld 4508 |
. . . . . 6
⊢ (𝑘 ∈ (1...𝑁) → if(𝑘 ∈ ℙ, 𝑘, 1) ∈ ℕ) |
10 | 2, 5, 6, 9 | fvmptd 6902 |
. . . . 5
⊢ (𝑘 ∈ (1...𝑁) → ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) = if(𝑘 ∈ ℙ, 𝑘, 1)) |
11 | 10 | eqcomd 2739 |
. . . 4
⊢ (𝑘 ∈ (1...𝑁) → if(𝑘 ∈ ℙ, 𝑘, 1) = ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘)) |
12 | 11 | prodeq2i 15657 |
. . 3
⊢
∏𝑘 ∈
(1...𝑁)if(𝑘 ∈ ℙ, 𝑘, 1) = ∏𝑘 ∈ (1...𝑁)((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) |
13 | 1, 12 | eqtrdi 2789 |
. 2
⊢ (𝑁 ∈ ℕ0
→ (#p‘𝑁) = ∏𝑘 ∈ (1...𝑁)((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘)) |
14 | | fzfid 13721 |
. . . 4
⊢ (𝑁 ∈ ℕ0
→ (1...𝑁) ∈
Fin) |
15 | | fz1ssnn 13315 |
. . . 4
⊢
(1...𝑁) ⊆
ℕ |
16 | 14, 15 | jctil 519 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ ((1...𝑁) ⊆
ℕ ∧ (1...𝑁)
∈ Fin)) |
17 | | fzssz 13286 |
. . . . 5
⊢
(1...𝑁) ⊆
ℤ |
18 | 17 | a1i 11 |
. . . 4
⊢ (𝑁 ∈ ℕ0
→ (1...𝑁) ⊆
ℤ) |
19 | | 0nelfz1 13303 |
. . . . 5
⊢ 0 ∉
(1...𝑁) |
20 | 19 | a1i 11 |
. . . 4
⊢ (𝑁 ∈ ℕ0
→ 0 ∉ (1...𝑁)) |
21 | | lcmfn0cl 16359 |
. . . 4
⊢
(((1...𝑁) ⊆
ℤ ∧ (1...𝑁)
∈ Fin ∧ 0 ∉ (1...𝑁)) → (lcm‘(1...𝑁)) ∈
ℕ) |
22 | 18, 14, 20, 21 | syl3anc 1369 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ (lcm‘(1...𝑁)) ∈ ℕ) |
23 | | id 22 |
. . . . . 6
⊢ (𝑚 ∈ ℕ → 𝑚 ∈
ℕ) |
24 | 7 | a1i 11 |
. . . . . 6
⊢ (𝑚 ∈ ℕ → 1 ∈
ℕ) |
25 | 23, 24 | ifcld 4508 |
. . . . 5
⊢ (𝑚 ∈ ℕ → if(𝑚 ∈ ℙ, 𝑚, 1) ∈
ℕ) |
26 | 25 | adantl 481 |
. . . 4
⊢ ((𝑁 ∈ ℕ0
∧ 𝑚 ∈ ℕ)
→ if(𝑚 ∈ ℙ,
𝑚, 1) ∈
ℕ) |
27 | 26 | fmpttd 7009 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ (𝑚 ∈ ℕ
↦ if(𝑚 ∈
ℙ, 𝑚,
1)):ℕ⟶ℕ) |
28 | | simpr 484 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 𝑘 ∈ (1...𝑁)) |
29 | 28 | adantr 480 |
. . . . . 6
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑥 ∈ ((1...𝑁) ∖ {𝑘})) → 𝑘 ∈ (1...𝑁)) |
30 | | eldifi 4064 |
. . . . . . 7
⊢ (𝑥 ∈ ((1...𝑁) ∖ {𝑘}) → 𝑥 ∈ (1...𝑁)) |
31 | 30 | adantl 481 |
. . . . . 6
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑥 ∈ ((1...𝑁) ∖ {𝑘})) → 𝑥 ∈ (1...𝑁)) |
32 | | eldif 3899 |
. . . . . . . 8
⊢ (𝑥 ∈ ((1...𝑁) ∖ {𝑘}) ↔ (𝑥 ∈ (1...𝑁) ∧ ¬ 𝑥 ∈ {𝑘})) |
33 | | velsn 4580 |
. . . . . . . . . . 11
⊢ (𝑥 ∈ {𝑘} ↔ 𝑥 = 𝑘) |
34 | 33 | biimpri 227 |
. . . . . . . . . 10
⊢ (𝑥 = 𝑘 → 𝑥 ∈ {𝑘}) |
35 | 34 | equcoms 2019 |
. . . . . . . . 9
⊢ (𝑘 = 𝑥 → 𝑥 ∈ {𝑘}) |
36 | 35 | necon3bi 2965 |
. . . . . . . 8
⊢ (¬
𝑥 ∈ {𝑘} → 𝑘 ≠ 𝑥) |
37 | 32, 36 | simplbiim 504 |
. . . . . . 7
⊢ (𝑥 ∈ ((1...𝑁) ∖ {𝑘}) → 𝑘 ≠ 𝑥) |
38 | 37 | adantl 481 |
. . . . . 6
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑥 ∈ ((1...𝑁) ∖ {𝑘})) → 𝑘 ≠ 𝑥) |
39 | | eqid 2733 |
. . . . . . 7
⊢ (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1)) = (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1)) |
40 | 39 | fvprmselgcd1 16774 |
. . . . . 6
⊢ ((𝑘 ∈ (1...𝑁) ∧ 𝑥 ∈ (1...𝑁) ∧ 𝑘 ≠ 𝑥) → (((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) gcd ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑥)) = 1) |
41 | 29, 31, 38, 40 | syl3anc 1369 |
. . . . 5
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑥 ∈ ((1...𝑁) ∖ {𝑘})) → (((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) gcd ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑥)) = 1) |
42 | 41 | ralrimiva 3137 |
. . . 4
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → ∀𝑥 ∈ ((1...𝑁) ∖ {𝑘})(((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) gcd ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑥)) = 1) |
43 | 42 | ralrimiva 3137 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ ∀𝑘 ∈
(1...𝑁)∀𝑥 ∈ ((1...𝑁) ∖ {𝑘})(((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) gcd ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑥)) = 1) |
44 | | eqidd 2734 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1)) = (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))) |
45 | | simpr 484 |
. . . . . . . 8
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑚 = 𝑘) → 𝑚 = 𝑘) |
46 | 45 | eleq1d 2818 |
. . . . . . 7
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑚 = 𝑘) → (𝑚 ∈ ℙ ↔ 𝑘 ∈ ℙ)) |
47 | 46, 45 | ifbieq1d 4486 |
. . . . . 6
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑚 = 𝑘) → if(𝑚 ∈ ℙ, 𝑚, 1) = if(𝑘 ∈ ℙ, 𝑘, 1)) |
48 | 15, 28 | sselid 3921 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 𝑘 ∈ ℕ) |
49 | 17, 28 | sselid 3921 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 𝑘 ∈ ℤ) |
50 | | 1zzd 12379 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 1 ∈
ℤ) |
51 | 49, 50 | ifcld 4508 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → if(𝑘 ∈ ℙ, 𝑘, 1) ∈ ℤ) |
52 | 44, 47, 48, 51 | fvmptd 6902 |
. . . . 5
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) = if(𝑘 ∈ ℙ, 𝑘, 1)) |
53 | | breq1 5080 |
. . . . . 6
⊢ (𝑥 = if(𝑘 ∈ ℙ, 𝑘, 1) → (𝑥 ∥ (lcm‘(1...𝑁)) ↔ if(𝑘 ∈ ℙ, 𝑘, 1) ∥ (lcm‘(1...𝑁)))) |
54 | 16 | adantr 480 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → ((1...𝑁) ⊆ ℕ ∧
(1...𝑁) ∈
Fin)) |
55 | 17 | 2a1i 12 |
. . . . . . . 8
⊢
((1...𝑁) ∈ Fin
→ ((1...𝑁) ⊆
ℕ → (1...𝑁)
⊆ ℤ)) |
56 | 55 | imdistanri 569 |
. . . . . . 7
⊢
(((1...𝑁) ⊆
ℕ ∧ (1...𝑁)
∈ Fin) → ((1...𝑁)
⊆ ℤ ∧ (1...𝑁) ∈ Fin)) |
57 | | dvdslcmf 16364 |
. . . . . . 7
⊢
(((1...𝑁) ⊆
ℤ ∧ (1...𝑁)
∈ Fin) → ∀𝑥 ∈ (1...𝑁)𝑥 ∥ (lcm‘(1...𝑁))) |
58 | 54, 56, 57 | 3syl 18 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → ∀𝑥 ∈ (1...𝑁)𝑥 ∥ (lcm‘(1...𝑁))) |
59 | | elfzuz2 13289 |
. . . . . . . . 9
⊢ (𝑘 ∈ (1...𝑁) → 𝑁 ∈
(ℤ≥‘1)) |
60 | 59 | adantl 481 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 𝑁 ∈
(ℤ≥‘1)) |
61 | | eluzfz1 13291 |
. . . . . . . 8
⊢ (𝑁 ∈
(ℤ≥‘1) → 1 ∈ (1...𝑁)) |
62 | 60, 61 | syl 17 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 1 ∈ (1...𝑁)) |
63 | 28, 62 | ifcld 4508 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → if(𝑘 ∈ ℙ, 𝑘, 1) ∈ (1...𝑁)) |
64 | 53, 58, 63 | rspcdva 3564 |
. . . . 5
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → if(𝑘 ∈ ℙ, 𝑘, 1) ∥ (lcm‘(1...𝑁))) |
65 | 52, 64 | eqbrtrd 5099 |
. . . 4
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) ∥ (lcm‘(1...𝑁))) |
66 | 65 | ralrimiva 3137 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ ∀𝑘 ∈
(1...𝑁)((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) ∥ (lcm‘(1...𝑁))) |
67 | | coprmproddvds 16396 |
. . 3
⊢
((((1...𝑁) ⊆
ℕ ∧ (1...𝑁)
∈ Fin) ∧ ((lcm‘(1...𝑁)) ∈ ℕ ∧ (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1)):ℕ⟶ℕ) ∧
(∀𝑘 ∈
(1...𝑁)∀𝑥 ∈ ((1...𝑁) ∖ {𝑘})(((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) gcd ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑥)) = 1 ∧ ∀𝑘 ∈ (1...𝑁)((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) ∥ (lcm‘(1...𝑁)))) → ∏𝑘 ∈ (1...𝑁)((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) ∥ (lcm‘(1...𝑁))) |
68 | 16, 22, 27, 43, 66, 67 | syl122anc 1377 |
. 2
⊢ (𝑁 ∈ ℕ0
→ ∏𝑘 ∈
(1...𝑁)((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) ∥ (lcm‘(1...𝑁))) |
69 | 13, 68 | eqbrtrd 5099 |
1
⊢ (𝑁 ∈ ℕ0
→ (#p‘𝑁) ∥ (lcm‘(1...𝑁))) |