Documentation

CslibFrontier.Probability.StochasticDomination.Adapted

Stochastic domination for adapted Bernoulli event counts #

First-order stochastic domination between adapted event counts adaptedCount A n under a general filtration ℱ : Filtration ℕ m (and specifically under ProbabilityTheory.Kernel.traj / ProbabilityTheory.Kernel.trajMeasure, as well as finite-horizon sequential PMF processes) and the Poisson-binomial distribution Cslib.Probability.PMF.poissonBinomial (or Mathlib's ProbabilityTheory.binomial in the uniform-envelope case).

Both lower-envelope domination (ps[t] ≤ P[A t | ℱ t], giving adaptedCount ≥_st poissonBinomial) and upper-envelope domination (P[A t | ℱ t] ≤ ps[t], giving poissonBinomial ≥_st adaptedCount) are proved, together with active-before-target variants requiring the conditional probability bound only on {ω | adaptedCount A t ω < r}.

Main definitions #

Main results #

noncomputable def Cslib.Probability.adaptedCount {Ω : Type u_1} (A : ℕ → Set Ω) (n : ℕ) (ω : Ω) :

Number of events among A 0, ..., A (n - 1) occurring at outcome ω.

@[simp]
theorem Cslib.Probability.adaptedCount_zero {Ω : Type u_1} (A : ℕ → Set Ω) (ω : Ω) :
adaptedCount A 0 ω = 0
theorem Cslib.Probability.adaptedCount_succ {Ω : Type u_1} (A : ℕ → Set Ω) (n : ℕ) (ω : Ω) :
adaptedCount A (n + 1) ω = adaptedCount A n ω + (A n).indicator (fun (x : Ω) => 1) ω
theorem Cslib.Probability.adaptedCount_le {Ω : Type u_1} (A : ℕ → Set Ω) (n : ℕ) (ω : Ω) :
adaptedCount A n ω ≤ n
theorem Cslib.Probability.adaptedCount_mono {Ω : Type u_1} (A : ℕ → Set Ω) (ω : Ω) :
Monotone fun (n : ℕ) => adaptedCount A n ω
theorem Cslib.Probability.measurable_adaptedCount {Ω : Type u_1} [m : MeasurableSpace Ω] (ℱ : MeasureTheory.Filtration ℕ m) {A : ℕ → Set Ω} (hA : ∀ (t : ℕ), MeasurableSet (A t)) (n : ℕ) :
theorem Cslib.Probability.adaptedCount_stochasticallyDominates_poissonBinomial {Ω : Type u_1} [m : MeasurableSpace Ω] {P : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure P] (ℱ : MeasureTheory.Filtration ℕ m) {A : ℕ → Set Ω} (hA : ∀ (t : ℕ), MeasurableSet (A t)) (ps : List ↑unitInterval) (hp : ∀ (t : ℕ) (ht : t < ps.length), (fun (x : Ω) => ↑ps[t]) ≤ᵐ[P] P[(A t).indicator fun (x : Ω) => 1 | ↑ℱ t]) :

Adapted Poisson-binomial domination (lower envelope): if A t is ℱ (t + 1)-measurable and P[A t | ℱ t] ≥ ps[t] a.e. for all t < ps.length, then the law of adaptedCount A ps.length stochastically dominates PMF.poissonBinomial ps.

theorem Cslib.Probability.poissonBinomial_stochasticallyDominates_adaptedCount {Ω : Type u_1} [m : MeasurableSpace Ω] {P : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure P] (ℱ : MeasureTheory.Filtration ℕ m) {A : ℕ → Set Ω} (hA : ∀ (t : ℕ), MeasurableSet (A t)) (ps : List ↑unitInterval) (hp : ∀ (t : ℕ) (ht : t < ps.length), P[(A t).indicator fun (x : Ω) => 1 | ↑ℱ t] ≤ᵐ[P] fun (x : Ω) => ↑ps[t]) :

Adapted Poisson-binomial domination (upper envelope): if A t is ℱ (t + 1)-measurable and P[A t | ℱ t] ≤ ps[t] a.e. for all t < ps.length, then PMF.poissonBinomial ps stochastically dominates the law of adaptedCount A ps.length.

theorem Cslib.Probability.adaptedCount_congr_of_lt {Ω : Type u_1} {A B : ℕ → Set Ω} {r n : ℕ} {ω : Ω} (hlt : adaptedCount A n ω < r) (hiff : ∀ t < n, adaptedCount A t ω < r → (ω ∈ B t ↔ ω ∈ A t)) :

If adaptedCount A n ω < r and B t agrees with A t at ω for every t < n where adaptedCount A t ω < r, then adaptedCount B n ω = adaptedCount A n ω.

theorem Cslib.Probability.ae_le_condExp_union_compl {Ω : Type u_1} [m : MeasurableSpace Ω] {P : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure P] (ℱ : MeasureTheory.Filtration ℕ m) {t : ℕ} {E S : Set Ω} (hE : MeasurableSet E) (hS_ℱ : MeasurableSet S) {p : ↑unitInterval} (hp : (fun (x : Ω) => ↑p) ≤ᵐ[P.restrict S] P[E.indicator fun (x : Ω) => 1 | ↑ℱ t]) :
(fun (x : Ω) => ↑p) ≤ᵐ[P] P[(E ∪ Sᶜ).indicator fun (x : Ω) => 1 | ↑ℱ t]

Extending an ℱ (t + 1)-measurable event E by Sᶜ (S ℱ t-measurable) lifts an a.e. conditional lower bound p ≤ P[E | ℱ t] on P.restrict S to all of P.

theorem Cslib.Probability.adaptedCount_min_stochasticallyDominates_poissonBinomial {Ω : Type u_1} [m : MeasurableSpace Ω] {P : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure P] (ℱ : MeasureTheory.Filtration ℕ m) {A : ℕ → Set Ω} (hA : ∀ (t : ℕ), MeasurableSet (A t)) (ps : List ↑unitInterval) (r : ℕ) (hp : ∀ (t : ℕ) (ht : t < ps.length), (fun (x : Ω) => ↑ps[t]) ≤ᵐ[P.restrict {ω : Ω | adaptedCount A t ω < r}] P[(A t).indicator fun (x : Ω) => 1 | ↑ℱ t]) :

Active-before-target adapted domination (lower envelope): if P[A t | ℱ t] ≥ ps[t] holds a.e. on the active event {ω | adaptedCount A t ω < r}, then the capped count min (adaptedCount A ps.length) r dominates min · r of PMF.poissonBinomial ps.

theorem Cslib.Probability.adaptedCount_real_Iio_le_binomial {Ω : Type u_1} [m : MeasurableSpace Ω] {P : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure P] (ℱ : MeasureTheory.Filtration ℕ m) {A : ℕ → Set Ω} (hA : ∀ (t : ℕ), MeasurableSet (A t)) (n r : ℕ) (p : ↑unitInterval) (hp : ∀ t < n, (fun (x : Ω) => ↑p) ≤ᵐ[P.restrict {ω : Ω | adaptedCount A t ω < r}] P[(A t).indicator fun (x : Ω) => 1 | ↑ℱ t]) :

Active-before-target binomial tail bound: if P[A t | ℱ t] ≥ p a.e. on {adaptedCount A t < r} for every t < n, then P.real {ω | adaptedCount A n ω < r} ≤ (binomial n p).real (Set.Iio r).

theorem Cslib.Probability.poissonBinomial_stochasticallyDominates_adaptedCount_min {Ω : Type u_1} [m : MeasurableSpace Ω] {P : MeasureTheory.Measure Ω} [MeasureTheory.IsProbabilityMeasure P] (ℱ : MeasureTheory.Filtration ℕ m) {A : ℕ → Set Ω} (hA : ∀ (t : ℕ), MeasurableSet (A t)) (ps : List ↑unitInterval) (r : ℕ) (hp : ∀ (t : ℕ) (ht : t < ps.length), P[(A t).indicator fun (x : Ω) => 1 | ↑ℱ t] ≤ᵐ[P.restrict {ω : Ω | adaptedCount A t ω < r}] fun (x : Ω) => ↑ps[t]) :

Active-before-target adapted domination (upper envelope): if P[A t | ℱ t] ≤ ps[t] a.e. on {ω | adaptedCount A t ω < r}, then min · r of PMF.poissonBinomial ps stochastically dominates min (adaptedCount A ps.length) r.

Shift a ℕ-indexed filtration forward by a steps.

@[simp]
theorem Cslib.Probability.shiftFiltration_apply {Ω : Type u_1} [m : MeasurableSpace Ω] (ℱ : MeasureTheory.Filtration ℕ m) (a t : ℕ) :
↑(shiftFiltration ℱ a) t = ↑ℱ (a + t)
theorem Cslib.Probability.traj_condExp_indicator_eq {X : ℕ → Type u_1} [(n : ℕ) → MeasurableSpace (X n)] (κ : (n : ℕ) → ProbabilityTheory.Kernel ((i : ↥(Finset.Iic n)) → X ↑i) (X (n + 1))) [∀ (n : ℕ), ProbabilityTheory.IsMarkovKernel (κ n)] {a b : ℕ} (hab : a ≤ b) (x₀ : (i : ↥(Finset.Iic a)) → X ↑i) {E : Set ((n : ℕ) → X n)} (hE : MeasurableSet E) :
((ProbabilityTheory.Kernel.traj κ a) x₀)[E.indicator fun (x : (n : ℕ) → X n) => 1 | ↑MeasureTheory.Filtration.piLE b] =ᵐ[(ProbabilityTheory.Kernel.traj κ a) x₀] fun (x : (n : ℕ) → X n) => ((ProbabilityTheory.Kernel.traj κ b) (Preorder.frestrictLe b x)).real E

Conditional expectation of a measurable event indicator under Kernel.traj κ a x₀ at time b ≥ a equals the Kernel.traj κ b real probability at Preorder.frestrictLe b x.

theorem Cslib.Probability.traj_adaptedCount_stochasticallyDominates_poissonBinomial {X : ℕ → Type u_1} [(n : ℕ) → MeasurableSpace (X n)] (κ : (n : ℕ) → ProbabilityTheory.Kernel ((i : ↥(Finset.Iic n)) → X ↑i) (X (n + 1))) [∀ (n : ℕ), ProbabilityTheory.IsMarkovKernel (κ n)] {a : ℕ} (x₀ : (i : ↥(Finset.Iic a)) → X ↑i) {A : ℕ → Set ((n : ℕ) → X n)} (hA : ∀ (t : ℕ), MeasurableSet (A t)) (ps : List ↑unitInterval) (hp : ∀ (t : ℕ) (ht : t < ps.length), ∀ᵐ (x : (i : ℕ) → X i) ∂(ProbabilityTheory.Kernel.traj κ a) x₀, ↑ps[t] ≤ ((ProbabilityTheory.Kernel.traj κ (a + t)) (Preorder.frestrictLe (a + t) x)).real (A t)) :

Specialization of adaptedCount_stochasticallyDominates_poissonBinomial to Ionescu-Tulcea trajectories ProbabilityTheory.Kernel.traj κ a x₀.

theorem Cslib.Probability.poissonBinomial_stochasticallyDominates_traj_adaptedCount {X : ℕ → Type u_1} [(n : ℕ) → MeasurableSpace (X n)] (κ : (n : ℕ) → ProbabilityTheory.Kernel ((i : ↥(Finset.Iic n)) → X ↑i) (X (n + 1))) [∀ (n : ℕ), ProbabilityTheory.IsMarkovKernel (κ n)] {a : ℕ} (x₀ : (i : ↥(Finset.Iic a)) → X ↑i) {A : ℕ → Set ((n : ℕ) → X n)} (hA : ∀ (t : ℕ), MeasurableSet (A t)) (ps : List ↑unitInterval) (hp : ∀ (t : ℕ) (ht : t < ps.length), ∀ᵐ (x : (i : ℕ) → X i) ∂(ProbabilityTheory.Kernel.traj κ a) x₀, ((ProbabilityTheory.Kernel.traj κ (a + t)) (Preorder.frestrictLe (a + t) x)).real (A t) ≤ ↑ps[t]) :

Upper-envelope specialization of poissonBinomial_stochasticallyDominates_adaptedCount to ProbabilityTheory.Kernel.traj κ a x₀.

Specialization of adaptedCount_stochasticallyDominates_poissonBinomial to ProbabilityTheory.Kernel.trajMeasure μ₀ κ for events measurable at step t + 1.

Upper-envelope specialization of poissonBinomial_stochasticallyDominates_adaptedCount to ProbabilityTheory.Kernel.trajMeasure μ₀ κ for events measurable at step t + 1.

noncomputable def Cslib.Probability.PMF.seqCount {α : Type u_1} (E : (t : ℕ) → (Fin t → α) → Set α) (n : ℕ) (h : Fin n → α) :

Cumulative number of successes along a history h : Fin n → α for predicates E t : (Fin t → α) → Set α.

@[simp]
theorem Cslib.Probability.PMF.seqCount_zero {α : Type u_1} (E : (t : ℕ) → (Fin t → α) → Set α) (h : Fin 0 → α) :
seqCount E 0 h = 0
theorem Cslib.Probability.PMF.seqCount_snoc {α : Type u_1} (E : (t : ℕ) → (Fin t → α) → Set α) (n : ℕ) (h : Fin n → α) (a : α) :
seqCount E (n + 1) (Fin.snoc h a) = seqCount E n h + if a ∈ E n h then 1 else 0
theorem Cslib.Probability.PMF.seqCount_stochasticallyDominates_poissonBinomial {α : Type u_1} (step : (t : ℕ) → (Fin t → α) → PMF α) (E : (t : ℕ) → (Fin t → α) → Set α) (ps : List ↑unitInterval) (hp : ∀ (t : ℕ) (ht : t < ps.length) (h : Fin t → α), ↑ps[t] ≤ ((step t h).toOuterMeasure (E t h)).toReal) :

Sequential finite-horizon Poisson-binomial domination: if at every step t < ps.length and every prefix h, the conditional event probability ((step t h).toOuterMeasure (E t h)).toReal is at least ps[t], then seqCount E ps.length under seqProcess step ps.length stochastically dominates poissonBinomial ps.

theorem Cslib.Probability.PMF.seqCount_active_toReal_Iio_le {α : Type u_1} (step : (t : ℕ) → (Fin t → α) → PMF α) (E : (t : ℕ) → (Fin t → α) → Set α) (n r : ℕ) (p : ↑unitInterval) (hp : ∀ t < n, ∀ (h : Fin t → α), seqCount E t h < r → ↑p ≤ ((step t h).toOuterMeasure (E t h)).toReal) :

Active-before-target sequential PMF bound: if ((step t h).toOuterMeasure (E t h)).toReal is at least p whenever t < n and seqCount E t h < r, then the probability of strictly fewer than r successes after n steps is at most (ProbabilityTheory.binomial n p).real (Set.Iio r).

theorem Cslib.Probability.PMF.seqCount_ge_le {α : Type u_1} (step : (t : ℕ) → (Fin t → α) → PMF α) (E : (t : ℕ) → (Fin t → α) → Set α) (p : ℕ → ℝ) (n : ℕ) (hp : ∀ t < n, ∀ h ∈ (seqProcess step t).support, ((step t h).toOuterMeasure (E t h)).toReal ≤ p t) {ε : ℝ} (hε : 0 ≤ ε) :
((seqProcess step n).toOuterMeasure {h : Fin n → α | ∑ t ∈ Finset.range n, p t + ε ≤ ↑(seqCount E n h)}).toReal ≤ Real.exp (-2 * ε ^ 2 / ↑n)

Azuma–Hoeffding upper tail for sequential event counts: if at every step t < n and supported prefix h, the conditional probability of E t h is at most p t, then seqCount E n exceeds ∑ t < n, p t + ε (ε ≥ 0) with probability at most exp (-2 ε² / n).

theorem Cslib.Probability.PMF.seqCount_le_le {α : Type u_1} (step : (t : ℕ) → (Fin t → α) → PMF α) (E : (t : ℕ) → (Fin t → α) → Set α) (p : ℕ → ℝ) (n : ℕ) (hp : ∀ t < n, ∀ h ∈ (seqProcess step t).support, p t ≤ ((step t h).toOuterMeasure (E t h)).toReal) {ε : ℝ} (hε : 0 ≤ ε) :
((seqProcess step n).toOuterMeasure {h : Fin n → α | ↑(seqCount E n h) ≤ ∑ t ∈ Finset.range n, p t - ε}).toReal ≤ Real.exp (-2 * ε ^ 2 / ↑n)

Azuma–Hoeffding lower tail for sequential event counts: if at every step t < n and supported prefix h, the conditional probability of E t h is at least p t, then seqCount E n falls at or below ∑ t < n, p t - ε (ε ≥ 0) with probability at most exp (-2 ε² / n).