Documentation

CslibFrontier.Foundations.Combinatorics.CompositionMoment

Factorial moments of weak compositions #

A weak composition of t into a nonempty finite set S of parts is a function M supported in S with sum t. There are multichoose r t of them, where r is the number of parts. For exponents d with sum H over S, the sum over all weak compositions of the product of falling factorials ∏ i ∈ S, (M i).descFactorial (d i) is (∏ i ∈ S, (d i)!) * choose (t + r - 1) (H + r - 1). This is the coefficient of X ^ t in ∏ i ∈ S, X ^ d i / (1 - X) ^ (d i + 1).

Dividing by the number of compositions gives the factorial moment of a uniform weak composition, (∏ i, (d i)!) * ∏ j < H, (t - j) / (r + j). The corresponding moment of independent geometric variables of mean t / r is ∏ i, (d i)! * (t / r) ^ d i. The first is at most the second, and at least exp (-(H ^ 2 / t) - H ^ 2 / (2 * r)) times the second when 2 * H ≤ t. These are the two comparisons of the occupation-moment lemma of OpenAI, §4, stated for one product of falling factorials and without probability theory.

Main results #

References #

theorem Finset.sum_finsuppAntidiag_prod_choose {ι : Type u_1} [DecidableEq ι] {S : Finset ι} (hS : S.Nonempty) (t : ℕ) (d : ι → ℕ) :
∑ M ∈ S.finsuppAntidiag t, ∏ i ∈ S, (M i).choose (d i) = (t + S.card - 1).choose (∑ i ∈ S, d i + S.card - 1)

The sum over the weak compositions M of t of ∏ i ∈ S, (M i).choose (d i).

theorem Finset.sum_finsuppAntidiag_prod_descFactorial {ι : Type u_1} [DecidableEq ι] {S : Finset ι} (hS : S.Nonempty) (t : ℕ) (d : ι → ℕ) :
∑ M ∈ S.finsuppAntidiag t, ∏ i ∈ S, (M i).descFactorial (d i) = (∏ i ∈ S, (d i).factorial) * (t + S.card - 1).choose (∑ i ∈ S, d i + S.card - 1)

The sum over the weak compositions M of t of the product of falling factorials ∏ i ∈ S, (M i).descFactorial (d i). It is zero when ∑ i ∈ S, d i > t.

theorem Finset.sum_finsuppAntidiag_prod_descFactorial_le {ι : Type u_1} [DecidableEq ι] {S : Finset ι} (hS : S.Nonempty) (t : ℕ) (d : ι → ℕ) :
↑(∑ M ∈ S.finsuppAntidiag t, ∏ i ∈ S, (M i).descFactorial (d i)) ≤ ↑(S.card.multichoose t) * ∏ i ∈ S, ↑(d i).factorial * (↑t / ↑S.card) ^ d i

Upper comparison of factorial moments. The sum over the weak compositions of t of a product of falling factorials is at most the number of compositions times the corresponding moment ∏ i ∈ S, (d i)! * (t / r) ^ d i of independent geometric variables of mean t / r.

theorem Finset.le_sum_finsuppAntidiag_prod_descFactorial {ι : Type u_1} [DecidableEq ι] {S : Finset ι} (hS : S.Nonempty) (t : ℕ) (d : ι → ℕ) (h : 2 * ∑ i ∈ S, d i ≤ t) :
Real.exp (-(↑(∑ i ∈ S, d i) ^ 2 / ↑t) - ↑(∑ i ∈ S, d i) ^ 2 / (2 * ↑S.card)) * (↑(S.card.multichoose t) * ∏ i ∈ S, ↑(d i).factorial * (↑t / ↑S.card) ^ d i) ≤ ↑(∑ M ∈ S.finsuppAntidiag t, ∏ i ∈ S, (M i).descFactorial (d i))

Lower comparison of factorial moments. When the total order H = ∑ i ∈ S, d i is at most t / 2, the sum over the weak compositions of t of a product of falling factorials is at least exp (-(H ^ 2 / t) - H ^ 2 / (2 * r)) times the bound of the upper comparison.