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

Theorem eulerthlemh 12369
Description: Lemma for eulerth 12371. 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 5513 . . . 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 2193 . . . . . . 7 (1...(ϕ‘𝑁)) = (1...(ϕ‘𝑁))
7 fveq2 5554 . . . . . . . . . 10 (𝑎 = 𝑏 → (𝐹𝑎) = (𝐹𝑏))
87oveq2d 5934 . . . . . . . . 9 (𝑎 = 𝑏 → (𝐴 · (𝐹𝑎)) = (𝐴 · (𝐹𝑏)))
98oveq1d 5933 . . . . . . . 8 (𝑎 = 𝑏 → ((𝐴 · (𝐹𝑎)) mod 𝑁) = ((𝐴 · (𝐹𝑏)) mod 𝑁))
109cbvmptv 4125 . . . . . . 7 (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)) = (𝑏 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑏)) mod 𝑁))
114, 5, 6, 1, 10eulerthlem1 12365 . . . . . 6 (𝜑 → (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)):(1...(ϕ‘𝑁))⟶𝑆)
12 fveq2 5554 . . . . . . . . . 10 (𝑎 = 𝑦 → (𝐹𝑎) = (𝐹𝑦))
1312oveq2d 5934 . . . . . . . . 9 (𝑎 = 𝑦 → (𝐴 · (𝐹𝑎)) = (𝐴 · (𝐹𝑦)))
1413oveq1d 5933 . . . . . . . 8 (𝑎 = 𝑦 → ((𝐴 · (𝐹𝑎)) mod 𝑁) = ((𝐴 · (𝐹𝑦)) mod 𝑁))
1514cbvmptv 4125 . . . . . . 7 (𝑎 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑎)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))
1615feq1i 5396 . . . . . 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 3264 . . . . . . . . . . . . 13 {𝑦 ∈ (0..^𝑁) ∣ (𝑦 gcd 𝑁) = 1} ⊆ (0..^𝑁)
235, 22eqsstri 3211 . . . . . . . . . . . 12 𝑆 ⊆ (0..^𝑁)
24 fzo0ssnn0 10282 . . . . . . . . . . . . 13 (0..^𝑁) ⊆ ℕ0
25 nn0ssz 9335 . . . . . . . . . . . . 13 0 ⊆ ℤ
2624, 25sstri 3188 . . . . . . . . . . . 12 (0..^𝑁) ⊆ ℤ
2723, 26sstri 3188 . . . . . . . . . . 11 𝑆 ⊆ ℤ
28 f1of 5500 . . . . . . . . . . . . . 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 5694 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ 𝑆)
3327, 32sselid 3177 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℤ)
3421, 33zmulcld 9445 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · (𝐹𝑢)) ∈ ℤ)
3529ffvelcdmda 5693 . . . . . . . . . . . 12 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ 𝑆)
3635adantrl 478 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ 𝑆)
3727, 36sselid 3177 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℤ)
3821, 37zmulcld 9445 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · (𝐹𝑣)) ∈ ℤ)
39 moddvds 11942 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ (𝐴 · (𝐹𝑢)) ∈ ℤ ∧ (𝐴 · (𝐹𝑣)) ∈ ℤ) → (((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
4019, 34, 38, 39syl3anc 1249 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
41 eqid 2193 . . . . . . . . . 10 (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁)) = (𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))
42 fveq2 5554 . . . . . . . . . . . 12 (𝑦 = 𝑢 → (𝐹𝑦) = (𝐹𝑢))
4342oveq2d 5934 . . . . . . . . . . 11 (𝑦 = 𝑢 → (𝐴 · (𝐹𝑦)) = (𝐴 · (𝐹𝑢)))
4443oveq1d 5933 . . . . . . . . . 10 (𝑦 = 𝑢 → ((𝐴 · (𝐹𝑦)) mod 𝑁) = ((𝐴 · (𝐹𝑢)) mod 𝑁))
45 zmodfzo 10418 . . . . . . . . . . 11 (((𝐴 · (𝐹𝑢)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹𝑢)) mod 𝑁) ∈ (0..^𝑁))
4634, 19, 45syl2anc 411 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐴 · (𝐹𝑢)) mod 𝑁) ∈ (0..^𝑁))
4741, 44, 31, 46fvmptd3 5651 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝐴 · (𝐹𝑢)) mod 𝑁))
48 fveq2 5554 . . . . . . . . . . . 12 (𝑦 = 𝑣 → (𝐹𝑦) = (𝐹𝑣))
4948oveq2d 5934 . . . . . . . . . . 11 (𝑦 = 𝑣 → (𝐴 · (𝐹𝑦)) = (𝐴 · (𝐹𝑣)))
5049oveq1d 5933 . . . . . . . . . 10 (𝑦 = 𝑣 → ((𝐴 · (𝐹𝑦)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁))
51 simprr 531 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑣 ∈ (1...(ϕ‘𝑁)))
52 zmodfzo 10418 . . . . . . . . . . 11 (((𝐴 · (𝐹𝑣)) ∈ ℤ ∧ 𝑁 ∈ ℕ) → ((𝐴 · (𝐹𝑣)) mod 𝑁) ∈ (0..^𝑁))
5338, 19, 52syl2anc 411 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐴 · (𝐹𝑣)) mod 𝑁) ∈ (0..^𝑁))
5441, 50, 51, 53fvmptd3 5651 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) = ((𝐴 · (𝐹𝑣)) mod 𝑁))
5547, 54eqeq12d 2208 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) ↔ ((𝐴 · (𝐹𝑢)) mod 𝑁) = ((𝐴 · (𝐹𝑣)) mod 𝑁)))
5621zcnd 9440 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝐴 ∈ ℂ)
5733zcnd 9440 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℂ)
5837zcnd 9440 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℂ)
5956, 57, 58subdid 8433 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) = ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣))))
6059breq2d 4041 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ↔ 𝑁 ∥ ((𝐴 · (𝐹𝑢)) − (𝐴 · (𝐹𝑣)))))
6140, 55, 603bitr4d 220 . . . . . . 7 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) ↔ 𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣)))))
6218nnzd 9438 . . . . . . . . . . 11 (𝜑𝑁 ∈ ℤ)
6362, 20gcdcomd 12111 . . . . . . . . . 10 (𝜑 → (𝑁 gcd 𝐴) = (𝐴 gcd 𝑁))
644simp3d 1013 . . . . . . . . . 10 (𝜑 → (𝐴 gcd 𝑁) = 1)
6563, 64eqtrd 2226 . . . . . . . . 9 (𝜑 → (𝑁 gcd 𝐴) = 1)
6665adantr 276 . . . . . . . 8 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝑁 gcd 𝐴) = 1)
6762adantr 276 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℤ)
6833, 37zsubcld 9444 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) − (𝐹𝑣)) ∈ ℤ)
69 coprmdvds 12230 . . . . . . . . . 10 ((𝑁 ∈ ℤ ∧ 𝐴 ∈ ℤ ∧ ((𝐹𝑢) − (𝐹𝑣)) ∈ ℤ) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
7067, 21, 68, 69syl3anc 1249 . . . . . . . . 9 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝑁 ∥ (𝐴 · ((𝐹𝑢) − (𝐹𝑣))) ∧ (𝑁 gcd 𝐴) = 1) → 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
71 zq 9691 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ ℤ → (𝐹𝑢) ∈ ℚ)
7233, 71syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ ℚ)
73 zq 9691 . . . . . . . . . . . . . 14 (𝑁 ∈ ℤ → 𝑁 ∈ ℚ)
7462, 73syl 14 . . . . . . . . . . . . 13 (𝜑𝑁 ∈ ℚ)
7574adantr 276 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 𝑁 ∈ ℚ)
7623, 32sselid 3177 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) ∈ (0..^𝑁))
77 elfzole1 10222 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ (0..^𝑁) → 0 ≤ (𝐹𝑢))
7876, 77syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 0 ≤ (𝐹𝑢))
79 elfzolt2 10223 . . . . . . . . . . . . 13 ((𝐹𝑢) ∈ (0..^𝑁) → (𝐹𝑢) < 𝑁)
8076, 79syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑢) < 𝑁)
81 modqid 10420 . . . . . . . . . . . 12 ((((𝐹𝑢) ∈ ℚ ∧ 𝑁 ∈ ℚ) ∧ (0 ≤ (𝐹𝑢) ∧ (𝐹𝑢) < 𝑁)) → ((𝐹𝑢) mod 𝑁) = (𝐹𝑢))
8272, 75, 78, 80, 81syl22anc 1250 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑢) mod 𝑁) = (𝐹𝑢))
8327, 35sselid 3177 . . . . . . . . . . . . . 14 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ ℤ)
8483adantrl 478 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℤ)
85 zq 9691 . . . . . . . . . . . . 13 ((𝐹𝑣) ∈ ℤ → (𝐹𝑣) ∈ ℚ)
8684, 85syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ ℚ)
8723, 35sselid 3177 . . . . . . . . . . . . . 14 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → (𝐹𝑣) ∈ (0..^𝑁))
88 elfzole1 10222 . . . . . . . . . . . . . 14 ((𝐹𝑣) ∈ (0..^𝑁) → 0 ≤ (𝐹𝑣))
8987, 88syl 14 . . . . . . . . . . . . 13 ((𝜑𝑣 ∈ (1...(ϕ‘𝑁))) → 0 ≤ (𝐹𝑣))
9089adantrl 478 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → 0 ≤ (𝐹𝑣))
9187adantrl 478 . . . . . . . . . . . . 13 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) ∈ (0..^𝑁))
92 elfzolt2 10223 . . . . . . . . . . . . 13 ((𝐹𝑣) ∈ (0..^𝑁) → (𝐹𝑣) < 𝑁)
9391, 92syl 14 . . . . . . . . . . . 12 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (𝐹𝑣) < 𝑁)
94 modqid 10420 . . . . . . . . . . . 12 ((((𝐹𝑣) ∈ ℚ ∧ 𝑁 ∈ ℚ) ∧ (0 ≤ (𝐹𝑣) ∧ (𝐹𝑣) < 𝑁)) → ((𝐹𝑣) mod 𝑁) = (𝐹𝑣))
9586, 75, 90, 93, 94syl22anc 1250 . . . . . . . . . . 11 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → ((𝐹𝑣) mod 𝑁) = (𝐹𝑣))
9682, 95eqeq12d 2208 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ (𝐹𝑢) = (𝐹𝑣)))
97 moddvds 11942 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ (𝐹𝑢) ∈ ℤ ∧ (𝐹𝑣) ∈ ℤ) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
9819, 33, 37, 97syl3anc 1249 . . . . . . . . . 10 ((𝜑 ∧ (𝑢 ∈ (1...(ϕ‘𝑁)) ∧ 𝑣 ∈ (1...(ϕ‘𝑁)))) → (((𝐹𝑢) mod 𝑁) = ((𝐹𝑣) mod 𝑁) ↔ 𝑁 ∥ ((𝐹𝑢) − (𝐹𝑣))))
99 f1of1 5499 . . . . . . . . . . . 12 (𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆𝐹:(1...(ϕ‘𝑁))–1-1𝑆)
1001, 99syl 14 . . . . . . . . . . 11 (𝜑𝐹:(1...(ϕ‘𝑁))–1-1𝑆)
101 f1fveq 5815 . . . . . . . . . . 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 2576 . . . . 5 (𝜑 → ∀𝑢 ∈ (1...(ϕ‘𝑁))∀𝑣 ∈ (1...(ϕ‘𝑁))(((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑢) = ((𝑦 ∈ (1...(ϕ‘𝑁)) ↦ ((𝐴 · (𝐹𝑦)) mod 𝑁))‘𝑣) → 𝑢 = 𝑣))
108 dff13 5811 . . . . 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 9344 . . . . . . 7 (𝜑 → 1 ∈ ℤ)
11118phicld 12356 . . . . . . . 8 (𝜑 → (ϕ‘𝑁) ∈ ℕ)
112111nnzd 9438 . . . . . . 7 (𝜑 → (ϕ‘𝑁) ∈ ℤ)
113110, 112fzfigd 10502 . . . . . 6 (𝜑 → (1...(ϕ‘𝑁)) ∈ Fin)
114 f1oeng 6811 . . . . . 6 (((1...(ϕ‘𝑁)) ∈ Fin ∧ 𝐹:(1...(ϕ‘𝑁))–1-1-onto𝑆) → (1...(ϕ‘𝑁)) ≈ 𝑆)
115113, 1, 114syl2anc 411 . . . . 5 (𝜑 → (1...(ϕ‘𝑁)) ≈ 𝑆)
1164, 5eulerthlemfi 12366 . . . . 5 (𝜑𝑆 ∈ Fin)
117 f1finf1o 7006 . . . . 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 5523 . . 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 5488 . . 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 2164  wral 2472  {crab 2476   class class class wbr 4029  cmpt 4090  ccnv 4658  ccom 4663  wf 5250  1-1wf1 5251  1-1-ontowf1o 5253  cfv 5254  (class class class)co 5918  cen 6792  Fincfn 6794  0cc0 7872  1c1 7873   · cmul 7877   < clt 8054  cle 8055  cmin 8190  cn 8982  0cn0 9240  cz 9317  cq 9684  ...cfz 10074  ..^cfzo 10208   mod cmo 10393  cdvds 11930   gcd cgcd 12079  ϕcphi 12347
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 1458  ax-7 1459  ax-gen 1460  ax-ie1 1504  ax-ie2 1505  ax-8 1515  ax-10 1516  ax-11 1517  ax-i12 1518  ax-bndl 1520  ax-4 1521  ax-17 1537  ax-i9 1541  ax-ial 1545  ax-i5r 1546  ax-13 2166  ax-14 2167  ax-ext 2175  ax-coll 4144  ax-sep 4147  ax-nul 4155  ax-pow 4203  ax-pr 4238  ax-un 4464  ax-setind 4569  ax-iinf 4620  ax-cnex 7963  ax-resscn 7964  ax-1cn 7965  ax-1re 7966  ax-icn 7967  ax-addcl 7968  ax-addrcl 7969  ax-mulcl 7970  ax-mulrcl 7971  ax-addcom 7972  ax-mulcom 7973  ax-addass 7974  ax-mulass 7975  ax-distr 7976  ax-i2m1 7977  ax-0lt1 7978  ax-1rid 7979  ax-0id 7980  ax-rnegex 7981  ax-precex 7982  ax-cnre 7983  ax-pre-ltirr 7984  ax-pre-ltwlin 7985  ax-pre-lttrn 7986  ax-pre-apti 7987  ax-pre-ltadd 7988  ax-pre-mulgt0 7989  ax-pre-mulext 7990  ax-arch 7991  ax-caucvg 7992
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 1472  df-sb 1774  df-eu 2045  df-mo 2046  df-clab 2180  df-cleq 2186  df-clel 2189  df-nfc 2325  df-ne 2365  df-nel 2460  df-ral 2477  df-rex 2478  df-reu 2479  df-rmo 2480  df-rab 2481  df-v 2762  df-sbc 2986  df-csb 3081  df-dif 3155  df-un 3157  df-in 3159  df-ss 3166  df-nul 3447  df-if 3558  df-pw 3603  df-sn 3624  df-pr 3625  df-op 3627  df-uni 3836  df-int 3871  df-iun 3914  df-br 4030  df-opab 4091  df-mpt 4092  df-tr 4128  df-id 4324  df-po 4327  df-iso 4328  df-iord 4397  df-on 4399  df-ilim 4400  df-suc 4402  df-iom 4623  df-xp 4665  df-rel 4666  df-cnv 4667  df-co 4668  df-dm 4669  df-rn 4670  df-res 4671  df-ima 4672  df-iota 5215  df-fun 5256  df-fn 5257  df-f 5258  df-f1 5259  df-fo 5260  df-f1o 5261  df-fv 5262  df-riota 5873  df-ov 5921  df-oprab 5922  df-mpo 5923  df-1st 6193  df-2nd 6194  df-recs 6358  df-frec 6444  df-1o 6469  df-er 6587  df-en 6795  df-dom 6796  df-fin 6797  df-sup 7043  df-pnf 8056  df-mnf 8057  df-xr 8058  df-ltxr 8059  df-le 8060  df-sub 8192  df-neg 8193  df-reap 8594  df-ap 8601  df-div 8692  df-inn 8983  df-2 9041  df-3 9042  df-4 9043  df-n0 9241  df-z 9318  df-uz 9593  df-q 9685  df-rp 9720  df-fz 10075  df-fzo 10209  df-fl 10339  df-mod 10394  df-seqfrec 10519  df-exp 10610  df-ihash 10847  df-cj 10986  df-re 10987  df-im 10988  df-rsqrt 11142  df-abs 11143  df-dvds 11931  df-gcd 12080  df-phi 12349
This theorem is referenced by:  eulerthlemth  12370
  Copyright terms: Public domain W3C validator