Formalization: Minimax Inference for Threshold Modified Treatment Policies with Continuous Treatments

The complete Lean development behind this paper — every definition, lemma, and theorem of its module, including helpers the paper text never cites. Identifiers link within this page, into the Causalean library, or out to the official Mathlib docs.

CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Basic 67 declarations This cold Stage-2 scaffold defines the observed and full-data experiments, the modeling assumptions, model classes, rate objects, and minimax criteria used by the threshold-clamp frontier.

Threshold-clamp minimax frontier: shared formal world

This cold Stage-2 scaffold defines the observed and full-data experiments, the modeling assumptions, model classes, rate objects, and minimax criteria used by the threshold-clamp frontier. Proof obligations are split into the theorem and helper modules named in the formalization plan.

The Causalean survey found reusable i.i.d.-sample and minimax infrastructure, but no continuous-treatment clamp world. Causalean.PO is intentionally bypassed because its finite-regime potential-outcome carrier is at a different abstraction from the continuum-indexed standard-Borel response process here.

Kallenberg (2002), Foundations of Modern Probability, second edition, Theorem 6.3 (conditional distribution), doi:10.1007/978-1-4757-4015-8.

Definition (Lean source)
StandardBorelRegularConditionalLaw :
Sort 0
∀ (S T : Type*) [MeasurableSpace S] [StandardBorelSpace S] [MeasurableSpace T] [StandardBorelSpace T] (μ : Measure (S × T)),
IsProbabilityMeasure μ → ∃ K : Kernel S T, (∀ s, IsProbabilityMeasure (K s)) ∧ ∀ (B : Set S) (C : Set T), MeasurableSet B → MeasurableSet C → μ (B ×ˢ C)
= ∫⁻ s in B, K s C ∂μ.map fst
CausalSmith.Stat.LmtpThresholdAtomFrontier.StandardBorelRegularConditionalLaw · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:43

Hoeffding (1963), “Probability inequalities for sums of bounded random variables”, Theorem 2 specialized to unit ranges and two tails, doi:10.1080/01621459.1963.10500830.

Definition (Lean source)
HoeffdingBoundedAverage :
Sort 0
∀ (m : ℕ) (Ω : Type*) [MeasurableSpace Ω] (μ : Measure Ω),
IsProbabilityMeasure μ → ∀ Z : Fin m → Ω → ℝ, (∀ i, Measurable (Z i)) → iIndepFun Z μ → (∀ i, ∀ᵐ ω ∂μ, Z i ω ∈ Icc (0 : ℝ) 1) → ∀ t : ℝ, 0 < t → μ.real {ω | |(m : ℝ)⁻¹ * ∑ i, Z i ω - (m : ℝ)⁻¹ * ∑ i, ∫ ω, Z i ω ∂μ| > t}
≤ 2 * exp (-2 * (m : ℝ) * t ^ 2)
CausalSmith.Stat.LmtpThresholdAtomFrontier.HoeffdingBoundedAverage · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:59

One observed unit O = (X,A,Y) in a finite-stratum continuous-treatment model.

Definition (Lean source)
J :
@realizes O(carrier mathcal_X × ℝ × ℝ)
X :
Fin J
A :
Y :
CausalSmith.Stat.LmtpThresholdAtomFrontier.ClampObs · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:84
instance instMeasurableSpaceClampObs

The observation carrier inherits the product Borel structure.

Definition (Lean source)
instance instMeasurableSpaceClampObs {J : ℕ} : MeasurableSpace (ClampObs J) := comap (fun o : ClampObs J => (o.X, o.A, o.Y)) inferInstance
CausalSmith.Stat.LmtpThresholdAtomFrontier.instMeasurableSpaceClampObs · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:90

A law and its law-pinned finite-stratum nuisance functions.

Definition (Lean source)
J :
dataMeasure :
px :
Fin J → ℝ
pi :
Fin J → ℝ → ℝ
mu :
Fin J → ℝ → ℝ
CausalSmith.Stat.LmtpThresholdAtomFrontier.ClampLaw · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:94

The lower-threshold modified-treatment policy d_delta(a) = max a delta.

Definition (Lean source)
delta a :
clampPolicy delta a :
max a delta
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampPolicy · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:101

Conditional mass collapsed to the threshold by the clamp.

Definition (Lean source)
J :
shared
P :
x :
Fin J
delta :
atomMass P x delta :
∫ a in Icc (0 : ℝ) delta, P.pi x a
CausalSmith.Stat.LmtpThresholdAtomFrontier.atomMass · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:106
def retainedMean

The retained natural-course contribution above the threshold.

Definition (Lean source)
J :
shared
P :
delta :
retainedMean P delta :
∫ o, o.Y * indicator {o : ClampObs J | delta < o.A} (fun _ => (1 : ℝ)) o ∂P.dataMeasure
CausalSmith.Stat.LmtpThresholdAtomFrontier.retainedMean · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:110

The observed-data clamp target.

Definition (Lean source)
J :
shared
P :
delta :
clampFunctional P delta :
retainedMean P delta + ∑ x : Fin J, P.px x * atomMass P x delta * P.mu x delta
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampFunctional · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:115
def observedSampleCoordinate

The designated i-th observation in the canonical finite sample.

Definition (Lean source)
J :
shared
n :
i :
Fin n
observedSampleCoordinate n i :
(Fin n → ClampObs J) → ClampObs J
fun z => z i
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedSampleCoordinate · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:121
def IidSampling

The designated observations are the canonical first n coordinate maps under the n-fold product law; they are independent and each has law P.

Definition (Lean source)
J :
shared
P :
n :
IidSampling P n :
Prop
clause 1
IsProbabilityMeasure P.dataMeasure
clause 2
∀ᵐ o ∂P.dataMeasure, o.A ∈ Icc (0 : ℝ) 1
clause 3
∀ᵐ o ∂P.dataMeasure, o.Y ∈ Icc (0 : ℝ) 1
clause 4
iIndepFun (observedSampleCoordinate (J := J) n) (Measure.pi (fun _ : Fin n => P.dataMeasure))
clause 5
i :
Fin n
(Measure.pi (fun _ : Fin n => P.dataMeasure)).map (observedSampleCoordinate (J := J) n i)
= P.dataMeasure
CausalSmith.Stat.LmtpThresholdAtomFrontier.IidSampling · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:126
def CondDensityLaw

The declared conditional density is nonnegative and gives every finite-stratum conditional treatment probability.

Definition (Lean source)
J :
shared
P :
CondDensityLaw P :
Prop
clause 1
x :
Measurable (fun a : Icc (0 : ℝ) 1 => P.pi x a)
clause 2
x :
∀ᵐ a ∂volume.restrict (Icc (0 : ℝ) 1), 0 ≤ P.pi x a
clause 3
x :
Fin J
P.px x = (P.dataMeasure.map (fun o => o.X)).real {x}
B :
Set
B ⊆ Icc (0 : ℝ) 1
P.dataMeasure.real {o | o.X = x ∧ o.A ∈ B} = P.px x * ∫ a in B, P.pi x a
CausalSmith.Stat.LmtpThresholdAtomFrontier.CondDensityLaw · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:143
def StratumMass

Every stratum mass is the corresponding atom of the X marginal and is bounded below by pmin.

Definition (Lean source)
J :
shared
P :
pmin :
x :
Fin J
StratumMass P pmin :
Prop
clause 1
P.px x = (P.dataMeasure.map (fun o => o.X)).real {x}
clause 2
pmin ≤ P.px x
CausalSmith.Stat.LmtpThresholdAtomFrontier.StratumMass · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:159
def PolynomialThinning

The two-sided polynomial density envelope, with no smoothness imposed on the treatment density.

Definition (Lean source)
J :
shared
P :
kappa cminus cplus :
x :
Fin J
PolynomialThinning P kappa cminus cplus :
Prop
∀ᵐ a ∂volume.restrict (Icc (0 : ℝ) 1), cminus * a ^ kappa
≤ P.pi x a ∧ P.pi x a ≤ cplus * a ^ kappa
CausalSmith.Stat.LmtpThresholdAtomFrontier.PolynomialThinning · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:168

The local-polynomial order: the greatest natural number strictly below beta, including the integer-order correction.

Definition (Lean source)
beta :
ellOf beta :
⌈beta⌉₊ - 1
CausalSmith.Stat.LmtpThresholdAtomFrontier.ellOf · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:176
def HolderRegression

Continuous bounded regression, its conditional-expectation law tie, and the stated Taylor-remainder Hölder condition.

Definition (Lean source)
J :
shared
P :
beta L :
x :
Fin J
HolderRegression P beta L :
Prop
clause 1
ContinuousOn (P.mu x) (Icc (0 : ℝ) 1)
clause 2
a ∈ Set.Icc (0 : ℝ) 1 :
P.mu x a ∈ Icc (0 : ℝ) 1
clause 3
P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance]
=ᵐ[P.dataMeasure] fun o => P.mu o.X o.A
clause 4
s ∈ Set.Icc (0 : ℝ) 1 :
t ∈ Set.Icc (0 : ℝ) 1 :
|P.mu x t
- ∑ j ∈ range (ellOf beta + 1), iteratedDerivWithin j (P.mu x) (Icc (0 : ℝ) 1) s * (t - s) ^ j / (Nat.factorial j : ℝ)|
≤ L * |t - s| ^ beta
CausalSmith.Stat.LmtpThresholdAtomFrontier.HolderRegression · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:181
structure ClampModel

The finite-stratum clamp model, with exactly the four core member atoms.

Definition (Lean source)
J :
shared
P :
beta kappa L cminus cplus pmin :
probability :
IsProbabilityMeasure P.dataMeasure
treatmentSupport :
∀ᵐ o ∂P.dataMeasure, o.A ∈ Icc (0 : ℝ) 1

@realizes P(probability law on O)

outcomeSupport :
∀ᵐ o ∂P.dataMeasure, o.Y ∈ Icc (0 : ℝ) 1

@realizes A(a.s. range [0,1]) @realizes O(treatment coordinate supported on [0,1])

condDensity :

@realizes Y(a.s. range [0,1]) @realizes O(outcome coordinate supported on [0,1])

stratumMass :
thinning :
PolynomialThinning P kappa cminus cplus
holder :
CausalSmith.Stat.LmtpThresholdAtomFrontier.ClampModel · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:201

Standing declared-space constraints for the frontier constants.

Definition (Lean source)
J :
beta kappa L cminus cplus pmin deltaBar alpha :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha :
Prop
clause 1
0 < J
clause 2
0 < beta
clause 3
0 ≤ kappa
clause 4
0 < L
clause 5
0 < cminus
clause 6
cminus ≤ kappa + 1
clause 7
kappa + 1 ≤ cplus
clause 8
0 < pmin
clause 9
pmin ≤ 1 / (J : ℝ)
clause 10
0 < deltaBar
clause 11
deltaBar < 1
clause 12
0 < alpha
clause 13
alpha < 1 / 2
CausalSmith.Stat.LmtpThresholdAtomFrontier.RegimeConstants · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:225
theorem one_le_J

Admissibility of the regime constants forces the number of strata to be at least one.

Formal statement
J :
shared
beta :
shared
kappa :
shared
L :
shared
cminus :
shared
cplus :
shared
pmin :
shared
deltaBar :
shared
alpha :
shared
h :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
1 ≤ J
Proof (Lean source)
lemma RegimeConstants.one_le_J (h : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : 1 ≤ J := by exact Nat.one_le_iff_ne_zero.2 (Nat.ne_of_gt h.1)
CausalSmith.Stat.LmtpThresholdAtomFrontier.RegimeConstants.one_le_J · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:239
theorem alpha_pos

Admissibility of the regime constants forces the error level to be positive.

Formal statement
J :
shared
beta :
shared
kappa :
shared
L :
shared
cminus :
shared
cplus :
shared
pmin :
shared
deltaBar :
shared
alpha :
shared
h :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
0 < alpha
Proof (Lean source)
lemma RegimeConstants.alpha_pos (h : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : 0 < alpha := by rcases h with ⟨_, _, _, _, _, _, _, _, _, _, _, halpha, _⟩ exact halpha
CausalSmith.Stat.LmtpThresholdAtomFrontier.RegimeConstants.alpha_pos · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:244
theorem alpha_lt_half

Admissibility of the regime constants forces the error level to be less than one half.

Formal statement
J :
shared
beta :
shared
kappa :
shared
L :
shared
cminus :
shared
cplus :
shared
pmin :
shared
deltaBar :
shared
alpha :
shared
h :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
alpha < 1 / 2
Proof (Lean source)
lemma RegimeConstants.alpha_lt_half (h : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : alpha < 1 / 2 := by rcases h with ⟨_, _, _, _, _, _, _, _, _, _, _, _, halpha⟩ exact halpha
CausalSmith.Stat.LmtpThresholdAtomFrontier.RegimeConstants.alpha_lt_half · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:250
def testMultiplier

The conditional test multiplier on its declared core domain.

Definition (Lean source)
J :
alpha :
_hJ :
1 ≤ J
_halpha_pos :
0 < alpha
_halpha_lt :
alpha < 1 / 2
testMultiplier J alpha _hJ _halpha_pos _halpha_lt :
sqrt (log (12 * (J : ℝ) / alpha) / 2)
CausalSmith.Stat.LmtpThresholdAtomFrontier.testMultiplier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:256

A deterministic threshold sequence stays in [0,deltaBar].

Definition (Lean source)
deltaBar :
delta :
ℕ → ℝ
n :
ThresholdSequence deltaBar delta :
Prop
delta n ∈ Icc (0 : ℝ) deltaBar
CausalSmith.Stat.LmtpThresholdAtomFrontier.ThresholdSequence · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:263
def bandwidthCrossingSet

The information-balance crossing set.

Definition (Lean source)
n :
delta beta kappa deltaBar :
bandwidthCrossingSet n delta beta kappa deltaBar :
Set
{h | 0 < h ∧ h ≤ 1 - deltaBar ∧ 1 ≤ (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa}
CausalSmith.Stat.LmtpThresholdAtomFrontier.bandwidthCrossingSet · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:268

First information-balance crossing, with the prescribed empty-set fallback.

Definition (Lean source)
n :
delta beta kappa deltaBar :
infoBandwidth n delta beta kappa deltaBar :
by classical exact if (bandwidthCrossingSet n delta beta kappa deltaBar).Nonempty then sInf (bandwidthCrossingSet n delta beta kappa deltaBar) else 1
- deltaBar
CausalSmith.Stat.LmtpThresholdAtomFrontier.infoBandwidth · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:273

Candidate regular-plus-atom estimation frontier.

Definition (Lean source)
n :
delta kappa h beta :
clampFrontier n delta kappa h beta :
(n : ℝ) ^ (-(1 : ℝ) / 2) + delta ^ (kappa + 1) * h ^ beta
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampFrontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:283

Critical threshold scale.

Definition (Lean source)
n :
beta kappa :
deltaCrit n beta kappa :
(n : ℝ) ^ (-(1 : ℝ) / (2 * (beta * kappa + 2 * beta + kappa + 1)))
CausalSmith.Stat.LmtpThresholdAtomFrontier.deltaCrit · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:289

Boundary-design scale.

Definition (Lean source)
n :
beta kappa :
deltaEdge n beta kappa :
(n : ℝ) ^ (-(1 : ℝ) / (2 * beta + kappa + 1))
CausalSmith.Stat.LmtpThresholdAtomFrontier.deltaEdge · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:295

The canonical product law of the observed sample.

Definition (Lean source)
J :
shared
P :
n :
iidProduct P n :
Measure (Fin n → ClampObs J)
Measure.pi (fun _ : Fin n => P.dataMeasure)
CausalSmith.Stat.LmtpThresholdAtomFrontier.iidProduct · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:300
def Estimator

Observed-sample point estimators.

Definition (Lean source)
n J :
Estimator n J :
Type
(Fin n → ClampObs J) → ℝ
CausalSmith.Stat.LmtpThresholdAtomFrontier.Estimator · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:305

Observed-sample confidence-set procedures.

Definition (Lean source)
n J :
ConfidenceProcedure n J :
Type
(Fin n → ClampObs J) → Set
CausalSmith.Stat.LmtpThresholdAtomFrontier.ConfidenceProcedure · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:308

An estimator is measurable with respect to the observed sample.

Definition (Lean source)
n J :
est :
ObservedMeasurableEstimator est :
Prop
CausalSmith.Stat.LmtpThresholdAtomFrontier.ObservedMeasurableEstimator · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:311

A confidence procedure has measurable ordered endpoints and returns exactly the corresponding closed interval.

Definition (Lean source)
n J :
ObservedMeasurableInterval C :
Prop
∃ lo hi : (Fin n → ClampObs J) → ℝ,
clause 1
z :
lo z ≤ hi z
clause 2
z :
C z = Icc (lo z) (hi z)
CausalSmith.Stat.LmtpThresholdAtomFrontier.ObservedMeasurableInterval · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:315
def intervalLength

Length of the convex hull of a real confidence set.

Definition (Lean source)
C :
Set
intervalLength C :
max 0 (sSup C - sInf C)
CausalSmith.Stat.LmtpThresholdAtomFrontier.intervalLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:322
def intervalLengthENNReal

Extended-real interval length, used so non-integrable expected lengths are represented by rather than the junk value of the real Bochner integral.

Definition (Lean source)
C :
Set
intervalLengthENNReal C :
ℝ≥0∞
CausalSmith.Stat.LmtpThresholdAtomFrontier.intervalLengthENNReal · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:325
def estimatorRisk

Absolute-error risk of an observed-sample estimator under one law.

Definition (Lean source)
J :
shared
P :
n :
delta :
est :
estimatorRisk P n delta est :
∫ z, |est z - clampFunctional P delta| ∂iidProduct P n
CausalSmith.Stat.LmtpThresholdAtomFrontier.estimatorRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:330

Minimax absolute-error risk over the clamp model.

Definition (Lean source)
J n :
beta kappa L cminus cplus pmin delta :
observedMinimaxRisk J n beta kappa L cminus cplus pmin delta :
sInf {r : ℝ | ∃ est : Estimator n J, ObservedMeasurableEstimator est ∧ (∀ z, est z ∈ Icc (0 : ℝ) 1) ∧ r = sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ v = estimatorRisk P n delta est}}
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:335

Uniform coverage of a confidence procedure over the clamp model.

Definition (Lean source)
J n :
beta kappa L cminus cplus pmin delta alpha :
UniformCoverage J n beta kappa L cminus cplus pmin delta alpha C :
Prop
clause 2
P :
ClampModel P beta kappa L cminus cplus pmin
1 - alpha ≤ (iidProduct P n).real {z | clampFunctional P delta ∈ C z}
CausalSmith.Stat.LmtpThresholdAtomFrontier.UniformCoverage · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:344

Minimax worst-case expected length among uniformly honest intervals.

Definition (Lean source)
J n :
beta kappa L cminus cplus pmin delta alpha :
observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha :
ℝ≥0∞
sInf {r : ℝ≥0∞ | ∃ C : ConfidenceProcedure n J, UniformCoverage J n beta kappa L cminus cplus pmin delta alpha C ∧ r = sSup {v : ℝ≥0∞ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ v = ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct P n}}
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:351

A full-data law packages its own standard-Borel latent carrier, so different members of a full-data model class need not share a carrier. The observed-model restriction is deliberately imposed by the class predicates below, rather than by this carrier.

Definition (Lean source)
J :
latentCarrier :
Type
MeasurableSpace latentCarrier
StandardBorelSpace latentCarrier
Nonempty latentCarrier
observedMargin :
fullMeasure :
Measure (ClampObs J × latentCarrier)
@realizes P_full(full-data probability law on the member-specific carrier)
probability :
margin_eq :
fullMeasure.map fst = observedMargin.dataMeasure
g :
Fin J → ℝ → latentCarrier → ℝ
@realizes g_x(structural response map on [0,1]×mathcal_U)
pot :
ℝ → (ClampObs J × latentCarrier) → ℝ
@realizes Y_a(potential-outcome process a↦Y(a))
pot_jointlyMeasurable :
CausalSmith.Stat.LmtpThresholdAtomFrontier.FullDataLaw · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:364
instance instMeasurableSpaceLatentCarrier

the canonical inst measurable space latent carrier instance is defined for the specified J input, the specified PF input.

Definition (Lean source)
instance (PF : FullDataLaw J) : MeasurableSpace PF.latentCarrier := PF.latentMeasurable
CausalSmith.Stat.LmtpThresholdAtomFrontier.instMeasurableSpaceLatentCarrier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:385
instance instStandardBorelSpaceLatentCarrier

the canonical inst standard borel space latent carrier instance is defined for the specified J input, the specified PF input.

Definition (Lean source)
instance (PF : FullDataLaw J) : StandardBorelSpace PF.latentCarrier := PF.latentStandardBorel
CausalSmith.Stat.LmtpThresholdAtomFrontier.instStandardBorelSpaceLatentCarrier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:389
instance instNonemptyLatentCarrier

the canonical inst nonempty latent carrier instance is defined for the specified J input, the specified PF input.

Definition (Lean source)
instance (PF : FullDataLaw J) : Nonempty PF.latentCarrier := PF.latentNonempty
CausalSmith.Stat.LmtpThresholdAtomFrontier.instNonemptyLatentCarrier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:393
def LatentResponseConsistency

Simultaneous latent-response consistency outside one common null set.

Definition (Lean source)
J :
shared
PF :
LatentResponseConsistency PF :
Prop
clause 1
x :
Measurable (fun z : Icc (0 : ℝ) 1 × PF.latentCarrier => PF.g x z.1 z.2)
clause 2
x a u :
a ∈ Icc (0 : ℝ) 1
PF.g x a u ∈ Icc (0 : ℝ) 1
clause 3
∀ᵐ z ∂PF.fullMeasure, (∀ a ∈ Icc (0 : ℝ) 1, PF.pot a z = PF.g z.1.X a z.2) ∧ z.1.Y
= PF.g z.1.X z.1.A z.2
CausalSmith.Stat.LmtpThresholdAtomFrontier.LatentResponseConsistency · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:397
def fullDataStratumMass

The actual X=x marginal mass under a full-data law. This is computed from the observed marginal measure, which FullDataLaw.margin_eq pins to the (X,A,Y) projection of the full-data measure; it deliberately does not use the auxiliary ClampLaw.px field.

Definition (Lean source)
J :
shared
PF :
x :
Fin J
fullDataStratumMass PF x :
(PF.observedMargin.dataMeasure.map (fun o => o.X)).real {x}
CausalSmith.Stat.LmtpThresholdAtomFrontier.fullDataStratumMass · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:410
def LatentExchangeability

Finite-stratum conditional independence of treatment and latent response, written as the exact stratumwise product-moment factorization using the actual X-marginal mass.

Definition (Lean source)
J :
shared
PF :
x :
Fin J
f :
ℝ → ℝ
g :
PF.latentCarrier → ℝ
(∃ M, ∀ a, |f a| ≤ M)
(∃ M, ∀ u, |g u| ≤ M)
LatentExchangeability PF :
Prop
fullDataStratumMass PF x * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, f z.1.A * g z.2 ∂PF.fullMeasure)
= (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, f z.1.A ∂PF.fullMeasure) * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, g z.2 ∂PF.fullMeasure)
CausalSmith.Stat.LmtpThresholdAtomFrontier.LatentExchangeability · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:417
def fullDataResponseMean

Full-data conditional response mean in a finite stratum.

Definition (Lean source)
J :
shared
PF :
x :
Fin J
a :
fullDataResponseMean PF x a :
(fullDataStratumMass PF x)⁻¹ * ∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, PF.g x a z.2 ∂PF.fullMeasure
CausalSmith.Stat.LmtpThresholdAtomFrontier.fullDataResponseMean · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:436
def FullDataResponseContinuity

Continuity of the fiberwise structural response mean on the declared threshold range.

Definition (Lean source)
J :
shared
PF :
deltaBar :
x :
Fin J
FullDataResponseContinuity PF deltaBar :
Prop
ContinuousOn (fullDataResponseMean PF x) (Icc (0 : ℝ) deltaBar)
CausalSmith.Stat.LmtpThresholdAtomFrontier.FullDataResponseContinuity · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:445
def causalClampMean

The full-data clamp-policy mean.

Definition (Lean source)
J :
shared
PF :
delta :
causalClampMean PF delta :
∫ z, PF.pot (clampPolicy delta z.1.A) z ∂PF.fullMeasure
CausalSmith.Stat.LmtpThresholdAtomFrontier.causalClampMean · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:454
structure FullDataClampModel

The structural full-data class. Each member carries its own latent carrier; the observed margin belongs to the fixed-Hölder model, and the three causal member conditions hold on that same package.

Definition (Lean source)
J :
shared
PF :
beta kappa L cminus cplus pmin deltaBar :
observedModel :
ClampModel PF.observedMargin beta kappa L cminus cplus pmin
consistency :
exchangeability :
responseContinuity :
CausalSmith.Stat.LmtpThresholdAtomFrontier.FullDataClampModel · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:460
def causalEstimatorRisk

Absolute risk of an observed-sample estimator for one full-data law.

Definition (Lean source)
J :
shared
PF :
n :
delta :
est :
causalEstimatorRisk PF n delta est :
∫ z, |est z - causalClampMean (PF := PF) (delta := delta)| ∂iidProduct PF.observedMargin n
CausalSmith.Stat.LmtpThresholdAtomFrontier.causalEstimatorRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:473
def causalFrontierCriteria

The pair (R_{n,F}^star, L_{n,F}^star) of full-data criteria, with expected length valued in ℝ≥0∞ so infinite expectations are preserved.

Definition (Lean source)
J n :
beta kappa L cminus cplus pmin deltaBar delta alpha :
causalFrontierCriteria J n beta kappa L cminus cplus pmin deltaBar delta alpha :
ℝ × ℝ≥0∞
(sInf {r : ℝ | ∃ est : Estimator n J, ObservedMeasurableEstimator est ∧ (∀ z, est z ∈ Icc (0 : ℝ) 1) ∧ r = sSup {v : ℝ | ∃ PF : FullDataLaw J, FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar ∧ v = causalEstimatorRisk (PF := PF) (n := n) (delta := delta) (est := est)}}, sInf {r : ℝ≥0∞ | ∃ C : ConfidenceProcedure n J, ObservedMeasurableInterval C ∧ (∀ PF : FullDataLaw J, FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar → 1 - alpha ≤ (iidProduct PF.observedMargin n).real {z | causalClampMean (PF := PF) (delta := delta) ∈ C z}) ∧ r = sSup {v : ℝ≥0∞ | ∃ PF : FullDataLaw J, FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar ∧ v = ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct PF.observedMargin n}})
CausalSmith.Stat.LmtpThresholdAtomFrontier.causalFrontierCriteria · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:480

Declared design spaces for the continuity-only model, with no Hölder exponent or radius among its parameters.

Definition (Lean source)
J :
kappa cminus cplus pmin deltaBar :
ContDesignConstants J kappa cminus cplus pmin deltaBar :
Prop
clause 1
0 < J
clause 2
0 ≤ kappa
clause 3
0 < cminus
clause 4
cminus ≤ kappa + 1
clause 5
kappa + 1 ≤ cplus
clause 6
0 < pmin
clause 7
pmin ≤ 1 / (J : ℝ)
clause 8
0 < deltaBar
clause 9
deltaBar < 1
CausalSmith.Stat.LmtpThresholdAtomFrontier.ContDesignConstants · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:508
def ContRegimeConstants

Declared spaces for the continuity-only inference regime.

Definition (Lean source)
J :
kappa cminus cplus pmin deltaBar alpha :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha :
Prop
clause 1
ContDesignConstants J kappa cminus cplus pmin deltaBar
clause 2
0 < alpha
clause 3
alpha < 1 / 2
CausalSmith.Stat.LmtpThresholdAtomFrontier.ContRegimeConstants · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:520
structure ContClampModel

The continuity-only observed model: the three shared law conditions and existence of a continuous conditional-regression version on the threshold range, with no common modulus or Hölder radius.

Definition (Lean source)
J :
shared
P :
kappa cminus cplus pmin deltaBar :
probability :
IsProbabilityMeasure P.dataMeasure
treatmentSupport :
∀ᵐ o ∂P.dataMeasure, o.A ∈ Icc (0 : ℝ) 1
outcomeSupport :
∀ᵐ o ∂P.dataMeasure, o.Y ∈ Icc (0 : ℝ) 1
condDensity :
stratumMass :
thinning :
PolynomialThinning P kappa cminus cplus
continuousVersion :
∃ mu : Fin J → ℝ → ℝ,
(∀ x, ContinuousOn (mu x) (Icc (0 : ℝ) deltaBar)) ∧
(P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] fun o => mu o.X o.A)
CausalSmith.Stat.LmtpThresholdAtomFrontier.ContClampModel · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:526
def contRegression

The selected continuous conditional-regression version. Its uniqueness is proved separately from positivity of the treatment density.

Definition (Lean source)
J :
shared
P :
kappa cminus cplus pmin deltaBar :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
contRegression P kappa cminus cplus pmin deltaBar hP :
Fin J → ℝ → ℝ
choose hP.continuousVersion
CausalSmith.Stat.LmtpThresholdAtomFrontier.contRegression · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:545
def contClampFunctional

The continuity-only observed clamp functional.

Definition (Lean source)
J :
shared
P :
kappa cminus cplus pmin deltaBar :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
delta :
contClampFunctional P kappa cminus cplus pmin deltaBar hP delta :
retainedMean P delta
+ ∑ x : Fin J, P.px x * atomMass P x delta * contRegression P kappa cminus cplus pmin deltaBar hP x delta
CausalSmith.Stat.LmtpThresholdAtomFrontier.contClampFunctional · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:553

The continuity-only regular-plus-atom frontier.

Definition (Lean source)
n :
delta kappa :
contFrontier n delta kappa :
(n : ℝ) ^ (-(1 : ℝ) / 2) + delta ^ (kappa + 1)
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFrontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:563
structure ContFullDataClampModel

Continuity-only full-data membership over the same law-specific latent carrier, differing from the fixed-Hölder class only in its observed margin.

Definition (Lean source)
J :
shared
PF :
kappa cminus cplus pmin deltaBar :
observedModel :
ContClampModel PF.observedMargin kappa cminus cplus pmin deltaBar
consistency :
exchangeability :
responseContinuity :
CausalSmith.Stat.LmtpThresholdAtomFrontier.ContFullDataClampModel · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:569

The common observed-law fields used by the full-data identification bridge.

Definition (Lean source)
J :
shared
P :
kappa cminus cplus pmin :
probability :
IsProbabilityMeasure P.dataMeasure
treatmentSupport :
∀ᵐ o ∂P.dataMeasure, o.A ∈ Icc (0 : ℝ) 1
outcomeSupport :
∀ᵐ o ∂P.dataMeasure, o.Y ∈ Icc (0 : ℝ) 1
condDensity :
stratumMass :
thinning :
PolynomialThinning P kappa cminus cplus
CausalSmith.Stat.LmtpThresholdAtomFrontier.BridgeClampModel · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:581
theorem toBridge

Forget the fixed-Hölder regression field when proving the causal bridge. The result uses the hP condition. This is the stated conclusion.

Formal statement
beta :
shared
kappa :
shared
L :
shared
cminus :
shared
cplus :
shared
pmin :
shared
P :
shared
hP :
ClampModel P beta kappa L cminus cplus pmin
BridgeClampModel P kappa cminus cplus pmin
Proof (Lean source)
-- @node: ClampModel.toBridge theorem ClampModel.toBridge (hP : ClampModel P beta kappa L cminus cplus pmin) : BridgeClampModel P kappa cminus cplus pmin := ⟨hP.probability, hP.treatmentSupport, hP.outcomeSupport, hP.condDensity, hP.stratumMass, hP.thinning⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.ClampModel.toBridge · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:592
theorem toBridge

Forget the qualitative regression field when proving the causal bridge. The result uses the hP condition. This is the stated conclusion.

Formal statement
kappa :
shared
cminus :
shared
cplus :
shared
pmin :
shared
deltaBar :
shared
P :
shared
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
BridgeClampModel P kappa cminus cplus pmin
Proof (Lean source)
-- @node: ContClampModel.toBridge theorem ContClampModel.toBridge (hP : ContClampModel P kappa cminus cplus pmin deltaBar) : BridgeClampModel P kappa cminus cplus pmin := ⟨hP.probability, hP.treatmentSupport, hP.outcomeSupport, hP.condDensity, hP.stratumMass, hP.thinning⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.ContClampModel.toBridge · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:601
structure BridgeFullDataClampModel

The causal assumptions together with precisely the common observed-law fields needed by the measure-factorization argument.

Definition (Lean source)
J :
shared
PF :
kappa cminus cplus pmin deltaBar :
observedModel :
BridgeClampModel PF.observedMargin kappa cminus cplus pmin
consistency :
exchangeability :
responseContinuity :
CausalSmith.Stat.LmtpThresholdAtomFrontier.BridgeFullDataClampModel · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:610
theorem toBridge

The common bridge view of a fixed-Hölder full-data member. The result uses the hPF condition. This is the stated conclusion.

Formal statement
J :
shared
beta :
shared
kappa :
shared
L :
shared
cminus :
shared
cplus :
shared
pmin :
shared
deltaBar :
shared
PF :
hPF :
FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar
BridgeFullDataClampModel PF kappa cminus cplus pmin deltaBar
Proof (Lean source)
-- @node: FullDataClampModel.toBridge theorem FullDataClampModel.toBridge {PF : FullDataLaw J} (hPF : FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar) : BridgeFullDataClampModel PF kappa cminus cplus pmin deltaBar := ⟨hPF.observedModel.toBridge, hPF.consistency, hPF.exchangeability, hPF.responseContinuity⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.FullDataClampModel.toBridge · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:620
theorem toBridge

The common bridge view of a continuity-only full-data member. The result uses the hPF condition. This is the stated conclusion.

Formal statement
J :
shared
kappa :
shared
cminus :
shared
cplus :
shared
pmin :
shared
deltaBar :
shared
PF :
hPF :
ContFullDataClampModel PF kappa cminus cplus pmin deltaBar
BridgeFullDataClampModel PF kappa cminus cplus pmin deltaBar
Proof (Lean source)
-- @node: ContFullDataClampModel.toBridge theorem ContFullDataClampModel.toBridge {PF : FullDataLaw J} (hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar) : BridgeFullDataClampModel PF kappa cminus cplus pmin deltaBar := ⟨hPF.observedModel.toBridge, hPF.consistency, hPF.exchangeability, hPF.responseContinuity⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.ContFullDataClampModel.toBridge · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:629
def contEstimatorRisk

Absolute risk for the continuity-only observed functional.

Definition (Lean source)
J :
shared
P :
n :
kappa cminus cplus pmin deltaBar delta :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
est :
contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP est :
∫ z, |est z
- contClampFunctional P kappa cminus cplus pmin deltaBar hP delta| ∂iidProduct P n
CausalSmith.Stat.LmtpThresholdAtomFrontier.contEstimatorRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:638
def contFrontierCriteria Definition 28 in the paper ↗

The four continuity-only observed and causal decision criteria, ordered as observed risk, observed length, causal risk, and causal length.

Definition (Lean source)
J n :
kappa cminus cplus pmin deltaBar delta alpha :
contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha :
ℝ × ℝ≥0∞ × ℝ × ℝ≥0∞
(sInf {r : ℝ | ∃ est : Estimator n J, ObservedMeasurableEstimator est ∧ (∀ z, est z ∈ Icc (0 : ℝ) 1) ∧ r = sSup {v : ℝ | ∃ (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar), v = contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP est}}, sInf {r : ℝ≥0∞ | ∃ C : ConfidenceProcedure n J, ObservedMeasurableInterval C ∧ (∀ (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar), 1 - alpha ≤ (iidProduct P n).real {z | contClampFunctional P kappa cminus cplus pmin deltaBar hP delta ∈ C z}) ∧ r = sSup {v : ℝ≥0∞ | ∃ (P : ClampLaw J) (_hP : ContClampModel P kappa cminus cplus pmin deltaBar), v = ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct P n}}, sInf {r : ℝ | ∃ est : Estimator n J, ObservedMeasurableEstimator est ∧ (∀ z, est z ∈ Icc (0 : ℝ) 1) ∧ r = sSup {v : ℝ | ∃ (PF : FullDataLaw J) (_hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar), v = causalEstimatorRisk (PF := PF) (n := n) (delta := delta) (est := est)}}, sInf {r : ℝ≥0∞ | ∃ C : ConfidenceProcedure n J, ObservedMeasurableInterval C ∧ (∀ (PF : FullDataLaw J), ContFullDataClampModel PF kappa cminus cplus pmin deltaBar → 1 - alpha ≤ (iidProduct PF.observedMargin n).real {z | causalClampMean (PF := PF) (delta := delta) ∈ C z}) ∧ r = sSup {v : ℝ≥0∞ | ∃ (PF : FullDataLaw J) (_hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar), v = ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct PF.observedMargin n}})
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFrontierCriteria · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Basic.lean:646
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.Bandwidth 9 declarations AsympSeq records the explicit eventual two-sided constant sandwich used by the paper.

Information-balance bandwidth regimes

AsympSeq records the explicit eventual two-sided constant sandwich used by the paper. The theorem keeps the threshold sequence arbitrary.

Two positive constants eventually sandwich one nonnegative sequence by another.

Definition (Lean source)
f g :
ℕ → ℝ
AsympSeq f g :
Prop
∃ c C : ℝ,
clause 1
0 < c
clause 2
c ≤ C
clause 3
∀ᶠ n in atTop, c * g n ≤ f n ∧ f n ≤ C * g n
theorem infoBandwidth_eventually_balance Lemma 10 in the paper ↗

Eventually the infimum in infoBandwidth is the unique positive information-balance root. The result uses the hbeta condition, the hkappa condition, the hdeltaBar condition, the hdelta condition. This is the stated conclusion.

Formal statement
beta kappa deltaBar :
hbeta :
0 < beta
hkappa :
0 ≤ kappa
hdeltaBar :
0 < deltaBar ∧ deltaBar < 1
deltaSeq :
ℕ → ℝ
hdelta :
ThresholdSequence deltaBar deltaSeq
∀ᶠ n in atTop, 0 < infoBandwidth n (deltaSeq n) beta kappa deltaBar ∧ infoBandwidth n (deltaSeq n) beta kappa deltaBar
≤ 1 - deltaBar ∧
(n : ℝ) * infoBandwidth n (deltaSeq n) beta kappa deltaBar ^ (2 * beta + 1) * (deltaSeq n + infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ kappa
= 1
Proof (Lean source)
-- @node: infoBandwidth_eventually_balance lemma infoBandwidth_eventually_balance (beta kappa deltaBar : ℝ) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (hdeltaBar : 0 < deltaBar ∧ deltaBar < 1) (deltaSeq : ℕ → ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) : ∀ᶠ n in atTop, 0 < infoBandwidth n (deltaSeq n) beta kappa deltaBar ∧ infoBandwidth n (deltaSeq n) beta kappa deltaBar ≤ 1 - deltaBar ∧ (n : ℝ) * infoBandwidth n (deltaSeq n) beta kappa deltaBar ^ (2 * beta + 1) * (deltaSeq n + infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ kappa = 1 := by let H : ℝ := 1 - deltaBar have hH : 0 < H := sub_pos.mpr hdeltaBar.2 have hp : 0 < 2 * beta + 1 := by linarith have hK : 0 < H ^ (2 * beta + 1) * H ^ kappa := mul_pos (Real.rpow_pos_of_pos hH _) (Real.rpow_pos_of_pos hH _) obtain ⟨N, hN⟩ := exists_nat_gt (1 / (H ^ (2 * beta + 1) * H ^ kappa)) filter_upwards [eventually_ge_atTop N] with n hn have hnpos : 0 < n := by by_contra hn0 have hnz : n = 0 := Nat.eq_zero_of_not_pos hn0 have hNz : N = 0 := Nat.le_zero.mp (hnz ▸ hn) subst N norm_num at hN have : 0 < (H ^ kappa)⁻¹ * (H ^ (2 * beta + 1))⁻¹ := by positivity linarith let F : ℝ → ℝ := fun h => (n : ℝ) * h ^ (2 * beta + 1) * (deltaSeq n + h) ^ kappa have hd := hdelta n have hFH : 1 ≤ F H := by have hbase : H ≤ deltaSeq n + H := by linarith [hd.1] have hrpow : H ^ kappa ≤ (deltaSeq n + H) ^ kappa := Real.rpow_le_rpow (le_of_lt hH) hbase hkappa have hnK : 1 < (n : ℝ) * (H ^ (2 * beta + 1) * H ^ kappa) := by have hnR : 1 / (H ^ (2 * beta + 1) * H ^ kappa) < (n : ℝ) := lt_of_lt_of_le hN (by exact_mod_cast hn) calc 1 = (1 / (H ^ (2 * beta + 1) * H ^ kappa)) * (H ^ (2 * beta + 1) * H ^ kappa) := by field_simp _ < (n : ℝ) * (H ^ (2 * beta + 1) * H ^ kappa) := mul_lt_mul_of_pos_right hnR hK dsimp [F] calc 1 ≤ (n : ℝ) * (H ^ (2 * beta + 1) * H ^ kappa) := hnK.le _ = (n : ℝ) * H ^ (2 * beta + 1) * H ^ kappa := by ring _ ≤ (n : ℝ) * H ^ (2 * beta + 1) * (deltaSeq n + H) ^ kappa := by gcongr have hFcont : ContinuousOn F (Icc 0 H) := by unfold F by_cases hkzero : kappa = 0 · simp [hkzero] exact continuousOn_const.mul (continuousOn_id.rpow continuousOn_const (fun _ _ => inr hp)) · exact (continuousOn_const.mul (continuousOn_id.rpow continuousOn_const (fun _ _ => inr hp))).mul ((continuousOn_const.add continuousOn_id).rpow continuousOn_const (fun _ _ => inr (lt_of_le_of_ne hkappa (Ne.symm hkzero)))) have hF0 : F 0 = 0 := by simp [F, Real.zero_rpow hp.ne'] obtain ⟨r, hrI, hr⟩ : ∃ r ∈ Icc (0 : ℝ) H, F r = 1 := by have hone : (1 : ℝ) ∈ Icc (F 0) (F H) := by simpa [hF0] using hFH rcases intermediate_value_Icc hH.le hFcont hone with ⟨r, hrI, hr⟩ exact ⟨r, hrI, hr⟩ have hrpos : 0 < r := by rcases hrI with ⟨hr0, _⟩ exact lt_of_le_of_ne hr0 (fun hre => by subst r; simp [hF0] at hr) have hFstrict : StrictMonoOn F (Icc 0 H) := by intro a ha b hb hab have haPow : a ^ (2 * beta + 1) < b ^ (2 * beta + 1) := Real.rpow_lt_rpow ha.1 hab hp have hbpos : 0 < b := lt_of_le_of_lt ha.1 hab have hdb : 0 < deltaSeq n + b := by linarith [hd.1] have hfac : 0 < (n : ℝ) * (deltaSeq n + b) ^ kappa := mul_pos (by exact_mod_cast hnpos) (Real.rpow_pos_of_pos hdb _) have hmono : (deltaSeq n + a) ^ kappa ≤ (deltaSeq n + b) ^ kappa := by apply Real.rpow_le_rpow · linarith [hd.1, ha.1] · linarith · exact hkappa dsimp [F] calc (n : ℝ) * a ^ (2 * beta + 1) * (deltaSeq n + a) ^ kappa ≤ (n : ℝ) * a ^ (2 * beta + 1) * (deltaSeq n + b) ^ kappa := by exact mul_le_mul_of_nonneg_left hmono (mul_nonneg (Nat.cast_nonneg _) (Real.rpow_nonneg ha.1 _)) _ < (n : ℝ) * b ^ (2 * beta + 1) * (deltaSeq n + b) ^ kappa := by exact mul_lt_mul_of_pos_right (mul_lt_mul_of_pos_left haPow (Nat.cast_pos.mpr hnpos)) (Real.rpow_pos_of_pos hdb _) have hset : bandwidthCrossingSet n (deltaSeq n) beta kappa deltaBar = Icc r H := by ext h simp only [bandwidthCrossingSet, Set.mem_setOf_eq, Set.mem_Icc] constructor · rintro ⟨hh0, hhH, hhF⟩ refine ⟨?_, hhH⟩ by_contra hnot have hlt : h < r := lt_of_not_ge hnot have := hFstrict ⟨hh0.le, hhH⟩ hrI hlt dsimp [F] at this linarith · rintro ⟨hrh, hhH⟩ have hh0 : 0 < h := hrpos.trans_le hrh refine ⟨hh0, hhH, ?_⟩ have := hFstrict.monotoneOn hrI ⟨hh0.le, hhH⟩ hrh dsimp [F] at this linarith have hnonempty : (bandwidthCrossingSet n (deltaSeq n) beta kappa deltaBar).Nonempty := by rw [hset] exact Set.nonempty_Icc.2 hrI.2 have hbw : infoBandwidth n (deltaSeq n) beta kappa deltaBar = r := by simp [infoBandwidth, hnonempty, hset, hrI.2] rw [hbw] exact ⟨hrpos, hrI.2, by simpa [F] using hr⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.infoBandwidth_eventually_balance · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Bandwidth.lean:27
theorem balance_root_le_interior_scale Lemma balance_root_le_interior_scale in the paper ↗

The balance equation bounds its positive root above by the interior-scale closed form. The result uses the hn condition, the hd condition, the hh condition, the hp condition, the hk condition, the heq condition. This is the stated conclusion.

Formal statement
n d h p k :
hn :
0 < n
hd :
0 < d
hh :
0 < h
hp :
0 < p
hk :
0 ≤ k
heq :
n * h ^ p * (d + h) ^ k = 1
h ≤ (n * d ^ k) ^ (-1 / p)
Proof (Lean source)
-- @node: balance_root_le_interior_scale lemma balance_root_le_interior_scale (n d h p k : ℝ) (hn : 0 < n) (hd : 0 < d) (hh : 0 < h) (hp : 0 < p) (hk : 0 ≤ k) (heq : n * h ^ p * (d + h) ^ k = 1) : h ≤ (n * d ^ k) ^ (-1 / p) := by have hX : 0 < n * d ^ k := mul_pos hn (Real.rpow_pos_of_pos hd _) rw [← Real.rpow_le_rpow_iff hh.le (Real.rpow_nonneg hX.le _) hp] rw [← Real.rpow_mul hX.le] have hexp : (-1 / p) * p = -1 := by field_simp rw [hexp, Real.rpow_neg_one] have hdk : d ^ k ≤ (d + h) ^ k := Real.rpow_le_rpow hd.le (by linarith) hk have hmul : n * h ^ p * d ^ k ≤ n * h ^ p * (d + h) ^ k := mul_le_mul_of_nonneg_left hdk (mul_nonneg hn.le (Real.rpow_nonneg hh.le p)) rw [heq] at hmul rw [inv_eq_one_div] apply (le_div_iff₀ hX).2 calc h ^ p * (n * d ^ k) = n * h ^ p * d ^ k := by ring _ ≤ 1 := hmul
CausalSmith.Stat.LmtpThresholdAtomFrontier.balance_root_le_interior_scale · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Bandwidth.lean:145
theorem interior_scale_le_balance_root Lemma interior_scale_le_balance_root in the paper ↗

When the root lies below the threshold, it is also bounded below by a fixed multiple of the interior scale. The result uses the hn condition, the hd condition, the hh condition, the hp condition, the hk condition, the hhd condition, the heq condition. This is the stated conclusion.

Formal statement
n d h p k :
hn :
0 < n
hd :
0 < d
hh :
0 < h
hp :
0 < p
hk :
0 ≤ k
hhd :
h ≤ d
heq :
n * h ^ p * (d + h) ^ k = 1
2 ^ (-k / p) * (n * d ^ k) ^ (-1 / p) ≤ h
Proof (Lean source)
-- @node: interior_scale_le_balance_root lemma interior_scale_le_balance_root (n d h p k : ℝ) (hn : 0 < n) (hd : 0 < d) (hh : 0 < h) (hp : 0 < p) (hk : 0 ≤ k) (hhd : h ≤ d) (heq : n * h ^ p * (d + h) ^ k = 1) : 2 ^ (-k / p) * (n * d ^ k) ^ (-1 / p) ≤ h := by have htwo : 0 < (2 : ℝ) := by norm_num have hX : 0 < n * d ^ k := mul_pos hn (Real.rpow_pos_of_pos hd _) have hc : 0 < (2 : ℝ) ^ (-k / p) := Real.rpow_pos_of_pos htwo _ rw [← Real.rpow_le_rpow_iff (mul_nonneg hc.le (Real.rpow_nonneg hX.le _)) hh.le hp] rw [Real.mul_rpow hc.le (Real.rpow_nonneg hX.le _)] rw [← Real.rpow_mul htwo.le, ← Real.rpow_mul hX.le] have hcExp : (-k / p) * p = -k := by field_simp have hXExp : (-1 / p) * p = -1 := by field_simp rw [hcExp, hXExp, Real.rpow_neg_one] have hadd : d + h ≤ 2 * d := by linarith have hpowadd : (d + h) ^ k ≤ (2 * d) ^ k := Real.rpow_le_rpow (by linarith) hadd hk rw [Real.mul_rpow (by norm_num : (0 : ℝ) ≤ 2) hd.le] at hpowadd have hmul : n * h ^ p * (d + h) ^ k ≤ n * h ^ p * (2 ^ k * d ^ k) := mul_le_mul_of_nonneg_left hpowadd (mul_nonneg hn.le (Real.rpow_nonneg hh.le p)) rw [heq] at hmul rw [Real.rpow_neg (by norm_num : (0 : ℝ) ≤ 2)] have hden : 0 < 2 ^ k * (n * d ^ k) := mul_pos (Real.rpow_pos_of_pos htwo _) hX have hmain : 1 / (2 ^ k * (n * d ^ k)) ≤ h ^ p := by apply (div_le_iff₀ hden).2 calc 1 ≤ n * h ^ p * (2 ^ k * d ^ k) := hmul _ = h ^ p * (2 ^ k * (n * d ^ k)) := by ring calc (2 ^ k)⁻¹ * (n * d ^ k)⁻¹ = 1 / (2 ^ k * (n * d ^ k)) := by field_simp _ ≤ h ^ p := hmain
CausalSmith.Stat.LmtpThresholdAtomFrontier.interior_scale_le_balance_root · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Bandwidth.lean:170
theorem interior_scale_le_threshold_of_edge_le Lemma interior_scale_le_threshold_of_edge_le in the paper ↗

Above the edge scale, the interior closed-form scale is no larger than the threshold. The result uses the hn condition, the hd condition, the hp condition, the hk condition, the hed condition. This is the stated conclusion.

Formal statement
n d p k :
hn :
0 < n
hd :
0 < d
hp :
0 < p
hk :
0 ≤ k
hed :
n ^ (-1 / (p + k)) ≤ d
(n * d ^ k) ^ (-1 / p) ≤ d
Proof (Lean source)
-- @node: interior_scale_le_threshold_of_edge_le lemma interior_scale_le_threshold_of_edge_le (n d p k : ℝ) (hn : 0 < n) (hd : 0 < d) (hp : 0 < p) (hk : 0 ≤ k) (hed : n ^ (-1 / (p + k)) ≤ d) : (n * d ^ k) ^ (-1 / p) ≤ d := by have hpk : 0 < p + k := by linarith have hepos : 0 < n ^ (-1 / (p + k)) := Real.rpow_pos_of_pos hn _ have hnpk : n * (n ^ (-1 / (p + k))) ^ (p + k) = 1 := by rw [← Real.rpow_mul hn.le] have : (-1 / (p + k)) * (p + k) = -1 := by field_simp rw [this, Real.rpow_neg_one] field_simp have hdpow : (n ^ (-1 / (p + k))) ^ (p + k) ≤ d ^ (p + k) := Real.rpow_le_rpow hepos.le hed hpk.le have hone : 1 ≤ n * d ^ (p + k) := by rw [← hnpk] exact mul_le_mul_of_nonneg_left hdpow hn.le have hX : 0 < n * d ^ k := mul_pos hn (Real.rpow_pos_of_pos hd _) rw [← Real.rpow_le_rpow_iff (Real.rpow_nonneg hX.le _) hd.le hp] rw [← Real.rpow_mul hX.le] have hxexp : (-1 / p) * p = -1 := by field_simp rw [hxexp, Real.rpow_neg_one, inv_eq_one_div] apply (div_le_iff₀ hX).2 calc 1 ≤ n * d ^ (p + k) := hone _ = d ^ p * (n * d ^ k) := by rw [Real.rpow_add hd]; ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.interior_scale_le_threshold_of_edge_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Bandwidth.lean:208
theorem balance_root_le_edge_scale Lemma balance_root_le_edge_scale in the paper ↗

Every positive balance root is at most the edge scale. The result uses the hn condition, the hd condition, the hh condition, the hp condition, the hk condition, the heq condition. This is the stated conclusion.

Formal statement
n d h p k :
hn :
0 < n
hd :
0 ≤ d
hh :
0 < h
hp :
0 < p
hk :
0 ≤ k
heq :
n * h ^ p * (d + h) ^ k = 1
h ≤ n ^ (-1 / (p + k))
Proof (Lean source)
-- @node: balance_root_le_edge_scale lemma balance_root_le_edge_scale (n d h p k : ℝ) (hn : 0 < n) (hd : 0 ≤ d) (hh : 0 < h) (hp : 0 < p) (hk : 0 ≤ k) (heq : n * h ^ p * (d + h) ^ k = 1) : h ≤ n ^ (-1 / (p + k)) := by have hpk : 0 < p + k := by linarith have hpow : h ^ k ≤ (d + h) ^ k := Real.rpow_le_rpow hh.le (by linarith) hk have hmul : n * h ^ p * h ^ k ≤ n * h ^ p * (d + h) ^ k := mul_le_mul_of_nonneg_left hpow (mul_nonneg hn.le (Real.rpow_nonneg hh.le p)) rw [heq] at hmul rw [← Real.rpow_le_rpow_iff hh.le (Real.rpow_nonneg hn.le _) hpk] rw [← Real.rpow_mul hn.le] have hexp : (-1 / (p + k)) * (p + k) = -1 := by field_simp rw [hexp, Real.rpow_neg_one, inv_eq_one_div] apply (le_div_iff₀ hn).2 calc h ^ (p + k) * n = n * (h ^ p * h ^ k) := by rw [Real.rpow_add hh]; ring _ ≤ 1 := by simpa [mul_assoc] using hmul
CausalSmith.Stat.LmtpThresholdAtomFrontier.balance_root_le_edge_scale · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Bandwidth.lean:238
theorem edge_scale_le_balance_root Lemma edge_scale_le_balance_root in the paper ↗

Under an edge-scale upper bound on the threshold, a positive balance root is bounded below by a fixed multiple of that edge scale. The result uses the hn condition, the hd condition, the hh condition, the hp condition, the hk condition, the hD condition, the heq condition, the hde condition, the hhe condition. This is the stated conclusion.

Formal statement
n d h p k D :
hn :
0 < n
hd :
0 ≤ d
hh :
0 < h
hp :
0 < p
hk :
0 ≤ k
hD :
0 < D
heq :
n * h ^ p * (d + h) ^ k = 1
hde :
d ≤ D * n ^ (-1 / (p + k))
hhe :
h ≤ n ^ (-1 / (p + k))
(D + 1) ^ (-k / p) * n ^ (-1 / (p + k)) ≤ h
Proof (Lean source)
-- @node: edge_scale_le_balance_root lemma edge_scale_le_balance_root (n d h p k D : ℝ) (hn : 0 < n) (hd : 0 ≤ d) (hh : 0 < h) (hp : 0 < p) (hk : 0 ≤ k) (hD : 0 < D) (heq : n * h ^ p * (d + h) ^ k = 1) (hde : d ≤ D * n ^ (-1 / (p + k))) (hhe : h ≤ n ^ (-1 / (p + k))) : (D + 1) ^ (-k / p) * n ^ (-1 / (p + k)) ≤ h := by have hpk : 0 < p + k := by linarith let e := n ^ (-1 / (p + k)) have hepos : 0 < e := Real.rpow_pos_of_pos hn _ have hDp : 0 < D + 1 := by linarith have hcpos : 0 < (D + 1) ^ (-k / p) := Real.rpow_pos_of_pos hDp _ rw [← Real.rpow_le_rpow_iff (mul_nonneg hcpos.le hepos.le) hh.le hp] rw [Real.mul_rpow hcpos.le hepos.le] rw [← Real.rpow_mul hDp.le, ← Real.rpow_mul hn.le] have hcExp : (-k / p) * p = -k := by field_simp have heExp : (-1 / (p + k)) * p = -p / (p + k) := by ring rw [hcExp, heExp] have hsum : d + h ≤ (D + 1) * e := by dsimp [e] at *; linarith have hpow : (d + h) ^ k ≤ ((D + 1) * e) ^ k := Real.rpow_le_rpow (by linarith) hsum hk rw [Real.mul_rpow hDp.le hepos.le] at hpow have hmul : n * h ^ p * (d + h) ^ k ≤ n * h ^ p * ((D + 1) ^ k * e ^ k) := mul_le_mul_of_nonneg_left hpow (mul_nonneg hn.le (Real.rpow_nonneg hh.le p)) rw [heq] at hmul have hne : n * e ^ (p + k) = 1 := by dsimp [e] rw [← Real.rpow_mul hn.le] have : (-1 / (p + k)) * (p + k) = -1 := by field_simp rw [this, Real.rpow_neg_one] field_simp rw [Real.rpow_neg hDp.le] have hnpart : n ^ (-p / (p + k)) = e ^ p := by dsimp [e] rw [← Real.rpow_mul hn.le] congr 1 ring rw [hnpart] have htarget : ((D + 1) ^ k)⁻¹ * e ^ p = 1 / (n * (D + 1) ^ k * e ^ k) := by have hene : n * (e ^ p * e ^ k) = 1 := by rw [← Real.rpow_add hepos] exact hne field_simp nlinarith rw [htarget] have hden : 0 < n * (D + 1) ^ k * e ^ k := by positivity apply (div_le_iff₀ hden).2 calc 1 ≤ n * h ^ p * ((D + 1) ^ k * e ^ k) := hmul _ = h ^ p * (n * (D + 1) ^ k * e ^ k) := by ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.edge_scale_le_balance_root · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Bandwidth.lean:261
theorem bandwidth_phases Lemma 16 in the paper ↗

The crossing bandwidth has the stated balance, effective count, and the two regimes separated by deltaEdge. This is the stated conclusion.

Formal statement
beta kappa deltaBar :
∃ cBalance CBalance cFar CFar : ℝ,
0 < cBalance
cBalance ≤ CBalance
0 < cFar
cFar ≤ CFar
conclusion 1
J :
P :
L cminus cplus pmin alpha :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
PolynomialThinning P kappa cminus cplus
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
hSeq :
fun n => infoBandwidth n (deltaSeq n) beta kappa deltaBar
∀ᶠ n : ℕ in atTop, cBalance
≤ (n : ℝ) * (hSeq n) ^ (2 * beta + 1) * (deltaSeq n + hSeq n) ^ kappa ∧
(n : ℝ) * (hSeq n) ^ (2 * beta + 1) * (deltaSeq n + hSeq n) ^ kappa ≤ CBalance
∀ᶠ n : ℕ in atTop, cBalance * (hSeq n) ^ (-2 * beta)
≤ (n : ℝ) * hSeq n * (deltaSeq n + hSeq n) ^ kappa ∧
(n : ℝ) * hSeq n * (deltaSeq n + hSeq n) ^ kappa ≤ CBalance * (hSeq n) ^ (-2 * beta)
Tendsto (fun n => deltaSeq n / deltaEdge n beta kappa) atTop atTop
∀ᶠ n : ℕ in atTop, cFar * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1)))
≤ hSeq n ∧
hSeq n ≤ CFar * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1)))
conclusion 2
D :
0 < D
∃ cNear CNear : ℝ,
0 < cNear
cNear ≤ CNear
J :
P :
L cminus cplus pmin alpha :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
PolynomialThinning P kappa cminus cplus
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
(∀ᶠ n : ℕ in atTop, |deltaSeq n| ≤ D * |deltaEdge n beta kappa|)
hSeq :
fun n => infoBandwidth n (deltaSeq n) beta kappa deltaBar
∀ᶠ n : ℕ in atTop, cNear * (n : ℝ) ^ (-(1 : ℝ) / (2 * beta + kappa + 1))
≤ hSeq n ∧ hSeq n ≤ CNear * (n : ℝ) ^ (-(1 : ℝ) / (2 * beta + kappa + 1))
Proof (Lean source)
-- @node: lem:bandwidth-phases lemma bandwidth_phases (beta kappa deltaBar : ℝ) : ∃ cBalance CBalance cFar CFar : ℝ, 0 < cBalance ∧ cBalance ≤ CBalance ∧ 0 < cFar ∧ cFar ≤ CFar ∧ (∀ (J : ℕ) (P : ClampLaw J) (L cminus cplus pmin alpha : ℝ), RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha → PolynomialThinning P kappa cminus cplus → ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → let hSeq := fun n => infoBandwidth n (deltaSeq n) beta kappa deltaBar (∀ᶠ n : ℕ in atTop, cBalance ≤ (n : ℝ) * (hSeq n) ^ (2 * beta + 1) * (deltaSeq n + hSeq n) ^ kappa ∧ (n : ℝ) * (hSeq n) ^ (2 * beta + 1) * (deltaSeq n + hSeq n) ^ kappa ≤ CBalance) ∧ (∀ᶠ n : ℕ in atTop, cBalance * (hSeq n) ^ (-2 * beta) ≤ (n : ℝ) * hSeq n * (deltaSeq n + hSeq n) ^ kappa ∧ (n : ℝ) * hSeq n * (deltaSeq n + hSeq n) ^ kappa ≤ CBalance * (hSeq n) ^ (-2 * beta)) ∧ (Tendsto (fun n => deltaSeq n / deltaEdge n beta kappa) atTop atTop → ∀ᶠ n : ℕ in atTop, cFar * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ≤ hSeq n ∧ hSeq n ≤ CFar * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))))) ∧ ∀ D : ℝ, 0 < D → ∃ cNear CNear : ℝ, 0 < cNear ∧ cNear ≤ CNear ∧ ∀ (J : ℕ) (P : ClampLaw J) (L cminus cplus pmin alpha : ℝ), RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha → PolynomialThinning P kappa cminus cplus → ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → (∀ᶠ n : ℕ in atTop, |deltaSeq n| ≤ D * |deltaEdge n beta kappa|) → let hSeq := fun n => infoBandwidth n (deltaSeq n) beta kappa deltaBar ∀ᶠ n : ℕ in atTop, cNear * (n : ℝ) ^ (-(1 : ℝ) / (2 * beta + kappa + 1)) ≤ hSeq n ∧ hSeq n ≤ CNear * (n : ℝ) ^ (-(1 : ℝ) / (2 * beta + kappa + 1)) := by let p : ℝ := 2 * beta + 1 let rawFar : ℝ := 2 ^ (-kappa / p) let cFar : ℝ := min 1 rawFar have hrawFar : 0 < rawFar := Real.rpow_pos_of_pos (by norm_num) _ have hcFar : 0 < cFar := lt_min (by norm_num) hrawFar have hcFarOne : cFar ≤ 1 := min_le_left _ _ refine ⟨1, 1, cFar, 1, by norm_num, le_rfl, hcFar, hcFarOne, ?_, ?_⟩ · intro J P L cminus cplus pmin alpha hreg hthin deltaSeq hdelta rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hp : 0 < p := by dsimp [p]; linarith have hrawFarOne : rawFar ≤ 1 := by rw [show (1 : ℝ) = 2 ^ (0 : ℝ) by norm_num] apply Real.rpow_le_rpow_of_exponent_le (by norm_num) exact div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr hkappa) hp.le have hcFarEq : cFar = rawFar := min_eq_right hrawFarOne dsimp have hbalance := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar_pos, hdeltaBar_lt⟩ deltaSeq hdelta refine ⟨?_, ?_, ?_⟩ · filter_upwards [hbalance] with n hn simpa using ⟨hn.2.2.ge, hn.2.2.le⟩ · filter_upwards [hbalance] with n hn have hh := hn.1 have heq := hn.2.2 have hsplit : infoBandwidth n (deltaSeq n) beta kappa deltaBar ^ (2 * beta + 1) = infoBandwidth n (deltaSeq n) beta kappa deltaBar ^ (2 * beta) * infoBandwidth n (deltaSeq n) beta kappa deltaBar := by simpa using Real.rpow_add hh (2 * beta) 1 have hneg : infoBandwidth n (deltaSeq n) beta kappa deltaBar ^ (-2 * beta) = (infoBandwidth n (deltaSeq n) beta kappa deltaBar ^ (2 * beta))⁻¹ := by rw [show -2 * beta = -(2 * beta) by ring, Real.rpow_neg hh.le] rw [hsplit] at heq rw [hneg] have hpowpos : 0 < infoBandwidth n (deltaSeq n) beta kappa deltaBar ^ (2 * beta) := Real.rpow_pos_of_pos hh _ constructor <;> field_simp <;> nlinarith · intro hfar have hratio := (Filter.tendsto_atTop.1 hfar) 1 filter_upwards [hbalance, hratio] with n hn hratioN have hnpos : 0 < (n : ℝ) := by by_contra hn0 have hnzero : (n : ℝ) = 0 := le_antisymm (le_of_not_gt hn0) (Nat.cast_nonneg n) rw [hnzero, zero_mul] at hn norm_num at hn have hedgePos : 0 < deltaEdge n beta kappa := Real.rpow_pos_of_pos hnpos _ have hdeltaPos : 0 < deltaSeq n := by have : deltaEdge n beta kappa ≤ deltaSeq n := by have := (le_div_iff₀ hedgePos).mp hratioN simpa using this exact hedgePos.trans_le this have hedge : (n : ℝ) ^ (-1 / (p + kappa)) ≤ deltaSeq n := by have hle : deltaEdge n beta kappa ≤ deltaSeq n := by have := (le_div_iff₀ hedgePos).mp hratioN simpa using this simpa [deltaEdge, p, show 2 * beta + kappa + 1 = (2 * beta + 1) + kappa by ring] using hle let h := infoBandwidth n (deltaSeq n) beta kappa deltaBar let w := ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-1 / p) have hwUpper : h ≤ w := by exact balance_root_le_interior_scale (n : ℝ) (deltaSeq n) h p kappa hnpos hdeltaPos hn.1 hp hkappa (by simpa [h, p] using hn.2.2) have hwDelta : w ≤ deltaSeq n := by exact interior_scale_le_threshold_of_edge_le (n : ℝ) (deltaSeq n) p kappa hnpos hdeltaPos hp hkappa hedge have hwLower : rawFar * w ≤ h := by exact interior_scale_le_balance_root (n : ℝ) (deltaSeq n) h p kappa hnpos hdeltaPos hn.1 hp hkappa (hwUpper.trans hwDelta) (by simpa [h, p] using hn.2.2) simpa [h, w, hcFarEq, rawFar, p] using ⟨hwLower, hwUpper⟩ · intro D hD let rawNear : ℝ := (D + 1) ^ (-kappa / p) let cNear : ℝ := min 1 rawNear have hDp : 0 < D + 1 := by linarith have hrawNear : 0 < rawNear := Real.rpow_pos_of_pos hDp _ have hcNear : 0 < cNear := lt_min (by norm_num) hrawNear have hcNearOne : cNear ≤ 1 := min_le_left _ _ refine ⟨cNear, 1, hcNear, hcNearOne, ?_⟩ intro J P L cminus cplus pmin alpha hreg hthin deltaSeq hdelta hnear rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hp : 0 < p := by dsimp [p]; linarith have hrawNearOne : rawNear ≤ 1 := by rw [show (1 : ℝ) = (D + 1) ^ (0 : ℝ) by simp] apply Real.rpow_le_rpow_of_exponent_le (by linarith) exact div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr hkappa) hp.le have hcNearEq : cNear = rawNear := min_eq_right hrawNearOne dsimp have hbalance := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar_pos, hdeltaBar_lt⟩ deltaSeq hdelta filter_upwards [hbalance, hnear] with n hn hnearN have hnpos : 0 < (n : ℝ) := by by_contra hn0 have hnzero : (n : ℝ) = 0 := le_antisymm (le_of_not_gt hn0) (Nat.cast_nonneg n) rw [hnzero, zero_mul] at hn norm_num at hn have hedgePos : 0 < deltaEdge n beta kappa := Real.rpow_pos_of_pos hnpos _ have hdeltaNonneg : 0 ≤ deltaSeq n := (hdelta n).1 have hdeltaEdge : deltaSeq n ≤ D * deltaEdge n beta kappa := by simpa [abs_of_nonneg hdeltaNonneg, abs_of_pos hedgePos] using hnearN let h := infoBandwidth n (deltaSeq n) beta kappa deltaBar let e := (n : ℝ) ^ (-1 / (p + kappa)) have hedgeEq : deltaEdge n beta kappa = e := by simp [deltaEdge, e, p, show 2 * beta + kappa + 1 = (2 * beta + 1) + kappa by ring] have hde : deltaSeq n ≤ D * e := by simpa [hedgeEq] using hdeltaEdge have hhe : h ≤ e := by exact balance_root_le_edge_scale (n : ℝ) (deltaSeq n) h p kappa hnpos hdeltaNonneg hn.1 hp hkappa (by simpa [h, p] using hn.2.2) have hlow : rawNear * e ≤ h := by exact edge_scale_le_balance_root (n : ℝ) (deltaSeq n) h p kappa D hnpos hdeltaNonneg hn.1 hp hkappa hD (by simpa [h, p] using hn.2.2) hde hhe simpa [h, e, hcNearEq, rawNear, p, show 2 * beta + kappa + 1 = (2 * beta + 1) + kappa by ring] using ⟨hlow, hhe⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.bandwidth_phases · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Bandwidth.lean:317
theorem infoBandwidth_interior_asymp

If the threshold is asymptotically above the design edge, the information bandwidth has the interior closed-form order. Unlike bandwidth_phases, this purely analytic projection does not require an otherwise unused model law. The result uses the hreg condition, the hdelta condition, the hfar condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
deltaSeq :
ℕ → ℝ
hdelta :
ThresholdSequence deltaBar deltaSeq
hfar :
Tendsto (fun n => deltaSeq n / deltaEdge n beta kappa) atTop atTop
AsympSeq (fun n => infoBandwidth n (deltaSeq n) beta kappa deltaBar) (fun n => ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1)))
Proof (Lean source)
-- @node: infoBandwidth_interior_asymp lemma infoBandwidth_interior_asymp (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (deltaSeq : ℕ → ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) (hfar : Tendsto (fun n => deltaSeq n / deltaEdge n beta kappa) atTop atTop) : AsympSeq (fun n => infoBandwidth n (deltaSeq n) beta kappa deltaBar) (fun n => ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hbalance := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar_pos, hdeltaBar_lt⟩ deltaSeq hdelta let p : ℝ := 2 * beta + 1 let c : ℝ := 2 ^ (-kappa / p) have hp : 0 < p := by dsimp [p]; linarith have hc : 0 < c := Real.rpow_pos_of_pos (by norm_num) _ have hcOne : c ≤ 1 := by rw [show (1 : ℝ) = 2 ^ (0 : ℝ) by norm_num] apply Real.rpow_le_rpow_of_exponent_le (by norm_num) exact div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr hkappa) hp.le refine ⟨c, 1, hc, hcOne, ?_⟩ have hratio := (Filter.tendsto_atTop.1 hfar) 1 filter_upwards [hbalance, hratio] with n hn hratioN have hnpos : 0 < (n : ℝ) := by by_contra hn0 have hnzero : (n : ℝ) = 0 := le_antisymm (le_of_not_gt hn0) (Nat.cast_nonneg n) rw [hnzero, zero_mul] at hn norm_num at hn have hedgePos : 0 < deltaEdge n beta kappa := Real.rpow_pos_of_pos hnpos _ have hdeltaPos : 0 < deltaSeq n := by have hle : deltaEdge n beta kappa ≤ deltaSeq n := by have := (le_div_iff₀ hedgePos).mp hratioN simpa using this exact hedgePos.trans_le hle have hedge : (n : ℝ) ^ (-1 / (p + kappa)) ≤ deltaSeq n := by have hle : deltaEdge n beta kappa ≤ deltaSeq n := by have := (le_div_iff₀ hedgePos).mp hratioN simpa using this simpa [deltaEdge, p, show 2 * beta + kappa + 1 = (2 * beta + 1) + kappa by ring] using hle let h := infoBandwidth n (deltaSeq n) beta kappa deltaBar let w := ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-1 / p) have hwUpper : h ≤ w := by exact balance_root_le_interior_scale (n : ℝ) (deltaSeq n) h p kappa hnpos hdeltaPos hn.1 hp hkappa (by simpa [h, p] using hn.2.2) have hwDelta : w ≤ deltaSeq n := by exact interior_scale_le_threshold_of_edge_le (n : ℝ) (deltaSeq n) p kappa hnpos hdeltaPos hp hkappa hedge have hwLower : c * w ≤ h := by exact interior_scale_le_balance_root (n : ℝ) (deltaSeq n) h p kappa hnpos hdeltaPos hn.1 hp hkappa (hwUpper.trans hwDelta) (by simpa [h, p] using hn.2.2) simpa [h, w, c, p] using ⟨hwLower, hwUpper⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.infoBandwidth_interior_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Bandwidth.lean:478
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.CausalBridgeIdentification 11 declarations This file turns the normalized-stratum product law into the conditional integral identity and the pathwise decomposition used by the two causal bridge theorems.

Identification identities for the causal clamp bridge

This file turns the normalized-stratum product law into the conditional integral identity and the pathwise decomposition used by the two causal bridge theorems.

def structuralResponseExtension

A globally measurable extension of a structural response map from its declared unit-dose domain.

Definition (Lean source)
J :
shared
PF :
x :
Fin J
structuralResponseExtension PF hcons x :
ℝ × PF.latentCarrier → ℝ
Function.extend (fun z : Icc (0 : ℝ) 1 × PF.latentCarrier => (z.1.1, z.2)) (fun z => PF.g x z.1.1 z.2) 0
CausalSmith.Stat.LmtpThresholdAtomFrontier.structuralResponseExtension · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeIdentification.lean:25
theorem structuralResponseExtension_measurable

The structural-response extension is measurable. The result uses the hcons condition. This is the stated conclusion.

Formal statement
J :
shared
PF :
x :
Fin J
Proof (Lean source)
-- @node: structuralResponseExtension_measurable lemma structuralResponseExtension_measurable (PF : FullDataLaw J) (hcons : LatentResponseConsistency PF) (x : Fin J) : Measurable (structuralResponseExtension PF hcons x) := by let e : Icc (0 : ℝ) 1 × PF.latentCarrier → ℝ × PF.latentCarrier := fun z => (z.1.1, z.2) have he : MeasurableEmbedding e := (MeasurableEmbedding.subtype_coe measurableSet_Icc).prodMap MeasurableEmbedding.id exact he.measurable_extend (hcons.1 x) measurable_const
CausalSmith.Stat.LmtpThresholdAtomFrontier.structuralResponseExtension_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeIdentification.lean:35
theorem structuralResponseExtension_eq

On the unit dose interval, the measurable extension equals the original structural response. The result uses the hcons condition, the ha condition. This is the stated conclusion.

Formal statement
J :
shared
PF :
x :
Fin J
a :
ha :
a ∈ Icc (0 : ℝ) 1
u :
PF.latentCarrier
structuralResponseExtension PF hcons x (a, u) = PF.g x a u
Proof (Lean source)
-- @node: structuralResponseExtension_eq lemma structuralResponseExtension_eq (PF : FullDataLaw J) (hcons : LatentResponseConsistency PF) (x : Fin J) (a : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) (u : PF.latentCarrier) : structuralResponseExtension PF hcons x (a, u) = PF.g x a u := by let e : Icc (0 : ℝ) 1 × PF.latentCarrier → ℝ × PF.latentCarrier := fun z => (z.1.1, z.2) have he : Injective e := ((MeasurableEmbedding.subtype_coe measurableSet_Icc).prodMap MeasurableEmbedding.id).injective simp only [structuralResponseExtension] exact he.extend_apply (fun z => PF.g x z.1.1 z.2) 0 (⟨a, ha⟩, u)
CausalSmith.Stat.LmtpThresholdAtomFrontier.structuralResponseExtension_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeIdentification.lean:48
theorem fullDataResponseMean_setIntegral

The full-data stratum conditional mean satisfies the same design-cell integral identity as the observed regression. The result uses the hPF condition, the hkappa condition, the hcplus condition, the hpmin condition, the hB condition, the hBunit condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar :
PF :
hPF :
BridgeFullDataClampModel PF kappa cminus cplus pmin deltaBar
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
x :
Fin J
B :
Set
hB :
hBunit :
B ⊆ Icc (0 : ℝ) 1
(PF.observedMargin.px x)⁻¹ * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B}, z.1.Y ∂PF.fullMeasure)
= ∫ a in B, fullDataResponseMean PF x a * PF.observedMargin.pi x a
Proof (Lean source)
-- @node: fullDataResponseMean_setIntegral lemma fullDataResponseMean_setIntegral (J : ℕ) (kappa cminus cplus pmin deltaBar : ℝ) (PF : FullDataLaw J) (hPF : BridgeFullDataClampModel PF kappa cminus cplus pmin deltaBar) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (x : Fin J) (B : Set ℝ) (hB : MeasurableSet B) (hBunit : B ⊆ Icc (0 : ℝ) 1) : (PF.observedMargin.px x)⁻¹ * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B}, z.1.Y ∂PF.fullMeasure) = ∫ a in B, fullDataResponseMean PF x a * PF.observedMargin.pi x a := by classical let μU := Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x}) let F : ℝ × PF.latentCarrier → ℝ := fun w => if w.1 ∈ B then structuralResponseExtension PF hPF.consistency x w else 0 have hF : Measurable F := by exact (structuralResponseExtension_measurable PF hPF.consistency x).piecewise (hB.preimage measurable_fst) measurable_const have hFbound : ∀ w, ‖F w‖ ≤ (1 : ℝ) := by intro w by_cases hw : w.1 ∈ B · have hunit := hBunit hw rw [show F w = PF.g x w.1 w.2 by simp [F, hw, structuralResponseExtension_eq PF hPF.consistency x w.1 hunit w.2]] rw [Real.norm_eq_abs] exact abs_le.2 ⟨by linarith [(hPF.consistency.2.1 x w.1 w.2 hunit).1], (hPF.consistency.2.1 x w.1 w.2 hunit).2⟩ · simp [F, hw] have hprod := conditional_stratum_integral_prod J kappa cminus cplus pmin PF hPF.observedModel hPF.exchangeability hkappa hcplus hpmin x F hF 1 hFbound have hcell : MeasurableSet {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B} := by have hX : Measurable (fun z : ClampObs J × PF.latentCarrier => z.1.X) := (measurable_fst.comp (Measurable.of_comap_le le_rfl)).comp measurable_fst have hA : Measurable (fun z : ClampObs J × PF.latentCarrier => z.1.A) := (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))).comp measurable_fst exact (measurableSet_eq_fun hX measurable_const).inter (hB.preimage hA) have hstratum : MeasurableSet {z : ClampObs J × PF.latentCarrier | z.1.X = x} := by have hX : Measurable (fun z : ClampObs J × PF.latentCarrier => z.1.X) := (measurable_fst.comp (Measurable.of_comap_le le_rfl)).comp measurable_fst exact measurableSet_eq_fun hX measurable_const have hcellEq : (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B}, z.1.Y ∂PF.fullMeasure) = ∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, F (z.1.A, z.2) ∂PF.fullMeasure := by rw [← integral_indicator hcell, ← integral_indicator hstratum] apply integral_congr_ae filter_upwards [hPF.consistency.2.2] with z hz by_cases hx : z.1.X = x · by_cases hBa : z.1.A ∈ B · have ha : z.1.A ∈ Icc (0 : ℝ) 1 := hBunit hBa simp only [Set.indicator_of_mem (show z ∈ {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B} from ⟨hx, hBa⟩), Set.indicator_of_mem (show z ∈ {z : ClampObs J × PF.latentCarrier | z.1.X = x} from hx)] rw [show F (z.1.A, z.2) = PF.g x z.1.A z.2 by simp [F, hBa, structuralResponseExtension_eq PF hPF.consistency x z.1.A ha z.2], ← hx, ← hz.2] · simp [F, hx, hBa] · simp [F, hx] have hsupp : ∀ᵐ a ∂conditionalTreatmentMeasure PF.observedMargin x, a ∈ Icc (0 : ℝ) 1 := by unfold conditionalTreatmentMeasure exact (withDensity_absolutelyContinuous _ _).ae_le (ae_restrict_mem measurableSet_Icc) calc _ = (PF.observedMargin.px x)⁻¹ * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, F (z.1.A, z.2) ∂PF.fullMeasure) := by rw [hcellEq] _ = ∫ a, ∫ u, F (a, u) ∂μU ∂conditionalTreatmentMeasure PF.observedMargin x := hprod _ = ∫ a, B.indicator (fullDataResponseMean PF x) a ∂conditionalTreatmentMeasure PF.observedMargin x := by apply integral_congr_ae filter_upwards [hsupp] with a ha by_cases hBa : a ∈ B · rw [Set.indicator_of_mem hBa] simp only [F, if_pos hBa] rw [integral_congr_ae (ae_of_all _ fun u => structuralResponseExtension_eq PF hPF.consistency x a ha u)] exact conditional_stratum_latent_integral_eq_mean J kappa cminus cplus pmin PF hPF.observedModel hpmin hPF.consistency x a ha · rw [show (fun u => F (a, u)) = fun _ => 0 by funext u simp [F, hBa], integral_zero, Set.indicator_of_notMem hBa] _ = ∫ a in Icc (0 : ℝ) 1, PF.observedMargin.pi x a * B.indicator (fullDataResponseMean PF x) a := conditionalTreatment_integral_eq_density PF.observedMargin hPF.observedModel x _ _ = ∫ a in B, fullDataResponseMean PF x a * PF.observedMargin.pi x a := by rw [← integral_indicator measurableSet_Icc, ← integral_indicator hB] apply integral_congr_ae filter_upwards with a by_cases hBa : a ∈ B · have ha := hBunit hBa simp [Set.indicator_of_mem hBa, ha, mul_comm] · by_cases ha : a ∈ Icc (0 : ℝ) 1 <;> simp [Set.indicator_of_notMem hBa, ha]
CausalSmith.Stat.LmtpThresholdAtomFrontier.fullDataResponseMean_setIntegral · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeIdentification.lean:64
theorem continuous_mul_treatmentDensity_integrable

A continuous regression times the polynomially bounded treatment density is integrable on the threshold interval. The result uses the hcond condition, the hthin condition, the hkappa condition, the hcplus condition, the hdelta condition, the hmu condition. This is the stated conclusion.

Formal statement
J :
shared
P :
kappa cminus cplus deltaBar :
hcond :
hthin :
PolynomialThinning P kappa cminus cplus
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hdelta :
deltaBar ≤ 1
x :
Fin J
mu :
ℝ → ℝ
hmu :
ContinuousOn mu (Icc (0 : ℝ) deltaBar)
IntegrableOn (fun a => mu a * P.pi x a) (Icc (0 : ℝ) deltaBar) volume
Proof (Lean source)
-- @node: continuous_mul_treatmentDensity_integrable lemma continuous_mul_treatmentDensity_integrable (P : ClampLaw J) (kappa cminus cplus deltaBar : ℝ) (hcond : CondDensityLaw P) (hthin : PolynomialThinning P kappa cminus cplus) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hdelta : deltaBar ≤ 1) (x : Fin J) (mu : ℝ → ℝ) (hmu : ContinuousOn mu (Icc (0 : ℝ) deltaBar)) : IntegrableOn (fun a => mu a * P.pi x a) (Icc (0 : ℝ) deltaBar) volume := by have hmuInt : IntegrableOn mu (Icc (0 : ℝ) deltaBar) volume := hmu.integrableOn_Icc have hpiMeas : AEStronglyMeasurable (P.pi x) (volume.restrict (Icc (0 : ℝ) deltaBar)) := by exact (aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hcond.1 x)).mono_measure (Measure.restrict_mono_set volume (Set.Icc_subset_Icc_right hdelta)) |>.aestronglyMeasurable have hpiBound : ∀ᵐ a ∂volume.restrict (Icc (0 : ℝ) deltaBar), ‖P.pi x a‖ ≤ cplus := by filter_upwards [hcond.2.1 x |>.filter_mono (ae_mono (Measure.restrict_mono_set volume (Set.Icc_subset_Icc_right hdelta))), hthin x |>.filter_mono (ae_mono (Measure.restrict_mono_set volume (Set.Icc_subset_Icc_right hdelta))), ae_restrict_mem measurableSet_Icc] with a hnon henv ha rw [Real.norm_eq_abs, abs_of_nonneg hnon] exact henv.2.trans (mul_le_of_le_one_right hcplus (Real.rpow_le_one ha.1 (ha.2.trans hdelta) hkappa)) have h := hmuInt.bdd_mul hpiMeas hpiBound simpa only [IntegrableOn, mul_comm] using h
CausalSmith.Stat.LmtpThresholdAtomFrontier.continuous_mul_treatmentDensity_integrable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeIdentification.lean:176
theorem continuous_regression_eq_of_density_integrals

Equality of all density-weighted cell integrals identifies two continuous regressions pointwise on the threshold interval. The result uses the hcond condition, the hthin condition, the hkappa condition, the hcminus condition, the hcplus condition, the hdelta condition, the hdeltaOne condition, the hcont₁ condition, the hcont₂ condition, the hint₁ condition, the hint₂ condition, the hint condition. This is the stated conclusion.

Formal statement
J :
shared
P :
kappa cminus cplus deltaBar :
hcond :
hthin :
PolynomialThinning P kappa cminus cplus
hkappa :
0 ≤ kappa
hcminus :
0 < cminus
hcplus :
0 ≤ cplus
hdelta :
0 < deltaBar
hdeltaOne :
deltaBar ≤ 1
x :
Fin J
mu₁ mu₂ :
ℝ → ℝ
hcont₁ :
ContinuousOn mu₁ (Icc (0 : ℝ) deltaBar)
hcont₂ :
ContinuousOn mu₂ (Icc (0 : ℝ) deltaBar)
hint₁ :
IntegrableOn (fun a => mu₁ a * P.pi x a) (Icc (0 : ℝ) deltaBar) volume
hint₂ :
IntegrableOn (fun a => mu₂ a * P.pi x a) (Icc (0 : ℝ) deltaBar) volume
hint :
∀ B : Set
and
B ⊆ Icc (0 : ℝ) deltaBar
then
(∫ a in B, mu₁ a * P.pi x a) = ∫ a in B, mu₂ a * P.pi x a
EqOn mu₁ mu₂ (Icc (0 : ℝ) deltaBar)
Proof (Lean source)
-- @node: continuous_regression_eq_of_density_integrals lemma continuous_regression_eq_of_density_integrals (P : ClampLaw J) (kappa cminus cplus deltaBar : ℝ) (hcond : CondDensityLaw P) (hthin : PolynomialThinning P kappa cminus cplus) (hkappa : 0 ≤ kappa) (hcminus : 0 < cminus) (hcplus : 0 ≤ cplus) (hdelta : 0 < deltaBar) (hdeltaOne : deltaBar ≤ 1) (x : Fin J) (mu₁ mu₂ : ℝ → ℝ) (hcont₁ : ContinuousOn mu₁ (Icc (0 : ℝ) deltaBar)) (hcont₂ : ContinuousOn mu₂ (Icc (0 : ℝ) deltaBar)) (hint₁ : IntegrableOn (fun a => mu₁ a * P.pi x a) (Icc (0 : ℝ) deltaBar) volume) (hint₂ : IntegrableOn (fun a => mu₂ a * P.pi x a) (Icc (0 : ℝ) deltaBar) volume) (hint : ∀ B : Set ℝ, MeasurableSet B → B ⊆ Icc (0 : ℝ) deltaBar → (∫ a in B, mu₁ a * P.pi x a) = ∫ a in B, mu₂ a * P.pi x a) : EqOn mu₁ mu₂ (Icc (0 : ℝ) deltaBar) := by have haeProd : (fun a => mu₁ a * P.pi x a) =ᵐ[ volume.restrict (Icc (0 : ℝ) deltaBar)] fun a => mu₂ a * P.pi x a := by refine Integrable.ae_eq_of_forall_setIntegral_eq (fun a => mu₁ a * P.pi x a) (fun a => mu₂ a * P.pi x a) hint₁ hint₂ ?_ intro S hS _ rw [Measure.restrict_restrict hS] exact hint (S ∩ Icc (0 : ℝ) deltaBar) (hS.inter measurableSet_Icc) inter_subset_right have hpiPos : ∀ᵐ a ∂volume.restrict (Icc (0 : ℝ) deltaBar), 0 < P.pi x a := by filter_upwards [hthin x |>.filter_mono (ae_mono (Measure.restrict_mono_set volume (Set.Icc_subset_Icc_right hdeltaOne))), ae_restrict_mem measurableSet_Icc, (volume.ae_ne 0).filter_mono (ae_mono Measure.restrict_le_self)] with a henv ha ha0 have haPos : 0 < a := lt_of_le_of_ne ha.1 (Ne.symm ha0) exact lt_of_lt_of_le (mul_pos hcminus (Real.rpow_pos_of_pos haPos kappa)) henv.1 have hae : mu₁ =ᵐ[volume.restrict (Icc (0 : ℝ) deltaBar)] mu₂ := by filter_upwards [haeProd, hpiPos] with a heq hpos exact (mul_right_cancel₀ (ne_of_gt hpos)) heq exact volume.eqOn_Icc_of_ae_eq (ne_of_lt hdelta) hae hcont₁ hcont₂
CausalSmith.Stat.LmtpThresholdAtomFrontier.continuous_regression_eq_of_density_integrals · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeIdentification.lean:208
theorem fullData_observed_setIntegral

Set integrals of observed-coordinate functions agree under a full-data law and its observed margin. The result uses the hS condition, the hf condition. This is the stated conclusion.

Formal statement
J :
shared
PF :
S :
hS :
f :
ClampObs J → ℝ
hf :
(∫ z in (fun z : ClampObs J × PF.latentCarrier => z.1) ⁻¹' S, f z.1 ∂PF.fullMeasure)
= ∫ o in S, f o ∂PF.observedMargin.dataMeasure
Proof (Lean source)
-- @node: fullData_observed_setIntegral lemma fullData_observed_setIntegral (PF : FullDataLaw J) (S : Set (ClampObs J)) (hS : MeasurableSet S) (f : ClampObs J → ℝ) (hf : Measurable f) : (∫ z in (fun z : ClampObs J × PF.latentCarrier => z.1) ⁻¹' S, f z.1 ∂PF.fullMeasure) = ∫ o in S, f o ∂PF.observedMargin.dataMeasure := by rw [← integral_indicator (hS.preimage measurable_fst), ← integral_indicator hS] rw [← PF.margin_eq] exact (integral_map measurable_fst.aemeasurable (hf.indicator hS).aestronglyMeasurable).symm
CausalSmith.Stat.LmtpThresholdAtomFrontier.fullData_observed_setIntegral · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeIdentification.lean:252
theorem fullDataResponseMean_eq_mu

Full-data and fixed-Hölder observed regressions agree pointwise on the declared threshold interval. The result uses the hPF condition, the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
PF :
hPF :
FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
x :
Fin J
a :
a ∈ Icc (0 : ℝ) deltaBar
fullDataResponseMean PF x a = PF.observedMargin.mu x a
Proof (Lean source)
-- @node: fullDataResponseMean_eq_mu lemma fullDataResponseMean_eq_mu (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (PF : FullDataLaw J) (hPF : FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∀ (x : Fin J) (a : ℝ), a ∈ Icc (0 : ℝ) deltaBar → fullDataResponseMean PF x a = PF.observedMargin.mu x a := by have hreg' := hreg rcases hreg' with ⟨_, _, hkappa, _, hcminus, _, hcplusLower, hpmin, _, hdelta, hdeltaOne, _, _⟩ have hcplus : 0 ≤ cplus := le_trans (by linarith) hcplusLower intro x a ha have hEq : EqOn (fullDataResponseMean PF x) (PF.observedMargin.mu x) (Icc (0 : ℝ) deltaBar) := by apply continuous_regression_eq_of_density_integrals PF.observedMargin kappa cminus cplus deltaBar hPF.observedModel.condDensity hPF.observedModel.thinning hkappa hcminus hcplus hdelta hdeltaOne.le x · exact hPF.responseContinuity x · exact (hPF.observedModel.holder x).1.mono (Set.Icc_subset_Icc_right hdeltaOne.le) · exact continuous_mul_treatmentDensity_integrable PF.observedMargin kappa cminus cplus deltaBar hPF.observedModel.condDensity hPF.observedModel.thinning hkappa hcplus hdeltaOne.le x _ (hPF.responseContinuity x) · exact continuous_mul_treatmentDensity_integrable PF.observedMargin kappa cminus cplus deltaBar hPF.observedModel.condDensity hPF.observedModel.thinning hkappa hcplus hdeltaOne.le x _ ((hPF.observedModel.holder x).1.mono (Set.Icc_subset_Icc_right hdeltaOne.le)) · intro B hB hBdelta have hBunit : B ⊆ Icc (0 : ℝ) 1 := hBdelta.trans (Set.Icc_subset_Icc_right hdeltaOne.le) have hfull := fullDataResponseMean_setIntegral J kappa cminus cplus pmin deltaBar PF hPF.toBridge hkappa hcplus hpmin x B hB hBunit have hobs := holderRegression_setIntegral PF.observedMargin hPF.observedModel hkappa hcplus hpmin x B hB hBunit have hmargin : (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B}, z.1.Y ∂PF.fullMeasure) = ∫ o in {o : ClampObs J | o.X = x ∧ o.A ∈ B}, o.Y ∂PF.observedMargin.dataMeasure := by exact fullData_observed_setIntegral PF {o : ClampObs J | o.X = x ∧ o.A ∈ B} (by exact (measurableSet_eq_fun (measurable_fst.comp (Measurable.of_comap_le le_rfl)) measurable_const).inter (hB.preimage (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))))) _ clampOutcome_measurable have hpx : 0 < PF.observedMargin.px x := lt_of_lt_of_le hpmin (hPF.observedModel.stratumMass x).2 calc (∫ a in B, fullDataResponseMean PF x a * PF.observedMargin.pi x a) = (PF.observedMargin.px x)⁻¹ * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B}, z.1.Y ∂PF.fullMeasure) := hfull.symm _ = (PF.observedMargin.px x)⁻¹ * (∫ o in {o : ClampObs J | o.X = x ∧ o.A ∈ B}, o.Y ∂PF.observedMargin.dataMeasure) := by rw [hmargin] _ = (PF.observedMargin.px x)⁻¹ * (PF.observedMargin.px x * ∫ a in B, PF.observedMargin.mu x a * PF.observedMargin.pi x a) := by rw [hobs] _ = ∫ a in B, PF.observedMargin.mu x a * PF.observedMargin.pi x a := by field_simp exact hEq ha
CausalSmith.Stat.LmtpThresholdAtomFrontier.fullDataResponseMean_eq_mu · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeIdentification.lean:266
theorem fullDataResponseMean_eq_contRegression

Full-data and continuity-only observed regressions agree pointwise on the declared threshold interval. The result uses the hPF condition, the hreg condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar :
PF :
hPF :
ContFullDataClampModel PF kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
x :
Fin J
a :
a ∈ Icc (0 : ℝ) deltaBar
= contRegression PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel x a
Proof (Lean source)
-- @node: fullDataResponseMean_eq_contRegression lemma fullDataResponseMean_eq_contRegression (J : ℕ) (kappa cminus cplus pmin deltaBar : ℝ) (PF : FullDataLaw J) (hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) : ∀ (x : Fin J) (a : ℝ), a ∈ Icc (0 : ℝ) deltaBar → fullDataResponseMean PF x a = contRegression PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel x a := by rcases hreg with ⟨_, hkappa, hcminus, _, hcplusLower, hpmin, _, hdelta, hdeltaOne⟩ have hcplus : 0 ≤ cplus := le_trans (by linarith) hcplusLower let mu := contRegression PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel have hcont : ∀ x, ContinuousOn (mu x) (Icc (0 : ℝ) deltaBar) := by simpa [mu, contRegression] using (Classical.choose_spec hPF.observedModel.continuousVersion).1 have hver : PF.observedMargin.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[PF.observedMargin.dataMeasure] fun o => mu o.X o.A := by simpa [mu, contRegression] using (Classical.choose_spec hPF.observedModel.continuousVersion).2 intro x a ha apply continuous_regression_eq_of_density_integrals PF.observedMargin kappa cminus cplus deltaBar hPF.observedModel.condDensity hPF.observedModel.thinning hkappa hcminus hcplus hdelta hdeltaOne.le x (fullDataResponseMean PF x) (mu x) (hPF.responseContinuity x) (hcont x) · exact continuous_mul_treatmentDensity_integrable PF.observedMargin kappa cminus cplus deltaBar hPF.observedModel.condDensity hPF.observedModel.thinning hkappa hcplus hdeltaOne.le x _ (hPF.responseContinuity x) · exact continuous_mul_treatmentDensity_integrable PF.observedMargin kappa cminus cplus deltaBar hPF.observedModel.condDensity hPF.observedModel.thinning hkappa hcplus hdeltaOne.le x _ (hcont x) · intro B hB hBdelta have hBunit : B ⊆ Icc (0 : ℝ) 1 := hBdelta.trans (Set.Icc_subset_Icc_right hdeltaOne.le) have hfull := fullDataResponseMean_setIntegral J kappa cminus cplus pmin deltaBar PF hPF.toBridge hkappa hcplus hpmin x B hB hBunit have hweighted := continuous_mul_treatmentDensity_integrable PF.observedMargin kappa cminus cplus deltaBar hPF.observedModel.condDensity hPF.observedModel.thinning hkappa hcplus hdeltaOne.le x (mu x) (hcont x) have hmuInt : Integrable (B.indicator (mu x)) (conditionalTreatmentMeasure PF.observedMargin x) := by unfold conditionalTreatmentMeasure have hpiAe : AEMeasurable (fun t : ℝ => ofReal (PF.observedMargin.pi x t)) (volume.restrict (Icc (0 : ℝ) 1)) := (aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hPF.observedModel.condDensity.1 x)).ennreal_ofReal refine (integrable_withDensity_iff_integrable_smul₀' hpiAe (ae_of_all _ fun _ => ENNReal.ofReal_lt_top)).2 ?_ have hi := (hweighted.mono_set hBdelta).integrable_indicator hB have hir := hi.mono_measure (Measure.restrict_le_self (μ := volume) (s := Icc (0 : ℝ) 1)) apply hir.congr filter_upwards [hPF.observedModel.condDensity.2.1 x] with t ht simp [indicator, ht, mul_comm] have hobs := regressionVersion_setIntegral PF.observedMargin hPF.observedModel.toBridge hkappa hcplus hpmin mu hver x B hB hBunit hmuInt have hmargin := fullData_observed_setIntegral PF {o : ClampObs J | o.X = x ∧ o.A ∈ B} ((measurableSet_eq_fun (measurable_fst.comp (Measurable.of_comap_le le_rfl)) measurable_const).inter (hB.preimage (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))))) _ clampOutcome_measurable have hmargin' : (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B}, z.1.Y ∂PF.fullMeasure) = ∫ o in {o : ClampObs J | o.X = x ∧ o.A ∈ B}, o.Y ∂PF.observedMargin.dataMeasure := by have hs : {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B} = (fun z : ClampObs J × PF.latentCarrier => z.1) ⁻¹' {o : ClampObs J | o.X = x ∧ o.A ∈ B} := by ext z rfl rw [hs] exact hmargin have hpx : 0 < PF.observedMargin.px x := lt_of_lt_of_le hpmin (hPF.observedModel.stratumMass x).2 calc (∫ t in B, fullDataResponseMean PF x t * PF.observedMargin.pi x t) = (PF.observedMargin.px x)⁻¹ * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B}, z.1.Y ∂PF.fullMeasure) := hfull.symm _ = (PF.observedMargin.px x)⁻¹ * (∫ o in {o : ClampObs J | o.X = x ∧ o.A ∈ B}, o.Y ∂PF.observedMargin.dataMeasure) := by rw [hmargin'] _ = (PF.observedMargin.px x)⁻¹ * (PF.observedMargin.px x * ∫ t in B, mu x t * PF.observedMargin.pi x t) := by rw [hobs] _ = ∫ t in B, mu x t * PF.observedMargin.pi x t := by field_simp · exact ha
CausalSmith.Stat.LmtpThresholdAtomFrontier.fullDataResponseMean_eq_contRegression · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeIdentification.lean:336
theorem causalClamp_pathwise

Simultaneous consistency gives the pathwise lower-clamp decomposition. The result uses the hcons condition, the hsupp condition, the hdelta condition. This is the stated conclusion.

Formal statement
J :
shared
PF :
hsupp :
∀ᵐ o ∂PF.observedMargin.dataMeasure, o.A ∈ Icc (0 : ℝ) 1
delta :
hdelta :
delta ∈ Icc (0 : ℝ) 1
∀ᵐ z ∂PF.fullMeasure, PF.pot (clampPolicy delta z.1.A) z
= (if delta < z.1.A then z.1.Y else 0) + (if z.1.A ≤ delta then PF.pot delta z else 0)
Proof (Lean source)
-- @node: causalClamp_pathwise lemma causalClamp_pathwise (PF : FullDataLaw J) (hcons : LatentResponseConsistency PF) (hsupp : ∀ᵐ o ∂PF.observedMargin.dataMeasure, o.A ∈ Icc (0 : ℝ) 1) (delta : ℝ) (hdelta : delta ∈ Icc (0 : ℝ) 1) : ∀ᵐ z ∂PF.fullMeasure, PF.pot (clampPolicy delta z.1.A) z = (if delta < z.1.A then z.1.Y else 0) + (if z.1.A ≤ delta then PF.pot delta z else 0) := by have hsuppFull : ∀ᵐ z ∂PF.fullMeasure, z.1.A ∈ Icc (0 : ℝ) 1 := by rw [← PF.margin_eq] at hsupp exact (MeasureTheory.ae_map_iff (show AEMeasurable (fun z : ClampObs J × PF.latentCarrier => z.1) PF.fullMeasure from measurable_fst.aemeasurable) (measurableSet_Icc.preimage (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))))).mp hsupp filter_upwards [hcons.2.2, hsuppFull] with z hz ha by_cases hlt : delta < z.1.A · have hclamp : clampPolicy delta z.1.A = z.1.A := by simp [clampPolicy, max_eq_left hlt.le] rw [if_pos hlt, if_neg (not_le.mpr hlt), hclamp, hz.1 z.1.A ha, hz.2] ring · have hle : z.1.A ≤ delta := le_of_not_gt hlt have hclamp : clampPolicy delta z.1.A = delta := by simp [clampPolicy, max_eq_right hle] rw [if_neg hlt, if_pos hle, hclamp] ring
theorem fullData_clampAtom_integral_eq

The expectation of the clamped atom contribution is the finite-stratum sum of atom masses times full-data response means. The result uses the hPF condition, the hkappa condition, the hcplus condition, the hpmin condition, the hdeltaBarOne condition, the hdelta condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar :
PF :
hPF :
BridgeFullDataClampModel PF kappa cminus cplus pmin deltaBar
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
hdeltaBarOne :
deltaBar ≤ 1
delta :
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
(∫ z, if z.1.A ≤ delta then PF.pot delta z else 0 ∂PF.fullMeasure)
= ∑ x : Fin J, PF.observedMargin.px x * atomMass PF.observedMargin x delta * fullDataResponseMean PF x delta
Proof (Lean source)
-- @node: fullData_clampAtom_integral_eq lemma fullData_clampAtom_integral_eq (J : ℕ) (kappa cminus cplus pmin deltaBar : ℝ) (PF : FullDataLaw J) (hPF : BridgeFullDataClampModel PF kappa cminus cplus pmin deltaBar) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (hdeltaBarOne : deltaBar ≤ 1) (delta : ℝ) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : (∫ z, if z.1.A ≤ delta then PF.pot delta z else 0 ∂PF.fullMeasure) = ∑ x : Fin J, PF.observedMargin.px x * atomMass PF.observedMargin x delta * fullDataResponseMean PF x delta := by classical have hdeltaUnit : delta ∈ Icc (0 : ℝ) 1 := ⟨hdelta.1, hdelta.2.trans hdeltaBarOne⟩ let f : ClampObs J × PF.latentCarrier → ℝ := fun z => if z.1.A ≤ delta then PF.pot delta z else 0 have hfMeas : Measurable f := by have hpot : Measurable (fun z : ClampObs J × PF.latentCarrier => PF.pot delta z) := PF.pot_jointlyMeasurable.comp (measurable_const.prodMk measurable_id) exact hpot.piecewise (measurableSet_Iic.preimage ((measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))).comp measurable_fst)) measurable_const have hfInt : Integrable f PF.fullMeasure := by let _ := PF.probability refine Integrable.of_bound hfMeas.aestronglyMeasurable 1 ?_ filter_upwards [hPF.consistency.2.2] with z hz by_cases hle : z.1.A ≤ delta · simp only [f, if_pos hle, Real.norm_eq_abs] rw [hz.1 delta hdeltaUnit] exact abs_le.2 ⟨by linarith [(hPF.consistency.2.1 z.1.X delta z.2 hdeltaUnit).1], (hPF.consistency.2.1 z.1.X delta z.2 hdeltaUnit).2⟩ · simp [f, hle] have hXMeas : ∀ x : Fin J, MeasurableSet ((fun z : ClampObs J × PF.latentCarrier => z.1.X) ⁻¹' {x}) := by intro x exact (measurableSet_singleton x).preimage ((measurable_fst.comp (Measurable.of_comap_le le_rfl)).comp measurable_fst) rw [show (∫ z, if z.1.A ≤ delta then PF.pot delta z else 0 ∂PF.fullMeasure) = ∫ z, f z ∂PF.fullMeasure from rfl, integral_eq_sum_setIntegral_fiber hXMeas hfInt] apply Finset.sum_congr rfl intro x _ let F : ℝ × PF.latentCarrier → ℝ := fun w => if w.1 ≤ delta then structuralResponseExtension PF hPF.consistency x (delta, w.2) else 0 have hF : Measurable F := by have hg : Measurable (fun w : ℝ × PF.latentCarrier => structuralResponseExtension PF hPF.consistency x (delta, w.2)) := (structuralResponseExtension_measurable PF hPF.consistency x).comp (measurable_const.prodMk measurable_snd) exact hg.piecewise (measurableSet_Iic.preimage measurable_fst) measurable_const have hFbound : ∀ w, ‖F w‖ ≤ (1 : ℝ) := by intro w by_cases hle : w.1 ≤ delta · simp only [F, if_pos hle] rw [structuralResponseExtension_eq PF hPF.consistency x delta hdeltaUnit w.2, Real.norm_eq_abs] exact abs_le.2 ⟨by linarith [(hPF.consistency.2.1 x delta w.2 hdeltaUnit).1], (hPF.consistency.2.1 x delta w.2 hdeltaUnit).2⟩ · simp [F, hle] have hprod := conditional_stratum_integral_prod J kappa cminus cplus pmin PF hPF.observedModel hPF.exchangeability hkappa hcplus hpmin x F hF 1 hFbound have hstratum : MeasurableSet {z : ClampObs J × PF.latentCarrier | z.1.X = x} := by exact measurableSet_eq_fun ((measurable_fst.comp (Measurable.of_comap_le le_rfl)).comp measurable_fst) measurable_const have hcell : (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, f z ∂PF.fullMeasure) = ∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, F (z.1.A, z.2) ∂PF.fullMeasure := by apply setIntegral_congr_ae hstratum exact hPF.consistency.2.2.mono (fun z hz hx => by by_cases hle : z.1.A ≤ delta · simp only [f, F, if_pos hle] rw [structuralResponseExtension_eq PF hPF.consistency x delta hdeltaUnit z.2, ← hx, ← hz.1 delta hdeltaUnit] · simp [f, F, hle]) change (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, f z ∂PF.fullMeasure) = _ rw [hcell] have hrhs : (∫ a, ∫ u, F (a, u) ∂Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x}) ∂conditionalTreatmentMeasure PF.observedMargin x) = atomMass PF.observedMargin x delta * fullDataResponseMean PF x delta := by rw [show (∫ a, ∫ u, F (a, u) ∂Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x}) ∂conditionalTreatmentMeasure PF.observedMargin x) = ∫ a, indicator (Iic delta) (fun _ => fullDataResponseMean PF x delta) a ∂conditionalTreatmentMeasure PF.observedMargin x by apply integral_congr_ae filter_upwards with a by_cases hle : a ≤ delta · simp only [F, if_pos hle, Set.indicator_of_mem (show a ∈ Iic delta from hle)] rw [integral_congr_ae (ae_of_all _ fun u => structuralResponseExtension_eq PF hPF.consistency x delta hdeltaUnit u)] exact conditional_stratum_latent_integral_eq_mean J kappa cminus cplus pmin PF hPF.observedModel hpmin hPF.consistency x delta hdeltaUnit · simp [F, hle], conditionalTreatment_integral_eq_density PF.observedMargin hPF.observedModel x] simp only [atomMass] rw [← integral_indicator measurableSet_Icc] calc (∫ a, (Icc (0 : ℝ) 1).indicator (fun a => PF.observedMargin.pi x a * (Iic delta).indicator (fun _ => fullDataResponseMean PF x delta) a) a) = ∫ a, (Icc (0 : ℝ) delta).indicator (fun a => PF.observedMargin.pi x a * fullDataResponseMean PF x delta) a := by congr 1 funext a by_cases ha : a ∈ Icc (0 : ℝ) delta · have haUnit : a ∈ Icc (0 : ℝ) 1 := ⟨ha.1, ha.2.trans hdeltaUnit.2⟩ have hIic : a ∈ Iic delta := ha.2 simp [indicator, ha, haUnit, hIic] · by_cases haUnit : a ∈ Icc (0 : ℝ) 1 · by_cases hle : a ≤ delta · exact elim (ha ⟨haUnit.1, hle⟩) · have hnotIic : a ∉ Iic delta := hle simp [indicator, ha, haUnit, hnotIic] · simp [indicator, ha, haUnit] _ = ∫ a in Icc (0 : ℝ) delta, PF.observedMargin.pi x a * fullDataResponseMean PF x delta := integral_indicator measurableSet_Icc _ = (∫ a in Icc (0 : ℝ) delta, PF.observedMargin.pi x a) * fullDataResponseMean PF x delta := by rw [integral_mul_const] have hpx : 0 < PF.observedMargin.px x := lt_of_lt_of_le hpmin (hPF.observedModel.stratumMass x).2 rw [hrhs] at hprod field_simp at hprod ⊢ exact hprod
CausalSmith.Stat.LmtpThresholdAtomFrontier.fullData_clampAtom_integral_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeIdentification.lean:464
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.CausalBridgeMeasure 7 declarations This module derives the normalized stratum product law and continuity of the full-data response mean used by the causal clamp bridge.

Conditional full-data stratum measure helpers

This module derives the normalized stratum product law and continuity of the full-data response mean used by the causal clamp bridge.

theorem conditional_stratum_treatment_latent_indep Lemma conditional_stratum_treatment_latent_indep in the paper ↗

After restriction to a positive-mass stratum and normalization, treatment and the latent response coordinate are independent. The result uses the hexch condition, the hpx condition, the hmass condition. This is the stated conclusion.

Formal statement
J :
PF :
hexch :
x :
Fin J
hpx :
0 < PF.observedMargin.px x
hmass :
fullDataStratumMass PF x = PF.observedMargin.px x
IndepFun (fun z : ClampObs J × PF.latentCarrier => z.1.A) (fun z => z.2) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x})
Proof (Lean source)
lemma conditional_stratum_treatment_latent_indep (J : ℕ) (PF : FullDataLaw J) (hexch : LatentExchangeability (PF := PF)) (x : Fin J) (hpx : 0 < PF.observedMargin.px x) (hmass : fullDataStratumMass PF x = PF.observedMargin.px x) : IndepFun (fun z : ClampObs J × PF.latentCarrier => z.1.A) (fun z => z.2) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x}) := by letI : IsProbabilityMeasure PF.fullMeasure := PF.probability have hX : Measurable (fun o : ClampObs J => o.X) := by exact measurable_fst.comp (Measurable.of_comap_le le_rfl) have hfullX : Measurable (fun z : ClampObs J × PF.latentCarrier => z.1.X) := hX.comp measurable_fst have hA : Measurable (fun z : ClampObs J × PF.latentCarrier => z.1.A) := by have hAo : Measurable (fun o : ClampObs J => o.A) := by exact measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) exact hAo.comp measurable_fst have hU : Measurable (fun z : ClampObs J × PF.latentCarrier => z.2) := measurable_snd rw [ProbabilityTheory.indepFun_iff_measure_inter_preimage_eq_mul] intro s t hs ht have he := hexch x (s.indicator (fun _ => (1 : ℝ))) (t.indicator (fun _ => (1 : ℝ))) have hfs : Measurable (s.indicator (fun _ => (1 : ℝ))) := measurable_const.indicator hs have hgt : Measurable (t.indicator (fun _ => (1 : ℝ))) := measurable_const.indicator ht specialize he hfs hgt ⟨1, fun a => by by_cases ha : a ∈ s <;> simp [indicator, ha]⟩ ⟨1, fun u => by by_cases hu : u ∈ t <;> simp [indicator, hu]⟩ rw [hmass] at he have hSx : MeasurableSet {z : ClampObs J × PF.latentCarrier | z.1.X = x} := hfullX (measurableSet_singleton x) have hAs : MeasurableSet ((fun z : ClampObs J × PF.latentCarrier => z.1.A) ⁻¹' s) := hA hs have hUt : MeasurableSet ((fun z : ClampObs J × PF.latentCarrier => z.2) ⁻¹' t) := hU ht have hIfg : (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, s.indicator (fun _ => (1 : ℝ)) z.1.A * t.indicator (fun _ => (1 : ℝ)) z.2 ∂PF.fullMeasure) = PF.fullMeasure.real ({z : ClampObs J × PF.latentCarrier | z.1.X = x} ∩ ((fun z => z.1.A) ⁻¹' s ∩ (fun z => z.2) ⁻¹' t)) := by rw [← integral_indicator hSx] rw [← integral_indicator_one (hSx.inter (hAs.inter hUt))] congr 1 funext z by_cases hx : z.1.X = x <;> by_cases ha : z.1.A ∈ s <;> by_cases hu : z.2 ∈ t <;> simp [indicator, hx, ha, hu] have hIf : (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, s.indicator (fun _ => (1 : ℝ)) z.1.A ∂PF.fullMeasure) = PF.fullMeasure.real ({z : ClampObs J × PF.latentCarrier | z.1.X = x} ∩ (fun z => z.1.A) ⁻¹' s) := by rw [← integral_indicator hSx] rw [← integral_indicator_one (hSx.inter hAs)] congr 1 funext z by_cases hx : z.1.X = x <;> by_cases ha : z.1.A ∈ s <;> simp [indicator, hx, ha] have hIg : (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, t.indicator (fun _ => (1 : ℝ)) z.2 ∂PF.fullMeasure) = PF.fullMeasure.real ({z : ClampObs J × PF.latentCarrier | z.1.X = x} ∩ (fun z => z.2) ⁻¹' t) := by rw [← integral_indicator hSx] rw [← integral_indicator_one (hSx.inter hUt)] congr 1 funext z by_cases hx : z.1.X = x <;> by_cases hu : z.2 ∈ t <;> simp [indicator, hx, hu] rw [hIfg, hIf, hIg] at he have he' : PF.observedMargin.px x * PF.fullMeasure.real ((fun z : ClampObs J × PF.latentCarrier => z.2) ⁻¹' t ∩ ({z | z.1.X = x} ∩ (fun z => z.1.A) ⁻¹' s)) = PF.fullMeasure.real ({z | z.1.X = x} ∩ (fun z => z.1.A) ⁻¹' s) * PF.fullMeasure.real ((fun z => z.2) ⁻¹' t ∩ {z | z.1.X = x}) := by convert he using 1 <;> congr 2 <;> ext z <;> simp only [Set.mem_inter_iff, Set.mem_preimage, Set.mem_ofPred_eq] <;> tauto have hscalar : (ofReal (PF.observedMargin.px x))⁻¹ ≠ ⊤ := ENNReal.inv_ne_top.mpr (by simp [ENNReal.ofReal_eq_zero, not_le.mpr hpx]) have hfinite (u : Set (ClampObs J × PF.latentCarrier)) : (ofReal (PF.observedMargin.px x))⁻¹ * (PF.fullMeasure.restrict {z | z.1.X = x}) u ≠ ⊤ := ENNReal.mul_ne_top hscalar (measure_ne_top _ _) apply (ENNReal.toReal_eq_toReal_iff' (hfinite _) (ENNReal.mul_ne_top (hfinite _) (hfinite _))).mp simp only [ENNReal.toReal_mul, ENNReal.toReal_inv, ENNReal.toReal_ofReal hpx.le] rw [Measure.restrict_apply (hAs.inter hUt), Measure.restrict_apply hAs, Measure.restrict_apply hUt] simp only [Set.inter_left_comm, Set.inter_comm] change (PF.observedMargin.px x)⁻¹ * PF.fullMeasure.real ((fun z : ClampObs J × PF.latentCarrier => z.2) ⁻¹' t ∩ ({z | z.1.X = x} ∩ (fun z => z.1.A) ⁻¹' s)) = ((PF.observedMargin.px x)⁻¹ * PF.fullMeasure.real ({z | z.1.X = x} ∩ (fun z => z.1.A) ⁻¹' s)) * ((PF.observedMargin.px x)⁻¹ * PF.fullMeasure.real ((fun z => z.2) ⁻¹' t ∩ {z | z.1.X = x})) calc _ = (PF.observedMargin.px x)⁻¹ ^ 2 * (PF.observedMargin.px x * PF.fullMeasure.real ((fun z : ClampObs J × PF.latentCarrier => z.2) ⁻¹' t ∩ ({z | z.1.X = x} ∩ (fun z => z.1.A) ⁻¹' s))) := by field_simp [ne_of_gt hpx] _ = (PF.observedMargin.px x)⁻¹ ^ 2 * (PF.fullMeasure.real ({z | z.1.X = x} ∩ (fun z => z.1.A) ⁻¹' s) * PF.fullMeasure.real ((fun z => z.2) ⁻¹' t ∩ {z | z.1.X = x})) := by rw [he'] _ = _ := by ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.conditional_stratum_treatment_latent_indep · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeMeasure.lean:26
theorem conditional_stratum_treatment_law Lemma conditional_stratum_treatment_law in the paper ↗

The treatment marginal of the normalized full-data stratum is the declared conditional treatment law. The result uses the hmodel condition, the hkappa condition, the hcplus condition, the hpmin condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin :
PF :
hmodel :
BridgeClampModel PF.observedMargin kappa cminus cplus pmin
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
x :
Fin J
Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1.A) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x})
= conditionalTreatmentMeasure PF.observedMargin x
Proof (Lean source)
lemma conditional_stratum_treatment_law (J : ℕ) (kappa cminus cplus pmin : ℝ) (PF : FullDataLaw J) (hmodel : BridgeClampModel PF.observedMargin kappa cminus cplus pmin) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (x : Fin J) : Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1.A) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x}) = conditionalTreatmentMeasure PF.observedMargin x := by have hpx : 0 < PF.observedMargin.px x := lt_of_lt_of_le hpmin (hmodel.stratumMass x).2 have hfst : Measurable (fun z : ClampObs J × PF.latentCarrier => z.1) := measurable_fst have hX : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) have hA : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) have hrestrict : Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1) (PF.fullMeasure.restrict {z | z.1.X = x}) = PF.observedMargin.dataMeasure.restrict {o | o.X = x} := by let s : Set (ClampObs J) := (fun o => o.X) ⁻¹' {x} change Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1) (PF.fullMeasure.restrict ((fun z => z.1) ⁻¹' s)) = PF.observedMargin.dataMeasure.restrict s calc _ = (Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1) PF.fullMeasure).restrict s := (Measure.restrict_map hfst (hX (measurableSet_singleton x))).symm _ = _ := by rw [PF.margin_eq] have hunscaled : Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1.A) (PF.fullMeasure.restrict {z | z.1.X = x}) = ofReal (PF.observedMargin.px x) • conditionalTreatmentMeasure PF.observedMargin x := by rw [← stratumTreatmentMeasure_eq PF.observedMargin hmodel hkappa hcplus hpmin x] rw [← hrestrict, Measure.map_map hA hfst] rfl rw [Measure.map_smul, hunscaled, smul_smul] have hz : ofReal (PF.observedMargin.px x) ≠ 0 := by rw [ne_eq, ENNReal.ofReal_eq_zero] exact not_le.mpr hpx rw [ENNReal.inv_mul_cancel hz ENNReal.ofReal_ne_top, one_smul]
CausalSmith.Stat.LmtpThresholdAtomFrontier.conditional_stratum_treatment_law · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeMeasure.lean:136
theorem conditional_stratum_integral_prod Lemma conditional_stratum_integral_prod in the paper ↗

A bounded measurable function of treatment and the latent coordinate integrates by iterated integration under the normalized stratum law. The result uses the hmodel condition, the hexch condition, the hkappa condition, the hcplus condition, the hpmin condition, the hF condition, the hM condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin :
PF :
hmodel :
BridgeClampModel PF.observedMargin kappa cminus cplus pmin
hexch :
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
x :
Fin J
F :
ℝ × PF.latentCarrier → ℝ
hF :
M :
hM :
∀ z, ‖F z‖ ≤ M
(PF.observedMargin.px x)⁻¹ * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, F (z.1.A, z.2) ∂PF.fullMeasure)
= ∫ a, ∫ u, F (a, u) ∂Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x}) ∂conditionalTreatmentMeasure PF.observedMargin x
Proof (Lean source)
lemma conditional_stratum_integral_prod (J : ℕ) (kappa cminus cplus pmin : ℝ) (PF : FullDataLaw J) (hmodel : BridgeClampModel PF.observedMargin kappa cminus cplus pmin) (hexch : LatentExchangeability (PF := PF)) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (x : Fin J) (F : ℝ × PF.latentCarrier → ℝ) (hF : Measurable F) (M : ℝ) (hM : ∀ z, ‖F z‖ ≤ M) : (PF.observedMargin.px x)⁻¹ * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, F (z.1.A, z.2) ∂PF.fullMeasure) = ∫ a, ∫ u, F (a, u) ∂Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x}) ∂conditionalTreatmentMeasure PF.observedMargin x := by let μ := (ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z : ClampObs J × PF.latentCarrier | z.1.X = x} have hpx : 0 < PF.observedMargin.px x := lt_of_lt_of_le hpmin (hmodel.stratumMass x).2 have hmass : fullDataStratumMass PF x = PF.observedMargin.px x := (hmodel.stratumMass x).1.symm have hA : Measurable (fun z : ClampObs J × PF.latentCarrier => z.1.A) := by have hAo : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) exact hAo.comp measurable_fst have hU : Measurable (fun z : ClampObs J × PF.latentCarrier => z.2) := measurable_snd have hpair : Measurable (fun z : ClampObs J × PF.latentCarrier => (z.1.A, z.2)) := Measurable.prod hA hU letI : IsProbabilityMeasure PF.fullMeasure := PF.probability letI : IsFiniteMeasure μ := by refine ⟨?_⟩ dsimp [μ] apply ENNReal.mul_lt_top · rw [ENNReal.inv_lt_top] exact ENNReal.ofReal_pos.mpr hpx · exact measure_lt_top _ _ have hFind : Integrable (fun z : ClampObs J × PF.latentCarrier => F (z.1.A, z.2)) μ := Integrable.of_bound (hF.comp hpair).aestronglyMeasurable M (ae_of_all _ fun z => hM (z.1.A, z.2)) have hind := conditional_stratum_treatment_latent_indep J PF hexch x hpx hmass have hjoint : Measure.map (fun z : ClampObs J × PF.latentCarrier => (z.1.A, z.2)) μ = (Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1.A) μ).prod (Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) μ) := (ProbabilityTheory.indepFun_iff_map_prod_eq_prod_map_map hA.aemeasurable hU.aemeasurable).mp hind have hprodInt : Integrable F ((Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1.A) μ).prod (Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) μ)) := by rw [← hjoint] exact (integrable_map_measure hF.aestronglyMeasurable hpair.aemeasurable).2 hFind have hAlaw : Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1.A) μ = conditionalTreatmentMeasure PF.observedMargin x := by simpa [μ] using conditional_stratum_treatment_law J kappa cminus cplus pmin PF hmodel hkappa hcplus hpmin x calc _ = ∫ z, F (z.1.A, z.2) ∂μ := by rw [show μ = (ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z : ClampObs J × PF.latentCarrier | z.1.X = x} from rfl, integral_smul_measure] simp only [ENNReal.toReal_inv, ENNReal.toReal_ofReal hpx.le, smul_eq_mul] _ = ∫ w, F w ∂Measure.map (fun z : ClampObs J × PF.latentCarrier => (z.1.A, z.2)) μ := by exact (integral_map hpair.aemeasurable hF.aestronglyMeasurable).symm _ = ∫ w, F w ∂(Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1.A) μ).prod (Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) μ) := by rw [hjoint] _ = ∫ a, ∫ u, F (a, u) ∂Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) μ ∂Measure.map (fun z : ClampObs J × PF.latentCarrier => z.1.A) μ := integral_prod F hprodInt _ = _ := by rw [hAlaw]
CausalSmith.Stat.LmtpThresholdAtomFrontier.conditional_stratum_integral_prod · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeMeasure.lean:183
theorem conditional_stratum_latent_integral_eq_mean Lemma conditional_stratum_latent_integral_eq_mean in the paper ↗

The latent-coordinate integral under the normalized stratum law is the full-data response mean. The result uses the hmodel condition, the hpmin condition, the hcons condition, the ha condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin :
PF :
hmodel :
BridgeClampModel PF.observedMargin kappa cminus cplus pmin
hpmin :
0 < pmin
hcons :
x :
Fin J
a :
ha :
a ∈ Icc (0 : ℝ) 1
(∫ u, PF.g x a u ∂Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x}))
= fullDataResponseMean (PF := PF) (x := x) (a := a)
Proof (Lean source)
lemma conditional_stratum_latent_integral_eq_mean (J : ℕ) (kappa cminus cplus pmin : ℝ) (PF : FullDataLaw J) (hmodel : BridgeClampModel PF.observedMargin kappa cminus cplus pmin) (hpmin : 0 < pmin) (hcons : LatentResponseConsistency (PF := PF)) (x : Fin J) (a : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) : (∫ u, PF.g x a u ∂Measure.map (fun z : ClampObs J × PF.latentCarrier => z.2) ((ofReal (PF.observedMargin.px x))⁻¹ • PF.fullMeasure.restrict {z | z.1.X = x})) = fullDataResponseMean (PF := PF) (x := x) (a := a) := by have hpx : 0 < PF.observedMargin.px x := by exact lt_of_lt_of_le hpmin (hmodel.stratumMass x).2 have hmass : fullDataStratumMass PF x = PF.observedMargin.px x := (hmodel.stratumMass x).1.symm have hg : Measurable (fun u : PF.latentCarrier => PF.g x a u) := by exact (hcons.1 x).comp (by fun_prop : Measurable fun u : PF.latentCarrier => ((⟨a, ha⟩ : Icc (0 : ℝ) 1), u)) rw [integral_map measurable_snd.aemeasurable hg.aestronglyMeasurable, integral_smul_measure] simp only [ENNReal.toReal_inv, ENNReal.toReal_ofReal hpx.le, smul_eq_mul, fullDataResponseMean] rw [hmass]
CausalSmith.Stat.LmtpThresholdAtomFrontier.conditional_stratum_latent_integral_eq_mean · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeMeasure.lean:257
theorem fullDataResponseMean_dist_le Lemma fullDataResponseMean_dist_le in the paper ↗

Conditional L1 response distance bounds the distance between full-data response means. The result uses the hmodel condition, the hpmin condition, the hcons condition, the hs condition, the ht condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin :
PF :
hmodel :
ClampModel PF.observedMargin beta kappa L cminus cplus pmin
hpmin :
0 < pmin
hcons :
x :
Fin J
s t :
hs :
s ∈ Icc (0 : ℝ) 1
ht :
t ∈ Icc (0 : ℝ) 1
dist (fullDataResponseMean (PF := PF) (x := x) (a := t)) (fullDataResponseMean (PF := PF) (x := x) (a := s))
≤ (PF.observedMargin.px x)⁻¹ * ∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, |PF.pot t z
- PF.pot s z| ∂PF.fullMeasure
Proof (Lean source)
lemma fullDataResponseMean_dist_le (J : ℕ) (beta kappa L cminus cplus pmin : ℝ) (PF : FullDataLaw J) (hmodel : ClampModel PF.observedMargin beta kappa L cminus cplus pmin) (hpmin : 0 < pmin) (hcons : LatentResponseConsistency (PF := PF)) (x : Fin J) (s t : ℝ) (hs : s ∈ Icc (0 : ℝ) 1) (ht : t ∈ Icc (0 : ℝ) 1) : dist (fullDataResponseMean (PF := PF) (x := x) (a := t)) (fullDataResponseMean (PF := PF) (x := x) (a := s)) ≤ (PF.observedMargin.px x)⁻¹ * ∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x}, |PF.pot t z - PF.pot s z| ∂PF.fullMeasure := by letI : IsProbabilityMeasure PF.fullMeasure := PF.probability have hpx : 0 < PF.observedMargin.px x := lt_of_lt_of_le hpmin (hmodel.stratumMass x).2 have hmass : fullDataStratumMass PF x = PF.observedMargin.px x := (hmodel.stratumMass x).1.symm have hg (a : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) : Measurable (fun z : ClampObs J × PF.latentCarrier => PF.g x a z.2) := by exact ((hcons.1 x).comp (by fun_prop : Measurable fun z : ClampObs J × PF.latentCarrier => ((⟨a, ha⟩ : Icc (0 : ℝ) 1), z.2))) have hgInt (a : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) : Integrable (fun z : ClampObs J × PF.latentCarrier => PF.g x a z.2) (PF.fullMeasure.restrict {z | z.1.X = x}) := by apply Integrable.of_bound (hg a ha).aestronglyMeasurable 1 exact ae_of_all _ fun z => by rw [Real.norm_eq_abs] exact abs_le.2 ⟨by linarith [(hcons.2.1 x a z.2 ha).1], (hcons.2.1 x a z.2 ha).2⟩ have hpotg (a : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) : (fun z : ClampObs J × PF.latentCarrier => PF.pot a z) =ᵐ[ PF.fullMeasure.restrict {z | z.1.X = x}] (fun z => PF.g x a z.2) := by filter_upwards [ae_restrict_of_ae hcons.2.2, ae_restrict_mem (by have hXm : Measurable (fun z : ClampObs J × PF.latentCarrier => z.1.X) := (measurable_fst.comp (Measurable.of_comap_le le_rfl)).comp measurable_fst exact hXm (measurableSet_singleton x))] with z hz hzx simpa [hzx] using hz.1 a ha have hpotInt (a : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) : Integrable (fun z : ClampObs J × PF.latentCarrier => PF.pot a z) (PF.fullMeasure.restrict {z | z.1.X = x}) := (hgInt a ha).congr (hpotg a ha).symm rw [fullDataResponseMean, fullDataResponseMean, Real.dist_eq] rw [hmass] calc |(PF.observedMargin.px x)⁻¹ * (∫ z in {z | z.1.X = x}, PF.g x t z.2 ∂PF.fullMeasure) - (PF.observedMargin.px x)⁻¹ * (∫ z in {z | z.1.X = x}, PF.g x s z.2 ∂PF.fullMeasure)| = (PF.observedMargin.px x)⁻¹ * |(∫ z in {z | z.1.X = x}, PF.g x t z.2 ∂PF.fullMeasure) - (∫ z in {z | z.1.X = x}, PF.g x s z.2 ∂PF.fullMeasure)| := by rw [← mul_sub, abs_mul, abs_of_nonneg (inv_nonneg.mpr hpx.le)] _ = (PF.observedMargin.px x)⁻¹ * |∫ z in {z | z.1.X = x}, (PF.g x t z.2 - PF.g x s z.2) ∂PF.fullMeasure| := by rw [integral_sub (hgInt t ht) (hgInt s hs)] _ = (PF.observedMargin.px x)⁻¹ * |∫ z in {z | z.1.X = x}, (PF.pot t z - PF.pot s z) ∂PF.fullMeasure| := by congr 2 apply integral_congr_ae filter_upwards [hpotg t ht, hpotg s hs] with z htz hsz rw [htz, hsz] _ ≤ _ := mul_le_mul_of_nonneg_left abs_integral_le_integral_abs (inv_nonneg.mpr hpx.le)
CausalSmith.Stat.LmtpThresholdAtomFrontier.fullDataResponseMean_dist_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeMeasure.lean:286
theorem fullDataResponseMean_continuousOn Lemma fullDataResponseMean_continuousOn in the paper ↗

The full-data mean-continuity member is exactly continuity of the structural response mean on the declared threshold interval. The result uses the hcont condition. This is the stated conclusion.

Formal statement
J :
PF :
deltaBar :
hcont :
x :
Fin J
ContinuousOn (fun a => fullDataResponseMean (PF := PF) (x := x) (a := a)) (Icc (0 : ℝ) deltaBar)
Proof (Lean source)
lemma fullDataResponseMean_continuousOn (J : ℕ) (PF : FullDataLaw J) (deltaBar : ℝ) (hcont : FullDataResponseContinuity PF deltaBar) (x : Fin J) : ContinuousOn (fun a => fullDataResponseMean (PF := PF) (x := x) (a := a)) (Icc (0 : ℝ) deltaBar) := by exact hcont x
CausalSmith.Stat.LmtpThresholdAtomFrontier.fullDataResponseMean_continuousOn · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeMeasure.lean:358
theorem cont_regression_extension_unique Lemma 18 in the paper ↗

Two continuous conditional-regression versions on the threshold interval coincide there under the positive polynomial treatment-density envelope. The result uses the hP condition, the hreg condition, the hcont₁ condition, the hcont₂ condition, the hver₁ condition, the hver₂ condition. This is the stated conclusion.

Formal statement
J :
shared
P :
kappa cminus cplus pmin deltaBar :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
mu₁ mu₂ :
Fin J → ℝ → ℝ
hcont₁ :
∀ x, ContinuousOn (mu₁ x) (Icc (0 : ℝ) deltaBar)
hcont₂ :
∀ x, ContinuousOn (mu₂ x) (Icc (0 : ℝ) deltaBar)
hver₁ :
P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance]
=ᵐ[P.dataMeasure] fun o => mu₁ o.X o.A
hver₂ :
P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance]
=ᵐ[P.dataMeasure] fun o => mu₂ o.X o.A
x :
EqOn (mu₁ x) (mu₂ x) (Icc (0 : ℝ) deltaBar)
Proof (Lean source)
-- @node: lem:continuity-regression-extension-unique lemma cont_regression_extension_unique (P : ClampLaw J) (kappa cminus cplus pmin deltaBar : ℝ) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (mu₁ mu₂ : Fin J → ℝ → ℝ) (hcont₁ : ∀ x, ContinuousOn (mu₁ x) (Icc (0 : ℝ) deltaBar)) (hcont₂ : ∀ x, ContinuousOn (mu₂ x) (Icc (0 : ℝ) deltaBar)) (hver₁ : P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] fun o => mu₁ o.X o.A) (hver₂ : P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] fun o => mu₂ o.X o.A) : ∀ x, EqOn (mu₁ x) (mu₂ x) (Icc (0 : ℝ) deltaBar) := by rcases hreg with ⟨_, hkappa, hcminus, _, hcplus, hpmin, _, hdeltaBar, hdeltaBar_lt⟩ intro x have hversions : (fun o : ClampObs J => mu₁ o.X o.A) =ᵐ[P.dataMeasure] fun o => mu₂ o.X o.A := hver₁.symm.trans hver₂ have hpx : 0 < P.px x := lt_of_lt_of_le hpmin (hP.stratumMass x).2 let f₁ : ℝ → ℝ := fun a => if a ∈ Icc (0 : ℝ) deltaBar then mu₁ x a else 0 let f₂ : ℝ → ℝ := fun a => if a ∈ Icc (0 : ℝ) deltaBar then mu₂ x a else 0 have hf₁ : Measurable f₁ := by let g : ℝ → ℝ := fun _ => 0 have hg : ContinuousOn g (Icc (0 : ℝ) deltaBar)ᶜ := continuous_const.continuousOn change Measurable ((Icc (0 : ℝ) deltaBar).piecewise (mu₁ x) g) exact (hcont₁ x).measurable_piecewise hg measurableSet_Icc have hf₂ : Measurable f₂ := by let g : ℝ → ℝ := fun _ => 0 have hg : ContinuousOn g (Icc (0 : ℝ) deltaBar)ᶜ := continuous_const.continuousOn change Measurable ((Icc (0 : ℝ) deltaBar).piecewise (mu₂ x) g) exact (hcont₂ x).measurable_piecewise hg measurableSet_Icc let B : Set ℝ := {a | f₁ a ≠ f₂ a} have hB : MeasurableSet B := (measurableSet_eq_fun hf₁ hf₂).compl have hBthreshold : B ⊆ Icc (0 : ℝ) deltaBar := by intro a ha by_contra hnot change (if a ∈ Icc (0 : ℝ) deltaBar then mu₁ x a else 0) ≠ (if a ∈ Icc (0 : ℝ) deltaBar then mu₂ x a else 0) at ha simp only [if_neg hnot] at ha exact ha rfl have hBunit : B ⊆ Icc (0 : ℝ) 1 := by intro a ha exact ⟨(hBthreshold ha).1, (hBthreshold ha).2.trans hdeltaBar_lt.le⟩ have hbadNull : P.dataMeasure {o : ClampObs J | o.X = x ∧ o.A ∈ B} = 0 := by apply measure_mono_null _ (ae_iff.mp hversions) intro o ho have ha := hBthreshold ho.2 have hneq : mu₁ x o.A ≠ mu₂ x o.A := by intro heq apply ho.2 change (if o.A ∈ Icc (0 : ℝ) deltaBar then mu₁ x o.A else 0) = (if o.A ∈ Icc (0 : ℝ) deltaBar then mu₂ x o.A else 0) simpa only [if_pos ha] using heq exact fun heq => hneq (by simpa [ho.1] using heq) have hdensity := (hP.condDensity.2.2 x).2 B hB hBunit have hleft : P.dataMeasure.real {o : ClampObs J | o.X = x ∧ o.A ∈ B} = 0 := by simp [Measure.real, hbadNull] rw [hleft] at hdensity have hintegral : (∫ a in B, P.pi x a) = 0 := by nlinarith have hcplus0 : 0 ≤ cplus := le_trans (by linarith) hcplus have hpiInt : IntegrableOn (P.pi x) B volume := by apply IntegrableOn.of_bound (lt_of_le_of_lt (measure_mono hBunit) measure_Icc_lt_top) · exact ((aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hP.condDensity.1 x)).mono_measure (Measure.restrict_mono_set volume hBunit)).aestronglyMeasurable · filter_upwards [(hP.condDensity.2.1 x).filter_mono (ae_mono (Measure.restrict_mono_set volume hBunit)), (hP.thinning x).filter_mono (ae_mono (Measure.restrict_mono_set volume hBunit)), ae_restrict_mem hB] with a hnon hthin ha rw [Real.norm_eq_abs, abs_of_nonneg hnon] calc P.pi x a ≤ cplus * a ^ kappa := hthin.2 _ ≤ cplus := by exact mul_le_of_le_one_right hcplus0 (Real.rpow_le_one (hBunit ha).1 (hBunit ha).2 hkappa) have hnonneg : 0 ≤ᵐ[volume.restrict B] P.pi x := (hP.condDensity.2.1 x).filter_mono (ae_mono (Measure.restrict_mono_set volume hBunit)) have hpizero : P.pi x =ᵐ[volume.restrict B] (fun _ : ℝ => (0 : ℝ)) := (setIntegral_eq_zero_iff_of_nonneg_ae hnonneg hpiInt).mp hintegral have hnezero : ∀ᵐ a ∂volume.restrict B, a ≠ 0 := (volume.ae_ne 0).filter_mono (ae_mono Measure.restrict_le_self) have hfalse : ∀ᵐ _a ∂volume.restrict B, False := by filter_upwards [hpizero, hnezero, (hP.thinning x).filter_mono (ae_mono (Measure.restrict_mono_set volume hBunit)), ae_restrict_mem hB] with a hzero ha0 hthin ha have haPos : 0 < a := lt_of_le_of_ne (hBunit ha).1 (Ne.symm ha0) have hpiPos : 0 < P.pi x a := lt_of_lt_of_le (mul_pos hcminus (Real.rpow_pos_of_pos haPos kappa)) hthin.1 linarith have hBnull : volume B = 0 := by have hu : (volume.restrict B) univ = 0 := by simpa using (ae_iff.mp hfalse) simpa [Measure.restrict_apply_univ] using hu have houtside : ∀ᵐ a ∂volume, a ∉ B := by rw [ae_iff] convert hBnull using 1 congr 1 ext a simp have hglobal : f₁ =ᵐ[volume] f₂ := by filter_upwards [houtside] with a ha exact not_ne_iff.mp ha have hthreshold : mu₁ x =ᵐ[volume.restrict (Icc (0 : ℝ) deltaBar)] mu₂ x := by filter_upwards [ae_restrict_of_ae hglobal, ae_restrict_mem measurableSet_Icc] with a heq ha simpa only [f₁, f₂, if_pos ha] using heq exact volume.eqOn_Icc_of_ae_eq (ne_of_lt hdeltaBar) hthreshold (hcont₁ x) (hcont₂ x)
CausalSmith.Stat.LmtpThresholdAtomFrontier.cont_regression_extension_unique · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/CausalBridgeMeasure.lean:368
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ContinuityCriteriaLift 2 declarations Concrete transport of continuity-only decision criteria

Concrete transport of continuity-only decision criteria

theorem causalEstimatorRisk_eq_contEstimatorRisk

Identification rewrites the causal risk of every observed-sample estimator as the corresponding continuity-only observed risk. The result uses the hreg condition, the hdelta condition, the hPF condition. This is the stated conclusion.

Formal statement
J n :
kappa cminus cplus pmin deltaBar delta :
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
PF :
hPF :
ContFullDataClampModel PF kappa cminus cplus pmin deltaBar
est :
causalEstimatorRisk PF n delta est
= contEstimatorRisk PF.observedMargin n kappa cminus cplus pmin deltaBar delta hPF.observedModel est
Proof (Lean source)
lemma causalEstimatorRisk_eq_contEstimatorRisk (J n : ℕ) (kappa cminus cplus pmin deltaBar delta : ℝ) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (PF : FullDataLaw J) (hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar) (est : Estimator n J) : causalEstimatorRisk PF n delta est = contEstimatorRisk PF.observedMargin n kappa cminus cplus pmin deltaBar delta hPF.observedModel est := by unfold causalEstimatorRisk contEstimatorRisk rw [(continuity_causal_bridge J kappa cminus cplus pmin deltaBar PF hPF hreg).2 delta hdelta]
CausalSmith.Stat.LmtpThresholdAtomFrontier.causalEstimatorRisk_eq_contEstimatorRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityCriteriaLift.lean:18
theorem contFrontierCriteria_observed_causal_eq

The paper's quantile lift and identification bridge instantiate the abstract transport interface without importing the later frontier theorem. The result uses the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
J n :
kappa cminus cplus pmin deltaBar delta alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
crit :
contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha
crit.2.2.1 = crit.1
crit.2.2.2 = crit.2.1
Proof (Lean source)
lemma contFrontierCriteria_observed_causal_eq (J n : ℕ) (kappa cminus cplus pmin deltaBar delta alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : let crit := contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha crit.2.2.1 = crit.1 ∧ crit.2.2.2 = crit.2.1 := by have hsurj : ∀ (P : ClampLaw J), ContClampModel P kappa cminus cplus pmin deltaBar → ∃ PF : FullDataLaw J, ContFullDataClampModel PF kappa cminus cplus pmin deltaBar ∧ PF.observedMargin = P := by intro P hP exact exists_fullData_cont_lift P hP hreg.1.2.2.2.2.2.1 have htarget : ∀ (PF : FullDataLaw J) (hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar), causalClampMean PF delta = contClampFunctional PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel delta := by intro PF hPF exact (continuity_causal_bridge J kappa cminus cplus pmin deltaBar PF hPF hreg.1).2 delta hdelta exact contFrontierCriteria_eq_of_surjective J n kappa cminus cplus pmin deltaBar delta alpha hsurj htarget
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFrontierCriteria_observed_causal_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityCriteriaLift.lean:35
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ContinuityCriteriaTransport 1 declarations Abstract transport of continuity-only decision criteria

Abstract transport of continuity-only decision criteria

theorem contFrontierCriteria_eq_of_surjective

Surjectivity of the observed-margin map and point identification of the causal target are sufficient to identify both continuity-only causal decision criteria with their observed counterparts. The result uses the hsurj condition, the htarget condition. This is the stated conclusion.

Formal statement
J n :
kappa cminus cplus pmin deltaBar delta alpha :
hsurj :
∀ (P : ClampLaw J)
if
ContClampModel P kappa cminus cplus pmin deltaBar
then
∃ PF : FullDataLaw J,
ContFullDataClampModel PF kappa cminus cplus pmin deltaBar ∧ PF.observedMargin = P
htarget :
∀ (PF : FullDataLaw J) (hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar),
= contClampFunctional PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel delta
crit :
contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha
crit.2.2.1 = crit.1
crit.2.2.2 = crit.2.1
Proof (Lean source)
lemma contFrontierCriteria_eq_of_surjective (J n : ℕ) (kappa cminus cplus pmin deltaBar delta alpha : ℝ) (hsurj : ∀ (P : ClampLaw J), ContClampModel P kappa cminus cplus pmin deltaBar → ∃ PF : FullDataLaw J, ContFullDataClampModel PF kappa cminus cplus pmin deltaBar ∧ PF.observedMargin = P) (htarget : ∀ (PF : FullDataLaw J) (hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar), causalClampMean PF delta = contClampFunctional PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel delta) : let crit := contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha crit.2.2.1 = crit.1 ∧ crit.2.2.2 = crit.2.1 := by dsimp only constructor · unfold contFrontierCriteria apply congrArg sInf ext r constructor · rintro ⟨est, hm, hrange, rfl⟩ refine ⟨est, hm, hrange, ?_⟩ apply congrArg sSup ext v constructor · rintro ⟨PF, hPF, rfl⟩ refine ⟨PF.observedMargin, hPF.observedModel, ?_⟩ unfold causalEstimatorRisk contEstimatorRisk rw [htarget PF hPF] · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP subst P refine ⟨PF, hPF, ?_⟩ unfold causalEstimatorRisk contEstimatorRisk rw [htarget PF hPF] · rintro ⟨est, hm, hrange, rfl⟩ refine ⟨est, hm, hrange, ?_⟩ apply congrArg sSup ext v constructor · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP subst P refine ⟨PF, hPF, ?_⟩ unfold causalEstimatorRisk contEstimatorRisk rw [htarget PF hPF] · rintro ⟨PF, hPF, rfl⟩ refine ⟨PF.observedMargin, hPF.observedModel, ?_⟩ unfold causalEstimatorRisk contEstimatorRisk rw [htarget PF hPF] · unfold contFrontierCriteria apply congrArg sInf ext r constructor · rintro ⟨C, hm, hcov, rfl⟩ refine ⟨C, hm, ?_, ?_⟩ · intro P hP obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP subst P simpa only [htarget PF hPF] using hcov PF hPF · apply congrArg sSup ext v constructor · rintro ⟨PF, hPF, rfl⟩ exact ⟨PF.observedMargin, hPF.observedModel, rfl⟩ · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP exact ⟨PF, hPF, by rw [hmargin]⟩ · rintro ⟨C, hm, hcov, rfl⟩ refine ⟨C, hm, ?_, ?_⟩ · intro PF hPF simpa only [htarget PF hPF] using hcov PF.observedMargin hPF.observedModel · apply congrArg sSup ext v constructor · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP exact ⟨PF, hPF, by rw [hmargin]⟩ · rintro ⟨PF, hPF, rfl⟩ exact ⟨PF.observedMargin, hPF.observedModel, rfl⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFrontierCriteria_eq_of_surjective · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityCriteriaTransport.lean:17
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ContinuityExpectedLength 3 declarations This file bounds the expected length of the two-block Hoeffding interval by its deterministic root-block radii and the polynomial threshold-mass envelope.

Expected length of the continuity-only interval

This file bounds the expected length of the two-block Hoeffding interval by its deterministic root-block radii and the polynomial threshold-mass envelope.

theorem contHoeffdingInterval_length_le_radius

The continuity-only interval has length at most twice its displayed radius, before intersection with the outcome range. This is the stated conclusion.

Formal statement
J n :
B :
delta alpha :
z :
Fin n → ClampObs J
≤ 2 * (sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (∑ x : Fin J, atomEstimate B z x delta) / 2)
Proof (Lean source)
lemma contHoeffdingInterval_length_le_radius {J n : ℕ} (B : SplitBlocks n) (delta alpha : ℝ) (z : Fin n → ClampObs J) : intervalLength (contHoeffdingInterval B z delta alpha) ≤ 2 * (sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (∑ x : Fin J, atomEstimate B z x delta) / 2) := by let radius := sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (∑ x : Fin J, atomEstimate B z x delta) / 2 have hrad : 0 ≤ radius := by dsimp [radius] have hatom : 0 ≤ ∑ x : Fin J, atomEstimate B z x delta := sum_nonneg fun x _ => (atomEstimate_mem_Icc B z x delta).1 positivity have hcI := clampUnit_mem_Icc (retainedEstimate B z delta + (1 / 2 : ℝ) * ∑ x : Fin J, atomEstimate B z x delta) have hord : max 0 (contFallbackEstimator B z delta - radius) ≤ min 1 (contFallbackEstimator B z delta + radius) := by apply le_min · exact max_le (by norm_num) (by unfold contFallbackEstimator linarith [hcI.2]) · exact max_le (by unfold contFallbackEstimator linarith [hcI.1]) (by linarith) simp only [contHoeffdingInterval, intervalLength] rw [csSup_Icc hord, csInf_Icc hord] apply max_le · positivity · have hhi := min_le_right (1 : ℝ) (contFallbackEstimator B z delta + radius) have hlo := le_max_right (0 : ℝ) (contFallbackEstimator B z delta - radius) dsimp [radius] at * linarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.contHoeffdingInterval_length_le_radius · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityExpectedLength.lean:22
theorem contHoeffdingInterval_integral_length_le

Under a continuity-only model, the real expected interval length is bounded by the two deterministic Hoeffding radii, the atom-estimation noise, and the polynomial threshold-mass envelope. The result uses the hP condition, the hreg condition, the hdelta condition, the hcard1 condition. This is the stated conclusion.

Formal statement
J n :
P :
B :
kappa cminus cplus pmin deltaBar delta alpha :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hcard1 :
0 < B.I1.card
(∫ z, intervalLength (contHoeffdingInterval B z delta alpha) ∂iidProduct P n)
≤ 2 * sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ)))
+ 2 * sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ)))
+ (J : ℝ) * ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + cplus * delta ^ (kappa + 1) / (kappa + 1))
Proof (Lean source)
lemma contHoeffdingInterval_integral_length_le {J n : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (kappa cminus cplus pmin deltaBar delta alpha : ℝ) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hcard1 : 0 < B.I1.card) : (∫ z, intervalLength (contHoeffdingInterval B z delta alpha) ∂iidProduct P n) ≤ 2 * sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + 2 * sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (J : ℝ) * ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + cplus * delta ^ (kappa + 1) / (kappa + 1)) := by letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance let f := fun z : Fin n → ClampObs J => intervalLength (contHoeffdingInterval B z delta alpha) let atomTotal := fun z : Fin n → ClampObs J => ∑ x : Fin J, atomEstimate B z x delta let t0 := sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) let t1 := sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) let env := cplus * delta ^ (kappa + 1) / (kappa + 1) have hatomMeas : Measurable atomTotal := Finset.measurable_fun_sum _ fun x _ => atomEstimate_measurable B x delta have hatomInt : Integrable atomTotal (iidProduct P n) := by refine Integrable.of_bound hatomMeas.aestronglyMeasurable J ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg] · exact (Finset.sum_le_sum fun x _ => (atomEstimate_mem_Icc B z x delta).2).trans_eq (by simp) · exact sum_nonneg fun x _ => (atomEstimate_mem_Icc B z x delta).1 have hlenMeas : Measurable f := by let center := fun z : Fin n → ClampObs J => contFallbackEstimator B z delta let radius := fun z : Fin n → ClampObs J => t0 + t1 + atomTotal z / 2 let lo := fun z => max 0 (center z - radius z) let hi := fun z => min 1 (center z + radius z) have hc : Measurable center := by dsimp [center] exact clampUnit_measurable'.comp ((retainedEstimate_measurable B delta).add (measurable_const.mul hatomMeas)) have hr : Measurable radius := (measurable_const.add measurable_const).add (hatomMeas.div_const 2) have hlo : Measurable lo := measurable_const.max (hc.sub hr) have hhi : Measurable hi := measurable_const.min (hc.add hr) have hord : ∀ z, lo z ≤ hi z := by intro z have hrad : 0 ≤ radius z := by dsimp [radius, atomTotal] have ha : 0 ≤ ∑ x : Fin J, atomEstimate B z x delta := sum_nonneg fun x _ => (atomEstimate_mem_Icc B z x delta).1 positivity have hcI := clampUnit_mem_Icc (retainedEstimate B z delta + (1 / 2 : ℝ) * ∑ x : Fin J, atomEstimate B z x delta) apply le_min · exact max_le (by norm_num) (by dsimp [lo, hi, center] unfold contFallbackEstimator linarith [hcI.2]) · exact max_le (by dsimp [lo, hi, center] unfold contFallbackEstimator linarith [hcI.1]) (by dsimp [lo, hi, center] linarith) have heq : f = fun z => max 0 (hi z - lo z) := by funext z dsimp [f, lo, hi, center, radius, t0, t1, atomTotal] simp only [contHoeffdingInterval, intervalLength] rw [csSup_Icc (hord z), csInf_Icc (hord z)] rw [heq] exact measurable_const.max (hhi.sub hlo) have hlenInt : Integrable f (iidProduct P n) := by refine Integrable.of_bound hlenMeas.aestronglyMeasurable 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (le_max_left _ _)] let radius := t0 + t1 + atomTotal z / 2 have hrad : 0 ≤ radius := by dsimp [radius, atomTotal, t0, t1] have ha : 0 ≤ ∑ x : Fin J, atomEstimate B z x delta := sum_nonneg fun x _ => (atomEstimate_mem_Icc B z x delta).1 positivity have hcI := clampUnit_mem_Icc (retainedEstimate B z delta + (1 / 2 : ℝ) * ∑ x : Fin J, atomEstimate B z x delta) have hord : max 0 (contFallbackEstimator B z delta - radius) ≤ min 1 (contFallbackEstimator B z delta + radius) := by apply le_min · exact max_le (by norm_num) (by unfold contFallbackEstimator linarith [hcI.2]) · exact max_le (by unfold contFallbackEstimator linarith [hcI.1]) (by linarith) dsimp [f, radius, t0, t1, atomTotal] simp only [contHoeffdingInterval, intervalLength] rw [csSup_Icc hord, csInf_Icc hord] apply max_le · norm_num · have hhi' := min_le_left (1 : ℝ) (contFallbackEstimator B z delta + (sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (∑ x : Fin J, atomEstimate B z x delta) / 2)) have hlo' := le_max_left (0 : ℝ) (contFallbackEstimator B z delta - (sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (∑ x : Fin J, atomEstimate B z x delta) / 2)) linarith have hatomIntLe : (∫ z, atomTotal z ∂iidProduct P n) ≤ (J : ℝ) * ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + env) := by rw [integral_finsetSum] · calc (∑ x : Fin J, ∫ z, atomEstimate B z x delta ∂iidProduct P n) ≤ ∑ _x : Fin J, ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + env) := by apply Finset.sum_le_sum intro x hx let coeff := P.px x * atomMass P x delta have hax : Integrable (fun z : Fin n → ClampObs J => atomEstimate B z x delta) (iidProduct P n) := by refine Integrable.of_bound (atomEstimate_measurable B x delta).aestronglyMeasurable 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (atomEstimate_mem_Icc B z x delta).1] exact (atomEstimate_mem_Icc B z x delta).2 have habs : |∫ z, atomEstimate B z x delta - coeff ∂iidProduct P n| ≤ (1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ := by calc _ ≤ ∫ z, |atomEstimate B z x delta - coeff| ∂iidProduct P n := abs_integral_le_integral_abs _ ≤ _ := cont_atomEstimate_l1_le P hP B hcard1 x hdelta.1 (hdelta.2.trans hreg.2.2.2.2.2.2.2.2.le) have hcoeff := (cont_atomCoefficient_nonneg_le_envelope P hP hreg x hdelta).2 have hintconst : (∫ _z : Fin n → ClampObs J, coeff ∂iidProduct P n) = coeff := by simp have hrewrite : (∫ z, atomEstimate B z x delta - coeff ∂iidProduct P n) = (∫ z, atomEstimate B z x delta ∂iidProduct P n) - coeff := by rw [integral_sub hax (integrable_const coeff), hintconst] rw [hrewrite] at habs dsimp [env, coeff] linarith [le_abs_self ((∫ z, atomEstimate B z x delta ∂iidProduct P n) - coeff)] _ = (J : ℝ) * ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + env) := by simp ring · intro x hx refine Integrable.of_bound (atomEstimate_measurable B x delta).aestronglyMeasurable 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (atomEstimate_mem_Icc B z x delta).1] exact (atomEstimate_mem_Icc B z x delta).2 have hpoint : ∀ z, f z ≤ 2 * t0 + 2 * t1 + atomTotal z := by intro z dsimp [f, t0, t1, atomTotal] convert contHoeffdingInterval_length_le_radius B delta alpha z using 1 <;> ring have hrhsInt : Integrable (fun z => 2 * t0 + 2 * t1 + atomTotal z) (iidProduct P n) := (integrable_const _).add hatomInt calc (∫ z, f z ∂iidProduct P n) ≤ ∫ z, (2 * t0 + 2 * t1 + atomTotal z) ∂iidProduct P n := integral_mono_ae hlenInt hrhsInt (ae_of_all _ hpoint) _ = 2 * t0 + 2 * t1 + ∫ z, atomTotal z ∂iidProduct P n := by rw [integral_add (integrable_const _) hatomInt, integral_const] simp _ ≤ 2 * t0 + 2 * t1 + (J : ℝ) * ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + env) := by linarith [hatomIntLe] _ = _ := rfl
CausalSmith.Stat.LmtpThresholdAtomFrontier.contHoeffdingInterval_integral_length_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityExpectedLength.lean:63
theorem contHoeffdingInterval_lintegral_length_le

The real expected-length bound upgrades to the extended-real convention used by the continuity-only minimax criterion. The result uses the hP condition, the hreg condition, the hdelta condition, the hcard1 condition. This is the stated conclusion.

Formal statement
J n :
P :
B :
kappa cminus cplus pmin deltaBar delta alpha :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hcard1 :
0 < B.I1.card
(∫⁻ z, intervalLengthENNReal (contHoeffdingInterval B z delta alpha) ∂iidProduct P n)
ofReal (2 * sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + 2 * sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (J : ℝ) * ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + cplus * delta ^ (kappa + 1) / (kappa + 1)))
Proof (Lean source)
lemma contHoeffdingInterval_lintegral_length_le {J n : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (kappa cminus cplus pmin deltaBar delta alpha : ℝ) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hcard1 : 0 < B.I1.card) : (∫⁻ z, intervalLengthENNReal (contHoeffdingInterval B z delta alpha) ∂iidProduct P n) ≤ ofReal (2 * sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + 2 * sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (J : ℝ) * ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + cplus * delta ^ (kappa + 1) / (kappa + 1))) := by letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance let f := fun z : Fin n → ClampObs J => intervalLength (contHoeffdingInterval B z delta alpha) have hfmeas : Measurable f := by let center := fun z : Fin n → ClampObs J => contFallbackEstimator B z delta let radius := fun z : Fin n → ClampObs J => sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (∑ x : Fin J, atomEstimate B z x delta) / 2 let lo := fun z => max 0 (center z - radius z) let hi := fun z => min 1 (center z + radius z) have hc : Measurable center := by dsimp [center] exact clampUnit_measurable'.comp ((retainedEstimate_measurable B delta).add (measurable_const.mul (Finset.measurable_fun_sum _ fun x _ => atomEstimate_measurable B x delta))) have hr : Measurable radius := (measurable_const.add measurable_const).add ((Finset.measurable_fun_sum _ fun x _ => atomEstimate_measurable B x delta).div_const 2) have hlo : Measurable lo := measurable_const.max (hc.sub hr) have hhi : Measurable hi := measurable_const.min (hc.add hr) have hord : ∀ z, lo z ≤ hi z := by intro z have hrad : 0 ≤ radius z := by dsimp [radius] have ha : 0 ≤ ∑ x : Fin J, atomEstimate B z x delta := sum_nonneg fun x _ => (atomEstimate_mem_Icc B z x delta).1 positivity have hcI := clampUnit_mem_Icc (retainedEstimate B z delta + (1 / 2 : ℝ) * ∑ x : Fin J, atomEstimate B z x delta) apply le_min · exact max_le (by norm_num) (by dsimp [lo, hi, center] unfold contFallbackEstimator linarith [hcI.2]) · exact max_le (by dsimp [lo, hi, center] unfold contFallbackEstimator linarith [hcI.1]) (by dsimp [lo, hi, center] linarith) have heq : f = fun z => max 0 (hi z - lo z) := by funext z dsimp [f, lo, hi, center, radius] simp only [contHoeffdingInterval, intervalLength] rw [csSup_Icc (hord z), csInf_Icc (hord z)] rw [heq] exact measurable_const.max (hhi.sub hlo) have hfint : Integrable f (iidProduct P n) := by refine Integrable.of_bound hfmeas.aestronglyMeasurable 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (le_max_left _ _)] let radius := sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (∑ x : Fin J, atomEstimate B z x delta) / 2 have hrad : 0 ≤ radius := by dsimp [radius] have ha : 0 ≤ ∑ x : Fin J, atomEstimate B z x delta := sum_nonneg fun x _ => (atomEstimate_mem_Icc B z x delta).1 positivity have hcI := clampUnit_mem_Icc (retainedEstimate B z delta + (1 / 2 : ℝ) * ∑ x : Fin J, atomEstimate B z x delta) have hord : max 0 (contFallbackEstimator B z delta - radius) ≤ min 1 (contFallbackEstimator B z delta + radius) := by apply le_min · exact max_le (by norm_num) (by unfold contFallbackEstimator linarith [hcI.2]) · exact max_le (by unfold contFallbackEstimator linarith [hcI.1]) (by linarith) dsimp [f, radius] simp only [contHoeffdingInterval, intervalLength] rw [csSup_Icc hord, csInf_Icc hord] apply max_le · norm_num · have hhi := min_le_left (1 : ℝ) (contFallbackEstimator B z delta + (sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (∑ x : Fin J, atomEstimate B z x delta) / 2)) have hlo := le_max_left (0 : ℝ) (contFallbackEstimator B z delta - (sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (∑ x : Fin J, atomEstimate B z x delta) / 2)) linarith have hfnn : 0 ≤ᵐ[iidProduct P n] f := ae_of_all _ fun z => le_max_left (0 : ℝ) (sSup (contHoeffdingInterval B z delta alpha) - sInf (contHoeffdingInterval B z delta alpha)) simp_rw [intervalLengthENNReal] rw [← ofReal_integral_eq_lintegral_ofReal hfint hfnn] exact ENNReal.ofReal_le_ofReal (contHoeffdingInterval_integral_length_le P B kappa cminus cplus pmin deltaBar delta alpha hP hreg hdelta hcard1)
CausalSmith.Stat.LmtpThresholdAtomFrontier.contHoeffdingInterval_lintegral_length_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityExpectedLength.lean:244
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ContinuityLengthLower 5 declarations Two-point lower bounds for continuity-only honest confidence length

Two-point lower bounds for continuity-only honest confidence length

theorem contMinimaxLength_lower_of_two_point

A close pair in the continuity-only model lower-bounds minimax honest expected interval length. The result uses the hP0 condition, the hP1 condition, the hgap condition, the hsep condition, the hac condition, the hint condition. This is the stated conclusion.

Formal statement
J :
shared
P0 P1 :
n :
kappa cminus cplus pmin deltaBar delta alpha gap :
hP0 :
ContClampModel P0 kappa cminus cplus pmin deltaBar
hP1 :
ContClampModel P1 kappa cminus cplus pmin deltaBar
hgap :
0 ≤ gap
hsep :
gap
≤ |contClampFunctional P1 kappa cminus cplus pmin deltaBar hP1 delta
- contClampFunctional P0 kappa cminus cplus pmin deltaBar hP0 delta|
hac :
iidProduct P1 n ≪ iidProduct P0 n
hint :
Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)
ofReal ((1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) * gap)
≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha).2.1
Proof (Lean source)
lemma contMinimaxLength_lower_of_two_point (P0 P1 : ClampLaw J) (n : ℕ) (kappa cminus cplus pmin deltaBar delta alpha gap : ℝ) (hP0 : ContClampModel P0 kappa cminus cplus pmin deltaBar) (hP1 : ContClampModel P1 kappa cminus cplus pmin deltaBar) (hgap : 0 ≤ gap) (hsep : gap ≤ |contClampFunctional P1 kappa cminus cplus pmin deltaBar hP1 delta - contClampFunctional P0 kappa cminus cplus pmin deltaBar hP0 delta|) (hac : iidProduct P1 n ≪ iidProduct P0 n) (hint : Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)) : ofReal ((1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) * gap) ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha).2.1 := by let theta0 := contClampFunctional P0 kappa cminus cplus pmin deltaBar hP0 delta let theta1 := contClampFunctional P1 kappa cminus cplus pmin deltaBar hP1 delta let outer : Set ℝ≥0∞ := {r : ℝ≥0∞ | ∃ C : ConfidenceProcedure n J, ObservedMeasurableInterval C ∧ (∀ (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar), 1 - alpha ≤ (iidProduct P n).real {z | contClampFunctional P kappa cminus cplus pmin deltaBar hP delta ∈ C z}) ∧ r = sSup {v : ℝ≥0∞ | ∃ (P : ClampLaw J) (_hP : ContClampModel P kappa cminus cplus pmin deltaBar), v = ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct P n}} change _ ≤ sInf outer apply le_sInf intro r hr rcases hr with ⟨C, ⟨lo, hi, hlo, hhi, hord, hC⟩, hcover, rfl⟩ let A : Set (Fin n → ClampObs J) := {z | theta0 ∈ C z} let B : Set (Fin n → ClampObs J) := {z | theta1 ∈ C z} have hA : MeasurableSet A := by simp only [A, hC, mem_Icc] exact ((measurableSet_le hlo measurable_const).inter (measurableSet_le measurable_const hhi)) have hB : MeasurableSet B := by simp only [B, hC, mem_Icc] exact ((measurableSet_le hlo measurable_const).inter (measurableSet_le measurable_const hhi)) letI : IsProbabilityMeasure P0.dataMeasure := hP0.probability letI : IsProbabilityMeasure P1.dataMeasure := hP1.probability letI : IsProbabilityMeasure (iidProduct P0 n) := by unfold iidProduct; infer_instance letI : IsProbabilityMeasure (iidProduct P1 n) := by unfold iidProduct; infer_instance have hcov0 : 1 - alpha ≤ (iidProduct P0 n).real A := by simpa [A, theta0] using hcover P0 hP0 have hcov1 : 1 - alpha ≤ (iidProduct P1 n).real B := by simpa [B, theta1] using hcover P1 hP1 have htv : tvDist (iidProduct P1 n) (iidProduct P0 n) ≤ (1 / 2) * sqrt (productChiSq P1 P0 n) := by simpa [productChiSq] using tvDist_le_half_sqrt_chiSqDiv (iidProduct P1 n) (iidProduct P0 n) hac hint have hcov1_at0 : 1 - alpha - (1 / 2) * sqrt (productChiSq P1 P0 n) ≤ (iidProduct P0 n).real B := by have hmove := measureReal_sub_le_tvDist (μ := iidProduct P0 n) (ν := iidProduct P1 n) hB rw [tvDist_symm] at hmove linarith have hinter : 1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n) ≤ (iidProduct P0 n).real (A ∩ B) := by have hunion := measureReal_union_add_inter (μ := iidProduct P0 n) (s := A) (t := B) hB (measure_ne_top _ _) (measure_ne_top _ _) have hunionle : (iidProduct P0 n).real (A ∪ B) ≤ 1 := ENNReal.toReal_mono ENNReal.one_ne_top prob_le_one linarith have hpoint (z : Fin n → ClampObs J) : (A ∩ B).indicator (fun _ => ofReal gap) z ≤ intervalLengthENNReal (C z) := by by_cases hz : z ∈ A ∩ B · rw [Set.indicator_of_mem hz] apply ENNReal.ofReal_le_ofReal rw [hC z] simp only [intervalLength, csSup_Icc (hord z), csInf_Icc (hord z)] rcases hz with ⟨hz0, hz1⟩ have hz0' : lo z ≤ theta0 ∧ theta0 ≤ hi z := by simpa [A, theta0, hC z] using hz0 have hz1' : lo z ≤ theta1 ∧ theta1 ≤ hi z := by simpa [B, theta1, hC z] using hz1 rcases hz0' with ⟨hlo0, hhi0⟩ rcases hz1' with ⟨hlo1, hhi1⟩ have habs : |contClampFunctional P1 kappa cminus cplus pmin deltaBar hP1 delta - contClampFunctional P0 kappa cminus cplus pmin deltaBar hP0 delta| ≤ hi z - lo z := by rw [abs_le] constructor <;> linarith exact (hsep.trans habs).trans (le_max_right _ _) · simp [hz, intervalLengthENNReal] have hlen : ofReal gap * (iidProduct P0 n) (A ∩ B) ≤ ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct P0 n := by calc _ = ∫⁻ z, (A ∩ B).indicator (fun _ => ofReal gap) z ∂iidProduct P0 n := by rw [lintegral_indicator (hA.inter hB), lintegral_const] simp _ ≤ _ := lintegral_mono hpoint have hreal : ofReal (1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) ≤ (iidProduct P0 n) (A ∩ B) := by rw [← ENNReal.ofReal_toReal (measure_ne_top _ _)] exact ENNReal.ofReal_le_ofReal hinter have htarget : ofReal ((1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) * gap) ≤ ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct P0 n := by rw [mul_comm, ENNReal.ofReal_mul hgap] exact (mul_le_mul le_rfl hreal bot_le bot_le).trans hlen apply htarget.trans exact le_sSup ⟨P0, hP0, rfl⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.contMinimaxLength_lower_of_two_point · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityLengthLower.lean:20
theorem contMinimaxLength_lower_of_two_point_chi

A numerical upper bound on the product chi-square divergence gives a corresponding explicit honest-length lower bound. The result uses the hP0 condition, the hP1 condition, the hgap condition, the hsep condition, the hac condition, the hint condition, the hchi0 condition, the hchi condition. This is the stated conclusion.

Formal statement
J :
shared
P0 P1 :
n :
kappa cminus cplus pmin deltaBar delta alpha gap chi :
hP0 :
ContClampModel P0 kappa cminus cplus pmin deltaBar
hP1 :
ContClampModel P1 kappa cminus cplus pmin deltaBar
hgap :
0 ≤ gap
hsep :
gap
≤ |contClampFunctional P1 kappa cminus cplus pmin deltaBar hP1 delta
- contClampFunctional P0 kappa cminus cplus pmin deltaBar hP0 delta|
hac :
iidProduct P1 n ≪ iidProduct P0 n
hint :
Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)
hchi0 :
0 ≤ chi
hchi :
productChiSq P1 P0 n ≤ chi
ofReal ((1 - 2 * alpha - (1 / 2) * sqrt chi) * gap)
≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha).2.1
Proof (Lean source)
lemma contMinimaxLength_lower_of_two_point_chi (P0 P1 : ClampLaw J) (n : ℕ) (kappa cminus cplus pmin deltaBar delta alpha gap chi : ℝ) (hP0 : ContClampModel P0 kappa cminus cplus pmin deltaBar) (hP1 : ContClampModel P1 kappa cminus cplus pmin deltaBar) (hgap : 0 ≤ gap) (hsep : gap ≤ |contClampFunctional P1 kappa cminus cplus pmin deltaBar hP1 delta - contClampFunctional P0 kappa cminus cplus pmin deltaBar hP0 delta|) (hac : iidProduct P1 n ≪ iidProduct P0 n) (hint : Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)) (hchi0 : 0 ≤ chi) (hchi : productChiSq P1 P0 n ≤ chi) : ofReal ((1 - 2 * alpha - (1 / 2) * sqrt chi) * gap) ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha).2.1 := by have hsqrt := Real.sqrt_le_sqrt hchi have hreal : (1 - 2 * alpha - (1 / 2) * sqrt chi) * gap ≤ (1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) * gap := mul_le_mul_of_nonneg_right (by linarith) hgap exact (ENNReal.ofReal_le_ofReal hreal).trans (contMinimaxLength_lower_of_two_point P0 P1 n kappa cminus cplus pmin deltaBar delta alpha gap hP0 hP1 hgap hsep hac hint)
CausalSmith.Stat.LmtpThresholdAtomFrontier.contMinimaxLength_lower_of_two_point_chi · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityLengthLower.lean:135
theorem contMinimaxLength_eventually_ge_root

The continuity-only minimax honest length has the regular root-sample-size lower bound, uniformly over threshold sequences. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, ofReal (c * (n : ℝ) ^ (-(1 : ℝ) / 2))
≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1
Proof (Lean source)
lemma contMinimaxLength_eventually_ge_root (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, ofReal (c * (n : ℝ) ^ (-(1 : ℝ) / 2)) ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1 := by let eta : ℝ := 1 - 2 * alpha let tau : ℝ := eta / 16 let chi : ℝ := eta ^ 2 / 16 let floor : ℝ := eta - (1 / 2) * Real.sqrt chi let c : ℝ := floor * tau have heta : 0 < eta := by dsimp [eta]; linarith [hreg.2.2] have heta1 : eta < 1 := by dsimp [eta]; linarith [hreg.2.1] have htau : 0 < tau := div_pos heta (by norm_num) have hchi0 : 0 ≤ chi := by dsimp [chi]; positivity have hsqrt : Real.sqrt chi = eta / 4 := by rw [show chi = (eta / 4) ^ 2 by dsimp [chi]; ring, Real.sqrt_sq_eq_abs, abs_of_pos (div_pos heta (by norm_num))] have hfloor : 0 < floor := by dsimp [floor]; rw [hsqrt]; linarith refine ⟨c, by dsimp [c]; positivity, ?_⟩ intro deltaSeq hdelta filter_upwards [Filter.eventually_ge_atTop 1] with n hn have hnpos : 0 < n := by omega have hnR : 0 < (n : ℝ) := by exact_mod_cast hnpos let root : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) let eps : ℝ := tau * root have hroot : 0 < root := Real.rpow_pos_of_pos hnR _ have heps : 0 < eps := mul_pos htau hroot have heta_le : eta ≤ 1 := heta1.le have hroot1 : root ≤ 1 := by rw [show (1 : ℝ) = 1 ^ (-(1 : ℝ) / 2) by norm_num] exact Real.rpow_le_rpow_of_nonpos (by norm_num) (by exact_mod_cast hn) (by norm_num) have heps_le : eps ≤ 1 / 4 := by dsimp [eps, tau] nlinarith have hepsb : |eps| ≤ 1 / 2 := by rw [abs_of_pos heps]; linarith have hepss : |eps| < 1 / 2 := by rw [abs_of_pos heps]; linarith let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let P1 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps) have hw := continuityConstant_twoPoint J n kappa cminus cplus pmin deltaBar (deltaSeq n) eps hreg.1 (hdelta n) heps.le heps_le rcases hw with ⟨hP0, hP1, hsepEq, hchiExp⟩ have hrootSq : root ^ 2 = (n : ℝ)⁻¹ := by dsimp [root] rw [← Real.rpow_natCast, ← Real.rpow_mul hnR.le] norm_num rw [Real.rpow_neg_one] have hepsSq : eps ^ 2 = tau ^ 2 * (n : ℝ)⁻¹ := by dsimp [eps] rw [mul_pow, hrootSq] have hnE : (n : ℝ) * (4 * eps ^ 2) = eta ^ 2 / 64 := by rw [hepsSq] dsimp [tau] field_simp [hnR.ne'] ring have hxabs : |eta ^ 2 / 64| ≤ 1 := by rw [abs_of_nonneg (by positivity)] nlinarith [sq_nonneg eta] have hexp : exp (eta ^ 2 / 64) ≤ 1 + eta ^ 2 / 64 + (eta ^ 2 / 64) ^ 2 := Causalean.Stat.Concentration.exp_le_one_add_add_sq hxabs have hpoly : eta ^ 2 / 64 + (eta ^ 2 / 64) ^ 2 ≤ chi := by dsimp [chi] have heta_sq : eta ^ 2 ≤ 1 := by nlinarith [sq_nonneg eta] nlinarith [sq_nonneg (eta ^ 2 / 64)] have hchi : productChiSq P1 P0 n ≤ chi := by rw [hnE] at hchiExp linarith have hac1 := minimaxDataMeasure_ac_center J kappa hreg.1.1 hreg.1.2.1 (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepss) have hint1 := minimaxDataMeasure_sq_integrable_center J kappa hreg.1.1 hreg.1.2.1 (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepss) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps)) := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1.1 hreg.1.2.1 _ measurable_const (fun _ => hepsb) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1.1 hreg.1.2.1 _ measurable_const (fun _ => by norm_num) have hac := pi_iid_absolutelyContinuous _ _ hac1 n have hint := pi_iid_integrable_sq_dev _ _ hac1 hint1 n have hlower := contMinimaxLength_lower_of_two_point_chi P0 P1 n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha eps chi hP0 hP1 heps.le (by simpa [P0, P1] using hsepEq.le) (by simpa [P0, P1, iidProduct, minimaxClampLaw] using hac) (by simpa [P0, P1, iidProduct, minimaxClampLaw] using hint) hchi0 hchi dsimp [c, floor, eps, tau, root, eta] at hlower ⊢ simpa [mul_assoc] using hlower
CausalSmith.Stat.LmtpThresholdAtomFrontier.contMinimaxLength_eventually_ge_root · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityLengthLower.lean:161
theorem contMinimaxLength_eventually_ge_atom

Narrow continuous bumps give an atom-scale lower bound for continuity-only minimax honest length. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, ofReal (c * (deltaSeq n) ^ (kappa + 1))
≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1
Proof (Lean source)
lemma contMinimaxLength_eventually_ge_atom (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, ofReal (c * (deltaSeq n) ^ (kappa + 1)) ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1 := by let eta : ℝ := 1 - 2 * alpha let amplitude : ℝ := 1 / 4 let chi : ℝ := eta ^ 2 / 16 let floor : ℝ := eta - (1 / 2) * Real.sqrt chi let c : ℝ := floor * amplitude have heta : 0 < eta := by dsimp [eta]; linarith [hreg.2.2] have heta1 : eta < 1 := by dsimp [eta]; linarith [hreg.2.1] have hchi0 : 0 ≤ chi := by dsimp [chi]; positivity have hsqrt : Real.sqrt chi = eta / 4 := by rw [show chi = (eta / 4) ^ 2 by dsimp [chi]; ring, Real.sqrt_sq_eq_abs, abs_of_pos (div_pos heta (by norm_num))] have hfloor : 0 < floor := by dsimp [floor]; rw [hsqrt]; linarith refine ⟨c, by dsimp [c, amplitude]; positivity, ?_⟩ intro deltaSeq hdelta filter_upwards [Filter.eventually_ge_atTop 1] with n hn have hnpos : 0 < n := by omega have hnR : 0 < (n : ℝ) := by exact_mod_cast hnpos let A : ℝ := 8 * (kappa + 1) * amplitude ^ 2 * (deltaBar + 1) ^ kappa let K : ℝ := eta ^ 2 + 64 * A let h : ℝ := eta ^ 2 / (K * (n : ℝ)) have hk1 : 0 ≤ kappa + 1 := by linarith [hreg.1.2.1] have hd1 : 0 ≤ deltaBar + 1 := by linarith [hreg.1.2.2.2.2.2.2.2.1] have hA : 0 ≤ A := by dsimp [A, amplitude] exact mul_nonneg (mul_nonneg (mul_nonneg (by norm_num) hk1) (sq_nonneg _)) (Real.rpow_nonneg hd1 _) have hK : 0 < K := by dsimp [K]; positivity have hh : 0 < h := by dsimp [h]; positivity have hh1 : h ≤ 1 := by rw [div_le_one (mul_pos hK hnR)] have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast hn dsimp [K] nlinarith [sq_nonneg eta] have hdh : deltaSeq n + h ≤ deltaBar + 1 := by linarith [(hdelta n).2] have hpow : (deltaSeq n + h) ^ kappa ≤ (deltaBar + 1) ^ kappa := Real.rpow_le_rpow (add_nonneg (hdelta n).1 hh.le) hdh hreg.1.2.1 have hcoef : 0 ≤ 8 * (kappa + 1) * amplitude ^ 2 * h := by exact mul_nonneg (mul_nonneg (mul_nonneg (by norm_num) hk1) (sq_nonneg _)) hh.le have hcore : (n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * h * (deltaBar + 1) ^ kappa) = A * eta ^ 2 / K := by dsimp [h, A] field_simp [hK.ne', hnR.ne'] have hfrac : A * eta ^ 2 / K ≤ eta ^ 2 / 64 := by rw [div_le_iff₀ hK] dsimp [K] nlinarith [sq_nonneg eta] have hexponent : (n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * h * (deltaSeq n + h) ^ kappa) ≤ eta ^ 2 / 64 := by calc _ ≤ (n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * h * (deltaBar + 1) ^ kappa) := by gcongr _ = A * eta ^ 2 / K := hcore _ ≤ _ := hfrac have hw := continuityBump_twoPoint J n kappa cminus cplus pmin deltaBar (deltaSeq n) h amplitude hreg.1 (hdelta n) hh (by norm_num [amplitude]) (by norm_num [amplitude]) let q := fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - deltaSeq n) / h) let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let P1 := minimaxClampLaw J kappa (fun p => q p.2) rcases hw with ⟨hP0, hP1, hsep, hchiExp⟩ have hxabs : |eta ^ 2 / 64| ≤ 1 := by rw [abs_of_nonneg (by positivity)] nlinarith [sq_nonneg eta] have hexp : exp (eta ^ 2 / 64) ≤ 1 + eta ^ 2 / 64 + (eta ^ 2 / 64) ^ 2 := Causalean.Stat.Concentration.exp_le_one_add_add_sq hxabs have hpoly : eta ^ 2 / 64 + (eta ^ 2 / 64) ^ 2 ≤ chi := by dsimp [chi] have heta_sq : eta ^ 2 ≤ 1 := by nlinarith [sq_nonneg eta] nlinarith [sq_nonneg (eta ^ 2 / 64)] have hchi : productChiSq P1 P0 n ≤ chi := by have hbound := hchiExp.trans (Real.exp_le_exp.mpr hexponent) linarith have hqmeas : Measurable q := by dsimp [q]; fun_prop have hq0 (a : ℝ) : 0 ≤ q a := by exact mul_nonneg (by norm_num [amplitude]) (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqbound (a : ℝ) : |q a| ≤ 1 / 2 := by rw [abs_of_nonneg (hq0 a)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - deltaSeq n) / h) dsimp [q, amplitude] nlinarith have hqstrict (p : Fin J × ℝ) : |q p.2| < 1 / 2 := by rw [abs_of_nonneg (hq0 p.2)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((p.2 - deltaSeq n) / h) dsimp [q, amplitude] nlinarith have hac1 := minimaxDataMeasure_ac_center J kappa hreg.1.1 hreg.1.2.1 (fun p : Fin J × ℝ => q p.2) (hqmeas.comp measurable_snd) hqstrict have hint1 := minimaxDataMeasure_sq_integrable_center J kappa hreg.1.1 hreg.1.2.1 (fun p : Fin J × ℝ => q p.2) (hqmeas.comp measurable_snd) hqstrict letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun p : Fin J × ℝ => q p.2)) := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1.1 hreg.1.2.1 _ (hqmeas.comp measurable_snd) (fun p => hqbound p.2) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1.1 hreg.1.2.1 _ measurable_const (fun _ => by norm_num) have hac := pi_iid_absolutelyContinuous _ _ hac1 n have hint := pi_iid_integrable_sq_dev _ _ hac1 hint1 n have hlower := contMinimaxLength_lower_of_two_point_chi P0 P1 n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha (amplitude * (deltaSeq n) ^ (kappa + 1)) chi hP0 hP1 (mul_nonneg (by norm_num [amplitude]) (Real.rpow_nonneg (hdelta n).1 _)) hsep (by simpa [P0, P1, q, iidProduct, minimaxClampLaw] using hac) (by simpa [P0, P1, q, iidProduct, minimaxClampLaw] using hint) hchi0 hchi dsimp [c, floor, amplitude, eta] at hlower ⊢ simpa [mul_assoc] using hlower
CausalSmith.Stat.LmtpThresholdAtomFrontier.contMinimaxLength_eventually_ge_atom · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityLengthLower.lean:258
theorem contMinimaxLength_eventually_ge_frontier

The regular and atom experiments combine into the full continuity frontier lower bound for minimax honest expected length. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, ofReal (c * contFrontier n (deltaSeq n) kappa)
≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1
Proof (Lean source)
lemma contMinimaxLength_eventually_ge_frontier (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, ofReal (c * contFrontier n (deltaSeq n) kappa) ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1 := by obtain ⟨c0, hc0, h0⟩ := contMinimaxLength_eventually_ge_root J kappa cminus cplus pmin deltaBar alpha hreg obtain ⟨c1, hc1, h1⟩ := contMinimaxLength_eventually_ge_atom J kappa cminus cplus pmin deltaBar alpha hreg let c := min c0 c1 / 2 refine ⟨c, by dsimp [c]; positivity, ?_⟩ intro deltaSeq hdelta filter_upwards [h0 deltaSeq hdelta, h1 deltaSeq hdelta] with n hn0 hn1 let root : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) let atom : ℝ := (deltaSeq n) ^ (kappa + 1) have hroot : 0 ≤ root := Real.rpow_nonneg (Nat.cast_nonneg n) _ have hatom : 0 ≤ atom := Real.rpow_nonneg (hdelta n).1 _ by_cases hle : c0 * root ≤ c1 * atom · apply (ENNReal.ofReal_le_ofReal ?_).trans hn1 dsimp [c, contFrontier, root, atom] calc min c0 c1 / 2 * ((n : ℝ) ^ (-(1 : ℝ) / 2) + (deltaSeq n) ^ (kappa + 1)) = (min c0 c1 * (n : ℝ) ^ (-(1 : ℝ) / 2) + min c0 c1 * (deltaSeq n) ^ (kappa + 1)) / 2 := by ring _ ≤ (c0 * (n : ℝ) ^ (-(1 : ℝ) / 2) + c1 * (deltaSeq n) ^ (kappa + 1)) / 2 := by apply div_le_div_of_nonneg_right _ (by norm_num) exact add_le_add (mul_le_mul_of_nonneg_right (min_le_left _ _) hroot) (mul_le_mul_of_nonneg_right (min_le_right _ _) hatom) _ ≤ c1 * (deltaSeq n) ^ (kappa + 1) := by dsimp [root, atom] at hle linarith · apply (ENNReal.ofReal_le_ofReal ?_).trans hn0 have hle' : c1 * atom ≤ c0 * root := le_of_not_ge hle dsimp [c, contFrontier, root, atom] calc min c0 c1 / 2 * ((n : ℝ) ^ (-(1 : ℝ) / 2) + (deltaSeq n) ^ (kappa + 1)) = (min c0 c1 * (n : ℝ) ^ (-(1 : ℝ) / 2) + min c0 c1 * (deltaSeq n) ^ (kappa + 1)) / 2 := by ring _ ≤ (c0 * (n : ℝ) ^ (-(1 : ℝ) / 2) + c1 * (deltaSeq n) ^ (kappa + 1)) / 2 := by apply div_le_div_of_nonneg_right _ (by norm_num) exact add_le_add (mul_le_mul_of_nonneg_right (min_le_left _ _) hroot) (mul_le_mul_of_nonneg_right (min_le_right _ _) hatom) _ ≤ c0 * (n : ℝ) ^ (-(1 : ℝ) / 2) := by dsimp [root, atom] at hle' linarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.contMinimaxLength_eventually_ge_frontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityLengthLower.lean:385
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ContinuityProcedureBounds 11 declarations Finite-sample bounds for the continuity-only procedure

Finite-sample bounds for the continuity-only procedure

theorem blockAverage_hoeffding

Hoeffding's inequality for an empirical average over a deterministic block of the canonical finite-product sample. The result uses the hf condition, the hf01 condition, the ht condition. This is the stated conclusion.

Formal statement
_HoeffdingBoundedAverage_of_gate :
X :
n :
I :
f :
X → ℝ
hf :
hf01 :
∀ x, f x ∈ Icc (0 : ℝ) 1
t :
ht :
0 < t
(Measure.pi (fun _ : Fin n => P)).real {z | |blockAverage I z f - ∫ x, f x ∂P| > t}
≤ 2 * exp (-2 * (I.card : ℝ) * t ^ 2)
Proof (Lean source)
lemma blockAverage_hoeffding (_HoeffdingBoundedAverage_of_gate : HoeffdingBoundedAverage) {X : Type} [MeasurableSpace X] (P : Measure X) [IsProbabilityMeasure P] {n : ℕ} (I : Finset (Fin n)) (f : X → ℝ) (hf : Measurable f) (hf01 : ∀ x, f x ∈ Icc (0 : ℝ) 1) (t : ℝ) (ht : 0 < t) : (Measure.pi (fun _ : Fin n => P)).real {z | |blockAverage I z f - ∫ x, f x ∂P| > t} ≤ 2 * exp (-2 * (I.card : ℝ) * t ^ 2) := by classical by_cases hI : I.card = 0 · exact (measureReal_le_one (μ := Measure.pi fun _ : Fin n => P) (s := {z | |blockAverage I z f - ∫ x, f x ∂P| > t})).trans (by simp [hI]) let S := Causalean.Stat.iidSample_infinitePi P let sumFin : (Fin n → X) → ℝ := fun z => ∑ i ∈ I, f (z i) let sumInf : (ℕ → X) → ℝ := Causalean.Stat.Concentration.bernoulliCount S f I.card let A : Set ℝ := {y | |(I.card : ℝ)⁻¹ * y - ∫ x, f x ∂P| > t} have hA : MeasurableSet A := by exact measurableSet_lt measurable_const (((measurable_const.mul measurable_id).sub measurable_const).abs) have hsumFin : Measurable sumFin := by exact Finset.measurable_fun_sum I fun i _ => hf.comp (measurable_pi_apply i) have hsumInf : Measurable sumInf := by dsimp [sumInf] exact Finset.measurable_fun_sum _ fun i _ => hf.comp (S.meas i) have hlaw : (Measure.pi (fun _ : Fin n => P)).map sumFin = (Measure.infinitePi (fun _ : ℕ => P)).map sumInf := by calc _ = (Measure.pi (fun _ : Fin I.card => P)).map (fun z => ∑ j : Fin I.card, f (z j)) := block_count_law_eq P I f hf _ = _ := range_count_transport P I.card f hf have htail := hoeffding_abs_ge S hf (a := 0) (b := 1) (by norm_num) (ae_of_all _ hf01) I.card (Nat.pos_of_ne_zero hI) ht.le have hfinite : (Measure.pi (fun _ : Fin n => P)).real (sumFin ⁻¹' A) = ((Measure.pi (fun _ : Fin n => P)).map sumFin).real A := by simpa only [measureReal_def] using congrArg toReal (Measure.map_apply hsumFin hA).symm have hinf : (Measure.infinitePi (fun _ : ℕ => P)).real (sumInf ⁻¹' A) = ((Measure.infinitePi (fun _ : ℕ => P)).map sumInf).real A := by simpa only [measureReal_def] using congrArg toReal (Measure.map_apply hsumInf hA).symm have hle : (Measure.infinitePi (fun _ : ℕ => P)).real (sumInf ⁻¹' A) ≤ 2 * exp (-2 * (I.card : ℝ) * t ^ 2) := by refine (measureReal_mono (μ := Measure.infinitePi (fun _ : ℕ => P)) (s₁ := sumInf ⁻¹' A) (s₂ := {w | t ≤ |S.sampleMean f I.card w - ∫ x, f x ∂P|}) ?_).trans ?_ · intro w hw change t < |(I.card : ℝ)⁻¹ * sumInf w - ∫ x, f x ∂P| at hw change t ≤ |S.sampleMean f I.card w - ∫ x, f x ∂P| simpa [S, sumInf, sampleMean, Causalean.Stat.Concentration.bernoulliCount] using le_of_lt hw · simpa [S, sumInf, A, sampleMean] using htail calc (Measure.pi (fun _ : Fin n => P)).real {z | |blockAverage I z f - ∫ x, f x ∂P| > t} = (Measure.pi (fun _ : Fin n => P)).real (sumFin ⁻¹' A) := by rfl _ = ((Measure.pi (fun _ : Fin n => P)).map sumFin).real A := hfinite _ = ((Measure.infinitePi (fun _ : ℕ => P)).map sumInf).real A := by rw [hlaw] _ = (Measure.infinitePi (fun _ : ℕ => P)).real (sumInf ⁻¹' A) := hinf.symm _ ≤ _ := hle
CausalSmith.Stat.LmtpThresholdAtomFrontier.blockAverage_hoeffding · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:21
theorem cont_iidProduct_outcomeSupport

Outcome support lifts coordinatewise to the canonical finite product for a continuity-only model. The result uses the hP condition. This is the stated conclusion.

Formal statement
J n :
P :
kappa cminus cplus pmin deltaBar :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
∀ᵐ z ∂iidProduct P n, ∀ i : Fin n, (z i).Y ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma cont_iidProduct_outcomeSupport {J n : ℕ} (P : ClampLaw J) {kappa cminus cplus pmin deltaBar : ℝ} (hP : ContClampModel P kappa cminus cplus pmin deltaBar) : ∀ᵐ z ∂iidProduct P n, ∀ i : Fin n, (z i).Y ∈ Icc (0 : ℝ) 1 := by let _ := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance apply ae_all_iff.mpr intro i have hmap : (iidProduct P n).map (Function.eval i) = P.dataMeasure := by simpa [iidProduct] using (Measure.pi_map_eval (fun _ : Fin n => P.dataMeasure) i) have hs := hP.outcomeSupport rw [← hmap] at hs exact (ae_map_iff (μ := iidProduct P n) (f := Function.eval i) (p := fun o : ClampObs J => o.Y ∈ Icc (0 : ℝ) 1) (measurable_pi_apply i).aemeasurable (measurableSet_Icc.preimage clampOutcome_measurable)).mp hs
CausalSmith.Stat.LmtpThresholdAtomFrontier.cont_iidProduct_outcomeSupport · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:90
theorem cont_retainedEstimate_l1_le

The retained-block empirical mean has root-block-size absolute risk in the continuity-only model. The result uses the hP condition, the hcard condition. This is the stated conclusion.

Formal statement
J n :
P :
kappa cminus cplus pmin deltaBar delta :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
B :
hcard :
0 < B.I0.card
(∫ z, |retainedEstimate B z delta - retainedMean P delta| ∂iidProduct P n)
≤ (1 / 2 : ℝ) * sqrt (B.I0.card : ℝ)⁻¹
Proof (Lean source)
lemma cont_retainedEstimate_l1_le {J n : ℕ} (P : ClampLaw J) {kappa cminus cplus pmin deltaBar delta : ℝ} (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (B : SplitBlocks n) (hcard : 0 < B.I0.card) : (∫ z, |retainedEstimate B z delta - retainedMean P delta| ∂iidProduct P n) ≤ (1 / 2 : ℝ) * sqrt (B.I0.card : ℝ)⁻¹ := by let _ := hP.probability let f : ClampObs J → ℝ := fun o => if delta < o.A then clampUnit o.Y else 0 have hf : Measurable f := by exact Measurable.ite (measurableSet_lt measurable_const (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) (clampUnit_measurable'.comp clampOutcome_measurable) measurable_const have hf0 : ∀ o, 0 ≤ f o := by intro o; dsimp [f]; split_ifs · exact (clampUnit_mem_Icc o.Y).1 · norm_num have hf1 : ∀ o, f o ≤ 1 := by intro o; dsimp [f]; split_ifs · exact (clampUnit_mem_Icc o.Y).2 · norm_num have hm : ∫ o, f o ∂P.dataMeasure = retainedMean P delta := by calc _ = ∫ o, (if delta < o.A then o.Y else 0) ∂P.dataMeasure := by apply integral_congr_ae filter_upwards [hP.outcomeSupport] with o ho simp [f, clampUnit, ho.1, ho.2] _ = _ := by unfold retainedMean apply integral_congr_ae filter_upwards with o by_cases ha : delta < o.A <;> simp [indicator, ha] have heq : (∫ z, |retainedEstimate B z delta - retainedMean P delta| ∂iidProduct P n) = ∫ z, |blockAverage B.I0 z f - retainedMean P delta| ∂iidProduct P n := by apply integral_congr_ae filter_upwards [cont_iidProduct_outcomeSupport P hP] with z hz congr 2 unfold retainedEstimate blockAverage congr 1 apply Finset.sum_congr rfl intro i hi simp [f, clampUnit, (hz i).1, (hz i).2] rw [heq] exact blockAverage_l1_le P B.I0 hcard f hf hf0 hf1 (retainedMean P delta) hm
CausalSmith.Stat.LmtpThresholdAtomFrontier.cont_retainedEstimate_l1_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:112
theorem cont_atomEstimate_l1_le

A stratum-threshold empirical mass has root-block-size absolute risk in the continuity-only model. The result uses the hP condition, the hcard condition, the hdelta condition, the hdelta1 condition. This is the stated conclusion.

Formal statement
J n :
P :
kappa cminus cplus pmin deltaBar delta :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
B :
hcard :
0 < B.I1.card
x :
Fin J
hdelta :
0 ≤ delta
hdelta1 :
delta ≤ 1
(∫ z, |atomEstimate B z x delta - P.px x * atomMass P x delta| ∂iidProduct P n)
≤ (1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹
Proof (Lean source)
lemma cont_atomEstimate_l1_le {J n : ℕ} (P : ClampLaw J) {kappa cminus cplus pmin deltaBar delta : ℝ} (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (B : SplitBlocks n) (hcard : 0 < B.I1.card) (x : Fin J) (hdelta : 0 ≤ delta) (hdelta1 : delta ≤ 1) : (∫ z, |atomEstimate B z x delta - P.px x * atomMass P x delta| ∂iidProduct P n) ≤ (1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ := by let _ := hP.probability let f : ClampObs J → ℝ := fun o => if o.X = x ∧ o.A ≤ delta then 1 else 0 have hX : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) have hA : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) have hf : Measurable f := by exact Measurable.ite ((measurableSet_eq_fun hX measurable_const).inter (measurableSet_le hA measurable_const)) measurable_const measurable_const have hf0 : ∀ o, 0 ≤ f o := by intro o; dsimp [f]; split_ifs <;> norm_num have hf1 : ∀ o, f o ≤ 1 := by intro o; dsimp [f]; split_ifs <;> norm_num have hm : ∫ o, f o ∂P.dataMeasure = P.px x * atomMass P x delta := by have hset : MeasurableSet {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} := (measurableSet_eq_fun hX measurable_const).inter (measurableSet_Icc.preimage hA) calc _ = ∫ o, indicator {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} (fun _ => (1 : ℝ)) o ∂P.dataMeasure := by apply integral_congr_ae filter_upwards [hP.treatmentSupport] with o ho by_cases hx : o.X = x <;> by_cases ha : o.A ≤ delta <;> simp [f, indicator, hx, ha, ho.1] _ = P.dataMeasure.real {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} := by rw [integral_indicator hset] simp _ = _ := by rw [(hP.condDensity.2.2 x).2 (Icc 0 delta) measurableSet_Icc] · rfl · intro a ha exact ⟨ha.1, ha.2.trans hdelta1⟩ simpa [atomEstimate, f] using (blockAverage_l1_le P B.I1 hcard f hf hf0 hf1 (P.px x * atomMass P x delta) hm)
CausalSmith.Stat.LmtpThresholdAtomFrontier.cont_atomEstimate_l1_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:161
theorem cont_atomCoefficient_nonneg_le_envelope

The polynomial thinning envelope controls each population atom coefficient in the continuity-only model. The result uses the hP condition, the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
J :
P :
kappa cminus cplus pmin deltaBar delta :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
x :
Fin J
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
P.px x * atomMass P x delta ∈ Icc 0 (cplus * delta ^ (kappa + 1) / (kappa + 1))
Proof (Lean source)
lemma cont_atomCoefficient_nonneg_le_envelope {J : ℕ} (P : ClampLaw J) {kappa cminus cplus pmin deltaBar delta : ℝ} (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (x : Fin J) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : P.px x * atomMass P x delta ∈ Icc 0 (cplus * delta ^ (kappa + 1) / (kappa + 1)) := by rcases hreg with ⟨hJ, hkappa, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1⟩ have hdelta1 : delta ≤ 1 := hdelta.2.trans hdeltaBar1.le have hsubset : Icc (0 : ℝ) delta ⊆ Icc (0 : ℝ) 1 := fun _ ha => ⟨ha.1, ha.2.trans hdelta1⟩ have hpiInt : Integrable (P.pi x) (volume.restrict (Icc (0 : ℝ) 1)) := by apply IntegrableOn.of_bound measure_Icc_lt_top · exact (aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hP.condDensity.1 x)).aestronglyMeasurable · have hcplus0 : 0 ≤ cplus := by linarith filter_upwards [ae_restrict_mem measurableSet_Icc, hP.condDensity.2.1 x, hP.thinning x] with a ha hnon hthin rw [Real.norm_eq_abs, abs_of_nonneg hnon] calc P.pi x a ≤ cplus * a ^ kappa := hthin.2 _ ≤ cplus := by simpa only [mul_one] using mul_le_mul_of_nonneg_left (Real.rpow_le_one ha.1 ha.2 hkappa) hcplus0 have hpiDelta : IntegrableOn (P.pi x) (Icc (0 : ℝ) delta) volume := hpiInt.mono_measure (Measure.restrict_mono_set volume hsubset) have hpowInt : IntegrableOn (fun a : ℝ => a ^ kappa) (Icc 0 delta) volume := by rw [← intervalIntegrable_iff_integrableOn_Icc_of_le hdelta.1] exact intervalIntegral.intervalIntegrable_rpow (inl hkappa) have hthinDelta := (hP.thinning x).filter_mono (ae_mono (Measure.restrict_mono_set volume hsubset)) have hpowEval : (∫ a in Icc (0 : ℝ) delta, a ^ kappa) = delta ^ (kappa + 1) / (kappa + 1) := by rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hdelta.1, integral_rpow (inl (by linarith : -1 < kappa))] rw [Real.zero_rpow (by linarith : kappa + 1 ≠ 0), sub_zero] have hmass0 : 0 ≤ atomMass P x delta := by unfold atomMass exact integral_nonneg_of_ae ((hP.condDensity.2.1 x).filter_mono (ae_mono (Measure.restrict_mono_set volume hsubset))) have hmassUpper : atomMass P x delta ≤ cplus * delta ^ (kappa + 1) / (kappa + 1) := by unfold atomMass calc (∫ a in Icc (0 : ℝ) delta, P.pi x a) ≤ ∫ a in Icc (0 : ℝ) delta, cplus * a ^ kappa := integral_mono_ae hpiDelta (hpowInt.const_mul cplus) (hthinDelta.mono fun _ ha => ha.2) _ = _ := by rw [integral_const_mul, hpowEval]; ring have hXm : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) let _ := hP.probability letI : IsProbabilityMeasure (P.dataMeasure.map fun o => o.X) := Measure.isProbabilityMeasure_map hXm.aemeasurable have hpx0 : 0 ≤ P.px x := by rw [(hP.stratumMass x).1] exact measureReal_nonneg have hpx1 : P.px x ≤ 1 := by rw [(hP.stratumMass x).1] exact measureReal_le_one exact ⟨mul_nonneg hpx0 hmass0, (mul_le_mul_of_nonneg_right hpx1 hmass0).trans (by simpa using hmassUpper)⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.cont_atomCoefficient_nonneg_le_envelope · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:209
theorem contFallbackEstimator_risk_le_explicit

The fixed one-half fallback has an explicit root-block plus threshold-mass absolute-risk bound. The result uses the hP condition, the hreg condition, the hdelta condition, the hcard0 condition, the hcard1 condition. This is the stated conclusion.

Formal statement
J n :
P :
B :
kappa cminus cplus pmin deltaBar delta :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hcard0 :
0 < B.I0.card
hcard1 :
0 < B.I1.card
contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP (contFallbackEstimator B · delta)
≤ (1 / 2 : ℝ) * sqrt (B.I0.card : ℝ)⁻¹
+ (J : ℝ) * ((1 / 4 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + (1 / 2 : ℝ) * (cplus * delta ^ (kappa + 1) / (kappa + 1)))
Proof (Lean source)
lemma contFallbackEstimator_risk_le_explicit {J n : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (kappa cminus cplus pmin deltaBar delta : ℝ) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hcard0 : 0 < B.I0.card) (hcard1 : 0 < B.I1.card) : contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP (contFallbackEstimator B · delta) ≤ (1 / 2 : ℝ) * sqrt (B.I0.card : ℝ)⁻¹ + (J : ℝ) * ((1 / 4 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + (1 / 2 : ℝ) * (cplus * delta ^ (kappa + 1) / (kappa + 1))) := by letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct; infer_instance let target := contClampFunctional P kappa cminus cplus pmin deltaBar hP delta let e0 := fun z : Fin n → ClampObs J => |retainedEstimate B z delta - retainedMean P delta| let ex := fun x : Fin J => fun z : Fin n → ClampObs J => |atomEstimate B z x delta - P.px x * atomMass P x delta| let env := cplus * delta ^ (kappa + 1) / (kappa + 1) have ht := contClampFunctional_mem_Icc P kappa cminus cplus pmin deltaBar delta hP hreg hdelta have hpoint (z : Fin n → ClampObs J) : |contFallbackEstimator B z delta - target| ≤ e0 z + ∑ x : Fin J, ((1 / 2 : ℝ) * ex x z + (1 / 2 : ℝ) * env) := by have hclamp := abs_clampUnit_sub_le (retainedEstimate B z delta + (1 / 2 : ℝ) * ∑ x : Fin J, atomEstimate B z x delta) target ht have hx (x : Fin J) : |(1 / 2 : ℝ) * atomEstimate B z x delta - P.px x * atomMass P x delta * contRegression P kappa cminus cplus pmin deltaBar hP x delta| ≤ (1 / 2 : ℝ) * ex x z + (1 / 2 : ℝ) * env := by let coeff := P.px x * atomMass P x delta have hc := cont_atomCoefficient_nonneg_le_envelope P hP hreg x hdelta have hm := contRegression_mem_Icc P kappa cminus cplus pmin deltaBar hP hreg x delta hdelta have hmhalf : |(1 / 2 : ℝ) - contRegression P kappa cminus cplus pmin deltaBar hP x delta| ≤ 1 / 2 := by rw [abs_le] constructor <;> linarith [hm.1, hm.2] calc _ = |(1 / 2 : ℝ) * (atomEstimate B z x delta - coeff) + coeff * ((1 / 2 : ℝ) - contRegression P kappa cminus cplus pmin deltaBar hP x delta)| := by congr 1 dsimp [coeff] ring _ ≤ |(1 / 2 : ℝ) * (atomEstimate B z x delta - coeff)| + |coeff * ((1 / 2 : ℝ) - contRegression P kappa cminus cplus pmin deltaBar hP x delta)| := abs_add_le _ _ _ ≤ (1 / 2 : ℝ) * ex x z + (1 / 2 : ℝ) * env := by rw [abs_mul, abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 1 / 2), abs_mul, abs_of_nonneg hc.1] dsimp [ex, coeff, env] nlinarith [mul_le_mul_of_nonneg_left hmhalf hc.1, mul_le_mul_of_nonneg_left hc.2 (by norm_num : (0 : ℝ) ≤ 1 / 2)] calc |contFallbackEstimator B z delta - target| ≤ |(retainedEstimate B z delta - retainedMean P delta) + ∑ x : Fin J, ((1 / 2 : ℝ) * atomEstimate B z x delta - P.px x * atomMass P x delta * contRegression P kappa cminus cplus pmin deltaBar hP x delta)| := by refine hclamp.trans_eq ?_ congr 1 dsimp [target] unfold contClampFunctional rw [Finset.mul_sum, Finset.sum_sub_distrib] ring _ ≤ e0 z + ∑ x : Fin J, |(1 / 2 : ℝ) * atomEstimate B z x delta - P.px x * atomMass P x delta * contRegression P kappa cminus cplus pmin deltaBar hP x delta| := by let fsum := fun x : Fin J => (1 / 2 : ℝ) * atomEstimate B z x delta - P.px x * atomMass P x delta * contRegression P kappa cminus cplus pmin deltaBar hP x delta have hs : |∑ x : Fin J, fsum x| ≤ ∑ x : Fin J, |fsum x| := by simpa using Finset.abs_sum_le_sum_abs fsum univ exact (abs_add_le _ _).trans (add_le_add_right hs _) _ ≤ _ := by exact add_le_add_right (Finset.sum_le_sum fun x _ => hx x) _ have he0int : Integrable e0 (iidProduct P n) := by refine Integrable.of_bound ((retainedEstimate_measurable B delta).sub measurable_const).abs.aestronglyMeasurable 2 ?_ filter_upwards [cont_iidProduct_outcomeSupport P hP] with z hz dsimp [e0] rw [abs_abs] have hr := blockAverage_mem_Icc B.I0 z (fun o : ClampObs J => if delta < o.A then clampUnit o.Y else 0) (fun o => by split_ifs · exact (clampUnit_mem_Icc o.Y) · exact ⟨by norm_num, by norm_num⟩) have hre : retainedEstimate B z delta = blockAverage B.I0 z (fun o : ClampObs J => if delta < o.A then clampUnit o.Y else 0) := by unfold retainedEstimate blockAverage congr 1 apply Finset.sum_congr rfl intro i hi simp [clampUnit, (hz i).1, (hz i).2] have hm0 : |retainedMean P delta| ≤ 1 := by let g := indicator {o : ClampObs J | delta < o.A} (fun o => o.Y) have hgmeas : Measurable g := clampOutcome_measurable.indicator (measurableSet_lt measurable_const (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) have hgint : Integrable g P.dataMeasure := by refine Integrable.of_bound hgmeas.aestronglyMeasurable 1 ?_ filter_upwards [hP.outcomeSupport] with o ho by_cases ha : delta < o.A <;> simp [g, indicator, ha, abs_of_nonneg ho.1, ho.2] have hg0 : 0 ≤ᵐ[P.dataMeasure] g := by filter_upwards [hP.outcomeSupport] with o ho by_cases ha : delta < o.A <;> simp [g, indicator, ha, ho.1] have hg1 : g ≤ᵐ[P.dataMeasure] fun _ => (1 : ℝ) := by filter_upwards [hP.outcomeSupport] with o ho by_cases ha : delta < o.A <;> simp [g, indicator, ha, ho.2] have hmI : retainedMean P delta ∈ Icc (0 : ℝ) 1 := by have hret : retainedMean P delta = ∫ o, g o ∂P.dataMeasure := by unfold retainedMean apply integral_congr_ae filter_upwards with o by_cases ha : delta < o.A <;> simp [g, indicator, ha] rw [hret] exact ⟨integral_nonneg_of_ae hg0, (integral_mono_ae hgint (integrable_const 1) hg1).trans_eq (by simp)⟩ rw [abs_of_nonneg hmI.1] exact hmI.2 rw [hre] rw [abs_le] have hmBounds := (abs_le.mp hm0) exact ⟨by linarith [hr.1, hmBounds.2], by linarith [hr.2, hmBounds.1]⟩ have hexint (x : Fin J) : Integrable (ex x) (iidProduct P n) := by refine Integrable.of_bound ((atomEstimate_measurable B x delta).sub measurable_const).abs.aestronglyMeasurable 2 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (abs_nonneg _)] change |atomEstimate B z x delta - P.px x * atomMass P x delta| ≤ 2 have ha := atomEstimate_mem_Icc B z x delta have hc := cont_atomCoefficient_nonneg_le_envelope P hP hreg x hdelta have hcoef1 : P.px x * atomMass P x delta ≤ 1 := by unfold atomMass rw [← (hP.condDensity.2.2 x).2 (Icc 0 delta) measurableSet_Icc] · exact measureReal_le_one · intro a ha' exact ⟨ha'.1, ha'.2.trans (hdelta.2.trans hreg.2.2.2.2.2.2.2.2.le)⟩ rw [abs_le] exact ⟨by linarith [ha.1, hcoef1], by linarith [ha.2, hc.1]⟩ have hrhsInt : Integrable (fun z => e0 z + ∑ x : Fin J, ((1 / 2 : ℝ) * ex x z + (1 / 2 : ℝ) * env)) (iidProduct P n) := he0int.add (integrable_finsetSum univ fun x _ => ((hexint x).const_mul (1 / 2)).add (integrable_const _)) have hlhsInt : Integrable (fun z => |contFallbackEstimator B z delta - target|) (iidProduct P n) := by have hest : Measurable (fun z : Fin n → ClampObs J => contFallbackEstimator B z delta) := by unfold contFallbackEstimator exact clampUnit_measurable'.comp ((retainedEstimate_measurable B delta).add (measurable_const.mul (Finset.measurable_fun_sum _ fun x _ => atomEstimate_measurable B x delta))) refine Integrable.of_bound ((hest.sub measurable_const).abs.aestronglyMeasurable) 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_abs, abs_le] have hs := clampUnit_mem_Icc (retainedEstimate B z delta + (1 / 2 : ℝ) * ∑ x : Fin J, atomEstimate B z x delta) change targetIcc (0 : ℝ) 1 at ht change contFallbackEstimator B z delta - targetIcc (-1 : ℝ) 1 exact ⟨by unfold contFallbackEstimator; linarith [hs.1, ht.2], by unfold contFallbackEstimator; linarith [hs.2, ht.1]⟩ unfold contEstimatorRisk change (∫ z, |contFallbackEstimator B z delta - target| ∂iidProduct P n) ≤ _ calc _ ≤ ∫ z, (e0 z + ∑ x : Fin J, ((1 / 2 : ℝ) * ex x z + (1 / 2 : ℝ) * env)) ∂iidProduct P n := integral_mono_ae hlhsInt hrhsInt (ae_of_all _ hpoint) _ = (∫ z, e0 z ∂iidProduct P n) + ∑ x : Fin J, ((1 / 2 : ℝ) * ∫ z, ex x z ∂iidProduct P n + (1 / 2 : ℝ) * env) := by have hsumInt : Integrable (fun z => ∑ x : Fin J, ((1 / 2 : ℝ) * ex x z + (1 / 2 : ℝ) * env)) (iidProduct P n) := integrable_finsetSum univ fun x _ => ((hexint x).const_mul (1 / 2)).add (integrable_const _) rw [integral_add he0int hsumInt, integral_finsetSum] · congr 1 apply Finset.sum_congr rfl intro x hx rw [integral_add ((hexint x).const_mul (1 / 2)) (integrable_const _), integral_const_mul, integral_const] simp · intro x hx exact (hexint x).const_mul (1 / 2) |>.add (integrable_const _) _ ≤ (1 / 2 : ℝ) * sqrt (B.I0.card : ℝ)⁻¹ + ∑ _x : Fin J, ((1 / 4 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + (1 / 2 : ℝ) * env) := by apply add_le_add · exact cont_retainedEstimate_l1_le P hP B hcard0 · apply Finset.sum_le_sum intro x hx have h := cont_atomEstimate_l1_le P hP B hcard1 x hdelta.1 (hdelta.2.trans hreg.2.2.2.2.2.2.2.2.le) nlinarith _ = _ := by simp [env]; ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFallbackEstimator_risk_le_explicit · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:280
theorem cont_atomTotal_eq_blockAverage

Summing the stratum indicators gives the single threshold indicator. This is the stated conclusion.

Formal statement
J n :
B :
z :
Fin n → ClampObs J
delta :
(∑ x : Fin J, atomEstimate B z x delta)
= blockAverage B.I1 z (fun o => if o.A ≤ delta then 1 else 0)
Proof (Lean source)
lemma cont_atomTotal_eq_blockAverage {J n : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (delta : ℝ) : (∑ x : Fin J, atomEstimate B z x delta) = blockAverage B.I1 z (fun o => if o.A ≤ delta then 1 else 0) := by classical unfold atomEstimate blockAverage rw [← Finset.mul_sum] congr 1 calc (∑ x : Fin J, ∑ i ∈ B.I1, if (z i).X = x ∧ (z i).A ≤ delta then (1 : ℝ) else 0) = ∑ i ∈ B.I1, ∑ x : Fin J, if (z i).X = x ∧ (z i).A ≤ delta then (1 : ℝ) else 0 := by rw [Finset.sum_comm] _ = ∑ i ∈ B.I1, if (z i).A ≤ delta then (1 : ℝ) else 0 := by apply Finset.sum_congr rfl intro i hi by_cases ha : (z i).A ≤ delta <;> simp [ha]
CausalSmith.Stat.LmtpThresholdAtomFrontier.cont_atomTotal_eq_blockAverage · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:488
theorem cont_atomTotal_integral_eq

The population counterpart of the total empirical threshold mass. The result uses the hP condition, the hdelta condition, the hreg condition. This is the stated conclusion.

Formal statement
J :
P :
kappa cminus cplus pmin deltaBar delta :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
(∫ o, (if o.A ≤ delta then (1 : ℝ) else 0) ∂P.dataMeasure)
= ∑ x : Fin J, P.px x * atomMass P x delta
Proof (Lean source)
lemma cont_atomTotal_integral_eq {J : ℕ} (P : ClampLaw J) {kappa cminus cplus pmin deltaBar delta : ℝ} (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) : (∫ o, (if o.A ≤ delta then (1 : ℝ) else 0) ∂P.dataMeasure) = ∑ x : Fin J, P.px x * atomMass P x delta := by letI : IsProbabilityMeasure P.dataMeasure := hP.probability have hdelta1 : delta ≤ 1 := hdelta.2.trans hreg.2.2.2.2.2.2.2.2.le have hX : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) have hA : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) have hone (x : Fin J) : (∫ o, (if o.X = x ∧ o.A ≤ delta then (1 : ℝ) else 0) ∂P.dataMeasure) = P.px x * atomMass P x delta := by have hset : MeasurableSet {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} := (measurableSet_eq_fun hX measurable_const).inter (measurableSet_Icc.preimage hA) calc _ = ∫ o, indicator {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} (fun _ => (1 : ℝ)) o ∂P.dataMeasure := by apply integral_congr_ae filter_upwards [hP.treatmentSupport] with o ho by_cases hx : o.X = x <;> by_cases ha : o.A ≤ delta <;> simp [indicator, hx, ha, ho.1] _ = P.dataMeasure.real {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} := by rw [integral_indicator hset] simp _ = _ := by rw [(hP.condDensity.2.2 x).2 (Icc 0 delta) measurableSet_Icc] · rfl · intro a ha exact ⟨ha.1, ha.2.trans hdelta1⟩ calc _ = ∫ o, ∑ x : Fin J, (if o.X = x ∧ o.A ≤ delta then (1 : ℝ) else 0) ∂P.dataMeasure := by apply integral_congr_ae filter_upwards with o by_cases ha : o.A ≤ delta <;> simp [ha] _ = ∑ x : Fin J, ∫ o, (if o.X = x ∧ o.A ≤ delta then (1 : ℝ) else 0) ∂P.dataMeasure := by apply integral_finsetSum intro x hx have hf : Measurable (fun o : ClampObs J => if o.X = x ∧ o.A ≤ delta then (1 : ℝ) else 0) := Measurable.ite ((measurableSet_eq_fun hX measurable_const).inter (measurableSet_le hA measurable_const)) measurable_const measurable_const exact Integrable.of_bound hf.aestronglyMeasurable 1 (by filter_upwards with o split_ifs <;> norm_num) _ = _ := Finset.sum_congr rfl fun x _ => hone x
CausalSmith.Stat.LmtpThresholdAtomFrontier.cont_atomTotal_integral_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:509
theorem contFallbackEstimator_mem_interval_of_good

A deterministic deviation implication used by the two-block interval. The result uses the hP condition, the hreg condition, the hdelta condition, the h0 condition, the h1 condition. This is the stated conclusion.

Formal statement
J n :
P :
B :
kappa cminus cplus pmin deltaBar delta alpha t0 t1 :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
z :
Fin n → ClampObs J
h0 :
|retainedEstimate B z delta - retainedMean P delta| ≤ t0
h1 :
|(∑ x : Fin J, atomEstimate B z x delta) - ∑ x : Fin J, P.px x * atomMass P x delta| ≤ t1
contClampFunctional P kappa cminus cplus pmin deltaBar hP delta ∈ Icc (max 0 (contFallbackEstimator B z delta - (t0 + t1 + (∑ x : Fin J, atomEstimate B z x delta) / 2))) (min 1 (contFallbackEstimator B z delta + (t0 + t1 + (∑ x : Fin J, atomEstimate B z x delta) / 2)))
Proof (Lean source)
lemma contFallbackEstimator_mem_interval_of_good {J n : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (kappa cminus cplus pmin deltaBar delta alpha t0 t1 : ℝ) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (z : Fin n → ClampObs J) (h0 : |retainedEstimate B z delta - retainedMean P delta| ≤ t0) (h1 : |(∑ x : Fin J, atomEstimate B z x delta) - ∑ x : Fin J, P.px x * atomMass P x delta| ≤ t1) : contClampFunctional P kappa cminus cplus pmin deltaBar hP delta ∈ Icc (max 0 (contFallbackEstimator B z delta - (t0 + t1 + (∑ x : Fin J, atomEstimate B z x delta) / 2))) (min 1 (contFallbackEstimator B z delta + (t0 + t1 + (∑ x : Fin J, atomEstimate B z x delta) / 2))) := by let E := ∑ x : Fin J, atomEstimate B z x delta let M := ∑ x : Fin J, P.px x * atomMass P x delta let T := ∑ x : Fin J, P.px x * atomMass P x delta * contRegression P kappa cminus cplus pmin deltaBar hP x delta let target := contClampFunctional P kappa cminus cplus pmin deltaBar hP delta have hE : 0 ≤ E := sum_nonneg fun x _ => (atomEstimate_mem_Icc B z x delta).1 have hM : 0 ≤ M := sum_nonneg fun x _ => (cont_atomCoefficient_nonneg_le_envelope P hP hreg x hdelta).1 have hT0 : 0 ≤ T := sum_nonneg fun x _ => mul_nonneg (cont_atomCoefficient_nonneg_le_envelope P hP hreg x hdelta).1 (contRegression_mem_Icc P kappa cminus cplus pmin deltaBar hP hreg x delta hdelta).1 have hTM : T ≤ M := by apply Finset.sum_le_sum intro x hx have hc := cont_atomCoefficient_nonneg_le_envelope P hP hreg x hdelta have hm := contRegression_mem_Icc P kappa cminus cplus pmin deltaBar hP hreg x delta hdelta simpa using mul_le_of_le_one_right hc.1 hm.2 have hEM : M - E ≤ t1 := by have := (abs_le.mp h1).1 dsimp [E, M] at this ⊢ linarith have ht1 : 0 ≤ t1 := (abs_nonneg _).trans h1 have hatom : |(1 / 2 : ℝ) * E - T| ≤ t1 + E / 2 := by rw [abs_le] constructor <;> dsimp [E, M, T] at * <;> linarith have htI := contClampFunctional_mem_Icc P kappa cminus cplus pmin deltaBar delta hP hreg hdelta have hdev : |contFallbackEstimator B z delta - target| ≤ t0 + t1 + E / 2 := by have hc := abs_clampUnit_sub_le (retainedEstimate B z delta + (1 / 2 : ℝ) * E) target htI calc _ ≤ |(retainedEstimate B z delta - retainedMean P delta) + ((1 / 2 : ℝ) * E - T)| := by refine hc.trans_eq ?_ congr 1 dsimp [target, T] unfold contClampFunctional ring _ ≤ |retainedEstimate B z delta - retainedMean P delta| + |(1 / 2 : ℝ) * E - T| := abs_add_le _ _ _ ≤ _ := by linarith change targetIcc _ _ constructor · apply max_le htI.1 dsimp [E] at hdev ⊢ rw [abs_le] at hdev linarith [hdev.2] · apply le_min htI.2 dsimp [E] at hdev ⊢ rw [abs_le] at hdev linarith [hdev.1]
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFallbackEstimator_mem_interval_of_good · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:568
theorem cont_hoeffding_radius_tail_le

The displayed square-root radius calibrates the two-sided Hoeffding tail to alpha / 2. The result uses the hm condition, the ha condition, the ha1 condition. This is the stated conclusion.

Formal statement
m :
alpha :
hm :
0 < m
ha :
0 < alpha
ha1 :
alpha < 1 / 2
2 * exp (-2 * (m : ℝ) * (sqrt (log (4 / alpha) / (2 * (m : ℝ)))) ^ 2)
≤ alpha / 2
Proof (Lean source)
lemma cont_hoeffding_radius_tail_le (m : ℕ) (alpha : ℝ) (hm : 0 < m) (ha : 0 < alpha) (ha1 : alpha < 1 / 2) : 2 * exp (-2 * (m : ℝ) * (sqrt (log (4 / alpha) / (2 * (m : ℝ)))) ^ 2) ≤ alpha / 2 := by have hmR : 0 < (m : ℝ) := by positivity have hquot : 1 < 4 / alpha := by rw [lt_div_iff₀ ha] linarith have hlog : 0 ≤ log (4 / alpha) := (Real.log_pos hquot).le rw [Real.sq_sqrt (div_nonneg hlog (by positivity : 0 ≤ 2 * (m : ℝ)))] have he : -2 * (m : ℝ) * (log (4 / alpha) / (2 * (m : ℝ))) = -log (4 / alpha) := by field_simp rw [he, Real.exp_neg, Real.exp_log (by positivity : 0 < 4 / alpha)] field_simp norm_num
CausalSmith.Stat.LmtpThresholdAtomFrontier.cont_hoeffding_radius_tail_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:640
theorem contHoeffdingInterval_coverage_model

The continuity-only interval covers its model-specific target with the advertised finite-sample probability. The result uses the HoeffdingBoundedAverage_of_gate condition, the hP condition, the hreg condition, the hdelta condition, the hcard0 condition, the hcard1 condition. This is the stated conclusion.

Formal statement
HoeffdingBoundedAverage_of_gate :
J n :
P :
B :
kappa cminus cplus pmin deltaBar delta alpha :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hcard0 :
0 < B.I0.card
hcard1 :
0 < B.I1.card
1 - alpha
≤ (iidProduct P n).real {z | contClampFunctional P kappa cminus cplus pmin deltaBar hP delta ∈ contHoeffdingInterval B z delta alpha}
Proof (Lean source)
lemma contHoeffdingInterval_coverage_model (HoeffdingBoundedAverage_of_gate : HoeffdingBoundedAverage) {J n : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (kappa cminus cplus pmin deltaBar delta alpha : ℝ) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hcard0 : 0 < B.I0.card) (hcard1 : 0 < B.I1.card) : 1 - alpha ≤ (iidProduct P n).real {z | contClampFunctional P kappa cminus cplus pmin deltaBar hP delta ∈ contHoeffdingInterval B z delta alpha} := by letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct; infer_instance let f0 : ClampObs J → ℝ := fun o => if delta < o.A then clampUnit o.Y else 0 let f1 : ClampObs J → ℝ := fun o => if o.A ≤ delta then 1 else 0 let t0 := sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) let t1 := sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) let target := contClampFunctional P kappa cminus cplus pmin deltaBar hP delta let good : Set (Fin n → ClampObs J) := {z | targetcontHoeffdingInterval B z delta alpha} let bad0 : Set (Fin n → ClampObs J) := {z | |blockAverage B.I0 z f0 - ∫ o, f0 o ∂P.dataMeasure| > t0} let bad1 : Set (Fin n → ClampObs J) := {z | |blockAverage B.I1 z f1 - ∫ o, f1 o ∂P.dataMeasure| > t1} have hf0 : Measurable f0 := by exact Measurable.ite (measurableSet_lt measurable_const (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) (clampUnit_measurable'.comp clampOutcome_measurable) measurable_const have hf1 : Measurable f1 := by exact Measurable.ite (measurableSet_le (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))) measurable_const) measurable_const measurable_const have hf001 : ∀ o, f0 o ∈ Icc (0 : ℝ) 1 := by intro o; dsimp [f0]; split_ifs · exact clampUnit_mem_Icc _ · exact ⟨by norm_num, by norm_num⟩ have hf101 : ∀ o, f1 o ∈ Icc (0 : ℝ) 1 := by intro o; dsimp [f1]; split_ifs <;> constructor <;> norm_num have ht0 : 0 < t0 := by dsimp [t0] have hq : 1 < 4 / alpha := by rw [lt_div_iff₀ hreg.2.1] linarith [hreg.2.2] exact Real.sqrt_pos.2 (div_pos (Real.log_pos hq) (by positivity)) have ht1 : 0 < t1 := by dsimp [t1] have hq : 1 < 4 / alpha := by rw [lt_div_iff₀ hreg.2.1] linarith [hreg.2.2] exact Real.sqrt_pos.2 (div_pos (Real.log_pos hq) (by positivity)) have hb0 : (iidProduct P n).real bad0 ≤ alpha / 2 := by exact (blockAverage_hoeffding HoeffdingBoundedAverage_of_gate P.dataMeasure B.I0 f0 hf0 hf001 t0 ht0).trans (cont_hoeffding_radius_tail_le B.I0.card alpha hcard0 hreg.2.1 hreg.2.2) have hb1 : (iidProduct P n).real bad1 ≤ alpha / 2 := by exact (blockAverage_hoeffding HoeffdingBoundedAverage_of_gate P.dataMeasure B.I1 f1 hf1 hf101 t1 ht1).trans (cont_hoeffding_radius_tail_le B.I1.card alpha hcard1 hreg.2.1 hreg.2.2) have hm0 : ∫ o, f0 o ∂P.dataMeasure = retainedMean P delta := by calc _ = ∫ o, (if delta < o.A then o.Y else 0) ∂P.dataMeasure := by apply integral_congr_ae filter_upwards [hP.outcomeSupport] with o ho simp [f0, clampUnit, ho.1, ho.2] _ = _ := by unfold retainedMean apply integral_congr_ae filter_upwards with o by_cases ha : delta < o.A <;> simp [indicator, ha] have hm1 : ∫ o, f1 o ∂P.dataMeasure = ∑ x : Fin J, P.px x * atomMass P x delta := cont_atomTotal_integral_eq P hP hdelta hreg.1 have hsub : ∀ᵐ z ∂iidProduct P n, z ∈ goodᶜ → z ∈ bad0 ∪ bad1 := by filter_upwards [cont_iidProduct_outcomeSupport P hP] with z hz intro hzg by_contra hzbad have hz0 : |blockAverage B.I0 z f0 - ∫ o, f0 o ∂P.dataMeasure| ≤ t0 := le_of_not_gt (fun h => hzbad (inl h)) have hz1 : |blockAverage B.I1 z f1 - ∫ o, f1 o ∂P.dataMeasure| ≤ t1 := le_of_not_gt (fun h => hzbad (inr h)) have hre : retainedEstimate B z delta = blockAverage B.I0 z f0 := by unfold retainedEstimate blockAverage congr 1 apply Finset.sum_congr rfl intro i hi simp [f0, clampUnit, (hz i).1, (hz i).2] have hmem := contFallbackEstimator_mem_interval_of_good P B kappa cminus cplus pmin deltaBar delta alpha t0 t1 hP hreg.1 hdelta z (by simpa [hre, hm0] using hz0) (by simpa [cont_atomTotal_eq_blockAverage, hm1] using hz1) exact hzg hmem have hfail : (iidProduct P n).real goodᶜ ≤ alpha := by have hm := measure_mono_ae hsub have hmreal : (iidProduct P n).real goodᶜ ≤ (iidProduct P n).real (bad0 ∪ bad1) := ENNReal.toReal_mono (measure_ne_top _ _) hm exact hmreal.trans ((measureReal_union_le bad0 bad1).trans (by linarith)) have hgoodMeas : MeasurableSet good := by dsimp [good, target] simp only [contHoeffdingInterval] have hc : Measurable (fun z : Fin n → ClampObs J => contFallbackEstimator B z delta) := by unfold contFallbackEstimator exact clampUnit_measurable'.comp ((retainedEstimate_measurable B delta).add (measurable_const.mul (Finset.measurable_fun_sum _ fun x _ => atomEstimate_measurable B x delta))) have hr : Measurable (fun z : Fin n → ClampObs J => sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ))) + sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ))) + (∑ x : Fin J, atomEstimate B z x delta) / 2) := (measurable_const.add measurable_const).add ((Finset.measurable_fun_sum _ fun x _ => atomEstimate_measurable B x delta).div_const 2) exact (measurableSet_le (measurable_const.max (hc.sub hr)) measurable_const).inter (measurableSet_le measurable_const (measurable_const.min (hc.add hr))) have hadd := measureReal_add_measureReal_compl (μ := iidProduct P n) hgoodMeas have huniv : (iidProduct P n).real univ = 1 := by simp rw [huniv] at hadd change 1 - alpha ≤ (iidProduct P n).real good linarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.contHoeffdingInterval_coverage_model · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityProcedureBounds.lean:660
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ContinuityRates 2 declarations Elementary rates for the continuity-only frontier

Elementary rates for the continuity-only frontier

theorem contFrontier_elbow_asymp

At the continuity elbow the two summands of the frontier have root-sample size order. The result uses the hkappa condition. This is the stated conclusion.

Formal statement
kappa :
hkappa :
0 ≤ kappa
AsympSeq (fun n => contFrontier n ((n : ℝ) ^ (-(1 : ℝ) / (2 * (kappa + 1)))) kappa) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Proof (Lean source)
lemma contFrontier_elbow_asymp (kappa : ℝ) (hkappa : 0 ≤ kappa) : AsympSeq (fun n => contFrontier n ((n : ℝ) ^ (-(1 : ℝ) / (2 * (kappa + 1)))) kappa) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) := by refine ⟨1, 2, by norm_num, by norm_num, ?_⟩ filter_upwards [eventually_gt_atTop 0] with n hn have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hk1 : 0 < kappa + 1 := by linarith have hp : (((n : ℝ) ^ (-(1 : ℝ) / (2 * (kappa + 1)))) ^ (kappa + 1)) = (n : ℝ) ^ (-(1 : ℝ) / 2) := by rw [← Real.rpow_mul hnR.le] congr 1 field_simp [hk1.ne'] rw [contFrontier, hp] have hnonneg := Real.rpow_nonneg hnR.le (-(1 : ℝ) / 2) constructor <;> nlinarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFrontier_elbow_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityRates.lean:17
theorem contFrontier_zero_asymp

At threshold zero the continuity-only frontier is exactly the regular root-sample-size term. The result uses the hkappa condition. This is the stated conclusion.

Formal statement
kappa :
hkappa :
0 ≤ kappa
AsympSeq (fun n => contFrontier n 0 kappa) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Proof (Lean source)
lemma contFrontier_zero_asymp (kappa : ℝ) (hkappa : 0 ≤ kappa) : AsympSeq (fun n => contFrontier n 0 kappa) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) := by refine ⟨1, 2, by norm_num, by norm_num, ?_⟩ filter_upwards with n have hk1 : kappa + 1 ≠ 0 := by linarith simp only [contFrontier, Real.zero_rpow hk1, add_zero, one_mul] have hnonneg := Real.rpow_nonneg (Nat.cast_nonneg n) (-(1 : ℝ) / 2) constructor <;> nlinarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFrontier_zero_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityRates.lean:39
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ContinuityRiskLower 4 declarations Two-point lower bounds for continuity-only risk

Two-point lower bounds for continuity-only risk

theorem contMinimaxRisk_lower_of_two_point

A close pair in the continuity-only model lower-bounds its observed minimax absolute risk. The result uses the hreg condition, the hdelta condition, the hP0 condition, the hP1 condition, the hgap0 condition, the hsep condition, the hac condition, the hint condition, the hchi0 condition, the hchi4 condition, the hchi condition. This is the stated conclusion.

Formal statement
J :
shared
P0 P1 :
n :
kappa cminus cplus pmin deltaBar delta gap chi :
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hP0 :
ContClampModel P0 kappa cminus cplus pmin deltaBar
hP1 :
ContClampModel P1 kappa cminus cplus pmin deltaBar
hgap0 :
0 ≤ gap
hsep :
gap
≤ |contClampFunctional P1 kappa cminus cplus pmin deltaBar hP1 delta
- contClampFunctional P0 kappa cminus cplus pmin deltaBar hP0 delta|
hac :
iidProduct P1 n ≪ iidProduct P0 n
hint :
Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)
hchi0 :
0 ≤ chi
hchi4 :
chi < 4
hchi :
productChiSq P1 P0 n ≤ chi
((1 - (1 / 2) * sqrt chi) / 4) * gap
≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta 0).1
Proof (Lean source)
lemma contMinimaxRisk_lower_of_two_point (P0 P1 : ClampLaw J) (n : ℕ) (kappa cminus cplus pmin deltaBar delta gap chi : ℝ) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hP0 : ContClampModel P0 kappa cminus cplus pmin deltaBar) (hP1 : ContClampModel P1 kappa cminus cplus pmin deltaBar) (hgap0 : 0 ≤ gap) (hsep : gap ≤ |contClampFunctional P1 kappa cminus cplus pmin deltaBar hP1 delta - contClampFunctional P0 kappa cminus cplus pmin deltaBar hP0 delta|) (hac : iidProduct P1 n ≪ iidProduct P0 n) (hint : Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)) (hchi0 : 0 ≤ chi) (hchi4 : chi < 4) (hchi : productChiSq P1 P0 n ≤ chi) : ((1 - (1 / 2) * sqrt chi) / 4) * gap ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta 0).1 := by let target := fun (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) => contClampFunctional P kappa cminus cplus pmin deltaBar hP delta let outer : Set ℝ := {r : ℝ | ∃ est : Estimator n J, ObservedMeasurableEstimator est ∧ (∀ z, est z ∈ Icc (0 : ℝ) 1) ∧ r = sSup {v : ℝ | ∃ (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar), v = contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP est}} change _ ≤ sInf outer have houter : outer.Nonempty := by let est : Estimator n J := fun _ => 0 refine ⟨sSup {v : ℝ | ∃ (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar), v = contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP est}, est, measurable_const, fun _ => ⟨le_rfl, by norm_num⟩, rfl⟩ apply le_csInf houter intro r hr rcases hr with ⟨est, hest, hestrange, rfl⟩ let risks : Set ℝ := {v : ℝ | ∃ (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar), v = contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP est} have hrisk_le (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) : contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP est ≤ 1 := by letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct; infer_instance have ht := contClampFunctional_mem_Icc P kappa cminus cplus pmin deltaBar delta hP hreg hdelta unfold contEstimatorRisk have hfint : Integrable (fun z => |est z - target P hP|) (iidProduct P n) := by refine Integrable.of_bound ((hest.sub measurable_const).abs.aestronglyMeasurable) 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_abs, abs_le] exact ⟨by dsimp [target]; linarith [(hestrange z).1, ht.2], by dsimp [target]; linarith [(hestrange z).2, ht.1]⟩ calc (∫ z, |est z - target P hP| ∂iidProduct P n) ≤ ∫ _z, (1 : ℝ) ∂iidProduct P n := by apply integral_mono_ae hfint (integrable_const 1) filter_upwards with z rw [abs_le] exact ⟨by dsimp [target]; linarith [(hestrange z).1, ht.2], by dsimp [target]; linarith [(hestrange z).2, ht.1]⟩ _ = 1 := by simp have hbdd : BddAbove risks := by refine ⟨1, ?_⟩ rintro v ⟨P, hP, rfl⟩ exact hrisk_le P hP have hle0 : contEstimatorRisk P0 n kappa cminus cplus pmin deltaBar delta hP0 est ≤ sSup risks := le_csSup hbdd ⟨P0, hP0, rfl⟩ have hle1 : contEstimatorRisk P1 n kappa cminus cplus pmin deltaBar delta hP1 est ≤ sSup risks := le_csSup hbdd ⟨P1, hP1, rfl⟩ letI : IsProbabilityMeasure P0.dataMeasure := hP0.probability letI : IsProbabilityMeasure P1.dataMeasure := hP1.probability letI : IsProbabilityMeasure (iidProduct P0 n) := by unfold iidProduct; infer_instance letI : IsProbabilityMeasure (iidProduct P1 n) := by unfold iidProduct; infer_instance have htest := two_point_lower_bound_of_chiSqDiv_le (P₀ := iidProduct P1 n) (P₁ := iidProduct P0 n) hest (θ₀ := target P1 hP1) (θ₁ := target P0 hP0) (s := gap / 2) (c := chi) (by dsimp [target]; convert hsep using 1 <;> ring) hac hint hchi have hfloor : 0 < (1 - (1 / 2) * sqrt chi) / 2 := by have hsqrt : sqrt chi < 2 := by rw [Real.sqrt_lt' (by norm_num : (0 : ℝ) < 2)] convert hchi4 using 1 <;> norm_num linarith have hint0 : Integrable (fun z => |est z - target P0 hP0|) (iidProduct P0 n) := by refine Integrable.of_bound ((hest.sub measurable_const).abs.aestronglyMeasurable) 1 ?_ have ht := contClampFunctional_mem_Icc P0 kappa cminus cplus pmin deltaBar delta hP0 hreg hdelta filter_upwards with z rw [Real.norm_eq_abs, abs_abs, abs_le] exact ⟨by dsimp [target]; linarith [(hestrange z).1, ht.2], by dsimp [target]; linarith [(hestrange z).2, ht.1]⟩ have hint1 : Integrable (fun z => |est z - target P1 hP1|) (iidProduct P1 n) := by refine Integrable.of_bound ((hest.sub measurable_const).abs.aestronglyMeasurable) 1 ?_ have ht := contClampFunctional_mem_Icc P1 kappa cminus cplus pmin deltaBar delta hP1 hreg hdelta filter_upwards with z rw [Real.norm_eq_abs, abs_abs, abs_le] exact ⟨by dsimp [target]; linarith [(hestrange z).1, ht.2], by dsimp [target]; linarith [(hestrange z).2, ht.1]⟩ have hevent0 := mul_meas_ge_le_integral_of_nonneg (ae_of_all _ fun z => abs_nonneg (est z - target P1 hP1)) hint1 (gap / 2) have hevent1 := mul_meas_ge_le_integral_of_nonneg (ae_of_all _ fun z => abs_nonneg (est z - target P0 hP0)) hint0 (gap / 2) have hmaxEvent : ((1 - (1 / 2) * sqrt chi) / 2) * (gap / 2) ≤ max (contEstimatorRisk P1 n kappa cminus cplus pmin deltaBar delta hP1 est) (contEstimatorRisk P0 n kappa cminus cplus pmin deltaBar delta hP0 est) := by unfold contEstimatorRisk have hg2 : 0 ≤ gap / 2 := by positivity calc _ ≤ (gap / 2) * max ((iidProduct P1 n).real {z | gap / 2 ≤ |est z - target P1 hP1|}) ((iidProduct P0 n).real {z | gap / 2 ≤ |est z - target P0 hP0|}) := by rw [mul_comm] exact mul_le_mul_of_nonneg_left htest hg2 _ = max ((gap / 2) * (iidProduct P1 n).real {z | gap / 2 ≤ |est z - target P1 hP1|}) ((gap / 2) * (iidProduct P0 n).real {z | gap / 2 ≤ |est z - target P0 hP0|}) := by rw [mul_max_of_nonneg _ _ hg2] _ ≤ _ := max_le_max hevent0 hevent1 calc ((1 - (1 / 2) * sqrt chi) / 4) * gap = ((1 - (1 / 2) * sqrt chi) / 2) * (gap / 2) := by ring _ ≤ max (contEstimatorRisk P1 n kappa cminus cplus pmin deltaBar delta hP1 est) (contEstimatorRisk P0 n kappa cminus cplus pmin deltaBar delta hP0 est) := hmaxEvent _ ≤ sSup risks := max_le hle1 hle0
CausalSmith.Stat.LmtpThresholdAtomFrontier.contMinimaxRisk_lower_of_two_point · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityRiskLower.lean:17
theorem contMinimaxRisk_eventually_ge_root

The continuity-only minimax risk has the regular root-sample lower bound, uniformly over threshold sequences. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, c * (n : ℝ) ^ (-(1 : ℝ) / 2)
≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1
Proof (Lean source)
lemma contMinimaxRisk_eventually_ge_root (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, c * (n : ℝ) ^ (-(1 : ℝ) / 2) ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1 := by let chi : ℝ := exp (1 / 4 : ℝ) - 1 let floor : ℝ := (1 - (1 / 2) * sqrt chi) / 4 let c : ℝ := floor / 4 have hchi0 : 0 ≤ chi := sub_nonneg.mpr (Real.one_le_exp (by norm_num)) have hchi4 : chi < 4 := by dsimp [chi] have he : exp (1 / 4 : ℝ) < exp 1 := Real.exp_lt_exp.mpr (by norm_num) linarith [Real.exp_one_lt_three] have hfloor : 0 < floor := by dsimp [floor] have hs : sqrt chi < 2 := by rw [Real.sqrt_lt' (by norm_num : (0 : ℝ) < 2)] convert hchi4 using 1 <;> norm_num linarith refine ⟨c, by dsimp [c]; positivity, ?_⟩ intro deltaSeq hdelta filter_upwards [Filter.eventually_ge_atTop 1] with n hn have hnpos : 0 < n := by omega have hnR : 0 < (n : ℝ) := by exact_mod_cast hnpos let root : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) let eps : ℝ := (1 / 4 : ℝ) * root have hroot : 0 < root := Real.rpow_pos_of_pos hnR _ have heps : 0 < eps := mul_pos (by norm_num) hroot have heps_le : eps ≤ 1 / 4 := by have hroot1 : root ≤ 1 := by rw [show (1 : ℝ) = 1 ^ (-(1 : ℝ) / 2) by norm_num] exact Real.rpow_le_rpow_of_nonpos (by norm_num) (by exact_mod_cast hn) (by norm_num) dsimp [eps] nlinarith have hepsb : |eps| ≤ 1 / 2 := by rw [abs_of_pos heps]; linarith have hepss : |eps| < 1 / 2 := by rw [abs_of_pos heps]; linarith let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let P1 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps) have hw := continuityConstant_twoPoint J n kappa cminus cplus pmin deltaBar (deltaSeq n) eps hreg.1 (hdelta n) heps.le heps_le rcases hw with ⟨hP0, hP1, hsepEq, hchiExp⟩ have hrootSq : root ^ 2 = (n : ℝ)⁻¹ := by dsimp [root] rw [← Real.rpow_natCast, ← Real.rpow_mul hnR.le] norm_num rw [Real.rpow_neg_one] have hepsSq : eps ^ 2 = (1 / 16 : ℝ) * (n : ℝ)⁻¹ := by dsimp [eps] rw [mul_pow, hrootSq] norm_num have hnE : (n : ℝ) * (4 * eps ^ 2) = 1 / 4 := by rw [hepsSq] field_simp [hnR.ne'] ring have hchi : productChiSq P1 P0 n ≤ chi := by dsimp [chi] rw [hnE] at hchiExp linarith have hac1 := minimaxDataMeasure_ac_center J kappa hreg.1.1 hreg.1.2.1 (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepss) have hint1 := minimaxDataMeasure_sq_integrable_center J kappa hreg.1.1 hreg.1.2.1 (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepss) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps)) := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1.1 hreg.1.2.1 _ measurable_const (fun _ => hepsb) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1.1 hreg.1.2.1 _ measurable_const (fun _ => by norm_num) have hac := pi_iid_absolutelyContinuous _ _ hac1 n have hint := pi_iid_integrable_sq_dev _ _ hac1 hint1 n have hlower := contMinimaxRisk_lower_of_two_point P0 P1 n kappa cminus cplus pmin deltaBar (deltaSeq n) eps chi hreg.1 (hdelta n) hP0 hP1 heps.le (by simpa [P0, P1] using hsepEq.le) (by simpa [P0, P1, iidProduct, minimaxClampLaw] using hac) (by simpa [P0, P1, iidProduct, minimaxClampLaw] using hint) hchi0 hchi4 hchi change _ ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) 0).1 at hlower dsimp [c, floor, eps, root] at hlower ⊢ change _ ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) 0).1 convert hlower using 1 <;> ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.contMinimaxRisk_eventually_ge_root · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityRiskLower.lean:147
theorem contMinimaxRisk_eventually_ge_atom

Arbitrarily narrow continuous bumps give an atom-scale minimax lower bound uniformly over the whole threshold range. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, c * (deltaSeq n) ^ (kappa + 1)
≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1
Proof (Lean source)
lemma contMinimaxRisk_eventually_ge_atom (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, c * (deltaSeq n) ^ (kappa + 1) ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1 := by let amplitude : ℝ := 1 / 4 let chi : ℝ := exp 1 - 1 let floor : ℝ := (1 - (1 / 2) * sqrt chi) / 4 let c : ℝ := floor * amplitude have hchi0 : 0 ≤ chi := sub_nonneg.mpr (Real.one_le_exp zero_le_one) have hchi4 : chi < 4 := by dsimp [chi]; linarith [Real.exp_one_lt_three] have hfloor : 0 < floor := by dsimp [floor] have hs : sqrt chi < 2 := by rw [Real.sqrt_lt' (by norm_num : (0 : ℝ) < 2)] convert hchi4 using 1 <;> norm_num linarith refine ⟨c, by dsimp [c, amplitude]; positivity, ?_⟩ intro deltaSeq hdelta filter_upwards [Filter.eventually_ge_atTop 1] with n hn have hnpos : 0 < n := by omega have hnR : 0 < (n : ℝ) := by exact_mod_cast hnpos let A : ℝ := 8 * (kappa + 1) * amplitude ^ 2 * (deltaBar + 1) ^ kappa let K : ℝ := 1 + A let h : ℝ := 1 / (K * (n : ℝ)) have hk1 : 0 ≤ kappa + 1 := by linarith [hreg.1.2.1] have hd1 : 0 ≤ deltaBar + 1 := by linarith [hreg.1.2.2.2.2.2.2.2.1] have hA : 0 ≤ A := by dsimp [A, amplitude] exact mul_nonneg (mul_nonneg (mul_nonneg (by norm_num) hk1) (sq_nonneg _)) (Real.rpow_nonneg hd1 _) have hK : 0 < K := by dsimp [K]; linarith have hh : 0 < h := by dsimp [h]; positivity have hh1 : h ≤ 1 := by rw [show h = (K * (n : ℝ))⁻¹ by simp [h]] rw [inv_le_one₀ (mul_pos hK hnR)] nlinarith [show (1 : ℝ) ≤ n by exact_mod_cast hn] have hdh : deltaSeq n + h ≤ deltaBar + 1 := by linarith [(hdelta n).2] have hpow : (deltaSeq n + h) ^ kappa ≤ (deltaBar + 1) ^ kappa := by exact Real.rpow_le_rpow (add_nonneg (hdelta n).1 hh.le) hdh hreg.1.2.1 have hcoef : 0 ≤ 8 * (kappa + 1) * amplitude ^ 2 * h := by exact mul_nonneg (mul_nonneg (mul_nonneg (by norm_num) (by linarith [hreg.1.2.1])) (sq_nonneg _)) hh.le have hexp : (n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * h * (deltaSeq n + h) ^ kappa) ≤ 1 := by have hcore : (n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * h * (deltaBar + 1) ^ kappa) = A / K := by dsimp [h, A] field_simp [hK.ne', hnR.ne'] <;> ring calc _ ≤ (n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * h * (deltaBar + 1) ^ kappa) := by gcongr _ = A / K := hcore _ ≤ 1 := by rw [div_le_one hK]; dsimp [K]; linarith have hw := continuityBump_twoPoint J n kappa cminus cplus pmin deltaBar (deltaSeq n) h amplitude hreg.1 (hdelta n) hh (by norm_num [amplitude]) (by norm_num [amplitude]) let q := fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - deltaSeq n) / h) let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let P1 := minimaxClampLaw J kappa (fun p => q p.2) rcases hw with ⟨hP0, hP1, hsep, hchiExp⟩ have hchi : productChiSq P1 P0 n ≤ chi := by dsimp [chi] have := hchiExp.trans (Real.exp_le_exp.mpr hexp) linarith have hqmeas : Measurable q := by dsimp [q]; fun_prop have hq0 (a : ℝ) : 0 ≤ q a := by exact mul_nonneg (by norm_num [amplitude]) (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqbound (a : ℝ) : |q a| ≤ 1 / 2 := by rw [abs_of_nonneg (hq0 a)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - deltaSeq n) / h) dsimp [q, amplitude] nlinarith have hqstrict (p : Fin J × ℝ) : |q p.2| < 1 / 2 := by rw [abs_of_nonneg (hq0 p.2)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((p.2 - deltaSeq n) / h) dsimp [q, amplitude] nlinarith have hac1 := minimaxDataMeasure_ac_center J kappa hreg.1.1 hreg.1.2.1 (fun p : Fin J × ℝ => q p.2) (hqmeas.comp measurable_snd) hqstrict have hint1 := minimaxDataMeasure_sq_integrable_center J kappa hreg.1.1 hreg.1.2.1 (fun p : Fin J × ℝ => q p.2) (hqmeas.comp measurable_snd) hqstrict letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun p : Fin J × ℝ => q p.2)) := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1.1 hreg.1.2.1 _ (hqmeas.comp measurable_snd) (fun p => hqbound p.2) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1.1 hreg.1.2.1 _ measurable_const (fun _ => by norm_num) have hac := pi_iid_absolutelyContinuous _ _ hac1 n have hint := pi_iid_integrable_sq_dev _ _ hac1 hint1 n have hlower := contMinimaxRisk_lower_of_two_point P0 P1 n kappa cminus cplus pmin deltaBar (deltaSeq n) (amplitude * (deltaSeq n) ^ (kappa + 1)) chi hreg.1 (hdelta n) hP0 hP1 (mul_nonneg (by norm_num [amplitude]) (Real.rpow_nonneg (hdelta n).1 _)) hsep (by simpa [P0, P1, q, iidProduct, minimaxClampLaw] using hac) (by simpa [P0, P1, q, iidProduct, minimaxClampLaw] using hint) hchi0 hchi4 hchi change _ ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) 0).1 at hlower dsimp [c, floor] at hlower ⊢ change _ ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) 0).1 convert hlower using 1 <;> ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.contMinimaxRisk_eventually_ge_atom · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityRiskLower.lean:240
theorem contMinimaxRisk_eventually_ge_frontier

The regular and atom experiments combine into the full continuity frontier lower bound. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, c * contFrontier n (deltaSeq n) kappa
≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1
Proof (Lean source)
lemma contMinimaxRisk_eventually_ge_frontier (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, c * contFrontier n (deltaSeq n) kappa ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1 := by obtain ⟨c0, hc0, h0⟩ := contMinimaxRisk_eventually_ge_root J kappa cminus cplus pmin deltaBar alpha hreg obtain ⟨c1, hc1, h1⟩ := contMinimaxRisk_eventually_ge_atom J kappa cminus cplus pmin deltaBar alpha hreg let c := min c0 c1 / 2 refine ⟨c, by dsimp [c]; positivity, ?_⟩ intro deltaSeq hdelta filter_upwards [h0 deltaSeq hdelta, h1 deltaSeq hdelta] with n hn0 hn1 have hr0 : 0 ≤ (n : ℝ) ^ (-(1 : ℝ) / 2) := Real.rpow_nonneg (Nat.cast_nonneg n) _ have ha0 : 0 ≤ (deltaSeq n) ^ (kappa + 1) := Real.rpow_nonneg (hdelta n).1 _ dsimp [c, contFrontier] have hmin0 : min c0 c1 ≤ c0 := min_le_left _ _ have hmin1 : min c0 c1 ≤ c1 := min_le_right _ _ nlinarith [mul_le_mul_of_nonneg_right hmin0 hr0, mul_le_mul_of_nonneg_right hmin1 ha0]
CausalSmith.Stat.LmtpThresholdAtomFrontier.contMinimaxRisk_eventually_ge_frontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityRiskLower.lean:360
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ContinuityUpper 3 declarations Elementary upper bounds for the continuity-only procedure

Elementary upper bounds for the continuity-only procedure

theorem contRegression_mem_Icc

The selected continuous conditional-mean version remains in the outcome range throughout the threshold interval. The result uses the hP condition, the hreg condition, the ha condition. This is the stated conclusion.

Formal statement
J :
shared
P :
kappa cminus cplus pmin deltaBar :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
x :
Fin J
a :
ha :
a ∈ Icc (0 : ℝ) deltaBar
contRegression P kappa cminus cplus pmin deltaBar hP x a ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma contRegression_mem_Icc (P : ClampLaw J) (kappa cminus cplus pmin deltaBar : ℝ) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (x : Fin J) (a : ℝ) (ha : a ∈ Icc (0 : ℝ) deltaBar) : contRegression P kappa cminus cplus pmin deltaBar hP x a ∈ Icc (0 : ℝ) 1 := by let m : Fin J → ℝ → ℝ := contRegression P kappa cminus cplus pmin deltaBar hP let ce : ClampObs J → ℝ := P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] have hspec := Classical.choose_spec hP.continuousVersion have hmcont : ∀ y, ContinuousOn (m y) (Icc (0 : ℝ) deltaBar) := hspec.1 have hver : ce =ᵐ[P.dataMeasure] fun o => m o.X o.A := hspec.2 letI : IsProbabilityMeasure P.dataMeasure := hP.probability have hYint : Integrable (fun o : ClampObs J => o.Y) P.dataMeasure := by refine Integrable.of_bound clampOutcome_measurable.aestronglyMeasurable 1 ?_ filter_upwards [hP.outcomeSupport] with o ho rw [Real.norm_eq_abs, abs_of_nonneg ho.1] exact ho.2 have hce0 : 0 ≤ᵐ[P.dataMeasure] ce := MeasureTheory.condExp_nonneg (hP.outcomeSupport.mono fun _ ho => ho.1) have hce1 : ce ≤ᵐ[P.dataMeasure] fun _ => (1 : ℝ) := by have hmono := MeasureTheory.condExp_mono (m := comap (fun o : ClampObs J => (o.X, o.A)) inferInstance) hYint (integrable_const 1) (hP.outcomeSupport.mono fun _ ho => ho.2) rw [MeasureTheory.condExp_const clampDesign_measurable.comap_le (1 : ℝ)] at hmono exact hmono have hmrange : ∀ᵐ o ∂P.dataMeasure, m o.X o.A ∈ Icc (0 : ℝ) 1 := by filter_upwards [hver, hce0, hce1] with o he h0 h1 rw [he] at h0 h1 exact ⟨h0, h1⟩ let mc : Fin J → ℝ → ℝ := fun y t => clampUnit (m y t) have hmccont : ∀ y, ContinuousOn (mc y) (Icc (0 : ℝ) deltaBar) := by intro y unfold mc clampUnit fun_prop have hverc : ce =ᵐ[P.dataMeasure] fun o => mc o.X o.A := by filter_upwards [hver, hmrange] with o he hm rw [he] simp [mc, clampUnit, hm.1, hm.2] have heq := (cont_regression_extension_unique P kappa cminus cplus pmin deltaBar hP hreg m mc hmcont hmccont hver hverc x) ha change m x a ∈ Icc (0 : ℝ) 1 rw [heq] exact clampUnit_mem_Icc _
CausalSmith.Stat.LmtpThresholdAtomFrontier.contRegression_mem_Icc · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityUpper.lean:18
theorem contClampFunctional_integral_eq

The continuity-only functional is the expectation of the observed outcome above the threshold and of the selected continuous regression below it. The result uses the hP condition, the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
J :
shared
P :
kappa cminus cplus pmin deltaBar delta :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
(∫ o, if delta < o.A then o.Y else contRegression P kappa cminus cplus pmin deltaBar hP o.X delta ∂P.dataMeasure)
= contClampFunctional P kappa cminus cplus pmin deltaBar hP delta
Proof (Lean source)
lemma contClampFunctional_integral_eq (P : ClampLaw J) (kappa cminus cplus pmin deltaBar delta : ℝ) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : (∫ o, if delta < o.A then o.Y else contRegression P kappa cminus cplus pmin deltaBar hP o.X delta ∂P.dataMeasure) = contClampFunctional P kappa cminus cplus pmin deltaBar hP delta := by letI : IsProbabilityMeasure P.dataMeasure := hP.probability let mu := contRegression P kappa cminus cplus pmin deltaBar hP let atomTerm : Fin J → ClampObs J → ℝ := fun x o => if o.X = x ∧ o.A ≤ delta then mu x delta else 0 rcases hreg with ⟨hJ, hkappa, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar_one⟩ have hreg' : ContDesignConstants J kappa cminus cplus pmin deltaBar := ⟨hJ, hkappa, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar_one⟩ have hdelta1 : delta ≤ 1 := hdelta.2.trans hdeltaBar_one.le have hatomInt (x : Fin J) : Integrable (atomTerm x) P.dataMeasure := by have hm : Measurable (atomTerm x) := by dsimp [atomTerm] have hX : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) have hA : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) exact Measurable.ite ((measurableSet_eq_fun hX measurable_const).inter (measurableSet_le hA measurable_const)) measurable_const measurable_const refine Integrable.of_bound hm.aestronglyMeasurable 1 ?_ filter_upwards with o have hr := contRegression_mem_Icc P kappa cminus cplus pmin deltaBar hP hreg' x delta hdelta dsimp [atomTerm] split_ifs · rw [abs_of_nonneg hr.1] exact hr.2 · simp have hpoint : ∀ᵐ o ∂P.dataMeasure, (if delta < o.A then o.Y else mu o.X delta) = o.Y * indicator {o : ClampObs J | delta < o.A} (fun _ => (1 : ℝ)) o + ∑ x : Fin J, atomTerm x o := by filter_upwards [hP.treatmentSupport] with o ho by_cases ha : delta < o.A · have hn (x : Fin J) : ¬(o.X = x ∧ o.A ≤ delta) := fun hx => by linarith simp [atomTerm, indicator, ha, hn] · have hle : o.A ≤ delta := le_of_not_gt ha simp [atomTerm, indicator, ha, hle] rw [integral_congr_ae hpoint, integral_add] · rw [integral_finsetSum univ] · unfold contClampFunctional retainedMean congr 1 apply Finset.sum_congr rfl intro x hx have hevent : (∫ o, (if o.X = x ∧ o.A ≤ delta then (1 : ℝ) else 0) ∂P.dataMeasure) = P.px x * atomMass P x delta := by have hX : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) have hA : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) have hset : MeasurableSet {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} := (measurableSet_eq_fun hX measurable_const).inter (measurableSet_Icc.preimage hA) calc _ = ∫ o, indicator {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} (fun _ => (1 : ℝ)) o ∂P.dataMeasure := by apply integral_congr_ae filter_upwards [hP.treatmentSupport] with o ho by_cases hx' : o.X = x <;> by_cases ha' : o.A ≤ delta <;> simp [indicator, hx', ha', ho.1] _ = P.dataMeasure.real {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} := by rw [integral_indicator hset] simp _ = P.px x * atomMass P x delta := by rw [(hP.condDensity.2.2 x).2 (Icc 0 delta) measurableSet_Icc] · rfl · intro a ha' exact ⟨ha'.1, ha'.2.trans hdelta1⟩ calc (∫ o, atomTerm x o ∂P.dataMeasure) = mu x delta * ∫ o, (if o.X = x ∧ o.A ≤ delta then (1 : ℝ) else 0) ∂P.dataMeasure := by rw [← integral_const_mul] apply integral_congr_ae filter_upwards with o by_cases h : o.X = x ∧ o.A ≤ delta <;> simp [atomTerm, h] _ = mu x delta * (P.px x * atomMass P x delta) := by rw [hevent] _ = P.px x * atomMass P x delta * mu x delta := by ring · exact fun x _ => hatomInt x · exact Integrable.of_bound ((clampOutcome_measurable.mul (Measurable.indicator measurable_const (measurableSet_lt measurable_const (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))))))).aestronglyMeasurable 1 (by filter_upwards [hP.outcomeSupport] with o ho by_cases ha : delta < o.A · simp [indicator, ha, abs_of_nonneg ho.1, ho.2] · simp [indicator, ha]) · exact integrable_finsetSum univ fun x _ => hatomInt x
CausalSmith.Stat.LmtpThresholdAtomFrontier.contClampFunctional_integral_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityUpper.lean:70
theorem contClampFunctional_mem_Icc

The continuity-only clamp functional lies in the outcome range. The result uses the hP condition, the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
J :
shared
P :
kappa cminus cplus pmin deltaBar delta :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
contClampFunctional P kappa cminus cplus pmin deltaBar hP delta ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma contClampFunctional_mem_Icc (P : ClampLaw J) (kappa cminus cplus pmin deltaBar delta : ℝ) (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : contClampFunctional P kappa cminus cplus pmin deltaBar hP delta ∈ Icc (0 : ℝ) 1 := by letI : IsProbabilityMeasure P.dataMeasure := hP.probability let g : ClampObs J → ℝ := fun o => if delta < o.A then o.Y else contRegression P kappa cminus cplus pmin deltaBar hP o.X delta have hgmeas : Measurable g := by dsimp [g] exact Measurable.ite (measurableSet_lt measurable_const (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) clampOutcome_measurable ((measurable_of_countable (fun x : Fin J => contRegression P kappa cminus cplus pmin deltaBar hP x delta)).comp (measurable_fst.comp (Measurable.of_comap_le le_rfl))) have hg0 : 0 ≤ᵐ[P.dataMeasure] g := by filter_upwards [hP.outcomeSupport] with o ho dsimp [g] split_ifs · exact ho.1 · exact (contRegression_mem_Icc P kappa cminus cplus pmin deltaBar hP hreg o.X delta hdelta).1 have hg1 : g ≤ᵐ[P.dataMeasure] fun _ => (1 : ℝ) := by filter_upwards [hP.outcomeSupport] with o ho dsimp [g] split_ifs · exact ho.2 · exact (contRegression_mem_Icc P kappa cminus cplus pmin deltaBar hP hreg o.X delta hdelta).2 rw [← contClampFunctional_integral_eq P kappa cminus cplus pmin deltaBar delta hP hreg hdelta] constructor · exact integral_nonneg_of_ae hg0 · calc (∫ o, g o ∂P.dataMeasure) ≤ ∫ _o, (1 : ℝ) ∂P.dataMeasure := integral_mono_ae (Integrable.of_bound hgmeas.aestronglyMeasurable 1 (hg0.and hg1 |>.mono fun o h => by rw [Real.norm_eq_abs, abs_of_nonneg h.1] exact h.2)) (integrable_const 1) hg1 _ = 1 := by simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.contClampFunctional_mem_Icc · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityUpper.lean:181
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ContinuityWitness 3 declarations This file places the canonical Bernoulli regression laws in the qualitative continuity model without imposing a common modulus of continuity.

Continuity-only canonical witnesses

This file places the canonical Bernoulli regression laws in the qualitative continuity model without imposing a common modulus of continuity.

theorem minimaxClampModel_continuous

A bounded continuous Bernoulli regression on the canonical design law is a member of the continuity-only model. The result uses the hJ condition, the hkappa condition, the hcminus condition, the hcplus condition, the hpmin condition, the hqmeas condition, the hqbound condition, the hcont condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar :
hJ :
0 < J
hkappa :
0 ≤ kappa
hcminus :
cminus ≤ kappa + 1
hcplus :
kappa + 1 ≤ cplus
hpmin :
pmin ≤ 1 / (J : ℝ)
q :
ℝ → ℝ
hqmeas :
hqbound :
∀ a, |q a| ≤ 1 / 2
hcont :
ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) deltaBar)
ContClampModel (minimaxClampLaw J kappa (fun p => q p.2)) kappa cminus cplus pmin deltaBar
Proof (Lean source)
lemma minimaxClampModel_continuous (J : ℕ) (kappa cminus cplus pmin deltaBar : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (hcminus : cminus ≤ kappa + 1) (hcplus : kappa + 1 ≤ cplus) (hpmin : pmin ≤ 1 / (J : ℝ)) (q : ℝ → ℝ) (hqmeas : Measurable q) (hqbound : ∀ a, |q a| ≤ 1 / 2) (hcont : ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) deltaBar)) : ContClampModel (minimaxClampLaw J kappa (fun p => q p.2)) kappa cminus cplus pmin deltaBar := by let g : Fin J × ℝ → ℝ := fun p => q p.2 have hgmeas : Measurable g := hqmeas.comp measurable_snd have hgbound : ∀ p, |g p| ≤ 1 / 2 := fun p => hqbound p.2 have hprob := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa g hgmeas hgbound refine ⟨hprob, minimaxDataMeasure_ae_treatment J kappa g hgmeas hgbound, (minimaxDataMeasure_ae_bernoulli J kappa g hgmeas).mono (fun o ho => by rcases ho with ho | ho <;> simp [ho]), ?_, ?_, ?_, ?_⟩ · refine ⟨?_, ?_, ?_⟩ · intro x fun_prop · intro x filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha exact mul_nonneg (by linarith) (Real.rpow_nonneg ha.1 _) · intro x constructor · change 1 / (J : ℝ) = _ change 1 / (J : ℝ) = (Measure.map (fun o : ClampObs J => o.X) (minimaxDataMeasure J kappa g)).real {x} rw [minimaxDataMeasure_map_X J kappa hJ hkappa g hgmeas hgbound] exact (minimaxStratumMeasure_real_singleton J hJ x).symm · intro B hB hsub have hevent : {o : ClampObs J | o.X = x ∧ o.A ∈ B} = (fun o => (o.X, o.A)) ⁻¹' ({x} ×ˢ B) := by ext o; simp rw [hevent] have hrect : MeasurableSet (({x} : Set (Fin J)) ×ˢ B) := (measurableSet_singleton x).prod hB change (minimaxDataMeasure J kappa g).real {o : ClampObs J | o.X = x ∧ o.A ∈ B} = _ rw [hevent, measureReal_def, ← Measure.map_apply measurable_obs_design_cont hrect, minimaxDataMeasure_map_design J kappa g hgmeas hgbound] change (minimaxDesignMeasure J kappa).real ({x} ×ˢ B) = _ rw [minimaxDesignMeasure_real_rectangle J kappa hJ hkappa x B hB hsub] rfl · intro x constructor · change 1 / (J : ℝ) = _ change 1 / (J : ℝ) = (Measure.map (fun o : ClampObs J => o.X) (minimaxDataMeasure J kappa g)).real {x} rw [minimaxDataMeasure_map_X J kappa hJ hkappa g hgmeas hgbound] exact (minimaxStratumMeasure_real_singleton J hJ x).symm · exact hpmin · intro x filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha constructor · exact mul_le_mul_of_nonneg_right hcminus (Real.rpow_nonneg ha.1 _) · exact mul_le_mul_of_nonneg_right hcplus (Real.rpow_nonneg ha.1 _) · refine ⟨fun _ => 1 / 2 + q, fun _ => hcont, ?_⟩ let μ := minimaxDataMeasure J kappa g let design : ClampObs J → Fin J × ℝ := fun o => (o.X, o.A) let m : ClampObs J → ℝ := fun o => 1 / 2 + q o.A letI : IsProbabilityMeasure μ := hprob have hdesign : Measurable design := measurable_obs_design_cont have hY : Integrable (fun o : ClampObs J => o.Y) μ := by refine Integrable.of_bound (measurable_snd.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))).aestronglyMeasurable 1 ?_ filter_upwards [minimaxDataMeasure_ae_bernoulli J kappa g hgmeas] with o ho rcases ho with ho | ho <;> rw [ho] <;> norm_num have hm_meas : Measurable m := by dsimp [m] exact measurable_const.add (hqmeas.comp (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) have hm : Integrable m μ := by refine Integrable.of_bound hm_meas.aestronglyMeasurable 1 ?_ filter_upwards with o rw [Real.norm_eq_abs] dsimp [m] have hb := hqbound o.A rw [abs_le] at hb exact abs_le.2 ⟨by linarith [hb.1], by linarith [hb.2]⟩ have hm_design : AEStronglyMeasurable[comap design inferInstance] m μ := by have hfactor : m = (fun p : Fin J × ℝ => 1 / 2 + q p.2) ∘ design := rfl rw [hfactor] exact ((measurable_const.add (hqmeas.comp measurable_snd)).comp (Measurable.of_comap_le le_rfl)).aestronglyMeasurable have hintegral : ∀ T : Set (Fin J × ℝ), MeasurableSet T → (∫ o in design ⁻¹' T, o.Y ∂μ) = ∫ o in design ⁻¹' T, m o ∂μ := by intro T hT rw [minimaxDataMeasure_integral_Y_design J kappa hJ hkappa g hgmeas hgbound T hT] rw [← integral_indicator (hT.preimage hdesign), ← integral_indicator hT] rw [← minimaxDataMeasure_map_design J kappa g hgmeas hgbound, integral_map hdesign.aemeasurable] · rfl · exact ((measurable_const.add hgmeas).indicator hT).aestronglyMeasurable exact condExp_eq_of_integral_preimage_eq μ design hdesign (fun o => o.Y) m hY hm hm_design hintegral
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxClampModel_continuous · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityWitness.lean:29
theorem minimaxConstant_mem_cont_model

Constant shifts belong to the continuity-only model. The result uses the hreg condition, the heps condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar eps :
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
heps :
|eps| ≤ 1 / 2
ContClampModel (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps)) kappa cminus cplus pmin deltaBar
Proof (Lean source)
lemma minimaxConstant_mem_cont_model (J : ℕ) (kappa cminus cplus pmin deltaBar eps : ℝ) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (heps : |eps| ≤ 1 / 2) : ContClampModel (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps)) kappa cminus cplus pmin deltaBar := by rcases hreg with ⟨hJ, hkappa, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar_one⟩ apply minimaxClampModel_continuous J kappa cminus cplus pmin deltaBar hJ hkappa hcminus_le hcplus hpmin_le (fun _ => eps) measurable_const (fun _ => heps) fun_prop
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxConstant_mem_cont_model · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityWitness.lean:132
theorem minimaxDoseBump_mem_cont_model

A fixed-height bump with an arbitrarily small positive width belongs to the same continuity-only class. In particular, the class membership carries no width-dependent Hölder radius. The result uses the hreg condition, the hh condition, the hamp condition, the hamp_le condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar delta h amplitude :
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hh :
0 < h
hamp :
0 ≤ amplitude
hamp_le :
amplitude ≤ 1 / 4
q :
fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h)
ContClampModel (minimaxClampLaw J kappa (fun p => q p.2)) kappa cminus cplus pmin deltaBar
Proof (Lean source)
lemma minimaxDoseBump_mem_cont_model (J : ℕ) (kappa cminus cplus pmin deltaBar delta h amplitude : ℝ) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hh : 0 < h) (hamp : 0 ≤ amplitude) (hamp_le : amplitude ≤ 1 / 4) : let q := fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) ContClampModel (minimaxClampLaw J kappa (fun p => q p.2)) kappa cminus cplus pmin deltaBar := by dsimp only rcases hreg with ⟨hJ, hkappa, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar_one⟩ let q := fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) apply minimaxClampModel_continuous J kappa cminus cplus pmin deltaBar hJ hkappa hcminus_le hcplus hpmin_le q · dsimp [q] fun_prop · intro a have hb0 := CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg ((a - delta) / h) have hb1 := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - delta) / h) rw [abs_of_nonneg (mul_nonneg hamp hb0)] nlinarith · apply Continuous.continuousOn dsimp [q] have hb : Continuous CausalSmith.Stat.DoseResponseMinimax.doseBump := by unfold CausalSmith.Stat.DoseResponseMinimax.doseBump exact (CausalSmith.Stat.DoseResponseMinimax.doseContDiffBump.contDiff (n := ⊤)).continuous exact continuous_const.add (continuous_const.mul (hb.comp ((continuous_id.sub continuous_const).div_const h)))
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDoseBump_mem_cont_model · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityWitness.lean:146
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ContinuityWitnessFunctional 5 declarations Functionals of the canonical continuity witnesses

Functionals of the canonical continuity witnesses

theorem contRegression_minimaxClampLaw_eq

The selected continuous regression of a canonical Bernoulli witness is the displayed Bernoulli mean throughout the threshold range. The result uses the hreg condition, the hqmeas condition, the hqbound condition, the hcont condition, the ha condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar :
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
q :
ℝ → ℝ
hqmeas :
hqbound :
∀ a, |q a| ≤ 1 / 2
hcont :
ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) deltaBar)
x :
Fin J
a :
ha :
a ∈ Icc (0 : ℝ) deltaBar
P :
minimaxClampLaw J kappa (fun p => q p.2)
hP :
minimaxClampModel_continuous J kappa cminus cplus pmin deltaBar hreg.1 hreg.2.1 hreg.2.2.2.1 hreg.2.2.2.2.1 hreg.2.2.2.2.2.2.1 q hqmeas hqbound hcont
contRegression P kappa cminus cplus pmin deltaBar hP x a = 1 / 2 + q a
Proof (Lean source)
lemma contRegression_minimaxClampLaw_eq (J : ℕ) (kappa cminus cplus pmin deltaBar : ℝ) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (q : ℝ → ℝ) (hqmeas : Measurable q) (hqbound : ∀ a, |q a| ≤ 1 / 2) (hcont : ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) deltaBar)) (x : Fin J) (a : ℝ) (ha : a ∈ Icc (0 : ℝ) deltaBar) : let P := minimaxClampLaw J kappa (fun p => q p.2) let hP := minimaxClampModel_continuous J kappa cminus cplus pmin deltaBar hreg.1 hreg.2.1 hreg.2.2.2.1 hreg.2.2.2.2.1 hreg.2.2.2.2.2.2.1 q hqmeas hqbound hcont contRegression P kappa cminus cplus pmin deltaBar hP x a = 1 / 2 + q a := by dsimp only let g : Fin J × ℝ → ℝ := fun p => q p.2 let P := minimaxClampLaw J kappa g have hP := minimaxClampModel_continuous J kappa cminus cplus pmin deltaBar hreg.1 hreg.2.1 hreg.2.2.2.1 hreg.2.2.2.2.1 hreg.2.2.2.2.2.2.1 q hqmeas hqbound hcont have hchosen := Classical.choose_spec hP.continuousVersion let μ := minimaxDataMeasure J kappa g let design : ClampObs J → Fin J × ℝ := fun o => (o.X, o.A) let m : ClampObs J → ℝ := fun o => 1 / 2 + q o.A have hgmeas : Measurable g := hqmeas.comp measurable_snd have hgbound : ∀ p, |g p| ≤ 1 / 2 := fun p => hqbound p.2 letI : IsProbabilityMeasure μ := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1 hreg.2.1 g hgmeas hgbound have hdesign : Measurable design := measurable_minimax_design have hY : Integrable (fun o : ClampObs J => o.Y) μ := by refine Integrable.of_bound clampOutcome_measurable.aestronglyMeasurable 1 ?_ filter_upwards [minimaxDataMeasure_ae_bernoulli J kappa g hgmeas] with o ho rcases ho with ho | ho <;> rw [ho] <;> norm_num have hm_meas : Measurable m := by exact measurable_const.add (hqmeas.comp (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) have hm : Integrable m μ := by refine Integrable.of_bound hm_meas.aestronglyMeasurable 1 ?_ filter_upwards with o rw [Real.norm_eq_abs] change |1 / 2 + q o.A| ≤ 1 have hb := hqbound o.A rw [abs_le] at hb exact abs_le.2 ⟨by linarith [hb.1], by linarith [hb.2]⟩ have hm_design : AEStronglyMeasurable[comap design inferInstance] m μ := by have heq : m = (fun p : Fin J × ℝ => 1 / 2 + q p.2) ∘ design := rfl rw [heq] exact ((measurable_const.add (hqmeas.comp measurable_snd)).comp (Measurable.of_comap_le le_rfl)).aestronglyMeasurable have hint : ∀ T : Set (Fin J × ℝ), MeasurableSet T → (∫ o in design ⁻¹' T, o.Y ∂μ) = ∫ o in design ⁻¹' T, m o ∂μ := by intro T hT rw [minimaxDataMeasure_integral_Y_design J kappa hreg.1 hreg.2.1 g hgmeas hgbound T hT] rw [← integral_indicator (hT.preimage hdesign), ← integral_indicator hT] rw [← minimaxDataMeasure_map_design J kappa g hgmeas hgbound, integral_map hdesign.aemeasurable] · rfl · exact ((measurable_const.add hgmeas).indicator hT).aestronglyMeasurable have hver : P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] fun o => 1 / 2 + q o.A := by exact condExp_eq_of_integral_preimage_eq μ design hdesign (fun o => o.Y) m hY hm hm_design hint exact (cont_regression_extension_unique P kappa cminus cplus pmin deltaBar hP hreg _ (fun _ => 1 / 2 + q) hchosen.1 (fun _ => hcont) hchosen.2 hver x) ha
CausalSmith.Stat.LmtpThresholdAtomFrontier.contRegression_minimaxClampLaw_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityWitnessFunctional.lean:26
theorem contClampFunctional_minimaxClampLaw_eq

The continuity functional of a canonical witness agrees with its explicit clamp functional on the threshold range. The result uses the hreg condition, the hdelta condition, the hqmeas condition, the hqbound condition, the hcont condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar delta :
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
q :
ℝ → ℝ
hqmeas :
hqbound :
∀ a, |q a| ≤ 1 / 2
hcont :
ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) deltaBar)
P :
minimaxClampLaw J kappa (fun p => q p.2)
hP :
minimaxClampModel_continuous J kappa cminus cplus pmin deltaBar hreg.1 hreg.2.1 hreg.2.2.2.1 hreg.2.2.2.2.1 hreg.2.2.2.2.2.2.1 q hqmeas hqbound hcont
contClampFunctional P kappa cminus cplus pmin deltaBar hP delta = clampFunctional P delta
Proof (Lean source)
lemma contClampFunctional_minimaxClampLaw_eq (J : ℕ) (kappa cminus cplus pmin deltaBar delta : ℝ) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (q : ℝ → ℝ) (hqmeas : Measurable q) (hqbound : ∀ a, |q a| ≤ 1 / 2) (hcont : ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) deltaBar)) : let P := minimaxClampLaw J kappa (fun p => q p.2) let hP := minimaxClampModel_continuous J kappa cminus cplus pmin deltaBar hreg.1 hreg.2.1 hreg.2.2.2.1 hreg.2.2.2.2.1 hreg.2.2.2.2.2.2.1 q hqmeas hqbound hcont contClampFunctional P kappa cminus cplus pmin deltaBar hP delta = clampFunctional P delta := by dsimp only unfold contClampFunctional clampFunctional congr 1 apply Finset.sum_congr rfl intro x hx rw [contRegression_minimaxClampLaw_eq J kappa cminus cplus pmin deltaBar hreg q hqmeas hqbound hcont x delta hdelta] rfl
CausalSmith.Stat.LmtpThresholdAtomFrontier.contClampFunctional_minimaxClampLaw_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityWitnessFunctional.lean:99
theorem minimaxContinuityBumpSeparation

A fixed-height continuity bump changes the threshold functional by at least its atom contribution. The result uses the hJ condition, the hkappa condition, the hdelta condition, the hh condition, the hamp condition, the hamp_le condition. This is the stated conclusion.

Formal statement
J :
kappa delta h amplitude :
hJ :
0 < J
hkappa :
0 ≤ kappa
hdelta :
delta ∈ Icc (0 : ℝ) 1
hh :
0 < h
hamp :
0 ≤ amplitude
hamp_le :
amplitude ≤ 1 / 4
q :
fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h)
amplitude * delta ^ (kappa + 1)
clampFunctional (minimaxClampLaw J kappa (fun p => q p.2)) delta
- clampFunctional (minimaxClampLaw J kappa (fun _ => 0)) delta
Proof (Lean source)
lemma minimaxContinuityBumpSeparation (J : ℕ) (kappa delta h amplitude : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (hdelta : delta ∈ Icc (0 : ℝ) 1) (hh : 0 < h) (hamp : 0 ≤ amplitude) (hamp_le : amplitude ≤ 1 / 4) : let q := fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) amplitude * delta ^ (kappa + 1) ≤ clampFunctional (minimaxClampLaw J kappa (fun p => q p.2)) delta - clampFunctional (minimaxClampLaw J kappa (fun _ => 0)) delta := by dsimp only let q := fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) have hqmeas : Measurable q := by dsimp [q]; fun_prop have hq0 (a : ℝ) : 0 ≤ q a := by exact mul_nonneg hamp (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqbound (a : ℝ) : |q a| ≤ 1 / 2 := by rw [abs_of_nonneg (hq0 a)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - delta) / h) dsimp [q] nlinarith rw [minimaxClampFunctional J kappa delta hJ hkappa hdelta.1 q hqmeas hqbound, minimaxClampFunctional J kappa delta hJ hkappa hdelta.1 (fun _ => 0) measurable_const (fun _ => by norm_num)] haveI : IsProbabilityMeasure (minimaxTreatmentMeasure kappa) := minimaxTreatmentMeasure_isProbabilityMeasure kappa hkappa have hqint : Integrable q (minimaxTreatmentMeasure kappa) := by refine Integrable.of_bound hqmeas.aestronglyMeasurable (1 / 2) ?_ filter_upwards with a simpa [Real.norm_eq_abs] using hqbound a have honeint : Integrable (fun _ : ℝ => (1 / 2 : ℝ)) (minimaxTreatmentMeasure kappa) := integrable_const _ rw [show (∫ a in Ioi delta, (1 / 2 + q a) ∂minimaxTreatmentMeasure kappa) = (∫ a in Ioi delta, (1 / 2 : ℝ) ∂minimaxTreatmentMeasure kappa) + ∫ a in Ioi delta, q a ∂minimaxTreatmentMeasure kappa by rw [integral_add honeint.integrableOn hqint.integrableOn], show (∫ a in Ioi delta, (1 / 2 + 0) ∂minimaxTreatmentMeasure kappa) = ∫ a in Ioi delta, (1 / 2 : ℝ) ∂minimaxTreatmentMeasure kappa by simp] have hqdelta : q delta = amplitude := by simp [q, hh.ne', CausalSmith.Stat.DoseResponseMinimax.doseBump_zero] rw [hqdelta] have hnonneg : 0 ≤ ∫ a in Ioi delta, q a ∂minimaxTreatmentMeasure kappa := integral_nonneg_of_ae (ae_of_all _ hq0) nlinarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxContinuityBumpSeparation · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityWitnessFunctional.lean:124
theorem continuityBump_twoPoint

The canonical center and a fixed-height narrow bump form an admissible continuity-only two-point experiment with an explicit product chi-square budget and atom-scale functional separation. The result uses the hreg condition, the hdelta condition, the hh condition, the hamp condition, the hamp_le condition. This is the stated conclusion.

Formal statement
J n :
kappa cminus cplus pmin deltaBar delta h amplitude :
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hh :
0 < h
hamp :
0 ≤ amplitude
hamp_le :
amplitude ≤ 1 / 4
q :
fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h)
Q0 :
minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0)
Q1 :
minimaxClampLaw J kappa (fun p => q p.2)
∃ (hQ0 : ContClampModel Q0 kappa cminus cplus pmin deltaBar) (hQ1 : ContClampModel Q1 kappa cminus cplus pmin deltaBar),
conclusion 1
amplitude * delta ^ (kappa + 1)
≤ |contClampFunctional Q1 kappa cminus cplus pmin deltaBar hQ1 delta
- contClampFunctional Q0 kappa cminus cplus pmin deltaBar hQ0 delta|
conclusion 2
1 + productChiSq Q1 Q0 n
exp ((n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * h * (delta + h) ^ kappa))
Proof (Lean source)
lemma continuityBump_twoPoint (J n : ℕ) (kappa cminus cplus pmin deltaBar delta h amplitude : ℝ) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hh : 0 < h) (hamp : 0 ≤ amplitude) (hamp_le : amplitude ≤ 1 / 4) : let q := fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) let Q0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let Q1 := minimaxClampLaw J kappa (fun p => q p.2) ∃ (hQ0 : ContClampModel Q0 kappa cminus cplus pmin deltaBar) (hQ1 : ContClampModel Q1 kappa cminus cplus pmin deltaBar), amplitude * delta ^ (kappa + 1) ≤ |contClampFunctional Q1 kappa cminus cplus pmin deltaBar hQ1 delta - contClampFunctional Q0 kappa cminus cplus pmin deltaBar hQ0 delta| ∧ 1 + productChiSq Q1 Q0 n ≤ exp ((n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * h * (delta + h) ^ kappa)) := by dsimp only let q := fun a : ℝ => amplitude * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) let Q0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let Q1 := minimaxClampLaw J kappa (fun p => q p.2) have hcont0 : ContinuousOn (fun _ : ℝ => (1 / 2 : ℝ) + 0) (Icc (0 : ℝ) deltaBar) := by fun_prop have hqmeas : Measurable q := by dsimp [q]; fun_prop have hq0 (a : ℝ) : 0 ≤ q a := mul_nonneg hamp (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqbound (a : ℝ) : |q a| ≤ 1 / 2 := by rw [abs_of_nonneg (hq0 a)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - delta) / h) dsimp [q] nlinarith have hqstrict (p : Fin J × ℝ) : |q p.2| < 1 / 2 := by rw [abs_of_nonneg (hq0 p.2)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((p.2 - delta) / h) dsimp [q] nlinarith have hcont1 : ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) deltaBar) := by apply Continuous.continuousOn dsimp [q] have hb : Continuous CausalSmith.Stat.DoseResponseMinimax.doseBump := by unfold CausalSmith.Stat.DoseResponseMinimax.doseBump exact (CausalSmith.Stat.DoseResponseMinimax.doseContDiffBump.contDiff (n := ⊤)).continuous exact continuous_const.add (continuous_const.mul (hb.comp ((continuous_id.sub continuous_const).div_const h))) let hQ0 := minimaxConstant_mem_cont_model J kappa cminus cplus pmin deltaBar 0 hreg (by norm_num) let hQ1 := minimaxDoseBump_mem_cont_model J kappa cminus cplus pmin deltaBar delta h amplitude hreg hh hamp hamp_le refine ⟨hQ0, hQ1, ?_, ?_⟩ · rw [contClampFunctional_minimaxClampLaw_eq J kappa cminus cplus pmin deltaBar delta hreg hdelta q hqmeas hqbound hcont1, contClampFunctional_minimaxClampLaw_eq J kappa cminus cplus pmin deltaBar delta hreg hdelta (fun _ => 0) measurable_const (fun _ => by norm_num) hcont0] have hsep := minimaxContinuityBumpSeparation J kappa delta h amplitude hreg.1 hreg.2.1 ⟨hdelta.1, hdelta.2.trans hreg.2.2.2.2.2.2.2.2.le⟩ hh hamp hamp_le rw [abs_of_nonneg (hsep.trans' (mul_nonneg hamp (Real.rpow_nonneg hdelta.1 _)))] exact hsep · let I := ∫ p, 4 * ((fun p : Fin J × ℝ => q p.2) p) ^ 2 ∂minimaxDesignMeasure J kappa have hI : I ≤ 8 * (kappa + 1) * amplitude ^ 2 * h * (delta + h) ^ kappa := by have hi := minimaxLocal_designIntegral_le J 0 kappa delta h amplitude hreg.1 hreg.2.1 hdelta.1 hh hamp simpa [I, q] using hi have hI0 : 0 ≤ I := integral_nonneg_of_ae (ae_of_all _ fun _ => by positivity) have heq := minimaxProduct_chiSqDiv_center J n kappa hreg.1 hreg.2.1 (fun p : Fin J × ℝ => q p.2) (hqmeas.comp measurable_snd) hqstrict change 1 + productChiSq Q1 Q0 n = (1 + I) ^ n at heq rw [heq] calc (1 + I) ^ n ≤ (exp I) ^ n := pow_le_pow_left₀ (by linarith) (by simpa [add_comm] using Real.add_one_le_exp I) n _ = exp ((n : ℝ) * I) := by rw [Real.exp_nat_mul] _ ≤ exp ((n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * h * (delta + h) ^ kappa)) := Real.exp_le_exp.mpr (mul_le_mul_of_nonneg_left hI (Nat.cast_nonneg n))
CausalSmith.Stat.LmtpThresholdAtomFrontier.continuityBump_twoPoint · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityWitnessFunctional.lean:174
theorem continuityConstant_twoPoint

Two constant Bernoulli regressions give the regular root-sample-size two-point experiment inside the continuity-only model. The result uses the hreg condition, the hdelta condition, the heps condition, the heps_le condition. This is the stated conclusion.

Formal statement
J n :
kappa cminus cplus pmin deltaBar delta eps :
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
heps :
0 ≤ eps
heps_le :
eps ≤ 1 / 4
Q0 :
minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0)
Q1 :
minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps)
∃ (hQ0 : ContClampModel Q0 kappa cminus cplus pmin deltaBar) (hQ1 : ContClampModel Q1 kappa cminus cplus pmin deltaBar),
conclusion 1
eps
= |contClampFunctional Q1 kappa cminus cplus pmin deltaBar hQ1 delta
- contClampFunctional Q0 kappa cminus cplus pmin deltaBar hQ0 delta|
conclusion 2
1 + productChiSq Q1 Q0 n ≤ exp ((n : ℝ) * (4 * eps ^ 2))
Proof (Lean source)
lemma continuityConstant_twoPoint (J n : ℕ) (kappa cminus cplus pmin deltaBar delta eps : ℝ) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (heps : 0 ≤ eps) (heps_le : eps ≤ 1 / 4) : let Q0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let Q1 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps) ∃ (hQ0 : ContClampModel Q0 kappa cminus cplus pmin deltaBar) (hQ1 : ContClampModel Q1 kappa cminus cplus pmin deltaBar), eps = |contClampFunctional Q1 kappa cminus cplus pmin deltaBar hQ1 delta - contClampFunctional Q0 kappa cminus cplus pmin deltaBar hQ0 delta| ∧ 1 + productChiSq Q1 Q0 n ≤ exp ((n : ℝ) * (4 * eps ^ 2)) := by dsimp only let Q0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let Q1 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps) have hepsBound : |eps| ≤ 1 / 2 := by rw [abs_of_nonneg heps]; linarith have hepsStrict : |eps| < 1 / 2 := by rw [abs_of_nonneg heps] linarith have hcont0 : ContinuousOn (fun _ : ℝ => (1 / 2 : ℝ) + 0) (Icc (0 : ℝ) deltaBar) := by fun_prop have hcont1 : ContinuousOn (fun _ : ℝ => (1 / 2 : ℝ) + eps) (Icc (0 : ℝ) deltaBar) := by fun_prop let hQ0 := minimaxConstant_mem_cont_model J kappa cminus cplus pmin deltaBar 0 hreg (by norm_num) let hQ1 := minimaxConstant_mem_cont_model J kappa cminus cplus pmin deltaBar eps hreg hepsBound refine ⟨hQ0, hQ1, ?_, ?_⟩ · rw [contClampFunctional_minimaxClampLaw_eq J kappa cminus cplus pmin deltaBar delta hreg hdelta (fun _ => eps) measurable_const (fun _ => hepsBound) hcont1, contClampFunctional_minimaxClampLaw_eq J kappa cminus cplus pmin deltaBar delta hreg hdelta (fun _ => 0) measurable_const (fun _ => by norm_num) hcont0, minimaxGlobalSeparation J kappa delta eps hreg.1 hreg.2.1 ⟨hdelta.1, hdelta.2.trans hreg.2.2.2.2.2.2.2.2.le⟩ hepsBound, abs_of_nonneg heps] · have heq := minimaxProduct_chiSqDiv_center J n kappa hreg.1 hreg.2.1 (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepsStrict) have hI : (∫ _p, 4 * eps ^ 2 ∂minimaxDesignMeasure J kappa) = 4 * eps ^ 2 := by letI : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := minimaxDesignMeasure_isProbabilityMeasure J kappa hreg.1 hreg.2.1 simp change 1 + productChiSq Q1 Q0 n = (1 + ∫ _p, 4 * eps ^ 2 ∂minimaxDesignMeasure J kappa) ^ n at heq rw [hI] at heq rw [heq] calc (1 + 4 * eps ^ 2) ^ n ≤ (exp (4 * eps ^ 2)) ^ n := pow_le_pow_left₀ (by positivity) (by simpa [add_comm] using Real.add_one_le_exp (4 * eps ^ 2)) n _ = exp ((n : ℝ) * (4 * eps ^ 2)) := by rw [Real.exp_nat_mul]
CausalSmith.Stat.LmtpThresholdAtomFrontier.continuityConstant_twoPoint · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ContinuityWitnessFunctional.lean:263
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.Design 29 declarations This module gives full definitions of the paper's reference Gram, deterministic three-way split, local count and total Gram, exact intercept weights, stabilized estimator, bias-aware interval, and realized-design modulus

Realized local-polynomial design and estimators

This module gives full definitions of the paper's reference Gram, deterministic three-way split, local count and total Gram, exact intercept weights, stabilized estimator, bias-aware interval, and realized-design modulus handle.

def monomialVec

Monomial basis (1,u,...,u^ell).

Definition (Lean source)
ell :
u :
monomialVec ell u :
Fin (ell + 1) → ℝ
fun j => u ^ (j : ℕ)
CausalSmith.Stat.LmtpThresholdAtomFrontier.monomialVec · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:32
def refMomentMatrix

Normalized population reference moment matrix for (rho+u)^kappa.

Definition (Lean source)
ell :
kappa rho :
refMomentMatrix ell kappa rho :
Matrix (Fin (ell + 1)) (Fin (ell + 1)) ℝ
fun i j
=> (∫ u in Icc (0 : ℝ) 1, monomialVec ell u i * monomialVec ell u j * (rho + u) ^ kappa) / (∫ u in Icc (0 : ℝ) 1, (rho + u) ^ kappa)
CausalSmith.Stat.LmtpThresholdAtomFrontier.refMomentMatrix · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:36
def matrixQuadratic

Quadratic form of a real square matrix.

Definition (Lean source)
d :
A :
Matrix (Fin d) (Fin d) ℝ
z :
Fin d → ℝ
matrixQuadratic A z :
∑ i, ∑ j, z i * A i j * z j
CausalSmith.Stat.LmtpThresholdAtomFrontier.matrixQuadratic · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:45
def quadraticMin

Smallest quadratic-form value on the Euclidean unit sphere.

Definition (Lean source)
d :
A :
Matrix (Fin d) (Fin d) ℝ
quadraticMin A :
sInf {q : ℝ | ∃ z : Fin d → ℝ, (∑ i, (z i) ^ 2) = 1 ∧ q = matrixQuadratic A z}
CausalSmith.Stat.LmtpThresholdAtomFrontier.quadraticMin · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:50

Uniform population-Gram constant.

Definition (Lean source)
ell :
kappa cminus cplus :
lambdaStar ell kappa cminus cplus :
(cminus / cplus) * sInf {q : ℝ | ∃ rho : ℝ, 0 ≤ rho ∧ q = quadraticMin (refMomentMatrix ell kappa rho)}
CausalSmith.Stat.LmtpThresholdAtomFrontier.lambdaStar · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:55

Three deterministic, pairwise-disjoint sample blocks, each of size at least floor(n/4).

Definition (Lean source)
n :
I0 :
I1 :
I2 :
card_I0 :
n / 4 ≤ I0.card
card_I1 :
n / 4 ≤ I1.card
card_I2 :
n / 4 ≤ I2.card
disjoint01 :
Disjoint I0 I1
disjoint02 :
Disjoint I0 I2
disjoint12 :
Disjoint I1 I2
CausalSmith.Stat.LmtpThresholdAtomFrontier.SplitBlocks · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:61
def scaledDose

Rescaled location of one observed treatment relative to the moving threshold.

Definition (Lean source)
J :
shared
delta h :
o :
scaledDose delta h o :
(o.A - delta) / h
CausalSmith.Stat.LmtpThresholdAtomFrontier.scaledDose · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:74
def localCount

Number of observations in stratum x and the local threshold window.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
delta h :
localCount B z x delta h :
by classical exact ∑ i ∈ B.I2, if (z i).X = x ∧
(z i).A ∈ Icc delta (delta + h) then 1 else 0
CausalSmith.Stat.LmtpThresholdAtomFrontier.localCount · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:77
def localKernelWeight

The zero-one localization weight on the full finite design.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
delta h :
i :
Fin n
localKernelWeight B z x delta h i :
if i ∈ B.I2 ∧ (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 then 1 else 0
CausalSmith.Stat.LmtpThresholdAtomFrontier.localKernelWeight · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:85
def localGram

Unnormalized total local Gram matrix, realized by Causalean's weighted monomial design matrix.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
ell :
delta h :
localGram B z x ell delta h :
Matrix (Fin (ell + 1)) (Fin (ell + 1)) ℝ
designMatrix ell (fun i => scaledDose delta h (z i)) (localKernelWeight B z x delta h)
CausalSmith.Stat.LmtpThresholdAtomFrontier.localGram · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:91
theorem localGram_apply

For sample blocks, a realized sample, a stratum, a polynomial degree, a threshold and bandwidth, and two matrix coordinates, the local Gram entry equals the active-window monomial sum.

Formal statement
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
ell :
delta h :
r s :
Fin (ell + 1)
conclusion 1
localGram B z x ell delta h r s = ∑ i ∈ B.I2, if (z i).X = x
conclusion 2
scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 then monomialVec ell (scaledDose delta h (z i)) r * monomialVec ell (scaledDose delta h (z i)) s else 0
Proof (Lean source)
lemma localGram_apply (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (ell : ℕ) (delta h : ℝ) (r s : Fin (ell + 1)) : localGram B z x ell delta h r s = ∑ i ∈ B.I2, if (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 then monomialVec ell (scaledDose delta h (z i)) r * monomialVec ell (scaledDose delta h (z i)) s else 0 := by classical simp only [localGram, designMatrix] rw [show (∑ i, localKernelWeight B z x delta h i * scaledDose delta h (z i) ^ (r : ℕ) * scaledDose delta h (z i) ^ (s : ℕ)) = ∑ i ∈ B.I2, localKernelWeight B z x delta h i * scaledDose delta h (z i) ^ (r : ℕ) * scaledDose delta h (z i) ^ (s : ℕ) by symm apply Finset.sum_subset (Finset.subset_univ B.I2) intro i _ hi simp [localKernelWeight, hi]] apply Finset.sum_congr rfl intro i hi by_cases ha : (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 · simp [localKernelWeight, hi, ha, monomialVec] · rw [if_neg ha] have hw : localKernelWeight B z x delta h i = 0 := by rw [localKernelWeight, if_neg] exact fun hactive => ha hactive.2 rw [hw] simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.localGram_apply · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:99

The good-design event, encoded by its load-bearing quadratic-form lower bound.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
ell :
kappa cminus cplus delta h :
GoodGramEvent B z x ell kappa cminus cplus delta h :
Prop
clause 1
0 < localCount B z x delta h
clause 2
v :
Fin (ell + 1) → ℝ
lambdaStar ell kappa cminus cplus * (localCount B z x delta h : ℝ) / 2 * (∑ j, (v j) ^ 2)
matrixQuadratic (localGram B z x ell delta h) v
CausalSmith.Stat.LmtpThresholdAtomFrontier.GoodGramEvent · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:128
def interceptWeight

Exact local-polynomial intercept weight from Causalean's equivalent kernel on the good event, and zero off it.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
ell :
kappa cminus cplus delta h :
i :
Fin n
interceptWeight B z x ell kappa cminus cplus delta h i :
by classical exact if GoodGramEvent B z x ell kappa cminus cplus delta h then equivKernelWeight ell (fun j => scaledDose delta h (z j)) (localKernelWeight B z x delta h) i else 0
CausalSmith.Stat.LmtpThresholdAtomFrontier.interceptWeight · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:138
theorem interceptWeight_eq_mulVec Lemma 7 in the paper ↗

Given a good design, an observation in the regression block, the required stratum match, and local-window membership, the intercept weight is the zeroth coordinate of the inverse-Gram feature vector.

Formal statement
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
ell :
kappa cminus cplus delta h :
i :
Fin n
hgood :
GoodGramEvent B z x ell kappa cminus cplus delta h
hi :
i ∈ B.I2
hix :
(z i).X = x
hu :
scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1
interceptWeight B z x ell kappa cminus cplus delta h i
= ((localGram B z x ell delta h)⁻¹ *ᵥ monomialVec ell (scaledDose delta h (z i))) 0
Proof (Lean source)
lemma interceptWeight_eq_mulVec (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (ell : ℕ) (kappa cminus cplus delta h : ℝ) (i : Fin n) (hgood : GoodGramEvent B z x ell kappa cminus cplus delta h) (hi : i ∈ B.I2) (hix : (z i).X = x) (hu : scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1) : interceptWeight B z x ell kappa cminus cplus delta h i = ((localGram B z x ell delta h)⁻¹ *ᵥ monomialVec ell (scaledDose delta h (z i))) 0 := by classical rw [interceptWeight, if_pos hgood] simp only [equivKernelWeight, mulVec, dotProduct, localGram, monomialVec] simp [localKernelWeight, hi, hix, hu]
CausalSmith.Stat.LmtpThresholdAtomFrontier.interceptWeight_eq_mulVec · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:149
theorem interceptWeight_eq_equivKernel_of_good

On the good-design event, the intercept weight equals the equivalent-kernel weight.

Formal statement
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
ell :
kappa cminus cplus delta h :
hgood :
GoodGramEvent B z x ell kappa cminus cplus delta h
i :
Fin n
interceptWeight B z x ell kappa cminus cplus delta h i
= equivKernelWeight ell (fun j => scaledDose delta h (z j)) (localKernelWeight B z x delta h) i
Proof (Lean source)
lemma interceptWeight_eq_equivKernel_of_good (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (ell : ℕ) (kappa cminus cplus delta h : ℝ) (hgood : GoodGramEvent B z x ell kappa cminus cplus delta h) (i : Fin n) : interceptWeight B z x ell kappa cminus cplus delta h i = equivKernelWeight ell (fun j => scaledDose delta h (z j)) (localKernelWeight B z x delta h) i := by simp [interceptWeight, hgood]
CausalSmith.Stat.LmtpThresholdAtomFrontier.interceptWeight_eq_equivKernel_of_good · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:164
theorem interceptWeight_eq_zero_of_inactive

On the good-design event, if an observation is inactive, its intercept weight is zero.

Formal statement
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
ell :
kappa cminus cplus delta h :
i :
Fin n
hgood :
GoodGramEvent B z x ell kappa cminus cplus delta h
hi :
¬ (i ∈ B.I2 ∧ (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1)
interceptWeight B z x ell kappa cminus cplus delta h i = 0
Proof (Lean source)
lemma interceptWeight_eq_zero_of_inactive (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (ell : ℕ) (kappa cminus cplus delta h : ℝ) (i : Fin n) (hgood : GoodGramEvent B z x ell kappa cminus cplus delta h) (hi : ¬ (i ∈ B.I2 ∧ (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1)) : interceptWeight B z x ell kappa cminus cplus delta h i = 0 := by rw [interceptWeight_eq_equivKernel_of_good B z x ell kappa cminus cplus delta h hgood i] simp only [equivKernelWeight] have hw : localKernelWeight B z x delta h i = 0 := by rw [localKernelWeight, if_neg hi] simp [hw]
CausalSmith.Stat.LmtpThresholdAtomFrontier.interceptWeight_eq_zero_of_inactive · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:174

Projection to the outcome range [0,1].

Definition (Lean source)
t :
clampUnit t :
min 1 (max 0 t)
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampUnit · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:189

Empirical average over a deterministic finite block.

Definition (Lean source)
X :
Type*
m :
I :
z :
Fin m → X
f :
X → ℝ
blockAverage I z f :
(I.card : ℝ)⁻¹ * ∑ i ∈ I, f (z i)
CausalSmith.Stat.LmtpThresholdAtomFrontier.blockAverage · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:192
def retainedEstimate

Retained-course empirical mean on block zero.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
delta :
retainedEstimate B z delta :
blockAverage B.I0 z (fun o => if delta < o.A then o.Y else 0)
CausalSmith.Stat.LmtpThresholdAtomFrontier.retainedEstimate · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:197
def atomEstimate

Empirical threshold mass in one stratum on block one.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
delta :
atomEstimate B z x delta :
blockAverage B.I1 z (fun o => if o.X = x ∧ o.A ≤ delta then 1 else 0)
CausalSmith.Stat.LmtpThresholdAtomFrontier.atomEstimate · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:202
def localRegressionEstimate

Stabilized local regression value, with the prescribed one-half fallback.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
ell :
kappa cminus cplus delta h :
localRegressionEstimate B z x ell kappa cminus cplus delta h :
by classical exact if GoodGramEvent B z x ell kappa cminus cplus delta h then clampUnit (∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (z i).Y) else 1 / 2
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegressionEstimate · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:207
def totalGramEstimator

Sample-split total-Gram-stabilized estimator of the clamp functional.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
ell :
kappa cminus cplus delta h :
totalGramEstimator B z ell kappa cminus cplus delta h :
clampUnit (retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x ell kappa cminus cplus delta h)
CausalSmith.Stat.LmtpThresholdAtomFrontier.totalGramEstimator · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:216
def contFallbackEstimator

Continuity-only estimator using the retained-course block and the fixed one-half regression fallback for the total empirical atom mass.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
delta :
contFallbackEstimator B z delta :
clampUnit (retainedEstimate B z delta + (1 / 2 : ℝ) * ∑ x : Fin J, atomEstimate B z x delta)
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFallbackEstimator · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:225
def contHoeffdingInterval

Continuity-only Hoeffding interval, intersected with the outcome range.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
delta alpha :
contHoeffdingInterval B z delta alpha :
Set
t0 :
sqrt (log (4 / alpha) / (2 * (B.I0.card : ℝ)))
t1 :
sqrt (log (4 / alpha) / (2 * (B.I1.card : ℝ)))
atomTotal :
∑ x : Fin J, atomEstimate B z x delta
center :
radius :
t0 + t1 + atomTotal / 2
Icc (max 0 (center - radius)) (min 1 (center + radius))
CausalSmith.Stat.LmtpThresholdAtomFrontier.contHoeffdingInterval · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:234
def stratumRadius

The per-stratum bias-plus-noise radius, including the singular-Gram fallback.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
x :
Fin J
ell :
beta kappa L cminus cplus delta h tAlpha b1 :
stratumRadius B z x ell beta kappa L cminus cplus delta h tAlpha b1 :
by classical exact if GoodGramEvent B z x ell kappa cminus cplus delta h then (atomEstimate B z x delta + b1) * (L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x ell kappa cminus cplus delta h i| + tAlpha * sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2))
+ b1 else atomEstimate B z x delta
+ b1
CausalSmith.Stat.LmtpThresholdAtomFrontier.stratumRadius · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:246
def honestInterval

Bias-aware interval intersected with [0,1].

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
ell :
beta kappa L cminus cplus delta h alpha :
honestInterval B z ell beta kappa L cminus cplus delta h alpha :
Set
tAlpha :
sqrt (log (12 * (J : ℝ) / alpha) / 2)
b0 :
tAlpha / sqrt (B.I0.card : ℝ)
center :
totalGramEstimator B z ell kappa cminus cplus delta h
b1 :
tAlpha / sqrt (B.I1.card : ℝ)
radius :
b0 + ∑ x : Fin J, stratumRadius B z x ell beta kappa L cminus cplus delta h tAlpha b1
Icc (max 0 (center - radius)) (min 1 (center + radius))
CausalSmith.Stat.LmtpThresholdAtomFrontier.honestInterval · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:258
def exactHolderBias

Exact worst-case Hölder bias of affine weights on a realized local window. The derivatives are intrinsic to [0,1], so the value is invariant under any change to an ambient extension of the regression.

Definition (Lean source)
J :
shared
n :
shared
B :
z :
Fin n → ClampObs J
_x :
Fin J
@realizes exactHolderBias(realized Hölder-bias supremum)
ell :
beta L delta :
w :
Fin n → ℝ
exactHolderBias B z _x ell beta L delta w :
sSup {b : ℝ | ∃ f : ℝ → ℝ, ContinuousOn f (Icc (0 : ℝ) 1) ∧ (∀ a ∈ Icc (0 : ℝ) 1, f a ∈ Icc (0 : ℝ) 1) ∧ (∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |f t - ∑ j ∈ range (ell + 1), iteratedDerivWithin j f (Icc (0 : ℝ) 1) s * (t - s) ^ j / (Nat.factorial j : ℝ)| ≤ L * |t - s| ^ beta) ∧ b = |(∑ i ∈ B.I2, w i * f (z i).A) - f delta|}
CausalSmith.Stat.LmtpThresholdAtomFrontier.exactHolderBias · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:271
def realizedExactModulus

Conditional affine modulus for one realized design. Only observations in the local stratum-window may receive weight, and the full Hölder bias—not a coarse L h^beta sum |w_i| upper bound—is optimized.

Definition (Lean source)
J :
shared
n :
shared
@realizes realizedExactModulus(exact bias-plus-l2 infimum)
B :
z :
Fin n → ClampObs J
x :
Fin J
ell :
beta L delta h t :
_ht :
0 ≤ t
realizedExactModulus B z x ell beta L delta h t _ht :
sInf {v : ℝ | ∃ w : Fin n → ℝ, (∀ i, i ∉ B.I2 ∨ (z i).X ≠ x ∨ scaledDose delta h (z i) ∉ Icc (0 : ℝ) 1 → w i = 0) ∧ (∀ j : Fin (ell + 1), (∑ i ∈ B.I2, w i * monomialVec ell (scaledDose delta h (z i)) j) = if j = 0 then 1 else 0) ∧ v = exactHolderBias B z x ell beta L delta w + t * sqrt (∑ i ∈ B.I2, (w i) ^ 2)}
CausalSmith.Stat.LmtpThresholdAtomFrontier.realizedExactModulus · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:286
def exactModulusHandle

The realized-design exact-modulus handle integrates the conditional sample-dependent modulus under a probability/support-pinned polynomial- thinning design law, for a positive bandwidth and a nonnegative test multiplier.

Definition (Lean source)
J :
shared
n :
shared
P :
B :
x :
Fin J
ell :
beta kappa L cminus cplus pmin delta h t :
_hh :
0 < h
_ht :
0 ≤ t
_hmodel :
ClampModel P beta kappa L cminus cplus pmin
exactModulusHandle P B x ell beta kappa L cminus cplus pmin delta h t _hh _ht _hmodel :
∫ z, realizedExactModulus B z x ell beta L delta h t _ht ∂iidProduct P n
CausalSmith.Stat.LmtpThresholdAtomFrontier.exactModulusHandle · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Design.lean:302
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.Divergence 2 declarations The upper inequality uses the Causalean quarter-band lemma.

Two-sided Bernoulli divergence bridges

The upper inequality uses the Causalean quarter-band lemma. The lower inequality is the missing direction needed by the one-cell calibration and follows from the exact Bernoulli formula (or Pinsker with the exact two-atom variation).

theorem bernoulli_kl_band

On the quarter window, Bernoulli KL from 1/2+g to 1/2 is comparable to g^2 in both directions. The result uses the hg condition. This is the stated conclusion.

Formal statement
g :
hg :
|g| ≤ (1 : ℝ) / 4
conclusion 1
2 * g ^ 2
≤ (klDiv (bernoulliLaw (1 / 2 + g)) (bernoulliLaw (1 / 2))).toReal
conclusion 2
(klDiv (bernoulliLaw (1 / 2 + g)) (bernoulliLaw (1 / 2))).toReal
≤ 4 * g ^ 2
Proof (Lean source)
lemma bernoulli_kl_band (g : ℝ) (hg : |g| ≤ (1 : ℝ) / 4) : 2 * g ^ 2 ≤ (klDiv (bernoulliLaw (1 / 2 + g)) (bernoulliLaw (1 / 2))).toReal ∧ (klDiv (bernoulliLaw (1 / 2 + g)) (bernoulliLaw (1 / 2))).toReal ≤ 4 * g ^ 2 := by have hp_lo : (1 : ℝ) / 4 ≤ 1 / 2 + g := by rw [abs_le] at hg linarith have hp_hi : 1 / 2 + g ≤ (3 : ℝ) / 4 := by rw [abs_le] at hg linarith have hq_lo : (1 : ℝ) / 4 ≤ 1 / 2 := by norm_num have hq_hi : (1 / 2 : ℝ) ≤ 3 / 4 := by norm_num have hp0 : 0 ≤ 1 / 2 + g := by linarith have hp1 : 1 / 2 + g ≤ 1 := by linarith let μ := bernoulliLaw (1 / 2 + g) let ν := bernoulliLaw (1 / 2) haveI : IsProbabilityMeasure μ := Causalean.Mathlib.Probability.bernoulliLaw_isProbabilityMeasure hp0 hp1 haveI : IsProbabilityMeasure ν := Causalean.Mathlib.Probability.bernoulliLaw_isProbabilityMeasure (by norm_num) (by norm_num) have hac : μ ≪ ν := bernoulliLaw_ac_of_reference_interior (by norm_num) (by norm_num) have hKLle := Causalean.Mathlib.Probability.bernoulliLaw_klDiv_le_four_sq_sub hp_lo hp_hi hq_lo hq_hi have hfinite : klDiv μ ν ≠ ⊤ := ne_top_of_le_ne_top ENNReal.ofReal_ne_top hKLle have hpinsker := Causalean.Stat.pinskerBound_of_ac_of_ne_top μ ν hac hfinite have hgap : |g| ≤ tvDist μ ν := by have h := abs_measureReal_sub_le_tvDist (μ := μ) (ν := ν) (measurableSet_singleton (1 : ℝ)) have hμ1 : μ.real {(1 : ℝ)} = 1 / 2 + g := by norm_num [μ, bernoulliLaw, Measure.real, hp0] have hν1 : ν.real {(1 : ℝ)} = 1 / 2 := by simp [ν, bernoulliLaw, Measure.real] rw [hμ1, hν1] at h simpa [abs_sub_comm] using h constructor · have hsqrt : |g| ≤ sqrt ((klDiv μ ν).toReal / 2) := hgap.trans hpinsker have hsq := (sq_le_sq₀ (abs_nonneg g) (Real.sqrt_nonneg _)).2 hsqrt rw [sq_abs, Real.sq_sqrt (by positivity)] at hsq dsimp [μ, ν] at hsq ⊢ linarith · have hboundFinite : ofReal (4 * (1 / 2 + g - 1 / 2) ^ 2) ≠ ⊤ := ENNReal.ofReal_ne_top have hreal := (ENNReal.toReal_le_toReal hfinite hboundFinite).2 hKLle rw [ENNReal.toReal_ofReal (by positivity)] at hreal simpa [μ, ν] using hreal
CausalSmith.Stat.LmtpThresholdAtomFrontier.bernoulli_kl_band · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Divergence.lean:26
theorem localized_design_kl_band

Integrating the scalar band against a nonnegative design density preserves both inequalities, yielding the localized one-observation KL order. The result uses the hpi_int condition, the hgamma_meas condition, the hkl_meas condition, the hpi condition, the hgamma condition. This is the stated conclusion.

Formal statement
pi gamma :
ℝ → ℝ
hpi_int :
Integrable pi (volume.restrict (Icc (0 : ℝ) 1))
hgamma_meas :
hkl_meas :
=> (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal
hpi :
∀ᵐ a ∂volume.restrict (Icc (0 : ℝ) 1), 0 ≤ pi a
hgamma :
∀ a ∈ Icc (0 : ℝ) 1, |gamma a| ≤ (1 : ℝ) / 4
conclusion 1
2 * ∫ a in Icc (0 : ℝ) 1, (gamma a) ^ 2 * pi a
≤ ∫ a in Icc (0 : ℝ) 1, (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal * pi a
conclusion 2
(∫ a in Icc (0 : ℝ) 1, (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal * pi a)
≤ 4 * ∫ a in Icc (0 : ℝ) 1, (gamma a) ^ 2 * pi a
Proof (Lean source)
lemma localized_design_kl_band (pi gamma : ℝ → ℝ) (hpi_int : Integrable pi (volume.restrict (Icc (0 : ℝ) 1))) (hgamma_meas : Measurable gamma) (hkl_meas : Measurable fun a => (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal) (hpi : ∀ᵐ a ∂volume.restrict (Icc (0 : ℝ) 1), 0 ≤ pi a) (hgamma : ∀ a ∈ Icc (0 : ℝ) 1, |gamma a| ≤ (1 : ℝ) / 4) : 2 * ∫ a in Icc (0 : ℝ) 1, (gamma a) ^ 2 * pi a ≤ ∫ a in Icc (0 : ℝ) 1, (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal * pi a ∧ (∫ a in Icc (0 : ℝ) 1, (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal * pi a) ≤ 4 * ∫ a in Icc (0 : ℝ) 1, (gamma a) ^ 2 * pi a := by let μ := volume.restrict (Icc (0 : ℝ) 1) have hmem : ∀ᵐ a ∂μ, a ∈ Icc (0 : ℝ) 1 := ae_restrict_mem measurableSet_Icc have hsqInt : Integrable (fun a => gamma a ^ 2 * pi a) μ := by apply hpi_int.bdd_mul (c := (1 : ℝ) / 16) · fun_prop · filter_upwards [hmem] with a ha have hb := hgamma a ha rw [Real.norm_eq_abs, abs_sq] have hs := (sq_le_sq₀ (abs_nonneg (gamma a)) (by norm_num : (0 : ℝ) ≤ 1 / 4)).2 hb rw [sq_abs] at hs nlinarith have hklInt : Integrable (fun a => (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal * pi a) μ := by apply hpi_int.bdd_mul (c := (1 : ℝ) / 4) · exact hkl_meas.aestronglyMeasurable · filter_upwards [hmem] with a ha have hb := (bernoulli_kl_band (gamma a) (hgamma a ha)).2 have hnonneg : 0 ≤ (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal := ENNReal.toReal_nonneg rw [Real.norm_eq_abs, abs_of_nonneg hnonneg] have hgam := hgamma a ha have hs := (sq_le_sq₀ (abs_nonneg (gamma a)) (by norm_num : (0 : ℝ) ≤ 1 / 4)).2 hgam rw [sq_abs] at hs nlinarith constructor · rw [← integral_const_mul] apply integral_mono_ae (hsqInt.const_mul 2) hklInt filter_upwards [hpi, hmem] with a hpa ha simpa [mul_assoc] using mul_le_mul_of_nonneg_right (bernoulli_kl_band (gamma a) (hgamma a ha)).1 hpa · rw [← integral_const_mul] apply integral_mono_ae hklInt (hsqInt.const_mul 4) filter_upwards [hpi, hmem] with a hpa ha simpa [mul_assoc] using mul_le_mul_of_nonneg_right (bernoulli_kl_band (gamma a) (hgamma a ha)).2 hpa
CausalSmith.Stat.LmtpThresholdAtomFrontier.localized_design_kl_band · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Divergence.lean:88
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.EstimatorMeasurable 11 declarations Measurability of the realized total-Gram estimator

Measurability of the realized total-Gram estimator

theorem localCount_measurable

local count is measurable for the specified J input, the specified n input, the specified B input, the specified x input, the specified delta input, the specified h input.

Formal statement
J n :
B :
x :
Fin J
delta h :
Measurable fun z : Fin n → ClampObs J => localCount B z x delta h
Proof (Lean source)
lemma localCount_measurable {J n : ℕ} (B : SplitBlocks n) (x : Fin J) (delta h : ℝ) : Measurable fun z : Fin n → ClampObs J => localCount B z x delta h := by classical unfold localCount refine Finset.measurable_fun_sum _ fun i _ => Measurable.ite ?_ measurable_const measurable_const exact (measurableSet_eq_fun (measurable_obs_X.comp (measurable_pi_apply i)) measurable_const).inter (measurableSet_Icc.preimage (measurable_obs_A.comp (measurable_pi_apply i)))
CausalSmith.Stat.LmtpThresholdAtomFrontier.localCount_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:28
theorem localGram_entry_measurable

local gram entry is measurable for the specified J input, the specified n input, the specified ell input, the specified B input, the specified x input, the specified r input, the specified s input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
x :
Fin J
r s :
Fin (ell + 1)
delta h :
Measurable fun z : Fin n → ClampObs J => localGram B z x ell delta h r s
Proof (Lean source)
lemma localGram_entry_measurable {J n ell : ℕ} (B : SplitBlocks n) (x : Fin J) (r s : Fin (ell + 1)) (delta h : ℝ) : Measurable fun z : Fin n → ClampObs J => localGram B z x ell delta h r s := by classical simp only [localGram_apply] refine Finset.measurable_fun_sum _ fun i _ => Measurable.ite ?_ ?_ measurable_const · exact (measurableSet_eq_fun (measurable_obs_X.comp (measurable_pi_apply i)) measurable_const).inter (measurableSet_Icc.preimage (((measurable_obs_A.comp (measurable_pi_apply i)).sub measurable_const).div_const h)) · have hd : Measurable (fun z : Fin n → ClampObs J => ((z i).A - delta) / h) := ((measurable_obs_A.comp (measurable_pi_apply i)).sub measurable_const).div_const h exact (hd.pow_const (r : ℕ)).mul (hd.pow_const (s : ℕ))
CausalSmith.Stat.LmtpThresholdAtomFrontier.localGram_entry_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:40
theorem localGram_measurable

local gram is measurable for the specified J input, the specified n input, the specified ell input, the specified B input, the specified x input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
x :
Fin J
delta h :
Measurable fun z : Fin n → ClampObs J => localGram B z x ell delta h
Proof (Lean source)
lemma localGram_measurable {J n ell : ℕ} (B : SplitBlocks n) (x : Fin J) (delta h : ℝ) : Measurable fun z : Fin n → ClampObs J => localGram B z x ell delta h := by exact measurable_pi_lambda _ fun r => measurable_pi_lambda _ fun s => localGram_entry_measurable B x r s delta h
CausalSmith.Stat.LmtpThresholdAtomFrontier.localGram_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:55
theorem localGram_isHermitian

the stated local gram is hermitian property holds for the specified J input, the specified n input, the specified ell input, the specified B input, the specified z input, the specified x input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
z :
Fin n → ClampObs J
x :
Fin J
delta h :
(localGram B z x ell delta h).IsHermitian
Proof (Lean source)
lemma localGram_isHermitian {J n ell : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (delta h : ℝ) : (localGram B z x ell delta h).IsHermitian := by exact designMatrix_isHermitian (fun i => scaledDose delta h (z i)) (localKernelWeight B z x delta h)
CausalSmith.Stat.LmtpThresholdAtomFrontier.localGram_isHermitian · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:62
theorem localGram_inv_measurable

local gram inv is measurable for the specified J input, the specified n input, the specified ell input, the specified B input, the specified x input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
x :
Fin J
delta h :
Measurable fun z : Fin n → ClampObs J => (localGram B z x ell delta h)⁻¹
Proof (Lean source)
lemma localGram_inv_measurable {J n ell : ℕ} (B : SplitBlocks n) (x : Fin J) (delta h : ℝ) : Measurable fun z : Fin n → ClampObs J => (localGram B z x ell delta h)⁻¹ := by classical simp only [Matrix.inv_def] have hG := localGram_measurable (ell := ell) B x delta h have hdet : Measurable fun z : Fin n → ClampObs J => (localGram B z x ell delta h).det := continuous_id.matrix_det.measurable.comp hG have hadj : Measurable fun z : Fin n → ClampObs J => (localGram B z x ell delta h).adjugate := continuous_id.matrix_adjugate.measurable.comp hG convert (measurable_inv.comp hdet).smul hadj using 1 funext z rw [Ring.inverse_eq_inv] rfl
CausalSmith.Stat.LmtpThresholdAtomFrontier.localGram_inv_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:69
theorem goodGramEvent_measurable

good gram event is measurable for the specified J input, the specified n input, the specified ell input, the specified B input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
x :
Fin J
kappa cminus cplus delta h :
MeasurableSet {z : Fin n → ClampObs J | GoodGramEvent B z x ell kappa cminus cplus delta h}
Proof (Lean source)
lemma goodGramEvent_measurable {J n ell : ℕ} (B : SplitBlocks n) (x : Fin J) (kappa cminus cplus delta h : ℝ) : MeasurableSet {z : Fin n → ClampObs J | GoodGramEvent B z x ell kappa cminus cplus delta h} := by classical let a : (Fin n → ClampObs J) → ℝ := fun z => lambdaStar ell kappa cminus cplus * (localCount B z x delta h : ℝ) / 2 let F : (Fin n → ClampObs J) → Matrix (Fin (ell + 1)) (Fin (ell + 1)) ℝ := fun z => localGram B z x ell delta h - a z • 1 have ha : Measurable a := by dsimp [a] exact (measurable_const.mul ((measurable_of_countable (fun m : ℕ => (m : ℝ))).comp (localCount_measurable B x delta h))).div_const 2 have hF : Measurable F := by dsimp [F] exact measurable_pi_lambda _ fun r => measurable_pi_lambda _ fun s => by simp only [Matrix.sub_apply, Matrix.smul_apply] exact (localGram_entry_measurable B x r s delta h).sub (ha.mul measurable_const) have hpsd : MeasurableSet {A : Matrix (Fin (ell + 1)) (Fin (ell + 1)) ℝ | A.PosSemidef} := Causalean.Mathlib.Analysis.isClosed_posSemidef.measurableSet have heq : {z : Fin n → ClampObs J | GoodGramEvent B z x ell kappa cminus cplus delta h} = {z | 0 < localCount B z x delta h} ∩ F ⁻¹' {A | A.PosSemidef} := by ext z simp only [Set.mem_setOf_eq, Set.mem_inter_iff, Set.mem_preimage] unfold GoodGramEvent constructor · rintro ⟨hcount, hquad⟩ refine ⟨hcount, Matrix.PosSemidef.of_dotProduct_mulVec_nonneg ?_ ?_⟩ · dsimp [F] exact (localGram_isHermitian B z x delta h).sub (Matrix.isHermitian_one.smul (star_trivial (a z))) · intro v have hv := hquad v dsimp [F, a] have hid : star v ⬝ᵥ ((localGram B z x ell delta h - (lambdaStar ell kappa cminus cplus * (localCount B z x delta h : ℝ) / 2) • 1) *ᵥ v) = matrixQuadratic (localGram B z x ell delta h) v - lambdaStar ell kappa cminus cplus * (localCount B z x delta h : ℝ) / 2 * ∑ j, v j ^ 2 := by rw [Matrix.sub_mulVec, dotProduct_sub, Matrix.smul_mulVec, Matrix.one_mulVec] simp only [matrixQuadratic, dotProduct] congr 1 · simp [mulVec, dotProduct, Finset.mul_sum, mul_assoc] · rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j hj simp ring rw [hid] exact sub_nonneg.mpr hv · rintro ⟨hcount, hpsd'⟩ refine ⟨hcount, fun v => ?_⟩ have hv := hpsd'.dotProduct_mulVec_nonneg v dsimp [F, a] at hv have hid : star v ⬝ᵥ ((localGram B z x ell delta h - (lambdaStar ell kappa cminus cplus * (localCount B z x delta h : ℝ) / 2) • 1) *ᵥ v) = matrixQuadratic (localGram B z x ell delta h) v - lambdaStar ell kappa cminus cplus * (localCount B z x delta h : ℝ) / 2 * ∑ j, v j ^ 2 := by rw [Matrix.sub_mulVec, dotProduct_sub, Matrix.smul_mulVec, Matrix.one_mulVec] simp only [matrixQuadratic, dotProduct] congr 1 · simp [mulVec, dotProduct, Finset.mul_sum, mul_assoc] · rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j hj simp ring rw [hid] at hv exact sub_nonneg.mp hv rw [heq] exact (measurableSet_lt measurable_const (localCount_measurable B x delta h)).inter (hpsd.preimage hF)
CausalSmith.Stat.LmtpThresholdAtomFrontier.goodGramEvent_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:88
theorem interceptWeight_measurable

intercept weight is measurable for the specified J input, the specified n input, the specified ell input, the specified B input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input, the specified i input.

Formal statement
J n ell :
B :
x :
Fin J
kappa cminus cplus delta h :
i :
Fin n
Measurable fun z : Fin n → ClampObs J
=> interceptWeight B z x ell kappa cminus cplus delta h i
Proof (Lean source)
lemma interceptWeight_measurable {J n ell : ℕ} (B : SplitBlocks n) (x : Fin J) (kappa cminus cplus delta h : ℝ) (i : Fin n) : Measurable fun z : Fin n → ClampObs J => interceptWeight B z x ell kappa cminus cplus delta h i := by classical unfold interceptWeight have hs := scaledDose_measurable (J := J) i delta h refine Measurable.ite (goodGramEvent_measurable B x kappa cminus cplus delta h) ?_ measurable_const have hw : Measurable fun z : Fin n → ClampObs J => localKernelWeight B z x delta h i := by unfold localKernelWeight by_cases hi : i ∈ B.I2 · simp only [hi, true_and] exact Measurable.ite ((measurableSet_eq_fun (measurable_obs_X.comp (measurable_pi_apply i)) measurable_const).inter (measurableSet_Icc.preimage hs)) measurable_const measurable_const · simp [hi] simp only [equivKernelWeight] refine Finset.measurable_fun_sum _ fun j _ => ?_ exact (measurable_pi_apply j |>.comp (measurable_pi_apply 0 |>.comp (localGram_inv_measurable (ell := ell) B x delta h))).mul (hw.mul (hs.pow_const (j : ℕ)))
CausalSmith.Stat.LmtpThresholdAtomFrontier.interceptWeight_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:178
theorem retainedEstimate_measurable

retained estimate is measurable for the specified J input, the specified n input, the specified B input, the specified delta input.

Formal statement
J n :
B :
delta :
Measurable fun z : Fin n → ClampObs J => retainedEstimate B z delta
Proof (Lean source)
lemma retainedEstimate_measurable {J n : ℕ} (B : SplitBlocks n) (delta : ℝ) : Measurable fun z : Fin n → ClampObs J => retainedEstimate B z delta := by classical unfold retainedEstimate blockAverage refine measurable_const.mul (Finset.measurable_fun_sum _ fun i _ => ?_) exact Measurable.ite (measurableSet_lt measurable_const (measurable_obs_A.comp (measurable_pi_apply i))) (measurable_obs_Y.comp (measurable_pi_apply i)) measurable_const
CausalSmith.Stat.LmtpThresholdAtomFrontier.retainedEstimate_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:205
theorem atomEstimate_measurable

atom estimate is measurable for the specified J input, the specified n input, the specified B input, the specified x input, the specified delta input.

Formal statement
J n :
B :
x :
Fin J
delta :
Measurable fun z : Fin n → ClampObs J => atomEstimate B z x delta
Proof (Lean source)
lemma atomEstimate_measurable {J n : ℕ} (B : SplitBlocks n) (x : Fin J) (delta : ℝ) : Measurable fun z : Fin n → ClampObs J => atomEstimate B z x delta := by classical unfold atomEstimate blockAverage refine measurable_const.mul (Finset.measurable_fun_sum _ fun i _ => Measurable.ite ?_ measurable_const measurable_const) exact (measurableSet_eq_fun (measurable_obs_X.comp (measurable_pi_apply i)) measurable_const).inter (measurableSet_le (measurable_obs_A.comp (measurable_pi_apply i)) measurable_const)
CausalSmith.Stat.LmtpThresholdAtomFrontier.atomEstimate_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:216
theorem localRegressionEstimate_measurable

local regression estimate is measurable for the specified J input, the specified n input, the specified ell input, the specified B input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
x :
Fin J
kappa cminus cplus delta h :
Measurable fun z : Fin n → ClampObs J
=> localRegressionEstimate B z x ell kappa cminus cplus delta h
Proof (Lean source)
lemma localRegressionEstimate_measurable {J n ell : ℕ} (B : SplitBlocks n) (x : Fin J) (kappa cminus cplus delta h : ℝ) : Measurable fun z : Fin n → ClampObs J => localRegressionEstimate B z x ell kappa cminus cplus delta h := by classical unfold localRegressionEstimate refine Measurable.ite (goodGramEvent_measurable B x kappa cminus cplus delta h) ?_ measurable_const apply clampUnit_measurable.comp refine Finset.measurable_fun_sum _ fun i _ => ?_ exact (interceptWeight_measurable B x kappa cminus cplus delta h i).mul (measurable_obs_Y.comp (measurable_pi_apply i))
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegressionEstimate_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:233
theorem totalGramEstimator_measurable

total gram estimator is measurable for the specified J input, the specified n input, the specified ell input, the specified B input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
kappa cminus cplus delta h :
Measurable fun z : Fin n → ClampObs J
=> totalGramEstimator B z ell kappa cminus cplus delta h
Proof (Lean source)
theorem totalGramEstimator_measurable {J n ell : ℕ} (B : SplitBlocks n) (kappa cminus cplus delta h : ℝ) : Measurable fun z : Fin n → ClampObs J => totalGramEstimator B z ell kappa cminus cplus delta h := by classical unfold totalGramEstimator apply clampUnit_measurable.comp refine (retainedEstimate_measurable B delta).add (Finset.measurable_fun_sum _ fun x _ => ?_) exact (atomEstimate_measurable B x delta).mul (localRegressionEstimate_measurable B x kappa cminus cplus delta h)
CausalSmith.Stat.LmtpThresholdAtomFrontier.totalGramEstimator_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/EstimatorMeasurable.lean:247
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.FixedPositive 1 declarations This module closes the fixed-threshold branch from the moving-threshold rate lemmas.

Fixed-positive-threshold frontier

This module closes the fixed-threshold branch from the moving-threshold rate lemmas.

theorem fixed_positive_frontier_asymp

If the threshold converges to a positive constant, the actual frontier has the fixed-threshold nonparametric order. The result uses the hreg condition, the hdelta0 condition, the hdelta condition, the htend condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha delta0 :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hdelta0 :
0 < delta0
deltaSeq :
ℕ → ℝ
hdelta :
ThresholdSequence deltaBar deltaSeq
htend :
Tendsto deltaSeq atTop (nhds delta0)
AsympSeq (fun n => clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta) (fun n => (n : ℝ) ^ (-beta / (2 * beta + 1)))
Proof (Lean source)
-- @node: fixed_positive_frontier_asymp lemma fixed_positive_frontier_asymp (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha delta0 : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hdelta0 : 0 < delta0) (deltaSeq : ℕ → ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) (htend : Tendsto deltaSeq atTop (nhds delta0)) : AsympSeq (fun n => clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta) (fun n => (n : ℝ) ^ (-beta / (2 * beta + 1))) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hreg' : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha := ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hratio := fixed_positive_threshold_ratio_critical_top J beta kappa L cminus cplus pmin deltaBar alpha delta0 hreg' hdelta0 deltaSeq htend have hsuper := supercritical_frontier_asymp J beta kappa L cminus cplus pmin deltaBar alpha hreg' deltaSeq hdelta hratio let a : ℝ := (beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1) have ha : 0 < a := by dsimp [a]; positivity have hpow : Tendsto (fun n => (deltaSeq n) ^ a) atTop (nhds (delta0 ^ a)) := (Real.continuousAt_rpow_const delta0 a (inr ha.le)).tendsto.comp htend have hbase : ∀ᶠ n : ℕ in atTop, 0 < (n : ℝ) ^ (-beta / (2 * beta + 1)) := by filter_upwards [eventually_gt_atTop 0] with n hn exact Real.rpow_pos_of_pos (by exact_mod_cast hn) _ have hinterior : AsympSeq (fun n => (deltaSeq n) ^ (kappa + 1) * ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-beta / (2 * beta + 1))) (fun n => (n : ℝ) ^ (-beta / (2 * beta + 1))) := by apply asympSeq_of_tendsto_div_pos _ _ (delta0 ^ a) (Real.rpow_pos_of_pos hdelta0 _) · exact hbase · refine hpow.congr' ?_ filter_upwards [eventually_gt_atTop 0, htend (Ioi_mem_nhds hdelta0)] with n hn hd have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hexact := atom_interior_scale_exact (n : ℝ) (deltaSeq n) beta kappa hnR hd hbeta have hflat : ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-beta / (2 * beta + 1)) = (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta := by rw [← Real.rpow_mul (mul_nonneg hnR.le (Real.rpow_nonneg hd.le kappa))] congr 1 ring rw [hflat, hexact] rw [mul_div_cancel_left₀] exact (Real.rpow_pos_of_pos hnR _).ne' exact asympSeq_trans hsuper hinterior
CausalSmith.Stat.LmtpThresholdAtomFrontier.fixed_positive_frontier_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/FixedPositive.lean:21
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.HonestCoverage 4 declarations Finite-sample coverage of the bias-aware interval

Finite-sample coverage of the bias-aware interval

theorem honest_blockAverage_hoeffding

Hoeffding for a deterministic block, proved directly from the Causalean finite-product theorem and hence requiring no external theorem gate. The result uses the hf condition, the hf01 condition, the ht condition. This is the stated conclusion.

Formal statement
X :
n :
I :
f :
X → ℝ
hf :
hf01 :
∀ x, f x ∈ Icc (0 : ℝ) 1
t :
ht :
0 < t
(Measure.pi (fun _ : Fin n => P)).real {z | |blockAverage I z f - ∫ x, f x ∂P| > t}
≤ 2 * exp (-2 * (I.card : ℝ) * t ^ 2)
Proof (Lean source)
lemma honest_blockAverage_hoeffding {X : Type} [MeasurableSpace X] (P : Measure X) [IsProbabilityMeasure P] {n : ℕ} (I : Finset (Fin n)) (f : X → ℝ) (hf : Measurable f) (hf01 : ∀ x, f x ∈ Icc (0 : ℝ) 1) (t : ℝ) (ht : 0 < t) : (Measure.pi (fun _ : Fin n => P)).real {z | |blockAverage I z f - ∫ x, f x ∂P| > t} ≤ 2 * exp (-2 * (I.card : ℝ) * t ^ 2) := by classical by_cases hI : I.card = 0 · exact (measureReal_le_one (μ := Measure.pi fun _ : Fin n => P) (s := {z | |blockAverage I z f - ∫ x, f x ∂P| > t})).trans (by simp [hI]) let S := Causalean.Stat.iidSample_infinitePi P let sumFin : (Fin n → X) → ℝ := fun z => ∑ i ∈ I, f (z i) let sumInf : (ℕ → X) → ℝ := Causalean.Stat.Concentration.bernoulliCount S f I.card let A : Set ℝ := {y | |(I.card : ℝ)⁻¹ * y - ∫ x, f x ∂P| > t} have hA : MeasurableSet A := by exact measurableSet_lt measurable_const (((measurable_const.mul measurable_id).sub measurable_const).abs) have hsumFin : Measurable sumFin := by exact Finset.measurable_fun_sum I fun i _ => hf.comp (measurable_pi_apply i) have hsumInf : Measurable sumInf := by dsimp [sumInf] exact Finset.measurable_fun_sum _ fun i _ => hf.comp (S.meas i) have hlaw : (Measure.pi (fun _ : Fin n => P)).map sumFin = (Measure.infinitePi (fun _ : ℕ => P)).map sumInf := by calc _ = (Measure.pi (fun _ : Fin I.card => P)).map (fun z => ∑ j : Fin I.card, f (z j)) := block_count_law_eq P I f hf _ = _ := range_count_transport P I.card f hf have htail := hoeffding_abs_ge S hf (a := 0) (b := 1) (by norm_num) (ae_of_all _ hf01) I.card (Nat.pos_of_ne_zero hI) ht.le have hfinite : (Measure.pi (fun _ : Fin n => P)).real (sumFin ⁻¹' A) = ((Measure.pi (fun _ : Fin n => P)).map sumFin).real A := by simpa only [measureReal_def] using congrArg toReal (Measure.map_apply hsumFin hA).symm have hinf : (Measure.infinitePi (fun _ : ℕ => P)).real (sumInf ⁻¹' A) = ((Measure.infinitePi (fun _ : ℕ => P)).map sumInf).real A := by simpa only [measureReal_def] using congrArg toReal (Measure.map_apply hsumInf hA).symm have hle : (Measure.infinitePi (fun _ : ℕ => P)).real (sumInf ⁻¹' A) ≤ 2 * exp (-2 * (I.card : ℝ) * t ^ 2) := by refine (measureReal_mono (μ := Measure.infinitePi (fun _ : ℕ => P)) (s₁ := sumInf ⁻¹' A) (s₂ := {w | t ≤ |S.sampleMean f I.card w - ∫ x, f x ∂P|}) ?_).trans ?_ · intro w hw change t < |(I.card : ℝ)⁻¹ * sumInf w - ∫ x, f x ∂P| at hw change t ≤ |S.sampleMean f I.card w - ∫ x, f x ∂P| simpa [S, sumInf, sampleMean, Causalean.Stat.Concentration.bernoulliCount] using le_of_lt hw · simpa [S, sumInf, A, sampleMean] using htail calc (Measure.pi (fun _ : Fin n => P)).real {z | |blockAverage I z f - ∫ x, f x ∂P| > t} = (Measure.pi (fun _ : Fin n => P)).real (sumFin ⁻¹' A) := by rfl _ = ((Measure.pi (fun _ : Fin n => P)).map sumFin).real A := hfinite _ = ((Measure.infinitePi (fun _ : ℕ => P)).map sumInf).real A := by rw [hlaw] _ = (Measure.infinitePi (fun _ : ℕ => P)).real (sumInf ⁻¹' A) := hinf.symm _ ≤ _ := hle
CausalSmith.Stat.LmtpThresholdAtomFrontier.honest_blockAverage_hoeffding · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestCoverage.lean:22
theorem honest_radius_tail_le

The common logarithmic radius gives each of the 2J+1 bad events ample budget under the union bound. The result uses the hJ condition, the hm condition, the ha condition, the ha1 condition. This is the stated conclusion.

Formal statement
J m :
alpha :
hJ :
0 < J
hm :
0 < m
ha :
0 < alpha
ha1 :
alpha < 1 / 2
2 * exp (-2 * (m : ℝ) * (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (m : ℝ)) ^ 2)
≤ alpha / (6 * (J : ℝ))
Proof (Lean source)
lemma honest_radius_tail_le (J m : ℕ) (alpha : ℝ) (hJ : 0 < J) (hm : 0 < m) (ha : 0 < alpha) (ha1 : alpha < 1 / 2) : 2 * exp (-2 * (m : ℝ) * (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (m : ℝ)) ^ 2) ≤ alpha / (6 * (J : ℝ)) := by have hJR : 0 < (J : ℝ) := by positivity have hmR : 0 < (m : ℝ) := by positivity have hJone : (1 : ℝ) ≤ J := by exact_mod_cast hJ have hq : 1 < 12 * (J : ℝ) / alpha := by rw [lt_div_iff₀ ha] have : alpha < 6 := lt_trans ha1 (by norm_num) nlinarith have hlog : 0 ≤ log (12 * (J : ℝ) / alpha) := (Real.log_pos hq).le rw [div_pow, Real.sq_sqrt (by positivity : 0 ≤ (m : ℝ)), Real.sq_sqrt (div_nonneg hlog (by norm_num : (0 : ℝ) ≤ 2))] have he : -2 * (m : ℝ) * ((log (12 * (J : ℝ) / alpha) / 2) / (m : ℝ)) = -log (12 * (J : ℝ) / alpha) := by field_simp rw [he, Real.exp_neg, Real.exp_log (by positivity : 0 < 12 * (J : ℝ) / alpha)] field_simp norm_num
CausalSmith.Stat.LmtpThresholdAtomFrontier.honest_radius_tail_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestCoverage.lean:88
theorem honest_weighted_tail_le

honest weighted tail satisfies the stated upper bound for the specified J input, the specified alpha input, the specified hJ input, the specified ha input, the specified ha1 input.

Formal statement
J :
alpha :
hJ :
0 < J
ha :
0 < alpha
ha1 :
alpha < 1 / 2
2 * exp (-2 * (sqrt (log (12 * (J : ℝ) / alpha) / 2)) ^ 2)
≤ alpha / (6 * (J : ℝ))
Proof (Lean source)
lemma honest_weighted_tail_le (J : ℕ) (alpha : ℝ) (hJ : 0 < J) (ha : 0 < alpha) (ha1 : alpha < 1 / 2) : 2 * exp (-2 * (sqrt (log (12 * (J : ℝ) / alpha) / 2)) ^ 2) ≤ alpha / (6 * (J : ℝ)) := by have hJR : 0 < (J : ℝ) := by positivity have hJone : (1 : ℝ) ≤ J := by exact_mod_cast hJ have hq : 1 < 12 * (J : ℝ) / alpha := by rw [lt_div_iff₀ ha] have : alpha < 6 := lt_trans ha1 (by norm_num) nlinarith have hlog : 0 ≤ log (12 * (J : ℝ) / alpha) := (Real.log_pos hq).le rw [Real.sq_sqrt (div_nonneg hlog (by norm_num : (0 : ℝ) ≤ 2))] have he : -2 * (log (12 * (J : ℝ) / alpha) / 2) = -log (12 * (J : ℝ) / alpha) := by ring rw [he, Real.exp_neg, Real.exp_log (by positivity : 0 < 12 * (J : ℝ) / alpha)] field_simp norm_num
CausalSmith.Stat.LmtpThresholdAtomFrontier.honest_weighted_tail_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestCoverage.lean:113
theorem honestInterval_coverage_model

Every fixed model law is covered by the bias-aware interval with probability at least 1-alpha. The result uses the hmodel condition, the hJ condition, the hbeta condition, the hL condition, the ha condition, the ha1 condition, the hn condition, the hdelta condition, the hupper condition, the hh condition, the hlambda condition. This is the stated conclusion.

Formal statement
J n :
P :
B :
beta kappa L cminus cplus pmin delta h alpha :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hJ :
0 < J
hbeta :
0 < beta
hL :
0 < L
ha :
0 < alpha
ha1 :
alpha < 1 / 2
hn :
4 ≤ n
hdelta :
0 ≤ delta
hupper :
delta + h ≤ 1
hh :
0 < h
hlambda :
0 < lambdaStar (ellOf beta) kappa cminus cplus
1 - alpha
≤ (iidProduct P n).real {z | clampFunctional P delta ∈ honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha}
Proof (Lean source)
lemma honestInterval_coverage_model {J n : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (beta kappa L cminus cplus pmin delta h alpha : ℝ) (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hJ : 0 < J) (hbeta : 0 < beta) (hL : 0 < L) (ha : 0 < alpha) (ha1 : alpha < 1 / 2) (hn : 4 ≤ n) (hdelta : 0 ≤ delta) (hupper : delta + h ≤ 1) (hh : 0 < h) (hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus) : 1 - alpha ≤ (iidProduct P n).real {z | clampFunctional P delta ∈ honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha} := by classical letI : IsProbabilityMeasure P.dataMeasure := hmodel.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct; infer_instance let t := sqrt (log (12 * (J : ℝ) / alpha) / 2) let b0 := t / sqrt (B.I0.card : ℝ) let b1 := t / sqrt (B.I1.card : ℝ) let f0 : ClampObs J → ℝ := fun o => if delta < o.A then clampUnit o.Y else 0 let f1 : Fin J → ClampObs J → ℝ := fun x o => if o.X = x ∧ o.A ≤ delta then 1 else 0 let bad0 : Set (Fin n → ClampObs J) := {z | |blockAverage B.I0 z f0 - ∫ o, f0 o ∂P.dataMeasure| > b0} let bad1 : Fin J → Set (Fin n → ClampObs J) := fun x => {z | |blockAverage B.I1 z (f1 x) - ∫ o, f1 x o ∂P.dataMeasure| > b1} let bad2 : Fin J → Set (Fin n → ClampObs J) := fun x => {z | GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h ∧ t * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) ≤ |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * ((z i).Y - clampRegressionExtension P ((z i).X, (z i).A))|} let bad := bad0 ∪ (⋃ x, bad1 x) ∪ (⋃ x, bad2 x) let good : Set (Fin n → ClampObs J) := {z | clampFunctional P delta ∈ honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha} have hcard0 : 0 < B.I0.card := by have := B.card_I0; omega have hcard1 : 0 < B.I1.card := by have := B.card_I1; omega have ht : 0 < t := by dsimp [t] have hJR : (1 : ℝ) ≤ J := by exact_mod_cast hJ have hq : 1 < 12 * (J : ℝ) / alpha := by rw [lt_div_iff₀ ha] nlinarith exact Real.sqrt_pos.2 (div_pos (Real.log_pos hq) (by norm_num)) have hb0pos : 0 < b0 := div_pos ht (Real.sqrt_pos.2 (by positivity)) have hb1pos : 0 < b1 := div_pos ht (Real.sqrt_pos.2 (by positivity)) have hf0 : Measurable f0 := by exact Measurable.ite (measurableSet_lt measurable_const (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) (clampUnit_measurable'.comp clampOutcome_measurable) measurable_const have hf1 : ∀ x, Measurable (f1 x) := by intro x exact Measurable.ite ((measurableSet_eq_fun (measurable_fst.comp (Measurable.of_comap_le le_rfl)) measurable_const).inter (measurableSet_le (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))) measurable_const)) measurable_const measurable_const have hf001 : ∀ o, f0 o ∈ Icc (0 : ℝ) 1 := by intro o; dsimp [f0]; split_ifs · exact clampUnit_mem_Icc _ · norm_num have hf101 : ∀ x o, f1 x o ∈ Icc (0 : ℝ) 1 := by intro x o; dsimp [f1]; split_ifs <;> norm_num have hbad0 : (iidProduct P n).real bad0 ≤ alpha / (6 * (J : ℝ)) := by have hcal := honest_radius_tail_le J (B.I0.card) alpha hJ hcard0 ha ha1 exact (honest_blockAverage_hoeffding P.dataMeasure B.I0 f0 hf0 hf001 b0 hb0pos).trans (by simpa [b0, t] using hcal) have hbad1 : ∀ x, (iidProduct P n).real (bad1 x) ≤ alpha / (6 * (J : ℝ)) := by intro x have hcal := honest_radius_tail_le J (B.I1.card) alpha hJ hcard1 ha ha1 exact (honest_blockAverage_hoeffding P.dataMeasure B.I1 (f1 x) (hf1 x) (fun o => hf101 x o) b1 hb1pos).trans (by simpa [b1, t] using hcal) have hbad2 : ∀ x, (iidProduct P n).real (bad2 x) ≤ alpha / (6 * (J : ℝ)) := by intro x exact (block_weighted_tail_on_good_gram P hmodel B x delta h t ⟨0, by omega⟩ hlambda ht.le).trans (by simpa [t] using honest_weighted_tail_le J alpha hJ ha ha1) have hm0 : ∫ o, f0 o ∂P.dataMeasure = retainedMean P delta := by calc _ = ∫ o, (if delta < o.A then o.Y else 0) ∂P.dataMeasure := by apply integral_congr_ae filter_upwards [hmodel.outcomeSupport] with o ho simp [f0, clampUnit, ho.1, ho.2] _ = _ := by unfold retainedMean apply integral_congr_ae filter_upwards with o by_cases hd : delta < o.A <;> simp [indicator, hd] have hm1 : ∀ x, ∫ o, f1 x o ∂P.dataMeasure = P.px x * atomMass P x delta := by intro x simpa [f1] using atomEvent_integral_eq P hmodel x (by linarith) have hsub : ∀ᵐ z ∂iidProduct P n, z ∈ goodᶜ → z ∈ bad := by filter_upwards [iidProduct_outcomeSupport P hmodel] with z hz intro hzg by_contra hzbad have hnb0 : z ∉ bad0 := fun h => hzbad (inl (inl h)) have hnb1 : ∀ x, z ∉ bad1 x := by intro x hx exact hzbad (inl (inr (Set.mem_iUnion.2 ⟨x, hx⟩))) have hnb2 : ∀ x, z ∉ bad2 x := by intro x hx exact hzbad (inr (Set.mem_iUnion.2 ⟨x, hx⟩)) have hret : |retainedEstimate B z delta - retainedMean P delta| ≤ b0 := by have hnb0' := hnb0 dsimp [bad0] at hnb0' have := le_of_not_gt hnb0' have hre : retainedEstimate B z delta = blockAverage B.I0 z f0 := by unfold retainedEstimate blockAverage congr 1 apply Finset.sum_congr rfl intro i hi simp [f0, clampUnit, (hz i).1, (hz i).2] simpa [hre, hm0] using this have hatom : ∀ x, |atomEstimate B z x delta - P.px x * atomMass P x delta| ≤ b1 := by intro x have hxnot := hnb1 x dsimp [bad1] at hxnot have hx := le_of_not_gt hxnot simpa [bad1, f1, atomEstimate, hm1 x] using hx have hlocal : ∀ x, GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h → |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| ≤ L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i| + t * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) := by intro x hxg have hnoise : |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * ((z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| ≤ t * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) := by exact le_of_not_ge (fun hge => hnb2 x ⟨hxg, hge⟩) exact (localRegression_good_error_le_empirical P hmodel hbeta hL B z x hdelta hh hupper hlambda hxg).trans (add_le_add_right hnoise _) have hmem := clampFunctional_mem_honestInterval_of_deviations P hmodel hdelta (by linarith) hh hbeta.le hL.le ht.le hb0pos.le hb1pos.le B z rfl rfl rfl hret hatom hlocal exact hzg hmem have hbad : (iidProduct P n).real bad ≤ alpha := by calc _ ≤ (iidProduct P n).real bad0 + (iidProduct P n).real (⋃ x, bad1 x) + (iidProduct P n).real (⋃ x, bad2 x) := by exact (measureReal_union_le _ _).trans (add_le_add_left (measureReal_union_le _ _) _) _ ≤ alpha / (6 * (J : ℝ)) + ∑ x : Fin J, alpha / (6 * (J : ℝ)) + ∑ x : Fin J, alpha / (6 * (J : ℝ)) := by gcongr · exact (measureReal_iUnion_fintype_le bad1).trans (Finset.sum_le_sum fun x _ => hbad1 x) · exact (measureReal_iUnion_fintype_le bad2).trans (Finset.sum_le_sum fun x _ => hbad2 x) _ ≤ alpha := by have hJR : 0 < (J : ℝ) := by positivity have hJone : (1 : ℝ) ≤ J := by exact_mod_cast hJ simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] field_simp nlinarith have hfail : (iidProduct P n).real goodᶜ ≤ alpha := by exact (ENNReal.toReal_mono (measure_ne_top _ _) (measure_mono_ae hsub)).trans hbad have hgoodMeas : MeasurableSet good := by dsimp [good] simp only [honestInterval] let center := fun z : Fin n → ClampObs J => totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h let radius := fun z : Fin n → ClampObs J => sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I0.card : ℝ) + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h (sqrt (log (12 * (J : ℝ) / alpha) / 2)) (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I1.card : ℝ)) have hc : Measurable center := totalGramEstimator_measurable B kappa cminus cplus delta h have hr : Measurable radius := by exact measurable_const.add (Finset.measurable_fun_sum _ fun x _ => honest_stratumRadius_measurable B x beta kappa L cminus cplus delta h (sqrt (log (12 * (J : ℝ) / alpha) / 2)) (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I1.card : ℝ))) exact (measurableSet_le (measurable_const.max (hc.sub hr)) measurable_const).inter (measurableSet_le measurable_const (measurable_const.min (hc.add hr))) have hadd := measureReal_add_measureReal_compl (μ := iidProduct P n) hgoodMeas have huniv : (iidProduct P n).real univ = 1 := by simp rw [huniv] at hadd change 1 - alpha ≤ (iidProduct P n).real good linarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.honestInterval_coverage_model · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestCoverage.lean:133
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.HonestExpectedLength 9 declarations This module reduces the expected length of the clipped honest interval to its displayed sample-dependent radius.

Expected-length reductions for the bias-aware interval

This module reduces the expected length of the clipped honest interval to its displayed sample-dependent radius. It also records the exact mean of the atom-frequency estimate, the population input needed to bound that radius.

theorem integral_sqrt_le_sqrt_integral

On a probability space, integrating the square root of a nonnegative integrable function is bounded by the square root of its integral. The result uses the hf condition, the hf0 condition, the hfInt condition. This is the stated conclusion.

Formal statement
Ω :
f :
Ω → ℝ
hf :
hf0 :
∀ ω, 0 ≤ f ω
hfInt :
(∫ ω, sqrt (f ω) ∂μ) ≤ sqrt (∫ ω, f ω ∂μ)
Proof (Lean source)
lemma integral_sqrt_le_sqrt_integral {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω → ℝ) (hf : Measurable f) (hf0 : ∀ ω, 0 ≤ f ω) (hfInt : Integrable f μ) : (∫ ω, sqrt (f ω) ∂μ) ≤ sqrt (∫ ω, f ω ∂μ) := by have hsMeas : AEStronglyMeasurable (fun ω => sqrt (f ω)) μ := hf.sqrt.aestronglyMeasurable have hsSqInt : Integrable (fun ω => (sqrt (f ω)) ^ 2) μ := by simpa only [Real.sq_sqrt (hf0 _)] using hfInt have hsLp : MemLp (fun ω => sqrt (f ω)) 2 μ := (memLp_two_iff_integrable_sq hsMeas).mpr hsSqInt have hcs := integral_abs_le_sqrt_integral_sq μ (fun ω => sqrt (f ω)) hsLp simpa only [Real.norm_eq_abs, abs_of_nonneg (Real.sqrt_nonneg _), Real.sq_sqrt (hf0 _)] using hcs
CausalSmith.Stat.LmtpThresholdAtomFrontier.integral_sqrt_le_sqrt_integral · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestExpectedLength.lean:26
theorem integral_mul_I1_I2

Statistics computed from the atom block and local-regression block factor under the canonical product law. The result uses the hprob condition, the F condition, the G condition, the hF condition, the hG condition. This is the stated conclusion.

Formal statement
J n :
P :
B :
hprob :
IsProbabilityMeasure P.dataMeasure
F :
((i : {i // i ∈ B.I1}) → ClampObs J) → ℝ
G :
((i : {i // i ∈ B.I2}) → ClampObs J) → ℝ
hF :
hG :
(∫ z, F (finsetCoordProj B.I1 z) * G (finsetCoordProj B.I2 z) ∂iidProduct P n)
= (∫ z, F (finsetCoordProj B.I1 z) ∂iidProduct P n) * ∫ z, G (finsetCoordProj B.I2 z) ∂iidProduct P n
Proof (Lean source)
lemma integral_mul_I1_I2 {J n : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (hprob : IsProbabilityMeasure P.dataMeasure) (F : ((i : {i // i ∈ B.I1}) → ClampObs J) → ℝ) (G : ((i : {i // i ∈ B.I2}) → ClampObs J) → ℝ) (hF : Measurable F) (hG : Measurable G) : (∫ z, F (finsetCoordProj B.I1 z) * G (finsetCoordProj B.I2 z) ∂iidProduct P n) = (∫ z, F (finsetCoordProj B.I1 z) ∂iidProduct P n) * ∫ z, G (finsetCoordProj B.I2 z) ∂iidProduct P n := by letI : IsProbabilityMeasure P.dataMeasure := hprob have hi : iIndepFun (fun (i : Fin n) (z : Fin n → ClampObs J) => z i) (iidProduct P n) := by unfold iidProduct exact ProbabilityTheory.iIndepFun_pi (X := fun _ : Fin n => id) (fun _ => measurable_id.aemeasurable) have hind := hi.indepFun_finset B.I1 B.I2 B.disjoint12 (fun i => measurable_pi_apply i) change (∫ z, F (fun i => z i.1) * G (fun i => z i.1) ∂iidProduct P n) = (∫ z, F (fun i => z i.1) ∂iidProduct P n) * ∫ z, G (fun i => z i.1) ∂iidProduct P n exact hind.integral_fun_comp_mul_comp (measurable_finsetCoordProj B.I1).aemeasurable (measurable_finsetCoordProj B.I2).aemeasurable hF.aestronglyMeasurable hG.aestronglyMeasurable
CausalSmith.Stat.LmtpThresholdAtomFrontier.integral_mul_I1_I2 · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestExpectedLength.lean:46
def honestRadius

The displayed radius of the bias-aware interval.

Definition (Lean source)
n :
shared
J :
shared
B :
z :
Fin n → ClampObs J
beta kappa L cminus cplus delta h alpha :
honestRadius B z beta kappa L cminus cplus delta h alpha :
sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I0.card : ℝ)
+ ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h (sqrt (log (12 * (J : ℝ) / alpha) / 2)) (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I1.card : ℝ))
theorem honestRadius_nonneg

Under the regime restrictions and nonnegative bandwidth, the displayed honest radius is nonnegative. The result uses the hreg condition, the hn condition, the hh condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta h :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hn :
4 ≤ n
hh :
0 ≤ h
z :
Fin n → ClampObs J
0 ≤ honestRadius B z beta kappa L cminus cplus delta h alpha
Proof (Lean source)
lemma honestRadius_nonneg (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta h : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hn : 4 ≤ n) (hh : 0 ≤ h) (z : Fin n → ClampObs J) : 0 ≤ honestRadius B z beta kappa L cminus cplus delta h alpha := by simpa only [honestRadius] using honestInterval_radius_nonneg J n B beta kappa L cminus cplus pmin deltaBar alpha delta h hreg hn hh z
CausalSmith.Stat.LmtpThresholdAtomFrontier.honestRadius_nonneg · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestExpectedLength.lean:86
theorem honestInterval_length_le_two_radius

Clipping the honest interval to the outcome range cannot make it longer than twice its displayed radius. The result uses the hreg condition, the hn condition, the hh condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta h :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hn :
4 ≤ n
hh :
0 ≤ h
z :
Fin n → ClampObs J
intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha)
≤ 2 * honestRadius B z beta kappa L cminus cplus delta h alpha
Proof (Lean source)
lemma honestInterval_length_le_two_radius (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta h : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hn : 4 ≤ n) (hh : 0 ≤ h) (z : Fin n → ClampObs J) : intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ≤ 2 * honestRadius B z beta kappa L cminus cplus delta h alpha := by let center := totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h let radius := honestRadius B z beta kappa L cminus cplus delta h alpha have hr : 0 ≤ radius := by simpa only [radius] using honestRadius_nonneg J n B beta kappa L cminus cplus pmin deltaBar alpha delta h hreg hn hh z have hmin : min 1 (center + radius) ≤ center + radius := min_le_right _ _ have hmax : center - radiusmax 0 (center - radius) := le_max_right _ _ simp only [honestInterval, honest_intervalLength_Icc_eq] change max 0 (min 1 (center + radius) - max 0 (center - radius)) ≤ 2 * radius apply max_le · positivity · linarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.honestInterval_length_le_two_radius · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestExpectedLength.lean:99
theorem honestInterval_modelSup_le

A uniform modelwise expected-length bound passes through the real supremum convention used for the concrete honest interval. The result uses the hreg condition, the hupper condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta h U :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hupper :
∀ (P : ClampLaw J)
if
ClampModel P beta kappa L cminus cplus pmin
then
(∫ z, intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ∂iidProduct P n)
≤ U
sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ IidSampling P n ∧ v = ∫ z, intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ∂iidProduct P n}
≤ U
Proof (Lean source)
lemma honestInterval_modelSup_le (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta h U : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hupper : ∀ (P : ClampLaw J), ClampModel P beta kappa L cminus cplus pmin → (∫ z, intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ∂iidProduct P n) ≤ U) : sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ IidSampling P n ∧ v = ∫ z, intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ∂iidProduct P n} ≤ U := by apply csSup_le · let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) have hP0 : ClampModel P0 beta kappa L cminus cplus pmin := minimaxCenter_mem_model J beta kappa L cminus cplus pmin deltaBar alpha hreg exact ⟨(∫ z, intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ∂iidProduct P0 n), P0, hP0, clampModel_iidSampling hP0, rfl⟩ · intro v hv rcases hv with ⟨P, hP, _hsampling, rfl⟩ exact hupper P hP
CausalSmith.Stat.LmtpThresholdAtomFrontier.honestInterval_modelSup_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestExpectedLength.lean:124
theorem integral_atomEstimate_le_envelope

The mean empirical atom frequency is bounded by its population thinning envelope plus the root-block fluctuation scale. The result uses the hmodel condition, the hreg condition, the hcard condition, the hdelta condition. This is the stated conclusion.

Formal statement
J n :
P :
B :
x :
Fin J
beta kappa L cminus cplus pmin deltaBar alpha delta :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hcard :
0 < B.I1.card
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
(∫ z, atomEstimate B z x delta ∂iidProduct P n)
≤ (1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + cplus * delta ^ (kappa + 1) / (kappa + 1)
Proof (Lean source)
lemma integral_atomEstimate_le_envelope {J n : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (x : Fin J) (beta kappa L cminus cplus pmin deltaBar alpha delta : ℝ) (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hcard : 0 < B.I1.card) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : (∫ z, atomEstimate B z x delta ∂iidProduct P n) ≤ (1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + cplus * delta ^ (kappa + 1) / (kappa + 1) := by letI : IsProbabilityMeasure P.dataMeasure := hmodel.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance let m := P.px x * atomMass P x delta let f := fun z : Fin n → ClampObs J => atomEstimate B z x delta have hfMeas : Measurable f := atomEstimate_measurable B x delta have hfInt : Integrable f (iidProduct P n) := by refine Integrable.of_bound hfMeas.aestronglyMeasurable 1 ?_ filter_upwards with z have hz := atomEstimate_mem_Icc B z x delta rw [Real.norm_eq_abs, abs_of_nonneg hz.1] exact hz.2 have hd1 : delta ≤ 1 := hdelta.2.trans (by rcases hreg with ⟨_, _, _, _, _, _, _, _, _, _, hdBar, _, _⟩ exact hdBar.le) have hdiffInt : Integrable (fun z => |f z - m|) (iidProduct P n) := by exact (hfInt.sub (integrable_const m)).abs have hpoint : ∀ z, f z ≤ |f z - m| + m := by intro z linarith [le_abs_self (f z - m)] have hint : (∫ z, f z ∂iidProduct P n) ≤ (∫ z, |f z - m| ∂iidProduct P n) + m := by calc _ ≤ ∫ z, (|f z - m| + m) ∂iidProduct P n := integral_mono hfInt (hdiffInt.add (integrable_const m)) hpoint _ = _ := by rw [integral_add hdiffInt (integrable_const m)]; simp have hfluct : (∫ z, |f z - m| ∂iidProduct P n) ≤ (1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ := by simpa [f, m] using atomEstimate_l1_le P hmodel B hcard x hdelta.1 hd1 have hmean : m ≤ cplus * delta ^ (kappa + 1) / (kappa + 1) := by have habs := abs_atomCoefficient_le_envelope J P hmodel hreg x hdelta have hm0 := atomCoefficient_mem_Icc P hmodel x hd1 |>.1 simpa [m, abs_of_nonneg hm0] using habs exact hint.trans (add_le_add hfluct hmean)
CausalSmith.Stat.LmtpThresholdAtomFrontier.integral_atomEstimate_le_envelope · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestExpectedLength.lean:152
theorem integral_sqrt_interceptWeight_energy_le

The expected square root of the stabilized local-weight energy is bounded by the square root of the existing integrated energy envelope. The result uses the hsampling condition, the hh condition, the hlambda condition, the hp condition, the hcard condition, the hmean condition. This is the stated conclusion.

Formal statement
J n ell :
P :
B :
x :
Fin J
kappa cminus cplus delta h p :
hsampling :
hh :
0 < h
hlambda :
0 < lambdaStar ell kappa cminus cplus
hp :
0 < p
hcard :
0 < B.I2.card
hmean :
∫ o, localWindowWeight x delta h o ∂P.dataMeasure = p
(∫ z, sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ∂iidProduct P n)
sqrt (2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / ((B.I2.card : ℝ) * p) + 2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) * exp (-((B.I2.card : ℝ) * p) / 20))
Proof (Lean source)
lemma integral_sqrt_interceptWeight_energy_le {J n ell : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (x : Fin J) (kappa cminus cplus delta h p : ℝ) (hsampling : IidSampling P n) (hh : 0 < h) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (hp : 0 < p) (hcard : 0 < B.I2.card) (hmean : ∫ o, localWindowWeight x delta h o ∂P.dataMeasure = p) : (∫ z, sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ∂iidProduct P n) ≤ sqrt (2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / ((B.I2.card : ℝ) * p) + 2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) * exp (-((B.I2.card : ℝ) * p) / 20)) := by letI : IsProbabilityMeasure P.dataMeasure := hsampling.1 letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance let energy : (Fin n → ClampObs J) → ℝ := fun z => ∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2 have heMeas : Measurable energy := by exact Finset.measurable_fun_sum B.I2 fun i _ => (interceptWeight_measurable (ell := ell) B x kappa cminus cplus delta h i).pow_const 2 have he0 : ∀ z, 0 ≤ energy z := fun z => sum_nonneg fun _ _ => sq_nonneg _ have heInt : Integrable energy (iidProduct P n) := by have hbase := localRegression_weight_energy_integrable B P x kappa cminus cplus delta h hh hlambda apply hbase.congr filter_upwards with z dsimp only [energy] simp_rw [localRegressionDesignWeight_apply (ell := ell), ite_pow, zero_pow (by norm_num : 2 ≠ 0)] rw [← Finset.sum_filter] simp have hsqrt := integral_sqrt_le_sqrt_integral (iidProduct P n) energy heMeas he0 heInt refine hsqrt.trans (Real.sqrt_le_sqrt ?_) calc (∫ z, energy z ∂iidProduct P n) = ∫ z, ∑ i, (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2 ∂iidProduct P n := by apply integral_congr_ae filter_upwards with z dsimp only [energy] simp_rw [localRegressionDesignWeight_apply (ell := ell), ite_pow, zero_pow (by norm_num : 2 ≠ 0)] rw [← Finset.sum_filter] simp _ ≤ _ := localRegression_weight_energy_integral_le P hsampling B x kappa cminus cplus delta h p hh hlambda hp hcard hmean
CausalSmith.Stat.LmtpThresholdAtomFrontier.integral_sqrt_interceptWeight_energy_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestExpectedLength.lean:200
theorem stratumRadius_le_good_expression_add_bad

Each per-stratum radius is bounded by a good-Gram bias/noise expression plus the indicator of Gram failure. The result uses the hbeta condition, the hL condition, the hh condition, the ht condition, the hb1 condition, the hlambda condition. This is the stated conclusion.

Formal statement
J n :
B :
z :
Fin n → ClampObs J
x :
Fin J
beta kappa L cminus cplus delta h t b1 :
hbeta :
0 ≤ beta
hL :
0 ≤ L
hh :
0 < h
ht :
0 ≤ t
hb1 :
0 ≤ b1
hlambda :
0 < lambdaStar (ellOf beta) kappa cminus cplus
stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h t b1
≤ (atomEstimate B z x delta + b1) * (L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) + t * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2))
+ b1
+ {w : Fin n → ClampObs J | ¬ GoodGramEvent B w x (ellOf beta) kappa cminus cplus delta h}.indicator (fun _ => (1 : ℝ)) z
Proof (Lean source)
lemma stratumRadius_le_good_expression_add_bad {J n : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (beta kappa L cminus cplus delta h t b1 : ℝ) (hbeta : 0 ≤ beta) (hL : 0 ≤ L) (hh : 0 < h) (ht : 0 ≤ t) (hb1 : 0 ≤ b1) (hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus) : stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h t b1 ≤ (atomEstimate B z x delta + b1) * (L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) + t * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2)) + b1 + {w : Fin n → ClampObs J | ¬ GoodGramEvent B w x (ellOf beta) kappa cminus cplus delta h}.indicator (fun _ => (1 : ℝ)) z := by have hatom := atomEstimate_mem_Icc B z x delta have hfac : 0 ≤ atomEstimate B z x delta + b1 := by linarith [hatom.1] have hbias : 0 ≤ L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) := by positivity have hnoise : 0 ≤ t * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) := mul_nonneg ht (Real.sqrt_nonneg _) by_cases hg : GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h · rw [stratumRadius, if_pos hg, Set.indicator_of_notMem] · simp only [add_zero] have hinner : L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i| + t * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) ≤ L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) + t * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) := add_le_add (mul_le_mul_of_nonneg_left (goodGram_weight_controls B z x kappa cminus cplus delta h hh hlambda hg).2.1 (mul_nonneg hL (Real.rpow_nonneg hh.le _))) le_rfl exact add_le_add (mul_le_mul_of_nonneg_left hinner hfac) le_rfl · simpa using hg · rw [stratumRadius, if_neg hg, Set.indicator_of_mem] · nlinarith [mul_nonneg hfac (add_nonneg hbias hnoise), hatom.2] · simpa using hg
CausalSmith.Stat.LmtpThresholdAtomFrontier.stratumRadius_le_good_expression_add_bad · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestExpectedLength.lean:258
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.HonestIntervalBasic 7 declarations Measurability and elementary length bounds for the honest interval

Measurability and elementary length bounds for the honest interval

theorem honest_intervalLength_Icc_eq

The convex-hull length of a nonempty closed interval is its nonnegative endpoint difference. This is the stated conclusion.

Formal statement
a b :
intervalLength (Icc a b) = max 0 (b - a)
Proof (Lean source)
lemma honest_intervalLength_Icc_eq (a b : ℝ) : intervalLength (Icc a b) = max 0 (b - a) := by unfold intervalLength by_cases h : a ≤ b · simp [h] · have h' : b < a := lt_of_not_ge h simp [Set.Icc_eq_empty h, h'.le]
CausalSmith.Stat.LmtpThresholdAtomFrontier.honest_intervalLength_Icc_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestIntervalBasic.lean:19
theorem honest_stratumRadius_measurable

The sample-dependent per-stratum honest radius is measurable. This is the stated conclusion.

Formal statement
J n ell :
B :
x :
Fin J
beta kappa L cminus cplus delta h tAlpha b1 :
Measurable fun z : Fin n → ClampObs J
=> stratumRadius B z x ell beta kappa L cminus cplus delta h tAlpha b1
Proof (Lean source)
lemma honest_stratumRadius_measurable {J n ell : ℕ} (B : SplitBlocks n) (x : Fin J) (beta kappa L cminus cplus delta h tAlpha b1 : ℝ) : Measurable fun z : Fin n → ClampObs J => stratumRadius B z x ell beta kappa L cminus cplus delta h tAlpha b1 := by classical unfold stratumRadius refine Measurable.ite (goodGramEvent_measurable B x kappa cminus cplus delta h) ?_ ?_ · have habs := Finset.measurable_fun_sum B.I2 fun i _ => (interceptWeight_measurable (ell := ell) B x kappa cminus cplus delta h i).abs have hsq := Finset.measurable_fun_sum B.I2 fun i _ => (interceptWeight_measurable (ell := ell) B x kappa cminus cplus delta h i).pow_const 2 exact (((atomEstimate_measurable B x delta).add measurable_const).mul (((measurable_const.mul measurable_const).mul habs).add (measurable_const.mul hsq.sqrt))).add measurable_const · exact (atomEstimate_measurable B x delta).add measurable_const
CausalSmith.Stat.LmtpThresholdAtomFrontier.honest_stratumRadius_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestIntervalBasic.lean:30
theorem honestInterval_radius_nonneg

Once the split blocks are nonempty, the displayed honest radius is nonnegative under the regime restrictions. The result uses the hreg condition, the hn condition, the hh condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta h :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hn :
4 ≤ n
hh :
0 ≤ h
z :
Fin n → ClampObs J
tAlpha :
sqrt (log (12 * (J : ℝ) / alpha) / 2)
b0 :
tAlpha / sqrt (B.I0.card : ℝ)
b1 :
tAlpha / sqrt (B.I1.card : ℝ)
0
≤ b0
+ ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h tAlpha b1
Proof (Lean source)
lemma honestInterval_radius_nonneg (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta h : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hn : 4 ≤ n) (hh : 0 ≤ h) : ∀ z : Fin n → ClampObs J, let tAlpha := sqrt (log (12 * (J : ℝ) / alpha) / 2) let b0 := tAlpha / sqrt (B.I0.card : ℝ) let b1 := tAlpha / sqrt (B.I1.card : ℝ) 0 ≤ b0 + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h tAlpha b1 := by intro z dsimp only rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, ha, ha_half⟩ have ht : 0 ≤ sqrt (log (12 * (J : ℝ) / alpha) / 2) := Real.sqrt_nonneg _ have hI0 : 0 < (B.I0.card : ℝ) := by have hc := B.card_I0 exact_mod_cast (show 0 < B.I0.card by omega) have hI1 : 0 < (B.I1.card : ℝ) := by have hc := B.card_I1 exact_mod_cast (show 0 < B.I1.card by omega) have hb0 : 0 ≤ sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I0.card : ℝ) := div_nonneg ht (Real.sqrt_nonneg _) have hb1 : 0 ≤ sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I1.card : ℝ) := div_nonneg ht (Real.sqrt_nonneg _) apply add_nonneg hb0 apply sum_nonneg intro x hx unfold stratumRadius atomEstimate blockAverage split_ifs <;> positivity
CausalSmith.Stat.LmtpThresholdAtomFrontier.honestInterval_radius_nonneg · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestIntervalBasic.lean:49
theorem honestInterval_observedMeasurable

The honest interval has measurable ordered endpoints for all sufficiently large sample sizes. The result uses the hreg condition, the hn condition, the hh condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hn :
4 ≤ n
hh :
0 ≤ infoBandwidth n delta beta kappa deltaBar
ObservedMeasurableInterval (fun z : Fin n → ClampObs J => honestInterval B z (ellOf beta) beta kappa L cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) alpha)
Proof (Lean source)
lemma honestInterval_observedMeasurable (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hn : 4 ≤ n) (hh : 0 ≤ infoBandwidth n delta beta kappa deltaBar) : ObservedMeasurableInterval (fun z : Fin n → ClampObs J => honestInterval B z (ellOf beta) beta kappa L cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) alpha) := by classical let tAlpha := sqrt (log (12 * (J : ℝ) / alpha) / 2) let b0 := tAlpha / sqrt (B.I0.card : ℝ) let b1 := tAlpha / sqrt (B.I1.card : ℝ) let center := fun z : Fin n → ClampObs J => totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) let radius := fun z : Fin n → ClampObs J => b0 + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) tAlpha b1 let lo := fun z => max 0 (center z - radius z) let hi := fun z => min 1 (center z + radius z) have hc : Measurable center := totalGramEstimator_measurable B kappa cminus cplus delta _ have hr : Measurable radius := measurable_const.add (Finset.measurable_fun_sum _ fun x _ => honest_stratumRadius_measurable B x beta kappa L cminus cplus delta _ tAlpha b1) have hlo : Measurable lo := measurable_const.max (hc.sub hr) have hhi : Measurable hi := measurable_const.min (hc.add hr) refine ⟨lo, hi, hlo, hhi, ?_, ?_⟩ · intro z have hcenter := clampUnit_mem_Icc (retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar)) have hradius : 0 ≤ radius z := by simpa only [radius, tAlpha, b0, b1] using honestInterval_radius_nonneg J n B beta kappa L cminus cplus pmin deltaBar alpha delta (infoBandwidth n delta beta kappa deltaBar) hreg hn hh z dsimp only [lo, hi] apply le_min · apply max_le · norm_num · dsimp only [center] rw [show totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) = clampUnit (retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar)) by rfl] linarith [hcenter.2] · apply max_le · dsimp only [center] rw [show totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) = clampUnit (retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar)) by rfl] linarith [hcenter.1] · linarith · intro z rfl
CausalSmith.Stat.LmtpThresholdAtomFrontier.honestInterval_observedMeasurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestIntervalBasic.lean:86
theorem honestInterval_length_le_one

Intersecting the honest interval with the outcome range bounds its length by one on every sample. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus delta h alpha :
z :
Fin n → ClampObs J
intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha)
≤ 1
Proof (Lean source)
lemma honestInterval_length_le_one {J n : ℕ} (B : SplitBlocks n) (beta kappa L cminus cplus delta h alpha : ℝ) (z : Fin n → ClampObs J) : intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ≤ 1 := by simp only [honestInterval, honest_intervalLength_Icc_eq] apply max_le · norm_num · have hmin := min_le_left (1 : ℝ) (totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h + (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I0.card : ℝ) + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h (sqrt (log (12 * (J : ℝ) / alpha) / 2)) (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I1.card : ℝ)))) have hmax := le_max_left (0 : ℝ) (totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h - (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I0.card : ℝ) + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h (sqrt (log (12 * (J : ℝ) / alpha) / 2)) (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I1.card : ℝ)))) linarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.honestInterval_length_le_one · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestIntervalBasic.lean:154
theorem honestInterval_length_measurable

The displayed interval length is measurable as a function of the observed sample. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus delta h alpha :
Measurable fun z : Fin n → ClampObs J
=> intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha)
Proof (Lean source)
lemma honestInterval_length_measurable {J n : ℕ} (B : SplitBlocks n) (beta kappa L cminus cplus delta h alpha : ℝ) : Measurable fun z : Fin n → ClampObs J => intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) := by classical let tAlpha := sqrt (log (12 * (J : ℝ) / alpha) / 2) let b0 := tAlpha / sqrt (B.I0.card : ℝ) let b1 := tAlpha / sqrt (B.I1.card : ℝ) let center := fun z : Fin n → ClampObs J => totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h let radius := fun z : Fin n → ClampObs J => b0 + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h tAlpha b1 have hc : Measurable center := totalGramEstimator_measurable B kappa cminus cplus delta h have hr : Measurable radius := measurable_const.add (Finset.measurable_fun_sum _ fun x _ => honest_stratumRadius_measurable B x beta kappa L cminus cplus delta h tAlpha b1) have hm : Measurable fun z => max 0 (min 1 (center z + radius z) - max 0 (center z - radius z)) := measurable_const.max ((measurable_const.min (hc.add hr)).sub (measurable_const.max (hc.sub hr))) simpa only [honestInterval, honest_intervalLength_Icc_eq, center, radius, tAlpha, b0, b1] using hm
CausalSmith.Stat.LmtpThresholdAtomFrontier.honestInterval_length_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestIntervalBasic.lean:183
theorem clampProcedureWorstLength_honestInterval_le_ofReal

A real uniform expected-length upper bound upgrades to the extended-real worst-length convention. The result uses the hupper condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin delta h alpha U :
hupper :
sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ IidSampling P n ∧ v = ∫ z, intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ∂iidProduct P n}
≤ U
clampProcedureWorstLength J n beta kappa L cminus cplus pmin (fun z => honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha)
ofReal U
Proof (Lean source)
lemma clampProcedureWorstLength_honestInterval_le_ofReal (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin delta h alpha U : ℝ) (hupper : sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ IidSampling P n ∧ v = ∫ z, intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ∂iidProduct P n} ≤ U) : clampProcedureWorstLength J n beta kappa L cminus cplus pmin (fun z => honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ≤ ofReal U := by unfold clampProcedureWorstLength apply sSup_le intro v hv rcases hv with ⟨P, hP, rfl⟩ letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct; infer_instance let f := fun z : Fin n → ClampObs J => intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) have hfmeas : Measurable f := honestInterval_length_measurable B beta kappa L cminus cplus delta h alpha have hfnn : ∀ᵐ z ∂iidProduct P n, 0 ≤ f z := ae_of_all _ fun _ => le_max_left _ _ have hfint : Integrable f (iidProduct P n) := by refine Integrable.of_bound hfmeas.aestronglyMeasurable 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (le_max_left _ _)] exact honestInterval_length_le_one B beta kappa L cminus cplus delta h alpha z simp_rw [intervalLengthENNReal] rw [← ofReal_integral_eq_lintegral_ofReal hfint hfnn] apply ENNReal.ofReal_le_ofReal have hbdd : BddAbove {v : ℝ | ∃ Q : ClampLaw J, ClampModel Q beta kappa L cminus cplus pmin ∧ IidSampling Q n ∧ v = ∫ z, intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ∂iidProduct Q n} := by refine ⟨1, ?_⟩ rintro w ⟨Q, hQ, _hiid, rfl⟩ letI : IsProbabilityMeasure Q.dataMeasure := hQ.probability letI : IsProbabilityMeasure (iidProduct Q n) := by unfold iidProduct; infer_instance have hqmeas := honestInterval_length_measurable (J := J) B beta kappa L cminus cplus delta h alpha have hqint : Integrable (fun z : Fin n → ClampObs J => intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha)) (iidProduct Q n) := by refine Integrable.of_bound hqmeas.aestronglyMeasurable 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (le_max_left _ _)] exact honestInterval_length_le_one B beta kappa L cminus cplus delta h alpha z exact (integral_mono_ae hqint (integrable_const 1) (ae_of_all _ fun z => honestInterval_length_le_one B beta kappa L cminus cplus delta h alpha z)).trans_eq (by simp) have hmem : (∫ z, f z ∂iidProduct P n) ∈ {v : ℝ | ∃ Q : ClampLaw J, ClampModel Q beta kappa L cminus cplus pmin ∧ IidSampling Q n ∧ v = ∫ z, intervalLength (honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha) ∂iidProduct Q n} := ⟨P, hP, clampModel_iidSampling hP, rfl⟩ exact (le_csSup hbdd hmem).trans hupper
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampProcedureWorstLength_honestInterval_le_ofReal · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestIntervalBasic.lean:212
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.HonestLengthLower 9 declarations This file isolates the low-level expected-length converse for the fixed-Hölder clamp model.

Two-point lower bounds for honest confidence length

This file isolates the low-level expected-length converse for the fixed-Hölder clamp model. It deliberately defines the worst length of one procedure here, so that the headline module can reuse the results without an import cycle.

def clampProcedureWorstLength

Worst expected extended interval length of one procedure over the fixed-Hölder clamp model.

Definition (Lean source)
J n :
beta kappa L cminus cplus pmin :
clampProcedureWorstLength J n beta kappa L cminus cplus pmin C :
ℝ≥0∞
sSup {v : ℝ≥0∞ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ v = ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct P n}
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampProcedureWorstLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthLower.lean:24
theorem procedureWorstLength_lower_of_two_point

A close pair in the fixed-Hölder model lower-bounds the worst expected length of every interval procedure that is honest over that model. The result uses the hC condition, the hP0 condition, the hP1 condition, the hgap condition, the hsep condition, the hac condition, the hint condition. This is the stated conclusion.

Formal statement
J :
shared
P0 P1 :
n :
beta kappa L cminus cplus pmin delta alpha gap :
hC :
UniformCoverage J n beta kappa L cminus cplus pmin delta alpha C
hP0 :
ClampModel P0 beta kappa L cminus cplus pmin
hP1 :
ClampModel P1 beta kappa L cminus cplus pmin
hgap :
0 ≤ gap
hsep :
gap ≤ |clampFunctional P1 delta - clampFunctional P0 delta|
hac :
iidProduct P1 n ≪ iidProduct P0 n
hint :
Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)
ofReal ((1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) * gap)
clampProcedureWorstLength J n beta kappa L cminus cplus pmin C
Proof (Lean source)
lemma procedureWorstLength_lower_of_two_point (P0 P1 : ClampLaw J) (n : ℕ) (beta kappa L cminus cplus pmin delta alpha gap : ℝ) (C : ConfidenceProcedure n J) (hC : UniformCoverage J n beta kappa L cminus cplus pmin delta alpha C) (hP0 : ClampModel P0 beta kappa L cminus cplus pmin) (hP1 : ClampModel P1 beta kappa L cminus cplus pmin) (hgap : 0 ≤ gap) (hsep : gap ≤ |clampFunctional P1 delta - clampFunctional P0 delta|) (hac : iidProduct P1 n ≪ iidProduct P0 n) (hint : Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)) : ofReal ((1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) * gap) ≤ clampProcedureWorstLength J n beta kappa L cminus cplus pmin C := by rcases hC with ⟨⟨lo, hi, hlo, hhi, hord, hCeq⟩, hcover⟩ let theta0 := clampFunctional P0 delta let theta1 := clampFunctional P1 delta let A : Set (Fin n → ClampObs J) := {z | theta0 ∈ C z} let B : Set (Fin n → ClampObs J) := {z | theta1 ∈ C z} have hA : MeasurableSet A := by simp only [A, hCeq, mem_Icc] exact (measurableSet_le hlo measurable_const).inter (measurableSet_le measurable_const hhi) have hB : MeasurableSet B := by simp only [B, hCeq, mem_Icc] exact (measurableSet_le hlo measurable_const).inter (measurableSet_le measurable_const hhi) letI : IsProbabilityMeasure P0.dataMeasure := hP0.probability letI : IsProbabilityMeasure P1.dataMeasure := hP1.probability letI : IsProbabilityMeasure (iidProduct P0 n) := by unfold iidProduct; infer_instance letI : IsProbabilityMeasure (iidProduct P1 n) := by unfold iidProduct; infer_instance have hcov0 : 1 - alpha ≤ (iidProduct P0 n).real A := by simpa [A, theta0] using hcover P0 hP0 have hcov1 : 1 - alpha ≤ (iidProduct P1 n).real B := by simpa [B, theta1] using hcover P1 hP1 have htv : tvDist (iidProduct P1 n) (iidProduct P0 n) ≤ (1 / 2) * sqrt (productChiSq P1 P0 n) := by simpa [productChiSq] using tvDist_le_half_sqrt_chiSqDiv (iidProduct P1 n) (iidProduct P0 n) hac hint have hcov1_at0 : 1 - alpha - (1 / 2) * sqrt (productChiSq P1 P0 n) ≤ (iidProduct P0 n).real B := by have hmove := measureReal_sub_le_tvDist (μ := iidProduct P0 n) (ν := iidProduct P1 n) hB rw [tvDist_symm] at hmove linarith have hinter : 1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n) ≤ (iidProduct P0 n).real (A ∩ B) := by have hunion := measureReal_union_add_inter (μ := iidProduct P0 n) (s := A) (t := B) hB (measure_ne_top _ _) (measure_ne_top _ _) have hunionle : (iidProduct P0 n).real (A ∪ B) ≤ 1 := ENNReal.toReal_mono ENNReal.one_ne_top prob_le_one linarith have hpoint (z : Fin n → ClampObs J) : (A ∩ B).indicator (fun _ => ofReal gap) z ≤ intervalLengthENNReal (C z) := by by_cases hz : z ∈ A ∩ B · rw [Set.indicator_of_mem hz] apply ENNReal.ofReal_le_ofReal rw [hCeq z] simp only [intervalLength, csSup_Icc (hord z), csInf_Icc (hord z)] rcases hz with ⟨hz0, hz1⟩ have hz0' : lo z ≤ theta0 ∧ theta0 ≤ hi z := by simpa [A, theta0, hCeq z] using hz0 have hz1' : lo z ≤ theta1 ∧ theta1 ≤ hi z := by simpa [B, theta1, hCeq z] using hz1 have habs : |clampFunctional P1 delta - clampFunctional P0 delta| ≤ hi z - lo z := by rw [abs_le] constructor <;> linarith [hz0'.1, hz0'.2, hz1'.1, hz1'.2] exact (hsep.trans habs).trans (le_max_right _ _) · simp [hz, intervalLengthENNReal] have hlen : ofReal gap * (iidProduct P0 n) (A ∩ B) ≤ ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct P0 n := by calc _ = ∫⁻ z, (A ∩ B).indicator (fun _ => ofReal gap) z ∂iidProduct P0 n := by rw [lintegral_indicator (hA.inter hB), lintegral_const] simp _ ≤ _ := lintegral_mono hpoint have hreal : ofReal (1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) ≤ (iidProduct P0 n) (A ∩ B) := by rw [← ENNReal.ofReal_toReal (measure_ne_top _ _)] exact ENNReal.ofReal_le_ofReal hinter have htarget : ofReal ((1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) * gap) ≤ ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct P0 n := by rw [mul_comm, ENNReal.ofReal_mul hgap] exact (mul_le_mul le_rfl hreal bot_le bot_le).trans hlen exact htarget.trans (le_sSup ⟨P0, hP0, rfl⟩)
CausalSmith.Stat.LmtpThresholdAtomFrontier.procedureWorstLength_lower_of_two_point · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthLower.lean:32
theorem observedMinimaxLength_lower_of_two_point

The same two-point experiment lower-bounds the minimax honest expected length. The result uses the hP0 condition, the hP1 condition, the hgap condition, the hsep condition, the hac condition, the hint condition. This is the stated conclusion.

Formal statement
J :
shared
P0 P1 :
n :
beta kappa L cminus cplus pmin delta alpha gap :
hP0 :
ClampModel P0 beta kappa L cminus cplus pmin
hP1 :
ClampModel P1 beta kappa L cminus cplus pmin
hgap :
0 ≤ gap
hsep :
gap ≤ |clampFunctional P1 delta - clampFunctional P0 delta|
hac :
iidProduct P1 n ≪ iidProduct P0 n
hint :
Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)
ofReal ((1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) * gap)
observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha
Proof (Lean source)
lemma observedMinimaxLength_lower_of_two_point (P0 P1 : ClampLaw J) (n : ℕ) (beta kappa L cminus cplus pmin delta alpha gap : ℝ) (hP0 : ClampModel P0 beta kappa L cminus cplus pmin) (hP1 : ClampModel P1 beta kappa L cminus cplus pmin) (hgap : 0 ≤ gap) (hsep : gap ≤ |clampFunctional P1 delta - clampFunctional P0 delta|) (hac : iidProduct P1 n ≪ iidProduct P0 n) (hint : Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)) : ofReal ((1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) * gap) ≤ observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha := by unfold observedMinimaxLength apply le_sInf intro r hr rcases hr with ⟨C, hC, rfl⟩ exact procedureWorstLength_lower_of_two_point P0 P1 n beta kappa L cminus cplus pmin delta alpha gap C hC hP0 hP1 hgap hsep hac hint
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxLength_lower_of_two_point · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthLower.lean:130
theorem observedMinimaxLength_lower_of_two_point_chi

A numerical product chi-square budget can replace the exact divergence in the two-point expected-length bound. The result uses the hP0 condition, the hP1 condition, the hgap condition, the hsep condition, the hac condition, the hint condition, the hchi0 condition, the hchi condition. This is the stated conclusion.

Formal statement
J :
shared
P0 P1 :
n :
beta kappa L cminus cplus pmin delta alpha gap chi :
hP0 :
ClampModel P0 beta kappa L cminus cplus pmin
hP1 :
ClampModel P1 beta kappa L cminus cplus pmin
hgap :
0 ≤ gap
hsep :
gap ≤ |clampFunctional P1 delta - clampFunctional P0 delta|
hac :
iidProduct P1 n ≪ iidProduct P0 n
hint :
Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)
hchi0 :
0 ≤ chi
hchi :
productChiSq P1 P0 n ≤ chi
ofReal ((1 - 2 * alpha - (1 / 2) * sqrt chi) * gap)
observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha
Proof (Lean source)
lemma observedMinimaxLength_lower_of_two_point_chi (P0 P1 : ClampLaw J) (n : ℕ) (beta kappa L cminus cplus pmin delta alpha gap chi : ℝ) (hP0 : ClampModel P0 beta kappa L cminus cplus pmin) (hP1 : ClampModel P1 beta kappa L cminus cplus pmin) (hgap : 0 ≤ gap) (hsep : gap ≤ |clampFunctional P1 delta - clampFunctional P0 delta|) (hac : iidProduct P1 n ≪ iidProduct P0 n) (hint : Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)) (hchi0 : 0 ≤ chi) (hchi : productChiSq P1 P0 n ≤ chi) : ofReal ((1 - 2 * alpha - (1 / 2) * sqrt chi) * gap) ≤ observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha := by have hsqrt := Real.sqrt_le_sqrt hchi have hreal : (1 - 2 * alpha - (1 / 2) * sqrt chi) * gap ≤ (1 - 2 * alpha - (1 / 2) * sqrt (productChiSq P1 P0 n)) * gap := mul_le_mul_of_nonneg_right (by linarith) hgap exact (ENNReal.ofReal_le_ofReal hreal).trans (observedMinimaxLength_lower_of_two_point P0 P1 n beta kappa L cminus cplus pmin delta alpha gap hP0 hP1 hgap hsep hac hint)
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxLength_lower_of_two_point_chi · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthLower.lean:153
theorem observedMinimaxLength_le_clampProcedureWorstLength

Every honest procedure's worst length dominates the minimax honest length. The result uses the hC condition. This is the stated conclusion.

Formal statement
J n :
beta kappa L cminus cplus pmin delta alpha :
hC :
UniformCoverage J n beta kappa L cminus cplus pmin delta alpha C
observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha
clampProcedureWorstLength J n beta kappa L cminus cplus pmin C
Proof (Lean source)
lemma observedMinimaxLength_le_clampProcedureWorstLength (J n : ℕ) (beta kappa L cminus cplus pmin delta alpha : ℝ) (C : ConfidenceProcedure n J) (hC : UniformCoverage J n beta kappa L cminus cplus pmin delta alpha C) : observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha ≤ clampProcedureWorstLength J n beta kappa L cminus cplus pmin C := by unfold observedMinimaxLength apply sInf_le exact ⟨C, hC, rfl⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxLength_le_clampProcedureWorstLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthLower.lean:178
theorem observedMinimaxLength_eventually_ge_root

The fixed-Hölder minimax honest length has the root-sample-size lower bound, uniformly over admissible threshold sequences. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, ofReal (c * (n : ℝ) ^ (-(1 : ℝ) / 2))
observedMinimaxLength J n beta kappa L cminus cplus pmin (deltaSeq n) alpha
Proof (Lean source)
lemma observedMinimaxLength_eventually_ge_root (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, ofReal (c * (n : ℝ) ^ (-(1 : ℝ) / 2)) ≤ observedMinimaxLength J n beta kappa L cminus cplus pmin (deltaSeq n) alpha := by let eta : ℝ := 1 - 2 * alpha let tau : ℝ := eta / 16 let chi : ℝ := eta ^ 2 / 16 let floor : ℝ := eta - (1 / 2) * Real.sqrt chi let c : ℝ := floor * tau have heta : 0 < eta := by dsimp [eta]; linarith [hreg.2.2.2.2.2.2.2.2.2.2.2.2] have heta1 : eta < 1 := by dsimp [eta]; linarith [hreg.2.2.2.2.2.2.2.2.2.2.2.1] have htau : 0 < tau := div_pos heta (by norm_num) have hchi0 : 0 ≤ chi := by dsimp [chi]; positivity have hsqrt : Real.sqrt chi = eta / 4 := by rw [show chi = (eta / 4) ^ 2 by dsimp [chi]; ring, Real.sqrt_sq_eq_abs, abs_of_pos (div_pos heta (by norm_num))] have hfloor : 0 < floor := by dsimp [floor]; rw [hsqrt]; linarith refine ⟨c, by dsimp [c]; positivity, ?_⟩ intro deltaSeq hdelta filter_upwards [Filter.eventually_ge_atTop 1] with n hn have hnpos : 0 < n := by omega have hnR : 0 < (n : ℝ) := by exact_mod_cast hnpos let root : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) let eps : ℝ := tau * root have hroot : 0 < root := Real.rpow_pos_of_pos hnR _ have heps : 0 < eps := mul_pos htau hroot have hroot1 : root ≤ 1 := by rw [show (1 : ℝ) = 1 ^ (-(1 : ℝ) / 2) by norm_num] exact Real.rpow_le_rpow_of_nonpos (by norm_num) (by exact_mod_cast hn) (by norm_num) have heps_le : eps ≤ 1 / 4 := by dsimp [eps, tau] nlinarith have hepsb : |eps| ≤ 1 / 2 := by rw [abs_of_pos heps]; linarith have hepss : |eps| < 1 / 2 := by rw [abs_of_pos heps]; linarith let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let P1 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps) have hP0 : ClampModel P0 beta kappa L cminus cplus pmin := minimaxCenter_mem_model J beta kappa L cminus cplus pmin deltaBar alpha hreg have hP1 : ClampModel P1 beta kappa L cminus cplus pmin := minimaxConstant_mem_model J beta kappa L cminus cplus pmin deltaBar alpha eps hreg hepsb have hdelta1 : deltaSeq n ∈ Icc (0 : ℝ) 1 := ⟨(hdelta n).1, (hdelta n).2.trans hreg.2.2.2.2.2.2.2.2.2.2.1.le⟩ have hsepEq := minimaxGlobalSeparation J kappa (deltaSeq n) eps hreg.1 hreg.2.2.1 hdelta1 hepsb have hsep : eps ≤ |clampFunctional P1 (deltaSeq n) - clampFunctional P0 (deltaSeq n)| := by rw [show P1 = minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps) by rfl, show P0 = minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) by rfl, hsepEq, abs_of_pos heps] have hrootSq : root ^ 2 = (n : ℝ)⁻¹ := by dsimp [root] rw [← Real.rpow_natCast, ← Real.rpow_mul hnR.le] norm_num rw [Real.rpow_neg_one] have hepsSq : eps ^ 2 = tau ^ 2 * (n : ℝ)⁻¹ := by dsimp [eps] rw [mul_pow, hrootSq] letI : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := minimaxDesignMeasure_isProbabilityMeasure J kappa hreg.1 hreg.2.2.1 have hintEq : (∫ p, 4 * ((fun _ : Fin J × ℝ => eps) p) ^ 2 ∂minimaxDesignMeasure J kappa) = 4 * eps ^ 2 := by simp have hchiEq := minimaxProduct_chiSqDiv_center J n kappa hreg.1 hreg.2.2.1 (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepss) rw [hintEq] at hchiEq have hnE : (n : ℝ) * (4 * eps ^ 2) = eta ^ 2 / 64 := by rw [hepsSq] dsimp [tau] field_simp [hnR.ne'] ring have hxabs : |eta ^ 2 / 64| ≤ 1 := by rw [abs_of_nonneg (by positivity)] nlinarith [sq_nonneg eta] have hexp : exp (eta ^ 2 / 64) ≤ 1 + eta ^ 2 / 64 + (eta ^ 2 / 64) ^ 2 := Causalean.Stat.Concentration.exp_le_one_add_add_sq hxabs have hpoly : eta ^ 2 / 64 + (eta ^ 2 / 64) ^ 2 ≤ chi := by dsimp [chi] have heta_sq : eta ^ 2 ≤ 1 := by nlinarith [sq_nonneg eta] nlinarith [sq_nonneg (eta ^ 2 / 64)] have hpow : (1 + 4 * eps ^ 2) ^ n ≤ exp (eta ^ 2 / 64) := by calc _ ≤ (exp (4 * eps ^ 2)) ^ n := pow_le_pow_left₀ (by positivity) (by simpa [add_comm] using Real.add_one_le_exp (4 * eps ^ 2)) n _ = exp ((n : ℝ) * (4 * eps ^ 2)) := by rw [Real.exp_nat_mul] _ = _ := by rw [hnE] have hchi : productChiSq P1 P0 n ≤ chi := by change chiSqDiv (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps))) (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0))) ≤ chi linarith [hchiEq, hpow, hexp, hpoly] have hac1 := minimaxDataMeasure_ac_center J kappa hreg.1 hreg.2.2.1 (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepss) have hint1 := minimaxDataMeasure_sq_integrable_center J kappa hreg.1 hreg.2.2.1 (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepss) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps)) := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1 hreg.2.2.1 _ measurable_const (fun _ => hepsb) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := minimaxDataMeasure_isProbabilityMeasure J kappa hreg.1 hreg.2.2.1 _ measurable_const (fun _ => by norm_num) have hac := pi_iid_absolutelyContinuous _ _ hac1 n have hint := pi_iid_integrable_sq_dev _ _ hac1 hint1 n have hlower := observedMinimaxLength_lower_of_two_point_chi P0 P1 n beta kappa L cminus cplus pmin (deltaSeq n) alpha eps chi hP0 hP1 heps.le hsep (by simpa [P0, P1, iidProduct, minimaxClampLaw] using hac) (by simpa [P0, P1, iidProduct, minimaxClampLaw] using hint) hchi0 hchi dsimp [c, floor, eps, tau, root, eta] at hlower ⊢ simpa [mul_assoc] using hlower
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxLength_eventually_ge_root · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthLower.lean:191
theorem observedMinimaxLength_eventually_ge_local

A fixed contraction of the information bandwidth gives the local fixed-Hölder lower component for minimax honest expected length. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, let h := infoBandwidth n (deltaSeq n) beta kappa deltaBar ofReal (c * (deltaSeq n) ^ (kappa + 1) * h ^ beta)
observedMinimaxLength J n beta kappa L cminus cplus pmin (deltaSeq n) alpha
Proof (Lean source)
lemma observedMinimaxLength_eventually_ge_local (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, let h := infoBandwidth n (deltaSeq n) beta kappa deltaBar ofReal (c * (deltaSeq n) ^ (kappa + 1) * h ^ beta) ≤ observedMinimaxLength J n beta kappa L cminus cplus pmin (deltaSeq n) alpha := by have hr := hreg rcases hr with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ obtain ⟨amplitude, hamp, hamp_le, hamp_model⟩ := exists_minimaxBump_amplitude beta L hbeta hL let eta : ℝ := 1 - 2 * alpha let s : ℝ := eta ^ 2 / 64 let d0 : ℝ := 8 * (kappa + 1) * amplitude ^ 2 let p : ℝ := 2 * beta + 1 let t : ℝ := s / (d0 + 1) let chi : ℝ := eta ^ 2 / 16 let floor : ℝ := eta - (1 / 2) * Real.sqrt chi let c : ℝ := floor * amplitude * t ^ beta have heta : 0 < eta := by dsimp [eta]; linarith have heta1 : eta < 1 := by dsimp [eta]; linarith have hs : 0 < s := by dsimp [s]; positivity have hs1 : s ≤ 1 := by dsimp [s]; nlinarith [sq_nonneg eta] have hd0 : 0 ≤ d0 := by dsimp [d0]; positivity have hp : 1 < p := by dsimp [p]; linarith have ht : 0 < t := div_pos hs (by linarith) have ht1 : t ≤ 1 := by dsimp [t] rw [div_le_one (by linarith : 0 < d0 + 1)] linarith have htp : t ^ p ≤ t := Real.rpow_le_self_of_le_one ht.le ht1 hp.le have hdsmall : d0 * t ^ p ≤ s := by calc d0 * t ^ p ≤ d0 * t := mul_le_mul_of_nonneg_left htp hd0 _ ≤ s := by dsimp [t] rw [← mul_div_assoc, div_le_iff₀ (by linarith : 0 < d0 + 1)] nlinarith [hs.le] have hchi0 : 0 ≤ chi := by dsimp [chi]; positivity have hsqrt : Real.sqrt chi = eta / 4 := by rw [show chi = (eta / 4) ^ 2 by dsimp [chi]; ring, Real.sqrt_sq_eq_abs, abs_of_pos (div_pos heta (by norm_num))] have hfloor : 0 < floor := by dsimp [floor]; rw [hsqrt]; linarith have hxabs : |s| ≤ 1 := by rw [abs_of_pos hs]; exact hs1 have hexp : exp s ≤ 1 + s + s ^ 2 := Causalean.Stat.Concentration.exp_le_one_add_add_sq hxabs have hpoly : s + s ^ 2 ≤ chi := by dsimp [s, chi] have heta_sq : eta ^ 2 ≤ 1 := by nlinarith [sq_nonneg eta] nlinarith [sq_nonneg (eta ^ 2 / 64)] refine ⟨c, by dsimp [c]; positivity, ?_⟩ intro deltaSeq hdelta have hbal := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar, hdeltaBar1⟩ deltaSeq hdelta filter_upwards [hbal] with n hbn dsimp only let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let hsml := t * h let q := fun a : ℝ => amplitude * hsml ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / hsml) let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let P1 := minimaxClampLaw J kappa (fun z => q z.2) have hh : 0 < h := hbn.1 have hh1 : h ≤ 1 := hbn.2.1.trans (by linarith) have hhs : 0 < hsml := mul_pos ht hh have hhs1 : hsml ≤ 1 := (mul_le_of_le_one_left hh.le ht1).trans hh1 have hd : delta ∈ Icc (0 : ℝ) 1 := ⟨(hdelta n).1, (hdelta n).2.trans hdeltaBar1.le⟩ have hshape := hamp_model hd.1 hd.2 hhs hhs1 have hqmeas : Measurable q := by dsimp [q]; fun_prop have hq0 (a : ℝ) : 0 ≤ q a := by dsimp [q] exact mul_nonneg (mul_nonneg hamp.le (Real.rpow_nonneg hhs.le _)) (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqbound (a : ℝ) : |q a| ≤ 1 / 2 := by rw [abs_of_nonneg (hq0 a)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - delta) / hsml) have hpw := Real.rpow_le_one hhs.le hhs1 hbeta.le dsimp [q] calc _ ≤ amplitude * hsml ^ beta := by nlinarith [mul_nonneg hamp.le (Real.rpow_nonneg hhs.le beta)] _ ≤ amplitude := by simpa using mul_le_mul_of_nonneg_left hpw hamp.le _ ≤ 1 / 2 := by linarith have hqstrict (z : Fin J × ℝ) : |q z.2| < 1 / 2 := by rw [abs_of_nonneg (hq0 z.2)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((z.2 - delta) / hsml) have hpw := Real.rpow_le_one hhs.le hhs1 hbeta.le have hqamp : q z.2 ≤ amplitude := by dsimp [q] calc _ ≤ amplitude * hsml ^ beta := by nlinarith [mul_nonneg hamp.le (Real.rpow_nonneg hhs.le beta)] _ ≤ amplitude := by simpa using mul_le_mul_of_nonneg_left hpw hamp.le linarith [hamp_le] have hP0 := minimaxCenter_mem_model J beta kappa L cminus cplus pmin deltaBar alpha hreg have hP1 : ClampModel P1 beta kappa L cminus cplus pmin := by apply minimaxClampModel_of_taylor J beta kappa L cminus cplus pmin hJ hbeta hkappa hcminus_le hcplus hpmin_le q hqmeas hqbound exact hshape.1 exact hshape.2.1 exact hshape.2.2 have hsep0 := minimaxLocalSeparation J beta kappa delta hsml amplitude hJ hbeta hkappa hd hhs hhs1 hamp.le hamp_le have hsep : amplitude * delta ^ (kappa + 1) * hsml ^ beta ≤ |clampFunctional P1 delta - clampFunctional P0 delta| := by have hn : 0 ≤ clampFunctional P1 delta - clampFunctional P0 delta := (mul_nonneg (mul_nonneg hamp.le (Real.rpow_nonneg hd.1 _)) (Real.rpow_nonneg hhs.le _)).trans (by simpa [P0, P1, q] using hsep0) rw [abs_of_nonneg hn] simpa [P0, P1, q] using hsep0 let I := ∫ z, 4 * ((fun z : Fin J × ℝ => q z.2) z) ^ 2 ∂minimaxDesignMeasure J kappa have hI := minimaxLocal_designIntegral_le J beta kappa delta hsml amplitude hJ hkappa hd.1 hhs hamp.le have hnI : (n : ℝ) * I ≤ s := by have hw : delta + hsml ≤ delta + h := by dsimp [hsml] nlinarith [mul_le_of_le_one_left hh.le ht1] have hpoww := Real.rpow_le_rpow (add_nonneg hd.1 hhs.le) hw hkappa have hb := hbn.2.2 calc _ ≤ (n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * hsml ^ (2 * beta + 1) * (delta + hsml) ^ kappa) := mul_le_mul_of_nonneg_left (by simpa [I, q] using hI) (Nat.cast_nonneg n) _ ≤ d0 * t ^ p * ((n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa) := by dsimp [d0, p, hsml] rw [Real.mul_rpow ht.le hh.le] ring_nf gcongr _ = d0 * t ^ p := by rw [hb, mul_one] _ ≤ s := hdsmall have hchiEq := minimaxProduct_chiSqDiv_center J n kappa hJ hkappa (fun z : Fin J × ℝ => q z.2) (hqmeas.comp measurable_snd) hqstrict have hpow : (1 + I) ^ n ≤ exp s := by calc _ ≤ (exp I) ^ n := pow_le_pow_left₀ (by positivity) (by simpa [add_comm] using Real.add_one_le_exp I) n _ = exp ((n : ℝ) * I) := by rw [Real.exp_nat_mul] _ ≤ _ := Real.exp_le_exp.mpr hnI have hchi : productChiSq P1 P0 n ≤ chi := by change chiSqDiv _ _ ≤ chi dsimp [P0, P1, iidProduct, minimaxClampLaw] change 1 + chiSqDiv _ _ = (1 + I) ^ n at hchiEq linarith [hexp, hpoly] have hac1 : minimaxDataMeasure J kappa (fun z : Fin J × ℝ => q z.2) ≪ minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0) := minimaxDataMeasure_ac_center J kappa hJ hkappa _ (hqmeas.comp measurable_snd) hqstrict have hint1 : Integrable (fun o => (((minimaxDataMeasure J kappa (fun z : Fin J × ℝ => q z.2)).rnDeriv (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) o).toReal - 1) ^ 2) (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := by exact minimaxDataMeasure_sq_integrable_center J kappa hJ hkappa _ (hqmeas.comp measurable_snd) hqstrict letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun z : Fin J × ℝ => q z.2)) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ (hqmeas.comp measurable_snd) (fun z => (hqstrict z).le) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ measurable_const (fun _ => by norm_num) have hlower := observedMinimaxLength_lower_of_two_point_chi P0 P1 n beta kappa L cminus cplus pmin delta alpha (amplitude * delta ^ (kappa + 1) * hsml ^ beta) chi hP0 hP1 (mul_nonneg (mul_nonneg hamp.le (Real.rpow_nonneg hd.1 _)) (Real.rpow_nonneg hhs.le _)) hsep (by simpa [P0, P1, iidProduct, minimaxClampLaw] using pi_iid_absolutelyContinuous _ _ hac1 n) (by simpa [P0, P1, iidProduct, minimaxClampLaw] using pi_iid_integrable_sq_dev _ _ hac1 hint1 n) hchi0 hchi dsimp [c, floor, eta, hsml] at hlower ⊢ rw [Real.mul_rpow ht.le hh.le] at hlower simpa [add_comm, mul_comm, mul_left_comm, mul_assoc] using hlower
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxLength_eventually_ge_local · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthLower.lean:314
theorem observedMinimaxLength_eventually_ge_frontier

The root and localized experiments combine into the full fixed-Hölder frontier lower bound for minimax honest expected length. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, ofReal (c * clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta)
observedMinimaxLength J n beta kappa L cminus cplus pmin (deltaSeq n) alpha
Proof (Lean source)
lemma observedMinimaxLength_eventually_ge_frontier (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, ofReal (c * clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta) ≤ observedMinimaxLength J n beta kappa L cminus cplus pmin (deltaSeq n) alpha := by obtain ⟨c0, hc0, h0⟩ := observedMinimaxLength_eventually_ge_root J beta kappa L cminus cplus pmin deltaBar alpha hreg obtain ⟨c1, hc1, h1⟩ := observedMinimaxLength_eventually_ge_local J beta kappa L cminus cplus pmin deltaBar alpha hreg let c := min c0 c1 / 2 refine ⟨c, by dsimp [c]; positivity, ?_⟩ intro deltaSeq hdelta have hbal := infoBandwidth_eventually_balance beta kappa deltaBar hreg.2.1 hreg.2.2.1 ⟨hreg.2.2.2.2.2.2.2.2.2.1, hreg.2.2.2.2.2.2.2.2.2.2.1⟩ deltaSeq hdelta filter_upwards [h0 deltaSeq hdelta, h1 deltaSeq hdelta, hbal] with n hn0 hn1 hbn let h := infoBandwidth n (deltaSeq n) beta kappa deltaBar let root : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) let localTerm : ℝ := (deltaSeq n) ^ (kappa + 1) * h ^ beta have hroot : 0 ≤ root := Real.rpow_nonneg (Nat.cast_nonneg n) _ have hlocal : 0 ≤ localTerm := mul_nonneg (Real.rpow_nonneg (hdelta n).1 _) (Real.rpow_nonneg hbn.1.le _) by_cases hle : c0 * root ≤ c1 * localTerm · apply (ENNReal.ofReal_le_ofReal ?_).trans (by simpa [mul_assoc] using hn1) dsimp [c, clampFrontier, root, localTerm, h] calc min c0 c1 / 2 * ((n : ℝ) ^ (-(1 : ℝ) / 2) + (deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta) = (min c0 c1 * (n : ℝ) ^ (-(1 : ℝ) / 2) + min c0 c1 * ((deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta)) / 2 := by ring _ ≤ (c0 * (n : ℝ) ^ (-(1 : ℝ) / 2) + c1 * ((deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta)) / 2 := by apply div_le_div_of_nonneg_right _ (by norm_num) exact add_le_add (mul_le_mul_of_nonneg_right (min_le_left _ _) hroot) (mul_le_mul_of_nonneg_right (min_le_right _ _) hlocal) _ ≤ c1 * ((deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta) := by dsimp [root, localTerm, h] at hle linarith · apply (ENNReal.ofReal_le_ofReal ?_).trans hn0 have hle' : c1 * localTerm ≤ c0 * root := le_of_not_ge hle dsimp [c, clampFrontier, root, localTerm, h] calc min c0 c1 / 2 * ((n : ℝ) ^ (-(1 : ℝ) / 2) + (deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta) = (min c0 c1 * (n : ℝ) ^ (-(1 : ℝ) / 2) + min c0 c1 * ((deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta)) / 2 := by ring _ ≤ (c0 * (n : ℝ) ^ (-(1 : ℝ) / 2) + c1 * ((deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta)) / 2 := by apply div_le_div_of_nonneg_right _ (by norm_num) exact add_le_add (mul_le_mul_of_nonneg_right (min_le_left _ _) hroot) (mul_le_mul_of_nonneg_right (min_le_right _ _) hlocal) _ ≤ c0 * (n : ℝ) ^ (-(1 : ℝ) / 2) := by dsimp [root, localTerm, h] at hle' linarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxLength_eventually_ge_frontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthLower.lean:504
theorem procedureWorstLength_eventually_ge_frontier

The same eventual frontier lower bound holds for the worst expected length of every uniformly honest procedure. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, ∀ C : ConfidenceProcedure n J, UniformCoverage J n beta kappa L cminus cplus pmin (deltaSeq n) alpha C → ofReal (c * clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta)
clampProcedureWorstLength J n beta kappa L cminus cplus pmin C
Proof (Lean source)
lemma procedureWorstLength_eventually_ge_frontier (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, ∀ C : ConfidenceProcedure n J, UniformCoverage J n beta kappa L cminus cplus pmin (deltaSeq n) alpha C → ofReal (c * clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta) ≤ clampProcedureWorstLength J n beta kappa L cminus cplus pmin C := by obtain ⟨c, hc, hmin⟩ := observedMinimaxLength_eventually_ge_frontier J beta kappa L cminus cplus pmin deltaBar alpha hreg refine ⟨c, hc, ?_⟩ intro deltaSeq hdelta filter_upwards [hmin deltaSeq hdelta] with n hn intro C hC exact hn.trans (observedMinimaxLength_le_clampProcedureWorstLength J n beta kappa L cminus cplus pmin (deltaSeq n) alpha C hC)
CausalSmith.Stat.LmtpThresholdAtomFrontier.procedureWorstLength_eventually_ge_frontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthLower.lean:579
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.HonestLengthUpper 3 declarations Eventual expected-length upper bound for the honest interval

Eventual expected-length upper bound for the honest interval

theorem exp_balanced_edge_eventually_le_root

Exponential decay along the smallest effective-sample polynomial implied by the balance equation dominates the root-sample scale. The result uses the hbeta condition, the hkappa condition, the hc condition. This is the stated conclusion.

Formal statement
beta kappa c :
hbeta :
0 < beta
hkappa :
0 ≤ kappa
hc :
0 < c
∀ᶠ n : ℕ in atTop, exp (-c * (n : ℝ) ^ (2 * beta / (2 * beta + kappa + 1)))
≤ (n : ℝ) ^ (-(1 : ℝ) / 2)
Proof (Lean source)
lemma exp_balanced_edge_eventually_le_root (beta kappa c : ℝ) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (hc : 0 < c) : ∀ᶠ n : ℕ in atTop, exp (-c * (n : ℝ) ^ (2 * beta / (2 * beta + kappa + 1))) ≤ (n : ℝ) ^ (-(1 : ℝ) / 2) := by let a : ℝ := 2 * beta / (2 * beta + kappa + 1) have ha : 0 < a := by dsimp [a]; positivity have htend : Tendsto (fun n : ℕ => (n : ℝ) ^ a) atTop atTop := (tendsto_rpow_atTop ha).comp tendsto_natCast_atTop_atTop have ho := (isLittleO_exp_neg_mul_rpow_atTop hc (-(1 : ℝ) / (2 * a))).eventuallyLE have hoc := htend.eventually ho filter_upwards [hoc, eventually_ge_atTop 1] with n hn hn1 rw [Real.norm_eq_abs, Real.norm_eq_abs, abs_of_pos (Real.exp_pos _), abs_of_pos (Real.rpow_pos_of_pos (by positivity) _)] at hn have hnpos : 0 < (n : ℝ) := by positivity calc exp (-c * (n : ℝ) ^ (2 * beta / (2 * beta + kappa + 1))) = exp (-c * (n : ℝ) ^ a) := by rfl _ ≤ ((n : ℝ) ^ a) ^ (-(1 : ℝ) / (2 * a)) := hn _ = (n : ℝ) ^ (-(1 : ℝ) / 2) := by rw [← Real.rpow_mul hnpos.le] congr 1 field_simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.exp_balanced_edge_eventually_le_root · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthUpper.lean:19
theorem balancedEffectiveSample_ge_edge

The balance equation forces the effective local sample size to grow at least at the edge-regime polynomial rate. The result uses the hn condition, the hbeta condition, the hkappa condition, the hdelta condition, the hh condition, the hbalance condition. This is the stated conclusion.

Formal statement
n :
beta kappa delta h :
hn :
0 < n
hbeta :
0 < beta
hkappa :
0 ≤ kappa
hdelta :
0 ≤ delta
hh :
0 < h
hbalance :
(n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1
(n : ℝ) ^ (2 * beta / (2 * beta + kappa + 1)) ≤ (n : ℝ) * h * (delta + h) ^ kappa
Proof (Lean source)
lemma balancedEffectiveSample_ge_edge {n : ℕ} {beta kappa delta h : ℝ} (hn : 0 < n) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (hdelta : 0 ≤ delta) (hh : 0 < h) (hbalance : (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1) : (n : ℝ) ^ (2 * beta / (2 * beta + kappa + 1)) ≤ (n : ℝ) * h * (delta + h) ^ kappa := by have hnR : 0 < (n : ℝ) := by exact_mod_cast hn let p : ℝ := 2 * beta + 1 have hp : 0 < p := by dsimp [p]; linarith have hedge := balance_root_le_edge_scale (n : ℝ) delta h p kappa hnR hdelta hh hp hkappa (by simpa [p] using hbalance) have heff := effectiveSampleSize_eq_rpow hh hbalance rw [heff] have hpw := Real.rpow_le_rpow_of_nonpos hh hedge (by linarith : -2 * beta ≤ 0) calc (n : ℝ) ^ (2 * beta / (2 * beta + kappa + 1)) = ((n : ℝ) ^ (-1 / (p + kappa))) ^ (-2 * beta) := by rw [← Real.rpow_mul hnR.le] congr 1 dsimp [p] field_simp <;> ring _ ≤ h ^ (-2 * beta) := hpw
CausalSmith.Stat.LmtpThresholdAtomFrontier.balancedEffectiveSample_ge_edge · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthUpper.lean:47
theorem honestInterval_worstLength_eventually_le_frontier

Uniform eventual expected-length upper bound for the concrete bias-aware interval, including the supremum over all laws in the admissible regime, is controlled by the frontier rate.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ C : ℝ,
0 < C
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
Bseq :
∀ n
SplitBlocks n, ∀ᶠ n in atTop, sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ IidSampling P n ∧ v = ∫ z, intervalLength (honestInterval (Bseq n) z (ellOf beta) beta kappa L cminus cplus (deltaSeq n) (infoBandwidth n (deltaSeq n) beta kappa deltaBar) alpha) ∂iidProduct P n}
≤ C * clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta
Proof (Lean source)
lemma honestInterval_worstLength_eventually_le_frontier (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ C : ℝ, 0 < C ∧ ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → ∀ Bseq : ∀ n, SplitBlocks n, ∀ᶠ n in atTop, sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ IidSampling P n ∧ v = ∫ z, intervalLength (honestInterval (Bseq n) z (ellOf beta) beta kappa L cminus cplus (deltaSeq n) (infoBandwidth n (deltaSeq n) beta kappa deltaBar) alpha) ∂iidProduct P n} ≤ C * clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta := by rcases total_gram_stabilization J beta kappa L cminus cplus pmin deltaBar alpha hreg with ⟨Ct, ct, hCt, hct, hlambda, hstab⟩ have hreg' := hreg rcases hreg' with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ let t : ℝ := sqrt (log (12 * (J : ℝ) / alpha) / 2) let energyC : ℝ := sqrt (336 * (4 * (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus ^ 2) / (pmin * cminus / (2 * (2 : ℝ) ^ kappa))) let biasC : ℝ := L * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) let localC : ℝ := biasC + t * energyC let atomK : ℝ := cplus / (kappa + 1) let rootCoeff : ℝ := (3 / 2 : ℝ) + 3 * t let radiusC : ℝ := rootCoeff * localC + atomK * localC + 3 * t + Ct let C : ℝ := 2 * (3 * t + (J : ℝ) * radiusC) + 1 have ht : 0 ≤ t := Real.sqrt_nonneg _ have henergyC : 0 ≤ energyC := Real.sqrt_nonneg _ have hbiasC : 0 ≤ biasC := by dsimp [biasC]; positivity have hlocalC : 0 ≤ localC := by dsimp [localC]; positivity have hatomK : 0 ≤ atomK := by dsimp [atomK] exact div_nonneg (by linarith) (by linarith) have hrootCoeff : 0 ≤ rootCoeff := by dsimp [rootCoeff]; positivity have hradiusC : 0 ≤ radiusC := by dsimp [radiusC]; positivity have hC : 0 < C := by dsimp [C]; positivity refine ⟨C, hC, ?_⟩ intro deltaSeq hdelta Bseq have hbal := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar, hdeltaBar1⟩ deltaSeq hdelta have hdecay := exp_balanced_edge_eventually_le_root beta kappa ct hbeta hkappa hct filter_upwards [hbal, hdecay, eventually_ge_atTop 8] with n hbn hdecayN hn let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r0 := (n : ℝ) ^ (-(1 : ℝ) / 2) let d0 := delta ^ (kappa + 1) let a0 := d0 * h ^ beta let b0 := t / sqrt ((Bseq n).I0.card : ℝ) let b1 := t / sqrt ((Bseq n).I1.card : ℝ) have hnpos : 0 < n := by omega have hh : 0 < h := by simpa [h, delta] using hbn.1 have hhbar : h ≤ 1 - deltaBar := by simpa [h, delta] using hbn.2.1 have hh1 : h ≤ 1 := hhbar.trans (by linarith) have hbalance : (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1 := by simpa [h, delta] using hbn.2.2 have hdeltaN : delta ∈ Icc (0 : ℝ) deltaBar := hdelta n have hupper : delta + h ≤ 1 := by linarith [hdeltaN.2, hhbar] have hr0 : 0 ≤ r0 := Real.rpow_nonneg (Nat.cast_nonneg n) _ have hd0 : 0 ≤ d0 := Real.rpow_nonneg hdeltaN.1 _ have hhbeta : 0 ≤ h ^ beta := Real.rpow_nonneg hh.le _ have hhbeta1 : h ^ beta ≤ 1 := by simpa using Real.rpow_le_one hh.le hh1 hbeta.le have ha0 : 0 ≤ a0 := mul_nonneg hd0 hhbeta have hsqrt0 : sqrt ((Bseq n).I0.card : ℝ)⁻¹ ≤ 3 * r0 := by apply splitBlock_invSqrt_le_root (by exact_mod_cast hnpos) have hc := (Bseq n).card_I0 omega have hsqrt1 : sqrt ((Bseq n).I1.card : ℝ)⁻¹ ≤ 3 * r0 := by apply splitBlock_invSqrt_le_root (by exact_mod_cast hnpos) have hc := (Bseq n).card_I1 omega have hb0 : b0 ≤ 3 * t * r0 := by calc b0 = t * sqrt ((Bseq n).I0.card : ℝ)⁻¹ := by simp [b0, div_eq_mul_inv, Real.sqrt_inv] _ ≤ t * (3 * r0) := mul_le_mul_of_nonneg_left hsqrt0 ht _ = 3 * t * r0 := by ring have hb1 : b1 ≤ 3 * t * r0 := by calc b1 = t * sqrt ((Bseq n).I1.card : ℝ)⁻¹ := by simp [b1, div_eq_mul_inv, Real.sqrt_inv] _ ≤ t * (3 * r0) := mul_le_mul_of_nonneg_left hsqrt1 ht _ = 3 * t * r0 := by ring have hb10 : 0 ≤ b1 := by dsimp [b1]; positivity have heffLower := balancedEffectiveSample_ge_edge hnpos hbeta hkappa hdeltaN.1 hh hbalance have htailExp : Ct * exp (-ct * (n : ℝ) * h * (delta + h) ^ kappa) ≤ Ct * r0 := by apply mul_le_mul_of_nonneg_left _ hCt.le calc exp (-ct * (n : ℝ) * h * (delta + h) ^ kappa) = exp (-ct * ((n : ℝ) * h * (delta + h) ^ kappa)) := by congr 1 ring _ ≤ exp (-ct * (n : ℝ) ^ (2 * beta / (2 * beta + kappa + 1))) := by apply Real.exp_le_exp.mpr nlinarith _ ≤ r0 := by simpa [r0] using hdecayN apply honestInterval_modelSup_le J n (Bseq n) beta kappa L cminus cplus pmin deltaBar alpha delta h (C * clampFrontier n delta kappa h beta) hreg intro P hP letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct; infer_instance have hsampling : IidSampling P n := clampModel_iidSampling hP have htail (x : Fin J) : (iidProduct P n).real {z | ¬ GoodGramEvent (Bseq n) z x (ellOf beta) kappa cminus cplus delta h} ≤ Ct * r0 := by exact (hstab P hP n hsampling (Bseq n) delta hdeltaN x).1 |>.trans htailExp have hradBound (x : Fin J) : (∫ z, stratumRadius (Bseq n) z x (ellOf beta) beta kappa L cminus cplus delta h t b1 ∂iidProduct P n) ≤ radiusC * (r0 + a0) := by have hfac := integral_stratumRadius_le_factored P (Bseq n) x beta kappa L cminus cplus delta h t b1 hJ hP.probability hbeta.le hL.le hh ht hb10 hlambda have hatom := integral_atomEstimate_le_envelope P (Bseq n) x beta kappa L cminus cplus pmin deltaBar alpha delta hP hreg (by have hc := (Bseq n).card_I1 omega) hdeltaN have henergy := integral_sqrt_interceptWeight_energy_balanced_le (ell := ellOf beta) P hP hsampling (Bseq n) x hn hbeta hkappa hcminus (by linarith [hcplus] : 0 ≤ cplus) hpmin hdeltaN.1 hh hupper hlambda hbalance have hfirst : (∫ z, atomEstimate (Bseq n) z x delta ∂iidProduct P n) + b1 ≤ rootCoeff * r0 + atomK * d0 := by calc _ ≤ ((1 / 2 : ℝ) * sqrt ((Bseq n).I1.card : ℝ)⁻¹ + cplus * d0 / (kappa + 1)) + 3 * t * r0 := add_le_add hatom hb1 _ = ((1 / 2 : ℝ) * sqrt ((Bseq n).I1.card : ℝ)⁻¹ + atomK * d0) + 3 * t * r0 := by dsimp [atomK] ring _ ≤ rootCoeff * r0 + atomK * d0 := by dsimp [rootCoeff] nlinarith [hsqrt1] have hsecond : L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) + t * (∫ z, sqrt (∑ i ∈ (Bseq n).I2, interceptWeight (Bseq n) z x (ellOf beta) kappa cminus cplus delta h i ^ 2) ∂iidProduct P n) ≤ localC * h ^ beta := by calc _ ≤ biasC * h ^ beta + t * (energyC * h ^ beta) := by apply add_le_add · dsimp [biasC]; ring_nf; exact le_rfl · exact mul_le_mul_of_nonneg_left henergy ht _ = localC * h ^ beta := by dsimp [localC]; ring have hprod : ((∫ z, atomEstimate (Bseq n) z x delta ∂iidProduct P n) + b1) * (L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) + t * (∫ z, sqrt (∑ i ∈ (Bseq n).I2, interceptWeight (Bseq n) z x (ellOf beta) kappa cminus cplus delta h i ^ 2) ∂iidProduct P n)) ≤ rootCoeff * localC * r0 + atomK * localC * a0 := by have hfirst0 : 0 ≤ (∫ z, atomEstimate (Bseq n) z x delta ∂iidProduct P n) + b1 := by apply add_nonneg · exact integral_nonneg fun _ => (atomEstimate_mem_Icc (Bseq n) _ x delta).1 · exact hb10 have hsecond0 : 0 ≤ L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) + t * (∫ z, sqrt (∑ i ∈ (Bseq n).I2, interceptWeight (Bseq n) z x (ellOf beta) kappa cminus cplus delta h i ^ 2) ∂iidProduct P n) := by positivity calc _ ≤ (rootCoeff * r0 + atomK * d0) * (localC * h ^ beta) := mul_le_mul hfirst hsecond hsecond0 (add_nonneg (mul_nonneg hrootCoeff hr0) (mul_nonneg hatomK hd0)) _ = rootCoeff * localC * (r0 * h ^ beta) + atomK * localC * a0 := by dsimp [a0] ring _ ≤ rootCoeff * localC * r0 + atomK * localC * a0 := by exact add_le_add (mul_le_mul_of_nonneg_left (mul_le_of_le_one_right hr0 hhbeta1) (mul_nonneg hrootCoeff hlocalC)) le_rfl calc _ ≤ _ := hfac _ ≤ (rootCoeff * localC * r0 + atomK * localC * a0) + 3 * t * r0 + Ct * r0 := by exact add_le_add (add_le_add hprod hb1) (htail x) _ ≤ radiusC * (r0 + a0) := by dsimp [radiusC] have hJunk : 0 ≤ atomK * localC := mul_nonneg hatomK hlocalC have hmain0 : 0 ≤ rootCoeff * localC + 3 * t + Ct := by positivity nlinarith [mul_nonneg hJunk hr0, mul_nonneg hmain0 ha0] have hradInt (x : Fin J) := stratumRadius_integrable P (Bseq n) x beta kappa L cminus cplus delta h t b1 hP.probability hbeta.le hL.le hh ht hb10 hlambda have hsumInt : Integrable (fun z : Fin n → ClampObs J => ∑ x : Fin J, stratumRadius (Bseq n) z x (ellOf beta) beta kappa L cminus cplus delta h t b1) (iidProduct P n) := integrable_finsetSum univ fun x _ => hradInt x have hradiusInt : Integrable (fun z : Fin n → ClampObs J => honestRadius (Bseq n) z beta kappa L cminus cplus delta h alpha) (iidProduct P n) := by simpa [honestRadius, t, b0, b1] using (integrable_const b0).add hsumInt have hlenInt : Integrable (fun z : Fin n → ClampObs J => intervalLength (honestInterval (Bseq n) z (ellOf beta) beta kappa L cminus cplus delta h alpha)) (iidProduct P n) := by refine Integrable.of_bound (honestInterval_length_measurable (Bseq n) beta kappa L cminus cplus delta h alpha |>.aestronglyMeasurable) 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (le_max_left _ _)] exact honestInterval_length_le_one (Bseq n) beta kappa L cminus cplus delta h alpha z have hlenRad : (∫ z, intervalLength (honestInterval (Bseq n) z (ellOf beta) beta kappa L cminus cplus delta h alpha) ∂iidProduct P n) ≤ ∫ z, 2 * honestRadius (Bseq n) z beta kappa L cminus cplus delta h alpha ∂iidProduct P n := integral_mono hlenInt (hradiusInt.const_mul 2) fun z => honestInterval_length_le_two_radius J n (Bseq n) beta kappa L cminus cplus pmin deltaBar alpha delta h hreg (by omega) hh.le z calc _ ≤ ∫ z, 2 * honestRadius (Bseq n) z beta kappa L cminus cplus delta h alpha ∂iidProduct P n := hlenRad _ = 2 * (b0 + ∑ x : Fin J, ∫ z, stratumRadius (Bseq n) z x (ellOf beta) beta kappa L cminus cplus delta h t b1 ∂iidProduct P n) := by rw [integral_const_mul] change 2 * (∫ z, b0 + ∑ x : Fin J, stratumRadius (Bseq n) z x (ellOf beta) beta kappa L cminus cplus delta h t b1 ∂iidProduct P n) = _ rw [integral_add (integrable_const _) hsumInt, integral_const, integral_finset_sum univ (fun x _ => hradInt x)] simp _ ≤ 2 * (3 * t * r0 + (J : ℝ) * (radiusC * (r0 + a0))) := by apply mul_le_mul_of_nonneg_left _ (by norm_num) calc b0 + ∑ x : Fin J, ∫ z, stratumRadius (Bseq n) z x (ellOf beta) beta kappa L cminus cplus delta h t b1 ∂iidProduct P n ≤ 3 * t * r0 + ∑ _x : Fin J, radiusC * (r0 + a0) := by exact add_le_add hb0 (Finset.sum_le_sum fun x _ => hradBound x) _ = 3 * t * r0 + (J : ℝ) * (radiusC * (r0 + a0)) := by simp _ ≤ C * (r0 + a0) := by dsimp [C] have hrsum : 0 ≤ r0 + a0 := add_nonneg hr0 ha0 -- … truncated; follow the source link for the rest …
CausalSmith.Stat.LmtpThresholdAtomFrontier.honestInterval_worstLength_eventually_le_frontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestLengthUpper.lean:76
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.HonestMixedTerm 5 declarations Disjoint-block factorization for the honest-radius mixed term

Disjoint-block factorization for the honest-radius mixed term

theorem interceptWeight_congr_I2

Local-polynomial intercept weights only depend on observations in the local-regression block. The result uses the hz condition, the hi condition. This is the stated conclusion.

Formal statement
J n ell :
B :
z z' :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
hz :
∀ i ∈ B.I2, z' i = z i
i :
Fin n
hi :
i ∈ B.I2
interceptWeight B z' x ell kappa cminus cplus delta h i
= interceptWeight B z x ell kappa cminus cplus delta h i
Proof (Lean source)
lemma interceptWeight_congr_I2 {J n ell : ℕ} (B : SplitBlocks n) (z z' : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) (hz : ∀ i ∈ B.I2, z' i = z i) (i : Fin n) (hi : i ∈ B.I2) : interceptWeight B z' x ell kappa cminus cplus delta h i = interceptWeight B z x ell kappa cminus cplus delta h i := by classical have hcount : localCount B z' x delta h = localCount B z x delta h := by unfold localCount apply Finset.sum_congr rfl intro j hj rw [hz j hj] have hkernel : localKernelWeight B z' x delta h = localKernelWeight B z x delta h := by funext j by_cases hj : j ∈ B.I2 · simp [localKernelWeight, hj, hz j hj] · simp [localKernelWeight, hj] have hgram : localGram B z' x ell delta h = localGram B z x ell delta h := by ext a b simp only [localGram, designMatrix] apply Finset.sum_congr rfl intro j hj by_cases hj2 : j ∈ B.I2 · rw [hz j hj2, hkernel] · have hk' : localKernelWeight B z' x delta h j = 0 := by simp [localKernelWeight, hj2] have hk : localKernelWeight B z x delta h j = 0 := by simp [localKernelWeight, hj2] rw [hk', hk] simp have hgood : GoodGramEvent B z' x ell kappa cminus cplus delta h ↔ GoodGramEvent B z x ell kappa cminus cplus delta h := by unfold GoodGramEvent rw [hcount, hgram] have hdesign := hgram change designMatrix ell (fun j => scaledDose delta h (z' j)) (localKernelWeight B z' x delta h) = designMatrix ell (fun j => scaledDose delta h (z j)) (localKernelWeight B z x delta h) at hdesign unfold interceptWeight by_cases hg : GoodGramEvent B z x ell kappa cminus cplus delta h · rw [if_pos (hgood.mpr hg), if_pos hg] unfold equivKernelWeight rw [hdesign, hkernel] apply Finset.sum_congr rfl intro k hk congr 3 exact congrArg (scaledDose delta h) (hz i hi) · rw [if_neg (fun hg' => hg (hgood.mp hg')), if_neg hg]
CausalSmith.Stat.LmtpThresholdAtomFrontier.interceptWeight_congr_I2 · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestMixedTerm.lean:18
theorem integral_atomEstimate_mul_sqrt_weightEnergy

Exact factorization of the atom-frequency/weight-energy mixed moment across the disjoint estimation blocks. The result uses the hJ condition, the hprob condition. This is the stated conclusion.

Formal statement
J n ell :
P :
B :
x :
Fin J
kappa cminus cplus delta h :
hJ :
0 < J
hprob :
IsProbabilityMeasure P.dataMeasure
(∫ z, atomEstimate B z x delta * sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ∂iidProduct P n)
= (∫ z, atomEstimate B z x delta ∂iidProduct P n) * ∫ z, sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ∂iidProduct P n
Proof (Lean source)
lemma integral_atomEstimate_mul_sqrt_weightEnergy {J n ell : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (x : Fin J) (kappa cminus cplus delta h : ℝ) (hJ : 0 < J) (hprob : IsProbabilityMeasure P.dataMeasure) : (∫ z, atomEstimate B z x delta * sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ∂iidProduct P n) = (∫ z, atomEstimate B z x delta ∂iidProduct P n) * ∫ z, sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ∂iidProduct P n := by classical let o0 : ClampObs J := ⟨⟨0, hJ⟩, 0, 0⟩ let extendBlock (I : Finset (Fin n)) (u : (i : {i // i ∈ I}) → ClampObs J) : Fin n → ClampObs J := fun i => if hi : i ∈ I then u ⟨i, hi⟩ else o0 have hextMeas (I : Finset (Fin n)) : Measurable (extendBlock I) := by apply measurable_pi_lambda intro i by_cases hi : i ∈ I · simpa [extendBlock, hi] using (measurable_pi_apply (⟨i, hi⟩ : {i // i ∈ I})) · simp only [extendBlock, hi, dite_false] exact measurable_const let F : ((i : {i // i ∈ B.I1}) → ClampObs J) → ℝ := fun u => atomEstimate B (extendBlock B.I1 u) x delta let G : ((i : {i // i ∈ B.I2}) → ClampObs J) → ℝ := fun u => sqrt (∑ i ∈ B.I2, (interceptWeight B (extendBlock B.I2 u) x ell kappa cminus cplus delta h i) ^ 2) have hF : Measurable F := by exact (atomEstimate_measurable B x delta).comp (hextMeas B.I1) have hG : Measurable G := by apply Measurable.sqrt exact Finset.measurable_fun_sum B.I2 fun i _ => ((interceptWeight_measurable B x kappa cminus cplus delta h i).comp (hextMeas B.I2)).pow_const 2 have hFproj (z : Fin n → ClampObs J) : F (finsetCoordProj B.I1 z) = atomEstimate B z x delta := by unfold F atomEstimate blockAverage congr 1 apply Finset.sum_congr rfl intro i hi simp [extendBlock, finsetCoordProj, hi] have hGproj (z : Fin n → ClampObs J) : G (finsetCoordProj B.I2 z) = sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) := by unfold G congr 1 apply Finset.sum_congr rfl intro i hi congr 1 exact (interceptWeight_congr_I2 (ell := ell) B (extendBlock B.I2 (finsetCoordProj B.I2 z)) z x kappa cminus cplus delta h (by intro j hj dsimp only [extendBlock] rw [dif_pos hj] rfl) i hi).symm have hfactor := integral_mul_I1_I2 P B hprob F G hF hG calc _ = ∫ z, F (finsetCoordProj B.I1 z) * G (finsetCoordProj B.I2 z) ∂iidProduct P n := by apply integral_congr_ae filter_upwards with z rw [hFproj, hGproj] _ = (∫ z, F (finsetCoordProj B.I1 z) ∂iidProduct P n) * ∫ z, G (finsetCoordProj B.I2 z) ∂iidProduct P n := hfactor _ = _ := by congr 1 · apply integral_congr_ae filter_upwards with z rw [hFproj] · apply integral_congr_ae filter_upwards with z rw [hGproj]
CausalSmith.Stat.LmtpThresholdAtomFrontier.integral_atomEstimate_mul_sqrt_weightEnergy · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestMixedTerm.lean:72
theorem integral_sqrt_interceptWeight_energy_balanced_le Lemma 13 in the paper ↗

At the information-balanced bandwidth, the expected square-root weight energy has the same h^beta scale as the local stochastic error. The result uses the hmodel condition, the hsampling condition, the hn condition, the hbeta condition, the hkappa condition, the hcminus condition, the hcplus condition, the hpmin condition, the hdelta condition, the hh condition, the hupper condition, the hlambda condition, the hbalance condition. This is the stated conclusion.

Formal statement
J n ell :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hsampling :
B :
x :
Fin J
hn :
8 ≤ n
hbeta :
0 < beta
hkappa :
0 ≤ kappa
hcminus :
0 < cminus
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
hdelta :
0 ≤ delta
hh :
0 < h
hupper :
delta + h ≤ 1
hlambda :
0 < lambdaStar ell kappa cminus cplus
hbalance :
(n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1
(∫ z, sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ∂iidProduct P n)
sqrt (336 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / (pmin * cminus / (2 * (2 : ℝ) ^ kappa))) * h ^ beta
Proof (Lean source)
lemma integral_sqrt_interceptWeight_energy_balanced_le {J n ell : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hsampling : IidSampling P n) (B : SplitBlocks n) (x : Fin J) (hn : 8 ≤ n) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (hcminus : 0 < cminus) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (hdelta : 0 ≤ delta) (hh : 0 < h) (hupper : delta + h ≤ 1) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (hbalance : (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1) : (∫ z, sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ∂iidProduct P n) ≤ sqrt (336 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / (pmin * cminus / (2 * (2 : ℝ) ^ kappa))) * h ^ beta := by let p := ∫ o, localWindowWeight x delta h o ∂P.dataMeasure let D := 4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2 let K := pmin * cminus / (2 * (2 : ℝ) ^ kappa) have hK : 0 < K := by dsimp [K]; positivity have hpLower : K * h * (delta + h) ^ kappa ≤ p := by have hl := localWindowWeight_integral_lower P hmodel hkappa hcminus hcplus hpmin x hdelta hh hupper have hdh : 0 < delta + h := by linarith have hrpow : ((delta + h) / 2) ^ kappa = (delta + h) ^ kappa / (2 : ℝ) ^ kappa := by rw [Real.div_rpow hdh.le (by norm_num : (0 : ℝ) ≤ 2)] rw [hrpow] at hl dsimp [K, p] convert hl using 1 <;> ring have hp0 : 0 < p := lt_of_lt_of_le (by exact mul_pos (mul_pos hK hh) (Real.rpow_pos_of_pos (by linarith) _)) hpLower have hcardNat : 0 < B.I2.card := lt_of_lt_of_le (by omega) B.card_I2 have hcard : (n : ℝ) / 8 ≤ (B.I2.card : ℝ) := by have hqcard := B.card_I2 have hncard : n ≤ 8 * B.I2.card := by omega have hncardR : (n : ℝ) ≤ 8 * (B.I2.card : ℝ) := by exact_mod_cast hncard linarith have hraw := integral_sqrt_interceptWeight_energy_le P B x kappa cminus cplus delta h p hsampling hh hlambda hp0 hcardNat rfl have hD : 0 ≤ D := by dsimp [D]; positivity have hrate := balancedEffectiveSample_sqrt_le (D := D) (K := K) (p := p) (m := (B.I2.card : ℝ)) (Nat.zero_lt_of_lt hn) hh hD hK hcard hpLower hbalance dsimp [D, K] at hrate exact hraw.trans hrate
CausalSmith.Stat.LmtpThresholdAtomFrontier.integral_sqrt_interceptWeight_energy_balanced_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestMixedTerm.lean:154
theorem integral_stratumRadius_le_factored

Integrated version of the good/bad pointwise radius decomposition. The mixed stochastic term factors exactly by sample splitting. The result uses the hJ condition, the hprob condition, the hbeta condition, the hL condition, the hh condition, the ht condition, the hb1 condition, the hlambda condition. This is the stated conclusion.

Formal statement
J n :
P :
B :
x :
Fin J
beta kappa L cminus cplus delta h t b1 :
hJ :
0 < J
hprob :
IsProbabilityMeasure P.dataMeasure
hbeta :
0 ≤ beta
hL :
0 ≤ L
hh :
0 < h
ht :
0 ≤ t
hb1 :
0 ≤ b1
hlambda :
0 < lambdaStar (ellOf beta) kappa cminus cplus
(∫ z, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h t b1 ∂iidProduct P n)
≤ ((∫ z, atomEstimate B z x delta ∂iidProduct P n) + b1) * (L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) + t * (∫ z, sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) ∂iidProduct P n))
+ b1
+ (iidProduct P n).real {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h}
Proof (Lean source)
lemma integral_stratumRadius_le_factored {J n : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (x : Fin J) (beta kappa L cminus cplus delta h t b1 : ℝ) (hJ : 0 < J) (hprob : IsProbabilityMeasure P.dataMeasure) (hbeta : 0 ≤ beta) (hL : 0 ≤ L) (hh : 0 < h) (ht : 0 ≤ t) (hb1 : 0 ≤ b1) (hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus) : (∫ z, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h t b1 ∂iidProduct P n) ≤ ((∫ z, atomEstimate B z x delta ∂iidProduct P n) + b1) * (L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) + t * (∫ z, sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) ∂iidProduct P n)) + b1 + (iidProduct P n).real {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h} := by letI : IsProbabilityMeasure P.dataMeasure := hprob letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct; infer_instance let energy : (Fin n → ClampObs J) → ℝ := fun z => sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) let bad : Set (Fin n → ClampObs J) := {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h} let bias := L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) let rhs : (Fin n → ClampObs J) → ℝ := fun z => (atomEstimate B z x delta + b1) * (bias + t * energy z) + b1 + bad.indicator (fun _ => (1 : ℝ)) z have henergyMeas : Measurable energy := by exact (Finset.measurable_fun_sum B.I2 fun i _ => (interceptWeight_measurable B x kappa cminus cplus delta h i).pow_const 2).sqrt have henergyBound : ∀ z, energy z ≤ sqrt (4 * (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus ^ 2) := by intro z apply Real.sqrt_le_sqrt have he := localRegression_weight_energy_le (ell := ellOf beta) B z x kappa cminus cplus delta h hh hlambda simpa only [localRegressionDesignWeight_apply, ite_pow, zero_pow (by norm_num : 2 ≠ 0), ← Finset.sum_filter, Finset.filter_mem_eq_inter, Finset.univ_inter] using he have henergyInt : Integrable energy (iidProduct P n) := by refine Integrable.of_bound henergyMeas.aestronglyMeasurable (sqrt (4 * (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus ^ 2)) ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (Real.sqrt_nonneg _)] exact henergyBound z have hatomInt : Integrable (fun z : Fin n → ClampObs J => atomEstimate B z x delta) (iidProduct P n) := by refine Integrable.of_bound (atomEstimate_measurable B x delta).aestronglyMeasurable 1 ?_ filter_upwards with z have hz := atomEstimate_mem_Icc B z x delta rw [Real.norm_eq_abs, abs_of_nonneg hz.1] exact hz.2 have hbadMeas : MeasurableSet bad := (goodGramEvent_measurable B x kappa cminus cplus delta h).compl have hbadInt : Integrable (bad.indicator (fun _ => (1 : ℝ))) (iidProduct P n) := (integrable_const 1).indicator hbadMeas have hrhsInt : Integrable rhs (iidProduct P n) := by dsimp [rhs] have hleft := hatomInt.add (integrable_const b1) have hright := (integrable_const bias).add (henergyInt.const_mul t) exact (hleft.mul_bdd hright.aestronglyMeasurable (by filter_upwards with z rw [Real.norm_eq_abs] have hz := atomEstimate_mem_Icc B z x delta change |bias + t * energy z| ≤ _ rw [abs_of_nonneg (by positivity : 0 ≤ bias + t * energy z)] exact add_le_add le_rfl (mul_le_mul_of_nonneg_left (henergyBound z) ht))).add (integrable_const b1) |>.add hbadInt have hradMeas : Measurable (fun z : Fin n → ClampObs J => stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h t b1) := honest_stratumRadius_measurable B x beta kappa L cminus cplus delta h t b1 have hpoint (z : Fin n → ClampObs J) : stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h t b1 ≤ rhs z := stratumRadius_le_good_expression_add_bad B z x beta kappa L cminus cplus delta h t b1 hbeta hL hh ht hb1 hlambda have hrad0 (z : Fin n → ClampObs J) : 0 ≤ stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h t b1 := by unfold stratumRadius atomEstimate blockAverage split_ifs <;> positivity have hradInt : Integrable (fun z : Fin n → ClampObs J => stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h t b1) (iidProduct P n) := hrhsInt.mono' hradMeas.aestronglyMeasurable (by filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (hrad0 z)] exact hpoint z) have hmixInt : Integrable (fun z : Fin n → ClampObs J => atomEstimate B z x delta * energy z) (iidProduct P n) := henergyInt.bdd_mul (atomEstimate_measurable B x delta).aestronglyMeasurable (by filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (atomEstimate_mem_Icc B z x delta).1] exact (atomEstimate_mem_Icc B z x delta).2) have hfactor := integral_atomEstimate_mul_sqrt_weightEnergy (ell := ellOf beta) P B x kappa cminus cplus delta h hJ hprob change (∫ z, atomEstimate B z x delta * energy z ∂iidProduct P n) = _ at hfactor have hprodIntegral : (∫ z, (atomEstimate B z x delta + b1) * (bias + t * energy z) ∂iidProduct P n) = ((∫ z, atomEstimate B z x delta ∂iidProduct P n) + b1) * (bias + t * ∫ z, energy z ∂iidProduct P n) := by have hA : Integrable (fun z : Fin n → ClampObs J => bias * atomEstimate B z x delta) (iidProduct P n) := hatomInt.const_mul bias have hB : Integrable (fun z : Fin n → ClampObs J => t * (atomEstimate B z x delta * energy z)) (iidProduct P n) := hmixInt.const_mul t have hC : Integrable (fun _z : Fin n → ClampObs J => b1 * bias) (iidProduct P n) := integrable_const _ have hD : Integrable (fun z : Fin n → ClampObs J => b1 * t * energy z) (iidProduct P n) := by simpa only [mul_assoc] using henergyInt.const_mul (b1 * t) rw [show (fun z : Fin n → ClampObs J => (atomEstimate B z x delta + b1) * (bias + t * energy z)) = fun z => bias * atomEstimate B z x delta + t * (atomEstimate B z x delta * energy z) + b1 * bias + b1 * t * energy z by funext z; ring] have hABCD := integral_add ((hA.add hB).add hC) hD have hABC := integral_add (hA.add hB) hC have hAB := integral_add hA hB calc _ = (∫ z, bias * atomEstimate B z x delta + t * (atomEstimate B z x delta * energy z) + b1 * bias ∂iidProduct P n) + ∫ z, b1 * t * energy z ∂iidProduct P n := by simpa only [Pi.add_apply] using hABCD _ = ((∫ z, bias * atomEstimate B z x delta + t * (atomEstimate B z x delta * energy z) ∂iidProduct P n) + ∫ _z, b1 * bias ∂iidProduct P n) + ∫ z, b1 * t * energy z ∂iidProduct P n := by rw [show (∫ z, bias * atomEstimate B z x delta + t * (atomEstimate B z x delta * energy z) + b1 * bias ∂iidProduct P n) = _ by simpa only [Pi.add_apply] using hABC] _ = (((∫ z, bias * atomEstimate B z x delta ∂iidProduct P n) + ∫ z, t * (atomEstimate B z x delta * energy z) ∂iidProduct P n) + ∫ _z, b1 * bias ∂iidProduct P n) + ∫ z, b1 * t * energy z ∂iidProduct P n := by rw [show (∫ z, bias * atomEstimate B z x delta + t * (atomEstimate B z x delta * energy z) ∂iidProduct P n) = _ by simpa only [Pi.add_apply] using hAB] _ = _ := by rw [integral_const_mul, integral_const_mul, integral_const, integral_const_mul, hfactor] simp ring calc _ ≤ ∫ z, rhs z ∂iidProduct P n := integral_mono hradInt hrhsInt hpoint _ = _ := by dsimp [rhs] have hprodInt : Integrable (fun z : Fin n → ClampObs J => (atomEstimate B z x delta + b1) * (bias + t * energy z)) (iidProduct P n) := (hatomInt.add (integrable_const b1)).mul_bdd ((integrable_const bias).add (henergyInt.const_mul t)).aestronglyMeasurable (by filter_upwards with z rw [Real.norm_eq_abs] change |bias + t * energy z| ≤ _ rw [abs_of_nonneg (by positivity : 0 ≤ bias + t * energy z)] exact add_le_add le_rfl (mul_le_mul_of_nonneg_left (henergyBound z) ht)) calc (∫ z, (atomEstimate B z x delta + b1) * (bias + t * energy z) + b1 + bad.indicator (fun _ => (1 : ℝ)) z ∂iidProduct P n) = (∫ z, (atomEstimate B z x delta + b1) * (bias + t * energy z) + b1 ∂iidProduct P n) + ∫ z, bad.indicator (fun _ => (1 : ℝ)) z ∂iidProduct P n := integral_add (hprodInt.add (integrable_const b1)) hbadInt _ = ((∫ z, (atomEstimate B z x delta + b1) * (bias + t * energy z) ∂iidProduct P n) + ∫ _z, b1 ∂iidProduct P n) + ∫ z, bad.indicator (fun _ => (1 : ℝ)) z ∂iidProduct P n := by rw [integral_add hprodInt (integrable_const b1)] _ = _ := by rw [hprodIntegral, integral_const, integral_indicator hbadMeas, integral_const] simp [measureReal_def, energy, bad, bias]
CausalSmith.Stat.LmtpThresholdAtomFrontier.integral_stratumRadius_le_factored · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestMixedTerm.lean:207
theorem stratumRadius_integrable

The displayed per-stratum radius is integrable under every product law. This is the bookkeeping input needed to integrate the finite sum of radii. The result uses the hprob condition, the hbeta condition, the hL condition, the hh condition, the ht condition, the hb1 condition, the hlambda condition. This is the stated conclusion.

Formal statement
J n :
P :
B :
x :
Fin J
beta kappa L cminus cplus delta h t b1 :
hprob :
IsProbabilityMeasure P.dataMeasure
hbeta :
0 ≤ beta
hL :
0 ≤ L
hh :
0 < h
ht :
0 ≤ t
hb1 :
0 ≤ b1
hlambda :
0 < lambdaStar (ellOf beta) kappa cminus cplus
Integrable (fun z : Fin n → ClampObs J => stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h t b1) (iidProduct P n)
Proof (Lean source)
lemma stratumRadius_integrable {J n : ℕ} (P : ClampLaw J) (B : SplitBlocks n) (x : Fin J) (beta kappa L cminus cplus delta h t b1 : ℝ) (hprob : IsProbabilityMeasure P.dataMeasure) (hbeta : 0 ≤ beta) (hL : 0 ≤ L) (hh : 0 < h) (ht : 0 ≤ t) (hb1 : 0 ≤ b1) (hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus) : Integrable (fun z : Fin n → ClampObs J => stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h t b1) (iidProduct P n) := by letI : IsProbabilityMeasure P.dataMeasure := hprob letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct; infer_instance let energy : (Fin n → ClampObs J) → ℝ := fun z => sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) have henergyMeas : Measurable energy := by exact (Finset.measurable_fun_sum B.I2 fun i _ => (interceptWeight_measurable B x kappa cminus cplus delta h i).pow_const 2).sqrt have henergyBound : ∀ z, energy z ≤ sqrt (4 * (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus ^ 2) := by intro z apply Real.sqrt_le_sqrt have he := localRegression_weight_energy_le (ell := ellOf beta) B z x kappa cminus cplus delta h hh hlambda simpa only [localRegressionDesignWeight_apply, ite_pow, zero_pow (by norm_num : 2 ≠ 0), ← Finset.sum_filter, Finset.filter_mem_eq_inter, Finset.univ_inter] using he have henergyInt : Integrable energy (iidProduct P n) := by refine Integrable.of_bound henergyMeas.aestronglyMeasurable (sqrt (4 * (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus ^ 2)) ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (Real.sqrt_nonneg _)] exact henergyBound z have hatomInt : Integrable (fun z : Fin n → ClampObs J => atomEstimate B z x delta) (iidProduct P n) := by refine Integrable.of_bound (atomEstimate_measurable B x delta).aestronglyMeasurable 1 ?_ filter_upwards with z have hz := atomEstimate_mem_Icc B z x delta rw [Real.norm_eq_abs, abs_of_nonneg hz.1] exact hz.2 let bad : Set (Fin n → ClampObs J) := {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h} let bias := L * h ^ beta * (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) let rhs : (Fin n → ClampObs J) → ℝ := fun z => (atomEstimate B z x delta + b1) * (bias + t * energy z) + b1 + bad.indicator (fun _ => (1 : ℝ)) z have hrhsInt : Integrable rhs (iidProduct P n) := by have hbadMeas : MeasurableSet bad := (goodGramEvent_measurable B x kappa cminus cplus delta h).compl dsimp [rhs] exact (((hatomInt.add (integrable_const b1)).mul_bdd ((integrable_const bias).add (henergyInt.const_mul t)).aestronglyMeasurable (by filter_upwards with z rw [Real.norm_eq_abs] change |bias + t * energy z| ≤ _ rw [abs_of_nonneg (by positivity : 0 ≤ bias + t * energy z)] exact add_le_add le_rfl (mul_le_mul_of_nonneg_left (henergyBound z) ht))) |>.add (integrable_const b1)).add ((integrable_const 1).indicator hbadMeas) have hradMeas := honest_stratumRadius_measurable (ell := ellOf beta) B x beta kappa L cminus cplus delta h t b1 refine hrhsInt.mono' hradMeas.aestronglyMeasurable ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (by unfold stratumRadius atomEstimate blockAverage split_ifs <;> positivity)] dsimp [rhs, bias, energy, bad] exact stratumRadius_le_good_expression_add_bad B z x beta kappa L cminus cplus delta h t b1 hbeta hL hh ht hb1 hlambda
CausalSmith.Stat.LmtpThresholdAtomFrontier.stratumRadius_integrable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestMixedTerm.lean:389
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.HonestPointwise 4 declarations Deterministic error event for the bias-aware interval

Deterministic error event for the bias-aware interval

theorem localRegression_holderBias_le_empirical

The intermediate, realized-weight form of the Hölder bias bound. This is the form used by the honest interval, before replacing the realized l1 weight norm by its deterministic good-Gram upper bound. The result uses the hmodel condition, the hbeta condition, the hL condition, the hdelta condition, the hh condition, the hupper condition, the hlambda condition, the hgood condition. This is the stated conclusion.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hbeta :
0 < beta
hL :
0 < L
B :
z :
Fin n → ClampObs J
x :
Fin J
hdelta :
0 ≤ delta
hh :
0 < h
hupper :
delta + h ≤ 1
hlambda :
0 < lambdaStar (ellOf beta) kappa cminus cplus
hgood :
GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h
|(∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampRegressionExtension P ((z i).X, (z i).A))
- P.mu x delta|
≤ L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i|
Proof (Lean source)
lemma localRegression_holderBias_le_empirical {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hbeta : 0 < beta) (hL : 0 < L) (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (hdelta : 0 ≤ delta) (hh : 0 < h) (hupper : delta + h ≤ 1) (hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus) (hgood : GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h) : |(∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampRegressionExtension P ((z i).X, (z i).A)) - P.mu x delta| ≤ L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i| := by classical let ell := ellOf beta let w : Fin n → ℝ := fun i => interceptWeight B z x ell kappa cminus cplus delta h i let T : ℝ → ℝ := fun a => ∑ j ∈ range (ell + 1), (iteratedDerivWithin j (P.mu x) (Icc (0 : ℝ) 1) delta / (Nat.factorial j : ℝ)) * (a - delta) ^ j have hdeltaI : delta ∈ Icc (0 : ℝ) 1 := ⟨hdelta, by linarith⟩ have hrepro := (goodGram_weight_controls B z x kappa cminus cplus delta h hh hlambda hgood).1 have hpoly : ∑ i ∈ B.I2, w i * T (z i).A = P.mu x delta := by have hp := honest_weightedPolynomial_reproduce B.I2 w (fun i => (z i).A) (fun j => iteratedDerivWithin j (P.mu x) (Icc (0 : ℝ) 1) delta / (Nat.factorial j : ℝ)) delta h hh hrepro simpa [T, ell, w] using hp have hrewrite : (∑ i ∈ B.I2, w i * clampRegressionExtension P ((z i).X, (z i).A)) - P.mu x delta = ∑ i ∈ B.I2, w i * (P.mu x (z i).A - T (z i).A) := by rw [← hpoly, ← Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro i hi by_cases ha : (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 · have hu := ha.2 have hAlo : delta ≤ (z i).A := by have hs := (div_nonneg_iff.mp hu.1).resolve_right (fun hn => (not_lt_of_ge hn.2 hh)) exact sub_nonneg.mp hs.1 have hAhi : (z i).A ≤ delta + h := by have hs := (div_le_iff₀ hh).mp hu.2 linarith have hAI : (z i).A ∈ Icc (0 : ℝ) 1 := ⟨hdelta.trans hAlo, hAhi.trans hupper⟩ rw [show (z i).X = x from ha.1, clampRegressionExtension_eq P x hAI] simp only [w] ring · have hw0 : w i = 0 := by dsimp [w, ell] exact interceptWeight_eq_zero_of_inactive B z x (ellOf beta) kappa cminus cplus delta h i hgood (fun hi => ha ⟨hi.2.1, hi.2.2⟩) simp [hw0] rw [hrewrite] calc |∑ i ∈ B.I2, w i * (P.mu x (z i).A - T (z i).A)| ≤ ∑ i ∈ B.I2, |w i| * |P.mu x (z i).A - T (z i).A| := by exact (Finset.abs_sum_le_sum_abs _ _).trans_eq (by apply Finset.sum_congr rfl intro i hi rw [abs_mul]) _ ≤ ∑ i ∈ B.I2, |w i| * (L * h ^ beta) := by apply Finset.sum_le_sum intro i hi by_cases ha : (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 · apply mul_le_mul_of_nonneg_left _ (abs_nonneg _) have hu := ha.2 have hAlo : delta ≤ (z i).A := by have hs := (div_nonneg_iff.mp hu.1).resolve_right (fun hn => (not_lt_of_ge hn.2 hh)) exact sub_nonneg.mp hs.1 have hAhi : (z i).A ≤ delta + h := by have hs := (div_le_iff₀ hh).mp hu.2 linarith have hAI : (z i).A ∈ Icc (0 : ℝ) 1 := ⟨hdelta.trans hAlo, hAhi.trans hupper⟩ have hrem := (hmodel.holder x).2.2.2 delta hdeltaI (z i).A hAI have habs : |(z i).A - delta| ≤ h := by rw [abs_of_nonneg (sub_nonneg.mpr hAlo)] linarith have hpw := Real.rpow_le_rpow (abs_nonneg _) habs hbeta.le have hrem' : |P.mu x (z i).A - T (z i).A| ≤ L * |(z i).A - delta| ^ beta := by simpa [T, ell, div_eq_mul_inv, mul_comm, mul_left_comm, mul_assoc] using hrem exact hrem'.trans (mul_le_mul_of_nonneg_left hpw hL.le) · have hw0 : w i = 0 := by dsimp [w, ell] exact interceptWeight_eq_zero_of_inactive B z x (ellOf beta) kappa cminus cplus delta h i hgood (fun hi => ha ⟨hi.2.1, hi.2.2⟩) simp [hw0] _ = L * h ^ beta * ∑ i ∈ B.I2, |w i| := by rw [Finset.mul_sum] apply Finset.sum_congr rfl intro i hi ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegression_holderBias_le_empirical · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestPointwise.lean:45
theorem localRegression_good_error_le_empirical

Good-Gram local error decomposition retaining the empirical Hölder radius. The result uses the hmodel condition, the hbeta condition, the hL condition, the hdelta condition, the hh condition, the hupper condition, the hlambda condition, the hgood condition. This is the stated conclusion.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hbeta :
0 < beta
hL :
0 < L
B :
z :
Fin n → ClampObs J
x :
Fin J
hdelta :
0 ≤ delta
hh :
0 < h
hupper :
delta + h ≤ 1
hlambda :
0 < lambdaStar (ellOf beta) kappa cminus cplus
hgood :
GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h
|localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta|
≤ L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i|
+ |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * ((z i).Y - clampRegressionExtension P ((z i).X, (z i).A))|
Proof (Lean source)
lemma localRegression_good_error_le_empirical {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hbeta : 0 < beta) (hL : 0 < L) (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (hdelta : 0 ≤ delta) (hh : 0 < h) (hupper : delta + h ≤ 1) (hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus) (hgood : GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h) : |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| ≤ L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i| + |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * ((z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| := by have hmu := (hmodel.holder x).2.1 delta ⟨hdelta, by linarith⟩ rw [localRegressionEstimate, if_pos hgood] change |clampUnit (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (z i).Y) - P.mu x delta| ≤ _ refine (abs_clampUnit_sub_le _ _ hmu).trans ?_ have hbias := localRegression_holderBias_le_empirical P hmodel hbeta hL B z x hdelta hh hupper hlambda hgood have htri := abs_add_le (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * ((z i).Y - clampRegressionExtension P ((z i).X, (z i).A))) ((∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampRegressionExtension P ((z i).X, (z i).A)) - P.mu x delta) have hid : (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (z i).Y) - P.mu x delta = (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * ((z i).Y - clampRegressionExtension P ((z i).X, (z i).A))) + ((∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampRegressionExtension P ((z i).X, (z i).A)) - P.mu x delta) := by simp_rw [mul_sub, Finset.sum_sub_distrib] ring rw [hid] exact htri.trans (by linarith)
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegression_good_error_le_empirical · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestPointwise.lean:146
theorem totalGramEstimator_error_le_honestRadius

Retained-mean, atom-mass, and good-Gram local-regression deviations imply that the total estimator lies within the displayed honest radius. The result uses the hmodel condition, the hdelta condition, the hdelta1 condition, the hh condition, the hbeta condition, the hL condition, the htAlpha condition, the hb0 condition, the hb1 condition, the hret condition, the hatom condition, the hlocal condition. This is the stated conclusion.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin delta h tAlpha b0 b1 :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hdelta :
0 ≤ delta
hdelta1 :
delta ≤ 1
hh :
0 < h
hbeta :
0 ≤ beta
hL :
0 ≤ L
htAlpha :
0 ≤ tAlpha
hb0 :
0 ≤ b0
hb1 :
0 ≤ b1
B :
z :
Fin n → ClampObs J
hret :
|retainedEstimate B z delta - retainedMean P delta| ≤ b0
hatom :
∀ x : Fin J, |atomEstimate B z x delta - P.px x * atomMass P x delta| ≤ b1
hlocal :
∀ x : Fin J
if
GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h
then
|localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta|
≤ L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i|
+ tAlpha * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2)
|totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h - clampFunctional P delta|
≤ b0
+ ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h tAlpha b1
Proof (Lean source)
lemma totalGramEstimator_error_le_honestRadius {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h tAlpha b0 b1 : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hdelta : 0 ≤ delta) (hdelta1 : delta ≤ 1) (hh : 0 < h) (hbeta : 0 ≤ beta) (hL : 0 ≤ L) (htAlpha : 0 ≤ tAlpha) (hb0 : 0 ≤ b0) (hb1 : 0 ≤ b1) (B : SplitBlocks n) (z : Fin n → ClampObs J) (hret : |retainedEstimate B z delta - retainedMean P delta| ≤ b0) (hatom : ∀ x : Fin J, |atomEstimate B z x delta - P.px x * atomMass P x delta| ≤ b1) (hlocal : ∀ x : Fin J, GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h → |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| ≤ L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i| + tAlpha * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2)) : |totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h - clampFunctional P delta| ≤ b0 + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h tAlpha b1 := by let center := retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h have htarget := clampFunctional_mem_Icc P hmodel hdelta hdelta1 have hclamp := abs_clampUnit_sub_le center (clampFunctional P delta) htarget have hbase : |totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h - clampFunctional P delta| ≤ |retainedEstimate B z delta - retainedMean P delta| + ∑ x : Fin J, |atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.px x * atomMass P x delta * P.mu x delta| := by calc _ ≤ |center - clampFunctional P delta| := by simpa [totalGramEstimator, center] using hclamp _ = |(retainedEstimate B z delta - retainedMean P delta) + ∑ x : Fin J, (atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.px x * atomMass P x delta * P.mu x delta)| := by congr 1 simp only [clampFunctional, Finset.sum_sub_distrib] ring _ ≤ |retainedEstimate B z delta - retainedMean P delta| + |∑ x : Fin J, (atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.px x * atomMass P x delta * P.mu x delta)| := abs_add_le _ _ _ ≤ _ := by simpa [add_comm] using add_le_add_left (Finset.abs_sum_le_sum_abs (fun x : Fin J => atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.px x * atomMass P x delta * P.mu x delta) univ) |retainedEstimate B z delta - retainedMean P delta| refine hbase.trans (add_le_add hret ?_) apply Finset.sum_le_sum intro x hx let a := P.px x * atomMass P x delta let ah := atomEstimate B z x delta have haI := atomCoefficient_mem_Icc P hmodel x hdelta1 have hahI := atomEstimate_mem_Icc B z x delta have ha0 : 0 ≤ a := by simpa [a] using haI.1 have hah0 : 0 ≤ ah := by simpa [ah] using hahI.1 have haUpper : a ≤ ah + b1 := by have habs := hatom x dsimp [a, ah] at habs ⊢ rw [abs_le] at habs linarith by_cases hg : GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h · rw [stratumRadius, if_pos hg] let R := L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i| + tAlpha * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) have hR0 : 0 ≤ R := by dsimp [R] have hsumAbs : 0 ≤ ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i| := sum_nonneg fun _ _ => abs_nonneg _ have hsumSq : 0 ≤ ∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2 := sum_nonneg fun _ _ => sq_nonneg _ exact add_nonneg (mul_nonneg (mul_nonneg hL (Real.rpow_nonneg hh.le _)) hsumAbs) (mul_nonneg htAlpha (Real.sqrt_nonneg _)) have hmhatI := localRegressionEstimate_mem_Icc (ell := ellOf beta) B z x kappa cminus cplus delta h have hmuI := (hmodel.holder x).2.1 delta ⟨hdelta, hdelta1⟩ have hprod : |ah * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - a * P.mu x delta| ≤ b1 + (ah + b1) * R := by have hid : ah * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - a * P.mu x delta = (ah - a) * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h + a * (localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta) := by ring rw [hid] calc _ ≤ |ah - a| * |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h| + a * |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| := by simpa [abs_mul, abs_of_nonneg ha0] using abs_add_le ((ah - a) * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h) (a * (localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta)) _ ≤ b1 + a * R := by apply add_le_add · exact mul_le_of_le_one_right (abs_nonneg _) (by rw [abs_of_nonneg hmhatI.1] exact hmhatI.2) |>.trans (hatom x) · exact mul_le_mul_of_nonneg_left (hlocal x hg) ha0 _ ≤ b1 + (ah + b1) * R := by simpa [add_comm] using add_le_add_left (mul_le_mul_of_nonneg_right haUpper hR0) b1 simpa [a, ah, R, add_comm] using hprod · rw [stratumRadius, if_neg hg] have hlocalI := localRegressionEstimate_mem_Icc (ell := ellOf beta) B z x kappa cminus cplus delta h have hmuI := (hmodel.holder x).2.1 delta ⟨hdelta, hdelta1⟩ have herr : |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| ≤ 1 := by rw [abs_le] constructor <;> linarith [hlocalI.1, hlocalI.2, hmuI.1, hmuI.2] let u := ah * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h let v := a * P.mu x delta have hu0 : 0 ≤ u := mul_nonneg hah0 hlocalI.1 have hv0 : 0 ≤ v := mul_nonneg ha0 hmuI.1 have huu : u ≤ ah := by dsimp [u]; nlinarith [hlocalI.2] have hvv : v ≤ a := by dsimp [v]; nlinarith [hmuI.2] have huv : |u - v| ≤ max ah a := by rw [abs_le] constructor · linarith [hu0, hvv, le_max_right ah a] · linarith [hv0, huu, le_max_left ah a] have hmax : max ah a ≤ ah + b1 := max_le (by linarith) haUpper simpa [u, v, a, ah] using huv.trans hmax
CausalSmith.Stat.LmtpThresholdAtomFrontier.totalGramEstimator_error_le_honestRadius · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestPointwise.lean:189
theorem clampFunctional_mem_honestInterval_of_deviations

The deterministic deviations used in the coverage proof put the target inside the clipped bias-aware interval. The result uses the hmodel condition, the hdelta condition, the hdelta1 condition, the hh condition, the hbeta condition, the hL condition, the htAlpha condition, the hb0 condition, the hb1 condition, the htdef condition, the hb0def condition, the hb1def condition, the hret condition, the hatom condition, the hlocal condition. This is the stated conclusion.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin delta h alpha tAlpha b0 b1 :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hdelta :
0 ≤ delta
hdelta1 :
delta ≤ 1
hh :
0 < h
hbeta :
0 ≤ beta
hL :
0 ≤ L
htAlpha :
0 ≤ tAlpha
hb0 :
0 ≤ b0
hb1 :
0 ≤ b1
B :
z :
Fin n → ClampObs J
htdef :
tAlpha = sqrt (log (12 * (J : ℝ) / alpha) / 2)
hb0def :
b0 = tAlpha / sqrt (B.I0.card : ℝ)
hb1def :
b1 = tAlpha / sqrt (B.I1.card : ℝ)
hret :
|retainedEstimate B z delta - retainedMean P delta| ≤ b0
hatom :
∀ x : Fin J, |atomEstimate B z x delta - P.px x * atomMass P x delta| ≤ b1
hlocal :
∀ x : Fin J
if
GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h
then
|localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta|
≤ L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i|
+ tAlpha * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2)
clampFunctional P delta ∈ honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha
Proof (Lean source)
lemma clampFunctional_mem_honestInterval_of_deviations {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h alpha tAlpha b0 b1 : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hdelta : 0 ≤ delta) (hdelta1 : delta ≤ 1) (hh : 0 < h) (hbeta : 0 ≤ beta) (hL : 0 ≤ L) (htAlpha : 0 ≤ tAlpha) (hb0 : 0 ≤ b0) (hb1 : 0 ≤ b1) (B : SplitBlocks n) (z : Fin n → ClampObs J) (htdef : tAlpha = sqrt (log (12 * (J : ℝ) / alpha) / 2)) (hb0def : b0 = tAlpha / sqrt (B.I0.card : ℝ)) (hb1def : b1 = tAlpha / sqrt (B.I1.card : ℝ)) (hret : |retainedEstimate B z delta - retainedMean P delta| ≤ b0) (hatom : ∀ x : Fin J, |atomEstimate B z x delta - P.px x * atomMass P x delta| ≤ b1) (hlocal : ∀ x : Fin J, GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h → |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| ≤ L * h ^ beta * ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i| + tAlpha * sqrt (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2)) : clampFunctional P delta ∈ honestInterval B z (ellOf beta) beta kappa L cminus cplus delta h alpha := by let radius := b0 + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h tAlpha b1 have hdev := totalGramEstimator_error_le_honestRadius P hmodel hdelta hdelta1 hh hbeta hL htAlpha hb0 hb1 B z hret hatom hlocal have htI := clampFunctional_mem_Icc P hmodel hdelta hdelta1 have hr0 : 0 ≤ radius := by dsimp [radius] apply add_nonneg hb0 apply sum_nonneg intro x hx unfold stratumRadius atomEstimate blockAverage split_ifs <;> positivity simp only [honestInterval] rw [← htdef, ← hb0def, ← hb1def] change clampFunctional P delta ∈ Icc (max 0 (totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h - radius)) (min 1 (totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h + radius)) constructor · apply max_le htI.1 dsimp [radius] at hdev ⊢ rw [abs_le] at hdev linarith · apply le_min htI.2 dsimp [radius] at hdev ⊢ rw [abs_le] at hdev linarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampFunctional_mem_honestInterval_of_deviations · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/HonestPointwise.lean:333
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.LocalWindowGram 15 declarations This module identifies the fixed-stratum treatment marginal with its declared density law and transports integrals through that measure identity.

Local-window population-law bridge

This module identifies the fixed-stratum treatment marginal with its declared density law and transports integrals through that measure identity.

def localWindowWeight

Unit local-window weight in a fixed stratum.

Definition (Lean source)
J :
x :
Fin J
delta h :
o :
localWindowWeight x delta h o :
if o.X = x ∧ scaledDose delta h o ∈ Icc (0 : ℝ) 1 then 1 else 0
CausalSmith.Stat.LmtpThresholdAtomFrontier.localWindowWeight · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:34
def localWindowFeature

Monomial feature clipped outside the local window, so its global envelope is one while its weighted Gram agrees with the total local Gram.

Definition (Lean source)
J ell :
delta h :
j :
Fin (ell + 1)
o :
localWindowFeature delta h j o :
if scaledDose delta h o ∈ Icc (0 : ℝ) 1 then monomialVec ell (scaledDose delta h o) j else 0
CausalSmith.Stat.LmtpThresholdAtomFrontier.localWindowFeature · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:38
theorem measurable_localWindowWeight

the stated measurable local window weight property holds for the specified J input, the specified x input, the specified delta input, the specified h input.

Formal statement
J :
x :
Fin J
delta h :
Proof (Lean source)
lemma measurable_localWindowWeight {J : ℕ} (x : Fin J) (delta h : ℝ) : Measurable (localWindowWeight x delta h) := by have hu : Measurable (fun o : ClampObs J => scaledDose delta h o) := (measurable_clampObs_A.sub measurable_const).div_const _ apply Measurable.ite · exact (measurable_clampObs_X (J := J) (measurableSet_singleton x)).inter (hu measurableSet_Icc) · exact measurable_const · exact measurable_const
CausalSmith.Stat.LmtpThresholdAtomFrontier.measurable_localWindowWeight · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:45
theorem measurable_localWindowFeature

the stated measurable local window feature property holds for the specified J input, the specified ell input, the specified delta input, the specified h input, the specified j input.

Formal statement
J ell :
delta h :
j :
Fin (ell + 1)
Measurable (localWindowFeature (J := J) delta h j)
Proof (Lean source)
lemma measurable_localWindowFeature {J ell : ℕ} (delta h : ℝ) (j : Fin (ell + 1)) : Measurable (localWindowFeature (J := J) delta h j) := by have hu : Measurable (fun o : ClampObs J => scaledDose delta h o) := (measurable_clampObs_A.sub measurable_const).div_const _ apply Measurable.ite · exact hu measurableSet_Icc · exact hu.pow_const _ · exact measurable_const
CausalSmith.Stat.LmtpThresholdAtomFrontier.measurable_localWindowFeature · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:56
theorem localWindowWeight_mem_unit

For a stratum, threshold, and bandwidth, the local-window weight lies between zero and one for every observation.

Formal statement
J :
x :
Fin J
delta h :
o :
localWindowWeight x delta h o ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma localWindowWeight_mem_unit {J : ℕ} (x : Fin J) (delta h : ℝ) : ∀ o : ClampObs J, localWindowWeight x delta h o ∈ Icc (0 : ℝ) 1 := by intro o by_cases ho : o.X = x ∧ 0 ≤ scaledDose delta h o ∧ scaledDose delta h o ≤ 1 · simp [localWindowWeight, Set.mem_Icc, ho] · simp [localWindowWeight, Set.mem_Icc, ho]
CausalSmith.Stat.LmtpThresholdAtomFrontier.localWindowWeight_mem_unit · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:66
theorem abs_localWindowFeature_le_one

For a polynomial degree, threshold, bandwidth, and basis coordinate, the local-window feature has absolute value at most one for every observation.

Formal statement
J ell :
delta h :
j :
Fin (ell + 1)
o :
|localWindowFeature (J := J) delta h j o| ≤ 1
Proof (Lean source)
lemma abs_localWindowFeature_le_one {J ell : ℕ} (delta h : ℝ) (j : Fin (ell + 1)) : ∀ o : ClampObs J, |localWindowFeature (J := J) delta h j o| ≤ 1 := by intro o by_cases hu : scaledDose delta h o ∈ Icc (0 : ℝ) 1 · simp only [localWindowFeature, if_pos hu, monomialVec] rw [abs_of_nonneg (pow_nonneg hu.1 _)] exact pow_le_one₀ hu.1 hu.2 · simp [localWindowFeature, hu]
CausalSmith.Stat.LmtpThresholdAtomFrontier.abs_localWindowFeature_le_one · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:74
theorem stratumTreatmentMeasure_eq

The treatment marginal inside a fixed stratum is its stratum mass times the declared conditional treatment measure. The result uses the hmodel condition, the hkappa condition, the hcplus condition, the hpmin condition. This is the stated conclusion.

Formal statement
J :
P :
kappa cminus cplus pmin :
hmodel :
BridgeClampModel P kappa cminus cplus pmin
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
x :
Fin J
(P.dataMeasure.restrict {o : ClampObs J | o.X = x}).map (fun o => o.A)
Proof (Lean source)
-- @node: stratumTreatmentMeasure_eq lemma stratumTreatmentMeasure_eq {J : ℕ} (P : ClampLaw J) {kappa cminus cplus pmin : ℝ} (hmodel : BridgeClampModel P kappa cminus cplus pmin) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (x : Fin J) : (P.dataMeasure.restrict {o : ClampObs J | o.X = x}).map (fun o => o.A) = ofReal (P.px x) • conditionalTreatmentMeasure P x := by letI : IsProbabilityMeasure P.dataMeasure := hmodel.probability have hpx : 0 ≤ P.px x := le_trans hpmin.le (hmodel.stratumMass x).2 have hpiInt : Integrable (P.pi x) (volume.restrict (Icc (0 : ℝ) 1)) := by apply IntegrableOn.of_bound measure_Icc_lt_top · exact (aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hmodel.condDensity.1 x)).aestronglyMeasurable · filter_upwards [ae_restrict_mem measurableSet_Icc, hmodel.condDensity.2.1 x, hmodel.thinning x] with a ha hnon hthin rw [Real.norm_eq_abs, abs_of_nonneg hnon] calc P.pi x a ≤ cplus * a ^ kappa := hthin.2 _ ≤ cplus := by simpa using mul_le_mul_of_nonneg_left (Real.rpow_le_one ha.1 ha.2 hkappa) hcplus let μ := (P.dataMeasure.restrict {o : ClampObs J | o.X = x}).map (fun o => o.A) let ν := ofReal (P.px x) • conditionalTreatmentMeasure P x have hcondFinite : IsFiniteMeasure (conditionalTreatmentMeasure P x) := by refine ⟨?_⟩ simp only [conditionalTreatmentMeasure] rw [withDensity_apply _ MeasurableSet.univ] simp only [Measure.restrict_univ] exact lt_of_le_of_lt (lintegral_mono fun a => Real.ofReal_le_enorm _) hpiInt.hasFiniteIntegral letI : IsFiniteMeasure (conditionalTreatmentMeasure P x) := hcondFinite have hνFinite : IsFiniteMeasure ν := by refine ⟨?_⟩ dsimp [ν] change ofReal (P.px x) * (conditionalTreatmentMeasure P x) univ < ⊤ exact ENNReal.mul_lt_top ENNReal.ofReal_lt_top (measure_lt_top _ _) letI : IsFiniteMeasure ν := hνFinite have hμae : ∀ᵐ a ∂μ, a ∈ Icc (0 : ℝ) 1 := by rw [ae_map_iff measurable_clampObs_A.aemeasurable] · exact ae_restrict_of_ae hmodel.treatmentSupport · exact measurableSet_Icc have hνae : ∀ᵐ a ∂ν, a ∈ Icc (0 : ℝ) 1 := by dsimp [ν, conditionalTreatmentMeasure] exact Measure.smul_absolutelyContinuous.ae_le ((withDensity_absolutelyContinuous _ _).ae_le (ae_restrict_mem measurableSet_Icc)) change μ = ν rw [← Measure.restrict_eq_self_of_ae_mem hμae, ← Measure.restrict_eq_self_of_ae_mem hνae] apply (Measure.restrict_congr_meas measurableSet_Icc).2 intro t ht htm apply (ENNReal.toReal_eq_toReal_iff' (measure_ne_top μ t) (measure_ne_top ν t)).mp change μ.real t = ν.real t have hsource : μ.real t = P.dataMeasure.real {o : ClampObs J | o.X = x ∧ o.A ∈ t} := by simp only [μ, measureReal_def] rw [Measure.map_apply measurable_clampObs_A htm, Measure.restrict_apply (measurable_clampObs_A htm)] congr 2 ext o simp [and_comm] have htarget : (conditionalTreatmentMeasure P x).real t = ∫ a in t, P.pi x a := by have hpiT : Integrable (P.pi x) (volume.restrict t) := hpiInt.mono_measure (Measure.restrict_mono_set volume ht) simp only [conditionalTreatmentMeasure, measureReal_def] rw [withDensity_apply _ htm] rw [Measure.restrict_restrict htm, inter_eq_self_of_subset_left ht] rw [← ofReal_integral_eq_lintegral_ofReal hpiT] · rw [ENNReal.toReal_ofReal] exact integral_nonneg_of_ae ((hmodel.condDensity.2.1 x).filter_mono (ae_mono (Measure.restrict_mono_set volume ht))) · exact (hmodel.condDensity.2.1 x).filter_mono (ae_mono (Measure.restrict_mono_set volume ht)) rw [hsource] have hlaw := (hmodel.condDensity.2.2 x).2 t htm ht rw [hlaw, show ν.real t = P.px x * (conditionalTreatmentMeasure P x).real t by simp [ν, measureReal_def, hpx]] rw [htarget]
CausalSmith.Stat.LmtpThresholdAtomFrontier.stratumTreatmentMeasure_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:85
theorem stratumTreatment_integral_eq

Integration form of stratumTreatmentMeasure_eq. The result uses the hmodel condition, the hkappa condition, the hcplus condition, the hpmin condition, the hf condition. This is the stated conclusion.

Formal statement
J :
P :
kappa cminus cplus pmin :
hmodel :
BridgeClampModel P kappa cminus cplus pmin
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
x :
Fin J
f :
ℝ → ℝ
(∫ o, indicator {o : ClampObs J | o.X = x} (fun o => f o.A) o ∂P.dataMeasure)
= P.px x * ∫ a, f a ∂conditionalTreatmentMeasure P x
Proof (Lean source)
-- @node: stratumTreatment_integral_eq lemma stratumTreatment_integral_eq {J : ℕ} (P : ClampLaw J) {kappa cminus cplus pmin : ℝ} (hmodel : BridgeClampModel P kappa cminus cplus pmin) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (x : Fin J) (f : ℝ → ℝ) (hf : Integrable f (conditionalTreatmentMeasure P x)) : (∫ o, indicator {o : ClampObs J | o.X = x} (fun o => f o.A) o ∂P.dataMeasure) = P.px x * ∫ a, f a ∂conditionalTreatmentMeasure P x := by have hX : MeasurableSet {o : ClampObs J | o.X = x} := measurable_clampObs_X (measurableSet_singleton x) have hpx : 0 ≤ P.px x := le_trans hpmin.le (hmodel.stratumMass x).2 rw [integral_indicator hX] rw [← integral_map measurable_clampObs_A.aemeasurable] · rw [stratumTreatmentMeasure_eq P hmodel hkappa hcplus hpmin x, integral_smul_measure, ENNReal.toReal_ofReal hpx] rfl · rw [stratumTreatmentMeasure_eq P hmodel hkappa hcplus hpmin x] exact (hf.smul_measure ENNReal.ofReal_ne_top).aestronglyMeasurable
CausalSmith.Stat.LmtpThresholdAtomFrontier.stratumTreatment_integral_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:173
theorem conditionalTreatment_integral_eq_density

Integration against the declared conditional treatment measure is integration against its real density on [0,1]. The result uses the hmodel condition. This is the stated conclusion.

Formal statement
J :
P :
kappa cminus cplus pmin :
hmodel :
BridgeClampModel P kappa cminus cplus pmin
x :
Fin J
f :
ℝ → ℝ
(∫ a, f a ∂conditionalTreatmentMeasure P x) = ∫ a in Icc (0 : ℝ) 1, P.pi x a * f a
Proof (Lean source)
-- @node: conditionalTreatment_integral_eq_density lemma conditionalTreatment_integral_eq_density {J : ℕ} (P : ClampLaw J) {kappa cminus cplus pmin : ℝ} (hmodel : BridgeClampModel P kappa cminus cplus pmin) (x : Fin J) (f : ℝ → ℝ) : (∫ a, f a ∂conditionalTreatmentMeasure P x) = ∫ a in Icc (0 : ℝ) 1, P.pi x a * f a := by have hpiMeas : AEMeasurable (fun a : ℝ => ofReal (P.pi x a)) (volume.restrict (Icc (0 : ℝ) 1)) := (aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hmodel.condDensity.1 x)).ennreal_ofReal rw [conditionalTreatmentMeasure, integral_withDensity_eq_integral_toReal_smul₀ hpiMeas] · apply integral_congr_ae filter_upwards [hmodel.condDensity.2.1 x] with a ha simp [ENNReal.toReal_ofReal ha, smul_eq_mul, mul_comm] · exact ae_of_all _ (fun _ => ENNReal.ofReal_lt_top)
CausalSmith.Stat.LmtpThresholdAtomFrontier.conditionalTreatment_integral_eq_density · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:196
theorem scaledDose_mem_Icc_iff

Positive bandwidth identifies the scaled unit window with the original treatment interval. The result uses the hh condition. This is the stated conclusion.

Formal statement
J :
delta h :
hh :
0 < h
o :
scaledDose delta h o ∈ Icc (0 : ℝ) 1 ↔ o.A ∈ Icc delta (delta + h)
Proof (Lean source)
-- @node: scaledDose_mem_Icc_iff lemma scaledDose_mem_Icc_iff {J : ℕ} {delta h : ℝ} (hh : 0 < h) (o : ClampObs J) : scaledDose delta h o ∈ Icc (0 : ℝ) 1 ↔ o.A ∈ Icc delta (delta + h) := by simp only [scaledDose, Set.mem_Icc] constructor · intro hu constructor · exact sub_nonneg.mp (((div_nonneg_iff).mp hu.1 |>.resolve_right (fun hneg => (not_lt_of_ge hneg.2 hh))).1) · have := (div_le_iff₀ hh).mp hu.2 linarith · intro ha constructor · exact div_nonneg (sub_nonneg.mpr ha.1) hh.le · exact (div_le_iff₀ hh).mpr (by linarith)
CausalSmith.Stat.LmtpThresholdAtomFrontier.scaledDose_mem_Icc_iff · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:217
theorem localWindowWeight_integral_eq Lemma 4 in the paper ↗

The population local-window mass is the stratum mass times the declared density integral over that window. The result uses the hmodel condition, the hh condition, the hwindow condition. This is the stated conclusion.

Formal statement
J :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
x :
Fin J
hh :
0 < h
hwindow :
Icc delta (delta + h) ⊆ Icc (0 : ℝ) 1
(∫ o, localWindowWeight x delta h o ∂P.dataMeasure)
= P.px x * ∫ a in Icc delta (delta + h), P.pi x a
Proof (Lean source)
-- @node: localWindowWeight_integral_eq lemma localWindowWeight_integral_eq {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (x : Fin J) (hh : 0 < h) (hwindow : Icc delta (delta + h) ⊆ Icc (0 : ℝ) 1) : (∫ o, localWindowWeight x delta h o ∂P.dataMeasure) = P.px x * ∫ a in Icc delta (delta + h), P.pi x a := by let E : Set (ClampObs J) := {o | o.X = x ∧ o.A ∈ Icc delta (delta + h)} have hE : MeasurableSet E := (measurable_clampObs_X (measurableSet_singleton x)).inter (measurable_clampObs_A measurableSet_Icc) have hfun : localWindowWeight x delta h = indicator E (fun _ => (1 : ℝ)) := by funext o by_cases ho : o.X = x ∧ o.A ∈ Icc delta (delta + h) · rw [Set.indicator_of_mem (show o ∈ E from ho)] simp [localWindowWeight, ho.1, (scaledDose_mem_Icc_iff hh o).2 ho.2] · rw [Set.indicator_of_notMem (show o ∉ E from ho)] have hscaled : ¬(o.X = x ∧ scaledDose delta h o ∈ Icc (0 : ℝ) 1) := fun hz => ho ⟨hz.1, (scaledDose_mem_Icc_iff hh o).1 hz.2⟩ change (if o.X = x ∧ scaledDose delta h o ∈ Icc (0 : ℝ) 1 then 1 else 0) = 0 exact if_neg hscaled rw [hfun, integral_indicator hE, setIntegral_const, smul_eq_mul, mul_one] exact (hmodel.condDensity.2.2 x).2 (Icc delta (delta + h)) measurableSet_Icc hwindow
CausalSmith.Stat.LmtpThresholdAtomFrontier.localWindowWeight_integral_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:238
theorem integral_rpow_window_lower Lemma integral_rpow_window_lower in the paper ↗

A positive interval captures a fixed positive fraction of the power mass at its upper endpoint. The result uses the hdelta condition, the hh condition, the hkappa condition. This is the stated conclusion.

Formal statement
delta h kappa :
hdelta :
0 ≤ delta
hh :
0 < h
hkappa :
0 ≤ kappa
h / 2 * ((delta + h) / 2) ^ kappa ≤ ∫ a in delta..delta + h, a ^ kappa
Proof (Lean source)
-- @node: integral_rpow_window_lower lemma integral_rpow_window_lower {delta h kappa : ℝ} (hdelta : 0 ≤ delta) (hh : 0 < h) (hkappa : 0 ≤ kappa) : h / 2 * ((delta + h) / 2) ^ kappa ≤ ∫ a in delta..delta + h, a ^ kappa := by let m := delta + h / 2 have hdm : delta ≤ m := by dsimp [m]; linarith have hmb : m ≤ delta + h := by dsimp [m]; linarith have hm0 : 0 ≤ m := by dsimp [m]; linarith have hb2 : (delta + h) / 2 ≤ m := by dsimp [m]; linarith have hconst : (∫ _a in m..delta + h, ((delta + h) / 2) ^ kappa) ≤ ∫ a in m..delta + h, a ^ kappa := by apply intervalIntegral.integral_mono_on hmb · exact intervalIntegrable_const · exact intervalIntegral.intervalIntegrable_rpow (inl hkappa) · intro a ha exact Real.rpow_le_rpow (by positivity) (hb2.trans ha.1) hkappa have hsub : (∫ a in m..delta + h, a ^ kappa) ≤ ∫ a in delta..delta + h, a ^ kappa := by apply intervalIntegral.integral_mono_interval hdm hmb le_rfl · filter_upwards [ae_restrict_mem measurableSet_Ioc] with a ha exact Real.rpow_nonneg (hdelta.trans ha.1.le) _ · apply Continuous.intervalIntegrable fun_prop calc h / 2 * ((delta + h) / 2) ^ kappa = ∫ _a in m..delta + h, ((delta + h) / 2) ^ kappa := by rw [intervalIntegral.integral_const] dsimp [m] ring _ ≤ ∫ a in m..delta + h, a ^ kappa := hconst _ ≤ ∫ a in delta..delta + h, a ^ kappa := hsub
CausalSmith.Stat.LmtpThresholdAtomFrontier.integral_rpow_window_lower · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:268
theorem localWindowWeight_integral_lower

The local stratum-window probability has the uniform polynomial lower bound obtained by integrating over the upper half of the window. The result uses the hmodel condition, the hkappa condition, the hcminus condition, the hcplus condition, the hpmin condition, the hdelta condition, the hh condition, the hupper condition. This is the stated conclusion.

Formal statement
J :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hkappa :
0 ≤ kappa
hcminus :
0 < cminus
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
x :
Fin J
hdelta :
0 ≤ delta
hh :
0 < h
hupper :
delta + h ≤ 1
pmin * (cminus * ((delta + h) / 2) ^ kappa * (h / 2))
≤ ∫ o, localWindowWeight x delta h o ∂P.dataMeasure
Proof (Lean source)
-- @node: localWindowWeight_integral_lower lemma localWindowWeight_integral_lower {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hkappa : 0 ≤ kappa) (hcminus : 0 < cminus) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (x : Fin J) (hdelta : 0 ≤ delta) (hh : 0 < h) (hupper : delta + h ≤ 1) : pmin * (cminus * ((delta + h) / 2) ^ kappa * (h / 2)) ≤ ∫ o, localWindowWeight x delta h o ∂P.dataMeasure := by let T : Set ℝ := Icc delta (delta + h) have hT : T ⊆ Icc (0 : ℝ) 1 := by intro a ha exact ⟨hdelta.trans ha.1, ha.2.trans hupper⟩ have hpiInt : Integrable (P.pi x) (volume.restrict (Icc (0 : ℝ) 1)) := by apply IntegrableOn.of_bound measure_Icc_lt_top · exact (aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hmodel.condDensity.1 x)).aestronglyMeasurable · filter_upwards [ae_restrict_mem measurableSet_Icc, hmodel.condDensity.2.1 x, hmodel.thinning x] with a ha hnon hthin rw [Real.norm_eq_abs, abs_of_nonneg hnon] calc P.pi x a ≤ cplus * a ^ kappa := hthin.2 _ ≤ cplus := by simpa using mul_le_mul_of_nonneg_left (Real.rpow_le_one ha.1 ha.2 hkappa) hcplus have hpiT : IntegrableOn (P.pi x) T volume := hpiInt.mono_measure (Measure.restrict_mono_set volume hT) have hthinT : ∀ᵐ a ∂volume.restrict T, cminus * a ^ kappa ≤ P.pi x a := ((hmodel.thinning x).filter_mono (ae_mono (Measure.restrict_mono_set volume hT))).mono (fun _ ha => ha.1) have hpowT : IntegrableOn (fun a : ℝ => a ^ kappa) T volume := by dsimp [T] rw [← intervalIntegrable_iff_integrableOn_Icc_of_le (by linarith)] exact intervalIntegral.intervalIntegrable_rpow (inl hkappa) have hlower : cminus * (h / 2 * ((delta + h) / 2) ^ kappa) ≤ ∫ a in T, P.pi x a := by calc cminus * (h / 2 * ((delta + h) / 2) ^ kappa) ≤ cminus * (∫ a in delta..delta + h, a ^ kappa) := by exact mul_le_mul_of_nonneg_left (integral_rpow_window_lower hdelta hh hkappa) hcminus.le _ = ∫ a in T, cminus * a ^ kappa := by dsimp [T] rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by linarith), intervalIntegral.integral_const_mul] _ ≤ ∫ a in T, P.pi x a := integral_mono_ae (hpowT.const_mul cminus) hpiT hthinT rw [localWindowWeight_integral_eq P hmodel x hh hT] have hpx : pmin ≤ P.px x := (hmodel.stratumMass x).2 have hfactor : 0 ≤ cminus * ((delta + h) / 2) ^ kappa * (h / 2) := by positivity calc pmin * (cminus * ((delta + h) / 2) ^ kappa * (h / 2)) ≤ P.px x * (cminus * ((delta + h) / 2) ^ kappa * (h / 2)) := mul_le_mul_of_nonneg_right hpx hfactor _ ≤ P.px x * ∫ a in T, P.pi x a := by have hlower' : cminus * ((delta + h) / 2) ^ kappa * (h / 2) ≤ ∫ a in T, P.pi x a := by nlinarith [hlower] exact mul_le_mul_of_nonneg_left hlower' (hpmin.le.trans hpx)
CausalSmith.Stat.LmtpThresholdAtomFrontier.localWindowWeight_integral_lower · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:305
theorem localWindowGramEntry_integral_eq Lemma 5 in the paper ↗

A local-window Gram entry is the corresponding density-weighted monomial integral over the original treatment window. The result uses the hmodel condition, the hkappa condition, the hcplus condition, the hpmin condition, the hh condition, the hwindow condition. This is the stated conclusion.

Formal statement
J ell :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
x :
Fin J
hh :
0 < h
hwindow :
Icc delta (delta + h) ⊆ Icc (0 : ℝ) 1
j k :
Fin (ell + 1)
(∫ o, localWindowWeight x delta h o * localWindowFeature delta h j o * localWindowFeature delta h k o ∂P.dataMeasure)
= P.px x * ∫ a in Icc delta (delta + h), P.pi x a * monomialVec ell ((a - delta) / h) j * monomialVec ell ((a - delta) / h) k
Proof (Lean source)
-- @node: localWindowGramEntry_integral_eq lemma localWindowGramEntry_integral_eq {J ell : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (x : Fin J) (hh : 0 < h) (hwindow : Icc delta (delta + h) ⊆ Icc (0 : ℝ) 1) (j k : Fin (ell + 1)) : (∫ o, localWindowWeight x delta h o * localWindowFeature delta h j o * localWindowFeature delta h k o ∂P.dataMeasure) = P.px x * ∫ a in Icc delta (delta + h), P.pi x a * monomialVec ell ((a - delta) / h) j * monomialVec ell ((a - delta) / h) k := by have hpiInt : Integrable (P.pi x) (volume.restrict (Icc (0 : ℝ) 1)) := by apply IntegrableOn.of_bound measure_Icc_lt_top · exact (aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hmodel.condDensity.1 x)).aestronglyMeasurable · filter_upwards [ae_restrict_mem measurableSet_Icc, hmodel.condDensity.2.1 x, hmodel.thinning x] with a ha hnon hthin rw [Real.norm_eq_abs, abs_of_nonneg hnon] calc P.pi x a ≤ cplus * a ^ kappa := hthin.2 _ ≤ cplus := by simpa using mul_le_mul_of_nonneg_left (Real.rpow_le_one ha.1 ha.2 hkappa) hcplus let f : ℝ → ℝ := fun a => if (a - delta) / h ∈ Icc (0 : ℝ) 1 then monomialVec ell ((a - delta) / h) j * monomialVec ell ((a - delta) / h) k else 0 have hfmeas : Measurable f := by dsimp [f] apply Measurable.ite · exact (((measurable_id.sub measurable_const).div_const _) measurableSet_Icc) · exact (((measurable_id.sub measurable_const).div_const _).pow_const _).mul (((measurable_id.sub measurable_const).div_const _).pow_const _) · exact measurable_const have hfbound : ∀ a, |f a| ≤ 1 := by intro a by_cases ha : (a - delta) / h ∈ Icc (0 : ℝ) 1 · simp only [f, if_pos ha, monomialVec, abs_mul, abs_pow] have habs : |(a - delta) / h| ≤ 1 := by rw [abs_of_nonneg ha.1] exact ha.2 calc |(a - delta) / h| ^ (j : ℕ) * |(a - delta) / h| ^ (k : ℕ) ≤ 1 * 1 := mul_le_mul (pow_le_one₀ (abs_nonneg _) habs) (pow_le_one₀ (abs_nonneg _) habs) (pow_nonneg (abs_nonneg _) _) (by norm_num) _ = 1 := by norm_num · simp only [f, if_neg ha, abs_zero] norm_num have hcondFinite : IsFiniteMeasure (conditionalTreatmentMeasure P x) := by refine ⟨?_⟩ simp only [conditionalTreatmentMeasure] rw [withDensity_apply _ MeasurableSet.univ] simp only [Measure.restrict_univ] exact lt_of_le_of_lt (lintegral_mono fun a => Real.ofReal_le_enorm _) hpiInt.hasFiniteIntegral letI : IsFiniteMeasure (conditionalTreatmentMeasure P x) := hcondFinite have hfint : Integrable f (conditionalTreatmentMeasure P x) := Integrable.of_bound hfmeas.aestronglyMeasurable 1 (Filter.Eventually.of_forall fun a => by simpa [Real.norm_eq_abs] using hfbound a) have hfun : (fun o => localWindowWeight x delta h o * localWindowFeature delta h j o * localWindowFeature delta h k o) = indicator {o : ClampObs J | o.X = x} (fun o => f o.A) := by funext o by_cases hx : o.X = x · by_cases hu : scaledDose delta h o ∈ Icc (0 : ℝ) 1 · rw [show localWindowWeight x delta h o = 1 by rw [localWindowWeight, if_pos ⟨hx, hu⟩], show localWindowFeature delta h j o = monomialVec ell (scaledDose delta h o) j by rw [localWindowFeature, if_pos hu], show localWindowFeature delta h k o = monomialVec ell (scaledDose delta h o) k by rw [localWindowFeature, if_pos hu], Set.indicator_of_mem (show o ∈ {o : ClampObs J | o.X = x} from hx)] change (1 * monomialVec ell ((o.A - delta) / h) j * monomialVec ell ((o.A - delta) / h) k) = f o.A have hu' : (o.A - delta) / h ∈ Icc (0 : ℝ) 1 := by simpa [scaledDose] using hu dsimp [f] rw [if_pos hu'] ring · rw [show localWindowWeight x delta h o = 0 by rw [localWindowWeight, if_neg (fun H => hu H.2)], zero_mul, zero_mul, Set.indicator_of_mem (show o ∈ {o : ClampObs J | o.X = x} from hx)] have hu' : ¬((o.A - delta) / h ∈ Icc (0 : ℝ) 1) := by simpa [scaledDose] using hu dsimp [f] rw [if_neg hu'] · simp [localWindowWeight, hx] rw [hfun] rw [stratumTreatment_integral_eq P hmodel.toBridge hkappa hcplus hpmin x f hfint, conditionalTreatment_integral_eq_density P hmodel.toBridge x f] congr 1 rw [← MeasureTheory.integral_indicator (measurableSet_Icc : MeasurableSet (Icc (0 : ℝ) 1)), ← MeasureTheory.integral_indicator (measurableSet_Icc : MeasurableSet (Icc delta (delta + h)))] apply integral_congr_ae refine Filter.Eventually.of_forall ?_ intro a by_cases hw : a ∈ Icc delta (delta + h) · have hu := (scaledDose_mem_Icc_iff (J := J) hh ⟨x, a, 0⟩).2 hw have hu' : (a - delta) / h ∈ Icc (0 : ℝ) 1 := by simpa [scaledDose] using hu have ha01 : a ∈ Icc (0 : ℝ) 1 := hwindow hw rw [Set.indicator_of_mem ha01, Set.indicator_of_mem hw] dsimp [f] rw [if_pos hu'] ring · have hu : ¬((a - delta) / h ∈ Icc (0 : ℝ) 1) := by intro hu exact hw ((scaledDose_mem_Icc_iff (J := J) hh ⟨x, a, 0⟩).1 hu) rw [Set.indicator_of_notMem hw] by_cases ha01 : a ∈ Icc (0 : ℝ) 1 · rw [Set.indicator_of_mem ha01] dsimp [f] rw [if_neg hu, mul_zero] · rw [Set.indicator_of_notMem ha01]
CausalSmith.Stat.LmtpThresholdAtomFrontier.localWindowGramEntry_integral_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:371
theorem localWindow_populationGram_coercive Lemma 11 in the paper ↗

The population local-window Gram dominates lambdaStar times its own local mass, using only the two-sided polynomial density envelope. The result uses the hmodel condition, the hkappa condition, the hcminus condition, the hcplus condition, the hpmin condition, the hdelta condition, the hh condition, the hupper condition. This is the stated conclusion.

Formal statement
J ell :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hkappa :
0 ≤ kappa
hcminus :
0 < cminus
hcplus :
0 < cplus
hpmin :
0 < pmin
x :
Fin J
hdelta :
0 ≤ delta
hh :
0 < h
hupper :
delta + h ≤ 1
v :
Fin (ell + 1) → ℝ
lambdaStar ell kappa cminus cplus * (∫ o, localWindowWeight x delta h o ∂P.dataMeasure) * (∑ j, (v j) ^ 2)
≤ ∑ j, ∑ k, v j * v k * ∫ o, localWindowWeight x delta h o * localWindowFeature (J := J) delta h j o * localWindowFeature (J := J) delta h k o ∂P.dataMeasure
Proof (Lean source)
-- @node: localWindow_populationGram_coercive lemma localWindow_populationGram_coercive {J ell : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hkappa : 0 ≤ kappa) (hcminus : 0 < cminus) (hcplus : 0 < cplus) (hpmin : 0 < pmin) (x : Fin J) (hdelta : 0 ≤ delta) (hh : 0 < h) (hupper : delta + h ≤ 1) (v : Fin (ell + 1) → ℝ) : lambdaStar ell kappa cminus cplus * (∫ o, localWindowWeight x delta h o ∂P.dataMeasure) * (∑ j, (v j) ^ 2) ≤ ∑ j, ∑ k, v j * v k * ∫ o, localWindowWeight x delta h o * localWindowFeature (J := J) delta h j o * localWindowFeature (J := J) delta h k o ∂P.dataMeasure := by let T : Set ℝ := Icc delta (delta + h) let poly : ℝ → ℝ := fun a => ∑ j, v j * ((a - delta) / h) ^ (j : ℕ) have hT : T ⊆ Icc (0 : ℝ) 1 := by intro a ha exact ⟨hdelta.trans ha.1, ha.2.trans hupper⟩ have hpx : 0 ≤ P.px x := hpmin.le.trans (hmodel.stratumMass x).2 have hpiInt : Integrable (P.pi x) (volume.restrict (Icc (0 : ℝ) 1)) := by apply IntegrableOn.of_bound measure_Icc_lt_top · exact (aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hmodel.condDensity.1 x)).aestronglyMeasurable · filter_upwards [ae_restrict_mem measurableSet_Icc, hmodel.condDensity.2.1 x, hmodel.thinning x] with a ha hnon hthin rw [Real.norm_eq_abs, abs_of_nonneg hnon] calc P.pi x a ≤ cplus * a ^ kappa := hthin.2 _ ≤ cplus := by simpa using mul_le_mul_of_nonneg_left (Real.rpow_le_one ha.1 ha.2 hkappa) hcplus.le have hpiT : IntegrableOn (P.pi x) T volume := hpiInt.mono_measure (Measure.restrict_mono_set volume hT) have hpowT : IntegrableOn (fun a : ℝ => a ^ kappa) T volume := by dsimp [T] rw [← intervalIntegrable_iff_integrableOn_Icc_of_le (by linarith)] exact intervalIntegral.intervalIntegrable_rpow (inl hkappa) have hmassUpper : (∫ o, localWindowWeight x delta h o ∂P.dataMeasure) ≤ P.px x * (cplus * ∫ a in T, a ^ kappa) := by rw [localWindowWeight_integral_eq P hmodel x hh hT] apply mul_le_mul_of_nonneg_left _ hpx calc (∫ a in T, P.pi x a) ≤ ∫ a in T, cplus * a ^ kappa := by apply integral_mono_ae hpiT (hpowT.const_mul cplus) exact ((hmodel.thinning x).filter_mono (ae_mono (Measure.restrict_mono_set volume hT))).mono (fun _ ha => ha.2) _ = cplus * ∫ a in T, a ^ kappa := by rw [integral_const_mul] have hpolyMeas : AEStronglyMeasurable poly (volume.restrict T) := by apply Measurable.aestronglyMeasurable dsimp [poly] fun_prop have hpolyBound : ∀ᵐ a ∂volume.restrict T, ‖poly a ^ 2‖ ≤ (∑ j, |v j|) ^ 2 := by filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha have hu : (a - delta) / h ∈ Icc (0 : ℝ) 1 := by constructor · exact div_nonneg (sub_nonneg.mpr ha.1) hh.le · exact (div_le_iff₀ hh).2 (by linarith [ha.2]) have habs : |poly a| ≤ ∑ j, |v j| := by dsimp [poly] calc |∑ j, v j * ((a - delta) / h) ^ (j : ℕ)| ≤ ∑ j, |v j * ((a - delta) / h) ^ (j : ℕ)| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ j, |v j| := by apply Finset.sum_le_sum intro j hj rw [abs_mul] exact mul_le_of_le_one_right (abs_nonneg _) (by rw [abs_pow, abs_of_nonneg hu.1] exact pow_le_one₀ hu.1 hu.2) have hsumNonneg : 0 ≤ ∑ j, |v j| := sum_nonneg fun _ _ => abs_nonneg _ rw [Real.norm_eq_abs, abs_sq, sq_le_sq] simpa [abs_of_nonneg hsumNonneg] using habs have hpolyPi : IntegrableOn (fun a => poly a ^ 2 * P.pi x a) T volume := hpiT.bdd_mul (hpolyMeas.pow 2) hpolyBound have hquadIdentity : (∑ j, ∑ k, v j * v k * ∫ o, localWindowWeight x delta h o * localWindowFeature (J := J) delta h j o * localWindowFeature (J := J) delta h k o ∂P.dataMeasure) = P.px x * ∫ a in T, poly a ^ 2 * P.pi x a := by simp_rw [localWindowGramEntry_integral_eq P hmodel hkappa hcplus.le hpmin x hh hT] simp_rw [show ∀ (j k : Fin (ell + 1)) (I : ℝ), v j * v k * (P.px x * I) = P.px x * (v j * v k * I) by intros; ring] simp_rw [← Finset.mul_sum] congr 1 have hterm (j k : Fin (ell + 1)) : IntegrableOn (fun a => v j * v k * (P.pi x a * monomialVec ell ((a - delta) / h) j * monomialVec ell ((a - delta) / h) k)) T volume := by have hb : AEStronglyMeasurable (fun a => v j * v k * (monomialVec ell ((a - delta) / h) j * monomialVec ell ((a - delta) / h) k)) (volume.restrict T) := by simp only [monomialVec] fun_prop have hbound : ∀ᵐ a ∂volume.restrict T, ‖v j * v k * (monomialVec ell ((a - delta) / h) j * monomialVec ell ((a - delta) / h) k)‖ ≤ |v j * v k| := by filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha have hu : (a - delta) / h ∈ Icc (0 : ℝ) 1 := by constructor · exact div_nonneg (sub_nonneg.mpr ha.1) hh.le · exact (div_le_iff₀ hh).2 (by linarith [ha.2]) rw [Real.norm_eq_abs] calc |v j * v k * (monomialVec ell ((a - delta) / h) j * monomialVec ell ((a - delta) / h) k)| ≤ |v j * v k| * 1 := by simp only [monomialVec, abs_mul, abs_pow, abs_of_nonneg hu.1] gcongr have hj : ((a - delta) / h) ^ (j : ℕ) ≤ 1 := pow_le_one₀ hu.1 hu.2 have hk : ((a - delta) / h) ^ (k : ℕ) ≤ 1 := pow_le_one₀ hu.1 hu.2 simpa using mul_le_mul hj hk (pow_nonneg hu.1 _) (by norm_num : (0 : ℝ) ≤ 1) _ = |v j * v k| := mul_one _ have hi := hpiT.mul_bdd hb hbound apply hi.congr filter_upwards with a ring rw [show (∫ a in T, poly a ^ 2 * P.pi x a) = ∫ a in T, ∑ j, ∑ k, v j * v k * (P.pi x a * monomialVec ell ((a - delta) / h) j * monomialVec ell ((a - delta) / h) k) by apply integral_congr_ae filter_upwards with a dsimp [poly, monomialVec] simp only [pow_two, Finset.sum_mul, Finset.mul_sum] apply Finset.sum_congr rfl intro j hj apply Finset.sum_congr rfl intro k hk ring] simp_rw [← integral_const_mul] have hinner (j : Fin (ell + 1)) : IntegrableOn (fun a => ∑ k, v j * v k * (P.pi x a * monomialVec ell ((a - delta) / h) j * monomialVec ell ((a - delta) / h) k)) T volume := integrable_finsetSum univ (fun k _ => hterm j k) rw [integral_finsetSum univ (fun j _ => hinner j)] apply Finset.sum_congr rfl intro j hj rw [integral_finsetSum univ (fun k _ => hterm j k)] have hthinLower : P.px x * (cminus * ∫ a in T, poly a ^ 2 * a ^ kappa) ≤ P.px x * ∫ a in T, poly a ^ 2 * P.pi x a := by apply mul_le_mul_of_nonneg_left _ hpx rw [← integral_const_mul] apply integral_mono_ae · simpa [mul_assoc] using (hpowT.bdd_mul (hpolyMeas.pow 2) hpolyBound).const_mul cminus · exact hpolyPi · filter_upwards [ae_restrict_mem measurableSet_Icc, (hmodel.thinning x).filter_mono (ae_mono (Measure.restrict_mono_set volume hT))] with a ha hthin simpa [mul_assoc, mul_left_comm, mul_comm] using mul_le_mul_of_nonneg_left hthin.1 (sq_nonneg (poly a)) have hscaled := CausalSmith.Stat.LmtpThresholdAtomFrontier.lambdaStar_scaled_power_window_coercive ell hkappa hcminus hcplus hdelta hh v have hscaledT : lambdaStar ell kappa cminus cplus * cplus * (∫ a in T, a ^ kappa) * (∑ j, (v j) ^ 2) ≤ cminus * ∫ a in T, poly a ^ 2 * a ^ kappa := by dsimp [T, poly] rw [integral_Icc_eq_integral_Ioc, integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by linarith), ← intervalIntegral.integral_of_le (by linarith)] simpa [mul_comm] using hscaled rw [hquadIdentity] calc lambdaStar ell kappa cminus cplus * (∫ o, localWindowWeight x delta h o ∂P.dataMeasure) * (∑ j, (v j) ^ 2) ≤ P.px x * (lambdaStar ell kappa cminus cplus * cplus * (∫ a in T, a ^ kappa) * (∑ j, (v j) ^ 2)) := by have hlam : 0 ≤ lambdaStar ell kappa cminus cplus := (lambdaStar_pos ell hkappa hcminus hcplus).le calc _ ≤ lambdaStar ell kappa cminus cplus * (P.px x * (cplus * ∫ a in T, a ^ kappa)) * (∑ j, (v j) ^ 2) := by gcongr _ = _ := by ring _ ≤ P.px x * (cminus * ∫ a in T, poly a ^ 2 * a ^ kappa) := mul_le_mul_of_nonneg_left hscaledT hpx _ ≤ P.px x * ∫ a in T, poly a ^ 2 * P.pi x a := hthinLower
CausalSmith.Stat.LmtpThresholdAtomFrontier.localWindow_populationGram_coercive · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/LocalWindowGram.lean:500
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.MinimaxDivergence 10 declarations Chi-squared control for the canonical minimax witnesses

Chi-squared control for the canonical minimax witnesses

def minimaxMarkKernel

The signed Bernoulli mark kernel before translating its marks to {0,1}.

Definition (Lean source)
J :
g :
Fin J × ℝ → ℝ
hg :
minimaxMarkKernel g hg :
Kernel (Fin J × ℝ) ℝ
clause 1
toFun := fun p => twoPointMean (1 / 2) (g p)
clause 2
measurable' := (measurable_twoPointMean (1 / 2)).comp hg
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxMarkKernel · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxDivergence.lean:22
theorem minimaxMarkKernel_isMarkov

the stated minimax mark kernel is markov property holds for the specified J input, the specified g input, the specified hgm input, the specified hg input.

Formal statement
J :
Fin J × ℝ → ℝ
hgm :
hg :
∀ p, |g p| ≤ 1 / 2
Proof (Lean source)
lemma minimaxMarkKernel_isMarkov {J : ℕ} {g : Fin J × ℝ → ℝ} (hgm : Measurable g) (hg : ∀ p, |g p| ≤ 1 / 2) : IsMarkovKernel (minimaxMarkKernel g hgm) := by refine ⟨fun p => ?_⟩ exact twoPointMean_isProbabilityMeasure (by norm_num) (hg p)
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxMarkKernel_isMarkov · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxDivergence.lean:28
def minimaxObsEquiv

Retaining the design and translating the centered mark is a measurable equivalence with the paper's observation carrier.

Definition (Lean source)
J :
minimaxObsEquiv J :
((Fin J × ℝ) × ℝ) ≃ᵐ ClampObs J
clause 1
toEquiv := { toFun := fun p => ClampObs.mk p.1.1 p.1.2 (p.2 + 1 / 2) invFun := fun o => ((o.X, o.A), o.Y - 1 / 2) left_inv := by intro p; rcases p with ⟨⟨x, a⟩, y⟩; simp right_inv := by intro o; rcases o with ⟨x, a, y⟩; simp }
clause 2
measurable_toFun := by rw [measurable_comap_iff] fun_prop
clause 3
measurable_invFun := by let hall : Measurable (fun o : ClampObs J => (o.X, o.A, o.Y)) := Measurable.of_comap_le le_rfl exact ((measurable_fst.comp hall).prodMk (measurable_fst.comp (measurable_snd.comp hall))).prodMk ((measurable_snd.comp (measurable_snd.comp hall)).sub measurable_const)
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxObsEquiv · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxDivergence.lean:36
theorem minimaxDataMeasure_eq_map_attachKernel

The bind construction of the witness law is precisely the attached mark kernel, transported through minimaxObsEquiv. The result uses the hJ condition, the hkappa condition, the hg condition, the hgb condition. This is the stated conclusion.

Formal statement
J :
kappa :
g :
Fin J × ℝ → ℝ
hJ :
0 < J
hkappa :
0 ≤ kappa
hg :
hgb :
∀ p, |g p| ≤ 1 / 2
Proof (Lean source)
lemma minimaxDataMeasure_eq_map_attachKernel {J : ℕ} {kappa : ℝ} {g : Fin J × ℝ → ℝ} (hJ : 0 < J) (hkappa : 0 ≤ kappa) (hg : Measurable g) (hgb : ∀ p, |g p| ≤ 1 / 2) : minimaxDataMeasure J kappa g = (attachKernel (minimaxDesignMeasure J kappa) (minimaxMarkKernel g hg)).map (minimaxObsEquiv J) := by letI : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := minimaxDesignMeasure_isProbabilityMeasure J kappa hJ hkappa letI : IsMarkovKernel (minimaxMarkKernel g hg) := minimaxMarkKernel_isMarkov hg hgb ext S hS have hpre : MeasurableSet ((minimaxObsEquiv J) ⁻¹' S) := hS.preimage (minimaxObsEquiv J).measurable rw [Measure.map_apply (minimaxObsEquiv J).measurable hS] unfold minimaxDataMeasure rw [Measure.bind_apply hS (measurable_minimaxOutcomeKernel g hg).aemeasurable] rw [attachKernel, Measure.compProd_apply hpre] apply lintegral_congr intro p change (Measure.map (fun y : ℝ => ClampObs.mk p.1 p.2 (y + 1 / 2)) (twoPointMean (1 / 2) (g p))) S = _ rw [Measure.map_apply (by rw [measurable_comap_iff]; fun_prop) hS] rfl
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure_eq_map_attachKernel · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxDivergence.lean:54
theorem minimaxDataMeasure_chiSqDiv_center

Exact one-observation chi-squared divergence for a common-design centered Bernoulli perturbation. The result uses the hJ condition, the hkappa condition, the hg condition, the hgb condition. This is the stated conclusion.

Formal statement
J :
kappa :
hJ :
0 < J
hkappa :
0 ≤ kappa
g :
Fin J × ℝ → ℝ
hg :
hgb :
∀ p, |g p| < 1 / 2
chiSqDiv (minimaxDataMeasure J kappa g) (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ)))
= ∫ p, 4 * (g p) ^ 2 ∂minimaxDesignMeasure J kappa
Proof (Lean source)
lemma minimaxDataMeasure_chiSqDiv_center (J : ℕ) (kappa : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (g : Fin J × ℝ → ℝ) (hg : Measurable g) (hgb : ∀ p, |g p| < 1 / 2) : chiSqDiv (minimaxDataMeasure J kappa g) (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ))) = ∫ p, 4 * (g p) ^ 2 ∂minimaxDesignMeasure J kappa := by letI : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := minimaxDesignMeasure_isProbabilityMeasure J kappa hJ hkappa letI : IsMarkovKernel (minimaxMarkKernel g hg) := minimaxMarkKernel_isMarkov hg (fun p => (hgb p).le) letI : IsMarkovKernel (minimaxMarkKernel (fun _ : Fin J × ℝ => (0 : ℝ)) measurable_const) := minimaxMarkKernel_isMarkov (J := J) measurable_const (fun _ => by norm_num) rw [minimaxDataMeasure_eq_map_attachKernel hJ hkappa hg (fun p => (hgb p).le), minimaxDataMeasure_eq_map_attachKernel hJ hkappa measurable_const (fun _ => by norm_num), chiSqDiv_map_measurableEquiv] have hatt := one_add_chiSqDiv_attachKernel (minimaxDesignMeasure J kappa) (minimaxMarkKernel g hg) (minimaxMarkKernel (fun _ : Fin J × ℝ => (0 : ℝ)) measurable_const) (fun p => twoPointMean_ac_center (hgb p)) (minimax_attach_sq_integrable hJ hkappa hg hgb) have hatt' : 1 + chiSqDiv (attachKernel (minimaxDesignMeasure J kappa) (minimaxMarkKernel g hg)) (attachKernel (minimaxDesignMeasure J kappa) (minimaxMarkKernel (fun _ : Fin J × ℝ => (0 : ℝ)) measurable_const)) = ∫ p, (1 + 4 * (g p) ^ 2) ∂minimaxDesignMeasure J kappa := by calc _ = ∫ p, (1 + chiSqDiv ((minimaxMarkKernel g hg) p) ((minimaxMarkKernel (fun _ : Fin J × ℝ => (0 : ℝ)) measurable_const) p)) ∂minimaxDesignMeasure J kappa := hatt _ = _ := by apply integral_congr_ae filter_upwards with p congr 1 exact chiSqDiv_twoPointMean_centerHalf (hgb p) rw [integral_add (integrable_const 1) (Integrable.of_bound (by fun_prop) 1 (by filter_upwards with p rw [Real.norm_eq_abs, abs_of_nonneg (by positivity : 0 ≤ 4 * g p ^ 2)] rcases abs_lt.mp (hgb p) with ⟨hl, hr⟩ nlinarith [sq_nonneg (g p - 1 / 2), sq_nonneg (g p + 1 / 2)]))] at hatt' have hmass : (minimaxDesignMeasure J kappa).real univ = 1 := by simp simp only [integral_const, hmass, one_smul] at hatt' linarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure_chiSqDiv_center · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxDivergence.lean:161
theorem minimaxDataMeasure_ac_center

the stated minimax data measure ac center property holds for the specified J input, the specified kappa input, the specified hJ input, the specified hkappa input, the specified g input, the specified hg input, the specified hgb input.

Formal statement
J :
kappa :
hJ :
0 < J
hkappa :
0 ≤ kappa
g :
Fin J × ℝ → ℝ
hg :
hgb :
∀ p, |g p| < 1 / 2
minimaxDataMeasure J kappa g ≪ minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ))
Proof (Lean source)
lemma minimaxDataMeasure_ac_center (J : ℕ) (kappa : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (g : Fin J × ℝ → ℝ) (hg : Measurable g) (hgb : ∀ p, |g p| < 1 / 2) : minimaxDataMeasure J kappa g ≪ minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ)) := by letI : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := minimaxDesignMeasure_isProbabilityMeasure J kappa hJ hkappa letI : IsMarkovKernel (minimaxMarkKernel g hg) := minimaxMarkKernel_isMarkov hg (fun p => (hgb p).le) letI : IsMarkovKernel (minimaxMarkKernel (fun _ : Fin J × ℝ => (0 : ℝ)) measurable_const) := minimaxMarkKernel_isMarkov (J := J) measurable_const (fun _ => by norm_num) rw [minimaxDataMeasure_eq_map_attachKernel hJ hkappa hg (fun p => (hgb p).le), minimaxDataMeasure_eq_map_attachKernel hJ hkappa measurable_const (fun _ => by norm_num)] exact (Measure.AbsolutelyContinuous.compProd_right (ae_of_all _ fun p => twoPointMean_ac_center (hgb p))).map (minimaxObsEquiv J).measurable
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure_ac_center · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxDivergence.lean:211
theorem minimaxDataMeasure_sq_integrable_center

the stated minimax data measure sq integrable center property holds for the specified J input, the specified kappa input, the specified hJ input, the specified hkappa input, the specified g input, the specified hg input, the specified hgb input.

Formal statement
J :
kappa :
hJ :
0 < J
hkappa :
0 ≤ kappa
g :
Fin J × ℝ → ℝ
hg :
hgb :
∀ p, |g p| < 1 / 2
Integrable (fun o => (((minimaxDataMeasure J kappa g).rnDeriv (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ))) o).toReal - 1) ^ 2) (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ)))
Proof (Lean source)
lemma minimaxDataMeasure_sq_integrable_center (J : ℕ) (kappa : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (g : Fin J × ℝ → ℝ) (hg : Measurable g) (hgb : ∀ p, |g p| < 1 / 2) : Integrable (fun o => (((minimaxDataMeasure J kappa g).rnDeriv (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ))) o).toReal - 1) ^ 2) (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ))) := by letI : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := minimaxDesignMeasure_isProbabilityMeasure J kappa hJ hkappa letI : IsMarkovKernel (minimaxMarkKernel g hg) := minimaxMarkKernel_isMarkov hg (fun p => (hgb p).le) letI : IsMarkovKernel (minimaxMarkKernel (fun _ : Fin J × ℝ => (0 : ℝ)) measurable_const) := minimaxMarkKernel_isMarkov (J := J) measurable_const (fun _ => by norm_num) let mg := attachKernel (minimaxDesignMeasure J kappa) (minimaxMarkKernel g hg) let m0 := attachKernel (minimaxDesignMeasure J kappa) (minimaxMarkKernel (fun _ : Fin J × ℝ => (0 : ℝ)) measurable_const) rw [minimaxDataMeasure_eq_map_attachKernel hJ hkappa hg (fun p => (hgb p).le), minimaxDataMeasure_eq_map_attachKernel hJ hkappa measurable_const (fun _ => by norm_num)] apply (integrable_map_equiv (minimaxObsEquiv J) _).2 have hi := minimax_attach_sq_integrable hJ hkappa hg hgb refine hi.congr ?_ have hrn := (minimaxObsEquiv J).measurableEmbedding.rnDeriv_map mg m0 have hjoint := rnDeriv_compProd_right_of_forall_ac (μ := minimaxDesignMeasure J kappa) (κ := minimaxMarkKernel g hg) (η := minimaxMarkKernel (fun _ : Fin J × ℝ => (0 : ℝ)) measurable_const) (ae_of_all _ fun p => twoPointMean_ac_center (hgb p)) filter_upwards [hrn, hjoint] with p hp hj simp only [Function.comp_apply] have hj' : (mg.rnDeriv m0 p) = (minimaxMarkKernel g hg).rnDeriv (minimaxMarkKernel (fun _ : Fin J × ℝ => (0 : ℝ)) measurable_const) p.1 p.2 := by simpa [mg, m0, attachKernel] using hj rw [hp, hj']
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure_sq_integrable_center · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxDivergence.lean:230
theorem minimaxProduct_chiSqDiv_center

Exact iid tensorization of the canonical common-design experiment. The result uses the hJ condition, the hkappa condition, the hg condition, the hgb condition. This is the stated conclusion.

Formal statement
J n :
kappa :
hJ :
0 < J
hkappa :
0 ≤ kappa
g :
Fin J × ℝ → ℝ
hg :
hgb :
∀ p, |g p| < 1 / 2
1
+ chiSqDiv (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa g)) (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ))))
= (1 + ∫ p, 4 * (g p) ^ 2 ∂minimaxDesignMeasure J kappa) ^ n
Proof (Lean source)
lemma minimaxProduct_chiSqDiv_center (J n : ℕ) (kappa : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (g : Fin J × ℝ → ℝ) (hg : Measurable g) (hgb : ∀ p, |g p| < 1 / 2) : 1 + chiSqDiv (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa g)) (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ)))) = (1 + ∫ p, 4 * (g p) ^ 2 ∂minimaxDesignMeasure J kappa) ^ n := by letI : IsProbabilityMeasure (minimaxDataMeasure J kappa g) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa g hg (fun p => (hgb p).le) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ))) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ measurable_const (fun _ => by norm_num) rw [one_add_chiSqDiv_pi_iid_general (minimaxDataMeasure J kappa g) (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => (0 : ℝ))) (minimaxDataMeasure_ac_center J kappa hJ hkappa g hg hgb) (minimaxDataMeasure_sq_integrable_center J kappa hJ hkappa g hg hgb) n, minimaxDataMeasure_chiSqDiv_center J kappa hJ hkappa g hg hgb]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxProduct_chiSqDiv_center · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxDivergence.lean:268
theorem minimaxLocal_designIntegral_le

The squared local bump has the information-balance design integral order. The result uses the hJ condition, the hkappa condition, the hdelta condition, the hh condition, the hamp condition. This is the stated conclusion.

Formal statement
J :
beta kappa delta h amplitude :
hJ :
0 < J
hkappa :
0 ≤ kappa
hdelta :
0 ≤ delta
hh :
0 < h
hamp :
0 ≤ amplitude
q :
fun a : ℝ
=> amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h)
(∫ p, 4 * (q p.2) ^ 2 ∂minimaxDesignMeasure J kappa)
≤ 8 * (kappa + 1) * amplitude ^ 2 * h ^ (2 * beta + 1) * (delta + h) ^ kappa
Proof (Lean source)
lemma minimaxLocal_designIntegral_le (J : ℕ) (beta kappa delta h amplitude : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (hdelta : 0 ≤ delta) (hh : 0 < h) (hamp : 0 ≤ amplitude) : let q := fun a : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) (∫ p, 4 * (q p.2) ^ 2 ∂minimaxDesignMeasure J kappa) ≤ 8 * (kappa + 1) * amplitude ^ 2 * h ^ (2 * beta + 1) * (delta + h) ^ kappa := by dsimp only let q := fun a : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) let S : Set ℝ := Icc (delta - h) (delta + h) have hqmeas : Measurable q := by dsimp [q]; fun_prop have hq0 (a : ℝ) : 0 ≤ q a := by dsimp [q] exact mul_nonneg (mul_nonneg hamp (Real.rpow_nonneg hh.le _)) (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqle (a : ℝ) : q a ≤ amplitude * h ^ beta := by dsimp [q] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - delta) / h) nlinarith [mul_nonneg hamp (Real.rpow_nonneg hh.le beta)] have hqzero (a : ℝ) (ha : a ∉ S) : q a = 0 := by have hu : (a - delta) / h ∉ Icc (-1 : ℝ) 1 := by intro hu have hul := (le_div_iff₀ hh).mp hu.1 have hur := (div_le_iff₀ hh).mp hu.2 exact ha ⟨by linarith [hul], by linarith [hur]⟩ have habs : 1 ≤ |(a - delta) / h| := by rw [Set.mem_Icc, not_and_or, not_le, not_le] at hu rcases hu with hu | hu · rw [abs_of_neg (by linarith : (a - delta) / h < 0)]; linarith · exact le_trans (by linarith : 1 ≤ (a - delta) / h) (le_abs_self _) simp [q, CausalSmith.Stat.DoseResponseMinimax.doseBump_eq_zero_of_one_le_abs habs] letI : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := minimaxDesignMeasure_isProbabilityMeasure J kappa hJ hkappa letI : Nonempty (Fin J) := Fin.pos_iff_nonempty.mp hJ letI : IsProbabilityMeasure (minimaxStratumMeasure J) := by unfold minimaxStratumMeasure infer_instance letI : IsProbabilityMeasure (minimaxTreatmentMeasure kappa) := minimaxTreatmentMeasure_isProbabilityMeasure kappa hkappa have hint : Integrable (fun p : Fin J × ℝ => 4 * (q p.2) ^ 2) (minimaxDesignMeasure J kappa) := by refine Integrable.of_bound (((hqmeas.comp measurable_snd).pow_const 2).const_mul 4).aestronglyMeasurable (4 * (amplitude * h ^ beta) ^ 2) ?_ filter_upwards with p rw [Real.norm_eq_abs, abs_of_nonneg (by positivity : 0 ≤ 4 * q p.2 ^ 2)] nlinarith [(sq_le_sq₀ (hq0 p.2) (mul_nonneg hamp (Real.rpow_nonneg hh.le _))).2 (hqle p.2)] rw [minimaxDesignMeasure, integral_prod _ hint] simp only [integral_const] rw [show (minimaxStratumMeasure J).real univ = 1 by simp] simp only [one_smul] rw [minimaxTreatmentMeasure, integral_withDensity_eq_integral_toReal_smul (by fun_prop : Measurable fun a : ℝ => ofReal ((kappa + 1) * a ^ kappa)) (by simp)] simp only [smul_eq_mul] let T : Set ℝ := Icc (0 : ℝ) 1 have hdensity (a : ℝ) (ha : a ∈ T) : 0 ≤ (kappa + 1) * a ^ kappa := mul_nonneg (by linarith) (Real.rpow_nonneg ha.1 _) let K : ℝ := 4 * (amplitude * h ^ beta) ^ 2 * ((kappa + 1) * (delta + h) ^ kappa) have hK0 : 0 ≤ K := by dsimp [K]; positivity have hpoint : ∀ a, T.indicator (fun a => 4 * q a ^ 2 * ((kappa + 1) * a ^ kappa)) a ≤ S.indicator (fun _ => K) a := by intro a by_cases haT : a ∈ T · simp only [Set.indicator_of_mem haT] by_cases haS : a ∈ S · simp only [Set.indicator_of_mem haS] have harpow : a ^ kappa ≤ (delta + h) ^ kappa := Real.rpow_le_rpow haT.1 haS.2 hkappa have hsquare : q a ^ 2 ≤ (amplitude * h ^ beta) ^ 2 := (sq_le_sq₀ (hq0 a) (mul_nonneg hamp (Real.rpow_nonneg hh.le _))).2 (hqle a) dsimp [K] calc 4 * q a ^ 2 * ((kappa + 1) * a ^ kappa) ≤ 4 * (amplitude * h ^ beta) ^ 2 * ((kappa + 1) * a ^ kappa) := by exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hsquare (by norm_num)) (hdensity a haT) _ ≤ 4 * (amplitude * h ^ beta) ^ 2 * ((kappa + 1) * (delta + h) ^ kappa) := by gcongr · rw [hqzero a haS] simp [haS] · by_cases haS : a ∈ S <;> simp [haT, haS, hK0] have hmono : (∫ a, T.indicator (fun a => 4 * q a ^ 2 * ((kappa + 1) * a ^ kappa)) a) ≤ ∫ a, S.indicator (fun _ => K) a := by apply integral_mono_ae · apply IntegrableOn.integrable_indicator (s := T) (f := fun a => 4 * q a ^ 2 * ((kappa + 1) * a ^ kappa)) (hs := measurableSet_Icc) refine IntegrableOn.of_bound measure_Icc_lt_top (((hqmeas.pow_const 2).const_mul 4).mul (measurable_const.mul (measurable_id.pow_const kappa))).aestronglyMeasurable (4 * (amplitude * h ^ beta) ^ 2 * (kappa + 1)) ?_ filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (by positivity) (hdensity a ha))] have haq : q a ^ 2 ≤ (amplitude * h ^ beta) ^ 2 := (sq_le_sq₀ (hq0 a) (mul_nonneg hamp (Real.rpow_nonneg hh.le _))).2 (hqle a) have har : a ^ kappa ≤ 1 := by simpa using Real.rpow_le_one ha.1 ha.2 hkappa calc 4 * q a ^ 2 * ((kappa + 1) * a ^ kappa) ≤ 4 * (amplitude * h ^ beta) ^ 2 * ((kappa + 1) * a ^ kappa) := by exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left haq (by norm_num)) (hdensity a ha) _ ≤ 4 * (amplitude * h ^ beta) ^ 2 * (kappa + 1) := by have hdle : (kappa + 1) * a ^ kappa ≤ kappa + 1 := by simpa using mul_le_mul_of_nonneg_left har (by linarith : 0 ≤ kappa + 1) exact mul_le_mul_of_nonneg_left hdle (by positivity) · apply IntegrableOn.integrable_indicator (s := S) (f := fun _ : ℝ => K) (hs := measurableSet_Icc) refine IntegrableOn.of_bound measure_Icc_lt_top aestronglyMeasurable_const K ?_ filter_upwards with a rw [Real.norm_eq_abs, abs_of_nonneg hK0] · exact Filter.Eventually.of_forall hpoint have hrewrite : (∫ a in Icc (0 : ℝ) 1, (ofReal ((kappa + 1) * a ^ kappa)).toReal * (4 * q a ^ 2)) = ∫ a, T.indicator (fun a => 4 * q a ^ 2 * ((kappa + 1) * a ^ kappa)) a := by rw [← integral_indicator measurableSet_Icc] apply integral_congr_ae filter_upwards with a by_cases ha : a ∈ T · simp [T, ha, ENNReal.toReal_ofReal (hdensity a ha)] ring · simp [T, ha] rw [hrewrite] calc _ ≤ ∫ a, S.indicator (fun _ => K) a := hmono _ = K * (2 * h) := by simp [S, measureReal_def, hh.le]; ring _ = 8 * (kappa + 1) * amplitude ^ 2 * h ^ (2 * beta + 1) * (delta + h) ^ kappa := by dsimp [K] rw [show h ^ (2 * beta + 1) = h ^ beta * h ^ beta * h by rw [show 2 * beta + 1 = (beta + beta) + 1 by ring, Real.rpow_add hh, Real.rpow_add hh, Real.rpow_one]] ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxLocal_designIntegral_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxDivergence.lean:292
theorem minimaxConstant_productChiSq_le_exp_four

the stated minimax constant product chi sq bound exp four property holds for the specified J input, the specified n input, the specified kappa input, the specified hJ input, the specified hkappa input, the specified hn input.

Formal statement
J n :
kappa :
hJ :
0 < J
hkappa :
0 ≤ kappa
hn :
5 ≤ n
eps :
(n : ℝ) ^ (-(1 : ℝ) / 2)
chiSqDiv (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps))) (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)))
exp 4
Proof (Lean source)
lemma minimaxConstant_productChiSq_le_exp_four (J n : ℕ) (kappa : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (hn : 5 ≤ n) : let eps := (n : ℝ) ^ (-(1 : ℝ) / 2) chiSqDiv (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps))) (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0))) ≤ exp 4 := by dsimp only let eps : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) have hnpos : 0 < n := by omega have hnR : 0 < (n : ℝ) := by exact_mod_cast hnpos have heps0 : 0 < eps := Real.rpow_pos_of_pos hnR _ have hepslt : |eps| < 1 / 2 := by rw [abs_of_pos heps0] have hn4 : (4 : ℝ) < n := by exact_mod_cast hn calc eps < (4 : ℝ) ^ (-(1 : ℝ) / 2) := by dsimp [eps] exact Real.rpow_lt_rpow_of_neg (by norm_num) hn4 (by norm_num) _ = 1 / 2 := by norm_num have hepsSq : eps ^ 2 = (n : ℝ)⁻¹ := by dsimp [eps] rw [← Real.rpow_natCast, ← Real.rpow_mul hnR.le] norm_num rw [Real.rpow_neg_one] have hneps : (n : ℝ) * eps ^ 2 = 1 := by rw [hepsSq] exact mul_inv_cancel₀ hnR.ne' letI : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := minimaxDesignMeasure_isProbabilityMeasure J kappa hJ hkappa have hint : (∫ p, 4 * ((fun _ : Fin J × ℝ => eps) p) ^ 2 ∂minimaxDesignMeasure J kappa) = 4 * eps ^ 2 := by simp have hchiEq := minimaxProduct_chiSqDiv_center J n kappa hJ hkappa (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepslt) rw [hint] at hchiEq have hbase : 1 + 4 * eps ^ 2 ≤ exp (4 * eps ^ 2) := by simpa [add_comm] using Real.add_one_le_exp (4 * eps ^ 2) have hpow : (1 + 4 * eps ^ 2) ^ n ≤ exp 4 := by calc _ ≤ (exp (4 * eps ^ 2)) ^ n := pow_le_pow_left₀ (by positivity) hbase n _ = exp ((n : ℝ) * (4 * eps ^ 2)) := by rw [Real.exp_nat_mul] _ = exp 4 := by rw [show (n : ℝ) * (4 * eps ^ 2) = 4 by nlinarith] change chiSqDiv (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps))) (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0))) ≤ exp 4 linarith [hchiEq, hpow]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxConstant_productChiSq_le_exp_four · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxDivergence.lean:438
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.MinimaxFunctional 6 declarations Clamp functional on the canonical witness family

Clamp functional on the canonical witness family

theorem minimaxAtomMass

the stated minimax atom mass property holds for the specified J input, the specified kappa input, the specified delta input, the specified hkappa input, the specified hdelta input, the specified q input, the specified x input.

Formal statement
J :
kappa delta :
hkappa :
0 ≤ kappa
hdelta :
0 ≤ delta
q :
ℝ → ℝ
x :
Fin J
atomMass (minimaxClampLaw J kappa (fun p => q p.2)) x delta = delta ^ (kappa + 1)
Proof (Lean source)
lemma minimaxAtomMass (J : ℕ) (kappa delta : ℝ) (hkappa : 0 ≤ kappa) (hdelta : 0 ≤ delta) (q : ℝ → ℝ) (x : Fin J) : atomMass (minimaxClampLaw J kappa (fun p => q p.2)) x delta = delta ^ (kappa + 1) := by unfold atomMass minimaxClampLaw rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hdelta, intervalIntegral.integral_const_mul, integral_rpow (inl (by linarith : -1 < kappa))] rw [Real.zero_rpow (by linarith : kappa + 1 ≠ 0)] have hk1 : kappa + 1 ≠ 0 := by linarith field_simp [hk1] ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxAtomMass · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxFunctional.lean:18
theorem minimaxRetainedMean

the stated minimax retained mean property holds for the specified J input, the specified kappa input, the specified delta input, the specified hJ input, the specified hkappa input, the specified q input, the specified hqmeas input, the specified hqbound input.

Formal statement
J :
kappa delta :
hJ :
0 < J
hkappa :
0 ≤ kappa
q :
ℝ → ℝ
hqmeas :
hqbound :
∀ a, |q a| ≤ 1 / 2
retainedMean (minimaxClampLaw J kappa (fun p => q p.2)) delta
= ∫ a in Ioi delta, (1 / 2 + q a) ∂minimaxTreatmentMeasure kappa
Proof (Lean source)
lemma minimaxRetainedMean (J : ℕ) (kappa delta : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (q : ℝ → ℝ) (hqmeas : Measurable q) (hqbound : ∀ a, |q a| ≤ 1 / 2) : retainedMean (minimaxClampLaw J kappa (fun p => q p.2)) delta = ∫ a in Set.Ioi delta, (1 / 2 + q a) ∂minimaxTreatmentMeasure kappa := by let g : Fin J × ℝ → ℝ := fun p => q p.2 have hgmeas : Measurable g := hqmeas.comp measurable_snd have hgbound : ∀ p, |g p| ≤ 1 / 2 := fun p => hqbound p.2 let T : Set (Fin J × ℝ) := (Set.univ : Set (Fin J)) ×ˢ Set.Ioi delta have hT : MeasurableSet T := MeasurableSet.univ.prod measurableSet_Ioi have hreg := minimaxDataMeasure_integral_Y_design J kappa hJ hkappa g hgmeas hgbound T hT haveI : Nonempty (Fin J) := Fin.pos_iff_nonempty.mp hJ haveI : IsProbabilityMeasure (minimaxStratumMeasure J) := by unfold minimaxStratumMeasure infer_instance haveI : IsProbabilityMeasure (minimaxTreatmentMeasure kappa) := minimaxTreatmentMeasure_isProbabilityMeasure kappa hkappa have hprod := setIntegral_prod_mul (μ := minimaxStratumMeasure J) (ν := minimaxTreatmentMeasure kappa) (fun _ : Fin J => (1 : ℝ)) (fun a => 1 / 2 + q a) (Set.univ : Set (Fin J)) (Set.Ioi delta) rw [show retainedMean (minimaxClampLaw J kappa (fun p => q p.2)) delta = ∫ o in (fun o : ClampObs J => (o.X, o.A)) ⁻¹' T, o.Y ∂minimaxDataMeasure J kappa g by unfold retainedMean change (∫ o, o.Y * indicator {o : ClampObs J | delta < o.A} (fun _ => (1 : ℝ)) o ∂minimaxDataMeasure J kappa g) = _ have hd : Measurable (fun o : ClampObs J => (o.X, o.A)) := by let hall : Measurable (fun o : ClampObs J => (o.X, o.A, o.Y)) := Measurable.of_comap_le le_rfl exact (measurable_fst.comp hall).prodMk (measurable_fst.comp (measurable_snd.comp hall)) calc (∫ o, o.Y * indicator {o : ClampObs J | delta < o.A} (fun _ => (1 : ℝ)) o ∂minimaxDataMeasure J kappa g) = ∫ o, ((fun o : ClampObs J => (o.X, o.A)) ⁻¹' T).indicator (fun o => o.Y) o ∂minimaxDataMeasure J kappa g := by apply integral_congr_ae filter_upwards with o simp [T, indicator, g] _ = _ := integral_indicator (hT.preimage hd)] rw [hreg] change (∫ p in T, (1 / 2 + q p.2) ∂minimaxDesignMeasure J kappa) = _ rw [minimaxDesignMeasure] calc (∫ p in T, (1 / 2 + q p.2) ∂(minimaxStratumMeasure J).prod (minimaxTreatmentMeasure kappa)) = (∫ _x in (Set.univ : Set (Fin J)), (1 : ℝ) ∂minimaxStratumMeasure J) * ∫ a in Set.Ioi delta, (1 / 2 + q a) ∂minimaxTreatmentMeasure kappa := by simpa [T] using hprod _ = _ := by simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxRetainedMean · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxFunctional.lean:32
theorem minimaxClampFunctional

the stated minimax clamp functional property holds for the specified J input, the specified kappa input, the specified delta input, the specified hJ input, the specified hkappa input, the specified hdelta input, the specified q input, the specified hqmeas input, the specified hqbound input.

Formal statement
J :
kappa delta :
hJ :
0 < J
hkappa :
0 ≤ kappa
hdelta :
0 ≤ delta
q :
ℝ → ℝ
hqmeas :
hqbound :
∀ a, |q a| ≤ 1 / 2
clampFunctional (minimaxClampLaw J kappa (fun p => q p.2)) delta
= (∫ a in Ioi delta, (1 / 2 + q a) ∂minimaxTreatmentMeasure kappa)
+ delta ^ (kappa + 1) * (1 / 2 + q delta)
Proof (Lean source)
lemma minimaxClampFunctional (J : ℕ) (kappa delta : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (hdelta : 0 ≤ delta) (q : ℝ → ℝ) (hqmeas : Measurable q) (hqbound : ∀ a, |q a| ≤ 1 / 2) : clampFunctional (minimaxClampLaw J kappa (fun p => q p.2)) delta = (∫ a in Ioi delta, (1 / 2 + q a) ∂minimaxTreatmentMeasure kappa) + delta ^ (kappa + 1) * (1 / 2 + q delta) := by rw [clampFunctional, minimaxRetainedMean J kappa delta hJ hkappa q hqmeas hqbound] simp_rw [minimaxAtomMass J kappa delta hkappa hdelta q] simp [minimaxClampLaw] have hJR : (J : ℝ) ≠ 0 := by exact_mod_cast hJ.ne' field_simp [hJR]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxClampFunctional · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxFunctional.lean:86
theorem minimaxTreatmentMeasure_real_Ioi

the stated minimax treatment measure real ioi property holds for the specified kappa input, the specified delta input, the specified hkappa input, the specified hdelta input.

Formal statement
kappa delta :
hkappa :
0 ≤ kappa
hdelta :
delta ∈ Icc (0 : ℝ) 1
(minimaxTreatmentMeasure kappa).real (Ioi delta) = 1 - delta ^ (kappa + 1)
Proof (Lean source)
lemma minimaxTreatmentMeasure_real_Ioi (kappa delta : ℝ) (hkappa : 0 ≤ kappa) (hdelta : delta ∈ Icc (0 : ℝ) 1) : (minimaxTreatmentMeasure kappa).real (Ioi delta) = 1 - delta ^ (kappa + 1) := by letI : IsProbabilityMeasure (minimaxTreatmentMeasure kappa) := minimaxTreatmentMeasure_isProbabilityMeasure kappa hkappa have hicc : (minimaxTreatmentMeasure kappa).real (Icc (0 : ℝ) delta) = delta ^ (kappa + 1) := by rw [minimaxTreatmentMeasure_real kappa hkappa _ measurableSet_Icc (fun a ha => ⟨ha.1, ha.2.trans hdelta.2⟩)] rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hdelta.1, intervalIntegral.integral_const_mul, integral_rpow (inl (by linarith : -1 < kappa))] rw [Real.zero_rpow (by linarith : kappa + 1 ≠ 0)] have hk1 : kappa + 1 ≠ 0 := by linarith field_simp [hk1] ring have hiic : (minimaxTreatmentMeasure kappa).real (Iic delta) = delta ^ (kappa + 1) := by rw [← hicc] apply measureReal_congr filter_upwards [minimaxTreatmentMeasure_ae_mem_Icc kappa] with a ha apply propext change a ≤ delta ↔ 0 ≤ a ∧ a ≤ delta constructor · intro had exact ⟨ha.1, had⟩ · intro had exact had.2 rw [← Set.compl_Iic, measureReal_compl measurableSet_Iic, hiic] simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxTreatmentMeasure_real_Ioi · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxFunctional.lean:99
theorem minimaxGlobalSeparation

the stated minimax global separation property holds for the specified J input, the specified kappa input, the specified delta input, the specified eps input, the specified hJ input, the specified hkappa input, the specified hdelta input, the specified heps input.

Formal statement
J :
kappa delta eps :
hJ :
0 < J
hkappa :
0 ≤ kappa
hdelta :
delta ∈ Icc (0 : ℝ) 1
heps :
|eps| ≤ 1 / 2
clampFunctional (minimaxClampLaw J kappa (fun _ => eps)) delta
- clampFunctional (minimaxClampLaw J kappa (fun _ => 0)) delta
= eps
Proof (Lean source)
lemma minimaxGlobalSeparation (J : ℕ) (kappa delta eps : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (hdelta : delta ∈ Icc (0 : ℝ) 1) (heps : |eps| ≤ 1 / 2) : clampFunctional (minimaxClampLaw J kappa (fun _ => eps)) delta - clampFunctional (minimaxClampLaw J kappa (fun _ => 0)) delta = eps := by rw [minimaxClampFunctional J kappa delta hJ hkappa hdelta.1 (fun _ => eps) measurable_const (fun _ => heps), minimaxClampFunctional J kappa delta hJ hkappa hdelta.1 (fun _ => 0) measurable_const (fun _ => by norm_num)] have hconst (c : ℝ) : (∫ _a in Ioi delta, c ∂minimaxTreatmentMeasure kappa) = c * (minimaxTreatmentMeasure kappa).real (Ioi delta) := by simp [mul_comm] rw [show (∫ a in Ioi delta, (1 / 2 + eps) ∂minimaxTreatmentMeasure kappa) = (1 / 2 + eps) * (minimaxTreatmentMeasure kappa).real (Ioi delta) by exact hconst _, show (∫ a in Ioi delta, (1 / 2 + 0) ∂minimaxTreatmentMeasure kappa) = (1 / 2) * (minimaxTreatmentMeasure kappa).real (Ioi delta) by simpa using hconst (1 / 2)] rw [minimaxTreatmentMeasure_real_Ioi kappa delta hkappa hdelta] ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxGlobalSeparation · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxFunctional.lean:132
theorem minimaxLocalSeparation

the stated minimax local separation property holds for the specified J input, the specified beta input, the specified kappa input, the specified delta input, the specified h input, the specified amplitude input, the specified hJ input, the specified hbeta input, the specified hkappa input, the specified hdelta input, the specified hh input, the specified hh1 input, the specified hamp input, the specified hamp_le input.

Formal statement
J :
beta kappa delta h amplitude :
hJ :
0 < J
hbeta :
0 < beta
hkappa :
0 ≤ kappa
hdelta :
delta ∈ Icc (0 : ℝ) 1
hh :
0 < h
hh1 :
h ≤ 1
hamp :
0 ≤ amplitude
hamp_le :
amplitude ≤ 1 / 4
q :
fun a : ℝ
=> amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h)
amplitude * delta ^ (kappa + 1) * h ^ beta
clampFunctional (minimaxClampLaw J kappa (fun p => q p.2)) delta
- clampFunctional (minimaxClampLaw J kappa (fun _ => 0)) delta
Proof (Lean source)
lemma minimaxLocalSeparation (J : ℕ) (beta kappa delta h amplitude : ℝ) (hJ : 0 < J) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (hdelta : delta ∈ Icc (0 : ℝ) 1) (hh : 0 < h) (hh1 : h ≤ 1) (hamp : 0 ≤ amplitude) (hamp_le : amplitude ≤ 1 / 4) : let q := fun a : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) amplitude * delta ^ (kappa + 1) * h ^ beta ≤ clampFunctional (minimaxClampLaw J kappa (fun p => q p.2)) delta - clampFunctional (minimaxClampLaw J kappa (fun _ => 0)) delta := by dsimp only let q := fun a : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) have hqmeas : Measurable q := by dsimp [q] fun_prop have hqnonneg : ∀ a, 0 ≤ q a := by intro a dsimp [q] exact mul_nonneg (mul_nonneg hamp (Real.rpow_nonneg hh.le _)) (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqbound : ∀ a, |q a| ≤ 1 / 2 := by intro a rw [abs_of_nonneg (hqnonneg a)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - delta) / h) calc q a ≤ amplitude * h ^ beta := by dsimp [q] nlinarith [mul_nonneg hamp (Real.rpow_nonneg hh.le beta)] _ ≤ 1 / 2 := by have hp : h ^ beta ≤ 1 := Real.rpow_le_one hh.le hh1 hbeta.le calc amplitude * h ^ beta ≤ amplitude * 1 := mul_le_mul_of_nonneg_left hp hamp _ ≤ 1 / 2 := by linarith rw [minimaxClampFunctional J kappa delta hJ hkappa hdelta.1 q hqmeas hqbound, minimaxClampFunctional J kappa delta hJ hkappa hdelta.1 (fun _ => 0) measurable_const (fun _ => by norm_num)] haveI : IsProbabilityMeasure (minimaxTreatmentMeasure kappa) := minimaxTreatmentMeasure_isProbabilityMeasure kappa hkappa have hqint : Integrable q (minimaxTreatmentMeasure kappa) := by refine Integrable.of_bound hqmeas.aestronglyMeasurable (1 / 2) ?_ filter_upwards with a simpa [Real.norm_eq_abs] using hqbound a have honeint : Integrable (fun _ : ℝ => (1 / 2 : ℝ)) (minimaxTreatmentMeasure kappa) := integrable_const _ rw [show (∫ a in Ioi delta, (1 / 2 + q a) ∂minimaxTreatmentMeasure kappa) = (∫ a in Ioi delta, (1 / 2 : ℝ) ∂minimaxTreatmentMeasure kappa) + ∫ a in Ioi delta, q a ∂minimaxTreatmentMeasure kappa by rw [integral_add honeint.integrableOn hqint.integrableOn], show (∫ a in Ioi delta, (1 / 2 + 0) ∂minimaxTreatmentMeasure kappa) = ∫ a in Ioi delta, (1 / 2 : ℝ) ∂minimaxTreatmentMeasure kappa by simp] have hqdelta : q delta = amplitude * h ^ beta := by simp [q, hh.ne', CausalSmith.Stat.DoseResponseMinimax.doseBump_zero] rw [hqdelta] have hnonnegint : 0 ≤ ∫ a in Ioi delta, q a ∂minimaxTreatmentMeasure kappa := integral_nonneg_of_ae (ae_of_all _ hqnonneg) nlinarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxLocalSeparation · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxFunctional.lean:155
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.MinimaxHolder 2 declarations Taylor certification for the localized minimax bump

Taylor certification for the localized minimax bump

theorem taylorWithin_remainder_of_holder

A global smoothness and top-derivative Hölder bound imply the exact within-interval Taylor remainder convention used by HolderRegression. The result uses the hbeta condition, the hL condition, the hf condition, the htop condition. This is the stated conclusion.

Formal statement
f :
ℝ → ℝ
beta L :
hbeta :
0 < beta
hL :
0 ≤ L
hf :
ContDiff ℝ (ellOf beta) f
htop :
∀ x ∈ Icc (0 : ℝ) 1,
∀ y ∈ Icc (0 : ℝ) 1,
|iteratedDeriv (ellOf beta) f x - iteratedDeriv (ellOf beta) f y|
≤ L * |x - y| ^ (beta - (ellOf beta : ℝ))
s ∈ Set.Icc (0 : ℝ) 1 :
t ∈ Set.Icc (0 : ℝ) 1 :
|f t
- ∑ j ∈ range (ellOf beta + 1), iteratedDerivWithin j f (Icc (0 : ℝ) 1) s * (t - s) ^ j / (Nat.factorial j : ℝ)|
≤ L * |t - s| ^ beta
Proof (Lean source)
lemma taylorWithin_remainder_of_holder {f : ℝ → ℝ} {beta L : ℝ} (hbeta : 0 < beta) (hL : 0 ≤ L) (hf : ContDiff ℝ (ellOf beta) f) (htop : ∀ x ∈ Icc (0 : ℝ) 1, ∀ y ∈ Icc (0 : ℝ) 1, |iteratedDeriv (ellOf beta) f x - iteratedDeriv (ellOf beta) f y| ≤ L * |x - y| ^ (beta - (ellOf beta : ℝ))) : ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |f t - ∑ j ∈ range (ellOf beta + 1), iteratedDerivWithin j f (Icc (0 : ℝ) 1) s * (t - s) ^ j / (Nat.factorial j : ℝ)| ≤ L * |t - s| ^ beta := by intro s hs t ht have hrem := holder_taylor_remainder (f := f) (M := L) (β := beta) (lo := 0) (hi := 1) (t := s) (a := t) hbeta hL hs ht (by simpa [ellOf_eq_holderDerivOrder] using hf) (by simpa [ellOf_eq_holderDerivOrder] using htop) have hpoly : Causalean.Stat.Nonparametric.taylorPoly (ellOf beta) f s t = ∑ j ∈ range (ellOf beta + 1), iteratedDerivWithin j f (Icc (0 : ℝ) 1) s * (t - s) ^ j / (Nat.factorial j : ℝ) := by unfold Causalean.Stat.Nonparametric.taylorPoly apply Finset.sum_congr rfl intro j hj have hjle : j ≤ ellOf beta := Nat.lt_succ_iff.mp (Finset.mem_range.mp hj) have hwithin : iteratedDerivWithin j f (Icc (0 : ℝ) 1) s = iteratedDeriv j f s := by exact iteratedDerivWithin_eq_iteratedDeriv (uniqueDiffOn_Icc (by norm_num)) ((hf.of_le (WithTop.coe_le_coe.mpr (ENat.coe_le_coe.mpr hjle))).contDiffAt) hs rw [hwithin] ring rw [← hpoly] calc |f t - Causalean.Stat.Nonparametric.taylorPoly (ellOf beta) f s t| ≤ L / (Nat.factorial (ellOf beta) : ℝ) * |t - s| ^ beta := by simpa [ellOf_eq_holderDerivOrder] using hrem _ ≤ L * |t - s| ^ beta := by have hfacNat : 1 ≤ Nat.factorial (ellOf beta) := Nat.succ_le_iff.mpr (Nat.factorial_pos _) have hfac : (1 : ℝ) ≤ Nat.factorial (ellOf beta) := by exact_mod_cast hfacNat have hdiv : L / (Nat.factorial (ellOf beta) : ℝ) ≤ L := by exact div_le_self hL hfac exact mul_le_mul_of_nonneg_right hdiv (Real.rpow_nonneg (abs_nonneg _) _)
CausalSmith.Stat.LmtpThresholdAtomFrontier.taylorWithin_remainder_of_holder · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxHolder.lean:23
theorem exists_minimaxBump_amplitude

Fixed amplitude and the localized smooth bump satisfy the paper's exact Taylor-remainder Hölder member uniformly over all admissible centers and bandwidths. The result uses the hbeta condition, the hL condition. This is the stated conclusion.

Formal statement
beta L :
hbeta :
0 < beta
hL :
0 < L
∃ amplitude : ℝ,
0 < amplitude
amplitude ≤ 1 / 4
conclusion 1
delta h :
0 ≤ delta
delta ≤ 1
0 < h
h ≤ 1
q :
fun a : ℝ
=> amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h)
ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) 1)
a ∈ Set.Icc (0 : ℝ) 1 :
1 / 2 + q a ∈ Icc (0 : ℝ) 1
s ∈ Set.Icc (0 : ℝ) 1 :
t ∈ Set.Icc (0 : ℝ) 1 :
|(1 / 2 + q t)
- ∑ j ∈ range (ellOf beta + 1), iteratedDerivWithin j (fun a => 1 / 2 + q a) (Icc (0 : ℝ) 1) s * (t - s) ^ j / (Nat.factorial j : ℝ)|
≤ L * |t - s| ^ beta
Proof (Lean source)
lemma exists_minimaxBump_amplitude (beta L : ℝ) (hbeta : 0 < beta) (hL : 0 < L) : ∃ amplitude : ℝ, 0 < amplitude ∧ amplitude ≤ 1 / 4 ∧ ∀ {delta h : ℝ}, 0 ≤ delta → delta ≤ 1 → 0 < h → h ≤ 1 → let q := fun a : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) 1) ∧ (∀ a ∈ Icc (0 : ℝ) 1, 1 / 2 + q a ∈ Icc (0 : ℝ) 1) ∧ ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |(1 / 2 + q t) - ∑ j ∈ range (ellOf beta + 1), iteratedDerivWithin j (fun a => 1 / 2 + q a) (Icc (0 : ℝ) 1) s * (t - s) ^ j / (Nat.factorial j : ℝ)| ≤ L * |t - s| ^ beta := by let M := min L 1 have hM : 0 < M := lt_min hL zero_lt_one obtain ⟨amplitude, hamp, hampM, hball⟩ := CausalSmith.Stat.DoseResponseMinimax.doseBump_holder_gate beta M 0 1 hbeta hM refine ⟨amplitude, hamp, hampM.trans ?_, ?_⟩ · exact (div_le_div_of_nonneg_right (min_le_right L 1) (by norm_num)).trans_eq (by norm_num) intro delta h hdelta hdelta1 hh hh1 dsimp only let q := fun a : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) have hqball := hball (ζ := (1 : ℝ)) (h := h) (inr rfl) hh hh1 have hsmoothTop : ContDiff ℝ (⊤ : ℕ∞) q := by dsimp [q] exact contDiff_const.mul (CausalSmith.Stat.DoseResponseMinimax.doseContDiffBump.contDiff.comp ((contDiff_id.sub contDiff_const).div_const h)) have hsmooth : ContDiff ℝ (ellOf beta) (fun a => 1 / 2 + q a) := contDiff_const.add (hsmoothTop.of_le (WithTop.coe_le_coe.mpr (show (ellOf beta : ℕ∞) ≤ (⊤ : ℕ∞) from le_top))) have hcont : ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) 1) := hsmooth.continuous.continuousOn have hqnonneg (a : ℝ) : 0 ≤ q a := by dsimp [q] exact mul_nonneg (mul_nonneg hamp.le (Real.rpow_nonneg hh.le _)) (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqle (a : ℝ) : q a ≤ 1 / 4 := by have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - delta) / h) have hhpow : h ^ beta ≤ 1 := Real.rpow_le_one hh.le hh1 hbeta.le have ha4 : amplitude ≤ 1 / 4 := hampM.trans ((div_le_div_of_nonneg_right (min_le_right L 1) (by norm_num)).trans_eq (by norm_num)) calc q a ≤ amplitude * h ^ beta * 1 := mul_le_mul_of_nonneg_left hb (mul_nonneg hamp.le (Real.rpow_nonneg hh.le _)) _ ≤ amplitude * 1 := by simpa only [mul_one] using mul_le_mul_of_nonneg_left hhpow hamp.le _ ≤ 1 / 4 := by simpa using ha4 refine ⟨hcont, ?_, ?_⟩ · intro a ha exact ⟨by linarith [hqnonneg a], by linarith [hqle a]⟩ apply taylorWithin_remainder_of_holder hbeta hL.le hsmooth intro x hx y hy have hxd : x - delta ∈ Icc (-1 : ℝ) 1 := by constructor <;> linarith [hx.1, hx.2] have hyd : y - delta ∈ Icc (-1 : ℝ) 1 := by constructor <;> linarith [hy.1, hy.2] have htop := hqball.2.2 (x - delta) (by simpa [CausalSmith.Stat.DoseResponseMinimax.doseWindow] using hxd) (y - delta) (by simpa [CausalSmith.Stat.DoseResponseMinimax.doseWindow] using hyd) have htranslate (j : ℕ) (a : ℝ) : iteratedDeriv j q a = iteratedDeriv j (fun u : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((u - 0) / h)) (a - delta) := by let f0 := fun u : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((u - 0) / h) have hfun : q = fun a => f0 (a - delta) := by funext a simp [q, f0] change iteratedDeriv j q a = iteratedDeriv j f0 (a - delta) rw [hfun] exact congrFun (iteratedDeriv_comp_sub_const (n := j) (f := f0) (s := delta)) a have hdist : |(x - delta) - (y - delta)| = |x - y| := by ring_nf have htopq : |iteratedDeriv (ellOf beta) q x - iteratedDeriv (ellOf beta) q y| ≤ M * |x - y| ^ (beta - (ellOf beta : ℝ)) := by rw [htranslate (ellOf beta) x, htranslate (ellOf beta) y] simpa [ellOf, hdist] using htop have hML : M ≤ L := min_le_left _ _ have htopL := htopq.trans (mul_le_mul_of_nonneg_right hML (Real.rpow_nonneg (abs_nonneg _) _)) by_cases hell : ellOf beta = 0 · simpa [hell, iteratedDeriv_zero] using htopL · have hellpos : 0 < ellOf beta := Nat.pos_of_ne_zero hell rw [iteratedDeriv_const_add hellpos (1 / 2 : ℝ), iteratedDeriv_const_add hellpos (1 / 2 : ℝ)] exact htopL
CausalSmith.Stat.LmtpThresholdAtomFrontier.exists_minimaxBump_amplitude · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxHolder.lean:69
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.MinimaxLaw 13 declarations The centered two-point law on {-1/2,1/2} is translated to a genuine Bernoulli outcome on {0,1}.

Bernoulli laws over the canonical minimax design

The centered two-point law on {-1/2,1/2} is translated to a genuine Bernoulli outcome on {0,1}. Keeping this construction as an iterated kernel makes the common design marginal and regression identities transparent.

def minimaxOutcomeKernel

The Bernoulli observation kernel with centered conditional mean g.

Definition (Lean source)
J :
g :
Fin J × ℝ → ℝ
p :
Fin J × ℝ
minimaxOutcomeKernel g p :
(twoPointMean (1 / 2) (g p)).map (fun y => ClampObs.mk p.1 p.2 (y + 1 / 2))
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxOutcomeKernel · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:37
theorem measurable_minimaxOutcomeKernel

the stated measurable minimax outcome kernel property holds for the specified J input, the specified g input, the specified hg input.

Formal statement
J :
g :
Fin J × ℝ → ℝ
hg :
Proof (Lean source)
lemma measurable_minimaxOutcomeKernel {J : ℕ} (g : Fin J × ℝ → ℝ) (hg : Measurable g) : Measurable (minimaxOutcomeKernel g) := by classical refine Measure.measurable_of_measurable_coe _ ?_ intro S hS unfold minimaxOutcomeKernel twoPointMean simp_rw [Measure.map_apply (measurable_clampObs_mk _) hS] simp only [Measure.add_apply, Measure.smul_apply, Measure.dirac_apply, smul_eq_mul] have hplus : Measurable (fun p : Fin J × ℝ => ((fun y : ℝ => ClampObs.mk p.1 p.2 (y + 1 / 2)) ⁻¹' S).indicator (1 : ℝ → ℝ≥0∞) (1 / 2)) := by rw [show (fun p : Fin J × ℝ => ((fun y : ℝ => ClampObs.mk p.1 p.2 (y + 1 / 2)) ⁻¹' S).indicator (1 : ℝ → ℝ≥0∞) (1 / 2)) = fun p => if ClampObs.mk p.1 p.2 1 ∈ S then 1 else 0 by funext p simp [Set.indicator_apply] norm_num] exact Measurable.ite (hS.preimage (by rw [measurable_comap_iff]; fun_prop)) measurable_const measurable_const have hminus : Measurable (fun p : Fin J × ℝ => ((fun y : ℝ => ClampObs.mk p.1 p.2 (y + 1 / 2)) ⁻¹' S).indicator (1 : ℝ → ℝ≥0∞) (-1 / 2)) := by rw [show (fun p : Fin J × ℝ => ((fun y : ℝ => ClampObs.mk p.1 p.2 (y + 1 / 2)) ⁻¹' S).indicator (1 : ℝ → ℝ≥0∞) (-1 / 2)) = fun p => if ClampObs.mk p.1 p.2 0 ∈ S then 1 else 0 by funext p simp [Set.indicator_apply] norm_num] exact Measurable.ite (hS.preimage (by rw [measurable_comap_iff]; fun_prop)) measurable_const measurable_const exact ((ENNReal.measurable_ofReal.comp (measurable_const.add (hg.div_const _) |>.div_const _)).mul hplus).add ((ENNReal.measurable_ofReal.comp (measurable_const.sub (hg.div_const _) |>.div_const _)).mul (by simpa only [neg_div] using hminus))
CausalSmith.Stat.LmtpThresholdAtomFrontier.measurable_minimaxOutcomeKernel · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:43
def minimaxDataMeasure

Joint observation law induced by the canonical design and centered mean g.

Definition (Lean source)
J :
kappa :
g :
Fin J × ℝ → ℝ
minimaxDataMeasure J kappa g :
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:82
def minimaxClampLaw

Canonical law package associated with a centered Bernoulli regression.

Definition (Lean source)
J :
kappa :
g :
Fin J × ℝ → ℝ
minimaxClampLaw J kappa g :
clause 1
dataMeasure := minimaxDataMeasure J kappa g
clause 2
px := fun _ => 1 / (J : ℝ)
clause 3
pi := fun _ a => (kappa + 1) * a ^ kappa
clause 4
mu := fun x a => 1 / 2 + g (x, a)
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxClampLaw · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:87
theorem minimaxOutcomeKernel_isProbabilityMeasure

minimax outcome kernel is a probability measure for the specified J input, the specified g input, the specified hg input, the specified p input.

Formal statement
J :
Fin J × ℝ → ℝ
hg :
∀ p, |g p| ≤ 1 / 2
p :
Fin J × ℝ
Proof (Lean source)
lemma minimaxOutcomeKernel_isProbabilityMeasure {J : ℕ} {g : Fin J × ℝ → ℝ} (hg : ∀ p, |g p| ≤ 1 / 2) (p : Fin J × ℝ) : IsProbabilityMeasure (minimaxOutcomeKernel g p) := by letI : IsProbabilityMeasure (twoPointMean (1 / 2) (g p)) := twoPointMean_isProbabilityMeasure (by norm_num) (hg p) exact Measure.isProbabilityMeasure_map (measurable_clampObs_mk p).aemeasurable
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxOutcomeKernel_isProbabilityMeasure · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:95
theorem minimaxDataMeasure_isProbabilityMeasure

minimax data measure is a probability measure for the specified J input, the specified kappa input, the specified hJ input, the specified hkappa input, the specified g input, the specified hgmeas input, the specified hg input.

Formal statement
J :
kappa :
hJ :
0 < J
hkappa :
0 ≤ kappa
g :
Fin J × ℝ → ℝ
hgmeas :
hg :
∀ p, |g p| ≤ 1 / 2
Proof (Lean source)
lemma minimaxDataMeasure_isProbabilityMeasure (J : ℕ) (kappa : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (g : Fin J × ℝ → ℝ) (hgmeas : Measurable g) (hg : ∀ p, |g p| ≤ 1 / 2) : IsProbabilityMeasure (minimaxDataMeasure J kappa g) := by letI : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := minimaxDesignMeasure_isProbabilityMeasure J kappa hJ hkappa exact isProbabilityMeasure_bind (measurable_minimaxOutcomeKernel g hgmeas).aemeasurable (Filter.Eventually.of_forall (minimaxOutcomeKernel_isProbabilityMeasure hg))
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure_isProbabilityMeasure · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:104
theorem minimaxOutcomeKernel_map_design

the stated minimax outcome kernel map design property holds for the specified J input, the specified g input, the specified hg input, the specified p input.

Formal statement
J :
Fin J × ℝ → ℝ
hg :
∀ p, |g p| ≤ 1 / 2
p :
Fin J × ℝ
(minimaxOutcomeKernel g p).map (fun o => (o.X, o.A)) = Measure.dirac p
Proof (Lean source)
lemma minimaxOutcomeKernel_map_design {J : ℕ} {g : Fin J × ℝ → ℝ} (hg : ∀ p, |g p| ≤ 1 / 2) (p : Fin J × ℝ) : (minimaxOutcomeKernel g p).map (fun o => (o.X, o.A)) = Measure.dirac p := by letI : IsProbabilityMeasure (twoPointMean (1 / 2) (g p)) := twoPointMean_isProbabilityMeasure (by norm_num) (hg p) unfold minimaxOutcomeKernel rw [Measure.map_map measurable_clampObs_design (measurable_clampObs_mk p)] have hcomp : ((fun o : ClampObs J => (o.X, o.A)) ∘ fun y : ℝ => ClampObs.mk p.1 p.2 (y + 1 / 2)) = fun _ : ℝ => p := by funext y rfl rw [hcomp] rw [Measure.map_const _ p, measure_univ, one_smul]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxOutcomeKernel_map_design · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:124
theorem minimaxDataMeasure_map_design

the stated minimax data measure map design property holds for the specified J input, the specified kappa input, the specified g input, the specified hgmeas input, the specified hg input.

Formal statement
J :
kappa :
g :
Fin J × ℝ → ℝ
hgmeas :
hg :
∀ p, |g p| ≤ 1 / 2
(minimaxDataMeasure J kappa g).map (fun o => (o.X, o.A)) = minimaxDesignMeasure J kappa
Proof (Lean source)
lemma minimaxDataMeasure_map_design (J : ℕ) (kappa : ℝ) (g : Fin J × ℝ → ℝ) (hgmeas : Measurable g) (hg : ∀ p, |g p| ≤ 1 / 2) : (minimaxDataMeasure J kappa g).map (fun o => (o.X, o.A)) = minimaxDesignMeasure J kappa := by ext S hS rw [Measure.map_apply measurable_clampObs_design hS] unfold minimaxDataMeasure rw [Measure.bind_apply (hS.preimage measurable_clampObs_design) (measurable_minimaxOutcomeKernel g hgmeas).aemeasurable] have hfiber (p : Fin J × ℝ) : (minimaxOutcomeKernel g p) ((fun o : ClampObs J => (o.X, o.A)) ⁻¹' S) = S.indicator (fun _ => (1 : ℝ≥0∞)) p := by rw [← Measure.map_apply measurable_clampObs_design hS, minimaxOutcomeKernel_map_design hg p] by_cases hp : p ∈ S <;> simp [Measure.dirac_apply, indicator, hp] simp_rw [hfiber] rw [lintegral_indicator hS] simp [Pi.one_apply]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure_map_design · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:140
theorem minimaxDataMeasure_map_X

the stated minimax data measure map x property holds for the specified J input, the specified kappa input, the specified hJ input, the specified hkappa input, the specified g input, the specified hgmeas input, the specified hg input.

Formal statement
J :
kappa :
hJ :
0 < J
hkappa :
0 ≤ kappa
g :
Fin J × ℝ → ℝ
hgmeas :
hg :
∀ p, |g p| ≤ 1 / 2
(minimaxDataMeasure J kappa g).map (fun o => o.X) = minimaxStratumMeasure J
Proof (Lean source)
lemma minimaxDataMeasure_map_X (J : ℕ) (kappa : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (g : Fin J × ℝ → ℝ) (hgmeas : Measurable g) (hg : ∀ p, |g p| ≤ 1 / 2) : (minimaxDataMeasure J kappa g).map (fun o => o.X) = minimaxStratumMeasure J := by letI : IsProbabilityMeasure (minimaxTreatmentMeasure kappa) := minimaxTreatmentMeasure_isProbabilityMeasure kappa hkappa calc (minimaxDataMeasure J kappa g).map (fun o => o.X) = ((minimaxDataMeasure J kappa g).map (fun o => (o.X, o.A))).map fst := by rw [Measure.map_map measurable_fst measurable_clampObs_design] rfl _ = (minimaxDesignMeasure J kappa).map fst := by rw [minimaxDataMeasure_map_design J kappa g hgmeas hg] _ = minimaxStratumMeasure J := by rw [minimaxDesignMeasure, Measure.map_fst_prod, measure_univ, one_smul]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure_map_X · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:161
theorem minimaxTreatmentMeasure_ae_mem_Icc

minimax treatment measure almost everywhere lies in the stated closed interval for the specified kappa input.

Formal statement
kappa :
∀ᵐ a ∂minimaxTreatmentMeasure kappa, a ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma minimaxTreatmentMeasure_ae_mem_Icc (kappa : ℝ) : ∀ᵐ a ∂minimaxTreatmentMeasure kappa, a ∈ Icc (0 : ℝ) 1 := by rw [ae_iff] unfold minimaxTreatmentMeasure change ((volume.restrict (Icc (0 : ℝ) 1)).withDensity (fun a => ofReal ((kappa + 1) * a ^ kappa))) (Icc (0 : ℝ) 1)ᶜ = 0 rw [withDensity_apply _ measurableSet_Icc.compl] apply setLIntegral_measure_zero rw [Measure.restrict_apply measurableSet_Icc.compl] simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxTreatmentMeasure_ae_mem_Icc · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:179
theorem minimaxDataMeasure_ae_treatment

the stated minimax data measure almost everywhere treatment property holds for the specified J input, the specified kappa input, the specified g input, the specified hgmeas input, the specified hg input.

Formal statement
J :
kappa :
g :
Fin J × ℝ → ℝ
hgmeas :
hg :
∀ p, |g p| ≤ 1 / 2
∀ᵐ o ∂minimaxDataMeasure J kappa g, o.A ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma minimaxDataMeasure_ae_treatment (J : ℕ) (kappa : ℝ) (g : Fin J × ℝ → ℝ) (hgmeas : Measurable g) (hg : ∀ p, |g p| ≤ 1 / 2) : ∀ᵐ o ∂minimaxDataMeasure J kappa g, o.A ∈ Icc (0 : ℝ) 1 := by letI : SFinite (minimaxTreatmentMeasure kappa) := by unfold minimaxTreatmentMeasure infer_instance have hs : MeasurableSet {p : Fin J × ℝ | p.2 ∈ Icc (0 : ℝ) 1} := measurableSet_Icc.preimage measurable_snd rw [← ae_map_iff measurable_clampObs_design.aemeasurable hs, minimaxDataMeasure_map_design J kappa g hgmeas hg] rw [ae_iff] have hset : {p : Fin J × ℝ | ¬p.2 ∈ Icc (0 : ℝ) 1} = (Set.univ : Set (Fin J)) ×ˢ (Icc (0 : ℝ) 1)ᶜ := by ext p; simp rw [hset, minimaxDesignMeasure, Measure.prod_prod] rw [show minimaxTreatmentMeasure kappa (Icc (0 : ℝ) 1)ᶜ = 0 by exact ae_iff.mp (minimaxTreatmentMeasure_ae_mem_Icc kappa)] simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure_ae_treatment · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:192
theorem minimaxOutcomeKernel_ae_support

the stated minimax outcome kernel almost everywhere support property holds for the specified J input, the specified g input, the specified p input.

Formal statement
J :
g :
Fin J × ℝ → ℝ
p :
Fin J × ℝ
∀ᵐ o ∂minimaxOutcomeKernel g p, o.X = p.1 ∧ o.A = p.2 ∧ (o.Y = 0 ∨ o.Y = 1)
Proof (Lean source)
lemma minimaxOutcomeKernel_ae_support {J : ℕ} (g : Fin J × ℝ → ℝ) (p : Fin J × ℝ) : ∀ᵐ o ∂minimaxOutcomeKernel g p, o.X = p.1 ∧ o.A = p.2 ∧ (o.Y = 0 ∨ o.Y = 1) := by unfold minimaxOutcomeKernel have hs : MeasurableSet {o : ClampObs J | o.X = p.1 ∧ o.A = p.2 ∧ (o.Y = 0 ∨ o.Y = 1)} := by have hd : MeasurableSet {o : ClampObs J | (o.X, o.A) = p} := (measurableSet_singleton p).preimage measurable_clampObs_design have hy : MeasurableSet {o : ClampObs J | o.Y = 0 ∨ o.Y = 1} := ((measurableSet_singleton (0 : ℝ)).preimage measurable_clampObs_Y).union ((measurableSet_singleton (1 : ℝ)).preimage measurable_clampObs_Y) convert hd.inter hy using 1 <;> ext o <;> simp [Prod.ext_iff, and_assoc] rw [ae_map_iff (measurable_clampObs_mk p).aemeasurable hs] rw [ae_iff] unfold twoPointMean rw [Measure.add_apply, Measure.smul_apply, Measure.smul_apply] simp norm_num
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxOutcomeKernel_ae_support · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:212
theorem minimaxDataMeasure_ae_bernoulli

the stated minimax data measure almost everywhere bernoulli property holds for the specified J input, the specified kappa input, the specified g input, the specified hgmeas input.

Formal statement
J :
kappa :
g :
Fin J × ℝ → ℝ
hgmeas :
∀ᵐ o ∂minimaxDataMeasure J kappa g, o.Y = 0 ∨ o.Y = 1
Proof (Lean source)
lemma minimaxDataMeasure_ae_bernoulli (J : ℕ) (kappa : ℝ) (g : Fin J × ℝ → ℝ) (hgmeas : Measurable g) : ∀ᵐ o ∂minimaxDataMeasure J kappa g, o.Y = 0 ∨ o.Y = 1 := by rw [ae_iff] unfold minimaxDataMeasure have hbad : MeasurableSet {o : ClampObs J | ¬(o.Y = 0 ∨ o.Y = 1)} := by exact (((measurableSet_singleton (0 : ℝ)).preimage measurable_clampObs_Y).union ((measurableSet_singleton (1 : ℝ)).preimage measurable_clampObs_Y)).compl rw [Measure.bind_apply hbad (measurable_minimaxOutcomeKernel g hgmeas).aemeasurable] apply lintegral_eq_zero_of_ae_eq_zero filter_upwards [] with p exact ae_iff.mp ((minimaxOutcomeKernel_ae_support g p).mono (fun o ho => ho.2.2))
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure_ae_bernoulli · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxLaw.lean:233
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.MinimaxMembership 3 declarations Model membership of canonical Bernoulli witnesses

Model membership of canonical Bernoulli witnesses

theorem minimaxClampModel_of_taylor

the stated minimax clamp model of taylor property holds for the specified J input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified hJ input, the specified hbeta input, the specified hkappa input, the specified hcminus input, the specified hcplus input, the specified hpmin input, the specified q input, the specified hqmeas input, the specified hqbound input, the specified hcont input, the specified hrange input, the specified htaylor input.

Formal statement
J :
beta kappa L cminus cplus pmin :
hJ :
0 < J
hbeta :
0 < beta
hkappa :
0 ≤ kappa
hcminus :
cminus ≤ kappa + 1
hcplus :
kappa + 1 ≤ cplus
hpmin :
pmin ≤ 1 / (J : ℝ)
q :
ℝ → ℝ
hqmeas :
hqbound :
∀ a, |q a| ≤ 1 / 2
hcont :
ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) 1)
hrange :
∀ a ∈ Icc (0 : ℝ) 1, 1 / 2 + q a ∈ Icc (0 : ℝ) 1
htaylor :
∀ s ∈ Icc (0 : ℝ) 1,
∀ t ∈ Icc (0 : ℝ) 1,
|(1 / 2 + q t)
- ∑ j ∈ range (ellOf beta + 1), iteratedDerivWithin j (fun a => 1 / 2 + q a) (Icc (0 : ℝ) 1) s * (t - s) ^ j / (Nat.factorial j : ℝ)|
≤ L * |t - s| ^ beta
ClampModel (minimaxClampLaw J kappa (fun p => q p.2)) beta kappa L cminus cplus pmin
Proof (Lean source)
lemma minimaxClampModel_of_taylor (J : ℕ) (beta kappa L cminus cplus pmin : ℝ) (hJ : 0 < J) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (hcminus : cminus ≤ kappa + 1) (hcplus : kappa + 1 ≤ cplus) (hpmin : pmin ≤ 1 / (J : ℝ)) (q : ℝ → ℝ) (hqmeas : Measurable q) (hqbound : ∀ a, |q a| ≤ 1 / 2) (hcont : ContinuousOn (fun a => 1 / 2 + q a) (Icc (0 : ℝ) 1)) (hrange : ∀ a ∈ Icc (0 : ℝ) 1, 1 / 2 + q a ∈ Icc (0 : ℝ) 1) (htaylor : ∀ s ∈ Icc (0 : ℝ) 1, ∀ t ∈ Icc (0 : ℝ) 1, |(1 / 2 + q t) - ∑ j ∈ range (ellOf beta + 1), iteratedDerivWithin j (fun a => 1 / 2 + q a) (Icc (0 : ℝ) 1) s * (t - s) ^ j / (Nat.factorial j : ℝ)| ≤ L * |t - s| ^ beta) : ClampModel (minimaxClampLaw J kappa (fun p => q p.2)) beta kappa L cminus cplus pmin := by let g : Fin J × ℝ → ℝ := fun p => q p.2 have hgmeas : Measurable g := hqmeas.comp measurable_snd have hgbound : ∀ p, |g p| ≤ 1 / 2 := fun p => hqbound p.2 have hprob := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa g hgmeas hgbound refine ⟨hprob, minimaxDataMeasure_ae_treatment J kappa g hgmeas hgbound, (minimaxDataMeasure_ae_bernoulli J kappa g hgmeas).mono (fun o ho => by rcases ho with ho | ho <;> simp [ho]), ?_, ?_, ?_, ?_⟩ · refine ⟨?_, ?_, ?_⟩ · intro x fun_prop · intro x filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha exact mul_nonneg (by linarith) (Real.rpow_nonneg ha.1 _) · intro x constructor · change 1 / (J : ℝ) = _ change 1 / (J : ℝ) = (Measure.map (fun o : ClampObs J => o.X) (minimaxDataMeasure J kappa g)).real {x} rw [minimaxDataMeasure_map_X J kappa hJ hkappa g hgmeas hgbound] exact (minimaxStratumMeasure_real_singleton J hJ x).symm · intro B hB hsub have hevent : {o : ClampObs J | o.X = x ∧ o.A ∈ B} = (fun o => (o.X, o.A)) ⁻¹' ({x} ×ˢ B) := by ext o; simp rw [hevent] have hrect : MeasurableSet (({x} : Set (Fin J)) ×ˢ B) := (measurableSet_singleton x).prod hB change (minimaxDataMeasure J kappa g).real {o : ClampObs J | o.X = x ∧ o.A ∈ B} = _ rw [hevent, measureReal_def, ← Measure.map_apply measurable_obs_design hrect, minimaxDataMeasure_map_design J kappa g hgmeas hgbound] change (minimaxDesignMeasure J kappa).real ({x} ×ˢ B) = _ rw [minimaxDesignMeasure_real_rectangle J kappa hJ hkappa x B hB hsub] rfl · intro x constructor · change 1 / (J : ℝ) = _ change 1 / (J : ℝ) = (Measure.map (fun o : ClampObs J => o.X) (minimaxDataMeasure J kappa g)).real {x} rw [minimaxDataMeasure_map_X J kappa hJ hkappa g hgmeas hgbound] exact (minimaxStratumMeasure_real_singleton J hJ x).symm · exact hpmin · intro x filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha constructor · exact mul_le_mul_of_nonneg_right hcminus (Real.rpow_nonneg ha.1 _) · exact mul_le_mul_of_nonneg_right hcplus (Real.rpow_nonneg ha.1 _) · intro x refine ⟨hcont, hrange, ?_, htaylor⟩ let μ := minimaxDataMeasure J kappa g let design : ClampObs J → Fin J × ℝ := fun o => (o.X, o.A) let m : ClampObs J → ℝ := fun o => 1 / 2 + q o.A letI : IsProbabilityMeasure μ := hprob have hdesign : Measurable design := measurable_obs_design have hY : Integrable (fun o : ClampObs J => o.Y) μ := by refine Integrable.of_bound (measurable_snd.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))).aestronglyMeasurable 1 ?_ filter_upwards [minimaxDataMeasure_ae_bernoulli J kappa g hgmeas] with o ho rcases ho with ho | ho <;> rw [ho] <;> norm_num have hm_meas : Measurable m := by dsimp [m] exact measurable_const.add (hqmeas.comp (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) have hm : Integrable m μ := by refine Integrable.of_bound hm_meas.aestronglyMeasurable 1 ?_ filter_upwards with o rw [Real.norm_eq_abs] change |1 / 2 + q o.A| ≤ 1 have hb := hqbound o.A rw [abs_le] at hb exact abs_le.2 ⟨by linarith [hb.1], by linarith [hb.2]⟩ have hm_design : AEStronglyMeasurable[comap design inferInstance] m μ := by have hfactor : m = (fun p : Fin J × ℝ => 1 / 2 + q p.2) ∘ design := rfl rw [hfactor] exact ((measurable_const.add (hqmeas.comp measurable_snd)).comp (Measurable.of_comap_le le_rfl)).aestronglyMeasurable have hintegral : ∀ T : Set (Fin J × ℝ), MeasurableSet T → (∫ o in design ⁻¹' T, o.Y ∂μ) = ∫ o in design ⁻¹' T, m o ∂μ := by intro T hT rw [minimaxDataMeasure_integral_Y_design J kappa hJ hkappa g hgmeas hgbound T hT] rw [← integral_indicator (hT.preimage hdesign), ← integral_indicator hT] have hmap := minimaxDataMeasure_map_design J kappa g hgmeas hgbound rw [← hmap, integral_map hdesign.aemeasurable] · rfl · exact ((measurable_const.add hgmeas).indicator hT).aestronglyMeasurable exact condExp_eq_of_integral_preimage_eq μ design hdesign (fun o => o.Y) m hY hm hm_design hintegral
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxClampModel_of_taylor · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxMembership.lean:27
theorem minimaxCenter_mem_model

The unperturbed one-half Bernoulli regression is a member of every admissible clamp model and supplies model-class nonemptiness. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
ClampModel (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0)) beta kappa L cminus cplus pmin
Proof (Lean source)
lemma minimaxCenter_mem_model (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ClampModel (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0)) beta kappa L cminus cplus pmin := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ apply minimaxClampModel_of_taylor J beta kappa L cminus cplus pmin hJ hbeta hkappa hcminus_le hcplus hpmin_le (fun _ => 0) · exact measurable_const · intro a norm_num · fun_prop · intro a ha norm_num · intro s hs t ht simp_rw [iteratedDerivWithin_const] rw [Finset.sum_eq_single 0] · simp exact mul_nonneg hL.le (Real.rpow_nonneg (abs_nonneg _) _) · intro b hb hb0 simp [hb0] · simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxCenter_mem_model · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxMembership.lean:134
theorem minimaxConstant_mem_model

the stated minimax constant membership model property holds for the specified J input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified deltaBar input, the specified alpha input, the specified eps input, the specified hreg input, the specified heps input.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha eps :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
heps :
|eps| ≤ 1 / 2
ClampModel (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps)) beta kappa L cminus cplus pmin
Proof (Lean source)
lemma minimaxConstant_mem_model (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha eps : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (heps : |eps| ≤ 1 / 2) : ClampModel (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps)) beta kappa L cminus cplus pmin := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ apply minimaxClampModel_of_taylor J beta kappa L cminus cplus pmin hJ hbeta hkappa hcminus_le hcplus hpmin_le (fun _ => eps) · exact measurable_const · intro a exact heps · fun_prop · intro a ha rw [abs_le] at heps constructor <;> linarith · intro s hs t ht simp_rw [iteratedDerivWithin_const] rw [Finset.sum_eq_single 0] · simp exact mul_nonneg hL.le (Real.rpow_nonneg (abs_nonneg _) _) · intro b hb hb0 simp [hb0] · simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxConstant_mem_model · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxMembership.lean:162
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.MinimaxRegression 1 declarations Regression identities for the canonical Bernoulli witnesses

Regression identities for the canonical Bernoulli witnesses

theorem minimaxDataMeasure_integral_Y_design

Integrating the outcome over a design event integrates the advertised Bernoulli mean over the common design law. The result uses the hJ condition, the hkappa condition, the hgmeas condition, the hg condition, the hT condition. This is the stated conclusion.

Formal statement
J :
kappa :
hJ :
0 < J
hkappa :
0 ≤ kappa
g :
Fin J × ℝ → ℝ
hgmeas :
hg :
∀ p, |g p| ≤ 1 / 2
T :
Set (Fin J × ℝ)
hT :
(∫ o in (fun o : ClampObs J => (o.X, o.A)) ⁻¹' T, o.Y ∂minimaxDataMeasure J kappa g)
= ∫ p in T, (1 / 2 + g p) ∂minimaxDesignMeasure J kappa
Proof (Lean source)
lemma minimaxDataMeasure_integral_Y_design (J : ℕ) (kappa : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (g : Fin J × ℝ → ℝ) (hgmeas : Measurable g) (hg : ∀ p, |g p| ≤ 1 / 2) (T : Set (Fin J × ℝ)) (hT : MeasurableSet T) : (∫ o in (fun o : ClampObs J => (o.X, o.A)) ⁻¹' T, o.Y ∂minimaxDataMeasure J kappa g) = ∫ p in T, (1 / 2 + g p) ∂minimaxDesignMeasure J kappa := by classical let P := minimaxDataMeasure J kappa g let D := minimaxDesignMeasure J kappa let E : Set (ClampObs J) := (fun o => (o.X, o.A)) ⁻¹' T let F : ClampObs J → ℝ := E.indicator (fun o => o.Y) haveI : IsProbabilityMeasure P := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa g hgmeas hg have hFmeas : Measurable F := measurable_obs_Y.indicator (hT.preimage measurable_obs_design) have hFint : Integrable F P := by refine integrable_of_measurable_ae_bound hFmeas 1 ?_ filter_upwards [minimaxDataMeasure_ae_bernoulli J kappa g hgmeas] with o ho rcases ho with ho | ho <;> by_cases hmem : o ∈ E <;> simp [F, indicator, hmem, ho] have hbind := integral_bind_map (m := D) (κ := fun p => twoPointMean (1 / 2) (g p)) (g := fun p y => ClampObs.mk p.1 p.2 (y + 1 / 2)) (f := F) (fun p => measurable_obs_mk p) (measurable_minimaxOutcomeKernel g hgmeas) (by change Integrable F (minimaxDataMeasure J kappa g) exact hFint) have hfiber (p : Fin J × ℝ) : (∫ y, F (ClampObs.mk p.1 p.2 (y + 1 / 2)) ∂Causalean.Mathlib.Probability.twoPointMean (1 / 2) (g p)) = T.indicator (fun p => 1 / 2 + g p) p := by by_cases hp : p ∈ T · rw [Set.indicator_of_mem hp] have hFE : ∀ y : ℝ, F (ClampObs.mk p.1 p.2 (y + 1 / 2)) = y + 1 / 2 := by intro y simp [F, E, indicator, hp] simp_rw [hFE] rw [twoPointMean_integral (by norm_num) (hg p)] ring · simp only [indicator, hp, if_false] have hzero : ∀ y : ℝ, F (ClampObs.mk p.1 p.2 (y + 1 / 2)) = 0 := by intro y simp [F, E, indicator, hp] simp_rw [hzero] simp rw [show (∫ o in E, o.Y ∂P) = ∫ o, F o ∂P by rw [integral_indicator (hT.preimage measurable_obs_design)]] change (∫ o, F o ∂P) = _ rw [show (∫ o, F o ∂P) = ∫ p, ∫ y, F (ClampObs.mk p.1 p.2 (y + 1 / 2)) ∂Causalean.Mathlib.Probability.twoPointMean (1 / 2) (g p) ∂D by change (∫ o, F o ∂(minimaxDesignMeasure J kappa).bind (fun p => (twoPointMean (1 / 2) (g p)).map (fun y => ClampObs.mk p.1 p.2 (y + 1 / 2)))) = _ exact hbind] rw [← integral_indicator hT] apply integral_congr_ae filter_upwards with p rw [hfiber]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDataMeasure_integral_Y_design · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxRegression.lean:40
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.MinimaxWitness 9 declarations The witness design uses uniform finite strata and the normalized polynomial density (κ + 1) a^κ on [0,1].

Canonical design for the clamp minimax witnesses

The witness design uses uniform finite strata and the normalized polynomial density (κ + 1) a^κ on [0,1]. Outcome tilts are added in later lemmas.

def minimaxStratumMeasure

Uniform probability law on the finite stratum space.

Definition (Lean source)
J :
minimaxStratumMeasure J :
ProbabilityTheory.uniformOn univ
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxStratumMeasure · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxWitness.lean:26
def minimaxTreatmentMeasure

The normalized polynomial treatment law on [0,1].

Definition (Lean source)
kappa :
minimaxTreatmentMeasure kappa :
(volume.restrict (Icc (0 : ℝ) 1)).withDensity (fun a => ofReal ((kappa + 1) * a ^ kappa))
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxTreatmentMeasure · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxWitness.lean:30
theorem minimaxTreatmentDensity_integral

the stated minimax treatment density integral property holds for the specified kappa input, the specified hkappa input.

Formal statement
kappa :
hkappa :
0 ≤ kappa
(∫ a in Icc (0 : ℝ) 1, (kappa + 1) * a ^ kappa) = 1
Proof (Lean source)
lemma minimaxTreatmentDensity_integral (kappa : ℝ) (hkappa : 0 ≤ kappa) : (∫ a in Icc (0 : ℝ) 1, (kappa + 1) * a ^ kappa) = 1 := by rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by norm_num), intervalIntegral.integral_const_mul, integral_rpow (inl (by linarith : -1 < kappa))] rw [Real.one_rpow, Real.zero_rpow (by linarith : kappa + 1 ≠ 0)] field_simp norm_num
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxTreatmentDensity_integral · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxWitness.lean:35
theorem minimaxTreatmentMeasure_isProbabilityMeasure

minimax treatment measure is a probability measure for the specified kappa input, the specified hkappa input.

Formal statement
kappa :
hkappa :
0 ≤ kappa
Proof (Lean source)
lemma minimaxTreatmentMeasure_isProbabilityMeasure (kappa : ℝ) (hkappa : 0 ≤ kappa) : IsProbabilityMeasure (minimaxTreatmentMeasure kappa) := by rw [isProbabilityMeasure_iff] rw [minimaxTreatmentMeasure, withDensity_apply _ MeasurableSet.univ, Measure.restrict_univ] have hfint : Integrable (fun a : ℝ => (kappa + 1) * a ^ kappa) (volume.restrict (Icc (0 : ℝ) 1)) := by change IntegrableOn (fun a : ℝ => (kappa + 1) * a ^ kappa) (Icc (0 : ℝ) 1) volume rw [← intervalIntegrable_iff_integrableOn_Icc_of_le (by norm_num)] exact (intervalIntegral.intervalIntegrable_rpow (inl hkappa)).const_mul (kappa + 1) have hfnn : 0 ≤ᵐ[volume.restrict (Icc (0 : ℝ) 1)] (fun a : ℝ => (kappa + 1) * a ^ kappa) := by filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha exact mul_nonneg (by linarith) (Real.rpow_nonneg ha.1 _) rw [← ofReal_integral_eq_lintegral_ofReal hfint hfnn, minimaxTreatmentDensity_integral kappa hkappa] simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxTreatmentMeasure_isProbabilityMeasure · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxWitness.lean:44
def minimaxDesignMeasure

The common (X,A) law of every minimax witness.

Definition (Lean source)
J :
kappa :
minimaxDesignMeasure J kappa :
Measure (Fin J × ℝ)
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDesignMeasure · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxWitness.lean:64
theorem minimaxDesignMeasure_isProbabilityMeasure

minimax design measure is a probability measure for the specified J input, the specified kappa input, the specified hJ input, the specified hkappa input.

Formal statement
J :
kappa :
hJ :
0 < J
hkappa :
0 ≤ kappa
Proof (Lean source)
lemma minimaxDesignMeasure_isProbabilityMeasure (J : ℕ) (kappa : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := by letI : Nonempty (Fin J) := Fin.pos_iff_nonempty.mp hJ letI : IsProbabilityMeasure (minimaxTreatmentMeasure kappa) := minimaxTreatmentMeasure_isProbabilityMeasure kappa hkappa unfold minimaxDesignMeasure minimaxStratumMeasure infer_instance
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDesignMeasure_isProbabilityMeasure · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxWitness.lean:68
theorem minimaxStratumMeasure_real_singleton

the stated minimax stratum measure real singleton property holds for the specified J input, the specified hJ input, the specified x input.

Formal statement
J :
hJ :
0 < J
x :
Fin J
(minimaxStratumMeasure J).real {x} = 1 / (J : ℝ)
Proof (Lean source)
lemma minimaxStratumMeasure_real_singleton (J : ℕ) (hJ : 0 < J) (x : Fin J) : (minimaxStratumMeasure J).real {x} = 1 / (J : ℝ) := by classical rw [measureReal_def, minimaxStratumMeasure, ProbabilityTheory.uniformOn_univ] simp [measureReal_def, ENNReal.toReal_div, hJ.ne']
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxStratumMeasure_real_singleton · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxWitness.lean:78
theorem minimaxTreatmentMeasure_real

the stated minimax treatment measure real property holds for the specified kappa input, the specified hkappa input, the specified B input, the specified hB input, the specified hsub input.

Formal statement
kappa :
hkappa :
0 ≤ kappa
B :
Set
hB :
hsub :
B ⊆ Icc (0 : ℝ) 1
(minimaxTreatmentMeasure kappa).real B = ∫ a in B, (kappa + 1) * a ^ kappa
Proof (Lean source)
lemma minimaxTreatmentMeasure_real (kappa : ℝ) (hkappa : 0 ≤ kappa) (B : Set ℝ) (hB : MeasurableSet B) (hsub : B ⊆ Icc (0 : ℝ) 1) : (minimaxTreatmentMeasure kappa).real B = ∫ a in B, (kappa + 1) * a ^ kappa := by let f : ℝ → ℝ := fun a => (kappa + 1) * a ^ kappa have hfint : Integrable f (volume.restrict (Icc (0 : ℝ) 1)) := by change IntegrableOn f (Icc (0 : ℝ) 1) volume rw [← intervalIntegrable_iff_integrableOn_Icc_of_le (by norm_num)] exact (intervalIntegral.intervalIntegrable_rpow (inl hkappa)).const_mul (kappa + 1) have hfB : Integrable f (volume.restrict B) := by exact hfint.mono_measure (Measure.restrict_mono hsub le_rfl) have hfnn : 0 ≤ᵐ[volume.restrict B] f := by filter_upwards [ae_restrict_mem hB] with a ha exact mul_nonneg (by linarith) (Real.rpow_nonneg (hsub ha).1 _) have hrestrict : (volume.restrict (Icc (0 : ℝ) 1)).restrict B = volume.restrict B := by rw [Measure.restrict_restrict hB] congr 1 exact Set.inter_eq_left.mpr hsub rw [measureReal_def, minimaxTreatmentMeasure, withDensity_apply _ hB] have he := ofReal_integral_eq_lintegral_ofReal hfB hfnn change (∫⁻ a, ofReal ((kappa + 1) * a ^ kappa) ∂(volume.restrict (Icc (0 : ℝ) 1)).restrict B).toReal = _ rw [hrestrict] rw [← he] rw [ENNReal.toReal_ofReal (integral_nonneg_of_ae hfnn)]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxTreatmentMeasure_real · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxWitness.lean:85
theorem minimaxDesignMeasure_real_rectangle

the stated minimax design measure real rectangle property holds for the specified J input, the specified kappa input, the specified hJ input, the specified hkappa input, the specified x input, the specified B input, the specified hB input, the specified hsub input.

Formal statement
J :
kappa :
hJ :
0 < J
hkappa :
0 ≤ kappa
x :
Fin J
B :
Set
hB :
hsub :
B ⊆ Icc (0 : ℝ) 1
(minimaxDesignMeasure J kappa).real ({x} ×ˢ B)
= (1 / (J : ℝ)) * ∫ a in B, (kappa + 1) * a ^ kappa
Proof (Lean source)
lemma minimaxDesignMeasure_real_rectangle (J : ℕ) (kappa : ℝ) (hJ : 0 < J) (hkappa : 0 ≤ kappa) (x : Fin J) (B : Set ℝ) (hB : MeasurableSet B) (hsub : B ⊆ Icc (0 : ℝ) 1) : (minimaxDesignMeasure J kappa).real ({x} ×ˢ B) = (1 / (J : ℝ)) * ∫ a in B, (kappa + 1) * a ^ kappa := by letI : Nonempty (Fin J) := Fin.pos_iff_nonempty.mp hJ letI : IsProbabilityMeasure (minimaxTreatmentMeasure kappa) := minimaxTreatmentMeasure_isProbabilityMeasure kappa hkappa rw [minimaxDesignMeasure, measureReal_prod_prod, minimaxStratumMeasure_real_singleton J hJ x, minimaxTreatmentMeasure_real kappa hkappa B hB hsub]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxDesignMeasure_real_rectangle · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/MinimaxWitness.lean:113
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.PhaseRates 28 declarations The statement spells out every limiting regime and retains the almost-sure zero-threshold reduction to the ordinary bounded-mean estimator.

Four-regime threshold phase diagram

The statement spells out every limiting regime and retains the almost-sure zero-threshold reduction to the ordinary bounded-mean estimator.

theorem treatment_strictly_positive_ae

Under the conditional-density model, the continuous treatment is strictly positive almost surely; the boundary singleton has no mass in any stratum. The result uses the hmodel condition. This is the stated conclusion.

Formal statement
J :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
∀ᵐ o ∂P.dataMeasure, 0 < o.A
Proof (Lean source)
-- @node: treatment_strictly_positive_ae lemma treatment_strictly_positive_ae (J : ℕ) (P : ClampLaw J) (beta kappa L cminus cplus pmin : ℝ) (hmodel : ClampModel P beta kappa L cminus cplus pmin) : ∀ᵐ o ∂P.dataMeasure, 0 < o.A := by letI := hmodel.probability have hstratum_zero : ∀ x : Fin J, P.dataMeasure {o : ClampObs J | o.X = x ∧ o.A ∈ ({0} : Set ℝ)} = 0 := by intro x have hreal := (hmodel.condDensity.2.2 x).2 ({0} : Set ℝ) (measurableSet_singleton 0) (by intro a ha have : a = 0 := by simpa using ha subst a norm_num) rw [show (∫ a in ({0} : Set ℝ), P.pi x a) = 0 by simp, mul_zero, measureReal_def] at hreal rcases (ENNReal.toReal_eq_zero_iff _).mp hreal with hz | htop · exact hz · exact (measure_ne_top P.dataMeasure _ htop).elim have hA_zero : P.dataMeasure {o : ClampObs J | o.A = 0} = 0 := by rw [show {o : ClampObs J | o.A = 0} = ⋃ x : Fin J, {o : ClampObs J | o.X = x ∧ o.A ∈ ({0} : Set ℝ)} by ext o simp] exact measure_iUnion_null hstratum_zero have hne : ∀ᵐ o ∂P.dataMeasure, o.A ≠ 0 := by rw [ae_iff] simpa only [not_not] using hA_zero filter_upwards [hmodel.treatmentSupport, hne] with o ho hne exact lt_of_le_of_ne ho.1 (Ne.symm hne)
CausalSmith.Stat.LmtpThresholdAtomFrontier.treatment_strictly_positive_ae · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:23
theorem zero_threshold_functional

At threshold zero the observed clamp functional is the ordinary outcome mean, including the boundary point because the treatment law has no atom there. The result uses the hmodel condition. This is the stated conclusion.

Formal statement
J :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
clampFunctional P 0 = ∫ o, o.Y ∂P.dataMeasure
Proof (Lean source)
-- @node: zero_threshold_functional lemma zero_threshold_functional (J : ℕ) (P : ClampLaw J) (beta kappa L cminus cplus pmin : ℝ) (hmodel : ClampModel P beta kappa L cminus cplus pmin) : clampFunctional P 0 = ∫ o, o.Y ∂P.dataMeasure := by have hretained : retainedMean P 0 = ∫ o, o.Y ∂P.dataMeasure := by apply integral_congr_ae filter_upwards [treatment_strictly_positive_ae J P beta kappa L cminus cplus pmin hmodel] with o ho simp [ho] simp [clampFunctional, hretained, atomMass]
CausalSmith.Stat.LmtpThresholdAtomFrontier.zero_threshold_functional · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:58
theorem zero_threshold_totalGramEstimator

At threshold zero every empirical atom term vanishes almost surely, so the total-Gram estimator is exactly the clamped block-zero outcome mean. The result uses the hmodel condition. This is the stated conclusion.

Formal statement
J n :
P :
B :
beta kappa L cminus cplus pmin deltaBar :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
h :
infoBandwidth n 0 beta kappa deltaBar
(fun z : Fin n → ClampObs J => totalGramEstimator B z (ellOf beta) kappa cminus cplus 0 h)
=ᵐ[iidProduct P n] (fun z => clampUnit (blockAverage B.I0 z (fun o => o.Y)))
Proof (Lean source)
-- @node: zero_threshold_totalGramEstimator lemma zero_threshold_totalGramEstimator (J n : ℕ) (P : ClampLaw J) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar : ℝ) (hmodel : ClampModel P beta kappa L cminus cplus pmin) : let h := infoBandwidth n 0 beta kappa deltaBar (fun z : Fin n → ClampObs J => totalGramEstimator B z (ellOf beta) kappa cminus cplus 0 h) =ᵐ[iidProduct P n] (fun z => clampUnit (blockAverage B.I0 z (fun o => o.Y))) := by letI := hmodel.probability have hcoord : ∀ i : Fin n, ∀ᵐ z ∂iidProduct P n, 0 < (z i).A := by intro i have hmap : (iidProduct P n).map (Function.eval i) = P.dataMeasure := by simpa [iidProduct] using (Measure.pi_map_eval (fun _ : Fin n => P.dataMeasure) i) have hpos := treatment_strictly_positive_ae J P beta kappa L cminus cplus pmin hmodel rw [← hmap] at hpos have hAmeas : Measurable (fun o : ClampObs J => o.A) := by have ht : Measurable (fun o : ClampObs J => (o.X, o.A, o.Y)) := by rw [measurable_iff_comap_le] rfl exact (measurable_fst.comp measurable_snd).comp ht exact (ae_map_iff (μ := iidProduct P n) (f := Function.eval i) (p := fun o : ClampObs J => 0 < o.A) (measurable_pi_apply i).aemeasurable (measurableSet_Ioi.preimage hAmeas)).mp hpos have hall : ∀ᵐ z ∂iidProduct P n, ∀ i : Fin n, 0 < (z i).A := ae_all_iff.mpr hcoord dsimp filter_upwards [hall] with z hz have hatom : ∀ x : Fin J, atomEstimate B z x 0 = 0 := by intro x simp [atomEstimate, blockAverage, fun i => not_le_of_gt (hz i)] simp [totalGramEstimator, retainedEstimate, blockAverage, hatom, hz]
CausalSmith.Stat.LmtpThresholdAtomFrontier.zero_threshold_totalGramEstimator · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:73
theorem zero_threshold_atom_and_frontier

At the identity threshold the density-created atom vanishes, and hence the candidate frontier has exactly its root-sample-size summand. The result uses the hkappa condition. This is the stated conclusion.

Formal statement
J n :
P :
beta kappa deltaBar :
hkappa :
0 ≤ kappa
conclusion 1
x :
Fin J
atomMass P x 0 = 0
conclusion 2
clampFrontier n 0 kappa (infoBandwidth n 0 beta kappa deltaBar) beta
= (n : ℝ) ^ (-(1 : ℝ) / 2)
Proof (Lean source)
-- @node: zero_threshold_atom_and_frontier lemma zero_threshold_atom_and_frontier (J n : ℕ) (P : ClampLaw J) (beta kappa deltaBar : ℝ) (hkappa : 0 ≤ kappa) : (∀ x : Fin J, atomMass P x 0 = 0) ∧ clampFrontier n 0 kappa (infoBandwidth n 0 beta kappa deltaBar) beta = (n : ℝ) ^ (-(1 : ℝ) / 2) := by constructor · intro x simp [atomMass] · simp [clampFrontier, Real.zero_rpow (by linarith : kappa + 1 ≠ 0)]
CausalSmith.Stat.LmtpThresholdAtomFrontier.zero_threshold_atom_and_frontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:112
theorem critical_scale_div_edge_scale_tendsto_top

The critical threshold is asymptotically separated above the design-edge scale under the declared exponent restrictions. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
Tendsto (fun n => deltaCrit n beta kappa / deltaEdge n beta kappa) atTop atTop
Proof (Lean source)
-- @node: critical_scale_div_edge_scale_tendsto_top lemma critical_scale_div_edge_scale_tendsto_top (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : Tendsto (fun n => deltaCrit n beta kappa / deltaEdge n beta kappa) atTop atTop := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ let D : ℝ := beta * kappa + 2 * beta + kappa + 1 let E : ℝ := 2 * beta + kappa + 1 have hD : 0 < D := by dsimp [D] nlinarith have hE : 0 < E := by dsimp [E] linarith have hgap : 0 < 1 / E - 1 / (2 * D) := by rw [sub_pos, div_lt_div_iff₀ (by positivity : 0 < (2 : ℝ) * D) hE] dsimp [D, E] nlinarith refine ((tendsto_rpow_atTop hgap).comp (tendsto_natCast_atTop_atTop (R := ℝ))).congr' ?_ filter_upwards [eventually_gt_atTop 0] with n hn have hn' : 0 < (n : ℝ) := by exact_mod_cast hn symm calc deltaCrit n beta kappa / deltaEdge n beta kappa = (n : ℝ) ^ (-1 / (2 * D)) / (n : ℝ) ^ (-1 / E) := by simp [deltaCrit, deltaEdge, D, E] _ = (n : ℝ) ^ ((-1 / (2 * D)) - (-1 / E)) := (Real.rpow_sub hn' _ _).symm _ = (n : ℝ) ^ (1 / E - 1 / (2 * D)) := by congr 1 ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.critical_scale_div_edge_scale_tendsto_top · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:127
theorem edge_atom_scale_isLittleO_root

At the design edge, the largest boundary-band atom term is negligible relative to the root-sample-size scale. The result uses the hbeta condition, the hkappa condition. This is the stated conclusion.

Formal statement
beta kappa :
hbeta :
0 < beta
hkappa :
0 ≤ kappa
Tendsto (fun n => (deltaEdge n beta kappa) ^ (beta + kappa + 1) / (n : ℝ) ^ (-(1 : ℝ) / 2)) atTop (nhds 0)
Proof (Lean source)
-- @node: edge_atom_scale_isLittleO_root lemma edge_atom_scale_isLittleO_root (beta kappa : ℝ) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) : Tendsto (fun n => (deltaEdge n beta kappa) ^ (beta + kappa + 1) / (n : ℝ) ^ (-(1 : ℝ) / 2)) atTop (nhds 0) := by let E : ℝ := 2 * beta + kappa + 1 let gap : ℝ := (beta + kappa + 1) / E - 1 / 2 have hE : 0 < E := by dsimp [E]; linarith have hgap : 0 < gap := by dsimp [gap, E] rw [sub_pos, div_lt_div_iff₀ (by norm_num : (0 : ℝ) < 2) hE] linarith refine ((tendsto_rpow_neg_atTop hgap).comp (tendsto_natCast_atTop_atTop (R := ℝ))).congr' ?_ filter_upwards [eventually_gt_atTop 0] with n hn have hnR : 0 < (n : ℝ) := by exact_mod_cast hn symm rw [deltaEdge, ← Real.rpow_mul hnR.le] rw [← Real.rpow_sub hnR] congr 1 dsimp [gap, E] ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.edge_atom_scale_isLittleO_root · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:165
theorem atom_interior_scale_exact Lemma atom_interior_scale_exact in the paper ↗

In the interior-bandwidth regime, the atom contribution has the exact power-law form used to compare thresholds with the critical scale. The result uses the hn condition, the hd condition, the hbeta condition. This is the stated conclusion.

Formal statement
n d beta kappa :
hn :
0 < n
hd :
0 < d
hbeta :
0 < beta
d ^ (kappa + 1) * ((n * d ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta
= n ^ (-beta / (2 * beta + 1)) * d ^ ((beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1))
Proof (Lean source)
-- @node: atom_interior_scale_exact lemma atom_interior_scale_exact (n d beta kappa : ℝ) (hn : 0 < n) (hd : 0 < d) (hbeta : 0 < beta) : d ^ (kappa + 1) * ((n * d ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta = n ^ (-beta / (2 * beta + 1)) * d ^ ((beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1)) := by have hp : 0 < 2 * beta + 1 := by linarith rw [← Real.rpow_mul (mul_nonneg hn.le (Real.rpow_nonneg hd.le kappa))] rw [Real.mul_rpow hn.le (Real.rpow_nonneg hd.le kappa)] rw [← Real.rpow_mul hd.le] calc _ = n ^ ((-(1 : ℝ) / (2 * beta + 1)) * beta) * (d ^ (kappa + 1) * d ^ (kappa * ((-(1 : ℝ) / (2 * beta + 1)) * beta))) := by ring _ = n ^ ((-(1 : ℝ) / (2 * beta + 1)) * beta) * d ^ ((kappa + 1) + kappa * ((-(1 : ℝ) / (2 * beta + 1)) * beta)) := by exact congrArg (fun t : ℝ => n ^ ((-(1 : ℝ) / (2 * beta + 1)) * beta) * t) (Real.rpow_add hd _ _).symm _ = n ^ (-beta / (2 * beta + 1)) * d ^ ((beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1)) := by congr 1 <;> field_simp <;> ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.atom_interior_scale_exact · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:192
theorem critical_atom_interior_scale_exact

At the critical threshold, the interior-form atom contribution is exactly the root-sample-size scale. The result uses the hn condition, the hbeta condition, the hkappa condition. This is the stated conclusion.

Formal statement
n :
beta kappa :
hn :
0 < n
hbeta :
0 < beta
hkappa :
0 ≤ kappa
(deltaCrit n beta kappa) ^ (kappa + 1) * (((n : ℝ) * (deltaCrit n beta kappa) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta
= (n : ℝ) ^ (-(1 : ℝ) / 2)
Proof (Lean source)
-- @node: critical_atom_interior_scale_exact lemma critical_atom_interior_scale_exact (n : ℕ) (beta kappa : ℝ) (hn : 0 < n) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) : (deltaCrit n beta kappa) ^ (kappa + 1) * (((n : ℝ) * (deltaCrit n beta kappa) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta = (n : ℝ) ^ (-(1 : ℝ) / 2) := by have hnR : 0 < (n : ℝ) := by exact_mod_cast hn let D : ℝ := beta * kappa + 2 * beta + kappa + 1 have hD : 0 < D := by dsimp [D]; nlinarith have hp : 0 < 2 * beta + 1 := by linarith have hc : 0 < deltaCrit n beta kappa := Real.rpow_pos_of_pos hnR _ rw [← Real.rpow_mul (mul_nonneg hnR.le (Real.rpow_nonneg hc.le kappa))] rw [Real.mul_rpow hnR.le (Real.rpow_nonneg hc.le kappa)] rw [← Real.rpow_mul hc.le] calc _ = (n : ℝ) ^ ((-(1 : ℝ) / (2 * beta + 1)) * beta) * ((deltaCrit n beta kappa) ^ (kappa + 1) * (deltaCrit n beta kappa) ^ (kappa * ((-(1 : ℝ) / (2 * beta + 1)) * beta))) := by ring _ = (n : ℝ) ^ ((-(1 : ℝ) / (2 * beta + 1)) * beta) * (deltaCrit n beta kappa) ^ ((kappa + 1) + kappa * ((-(1 : ℝ) / (2 * beta + 1)) * beta)) := by exact congrArg (fun t : ℝ => (n : ℝ) ^ ((-(1 : ℝ) / (2 * beta + 1)) * beta) * t) (Real.rpow_add hc _ _).symm _ = (n : ℝ) ^ ((-(1 : ℝ) / (2 * beta + 1)) * beta) * (n : ℝ) ^ ((-(1 : ℝ) / (2 * D)) * ((kappa + 1) + kappa * ((-(1 : ℝ) / (2 * beta + 1)) * beta))) := by rw [deltaCrit, ← Real.rpow_mul hnR.le] _ = (n : ℝ) ^ (-(1 : ℝ) / 2) := by rw [← Real.rpow_add hnR] congr 1 dsimp [D] field_simp ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.critical_atom_interior_scale_exact · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:222
theorem atom_interior_div_root_exact

The interior-form atom contribution, normalized by the root-sample-size scale, is exactly a positive power of the threshold-to-critical-scale ratio. The result uses the hn condition, the hd condition, the hbeta condition, the hkappa condition. This is the stated conclusion.

Formal statement
n :
d beta kappa :
hn :
0 < n
hd :
0 < d
hbeta :
0 < beta
hkappa :
0 ≤ kappa
(d ^ (kappa + 1) * (((n : ℝ) * d ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) / (n : ℝ) ^ (-(1 : ℝ) / 2)
= (d / deltaCrit n beta kappa) ^ ((beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1))
Proof (Lean source)
-- @node: atom_interior_div_root_exact lemma atom_interior_div_root_exact (n : ℕ) (d beta kappa : ℝ) (hn : 0 < n) (hd : 0 < d) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) : (d ^ (kappa + 1) * (((n : ℝ) * d ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) / (n : ℝ) ^ (-(1 : ℝ) / 2) = (d / deltaCrit n beta kappa) ^ ((beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1)) := by have hnR : 0 < (n : ℝ) := by exact_mod_cast hn let D : ℝ := beta * kappa + 2 * beta + kappa + 1 let p : ℝ := 2 * beta + 1 have hD : 0 < D := by dsimp [D]; nlinarith have hp : 0 < p := by dsimp [p]; linarith have hc : 0 < deltaCrit n beta kappa := Real.rpow_pos_of_pos hnR _ rw [atom_interior_scale_exact (n : ℝ) d beta kappa hnR hd hbeta] have hleft : ((n : ℝ) ^ (-beta / p) * d ^ (D / p)) / (n : ℝ) ^ (-(1 : ℝ) / 2) = (n : ℝ) ^ (1 / (2 * p)) * d ^ (D / p) := by calc ((n : ℝ) ^ (-beta / p) * d ^ (D / p)) / (n : ℝ) ^ (-(1 : ℝ) / 2) = ((n : ℝ) ^ (-beta / p) / (n : ℝ) ^ (-(1 : ℝ) / 2)) * d ^ (D / p) := by ring _ = (n : ℝ) ^ ((-beta / p) - (-(1 : ℝ) / 2)) * d ^ (D / p) := by rw [Real.rpow_sub hnR] _ = (n : ℝ) ^ (1 / (2 * p)) * d ^ (D / p) := by congr 2 dsimp [p] field_simp ring rw [show (beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1) = D / p by rfl] rw [hleft] rw [Real.div_rpow hd.le hc.le] have hcrit : (deltaCrit n beta kappa) ^ (D / p) = (n : ℝ) ^ (-1 / (2 * p)) := by rw [deltaCrit, ← Real.rpow_mul hnR.le] congr 1 dsimp [D, p] field_simp rw [hcrit] calc (n : ℝ) ^ (1 / (2 * p)) * d ^ (D / p) = d ^ (D / p) * (n : ℝ) ^ (1 / (2 * p)) := mul_comm _ _ _ = d ^ (D / p) * ((n : ℝ) ^ (-1 / (2 * p)))⁻¹ := by congr 1 rw [← Real.rpow_neg hnR.le] congr 1 ring _ = d ^ (D / p) / (n : ℝ) ^ (-1 / (2 * p)) := by simp only [div_eq_mul_inv]
CausalSmith.Stat.LmtpThresholdAtomFrontier.atom_interior_div_root_exact · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:265
theorem atom_interior_normalized_tendsto_critical

If the threshold-to-critical-scale ratio converges to a positive constant, the normalized interior atom contribution converges to the corresponding positive power of that constant. The result uses the hbeta condition, the hkappa condition, the hc0 condition, the hratio condition. This is the stated conclusion.

Formal statement
beta kappa c0 :
hbeta :
0 < beta
hkappa :
0 ≤ kappa
hc0 :
0 < c0
deltaSeq :
ℕ → ℝ
hratio :
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)
Tendsto (fun n => ((deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) / (n : ℝ) ^ (-(1 : ℝ) / 2)) atTop (nhds (c0 ^ ((beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1))))
Proof (Lean source)
-- @node: atom_interior_normalized_tendsto_critical lemma atom_interior_normalized_tendsto_critical (beta kappa c0 : ℝ) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (hc0 : 0 < c0) (deltaSeq : ℕ → ℝ) (hratio : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)) : Tendsto (fun n => ((deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) / (n : ℝ) ^ (-(1 : ℝ) / 2)) atTop (nhds (c0 ^ ((beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1)))) := by let a : ℝ := (beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1) have ha : 0 < a := by dsimp [a] positivity have hpow := (Real.continuousAt_rpow_const c0 a (inr ha.le)).tendsto.comp hratio refine hpow.congr' ?_ have hratioPos : ∀ᶠ n in atTop, 0 < deltaSeq n / deltaCrit n beta kappa := hratio (Ioi_mem_nhds hc0) filter_upwards [eventually_gt_atTop 0, hratioPos] with n hn hnratio have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hcrit : 0 < deltaCrit n beta kappa := Real.rpow_pos_of_pos hnR _ have hdelta : 0 < deltaSeq n := ((div_pos_iff.mp hnratio).resolve_right fun hneg => (not_lt_of_ge hcrit.le) hneg.2).1 symm exact atom_interior_div_root_exact n (deltaSeq n) beta kappa hn hdelta hbeta hkappa
CausalSmith.Stat.LmtpThresholdAtomFrontier.atom_interior_normalized_tendsto_critical · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:322
theorem asympSeq_of_tendsto_div_pos

A positive finite limit for a ratio gives an eventual two-sided constant sandwich of its numerator by its denominator. The result uses the hc condition, the hg condition, the hfg condition. This is the stated conclusion.

Formal statement
f g :
ℕ → ℝ
c :
hc :
0 < c
hg :
∀ᶠ n in atTop, 0 < g n
hfg :
Tendsto (fun n => f n / g n) atTop (nhds c)
Proof (Lean source)
-- @node: asympSeq_of_tendsto_div_pos lemma asympSeq_of_tendsto_div_pos (f g : ℕ → ℝ) (c : ℝ) (hc : 0 < c) (hg : ∀ᶠ n in atTop, 0 < g n) (hfg : Tendsto (fun n => f n / g n) atTop (nhds c)) : AsympSeq f g := by refine ⟨c / 2, 2 * c, by linarith, by linarith, ?_⟩ have hratio : ∀ᶠ n in atTop, f n / g n ∈ Ioo (c / 2) (2 * c) := hfg (Ioo_mem_nhds (by linarith) (by linarith)) filter_upwards [hg, hratio] with n hgn hn constructor · exact ((le_div_iff₀ hgn).mp hn.1.le) · exact ((div_le_iff₀ hgn).mp hn.2.le)
CausalSmith.Stat.LmtpThresholdAtomFrontier.asympSeq_of_tendsto_div_pos · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:357
theorem critical_interior_atom_asymp

In the critical regime, the exact interior-form atom term has root-sample-size order. The result uses the hbeta condition, the hkappa condition, the hc0 condition, the hratio condition. This is the stated conclusion.

Formal statement
beta kappa c0 :
hbeta :
0 < beta
hkappa :
0 ≤ kappa
hc0 :
0 < c0
deltaSeq :
ℕ → ℝ
hratio :
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)
AsympSeq (fun n => (deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Proof (Lean source)
-- @node: critical_interior_atom_asymp lemma critical_interior_atom_asymp (beta kappa c0 : ℝ) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (hc0 : 0 < c0) (deltaSeq : ℕ → ℝ) (hratio : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)) : AsympSeq (fun n => (deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) := by let a : ℝ := (beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1) have ha : 0 < a := by dsimp [a]; positivity have hlimit := atom_interior_normalized_tendsto_critical beta kappa c0 hbeta hkappa hc0 deltaSeq hratio have hpow : 0 < c0 ^ a := Real.rpow_pos_of_pos hc0 _ apply asympSeq_of_tendsto_div_pos _ _ (c0 ^ a) hpow · filter_upwards [eventually_gt_atTop 0] with n hn exact Real.rpow_pos_of_pos (by exact_mod_cast hn) _ · simpa [a] using hlimit
CausalSmith.Stat.LmtpThresholdAtomFrontier.critical_interior_atom_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:373
theorem atom_interior_normalized_tendsto_top

If the threshold is asymptotically far above the critical scale, the interior atom contribution dominates the root-sample-size term. The result uses the hbeta condition, the hkappa condition, the hratio condition. This is the stated conclusion.

Formal statement
beta kappa :
hbeta :
0 < beta
hkappa :
0 ≤ kappa
deltaSeq :
ℕ → ℝ
hratio :
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop
Tendsto (fun n => ((deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) / (n : ℝ) ^ (-(1 : ℝ) / 2)) atTop atTop
Proof (Lean source)
-- @node: atom_interior_normalized_tendsto_top lemma atom_interior_normalized_tendsto_top (beta kappa : ℝ) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (deltaSeq : ℕ → ℝ) (hratio : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop) : Tendsto (fun n => ((deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) / (n : ℝ) ^ (-(1 : ℝ) / 2)) atTop atTop := by let a : ℝ := (beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1) have ha : 0 < a := by dsimp [a] positivity have hpow := (tendsto_rpow_atTop ha).comp hratio refine hpow.congr' ?_ have hratioOne : ∀ᶠ n in atTop, 1 ≤ deltaSeq n / deltaCrit n beta kappa := (Filter.tendsto_atTop.1 hratio) 1 filter_upwards [eventually_gt_atTop 0, hratioOne] with n hn hnratioOne have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hcrit : 0 < deltaCrit n beta kappa := Real.rpow_pos_of_pos hnR _ have hnratio : 0 < deltaSeq n / deltaCrit n beta kappa := by linarith have hdelta : 0 < deltaSeq n := ((div_pos_iff.mp hnratio).resolve_right fun hneg => (not_lt_of_ge hcrit.le) hneg.2).1 symm exact atom_interior_div_root_exact n (deltaSeq n) beta kappa hn hdelta hbeta hkappa
CausalSmith.Stat.LmtpThresholdAtomFrontier.atom_interior_normalized_tendsto_top · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:397
theorem supercritical_root_le_interior_atom

In the supercritical regime, the root-sample-size contribution is eventually bounded by the exact interior-form atom contribution. The result uses the hbeta condition, the hkappa condition, the hratio condition. This is the stated conclusion.

Formal statement
beta kappa :
hbeta :
0 < beta
hkappa :
0 ≤ kappa
deltaSeq :
ℕ → ℝ
hratio :
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop
∀ᶠ n : ℕ in atTop, (n : ℝ) ^ (-(1 : ℝ) / 2)
≤ (deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta
Proof (Lean source)
-- @node: supercritical_root_le_interior_atom lemma supercritical_root_le_interior_atom (beta kappa : ℝ) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (deltaSeq : ℕ → ℝ) (hratio : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop) : ∀ᶠ n : ℕ in atTop, (n : ℝ) ^ (-(1 : ℝ) / 2) ≤ (deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta := by have htop := atom_interior_normalized_tendsto_top beta kappa hbeta hkappa deltaSeq hratio have hratioOne : ∀ᶠ n in atTop, 1 ≤ ((deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) / (n : ℝ) ^ (-(1 : ℝ) / 2) := (Filter.tendsto_atTop.1 htop) 1 filter_upwards [eventually_gt_atTop 0, hratioOne] with n hn hratioN have hroot : 0 < (n : ℝ) ^ (-(1 : ℝ) / 2) := Real.rpow_pos_of_pos (by exact_mod_cast hn) _ simpa using (le_div_iff₀ hroot).mp hratioN
CausalSmith.Stat.LmtpThresholdAtomFrontier.supercritical_root_le_interior_atom · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:430
theorem critical_ratio_tendsto_edge_ratio_top

A threshold asymptotic to a positive multiple of the critical scale lies asymptotically above the design-edge scale. The result uses the hreg condition, the hc0 condition, the hratio condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha c0 :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hc0 :
0 < c0
deltaSeq :
ℕ → ℝ
hratio :
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)
Tendsto (fun n => deltaSeq n / deltaEdge n beta kappa) atTop atTop
Proof (Lean source)
-- @node: critical_ratio_tendsto_edge_ratio_top lemma critical_ratio_tendsto_edge_ratio_top (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha c0 : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hc0 : 0 < c0) (deltaSeq : ℕ → ℝ) (hratio : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)) : Tendsto (fun n => deltaSeq n / deltaEdge n beta kappa) atTop atTop := by have hscale := critical_scale_div_edge_scale_tendsto_top J beta kappa L cminus cplus pmin deltaBar alpha hreg have hprod := Filter.Tendsto.pos_mul_atTop hc0 hratio hscale refine hprod.congr' ?_ filter_upwards [eventually_gt_atTop 0] with n hn have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hc : deltaCrit n beta kappa ≠ 0 := (Real.rpow_pos_of_pos hnR _).ne' have he : deltaEdge n beta kappa ≠ 0 := (Real.rpow_pos_of_pos hnR _).ne' field_simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.critical_ratio_tendsto_edge_ratio_top · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:457
theorem supercritical_ratio_tendsto_edge_ratio_top

A threshold asymptotically larger than the critical scale also lies asymptotically above the smaller design-edge scale. The result uses the hreg condition, the hratio condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
deltaSeq :
ℕ → ℝ
hratio :
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop
Tendsto (fun n => deltaSeq n / deltaEdge n beta kappa) atTop atTop
Proof (Lean source)
-- @node: supercritical_ratio_tendsto_edge_ratio_top lemma supercritical_ratio_tendsto_edge_ratio_top (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (deltaSeq : ℕ → ℝ) (hratio : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop) : Tendsto (fun n => deltaSeq n / deltaEdge n beta kappa) atTop atTop := by have hscale := critical_scale_div_edge_scale_tendsto_top J beta kappa L cminus cplus pmin deltaBar alpha hreg have hprod := Filter.Tendsto.atTop_mul_atTop₀ hratio hscale refine hprod.congr' ?_ filter_upwards [eventually_gt_atTop 0] with n hn have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hc : deltaCrit n beta kappa ≠ 0 := (Real.rpow_pos_of_pos hnR _).ne' have he : deltaEdge n beta kappa ≠ 0 := (Real.rpow_pos_of_pos hnR _).ne' field_simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.supercritical_ratio_tendsto_edge_ratio_top · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:480
theorem fixed_positive_threshold_ratio_critical_top

A threshold converging to a positive fixed value is asymptotically above the vanishing critical scale. The result uses the hreg condition, the hdelta0 condition, the hdelta condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha delta0 :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hdelta0 :
0 < delta0
deltaSeq :
ℕ → ℝ
hdelta :
Tendsto deltaSeq atTop (nhds delta0)
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop
Proof (Lean source)
-- @node: fixed_positive_threshold_ratio_critical_top lemma fixed_positive_threshold_ratio_critical_top (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha delta0 : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hdelta0 : 0 < delta0) (deltaSeq : ℕ → ℝ) (hdelta : Tendsto deltaSeq atTop (nhds delta0)) : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ let D : ℝ := beta * kappa + 2 * beta + kappa + 1 have hD : 0 < D := by dsimp [D]; nlinarith have ha : 0 < 1 / (2 * D) := by positivity have hpow : Tendsto (fun n : ℕ => (n : ℝ) ^ (1 / (2 * D))) atTop atTop := (tendsto_rpow_atTop ha).comp (tendsto_natCast_atTop_atTop (R := ℝ)) have hprod := Filter.Tendsto.pos_mul_atTop hdelta0 hdelta hpow refine hprod.congr' ?_ filter_upwards [eventually_gt_atTop 0] with n hn have hnR : 0 < (n : ℝ) := by exact_mod_cast hn rw [deltaCrit] apply (eq_div_iff (Real.rpow_pos_of_pos hnR _).ne').2 rw [mul_assoc, ← Real.rpow_add hnR] have hexp : 1 / (2 * D) + (-1 / (2 * (beta * kappa + 2 * beta + kappa + 1))) = 0 := by dsimp [D] ring rw [hexp] simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.fixed_positive_threshold_ratio_critical_top · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:503
theorem zero_threshold_stabilizedWorstRisk_asymp

At the identity threshold, the concrete stabilized estimator inherits the root-sample-size risk sandwich from the minimax theorem. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
Bseq :
∀ n
SplitBlocks n, AsympSeq (fun n => stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Proof (Lean source)
-- @node: zero_threshold_stabilizedWorstRisk_asymp lemma zero_threshold_stabilizedWorstRisk_asymp (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∀ Bseq : ∀ n, SplitBlocks n, AsympSeq (fun n => stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hreg' : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha := ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ rcases clamp_minimax_risk J beta kappa L cminus cplus pmin deltaBar alpha hreg' with ⟨c, C, amplitude, hc, hcC, hamp, hamp_le, hrisk⟩ have hzero : ThresholdSequence deltaBar (fun _ => 0) := by intro n exact ⟨le_rfl, hdeltaBar_pos.le⟩ intro Bseq refine ⟨c, C, hc, hcC.le, ?_⟩ filter_upwards [hrisk (fun _ => 0) hzero Bseq] with n hn dsimp at hn have hfront : clampFrontier n 0 kappa (infoBandwidth n 0 beta kappa deltaBar) beta = (n : ℝ) ^ (-(1 : ℝ) / 2) := by simp [clampFrontier, Real.zero_rpow (by linarith : kappa + 1 ≠ 0)] rw [hfront] at hn exact ⟨hn.1.trans hn.2.1, hn.2.2.1⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.zero_threshold_stabilizedWorstRisk_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:534
theorem asymp_add_reference_left

Adding a nonnegative reference term preserves an asymptotic comparison when the other summand already has that reference order. The result uses the hfg condition, the hg condition. This is the stated conclusion.

Formal statement
f g :
ℕ → ℝ
hfg :
hg :
∀ᶠ n in atTop, 0 ≤ g n
AsympSeq (fun n => g n + f n) g
Proof (Lean source)
-- @node: asymp_add_reference_left lemma asymp_add_reference_left (f g : ℕ → ℝ) (hfg : AsympSeq f g) (hg : ∀ᶠ n in atTop, 0 ≤ g n) : AsympSeq (fun n => g n + f n) g := by rcases hfg with ⟨c, C, hc, hcC, hfg⟩ refine ⟨c, C + 1, hc, by linarith, ?_⟩ filter_upwards [hfg, hg] with n hn hgn constructor · linarith [hn.1] · nlinarith [hn.2]
CausalSmith.Stat.LmtpThresholdAtomFrontier.asymp_add_reference_left · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:567
theorem asymp_add_eventually_le_left

If a nonnegative summand is eventually no larger than a sequence already of the target order, adding it preserves that asymptotic order. The result uses the hfs condition, the hg condition. This is the stated conclusion.

Formal statement
f g s :
ℕ → ℝ
hfs :
hg :
∀ᶠ n in atTop, 0 ≤ g n ∧ g n ≤ f n
AsympSeq (fun n => g n + f n) s
Proof (Lean source)
-- @node: asymp_add_eventually_le_left lemma asymp_add_eventually_le_left (f g s : ℕ → ℝ) (hfs : AsympSeq f s) (hg : ∀ᶠ n in atTop, 0 ≤ g n ∧ g n ≤ f n) : AsympSeq (fun n => g n + f n) s := by rcases hfs with ⟨c, C, hc, hcC, hfs⟩ refine ⟨c, 2 * C, hc, by linarith, ?_⟩ filter_upwards [hfs, hg] with n hn hgn constructor · linarith [hn.1, hgn.1] · nlinarith [hn.2, hgn.2]
CausalSmith.Stat.LmtpThresholdAtomFrontier.asymp_add_eventually_le_left · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:581
theorem asympSeq_rpow

Raising eventually nonnegative comparable sequences to a fixed positive real power preserves their asymptotic comparison. The result uses the ha condition, the hfg condition, the hf condition, the hg condition. This is the stated conclusion.

Formal statement
f g :
ℕ → ℝ
a :
ha :
0 < a
hfg :
hf :
∀ᶠ n in atTop, 0 ≤ f n
hg :
∀ᶠ n in atTop, 0 ≤ g n
AsympSeq (fun n => (f n) ^ a) (fun n => (g n) ^ a)
Proof (Lean source)
-- @node: asympSeq_rpow lemma asympSeq_rpow (f g : ℕ → ℝ) (a : ℝ) (ha : 0 < a) (hfg : AsympSeq f g) (hf : ∀ᶠ n in atTop, 0 ≤ f n) (hg : ∀ᶠ n in atTop, 0 ≤ g n) : AsympSeq (fun n => (f n) ^ a) (fun n => (g n) ^ a) := by rcases hfg with ⟨c, C, hc, hcC, hfg⟩ refine ⟨c ^ a, C ^ a, Real.rpow_pos_of_pos hc _, Real.rpow_le_rpow hc.le hcC ha.le, ?_⟩ filter_upwards [hfg, hf, hg] with n hn hfn hgn constructor · rw [← Real.mul_rpow hc.le hgn] exact Real.rpow_le_rpow (mul_nonneg hc.le hgn) hn.1 ha.le · rw [← Real.mul_rpow (hc.le.trans hcC) hgn] exact Real.rpow_le_rpow hfn hn.2 ha.le
CausalSmith.Stat.LmtpThresholdAtomFrontier.asympSeq_rpow · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:595
theorem asympSeq_mul_nonnegative_left

Multiplication by a common eventually nonnegative factor preserves an asymptotic comparison. The result uses the hfg condition, the hq condition. This is the stated conclusion.

Formal statement
q f g :
ℕ → ℝ
hfg :
hq :
∀ᶠ n in atTop, 0 ≤ q n
AsympSeq (fun n => q n * f n) (fun n => q n * g n)
Proof (Lean source)
-- @node: asympSeq_mul_nonnegative_left lemma asympSeq_mul_nonnegative_left (q f g : ℕ → ℝ) (hfg : AsympSeq f g) (hq : ∀ᶠ n in atTop, 0 ≤ q n) : AsympSeq (fun n => q n * f n) (fun n => q n * g n) := by rcases hfg with ⟨c, C, hc, hcC, hfg⟩ refine ⟨c, C, hc, hcC, ?_⟩ filter_upwards [hfg, hq] with n hn hqn constructor · calc c * (q n * g n) = q n * (c * g n) := by ring _ ≤ q n * f n := mul_le_mul_of_nonneg_left hn.1 hqn · calc q n * f n ≤ q n * (C * g n) := mul_le_mul_of_nonneg_left hn.2 hqn _ = C * (q n * g n) := by ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.asympSeq_mul_nonnegative_left · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:613
theorem asympSeq_trans

Asymptotic comparison is transitive. The result uses the hfg condition, the hgs condition. This is the stated conclusion.

Formal statement
f g s :
ℕ → ℝ
hfg :
hgs :
Proof (Lean source)
-- @node: asympSeq_trans lemma asympSeq_trans {f g s : ℕ → ℝ} (hfg : AsympSeq f g) (hgs : AsympSeq g s) : AsympSeq f s := by rcases hfg with ⟨c₁, C₁, hc₁, hcC₁, hfg⟩ rcases hgs with ⟨c₂, C₂, hc₂, hcC₂, hgs⟩ refine ⟨c₁ * c₂, C₁ * C₂, mul_pos hc₁ hc₂, ?_, ?_⟩ · exact mul_le_mul hcC₁ hcC₂ hc₂.le (hc₁.le.trans hcC₁) · filter_upwards [hfg, hgs] with n hn hns constructor · calc (c₁ * c₂) * s n = c₁ * (c₂ * s n) := by ring _ ≤ c₁ * g n := mul_le_mul_of_nonneg_left hns.1 hc₁.le _ ≤ f n := hn.1 · calc f n ≤ C₁ * g n := hn.2 _ ≤ C₁ * (C₂ * s n) := mul_le_mul_of_nonneg_left hns.2 (hc₁.le.trans hcC₁) _ = (C₁ * C₂) * s n := by ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.asympSeq_trans · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:632
theorem atomSeq_asymp_interior_of_edge_ratio_top

In the above-edge regime, replacing the implicit information bandwidth by its interior closed form preserves the order of the atom contribution. The result uses the hreg condition, the hdelta condition, the hfar condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
deltaSeq :
ℕ → ℝ
hdelta :
ThresholdSequence deltaBar deltaSeq
hfar :
Tendsto (fun n => deltaSeq n / deltaEdge n beta kappa) atTop atTop
AsympSeq (fun n => (deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta) (fun n => (deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta)
Proof (Lean source)
-- @node: atomSeq_asymp_interior_of_edge_ratio_top lemma atomSeq_asymp_interior_of_edge_ratio_top (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (deltaSeq : ℕ → ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) (hfar : Tendsto (fun n => deltaSeq n / deltaEdge n beta kappa) atTop atTop) : AsympSeq (fun n => (deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta) (fun n => (deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hreg' : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha := ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hbw := infoBandwidth_interior_asymp J beta kappa L cminus cplus pmin deltaBar alpha hreg' deltaSeq hdelta hfar apply asympSeq_mul_nonnegative_left · apply asympSeq_rpow _ _ beta hbeta hbw · exact (infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar_pos, hdeltaBar_lt⟩ deltaSeq hdelta).mono (fun _ hn => hn.1.le) · exact Filter.Eventually.of_forall fun n => Real.rpow_nonneg (mul_nonneg (Nat.cast_nonneg n) (Real.rpow_nonneg (hdelta n).1 kappa)) _ · exact Filter.Eventually.of_forall fun n => Real.rpow_nonneg (hdelta n).1 (kappa + 1)
CausalSmith.Stat.LmtpThresholdAtomFrontier.atomSeq_asymp_interior_of_edge_ratio_top · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:653
theorem critical_atom_and_frontier_asymp

At a positive finite critical ratio, the actual implicit-bandwidth atom term and the resulting frontier both have root-sample-size order. The result uses the hreg condition, the hc0 condition, the hdelta condition, the hratio condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha c0 :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hc0 :
0 < c0
deltaSeq :
ℕ → ℝ
hdelta :
ThresholdSequence deltaBar deltaSeq
hratio :
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)
atomSeq :
fun n
=> (deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta
rSeq :
fun n
=> clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta
AsympSeq atomSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
AsympSeq rSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Proof (Lean source)
-- @node: critical_atom_and_frontier_asymp lemma critical_atom_and_frontier_asymp (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha c0 : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hc0 : 0 < c0) (deltaSeq : ℕ → ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) (hratio : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)) : let atomSeq := fun n => (deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta let rSeq := fun n => clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta AsympSeq atomSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ AsympSeq rSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hreg' : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha := ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hedge := critical_ratio_tendsto_edge_ratio_top J beta kappa L cminus cplus pmin deltaBar alpha c0 hreg' hc0 deltaSeq hratio have hactual := atomSeq_asymp_interior_of_edge_ratio_top J beta kappa L cminus cplus pmin deltaBar alpha hreg' deltaSeq hdelta hedge have hinterior := critical_interior_atom_asymp beta kappa c0 hbeta hkappa hc0 deltaSeq hratio have hatom := asympSeq_trans hactual hinterior dsimp refine ⟨hatom, ?_⟩ simpa [clampFrontier] using asymp_add_reference_left _ _ hatom (Filter.Eventually.of_forall fun n => Real.rpow_nonneg (Nat.cast_nonneg n) _)
CausalSmith.Stat.LmtpThresholdAtomFrontier.critical_atom_and_frontier_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:687
theorem critical_interior_frontier_asymp

At a positive finite critical ratio, adding the regular root term to the interior-form atom term preserves root-sample-size order. The result uses the hbeta condition, the hkappa condition, the hc0 condition, the hratio condition. This is the stated conclusion.

Formal statement
beta kappa c0 :
hbeta :
0 < beta
hkappa :
0 ≤ kappa
hc0 :
0 < c0
deltaSeq :
ℕ → ℝ
hratio :
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)
AsympSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2) + (deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Proof (Lean source)
-- @node: critical_interior_frontier_asymp lemma critical_interior_frontier_asymp (beta kappa c0 : ℝ) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (hc0 : 0 < c0) (deltaSeq : ℕ → ℝ) (hratio : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)) : AsympSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2) + (deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) := by apply asymp_add_reference_left · exact critical_interior_atom_asymp beta kappa c0 hbeta hkappa hc0 deltaSeq hratio · filter_upwards [eventually_gt_atTop 0] with n hn exact (Real.rpow_pos_of_pos (by exact_mod_cast hn) _).le
CausalSmith.Stat.LmtpThresholdAtomFrontier.critical_interior_frontier_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:721
theorem supercritical_frontier_asymp

In the supercritical moving-threshold regime, the actual implicit-bandwidth frontier is comparable to the interior atom scale, since that scale dominates the root-sample-size summand. The result uses the hreg condition, the hdelta condition, the hratio condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
deltaSeq :
ℕ → ℝ
hdelta :
ThresholdSequence deltaBar deltaSeq
hratio :
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop
AsympSeq (fun n => clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta) (fun n => (deltaSeq n) ^ (kappa + 1) * ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-beta / (2 * beta + 1)))
Proof (Lean source)
-- @node: supercritical_frontier_asymp lemma supercritical_frontier_asymp (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (deltaSeq : ℕ → ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) (hratio : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop) : AsympSeq (fun n => clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta) (fun n => (deltaSeq n) ^ (kappa + 1) * ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-beta / (2 * beta + 1))) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hreg' : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha := ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ let interior : ℕ → ℝ := fun n => (deltaSeq n) ^ (kappa + 1) * (((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1))) ^ beta let atom : ℕ → ℝ := fun n => (deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta have hedge := supercritical_ratio_tendsto_edge_ratio_top J beta kappa L cminus cplus pmin deltaBar alpha hreg' deltaSeq hratio have ha := atomSeq_asymp_interior_of_edge_ratio_top J beta kappa L cminus cplus pmin deltaBar alpha hreg' deltaSeq hdelta hedge have hroot := supercritical_root_le_interior_atom beta kappa hbeta hkappa deltaSeq hratio rcases ha with ⟨c, C, hc, hcC, ha⟩ refine ⟨c, C + 1, hc, by linarith, ?_⟩ have hratioOne : ∀ᶠ n in atTop, 1 ≤ deltaSeq n / deltaCrit n beta kappa := (Filter.tendsto_atTop.1 hratio) 1 filter_upwards [ha, hroot, eventually_gt_atTop 0, hratioOne] with n han hr hn hrat have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hcrit : 0 < deltaCrit n beta kappa := Real.rpow_pos_of_pos hnR _ have hd : 0 < deltaSeq n := by have : 0 < deltaSeq n / deltaCrit n beta kappa := by linarith rcases div_pos_iff.mp this with h | h · exact h.1 · exact (not_lt_of_ge hcrit.le h.2).elim have hinterior_nonneg : 0 ≤ interior n := by dsimp [interior] exact mul_nonneg (Real.rpow_nonneg hd.le _) (Real.rpow_nonneg (Real.rpow_nonneg (mul_nonneg hnR.le (Real.rpow_nonneg hd.le kappa)) _ ) beta) have hatom_nonneg : 0 ≤ atom n := by exact (mul_nonneg hc.le hinterior_nonneg).trans han.1 have htarget : interior n = (deltaSeq n) ^ (kappa + 1) * ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-beta / (2 * beta + 1)) := by dsimp [interior] rw [← Real.rpow_mul (mul_nonneg hnR.le (Real.rpow_nonneg hd.le kappa))] congr 2 ring rw [← htarget] change c * interior n ≤ (n : ℝ) ^ (-(1 : ℝ) / 2) + atom n ∧ (n : ℝ) ^ (-(1 : ℝ) / 2) + atom n ≤ (C + 1) * interior n constructor · exact han.1.trans (le_add_of_nonneg_left (Real.rpow_nonneg (Nat.cast_nonneg n) _)) · calc (n : ℝ) ^ (-(1 : ℝ) / 2) + atom n ≤ interior n + C * interior n := add_le_add hr han.2 _ = (C + 1) * interior n := by ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.supercritical_frontier_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:742
theorem regular_frontier_asymp

Below the critical scale, the actual implicit-bandwidth frontier has root-sample-size order. The result uses the hreg condition, the hdelta condition, the hratio condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
deltaSeq :
ℕ → ℝ
hdelta :
ThresholdSequence deltaBar deltaSeq
hratio :
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds 0)
AsympSeq (fun n => clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Proof (Lean source)
-- @node: regular_frontier_asymp lemma regular_frontier_asymp (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (deltaSeq : ℕ → ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) (hratio : Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds 0)) : AsympSeq (fun n => clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hbalance := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar_pos, hdeltaBar_lt⟩ deltaSeq hdelta have hsmall : ∀ᶠ n in atTop, deltaSeq n / deltaCrit n beta kappa < 1 := hratio (Iio_mem_nhds (by norm_num)) refine ⟨1, 2, by norm_num, by norm_num, ?_⟩ filter_upwards [hbalance, hsmall, eventually_gt_atTop 0] with n hb hs hn have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hroot : 0 < (n : ℝ) ^ (-(1 : ℝ) / 2) := Real.rpow_pos_of_pos hnR _ have hatom : (deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta ≤ (n : ℝ) ^ (-(1 : ℝ) / 2) := by rcases eq_or_lt_of_le (hdelta n).1 with hd | hd · simp [← hd, Real.zero_rpow (by linarith : kappa + 1 ≠ 0), hroot.le] · let w := ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-(1 : ℝ) / (2 * beta + 1)) have hbw : infoBandwidth n (deltaSeq n) beta kappa deltaBar ≤ w := by exact balance_root_le_interior_scale (n : ℝ) (deltaSeq n) (infoBandwidth n (deltaSeq n) beta kappa deltaBar) (2 * beta + 1) kappa hnR hd hb.1 (by linarith) hkappa (by simpa [w] using hb.2.2) have hatomInterior : (deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta ≤ (deltaSeq n) ^ (kappa + 1) * w ^ beta := by gcongr; exact hb.1.le have hratioNonneg : 0 ≤ deltaSeq n / deltaCrit n beta kappa := div_nonneg hd.le (Real.rpow_pos_of_pos hnR _).le have hpow : (deltaSeq n / deltaCrit n beta kappa) ^ ((beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1)) ≤ 1 := by simpa using Real.rpow_le_rpow hratioNonneg hs.le (show 0 ≤ (beta * kappa + 2 * beta + kappa + 1) / (2 * beta + 1) by positivity) have hinterior : (deltaSeq n) ^ (kappa + 1) * w ^ beta ≤ (n : ℝ) ^ (-(1 : ℝ) / 2) := by apply (div_le_one hroot).mp rw [atom_interior_div_root_exact n (deltaSeq n) beta kappa hn hd hbeta hkappa] exact hpow exact hatomInterior.trans hinterior simp only [clampFrontier] have hatom_nonneg : 0 ≤ (deltaSeq n) ^ (kappa + 1) * (infoBandwidth n (deltaSeq n) beta kappa deltaBar) ^ beta := mul_nonneg (Real.rpow_nonneg (hdelta n).1 _) (Real.rpow_nonneg hb.1.le _) constructor <;> nlinarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.regular_frontier_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/PhaseRates.lean:818
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.Pushforward 4 declarations The conditional treatment law is represented by its density against Lebesgue measure.

Clamp pushforward and exposure support

The conditional treatment law is represented by its density against Lebesgue measure. The clamp pushforward is stated as an equality of measures, including the Dirac mass at the threshold and the two-sided atom-mass bound.

def conditionalTreatmentMeasure

Conditional natural-treatment measure in stratum x.

Definition (Lean source)
J :
shared
P :
x :
Fin J
conditionalTreatmentMeasure P x :
(volume.restrict (Icc (0 : ℝ) 1)).withDensity (fun a => ofReal (P.pi x a))
CausalSmith.Stat.LmtpThresholdAtomFrontier.conditionalTreatmentMeasure · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Pushforward.lean:25
def IsConditionalSupportPoint

Pointwise support expressed by positivity of every open neighborhood.

Definition (Lean source)
μ :
a :
U :
Set
a ∈ U
IsConditionalSupportPoint μ a :
Prop
0 < μ U
CausalSmith.Stat.LmtpThresholdAtomFrontier.IsConditionalSupportPoint · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Pushforward.lean:30
theorem clamp_pushforward_decomposition Proposition 6 in the paper ↗

The threshold clamp produces the retained continuous law plus a Dirac atom, whose mass is sandwiched by the integrated polynomial envelope. The result uses the hmodel condition, the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
J :
shared
P :
beta kappa L cminus cplus pmin deltaBar alpha :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
x :
Fin J
delta :
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
conclusion 1
+ ofReal (atomMass P x delta) • Measure.dirac delta
conclusion 2
cminus * delta ^ (kappa + 1) / (kappa + 1) ≤ atomMass P x delta
conclusion 3
atomMass P x delta ≤ cplus * delta ^ (kappa + 1) / (kappa + 1)
Proof (Lean source)
-- @node: prop:pushforward-setup lemma clamp_pushforward_decomposition (P : ClampLaw J) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (x : Fin J) (delta : ℝ) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : (conditionalTreatmentMeasure P x).map (clampPolicy delta) = (conditionalTreatmentMeasure P x).restrict (Ioc delta 1) + ofReal (atomMass P x delta) • Measure.dirac delta ∧ cminus * delta ^ (kappa + 1) / (kappa + 1) ≤ atomMass P x delta ∧ atomMass P x delta ≤ cplus * delta ^ (kappa + 1) / (kappa + 1) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ have hdelta0 : 0 ≤ delta := hdelta.1 have hdelta1 : delta ≤ 1 := hdelta.2.trans hdeltaBar_lt.le let μ : Measure ℝ := conditionalTreatmentMeasure P x have hclamp : Measurable (clampPolicy delta) := by exact measurable_id.max measurable_const have hmap : μ.map (clampPolicy delta) = μ.restrict (Ioi delta) + μ (Iic delta) • Measure.dirac delta := by calc μ.map (clampPolicy delta) = (μ.restrict (Iic delta) + μ.restrict (Iic delta)ᶜ).map (clampPolicy delta) := by rw [Measure.restrict_add_restrict_compl measurableSet_Iic] _ = (μ.restrict (Iic delta)).map (clampPolicy delta) + (μ.restrict (Iic delta)ᶜ).map (clampPolicy delta) := by rw [Measure.map_add _ _ hclamp] _ = (μ.restrict (Iic delta)).map (fun _ => delta) + (μ.restrict (Iic delta)ᶜ).map id := by congr 1 · apply Measure.map_congr filter_upwards [ae_restrict_mem measurableSet_Iic] with a ha have ha' : a ≤ delta := ha exact max_eq_right ha' · apply Measure.map_congr filter_upwards [ae_restrict_mem measurableSet_Iic.compl] with a ha have hda : delta < a := by simpa using ha simpa [clampPolicy, max_eq_left hda.le] _ = μ (Iic delta) • Measure.dirac delta + μ.restrict (Ioi delta) := by simp [Measure.map_const] _ = μ.restrict (Ioi delta) + μ (Iic delta) • Measure.dirac delta := add_comm _ _ have hupper : μ.restrict (Ioi delta) = μ.restrict (Ioc delta 1) := by dsimp [μ, conditionalTreatmentMeasure] rw [restrict_withDensity measurableSet_Ioi, restrict_withDensity measurableSet_Ioc, Measure.restrict_restrict measurableSet_Ioi, Measure.restrict_restrict measurableSet_Ioc] congr 2 ext a simp only [Set.mem_inter_iff, Set.mem_Ioi, Set.mem_Icc, Set.mem_Ioc] constructor · rintro ⟨hda, ha0, ha1⟩ exact ⟨⟨hda, ha1⟩, ha0, ha1⟩ · rintro ⟨⟨hda, ha1⟩, ha0, _⟩ exact ⟨hda, ha0, ha1⟩ have hpiInt : Integrable (P.pi x) (volume.restrict (Icc (0 : ℝ) 1)) := by apply IntegrableOn.of_bound measure_Icc_lt_top · exact (aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hmodel.condDensity.1 x)).aestronglyMeasurable · filter_upwards [ae_restrict_mem measurableSet_Icc, hmodel.condDensity.2.1 x, hmodel.thinning x] with a ha hnon hthin rw [Real.norm_eq_abs, abs_of_nonneg hnon] calc P.pi x a ≤ cplus * a ^ kappa := hthin.2 _ ≤ cplus * 1 := by have hcplus : 0 ≤ cplus := by linarith gcongr exact Real.rpow_le_one ha.1 ha.2 hkappa _ = cplus := mul_one _ have hmass : μ (Iic delta) = ofReal (atomMass P x delta) := by dsimp [μ, conditionalTreatmentMeasure] rw [withDensity_apply _ measurableSet_Iic, ← ofReal_integral_eq_lintegral_ofReal hpiInt.restrict] · congr 2 rw [Measure.restrict_restrict measurableSet_Iic] congr 1 ext a simp only [Set.mem_inter_iff, Set.mem_Iic, Set.mem_Icc] constructor · rintro ⟨had, ha0, ha1⟩ exact ⟨ha0, had⟩ · rintro ⟨ha0, had⟩ exact ⟨had, ha0, had.trans hdelta1⟩ · exact (hmodel.condDensity.2.1 x).filter_mono ae_restrict_le refine ⟨?_, ?_⟩ · simpa [μ, hupper, hmass] using hmap have hsubset : Icc (0 : ℝ) delta ⊆ Icc (0 : ℝ) 1 := by intro a ha exact ⟨ha.1, ha.2.trans hdelta1⟩ have hpiDelta : IntegrableOn (P.pi x) (Icc (0 : ℝ) delta) volume := hpiInt.mono_measure (Measure.restrict_mono_set volume hsubset) have hpowInt : IntegrableOn (fun a : ℝ => a ^ kappa) (Icc 0 delta) volume := by rw [← intervalIntegrable_iff_integrableOn_Icc_of_le hdelta0] exact intervalIntegral.intervalIntegrable_rpow (inl hkappa) have hthinDelta := (hmodel.thinning x).filter_mono (ae_mono (Measure.restrict_mono_set volume hsubset)) have hpowEval : (∫ a in Icc (0 : ℝ) delta, a ^ kappa) = delta ^ (kappa + 1) / (kappa + 1) := by rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hdelta0, integral_rpow (inl (by linarith : -1 < kappa))] rw [Real.zero_rpow (by linarith : kappa + 1 ≠ 0), sub_zero] constructor · rw [atomMass] calc cminus * delta ^ (kappa + 1) / (kappa + 1) = cminus * ∫ a in Icc (0 : ℝ) delta, a ^ kappa := by rw [hpowEval]; ring _ = ∫ a in Icc (0 : ℝ) delta, cminus * a ^ kappa := by rw [integral_const_mul] _ ≤ ∫ a in Icc (0 : ℝ) delta, P.pi x a := integral_mono_ae (hpowInt.const_mul cminus) hpiDelta (hthinDelta.mono fun _ ha => ha.1) · rw [atomMass] calc (∫ a in Icc (0 : ℝ) delta, P.pi x a) ≤ ∫ a in Icc (0 : ℝ) delta, cplus * a ^ kappa := integral_mono_ae hpiDelta (hpowInt.const_mul cplus) (hthinDelta.mono fun _ ha => ha.2) _ = cplus * ∫ a in Icc (0 : ℝ) delta, a ^ kappa := by rw [integral_const_mul] _ = cplus * delta ^ (kappa + 1) / (kappa + 1) := by rw [hpowEval]; ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.clamp_pushforward_decomposition · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Pushforward.lean:34
theorem clamp_policy_support Proposition 7 in the paper ↗

Every clamped treatment value is almost surely a support point of the natural conditional treatment law, including the identity case at zero. The result uses the hmodel condition, the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
J :
shared
P :
beta kappa L cminus cplus pmin deltaBar alpha :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
x :
Fin J
delta :
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
∀ᵐ a ∂conditionalTreatmentMeasure P x, IsConditionalSupportPoint (conditionalTreatmentMeasure P x) (clampPolicy delta a)
Proof (Lean source)
-- @node: prop:policy-support lemma clamp_policy_support (P : ClampLaw J) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (x : Fin J) (delta : ℝ) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : ∀ᵐ a ∂conditionalTreatmentMeasure P x, IsConditionalSupportPoint (conditionalTreatmentMeasure P x) (clampPolicy delta a) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcm, hcp, hpmin, hpminJ, hdeltaBar_pos, hdeltaBar_lt, halpha, halpha_lt⟩ let μ₀ : Measure ℝ := volume.restrict (Icc (0 : ℝ) 1) let f : ℝ → ENNReal := fun a => ofReal (P.pi x a) have hf : AEMeasurable f μ₀ := by apply AEMeasurable.ennreal_ofReal exact aemeasurable_restrict_of_measurable_subtype measurableSet_Icc (hmodel.condDensity.1 x) have hμ : conditionalTreatmentMeasure P x = μ₀.withDensity f := rfl have hinterior : ∀ᵐ a ∂μ₀, a ∈ Ioo (0 : ℝ) 1 := by rw [ae_iff, Measure.restrict_apply₀] · have hset : {a : ℝ | ¬a ∈ Ioo (0 : ℝ) 1} ∩ Icc 0 1 = {0, 1} := by ext a simp only [Set.mem_inter_iff, Set.mem_ofPred_eq, Set.mem_Ioo, Set.mem_Icc, Set.mem_insert_iff, Set.mem_singleton_iff] constructor · rintro ⟨hnot, ha0, ha1⟩ by_cases hzero : a = 0 · exact Or.inl hzero · right have hpos : 0 < a := lt_of_le_of_ne ha0 (Ne.symm hzero) exact le_antisymm ha1 (le_of_not_gt fun hlt => hnot ⟨hpos, hlt⟩) · rintro (rfl | rfl) <;> simp rw [hset] rw [Set.insert_eq] exact measure_union_null Real.volume_singleton Real.volume_singleton · exact measurableSet_Ioo.compl.nullMeasurableSet have hfpos : ∀ᵐ a ∂μ₀, f a ≠ 0 := by filter_upwards [hinterior, hmodel.thinning x] with a ha hthin rw [ne_eq, ENNReal.ofReal_eq_zero] exact not_le.mpr (lt_of_lt_of_le (mul_pos hcminus (Real.rpow_pos_of_pos ha.1 kappa)) hthin.1) have hsourceInterior : ∀ᵐ a ∂conditionalTreatmentMeasure P x, a ∈ Ioo (0 : ℝ) 1 := by rw [hμ] exact (withDensity_absolutelyContinuous μ₀ f).ae_le hinterior filter_upwards [hsourceInterior] with a ha have hdelta01 : delta ∈ Icc (0 : ℝ) 1 := ⟨hdelta.1, le_trans hdelta.2 (le_of_lt hdeltaBar_lt)⟩ have hy : clampPolicy delta a ∈ Ioo (0 : ℝ) 1 := by constructor · exact lt_of_lt_of_le ha.1 (le_max_left _ _) · exact max_lt ha.2 (lt_of_le_of_lt hdelta.2 hdeltaBar_lt) intro U hU hyU have hμ₀U : 0 < μ₀ U := by rcases (Metric.isOpen_iff.mp hU) _ hyU with ⟨ε, hε, hball⟩ let r := min ε (min (clampPolicy delta a) (1 - clampPolicy delta a)) have hr : 0 < r := by dsimp [r] exact lt_min hε (lt_min hy.1 (sub_pos.mpr hy.2)) have hsub : ball (clampPolicy delta a) r ⊆ U ∩ Icc (0 : ℝ) 1 := by intro z hz have hz' : |z - clampPolicy delta a| < r := by simpa [Real.dist_eq] using hz constructor · exact hball (Metric.ball_subset_ball (min_le_left _ _) hz) · constructor · have : -(clampPolicy delta a) < z - clampPolicy delta a := lt_of_le_of_lt (neg_le_neg (min_le_right ε _ |>.trans (min_le_left _ _))) (abs_lt.mp hz').1 linarith · have : z - clampPolicy delta a < 1 - clampPolicy delta a := lt_of_lt_of_le (abs_lt.mp hz').2 (min_le_right ε _ |>.trans (min_le_right _ _)) linarith rw [Measure.restrict_apply hU.measurableSet] refine lt_of_lt_of_le ?_ (measure_mono hsub) rw [Real.ball_eq_Ioo, Real.volume_Ioo, ENNReal.ofReal_pos] linarith rw [hμ] rw [pos_iff_ne_zero] at hμ₀U ⊢ intro hzero apply hμ₀U rw [← (withDensity_apply_eq_zero' hf).mp hzero] apply measure_congr filter_upwards [hfpos] with z hz apply propext constructor · exact fun hzU => ⟨hz, hzU⟩ · exact fun hzU => hzU.2
CausalSmith.Stat.LmtpThresholdAtomFrontier.clamp_policy_support · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/Pushforward.lean:159
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.RegressionVersion 11 declarations A measurable global version of the clamp regression

A measurable global version of the clamp regression

theorem clampDesign_measurable

clamp design is measurable for the specified J input.

Formal statement
J :
Measurable (fun o : ClampObs J => (o.X, o.A))
Proof (Lean source)
lemma clampDesign_measurable {J : ℕ} : Measurable (fun o : ClampObs J => (o.X, o.A)) := by let h : Measurable (fun o : ClampObs J => (o.X, o.A, o.Y)) := Measurable.of_comap_le le_rfl exact (measurable_fst.comp h).prodMk (measurable_fst.comp (measurable_snd.comp h))
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampDesign_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:19
theorem clampOutcome_measurable

clamp outcome is measurable for the specified J input.

Formal statement
J :
Measurable (fun o : ClampObs J => o.Y)
Proof (Lean source)
lemma clampOutcome_measurable {J : ℕ} : Measurable (fun o : ClampObs J => o.Y) := by exact measurable_snd.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampOutcome_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:27
def clampRegressionExtension

Extend the model's regression from its declared dose interval by zero.

Definition (Lean source)
J :
shared
P :
d :
Fin J × ℝ
clampRegressionExtension P d :
if d.2 ∈ Icc (0 : ℝ) 1 then P.mu d.1 d.2 else 0
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampRegressionExtension · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:31
theorem clampRegressionExtension_measurable

clamp regression extension is measurable for the specified J input, the specified P input, the specified beta input, the specified L input, the specified hholder input.

Formal statement
J :
P :
beta L :
hholder :
Proof (Lean source)
lemma clampRegressionExtension_measurable {J : ℕ} (P : ClampLaw J) {beta L : ℝ} (hholder : HolderRegression P beta L) : Measurable (clampRegressionExtension P) := by apply measurable_from_prod_countable_right intro x exact measurable_mu_extension P hholder x
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampRegressionExtension_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:46
theorem clampRegressionExtension_eq

clamp regression extension satisfies the stated identity for the specified J input, the specified P input, the specified x input, the specified a input, the specified ha input.

Formal statement
J :
P :
x :
Fin J
a :
ha :
a ∈ Icc (0 : ℝ) 1
clampRegressionExtension P (x, a) = P.mu x a
Proof (Lean source)
lemma clampRegressionExtension_eq {J : ℕ} (P : ClampLaw J) (x : Fin J) {a : ℝ} (ha : a ∈ Icc (0 : ℝ) 1) : clampRegressionExtension P (x, a) = P.mu x a := by simp [clampRegressionExtension, ha]
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampRegressionExtension_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:54
theorem clampRegressionExtension_mem_Icc

clamp regression extension lies in the stated closed interval for the specified J input, the specified P input, the specified beta input, the specified L input, the specified hholder input, the specified d input.

Formal statement
J :
P :
beta L :
hholder :
d :
Fin J × ℝ
clampRegressionExtension P d ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma clampRegressionExtension_mem_Icc {J : ℕ} (P : ClampLaw J) {beta L : ℝ} (hholder : HolderRegression P beta L) (d : Fin J × ℝ) : clampRegressionExtension P d ∈ Icc (0 : ℝ) 1 := by by_cases ha : d.2 ∈ Icc (0 : ℝ) 1 · simpa [clampRegressionExtension, ha] using (hholder d.1).2.1 d.2 ha · simp [clampRegressionExtension, ha]
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampRegressionExtension_mem_Icc · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:60
theorem clampOutcome_integrable

clamp outcome is integrable for the specified J input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified hmodel input.

Formal statement
J :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
Integrable (fun o : ClampObs J => o.Y) P.dataMeasure
Proof (Lean source)
lemma clampOutcome_integrable {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) : Integrable (fun o : ClampObs J => o.Y) P.dataMeasure := by let _ := hmodel.probability refine Integrable.of_bound clampOutcome_measurable.aestronglyMeasurable 1 ?_ filter_upwards [hmodel.outcomeSupport] with o ho rw [Real.norm_eq_abs] exact abs_le.2 ⟨by linarith [ho.1], ho.2⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampOutcome_integrable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:68
theorem clampRegressionExtension_ae_eq_mu

the stated clamp regression extension almost everywhere identity mu property holds for the specified J input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified hmodel input.

Formal statement
J :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
(fun o : ClampObs J => clampRegressionExtension P (o.X, o.A))
=ᵐ[P.dataMeasure] fun o => P.mu o.X o.A
Proof (Lean source)
lemma clampRegressionExtension_ae_eq_mu {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) : (fun o : ClampObs J => clampRegressionExtension P (o.X, o.A)) =ᵐ[P.dataMeasure] fun o => P.mu o.X o.A := by filter_upwards [hmodel.treatmentSupport] with o ho exact clampRegressionExtension_eq P o.X ho
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampRegressionExtension_ae_eq_mu · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:79
theorem holderRegression_setIntegral

The conditional-expectation regression tie implies the cellwise set-integral identity used by the causal bridge. The result uses the hmodel condition, the hkappa condition, the hcplus condition, the hpmin condition, the hB condition, the hBIcc condition. This is the stated conclusion.

Formal statement
J :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
x :
Fin J
B :
Set
hB :
hBIcc :
B ⊆ Icc (0 : ℝ) 1
(∫ o in {o : ClampObs J | o.X = x ∧ o.A ∈ B}, o.Y ∂P.dataMeasure)
= P.px x * ∫ a in B, P.mu x a * P.pi x a
Proof (Lean source)
lemma holderRegression_setIntegral {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (x : Fin J) (B : Set ℝ) (hB : MeasurableSet B) (hBIcc : B ⊆ Icc (0 : ℝ) 1) : (∫ o in {o : ClampObs J | o.X = x ∧ o.A ∈ B}, o.Y ∂P.dataMeasure) = P.px x * ∫ a in B, P.mu x a * P.pi x a := by let _ := hmodel.probability let design : ClampObs J → Fin J × ℝ := fun o => (o.X, o.A) let E : Set (ClampObs J) := {o | o.X = x ∧ o.A ∈ B} have hdesign : Measurable design := clampDesign_measurable have hE : MeasurableSet E := (measurableSet_eq_fun (measurable_fst.comp (Measurable.of_comap_le le_rfl)) measurable_const).inter (hB.preimage (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) have hEcond : MeasurableSet[comap design inferInstance] E := by have hrect : MeasurableSet (({x} : Set (Fin J)) ×ˢ B) := (measurableSet_singleton x).prod hB have hpre : E = design ⁻¹' (({x} : Set (Fin J)) ×ˢ B) := by ext o simp [E, design] rw [hpre] exact hrect.preimage (Measurable.of_comap_le le_rfl) have hY := clampOutcome_integrable P hmodel have hcond := (hmodel.holder x).2.2.1 have hf := conditionalRegression_integrable P hmodel hkappa hcplus x B hB have htreat := stratumTreatment_integral_eq P hmodel.toBridge hkappa hcplus hpmin x (B.indicator (P.mu x)) hf rw [conditionalTreatment_integral_eq_density P hmodel.toBridge x] at htreat calc (∫ o in {o : ClampObs J | o.X = x ∧ o.A ∈ B}, o.Y ∂P.dataMeasure) = ∫ o in E, o.Y ∂P.dataMeasure := by rfl _ = ∫ o in E, P.dataMeasure[(fun o : ClampObs J => o.Y) | comap design inferInstance] o ∂P.dataMeasure := (setIntegral_condExp hdesign.comap_le hY hEcond).symm _ = ∫ o in E, P.mu o.X o.A ∂P.dataMeasure := by exact setIntegral_congr_ae hE (hcond.mono fun o ho _ => ho) _ = ∫ o, indicator {o : ClampObs J | o.X = x} (fun o => B.indicator (P.mu x) o.A) o ∂P.dataMeasure := by rw [← integral_indicator hE] apply integral_congr_ae filter_upwards with o by_cases hx : o.X = x <;> by_cases ha : o.A ∈ B <;> simp [E, indicator, hx, ha] _ = P.px x * ∫ a in Icc (0 : ℝ) 1, P.pi x a * B.indicator (P.mu x) a := htreat _ = P.px x * ∫ a in B, P.mu x a * P.pi x a := by congr 1 rw [← integral_indicator measurableSet_Icc, ← integral_indicator hB] apply integral_congr_ae filter_upwards with a by_cases ha : a ∈ B · have haI := hBIcc ha simp [Set.indicator_of_mem ha, haI, mul_comm] · by_cases haI : a ∈ Icc (0 : ℝ) 1 <;> simp [Set.indicator_of_notMem ha, haI]
CausalSmith.Stat.LmtpThresholdAtomFrontier.holderRegression_setIntegral · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:143
theorem regressionVersion_setIntegral

Any integrable conditional-regression version satisfies the same cellwise set-integral identity; this is the smoothness-free form used by the continuity-only causal bridge. The result uses the hmodel condition, the hkappa condition, the hcplus condition, the hpmin condition, the hver condition, the hB condition, the hBIcc condition, the hmuInt condition. This is the stated conclusion.

Formal statement
J :
P :
kappa cminus cplus pmin :
hmodel :
BridgeClampModel P kappa cminus cplus pmin
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
mu :
Fin J → ℝ → ℝ
hver :
P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance]
=ᵐ[P.dataMeasure] fun o => mu o.X o.A
x :
Fin J
B :
Set
hB :
hBIcc :
B ⊆ Icc (0 : ℝ) 1
hmuInt :
Integrable (B.indicator (mu x)) (conditionalTreatmentMeasure P x)
(∫ o in {o : ClampObs J | o.X = x ∧ o.A ∈ B}, o.Y ∂P.dataMeasure)
= P.px x * ∫ a in B, mu x a * P.pi x a
Proof (Lean source)
-- @node: regressionVersion_setIntegral lemma regressionVersion_setIntegral {J : ℕ} (P : ClampLaw J) {kappa cminus cplus pmin : ℝ} (hmodel : BridgeClampModel P kappa cminus cplus pmin) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (mu : Fin J → ℝ → ℝ) (hver : P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] fun o => mu o.X o.A) (x : Fin J) (B : Set ℝ) (hB : MeasurableSet B) (hBIcc : B ⊆ Icc (0 : ℝ) 1) (hmuInt : Integrable (B.indicator (mu x)) (conditionalTreatmentMeasure P x)) : (∫ o in {o : ClampObs J | o.X = x ∧ o.A ∈ B}, o.Y ∂P.dataMeasure) = P.px x * ∫ a in B, mu x a * P.pi x a := by let _ := hmodel.probability let design : ClampObs J → Fin J × ℝ := fun o => (o.X, o.A) let E : Set (ClampObs J) := {o | o.X = x ∧ o.A ∈ B} have hdesign : Measurable design := clampDesign_measurable have hE : MeasurableSet E := (measurableSet_eq_fun (measurable_fst.comp (Measurable.of_comap_le le_rfl)) measurable_const).inter (hB.preimage (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) have hEcond : MeasurableSet[comap design inferInstance] E := by rw [show E = design ⁻¹' (({x} : Set (Fin J)) ×ˢ B) by ext o; simp [E, design]] exact ((measurableSet_singleton x).prod hB).preimage (Measurable.of_comap_le le_rfl) have hY : Integrable (fun o : ClampObs J => o.Y) P.dataMeasure := by refine Integrable.of_bound clampOutcome_measurable.aestronglyMeasurable 1 ?_ filter_upwards [hmodel.outcomeSupport] with o ho simpa [Real.norm_eq_abs] using (abs_le.2 ⟨by linarith [ho.1], ho.2⟩) have htreat := stratumTreatment_integral_eq P hmodel hkappa hcplus hpmin x (B.indicator (mu x)) hmuInt rw [conditionalTreatment_integral_eq_density P hmodel x] at htreat calc (∫ o in {o : ClampObs J | o.X = x ∧ o.A ∈ B}, o.Y ∂P.dataMeasure) = ∫ o in E, o.Y ∂P.dataMeasure := by rfl _ = ∫ o in E, P.dataMeasure[(fun o : ClampObs J => o.Y) | comap design inferInstance] o ∂P.dataMeasure := (setIntegral_condExp hdesign.comap_le hY hEcond).symm _ = ∫ o in E, mu o.X o.A ∂P.dataMeasure := setIntegral_congr_ae hE (hver.mono fun o ho _ => ho) _ = ∫ o, indicator {o : ClampObs J | o.X = x} (fun o => B.indicator (mu x) o.A) o ∂P.dataMeasure := by rw [← integral_indicator hE] apply integral_congr_ae filter_upwards with o by_cases hx : o.X = x <;> by_cases ha : o.A ∈ B <;> simp [E, indicator, hx, ha] _ = P.px x * ∫ a in Icc (0 : ℝ) 1, P.pi x a * B.indicator (mu x) a := htreat _ = P.px x * ∫ a in B, mu x a * P.pi x a := by congr 1 rw [← integral_indicator measurableSet_Icc, ← integral_indicator hB] apply integral_congr_ae filter_upwards with a by_cases ha : a ∈ B · have haI := hBIcc ha simp [Set.indicator_of_mem ha, haI, mul_comm] · by_cases haI : a ∈ Icc (0 : ℝ) 1 <;> simp [Set.indicator_of_notMem ha, haI]
CausalSmith.Stat.LmtpThresholdAtomFrontier.regressionVersion_setIntegral · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:208
theorem clampRegression_condExp

the stated clamp regression cond exp property holds for the specified J input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified hmodel input, the specified x₀ input.

Formal statement
J :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
x₀ :
Fin J
P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance]
=ᵐ[P.dataMeasure] clampRegressionExtension P ∘ fun o => (o.X, o.A)
Proof (Lean source)
theorem clampRegression_condExp {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (x₀ : Fin J) : P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] clampRegressionExtension P ∘ fun o => (o.X, o.A) := by have hraw := (hmodel.holder x₀).2.2.1 exact hraw.trans <| (clampRegressionExtension_ae_eq_mu P hmodel).symm
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampRegression_condExp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/RegressionVersion.lean:273
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.SampleBlocks 5 declarations These build-inline bridges restrict the canonical finite product sample to an arbitrary deterministic block, reindex that block by Fin I.card, and connect the resulting coordinate sum to the range-indexed Causalean count

Finite-product transport to deterministic sample blocks

These build-inline bridges restrict the canonical finite product sample to an arbitrary deterministic block, reindex that block by Fin I.card, and connect the resulting coordinate sum to the range-indexed Causalean count API through the canonical infinite-product sample. No ambient i.i.d. stream is assumed.

Membership in the observed clamp model supplies the canonical finite-product sampling certificate at every horizon. Independence and marginal laws follow from the product measure rather than from an ambient sample stream. The result uses the hP condition. This is the stated conclusion.

Formal statement
J n :
beta kappa L cminus cplus pmin :
hP :
ClampModel P beta kappa L cminus cplus pmin
Proof (Lean source)
lemma clampModel_iidSampling {J n : ℕ} {P : ClampLaw J} {beta kappa L cminus cplus pmin : ℝ} (hP : ClampModel P beta kappa L cminus cplus pmin) : IidSampling P n := by let _ : IsProbabilityMeasure P.dataMeasure := hP.probability refine ⟨hP.probability, hP.treatmentSupport, hP.outcomeSupport, ?_, ?_⟩ · change iIndepFun (fun i z => z i) (Measure.pi fun _ : Fin n => P.dataMeasure) exact iIndepFun_pi (μ := fun _ : Fin n => P.dataMeasure) (X := fun _ : Fin n => id) (fun _ => measurable_id.aemeasurable) · intro i change (Measure.pi (fun _ : Fin n => P.dataMeasure)).map (fun z => z i) = P.dataMeasure exact (MeasureTheory.measurePreserving_eval (fun _ : Fin n => P.dataMeasure) i).map_eq
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampModel_iidSampling · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/SampleBlocks.lean:27
theorem contClampModel_iidSampling

Continuity-only model membership supplies the same canonical finite-product sampling certificate. The result uses the hP condition. This is the stated conclusion.

Formal statement
J n :
kappa cminus cplus pmin deltaBar :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
Proof (Lean source)
lemma contClampModel_iidSampling {J n : ℕ} {P : ClampLaw J} {kappa cminus cplus pmin deltaBar : ℝ} (hP : ContClampModel P kappa cminus cplus pmin deltaBar) : IidSampling P n := by let _ : IsProbabilityMeasure P.dataMeasure := hP.probability refine ⟨hP.probability, hP.treatmentSupport, hP.outcomeSupport, ?_, ?_⟩ · change iIndepFun (fun i z => z i) (Measure.pi fun _ : Fin n => P.dataMeasure) exact iIndepFun_pi (μ := fun _ : Fin n => P.dataMeasure) (X := fun _ : Fin n => id) (fun _ => measurable_id.aemeasurable) · intro i change (Measure.pi (fun _ : Fin n => P.dataMeasure)).map (fun z => z i) = P.dataMeasure exact (MeasureTheory.measurePreserving_eval (fun _ : Fin n => P.dataMeasure) i).map_eq
CausalSmith.Stat.LmtpThresholdAtomFrontier.contClampModel_iidSampling · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/SampleBlocks.lean:46
theorem block_reindexed_law_eq

After increasing-order reindexing, the tuple retained by a deterministic block has the ordinary product law on Fin I.card. This is the stated conclusion.

Formal statement
X :
n :
I :
(Measure.pi (fun _ : Fin n => P)).map (fun z => fun j : Fin I.card => z ((I.orderIsoOfFin rfl) j).1)
= Measure.pi (fun _ : Fin I.card => P)
Proof (Lean source)
lemma block_reindexed_law_eq {X : Type*} [MeasurableSpace X] (P : Measure X) [IsProbabilityMeasure P] {n : ℕ} (I : Finset (Fin n)) : (Measure.pi (fun _ : Fin n => P)).map (fun z => fun j : Fin I.card => z ((I.orderIsoOfFin rfl) j).1) = Measure.pi (fun _ : Fin I.card => P) := by let e : Fin I.card ↪ Fin n := ⟨fun j => ((I.orderIsoOfFin rfl) j).1, fun _ _ h => (I.orderIsoOfFin rfl).injective (Subtype.ext h)⟩ have hindep : iIndepFun (fun j : Fin I.card => fun z : Fin n → X => z (e j)) (Measure.pi fun _ : Fin n => P) := by exact (iIndepFun_pi (μ := fun _ : Fin n => P) (X := fun _ : Fin n => id) (fun _ => measurable_id.aemeasurable)).precomp e.injective have hmap := hindep.map_fun_eq_pi_map (fun j => (measurable_pi_apply (e j)).aemeasurable) calc (Measure.pi (fun _ : Fin n => P)).map (fun z => fun j : Fin I.card => z ((I.orderIsoOfFin rfl) j).1) = Measure.pi (fun j : Fin I.card => (Measure.pi (fun _ : Fin n => P)).map (fun z => z (e j))) := by simpa [e] using hmap _ = Measure.pi (fun _ : Fin I.card => P) := by congr 1 funext j exact (MeasureTheory.measurePreserving_eval (fun _ : Fin n => P) (e j)).map_eq
CausalSmith.Stat.LmtpThresholdAtomFrontier.block_reindexed_law_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/SampleBlocks.lean:64
theorem block_count_law_eq

The law of a statistic summed over an arbitrary deterministic block is the law of the same statistic summed over Fin I.card product coordinates. The result uses the hf condition. This is the stated conclusion.

Formal statement
X :
n :
I :
f :
X → ℝ
hf :
(Measure.pi (fun _ : Fin n => P)).map (fun z => ∑ i ∈ I, f (z i))
= (Measure.pi (fun _ : Fin I.card => P)).map (fun z => ∑ j : Fin I.card, f (z j))
Proof (Lean source)
lemma block_count_law_eq {X : Type*} [MeasurableSpace X] (P : Measure X) [IsProbabilityMeasure P] {n : ℕ} (I : Finset (Fin n)) (f : X → ℝ) (hf : Measurable f) : (Measure.pi (fun _ : Fin n => P)).map (fun z => ∑ i ∈ I, f (z i)) = (Measure.pi (fun _ : Fin I.card => P)).map (fun z => ∑ j : Fin I.card, f (z j)) := by let restrictBlock : (Fin n → X) → (Fin I.card → X) := fun z j => z ((I.orderIsoOfFin rfl) j).1 let blockSum : (Fin I.card → X) → ℝ := fun z => ∑ j, f (z j) have hrestrict : Measurable restrictBlock := by exact measurable_pi_lambda _ fun j => measurable_pi_apply _ have hsum : Measurable blockSum := by exact Finset.measurable_fun_sum _ fun j _ => hf.comp (measurable_pi_apply j) have hfun : (fun z : Fin n → X => ∑ i ∈ I, f (z i)) = blockSum ∘ restrictBlock := by funext z dsimp [blockSum, restrictBlock] rw [← Finset.sum_attach] exact (Equiv.sum_comp (I.orderIsoOfFin rfl).toEquiv (fun i : {i : Fin n // i ∈ I} => f (z i.1))).symm rw [hfun, ← MeasureTheory.Measure.map_map hsum hrestrict, block_reindexed_law_eq P I]
CausalSmith.Stat.LmtpThresholdAtomFrontier.block_count_law_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/SampleBlocks.lean:94
theorem range_count_transport

A range-indexed count on the canonical infinite-product stream has the same law as the corresponding sum on the finite product Fin m → X. The result uses the hf condition. This is the stated conclusion.

Formal statement
X :
m :
f :
X → ℝ
hf :
(Measure.pi (fun _ : Fin m => P)).map (fun z => ∑ j : Fin m, f (z j))
= (Measure.infinitePi (fun _ : ℕ => P)).map (bernoulliCount (iidSample_infinitePi P) f m)
Proof (Lean source)
lemma range_count_transport {X : Type*} [MeasurableSpace X] (P : Measure X) [IsProbabilityMeasure P] (m : ℕ) (f : X → ℝ) (hf : Measurable f) : (Measure.pi (fun _ : Fin m => P)).map (fun z => ∑ j : Fin m, f (z j)) = (Measure.infinitePi (fun _ : ℕ => P)).map (bernoulliCount (Causalean.Stat.iidSample_infinitePi P) f m) := by let S := Causalean.Stat.iidSample_infinitePi P let first : (ℕ → X) → (Fin m → X) := fun w j => S.Z j w let total : (Fin m → X) → ℝ := fun z => ∑ j, f (z j) have hfirst : Measurable first := Causalean.Stat.iidSample_finN_measurable S m have htotal : Measurable total := by exact Finset.measurable_fun_sum _ fun j _ => hf.comp (measurable_pi_apply j) have hfirstLaw : (Measure.infinitePi (fun _ : ℕ => P)).map first = Measure.pi (fun _ : Fin m => P) := by exact Causalean.Stat.iidSample_finN_pushforward S m have hcount : bernoulliCount S f m = total ∘ first := by funext w change (∑ i ∈ range m, f (S.Z i w)) = ∑ j : Fin m, f (S.Z j w) exact (Fin.sum_univ_eq_sum_range (fun i => f (S.Z i w)) m).symm rw [← hfirstLaw, MeasureTheory.Measure.map_map htotal hfirst, ← hcount]
CausalSmith.Stat.LmtpThresholdAtomFrontier.range_count_transport · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/SampleBlocks.lean:121
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.ShiftedPowerCoercivity 4 declarations This module isolates the reusable compactification step behind the population Gram lower bound for polynomially thinned local designs.

Uniform coercivity for shifted-power moment matrices

This module isolates the reusable compactification step behind the population Gram lower bound for polynomially thinned local designs.

theorem uniform_shifted_power_moment_coercivity Lemma 1 in the paper ↗

Normalized monomial moment matrices weighted by (ρ + u)^κ are uniformly coercive over all nonnegative shifts ρ when κ is nonnegative. The result uses the hkappa condition. This is the stated conclusion.

Formal statement
ell :
kappa :
hkappa :
0 ≤ kappa
∃ c : ℝ,
0 < c
conclusion 1
rho :
0 ≤ rho
z :
Fin (ell + 1) → ℝ
c * (∑ i, (z i) ^ 2) ≤ matrixQuadratic (refMomentMatrix ell kappa rho) z
Proof (Lean source)
theorem uniform_shifted_power_moment_coercivity (ell : ℕ) {kappa : ℝ} (hkappa : 0 ≤ kappa) : ∃ c : ℝ, 0 < c ∧ ∀ rho : ℝ, 0 ≤ rho → ∀ z : Fin (ell + 1) → ℝ, c * (∑ i, (z i) ^ 2) ≤ matrixQuadratic (refMomentMatrix ell kappa rho) z := by obtain ⟨c, hcpos, hcoercive⟩ := powerPolynomialEnergy_coercive ell hkappa refine ⟨c, hcpos, ?_⟩ intro rho hrho z let P : ℝ → ℝ := fun u => ∑ i, z i * u ^ (i : ℕ) let D : ℝ := ∫ u in (0 : ℝ)..1, (rho + u) ^ kappa let N : ℝ := ∫ u in (0 : ℝ)..1, (P u) ^ 2 * (rho + u) ^ kappa let E : ℝ := powerPolynomialEnergy ell kappa z let R : ℝ := (rho + 1) ^ kappa have hrho1 : 0 < rho + 1 := by linarith have hRpos : 0 < R := Real.rpow_pos_of_pos hrho1 kappa have hDpos : 0 < D := by dsimp [D] apply intervalIntegral.integral_pos (by norm_num) · fun_prop · intro x hx exact Real.rpow_nonneg (by linarith [hx.1]) _ · refine ⟨1, by norm_num, ?_⟩ exact Real.rpow_pos_of_pos hrho1 kappa have hDle : D ≤ R := by dsimp [D, R] have hmono := intervalIntegral.integral_mono_on (show (0 : ℝ) ≤ 1 by norm_num) (show IntervalIntegrable (fun u : ℝ => (rho + u) ^ kappa) volume 0 1 by apply Continuous.intervalIntegrable fun_prop) (show IntervalIntegrable (fun _u : ℝ => (rho + 1) ^ kappa) volume 0 1 by apply Continuous.intervalIntegrable fun_prop) (fun u hu => Real.rpow_le_rpow (by linarith [hu.1]) (by linarith [hu.2]) hkappa) simpa using hmono have hEN : R * E ≤ N := by dsimp [N, E, R] rw [powerPolynomialEnergy_eq_integral ell hkappa] rw [← intervalIntegral.integral_const_mul] apply intervalIntegral.integral_mono_on (by norm_num) · apply Continuous.intervalIntegrable fun_prop · apply Continuous.intervalIntegrable fun_prop · intro u hu have hu0 : 0 ≤ u := hu.1 have hbase : u * (rho + 1) ≤ rho + u := by nlinarith [hrho, hu.2] have hpow := Real.rpow_le_rpow (mul_nonneg hu0 hrho1.le) hbase hkappa rw [Real.mul_rpow hu0 hrho1.le] at hpow have hsq : 0 ≤ (∑ i, z i * u ^ (i : ℕ)) ^ 2 := sq_nonneg _ nlinarith [mul_le_mul_of_nonneg_left hpow hsq] have hE_nonneg : 0 ≤ E := by exact (mul_nonneg hcpos.le (sum_nonneg fun _ _ => sq_nonneg _)).trans (hcoercive z) have hED : D * E ≤ N := (mul_le_mul_of_nonneg_right hDle hE_nonneg).trans hEN calc c * ∑ i, (z i) ^ 2 ≤ E := hcoercive z _ ≤ N / D := (le_div_iff₀ hDpos).2 (by simpa [mul_comm] using hED) _ = matrixQuadratic (refMomentMatrix ell kappa rho) z := by rw [matrixQuadratic_refMomentMatrix_eq ell hkappa rho]
CausalSmith.Stat.LmtpThresholdAtomFrontier.uniform_shifted_power_moment_coercivity · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ShiftedPowerCoercivity.lean:239
theorem lambdaStar_pos Lemma 2 in the paper ↗

The uniform population-Gram constant is positive under positive envelope constants and a nonnegative thinning exponent. The result uses the hkappa condition, the hcminus condition, the hcplus condition. This is the stated conclusion.

Formal statement
ell :
kappa cminus cplus :
hkappa :
0 ≤ kappa
hcminus :
0 < cminus
hcplus :
0 < cplus
0 < lambdaStar ell kappa cminus cplus
Proof (Lean source)
theorem lambdaStar_pos (ell : ℕ) {kappa cminus cplus : ℝ} (hkappa : 0 ≤ kappa) (hcminus : 0 < cminus) (hcplus : 0 < cplus) : 0 < lambdaStar ell kappa cminus cplus := by obtain ⟨c, hcpos, hcoercive⟩ := uniform_shifted_power_moment_coercivity ell hkappa have hqmin (rho : ℝ) (hrho : 0 ≤ rho) : c ≤ quadraticMin (refMomentMatrix ell kappa rho) := by unfold quadraticMin apply le_csInf · let e : Fin (ell + 1) := 0 let zunit : Fin (ell + 1) → ℝ := single e 1 refine ⟨matrixQuadratic (refMomentMatrix ell kappa rho) zunit, zunit, ?_, rfl⟩ classical simp [zunit, e, Pi.single_apply] · intro q hq rcases hq with ⟨z, hzunit, rfl⟩ have h := hcoercive rho hrho z rw [hzunit, mul_one] at h exact h have hset_nonempty : {q : ℝ | ∃ rho : ℝ, 0 ≤ rho ∧ q = quadraticMin (refMomentMatrix ell kappa rho)}.Nonempty := by refine ⟨quadraticMin (refMomentMatrix ell kappa 0), 0, le_rfl, rfl⟩ have hsinf : c ≤ sInf {q : ℝ | ∃ rho : ℝ, 0 ≤ rho ∧ q = quadraticMin (refMomentMatrix ell kappa rho)} := by apply le_csInf hset_nonempty intro q hq rcases hq with ⟨rho, hrho, rfl⟩ exact hqmin rho hrho unfold lambdaStar exact mul_pos (div_pos hcminus hcplus) (lt_of_lt_of_le hcpos hsinf)
theorem lambdaStar_refMomentMatrix_coercive

lambdaStar gives the advertised coercivity for every normalized shifted power moment matrix. The result uses the hkappa condition, the hcminus condition, the hcplus condition, the hrho condition. This is the stated conclusion.

Formal statement
ell :
kappa cminus cplus :
hkappa :
0 ≤ kappa
hcminus :
0 < cminus
hcplus :
0 < cplus
rho :
hrho :
0 ≤ rho
v :
Fin (ell + 1) → ℝ
lambdaStar ell kappa cminus cplus * (∑ i, (v i) ^ 2)
≤ (cminus / cplus) * matrixQuadratic (refMomentMatrix ell kappa rho) v
Proof (Lean source)
-- @node: lambdaStar_refMomentMatrix_coercive theorem lambdaStar_refMomentMatrix_coercive (ell : ℕ) {kappa cminus cplus : ℝ} (hkappa : 0 ≤ kappa) (hcminus : 0 < cminus) (hcplus : 0 < cplus) (rho : ℝ) (hrho : 0 ≤ rho) (v : Fin (ell + 1) → ℝ) : lambdaStar ell kappa cminus cplus * (∑ i, (v i) ^ 2) ≤ (cminus / cplus) * matrixQuadratic (refMomentMatrix ell kappa rho) v := by classical obtain ⟨c, hc, hcoercive⟩ := uniform_shifted_power_moment_coercivity ell hkappa let Q := {q : ℝ | ∃ z : Fin (ell + 1) → ℝ, (∑ i, (z i) ^ 2) = 1 ∧ q = matrixQuadratic (refMomentMatrix ell kappa rho) z} have hQne : Q.Nonempty := by let e : Fin (ell + 1) := 0 let z : Fin (ell + 1) → ℝ := single e 1 refine ⟨matrixQuadratic (refMomentMatrix ell kappa rho) z, z, ?_, rfl⟩ simp [z, e, Pi.single_apply] have hQbelow : BddBelow Q := by refine ⟨c, ?_⟩ intro q hq rcases hq with ⟨z, hz, rfl⟩ simpa [hz] using hcoercive rho hrho z have hsinf_le : sInf {q : ℝ | ∃ r : ℝ, 0 ≤ r ∧ q = quadraticMin (refMomentMatrix ell kappa r)} ≤ quadraticMin (refMomentMatrix ell kappa rho) := by apply csInf_le · refine ⟨c, ?_⟩ intro q hq rcases hq with ⟨r, hr, rfl⟩ unfold quadraticMin exact le_csInf (by let e : Fin (ell + 1) := 0 let z : Fin (ell + 1) → ℝ := single e 1 refine ⟨matrixQuadratic (refMomentMatrix ell kappa r) z, z, ?_, rfl⟩ simp [z, e, Pi.single_apply]) (by intro q hq rcases hq with ⟨z, hz, rfl⟩ simpa [hz] using hcoercive r hr z) · exact ⟨rho, hrho, rfl⟩ have hqmin : quadraticMin (refMomentMatrix ell kappa rho) * (∑ i, (v i) ^ 2) ≤ matrixQuadratic (refMomentMatrix ell kappa rho) v := by let S : ℝ := ∑ i, (v i) ^ 2 by_cases hS : S = 0 · have hv : v = 0 := by funext i have hi : (v i) ^ 2 = 0 := le_antisymm (hS ▸ Finset.single_le_sum (fun j _ => sq_nonneg (v j)) (Finset.mem_univ i)) (sq_nonneg _) exact sq_eq_zero_iff.mp hi simp [S, hS, hv, matrixQuadratic] · have hSpos : 0 < S := lt_of_le_of_ne (sum_nonneg fun _ _ => sq_nonneg _) (Ne.symm hS) let r := Real.sqrt S let z : Fin (ell + 1) → ℝ := r⁻¹ • v have hr : 0 < r := Real.sqrt_pos.2 hSpos have hr_sq0 : r ^ 2 = S := Real.sq_sqrt hSpos.le have hz : ∑ i, (z i) ^ 2 = 1 := by change ∑ i, (r⁻¹ * v i) ^ 2 = 1 calc ∑ i, (r⁻¹ * v i) ^ 2 = r⁻¹ ^ 2 * ∑ i, (v i) ^ 2 := by rw [Finset.mul_sum] apply Finset.sum_congr rfl intro i hi ring _ = r⁻¹ ^ 2 * r ^ 2 := by rw [show (∑ i, (v i) ^ 2) = S from rfl, ← hr_sq0] _ = 1 := by field_simp have hmin : quadraticMin (refMomentMatrix ell kappa rho) ≤ matrixQuadratic (refMomentMatrix ell kappa rho) z := by unfold quadraticMin exact csInf_le hQbelow ⟨z, hz, rfl⟩ have hscale : matrixQuadratic (refMomentMatrix ell kappa rho) z = r⁻¹ ^ 2 * matrixQuadratic (refMomentMatrix ell kappa rho) v := by simp [z, matrixQuadratic, Finset.mul_sum] ring_nf rw [hscale] at hmin rw [show (∑ i, (v i) ^ 2) = r ^ 2 by exact hr_sq0.symm] calc quadraticMin (refMomentMatrix ell kappa rho) * r ^ 2 ≤ (r⁻¹ ^ 2 * matrixQuadratic (refMomentMatrix ell kappa rho) v) * r ^ 2 := mul_le_mul_of_nonneg_right hmin (sq_nonneg r) _ = _ := by field_simp unfold lambdaStar have hcoef : 0 ≤ cminus / cplus := div_nonneg hcminus.le hcplus.le have hsum : 0 ≤ ∑ i, (v i) ^ 2 := sum_nonneg fun _ _ => sq_nonneg _ calc cminus / cplus * sInf {q : ℝ | ∃ r : ℝ, 0 ≤ r ∧ q = quadraticMin (refMomentMatrix ell kappa r)} * (∑ i, (v i) ^ 2) ≤ cminus / cplus * quadraticMin (refMomentMatrix ell kappa rho) * (∑ i, (v i) ^ 2) := by exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hsinf_le hcoef) hsum _ ≤ cminus / cplus * matrixQuadratic (refMomentMatrix ell kappa rho) v := by rw [mul_assoc] exact mul_le_mul_of_nonneg_left hqmin (div_pos hcminus hcplus).le
CausalSmith.Stat.LmtpThresholdAtomFrontier.lambdaStar_refMomentMatrix_coercive · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ShiftedPowerCoercivity.lean:343
theorem lambdaStar_scaled_power_window_coercive Lemma 6 in the paper ↗

The normalized lambdaStar coercivity, transported from the unit interval to a positive local window. The result uses the hkappa condition, the hcminus condition, the hcplus condition, the hdelta condition, the hh condition. This is the stated conclusion.

Formal statement
ell :
kappa cminus cplus delta h :
hkappa :
0 ≤ kappa
hcminus :
0 < cminus
hcplus :
0 < cplus
hdelta :
0 ≤ delta
hh :
0 < h
v :
Fin (ell + 1) → ℝ
lambdaStar ell kappa cminus cplus * cplus * (∫ a in delta..delta + h, a ^ kappa) * (∑ i, (v i) ^ 2)
≤ cminus * ∫ a in delta..delta
+ h, (∑ i, v i * ((a - delta) / h) ^ (i : ℕ)) ^ 2 * a ^ kappa
Proof (Lean source)
-- @node: lambdaStar_scaled_power_window_coercive theorem lambdaStar_scaled_power_window_coercive (ell : ℕ) {kappa cminus cplus delta h : ℝ} (hkappa : 0 ≤ kappa) (hcminus : 0 < cminus) (hcplus : 0 < cplus) (hdelta : 0 ≤ delta) (hh : 0 < h) (v : Fin (ell + 1) → ℝ) : lambdaStar ell kappa cminus cplus * cplus * (∫ a in delta..delta + h, a ^ kappa) * (∑ i, (v i) ^ 2) ≤ cminus * ∫ a in delta..delta + h, (∑ i, v i * ((a - delta) / h) ^ (i : ℕ)) ^ 2 * a ^ kappa := by let rho := delta / h let D := ∫ u in (0 : ℝ)..1, (rho + u) ^ kappa let N := ∫ u in (0 : ℝ)..1, (∑ i, v i * u ^ (i : ℕ)) ^ 2 * (rho + u) ^ kappa have hrho : 0 ≤ rho := div_nonneg hdelta hh.le have hD : 0 < D := by dsimp [D] apply intervalIntegral.integral_pos (by norm_num) · fun_prop · intro u hu exact Real.rpow_nonneg (by linarith [hu.1]) _ · refine ⟨1, by norm_num, ?_⟩ exact Real.rpow_pos_of_pos (by dsimp [rho]; positivity) _ have href := lambdaStar_refMomentMatrix_coercive ell hkappa hcminus hcplus rho hrho v rw [matrixQuadratic_refMomentMatrix_eq ell hkappa rho] at href change lambdaStar ell kappa cminus cplus * (∑ i, (v i) ^ 2) ≤ (cminus / cplus) * (N / D) at href have hunit : lambdaStar ell kappa cminus cplus * cplus * D * (∑ i, (v i) ^ 2) ≤ cminus * N := by have hcD : 0 < cplus * D := mul_pos hcplus hD calc lambdaStar ell kappa cminus cplus * cplus * D * (∑ i, (v i) ^ 2) = (lambdaStar ell kappa cminus cplus * (∑ i, (v i) ^ 2)) * (cplus * D) := by ring _ ≤ ((cminus / cplus) * (N / D)) * (cplus * D) := mul_le_mul_of_nonneg_right href hcD.le _ = cminus * N := by field_simp [hcplus.ne', hD.ne'] have hscale (F : ℝ → ℝ) : (∫ a in delta..delta + h, F a) = h * ∫ u in (0 : ℝ)..1, F (delta + h * u) := by rw [intervalIntegral.mul_integral_comp_add_mul] congr 1 <;> ring have hpow (u : ℝ) (hu : u ∈ Icc (0 : ℝ) 1) : (delta + h * u) ^ kappa = h ^ kappa * (rho + u) ^ kappa := by have hr : delta + h * u = h * (rho + u) := by dsimp [rho] field_simp [hh.ne'] rw [hr, Real.mul_rpow hh.le (add_nonneg hrho hu.1)] have hden : (∫ a in delta..delta + h, a ^ kappa) = h * h ^ kappa * D := by rw [hscale] change h * (∫ u in (0 : ℝ)..1, (delta + h * u) ^ kappa) = _ rw [show (∫ u in (0 : ℝ)..1, (delta + h * u) ^ kappa) = ∫ u in (0 : ℝ)..1, h ^ kappa * (rho + u) ^ kappa by apply intervalIntegral.integral_congr intro u hu rw [Set.uIcc_of_le (by norm_num)] at hu exact hpow u hu] rw [intervalIntegral.integral_const_mul] simp only [D] ring have hnum : (∫ a in delta..delta + h, (∑ i, v i * ((a - delta) / h) ^ (i : ℕ)) ^ 2 * a ^ kappa) = h * h ^ kappa * N := by rw [hscale] change h * (∫ u in (0 : ℝ)..1, (∑ i, v i * ((delta + h * u - delta) / h) ^ (i : ℕ)) ^ 2 * (delta + h * u) ^ kappa) = _ rw [show (∫ u in (0 : ℝ)..1, (∑ i, v i * ((delta + h * u - delta) / h) ^ (i : ℕ)) ^ 2 * (delta + h * u) ^ kappa) = ∫ u in (0 : ℝ)..1, h ^ kappa * ((∑ i, v i * u ^ (i : ℕ)) ^ 2 * (rho + u) ^ kappa) by apply intervalIntegral.integral_congr intro u hu rw [Set.uIcc_of_le (by norm_num)] at hu dsimp only rw [show (delta + h * u - delta) / h = u by field_simp [hh.ne'] <;> ring, hpow u hu] ring] rw [intervalIntegral.integral_const_mul] simp only [N] ring rw [hden, hnum] have hhpow : 0 ≤ h * h ^ kappa := mul_nonneg hh.le (Real.rpow_nonneg hh.le _) calc lambdaStar ell kappa cminus cplus * cplus * (h * h ^ kappa * D) * (∑ i, (v i) ^ 2) = (h * h ^ kappa) * (lambdaStar ell kappa cminus cplus * cplus * D * (∑ i, (v i) ^ 2)) := by ring _ ≤ (h * h ^ kappa) * (cminus * N) := mul_le_mul_of_nonneg_left hunit hhpow _ = cminus * (h * h ^ kappa * N) := by ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.lambdaStar_scaled_power_window_coercive · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/ShiftedPowerCoercivity.lean:444
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.SurjectivityLift 3 declarations Quantile lifts of observed clamp laws

Quantile lifts of observed clamp laws

theorem exists_fullData_quantile_lift

A measurable bounded conditional-regression version can be realized by a single independent uniform latent variable while preserving the observed law. This uses a probability law, bounded outcomes, positive stratum masses, a measurable bounded regression, the conditional-mean identity, and stratumwise continuity; such a full-data lift exists.

Formal statement
J :
P :
deltaBar :
hprob :
IsProbabilityMeasure P.dataMeasure
hout :
∀ᵐ o ∂P.dataMeasure, o.Y ∈ Icc (0 : ℝ) 1
hmass_pos :
∀ x : Fin J, 0 < (P.dataMeasure.map (fun o => o.X)).real {x}
m :
Fin J × ℝ → ℝ
hm :
hm_unit :
∀ d, m d ∈ Icc (0 : ℝ) 1
hcond :
P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance]
=ᵐ[P.dataMeasure] fun o => m (o.X, o.A)
hm_cont :
∀ x : Fin J, ContinuousOn (fun a => m (x, a)) (Icc (0 : ℝ) deltaBar)
∃ PF : FullDataLaw J,
conclusion 1
PF.observedMargin = P
conclusion 3
conclusion 4
Proof (Lean source)
lemma exists_fullData_quantile_lift {J : ℕ} (P : ClampLaw J) (deltaBar : ℝ) (hprob : IsProbabilityMeasure P.dataMeasure) (hout : ∀ᵐ o ∂P.dataMeasure, o.Y ∈ Icc (0 : ℝ) 1) (hmass_pos : ∀ x : Fin J, 0 < (P.dataMeasure.map (fun o => o.X)).real {x}) (m : Fin J × ℝ → ℝ) (hm : Measurable m) (hm_unit : ∀ d, m d ∈ Icc (0 : ℝ) 1) (hcond : P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] fun o => m (o.X, o.A)) (hm_cont : ∀ x : Fin J, ContinuousOn (fun a => m (x, a)) (Icc (0 : ℝ) deltaBar)) : ∃ PF : FullDataLaw J, PF.observedMargin = P ∧ LatentResponseConsistency PF ∧ LatentExchangeability PF ∧ FullDataResponseContinuity PF deltaBar := by let _ := hprob let D : ClampObs J → Fin J × ℝ := fun o => (o.X, o.A) let Y : ClampObs J → ℝ := fun o => o.Y have hD : Measurable D := clampDesign_measurable have hY : Measurable Y := clampOutcome_measurable let ν : Measure (Fin J × ℝ) := P.dataMeasure.map D letI : IsProbabilityMeasure ν := Measure.isProbabilityMeasure_map hD.aemeasurable let κraw : Kernel (Fin J × ℝ) ℝ := ProbabilityTheory.condDistrib Y D P.dataMeasure letI : IsMarkovKernel κraw := inferInstance let κ0 : Kernel (Fin J × ℝ) ℝ := κraw.map clampUnit letI : IsMarkovKernel κ0 := ProbabilityTheory.Kernel.IsMarkovKernel.map κraw measurable_clampUnit let fiberMean : Fin J × ℝ → ℝ := fun d => ∫ y, y ∂κ0 d have hκraw_κ0 : (κraw : (Fin J × ℝ) → Measure ℝ) =ᵐ[ν] κ0 := by have hclamp : (fun o : ClampObs J => clampUnit (Y o)) =ᵐ[P.dataMeasure] Y := by filter_upwards [hout] with o ho simp only [Y] unfold clampUnit simp [ho.1, ho.2] have hc : (ProbabilityTheory.condDistrib (clampUnit ∘ Y) D P.dataMeasure : Kernel (Fin J × ℝ) ℝ) =ᵐ[ν] (ProbabilityTheory.condDistrib Y D P.dataMeasure).map clampUnit := ProbabilityTheory.condDistrib_comp (μ := P.dataMeasure) (X := D) hY.aemeasurable measurable_clampUnit have heq : ProbabilityTheory.condDistrib (clampUnit ∘ Y) D P.dataMeasure = κraw := ProbabilityTheory.condDistrib_congr_left hclamp rw [heq] at hc simpa only [ν, κ0, κraw] using hc have hfiber_meas : Measurable fiberMean := by exact stronglyMeasurable_id.integral_kernel.measurable have hfiber_ae : fiberMean =ᵐ[ν] m := by have hce := ProbabilityTheory.condExp_ae_eq_integral_condDistrib hD hY.aemeasurable stronglyMeasurable_id (Integrable.of_bound hY.aestronglyMeasurable 1 <| hout.mono fun o ho => by change |o.Y| ≤ 1 exact abs_le.2 ⟨by linarith [ho.1], ho.2⟩) have hraw : (fun o => ∫ y, y ∂κraw (D o)) =ᵐ[P.dataMeasure] fun o => m (D o) := hce.symm.trans hcond have hzero : (fun d => ∫ y, y ∂κraw d) =ᵐ[ν] fiberMean := hκraw_κ0.mono fun d hd => by simp only [fiberMean, hd] have hpull : (fun o => fiberMean (D o)) =ᵐ[P.dataMeasure] fun o => m (D o) := (hzero.comp_tendsto (Measure.tendsto_ae_map hD.aemeasurable)).symm.trans hraw exact (MeasureTheory.ae_map_iff hD.aemeasurable (measurableSet_eq_fun hfiber_meas hm)).mpr hpull let bad : Set (Fin J × ℝ) := {d | fiberMean d ≠ m d} have hbad : MeasurableSet bad := (measurableSet_eq_fun hfiber_meas hm).compl let κdirac : Kernel (Fin J × ℝ) ℝ := ProbabilityTheory.Kernel.deterministic m hm letI : IsMarkovKernel κdirac := inferInstance let κ : Kernel (Fin J × ℝ) ℝ := ProbabilityTheory.Kernel.piecewise hbad κdirac κ0 letI : IsMarkovKernel κ := inferInstance have hκ_ae : (κ : (Fin J × ℝ) → Measure ℝ) =ᵐ[ν] κ0 := by filter_upwards [hfiber_ae] with d hd simp [κ, bad, ProbabilityTheory.Kernel.piecewise_apply, hd] have hκ_support : SupportedOnUnitInterval κ := by intro d by_cases hd : d ∈ bad · rw [ProbabilityTheory.Kernel.piecewise_apply, if_pos hd] rw [ProbabilityTheory.Kernel.deterministic_apply] simp [hm_unit d] · rw [ProbabilityTheory.Kernel.piecewise_apply, if_neg hd] simp only [κ, κ0] rw [ProbabilityTheory.Kernel.map_apply' κraw measurable_clampUnit d measurableSet_Icc] have hpre : clampUnit ⁻¹' Icc (0 : ℝ) 1 = univ := by ext y simp only [Set.mem_preimage, Set.mem_Icc, Set.mem_univ, iff_true] exact clampUnit_in_unit y rw [hpre] haveI : IsProbabilityMeasure (κraw d) := inferInstance exact measure_univ have hκ_mean : ∀ d, (∫ y, y ∂κ d) = m d := by intro d by_cases hd : d ∈ bad · rw [ProbabilityTheory.Kernel.integral_piecewise, if_pos hd] simp [κ, κdirac] · rw [ProbabilityTheory.Kernel.integral_piecewise, if_neg hd] exact not_ne_iff.mp hd let q : (Fin J × ℝ) → unitInterval → ℝ := fun d u => kernelUnitQuantile κ d u have hq : Measurable (Function.uncurry q) := by exact measurable_subtype_coe.comp (measurable_kernelUnitQuantile κ) have hqlaw : ∀ d, Measure.map (q d) volume = κ d := by intro d exact map_kernelUnitQuantile κ hκ_support d let base : Measure ((Fin J × ℝ) × unitInterval) := ν.prod volume letI : IsProbabilityMeasure base := inferInstance let H : ((Fin J × ℝ) × unitInterval) → (Fin J × ℝ) × ℝ := fun p => (p.1, q p.1 p.2) have hH : Measurable H := measurable_fst.prodMk hq have hbase_joint : Measure.map H base = ν.compProd κ := by exact map_prod_realization_eq_compProd ν volume κ q hq hqlaw have hκraw_joint : ν.compProd κraw = Measure.map (fun o => (D o, Y o)) P.dataMeasure := ProbabilityTheory.compProd_map_condDistrib hY.aemeasurable have hκraw_κ : (κraw : (Fin J × ℝ) → Measure ℝ) =ᵐ[ν] κ := hκraw_κ0.trans hκ_ae.symm have hjoint : Measure.map H base = Measure.map (fun o => (D o, Y o)) P.dataMeasure := by rw [hbase_joint, Measure.compProd_congr hκraw_κ.symm, hκraw_joint] let obsMk : (Fin J × ℝ) × ℝ → ClampObs J := fun p => ClampObs.mk p.1.1 p.1.2 p.2 have hobsMk : Measurable obsMk := measurable_clampObs_of_design_outcome have hobs_joint : Measure.map obsMk (Measure.map H base) = P.dataMeasure := by rw [hjoint, Measure.map_map hobsMk (hD.prodMk hY)] have hid : obsMk ∘ (fun o : ClampObs J => (D o, Y o)) = id := by funext o rfl rw [hid, Measure.map_id] let F : ((Fin J × ℝ) × unitInterval) → ClampObs J × unitInterval := fun p => (obsMk (H p), p.2) have hF : Measurable F := (hobsMk.comp hH).prodMk measurable_snd have hmargin : (Measure.map F base).map fst = P.dataMeasure := by rw [Measure.map_map measurable_fst hF] have hcomp : fst ∘ F = obsMk ∘ H := by funext p; rfl rw [hcomp, ← Measure.map_map hobsMk hH, hobs_joint] let potfun : ℝ → (ClampObs J × unitInterval) → ℝ := fun a z => q (z.1.X, a) z.2 have hpotfun : Measurable (Function.uncurry potfun) := by change Measurable (Function.uncurry q ∘ fun p : ℝ × (ClampObs J × unitInterval) => ((p.2.1.X, p.1), p.2.2)) have hXobs : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) have hX : Measurable (fun p : ℝ × (ClampObs J × unitInterval) => p.2.1.X) := hXobs.comp (measurable_fst.comp measurable_snd) have ha : Measurable (fun p : ℝ × (ClampObs J × unitInterval) => p.1) := measurable_fst have hu : Measurable (fun p : ℝ × (ClampObs J × unitInterval) => p.2.2) := measurable_snd.comp measurable_snd exact hq.comp ((hX.prodMk ha).prodMk hu) have hgmeas : ∀ x : Fin J, Measurable (fun z : Icc (0 : ℝ) 1 × unitInterval => q (x, z.1) z.2) := by intro x change Measurable (Function.uncurry q ∘ fun z : Icc (0 : ℝ) 1 × unitInterval => ((x, (z.1 : ℝ)), z.2)) exact hq.comp <| ((measurable_const.prodMk (measurable_subtype_coe.comp measurable_fst)).prodMk measurable_snd) have hactual : ∀ᵐ z ∂Measure.map F base, z.1.Y = q (z.1.X, z.1.A) z.2 := by have hleft : Measurable (fun z : ClampObs J × unitInterval => z.1.Y) := clampOutcome_measurable.comp measurable_fst have hright : Measurable (fun z : ClampObs J × unitInterval => q (z.1.X, z.1.A) z.2) := by change Measurable (Function.uncurry q ∘ fun z : ClampObs J × unitInterval => ((z.1.X, z.1.A), z.2)) exact hq.comp ((clampDesign_measurable.comp measurable_fst).prodMk measurable_snd) rw [MeasureTheory.ae_map_iff hF.aemeasurable (measurableSet_eq_fun hleft hright)] exact Filter.Eventually.of_forall fun p => rfl let PF : FullDataLaw J := { latentCarrier := unitInterval observedMargin := P fullMeasure := Measure.map F base probability := Measure.isProbabilityMeasure_map hF.aemeasurable margin_eq := hmargin g := fun x a u => q (x, a) u pot := potfun pot_jointlyMeasurable := hpotfun } refine ⟨PF, rfl, ?_, ?_, ?_⟩ · refine ⟨?_, ?_, ?_⟩ · exact hgmeas · intro x a u ha exact (kernelUnitQuantile κ (x, a) u).property · filter_upwards [hactual] with z hz exact ⟨fun a _ => rfl, hz⟩ · intro x f g hf hg _ _ let sx : Set (Fin J × ℝ) := {d | d.1 = x} let sz : Set (ClampObs J × unitInterval) := {z | z.1.X = x} have hsx : MeasurableSet sx := measurable_fst (measurableSet_singleton x) have hsz : MeasurableSet sz := ((measurable_fst.comp (Measurable.of_comap_le le_rfl)).comp measurable_fst) (measurableSet_singleton x) let Af : ℝ := ∫ d, sx.indicator (fun d => f d.2) d ∂ν let Gu : ℝ := ∫ u, g u ∂volume have hfi : Measurable (sx.indicator (fun d => f d.2)) := (hf.comp measurable_snd).indicator hsx have hone : Measurable (sx.indicator (fun _ => (1 : ℝ))) := measurable_const.indicator hsx have hjoint : (∫ z in sz, f z.1.A * g z.2 ∂Measure.map F base) = Af * Gu := by rw [← integral_indicator hsz] have hi : Measurable (sz.indicator (fun z => f z.1.A * g z.2)) := ((hf.comp ((measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))).comp measurable_fst)).mul (hg.comp measurable_snd)).indicator hsz rw [integral_map hF.aemeasurable hi.aestronglyMeasurable] change (∫ p : (Fin J × ℝ) × unitInterval, sz.indicator (fun z => f z.1.A * g z.2) (F p) ∂base) = _ have heq : (fun p : (Fin J × ℝ) × unitInterval => sz.indicator (fun z => f z.1.A * g z.2) (F p)) = fun p => sx.indicator (fun d => f d.2) p.1 * g p.2 := by funext p by_cases hp : p.1.1 = x <;> simp [sx, sz, F, H, obsMk, indicator, hp] rw [heq, show base = ν.prod volume from rfl, integral_prod_mul] have hfint : (∫ z in sz, f z.1.A ∂Measure.map F base) = Af := by rw [← integral_indicator hsz] have hi : Measurable (sz.indicator (fun z => f z.1.A)) := (hf.comp ((measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))).comp measurable_fst)).indicator hsz rw [integral_map hF.aemeasurable hi.aestronglyMeasurable] change (∫ p : (Fin J × ℝ) × unitInterval, sz.indicator (fun z => f z.1.A) (F p) ∂base) = _ have heq : (fun p : (Fin J × ℝ) × unitInterval => sz.indicator (fun z => f z.1.A) (F p)) = fun p => sx.indicator (fun d => f d.2) p.1 * (1 : ℝ) := by funext p by_cases hp : p.1.1 = x <;> simp [sx, sz, F, H, obsMk, indicator, hp] rw [heq, show base = ν.prod volume from rfl] calc _ = (∫ d, sx.indicator (fun d => f d.2) d ∂ν) * ∫ _u : unitInterval, (1 : ℝ) ∂volume := by exact integral_prod_mul (μ := ν) (ν := volume) (sx.indicator (fun d => f d.2)) (fun _ : unitInterval => (1 : ℝ)) _ = Af := by simp [Af] have hgint : (∫ z in sz, g z.2 ∂Measure.map F base) = ν.real sx * Gu := by rw [← integral_indicator hsz] have hi : Measurable (sz.indicator (fun z => g z.2)) := (hg.comp measurable_snd).indicator hsz rw [integral_map hF.aemeasurable hi.aestronglyMeasurable] change (∫ p : (Fin J × ℝ) × unitInterval, sz.indicator (fun z => g z.2) (F p) ∂base) = _ have heq : (fun p : (Fin J × ℝ) × unitInterval => sz.indicator (fun z => g z.2) (F p)) = fun p => sx.indicator (fun _ => (1 : ℝ)) p.1 * g p.2 := by funext p by_cases hp : p.1.1 = x <;> simp [sx, sz, F, H, obsMk, indicator, hp] rw [heq, show base = ν.prod volume from rfl, integral_prod_mul] have honeint : (∫ d, sx.indicator (fun _ => (1 : ℝ)) d ∂ν) = ν.real sx := by rw [show (fun _ : Fin J × ℝ => (1 : ℝ)) = 1 from rfl] -- … truncated; follow the source link for the rest …
CausalSmith.Stat.LmtpThresholdAtomFrontier.exists_fullData_quantile_lift · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/SurjectivityLift.lean:56
theorem exists_fullData_holder_lift

Fixed-Hölder observed laws have a quantile full-data lift. The result uses the hP condition, the hJ condition, the hpmin condition, the hdelta condition. This is the stated conclusion.

Formal statement
J :
P :
beta kappa L cminus cplus pmin deltaBar :
hP :
ClampModel P beta kappa L cminus cplus pmin
hJ :
0 < J
hpmin :
0 < pmin
hdelta :
deltaBar ≤ 1
∃ PF : FullDataLaw J,
conclusion 1
FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar
conclusion 2
PF.observedMargin = P
Proof (Lean source)
lemma exists_fullData_holder_lift {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin deltaBar : ℝ} (hP : ClampModel P beta kappa L cminus cplus pmin) (hJ : 0 < J) (hpmin : 0 < pmin) (hdelta : deltaBar ≤ 1) : ∃ PF : FullDataLaw J, FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar ∧ PF.observedMargin = P := by let m : Fin J × ℝ → ℝ := clampRegressionExtension P have hm : Measurable m := clampRegressionExtension_measurable P hP.holder have hm_unit : ∀ d, m d ∈ Icc (0 : ℝ) 1 := clampRegressionExtension_mem_Icc P hP.holder have hcond : P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] fun o => m (o.X, o.A) := (hP.holder ⟨0, hJ⟩).2.2.1.trans (clampRegressionExtension_ae_eq_mu P hP).symm have hm_cont : ∀ x : Fin J, ContinuousOn (fun a => m (x, a)) (Icc (0 : ℝ) deltaBar) := by intro x apply (hP.holder x).1.mono (Set.Icc_subset_Icc le_rfl hdelta) |>.congr intro a ha unfold m exact clampRegressionExtension_eq P x ⟨ha.1, ha.2.trans hdelta⟩ have hmass_pos : ∀ x : Fin J, 0 < (P.dataMeasure.map (fun o => o.X)).real {x} := by intro x rw [← (hP.stratumMass x).1] exact hpmin.trans_le (hP.stratumMass x).2 obtain ⟨PF, hmargin, hcons, hexch, hcont⟩ := exists_fullData_quantile_lift P deltaBar hP.probability hP.outcomeSupport hmass_pos m hm hm_unit hcond hm_cont refine ⟨PF, ?_, hmargin⟩ exact ⟨hmargin ▸ hP, hcons, hexch, hcont⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.exists_fullData_holder_lift · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/SurjectivityLift.lean:385
theorem exists_fullData_cont_lift

Continuity-only observed laws have the same quantile full-data lift. The result uses the hP condition, the hpmin condition. This is the stated conclusion.

Formal statement
J :
P :
kappa cminus cplus pmin deltaBar :
hP :
ContClampModel P kappa cminus cplus pmin deltaBar
hpmin :
0 < pmin
∃ PF : FullDataLaw J,
conclusion 1
ContFullDataClampModel PF kappa cminus cplus pmin deltaBar
conclusion 2
PF.observedMargin = P
Proof (Lean source)
lemma exists_fullData_cont_lift {J : ℕ} (P : ClampLaw J) {kappa cminus cplus pmin deltaBar : ℝ} (hP : ContClampModel P kappa cminus cplus pmin deltaBar) (hpmin : 0 < pmin) : ∃ PF : FullDataLaw J, ContFullDataClampModel PF kappa cminus cplus pmin deltaBar ∧ PF.observedMargin = P := by let _ := hP.probability let D : ClampObs J → Fin J × ℝ := fun o => (o.X, o.A) let Y : ClampObs J → ℝ := fun o => o.Y have hD : Measurable D := clampDesign_measurable have hY : Measurable Y := clampOutcome_measurable let ν : Measure (Fin J × ℝ) := P.dataMeasure.map D let κraw : Kernel (Fin J × ℝ) ℝ := ProbabilityTheory.condDistrib Y D P.dataMeasure letI : IsMarkovKernel κraw := inferInstance let κ0 : Kernel (Fin J × ℝ) ℝ := κraw.map clampUnit let r : Fin J × ℝ → ℝ := fun d => ∫ y, y ∂κ0 d have hr_meas : Measurable r := stronglyMeasurable_id.integral_kernel.measurable have hr_unit : ∀ d, r d ∈ Icc (0 : ℝ) 1 := by intro d have hi : Integrable clampUnit (κraw d) := by refine Integrable.of_bound measurable_clampUnit.aestronglyMeasurable 1 ?_ exact Filter.Eventually.of_forall fun y => by rw [Real.norm_eq_abs, abs_of_nonneg (clampUnit_in_unit y).1] exact (clampUnit_in_unit y).2 have hr : r d = ∫ y, clampUnit y ∂κraw d := by simp only [r, κ0] rw [ProbabilityTheory.Kernel.map_apply κraw measurable_clampUnit d] simpa only [id_eq] using (integral_map measurable_clampUnit.aemeasurable stronglyMeasurable_id.aestronglyMeasurable) rw [hr] constructor · exact integral_nonneg fun y => (clampUnit_in_unit y).1 · calc _ ≤ ∫ _y : ℝ, (1 : ℝ) ∂κraw d := integral_mono hi (integrable_const 1) fun y => (clampUnit_in_unit y).2 _ = 1 := by simp let mu := contRegression P kappa cminus cplus pmin deltaBar hP have hmu_cont : ∀ x, ContinuousOn (mu x) (Icc (0 : ℝ) deltaBar) := (Classical.choose_spec hP.continuousVersion).1 have hmu_ce : P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] fun o => mu o.X o.A := (Classical.choose_spec hP.continuousVersion).2 let c : Fin J × ℝ → ℝ := fun d => if d.2 ∈ Icc (0 : ℝ) deltaBar then clampUnit (mu d.1 d.2) else 0 have hc_meas : Measurable c := by apply measurable_from_prod_countable_right intro x have hcOn : ContinuousOn (fun a => clampUnit (mu x a)) (Icc (0 : ℝ) deltaBar) := continuous_clampUnit'.comp_continuousOn (hmu_cont x) have hzOn : ContinuousOn (fun _a : ℝ => (0 : ℝ)) (Icc (0 : ℝ) deltaBar)ᶜ := continuous_const.continuousOn convert hcOn.measurable_piecewise hzOn measurableSet_Icc using 1 funext a by_cases ha : a ∈ Icc (0 : ℝ) deltaBar <;> simp_all [c, Set.piecewise] let E : Set (Fin J × ℝ) := {d | d.2 ∈ Icc (0 : ℝ) deltaBar} have hE : MeasurableSet E := measurable_snd measurableSet_Icc let m : Fin J × ℝ → ℝ := E.piecewise c r have hm : Measurable m := hc_meas.piecewise hE hr_meas have hm_unit : ∀ d, m d ∈ Icc (0 : ℝ) 1 := by intro d by_cases hd : d ∈ E · rw [show m d = if d ∈ E then c d else r d by rfl, if_pos hd] have hd' : d.2 ∈ Icc (0 : ℝ) deltaBar := hd rw [show c d = if d.2 ∈ Icc (0 : ℝ) deltaBar then clampUnit (mu d.1 d.2) else 0 by rfl, if_pos hd'] exact clampUnit_in_unit _ · rw [show m d = if d ∈ E then c d else r d by rfl, if_neg hd] exact hr_unit d have hraw_κ0 : (κraw : (Fin J × ℝ) → Measure ℝ) =ᵐ[ν] κ0 := by have hclamp : (fun o : ClampObs J => clampUnit (Y o)) =ᵐ[P.dataMeasure] Y := by filter_upwards [hP.outcomeSupport] with o ho simp only [Y] unfold clampUnit simp [ho.1, ho.2] have hc' : (ProbabilityTheory.condDistrib (clampUnit ∘ Y) D P.dataMeasure : Kernel (Fin J × ℝ) ℝ) =ᵐ[ν] (ProbabilityTheory.condDistrib Y D P.dataMeasure).map clampUnit := ProbabilityTheory.condDistrib_comp (μ := P.dataMeasure) (X := D) hY.aemeasurable measurable_clampUnit have heq : ProbabilityTheory.condDistrib (clampUnit ∘ Y) D P.dataMeasure = κraw := ProbabilityTheory.condDistrib_congr_left hclamp rw [heq] at hc' simpa only [ν, κ0, κraw] using hc' have hce := ProbabilityTheory.condExp_ae_eq_integral_condDistrib hD hY.aemeasurable stronglyMeasurable_id (Integrable.of_bound hY.aestronglyMeasurable 1 <| hP.outcomeSupport.mono fun o ho => by change |o.Y| ≤ 1 exact abs_le.2 ⟨by linarith [ho.1], ho.2⟩) have hraw_mu : (fun o => ∫ y, y ∂κraw (D o)) =ᵐ[P.dataMeasure] fun o => mu o.X o.A := hce.symm.trans hmu_ce have hr_mu : (fun o => r (D o)) =ᵐ[P.dataMeasure] fun o => mu o.X o.A := by have hmeans : (fun d => ∫ y, y ∂κraw d) =ᵐ[ν] r := hraw_κ0.mono fun d hd => by simp only [r, hd] have hpull := hmeans.comp_tendsto (Measure.tendsto_ae_map hD.aemeasurable) exact hpull.symm.trans hraw_mu have hcond : P.dataMeasure[(fun o : ClampObs J => o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] fun o => m (o.X, o.A) := by filter_upwards [hmu_ce, hr_mu] with o hceo hro rw [hceo] by_cases ho : D o ∈ E · rw [show m (o.X, o.A) = if D o ∈ E then c (D o) else r (D o) by rfl, if_pos ho] rw [show c (D o) = if D o ∈ E then clampUnit (mu o.X o.A) else 0 by rfl, if_pos ho, ← hro] rw [show clampUnit (r (D o)) = r (D o) by unfold clampUnit rw [max_eq_right (hr_unit (D o)).1, min_eq_right (hr_unit (D o)).2]] · rw [show m (o.X, o.A) = if D o ∈ E then c (D o) else r (D o) by rfl, if_neg ho] exact hro.symm have hm_cont : ∀ x : Fin J, ContinuousOn (fun a => m (x, a)) (Icc (0 : ℝ) deltaBar) := by intro x have hclamp : ContinuousOn (fun a => clampUnit (mu x a)) (Icc (0 : ℝ) deltaBar) := continuous_clampUnit'.comp_continuousOn (hmu_cont x) apply hclamp.congr intro a ha change m (x, a) = clampUnit (mu x a) rw [show m (x, a) = if (x, a) ∈ E then c (x, a) else r (x, a) by rfl, if_pos (show (x, a) ∈ E by exact ha)] rw [show c (x, a) = if a ∈ Icc (0 : ℝ) deltaBar then clampUnit (mu x a) else 0 by rfl, if_pos ha] have hmass_pos : ∀ x : Fin J, 0 < (P.dataMeasure.map (fun o => o.X)).real {x} := by intro x rw [← (hP.stratumMass x).1] exact hpmin.trans_le (hP.stratumMass x).2 obtain ⟨PF, hmargin, hcons, hexch, hcont⟩ := exists_fullData_quantile_lift P deltaBar hP.probability hP.outcomeSupport hmass_pos m hm hm_unit hcond hm_cont refine ⟨PF, ?_, hmargin⟩ exact ⟨hmargin ▸ hP, hcons, hexch, hcont⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.exists_fullData_cont_lift · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/SurjectivityLift.lean:422
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.TotalGram 6 declarations This file isolates the note's main realized-design bottleneck.

Uniform total-Gram stabilization

This file isolates the note's main realized-design bottleneck. Constants are quantified before laws, sample sizes, thresholds, blocks, and strata.

theorem goodGram_reproduction Lemma 8 in the paper ↗

If the reference eigenvalue is positive and the realized Gram matrix is good, the intercept weights reproduce every polynomial basis coordinate.

Formal statement
J n ell :
B :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
hlambda :
0 < lambdaStar ell kappa cminus cplus
hgood :
GoodGramEvent B z x ell kappa cminus cplus delta h
j :
Fin (ell + 1)
(∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (scaledDose delta h (z i)) ^ (j : ℕ))
= if j = 0 then 1 else 0
Proof (Lean source)
lemma goodGram_reproduction {J n ell : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (hgood : GoodGramEvent B z x ell kappa cminus cplus delta h) : ∀ j : Fin (ell + 1), (∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (scaledDose delta h (z i)) ^ (j : ℕ)) = if j = 0 then 1 else 0 := by classical let A := localGram B z x ell delta h let N : ℝ := localCount B z x delta h let a := lambdaStar ell kappa cminus cplus * N / 2 have hN : 0 < N := by dsimp [N] exact_mod_cast hgood.1 have ha : 0 < a := by dsimp [a]; positivity have hunit : IsUnit A := coerciveMatrix_isUnit ha hgood.2 have hdet : IsUnit A.det := (Matrix.isUnit_iff_isUnit_det A).mp hunit let U : Fin n → ℝ := fun i => scaledDose delta h (z i) let W : Fin n → ℝ := localKernelWeight B z x delta h have hdet' : IsUnit (designMatrix ell U W).det := by simpa [A, U, W, localGram] using hdet intro j have hrep := equivKernelWeight_reproduces hdet' (j : ℕ) (Nat.le_of_lt_succ j.isLt) calc (∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * U i ^ (j : ℕ)) = ∑ i ∈ B.I2, equivKernelWeight ell U W i * U i ^ (j : ℕ) := by apply Finset.sum_congr rfl intro i hi rw [interceptWeight_eq_equivKernel_of_good B z x ell kappa cminus cplus delta h hgood i] _ = ∑ i, equivKernelWeight ell U W i * U i ^ (j : ℕ) := by apply Finset.sum_subset (Finset.subset_univ B.I2) intro i _ hi have hw : W i = 0 := by simp [W, localKernelWeight, hi] simp [equivKernelWeight, hw] _ = if j = 0 then 1 else 0 := by simpa [U] using hrep
CausalSmith.Stat.LmtpThresholdAtomFrontier.goodGram_reproduction · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/TotalGram.lean:169

Summing over the canonical enumeration of a finite set agrees with summing directly over that set.

Formal statement
n :
I :
f :
Fin n → ℝ
(∑ j : Fin I.card, f ((I.orderIsoOfFin rfl) j)) = ∑ i ∈ I, f i
Proof (Lean source)
lemma block_orderIso_sum_eq {n : ℕ} (I : Finset (Fin n)) (f : Fin n → ℝ) : (∑ j : Fin I.card, f ((I.orderIsoOfFin rfl) j)) = ∑ i ∈ I, f i := by calc _ = ∑ i : I, f i := (I.orderIsoOfFin rfl).toEquiv.sum_comp (fun i : I => f i) _ = _ := Finset.sum_attach I f
CausalSmith.Stat.LmtpThresholdAtomFrontier.block_orderIso_sum_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/TotalGram.lean:250
theorem goodGram_interceptWeight_pointwise Lemma 9 in the paper ↗

On a good Gram event, every active intercept weight has the inverse-count scale dictated by coercivity. The result uses the hlambda condition, the hgood condition. This is the stated conclusion.

Formal statement
J n ell :
B :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
hlambda :
0 < lambdaStar ell kappa cminus cplus
hgood :
GoodGramEvent B z x ell kappa cminus cplus delta h
i :
Fin n
|interceptWeight B z x ell kappa cminus cplus delta h i|
≤ (lambdaStar ell kappa cminus cplus * (localCount B z x delta h : ℝ) / 2)⁻¹ * sqrt (ell + 1 : ℝ)
Proof (Lean source)
-- @node: goodGram_interceptWeight_pointwise lemma goodGram_interceptWeight_pointwise {J n ell : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (hgood : GoodGramEvent B z x ell kappa cminus cplus delta h) (i : Fin n) : |interceptWeight B z x ell kappa cminus cplus delta h i| ≤ (lambdaStar ell kappa cminus cplus * (localCount B z x delta h : ℝ) / 2)⁻¹ * sqrt (ell + 1 : ℝ) := by classical by_cases hi : i ∈ B.I2 ∧ (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 · let A := localGram B z x ell delta h let a := lambdaStar ell kappa cminus cplus * (localCount B z x delta h : ℝ) / 2 let s := monomialVec ell (scaledDose delta h (z i)) have hN : 0 < (localCount B z x delta h : ℝ) := by exact_mod_cast hgood.1 have ha : 0 < a := by dsimp [a]; positivity have hinv := coerciveMatrix_inv_mulVec_euclidean_le ha hgood.2 s have hcoord : |A⁻¹.mulVec s 0| ≤ sqrt (∑ k, (A⁻¹.mulVec s k) ^ 2) := by rw [← Real.sqrt_sq_eq_abs] exact Real.sqrt_le_sqrt (Finset.single_le_sum (fun j _ => sq_nonneg (A⁻¹.mulVec s j)) (Finset.mem_univ 0)) have hs : sqrt (∑ k, (s k) ^ 2) ≤ sqrt (ell + 1 : ℝ) := by apply Real.sqrt_le_sqrt calc ∑ k, (s k) ^ 2 ≤ ∑ _k : Fin (ell + 1), (1 : ℝ) := by apply Finset.sum_le_sum intro k hk dsimp [s, monomialVec] have hu := hi.2.2 have hp0 : 0 ≤ scaledDose delta h (z i) ^ (k : ℕ) := pow_nonneg hu.1 _ have hp1 : scaledDose delta h (z i) ^ (k : ℕ) ≤ 1 := pow_le_one₀ hu.1 hu.2 nlinarith _ = ell + 1 := by simp rw [interceptWeight_eq_mulVec B z x ell kappa cminus cplus delta h i hgood hi.1 hi.2.1 hi.2.2] simpa only [A, a, s] using hcoord.trans (hinv.trans (mul_le_mul_of_nonneg_left hs (inv_nonneg.mpr ha.le))) · rw [interceptWeight_eq_zero_of_inactive B z x ell kappa cminus cplus delta h i hgood hi, abs_zero] have hN : 0 < (localCount B z x delta h : ℝ) := by exact_mod_cast hgood.1 positivity
CausalSmith.Stat.LmtpThresholdAtomFrontier.goodGram_interceptWeight_pointwise · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/TotalGram.lean:333
theorem goodGram_weight_controls Lemma 12 in the paper ↗

On a good Gram event, the exact weights reproduce every basis monomial and obey explicit count-normalized l1 and squared-l2 bounds. The result uses the hh condition, the hlambda condition, the hgood condition. This is the stated conclusion.

Formal statement
J n ell :
B :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
hh :
0 < h
hlambda :
0 < lambdaStar ell kappa cminus cplus
hgood :
GoodGramEvent B z x ell kappa cminus cplus delta h
conclusion 1
j :
Fin (ell + 1)
(∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (scaledDose delta h (z i)) ^ (j : ℕ))
= if j = 0 then 1 else 0
conclusion 2
(∑ i ∈ B.I2, |interceptWeight B z x ell kappa cminus cplus delta h i|)
≤ 2 * sqrt (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus
conclusion 3
(∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2)
≤ (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / (localCount B z x delta h : ℝ)
Proof (Lean source)
-- @node: goodGram_weight_controls lemma goodGram_weight_controls {J n ell : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) (hh : 0 < h) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (hgood : GoodGramEvent B z x ell kappa cminus cplus delta h) : (∀ j : Fin (ell + 1), (∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (scaledDose delta h (z i)) ^ (j : ℕ)) = if j = 0 then 1 else 0) ∧ (∑ i ∈ B.I2, |interceptWeight B z x ell kappa cminus cplus delta h i|) ≤ 2 * sqrt (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ∧ (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ≤ (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / (localCount B z x delta h : ℝ) := by classical let lam := lambdaStar ell kappa cminus cplus let N := localCount B z x delta h have hNnat : 0 < N := hgood.1 have hN : (0 : ℝ) < N := by exact_mod_cast hNnat have hpoint (i : Fin n) : |interceptWeight B z x ell kappa cminus cplus delta h i| ≤ if i ∈ B.I2 ∧ (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 then (lam * (N : ℝ) / 2)⁻¹ * sqrt (ell + 1 : ℝ) else 0 := by by_cases hi : i ∈ B.I2 ∧ (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 · rw [if_pos hi] exact goodGram_interceptWeight_pointwise B z x kappa cminus cplus delta h hlambda hgood i · rw [if_neg hi, interceptWeight_eq_zero_of_inactive B z x ell kappa cminus cplus delta h i hgood hi, abs_zero] have hcount : (∑ i ∈ B.I2, if (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 then (1 : ℝ) else 0) = N := by simpa only [N] using local_active_count_eq B z x delta h hh refine ⟨goodGram_reproduction B z x kappa cminus cplus delta h hlambda hgood, ?_, ?_⟩ · calc (∑ i ∈ B.I2, |interceptWeight B z x ell kappa cminus cplus delta h i|) ≤ ∑ i ∈ B.I2, if (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 then (lam * (N : ℝ) / 2)⁻¹ * sqrt (ell + 1 : ℝ) else 0 := by apply Finset.sum_le_sum intro i hi simpa [hi] using hpoint i _ = N * ((lam * (N : ℝ) / 2)⁻¹ * sqrt (ell + 1 : ℝ)) := by rw [← hcount] simp_rw [Finset.sum_mul] apply Finset.sum_congr rfl intro i hi by_cases ha : (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 <;> simp [ha] _ = 2 * sqrt (ell + 1 : ℝ) / lam := by field_simp [ne_of_gt hlambda, ne_of_gt hN] <;> ring · have hsqpoint (i : Fin n) : (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2 ≤ if i ∈ B.I2 ∧ (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 then ((lam * (N : ℝ) / 2)⁻¹ * sqrt (ell + 1 : ℝ)) ^ 2 else 0 := by have habs := hpoint i by_cases hi : i ∈ B.I2 ∧ (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 · rw [if_pos hi] at habs ⊢ rw [← sq_abs] gcongr · rw [if_neg hi] at habs ⊢ have hz : interceptWeight B z x ell kappa cminus cplus delta h i = 0 := by exact interceptWeight_eq_zero_of_inactive B z x ell kappa cminus cplus delta h i hgood hi simp [hz] calc (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ≤ ∑ i ∈ B.I2, if (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 then ((lam * (N : ℝ) / 2)⁻¹ * sqrt (ell + 1 : ℝ)) ^ 2 else 0 := by apply Finset.sum_le_sum intro i hi simpa [hi] using hsqpoint i _ = N * ((lam * (N : ℝ) / 2)⁻¹ * sqrt (ell + 1 : ℝ)) ^ 2 := by rw [← hcount] simp_rw [Finset.sum_mul] apply Finset.sum_congr rfl intro i hi by_cases ha : (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 <;> simp [ha] _ = (4 * (ell + 1 : ℝ) / lam ^ 2) / N := by simp only [mul_pow] rw [Real.sq_sqrt (by positivity : (0 : ℝ) ≤ ell + 1)] field_simp [ne_of_gt hlambda, ne_of_gt hN] <;> ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.goodGram_weight_controls · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/TotalGram.lean:380
theorem totalGram_lambdaStar_pos

The population constant used by total-Gram stabilization is positive under the standing regime constraints. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
0 < lambdaStar (ellOf beta) kappa cminus cplus
Proof (Lean source)
-- @node: totalGram_lambdaStar_pos lemma totalGram_lambdaStar_pos (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : 0 < lambdaStar (ellOf beta) kappa cminus cplus := by simp only [RegimeConstants] at hreg rcases hreg with ⟨_hJ, _hbeta, hkappa, _hL, hcminus, _hcminus_le, hkappa_le_cplus, _hpmin, _hpmin_le, _hdeltaBar, _hdeltaBar_lt, _halpha, _halpha_lt⟩ exact lambdaStar_pos (ellOf beta) hkappa hcminus (by linarith)
CausalSmith.Stat.LmtpThresholdAtomFrontier.totalGram_lambdaStar_pos · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/TotalGram.lean:484
theorem total_gram_stabilization Lemma 17 in the paper ↗

Uniform positivity, singular-design tail, exact reproduction, and l1/l2 weight control follow from admissible regime constants. The constants are uniform over laws, samples, thresholds, and strata.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ C c : ℝ,
0 < C
0 < c
0 < lambdaStar (ellOf beta) kappa cminus cplus
conclusion 1
P :
ClampModel P beta kappa L cminus cplus pmin
n :
B :
delta :
delta ∈ Icc (0 : ℝ) deltaBar
x :
Fin J
h :
infoBandwidth n delta beta kappa deltaBar
(iidProduct P n).real {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h}
≤ C * exp (-c * (n : ℝ) * h * (delta + h) ^ kappa)
z :
Fin n → ClampObs J
GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h
j :
Fin (ellOf beta + 1)
(∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (scaledDose delta h (z i)) ^ (j : ℕ))
= if j = 0 then 1 else 0
(∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i|) ≤ C
(∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2)
≤ C / (localCount B z x delta h : ℝ)
Proof (Lean source)
-- @node: lem:total-gram lemma total_gram_stabilization (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ C c : ℝ, 0 < C ∧ 0 < c ∧ 0 < lambdaStar (ellOf beta) kappa cminus cplus ∧ ∀ (P : ClampLaw J), ClampModel P beta kappa L cminus cplus pmin → ∀ (n : ℕ), IidSampling P n → ∀ (B : SplitBlocks n) (delta : ℝ), delta ∈ Icc (0 : ℝ) deltaBar → ∀ x : Fin J, let h := infoBandwidth n delta beta kappa deltaBar (iidProduct P n).real {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h} ≤ C * exp (-c * (n : ℝ) * h * (delta + h) ^ kappa) ∧ ∀ z : Fin n → ClampObs J, GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h → (∀ j : Fin (ellOf beta + 1), (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (scaledDose delta h (z i)) ^ (j : ℕ)) = if j = 0 then 1 else 0) ∧ (∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i|) ≤ C ∧ (∑ i ∈ B.I2, (interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i) ^ 2) ≤ C / (localCount B z x delta h : ℝ) := by have _hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus := totalGram_lambdaStar_pos J beta kappa L cminus cplus pmin deltaBar alpha hreg classical simp only [RegimeConstants] at hreg rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus_lower, hpmin, hpmin_le, hdeltaBar, hdeltaBar_lt, halpha, halpha_lt⟩ let ell := ellOf beta let lam := lambdaStar ell kappa cminus cplus let d : ℝ := ell + 1 let r := localizedGramRate (Fin (ell + 1)) lam 1 let K := pmin * cminus / (2 * (2 : ℝ) ^ kappa) let c := r * K / 8 let A := 2 * (1 + d * d) let C := A * exp (8 * c) + 2 * sqrt d / lam + 4 * d / lam ^ 2 + 1 have hlam : 0 < lam := by simpa [ell, lam] using _hlambda have hd : 0 < d := by dsimp [d]; positivity have hr : 0 < r := by dsimp [r] unfold localizedGramRate apply lt_min (by norm_num) positivity have hK : 0 < K := by dsimp [K]; positivity have hc : 0 < c := by dsimp [c]; positivity have hA : 1 ≤ A := by dsimp [A, d]; nlinarith [sq_nonneg (ell + 1 : ℝ)] have hC : 0 < C := by dsimp [C]; positivity have hCtail : A * exp (8 * c) ≤ C := by dsimp [C] have h1 : 0 ≤ 2 * sqrt d / lam := by positivity have h2 : 0 ≤ 4 * d / lam ^ 2 := by positivity linarith have hCA : A ≤ C := by calc A = A * 1 := by ring _ ≤ A * exp (8 * c) := mul_le_mul_of_nonneg_left (Real.one_le_exp (by positivity)) (by linarith [hA]) _ ≤ C := hCtail have hCl1 : 2 * sqrt d / lam ≤ C := by dsimp [C] have h0 : 0 ≤ A * exp (8 * c) := by positivity have h2 : 0 ≤ 4 * d / lam ^ 2 := by positivity linarith have hCl2 : 4 * d / lam ^ 2 ≤ C := by dsimp [C] have h0 : 0 ≤ A * exp (8 * c) := by positivity have h1 : 0 ≤ 2 * sqrt d / lam := by positivity linarith refine ⟨C, c, hC, hc, _hlambda, ?_⟩ intro P hmodel n hsampling B delta hdelta x dsimp only let h := infoBandwidth n delta beta kappa deltaBar have hhgeom := infoBandwidth_pos_le (n := n) hbeta hkappa hdelta ⟨hdeltaBar, hdeltaBar_lt⟩ have hh : 0 < h := by simpa [h] using hhgeom.1 have hupper : delta + h ≤ 1 := by have := hhgeom.2 linarith [hdelta.2] let q := localWindowWeight x delta h let phi : Fin (ell + 1) → ClampObs J → ℝ := localWindowFeature delta h let p := ∫ o, q o ∂P.dataMeasure let F : (Fin n → ClampObs J) → (Fin B.I2.card → ClampObs J) := fun z j => z ((B.I2.orderIsoOfFin rfl) j) haveI : IsProbabilityMeasure P.dataMeasure := hmodel.probability have hp0 : 0 ≤ p := by dsimp [p, q] exact integral_nonneg_of_ae (ae_of_all _ fun o => (localWindowWeight_mem_unit x delta h o).1) have hpLower : K * h * (delta + h) ^ kappa ≤ p := by have hl := localWindowWeight_integral_lower P hmodel hkappa hcminus (by linarith : 0 ≤ cplus) hpmin x hdelta.1 hh hupper have hwpos : 0 < delta + h := by linarith [hdelta.1] have htwo : (0 : ℝ) < 2 := by norm_num have hrpow : ((delta + h) / 2) ^ kappa = (delta + h) ^ kappa / (2 : ℝ) ^ kappa := by rw [Real.div_rpow hwpos.le htwo.le] rw [hrpow] at hl calc K * h * (delta + h) ^ kappa = pmin * (cminus * ((delta + h) ^ kappa / (2 : ℝ) ^ kappa) * (h / 2)) := by dsimp [K] ring _ ≤ p := by simpa [p, q] using hl have hqmeas : Measurable q := measurable_localWindowWeight x delta h have hphimeas : ∀ j, Measurable (phi j) := measurable_localWindowFeature delta h have hq : ∀ᵐ o ∂P.dataMeasure, 0 ≤ q o ∧ q o ≤ 1 := ae_of_all _ (localWindowWeight_mem_unit x delta h) have hphi : ∀ j, ∀ᵐ o ∂P.dataMeasure, |phi j o| ≤ 1 := fun j => ae_of_all _ (abs_localWindowFeature_le_one delta h j) have hcoercive : ∀ v : Fin (ell + 1) → ℝ, lam * p * (∑ j, (v j) ^ 2) ≤ ∑ j, ∑ k, v j * v k * ∫ o, q o * phi j o * phi k o ∂P.dataMeasure := by intro v simpa [ell, lam, p, q, phi] using localWindow_populationGram_coercive P hmodel hkappa hcminus (by linarith : 0 < cplus) hpmin x hdelta.1 hh hupper v letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance have hsum (f : Fin n → ℝ) : (∑ j : Fin B.I2.card, f ((B.I2.orderIsoOfFin rfl) j)) = ∑ i ∈ B.I2, f i := by calc _ = ∑ i : B.I2, f i := Equiv.sum_comp (B.I2.orderIsoOfFin rfl).toEquiv (fun i : B.I2 => f i) _ = _ := (Finset.sum_subtype B.I2 (fun _ => Iff.rfl) f).symm have hgood (z : Fin n → ClampObs J) : LocalizedGramGood lam q phi (F z) ↔ GoodGramEvent B z x ell kappa cminus cplus delta h := by simp only [LocalizedGramGood, GoodGramEvent] have hcount : localCount q (F z) = (localCount B z x delta h : ℝ) := by unfold localCount change (∑ j : Fin B.I2.card, q (z ((B.I2.orderIsoOfFin rfl) j))) = _ rw [show (∑ j : Fin B.I2.card, q (z ((B.I2.orderIsoOfFin rfl) j))) = ∑ i ∈ B.I2, q (z i) by exact hsum (fun i => q (z i))] calc (∑ i ∈ B.I2, q (z i)) = ∑ i ∈ B.I2, if (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 then 1 else 0 := by apply Finset.sum_congr rfl intro i hi simp [q, localWindowWeight] _ = (localCount B z x delta h : ℝ) := local_active_count_eq B z x delta h hh have hentry (j k : Fin (ell + 1)) : localGramEntry q phi (F z) j k = localGram B z x ell delta h j k := by unfold localGramEntry change (∑ a : Fin B.I2.card, q (z ((B.I2.orderIsoOfFin rfl) a)) * phi j (z ((B.I2.orderIsoOfFin rfl) a)) * phi k (z ((B.I2.orderIsoOfFin rfl) a))) = _ rw [show (∑ a : Fin B.I2.card, q (z ((B.I2.orderIsoOfFin rfl) a)) * phi j (z ((B.I2.orderIsoOfFin rfl) a)) * phi k (z ((B.I2.orderIsoOfFin rfl) a))) = ∑ i ∈ B.I2, q (z i) * phi j (z i) * phi k (z i) by exact hsum (fun i => q (z i) * phi j (z i) * phi k (z i))] rw [localGram_apply] apply Finset.sum_congr rfl intro i hi by_cases ha : (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 · simp [q, phi, localWindowWeight, localWindowFeature, monomialVec, ha] · by_cases hu : scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 · have hx : (z i).X ≠ x := fun hx => ha ⟨hx, hu⟩ simp [q, phi, localWindowWeight, localWindowFeature, monomialVec, ha, hx, hu] · simp [q, phi, localWindowWeight, localWindowFeature, monomialVec, ha, hu] have hquad (v : Fin (ell + 1) → ℝ) : localGramQuadratic q phi (F z) v = matrixQuadratic (localGram B z x ell delta h) v := by unfold localGramQuadratic matrixQuadratic simp_rw [hentry] apply Finset.sum_congr rfl intro j hj apply Finset.sum_congr rfl intro k hk ring rw [hcount] constructor · rintro ⟨hN, hg⟩ refine ⟨by exact_mod_cast hN, ?_⟩ intro v have hv := hg v rw [hquad] at hv dsimp [lam, ell] at hv ⊢ ring_nf at hv ⊢ exact hv · rintro ⟨hN, hg⟩ refine ⟨by exact_mod_cast hN, ?_⟩ intro v have hv := hg v rw [← hquad] at hv dsimp [lam, ell] at hv ⊢ ring_nf at hv ⊢ exact hv have hprob : (iidProduct P n).real {z | ¬ GoodGramEvent B z x ell kappa cminus cplus delta h} ≤ 1 := measureReal_le_one by_cases hlarge : 8 ≤ n · have hN : 0 < B.I2.card := lt_of_lt_of_le (by omega) B.card_I2 have hp : 0 < p := lt_of_lt_of_le (mul_pos (mul_pos hK hh) (Real.rpow_pos_of_pos (by linarith [hdelta.1]) kappa)) hpLower have hlocal := localized_empiricalGram_coercive_of_pos P.dataMeasure q phi hqmeas hphimeas hN hp hlam (by norm_num) hq hphi rfl hcoercive have htail : (iidProduct P n).real {z | ¬ GoodGramEvent B z x ell kappa cminus cplus delta h} ≤ A * exp (-(B.I2.card : ℝ) * p * r) := by let E : Set (Fin B.I2.card → ClampObs J) := {omega | ¬ LocalizedGramGood lam q phi omega} have hset : {z : Fin n → ClampObs J | ¬ GoodGramEvent B z x ell kappa cminus cplus delta h} = F ⁻¹' E := by ext z simp only [Set.mem_setOf_eq, Set.mem_preimage] exact not_congr (hgood z).symm have hle : (iidProduct P n) (F ⁻¹' E) ≤ ((iidProduct P n).map F) E := Measure.le_map_apply (by fun_prop) E have hreal : (iidProduct P n).real (F ⁻¹' E) ≤ ((iidProduct P n).map F).real E := by exact ENNReal.toReal_mono (measure_ne_top _ _) hle rw [hset] rw [iid_block_product_law P hsampling B.I2] at hreal exact hreal.trans (by simpa [E, A, d, r] using hlocal) have hcard : (n : ℝ) / 8 ≤ B.I2.card := by have hqcard := B.card_I2 have hncard : n ≤ 8 * B.I2.card := by omega have hncardR : (n : ℝ) ≤ 8 * (B.I2.card : ℝ) := by exact_mod_cast hncard linarith have hexp : c * (n : ℝ) * h * (delta + h) ^ kappa ≤ (B.I2.card : ℝ) * p * r := by have ht : 0 ≤ h * (delta + h) ^ kappa := mul_nonneg hh.le (Real.rpow_nonneg (by linarith [hdelta.1]) kappa) have hcn : c * (n : ℝ) ≤ r * K * (B.I2.card : ℝ) := by dsimp [c] nlinarith [mul_pos hr hK] calc c * (n : ℝ) * h * (delta + h) ^ kappa = (c * (n : ℝ)) * (h * (delta + h) ^ kappa) := by ring _ ≤ (r * K * (B.I2.card : ℝ)) * (h * (delta + h) ^ kappa) := mul_le_mul_of_nonneg_right hcn ht _ = (B.I2.card : ℝ) * (K * h * (delta + h) ^ kappa) * r := by ring _ ≤ (B.I2.card : ℝ) * p * r := by exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hpLower (Nat.cast_nonneg _)) hr.le refine ⟨htail.trans ?_, ?_⟩ · simpa [h] using mul_le_mul hCA (Real.exp_le_exp.mpr (neg_le_neg hexp)) (Real.exp_pos _).le (by linarith [hA]) -- … truncated; follow the source link for the rest …
CausalSmith.Stat.LmtpThresholdAtomFrontier.total_gram_stabilization · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/TotalGram.lean:498
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.UpperEmpirical 4 declarations
theorem blockAverage_l1_le

Expected absolute error of a bounded empirical average over an arbitrary nonempty deterministic block of a finite product sample. The result uses the hI condition, the hf condition, the hf0 condition, the hf1 condition, the hm condition. This is the stated conclusion.

Formal statement
J n :
P :
I :
hI :
0 < I.card
f :
ClampObs J → ℝ
hf :
hf0 :
∀ o, 0 ≤ f o
hf1 :
∀ o, f o ≤ 1
m :
hm :
∫ o, f o ∂P.dataMeasure = m
IsProbabilityMeasure P.dataMeasure
(∫ z, |blockAverage I z f - m| ∂iidProduct P n) ≤ (1 / 2 : ℝ) * sqrt (I.card : ℝ)⁻¹
Proof (Lean source)
lemma blockAverage_l1_le {J n : ℕ} (P : ClampLaw J) (I : Finset (Fin n)) (hI : 0 < I.card) (f : ClampObs J → ℝ) (hf : Measurable f) (hf0 : ∀ o, 0 ≤ f o) (hf1 : ∀ o, f o ≤ 1) (m : ℝ) (hm : ∫ o, f o ∂P.dataMeasure = m) [IsProbabilityMeasure P.dataMeasure] : (∫ z, |blockAverage I z f - m| ∂iidProduct P n) ≤ (1 / 2 : ℝ) * sqrt (I.card : ℝ)⁻¹ := by letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance letI : MeasurableSpace Unit := ⊥ let design : ClampObs J → Unit := fun _ => () let mD : Unit → ℝ := fun _ => m let w : (Fin n → Unit) → Fin n → ℝ := fun _ i => if i ∈ I then (I.card : ℝ)⁻¹ else 0 have hd : Measurable design := measurable_const have hmD : Measurable mD := measurable_const have hcond : P.dataMeasure[f | comap design inferInstance] =ᵐ[P.dataMeasure] mD ∘ design := by have hspace : comap design inferInstance = ⊥ := by ext s rw [MeasurableSpace.measurableSet_comap, MeasurableSpace.measurableSet_bot_iff] constructor · rintro ⟨t, ht, rfl⟩ rcases MeasurableSpace.measurableSet_bot_iff.mp ht with rfl | rfl <;> simp · rintro (rfl | rfl) · exact ⟨∅, MeasurableSet.empty, by simp⟩ · exact ⟨Set.univ, MeasurableSet.univ, by simp⟩ rw [hspace, condExp_bot] filter_upwards with o simp [mD, hm] have hw : Measurable w := by apply measurable_pi_lambda intro i by_cases hi : i ∈ I <;> simp [w, hi] have henergy (z : Fin n → ClampObs J) : (∑ i, w (designVector design z) i ^ 2) = (I.card : ℝ)⁻¹ := by classical simp only [w] have hcard : (I.card : ℝ) ≠ 0 := by exact_mod_cast hI.ne' simp [hcard] field_simp have henergyInt : Integrable (fun z : Fin n → ClampObs J => ∑ i, w (designVector design z) i ^ 2) (iidProduct P n) := by convert integrable_const (μ := iidProduct P n) (I.card : ℝ)⁻¹ using 1 funext z exact henergy z have hcenter (o : ClampObs J) : |f o - m| ≤ 1 := by have hm0 : 0 ≤ m := by rw [← hm]; exact integral_nonneg hf0 have hm1 : m ≤ 1 := by have hfint : Integrable f P.dataMeasure := Integrable.of_bound hf.aestronglyMeasurable 1 (ae_of_all _ fun o => by rw [Real.norm_eq_abs, abs_of_nonneg (hf0 o)] exact hf1 o) rw [← hm] calc (∫ o, f o ∂P.dataMeasure) ≤ ∫ _o, (1 : ℝ) ∂P.dataMeasure := integral_mono_ae hfint (integrable_const 1) (ae_of_all _ hf1) _ = 1 := by simp rw [abs_le] constructor <;> linarith [hf0 o, hf1 o] let S := Causalean.Mathlib.Probability.weightedCenteredSum design f mD w have hSmeas : Measurable S := by dsimp [S] unfold Causalean.Mathlib.Probability.weightedCenteredSum exact Finset.measurable_fun_sum _ fun i _ => ((measurable_pi_apply i).comp (hw.comp (measurable_designVector design hd))).mul ((hf.comp (measurable_pi_apply i)).sub (hmD.comp (hd.comp (measurable_pi_apply i)))) have hSbound (z : Fin n → ClampObs J) : |S z| ≤ 1 := by dsimp [S] unfold Causalean.Mathlib.Probability.weightedCenteredSum calc _ ≤ ∑ i, |w (designVector design z) i * (f (z i) - mD (design (z i)))| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ i, if i ∈ I then (I.card : ℝ)⁻¹ else 0 := by apply Finset.sum_le_sum intro i hi by_cases hiI : i ∈ I · simp only [w, mD, hiI, if_true, abs_mul, abs_inv] rw [abs_of_nonneg (Nat.cast_nonneg I.card)] simpa using mul_le_mul_of_nonneg_left (hcenter (z i)) (inv_nonneg.mpr (Nat.cast_nonneg I.card)) · simp [w, hiI] _ = ∑ i ∈ I, (I.card : ℝ)⁻¹ := by simp _ = 1 := by rw [Finset.sum_const, nsmul_eq_mul] have hc : (I.card : ℝ) ≠ 0 := by exact_mod_cast hI.ne' field_simp have hSsq : Integrable (fun z => (S z) ^ 2) (iidProduct P n) := by refine Integrable.of_bound (hSmeas.pow_const 2).aestronglyMeasurable 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] rw [← sq_abs] nlinarith [hSbound z, abs_nonneg (S z)] have hbase := product_weighted_centered_l1_le P.dataMeasure design hd f hf hf0 hf1 mD hmD hcond w hw henergyInt hSsq have hSid (z : Fin n → ClampObs J) : S z = blockAverage I z f - m := by unfold S Causalean.Mathlib.Probability.weightedCenteredSum blockAverage simp only [w, mD] rw [show (∑ x, (if x ∈ I then (I.card : ℝ)⁻¹ else 0) * (f (z x) - m)) = ∑ i ∈ I, (I.card : ℝ)⁻¹ * (f (z i) - m) by simp] have hsum : ∑ i ∈ I, (I.card : ℝ)⁻¹ * (f (z i) - m) = (I.card : ℝ)⁻¹ * ∑ i ∈ I, f (z i) - m := by rw [Finset.mul_sum] simp_rw [mul_sub] rw [Finset.sum_sub_distrib, Finset.sum_const, nsmul_eq_mul] have hc : (I.card : ℝ) ≠ 0 := by exact_mod_cast hI.ne' field_simp exact hsum rw [show (∫ z, |blockAverage I z f - m| ∂iidProduct P n) = ∫ z, |S z| ∂iidProduct P n by apply integral_congr_ae filter_upwards with z rw [hSid]] have henergyIntegral : (∫ z : Fin n → ClampObs J, ∑ i, w (designVector design z) i ^ 2 ∂iidProduct P n) = (I.card : ℝ)⁻¹ := by calc _ = ∫ _z : Fin n → ClampObs J, (I.card : ℝ)⁻¹ ∂iidProduct P n := integral_congr_ae (ae_of_all _ henergy) _ = _ := by simp rw [show Measure.pi (fun _ : Fin n => P.dataMeasure) = iidProduct P n by rfl, henergyIntegral] at hbase simpa only [S] using hbase
CausalSmith.Stat.LmtpThresholdAtomFrontier.blockAverage_l1_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperEmpirical.lean:10
theorem retainedEstimate_l1_le

retained estimate absolute-error satisfies the stated upper bound for the specified J input, the specified n input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified delta input, the specified hmodel input, the specified B input, the specified hcard input.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin delta :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
B :
hcard :
0 < B.I0.card
(∫ z, |retainedEstimate B z delta - retainedMean P delta| ∂iidProduct P n)
≤ (1 / 2 : ℝ) * sqrt (B.I0.card : ℝ)⁻¹
Proof (Lean source)
lemma retainedEstimate_l1_le {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (B : SplitBlocks n) (hcard : 0 < B.I0.card) : (∫ z, |retainedEstimate B z delta - retainedMean P delta| ∂iidProduct P n) ≤ (1 / 2 : ℝ) * sqrt (B.I0.card : ℝ)⁻¹ := by let _ := hmodel.probability let f : ClampObs J → ℝ := fun o => if delta < o.A then clampUnit o.Y else 0 have hf : Measurable f := by have hA : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) apply Measurable.ite · exact measurableSet_lt measurable_const hA · exact clampUnit_measurable'.comp clampOutcome_measurable · exact measurable_const have hf0 : ∀ o, 0 ≤ f o := by intro o dsimp [f] split_ifs · exact (clampUnit_mem_Icc o.Y).1 · norm_num have hf1 : ∀ o, f o ≤ 1 := by intro o dsimp [f] split_ifs · exact (clampUnit_mem_Icc o.Y).2 · norm_num have hm : ∫ o, f o ∂P.dataMeasure = retainedMean P delta := by calc _ = ∫ o, (if delta < o.A then o.Y else 0) ∂P.dataMeasure := by apply integral_congr_ae filter_upwards [hmodel.outcomeSupport] with o ho simp [f, clampUnit, ho.1, ho.2] _ = _ := by unfold retainedMean apply integral_congr_ae filter_upwards with o by_cases ha : delta < o.A <;> simp [indicator, ha] have hb := blockAverage_l1_le P B.I0 hcard f hf hf0 hf1 (retainedMean P delta) hm calc (∫ z, |retainedEstimate B z delta - retainedMean P delta| ∂iidProduct P n) = ∫ z, |blockAverage B.I0 z f - retainedMean P delta| ∂iidProduct P n := by apply integral_congr_ae filter_upwards [iidProduct_outcomeSupport P hmodel] with z hz congr 2 unfold retainedEstimate blockAverage congr 1 apply Finset.sum_congr rfl intro i hi simp [f, clampUnit, (hz i).1, (hz i).2] _ ≤ _ := hb
CausalSmith.Stat.LmtpThresholdAtomFrontier.retainedEstimate_l1_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperEmpirical.lean:145
theorem atomEvent_integral_eq

atom event integral satisfies the stated identity for the specified J input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified delta input, the specified hmodel input, the specified x input, the specified hdelta1 input.

Formal statement
J :
P :
beta kappa L cminus cplus pmin delta :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
x :
Fin J
hdelta1 :
delta ≤ 1
(∫ o, (if o.X = x ∧ o.A ≤ delta then (1 : ℝ) else 0) ∂P.dataMeasure)
= P.px x * atomMass P x delta
Proof (Lean source)
lemma atomEvent_integral_eq {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (x : Fin J) (hdelta1 : delta ≤ 1) : (∫ o, (if o.X = x ∧ o.A ≤ delta then (1 : ℝ) else 0) ∂P.dataMeasure) = P.px x * atomMass P x delta := by let _ := hmodel.probability have hX : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) have hA : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) have hset : MeasurableSet {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} := (measurableSet_eq_fun hX measurable_const).inter (measurableSet_Icc.preimage hA) calc _ = ∫ o, indicator {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} (fun _ => (1 : ℝ)) o ∂P.dataMeasure := by apply integral_congr_ae filter_upwards [hmodel.treatmentSupport] with o ho by_cases hx : o.X = x <;> by_cases ha : o.A ≤ delta <;> simp [indicator, hx, ha, ho.1] _ = P.dataMeasure.real {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} := by rw [integral_indicator hset] simp _ = P.px x * atomMass P x delta := by rw [(hmodel.condDensity.2.2 x).2 (Icc 0 delta) measurableSet_Icc] · rfl · intro a ha exact ⟨ha.1, ha.2.trans hdelta1⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.atomEvent_integral_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperEmpirical.lean:199
theorem atomEstimate_l1_le

atom estimate absolute-error satisfies the stated upper bound for the specified J input, the specified n input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified delta input, the specified hmodel input, the specified B input, the specified hcard input, the specified x input, the specified hdelta input, the specified hdelta1 input.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin delta :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
B :
hcard :
0 < B.I1.card
x :
Fin J
hdelta :
0 ≤ delta
hdelta1 :
delta ≤ 1
(∫ z, |atomEstimate B z x delta - P.px x * atomMass P x delta| ∂iidProduct P n)
≤ (1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹
Proof (Lean source)
lemma atomEstimate_l1_le {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (B : SplitBlocks n) (hcard : 0 < B.I1.card) (x : Fin J) (hdelta : 0 ≤ delta) (hdelta1 : delta ≤ 1) : (∫ z, |atomEstimate B z x delta - P.px x * atomMass P x delta| ∂iidProduct P n) ≤ (1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ := by let _ := hmodel.probability let f : ClampObs J → ℝ := fun o => if o.X = x ∧ o.A ≤ delta then 1 else 0 have hX : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) have hA : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) have hf : Measurable f := by apply Measurable.ite · exact (measurableSet_eq_fun hX measurable_const).inter (measurableSet_le hA measurable_const) · exact measurable_const · exact measurable_const have hf0 : ∀ o, 0 ≤ f o := by intro o; dsimp [f]; split_ifs <;> norm_num have hf1 : ∀ o, f o ≤ 1 := by intro o; dsimp [f]; split_ifs <;> norm_num have hset : MeasurableSet {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} := (measurableSet_eq_fun hX measurable_const).inter (measurableSet_Icc.preimage hA) have hm : ∫ o, f o ∂P.dataMeasure = P.px x * atomMass P x delta := by calc _ = ∫ o, indicator {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} (fun _ => (1 : ℝ)) o ∂P.dataMeasure := by apply integral_congr_ae filter_upwards [hmodel.treatmentSupport] with o ho by_cases hx : o.X = x <;> by_cases ha : o.A ≤ delta <;> simp [f, indicator, hx, ha, ho.1] _ = P.dataMeasure.real {o : ClampObs J | o.X = x ∧ o.A ∈ Icc (0 : ℝ) delta} := by rw [integral_indicator hset] simp _ = P.px x * atomMass P x delta := by rw [(hmodel.condDensity.2.2 x).2 (Icc 0 delta) measurableSet_Icc] · rfl · intro a ha exact ⟨ha.1, ha.2.trans hdelta1⟩ have hb := blockAverage_l1_le P B.I1 hcard f hf hf0 hf1 (P.px x * atomMass P x delta) hm simpa [atomEstimate, f] using hb
CausalSmith.Stat.LmtpThresholdAtomFrontier.atomEstimate_l1_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperEmpirical.lean:232
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.UpperNoise 27 declarations Design-measurable weights for the local-regression noise term

Design-measurable weights for the local-regression noise term

theorem clampUnit_measurable'

clamp unit is measurable.

Formal statement
Proof (Lean source)
lemma clampUnit_measurable' : Measurable clampUnit := by unfold clampUnit fun_prop
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampUnit_measurable' · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:21
theorem clampUnit_mem_Icc

clamp unit lies in the stated closed interval for the specified t input.

Formal statement
t :
clampUnit t ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma clampUnit_mem_Icc (t : ℝ) : clampUnit t ∈ Icc (0 : ℝ) 1 := by unfold clampUnit constructor <;> simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampUnit_mem_Icc · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:26
theorem abs_clampUnit_sub_le

abs clamp unit sub satisfies the stated upper bound for the specified t input, the specified q input, the specified hq input.

Formal statement
t q :
hq :
q ∈ Icc (0 : ℝ) 1
|clampUnit t - q| ≤ |t - q|
Proof (Lean source)
lemma abs_clampUnit_sub_le (t q : ℝ) (hq : q ∈ Icc (0 : ℝ) 1) : |clampUnit t - q| ≤ |t - q| := by have hcq : clampUnit q = q := by simp [clampUnit, hq.1, hq.2] calc |clampUnit t - q| = |clampUnit t - clampUnit q| := by rw [hcq] |min 1 (max 0 t) - min 1 (max 0 q)| ≤ max |(1 : ℝ) - 1| |max 0 t - max 0 q| := abs_min_sub_min_le_max _ _ _ _ _ ≤ |t - q| := by apply max_le · simp · exact (abs_max_sub_max_le_max (0 : ℝ) t 0 q).trans (by simp)
CausalSmith.Stat.LmtpThresholdAtomFrontier.abs_clampUnit_sub_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:31
theorem clampOutcome_ae_eq

clamp outcome almost everywhere satisfies the stated identity for the specified J input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified hmodel input.

Formal statement
J :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
(fun o : ClampObs J => clampUnit o.Y) =ᵐ[P.dataMeasure] fun o => o.Y
Proof (Lean source)
lemma clampOutcome_ae_eq {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) : (fun o : ClampObs J => clampUnit o.Y) =ᵐ[P.dataMeasure] fun o => o.Y := by filter_upwards [hmodel.outcomeSupport] with o ho simp [clampUnit, ho.1, ho.2]
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampOutcome_ae_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:45
theorem iidProduct_outcomeSupport

the stated i.i.d. product outcome support property holds for the specified J input, the specified n input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified hmodel input.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
∀ᵐ z ∂iidProduct P n, ∀ i : Fin n, (z i).Y ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma iidProduct_outcomeSupport {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) : ∀ᵐ z ∂iidProduct P n, ∀ i : Fin n, (z i).Y ∈ Icc (0 : ℝ) 1 := by let _ := hmodel.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance apply ae_all_iff.mpr intro i have hmap : (iidProduct P n).map (Function.eval i) = P.dataMeasure := by simpa [iidProduct] using (Measure.pi_map_eval (fun _ : Fin n => P.dataMeasure) i) have hs := hmodel.outcomeSupport rw [← hmap] at hs have hYmeas : Measurable (fun o : ClampObs J => o.Y) := clampOutcome_measurable exact (ae_map_iff (μ := iidProduct P n) (f := Function.eval i) (p := fun o : ClampObs J => o.Y ∈ Icc (0 : ℝ) 1) (measurable_pi_apply i).aemeasurable (measurableSet_Icc.preimage hYmeas)).mp hs
CausalSmith.Stat.LmtpThresholdAtomFrontier.iidProduct_outcomeSupport · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:53
theorem clampOutcome_condExp

the stated clamp outcome cond exp property holds for the specified J input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified hmodel input, the specified x₀ input.

Formal statement
J :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
x₀ :
Fin J
P.dataMeasure[(fun o : ClampObs J => clampUnit o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance]
=ᵐ[P.dataMeasure] clampRegressionExtension P ∘ fun o => (o.X, o.A)
Proof (Lean source)
lemma clampOutcome_condExp {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (x₀ : Fin J) : P.dataMeasure[(fun o : ClampObs J => clampUnit o.Y) | comap (fun o : ClampObs J => (o.X, o.A)) inferInstance] =ᵐ[P.dataMeasure] clampRegressionExtension P ∘ fun o => (o.X, o.A) := by exact (condExp_congr_ae (clampOutcome_ae_eq P hmodel)).trans (clampRegression_condExp P hmodel x₀)
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampOutcome_condExp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:75
def clampDesignLift

A canonical observation with the specified design and dummy outcome.

Definition (Lean source)
J :
d :
Fin J × ℝ
clampDesignLift d :
⟨d.1, d.2, 0⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampDesignLift · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:85
theorem clampDesignLift_measurable

clamp design lift is measurable for the specified J input.

Formal statement
J :
Proof (Lean source)
lemma clampDesignLift_measurable {J : ℕ} : Measurable (clampDesignLift (J := J)) := by rw [measurable_iff_comap_le] change comap clampDesignLift (comap (fun o : ClampObs J => (o.X, o.A, o.Y)) inferInstance) ≤ _ rw [MeasurableSpace.comap_comp] simpa [Function.comp_def, clampDesignLift] using (measurable_fst.prodMk (measurable_snd.prodMk measurable_const)).comap_le
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampDesignLift_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:89
def localRegressionDesignWeight

The realized local-polynomial weight regarded as a function only of the full design vector.

Definition (Lean source)
J n ell :
B :
x :
Fin J
kappa cminus cplus delta h :
d :
Fin n → Fin J × ℝ
i :
Fin n
localRegressionDesignWeight B x kappa cminus cplus delta h d i :
if i ∈ B.I2 then interceptWeight B (fun j => clampDesignLift (d j)) x ell kappa cminus cplus delta h i else 0
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegressionDesignWeight · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:98
theorem localRegressionDesignWeight_measurable

local regression design weight is measurable for the specified J input, the specified n input, the specified ell input, the specified B input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
x :
Fin J
kappa cminus cplus delta h :
Measurable (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h)
Proof (Lean source)
lemma localRegressionDesignWeight_measurable {J n ell : ℕ} (B : SplitBlocks n) (x : Fin J) (kappa cminus cplus delta h : ℝ) : Measurable (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h) := by classical apply measurable_pi_lambda intro i by_cases hi : i ∈ B.I2 · simp only [localRegressionDesignWeight, hi, if_true] apply (interceptWeight_measurable B x kappa cminus cplus delta h i).comp exact measurable_pi_lambda _ fun j => clampDesignLift_measurable.comp (measurable_pi_apply j) · simp [localRegressionDesignWeight, hi]
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegressionDesignWeight_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:107
theorem localRegressionDesignWeight_apply

the stated local regression design weight apply property holds for the specified J input, the specified n input, the specified ell input, the specified B input, the specified z input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input, the specified i input.

Formal statement
J n ell :
B :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
i :
Fin n
localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i
= if i ∈ B.I2 then interceptWeight B z x ell kappa cminus cplus delta h i else 0
Proof (Lean source)
lemma localRegressionDesignWeight_apply {J n ell : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) (i : Fin n) : localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i = if i ∈ B.I2 then interceptWeight B z x ell kappa cminus cplus delta h i else 0 := by classical by_cases hi : i ∈ B.I2 · simp only [localRegressionDesignWeight, hi, if_true, designVector] unfold interceptWeight GoodGramEvent localCount localGram scaledDose rfl · simp [localRegressionDesignWeight, hi]
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegressionDesignWeight_apply · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:122
theorem weightedCenteredSum_localRegression

the stated weighted centered sum local regression property holds for the specified J input, the specified n input, the specified ell input, the specified B input, the specified P input, the specified z input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
P :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
weightedCenteredSum (fun o : ClampObs J => (o.X, o.A)) (fun o => o.Y) (clampRegressionExtension P) (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h) z
= ∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * ((z i).Y - clampRegressionExtension P ((z i).X, (z i).A))
Proof (Lean source)
lemma weightedCenteredSum_localRegression {J n ell : ℕ} (B : SplitBlocks n) (P : ClampLaw J) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) : weightedCenteredSum (fun o : ClampObs J => (o.X, o.A)) (fun o => o.Y) (clampRegressionExtension P) (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h) z = ∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * ((z i).Y - clampRegressionExtension P ((z i).X, (z i).A)) := by classical unfold weightedCenteredSum simp_rw [localRegressionDesignWeight_apply (ell := ell)] simp only [ite_mul, zero_mul] rw [← Finset.sum_filter] simp only [Finset.filter_mem_eq_inter] rw [Finset.univ_inter]
CausalSmith.Stat.LmtpThresholdAtomFrontier.weightedCenteredSum_localRegression · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:137
theorem weightedCenteredSum_localRegression_clamp

the stated weighted centered sum local regression clamp property holds for the specified J input, the specified n input, the specified ell input, the specified B input, the specified P input, the specified z input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
P :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
weightedCenteredSum (fun o : ClampObs J => (o.X, o.A)) (fun o => clampUnit o.Y) (clampRegressionExtension P) (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h) z
= ∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))
Proof (Lean source)
lemma weightedCenteredSum_localRegression_clamp {J n ell : ℕ} (B : SplitBlocks n) (P : ClampLaw J) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) : weightedCenteredSum (fun o : ClampObs J => (o.X, o.A)) (fun o => clampUnit o.Y) (clampRegressionExtension P) (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h) z = ∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A)) := by classical unfold weightedCenteredSum simp_rw [localRegressionDesignWeight_apply (ell := ell)] simp only [ite_mul, zero_mul] rw [← Finset.sum_filter] simp only [Finset.filter_mem_eq_inter] rw [Finset.univ_inter]
CausalSmith.Stat.LmtpThresholdAtomFrontier.weightedCenteredSum_localRegression_clamp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:155
theorem localRegression_weight_energy_le

local regression weight energy satisfies the stated upper bound for the specified J input, the specified n input, the specified ell input, the specified B input, the specified z input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input, the specified hh input, the specified hlambda input.

Formal statement
J n ell :
B :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
hh :
0 < h
hlambda :
0 < lambdaStar ell kappa cminus cplus
∑ i, (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2
≤ 4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2
Proof (Lean source)
lemma localRegression_weight_energy_le {J n ell : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) (hh : 0 < h) (hlambda : 0 < lambdaStar ell kappa cminus cplus) : ∑ i, (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2 ≤ 4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2 := by classical simp_rw [localRegressionDesignWeight_apply (ell := ell), ite_pow, zero_pow (by norm_num : 2 ≠ 0)] rw [← Finset.sum_filter] simp only [Finset.filter_mem_eq_inter, Finset.univ_inter] by_cases hg : GoodGramEvent B z x ell kappa cminus cplus delta h · have hc := (goodGram_weight_controls B z x kappa cminus cplus delta h hh hlambda hg).2.2 have hN : (1 : ℝ) ≤ localCount B z x delta h := by exact_mod_cast hg.1 calc _ ≤ (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / (localCount B z x delta h : ℝ) := hc _ ≤ 4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2 := by exact div_le_self (by positivity) hN · have hwzero (i : Fin n) : interceptWeight B z x ell kappa cminus cplus delta h i = 0 := by unfold interceptWeight simp [hg] simp [hwzero] positivity
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegression_weight_energy_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:173
theorem localRegression_weight_energy_integrable

local regression weight energy is integrable for the specified J input, the specified n input, the specified ell input, the specified B input, the specified P input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input, the specified hh input, the specified hlambda input.

Formal statement
J n ell :
B :
P :
IsProbabilityMeasure P.dataMeasure
x :
Fin J
kappa cminus cplus delta h :
hh :
0 < h
hlambda :
0 < lambdaStar ell kappa cminus cplus
Integrable (fun z : Fin n → ClampObs J => ∑ i, (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2) (iidProduct P n)
Proof (Lean source)
lemma localRegression_weight_energy_integrable {J n ell : ℕ} (B : SplitBlocks n) (P : ClampLaw J) [IsProbabilityMeasure P.dataMeasure] (x : Fin J) (kappa cminus cplus delta h : ℝ) (hh : 0 < h) (hlambda : 0 < lambdaStar ell kappa cminus cplus) : Integrable (fun z : Fin n → ClampObs J => ∑ i, (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2) (iidProduct P n) := by letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance let w := localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h have hmeas : Measurable (fun z : Fin n → ClampObs J => ∑ i, (w (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2) := by have hw : Measurable w := localRegressionDesignWeight_measurable B x kappa cminus cplus delta h have hd := measurable_designVector (N := n) (fun o : ClampObs J => (o.X, o.A)) clampDesign_measurable exact Finset.measurable_fun_sum _ fun i _ => ((measurable_pi_apply i).comp (hw.comp hd)).pow_const 2 apply Integrable.of_bound hmeas.aestronglyMeasurable (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (sum_nonneg fun _ _ => sq_nonneg _)] exact localRegression_weight_energy_le B z x kappa cminus cplus delta h hh hlambda
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegression_weight_energy_integrable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:201
theorem finiteProduct_bernoulliCount_lower_tail

the stated finite product bernoulli count lower tail property holds for the specified N input, the specified X input, the specified P input, the specified q input, the specified hqmeas input, the specified hq01 input, the specified hN input, the specified p input, the specified hp input, the specified hmean input.

Formal statement
N :
X :
q :
X → ℝ
hqmeas :
hq01 :
∀ x, q x = 0 ∨ q x = 1
hN :
0 < N
p :
hp :
0 < p
hmean :
∫ x, q x ∂P = p
(Measure.pi (fun _ : Fin N => P)).real {z | ∑ i, q (z i) ≤ (N : ℝ) * p / 2}
≤ 2 * exp (-((N : ℝ) * p) / 20)
Proof (Lean source)
lemma finiteProduct_bernoulliCount_lower_tail {N : ℕ} {X : Type*} [MeasurableSpace X] (P : Measure X) [IsProbabilityMeasure P] (q : X → ℝ) (hqmeas : Measurable q) (hq01 : ∀ x, q x = 0 ∨ q x = 1) (hN : 0 < N) (p : ℝ) (hp : 0 < p) (hmean : ∫ x, q x ∂P = p) : (Measure.pi (fun _ : Fin N => P)).real {z | ∑ i, q (z i) ≤ (N : ℝ) * p / 2} ≤ 2 * exp (-((N : ℝ) * p) / 20) := by letI : IsProbabilityMeasure (Measure.pi (fun _ : Fin N => P)) := inferInstance have hqIcc : ∀ x, q x ∈ Icc (0 : ℝ) 1 := by intro x rcases hq01 x with hx | hx <;> simp [hx] have hqint : Integrable q P := by refine Integrable.of_bound hqmeas.aestronglyMeasurable 1 ?_ filter_upwards with x rcases hq01 x with hx | hx <;> simp [hx] have hp_le : p ≤ 1 := by calc p = ∫ x, q x ∂P := hmean.symm _ ≤ ∫ _x, (1 : ℝ) ∂P := integral_mono_ae hqint (integrable_const 1) (ae_of_all _ fun x => (hqIcc x).2) _ = 1 := by simp have henvelope : ∀ᵐ x ∂P, |q x - ∫ y, q y ∂P| ≤ 1 := by filter_upwards with x rw [hmean] exact abs_le.2 ⟨by linarith [(hqIcc x).1], by linarith [(hqIcc x).2]⟩ have hvar : ∫ x, (q x - ∫ y, q y ∂P) ^ 2 ∂P ≤ p := by rw [hmean] have hq2int : Integrable (fun x => q x ^ 2) P := by exact Integrable.of_bound (hqmeas.pow_const 2).aestronglyMeasurable 1 (ae_of_all _ fun x => by rcases hq01 x with hx | hx <;> simp [hx]) calc ∫ x, (q x - p) ^ 2 ∂P = (∫ x, q x ^ 2 ∂P) - 2 * p * (∫ x, q x ∂P) + p ^ 2 := by rw [show (fun x => (q x - p) ^ 2) = fun x => q x ^ 2 - 2 * p * q x + p ^ 2 by funext x; ring] integral_linearity rw [integral_const] simp _ = p - p ^ 2 := by rw [show (∫ x, q x ^ 2 ∂P) = p by rw [← hmean] apply integral_congr_ae filter_upwards with x rcases hq01 x with hx | hx <;> simp [hx]] rw [hmean] ring _ ≤ p := by nlinarith [sq_nonneg p] let g : Unit → X → ℝ := fun _ => q let b : Unit → ℝ := fun _ => 1 let sigma2 : Unit → ℝ := fun _ => p let eta : Unit → ℝ := fun _ => (N : ℝ) * p / 2 have hbern := iid_sum_bernstein_union_bound P g (fun _ => hqmeas) (fun _ => hqint) b sigma2 eta (fun _ => by simp [b]) (fun _ => hp.le) (fun _ => by dsimp [eta]; positivity) hN (fun _ => by simpa [g] using henvelope) (fun _ => by simpa [g] using hvar) calc _ ≤ (Measure.pi (fun _ : Fin N => P)).real {z | ∃ a : Unit, eta a ≤ |(∑ i, g a (z i)) - (N : ℝ) * ∫ x, g a x ∂P|} := by refine measureReal_mono ?_ (measure_ne_top _ _) intro z hz refine ⟨(), ?_⟩ simp only [eta, g, hmean] change (∑ i, q (z i)) ≤ (N : ℝ) * p / 2 at hz have hdiff : (∑ i, q (z i)) - (N : ℝ) * p ≤ 0 := by have hNp : 0 ≤ (N : ℝ) * p := by positivity linarith rw [abs_of_nonpos hdiff] linarith _ ≤ ∑ a : Unit, 2 * exp (-(eta a) ^ 2 / (2 * (2 * (N : ℝ) * sigma2 a + b a * eta a))) := hbern _ = 2 * exp (-((N : ℝ) * p) / 20) := by simp only [Fintype.sum_unique, eta, sigma2, b] have hNp : 0 < (N : ℝ) * p := mul_pos (by exact_mod_cast hN) hp congr 2 field_simp ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.finiteProduct_bernoulliCount_lower_tail · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:229
theorem iid_block_product_law'

the stated i.i.d. block product law property holds for the specified J input, the specified n input, the specified P input, the specified hsampling input, the specified I input.

Formal statement
J n :
P :
hsampling :
I :
(iidProduct P n).map (fun z => fun j : Fin I.card => z ((I.orderIsoOfFin rfl) j))
= Measure.pi (fun _ : Fin I.card => P.dataMeasure)
Proof (Lean source)
lemma iid_block_product_law' {J n : ℕ} (P : ClampLaw J) (hsampling : IidSampling P n) (I : Finset (Fin n)) : (iidProduct P n).map (fun z => fun j : Fin I.card => z ((I.orderIsoOfFin rfl) j)) = Measure.pi (fun _ : Fin I.card => P.dataMeasure) := by let _ : IsProbabilityMeasure P.dataMeasure := hsampling.1 simpa [iidProduct] using block_reindexed_law_eq P.dataMeasure I
CausalSmith.Stat.LmtpThresholdAtomFrontier.iid_block_product_law' · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:309
theorem localCount_lower_tail

the stated local count lower tail property holds for the specified J input, the specified n input, the specified P input, the specified hsampling input, the specified B input, the specified x input, the specified delta input, the specified h input, the specified p input, the specified hh input, the specified hp input, the specified hmean input, the specified hcard input.

Formal statement
J n :
P :
hsampling :
B :
x :
Fin J
delta h p :
hh :
0 < h
hp :
0 < p
hmean :
∫ o, localWindowWeight x delta h o ∂P.dataMeasure = p
hcard :
0 < B.I2.card
(iidProduct P n).real {z | (localCount B z x delta h : ℝ) ≤ (B.I2.card : ℝ) * p / 2}
≤ 2 * exp (-((B.I2.card : ℝ) * p) / 20)
Proof (Lean source)
lemma localCount_lower_tail {J n : ℕ} (P : ClampLaw J) (hsampling : IidSampling P n) (B : SplitBlocks n) (x : Fin J) (delta h p : ℝ) (hh : 0 < h) (hp : 0 < p) (hmean : ∫ o, localWindowWeight x delta h o ∂P.dataMeasure = p) (hcard : 0 < B.I2.card) : (iidProduct P n).real {z | (localCount B z x delta h : ℝ) ≤ (B.I2.card : ℝ) * p / 2} ≤ 2 * exp (-((B.I2.card : ℝ) * p) / 20) := by letI : IsProbabilityMeasure P.dataMeasure := hsampling.1 let F : (Fin n → ClampObs J) → (Fin B.I2.card → ClampObs J) := fun z j => z ((B.I2.orderIsoOfFin rfl) j) let q := localWindowWeight x delta h have hF : Measurable F := measurable_pi_lambda _ fun j => measurable_pi_apply _ have hqmeas : Measurable q := measurable_localWindowWeight x delta h have hq01 : ∀ o, q o = 0 ∨ q o = 1 := by intro o unfold q localWindowWeight split_ifs <;> simp let E : Set (Fin B.I2.card → ClampObs J) := {w | ∑ j, q (w j) ≤ (B.I2.card : ℝ) * p / 2} have hE : MeasurableSet E := measurableSet_le (Finset.measurable_fun_sum _ fun j _ => hqmeas.comp (measurable_pi_apply j)) measurable_const have hsum (z : Fin n → ClampObs J) : (∑ j, q (F z j)) = (localCount B z x delta h : ℝ) := by change (∑ j : Fin B.I2.card, q (z ((B.I2.orderIsoOfFin rfl) j))) = _ rw [show (∑ j : Fin B.I2.card, q (z ((B.I2.orderIsoOfFin rfl) j))) = ∑ i ∈ B.I2, q (z i) by calc _ = ∑ i : B.I2, q (z i) := Equiv.sum_comp (B.I2.orderIsoOfFin rfl).toEquiv (fun i : B.I2 => q (z i)) _ = _ := (Finset.sum_subtype B.I2 (fun _ => Iff.rfl) (fun i => q (z i))).symm] unfold q localWindowWeight localCount simp_rw [scaledDose_mem_Icc_iff hh] norm_cast have hset : {z : Fin n → ClampObs J | (localCount B z x delta h : ℝ) ≤ (B.I2.card : ℝ) * p / 2} = F ⁻¹' E := by ext z simp only [Set.mem_setOf_eq, Set.mem_preimage] change (localCount B z x delta h : ℝ) ≤ _ ↔ (∑ j, q (F z j)) ≤ _ rw [hsum] rw [hset, measureReal_def, ← Measure.map_apply hF hE, iid_block_product_law' P hsampling B.I2] exact finiteProduct_bernoulliCount_lower_tail P.dataMeasure q hqmeas hq01 hcard p hp hmean
CausalSmith.Stat.LmtpThresholdAtomFrontier.localCount_lower_tail · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:318
theorem localRegression_weight_energy_integral_le

local regression weight energy integral satisfies the stated upper bound for the specified J input, the specified n input, the specified ell input, the specified P input, the specified hsampling input, the specified B input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input, the specified p input, the specified hh input, the specified hlambda input, the specified hp input, the specified hcard input, the specified hmean input.

Formal statement
J n ell :
P :
hsampling :
B :
x :
Fin J
kappa cminus cplus delta h p :
hh :
0 < h
hlambda :
0 < lambdaStar ell kappa cminus cplus
hp :
0 < p
hcard :
0 < B.I2.card
hmean :
∫ o, localWindowWeight x delta h o ∂P.dataMeasure = p
(∫ z, ∑ i, (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2 ∂iidProduct P n)
≤ 2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / ((B.I2.card : ℝ) * p)
+ 2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) * exp (-((B.I2.card : ℝ) * p) / 20)
Proof (Lean source)
lemma localRegression_weight_energy_integral_le {J n ell : ℕ} (P : ClampLaw J) (hsampling : IidSampling P n) (B : SplitBlocks n) (x : Fin J) (kappa cminus cplus delta h p : ℝ) (hh : 0 < h) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (hp : 0 < p) (hcard : 0 < B.I2.card) (hmean : ∫ o, localWindowWeight x delta h o ∂P.dataMeasure = p) : (∫ z, ∑ i, (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2 ∂iidProduct P n) ≤ 2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / ((B.I2.card : ℝ) * p) + 2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) * exp (-((B.I2.card : ℝ) * p) / 20) := by letI : IsProbabilityMeasure P.dataMeasure := hsampling.1 letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance let K := 4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2 let mp := (B.I2.card : ℝ) * p let energy : (Fin n → ClampObs J) → ℝ := fun z => ∑ i, (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2 let low : Set (Fin n → ClampObs J) := {z | (localCount B z x delta h : ℝ) ≤ mp / 2} have hK : 0 ≤ K := by dsimp [K]; positivity have hmp : 0 < mp := by dsimp [mp]; positivity have henergyInt : Integrable energy (iidProduct P n) := by exact localRegression_weight_energy_integrable B P x kappa cminus cplus delta h hh hlambda have hlow : MeasurableSet low := by exact measurableSet_le ((measurable_of_countable (fun m : ℕ => (m : ℝ))).comp (localCount_measurable B x delta h)) measurable_const have hpoint (z : Fin n → ClampObs J) : energy z ≤ 2 * K / mp + K * low.indicator (fun _ => (1 : ℝ)) z := by by_cases hzlow : z ∈ low · have he := localRegression_weight_energy_le B z x kappa cminus cplus delta h hh hlambda simp only [Set.indicator_of_mem hzlow, mul_one] have hterm : 0 ≤ 2 * K / mp := by positivity exact he.trans (by dsimp [energy, K] at he ⊢; linarith) · simp only [Set.indicator_of_notMem hzlow, mul_zero, add_zero] by_cases hg : GoodGramEvent B z x ell kappa cminus cplus delta h · have he := (goodGram_weight_controls B z x kappa cminus cplus delta h hh hlambda hg).2.2 have hN : mp / 2 < (localCount B z x delta h : ℝ) := by exact lt_of_not_ge hzlow have hNpos : 0 < (localCount B z x delta h : ℝ) := by exact_mod_cast hg.1 calc energy z = ∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2 := by dsimp [energy] simp_rw [localRegressionDesignWeight_apply (ell := ell), ite_pow, zero_pow (by norm_num : 2 ≠ 0)] rw [← Finset.sum_filter] simp _ ≤ K / (localCount B z x delta h : ℝ) := by simpa [K] using he _ ≤ 2 * K / mp := by rw [div_le_iff₀ hNpos, div_mul_eq_mul_div, le_div_iff₀ hmp] have hmul := mul_le_mul_of_nonneg_left hN.le hK nlinarith · have hwzero (i : Fin n) : localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i = 0 := by rw [localRegressionDesignWeight_apply (ell := ell)] split_ifs · unfold interceptWeight simp [hg] · rfl simp [energy, hwzero] positivity have hrhsInt : Integrable (fun z => 2 * K / mp + K * low.indicator (fun _ => (1 : ℝ)) z) (iidProduct P n) := (integrable_const _).add ((integrable_const 1).indicator hlow |>.const_mul K) calc ∫ z, energy z ∂iidProduct P n ≤ ∫ z, (2 * K / mp + K * low.indicator (fun _ => (1 : ℝ)) z) ∂iidProduct P n := integral_mono henergyInt hrhsInt hpoint _ = 2 * K / mp + K * (iidProduct P n).real low := by rw [integral_add, integral_const, integral_const_mul] · rw [integral_indicator hlow, integral_const] simp [measureReal_def, hlow] · exact integrable_const _ · exact (integrable_const 1).indicator hlow |>.const_mul K _ ≤ 2 * K / mp + K * (2 * exp (-mp / 20)) := by gcongr simpa [low, mp] using localCount_lower_tail P hsampling B x delta h p hh hp hmean hcard _ = 2 * K / mp + 2 * K * exp (-mp / 20) := by ring _ = _ := by simp [K, mp]
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegression_weight_energy_integral_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:365
theorem localRegression_centered_l1_le

local regression centered absolute-error satisfies the stated upper bound for the specified J input, the specified n input, the specified ell input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified hmodel input, the specified hsampling input, the specified B input, the specified x input, the specified delta input, the specified h input, the specified p input, the specified hh input, the specified hlambda input, the specified hkappa input, the specified hcplus input, the specified hpmin input, the specified hp input, the specified hcard input, the specified hmean input.

Formal statement
J n ell :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hsampling :
B :
x :
Fin J
delta h p :
hh :
0 < h
hlambda :
0 < lambdaStar ell kappa cminus cplus
hkappa :
0 ≤ kappa
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
hp :
0 < p
hcard :
0 < B.I2.card
hmean :
∫ o, localWindowWeight x delta h o ∂P.dataMeasure = p
(∫ z, |∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| ∂iidProduct P n)
≤ (1 / 2 : ℝ) * sqrt (2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / ((B.I2.card : ℝ) * p) + 2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) * exp (-((B.I2.card : ℝ) * p) / 20))
Proof (Lean source)
lemma localRegression_centered_l1_le {J n ell : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hsampling : IidSampling P n) (B : SplitBlocks n) (x : Fin J) (delta h p : ℝ) (hh : 0 < h) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (hkappa : 0 ≤ kappa) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (hp : 0 < p) (hcard : 0 < B.I2.card) (hmean : ∫ o, localWindowWeight x delta h o ∂P.dataMeasure = p) : (∫ z, |∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| ∂iidProduct P n) ≤ (1 / 2 : ℝ) * sqrt (2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / ((B.I2.card : ℝ) * p) + 2 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) * exp (-((B.I2.card : ℝ) * p) / 20)) := by letI : IsProbabilityMeasure P.dataMeasure := hmodel.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance let design : ClampObs J → Fin J × ℝ := fun o => (o.X, o.A) let Y : ClampObs J → ℝ := fun o => clampUnit o.Y let w := localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h let S := weightedCenteredSum design Y (clampRegressionExtension P) w let energy : (Fin n → ClampObs J) → ℝ := fun z => ∑ i, (w (designVector design z) i) ^ 2 have hw : Measurable w := localRegressionDesignWeight_measurable B x kappa cminus cplus delta h have hd : Measurable design := clampDesign_measurable have hY : Measurable Y := clampUnit_measurable'.comp clampOutcome_measurable have hmD := clampRegressionExtension_measurable P hmodel.holder have henergyInt : Integrable energy (iidProduct P n) := by simpa [energy, w, design] using localRegression_weight_energy_integrable B P x kappa cminus cplus delta h hh hlambda have hSmeas : Measurable S := by dsimp [S] unfold weightedCenteredSum exact Finset.measurable_fun_sum _ fun i _ => ((measurable_pi_apply i).comp (hw.comp (measurable_designVector design hd))).mul ((hY.comp (measurable_pi_apply i)).sub (hmD.comp (hd.comp (measurable_pi_apply i)))) have hSsq : Integrable (fun z => (S z) ^ 2) (iidProduct P n) := by refine Integrable.mono (henergyInt.const_mul (n : ℝ)) (hSmeas.pow_const 2).aestronglyMeasurable ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _), Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (Nat.cast_nonneg _) (sum_nonneg fun _ _ => sq_nonneg _))] have hcs := Finset.sum_mul_sq_le_sq_mul_sq univ (fun i => w (designVector design z) i) (fun i => Y (z i) - clampRegressionExtension P (design (z i))) have hr : ∑ i, (Y (z i) - clampRegressionExtension P (design (z i))) ^ 2 ≤ (n : ℝ) := by calc _ ≤ ∑ _i : Fin n, (1 : ℝ) := by apply Finset.sum_le_sum intro i hi have hYi := clampUnit_mem_Icc (z i).Y have hmi := clampRegressionExtension_mem_Icc P hmodel.holder (design (z i)) have hY0 : 0 ≤ Y (z i) := by simpa [Y] using hYi.1 have hY1 : Y (z i) ≤ 1 := by simpa [Y] using hYi.2 have hm0 : 0 ≤ clampRegressionExtension P (design (z i)) := hmi.1 have hm1 : clampRegressionExtension P (design (z i)) ≤ 1 := hmi.2 have hlo : -(1 : ℝ) ≤ Y (z i) - clampRegressionExtension P (design (z i)) := by linarith have hhi : Y (z i) - clampRegressionExtension P (design (z i)) ≤ 1 := by linarith nlinarith [mul_nonneg (sub_nonneg.mpr hlo) (sub_nonneg.mpr hhi)] _ = n := by simp calc S z ^ 2 ≤ energy z * ∑ i, (Y (z i) - clampRegressionExtension P (design (z i))) ^ 2 := hcs _ ≤ energy z * n := mul_le_mul_of_nonneg_left hr (sum_nonneg fun _ _ => sq_nonneg _) _ = n * energy z := mul_comm _ _ have hbase := product_weighted_centered_l1_le P.dataMeasure design hd Y hY (fun o => (clampUnit_mem_Icc o.Y).1) (fun o => (clampUnit_mem_Icc o.Y).2) (clampRegressionExtension P) hmD (clampOutcome_condExp P hmodel x) w hw henergyInt hSsq rw [show (∫ z, |∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| ∂iidProduct P n) = ∫ z, |S z| ∂iidProduct P n by apply integral_congr_ae filter_upwards with z congr 1 simpa [S, design, Y, w] using (weightedCenteredSum_localRegression_clamp (ell := ell) B P z x kappa cminus cplus delta h).symm] refine hbase.trans (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt ?_) (by norm_num)) exact localRegression_weight_energy_integral_le P hsampling B x kappa cminus cplus delta h p hh hlambda hp hcard hmean
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegression_centered_l1_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:460
theorem effectiveSampleSize_eq_rpow

The information-balance identity expressed as the reciprocal effective sample size used by the local-regression variance bound. The result uses the hh condition, the hb condition. This is the stated conclusion.

Formal statement
n :
beta kappa delta h :
hh :
0 < h
hb :
(n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1
(n : ℝ) * h * (delta + h) ^ kappa = h ^ (-2 * beta)
Proof (Lean source)
lemma effectiveSampleSize_eq_rpow {n : ℕ} {beta kappa delta h : ℝ} (hh : 0 < h) (hb : (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1) : (n : ℝ) * h * (delta + h) ^ kappa = h ^ (-2 * beta) := by have hp := Real.rpow_add hh (2 * beta) 1 rw [Real.rpow_one] at hp have hnhe : (n : ℝ) * (h ^ (2 * beta) * h) * (delta + h) ^ kappa = 1 := by rw [← hp] exact hb have hpow : 0 < h ^ (2 * beta) := Real.rpow_pos_of_pos hh _ rw [show -2 * beta = -(2 * beta) by ring, Real.rpow_neg hh.le, inv_eq_one_div] apply (eq_div_iff hpow.ne').2 nlinarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.effectiveSampleSize_eq_rpow · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:557
theorem exp_neg_scaled_le_inv

the stated exp neg scaled bound inv property holds for the specified t input, the specified ht input.

Formal statement
t :
ht :
0 < t
exp (-t / 20) ≤ 20 / t
Proof (Lean source)
lemma exp_neg_scaled_le_inv {t : ℝ} (ht : 0 < t) : exp (-t / 20) ≤ 20 / t := by have hu : 0 < t / 20 := div_pos ht (by norm_num) have he : t / 20 ≤ exp (t / 20) := le_trans (le_add_of_nonneg_right zero_le_one) (Real.add_one_le_exp (t / 20)) have hi : exp (-(t / 20)) ≤ (t / 20)⁻¹ := by rw [Real.exp_neg] exact (inv_le_inv₀ (Real.exp_pos _) hu).2 he rw [inv_div] at hi simpa [div_eq_mul_inv] using hi
CausalSmith.Stat.LmtpThresholdAtomFrontier.exp_neg_scaled_le_inv · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:575
theorem balancedEffectiveSample_sqrt_le

A deterministic conversion of the count-weighted noise expression to the balanced bandwidth rate. The constants include the split-block factor eight and the elementary exponential bound exp (-t/20) ≤ 20/t. The result uses the hn condition, the hh condition, the hD condition, the hK condition, the hm condition, the hp condition, the hb condition. This is the stated conclusion.

Formal statement
n :
beta kappa delta h p m D K :
hn :
0 < n
hh :
0 < h
hD :
0 ≤ D
hK :
0 < K
hm :
(n : ℝ) / 8 ≤ m
hp :
K * h * (delta + h) ^ kappa ≤ p
hb :
(n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1
sqrt (2 * D / (m * p) + 2 * D * exp (-(m * p) / 20))
sqrt (336 * D / K) * h ^ beta
Proof (Lean source)
lemma balancedEffectiveSample_sqrt_le {n : ℕ} {beta kappa delta h p m D K : ℝ} (hn : 0 < n) (hh : 0 < h) (hD : 0 ≤ D) (hK : 0 < K) (hm : (n : ℝ) / 8 ≤ m) (hp : K * h * (delta + h) ^ kappa ≤ p) (hb : (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1) : sqrt (2 * D / (m * p) + 2 * D * exp (-(m * p) / 20)) ≤ sqrt (336 * D / K) * h ^ beta := by have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have heff := effectiveSampleSize_eq_rpow hh hb have hbase : 0 < K * h * (delta + h) ^ kappa := by have heffpos : 0 < (n : ℝ) * h * (delta + h) ^ kappa := by rw [heff] exact Real.rpow_pos_of_pos hh _ have htail : 0 < (delta + h) ^ kappa := by have heffpos' : 0 < (delta + h) ^ kappa * ((n : ℝ) * h) := by simpa [mul_comm] using heffpos exact pos_of_mul_pos_left heffpos' (mul_nonneg hnR.le hh.le) positivity have hp0 : 0 < p := hbase.trans_le hp have hm0 : 0 < m := lt_of_lt_of_le (div_pos hnR (by norm_num)) hm have ht0 : 0 < m * p := mul_pos hm0 hp0 have htLower : (K / 8) * h ^ (-2 * beta) ≤ m * p := by calc (K / 8) * h ^ (-2 * beta) = ((n : ℝ) / 8) * (K * h * (delta + h) ^ kappa) := by rw [← heff] ring _ ≤ m * p := mul_le_mul hm hp (by positivity) (by positivity) have hinv : (m * p)⁻¹ ≤ (8 / K) * h ^ (2 * beta) := by have hi := (inv_le_inv₀ ht0 (by positivity : 0 < (K / 8) * h ^ (-2 * beta))).2 htLower rw [show -2 * beta = -(2 * beta) by ring, Real.rpow_neg hh.le] at hi calc (m * p)⁻¹ ≤ ((K / 8) * (h ^ (2 * beta))⁻¹)⁻¹ := hi _ = (8 / K) * h ^ (2 * beta) := by field_simp have hexp : exp (-(m * p) / 20) ≤ 20 * (m * p)⁻¹ := by have he := exp_neg_scaled_le_inv ht0 simpa [div_eq_mul_inv] using he have hinside : 2 * D / (m * p) + 2 * D * exp (-(m * p) / 20) ≤ (336 * D / K) * h ^ (2 * beta) := by rw [div_eq_mul_inv] calc 2 * D * (m * p)⁻¹ + 2 * D * exp (-(m * p) / 20) ≤ 2 * D * (m * p)⁻¹ + 2 * D * (20 * (m * p)⁻¹) := by gcongr _ = 42 * D * (m * p)⁻¹ := by ring _ ≤ 42 * D * ((8 / K) * h ^ (2 * beta)) := by gcongr _ = (336 * D / K) * h ^ (2 * beta) := by ring calc sqrt (2 * D / (m * p) + 2 * D * exp (-(m * p) / 20)) ≤ sqrt ((336 * D / K) * h ^ (2 * beta)) := Real.sqrt_le_sqrt hinside _ = sqrt (336 * D / K) * sqrt (h ^ (2 * beta)) := by rw [Real.sqrt_mul (by positivity : 0 ≤ 336 * D / K)] _ = sqrt (336 * D / K) * h ^ beta := by congr 1 rw [show 2 * beta = beta * 2 by ring, Real.rpow_mul hh.le, Real.rpow_two] exact (Real.sqrt_sq_eq_abs (h ^ beta)).trans (abs_of_nonneg (Real.rpow_nonneg hh.le _))
CausalSmith.Stat.LmtpThresholdAtomFrontier.balancedEffectiveSample_sqrt_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:587
theorem localRegression_holderBias_le

On a good realized Gram event, the conditional mean part of the local polynomial estimator has the stated Hölder bias. The result uses the hmodel condition, the hbeta condition, the hL condition, the hdelta condition, the hh condition, the hupper condition, the hlambda condition, the hgood condition. This is the stated conclusion.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hbeta :
0 < beta
hL :
0 < L
B :
z :
Fin n → ClampObs J
x :
Fin J
hdelta :
0 ≤ delta
hh :
0 < h
hupper :
delta + h ≤ 1
hlambda :
0 < lambdaStar (ellOf beta) kappa cminus cplus
hgood :
GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h
|(∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampRegressionExtension P ((z i).X, (z i).A))
- P.mu x delta|
≤ (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta
Proof (Lean source)
lemma localRegression_holderBias_le {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hbeta : 0 < beta) (hL : 0 < L) (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (hdelta : 0 ≤ delta) (hh : 0 < h) (hupper : delta + h ≤ 1) (hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus) (hgood : GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h) : |(∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampRegressionExtension P ((z i).X, (z i).A)) - P.mu x delta| ≤ (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta := by classical let ell := ellOf beta let w : Fin n → ℝ := fun i => interceptWeight B z x ell kappa cminus cplus delta h i let T : ℝ → ℝ := fun a => ∑ j ∈ range (ell + 1), (iteratedDerivWithin j (P.mu x) (Icc (0 : ℝ) 1) delta / (Nat.factorial j : ℝ)) * (a - delta) ^ j have hdeltaI : delta ∈ Icc (0 : ℝ) 1 := ⟨hdelta, by linarith⟩ have hrepro := (goodGram_weight_controls B z x kappa cminus cplus delta h hh hlambda hgood).1 have hpoly : ∑ i ∈ B.I2, w i * T (z i).A = P.mu x delta := by have hp := weightedPolynomial_reproduce B.I2 w (fun i => (z i).A) (fun j => iteratedDerivWithin j (P.mu x) (Icc (0 : ℝ) 1) delta / (Nat.factorial j : ℝ)) delta h hh hrepro simpa [T, ell, w] using hp have hrewrite : (∑ i ∈ B.I2, w i * clampRegressionExtension P ((z i).X, (z i).A)) - P.mu x delta = ∑ i ∈ B.I2, w i * (P.mu x (z i).A - T (z i).A) := by rw [← hpoly, ← Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro i hi by_cases ha : (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 · have hu := ha.2 have hAlo : delta ≤ (z i).A := by have := (div_nonneg_iff.mp hu.1).resolve_right (fun hn => (not_lt_of_ge hn.2 hh)) exact sub_nonneg.mp this.1 have hAhi : (z i).A ≤ delta + h := by have := (div_le_iff₀ hh).mp hu.2 linarith have hAI : (z i).A ∈ Icc (0 : ℝ) 1 := ⟨hdelta.trans hAlo, hAhi.trans hupper⟩ rw [show (z i).X = x from ha.1, clampRegressionExtension_eq P x hAI] simp only [w] ring · have hw0 : w i = 0 := by dsimp [w, ell] exact interceptWeight_eq_zero_of_inactive B z x (ellOf beta) kappa cminus cplus delta h i hgood (fun hi => ha ⟨hi.2.1, hi.2.2⟩) simp [hw0] rw [hrewrite] calc |∑ i ∈ B.I2, w i * (P.mu x (z i).A - T (z i).A)| ≤ ∑ i ∈ B.I2, |w i| * |P.mu x (z i).A - T (z i).A| := by exact (Finset.abs_sum_le_sum_abs _ _).trans_eq (by apply Finset.sum_congr rfl intro i hi rw [abs_mul]) _ ≤ ∑ i ∈ B.I2, |w i| * (L * h ^ beta) := by apply Finset.sum_le_sum intro i hi by_cases ha : (z i).X = x ∧ scaledDose delta h (z i) ∈ Icc (0 : ℝ) 1 · apply mul_le_mul_of_nonneg_left _ (abs_nonneg _) have hu := ha.2 have hAlo : delta ≤ (z i).A := by have hs := (div_nonneg_iff.mp hu.1).resolve_right (fun hn => (not_lt_of_ge hn.2 hh)) exact sub_nonneg.mp hs.1 have hAhi : (z i).A ≤ delta + h := by have hs := (div_le_iff₀ hh).mp hu.2 linarith have hAI : (z i).A ∈ Icc (0 : ℝ) 1 := ⟨hdelta.trans hAlo, hAhi.trans hupper⟩ have hrem := (hmodel.holder x).2.2.2 delta hdeltaI (z i).A hAI have habs : |(z i).A - delta| ≤ h := by rw [abs_of_nonneg (sub_nonneg.mpr hAlo)] linarith have hpw := Real.rpow_le_rpow (abs_nonneg _) habs hbeta.le have hrem' : |P.mu x (z i).A - T (z i).A| ≤ L * |(z i).A - delta| ^ beta := by simpa [T, ell, div_eq_mul_inv, mul_comm, mul_left_comm, mul_assoc] using hrem exact hrem'.trans (mul_le_mul_of_nonneg_left hpw hL.le) · have hw0 : w i = 0 := by dsimp [w, ell] exact interceptWeight_eq_zero_of_inactive B z x (ellOf beta) kappa cminus cplus delta h i hgood (fun hi => ha ⟨hi.2.1, hi.2.2⟩) simp [hw0] _ = (∑ i ∈ B.I2, |w i|) * (L * h ^ beta) := by rw [Finset.sum_mul] _ ≤ (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta := by have hl1 := (goodGram_weight_controls B z x kappa cminus cplus delta h hh hlambda hgood).2.1 have hfac : 0 ≤ L * h ^ beta := mul_nonneg hL.le (Real.rpow_nonneg hh.le _) simpa [w, ell, mul_assoc] using mul_le_mul_of_nonneg_right hl1 hfac
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegression_holderBias_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:678
theorem localRegression_good_error_le

Pointwise good-event decomposition of local-regression error into its centered stochastic sum and deterministic Hölder bias. The result uses the hmodel condition, the hbeta condition, the hL condition, the hdelta condition, the hh condition, the hupper condition, the hlambda condition, the hgood condition. This is the stated conclusion.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hbeta :
0 < beta
hL :
0 < L
B :
z :
Fin n → ClampObs J
x :
Fin J
hdelta :
0 ≤ delta
hh :
0 < h
hupper :
delta + h ≤ 1
hlambda :
0 < lambdaStar (ellOf beta) kappa cminus cplus
hgood :
GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h
|clampUnit (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampUnit (z i).Y)
- P.mu x delta|
≤ |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))|
+ (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta
Proof (Lean source)
lemma localRegression_good_error_le {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hbeta : 0 < beta) (hL : 0 < L) (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (hdelta : 0 ≤ delta) (hh : 0 < h) (hupper : delta + h ≤ 1) (hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus) (hgood : GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h) : |clampUnit (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampUnit (z i).Y) - P.mu x delta| ≤ |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| + (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta := by have hmu := (hmodel.holder x).2.1 delta ⟨hdelta, by linarith⟩ refine (abs_clampUnit_sub_le _ _ hmu).trans ?_ have htri := abs_add_le (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))) ((∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampRegressionExtension P ((z i).X, (z i).A)) - P.mu x delta) have hid : (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampUnit (z i).Y) - P.mu x delta = (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))) + ((∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampRegressionExtension P ((z i).X, (z i).A)) - P.mu x delta) := by simp_rw [mul_sub, Finset.sum_sub_distrib] ring rw [hid] exact htri.trans (add_le_add_right (localRegression_holderBias_le P hmodel hbeta hL B z x hdelta hh hupper hlambda hgood) _)
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegression_good_error_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:781
theorem localRegression_centered_balanced_l1_le

The centered local-regression noise at the information-balanced bandwidth is uniformly of order h^beta. The result uses the hmodel condition, the hsampling condition, the hn condition, the hbeta condition, the hkappa condition, the hcminus condition, the hcplus condition, the hpmin condition, the hdelta condition, the hh condition, the hupper condition, the hlambda condition, the hbalance condition. This is the stated conclusion.

Formal statement
J n ell :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hsampling :
B :
x :
Fin J
hn :
8 ≤ n
hbeta :
0 < beta
hkappa :
0 ≤ kappa
hcminus :
0 < cminus
hcplus :
0 ≤ cplus
hpmin :
0 < pmin
hdelta :
0 ≤ delta
hh :
0 < h
hupper :
delta + h ≤ 1
hlambda :
0 < lambdaStar ell kappa cminus cplus
hbalance :
(n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1
(∫ z, |∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| ∂iidProduct P n)
≤ (1 / 2) * sqrt (336 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / (pmin * cminus / (2 * (2 : ℝ) ^ kappa))) * h ^ beta
Proof (Lean source)
lemma localRegression_centered_balanced_l1_le {J n ell : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hsampling : IidSampling P n) (B : SplitBlocks n) (x : Fin J) (hn : 8 ≤ n) (hbeta : 0 < beta) (hkappa : 0 ≤ kappa) (hcminus : 0 < cminus) (hcplus : 0 ≤ cplus) (hpmin : 0 < pmin) (hdelta : 0 ≤ delta) (hh : 0 < h) (hupper : delta + h ≤ 1) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (hbalance : (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1) : (∫ z, |∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| ∂iidProduct P n) ≤ (1 / 2) * sqrt (336 * (4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2) / (pmin * cminus / (2 * (2 : ℝ) ^ kappa))) * h ^ beta := by let p := ∫ o, localWindowWeight x delta h o ∂P.dataMeasure let D := 4 * (ell + 1 : ℝ) / lambdaStar ell kappa cminus cplus ^ 2 let K := pmin * cminus / (2 * (2 : ℝ) ^ kappa) have hK : 0 < K := by dsimp [K]; positivity have hpLower : K * h * (delta + h) ^ kappa ≤ p := by have hl := localWindowWeight_integral_lower P hmodel hkappa hcminus hcplus hpmin x hdelta hh hupper have hdh : 0 < delta + h := by linarith have hrpow : ((delta + h) / 2) ^ kappa = (delta + h) ^ kappa / (2 : ℝ) ^ kappa := by rw [Real.div_rpow hdh.le (by norm_num : (0 : ℝ) ≤ 2)] rw [hrpow] at hl dsimp [K, p] convert hl using 1 <;> ring have hp0 : 0 < p := lt_of_lt_of_le (by exact mul_pos (mul_pos hK hh) (Real.rpow_pos_of_pos (by linarith) _)) hpLower have hcardNat : 0 < B.I2.card := lt_of_lt_of_le (by omega) B.card_I2 have hcard : (n : ℝ) / 8 ≤ (B.I2.card : ℝ) := by have hqcard := B.card_I2 have hncard : n ≤ 8 * B.I2.card := by omega have hncardR : (n : ℝ) ≤ 8 * (B.I2.card : ℝ) := by exact_mod_cast hncard linarith have hraw := localRegression_centered_l1_le P hmodel hsampling B x delta h p hh hlambda hkappa hcplus hpmin hp0 hcardNat rfl have hD : 0 ≤ D := by dsimp [D]; positivity have hrate := balancedEffectiveSample_sqrt_le (D := D) (K := K) (p := p) (m := (B.I2.card : ℝ)) (Nat.zero_lt_of_lt hn) hh hD hK hcard hpLower hbalance dsimp [D, K] at hrate exact hraw.trans ((mul_le_mul_of_nonneg_left hrate (by norm_num : (0 : ℝ) ≤ 1 / 2)).trans_eq (by ring))
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegression_centered_balanced_l1_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:829
theorem localRegression_risk_le_noise_bias_bad

Integrated Good/bad decomposition for one stratum's stabilized local regression. The only exceptional contribution is the real probability of a bad Gram event. The result uses the hmodel condition, the hbeta condition, the hL condition, the hdelta condition, the hh condition, the hupper condition, the hlambda condition. This is the stated conclusion.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hbeta :
0 < beta
hL :
0 < L
B :
x :
Fin J
hdelta :
0 ≤ delta
hh :
0 < h
hupper :
delta + h ≤ 1
hlambda :
0 < lambdaStar (ellOf beta) kappa cminus cplus
(∫ z, |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| ∂iidProduct P n)
≤ (∫ z, |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| ∂iidProduct P n)
+ (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta
+ (iidProduct P n).real {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h}
Proof (Lean source)
lemma localRegression_risk_le_noise_bias_bad {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hbeta : 0 < beta) (hL : 0 < L) (B : SplitBlocks n) (x : Fin J) (hdelta : 0 ≤ delta) (hh : 0 < h) (hupper : delta + h ≤ 1) (hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus) : (∫ z, |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| ∂iidProduct P n) ≤ (∫ z, |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| ∂iidProduct P n) + (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta + (iidProduct P n).real {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h} := by let _ := hmodel.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance let bad : Set (Fin n → ClampObs J) := {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h} let noise : (Fin n → ClampObs J) → ℝ := fun z => |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| let bias := (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta have hbad : MeasurableSet bad := by exact (goodGramEvent_measurable B x kappa cminus cplus delta h).compl have hnoiseMeas : Measurable noise := by dsimp [noise] apply Measurable.abs refine Finset.measurable_fun_sum _ fun i _ => ?_ exact (interceptWeight_measurable B x kappa cminus cplus delta h i).mul (((clampUnit_measurable'.comp (clampOutcome_measurable.comp (measurable_pi_apply i))).sub ((clampRegressionExtension_measurable P hmodel.holder).comp ((clampDesign_measurable.comp (measurable_pi_apply i)))))) have hnoiseInt : Integrable noise (iidProduct P n) := by let C := 2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus refine Integrable.of_bound hnoiseMeas.aestronglyMeasurable C ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (abs_nonneg _)] by_cases hg : GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h · calc noise z ≤ ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i| := by dsimp [noise] calc _ ≤ ∑ i ∈ B.I2, |interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| := Finset.abs_sum_le_sum_abs _ _ _ ≤ _ := by apply Finset.sum_le_sum intro i hi rw [abs_mul] have hy := clampUnit_mem_Icc (z i).Y have hm := clampRegressionExtension_mem_Icc P hmodel.holder ((z i).X, (z i).A) have hr : |clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A)| ≤ 1 := by rw [abs_le] constructor <;> linarith [hy.1, hy.2, hm.1, hm.2] simpa using mul_le_of_le_one_right (abs_nonneg _) hr _ ≤ C := (goodGram_weight_controls B z x kappa cminus cplus delta h hh hlambda hg).2.1 · have hw (i : Fin n) : interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i = 0 := by simp [interceptWeight, hg] simp [noise, hw, C] positivity have herrMeas : Measurable fun z : Fin n → ClampObs J => |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| := ((localRegressionEstimate_measurable B x kappa cminus cplus delta h).sub measurable_const).abs have herrInt : Integrable (fun z : Fin n → ClampObs J => |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta|) (iidProduct P n) := by refine Integrable.of_bound herrMeas.aestronglyMeasurable 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (abs_nonneg _)] have he : localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h ∈ Icc (0 : ℝ) 1 := by unfold localRegressionEstimate split_ifs · exact clampUnit_mem_Icc _ · norm_num have hm := (hmodel.holder x).2.1 delta ⟨hdelta, by linarith⟩ rw [abs_le] constructor <;> linarith [he.1, he.2, hm.1, hm.2] have hbias0 : 0 ≤ bias := by dsimp [bias]; positivity have hrhsInt : Integrable (fun z => noise z + bias + bad.indicator (fun _ => (1 : ℝ)) z) (iidProduct P n) := (hnoiseInt.add (integrable_const bias)).add (Integrable.indicator (integrable_const 1) hbad) have hae : ∀ᵐ z ∂iidProduct P n, |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| ≤ noise z + bias + bad.indicator (fun _ => (1 : ℝ)) z := by filter_upwards [iidProduct_outcomeSupport P hmodel] with z hz by_cases hg : GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h · have heqY (i : Fin n) : (z i).Y = clampUnit (z i).Y := by simp [clampUnit, (hz i).1, (hz i).2] simp only [localRegressionEstimate, hg, if_true] have hb := localRegression_good_error_le P hmodel hbeta hL B z x hdelta hh hupper hlambda hg have hnotbad : z ∉ bad := by simpa [bad] using hg rw [Set.indicator_of_notMem hnotbad, add_zero] have hsumY : (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (z i).Y) = ∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampUnit (z i).Y := by apply Finset.sum_congr rfl intro i hi exact congrArg (fun y => interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * y) (heqY i) rw [hsumY] change |clampUnit (∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * clampUnit (z i).Y) - P.mu x delta| ≤ noise z + bias exact hb · have he : |(1 / 2 : ℝ) - P.mu x delta| ≤ 1 := by have hm := (hmodel.holder x).2.1 delta ⟨hdelta, by linarith⟩ rw [abs_le] constructor <;> linarith [hm.1, hm.2] have hn0 : 0 ≤ noise z := abs_nonneg _ have hmem : z ∈ bad := by simpa [bad] using hg rw [Set.indicator_of_mem hmem] simp only [localRegressionEstimate, hg, if_false] exact he.trans (by linarith [hn0, hbias0]) have hint := integral_mono_ae herrInt hrhsInt hae have hnbInt : Integrable (fun z => noise z + bias) (iidProduct P n) := hnoiseInt.add (integrable_const bias) have hindInt : Integrable (bad.indicator (fun _ => (1 : ℝ))) (iidProduct P n) := Integrable.indicator (integrable_const 1) hbad have houter : (∫ z, noise z + bias + bad.indicator (fun _ => (1 : ℝ)) z ∂iidProduct P n) = (∫ z, noise z + bias ∂iidProduct P n) + ∫ z, bad.indicator (fun _ => (1 : ℝ)) z ∂iidProduct P n := by simpa only [Pi.add_apply] using integral_add hnbInt hindInt have hinner : (∫ z, noise z + bias ∂iidProduct P n) = (∫ z, noise z ∂iidProduct P n) + ∫ _z, bias ∂iidProduct P n := by simpa only [Pi.add_apply] using integral_add hnoiseInt (integrable_const bias) have hindval : (∫ z, bad.indicator (fun _ => (1 : ℝ)) z ∂iidProduct P n) = (iidProduct P n).real bad := by rw [integral_indicator hbad, integral_const] simp [measureReal_def] rw [houter, hinner, integral_const, hindval] at hint simpa [noise, bias, bad, measureReal_def, add_assoc] using hint
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegression_risk_le_noise_bias_bad · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperNoise.lean:883
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.UpperTotal 12 declarations
theorem clampFunctional_integral_eq

clamp functional integral satisfies the stated identity for the specified J input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified delta input, the specified hmodel input, the specified hdelta input, the specified hdelta1 input.

Formal statement
J :
P :
beta kappa L cminus cplus pmin delta :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hdelta :
0 ≤ delta
hdelta1 :
delta ≤ 1
(∫ o, if delta < o.A then o.Y else P.mu o.X delta ∂P.dataMeasure)
= clampFunctional P delta
Proof (Lean source)
lemma clampFunctional_integral_eq {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hdelta : 0 ≤ delta) (hdelta1 : delta ≤ 1) : (∫ o, if delta < o.A then o.Y else P.mu o.X delta ∂P.dataMeasure) = clampFunctional P delta := by let _ := hmodel.probability let atomTerm : Fin J → ClampObs J → ℝ := fun x o => if o.X = x ∧ o.A ≤ delta then P.mu x delta else 0 have hatomInt (x : Fin J) : Integrable (atomTerm x) P.dataMeasure := by have hX : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) have hA : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) have hm : Measurable (atomTerm x) := by dsimp [atomTerm] apply Measurable.ite · exact (measurableSet_eq_fun hX measurable_const).inter (measurableSet_le hA measurable_const) · exact measurable_const · exact measurable_const refine Integrable.of_bound hm.aestronglyMeasurable 1 ?_ filter_upwards with o have hmu := (hmodel.holder x).2.1 delta ⟨hdelta, hdelta1⟩ dsimp [atomTerm] split_ifs · rw [abs_of_nonneg hmu.1] exact hmu.2 · simp have hpoint : ∀ᵐ o ∂P.dataMeasure, (if delta < o.A then o.Y else P.mu o.X delta) = o.Y * indicator {o : ClampObs J | delta < o.A} (fun _ => (1 : ℝ)) o + ∑ x : Fin J, atomTerm x o := by filter_upwards [hmodel.treatmentSupport] with o ho by_cases ha : delta < o.A · have hnone (x : Fin J) : ¬(o.X = x ∧ o.A ≤ delta) := fun h => by linarith simp [atomTerm, indicator, ha, hnone] · have hle : o.A ≤ delta := le_of_not_gt ha simp [atomTerm, indicator, ha, hle] rw [integral_congr_ae hpoint] rw [integral_add] · rw [integral_finsetSum univ] · unfold clampFunctional retainedMean congr 1 apply Finset.sum_congr rfl intro x hx have hevent := atomEvent_integral_eq P hmodel x hdelta1 calc (∫ o, atomTerm x o ∂P.dataMeasure) = P.mu x delta * ∫ o, (if o.X = x ∧ o.A ≤ delta then (1 : ℝ) else 0) ∂P.dataMeasure := by rw [← integral_const_mul] apply integral_congr_ae filter_upwards with o by_cases h : o.X = x ∧ o.A ≤ delta <;> simp [atomTerm, h] _ = P.mu x delta * (P.px x * atomMass P x delta) := by rw [hevent] _ = P.px x * atomMass P x delta * P.mu x delta := by ring · exact fun x _ => hatomInt x · exact Integrable.of_bound ((clampOutcome_measurable.mul (Measurable.indicator measurable_const (measurableSet_lt measurable_const (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))))))).aestronglyMeasurable 1 (by filter_upwards [hmodel.outcomeSupport] with o ho by_cases ha : delta < o.A · simp [indicator, ha, abs_of_nonneg ho.1, ho.2] · simp [indicator, ha]) · exact integrable_finsetSum univ fun x _ => hatomInt x
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampFunctional_integral_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:10
theorem clampFunctional_mem_Icc

clamp functional lies in the stated closed interval for the specified J input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified delta input, the specified hmodel input, the specified hdelta input, the specified hdelta1 input.

Formal statement
J :
P :
beta kappa L cminus cplus pmin delta :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hdelta :
0 ≤ delta
hdelta1 :
delta ≤ 1
clampFunctional P delta ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma clampFunctional_mem_Icc {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hdelta : 0 ≤ delta) (hdelta1 : delta ≤ 1) : clampFunctional P delta ∈ Icc (0 : ℝ) 1 := by let _ := hmodel.probability let g : ClampObs J → ℝ := fun o => if delta < o.A then o.Y else P.mu o.X delta have hmuMeas : Measurable (fun o : ClampObs J => P.mu o.X delta) := by exact (measurable_of_countable (fun x : Fin J => P.mu x delta)).comp (measurable_fst.comp (Measurable.of_comap_le le_rfl)) have hgmeas : Measurable g := by dsimp [g] exact Measurable.ite (measurableSet_lt measurable_const (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) clampOutcome_measurable hmuMeas have hg0 : ∀ᵐ o ∂P.dataMeasure, 0 ≤ g o := by filter_upwards [hmodel.outcomeSupport] with o ho dsimp [g] split_ifs · exact ho.1 · exact ((hmodel.holder _).2.1 delta ⟨hdelta, hdelta1⟩).1 have hg1 : ∀ᵐ o ∂P.dataMeasure, g o ≤ 1 := by filter_upwards [hmodel.outcomeSupport] with o ho dsimp [g] split_ifs · exact ho.2 · exact ((hmodel.holder _).2.1 delta ⟨hdelta, hdelta1⟩).2 rw [← clampFunctional_integral_eq P hmodel hdelta hdelta1] constructor · exact integral_nonneg_of_ae hg0 · calc (∫ o, g o ∂P.dataMeasure) ≤ ∫ _o, (1 : ℝ) ∂P.dataMeasure := integral_mono_ae (Integrable.of_bound hgmeas.aestronglyMeasurable 1 (hg0.and hg1 |>.mono fun o h => by rw [Real.norm_eq_abs, abs_of_nonneg h.1]; exact h.2)) (integrable_const 1) hg1 _ = 1 := by simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.clampFunctional_mem_Icc · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:82
theorem localRegressionEstimate_mem_Icc

local regression estimate lies in the stated closed interval for the specified J input, the specified n input, the specified ell input, the specified B input, the specified z input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input.

Formal statement
J n ell :
B :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
localRegressionEstimate B z x ell kappa cminus cplus delta h ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma localRegressionEstimate_mem_Icc {J n ell : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) : localRegressionEstimate B z x ell kappa cminus cplus delta h ∈ Icc (0 : ℝ) 1 := by unfold localRegressionEstimate split_ifs · exact clampUnit_mem_Icc _ · norm_num
CausalSmith.Stat.LmtpThresholdAtomFrontier.localRegressionEstimate_mem_Icc · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:126
theorem blockAverage_mem_Icc

block average lies in the stated closed interval for the specified X input, the specified n input, the specified I input, the specified z input, the specified f input, the specified hf input.

Formal statement
X :
Type*
n :
I :
z :
Fin n → X
f :
X → ℝ
hf :
∀ u, f u ∈ Icc (0 : ℝ) 1
blockAverage I z f ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma blockAverage_mem_Icc {X : Type*} {n : ℕ} (I : Finset (Fin n)) (z : Fin n → X) (f : X → ℝ) (hf : ∀ u, f u ∈ Icc (0 : ℝ) 1) : blockAverage I z f ∈ Icc (0 : ℝ) 1 := by by_cases hI : I.card = 0 · simp [blockAverage, hI] have hcard : 0 < (I.card : ℝ) := by exact_mod_cast Nat.pos_of_ne_zero hI have hsum0 : 0 ≤ ∑ i ∈ I, f (z i) := sum_nonneg fun i _ => (hf (z i)).1 have hsum1 : (∑ i ∈ I, f (z i)) ≤ (I.card : ℝ) := by calc (∑ i ∈ I, f (z i)) ≤ ∑ _i ∈ I, (1 : ℝ) := Finset.sum_le_sum fun i _ => (hf (z i)).2 _ = (I.card : ℝ) := by simp unfold blockAverage constructor · positivity · calc (I.card : ℝ)⁻¹ * ∑ i ∈ I, f (z i) ≤ (I.card : ℝ)⁻¹ * (I.card : ℝ) := mul_le_mul_of_nonneg_left hsum1 (inv_nonneg.mpr hcard.le) _ = 1 := inv_mul_cancel₀ (ne_of_gt hcard)
CausalSmith.Stat.LmtpThresholdAtomFrontier.blockAverage_mem_Icc · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:137
theorem atomEstimate_mem_Icc

atom estimate lies in the stated closed interval for the specified J input, the specified n input, the specified B input, the specified z input, the specified x input, the specified delta input.

Formal statement
J n :
B :
z :
Fin n → ClampObs J
x :
Fin J
delta :
atomEstimate B z x delta ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma atomEstimate_mem_Icc {J n : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (delta : ℝ) : atomEstimate B z x delta ∈ Icc (0 : ℝ) 1 := by apply blockAverage_mem_Icc intro o split_ifs <;> norm_num
CausalSmith.Stat.LmtpThresholdAtomFrontier.atomEstimate_mem_Icc · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:160
theorem splitBlock_invSqrt_le_root

the stated split block inv sqrt bound root property holds for the specified n input, the specified m input, the specified hn input, the specified hm input.

Formal statement
n m :
hn :
0 < n
hm :
n ≤ 8 * m
sqrt (m : ℝ)⁻¹ ≤ 3 * (n : ℝ) ^ (-(1 : ℝ) / 2)
Proof (Lean source)
lemma splitBlock_invSqrt_le_root {n m : ℕ} (hn : 0 < n) (hm : n ≤ 8 * m) : sqrt (m : ℝ)⁻¹ ≤ 3 * (n : ℝ) ^ (-(1 : ℝ) / 2) := by have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hmR : 0 < (m : ℝ) := by have : 0 < m := by omega exact_mod_cast this have hInv : (m : ℝ)⁻¹ ≤ 9 * (n : ℝ)⁻¹ := by have hR : (n : ℝ) ≤ 8 * (m : ℝ) := by exact_mod_cast hm rw [show 9 * (n : ℝ)⁻¹ = 9 / (n : ℝ) by ring] rw [le_div_iff₀ hnR] rw [inv_mul_le_iff₀ hmR] nlinarith have hl0 : 0 ≤ sqrt (m : ℝ)⁻¹ := Real.sqrt_nonneg _ have hr0 : 0 ≤ 3 * (n : ℝ) ^ (-(1 : ℝ) / 2) := by positivity rw [← sq_le_sq₀ hl0 hr0] rw [Real.sq_sqrt (inv_nonneg.mpr (Nat.cast_nonneg m))] calc (m : ℝ)⁻¹ ≤ 9 * (n : ℝ)⁻¹ := hInv _ = (3 * (n : ℝ) ^ (-(1 : ℝ) / 2)) ^ 2 := by rw [mul_pow] norm_num rw [← Real.rpow_natCast] rw [← Real.rpow_mul hnR.le] norm_num rw [Real.rpow_neg_one]
CausalSmith.Stat.LmtpThresholdAtomFrontier.splitBlock_invSqrt_le_root · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:168
theorem balancedGramTail_le

balanced gram tail satisfies the stated upper bound for the specified n input, the specified beta input, the specified kappa input, the specified delta input, the specified h input, the specified C input, the specified c input, the specified hn input, the specified hbeta input, the specified hh input, the specified hh1 input, the specified hC input, the specified hc input, the specified hbalance input.

Formal statement
n :
beta kappa delta h C c :
hn :
0 < n
hbeta :
0 < beta
hh :
0 < h
hh1 :
h ≤ 1
hC :
0 ≤ C
hc :
0 < c
hbalance :
(n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1
C * exp (-c * (n : ℝ) * h * (delta + h) ^ kappa) ≤ (C / c) * h ^ beta
Proof (Lean source)
lemma balancedGramTail_le {n : ℕ} {beta kappa delta h C c : ℝ} (hn : 0 < n) (hbeta : 0 < beta) (hh : 0 < h) (hh1 : h ≤ 1) (hC : 0 ≤ C) (hc : 0 < c) (hbalance : (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1) : C * exp (-c * (n : ℝ) * h * (delta + h) ^ kappa) ≤ (C / c) * h ^ beta := by have heff := effectiveSampleSize_eq_rpow hh hbalance let e : ℝ := (n : ℝ) * h * (delta + h) ^ kappa have hepos : 0 < e := by rw [show e = h ^ (-2 * beta) by simpa [e] using heff] exact Real.rpow_pos_of_pos hh _ let t : ℝ := 20 * c * e have ht : 0 < t := by dsimp [t]; positivity have hexp := exp_neg_scaled_le_inv ht have harg : -t / 20 = -c * e := by dsimp [t]; ring rw [harg] at hexp have hinv : 20 / t = (1 / c) * h ^ (2 * beta) := by have heq : e = h ^ (-2 * beta) := by simpa [e] using heff change 20 / (20 * c * e) = _ rw [heq] rw [show -2 * beta = -(2 * beta) by ring, Real.rpow_neg hh.le] have hp : 0 < h ^ (2 * beta) := Real.rpow_pos_of_pos hh _ field_simp [hc.ne', hp.ne'] have hpow : h ^ (2 * beta) ≤ h ^ beta := Real.rpow_le_rpow_of_exponent_ge hh hh1 (by linarith) calc C * exp (-c * (n : ℝ) * h * (delta + h) ^ kappa) = C * exp (-c * e) := by congr 2 dsimp [e] ring _ ≤ C * (20 / t) := mul_le_mul_of_nonneg_left hexp hC _ = (C / c) * h ^ (2 * beta) := by rw [hinv]; ring _ ≤ (C / c) * h ^ beta := by exact mul_le_mul_of_nonneg_left hpow (div_nonneg hC hc.le)
CausalSmith.Stat.LmtpThresholdAtomFrontier.balancedGramTail_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:195
theorem atomCoefficient_mem_Icc

atom coefficient lies in the stated closed interval for the specified J input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified delta input, the specified hmodel input, the specified x input, the specified hdelta1 input.

Formal statement
J :
P :
beta kappa L cminus cplus pmin delta :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
x :
Fin J
hdelta1 :
delta ≤ 1
P.px x * atomMass P x delta ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma atomCoefficient_mem_Icc {J : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (x : Fin J) (hdelta1 : delta ≤ 1) : P.px x * atomMass P x delta ∈ Icc (0 : ℝ) 1 := by let _ := hmodel.probability let f : ClampObs J → ℝ := fun o => if o.X = x ∧ o.A ≤ delta then 1 else 0 have hX : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) have hA : Measurable (fun o : ClampObs J => o.A) := measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)) have hf : Measurable f := by dsimp [f] exact Measurable.ite ((measurableSet_eq_fun hX measurable_const).inter (measurableSet_le hA measurable_const)) measurable_const measurable_const have hf0 : ∀ o, 0 ≤ f o := by intro o; dsimp [f]; split_ifs <;> norm_num have hf1 : ∀ o, f o ≤ 1 := by intro o; dsimp [f]; split_ifs <;> norm_num have hfint : Integrable f P.dataMeasure := by refine Integrable.of_bound hf.aestronglyMeasurable 1 ?_ filter_upwards with o dsimp [f] split_ifs <;> norm_num have hint : ∫ o, f o ∂P.dataMeasure = P.px x * atomMass P x delta := by simpa [f] using atomEvent_integral_eq P hmodel x hdelta1 rw [← hint] constructor · exact integral_nonneg_of_ae (ae_of_all _ hf0) · calc (∫ o, f o ∂P.dataMeasure) ≤ ∫ _o, (1 : ℝ) ∂P.dataMeasure := integral_mono_ae hfint (integrable_const 1) (ae_of_all _ hf1) _ = 1 := by simp
CausalSmith.Stat.LmtpThresholdAtomFrontier.atomCoefficient_mem_Icc · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:232
theorem abs_atomCoefficient_le_envelope

the stated abs atom coefficient bound envelope property holds for the specified J input, the specified P input, the specified beta input, the specified kappa input, the specified L input, the specified cminus input, the specified cplus input, the specified pmin input, the specified deltaBar input, the specified alpha input, the specified delta input, the specified hmodel input, the specified hreg input, the specified x input, the specified hdelta input.

Formal statement
J :
P :
beta kappa L cminus cplus pmin deltaBar alpha delta :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
x :
Fin J
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
|P.px x * atomMass P x delta| ≤ cplus * delta ^ (kappa + 1) / (kappa + 1)
Proof (Lean source)
lemma abs_atomCoefficient_le_envelope (J : ℕ) (P : ClampLaw J) {beta kappa L cminus cplus pmin deltaBar alpha delta : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (x : Fin J) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : |P.px x * atomMass P x delta| ≤ cplus * delta ^ (kappa + 1) / (kappa + 1) := by have hreg' := hreg rcases hreg' with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ have hdelta1 : delta ≤ 1 := hdelta.2.trans hdeltaBar1.le have hcoef := atomCoefficient_mem_Icc P hmodel x hdelta1 have hpush := clamp_pushforward_decomposition P beta kappa L cminus cplus pmin deltaBar alpha hmodel hreg x delta hdelta have hmass0 : 0 ≤ atomMass P x delta := by have hlower0 : 0 ≤ cminus * delta ^ (kappa + 1) / (kappa + 1) := div_nonneg (mul_nonneg hcminus.le (Real.rpow_nonneg hdelta.1 _)) (by linarith) exact hlower0.trans hpush.2.1 have hX : Measurable (fun o : ClampObs J => o.X) := measurable_fst.comp (Measurable.of_comap_le le_rfl) let _ := hmodel.probability letI : IsProbabilityMeasure (P.dataMeasure.map (fun o => o.X)) := Measure.isProbabilityMeasure_map hX.aemeasurable have hpx0 : 0 ≤ P.px x := by rw [(hmodel.stratumMass x).1] exact measureReal_nonneg have hpx1 : P.px x ≤ 1 := by rw [(hmodel.stratumMass x).1] exact measureReal_le_one rw [abs_of_nonneg hcoef.1] calc P.px x * atomMass P x delta ≤ 1 * atomMass P x delta := mul_le_mul_of_nonneg_right hpx1 hmass0 _ ≤ _ := by simpa using hpush.2.2
CausalSmith.Stat.LmtpThresholdAtomFrontier.abs_atomCoefficient_le_envelope · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:267
theorem totalGramEstimator_error_le

Deterministic decomposition of the total estimator into the retained-block error, the atom-mass empirical errors, and the local-regression errors. The result uses the hmodel condition, the hdelta condition, the hdelta1 condition. This is the stated conclusion.

Formal statement
J n ell :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hdelta :
0 ≤ delta
hdelta1 :
delta ≤ 1
B :
z :
Fin n → ClampObs J
|totalGramEstimator B z ell kappa cminus cplus delta h - clampFunctional P delta|
≤ |retainedEstimate B z delta
- retainedMean P delta|
+ ∑ x : Fin J, (|atomEstimate B z x delta - P.px x * atomMass P x delta| + |P.px x * atomMass P x delta| * |localRegressionEstimate B z x ell kappa cminus cplus delta h - P.mu x delta|)
Proof (Lean source)
lemma totalGramEstimator_error_le {J n ell : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hdelta : 0 ≤ delta) (hdelta1 : delta ≤ 1) (B : SplitBlocks n) (z : Fin n → ClampObs J) : |totalGramEstimator B z ell kappa cminus cplus delta h - clampFunctional P delta| ≤ |retainedEstimate B z delta - retainedMean P delta| + ∑ x : Fin J, (|atomEstimate B z x delta - P.px x * atomMass P x delta| + |P.px x * atomMass P x delta| * |localRegressionEstimate B z x ell kappa cminus cplus delta h - P.mu x delta|) := by let center := retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x ell kappa cminus cplus delta h have htarget := clampFunctional_mem_Icc P hmodel hdelta hdelta1 have hclamp := abs_clampUnit_sub_le center (clampFunctional P delta) htarget have hprod (x : Fin J) : |atomEstimate B z x delta * localRegressionEstimate B z x ell kappa cminus cplus delta h - P.px x * atomMass P x delta * P.mu x delta| ≤ |atomEstimate B z x delta - P.px x * atomMass P x delta| + |P.px x * atomMass P x delta| * |localRegressionEstimate B z x ell kappa cminus cplus delta h - P.mu x delta| := by let ah := atomEstimate B z x delta let a := P.px x * atomMass P x delta let mh := localRegressionEstimate B z x ell kappa cminus cplus delta h let m := P.mu x delta have hmh := localRegressionEstimate_mem_Icc (ell := ell) B z x kappa cminus cplus delta h have hid : ah * mh - a * m = (ah - a) * mh + a * (mh - m) := by ring rw [hid] calc |(ah - a) * mh + a * (mh - m)| ≤ |(ah - a) * mh| + |a * (mh - m)| := abs_add_le _ _ _ = |ah - a| * |mh| + |a| * |mh - m| := by rw [abs_mul, abs_mul] _ ≤ |ah - a| + |a| * |mh - m| := by apply add_le_add_left apply mul_le_of_le_one_right (abs_nonneg _) rw [abs_of_nonneg hmh.1] exact hmh.2 have hsum : |∑ x : Fin J, (atomEstimate B z x delta * localRegressionEstimate B z x ell kappa cminus cplus delta h - P.px x * atomMass P x delta * P.mu x delta)| ≤ ∑ x : Fin J, (|atomEstimate B z x delta - P.px x * atomMass P x delta| + |P.px x * atomMass P x delta| * |localRegressionEstimate B z x ell kappa cminus cplus delta h - P.mu x delta|) := by exact (Finset.abs_sum_le_sum_abs _ _).trans (Finset.sum_le_sum fun x _ => hprod x) calc |totalGramEstimator B z ell kappa cminus cplus delta h - clampFunctional P delta| ≤ |center - clampFunctional P delta| := by simpa [totalGramEstimator, center] using hclamp _ = |(retainedEstimate B z delta - retainedMean P delta) + ∑ x : Fin J, (atomEstimate B z x delta * localRegressionEstimate B z x ell kappa cminus cplus delta h - P.px x * atomMass P x delta * P.mu x delta)| := by congr 1 simp only [clampFunctional, Finset.sum_sub_distrib] ring _ ≤ |retainedEstimate B z delta - retainedMean P delta| + |∑ x : Fin J, (atomEstimate B z x delta * localRegressionEstimate B z x ell kappa cminus cplus delta h - P.px x * atomMass P x delta * P.mu x delta)| := abs_add_le _ _ _ ≤ _ := add_le_add_right hsum _
CausalSmith.Stat.LmtpThresholdAtomFrontier.totalGramEstimator_error_le · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:305
theorem totalGramEstimator_risk_decomposition

Integrated form of totalGramEstimator_error_le, with every finite-sample term exposed for the concentration and empirical-process bounds. The result uses the hmodel condition, the hdelta condition, the hdelta1 condition. This is the stated conclusion.

Formal statement
J n ell :
P :
beta kappa L cminus cplus pmin delta h :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hdelta :
0 ≤ delta
hdelta1 :
delta ≤ 1
B :
(∫ z, |totalGramEstimator B z ell kappa cminus cplus delta h - clampFunctional P delta| ∂iidProduct P n)
≤ (∫ z, |retainedEstimate B z delta - retainedMean P delta| ∂iidProduct P n)
+ ∑ x : Fin J, ((∫ z, |atomEstimate B z x delta - P.px x * atomMass P x delta| ∂iidProduct P n) + |P.px x * atomMass P x delta| * ∫ z, |localRegressionEstimate B z x ell kappa cminus cplus delta h - P.mu x delta| ∂iidProduct P n)
Proof (Lean source)
lemma totalGramEstimator_risk_decomposition {J n ell : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin delta h : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hdelta : 0 ≤ delta) (hdelta1 : delta ≤ 1) (B : SplitBlocks n) : (∫ z, |totalGramEstimator B z ell kappa cminus cplus delta h - clampFunctional P delta| ∂iidProduct P n) ≤ (∫ z, |retainedEstimate B z delta - retainedMean P delta| ∂iidProduct P n) + ∑ x : Fin J, ((∫ z, |atomEstimate B z x delta - P.px x * atomMass P x delta| ∂iidProduct P n) + |P.px x * atomMass P x delta| * ∫ z, |localRegressionEstimate B z x ell kappa cminus cplus delta h - P.mu x delta| ∂iidProduct P n) := by let _ := hmodel.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance let eret : (Fin n → ClampObs J) → ℝ := fun z => |retainedEstimate B z delta - retainedMean P delta| let eatom : Fin J → (Fin n → ClampObs J) → ℝ := fun x z => |atomEstimate B z x delta - P.px x * atomMass P x delta| let elocal : Fin J → (Fin n → ClampObs J) → ℝ := fun x z => |localRegressionEstimate B z x ell kappa cminus cplus delta h - P.mu x delta| let lhs : (Fin n → ClampObs J) → ℝ := fun z => |totalGramEstimator B z ell kappa cminus cplus delta h - clampFunctional P delta| have hretBase : Integrable (fun z : Fin n → ClampObs J => retainedEstimate B z delta) (iidProduct P n) := by refine Integrable.of_bound (retainedEstimate_measurable B delta).aestronglyMeasurable 1 ?_ filter_upwards [iidProduct_outcomeSupport P hmodel] with z hz have hrange : retainedEstimate B z delta ∈ Icc (0 : ℝ) 1 := by have hi := blockAverage_mem_Icc B.I0 (fun i : Fin n => i) (fun i => if delta < (z i).A then (z i).Y else 0) (by intro i by_cases ha : delta < (z i).A · simpa [ha] using hz i · simp [ha]) simpa [retainedEstimate, blockAverage] using hi rw [Real.norm_eq_abs, abs_of_nonneg hrange.1] exact hrange.2 have hretInt : Integrable eret (iidProduct P n) := by exact (hretBase.sub (integrable_const (retainedMean P delta))).abs have hatomInt (x : Fin J) : Integrable (eatom x) (iidProduct P n) := by apply Integrable.abs apply Integrable.sub · refine Integrable.of_bound (atomEstimate_measurable B x delta).aestronglyMeasurable 1 ?_ filter_upwards with z have hr := atomEstimate_mem_Icc B z x delta rw [Real.norm_eq_abs, abs_of_nonneg hr.1] exact hr.2 · exact integrable_const _ have hlocalInt (x : Fin J) : Integrable (elocal x) (iidProduct P n) := by apply Integrable.abs apply Integrable.sub · refine Integrable.of_bound (localRegressionEstimate_measurable B x kappa cminus cplus delta h).aestronglyMeasurable 1 ?_ filter_upwards with z have hr := localRegressionEstimate_mem_Icc (ell := ell) B z x kappa cminus cplus delta h rw [Real.norm_eq_abs, abs_of_nonneg hr.1] exact hr.2 · exact integrable_const _ have hlhsInt : Integrable lhs (iidProduct P n) := by apply Integrable.abs exact ((Integrable.of_bound (totalGramEstimator_measurable B kappa cminus cplus delta h).aestronglyMeasurable 1 (by filter_upwards with z have hr := clampUnit_mem_Icc (retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x ell kappa cminus cplus delta h) rw [show totalGramEstimator B z ell kappa cminus cplus delta h = clampUnit (retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x ell kappa cminus cplus delta h) by rfl] rw [Real.norm_eq_abs, abs_of_nonneg hr.1] exact hr.2)).sub (integrable_const _)) have hrhsInt : Integrable (fun z => eret z + ∑ x : Fin J, (eatom x z + |P.px x * atomMass P x delta| * elocal x z)) (iidProduct P n) := hretInt.add (integrable_finsetSum univ fun x _ => (hatomInt x).add ((hlocalInt x).const_mul _)) have hmono : (∫ z, lhs z ∂iidProduct P n) ≤ ∫ z, (eret z + ∑ x : Fin J, (eatom x z + |P.px x * atomMass P x delta| * elocal x z)) ∂iidProduct P n := by exact integral_mono_ae hlhsInt hrhsInt (ae_of_all _ fun z => totalGramEstimator_error_le P hmodel hdelta hdelta1 B z) calc (∫ z, |totalGramEstimator B z ell kappa cminus cplus delta h - clampFunctional P delta| ∂iidProduct P n) = ∫ z, lhs z ∂iidProduct P n := rfl _ ≤ _ := hmono _ = (∫ z, eret z ∂iidProduct P n) + ∫ z, ∑ x : Fin J, (eatom x z + |P.px x * atomMass P x delta| * elocal x z) ∂iidProduct P n := integral_add hretInt (integrable_finsetSum univ fun x _ => (hatomInt x).add ((hlocalInt x).const_mul _)) _ = (∫ z, eret z ∂iidProduct P n) + ∑ x : Fin J, ∫ z, (eatom x z + |P.px x * atomMass P x delta| * elocal x z) ∂iidProduct P n := by rw [integral_finsetSum univ] exact fun x _ => (hatomInt x).add ((hlocalInt x).const_mul _) _ = _ := by congr 1 apply Finset.sum_congr rfl intro x hx rw [integral_add (hatomInt x) ((hlocalInt x).const_mul _), integral_const_mul]
CausalSmith.Stat.LmtpThresholdAtomFrontier.totalGramEstimator_risk_decomposition · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:382
theorem totalGramEstimator_risk_le_explicit

Explicit finite-sample risk bound at an information-balanced bandwidth, before the elementary eventual-rate simplifications. The result uses the hmodel condition, the hreg condition, the hsampling condition, the hn condition, the hdelta condition, the hh condition, the hupper condition, the hbalance condition, the hlambda condition, the htail condition. This is the stated conclusion.

Formal statement
J n :
P :
beta kappa L cminus cplus pmin deltaBar alpha delta h Ctail ctail :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hsampling :
B :
hn :
8 ≤ n
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hh :
0 < h
hupper :
delta + h ≤ 1
hbalance :
(n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1
hlambda :
0 < lambdaStar (ellOf beta) kappa cminus cplus
htail :
∀ x : Fin J,
(iidProduct P n).real {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h}
≤ Ctail * exp (-ctail * (n : ℝ) * h * (delta + h) ^ kappa)
(∫ z, |totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h - clampFunctional P delta| ∂iidProduct P n)
≤ (1 / 2 : ℝ) * sqrt (B.I0.card : ℝ)⁻¹
+ (J : ℝ) * ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + (cplus * delta ^ (kappa + 1) / (kappa + 1)) * ((1 / 2 : ℝ) * sqrt (336 * (4 * (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus ^ 2) / (pmin * cminus / (2 * (2 : ℝ) ^ kappa))) * h ^ beta + (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta + Ctail * exp (-ctail * (n : ℝ) * h * (delta + h) ^ kappa)))
Proof (Lean source)
lemma totalGramEstimator_risk_le_explicit {J n : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin deltaBar alpha delta h Ctail ctail : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hsampling : IidSampling P n) (B : SplitBlocks n) (hn : 8 ≤ n) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hh : 0 < h) (hupper : delta + h ≤ 1) (hbalance : (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1) (hlambda : 0 < lambdaStar (ellOf beta) kappa cminus cplus) (htail : ∀ x : Fin J, (iidProduct P n).real {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h} ≤ Ctail * exp (-ctail * (n : ℝ) * h * (delta + h) ^ kappa)) : (∫ z, |totalGramEstimator B z (ellOf beta) kappa cminus cplus delta h - clampFunctional P delta| ∂iidProduct P n) ≤ (1 / 2 : ℝ) * sqrt (B.I0.card : ℝ)⁻¹ + (J : ℝ) * ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + (cplus * delta ^ (kappa + 1) / (kappa + 1)) * ((1 / 2 : ℝ) * sqrt (336 * (4 * (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus ^ 2) / (pmin * cminus / (2 * (2 : ℝ) ^ kappa))) * h ^ beta + (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta + Ctail * exp (-ctail * (n : ℝ) * h * (delta + h) ^ kappa))) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ have hregFull : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha := ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ have hdelta1 : delta ≤ 1 := hdelta.2.trans hdeltaBar1.le have hcard0 : 0 < B.I0.card := lt_of_lt_of_le (by omega) B.card_I0 have hcard1 : 0 < B.I1.card := lt_of_lt_of_le (by omega) B.card_I1 let noiseC : ℝ := (1 / 2 : ℝ) * sqrt (336 * (4 * (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus ^ 2) / (pmin * cminus / (2 * (2 : ℝ) ^ kappa))) let biasC : ℝ := 2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus let tail : ℝ := Ctail * exp (-ctail * (n : ℝ) * h * (delta + h) ^ kappa) let localBound : ℝ := noiseC * h ^ beta + biasC * L * h ^ beta + tail let atomBound : ℝ := cplus * delta ^ (kappa + 1) / (kappa + 1) have hnoise (x : Fin J) : (∫ z, |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| ∂iidProduct P n) ≤ noiseC * h ^ beta := by simpa [noiseC] using localRegression_centered_balanced_l1_le (ell := ellOf beta) P hmodel hsampling B x hn hbeta hkappa hcminus (by linarith) hpmin hdelta.1 hh hupper hlambda hbalance have hlocal (x : Fin J) : (∫ z, |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| ∂iidProduct P n) ≤ localBound := by have hd := localRegression_risk_le_noise_bias_bad P hmodel hbeta hL B x hdelta.1 hh hupper hlambda calc _ ≤ (∫ z, |∑ i ∈ B.I2, interceptWeight B z x (ellOf beta) kappa cminus cplus delta h i * (clampUnit (z i).Y - clampRegressionExtension P ((z i).X, (z i).A))| ∂iidProduct P n) + biasC * L * h ^ beta + (iidProduct P n).real {z | ¬ GoodGramEvent B z x (ellOf beta) kappa cminus cplus delta h} := by simpa [biasC] using hd _ ≤ noiseC * h ^ beta + biasC * L * h ^ beta + tail := by exact add_le_add (add_le_add (hnoise x) le_rfl) (htail x) _ = localBound := rfl have hatomBound0 : 0 ≤ atomBound := by dsimp [atomBound] exact div_nonneg (mul_nonneg (by linarith) (Real.rpow_nonneg hdelta.1 _)) (by linarith) have hdec := totalGramEstimator_risk_decomposition (ell := ellOf beta) (h := h) P hmodel hdelta.1 hdelta1 B calc _ ≤ (∫ z, |retainedEstimate B z delta - retainedMean P delta| ∂iidProduct P n) + ∑ x : Fin J, ((∫ z, |atomEstimate B z x delta - P.px x * atomMass P x delta| ∂iidProduct P n) + |P.px x * atomMass P x delta| * ∫ z, |localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta h - P.mu x delta| ∂iidProduct P n) := hdec _ ≤ (1 / 2 : ℝ) * sqrt (B.I0.card : ℝ)⁻¹ + ∑ _x : Fin J, ((1 / 2 : ℝ) * sqrt (B.I1.card : ℝ)⁻¹ + atomBound * localBound) := by apply add_le_add · exact retainedEstimate_l1_le P hmodel B hcard0 · apply Finset.sum_le_sum intro x hx apply add_le_add · exact atomEstimate_l1_le P hmodel B hcard1 x hdelta.1 hdelta1 · exact mul_le_mul (by simpa [atomBound] using abs_atomCoefficient_le_envelope J P hmodel hregFull x hdelta) (hlocal x) (integral_nonneg fun _ => abs_nonneg _) hatomBound0 _ = _ := by simp [atomBound, localBound, noiseC, biasC, tail] ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.totalGramEstimator_risk_le_explicit · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/UpperTotal.lean:499
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.Helpers.WeightedConcentration 7 declarations This module instantiates Causalean's finite-product conditional Hoeffding theorem.

Random-design weighted concentration on the good-Gram event

This module instantiates Causalean's finite-product conditional Hoeffding theorem. The local-polynomial weights are stabilized off the good-Gram event so their realized energy is everywhere positive; the resulting tail is then restricted back to the good event used by the atom-fallback interval.

theorem good_gram_positive_energy

On the good-Gram event the exact equivalent-kernel weights have strictly positive realized squared energy. The result uses the hlambda condition, the hgood condition. This is the stated conclusion.

Formal statement
J n ell :
B :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
hlambda :
0 < lambdaStar ell kappa cminus cplus
hgood :
GoodGramEvent B z x ell kappa cminus cplus delta h
0 < ∑ i, (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2
Proof (Lean source)
lemma good_gram_positive_energy {J n ell : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (hgood : GoodGramEvent B z x ell kappa cminus cplus delta h) : 0 < ∑ i, (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) i) ^ 2 := by classical have hrep := goodGram_reproduction B z x kappa cminus cplus delta h hlambda hgood (0 : Fin (ell + 1)) simp only [Fin.isValue, if_pos] at hrep simp_rw [localRegressionDesignWeight_apply (ell := ell), ite_pow, zero_pow (by norm_num : 2 ≠ 0)] rw [← Finset.sum_filter] simp only [Finset.filter_mem_eq_inter, Finset.univ_inter] by_contra hnot have hle : (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ≤ 0 := le_of_not_gt hnot have hsqzero (i : Fin n) (hi : i ∈ B.I2) : (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2 = 0 := by apply le_antisymm · exact hle.trans' (Finset.single_le_sum (fun j _ => sq_nonneg (interceptWeight B z x ell kappa cminus cplus delta h j)) hi) · exact sq_nonneg _ have hwzero (i : Fin n) (hi : i ∈ B.I2) : interceptWeight B z x ell kappa cminus cplus delta h i = 0 := sq_eq_zero_iff.mp (hsqzero i hi) rw [Finset.sum_eq_zero (fun i hi => by simp [hwzero i hi])] at hrep norm_num at hrep
CausalSmith.Stat.LmtpThresholdAtomFrontier.good_gram_positive_energy · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/WeightedConcentration.lean:28
def stabilizedWeight

Complete-design-measurable local-polynomial weights, replaced off the good-Gram event by one fixed unit coordinate.

Definition (Lean source)
J n ell :
B :
x :
Fin J
kappa cminus cplus delta h :
i₀ :
Fin n
stabilizedWeight B x kappa cminus cplus delta h i₀ :
(Fin n → ClampDesign J) → Fin n → ℝ
by classical exact fun d i
=> if GoodGramEvent B (fun j => clampDesignLift (d j)) x ell kappa cminus cplus delta h then localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h d i else if i = i₀ then 1 else 0
theorem stabilizedWeight_measurable

stabilized weight is measurable for the specified J input, the specified n input, the specified ell input, the specified B input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input, the specified i₀ input.

Formal statement
J n ell :
B :
x :
Fin J
kappa cminus cplus delta h :
i₀ :
Fin n
Measurable (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀)
Proof (Lean source)
lemma stabilizedWeight_measurable {J n ell : ℕ} (B : SplitBlocks n) (x : Fin J) (kappa cminus cplus delta h : ℝ) (i₀ : Fin n) : Measurable (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) := by classical apply measurable_pi_lambda intro i refine Measurable.ite ?_ ?_ measurable_const · apply (goodGramEvent_measurable B x kappa cminus cplus delta h).preimage exact measurable_pi_lambda _ fun j => clampDesignLift_measurable.comp (measurable_pi_apply j) · exact (measurable_pi_apply i).comp (localRegressionDesignWeight_measurable (ell := ell) B x kappa cminus cplus delta h)
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedWeight_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/WeightedConcentration.lean:78
theorem stabilizedWeight_eq_on_good

the stated stabilized weight identity on good property holds for the specified J input, the specified n input, the specified ell input, the specified B input, the specified z input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input, the specified i₀ input, the specified hgood input.

Formal statement
J n ell :
B :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
i₀ :
Fin n
hgood :
GoodGramEvent B z x ell kappa cminus cplus delta h
stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀ (designVector (fun o : ClampObs J => (o.X, o.A)) z)
= localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z)
Proof (Lean source)
lemma stabilizedWeight_eq_on_good {J n ell : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) (i₀ : Fin n) (hgood : GoodGramEvent B z x ell kappa cminus cplus delta h) : stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀ (designVector (fun o : ClampObs J => (o.X, o.A)) z) = localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h (designVector (fun o : ClampObs J => (o.X, o.A)) z) := by funext i have hgood' : GoodGramEvent B (fun j => clampDesignLift (designVector (fun o : ClampObs J => (o.X, o.A)) z j)) x ell kappa cminus cplus delta h := by change GoodGramEvent B z x ell kappa cminus cplus delta h exact hgood simp [stabilizedWeight, hgood']
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedWeight_eq_on_good · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/WeightedConcentration.lean:94
theorem stabilizedWeight_positive_energy

the stated stabilized weight positive energy property holds for the specified J input, the specified n input, the specified ell input, the specified B input, the specified z input, the specified x input, the specified kappa input, the specified cminus input, the specified cplus input, the specified delta input, the specified h input, the specified i₀ input, the specified hlambda input.

Formal statement
J n ell :
B :
z :
Fin n → ClampObs J
x :
Fin J
kappa cminus cplus delta h :
i₀ :
Fin n
hlambda :
0 < lambdaStar ell kappa cminus cplus
0 < realizedWeightEnergy (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) (designVector (fun o : ClampObs J => (o.X, o.A)) z)
Proof (Lean source)
lemma stabilizedWeight_positive_energy {J n ell : ℕ} (B : SplitBlocks n) (z : Fin n → ClampObs J) (x : Fin J) (kappa cminus cplus delta h : ℝ) (i₀ : Fin n) (hlambda : 0 < lambdaStar ell kappa cminus cplus) : 0 < Causalean.Stat.Concentration.RandomDesignWeightedHoeffding.realizedWeightEnergy (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) (designVector (fun o : ClampObs J => (o.X, o.A)) z) := by classical unfold Causalean.Stat.Concentration.RandomDesignWeightedHoeffding.realizedWeightEnergy by_cases hgood : GoodGramEvent B z x ell kappa cminus cplus delta h · rw [stabilizedWeight_eq_on_good B z x kappa cminus cplus delta h i₀ hgood] exact good_gram_positive_energy B z x kappa cminus cplus delta h hlambda hgood · have hone : stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀ (designVector (fun o : ClampObs J => (o.X, o.A)) z) i₀ = 1 := by have hgood' : ¬ GoodGramEvent B (fun j => clampDesignLift (designVector (fun o : ClampObs J => (o.X, o.A)) z j)) x ell kappa cminus cplus delta h := by change ¬ GoodGramEvent B z x ell kappa cminus cplus delta h exact hgood simp [stabilizedWeight, hgood'] have hsingle : (0 : ℝ) < (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀ (designVector (fun o : ClampObs J => (o.X, o.A)) z) i₀) ^ 2 := by rw [hone] norm_num exact lt_of_lt_of_le hsingle (Finset.single_le_sum (fun i _ => sq_nonneg (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀ (designVector (fun o : ClampObs J => (o.X, o.A)) z) i)) (Finset.mem_univ i₀))
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedWeight_positive_energy · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/WeightedConcentration.lean:116
theorem stabilized_weighted_tail

The finite-product random-design Hoeffding tail for the stabilized weights. This is the direct Causalean theorem at the paper's observed-sample abstraction. The result uses the hmodel condition, the hlambda condition, the ht condition. This is the stated conclusion.

Formal statement
J n ell :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
B :
x :
Fin J
delta h t :
i₀ :
Fin n
hlambda :
0 < lambdaStar ell kappa cminus cplus
ht :
0 ≤ t
(iidProduct P n).real {z | t * sqrt (realizedWeightEnergy (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) (designVector (fun o : ClampObs J => (o.X, o.A)) z)) ≤ |weightedCenteredSum (fun o : ClampObs J => (o.X, o.A)) (fun o => o.Y) (clampRegressionExtension P) (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) z|}
≤ 2 * exp (-2 * t ^ 2)
Proof (Lean source)
lemma stabilized_weighted_tail {J n ell : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (B : SplitBlocks n) (x : Fin J) (delta h t : ℝ) (i₀ : Fin n) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (ht : 0 ≤ t) : (iidProduct P n).real {z | t * sqrt (realizedWeightEnergy (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) (designVector (fun o : ClampObs J => (o.X, o.A)) z)) ≤ |weightedCenteredSum (fun o : ClampObs J => (o.X, o.A)) (fun o => o.Y) (clampRegressionExtension P) (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) z|} ≤ 2 * exp (-2 * t ^ 2) := by letI : IsProbabilityMeasure P.dataMeasure := hmodel.probability apply product_weighted_centered_tail_le P.dataMeasure (fun o : ClampObs J => (o.X, o.A)) clampDesign_measurable (fun o : ClampObs J => o.Y) clampOutcome_measurable (hmodel.outcomeSupport.mono fun _ ho => ho.1) (hmodel.outcomeSupport.mono fun _ ho => ho.2) (clampRegressionExtension P) (clampRegressionExtension_measurable P hmodel.holder) (clampRegression_condExp P hmodel x) (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) (stabilizedWeight_measurable B x kappa cminus cplus delta h i₀) (by filter_upwards with z exact stabilizedWeight_positive_energy B z x kappa cminus cplus delta h i₀ hlambda) ht
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilized_weighted_tail · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/WeightedConcentration.lean:153
theorem block_weighted_tail_on_good_gram

Restricting the stabilized tail back to the good-Gram event recovers the paper's exact local-polynomial weighted residual sum. The result uses the hmodel condition, the hlambda condition, the ht condition. This is the stated conclusion.

Formal statement
J n ell :
P :
beta kappa L cminus cplus pmin :
hmodel :
ClampModel P beta kappa L cminus cplus pmin
B :
x :
Fin J
delta h t :
i₀ :
Fin n
hlambda :
0 < lambdaStar ell kappa cminus cplus
ht :
0 ≤ t
(iidProduct P n).real {z | GoodGramEvent B z x ell kappa cminus cplus delta h ∧ t * sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ≤ |∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * ((z i).Y - clampRegressionExtension P ((z i).X, (z i).A))|}
≤ 2 * exp (-2 * t ^ 2)
Proof (Lean source)
lemma block_weighted_tail_on_good_gram {J n ell : ℕ} (P : ClampLaw J) {beta kappa L cminus cplus pmin : ℝ} (hmodel : ClampModel P beta kappa L cminus cplus pmin) (B : SplitBlocks n) (x : Fin J) (delta h t : ℝ) (i₀ : Fin n) (hlambda : 0 < lambdaStar ell kappa cminus cplus) (ht : 0 ≤ t) : (iidProduct P n).real {z | GoodGramEvent B z x ell kappa cminus cplus delta h ∧ t * sqrt (∑ i ∈ B.I2, (interceptWeight B z x ell kappa cminus cplus delta h i) ^ 2) ≤ |∑ i ∈ B.I2, interceptWeight B z x ell kappa cminus cplus delta h i * ((z i).Y - clampRegressionExtension P ((z i).X, (z i).A))|} ≤ 2 * exp (-2 * t ^ 2) := by letI : IsProbabilityMeasure P.dataMeasure := hmodel.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance have htail := stabilized_weighted_tail P hmodel B x delta h t i₀ hlambda ht refine (measureReal_mono (h₂ := measure_ne_top _ _) ?_).trans htail intro z hz rcases hz with ⟨hgood, hbound⟩ change t * sqrt (realizedWeightEnergy (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) (designVector (fun o : ClampObs J => (o.X, o.A)) z)) ≤ |weightedCenteredSum (fun o : ClampObs J => (o.X, o.A)) (fun o => o.Y) (clampRegressionExtension P) (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) z| have hw := stabilizedWeight_eq_on_good B z x kappa cminus cplus delta h i₀ hgood have hcentered : weightedCenteredSum (fun o : ClampObs J => (o.X, o.A)) (fun o => o.Y) (clampRegressionExtension P) (stabilizedWeight (ell := ell) B x kappa cminus cplus delta h i₀) z = weightedCenteredSum (fun o : ClampObs J => (o.X, o.A)) (fun o => o.Y) (clampRegressionExtension P) (localRegressionDesignWeight (ell := ell) B x kappa cminus cplus delta h) z := by unfold weightedCenteredSum rw [hw] rw [hcentered, weightedCenteredSum_localRegression] unfold realizedWeightEnergy rw [hw] simp_rw [localRegressionDesignWeight_apply (ell := ell), ite_pow, zero_pow (by norm_num : 2 ≠ 0)] rw [← Finset.sum_filter] simpa only [Finset.filter_mem_eq_inter, Finset.univ_inter] using hbound
CausalSmith.Stat.LmtpThresholdAtomFrontier.block_weighted_tail_on_good_gram · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/Helpers/WeightedConcentration.lean:187
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.OpenQuestions 6 declarations The declaration is a never-proved proposition, not a theorem.

Open question: sharp confidence-length constant

The declaration is a never-proved proposition, not a theorem. It asks for one sharp constant over every threshold regime and attainment by intervals whose radius is built from the realized-design exact-modulus handle.

def worstExactModulus

Worst-case integrated exact-modulus radius over the model and strata.

Definition (Lean source)
J n :
B :
beta kappa L cminus cplus pmin deltaBar delta alpha :
worstExactModulus J n B beta kappa L cminus cplus pmin deltaBar delta alpha :
sSup {v : ℝ | ∃ (P : ClampLaw J) (x : Fin J), ∃ hmodel : ClampModel P beta kappa L cminus cplus pmin, ∃ hh : 0 < infoBandwidth n delta beta kappa deltaBar, v = exactModulusHandle P B x (ellOf beta) beta kappa L cminus cplus pmin delta (infoBandwidth n delta beta kappa deltaBar) (sqrt (log (12 * (J : ℝ) / alpha) / 2)) hh (Real.sqrt_nonneg _) hmodel}
CausalSmith.Stat.LmtpThresholdAtomFrontier.worstExactModulus · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/OpenQuestions.lean:23
def worstRealizedExactModulus

Worst conditional exact modulus on the realized design.

Definition (Lean source)
J n :
B :
beta kappa L _cminus _cplus deltaBar delta alpha :
z :
Fin n → ClampObs J
worstRealizedExactModulus J n B beta kappa L _cminus _cplus deltaBar delta alpha z :
sSup {v : ℝ | ∃ x : Fin J, ∃ hh : 0 < infoBandwidth n delta beta kappa deltaBar, v = realizedExactModulus B z x (ellOf beta) beta L delta (infoBandwidth n delta beta kappa deltaBar) (sqrt (log (12 * (J : ℝ) / alpha) / 2)) (Real.sqrt_nonneg _)}
CausalSmith.Stat.LmtpThresholdAtomFrontier.worstRealizedExactModulus · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/OpenQuestions.lean:34
def exactModulusInterval

Conditional-modulus interval centered at the realized total-Gram estimate.

Definition (Lean source)
n :
shared
J :
shared
B :
beta kappa L cminus cplus _pmin deltaBar delta alpha :
exactModulusInterval B beta kappa L cminus cplus _pmin deltaBar delta alpha :
fun z
=> let center := totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) let radius := worstRealizedExactModulus J n B beta kappa L cminus cplus deltaBar delta alpha z Icc (max 0 (center - radius)) (min 1 (center + radius))
CausalSmith.Stat.LmtpThresholdAtomFrontier.exactModulusInterval · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/OpenQuestions.lean:45
def HasThresholdRegimeLimit

The threshold sequence approaches one of the finite or infinite phase regimes; oscillating sequences with no ratio limit are intentionally excluded.

Definition (Lean source)
deltaSeq :
ℕ → ℝ
beta kappa :
HasThresholdRegimeLimit deltaSeq beta kappa :
Prop
(∃ q : ℝ, 0 ≤ q ∧ Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds q)) ∨ Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop
CausalSmith.Stat.LmtpThresholdAtomFrontier.HasThresholdRegimeLimit · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/OpenQuestions.lean:56
def LeastFavorableMixedExperimentMatch

The conditional modulus interval matches both the integrated realized modulus and the minimax length of the least-favorable mixed regular-plus-local experiment.

Definition (Lean source)
J :
beta kappa L cminus cplus pmin deltaBar alpha :
deltaSeq :
ℕ → ℝ
Bseq :
∀ n, SplitBlocks n
LeastFavorableMixedExperimentMatch J beta kappa L cminus cplus pmin deltaBar alpha deltaSeq Bseq :
Prop
clause 1
∃ D amplitude : ℝ,
0 < D
0 < amplitude
amplitude ≤ 1 / 4
∃ P0 Preg Ploc : ℕ → ClampLaw J,
∀ᶠ n in atTop, ClampModel (P0 n) beta kappa L cminus cplus pmin ∧ ClampModel (Preg n) beta kappa L cminus cplus pmin ∧ ClampModel (Ploc n) beta kappa L cminus cplus pmin ∧ IidSampling (P0 n) n ∧ IidSampling (Preg n) n ∧ IidSampling (Ploc n) n ∧ GlobalBernoulliShift (P0 n) (Preg n) ((n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ LocalizedBernoulliPerturbation (P0 n) (Ploc n) beta (deltaSeq n) (infoBandwidth n (deltaSeq n) beta kappa deltaBar) amplitude ∧ productChiSq (Preg n) (P0 n) n
≤ D ∧ productChiSq (Ploc n) (P0 n) n ≤ D
Tendsto (fun n => (|clampFunctional (Preg n) (deltaSeq n) - clampFunctional (P0 n) (deltaSeq n)| + |clampFunctional (Ploc n) (deltaSeq n) - clampFunctional (P0 n) (deltaSeq n)|) / (2 * worstExactModulus J n (Bseq n) beta kappa L cminus cplus pmin deltaBar (deltaSeq n) alpha)) atTop (nhds 1)
clause 2
Tendsto (fun n => confidenceWorstLength J n beta kappa L cminus cplus pmin (exactModulusInterval (Bseq n) beta kappa L cminus cplus pmin deltaBar (deltaSeq n) alpha) / ofReal (2 * worstExactModulus J n (Bseq n) beta kappa L cminus cplus pmin deltaBar (deltaSeq n) alpha)) atTop (nhds 1)
clause 3
Tendsto (fun n => ofReal (2 * worstExactModulus J n (Bseq n) beta kappa L cminus cplus pmin deltaBar (deltaSeq n) alpha) / observedMinimaxLength J n beta kappa L cminus cplus pmin (deltaSeq n) alpha) atTop (nhds 1)
CausalSmith.Stat.LmtpThresholdAtomFrontier.LeastFavorableMixedExperimentMatch · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/OpenQuestions.lean:63
def SharpConfidenceLengthConstantQuestion Remark 1 in the paper ↗

Does a realized-design exact-modulus interval attain one sharp asymptotic constant for L_n^star / r_n across regular, critical, atom-dominated, and fixed-threshold limits while retaining the stated model class?

Definition (Lean source)
J :
beta kappa L cminus cplus pmin deltaBar alpha :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
SharpConfidenceLengthConstantQuestion :
Prop
∃ c : ℝ,
0 < c
clause 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
HasThresholdRegimeLimit deltaSeq beta kappa
Tendsto (fun n => observedMinimaxLength J n beta kappa L cminus cplus pmin (deltaSeq n) alpha / ofReal (clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta)) atTop (nhds (ofReal c))
∃ Bseq : ∀ n,
SplitBlocks n, (∀ᶠ n in atTop, ∀ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin → 1 - alpha ≤ (iidProduct P n).real {z | clampFunctional P (deltaSeq n) ∈ exactModulusInterval (Bseq n) beta kappa L cminus cplus pmin deltaBar (deltaSeq n) alpha z})
Tendsto (fun n => confidenceWorstLength J n beta kappa L cminus cplus pmin (exactModulusInterval (Bseq n) beta kappa L cminus cplus pmin deltaBar (deltaSeq n) alpha) / ofReal (clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta)) atTop (nhds (ofReal c))
LeastFavorableMixedExperimentMatch J beta kappa L cminus cplus pmin deltaBar alpha deltaSeq Bseq
CausalSmith.Stat.LmtpThresholdAtomFrontier.SharpConfidenceLengthConstantQuestion · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/OpenQuestions.lean:104
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.TCausalBridge 2 declarations The theorem includes the stratumwise product identity, pointwise identification, support, simultaneous pathwise clamp decomposition, and target equality.

Full-data to observed-data clamp bridge

The theorem includes the stratumwise product identity, pointwise identification, support, simultaneous pathwise clamp decomposition, and target equality.

theorem causal_bridge Proposition 2 in the paper ↗

Latent randomization and structural-mean continuity identify the observed continuous regression on the declared threshold range and hence identify the clamp mean. Joint measurability of the potential-outcome process is part of FullDataLaw, and all remaining causal conditions are supplied by the bundled full-data model membership. The result uses the hPF condition, the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
PF :
hPF :
FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
conclusion 1
x :
Fin J
B :
Set
B ⊆ Icc (0 : ℝ) 1
(PF.observedMargin.px x)⁻¹ * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B}, z.1.Y ∂PF.fullMeasure)
= ∫ a in B, fullDataResponseMean PF x a * PF.observedMargin.pi x a
conclusion 2
x :
Fin J
a :
a ∈ Icc (0 : ℝ) deltaBar
fullDataResponseMean PF x a = PF.observedMargin.mu x a
conclusion 3
delta :
delta ∈ Icc (0 : ℝ) deltaBar
x :
Fin J
∀ᵐ a ∂conditionalTreatmentMeasure PF.observedMargin x, IsConditionalSupportPoint (conditionalTreatmentMeasure PF.observedMargin x) (clampPolicy delta a)
∀ᵐ z ∂PF.fullMeasure, PF.pot (clampPolicy delta z.1.A) z
= (if delta < z.1.A then z.1.Y else 0) + (if z.1.A ≤ delta then PF.pot delta z else 0)
= retainedMean PF.observedMargin delta
+ ∑ x : Fin J, PF.observedMargin.px x * atomMass PF.observedMargin x delta * PF.observedMargin.mu x delta
causalClampMean PF delta = clampFunctional PF.observedMargin delta
Proof (Lean source)
-- @node: prop:causal-bridge theorem causal_bridge (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (PF : FullDataLaw J) (hPF : FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : (∀ (x : Fin J) (B : Set ℝ), MeasurableSet B → B ⊆ Icc (0 : ℝ) 1 → (PF.observedMargin.px x)⁻¹ * (∫ z in {z : ClampObs J × PF.latentCarrier | z.1.X = x ∧ z.1.A ∈ B}, z.1.Y ∂PF.fullMeasure) = ∫ a in B, fullDataResponseMean PF x a * PF.observedMargin.pi x a) ∧ (∀ (x : Fin J) (a : ℝ), a ∈ Icc (0 : ℝ) deltaBar → fullDataResponseMean PF x a = PF.observedMargin.mu x a) ∧ ∀ delta : ℝ, delta ∈ Icc (0 : ℝ) deltaBar → (∀ x : Fin J, ∀ᵐ a ∂conditionalTreatmentMeasure PF.observedMargin x, IsConditionalSupportPoint (conditionalTreatmentMeasure PF.observedMargin x) (clampPolicy delta a)) ∧ (∀ᵐ z ∂PF.fullMeasure, PF.pot (clampPolicy delta z.1.A) z = (if delta < z.1.A then z.1.Y else 0) + (if z.1.A ≤ delta then PF.pot delta z else 0)) ∧ causalClampMean PF delta = retainedMean PF.observedMargin delta + ∑ x : Fin J, PF.observedMargin.px x * atomMass PF.observedMargin x delta * PF.observedMargin.mu x delta ∧ causalClampMean PF delta = clampFunctional PF.observedMargin delta := by have hreg' := hreg rcases hreg' with ⟨_, _, hkappa, _, _, _, hcplusLower, hpmin, _, _, hdeltaBarOne, _, _⟩ have hcplus : 0 ≤ cplus := le_trans (by linarith) hcplusLower have hmean := fullDataResponseMean_eq_mu J beta kappa L cminus cplus pmin deltaBar alpha PF hPF hreg refine ⟨?_, hmean, ?_⟩ · intro x B hB hBunit exact fullDataResponseMean_setIntegral J kappa cminus cplus pmin deltaBar PF hPF.toBridge hkappa hcplus hpmin x B hB hBunit · intro delta hdelta have hdeltaUnit : delta ∈ Icc (0 : ℝ) 1 := by exact ⟨hdelta.1, hdelta.2.trans hdeltaBarOne.le⟩ have hsupport : ∀ x : Fin J, ∀ᵐ a ∂conditionalTreatmentMeasure PF.observedMargin x, IsConditionalSupportPoint (conditionalTreatmentMeasure PF.observedMargin x) (clampPolicy delta a) := fun x => clamp_policy_support PF.observedMargin beta kappa L cminus cplus pmin deltaBar alpha hPF.observedModel hreg x delta hdelta have hpath := causalClamp_pathwise PF hPF.consistency hPF.observedModel.treatmentSupport delta hdeltaUnit refine ⟨hsupport, hpath, ?_⟩ have hYFull : ∀ᵐ z ∂PF.fullMeasure, z.1.Y ∈ Icc (0 : ℝ) 1 := by have hsupp := hPF.observedModel.outcomeSupport rw [← PF.margin_eq] at hsupp exact (MeasureTheory.ae_map_iff measurable_fst.aemeasurable (measurableSet_Icc.preimage clampOutcome_measurable)).mp hsupp let fRet : ClampObs J × PF.latentCarrier → ℝ := fun z => if delta < z.1.A then z.1.Y else 0 let fAtom : ClampObs J × PF.latentCarrier → ℝ := fun z => if z.1.A ≤ delta then PF.pot delta z else 0 have hfRetMeas : Measurable fRet := by exact (clampOutcome_measurable.comp measurable_fst).piecewise (measurableSet_Ioi.preimage ((measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))).comp measurable_fst)) measurable_const have hfAtomMeas : Measurable fAtom := by have hp : Measurable (fun z : ClampObs J × PF.latentCarrier => PF.pot delta z) := PF.pot_jointlyMeasurable.comp (measurable_const.prodMk measurable_id) exact hp.piecewise (measurableSet_Iic.preimage ((measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))).comp measurable_fst)) measurable_const let _ := PF.probability have hfRetInt : Integrable fRet PF.fullMeasure := by refine Integrable.of_bound hfRetMeas.aestronglyMeasurable 1 ?_ filter_upwards [hYFull] with z hY by_cases hlt : delta < z.1.A · simp only [fRet, if_pos hlt, Real.norm_eq_abs] exact abs_le.2 ⟨by linarith [hY.1], hY.2⟩ · simp [fRet, hlt] have hfAtomInt : Integrable fAtom PF.fullMeasure := by refine Integrable.of_bound hfAtomMeas.aestronglyMeasurable 1 ?_ filter_upwards [hPF.consistency.2.2] with z hz by_cases hle : z.1.A ≤ delta · simp only [fAtom, if_pos hle, Real.norm_eq_abs] rw [hz.1 delta hdeltaUnit] exact abs_le.2 ⟨by linarith [(hPF.consistency.2.1 z.1.X delta z.2 hdeltaUnit).1], (hPF.consistency.2.1 z.1.X delta z.2 hdeltaUnit).2⟩ · simp [fAtom, hle] have hret : (∫ z, fRet z ∂PF.fullMeasure) = retainedMean PF.observedMargin delta := by have hm : Measurable (fun o : ClampObs J => if delta < o.A then o.Y else 0) := by exact clampOutcome_measurable.piecewise (measurableSet_Ioi.preimage (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) measurable_const have h := fullData_observed_setIntegral PF univ MeasurableSet.univ (fun o : ClampObs J => if delta < o.A then o.Y else 0) hm simpa [fRet, retainedMean, indicator] using h have hatom := fullData_clampAtom_integral_eq J kappa cminus cplus pmin deltaBar PF hPF.toBridge hkappa hcplus hpmin hdeltaBarOne.le delta hdelta have hpsi : causalClampMean PF delta = retainedMean PF.observedMargin delta + ∑ x : Fin J, PF.observedMargin.px x * atomMass PF.observedMargin x delta * fullDataResponseMean PF x delta := by calc causalClampMean PF delta = ∫ z, fRet z + fAtom z ∂PF.fullMeasure := by apply integral_congr_ae exact hpath.mono (fun z hz => by simpa [causalClampMean, fRet, fAtom] using hz) _ = (∫ z, fRet z ∂PF.fullMeasure) + ∫ z, fAtom z ∂PF.fullMeasure := by rw [integral_add hfRetInt hfAtomInt] _ = _ := by rw [hret, hatom] have htarget : causalClampMean PF delta = retainedMean PF.observedMargin delta + ∑ x : Fin J, PF.observedMargin.px x * atomMass PF.observedMargin x delta * PF.observedMargin.mu x delta := by rw [hpsi] congr 1 apply Finset.sum_congr rfl intro x _ rw [hmean x delta hdelta] exact ⟨htarget, by simpa [clampFunctional] using htarget⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.causal_bridge · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalBridge.lean:25
theorem continuity_causal_bridge Proposition 4 in the paper ↗

The same latent-response argument identifies the qualitative continuous regression version and the continuity-only clamp functional, without imposing a fixed-Hölder observed model or a shared latent carrier. The result uses the hPF condition, the hreg condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar :
PF :
hPF :
ContFullDataClampModel PF kappa cminus cplus pmin deltaBar
hreg :
ContDesignConstants J kappa cminus cplus pmin deltaBar
conclusion 1
x :
Fin J
a :
a ∈ Icc (0 : ℝ) deltaBar
= contRegression PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel x a
conclusion 2
delta :
delta ∈ Icc (0 : ℝ) deltaBar
= contClampFunctional PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel delta
Proof (Lean source)
-- @node: prop:continuity-causal-bridge theorem continuity_causal_bridge (J : ℕ) (kappa cminus cplus pmin deltaBar : ℝ) (PF : FullDataLaw J) (hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar) (hreg : ContDesignConstants J kappa cminus cplus pmin deltaBar) : (∀ (x : Fin J) (a : ℝ), a ∈ Icc (0 : ℝ) deltaBar → fullDataResponseMean PF x a = contRegression PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel x a) ∧ ∀ delta : ℝ, delta ∈ Icc (0 : ℝ) deltaBar → causalClampMean PF delta = contClampFunctional PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel delta := by have hreg' := hreg rcases hreg' with ⟨_, hkappa, _, _, hcplusLower, hpmin, _, _, hdeltaBarOne⟩ have hcplus : 0 ≤ cplus := le_trans (by linarith) hcplusLower have hmean := fullDataResponseMean_eq_contRegression J kappa cminus cplus pmin deltaBar PF hPF hreg refine ⟨hmean, ?_⟩ intro delta hdelta have hdeltaUnit : delta ∈ Icc (0 : ℝ) 1 := ⟨hdelta.1, hdelta.2.trans hdeltaBarOne.le⟩ have hpath := causalClamp_pathwise PF hPF.consistency hPF.observedModel.treatmentSupport delta hdeltaUnit have hYFull : ∀ᵐ z ∂PF.fullMeasure, z.1.Y ∈ Icc (0 : ℝ) 1 := by have hsupp := hPF.observedModel.outcomeSupport rw [← PF.margin_eq] at hsupp exact (MeasureTheory.ae_map_iff measurable_fst.aemeasurable (measurableSet_Icc.preimage clampOutcome_measurable)).mp hsupp let fRet : ClampObs J × PF.latentCarrier → ℝ := fun z => if delta < z.1.A then z.1.Y else 0 let fAtom : ClampObs J × PF.latentCarrier → ℝ := fun z => if z.1.A ≤ delta then PF.pot delta z else 0 have hfRetMeas : Measurable fRet := by exact (clampOutcome_measurable.comp measurable_fst).piecewise (measurableSet_Ioi.preimage ((measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))).comp measurable_fst)) measurable_const have hfAtomMeas : Measurable fAtom := by have hp : Measurable (fun z : ClampObs J × PF.latentCarrier => PF.pot delta z) := PF.pot_jointlyMeasurable.comp (measurable_const.prodMk measurable_id) exact hp.piecewise (measurableSet_Iic.preimage ((measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl))).comp measurable_fst)) measurable_const let _ := PF.probability have hfRetInt : Integrable fRet PF.fullMeasure := by refine Integrable.of_bound hfRetMeas.aestronglyMeasurable 1 ?_ filter_upwards [hYFull] with z hY by_cases hlt : delta < z.1.A · simp only [fRet, if_pos hlt, Real.norm_eq_abs] exact abs_le.2 ⟨by linarith [hY.1], hY.2⟩ · simp [fRet, hlt] have hfAtomInt : Integrable fAtom PF.fullMeasure := by refine Integrable.of_bound hfAtomMeas.aestronglyMeasurable 1 ?_ filter_upwards [hPF.consistency.2.2] with z hz by_cases hle : z.1.A ≤ delta · simp only [fAtom, if_pos hle, Real.norm_eq_abs] rw [hz.1 delta hdeltaUnit] exact abs_le.2 ⟨by linarith [(hPF.consistency.2.1 z.1.X delta z.2 hdeltaUnit).1], (hPF.consistency.2.1 z.1.X delta z.2 hdeltaUnit).2⟩ · simp [fAtom, hle] have hret : (∫ z, fRet z ∂PF.fullMeasure) = retainedMean PF.observedMargin delta := by have hm : Measurable (fun o : ClampObs J => if delta < o.A then o.Y else 0) := by exact clampOutcome_measurable.piecewise (measurableSet_Ioi.preimage (measurable_fst.comp (measurable_snd.comp (Measurable.of_comap_le le_rfl)))) measurable_const have h := fullData_observed_setIntegral PF univ MeasurableSet.univ (fun o : ClampObs J => if delta < o.A then o.Y else 0) hm simpa [fRet, retainedMean, indicator] using h have hatom := fullData_clampAtom_integral_eq J kappa cminus cplus pmin deltaBar PF hPF.toBridge hkappa hcplus hpmin hdeltaBarOne.le delta hdelta have hpsi : causalClampMean PF delta = retainedMean PF.observedMargin delta + ∑ x : Fin J, PF.observedMargin.px x * atomMass PF.observedMargin x delta * fullDataResponseMean PF x delta := by calc causalClampMean PF delta = ∫ z, fRet z + fAtom z ∂PF.fullMeasure := by apply integral_congr_ae exact hpath.mono (fun z hz => by simpa [causalClampMean, fRet, fAtom] using hz) _ = (∫ z, fRet z ∂PF.fullMeasure) + ∫ z, fAtom z ∂PF.fullMeasure := by rw [integral_add hfRetInt hfAtomInt] _ = _ := by rw [hret, hatom] rw [hpsi] unfold contClampFunctional congr 1 apply Finset.sum_congr rfl intro x _ rw [hmean x delta hdelta]
CausalSmith.Stat.LmtpThresholdAtomFrontier.continuity_causal_bridge · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalBridge.lean:161
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.TCausalFrontierLift 18 declarations All procedures remain functions only of the observed sample.

Lift of the observed frontier to the full-data causal class

All procedures remain functions only of the observed sample. The quantified class is the full-data class, and the criteria are the two components of causalFrontierCriteria.

theorem standardBorelRegularConditionalLaw_mathlib

Mathlib's standard-Borel disintegration kernel discharges the paper's regular-conditional-law gate. This is the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: standardBorelRegularConditionalLaw_mathlib lemma standardBorelRegularConditionalLaw_mathlib : StandardBorelRegularConditionalLaw := by intro S T _ _ _ _ μ hμ let _ := hμ let _ : Nonempty T := ⟨(choice (nonempty_of_isProbabilityMeasure μ)).2⟩ let K : Kernel S T := μ.condKernel refine ⟨K, fun _ => inferInstance, ?_⟩ intro B C hB hC have h := Measure.setLIntegral_condKernel (ρ := μ) (f := fun _ : S × T => (1 : ℝ≥0∞)) measurable_const hB hC simpa [K, Measure.fst] using h.symm
CausalSmith.Stat.LmtpThresholdAtomFrontier.standardBorelRegularConditionalLaw_mathlib · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:28
theorem observed_margin_surjectivity Proposition 3 in the paper ↗

Conditional on the disclosed regular-conditional-law gate, every observed model law admits a structural full-data lift and the observed and causal finite-sample criteria agree. The result uses the hreg condition. This is the stated conclusion.

Formal statement
StandardBorelRegularConditionalLaw_of_gate :
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
conclusion 1
P :
ClampModel P beta kappa L cminus cplus pmin
∃ PF : FullDataLaw J,
FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar
PF.observedMargin = P
conclusion 2
n :
delta :
delta ∈ Icc (0 : ℝ) deltaBar
(causalFrontierCriteria J n beta kappa L cminus cplus pmin deltaBar delta alpha).1
= observedMinimaxRisk J n beta kappa L cminus cplus pmin delta
(causalFrontierCriteria J n beta kappa L cminus cplus pmin deltaBar delta alpha).2
= observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha
Proof (Lean source)
-- @node: prop:observed-margin-surjectivity theorem observed_margin_surjectivity (StandardBorelRegularConditionalLaw_of_gate : StandardBorelRegularConditionalLaw) (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : (∀ (P : ClampLaw J), ClampModel P beta kappa L cminus cplus pmin → ∃ PF : FullDataLaw J, FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar ∧ PF.observedMargin = P) ∧ ∀ (n : ℕ) (delta : ℝ), delta ∈ Icc (0 : ℝ) deltaBar → (causalFrontierCriteria J n beta kappa L cminus cplus pmin deltaBar delta alpha).1 = observedMinimaxRisk J n beta kappa L cminus cplus pmin delta ∧ (causalFrontierCriteria J n beta kappa L cminus cplus pmin deltaBar delta alpha).2 = observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha := by have hpmin : 0 < pmin := hreg.2.2.2.2.2.2.2.1 have hJ : 0 < J := hreg.1 have hdeltaBar : deltaBar ≤ 1 := (hreg.2.2.2.2.2.2.2.2.2.2.1).le have hsurj : ∀ (P : ClampLaw J), ClampModel P beta kappa L cminus cplus pmin → ∃ PF : FullDataLaw J, FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar ∧ PF.observedMargin = P := by intro P hP exact exists_fullData_holder_lift P hP hJ hpmin hdeltaBar refine ⟨hsurj, ?_⟩ intro n delta hdelta have htarget (PF : FullDataLaw J) (hPF : FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar) : causalClampMean PF delta = clampFunctional PF.observedMargin delta := ((causal_bridge J beta kappa L cminus cplus pmin deltaBar alpha PF hPF hreg).2.2 delta hdelta).2.2.2 constructor · unfold causalFrontierCriteria observedMinimaxRisk apply congrArg sInf ext r constructor · rintro ⟨est, hm, hrange, rfl⟩ refine ⟨est, hm, hrange, ?_⟩ apply congrArg sSup ext v constructor · rintro ⟨PF, hPF, rfl⟩ refine ⟨PF.observedMargin, hPF.observedModel, ?_⟩ unfold causalEstimatorRisk estimatorRisk rw [htarget PF hPF] · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP refine ⟨PF, hPF, ?_⟩ unfold causalEstimatorRisk estimatorRisk rw [htarget PF hPF, hmargin] · rintro ⟨est, hm, hrange, rfl⟩ refine ⟨est, hm, hrange, ?_⟩ apply congrArg sSup ext v constructor · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP refine ⟨PF, hPF, ?_⟩ unfold causalEstimatorRisk estimatorRisk rw [htarget PF hPF, hmargin] · rintro ⟨PF, hPF, rfl⟩ refine ⟨PF.observedMargin, hPF.observedModel, ?_⟩ unfold causalEstimatorRisk estimatorRisk rw [htarget PF hPF] · unfold causalFrontierCriteria observedMinimaxLength UniformCoverage apply congrArg sInf ext r constructor · rintro ⟨C, hm, hcov, rfl⟩ refine ⟨C, ⟨hm, ?_⟩, ?_⟩ · intro P hP obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP simpa only [hmargin, htarget PF hPF] using hcov PF hPF · apply congrArg sSup ext v constructor · rintro ⟨PF, hPF, rfl⟩ exact ⟨PF.observedMargin, hPF.observedModel, rfl⟩ · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP exact ⟨PF, hPF, by rw [hmargin]⟩ · rintro ⟨C, ⟨hm, hcov⟩, rfl⟩ refine ⟨C, hm, ?_, ?_⟩ · intro PF hPF simpa only [htarget PF hPF] using hcov PF.observedMargin hPF.observedModel · apply congrArg sSup ext v constructor · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP exact ⟨PF, hPF, by rw [hmargin]⟩ · rintro ⟨PF, hPF, rfl⟩ exact ⟨PF.observedMargin, hPF.observedModel, rfl⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.observed_margin_surjectivity · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:45
theorem continuity_observed_margin_surjectivity Proposition 5 in the paper ↗

Conditional on the same disclosed gate, the observed-margin map is onto for the continuity-only class and its observed and causal criteria agree. The result uses the hreg condition. This is the stated conclusion.

Formal statement
StandardBorelRegularConditionalLaw_of_gate :
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
conclusion 1
P :
ContClampModel P kappa cminus cplus pmin deltaBar
∃ PF : FullDataLaw J,
ContFullDataClampModel PF kappa cminus cplus pmin deltaBar
PF.observedMargin = P
conclusion 2
n :
delta :
delta ∈ Icc (0 : ℝ) deltaBar
crit :
contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha
crit.2.2.1 = crit.1
crit.2.2.2 = crit.2.1
Proof (Lean source)
-- @node: prop:continuity-observed-margin-surjectivity theorem continuity_observed_margin_surjectivity (StandardBorelRegularConditionalLaw_of_gate : StandardBorelRegularConditionalLaw) (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : (∀ (P : ClampLaw J), ContClampModel P kappa cminus cplus pmin deltaBar → ∃ PF : FullDataLaw J, ContFullDataClampModel PF kappa cminus cplus pmin deltaBar ∧ PF.observedMargin = P) ∧ ∀ (n : ℕ) (delta : ℝ), delta ∈ Icc (0 : ℝ) deltaBar → let crit := contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha crit.2.2.1 = crit.1 ∧ crit.2.2.2 = crit.2.1 := by rcases hreg.1 with ⟨hJ, hkappa, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar_one⟩ have hdesign : ContDesignConstants J kappa cminus cplus pmin deltaBar := ⟨hJ, hkappa, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar_one⟩ have hsurj : ∀ (P : ClampLaw J), ContClampModel P kappa cminus cplus pmin deltaBar → ∃ PF : FullDataLaw J, ContFullDataClampModel PF kappa cminus cplus pmin deltaBar ∧ PF.observedMargin = P := by intro P hP exact exists_fullData_cont_lift P hP hpmin refine ⟨hsurj, ?_⟩ intro n delta hdelta have htarget (PF : FullDataLaw J) (hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar) : causalClampMean PF delta = contClampFunctional PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel delta := (continuity_causal_bridge J kappa cminus cplus pmin deltaBar PF hPF hdesign).2 delta hdelta dsimp only constructor · unfold contFrontierCriteria apply congrArg sInf ext r constructor · rintro ⟨est, hm, hrange, rfl⟩ refine ⟨est, hm, hrange, ?_⟩ apply congrArg sSup ext v constructor · rintro ⟨PF, hPF, rfl⟩ refine ⟨PF.observedMargin, hPF.observedModel, ?_⟩ unfold causalEstimatorRisk contEstimatorRisk rw [htarget PF hPF] · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP subst P refine ⟨PF, hPF, ?_⟩ unfold causalEstimatorRisk contEstimatorRisk rw [htarget PF hPF] · rintro ⟨est, hm, hrange, rfl⟩ refine ⟨est, hm, hrange, ?_⟩ apply congrArg sSup ext v constructor · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP subst P refine ⟨PF, hPF, ?_⟩ unfold causalEstimatorRisk contEstimatorRisk rw [htarget PF hPF] · rintro ⟨PF, hPF, rfl⟩ refine ⟨PF.observedMargin, hPF.observedModel, ?_⟩ unfold causalEstimatorRisk contEstimatorRisk rw [htarget PF hPF] · unfold contFrontierCriteria apply congrArg sInf ext r constructor · rintro ⟨C, hm, hcov, rfl⟩ refine ⟨C, hm, ?_, ?_⟩ · intro P hP obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP subst P simpa only [htarget PF hPF] using hcov PF hPF · apply congrArg sSup ext v constructor · rintro ⟨PF, hPF, rfl⟩ exact ⟨PF.observedMargin, hPF.observedModel, rfl⟩ · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP exact ⟨PF, hPF, by rw [hmargin]⟩ · rintro ⟨C, hm, hcov, rfl⟩ refine ⟨C, hm, ?_, ?_⟩ · intro PF hPF simpa only [htarget PF hPF] using hcov PF.observedMargin hPF.observedModel · apply congrArg sSup ext v constructor · rintro ⟨P, hP, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := hsurj P hP exact ⟨PF, hPF, by rw [hmargin]⟩ · rintro ⟨PF, hPF, rfl⟩ exact ⟨PF.observedMargin, hPF.observedModel, rfl⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.continuity_observed_margin_surjectivity · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:147

Worst-case causal risk of the same observed-sample total-Gram estimator.

Definition (Lean source)
J n :
B :
beta kappa L cminus cplus pmin deltaBar delta :
causalStabilizedWorstRisk J n B beta kappa L cminus cplus pmin deltaBar delta :
sSup {v : ℝ | ∃ PF : FullDataLaw J, FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar ∧ v = causalEstimatorRisk (PF := PF) (n := n) (delta := delta) (est := fun z => totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar))}
CausalSmith.Stat.LmtpThresholdAtomFrontier.causalStabilizedWorstRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:253

Worst-case full-data coverage of the same observed-sample interval.

Definition (Lean source)
J n :
B :
beta kappa L cminus cplus pmin deltaBar delta alpha :
causalStabilizedCoverage J n B beta kappa L cminus cplus pmin deltaBar delta alpha :
sInf {v : ℝ | ∃ PF : FullDataLaw J, FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar ∧ v = (iidProduct PF.observedMargin n).real {z | causalClampMean (PF := PF) (delta := delta) ∈ stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z}}
CausalSmith.Stat.LmtpThresholdAtomFrontier.causalStabilizedCoverage · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:262

Worst-case full-data expected length of that interval, as an extended expectation so a non-integrable length contributes .

Definition (Lean source)
J n :
B :
beta kappa L cminus cplus pmin deltaBar delta alpha :
causalStabilizedWorstLength J n B beta kappa L cminus cplus pmin deltaBar delta alpha :
ℝ≥0∞
sSup {v : ℝ≥0∞ | ∃ PF : FullDataLaw J, FullDataClampModel PF beta kappa L cminus cplus pmin deltaBar ∧ v = ∫⁻ z, intervalLengthENNReal (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z) ∂iidProduct PF.observedMargin n}
CausalSmith.Stat.LmtpThresholdAtomFrontier.causalStabilizedWorstLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:271

The convex-hull length of a closed real interval is its nonnegative endpoint difference, including the empty-interval case. This is the stated conclusion.

Formal statement
a b :
intervalLength (Icc a b) = max 0 (b - a)
Proof (Lean source)
-- @node: intervalLength_Icc_eq lemma intervalLength_Icc_eq (a b : ℝ) : intervalLength (Icc a b) = max 0 (b - a) := by unfold intervalLength by_cases h : a ≤ b · simp [h] · have h' : b < a := lt_of_not_ge h simp [Set.Icc_eq_empty h, h'.le]
CausalSmith.Stat.LmtpThresholdAtomFrontier.intervalLength_Icc_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:281
theorem stratumRadius_measurable

The sample-dependent per-stratum radius is measurable. This is the stated conclusion.

Formal statement
J n ell :
B :
x :
Fin J
beta kappa L cminus cplus delta h tAlpha b1 :
Measurable fun z : Fin n → ClampObs J
=> stratumRadius B z x ell beta kappa L cminus cplus delta h tAlpha b1
Proof (Lean source)
-- @node: stratumRadius_measurable lemma stratumRadius_measurable {J n ell : ℕ} (B : SplitBlocks n) (x : Fin J) (beta kappa L cminus cplus delta h tAlpha b1 : ℝ) : Measurable fun z : Fin n → ClampObs J => stratumRadius B z x ell beta kappa L cminus cplus delta h tAlpha b1 := by classical unfold stratumRadius refine Measurable.ite (goodGramEvent_measurable B x kappa cminus cplus delta h) ?_ ?_ · have habs := Finset.measurable_fun_sum B.I2 fun i _ => (interceptWeight_measurable (ell := ell) B x kappa cminus cplus delta h i).abs have hsq := Finset.measurable_fun_sum B.I2 fun i _ => (interceptWeight_measurable (ell := ell) B x kappa cminus cplus delta h i).pow_const 2 exact (((atomEstimate_measurable B x delta).add measurable_const).mul (((measurable_const.mul measurable_const).mul habs).add (measurable_const.mul hsq.sqrt))).add measurable_const · exact (atomEstimate_measurable B x delta).add measurable_const
CausalSmith.Stat.LmtpThresholdAtomFrontier.stratumRadius_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:293
theorem stabilizedInterval_radius_nonneg

Once all three blocks are nonempty, the total displayed confidence radius is nonnegative under the declared parameter restrictions. The result uses the hreg condition, the hn condition, the hh condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta h :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hn :
4 ≤ n
hh :
0 ≤ h
z :
Fin n → ClampObs J
tAlpha :
sqrt (log (12 * (J : ℝ) / alpha) / 2)
b0 :
tAlpha / sqrt (B.I0.card : ℝ)
b1 :
tAlpha / sqrt (B.I1.card : ℝ)
0
≤ b0
+ ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h tAlpha b1
Proof (Lean source)
-- @node: stabilizedInterval_radius_nonneg lemma stabilizedInterval_radius_nonneg (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta h : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hn : 4 ≤ n) (hh : 0 ≤ h) : ∀ z : Fin n → ClampObs J, let tAlpha := sqrt (log (12 * (J : ℝ) / alpha) / 2) let b0 := tAlpha / sqrt (B.I0.card : ℝ) let b1 := tAlpha / sqrt (B.I1.card : ℝ) 0 ≤ b0 + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta h tAlpha b1 := by intro z dsimp only rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, ha, ha_half⟩ have ht : 0 ≤ sqrt (log (12 * (J : ℝ) / alpha) / 2) := Real.sqrt_nonneg _ have hI0 : 0 < (B.I0.card : ℝ) := by have hc := B.card_I0 exact_mod_cast (show 0 < B.I0.card by omega) have hI1 : 0 < (B.I1.card : ℝ) := by have hc := B.card_I1 exact_mod_cast (show 0 < B.I1.card by omega) have hb0 : 0 ≤ sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I0.card : ℝ) := div_nonneg ht (Real.sqrt_nonneg _) have hb1 : 0 ≤ sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I1.card : ℝ) := div_nonneg ht (Real.sqrt_nonneg _) apply add_nonneg hb0 apply sum_nonneg intro x hx unfold stratumRadius atomEstimate blockAverage split_ifs <;> positivity
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedInterval_radius_nonneg · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:312
theorem stabilizedInterval_length_measurable

Length of the displayed bias-aware interval is measurable as a function of the observed sample. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus deltaBar delta alpha :
Measurable fun z : Fin n → ClampObs J
=> intervalLength (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z)
Proof (Lean source)
-- @node: stabilizedInterval_length_measurable lemma stabilizedInterval_length_measurable (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus deltaBar delta alpha : ℝ) : Measurable fun z : Fin n → ClampObs J => intervalLength (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z) := by classical let tAlpha := sqrt (log (12 * (J : ℝ) / alpha) / 2) let b0 := tAlpha / sqrt (B.I0.card : ℝ) let b1 := tAlpha / sqrt (B.I1.card : ℝ) let center := fun z : Fin n → ClampObs J => totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) let radius := fun z : Fin n → ClampObs J => b0 + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) tAlpha b1 have hc : Measurable center := totalGramEstimator_measurable B kappa cminus cplus delta _ have hr : Measurable radius := measurable_const.add (Finset.measurable_fun_sum _ fun x _ => stratumRadius_measurable B x beta kappa L cminus cplus delta _ tAlpha b1) have hlo : Measurable fun z => max 0 (center z - radius z) := measurable_const.max (hc.sub hr) have hhi : Measurable fun z => min 1 (center z + radius z) := measurable_const.min (hc.add hr) have hd : Measurable fun z => min 1 (center z + radius z) - max 0 (center z - radius z) := hhi.sub hlo have hm : Measurable fun z => max 0 (min 1 (center z + radius z) - max 0 (center z - radius z)) := measurable_const.max hd simpa only [stabilizedInterval, honestInterval, intervalLength_Icc_eq, center, radius, tAlpha, b0, b1] using hm
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedInterval_length_measurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:349
theorem stabilizedInterval_observedMeasurable

For sufficiently large samples the displayed endpoints are ordered and measurable, hence the bias-aware construction is an admissible observed confidence procedure. The result uses the hreg condition, the hn condition, the hh condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hn :
4 ≤ n
hh :
0 ≤ infoBandwidth n delta beta kappa deltaBar
ObservedMeasurableInterval (stabilizedInterval (J := J) B beta kappa L cminus cplus deltaBar delta alpha)
Proof (Lean source)
-- @node: stabilizedInterval_observedMeasurable lemma stabilizedInterval_observedMeasurable (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hn : 4 ≤ n) (hh : 0 ≤ infoBandwidth n delta beta kappa deltaBar) : ObservedMeasurableInterval (stabilizedInterval (J := J) B beta kappa L cminus cplus deltaBar delta alpha) := by classical let tAlpha := sqrt (log (12 * (J : ℝ) / alpha) / 2) let b0 := tAlpha / sqrt (B.I0.card : ℝ) let b1 := tAlpha / sqrt (B.I1.card : ℝ) let center := fun z : Fin n → ClampObs J => totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) let radius := fun z : Fin n → ClampObs J => b0 + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) tAlpha b1 let lo := fun z => max 0 (center z - radius z) let hi := fun z => min 1 (center z + radius z) have hc : Measurable center := totalGramEstimator_measurable B kappa cminus cplus delta _ have hr : Measurable radius := measurable_const.add (Finset.measurable_fun_sum _ fun x _ => stratumRadius_measurable B x beta kappa L cminus cplus delta _ tAlpha b1) have hlo : Measurable lo := measurable_const.max (hc.sub hr) have hhi : Measurable hi := measurable_const.min (hc.add hr) refine ⟨lo, hi, hlo, hhi, ?_, ?_⟩ · intro z have hcenter := clampUnit_mem_Icc (retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar)) have hradius : 0 ≤ radius z := by simpa only [radius, tAlpha, b0, b1] using stabilizedInterval_radius_nonneg J n B beta kappa L cminus cplus pmin deltaBar alpha delta (infoBandwidth n delta beta kappa deltaBar) hreg hn hh z dsimp only [lo, hi] apply le_min · apply max_le · norm_num · dsimp only [center] rw [show totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) = clampUnit (retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar)) by rfl] linarith [hcenter.2] · apply max_le · dsimp only [center] rw [show totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) = clampUnit (retainedEstimate B z delta + ∑ x : Fin J, atomEstimate B z x delta * localRegressionEstimate B z x (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar)) by rfl] linarith [hcenter.1] · linarith · intro z rfl
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedInterval_observedMeasurable · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:383
theorem stabilizedInterval_length_le_one

Intersecting the bias-aware interval with the outcome range bounds its convex-hull length by one on every sample. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus deltaBar delta alpha :
z :
Fin n → ClampObs J
intervalLength (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z) ≤ 1
Proof (Lean source)
-- @node: stabilizedInterval_length_le_one lemma stabilizedInterval_length_le_one (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus deltaBar delta alpha : ℝ) (z : Fin n → ClampObs J) : intervalLength (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z) ≤ 1 := by simp only [stabilizedInterval, honestInterval, intervalLength_Icc_eq] apply max_le · norm_num · have hmin := min_le_left (1 : ℝ) (totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) + (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I0.card : ℝ) + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) (sqrt (log (12 * (J : ℝ) / alpha) / 2)) (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I1.card : ℝ)))) have hmax := le_max_left (0 : ℝ) (totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) - (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I0.card : ℝ) + ∑ x : Fin J, stratumRadius B z x (ellOf beta) beta kappa L cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) (sqrt (log (12 * (J : ℝ) / alpha) / 2)) (sqrt (log (12 * (J : ℝ) / alpha) / 2) / sqrt (B.I1.card : ℝ)))) linarith
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedInterval_length_le_one · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:449
theorem confidenceWorstLength_stabilizedInterval_le_ofReal

A real expected-length bound for the concrete interval upgrades to the extended expected-length convention used by the minimax criteria. The result uses the hupper condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar delta alpha U :
hupper :
stabilizedWorstLength J n B beta kappa L cminus cplus pmin deltaBar delta alpha ≤ U
confidenceWorstLength J n beta kappa L cminus cplus pmin (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha)
ofReal U
Proof (Lean source)
-- @node: confidenceWorstLength_stabilizedInterval_le_ofReal lemma confidenceWorstLength_stabilizedInterval_le_ofReal (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar delta alpha U : ℝ) (hupper : stabilizedWorstLength J n B beta kappa L cminus cplus pmin deltaBar delta alpha ≤ U) : confidenceWorstLength J n beta kappa L cminus cplus pmin (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha) ≤ ofReal U := by unfold stabilizedWorstLength at hupper unfold confidenceWorstLength apply sSup_le intro v hv rcases hv with ⟨P, hP, rfl⟩ letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance let f := fun z : Fin n → ClampObs J => intervalLength (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z) have hfmeas : Measurable f := stabilizedInterval_length_measurable J n B beta kappa L cminus cplus deltaBar delta alpha have hfnn : ∀ᵐ z ∂iidProduct P n, 0 ≤ f z := ae_of_all _ fun _ => le_max_left _ _ have hfint : Integrable f (iidProduct P n) := by refine Integrable.of_bound hfmeas.aestronglyMeasurable 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (le_max_left _ _)] exact stabilizedInterval_length_le_one J n B beta kappa L cminus cplus deltaBar delta alpha z simp_rw [intervalLengthENNReal] rw [← ofReal_integral_eq_lintegral_ofReal hfint hfnn] apply ENNReal.ofReal_le_ofReal have hbdd : BddAbove {v : ℝ | ∃ Q : ClampLaw J, ClampModel Q beta kappa L cminus cplus pmin ∧ IidSampling Q n ∧ v = ∫ z, intervalLength (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z) ∂iidProduct Q n} := by refine ⟨1, ?_⟩ rintro w ⟨Q, hQ, _hiid, rfl⟩ letI : IsProbabilityMeasure Q.dataMeasure := hQ.probability letI : IsProbabilityMeasure (iidProduct Q n) := by unfold iidProduct infer_instance have hqmeas := stabilizedInterval_length_measurable J n B beta kappa L cminus cplus deltaBar delta alpha have hqint : Integrable (fun z : Fin n → ClampObs J => intervalLength (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z)) (iidProduct Q n) := by refine Integrable.of_bound hqmeas.aestronglyMeasurable 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (le_max_left _ _)] exact stabilizedInterval_length_le_one J n B beta kappa L cminus cplus deltaBar delta alpha z have hmono := integral_mono_ae hqint (integrable_const 1) (ae_of_all _ fun z => stabilizedInterval_length_le_one J n B beta kappa L cminus cplus deltaBar delta alpha z) simpa using hmono have hmem : (∫ z, f z ∂iidProduct P n) ∈ {v : ℝ | ∃ Q : ClampLaw J, ClampModel Q beta kappa L cminus cplus pmin ∧ IidSampling Q n ∧ v = ∫ z, intervalLength (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z) ∂iidProduct Q n} := ⟨P, hP, clampModel_iidSampling hP, rfl⟩ exact (le_csSup hbdd hmem).trans hupper
CausalSmith.Stat.LmtpThresholdAtomFrontier.confidenceWorstLength_stabilizedInterval_le_ofReal · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:482
theorem observedMinimaxLength_le_confidenceWorstLength

Any uniformly honest concrete interval upper-bounds the observed minimax expected length by its own worst-case length. The result uses the hC condition. This is the stated conclusion.

Formal statement
J n :
beta kappa L cminus cplus pmin delta alpha :
hC :
UniformCoverage J n beta kappa L cminus cplus pmin delta alpha C
observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha
confidenceWorstLength J n beta kappa L cminus cplus pmin C
Proof (Lean source)
-- @node: observedMinimaxLength_le_confidenceWorstLength lemma observedMinimaxLength_le_confidenceWorstLength (J n : ℕ) (beta kappa L cminus cplus pmin delta alpha : ℝ) (C : ConfidenceProcedure n J) (hC : UniformCoverage J n beta kappa L cminus cplus pmin delta alpha C) : observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha ≤ confidenceWorstLength J n beta kappa L cminus cplus pmin C := by unfold observedMinimaxLength confidenceWorstLength apply sInf_le exact ⟨C, hC, rfl⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxLength_le_confidenceWorstLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:549
theorem causalStabilizedWorstRisk_eq_observed

Surjectivity and identification transport the concrete estimator's worst-case risk from the observed class to the full-data class. The result uses the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
StandardBorelRegularConditionalLaw_of_gate :
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
causalStabilizedWorstRisk J n B beta kappa L cminus cplus pmin deltaBar delta
= stabilizedWorstRisk J n B beta kappa L cminus cplus pmin deltaBar delta
Proof (Lean source)
-- @node: causalStabilizedWorstRisk_eq_observed lemma causalStabilizedWorstRisk_eq_observed (StandardBorelRegularConditionalLaw_of_gate : StandardBorelRegularConditionalLaw) (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : causalStabilizedWorstRisk J n B beta kappa L cminus cplus pmin deltaBar delta = stabilizedWorstRisk J n B beta kappa L cminus cplus pmin deltaBar delta := by have hsurj := (observed_margin_surjectivity StandardBorelRegularConditionalLaw_of_gate J beta kappa L cminus cplus pmin deltaBar alpha hreg).1 unfold causalStabilizedWorstRisk stabilizedWorstRisk congr 1 ext v constructor · rintro ⟨PF, hPF, rfl⟩ have hbridge := (causal_bridge J beta kappa L cminus cplus pmin deltaBar alpha PF hPF hreg).2.2 delta hdelta refine ⟨PF.observedMargin, hPF.observedModel, clampModel_iidSampling hPF.observedModel, ?_⟩ simp only [causalEstimatorRisk, estimatorRisk, stabilizedEstimatorRisk, hbridge.2.2.2] · rintro ⟨P, hP, _hiid, rfl⟩ rcases hsurj P hP with ⟨PF, hPF, rfl⟩ have hbridge := (causal_bridge J beta kappa L cminus cplus pmin deltaBar alpha PF hPF hreg).2.2 delta hdelta refine ⟨PF, hPF, ?_⟩ simp only [causalEstimatorRisk, estimatorRisk, stabilizedEstimatorRisk, hbridge.2.2.2]
CausalSmith.Stat.LmtpThresholdAtomFrontier.causalStabilizedWorstRisk_eq_observed · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:563
theorem causalStabilizedCoverage_eq_observed

Surjectivity and identification transport coverage of the concrete bias-aware interval. The result uses the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
StandardBorelRegularConditionalLaw_of_gate :
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
causalStabilizedCoverage J n B beta kappa L cminus cplus pmin deltaBar delta alpha
= stabilizedCoverage J n B beta kappa L cminus cplus pmin deltaBar delta alpha
Proof (Lean source)
-- @node: causalStabilizedCoverage_eq_observed lemma causalStabilizedCoverage_eq_observed (StandardBorelRegularConditionalLaw_of_gate : StandardBorelRegularConditionalLaw) (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : causalStabilizedCoverage J n B beta kappa L cminus cplus pmin deltaBar delta alpha = stabilizedCoverage J n B beta kappa L cminus cplus pmin deltaBar delta alpha := by have hsurj := (observed_margin_surjectivity StandardBorelRegularConditionalLaw_of_gate J beta kappa L cminus cplus pmin deltaBar alpha hreg).1 unfold causalStabilizedCoverage stabilizedCoverage congr 1 ext v constructor · rintro ⟨PF, hPF, rfl⟩ have hbridge := (causal_bridge J beta kappa L cminus cplus pmin deltaBar alpha PF hPF hreg).2.2 delta hdelta refine ⟨PF.observedMargin, hPF.observedModel, clampModel_iidSampling hPF.observedModel, ?_⟩ congr 2 ext z simp only [hbridge.2.2.2] · rintro ⟨P, hP, _hiid, rfl⟩ rcases hsurj P hP with ⟨PF, hPF, rfl⟩ have hbridge := (causal_bridge J beta kappa L cminus cplus pmin deltaBar alpha PF hPF hreg).2.2 delta hdelta refine ⟨PF, hPF, ?_⟩ congr 2 ext z simp only [hbridge.2.2.2]
CausalSmith.Stat.LmtpThresholdAtomFrontier.causalStabilizedCoverage_eq_observed · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:598
theorem causalStabilizedWorstLength_eq_confidenceWorstLength

Expected interval length depends only on the observed margin, so surjectivity transports its worst case without any target calculation. The result uses the hreg condition. This is the stated conclusion.

Formal statement
StandardBorelRegularConditionalLaw_of_gate :
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
causalStabilizedWorstLength J n B beta kappa L cminus cplus pmin deltaBar delta alpha
= confidenceWorstLength J n beta kappa L cminus cplus pmin (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha)
Proof (Lean source)
-- @node: causalStabilizedWorstLength_eq_confidenceWorstLength lemma causalStabilizedWorstLength_eq_confidenceWorstLength (StandardBorelRegularConditionalLaw_of_gate : StandardBorelRegularConditionalLaw) (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : causalStabilizedWorstLength J n B beta kappa L cminus cplus pmin deltaBar delta alpha = confidenceWorstLength J n beta kappa L cminus cplus pmin (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha) := by have hsurj := (observed_margin_surjectivity StandardBorelRegularConditionalLaw_of_gate J beta kappa L cminus cplus pmin deltaBar alpha hreg).1 unfold causalStabilizedWorstLength confidenceWorstLength congr 1 ext v constructor · rintro ⟨PF, hPF, rfl⟩ exact ⟨PF.observedMargin, hPF.observedModel, rfl⟩ · rintro ⟨P, hP, rfl⟩ rcases hsurj P hP with ⟨PF, hPF, rfl⟩ exact ⟨PF, hPF, rfl⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.causalStabilizedWorstLength_eq_confidenceWorstLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:635
theorem causal_frontier_lift Theorem 4 in the paper ↗

Identification transports both observed brackets to the full-data class; the same observed estimator and interval attain both causal frontiers. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ c C : ℝ,
0 < c
c < C
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
Bseq :
∀ n
SplitBlocks n, ∀ᶠ n in atTop, let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r := clampFrontier n delta kappa h beta let crit := causalFrontierCriteria J n beta kappa L cminus cplus pmin deltaBar delta alpha ObservedMeasurableEstimator (n := n) (J := J) (fun z : Fin n → ClampObs J => totalGramEstimator (Bseq n) z (ellOf beta) kappa cminus cplus delta h) ∧ ObservedMeasurableInterval (n := n) (J := J) (stabilizedInterval (J := J) (Bseq n) beta kappa L cminus cplus deltaBar delta alpha) ∧ c * r
≤ crit.1 ∧
crit.1
causalStabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta
causalStabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta
≤ C * r ∧
1 - alpha
causalStabilizedCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha ∧
causalStabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha
ofReal (C * r) ∧
ofReal (c * r) ≤ crit.2 ∧
crit.2 ≤ ofReal (C * r)
Proof (Lean source)
-- @node: thm:causal-frontier-lift theorem causal_frontier_lift (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ c C : ℝ, 0 < c ∧ c < C ∧ ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → ∀ Bseq : ∀ n, SplitBlocks n, ∀ᶠ n in atTop, let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r := clampFrontier n delta kappa h beta let crit := causalFrontierCriteria J n beta kappa L cminus cplus pmin deltaBar delta alpha ObservedMeasurableEstimator (n := n) (J := J) (fun z : Fin n → ClampObs J => totalGramEstimator (Bseq n) z (ellOf beta) kappa cminus cplus delta h) ∧ ObservedMeasurableInterval (n := n) (J := J) (stabilizedInterval (J := J) (Bseq n) beta kappa L cminus cplus deltaBar delta alpha) ∧ c * r ≤ crit.1 ∧ crit.1 ≤ causalStabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta ∧ causalStabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta ≤ C * r ∧ 1 - alpha ≤ causalStabilizedCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha ∧ causalStabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha ≤ ofReal (C * r) ∧ ofReal (c * r) ≤ crit.2 ∧ crit.2 ≤ ofReal (C * r) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha_half⟩ have hreg' : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha := ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha_half⟩ have hgate : StandardBorelRegularConditionalLaw.{0, 0} := by exact standardBorelRegularConditionalLaw_mathlib.{0, 0} rcases clamp_minimax_risk J beta kappa L cminus cplus pmin deltaBar alpha hreg' with ⟨cRisk, CRisk, amplitude, hcRisk, hcRiskC, hamp, hamp_le, hRisk⟩ rcases honest_coverage_and_length J beta kappa L cminus cplus pmin deltaBar alpha hreg' with ⟨cLen, CLen, hcLen, hcLenC, hLength⟩ let c := min cRisk cLen let C := max CRisk CLen have hc : 0 < c := lt_min hcRisk hcLen have hcC : c < C := lt_of_le_of_lt (min_le_left _ _) (hcRiskC.trans_le (le_max_left _ _)) refine ⟨c, C, hc, hcC, ?_⟩ intro deltaSeq hdeltaSeq Bseq have hBand := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar, hdeltaBar1⟩ deltaSeq hdeltaSeq have hRisk' := hRisk deltaSeq hdeltaSeq Bseq have hLength' := hLength deltaSeq hdeltaSeq Bseq filter_upwards [hRisk', hLength', hBand, eventually_ge_atTop 4] with n hnRisk hnLength hnBand hn4 dsimp only at hnRisk hnLength ⊢ let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r := clampFrontier n delta kappa h beta have hdelta : delta ∈ Icc (0 : ℝ) deltaBar := hdeltaSeq n have hupper : delta + infoBandwidth n delta beta kappa deltaBar ≤ 1 := by dsimp [delta] linarith [hdelta.2, hnBand.2.1] have hr : 0 ≤ r := by dsimp [r, clampFrontier, h, delta] exact add_nonneg (Real.rpow_nonneg (Nat.cast_nonneg n) _) (mul_nonneg (Real.rpow_nonneg hdelta.1 _) (Real.rpow_nonneg hnBand.1.le _)) have hcRisk' : c ≤ cRisk := min_le_left _ _ have hcLen' : c ≤ cLen := min_le_right _ _ have hCRisk : CRisk ≤ C := le_max_left _ _ have hCLen : CLen ≤ C := le_max_right _ _ have hcrit := (observed_margin_surjectivity hgate J beta kappa L cminus cplus pmin deltaBar alpha hreg').2 n delta hdelta have hriskEq := causalStabilizedWorstRisk_eq_observed hgate J n (Bseq n) beta kappa L cminus cplus pmin deltaBar alpha delta hreg' hdelta have hcovEq := causalStabilizedCoverage_eq_observed hgate J n (Bseq n) beta kappa L cminus cplus pmin deltaBar alpha delta hreg' hdelta have hmeasEst : ObservedMeasurableEstimator (fun z : Fin n → ClampObs J => totalGramEstimator (Bseq n) z (ellOf beta) kappa cminus cplus delta h) := by exact totalGramEstimator_measurable (Bseq n) kappa cminus cplus delta h have hmeasInt := stabilizedInterval_observedMeasurable J n (Bseq n) beta kappa L cminus cplus pmin deltaBar alpha delta hreg' hn4 hnBand.1.le have huniform := stabilizedInterval_uniformCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha hreg' hn4 hdelta hnBand.1 hupper have hlenExt := confidenceWorstLength_stabilizedInterval_le_ofReal J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha (CLen * r) hnLength.2.2.1 have hlenC : confidenceWorstLength J n beta kappa L cminus cplus pmin (stabilizedInterval (Bseq n) beta kappa L cminus cplus deltaBar delta alpha) ≤ ofReal (C * r) := hlenExt.trans (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hCLen hr)) have hminUpper := observedMinimaxLength_le_confidenceWorstLength J n beta kappa L cminus cplus pmin delta alpha _ huniform refine ⟨hmeasEst, hmeasInt, ?_, ?_, ?_, ?_, ?_, ?_, ?_⟩ · rw [hcrit.1] exact (mul_le_mul_of_nonneg_right hcRisk' hr).trans hnRisk.1 · rw [hcrit.1, hriskEq] exact hnRisk.2.1 · rw [hriskEq] exact hnRisk.2.2.1.trans (mul_le_mul_of_nonneg_right hCRisk hr) · rw [hcovEq] exact hnLength.1 · rw [causalStabilizedWorstLength_eq_confidenceWorstLength hgate J n (Bseq n) beta kappa L cminus cplus pmin deltaBar alpha delta hreg'] exact hlenC · rw [hcrit.2] exact (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hcLen' hr)).trans hnLength.2.2.2.1 · rw [hcrit.2] exact hminUpper.trans hlenC
CausalSmith.Stat.LmtpThresholdAtomFrontier.causal_frontier_lift · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TCausalFrontierLift.lean:661
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.THonestLength 24 declarations The statement gives finite-sample eventual uniform coverage, expected-length control for the concrete atom-fallback interval, and a converse for every uniformly honest confidence procedure.

Uniformly honest confidence length frontier

The statement gives finite-sample eventual uniform coverage, expected-length control for the concrete atom-fallback interval, and a converse for every uniformly honest confidence procedure.

The paper's confidence procedure at a fixed sample size.

Definition (Lean source)
n :
shared
J :
shared
B :
beta kappa L cminus cplus deltaBar delta alpha :
stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha :
fun z
=> honestInterval B z (ellOf beta) beta kappa L cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) alpha
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedInterval · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:36

Worst-case coverage of the concrete interval over i.i.d. model laws.

Definition (Lean source)
J n :
B :
beta kappa L cminus cplus pmin deltaBar delta alpha :
stabilizedCoverage J n B beta kappa L cminus cplus pmin deltaBar delta alpha :
sInf {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ IidSampling P n ∧ v = (iidProduct P n).real {z | clampFunctional P delta ∈ stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z}}
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedCoverage · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:42

Worst-case expected length of the concrete interval.

Definition (Lean source)
J n :
B :
beta kappa L cminus cplus pmin deltaBar delta alpha :
stabilizedWorstLength J n B beta kappa L cminus cplus pmin deltaBar delta alpha :
sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ IidSampling P n ∧ v = ∫ z, intervalLength (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z) ∂iidProduct P n}
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedWorstLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:51

Worst-case expected length of any given confidence procedure.

Definition (Lean source)
J n :
beta kappa L cminus cplus pmin :
confidenceWorstLength J n beta kappa L cminus cplus pmin C :
ℝ≥0∞
sSup {v : ℝ≥0∞ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ v = ∫⁻ z, intervalLengthENNReal (C z) ∂iidProduct P n}
CausalSmith.Stat.LmtpThresholdAtomFrontier.confidenceWorstLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:60
theorem stabilizedCoverage_ge

The modelwise finite-sample coverage inequality passes through the worst-model infimum defining the paper's concrete coverage criterion. The result uses the hreg condition, the hn condition, the hdelta condition, the hh condition, the hupper condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar delta alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hn :
4 ≤ n
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hh :
0 < infoBandwidth n delta beta kappa deltaBar
hupper :
delta + infoBandwidth n delta beta kappa deltaBar ≤ 1
1 - alpha ≤ stabilizedCoverage J n B beta kappa L cminus cplus pmin deltaBar delta alpha
Proof (Lean source)
lemma stabilizedCoverage_ge (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar delta alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hn : 4 ≤ n) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hh : 0 < infoBandwidth n delta beta kappa deltaBar) (hupper : delta + infoBandwidth n delta beta kappa deltaBar ≤ 1) : 1 - alpha ≤ stabilizedCoverage J n B beta kappa L cminus cplus pmin deltaBar delta alpha := by have hreg' := hreg rcases hreg' with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminusK, hcplus, hpmin, hpminJ, hdbar, hdbar1, ha, ha1⟩ unfold stabilizedCoverage apply le_csInf · let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) have hP0 : ClampModel P0 beta kappa L cminus cplus pmin := minimaxCenter_mem_model J beta kappa L cminus cplus pmin deltaBar alpha hreg exact ⟨(iidProduct P0 n).real {z | clampFunctional P0 delta ∈ stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha z}, P0, hP0, clampModel_iidSampling hP0, rfl⟩ · intro v hv rcases hv with ⟨P, hP, _hiid, rfl⟩ simpa [stabilizedInterval] using honestInterval_coverage_model P B beta kappa L cminus cplus pmin delta (infoBandwidth n delta beta kappa deltaBar) alpha hP hJ hbeta hL ha ha1 hn hdelta.1 hupper hh (totalGram_lambdaStar_pos J beta kappa L cminus cplus pmin deltaBar alpha hreg)
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedCoverage_ge · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:67
theorem stabilizedInterval_uniformCoverage Lemma stabilizedInterval_uniformCoverage in the paper ↗

The concrete stabilized interval is an admissible uniformly covering procedure at every sample size where the bandwidth lies inside the design support. The result uses the hreg condition, the hn condition, the hdelta condition, the hh condition, the hupper condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar delta alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hn :
4 ≤ n
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hh :
0 < infoBandwidth n delta beta kappa deltaBar
hupper :
delta + infoBandwidth n delta beta kappa deltaBar ≤ 1
UniformCoverage J n beta kappa L cminus cplus pmin delta alpha (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha)
Proof (Lean source)
lemma stabilizedInterval_uniformCoverage (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar delta alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hn : 4 ≤ n) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hh : 0 < infoBandwidth n delta beta kappa deltaBar) (hupper : delta + infoBandwidth n delta beta kappa deltaBar ≤ 1) : UniformCoverage J n beta kappa L cminus cplus pmin delta alpha (stabilizedInterval B beta kappa L cminus cplus deltaBar delta alpha) := by constructor · exact honestInterval_observedMeasurable J n B beta kappa L cminus cplus pmin deltaBar alpha delta hreg hn hh.le · intro P hP have hreg' := hreg rcases hreg' with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminusK, hcplus, hpmin, hpminJ, hdbar, hdbar1, ha, ha1⟩ simpa [stabilizedInterval] using honestInterval_coverage_model P B beta kappa L cminus cplus pmin delta (infoBandwidth n delta beta kappa deltaBar) alpha hP hJ hbeta hL ha ha1 hn hdelta.1 hupper hh (totalGram_lambdaStar_pos J beta kappa L cminus cplus pmin deltaBar alpha hreg)
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedInterval_uniformCoverage · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:98
theorem honest_coverage_and_length Theorem 2 in the paper ↗

The bias-aware interval is uniformly honest and rate-optimal in worst-case expected length, including singular-Gram samples via its atom fallback. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ c C : ℝ,
0 < c
c < C
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
Bseq :
∀ n
SplitBlocks n, ∀ᶠ n in atTop, let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r := clampFrontier n delta kappa h beta 1
- alpha
stabilizedCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha ∧
c * r
stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha ∧
stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha
≤ C * r ∧
ofReal (c * r)
observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha ∧
∀ Cn : ConfidenceProcedure n J,
UniformCoverage J n beta kappa L cminus cplus pmin delta alpha Cn → ofReal (c * r)
confidenceWorstLength J n beta kappa L cminus cplus pmin Cn
Proof (Lean source)
-- @node: thm:honest-length theorem honest_coverage_and_length (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ c C : ℝ, 0 < c ∧ c < C ∧ ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → ∀ Bseq : ∀ n, SplitBlocks n, ∀ᶠ n in atTop, let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r := clampFrontier n delta kappa h beta 1 - alpha ≤ stabilizedCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha ∧ c * r ≤ stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha ∧ stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha ≤ C * r ∧ ofReal (c * r) ≤ observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha ∧ ∀ Cn : ConfidenceProcedure n J, UniformCoverage J n beta kappa L cminus cplus pmin delta alpha Cn → ofReal (c * r) ≤ confidenceWorstLength J n beta kappa L cminus cplus pmin Cn := by obtain ⟨Cu, hCu, huRaw⟩ := honestInterval_worstLength_eventually_le_frontier J beta kappa L cminus cplus pmin deltaBar alpha hreg have hu : ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → ∀ Bseq : ∀ n, SplitBlocks n, ∀ᶠ n in atTop, stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar (deltaSeq n) alpha ≤ Cu * clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta := by intro deltaSeq hdelta Bseq simpa [stabilizedWorstLength, stabilizedInterval] using huRaw deltaSeq hdelta Bseq obtain ⟨co, hco, ho⟩ := observedMinimaxLength_eventually_ge_frontier J beta kappa L cminus cplus pmin deltaBar alpha hreg obtain ⟨cp, hcp, hp⟩ := procedureWorstLength_eventually_ge_frontier J beta kappa L cminus cplus pmin deltaBar alpha hreg let c := min co cp / 2 let C := Cu + c + 1 have hc : 0 < c := by dsimp [c]; positivity have hcC : c < C := by dsimp [C]; linarith refine ⟨c, C, hc, hcC, ?_⟩ intro deltaSeq hdelta Bseq have hbal := infoBandwidth_eventually_balance beta kappa deltaBar hreg.2.1 hreg.2.2.1 ⟨hreg.2.2.2.2.2.2.2.2.2.1, hreg.2.2.2.2.2.2.2.2.2.2.1⟩ deltaSeq hdelta filter_upwards [hu deltaSeq hdelta Bseq, ho deltaSeq hdelta, hp deltaSeq hdelta, hbal, eventually_ge_atTop 8] with n hun hon hpn hbn hn let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r := clampFrontier n delta kappa h beta have hdeltaN : delta ∈ Icc (0 : ℝ) deltaBar := hdelta n have hh : 0 < h := by simpa [h, delta] using hbn.1 have hupper : delta + h ≤ 1 := by have := hbn.2.1 dsimp [h, delta] linarith [hdeltaN.2] have hrpos : 0 < r := by dsimp [r, clampFrontier] exact add_pos_of_pos_of_nonneg (Real.rpow_pos_of_pos (by exact_mod_cast (show 0 < n by omega)) _) (mul_nonneg (Real.rpow_nonneg hdeltaN.1 _) (Real.rpow_nonneg hh.le _)) have hr : 0 ≤ r := hrpos.le have hcov : 1 - alpha ≤ stabilizedCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha := stabilizedCoverage_ge J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha hreg (by omega) hdeltaN (by simpa [h]) (by simpa [h] using hupper) have hUC : UniformCoverage J n beta kappa L cminus cplus pmin delta alpha (stabilizedInterval (Bseq n) beta kappa L cminus cplus deltaBar delta alpha) := stabilizedInterval_uniformCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha hreg (by omega) hdeltaN (by simpa [h]) (by simpa [h] using hupper) have hc_co : c ≤ co := by dsimp [c] have hm := min_le_left co cp nlinarith [hco] have hc_cp : c ≤ cp := by dsimp [c] have hm := min_le_right co cp nlinarith [hcp] have hobs : ofReal (c * r) ≤ observedMinimaxLength J n beta kappa L cminus cplus pmin delta alpha := by exact (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hc_co hr)).trans (by simpa [r, h, delta] using hon) have hconcreteENN : ofReal (c * r) ≤ ofReal (stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha) := by calc _ ≤ ofReal (cp * r) := ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hc_cp hr) _ ≤ clampProcedureWorstLength J n beta kappa L cminus cplus pmin (stabilizedInterval (Bseq n) beta kappa L cminus cplus deltaBar delta alpha) := by simpa [r, h, delta] using hpn _ hUC _ ≤ _ := by apply clampProcedureWorstLength_honestInterval_le_ofReal rfl have hswpos : 0 < stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha := by apply ENNReal.ofReal_pos.mp exact (ENNReal.ofReal_pos.2 (mul_pos hc hrpos)).trans_le hconcreteENN have hconcrete : c * r ≤ stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha := (ENNReal.ofReal_le_ofReal_iff hswpos.le).mp hconcreteENN have huC : stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha ≤ C * r := by have hCuC : Cu ≤ C := by dsimp [C]; linarith have hun' : stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta alpha ≤ Cu * r := by simpa [r, h, delta] using hun exact hun'.trans (mul_le_mul_of_nonneg_right hCuC hr) refine ⟨hcov, hconcrete, huC, hobs, ?_⟩ intro Cn hCn have hpc := hpn Cn hCn exact (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hc_cp hr)).trans (by simpa [confidenceWorstLength, clampProcedureWorstLength, r, h, delta] using hpc)
CausalSmith.Stat.LmtpThresholdAtomFrontier.honest_coverage_and_length · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:124

Worst-case continuity-only risk of the fixed one-half fallback estimator.

Definition (Lean source)
J n :
B :
kappa cminus cplus pmin deltaBar delta :
contStabilizedWorstRisk J n B kappa cminus cplus pmin deltaBar delta :
sSup {v : ℝ | ∃ (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar), IidSampling P n ∧ v = contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP (contFallbackEstimator B · delta)}
CausalSmith.Stat.LmtpThresholdAtomFrontier.contStabilizedWorstRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:241

Worst-case coverage of the continuity-only Hoeffding interval.

Definition (Lean source)
J n :
B :
kappa cminus cplus pmin deltaBar delta alpha :
contStabilizedCoverage J n B kappa cminus cplus pmin deltaBar delta alpha :
sInf {v : ℝ | ∃ (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar), IidSampling P n ∧ v = (iidProduct P n).real {z | contClampFunctional P kappa cminus cplus pmin deltaBar hP delta ∈ contHoeffdingInterval B z delta alpha}}
CausalSmith.Stat.LmtpThresholdAtomFrontier.contStabilizedCoverage · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:250

Worst-case extended expected length of the continuity-only interval.

Definition (Lean source)
J n :
B :
kappa cminus cplus pmin deltaBar delta alpha :
contStabilizedWorstLength J n B kappa cminus cplus pmin deltaBar delta alpha :
ℝ≥0∞
sSup {v : ℝ≥0∞ | ∃ (P : ClampLaw J) (_hP : ContClampModel P kappa cminus cplus pmin deltaBar), IidSampling P n ∧ v = ∫⁻ z, intervalLengthENNReal (contHoeffdingInterval B z delta alpha) ∂iidProduct P n}
CausalSmith.Stat.LmtpThresholdAtomFrontier.contStabilizedWorstLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:260

Worst-case causal risk of the same continuity-only observed-sample fallback estimator, over law-specific latent carriers.

Definition (Lean source)
J n :
B :
kappa cminus cplus pmin deltaBar delta :
contCausalStabilizedWorstRisk J n B kappa cminus cplus pmin deltaBar delta :
sSup {v : ℝ | ∃ (PF : FullDataLaw J) (_hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar), v = causalEstimatorRisk PF n delta (contFallbackEstimator B · delta)}
CausalSmith.Stat.LmtpThresholdAtomFrontier.contCausalStabilizedWorstRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:269

Worst-case causal coverage of the same continuity-only interval, over law-specific latent carriers.

Definition (Lean source)
J n :
B :
kappa cminus cplus pmin deltaBar delta alpha :
contCausalStabilizedCoverage J n B kappa cminus cplus pmin deltaBar delta alpha :
sInf {v : ℝ | ∃ (PF : FullDataLaw J) (_hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar), v = (iidProduct PF.observedMargin n).real {z | causalClampMean PF delta ∈ contHoeffdingInterval B z delta alpha}}
CausalSmith.Stat.LmtpThresholdAtomFrontier.contCausalStabilizedCoverage · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:277

Worst-case causal expected length of the same continuity-only interval, over law-specific latent carriers.

Definition (Lean source)
J n :
B :
kappa cminus cplus pmin deltaBar delta alpha :
contCausalStabilizedWorstLength J n B kappa cminus cplus pmin deltaBar delta alpha :
ℝ≥0∞
sSup {v : ℝ≥0∞ | ∃ (PF : FullDataLaw J) (_hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar), v = ∫⁻ z, intervalLengthENNReal (contHoeffdingInterval B z delta alpha) ∂iidProduct PF.observedMargin n}
CausalSmith.Stat.LmtpThresholdAtomFrontier.contCausalStabilizedWorstLength · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:286
theorem contFallbackEstimator_admissible

The fixed-fallback estimator is measurable and remains in the outcome range. This is the stated conclusion.

Formal statement
J n :
B :
delta :
conclusion 1
conclusion 2
z :
Fin n → ClampObs J
contFallbackEstimator B z delta ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma contFallbackEstimator_admissible {J n : ℕ} (B : SplitBlocks n) (delta : ℝ) : ObservedMeasurableEstimator (fun z : Fin n → ClampObs J => contFallbackEstimator B z delta) ∧ ∀ z : Fin n → ClampObs J, contFallbackEstimator B z delta ∈ Icc (0 : ℝ) 1 := by constructor · unfold ObservedMeasurableEstimator contFallbackEstimator apply clampUnit_measurable'.comp exact (retainedEstimate_measurable B delta).add (measurable_const.mul (Finset.measurable_fun_sum _ fun x _ => atomEstimate_measurable B x delta)) · intro z exact clampUnit_mem_Icc _
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFallbackEstimator_admissible · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:295
theorem contCausalStabilizedWorstRisk_eq_observed

Surjectivity and identification equate the concrete observed and causal worst-case risks. The result uses the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
J n :
B :
kappa cminus cplus pmin deltaBar delta alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
contCausalStabilizedWorstRisk J n B kappa cminus cplus pmin deltaBar delta
= contStabilizedWorstRisk J n B kappa cminus cplus pmin deltaBar delta
Proof (Lean source)
lemma contCausalStabilizedWorstRisk_eq_observed (J n : ℕ) (B : SplitBlocks n) (kappa cminus cplus pmin deltaBar delta alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : contCausalStabilizedWorstRisk J n B kappa cminus cplus pmin deltaBar delta = contStabilizedWorstRisk J n B kappa cminus cplus pmin deltaBar delta := by unfold contCausalStabilizedWorstRisk contStabilizedWorstRisk apply congrArg sSup ext v constructor · rintro ⟨PF, hPF, rfl⟩ refine ⟨PF.observedMargin, hPF.observedModel, contClampModel_iidSampling hPF.observedModel, ?_⟩ exact causalEstimatorRisk_eq_contEstimatorRisk J n kappa cminus cplus pmin deltaBar delta hreg.1 hdelta PF hPF _ · rintro ⟨P, hP, _hiid, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := exists_fullData_cont_lift P hP hreg.1.2.2.2.2.2.1 subst P refine ⟨PF, hPF, ?_⟩ exact (causalEstimatorRisk_eq_contEstimatorRisk J n kappa cminus cplus pmin deltaBar delta hreg.1 hdelta PF hPF _).symm
CausalSmith.Stat.LmtpThresholdAtomFrontier.contCausalStabilizedWorstRisk_eq_observed · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:313
theorem contCausalStabilizedCoverage_eq_observed

Surjectivity and identification equate the concrete observed and causal worst-case coverages. The result uses the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
J n :
B :
kappa cminus cplus pmin deltaBar delta alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
contCausalStabilizedCoverage J n B kappa cminus cplus pmin deltaBar delta alpha
= contStabilizedCoverage J n B kappa cminus cplus pmin deltaBar delta alpha
Proof (Lean source)
lemma contCausalStabilizedCoverage_eq_observed (J n : ℕ) (B : SplitBlocks n) (kappa cminus cplus pmin deltaBar delta alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : contCausalStabilizedCoverage J n B kappa cminus cplus pmin deltaBar delta alpha = contStabilizedCoverage J n B kappa cminus cplus pmin deltaBar delta alpha := by have htarget (PF : FullDataLaw J) (hPF : ContFullDataClampModel PF kappa cminus cplus pmin deltaBar) : causalClampMean PF delta = contClampFunctional PF.observedMargin kappa cminus cplus pmin deltaBar hPF.observedModel delta := (continuity_causal_bridge J kappa cminus cplus pmin deltaBar PF hPF hreg.1).2 delta hdelta unfold contCausalStabilizedCoverage contStabilizedCoverage apply congrArg sInf ext v constructor · rintro ⟨PF, hPF, rfl⟩ refine ⟨PF.observedMargin, hPF.observedModel, contClampModel_iidSampling hPF.observedModel, ?_⟩ rw [htarget PF hPF] · rintro ⟨P, hP, _hiid, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := exists_fullData_cont_lift P hP hreg.1.2.2.2.2.2.1 subst P refine ⟨PF, hPF, ?_⟩ rw [htarget PF hPF]
CausalSmith.Stat.LmtpThresholdAtomFrontier.contCausalStabilizedCoverage_eq_observed · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:340
theorem contCausalStabilizedWorstLength_eq_observed

Surjectivity equates the concrete observed and causal worst-case expected lengths. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J n :
B :
kappa cminus cplus pmin deltaBar delta alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
contCausalStabilizedWorstLength J n B kappa cminus cplus pmin deltaBar delta alpha
= contStabilizedWorstLength J n B kappa cminus cplus pmin deltaBar delta alpha
Proof (Lean source)
lemma contCausalStabilizedWorstLength_eq_observed (J n : ℕ) (B : SplitBlocks n) (kappa cminus cplus pmin deltaBar delta alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : contCausalStabilizedWorstLength J n B kappa cminus cplus pmin deltaBar delta alpha = contStabilizedWorstLength J n B kappa cminus cplus pmin deltaBar delta alpha := by unfold contCausalStabilizedWorstLength contStabilizedWorstLength apply congrArg sSup ext v constructor · rintro ⟨PF, hPF, rfl⟩ exact ⟨PF.observedMargin, hPF.observedModel, contClampModel_iidSampling hPF.observedModel, rfl⟩ · rintro ⟨P, hP, _hiid, rfl⟩ obtain ⟨PF, hPF, hmargin⟩ := exists_fullData_cont_lift P hP hreg.1.2.2.2.2.2.1 exact ⟨PF, hPF, by rw [hmargin]⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.contCausalStabilizedWorstLength_eq_observed · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:371
theorem contFrontierCriteria_risk_le_stabilized

The fixed fallback is an admissible competitor for the observed minimax risk criterion. The result uses the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
J n :
B :
kappa cminus cplus pmin deltaBar delta alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
(contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha).1
contStabilizedWorstRisk J n B kappa cminus cplus pmin deltaBar delta
Proof (Lean source)
lemma contFrontierCriteria_risk_le_stabilized (J n : ℕ) (B : SplitBlocks n) (kappa cminus cplus pmin deltaBar delta alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) : (contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha).1 ≤ contStabilizedWorstRisk J n B kappa cminus cplus pmin deltaBar delta := by simp only [contFrontierCriteria, fst] unfold contStabilizedWorstRisk let outer : Set ℝ := {r : ℝ | ∃ est : Estimator n J, ObservedMeasurableEstimator est ∧ (∀ z, est z ∈ Icc (0 : ℝ) 1) ∧ r = sSup {v : ℝ | ∃ (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar), v = contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP est}} change sInf outer ≤ _ have houterBelow : BddBelow outer := by refine ⟨0, ?_⟩ rintro r ⟨est, hmeas, hrange, rfl⟩ let risks : Set ℝ := {v : ℝ | ∃ (P : ClampLaw J) (hP : ContClampModel P kappa cminus cplus pmin deltaBar), v = contEstimatorRisk P n kappa cminus cplus pmin deltaBar delta hP est} have hbdd : BddAbove risks := by refine ⟨1, ?_⟩ rintro v ⟨P, hP, rfl⟩ letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct; infer_instance let target := contClampFunctional P kappa cminus cplus pmin deltaBar hP delta have ht := contClampFunctional_mem_Icc P kappa cminus cplus pmin deltaBar delta hP hreg.1 hdelta have hpoint (z : Fin n → ClampObs J) : |est z - target| ≤ 1 := by rw [abs_le] dsimp [target] constructor <;> linarith [(hrange z).1, (hrange z).2, ht.1, ht.2] unfold contEstimatorRisk change (∫ z, |est z - target| ∂iidProduct P n) ≤ 1 have hmono := integral_mono_ae (Integrable.of_bound ((hmeas.sub (measurable_const : Measurable (fun _ : Fin n → ClampObs J => target))).abs.aestronglyMeasurable) 1 (ae_of_all _ fun z => by rw [Real.norm_eq_abs, abs_abs] exact hpoint z)) (integrable_const (μ := iidProduct P n) 1) (ae_of_all _ hpoint) simpa using hmono let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) have hP0 : ContClampModel P0 kappa cminus cplus pmin deltaBar := minimaxClampModel_continuous J kappa cminus cplus pmin deltaBar hreg.1.1 hreg.1.2.1 hreg.1.2.2.2.1 hreg.1.2.2.2.2.1 hreg.1.2.2.2.2.2.2.1 (fun _ => 0) measurable_const (fun _ => by norm_num) continuous_const.continuousOn have hnon : 0 ≤ contEstimatorRisk P0 n kappa cminus cplus pmin deltaBar delta hP0 est := by unfold contEstimatorRisk exact integral_nonneg_of_ae (ae_of_all _ fun z => abs_nonneg _) exact hnon.trans (le_csSup hbdd ⟨P0, hP0, rfl⟩) apply csInf_le houterBelow refine ⟨(fun z => contFallbackEstimator B z delta), (contFallbackEstimator_admissible B delta).1, (contFallbackEstimator_admissible B delta).2, ?_⟩ apply congrArg sSup ext v constructor · rintro ⟨P, hP, _hiid, hv⟩ exact ⟨P, hP, hv⟩ · rintro ⟨P, hP, hv⟩ exact ⟨P, hP, contClampModel_iidSampling hP, hv⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFrontierCriteria_risk_le_stabilized · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:392
theorem contStabilizedCoverage_ge

The concrete continuity interval has uniform finite-sample coverage once both deterministic blocks are nonempty. The result uses the HoeffdingBoundedAverage_of_gate condition, the hreg condition, the hdelta condition, the hcard0 condition, the hcard1 condition. This is the stated conclusion.

Formal statement
HoeffdingBoundedAverage_of_gate :
J n :
B :
kappa cminus cplus pmin deltaBar delta alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
hdelta :
delta ∈ Icc (0 : ℝ) deltaBar
hcard0 :
0 < B.I0.card
hcard1 :
0 < B.I1.card
1 - alpha ≤ contStabilizedCoverage J n B kappa cminus cplus pmin deltaBar delta alpha
Proof (Lean source)
lemma contStabilizedCoverage_ge (HoeffdingBoundedAverage_of_gate : HoeffdingBoundedAverage) (J n : ℕ) (B : SplitBlocks n) (kappa cminus cplus pmin deltaBar delta alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) (hdelta : delta ∈ Icc (0 : ℝ) deltaBar) (hcard0 : 0 < B.I0.card) (hcard1 : 0 < B.I1.card) : 1 - alpha ≤ contStabilizedCoverage J n B kappa cminus cplus pmin deltaBar delta alpha := by unfold contStabilizedCoverage apply le_csInf · let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) have hP0 : ContClampModel P0 kappa cminus cplus pmin deltaBar := minimaxClampModel_continuous J kappa cminus cplus pmin deltaBar hreg.1.1 hreg.1.2.1 hreg.1.2.2.2.1 hreg.1.2.2.2.2.1 hreg.1.2.2.2.2.2.2.1 (fun _ => 0) measurable_const (fun _ => by norm_num) continuous_const.continuousOn exact ⟨(iidProduct P0 n).real {z | contClampFunctional P0 kappa cminus cplus pmin deltaBar hP0 delta ∈ contHoeffdingInterval B z delta alpha}, P0, hP0, contClampModel_iidSampling hP0, rfl⟩ · intro v hv rcases hv with ⟨P, hP, _hiid, rfl⟩ exact contHoeffdingInterval_coverage_model HoeffdingBoundedAverage_of_gate P B kappa cminus cplus pmin deltaBar delta alpha hP hreg hdelta hcard0 hcard1
CausalSmith.Stat.LmtpThresholdAtomFrontier.contStabilizedCoverage_ge · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:462
theorem contStabilizedWorstRisk_eventually_le_frontier

The concrete fixed-fallback worst-case risk attains the continuity rate. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
∃ C : ℝ,
0 < C
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
Bseq :
∀ n
SplitBlocks n, ∀ᶠ n : ℕ in atTop, contStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar (deltaSeq n)
≤ C * contFrontier n (deltaSeq n) kappa
Proof (Lean source)
lemma contStabilizedWorstRisk_eventually_le_frontier (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : ∃ C : ℝ, 0 < C ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ Bseq : ∀ n, SplitBlocks n, ∀ᶠ n : ℕ in atTop, contStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar (deltaSeq n) ≤ C * contFrontier n (deltaSeq n) kappa := by let C : ℝ := 3 * (1 + (J : ℝ)) * (1 + cplus / (kappa + 1)) have hk1 : 0 < kappa + 1 := by linarith [hreg.1.2.1] have hcplus0 : 0 < cplus := hk1.trans_le hreg.1.2.2.2.2.1 have hC : 0 < C := by dsimp [C]; positivity refine ⟨C, hC, ?_⟩ intro deltaSeq hdelta Bseq filter_upwards [eventually_ge_atTop 8] with n hn have hnpos : 0 < n := by omega have hcard0 : 0 < (Bseq n).I0.card := by have := (Bseq n).card_I0 omega have hcard1 : 0 < (Bseq n).I1.card := by have := (Bseq n).card_I1 omega let root : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) let atom : ℝ := (deltaSeq n) ^ (kappa + 1) have hroot : 0 ≤ root := Real.rpow_nonneg (Nat.cast_nonneg n) _ have hatom : 0 ≤ atom := Real.rpow_nonneg (hdelta n).1 _ have hsqrt0 : sqrt ((Bseq n).I0.card : ℝ)⁻¹ ≤ 3 * root := by apply splitBlock_invSqrt_le_root hnpos have := (Bseq n).card_I0 omega have hsqrt1 : sqrt ((Bseq n).I1.card : ℝ)⁻¹ ≤ 3 * root := by apply splitBlock_invSqrt_le_root hnpos have := (Bseq n).card_I1 omega apply csSup_le · let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) have hP0 : ContClampModel P0 kappa cminus cplus pmin deltaBar := minimaxClampModel_continuous J kappa cminus cplus pmin deltaBar hreg.1.1 hreg.1.2.1 hreg.1.2.2.2.1 hreg.1.2.2.2.2.1 hreg.1.2.2.2.2.2.2.1 (fun _ => 0) measurable_const (fun _ => by norm_num) continuous_const.continuousOn exact ⟨contEstimatorRisk P0 n kappa cminus cplus pmin deltaBar (deltaSeq n) hP0 (contFallbackEstimator (Bseq n) · (deltaSeq n)), P0, hP0, contClampModel_iidSampling hP0, rfl⟩ · intro v hv rcases hv with ⟨P, hP, _hiid, rfl⟩ have he := contFallbackEstimator_risk_le_explicit P (Bseq n) kappa cminus cplus pmin deltaBar (deltaSeq n) hP hreg.1 (hdelta n) hcard0 hcard1 have hcoef : (3 / 2 : ℝ) + (J : ℝ) * (3 / 4) ≤ C := by dsimp [C] have hJ : 0 ≤ (J : ℝ) := Nat.cast_nonneg J have hratio : 0 ≤ cplus / (kappa + 1) := by positivity nlinarith have hatomcoef : (J : ℝ) * ((1 / 2 : ℝ) * (cplus / (kappa + 1))) ≤ C := by dsimp [C] have hJ : 0 ≤ (J : ℝ) := Nat.cast_nonneg J have hratio : 0 ≤ cplus / (kappa + 1) := by positivity nlinarith calc _ ≤ (1 / 2 : ℝ) * (3 * root) + (J : ℝ) * ((1 / 4 : ℝ) * (3 * root) + (1 / 2 : ℝ) * (cplus * atom / (kappa + 1))) := by exact he.trans (add_le_add (mul_le_mul_of_nonneg_left hsqrt0 (by norm_num)) (mul_le_mul_of_nonneg_left (add_le_add (mul_le_mul_of_nonneg_left hsqrt1 (by norm_num)) le_rfl) (Nat.cast_nonneg J))) _ = ((3 / 2 : ℝ) + (J : ℝ) * (3 / 4)) * root + ((J : ℝ) * ((1 / 2 : ℝ) * (cplus / (kappa + 1)))) * atom := by ring _ ≤ C * root + C * atom := add_le_add (mul_le_mul_of_nonneg_right hcoef hroot) (mul_le_mul_of_nonneg_right hatomcoef hatom) _ = C * contFrontier n (deltaSeq n) kappa := by dsimp [root, atom] unfold contFrontier ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.contStabilizedWorstRisk_eventually_le_frontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:491
theorem contStabilizedWorstLength_eventually_le_frontier

The extended expected length of the concrete interval attains the same continuity frontier. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
∃ C : ℝ,
0 < C
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
Bseq :
∀ n
SplitBlocks n, ∀ᶠ n : ℕ in atTop, contStabilizedWorstLength J n (Bseq n) kappa cminus cplus pmin deltaBar (deltaSeq n) alpha
ofReal (C * contFrontier n (deltaSeq n) kappa)
Proof (Lean source)
lemma contStabilizedWorstLength_eventually_le_frontier (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : ∃ C : ℝ, 0 < C ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ Bseq : ∀ n, SplitBlocks n, ∀ᶠ n : ℕ in atTop, contStabilizedWorstLength J n (Bseq n) kappa cminus cplus pmin deltaBar (deltaSeq n) alpha ≤ ofReal (C * contFrontier n (deltaSeq n) kappa) := by let K := sqrt (log (4 / alpha) / 2) let C : ℝ := 1 + 12 * K + (J : ℝ) * (3 / 2 + cplus / (kappa + 1)) have hk1 : 0 < kappa + 1 := by linarith [hreg.1.2.1] have hcplus0 : 0 < cplus := hk1.trans_le hreg.1.2.2.2.2.1 have hquot : 1 < 4 / alpha := by rw [lt_div_iff₀ hreg.2.1] linarith [hreg.2.2] have hloghalf : 0 ≤ log (4 / alpha) / 2 := div_nonneg (Real.log_pos hquot).le (by norm_num) have hK : 0 ≤ K := Real.sqrt_nonneg _ have hC : 0 < C := by dsimp [C] have hJ : 0 ≤ (J : ℝ) := Nat.cast_nonneg J have hratio : 0 ≤ cplus / (kappa + 1) := by positivity nlinarith refine ⟨C, hC, ?_⟩ intro deltaSeq hdelta Bseq filter_upwards [eventually_ge_atTop 8] with n hn have hnpos : 0 < n := by omega have hcard0 : 0 < (Bseq n).I0.card := by have := (Bseq n).card_I0 omega have hcard1 : 0 < (Bseq n).I1.card := by have := (Bseq n).card_I1 omega let root : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) let atom : ℝ := (deltaSeq n) ^ (kappa + 1) have hroot : 0 ≤ root := Real.rpow_nonneg (Nat.cast_nonneg n) _ have hatom : 0 ≤ atom := Real.rpow_nonneg (hdelta n).1 _ have hsqrt0 : sqrt ((Bseq n).I0.card : ℝ)⁻¹ ≤ 3 * root := by apply splitBlock_invSqrt_le_root hnpos have := (Bseq n).card_I0 omega have hsqrt1 : sqrt ((Bseq n).I1.card : ℝ)⁻¹ ≤ 3 * root := by apply splitBlock_invSqrt_le_root hnpos have := (Bseq n).card_I1 omega have ht0 : sqrt (log (4 / alpha) / (2 * ((Bseq n).I0.card : ℝ))) ≤ K * (3 * root) := by rw [show log (4 / alpha) / (2 * ((Bseq n).I0.card : ℝ)) = (log (4 / alpha) / 2) * (((Bseq n).I0.card : ℝ)⁻¹) by field_simp] rw [Real.sqrt_mul hloghalf] exact mul_le_mul_of_nonneg_left hsqrt0 hK have ht1 : sqrt (log (4 / alpha) / (2 * ((Bseq n).I1.card : ℝ))) ≤ K * (3 * root) := by rw [show log (4 / alpha) / (2 * ((Bseq n).I1.card : ℝ)) = (log (4 / alpha) / 2) * (((Bseq n).I1.card : ℝ)⁻¹) by field_simp] rw [Real.sqrt_mul hloghalf] exact mul_le_mul_of_nonneg_left hsqrt1 hK unfold contStabilizedWorstLength apply sSup_le intro v hv rcases hv with ⟨P, hP, _hiid, rfl⟩ have he := contHoeffdingInterval_lintegral_length_le P (Bseq n) kappa cminus cplus pmin deltaBar (deltaSeq n) alpha hP hreg.1 (hdelta n) hcard1 apply he.trans apply ENNReal.ofReal_le_ofReal have hrootcoef : 12 * K + (J : ℝ) * (3 / 2) ≤ C := by dsimp [C] have hJ : 0 ≤ (J : ℝ) := Nat.cast_nonneg J have hratio : 0 ≤ cplus / (kappa + 1) := by positivity nlinarith have hatomcoef : (J : ℝ) * (cplus / (kappa + 1)) ≤ C := by dsimp [C] have hJ : 0 ≤ (J : ℝ) := Nat.cast_nonneg J have hratio : 0 ≤ cplus / (kappa + 1) := by positivity nlinarith calc _ ≤ 2 * (K * (3 * root)) + 2 * (K * (3 * root)) + (J : ℝ) * ((1 / 2 : ℝ) * (3 * root) + cplus * atom / (kappa + 1)) := by exact add_le_add (add_le_add (mul_le_mul_of_nonneg_left ht0 (by norm_num)) (mul_le_mul_of_nonneg_left ht1 (by norm_num))) (mul_le_mul_of_nonneg_left (add_le_add (mul_le_mul_of_nonneg_left hsqrt1 (by norm_num)) le_rfl) (Nat.cast_nonneg J)) _ = (12 * K + (J : ℝ) * (3 / 2)) * root + ((J : ℝ) * (cplus / (kappa + 1))) * atom := by ring _ ≤ C * root + C * atom := add_le_add (mul_le_mul_of_nonneg_right hrootcoef hroot) (mul_le_mul_of_nonneg_right hatomcoef hatom) _ = C * contFrontier n (deltaSeq n) kappa := by dsimp [root, atom] unfold contFrontier ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.contStabilizedWorstLength_eventually_le_frontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:571
theorem contFrontierCriteria_fixed_positive_not_tendsto_zero

At a threshold converging to a positive interior point, neither the observed nor causal continuity-only minimax risk can converge to zero. The result uses the hreg condition, the hdelta condition, the hdelta0 condition, the htend condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
deltaSeq :
ℕ → ℝ
delta0 :
hdelta :
ThresholdSequence deltaBar deltaSeq
hdelta0 :
delta0 ∈ Ioc (0 : ℝ) deltaBar
htend :
Tendsto deltaSeq atTop (nhds delta0)
conclusion 1
¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1) atTop (nhds 0)
conclusion 2
¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.2.1) atTop (nhds 0)
Proof (Lean source)
lemma contFrontierCriteria_fixed_positive_not_tendsto_zero (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) (deltaSeq : ℕ → ℝ) (delta0 : ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) (hdelta0 : delta0 ∈ Ioc (0 : ℝ) deltaBar) (htend : Tendsto deltaSeq atTop (nhds delta0)) : ¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1) atTop (nhds 0) ∧ ¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.2.1) atTop (nhds 0) := by obtain ⟨c, hc, hlower⟩ := contMinimaxRisk_eventually_ge_frontier J kappa cminus cplus pmin deltaBar alpha hreg have hk1 : 0 < kappa + 1 := by linarith [hreg.1.2.1] have hpow : Tendsto (fun n => c * (deltaSeq n) ^ (kappa + 1)) atTop (nhds (c * delta0 ^ (kappa + 1))) := by exact tendsto_const_nhds.mul ((Real.continuousAt_rpow_const delta0 (kappa + 1) (inr hk1.le)).tendsto.comp htend) have hle : ∀ᶠ n : ℕ in atTop, c * (deltaSeq n) ^ (kappa + 1) ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1 := by filter_upwards [hlower deltaSeq hdelta] with n hn have hr : 0 ≤ (n : ℝ) ^ (-(1 : ℝ) / 2) := Real.rpow_nonneg (Nat.cast_nonneg n) _ calc c * (deltaSeq n) ^ (kappa + 1) ≤ c * contFrontier n (deltaSeq n) kappa := by unfold contFrontier nlinarith _ ≤ _ := hn have hobs : ¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1) atTop (nhds 0) := by intro hz have hlim : c * delta0 ^ (kappa + 1) ≤ 0 := le_of_tendsto_of_tendsto hpow hz hle have : 0 < c * delta0 ^ (kappa + 1) := mul_pos hc (Real.rpow_pos_of_pos hdelta0.1 _) linarith refine ⟨hobs, ?_⟩ intro hcausal have heq : ∀ n, (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.2.1 = (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1 := by intro n exact (contFrontierCriteria_observed_causal_eq J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha hreg (hdelta n)).1 apply hobs exact hcausal.congr' (Filter.Eventually.of_forall heq)
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFrontierCriteria_fixed_positive_not_tendsto_zero · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:673
theorem contFrontierLength_fixed_positive_not_tendsto_zero

A threshold converging to a positive interior point also prevents the observed minimax honest length from converging to zero. The result uses the hreg condition, the hdelta condition, the hdelta0 condition, the htend condition. This is the stated conclusion.

Formal statement
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
deltaSeq :
ℕ → ℝ
delta0 :
hdelta :
ThresholdSequence deltaBar deltaSeq
hdelta0 :
delta0 ∈ Ioc (0 : ℝ) deltaBar
htend :
Tendsto deltaSeq atTop (nhds delta0)
¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1) atTop (nhds 0)
Proof (Lean source)
lemma contFrontierLength_fixed_positive_not_tendsto_zero (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) (deltaSeq : ℕ → ℝ) (delta0 : ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) (hdelta0 : delta0 ∈ Ioc (0 : ℝ) deltaBar) (htend : Tendsto deltaSeq atTop (nhds delta0)) : ¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1) atTop (nhds 0) := by obtain ⟨c, hc, hlower⟩ := contMinimaxLength_eventually_ge_frontier J kappa cminus cplus pmin deltaBar alpha hreg have hk1 : 0 < kappa + 1 := by linarith [hreg.1.2.1] have hpowR : Tendsto (fun n => c * (deltaSeq n) ^ (kappa + 1)) atTop (nhds (c * delta0 ^ (kappa + 1))) := tendsto_const_nhds.mul ((Real.continuousAt_rpow_const delta0 (kappa + 1) (inr hk1.le)).tendsto.comp htend) have hpow : Tendsto (fun n => ofReal (c * (deltaSeq n) ^ (kappa + 1))) atTop (nhds (ofReal (c * delta0 ^ (kappa + 1)))) := ENNReal.continuous_ofReal.continuousAt.tendsto.comp hpowR have hle : ∀ᶠ n : ℕ in atTop, ofReal (c * (deltaSeq n) ^ (kappa + 1)) ≤ (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1 := by filter_upwards [hlower deltaSeq hdelta] with n hn apply (ENNReal.ofReal_le_ofReal ?_).trans hn have hr := Real.rpow_nonneg (Nat.cast_nonneg n) (-(1 : ℝ) / 2) unfold contFrontier nlinarith intro hz have hlim : ofReal (c * delta0 ^ (kappa + 1)) ≤ 0 := le_of_tendsto_of_tendsto hpow hz hle have hp : 0 < c * delta0 ^ (kappa + 1) := mul_pos hc (Real.rpow_pos_of_pos hdelta0.1 _) have : (0 : ℝ≥0∞) < ofReal (c * delta0 ^ (kappa + 1)) := ENNReal.ofReal_pos.mpr hp exact (not_lt_of_ge hlim) this
CausalSmith.Stat.LmtpThresholdAtomFrontier.contFrontierLength_fixed_positive_not_tendsto_zero · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:731
theorem continuity_only_frontier Theorem 5 in the paper ↗

Conditional on the disclosed Hoeffding gate, the fixed-fallback estimator and interval attain the continuity-only frontier, with identical observed and causal decision criteria. The result uses the HoeffdingBoundedAverage_of_gate condition, the hreg condition. This is the stated conclusion.

Formal statement
HoeffdingBoundedAverage_of_gate :
J :
kappa cminus cplus pmin deltaBar alpha :
hreg :
ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha
∃ c C : ℝ,
0 < c
c < C
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
Bseq :
∀ n
SplitBlocks n, ∀ᶠ n in atTop, let delta := deltaSeq n let s := contFrontier n delta kappa let crit := contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha c * s
≤ crit.1 ∧
crit.1 ≤ contStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar delta
contStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar delta ≤ C * s ∧
1 - alpha
contStabilizedCoverage J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha ∧
contStabilizedWorstLength J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha
ofReal (C * s) ∧
ofReal (c * s) ≤ crit.2.1 ∧
crit.2.2.1 = crit.1 ∧
crit.2.2.2 = crit.2.1 ∧
crit.2.2.1
contCausalStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar delta
contCausalStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar delta ≤ C * s ∧
1 - alpha
contCausalStabilizedCoverage J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha ∧
contCausalStabilizedWorstLength J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha
ofReal (C * s)
conclusion 2
AsympSeq (fun n => contFrontier n ((n : ℝ) ^ (-(1 : ℝ) / (2 * (kappa + 1)))) kappa) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
conclusion 3
AsympSeq (fun n => contFrontier n 0 kappa) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
conclusion 4
deltaSeq :
ℕ → ℝ
delta0 :
ThresholdSequence deltaBar deltaSeq
delta0 ∈ Ioc (0 : ℝ) deltaBar
Tendsto deltaSeq atTop (nhds delta0)
¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1) atTop (nhds 0)
¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1) atTop (nhds 0)
Proof (Lean source)
-- @node: thm:continuity-only-frontier theorem continuity_only_frontier (HoeffdingBoundedAverage_of_gate : HoeffdingBoundedAverage) (J : ℕ) (kappa cminus cplus pmin deltaBar alpha : ℝ) (hreg : ContRegimeConstants J kappa cminus cplus pmin deltaBar alpha) : ∃ c C : ℝ, 0 < c ∧ c < C ∧ (∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → ∀ Bseq : ∀ n, SplitBlocks n, ∀ᶠ n in atTop, let delta := deltaSeq n let s := contFrontier n delta kappa let crit := contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha c * s ≤ crit.1 ∧ crit.1 ≤ contStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar delta ∧ contStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar delta ≤ C * s ∧ 1 - alpha ≤ contStabilizedCoverage J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha ∧ contStabilizedWorstLength J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha ≤ ofReal (C * s) ∧ ofReal (c * s) ≤ crit.2.1 ∧ crit.2.2.1 = crit.1 ∧ crit.2.2.2 = crit.2.1 ∧ crit.2.2.1 ≤ contCausalStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar delta ∧ contCausalStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar delta ≤ C * s ∧ 1 - alpha ≤ contCausalStabilizedCoverage J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha ∧ contCausalStabilizedWorstLength J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha ≤ ofReal (C * s)) ∧ AsympSeq (fun n => contFrontier n ((n : ℝ) ^ (-(1 : ℝ) / (2 * (kappa + 1)))) kappa) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ AsympSeq (fun n => contFrontier n 0 kappa) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ ∀ (deltaSeq : ℕ → ℝ) (delta0 : ℝ), ThresholdSequence deltaBar deltaSeq → delta0 ∈ Ioc (0 : ℝ) deltaBar → Tendsto deltaSeq atTop (nhds delta0) → ¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).1) atTop (nhds 0) ∧ ¬ Tendsto (fun n => (contFrontierCriteria J n kappa cminus cplus pmin deltaBar (deltaSeq n) alpha).2.1) atTop (nhds 0) := by obtain ⟨cr, hcr, hRiskLower⟩ := contMinimaxRisk_eventually_ge_frontier J kappa cminus cplus pmin deltaBar alpha hreg obtain ⟨cl, hcl, hLengthLower⟩ := contMinimaxLength_eventually_ge_frontier J kappa cminus cplus pmin deltaBar alpha hreg obtain ⟨CR, hCR, hRiskUpper⟩ := contStabilizedWorstRisk_eventually_le_frontier J kappa cminus cplus pmin deltaBar alpha hreg obtain ⟨CL, hCL, hLengthUpper⟩ := contStabilizedWorstLength_eventually_le_frontier J kappa cminus cplus pmin deltaBar alpha hreg let c := min cr cl let C := max CR CL + c + 1 have hc : 0 < c := by dsimp [c]; positivity have hcC : c < C := by dsimp [C] have : 0 < max CR CL := lt_max_of_lt_left hCR linarith have hCRle : CR ≤ C := by dsimp [C] have := le_max_left CR CL linarith have hCLle : CL ≤ C := by dsimp [C] have := le_max_right CR CL linarith refine ⟨c, C, hc, hcC, ?_, contFrontier_elbow_asymp kappa hreg.1.2.1, contFrontier_zero_asymp kappa hreg.1.2.1, ?_⟩ · intro deltaSeq hdelta Bseq filter_upwards [hRiskLower deltaSeq hdelta, hLengthLower deltaSeq hdelta, hRiskUpper deltaSeq hdelta Bseq, hLengthUpper deltaSeq hdelta Bseq, eventually_ge_atTop 8] with n hnRL hnLL hnRU hnLU hn8 let delta := deltaSeq n let s := contFrontier n delta kappa let crit := contFrontierCriteria J n kappa cminus cplus pmin deltaBar delta alpha have hdeltaN : delta ∈ Icc (0 : ℝ) deltaBar := hdelta n have hs : 0 ≤ s := by dsimp [s, delta] unfold contFrontier exact add_nonneg (Real.rpow_nonneg (Nat.cast_nonneg n) _) (Real.rpow_nonneg (hdelta n).1 _) have hcard0 : 0 < (Bseq n).I0.card := by have := (Bseq n).card_I0 omega have hcard1 : 0 < (Bseq n).I1.card := by have := (Bseq n).card_I1 omega have hcritEq := contFrontierCriteria_observed_causal_eq J n kappa cminus cplus pmin deltaBar delta alpha hreg hdeltaN have hRiskEq := contCausalStabilizedWorstRisk_eq_observed J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha hreg hdeltaN have hCovEq := contCausalStabilizedCoverage_eq_observed J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha hreg hdeltaN have hLenEq := contCausalStabilizedWorstLength_eq_observed J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha hreg have hcov := contStabilizedCoverage_ge HoeffdingBoundedAverage_of_gate J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha hreg hdeltaN hcard0 hcard1 have hlowRisk : c * s ≤ crit.1 := by exact (mul_le_mul_of_nonneg_right (min_le_left cr cl) hs).trans (by simpa [c, s, crit, delta] using hnRL) have hlowLen : ofReal (c * s) ≤ crit.2.1 := by exact (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right (min_le_right cr cl) hs)).trans (by simpa [c, s, crit, delta] using hnLL) have hupRisk : contStabilizedWorstRisk J n (Bseq n) kappa cminus cplus pmin deltaBar delta ≤ C * s := by calc _ ≤ CR * s := by simpa [s, delta] using hnRU _ ≤ C * s := mul_le_mul_of_nonneg_right hCRle hs have hupLen : contStabilizedWorstLength J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha ≤ ofReal (C * s) := by calc _ ≤ ofReal (CL * s) := by simpa [s, delta] using hnLU _ ≤ ofReal (C * s) := ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hCLle hs) refine ⟨hlowRisk, contFrontierCriteria_risk_le_stabilized J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha hreg hdeltaN, hupRisk, hcov, hupLen, hlowLen, hcritEq.1, hcritEq.2, ?_, ?_, ?_, ?_⟩ · rw [hcritEq.1, hRiskEq] exact contFrontierCriteria_risk_le_stabilized J n (Bseq n) kappa cminus cplus pmin deltaBar delta alpha hreg hdeltaN · rw [hRiskEq] exact hupRisk · rw [hCovEq] exact hcov · rw [hLenEq] exact hupLen · intro deltaSeq delta0 hdelta hdelta0 htend exact ⟨(contFrontierCriteria_fixed_positive_not_tendsto_zero J kappa cminus cplus pmin deltaBar alpha hreg deltaSeq delta0 hdelta hdelta0 htend).1, contFrontierLength_fixed_positive_not_tendsto_zero J kappa cminus cplus pmin deltaBar alpha hreg deltaSeq delta0 hdelta hdelta0 htend⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.continuity_only_frontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/THonestLength.lean:773
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.TMinimaxRisk 18 declarations The upper bound is attached to the concrete total-Gram estimator.

Matched minimax absolute-risk frontier

The upper bound is attached to the concrete total-Gram estimator. The lower bound contains both same-class experiments and their product-divergence bounds.

def stabilizedEstimatorRisk

Risk of the paper's concrete stabilized estimator.

Definition (Lean source)
J :
shared
P :
n :
B :
beta kappa cminus cplus deltaBar delta :
stabilizedEstimatorRisk P n B beta kappa cminus cplus deltaBar delta :
estimatorRisk P n delta (fun z => totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar))
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedEstimatorRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:26

Worst-case risk of the concrete estimator over i.i.d. laws in the model.

Definition (Lean source)
J n :
B :
beta kappa L cminus cplus pmin deltaBar delta :
stabilizedWorstRisk J n B beta kappa L cminus cplus pmin deltaBar delta :
sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ IidSampling P n ∧ v = stabilizedEstimatorRisk P n B beta kappa cminus cplus deltaBar delta}
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedWorstRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:33

Product chi-squared divergence used by the same-class witnesses.

Definition (Lean source)
J :
shared
P Q :
n :
productChiSq P Q n :
CausalSmith.Stat.LmtpThresholdAtomFrontier.productChiSq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:40

The product law from P is absolutely continuous with respect to the product law from Q, and its squared Radon--Nikodym deviation is integrable for the sample size n; together these conditions define well-posed real product chi-squared divergence.

Definition (Lean source)
J :
shared
P Q :
n :
ProperProductChiSq P Q n :
Prop
clause 1
clause 2
Integrable (fun z => (((iidProduct P n).rnDeriv (iidProduct Q n) z).toReal - 1) ^ 2) (iidProduct Q n)
CausalSmith.Stat.LmtpThresholdAtomFrontier.ProperProductChiSq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:44

Two witness laws share the complete (X,A) design distribution and its law-pinned nuisance representation.

Definition (Lean source)
J :
shared
P Q :
SharedClampDesign P Q :
Prop
clause 1
P.dataMeasure.map (fun o => (o.X, o.A)) = Q.dataMeasure.map (fun o => (o.X, o.A))
clause 2
P.px = Q.px
clause 3
P.pi = Q.pi
CausalSmith.Stat.LmtpThresholdAtomFrontier.SharedClampDesign · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:53

The outcome in a lower-bound experiment is genuinely Bernoulli.

Definition (Lean source)
J :
shared
P :
BernoulliOutcomeLaw P :
Prop
∀ᵐ o ∂P.dataMeasure, o.Y = 0 ∨ o.Y = 1
CausalSmith.Stat.LmtpThresholdAtomFrontier.BernoulliOutcomeLaw · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:60
theorem stabilizedWorstRisk_eventually_le_frontier Lemma 15 in the paper ↗

Uniform eventual upper bound for the concrete stabilized estimator, including the supremum over all model laws. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ C : ℝ,
0 < C
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
Bseq :
∀ n
SplitBlocks n, ∀ᶠ n in atTop, stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar (deltaSeq n)
≤ C * clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta
Proof (Lean source)
lemma stabilizedWorstRisk_eventually_le_frontier (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ C : ℝ, 0 < C ∧ ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → ∀ Bseq : ∀ n, SplitBlocks n, ∀ᶠ n in atTop, stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar (deltaSeq n) ≤ C * clampFrontier n (deltaSeq n) kappa (infoBandwidth n (deltaSeq n) beta kappa deltaBar) beta := by rcases total_gram_stabilization J beta kappa L cminus cplus pmin deltaBar alpha hreg with ⟨Ct, ct, hCt, hct, hlambda, hstab⟩ have hreg' := hreg rcases hreg' with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ let noiseC : ℝ := (1 / 2 : ℝ) * sqrt (336 * (4 * (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus ^ 2) / (pmin * cminus / (2 * (2 : ℝ) ^ kappa))) let biasC : ℝ := 2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus let localK : ℝ := noiseC + biasC * L + Ct / ct let atomK : ℝ := cplus / (kappa + 1) let C : ℝ := 2 * (1 + (J : ℝ)) * (1 + atomK * localK) have hnoiseC : 0 ≤ noiseC := by dsimp [noiseC]; positivity have hbiasC : 0 ≤ biasC := by dsimp [biasC]; positivity have hlocalK : 0 ≤ localK := by dsimp [localK]; positivity have hatomK : 0 ≤ atomK := by dsimp [atomK] exact div_nonneg (by linarith) (by linarith) have hC : 0 < C := by dsimp [C]; positivity refine ⟨C, hC, ?_⟩ intro deltaSeq hdelta Bseq have hbal := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar, hdeltaBar1⟩ deltaSeq hdelta filter_upwards [hbal, eventually_ge_atTop 8] with n hbn hn let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r0 := (n : ℝ) ^ (-(1 : ℝ) / 2) let a0 := delta ^ (kappa + 1) * h ^ beta have hnpos : 0 < n := by omega have hh : 0 < h := by simpa [h, delta] using hbn.1 have hhbar : h ≤ 1 - deltaBar := by simpa [h, delta] using hbn.2.1 have hh1 : h ≤ 1 := hhbar.trans (by linarith) have hbalance : (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1 := by simpa [h, delta] using hbn.2.2 have hdeltaN : deltaIcc (0 : ℝ) deltaBar := hdelta n have hupper : delta + h ≤ 1 := by linarith [hdeltaN.2, hhbar] have hr0 : 0 ≤ r0 := Real.rpow_nonneg (Nat.cast_nonneg n) _ have ha0 : 0 ≤ a0 := mul_nonneg (Real.rpow_nonneg hdeltaN.1 _) (Real.rpow_nonneg hh.le _) have hsqrt0 : sqrt ((Bseq n).I0.card : ℝ)⁻¹ ≤ 3 * r0 := by have hm : n ≤ 8 * (Bseq n).I0.card := by have := (Bseq n).card_I0 omega exact splitBlock_invSqrt_le_root hnpos hm have hsqrt1 : sqrt ((Bseq n).I1.card : ℝ)⁻¹ ≤ 3 * r0 := by have hm : n ≤ 8 * (Bseq n).I1.card := by have := (Bseq n).card_I1 omega exact splitBlock_invSqrt_le_root hnpos hm apply csSup_le · let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) have hP0 : ClampModel P0 beta kappa L cminus cplus pmin := by exact minimaxCenter_mem_model J beta kappa L cminus cplus pmin deltaBar alpha hreg exact ⟨stabilizedEstimatorRisk P0 n (Bseq n) beta kappa cminus cplus deltaBar delta, P0, hP0, clampModel_iidSampling hP0, rfl⟩ · intro v hv rcases hv with ⟨P, hP, hsampling, rfl⟩ have htail (x : Fin J) : (iidProduct P n).real {z | ¬ GoodGramEvent (Bseq n) z x (ellOf beta) kappa cminus cplus delta h} ≤ Ct * exp (-ct * (n : ℝ) * h * (delta + h) ^ kappa) := by simpa [h, delta] using (hstab P hP n hsampling (Bseq n) delta hdeltaN x).1 have hexp : Ct * exp (-ct * (n : ℝ) * h * (delta + h) ^ kappa) ≤ (Ct / ct) * h ^ beta := balancedGramTail_le hnpos hbeta hh hh1 hCt.le hct hbalance have hexpl := totalGramEstimator_risk_le_explicit P hP hreg hsampling (Bseq n) hn hdeltaN hh hupper hbalance hlambda htail have hlocal : (1 / 2 : ℝ) * sqrt (336 * (4 * (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus ^ 2) / (pmin * cminus / (2 * (2 : ℝ) ^ kappa))) * h ^ beta + (2 * sqrt (ellOf beta + 1 : ℝ) / lambdaStar (ellOf beta) kappa cminus cplus) * L * h ^ beta + Ct * exp (-ct * (n : ℝ) * h * (delta + h) ^ kappa) ≤ localK * h ^ beta := by calc _ ≤ noiseC * h ^ beta + biasC * L * h ^ beta + (Ct / ct) * h ^ beta := by exact add_le_add (add_le_add le_rfl le_rfl) hexp _ = localK * h ^ beta := by simp [noiseC, biasC, localK]; ring have hraw : stabilizedEstimatorRisk P n (Bseq n) beta kappa cminus cplus deltaBar delta ≤ 2 * r0 + (J : ℝ) * (2 * r0 + atomK * localK * a0) := by unfold stabilizedEstimatorRisk estimatorRisk have hatomExpr0 : 0 ≤ cplus * delta ^ (kappa + 1) / (kappa + 1) := div_nonneg (mul_nonneg (by linarith) (Real.rpow_nonneg hdeltaN.1 _)) (by linarith) calc _ ≤ _ := hexpl _ ≤ 2 * r0 + (J : ℝ) * (2 * r0 + (cplus * delta ^ (kappa + 1) / (kappa + 1)) * (localK * h ^ beta)) := by apply add_le_add · nlinarith [hsqrt0] · apply mul_le_mul_of_nonneg_left _ (Nat.cast_nonneg J) apply add_le_add · nlinarith [hsqrt1] · exact mul_le_mul_of_nonneg_left hlocal hatomExpr0 _ = 2 * r0 + (J : ℝ) * (2 * r0 + atomK * localK * a0) := by dsimp [atomK, a0] ring calc stabilizedEstimatorRisk P n (Bseq n) beta kappa cminus cplus deltaBar delta ≤ 2 * r0 + (J : ℝ) * (2 * r0 + atomK * localK * a0) := hraw _ ≤ C * (r0 + a0) := by have hq : 0 ≤ atomK * localK := mul_nonneg hatomK hlocalK have hJ0 : 0 ≤ (J : ℝ) := Nat.cast_nonneg J have hqa : 0 ≤ (atomK * localK) * a0 := mul_nonneg hq ha0 have hcoeff : (J : ℝ) ≤ 2 * (1 + (J : ℝ)) := by have hJ1 : (J : ℝ) ≤ 1 + (J : ℝ) := le_add_of_nonneg_left zero_le_one have hsum0 : 0 ≤ 1 + (J : ℝ) := by positivity exact hJ1.trans (by linarith) change 2 * r0 + (J : ℝ) * (2 * r0 + atomK * localK * a0) ≤ (2 * (1 + (J : ℝ)) * (1 + atomK * localK)) * (r0 + a0) calc _ = 2 * (1 + (J : ℝ)) * r0 + (J : ℝ) * ((atomK * localK) * a0) := by ring _ ≤ 2 * (1 + (J : ℝ)) * r0 + (2 * (1 + (J : ℝ))) * ((atomK * localK) * a0) := by apply add_le_add_right exact mul_le_mul_of_nonneg_right hcoeff hqa _ ≤ (2 * (1 + (J : ℝ)) * (1 + atomK * localK)) * (r0 + a0) := by have hfac : 0 ≤ 2 * (1 + (J : ℝ)) := by positivity have hrest : 0 ≤ (2 * (1 + (J : ℝ))) * a0 + (2 * (1 + (J : ℝ))) * ((atomK * localK) * r0) := add_nonneg (mul_nonneg hfac ha0) (mul_nonneg hfac (mul_nonneg hq hr0)) calc _ ≤ 2 * (1 + (J : ℝ)) * r0 + 2 * (1 + (J : ℝ)) * (atomK * localK * a0) + (2 * (1 + (J : ℝ)) * a0 + 2 * (1 + (J : ℝ)) * (atomK * localK * r0)) := le_add_of_nonneg_right hrest _ = _ := by ring _ = C * clampFrontier n delta kappa h beta := by simp [clampFrontier, r0, a0]
CausalSmith.Stat.LmtpThresholdAtomFrontier.stabilizedWorstRisk_eventually_le_frontier · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:65

A global Bernoulli regression mean shift of the advertised size.

Definition (Lean source)
J :
shared
P Q :
eps :
GlobalBernoulliShift P Q eps :
Prop
clause 1
clause 4
x :
Fin J
a :
a ∈ Icc (0 : ℝ) 1
Q.mu x a = P.mu x a + eps
CausalSmith.Stat.LmtpThresholdAtomFrontier.GlobalBernoulliShift · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:219
theorem minimaxConstant_globalShift

the stated minimax constant global shift property holds for the specified J input, the specified kappa input, the specified eps input, the specified heps input.

Formal statement
J :
kappa eps :
heps :
|eps| ≤ 1 / 2
GlobalBernoulliShift (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0)) (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps)) eps
Proof (Lean source)
lemma minimaxConstant_globalShift (J : ℕ) (kappa eps : ℝ) (heps : |eps| ≤ 1 / 2) : GlobalBernoulliShift (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0)) (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps)) eps := by have hmap0 := minimaxDataMeasure_map_design J kappa (fun _ : Fin J × ℝ => 0) measurable_const (fun _ => by norm_num) have hmap1 := minimaxDataMeasure_map_design J kappa (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => heps) have hshared : SharedClampDesign (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0)) (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps)) := by refine ⟨?_, rfl, rfl⟩ change (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)).map (fun o => (o.X, o.A)) = (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps)).map (fun o => (o.X, o.A)) rw [hmap0, hmap1] refine ⟨hshared, minimaxDataMeasure_ae_bernoulli J kappa (fun _ : Fin J × ℝ => 0) measurable_const, minimaxDataMeasure_ae_bernoulli J kappa (fun _ : Fin J × ℝ => eps) measurable_const, ?_⟩ intro x a ha simp [minimaxClampLaw]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxConstant_globalShift · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:225
theorem globalBernoulli_witness_eventually

The canonical constant Bernoulli shift supplies the global root-sample witness, uniformly over every admissible threshold sequence. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n in atTop, ∃ P0 P1 : ClampLaw J, ClampModel P0 beta kappa L cminus cplus pmin ∧ ClampModel P1 beta kappa L cminus cplus pmin ∧ IidSampling P0 n ∧ IidSampling P1 n ∧ GlobalBernoulliShift P0 P1 ((n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ (1 / 2 : ℝ) * (n : ℝ) ^ (-(1 : ℝ) / 2)
≤ |clampFunctional P1 (deltaSeq n) - clampFunctional P0 (deltaSeq n)| ∧
ProperProductChiSq P1 P0 n ∧
productChiSq P1 P0 n ≤ exp 4
Proof (Lean source)
lemma globalBernoulli_witness_eventually (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → ∀ᶠ n in atTop, ∃ P0 P1 : ClampLaw J, ClampModel P0 beta kappa L cminus cplus pmin ∧ ClampModel P1 beta kappa L cminus cplus pmin ∧ IidSampling P0 n ∧ IidSampling P1 n ∧ GlobalBernoulliShift P0 P1 ((n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ (1 / 2 : ℝ) * (n : ℝ) ^ (-(1 : ℝ) / 2) ≤ |clampFunctional P1 (deltaSeq n) - clampFunctional P0 (deltaSeq n)| ∧ ProperProductChiSq P1 P0 n ∧ productChiSq P1 P0 n ≤ exp 4 := by intro deltaSeq hdelta have hreg' := hreg rcases hreg' with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ filter_upwards [eventually_ge_atTop 5] with n hn have hnpos : 0 < n := by omega have hnR : 0 < (n : ℝ) := by exact_mod_cast hnpos let eps : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) have heps0 : 0 < eps := Real.rpow_pos_of_pos hnR _ have hepshalf : |eps| ≤ 1 / 2 := by rw [abs_of_pos heps0] have hn4Nat : 4 ≤ n := by omega have hn4 : (4 : ℝ) ≤ n := by exact_mod_cast hn4Nat calc eps ≤ (4 : ℝ) ^ (-(1 : ℝ) / 2) := by dsimp [eps] exact Real.rpow_le_rpow_of_nonpos (by norm_num) hn4 (by norm_num) _ = 1 / 2 := by norm_num have hepslt : |eps| < 1 / 2 := by rw [abs_of_pos heps0] have hn4 : (4 : ℝ) < n := by exact_mod_cast hn calc eps < (4 : ℝ) ^ (-(1 : ℝ) / 2) := by dsimp [eps] exact Real.rpow_lt_rpow_of_neg (by norm_num) hn4 (by norm_num) _ = 1 / 2 := by norm_num let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let P1 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps) have hP0 : ClampModel P0 beta kappa L cminus cplus pmin := by exact minimaxCenter_mem_model J beta kappa L cminus cplus pmin deltaBar alpha hreg have hP1 : ClampModel P1 beta kappa L cminus cplus pmin := by exact minimaxConstant_mem_model J beta kappa L cminus cplus pmin deltaBar alpha eps hreg hepshalf have hshift : GlobalBernoulliShift P0 P1 eps := by exact minimaxConstant_globalShift J kappa eps hepshalf have hdelta1 : deltaSeq n ∈ Icc (0 : ℝ) 1 := ⟨(hdelta n).1, (hdelta n).2.trans hdeltaBar1.le⟩ have hsep := minimaxGlobalSeparation J kappa (deltaSeq n) eps hJ hkappa hdelta1 hepshalf have hsepAbs : |clampFunctional P1 (deltaSeq n) - clampFunctional P0 (deltaSeq n)| = eps := by rw [show P1 = minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps) by rfl, show P0 = minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) by rfl, hsep, abs_of_pos heps0] have hchi : productChiSq P1 P0 n ≤ exp 4 := by change chiSqDiv (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps))) (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0))) ≤ exp 4 simpa [eps] using minimaxConstant_productChiSq_le_exp_four J n kappa hJ hkappa hn have hac1 := minimaxDataMeasure_ac_center J kappa hJ hkappa (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepslt) have hint1 := minimaxDataMeasure_sq_integrable_center J kappa hJ hkappa (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => hepslt) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps)) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ measurable_const (fun _ => hepshalf) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ measurable_const (fun _ => by norm_num) have hac : iidProduct P1 n ≪ iidProduct P0 n := by simpa [P0, P1, iidProduct, minimaxClampLaw] using Causalean.Stat.pi_iid_absolutelyContinuous _ _ hac1 n have hint : Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n) := by simpa [P0, P1, iidProduct, minimaxClampLaw] using pi_iid_integrable_sq_dev _ _ hac1 hint1 n refine ⟨P0, P1, hP0, hP1, clampModel_iidSampling hP0, clampModel_iidSampling hP1, ?_, ?_, ⟨hac, hint⟩, hchi⟩ · simpa [eps] using hshift · rw [hsepAbs] change (1 / 2 : ℝ) * eps ≤ eps nlinarith [heps0]
CausalSmith.Stat.LmtpThresholdAtomFrontier.globalBernoulli_witness_eventually · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:253

A common-design Bernoulli perturbation localized to a width-h window at the threshold, with fixed small amplitude times h^beta and a continuous bump supported on [-1,1].

Definition (Lean source)
J :
shared
P Q :
beta delta h amplitude :
LocalizedBernoulliPerturbation P Q beta delta h amplitude :
Prop
clause 1
clause 4
0 < amplitude
clause 5
amplitude ≤ 1 / 4
clause 6
∃ bump : ℝ → ℝ,
bump 0 = 1
u :
0 ≤ bump u
u :
u ∉ Icc (-1 : ℝ) 1
bump u = 0
u ∈ Set.Icc (-1 : ℝ) 1 :
|bump u| ≤ 1
x :
Fin J
a :
a ∈ Icc (0 : ℝ) 1
Q.mu x a - P.mu x a = amplitude * h ^ beta * bump ((a - delta) / h)
CausalSmith.Stat.LmtpThresholdAtomFrontier.LocalizedBernoulliPerturbation · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:347
theorem minimaxBump_localizedPerturbation

the stated minimax bump localized perturbation property holds for the specified J input, the specified beta input, the specified kappa input, the specified delta input, the specified h input, the specified amplitude input, the specified hbeta input, the specified hh input, the specified hh1 input, the specified hamp input, the specified hamp_le input.

Formal statement
J :
beta kappa delta h amplitude :
hbeta :
0 < beta
hh :
0 < h
hh1 :
h ≤ 1
hamp :
0 < amplitude
hamp_le :
amplitude ≤ 1 / 4
q :
fun a : ℝ
=> amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h)
LocalizedBernoulliPerturbation (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0)) (minimaxClampLaw J kappa (fun p => q p.2)) beta delta h amplitude
Proof (Lean source)
lemma minimaxBump_localizedPerturbation (J : ℕ) (beta kappa delta h amplitude : ℝ) (hbeta : 0 < beta) (hh : 0 < h) (hh1 : h ≤ 1) (hamp : 0 < amplitude) (hamp_le : amplitude ≤ 1 / 4) : let q := fun a : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) LocalizedBernoulliPerturbation (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0)) (minimaxClampLaw J kappa (fun p => q p.2)) beta delta h amplitude := by dsimp only let q := fun a : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) have hqmeas : Measurable q := by dsimp [q]; fun_prop have hq0 (a : ℝ) : 0 ≤ q a := by dsimp [q] exact mul_nonneg (mul_nonneg hamp.le (Real.rpow_nonneg hh.le _)) (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqle (a : ℝ) : q a ≤ 1 / 4 := by have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - delta) / h) have hhpow : h ^ beta ≤ 1 := Real.rpow_le_one hh.le hh1 hbeta.le dsimp [q] calc amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) ≤ amplitude * h ^ beta * 1 := by gcongr _ ≤ amplitude * 1 := by simpa using mul_le_mul_of_nonneg_left hhpow hamp.le _ ≤ 1 / 4 := by simpa using hamp_le have hqbound (a : ℝ) : |q a| ≤ 1 / 2 := by rw [abs_of_nonneg (hq0 a)] linarith [hqle a] have hmap0 := minimaxDataMeasure_map_design J kappa (fun _ : Fin J × ℝ => 0) measurable_const (fun _ => by norm_num) have hmap1 := minimaxDataMeasure_map_design J kappa (fun p : Fin J × ℝ => q p.2) (hqmeas.comp measurable_snd) (fun p => hqbound p.2) have hshared : SharedClampDesign (minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0)) (minimaxClampLaw J kappa (fun p => q p.2)) := by refine ⟨?_, rfl, rfl⟩ change (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)).map (fun o => (o.X, o.A)) = (minimaxDataMeasure J kappa (fun p : Fin J × ℝ => q p.2)).map (fun o => (o.X, o.A)) rw [hmap0, hmap1] refine ⟨hshared, minimaxDataMeasure_ae_bernoulli J kappa (fun _ : Fin J × ℝ => 0) measurable_const, minimaxDataMeasure_ae_bernoulli J kappa (fun p : Fin J × ℝ => q p.2) (hqmeas.comp measurable_snd), hamp, hamp_le, ?_⟩ refine ⟨CausalSmith.Stat.DoseResponseMinimax.doseBump, ?_, CausalSmith.Stat.DoseResponseMinimax.doseBump_zero, CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg, ?_, fun u hu => CausalSmith.Stat.DoseResponseMinimax.doseBump_abs_le_one u, ?_⟩ · exact (CausalSmith.Stat.DoseResponseMinimax.doseContDiffBump.contDiff (n := ⊤)).continuous · intro u hu apply CausalSmith.Stat.DoseResponseMinimax.doseBump_eq_zero_of_one_le_abs rw [Set.mem_Icc, not_and_or, not_le, not_le] at hu rcases hu with hu | hu · rw [abs_of_neg (by linarith)]; linarith · exact hu.le.trans (le_abs_self u) · intro x a ha simp [minimaxClampLaw, q]
CausalSmith.Stat.LmtpThresholdAtomFrontier.minimaxBump_localizedPerturbation · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:362
theorem localizedBernoulli_witness_eventually

The fixed smooth bump supplies the localized information-bandwidth witness with a product chi-squared bound uniform in the threshold sequence and sample size. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ amplitude D : ℝ,
0 < amplitude
amplitude ≤ 1 / 4
0 < D
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n in atTop, let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar ∃ Q0 Q1 : ClampLaw J, ClampModel Q0 beta kappa L cminus cplus pmin ∧ ClampModel Q1 beta kappa L cminus cplus pmin ∧ IidSampling Q0 n ∧ IidSampling Q1 n ∧ LocalizedBernoulliPerturbation Q0 Q1 beta delta h amplitude ∧ amplitude * delta ^ (kappa + 1) * h ^ beta
≤ |clampFunctional Q1 delta - clampFunctional Q0 delta| ∧
ProperProductChiSq Q1 Q0 n ∧
productChiSq Q1 Q0 n ≤ D
Proof (Lean source)
lemma localizedBernoulli_witness_eventually (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ amplitude D : ℝ, 0 < amplitude ∧ amplitude ≤ 1 / 4 ∧ 0 < D ∧ ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → ∀ᶠ n in atTop, let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar ∃ Q0 Q1 : ClampLaw J, ClampModel Q0 beta kappa L cminus cplus pmin ∧ ClampModel Q1 beta kappa L cminus cplus pmin ∧ IidSampling Q0 n ∧ IidSampling Q1 n ∧ LocalizedBernoulliPerturbation Q0 Q1 beta delta h amplitude ∧ amplitude * delta ^ (kappa + 1) * h ^ beta ≤ |clampFunctional Q1 delta - clampFunctional Q0 delta| ∧ ProperProductChiSq Q1 Q0 n ∧ productChiSq Q1 Q0 n ≤ D := by have hreg' := hreg rcases hreg' with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ obtain ⟨amplitude, hamp, hamp_le, hamp_model⟩ := exists_minimaxBump_amplitude beta L hbeta hL let d0 : ℝ := 8 * (kappa + 1) * amplitude ^ 2 let D : ℝ := Real.exp d0 have hD : 0 < D := Real.exp_pos _ refine ⟨amplitude, D, hamp, hamp_le, hD, ?_⟩ intro deltaSeq hdelta have hbal := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar, hdeltaBar1⟩ deltaSeq hdelta filter_upwards [hbal] with n hbn dsimp only let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let q := fun a : ℝ => amplitude * h ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / h) let Q0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let Q1 := minimaxClampLaw J kappa (fun p => q p.2) have hh : 0 < h := by simpa [h, delta] using hbn.1 have hhbar : h ≤ 1 - deltaBar := by simpa [h, delta] using hbn.2.1 have hh1 : h ≤ 1 := hhbar.trans (by linarith) have hbalance : (n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa = 1 := by simpa [h, delta] using hbn.2.2 have hdeltaN : delta ∈ Icc (0 : ℝ) deltaBar := hdelta n have hdelta1 : delta ∈ Icc (0 : ℝ) 1 := ⟨hdeltaN.1, hdeltaN.2.trans hdeltaBar1.le⟩ have hshape := hamp_model hdelta1.1 hdelta1.2 hh hh1 have hqmeas : Measurable q := by dsimp [q]; fun_prop have hq0 (a : ℝ) : 0 ≤ q a := by dsimp [q] exact mul_nonneg (mul_nonneg hamp.le (Real.rpow_nonneg hh.le _)) (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqle (a : ℝ) : q a ≤ 1 / 4 := by have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a - delta) / h) have hhpow : h ^ beta ≤ 1 := Real.rpow_le_one hh.le hh1 hbeta.le dsimp [q] calc _ ≤ amplitude * h ^ beta * 1 := by gcongr _ ≤ amplitude * 1 := by simpa using mul_le_mul_of_nonneg_left hhpow hamp.le _ ≤ 1 / 4 := by simpa using hamp_le have hqbound (a : ℝ) : |q a| ≤ 1 / 2 := by rw [abs_of_nonneg (hq0 a)] linarith [hqle a] have hqstrict (p : Fin J × ℝ) : |q p.2| < 1 / 2 := by rw [abs_of_nonneg (hq0 p.2)] linarith [hqle p.2] have hQ0 : ClampModel Q0 beta kappa L cminus cplus pmin := by exact minimaxCenter_mem_model J beta kappa L cminus cplus pmin deltaBar alpha hreg have hQ1 : ClampModel Q1 beta kappa L cminus cplus pmin := by apply minimaxClampModel_of_taylor J beta kappa L cminus cplus pmin hJ hbeta hkappa hcminus_le hcplus hpmin_le q hqmeas hqbound exact hshape.1 exact hshape.2.1 exact hshape.2.2 have hpert : LocalizedBernoulliPerturbation Q0 Q1 beta delta h amplitude := by simpa [Q0, Q1, q] using minimaxBump_localizedPerturbation J beta kappa delta h amplitude hbeta hh hh1 hamp hamp_le have hsep0 := minimaxLocalSeparation J beta kappa delta h amplitude hJ hbeta hkappa hdelta1 hh hh1 hamp.le hamp_le have hsep : amplitude * delta ^ (kappa + 1) * h ^ beta ≤ |clampFunctional Q1 delta - clampFunctional Q0 delta| := by have hgap0 : 0 ≤ clampFunctional Q1 delta - clampFunctional Q0 delta := le_trans (mul_nonneg (mul_nonneg hamp.le (Real.rpow_nonneg hdelta1.1 _)) (Real.rpow_nonneg hh.le _)) (by simpa [Q0, Q1, q] using hsep0) rw [abs_of_nonneg hgap0] simpa [Q0, Q1, q] using hsep0 let I : ℝ := ∫ p, 4 * ((fun p : Fin J × ℝ => q p.2) p) ^ 2 ∂minimaxDesignMeasure J kappa have hIle : I ≤ 8 * (kappa + 1) * amplitude ^ 2 * h ^ (2 * beta + 1) * (delta + h) ^ kappa := by simpa [I, q] using minimaxLocal_designIntegral_le J beta kappa delta h amplitude hJ hkappa hdelta1.1 hh hamp.le have hnI : (n : ℝ) * I ≤ d0 := by dsimp [d0] calc (n : ℝ) * I ≤ (n : ℝ) * (8 * (kappa + 1) * amplitude ^ 2 * h ^ (2 * beta + 1) * (delta + h) ^ kappa) := mul_le_mul_of_nonneg_left hIle (Nat.cast_nonneg n) _ = 8 * (kappa + 1) * amplitude ^ 2 := by calc _ = (8 * (kappa + 1) * amplitude ^ 2) * ((n : ℝ) * h ^ (2 * beta + 1) * (delta + h) ^ kappa) := by ring _ = _ := by rw [hbalance, mul_one] have hchiEq := minimaxProduct_chiSqDiv_center J n kappa hJ hkappa (fun p : Fin J × ℝ => q p.2) (hqmeas.comp measurable_snd) hqstrict change 1 + chiSqDiv (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun p : Fin J × ℝ => q p.2))) (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0))) = (1 + I) ^ n at hchiEq have hI0 : 0 ≤ I := integral_nonneg_of_ae (ae_of_all _ fun p => by positivity) have hpow : (1 + I) ^ n ≤ D := by calc (1 + I) ^ n ≤ (Real.exp I) ^ n := pow_le_pow_left₀ (by linarith) (by simpa [add_comm] using Real.add_one_le_exp I) n _ = Real.exp ((n : ℝ) * I) := by rw [Real.exp_nat_mul] _ ≤ Real.exp d0 := Real.exp_le_exp.mpr hnI _ = D := rfl have hchi : productChiSq Q1 Q0 n ≤ D := by change chiSqDiv (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun p : Fin J × ℝ => q p.2))) (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0))) ≤ D linarith [hchiEq, hpow] have hac1 := minimaxDataMeasure_ac_center J kappa hJ hkappa (fun p : Fin J × ℝ => q p.2) (hqmeas.comp measurable_snd) hqstrict have hint1 := minimaxDataMeasure_sq_integrable_center J kappa hJ hkappa (fun p : Fin J × ℝ => q p.2) (hqmeas.comp measurable_snd) hqstrict letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun p : Fin J × ℝ => q p.2)) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ (hqmeas.comp measurable_snd) (fun p => (hqstrict p).le) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ measurable_const (fun _ => by norm_num) have hac : iidProduct Q1 n ≪ iidProduct Q0 n := by simpa [Q0, Q1, iidProduct, minimaxClampLaw] using Causalean.Stat.pi_iid_absolutelyContinuous _ _ hac1 n have hint : Integrable (fun z => (((iidProduct Q1 n).rnDeriv (iidProduct Q0 n) z).toReal - 1) ^ 2) (iidProduct Q0 n) := by simpa [Q0, Q1, iidProduct, minimaxClampLaw] using pi_iid_integrable_sq_dev _ _ hac1 hint1 n exact ⟨Q0, Q1, hQ0, hQ1, clampModel_iidSampling hQ0, clampModel_iidSampling hQ1, hpert, hsep, ⟨hac, hint⟩, hchi⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.localizedBernoulli_witness_eventually · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:430
theorem observedMinimaxRisk_lower_of_two_point

A close pair with a chi-squared budget below four gives an absolute-risk lower bound for the observed minimax problem. The result uses the hP0 condition, the hP1 condition, the hdelta0 condition, the hdelta1 condition, the hgap0 condition, the hsep condition, the hac condition, the hint condition, the hchi0 condition, the hchi4 condition, the hchi condition. This is the stated conclusion.

Formal statement
J :
shared
P0 P1 :
n :
beta kappa L cminus cplus pmin delta gap chi :
hP0 :
ClampModel P0 beta kappa L cminus cplus pmin
hP1 :
ClampModel P1 beta kappa L cminus cplus pmin
hdelta0 :
0 ≤ delta
hdelta1 :
delta ≤ 1
hgap0 :
0 ≤ gap
hsep :
gap ≤ |clampFunctional P1 delta - clampFunctional P0 delta|
hac :
iidProduct P1 n ≪ iidProduct P0 n
hint :
Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)
hchi0 :
0 ≤ chi
hchi4 :
chi < 4
hchi :
productChiSq P1 P0 n ≤ chi
((1 - (1 / 2) * sqrt chi) / 4) * gap
observedMinimaxRisk J n beta kappa L cminus cplus pmin delta
Proof (Lean source)
lemma observedMinimaxRisk_lower_of_two_point (P0 P1 : ClampLaw J) (n : ℕ) (beta kappa L cminus cplus pmin delta gap chi : ℝ) (hP0 : ClampModel P0 beta kappa L cminus cplus pmin) (hP1 : ClampModel P1 beta kappa L cminus cplus pmin) (hdelta0 : 0 ≤ delta) (hdelta1 : delta ≤ 1) (hgap0 : 0 ≤ gap) (hsep : gap ≤ |clampFunctional P1 delta - clampFunctional P0 delta|) (hac : iidProduct P1 n ≪ iidProduct P0 n) (hint : Integrable (fun z => (((iidProduct P1 n).rnDeriv (iidProduct P0 n) z).toReal - 1) ^ 2) (iidProduct P0 n)) (hchi0 : 0 ≤ chi) (hchi4 : chi < 4) (hchi : productChiSq P1 P0 n ≤ chi) : ((1 - (1 / 2) * sqrt chi) / 4) * gap ≤ observedMinimaxRisk J n beta kappa L cminus cplus pmin delta := by let outer : Set ℝ := {r : ℝ | ∃ est : Estimator n J, ObservedMeasurableEstimator est ∧ (∀ z, est z ∈ Icc (0 : ℝ) 1) ∧ r = sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ v = estimatorRisk P n delta est}} change _ ≤ sInf outer have houter : outer.Nonempty := by let est : Estimator n J := fun _ => 0 refine ⟨sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ v = estimatorRisk P n delta est}, est, measurable_const, ?_, rfl⟩ intro z exact ⟨le_rfl, by norm_num⟩ apply le_csInf houter intro r hr rcases hr with ⟨est, hest, hestrange, rfl⟩ let risks : Set ℝ := {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ v = estimatorRisk P n delta est} have hrisk_le (P : ClampLaw J) (hP : ClampModel P beta kappa L cminus cplus pmin) : estimatorRisk P n delta est ≤ 1 := by letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance have htheta := clampFunctional_mem_Icc P hP hdelta0 hdelta1 unfold estimatorRisk have hfint : Integrable (fun z => |est z - clampFunctional P delta|) (iidProduct P n) := by refine Integrable.of_bound ((hest.sub measurable_const).abs.aestronglyMeasurable) 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_abs, abs_le] constructor <;> linarith [(hestrange z).1, (hestrange z).2, htheta.1, htheta.2] calc (∫ z, |est z - clampFunctional P delta| ∂iidProduct P n) ≤ ∫ _z, (1 : ℝ) ∂iidProduct P n := by apply integral_mono_ae hfint (integrable_const 1) exact ae_of_all _ fun z => by rw [abs_le] constructor <;> linarith [(hestrange z).1, (hestrange z).2, htheta.1, htheta.2] (∫ _z, (1 : ℝ) ∂iidProduct P n) = 1 := by simp have hbdd : BddAbove risks := by refine ⟨1, ?_⟩ intro v hv rcases hv with ⟨P, hP, rfl⟩ exact hrisk_le P hP have hle0 : estimatorRisk P0 n delta est ≤ sSup risks := by apply le_csSup hbdd exact ⟨P0, hP0, rfl⟩ have hle1 : estimatorRisk P1 n delta est ≤ sSup risks := by apply le_csSup hbdd exact ⟨P1, hP1, rfl⟩ letI : IsProbabilityMeasure P0.dataMeasure := hP0.probability letI : IsProbabilityMeasure P1.dataMeasure := hP1.probability letI : IsProbabilityMeasure (iidProduct P0 n) := by unfold iidProduct infer_instance letI : IsProbabilityMeasure (iidProduct P1 n) := by unfold iidProduct infer_instance have htest := two_point_lower_bound_of_chiSqDiv_le (P₀ := iidProduct P1 n) (P₁ := iidProduct P0 n) hest (θ₀ := clampFunctional P1 delta) (θ₁ := clampFunctional P0 delta) (s := gap / 2) (c := chi) (by convert hsep using 1 <;> ring) hac hint hchi have hfloor : 0 < (1 - (1 / 2) * sqrt chi) / 2 := by have hsqrt : sqrt chi < 2 := by rw [Real.sqrt_lt' (by norm_num : (0 : ℝ) < 2)] convert hchi4 using 1 <;> norm_num linarith have hint0 : Integrable (fun z => |est z - clampFunctional P0 delta|) (iidProduct P0 n) := by refine Integrable.of_bound ((hest.sub measurable_const).abs.aestronglyMeasurable) 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_abs] have ht := clampFunctional_mem_Icc P0 hP0 hdelta0 hdelta1 rw [abs_le] constructor <;> linarith [(hestrange z).1, (hestrange z).2, ht.1, ht.2] have hint1 : Integrable (fun z => |est z - clampFunctional P1 delta|) (iidProduct P1 n) := by refine Integrable.of_bound ((hest.sub measurable_const).abs.aestronglyMeasurable) 1 ?_ filter_upwards with z rw [Real.norm_eq_abs, abs_abs] have ht := clampFunctional_mem_Icc P1 hP1 hdelta0 hdelta1 rw [abs_le] constructor <;> linarith [(hestrange z).1, (hestrange z).2, ht.1, ht.2] have hevent0 := mul_meas_ge_le_integral_of_nonneg (ae_of_all _ fun z => abs_nonneg (est z - clampFunctional P1 delta)) hint1 (gap / 2) have hevent1 := mul_meas_ge_le_integral_of_nonneg (ae_of_all _ fun z => abs_nonneg (est z - clampFunctional P0 delta)) hint0 (gap / 2) have hmaxEvent : ((1 - (1 / 2) * sqrt chi) / 2) * (gap / 2) ≤ max (estimatorRisk P1 n delta est) (estimatorRisk P0 n delta est) := by unfold estimatorRisk have hg2 : 0 ≤ gap / 2 := by positivity calc _ ≤ (gap / 2) * max ((iidProduct P1 n).real {z | gap / 2 ≤ |est z - clampFunctional P1 delta|}) ((iidProduct P0 n).real {z | gap / 2 ≤ |est z - clampFunctional P0 delta|}) := by rw [mul_comm] exact mul_le_mul_of_nonneg_left htest hg2 _ = max ((gap / 2) * (iidProduct P1 n).real {z | gap / 2 ≤ |est z - clampFunctional P1 delta|}) ((gap / 2) * (iidProduct P0 n).real {z | gap / 2 ≤ |est z - clampFunctional P0 delta|}) := by rw [mul_max_of_nonneg _ _ hg2] _ ≤ _ := max_le_max hevent0 hevent1 calc ((1 - (1 / 2) * sqrt chi) / 4) * gap = ((1 - (1 / 2) * sqrt chi) / 2) * (gap / 2) := by ring _ ≤ max (estimatorRisk P1 n delta est) (estimatorRisk P0 n delta est) := hmaxEvent _ ≤ sSup risks := max_le hle1 hle0
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxRisk_lower_of_two_point · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:582
theorem observedMinimaxRisk_eventually_ge_root

A quarter-strength constant Bernoulli shift gives the parametric component of the minimax lower bound while keeping chi-squared below four. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, c * (n : ℝ) ^ (-(1 : ℝ) / 2)
observedMinimaxRisk J n beta kappa L cminus cplus pmin (deltaSeq n)
Proof (Lean source)
lemma observedMinimaxRisk_eventually_ge_root (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, c * (n : ℝ) ^ (-(1 : ℝ) / 2) ≤ observedMinimaxRisk J n beta kappa L cminus cplus pmin (deltaSeq n) := by rcases hreg with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ let chi : ℝ := exp (1 / 4 : ℝ) - 1 let floor : ℝ := (1 - (1 / 2) * sqrt chi) / 4 let c : ℝ := floor / 4 have hchi0 : 0 ≤ chi := by dsimp [chi] exact sub_nonneg.mpr (Real.one_le_exp (by norm_num)) have hchi4 : chi < 4 := by dsimp [chi] have he : exp (1 / 4 : ℝ) < exp 1 := Real.exp_lt_exp.mpr (by norm_num) linarith [Real.exp_one_lt_three] have hfloor : 0 < floor := by dsimp [floor] have hs : sqrt chi < 2 := by rw [Real.sqrt_lt' (by norm_num : (0 : ℝ) < 2)] convert hchi4 using 1 <;> norm_num linarith refine ⟨c, by dsimp [c]; positivity, ?_⟩ intro deltaSeq hdelta filter_upwards [eventually_ge_atTop 1] with n hn have hnpos : 0 < n := by omega have hnR : 0 < (n : ℝ) := by exact_mod_cast hnpos let root : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) let eps : ℝ := (1 / 4 : ℝ) * root have hroot : 0 < root := Real.rpow_pos_of_pos hnR _ have heps : 0 < eps := mul_pos (by norm_num) hroot have hepsq : eps ≤ 1 / 4 := by have hroot1 : root ≤ 1 := by rw [show (1 : ℝ) = 1 ^ (-(1 : ℝ) / 2) by norm_num] exact Real.rpow_le_rpow_of_nonpos (by norm_num) (by exact_mod_cast hn) (by norm_num) dsimp [eps] nlinarith have hepsb : |eps| ≤ 1 / 2 := by rw [abs_of_pos heps]; linarith let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let P1 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps) have hP0 : ClampModel P0 beta kappa L cminus cplus pmin := minimaxCenter_mem_model J beta kappa L cminus cplus pmin deltaBar alpha ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ have hP1 : ClampModel P1 beta kappa L cminus cplus pmin := minimaxConstant_mem_model J beta kappa L cminus cplus pmin deltaBar alpha eps ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ hepsb have hdelta1 : deltaSeq n ∈ Icc (0 : ℝ) 1 := ⟨(hdelta n).1, (hdelta n).2.trans hdeltaBar1.le⟩ have hsepEq := minimaxGlobalSeparation J kappa (deltaSeq n) eps hJ hkappa hdelta1 hepsb have hsep : eps ≤ |clampFunctional P1 (deltaSeq n) - clampFunctional P0 (deltaSeq n)| := by rw [show P1 = minimaxClampLaw J kappa (fun _ : Fin J × ℝ => eps) by rfl, show P0 = minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) by rfl, hsepEq, abs_of_pos heps] have hrootSq : root ^ 2 = (n : ℝ)⁻¹ := by dsimp [root] rw [← Real.rpow_natCast, ← Real.rpow_mul hnR.le] norm_num rw [Real.rpow_neg_one] have hepsSq : eps ^ 2 = (1 / 16 : ℝ) * (n : ℝ)⁻¹ := by dsimp [eps] rw [mul_pow, hrootSq] norm_num letI : IsProbabilityMeasure (minimaxDesignMeasure J kappa) := minimaxDesignMeasure_isProbabilityMeasure J kappa hJ hkappa have hintEq : (∫ p, 4 * ((fun _ : Fin J × ℝ => eps) p) ^ 2 ∂minimaxDesignMeasure J kappa) = 4 * eps ^ 2 := by simp have hchiEq := minimaxProduct_chiSqDiv_center J n kappa hJ hkappa (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => by rw [abs_of_pos heps]; linarith [hepsq]) rw [hintEq] at hchiEq have hnE : (n : ℝ) * (4 * eps ^ 2) = 1 / 4 := by rw [hepsSq] field_simp [hnR.ne'] ring have hpow : (1 + 4 * eps ^ 2) ^ n ≤ exp (1 / 4 : ℝ) := by calc _ ≤ (exp (4 * eps ^ 2)) ^ n := pow_le_pow_left₀ (by positivity) (by simpa [add_comm] using Real.add_one_le_exp (4 * eps ^ 2)) n _ = exp ((n : ℝ) * (4 * eps ^ 2)) := by rw [Real.exp_nat_mul] _ = _ := by rw [hnE] have hchi : productChiSq P1 P0 n ≤ chi := by change chiSqDiv (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps))) (Measure.pi (fun _ : Fin n => minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0))) ≤ chi dsimp [chi] linarith [hchiEq, hpow] have hac1 := minimaxDataMeasure_ac_center J kappa hJ hkappa (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => by rw [abs_of_pos heps]; linarith [hepsq]) have hint1 := minimaxDataMeasure_sq_integrable_center J kappa hJ hkappa (fun _ : Fin J × ℝ => eps) measurable_const (fun _ => by rw [abs_of_pos heps]; linarith [hepsq]) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => eps)) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ measurable_const (fun _ => hepsb) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ measurable_const (fun _ => by norm_num) have hac := pi_iid_absolutelyContinuous _ _ hac1 n have hint := pi_iid_integrable_sq_dev _ _ hac1 hint1 n have hlower := observedMinimaxRisk_lower_of_two_point P0 P1 n beta kappa L cminus cplus pmin (deltaSeq n) eps chi hP0 hP1 hdelta1.1 hdelta1.2 heps.le hsep (by simpa [P0, P1, iidProduct, minimaxClampLaw] using hac) (by simpa [P0, P1, iidProduct, minimaxClampLaw] using hint) hchi0 hchi4 hchi dsimp [c, floor, eps, root] at hlower ⊢ convert hlower using 1 <;> ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxRisk_eventually_ge_root · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:715
theorem observedMinimaxRisk_eventually_ge_local

A fixed contraction of the information bandwidth makes the localized experiment close while preserving the local frontier order. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ c : ℝ,
0 < c
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
∀ᶠ n : ℕ in atTop, let h := infoBandwidth n (deltaSeq n) beta kappa deltaBar c * (deltaSeq n) ^ (kappa + 1) * h ^ beta
observedMinimaxRisk J n beta kappa L cminus cplus pmin (deltaSeq n)
Proof (Lean source)
lemma observedMinimaxRisk_eventually_ge_local (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ c : ℝ, 0 < c ∧ ∀ deltaSeq : ℕ → ℝ, ThresholdSequence deltaBar deltaSeq → ∀ᶠ n : ℕ in atTop, let h := infoBandwidth n (deltaSeq n) beta kappa deltaBar c * (deltaSeq n) ^ (kappa + 1) * h ^ beta ≤ observedMinimaxRisk J n beta kappa L cminus cplus pmin (deltaSeq n) := by have hr := hreg rcases hr with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ obtain ⟨amplitude, hamp, hamp_le, hamp_model⟩ := exists_minimaxBump_amplitude beta L hbeta hL let d0 : ℝ := 8 * (kappa + 1) * amplitude ^ 2 let p : ℝ := 2 * beta + 1 let t : ℝ := exp (-(d0 + 1) / p) let chi : ℝ := exp 1 - 1 let floor : ℝ := (1 - (1 / 2) * sqrt chi) / 4 let c : ℝ := floor * amplitude * t ^ beta have hd0 : 0 ≤ d0 := by dsimp [d0]; positivity have hp : 0 < p := by dsimp [p]; linarith have ht : 0 < t := Real.exp_pos _ have ht1 : t ≤ 1 := by dsimp [t] rw [Real.exp_le_one_iff] exact div_nonpos_of_nonpos_of_nonneg (neg_nonpos.mpr (by linarith)) hp.le have htp : t ^ p = exp (-(d0 + 1)) := by dsimp [t] rw [← Real.exp_mul] congr 1 field_simp [hp.ne'] have hdsmall : d0 * t ^ p ≤ 1 := by rw [htp] have hdexp : d0 ≤ exp d0 := by exact (Real.add_one_le_exp d0).trans' (by linarith) calc d0 * exp (-(d0 + 1)) ≤ exp d0 * exp (-(d0 + 1)) := mul_le_mul_of_nonneg_right hdexp (Real.exp_pos _).le _ = exp (-1) := by rw [← Real.exp_add]; congr 1; ring _ ≤ 1 := Real.exp_le_one_iff.mpr (by norm_num) have hchi0 : 0 ≤ chi := by dsimp [chi]; exact sub_nonneg.mpr (Real.one_le_exp zero_le_one) have hchi4 : chi < 4 := by dsimp [chi]; linarith [Real.exp_one_lt_three] have hfloor : 0 < floor := by dsimp [floor] have hs : sqrt chi < 2 := by rw [Real.sqrt_lt' (by norm_num : (0 : ℝ) < 2)] convert hchi4 using 1 <;> norm_num linarith refine ⟨c, by dsimp [c]; positivity, ?_⟩ intro deltaSeq hdelta have hbal := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar, hdeltaBar1⟩ deltaSeq hdelta filter_upwards [hbal] with n hbn dsimp only let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let hs := t * h let q := fun a : ℝ => amplitude * hs ^ beta * CausalSmith.Stat.DoseResponseMinimax.doseBump ((a - delta) / hs) let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) let P1 := minimaxClampLaw J kappa (fun z => q z.2) have hh : 0 < h := hbn.1 have hh1 : h ≤ 1 := hbn.2.1.trans (by linarith) have hhs : 0 < hs := mul_pos ht hh have hhs1 : hs ≤ 1 := (mul_le_of_le_one_left hh.le ht1).trans hh1 have hd : delta ∈ Icc (0 : ℝ) 1 := ⟨(hdelta n).1, (hdelta n).2.trans hdeltaBar1.le⟩ have hshape := hamp_model hd.1 hd.2 hhs hhs1 have hqmeas : Measurable q := by dsimp [q]; fun_prop have hq0 (a : ℝ) : 0 ≤ q a := by dsimp [q] exact mul_nonneg (mul_nonneg hamp.le (Real.rpow_nonneg hhs.le _)) (CausalSmith.Stat.DoseResponseMinimax.doseBump_nonneg _) have hqbound (a : ℝ) : |q a| ≤ 1 / 2 := by rw [abs_of_nonneg (hq0 a)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((a-delta)/hs) have hpw := Real.rpow_le_one hhs.le hhs1 hbeta.le dsimp [q] calc _ ≤ amplitude * hs ^ beta := by nlinarith [mul_nonneg hamp.le (Real.rpow_nonneg hhs.le beta)] _ ≤ amplitude := by simpa using mul_le_mul_of_nonneg_left hpw hamp.le _ ≤ 1 / 2 := by linarith have hqstrict (z : Fin J × ℝ) : |q z.2| < 1 / 2 := by rw [abs_of_nonneg (hq0 z.2)] have hb := CausalSmith.Stat.DoseResponseMinimax.doseBump_le_one ((z.2-delta)/hs) have hpw := Real.rpow_le_one hhs.le hhs1 hbeta.le have : q z.2 ≤ amplitude := by dsimp [q] calc _ ≤ amplitude * hs ^ beta := by nlinarith [mul_nonneg hamp.le (Real.rpow_nonneg hhs.le beta)] _ ≤ amplitude := by simpa using mul_le_mul_of_nonneg_left hpw hamp.le linarith [hamp_le] have hP0 := minimaxCenter_mem_model J beta kappa L cminus cplus pmin deltaBar alpha hreg have hP1 : ClampModel P1 beta kappa L cminus cplus pmin := by apply minimaxClampModel_of_taylor J beta kappa L cminus cplus pmin hJ hbeta hkappa hcminus_le hcplus hpmin_le q hqmeas hqbound exact hshape.1 exact hshape.2.1 exact hshape.2.2 have hsep0 := minimaxLocalSeparation J beta kappa delta hs amplitude hJ hbeta hkappa hd hhs hhs1 hamp.le hamp_le have hsep : amplitude * delta ^ (kappa + 1) * hs ^ beta ≤ |clampFunctional P1 delta - clampFunctional P0 delta| := by have hn : 0 ≤ clampFunctional P1 delta - clampFunctional P0 delta := (mul_nonneg (mul_nonneg hamp.le (Real.rpow_nonneg hd.1 _)) (Real.rpow_nonneg hhs.le _)).trans (by simpa [P0, P1, q] using hsep0) rw [abs_of_nonneg hn] simpa [P0, P1, q] using hsep0 let I := ∫ z, 4 * ((fun z : Fin J × ℝ => q z.2) z)^2 ∂minimaxDesignMeasure J kappa have hI := minimaxLocal_designIntegral_le J beta kappa delta hs amplitude hJ hkappa hd.1 hhs hamp.le have hnI : (n : ℝ) * I ≤ 1 := by have hw : delta + hs ≤ delta + h := by dsimp [hs]; nlinarith [mul_le_of_le_one_left hh.le ht1] have hpoww := Real.rpow_le_rpow (add_nonneg hd.1 hhs.le) hw hkappa have hb := hbn.2.2 calc _ ≤ (n : ℝ) * (8*(kappa+1)*amplitude^2*hs^(2*beta+1)*(delta+hs)^kappa) := mul_le_mul_of_nonneg_left (by simpa [I, q] using hI) (Nat.cast_nonneg n) _ ≤ d0 * t ^ p * ((n:ℝ)*h^(2*beta+1)*(delta+h)^kappa) := by dsimp [d0, p, hs] rw [Real.mul_rpow ht.le hh.le] ring_nf gcongr _ = d0 * t ^ p := by rw [hb, mul_one] _ ≤ 1 := hdsmall have hchiEq := minimaxProduct_chiSqDiv_center J n kappa hJ hkappa (fun z : Fin J × ℝ => q z.2) (hqmeas.comp measurable_snd) hqstrict have hpow : (1 + I)^n ≤ exp 1 := by calc _ ≤ (exp I)^n := pow_le_pow_left₀ (by positivity) (by simpa [add_comm] using Real.add_one_le_exp I) n _ = exp ((n:ℝ)*I) := by rw [Real.exp_nat_mul] _ ≤ _ := Real.exp_le_exp.mpr hnI have hchi : productChiSq P1 P0 n ≤ chi := by change chiSqDiv _ _ ≤ chi dsimp [chi, P0, P1, iidProduct, minimaxClampLaw] change chiSqDiv _ _ ≤ exp 1 - 1 change 1 + chiSqDiv _ _ = (1+I)^n at hchiEq linarith have hac1 : minimaxDataMeasure J kappa (fun z : Fin J × ℝ => q z.2) ≪ minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0) := minimaxDataMeasure_ac_center J kappa hJ hkappa _ (hqmeas.comp measurable_snd) hqstrict have hint1 : Integrable (fun o => (((minimaxDataMeasure J kappa (fun z : Fin J × ℝ => q z.2)).rnDeriv (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) o).toReal - 1) ^ 2) (minimaxDataMeasure J kappa (fun _ : Fin J × ℝ => 0)) := by exact minimaxDataMeasure_sq_integrable_center J kappa hJ hkappa _ (hqmeas.comp measurable_snd) hqstrict letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun z : Fin J×ℝ => q z.2)) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ (hqmeas.comp measurable_snd) (fun z => hqstrict z |>.le) letI : IsProbabilityMeasure (minimaxDataMeasure J kappa (fun _ : Fin J×ℝ => 0)) := minimaxDataMeasure_isProbabilityMeasure J kappa hJ hkappa _ measurable_const (fun _ => by norm_num) have hl := observedMinimaxRisk_lower_of_two_point P0 P1 n beta kappa L cminus cplus pmin delta (amplitude*delta^(kappa+1)*hs^beta) chi hP0 hP1 hd.1 hd.2 (mul_nonneg (mul_nonneg hamp.le (Real.rpow_nonneg hd.1 _)) (Real.rpow_nonneg hhs.le _)) hsep (by simpa [P0,P1,iidProduct,minimaxClampLaw] using pi_iid_absolutelyContinuous _ _ hac1 n) (by simpa [P0,P1,iidProduct,minimaxClampLaw] using pi_iid_integrable_sq_dev _ _ hac1 hint1 n) hchi0 hchi4 hchi dsimp [c, floor, hs] rw [Real.mul_rpow ht.le hh.le] at hl convert hl using 1 <;> ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxRisk_eventually_ge_local · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:839
theorem observedMinimaxRisk_le_stabilizedWorstRisk

The concrete stabilized estimator is an admissible competitor in the observed minimax problem. The result uses the hreg condition, the hdelta condition. This is the stated conclusion.

Formal statement
J n :
B :
beta kappa L cminus cplus pmin deltaBar alpha delta :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
hdelta :
delta ∈ Icc (0 : ℝ) 1
observedMinimaxRisk J n beta kappa L cminus cplus pmin delta
stabilizedWorstRisk J n B beta kappa L cminus cplus pmin deltaBar delta
Proof (Lean source)
lemma observedMinimaxRisk_le_stabilizedWorstRisk (J n : ℕ) (B : SplitBlocks n) (beta kappa L cminus cplus pmin deltaBar alpha delta : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) (hdelta : delta ∈ Icc (0 : ℝ) 1) : observedMinimaxRisk J n beta kappa L cminus cplus pmin delta ≤ stabilizedWorstRisk J n B beta kappa L cminus cplus pmin deltaBar delta := by let est : Estimator n J := fun z => totalGramEstimator B z (ellOf beta) kappa cminus cplus delta (infoBandwidth n delta beta kappa deltaBar) let outer : Set ℝ := {r : ℝ | ∃ e : Estimator n J, ObservedMeasurableEstimator e ∧ (∀ z, e z ∈ Icc (0 : ℝ) 1) ∧ r = sSup {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ v = estimatorRisk P n delta e}} change sInf outer ≤ _ have houterBelow : BddBelow outer := by refine ⟨0, ?_⟩ intro r hr rcases hr with ⟨e, hemeas, herange, rfl⟩ let risks : Set ℝ := {v : ℝ | ∃ P : ClampLaw J, ClampModel P beta kappa L cminus cplus pmin ∧ v = estimatorRisk P n delta e} have hrisk_le (P : ClampLaw J) (hP : ClampModel P beta kappa L cminus cplus pmin) : estimatorRisk P n delta e ≤ 1 := by letI : IsProbabilityMeasure P.dataMeasure := hP.probability letI : IsProbabilityMeasure (iidProduct P n) := by unfold iidProduct infer_instance have htheta := clampFunctional_mem_Icc P hP hdelta.1 hdelta.2 unfold estimatorRisk calc (∫ z, |e z - clampFunctional P delta| ∂iidProduct P n) ≤ ∫ _z, (1 : ℝ) ∂iidProduct P n := by apply integral_mono_ae · exact Integrable.of_bound ((hemeas.sub measurable_const).abs.aestronglyMeasurable) 1 (ae_of_all _ fun z => by rw [Real.norm_eq_abs, abs_abs, abs_le] constructor <;> linarith [(herange z).1, (herange z).2, htheta.1, htheta.2]) · exact integrable_const 1 · exact ae_of_all _ fun z => by rw [abs_le] constructor <;> linarith [(herange z).1, (herange z).2, htheta.1, htheta.2] _ = 1 := by simp have hbdd : BddAbove risks := by refine ⟨1, ?_⟩ rintro v ⟨P, hP, rfl⟩ exact hrisk_le P hP let P0 := minimaxClampLaw J kappa (fun _ : Fin J × ℝ => 0) have hP0 : ClampModel P0 beta kappa L cminus cplus pmin := minimaxCenter_mem_model J beta kappa L cminus cplus pmin deltaBar alpha hreg have hrisk0 : 0 ≤ estimatorRisk P0 n delta e := by unfold estimatorRisk exact integral_nonneg_of_ae (ae_of_all _ fun z => abs_nonneg _) exact hrisk0.trans (le_csSup hbdd ⟨P0, hP0, rfl⟩) apply csInf_le houterBelow refine ⟨est, ?_, ?_, ?_⟩ · exact totalGramEstimator_measurable B kappa cminus cplus delta _ · intro z exact clampUnit_mem_Icc _ · unfold stabilizedWorstRisk congr 1 ext v constructor · rintro ⟨P, hP, hsample, hv⟩ refine ⟨P, hP, ?_⟩ simpa [stabilizedEstimatorRisk, est] using hv · rintro ⟨P, hP, hv⟩ refine ⟨P, hP, clampModel_iidSampling hP, ?_⟩ simpa [stabilizedEstimatorRisk, est] using hv
CausalSmith.Stat.LmtpThresholdAtomFrontier.observedMinimaxRisk_le_stabilizedWorstRisk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:1011
theorem clamp_minimax_risk Theorem 1 in the paper ↗

The minimax risk and concrete estimator risk are both comparable to the regular-plus-atom frontier, with explicit global and localized witnesses. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
∃ c C amplitude : ℝ,
0 < c
c < C
0 < amplitude
amplitude ≤ 1 / 4
conclusion 1
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
Bseq :
∀ n
SplitBlocks n, ∀ᶠ n in atTop, let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r := clampFrontier n delta kappa h beta c * r
observedMinimaxRisk J n beta kappa L cminus cplus pmin delta
observedMinimaxRisk J n beta kappa L cminus cplus pmin delta
stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta
stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta ≤ C * r ∧
(∃ P0 P1 : ClampLaw J, ClampModel P0 beta kappa L cminus cplus pmin ∧ ClampModel P1 beta kappa L cminus cplus pmin ∧ IidSampling P0 n ∧ IidSampling P1 n ∧ GlobalBernoulliShift P0 P1 ((n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ c * (n : ℝ) ^ (-(1 : ℝ) / 2) ≤ |clampFunctional P1 delta - clampFunctional P0 delta| ∧ ProperProductChiSq P1 P0 n ∧ productChiSq P1 P0 n ≤ C) ∧
(∃ Q0 Q1 : ClampLaw J, ClampModel Q0 beta kappa L cminus cplus pmin ∧ ClampModel Q1 beta kappa L cminus cplus pmin ∧ IidSampling Q0 n ∧ IidSampling Q1 n ∧ LocalizedBernoulliPerturbation Q0 Q1 beta delta h amplitude ∧ c * delta ^ (kappa + 1) * h ^ beta ≤ |clampFunctional Q1 delta - clampFunctional Q0 delta| ∧ ProperProductChiSq Q1 Q0 n ∧ productChiSq Q1 Q0 n ≤ C)
Proof (Lean source)
-- @node: thm:minimax-risk theorem clamp_minimax_risk (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∃ c C amplitude : ℝ, 0 < c ∧ c < C ∧ 0 < amplitude ∧ amplitude ≤ 1 / 4 ∧ ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → ∀ Bseq : ∀ n, SplitBlocks n, ∀ᶠ n in atTop, let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r := clampFrontier n delta kappa h beta c * r ≤ observedMinimaxRisk J n beta kappa L cminus cplus pmin delta ∧ observedMinimaxRisk J n beta kappa L cminus cplus pmin delta ≤ stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta ∧ stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta ≤ C * r ∧ (∃ P0 P1 : ClampLaw J, ClampModel P0 beta kappa L cminus cplus pmin ∧ ClampModel P1 beta kappa L cminus cplus pmin ∧ IidSampling P0 n ∧ IidSampling P1 n ∧ GlobalBernoulliShift P0 P1 ((n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ c * (n : ℝ) ^ (-(1 : ℝ) / 2) ≤ |clampFunctional P1 delta - clampFunctional P0 delta| ∧ ProperProductChiSq P1 P0 n ∧ productChiSq P1 P0 n ≤ C) ∧ (∃ Q0 Q1 : ClampLaw J, ClampModel Q0 beta kappa L cminus cplus pmin ∧ ClampModel Q1 beta kappa L cminus cplus pmin ∧ IidSampling Q0 n ∧ IidSampling Q1 n ∧ LocalizedBernoulliPerturbation Q0 Q1 beta delta h amplitude ∧ c * delta ^ (kappa + 1) * h ^ beta ≤ |clampFunctional Q1 delta - clampFunctional Q0 delta| ∧ ProperProductChiSq Q1 Q0 n ∧ productChiSq Q1 Q0 n ≤ C) := by have hreg' := hreg rcases hreg' with ⟨hJ, hbeta, hkappa, hL, hcminus, hcminus_le, hcplus, hpmin, hpmin_le, hdeltaBar, hdeltaBar1, halpha, halpha1⟩ rcases stabilizedWorstRisk_eventually_le_frontier J beta kappa L cminus cplus pmin deltaBar alpha hreg with ⟨Cupper, hCupper, hupper⟩ rcases observedMinimaxRisk_eventually_ge_root J beta kappa L cminus cplus pmin deltaBar alpha hreg with ⟨croot, hcroot, hroot⟩ rcases observedMinimaxRisk_eventually_ge_local J beta kappa L cminus cplus pmin deltaBar alpha hreg with ⟨clocal, hclocal, hlocal⟩ rcases localizedBernoulli_witness_eventually J beta kappa L cminus cplus pmin deltaBar alpha hreg with ⟨amplitude, D, hamp, hamp_le, hD, hwitnessLocal⟩ let core : ℝ := min croot (min clocal (min (1 / 2 : ℝ) amplitude)) let c : ℝ := core / 2 let C : ℝ := Cupper + D + exp 4 + c + 1 have hcore : 0 < core := by dsimp [core] exact lt_min hcroot (lt_min hclocal (lt_min (by norm_num) hamp)) have hc : 0 < c := div_pos hcore (by norm_num) have h2c_root : 2 * c ≤ croot := by dsimp [c, core] nlinarith [min_le_left croot (min clocal (min (1 / 2 : ℝ) amplitude))] have h2c_local : 2 * c ≤ clocal := by dsimp [c, core] have hm := min_le_right croot (min clocal (min (1 / 2 : ℝ) amplitude)) have hm' := min_le_left clocal (min (1 / 2 : ℝ) amplitude) linarith have hc_half : c ≤ 1 / 2 := by dsimp [c, core] have hm := min_le_right croot (min clocal (min (1 / 2 : ℝ) amplitude)) have hm' := min_le_right clocal (min (1 / 2 : ℝ) amplitude) have hm'' := min_le_left (1 / 2 : ℝ) amplitude linarith have hc_amp : c ≤ amplitude := by dsimp [c, core] have hm := min_le_right croot (min clocal (min (1 / 2 : ℝ) amplitude)) have hm' := min_le_right clocal (min (1 / 2 : ℝ) amplitude) have hm'' := min_le_right (1 / 2 : ℝ) amplitude linarith have hC : 0 < C := by dsimp [C]; positivity have hcC : c < C := by dsimp [C] nlinarith [hCupper, hD, Real.exp_pos 4] have hCupperC : Cupper ≤ C := by dsimp [C] nlinarith [hD, Real.exp_pos 4, hc] have hDC : D ≤ C := by dsimp [C] nlinarith [hCupper, Real.exp_pos 4, hc] have hexpC : exp 4 ≤ C := by dsimp [C] nlinarith [hCupper, hD, hc] refine ⟨c, C, amplitude, hc, hcC, hamp, hamp_le, ?_⟩ intro deltaSeq hdelta Bseq have heu := hupper deltaSeq hdelta Bseq have her := hroot deltaSeq hdelta have hel := hlocal deltaSeq hdelta have heg := globalBernoulli_witness_eventually J beta kappa L cminus cplus pmin deltaBar alpha hreg deltaSeq hdelta have hew := hwitnessLocal deltaSeq hdelta have heb := infoBandwidth_eventually_balance beta kappa deltaBar hbeta hkappa ⟨hdeltaBar, hdeltaBar1⟩ deltaSeq hdelta filter_upwards [heu, her, hel, heg, hew, heb] with n hun hrn hln hgn hwn hbn dsimp only let delta := deltaSeq n let h := infoBandwidth n delta beta kappa deltaBar let r0 : ℝ := (n : ℝ) ^ (-(1 : ℝ) / 2) let a0 : ℝ := delta ^ (kappa + 1) * h ^ beta have hdelta1 : delta ∈ Icc (0 : ℝ) 1 := ⟨(hdelta n).1, (hdelta n).2.trans hdeltaBar1.le⟩ have hr0 : 0 ≤ r0 := Real.rpow_nonneg (Nat.cast_nonneg n) _ have ha0 : 0 ≤ a0 := mul_nonneg (Real.rpow_nonneg (hdelta n).1 _) (Real.rpow_nonneg (by simpa [h, delta] using hbn.1.le) _) have hlower : c * (r0 + a0) ≤ observedMinimaxRisk J n beta kappa L cminus cplus pmin delta := by have hprod0 : 0 ≤ (croot - 2 * c) * r0 := mul_nonneg (sub_nonneg.mpr h2c_root) hr0 have hprod1 : 0 ≤ (clocal - 2 * c) * a0 := mul_nonneg (sub_nonneg.mpr h2c_local) ha0 change croot * r0 ≤ observedMinimaxRisk J n beta kappa L cminus cplus pmin delta at hrn have hln' : clocal * a0 ≤ observedMinimaxRisk J n beta kappa L cminus cplus pmin delta := by dsimp at hln convert hln using 1 <;> simp [a0, delta, h] <;> ring nlinarith have hmiddle := observedMinimaxRisk_le_stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar alpha delta hreg hdelta1 have hr : 0 ≤ clampFrontier n delta kappa h beta := by exact add_nonneg hr0 ha0 have hupper' : stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar delta ≤ C * clampFrontier n delta kappa h beta := hun.trans (mul_le_mul_of_nonneg_right hCupperC hr) rcases hgn with ⟨P0, P1, hP0, hP1, hiid0, hiid1, hshift, hsepG, hproperG, hchiG⟩ rcases hwn with ⟨Q0, Q1, hQ0, hQ1, hqiid0, hqiid1, hpert, hsepL, hproperL, hchiL⟩ have hsepG' : c * r0 ≤ |clampFunctional P1 delta - clampFunctional P0 delta| := (mul_le_mul_of_nonneg_right hc_half hr0).trans (by simpa [r0, delta] using hsepG) have hsepL' : c * a0 ≤ |clampFunctional Q1 delta - clampFunctional Q0 delta| := by have hampsep : amplitude * a0 ≤ |clampFunctional Q1 delta - clampFunctional Q0 delta| := by convert hsepL using 1 <;> simp [a0, delta, h] <;> ring exact (mul_le_mul_of_nonneg_right hc_amp ha0).trans hampsep refine ⟨?_, hmiddle, hupper', ?_, ?_⟩ · simpa [clampFrontier, r0, a0, delta, h] using hlower · exact ⟨P0, P1, hP0, hP1, hiid0, hiid1, by simpa [r0] using hshift, hsepG', hproperG, hchiG.trans hexpC⟩ · refine ⟨Q0, Q1, hQ0, hQ1, hqiid0, hqiid1, by simpa [delta, h] using hpert, ?_, hproperL, hchiL.trans hDC⟩ convert hsepL' using 1 <;> simp [a0, delta, h] <;> ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.clamp_minimax_risk · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TMinimaxRisk.lean:1089
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.TOneCellCalibration 12 declarations The concrete one-stratum design has density 2a, a triangular width-h Bernoulli regression perturbation, its exact integrated KL, and target separation.

One-cell early-kill calibration

The concrete one-stratum design has density 2a, a triangular width-h Bernoulli regression perturbation, its exact integrated KL, and target separation.

def oneCellDensity

The concrete one-cell assignment density.

Definition (Lean source)
a :
oneCellDensity a :
2 * a
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellDensity · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:23
def oneCellTent

Unit triangular localization around the moving threshold.

Definition (Lean source)
delta h a :
oneCellTent delta h a :
max 0 (1 - |a - delta| / h)
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellTent · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:27
def oneCellRegression0

Null Bernoulli regression.

Definition (Lean source)
_a :
oneCellRegression0 _a :
1 / 2
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellRegression0 · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:30
def oneCellRegression1

Width-h, height-h localized Bernoulli alternative for beta one.

Definition (Lean source)
delta h a :
oneCellRegression1 delta h a :
1 / 2 + h * oneCellTent delta h a
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellRegression1 · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:33
def oneCellProductKL

Product KL of the concrete localized Bernoulli alternatives.

Definition (Lean source)
n :
delta h :
oneCellProductKL n delta h :
(n : ℝ) * ∫ a in Icc (0 : ℝ) 1, (klDiv (bernoulliLaw (oneCellRegression1 delta h a)) (bernoulliLaw (oneCellRegression0 a))).toReal * oneCellDensity a
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellProductKL · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:37
def oneCellTargetSeparation

Total clamp-target separation of the concrete one-cell pair: the retained- course integral plus the collapsed-atom contribution.

Definition (Lean source)
delta h :
oneCellTargetSeparation delta h :
(∫ a in Ioc delta 1, (oneCellRegression1 delta h a - oneCellRegression0 a) * oneCellDensity a)
+ (∫ a in Icc (0 : ℝ) delta, oneCellDensity a) * (oneCellRegression1 delta h delta - oneCellRegression0 delta)
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellTargetSeparation · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:45
theorem oneCellTargetSeparation_eq Lemma oneCellTargetSeparation_eq in the paper ↗

On an interior right-hand localization window, the one-cell target separation is the atom contribution plus the exact retained-course integral. The result uses the hdelta condition, the hh condition, the hwindow condition. This is the stated conclusion.

Formal statement
delta h :
hdelta :
0 ≤ delta
hh :
0 < h
hwindow :
delta + h ≤ 1
oneCellTargetSeparation delta h = delta ^ 2 * h + delta * h ^ 2 + h ^ 3 / 3
Proof (Lean source)
-- @node: oneCellTargetSeparation_eq lemma oneCellTargetSeparation_eq (delta h : ℝ) (hdelta : 0 ≤ delta) (hh : 0 < h) (hwindow : delta + h ≤ 1) : oneCellTargetSeparation delta h = delta ^ 2 * h + delta * h ^ 2 + h ^ 3 / 3 := by have hsmall : Ioc delta (delta + h) ⊆ Ioc delta 1 := by intro a ha exact ⟨ha.1, ha.2.trans hwindow⟩ have hcut : (∫ a in Ioc delta 1, h * max 0 (1 - |a - delta| / h) * (2 * a)) = ∫ a in Ioc delta (delta + h), h * max 0 (1 - |a - delta| / h) * (2 * a) := by apply setIntegral_eq_of_subset_of_forall_sdiff_eq_zero measurableSet_Ioc hsmall intro a ha have had : delta ≤ a := ha.1.1.le have hha : h ≤ a - delta := by have : delta + h ≤ a := le_of_not_gt (fun halt => ha.2 ⟨ha.1.1, halt.le⟩) linarith have : 1 - |a - delta| / h ≤ 0 := by rw [abs_of_nonneg (sub_nonneg.mpr had)] apply sub_nonpos.mpr exact (le_div_iff₀ hh).2 (by simpa using hha) simp [max_eq_left this] have hpoly : (∫ a in Ioc delta (delta + h), h * max 0 (1 - |a - delta| / h) * (2 * a)) = ∫ a in Ioc delta (delta + h), (2 * (delta + h) * a - 2 * a ^ 2) := by apply integral_congr_ae filter_upwards [ae_restrict_mem measurableSet_Ioc] with a ha have had : 0 ≤ a - delta := sub_nonneg.mpr ha.1.le have hratio : |a - delta| / h ≤ 1 := by rw [abs_of_nonneg had] exact (div_le_one hh).2 (by linarith [ha.2]) rw [max_eq_right (sub_nonneg.mpr hratio), abs_of_nonneg had] field_simp ring have hint : (∫ a in Ioc delta (delta + h), (2 * (delta + h) * a - 2 * a ^ 2)) = delta * h ^ 2 + h ^ 3 / 3 := by have hf : IntervalIntegrable (fun a : ℝ => 2 * (delta + h) * a) volume delta (delta + h) := intervalIntegral.intervalIntegrable_id.const_mul _ have hg : IntervalIntegrable (fun a : ℝ => 2 * a ^ 2) volume delta (delta + h) := (intervalIntegral.intervalIntegrable_pow 2).const_mul _ rw [← intervalIntegral.integral_of_le (by linarith : delta ≤ delta + h), intervalIntegral.integral_sub hf hg, intervalIntegral.integral_const_mul, integral_id, intervalIntegral.integral_const_mul, integral_pow] ring have hmass : (∫ a in Icc (0 : ℝ) delta, 2 * a) = delta ^ 2 := by rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hdelta, intervalIntegral.integral_const_mul, integral_id] ring simp [oneCellTargetSeparation, oneCellRegression1, oneCellRegression0, oneCellTent, oneCellDensity] rw [hcut, hpoly, hint, hmass] ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellTargetSeparation_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:53
theorem oneCellTentSqIntegral_eq Lemma oneCellTentSqIntegral_eq in the paper ↗

The squared triangular perturbation has an exact design-weighted mass on an interior localization window. The result uses the hh condition, the hleft condition, the hright condition. This is the stated conclusion.

Formal statement
delta h :
hh :
0 < h
hleft :
h ≤ delta
hright :
delta + h ≤ 1
(∫ a in Icc (0 : ℝ) 1, (h * oneCellTent delta h a) ^ 2 * oneCellDensity a)
= (4 / 3 : ℝ) * delta * h ^ 3
Proof (Lean source)
-- @node: oneCellTentSqIntegral_eq lemma oneCellTentSqIntegral_eq (delta h : ℝ) (hh : 0 < h) (hleft : h ≤ delta) (hright : delta + h ≤ 1) : (∫ a in Icc (0 : ℝ) 1, (h * oneCellTent delta h a) ^ 2 * oneCellDensity a) = (4 / 3 : ℝ) * delta * h ^ 3 := by have hdelta : 0 ≤ delta := hh.le.trans hleft have hdh : 0 ≤ delta - h := sub_nonneg.mpr hleft have hsub : Ioc (delta - h) (delta + h) ⊆ Icc (0 : ℝ) 1 := by intro a ha exact ⟨hdh.trans ha.1.le, ha.2.trans hright⟩ have hcut : (∫ a in Icc (0 : ℝ) 1, (h * oneCellTent delta h a) ^ 2 * oneCellDensity a) = ∫ a in Ioc (delta - h) (delta + h), (h * oneCellTent delta h a) ^ 2 * oneCellDensity a := by apply setIntegral_eq_of_subset_of_forall_sdiff_eq_zero measurableSet_Icc hsub intro a ha have hout : h ≤ |a - delta| := by by_cases had : a ≤ delta · rw [abs_of_nonpos (sub_nonpos.mpr had)] have : a ≤ delta - h := le_of_not_gt fun halt => ha.2 ⟨halt, by linarith⟩ linarith · rw [abs_of_pos (sub_pos.mpr (lt_of_not_ge had))] have : delta + h ≤ a := le_of_not_gt fun halt => ha.2 ⟨by linarith, halt.le⟩ linarith have hzero : 1 - |a - delta| / h ≤ 0 := by exact sub_nonpos.mpr ((le_div_iff₀ hh).2 (by simpa using hout)) simp [oneCellTent, max_eq_left hzero] rw [hcut] rw [← intervalIntegral.integral_of_le (by linarith : delta - h ≤ delta + h)] rw [← intervalIntegral.integral_add_adjacent_intervals (b := delta)] · have hleftEq : (∫ a in delta - h..delta, (h * oneCellTent delta h a) ^ 2 * oneCellDensity a) = ∫ a in delta - h..delta, 2 * a * (a - delta + h) ^ 2 := by apply intervalIntegral.integral_congr intro a ha have habounds : a ∈ Icc (delta - h) delta := by simpa [uIcc_of_le (by linarith : delta - h ≤ delta)] using ha have had : a ≤ delta := habounds.2 have hratio : |a - delta| / h ≤ 1 := by rw [abs_of_nonpos (sub_nonpos.mpr had)] exact (div_le_one hh).2 (by linarith [habounds.1]) simp only [oneCellTent, oneCellDensity, max_eq_right (sub_nonneg.mpr hratio)] rw [abs_of_nonpos (sub_nonpos.mpr had)] field_simp ring have hrightEq : (∫ a in delta..delta + h, (h * oneCellTent delta h a) ^ 2 * oneCellDensity a) = ∫ a in delta..delta + h, 2 * a * (delta + h - a) ^ 2 := by apply intervalIntegral.integral_congr intro a ha have habounds : a ∈ Icc delta (delta + h) := by simpa [uIcc_of_le (by linarith : delta ≤ delta + h)] using ha have had : delta ≤ a := habounds.1 have hratio : |a - delta| / h ≤ 1 := by rw [abs_of_nonneg (sub_nonneg.mpr had)] exact (div_le_one hh).2 (by linarith [habounds.2]) simp only [oneCellTent, oneCellDensity, max_eq_right (sub_nonneg.mpr hratio)] rw [abs_of_nonneg (sub_nonneg.mpr had)] field_simp ring rw [hleftEq, hrightEq] simp_rw [show (fun a : ℝ => 2 * a * (a - delta + h) ^ 2) = fun a => 2 * a ^ 3 + (4 * (h - delta)) * a ^ 2 + (2 * (h - delta) ^ 2) * a by funext a; ring] simp_rw [show (fun a : ℝ => 2 * a * (delta + h - a) ^ 2) = fun a => 2 * a ^ 3 - (4 * (delta + h)) * a ^ 2 + (2 * (delta + h) ^ 2) * a by funext a; ring] have hpolyInt (a b A B C : ℝ) : (∫ x in a..b, A * x ^ 3 + B * x ^ 2 + C * x) = A * ((b ^ 4 - a ^ 4) / 4) + B * ((b ^ 3 - a ^ 3) / 3) + C * ((b ^ 2 - a ^ 2) / 2) := by have h3 := (intervalIntegral.intervalIntegrable_pow 3 (μ := volume) (a := a) (b := b)).const_mul A have h2 := (intervalIntegral.intervalIntegrable_pow 2 (μ := volume) (a := a) (b := b)).const_mul B have h1 := (intervalIntegral.intervalIntegrable_id (μ := volume) (a := a) (b := b)).const_mul C rw [intervalIntegral.integral_add (h3.add h2) h1, intervalIntegral.integral_add h3 h2, intervalIntegral.integral_const_mul, integral_pow, intervalIntegral.integral_const_mul, integral_pow, intervalIntegral.integral_const_mul, integral_id] norm_num rw [hpolyInt] have hrightPoly : (∫ a in delta..delta + h, 2 * a ^ 3 - 4 * (delta + h) * a ^ 2 + 2 * (delta + h) ^ 2 * a) = 2 * (((delta + h) ^ 4 - delta ^ 4) / 4) + (-4 * (delta + h)) * (((delta + h) ^ 3 - delta ^ 3) / 3) + (2 * (delta + h) ^ 2) * (((delta + h) ^ 2 - delta ^ 2) / 2) := by calc _ = ∫ a in delta..delta + h, 2 * a ^ 3 + (-4 * (delta + h)) * a ^ 2 + (2 * (delta + h) ^ 2) * a := by apply intervalIntegral.integral_congr intro a ha ring _ = _ := hpolyInt delta (delta + h) 2 (-4 * (delta + h)) (2 * (delta + h) ^ 2) rw [hrightPoly] ring · exact (by unfold oneCellTent oneCellDensity fun_prop : Continuous (fun a : ℝ => (h * oneCellTent delta h a) ^ 2 * oneCellDensity a)).intervalIntegrable _ _ · exact (by unfold oneCellTent oneCellDensity fun_prop : Continuous (fun a : ℝ => (h * oneCellTent delta h a) ^ 2 * oneCellDensity a)).intervalIntegrable _ _
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellTentSqIntegral_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:116
theorem oneCellBandwidth_far

Above the one-cell edge scale, the balance bandwidth is comparable to the interior bandwidth and its localization window is eventually interior. The result uses the hdeltaBar condition, the hdelta condition, the hfar condition. This is the stated conclusion.

Formal statement
deltaBar :
hdeltaBar :
0 < deltaBar ∧ deltaBar < 1
deltaSeq :
ℕ → ℝ
hdelta :
ThresholdSequence deltaBar deltaSeq
hfar :
Tendsto (fun n => deltaSeq n / (n : ℝ) ^ (-(1 : ℝ) / 4)) atTop atTop
hSeq :
fun n => infoBandwidth n (deltaSeq n) 1 1 deltaBar
AsympSeq hSeq (fun n => ((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3))
∀ᶠ n in atTop, 0 < hSeq n ∧ hSeq n ≤ deltaSeq n ∧ deltaSeq n + hSeq n ≤ 1 ∧ hSeq n ≤ 1 / 4
Proof (Lean source)
-- @node: oneCellBandwidth_far lemma oneCellBandwidth_far (deltaBar : ℝ) (hdeltaBar : 0 < deltaBar ∧ deltaBar < 1) (deltaSeq : ℕ → ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) (hfar : Tendsto (fun n => deltaSeq n / (n : ℝ) ^ (-(1 : ℝ) / 4)) atTop atTop) : let hSeq := fun n => infoBandwidth n (deltaSeq n) 1 1 deltaBar AsympSeq hSeq (fun n => ((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3)) ∧ ∀ᶠ n in atTop, 0 < hSeq n ∧ hSeq n ≤ deltaSeq n ∧ deltaSeq n + hSeq n ≤ 1 ∧ hSeq n ≤ 1 / 4 := by dsimp have hbalance := infoBandwidth_eventually_balance 1 1 deltaBar (by norm_num) (by norm_num) hdeltaBar deltaSeq hdelta let c : ℝ := 2 ^ (-(1 : ℝ) / 3) have hc : 0 < c := Real.rpow_pos_of_pos (by norm_num) _ have hcOne : c ≤ 1 := by rw [show (1 : ℝ) = 2 ^ (0 : ℝ) by norm_num] apply Real.rpow_le_rpow_of_exponent_le (by norm_num) norm_num have hratio := (Filter.tendsto_atTop.1 hfar) 1 have hevent : ∀ᶠ n in atTop, 0 < infoBandwidth n (deltaSeq n) 1 1 deltaBar ∧ infoBandwidth n (deltaSeq n) 1 1 deltaBar ≤ deltaSeq n ∧ deltaSeq n + infoBandwidth n (deltaSeq n) 1 1 deltaBar ≤ 1 ∧ infoBandwidth n (deltaSeq n) 1 1 deltaBar ≤ 1 / 4 ∧ c * (((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3)) ≤ infoBandwidth n (deltaSeq n) 1 1 deltaBar ∧ infoBandwidth n (deltaSeq n) 1 1 deltaBar ≤ ((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3) := by filter_upwards [hbalance, hratio, eventually_ge_atTop 257] with n hn hratioN hn257 have hnpos : 0 < (n : ℝ) := by by_contra hn0 have hnzero : (n : ℝ) = 0 := le_antisymm (le_of_not_gt hn0) (Nat.cast_nonneg n) rw [hnzero, zero_mul] at hn norm_num at hn have hedgePos : 0 < (n : ℝ) ^ (-(1 : ℝ) / 4) := Real.rpow_pos_of_pos hnpos _ have hdeltaPos : 0 < deltaSeq n := by have hle : (n : ℝ) ^ (-(1 : ℝ) / 4) ≤ deltaSeq n := by simpa using (le_div_iff₀ hedgePos).mp hratioN exact hedgePos.trans_le hle let h := infoBandwidth n (deltaSeq n) 1 1 deltaBar let w := ((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3) have hedge : (n : ℝ) ^ (-1 / ((3 : ℝ) + 1)) ≤ deltaSeq n := by have hbase : (n : ℝ) ^ (-(1 : ℝ) / 4) ≤ deltaSeq n := by simpa using (le_div_iff₀ hedgePos).mp hratioN convert hbase using 1 <;> norm_num have hwUpper : h ≤ w := by simpa [w, Real.rpow_one] using balance_root_le_interior_scale (n : ℝ) (deltaSeq n) h 3 1 hnpos hdeltaPos hn.1 (by norm_num) (by norm_num) (by norm_num [h, Real.rpow_natCast] at hn ⊢; simpa using hn.2.2) have hwDelta : w ≤ deltaSeq n := by simpa [w, Real.rpow_one] using interior_scale_le_threshold_of_edge_le (n : ℝ) (deltaSeq n) 3 1 hnpos hdeltaPos (by norm_num) (by norm_num) hedge have hwLower : c * w ≤ h := by simpa [c, w, Real.rpow_one] using interior_scale_le_balance_root (n : ℝ) (deltaSeq n) h 3 1 hnpos hdeltaPos hn.1 (by norm_num) (by norm_num) (hwUpper.trans hwDelta) (by norm_num [h, Real.rpow_natCast] at hn ⊢; simpa using hn.2.2) have hwindow : deltaSeq n + h ≤ 1 := (add_le_add (hdelta n).2 hn.2.1).trans_eq (by ring) have hhquarter : h ≤ 1 / 4 := by by_contra hnot have hhlarge : (1 : ℝ) / 4 < h := lt_of_not_ge hnot have hEq : (n : ℝ) * h ^ 3 * (deltaSeq n + h) = 1 := by norm_num [h, Real.rpow_natCast, Real.rpow_one] at hn ⊢ simpa using hn.2.2 have hstrict : 1 < (n : ℝ) * h ^ 3 * h := by calc 1 = (256 : ℝ) * ((1 : ℝ) / 4) ^ 3 * ((1 : ℝ) / 4) := by norm_num _ < (n : ℝ) * h ^ 3 * h := by gcongr · exact_mod_cast hn257 have : (n : ℝ) * h ^ 3 * h ≤ (n : ℝ) * h ^ 3 * (deltaSeq n + h) := by gcongr linarith [(hdelta n).1] linarith refine ⟨hn.1, hwUpper.trans hwDelta, hwindow, hhquarter, hwLower, hwUpper⟩ constructor · exact ⟨c, 1, hc, hcOne, hevent.mono fun n hn => ⟨hn.2.2.2.2.1, by simpa using hn.2.2.2.2.2⟩⟩ · exact hevent.mono fun n hn => ⟨hn.1, hn.2.1, hn.2.2.1, hn.2.2.2.1⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellBandwidth_far · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:230
theorem oneCellProductKL_bounds Lemma oneCellProductKL_bounds in the paper ↗

On an interior quarter-height window, the concrete product KL is trapped between fixed multiples of n * delta * h^3. The result uses the hh condition, the hleft condition, the hright condition, the hquarter condition. This is the stated conclusion.

Formal statement
n :
delta h :
hh :
0 < h
hleft :
h ≤ delta
hright :
delta + h ≤ 1
hquarter :
h ≤ 1 / 4
conclusion 1
(8 / 3 : ℝ) * (n : ℝ) * delta * h ^ 3 ≤ oneCellProductKL n delta h
conclusion 2
oneCellProductKL n delta h ≤ (16 / 3 : ℝ) * (n : ℝ) * delta * h ^ 3
Proof (Lean source)
-- @node: oneCellProductKL_bounds lemma oneCellProductKL_bounds (n : ℕ) (delta h : ℝ) (hh : 0 < h) (hleft : h ≤ delta) (hright : delta + h ≤ 1) (hquarter : h ≤ 1 / 4) : (8 / 3 : ℝ) * (n : ℝ) * delta * h ^ 3 ≤ oneCellProductKL n delta h ∧ oneCellProductKL n delta h ≤ (16 / 3 : ℝ) * (n : ℝ) * delta * h ^ 3 := by let gamma : ℝ → ℝ := fun a => h * oneCellTent delta h a have htent : ∀ a, oneCellTent delta h a ∈ Icc (0 : ℝ) 1 := by intro a constructor · exact le_max_left _ _ · apply max_le (by norm_num) have : 0 ≤ |a - delta| / h := div_nonneg (abs_nonneg _) hh.le linarith have hgamma0 : ∀ a, 0 ≤ gamma a := fun a => mul_nonneg hh.le (htent a).1 have hgammah : ∀ a, gamma a ≤ h := fun a => by dsimp [gamma] simpa using mul_le_mul_of_nonneg_left (htent a).2 hh.le have hgamma_meas : Measurable gamma := by dsimp [gamma] unfold oneCellTent fun_prop have hkl_meas : Measurable fun a => (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal := by have hform : (fun a => (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal) = fun a => (1 / 2 + gamma a) * log ((1 / 2 + gamma a) / (1 / 2)) + (1 - (1 / 2 + gamma a)) * log ((1 - (1 / 2 + gamma a)) / (1 - (1 / 2))) := by funext a apply bernoulliLaw_klDiv_toReal · linarith [hgamma0 a] · linarith [hgammah a] · norm_num · norm_num rw [hform] fun_prop have hpi_int : Integrable oneCellDensity (volume.restrict (Icc (0 : ℝ) 1)) := by apply IntegrableOn.of_bound (C := 2) measure_Icc_lt_top · unfold oneCellDensity fun_prop · filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha change |2 * a| ≤ 2 rw [abs_of_nonneg (mul_nonneg (by norm_num) ha.1)] nlinarith [ha.2] have hband := localized_design_kl_band oneCellDensity gamma hpi_int hgamma_meas hkl_meas (by filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha exact mul_nonneg (by norm_num) ha.1) (fun a ha => by rw [abs_of_nonneg (hgamma0 a)] exact (hgammah a).trans hquarter) have hsquare := oneCellTentSqIntegral_eq delta h hh hleft hright have hn0 : 0 ≤ (n : ℝ) := Nat.cast_nonneg n constructor · rw [oneCellProductKL] change (8 / 3 : ℝ) * (n : ℝ) * delta * h ^ 3 ≤ (n : ℝ) * ∫ a in Icc (0 : ℝ) 1, (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal * oneCellDensity a calc (8 / 3 : ℝ) * (n : ℝ) * delta * h ^ 3 = (n : ℝ) * (2 * ((4 / 3 : ℝ) * delta * h ^ 3)) := by ring _ = (n : ℝ) * (2 * ∫ a in Icc (0 : ℝ) 1, (gamma a) ^ 2 * oneCellDensity a) := by rw [hsquare] _ ≤ _ := mul_le_mul_of_nonneg_left hband.1 hn0 · rw [oneCellProductKL] change (n : ℝ) * ∫ a in Icc (0 : ℝ) 1, (klDiv (bernoulliLaw (1 / 2 + gamma a)) (bernoulliLaw (1 / 2))).toReal * oneCellDensity a ≤ (16 / 3 : ℝ) * (n : ℝ) * delta * h ^ 3 calc _ ≤ (n : ℝ) * (4 * ∫ a in Icc (0 : ℝ) 1, (gamma a) ^ 2 * oneCellDensity a) := mul_le_mul_of_nonneg_left hband.2 hn0 _ = (16 / 3 : ℝ) * (n : ℝ) * delta * h ^ 3 := by rw [hsquare]; ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellProductKL_bounds · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:318
theorem oneCellNormalizedScale_eq Lemma oneCellNormalizedScale_eq in the paper ↗

The normalized interior one-cell atom scale is the 5/3 power of the threshold measured in critical-scale units. The result uses the hn condition, the hdelta condition. This is the stated conclusion.

Formal statement
n :
delta :
hn :
0 < n
hdelta :
0 < delta
(delta ^ 2 * ((n : ℝ) * delta) ^ (-(1 : ℝ) / 3)) / (n : ℝ) ^ (-(1 : ℝ) / 2)
= (delta / (n : ℝ) ^ (-(1 : ℝ) / 10)) ^ ((5 : ℝ) / 3)
Proof (Lean source)
-- @node: oneCellNormalizedScale_eq lemma oneCellNormalizedScale_eq (n : ℕ) (delta : ℝ) (hn : 0 < n) (hdelta : 0 < delta) : (delta ^ 2 * ((n : ℝ) * delta) ^ (-(1 : ℝ) / 3)) / (n : ℝ) ^ (-(1 : ℝ) / 2) = (delta / (n : ℝ) ^ (-(1 : ℝ) / 10)) ^ ((5 : ℝ) / 3) := by have hnR : 0 < (n : ℝ) := by exact_mod_cast hn have hcrit : 0 < (n : ℝ) ^ (-(1 : ℝ) / 10) := Real.rpow_pos_of_pos hnR _ rw [Real.div_rpow hdelta.le hcrit.le, Real.mul_rpow hnR.le hdelta.le] rw [show delta ^ 2 * ((n : ℝ) ^ (-(1 : ℝ) / 3) * delta ^ (-(1 : ℝ) / 3)) = (n : ℝ) ^ (-(1 : ℝ) / 3) * (delta ^ 2 * delta ^ (-(1 : ℝ) / 3)) by ring] rw [show delta ^ 2 = delta ^ (2 : ℝ) by norm_num [Real.rpow_natCast]] rw [← Real.rpow_add hdelta, ← Real.rpow_mul hnR.le] field_simp norm_num rw [show (n : ℝ) ^ (-(1 / 3 : ℝ)) * delta ^ ((5 : ℝ) / 3) * (n : ℝ) ^ (-(1 / 6 : ℝ)) = delta ^ ((5 : ℝ) / 3) * ((n : ℝ) ^ (-(1 / 3 : ℝ)) * (n : ℝ) ^ (-(1 / 6 : ℝ))) by ring] rw [← Real.rpow_add hnR] norm_num ring
CausalSmith.Stat.LmtpThresholdAtomFrontier.oneCellNormalizedScale_eq · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:405
theorem one_cell_calibration Proposition 1 in the paper ↗

For beta=kappa=one, the bandwidth, KL, separation, and transition exponent are exactly the one-cell calibration stated in the note. The result uses the hdeltaBar condition, the hdelta condition, the hfar condition. This is the stated conclusion.

Formal statement
deltaBar :
hdeltaBar :
0 < deltaBar ∧ deltaBar < 1
deltaSeq :
ℕ → ℝ
hdelta :
ThresholdSequence deltaBar deltaSeq
hfar :
Tendsto (fun n => deltaSeq n / (n : ℝ) ^ (-(1 : ℝ) / 4)) atTop atTop
hSeq :
fun n => infoBandwidth n (deltaSeq n) 1 1 deltaBar
AsympSeq hSeq (fun n => ((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3))
AsympSeq (fun n => oneCellProductKL n (deltaSeq n) (hSeq n)) (fun n => (n : ℝ) * deltaSeq n * (hSeq n) ^ 3)
AsympSeq (fun n => oneCellTargetSeparation (deltaSeq n) (hSeq n)) (fun n => (deltaSeq n) ^ 2 * hSeq n)
AsympSeq deltaSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 10))
AsympSeq (fun n => oneCellTargetSeparation (deltaSeq n) (hSeq n)) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Proof (Lean source)
-- @node: prop:one-cell-calibration theorem one_cell_calibration (deltaBar : ℝ) (hdeltaBar : 0 < deltaBar ∧ deltaBar < 1) (deltaSeq : ℕ → ℝ) (hdelta : ThresholdSequence deltaBar deltaSeq) (hfar : Tendsto (fun n => deltaSeq n / (n : ℝ) ^ (-(1 : ℝ) / 4)) atTop atTop) : let hSeq := fun n => infoBandwidth n (deltaSeq n) 1 1 deltaBar AsympSeq hSeq (fun n => ((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3)) ∧ AsympSeq (fun n => oneCellProductKL n (deltaSeq n) (hSeq n)) (fun n => (n : ℝ) * deltaSeq n * (hSeq n) ^ 3) ∧ AsympSeq (fun n => oneCellTargetSeparation (deltaSeq n) (hSeq n)) (fun n => (deltaSeq n) ^ 2 * hSeq n) ∧ (AsympSeq deltaSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 10)) ↔ AsympSeq (fun n => oneCellTargetSeparation (deltaSeq n) (hSeq n)) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))) := by dsimp have hb := oneCellBandwidth_far deltaBar hdeltaBar deltaSeq hdelta hfar have hbw := hb.1 have hwin := hb.2 refine ⟨hbw, ?_, ?_, ?_⟩ · refine ⟨8 / 3, 16 / 3, by norm_num, by norm_num, ?_⟩ filter_upwards [hwin] with n hn simpa [mul_assoc] using oneCellProductKL_bounds n (deltaSeq n) (infoBandwidth n (deltaSeq n) 1 1 deltaBar) hn.1 hn.2.1 hn.2.2.1 hn.2.2.2 · refine ⟨1, 7 / 3, by norm_num, by norm_num, ?_⟩ filter_upwards [hwin] with n hn have hdelta0 : 0 ≤ deltaSeq n := hn.1.le.trans hn.2.1 have heq := oneCellTargetSeparation_eq (deltaSeq n) (infoBandwidth n (deltaSeq n) 1 1 deltaBar) hdelta0 hn.1 hn.2.2.1 rw [heq] constructor · nlinarith [sq_nonneg (deltaSeq n), sq_nonneg (infoBandwidth n (deltaSeq n) 1 1 deltaBar)] · have hh0 : 0 ≤ infoBandwidth n (deltaSeq n) 1 1 deltaBar := hn.1.le have hh_le : infoBandwidth n (deltaSeq n) 1 1 deltaBar ≤ deltaSeq n := hn.2.1 nlinarith [mul_nonneg (sq_nonneg (infoBandwidth n (deltaSeq n) 1 1 deltaBar)) (sub_nonneg.mpr hh_le), mul_nonneg (sq_nonneg (deltaSeq n)) (sub_nonneg.mpr hh_le)] · rcases hbw with ⟨ch, Ch, hch, hchCh, hbwEv⟩ have hscale : ∀ᶠ n in atTop, ch * (deltaSeq n ^ 2 * (((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3))) ≤ oneCellTargetSeparation (deltaSeq n) (infoBandwidth n (deltaSeq n) 1 1 deltaBar) ∧ oneCellTargetSeparation (deltaSeq n) (infoBandwidth n (deltaSeq n) 1 1 deltaBar) ≤ ((7 / 3 : ℝ) * Ch) * (deltaSeq n ^ 2 * (((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3))) := by filter_upwards [hwin, hbwEv] with n hn hbn let h := infoBandwidth n (deltaSeq n) 1 1 deltaBar let w := ((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3) have hd0 : 0 ≤ deltaSeq n := hn.1.le.trans hn.2.1 have heq := oneCellTargetSeparation_eq (deltaSeq n) h hd0 hn.1 hn.2.2.1 have htargetLo : deltaSeq n ^ 2 * h ≤ oneCellTargetSeparation (deltaSeq n) h := by rw [heq] nlinarith [sq_nonneg (deltaSeq n), sq_nonneg h] have htargetHi : oneCellTargetSeparation (deltaSeq n) h ≤ (7 / 3 : ℝ) * (deltaSeq n ^ 2 * h) := by rw [heq] have hh0 : 0 ≤ h := hn.1.le have hh_le : h ≤ deltaSeq n := hn.2.1 nlinarith [mul_nonneg (sq_nonneg h) (sub_nonneg.mpr hh_le), mul_nonneg (sq_nonneg (deltaSeq n)) (sub_nonneg.mpr hh_le)] have hsq0 : 0 ≤ deltaSeq n ^ 2 := sq_nonneg _ constructor · calc ch * (deltaSeq n ^ 2 * w) = deltaSeq n ^ 2 * (ch * w) := by ring _ ≤ deltaSeq n ^ 2 * h := mul_le_mul_of_nonneg_left hbn.1 hsq0 _ ≤ _ := htargetLo · calc _ ≤ (7 / 3 : ℝ) * (deltaSeq n ^ 2 * h) := htargetHi _ ≤ (7 / 3 : ℝ) * (deltaSeq n ^ 2 * (Ch * w)) := by gcongr exact hbn.2 _ = ((7 / 3 : ℝ) * Ch) * (deltaSeq n ^ 2 * w) := by ring constructor · rintro ⟨cd, Cd, hcd, hcdC, hdEv⟩ let cOut : ℝ := ch * cd ^ ((5 : ℝ) / 3) let COut : ℝ := ((7 / 3 : ℝ) * Ch) * Cd ^ ((5 : ℝ) / 3) have hCd : 0 < Cd := hcd.trans_le hcdC have hCh : 0 < Ch := hch.trans_le hchCh have hcOut : 0 < cOut := mul_pos hch (Real.rpow_pos_of_pos hcd _) have hCOut : 0 < COut := by dsimp [COut] exact mul_pos (mul_pos (by norm_num) hCh) (Real.rpow_pos_of_pos hCd _) have hcC : cOut ≤ COut := by dsimp [cOut, COut] have : ch ≤ (7 / 3 : ℝ) * Ch := by nlinarith gcongr refine ⟨cOut, COut, hcOut, hcC, ?_⟩ filter_upwards [hscale, hdEv, hwin, eventually_ge_atTop 1] with n hs hd hwn hn1 have hnPos : 0 < n := lt_of_lt_of_le Nat.zero_lt_one hn1 have hnR : 0 < (n : ℝ) := by exact_mod_cast hnPos have hdPos : 0 < deltaSeq n := hwn.1.trans_le hwn.2.1 have hcrit : 0 < (n : ℝ) ^ (-(1 : ℝ) / 10) := Real.rpow_pos_of_pos hnR _ have hroot : 0 < (n : ℝ) ^ (-(1 : ℝ) / 2) := Real.rpow_pos_of_pos hnR _ let ratio := deltaSeq n / (n : ℝ) ^ (-(1 : ℝ) / 10) let atom := deltaSeq n ^ 2 * (((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3)) have hratioLo : cd ≤ ratio := by exact (le_div_iff₀ hcrit).2 (by simpa [ratio, mul_comm] using hd.1) have hratioHi : ratio ≤ Cd := by exact (div_le_iff₀ hcrit).2 (by simpa [ratio, mul_comm] using hd.2) have hnorm : atom / (n : ℝ) ^ (-(1 : ℝ) / 2) = ratio ^ ((5 : ℝ) / 3) := by simpa [atom, ratio] using oneCellNormalizedScale_eq n (deltaSeq n) hnPos hdPos have hatom : atom = ratio ^ ((5 : ℝ) / 3) * (n : ℝ) ^ (-(1 : ℝ) / 2) := (div_eq_iff hroot.ne').mp hnorm have hpowLo := Real.rpow_le_rpow hcd.le hratioLo (by norm_num : (0 : ℝ) ≤ 5 / 3) have hpowHi := Real.rpow_le_rpow (le_trans hcd.le hratioLo) hratioHi (by norm_num : (0 : ℝ) ≤ 5 / 3) constructor · calc cOut * (n : ℝ) ^ (-(1 : ℝ) / 2) = ch * (cd ^ ((5 : ℝ) / 3) * (n : ℝ) ^ (-(1 : ℝ) / 2)) := by simp [cOut]; ring _ ≤ ch * atom := by rw [hatom]; gcongr _ ≤ _ := hs.1 · calc _ ≤ ((7 / 3 : ℝ) * Ch) * atom := hs.2 _ ≤ ((7 / 3 : ℝ) * Ch) * (Cd ^ ((5 : ℝ) / 3) * (n : ℝ) ^ (-(1 : ℝ) / 2)) := by rw [hatom] gcongr _ = COut * (n : ℝ) ^ (-(1 : ℝ) / 2) := by simp [COut]; ring · rintro ⟨cs, Cs, hcs, hcsC, hsEv⟩ let K : ℝ := (7 / 3 : ℝ) * Ch have hCh : 0 < Ch := hch.trans_le hchCh have hK : 0 < K := mul_pos (by norm_num) hCh let lo : ℝ := (cs / K) ^ ((3 : ℝ) / 5) let up : ℝ := (Cs / ch) ^ ((3 : ℝ) / 5) have hCs : 0 < Cs := hcs.trans_le hcsC have hlo : 0 < lo := Real.rpow_pos_of_pos (div_pos hcs hK) _ have hup : 0 < up := Real.rpow_pos_of_pos (div_pos hCs hch) _ refine ⟨lo, lo + up, hlo, le_add_of_nonneg_right hup.le, ?_⟩ filter_upwards [hscale, hsEv, hwin, eventually_ge_atTop 1] with n hscaleN hsN hwn hn1 have hnPos : 0 < n := lt_of_lt_of_le Nat.zero_lt_one hn1 have hnR : 0 < (n : ℝ) := by exact_mod_cast hnPos have hdPos : 0 < deltaSeq n := hwn.1.trans_le hwn.2.1 have hcrit : 0 < (n : ℝ) ^ (-(1 : ℝ) / 10) := Real.rpow_pos_of_pos hnR _ have hroot : 0 < (n : ℝ) ^ (-(1 : ℝ) / 2) := Real.rpow_pos_of_pos hnR _ let ratio := deltaSeq n / (n : ℝ) ^ (-(1 : ℝ) / 10) let atom := deltaSeq n ^ 2 * (((n : ℝ) * deltaSeq n) ^ (-(1 : ℝ) / 3)) have hratio : 0 < ratio := div_pos hdPos hcrit have hnorm : atom / (n : ℝ) ^ (-(1 : ℝ) / 2) = ratio ^ ((5 : ℝ) / 3) := by simpa [atom, ratio] using oneCellNormalizedScale_eq n (deltaSeq n) hnPos hdPos have hatom : atom = ratio ^ ((5 : ℝ) / 3) * (n : ℝ) ^ (-(1 : ℝ) / 2) := (div_eq_iff hroot.ne').mp hnorm have hpLo : cs / K ≤ ratio ^ ((5 : ℝ) / 3) := by apply (div_le_iff₀ hK).2 have hmul := hsN.1.trans (by simpa [K] using hscaleN.2) change cs * (n : ℝ) ^ (-(1 : ℝ) / 2) ≤ K * atom at hmul rw [hatom] at hmul nlinarith have hpHi : ratio ^ ((5 : ℝ) / 3) ≤ Cs / ch := by apply (le_div_iff₀ hch).2 have hmul := hscaleN.1.trans hsN.2 change ch * atom ≤ Cs * (n : ℝ) ^ (-(1 : ℝ) / 2) at hmul rw [hatom] at hmul nlinarith have hloRatio : lo ≤ ratio := by have hp := Real.rpow_le_rpow (div_nonneg hcs.le hK.le) hpLo (by norm_num : (0 : ℝ) ≤ 3 / 5) have hcollapse : (ratio ^ ((5 : ℝ) / 3)) ^ ((3 : ℝ) / 5) = ratio := by rw [← Real.rpow_mul hratio.le] norm_num simpa [lo, hcollapse] using hp have hratioUp : ratio ≤ up := by have hp := Real.rpow_le_rpow (Real.rpow_nonneg hratio.le _) hpHi (by norm_num : (0 : ℝ) ≤ 3 / 5) have hcollapse : (ratio ^ ((5 : ℝ) / 3)) ^ ((3 : ℝ) / 5) = ratio := by rw [← Real.rpow_mul hratio.le] norm_num simpa [up, hcollapse] using hp constructor · exact (le_div_iff₀ hcrit).mp (by simpa [ratio, mul_comm] using hloRatio) · have hdu : deltaSeq n ≤ up * (n : ℝ) ^ (-(1 : ℝ) / 10) := (div_le_iff₀ hcrit).mp (by simpa [ratio] using hratioUp) exact hdu.trans (mul_le_mul_of_nonneg_right (le_add_of_nonneg_left hlo.le) hcrit.le)
CausalSmith.Stat.LmtpThresholdAtomFrontier.one_cell_calibration · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TOneCellCalibration.lean:433
CausalSmith.Stat.STAT_LmtpThresholdAtomFrontier_Research.TPhaseDiagram 3 declarations This module assembles the rate comparisons and the zero-threshold reduction.

Four-regime threshold phase diagram

This module assembles the rate comparisons and the zero-threshold reduction.

theorem zero_threshold_stabilizedCoverage_eventually

At the identity threshold, the stabilized interval is eventually uniformly honest over the bounded-outcome model. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
Bseq :
∀ n
SplitBlocks n, ∀ᶠ n in atTop, 1 - alpha
stabilizedCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0 alpha
Proof (Lean source)
lemma zero_threshold_stabilizedCoverage_eventually (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∀ Bseq : ∀ n, SplitBlocks n, ∀ᶠ n in atTop, 1 - alpha ≤ stabilizedCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0 alpha := by rcases honest_coverage_and_length J beta kappa L cminus cplus pmin deltaBar alpha hreg with ⟨c, C, hc, hcC, hlength⟩ have hzero : ThresholdSequence deltaBar (fun _ => 0) := by intro n exact ⟨le_rfl, hreg.2.2.2.2.2.2.2.2.2.1.le⟩ intro Bseq filter_upwards [hlength (fun _ => 0) hzero Bseq] with n hn exact hn.1
CausalSmith.Stat.LmtpThresholdAtomFrontier.zero_threshold_stabilizedCoverage_eventually · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TPhaseDiagram.lean:21
theorem zero_threshold_stabilizedWorstLength_asymp

At the identity threshold, the bias-aware interval's worst-case expected length inherits the root-sample-size sandwich from the honest-length theorem. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
Bseq :
∀ n
SplitBlocks n, AsympSeq (fun n => stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0 alpha) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Proof (Lean source)
-- @node: zero_threshold_stabilizedWorstLength_asymp lemma zero_threshold_stabilizedWorstLength_asymp (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : ∀ Bseq : ∀ n, SplitBlocks n, AsympSeq (fun n => stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0 alpha) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) := by rcases honest_coverage_and_length J beta kappa L cminus cplus pmin deltaBar alpha hreg with ⟨c, C, hc, hcC, hlength⟩ have hzero : ThresholdSequence deltaBar (fun _ => 0) := by intro n exact ⟨le_rfl, hreg.2.2.2.2.2.2.2.2.2.1.le⟩ intro Bseq refine ⟨c, C, hc, hcC.le, ?_⟩ filter_upwards [hlength (fun _ => 0) hzero Bseq] with n hn dsimp at hn have hfront : clampFrontier n 0 kappa (infoBandwidth n 0 beta kappa deltaBar) beta = (n : ℝ) ^ (-(1 : ℝ) / 2) := by simp [clampFrontier, Real.zero_rpow (by linarith [hreg.2.2.1] : kappa + 1 ≠ 0)] rw [hfront] at hn exact ⟨hn.2.1, hn.2.2.1⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.zero_threshold_stabilizedWorstLength_asymp · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TPhaseDiagram.lean:40
theorem clamp_phase_diagram Theorem 3 in the paper ↗

The critical scale is separated from the design-edge scale; below, at, and above it the frontier has the four rates stated in the paper. The result uses the hreg condition. This is the stated conclusion.

Formal statement
J :
beta kappa L cminus cplus pmin deltaBar alpha :
hreg :
RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha
conclusion 1
Tendsto (fun n => deltaCrit n beta kappa / deltaEdge n beta kappa) atTop atTop
conclusion 2
deltaSeq :
ℕ → ℝ
ThresholdSequence deltaBar deltaSeq
hSeq :
fun n => infoBandwidth n (deltaSeq n) beta kappa deltaBar
atomSeq :
fun n => (deltaSeq n) ^ (kappa + 1) * (hSeq n) ^ beta
rSeq :
fun n => clampFrontier n (deltaSeq n) kappa (hSeq n) beta
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds 0)
AsympSeq rSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
c0 :
0 < c0
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0)
AsympSeq atomSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
AsympSeq rSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTop
Tendsto deltaSeq atTop (nhds 0)
AsympSeq rSeq (fun n => (deltaSeq n) ^ (kappa + 1) * ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-beta / (2 * beta + 1)))
delta0 :
delta0 ∈ Ioc (0 : ℝ) deltaBar
Tendsto deltaSeq atTop (nhds delta0)
AsympSeq rSeq (fun n => (n : ℝ) ^ (-beta / (2 * beta + 1)))
n :
P :
ClampModel P beta kappa L cminus cplus pmin
x :
Fin J
atomMass P x 0 = 0
clampFunctional P 0 = ∫ o, o.Y ∂P.dataMeasure
clampFrontier n 0 kappa (infoBandwidth n 0 beta kappa deltaBar) beta
= (n : ℝ) ^ (-(1 : ℝ) / 2)
n :
P :
B :
ClampModel P beta kappa L cminus cplus pmin
h :
infoBandwidth n 0 beta kappa deltaBar
(fun z : Fin n → ClampObs J => totalGramEstimator B z (ellOf beta) kappa cminus cplus 0 h)
=ᵐ[iidProduct P n] (fun z => clampUnit (blockAverage B.I0 z (fun o => o.Y)))
Bseq :
∀ n
SplitBlocks n, (∀ᶠ n in atTop, 1 - alpha ≤ stabilizedCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0 alpha)
AsympSeq (fun n => stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
AsympSeq (fun n => stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0 alpha) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))
Proof (Lean source)
-- @node: thm:phase-diagram theorem clamp_phase_diagram (J : ℕ) (beta kappa L cminus cplus pmin deltaBar alpha : ℝ) (hreg : RegimeConstants J beta kappa L cminus cplus pmin deltaBar alpha) : Tendsto (fun n => deltaCrit n beta kappa / deltaEdge n beta kappa) atTop atTop ∧ ∀ (deltaSeq : ℕ → ℝ), ThresholdSequence deltaBar deltaSeq → let hSeq := fun n => infoBandwidth n (deltaSeq n) beta kappa deltaBar let atomSeq := fun n => (deltaSeq n) ^ (kappa + 1) * (hSeq n) ^ beta let rSeq := fun n => clampFrontier n (deltaSeq n) kappa (hSeq n) beta (Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds 0) → AsympSeq rSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))) ∧ (∀ c0 : ℝ, 0 < c0 → Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop (nhds c0) → AsympSeq atomSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ AsympSeq rSeq (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2))) ∧ (Tendsto (fun n => deltaSeq n / deltaCrit n beta kappa) atTop atTopTendsto deltaSeq atTop (nhds 0) → AsympSeq rSeq (fun n => (deltaSeq n) ^ (kappa + 1) * ((n : ℝ) * (deltaSeq n) ^ kappa) ^ (-beta / (2 * beta + 1)))) ∧ (∀ delta0 : ℝ, delta0 ∈ Ioc (0 : ℝ) deltaBar → Tendsto deltaSeq atTop (nhds delta0) → AsympSeq rSeq (fun n => (n : ℝ) ^ (-beta / (2 * beta + 1)))) ∧ (∀ (n : ℕ) (P : ClampLaw J), ClampModel P beta kappa L cminus cplus pmin → (∀ x : Fin J, atomMass P x 0 = 0) ∧ clampFunctional P 0 = ∫ o, o.Y ∂P.dataMeasure ∧ clampFrontier n 0 kappa (infoBandwidth n 0 beta kappa deltaBar) beta = (n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ (∀ (n : ℕ) (P : ClampLaw J) (B : SplitBlocks n), ClampModel P beta kappa L cminus cplus pmin → let h := infoBandwidth n 0 beta kappa deltaBar (fun z : Fin n → ClampObs J => totalGramEstimator B z (ellOf beta) kappa cminus cplus 0 h) =ᵐ[iidProduct P n] (fun z => clampUnit (blockAverage B.I0 z (fun o => o.Y)))) ∧ ∀ Bseq : ∀ n, SplitBlocks n, (∀ᶠ n in atTop, 1 - alpha ≤ stabilizedCoverage J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0 alpha) ∧ AsympSeq (fun n => stabilizedWorstRisk J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) ∧ AsympSeq (fun n => stabilizedWorstLength J n (Bseq n) beta kappa L cminus cplus pmin deltaBar 0 alpha) (fun n => (n : ℝ) ^ (-(1 : ℝ) / 2)) := by refine ⟨critical_scale_div_edge_scale_tendsto_top J beta kappa L cminus cplus pmin deltaBar alpha hreg, ?_⟩ intro deltaSeq hdelta dsimp refine ⟨regular_frontier_asymp J beta kappa L cminus cplus pmin deltaBar alpha hreg deltaSeq hdelta, ?_, ?_, ?_, ?_, ?_, ?_⟩ · intro c0 hc0 hratio exact critical_atom_and_frontier_asymp J beta kappa L cminus cplus pmin deltaBar alpha c0 hreg hc0 deltaSeq hdelta hratio · intro hratio _hzero exact supercritical_frontier_asymp J beta kappa L cminus cplus pmin deltaBar alpha hreg deltaSeq hdelta hratio · intro delta0 hdelta0 htend exact fixed_positive_frontier_asymp J beta kappa L cminus cplus pmin deltaBar alpha delta0 hreg hdelta0.1 deltaSeq hdelta htend · intro n P hmodel refine ⟨(zero_threshold_atom_and_frontier J n P beta kappa deltaBar hreg.2.2.1).1, zero_threshold_functional J P beta kappa L cminus cplus pmin hmodel, ?_⟩ exact (zero_threshold_atom_and_frontier J n P beta kappa deltaBar hreg.2.2.1).2 · intro n P B hmodel exact zero_threshold_totalGramEstimator J n P B beta kappa L cminus cplus pmin deltaBar hmodel · intro Bseq exact ⟨zero_threshold_stabilizedCoverage_eventually J beta kappa L cminus cplus pmin deltaBar alpha hreg Bseq, zero_threshold_stabilizedWorstRisk_asymp J beta kappa L cminus cplus pmin deltaBar alpha hreg Bseq, zero_threshold_stabilizedWorstLength_asymp J beta kappa L cminus cplus pmin deltaBar alpha hreg Bseq⟩
CausalSmith.Stat.LmtpThresholdAtomFrontier.clamp_phase_diagram · CausalSmith/Stat/STAT_LmtpThresholdAtomFrontier_Research/TPhaseDiagram.lean:69