Step | Hyp | Ref
| Expression |
1 | | oveq1 5860 |
. . . . . . . . . . . . . 14
⊢ (𝑦 = 𝑤 → (𝑦 gcd (𝑀 · 𝑁)) = (𝑤 gcd (𝑀 · 𝑁))) |
2 | 1 | eqeq1d 2179 |
. . . . . . . . . . . . 13
⊢ (𝑦 = 𝑤 → ((𝑦 gcd (𝑀 · 𝑁)) = 1 ↔ (𝑤 gcd (𝑀 · 𝑁)) = 1)) |
3 | | phimul.6 |
. . . . . . . . . . . . 13
⊢ 𝑊 = {𝑦 ∈ 𝑆 ∣ (𝑦 gcd (𝑀 · 𝑁)) = 1} |
4 | 2, 3 | elrab2 2889 |
. . . . . . . . . . . 12
⊢ (𝑤 ∈ 𝑊 ↔ (𝑤 ∈ 𝑆 ∧ (𝑤 gcd (𝑀 · 𝑁)) = 1)) |
5 | 4 | simplbi 272 |
. . . . . . . . . . 11
⊢ (𝑤 ∈ 𝑊 → 𝑤 ∈ 𝑆) |
6 | 5 | adantl 275 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑤 ∈ 𝑆) |
7 | | elfzoelz 10103 |
. . . . . . . . . . . . . . 15
⊢ (𝑤 ∈ (0..^(𝑀 · 𝑁)) → 𝑤 ∈ ℤ) |
8 | | crth.1 |
. . . . . . . . . . . . . . 15
⊢ 𝑆 = (0..^(𝑀 · 𝑁)) |
9 | 7, 8 | eleq2s 2265 |
. . . . . . . . . . . . . 14
⊢ (𝑤 ∈ 𝑆 → 𝑤 ∈ ℤ) |
10 | 6, 9 | syl 14 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑤 ∈ ℤ) |
11 | | zq 9585 |
. . . . . . . . . . . . 13
⊢ (𝑤 ∈ ℤ → 𝑤 ∈
ℚ) |
12 | 10, 11 | syl 14 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑤 ∈ ℚ) |
13 | | crth.4 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝑀 ∈ ℕ ∧ 𝑁 ∈ ℕ ∧ (𝑀 gcd 𝑁) = 1)) |
14 | 13 | simp1d 1004 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → 𝑀 ∈ ℕ) |
15 | 14 | adantr 274 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑀 ∈ ℕ) |
16 | | nnq 9592 |
. . . . . . . . . . . . 13
⊢ (𝑀 ∈ ℕ → 𝑀 ∈
ℚ) |
17 | 15, 16 | syl 14 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑀 ∈ ℚ) |
18 | 15 | nngt0d 8922 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 0 < 𝑀) |
19 | 12, 17, 18 | modqcld 10284 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 mod 𝑀) ∈ ℚ) |
20 | 13 | simp2d 1005 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → 𝑁 ∈ ℕ) |
21 | 20 | adantr 274 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑁 ∈ ℕ) |
22 | | nnq 9592 |
. . . . . . . . . . . . 13
⊢ (𝑁 ∈ ℕ → 𝑁 ∈
ℚ) |
23 | 21, 22 | syl 14 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑁 ∈ ℚ) |
24 | 21 | nngt0d 8922 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 0 < 𝑁) |
25 | 12, 23, 24 | modqcld 10284 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 mod 𝑁) ∈ ℚ) |
26 | | opexg 4213 |
. . . . . . . . . . 11
⊢ (((𝑤 mod 𝑀) ∈ ℚ ∧ (𝑤 mod 𝑁) ∈ ℚ) → 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉 ∈ V) |
27 | 19, 25, 26 | syl2anc 409 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉 ∈ V) |
28 | | oveq1 5860 |
. . . . . . . . . . . 12
⊢ (𝑥 = 𝑤 → (𝑥 mod 𝑀) = (𝑤 mod 𝑀)) |
29 | | oveq1 5860 |
. . . . . . . . . . . 12
⊢ (𝑥 = 𝑤 → (𝑥 mod 𝑁) = (𝑤 mod 𝑁)) |
30 | 28, 29 | opeq12d 3773 |
. . . . . . . . . . 11
⊢ (𝑥 = 𝑤 → 〈(𝑥 mod 𝑀), (𝑥 mod 𝑁)〉 = 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉) |
31 | | crth.3 |
. . . . . . . . . . 11
⊢ 𝐹 = (𝑥 ∈ 𝑆 ↦ 〈(𝑥 mod 𝑀), (𝑥 mod 𝑁)〉) |
32 | 30, 31 | fvmptg 5572 |
. . . . . . . . . 10
⊢ ((𝑤 ∈ 𝑆 ∧ 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉 ∈ V) → (𝐹‘𝑤) = 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉) |
33 | 6, 27, 32 | syl2anc 409 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝐹‘𝑤) = 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉) |
34 | 5, 8 | eleqtrdi 2263 |
. . . . . . . . . . . . . 14
⊢ (𝑤 ∈ 𝑊 → 𝑤 ∈ (0..^(𝑀 · 𝑁))) |
35 | 34 | adantl 275 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑤 ∈ (0..^(𝑀 · 𝑁))) |
36 | 35, 7 | syl 14 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑤 ∈ ℤ) |
37 | | zmodfzo 10303 |
. . . . . . . . . . . 12
⊢ ((𝑤 ∈ ℤ ∧ 𝑀 ∈ ℕ) → (𝑤 mod 𝑀) ∈ (0..^𝑀)) |
38 | 36, 15, 37 | syl2anc 409 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 mod 𝑀) ∈ (0..^𝑀)) |
39 | | modgcd 11946 |
. . . . . . . . . . . . 13
⊢ ((𝑤 ∈ ℤ ∧ 𝑀 ∈ ℕ) → ((𝑤 mod 𝑀) gcd 𝑀) = (𝑤 gcd 𝑀)) |
40 | 36, 15, 39 | syl2anc 409 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ((𝑤 mod 𝑀) gcd 𝑀) = (𝑤 gcd 𝑀)) |
41 | 15 | nnzd 9333 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑀 ∈ ℤ) |
42 | | gcddvds 11918 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑤 ∈ ℤ ∧ 𝑀 ∈ ℤ) → ((𝑤 gcd 𝑀) ∥ 𝑤 ∧ (𝑤 gcd 𝑀) ∥ 𝑀)) |
43 | 36, 41, 42 | syl2anc 409 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ((𝑤 gcd 𝑀) ∥ 𝑤 ∧ (𝑤 gcd 𝑀) ∥ 𝑀)) |
44 | 43 | simpld 111 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑀) ∥ 𝑤) |
45 | | nnne0 8906 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑀 ∈ ℕ → 𝑀 ≠ 0) |
46 | | simpr 109 |
. . . . . . . . . . . . . . . . . . . 20
⊢ ((𝑤 = 0 ∧ 𝑀 = 0) → 𝑀 = 0) |
47 | 46 | necon3ai 2389 |
. . . . . . . . . . . . . . . . . . 19
⊢ (𝑀 ≠ 0 → ¬ (𝑤 = 0 ∧ 𝑀 = 0)) |
48 | 15, 45, 47 | 3syl 17 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ¬ (𝑤 = 0 ∧ 𝑀 = 0)) |
49 | | gcdn0cl 11917 |
. . . . . . . . . . . . . . . . . 18
⊢ (((𝑤 ∈ ℤ ∧ 𝑀 ∈ ℤ) ∧ ¬
(𝑤 = 0 ∧ 𝑀 = 0)) → (𝑤 gcd 𝑀) ∈ ℕ) |
50 | 36, 41, 48, 49 | syl21anc 1232 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑀) ∈ ℕ) |
51 | 50 | nnzd 9333 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑀) ∈ ℤ) |
52 | 21 | nnzd 9333 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑁 ∈ ℤ) |
53 | 43 | simprd 113 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑀) ∥ 𝑀) |
54 | 51, 41, 52, 53 | dvdsmultr1d 11794 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑀) ∥ (𝑀 · 𝑁)) |
55 | 15, 21 | nnmulcld 8927 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑀 · 𝑁) ∈ ℕ) |
56 | 55 | nnzd 9333 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑀 · 𝑁) ∈ ℤ) |
57 | | nnne0 8906 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑀 · 𝑁) ∈ ℕ → (𝑀 · 𝑁) ≠ 0) |
58 | | simpr 109 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝑤 = 0 ∧ (𝑀 · 𝑁) = 0) → (𝑀 · 𝑁) = 0) |
59 | 58 | necon3ai 2389 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑀 · 𝑁) ≠ 0 → ¬ (𝑤 = 0 ∧ (𝑀 · 𝑁) = 0)) |
60 | 55, 57, 59 | 3syl 17 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ¬ (𝑤 = 0 ∧ (𝑀 · 𝑁) = 0)) |
61 | | dvdslegcd 11919 |
. . . . . . . . . . . . . . . 16
⊢ ((((𝑤 gcd 𝑀) ∈ ℤ ∧ 𝑤 ∈ ℤ ∧ (𝑀 · 𝑁) ∈ ℤ) ∧ ¬ (𝑤 = 0 ∧ (𝑀 · 𝑁) = 0)) → (((𝑤 gcd 𝑀) ∥ 𝑤 ∧ (𝑤 gcd 𝑀) ∥ (𝑀 · 𝑁)) → (𝑤 gcd 𝑀) ≤ (𝑤 gcd (𝑀 · 𝑁)))) |
62 | 51, 36, 56, 60, 61 | syl31anc 1236 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (((𝑤 gcd 𝑀) ∥ 𝑤 ∧ (𝑤 gcd 𝑀) ∥ (𝑀 · 𝑁)) → (𝑤 gcd 𝑀) ≤ (𝑤 gcd (𝑀 · 𝑁)))) |
63 | 44, 54, 62 | mp2and 431 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑀) ≤ (𝑤 gcd (𝑀 · 𝑁))) |
64 | 4 | simprbi 273 |
. . . . . . . . . . . . . . 15
⊢ (𝑤 ∈ 𝑊 → (𝑤 gcd (𝑀 · 𝑁)) = 1) |
65 | 64 | adantl 275 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd (𝑀 · 𝑁)) = 1) |
66 | 63, 65 | breqtrd 4015 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑀) ≤ 1) |
67 | | nnle1eq1 8902 |
. . . . . . . . . . . . . 14
⊢ ((𝑤 gcd 𝑀) ∈ ℕ → ((𝑤 gcd 𝑀) ≤ 1 ↔ (𝑤 gcd 𝑀) = 1)) |
68 | 50, 67 | syl 14 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ((𝑤 gcd 𝑀) ≤ 1 ↔ (𝑤 gcd 𝑀) = 1)) |
69 | 66, 68 | mpbid 146 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑀) = 1) |
70 | 40, 69 | eqtrd 2203 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ((𝑤 mod 𝑀) gcd 𝑀) = 1) |
71 | | oveq1 5860 |
. . . . . . . . . . . . 13
⊢ (𝑦 = (𝑤 mod 𝑀) → (𝑦 gcd 𝑀) = ((𝑤 mod 𝑀) gcd 𝑀)) |
72 | 71 | eqeq1d 2179 |
. . . . . . . . . . . 12
⊢ (𝑦 = (𝑤 mod 𝑀) → ((𝑦 gcd 𝑀) = 1 ↔ ((𝑤 mod 𝑀) gcd 𝑀) = 1)) |
73 | | phimul.4 |
. . . . . . . . . . . 12
⊢ 𝑈 = {𝑦 ∈ (0..^𝑀) ∣ (𝑦 gcd 𝑀) = 1} |
74 | 72, 73 | elrab2 2889 |
. . . . . . . . . . 11
⊢ ((𝑤 mod 𝑀) ∈ 𝑈 ↔ ((𝑤 mod 𝑀) ∈ (0..^𝑀) ∧ ((𝑤 mod 𝑀) gcd 𝑀) = 1)) |
75 | 38, 70, 74 | sylanbrc 415 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 mod 𝑀) ∈ 𝑈) |
76 | | zmodfzo 10303 |
. . . . . . . . . . . 12
⊢ ((𝑤 ∈ ℤ ∧ 𝑁 ∈ ℕ) → (𝑤 mod 𝑁) ∈ (0..^𝑁)) |
77 | 36, 21, 76 | syl2anc 409 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 mod 𝑁) ∈ (0..^𝑁)) |
78 | | modgcd 11946 |
. . . . . . . . . . . . 13
⊢ ((𝑤 ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝑤 mod 𝑁) gcd 𝑁) = (𝑤 gcd 𝑁)) |
79 | 36, 21, 78 | syl2anc 409 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ((𝑤 mod 𝑁) gcd 𝑁) = (𝑤 gcd 𝑁)) |
80 | | gcddvds 11918 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑤 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((𝑤 gcd 𝑁) ∥ 𝑤 ∧ (𝑤 gcd 𝑁) ∥ 𝑁)) |
81 | 36, 52, 80 | syl2anc 409 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ((𝑤 gcd 𝑁) ∥ 𝑤 ∧ (𝑤 gcd 𝑁) ∥ 𝑁)) |
82 | 81 | simpld 111 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑁) ∥ 𝑤) |
83 | 81 | simprd 113 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑁) ∥ 𝑁) |
84 | | dvdsmul2 11776 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → 𝑁 ∥ (𝑀 · 𝑁)) |
85 | 41, 52, 84 | syl2anc 409 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 𝑁 ∥ (𝑀 · 𝑁)) |
86 | | nnne0 8906 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑁 ∈ ℕ → 𝑁 ≠ 0) |
87 | | simpr 109 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ ((𝑤 = 0 ∧ 𝑁 = 0) → 𝑁 = 0) |
88 | 87 | necon3ai 2389 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (𝑁 ≠ 0 → ¬ (𝑤 = 0 ∧ 𝑁 = 0)) |
89 | 21, 86, 88 | 3syl 17 |
. . . . . . . . . . . . . . . . . . 19
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ¬ (𝑤 = 0 ∧ 𝑁 = 0)) |
90 | | gcdn0cl 11917 |
. . . . . . . . . . . . . . . . . . 19
⊢ (((𝑤 ∈ ℤ ∧ 𝑁 ∈ ℤ) ∧ ¬
(𝑤 = 0 ∧ 𝑁 = 0)) → (𝑤 gcd 𝑁) ∈ ℕ) |
91 | 36, 52, 89, 90 | syl21anc 1232 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑁) ∈ ℕ) |
92 | 91 | nnzd 9333 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑁) ∈ ℤ) |
93 | | dvdstr 11790 |
. . . . . . . . . . . . . . . . 17
⊢ (((𝑤 gcd 𝑁) ∈ ℤ ∧ 𝑁 ∈ ℤ ∧ (𝑀 · 𝑁) ∈ ℤ) → (((𝑤 gcd 𝑁) ∥ 𝑁 ∧ 𝑁 ∥ (𝑀 · 𝑁)) → (𝑤 gcd 𝑁) ∥ (𝑀 · 𝑁))) |
94 | 92, 52, 56, 93 | syl3anc 1233 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (((𝑤 gcd 𝑁) ∥ 𝑁 ∧ 𝑁 ∥ (𝑀 · 𝑁)) → (𝑤 gcd 𝑁) ∥ (𝑀 · 𝑁))) |
95 | 83, 85, 94 | mp2and 431 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑁) ∥ (𝑀 · 𝑁)) |
96 | | dvdslegcd 11919 |
. . . . . . . . . . . . . . . 16
⊢ ((((𝑤 gcd 𝑁) ∈ ℤ ∧ 𝑤 ∈ ℤ ∧ (𝑀 · 𝑁) ∈ ℤ) ∧ ¬ (𝑤 = 0 ∧ (𝑀 · 𝑁) = 0)) → (((𝑤 gcd 𝑁) ∥ 𝑤 ∧ (𝑤 gcd 𝑁) ∥ (𝑀 · 𝑁)) → (𝑤 gcd 𝑁) ≤ (𝑤 gcd (𝑀 · 𝑁)))) |
97 | 92, 36, 56, 60, 96 | syl31anc 1236 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (((𝑤 gcd 𝑁) ∥ 𝑤 ∧ (𝑤 gcd 𝑁) ∥ (𝑀 · 𝑁)) → (𝑤 gcd 𝑁) ≤ (𝑤 gcd (𝑀 · 𝑁)))) |
98 | 82, 95, 97 | mp2and 431 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑁) ≤ (𝑤 gcd (𝑀 · 𝑁))) |
99 | 98, 65 | breqtrd 4015 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑁) ≤ 1) |
100 | | nnle1eq1 8902 |
. . . . . . . . . . . . . 14
⊢ ((𝑤 gcd 𝑁) ∈ ℕ → ((𝑤 gcd 𝑁) ≤ 1 ↔ (𝑤 gcd 𝑁) = 1)) |
101 | 91, 100 | syl 14 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ((𝑤 gcd 𝑁) ≤ 1 ↔ (𝑤 gcd 𝑁) = 1)) |
102 | 99, 101 | mpbid 146 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 gcd 𝑁) = 1) |
103 | 79, 102 | eqtrd 2203 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → ((𝑤 mod 𝑁) gcd 𝑁) = 1) |
104 | | oveq1 5860 |
. . . . . . . . . . . . 13
⊢ (𝑦 = (𝑤 mod 𝑁) → (𝑦 gcd 𝑁) = ((𝑤 mod 𝑁) gcd 𝑁)) |
105 | 104 | eqeq1d 2179 |
. . . . . . . . . . . 12
⊢ (𝑦 = (𝑤 mod 𝑁) → ((𝑦 gcd 𝑁) = 1 ↔ ((𝑤 mod 𝑁) gcd 𝑁) = 1)) |
106 | | phimul.5 |
. . . . . . . . . . . 12
⊢ 𝑉 = {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} |
107 | 105, 106 | elrab2 2889 |
. . . . . . . . . . 11
⊢ ((𝑤 mod 𝑁) ∈ 𝑉 ↔ ((𝑤 mod 𝑁) ∈ (0..^𝑁) ∧ ((𝑤 mod 𝑁) gcd 𝑁) = 1)) |
108 | 77, 103, 107 | sylanbrc 415 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝑤 mod 𝑁) ∈ 𝑉) |
109 | | opelxpi 4643 |
. . . . . . . . . 10
⊢ (((𝑤 mod 𝑀) ∈ 𝑈 ∧ (𝑤 mod 𝑁) ∈ 𝑉) → 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉 ∈ (𝑈 × 𝑉)) |
110 | 75, 108, 109 | syl2anc 409 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉 ∈ (𝑈 × 𝑉)) |
111 | 33, 110 | eqeltrd 2247 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝑤 ∈ 𝑊) → (𝐹‘𝑤) ∈ (𝑈 × 𝑉)) |
112 | 111 | ralrimiva 2543 |
. . . . . . 7
⊢ (𝜑 → ∀𝑤 ∈ 𝑊 (𝐹‘𝑤) ∈ (𝑈 × 𝑉)) |
113 | | crth.2 |
. . . . . . . . . 10
⊢ 𝑇 = ((0..^𝑀) × (0..^𝑁)) |
114 | 8, 113, 31, 13 | crth 12178 |
. . . . . . . . 9
⊢ (𝜑 → 𝐹:𝑆–1-1-onto→𝑇) |
115 | | f1ofn 5443 |
. . . . . . . . 9
⊢ (𝐹:𝑆–1-1-onto→𝑇 → 𝐹 Fn 𝑆) |
116 | | fnfun 5295 |
. . . . . . . . 9
⊢ (𝐹 Fn 𝑆 → Fun 𝐹) |
117 | 114, 115,
116 | 3syl 17 |
. . . . . . . 8
⊢ (𝜑 → Fun 𝐹) |
118 | | ssrab2 3232 |
. . . . . . . . . 10
⊢ {𝑦 ∈ 𝑆 ∣ (𝑦 gcd (𝑀 · 𝑁)) = 1} ⊆ 𝑆 |
119 | 3, 118 | eqsstri 3179 |
. . . . . . . . 9
⊢ 𝑊 ⊆ 𝑆 |
120 | | fndm 5297 |
. . . . . . . . . 10
⊢ (𝐹 Fn 𝑆 → dom 𝐹 = 𝑆) |
121 | 114, 115,
120 | 3syl 17 |
. . . . . . . . 9
⊢ (𝜑 → dom 𝐹 = 𝑆) |
122 | 119, 121 | sseqtrrid 3198 |
. . . . . . . 8
⊢ (𝜑 → 𝑊 ⊆ dom 𝐹) |
123 | | funimass4 5547 |
. . . . . . . 8
⊢ ((Fun
𝐹 ∧ 𝑊 ⊆ dom 𝐹) → ((𝐹 “ 𝑊) ⊆ (𝑈 × 𝑉) ↔ ∀𝑤 ∈ 𝑊 (𝐹‘𝑤) ∈ (𝑈 × 𝑉))) |
124 | 117, 122,
123 | syl2anc 409 |
. . . . . . 7
⊢ (𝜑 → ((𝐹 “ 𝑊) ⊆ (𝑈 × 𝑉) ↔ ∀𝑤 ∈ 𝑊 (𝐹‘𝑤) ∈ (𝑈 × 𝑉))) |
125 | 112, 124 | mpbird 166 |
. . . . . 6
⊢ (𝜑 → (𝐹 “ 𝑊) ⊆ (𝑈 × 𝑉)) |
126 | | ssrab2 3232 |
. . . . . . . . . . . . . 14
⊢ {𝑦 ∈ (0..^𝑀) ∣ (𝑦 gcd 𝑀) = 1} ⊆ (0..^𝑀) |
127 | 73, 126 | eqsstri 3179 |
. . . . . . . . . . . . 13
⊢ 𝑈 ⊆ (0..^𝑀) |
128 | | ssrab2 3232 |
. . . . . . . . . . . . . 14
⊢ {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} ⊆ (0..^𝑁) |
129 | 106, 128 | eqsstri 3179 |
. . . . . . . . . . . . 13
⊢ 𝑉 ⊆ (0..^𝑁) |
130 | | xpss12 4718 |
. . . . . . . . . . . . 13
⊢ ((𝑈 ⊆ (0..^𝑀) ∧ 𝑉 ⊆ (0..^𝑁)) → (𝑈 × 𝑉) ⊆ ((0..^𝑀) × (0..^𝑁))) |
131 | 127, 129,
130 | mp2an 424 |
. . . . . . . . . . . 12
⊢ (𝑈 × 𝑉) ⊆ ((0..^𝑀) × (0..^𝑁)) |
132 | 131, 113 | sseqtrri 3182 |
. . . . . . . . . . 11
⊢ (𝑈 × 𝑉) ⊆ 𝑇 |
133 | 132 | sseli 3143 |
. . . . . . . . . 10
⊢ (𝑧 ∈ (𝑈 × 𝑉) → 𝑧 ∈ 𝑇) |
134 | | f1ocnvfv2 5757 |
. . . . . . . . . 10
⊢ ((𝐹:𝑆–1-1-onto→𝑇 ∧ 𝑧 ∈ 𝑇) → (𝐹‘(◡𝐹‘𝑧)) = 𝑧) |
135 | 114, 133,
134 | syl2an 287 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (𝐹‘(◡𝐹‘𝑧)) = 𝑧) |
136 | | f1ocnv 5455 |
. . . . . . . . . . . . 13
⊢ (𝐹:𝑆–1-1-onto→𝑇 → ◡𝐹:𝑇–1-1-onto→𝑆) |
137 | | f1of 5442 |
. . . . . . . . . . . . 13
⊢ (◡𝐹:𝑇–1-1-onto→𝑆 → ◡𝐹:𝑇⟶𝑆) |
138 | 114, 136,
137 | 3syl 17 |
. . . . . . . . . . . 12
⊢ (𝜑 → ◡𝐹:𝑇⟶𝑆) |
139 | | ffvelrn 5629 |
. . . . . . . . . . . 12
⊢ ((◡𝐹:𝑇⟶𝑆 ∧ 𝑧 ∈ 𝑇) → (◡𝐹‘𝑧) ∈ 𝑆) |
140 | 138, 133,
139 | syl2an 287 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (◡𝐹‘𝑧) ∈ 𝑆) |
141 | 140, 8 | eleqtrdi 2263 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (◡𝐹‘𝑧) ∈ (0..^(𝑀 · 𝑁))) |
142 | | elfzoelz 10103 |
. . . . . . . . . . . . . . 15
⊢ ((◡𝐹‘𝑧) ∈ (0..^(𝑀 · 𝑁)) → (◡𝐹‘𝑧) ∈ ℤ) |
143 | 141, 142 | syl 14 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (◡𝐹‘𝑧) ∈ ℤ) |
144 | 14 | adantr 274 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 𝑀 ∈ ℕ) |
145 | | modgcd 11946 |
. . . . . . . . . . . . . 14
⊢ (((◡𝐹‘𝑧) ∈ ℤ ∧ 𝑀 ∈ ℕ) → (((◡𝐹‘𝑧) mod 𝑀) gcd 𝑀) = ((◡𝐹‘𝑧) gcd 𝑀)) |
146 | 143, 144,
145 | syl2anc 409 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (((◡𝐹‘𝑧) mod 𝑀) gcd 𝑀) = ((◡𝐹‘𝑧) gcd 𝑀)) |
147 | | zq 9585 |
. . . . . . . . . . . . . . . . . . . . . . 23
⊢ ((◡𝐹‘𝑧) ∈ ℤ → (◡𝐹‘𝑧) ∈ ℚ) |
148 | 143, 147 | syl 14 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (◡𝐹‘𝑧) ∈ ℚ) |
149 | 144, 16 | syl 14 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 𝑀 ∈ ℚ) |
150 | 144 | nngt0d 8922 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 0 < 𝑀) |
151 | 148, 149,
150 | modqcld 10284 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → ((◡𝐹‘𝑧) mod 𝑀) ∈ ℚ) |
152 | 20 | adantr 274 |
. . . . . . . . . . . . . . . . . . . . . . 23
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 𝑁 ∈ ℕ) |
153 | 152, 22 | syl 14 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 𝑁 ∈ ℚ) |
154 | 152 | nngt0d 8922 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 0 < 𝑁) |
155 | 148, 153,
154 | modqcld 10284 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → ((◡𝐹‘𝑧) mod 𝑁) ∈ ℚ) |
156 | | opexg 4213 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ ((((◡𝐹‘𝑧) mod 𝑀) ∈ ℚ ∧ ((◡𝐹‘𝑧) mod 𝑁) ∈ ℚ) → 〈((◡𝐹‘𝑧) mod 𝑀), ((◡𝐹‘𝑧) mod 𝑁)〉 ∈ V) |
157 | 151, 155,
156 | syl2anc 409 |
. . . . . . . . . . . . . . . . . . . 20
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 〈((◡𝐹‘𝑧) mod 𝑀), ((◡𝐹‘𝑧) mod 𝑁)〉 ∈ V) |
158 | | oveq1 5860 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ (𝑤 = (◡𝐹‘𝑧) → (𝑤 mod 𝑀) = ((◡𝐹‘𝑧) mod 𝑀)) |
159 | | oveq1 5860 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ (𝑤 = (◡𝐹‘𝑧) → (𝑤 mod 𝑁) = ((◡𝐹‘𝑧) mod 𝑁)) |
160 | 158, 159 | opeq12d 3773 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ (𝑤 = (◡𝐹‘𝑧) → 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉 = 〈((◡𝐹‘𝑧) mod 𝑀), ((◡𝐹‘𝑧) mod 𝑁)〉) |
161 | 30 | cbvmptv 4085 |
. . . . . . . . . . . . . . . . . . . . . 22
⊢ (𝑥 ∈ 𝑆 ↦ 〈(𝑥 mod 𝑀), (𝑥 mod 𝑁)〉) = (𝑤 ∈ 𝑆 ↦ 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉) |
162 | 31, 161 | eqtri 2191 |
. . . . . . . . . . . . . . . . . . . . 21
⊢ 𝐹 = (𝑤 ∈ 𝑆 ↦ 〈(𝑤 mod 𝑀), (𝑤 mod 𝑁)〉) |
163 | 160, 162 | fvmptg 5572 |
. . . . . . . . . . . . . . . . . . . 20
⊢ (((◡𝐹‘𝑧) ∈ 𝑆 ∧ 〈((◡𝐹‘𝑧) mod 𝑀), ((◡𝐹‘𝑧) mod 𝑁)〉 ∈ V) → (𝐹‘(◡𝐹‘𝑧)) = 〈((◡𝐹‘𝑧) mod 𝑀), ((◡𝐹‘𝑧) mod 𝑁)〉) |
164 | 140, 157,
163 | syl2anc 409 |
. . . . . . . . . . . . . . . . . . 19
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (𝐹‘(◡𝐹‘𝑧)) = 〈((◡𝐹‘𝑧) mod 𝑀), ((◡𝐹‘𝑧) mod 𝑁)〉) |
165 | 135, 164 | eqtr3d 2205 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 𝑧 = 〈((◡𝐹‘𝑧) mod 𝑀), ((◡𝐹‘𝑧) mod 𝑁)〉) |
166 | | simpr 109 |
. . . . . . . . . . . . . . . . . 18
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 𝑧 ∈ (𝑈 × 𝑉)) |
167 | 165, 166 | eqeltrrd 2248 |
. . . . . . . . . . . . . . . . 17
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 〈((◡𝐹‘𝑧) mod 𝑀), ((◡𝐹‘𝑧) mod 𝑁)〉 ∈ (𝑈 × 𝑉)) |
168 | | opelxp 4641 |
. . . . . . . . . . . . . . . . 17
⊢
(〈((◡𝐹‘𝑧) mod 𝑀), ((◡𝐹‘𝑧) mod 𝑁)〉 ∈ (𝑈 × 𝑉) ↔ (((◡𝐹‘𝑧) mod 𝑀) ∈ 𝑈 ∧ ((◡𝐹‘𝑧) mod 𝑁) ∈ 𝑉)) |
169 | 167, 168 | sylib 121 |
. . . . . . . . . . . . . . . 16
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (((◡𝐹‘𝑧) mod 𝑀) ∈ 𝑈 ∧ ((◡𝐹‘𝑧) mod 𝑁) ∈ 𝑉)) |
170 | 169 | simpld 111 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → ((◡𝐹‘𝑧) mod 𝑀) ∈ 𝑈) |
171 | | oveq1 5860 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑦 = ((◡𝐹‘𝑧) mod 𝑀) → (𝑦 gcd 𝑀) = (((◡𝐹‘𝑧) mod 𝑀) gcd 𝑀)) |
172 | 171 | eqeq1d 2179 |
. . . . . . . . . . . . . . . 16
⊢ (𝑦 = ((◡𝐹‘𝑧) mod 𝑀) → ((𝑦 gcd 𝑀) = 1 ↔ (((◡𝐹‘𝑧) mod 𝑀) gcd 𝑀) = 1)) |
173 | 172, 73 | elrab2 2889 |
. . . . . . . . . . . . . . 15
⊢ (((◡𝐹‘𝑧) mod 𝑀) ∈ 𝑈 ↔ (((◡𝐹‘𝑧) mod 𝑀) ∈ (0..^𝑀) ∧ (((◡𝐹‘𝑧) mod 𝑀) gcd 𝑀) = 1)) |
174 | 170, 173 | sylib 121 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (((◡𝐹‘𝑧) mod 𝑀) ∈ (0..^𝑀) ∧ (((◡𝐹‘𝑧) mod 𝑀) gcd 𝑀) = 1)) |
175 | 174 | simprd 113 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (((◡𝐹‘𝑧) mod 𝑀) gcd 𝑀) = 1) |
176 | 146, 175 | eqtr3d 2205 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → ((◡𝐹‘𝑧) gcd 𝑀) = 1) |
177 | | modgcd 11946 |
. . . . . . . . . . . . . 14
⊢ (((◡𝐹‘𝑧) ∈ ℤ ∧ 𝑁 ∈ ℕ) → (((◡𝐹‘𝑧) mod 𝑁) gcd 𝑁) = ((◡𝐹‘𝑧) gcd 𝑁)) |
178 | 143, 152,
177 | syl2anc 409 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (((◡𝐹‘𝑧) mod 𝑁) gcd 𝑁) = ((◡𝐹‘𝑧) gcd 𝑁)) |
179 | 169 | simprd 113 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → ((◡𝐹‘𝑧) mod 𝑁) ∈ 𝑉) |
180 | | oveq1 5860 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑦 = ((◡𝐹‘𝑧) mod 𝑁) → (𝑦 gcd 𝑁) = (((◡𝐹‘𝑧) mod 𝑁) gcd 𝑁)) |
181 | 180 | eqeq1d 2179 |
. . . . . . . . . . . . . . . 16
⊢ (𝑦 = ((◡𝐹‘𝑧) mod 𝑁) → ((𝑦 gcd 𝑁) = 1 ↔ (((◡𝐹‘𝑧) mod 𝑁) gcd 𝑁) = 1)) |
182 | 181, 106 | elrab2 2889 |
. . . . . . . . . . . . . . 15
⊢ (((◡𝐹‘𝑧) mod 𝑁) ∈ 𝑉 ↔ (((◡𝐹‘𝑧) mod 𝑁) ∈ (0..^𝑁) ∧ (((◡𝐹‘𝑧) mod 𝑁) gcd 𝑁) = 1)) |
183 | 179, 182 | sylib 121 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (((◡𝐹‘𝑧) mod 𝑁) ∈ (0..^𝑁) ∧ (((◡𝐹‘𝑧) mod 𝑁) gcd 𝑁) = 1)) |
184 | 183 | simprd 113 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (((◡𝐹‘𝑧) mod 𝑁) gcd 𝑁) = 1) |
185 | 178, 184 | eqtr3d 2205 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → ((◡𝐹‘𝑧) gcd 𝑁) = 1) |
186 | 14 | nnzd 9333 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → 𝑀 ∈ ℤ) |
187 | 186 | adantr 274 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 𝑀 ∈ ℤ) |
188 | 20 | nnzd 9333 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → 𝑁 ∈ ℤ) |
189 | 188 | adantr 274 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 𝑁 ∈ ℤ) |
190 | | rpmul 12052 |
. . . . . . . . . . . . 13
⊢ (((◡𝐹‘𝑧) ∈ ℤ ∧ 𝑀 ∈ ℤ ∧ 𝑁 ∈ ℤ) → ((((◡𝐹‘𝑧) gcd 𝑀) = 1 ∧ ((◡𝐹‘𝑧) gcd 𝑁) = 1) → ((◡𝐹‘𝑧) gcd (𝑀 · 𝑁)) = 1)) |
191 | 143, 187,
189, 190 | syl3anc 1233 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → ((((◡𝐹‘𝑧) gcd 𝑀) = 1 ∧ ((◡𝐹‘𝑧) gcd 𝑁) = 1) → ((◡𝐹‘𝑧) gcd (𝑀 · 𝑁)) = 1)) |
192 | 176, 185,
191 | mp2and 431 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → ((◡𝐹‘𝑧) gcd (𝑀 · 𝑁)) = 1) |
193 | | oveq1 5860 |
. . . . . . . . . . . . 13
⊢ (𝑦 = (◡𝐹‘𝑧) → (𝑦 gcd (𝑀 · 𝑁)) = ((◡𝐹‘𝑧) gcd (𝑀 · 𝑁))) |
194 | 193 | eqeq1d 2179 |
. . . . . . . . . . . 12
⊢ (𝑦 = (◡𝐹‘𝑧) → ((𝑦 gcd (𝑀 · 𝑁)) = 1 ↔ ((◡𝐹‘𝑧) gcd (𝑀 · 𝑁)) = 1)) |
195 | 194, 3 | elrab2 2889 |
. . . . . . . . . . 11
⊢ ((◡𝐹‘𝑧) ∈ 𝑊 ↔ ((◡𝐹‘𝑧) ∈ 𝑆 ∧ ((◡𝐹‘𝑧) gcd (𝑀 · 𝑁)) = 1)) |
196 | 140, 192,
195 | sylanbrc 415 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (◡𝐹‘𝑧) ∈ 𝑊) |
197 | | funfvima2 5728 |
. . . . . . . . . . . 12
⊢ ((Fun
𝐹 ∧ 𝑊 ⊆ dom 𝐹) → ((◡𝐹‘𝑧) ∈ 𝑊 → (𝐹‘(◡𝐹‘𝑧)) ∈ (𝐹 “ 𝑊))) |
198 | 117, 122,
197 | syl2anc 409 |
. . . . . . . . . . 11
⊢ (𝜑 → ((◡𝐹‘𝑧) ∈ 𝑊 → (𝐹‘(◡𝐹‘𝑧)) ∈ (𝐹 “ 𝑊))) |
199 | 198 | imp 123 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ (◡𝐹‘𝑧) ∈ 𝑊) → (𝐹‘(◡𝐹‘𝑧)) ∈ (𝐹 “ 𝑊)) |
200 | 196, 199 | syldan 280 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → (𝐹‘(◡𝐹‘𝑧)) ∈ (𝐹 “ 𝑊)) |
201 | 135, 200 | eqeltrrd 2248 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝑧 ∈ (𝑈 × 𝑉)) → 𝑧 ∈ (𝐹 “ 𝑊)) |
202 | 201 | ex 114 |
. . . . . . 7
⊢ (𝜑 → (𝑧 ∈ (𝑈 × 𝑉) → 𝑧 ∈ (𝐹 “ 𝑊))) |
203 | 202 | ssrdv 3153 |
. . . . . 6
⊢ (𝜑 → (𝑈 × 𝑉) ⊆ (𝐹 “ 𝑊)) |
204 | 125, 203 | eqssd 3164 |
. . . . 5
⊢ (𝜑 → (𝐹 “ 𝑊) = (𝑈 × 𝑉)) |
205 | | f1of1 5441 |
. . . . . . 7
⊢ (𝐹:𝑆–1-1-onto→𝑇 → 𝐹:𝑆–1-1→𝑇) |
206 | 114, 205 | syl 14 |
. . . . . 6
⊢ (𝜑 → 𝐹:𝑆–1-1→𝑇) |
207 | 119 | a1i 9 |
. . . . . 6
⊢ (𝜑 → 𝑊 ⊆ 𝑆) |
208 | | 0z 9223 |
. . . . . . . . . 10
⊢ 0 ∈
ℤ |
209 | 186, 188 | zmulcld 9340 |
. . . . . . . . . 10
⊢ (𝜑 → (𝑀 · 𝑁) ∈ ℤ) |
210 | | fzofig 10388 |
. . . . . . . . . 10
⊢ ((0
∈ ℤ ∧ (𝑀
· 𝑁) ∈ ℤ)
→ (0..^(𝑀 ·
𝑁)) ∈
Fin) |
211 | 208, 209,
210 | sylancr 412 |
. . . . . . . . 9
⊢ (𝜑 → (0..^(𝑀 · 𝑁)) ∈ Fin) |
212 | 8, 211 | eqeltrid 2257 |
. . . . . . . 8
⊢ (𝜑 → 𝑆 ∈ Fin) |
213 | | elfzoelz 10103 |
. . . . . . . . . . . . . 14
⊢ (𝑦 ∈ (0..^(𝑀 · 𝑁)) → 𝑦 ∈ ℤ) |
214 | 213, 8 | eleq2s 2265 |
. . . . . . . . . . . . 13
⊢ (𝑦 ∈ 𝑆 → 𝑦 ∈ ℤ) |
215 | 214 | adantl 275 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑦 ∈ 𝑆) → 𝑦 ∈ ℤ) |
216 | 209 | adantr 274 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑦 ∈ 𝑆) → (𝑀 · 𝑁) ∈ ℤ) |
217 | 215, 216 | gcdcld 11923 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑦 ∈ 𝑆) → (𝑦 gcd (𝑀 · 𝑁)) ∈
ℕ0) |
218 | 217 | nn0zd 9332 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑦 ∈ 𝑆) → (𝑦 gcd (𝑀 · 𝑁)) ∈ ℤ) |
219 | | 1zzd 9239 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑦 ∈ 𝑆) → 1 ∈ ℤ) |
220 | | zdceq 9287 |
. . . . . . . . . 10
⊢ (((𝑦 gcd (𝑀 · 𝑁)) ∈ ℤ ∧ 1 ∈ ℤ)
→ DECID (𝑦 gcd (𝑀 · 𝑁)) = 1) |
221 | 218, 219,
220 | syl2anc 409 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑦 ∈ 𝑆) → DECID (𝑦 gcd (𝑀 · 𝑁)) = 1) |
222 | 221 | ralrimiva 2543 |
. . . . . . . 8
⊢ (𝜑 → ∀𝑦 ∈ 𝑆 DECID (𝑦 gcd (𝑀 · 𝑁)) = 1) |
223 | 212, 222 | ssfirab 6911 |
. . . . . . 7
⊢ (𝜑 → {𝑦 ∈ 𝑆 ∣ (𝑦 gcd (𝑀 · 𝑁)) = 1} ∈ Fin) |
224 | 3, 223 | eqeltrid 2257 |
. . . . . 6
⊢ (𝜑 → 𝑊 ∈ Fin) |
225 | | f1imaeng 6770 |
. . . . . 6
⊢ ((𝐹:𝑆–1-1→𝑇 ∧ 𝑊 ⊆ 𝑆 ∧ 𝑊 ∈ Fin) → (𝐹 “ 𝑊) ≈ 𝑊) |
226 | 206, 207,
224, 225 | syl3anc 1233 |
. . . . 5
⊢ (𝜑 → (𝐹 “ 𝑊) ≈ 𝑊) |
227 | 204, 226 | eqbrtrrd 4013 |
. . . 4
⊢ (𝜑 → (𝑈 × 𝑉) ≈ 𝑊) |
228 | | fzofig 10388 |
. . . . . . . . 9
⊢ ((0
∈ ℤ ∧ 𝑀
∈ ℤ) → (0..^𝑀) ∈ Fin) |
229 | 208, 186,
228 | sylancr 412 |
. . . . . . . 8
⊢ (𝜑 → (0..^𝑀) ∈ Fin) |
230 | | elfzoelz 10103 |
. . . . . . . . . . . . 13
⊢ (𝑦 ∈ (0..^𝑀) → 𝑦 ∈ ℤ) |
231 | 230 | adantl 275 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑀)) → 𝑦 ∈ ℤ) |
232 | 186 | adantr 274 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑀)) → 𝑀 ∈ ℤ) |
233 | 231, 232 | gcdcld 11923 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑀)) → (𝑦 gcd 𝑀) ∈
ℕ0) |
234 | 233 | nn0zd 9332 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑀)) → (𝑦 gcd 𝑀) ∈ ℤ) |
235 | | 1z 9238 |
. . . . . . . . . 10
⊢ 1 ∈
ℤ |
236 | | zdceq 9287 |
. . . . . . . . . 10
⊢ (((𝑦 gcd 𝑀) ∈ ℤ ∧ 1 ∈ ℤ)
→ DECID (𝑦 gcd 𝑀) = 1) |
237 | 234, 235,
236 | sylancl 411 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑀)) → DECID (𝑦 gcd 𝑀) = 1) |
238 | 237 | ralrimiva 2543 |
. . . . . . . 8
⊢ (𝜑 → ∀𝑦 ∈ (0..^𝑀)DECID (𝑦 gcd 𝑀) = 1) |
239 | 229, 238 | ssfirab 6911 |
. . . . . . 7
⊢ (𝜑 → {𝑦 ∈ (0..^𝑀) ∣ (𝑦 gcd 𝑀) = 1} ∈ Fin) |
240 | 73, 239 | eqeltrid 2257 |
. . . . . 6
⊢ (𝜑 → 𝑈 ∈ Fin) |
241 | | fzofig 10388 |
. . . . . . . . 9
⊢ ((0
∈ ℤ ∧ 𝑁
∈ ℤ) → (0..^𝑁) ∈ Fin) |
242 | 208, 188,
241 | sylancr 412 |
. . . . . . . 8
⊢ (𝜑 → (0..^𝑁) ∈ Fin) |
243 | | elfzoelz 10103 |
. . . . . . . . . . . . 13
⊢ (𝑦 ∈ (0..^𝑁) → 𝑦 ∈ ℤ) |
244 | 243 | adantl 275 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑁)) → 𝑦 ∈ ℤ) |
245 | 188 | adantr 274 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑁)) → 𝑁 ∈ ℤ) |
246 | 244, 245 | gcdcld 11923 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑁)) → (𝑦 gcd 𝑁) ∈
ℕ0) |
247 | 246 | nn0zd 9332 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑁)) → (𝑦 gcd 𝑁) ∈ ℤ) |
248 | | 1zzd 9239 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑁)) → 1 ∈ ℤ) |
249 | | zdceq 9287 |
. . . . . . . . . 10
⊢ (((𝑦 gcd 𝑁) ∈ ℤ ∧ 1 ∈ ℤ)
→ DECID (𝑦 gcd 𝑁) = 1) |
250 | 247, 248,
249 | syl2anc 409 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑦 ∈ (0..^𝑁)) → DECID (𝑦 gcd 𝑁) = 1) |
251 | 250 | ralrimiva 2543 |
. . . . . . . 8
⊢ (𝜑 → ∀𝑦 ∈ (0..^𝑁)DECID (𝑦 gcd 𝑁) = 1) |
252 | 242, 251 | ssfirab 6911 |
. . . . . . 7
⊢ (𝜑 → {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} ∈ Fin) |
253 | 106, 252 | eqeltrid 2257 |
. . . . . 6
⊢ (𝜑 → 𝑉 ∈ Fin) |
254 | | xpfi 6907 |
. . . . . 6
⊢ ((𝑈 ∈ Fin ∧ 𝑉 ∈ Fin) → (𝑈 × 𝑉) ∈ Fin) |
255 | 240, 253,
254 | syl2anc 409 |
. . . . 5
⊢ (𝜑 → (𝑈 × 𝑉) ∈ Fin) |
256 | | hashen 10718 |
. . . . 5
⊢ (((𝑈 × 𝑉) ∈ Fin ∧ 𝑊 ∈ Fin) → ((♯‘(𝑈 × 𝑉)) = (♯‘𝑊) ↔ (𝑈 × 𝑉) ≈ 𝑊)) |
257 | 255, 224,
256 | syl2anc 409 |
. . . 4
⊢ (𝜑 → ((♯‘(𝑈 × 𝑉)) = (♯‘𝑊) ↔ (𝑈 × 𝑉) ≈ 𝑊)) |
258 | 227, 257 | mpbird 166 |
. . 3
⊢ (𝜑 → (♯‘(𝑈 × 𝑉)) = (♯‘𝑊)) |
259 | | hashxp 10761 |
. . . 4
⊢ ((𝑈 ∈ Fin ∧ 𝑉 ∈ Fin) →
(♯‘(𝑈 ×
𝑉)) = ((♯‘𝑈) · (♯‘𝑉))) |
260 | 240, 253,
259 | syl2anc 409 |
. . 3
⊢ (𝜑 → (♯‘(𝑈 × 𝑉)) = ((♯‘𝑈) · (♯‘𝑉))) |
261 | 258, 260 | eqtr3d 2205 |
. 2
⊢ (𝜑 → (♯‘𝑊) = ((♯‘𝑈) · (♯‘𝑉))) |
262 | 14, 20 | nnmulcld 8927 |
. . 3
⊢ (𝜑 → (𝑀 · 𝑁) ∈ ℕ) |
263 | | dfphi2 12174 |
. . . 4
⊢ ((𝑀 · 𝑁) ∈ ℕ → (ϕ‘(𝑀 · 𝑁)) = (♯‘{𝑦 ∈ (0..^(𝑀 · 𝑁)) ∣ (𝑦 gcd (𝑀 · 𝑁)) = 1})) |
264 | 8 | rabeqi 2723 |
. . . . . 6
⊢ {𝑦 ∈ 𝑆 ∣ (𝑦 gcd (𝑀 · 𝑁)) = 1} = {𝑦 ∈ (0..^(𝑀 · 𝑁)) ∣ (𝑦 gcd (𝑀 · 𝑁)) = 1} |
265 | 3, 264 | eqtri 2191 |
. . . . 5
⊢ 𝑊 = {𝑦 ∈ (0..^(𝑀 · 𝑁)) ∣ (𝑦 gcd (𝑀 · 𝑁)) = 1} |
266 | 265 | fveq2i 5499 |
. . . 4
⊢
(♯‘𝑊) =
(♯‘{𝑦 ∈
(0..^(𝑀 · 𝑁)) ∣ (𝑦 gcd (𝑀 · 𝑁)) = 1}) |
267 | 263, 266 | eqtr4di 2221 |
. . 3
⊢ ((𝑀 · 𝑁) ∈ ℕ → (ϕ‘(𝑀 · 𝑁)) = (♯‘𝑊)) |
268 | 262, 267 | syl 14 |
. 2
⊢ (𝜑 → (ϕ‘(𝑀 · 𝑁)) = (♯‘𝑊)) |
269 | | dfphi2 12174 |
. . . . 5
⊢ (𝑀 ∈ ℕ →
(ϕ‘𝑀) =
(♯‘{𝑦 ∈
(0..^𝑀) ∣ (𝑦 gcd 𝑀) = 1})) |
270 | 73 | fveq2i 5499 |
. . . . 5
⊢
(♯‘𝑈) =
(♯‘{𝑦 ∈
(0..^𝑀) ∣ (𝑦 gcd 𝑀) = 1}) |
271 | 269, 270 | eqtr4di 2221 |
. . . 4
⊢ (𝑀 ∈ ℕ →
(ϕ‘𝑀) =
(♯‘𝑈)) |
272 | 14, 271 | syl 14 |
. . 3
⊢ (𝜑 → (ϕ‘𝑀) = (♯‘𝑈)) |
273 | | dfphi2 12174 |
. . . . 5
⊢ (𝑁 ∈ ℕ →
(ϕ‘𝑁) =
(♯‘{𝑦 ∈
(0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1})) |
274 | 106 | fveq2i 5499 |
. . . . 5
⊢
(♯‘𝑉) =
(♯‘{𝑦 ∈
(0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1}) |
275 | 273, 274 | eqtr4di 2221 |
. . . 4
⊢ (𝑁 ∈ ℕ →
(ϕ‘𝑁) =
(♯‘𝑉)) |
276 | 20, 275 | syl 14 |
. . 3
⊢ (𝜑 → (ϕ‘𝑁) = (♯‘𝑉)) |
277 | 272, 276 | oveq12d 5871 |
. 2
⊢ (𝜑 → ((ϕ‘𝑀) · (ϕ‘𝑁)) = ((♯‘𝑈) · (♯‘𝑉))) |
278 | 261, 268,
277 | 3eqtr4d 2213 |
1
⊢ (𝜑 → (ϕ‘(𝑀 · 𝑁)) = ((ϕ‘𝑀) · (ϕ‘𝑁))) |