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

Theorem eulerthlemh 12094
Description: Lemma for eulerth 12096. 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 5426 . . . 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 2157 . . . . . . 7 (1...(ϕ‘𝑁)) = (1...(ϕ‘𝑁))
7 fveq2 5467 . . . . . . . . . 10 (𝑎 = 𝑏 → (𝐹𝑎) = (𝐹𝑏))
87oveq2d 5837 . . . . . . . . 9 (𝑎 = 𝑏 → (𝐴 · (𝐹𝑎)) = (𝐴 · (𝐹𝑏)))
98oveq1d 5836 . . . . . . . 8 (𝑎 = 𝑏 → ((𝐴 · (𝐹𝑎)) mod 𝑁) = ((𝐴 · (𝐹𝑏)) mod 𝑁))
109cbvmptv 4060 . . . . . . 7 (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)) = (𝑏 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑏)) mod 𝑁))
114, 5, 6, 1, 10eulerthlem1 12090 . . . . . 6 (𝜑 → (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
12 fveq2 5467 . . . . . . . . . 10 (𝑎 = 𝑦 → (𝐹𝑎) = (𝐹𝑦))
1312oveq2d 5837 . . . . . . . . 9 (𝑎 = 𝑦 → (𝐴 · (𝐹𝑎)) = (𝐴 · (𝐹𝑦)))
1413oveq1d 5836 . . . . . . . 8 (𝑎 = 𝑦 → ((𝐴 · (𝐹𝑎)) mod 𝑁) = ((𝐴 · (𝐹𝑦)) mod 𝑁))
1514cbvmptv 4060 . . . . . . 7 (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))
1615feq1i 5311 . . . . . 6 ((𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ↔ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
1711, 16sylib 121 . . . . 5 (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
184simp1d 994 . . . . . . . . . 10 (𝜑𝑁 ∈ ℕ)
1918adantr 274 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℕ)
204simp2d 995 . . . . . . . . . . 11 (𝜑𝐴 ∈ ℤ)
2120adantr 274 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐴 ∈ ℤ)
22 ssrab2 3213 . . . . . . . . . . . . 13 {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} ⊆ (0..^𝑁)
235, 22eqsstri 3160 . . . . . . . . . . . 12 𝑆 ⊆ (0..^𝑁)
24 fzo0ssnn0 10107 . . . . . . . . . . . . 13 (0..^𝑁) ⊆ ℕ0
25 nn0ssz 9179 . . . . . . . . . . . . 13 0 ⊆ ℤ
2624, 25sstri 3137 . . . . . . . . . . . 12 (0..^𝑁) ⊆ ℤ
2723, 26sstri 3137 . . . . . . . . . . 11 𝑆 ⊆ ℤ
28 f1of 5413 . . . . . . . . . . . . . 14 (𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆𝐹:(1...(ϕ‘𝑁))⟶𝑆)
291, 28syl 14 . . . . . . . . . . . . 13 (𝜑𝐹:(1...(ϕ‘𝑁))⟶𝑆)
3029adantr 274 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐹:(1...(ϕ‘𝑁))⟶𝑆)
31 simprl 521 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑢 ∈ (1...(ϕ‘𝑁)))
3230, 31ffvelrnd 5602 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ 𝑆)
3327, 32sseldi 3126 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℤ)
3421, 33zmulcld 9286 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · (𝐹𝑢)) ∈ ℤ)
3529ffvelrnda 5601 . . . . . . . . . . . 12 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ 𝑆)
3635adantrl 470 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ 𝑆)
3727, 36sseldi 3126 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℤ)
3821, 37zmulcld 9286 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · (𝐹𝑣)) ∈ ℤ)
39 moddvds 11688 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ (𝐴 · (𝐹𝑢)) ∈ ℤ ∧ (𝐴 · (𝐹𝑣)) ∈ ℤ) → (((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
4019, 34, 38, 39syl3anc 1220 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
41 eqid 2157 . . . . . . . . . 10 (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))
42 fveq2 5467 . . . . . . . . . . . 12 (𝑦 = 𝑢 → (𝐹𝑦) = (𝐹𝑢))
4342oveq2d 5837 . . . . . . . . . . 11 (𝑦 = 𝑢 → (𝐴 · (𝐹𝑦)) = (𝐴 · (𝐹𝑢)))
4443oveq1d 5836 . . . . . . . . . 10 (𝑦 = 𝑢 → ((𝐴 · (𝐹𝑦)) mod 𝑁) = ((𝐴 · (𝐹𝑢)) mod 𝑁))
45 zmodfzo 10239 . . . . . . . . . . 11 (((𝐴 · (𝐹𝑢)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹𝑢)) mod 𝑁) ∈ (0..^𝑁))
4634, 19, 45syl2anc 409 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐴 · (𝐹𝑢)) mod 𝑁) ∈ (0..^𝑁))
4741, 44, 31, 46fvmptd3 5560 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝐴 · (𝐹𝑢)) mod 𝑁))
48 fveq2 5467 . . . . . . . . . . . 12 (𝑦 = 𝑣 → (𝐹𝑦) = (𝐹𝑣))
4948oveq2d 5837 . . . . . . . . . . 11 (𝑦 = 𝑣 → (𝐴 · (𝐹𝑦)) = (𝐴 · (𝐹𝑣)))
5049oveq1d 5836 . . . . . . . . . 10 (𝑦 = 𝑣 → ((𝐴 · (𝐹𝑦)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁))
51 simprr 522 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑣 ∈ (1...(ϕ‘𝑁)))
52 zmodfzo 10239 . . . . . . . . . . 11 (((𝐴 · (𝐹𝑣)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹𝑣)) mod 𝑁) ∈ (0..^𝑁))
5338, 19, 52syl2anc 409 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐴 · (𝐹𝑣)) mod 𝑁) ∈ (0..^𝑁))
5441, 50, 51, 53fvmptd3 5560 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) = ((𝐴 · (𝐹𝑣)) mod 𝑁))
5547, 54eqeq12d 2172 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) ↔ ((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁)))
5621zcnd 9281 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐴 ∈ ℂ)
5733zcnd 9281 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℂ)
5837zcnd 9281 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℂ)
5956, 57, 58subdid 8283 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) = ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣))))
6059breq2d 3977 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
6140, 55, 603bitr4d 219 . . . . . . 7 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) ↔ 𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣)))))
6218nnzd 9279 . . . . . . . . . . 11 (𝜑𝑁 ∈ ℤ)
6362, 20gcdcomd 11849 . . . . . . . . . 10 (𝜑 → (𝑁 gcd 𝐴) = (𝐴 gcd 𝑁))
644simp3d 996 . . . . . . . . . 10 (𝜑 → (𝐴 gcd 𝑁) = 1)
6563, 64eqtrd 2190 . . . . . . . . 9 (𝜑 → (𝑁 gcd 𝐴) = 1)
6665adantr 274 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 gcd 𝐴) = 1)
6762adantr 274 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℤ)
6833, 37zsubcld 9285 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) − (𝐹𝑣)) ∈ ℤ)
69 coprmdvds 11960 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ ((𝐹𝑢) − (𝐹𝑣)) ∈ ℤ) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
7067, 21, 68, 69syl3anc 1220 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
71 zq 9528 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ ℤ → (𝐹𝑢) ∈ ℚ)
7233, 71syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℚ)
73 zq 9528 . . . . . . . . . . . . . 14 (𝑁 ∈ ℤ → 𝑁 ∈ ℚ)
7462, 73syl 14 . . . . . . . . . . . . 13 (𝜑𝑁 ∈ ℚ)
7574adantr 274 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℚ)
7623, 32sseldi 3126 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ (0..^𝑁))
77 elfzole1 10047 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ (0..^𝑁) → 0 ≤ (𝐹𝑢))
7876, 77syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 0 ≤ (𝐹𝑢))
79 elfzolt2 10048 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ (0..^𝑁) → (𝐹𝑢) < 𝑁)
8076, 79syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) < 𝑁)
81 modqid 10241 . . . . . . . . . . . 12 ((((𝐹𝑢) ∈ ℚ ∧ 𝑁 ∈ ℚ) ∧ (0 ≤ (𝐹𝑢) ∧ (𝐹𝑢) < 𝑁)) → ((𝐹𝑢) mod 𝑁) = (𝐹𝑢))
8272, 75, 78, 80, 81syl22anc 1221 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) mod 𝑁) = (𝐹𝑢))
8327, 35sseldi 3126 . . . . . . . . . . . . . 14 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ ℤ)
8483adantrl 470 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℤ)
85 zq 9528 . . . . . . . . . . . . 13 ((𝐹𝑣) ∈ ℤ → (𝐹𝑣) ∈ ℚ)
8684, 85syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℚ)
8723, 35sseldi 3126 . . . . . . . . . . . . . 14 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ (0..^𝑁))
88 elfzole1 10047 . . . . . . . . . . . . . 14 ((𝐹𝑣) ∈ (0..^𝑁) → 0 ≤ (𝐹𝑣))
8987, 88syl 14 . . . . . . . . . . . . 13 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → 0 ≤ (𝐹𝑣))
9089adantrl 470 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 0 ≤ (𝐹𝑣))
9187adantrl 470 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ (0..^𝑁))
92 elfzolt2 10048 . . . . . . . . . . . . 13 ((𝐹𝑣) ∈ (0..^𝑁) → (𝐹𝑣) < 𝑁)
9391, 92syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) < 𝑁)
94 modqid 10241 . . . . . . . . . . . 12 ((((𝐹𝑣) ∈ ℚ ∧ 𝑁 ∈ ℚ) ∧ (0 ≤ (𝐹𝑣) ∧ (𝐹𝑣) < 𝑁)) → ((𝐹𝑣) mod 𝑁) = (𝐹𝑣))
9586, 75, 90, 93, 94syl22anc 1221 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑣) mod 𝑁) = (𝐹𝑣))
9682, 95eqeq12d 2172 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ (𝐹𝑢) = (𝐹𝑣)))
97 moddvds 11688 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ (𝐹𝑢) ∈ ℤ ∧ (𝐹𝑣) ∈ ℤ) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
9819, 33, 37, 97syl3anc 1220 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
99 f1of1 5412 . . . . . . . . . . . 12 (𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆𝐹:(1...(ϕ‘𝑁))–1-1𝑆)
1001, 99syl 14 . . . . . . . . . . 11 (𝜑𝐹:(1...(ϕ‘𝑁))–1-1𝑆)
101 f1fveq 5719 . . . . . . . . . . 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 425 . . . . . . 7 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) → 𝑢 = 𝑣))
10661, 105sylbid 149 . . . . . 6 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣))
107106ralrimivva 2539 . . . . 5 (𝜑 → ∀𝑢 ∈ (1...(ϕ‘𝑁))∀𝑣 ∈ (1...(ϕ‘𝑁))(((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣))
108 dff13 5715 . . . . 5 ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1𝑆 ↔ ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ∧ ∀𝑢 ∈ (1...(ϕ‘𝑁))∀𝑣 ∈ (1...(ϕ‘𝑁))(((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣)))
10917, 107, 108sylanbrc 414 . . . 4 (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))–1-1𝑆)
110 1zzd 9188 . . . . . . 7 (𝜑 → 1 ∈ ℤ)
11118phicld 12081 . . . . . . . 8 (𝜑 → (ϕ‘𝑁) ∈ ℕ)
112111nnzd 9279 . . . . . . 7 (𝜑 → (ϕ‘𝑁) ∈ ℤ)
113110, 112fzfigd 10323 . . . . . 6 (𝜑 → (1...(ϕ‘𝑁)) ∈ Fin)
114 f1oeng 6699 . . . . . 6 (((1...(ϕ‘𝑁)) ∈ Fin ∧ 𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆) → (1...(ϕ‘𝑁)) ≈ 𝑆)
115113, 1, 114syl2anc 409 . . . . 5 (𝜑 → (1...(ϕ‘𝑁)) ≈ 𝑆)
1164, 5eulerthlemfi 12091 . . . . 5 (𝜑𝑆 ∈ Fin)
117 f1finf1o 6888 . . . . 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 5436 . . 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 5402 . . 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 963   = wceq 1335  wcel 2128  wral 2435  {crab 2439   class class class wbr 3965  cmpt 4025  ccnv 4584  ccom 4589  wf 5165  1-1wf1 5166  1-1-ontowf1o 5168  cfv 5169  (class class class)co 5821  cen 6680  Fincfn 6682  0cc0 7726  1c1 7727   · cmul 7731   < clt 7906  cle 7907  cmin 8040  cn 8827  0cn0 9084  cz 9161  cq 9521  ...cfz 9905  ..^cfzo 10034   mod cmo 10214  cdvds 11676   gcd cgcd 11821  ϕcphi 12073
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 604  ax-in2 605  ax-io 699  ax-5 1427  ax-7 1428  ax-gen 1429  ax-ie1 1473  ax-ie2 1474  ax-8 1484  ax-10 1485  ax-11 1486  ax-i12 1487  ax-bndl 1489  ax-4 1490  ax-17 1506  ax-i9 1510  ax-ial 1514  ax-i5r 1515  ax-13 2130  ax-14 2131  ax-ext 2139  ax-coll 4079  ax-sep 4082  ax-nul 4090  ax-pow 4135  ax-pr 4169  ax-un 4393  ax-setind 4495  ax-iinf 4546  ax-cnex 7817  ax-resscn 7818  ax-1cn 7819  ax-1re 7820  ax-icn 7821  ax-addcl 7822  ax-addrcl 7823  ax-mulcl 7824  ax-mulrcl 7825  ax-addcom 7826  ax-mulcom 7827  ax-addass 7828  ax-mulass 7829  ax-distr 7830  ax-i2m1 7831  ax-0lt1 7832  ax-1rid 7833  ax-0id 7834  ax-rnegex 7835  ax-precex 7836  ax-cnre 7837  ax-pre-ltirr 7838  ax-pre-ltwlin 7839  ax-pre-lttrn 7840  ax-pre-apti 7841  ax-pre-ltadd 7842  ax-pre-mulgt0 7843  ax-pre-mulext 7844  ax-arch 7845  ax-caucvg 7846
This theorem depends on definitions:  df-bi 116  df-stab 817  df-dc 821  df-3or 964  df-3an 965  df-tru 1338  df-fal 1341  df-nf 1441  df-sb 1743  df-eu 2009  df-mo 2010  df-clab 2144  df-cleq 2150  df-clel 2153  df-nfc 2288  df-ne 2328  df-nel 2423  df-ral 2440  df-rex 2441  df-reu 2442  df-rmo 2443  df-rab 2444  df-v 2714  df-sbc 2938  df-csb 3032  df-dif 3104  df-un 3106  df-in 3108  df-ss 3115  df-nul 3395  df-if 3506  df-pw 3545  df-sn 3566  df-pr 3567  df-op 3569  df-uni 3773  df-int 3808  df-iun 3851  df-br 3966  df-opab 4026  df-mpt 4027  df-tr 4063  df-id 4253  df-po 4256  df-iso 4257  df-iord 4326  df-on 4328  df-ilim 4329  df-suc 4331  df-iom 4549  df-xp 4591  df-rel 4592  df-cnv 4593  df-co 4594  df-dm 4595  df-rn 4596  df-res 4597  df-ima 4598  df-iota 5134  df-fun 5171  df-fn 5172  df-f 5173  df-f1 5174  df-fo 5175  df-f1o 5176  df-fv 5177  df-riota 5777  df-ov 5824  df-oprab 5825  df-mpo 5826  df-1st 6085  df-2nd 6086  df-recs 6249  df-frec 6335  df-1o 6360  df-er 6477  df-en 6683  df-dom 6684  df-fin 6685  df-sup 6924  df-pnf 7908  df-mnf 7909  df-xr 7910  df-ltxr 7911  df-le 7912  df-sub 8042  df-neg 8043  df-reap 8444  df-ap 8451  df-div 8540  df-inn 8828  df-2 8886  df-3 8887  df-4 8888  df-n0 9085  df-z 9162  df-uz 9434  df-q 9522  df-rp 9554  df-fz 9906  df-fzo 10035  df-fl 10162  df-mod 10215  df-seqfrec 10338  df-exp 10412  df-ihash 10643  df-cj 10735  df-re 10736  df-im 10737  df-rsqrt 10891  df-abs 10892  df-dvds 11677  df-gcd 11822  df-phi 12074
This theorem is referenced by:  eulerthlemth  12095
  Copyright terms: Public domain W3C validator