The proportion of derangements tends to 1/e
ProvedFamousTheorems.derangement_proportion_tends_to_inv_e_6cThe proportion of derangements tends to . Let be the number of derangements of an -element set, the permutations with no fixed points. Then
This is the answer to Montmort's hat-check problem (1708): the probability that a random permutation has no fixed point tends to . It follows from the inclusion–exclusion formula .
Formalization note. Mathlib's numDerangements_tendsto_inv_e. numDerangements n is , and is written Real.exp (-1).
Preamble
import Mathlib
Formal statement
namespace FamousTheorems
theorem derangement_proportion_tends_to_inv_e_6c :
Filter.Tendsto (fun n : ℕ => (numDerangements n : ℝ) / n.factorial) Filter.atTop
(nhds (Real.exp (-1))) := by sorry
end FamousTheoremsSource
Listed in Mathlib's curated theorem manifests (docs/1000.yaml); formalized in Mathlib as `numDerangements_tendsto_inv_e`. Proof here reduces to that Mathlib result.