Stat.Finite­Rao­Blackwell.Poisson.Independent­Prefix

This roll-up module exports exact laws, capped implementations, conditional averaging, and depoissonization bounds for independent Poisson prefixes.

Product­Pools 24 core · 26 supporting · 4 submodules This roll-up module exports the finite heterogeneous extension of independent Poisson-prefix Rao--Blackwell transfer: exact product laws, capped fixed-pool statistics, summed overflow-tail risk control, and a direct thre Random­Scale­Transfer 22 core · 21 supporting · 7 submodules This roll-up module exports ordered retention for two unequal marked-Poisson pools with a shared random scale, prior-predictive count-failure bounds, bounded-loss decision transfer, and the resulting fuzzy-prior minimax
Basic 10 core · 7 supporting This module provides the measurable sample spaces and deterministic maps used to Poissonize two independent fixed iid pools. ★ map_totalizedPrefixPair_restrict_nonoverflow

Independent unequal Poisson prefixes

This module provides the measurable sample spaces and deterministic maps used to Poissonize two independent fixed iid pools. The pools may have different capacities and observation spaces. It also identifies the exact joint law of the two untruncated Poisson prefixes and the jointly nonoverflowing part of the capped construction.

abbrev FixedPools reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given the first pool capacity and the second pool capacity, two fixed observation pools are given by ordered pools whose capacities may differ. They are represented by the product of the two ordered pools.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
NX NY :
ℕ
FixedPools NX NY :
Type (max uX uY)
(Fin NX → X) × (Fin NY → Y)
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.FixedPools · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Basic.lean:34
abbrev RandomizedPools reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given the first pool capacity and the second pool capacity, the randomized two-pool experiment attaches an independent requested prefix length to each fixed pool. It is represented by the pair of pool-length pairs.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
NX NY :
ℕ
RandomizedPools NX NY :
Type (max uX uY)
((Fin NX → X) × ℕ) × ((Fin NY → Y) × ℕ)
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomizedPools · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Basic.lean:39
def fixedPoolsLaw reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given a probability law for the first observations, a probability law for the second observations, the first pool capacity, and the second pool capacity, the independent fixed-pool law is the product of the two iid pool laws. It is given by their product measure.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
NX NY :
ℕ
fixedPoolsLaw P Q NX NY :
Measure (FixedPools (X := X) (Y := Y) NX NY)
(Measure.pi (fun _ : Fin NX ↦ P)).prod (Measure.pi (fun _ : Fin NY ↦ Q))
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.fixedPoolsLaw · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Basic.lean:45 · uses FixedPools
def randomizedPoolsLaw reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given probability laws for the first and second observations, the first Poisson intensity, the second Poisson intensity, the first pool capacity, and the second pool capacity, the randomized-pool law has independent iid pools and independent Poisson requested lengths. It is given by the product of both pool-count laws.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
lambdaX lambdaY :
ℝ≥0
NX NY :
ℕ
randomizedPoolsLaw P Q lambdaX lambdaY NX NY :
Measure (RandomizedPools (X := X) (Y := Y) NX NY)
((Measure.pi (fun _ : Fin NX ↦ P)).prod (poissonMeasure lambdaX)).prod ((Measure.pi (fun _ : Fin NY ↦ Q)).prod (poissonMeasure lambdaY))
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.randomizedPoolsLaw · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Basic.lean:56 · uses RandomizedPools
def independentPoissonPrefixLaw reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given a probability law for the first observations, a probability law for the second observations, the first Poisson intensity, and the second Poisson intensity, the independent Poisson-prefix law is the joint law of two untruncated iid prefixes. It is given by their product law.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
lambdaX lambdaY :
ℝ≥0
independentPoissonPrefixLaw P Q lambdaX lambdaY :
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.independentPoissonPrefixLaw · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Basic.lean:69 · uses FiniteSample
def nonoverflowSet reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given the first pool capacity and the second pool capacity, the joint nonoverflow event says that both requested prefixes fit in their respective pools. It is given by the conjunction of the two capacity bounds.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
NX NY :
ℕ
nonoverflowSet NX NY :
Set (RandomizedPools (X := X) (Y := Y) NX NY)
{z | z.1.2 ≤ NX ∧ z.2.2 ≤ NY}
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.nonoverflowSet · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Basic.lean:80 · uses RandomizedPools
def overflowSet reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given the first pool capacity and the second pool capacity, the overflow event says that at least one requested prefix is too long. It is given by the union of the two marginal overflow events.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
NX NY :
ℕ
overflowSet NX NY :
Set (RandomizedPools (X := X) (Y := Y) NX NY)
{z | NX < z.1.2} ∪ {z | NY < z.2.2}
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.overflowSet · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Basic.lean:87 · uses RandomizedPools
def totalizedPrefixPair reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given a fallback first prefix, a fallback second prefix, and a randomized two-pool outcome, the totalized prefix pair retains both requested prefixes when possible and uses the corresponding fallback otherwise. It is given by applying the one-pool totalization in each coordinate.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
NX NY :
ℕ
overflowX :
overflowY :
z :
RandomizedPools (X := X) (Y := Y) NX NY
totalizedPrefixPair overflowX overflowY z :
(totalizedPrefix overflowX z.1.1 z.1.2, totalizedPrefix overflowY z.2.1 z.2.2)
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.totalizedPrefixPair · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Basic.lean:132 · uses FiniteSample , RandomizedPools
def cappedPrefixStatistic reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given a two-prefix statistic, a fallback value, and a randomized two-pool outcome, the capped-prefix statistic uses the genuine prefixes when both fit and the fallback when either overflows. It is given by the two capacity tests.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
NX NY :
ℕ
T :
(FiniteSample X × FiniteSample Y) → ℝ
zOver :
ℝ
z :
RandomizedPools (X := X) (Y := Y) NX NY
cappedPrefixStatistic T zOver z :
ℝ
if hX : z.1.2
≤ NX then if hY : z.2.2 ≤ NY then T (prefixOfLE z.1.1 z.1.2 hX, prefixOfLE z.2.1 z.2.2 hY) else zOver else zOver
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.cappedPrefixStatistic · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Basic.lean:152 · uses FiniteSample , RandomizedPools
theorem map_totalizedPrefixPair_restrict_nonoverflow reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given probability laws for the first and second pools, the first and second Poisson intensities, the first and second pool capacities, and fallback first and second prefixes, mapping the jointly nonoverflowing fixed pools to their totalized prefixes gives the correspondingly restricted product Poisson-prefix law.

Formal statement
X :
Type uX
shared
Y :
Type uY
shared
lambdaX lambdaY :
ℝ≥0
NX NY :
ℕ
overflowX :
overflowY :
Measure.map (totalizedPrefixPair overflowX overflowY) ((randomizedPoolsLaw P Q lambdaX lambdaY NX NY).restrict (nonoverflowSet (X := X) (Y := Y) NX NY))
= (independentPoissonPrefixLaw P Q lambdaX lambdaY).restrict ((FiniteSample.count ⁻¹' Iic NX) ×ˢ (FiniteSample.count ⁻¹' Iic NY))
Proof (Lean source)
theorem map_totalizedPrefixPair_restrict_nonoverflow (P : Measure X) [IsProbabilityMeasure P] (Q : Measure Y) [IsProbabilityMeasure Q] (lambdaX lambdaY : ℝ≥0) (NX NY : ℕ) (overflowX : FiniteSample X) (overflowY : FiniteSample Y) : Measure.map (totalizedPrefixPair overflowX overflowY) ((randomizedPoolsLaw P Q lambdaX lambdaY NX NY).restrict (nonoverflowSet (X := X) (Y := Y) NX NY)) = (independentPoissonPrefixLaw P Q lambdaX lambdaY).restrict ((FiniteSample.count ⁻¹' Iic NX) ×ˢ (FiniteSample.count ⁻¹' Iic NY)) := by -- Rewrite `nonoverflowSet` as the product of the two marginal good events, -- commute product and restriction with `Measure.prod_restrict`, and use -- `Measure.map_prod_map`. Each marginal map is then exactly -- `map_totalizedPrefix_restrict_nonoverflow`; fold the target product -- restriction back with the same product/restriction identity. have hset : nonoverflowSet (X := X) (Y := Y) NX NY = (snd ⁻¹' Iic NX) ×ˢ (snd ⁻¹' Iic NY) := by ext z simp [nonoverflowSet] rw [hset] unfold randomizedPoolsLaw independentPoissonPrefixLaw totalizedPrefixPair rw [← Measure.prod_restrict] change Measure.map (map (fun z : (Fin NX → X) × ℕ ↦ totalizedPrefix overflowX z.1 z.2) (fun z : (Fin NY → Y) × ℕ ↦ totalizedPrefix overflowY z.1 z.2)) _ = _ rw [← Measure.map_prod_map _ _ (measurable_totalizedPrefix overflowX) (measurable_totalizedPrefix overflowY)] rw [map_totalizedPrefix_restrict_nonoverflow P lambdaX NX overflowX, map_totalizedPrefix_restrict_nonoverflow Q lambdaY NY overflowY, Measure.prod_restrict]
7 supporting declarations (lemmas, instances)
Risk 3 core · 8 supporting This module randomizes two independent fixed iid pools by two independent Poisson counts, averages a bounded capped-prefix statistic over those counts, and proves the conditional Jensen contraction and the resulting depo ★ sqRisk_independentPrefixRaoBlackwellStatistic_le

Rao--Blackwell risk transfer for independent unequal prefixes

This module randomizes two independent fixed iid pools by two independent Poisson counts, averages a bounded capped-prefix statistic over those counts, and proves the conditional Jensen contraction and the resulting depoissonization risk bound. Neither the alphabets nor the pool capacities need agree.

def independentPoissonCountKernel reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given the first Poisson intensity and the second Poisson intensity, the independent Poisson-count kernel keeps both fixed pools and independently attaches one requested length to each. It is given by the product Poisson mechanism with the output rearranged into pool-count pairs.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
NX NY :
ℕ
lambdaX lambdaY :
ℝ≥0
independentPoissonCountKernel lambdaX lambdaY :
Kernel (FixedPools (X := X) (Y := Y) NX NY) (RandomizedPools (X := X) (Y := Y) NX NY)
mechanismKernel ((poissonMeasure lambdaX).prod (poissonMeasure lambdaY)) (fun z ↦ ((z.1.1, z.2.1), (z.1.2, z.2.2)))
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.independentPoissonCountKernel · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Risk.lean:37 · uses FixedPools , RandomizedPools
def independentPrefixRaoBlackwellStatistic reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given the first Poisson intensity, the second Poisson intensity, a two-prefix statistic, and a fallback value, the independent-prefix Rao--Blackwell statistic averages the capped statistic over the two auxiliary Poisson counts conditional on the fixed pools. It is given by the kernel mean.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
NX NY :
ℕ
lambdaX lambdaY :
ℝ≥0
T :
(FiniteSample X × FiniteSample Y) → ℝ
zOver :
ℝ
independentPrefixRaoBlackwellStatistic lambdaX lambdaY T zOver :
FixedPools (X := X) (Y := Y) NX NY → ℝ
kernelMean (independentPoissonCountKernel lambdaX lambdaY) (cappedPrefixStatistic T zOver)
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.independentPrefixRaoBlackwellStatistic · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/Risk.lean:125 · uses FiniteSample , FixedPools
theorem sqRisk_independentPrefixRaoBlackwellStatistic_le reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix

Given probability laws for the first and second observations, the first and second Poisson intensities, the first and second pool capacities, a measurable two-prefix statistic, an ordered outcome interval, a certificate that the statistic stays in that interval, a target in the interval, and a fallback in the interval, the fixed-pool Rao--Blackwell risk is bounded by the untruncated Poisson-prefix risk plus the squared interval diameter times the two upper tails.

Formal statement
X :
Type uX
shared
Y :
Type uY
shared
lambdaX lambdaY :
ℝ≥0
NX NY :
ℕ
T :
(FiniteSample X × FiniteSample Y) → ℝ
hT :
a b theta zOver :
ℝ
hab :
a ≤ b
hTmem :
∀ s, T s ∈ Icc a b
htheta :
theta ∈ Icc a b
hzOver :
zOver ∈ Icc a b
sqRisk (fixedPoolsLaw P Q NX NY) (independentPrefixRaoBlackwellStatistic lambdaX lambdaY T zOver) theta
≤ sqRisk (independentPoissonPrefixLaw P Q lambdaX lambdaY) T theta
+ (b - a) ^ 2 * ((poissonMeasure lambdaX).real (Ioi NX) + (poissonMeasure lambdaY).real (Ioi NY))
Proof (Lean source)
theorem sqRisk_independentPrefixRaoBlackwellStatistic_le (P : Measure X) [IsProbabilityMeasure P] (Q : Measure Y) [IsProbabilityMeasure Q] (lambdaX lambdaY : ℝ≥0) (NX NY : ℕ) {T : (FiniteSample X × FiniteSample Y) → ℝ} (hT : Measurable T) {a b theta zOver : ℝ} (hab : a ≤ b) (hTmem : ∀ s, T s ∈ Icc a b) (htheta : theta ∈ Icc a b) (hzOver : zOver ∈ Icc a b) : sqRisk (fixedPoolsLaw P Q NX NY) (independentPrefixRaoBlackwellStatistic lambdaX lambdaY T zOver) theta ≤ sqRisk (independentPoissonPrefixLaw P Q lambdaX lambdaY) T theta + (b - a) ^ 2 * ((poissonMeasure lambdaX).real (Ioi NX) + (poissonMeasure lambdaY).real (Ioi NY)) := by -- Start with the conditional contraction and split randomized risk over -- `nonoverflowSet` and its complement. Rewrite the good contribution with -- the restricted-risk equality and bound it by untruncated risk. The bad -- contribution is the constant fallback loss; bound that loss by the -- squared interval diameter and its event probability by the union bound. -- `measureReal_union_le` supplies the union bound. Product-event masses -- reduce to the stated Poisson tails using `Measure.prod_apply` and the -- probability-one masses of the iid-pool and opposite-arm laws. Follow the -- decomposition in `sqRisk_raoBlackwellStatistic_le`, with -- `overflowSet` replacing the one count event. have hTb : UniformlyBounded T := by refine ⟨max |a| |b|, (abs_nonneg a).trans (le_max_left _ _), ?_⟩ intro s exact abs_le_max_abs_abs (hTmem s).1 (hTmem s).2 have hCappedBound : UniformlyBounded (cappedPrefixStatistic (NX := NX) (NY := NY) T zOver) := by refine ⟨max |a| |b|, (abs_nonneg a).trans (le_max_left _ _), ?_⟩ intro z by_cases hX : z.1.2 ≤ NX · by_cases hY : z.2.2 ≤ NY · simp only [cappedPrefixStatistic, hX, hY, dite_true] exact abs_le_max_abs_abs (hTmem _).1 (hTmem _).2 · simp only [cappedPrefixStatistic, hX, hY, dite_true, dite_false] exact abs_le_max_abs_abs hzOver.1 hzOver.2 · simp only [cappedPrefixStatistic, hX, dite_false] exact abs_le_max_abs_abs hzOver.1 hzOver.2 let μ : Measure (RandomizedPools (X := X) (Y := Y) NX NY) := randomizedPoolsLaw P Q lambdaX lambdaY NX NY letI : IsProbabilityMeasure μ := by unfold μ randomizedPoolsLaw infer_instance let s : Set (RandomizedPools (X := X) (Y := Y) NX NY) := nonoverflowSet (X := X) (Y := Y) NX NY have hs : MeasurableSet s := measurableSet_nonoverflowSet NX NY obtain ⟨M, hM, hCappedBoundM⟩ := hCappedBound have hlossInt : Integrable (fun z => (cappedPrefixStatistic T zOver z - theta) ^ 2) μ := by refine (integrable_const ((M + |theta|) ^ 2)).mono' (((measurable_cappedPrefixStatistic hT zOver).sub measurable_const).pow_const 2 ).aestronglyMeasurable ?_ filter_upwards [] with z rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _), sq_le_sq, abs_of_nonneg (add_nonneg hM (abs_nonneg theta))] exact (abs_sub _ _).trans (add_le_add (hCappedBoundM z) le_rfl) have hsplit : sqRisk μ (cappedPrefixStatistic T zOver) theta = sqRisk (μ.restrict s) (cappedPrefixStatistic T zOver) theta + sqRisk (μ.restrict sᶜ) (cappedPrefixStatistic T zOver) theta := by unfold sqRisk conv_lhs => rw [← Measure.restrict_add_restrict_compl (μ := μ) hs, integral_add_measure hlossInt.restrict hlossInt.restrict] have hsc : sᶜ = overflowSet (X := X) (Y := Y) NX NY := by simp only [s, nonoverflowSet_eq_compl_overflowSet, compl_compl] have hoverflowSq : (zOver - theta) ^ 2 ≤ (b - a) ^ 2 := by have hdist : |zOver - theta| ≤ b - a := by simpa [Real.dist_eq] using Real.dist_le_of_mem_Icc hzOver htheta rw [← sq_abs (zOver - theta)] exact (sq_le_sq₀ (abs_nonneg _) (sub_nonneg.mpr hab)).2 hdist have hbadEq : sqRisk (μ.restrict (overflowSet (X := X) (Y := Y) NX NY)) (cappedPrefixStatistic T zOver) theta = (zOver - theta) ^ 2 * μ.real (overflowSet (X := X) (Y := Y) NX NY) := by unfold sqRisk have hae : ∀ᵐ z ∂μ.restrict (overflowSet (X := X) (Y := Y) NX NY), (cappedPrefixStatistic T zOver z - theta) ^ 2 = (zOver - theta) ^ 2 := by filter_upwards [ae_restrict_mem (measurableSet_overflowSet NX NY)] with z hz change NX < z.1.2 ∨ NY < z.2.2 at hz rcases hz with hx | hy · simp [cappedPrefixStatistic, not_le_of_gt hx] · by_cases hx : z.1.2 ≤ NX · simp [cappedPrefixStatistic, hx, not_le_of_gt hy] · simp [cappedPrefixStatistic, hx] rw [integral_congr_ae hae, integral_const] simp only [smul_eq_mul, measureReal_def] rw [Measure.restrict_apply_univ] ring have hoverflowMass : μ.real (overflowSet (X := X) (Y := Y) NX NY) ≤ (poissonMeasure lambdaX).real (Ioi NX) + (poissonMeasure lambdaY).real (Ioi NY) := by let eX : Set (RandomizedPools (X := X) (Y := Y) NX NY) := {z | NX < z.1.2} let eY : Set (RandomizedPools (X := X) (Y := Y) NX NY) := {z | NY < z.2.2} have hOverflow : overflowSet (X := X) (Y := Y) NX NY = eX ∪ eY := by rfl have heXeq : μ.real eX = (poissonMeasure lambdaX).real (Ioi NX) := by have hset : eX = ((Set.univ : Set (Fin NX → X)) ×ˢ Ioi NX) ×ˢ (Set.univ : Set ((Fin NY → Y) × ℕ)) := by ext z simp [eX] simp [hset, μ, randomizedPoolsLaw] have heYeq : μ.real eY = (poissonMeasure lambdaY).real (Ioi NY) := by have hset : eY = (Set.univ : Set ((Fin NX → X) × ℕ)) ×ˢ ((Set.univ : Set (Fin NY → Y)) ×ˢ Ioi NY) := by ext z simp [eY] simp [hset, μ, randomizedPoolsLaw] rw [hOverflow] exact (measureReal_union_le eX eY).trans_eq (congrArg₂ (· + ·) heXeq heYeq) have hbadLe : sqRisk (μ.restrict (overflowSet (X := X) (Y := Y) NX NY)) (cappedPrefixStatistic T zOver) theta ≤ (b - a) ^ 2 * ((poissonMeasure lambdaX).real (Ioi NX) + (poissonMeasure lambdaY).real (Ioi NY)) := by rw [hbadEq] calc (zOver - theta) ^ 2 * μ.real (overflowSet (X := X) (Y := Y) NX NY) ≤ (b - a) ^ 2 * μ.real (overflowSet (X := X) (Y := Y) NX NY) := mul_le_mul_of_nonneg_right hoverflowSq (by positivity) _ ≤ (b - a) ^ 2 * ((poissonMeasure lambdaX).real (Ioi NX) + (poissonMeasure lambdaY).real (Ioi NY)) := mul_le_mul_of_nonneg_left hoverflowMass (sq_nonneg _) calc sqRisk (fixedPoolsLaw P Q NX NY) (independentPrefixRaoBlackwellStatistic lambdaX lambdaY T zOver) theta ≤ sqRisk μ (cappedPrefixStatistic T zOver) theta := by exact sqRisk_independentPrefixRaoBlackwellStatistic_le_capped P Q lambdaX lambdaY NX NY hT hTmem hzOver _ = sqRisk (μ.restrict s) (cappedPrefixStatistic T zOver) theta + sqRisk (μ.restrict sᶜ) (cappedPrefixStatistic T zOver) theta := hsplit _ = sqRisk ((independentPoissonPrefixLaw P Q lambdaX lambdaY).restrict ((FiniteSample.count ⁻¹' Iic NX) ×ˢ (FiniteSample.count ⁻¹' Iic NY))) T theta + sqRisk (μ.restrict (overflowSet (X := X) (Y := Y) NX NY)) (cappedPrefixStatistic T zOver) theta := by rw [show μ.restrict s = (randomizedPoolsLaw P Q lambdaX lambdaY NX NY).restrict (nonoverflowSet (X := X) (Y := Y) NX NY) from rfl, sqRisk_cappedPrefixStatistic_restrict_nonoverflow_eq P Q lambdaX lambdaY NX NY hT zOver theta, hsc] _ ≤ sqRisk (independentPoissonPrefixLaw P Q lambdaX lambdaY) T theta + (b - a) ^ 2 * ((poissonMeasure lambdaX).real (Ioi NX) + (poissonMeasure lambdaY).real (Ioi NY)) := add_le_add (sqRisk_independentPoissonPrefixLaw_restrict_nonoverflow_le P Q lambdaX lambdaY NX NY hT hTb theta) hbadLe
8 supporting declarations (lemmas, instances)