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 12184 |
. . . . 5
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) mod 𝑁) = (∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) mod 𝑁)) |
5 | 1 | simp1d 1004 |
. . . . . 6
⊢ (𝜑 → 𝑁 ∈ ℕ) |
6 | 1 | simp2d 1005 |
. . . . . . . 8
⊢ (𝜑 → 𝐴 ∈ ℤ) |
7 | 5 | phicld 12172 |
. . . . . . . . 9
⊢ (𝜑 → (ϕ‘𝑁) ∈
ℕ) |
8 | 7 | nnnn0d 9188 |
. . . . . . . 8
⊢ (𝜑 → (ϕ‘𝑁) ∈
ℕ0) |
9 | | zexpcl 10491 |
. . . . . . . 8
⊢ ((𝐴 ∈ ℤ ∧
(ϕ‘𝑁) ∈
ℕ0) → (𝐴↑(ϕ‘𝑁)) ∈ ℤ) |
10 | 6, 8, 9 | syl2anc 409 |
. . . . . . 7
⊢ (𝜑 → (𝐴↑(ϕ‘𝑁)) ∈ ℤ) |
11 | | 1zzd 9239 |
. . . . . . . . 9
⊢ (𝜑 → 1 ∈
ℤ) |
12 | 7 | nnzd 9333 |
. . . . . . . . 9
⊢ (𝜑 → (ϕ‘𝑁) ∈
ℤ) |
13 | 11, 12 | fzfigd 10387 |
. . . . . . . 8
⊢ (𝜑 → (1...(ϕ‘𝑁)) ∈ Fin) |
14 | | ssrab2 3232 |
. . . . . . . . . . 11
⊢ {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} ⊆ (0..^𝑁) |
15 | 2, 14 | eqsstri 3179 |
. . . . . . . . . 10
⊢ 𝑆 ⊆ (0..^𝑁) |
16 | | fzo0ssnn0 10171 |
. . . . . . . . . . 11
⊢
(0..^𝑁) ⊆
ℕ0 |
17 | | nn0ssz 9230 |
. . . . . . . . . . 11
⊢
ℕ0 ⊆ ℤ |
18 | 16, 17 | sstri 3156 |
. . . . . . . . . 10
⊢
(0..^𝑁) ⊆
ℤ |
19 | 15, 18 | sstri 3156 |
. . . . . . . . 9
⊢ 𝑆 ⊆
ℤ |
20 | | f1of 5442 |
. . . . . . . . . . 11
⊢ (𝐹:(1...(ϕ‘𝑁))–1-1-onto→𝑆 → 𝐹:(1...(ϕ‘𝑁))⟶𝑆) |
21 | 3, 20 | syl 14 |
. . . . . . . . . 10
⊢ (𝜑 → 𝐹:(1...(ϕ‘𝑁))⟶𝑆) |
22 | 21 | ffvelrnda 5631 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝐹‘𝑥) ∈ 𝑆) |
23 | 19, 22 | sselid 3145 |
. . . . . . . 8
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝐹‘𝑥) ∈ ℤ) |
24 | 13, 23 | fprodzcl 11572 |
. . . . . . 7
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) ∈ ℤ) |
25 | 10, 24 | zmulcld 9340 |
. . . . . 6
⊢ (𝜑 → ((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) ∈ ℤ) |
26 | | fveq2 5496 |
. . . . . . . . 9
⊢ (𝑧 = (◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁)) → (𝐹‘𝑧) = (𝐹‘(◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁)))) |
27 | | eqid 2170 |
. . . . . . . . . 10
⊢ (◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))) = (◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))) |
28 | 1, 2, 3, 27 | eulerthlemh 12185 |
. . . . . . . . 9
⊢ (𝜑 → (◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))):(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁))) |
29 | | eqid 2170 |
. . . . . . . . . . . . 13
⊢
(1...(ϕ‘𝑁)) = (1...(ϕ‘𝑁)) |
30 | | fveq2 5496 |
. . . . . . . . . . . . . . . 16
⊢ (𝑣 = 𝑢 → (𝐹‘𝑣) = (𝐹‘𝑢)) |
31 | 30 | oveq2d 5869 |
. . . . . . . . . . . . . . 15
⊢ (𝑣 = 𝑢 → (𝐴 · (𝐹‘𝑣)) = (𝐴 · (𝐹‘𝑢))) |
32 | 31 | oveq1d 5868 |
. . . . . . . . . . . . . 14
⊢ (𝑣 = 𝑢 → ((𝐴 · (𝐹‘𝑣)) mod 𝑁) = ((𝐴 · (𝐹‘𝑢)) mod 𝑁)) |
33 | 32 | cbvmptv 4085 |
. . . . . . . . . . . . 13
⊢ (𝑣 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑣)) mod 𝑁)) = (𝑢 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑢)) mod 𝑁)) |
34 | 1, 2, 29, 3, 33 | eulerthlem1 12181 |
. . . . . . . . . . . 12
⊢ (𝜑 → (𝑣 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑣)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆) |
35 | | fveq2 5496 |
. . . . . . . . . . . . . . . 16
⊢ (𝑣 = 𝑦 → (𝐹‘𝑣) = (𝐹‘𝑦)) |
36 | 35 | oveq2d 5869 |
. . . . . . . . . . . . . . 15
⊢ (𝑣 = 𝑦 → (𝐴 · (𝐹‘𝑣)) = (𝐴 · (𝐹‘𝑦))) |
37 | 36 | oveq1d 5868 |
. . . . . . . . . . . . . 14
⊢ (𝑣 = 𝑦 → ((𝐴 · (𝐹‘𝑣)) mod 𝑁) = ((𝐴 · (𝐹‘𝑦)) mod 𝑁)) |
38 | 37 | cbvmptv 4085 |
. . . . . . . . . . . . 13
⊢ (𝑣 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑣)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)) |
39 | 38 | feq1i 5340 |
. . . . . . . . . . . 12
⊢ ((𝑣 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑣)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ↔ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆) |
40 | 34, 39 | sylib 121 |
. . . . . . . . . . 11
⊢ (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆) |
41 | | fvco3 5567 |
. . . . . . . . . . 11
⊢ (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)))‘𝑥) = (◡𝐹‘((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))‘𝑥))) |
42 | 40, 41 | sylan 281 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)))‘𝑥) = (◡𝐹‘((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))‘𝑥))) |
43 | | eqid 2170 |
. . . . . . . . . . . 12
⊢ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)) |
44 | | fveq2 5496 |
. . . . . . . . . . . . . 14
⊢ (𝑦 = 𝑥 → (𝐹‘𝑦) = (𝐹‘𝑥)) |
45 | 44 | oveq2d 5869 |
. . . . . . . . . . . . 13
⊢ (𝑦 = 𝑥 → (𝐴 · (𝐹‘𝑦)) = (𝐴 · (𝐹‘𝑥))) |
46 | 45 | oveq1d 5868 |
. . . . . . . . . . . 12
⊢ (𝑦 = 𝑥 → ((𝐴 · (𝐹‘𝑦)) mod 𝑁) = ((𝐴 · (𝐹‘𝑥)) mod 𝑁)) |
47 | | simpr 109 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → 𝑥 ∈ (1...(ϕ‘𝑁))) |
48 | 6 | adantr 274 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → 𝐴 ∈ ℤ) |
49 | 48, 23 | zmulcld 9340 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝐴 · (𝐹‘𝑥)) ∈ ℤ) |
50 | 5 | adantr 274 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → 𝑁 ∈ ℕ) |
51 | | zmodfzo 10303 |
. . . . . . . . . . . . 13
⊢ (((𝐴 · (𝐹‘𝑥)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ (0..^𝑁)) |
52 | 49, 50, 51 | syl2anc 409 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ (0..^𝑁)) |
53 | 43, 46, 47, 52 | fvmptd3 5589 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))‘𝑥) = ((𝐴 · (𝐹‘𝑥)) mod 𝑁)) |
54 | 53 | fveq2d 5500 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (◡𝐹‘((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁))‘𝑥)) = (◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁))) |
55 | 42, 54 | eqtrd 2203 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((◡𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹‘𝑦)) mod 𝑁)))‘𝑥) = (◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁))) |
56 | 21 | ffvelrnda 5631 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑧 ∈ (1...(ϕ‘𝑁))) → (𝐹‘𝑧) ∈ 𝑆) |
57 | 19, 56 | sselid 3145 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑧 ∈ (1...(ϕ‘𝑁))) → (𝐹‘𝑧) ∈ ℤ) |
58 | 57 | zcnd 9335 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑧 ∈ (1...(ϕ‘𝑁))) → (𝐹‘𝑧) ∈ ℂ) |
59 | 26, 13, 28, 55, 58 | fprodf1o 11551 |
. . . . . . . 8
⊢ (𝜑 → ∏𝑧 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑧) = ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘(◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁)))) |
60 | 3 | adantr 274 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → 𝐹:(1...(ϕ‘𝑁))–1-1-onto→𝑆) |
61 | | modgcd 11946 |
. . . . . . . . . . . . 13
⊢ (((𝐴 · (𝐹‘𝑥)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁) = ((𝐴 · (𝐹‘𝑥)) gcd 𝑁)) |
62 | 49, 50, 61 | syl2anc 409 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁) = ((𝐴 · (𝐹‘𝑥)) gcd 𝑁)) |
63 | 50 | nnzd 9333 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → 𝑁 ∈ ℤ) |
64 | 63, 49 | gcdcomd 11929 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝑁 gcd (𝐴 · (𝐹‘𝑥))) = ((𝐴 · (𝐹‘𝑥)) gcd 𝑁)) |
65 | 5 | nnzd 9333 |
. . . . . . . . . . . . . . . 16
⊢ (𝜑 → 𝑁 ∈ ℤ) |
66 | 6, 65 | gcdcomd 11929 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝐴 gcd 𝑁) = (𝑁 gcd 𝐴)) |
67 | 1 | simp3d 1006 |
. . . . . . . . . . . . . . 15
⊢ (𝜑 → (𝐴 gcd 𝑁) = 1) |
68 | 66, 67 | eqtr3d 2205 |
. . . . . . . . . . . . . 14
⊢ (𝜑 → (𝑁 gcd 𝐴) = 1) |
69 | 68 | adantr 274 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝑁 gcd 𝐴) = 1) |
70 | 23, 63 | gcdcomd 11929 |
. . . . . . . . . . . . . 14
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((𝐹‘𝑥) gcd 𝑁) = (𝑁 gcd (𝐹‘𝑥))) |
71 | | oveq1 5860 |
. . . . . . . . . . . . . . . . . 18
⊢ (𝑦 = (𝐹‘𝑥) → (𝑦 gcd 𝑁) = ((𝐹‘𝑥) gcd 𝑁)) |
72 | 71 | eqeq1d 2179 |
. . . . . . . . . . . . . . . . 17
⊢ (𝑦 = (𝐹‘𝑥) → ((𝑦 gcd 𝑁) = 1 ↔ ((𝐹‘𝑥) gcd 𝑁) = 1)) |
73 | 72, 2 | elrab2 2889 |
. . . . . . . . . . . . . . . 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 2205 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝑁 gcd (𝐹‘𝑥)) = 1) |
77 | | rpmul 12052 |
. . . . . . . . . . . . . 14
⊢ ((𝑁 ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ (𝐹‘𝑥) ∈ ℤ) → (((𝑁 gcd 𝐴) = 1 ∧ (𝑁 gcd (𝐹‘𝑥)) = 1) → (𝑁 gcd (𝐴 · (𝐹‘𝑥))) = 1)) |
78 | 63, 48, 23, 77 | syl3anc 1233 |
. . . . . . . . . . . . 13
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (((𝑁 gcd 𝐴) = 1 ∧ (𝑁 gcd (𝐹‘𝑥)) = 1) → (𝑁 gcd (𝐴 · (𝐹‘𝑥))) = 1)) |
79 | 69, 76, 78 | mp2and 431 |
. . . . . . . . . . . 12
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝑁 gcd (𝐴 · (𝐹‘𝑥))) = 1) |
80 | 62, 64, 79 | 3eqtr2d 2209 |
. . . . . . . . . . 11
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁) = 1) |
81 | | oveq1 5860 |
. . . . . . . . . . . . 13
⊢ (𝑦 = ((𝐴 · (𝐹‘𝑥)) mod 𝑁) → (𝑦 gcd 𝑁) = (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁)) |
82 | 81 | eqeq1d 2179 |
. . . . . . . . . . . 12
⊢ (𝑦 = ((𝐴 · (𝐹‘𝑥)) mod 𝑁) → ((𝑦 gcd 𝑁) = 1 ↔ (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁) = 1)) |
83 | 82, 2 | elrab2 2889 |
. . . . . . . . . . 11
⊢ (((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ 𝑆 ↔ (((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ (0..^𝑁) ∧ (((𝐴 · (𝐹‘𝑥)) mod 𝑁) gcd 𝑁) = 1)) |
84 | 52, 80, 83 | sylanbrc 415 |
. . . . . . . . . 10
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → ((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ 𝑆) |
85 | | f1ocnvfv2 5757 |
. . . . . . . . . 10
⊢ ((𝐹:(1...(ϕ‘𝑁))–1-1-onto→𝑆 ∧ ((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ 𝑆) → (𝐹‘(◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁))) = ((𝐴 · (𝐹‘𝑥)) mod 𝑁)) |
86 | 60, 84, 85 | syl2anc 409 |
. . . . . . . . 9
⊢ ((𝜑 ∧ 𝑥 ∈ (1...(ϕ‘𝑁))) → (𝐹‘(◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁))) = ((𝐴 · (𝐹‘𝑥)) mod 𝑁)) |
87 | 86 | prodeq2dv 11529 |
. . . . . . . 8
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘(◡𝐹‘((𝐴 · (𝐹‘𝑥)) mod 𝑁))) = ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁)) |
88 | 59, 87 | eqtr2d 2204 |
. . . . . . 7
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) = ∏𝑧 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑧)) |
89 | | fveq2 5496 |
. . . . . . . . 9
⊢ (𝑧 = 𝑥 → (𝐹‘𝑧) = (𝐹‘𝑥)) |
90 | 89 | cbvprodv 11522 |
. . . . . . . 8
⊢
∏𝑧 ∈
(1...(ϕ‘𝑁))(𝐹‘𝑧) = ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) |
91 | 90, 24 | eqeltrid 2257 |
. . . . . . 7
⊢ (𝜑 → ∏𝑧 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑧) ∈ ℤ) |
92 | 88, 91 | eqeltrd 2247 |
. . . . . 6
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ ℤ) |
93 | | moddvds 11761 |
. . . . . 6
⊢ ((𝑁 ∈ ℕ ∧ ((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) ∈ ℤ ∧ ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) ∈ ℤ) → ((((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) mod 𝑁) = (∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) mod 𝑁) ↔ 𝑁 ∥ (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁)))) |
94 | 5, 25, 92, 93 | syl3anc 1233 |
. . . . 5
⊢ (𝜑 → ((((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) mod 𝑁) = (∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) mod 𝑁) ↔ 𝑁 ∥ (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁)))) |
95 | 4, 94 | mpbid 146 |
. . . 4
⊢ (𝜑 → 𝑁 ∥ (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁))) |
96 | 24 | zcnd 9335 |
. . . . . . . 8
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) ∈ ℂ) |
97 | 96 | mulid2d 7938 |
. . . . . . 7
⊢ (𝜑 → (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) |
98 | 90, 88, 97 | 3eqtr4a 2229 |
. . . . . 6
⊢ (𝜑 → ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁) = (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥))) |
99 | 98 | oveq2d 5869 |
. . . . 5
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁)) = (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)))) |
100 | 10 | zcnd 9335 |
. . . . . 6
⊢ (𝜑 → (𝐴↑(ϕ‘𝑁)) ∈ ℂ) |
101 | | ax-1cn 7867 |
. . . . . . 7
⊢ 1 ∈
ℂ |
102 | | subdir 8305 |
. . . . . . 7
⊢ (((𝐴↑(ϕ‘𝑁)) ∈ ℂ ∧ 1 ∈
ℂ ∧ ∏𝑥
∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) ∈ ℂ) → (((𝐴↑(ϕ‘𝑁)) − 1) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)))) |
103 | 101, 102 | mp3an2 1320 |
. . . . . 6
⊢ (((𝐴↑(ϕ‘𝑁)) ∈ ℂ ∧
∏𝑥 ∈
(1...(ϕ‘𝑁))(𝐹‘𝑥) ∈ ℂ) → (((𝐴↑(ϕ‘𝑁)) − 1) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)))) |
104 | 100, 96, 103 | syl2anc 409 |
. . . . 5
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) − 1) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − (1 · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)))) |
105 | 10, 11 | zsubcld 9339 |
. . . . . . 7
⊢ (𝜑 → ((𝐴↑(ϕ‘𝑁)) − 1) ∈
ℤ) |
106 | 105 | zcnd 9335 |
. . . . . 6
⊢ (𝜑 → ((𝐴↑(ϕ‘𝑁)) − 1) ∈
ℂ) |
107 | 106, 96 | mulcomd 7941 |
. . . . 5
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) − 1) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = (∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) · ((𝐴↑(ϕ‘𝑁)) − 1))) |
108 | 99, 104, 107 | 3eqtr2d 2209 |
. . . 4
⊢ (𝜑 → (((𝐴↑(ϕ‘𝑁)) · ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) − ∏𝑥 ∈ (1...(ϕ‘𝑁))((𝐴 · (𝐹‘𝑥)) mod 𝑁)) = (∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) · ((𝐴↑(ϕ‘𝑁)) − 1))) |
109 | 95, 108 | breqtrd 4015 |
. . 3
⊢ (𝜑 → 𝑁 ∥ (∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) · ((𝐴↑(ϕ‘𝑁)) − 1))) |
110 | 1, 2, 3 | eulerthlemrprm 12183 |
. . 3
⊢ (𝜑 → (𝑁 gcd ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = 1) |
111 | | coprmdvds 12046 |
. . . 4
⊢ ((𝑁 ∈ ℤ ∧
∏𝑥 ∈
(1...(ϕ‘𝑁))(𝐹‘𝑥) ∈ ℤ ∧ ((𝐴↑(ϕ‘𝑁)) − 1) ∈ ℤ) → ((𝑁 ∥ (∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) · ((𝐴↑(ϕ‘𝑁)) − 1)) ∧ (𝑁 gcd ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = 1) → 𝑁 ∥ ((𝐴↑(ϕ‘𝑁)) − 1))) |
112 | 65, 24, 105, 111 | syl3anc 1233 |
. . 3
⊢ (𝜑 → ((𝑁 ∥ (∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥) · ((𝐴↑(ϕ‘𝑁)) − 1)) ∧ (𝑁 gcd ∏𝑥 ∈ (1...(ϕ‘𝑁))(𝐹‘𝑥)) = 1) → 𝑁 ∥ ((𝐴↑(ϕ‘𝑁)) − 1))) |
113 | 109, 110,
112 | mp2and 431 |
. 2
⊢ (𝜑 → 𝑁 ∥ ((𝐴↑(ϕ‘𝑁)) − 1)) |
114 | | 1z 9238 |
. . . 4
⊢ 1 ∈
ℤ |
115 | | moddvds 11761 |
. . . 4
⊢ ((𝑁 ∈ ℕ ∧ (𝐴↑(ϕ‘𝑁)) ∈ ℤ ∧ 1 ∈
ℤ) → (((𝐴↑(ϕ‘𝑁)) mod 𝑁) = (1 mod 𝑁) ↔ 𝑁 ∥ ((𝐴↑(ϕ‘𝑁)) − 1))) |
116 | 114, 115 | mp3an3 1321 |
. . 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 𝑁)) |