![]() |
Mathbox for Mario Carneiro |
< Previous
Next >
Nearby theorems |
|
Mirrors > Home > MPE Home > Th. List > Mathboxes > derangfmla | Structured version Visualization version GIF version |
Description: The derangements formula, which expresses the number of derangements of a finite nonempty set in terms of the factorial. The expression ⌊‘(𝑥 + 1 / 2) is a way of saying "rounded to the nearest integer". This is part of Metamath 100 proof #88. (Contributed by Mario Carneiro, 23-Jan-2015.) |
Ref | Expression |
---|---|
derangfmla.d | ⊢ 𝐷 = (𝑥 ∈ Fin ↦ (♯‘{𝑓 ∣ (𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦)})) |
Ref | Expression |
---|---|
derangfmla | ⊢ ((𝐴 ∈ Fin ∧ 𝐴 ≠ ∅) → (𝐷‘𝐴) = (⌊‘(((!‘(♯‘𝐴)) / e) + (1 / 2)))) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | derangfmla.d | . . . 4 ⊢ 𝐷 = (𝑥 ∈ Fin ↦ (♯‘{𝑓 ∣ (𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦)})) | |
2 | oveq2 6799 | . . . . . 6 ⊢ (𝑛 = 𝑚 → (1...𝑛) = (1...𝑚)) | |
3 | 2 | fveq2d 6334 | . . . . 5 ⊢ (𝑛 = 𝑚 → (𝐷‘(1...𝑛)) = (𝐷‘(1...𝑚))) |
4 | 3 | cbvmptv 4884 | . . . 4 ⊢ (𝑛 ∈ ℕ0 ↦ (𝐷‘(1...𝑛))) = (𝑚 ∈ ℕ0 ↦ (𝐷‘(1...𝑚))) |
5 | 1, 4 | derangen2 31487 | . . 3 ⊢ (𝐴 ∈ Fin → (𝐷‘𝐴) = ((𝑛 ∈ ℕ0 ↦ (𝐷‘(1...𝑛)))‘(♯‘𝐴))) |
6 | 5 | adantr 466 | . 2 ⊢ ((𝐴 ∈ Fin ∧ 𝐴 ≠ ∅) → (𝐷‘𝐴) = ((𝑛 ∈ ℕ0 ↦ (𝐷‘(1...𝑛)))‘(♯‘𝐴))) |
7 | hashnncl 13352 | . . . 4 ⊢ (𝐴 ∈ Fin → ((♯‘𝐴) ∈ ℕ ↔ 𝐴 ≠ ∅)) | |
8 | 7 | biimpar 463 | . . 3 ⊢ ((𝐴 ∈ Fin ∧ 𝐴 ≠ ∅) → (♯‘𝐴) ∈ ℕ) |
9 | 1, 4 | subfacval3 31502 | . . 3 ⊢ ((♯‘𝐴) ∈ ℕ → ((𝑛 ∈ ℕ0 ↦ (𝐷‘(1...𝑛)))‘(♯‘𝐴)) = (⌊‘(((!‘(♯‘𝐴)) / e) + (1 / 2)))) |
10 | 8, 9 | syl 17 | . 2 ⊢ ((𝐴 ∈ Fin ∧ 𝐴 ≠ ∅) → ((𝑛 ∈ ℕ0 ↦ (𝐷‘(1...𝑛)))‘(♯‘𝐴)) = (⌊‘(((!‘(♯‘𝐴)) / e) + (1 / 2)))) |
11 | 6, 10 | eqtrd 2805 | 1 ⊢ ((𝐴 ∈ Fin ∧ 𝐴 ≠ ∅) → (𝐷‘𝐴) = (⌊‘(((!‘(♯‘𝐴)) / e) + (1 / 2)))) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 382 = wceq 1631 ∈ wcel 2145 {cab 2757 ≠ wne 2943 ∀wral 3061 ∅c0 4063 ↦ cmpt 4863 –1-1-onto→wf1o 6028 ‘cfv 6029 (class class class)co 6791 Fincfn 8107 1c1 10137 + caddc 10139 / cdiv 10884 ℕcn 11220 2c2 11270 ℕ0cn0 11492 ...cfz 12526 ⌊cfl 12792 !cfa 13257 ♯chash 13314 eceu 14992 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1870 ax-4 1885 ax-5 1991 ax-6 2057 ax-7 2093 ax-8 2147 ax-9 2154 ax-10 2174 ax-11 2190 ax-12 2203 ax-13 2408 ax-ext 2751 ax-rep 4904 ax-sep 4915 ax-nul 4923 ax-pow 4974 ax-pr 5034 ax-un 7094 ax-inf2 8700 ax-cnex 10192 ax-resscn 10193 ax-1cn 10194 ax-icn 10195 ax-addcl 10196 ax-addrcl 10197 ax-mulcl 10198 ax-mulrcl 10199 ax-mulcom 10200 ax-addass 10201 ax-mulass 10202 ax-distr 10203 ax-i2m1 10204 ax-1ne0 10205 ax-1rid 10206 ax-rnegex 10207 ax-rrecex 10208 ax-cnre 10209 ax-pre-lttri 10210 ax-pre-lttrn 10211 ax-pre-ltadd 10212 ax-pre-mulgt0 10213 ax-pre-sup 10214 ax-addf 10215 ax-mulf 10216 |
This theorem depends on definitions: df-bi 197 df-an 383 df-or 837 df-3or 1072 df-3an 1073 df-tru 1634 df-fal 1637 df-ex 1853 df-nf 1858 df-sb 2050 df-eu 2622 df-mo 2623 df-clab 2758 df-cleq 2764 df-clel 2767 df-nfc 2902 df-ne 2944 df-nel 3047 df-ral 3066 df-rex 3067 df-reu 3068 df-rmo 3069 df-rab 3070 df-v 3353 df-sbc 3588 df-csb 3683 df-dif 3726 df-un 3728 df-in 3730 df-ss 3737 df-pss 3739 df-nul 4064 df-if 4226 df-pw 4299 df-sn 4317 df-pr 4319 df-tp 4321 df-op 4323 df-uni 4575 df-int 4612 df-iun 4656 df-br 4787 df-opab 4847 df-mpt 4864 df-tr 4887 df-id 5157 df-eprel 5162 df-po 5170 df-so 5171 df-fr 5208 df-se 5209 df-we 5210 df-xp 5255 df-rel 5256 df-cnv 5257 df-co 5258 df-dm 5259 df-rn 5260 df-res 5261 df-ima 5262 df-pred 5821 df-ord 5867 df-on 5868 df-lim 5869 df-suc 5870 df-iota 5992 df-fun 6031 df-fn 6032 df-f 6033 df-f1 6034 df-fo 6035 df-f1o 6036 df-fv 6037 df-isom 6038 df-riota 6752 df-ov 6794 df-oprab 6795 df-mpt2 6796 df-om 7211 df-1st 7313 df-2nd 7314 df-wrecs 7557 df-recs 7619 df-rdg 7657 df-1o 7711 df-2o 7712 df-oadd 7715 df-er 7894 df-map 8009 df-pm 8010 df-en 8108 df-dom 8109 df-sdom 8110 df-fin 8111 df-sup 8502 df-inf 8503 df-oi 8569 df-card 8963 df-cda 9190 df-pnf 10276 df-mnf 10277 df-xr 10278 df-ltxr 10279 df-le 10280 df-sub 10468 df-neg 10469 df-div 10885 df-nn 11221 df-2 11279 df-3 11280 df-4 11281 df-n0 11493 df-xnn0 11564 df-z 11578 df-uz 11887 df-q 11990 df-rp 12029 df-ico 12379 df-fz 12527 df-fzo 12667 df-fl 12794 df-seq 13002 df-exp 13061 df-fac 13258 df-bc 13287 df-hash 13315 df-shft 14008 df-cj 14040 df-re 14041 df-im 14042 df-sqrt 14176 df-abs 14177 df-limsup 14403 df-clim 14420 df-rlim 14421 df-sum 14618 df-ef 14997 df-e 14998 |
This theorem is referenced by: (None) |
Copyright terms: Public domain | W3C validator |