Metamath Proof Explorer


Theorem derangf

Description: The derangement number is a function from finite sets to nonnegative integers. (Contributed by Mario Carneiro, 19-Jan-2015)

Ref Expression
Hypothesis derang.d ⊢ D = x ∈ Fin ⟼ f | f : x ⟶ 1-1 onto x ∧ ∀ y ∈ x f ⁡ y ≠ y
Assertion derangf ⊢ D : Fin ⟶ ℕ 0

Proof

Step Hyp Ref Expression
1 derang.d ⊢ D = x ∈ Fin ⟼ f | f : x ⟶ 1-1 onto x ∧ ∀ y ∈ x f ⁡ y ≠ y
2 deranglem ⊢ x ∈ Fin → f | f : x ⟶ 1-1 onto x ∧ ∀ y ∈ x f ⁡ y ≠ y ∈ Fin
3 hashcl ⊢ f | f : x ⟶ 1-1 onto x ∧ ∀ y ∈ x f ⁡ y ≠ y ∈ Fin → f | f : x ⟶ 1-1 onto x ∧ ∀ y ∈ x f ⁡ y ≠ y ∈ ℕ 0
4 2 3 syl ⊢ x ∈ Fin → f | f : x ⟶ 1-1 onto x ∧ ∀ y ∈ x f ⁡ y ≠ y ∈ ℕ 0
5 1 4 fmpti ⊢ D : Fin ⟶ ℕ 0