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

Theorem birthdaylem2 24579
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 6151 . . . . . 6 (#‘𝑇) = (#‘{𝑓𝑓:(1...𝐾)–1-1→(1...𝑁)})
3 fzfi 12711 . . . . . . 7 (1...𝐾) ∈ Fin
4 fzfi 12711 . . . . . . 7 (1...𝑁) ∈ Fin
5 hashf1 13179 . . . . . . 7 (((1...𝐾) ∈ Fin ∧ (1...𝑁) ∈ Fin) → (#‘{𝑓𝑓:(1...𝐾)–1-1→(1...𝑁)}) = ((!‘(#‘(1...𝐾))) · ((#‘(1...𝑁))C(#‘(1...𝐾)))))
63, 4, 5mp2an 707 . . . . . 6 (#‘{𝑓𝑓:(1...𝐾)–1-1→(1...𝑁)}) = ((!‘(#‘(1...𝐾))) · ((#‘(1...𝑁))C(#‘(1...𝐾))))
72, 6eqtri 2643 . . . . 5 (#‘𝑇) = ((!‘(#‘(1...𝐾))) · ((#‘(1...𝑁))C(#‘(1...𝐾))))
8 elfznn0 12374 . . . . . . . . 9 (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℕ0)
98adantl 482 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝐾 ∈ ℕ0)
10 hashfz1 13074 . . . . . . . 8 (𝐾 ∈ ℕ0 → (#‘(1...𝐾)) = 𝐾)
119, 10syl 17 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘(1...𝐾)) = 𝐾)
1211fveq2d 6152 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘(#‘(1...𝐾))) = (!‘𝐾))
13 nnnn0 11243 . . . . . . . . 9 (𝑁 ∈ ℕ → 𝑁 ∈ ℕ0)
14 hashfz1 13074 . . . . . . . . 9 (𝑁 ∈ ℕ0 → (#‘(1...𝑁)) = 𝑁)
1513, 14syl 17 . . . . . . . 8 (𝑁 ∈ ℕ → (#‘(1...𝑁)) = 𝑁)
1615adantr 481 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘(1...𝑁)) = 𝑁)
1716, 11oveq12d 6622 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘(1...𝑁))C(#‘(1...𝐾))) = (𝑁C𝐾))
1812, 17oveq12d 6622 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘(#‘(1...𝐾))) · ((#‘(1...𝑁))C(#‘(1...𝐾)))) = ((!‘𝐾) · (𝑁C𝐾)))
197, 18syl5eq 2667 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘𝑇) = ((!‘𝐾) · (𝑁C𝐾)))
2013adantr 481 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝑁 ∈ ℕ0)
21 faccl 13010 . . . . . . . . 9 (𝑁 ∈ ℕ0 → (!‘𝑁) ∈ ℕ)
2220, 21syl 17 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝑁) ∈ ℕ)
2322nncnd 10980 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝑁) ∈ ℂ)
24 fznn0sub 12315 . . . . . . . . . 10 (𝐾 ∈ (0...𝑁) → (𝑁𝐾) ∈ ℕ0)
2524adantl 482 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ ℕ0)
26 faccl 13010 . . . . . . . . 9 ((𝑁𝐾) ∈ ℕ0 → (!‘(𝑁𝐾)) ∈ ℕ)
2725, 26syl 17 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘(𝑁𝐾)) ∈ ℕ)
2827nncnd 10980 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘(𝑁𝐾)) ∈ ℂ)
2927nnne0d 11009 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘(𝑁𝐾)) ≠ 0)
3023, 28, 29divcld 10745 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘𝑁) / (!‘(𝑁𝐾))) ∈ ℂ)
31 faccl 13010 . . . . . . . 8 (𝐾 ∈ ℕ0 → (!‘𝐾) ∈ ℕ)
329, 31syl 17 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝐾) ∈ ℕ)
3332nncnd 10980 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝐾) ∈ ℂ)
3432nnne0d 11009 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝐾) ≠ 0)
3530, 33, 34divcan2d 10747 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘𝐾) · (((!‘𝑁) / (!‘(𝑁𝐾))) / (!‘𝐾))) = ((!‘𝑁) / (!‘(𝑁𝐾))))
36 bcval2 13032 . . . . . . . 8 (𝐾 ∈ (0...𝑁) → (𝑁C𝐾) = ((!‘𝑁) / ((!‘(𝑁𝐾)) · (!‘𝐾))))
3736adantl 482 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁C𝐾) = ((!‘𝑁) / ((!‘(𝑁𝐾)) · (!‘𝐾))))
3823, 28, 33, 29, 34divdiv1d 10776 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (((!‘𝑁) / (!‘(𝑁𝐾))) / (!‘𝐾)) = ((!‘𝑁) / ((!‘(𝑁𝐾)) · (!‘𝐾))))
3937, 38eqtr4d 2658 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁C𝐾) = (((!‘𝑁) / (!‘(𝑁𝐾))) / (!‘𝐾)))
4039oveq2d 6620 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘𝐾) · (𝑁C𝐾)) = ((!‘𝐾) · (((!‘𝑁) / (!‘(𝑁𝐾))) / (!‘𝐾))))
41 fzfid 12712 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1...𝑁) ∈ Fin)
42 elfznn 12312 . . . . . . . . . 10 (𝑛 ∈ (1...𝑁) → 𝑛 ∈ ℕ)
4342adantl 482 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (1...𝑁)) → 𝑛 ∈ ℕ)
44 nnrp 11786 . . . . . . . . . . 11 (𝑛 ∈ ℕ → 𝑛 ∈ ℝ+)
4544relogcld 24273 . . . . . . . . . 10 (𝑛 ∈ ℕ → (log‘𝑛) ∈ ℝ)
4645recnd 10012 . . . . . . . . 9 (𝑛 ∈ ℕ → (log‘𝑛) ∈ ℂ)
4743, 46syl 17 . . . . . . . 8 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (1...𝑁)) → (log‘𝑛) ∈ ℂ)
4841, 47fsumcl 14397 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (1...𝑁)(log‘𝑛) ∈ ℂ)
49 fzfid 12712 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1...(𝑁𝐾)) ∈ Fin)
50 elfznn 12312 . . . . . . . . . 10 (𝑛 ∈ (1...(𝑁𝐾)) → 𝑛 ∈ ℕ)
5150adantl 482 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (1...(𝑁𝐾))) → 𝑛 ∈ ℕ)
5251, 46syl 17 . . . . . . . 8 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (1...(𝑁𝐾))) → (log‘𝑛) ∈ ℂ)
5349, 52fsumcl 14397 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛) ∈ ℂ)
54 efsub 14755 . . . . . . 7 ((Σ𝑛 ∈ (1...𝑁)(log‘𝑛) ∈ ℂ ∧ Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛) ∈ ℂ) → (exp‘(Σ𝑛 ∈ (1...𝑁)(log‘𝑛) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))) = ((exp‘Σ𝑛 ∈ (1...𝑁)(log‘𝑛)) / (exp‘Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))))
5548, 53, 54syl2anc 692 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(Σ𝑛 ∈ (1...𝑁)(log‘𝑛) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))) = ((exp‘Σ𝑛 ∈ (1...𝑁)(log‘𝑛)) / (exp‘Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))))
5625nn0red 11296 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ ℝ)
5756ltp1d 10898 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) < ((𝑁𝐾) + 1))
58 fzdisj 12310 . . . . . . . . . . 11 ((𝑁𝐾) < ((𝑁𝐾) + 1) → ((1...(𝑁𝐾)) ∩ (((𝑁𝐾) + 1)...𝑁)) = ∅)
5957, 58syl 17 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((1...(𝑁𝐾)) ∩ (((𝑁𝐾) + 1)...𝑁)) = ∅)
60 fznn0sub2 12387 . . . . . . . . . . . . . . . 16 (𝐾 ∈ (0...𝑁) → (𝑁𝐾) ∈ (0...𝑁))
6160adantl 482 . . . . . . . . . . . . . . 15 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ (0...𝑁))
62 elfzle2 12287 . . . . . . . . . . . . . . 15 ((𝑁𝐾) ∈ (0...𝑁) → (𝑁𝐾) ≤ 𝑁)
6361, 62syl 17 . . . . . . . . . . . . . 14 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ≤ 𝑁)
6463adantr 481 . . . . . . . . . . . . 13 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → (𝑁𝐾) ≤ 𝑁)
65 simpr 477 . . . . . . . . . . . . . . 15 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → (𝑁𝐾) ∈ ℕ)
66 nnuz 11667 . . . . . . . . . . . . . . 15 ℕ = (ℤ‘1)
6765, 66syl6eleq 2708 . . . . . . . . . . . . . 14 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → (𝑁𝐾) ∈ (ℤ‘1))
68 nnz 11343 . . . . . . . . . . . . . . 15 (𝑁 ∈ ℕ → 𝑁 ∈ ℤ)
6968ad2antrr 761 . . . . . . . . . . . . . 14 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → 𝑁 ∈ ℤ)
70 elfz5 12276 . . . . . . . . . . . . . 14 (((𝑁𝐾) ∈ (ℤ‘1) ∧ 𝑁 ∈ ℤ) → ((𝑁𝐾) ∈ (1...𝑁) ↔ (𝑁𝐾) ≤ 𝑁))
7167, 69, 70syl2anc 692 . . . . . . . . . . . . 13 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → ((𝑁𝐾) ∈ (1...𝑁) ↔ (𝑁𝐾) ≤ 𝑁))
7264, 71mpbird 247 . . . . . . . . . . . 12 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → (𝑁𝐾) ∈ (1...𝑁))
73 fzsplit 12309 . . . . . . . . . . . 12 ((𝑁𝐾) ∈ (1...𝑁) → (1...𝑁) = ((1...(𝑁𝐾)) ∪ (((𝑁𝐾) + 1)...𝑁)))
7472, 73syl 17 . . . . . . . . . . 11 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) ∈ ℕ) → (1...𝑁) = ((1...(𝑁𝐾)) ∪ (((𝑁𝐾) + 1)...𝑁)))
75 simpr 477 . . . . . . . . . . . . . . 15 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (𝑁𝐾) = 0)
7675oveq2d 6620 . . . . . . . . . . . . . 14 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (1...(𝑁𝐾)) = (1...0))
77 fz10 12304 . . . . . . . . . . . . . 14 (1...0) = ∅
7876, 77syl6eq 2671 . . . . . . . . . . . . 13 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (1...(𝑁𝐾)) = ∅)
7978uneq1d 3744 . . . . . . . . . . . 12 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → ((1...(𝑁𝐾)) ∪ (((𝑁𝐾) + 1)...𝑁)) = (∅ ∪ (((𝑁𝐾) + 1)...𝑁)))
80 uncom 3735 . . . . . . . . . . . . . 14 (∅ ∪ (((𝑁𝐾) + 1)...𝑁)) = ((((𝑁𝐾) + 1)...𝑁) ∪ ∅)
81 un0 3939 . . . . . . . . . . . . . 14 ((((𝑁𝐾) + 1)...𝑁) ∪ ∅) = (((𝑁𝐾) + 1)...𝑁)
8280, 81eqtri 2643 . . . . . . . . . . . . 13 (∅ ∪ (((𝑁𝐾) + 1)...𝑁)) = (((𝑁𝐾) + 1)...𝑁)
8375oveq1d 6619 . . . . . . . . . . . . . . 15 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → ((𝑁𝐾) + 1) = (0 + 1))
84 1e0p1 11496 . . . . . . . . . . . . . . 15 1 = (0 + 1)
8583, 84syl6eqr 2673 . . . . . . . . . . . . . 14 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → ((𝑁𝐾) + 1) = 1)
8685oveq1d 6619 . . . . . . . . . . . . 13 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (((𝑁𝐾) + 1)...𝑁) = (1...𝑁))
8782, 86syl5eq 2667 . . . . . . . . . . . 12 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (∅ ∪ (((𝑁𝐾) + 1)...𝑁)) = (1...𝑁))
8879, 87eqtr2d 2656 . . . . . . . . . . 11 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ (𝑁𝐾) = 0) → (1...𝑁) = ((1...(𝑁𝐾)) ∪ (((𝑁𝐾) + 1)...𝑁)))
89 elnn0 11238 . . . . . . . . . . . 12 ((𝑁𝐾) ∈ ℕ0 ↔ ((𝑁𝐾) ∈ ℕ ∨ (𝑁𝐾) = 0))
9025, 89sylib 208 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((𝑁𝐾) ∈ ℕ ∨ (𝑁𝐾) = 0))
9174, 88, 90mpjaodan 826 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1...𝑁) = ((1...(𝑁𝐾)) ∪ (((𝑁𝐾) + 1)...𝑁)))
9259, 91, 41, 47fsumsplit 14404 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (1...𝑁)(log‘𝑛) = (Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛) + Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)))
9392oveq1d 6619 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (Σ𝑛 ∈ (1...𝑁)(log‘𝑛) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)) = ((Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛) + Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)))
94 fzfid 12712 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (((𝑁𝐾) + 1)...𝑁) ∈ Fin)
95 nn0p1nn 11276 . . . . . . . . . . . . 13 ((𝑁𝐾) ∈ ℕ0 → ((𝑁𝐾) + 1) ∈ ℕ)
9625, 95syl 17 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((𝑁𝐾) + 1) ∈ ℕ)
97 elfzuz 12280 . . . . . . . . . . . 12 (𝑛 ∈ (((𝑁𝐾) + 1)...𝑁) → 𝑛 ∈ (ℤ‘((𝑁𝐾) + 1)))
98 eluznn 11702 . . . . . . . . . . . 12 ((((𝑁𝐾) + 1) ∈ ℕ ∧ 𝑛 ∈ (ℤ‘((𝑁𝐾) + 1))) → 𝑛 ∈ ℕ)
9996, 97, 98syl2an 494 . . . . . . . . . . 11 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → 𝑛 ∈ ℕ)
10099, 46syl 17 . . . . . . . . . 10 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (log‘𝑛) ∈ ℂ)
10194, 100fsumcl 14397 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) ∈ ℂ)
10253, 101pncan2d 10338 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛) + Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)) = Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛))
10393, 102eqtr2d 2656 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) = (Σ𝑛 ∈ (1...𝑁)(log‘𝑛) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)))
104103fveq2d 6152 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) = (exp‘(Σ𝑛 ∈ (1...𝑁)(log‘𝑛) − Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))))
10522nnne0d 11009 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝑁) ≠ 0)
106 eflog 24227 . . . . . . . . 9 (((!‘𝑁) ∈ ℂ ∧ (!‘𝑁) ≠ 0) → (exp‘(log‘(!‘𝑁))) = (!‘𝑁))
10723, 105, 106syl2anc 692 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(log‘(!‘𝑁))) = (!‘𝑁))
108 logfac 24251 . . . . . . . . . 10 (𝑁 ∈ ℕ0 → (log‘(!‘𝑁)) = Σ𝑛 ∈ (1...𝑁)(log‘𝑛))
10920, 108syl 17 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (log‘(!‘𝑁)) = Σ𝑛 ∈ (1...𝑁)(log‘𝑛))
110109fveq2d 6152 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(log‘(!‘𝑁))) = (exp‘Σ𝑛 ∈ (1...𝑁)(log‘𝑛)))
111107, 110eqtr3d 2657 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘𝑁) = (exp‘Σ𝑛 ∈ (1...𝑁)(log‘𝑛)))
112 eflog 24227 . . . . . . . . 9 (((!‘(𝑁𝐾)) ∈ ℂ ∧ (!‘(𝑁𝐾)) ≠ 0) → (exp‘(log‘(!‘(𝑁𝐾)))) = (!‘(𝑁𝐾)))
11328, 29, 112syl2anc 692 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(log‘(!‘(𝑁𝐾)))) = (!‘(𝑁𝐾)))
114 logfac 24251 . . . . . . . . . 10 ((𝑁𝐾) ∈ ℕ0 → (log‘(!‘(𝑁𝐾))) = Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))
11525, 114syl 17 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (log‘(!‘(𝑁𝐾))) = Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))
116115fveq2d 6152 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(log‘(!‘(𝑁𝐾)))) = (exp‘Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)))
117113, 116eqtr3d 2657 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (!‘(𝑁𝐾)) = (exp‘Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛)))
118111, 117oveq12d 6622 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘𝑁) / (!‘(𝑁𝐾))) = ((exp‘Σ𝑛 ∈ (1...𝑁)(log‘𝑛)) / (exp‘Σ𝑛 ∈ (1...(𝑁𝐾))(log‘𝑛))))
11955, 104, 1183eqtr4d 2665 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) = ((!‘𝑁) / (!‘(𝑁𝐾))))
12035, 40, 1193eqtr4d 2665 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((!‘𝐾) · (𝑁C𝐾)) = (exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)))
12119, 120eqtrd 2655 . . 3 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘𝑇) = (exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)))
122 birthday.s . . . . . . . 8 𝑆 = {𝑓𝑓:(1...𝐾)⟶(1...𝑁)}
123 mapvalg 7812 . . . . . . . . 9 (((1...𝑁) ∈ Fin ∧ (1...𝐾) ∈ Fin) → ((1...𝑁) ↑𝑚 (1...𝐾)) = {𝑓𝑓:(1...𝐾)⟶(1...𝑁)})
1244, 3, 123mp2an 707 . . . . . . . 8 ((1...𝑁) ↑𝑚 (1...𝐾)) = {𝑓𝑓:(1...𝐾)⟶(1...𝑁)}
125122, 124eqtr4i 2646 . . . . . . 7 𝑆 = ((1...𝑁) ↑𝑚 (1...𝐾))
126125fveq2i 6151 . . . . . 6 (#‘𝑆) = (#‘((1...𝑁) ↑𝑚 (1...𝐾)))
127 hashmap 13162 . . . . . . 7 (((1...𝑁) ∈ Fin ∧ (1...𝐾) ∈ Fin) → (#‘((1...𝑁) ↑𝑚 (1...𝐾))) = ((#‘(1...𝑁))↑(#‘(1...𝐾))))
1284, 3, 127mp2an 707 . . . . . 6 (#‘((1...𝑁) ↑𝑚 (1...𝐾))) = ((#‘(1...𝑁))↑(#‘(1...𝐾)))
129126, 128eqtri 2643 . . . . 5 (#‘𝑆) = ((#‘(1...𝑁))↑(#‘(1...𝐾)))
13016, 11oveq12d 6622 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘(1...𝑁))↑(#‘(1...𝐾))) = (𝑁𝐾))
131129, 130syl5eq 2667 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘𝑆) = (𝑁𝐾))
132 nncn 10972 . . . . . 6 (𝑁 ∈ ℕ → 𝑁 ∈ ℂ)
133132adantr 481 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝑁 ∈ ℂ)
134 nnne0 10997 . . . . . 6 (𝑁 ∈ ℕ → 𝑁 ≠ 0)
135134adantr 481 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝑁 ≠ 0)
136 elfzelz 12284 . . . . . 6 (𝐾 ∈ (0...𝑁) → 𝐾 ∈ ℤ)
137136adantl 482 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝐾 ∈ ℤ)
138 explog 24244 . . . . 5 ((𝑁 ∈ ℂ ∧ 𝑁 ≠ 0 ∧ 𝐾 ∈ ℤ) → (𝑁𝐾) = (exp‘(𝐾 · (log‘𝑁))))
139133, 135, 137, 138syl3anc 1323 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) = (exp‘(𝐾 · (log‘𝑁))))
140131, 139eqtrd 2655 . . 3 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘𝑆) = (exp‘(𝐾 · (log‘𝑁))))
141121, 140oveq12d 6622 . 2 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘𝑇) / (#‘𝑆)) = ((exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) / (exp‘(𝐾 · (log‘𝑁)))))
1429nn0cnd 11297 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝐾 ∈ ℂ)
143 nnrp 11786 . . . . . . 7 (𝑁 ∈ ℕ → 𝑁 ∈ ℝ+)
144143adantr 481 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝑁 ∈ ℝ+)
145144relogcld 24273 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (log‘𝑁) ∈ ℝ)
146145recnd 10012 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (log‘𝑁) ∈ ℂ)
147142, 146mulcld 10004 . . 3 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝐾 · (log‘𝑁)) ∈ ℂ)
148 efsub 14755 . . 3 ((Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) ∈ ℂ ∧ (𝐾 · (log‘𝑁)) ∈ ℂ) → (exp‘(Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁)))) = ((exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) / (exp‘(𝐾 · (log‘𝑁)))))
149101, 147, 148syl2anc 692 . 2 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁)))) = ((exp‘Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛)) / (exp‘(𝐾 · (log‘𝑁)))))
150 relogdiv 24243 . . . . . . 7 ((𝑛 ∈ ℝ+𝑁 ∈ ℝ+) → (log‘(𝑛 / 𝑁)) = ((log‘𝑛) − (log‘𝑁)))
15144, 144, 150syl2anr 495 . . . . . 6 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ ℕ) → (log‘(𝑛 / 𝑁)) = ((log‘𝑛) − (log‘𝑁)))
15299, 151syldan 487 . . . . 5 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (log‘(𝑛 / 𝑁)) = ((log‘𝑛) − (log‘𝑁)))
153152sumeq2dv 14367 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘(𝑛 / 𝑁)) = Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)((log‘𝑛) − (log‘𝑁)))
15468adantr 481 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 𝑁 ∈ ℤ)
15525nn0zd 11424 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ ℤ)
156155peano2zd 11429 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((𝑁𝐾) + 1) ∈ ℤ)
15799, 44syl 17 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → 𝑛 ∈ ℝ+)
158144adantr 481 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → 𝑁 ∈ ℝ+)
159157, 158rpdivcld 11833 . . . . . . . 8 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (𝑛 / 𝑁) ∈ ℝ+)
160159relogcld 24273 . . . . . . 7 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (log‘(𝑛 / 𝑁)) ∈ ℝ)
161160recnd 10012 . . . . . 6 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (log‘(𝑛 / 𝑁)) ∈ ℂ)
162 oveq1 6611 . . . . . . 7 (𝑛 = (𝑁𝑘) → (𝑛 / 𝑁) = ((𝑁𝑘) / 𝑁))
163162fveq2d 6152 . . . . . 6 (𝑛 = (𝑁𝑘) → (log‘(𝑛 / 𝑁)) = (log‘((𝑁𝑘) / 𝑁)))
164154, 156, 154, 161, 163fsumrev 14439 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘(𝑛 / 𝑁)) = Σ𝑘 ∈ ((𝑁𝑁)...(𝑁 − ((𝑁𝐾) + 1)))(log‘((𝑁𝑘) / 𝑁)))
165133subidd 10324 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝑁) = 0)
166 1cnd 10000 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 1 ∈ ℂ)
167133, 142, 166subsubd 10364 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁 − (𝐾 − 1)) = ((𝑁𝐾) + 1))
168167oveq2d 6620 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁 − (𝑁 − (𝐾 − 1))) = (𝑁 − ((𝑁𝐾) + 1)))
169 ax-1cn 9938 . . . . . . . . . 10 1 ∈ ℂ
170 subcl 10224 . . . . . . . . . 10 ((𝐾 ∈ ℂ ∧ 1 ∈ ℂ) → (𝐾 − 1) ∈ ℂ)
171142, 169, 170sylancl 693 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝐾 − 1) ∈ ℂ)
172133, 171nncand 10341 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁 − (𝑁 − (𝐾 − 1))) = (𝐾 − 1))
173168, 172eqtr3d 2657 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁 − ((𝑁𝐾) + 1)) = (𝐾 − 1))
174165, 173oveq12d 6622 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((𝑁𝑁)...(𝑁 − ((𝑁𝐾) + 1))) = (0...(𝐾 − 1)))
175133adantr 481 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → 𝑁 ∈ ℂ)
176 elfznn0 12374 . . . . . . . . . . 11 (𝑘 ∈ (0...(𝐾 − 1)) → 𝑘 ∈ ℕ0)
177176adantl 482 . . . . . . . . . 10 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → 𝑘 ∈ ℕ0)
178177nn0cnd 11297 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → 𝑘 ∈ ℂ)
179135adantr 481 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → 𝑁 ≠ 0)
180175, 178, 175, 179divsubdird 10784 . . . . . . . 8 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → ((𝑁𝑘) / 𝑁) = ((𝑁 / 𝑁) − (𝑘 / 𝑁)))
181175, 179dividd 10743 . . . . . . . . 9 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → (𝑁 / 𝑁) = 1)
182181oveq1d 6619 . . . . . . . 8 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → ((𝑁 / 𝑁) − (𝑘 / 𝑁)) = (1 − (𝑘 / 𝑁)))
183180, 182eqtrd 2655 . . . . . . 7 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → ((𝑁𝑘) / 𝑁) = (1 − (𝑘 / 𝑁)))
184183fveq2d 6152 . . . . . 6 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑘 ∈ (0...(𝐾 − 1))) → (log‘((𝑁𝑘) / 𝑁)) = (log‘(1 − (𝑘 / 𝑁))))
185174, 184sumeq12rdv 14371 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑘 ∈ ((𝑁𝑁)...(𝑁 − ((𝑁𝐾) + 1)))(log‘((𝑁𝑘) / 𝑁)) = Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁))))
186164, 185eqtrd 2655 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘(𝑛 / 𝑁)) = Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁))))
187146adantr 481 . . . . . 6 (((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) ∧ 𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)) → (log‘𝑁) ∈ ℂ)
18894, 100, 187fsumsub 14448 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)((log‘𝑛) − (log‘𝑁)) = (Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑁)))
189 fsumconst 14450 . . . . . . . 8 (((((𝑁𝐾) + 1)...𝑁) ∈ Fin ∧ (log‘𝑁) ∈ ℂ) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑁) = ((#‘(((𝑁𝐾) + 1)...𝑁)) · (log‘𝑁)))
19094, 146, 189syl2anc 692 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑁) = ((#‘(((𝑁𝐾) + 1)...𝑁)) · (log‘𝑁)))
191 1zzd 11352 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → 1 ∈ ℤ)
192 fzen 12300 . . . . . . . . . . . 12 ((1 ∈ ℤ ∧ 𝐾 ∈ ℤ ∧ (𝑁𝐾) ∈ ℤ) → (1...𝐾) ≈ ((1 + (𝑁𝐾))...(𝐾 + (𝑁𝐾))))
193191, 137, 155, 192syl3anc 1323 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1...𝐾) ≈ ((1 + (𝑁𝐾))...(𝐾 + (𝑁𝐾))))
19425nn0cnd 11297 . . . . . . . . . . . . 13 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝑁𝐾) ∈ ℂ)
195 addcom 10166 . . . . . . . . . . . . 13 ((1 ∈ ℂ ∧ (𝑁𝐾) ∈ ℂ) → (1 + (𝑁𝐾)) = ((𝑁𝐾) + 1))
196169, 194, 195sylancr 694 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1 + (𝑁𝐾)) = ((𝑁𝐾) + 1))
197142, 133pncan3d 10339 . . . . . . . . . . . 12 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (𝐾 + (𝑁𝐾)) = 𝑁)
198196, 197oveq12d 6622 . . . . . . . . . . 11 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((1 + (𝑁𝐾))...(𝐾 + (𝑁𝐾))) = (((𝑁𝐾) + 1)...𝑁))
199193, 198breqtrd 4639 . . . . . . . . . 10 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (1...𝐾) ≈ (((𝑁𝐾) + 1)...𝑁))
200 hasheni 13076 . . . . . . . . . 10 ((1...𝐾) ≈ (((𝑁𝐾) + 1)...𝑁) → (#‘(1...𝐾)) = (#‘(((𝑁𝐾) + 1)...𝑁)))
201199, 200syl 17 . . . . . . . . 9 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘(1...𝐾)) = (#‘(((𝑁𝐾) + 1)...𝑁)))
202201, 11eqtr3d 2657 . . . . . . . 8 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (#‘(((𝑁𝐾) + 1)...𝑁)) = 𝐾)
203202oveq1d 6619 . . . . . . 7 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘(((𝑁𝐾) + 1)...𝑁)) · (log‘𝑁)) = (𝐾 · (log‘𝑁)))
204190, 203eqtrd 2655 . . . . . 6 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑁) = (𝐾 · (log‘𝑁)))
205204oveq2d 6620 . . . . 5 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑁)) = (Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁))))
206188, 205eqtrd 2655 . . . 4 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)((log‘𝑛) − (log‘𝑁)) = (Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁))))
207153, 186, 2063eqtr3rd 2664 . . 3 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁))) = Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁))))
208207fveq2d 6152 . 2 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → (exp‘(Σ𝑛 ∈ (((𝑁𝐾) + 1)...𝑁)(log‘𝑛) − (𝐾 · (log‘𝑁)))) = (exp‘Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁)))))
209141, 149, 2083eqtr2d 2661 1 ((𝑁 ∈ ℕ ∧ 𝐾 ∈ (0...𝑁)) → ((#‘𝑇) / (#‘𝑆)) = (exp‘Σ𝑘 ∈ (0...(𝐾 − 1))(log‘(1 − (𝑘 / 𝑁)))))
Colors of variables: wff setvar class
Syntax hints:  wi 4  wb 196  wo 383  wa 384   = wceq 1480  wcel 1987  {cab 2607  wne 2790  cun 3553  cin 3554  c0 3891   class class class wbr 4613  wf 5843  1-1wf1 5844  cfv 5847  (class class class)co 6604  𝑚 cmap 7802  cen 7896  Fincfn 7899  cc 9878  0cc0 9880  1c1 9881   + caddc 9883   · cmul 9885   < clt 10018  cle 10019  cmin 10210   / cdiv 10628  cn 10964  0cn0 11236  cz 11321  cuz 11631  +crp 11776  ...cfz 12268  cexp 12800  !cfa 13000  Ccbc 13029  #chash 13057  Σcsu 14350  expce 14717  logclog 24205
This theorem was proved from axioms:  ax-mp 5  ax-1 6  ax-2 7  ax-3 8  ax-gen 1719  ax-4 1734  ax-5 1836  ax-6 1885  ax-7 1932  ax-8 1989  ax-9 1996  ax-10 2016  ax-11 2031  ax-12 2044  ax-13 2245  ax-ext 2601  ax-rep 4731  ax-sep 4741  ax-nul 4749  ax-pow 4803  ax-pr 4867  ax-un 6902  ax-inf2 8482  ax-cnex 9936  ax-resscn 9937  ax-1cn 9938  ax-icn 9939  ax-addcl 9940  ax-addrcl 9941  ax-mulcl 9942  ax-mulrcl 9943  ax-mulcom 9944  ax-addass 9945  ax-mulass 9946  ax-distr 9947  ax-i2m1 9948  ax-1ne0 9949  ax-1rid 9950  ax-rnegex 9951  ax-rrecex 9952  ax-cnre 9953  ax-pre-lttri 9954  ax-pre-lttrn 9955  ax-pre-ltadd 9956  ax-pre-mulgt0 9957  ax-pre-sup 9958  ax-addf 9959  ax-mulf 9960
This theorem depends on definitions:  df-bi 197  df-or 385  df-an 386  df-3or 1037  df-3an 1038  df-tru 1483  df-fal 1486  df-ex 1702  df-nf 1707  df-sb 1878  df-eu 2473  df-mo 2474  df-clab 2608  df-cleq 2614  df-clel 2617  df-nfc 2750  df-ne 2791  df-nel 2894  df-ral 2912  df-rex 2913  df-reu 2914  df-rmo 2915  df-rab 2916  df-v 3188  df-sbc 3418  df-csb 3515  df-dif 3558  df-un 3560  df-in 3562  df-ss 3569  df-pss 3571  df-nul 3892  df-if 4059  df-pw 4132  df-sn 4149  df-pr 4151  df-tp 4153  df-op 4155  df-uni 4403  df-int 4441  df-iun 4487  df-iin 4488  df-br 4614  df-opab 4674  df-mpt 4675  df-tr 4713  df-eprel 4985  df-id 4989  df-po 4995  df-so 4996  df-fr 5033  df-se 5034  df-we 5035  df-xp 5080  df-rel 5081  df-cnv 5082  df-co 5083  df-dm 5084  df-rn 5085  df-res 5086  df-ima 5087  df-pred 5639  df-ord 5685  df-on 5686  df-lim 5687  df-suc 5688  df-iota 5810  df-fun 5849  df-fn 5850  df-f 5851  df-f1 5852  df-fo 5853  df-f1o 5854  df-fv 5855  df-isom 5856  df-riota 6565  df-ov 6607  df-oprab 6608  df-mpt2 6609  df-of 6850  df-om 7013  df-1st 7113  df-2nd 7114  df-supp 7241  df-wrecs 7352  df-recs 7413  df-rdg 7451  df-1o 7505  df-2o 7506  df-oadd 7509  df-er 7687  df-map 7804  df-pm 7805  df-ixp 7853  df-en 7900  df-dom 7901  df-sdom 7902  df-fin 7903  df-fsupp 8220  df-fi 8261  df-sup 8292  df-inf 8293  df-oi 8359  df-card 8709  df-cda 8934  df-pnf 10020  df-mnf 10021  df-xr 10022  df-ltxr 10023  df-le 10024  df-sub 10212  df-neg 10213  df-div 10629  df-nn 10965  df-2 11023  df-3 11024  df-4 11025  df-5 11026  df-6 11027  df-7 11028  df-8 11029  df-9 11030  df-n0 11237  df-xnn0 11308  df-z 11322  df-dec 11438  df-uz 11632  df-q 11733  df-rp 11777  df-xneg 11890  df-xadd 11891  df-xmul 11892  df-ioo 12121  df-ioc 12122  df-ico 12123  df-icc 12124  df-fz 12269  df-fzo 12407  df-fl 12533  df-mod 12609  df-seq 12742  df-exp 12801  df-fac 13001  df-bc 13030  df-hash 13058  df-shft 13741  df-cj 13773  df-re 13774  df-im 13775  df-sqrt 13909  df-abs 13910  df-limsup 14136  df-clim 14153  df-rlim 14154  df-sum 14351  df-ef 14723  df-sin 14725  df-cos 14726  df-pi 14728  df-struct 15783  df-ndx 15784  df-slot 15785  df-base 15786  df-sets 15787  df-ress 15788  df-plusg 15875  df-mulr 15876  df-starv 15877  df-sca 15878  df-vsca 15879  df-ip 15880  df-tset 15881  df-ple 15882  df-ds 15885  df-unif 15886  df-hom 15887  df-cco 15888  df-rest 16004  df-topn 16005  df-0g 16023  df-gsum 16024  df-topgen 16025  df-pt 16026  df-prds 16029  df-xrs 16083  df-qtop 16088  df-imas 16089  df-xps 16091  df-mre 16167  df-mrc 16168  df-acs 16170  df-mgm 17163  df-sgrp 17205  df-mnd 17216  df-submnd 17257  df-mulg 17462  df-cntz 17671  df-cmn 18116  df-psmet 19657  df-xmet 19658  df-met 19659  df-bl 19660  df-mopn 19661  df-fbas 19662  df-fg 19663  df-cnfld 19666  df-top 20621  df-bases 20622  df-topon 20623  df-topsp 20624  df-cld 20733  df-ntr 20734  df-cls 20735  df-nei 20812  df-lp 20850  df-perf 20851  df-cn 20941  df-cnp 20942  df-haus 21029  df-tx 21275  df-hmeo 21468  df-fil 21560  df-fm 21652  df-flim 21653  df-flf 21654  df-xms 22035  df-ms 22036  df-tms 22037  df-cncf 22589  df-limc 23536  df-dv 23537  df-log 24207
This theorem is referenced by:  birthdaylem3  24580
  Copyright terms: Public domain W3C validator