ILE Home Intuitionistic Logic Explorer < Previous   Next >
Nearby theorems
Mirrors  >  Home  >  ILE Home  >  Th. List  >  eulerthlemh GIF version

Theorem eulerthlemh 12172
Description: Lemma for eulerth 12174. A permutation of (1...(ϕ‘𝑁)). (Contributed by Mario Carneiro, 28-Feb-2014.) (Revised by Jim Kingdon, 5-Sep-2024.)
Hypotheses
Ref Expression
eulerth.1 (𝜑 → (𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1))
eulerth.2 𝑆 = {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1}
eulerth.4 (𝜑𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆)
eulerth.h 𝐻 = (𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)))
Assertion
Ref Expression
eulerthlemh (𝜑𝐻:(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁)))
Distinct variable groups:   𝑦,𝐴   𝑦,𝐹   𝑦,𝑁   𝜑,𝑦
Allowed substitution hints:   𝑆(𝑦)   𝐻(𝑦)

Proof of Theorem eulerthlemh
Dummy variables 𝑎 𝑏 𝑢 𝑣 are mutually distinct and distinct from all other variables.
StepHypRef Expression
1 eulerth.4 . . . 4 (𝜑𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆)
2 f1ocnv 5453 . . . 4 (𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆𝐹:𝑆1-1-onto→(1...(ϕ‘𝑁)))
31, 2syl 14 . . 3 (𝜑𝐹:𝑆1-1-onto→(1...(ϕ‘𝑁)))
4 eulerth.1 . . . . . . 7 (𝜑 → (𝑁 ∈ ℕ ∧ 𝐴 ∈ ℤ ∧ (𝐴 gcd 𝑁) = 1))
5 eulerth.2 . . . . . . 7 𝑆 = {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1}
6 eqid 2170 . . . . . . 7 (1...(ϕ‘𝑁)) = (1...(ϕ‘𝑁))
7 fveq2 5494 . . . . . . . . . 10 (𝑎 = 𝑏 → (𝐹𝑎) = (𝐹𝑏))
87oveq2d 5866 . . . . . . . . 9 (𝑎 = 𝑏 → (𝐴 · (𝐹𝑎)) = (𝐴 · (𝐹𝑏)))
98oveq1d 5865 . . . . . . . 8 (𝑎 = 𝑏 → ((𝐴 · (𝐹𝑎)) mod 𝑁) = ((𝐴 · (𝐹𝑏)) mod 𝑁))
109cbvmptv 4083 . . . . . . 7 (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)) = (𝑏 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑏)) mod 𝑁))
114, 5, 6, 1, 10eulerthlem1 12168 . . . . . 6 (𝜑 → (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
12 fveq2 5494 . . . . . . . . . 10 (𝑎 = 𝑦 → (𝐹𝑎) = (𝐹𝑦))
1312oveq2d 5866 . . . . . . . . 9 (𝑎 = 𝑦 → (𝐴 · (𝐹𝑎)) = (𝐴 · (𝐹𝑦)))
1413oveq1d 5865 . . . . . . . 8 (𝑎 = 𝑦 → ((𝐴 · (𝐹𝑎)) mod 𝑁) = ((𝐴 · (𝐹𝑦)) mod 𝑁))
1514cbvmptv 4083 . . . . . . 7 (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))
1615feq1i 5338 . . . . . 6 ((𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ↔ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
1711, 16sylib 121 . . . . 5 (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
184simp1d 1004 . . . . . . . . . 10 (𝜑𝑁 ∈ ℕ)
1918adantr 274 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℕ)
204simp2d 1005 . . . . . . . . . . 11 (𝜑𝐴 ∈ ℤ)
2120adantr 274 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐴 ∈ ℤ)
22 ssrab2 3232 . . . . . . . . . . . . 13 {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} ⊆ (0..^𝑁)
235, 22eqsstri 3179 . . . . . . . . . . . 12 𝑆 ⊆ (0..^𝑁)
24 fzo0ssnn0 10158 . . . . . . . . . . . . 13 (0..^𝑁) ⊆ ℕ0
25 nn0ssz 9217 . . . . . . . . . . . . 13 0 ⊆ ℤ
2624, 25sstri 3156 . . . . . . . . . . . 12 (0..^𝑁) ⊆ ℤ
2723, 26sstri 3156 . . . . . . . . . . 11 𝑆 ⊆ ℤ
28 f1of 5440 . . . . . . . . . . . . . 14 (𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆𝐹:(1...(ϕ‘𝑁))⟶𝑆)
291, 28syl 14 . . . . . . . . . . . . 13 (𝜑𝐹:(1...(ϕ‘𝑁))⟶𝑆)
3029adantr 274 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐹:(1...(ϕ‘𝑁))⟶𝑆)
31 simprl 526 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑢 ∈ (1...(ϕ‘𝑁)))
3230, 31ffvelrnd 5629 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ 𝑆)
3327, 32sselid 3145 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℤ)
3421, 33zmulcld 9327 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · (𝐹𝑢)) ∈ ℤ)
3529ffvelrnda 5628 . . . . . . . . . . . 12 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ 𝑆)
3635adantrl 475 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ 𝑆)
3727, 36sselid 3145 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℤ)
3821, 37zmulcld 9327 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · (𝐹𝑣)) ∈ ℤ)
39 moddvds 11748 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ (𝐴 · (𝐹𝑢)) ∈ ℤ ∧ (𝐴 · (𝐹𝑣)) ∈ ℤ) → (((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
4019, 34, 38, 39syl3anc 1233 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
41 eqid 2170 . . . . . . . . . 10 (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))
42 fveq2 5494 . . . . . . . . . . . 12 (𝑦 = 𝑢 → (𝐹𝑦) = (𝐹𝑢))
4342oveq2d 5866 . . . . . . . . . . 11 (𝑦 = 𝑢 → (𝐴 · (𝐹𝑦)) = (𝐴 · (𝐹𝑢)))
4443oveq1d 5865 . . . . . . . . . 10 (𝑦 = 𝑢 → ((𝐴 · (𝐹𝑦)) mod 𝑁) = ((𝐴 · (𝐹𝑢)) mod 𝑁))
45 zmodfzo 10290 . . . . . . . . . . 11 (((𝐴 · (𝐹𝑢)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹𝑢)) mod 𝑁) ∈ (0..^𝑁))
4634, 19, 45syl2anc 409 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐴 · (𝐹𝑢)) mod 𝑁) ∈ (0..^𝑁))
4741, 44, 31, 46fvmptd3 5587 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝐴 · (𝐹𝑢)) mod 𝑁))
48 fveq2 5494 . . . . . . . . . . . 12 (𝑦 = 𝑣 → (𝐹𝑦) = (𝐹𝑣))
4948oveq2d 5866 . . . . . . . . . . 11 (𝑦 = 𝑣 → (𝐴 · (𝐹𝑦)) = (𝐴 · (𝐹𝑣)))
5049oveq1d 5865 . . . . . . . . . 10 (𝑦 = 𝑣 → ((𝐴 · (𝐹𝑦)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁))
51 simprr 527 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑣 ∈ (1...(ϕ‘𝑁)))
52 zmodfzo 10290 . . . . . . . . . . 11 (((𝐴 · (𝐹𝑣)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹𝑣)) mod 𝑁) ∈ (0..^𝑁))
5338, 19, 52syl2anc 409 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐴 · (𝐹𝑣)) mod 𝑁) ∈ (0..^𝑁))
5441, 50, 51, 53fvmptd3 5587 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) = ((𝐴 · (𝐹𝑣)) mod 𝑁))
5547, 54eqeq12d 2185 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) ↔ ((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁)))
5621zcnd 9322 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐴 ∈ ℂ)
5733zcnd 9322 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℂ)
5837zcnd 9322 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℂ)
5956, 57, 58subdid 8320 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) = ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣))))
6059breq2d 3999 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
6140, 55, 603bitr4d 219 . . . . . . 7 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) ↔ 𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣)))))
6218nnzd 9320 . . . . . . . . . . 11 (𝜑𝑁 ∈ ℤ)
6362, 20gcdcomd 11916 . . . . . . . . . 10 (𝜑 → (𝑁 gcd 𝐴) = (𝐴 gcd 𝑁))
644simp3d 1006 . . . . . . . . . 10 (𝜑 → (𝐴 gcd 𝑁) = 1)
6563, 64eqtrd 2203 . . . . . . . . 9 (𝜑 → (𝑁 gcd 𝐴) = 1)
6665adantr 274 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 gcd 𝐴) = 1)
6762adantr 274 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℤ)
6833, 37zsubcld 9326 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) − (𝐹𝑣)) ∈ ℤ)
69 coprmdvds 12033 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ ((𝐹𝑢) − (𝐹𝑣)) ∈ ℤ) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
7067, 21, 68, 69syl3anc 1233 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
71 zq 9572 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ ℤ → (𝐹𝑢) ∈ ℚ)
7233, 71syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℚ)
73 zq 9572 . . . . . . . . . . . . . 14 (𝑁 ∈ ℤ → 𝑁 ∈ ℚ)
7462, 73syl 14 . . . . . . . . . . . . 13 (𝜑𝑁 ∈ ℚ)
7574adantr 274 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℚ)
7623, 32sselid 3145 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ (0..^𝑁))
77 elfzole1 10098 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ (0..^𝑁) → 0 ≤ (𝐹𝑢))
7876, 77syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 0 ≤ (𝐹𝑢))
79 elfzolt2 10099 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ (0..^𝑁) → (𝐹𝑢) < 𝑁)
8076, 79syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) < 𝑁)
81 modqid 10292 . . . . . . . . . . . 12 ((((𝐹𝑢) ∈ ℚ ∧ 𝑁 ∈ ℚ) ∧ (0 ≤ (𝐹𝑢) ∧ (𝐹𝑢) < 𝑁)) → ((𝐹𝑢) mod 𝑁) = (𝐹𝑢))
8272, 75, 78, 80, 81syl22anc 1234 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) mod 𝑁) = (𝐹𝑢))
8327, 35sselid 3145 . . . . . . . . . . . . . 14 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ ℤ)
8483adantrl 475 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℤ)
85 zq 9572 . . . . . . . . . . . . 13 ((𝐹𝑣) ∈ ℤ → (𝐹𝑣) ∈ ℚ)
8684, 85syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℚ)
8723, 35sselid 3145 . . . . . . . . . . . . . 14 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ (0..^𝑁))
88 elfzole1 10098 . . . . . . . . . . . . . 14 ((𝐹𝑣) ∈ (0..^𝑁) → 0 ≤ (𝐹𝑣))
8987, 88syl 14 . . . . . . . . . . . . 13 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → 0 ≤ (𝐹𝑣))
9089adantrl 475 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 0 ≤ (𝐹𝑣))
9187adantrl 475 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ (0..^𝑁))
92 elfzolt2 10099 . . . . . . . . . . . . 13 ((𝐹𝑣) ∈ (0..^𝑁) → (𝐹𝑣) < 𝑁)
9391, 92syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) < 𝑁)
94 modqid 10292 . . . . . . . . . . . 12 ((((𝐹𝑣) ∈ ℚ ∧ 𝑁 ∈ ℚ) ∧ (0 ≤ (𝐹𝑣) ∧ (𝐹𝑣) < 𝑁)) → ((𝐹𝑣) mod 𝑁) = (𝐹𝑣))
9586, 75, 90, 93, 94syl22anc 1234 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑣) mod 𝑁) = (𝐹𝑣))
9682, 95eqeq12d 2185 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ (𝐹𝑢) = (𝐹𝑣)))
97 moddvds 11748 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ (𝐹𝑢) ∈ ℤ ∧ (𝐹𝑣) ∈ ℤ) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
9819, 33, 37, 97syl3anc 1233 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
99 f1of1 5439 . . . . . . . . . . . 12 (𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆𝐹:(1...(ϕ‘𝑁))–1-1𝑆)
1001, 99syl 14 . . . . . . . . . . 11 (𝜑𝐹:(1...(ϕ‘𝑁))–1-1𝑆)
101 f1fveq 5748 . . . . . . . . . . 11 ((𝐹:(1...(ϕ‘𝑁))–1-1𝑆 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) = (𝐹𝑣) ↔ 𝑢 = 𝑣))
102100, 101sylan 281 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) = (𝐹𝑣) ↔ 𝑢 = 𝑣))
10396, 98, 1023bitr3d 217 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣)) ↔ 𝑢 = 𝑣))
10470, 103sylibd 148 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑢 = 𝑣))
10566, 104mpan2d 426 . . . . . . 7 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) → 𝑢 = 𝑣))
10661, 105sylbid 149 . . . . . 6 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣))
107106ralrimivva 2552 . . . . 5 (𝜑 → ∀𝑢 ∈ (1...(ϕ‘𝑁))∀𝑣 ∈ (1...(ϕ‘𝑁))(((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣))
108 dff13 5744 . . . . 5 ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1𝑆 ↔ ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ∧ ∀𝑢 ∈ (1...(ϕ‘𝑁))∀𝑣 ∈ (1...(ϕ‘𝑁))(((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣)))
10917, 107, 108sylanbrc 415 . . . 4 (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1𝑆)
110 1zzd 9226 . . . . . . 7 (𝜑 → 1 ∈ ℤ)
11118phicld 12159 . . . . . . . 8 (𝜑 → (ϕ‘𝑁) ∈ ℕ)
112111nnzd 9320 . . . . . . 7 (𝜑 → (ϕ‘𝑁) ∈ ℤ)
113110, 112fzfigd 10374 . . . . . 6 (𝜑 → (1...(ϕ‘𝑁)) ∈ Fin)
114 f1oeng 6731 . . . . . 6 (((1...(ϕ‘𝑁)) ∈ Fin ∧ 𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆) → (1...(ϕ‘𝑁)) ≈ 𝑆)
115113, 1, 114syl2anc 409 . . . . 5 (𝜑 → (1...(ϕ‘𝑁)) ≈ 𝑆)
1164, 5eulerthlemfi 12169 . . . . 5 (𝜑𝑆 ∈ Fin)
117 f1finf1o 6920 . . . . 5 (((1...(ϕ‘𝑁)) ≈ 𝑆𝑆 ∈ Fin) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1𝑆 ↔ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1-onto𝑆))
118115, 116, 117syl2anc 409 . . . 4 (𝜑 → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1𝑆 ↔ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1-onto𝑆))
119109, 118mpbid 146 . . 3 (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1-onto𝑆)
120 f1oco 5463 . . 3 ((𝐹:𝑆1-1-onto→(1...(ϕ‘𝑁)) ∧ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1-onto𝑆) → (𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))):(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁)))
1213, 119, 120syl2anc 409 . 2 (𝜑 → (𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))):(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁)))
122 eulerth.h . . 3 𝐻 = (𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)))
123 f1oeq1 5429 . . 3 (𝐻 = (𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))) → (𝐻:(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁)) ↔ (𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))):(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁))))
124122, 123ax-mp 5 . 2 (𝐻:(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁)) ↔ (𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))):(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁)))
125121, 124sylibr 133 1 (𝜑𝐻:(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁)))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 103  wb 104  w3a 973   = wceq 1348  wcel 2141  wral 2448  {crab 2452   class class class wbr 3987  cmpt 4048  ccnv 4608  ccom 4613  wf 5192  1-1wf1 5193  1-1-ontowf1o 5195  cfv 5196  (class class class)co 5850  cen 6712  Fincfn 6714  0cc0 7761  1c1 7762   · cmul 7766   < clt 7941  cle 7942  cmin 8077  cn 8865  0cn0 9122  cz 9199  cq 9565  ...cfz 9952  ..^cfzo 10085   mod cmo 10265  cdvds 11736   gcd cgcd 11884  ϕcphi 12150
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 105  ax-ia2 106  ax-ia3 107  ax-in1 609  ax-in2 610  ax-io 704  ax-5 1440  ax-7 1441  ax-gen 1442  ax-ie1 1486  ax-ie2 1487  ax-8 1497  ax-10 1498  ax-11 1499  ax-i12 1500  ax-bndl 1502  ax-4 1503  ax-17 1519  ax-i9 1523  ax-ial 1527  ax-i5r 1528  ax-13 2143  ax-14 2144  ax-ext 2152  ax-coll 4102  ax-sep 4105  ax-nul 4113  ax-pow 4158  ax-pr 4192  ax-un 4416  ax-setind 4519  ax-iinf 4570  ax-cnex 7852  ax-resscn 7853  ax-1cn 7854  ax-1re 7855  ax-icn 7856  ax-addcl 7857  ax-addrcl 7858  ax-mulcl 7859  ax-mulrcl 7860  ax-addcom 7861  ax-mulcom 7862  ax-addass 7863  ax-mulass 7864  ax-distr 7865  ax-i2m1 7866  ax-0lt1 7867  ax-1rid 7868  ax-0id 7869  ax-rnegex 7870  ax-precex 7871  ax-cnre 7872  ax-pre-ltirr 7873  ax-pre-ltwlin 7874  ax-pre-lttrn 7875  ax-pre-apti 7876  ax-pre-ltadd 7877  ax-pre-mulgt0 7878  ax-pre-mulext 7879  ax-arch 7880  ax-caucvg 7881
This theorem depends on definitions:  df-bi 116  df-stab 826  df-dc 830  df-3or 974  df-3an 975  df-tru 1351  df-fal 1354  df-nf 1454  df-sb 1756  df-eu 2022  df-mo 2023  df-clab 2157  df-cleq 2163  df-clel 2166  df-nfc 2301  df-ne 2341  df-nel 2436  df-ral 2453  df-rex 2454  df-reu 2455  df-rmo 2456  df-rab 2457  df-v 2732  df-sbc 2956  df-csb 3050  df-dif 3123  df-un 3125  df-in 3127  df-ss 3134  df-nul 3415  df-if 3526  df-pw 3566  df-sn 3587  df-pr 3588  df-op 3590  df-uni 3795  df-int 3830  df-iun 3873  df-br 3988  df-opab 4049  df-mpt 4050  df-tr 4086  df-id 4276  df-po 4279  df-iso 4280  df-iord 4349  df-on 4351  df-ilim 4352  df-suc 4354  df-iom 4573  df-xp 4615  df-rel 4616  df-cnv 4617  df-co 4618  df-dm 4619  df-rn 4620  df-res 4621  df-ima 4622  df-iota 5158  df-fun 5198  df-fn 5199  df-f 5200  df-f1 5201  df-fo 5202  df-f1o 5203  df-fv 5204  df-riota 5806  df-ov 5853  df-oprab 5854  df-mpo 5855  df-1st 6116  df-2nd 6117  df-recs 6281  df-frec 6367  df-1o 6392  df-er 6509  df-en 6715  df-dom 6716  df-fin 6717  df-sup 6957  df-pnf 7943  df-mnf 7944  df-xr 7945  df-ltxr 7946  df-le 7947  df-sub 8079  df-neg 8080  df-reap 8481  df-ap 8488  df-div 8577  df-inn 8866  df-2 8924  df-3 8925  df-4 8926  df-n0 9123  df-z 9200  df-uz 9475  df-q 9566  df-rp 9598  df-fz 9953  df-fzo 10086  df-fl 10213  df-mod 10266  df-seqfrec 10389  df-exp 10463  df-ihash 10697  df-cj 10793  df-re 10794  df-im 10795  df-rsqrt 10949  df-abs 10950  df-dvds 11737  df-gcd 11885  df-phi 12152
This theorem is referenced by:  eulerthlemth  12173
  Copyright terms: Public domain W3C validator