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 6599 | . . . . . 6 ⊢ (𝑥 = 𝐴 → (𝑓:𝑥–1-1-onto→𝑥 ↔ 𝑓:𝐴–1-1-onto→𝑥)) | |
2 | f1oeq3 6600 | . . . . . 6 ⊢ (𝑥 = 𝐴 → (𝑓:𝐴–1-1-onto→𝑥 ↔ 𝑓:𝐴–1-1-onto→𝐴)) | |
3 | 1, 2 | bitrd 281 | . . . . 5 ⊢ (𝑥 = 𝐴 → (𝑓:𝑥–1-1-onto→𝑥 ↔ 𝑓:𝐴–1-1-onto→𝐴)) |
4 | raleq 3405 | . . . . 5 ⊢ (𝑥 = 𝐴 → (∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦 ↔ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)) | |
5 | 3, 4 | anbi12d 632 | . . . 4 ⊢ (𝑥 = 𝐴 → ((𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦) ↔ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦))) |
6 | 5 | abbidv 2885 | . . 3 ⊢ (𝑥 = 𝐴 → {𝑓 ∣ (𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦)} = {𝑓 ∣ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)}) |
7 | 6 | fveq2d 6668 | . 2 ⊢ (𝑥 = 𝐴 → (♯‘{𝑓 ∣ (𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦)}) = (♯‘{𝑓 ∣ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)})) |
8 | derang.d | . 2 ⊢ 𝐷 = (𝑥 ∈ Fin ↦ (♯‘{𝑓 ∣ (𝑓:𝑥–1-1-onto→𝑥 ∧ ∀𝑦 ∈ 𝑥 (𝑓‘𝑦) ≠ 𝑦)})) | |
9 | fvex 6677 | . 2 ⊢ (♯‘{𝑓 ∣ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)}) ∈ V | |
10 | 7, 8, 9 | fvmpt 6762 | 1 ⊢ (𝐴 ∈ Fin → (𝐷‘𝐴) = (♯‘{𝑓 ∣ (𝑓:𝐴–1-1-onto→𝐴 ∧ ∀𝑦 ∈ 𝐴 (𝑓‘𝑦) ≠ 𝑦)})) |
Colors of variables: wff setvar class |
Syntax hints: → wi 4 ∧ wa 398 = wceq 1533 ∈ wcel 2110 {cab 2799 ≠ wne 3016 ∀wral 3138 ↦ cmpt 5138 –1-1-onto→wf1o 6348 ‘cfv 6349 Fincfn 8503 ♯chash 13684 |
This theorem was proved from axioms: ax-mp 5 ax-1 6 ax-2 7 ax-3 8 ax-gen 1792 ax-4 1806 ax-5 1907 ax-6 1966 ax-7 2011 ax-8 2112 ax-9 2120 ax-10 2141 ax-11 2157 ax-12 2173 ax-ext 2793 ax-sep 5195 ax-nul 5202 ax-pr 5321 |
This theorem depends on definitions: df-bi 209 df-an 399 df-or 844 df-3an 1085 df-tru 1536 df-ex 1777 df-nf 1781 df-sb 2066 df-mo 2618 df-eu 2650 df-clab 2800 df-cleq 2814 df-clel 2893 df-nfc 2963 df-ral 3143 df-rex 3144 df-rab 3147 df-v 3496 df-sbc 3772 df-dif 3938 df-un 3940 df-in 3942 df-ss 3951 df-nul 4291 df-if 4467 df-sn 4561 df-pr 4563 df-op 4567 df-uni 4832 df-br 5059 df-opab 5121 df-mpt 5139 df-id 5454 df-xp 5555 df-rel 5556 df-cnv 5557 df-co 5558 df-dm 5559 df-iota 6308 df-fun 6351 df-fn 6352 df-f 6353 df-f1 6354 df-fo 6355 df-f1o 6356 df-fv 6357 |
This theorem is referenced by: derang0 32411 derangsn 32412 derangenlem 32413 subfaclefac 32418 subfacp1lem3 32424 subfacp1lem5 32426 subfacp1lem6 32427 |
Copyright terms: Public domain | W3C validator |