Stat.Finite­Rao­Blackwell.Poisson.Independent­Prefix.Random­Scale­Transfer

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 9 core · 7 supporting This module defines a measurable deterministic retention kernel from two ordered finite Poisson records to two fixed, possibly unequal, sample arrays. ★ map_twoPoolOrderedRetention_restrict_success

Ordered retention for random-scale unequal Poisson pools

This module defines a measurable deterministic retention kernel from two ordered finite Poisson records to two fixed, possibly unequal, sample arrays. It records the exact product law of the retained arrays on the event that both counts are large enough, and packages the conditional laws used by a shared-random-scale experiment.

abbrev RawTwoPool reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given the first observation space and the second observation space, the raw two-pool observation consists of two ordered finite records with unrelated realized counts. It is represented by their product.

Definition (Lean source)
X :
Type uX
Y :
Type uY
RawTwoPool X Y :
Type (max uX uY)
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.RawTwoPool · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Basic.lean:34
def IsRandomScaleTwoPoolExperiment reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given a raw experiment kernel, the first mark kernel, the second mark kernel, a shared nonnegative scale, and two intensity multipliers, the shared-scale two-pool experiment property says that each parameter selects two independent marked Poisson records with the stated scaled intensities. It is given by the fibrewise product-law identity.

Definition (Lean source)
Theta :
Type uTheta
shared
X :
Type uX
shared
Y :
Type uY
shared
K :
Kernel Theta (RawTwoPool X Y)
P :
Kernel Theta X
Q :
Kernel Theta Y
∀ theta, IsProbabilityMeasure (P theta)
∀ theta, IsProbabilityMeasure (Q theta)
S :
Theta → ℝ≥0
u v :
ℝ≥0
theta :
IsRandomScaleTwoPoolExperiment K P Q S u v :
Prop
K theta
= (finitePoissonSampleLaw (P theta) (u * S theta)).prod (finitePoissonSampleLaw (Q theta) (v * S theta))
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.IsRandomScaleTwoPoolExperiment · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Basic.lean:40 · uses FiniteSample , RawTwoPool
def IsFixedTwoPoolExperiment reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given the first fixed sample size, the second fixed sample size, a fixed-pool experiment kernel, the first mark kernel, and the second mark kernel, the fixed unequal-pool experiment property says that each parameter selects the corresponding independent iid product law. It is given by the fibrewise product-law identity.

Definition (Lean source)
Theta :
Type uTheta
shared
X :
Type uX
shared
Y :
Type uY
shared
n m :
ℕ
K :
Kernel Theta (FixedPools (X := X) (Y := Y) n m)
P :
Kernel Theta X
Q :
Kernel Theta Y
∀ theta, IsProbabilityMeasure (P theta)
∀ theta, IsProbabilityMeasure (Q theta)
theta :
IsFixedTwoPoolExperiment n m K P Q :
Prop
K theta = fixedPoolsLaw (P theta) (Q theta) n m
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.IsFixedTwoPoolExperiment · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Basic.lean:56 · uses FixedPools
def retentionSuccessSet reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given the first requested prefix length and the second requested prefix length, the retention-success event is that both raw records contain their respective requested numbers of marks. It is given by the conjunction of the two count bounds.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
n m :
ℕ
retentionSuccessSet n m :
{z | n ≤ z.1.count ∧ m ≤ z.2.count}
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.retentionSuccessSet · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Basic.lean:69 · uses RawTwoPool
def retentionFailureSet reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given the first requested prefix length and the second requested prefix length, the retention-failure event is that at least one raw record is too short. It is given by the union of the two lower-count events.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
n m :
ℕ
retentionFailureSet n m :
{z | z.1.count < n} ∪ {z | z.2.count < m}
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.retentionFailureSet · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Basic.lean:76 · uses RawTwoPool
def orderedPrefix reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given a fallback fixed array and a finite record, the ordered prefix retains its initial requested segment when available and otherwise returns the fallback. It is given by the count test.

Definition (Lean source)
X :
Type uX
shared
n :
ℕ
shared
fallback :
Fin n → X
s :
orderedPrefix fallback s :
Fin n → X
if h : n ≤ s.count then fun i => s.points (castLE h i) else fallback
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.orderedPrefix · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Basic.lean:108 · uses FiniteSample
def twoPoolOrderedRetention reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given a fallback first array and a fallback second array, the two-pool ordered-retention map applies ordered prefix retention in each coordinate. It is given by the pair of retained prefixes.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
n :
ℕ
shared
m :
ℕ
shared
fallbackX :
Fin n → X
fallbackY :
Fin m → Y
twoPoolOrderedRetention fallbackX fallbackY :
RawTwoPool X Y → FixedPools (X := X) (Y := Y) n m
fun z => (orderedPrefix fallbackX z.1, orderedPrefix fallbackY z.2)
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.twoPoolOrderedRetention · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Basic.lean:131 · uses FixedPools , RawTwoPool
def orderedRetentionKernel reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given a fallback first array and a fallback second array, the ordered-record retention kernel deterministically applies two-pool ordered retention. It is given by the Dirac kernel at that measurable map.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
n :
ℕ
shared
m :
ℕ
shared
fallbackX :
Fin n → X
fallbackY :
Fin m → Y
orderedRetentionKernel fallbackX fallbackY :
Kernel (RawTwoPool X Y) (FixedPools (X := X) (Y := Y) n m)
Kernel.deterministic (twoPoolOrderedRetention fallbackX fallbackY) (measurable_twoPoolOrderedRetention fallbackX fallbackY)
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.orderedRetentionKernel · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Basic.lean:210 · uses FiniteSample , FixedPools , RawTwoPool
theorem map_twoPoolOrderedRetention_restrict_success reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given the first mark law, the second mark law, the first Poisson intensity, the second Poisson intensity, the first requested length, the second requested length, a fallback first array, and a fallback second array, ordered retention on joint success has the unnormalized exact product law, including the complete auxiliary iid law.

Formal statement
X :
Type uX
shared
Y :
Type uY
shared
lambdaX lambdaY :
ℝ≥0
n m :
ℕ
fallbackX :
Fin n → X
fallbackY :
Fin m → Y
Measure.map (twoPoolOrderedRetention fallbackX fallbackY) (((finitePoissonSampleLaw P lambdaX).prod (finitePoissonSampleLaw Q lambdaY)).restrict (retentionSuccessSet (X := X) (Y := Y) n m))
= ((poissonMeasure lambdaX) (Ici n) * (poissonMeasure lambdaY) (Ici m)) • fixedPoolsLaw P Q n m
Proof (Lean source)
theorem map_twoPoolOrderedRetention_restrict_success (P : Measure X) [IsProbabilityMeasure P] (Q : Measure Y) [IsProbabilityMeasure Q] (lambdaX lambdaY : ℝ≥0) (n m : ℕ) (fallbackX : Fin n → X) (fallbackY : Fin m → Y) : Measure.map (twoPoolOrderedRetention fallbackX fallbackY) (((finitePoissonSampleLaw P lambdaX).prod (finitePoissonSampleLaw Q lambdaY)).restrict (retentionSuccessSet (X := X) (Y := Y) n m)) = ((poissonMeasure lambdaX) (Set.Ici n) * (poissonMeasure lambdaY) (Set.Ici m)) • fixedPoolsLaw P Q n m := by let μX : Measure (FiniteSample X) := finitePoissonSampleLaw P lambdaX let μY : Measure (FiniteSample Y) := finitePoissonSampleLaw Q lambdaY let sX : Set (FiniteSample X) := FiniteSample.count ⁻¹' Set.Ici n let sY : Set (FiniteSample Y) := FiniteSample.count ⁻¹' Set.Ici m have hsuccess : retentionSuccessSet (X := X) (Y := Y) n m = sX ×ˢ sY := by ext z simp [retentionSuccessSet, sX, sY] rw [hsuccess, ← Measure.prod_restrict] change Measure.map (map (orderedPrefix fallbackX) (orderedPrefix fallbackY)) ((μX.restrict sX).prod (μY.restrict sY)) = _ rw [← Measure.map_prod_map _ _ (measurable_orderedPrefix fallbackX) (measurable_orderedPrefix fallbackY), show Measure.map (orderedPrefix fallbackX) (μX.restrict sX) = (poissonMeasure lambdaX) (Set.Ici n) • Measure.pi (fun _ : Fin n => P) by exact map_orderedPrefix_restrict_count_ge P lambdaX fallbackX, show Measure.map (orderedPrefix fallbackY) (μY.restrict sY) = (poissonMeasure lambdaY) (Set.Ici m) • Measure.pi (fun _ : Fin m => Q) by exact map_orderedPrefix_restrict_count_ge Q lambdaY fallbackY, Measure.prod_smul_left, Measure.prod_smul_right, smul_smul] rfl
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.map_twoPoolOrderedRetention_restrict_success · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Basic.lean:259 · uses FiniteSample , finitePoissonSampleLaw , FixedPools , RawTwoPool , retentionSuccessSet , twoPoolOrderedRetention , fixedPoolsLaw
7 supporting declarations (lemmas, instances)
Mixture 3 core · 2 supporting This module compares fixed-size iid prior predictives with finite-Poisson prior predictives whose intensity varies with a shared latent parameter. ★ fixedMixture_tv_le_randomScalePoisson

Shared-prior random-scale Poisson predictive transfer

This module compares fixed-size iid prior predictives with finite-Poisson prior predictives whose intensity varies with a shared latent parameter. A single ordered-prefix map transfers both experiments, and the error is the prior-average probability of a short Poisson count.

def fixedMixture reviewed
Causalean.Stat.FiniteRaoBlackwell.Poisson.IndependentPrefix.RandomScaleTransfer

The fixed-size predictive averages iid samples of length n from a parameter-dependent mark kernel over a shared prior.

Definition (Lean source)
Theta :
Type u_1
shared
X :
Type u_2
shared
pi :
Measure Theta
P :
n :
ℕ
fixedMixture pi P n :
Measure (Fin n → X)
pi.bind (fun theta => Measure.pi (fun _ : Fin n => P theta))
Causalean.Stat.FiniteRaoBlackwell.Poisson.IndependentPrefix.RandomScaleTransfer.fixedMixture · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Mixture.lean:24
def rawMixture reviewed
Causalean.Stat.FiniteRaoBlackwell.Poisson.IndependentPrefix.RandomScaleTransfer

The raw finite-Poisson predictive averages a mark kernel over a shared prior, using an intensity multiplier times the parameter's nonnegative scale as its conditional intensity.

Definition (Lean source)
Theta :
Type u_1
shared
X :
Type u_2
shared
pi :
Measure Theta
P :
S :
Theta → ℝ≥0
u :
ℝ≥0
rawMixture pi P S u :
pi.bind (fun theta => finitePoissonSampleLaw (P theta) (u * S theta))
Causalean.Stat.FiniteRaoBlackwell.Poisson.IndependentPrefix.RandomScaleTransfer.rawMixture · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Mixture.lean:34 · uses FiniteSample
theorem fixedMixture_tv_le_randomScalePoisson reviewed
Causalean.Stat.FiniteRaoBlackwell.Poisson.IndependentPrefix.RandomScaleTransfer

Given two probability mark kernels over one probability prior, a measurable shared scale, an intensity multiplier, a sample size and common fallback, and measurable fixed and raw fibres on both sides, the total-variation distance between the two fixed-size predictives is at most the total-variation distance between the two raw finite-Poisson predictives plus twice the prior average of the Poisson probability that the count is below the sample size.

Formal statement
Theta :
Type u_1
shared
X :
Type u_2
shared
S :
Theta → ℝ≥0
hS :
u :
ℝ≥0
n :
ℕ
fallback :
Fin n → X
hfixed0 :
AEMeasurable (fun theta => Measure.pi (fun _ : Fin n => P0 theta)) pi
hfixed1 :
AEMeasurable (fun theta => Measure.pi (fun _ : Fin n => P1 theta)) pi
hraw0 :
hraw1 :
tvDist (fixedMixture pi P0 n) (fixedMixture pi P1 n)
≤ tvDist (rawMixture pi P0 S u) (rawMixture pi P1 S u)
+ 2 * ∫ theta, (poissonMeasure (u * S theta) (Iio n)).toReal ∂pi
Proof (Lean source)
theorem fixedMixture_tv_le_randomScalePoisson (pi : Measure Theta) [IsProbabilityMeasure pi] (P0 P1 : Kernel Theta X) [∀ theta, IsProbabilityMeasure (P0 theta)] [∀ theta, IsProbabilityMeasure (P1 theta)] (S : Theta → ℝ≥0) (hS : Measurable S) (u : ℝ≥0) (n : ℕ) (fallback : Fin n → X) (hfixed0 : AEMeasurable (fun theta => Measure.pi (fun _ : Fin n => P0 theta)) pi) (hfixed1 : AEMeasurable (fun theta => Measure.pi (fun _ : Fin n => P1 theta)) pi) (hraw0 : AEMeasurable (fun theta => finitePoissonSampleLaw (P0 theta) (u * S theta)) pi) (hraw1 : AEMeasurable (fun theta => finitePoissonSampleLaw (P1 theta) (u * S theta)) pi) : tvDist (fixedMixture pi P0 n) (fixedMixture pi P1 n) ≤ tvDist (rawMixture pi P0 S u) (rawMixture pi P1 S u) + 2 * ∫ theta, (poissonMeasure (u * S theta) (Iio n)).toReal ∂pi := by let f := orderedPrefix fallback let mu0 := fixedMixture pi P0 n let mu1 := fixedMixture pi P1 n let rho0 := rawMixture pi P0 S u let rho1 := rawMixture pi P1 S u let : IsProbabilityMeasure mu0 := isProbabilityMeasure_bind hfixed0 (Filter.Eventually.of_forall fun _ => inferInstance) let : IsProbabilityMeasure mu1 := isProbabilityMeasure_bind hfixed1 (Filter.Eventually.of_forall fun _ => inferInstance) let : IsProbabilityMeasure rho0 := isProbabilityMeasure_bind hraw0 (Filter.Eventually.of_forall fun _ => inferInstance) let : IsProbabilityMeasure rho1 := isProbabilityMeasure_bind hraw1 (Filter.Eventually.of_forall fun _ => inferInstance) have hf : Measurable f := measurable_orderedPrefix fallback let : IsProbabilityMeasure (Measure.map f rho0) := Measure.isProbabilityMeasure_map hf.aemeasurable let : IsProbabilityMeasure (Measure.map f rho1) := Measure.isProbabilityMeasure_map hf.aemeasurable have herr0 := tvDist_fixedMixture_map_rawMixture_le pi P0 S u n fallback hfixed0 hraw0 have herr1 := tvDist_fixedMixture_map_rawMixture_le pi P1 S u n fallback hfixed1 hraw1 have hcontract : tvDist (Measure.map f rho0) (Measure.map f rho1) ≤ tvDist rho0 rho1 := by simpa only [Measure.deterministic_comp_eq_map] using tvDist_bind_le rho0 rho1 (Kernel.deterministic f hf) change tvDist mu0 mu1 ≤ _ unfold tvDist apply ciSup_le rintro ⟨A, hA⟩ change |mu0.real A - mu1.real A| ≤ tvDist rho0 rho1 + 2 * ∫ theta, (poissonMeasure (u * S theta) (Iio n)).toReal ∂pi have h0 := (abs_measureReal_sub_le_tvDist (μ := mu0) (ν := Measure.map f rho0) hA).trans herr0 have h1 := (abs_measureReal_sub_le_tvDist (μ := mu1) (ν := Measure.map f rho1) hA).trans herr1 have hc := (abs_measureReal_sub_le_tvDist (μ := Measure.map f rho0) (ν := Measure.map f rho1) hA).trans hcontract have htri := abs_sub_le (mu0.real A) ((Measure.map f rho0).real A) (mu1.real A) have htri' := abs_sub_le ((Measure.map f rho0).real A) ((Measure.map f rho1).real A) (mu1.real A) rw [abs_sub_comm ((Measure.map f rho1).real A) (mu1.real A)] at htri' linarith
Causalean.Stat.FiniteRaoBlackwell.Poisson.IndependentPrefix.RandomScaleTransfer.fixedMixture_tv_le_randomScalePoisson · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Mixture.lean:151 · uses FiniteSample , finitePoissonSampleLaw , fixedMixture , rawMixture , tvDist
2 supporting declarations (lemmas, instances)
Risk 6 core · 5 supporting This module defines general nonnegative decision risks and transfers any measurable rule on two fixed unequal pools to the raw random-scale Poisson experiment. ★ decisionRisk_transferredRawRule_le

Bounded-loss decision transfer

This module defines general nonnegative decision risks and transfers any measurable rule on two fixed unequal pools to the raw random-scale Poisson experiment. Exact ordered retention handles the successful-count event; bounded loss pays only for count failure.

def decisionRisk reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given an experiment kernel, a nonnegative loss, a decision rule, and a parameter value, the decision risk is the expected loss under that parameter's experiment law. It is given by its lower integral.

Definition (Lean source)
Theta :
Type uTheta
shared
A :
Type uA
shared
Z :
K :
Kernel Theta Z
loss :
Theta → A → ℝ≥0∞
rule :
Z → A
theta :
Theta
decisionRisk K loss rule theta :
ℝ≥0∞
∫⁻ z, loss theta (rule z) ∂K theta
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.decisionRisk · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Risk.lean:33
def bayesDecisionRisk reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given a parameter prior, an experiment kernel, a nonnegative loss, and a decision rule, the Bayes decision risk averages the rule's parameterwise risks. It is given by the prior lower integral.

Definition (Lean source)
Theta :
Type uTheta
shared
A :
Type uA
shared
Z :
pi :
Measure Theta
K :
Kernel Theta Z
loss :
Theta → A → ℝ≥0∞
rule :
Z → A
bayesDecisionRisk pi K loss rule :
ℝ≥0∞
∫⁻ theta, decisionRisk K loss rule theta ∂pi
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.bayesDecisionRisk · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Risk.lean:41
def worstCaseDecisionRisk reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given an experiment kernel, a nonnegative loss, and a decision rule, the worst-case decision risk is the largest parameterwise risk. It is given by the supremum over parameters.

Definition (Lean source)
Theta :
Type uTheta
shared
A :
Type uA
shared
Z :
K :
Kernel Theta Z
loss :
Theta → A → ℝ≥0∞
rule :
Z → A
worstCaseDecisionRisk K loss rule :
ℝ≥0∞
⨆ theta, decisionRisk K loss rule theta
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.worstCaseDecisionRisk · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Risk.lean:49
def minimaxDecisionRisk reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given an experiment kernel and a nonnegative loss, the minimax decision risk is the smallest worst-case risk attainable by a measurable rule. It is given by the infimum over measurable rules.

Definition (Lean source)
Theta :
Type uTheta
shared
A :
Type uA
shared
Z :
K :
Kernel Theta Z
loss :
Theta → A → ℝ≥0∞
minimaxDecisionRisk K loss :
ℝ≥0∞
⨅ rule : {f : Z → A // Measurable f}, worstCaseDecisionRisk K loss rule.1
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.minimaxDecisionRisk · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Risk.lean:56
def transferredRawRule reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given the first requested length, the second requested length, a fixed sample rule, a fallback first array, a fallback second array, and a fallback action, the transferred raw rule uses retained prefixes on count success and the fallback action otherwise. It is given by the success test.

Definition (Lean source)
X :
Type uX
shared
Y :
Type uY
shared
A :
Type uA
shared
n m :
ℕ
rule :
FixedPools (X := X) (Y := Y) n m → A
fallbackX :
Fin n → X
fallbackY :
Fin m → Y
fallbackA :
A
transferredRawRule n m rule fallbackX fallbackY fallbackA :
RawTwoPool X Y → A
fun z => if n ≤ z.1.count ∧
m ≤ z.2.count then rule (twoPoolOrderedRetention fallbackX fallbackY z) else fallbackA
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.transferredRawRule · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Risk.lean:63 · uses FixedPools , RawTwoPool
theorem decisionRisk_transferredRawRule_le reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given a raw experiment, a fixed-pool experiment, the first mark kernel, the second mark kernel, a shared scale, two intensity multipliers, the raw experiment law, the fixed experiment law, a loss, a finite loss bound, joint measurability of the loss, a measurable fixed rule, a fallback first array, a fallback second array, a fallback action, and a parameter value, the transferred raw-rule risk is at most fixed risk plus bounded failure probability.

Formal statement
Theta :
Type uTheta
shared
X :
Type uX
shared
Y :
Type uY
shared
A :
Type uA
shared
n :
ℕ
shared
m :
ℕ
shared
Kraw :
Kernel Theta (RawTwoPool X Y)
Kfixed :
Kernel Theta (FixedPools (X := X) (Y := Y) n m)
P :
Kernel Theta X
Q :
Kernel Theta Y
∀ theta, IsProbabilityMeasure (P theta)
∀ theta, IsProbabilityMeasure (Q theta)
S :
Theta → ℝ≥0
u v :
ℝ≥0
hraw :
hfixed :
loss :
Theta → A → ℝ≥0∞
B :
ℝ≥0∞
hB :
B ≠ ⊤
hloss :
hbound :
∀ theta a, loss theta a ≤ B
rule :
FixedPools (X := X) (Y := Y) n m → A
hrule :
fallbackX :
Fin n → X
fallbackY :
Fin m → Y
fallbackA :
A
theta :
Theta
decisionRisk Kraw loss (transferredRawRule n m rule fallbackX fallbackY fallbackA) theta
≤ decisionRisk Kfixed loss rule theta
+ B * Kraw theta (retentionFailureSet (X := X) (Y := Y) n m)
Proof (Lean source)
theorem decisionRisk_transferredRawRule_le (Kraw : Kernel Theta (RawTwoPool X Y)) (Kfixed : Kernel Theta (FixedPools (X := X) (Y := Y) n m)) (P : Kernel Theta X) (Q : Kernel Theta Y) [∀ theta, IsProbabilityMeasure (P theta)] [∀ theta, IsProbabilityMeasure (Q theta)] (S : Theta → ℝ≥0) (u v : ℝ≥0) (hraw : IsRandomScaleTwoPoolExperiment Kraw P Q S u v) (hfixed : IsFixedTwoPoolExperiment n m Kfixed P Q) (loss : Theta → A → ℝ≥0∞) (B : ℝ≥0∞) (hB : B ≠ ⊤) (hloss : Measurable (uncurry loss)) (hbound : ∀ theta a, loss theta a ≤ B) (rule : FixedPools (X := X) (Y := Y) n m → A) (hrule : Measurable rule) (fallbackX : Fin n → X) (fallbackY : Fin m → Y) (fallbackA : A) (theta : Theta) : decisionRisk Kraw loss (transferredRawRule n m rule fallbackX fallbackY fallbackA) theta ≤ decisionRisk Kfixed loss rule theta + B * Kraw theta (retentionFailureSet (X := X) (Y := Y) n m) := by /- Split the raw measure over success and failure. On success, rewrite the pushforward by `map_twoPoolOrderedRetention_restrict_success`; its scalar success mass is at most one, and `hfixed` identifies the fixed risk. On failure, the transferred rule is constant and `hbound` bounds its integral by `B` times the failure mass. -/ let E : Set (RawTwoPool X Y) := retentionSuccessSet n m have hE : MeasurableSet E := measurableSet_retentionSuccessSet n m have hlossTheta : Measurable (loss theta) := hloss.comp (measurable_const.prodMk measurable_id) have hfixedIntegrand : Measurable (fun z => loss theta (rule z)) := hlossTheta.comp hrule have hsuccess : (∫⁻ z in E, loss theta (transferredRawRule n m rule fallbackX fallbackY fallbackA z) ∂Kraw theta) ≤ decisionRisk Kfixed loss rule theta := by have hsuccessEq : (∫⁻ z in E, loss theta (transferredRawRule n m rule fallbackX fallbackY fallbackA z) ∂Kraw theta) = ∫⁻ z in E, loss theta (rule (twoPoolOrderedRetention fallbackX fallbackY z)) ∂Kraw theta := by apply setLIntegral_congr_fun hE intro z hz simp only [transferredRawRule] rw [if_pos] simpa [E, retentionSuccessSet] using hz unfold decisionRisk rw [hsuccessEq, ← lintegral_map hfixedIntegrand (measurable_twoPoolOrderedRetention fallbackX fallbackY)] rw [hraw theta, map_twoPoolOrderedRetention_restrict_success (P theta) (Q theta) (u * S theta) (v * S theta) n m fallbackX fallbackY, lintegral_smul_measure, smul_eq_mul, hfixed theta] apply mul_le_of_le_one_left (by positivity) calc (poissonMeasure (u * S theta)) (Ici n) * (poissonMeasure (v * S theta)) (Ici m) ≤ 1 * 1 := mul_le_mul prob_le_one prob_le_one (by positivity) (by positivity) _ = 1 := one_mul 1 have hfailure : (∫⁻ z in Eᶜ, loss theta (transferredRawRule n m rule fallbackX fallbackY fallbackA z) ∂Kraw theta) ≤ B * Kraw theta (retentionFailureSet (X := X) (Y := Y) n m) := by calc (∫⁻ z in Eᶜ, loss theta (transferredRawRule n m rule fallbackX fallbackY fallbackA z) ∂Kraw theta) ≤ ∫⁻ _z in Eᶜ, B ∂Kraw theta := by apply lintegral_mono exact fun z => hbound theta _ _ = B * Kraw theta Eᶜ := setLIntegral_const _ _ _ = B * Kraw theta (retentionFailureSet (X := X) (Y := Y) n m) := by congr 2 simpa [E] using congrArg compl (retentionSuccessSet_eq_compl_failureSet (X := X) (Y := Y) n m) unfold decisionRisk rw [← lintegral_add_compl (fun z => loss theta (transferredRawRule n m rule fallbackX fallbackY fallbackA z)) hE] exact add_le_add hsuccess hfailure
5 supporting declarations (lemmas, instances)
Count­Reconstruction 1 core · 3 supporting Histogram reconstruction transfers random-scale Poisson count mixtures to ordered samples and contracts total variation. ★ randomScale_fixed_tv_le_count_tv_add_inverse

Count reconstruction for random-scale transfer

Histogram reconstruction transfers random-scale Poisson count mixtures to ordered samples and contracts total variation.

lemma randomScale_fixed_tv_le_count_tv_add_inverse reviewed
Causalean.Stat.FiniteRaoBlackwell.Poisson.IndependentPrefix.RandomScaleTransfer

On finite parameter and observation spaces, for a probability mixing law, two conditional sampling kernels, a random scale and multiplier, a positive fixed sample size with fallback, and conditional Poisson means, multiplier times scale, at least twice that size at every parameter, the total-variation distance between the two fixed-size iid mixtures is at most the total-variation distance between the two mixtures of independent Poisson cell counts plus sixteen divided by the sample size.

Formal statement
P₀ P₁ :
Kernel Θ X
∀ θ, IsProbabilityMeasure (P₀ θ)
∀ θ, IsProbabilityMeasure (P₁ θ)
S :
Θ → ℝ≥0
u :
ℝ≥0
n :
ℕ
hn :
1 ≤ n
fallback :
Fin n → X
hmean :
∀ θ, (2 : ℝ) * n ≤ (u * S θ : ℝ≥0)
tvDist (fixedMixture π P₀ n) (fixedMixture π P₁ n)
≤ tvDist (π.bind (fun θ => independentPoissonCountLaw (P₀ θ) (u * S θ))) (π.bind (fun θ => independentPoissonCountLaw (P₁ θ) (u * S θ)))
+ 16 / (n : ℝ)
Proof (Lean source)
lemma randomScale_fixed_tv_le_count_tv_add_inverse {Θ X : Type*} [Fintype Θ] [MeasurableSpace Θ] [MeasurableSingletonClass Θ] [Fintype X] [MeasurableSpace X] [MeasurableSingletonClass X] [DecidableEq X] (π : Measure Θ) [IsProbabilityMeasure π] (P₀ P₁ : Kernel Θ X) [∀ θ, IsProbabilityMeasure (P₀ θ)] [∀ θ, IsProbabilityMeasure (P₁ θ)] (S : Θ → ℝ≥0) (u : ℝ≥0) (n : ℕ) (hn : 1 ≤ n) (fallback : Fin n → X) (hmean : ∀ θ, (2 : ℝ) * n ≤ (u * S θ : ℝ≥0)) : tvDist (fixedMixture π P₀ n) (fixedMixture π P₁ n) ≤ tvDist (π.bind (fun θ => independentPoissonCountLaw (P₀ θ) (u * S θ))) (π.bind (fun θ => independentPoissonCountLaw (P₁ θ) (u * S θ))) + 16 / (n : ℝ) := by have itail : Integrable (fun θ => (poissonMeasure (u * S θ) (Iio n)).toReal) π := by apply (integrable_const (1 : ℝ)).mono' (measurable_of_finite _).aestronglyMeasurable exact Filter.Eventually.of_forall fun θ => by rw [Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg] exact measureReal_le_one have htail : (∫ θ, (poissonMeasure (u * S θ) (Iio n)).toReal ∂π) ≤ 8 / (n : ℝ) := by calc _ ≤ ∫ _ : Θ, 8 / (n : ℝ) ∂π := integral_mono itail (integrable_const _) (fun θ => poisson_lower_tail_of_two_mul_le n (u * S θ) hn (hmean θ)) _ = _ := by simp have htransfer := randomScale_fixed_tv_le_count_tv_add_tail π P₀ P₁ S u n fallback have heq : (16 : ℝ) / n = 2 * (8 / (n : ℝ)) := by ring rw [heq] exact htransfer.trans (add_le_add le_rfl (mul_le_mul_of_nonneg_left htail (by norm_num)))
Causalean.Stat.FiniteRaoBlackwell.Poisson.IndependentPrefix.RandomScaleTransfer.randomScale_fixed_tv_le_count_tv_add_inverse · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/CountReconstruction.lean:97 · uses independentPoissonCountLaw , fixedMixture , tvDist
3 supporting declarations (lemmas, instances)
Failure 1 core · 2 supporting This module bounds the probability that either ordered Poisson pool is too short. ★ priorPredictive_retentionFailure_le

Failure bounds for a shared random scale

This module bounds the probability that either ordered Poisson pool is too short. The prior-predictive bound separates parameters whose shared scale lies below a deterministic floor from the two conditional Poisson lower tails above that floor.

theorem priorPredictive_retentionFailure_le reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given a parameter prior, a raw experiment kernel, the first mark kernel, the second mark kernel, a measurable shared scale, the two intensity multipliers, a deterministic scale floor, the raw-experiment law, the first requested length, the second requested length, a scale-error budget, a first-tail budget, a second-tail budget, the scale concentration bound, the first uniform tail bound, and the second uniform tail bound, prior-predictive retention failure is at most the sum of the three error budgets.

Formal statement
Theta :
Type uTheta
shared
X :
Type uX
shared
Y :
Type uY
shared
K :
Kernel Theta (RawTwoPool X Y)
P :
Kernel Theta X
Q :
Kernel Theta Y
S :
Theta → ℝ≥0
hS :
u v s0 :
ℝ≥0
hraw :
n m :
ℕ
epsScale epsX epsY :
ℝ≥0∞
hscale :
pi {theta | S theta < s0} ≤ epsScale
htailX :
∀ theta
if
s0 ≤ S theta
then
(poissonMeasure (u * S theta)) (Iio n) ≤ epsX
htailY :
∀ theta
if
s0 ≤ S theta
then
(poissonMeasure (v * S theta)) (Iio m) ≤ epsY
priorPredictive pi K (retentionFailureSet (X := X) (Y := Y) n m) ≤ epsScale + epsX + epsY
Proof (Lean source)
theorem priorPredictive_retentionFailure_le (pi : Measure Theta) [IsProbabilityMeasure pi] (K : Kernel Theta (RawTwoPool X Y)) (P : Kernel Theta X) (Q : Kernel Theta Y) [∀ theta, IsProbabilityMeasure (P theta)] [∀ theta, IsProbabilityMeasure (Q theta)] (S : Theta → ℝ≥0) (hS : Measurable S) (u v s0 : ℝ≥0) (hraw : IsRandomScaleTwoPoolExperiment K P Q S u v) (n m : ℕ) (epsScale epsX epsY : ℝ≥0∞) (hscale : pi {theta | S theta < s0} ≤ epsScale) (htailX : ∀ theta, s0 ≤ S theta → (poissonMeasure (u * S theta)) (Iio n) ≤ epsX) (htailY : ∀ theta, s0 ≤ S theta → (poissonMeasure (v * S theta)) (Iio m) ≤ epsY) : priorPredictive pi K (retentionFailureSet (X := X) (Y := Y) n m) ≤ epsScale + epsX + epsY := by /- Apply the scale-floor decomposition. Monotonicity of the lower integral and the two supplied tail bounds control the high-scale integrand by `epsX + epsY`; the probability prior gives mass at most one to the restricted region. -/ refine (priorPredictive_retentionFailure_le_scaleFloor_add_integratedTails pi K P Q S hS u v s0 hraw n m).trans ?_ have htail : (∫⁻ theta in {theta | s0 ≤ S theta}, ((poissonMeasure (u * S theta)) (Iio n) + (poissonMeasure (v * S theta)) (Iio m)) ∂pi) ≤ epsX + epsY := by calc (∫⁻ theta in {theta | s0 ≤ S theta}, ((poissonMeasure (u * S theta)) (Iio n) + (poissonMeasure (v * S theta)) (Iio m)) ∂pi) ≤ ∫⁻ _theta in {theta | s0 ≤ S theta}, epsX + epsY ∂pi := by apply setLIntegral_mono measurable_const intro theta htheta exact add_le_add (htailX theta htheta) (htailY theta htheta) _ = (epsX + epsY) * pi {theta | s0 ≤ S theta} := setLIntegral_const _ _ _ ≤ epsX + epsY := mul_le_of_le_one_right (by positivity) prob_le_one exact (add_le_add hscale htail).trans_eq (by simp [add_assoc])
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer.priorPredictive_retentionFailure_le · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Failure.lean:126 · uses FiniteSample , IsRandomScaleTwoPoolExperiment , RawTwoPool , retentionFailureSet , priorPredictive
2 supporting declarations (lemmas, instances)
Fibre 1 core · 1 supporting This module turns a finite marked-Poisson sample into a fixed iid prefix with one parameter-independent fallback map. ★ tvDist_iid_map_orderedPrefix_le

One-pool ordered-prefix fibre transfer

This module turns a finite marked-Poisson sample into a fixed iid prefix with one parameter-independent fallback map. It gives the exact pushforward decomposition and the resulting total-variation error paid only by the short-count event.

theorem tvDist_iid_map_orderedPrefix_le reviewed
Causalean.Stat.FiniteRaoBlackwell.Poisson.IndependentPrefix.RandomScaleTransfer

For a probability mark law, a nonnegative intensity, and a fixed fallback array, the total-variation distance between the iid law of a fixed-length sample and the law of the ordered prefix of that length taken from a finite Poisson sample, with the fallback array substituted when the Poisson sample is too short, is at most the Poisson probability that the count is below that length.

Formal statement
X :
Type u_1
shared
n :
ℕ
shared
lam :
ℝ≥0
fallback :
Fin n → X
tvDist (Measure.pi (fun _ : Fin n => P)) (Measure.map (orderedPrefix fallback) (finitePoissonSampleLaw P lam))
≤ (poissonMeasure lam (Iio n)).toReal
Proof (Lean source)
theorem tvDist_iid_map_orderedPrefix_le (P : Measure X) [IsProbabilityMeasure P] (lam : ℝ≥0) (fallback : Fin n → X) : tvDist (Measure.pi (fun _ : Fin n => P)) (Measure.map (orderedPrefix fallback) (finitePoissonSampleLaw P lam)) ≤ (poissonMeasure lam (Iio n)).toReal := by have hsum : (poissonMeasure lam (Set.Ici n)).toReal + (poissonMeasure lam (Iio n)).toReal = 1 := by have hcompl : (Set.Ici n : Set ℕ)ᶜ = Iio n := by ext k simp simpa [hcompl, measureReal_def] using (measureReal_add_measureReal_compl (μ := poissonMeasure lam) (by measurability : MeasurableSet (Set.Ici n))) rw [map_orderedPrefix_finitePoissonSampleLaw] unfold tvDist apply ciSup_le rintro ⟨A, hA⟩ rw [measureReal_add_apply (by simp only [Measure.smul_apply, smul_eq_mul]; finiteness) (by simp only [Measure.smul_apply, smul_eq_mul]; finiteness), measureReal_ennreal_smul_apply, measureReal_ennreal_smul_apply] have hgap : (Measure.pi (fun _ : Fin n => P)).real A - ((poissonMeasure lam (Set.Ici n)).toReal * (Measure.pi (fun _ : Fin n => P)).real A + (poissonMeasure lam (Iio n)).toReal * (Measure.dirac fallback).real A) = (poissonMeasure lam (Iio n)).toReal * ((Measure.pi (fun _ : Fin n => P)).real A - (Measure.dirac fallback).real A) := by have hq : (poissonMeasure lam (Set.Ici n)).toReal = 1 - (poissonMeasure lam (Iio n)).toReal := by linarith rw [hq] ring rw [hgap, abs_mul, abs_of_nonneg ENNReal.toReal_nonneg] calc _ ≤ (poissonMeasure lam (Iio n)).toReal * 1 := mul_le_mul_of_nonneg_left (abs_measureReal_sub_le_one (μ := Measure.pi (fun _ : Fin n => P)) (ν := Measure.dirac fallback) A) ENNReal.toReal_nonneg _ = _ := mul_one _
Causalean.Stat.FiniteRaoBlackwell.Poisson.IndependentPrefix.RandomScaleTransfer.tvDist_iid_map_orderedPrefix_le · Causalean/Stat/FiniteRaoBlackwell/Poisson/IndependentPrefix/RandomScaleTransfer/Fibre.lean:70 · uses FiniteSample , finitePoissonSampleLaw , orderedPrefix , tvDist
1 supporting declaration (lemmas, instances)
Main 1 core · 1 supporting This module combines a raw two-fuzzy-prior Bayes lower bound with shared-scale concentration and two Poisson lower-tail controls. ★ randomScale_twoFuzzy_minimax_lower_transfer

Random-scale unequal two-pool minimax transfer

This module combines a raw two-fuzzy-prior Bayes lower bound with shared-scale concentration and two Poisson lower-tail controls. The result transfers the raw bound, minus the resulting bounded-loss penalty, to the minimax risk of two fixed pools of unequal sizes.

theorem randomScale_twoFuzzy_minimax_lower_transfer reviewed
Causalean.Stat.FiniteRaoBlackwell.IndependentPoissonPrefix.RandomScaleMinimaxTransfer

Given two fuzzy parameter priors, a raw experiment, a fixed two-pool experiment, the first mark kernel, the second mark kernel, a measurable shared scale, two intensity multipliers, a scale floor, the raw experiment law, the fixed experiment law, a loss, a finite loss bound, joint measurability of the loss, fallback first and second arrays, a fallback action, a raw lower bound, a scale-error budget, two Poisson-tail budgets, the fixed two-pool minimax risk is at least the fuzzy-prior lower bound reduced by the loss bound times the total budget.

Formal statement
Theta :
Type uTheta
shared
X :
Type uX
shared
Y :
Type uY
shared
A :
Type uA
shared
n :
ℕ
shared
m :
ℕ
shared
Kraw :
Kernel Theta (RawTwoPool X Y)
Kfixed :
Kernel Theta (FixedPools (X := X) (Y := Y) n m)
P :
Kernel Theta X
Q :
Kernel Theta Y
S :
Theta → ℝ≥0
hS :
u v s0 :
ℝ≥0
hraw :
hfixed :
loss :
Theta → A → ℝ≥0∞
B :
ℝ≥0∞
hB :
B ≠ ⊤
hloss :
hbound :
∀ theta a, loss theta a ≤ B
fallbackX :
Fin n → X
fallbackY :
Fin m → Y
fallbackA :
A
rawLower epsScale epsX epsY :
ℝ≥0∞
hrawLower :
∀ rawRule : RawTwoPool X Y → A
if
Measurable rawRule
then
rawLower
≤ max (bayesDecisionRisk pi0 Kraw loss rawRule) (bayesDecisionRisk pi1 Kraw loss rawRule)
hscale0 :
pi0 {theta | S theta < s0} ≤ epsScale
hscale1 :
pi1 {theta | S theta < s0} ≤ epsScale
htailX :
∀ theta
if
s0 ≤ S theta
then
(poissonMeasure (u * S theta)) (Iio n) ≤ epsX
htailY :
∀ theta
if
s0 ≤ S theta
then
(poissonMeasure (v * S theta)) (Iio m) ≤ epsY
rawLower - B * (epsScale + epsX + epsY) ≤ minimaxDecisionRisk Kfixed loss
Proof (Lean source)
theorem randomScale_twoFuzzy_minimax_lower_transfer (pi0 pi1 : Measure Theta) [IsProbabilityMeasure pi0] [IsProbabilityMeasure pi1] (Kraw : Kernel Theta (RawTwoPool X Y)) (Kfixed : Kernel Theta (FixedPools (X := X) (Y := Y) n m)) (P : Kernel Theta X) (Q : Kernel Theta Y) [∀ theta, IsProbabilityMeasure (P theta)] [∀ theta, IsProbabilityMeasure (Q theta)] (S : Theta → ℝ≥0) (hS : Measurable S) (u v s0 : ℝ≥0) (hraw : IsRandomScaleTwoPoolExperiment Kraw P Q S u v) (hfixed : IsFixedTwoPoolExperiment n m Kfixed P Q) (loss : Theta → A → ℝ≥0∞) (B : ℝ≥0∞) (hB : B ≠ ⊤) (hloss : Measurable (uncurry loss)) (hbound : ∀ theta a, loss theta a ≤ B) (fallbackX : Fin n → X) (fallbackY : Fin m → Y) (fallbackA : A) (rawLower epsScale epsX epsY : ℝ≥0∞) (hrawLower : ∀ rawRule : RawTwoPool X Y → A, Measurable rawRule → rawLower ≤ max (bayesDecisionRisk pi0 Kraw loss rawRule) (bayesDecisionRisk pi1 Kraw loss rawRule)) (hscale0 : pi0 {theta | S theta < s0} ≤ epsScale) (hscale1 : pi1 {theta | S theta < s0} ≤ epsScale) (htailX : ∀ theta, s0 ≤ S theta → (poissonMeasure (u * S theta)) (Iio n) ≤ epsX) (htailY : ∀ theta, s0 ≤ S theta → (poissonMeasure (v * S theta)) (Iio m) ≤ epsY) : rawLower - B * (epsScale + epsX + epsY) ≤ minimaxDecisionRisk Kfixed loss := by /- Apply `priorPredictive_retentionFailure_le` under each fuzzy prior. For an arbitrary measurable fixed rule, form the single `transferredRawRule`; the raw fuzzy lower bound and the two Bayes-to-worst-case transfer inequalities show `rawLower ≤ fixedWorstCase + B * (epsScale + epsX + epsY)`. Finish with `minimaxDecisionRisk_lower_of_rawBayesTransfer`. -/ refine minimaxDecisionRisk_lower_of_rawBayesTransfer Kfixed loss rawLower (B * (epsScale + epsX + epsY)) ?_ intro rule let rawRule := transferredRawRule n m rule.1 fallbackX fallbackY fallbackA have hrawRule : Measurable rawRule := by exact measurable_transferredRawRule n m rule.2 fallbackX fallbackY fallbackA have hfail0 := priorPredictive_retentionFailure_le pi0 Kraw P Q S hS u v s0 hraw n m epsScale epsX epsY hscale0 htailX htailY have hfail1 := priorPredictive_retentionFailure_le pi1 Kraw P Q S hS u v s0 hraw n m epsScale epsX epsY hscale1 htailX htailY have hrisk0 := bayesDecisionRisk_transferredRawRule_le_worstCase_add pi0 Kraw Kfixed P Q S u v hraw hfixed loss B (epsScale + epsX + epsY) hB hloss hbound hfail0 rule.1 rule.2 fallbackX fallbackY fallbackA have hrisk1 := bayesDecisionRisk_transferredRawRule_le_worstCase_add pi1 Kraw Kfixed P Q S u v hraw hfixed loss B (epsScale + epsX + epsY) hB hloss hbound hfail1 rule.1 rule.2 fallbackX fallbackY fallbackA exact (hrawLower rawRule hrawRule).trans (max_le hrisk0 hrisk1)
1 supporting declaration (lemmas, instances)