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

Theorem eulerthlemh 12399
Description: Lemma for eulerth 12401. 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 5517 . . . 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 2196 . . . . . . 7 (1...(ϕ‘𝑁)) = (1...(ϕ‘𝑁))
7 fveq2 5558 . . . . . . . . . 10 (𝑎 = 𝑏 → (𝐹𝑎) = (𝐹𝑏))
87oveq2d 5938 . . . . . . . . 9 (𝑎 = 𝑏 → (𝐴 · (𝐹𝑎)) = (𝐴 · (𝐹𝑏)))
98oveq1d 5937 . . . . . . . 8 (𝑎 = 𝑏 → ((𝐴 · (𝐹𝑎)) mod 𝑁) = ((𝐴 · (𝐹𝑏)) mod 𝑁))
109cbvmptv 4129 . . . . . . 7 (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)) = (𝑏 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑏)) mod 𝑁))
114, 5, 6, 1, 10eulerthlem1 12395 . . . . . 6 (𝜑 → (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
12 fveq2 5558 . . . . . . . . . 10 (𝑎 = 𝑦 → (𝐹𝑎) = (𝐹𝑦))
1312oveq2d 5938 . . . . . . . . 9 (𝑎 = 𝑦 → (𝐴 · (𝐹𝑎)) = (𝐴 · (𝐹𝑦)))
1413oveq1d 5937 . . . . . . . 8 (𝑎 = 𝑦 → ((𝐴 · (𝐹𝑎)) mod 𝑁) = ((𝐴 · (𝐹𝑦)) mod 𝑁))
1514cbvmptv 4129 . . . . . . 7 (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))
1615feq1i 5400 . . . . . 6 ((𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ↔ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
1711, 16sylib 122 . . . . 5 (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
184simp1d 1011 . . . . . . . . . 10 (𝜑𝑁 ∈ ℕ)
1918adantr 276 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℕ)
204simp2d 1012 . . . . . . . . . . 11 (𝜑𝐴 ∈ ℤ)
2120adantr 276 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐴 ∈ ℤ)
22 ssrab2 3268 . . . . . . . . . . . . 13 {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} ⊆ (0..^𝑁)
235, 22eqsstri 3215 . . . . . . . . . . . 12 𝑆 ⊆ (0..^𝑁)
24 fzo0ssnn0 10291 . . . . . . . . . . . . 13 (0..^𝑁) ⊆ ℕ0
25 nn0ssz 9344 . . . . . . . . . . . . 13 0 ⊆ ℤ
2624, 25sstri 3192 . . . . . . . . . . . 12 (0..^𝑁) ⊆ ℤ
2723, 26sstri 3192 . . . . . . . . . . 11 𝑆 ⊆ ℤ
28 f1of 5504 . . . . . . . . . . . . . 14 (𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆𝐹:(1...(ϕ‘𝑁))⟶𝑆)
291, 28syl 14 . . . . . . . . . . . . 13 (𝜑𝐹:(1...(ϕ‘𝑁))⟶𝑆)
3029adantr 276 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐹:(1...(ϕ‘𝑁))⟶𝑆)
31 simprl 529 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑢 ∈ (1...(ϕ‘𝑁)))
3230, 31ffvelcdmd 5698 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ 𝑆)
3327, 32sselid 3181 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℤ)
3421, 33zmulcld 9454 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · (𝐹𝑢)) ∈ ℤ)
3529ffvelcdmda 5697 . . . . . . . . . . . 12 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ 𝑆)
3635adantrl 478 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ 𝑆)
3727, 36sselid 3181 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℤ)
3821, 37zmulcld 9454 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · (𝐹𝑣)) ∈ ℤ)
39 moddvds 11964 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ (𝐴 · (𝐹𝑢)) ∈ ℤ ∧ (𝐴 · (𝐹𝑣)) ∈ ℤ) → (((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
4019, 34, 38, 39syl3anc 1249 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
41 eqid 2196 . . . . . . . . . 10 (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))
42 fveq2 5558 . . . . . . . . . . . 12 (𝑦 = 𝑢 → (𝐹𝑦) = (𝐹𝑢))
4342oveq2d 5938 . . . . . . . . . . 11 (𝑦 = 𝑢 → (𝐴 · (𝐹𝑦)) = (𝐴 · (𝐹𝑢)))
4443oveq1d 5937 . . . . . . . . . 10 (𝑦 = 𝑢 → ((𝐴 · (𝐹𝑦)) mod 𝑁) = ((𝐴 · (𝐹𝑢)) mod 𝑁))
45 zmodfzo 10439 . . . . . . . . . . 11 (((𝐴 · (𝐹𝑢)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹𝑢)) mod 𝑁) ∈ (0..^𝑁))
4634, 19, 45syl2anc 411 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐴 · (𝐹𝑢)) mod 𝑁) ∈ (0..^𝑁))
4741, 44, 31, 46fvmptd3 5655 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝐴 · (𝐹𝑢)) mod 𝑁))
48 fveq2 5558 . . . . . . . . . . . 12 (𝑦 = 𝑣 → (𝐹𝑦) = (𝐹𝑣))
4948oveq2d 5938 . . . . . . . . . . 11 (𝑦 = 𝑣 → (𝐴 · (𝐹𝑦)) = (𝐴 · (𝐹𝑣)))
5049oveq1d 5937 . . . . . . . . . 10 (𝑦 = 𝑣 → ((𝐴 · (𝐹𝑦)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁))
51 simprr 531 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑣 ∈ (1...(ϕ‘𝑁)))
52 zmodfzo 10439 . . . . . . . . . . 11 (((𝐴 · (𝐹𝑣)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹𝑣)) mod 𝑁) ∈ (0..^𝑁))
5338, 19, 52syl2anc 411 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐴 · (𝐹𝑣)) mod 𝑁) ∈ (0..^𝑁))
5441, 50, 51, 53fvmptd3 5655 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) = ((𝐴 · (𝐹𝑣)) mod 𝑁))
5547, 54eqeq12d 2211 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) ↔ ((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁)))
5621zcnd 9449 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐴 ∈ ℂ)
5733zcnd 9449 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℂ)
5837zcnd 9449 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℂ)
5956, 57, 58subdid 8440 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) = ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣))))
6059breq2d 4045 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
6140, 55, 603bitr4d 220 . . . . . . 7 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) ↔ 𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣)))))
6218nnzd 9447 . . . . . . . . . . 11 (𝜑𝑁 ∈ ℤ)
6362, 20gcdcomd 12141 . . . . . . . . . 10 (𝜑 → (𝑁 gcd 𝐴) = (𝐴 gcd 𝑁))
644simp3d 1013 . . . . . . . . . 10 (𝜑 → (𝐴 gcd 𝑁) = 1)
6563, 64eqtrd 2229 . . . . . . . . 9 (𝜑 → (𝑁 gcd 𝐴) = 1)
6665adantr 276 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 gcd 𝐴) = 1)
6762adantr 276 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℤ)
6833, 37zsubcld 9453 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) − (𝐹𝑣)) ∈ ℤ)
69 coprmdvds 12260 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ ((𝐹𝑢) − (𝐹𝑣)) ∈ ℤ) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
7067, 21, 68, 69syl3anc 1249 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
71 zq 9700 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ ℤ → (𝐹𝑢) ∈ ℚ)
7233, 71syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℚ)
73 zq 9700 . . . . . . . . . . . . . 14 (𝑁 ∈ ℤ → 𝑁 ∈ ℚ)
7462, 73syl 14 . . . . . . . . . . . . 13 (𝜑𝑁 ∈ ℚ)
7574adantr 276 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℚ)
7623, 32sselid 3181 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ (0..^𝑁))
77 elfzole1 10231 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ (0..^𝑁) → 0 ≤ (𝐹𝑢))
7876, 77syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 0 ≤ (𝐹𝑢))
79 elfzolt2 10232 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ (0..^𝑁) → (𝐹𝑢) < 𝑁)
8076, 79syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) < 𝑁)
81 modqid 10441 . . . . . . . . . . . 12 ((((𝐹𝑢) ∈ ℚ ∧ 𝑁 ∈ ℚ) ∧ (0 ≤ (𝐹𝑢) ∧ (𝐹𝑢) < 𝑁)) → ((𝐹𝑢) mod 𝑁) = (𝐹𝑢))
8272, 75, 78, 80, 81syl22anc 1250 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) mod 𝑁) = (𝐹𝑢))
8327, 35sselid 3181 . . . . . . . . . . . . . 14 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ ℤ)
8483adantrl 478 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℤ)
85 zq 9700 . . . . . . . . . . . . 13 ((𝐹𝑣) ∈ ℤ → (𝐹𝑣) ∈ ℚ)
8684, 85syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℚ)
8723, 35sselid 3181 . . . . . . . . . . . . . 14 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ (0..^𝑁))
88 elfzole1 10231 . . . . . . . . . . . . . 14 ((𝐹𝑣) ∈ (0..^𝑁) → 0 ≤ (𝐹𝑣))
8987, 88syl 14 . . . . . . . . . . . . 13 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → 0 ≤ (𝐹𝑣))
9089adantrl 478 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 0 ≤ (𝐹𝑣))
9187adantrl 478 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ (0..^𝑁))
92 elfzolt2 10232 . . . . . . . . . . . . 13 ((𝐹𝑣) ∈ (0..^𝑁) → (𝐹𝑣) < 𝑁)
9391, 92syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) < 𝑁)
94 modqid 10441 . . . . . . . . . . . 12 ((((𝐹𝑣) ∈ ℚ ∧ 𝑁 ∈ ℚ) ∧ (0 ≤ (𝐹𝑣) ∧ (𝐹𝑣) < 𝑁)) → ((𝐹𝑣) mod 𝑁) = (𝐹𝑣))
9586, 75, 90, 93, 94syl22anc 1250 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑣) mod 𝑁) = (𝐹𝑣))
9682, 95eqeq12d 2211 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ (𝐹𝑢) = (𝐹𝑣)))
97 moddvds 11964 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ (𝐹𝑢) ∈ ℤ ∧ (𝐹𝑣) ∈ ℤ) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
9819, 33, 37, 97syl3anc 1249 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
99 f1of1 5503 . . . . . . . . . . . 12 (𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆𝐹:(1...(ϕ‘𝑁))–1-1𝑆)
1001, 99syl 14 . . . . . . . . . . 11 (𝜑𝐹:(1...(ϕ‘𝑁))–1-1𝑆)
101 f1fveq 5819 . . . . . . . . . . 11 ((𝐹:(1...(ϕ‘𝑁))–1-1𝑆 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) = (𝐹𝑣) ↔ 𝑢 = 𝑣))
102100, 101sylan 283 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) = (𝐹𝑣) ↔ 𝑢 = 𝑣))
10396, 98, 1023bitr3d 218 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣)) ↔ 𝑢 = 𝑣))
10470, 103sylibd 149 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑢 = 𝑣))
10566, 104mpan2d 428 . . . . . . 7 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) → 𝑢 = 𝑣))
10661, 105sylbid 150 . . . . . 6 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣))
107106ralrimivva 2579 . . . . 5 (𝜑 → ∀𝑢 ∈ (1...(ϕ‘𝑁))∀𝑣 ∈ (1...(ϕ‘𝑁))(((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣))
108 dff13 5815 . . . . 5 ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1𝑆 ↔ ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ∧ ∀𝑢 ∈ (1...(ϕ‘𝑁))∀𝑣 ∈ (1...(ϕ‘𝑁))(((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣)))
10917, 107, 108sylanbrc 417 . . . 4 (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1𝑆)
110 1zzd 9353 . . . . . . 7 (𝜑 → 1 ∈ ℤ)
11118phicld 12386 . . . . . . . 8 (𝜑 → (ϕ‘𝑁) ∈ ℕ)
112111nnzd 9447 . . . . . . 7 (𝜑 → (ϕ‘𝑁) ∈ ℤ)
113110, 112fzfigd 10523 . . . . . 6 (𝜑 → (1...(ϕ‘𝑁)) ∈ Fin)
114 f1oeng 6816 . . . . . 6 (((1...(ϕ‘𝑁)) ∈ Fin ∧ 𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆) → (1...(ϕ‘𝑁)) ≈ 𝑆)
115113, 1, 114syl2anc 411 . . . . 5 (𝜑 → (1...(ϕ‘𝑁)) ≈ 𝑆)
1164, 5eulerthlemfi 12396 . . . . 5 (𝜑𝑆 ∈ Fin)
117 f1finf1o 7013 . . . . 5 (((1...(ϕ‘𝑁)) ≈ 𝑆𝑆 ∈ Fin) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1𝑆 ↔ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1-onto𝑆))
118115, 116, 117syl2anc 411 . . . 4 (𝜑 → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1𝑆 ↔ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1-onto𝑆))
119109, 118mpbid 147 . . 3 (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1-onto𝑆)
120 f1oco 5527 . . 3 ((𝐹:𝑆1-1-onto→(1...(ϕ‘𝑁)) ∧ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1-onto𝑆) → (𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))):(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁)))
1213, 119, 120syl2anc 411 . 2 (𝜑 → (𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))):(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁)))
122 eulerth.h . . 3 𝐻 = (𝐹 ∘ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)))
123 f1oeq1 5492 . . 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 134 1 (𝜑𝐻:(1...(ϕ‘𝑁))–1-1-onto→(1...(ϕ‘𝑁)))
Colors of variables: wff set class
Syntax hints:  wi 4  wa 104  wb 105  w3a 980   = wceq 1364  wcel 2167  wral 2475  {crab 2479   class class class wbr 4033  cmpt 4094  ccnv 4662  ccom 4667  wf 5254  1-1wf1 5255  1-1-ontowf1o 5257  cfv 5258  (class class class)co 5922  cen 6797  Fincfn 6799  0cc0 7879  1c1 7880   · cmul 7884   < clt 8061  cle 8062  cmin 8197  cn 8990  0cn0 9249  cz 9326  cq 9693  ...cfz 10083  ..^cfzo 10217   mod cmo 10414  cdvds 11952   gcd cgcd 12120  ϕcphi 12377
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-ia1 106  ax-ia2 107  ax-ia3 108  ax-in1 615  ax-in2 616  ax-io 710  ax-5 1461  ax-7 1462  ax-gen 1463  ax-ie1 1507  ax-ie2 1508  ax-8 1518  ax-10 1519  ax-11 1520  ax-i12 1521  ax-bndl 1523  ax-4 1524  ax-17 1540  ax-i9 1544  ax-ial 1548  ax-i5r 1549  ax-13 2169  ax-14 2170  ax-ext 2178  ax-coll 4148  ax-sep 4151  ax-nul 4159  ax-pow 4207  ax-pr 4242  ax-un 4468  ax-setind 4573  ax-iinf 4624  ax-cnex 7970  ax-resscn 7971  ax-1cn 7972  ax-1re 7973  ax-icn 7974  ax-addcl 7975  ax-addrcl 7976  ax-mulcl 7977  ax-mulrcl 7978  ax-addcom 7979  ax-mulcom 7980  ax-addass 7981  ax-mulass 7982  ax-distr 7983  ax-i2m1 7984  ax-0lt1 7985  ax-1rid 7986  ax-0id 7987  ax-rnegex 7988  ax-precex 7989  ax-cnre 7990  ax-pre-ltirr 7991  ax-pre-ltwlin 7992  ax-pre-lttrn 7993  ax-pre-apti 7994  ax-pre-ltadd 7995  ax-pre-mulgt0 7996  ax-pre-mulext 7997  ax-arch 7998  ax-caucvg 7999
This theorem depends on definitions:  df-bi 117  df-stab 832  df-dc 836  df-3or 981  df-3an 982  df-tru 1367  df-fal 1370  df-nf 1475  df-sb 1777  df-eu 2048  df-mo 2049  df-clab 2183  df-cleq 2189  df-clel 2192  df-nfc 2328  df-ne 2368  df-nel 2463  df-ral 2480  df-rex 2481  df-reu 2482  df-rmo 2483  df-rab 2484  df-v 2765  df-sbc 2990  df-csb 3085  df-dif 3159  df-un 3161  df-in 3163  df-ss 3170  df-nul 3451  df-if 3562  df-pw 3607  df-sn 3628  df-pr 3629  df-op 3631  df-uni 3840  df-int 3875  df-iun 3918  df-br 4034  df-opab 4095  df-mpt 4096  df-tr 4132  df-id 4328  df-po 4331  df-iso 4332  df-iord 4401  df-on 4403  df-ilim 4404  df-suc 4406  df-iom 4627  df-xp 4669  df-rel 4670  df-cnv 4671  df-co 4672  df-dm 4673  df-rn 4674  df-res 4675  df-ima 4676  df-iota 5219  df-fun 5260  df-fn 5261  df-f 5262  df-f1 5263  df-fo 5264  df-f1o 5265  df-fv 5266  df-riota 5877  df-ov 5925  df-oprab 5926  df-mpo 5927  df-1st 6198  df-2nd 6199  df-recs 6363  df-frec 6449  df-1o 6474  df-er 6592  df-en 6800  df-dom 6801  df-fin 6802  df-sup 7050  df-pnf 8063  df-mnf 8064  df-xr 8065  df-ltxr 8066  df-le 8067  df-sub 8199  df-neg 8200  df-reap 8602  df-ap 8609  df-div 8700  df-inn 8991  df-2 9049  df-3 9050  df-4 9051  df-n0 9250  df-z 9327  df-uz 9602  df-q 9694  df-rp 9729  df-fz 10084  df-fzo 10218  df-fl 10360  df-mod 10415  df-seqfrec 10540  df-exp 10631  df-ihash 10868  df-cj 11007  df-re 11008  df-im 11009  df-rsqrt 11163  df-abs 11164  df-dvds 11953  df-gcd 12121  df-phi 12379
This theorem is referenced by:  eulerthlemth  12400
  Copyright terms: Public domain W3C validator