Step | Hyp | Ref
| Expression |
1 | | breq1 5073 |
. . . . . 6
⊢ (𝑥 = 𝑦 → (𝑥 ∥ 𝑁 ↔ 𝑦 ∥ 𝑁)) |
2 | 1 | elrab 3617 |
. . . . 5
⊢ (𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} ↔ (𝑦 ∈ ℕ ∧ 𝑦 ∥ 𝑁)) |
3 | | hashgcdeq 16418 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝑦 ∈ ℕ) →
(♯‘{𝑧 ∈
(0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦}) = if(𝑦 ∥ 𝑁, (ϕ‘(𝑁 / 𝑦)), 0)) |
4 | 3 | adantrr 713 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ (𝑦 ∈ ℕ ∧ 𝑦 ∥ 𝑁)) → (♯‘{𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦}) = if(𝑦 ∥ 𝑁, (ϕ‘(𝑁 / 𝑦)), 0)) |
5 | | iftrue 4462 |
. . . . . . 7
⊢ (𝑦 ∥ 𝑁 → if(𝑦 ∥ 𝑁, (ϕ‘(𝑁 / 𝑦)), 0) = (ϕ‘(𝑁 / 𝑦))) |
6 | 5 | ad2antll 725 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ (𝑦 ∈ ℕ ∧ 𝑦 ∥ 𝑁)) → if(𝑦 ∥ 𝑁, (ϕ‘(𝑁 / 𝑦)), 0) = (ϕ‘(𝑁 / 𝑦))) |
7 | 4, 6 | eqtrd 2778 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ (𝑦 ∈ ℕ ∧ 𝑦 ∥ 𝑁)) → (♯‘{𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦}) = (ϕ‘(𝑁 / 𝑦))) |
8 | 2, 7 | sylan2b 593 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁}) → (♯‘{𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦}) = (ϕ‘(𝑁 / 𝑦))) |
9 | 8 | sumeq2dv 15343 |
. . 3
⊢ (𝑁 ∈ ℕ →
Σ𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (♯‘{𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦}) = Σ𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (ϕ‘(𝑁 / 𝑦))) |
10 | | fzfi 13620 |
. . . . 5
⊢
(1...𝑁) ∈
Fin |
11 | | dvdsssfz1 15955 |
. . . . 5
⊢ (𝑁 ∈ ℕ → {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} ⊆ (1...𝑁)) |
12 | | ssfi 8918 |
. . . . 5
⊢
(((1...𝑁) ∈ Fin
∧ {𝑥 ∈ ℕ
∣ 𝑥 ∥ 𝑁} ⊆ (1...𝑁)) → {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} ∈ Fin) |
13 | 10, 11, 12 | sylancr 586 |
. . . 4
⊢ (𝑁 ∈ ℕ → {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} ∈ Fin) |
14 | | fzofi 13622 |
. . . . . 6
⊢
(0..^𝑁) ∈
Fin |
15 | | ssrab2 4009 |
. . . . . 6
⊢ {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} ⊆ (0..^𝑁) |
16 | | ssfi 8918 |
. . . . . 6
⊢
(((0..^𝑁) ∈ Fin
∧ {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} ⊆ (0..^𝑁)) → {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} ∈ Fin) |
17 | 14, 15, 16 | mp2an 688 |
. . . . 5
⊢ {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} ∈ Fin |
18 | 17 | a1i 11 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁}) → {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} ∈ Fin) |
19 | | oveq1 7262 |
. . . . . . . . . 10
⊢ (𝑧 = 𝑤 → (𝑧 gcd 𝑁) = (𝑤 gcd 𝑁)) |
20 | 19 | eqeq1d 2740 |
. . . . . . . . 9
⊢ (𝑧 = 𝑤 → ((𝑧 gcd 𝑁) = 𝑦 ↔ (𝑤 gcd 𝑁) = 𝑦)) |
21 | 20 | elrab 3617 |
. . . . . . . 8
⊢ (𝑤 ∈ {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} ↔ (𝑤 ∈ (0..^𝑁) ∧ (𝑤 gcd 𝑁) = 𝑦)) |
22 | 21 | simprbi 496 |
. . . . . . 7
⊢ (𝑤 ∈ {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} → (𝑤 gcd 𝑁) = 𝑦) |
23 | 22 | rgen 3073 |
. . . . . 6
⊢
∀𝑤 ∈
{𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} (𝑤 gcd 𝑁) = 𝑦 |
24 | 23 | rgenw 3075 |
. . . . 5
⊢
∀𝑦 ∈
{𝑥 ∈ ℕ ∣
𝑥 ∥ 𝑁}∀𝑤 ∈ {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} (𝑤 gcd 𝑁) = 𝑦 |
25 | | invdisj 5054 |
. . . . 5
⊢
(∀𝑦 ∈
{𝑥 ∈ ℕ ∣
𝑥 ∥ 𝑁}∀𝑤 ∈ {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} (𝑤 gcd 𝑁) = 𝑦 → Disj 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦}) |
26 | 24, 25 | mp1i 13 |
. . . 4
⊢ (𝑁 ∈ ℕ →
Disj 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦}) |
27 | 13, 18, 26 | hashiun 15462 |
. . 3
⊢ (𝑁 ∈ ℕ →
(♯‘∪ 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦}) = Σ𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (♯‘{𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦})) |
28 | | fveq2 6756 |
. . . 4
⊢ (𝑑 = (𝑁 / 𝑦) → (ϕ‘𝑑) = (ϕ‘(𝑁 / 𝑦))) |
29 | | eqid 2738 |
. . . . 5
⊢ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} = {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} |
30 | | eqid 2738 |
. . . . 5
⊢ (𝑧 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} ↦ (𝑁 / 𝑧)) = (𝑧 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} ↦ (𝑁 / 𝑧)) |
31 | 29, 30 | dvdsflip 15954 |
. . . 4
⊢ (𝑁 ∈ ℕ → (𝑧 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} ↦ (𝑁 / 𝑧)):{𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁}–1-1-onto→{𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁}) |
32 | | oveq2 7263 |
. . . . . 6
⊢ (𝑧 = 𝑦 → (𝑁 / 𝑧) = (𝑁 / 𝑦)) |
33 | | ovex 7288 |
. . . . . 6
⊢ (𝑁 / 𝑦) ∈ V |
34 | 32, 30, 33 | fvmpt 6857 |
. . . . 5
⊢ (𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} → ((𝑧 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} ↦ (𝑁 / 𝑧))‘𝑦) = (𝑁 / 𝑦)) |
35 | 34 | adantl 481 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁}) → ((𝑧 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} ↦ (𝑁 / 𝑧))‘𝑦) = (𝑁 / 𝑦)) |
36 | | elrabi 3611 |
. . . . . . 7
⊢ (𝑑 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} → 𝑑 ∈ ℕ) |
37 | 36 | adantl 481 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ 𝑑 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁}) → 𝑑 ∈ ℕ) |
38 | 37 | phicld 16401 |
. . . . 5
⊢ ((𝑁 ∈ ℕ ∧ 𝑑 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁}) → (ϕ‘𝑑) ∈ ℕ) |
39 | 38 | nncnd 11919 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ 𝑑 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁}) → (ϕ‘𝑑) ∈ ℂ) |
40 | 28, 13, 31, 35, 39 | fsumf1o 15363 |
. . 3
⊢ (𝑁 ∈ ℕ →
Σ𝑑 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (ϕ‘𝑑) = Σ𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (ϕ‘(𝑁 / 𝑦))) |
41 | 9, 27, 40 | 3eqtr4rd 2789 |
. 2
⊢ (𝑁 ∈ ℕ →
Σ𝑑 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (ϕ‘𝑑) = (♯‘∪ 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦})) |
42 | | iunrab 4978 |
. . . . 5
⊢ ∪ 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} = {𝑧 ∈ (0..^𝑁) ∣ ∃𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (𝑧 gcd 𝑁) = 𝑦} |
43 | | breq1 5073 |
. . . . . . . . 9
⊢ (𝑥 = (𝑧 gcd 𝑁) → (𝑥 ∥ 𝑁 ↔ (𝑧 gcd 𝑁) ∥ 𝑁)) |
44 | | elfzoelz 13316 |
. . . . . . . . . . 11
⊢ (𝑧 ∈ (0..^𝑁) → 𝑧 ∈ ℤ) |
45 | 44 | adantl 481 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℕ ∧ 𝑧 ∈ (0..^𝑁)) → 𝑧 ∈ ℤ) |
46 | | nnz 12272 |
. . . . . . . . . . 11
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℤ) |
47 | 46 | adantr 480 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℕ ∧ 𝑧 ∈ (0..^𝑁)) → 𝑁 ∈ ℤ) |
48 | | nnne0 11937 |
. . . . . . . . . . . . 13
⊢ (𝑁 ∈ ℕ → 𝑁 ≠ 0) |
49 | 48 | neneqd 2947 |
. . . . . . . . . . . 12
⊢ (𝑁 ∈ ℕ → ¬
𝑁 = 0) |
50 | 49 | intnand 488 |
. . . . . . . . . . 11
⊢ (𝑁 ∈ ℕ → ¬
(𝑧 = 0 ∧ 𝑁 = 0)) |
51 | 50 | adantr 480 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℕ ∧ 𝑧 ∈ (0..^𝑁)) → ¬ (𝑧 = 0 ∧ 𝑁 = 0)) |
52 | | gcdn0cl 16137 |
. . . . . . . . . 10
⊢ (((𝑧 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬
(𝑧 = 0 ∧ 𝑁 = 0)) → (𝑧 gcd 𝑁) ∈ ℕ) |
53 | 45, 47, 51, 52 | syl21anc 834 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝑧 ∈ (0..^𝑁)) → (𝑧 gcd 𝑁) ∈ ℕ) |
54 | | gcddvds 16138 |
. . . . . . . . . . 11
⊢ ((𝑧 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑧 gcd 𝑁) ∥ 𝑧 ∧ (𝑧 gcd 𝑁) ∥ 𝑁)) |
55 | 45, 47, 54 | syl2anc 583 |
. . . . . . . . . 10
⊢ ((𝑁 ∈ ℕ ∧ 𝑧 ∈ (0..^𝑁)) → ((𝑧 gcd 𝑁) ∥ 𝑧 ∧ (𝑧 gcd 𝑁) ∥ 𝑁)) |
56 | 55 | simprd 495 |
. . . . . . . . 9
⊢ ((𝑁 ∈ ℕ ∧ 𝑧 ∈ (0..^𝑁)) → (𝑧 gcd 𝑁) ∥ 𝑁) |
57 | 43, 53, 56 | elrabd 3619 |
. . . . . . . 8
⊢ ((𝑁 ∈ ℕ ∧ 𝑧 ∈ (0..^𝑁)) → (𝑧 gcd 𝑁) ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁}) |
58 | | clel5 3589 |
. . . . . . . 8
⊢ ((𝑧 gcd 𝑁) ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} ↔ ∃𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (𝑧 gcd 𝑁) = 𝑦) |
59 | 57, 58 | sylib 217 |
. . . . . . 7
⊢ ((𝑁 ∈ ℕ ∧ 𝑧 ∈ (0..^𝑁)) → ∃𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (𝑧 gcd 𝑁) = 𝑦) |
60 | 59 | ralrimiva 3107 |
. . . . . 6
⊢ (𝑁 ∈ ℕ →
∀𝑧 ∈ (0..^𝑁)∃𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (𝑧 gcd 𝑁) = 𝑦) |
61 | | rabid2 3307 |
. . . . . 6
⊢
((0..^𝑁) = {𝑧 ∈ (0..^𝑁) ∣ ∃𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (𝑧 gcd 𝑁) = 𝑦} ↔ ∀𝑧 ∈ (0..^𝑁)∃𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (𝑧 gcd 𝑁) = 𝑦) |
62 | 60, 61 | sylibr 233 |
. . . . 5
⊢ (𝑁 ∈ ℕ →
(0..^𝑁) = {𝑧 ∈ (0..^𝑁) ∣ ∃𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (𝑧 gcd 𝑁) = 𝑦}) |
63 | 42, 62 | eqtr4id 2798 |
. . . 4
⊢ (𝑁 ∈ ℕ → ∪ 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦} = (0..^𝑁)) |
64 | 63 | fveq2d 6760 |
. . 3
⊢ (𝑁 ∈ ℕ →
(♯‘∪ 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦}) = (♯‘(0..^𝑁))) |
65 | | nnnn0 12170 |
. . . 4
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℕ0) |
66 | | hashfzo0 14073 |
. . . 4
⊢ (𝑁 ∈ ℕ0
→ (♯‘(0..^𝑁)) = 𝑁) |
67 | 65, 66 | syl 17 |
. . 3
⊢ (𝑁 ∈ ℕ →
(♯‘(0..^𝑁)) =
𝑁) |
68 | 64, 67 | eqtrd 2778 |
. 2
⊢ (𝑁 ∈ ℕ →
(♯‘∪ 𝑦 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} {𝑧 ∈ (0..^𝑁) ∣ (𝑧 gcd 𝑁) = 𝑦}) = 𝑁) |
69 | 41, 68 | eqtrd 2778 |
1
⊢ (𝑁 ∈ ℕ →
Σ𝑑 ∈ {𝑥 ∈ ℕ ∣ 𝑥 ∥ 𝑁} (ϕ‘𝑑) = 𝑁) |