Mathbox for Mario Carneiro |
< Previous
Next >
Nearby theorems |
||
Mirrors > Home > MPE Home > Th. List > Mathboxes > derangval | Structured version Visualization version GIF version |
Description: Define the derangement function, which counts the number of bijections from a set to itself such that no element is mapped to itself. (Contributed by Mario Carneiro, 19-Jan-2015.) |
Ref | Expression |
---|---|
derang.d | ⊢ 𝐷 = (𝑥 ∈ Fin ↦ (♯‘{𝑓 ∣ (𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦)})) |
Ref | Expression |
---|---|
derangval | ⊢ (𝐴 ∈ Fin → (𝐷‘𝐴) = (♯‘{𝑓 ∣ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)})) |
Step | Hyp | Ref | Expression |
---|---|---|---|
1 | f1oeq2 6756 | . . . . . 6 ⊢ (𝑥 = 𝐴 → (𝑓:𝑥–1-1-onto→𝑥 ↔ 𝑓:𝐴–1-1-onto→𝑥)) | |
2 | f1oeq3 6757 | . . . . . 6 ⊢ (𝑥 = 𝐴 → (𝑓:𝐴–1-1-onto→𝑥 ↔ 𝑓:𝐴–1-1-onto→𝐴)) | |
3 | 1, 2 | bitrd 278 | . . . . 5 ⊢ (𝑥 = 𝐴 → (𝑓:𝑥–1-1-onto→𝑥 ↔ 𝑓:𝐴–1-1-onto→𝐴)) |
4 | raleq 3305 | . . . . 5 ⊢ (𝑥 = 𝐴 → (∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦 ↔ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)) | |
5 | 3, 4 | anbi12d 631 | . . . 4 ⊢ (𝑥 = 𝐴 → ((𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦) ↔ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦))) |
6 | 5 | abbidv 2805 | . . 3 ⊢ (𝑥 = 𝐴 → {𝑓 ∣ (𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦)} = {𝑓 ∣ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)}) |
7 | 6 | fveq2d 6829 | . 2 ⊢ (𝑥 = 𝐴 → (♯‘{𝑓 ∣ (𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦)}) = (♯‘{𝑓 ∣ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)})) |
8 | derang.d | . 2 ⊢ 𝐷 = (𝑥 ∈ Fin ↦ (♯‘{𝑓 ∣ (𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦)})) | |
9 | fvex 6838 | . 2 ⊢ (♯‘{𝑓 ∣ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)}) ∈ V | |
10 | 7, 8, 9 | fvmpt 6931 | 1 ⊢ (𝐴 ∈ Fin → (𝐷‘𝐴) = (♯‘{𝑓 ∣ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)})) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 396 = wceq 1540 ∈ wcel 2105 {cab 2713 ≠ wne 2940 ∀wral 3061 ↦ cmpt 5175 –1-1-onto→wf1o 6478 ‘cfv 6479 Fincfn 8804 ♯chash 14145 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1796 ax-4 1810 ax-5 1912 ax-6 1970 ax-7 2010 ax-8 2107 ax-9 2115 ax-10 2136 ax-11 2153 ax-12 2170 ax-ext 2707 ax-sep 5243 ax-nul 5250 ax-pr 5372 |
This theorem depends on definitions: df-bi 206 df-an 397 df-or 845 df-3an 1088 df-tru 1543 df-fal 1553 df-ex 1781 df-nf 1785 df-sb 2067 df-mo 2538 df-eu 2567 df-clab 2714 df-cleq 2728 df-clel 2814 df-nfc 2886 df-ne 2941 df-ral 3062 df-rex 3071 df-rab 3404 df-v 3443 df-dif 3901 df-un 3903 df-in 3905 df-ss 3915 df-nul 4270 df-if 4474 df-sn 4574 df-pr 4576 df-op 4580 df-uni 4853 df-br 5093 df-opab 5155 df-mpt 5176 df-id 5518 df-xp 5626 df-rel 5627 df-cnv 5628 df-co 5629 df-dm 5630 df-iota 6431 df-fun 6481 df-fn 6482 df-f 6483 df-f1 6484 df-fo 6485 df-f1o 6486 df-fv 6487 |
This theorem is referenced by: derang0 33430 derangsn 33431 derangenlem 33432 subfaclefac 33437 subfacp1lem3 33443 subfacp1lem5 33445 subfacp1lem6 33446 |
Copyright terms: Public domain | W3C validator |