A Gaussian limit for the composition-gap part-count model
DefinitionAnalyticCombinatorics_Ch9_LimitLaws_CompositionPartsanalytic-combinatoricslean4limit-laws
The mathematical objects and operations are specified by the following source definitions.
def compositionGapP (n : ℕ) : Measure (CompositionGapΩ n) :=
P (n - 1)
def compositionBeta (n : ℕ) : ℝ :=
((n - 1 : ℕ) : ℝ)
def compositionSignSum (n : ℕ) (ω : CompositionGapΩ n) : ℝ :=
S (n - 1) ω
def compositionParts (n : ℕ) (ω : CompositionGapΩ n) : ℝ :=
1 + compositionGapCount n ω
abbrev CompositionGapΩ (n : ℕ) := Ω (n - 1)
def compositionGapCount (n : ℕ) (ω : CompositionGapΩ n) : ℝ :=
X (n - 1) ω
Definition code
import Definitions.Def_AnalyticCombinatorics_Ch9_LimitLaws_BinaryWordCLT
import Mathlib
import Mathlib.MeasureTheory.Function.ConvergenceInDistribution
set_option autoImplicit true
set_option relaxedAutoImplicit false
set_option maxSynthPendingDepth 3
/-!
# Number of parts in a random composition
For `n ≥ 1`, a composition of `n` with `k` parts is equivalently a choice of
`k - 1` of the `n - 1` interior gaps. Thus the part count has the same law as
`1 + Binomial(n - 1, 1 / 2)`.
The central limit theorem is proved by reusing the local quasi-powers
instantiation for binary words from `BinaryWordCLT.lean`, shifted from `n` to
`n - 1` and then translated by the deterministic `+1`.
-/
noncomputable section
open Complex Filter MeasureTheory ProbabilityTheory
open scoped Topology
namespace AnalyticCombinatorics
namespace Ch9
namespace LimitLaws
/-- Binary gap space for a composition of `n`, with `n - 1` interior gaps. -/
abbrev CompositionGapΩ (n : ℕ) := Ω (n - 1)
/-- Product measure for independent fair choices of the `n - 1` gaps. -/
def compositionGapP (n : ℕ) : Measure (CompositionGapΩ n) :=
P (n - 1)
instance compositionGapP_isProbabilityMeasure (n : ℕ) :
IsProbabilityMeasure (compositionGapP n) := by
unfold compositionGapP
infer_instance
/-- Number of selected gaps in the sign-coded model. -/
def compositionGapCount (n : ℕ) (ω : CompositionGapΩ n) : ℝ :=
X (n - 1) ω
/-- Number of parts: one plus the number of selected interior gaps. -/
def compositionParts (n : ℕ) (ω : CompositionGapΩ n) : ℝ :=
1 + compositionGapCount n ω
end LimitLaws
end Ch9
end AnalyticCombinatorics
Source