Documentation

Mathlib.Combinatorics.Derangements.Finite

Derangements on fintypes #

This file contains lemmas that describe the cardinality of derangements α when α is a fintype.

Main definitions #

Equations
Equations

The number of derangements of an n-element set.

Equations
Instances For
    theorem numDerangements_succ (n : ) :
    (numDerangements (n + 1)) = (n + 1) * (numDerangements n) - (-1) ^ n
    theorem numDerangements_sum (n : ) :
    (numDerangements n) = kFinset.range (n + 1), (-1) ^ k * ((k + 1).ascFactorial (n - k))