Step | Hyp | Ref
| Expression |
1 | | eulerth.1 |
. . . . . 6
⊢ (𝜑 → (𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1)) |
2 | | eulerth.2 |
. . . . . 6
⊢ 𝑆 = {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} |
3 | | eulerth.4 |
. . . . . 6
⊢ (𝜑 → 𝐹:(1...(ϕ‘𝑁))–1-1-onto→𝑆) |
4 | 1, 2, 3 | eulerthlema 12162 |
. . . . 5
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) mod 𝑁) = (∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) mod 𝑁)) |
5 | 1 | simp1d 999 |
. . . . . 6
⊢ (𝜑 → 𝑁 ∈ ℕ) |
6 | 1 | simp2d 1000 |
. . . . . . . 8
⊢ (𝜑 → 𝐴 ∈ ℤ) |
7 | 5 | phicld 12150 |
. . . . . . . . 9
⊢ (𝜑 → (ϕ‘𝑁) ∈
ℕ) |
8 | 7 | nnnn0d 9167 |
. . . . . . . 8
⊢ (𝜑 → (ϕ‘𝑁) ∈
ℕ0) |
9 | | zexpcl 10470 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℤ ∧
(ϕ‘𝑁) ∈
ℕ0) → (𝐴↑(ϕ‘𝑁)) ∈ ℤ) |
10 | 6, 8, 9 | syl2anc 409 |
. . . . . . 7
⊢ (𝜑 → (𝐴↑(ϕ‘𝑁)) ∈ ℤ) |
11 | | 1zzd 9218 |
. . . . . . . . 9
⊢ (𝜑 → 1 ∈
ℤ) |
12 | 7 | nnzd 9312 |
. . . . . . . . 9
⊢ (𝜑 → (ϕ‘𝑁) ∈
ℤ) |
13 | 11, 12 | fzfigd 10366 |
. . . . . . . 8
⊢ (𝜑 → (1...(ϕ‘𝑁)) ∈ Fin) |
14 | | ssrab2 3227 |
. . . . . . . . . . 11
⊢ {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} ⊆ (0..^𝑁) |
15 | 2, 14 | eqsstri 3174 |
. . . . . . . . . 10
⊢ 𝑆 ⊆ (0..^𝑁) |
16 | | fzo0ssnn0 10150 |
. . . . . . . . . . 11
⊢
(0..^𝑁) ⊆
ℕ0 |
17 | | nn0ssz 9209 |
. . . . . . . . . . 11
⊢
ℕ0 ⊆ ℤ |
18 | 16, 17 | sstri 3151 |
. . . . . . . . . 10
⊢
(0..^𝑁) ⊆
ℤ |
19 | 15, 18 | sstri 3151 |
. . . . . . . . 9
⊢ 𝑆 ⊆
ℤ |
20 | | f1of 5432 |
. . . . . . . . . . 11
⊢ (𝐹:(1...(ϕ‘𝑁))–1-1-onto→𝑆 → 𝐹:(1...(ϕ‘𝑁))⟶𝑆) |
21 | 3, 20 | syl 14 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐹:(1...(ϕ‘𝑁))⟶𝑆) |
22 | 21 | ffvelrnda 5620 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝐹‘𝑥) ∈ 𝑆) |
23 | 19, 22 | sselid 3140 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝐹‘𝑥) ∈ ℤ) |
24 | 13, 23 | fprodzcl 11550 |
. . . . . . 7
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) ∈ ℤ) |
25 | 10, 24 | zmulcld 9319 |
. . . . . 6
⊢ (𝜑 → ((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) ∈ ℤ) |
26 | | fveq2 5486 |
. . . . . . . . 9
⊢ (𝑧 = (◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁)) → (𝐹‘𝑧) = (𝐹‘(◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁)))) |
27 | | eqid 2165 |
. . . . . . . . . 10
⊢ (◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))) = (◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))) |
28 | 1, 2, 3, 27 | eulerthlemh 12163 |
. . . . . . . . 9
⊢ (𝜑 → (◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))):(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁))) |
29 | | eqid 2165 |
. . . . . . . . . . . . 13
⊢
(1...(ϕ‘𝑁)) = (1...(ϕ‘𝑁)) |
30 | | fveq2 5486 |
. . . . . . . . . . . . . . . 16
⊢ (𝑣 = 𝑢 → (𝐹‘𝑣) = (𝐹‘𝑢)) |
31 | 30 | oveq2d 5858 |
. . . . . . . . . . . . . . 15
⊢ (𝑣 = 𝑢 → (𝐴 · (𝐹‘𝑣)) = (𝐴 · (𝐹‘𝑢))) |
32 | 31 | oveq1d 5857 |
. . . . . . . . . . . . . 14
⊢ (𝑣 = 𝑢 → ((𝐴 · (𝐹‘𝑣)) mod 𝑁) = ((𝐴 · (𝐹‘𝑢)) mod 𝑁)) |
33 | 32 | cbvmptv 4078 |
. . . . . . . . . . . . 13
⊢ (𝑣 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑣)) mod 𝑁)) = (𝑢 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑢)) mod 𝑁)) |
34 | 1, 2, 29, 3, 33 | eulerthlem1 12159 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝑣 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑣)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆) |
35 | | fveq2 5486 |
. . . . . . . . . . . . . . . 16
⊢ (𝑣 = 𝑦 → (𝐹‘𝑣) = (𝐹‘𝑦)) |
36 | 35 | oveq2d 5858 |
. . . . . . . . . . . . . . 15
⊢ (𝑣 = 𝑦 → (𝐴 · (𝐹‘𝑣)) = (𝐴 · (𝐹‘𝑦))) |
37 | 36 | oveq1d 5857 |
. . . . . . . . . . . . . 14
⊢ (𝑣 = 𝑦 → ((𝐴 · (𝐹‘𝑣)) mod 𝑁) = ((𝐴 · (𝐹‘𝑦)) mod 𝑁)) |
38 | 37 | cbvmptv 4078 |
. . . . . . . . . . . . 13
⊢ (𝑣 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑣)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)) |
39 | 38 | feq1i 5330 |
. . . . . . . . . . . 12
⊢ ((𝑣 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑣)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ↔ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆) |
40 | 34, 39 | sylib 121 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆) |
41 | | fvco3 5557 |
. . . . . . . . . . 11
⊢ (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)))‘𝑥) = (◡𝐹‘((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))‘𝑥))) |
42 | 40, 41 | sylan 281 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)))‘𝑥) = (◡𝐹‘((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))‘𝑥))) |
43 | | eqid 2165 |
. . . . . . . . . . . 12
⊢ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)) |
44 | | fveq2 5486 |
. . . . . . . . . . . . . 14
⊢ (𝑦 = 𝑥 → (𝐹‘𝑦) = (𝐹‘𝑥)) |
45 | 44 | oveq2d 5858 |
. . . . . . . . . . . . 13
⊢ (𝑦 = 𝑥 → (𝐴 · (𝐹‘𝑦)) = (𝐴 · (𝐹‘𝑥))) |
46 | 45 | oveq1d 5857 |
. . . . . . . . . . . 12
⊢ (𝑦 = 𝑥 → ((𝐴 · (𝐹‘𝑦)) mod 𝑁) = ((𝐴 · (𝐹‘𝑥)) mod 𝑁)) |
47 | | simpr 109 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → 𝑥 ∈ (1...(ϕ‘𝑁))) |
48 | 6 | adantr 274 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → 𝐴 ∈ ℤ) |
49 | 48, 23 | zmulcld 9319 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝐴 · (𝐹‘𝑥)) ∈ ℤ) |
50 | 5 | adantr 274 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → 𝑁 ∈ ℕ) |
51 | | zmodfzo 10282 |
. . . . . . . . . . . . 13
⊢ (((𝐴 · (𝐹‘𝑥)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ (0..^𝑁)) |
52 | 49, 50, 51 | syl2anc 409 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ (0..^𝑁)) |
53 | 43, 46, 47, 52 | fvmptd3 5579 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))‘𝑥) = ((𝐴 · (𝐹‘𝑥)) mod 𝑁)) |
54 | 53 | fveq2d 5490 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (◡𝐹‘((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))‘𝑥)) = (◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁))) |
55 | 42, 54 | eqtrd 2198 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)))‘𝑥) = (◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁))) |
56 | 21 | ffvelrnda 5620 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑧 ∈ (1...(ϕ‘𝑁))) → (𝐹‘𝑧) ∈ 𝑆) |
57 | 19, 56 | sselid 3140 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑧 ∈ (1...(ϕ‘𝑁))) → (𝐹‘𝑧) ∈ ℤ) |
58 | 57 | zcnd 9314 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑧 ∈ (1...(ϕ‘𝑁))) → (𝐹‘𝑧) ∈ ℂ) |
59 | 26, 13, 28, 55, 58 | fprodf1o 11529 |
. . . . . . . 8
⊢ (𝜑 → ∏𝑧 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑧) = ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘(◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁)))) |
60 | 3 | adantr 274 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → 𝐹:(1...(ϕ‘𝑁))–1-1-onto→𝑆) |
61 | | modgcd 11924 |
. . . . . . . . . . . . 13
⊢ (((𝐴 · (𝐹‘𝑥)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁) = ((𝐴 · (𝐹‘𝑥)) gcd 𝑁)) |
62 | 49, 50, 61 | syl2anc 409 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁) = ((𝐴 · (𝐹‘𝑥)) gcd 𝑁)) |
63 | 50 | nnzd 9312 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → 𝑁 ∈ ℤ) |
64 | 63, 49 | gcdcomd 11907 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝑁 gcd (𝐴 · (𝐹‘𝑥))) = ((𝐴 · (𝐹‘𝑥)) gcd 𝑁)) |
65 | 5 | nnzd 9312 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → 𝑁 ∈ ℤ) |
66 | 6, 65 | gcdcomd 11907 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝐴 gcd 𝑁) = (𝑁 gcd 𝐴)) |
67 | 1 | simp3d 1001 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝐴 gcd 𝑁) = 1) |
68 | 66, 67 | eqtr3d 2200 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝑁 gcd 𝐴) = 1) |
69 | 68 | adantr 274 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝑁 gcd 𝐴) = 1) |
70 | 23, 63 | gcdcomd 11907 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((𝐹‘𝑥) gcd 𝑁) = (𝑁 gcd (𝐹‘𝑥))) |
71 | | oveq1 5849 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑦 = (𝐹‘𝑥) → (𝑦 gcd 𝑁) = ((𝐹‘𝑥) gcd 𝑁)) |
72 | 71 | eqeq1d 2174 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑦 = (𝐹‘𝑥) → ((𝑦 gcd 𝑁) = 1 ↔ ((𝐹‘𝑥) gcd 𝑁) = 1)) |
73 | 72, 2 | elrab2 2885 |
. . . . . . . . . . . . . . . 16
⊢ ((𝐹‘𝑥) ∈ 𝑆 ↔ ((𝐹‘𝑥) ∈ (0..^𝑁) ∧ ((𝐹‘𝑥) gcd 𝑁) = 1)) |
74 | 22, 73 | sylib 121 |
. . . . . . . . . . . . . . 15
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((𝐹‘𝑥) ∈ (0..^𝑁) ∧ ((𝐹‘𝑥) gcd 𝑁) = 1)) |
75 | 74 | simprd 113 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((𝐹‘𝑥) gcd 𝑁) = 1) |
76 | 70, 75 | eqtr3d 2200 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝑁 gcd (𝐹‘𝑥)) = 1) |
77 | | rpmul 12030 |
. . . . . . . . . . . . . 14
⊢ ((𝑁 ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ (𝐹‘𝑥) ∈ ℤ) → (((𝑁 gcd 𝐴) = 1 ∧ (𝑁 gcd (𝐹‘𝑥)) = 1) → (𝑁 gcd (𝐴 · (𝐹‘𝑥))) = 1)) |
78 | 63, 48, 23, 77 | syl3anc 1228 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (((𝑁 gcd 𝐴) = 1 ∧ (𝑁 gcd (𝐹‘𝑥)) = 1) → (𝑁 gcd (𝐴 · (𝐹‘𝑥))) = 1)) |
79 | 69, 76, 78 | mp2and 430 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝑁 gcd (𝐴 · (𝐹‘𝑥))) = 1) |
80 | 62, 64, 79 | 3eqtr2d 2204 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁) = 1) |
81 | | oveq1 5849 |
. . . . . . . . . . . . 13
⊢ (𝑦 = ((𝐴 · (𝐹‘𝑥)) mod 𝑁) → (𝑦 gcd 𝑁) = (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁)) |
82 | 81 | eqeq1d 2174 |
. . . . . . . . . . . 12
⊢ (𝑦 = ((𝐴 · (𝐹‘𝑥)) mod 𝑁) → ((𝑦 gcd 𝑁) = 1 ↔ (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁) = 1)) |
83 | 82, 2 | elrab2 2885 |
. . . . . . . . . . 11
⊢ (((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ 𝑆 ↔ (((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ (0..^𝑁) ∧ (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁) = 1)) |
84 | 52, 80, 83 | sylanbrc 414 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ 𝑆) |
85 | | f1ocnvfv2 5746 |
. . . . . . . . . 10
⊢ ((𝐹:(1...(ϕ‘𝑁))–1-1-onto→𝑆 ∧ ((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ 𝑆) → (𝐹‘(◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁))) = ((𝐴 · (𝐹‘𝑥)) mod 𝑁)) |
86 | 60, 84, 85 | syl2anc 409 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝐹‘(◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁))) = ((𝐴 · (𝐹‘𝑥)) mod 𝑁)) |
87 | 86 | prodeq2dv 11507 |
. . . . . . . 8
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘(◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁))) = ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁)) |
88 | 59, 87 | eqtr2d 2199 |
. . . . . . 7
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) = ∏𝑧 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑧)) |
89 | | fveq2 5486 |
. . . . . . . . 9
⊢ (𝑧 = 𝑥 → (𝐹‘𝑧) = (𝐹‘𝑥)) |
90 | 89 | cbvprodv 11500 |
. . . . . . . 8
⊢
∏𝑧 ∈
(1...(ϕ‘𝑁))(𝐹‘𝑧) = ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) |
91 | 90, 24 | eqeltrid 2253 |
. . . . . . 7
⊢ (𝜑 → ∏𝑧 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑧) ∈ ℤ) |
92 | 88, 91 | eqeltrd 2243 |
. . . . . 6
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ ℤ) |
93 | | moddvds 11739 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ ((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) ∈ ℤ ∧ ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ ℤ) → ((((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) mod 𝑁) = (∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) mod 𝑁) ↔ 𝑁 ∥ (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁)))) |
94 | 5, 25, 92, 93 | syl3anc 1228 |
. . . . 5
⊢ (𝜑 → ((((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) mod 𝑁) = (∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) mod 𝑁) ↔ 𝑁 ∥ (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁)))) |
95 | 4, 94 | mpbid 146 |
. . . 4
⊢ (𝜑 → 𝑁 ∥ (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁))) |
96 | 24 | zcnd 9314 |
. . . . . . . 8
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) ∈ ℂ) |
97 | 96 | mulid2d 7917 |
. . . . . . 7
⊢ (𝜑 → (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) |
98 | 90, 88, 97 | 3eqtr4a 2225 |
. . . . . 6
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) = (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥))) |
99 | 98 | oveq2d 5858 |
. . . . 5
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁)) = (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)))) |
100 | 10 | zcnd 9314 |
. . . . . 6
⊢ (𝜑 → (𝐴↑(ϕ‘𝑁)) ∈ ℂ) |
101 | | ax-1cn 7846 |
. . . . . . 7
⊢ 1 ∈
ℂ |
102 | | subdir 8284 |
. . . . . . 7
⊢ (((𝐴↑(ϕ‘𝑁)) ∈ ℂ ∧ 1 ∈
ℂ ∧ ∏𝑥
∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) ∈ ℂ) → (((𝐴↑(ϕ‘𝑁)) − 1) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)))) |
103 | 101, 102 | mp3an2 1315 |
. . . . . 6
⊢ (((𝐴↑(ϕ‘𝑁)) ∈ ℂ ∧
∏𝑥 ∈
(1...(ϕ‘𝑁))(𝐹‘𝑥) ∈ ℂ) → (((𝐴↑(ϕ‘𝑁)) − 1) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)))) |
104 | 100, 96, 103 | syl2anc 409 |
. . . . 5
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) − 1) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)))) |
105 | 10, 11 | zsubcld 9318 |
. . . . . . 7
⊢ (𝜑 → ((𝐴↑(ϕ‘𝑁)) − 1) ∈
ℤ) |
106 | 105 | zcnd 9314 |
. . . . . 6
⊢ (𝜑 → ((𝐴↑(ϕ‘𝑁)) − 1) ∈
ℂ) |
107 | 106, 96 | mulcomd 7920 |
. . . . 5
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) − 1) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = (∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) · ((𝐴↑(ϕ‘𝑁)) − 1))) |
108 | 99, 104, 107 | 3eqtr2d 2204 |
. . . 4
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁)) = (∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) · ((𝐴↑(ϕ‘𝑁)) − 1))) |
109 | 95, 108 | breqtrd 4008 |
. . 3
⊢ (𝜑 → 𝑁 ∥ (∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) · ((𝐴↑(ϕ‘𝑁)) − 1))) |
110 | 1, 2, 3 | eulerthlemrprm 12161 |
. . 3
⊢ (𝜑 → (𝑁 gcd ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = 1) |
111 | | coprmdvds 12024 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧
∏𝑥 ∈
(1...(ϕ‘𝑁))(𝐹‘𝑥) ∈ ℤ ∧ ((𝐴↑(ϕ‘𝑁)) − 1) ∈ ℤ) → ((𝑁 ∥ (∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) · ((𝐴↑(ϕ‘𝑁)) − 1)) ∧ (𝑁 gcd ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = 1) → 𝑁 ∥ ((𝐴↑(ϕ‘𝑁)) − 1))) |
112 | 65, 24, 105, 111 | syl3anc 1228 |
. . 3
⊢ (𝜑 → ((𝑁 ∥ (∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) · ((𝐴↑(ϕ‘𝑁)) − 1)) ∧ (𝑁 gcd ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = 1) → 𝑁 ∥ ((𝐴↑(ϕ‘𝑁)) − 1))) |
113 | 109, 110,
112 | mp2and 430 |
. 2
⊢ (𝜑 → 𝑁 ∥ ((𝐴↑(ϕ‘𝑁)) − 1)) |
114 | | 1z 9217 |
. . . 4
⊢ 1 ∈
ℤ |
115 | | moddvds 11739 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ (𝐴↑(ϕ‘𝑁)) ∈ ℤ ∧ 1 ∈
ℤ) → (((𝐴↑(ϕ‘𝑁)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐴↑(ϕ‘𝑁)) − 1))) |
116 | 114, 115 | mp3an3 1316 |
. . 3
⊢ ((𝑁 ∈ ℕ ∧ (𝐴↑(ϕ‘𝑁)) ∈ ℤ) →
(((𝐴↑(ϕ‘𝑁)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐴↑(ϕ‘𝑁)) − 1))) |
117 | 5, 10, 116 | syl2anc 409 |
. 2
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐴↑(ϕ‘𝑁)) − 1))) |
118 | 113, 117 | mpbird 166 |
1
⊢ (𝜑 → ((𝐴↑(ϕ‘𝑁)) mod 𝑁) = (1 mod 𝑁)) |