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

Theorem eulerthlemh 12245
Description: Lemma for eulerth 12247. 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 5486 . . . 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 2187 . . . . . . 7 (1...(ϕ‘𝑁)) = (1...(ϕ‘𝑁))
7 fveq2 5527 . . . . . . . . . 10 (𝑎 = 𝑏 → (𝐹𝑎) = (𝐹𝑏))
87oveq2d 5904 . . . . . . . . 9 (𝑎 = 𝑏 → (𝐴 · (𝐹𝑎)) = (𝐴 · (𝐹𝑏)))
98oveq1d 5903 . . . . . . . 8 (𝑎 = 𝑏 → ((𝐴 · (𝐹𝑎)) mod 𝑁) = ((𝐴 · (𝐹𝑏)) mod 𝑁))
109cbvmptv 4111 . . . . . . 7 (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)) = (𝑏 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑏)) mod 𝑁))
114, 5, 6, 1, 10eulerthlem1 12241 . . . . . 6 (𝜑 → (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
12 fveq2 5527 . . . . . . . . . 10 (𝑎 = 𝑦 → (𝐹𝑎) = (𝐹𝑦))
1312oveq2d 5904 . . . . . . . . 9 (𝑎 = 𝑦 → (𝐴 · (𝐹𝑎)) = (𝐴 · (𝐹𝑦)))
1413oveq1d 5903 . . . . . . . 8 (𝑎 = 𝑦 → ((𝐴 · (𝐹𝑎)) mod 𝑁) = ((𝐴 · (𝐹𝑦)) mod 𝑁))
1514cbvmptv 4111 . . . . . . 7 (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))
1615feq1i 5370 . . . . . 6 ((𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆 ↔ (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
1711, 16sylib 122 . . . . 5 (𝜑 → (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
184simp1d 1010 . . . . . . . . . 10 (𝜑𝑁 ∈ ℕ)
1918adantr 276 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℕ)
204simp2d 1011 . . . . . . . . . . 11 (𝜑𝐴 ∈ ℤ)
2120adantr 276 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐴 ∈ ℤ)
22 ssrab2 3252 . . . . . . . . . . . . 13 {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} ⊆ (0..^𝑁)
235, 22eqsstri 3199 . . . . . . . . . . . 12 𝑆 ⊆ (0..^𝑁)
24 fzo0ssnn0 10229 . . . . . . . . . . . . 13 (0..^𝑁) ⊆ ℕ0
25 nn0ssz 9285 . . . . . . . . . . . . 13 0 ⊆ ℤ
2624, 25sstri 3176 . . . . . . . . . . . 12 (0..^𝑁) ⊆ ℤ
2723, 26sstri 3176 . . . . . . . . . . 11 𝑆 ⊆ ℤ
28 f1of 5473 . . . . . . . . . . . . . 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 5665 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ 𝑆)
3327, 32sselid 3165 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℤ)
3421, 33zmulcld 9395 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · (𝐹𝑢)) ∈ ℤ)
3529ffvelcdmda 5664 . . . . . . . . . . . 12 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ 𝑆)
3635adantrl 478 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ 𝑆)
3727, 36sselid 3165 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℤ)
3821, 37zmulcld 9395 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · (𝐹𝑣)) ∈ ℤ)
39 moddvds 11820 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ (𝐴 · (𝐹𝑢)) ∈ ℤ ∧ (𝐴 · (𝐹𝑣)) ∈ ℤ) → (((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
4019, 34, 38, 39syl3anc 1248 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
41 eqid 2187 . . . . . . . . . 10 (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))
42 fveq2 5527 . . . . . . . . . . . 12 (𝑦 = 𝑢 → (𝐹𝑦) = (𝐹𝑢))
4342oveq2d 5904 . . . . . . . . . . 11 (𝑦 = 𝑢 → (𝐴 · (𝐹𝑦)) = (𝐴 · (𝐹𝑢)))
4443oveq1d 5903 . . . . . . . . . 10 (𝑦 = 𝑢 → ((𝐴 · (𝐹𝑦)) mod 𝑁) = ((𝐴 · (𝐹𝑢)) mod 𝑁))
45 zmodfzo 10361 . . . . . . . . . . 11 (((𝐴 · (𝐹𝑢)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹𝑢)) mod 𝑁) ∈ (0..^𝑁))
4634, 19, 45syl2anc 411 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐴 · (𝐹𝑢)) mod 𝑁) ∈ (0..^𝑁))
4741, 44, 31, 46fvmptd3 5622 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝐴 · (𝐹𝑢)) mod 𝑁))
48 fveq2 5527 . . . . . . . . . . . 12 (𝑦 = 𝑣 → (𝐹𝑦) = (𝐹𝑣))
4948oveq2d 5904 . . . . . . . . . . 11 (𝑦 = 𝑣 → (𝐴 · (𝐹𝑦)) = (𝐴 · (𝐹𝑣)))
5049oveq1d 5903 . . . . . . . . . 10 (𝑦 = 𝑣 → ((𝐴 · (𝐹𝑦)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁))
51 simprr 531 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑣 ∈ (1...(ϕ‘𝑁)))
52 zmodfzo 10361 . . . . . . . . . . 11 (((𝐴 · (𝐹𝑣)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹𝑣)) mod 𝑁) ∈ (0..^𝑁))
5338, 19, 52syl2anc 411 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐴 · (𝐹𝑣)) mod 𝑁) ∈ (0..^𝑁))
5441, 50, 51, 53fvmptd3 5622 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) = ((𝐴 · (𝐹𝑣)) mod 𝑁))
5547, 54eqeq12d 2202 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) ↔ ((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁)))
5621zcnd 9390 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐴 ∈ ℂ)
5733zcnd 9390 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℂ)
5837zcnd 9390 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℂ)
5956, 57, 58subdid 8385 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) = ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣))))
6059breq2d 4027 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
6140, 55, 603bitr4d 220 . . . . . . 7 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) ↔ 𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣)))))
6218nnzd 9388 . . . . . . . . . . 11 (𝜑𝑁 ∈ ℤ)
6362, 20gcdcomd 11989 . . . . . . . . . 10 (𝜑 → (𝑁 gcd 𝐴) = (𝐴 gcd 𝑁))
644simp3d 1012 . . . . . . . . . 10 (𝜑 → (𝐴 gcd 𝑁) = 1)
6563, 64eqtrd 2220 . . . . . . . . 9 (𝜑 → (𝑁 gcd 𝐴) = 1)
6665adantr 276 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 gcd 𝐴) = 1)
6762adantr 276 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℤ)
6833, 37zsubcld 9394 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) − (𝐹𝑣)) ∈ ℤ)
69 coprmdvds 12106 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ ((𝐹𝑢) − (𝐹𝑣)) ∈ ℤ) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
7067, 21, 68, 69syl3anc 1248 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
71 zq 9640 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ ℤ → (𝐹𝑢) ∈ ℚ)
7233, 71syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℚ)
73 zq 9640 . . . . . . . . . . . . . 14 (𝑁 ∈ ℤ → 𝑁 ∈ ℚ)
7462, 73syl 14 . . . . . . . . . . . . 13 (𝜑𝑁 ∈ ℚ)
7574adantr 276 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℚ)
7623, 32sselid 3165 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ (0..^𝑁))
77 elfzole1 10169 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ (0..^𝑁) → 0 ≤ (𝐹𝑢))
7876, 77syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 0 ≤ (𝐹𝑢))
79 elfzolt2 10170 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ (0..^𝑁) → (𝐹𝑢) < 𝑁)
8076, 79syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) < 𝑁)
81 modqid 10363 . . . . . . . . . . . 12 ((((𝐹𝑢) ∈ ℚ ∧ 𝑁 ∈ ℚ) ∧ (0 ≤ (𝐹𝑢) ∧ (𝐹𝑢) < 𝑁)) → ((𝐹𝑢) mod 𝑁) = (𝐹𝑢))
8272, 75, 78, 80, 81syl22anc 1249 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) mod 𝑁) = (𝐹𝑢))
8327, 35sselid 3165 . . . . . . . . . . . . . 14 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ ℤ)
8483adantrl 478 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℤ)
85 zq 9640 . . . . . . . . . . . . 13 ((𝐹𝑣) ∈ ℤ → (𝐹𝑣) ∈ ℚ)
8684, 85syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℚ)
8723, 35sselid 3165 . . . . . . . . . . . . . 14 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ (0..^𝑁))
88 elfzole1 10169 . . . . . . . . . . . . . 14 ((𝐹𝑣) ∈ (0..^𝑁) → 0 ≤ (𝐹𝑣))
8987, 88syl 14 . . . . . . . . . . . . 13 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → 0 ≤ (𝐹𝑣))
9089adantrl 478 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 0 ≤ (𝐹𝑣))
9187adantrl 478 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ (0..^𝑁))
92 elfzolt2 10170 . . . . . . . . . . . . 13 ((𝐹𝑣) ∈ (0..^𝑁) → (𝐹𝑣) < 𝑁)
9391, 92syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) < 𝑁)
94 modqid 10363 . . . . . . . . . . . 12 ((((𝐹𝑣) ∈ ℚ ∧ 𝑁 ∈ ℚ) ∧ (0 ≤ (𝐹𝑣) ∧ (𝐹𝑣) < 𝑁)) → ((𝐹𝑣) mod 𝑁) = (𝐹𝑣))
9586, 75, 90, 93, 94syl22anc 1249 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑣) mod 𝑁) = (𝐹𝑣))
9682, 95eqeq12d 2202 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ (𝐹𝑢) = (𝐹𝑣)))
97 moddvds 11820 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ (𝐹𝑢) ∈ ℤ ∧ (𝐹𝑣) ∈ ℤ) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
9819, 33, 37, 97syl3anc 1248 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
99 f1of1 5472 . . . . . . . . . . . 12 (𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆𝐹:(1...(ϕ‘𝑁))–1-1𝑆)
1001, 99syl 14 . . . . . . . . . . 11 (𝜑𝐹:(1...(ϕ‘𝑁))–1-1𝑆)
101 f1fveq 5786 . . . . . . . . . . 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 2569 . . . . 5 (𝜑 → ∀𝑢 ∈ (1...(ϕ‘𝑁))∀𝑣 ∈ (1...(ϕ‘𝑁))(((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣))
108 dff13 5782 . . . . 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 9294 . . . . . . 7 (𝜑 → 1 ∈ ℤ)
11118phicld 12232 . . . . . . . 8 (𝜑 → (ϕ‘𝑁) ∈ ℕ)
112111nnzd 9388 . . . . . . 7 (𝜑 → (ϕ‘𝑁) ∈ ℤ)
113110, 112fzfigd 10445 . . . . . 6 (𝜑 → (1...(ϕ‘𝑁)) ∈ Fin)
114 f1oeng 6771 . . . . . 6 (((1...(ϕ‘𝑁)) ∈ Fin ∧ 𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆) → (1...(ϕ‘𝑁)) ≈ 𝑆)
115113, 1, 114syl2anc 411 . . . . 5 (𝜑 → (1...(ϕ‘𝑁)) ≈ 𝑆)
1164, 5eulerthlemfi 12242 . . . . 5 (𝜑𝑆 ∈ Fin)
117 f1finf1o 6960 . . . . 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 5496 . . 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 5461 . . 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 979   = wceq 1363  wcel 2158  wral 2465  {crab 2469   class class class wbr 4015  cmpt 4076  ccnv 4637  ccom 4642  wf 5224  1-1wf1 5225  1-1-ontowf1o 5227  cfv 5228  (class class class)co 5888  cen 6752  Fincfn 6754  0cc0 7825  1c1 7826   · cmul 7830   < clt 8006  cle 8007  cmin 8142  cn 8933  0cn0 9190  cz 9267  cq 9633  ...cfz 10022  ..^cfzo 10156   mod cmo 10336  cdvds 11808   gcd cgcd 11957  ϕcphi 12223
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 1457  ax-7 1458  ax-gen 1459  ax-ie1 1503  ax-ie2 1504  ax-8 1514  ax-10 1515  ax-11 1516  ax-i12 1517  ax-bndl 1519  ax-4 1520  ax-17 1536  ax-i9 1540  ax-ial 1544  ax-i5r 1545  ax-13 2160  ax-14 2161  ax-ext 2169  ax-coll 4130  ax-sep 4133  ax-nul 4141  ax-pow 4186  ax-pr 4221  ax-un 4445  ax-setind 4548  ax-iinf 4599  ax-cnex 7916  ax-resscn 7917  ax-1cn 7918  ax-1re 7919  ax-icn 7920  ax-addcl 7921  ax-addrcl 7922  ax-mulcl 7923  ax-mulrcl 7924  ax-addcom 7925  ax-mulcom 7926  ax-addass 7927  ax-mulass 7928  ax-distr 7929  ax-i2m1 7930  ax-0lt1 7931  ax-1rid 7932  ax-0id 7933  ax-rnegex 7934  ax-precex 7935  ax-cnre 7936  ax-pre-ltirr 7937  ax-pre-ltwlin 7938  ax-pre-lttrn 7939  ax-pre-apti 7940  ax-pre-ltadd 7941  ax-pre-mulgt0 7942  ax-pre-mulext 7943  ax-arch 7944  ax-caucvg 7945
This theorem depends on definitions:  df-bi 117  df-stab 832  df-dc 836  df-3or 980  df-3an 981  df-tru 1366  df-fal 1369  df-nf 1471  df-sb 1773  df-eu 2039  df-mo 2040  df-clab 2174  df-cleq 2180  df-clel 2183  df-nfc 2318  df-ne 2358  df-nel 2453  df-ral 2470  df-rex 2471  df-reu 2472  df-rmo 2473  df-rab 2474  df-v 2751  df-sbc 2975  df-csb 3070  df-dif 3143  df-un 3145  df-in 3147  df-ss 3154  df-nul 3435  df-if 3547  df-pw 3589  df-sn 3610  df-pr 3611  df-op 3613  df-uni 3822  df-int 3857  df-iun 3900  df-br 4016  df-opab 4077  df-mpt 4078  df-tr 4114  df-id 4305  df-po 4308  df-iso 4309  df-iord 4378  df-on 4380  df-ilim 4381  df-suc 4383  df-iom 4602  df-xp 4644  df-rel 4645  df-cnv 4646  df-co 4647  df-dm 4648  df-rn 4649  df-res 4650  df-ima 4651  df-iota 5190  df-fun 5230  df-fn 5231  df-f 5232  df-f1 5233  df-fo 5234  df-f1o 5235  df-fv 5236  df-riota 5844  df-ov 5891  df-oprab 5892  df-mpo 5893  df-1st 6155  df-2nd 6156  df-recs 6320  df-frec 6406  df-1o 6431  df-er 6549  df-en 6755  df-dom 6756  df-fin 6757  df-sup 6997  df-pnf 8008  df-mnf 8009  df-xr 8010  df-ltxr 8011  df-le 8012  df-sub 8144  df-neg 8145  df-reap 8546  df-ap 8553  df-div 8644  df-inn 8934  df-2 8992  df-3 8993  df-4 8994  df-n0 9191  df-z 9268  df-uz 9543  df-q 9634  df-rp 9668  df-fz 10023  df-fzo 10157  df-fl 10284  df-mod 10337  df-seqfrec 10460  df-exp 10534  df-ihash 10770  df-cj 10865  df-re 10866  df-im 10867  df-rsqrt 11021  df-abs 11022  df-dvds 11809  df-gcd 11958  df-phi 12225
This theorem is referenced by:  eulerthlemth  12246
  Copyright terms: Public domain W3C validator