Step | Hyp | Ref
| Expression |
1 | | prmoval 16662 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ (#p‘𝑁) = ∏𝑘 ∈ (1...𝑁)if(𝑘 ∈ ℙ, 𝑘, 1)) |
2 | | eqidd 2739 |
. . . . . 6
⊢ (𝑘 ∈ (1...𝑁) → (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1)) = (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))) |
3 | | simpr 484 |
. . . . . . . 8
⊢ ((𝑘 ∈ (1...𝑁) ∧ 𝑚 = 𝑘) → 𝑚 = 𝑘) |
4 | 3 | eleq1d 2823 |
. . . . . . 7
⊢ ((𝑘 ∈ (1...𝑁) ∧ 𝑚 = 𝑘) → (𝑚 ∈ ℙ ↔ 𝑘 ∈ ℙ)) |
5 | 4, 3 | ifbieq1d 4480 |
. . . . . 6
⊢ ((𝑘 ∈ (1...𝑁) ∧ 𝑚 = 𝑘) → if(𝑚 ∈ ℙ, 𝑚, 1) = if(𝑘 ∈ ℙ, 𝑘, 1)) |
6 | | elfznn 13214 |
. . . . . 6
⊢ (𝑘 ∈ (1...𝑁) → 𝑘 ∈ ℕ) |
7 | | 1nn 11914 |
. . . . . . . 8
⊢ 1 ∈
ℕ |
8 | 7 | a1i 11 |
. . . . . . 7
⊢ (𝑘 ∈ (1...𝑁) → 1 ∈ ℕ) |
9 | 6, 8 | ifcld 4502 |
. . . . . 6
⊢ (𝑘 ∈ (1...𝑁) → if(𝑘 ∈ ℙ, 𝑘, 1) ∈ ℕ) |
10 | 2, 5, 6, 9 | fvmptd 6864 |
. . . . 5
⊢ (𝑘 ∈ (1...𝑁) → ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) = if(𝑘 ∈ ℙ, 𝑘, 1)) |
11 | 10 | eqcomd 2744 |
. . . 4
⊢ (𝑘 ∈ (1...𝑁) → if(𝑘 ∈ ℙ, 𝑘, 1) = ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘)) |
12 | 11 | prodeq2i 15557 |
. . 3
⊢
∏𝑘 ∈
(1...𝑁)if(𝑘 ∈ ℙ, 𝑘, 1) = ∏𝑘 ∈ (1...𝑁)((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) |
13 | 1, 12 | eqtrdi 2795 |
. 2
⊢ (𝑁 ∈ ℕ0
→ (#p‘𝑁) = ∏𝑘 ∈ (1...𝑁)((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘)) |
14 | | fzfid 13621 |
. . . 4
⊢ (𝑁 ∈ ℕ0
→ (1...𝑁) ∈
Fin) |
15 | | fz1ssnn 13216 |
. . . 4
⊢
(1...𝑁) ⊆
ℕ |
16 | 14, 15 | jctil 519 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ ((1...𝑁) ⊆
ℕ ∧ (1...𝑁)
∈ Fin)) |
17 | | fzssz 13187 |
. . . . 5
⊢
(1...𝑁) ⊆
ℤ |
18 | 17 | a1i 11 |
. . . 4
⊢ (𝑁 ∈ ℕ0
→ (1...𝑁) ⊆
ℤ) |
19 | | 0nelfz1 13204 |
. . . . 5
⊢ 0 ∉
(1...𝑁) |
20 | 19 | a1i 11 |
. . . 4
⊢ (𝑁 ∈ ℕ0
→ 0 ∉ (1...𝑁)) |
21 | | lcmfn0cl 16259 |
. . . 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 4502 |
. . . . 5
⊢ (𝑚 ∈ ℕ → if(𝑚 ∈ ℙ, 𝑚, 1) ∈
ℕ) |
26 | 25 | adantl 481 |
. . . 4
⊢ ((𝑁 ∈ ℕ0
∧ 𝑚 ∈ ℕ)
→ if(𝑚 ∈ ℙ,
𝑚, 1) ∈
ℕ) |
27 | 26 | fmpttd 6971 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ (𝑚 ∈ ℕ
↦ if(𝑚 ∈
ℙ, 𝑚,
1)):ℕ⟶ℕ) |
28 | | simpr 484 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 𝑘 ∈ (1...𝑁)) |
29 | 28 | adantr 480 |
. . . . . 6
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑥 ∈ ((1...𝑁) ∖ {𝑘})) → 𝑘 ∈ (1...𝑁)) |
30 | | eldifi 4057 |
. . . . . . 7
⊢ (𝑥 ∈ ((1...𝑁) ∖ {𝑘}) → 𝑥 ∈ (1...𝑁)) |
31 | 30 | adantl 481 |
. . . . . 6
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑥 ∈ ((1...𝑁) ∖ {𝑘})) → 𝑥 ∈ (1...𝑁)) |
32 | | eldif 3893 |
. . . . . . . 8
⊢ (𝑥 ∈ ((1...𝑁) ∖ {𝑘}) ↔ (𝑥 ∈ (1...𝑁) ∧ ¬ 𝑥 ∈ {𝑘})) |
33 | | velsn 4574 |
. . . . . . . . . . 11
⊢ (𝑥 ∈ {𝑘} ↔ 𝑥 = 𝑘) |
34 | 33 | biimpri 227 |
. . . . . . . . . 10
⊢ (𝑥 = 𝑘 → 𝑥 ∈ {𝑘}) |
35 | 34 | equcoms 2024 |
. . . . . . . . 9
⊢ (𝑘 = 𝑥 → 𝑥 ∈ {𝑘}) |
36 | 35 | necon3bi 2969 |
. . . . . . . 8
⊢ (¬
𝑥 ∈ {𝑘} → 𝑘 ≠ 𝑥) |
37 | 32, 36 | simplbiim 504 |
. . . . . . 7
⊢ (𝑥 ∈ ((1...𝑁) ∖ {𝑘}) → 𝑘 ≠ 𝑥) |
38 | 37 | adantl 481 |
. . . . . 6
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑥 ∈ ((1...𝑁) ∖ {𝑘})) → 𝑘 ≠ 𝑥) |
39 | | eqid 2738 |
. . . . . . 7
⊢ (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1)) = (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1)) |
40 | 39 | fvprmselgcd1 16674 |
. . . . . 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 3107 |
. . . 4
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → ∀𝑥 ∈ ((1...𝑁) ∖ {𝑘})(((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) gcd ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑥)) = 1) |
43 | 42 | ralrimiva 3107 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ ∀𝑘 ∈
(1...𝑁)∀𝑥 ∈ ((1...𝑁) ∖ {𝑘})(((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) gcd ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑥)) = 1) |
44 | | eqidd 2739 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1)) = (𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))) |
45 | | simpr 484 |
. . . . . . . 8
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑚 = 𝑘) → 𝑚 = 𝑘) |
46 | 45 | eleq1d 2823 |
. . . . . . 7
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑚 = 𝑘) → (𝑚 ∈ ℙ ↔ 𝑘 ∈ ℙ)) |
47 | 46, 45 | ifbieq1d 4480 |
. . . . . 6
⊢ (((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) ∧ 𝑚 = 𝑘) → if(𝑚 ∈ ℙ, 𝑚, 1) = if(𝑘 ∈ ℙ, 𝑘, 1)) |
48 | 15, 28 | sselid 3915 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 𝑘 ∈ ℕ) |
49 | 17, 28 | sselid 3915 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 𝑘 ∈ ℤ) |
50 | | 1zzd 12281 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 1 ∈
ℤ) |
51 | 49, 50 | ifcld 4502 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → if(𝑘 ∈ ℙ, 𝑘, 1) ∈ ℤ) |
52 | 44, 47, 48, 51 | fvmptd 6864 |
. . . . 5
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) = if(𝑘 ∈ ℙ, 𝑘, 1)) |
53 | | breq1 5073 |
. . . . . 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 16264 |
. . . . . . 7
⊢
(((1...𝑁) ⊆
ℤ ∧ (1...𝑁)
∈ Fin) → ∀𝑥 ∈ (1...𝑁)𝑥 ∥ (lcm‘(1...𝑁))) |
58 | 54, 56, 57 | 3syl 18 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → ∀𝑥 ∈ (1...𝑁)𝑥 ∥ (lcm‘(1...𝑁))) |
59 | | elfzuz2 13190 |
. . . . . . . . 9
⊢ (𝑘 ∈ (1...𝑁) → 𝑁 ∈
(ℤ≥‘1)) |
60 | 59 | adantl 481 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 𝑁 ∈
(ℤ≥‘1)) |
61 | | eluzfz1 13192 |
. . . . . . . 8
⊢ (𝑁 ∈
(ℤ≥‘1) → 1 ∈ (1...𝑁)) |
62 | 60, 61 | syl 17 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → 1 ∈ (1...𝑁)) |
63 | 28, 62 | ifcld 4502 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → if(𝑘 ∈ ℙ, 𝑘, 1) ∈ (1...𝑁)) |
64 | 53, 58, 63 | rspcdva 3554 |
. . . . 5
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → if(𝑘 ∈ ℙ, 𝑘, 1) ∥ (lcm‘(1...𝑁))) |
65 | 52, 64 | eqbrtrd 5092 |
. . . 4
⊢ ((𝑁 ∈ ℕ0
∧ 𝑘 ∈ (1...𝑁)) → ((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) ∥ (lcm‘(1...𝑁))) |
66 | 65 | ralrimiva 3107 |
. . 3
⊢ (𝑁 ∈ ℕ0
→ ∀𝑘 ∈
(1...𝑁)((𝑚 ∈ ℕ ↦ if(𝑚 ∈ ℙ, 𝑚, 1))‘𝑘) ∥ (lcm‘(1...𝑁))) |
67 | | coprmproddvds 16296 |
. . 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 5092 |
1
⊢ (𝑁 ∈ ℕ0
→ (#p‘𝑁) ∥ (lcm‘(1...𝑁))) |