Variance of the number of parts in a positive integer composition
ProvedAnalyticCombinatorics.Ch1.ParamClass.variance_compositionsByPartsanalytic-combinatoricsfinite-momentsinteger-compositionslean4marked-generating-functionsvariance
For a natural number , choose uniformly among all ordered compositions of into positive integer parts. If is the number of parts, then
The source represents variance by rational finite-sum moments of the length parameter on the actual composition objects. Its count is positive on the stated domain. The case is excluded; the empty composition would have variance zero rather than the displayed negative rational expression.
Preamble
import Definitions.Def_AnalyticCombinatorics_Ch3_BGF_Variance import Mathlib.Algebra.BigOperators.Ring.Finset import Mathlib.Algebra.Polynomial.Derivative import Mathlib.Algebra.Polynomial.Coeff import Mathlib.Algebra.Polynomial.Eval.Defs import Mathlib.Combinatorics.Enumerative.Composition import Mathlib.Algebra.BigOperators.NatAntidiagonal import Mathlib.RingTheory.PowerSeries.Basic import Mathlib.Data.Fintype.Card set_option autoImplicit true set_option relaxedAutoImplicit false set_option maxSynthPendingDepth 3 /-! # Ch3 -- Mean and variance for parts in compositions For a fixed `n ≥ 1`, Mathlib's boundary-set equivalence identifies compositions of `n` with subsets of `Fin (n - 1)`. The number of parts is one plus the number of chosen interior boundaries. -/ open scoped Polynomial open AnalyticCombinatorics AnalyticCombinatorics.Ch1 open PowerSeries Finset
Formal statement
theorem AnalyticCombinatorics.Ch1.ParamClass.variance_compositionsByParts {n : ℕ} (hn : 1 ≤ n) :
ParamClass.compositionsByParts.variance n = ((n : ℚ) - 1) / 4 := by sorrySource
Human review
Confirmed by the mission captain (proposal self-audit).