Metamath Proof Explorer < Previous   Next > Nearby theorems Mirrors  >  Home  >  MPE Home  >  Th. List  >  birthdaylem2 Structured version   Visualization version   GIF version

Theorem birthdaylem2 24479
 Description: For general 𝑁 and 𝐾, count the fraction of injective functions from 1...𝐾 to 1...𝑁. (Contributed by Mario Carneiro, 7-May-2015.)
Hypotheses
Ref Expression
birthday.s 𝑆 = {𝑓𝑓:(1...𝐾)⟶(1...𝑁)}
birthday.t 𝑇 = {𝑓𝑓:(1...𝐾)–1-1→(1...𝑁)}
Assertion
Ref Expression
birthdaylem2 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘𝑇) / (#‘𝑆)) = (exp‘Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁)))))
Distinct variable groups:   𝑓,𝑘,𝐾   𝑓,𝑁,𝑘
Allowed substitution hints:   𝑆(𝑓,𝑘)   𝑇(𝑓,𝑘)

Proof of Theorem birthdaylem2
Dummy variable 𝑛 is distinct from all other variables.
StepHypRef Expression
1 birthday.t . . . . . . 7 𝑇 = {𝑓𝑓:(1...𝐾)–1-1→(1...𝑁)}
21fveq2i 6106 . . . . . 6 (#‘𝑇) = (#‘{𝑓𝑓:(1...𝐾)–1-1→(1...𝑁)})
3 fzfi 12633 . . . . . . 7 (1...𝐾) ∈ Fin
4 fzfi 12633 . . . . . . 7 (1...𝑁) ∈ Fin
5 hashf1 13098 . . . . . . 7 (((1...𝐾) ∈ Fin ∧ (1...𝑁) ∈ Fin) → (#‘{𝑓𝑓:(1...𝐾)–1-1→(1...𝑁)}) = ((!‘(#‘(1...𝐾))) · ((#‘(1...𝑁))C(#‘(1...𝐾)))))
63, 4, 5mp2an 704 . . . . . 6 (#‘{𝑓𝑓:(1...𝐾)–1-1→(1...𝑁)}) = ((!‘(#‘(1...𝐾))) · ((#‘(1...𝑁))C(#‘(1...𝐾))))
72, 6eqtri 2632 . . . . 5 (#‘𝑇) = ((!‘(#‘(1...𝐾))) · ((#‘(1...𝑁))C(#‘(1...𝐾))))
8 elfznn0 12302 . . . . . . . . 9 (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℕ0)
98adantl 481 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝐾 ∈ ℕ0)
10 hashfz1 12996 . . . . . . . 8 (𝐾 ∈ ℕ0 → (#‘(1...𝐾)) = 𝐾)
119, 10syl 17 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘(1...𝐾)) = 𝐾)
1211fveq2d 6107 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘(#‘(1...𝐾))) = (!‘𝐾))
13 nnnn0 11176 . . . . . . . . 9 (𝑁 ∈ ℕ → 𝑁 ∈ ℕ0)
14 hashfz1 12996 . . . . . . . . 9 (𝑁 ∈ ℕ0 → (#‘(1...𝑁)) = 𝑁)
1513, 14syl 17 . . . . . . . 8 (𝑁 ∈ ℕ → (#‘(1...𝑁)) = 𝑁)
1615adantr 480 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘(1...𝑁)) = 𝑁)
1716, 11oveq12d 6567 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘(1...𝑁))C(#‘(1...𝐾))) = (𝑁C𝐾))
1812, 17oveq12d 6567 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘(#‘(1...𝐾))) · ((#‘(1...𝑁))C(#‘(1...𝐾)))) = ((!‘𝐾) · (𝑁C𝐾)))
197, 18syl5eq 2656 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘𝑇) = ((!‘𝐾) · (𝑁C𝐾)))
2013adantr 480 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝑁 ∈ ℕ0)
21 faccl 12932 . . . . . . . . 9 (𝑁 ∈ ℕ0 → (!‘𝑁) ∈ ℕ)
2220, 21syl 17 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝑁) ∈ ℕ)
2322nncnd 10913 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝑁) ∈ ℂ)
24 fznn0sub 12244 . . . . . . . . . 10 (𝐾 ∈ (0...𝑁) → (𝑁𝐾) ∈ ℕ0)
2524adantl 481 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ ℕ0)
26 faccl 12932 . . . . . . . . 9 ((𝑁𝐾) ∈ ℕ0 → (!‘(𝑁𝐾)) ∈ ℕ)
2725, 26syl 17 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘(𝑁𝐾)) ∈ ℕ)
2827nncnd 10913 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘(𝑁𝐾)) ∈ ℂ)
2927nnne0d 10942 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘(𝑁𝐾)) ≠ 0)
3023, 28, 29divcld 10680 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘𝑁) / (!‘(𝑁𝐾))) ∈ ℂ)
31 faccl 12932 . . . . . . . 8 (𝐾 ∈ ℕ0 → (!‘𝐾) ∈ ℕ)
329, 31syl 17 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝐾) ∈ ℕ)
3332nncnd 10913 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝐾) ∈ ℂ)
3432nnne0d 10942 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝐾) ≠ 0)
3530, 33, 34divcan2d 10682 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘𝐾) · (((!‘𝑁) / (!‘(𝑁𝐾))) / (!‘𝐾))) = ((!‘𝑁) / (!‘(𝑁𝐾))))
36 bcval2 12954 . . . . . . . 8 (𝐾 ∈ (0...𝑁) → (𝑁C𝐾) = ((!‘𝑁) / ((!‘(𝑁𝐾)) · (!‘𝐾))))
3736adantl 481 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁C𝐾) = ((!‘𝑁) / ((!‘(𝑁𝐾)) · (!‘𝐾))))
3823, 28, 33, 29, 34divdiv1d 10711 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (((!‘𝑁) / (!‘(𝑁𝐾))) / (!‘𝐾)) = ((!‘𝑁) / ((!‘(𝑁𝐾)) · (!‘𝐾))))
3937, 38eqtr4d 2647 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁C𝐾) = (((!‘𝑁) / (!‘(𝑁𝐾))) / (!‘𝐾)))
4039oveq2d 6565 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘𝐾) · (𝑁C𝐾)) = ((!‘𝐾) · (((!‘𝑁) / (!‘(𝑁𝐾))) / (!‘𝐾))))
41 fzfid 12634 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1...𝑁) ∈ Fin)
42 elfznn 12241 . . . . . . . . . 10 (𝑛 ∈ (1...𝑁) → 𝑛 ∈ ℕ)
4342adantl 481 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (1...𝑁)) → 𝑛 ∈ ℕ)
44 nnrp 11718 . . . . . . . . . . 11 (𝑛 ∈ ℕ → 𝑛 ∈ ℝ+)
4544relogcld 24173 . . . . . . . . . 10 (𝑛 ∈ ℕ → (log‘𝑛) ∈ ℝ)
4645recnd 9947 . . . . . . . . 9 (𝑛 ∈ ℕ → (log‘𝑛) ∈ ℂ)
4743, 46syl 17 . . . . . . . 8 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (1...𝑁)) → (log‘𝑛) ∈ ℂ)
4841, 47fsumcl 14311 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (1...𝑁)(log‘𝑛) ∈ ℂ)
49 fzfid 12634 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1...(𝑁𝐾)) ∈ Fin)
50 elfznn 12241 . . . . . . . . . 10 (𝑛 ∈ (1...(𝑁𝐾)) → 𝑛 ∈ ℕ)
5150adantl 481 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (1...(𝑁𝐾))) → 𝑛 ∈ ℕ)
5251, 46syl 17 . . . . . . . 8 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (1...(𝑁𝐾))) → (log‘𝑛) ∈ ℂ)
5349, 52fsumcl 14311 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛) ∈ ℂ)
54 efsub 14669 . . . . . . 7 ((Σ𝑛 ∈ (1...𝑁)(log‘𝑛) ∈ ℂ ∧ Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛) ∈ ℂ) → (exp‘(Σ𝑛 ∈ (1...𝑁)(log‘𝑛) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))) = ((exp‘Σ𝑛 ∈ (1...𝑁)(log‘𝑛)) / (exp‘Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))))
5548, 53, 54syl2anc 691 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(Σ𝑛 ∈ (1...𝑁)(log‘𝑛) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))) = ((exp‘Σ𝑛 ∈ (1...𝑁)(log‘𝑛)) / (exp‘Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))))
5625nn0red 11229 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ ℝ)
5756ltp1d 10833 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) < ((𝑁𝐾) + 1))
58 fzdisj 12239 . . . . . . . . . . 11 ((𝑁𝐾) < ((𝑁𝐾) + 1) → ((1...(𝑁𝐾)) ∩ (((𝑁𝐾) + 1)...𝑁)) = ∅)
5957, 58syl 17 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((1...(𝑁𝐾)) ∩ (((𝑁𝐾) + 1)...𝑁)) = ∅)
60 fznn0sub2 12315 . . . . . . . . . . . . . . . 16 (𝐾 ∈ (0...𝑁) → (𝑁𝐾) ∈ (0...𝑁))
6160adantl 481 . . . . . . . . . . . . . . 15 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ (0...𝑁))
62 elfzle2 12216 . . . . . . . . . . . . . . 15 ((𝑁𝐾) ∈ (0...𝑁) → (𝑁𝐾) ≤ 𝑁)
6361, 62syl 17 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ≤ 𝑁)
6463adantr 480 . . . . . . . . . . . . 13 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → (𝑁𝐾) ≤ 𝑁)
65 simpr 476 . . . . . . . . . . . . . . 15 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → (𝑁𝐾) ∈ ℕ)
66 nnuz 11599 . . . . . . . . . . . . . . 15 ℕ = (ℤ‘1)
6765, 66syl6eleq 2698 . . . . . . . . . . . . . 14 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → (𝑁𝐾) ∈ (ℤ‘1))
68 nnz 11276 . . . . . . . . . . . . . . 15 (𝑁 ∈ ℕ → 𝑁 ∈ ℤ)
6968ad2antrr 758 . . . . . . . . . . . . . 14 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → 𝑁 ∈ ℤ)
70 elfz5 12205 . . . . . . . . . . . . . 14 (((𝑁𝐾) ∈ (ℤ‘1) ∧ 𝑁 ∈ ℤ) → ((𝑁𝐾) ∈ (1...𝑁) ↔ (𝑁𝐾) ≤ 𝑁))
7167, 69, 70syl2anc 691 . . . . . . . . . . . . 13 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → ((𝑁𝐾) ∈ (1...𝑁) ↔ (𝑁𝐾) ≤ 𝑁))
7264, 71mpbird 246 . . . . . . . . . . . 12 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → (𝑁𝐾) ∈ (1...𝑁))
73 fzsplit 12238 . . . . . . . . . . . 12 ((𝑁𝐾) ∈ (1...𝑁) → (1...𝑁) = ((1...(𝑁𝐾)) ∪ (((𝑁𝐾) + 1)...𝑁)))
7472, 73syl 17 . . . . . . . . . . 11 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → (1...𝑁) = ((1...(𝑁𝐾)) ∪ (((𝑁𝐾) + 1)...𝑁)))
75 simpr 476 . . . . . . . . . . . . . . 15 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (𝑁𝐾) = 0)
7675oveq2d 6565 . . . . . . . . . . . . . 14 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (1...(𝑁𝐾)) = (1...0))
77 fz10 12233 . . . . . . . . . . . . . 14 (1...0) = ∅
7876, 77syl6eq 2660 . . . . . . . . . . . . 13 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (1...(𝑁𝐾)) = ∅)
7978uneq1d 3728 . . . . . . . . . . . 12 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → ((1...(𝑁𝐾)) ∪ (((𝑁𝐾) + 1)...𝑁)) = (∅ ∪ (((𝑁𝐾) + 1)...𝑁)))
80 uncom 3719 . . . . . . . . . . . . . 14 (∅ ∪ (((𝑁𝐾) + 1)...𝑁)) = ((((𝑁𝐾) + 1)...𝑁) ∪ ∅)
81 un0 3919 . . . . . . . . . . . . . 14 ((((𝑁𝐾) + 1)...𝑁) ∪ ∅) = (((𝑁𝐾) + 1)...𝑁)
8280, 81eqtri 2632 . . . . . . . . . . . . 13 (∅ ∪ (((𝑁𝐾) + 1)...𝑁)) = (((𝑁𝐾) + 1)...𝑁)
8375oveq1d 6564 . . . . . . . . . . . . . . 15 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → ((𝑁𝐾) + 1) = (0 + 1))
84 1e0p1 11428 . . . . . . . . . . . . . . 15 1 = (0 + 1)
8583, 84syl6eqr 2662 . . . . . . . . . . . . . 14 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → ((𝑁𝐾) + 1) = 1)
8685oveq1d 6564 . . . . . . . . . . . . 13 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (((𝑁𝐾) + 1)...𝑁) = (1...𝑁))
8782, 86syl5eq 2656 . . . . . . . . . . . 12 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (∅ ∪ (((𝑁𝐾) + 1)...𝑁)) = (1...𝑁))
8879, 87eqtr2d 2645 . . . . . . . . . . 11 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (1...𝑁) = ((1...(𝑁𝐾)) ∪ (((𝑁𝐾) + 1)...𝑁)))
89 elnn0 11171 . . . . . . . . . . . 12 ((𝑁𝐾) ∈ ℕ0 ↔ ((𝑁𝐾) ∈ ℕ ∨ (𝑁𝐾) = 0))
9025, 89sylib 207 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((𝑁𝐾) ∈ ℕ ∨ (𝑁𝐾) = 0))
9174, 88, 90mpjaodan 823 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1...𝑁) = ((1...(𝑁𝐾)) ∪ (((𝑁𝐾) + 1)...𝑁)))
9259, 91, 41, 47fsumsplit 14318 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (1...𝑁)(log‘𝑛) = (Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛) + Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)))
9392oveq1d 6564 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (Σ𝑛 ∈ (1...𝑁)(log‘𝑛) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)) = ((Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛) + Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)))
94 fzfid 12634 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (((𝑁𝐾) + 1)...𝑁) ∈ Fin)
95 nn0p1nn 11209 . . . . . . . . . . . . 13 ((𝑁𝐾) ∈ ℕ0 → ((𝑁𝐾) + 1) ∈ ℕ)
9625, 95syl 17 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((𝑁𝐾) + 1) ∈ ℕ)
97 elfzuz 12209 . . . . . . . . . . . 12 (𝑛 ∈ (((𝑁𝐾) + 1)...𝑁) → 𝑛 ∈ (ℤ‘((𝑁𝐾) + 1)))
98 eluznn 11634 . . . . . . . . . . . 12 ((((𝑁𝐾) + 1) ∈ ℕ ∧ 𝑛 ∈ (ℤ‘((𝑁𝐾) + 1))) → 𝑛 ∈ ℕ)
9996, 97, 98syl2an 493 . . . . . . . . . . 11 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → 𝑛 ∈ ℕ)
10099, 46syl 17 . . . . . . . . . 10 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (log‘𝑛) ∈ ℂ)
10194, 100fsumcl 14311 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) ∈ ℂ)
10253, 101pncan2d 10273 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛) + Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)) = Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛))
10393, 102eqtr2d 2645 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) = (Σ𝑛 ∈ (1...𝑁)(log‘𝑛) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)))
104103fveq2d 6107 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) = (exp‘(Σ𝑛 ∈ (1...𝑁)(log‘𝑛) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))))
10522nnne0d 10942 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝑁) ≠ 0)
106 eflog 24127 . . . . . . . . 9 (((!‘𝑁) ∈ ℂ ∧ (!‘𝑁) ≠ 0) → (exp‘(log‘(!‘𝑁))) = (!‘𝑁))
10723, 105, 106syl2anc 691 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(log‘(!‘𝑁))) = (!‘𝑁))
108 logfac 24151 . . . . . . . . . 10 (𝑁 ∈ ℕ0 → (log‘(!‘𝑁)) = Σ𝑛 ∈ (1...𝑁)(log‘𝑛))
10920, 108syl 17 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (log‘(!‘𝑁)) = Σ𝑛 ∈ (1...𝑁)(log‘𝑛))
110109fveq2d 6107 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(log‘(!‘𝑁))) = (exp‘Σ𝑛 ∈ (1...𝑁)(log‘𝑛)))
111107, 110eqtr3d 2646 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝑁) = (exp‘Σ𝑛 ∈ (1...𝑁)(log‘𝑛)))
112 eflog 24127 . . . . . . . . 9 (((!‘(𝑁𝐾)) ∈ ℂ ∧ (!‘(𝑁𝐾)) ≠ 0) → (exp‘(log‘(!‘(𝑁𝐾)))) = (!‘(𝑁𝐾)))
11328, 29, 112syl2anc 691 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(log‘(!‘(𝑁𝐾)))) = (!‘(𝑁𝐾)))
114 logfac 24151 . . . . . . . . . 10 ((𝑁𝐾) ∈ ℕ0 → (log‘(!‘(𝑁𝐾))) = Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))
11525, 114syl 17 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (log‘(!‘(𝑁𝐾))) = Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))
116115fveq2d 6107 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(log‘(!‘(𝑁𝐾)))) = (exp‘Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)))
117113, 116eqtr3d 2646 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘(𝑁𝐾)) = (exp‘Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)))
118111, 117oveq12d 6567 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘𝑁) / (!‘(𝑁𝐾))) = ((exp‘Σ𝑛 ∈ (1...𝑁)(log‘𝑛)) / (exp‘Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))))
11955, 104, 1183eqtr4d 2654 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) = ((!‘𝑁) / (!‘(𝑁𝐾))))
12035, 40, 1193eqtr4d 2654 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘𝐾) · (𝑁C𝐾)) = (exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)))
12119, 120eqtrd 2644 . . 3 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘𝑇) = (exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)))
122 birthday.s . . . . . . . 8 𝑆 = {𝑓𝑓:(1...𝐾)⟶(1...𝑁)}
123 mapvalg 7754 . . . . . . . . 9 (((1...𝑁) ∈ Fin ∧ (1...𝐾) ∈ Fin) → ((1...𝑁) ↑𝑚 (1...𝐾)) = {𝑓𝑓:(1...𝐾)⟶(1...𝑁)})
1244, 3, 123mp2an 704 . . . . . . . 8 ((1...𝑁) ↑𝑚 (1...𝐾)) = {𝑓𝑓:(1...𝐾)⟶(1...𝑁)}
125122, 124eqtr4i 2635 . . . . . . 7 𝑆 = ((1...𝑁) ↑𝑚 (1...𝐾))
126125fveq2i 6106 . . . . . 6 (#‘𝑆) = (#‘((1...𝑁) ↑𝑚 (1...𝐾)))
127 hashmap 13082 . . . . . . 7 (((1...𝑁) ∈ Fin ∧ (1...𝐾) ∈ Fin) → (#‘((1...𝑁) ↑𝑚 (1...𝐾))) = ((#‘(1...𝑁))↑(#‘(1...𝐾))))
1284, 3, 127mp2an 704 . . . . . 6 (#‘((1...𝑁) ↑𝑚 (1...𝐾))) = ((#‘(1...𝑁))↑(#‘(1...𝐾)))
129126, 128eqtri 2632 . . . . 5 (#‘𝑆) = ((#‘(1...𝑁))↑(#‘(1...𝐾)))
13016, 11oveq12d 6567 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘(1...𝑁))↑(#‘(1...𝐾))) = (𝑁𝐾))
131129, 130syl5eq 2656 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘𝑆) = (𝑁𝐾))
132 nncn 10905 . . . . . 6 (𝑁 ∈ ℕ → 𝑁 ∈ ℂ)
133132adantr 480 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝑁 ∈ ℂ)
134 nnne0 10930 . . . . . 6 (𝑁 ∈ ℕ → 𝑁 ≠ 0)
135134adantr 480 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝑁 ≠ 0)
136 elfzelz 12213 . . . . . 6 (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℤ)
137136adantl 481 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝐾 ∈ ℤ)
138 explog 24144 . . . . 5 ((𝑁 ∈ ℂ ∧ 𝑁 ≠ 0 ∧ 𝐾 ∈ ℤ) → (𝑁𝐾) = (exp‘(𝐾 · (log‘𝑁))))
139133, 135, 137, 138syl3anc 1318 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) = (exp‘(𝐾 · (log‘𝑁))))
140131, 139eqtrd 2644 . . 3 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘𝑆) = (exp‘(𝐾 · (log‘𝑁))))
141121, 140oveq12d 6567 . 2 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘𝑇) / (#‘𝑆)) = ((exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) / (exp‘(𝐾 · (log‘𝑁)))))
1429nn0cnd 11230 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝐾 ∈ ℂ)
143 nnrp 11718 . . . . . . 7 (𝑁 ∈ ℕ → 𝑁 ∈ ℝ+)
144143adantr 480 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝑁 ∈ ℝ+)
145144relogcld 24173 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (log‘𝑁) ∈ ℝ)
146145recnd 9947 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (log‘𝑁) ∈ ℂ)
147142, 146mulcld 9939 . . 3 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝐾 · (log‘𝑁)) ∈ ℂ)
148 efsub 14669 . . 3 ((Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) ∈ ℂ ∧ (𝐾 · (log‘𝑁)) ∈ ℂ) → (exp‘(Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁)))) = ((exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) / (exp‘(𝐾 · (log‘𝑁)))))
149101, 147, 148syl2anc 691 . 2 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁)))) = ((exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) / (exp‘(𝐾 · (log‘𝑁)))))
150 relogdiv 24143 . . . . . . 7 ((𝑛 ∈ ℝ+𝑁 ∈ ℝ+) → (log‘(𝑛 / 𝑁)) = ((log‘𝑛) − (log‘𝑁)))
15144, 144, 150syl2anr 494 . . . . . 6 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ ℕ) → (log‘(𝑛 / 𝑁)) = ((log‘𝑛) − (log‘𝑁)))
15299, 151syldan 486 . . . . 5 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (log‘(𝑛 / 𝑁)) = ((log‘𝑛) − (log‘𝑁)))
153152sumeq2dv 14281 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘(𝑛 / 𝑁)) = Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)((log‘𝑛) − (log‘𝑁)))
15468adantr 480 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝑁 ∈ ℤ)
15525nn0zd 11356 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ ℤ)
156155peano2zd 11361 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((𝑁𝐾) + 1) ∈ ℤ)
15799, 44syl 17 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → 𝑛 ∈ ℝ+)
158144adantr 480 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → 𝑁 ∈ ℝ+)
159157, 158rpdivcld 11765 . . . . . . . 8 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (𝑛 / 𝑁) ∈ ℝ+)
160159relogcld 24173 . . . . . . 7 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (log‘(𝑛 / 𝑁)) ∈ ℝ)
161160recnd 9947 . . . . . 6 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (log‘(𝑛 / 𝑁)) ∈ ℂ)
162 oveq1 6556 . . . . . . 7 (𝑛 = (𝑁𝑘) → (𝑛 / 𝑁) = ((𝑁𝑘) / 𝑁))
163162fveq2d 6107 . . . . . 6 (𝑛 = (𝑁𝑘) → (log‘(𝑛 / 𝑁)) = (log‘((𝑁𝑘) / 𝑁)))
164154, 156, 154, 161, 163fsumrev 14353 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘(𝑛 / 𝑁)) = Σ𝑘 ∈ ((𝑁𝑁)...(𝑁 − ((𝑁𝐾) + 1)))(log‘((𝑁𝑘) / 𝑁)))
165133subidd 10259 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝑁) = 0)
166 1cnd 9935 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 1 ∈ ℂ)
167133, 142, 166subsubd 10299 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁 − (𝐾 − 1)) = ((𝑁𝐾) + 1))
168167oveq2d 6565 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁 − (𝑁 − (𝐾 − 1))) = (𝑁 − ((𝑁𝐾) + 1)))
169 ax-1cn 9873 . . . . . . . . . 10 1 ∈ ℂ
170 subcl 10159 . . . . . . . . . 10 ((𝐾 ∈ ℂ ∧ 1 ∈ ℂ) → (𝐾 − 1) ∈ ℂ)
171142, 169, 170sylancl 693 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝐾 − 1) ∈ ℂ)
172133, 171nncand 10276 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁 − (𝑁 − (𝐾 − 1))) = (𝐾 − 1))
173168, 172eqtr3d 2646 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁 − ((𝑁𝐾) + 1)) = (𝐾 − 1))
174165, 173oveq12d 6567 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((𝑁𝑁)...(𝑁 − ((𝑁𝐾) + 1))) = (0...(𝐾 − 1)))
175133adantr 480 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → 𝑁 ∈ ℂ)
176 elfznn0 12302 . . . . . . . . . . 11 (𝑘 ∈ (0...(𝐾 − 1)) → 𝑘 ∈ ℕ0)
177176adantl 481 . . . . . . . . . 10 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → 𝑘 ∈ ℕ0)
178177nn0cnd 11230 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → 𝑘 ∈ ℂ)
179135adantr 480 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → 𝑁 ≠ 0)
180175, 178, 175, 179divsubdird 10719 . . . . . . . 8 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → ((𝑁𝑘) / 𝑁) = ((𝑁 / 𝑁) − (𝑘 / 𝑁)))
181175, 179dividd 10678 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → (𝑁 / 𝑁) = 1)
182181oveq1d 6564 . . . . . . . 8 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → ((𝑁 / 𝑁) − (𝑘 / 𝑁)) = (1 − (𝑘 / 𝑁)))
183180, 182eqtrd 2644 . . . . . . 7 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → ((𝑁𝑘) / 𝑁) = (1 − (𝑘 / 𝑁)))
184183fveq2d 6107 . . . . . 6 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → (log‘((𝑁𝑘) / 𝑁)) = (log‘(1 − (𝑘 / 𝑁))))
185174, 184sumeq12rdv 14285 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑘 ∈ ((𝑁𝑁)...(𝑁 − ((𝑁𝐾) + 1)))(log‘((𝑁𝑘) / 𝑁)) = Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁))))
186164, 185eqtrd 2644 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘(𝑛 / 𝑁)) = Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁))))
187146adantr 480 . . . . . 6 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (log‘𝑁) ∈ ℂ)
18894, 100, 187fsumsub 14362 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)((log‘𝑛) − (log‘𝑁)) = (Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑁)))
189 fsumconst 14364 . . . . . . . 8 (((((𝑁𝐾) + 1)...𝑁) ∈ Fin ∧ (log‘𝑁) ∈ ℂ) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑁) = ((#‘(((𝑁𝐾) + 1)...𝑁)) · (log‘𝑁)))
19094, 146, 189syl2anc 691 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑁) = ((#‘(((𝑁𝐾) + 1)...𝑁)) · (log‘𝑁)))
191 1zzd 11285 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 1 ∈ ℤ)
192 fzen 12229 . . . . . . . . . . . 12 ((1 ∈ ℤ ∧ 𝐾 ∈ ℤ ∧ (𝑁𝐾) ∈ ℤ) → (1...𝐾) ≈ ((1 + (𝑁𝐾))...(𝐾 + (𝑁𝐾))))
193191, 137, 155, 192syl3anc 1318 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1...𝐾) ≈ ((1 + (𝑁𝐾))...(𝐾 + (𝑁𝐾))))
19425nn0cnd 11230 . . . . . . . . . . . . 13 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ ℂ)
195 addcom 10101 . . . . . . . . . . . . 13 ((1 ∈ ℂ ∧ (𝑁𝐾) ∈ ℂ) → (1 + (𝑁𝐾)) = ((𝑁𝐾) + 1))
196169, 194, 195sylancr 694 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1 + (𝑁𝐾)) = ((𝑁𝐾) + 1))
197142, 133pncan3d 10274 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝐾 + (𝑁𝐾)) = 𝑁)
198196, 197oveq12d 6567 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((1 + (𝑁𝐾))...(𝐾 + (𝑁𝐾))) = (((𝑁𝐾) + 1)...𝑁))
199193, 198breqtrd 4609 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1...𝐾) ≈ (((𝑁𝐾) + 1)...𝑁))
200 hasheni 12998 . . . . . . . . . 10 ((1...𝐾) ≈ (((𝑁𝐾) + 1)...𝑁) → (#‘(1...𝐾)) = (#‘(((𝑁𝐾) + 1)...𝑁)))
201199, 200syl 17 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘(1...𝐾)) = (#‘(((𝑁𝐾) + 1)...𝑁)))
202201, 11eqtr3d 2646 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘(((𝑁𝐾) + 1)...𝑁)) = 𝐾)
203202oveq1d 6564 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘(((𝑁𝐾) + 1)...𝑁)) · (log‘𝑁)) = (𝐾 · (log‘𝑁)))
204190, 203eqtrd 2644 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑁) = (𝐾 · (log‘𝑁)))
205204oveq2d 6565 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑁)) = (Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁))))
206188, 205eqtrd 2644 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)((log‘𝑛) − (log‘𝑁)) = (Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁))))
207153, 186, 2063eqtr3rd 2653 . . 3 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁))) = Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁))))
208207fveq2d 6107 . 2 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁)))) = (exp‘Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁)))))
209141, 149, 2083eqtr2d 2650 1 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘𝑇) / (#‘𝑆)) = (exp‘Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁)))))
 Colors of variables: wff setvar class Syntax hints:   → wi 4   ↔ wb 195   ∨ wo 382   ∧ wa 383   = wceq 1475   ∈ wcel 1977  {cab 2596   ≠ wne 2780   ∪ cun 3538   ∩ cin 3539  ∅c0 3874   class class class wbr 4583  ⟶wf 5800  –1-1→wf1 5801  ‘cfv 5804  (class class class)co 6549   ↑𝑚 cmap 7744   ≈ cen 7838  Fincfn 7841  ℂcc 9813  0cc0 9815  1c1 9816   + caddc 9818   · cmul 9820   < clt 9953   ≤ cle 9954   − cmin 10145   / cdiv 10563  ℕcn 10897  ℕ0cn0 11169  ℤcz 11254  ℤ≥cuz 11563  ℝ+crp 11708  ...cfz 12197  ↑cexp 12722  !cfa 12922  Ccbc 12951  #chash 12979  Σcsu 14264  expce 14631  logclog 24105 This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1713  ax-4 1728  ax-5 1827  ax-6 1875  ax-7 1922  ax-8 1979  ax-9 1986  ax-10 2006  ax-11 2021  ax-12 2034  ax-13 2234  ax-ext 2590  ax-rep 4699  ax-sep 4709  ax-nul 4717  ax-pow 4769  ax-pr 4833  ax-un 6847  ax-inf2 8421  ax-cnex 9871  ax-resscn 9872  ax-1cn 9873  ax-icn 9874  ax-addcl 9875  ax-addrcl 9876  ax-mulcl 9877  ax-mulrcl 9878  ax-mulcom 9879  ax-addass 9880  ax-mulass 9881  ax-distr 9882  ax-i2m1 9883  ax-1ne0 9884  ax-1rid 9885  ax-rnegex 9886  ax-rrecex 9887  ax-cnre 9888  ax-pre-lttri 9889  ax-pre-lttrn 9890  ax-pre-ltadd 9891  ax-pre-mulgt0 9892  ax-pre-sup 9893  ax-addf 9894  ax-mulf 9895 This theorem depends on definitions:  df-bi 196  df-or 384  df-an 385  df-3or 1032  df-3an 1033  df-tru 1478  df-fal 1481  df-ex 1696  df-nf 1701  df-sb 1868  df-eu 2462  df-mo 2463  df-clab 2597  df-cleq 2603  df-clel 2606  df-nfc 2740  df-ne 2782  df-nel 2783  df-ral 2901  df-rex 2902  df-reu 2903  df-rmo 2904  df-rab 2905  df-v 3175  df-sbc 3403  df-csb 3500  df-dif 3543  df-un 3545  df-in 3547  df-ss 3554  df-pss 3556  df-nul 3875  df-if 4037  df-pw 4110  df-sn 4126  df-pr 4128  df-tp 4130  df-op 4132  df-uni 4373  df-int 4411  df-iun 4457  df-iin 4458  df-br 4584  df-opab 4644  df-mpt 4645  df-tr 4681  df-eprel 4949  df-id 4953  df-po 4959  df-so 4960  df-fr 4997  df-se 4998  df-we 4999  df-xp 5044  df-rel 5045  df-cnv 5046  df-co 5047  df-dm 5048  df-rn 5049  df-res 5050  df-ima 5051  df-pred 5597  df-ord 5643  df-on 5644  df-lim 5645  df-suc 5646  df-iota 5768  df-fun 5806  df-fn 5807  df-f 5808  df-f1 5809  df-fo 5810  df-f1o 5811  df-fv 5812  df-isom 5813  df-riota 6511  df-ov 6552  df-oprab 6553  df-mpt2 6554  df-of 6795  df-om 6958  df-1st 7059  df-2nd 7060  df-supp 7183  df-wrecs 7294  df-recs 7355  df-rdg 7393  df-1o 7447  df-2o 7448  df-oadd 7451  df-er 7629  df-map 7746  df-pm 7747  df-ixp 7795  df-en 7842  df-dom 7843  df-sdom 7844  df-fin 7845  df-fsupp 8159  df-fi 8200  df-sup 8231  df-inf 8232  df-oi 8298  df-card 8648  df-cda 8873  df-pnf 9955  df-mnf 9956  df-xr 9957  df-ltxr 9958  df-le 9959  df-sub 10147  df-neg 10148  df-div 10564  df-nn 10898  df-2 10956  df-3 10957  df-4 10958  df-5 10959  df-6 10960  df-7 10961  df-8 10962  df-9 10963  df-n0 11170  df-xnn0 11241  df-z 11255  df-dec 11370  df-uz 11564  df-q 11665  df-rp 11709  df-xneg 11822  df-xadd 11823  df-xmul 11824  df-ioo 12050  df-ioc 12051  df-ico 12052  df-icc 12053  df-fz 12198  df-fzo 12335  df-fl 12455  df-mod 12531  df-seq 12664  df-exp 12723  df-fac 12923  df-bc 12952  df-hash 12980  df-shft 13655  df-cj 13687  df-re 13688  df-im 13689  df-sqrt 13823  df-abs 13824  df-limsup 14050  df-clim 14067  df-rlim 14068  df-sum 14265  df-ef 14637  df-sin 14639  df-cos 14640  df-pi 14642  df-struct 15697  df-ndx 15698  df-slot 15699  df-base 15700  df-sets 15701  df-ress 15702  df-plusg 15781  df-mulr 15782  df-starv 15783  df-sca 15784  df-vsca 15785  df-ip 15786  df-tset 15787  df-ple 15788  df-ds 15791  df-unif 15792  df-hom 15793  df-cco 15794  df-rest 15906  df-topn 15907  df-0g 15925  df-gsum 15926  df-topgen 15927  df-pt 15928  df-prds 15931  df-xrs 15985  df-qtop 15990  df-imas 15991  df-xps 15993  df-mre 16069  df-mrc 16070  df-acs 16072  df-mgm 17065  df-sgrp 17107  df-mnd 17118  df-submnd 17159  df-mulg 17364  df-cntz 17573  df-cmn 18018  df-psmet 19559  df-xmet 19560  df-met 19561  df-bl 19562  df-mopn 19563  df-fbas 19564  df-fg 19565  df-cnfld 19568  df-top 20521  df-bases 20522  df-topon 20523  df-topsp 20524  df-cld 20633  df-ntr 20634  df-cls 20635  df-nei 20712  df-lp 20750  df-perf 20751  df-cn 20841  df-cnp 20842  df-haus 20929  df-tx 21175  df-hmeo 21368  df-fil 21460  df-fm 21552  df-flim 21553  df-flf 21554  df-xms 21935  df-ms 21936  df-tms 21937  df-cncf 22489  df-limc 23436  df-dv 23437  df-log 24107 This theorem is referenced by:  birthdaylem3  24480
 Copyright terms: Public domain W3C validator