Formalization of IMO 1987, Q1 #
Let $p_{n, k}$ be the number of permutations of a set of cardinality n ≥ 1 that fix exactly k
elements. Prove that $∑_{k=0}^n k p_{n,k}=n!$.
To prove this identity, we show that both sides are equal to the cardinality of the set
{(x : α, σ : Perm α) | σ x = x}, regrouping by card (fixedPoints σ) for the left-hand side and
by x for the right-hand side.
The original problem assumes n ≥ 1. It turns out that a version with n * (n - 1)! in the RHS
holds true for n = 0 as well, so we first prove it, then deduce the original version in the case
n ≥ 1.
The set of pairs (x : α, σ : Perm α) such that σ x = x is equivalent to the set of pairs
(x : α, σ : Perm {x}ᶜ).
Equations
- One or more equations did not get rendered due to their size.
Instances For
Given α : Type* and k : ℕ, fiber α k is the set of permutations of α with exactly k
fixed points.
Equations
- Imo1987Q1.fiber α k = {σ : Equiv.Perm α | Fintype.card ↑(Function.fixedPoints ⇑σ) = k}
Instances For
Equations
p α k is the number of permutations of α with exactly k fixed points.
Equations
- Imo1987Q1.p α k = Fintype.card ↑(Imo1987Q1.fiber α k)
Instances For
The set of triples (k ≤ card α, σ ∈ fiber α k, x ∈ fixedPoints σ) is equivalent
to the set of pairs (x : α, σ : Perm α) such that σ x = x. The equivalence sends
(k, σ, x) to (x, σ) and (x, σ) to (card (fixedPoints σ), σ, x).
It is easy to see that the cardinality of the LHS is given by
∑ k : Fin (card α + 1), k * p α k.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Main statement for any (α : Type*) [Fintype α].