Formalization: Pointwise Causal Estimation with Weak Dose Support and Gaussian Measurement Error

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. Note: this index was generated at a different commit than the paper's audited pin (44d8edc) — statements may have moved since the audit.

CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Basic 62 declarations Public schedule space, structural laws, model assumptions and decision problems.

Public schedule space, structural laws, model assumptions and decision problems. The model has bounded fixed-dose potential outcomes; ranks constrain only lower witnesses.

def Dose

The compact public dose and rank domain.

Definition (Lean source)
Dose :
Set ℝ
Icc (0 : ℝ) 1
CausalSmith.Stat.NoisydoseWeakdesignTransition.Dose · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:26
def ThresholdProfile

Continuous threshold profiles with the uniform topology and its Borel sigma algebra.

Definition (Lean source)
ThresholdProfile :
Type
CausalSmith.Stat.NoisydoseWeakdesignTransition.ThresholdProfile · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:28
instance instMeasurableSpaceThresholdProfile

The threshold-profile space is equipped with its Borel measurable structure.

Definition (Lean source)
CausalSmith.Stat.NoisydoseWeakdesignTransition.instMeasurableSpaceThresholdProfile · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:30

Data carried by a public Borel schedule space.

Definition (Lean source)
S :
eval :
S → ℝ → ℝ
measurable_eval :
Measurable (fun p : S × Dose => eval p.1 p.2)
eval_injective :
Injective (fun s : S => fun a : Dose => eval s a)
embed :
measurable_embed :
eval_embed :
∀ f u a, eval (embed (f, u)) (a : Dose) = if (u : ℝ) ≤ (f a : ℝ) then 1 else 0
CausalSmith.Stat.NoisydoseWeakdesignTransition.PathSpaceData · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:36
def PathSpace

Public Borel schedules with jointly measurable evaluation and measurable threshold embedding.

Definition (Lean source)
S :
PathSpace S :
Type _
CausalSmith.Stat.NoisydoseWeakdesignTransition.PathSpace · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:45

Structural coordinates (X,A,Z,schedule,Y,U).

Definition (Lean source)
S :
Type*
StructSpace S :
Type (max 0 u_2)
Bool × ℝ × ℝ × S × ℝ × ℝ
CausalSmith.Stat.NoisydoseWeakdesignTransition.StructSpace · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:49

Stratum coordinate of a structural record.

Definition (Lean source)
S :
Type u_1
shared
w :
sX w :
w.1
CausalSmith.Stat.NoisydoseWeakdesignTransition.sX · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:51

Latent treatment coordinate of a structural record.

Definition (Lean source)
S :
Type u_1
shared
w :
sA w :
ℝ
w.2.1
CausalSmith.Stat.NoisydoseWeakdesignTransition.sA · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:53
def sZ

Classical error coordinate of a structural record.

Definition (Lean source)
S :
Type u_1
shared
w :
sZ w :
ℝ
w.2.2.1
CausalSmith.Stat.NoisydoseWeakdesignTransition.sZ · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:55
def sSched

Whole potential-outcome schedule coordinate of a structural record.

Definition (Lean source)
S :
Type u_1
shared
w :
sSched w :
S
w.2.2.2.1
CausalSmith.Stat.NoisydoseWeakdesignTransition.sSched · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:57
def sY

Observed outcome coordinate of a structural record.

Definition (Lean source)
S :
Type u_1
shared
w :
sY w :
ℝ
w.2.2.2.2.1
CausalSmith.Stat.NoisydoseWeakdesignTransition.sY · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:59
def sU

Auxiliary rank coordinate of a structural record.

Definition (Lean source)
S :
Type u_1
shared
w :
sU w :
ℝ
w.2.2.2.2.2
CausalSmith.Stat.NoisydoseWeakdesignTransition.sU · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:61
def Xset

The two public confounder strata.

Definition (Lean source)
Xset :
Type
CausalSmith.Stat.NoisydoseWeakdesignTransition.Xset · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:63

The prespecified target dose is one half.

Definition (Lean source)
a0 :
ℝ
1 / 2
CausalSmith.Stat.NoisydoseWeakdesignTransition.a0 · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:65

The noncoverage level one tenth, recorded as an example value only: no result of this development uses it, since the honest-interval and frontier results quantify over the noncoverage level α.

Definition (Lean source)
honestyAlpha :
ℝ
1 / 10
CausalSmith.Stat.NoisydoseWeakdesignTransition.honestyAlpha · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:68
def latentCentered

Latent dose centered at the target.

Definition (Lean source)
S :
Type u_1
shared
w :
latentCentered w :
ℝ
sA w - a0
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentCentered · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:70
def contaminatedDose

Observed contaminated dose, formed by adding scaled classical error to the latent treatment.

Definition (Lean source)
S :
Type u_1
shared
sigma :
ℝ
w :
contaminatedDose sigma w :
ℝ
sA w + sigma * sZ w
CausalSmith.Stat.NoisydoseWeakdesignTransition.contaminatedDose · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:72
def observedCentered

Observed dose centered at the target.

Definition (Lean source)
S :
Type u_1
shared
sigma :
ℝ
w :
observedCentered sigma w :
ℝ
CausalSmith.Stat.NoisydoseWeakdesignTransition.observedCentered · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:74
def Obs

Public observed record consisting of stratum, contaminated dose and outcome.

Definition (Lean source)
Obs :
Type
Bool × ℝ × ℝ
CausalSmith.Stat.NoisydoseWeakdesignTransition.Obs · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:76
def obsMap

The structural-to-observed record map.

Definition (Lean source)
S :
Type u_1
shared
sigma :
ℝ
w :
obsMap sigma w :
Obs
(sX w, contaminatedDose sigma w, sY w)
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsMap · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:78

One-record observed law obtained by pushing forward the structural law.

Definition (Lean source)
S :
Type u_1
shared
sigma :
ℝ
obsLaw sigma P :
P.map (obsMap sigma)
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:80
def strataProb

Probability mass of a public confounder stratum.

Definition (Lean source)
S :
Type u_1
shared
x :
strataProb P x :
ℝ
P.real {w | sX w = x}
CausalSmith.Stat.NoisydoseWeakdesignTransition.strataProb · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:82
def potentialOutcome

Evaluation of a subject’s potential-outcome schedule at a fixed dose.

Definition (Lean source)
S :
Type u_1
shared
E :
w :
a :
ℝ
potentialOutcome E w a :
ℝ
E.eval (sSched w) a
CausalSmith.Stat.NoisydoseWeakdesignTransition.potentialOutcome · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:84

Population potential-outcome expectation at the target dose.

Definition (Lean source)
S :
Type u_1
shared
E :
causalTarget E P :
ℝ
∫ w, potentialOutcome E w a0 ∂P
CausalSmith.Stat.NoisydoseWeakdesignTransition.causalTarget · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:86
def condPotMean

Conditional potential mean, defined by its stratum-restricted integral divided by stratum mass.

Definition (Lean source)
S :
Type u_1
shared
E :
x :
a :
ℝ
condPotMean E P x a :
ℝ
(∫ w, (if sX w = x then potentialOutcome E w a else 0) ∂P) / strataProb P x
CausalSmith.Stat.NoisydoseWeakdesignTransition.condPotMean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:89
structure ClassConstants

Public constants of the model class: a minimum stratum mass in (0, 1/2] and lower and upper weak-design envelope constants with 0 < lower ≤ upper.

Definition (Lean source)
pmin :
ℝ
clo :
ℝ
chi :
ℝ
pmin_pos :
0 < pmin
pmin_le_half :
pmin ≤ 1/2
clo_pos :
0 < clo
clo_le_chi :
clo ≤ chi
CausalSmith.Stat.NoisydoseWeakdesignTransition.ClassConstants · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:94
def StratumOverlap

Both strata have mass at least the public minimum and at most one minus it, the minimum being the given number.

Definition (Lean source)
S :
Type u_1
shared
pmin :
ℝ
x :
StratumOverlap pmin P :
Prop
clause 1
pmin ≤ strataProb P x
clause 2
strataProb P x ≤ 1 - pmin
CausalSmith.Stat.NoisydoseWeakdesignTransition.StratumOverlap · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:104
def StratumPositive

Both strata of the law have strictly positive mass.

Definition (Lean source)
S :
Type u_1
shared
x :
StratumPositive P :
Prop
0 < strataProb P x
CausalSmith.Stat.NoisydoseWeakdesignTransition.StratumPositive · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:108
def LatentSupport

The latent treatment has compact support.

Definition (Lean source)
S :
Type u_1
shared
LatentSupport P :
Prop
∀ᵐ w ∂P, sA w ∈ Icc 0 1
CausalSmith.Stat.NoisydoseWeakdesignTransition.LatentSupport · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:111
def stratumLaw

Structural law conditioned on a finite confounder stratum, by normalized restriction.

Definition (Lean source)
S :
Type u_1
shared
x :
stratumLaw P x :
(P {w | sX w = x})⁻¹ • P.restrict {w | sX w = x}
CausalSmith.Stat.NoisydoseWeakdesignTransition.stratumLaw · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:115
def WeakDesign

In each stratum of the law, the centered latent dose has a density lying between the lower envelope constant and the upper envelope constant times the absolute centered dose raised to the design exponent, the lower constant, the upper constant and the design exponent being given.

Definition (Lean source)
S :
Type u_1
shared
clo chi kappa :
ℝ
WeakDesign clo chi kappa P :
Prop
∃ g : Bool → ℝ → ℝ,
clause 1
x :
clause 2
x :
= (volume.restrict (Icc (-1/2 : ℝ) (1/2))).withDensity (fun t => ofReal (g x t))
clause 3
x :
∀ᵐ t ∂(volume.restrict (Icc (-1/2 : ℝ) (1/2))), clo * |t| ^ kappa
≤ g x t ∧ g x t ≤ chi * |t| ^ kappa
CausalSmith.Stat.NoisydoseWeakdesignTransition.WeakDesign · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:118
def HolderMean

Radius-one Holder increment bound on the public dose interval.

Definition (Lean source)
S :
Type u_1
shared
E :
beta :
ℝ
x :
a ∈ Icc (0 : ℝ) 1 :
b ∈ Icc (0 : ℝ) 1 :
HolderMean E beta P :
Prop
|condPotMean E P x a - condPotMean E P x b| ≤ |a-b| ^ beta
CausalSmith.Stat.NoisydoseWeakdesignTransition.HolderMean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:127
def MeanRange

The conditional potential means lie in the unit interval.

Definition (Lean source)
S :
Type u_1
shared
E :
x :
a ∈ Icc (0 : ℝ) 1 :
MeanRange E P :
Prop
condPotMean E P x a ∈ Icc 0 1
CausalSmith.Stat.NoisydoseWeakdesignTransition.MeanRange · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:132
def GaussianChannel

Standard Gaussian measurement-error coordinate.

Definition (Lean source)
S :
Type u_1
shared
GaussianChannel P :
Prop
P.map sZ = gaussianReal 0 1
CausalSmith.Stat.NoisydoseWeakdesignTransition.GaussianChannel · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:136
def ErrorIndependence

Classical error is independent of stratum, treatment and the whole schedule.

Definition (Lean source)
S :
Type u_1
shared
ErrorIndependence P :
Prop
IndepFun sZ (fun w => (sX w, sA w, sSched w)) P
CausalSmith.Stat.NoisydoseWeakdesignTransition.ErrorIndependence · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:140
def RankUniform

Uniform auxiliary rank in each stratum, used only in the lower witnesses.

Definition (Lean source)
S :
Type u_1
shared
x :
RankUniform P :
Prop
(stratumLaw P x).map sU = volume.restrict (Icc 0 1)
CausalSmith.Stat.NoisydoseWeakdesignTransition.RankUniform · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:144
def RankTreatmentIndependence

Rank-dose conditional independence through finite-stratum factorization.

Definition (Lean source)
S :
Type u_1
shared
x (B D : Set ℝ) :
RankTreatmentIndependence P :
Prop
P.real {w | sU w ∈ B ∧ sA w ∈ D ∧ sX w = x} * strataProb P x
= P.real {w | sU w ∈ B ∧ sX w = x} * P.real {w | sA w ∈ D ∧ sX w = x}
CausalSmith.Stat.NoisydoseWeakdesignTransition.RankTreatmentIndependence · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:148
def StructuralThreshold

Common-rank threshold schedules for the lower subclass.

Definition (Lean source)
S :
Type u_1
shared
E :
StructuralThreshold E P :
Prop
∀ᵐ w ∂P, ∀ a ∈ Icc (0 : ℝ) 1, potentialOutcome E w a
= if sU w ≤ condPotMean E P (sX w) a then 1 else 0
CausalSmith.Stat.NoisydoseWeakdesignTransition.StructuralThreshold · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:154
def DoseConsistency

Observed outcomes are consistent with the realized latent dose.

Definition (Lean source)
S :
Type u_1
shared
E :
DoseConsistency E P :
Prop
∀ᵐ w ∂P, sY w = potentialOutcome E w (sA w)
CausalSmith.Stat.NoisydoseWeakdesignTransition.DoseConsistency · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:159
def ScheduleUnconfoundedness

Whole-schedule exchangeability through exact finite-stratum factorization.

Definition (Lean source)
S :
Type u_1
shared
x (B : Set S) (D : Set ℝ) :
ScheduleUnconfoundedness P :
Prop
P.real {w | sSched w ∈ B ∧ sA w ∈ D ∧ sX w = x} * strataProb P x
= P.real {w | sSched w ∈ B ∧ sX w = x} * P.real {w | sA w ∈ D ∧ sX w = x}
CausalSmith.Stat.NoisydoseWeakdesignTransition.ScheduleUnconfoundedness · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:163
def BinaryPotentialOutcomes

Binary outcomes at every fixed dose; fixed-dose null sets may differ.

Definition (Lean source)
S :
Type u_1
shared
E :
a ∈ Icc (0 : ℝ) 1 :
BinaryPotentialOutcomes E P :
Prop
∀ᵐ w ∂P, potentialOutcome E w a = 0 ∨ potentialOutcome E w a = 1
CausalSmith.Stat.NoisydoseWeakdesignTransition.BinaryPotentialOutcomes · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:169
def BoundedPotentialOutcomes

Bounded outcomes at every fixed dose, with exactly the fixed-dose quantifier order.

Definition (Lean source)
S :
Type u_1
shared
E :
a ∈ Icc (0 : ℝ) 1 :
BoundedPotentialOutcomes E P :
Prop
∀ᵐ w ∂P, potentialOutcome E w a ∈ Icc 0 1
CausalSmith.Stat.NoisydoseWeakdesignTransition.BoundedPotentialOutcomes · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:173
structure NoisyDoseModelClass

The bounded causal model bundles exactly its ten declared member assumptions.

Definition (Lean source)
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
stratumOverlap :
latentSupport :
weakDesign :
WeakDesign K.clo K.chi kappa P
holderMean :
HolderMean E beta P
meanRange :
gaussianChannel :
errorIndependence :
scheduleUnconfoundedness :
boundedPO :
consistency :
CausalSmith.Stat.NoisydoseWeakdesignTransition.NoisyDoseModelClass · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:178
theorem strataPos

Every member law of the model gives both strata strictly positive mass, since the public minimum stratum mass is positive.

Formal statement
S :
Type u_1
shared
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
Proof (Lean source)
lemma NoisyDoseModelClass.strataPos {E : PathSpace S} {K : ClassConstants} {beta kappa sigma : ℝ} {P : Measure (StructSpace S)} (hP : NoisyDoseModelClass E K beta kappa sigma P) : StratumPositive P := fun x => lt_of_lt_of_le K.pmin_pos (hP.stratumOverlap x).1
CausalSmith.Stat.NoisydoseWeakdesignTransition.NoisyDoseModelClass.strataPos · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:193

Probability laws satisfying exactly the bounded noisy-dose causal model assumptions.

Definition (Lean source)
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
modelClass E K beta kappa sigma :
{P | NoisyDoseModelClass E K beta kappa sigma (P : Measure (StructSpace S))}
CausalSmith.Stat.NoisydoseWeakdesignTransition.modelClass · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:199
def experiment

Independent observed records from the pushed-forward structural law.

Definition (Lean source)
S :
Type u_1
shared
n :
ℕ
sigma :
ℝ
experiment n sigma P :
Measure (Fin n → Obs)
Measure.pi (fun _ => obsLaw sigma P)
CausalSmith.Stat.NoisydoseWeakdesignTransition.experiment · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:203
def IIDSampling

The sample law is the iid observed product law.

Definition (Lean source)
S :
Type u_1
shared
n :
ℕ
sigma :
ℝ
Qs :
Measure (Fin n → Obs)
IIDSampling n sigma P Qs :
Prop
Qs = Measure.pi (fun _ => obsLaw sigma P)
CausalSmith.Stat.NoisydoseWeakdesignTransition.IIDSampling · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:207
theorem iidSampling_holds

The constructed observed experiment satisfies the declared iid sampling predicate. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
n :
ℕ
sigma :
ℝ
IIDSampling n sigma P (experiment n sigma P)
Proof (Lean source)
-- @node: iidSampling_holds lemma iidSampling_holds (n : ℕ) (sigma : ℝ) (P : Measure (StructSpace S)) : IIDSampling n sigma P (experiment n sigma P) := by rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.iidSampling_holds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:211
def seedLaw

An independent uniform seed on the unit interval for randomized procedures.

Definition (Lean source)
seedLaw :
volume.restrict (Icc 0 1)
CausalSmith.Stat.NoisydoseWeakdesignTransition.seedLaw · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:217
def randomizedExperiment

Observed iid records together with an independent uniform randomization seed.

Definition (Lean source)
S :
Type u_1
shared
n :
ℕ
sigma :
ℝ
randomizedExperiment n sigma P :
Measure ((Fin n → Obs) × ℝ)
(experiment n sigma P).prod seedLaw
CausalSmith.Stat.NoisydoseWeakdesignTransition.randomizedExperiment · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:219
def Estimator

All measurable estimators, including independent uniform randomization.

Definition (Lean source)
n :
ℕ
Estimator n :
Type
{T : ((Fin n → Obs) × ℝ) → ℝ // Measurable T}
CausalSmith.Stat.NoisydoseWeakdesignTransition.Estimator · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:223
def minimaxRisk

Complete-lattice minimax absolute risk, with non-integrable losses retaining infinite risk.

Definition (Lean source)
S :
Type u_1
shared
E :
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
minimaxRisk E K beta kappa n sigma :
ℝ≥0∞
minimaxValueENNReal (fun (T : Estimator n) (P : modelClass E K beta kappa sigma) => ∫⁻ z, ofReal |T.1 z - causalTarget E (P.1 : Measure (StructSpace S))| ∂randomizedExperiment n sigma (P.1 : Measure (StructSpace S)))
CausalSmith.Stat.NoisydoseWeakdesignTransition.minimaxRisk · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:225

Measurable connected intervals based solely on the observed sample, with unrestricted endpoint types.

Definition (Lean source)
n :
ℕ
C :
(Fin n → Obs) → Set ℝ
connected :
∀ z, (C z).OrdConnected
measurable :
MeasurableSet {p : (Fin n → Obs) × ℝ | p.2 ∈ C p.1}
CausalSmith.Stat.NoisydoseWeakdesignTransition.IntervalProcedure · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:231

A connected interval procedure covers the causal target with the required probability under every member law.

Definition (Lean source)
S :
Type u_1
shared
E :
beta kappa alpha :
ℝ
n :
ℕ
sigma :
ℝ
P :
modelClass E K beta kappa sigma
IsHonest E K beta kappa alpha n sigma C :
Prop
ofReal (1-alpha)
≤ experiment n sigma (P.1 : Measure (StructSpace S)) {z | causalTarget E (P.1 : Measure (StructSpace S)) ∈ C.C z}
CausalSmith.Stat.NoisydoseWeakdesignTransition.IsHonest · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:236
def honestLength

Minimum worst-law expected length among honest connected interval procedures.

Definition (Lean source)
S :
Type u_1
shared
E :
beta kappa alpha :
ℝ
n :
ℕ
sigma :
ℝ
honestLength E K beta kappa alpha n sigma :
ℝ≥0∞
⨅ C : {C : IntervalProcedure n // IsHonest E K beta kappa alpha n sigma C}, ⨆ P : modelClass E K beta kappa sigma, ∫⁻ z, volume (C.1.C z) ∂experiment n sigma (P.1 : Measure (StructSpace S))
CausalSmith.Stat.NoisydoseWeakdesignTransition.honestLength · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:241
def effDim

Effective dimension of the direct weak-design estimation problem.

Definition (Lean source)
beta :
ℝ
shared
kappa :
ℝ
shared
effDim beta kappa :
ℝ
2*beta+kappa+1
CausalSmith.Stat.NoisydoseWeakdesignTransition.effDim · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:250

The public logarithmic sample scale.

Definition (Lean source)
n :
ℕ
shared
logScale n :
ℝ
log (exp 1 * n)
CausalSmith.Stat.NoisydoseWeakdesignTransition.logScale · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:252

Direct weak-design localization scale.

Definition (Lean source)
beta :
ℝ
shared
kappa :
ℝ
shared
n :
ℕ
shared
directScale beta kappa n :
ℝ
(n : ℝ) ^ (-1 / effDim beta kappa)
CausalSmith.Stat.NoisydoseWeakdesignTransition.directScale · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:254

Gaussian Fourier-inversion localization scale.

Definition (Lean source)
beta :
ℝ
shared
kappa :
ℝ
shared
sigma :
ℝ
shared
n :
ℕ
shared
fourierScale beta kappa sigma n :
ℝ
sigma / sqrt (log (exp 1 + n * sigma ^ effDim beta kappa))
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourierScale · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:256

Compact-support polynomial-inversion localization scale.

Definition (Lean source)
sigma :
ℝ
shared
n :
ℕ
shared
polynomialScale sigma n :
ℝ
log (exp 1 + sigma^2 * logScale n) / logScale n
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomialScale · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:258
def frontierScale

The exact three-regime localization scale.

Definition (Lean source)
beta :
ℝ
shared
kappa :
ℝ
shared
sigma :
ℝ
shared
n :
ℕ
shared
frontierScale beta kappa sigma n :
ℝ
if sigma
≤ directScale beta kappa n then directScale beta kappa n else if sigma ≤ (logScale n) ^ (-1/2 : ℝ) then fourierScale beta kappa sigma n else polynomialScale sigma n
CausalSmith.Stat.NoisydoseWeakdesignTransition.frontierScale · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:260

Absolute-risk frontier obtained by raising the localization scale to the smoothness exponent.

Definition (Lean source)
beta :
ℝ
shared
kappa :
ℝ
shared
sigma :
ℝ
shared
n :
ℕ
shared
frontierRate beta kappa sigma n :
ℝ
frontierScale beta kappa sigma n ^ beta
CausalSmith.Stat.NoisydoseWeakdesignTransition.frontierRate · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Basic.lean:266
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.CertificateMoments 16 declarations Tonelli and the weak-design envelope supply the public second moments for both signed inverse-weight sample marks.

Tonelli and the weak-design envelope supply the public second moments for both signed inverse-weight sample marks. Product sampling then gives unbiased block averages, variance and absolute-error bounds, and independence of disjoint blocks.

theorem stratum_indicator_lintegral

A nonnegative stratum mark is its conditional integral multiplied by stratum mass. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
x :
f :
StructSpace S → ℝ≥0∞
(∫⁻ w, (if sX w = x then f w else 0) ∂P) = P {w | sX w = x} * ∫⁻ w, f w ∂stratumLaw P x
Proof (Lean source)
-- @node: stratum_indicator_lintegral lemma stratum_indicator_lintegral (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (x : Bool) (f : StructSpace S → ℝ≥0∞) : (∫⁻ w, (if sX w = x then f w else 0) ∂P) = P {w | sX w = x} * ∫⁻ w, f w ∂stratumLaw P x := by have hx : MeasurableSet {w : StructSpace S | sX w = x} := measurableSet_eq_fun (by fun_prop) measurable_const have hp : P {w | sX w = x} ≠ 0 := by intro h have := strataProb_pos P hoverlap x simp [strataProb, Measure.real, h] at this rw [stratumLaw, lintegral_smul_measure] rw [smul_eq_mul, ← mul_assoc, ENNReal.mul_inv_cancel hp (measure_ne_top P _), one_mul] simpa only [Set.indicator_apply, Set.mem_setOf_eq] using lintegral_indicator hx f
CausalSmith.Stat.NoisydoseWeakdesignTransition.stratum_indicator_lintegral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:15
theorem inverse_square_stratum_lintegral

Error independence factors the conditional inverse-weight square by Tonelli. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
hoverlap :
hgauss :
x :
ell :
ℝ → ℝ
hell :
(∫⁻ w, ofReal ((ell (observedCentered sigma w))^2) ∂stratumLaw P x)
= ∫⁻ t, ∫⁻ z, ofReal ((ell (t+sigma*z))^2) ∂gaussianReal 0 1 ∂(stratumLaw P x).map latentCentered
Proof (Lean source)
-- @node: inverse_square_stratum_lintegral lemma inverse_square_stratum_lintegral (sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (herr : ErrorIndependence P) (hgauss : GaussianChannel P) (x : Bool) (ell : ℝ → ℝ) (hell : Measurable ell) : (∫⁻ w, ofReal ((ell (observedCentered sigma w))^2) ∂stratumLaw P x) = ∫⁻ t, ∫⁻ z, ofReal ((ell (t+sigma*z))^2) ∂gaussianReal 0 1 ∂(stratumLaw P x).map latentCentered := by haveI := stratumLaw_probability P hoverlap x have hT : Measurable (latentCentered (S := S)) := by unfold latentCentered; fun_prop have hZT : Measurable (fun w : StructSpace S => (sZ w, latentCentered w)) := by fun_prop let F : ℝ × ℝ → ℝ≥0∞ := fun p => ofReal ((ell (p.2+sigma*p.1))^2) have hF : Measurable F := by fun_prop have hprod : (stratumLaw P x).map (fun w => (sZ w, latentCentered w)) = (gaussianReal 0 1).prod ((stratumLaw P x).map latentCentered) := by rw [error_centered_product_stratum P hoverlap herr x, hgauss] calc _ = ∫⁻ w, F (sZ w, latentCentered w) ∂stratumLaw P x := by apply lintegral_congr intro w dsimp [F, observedCentered, contaminatedDose, latentCentered] congr 3 ring _ = ∫⁻ p, F p ∂(gaussianReal 0 1).prod ((stratumLaw P x).map latentCentered) := by rw [← hprod, lintegral_map hF hZT] _ = _ := lintegral_prod_symm _ hF.aemeasurable
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverse_square_stratum_lintegral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:32
theorem inverse_square_stratum_le_VqENN

The upper density envelope bounds each conditional inverse-weight second moment. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
ell :
ℝ → ℝ
hell :
(∫⁻ w, ofReal ((ell (observedCentered sigma w))^2) ∂stratumLaw P x)
≤ pubVqENN K kappa sigma ell
Proof (Lean source)
-- @node: inverse_square_stratum_le_VqENN lemma inverse_square_stratum_le_VqENN (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (ell : ℝ → ℝ) (hell : Measurable ell) : (∫⁻ w, ofReal ((ell (observedCentered sigma w))^2) ∂stratumLaw P x) ≤ pubVqENN K kappa sigma ell := by obtain ⟨g, hg, hlaw, henv⟩ := hP.weakDesign rw [inverse_square_stratum_lintegral sigma P hP.strataPos hP.errorIndependence hP.gaussianChannel x ell hell, hlaw x, lintegral_withDensity_eq_lintegral_mul _ (hg x).ennreal_ofReal (by fun_prop)] have hchi16 : 0 ≤ K.chi / 16 := div_nonneg (K.clo_pos.le.trans K.clo_le_chi) (by norm_num) unfold pubVqENN VqENN rw [← lintegral_const_mul' _ _ (by norm_num : (16 : ℝ≥0∞) ≠ ⊤), ← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] apply lintegral_mono_ae filter_upwards [henv x] with t ht dsimp only [Pi.mul_apply] have hupper : ofReal (g x t) ≤ ofReal (K.chi / 16) * (16 * ofReal (|t|^kappa)) := by calc _ ≤ ofReal (K.chi / 16 * (16 * |t|^kappa)) := ENNReal.ofReal_le_ofReal (by linarith [ht.2]) _ = _ := by rw [ENNReal.ofReal_mul hchi16, ENNReal.ofReal_mul (by norm_num)] norm_num calc _ ≤ (ofReal (K.chi / 16) * (16 * ofReal (|t|^kappa))) * (∫⁻ z, ofReal ((ell (t+sigma*z))^2) ∂gaussianReal 0 1) := by gcongr _ = _ := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverse_square_stratum_le_VqENN · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:60
theorem denominator_square_lintegral_le

The unmarked structural stratum mark has second moment at most the public envelope. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
hell :
(∫⁻ w, ofReal ((if sX w = x then q.ell (observedCentered sigma w) else 0)^2) ∂P)
≤ pubVqENN K kappa sigma q.ell
Proof (Lean source)
-- @node: denominator_square_lintegral_le lemma denominator_square_lintegral_le (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (q : WeightPair) (hell : Measurable q.ell) : (∫⁻ w, ofReal ((if sX w = x then q.ell (observedCentered sigma w) else 0)^2) ∂P) ≤ pubVqENN K kappa sigma q.ell := by have heq (w : StructSpace S) : ofReal ((if sX w = x then q.ell (observedCentered sigma w) else 0)^2) = if sX w = x then ofReal ((q.ell (observedCentered sigma w))^2) else 0 := by split_ifs <;> simp simp_rw [heq] rw [stratum_indicator_lintegral P hP.strataPos] calc _ ≤ 1 * ∫⁻ w, ofReal ((q.ell (observedCentered sigma w))^2) ∂stratumLaw P x := by gcongr; exact prob_le_one _ ≤ _ := by rw [one_mul] exact inverse_square_stratum_le_VqENN E beta kappa sigma P hP x q.ell hell
CausalSmith.Stat.NoisydoseWeakdesignTransition.denominator_square_lintegral_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:93
theorem numerator_square_lintegral_le

Bounded realized outcomes make the marked square no larger than the unmarked square. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
hell :
(∫⁻ w, ofReal ((if sX w = x then sY w*q.ell (observedCentered sigma w) else 0)^2) ∂P)
≤ pubVqENN K kappa sigma q.ell
Proof (Lean source)
-- @node: numerator_square_lintegral_le lemma numerator_square_lintegral_le (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (q : WeightPair) (hell : Measurable q.ell) : (∫⁻ w, ofReal ((if sX w = x then sY w*q.ell (observedCentered sigma w) else 0)^2) ∂P) ≤ pubVqENN K kappa sigma q.ell := by apply le_trans _ (denominator_square_lintegral_le E beta kappa sigma P hP x q hell) apply lintegral_mono_ae filter_upwards [realized_outcome_mem_Icc E P hP.strataPos hP.scheduleUnconfoundedness hP.latentSupport hP.boundedPO hP.consistency] with w hw apply ENNReal.ofReal_le_ofReal by_cases hx : sX w = x · simp only [if_pos hx, mul_pow] have hs : (sY w)^2 ≤ 1 := by nlinarith [hw.1, hw.2] simpa only [one_mul] using mul_le_mul_of_nonneg_right hs (sq_nonneg (q.ell (observedCentered sigma w))) · simp only [if_neg hx, le_refl]
CausalSmith.Stat.NoisydoseWeakdesignTransition.numerator_square_lintegral_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:114
theorem square_integrable_and_integral_le Lemma square_integrable_and_integral_le in the paper ↗

A finite extended second-moment envelope gives genuine square-integrability and a real bound. Under the stated conditions. This is the stated conclusion.

Formal statement
Ω :
μ :
f :
Ω → ℝ
hf :
V :
ℝ≥0∞
hV :
V < ⊤
hbound :
(∫⁻ w, ofReal ((f w)^2) ∂μ) ≤ V
conclusion 1
MemLp f 2 μ
conclusion 2
(∫ w, (f w)^2 ∂μ) ≤ V.toReal
Proof (Lean source)
-- @node: square_integrable_and_integral_le lemma square_integrable_and_integral_le {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (f : Ω → ℝ) (hf : Measurable f) (V : ℝ≥0∞) (hV : V < ⊤) (hbound : (∫⁻ w, ofReal ((f w)^2) ∂μ) ≤ V) : MemLp f 2 μ ∧ (∫ w, (f w)^2 ∂μ) ≤ V.toReal := by have hn : 0 ≤ᵐ[μ] (fun w => (f w)^2) := ae_of_all _ (fun w => sq_nonneg _) have hi : Integrable (fun w => (f w)^2) μ := ⟨(hf.pow_const 2).aestronglyMeasurable, (hasFiniteIntegral_iff_ofReal hn).mpr (hbound.trans_lt hV)⟩ refine ⟨(memLp_two_iff_integrable_sq hf.aestronglyMeasurable).mpr hi, ?_⟩ rw [integral_eq_lintegral_of_nonneg_ae hn hi.aestronglyMeasurable] exact ENNReal.toReal_mono hV.ne hbound
CausalSmith.Stat.NoisydoseWeakdesignTransition.square_integrable_and_integral_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:134
theorem observed_denominator_second_moment

The observed denominator mark has a finite square and its public second-moment bound. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
hell :
hV :
VqENN kappa sigma q.ell < ⊤
conclusion 1
MemLp (fun o : Obs => if o.1 = x then q.ell (o.2.1-a0) else 0) 2 (obsLaw sigma P)
conclusion 2
(∫ o : Obs, (if o.1 = x then q.ell (o.2.1-a0) else 0)^2 ∂obsLaw sigma P)
≤ pubVq K kappa sigma q.ell
Proof (Lean source)
-- @node: observed_denominator_second_moment lemma observed_denominator_second_moment (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (q : WeightPair) (hell : Measurable q.ell) (hV : VqENN kappa sigma q.ell < ⊤) : MemLp (fun o : Obs => if o.1 = x then q.ell (o.2.1-a0) else 0) 2 (obsLaw sigma P) ∧ (∫ o : Obs, (if o.1 = x then q.ell (o.2.1-a0) else 0)^2 ∂obsLaw sigma P) ≤ pubVq K kappa sigma q.ell := by have hm : Measurable (fun o : Obs => if o.1 = x then q.ell (o.2.1-a0) else 0) := by apply Measurable.ite (measurableSet_eq_fun (by fun_prop) measurable_const) (by fun_prop) measurable_const apply square_integrable_and_integral_le _ _ hm _ (pubVqENN_lt_top K kappa sigma _ hV) rw [obsLaw, lintegral_map (hm.pow_const 2).ennreal_ofReal (by unfold obsMap contaminatedDose; fun_prop)] exact denominator_square_lintegral_le E beta kappa sigma P hP x q hell
CausalSmith.Stat.NoisydoseWeakdesignTransition.observed_denominator_second_moment · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:148
theorem observed_numerator_second_moment

The observed outcome-marked weight has a finite square and the same public bound. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
hell :
hV :
VqENN kappa sigma q.ell < ⊤
conclusion 1
MemLp (fun o : Obs => if o.1 = x then o.2.2*q.ell (o.2.1-a0) else 0) 2 (obsLaw sigma P)
conclusion 2
(∫ o : Obs, (if o.1 = x then o.2.2*q.ell (o.2.1-a0) else 0)^2 ∂obsLaw sigma P)
≤ pubVq K kappa sigma q.ell
Proof (Lean source)
-- @node: observed_numerator_second_moment lemma observed_numerator_second_moment (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (q : WeightPair) (hell : Measurable q.ell) (hV : VqENN kappa sigma q.ell < ⊤) : MemLp (fun o : Obs => if o.1 = x then o.2.2*q.ell (o.2.1-a0) else 0) 2 (obsLaw sigma P) ∧ (∫ o : Obs, (if o.1 = x then o.2.2*q.ell (o.2.1-a0) else 0)^2 ∂obsLaw sigma P) ≤ pubVq K kappa sigma q.ell := by have hm : Measurable (fun o : Obs => if o.1 = x then o.2.2*q.ell (o.2.1-a0) else 0) := by apply Measurable.ite (measurableSet_eq_fun (by fun_prop) measurable_const) (by fun_prop) measurable_const apply square_integrable_and_integral_le _ _ hm _ (pubVqENN_lt_top K kappa sigma _ hV) rw [obsLaw, lintegral_map (hm.pow_const 2).ennreal_ofReal (by unfold obsMap contaminatedDose; fun_prop)] exact numerator_square_lintegral_le E beta kappa sigma P hP x q hell
CausalSmith.Stat.NoisydoseWeakdesignTransition.observed_numerator_second_moment · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:166
theorem observed_marks_variance_le

Both observed marks have variance at most the public inverse-weight moment. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
hell :
hV :
VqENN kappa sigma q.ell < ⊤
conclusion 1
variance (fun o : Obs => if o.1 = x then q.ell (o.2.1-a0) else 0) (obsLaw sigma P)
≤ pubVq K kappa sigma q.ell
conclusion 2
variance (fun o : Obs => if o.1 = x then o.2.2*q.ell (o.2.1-a0) else 0) (obsLaw sigma P)
≤ pubVq K kappa sigma q.ell
Proof (Lean source)
-- @node: observed_marks_variance_le lemma observed_marks_variance_le (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (q : WeightPair) (hell : Measurable q.ell) (hV : VqENN kappa sigma q.ell < ⊤) : variance (fun o : Obs => if o.1 = x then q.ell (o.2.1-a0) else 0) (obsLaw sigma P) ≤ pubVq K kappa sigma q.ell ∧ variance (fun o : Obs => if o.1 = x then o.2.2*q.ell (o.2.1-a0) else 0) (obsLaw sigma P) ≤ pubVq K kappa sigma q.ell := by have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop haveI : IsProbabilityMeasure (obsLaw sigma P) := Measure.isProbabilityMeasure_map hm.aemeasurable obtain ⟨hD, hDsq⟩ := observed_denominator_second_moment E beta kappa sigma P hP x q hell hV obtain ⟨hM, hMsq⟩ := observed_numerator_second_moment E beta kappa sigma P hP x q hell hV exact ⟨(variance_le_expectation_sq hD.aestronglyMeasurable).trans hDsq, (variance_le_expectation_sq hM.aestronglyMeasurable).trans hMsq⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.observed_marks_variance_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:184
theorem iid_disjoint_block_averages_indep Lemma iid_disjoint_block_averages_indep in the paper ↗

Averages over disjoint deterministic blocks are independent, even for different marks. Under the stated conditions. This is the stated conclusion.

Formal statement
Ω :
n :
ℕ
b c :
hbc :
f g :
Ω → ℝ
hf :
hg :
IndepFun (fun data : Fin n → Ω => (∑ i ∈ b, f (data i)) / (b.card : ℝ)) (fun data : Fin n → Ω => (∑ i ∈ c, g (data i)) / (c.card : ℝ)) (Measure.pi (fun _ : Fin n => μ))
Proof (Lean source)
-- @node: iid_disjoint_block_averages_indep lemma iid_disjoint_block_averages_indep {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (n : ℕ) (b c : Finset (Fin n)) (hbc : Disjoint b c) (f g : Ω → ℝ) (hf : Measurable f) (hg : Measurable g) : IndepFun (fun data : Fin n → Ω => (∑ i ∈ b, f (data i)) / (b.card : ℝ)) (fun data : Fin n → Ω => (∑ i ∈ c, g (data i)) / (c.card : ℝ)) (Measure.pi (fun _ : Fin n => μ)) := by have hind : iIndepFun (fun i (data : Fin n → Ω) => data i) (Measure.pi (fun _ : Fin n => μ)) := iIndepFun_pi (fun _ => measurable_id.aemeasurable) have h := iIndepFun.indepFun_finset b c hbc hind (fun _ => by fun_prop) let F := fun z : b → Ω => (∑ i : b, f (z i)) / (b.card : ℝ) let G := fun z : c → Ω => (∑ i : c, g (z i)) / (c.card : ℝ) have hF : Measurable F := by fun_prop have hG : Measurable G := by fun_prop have hcomp := h.comp hF hG have heqF : F ∘ (fun data (i : b) => data i) = (fun data : Fin n → Ω => (∑ i ∈ b, f (data i)) / (b.card : ℝ)) := by funext data dsimp [F, Function.comp_def] congr 1 exact Finset.sum_coe_sort b (fun i => f (data i)) have heqG : G ∘ (fun data (i : c) => data i) = (fun data : Fin n → Ω => (∑ i ∈ c, g (data i)) / (c.card : ℝ)) := by funext data dsimp [G, Function.comp_def] congr 1 exact Finset.sum_coe_sort c (fun i => g (data i)) rw [heqF, heqG] at hcomp exact hcomp
CausalSmith.Stat.NoisydoseWeakdesignTransition.iid_disjoint_block_averages_indep · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:203
theorem iid_block_average_moments Lemma iid_block_average_moments in the paper ↗

A nonempty deterministic average of square-integrable iid marks is unbiased, and its variance is the single-mark variance divided by the block size. Under the stated conditions. This is the stated conclusion.

Formal statement
Ω :
n :
ℕ
b :
hb :
b.Nonempty
f :
Ω → ℝ
hf :
MemLp f 2 μ
A :
fun data : Fin n → Ω => (∑ i ∈ b, f (data i)) / (b.card : ℝ)
MemLp A 2 (Measure.pi (fun _ : Fin n => μ))
(∫ data, A data ∂Measure.pi (fun _ : Fin n => μ)) = ∫ o, f o ∂μ
variance A (Measure.pi (fun _ : Fin n => μ)) = variance f μ / (b.card : ℝ)
Proof (Lean source)
-- @node: iid_block_average_moments lemma iid_block_average_moments {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (n : ℕ) (b : Finset (Fin n)) (hb : b.Nonempty) (f : Ω → ℝ) (hf : MemLp f 2 μ) : let A := fun data : Fin n → Ω => (∑ i ∈ b, f (data i)) / (b.card : ℝ) MemLp A 2 (Measure.pi (fun _ : Fin n => μ)) ∧ (∫ data, A data ∂Measure.pi (fun _ : Fin n => μ)) = ∫ o, f o ∂μ ∧ variance A (Measure.pi (fun _ : Fin n => μ)) = variance f μ / (b.card : ℝ) := by let Q := Measure.pi (fun _ : Fin n => μ) let X : Fin n → (Fin n → Ω) → ℝ := fun i data => f (data i) have hX (i : Fin n) : MemLp (X i) 2 Q := hf.comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => μ) i) have hc : (b.card : ℝ) ≠ 0 := by exact_mod_cast Finset.card_ne_zero.mpr hb have hmean (i : Fin n) : (∫ data, X i data ∂Q) = ∫ o, f o ∂μ := by have hp := measurePreserving_eval (fun _ : Fin n => μ) i rw [← hp.map_eq, integral_map hp.measurable.aemeasurable] simpa only [hp.map_eq] using hf.aestronglyMeasurable have hvar (i : Fin n) : variance (X i) Q = variance f μ := by have hp := measurePreserving_eval (fun _ : Fin n => μ) i rw [← hp.map_eq, variance_map (by simpa only [hp.map_eq] using hf.aemeasurable) hp.measurable.aemeasurable] rfl have hsum : MemLp (fun data => ∑ i ∈ b, X i data) 2 Q := memLp_finsetSum b (fun i _ => hX i) have hind : iIndepFun X Q := iIndepFun_pi (fun _ => hf.aemeasurable) have hvs : variance (fun data => ∑ i ∈ b, X i data) Q = (b.card : ℝ) * variance f μ := by have h := IndepFun.variance_sum (s := b) (fun i _ => hX i) (fun i hi j hj hij => hind.indepFun hij) simp only [hvar, Finset.sum_const, nsmul_eq_mul] at h convert h using 1 congr 1 funext data simp only [Finset.sum_apply] refine ⟨by simpa only [div_eq_mul_inv, mul_comm] using hsum.const_mul ((b.card : ℝ)⁻¹), ?_, ?_⟩ · rw [integral_div, integral_finsetSum b (fun i _ => (hX i).integrable (by norm_num))] simp only [hmean, Finset.sum_const, nsmul_eq_mul] exact mul_div_cancel_left₀ _ hc · simp only [div_eq_mul_inv] rw [variance_mul_const, hvs] field_simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.iid_block_average_moments · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:234
theorem expected_abs_deviation_le_sqrt_variance Lemma expected_abs_deviation_le_sqrt_variance in the paper ↗

Cauchy--Schwarz bounds expected absolute deviation by the square root of variance. Under the stated conditions. This is the stated conclusion.

Formal statement
Ω :
f :
Ω → ℝ
hf :
MemLp f 2 μ
(∫ w, |f w - ∫ o, f o ∂μ| ∂μ) ≤ sqrt (variance f μ)
Proof (Lean source)
-- @node: expected_abs_deviation_le_sqrt_variance lemma expected_abs_deviation_le_sqrt_variance {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (f : Ω → ℝ) (hf : MemLp f 2 μ) : (∫ w, |f w - ∫ o, f o ∂μ| ∂μ) ≤ sqrt (variance f μ) := by let g := fun w => |f w - ∫ o, f o ∂μ| have hdiff : MemLp (fun w => f w - ∫ o, f o ∂μ) 2 μ := hf.sub (memLp_const _) have hg : MemLp g 2 μ := by simpa only [Real.norm_eq_abs] using hdiff.norm have hid : (∫ w, (g w)^2 ∂μ) = variance f μ := by rw [variance_eq_integral hf.aemeasurable] simp only [g, sq_abs] have hsq : (∫ w, g w ∂μ)^2 ≤ variance f μ := by have h := variance_nonneg g μ rw [variance_eq_sub hg] at h simp only [Pi.pow_apply] at h rw [hid] at h linarith have hn : 0 ≤ ∫ w, g w ∂μ := integral_nonneg (fun _ => abs_nonneg _) have hs := Real.sq_sqrt (variance_nonneg f μ) have hp := Real.sqrt_nonneg (variance f μ) change (∫ w, g w ∂μ) ≤ _ nlinarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.expected_abs_deviation_le_sqrt_variance · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:278
theorem Dhat_population_moments

The denominator block is unbiased and has variance at most Vq divided by its size. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
n :
ℕ
hb :
(splitBlock n 1).Nonempty
x :
hell :
hV :
VqENN kappa sigma q.ell < ⊤
conclusion 1
MemLp (fun data => Dhat n data x q) 2 (experiment n sigma P)
conclusion 2
(∫ data, Dhat n data x q ∂experiment n sigma P) = populationD sigma P x q
conclusion 3
variance (fun data => Dhat n data x q) (experiment n sigma P)
≤ pubVq K kappa sigma q.ell / (splitBlock n 1).card
Proof (Lean source)
-- @node: Dhat_population_moments lemma Dhat_population_moments (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (n : ℕ) (hb : (splitBlock n 1).Nonempty) (x : Bool) (q : WeightPair) (hell : Measurable q.ell) (hV : VqENN kappa sigma q.ell < ⊤) : MemLp (fun data => Dhat n data x q) 2 (experiment n sigma P) ∧ (∫ data, Dhat n data x q ∂experiment n sigma P) = populationD sigma P x q ∧ variance (fun data => Dhat n data x q) (experiment n sigma P) ≤ pubVq K kappa sigma q.ell / (splitBlock n 1).card := by have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop haveI : IsProbabilityMeasure (obsLaw sigma P) := Measure.isProbabilityMeasure_map hm.aemeasurable obtain ⟨hmem, hsq⟩ := observed_denominator_second_moment E beta kappa sigma P hP x q hell hV obtain ⟨hA, hmean, hvar⟩ := iid_block_average_moments (obsLaw sigma P) n (splitBlock n 1) hb _ hmem refine ⟨hA, ?_, ?_⟩ · dsimp only [Dhat, Mhat, experiment] rw [hmean, obsLaw, integral_map hm.aemeasurable hmem.aestronglyMeasurable] rfl · dsimp only [Dhat, Mhat, experiment] rw [hvar] exact div_le_div_of_nonneg_right ((variance_le_expectation_sq hmem.aestronglyMeasurable).trans hsq) (Nat.cast_nonneg _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.Dhat_population_moments · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:303
theorem Mhat_population_moments

The outcome-marked block is unbiased and obeys the same variance envelope. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
n :
ℕ
hb :
(splitBlock n 2).Nonempty
x :
hell :
hV :
VqENN kappa sigma q.ell < ⊤
conclusion 1
MemLp (fun data => Mhat n data x q) 2 (experiment n sigma P)
conclusion 2
(∫ data, Mhat n data x q ∂experiment n sigma P) = populationM sigma P x q
conclusion 3
variance (fun data => Mhat n data x q) (experiment n sigma P)
≤ pubVq K kappa sigma q.ell / (splitBlock n 2).card
Proof (Lean source)
-- @node: Mhat_population_moments lemma Mhat_population_moments (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (n : ℕ) (hb : (splitBlock n 2).Nonempty) (x : Bool) (q : WeightPair) (hell : Measurable q.ell) (hV : VqENN kappa sigma q.ell < ⊤) : MemLp (fun data => Mhat n data x q) 2 (experiment n sigma P) ∧ (∫ data, Mhat n data x q ∂experiment n sigma P) = populationM sigma P x q ∧ variance (fun data => Mhat n data x q) (experiment n sigma P) ≤ pubVq K kappa sigma q.ell / (splitBlock n 2).card := by have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop haveI : IsProbabilityMeasure (obsLaw sigma P) := Measure.isProbabilityMeasure_map hm.aemeasurable obtain ⟨hmem, hsq⟩ := observed_numerator_second_moment E beta kappa sigma P hP x q hell hV obtain ⟨hA, hmean, hvar⟩ := iid_block_average_moments (obsLaw sigma P) n (splitBlock n 2) hb _ hmem refine ⟨hA, ?_, ?_⟩ · dsimp only [Dhat, Mhat, experiment] rw [hmean, obsLaw, integral_map hm.aemeasurable hmem.aestronglyMeasurable] rfl · dsimp only [Dhat, Mhat, experiment] rw [hvar] exact div_le_div_of_nonneg_right ((variance_le_expectation_sq hmem.aestronglyMeasurable).trans hsq) (Nat.cast_nonneg _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.Mhat_population_moments · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:329
theorem inverse_moments_expected_abs_error

Absolute error of each empirical inverse moment is bounded by its public standard deviation. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
n :
ℕ
hb1 :
(splitBlock n 1).Nonempty
hb2 :
(splitBlock n 2).Nonempty
x :
hell :
hV :
VqENN kappa sigma q.ell < ⊤
conclusion 1
(∫ data, |Dhat n data x q - populationD sigma P x q| ∂experiment n sigma P)
≤ sqrt (pubVq K kappa sigma q.ell / (splitBlock n 1).card)
conclusion 2
(∫ data, |Mhat n data x q - populationM sigma P x q| ∂experiment n sigma P)
≤ sqrt (pubVq K kappa sigma q.ell / (splitBlock n 2).card)
Proof (Lean source)
-- @node: inverse_moments_expected_abs_error lemma inverse_moments_expected_abs_error (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (n : ℕ) (hb1 : (splitBlock n 1).Nonempty) (hb2 : (splitBlock n 2).Nonempty) (x : Bool) (q : WeightPair) (hell : Measurable q.ell) (hV : VqENN kappa sigma q.ell < ⊤) : (∫ data, |Dhat n data x q - populationD sigma P x q| ∂experiment n sigma P) ≤ sqrt (pubVq K kappa sigma q.ell / (splitBlock n 1).card) ∧ (∫ data, |Mhat n data x q - populationM sigma P x q| ∂experiment n sigma P) ≤ sqrt (pubVq K kappa sigma q.ell / (splitBlock n 2).card) := by have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop haveI : IsProbabilityMeasure (obsLaw sigma P) := Measure.isProbabilityMeasure_map hm.aemeasurable haveI : IsProbabilityMeasure (experiment n sigma P) := by unfold experiment; infer_instance obtain ⟨hD, hDmean, hDv⟩ := Dhat_population_moments E beta kappa sigma P hP n hb1 x q hell hV obtain ⟨hM, hMmean, hMv⟩ := Mhat_population_moments E beta kappa sigma P hP n hb2 x q hell hV constructor · have h := expected_abs_deviation_le_sqrt_variance _ _ hD rw [hDmean] at h exact h.trans (Real.sqrt_le_sqrt hDv) · have h := expected_abs_deviation_le_sqrt_variance _ _ hM rw [hMmean] at h exact h.trans (Real.sqrt_le_sqrt hMv)
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverse_moments_expected_abs_error · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:355
theorem phat_population_moments

Empirical stratum frequency is unbiased with the Bernoulli variance bound. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
n :
ℕ
hb :
(splitBlock n 0).Nonempty
x :
conclusion 1
MemLp (fun data => phat n data x) 2 (experiment n sigma P)
conclusion 2
(∫ data, phat n data x ∂experiment n sigma P) = strataProb P x
conclusion 3
variance (fun data => phat n data x) (experiment n sigma P)
≤ (1/4 : ℝ) / (splitBlock n 0).card
Proof (Lean source)
-- @node: phat_population_moments lemma phat_population_moments (sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (n : ℕ) (hb : (splitBlock n 0).Nonempty) (x : Bool) : MemLp (fun data => phat n data x) 2 (experiment n sigma P) ∧ (∫ data, phat n data x ∂experiment n sigma P) = strataProb P x ∧ variance (fun data => phat n data x) (experiment n sigma P) ≤ (1/4 : ℝ) / (splitBlock n 0).card := by have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop haveI : IsProbabilityMeasure (obsLaw sigma P) := Measure.isProbabilityMeasure_map hm.aemeasurable let f : Obs → ℝ := fun o => if o.1 = x then 1 else 0 have hf : Measurable f := Measurable.ite (measurableSet_eq_fun (by fun_prop) measurable_const) measurable_const measurable_const have hr : ∀ o, f o ∈ Icc (0 : ℝ) 1 := by intro o; dsimp [f]; split_ifs <;> norm_num have hmem : MemLp f 2 (obsLaw sigma P) := memLp_of_bounded (ae_of_all _ hr) hf.aestronglyMeasurable 2 have hv : variance f (obsLaw sigma P) ≤ 1/4 := by have h := variance_le_sq_of_bounded (μ := obsLaw sigma P) (ae_of_all _ hr) hf.aemeasurable norm_num at h exact h have hmean : (∫ o, f o ∂obsLaw sigma P) = strataProb P x := by rw [obsLaw, integral_map hm.aemeasurable hf.aestronglyMeasurable] change (∫ w, (if sX w = x then (1 : ℝ) else 0) ∂P) = _ have hx : MeasurableSet {w : StructSpace S | sX w = x} := measurableSet_eq_fun (by fun_prop) measurable_const simpa only [Set.indicator_apply, Set.mem_setOf_eq, setIntegral_const, smul_eq_mul, mul_one, strataProb] using integral_indicator_const (μ := P) (1 : ℝ) hx obtain ⟨hA, hAmean, hAv⟩ := iid_block_average_moments (obsLaw sigma P) n (splitBlock n 0) hb f hmem refine ⟨hA, ?_, ?_⟩ · dsimp only [phat, experiment] exact hAmean.trans hmean · dsimp only [phat, experiment] rw [hAv] exact div_le_div_of_nonneg_right hv (Nat.cast_nonneg _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.phat_population_moments · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CertificateMoments.lean:381
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.CitedGates 13 declarations Five explicit cited logical gates, and the separate direct Gaussian regression benchmark.

Five explicit cited logical gates, and the separate direct Gaussian regression benchmark. These propositions are inputs to conditional consumers and contain no proof placeholders.

def jacobiAngularDistance

Angular distance on the symmetric unit interval.

Definition (Lean source)
x y :
ℝ
jacobiAngularDistance x y :
ℝ
|arccos x - arccos y|
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobiAngularDistance · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:17
def jacobiRegularizedWeight

Endpoint-regularized Jacobi weight at the public spectral degree.

Definition (Lean source)
a b :
ℝ
m :
ℕ
x :
ℝ
jacobiRegularizedWeight a b m x :
ℝ
(1-x+(m : ℝ)^(-2 : ℝ))^(a+1/2) * (1+x+(m : ℝ)^(-2 : ℝ))^(b+1/2)
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobiRegularizedWeight · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:19

A smooth cutoff on the nonnegative half-line, supported between one half and two.

Definition (Lean source)
eta :
ℝ → ℝ
SmoothJacobiFilter eta :
Prop
clause 1
ContDiffOn ℝ ∞ eta (Ici 0)
clause 2
support eta ⊆ Icc (1/2 : ℝ) 2
CausalSmith.Stat.NoisydoseWeakdesignTransition.SmoothJacobiFilter · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:22

Petrushev and Xu (2005), Theorem 2.4, equation (2.14), arXiv:math/0508581. The smooth-filter specialization permits every positive decay exponent.

Definition (Lean source)
FilteredJacobiLocalization :
Sort 0
∀ a b : ℝ,
-1/2 < a → -1/2 < b → ∀ eta : ℝ → ℝ, SmoothJacobiFilter eta → ∀ S : ℝ, 0 < S → ∃ C : ℝ, 0 < C ∧ ∀ m : ℕ, 1
≤ m → ∀ x ∈ Icc (-1 : ℝ) 1, ∀ y ∈ Icc (-1 : ℝ) 1, |filteredJacobiKernel a b eta m x y| ≤ C*m / (sqrt (jacobiRegularizedWeight a b m x * jacobiRegularizedWeight a b m y) * (1+m*jacobiAngularDistance x y)^S)
CausalSmith.Stat.NoisydoseWeakdesignTransition.FilteredJacobiLocalization · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:26

Kyriazis, Petrushev and Xu (2008), Theorem 2.2, equation (2.4), https://people.math.sc.edu/pencho/Publications/kpx-06-28-06-web.pdf. The constant depends on the fixed local angular radius and decay exponent.

Definition (Lean source)
FilteredJacobiLipschitz :
Sort 0
∀ a b : ℝ,
-1/2 < a → -1/2 < b → ∀ eta : ℝ → ℝ, SmoothJacobiFilter eta → ∀ S cstar : ℝ, 0 < S → 0 < cstar → ∃ C : ℝ, 0 < C ∧ ∀ m : ℕ, 1
≤ m → ∀ x ∈ Icc (-1 : ℝ) 1, ∀ xi ∈ Icc (-1 : ℝ) 1, ∀ y ∈ Icc (-1 : ℝ) 1, ∀ z ∈ Icc (-1 : ℝ) 1, jacobiAngularDistance x xi ≤ cstar/m → jacobiAngularDistance z xi ≤ cstar/m → |filteredJacobiKernel a b eta m x y
- filteredJacobiKernel a b eta m xi y|
≤ C*(m : ℝ)^2*jacobiAngularDistance x xi / (sqrt (jacobiRegularizedWeight a b m y * jacobiRegularizedWeight a b m z) * (1+m*jacobiAngularDistance y z)^S)
CausalSmith.Stat.NoisydoseWeakdesignTransition.FilteredJacobiLipschitz · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:37
def JacobiNormOrthogonality Object lem:jacobi-norm in the paper ↗

NIST Digital Library of Mathematical Functions, Table 18.3.1, Jacobi row and caption, https://dlmf.nist.gov/18.3 (accessed 2026). Orthogonality and the positive squared norm.

Definition (Lean source)
JacobiNormOrthogonality :
Sort 0
∀ a b : ℝ
if
-1/2 < a
and
-1/2 < b
then
∀ j : ℕ,
(∀ R : Polynomial ℝ, R.degree < (j : WithBot ℕ) → ∫ z in Icc (-1 : ℝ) 1, jacobiWeight a b z * stdJacobi a b j z * R.eval z = 0) ∧
0 < jacobiSqNorm a b j ∧
= (2 : ℝ)^(a+b+1) / (2*j+a+b+1) * (Gamma (j+a+1) * Gamma (j+b+1) / (Gamma (j+1) * Gamma (j+a+b+1)))
CausalSmith.Stat.NoisydoseWeakdesignTransition.JacobiNormOrthogonality · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:52

NIST DLMF (accessed 2026), equation 5.11.12, https://dlmf.nist.gov/5.11.E12. Positive real-axis specialization; the shifted arguments are eventually positive.

Definition (Lean source)
GammaRatioAsymptotic :
Sort 0
∀ s t : ℝ,
Tendsto (fun z : ℝ => Gamma (z+s) / Gamma (z+t) / z^(s-t)) atTop (𝓝 1)
CausalSmith.Stat.NoisydoseWeakdesignTransition.GammaRatioAsymptotic · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:64
def GaiffasDesign

Fixed power-law design in the separate direct Gaussian-response experiment.

Definition (Lean source)
v c xstar delta :
ℝ
GaiffasDesign v c xstar delta nu :
Prop
∃ g : ℝ → ℝ,
clause 1
u ∈ Icc (0 : ℝ) 1 :
0 ≤ g u
clause 2
= (volume.restrict (Icc (0 : ℝ) 1)).withDensity (fun u => ofReal (g u))
clause 3
u ∈ Icc (0 : ℝ) 1 :
|u-xstar| ≤ delta
g u = c*|u-xstar|^v
CausalSmith.Stat.NoisydoseWeakdesignTransition.GaiffasDesign · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:71
def gaiffasBandwidth

Exact balance bandwidth of the separate power-law Gaussian-response regression benchmark.

Definition (Lean source)
s v c r tau :
ℝ
n :
ℕ
gaiffasBandwidth s v c r tau n :
ℝ
(tau^2*(v+1)/(2*c*r^2*n))^(1/(2*s+v+1))
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaiffasBandwidth · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:78
def GaiffasFunctionClass

Definition 2's local polynomial approximation class, retaining linear polynomials at s=1.

Definition (Lean source)
s v c r M tau xstar :
ℝ
n :
ℕ
f :
Dose → ℝ
GaiffasFunctionClass s v c r M tau xstar n f :
Prop
clause 1
clause 2
u :
|f u| ≤ M
clause 3
a :
ℝ
0 < a
a ≤ gaiffasBandwidth s v c r tau n
(⨅ p : {p : Polynomial ℝ // p.natDegree ≤ floor s}, ⨆ u : {u : Dose // |(u : ℝ)-xstar| ≤ a}, ofReal |f u.1 - p.1.eval ((u.1 : ℝ)-xstar)|)
≤ ofReal (r*a^s)
CausalSmith.Stat.NoisydoseWeakdesignTransition.GaiffasFunctionClass · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:81
def gaiffasObsLaw

Direct regression record formed from an independent design draw and Gaussian response noise.

Definition (Lean source)
tau :
ℝ
f :
Dose → ℝ
gaiffasObsLaw tau nu f :
Measure (Dose × ℝ)
((nu : Measure Dose).prod (gaussianReal 0 ⟨tau^2, sq_nonneg tau⟩)).map (fun p => (p.1, f p.1+p.2))
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaiffasObsLaw · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:89
def gaiffasMinimax

All-estimator pointwise absolute minimax risk in the separate direct regression experiment with the local polynomial approximation class.

Definition (Lean source)
s v c r M tau :
ℝ
xstar :
n :
ℕ
gaiffasMinimax s v c r M tau xstar nu n :
ℝ≥0∞
minimaxValueENNReal (fun (T : {T : (Fin n → Dose × ℝ) → ℝ // Measurable T}) (f : {f : Dose → ℝ // GaiffasFunctionClass s v c r M tau xstar n f}) => ∫⁻ data, ofReal |T.1 data - f.1 xstar| ∂Measure.pi (fun _ : Fin n => gaiffasObsLaw tau nu f.1))
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaiffasMinimax · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:93

Gaiffas (2005), Definition 2 and Theorem 1, equations (2.1), (2.4), (2.5), PDF pages 3–4, https://arxiv.org/pdf/math/0410354v3. Exact power-law specialization with absolute loss, in a separate direct regression experiment. No causal-class inclusion or honest-length assertion is carried by this gate.

Definition (Lean source)
GaiffasDirectBenchmark :
Sort 0
∀ s v c r M tau : ℝ,
0 < s → s
≤ 1 → v ∈ Icc (0 : ℝ) 2 → 0 < c → 0 < r → 0 < M → 0 < tau → ∀ xstar : Dose, 0 < (xstar : ℝ) → (xstar : ℝ) < 1 → ∀ delta : ℝ, 0 < delta → delta ≤ min (xstar : ℝ) (1-(xstar : ℝ)) → ∀ nu : ProbabilityMeasure Dose, GaiffasDesign v c xstar delta nu → ∃ c0 C0 : ℝ, 0 < c0 ∧ c0 < C0 ∧ ∃ n0 : ℕ, ∀ n ≥ n0, gaiffasBandwidth s v c r tau n ≤ delta ∧ ofReal (c0*(n : ℝ)^(-s/(2*s+v+1))) ≤ gaiffasMinimax s v c r M tau xstar nu n ∧ gaiffasMinimax s v c r M tau xstar nu n ≤ ofReal (C0*(n : ℝ)^(-s/(2*s+v+1))) ∧ ofReal (c0*r*(gaiffasBandwidth s v c r tau n)^s) ≤ gaiffasMinimax s v c r M tau xstar nu n ∧ gaiffasMinimax s v c r M tau xstar nu n ≤ ofReal (C0*r*(gaiffasBandwidth s v c r tau n)^s)
CausalSmith.Stat.NoisydoseWeakdesignTransition.GaiffasDirectBenchmark · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/CitedGates.lean:101
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.ConditionalMean 17 declarations Product integration of schedule evaluations and bounded regression tests.

Product integration of schedule evaluations and bounded regression tests.

theorem stratumLaw_integral

Normalized stratum integrals equal the corresponding indicator integrals divided by mass. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
x :
f :
StructSpace S → ℝ
(∫ w, f w ∂stratumLaw P x) = (∫ w, (if sX w = x then f w else 0) ∂P) / strataProb P x
Proof (Lean source)
-- @node: stratumLaw_integral lemma stratumLaw_integral (P : Measure (StructSpace S)) (x : Bool) (f : StructSpace S → ℝ) : (∫ w, f w ∂stratumLaw P x) = (∫ w, (if sX w = x then f w else 0) ∂P) / strataProb P x := by have hx : MeasurableSet {w : StructSpace S | sX w = x} := measurableSet_eq_fun (by fun_prop) measurable_const rw [stratumLaw, integral_smul_measure, ENNReal.toReal_inv, smul_eq_mul] rw [← integral_indicator hx] simp only [strataProb, Measure.real, indicator_apply, mem_ofPred_eq, div_eq_mul_inv, mul_comm]
CausalSmith.Stat.NoisydoseWeakdesignTransition.stratumLaw_integral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:17
theorem stratumLaw_ae_stratum

The stratum coordinate is constant under its normalized stratum law. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
x :
∀ᵐ w ∂stratumLaw P x, sX w = x
Proof (Lean source)
-- @node: stratumLaw_ae_stratum lemma stratumLaw_ae_stratum (P : Measure (StructSpace S)) (x : Bool) : ∀ᵐ w ∂stratumLaw P x, sX w = x := by apply Measure.ae_smul_measure exact ae_restrict_mem (measurableSet_eq_fun (by fun_prop) measurable_const)
CausalSmith.Stat.NoisydoseWeakdesignTransition.stratumLaw_ae_stratum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:29
theorem integral_eq_stratum_sum

Integrable population expectations split into the two normalized stratum expectations. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
f :
StructSpace S → ℝ
hf :
(∫ w, f w ∂P) = ∑ x : Bool, strataProb P x * ∫ w, f w ∂stratumLaw P x
Proof (Lean source)
-- @node: integral_eq_stratum_sum lemma integral_eq_stratum_sum (P : Measure (StructSpace S)) (hoverlap : StratumPositive P) (f : StructSpace S → ℝ) (hf : Integrable f P) : (∫ w, f w ∂P) = ∑ x : Bool, strataProb P x * ∫ w, f w ∂stratumLaw P x := by have hi (x : Bool) : Integrable (fun w => if sX w = x then f w else 0) P := by apply (hf.indicator (show MeasurableSet {w : StructSpace S | sX w = x} from measurableSet_eq_fun (by fun_prop) measurable_const)).congr filter_upwards [] with w by_cases hw : sX w = x <;> simp [hw] calc _ = ∫ w, ∑ x : Bool, if sX w = x then f w else 0 ∂P := by apply integral_congr_ae filter_upwards [] with w cases sX w <;> simp _ = ∑ x : Bool, ∫ w, (if sX w = x then f w else 0) ∂P := integral_finsetSum _ (fun x _ => hi x) _ = _ := by apply Finset.sum_congr rfl intro x _ rw [stratumLaw_integral, mul_div_cancel₀ _ (ne_of_gt (strataProb_pos P hoverlap x))]
CausalSmith.Stat.NoisydoseWeakdesignTransition.integral_eq_stratum_sum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:36
def projectedMean

The projected potential mean is a globally measurable extension of its Holder version.

Definition (Lean source)
S :
Type u_1
shared
E :
a :
ℝ
x :
projectedMean E P a x :
ℝ
CausalSmith.Stat.NoisydoseWeakdesignTransition.projectedMean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:58
theorem projectedMean_measurable

Holder regularity makes the projected mean Borel in dose and stratum. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta :
ℝ
hbeta :
0 < beta
hholder :
HolderMean E beta P
Measurable (fun p : ℝ × Bool => projectedMean E P p.1 p.2)
Proof (Lean source)
-- @node: projectedMean_measurable @[fun_prop] lemma projectedMean_measurable (E : PathSpace S) (P : Measure (StructSpace S)) (beta : ℝ) (hbeta : 0 < beta) (hholder : HolderMean E beta P) : Measurable (fun p : ℝ × Bool => projectedMean E P p.1 p.2) := by have hc (x : Bool) : Continuous (fun a : ℝ => projectedMean E P a x) := (condPotMean_continuousOn E beta P hbeta hholder x).comp_continuous ((continuous_projIcc (h := zero_le_one)).subtype_val) (fun a => (projIcc 0 1 zero_le_one a).property) have heq : (fun p : ℝ × Bool => projectedMean E P p.1 p.2) = (fun p => if p.2 = false then projectedMean E P p.1 false else projectedMean E P p.1 true) := by funext p; cases p.2 <;> simp rw [heq] exact Measurable.ite (measurableSet_eq_fun measurable_snd measurable_const) ((hc false).measurable.comp measurable_fst) ((hc true).measurable.comp measurable_fst)
CausalSmith.Stat.NoisydoseWeakdesignTransition.projectedMean_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:63
theorem projectedMean_mem_Icc

Projection preserves the public mean bound at every real input dose. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
hrange :
a :
ℝ
x :
projectedMean E P a x ∈ Icc (0 : ℝ) 1
Proof (Lean source)
-- @node: projectedMean_mem_Icc lemma projectedMean_mem_Icc (E : PathSpace S) (P : Measure (StructSpace S)) (hrange : MeanRange E P) (a : ℝ) (x : Bool) : projectedMean E P a x ∈ Icc (0 : ℝ) 1 := by have h := hrange x _ (projIcc 0 1 zero_le_one a).property constructor <;> dsimp [projectedMean] <;> linarith [h.1, h.2]
CausalSmith.Stat.NoisydoseWeakdesignTransition.projectedMean_mem_Icc · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:78
theorem schedule_marginal_mean

Integrating a fixed schedule evaluation under its stratum marginal gives the potential mean. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
x :
a :
ℝ
(∫ s, E.eval s (projIcc 0 1 zero_le_one a) ∂(stratumLaw P x).map sSched)
= projectedMean E P a x
Proof (Lean source)
-- @node: schedule_marginal_mean lemma schedule_marginal_mean (E : PathSpace S) (P : Measure (StructSpace S)) (x : Bool) (a : ℝ) : (∫ s, E.eval s (projIcc 0 1 zero_le_one a) ∂(stratumLaw P x).map sSched) = projectedMean E P a x := by have hm : Measurable (fun s : S => E.eval s (projIcc 0 1 zero_le_one a)) := by first | fun_prop | exact E.measurable_eval.comp (measurable_id.prodMk measurable_const) rw [integral_map (show Measurable (sSched (S := S)) by fun_prop).aemeasurable hm.aestronglyMeasurable, stratumLaw_integral] rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.schedule_marginal_mean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:85
def boundedScheduleEval

Clipped joint evaluation is bounded everywhere and agrees with the schedule almost surely.

Definition (Lean source)
S :
Type u_1
shared
E :
a :
ℝ
s :
S
boundedScheduleEval E a s :
ℝ
max 0 (min 1 (E.eval s (projIcc 0 1 zero_le_one a)))
CausalSmith.Stat.NoisydoseWeakdesignTransition.boundedScheduleEval · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:97
theorem boundedScheduleEval_measurable

The clipped schedule evaluation is jointly Borel. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
Measurable (fun p : ℝ × S => boundedScheduleEval E p.1 p.2)
Proof (Lean source)
-- @node: boundedScheduleEval_measurable @[fun_prop] lemma boundedScheduleEval_measurable (E : PathSpace S) : Measurable (fun p : ℝ × S => boundedScheduleEval E p.1 p.2) := by have hm : Measurable (fun p : ℝ × S => E.eval p.2 (projIcc 0 1 zero_le_one p.1)) := by first | fun_prop | exact E.measurable_eval.comp (measurable_snd.prodMk ((continuous_projIcc (h := zero_le_one)).measurable.comp measurable_fst)) exact measurable_const.max (measurable_const.min hm)
CausalSmith.Stat.NoisydoseWeakdesignTransition.boundedScheduleEval_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:102
theorem boundedScheduleEval_mem_Icc

Clipped schedule evaluations take values in the unit interval. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
a :
ℝ
s :
S
boundedScheduleEval E a s ∈ Icc (0 : ℝ) 1
Proof (Lean source)
-- @node: boundedScheduleEval_mem_Icc lemma boundedScheduleEval_mem_Icc (E : PathSpace S) (a : ℝ) (s : S) : boundedScheduleEval E a s ∈ Icc (0 : ℝ) 1 := by exact ⟨le_max_left _ _, max_le (by norm_num) (min_le_left _ _)⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.boundedScheduleEval_mem_Icc · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:113
theorem boundedScheduleEval_marginal_mean

Fixed-dose boundedness justifies replacing schedule evaluation by its clipped version. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
hbounded :
x :
a :
ℝ
(∫ s, boundedScheduleEval E a s ∂(stratumLaw P x).map sSched) = projectedMean E P a x
Proof (Lean source)
-- @node: boundedScheduleEval_marginal_mean lemma boundedScheduleEval_marginal_mean (E : PathSpace S) (P : Measure (StructSpace S)) (hbounded : BoundedPotentialOutcomes E P) (x : Bool) (a : ℝ) : (∫ s, boundedScheduleEval E a s ∂(stratumLaw P x).map sSched) = projectedMean E P a x := by rw [← schedule_marginal_mean] apply integral_congr_ae have hS : Measurable (sSched (S := S)) := by fun_prop have hm : Measurable (fun s : S => E.eval s (projIcc 0 1 zero_le_one a)) := by first | fun_prop | exact E.measurable_eval.comp (measurable_id.prodMk measurable_const) have hb : ∀ᵐ s ∂(stratumLaw P x).map sSched, E.eval s (projIcc 0 1 zero_le_one a) ∈ Icc (0 : ℝ) 1 := by apply (ae_map_iff hS.aemeasurable (hm measurableSet_Icc)).mpr exact ae_stratumLaw_of_ae P x (hbounded _ (projIcc 0 1 zero_le_one a).property) filter_upwards [hb] with s hs dsimp [boundedScheduleEval] rw [min_eq_right hs.2, max_eq_right hs.1]
CausalSmith.Stat.NoisydoseWeakdesignTransition.boundedScheduleEval_marginal_mean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:119
theorem boundedScheduleEval_ae_outcome

Consistency and integrated fixed-dose bounds identify the clipped random evaluation with Y. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
hoverlap :
hsupport :
hbounded :
hcons :
(fun w => boundedScheduleEval E (sA w) (sSched w)) =ᵐ[P] sY
Proof (Lean source)
-- @node: boundedScheduleEval_ae_outcome lemma boundedScheduleEval_ae_outcome (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hex : ScheduleUnconfoundedness P) (hsupport : LatentSupport P) (hbounded : BoundedPotentialOutcomes E P) (hcons : DoseConsistency E P) : (fun w => boundedScheduleEval E (sA w) (sSched w)) =ᵐ[P] sY := by filter_upwards [realized_potential_mem_Icc E P hoverlap hex hsupport hbounded, hsupport, hcons] with w hw ha hc dsimp [boundedScheduleEval] rw [Set.projIcc_of_mem zero_le_one ha, ← potentialOutcome, min_eq_right hw.2, max_eq_right hw.1, ← hc]
CausalSmith.Stat.NoisydoseWeakdesignTransition.boundedScheduleEval_ae_outcome · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:138
theorem bounded_test_mean_stratum

Equation (3) follows by integrating the schedule coordinate in the conditional product law. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
hoverlap :
hsupport :
hbounded :
hcons :
beta :
ℝ
hbeta :
0 < beta
hholder :
HolderMean E beta P
hrange :
x :
F :
(ℝ × Bool × ℝ) → ℝ
hF :
B :
ℝ
hB :
∀ p, |F p| ≤ B
(∫ w, F (sA w, x, sZ w)*sY w ∂stratumLaw P x)
= ∫ w, F (sA w, x, sZ w)*projectedMean E P (sA w) x ∂stratumLaw P x
Proof (Lean source)
-- @node: bounded_test_mean_stratum lemma bounded_test_mean_stratum (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hex : ScheduleUnconfoundedness P) (herr : ErrorIndependence P) (hsupport : LatentSupport P) (hbounded : BoundedPotentialOutcomes E P) (hcons : DoseConsistency E P) (beta : ℝ) (hbeta : 0 < beta) (hholder : HolderMean E beta P) (hrange : MeanRange E P) (x : Bool) (F : (ℝ × Bool × ℝ) → ℝ) (hF : Measurable F) (B : ℝ) (hB : ∀ p, |F p| ≤ B) : (∫ w, F (sA w, x, sZ w)*sY w ∂stratumLaw P x) = ∫ w, F (sA w, x, sZ w)*projectedMean E P (sA w) x ∂stratumLaw P x := by let R := stratumLaw P x let ζ := P.map sZ let γ := R.map sA let Λ := R.map sSched have : IsProbabilityMeasure R := stratumLaw_probability P hoverlap x have hZ : Measurable (sZ (S := S)) := by fun_prop have hA : Measurable (sA (S := S)) := by fun_prop have hS : Measurable (sSched (S := S)) := by fun_prop have : IsProbabilityMeasure ζ := Measure.isProbabilityMeasure_map hZ.aemeasurable have : IsProbabilityMeasure γ := Measure.isProbabilityMeasure_map hA.aemeasurable have : IsProbabilityMeasure Λ := Measure.isProbabilityMeasure_map hS.aemeasurable let G : ℝ × ℝ × S → ℝ := fun p => F (p.2.1, x, p.1)*boundedScheduleEval E p.2.1 p.2.2 have hG : Measurable G := by exact (hF.comp (by fun_prop)).mul ((boundedScheduleEval_measurable E).comp (by fun_prop)) have hbound (p : ℝ × ℝ × S) : ‖G p‖ ≤ B := by have he := boundedScheduleEval_mem_Icc E p.2.1 p.2.2 dsimp [G] rw [abs_mul, abs_of_nonneg he.1] exact (mul_le_mul_of_nonneg_left he.2 (abs_nonneg _)).trans (by simpa using hB (p.2.1, x, p.1)) have hi : Integrable G (ζ.prod (γ.prod Λ)) := Integrable.of_bound hG.aestronglyMeasurable B (ae_of_all _ hbound) have hprod : R.map (fun w => (sZ w, sA w, sSched w)) = ζ.prod (γ.prod Λ) := schedule_dose_error_product_stratum P hoverlap hex herr x have hleft : (∫ w, F (sA w, x, sZ w)*sY w ∂R) = ∫ p, G p ∂ζ.prod (γ.prod Λ) := by rw [← hprod, integral_map (hZ.prodMk (hA.prodMk hS)).aemeasurable hG.aestronglyMeasurable] apply integral_congr_ae filter_upwards [ae_stratumLaw_of_ae P x (boundedScheduleEval_ae_outcome E P hoverlap hex hsupport hbounded hcons)] with w hw dsimp [G]; rw [hw] rw [hleft, integral_prod _ hi] have hinner : ∀ᵐ z ∂ζ, Integrable (fun p : ℝ × S => G (z,p)) (γ.prod Λ) := hi.prod_right_ae have hreduce : (∫ z, ∫ p, G (z,p) ∂γ.prod Λ ∂ζ) = ∫ z, ∫ a, F (a,x,z)*projectedMean E P a x ∂γ ∂ζ := by apply integral_congr_ae filter_upwards [hinner] with z hz rw [integral_prod _ hz] apply integral_congr_ae filter_upwards [] with a dsimp [G] rw [integral_const_mul, boundedScheduleEval_marginal_mean E P hbounded x a] rw [hreduce] have hm : Measurable (fun p : ℝ × ℝ => F (p.2,x,p.1)*projectedMean E P p.2 x) := by exact (hF.comp (by fun_prop)).mul ((projectedMean_measurable E P beta hbeta hholder).comp (show Measurable (fun p : ℝ × ℝ => (p.2,x)) by fun_prop)) have hmean : Integrable (fun p : ℝ × ℝ => F (p.2,x,p.1)*projectedMean E P p.2 x) (ζ.prod γ) := by apply Integrable.of_bound hm.aestronglyMeasurable B filter_upwards [] with p have he := projectedMean_mem_Icc E P hrange p.2 x rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg he.1] exact (mul_le_mul_of_nonneg_left he.2 (abs_nonneg _)).trans (by simpa using hB (p.2,x,p.1)) rw [← integral_prod _ hmean] have hmap : R.map (fun w => (sZ w,sA w)) = ζ.prod γ := by have hh := congrArg (Measure.map (fun p : ℝ × ℝ × S => (p.1,p.2.1))) hprod rw [Measure.map_map (show Measurable (fun p : ℝ × ℝ × S => (p.1,p.2.1)) by fun_prop) (hZ.prodMk (hA.prodMk hS))] at hh change R.map (fun w => (sZ w,sA w)) = (ζ.prod (γ.prod Λ)).map (map id fst) at hh rw [← Measure.map_prod_map ζ (γ.prod Λ) measurable_id measurable_fst, Measure.map_id, Measure.map_fst_prod, measure_univ, one_smul] at hh exact hh rw [← hmap, integral_map (hZ.prodMk hA).aemeasurable (hm.aestronglyMeasurable)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.bounded_test_mean_stratum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:151
theorem projectedMean_random_measurable

The projected random-dose mean is measurable under the population law. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta :
ℝ
hbeta :
0 < beta
hholder :
HolderMean E beta P
Measurable (fun w : StructSpace S => projectedMean E P (sA w) (sX w))
Proof (Lean source)
-- @node: projectedMean_random_measurable @[fun_prop] lemma projectedMean_random_measurable (E : PathSpace S) (P : Measure (StructSpace S)) (beta : ℝ) (hbeta : 0 < beta) (hholder : HolderMean E beta P) : Measurable (fun w : StructSpace S => projectedMean E P (sA w) (sX w)) := by fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.projectedMean_random_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:226
theorem projectedMean_random_integrable

The globally projected mean is integrable by the public range bound. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta :
ℝ
hbeta :
0 < beta
hholder :
HolderMean E beta P
hrange :
Integrable (fun w => projectedMean E P (sA w) (sX w)) P
Proof (Lean source)
-- @node: projectedMean_random_integrable lemma projectedMean_random_integrable (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (beta : ℝ) (hbeta : 0 < beta) (hholder : HolderMean E beta P) (hrange : MeanRange E P) : Integrable (fun w => projectedMean E P (sA w) (sX w)) P := by apply Integrable.of_bound (by first | fun_prop | exact (projectedMean_random_measurable E P beta hbeta hholder).aestronglyMeasurable) 1 filter_upwards [] with w have hm := projectedMean_mem_Icc E P hrange (sA w) (sX w) simpa only [Real.norm_eq_abs, abs_of_nonneg hm.1] using hm.2
CausalSmith.Stat.NoisydoseWeakdesignTransition.projectedMean_random_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:234
theorem bounded_test_mean

Summing equation (3) over the two strata gives the bounded-test characterization. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
0 < beta
hP :
NoisyDoseModelClass E K beta kappa sigma P
F :
(ℝ × Bool × ℝ) → ℝ
hF :
B :
ℝ
hB :
∀ p, |F p| ≤ B
(∫ w, F (sA w,sX w,sZ w)*sY w ∂P)
= ∫ w, F (sA w,sX w,sZ w)*projectedMean E P (sA w) (sX w) ∂P
Proof (Lean source)
-- @node: bounded_test_mean lemma bounded_test_mean (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : 0 < beta) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (F : (ℝ × Bool × ℝ) → ℝ) (hF : Measurable F) (B : ℝ) (hB : ∀ p, |F p| ≤ B) : (∫ w, F (sA w,sX w,sZ w)*sY w ∂P) = ∫ w, F (sA w,sX w,sZ w)*projectedMean E P (sA w) (sX w) ∂P := by have hfm : Measurable (fun w : StructSpace S => F (sA w,sX w,sZ w)) := by fun_prop have hiY : Integrable (fun w => F (sA w,sX w,sZ w)*sY w) P := by apply Integrable.of_bound (by fun_prop) B filter_upwards [realized_outcome_mem_Icc E P hP.strataPos hP.scheduleUnconfoundedness hP.latentSupport hP.boundedPO hP.consistency] with w hw rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg hw.1] exact (mul_le_mul_of_nonneg_left hw.2 (abs_nonneg _)).trans (by simpa using hB (sA w,sX w,sZ w)) have hmeanm := projectedMean_random_measurable E P beta hbeta hP.holderMean have hiM : Integrable (fun w => F (sA w,sX w,sZ w)*projectedMean E P (sA w) (sX w)) P := by apply Integrable.of_bound (by fun_prop) B filter_upwards [] with w have hm := projectedMean_mem_Icc E P hP.meanRange (sA w) (sX w) rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg hm.1] exact (mul_le_mul_of_nonneg_left hm.2 (abs_nonneg _)).trans (by simpa using hB (sA w,sX w,sZ w)) rw [integral_eq_stratum_sum P hP.strataPos _ hiY, integral_eq_stratum_sum P hP.strataPos _ hiM] apply Finset.sum_congr rfl intro x _ congr 1 calc _ = ∫ w, F (sA w,x,sZ w)*sY w ∂stratumLaw P x := by apply integral_congr_ae filter_upwards [stratumLaw_ae_stratum P x] with w hw rw [hw] _ = ∫ w, F (sA w,x,sZ w)*projectedMean E P (sA w) x ∂stratumLaw P x := bounded_test_mean_stratum E P hP.strataPos hP.scheduleUnconfoundedness hP.errorIndependence hP.latentSupport hP.boundedPO hP.consistency beta hbeta hP.holderMean hP.meanRange x F hF B hB _ = _ := by apply integral_congr_ae filter_upwards [stratumLaw_ae_stratum P x] with w hw rw [hw]
CausalSmith.Stat.NoisydoseWeakdesignTransition.bounded_test_mean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:247
theorem condExp_eq_of_bounded_tests Lemma condExp_eq_of_bounded_tests in the paper ↗

Bounded Borel tests characterize the conditional mean on a generated sigma algebra. Under the stated conditions. This is the stated conclusion.

Formal statement
H :
Ω → T
hH :
f :
Ω → ℝ
hf :
g :
T → ℝ
hgm :
hgi :
Integrable (g ∘ H) P
htests :
∀ F : T → ℝ
and
(∃ B : ℝ, ∀ z, |F z| ≤ B)
then
(∫ w, F (H w)*f w ∂P) = ∫ w, F (H w)*g (H w) ∂P
P[f | comap H inferInstance] =ᵐ[P] g ∘ H
Proof (Lean source)
-- @node: condExp_eq_of_bounded_tests lemma condExp_eq_of_bounded_tests {Ω T : Type*} [MeasurableSpace Ω] [MeasurableSpace T] (P : Measure Ω) [IsProbabilityMeasure P] (H : Ω → T) (hH : Measurable H) (f : Ω → ℝ) (hf : Integrable f P) (g : T → ℝ) (hgm : Measurable g) (hgi : Integrable (g ∘ H) P) (htests : ∀ F : T → ℝ, Measurable F → (∃ B : ℝ, ∀ z, |F z| ≤ B) → (∫ w, F (H w)*f w ∂P) = ∫ w, F (H w)*g (H w) ∂P) : P[f | comap H inferInstance] =ᵐ[P] g ∘ H := by apply (ae_eq_condExp_of_forall_setIntegral_eq hH.comap_le hf (fun _ _ _ => hgi.integrableOn) ?_ ((hgm.comp (comap_measurable H)).aestronglyMeasurable)).symm intro s hs _ obtain ⟨B,hB,rfl⟩ := MeasurableSpace.measurableSet_comap.mp hs have hb : ∃ C : ℝ, ∀ z, |B.indicator (fun _ => (1 : ℝ)) z| ≤ C := by refine ⟨1, ?_⟩ intro z by_cases hz : z ∈ B <;> simp [hz] have ht := htests (B.indicator (fun _ => (1 : ℝ))) (measurable_const.indicator hB) hb have heq (u : Ω → ℝ) : (fun w => B.indicator (fun _ => (1 : ℝ)) (H w)*u w) = (H ⁻¹' B).indicator u := by funext w by_cases hw : H w ∈ B <;> simp [hw] rw [heq f, heq (fun w => g (H w)), integral_indicator (hH hB), integral_indicator (hH hB)] at ht exact ht.symm
CausalSmith.Stat.NoisydoseWeakdesignTransition.condExp_eq_of_bounded_tests · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ConditionalMean.lean:289
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore 11 declarations Helpers — DictionaryScore

Helpers — DictionaryScore

theorem restricted_stratum_le_stratumLaw

Each restricted stratum law is dominated by its normalized conditional law. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
x :
P.restrict {w | sX w = x} ≤ stratumLaw P x
Proof (Lean source)
-- @node: restricted_stratum_le_stratumLaw lemma restricted_stratum_le_stratumLaw (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (x : Bool) : P.restrict {w | sX w = x} ≤ stratumLaw P x := by intro B change (P.restrict {w | sX w = x}) B ≤ (P {w | sX w = x})⁻¹ * (P.restrict {w | sX w = x}) B exact le_mul_of_one_le_left (zero_le) (ENNReal.one_le_inv.mpr prob_le_one)
CausalSmith.Stat.NoisydoseWeakdesignTransition.restricted_stratum_le_stratumLaw · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore.lean:20
theorem stratum_latent_lintegral_le

The design envelope controls nonnegative latent-dose integrals in each stratum. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
kappa :
ℝ
hdesign :
WeakDesign K.clo K.chi kappa P
f :
ℝ → ℝ≥0∞
hf :
x :
(∫⁻ w, f (latentCentered w) ∂P.restrict {w | sX w = x})
≤ ofReal K.chi * ∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal (|t| ^ kappa) * f t
Proof (Lean source)
-- @node: stratum_latent_lintegral_le lemma stratum_latent_lintegral_le (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (kappa : ℝ) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (f : ℝ → ℝ≥0∞) (hf : Measurable f) (x : Bool) : (∫⁻ w, f (latentCentered w) ∂P.restrict {w | sX w = x}) ≤ ofReal K.chi * ∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal (|t| ^ kappa) * f t := by obtain ⟨g, hg, hlaw, henv⟩ := hdesign have ht : Measurable (latentCentered : StructSpace S → ℝ) := by unfold latentCentered sA a0 fun_prop calc _ ≤ ∫⁻ w, f (latentCentered w) ∂stratumLaw P x := lintegral_mono' (restricted_stratum_le_stratumLaw P x) le_rfl _ = ∫⁻ t, f t ∂(stratumLaw P x).map latentCentered := (lintegral_map hf ht).symm _ = ∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal (g x t) * f t := by rw [hlaw x, lintegral_withDensity_eq_lintegral_mul _ (by fun_prop) hf] rfl _ ≤ ∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal K.chi * (ofReal (|t| ^ kappa) * f t) := by apply lintegral_mono_ae filter_upwards [henv x] with t ht have he : ofReal (g x t) ≤ ofReal K.chi * ofReal (|t| ^ kappa) := by calc _ ≤ ofReal (K.chi * |t| ^ kappa) := ENNReal.ofReal_le_ofReal ht.2 _ = _ := by rw [ENNReal.ofReal_mul (K.clo_pos.le.trans K.clo_le_chi)] simpa only [mul_assoc] using mul_le_mul' he (le_refl (f t)) _ = _ := lintegral_const_mul _ (by fun_prop)
CausalSmith.Stat.NoisydoseWeakdesignTransition.stratum_latent_lintegral_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore.lean:30
theorem latent_lintegral_le_two_envelopes

Summing the two strata gives a finite-envelope bound for the marginal latent dose. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
kappa :
ℝ
hdesign :
WeakDesign K.clo K.chi kappa P
f :
ℝ → ℝ≥0∞
hf :
(∫⁻ w, f (latentCentered w) ∂P)
≤ (ofReal K.chi * ∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal (|t| ^ kappa) * f t)
+ (ofReal K.chi * ∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal (|t| ^ kappa) * f t)
Proof (Lean source)
-- @node: latent_lintegral_le_two_envelopes lemma latent_lintegral_le_two_envelopes (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (kappa : ℝ) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (f : ℝ → ℝ≥0∞) (hf : Measurable f) : (∫⁻ w, f (latentCentered w) ∂P) ≤ (ofReal K.chi * ∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal (|t| ^ kappa) * f t) + (ofReal K.chi * ∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal (|t| ^ kappa) * f t) := by have hs : MeasurableSet {w : StructSpace S | sX w = false} := by exact measurableSet_eq_fun (by fun_prop) measurable_const have hc : {w : StructSpace S | sX w = false}ᶜ = {w | sX w = true} := by ext w cases sX w <;> simp have hsplit := Measure.restrict_add_restrict_compl (μ := P) hs rw [hc] at hsplit rw [← hsplit, lintegral_add_measure] exact add_le_add (stratum_latent_lintegral_le P kappa hdesign f hf false) (stratum_latent_lintegral_le P kappa hdesign f hf true)
CausalSmith.Stat.NoisydoseWeakdesignTransition.latent_lintegral_le_two_envelopes · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore.lean:58
theorem dictionary_pair_law_admissible

Finite public second moments imply law-level inverse integrability over the causal model. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
hq :
PairAdmissible kappa sigma q
hV :
VqENN kappa sigma q.ell < ⊤
LawAdmissible sigma P q
Proof (Lean source)
-- @node: dictionary_pair_law_admissible lemma dictionary_pair_law_admissible (E : PathSpace S) (beta kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (q : WeightPair) (hq : PairAdmissible kappa sigma q) (hV : VqENN kappa sigma q.ell < ⊤) : LawAdmissible sigma P q := by have hell : Measurable q.ell := hq.2.1 have ht : Measurable (latentCentered : StructSpace S → ℝ) := by unfold latentCentered sA a0 fun_prop have hz : Measurable (sZ : StructSpace S → ℝ) := by fun_prop have hv : Measurable (fun w : StructSpace S => q.ell (observedCentered sigma w)) := by unfold observedCentered contaminatedDose sA sZ fun_prop have hind : IndepFun latentCentered sZ P := by have h := hP.errorIndependence.comp measurable_id (show Measurable (fun p : Bool × ℝ × S => p.2.1 - a0) by fun_prop) exact h.symm have hjoint : P.map (fun w => (latentCentered w, sZ w)) = (P.map latentCentered).prod (gaussianReal 0 1) := by rw [hind.map_prod_eq_prod_map_map ht.aemeasurable hz.aemeasurable, hP.gaussianChannel] let f : ℝ × ℝ → ℝ≥0∞ := fun p => ofReal ((q.ell (p.1+sigma*p.2))^2) have hf : Measurable f := by dsimp [f] fun_prop let J : ℝ≥0∞ := ∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal (|t| ^ kappa) * (∫⁻ z, ofReal ((q.ell (t+sigma*z))^2) ∂gaussianReal 0 1) have hJ : ofReal K.chi * J < ⊤ := by have hV' : 16 * J < ⊤ := hV have h16 : J ≤ 16 * J := le_mul_of_one_le_left zero_le (by norm_num) exact ENNReal.mul_lt_top ENNReal.ofReal_lt_top (lt_of_le_of_lt h16 hV') have hsecond : (∫⁻ w, ofReal ((q.ell (observedCentered sigma w))^2) ∂P) ≤ ofReal K.chi * J + ofReal K.chi * J := by calc _ = ∫⁻ w, f (latentCentered w, sZ w) ∂P := by congr 1 funext w dsimp [f, observedCentered, contaminatedDose, latentCentered] congr 3 ring _ = ∫⁻ p, f p ∂P.map (fun w => (latentCentered w, sZ w)) := (lintegral_map hf (ht.prodMk hz)).symm _ = ∫⁻ t, ∫⁻ z, f (t,z) ∂gaussianReal 0 1 ∂P.map latentCentered := by rw [hjoint, lintegral_prod _ hf.aemeasurable] _ = ∫⁻ w, (∫⁻ z, f (latentCentered w,z) ∂gaussianReal 0 1) ∂P := lintegral_map hf.lintegral_prod_right' ht _ ≤ _ := latent_lintegral_le_two_envelopes P kappa hP.weakDesign (fun t => ∫⁻ z, f (t,z) ∂gaussianReal 0 1) hf.lintegral_prod_right' have hsq : Integrable (fun w => (q.ell (observedCentered sigma w))^2) P := by refine ⟨(hv.pow_const 2).aestronglyMeasurable, ?_⟩ apply (hasFiniteIntegral_iff_ofReal (Eventually.of_forall (fun w => sq_nonneg _))).2 exact hsecond.trans_lt (ENNReal.add_lt_top.mpr ⟨hJ, hJ⟩) exact MemLp.integrable (by norm_num : (1 : ℝ≥0∞) ≤ 2) ((memLp_two_iff_integrable_sq hv.aestronglyMeasurable).mpr hsq)
CausalSmith.Stat.NoisydoseWeakdesignTransition.dictionary_pair_law_admissible · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore.lean:77
theorem constant_pair_eq_inverseheat_one

The constant dictionary element is the degree-one polynomial inverse pair. This is the stated conclusion.

Formal statement
sigma :
ℝ
pairOf sigma .const = (⟨qM 1, ellM sigma 1⟩ : WeightPair)
Proof (Lean source)
-- @node: constant_pair_eq_inverseheat_one lemma constant_pair_eq_inverseheat_one (sigma : ℝ) : pairOf sigma .const = (⟨qM 1, ellM sigma 1⟩ : WeightPair) := by have hp : qMPoly 1 = 1 := by simp [qMPoly, Polynomial.Chebyshev.U_zero] have hq : (fun _ : ℝ => (1 : ℝ)) = qM 1 := by funext t simp [qM, hp] have hell : (fun _ : ℝ => (1 : ℝ)) = ellM sigma 1 := by funext t simp [ellM, hp] exact congrArg₂ WeightPair.mk hq hell
CausalSmith.Stat.NoisydoseWeakdesignTransition.constant_pair_eq_inverseheat_one · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore.lean:135
theorem dictionary_pair_admissible

Every dictionary member satisfies its family's admissibility domain. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
n :
ℕ
tag :
htag :
tag ∈ weightDictionary n sigma
conclusion 1
PairAdmissible kappa sigma (pairOf sigma tag)
conclusion 2
VqENN kappa sigma (pairOf sigma tag).ell < ⊤
Proof (Lean source)
-- @node: dictionary_pair_admissible lemma dictionary_pair_admissible (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (n : ℕ) (tag : DictTag) (htag : tag ∈ weightDictionary n sigma) : PairAdmissible kappa sigma (pairOf sigma tag) ∧ VqENN kappa sigma (pairOf sigma tag).ell < ⊤ := by cases tag with | const => rw [constant_pair_eq_inverseheat_one] exact inverseheat_pair_admissible_one kappa sigma hkappa.1 | fourier k => have hupper : dyadicBandwidth k ≤ 1/4 := by simp [weightDictionary, dictionaryList] at htag simpa only [one_div] using htag.2.2 exact fourier_pair_admissible kappa sigma hkappa hsigma (dyadicBandwidth k) ⟨by unfold dyadicBandwidth; positivity, hupper⟩ | poly j => have hodd : Odd (2^j+1) := by simp [weightDictionary, dictionaryList] at htag exact htag.2.1 exact inverseheat_pair_admissible kappa sigma hkappa hsigma (2^j+1) ⟨hodd, Nat.succ_pos _⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.dictionary_pair_admissible · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore.lean:148
def scoreScale

The factor by which the public certificate can exceed the unit-constant reference certificate: the largest of one, the upper envelope over sixty-four times the lower envelope, and the square root of the upper envelope over sixteen divided by sixteen times the minimum stratum mass times the lower envelope, for the public class constants.

Definition (Lean source)
scoreScale K :
ℝ
max 1 (max (K.chi / (64 * K.clo)) (sqrt (K.chi / 16) / (16 * K.pmin * K.clo)))
theorem scoreScale_pos

The score scale of any public class constants is positive.

Formal statement
Proof (Lean source)
lemma scoreScale_pos (K : ClassConstants) : 0 < scoreScale K := lt_of_lt_of_le one_pos (le_max_left _ _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.scoreScale_pos · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore.lean:177
theorem Aq_le_scoreScale_mul_unitAq

For an admissible inverse pair, the public error certificate at class constants K is at most the score scale times the unit-constant reference certificate.

Formal statement
beta kappa sigma :
ℝ
n :
ℕ
hq :
PairAdmissible kappa sigma q
Aq K beta kappa n sigma q ≤ scoreScale K * unitAq beta kappa n sigma q
Proof (Lean source)
lemma Aq_le_scoreScale_mul_unitAq (K : ClassConstants) (beta kappa sigma : ℝ) (n : ℕ) (q : WeightPair) (hq : PairAdmissible kappa sigma q) : Aq K beta kappa n sigma q ≤ scoreScale K * unitAq beta kappa n sigma q := by have hI : 0 < weightMoment kappa q.q := hq.2.2.2.2.1 have hp := K.pmin_pos have hB : 0 ≤ unitBq beta kappa q.q := by unfold unitBq apply div_nonneg _ hI.le apply mul_nonneg (by norm_num) apply integral_nonneg_of_ae filter_upwards [ae_restrict_mem measurableSet_Icc] with u hu exact mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (hq.2.2.1 u hu) have hc : 0 ≤ 12 / unitbq kappa q.q := by unfold unitbq; positivity have hs : 0 ≤ sqrt (Vq kappa sigma q.ell / n) := Real.sqrt_nonneg _ have ht : 0 ≤ 2 * sqrt (3 / n) := by positivity have hlo := K.clo_pos have hchi : 0 ≤ K.chi := hlo.le.trans K.clo_le_chi have hBK : Bq K beta kappa q.q = K.chi / (64 * K.clo) * unitBq beta kappa q.q := by unfold Bq unitBq field_simp have hsq : sqrt (pubVq K kappa sigma q.ell / n) = sqrt (K.chi / 16) * sqrt (Vq kappa sigma q.ell / n) := by rw [pubVq_eq, mul_div_assoc, Real.sqrt_mul (div_nonneg hchi (by norm_num))] have hcoef : 12 / bq K kappa q.q * sqrt (pubVq K kappa sigma q.ell / n) = sqrt (K.chi / 16) / (16 * K.pmin * K.clo) * (12 / unitbq kappa q.q * sqrt (Vq kappa sigma q.ell / n)) := by rw [hsq] unfold bq unitbq field_simp have hA : Aq K beta kappa n sigma q = K.chi / (64 * K.clo) * unitBq beta kappa q.q + sqrt (K.chi / 16) / (16 * K.pmin * K.clo) * (12 / unitbq kappa q.q * sqrt (Vq kappa sigma q.ell / n)) + 2 * sqrt (3 / n) := by unfold Aq rw [hBK, hcoef] have hU : unitAq beta kappa n sigma q = unitBq beta kappa q.q + 12 / unitbq kappa q.q * sqrt (Vq kappa sigma q.ell / n) + 2 * sqrt (3 / n) := rfl have h1 : 1 ≤ scoreScale K := le_max_left _ _ have h2 : K.chi / (64 * K.clo) ≤ scoreScale K := (le_max_left _ _).trans (le_max_right _ _) have h3 : sqrt (K.chi / 16) / (16 * K.pmin * K.clo) ≤ scoreScale K := (le_max_right _ _).trans (le_max_right _ _) have e1 := mul_le_mul_of_nonneg_right h2 hB have e2 := mul_le_mul_of_nonneg_right h3 (mul_nonneg hc hs) have e3 := mul_le_mul_of_nonneg_right h1 ht rw [hA, hU, mul_add, mul_add] linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.Aq_le_scoreScale_mul_unitAq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore.lean:181
theorem score_le_of_unitScore_le

A dictionary tag whose unit-constant reference score is at most a multiple of a rate has public score at most the score scale times that multiple of the rate, for a design exponent between zero and two and an error scale between zero and one quarter.

Formal statement
beta kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
n :
ℕ
tag :
htag :
tag ∈ weightDictionary n sigma
C r :
ℝ
h :
unitScore beta kappa n sigma tag ≤ C * r
score K beta kappa n sigma tag ≤ scoreScale K * C * r
Proof (Lean source)
lemma score_le_of_unitScore_le (K : ClassConstants) (beta kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (n : ℕ) (tag : DictTag) (htag : tag ∈ weightDictionary n sigma) {C r : ℝ} (h : unitScore beta kappa n sigma tag ≤ C * r) : score K beta kappa n sigma tag ≤ scoreScale K * C * r := by obtain ⟨hq, _⟩ := dictionary_pair_admissible kappa sigma hkappa hsigma n tag htag apply (Aq_le_scoreScale_mul_unitAq K beta kappa sigma n _ hq).trans rw [mul_assoc] exact mul_le_mul_of_nonneg_left h (scoreScale_pos K).le
CausalSmith.Stat.NoisydoseWeakdesignTransition.score_le_of_unitScore_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore.lean:230
theorem dictionary_score_rate

Every dictionary pair is admissible, and branch-specific witnesses control the selected public score uniformly. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
conclusion 1
n :
ℕ
0 < n
sigma ∈ Icc (0 : ℝ) (1/4) :
tag ∈ weightDictionary n sigma :
PairAdmissible kappa sigma (pairOf sigma tag)
VqENN kappa sigma (pairOf sigma tag).ell < ⊤
P :
modelClass E K beta kappa sigma
LawAdmissible sigma (P.1 : Measure (StructSpace S)) (pairOf sigma tag)
conclusion 2
∃ C : ℝ,
0 < C
∃ n0 : ℕ,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1/4),
score K beta kappa n sigma (selectedTag K beta kappa n sigma)
≤ C*frontierRate beta kappa sigma n ∧
(sigma ≤ (logScale n)^(-1/2 : ℝ) → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ score K beta kappa n sigma (.fourier k) ≤ C*frontierRate beta kappa sigma n) ∧
((logScale n)^(-1/2 : ℝ) < sigma → ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ score K beta kappa n sigma (.poly j) ≤ C*frontierRate beta kappa sigma n)
Proof (Lean source)
-- @node: lem:dictionary-score-rate lemma dictionary_score_rate (E : PathSpace S) (K : ClassConstants) (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : (∀ n : ℕ, 0 < n → ∀ sigma ∈ Icc (0 : ℝ) (1/4), ∀ tag ∈ weightDictionary n sigma, PairAdmissible kappa sigma (pairOf sigma tag) ∧ VqENN kappa sigma (pairOf sigma tag).ell < ⊤ ∧ ∀ P : modelClass E K beta kappa sigma, LawAdmissible sigma (P.1 : Measure (StructSpace S)) (pairOf sigma tag)) ∧ (∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), score K beta kappa n sigma (selectedTag K beta kappa n sigma) ≤ C*frontierRate beta kappa sigma n ∧ (sigma ≤ (logScale n)^(-1/2 : ℝ) → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ score K beta kappa n sigma (.fourier k) ≤ C*frontierRate beta kappa sigma n) ∧ ((logScale n)^(-1/2 : ℝ) < sigma → ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ score K beta kappa n sigma (.poly j) ≤ C*frontierRate beta kappa sigma n)) := by constructor · intro n hn sigma hsigma tag htag obtain ⟨hq, hV⟩ := dictionary_pair_admissible kappa sigma hkappa hsigma n tag htag refine ⟨hq, hV, ?_⟩ intro P exact dictionary_pair_law_admissible E beta kappa sigma hkappa hsigma (P.1 : Measure (StructSpace S)) P.2 (pairOf sigma tag) hq hV · obtain ⟨CF, hCF, nF, hF⟩ := fourier_dictionary_witness beta kappa hbeta hkappa obtain ⟨CM, hCM, nM, hM⟩ := inverseheat_dictionary_witness beta kappa hbeta hkappa refine ⟨scoreScale K * max CF CM, mul_pos (scoreScale_pos K) (lt_max_of_lt_left hCF), max 3 (max nF nM), ?_⟩ intro n hn sigma hsigma have hnF : nF ≤ n := (le_max_left _ _).trans ((le_max_right _ _).trans hn) have hnM : nM ≤ n := (le_max_right _ _).trans ((le_max_right _ _).trans hn) have hnreal : (1 : ℝ) ≤ n := by exact_mod_cast (show 1 ≤ n by omega) have hexp : (1 : ℝ) ≤ exp 1 := Real.one_le_exp (by norm_num) have hlog : 0 ≤ logScale n := Real.log_nonneg (by exact one_le_mul_of_one_le_of_one_le (Real.one_le_exp (by norm_num)) hnreal) have hrho : 0 ≤ frontierRate beta kappa sigma n := Real.rpow_nonneg (by unfold frontierScale split_ifs · exact Real.rpow_nonneg (Nat.cast_nonneg n) _ · exact div_nonneg hsigma.1 (Real.sqrt_nonneg _) · exact div_nonneg (Real.log_nonneg (by have hm : 0 ≤ sigma^2 * logScale n := mul_nonneg (sq_nonneg sigma) hlog linarith)) hlog) _ have hFourier : sigma ≤ (logScale n)^(-1/2 : ℝ) → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ score K beta kappa n sigma (.fourier k) ≤ scoreScale K * max CF CM * frontierRate beta kappa sigma n := by intro hbranch obtain ⟨k, hk, hscore⟩ := hF n hnF sigma hsigma hbranch exact ⟨k, hk, score_le_of_unitScore_le K beta kappa sigma hkappa hsigma n _ hk (hscore.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) hrho))⟩ have hPoly : (logScale n)^(-1/2 : ℝ) < sigma → ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ score K beta kappa n sigma (.poly j) ≤ scoreScale K * max CF CM * frontierRate beta kappa sigma n := by intro hbranch obtain ⟨j, hj, hscore⟩ := hM n hnM sigma hsigma hbranch exact ⟨j, hj, score_le_of_unitScore_le K beta kappa sigma hkappa hsigma n _ hj (hscore.trans (mul_le_mul_of_nonneg_right (le_max_right _ _) hrho))⟩ refine ⟨?_, hFourier, hPoly⟩ obtain ⟨_, hmin⟩ := selectedTag_minimizes K beta kappa n sigma by_cases hbranch : sigma ≤ (logScale n)^(-1/2 : ℝ) · obtain ⟨k, hk, hbound⟩ := hFourier hbranch exact (hmin _ hk).trans hbound · obtain ⟨j, hj, hbound⟩ := hPoly (lt_of_not_ge hbranch) exact (hmin _ hj).trans hbound
CausalSmith.Stat.NoisydoseWeakdesignTransition.dictionary_score_rate · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore.lean:241
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.Fourier 26 declarations Helpers — DictionaryScore — Fourier

Helpers — DictionaryScore — Fourier

The declared continuous extension agrees with Mathlib's sinc sixth power. This is the stated conclusion.

Formal statement
u :
ℝ
sincSix u = sinc u ^ 6
Proof (Lean source)
-- @node: sincSix_eq_sinc_pow lemma sincSix_eq_sinc_pow (u : ℝ) : sincSix u = sinc u ^ 6 := by by_cases hu : u = 0 <;> simp [sincSix, sinc, hu]
CausalSmith.Stat.NoisydoseWeakdesignTransition.sincSix_eq_sinc_pow · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:19

Fourier latent weights are continuous at the target as well as away from it. This is the stated conclusion.

Formal statement
h :
ℝ
Proof (Lean source)
-- @node: qF_continuous @[fun_prop] lemma qF_continuous (h : ℝ) : Continuous (qF h) := by have heq : qF h = fun t => sinc (t/h)^6 := by funext t exact sincSix_eq_sinc_pow (t/h) rw [heq] fun_prop

The sixth power gives a nonnegative latent weight on the entire line. Under the stated conditions. This is the stated conclusion.

Formal statement
h t :
ℝ
0 ≤ qF h t
Proof (Lean source)
-- @node: qF_nonneg lemma qF_nonneg (h t : ℝ) : 0 ≤ qF h t := by rw [qF, sincSix_eq_sinc_pow] positivity

Sinc's unit bound bounds every latent Fourier weight by one. Under the stated conditions. This is the stated conclusion.

Formal statement
h t :
ℝ
qF h t ≤ 1
Proof (Lean source)
-- @node: qF_le_one lemma qF_le_one (h t : ℝ) : qF h t ≤ 1 := by rw [qF, sincSix_eq_sinc_pow] have habs : |sinc (t/h)| ^ 6 = sinc (t/h) ^ 6 := by rw [show (6 : ℕ) = 2 * 3 by norm_num, pow_mul, sq_abs, ← pow_mul] rw [← habs] exact (pow_le_pow_left₀ (abs_nonneg _) (Real.abs_sinc_le_one _ ) 6).trans_eq (by norm_num)

Away from zero, the sine unit bound gives the sixth-order localization tail. Under the stated conditions. This is the stated conclusion.

Formal statement
u :
ℝ
hu :
u ≠ 0
sincSix u ≤ (1 / |u|)^6
Proof (Lean source)
-- @node: sincSix_tail_bound lemma sincSix_tail_bound (u : ℝ) (hu : u ≠ 0) : sincSix u ≤ (1 / |u|)^6 := by rw [sincSix_eq_sinc_pow, Real.sinc_of_ne_zero hu] have habs : |sin u / u|^6 = (sin u / u)^6 := by rw [show (6 : ℕ) = 2 * 3 by norm_num, pow_mul, sq_abs, ← pow_mul] rw [← habs, abs_div] exact pow_le_pow_left₀ (div_nonneg (abs_nonneg _) (abs_nonneg _)) (div_le_div_of_nonneg_right (Real.abs_sin_le_one u) (abs_nonneg u)) 6
CausalSmith.Stat.NoisydoseWeakdesignTransition.sincSix_tail_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:48

The localization weight is even about the causal target. Under the stated conditions. This is the stated conclusion.

Formal statement
h t :
ℝ
qF h (-t) = qF h t
Proof (Lean source)
-- @node: qF_even lemma qF_even (h t : ℝ) : qF h (-t) = qF h t := by simp only [qF, neg_div, sincSix_eq_sinc_pow, Real.sinc_neg]

Nonnegative design exponents give continuous weighted Fourier moments. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
h :
ℝ
Continuous (fun t => |t| ^ kappa * qF h t)
Proof (Lean source)
-- @node: qF_weighted_continuous @[fun_prop] lemma qF_weighted_continuous (kappa : ℝ) (hkappa : 0 ≤ kappa) (h : ℝ) : Continuous (fun t => |t| ^ kappa * qF h t) := by exact (continuous_abs.rpow_const (fun _ => inr hkappa)).mul (qF_continuous h)
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_weighted_continuous · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:64

Each weighted latent moment is finite on the compact dose support. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
h :
ℝ
Integrable (fun t => |t| ^ kappa * qF h t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))
Proof (Lean source)
-- @node: qF_weighted_integrable lemma qF_weighted_integrable (kappa : ℝ) (hkappa : 0 ≤ kappa) (h : ℝ) : Integrable (fun t => |t| ^ kappa * qF h t) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := by exact (qF_weighted_continuous kappa hkappa h).integrableOn_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_weighted_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:70

The continuous weight equals one at zero and stays positive nearby. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
∃ delta : ℝ,
0 < delta
conclusion 1
t :
|t| < delta
0 < qF h t
Proof (Lean source)
-- @node: qF_positive_near_zero lemma qF_positive_near_zero (h : ℝ) : ∃ delta : ℝ, 0 < delta ∧ ∀ t, |t| < delta → 0 < qF h t := by have hzero : qF h 0 = 1 := by simp [qF, sincSix] have hn : ∀ᶠ t in nhds (0 : ℝ), 0 < qF h t := (qF_continuous h).continuousAt.eventually (lt_mem_nhds (show (0 : ℝ) < qF h 0 by rw [hzero]; norm_num)) obtain ⟨delta, hdelta, hball⟩ := Metric.eventually_nhds_iff.mp hn refine ⟨delta, hdelta, ?_⟩ intro t ht exact hball (by simpa [Real.dist_eq] using ht)
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_positive_near_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:77

Positive mass near the target gives a strictly positive public denominator. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
h :
ℝ
0 < weightMoment kappa (qF h)
Proof (Lean source)
-- @node: qF_weightMoment_pos lemma qF_weightMoment_pos (kappa : ℝ) (hkappa : 0 ≤ kappa) (h : ℝ) : 0 < weightMoment kappa (qF h) := by obtain ⟨delta, hdelta, hpos⟩ := qF_positive_near_zero h let t : ℝ := min delta 1 / 4 have htpos : 0 < t := by dsimp [t]; positivity have htdelta : |t| < delta := by rw [abs_of_pos htpos] dsimp [t] have := min_le_left delta 1 linarith have htupper : t ≤ 1/2 := by dsimp [t] have := min_le_right delta 1 linarith have hint : 0 < ∫ t in (-1/2 : ℝ)..(1/2), |t| ^ kappa * qF h t := by apply intervalIntegral.integral_pos (by norm_num) (qF_weighted_continuous kappa hkappa h).continuousOn · intro x hx exact mul_nonneg (Real.rpow_nonneg (abs_nonneg x) _) (qF_nonneg h x) · exact ⟨t, ⟨by linarith, htupper⟩, mul_pos (Real.rpow_pos_of_pos (abs_pos.mpr (ne_of_gt htpos)) _) (hpos t htdelta)⟩ simpa only [weightMoment, intervalIntegral.integral_of_le (by norm_num : (-1/2 : ℝ) ≤ 1/2), integral_Icc_eq_integral_Ioc] using hint
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_weightMoment_pos · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:90
theorem qF_unit_weighted_tail_bound Lemma qF_unit_weighted_tail_bound in the paper ↗

The sixth-order sinc tail dominates every design moment needed in S1 by an integrable cubic tail. This is the stated conclusion. Under the stated conditions.

Formal statement
s :
ℝ
hs :
s ∈ Icc (0 : ℝ) 3
t :
ℝ
|t| ^ s * qF 1 t ≤ 8 / (1 + |t|)^3
Proof (Lean source)
-- @node: qF_unit_weighted_tail_bound lemma qF_unit_weighted_tail_bound (s : ℝ) (hs : s ∈ Icc (0 : ℝ) 3) (t : ℝ) : |t| ^ s * qF 1 t ≤ 8 / (1 + |t|)^3 := by have ha : 0 ≤ |t| := abs_nonneg t have hp : 0 < 1 + |t| := by positivity by_cases ht : |t| ≤ 1 · have hw := Real.rpow_le_one ha ht hs.1 have hq := qF_le_one 1 t have hprod : |t| ^ s * qF 1 t ≤ 1 := by nlinarith [Real.rpow_nonneg ha s, qF_nonneg 1 t] apply hprod.trans apply (le_div_iff₀ (pow_pos hp 3)).mpr have := pow_le_pow_left₀ hp.le (show 1 + |t| ≤ 2 by linarith) 3 norm_num at this ⊢ exact this · have ht1 : 1 ≤ |t| := (lt_of_not_ge ht).le have htpos : 0 < |t| := by linarith have hw : |t| ^ s ≤ |t| ^ (3 : ℕ) := by simpa using Real.rpow_le_rpow_of_exponent_le ht1 hs.2 have hq : qF 1 t ≤ (1 / |t|)^6 := by simpa only [qF, div_one] using sincSix_tail_bound t (abs_pos.mp htpos) calc |t| ^ s * qF 1 t ≤ |t|^3 * (1 / |t|)^6 := mul_le_mul hw hq (qF_nonneg 1 t) (by positivity) _ = 1 / |t|^3 := by field_simp _ ≤ 8 / (1 + |t|)^3 := by apply (div_le_div_iff₀ (pow_pos htpos 3) (pow_pos hp 3)).mpr have hh := pow_le_pow_left₀ hp.le (show 1 + |t| ≤ 2*|t| by linarith) 3 nlinarith [hh]
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_unit_weighted_tail_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:116
theorem qF_unit_weighted_integrable Lemma qF_unit_weighted_integrable in the paper ↗

The unscaled Fourier kernel has finite whole-line moments for all exponents used in S1. This is the stated conclusion. Under the stated conditions.

Formal statement
s :
ℝ
hs :
s ∈ Icc (0 : ℝ) 3
Integrable (fun t => |t| ^ s * qF 1 t)
Proof (Lean source)
-- @node: qF_unit_weighted_integrable lemma qF_unit_weighted_integrable (s : ℝ) (hs : s ∈ Icc (0 : ℝ) 3) : Integrable (fun t => |t| ^ s * qF 1 t) := by have hi : Integrable (fun t : ℝ => (1 + ‖t‖) ^ (-(3 : ℝ))) := integrable_one_add_norm (by norm_num) have hd : Integrable (fun t : ℝ => 8 / (1 + |t|)^3) := by simpa [Real.norm_eq_abs, Real.rpow_neg, div_eq_mul_inv] using hi.const_mul 8 have hs0 : 0 ≤ s := hs.1 apply hd.mono' (by fun_prop) apply Eventually.of_forall intro t rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (qF_nonneg 1 t))] exact qF_unit_weighted_tail_bound s hs t
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_unit_weighted_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:148

Scaling a Fourier weight scales its weighted integrand by the bandwidth power. Under the stated conditions. This is the stated conclusion.

Formal statement
s h t :
ℝ
hh :
0 < h
|t| ^ s * qF h t = h ^ s * (|t/h| ^ s * qF 1 (t/h))
Proof (Lean source)
-- @node: qF_weighted_scaling lemma qF_weighted_scaling (s h t : ℝ) (hh : 0 < h) : |t| ^ s * qF h t = h ^ s * (|t/h| ^ s * qF 1 (t/h)) := by have habs : |t| = h * |t/h| := by rw [abs_div, abs_of_pos hh] field_simp rw [habs, Real.mul_rpow hh.le (abs_nonneg _)] simp only [qF, div_one, mul_assoc]
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_weighted_scaling · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:165
theorem qF_whole_moment_scaling Lemma qF_whole_moment_scaling in the paper ↗

The exact whole-line change of variables gives the upper moment's bandwidth exponent in S1. Under the stated conditions. This is the stated conclusion.

Formal statement
s h :
ℝ
hh :
0 < h
(∫ t : ℝ, |t| ^ s * qF h t) = h ^ (s+1) * (∫ u : ℝ, |u| ^ s * qF 1 u)
Proof (Lean source)
-- @node: qF_whole_moment_scaling lemma qF_whole_moment_scaling (s h : ℝ) (hh : 0 < h) : (∫ t : ℝ, |t| ^ s * qF h t) = h ^ (s+1) * (∫ u : ℝ, |u| ^ s * qF 1 u) := by simp_rw [qF_weighted_scaling s h _ hh] rw [integral_const_mul] have hc := Measure.integral_comp_mul_left (fun u : ℝ => |u| ^ s * qF 1 u) h⁻¹ simp only [inv_inv, abs_of_pos hh, smul_eq_mul, ← div_eq_inv_mul] at hc rw [hc, Real.rpow_add hh, Real.rpow_one] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_whole_moment_scaling · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:175
theorem qF_whole_weighted_integrable Lemma qF_whole_weighted_integrable in the paper ↗

The weighted Fourier kernel is integrable on the entire line at every positive bandwidth. Under the stated conditions. This is the stated conclusion.

Formal statement
s h :
ℝ
hs :
s ∈ Icc (0 : ℝ) 3
hh :
0 < h
Integrable (fun t => |t| ^ s * qF h t)
Proof (Lean source)
-- @node: qF_whole_weighted_integrable lemma qF_whole_weighted_integrable (s h : ℝ) (hs : s ∈ Icc (0 : ℝ) 3) (hh : 0 < h) : Integrable (fun t => |t| ^ s * qF h t) := by have hi := (integrable_comp_mul_left_iff (fun u : ℝ => |u| ^ s * qF 1 u) (inv_ne_zero hh.ne')).mpr (qF_unit_weighted_integrable s hs) convert hi.const_mul (h ^ s) using 1 funext t simpa only [← div_eq_inv_mul] using qF_weighted_scaling s h t hh
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_whole_weighted_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:187

Restricting a nonnegative whole-line moment gives the S1 upper bound with a fixed constant. Under the stated conditions. This is the stated conclusion.

Formal statement
s h :
ℝ
hs :
s ∈ Icc (0 : ℝ) 3
hh :
0 < h
weightMoment s (qF h) ≤ h ^ (s+1) * (∫ u : ℝ, |u| ^ s * qF 1 u)
Proof (Lean source)
-- @node: qF_weightMoment_upper lemma qF_weightMoment_upper (s h : ℝ) (hs : s ∈ Icc (0 : ℝ) 3) (hh : 0 < h) : weightMoment s (qF h) ≤ h ^ (s+1) * (∫ u : ℝ, |u| ^ s * qF 1 u) := by rw [← qF_whole_moment_scaling s h hh] exact integral_mono_measure Measure.restrict_le_self (Eventually.of_forall (fun t => mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (qF_nonneg h t))) (qF_whole_weighted_integrable s h hs hh)
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_weightMoment_upper · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:198
theorem qF_weightMoment_scaling Lemma qF_weightMoment_scaling in the paper ↗

Changing variables on the latent dose interval gives the exact truncated S1 moment. Under the stated conditions. This is the stated conclusion.

Formal statement
s h :
ℝ
hh :
0 < h
= h ^ (s+1) * (∫ u in Icc ((-1/2 : ℝ)/h) ((1/2 : ℝ)/h), |u| ^ s * qF 1 u)
Proof (Lean source)
-- @node: qF_weightMoment_scaling lemma qF_weightMoment_scaling (s h : ℝ) (hh : 0 < h) : weightMoment s (qF h) = h ^ (s+1) * (∫ u in Icc ((-1/2 : ℝ)/h) ((1/2 : ℝ)/h), |u| ^ s * qF 1 u) := by have hab : (-1/2 : ℝ) ≤ 1/2 := by norm_num have habh : (-1/2 : ℝ)/h ≤ (1/2 : ℝ)/h := div_le_div_of_nonneg_right hab hh.le rw [weightMoment, integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le hab] simp_rw [qF_weighted_scaling s h _ hh] rw [intervalIntegral.integral_const_mul, intervalIntegral.integral_comp_div (fun u : ℝ => |u| ^ s * qF 1 u) hh.ne', smul_eq_mul, intervalIntegral.integral_of_le habh, ← integral_Icc_eq_integral_Ioc, Real.rpow_add hh, Real.rpow_one] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_weightMoment_scaling · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:208

The fixed positive central moment supplies a bandwidth-independent lower constant in S1. Under the stated conditions. This is the stated conclusion.

Formal statement
s h :
ℝ
hs :
s ∈ Icc (0 : ℝ) 3
hh :
h ∈ Ioc (0 : ℝ) 1
h ^ (s+1) * weightMoment s (qF 1) ≤ weightMoment s (qF h)
Proof (Lean source)
-- @node: qF_weightMoment_lower lemma qF_weightMoment_lower (s h : ℝ) (hs : s ∈ Icc (0 : ℝ) 3) (hh : h ∈ Ioc (0 : ℝ) 1) : h ^ (s+1) * weightMoment s (qF 1) ≤ weightMoment s (qF h) := by rw [qF_weightMoment_scaling s h hh.1] apply mul_le_mul_of_nonneg_left _ (Real.rpow_nonneg hh.1.le _) apply setIntegral_mono_set (qF_unit_weighted_integrable s hs).integrableOn (Eventually.of_forall (fun t => mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (qF_nonneg 1 t))) apply Eventually.of_forall intro t ht constructor · apply (div_le_iff₀ hh.1).mpr nlinarith [mul_le_mul_of_nonneg_right ht.1 hh.1.le, hh.2] · apply (le_div_iff₀ hh.1).mpr nlinarith [mul_le_mul_of_nonneg_right ht.2 hh.1.le, hh.2]
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_weightMoment_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:224

Both constants in the Fourier localization moment comparison are positive and independent of bandwidth. This is the stated conclusion. Under the stated conditions.

Formal statement
s :
ℝ
hs :
s ∈ Icc (0 : ℝ) 3
∃ c C : ℝ,
0 < c
0 < C
conclusion 1
h ∈ Ioc (0 : ℝ) (1/4) :
c * h ^ (s+1) ≤ weightMoment s (qF h)
weightMoment s (qF h) ≤ C * h ^ (s+1)
Proof (Lean source)
-- @node: qF_weightMoment_bounds lemma qF_weightMoment_bounds (s : ℝ) (hs : s ∈ Icc (0 : ℝ) 3) : ∃ c C : ℝ, 0 < c ∧ 0 < C ∧ ∀ h ∈ Ioc (0 : ℝ) (1/4), c * h ^ (s+1) ≤ weightMoment s (qF h) ∧ weightMoment s (qF h) ≤ C * h ^ (s+1) := by let c := weightMoment s (qF 1) let C := ∫ u : ℝ, |u| ^ s * qF 1 u have hc : 0 < c := qF_weightMoment_pos s hs.1 1 have hC : 0 < C := hc.trans_le (by simpa [c, C] using qF_weightMoment_upper s 1 hs (by norm_num)) refine ⟨c, C, hc, hC, ?_⟩ intro h hh constructor · simpa [c, mul_comm] using qF_weightMoment_lower s h hs ⟨hh.1, by linarith [hh.2]⟩ · simpa [C, mul_comm] using qF_weightMoment_upper s h hs hh.1
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_weightMoment_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:242

The numerator and denominator moment comparisons assemble the S1 public bias bound. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
h ∈ Ioc (0 : ℝ) (1/4) :
unitBq beta kappa (qF h) ≤ C * h ^ beta
Proof (Lean source)
-- @node: qF_bias_bound lemma qF_bias_bound (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ h ∈ Ioc (0 : ℝ) (1/4), unitBq beta kappa (qF h) ≤ C * h ^ beta := by have hs : kappa + beta ∈ Icc (0 : ℝ) 3 := by constructor <;> linarith [hkappa.1, hkappa.2, hbeta.1, hbeta.2] let c := weightMoment kappa (qF 1) let K := ∫ u : ℝ, |u| ^ (kappa+beta) * qF 1 u have hc : 0 < c := qF_weightMoment_pos kappa hkappa.1 1 have hK : 0 < K := (qF_weightMoment_pos (kappa+beta) hs.1 1).trans_le (by simpa [K] using qF_weightMoment_upper (kappa+beta) 1 hs (by norm_num)) refine ⟨64*K/c, by positivity, ?_⟩ intro h hh have hlo := qF_weightMoment_lower kappa h ⟨hkappa.1, by linarith [hkappa.2]⟩ ⟨hh.1, by linarith [hh.2]⟩ have hhi := qF_weightMoment_upper (kappa+beta) h hs hh.1 have hpow : 0 < h ^ (kappa+1) := Real.rpow_pos_of_pos hh.1 _ have hden : 0 < h ^ (kappa+1) * c := mul_pos hpow hc calc unitBq beta kappa (qF h) = 64 * weightMoment (kappa+beta) (qF h) / weightMoment kappa (qF h) := rfl _ ≤ (64 * (h ^ (kappa+beta+1) * K)) / (h ^ (kappa+1) * c) := by exact div_le_div₀ (mul_nonneg (by norm_num) (mul_nonneg (Real.rpow_nonneg hh.1.le _) hK.le)) (mul_le_mul_of_nonneg_left hhi (by norm_num)) hden hlo _ = (64*K/c) * h ^ beta := by rw [show kappa+beta+1 = beta+(kappa+1) by ring, Real.rpow_add hh.1] field_simp [hpow.ne']

The inverse Fourier integral is continuous in the observed dose. This is the stated conclusion.

Formal statement
sigma h :
ℝ
Continuous (ellF sigma h)
Proof (Lean source)
-- @node: ellF_continuous @[fun_prop] lemma ellF_continuous (sigma h : ℝ) : Continuous (ellF sigma h) := by unfold ellF exact Complex.continuous_re.comp ((realFourierIntegral_continuous (fun xi : ℝ => fourierIntegral fourierChar volume (fun t : ℝ => (qF h t : ℂ)) xi * (exp (sigma^2 * (2*pi*xi)^2 / 2) : ℂ))).comp continuous_neg)

The inverse Fourier integral has a finite uniform bound given by its multiplier norm. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma h :
ℝ
∃ C : ℝ,
0 ≤ C
conclusion 1
v :
|ellF sigma h v| ≤ C
Proof (Lean source)
-- @node: ellF_uniform_bound lemma ellF_uniform_bound (sigma h : ℝ) : ∃ C : ℝ, 0 ≤ C ∧ ∀ v, |ellF sigma h v| ≤ C := by let F : ℝ → ℂ := fun xi => fourierIntegral fourierChar volume (fun t : ℝ => (qF h t : ℂ)) xi * (exp (sigma^2 * (2*pi*xi)^2 / 2) : ℂ) refine ⟨∫ xi, ‖F xi‖, integral_nonneg (fun _ => norm_nonneg _), ?_⟩ intro v exact (Complex.abs_re_le_norm _).trans (Fourier.norm_fourierIntegral_le_integral_norm fourierChar volume F (-v))
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellF_uniform_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:299
theorem ellF_gaussian_integrable Lemma ellF_gaussian_integrable in the paper ↗

A bounded observable Fourier weight is integrable under each shifted Gaussian channel. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma h t :
ℝ
Integrable (fun z => ellF sigma h (t+sigma*z)) (gaussianReal 0 1)
Proof (Lean source)
-- @node: ellF_gaussian_integrable lemma ellF_gaussian_integrable (sigma h t : ℝ) : Integrable (fun z => ellF sigma h (t+sigma*z)) (gaussianReal 0 1) := by obtain ⟨C, hC, hbound⟩ := ellF_uniform_bound sigma h apply (integrable_const C).mono' (by fun_prop) exact Eventually.of_forall (fun z => by simpa only [Real.norm_eq_abs] using hbound (t+sigma*z))
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellF_gaussian_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:311

Squaring preserves the uniform inverse-weight bound. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma h :
ℝ
∃ C : ℝ,
0 ≤ C
conclusion 1
v :
(ellF sigma h v)^2 ≤ C
Proof (Lean source)
-- @node: ellF_square_bound lemma ellF_square_bound (sigma h : ℝ) : ∃ C : ℝ, 0 ≤ C ∧ ∀ v, (ellF sigma h v)^2 ≤ C := by obtain ⟨C, hC, hbound⟩ := ellF_uniform_bound sigma h refine ⟨C^2, sq_nonneg _, ?_⟩ intro v have hb := pow_le_pow_left₀ (abs_nonneg (ellF sigma h v)) (hbound v) 2 simpa only [sq_abs] using hb
theorem ellF_weighted_sq_integrable Lemma ellF_weighted_sq_integrable in the paper ↗

Compact dose support and a bounded inverse weight give finite weighted joint second moments. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma h :
ℝ
hkappa :
0 ≤ kappa
Integrable (fun x : ℝ × ℝ => |x.1| ^ kappa * (ellF sigma h (x.1+sigma*x.2))^2) ((volume.restrict (Icc (-1/2 : ℝ) (1/2))).prod (gaussianReal 0 1))
Proof (Lean source)
-- @node: ellF_weighted_sq_integrable lemma ellF_weighted_sq_integrable (kappa sigma h : ℝ) (hkappa : 0 ≤ kappa) : Integrable (fun x : ℝ × ℝ => |x.1| ^ kappa * (ellF sigma h (x.1+sigma*x.2))^2) ((volume.restrict (Icc (-1/2 : ℝ) (1/2))).prod (gaussianReal 0 1)) := by obtain ⟨C, hC, hbound⟩ := ellF_square_bound sigma h have ht : Integrable (fun t : ℝ => |t| ^ kappa) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := (continuous_abs.rpow_const (fun _ => inr hkappa)).integrableOn_Icc have hdom := ht.mul_prod (integrable_const C (μ := gaussianReal 0 1)) apply hdom.mono' (by fun_prop) apply Eventually.of_forall intro x rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (sq_nonneg _))] exact mul_le_mul_of_nonneg_left (hbound _) (Real.rpow_nonneg (abs_nonneg _) _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellF_weighted_sq_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/Fourier.lean:330
theorem ellF_VqENN_lt_top

The extended Fourier second moment is finite for every nonnegative design exponent. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma h :
ℝ
hkappa :
0 ≤ kappa
VqENN kappa sigma (ellF sigma h) < ⊤
Proof (Lean source)
-- @node: ellF_VqENN_lt_top lemma ellF_VqENN_lt_top (kappa sigma h : ℝ) (hkappa : 0 ≤ kappa) : VqENN kappa sigma (ellF sigma h) < ⊤ := by have hi := ellF_weighted_sq_integrable kappa sigma h hkappa have hn : ∀ x : ℝ × ℝ, 0 ≤ |x.1| ^ kappa * (ellF sigma h (x.1+sigma*x.2))^2 := fun x => mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (sq_nonneg _) have hf := (hasFiniteIntegral_iff_ofReal (Eventually.of_forall hn)).mp hi.hasFiniteIntegral rw [lintegral_prod _ (by fun_prop)] at hf simp_rw [ENNReal.ofReal_mul (Real.rpow_nonneg (abs_nonneg _) _)] at hf have hm : ∀ t : ℝ, Measurable (fun z => ofReal ((ellF sigma h (t+sigma*z))^2)) := by intro t fun_prop simp_rw [lintegral_const_mul _ (hm _)] at hf exact ENNReal.mul_lt_top (by norm_num : (16 : ℝ≥0∞) < ⊤) hf
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.FourierInverse 14 declarations Finite box convolutions and Gaussian inversion for the Fourier dictionary.

Finite box convolutions and Gaussian inversion for the Fourier dictionary.

The uniform frequency box whose transform is the bandwidth-scaled sinc.

Definition (Lean source)
h t :
ℝ
fourierSincBox h t :
ℂ
(Ioc (-((2*pi*h)⁻¹)) ((2*pi*h)⁻¹)).indicator (fun _ => (pi*h : ℂ)) t
theorem fourierSincBox_integrable

The frequency box has finite absolute mass. Under the stated conditions. This is the stated conclusion. This is the stated conclusion. This is the stated conclusion. This is the stated conclusion.

Formal statement
h :
ℝ
Proof (Lean source)
-- @node: fourierSincBox_integrable lemma fourierSincBox_integrable (h : ℝ) : Integrable (fourierSincBox h) := by exact (continuous_const.integrableOn_Icc.mono_set Ioc_subset_Icc_self).integrable_indicator measurableSet_Ioc
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourierSincBox_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierInverse.lean:22
theorem fourier_fourierSincBox

Direct integration of the uniform box gives the sinc transform. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
x :
ℝ
fourier (fourierSincBox h) x = (sinc (x/h) : ℂ)
Proof (Lean source)
-- @node: fourier_fourierSincBox lemma fourier_fourierSincBox (h : ℝ) (hh : 0 < h) (x : ℝ) : fourier (fourierSincBox h) x = (sinc (x/h) : ℂ) := by rw [Real.fourier_real_eq_integral_exp_smul] unfold fourierSincBox let a : ℝ := (2*Real.pi*h)⁻¹ have ha : 0 < a := by dsimp [a]; positivity have hind : (fun v : ℝ => exp (↑(-2*Real.pi*v*x)*I) • (Ioc (-a) a).indicator (fun _ => (Real.pi*h : ℂ)) v) = (Ioc (-a) a).indicator (fun v => exp (↑(-2*Real.pi*v*x)*I) • (Real.pi*h : ℂ)) := by funext v by_cases hv : v ∈ Ioc (-a) a <;> simp [indicator, hv] change (∫ v : ℝ, exp (↑(-2*Real.pi*v*x)*I) • (Ioc (-a) a).indicator (fun _ => (Real.pi*h : ℂ)) v) = _ rw [hind, integral_indicator measurableSet_Ioc, ← intervalIntegral.integral_of_le (neg_le_self ha.le)] by_cases hx : x = 0 · subst x simp [a] field_simp [Real.pi_ne_zero, hh.ne'] <;> ring · simp_rw [smul_eq_mul] rw [intervalIntegral.integral_mul_const] have hexp : (fun t : ℝ => exp (↑(-2*Real.pi*t*x)*I)) = (fun t : ℝ => exp ((↑(-2*Real.pi*x)*I)*t)) := by funext t; congr 1; push_cast; ring rw [hexp, integral_exp_mul_complex] · rw [Real.sinc_of_ne_zero (div_ne_zero hx hh.ne')] dsimp [a] push_cast have h₁ : -2*(Real.pi : ℂ)*x*I*(2*(Real.pi : ℂ)*h)⁻¹ = -(x/h : ℂ)*I := by field_simp [Real.pi_ne_zero, hh.ne'] have h₂ : -2*(Real.pi : ℂ)*x*I*-(2*(Real.pi : ℂ)*h)⁻¹ = (x/h : ℂ)*I := by field_simp [Real.pi_ne_zero, hh.ne'] rw [h₁, h₂] simp only [Complex.exp_mul_I, Complex.cos_neg, Complex.sin_neg] field_simp [Real.pi_ne_zero, hx, hh.ne'] ring · norm_num [Real.pi_ne_zero, hx]
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourier_fourierSincBox · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierInverse.lean:28
theorem convolution_support_Icc Lemma convolution_support_Icc in the paper ↗

Supports of two box convolutions add their radii. Under the stated conditions. This is the stated conclusion.

Formal statement
f g :
ℝ → ℂ
a b :
ℝ
hf :
support f ⊆ Icc (-a) a
hg :
support g ⊆ Icc (-b) b
support (f ⋆[mul ℂ ℂ] g) ⊆ Icc (-(a+b)) (a+b)
Proof (Lean source)
-- @node: convolution_support_Icc lemma convolution_support_Icc (f g : ℝ → ℂ) (a b : ℝ) (hf : support f ⊆ Icc (-a) a) (hg : support g ⊆ Icc (-b) b) : support (f ⋆[mul ℂ ℂ] g) ⊆ Icc (-(a+b)) (a+b) := by intro x hx rcases support_convolution_subset (mul ℂ ℂ) hx with ⟨u, hu, v, hv, huv⟩ have hu' := hf hu have hv' := hg hv subst x exact ⟨by linarith [hu'.1, hv'.1], by linarith [hu'.2, hv'.2]⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.convolution_support_Icc · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierInverse.lean:70
theorem qF_fourier_box_representation Lemma qF_fourier_box_representation in the paper ↗

The sixth sinc power is the Fourier transform of six uniform boxes (S2--S3). Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
∃ p : ℝ → ℂ,
support p ⊆ Icc (-(6*(2*pi*h)⁻¹)) (6*(2*pi*h)⁻¹)
conclusion 1
x :
fourier p x = (qF h x : ℂ)
Proof (Lean source)
-- @node: qF_fourier_box_representation lemma qF_fourier_box_representation (h : ℝ) (hh : 0 < h) : ∃ p : ℝ → ℂ, Integrable p ∧ support p ⊆ Icc (-(6*(2*pi*h)⁻¹)) (6*(2*pi*h)⁻¹) ∧ ∀ x, fourier p x = (qF h x : ℂ) := by let a : ℝ := (2*pi*h)⁻¹ let b := fourierSincBox h let q := b ⋆[mul ℂ ℂ] b let r := q ⋆[mul ℂ ℂ] b let p := r ⋆[mul ℂ ℂ] r have hb : Integrable b := fourierSincBox_integrable h have hq : Integrable q := hb.integrable_convolution (mul ℂ ℂ) hb have hr : Integrable r := hq.integrable_convolution (mul ℂ ℂ) hb have hp : Integrable p := hr.integrable_convolution (mul ℂ ℂ) hr have hbs : support b ⊆ Icc (-a) a := by intro x hx by_contra hn exact hx (indicator_of_notMem (fun hx' => hn ⟨hx'.1.le, hx'.2⟩) _) have hqs := convolution_support_Icc b b a a hbs hbs have hrs := convolution_support_Icc q b (a+a) a hqs hbs have hps := convolution_support_Icc r r (a+a+a) (a+a+a) hrs hrs refine ⟨p, hp, ?_, ?_⟩ · convert hps using 1 <;> congr 1 <;> dsimp [a] <;> ring · intro x dsimp [p, r, q] rw [Real.fourier_mul_convolution_eq hr hr, Real.fourier_mul_convolution_eq hq hb, Real.fourier_mul_convolution_eq hb hb, fourier_fourierSincBox h hh] simp only [qF, sincSix_eq_sinc_pow, Complex.ofReal_pow] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_fourier_box_representation · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierInverse.lean:84

The sinc-six localization is absolutely integrable on the real line. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
Integrable (fun t => (qF h t : ℂ))
Proof (Lean source)
-- @node: qF_integrable_complex lemma qF_integrable_complex (h : ℝ) (hh : 0 < h) : Integrable (fun t => (qF h t : ℂ)) := by have hi := qF_whole_weighted_integrable 0 h (by norm_num) hh simp only [Real.rpow_zero, one_mul] at hi exact hi.ofReal

Fourier inversion of the finite box convolution proves compact spectral support. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
support (fourier (fun t => (qF h t : ℂ))) ⊆ Icc (-(6*(2*pi*h)⁻¹)) (6*(2*pi*h)⁻¹)
Proof (Lean source)
-- @node: qF_fourier_support lemma qF_fourier_support (h : ℝ) (hh : 0 < h) : support (fourier (fun t => (qF h t : ℂ))) ⊆ Icc (-(6*(2*pi*h)⁻¹)) (6*(2*pi*h)⁻¹) := by obtain ⟨p, hp, hs, hF⟩ := qF_fourier_box_representation h hh let R := 6*(2*pi*h)⁻¹ have hFi : Integrable (fourier p) := by rw [funext hF]; exact qF_integrable_complex h hh intro xi hxi by_contra hn have hneg : -xi ∉ Icc (-R) R := by intro ht; exact hn ⟨by linarith [ht.2], by linarith [ht.1]⟩ have hevent : p =ᶠ[nhds (-xi)] fun _ => 0 := by filter_upwards [IsOpen.mem_nhds isClosed_Icc.isOpen_compl hneg] with y hy by_contra hpy exact hy (hs hpy) have hc : ContinuousAt p (-xi) := continuousAt_const.congr_of_eventuallyEq hevent have hi := hp.fourierInv_fourier_eq hFi hc rw [funext hF, Real.fourierInv_eq_fourier_neg] at hi have hz : p (-xi) = 0 := by by_contra hpy; exact hneg (hs hpy) apply hxi simpa only [neg_neg, hz] using hi

The continuous transform is integrable because its spectrum is compact. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
Integrable (fourier (fun t => (qF h t : ℂ)))
Proof (Lean source)
-- @node: qF_fourier_integrable lemma qF_fourier_integrable (h : ℝ) (hh : 0 < h) : Integrable (fourier (fun t => (qF h t : ℂ))) := by apply (VectorFourier.fourierIntegral_continuous Real.continuous_fourierChar (by fun_prop) (qF_integrable_complex h hh)).integrable_of_hasCompactSupport apply HasCompactSupport.of_support_subset_isCompact isCompact_Icc exact qF_fourier_support h hh
theorem fourier_eq_scalar_integral Lemma fourier_eq_scalar_integral in the paper ↗

The scalar and vector Fourier conventions agree on the real line. Under the stated conditions. This is the stated conclusion.

Formal statement
f :
ℝ → ℂ
Proof (Lean source)
-- @node: fourier_eq_scalar_integral lemma fourier_eq_scalar_integral (f : ℝ → ℂ) : fourier f = fourierIntegral fourierChar volume f := by funext w rw [Real.fourier_real_eq] rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourier_eq_scalar_integral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierInverse.lean:158
theorem qF_inverse_multiplier_integrable Lemma qF_inverse_multiplier_integrable in the paper ↗

Compact spectral support makes the inverse Gaussian multiplier integrable. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma h :
ℝ
hh :
0 < h
Integrable (fun xi => fourier (fun t => (qF h t : ℂ)) xi * (exp (sigma^2*(2*pi*xi)^2/2) : ℂ))
Proof (Lean source)
-- @node: qF_inverse_multiplier_integrable lemma qF_inverse_multiplier_integrable (sigma h : ℝ) (hh : 0 < h) : Integrable (fun xi => fourier (fun t => (qF h t : ℂ)) xi * (exp (sigma^2*(2*pi*xi)^2/2) : ℂ)) := by have hc : Continuous (fourier (fun t => (qF h t : ℂ))) := VectorFourier.fourierIntegral_continuous Real.continuous_fourierChar (by fun_prop) (qF_integrable_complex h hh) apply (hc.mul (by fun_prop)).integrable_of_hasCompactSupport apply HasCompactSupport.of_support_subset_isCompact isCompact_Icc exact (Function.support_mul_subset_left _ _).trans (qF_fourier_support h hh)
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_inverse_multiplier_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierInverse.lean:166

Gaussian averaging cancels the inverse multiplier frequency by frequency. This is the stated conclusion.

Formal statement
sigma t xi :
ℝ
(∫ z : ℝ, exp (↑(2*pi*xi*(t+sigma*z))*I) ∂gaussianReal 0 1)
= exp (↑(2*pi*xi*t)*I) * (exp (-(sigma^2*(2*pi*xi)^2/2)) : ℂ)
Proof (Lean source)
-- @node: gaussian_fourier_phase lemma gaussian_fourier_phase (sigma t xi : ℝ) : (∫ z : ℝ, exp (↑(2*pi*xi*(t+sigma*z))*I) ∂gaussianReal 0 1) = exp (↑(2*pi*xi*t)*I) * (exp (-(sigma^2*(2*pi*xi)^2/2)) : ℂ) := by have heq : (fun z : ℝ => exp (↑(2*pi*xi*(t+sigma*z))*I)) = (fun z : ℝ => exp (↑(2*pi*xi*t)*I) * exp (↑((2*pi*xi*sigma)*z)*I)) := by funext z rw [← Complex.exp_add] congr 1 push_cast ring rw [heq, integral_const_mul] congr 1 simp_rw [show ∀ z : ℝ, (↑((2*pi*xi*sigma)*z) : ℂ) = ↑(2*pi*xi*sigma) * ↑z from fun z => Complex.ofReal_mul _ _] rw [← charFun_apply_real, charFun_gaussianReal] simp only [Complex.ofReal_zero, mul_zero, zero_mul, zero_sub] rw [Complex.ofReal_exp] congr 1 norm_num ring

Absolute Fubini gives exact cancellation of the Gaussian multiplier (S4--S5). Under the stated conditions. This is the stated conclusion.

Formal statement
sigma h t :
ℝ
hh :
0 < h
(∫ z, ellF sigma h (t+sigma*z) ∂gaussianReal 0 1) = qF h t
Proof (Lean source)
-- @node: ellF_gaussian_inverse lemma ellF_gaussian_inverse (sigma h t : ℝ) (hh : 0 < h) : (∫ z, ellF sigma h (t+sigma*z) ∂gaussianReal 0 1) = qF h t := by let F : ℝ → ℂ := fourier (fun u => (qF h u : ℂ)) let G : ℝ → ℂ := fun xi => F xi * (exp (sigma^2*(2*pi*xi)^2/2) : ℂ) have hG : Integrable G := qF_inverse_multiplier_integrable sigma h hh let K : ℝ → ℝ → ℂ := fun z xi => exp (↑(2*pi*xi*(t+sigma*z))*I) * G xi have hFc : Continuous F := VectorFourier.fourierIntegral_continuous Real.continuous_fourierChar (by fun_prop) (qF_integrable_complex h hh) have hGc : Continuous G := hFc.mul (by fun_prop) have hKc : Continuous (uncurry K) := by dsimp [K, uncurry] exact (show Continuous (fun p : ℝ × ℝ => exp (↑(2*pi*p.2*(t+sigma*p.1))*I)) by fun_prop).mul (hGc.comp continuous_snd) have hK : Integrable (uncurry K) ((gaussianReal 0 1).prod volume) := by apply ((integrable_const (1 : ℝ) (μ := gaussianReal 0 1)).mul_prod hG.norm).mono' hKc.aestronglyMeasurable filter_upwards with p change ‖Complex.exp (↑(2*pi*p.2*(t+sigma*p.1))*I) * G p.2‖ ≤ 1 * ‖G p.2‖ rw [norm_mul, Complex.norm_exp] simp have hKg : Integrable (fun z => ∫ xi, K z xi) (gaussianReal 0 1) := hK.integral_prod_left have hell (v : ℝ) : ellF sigma h v = (∫ xi, exp (↑(2*pi*xi*v)*I) * G xi).re := by unfold ellF rw [← fourier_eq_scalar_integral, ← fourier_eq_scalar_integral, Real.fourier_real_eq_integral_exp_smul] congr 1 apply integral_congr_ae filter_upwards with xi dsimp [G, F] congr 2 push_cast ring simp_rw [hell] have hRe : (∫ z, (∫ xi, K z xi).re ∂gaussianReal 0 1) = (∫ z, (∫ xi, K z xi) ∂gaussianReal 0 1).re := Complex.reCLM.integral_comp_comm hKg change (∫ z, (∫ xi, K z xi).re ∂gaussianReal 0 1) = _ rw [hRe, integral_integral_swap hK] have hfreq (xi : ℝ) : (∫ z, K z xi ∂gaussianReal 0 1) = exp (↑(2*pi*xi*t)*I) * F xi := by dsimp [K] rw [integral_mul_const, gaussian_fourier_phase] dsimp [G] rw [show (exp (↑(2*pi*xi*t)*I) * ↑(exp (-(sigma^2*(2*pi*xi)^2/2)))) * (F xi * ↑(exp (sigma^2*(2*pi*xi)^2/2))) = exp (↑(2*pi*xi*t)*I) * F xi * ↑(exp (-(sigma^2*(2*pi*xi)^2/2)) * exp (sigma^2*(2*pi*xi)^2/2)) by push_cast; ring] rw [← Real.exp_add] simp simp_rw [hfreq] have hinv := (qF_integrable_complex h hh).fourierInv_fourier_eq (qF_fourier_integrable h hh) ((Complex.continuous_ofReal.comp (qF_continuous h)).continuousAt (x := t)) rw [Real.fourierInv_eq_fourier_neg, Real.fourier_real_eq_integral_exp_smul] at hinv have heq : (∫ xi, exp (↑(2*pi*xi*t)*I) * F xi) = (qF h t : ℂ) := by convert hinv using 1 apply integral_congr_ae filter_upwards with xi dsimp [F] congr 2 push_cast ring rw [heq] rfl
theorem fourier_pair_admissible

Exact Fourier inversion has positive finite weighted moments and finite Gaussian second moments. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
h :
ℝ
hvalid :
h ∈ Ioc (0 : ℝ) (1/4)
conclusion 1
PairAdmissible kappa sigma ⟨qF h, ellF sigma h⟩
conclusion 2
VqENN kappa sigma (⟨qF h, ellF sigma h⟩ : WeightPair).ell < ⊤
Proof (Lean source)
-- @node: fourier_pair_admissible lemma fourier_pair_admissible (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (h : ℝ) (hvalid : h ∈ Ioc (0 : ℝ) (1/4)) : PairAdmissible kappa sigma ⟨qF h, ellF sigma h⟩ ∧ VqENN kappa sigma (⟨qF h, ellF sigma h⟩ : WeightPair).ell < ⊤ := by have hinverse : (∀ t ∈ Icc (-1/2 : ℝ) (1/2), Integrable (fun z => ellF sigma h (t+sigma*z)) (gaussianReal 0 1)) ∧ (∀ t ∈ Icc (-1/2 : ℝ) (1/2), ∫ z, ellF sigma h (t+sigma*z) ∂gaussianReal 0 1 = qF h t) ∧ VqENN kappa sigma (ellF sigma h) < ⊤ := by refine ⟨fun t _ => ellF_gaussian_integrable sigma h t, ?_, ellF_VqENN_lt_top kappa sigma h hkappa.1⟩ intro t ht exact ellF_gaussian_inverse sigma h t hvalid.1 refine ⟨?_, hinverse.2.2⟩ exact ⟨(qF_continuous h).measurable, ellF_measurable sigma h, fun t _ => qF_nonneg h t, qF_weighted_integrable kappa hkappa.1 h, qF_weightMoment_pos kappa hkappa.1 h, hinverse.1, hinverse.2.1⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourier_pair_admissible · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierInverse.lean:278

The public Fourier second moment is an ordinary nonnegative joint integral. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma h :
ℝ
hkappa :
0 ≤ kappa
Vq kappa sigma (ellF sigma h)
= 16 * ∫ t in Icc (-1/2 : ℝ) (1/2), |t| ^ kappa * (∫ z, (ellF sigma h (t+sigma*z))^2 ∂gaussianReal 0 1)
Proof (Lean source)
-- @node: ellF_Vq_integral lemma ellF_Vq_integral (kappa sigma h : ℝ) (hkappa : 0 ≤ kappa) : Vq kappa sigma (ellF sigma h) = 16 * ∫ t in Icc (-1/2 : ℝ) (1/2), |t| ^ kappa * (∫ z, (ellF sigma h (t+sigma*z))^2 ∂gaussianReal 0 1) := by have hi := ellF_weighted_sq_integrable kappa sigma h hkappa have hn : ∀ x : ℝ × ℝ, 0 ≤ |x.1| ^ kappa * (ellF sigma h (x.1+sigma*x.2))^2 := fun x => mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (sq_nonneg _) have he := ofReal_integral_eq_lintegral_ofReal hi (Eventually.of_forall hn) rw [lintegral_prod _ (by fun_prop)] at he simp_rw [ENNReal.ofReal_mul (Real.rpow_nonneg (abs_nonneg _) _)] at he have hm : ∀ t : ℝ, Measurable (fun z => ofReal ((ellF sigma h (t+sigma*z))^2)) := by intro t fun_prop simp_rw [lintegral_const_mul _ (hm _)] at he have hj := integral_prod _ hi simp_rw [integral_const_mul] at hj rw [Vq, VqENN, ENNReal.toReal_mul, ← he, ENNReal.toReal_ofReal (integral_nonneg hn), hj] norm_num
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.FourierQuantitative 16 declarations Sinc-six profile prerequisites for the promoted weighted inverse-Gaussian bounds.

Sinc-six profile prerequisites for the promoted weighted inverse-Gaussian bounds.

Whole-line localization moments give three continuous spectral derivatives. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
ContDiff ℝ 3 (𝓕 (fun t => (qF h t : ℂ)))
Proof (Lean source)
-- @node: qF_fourier_contDiff lemma qF_fourier_contDiff (h : ℝ) (hh : 0 < h) : ContDiff ℝ 3 (𝓕 (fun t => (qF h t : ℂ))) := by apply Real.contDiff_fourier intro j hj have hj3 : j ≤ 3 := by exact_mod_cast hj have hs : (j : ℝ) ∈ Icc (0 : ℝ) 3 := ⟨by positivity, by exact_mod_cast hj3⟩ simpa only [Real.norm_eq_abs, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (qF_nonneg h _), Real.rpow_natCast] using qF_whole_weighted_integrable (j : ℝ) h hs hh
theorem qF_fourier_support_radius Lemma qF_fourier_support_radius in the paper ↗

The spectral support radius agrees with the promoted theorem's convention. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
support (𝓕 (fun t => (qF h t : ℂ))) ⊆ Icc (-(3 / (pi * h))) (3 / (pi * h))
Proof (Lean source)
-- @node: qF_fourier_support_radius lemma qF_fourier_support_radius (h : ℝ) (hh : 0 < h) : support (𝓕 (fun t => (qF h t : ℂ))) ⊆ Icc (-(3 / (pi * h))) (3 / (pi * h)) := by convert qF_fourier_support h hh using 1 <;> congr 1 <;> ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_fourier_support_radius · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:28
theorem qF_fourier_hasCompactSupport Lemma qF_fourier_hasCompactSupport in the paper ↗

Compact spectral support is independent of the noise scale. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
HasCompactSupport (𝓕 (fun t => (qF h t : ℂ)))
Proof (Lean source)
-- @node: qF_fourier_hasCompactSupport lemma qF_fourier_hasCompactSupport (h : ℝ) (hh : 0 < h) : HasCompactSupport (𝓕 (fun t => (qF h t : ℂ))) := HasCompactSupport.of_support_subset_isCompact isCompact_Icc (qF_fourier_support h hh)
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_fourier_hasCompactSupport · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:35

The spectral height is controlled by the unscaled sinc-six mass. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
xi :
ℝ
‖𝓕 (fun t => (qF h t : ℂ)) xi‖ ≤ (∫ u : ℝ, qF 1 u) * h
Proof (Lean source)
-- @node: qF_fourier_height lemma qF_fourier_height (h : ℝ) (hh : 0 < h) (xi : ℝ) : ‖𝓕 (fun t => (qF h t : ℂ)) xi‖ ≤ (∫ u : ℝ, qF 1 u) * h := by have hn : (fun t => ‖(qF h t : ℂ)‖) = qF h := by funext t simp [Complex.norm_real, abs_of_nonneg (qF_nonneg h t)] have hb := VectorFourier.norm_fourierIntegral_le_integral_norm fourierChar volume (innerₗ ℝ) (fun t => (qF h t : ℂ)) xi change ‖𝓕 (fun t => (qF h t : ℂ)) xi‖ ≤ _ at hb rw [hn] at hb have hs := qF_whole_moment_scaling 0 h hh simp only [Real.rpow_zero, one_mul, zero_add, Real.rpow_one] at hs rw [hs, mul_comm] at hb exact hb
theorem qF_mul_integrable_complex Lemma qF_mul_integrable_complex in the paper ↗

The first absolute localization moment justifies differentiation under the Fourier integral. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
Integrable (fun t : ℝ => t • (qF h t : ℂ))
Proof (Lean source)
-- @node: qF_mul_integrable_complex lemma qF_mul_integrable_complex (h : ℝ) (hh : 0 < h) : Integrable (fun t : ℝ => t • (qF h t : ℂ)) := by apply (qF_whole_weighted_integrable 1 h (by norm_num) hh).mono' (by fun_prop) filter_upwards with t simp [norm_smul, Complex.norm_real, abs_of_nonneg (qF_nonneg h t)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_mul_integrable_complex · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:57
theorem qF_fourier_deriv_height Lemma qF_fourier_deriv_height in the paper ↗

The derivative height has order h squared with a fixed unscaled moment constant. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
xi :
ℝ
‖deriv (𝓕 (fun t => (qF h t : ℂ))) xi‖ ≤ (2 * pi * (∫ u : ℝ, |u| * qF 1 u)) * h^2
Proof (Lean source)
-- @node: qF_fourier_deriv_height lemma qF_fourier_deriv_height (h : ℝ) (hh : 0 < h) (xi : ℝ) : ‖deriv (𝓕 (fun t => (qF h t : ℂ))) xi‖ ≤ (2 * pi * (∫ u : ℝ, |u| * qF 1 u)) * h^2 := by rw [Real.deriv_fourier (qF_integrable_complex h hh) (qF_mul_integrable_complex h hh)] have hb := VectorFourier.norm_fourierIntegral_le_integral_norm fourierChar volume (innerₗ ℝ) (fun t : ℝ => (-2 * pi * I * t) • (qF h t : ℂ)) xi change ‖𝓕 (fun t : ℝ => (-2 * pi * I * t) • (qF h t : ℂ)) xi‖ ≤ _ at hb have hn : (fun t : ℝ => ‖(-2 * pi * I * t) • (qF h t : ℂ)‖) = fun t : ℝ => (2 * pi) * (|t| * qF h t) := by funext t simp [norm_smul, norm_mul, Complex.norm_real, abs_of_nonneg Real.pi_pos.le, abs_of_nonneg (qF_nonneg h t)] ring rw [hn, integral_const_mul] at hb have hs := qF_whole_moment_scaling 1 h hh norm_num only [Real.rpow_one, show (1 : ℝ)+1 = 2 by norm_num, Real.rpow_two] at hs rw [hs] at hb convert hb using 1 <;> ring
theorem qF_fourier_profile_bounds Lemma qF_fourier_profile_bounds in the paper ↗

Fixed nonnegative constants supply precisely the profile hypotheses of the promoted bound. This is the stated conclusion.

Formal statement
∃ a b : ℝ,
0 ≤ a
0 ≤ b
conclusion 1
h :
ℝ
0 < h
xi :
‖𝓕 (fun t => (qF h t : ℂ)) xi‖ ≤ a*h
xi :
‖deriv (𝓕 (fun t => (qF h t : ℂ))) xi‖ ≤ b*h^2
Proof (Lean source)
-- @node: qF_fourier_profile_bounds lemma qF_fourier_profile_bounds : ∃ a b : ℝ, 0 ≤ a ∧ 0 ≤ b ∧ ∀ h : ℝ, 0 < h → (∀ xi, ‖𝓕 (fun t => (qF h t : ℂ)) xi‖ ≤ a*h) ∧ (∀ xi, ‖deriv (𝓕 (fun t => (qF h t : ℂ))) xi‖ ≤ b*h^2) := by refine ⟨∫ u : ℝ, qF 1 u, 2*pi*(∫ u : ℝ, |u| * qF 1 u), integral_nonneg (qF_nonneg 1), ?_, ?_⟩ · exact mul_nonneg (by positivity) (integral_nonneg (fun u => mul_nonneg (abs_nonneg u) (qF_nonneg 1 u))) · intro h hh exact ⟨qF_fourier_height h hh, qF_fourier_deriv_height h hh⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_fourier_profile_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:89
theorem compactC2_fourier_integrable Lemma compactC2_fourier_integrable in the paper ↗

Two continuous compactly supported frequency derivatives make the inverse absolutely integrable. This is the integrability part of S6, obtained from Mathlib's derivative identities. Under the stated conditions. This is the stated conclusion.

Formal statement
G :
ℝ → ℂ
hG :
ContDiff ℝ 2 G
Integrable (𝓕 G)
Proof (Lean source)
-- @node: compactC2_fourier_integrable lemma compactC2_fourier_integrable (G : ℝ → ℂ) (hG : ContDiff ℝ 2 G) (hc : HasCompactSupport G) : Integrable (𝓕 G) := by have hD : ContDiff ℝ 1 (deriv G) := by exact (contDiff_succ_iff_deriv (n := 1)).mp hG |>.2.2 have hi : Integrable G := hG.continuous.integrable_of_hasCompactSupport hc have hiD : Integrable (deriv G) := hD.continuous.integrable_of_hasCompactSupport hc.deriv have hiDD : Integrable (deriv (deriv G)) := (hD.continuous_deriv (by norm_num)).integrable_of_hasCompactSupport hc.deriv.deriv let A : ℝ := ∫ xi, ‖G xi‖ let B : ℝ := (∫ xi, ‖deriv (deriv G) xi‖) / (2*pi)^2 have hA : 0 ≤ A := integral_nonneg (fun _ => norm_nonneg _) have hB : 0 ≤ B := by dsimp [B]; positivity have hbound (v : ℝ) : ‖𝓕 G v‖ ≤ A := VectorFourier.norm_fourierIntegral_le_integral_norm fourierChar volume (innerₗ ℝ) G v have hbound2 (v : ℝ) : |v|^2 * ‖𝓕 G v‖ ≤ B := by have ht := VectorFourier.norm_fourierIntegral_le_integral_norm fourierChar volume (innerₗ ℝ) (deriv (deriv G)) v change ‖𝓕 (deriv (deriv G)) v‖ ≤ _ at ht rw [Real.fourier_deriv hiD (hD.differentiable (by norm_num)) hiDD, Real.fourier_deriv hi (hG.differentiable (by norm_num)) hiD] at ht simp only [norm_smul, norm_mul, Complex.norm_real, Real.norm_eq_abs, Complex.norm_I, mul_one, abs_mul, abs_neg, abs_of_pos Real.pi_pos, norm_neg] at ht norm_num at ht apply (le_div_iff₀ (by positivity : 0 < (2*pi)^2)).mpr nlinarith [ht] have hdecay (v : ℝ) : ‖𝓕 G v‖ ≤ 4*(A+B)/(1+|v|)^2 := by apply (le_div_iff₀ (by positivity : 0 < (1+|v|)^2)).mpr by_cases hv : |v| ≤ 1 · have hp : (1+|v|)^2 ≤ 4 := by nlinarith [abs_nonneg v] nlinarith [mul_le_mul (hbound v) hp (sq_nonneg (1+|v|)) hA] · have hp : (1+|v|)^2 ≤ 4*|v|^2 := by nlinarith [abs_nonneg v, lt_of_not_ge hv] have hm := mul_le_mul_of_nonneg_left hp (norm_nonneg (𝓕 G v)) nlinarith [hbound2 v] have hd : Integrable (fun v : ℝ => 4*(A+B)/(1+|v|)^2) := by simpa [Real.norm_eq_abs, Real.rpow_neg, div_eq_mul_inv] using (integrable_one_add_norm (by norm_num : (Module.finrank ℝ ℝ : ℝ) < 2)).const_mul (4*(A+B)) apply hd.mono' (VectorFourier.fourierIntegral_continuous Real.continuous_fourierChar (by fun_prop) hi).aestronglyMeasurable exact Eventually.of_forall hdecay
CausalSmith.Stat.NoisydoseWeakdesignTransition.compactC2_fourier_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:102
theorem qF_inverseGaussian_integrable Lemma qF_inverseGaussian_integrable in the paper ↗

The inverse and derivative inverse satisfy the promoted theorem's absolute inversion hypotheses. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma h :
ℝ
hh :
0 < h
conclusion 1
Integrable (𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ)))))
conclusion 2
Integrable (𝓕⁻ (deriv (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ))))))
Proof (Lean source)
-- @node: qF_inverseGaussian_integrable lemma qF_inverseGaussian_integrable (sigma h : ℝ) (hh : 0 < h) : Integrable (𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ))))) ∧ Integrable (𝓕⁻ (deriv (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ)))))) := by let G := inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ))) have hG : ContDiff ℝ 3 G := by dsimp [G, inverseGaussian] apply (qF_fourier_contDiff h hh).mul exact Complex.ofRealCLM.contDiff.comp (Real.contDiff_exp.comp ((contDiff_const.mul ((contDiff_const.mul contDiff_id).pow 2)).div_const 2)) have hc : HasCompactSupport G := inverseGaussian_hasCompactSupport _ _ (qF_fourier_hasCompactSupport h hh) have hD : ContDiff ℝ 2 (deriv G) := (contDiff_succ_iff_deriv (n := 2)).mp hG |>.2.2 have hi := compactC2_fourier_integrable G (hG.of_le (by norm_num)) hc have hiD := compactC2_fourier_integrable (deriv G) hD hc.deriv constructor · change Integrable (fun t => 𝓕⁻ G t) simp_rw [Real.fourierInv_eq_fourier_neg] exact hi.comp_neg · change Integrable (fun t => 𝓕⁻ (deriv G) t) simp_rw [Real.fourierInv_eq_fourier_neg] exact hiD.comp_neg
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_inverseGaussian_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:147
theorem qF_inverseGaussian_weightedEnergy_bound Lemma qF_inverseGaussian_weightedEnergy_bound in the paper ↗

Specializing the promoted frequency estimate proves the weighted physical-space bound in S6. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
h :
ℝ
0 < h
sigma :
ℝ
0 ≤ sigma
Integrable (fun v => |v| ^ kappa * ‖𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ)))) v‖ ^ 2)
weightedEnergy kappa (𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ)))))
≤ C * h ^ (kappa+1) * (1+sigma/h)^4 * exp (36*(sigma/h)^2)
Proof (Lean source)
-- @node: qF_inverseGaussian_weightedEnergy_bound lemma qF_inverseGaussian_weightedEnergy_bound (kappa : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ h : ℝ, 0 < h → ∀ sigma : ℝ, 0 ≤ sigma → Integrable (fun v => |v| ^ kappa * ‖𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ)))) v‖ ^ 2) ∧ weightedEnergy kappa (𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ))))) ≤ C * h ^ (kappa+1) * (1+sigma/h)^4 * exp (36*(sigma/h)^2) := by obtain ⟨a, b, ha, hb, hprofile⟩ := qF_fourier_profile_bounds let C := (6 / pi) * (a^2 + (2*pi)⁻¹^2 * (b+12*pi*a)^2) have hC : 0 ≤ C := by dsimp [C]; positivity refine ⟨C+1, by positivity, ?_⟩ intro h hh sigma hsigma obtain ⟨hinv, hinvD⟩ := qF_inverseGaussian_integrable sigma h hh obtain ⟨hi, hbound⟩ := inverseGaussian_weightedEnergy_le (𝓕 (fun t => (qF h t : ℂ))) kappa sigma h a b ((qF_fourier_contDiff h hh).of_le (by norm_num)) (qF_fourier_hasCompactSupport h hh) hkappa.1 hkappa.2 hh hsigma ha hb (qF_fourier_support_radius h hh) (hprofile h hh).1 (hprofile h hh).2 hinv hinvD refine ⟨hi, hbound.trans ?_⟩ apply mul_le_mul_of_nonneg_right _ (Real.exp_pos _).le apply mul_le_mul_of_nonneg_right _ (by positivity) exact mul_le_mul_of_nonneg_right (by dsimp [C]; linarith) (by positivity)
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_inverseGaussian_weightedEnergy_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:176
theorem gaussian_shifted_joint_integrable Lemma gaussian_shifted_joint_integrable in the paper ↗

Finite ordinary and quadratic kernel energies imply joint design/noise integrability. A measure-preserving dose translation reduces this bookkeeping step to product integrals. Under the stated conditions. This is the stated conclusion.

Formal statement
g :
ℝ → ℂ
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hg :
h0 :
Integrable (fun v => ‖g v‖^2)
h2 :
Integrable (fun v : ℝ => v^2 * ‖g v‖^2)
Integrable (fun p : ℝ × ℝ => |p.1|^kappa * ‖g (p.1+sigma*p.2)‖^2) (volume.prod (gaussianReal 0 1))
Proof (Lean source)
-- @node: gaussian_shifted_joint_integrable lemma gaussian_shifted_joint_integrable (g : ℝ → ℂ) (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hg : Measurable g) (h0 : Integrable (fun v => ‖g v‖^2)) (h2 : Integrable (fun v : ℝ => v^2 * ‖g v‖^2)) : Integrable (fun p : ℝ × ℝ => |p.1|^kappa * ‖g (p.1+sigma*p.2)‖^2) (volume.prod (gaussianReal 0 1)) := by have hz : Integrable (fun z : ℝ => z^2) (gaussianReal 0 1) := (memLp_id_gaussianReal (μ := 0) (v := 1) 2).integrable_sq have hd : Integrable (fun p : ℝ × ℝ => (1+2*p.2^2+2*sigma^2*p.1^2) * ‖g p.2‖^2) ((gaussianReal 0 1).prod volume) := by convert! ((integrable_const (1 : ℝ) (μ := gaussianReal 0 1)).mul_prod (h0.add (h2.const_mul 2))).add ((hz.const_mul (2*sigma^2)).mul_prod h0) using 1 funext p dsimp ring have mp : MeasurePreserving (fun p : ℝ × ℝ => (p.1, p.2+sigma*p.1)) ((gaussianReal 0 1).prod volume) ((gaussianReal 0 1).prod volume) := by simpa only [id_eq] using (MeasurePreserving.id (gaussianReal 0 1)).skew_product (g := fun z t : ℝ => t+sigma*z) (by fun_prop) (Eventually.of_forall (fun z => (measurePreserving_add_right volume (sigma*z)).map_eq)) have hcomp := mp.integrable_comp_of_integrable hd have hi : Integrable (fun p : ℝ × ℝ => |p.2|^kappa * ‖g (p.2+sigma*p.1)‖^2) ((gaussianReal 0 1).prod volume) := by apply hcomp.mono' (by fun_prop) filter_upwards with p rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (sq_nonneg _))] have hw : |p.2|^kappa ≤ 1+p.2^2 := by by_cases ht : |p.2| ≤ 1 · have := Real.rpow_le_one (abs_nonneg p.2) ht hkappa.1 nlinarith [sq_nonneg p.2] · have := Real.rpow_le_rpow_of_exponent_le (le_of_not_ge ht) hkappa.2 simp only [Real.rpow_two, sq_abs] at this linarith apply mul_le_mul_of_nonneg_right _ (sq_nonneg _) change |p.2|^kappa ≤ 1+2*(p.2+sigma*p.1)^2+2*sigma^2*p.1^2 nlinarith [sq_nonneg (p.2+2*sigma*p.1)] exact (Measure.measurePreserving_swap (μ := volume) (ν := gaussianReal 0 1)).integrable_comp_of_integrable hi
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_shifted_joint_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:204
theorem qF_inverseGaussian_joint_integrable Lemma qF_inverseGaussian_joint_integrable in the paper ↗

The complex sinc-six inverse has jointly integrable weighted second moments on the full dose line. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma h :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hh :
0 < h
Integrable (fun p : ℝ × ℝ => |p.1|^kappa * ‖𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ)))) (p.1+sigma*p.2)‖^2) (volume.prod (gaussianReal 0 1))
Proof (Lean source)
-- @node: qF_inverseGaussian_joint_integrable lemma qF_inverseGaussian_joint_integrable (kappa sigma h : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hh : 0 < h) : Integrable (fun p : ℝ × ℝ => |p.1|^kappa * ‖𝓕⁻ (Causalean.Mathlib.Analysis.Fourier.inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ)))) (p.1+sigma*p.2)‖^2) (volume.prod (gaussianReal 0 1)) := by let F := 𝓕 (fun t => (qF h t : ℂ)) let G := Causalean.Mathlib.Analysis.Fourier.inverseGaussian sigma F have hF : ContDiff ℝ 1 F := (qF_fourier_contDiff h hh).of_le (by norm_num) obtain ⟨hi, hiD⟩ := qF_inverseGaussian_integrable sigma h hh have hdata := inverseGaussian_compactInverseData F sigma hF (qF_fourier_hasCompactSupport h hh) hi hiD obtain ⟨h0, h2, _⟩ := Causalean.Mathlib.Analysis.Fourier.inverse_energy_endpoints G hdata apply gaussian_shifted_joint_integrable _ kappa sigma hkappa _ h0 h2 have hc : Continuous (𝓕⁻ G) := by have hc' : Continuous (𝓕 G) := VectorFourier.fourierIntegral_continuous Real.continuous_fourierChar (by fun_prop) (hdata.regularity.continuous.integrable_of_hasCompactSupport hdata.compactSupport) change Continuous (fun v => 𝓕⁻ G v) simp_rw [Real.fourierInv_eq_fourier_neg] exact hc'.comp continuous_neg exact hc.measurable
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_inverseGaussian_joint_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:248
theorem ellF_eq_inverseGaussian_real Lemma ellF_eq_inverseGaussian_real in the paper ↗

The public real inverse is the real part of the promoted complex inverse multiplier. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma h v :
ℝ
ellF sigma h v
= (𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ)))) v).re
Proof (Lean source)
-- @node: ellF_eq_inverseGaussian_real lemma ellF_eq_inverseGaussian_real (sigma h v : ℝ) : ellF sigma h v = (𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ)))) v).re := by unfold ellF rw [← fourier_eq_scalar_integral, ← fourier_eq_scalar_integral, Real.fourierInv_eq_fourier_neg] rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellF_eq_inverseGaussian_real · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:273
theorem ellF_Vq_le_shiftedVariance Lemma ellF_Vq_le_shiftedVariance in the paper ↗

The public real second moment is bounded by the complex shifted-variance quantity. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma h :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hh :
0 < h
Vq kappa sigma (ellF sigma h)
≤ shiftedVariance kappa sigma (𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ)))))
Proof (Lean source)
-- @node: ellF_Vq_le_shiftedVariance lemma ellF_Vq_le_shiftedVariance (kappa sigma h : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hh : 0 < h) : Vq kappa sigma (ellF sigma h) ≤ shiftedVariance kappa sigma (𝓕⁻ (inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ))))) := by let G := inverseGaussian sigma (𝓕 (fun t => (qF h t : ℂ))) have hGi : Integrable G := qF_inverse_multiplier_integrable sigma h hh have hg : Measurable (𝓕⁻ G) := by have hc : Continuous (𝓕 G) := VectorFourier.fourierIntegral_continuous Real.continuous_fourierChar (by fun_prop) hGi change Measurable (fun v => 𝓕⁻ G v) simp_rw [Real.fourierInv_eq_fourier_neg] exact (hc.comp continuous_neg).measurable have hv := shiftedVariance_realPart_le (𝓕⁻ G) kappa sigma hg (qF_inverseGaussian_joint_integrable kappa sigma h hkappa hh) rw [ellF_Vq_integral kappa sigma h hkappa.1] simpa only [shiftedVariance, Complex.norm_real, Real.norm_eq_abs, sq_abs, ellF_eq_inverseGaussian_real] using hv
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellF_Vq_le_shiftedVariance · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierQuantitative.lean:284

The promoted specialization gives the full uniform inverse-variance envelope in S7. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
h ∈ Ioc (0 : ℝ) (1/4) :
sigma ∈ Icc (0 : ℝ) (1/4) :
Vq kappa sigma (ellF sigma h)
≤ C * h^(kappa+1) * (1+sigma/h)^10 * exp (36*(sigma/h)^2)
Proof (Lean source)
-- @node: ellF_variance_bound lemma ellF_variance_bound (kappa : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ h ∈ Ioc (0 : ℝ) (1/4), ∀ sigma ∈ Icc (0 : ℝ) (1/4), Vq kappa sigma (ellF sigma h) ≤ C * h^(kappa+1) * (1+sigma/h)^10 * exp (36*(sigma/h)^2) := by obtain ⟨a, b, ha, hb, hprofile⟩ := qF_fourier_profile_bounds let C := 32*(6/pi)*(3*a^2 + (2*pi)⁻¹^2 * (b+12*pi*a)^2) have hC : 0 ≤ C := by dsimp [C]; positivity refine ⟨C+1, by positivity, ?_⟩ intro h hh sigma hsigma obtain ⟨hinv, hinvD⟩ := qF_inverseGaussian_integrable sigma h hh.1 have hbound := inverseGaussian_shiftedVariance_le (𝓕 (fun t => (qF h t : ℂ))) kappa sigma h a b ((qF_fourier_contDiff h hh.1).of_le (by norm_num)) (qF_fourier_hasCompactSupport h hh.1) hkappa.1 hkappa.2 hh.1 hh.2 hsigma.1 ha hb (qF_fourier_support_radius h hh.1) (hprofile h hh.1).1 (hprofile h hh.1).2 hinv hinvD (qF_inverseGaussian_joint_integrable kappa sigma h hkappa hh.1) apply (ellF_Vq_le_shiftedVariance kappa sigma h hkappa hh.1).trans (hbound.trans _) apply mul_le_mul_of_nonneg_right _ (Real.exp_pos _).le apply mul_le_mul_of_nonneg_right _ (by positivity) exact mul_le_mul_of_nonneg_right (by dsimp [C]; linarith) (Real.rpow_nonneg hh.1.le _)

S1 and S7 assemble the observable certificate in S8, with its stochastic term kept under one square root for subsequent tuning. All constants are independent of n, h and sigma. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
n :
ℕ
0 < n
h ∈ Ioc (0 : ℝ) (1/4) :
sigma ∈ Icc (0 : ℝ) (1/4) :
unitAq beta kappa n sigma ⟨qF h, ellF sigma h⟩
≤ C * (h^beta + sqrt (h^(-kappa-1) * (1+sigma/h)^10 * exp (36*(sigma/h)^2) / n) + sqrt (1/(n : ℝ)))
Proof (Lean source)
-- @node: qF_certificate_bound lemma qF_certificate_bound (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 0 < n → ∀ h ∈ Ioc (0 : ℝ) (1/4), ∀ sigma ∈ Icc (0 : ℝ) (1/4), unitAq beta kappa n sigma ⟨qF h, ellF sigma h⟩ ≤ C * (h^beta + Real.sqrt (h^(-kappa-1) * (1+sigma/h)^10 * exp (36*(sigma/h)^2) / n) + Real.sqrt (1/(n : ℝ))) := by obtain ⟨Cb, hCb, hbias⟩ := qF_bias_bound beta kappa hbeta hkappa obtain ⟨Cv, hCv, hvar⟩ := ellF_variance_bound kappa hkappa let c := weightMoment kappa (qF 1) have hc : 0 < c := qF_weightMoment_pos kappa hkappa.1 1 let D := (192/c)*Real.sqrt Cv have hD : 0 ≤ D := by dsimp [D]; positivity let E := 2*Real.sqrt 3 have hE : 0 ≤ E := by dsimp [E]; positivity refine ⟨Cb+D+E+1, by positivity, ?_⟩ intro n hn h hh sigma hsigma have hnR : (0 : ℝ) < n := by exact_mod_cast hn have hhR : 0 < h := hh.1 let H := h^(kappa+1) let X := (1+sigma/h)^10 * exp (36*(sigma/h)^2) have hH : 0 < H := Real.rpow_pos_of_pos hhR _ have hX : 0 ≤ X := by dsimp [X]; positivity have hlo : H*c ≤ weightMoment kappa (qF h) := qF_weightMoment_lower kappa h ⟨hkappa.1, by linarith [hkappa.2]⟩ ⟨hh.1, by linarith [hh.2]⟩ have hcoef : 12 / unitbq kappa (qF h) ≤ (192/c)/H := by calc _ = 192 / weightMoment kappa (qF h) := by unfold unitbq; ring _ ≤ 192/(H*c) := div_le_div_of_nonneg_left (by norm_num) (mul_pos hH hc) hlo _ = _ := by ring have hv : Real.sqrt (Vq kappa sigma (ellF sigma h) / n) ≤ Real.sqrt (Cv*H*X/n) := by apply Real.sqrt_le_sqrt exact div_le_div_of_nonneg_right (by simpa only [H, X, mul_assoc] using hvar h hh sigma hsigma) hnR.le have hscale : Real.sqrt (Cv*H*X/n) / H = Real.sqrt Cv * Real.sqrt (h^(-kappa-1)*X/n) := by have hp : h^(-kappa-1) = H⁻¹ := by dsimp [H] rw [show -kappa-1 = -(kappa+1) by ring, Real.rpow_neg hhR.le] rw [hp] have hsH : Real.sqrt (H^(2 : ℕ)) = H := Real.sqrt_sq hH.le calc _ = Real.sqrt ((Cv*H*X/n)/H^(2 : ℕ)) := by simpa only [hsH] using (Real.sqrt_div (show 0 ≤ Cv*H*X/n by positivity) (H^(2 : ℕ))).symm _ = _ := by have he : (Cv*H*X/n)/H^(2 : ℕ) = Cv*(H⁻¹*X/n) := by field_simp rw [he, Real.sqrt_mul hCv.le] have hnoise : (12 / unitbq kappa (qF h)) * Real.sqrt (Vq kappa sigma (ellF sigma h) / n) ≤ D * Real.sqrt (h^(-kappa-1)*X/n) := by calc _ ≤ ((192/c)/H) * Real.sqrt (Cv*H*X/n) := mul_le_mul hcoef hv (Real.sqrt_nonneg _) (by positivity) _ = (192/c) * (Real.sqrt (Cv*H*X/n) / H) := by ring _ = _ := by rw [hscale]; dsimp [D]; ring have hfreq : 2*Real.sqrt (3/(n : ℝ)) = E*Real.sqrt (1/(n : ℝ)) := by rw [show (3 : ℝ)/n = 3*(1/n) by ring, Real.sqrt_mul (by norm_num : (0 : ℝ) ≤ 3)] dsimp [E] ring have hA : unitAq beta kappa n sigma ⟨qF h, ellF sigma h⟩ ≤ Cb*h^beta + D*Real.sqrt (h^(-kappa-1)*X/n) + E*Real.sqrt (1/(n : ℝ)) := by unfold unitAq dsimp only rw [hfreq] exact add_le_add (add_le_add (hbias h hh) hnoise) le_rfl have ht : 0 ≤ h^beta := Real.rpow_nonneg hhR.le _ have hcb : Cb ≤ Cb+D+E+1 := by linarith have hd : D ≤ Cb+D+E+1 := by linarith have he : E ≤ Cb+D+E+1 := by linarith have hsum : Cb*h^beta + D*Real.sqrt (h^(-kappa-1)*X/n) + E*Real.sqrt (1/(n : ℝ)) ≤ (Cb+D+E+1) * (h^beta + Real.sqrt (h^(-kappa-1)*X/n) + Real.sqrt (1/(n : ℝ))) := by nlinarith [mul_le_mul_of_nonneg_right hcb ht, mul_le_mul_of_nonneg_right hd (Real.sqrt_nonneg (h^(-kappa-1)*X/n)), mul_le_mul_of_nonneg_right he (Real.sqrt_nonneg (1/(n : ℝ)))] simpa only [X, mul_assoc] using hA.trans hsum
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.FourierTuning 8 declarations Uniform logarithmic tuning for the Fourier dictionary.

Uniform logarithmic tuning for the Fourier dictionary.

theorem fourier_log_tuning_bound Lemma fourier_log_tuning_bound in the paper ↗

The logarithmic factor in S9 is uniformly bounded for effective sample size at least one. The fixed bandwidth multiplier twelve leaves three quarters of the exponential available for absorbing the logarithmic powers. Under the stated conditions. This is the stated conclusion.

Formal statement
d :
ℝ
hd :
d ≤ 5
∃ C : ℝ,
0 < C
conclusion 1
N :
ℝ
1 ≤ N
(log (exp 1 + N))^(d/2) * (1 + sqrt (log (exp 1 + N))/12)^10 * exp (log (exp 1 + N)/4) / N
≤ C
Proof (Lean source)
-- @node: fourier_log_tuning_bound lemma fourier_log_tuning_bound (d : ℝ) (hd : d ≤ 5) : ∃ C : ℝ, 0 < C ∧ ∀ N : ℝ, 1 ≤ N → (log (exp 1 + N))^(d/2) * (1 + sqrt (log (exp 1 + N))/12)^10 * exp (log (exp 1 + N)/4) / N ≤ C := by let K : ℝ := (8 : ℕ).factorial * (4/3 : ℝ)^8 refine ⟨1024*K*(exp 1+1), by dsimp [K]; positivity, ?_⟩ intro N hN let S := log (exp 1 + N) have hN0 : 0 < N := by linarith have hS : 1 ≤ S := by dsimp [S] simpa only [Real.log_exp] using Real.log_le_log (Real.exp_pos 1) (show exp 1 ≤ exp 1 + N by linarith) have hS0 : 0 ≤ S := by linarith have hsqrt : 1 ≤ sqrt S := by simpa using Real.sqrt_le_sqrt hS have hdim : S^(d/2) ≤ S^3 := by rw [← Real.rpow_natCast] exact Real.rpow_le_rpow_of_exponent_le hS (by linarith) have hpoly : (1+sqrt S/12)^10 ≤ 1024*S^5 := by calc _ ≤ (2*sqrt S)^10 := pow_le_pow_left₀ (by positivity) (by linarith) 10 _ = 1024*S^5 := by rw [mul_pow, show (sqrt S)^10 = ((sqrt S)^2)^5 by ring, Real.sq_sqrt hS0] norm_num have hseries := Real.pow_div_factorial_le_exp (3*S/4) (by positivity) 8 have habsorb : S^8 ≤ K*exp (3*S/4) := by dsimp [K] norm_num [factorial] at hseries ⊢ nlinarith have hwhole : S^(d/2)*(1+sqrt S/12)^10*exp (S/4) ≤ 1024*K*(exp 1+N) := by calc _ ≤ S^3*(1024*S^5)*exp (S/4) := mul_le_mul_of_nonneg_right (mul_le_mul hdim hpoly (by positivity) (by positivity)) (Real.exp_pos _).le _ = 1024*S^8*exp (S/4) := by ring _ ≤ 1024*(K*exp (3*S/4))*exp (S/4) := by gcongr _ = 1024*K*exp S := by calc _ = (1024*K)*(exp (3*S/4)*exp (S/4)) := by ring _ = _ := by rw [← Real.exp_add]; congr 2 <;> ring _ = _ := by rw [Real.exp_log (by positivity : 0 < exp 1+N)] apply (div_le_iff₀ hN0).mpr have harg : exp 1+N ≤ (exp 1+1)*N := by nlinarith [Real.exp_pos 1] exact hwhole.trans (by calc _ ≤ (1024*K)*((exp 1+1)*N) := mul_le_mul_of_nonneg_left harg (by dsimp [K]; positivity) _ = _ := by ring)
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourier_log_tuning_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierTuning.lean:11
theorem fourierScale_pos

The Fourier scale is positive whenever the noise scale is positive. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma :
ℝ
n :
ℕ
hsigma :
0 < sigma
0 < fourierScale beta kappa sigma n
Proof (Lean source)
-- @node: fourierScale_pos lemma fourierScale_pos (beta kappa sigma : ℝ) (n : ℕ) (hsigma : 0 < sigma) : 0 < fourierScale beta kappa sigma n := by have hS : 0 < log (exp 1 + n*sigma^effDim beta kappa) := by apply Real.log_pos have he : 1 < exp 1 := by simpa using Real.exp_lt_exp.mpr zero_lt_one have hp : 0 ≤ (n : ℝ)*sigma^effDim beta kappa := by positivity linarith exact div_pos hsigma (Real.sqrt_pos.mpr hS)
theorem fourierScale_power_balance

The effective sample size exactly balances the power of the Fourier scale against its logarithmic denominator. This is the algebraic normalization used in S9. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma :
ℝ
n :
ℕ
hn :
0 < n
hsigma :
0 < sigma
(fourierScale beta kappa sigma n)^(-effDim beta kappa) / n
= (log (exp 1+n*sigma^effDim beta kappa))^(effDim beta kappa/2) / (n*sigma^effDim beta kappa)
Proof (Lean source)
-- @node: fourierScale_power_balance lemma fourierScale_power_balance (beta kappa sigma : ℝ) (n : ℕ) (hn : 0 < n) (hsigma : 0 < sigma) : (fourierScale beta kappa sigma n)^(-effDim beta kappa) / n = (log (exp 1+n*sigma^effDim beta kappa))^(effDim beta kappa/2) / (n*sigma^effDim beta kappa) := by have hnR : (0 : ℝ) < n := by exact_mod_cast hn have hS : 0 < log (exp 1 + n*sigma^effDim beta kappa) := by apply Real.log_pos have he : 1 < exp 1 := by simpa using Real.exp_lt_exp.mpr zero_lt_one have hp : 0 ≤ (n : ℝ)*sigma^effDim beta kappa := by positivity linarith rw [fourierScale, Real.rpow_neg (by positivity), Real.div_rpow hsigma.le (Real.sqrt_nonneg _), ← Real.rpow_div_two_eq_sqrt _ hS.le] field_simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourierScale_power_balance · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierTuning.lean:82
theorem fourier_intermediate_stochastic_bound

At twelve times the Fourier scale, S9 bounds the stochastic term by the bandwidth bias. The bound is uniform in every effective sample size at least one. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
n :
ℕ
0 < n
sigma :
ℝ
0 < sigma
1 ≤ (n : ℝ)*sigma^effDim beta kappa
sqrt ((12*fourierScale beta kappa sigma n)^(-kappa-1) * (1+sigma/(12*fourierScale beta kappa sigma n))^10 * exp (36*(sigma/(12*fourierScale beta kappa sigma n))^2) / n)
≤ C*(12*fourierScale beta kappa sigma n)^beta
Proof (Lean source)
-- @node: fourier_intermediate_stochastic_bound lemma fourier_intermediate_stochastic_bound (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 0 < n → ∀ sigma : ℝ, 0 < sigma → 1 ≤ (n : ℝ)*sigma^effDim beta kappa → sqrt ((12*fourierScale beta kappa sigma n)^(-kappa-1) * (1+sigma/(12*fourierScale beta kappa sigma n))^10 * exp (36*(sigma/(12*fourierScale beta kappa sigma n))^2) / n) ≤ C*(12*fourierScale beta kappa sigma n)^beta := by have hd : 0 < effDim beta kappa := by unfold effDim; linarith [hbeta.1, hkappa.1] obtain ⟨C, hC, hbound⟩ := fourier_log_tuning_bound (effDim beta kappa) (by unfold effDim; linarith [hbeta.2, hkappa.2]) refine ⟨Real.sqrt C, Real.sqrt_pos.mpr hC, ?_⟩ intro n hn sigma hsigma hN let F := fourierScale beta kappa sigma n let h := 12*F let S := log (exp 1+n*sigma^effDim beta kappa) have hF : 0 < F := fourierScale_pos beta kappa sigma n hsigma have hh : 0 < h := by dsimp [h]; positivity have hS : 0 < S := by dsimp [S] apply Real.log_pos have he : 1 < exp 1 := by simpa using Real.exp_lt_exp.mpr zero_lt_one linarith have hratio : sigma/h = sqrt S/12 := by dsimp [h, F, fourierScale, S] field_simp have hexp : 36*(sigma/h)^2 = S/4 := by rw [hratio, div_pow, Real.sq_sqrt hS.le] ring have hpower : h^(-kappa-1) = (h^beta)^2*h^(-effDim beta kappa) := by rw [← Real.rpow_two, ← Real.rpow_mul hh.le, ← Real.rpow_add hh] congr 1 unfold effDim ring have hneg : h^(-effDim beta kappa)/n ≤ S^(effDim beta kappa/2)/ (n*sigma^effDim beta kappa) := by rw [← fourierScale_power_balance beta kappa sigma n hn hsigma] apply div_le_div_of_nonneg_right _ (Nat.cast_nonneg n) exact Real.rpow_le_rpow_of_nonpos hF (by dsimp [h]; linarith) (by linarith) have hsquared : h^(-kappa-1)*(1+sigma/h)^10* exp (36*(sigma/h)^2)/n ≤ (h^beta)^2*C := by rw [hpower, hexp, hratio] calc _ = (h^beta)^2 * ((h^(-effDim beta kappa)/n)* (1+sqrt S/12)^10*exp (S/4)) := by ring _ ≤ (h^beta)^2 * ((S^(effDim beta kappa/2)/ (n*sigma^effDim beta kappa))*(1+sqrt S/12)^10*exp (S/4)) := by gcongr _ ≤ (h^beta)^2*C := by apply mul_le_mul_of_nonneg_left _ (sq_nonneg _) dsimp only [S] convert hbound ((n : ℝ)*sigma^effDim beta kappa) hN using 1 <;> first | rfl | ring calc _ ≤ sqrt ((h^beta)^2*C) := Real.sqrt_le_sqrt hsquared _ = _ := by rw [Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq (by positivity)]; ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourier_intermediate_stochastic_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierTuning.lean:101
theorem fourierScale_inverse_power_bound

Dropping the nonnegative noise multipliers from S9 bounds the inverse effective bandwidth. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
n :
ℕ
0 < n
sigma :
ℝ
0 < sigma
1 ≤ (n : ℝ)*sigma^effDim beta kappa
(fourierScale beta kappa sigma n)^(-effDim beta kappa)/n ≤ C
Proof (Lean source)
-- @node: fourierScale_inverse_power_bound lemma fourierScale_inverse_power_bound (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 0 < n → ∀ sigma : ℝ, 0 < sigma → 1 ≤ (n : ℝ)*sigma^effDim beta kappa → (fourierScale beta kappa sigma n)^(-effDim beta kappa)/n ≤ C := by obtain ⟨C, hC, hbound⟩ := fourier_log_tuning_bound (effDim beta kappa) (by unfold effDim; linarith [hbeta.2, hkappa.2]) refine ⟨C, hC, ?_⟩ intro n hn sigma hsigma hN rw [fourierScale_power_balance beta kappa sigma n hn hsigma] let S := log (exp 1 + n*sigma^effDim beta kappa) have hS : 0 ≤ S := by apply Real.log_nonneg have he : 1 < exp 1 := by simpa using Real.exp_lt_exp.mpr zero_lt_one linarith have hp : 1 ≤ (1+sqrt S/12)^10 := one_le_pow₀ (by linarith [Real.sqrt_nonneg S]) have he : 1 ≤ exp (S/4) := Real.one_le_exp_iff.mpr (by positivity) calc _ ≤ S^(effDim beta kappa/2)*(1+sqrt S/12)^10*exp (S/4)/ (n*sigma^effDim beta kappa) := by apply div_le_div_of_nonneg_right _ (by positivity) calc _ = S^(effDim beta kappa/2)*1*1 := by ring _ ≤ _ := mul_le_mul (mul_le_mul_of_nonneg_left hp (by positivity)) he (by norm_num) (by positivity) _ ≤ C := hbound _ hN
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourierScale_inverse_power_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierTuning.lean:160
theorem fourierScale_le_sigma

The Fourier scale is no larger than the positive noise scale. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma :
ℝ
n :
ℕ
hsigma :
0 < sigma
fourierScale beta kappa sigma n ≤ sigma
Proof (Lean source)
-- @node: fourierScale_le_sigma lemma fourierScale_le_sigma (beta kappa sigma : ℝ) (n : ℕ) (hsigma : 0 < sigma) : fourierScale beta kappa sigma n ≤ sigma := by have hS : 1 ≤ log (exp 1+n*sigma^effDim beta kappa) := by simpa only [Real.log_exp] using Real.log_le_log (Real.exp_pos 1) (show exp 1 ≤ exp 1+n*sigma^effDim beta kappa by have hp : 0 ≤ (n : ℝ)*sigma^effDim beta kappa := by positivity linarith) apply (div_le_iff₀ (Real.sqrt_pos.mpr (by linarith : 0 < log (exp 1+n*sigma^effDim beta kappa)))).mpr have hr : 1 ≤ sqrt (log (exp 1+n*sigma^effDim beta kappa)) := by simpa using Real.sqrt_le_sqrt hS nlinarith
theorem fourierScale_frequency_bound

The unweighted frequency error is controlled by the Fourier bias throughout intermediate tuning, using the inverse-power consequence of S9. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
n :
ℕ
0 < n
sigma ∈ Ioc (0 : ℝ) (1/4) :
1 ≤ (n : ℝ)*sigma^effDim beta kappa
sqrt (1/(n : ℝ)) ≤ C*(fourierScale beta kappa sigma n)^beta
Proof (Lean source)
-- @node: fourierScale_frequency_bound lemma fourierScale_frequency_bound (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 0 < n → ∀ sigma ∈ Ioc (0 : ℝ) (1/4), 1 ≤ (n : ℝ)*sigma^effDim beta kappa → sqrt (1/(n : ℝ)) ≤ C*(fourierScale beta kappa sigma n)^beta := by obtain ⟨C, hC, hbound⟩ := fourierScale_inverse_power_bound beta kappa hbeta hkappa refine ⟨Real.sqrt C, Real.sqrt_pos.mpr hC, ?_⟩ intro n hn sigma hsigma hN let F := fourierScale beta kappa sigma n have hnR : (0 : ℝ) < n := by exact_mod_cast hn have hF : 0 < F := fourierScale_pos beta kappa sigma n hsigma.1 have hF1 : F ≤ 1 := (fourierScale_le_sigma beta kappa sigma n hsigma.1).trans (by linarith [hsigma.2]) have hb := hbound n hn sigma hsigma.1 hN have hpow : 0 < F^effDim beta kappa := by positivity rw [Real.rpow_neg hF.le] at hb have hbal : 1/(n : ℝ) ≤ C*F^effDim beta kappa := by have hmul := mul_le_mul_of_nonneg_right ((div_le_iff₀ hnR).mp hb) hpow.le have he : (F^effDim beta kappa)⁻¹ * F^effDim beta kappa = 1 := inv_mul_cancel₀ hpow.ne' rw [he] at hmul apply (div_le_iff₀ hnR).mpr nlinarith have hsmall : F^effDim beta kappa ≤ (F^beta)^2 := by rw [← Real.rpow_two, ← Real.rpow_mul hF.le] apply Real.rpow_le_rpow_of_exponent_ge hF hF1 unfold effDim linarith [hkappa.1] calc _ ≤ sqrt (C*(F^beta)^2) := Real.sqrt_le_sqrt (hbal.trans (mul_le_mul_of_nonneg_left hsmall hC.le)) _ = _ := by rw [Real.sqrt_mul hC.le, Real.sqrt_sq (by positivity)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourierScale_frequency_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierTuning.lean:204
theorem qF_intermediate_certificate_bound

S8 and S9 control the certificate at any bandwidth rounded up from twelve times the Fourier scale, provided the rounded bandwidth is in the public window. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
n :
ℕ
0 < n
sigma ∈ Ioc (0 : ℝ) (1/4) :
1 ≤ (n : ℝ)*sigma^effDim beta kappa
h ∈ Ioc (0 : ℝ) (1/4) :
12*fourierScale beta kappa sigma n ≤ h
h ≤ 24*fourierScale beta kappa sigma n
unitAq beta kappa n sigma ⟨qF h, ellF sigma h⟩ ≤ C*(fourierScale beta kappa sigma n)^beta
Proof (Lean source)
-- @node: qF_intermediate_certificate_bound lemma qF_intermediate_certificate_bound (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 0 < n → ∀ sigma ∈ Ioc (0 : ℝ) (1/4), 1 ≤ (n : ℝ)*sigma^effDim beta kappa → ∀ h ∈ Ioc (0 : ℝ) (1/4), 12*fourierScale beta kappa sigma n ≤ h → h ≤ 24*fourierScale beta kappa sigma n → unitAq beta kappa n sigma ⟨qF h, ellF sigma h⟩ ≤ C*(fourierScale beta kappa sigma n)^beta := by obtain ⟨C, hC, hcert⟩ := qF_certificate_bound beta kappa hbeta hkappa obtain ⟨D, hD, hstoch⟩ := fourier_intermediate_stochastic_bound beta kappa hbeta hkappa obtain ⟨E, hE, hfreq⟩ := fourierScale_frequency_bound beta kappa hbeta hkappa refine ⟨C*(24^beta+D*12^beta+E), by positivity, ?_⟩ intro n hn sigma hsigma hN h hh hlo hhi have hsigma0 : 0 ≤ sigma := hsigma.1.le have hh0 : 0 < h := hh.1 let F := fourierScale beta kappa sigma n have hF : 0 < F := fourierScale_pos beta kappa sigma n hsigma.1 have hb : h^beta ≤ 24^beta*F^beta := by calc _ ≤ (24*F)^beta := Real.rpow_le_rpow hh.1.le hhi (by linarith [hbeta.1]) _ = _ := Real.mul_rpow (by norm_num) hF.le have hs : sqrt (h^(-kappa-1)*(1+sigma/h)^10* exp (36*(sigma/h)^2)/n) ≤ D*12^beta*F^beta := by calc _ ≤ sqrt ((12*F)^(-kappa-1)*(1+sigma/(12*F))^10* exp (36*(sigma/(12*F))^2)/n) := by have hratio : sigma/h ≤ sigma/(12*F) := div_le_div_of_nonneg_left hsigma.1.le (by positivity) hlo apply Real.sqrt_le_sqrt apply div_le_div_of_nonneg_right _ (Nat.cast_nonneg n) apply mul_le_mul _ _ (by positivity) (by positivity) · exact mul_le_mul (Real.rpow_le_rpow_of_nonpos (by positivity) hlo (by linarith [hkappa.1])) (pow_le_pow_left₀ (by positivity) (by linarith) 10) (by positivity) (by positivity) · apply Real.exp_le_exp.mpr exact mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (by positivity) hratio 2) (by norm_num) _ ≤ D*(12*F)^beta := hstoch n hn sigma hsigma.1 hN _ = _ := by rw [Real.mul_rpow (by norm_num : (0 : ℝ) ≤ 12) hF.le]; ring have hf := hfreq n hn sigma hsigma hN calc _ ≤ C*(h^beta+sqrt (h^(-kappa-1)*(1+sigma/h)^10* exp (36*(sigma/h)^2)/n)+sqrt (1/(n : ℝ))) := hcert n hn h hh sigma ⟨hsigma.1.le, hsigma.2⟩ _ ≤ C*(24^beta*F^beta+D*12^beta*F^beta+E*F^beta) := mul_le_mul_of_nonneg_left (add_le_add (add_le_add hb hs) hf) hC.le _ = _ := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_intermediate_certificate_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierTuning.lean:240
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.FourierWitness 15 declarations Fourier dictionary tuning and comparison witness.

Fourier dictionary tuning and comparison witness.

theorem dyadicBandwidth_eq_inv_pow Lemma dyadicBandwidth_eq_inv_pow in the paper ↗

The declared integer-power bandwidth is the usual decreasing dyadic sequence. This is the stated conclusion.

Formal statement
k :
ℕ
dyadicBandwidth k = ((2 : ℝ) ^ k)⁻¹
Proof (Lean source)
-- @node: dyadicBandwidth_eq_inv_pow lemma dyadicBandwidth_eq_inv_pow (k : ℕ) : dyadicBandwidth k = ((2 : ℝ) ^ k)⁻¹ := by simp [dyadicBandwidth, zpow_neg]
CausalSmith.Stat.NoisydoseWeakdesignTransition.dyadicBandwidth_eq_inv_pow · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:11
theorem dyadicBandwidth_round_up Lemma dyadicBandwidth_round_up in the paper ↗

Rounding up to a dyadic bandwidth enlarges a positive scale by less than two. Under the stated conditions. This is the stated conclusion.

Formal statement
h :
ℝ
hh :
0 < h
hupper :
h ≤ 1
∃ k : ℕ,
conclusion 1
conclusion 2
Proof (Lean source)
-- @node: dyadicBandwidth_round_up lemma dyadicBandwidth_round_up (h : ℝ) (hh : 0 < h) (hupper : h ≤ 1) : ∃ k : ℕ, h ≤ dyadicBandwidth k ∧ dyadicBandwidth k < 2*h := by obtain ⟨k, hlo, hhi⟩ := exists_nat_pow_near_of_lt_one hh hupper (by norm_num : (0 : ℝ) < 1/2) (by norm_num : (1 / 2 : ℝ) < 1) have he (j : ℕ) : (1 / 2 : ℝ)^j = dyadicBandwidth j := by rw [dyadicBandwidth_eq_inv_pow] simp [one_div, inv_pow] refine ⟨k, by simpa only [he] using hhi, ?_⟩ rw [pow_succ, he] at hlo linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.dyadicBandwidth_round_up · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:17
theorem fourier_mem_weightDictionary_of_window

Every dyadic bandwidth in the declared numerical window is a Fourier dictionary member. The lower bandwidth cutoff also implies the finite index cutoff. Under the stated conditions. This is the stated conclusion.

Formal statement
n k :
ℕ
sigma :
ℝ
hn :
0 < n
hlo :
(n : ℝ) ^ (-2 : ℝ) ≤ dyadicBandwidth k
hhi :
dyadicBandwidth k ≤ 1/4
DictTag.fourier k ∈ weightDictionary n sigma
Proof (Lean source)
-- @node: fourier_mem_weightDictionary_of_window lemma fourier_mem_weightDictionary_of_window (n k : ℕ) (sigma : ℝ) (hn : 0 < n) (hlo : (n : ℝ) ^ (-2 : ℝ) ≤ dyadicBandwidth k) (hhi : dyadicBandwidth k ≤ 1/4) : DictTag.fourier k ∈ weightDictionary n sigma := by have hnR : (0 : ℝ) < n := by exact_mod_cast hn have hpow : (2 : ℝ) ^ k ≤ (n : ℝ) ^ 2 := by rw [dyadicBandwidth_eq_inv_pow] at hlo rw [Real.rpow_neg hnR.le, Real.rpow_two] at hlo exact (inv_le_inv₀ (sq_pos_of_pos hnR) (by positivity)).mp hlo have hkpow : ∀ j : ℕ, (j : ℝ) ≤ (2 : ℝ) ^ j := by intro j induction j with | zero => norm_num | succ k ih => rw [pow_succ, Nat.cast_add, Nat.cast_one] have hp : (1 : ℝ) ≤ 2^k := one_le_pow₀ (by norm_num) linarith have hk : k < n^2+1 := by have : k ≤ n^2 := by exact_mod_cast (hkpow k).trans hpow omega simp only [weightDictionary, List.mem_toFinset, dictionaryList, List.mem_append, List.mem_singleton, List.mem_map, List.mem_filter, List.mem_range] exact inl (inr ⟨k, ⟨hk, by simpa using intro hlo hhi⟩, rfl⟩)
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourier_mem_weightDictionary_of_window · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:30
theorem fourier_dictionary_round_up

A scale within the window can be rounded up to an available dictionary bandwidth. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
sigma h :
ℝ
hn :
0 < n
hh :
0 < h
hlo :
(n : ℝ) ^ (-2 : ℝ) ≤ h
hhi :
h ≤ 1 / 8
∃ k : ℕ,
conclusion 1
DictTag.fourier k ∈ weightDictionary n sigma
conclusion 2
conclusion 3
Proof (Lean source)
-- @node: fourier_dictionary_round_up lemma fourier_dictionary_round_up (n : ℕ) (sigma h : ℝ) (hn : 0 < n) (hh : 0 < h) (hlo : (n : ℝ) ^ (-2 : ℝ) ≤ h) (hhi : h ≤ 1 / 8) : ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ h ≤ dyadicBandwidth k ∧ dyadicBandwidth k < 2*h := by obtain ⟨k, hklo, hkhi⟩ := dyadicBandwidth_round_up h hh (by linarith) exact ⟨k, fourier_mem_weightDictionary_of_window n k sigma hn (hlo.trans hklo) (by linarith), hklo, hkhi⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourier_dictionary_round_up · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:57
theorem fourier_stochastic_antitone Lemma fourier_stochastic_antitone in the paper ↗

Enlarging the bandwidth decreases every factor in the stochastic S8 bound. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
n :
ℕ
h H :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 ≤ sigma
hh :
0 < h
hhH :
h ≤ H
sqrt (H^(-kappa-1) * (1+sigma/H)^10 * exp (36*(sigma/H)^2) / n)
≤ sqrt (h^(-kappa-1) * (1+sigma/h)^10 * exp (36*(sigma/h)^2) / n)
Proof (Lean source)
-- @node: fourier_stochastic_antitone lemma fourier_stochastic_antitone (kappa sigma : ℝ) (n : ℕ) (h H : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 ≤ sigma) (hh : 0 < h) (hhH : h ≤ H) : sqrt (H^(-kappa-1) * (1+sigma/H)^10 * exp (36*(sigma/H)^2) / n) ≤ sqrt (h^(-kappa-1) * (1+sigma/h)^10 * exp (36*(sigma/h)^2) / n) := by have hH : 0 < H := hh.trans_le hhH have hratio : sigma/H ≤ sigma/h := div_le_div_of_nonneg_left hsigma hh hhH have hbase : H^(-kappa-1) ≤ h^(-kappa-1) := Real.rpow_le_rpow_of_nonpos hh hhH (by linarith) apply Real.sqrt_le_sqrt apply div_le_div_of_nonneg_right _ (Nat.cast_nonneg n) apply mul_le_mul _ _ (by positivity) (by positivity) · exact mul_le_mul hbase (pow_le_pow_left₀ (by positivity) (by linarith) 10) (by positivity) (by positivity) · apply Real.exp_le_exp.mpr exact mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (by positivity) hratio 2) (by norm_num)
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourier_stochastic_antitone · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:67
theorem directScale_power_balance

The direct scale balances squared bias against inverse weighted sample size. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
hn :
0 < n
hd :
0 < effDim beta kappa
directScale beta kappa n ^ effDim beta kappa = 1/(n : ℝ)
Proof (Lean source)
-- @node: directScale_power_balance lemma directScale_power_balance (beta kappa : ℝ) (n : ℕ) (hn : 0 < n) (hd : 0 < effDim beta kappa) : directScale beta kappa n ^ effDim beta kappa = 1/(n : ℝ) := by have hnR : (0 : ℝ) < n := by exact_mod_cast hn unfold directScale rw [← Real.rpow_mul hnR.le] rw [show (-1 / effDim beta kappa) * effDim beta kappa = -1 by field_simp, Real.rpow_neg_one] simp only [one_div]
CausalSmith.Stat.NoisydoseWeakdesignTransition.directScale_power_balance · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:88
theorem directScale_variance_balance

The exact S8 stochastic factor at the direct scale, before its bounded noise multiplier. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
hn :
0 < n
hd :
0 < effDim beta kappa
directScale beta kappa n ^ (-kappa-1) / n = (directScale beta kappa n ^ beta)^2
Proof (Lean source)
-- @node: directScale_variance_balance lemma directScale_variance_balance (beta kappa : ℝ) (n : ℕ) (hn : 0 < n) (hd : 0 < effDim beta kappa) : directScale beta kappa n ^ (-kappa-1) / n = (directScale beta kappa n ^ beta)^2 := by have hh : 0 < directScale beta kappa n := by unfold directScale apply Real.rpow_pos_of_pos exact_mod_cast hn rw [div_eq_mul_inv, ← one_div (n : ℝ), ← directScale_power_balance beta kappa n hn hd, ← Real.rpow_add hh] rw [show -kappa-1+effDim beta kappa = beta*2 by unfold effDim; ring, Real.rpow_mul hh.le, Real.rpow_two]
CausalSmith.Stat.NoisydoseWeakdesignTransition.directScale_variance_balance · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:100
theorem directScale_frequency_bound

At the direct scale the unweighted sample-frequency term is smaller than the bias. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
hn :
0 < n
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
sqrt (1/(n : ℝ)) ≤ directScale beta kappa n ^ beta
Proof (Lean source)
-- @node: directScale_frequency_bound lemma directScale_frequency_bound (beta kappa : ℝ) (n : ℕ) (hn : 0 < n) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : sqrt (1/(n : ℝ)) ≤ directScale beta kappa n ^ beta := by have hd : 0 < effDim beta kappa := by unfold effDim; linarith [hbeta.1, hkappa.1] have hnR : (1 : ℝ) ≤ n := by exact_mod_cast hn have hh : 0 < directScale beta kappa n := Real.rpow_pos_of_pos (by linarith) _ have hh1 : directScale beta kappa n ≤ 1 := by unfold directScale exact Real.rpow_le_one_of_one_le_of_nonpos hnR (by exact div_nonpos_of_nonpos_of_nonneg (by norm_num) hd.le) have hpow : 1/(n : ℝ) ≤ (directScale beta kappa n ^ beta)^2 := by rw [← directScale_power_balance beta kappa n hn hd, ← Real.rpow_two, ← Real.rpow_mul hh.le] apply Real.rpow_le_rpow_of_exponent_ge hh hh1 unfold effDim linarith [hkappa.1] exact (Real.sqrt_le_sqrt hpow).trans_eq (Real.sqrt_sq (by positivity))
CausalSmith.Stat.NoisydoseWeakdesignTransition.directScale_frequency_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:115
theorem qF_direct_certificate_bound

S8 at any rounded-up direct-regime bandwidth has the direct minimax rate. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
n :
ℕ
0 < n
h ∈ Ioc (0 : ℝ) (1 / 4) :
directScale beta kappa n ≤ h
h ≤ 2*directScale beta kappa n
sigma ∈ Icc (0 : ℝ) (1 / 4) :
sigma ≤ directScale beta kappa n
unitAq beta kappa n sigma ⟨qF h, ellF sigma h⟩ ≤ C * directScale beta kappa n ^ beta
Proof (Lean source)
-- @node: qF_direct_certificate_bound lemma qF_direct_certificate_bound (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ n : ℕ, 0 < n → ∀ h ∈ Ioc (0 : ℝ) (1 / 4), directScale beta kappa n ≤ h → h ≤ 2*directScale beta kappa n → ∀ sigma ∈ Icc (0 : ℝ) (1 / 4), sigma ≤ directScale beta kappa n → unitAq beta kappa n sigma ⟨qF h, ellF sigma h⟩ ≤ C * directScale beta kappa n ^ beta := by obtain ⟨C, hC, hcert⟩ := qF_certificate_bound beta kappa hbeta hkappa let D : ℝ := sqrt ((2 : ℝ) ^ 10 * exp 36) have hD : 0 ≤ D := Real.sqrt_nonneg _ refine ⟨C*(2^beta+D+1), by positivity, ?_⟩ intro n hn h hh hlo hhi sigma hsigma hslo let h0 := directScale beta kappa n have hd : 0 < effDim beta kappa := by unfold effDim; linarith [hbeta.1, hkappa.1] have hh0 : 0 < h0 := by dsimp [h0, directScale] apply Real.rpow_pos_of_pos exact_mod_cast hn have hb : h^beta ≤ 2^beta * h0^beta := by calc _ ≤ (2*h0)^beta := Real.rpow_le_rpow hh.1.le hhi (by linarith [hbeta.1]) _ = _ := Real.mul_rpow (by norm_num) hh0.le have hr : sigma/h0 ≤ 1 := (div_le_one hh0).mpr hslo have hr0 : 0 ≤ sigma/h0 := div_nonneg hsigma.1 hh0.le have hm : (1+sigma/h0)^10 * exp (36*(sigma/h0)^2) ≤ (2 : ℝ) ^ 10 * exp 36 := by apply mul_le_mul (pow_le_pow_left₀ (by positivity) (by linarith) 10) _ (by positivity) (by positivity) apply Real.exp_le_exp.mpr nlinarith [sq_nonneg (sigma/h0), mul_self_le_mul_self hr0 hr] have hs : sqrt (h^(-kappa-1)*(1+sigma/h)^10* exp (36*(sigma/h)^2)/n) ≤ D*h0^beta := by calc _ ≤ sqrt (h0^(-kappa-1)*(1+sigma/h0)^10* exp (36*(sigma/h0)^2)/n) := fourier_stochastic_antitone kappa sigma n h0 h hkappa.1 hsigma.1 hh0 hlo _ ≤ sqrt ((h0^beta)^2 * ((2 : ℝ) ^ 10 * exp 36)) := by apply Real.sqrt_le_sqrt calc _ = (h0^(-kappa-1)/n)*((1+sigma/h0)^10* exp (36*(sigma/h0)^2)) := by ring _ ≤ (h0^(-kappa-1)/n)*((2 : ℝ) ^ 10*exp 36) := mul_le_mul_of_nonneg_left hm (by positivity) _ = _ := by rw [directScale_variance_balance beta kappa n hn hd] _ = D*h0^beta := by rw [Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq (by positivity)] dsimp [D] ring have hf := directScale_frequency_bound beta kappa n hn hbeta hkappa calc _ ≤ C*(h^beta + sqrt (h^(-kappa-1)*(1+sigma/h)^10* exp (36*(sigma/h)^2)/n) + sqrt (1/(n : ℝ))) := hcert n hn h hh sigma hsigma _ ≤ C*(2^beta*h0^beta + D*h0^beta + h0^beta) := mul_le_mul_of_nonneg_left (add_le_add (add_le_add hb hs) hf) hC.le _ = _ := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.qF_direct_certificate_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:134
theorem directScale_dictionary_window

For large samples the direct scale fits the dyadic window, uniformly in the noise scale. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ n0 : ℕ,
0 < n0
conclusion 1
n ≥ n0 :
0 < directScale beta kappa n
(n : ℝ) ^ (-2 : ℝ) ≤ directScale beta kappa n
directScale beta kappa n ≤ 1/8
Proof (Lean source)
-- @node: directScale_dictionary_window lemma directScale_dictionary_window (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ n0 : ℕ, 0 < n0 ∧ ∀ n ≥ n0, 0 < directScale beta kappa n ∧ (n : ℝ) ^ (-2 : ℝ) ≤ directScale beta kappa n ∧ directScale beta kappa n ≤ 1/8 := by have hd : 1 ≤ effDim beta kappa := by unfold effDim; linarith [hbeta.1, hkappa.1] have hd0 : 0 < effDim beta kappa := by linarith have ht : Tendsto (directScale beta kappa) atTop (𝓝 0) := by change Tendsto (fun n : ℕ => (n : ℝ) ^ (-1/effDim beta kappa)) atTop (𝓝 0) simpa only [Function.comp_def, neg_div] using (tendsto_rpow_neg_atTop (one_div_pos.mpr hd0)).comp (tendsto_natCast_atTop_atTop (R := ℝ)) obtain ⟨N, hN⟩ := eventually_atTop.mp (ht.eventually (gt_mem_nhds (by norm_num : (0 : ℝ) < 1/8))) refine ⟨max N 1, by omega, ?_⟩ intro n hn have hn0 : 0 < n := by omega have hnR : (1 : ℝ) ≤ n := by exact_mod_cast hn0 refine ⟨Real.rpow_pos_of_pos (by linarith) _, ?_, (hN n (by omega)).le⟩ unfold directScale apply Real.rpow_le_rpow_of_exponent_le hnR apply (le_div_iff₀ hd0).mpr nlinarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.directScale_dictionary_window · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:193
theorem direct_fourier_dictionary_witness

The first frontier regime has an actual Fourier dictionary witness at the stated rate. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
conclusion 1
0 < C
conclusion 2
∃ n0 : ℕ,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1 / 4),
≤ directScale beta kappa n → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ unitScore beta kappa n sigma (.fourier k) ≤ C*frontierRate beta kappa sigma n
Proof (Lean source)
-- @node: direct_fourier_dictionary_witness lemma direct_fourier_dictionary_witness (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1 / 4), sigma ≤ directScale beta kappa n → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ unitScore beta kappa n sigma (.fourier k) ≤ C*frontierRate beta kappa sigma n := by obtain ⟨C, hC, hcert⟩ := qF_direct_certificate_bound beta kappa hbeta hkappa obtain ⟨n0, hn0, hwindow⟩ := directScale_dictionary_window beta kappa hbeta hkappa refine ⟨C, hC, n0, ?_⟩ intro n hn sigma hsigma hslo have hnpos : 0 < n := hn0.trans_le hn obtain ⟨hh0, hlo, hhi⟩ := hwindow n hn obtain ⟨k, hmem, hklo, hkhi⟩ := fourier_dictionary_round_up n sigma (directScale beta kappa n) hnpos hh0 hlo hhi refine ⟨k, hmem, ?_⟩ have hkh : dyadicBandwidth k ∈ Ioc (0 : ℝ) (1 / 4) := ⟨hh0.trans_le hklo, by linarith⟩ have hscore := hcert n hnpos (dyadicBandwidth k) hkh hklo hkhi.le sigma hsigma hslo simpa only [unitScore, pairOf, frontierRate, frontierScale, if_pos hslo] using hscore
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_fourier_dictionary_witness · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:220
theorem fourier_effective_sample_size_one_le

In the intermediate regime the effective Fourier sample size is at least one. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma :
ℝ
n :
ℕ
hn :
0 < n
hd :
0 < effDim beta kappa
hsigma :
directScale beta kappa n ≤ sigma
1 ≤ (n : ℝ)*sigma^effDim beta kappa
Proof (Lean source)
-- @node: fourier_effective_sample_size_one_le lemma fourier_effective_sample_size_one_le (beta kappa sigma : ℝ) (n : ℕ) (hn : 0 < n) (hd : 0 < effDim beta kappa) (hsigma : directScale beta kappa n ≤ sigma) : 1 ≤ (n : ℝ)*sigma^effDim beta kappa := by have hnR : (0 : ℝ) < n := by exact_mod_cast hn have h0 : 0 < directScale beta kappa n := Real.rpow_pos_of_pos hnR _ have hp := Real.rpow_le_rpow h0.le hsigma hd.le rw [directScale_power_balance beta kappa n hn hd] at hp have hb := (div_le_iff₀ hnR).mp hp nlinarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourier_effective_sample_size_one_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:243
theorem fourierScale_dictionary_window

S9 and the noise elbow place the tuned intermediate bandwidth in the dictionary window for all sufficiently large samples, uniformly in the noise scale. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ n0 : ℕ,
0 < n0
conclusion 1
n ≥ n0 :
sigma ∈ Icc (0 : ℝ) (1/4) :
directScale beta kappa n < sigma
sigma ≤ (logScale n)^(-1/2 : ℝ)
0 < 12*fourierScale beta kappa sigma n
(n : ℝ)^(-2 : ℝ) ≤ 12*fourierScale beta kappa sigma n
12*fourierScale beta kappa sigma n ≤ 1/8
Proof (Lean source)
-- @node: fourierScale_dictionary_window lemma fourierScale_dictionary_window (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ n0 : ℕ, 0 < n0 ∧ ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), directScale beta kappa n < sigma → sigma ≤ (logScale n)^(-1/2 : ℝ) → 0 < 12*fourierScale beta kappa sigma n ∧ (n : ℝ)^(-2 : ℝ) ≤ 12*fourierScale beta kappa sigma n ∧ 12*fourierScale beta kappa sigma n ≤ 1/8 := by obtain ⟨C, hC, hbound⟩ := fourierScale_inverse_power_bound beta kappa hbeta hkappa obtain ⟨M, hM⟩ := exists_nat_gt C have hL : Tendsto (fun n : ℕ => logScale n) atTop atTop := Real.tendsto_log_atTop.comp (tendsto_natCast_atTop_atTop.const_mul_atTop (Real.exp_pos 1)) have hE : Tendsto (fun n : ℕ => (logScale n)^(-1/2 : ℝ)) atTop (𝓝 0) := by convert (tendsto_rpow_neg_atTop (by norm_num : (0 : ℝ) < 1/2)).comp hL using 1 <;> norm_num [Function.comp_def] obtain ⟨N, hN⟩ := eventually_atTop.mp (hE.eventually (gt_mem_nhds (by norm_num : (0 : ℝ) < 1/96))) refine ⟨max (max M N) 1, by omega, ?_⟩ intro n hn sigma hsigma hdirect helbow have hn0 : 0 < n := by omega have hnR : (0 : ℝ) < n := by exact_mod_cast hn0 have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast hn0 have hCn : C < (n : ℝ) := hM.trans_le (by exact_mod_cast (show M ≤ n by omega)) have hd : 1 ≤ effDim beta kappa := by unfold effDim; linarith [hbeta.1, hkappa.1] have hd0 : 0 < effDim beta kappa := by linarith have h0 : 0 < directScale beta kappa n := Real.rpow_pos_of_pos hnR _ have hs0 : 0 < sigma := h0.trans hdirect have hF : 0 < fourierScale beta kappa sigma n := fourierScale_pos beta kappa sigma n hs0 have heff := fourier_effective_sample_size_one_le beta kappa sigma n hn0 hd0 hdirect.le have hb := hbound n hn0 sigma hs0 heff have hlo : (n : ℝ)^(-2 : ℝ) ≤ fourierScale beta kappa sigma n := by by_contra hnot have hf : fourierScale beta kappa sigma n ≤ (n : ℝ)^(-2 : ℝ) := (lt_of_not_ge hnot).le have hi := Real.rpow_le_rpow_of_nonpos hF hf (neg_nonpos.mpr hd0.le) have hx : (n : ℝ)^(2*effDim beta kappa-1) ≤ C := by calc _ = ((n : ℝ)^(-2 : ℝ))^(-effDim beta kappa)/n := by rw [← Real.rpow_mul hnR.le, div_eq_mul_inv, ← Real.rpow_neg_one (n : ℝ), ← Real.rpow_add hnR] congr 1 ring _ ≤ (fourierScale beta kappa sigma n)^(-effDim beta kappa)/n := div_le_div_of_nonneg_right hi hnR.le _ ≤ C := hb have hnn : (n : ℝ) ≤ (n : ℝ)^(2*effDim beta kappa-1) := by calc _ = (n : ℝ)^(1 : ℝ) := (Real.rpow_one _).symm _ ≤ _ := Real.rpow_le_rpow_of_exponent_le hn1 (by linarith) linarith refine ⟨by positivity, hlo.trans (by linarith), ?_⟩ have hsupper : sigma ≤ 1/96 := helbow.trans (hN n (by omega)).le have hfupper := fourierScale_le_sigma beta kappa sigma n hs0 linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourierScale_dictionary_window · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:256
theorem intermediate_fourier_dictionary_witness

The intermediate regime has a genuine Fourier dictionary witness at the frontier rate. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
conclusion 1
0 < C
conclusion 2
∃ n0 : ℕ,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1/4),
directScale beta kappa n < sigma → sigma
≤ (logScale n)^(-1/2 : ℝ) → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ unitScore beta kappa n sigma (.fourier k) ≤ C*frontierRate beta kappa sigma n
Proof (Lean source)
-- @node: intermediate_fourier_dictionary_witness lemma intermediate_fourier_dictionary_witness (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), directScale beta kappa n < sigma → sigma ≤ (logScale n)^(-1/2 : ℝ) → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ unitScore beta kappa n sigma (.fourier k) ≤ C*frontierRate beta kappa sigma n := by obtain ⟨C, hC, hcert⟩ := qF_intermediate_certificate_bound beta kappa hbeta hkappa obtain ⟨n0, hn0, hwindow⟩ := fourierScale_dictionary_window beta kappa hbeta hkappa refine ⟨C, hC, n0, ?_⟩ intro n hn sigma hsigma hdirect helbow have hnpos : 0 < n := hn0.trans_le hn have hnR : (0 : ℝ) < n := by exact_mod_cast hnpos have h0 : 0 < directScale beta kappa n := Real.rpow_pos_of_pos hnR _ have hs0 : 0 < sigma := h0.trans hdirect have hd : 0 < effDim beta kappa := by unfold effDim; linarith [hbeta.1, hkappa.1] have heff := fourier_effective_sample_size_one_le beta kappa sigma n hnpos hd hdirect.le obtain ⟨hh0, hlo, hhi⟩ := hwindow n hn sigma hsigma hdirect helbow obtain ⟨k, hmem, hklo, hkhi⟩ := fourier_dictionary_round_up n sigma (12*fourierScale beta kappa sigma n) hnpos hh0 hlo hhi refine ⟨k, hmem, ?_⟩ have hkh : dyadicBandwidth k ∈ Ioc (0 : ℝ) (1/4) := ⟨hh0.trans_le hklo, by linarith⟩ have hscore := hcert n hnpos sigma ⟨hs0, hsigma.2⟩ heff (dyadicBandwidth k) hkh hklo (by linarith) simpa only [unitScore, pairOf, frontierRate, frontierScale, if_neg (not_le.mpr hdirect), if_pos helbow] using hscore
CausalSmith.Stat.NoisydoseWeakdesignTransition.intermediate_fourier_dictionary_witness · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:314
theorem fourier_dictionary_witness

This branch supplies a dictionary witness with score at most a fixed multiple of the frontier. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
conclusion 1
0 < C
conclusion 2
∃ n0 : ℕ,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1 / 4),
≤ (logScale n)^(-1/2 : ℝ) → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ unitScore beta kappa n sigma (.fourier k) ≤ C*frontierRate beta kappa sigma n
Proof (Lean source)
-- @node: fourier_dictionary_witness lemma fourier_dictionary_witness (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1 / 4), sigma ≤ (logScale n)^(-1/2 : ℝ) → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ unitScore beta kappa n sigma (.fourier k) ≤ C*frontierRate beta kappa sigma n := by obtain ⟨C0, hC0, n0, hdirect⟩ := direct_fourier_dictionary_witness beta kappa hbeta hkappa obtain ⟨C1, hC1, n1, hintermediate⟩ := intermediate_fourier_dictionary_witness beta kappa hbeta hkappa refine ⟨max C0 C1, lt_of_lt_of_le hC0 (le_max_left _ _), max n0 n1, ?_⟩ intro n hn sigma hsigma helbow have hrate : 0 ≤ frontierRate beta kappa sigma n := by unfold frontierRate frontierScale rw [if_pos helbow] split_ifs with hslo · exact Real.rpow_nonneg (Real.rpow_nonneg (Nat.cast_nonneg n) _) _ · exact Real.rpow_nonneg (div_nonneg hsigma.1 (Real.sqrt_nonneg _)) _ by_cases hslo : sigma ≤ directScale beta kappa n · obtain ⟨k, hmem, hscore⟩ := hdirect n (le_max_left n0 n1 |>.trans hn) sigma hsigma hslo exact ⟨k, hmem, hscore.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) hrate)⟩ · obtain ⟨k, hmem, hscore⟩ := hintermediate n (le_max_right n0 n1 |>.trans hn) sigma hsigma (lt_of_not_ge hslo) helbow exact ⟨k, hmem, hscore.trans (mul_le_mul_of_nonneg_right (le_max_right _ _) hrate)⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourier_dictionary_witness · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/FourierWitness.lean:343
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.HeatAlgebra 28 declarations Finite inverse-heat algebra and its Gaussian Hermite expansion (roadmap S12).

Finite inverse-heat algebra and its Gaussian Hermite expansion (roadmap S12). All coefficient comparisons are finite; the shared Hermite substrate supplies Gaussian means.

Iterated polynomial derivative used in finite heat coefficient comparisons.

Definition (Lean source)
j :
ℕ
p :
polyDeriv j p :
(derivative^[j]) p

The inverse heat operator with an arbitrary public degree cutoff.

Definition (Lean source)
m :
ℕ
σ :
ℝ
p :
finiteInverseHeat m σ p :
∑ k ∈ range (m / 2 + 1), C ((-σ^2/2)^k / (Nat.factorial k : ℝ)) * polyDeriv (2*k) p
theorem polyDeriv_sum

Iterated polynomial differentiation distributes over finite sums. This is the stated conclusion. This is the stated conclusion. This is the stated conclusion. This is the stated conclusion.

Formal statement
ι :
Type*
j :
ℕ
s :
p :
ι → Polynomial ℝ
polyDeriv j (∑ i ∈ s, p i) = ∑ i ∈ s, polyDeriv j (p i)
Proof (Lean source)
-- @node: polyDeriv_sum lemma polyDeriv_sum {ι : Type*} (j : ℕ) (s : Finset ι) (p : ι → Polynomial ℝ) : polyDeriv j (∑ i ∈ s, p i) = ∑ i ∈ s, polyDeriv j (p i) := by exact Polynomial.iterate_derivative_sum j s p
theorem polyDeriv_C_mul

Scalar polynomial coefficients commute with iterated differentiation. This is the stated conclusion.

Formal statement
j :
ℕ
a :
ℝ
p :
polyDeriv j (C a * p) = C a * polyDeriv j p
Proof (Lean source)
-- @node: polyDeriv_C_mul lemma polyDeriv_C_mul (j : ℕ) (a : ℝ) (p : Polynomial ℝ) : polyDeriv j (C a * p) = C a * polyDeriv j p := by exact Polynomial.iterate_derivative_C_mul a p j
theorem polyDeriv_X_pow

Every monomial derivative has its descending-factorial coefficient, including zero derivatives above the monomial degree. This is the stated conclusion.

Formal statement
j n :
ℕ
polyDeriv j (X^n : Polynomial ℝ)
= C (Nat.descFactorial n j : ℝ) * X^(n-j)
Proof (Lean source)
-- @node: polyDeriv_X_pow lemma polyDeriv_X_pow (j n : ℕ) : polyDeriv j (X^n : Polynomial ℝ) = C (Nat.descFactorial n j : ℝ) * X^(n-j) := by exact Polynomial.iterate_derivative_X_pow_eq_C_mul n j
theorem polyDeriv_eq_zero_of_degree_lt

Derivatives above any upper degree bound vanish. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
j m :
ℕ
hp :
p.natDegree ≤ m
hj :
m < j
polyDeriv j p = 0
Proof (Lean source)
-- @node: polyDeriv_eq_zero_of_degree_lt lemma polyDeriv_eq_zero_of_degree_lt (p : Polynomial ℝ) (j m : ℕ) (hp : p.natDegree ≤ m) (hj : m < j) : polyDeriv j p = 0 := by exact Polynomial.iterate_derivative_eq_zero (hp.trans_lt hj)
CausalSmith.Stat.NoisydoseWeakdesignTransition.polyDeriv_eq_zero_of_degree_lt · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:45
theorem finiteInverseHeat_sum

The finite heat operator distributes over finite polynomial sums. This is the stated conclusion.

Formal statement
ι :
Type*
m :
ℕ
σ :
ℝ
s :
p :
ι → Polynomial ℝ
finiteInverseHeat m σ (∑ i ∈ s, p i) = ∑ i ∈ s, finiteInverseHeat m σ (p i)
Proof (Lean source)
-- @node: finiteInverseHeat_sum lemma finiteInverseHeat_sum {ι : Type*} (m : ℕ) (σ : ℝ) (s : Finset ι) (p : ι → Polynomial ℝ) : finiteInverseHeat m σ (∑ i ∈ s, p i) = ∑ i ∈ s, finiteInverseHeat m σ (p i) := by simp only [finiteInverseHeat, polyDeriv_sum, Finset.mul_sum] rw [Finset.sum_comm]
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_sum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:51
theorem finiteInverseHeat_C_mul

The finite heat operator commutes with scalar polynomial coefficients. This is the stated conclusion.

Formal statement
m :
ℕ
σ a :
ℝ
p :
finiteInverseHeat m σ (C a * p) = C a * finiteInverseHeat m σ p
Proof (Lean source)
-- @node: finiteInverseHeat_C_mul lemma finiteInverseHeat_C_mul (m : ℕ) (σ a : ℝ) (p : Polynomial ℝ) : finiteInverseHeat m σ (C a * p) = C a * finiteInverseHeat m σ p := by simp only [finiteInverseHeat, polyDeriv_C_mul, Finset.mul_sum] apply Finset.sum_congr rfl intro k hk ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_C_mul · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:59
theorem finiteInverseHeat_cutoff

Enlarging a degree cutoff adds only identically zero heat terms. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
σ :
ℝ
m M :
ℕ
hp :
p.natDegree ≤ m
hmM :
m ≤ M
Proof (Lean source)
-- @node: finiteInverseHeat_cutoff lemma finiteInverseHeat_cutoff (p : Polynomial ℝ) (σ : ℝ) (m M : ℕ) (hp : p.natDegree ≤ m) (hmM : m ≤ M) : finiteInverseHeat M σ p = finiteInverseHeat m σ p := by symm apply Finset.sum_subset (Finset.range_mono (by omega : m/2+1 ≤ M/2+1)) intro k hk hknot have hj : m < 2*k := by have hnot : ¬ k < m/2+1 := by simpa using hknot omega rw [polyDeriv_eq_zero_of_degree_lt p (2*k) m hp hj, mul_zero]
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_cutoff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:69
theorem finiteInverseHeat_coeff_decomposition

Applying inverse heat coefficientwise gives the finite monomial decomposition prescribed in the covariance proof roadmap. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
m :
ℕ
σ :
ℝ
hp :
p.natDegree ≤ m
= ∑ n ∈ range (m+1), C (p.coeff n) * finiteInverseHeat m σ (X^n)
Proof (Lean source)
-- @node: finiteInverseHeat_coeff_decomposition lemma finiteInverseHeat_coeff_decomposition (p : Polynomial ℝ) (m : ℕ) (σ : ℝ) (hp : p.natDegree ≤ m) : finiteInverseHeat m σ p = ∑ n ∈ range (m+1), C (p.coeff n) * finiteInverseHeat m σ (X^n) := by have he := p.as_sum_range_C_mul_X_pow' (by omega : p.natDegree < m+1) calc _ = finiteInverseHeat m σ (∑ n ∈ range (m+1), C (p.coeff n) * X^n) := congrArg _ he _ = _ := by simp only [finiteInverseHeat_sum, finiteInverseHeat_C_mul]
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_coeff_decomposition · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:82

The even factorial splits into its even and odd double-factorial products. This is the stated conclusion.

Formal statement
k :
ℕ
factorial (2*k) = 2^k * factorial k * doubleFactorial (2*k-1)
Proof (Lean source)
-- @node: heat_even_factorial lemma heat_even_factorial (k : ℕ) : factorial (2*k) = 2^k * factorial k * doubleFactorial (2*k-1) := by cases k with | zero => norm_num [doubleFactorial] | succ k => have h := Nat.factorial_eq_mul_doubleFactorial (2*(k+1)-1) rw [show 2*(k+1)-1+1 = 2*(k+1) by omega] at h rw [h, Nat.doubleFactorial_two_mul]
theorem hermite_heat_coefficient Lemma hermite_heat_coefficient in the paper ↗

Each nonzero Hermite coefficient equals the corresponding inverse-heat coefficient. This is the stated conclusion.

Formal statement
k j :
ℕ
((hermite (2*k+j)).coeff j : ℝ)
= (-1/2 : ℝ)^k / (Nat.factorial k : ℝ) * (descFactorial (2*k+j) (2*k) : ℝ)
Proof (Lean source)
-- @node: hermite_heat_coefficient lemma hermite_heat_coefficient (k j : ℕ) : ((hermite (2*k+j)).coeff j : ℝ) = (-1/2 : ℝ)^k / (Nat.factorial k : ℝ) * (descFactorial (2*k+j) (2*k) : ℝ) := by rw [Polynomial.coeff_hermite_explicit] push_cast have hdesc := Nat.factorial_mul_descFactorial (show 2*k ≤ 2*k+j by omega) have hchoose := Nat.choose_mul_factorial_mul_factorial (show j ≤ 2*k+j by omega) rw [show 2*k+j-2*k = j by omega] at hdesc rw [show 2*k+j-j = 2*k by omega, heat_even_factorial] at hchoose have hd : (Nat.factorial j : ℝ) * (descFactorial (2*k+j) (2*k) : ℝ) = (Nat.factorial (2*k+j) : ℝ) := by exact_mod_cast hdesc have hc : (choose (2*k+j) j : ℝ) * (Nat.factorial j : ℝ) * (2^k * (Nat.factorial k : ℝ) * (doubleFactorial (2*k-1) : ℝ)) = (Nat.factorial (2*k+j) : ℝ) := by exact_mod_cast hchoose have hj : (Nat.factorial j : ℝ) ≠ 0 := by positivity have hk : (Nat.factorial k : ℝ) ≠ 0 := by positivity have he : (descFactorial (2*k+j) (2*k) : ℝ) = (choose (2*k+j) j : ℝ) * (2^k * (Nat.factorial k : ℝ) * (doubleFactorial (2*k-1) : ℝ)) := by apply mul_left_cancel₀ hj nlinarith [hd, hc] rw [he, div_pow] field_simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.hermite_heat_coefficient · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:105
theorem finiteInverseHeat_unit_monomial

Unit-noise inverse heat maps a monomial to the corresponding Hermite polynomial. This is the stated conclusion.

Formal statement
n :
ℕ
Proof (Lean source)
-- @node: finiteInverseHeat_unit_monomial lemma finiteInverseHeat_unit_monomial (n : ℕ) : finiteInverseHeat n 1 (X^n) = (hermite n).map (castRingHom ℝ) := by ext j simp only [finiteInverseHeat, polyDeriv_X_pow, Polynomial.finsetSum_coeff, Polynomial.coeff_C_mul, Polynomial.coeff_X_pow, Polynomial.coeff_map, castRingHom] by_cases hj : j ≤ n · by_cases heven : Even (n-j) · obtain ⟨k, hk⟩ := heven have hn : n = 2*k+j := by omega subst n rw [Finset.sum_eq_single k] · simp only [show 2*k+j-2*k = j by omega, if_true] norm_num only [one_pow, neg_div, neg_one_sq, one_mul] simpa [div_eq_mul_inv] using (hermite_heat_coefficient k j).symm · intro l hl hne by_cases hlbig : 2*k+j < 2*l · rw [Nat.descFactorial_of_lt hlbig] simp · have hne' : 2*k+j-2*l ≠ j := by omega simp [hne', Ne.symm hne'] · intro hnot have : k < (2*k+j)/2+1 := by omega exact (hnot (Finset.mem_range.mpr this)).elim · rw [Polynomial.coeff_hermite_of_odd_add (by apply Nat.not_even_iff_odd.mp intro h obtain ⟨r, hr⟩ := h apply heven exact ⟨r-j, by omega⟩)] simp only [map_zero] apply Finset.sum_eq_zero intro l hl by_cases hlbig : n < 2*l · rw [Nat.descFactorial_of_lt hlbig] simp · have hne : n-2*l ≠ j := by intro h apply heven exact ⟨l, by omega⟩ simp [hne, Ne.symm hne] · rw [Polynomial.coeff_hermite_of_lt (by omega)] simp only [map_zero] apply Finset.sum_eq_zero intro l hl simp [show j ≠ n-2*l by omega]
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_unit_monomial · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:131
theorem polyDeriv_affine

Affine substitution multiplies the iterated derivative by the appropriate power of its slope. This is the stated conclusion.

Formal statement
p :
x σ :
ℝ
j :
ℕ
polyDeriv j (p.comp (C x + C σ * X))
= C (σ^j) * (polyDeriv j p).comp (C x + C σ * X)
Proof (Lean source)
-- @node: polyDeriv_affine lemma polyDeriv_affine (p : Polynomial ℝ) (x σ : ℝ) (j : ℕ) : polyDeriv j (p.comp (C x + C σ * X)) = C (σ^j) * (polyDeriv j p).comp (C x + C σ * X) := by induction j generalizing p with | zero => simp [polyDeriv] | succ j ih => simp only [polyDeriv, Function.iterate_succ_apply'] at ih ⊢ rw [ih, Polynomial.derivative_C_mul, Polynomial.derivative_comp] simp only [Polynomial.derivative_add, Polynomial.derivative_C, Polynomial.derivative_C_mul, Polynomial.derivative_X, mul_one, zero_add] rw [pow_succ, Polynomial.C_mul] ring
theorem affine_coeff_derivative

The coefficients after affine substitution are the scaled finite Taylor coefficients. This is the stated conclusion.

Formal statement
p :
x σ :
ℝ
j :
ℕ
(p.comp (C x + C σ * X)).coeff j
= σ^j * (polyDeriv j p).eval x / (Nat.factorial j : ℝ)
Proof (Lean source)
-- @node: affine_coeff_derivative lemma affine_coeff_derivative (p : Polynomial ℝ) (x σ : ℝ) (j : ℕ) : (p.comp (C x + C σ * X)).coeff j = σ^j * (polyDeriv j p).eval x / (Nat.factorial j : ℝ) := by have ht := Polynomial.taylor_coeff (r := x) (f := p) j have hd := congrArg (fun f : Polynomial ℝ → Polynomial ℝ => (f p).eval x) (Polynomial.factorial_smul_hasseDeriv (R := ℝ) (k := j)) simp only [LinearMap.smul_apply, map_nsmul, nsmul_eq_mul] at hd have hf : (Nat.factorial j : ℝ) ≠ 0 := by positivity have he : (Polynomial.hasseDeriv j p).eval x = (polyDeriv j p).eval x / (Nat.factorial j : ℝ) := by apply (eq_div_iff hf).mpr simpa [polyDeriv, mul_comm] using hd have ha : p.comp (C x + C σ * X) = (Polynomial.taylor x p).comp (C σ * X) := by simp only [Polynomial.taylor_apply, Polynomial.comp_assoc, Polynomial.add_comp, Polynomial.X_comp, Polynomial.C_comp] congr 1 ring rw [ha, Polynomial.comp_C_mul_X_coeff, ht, he] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.affine_coeff_derivative · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:195
theorem finiteInverseHeat_affine_eval

Translation and scaling reduce inverse heat evaluation to the unit-noise operator. This is the stated conclusion.

Formal statement
p :
m :
ℕ
x σ z :
ℝ
(finiteInverseHeat m σ p).eval (x+σ*z)
= (finiteInverseHeat m 1 (p.comp (C x + C σ * X))).eval z
Proof (Lean source)
-- @node: finiteInverseHeat_affine_eval lemma finiteInverseHeat_affine_eval (p : Polynomial ℝ) (m : ℕ) (x σ z : ℝ) : (finiteInverseHeat m σ p).eval (x+σ*z) = (finiteInverseHeat m 1 (p.comp (C x + C σ * X))).eval z := by simp only [finiteInverseHeat, Polynomial.eval_finsetSum, Polynomial.eval_mul, Polynomial.eval_C, polyDeriv_affine, Polynomial.eval_comp, Polynomial.eval_add, Polynomial.eval_X] apply Finset.sum_congr rfl intro k hk rw [show -σ^2/2 = (-1/2 : ℝ)*σ^2 by ring, mul_pow, pow_mul] norm_num only [one_pow] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_affine_eval · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:217
theorem finiteInverseHeat_hermite_expansion

A polynomial of bounded degree has the exact finite inverse-heat Hermite expansion. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
m :
ℕ
hp :
p.natDegree ≤ m
x σ z :
ℝ
(finiteInverseHeat m σ p).eval (x+σ*z)
= ∑ j ∈ range (m+1), (σ^j * (polyDeriv j p).eval x / (Nat.factorial j : ℝ)) * (aeval z (hermite j) : ℝ)
Proof (Lean source)
-- @node: finiteInverseHeat_hermite_expansion lemma finiteInverseHeat_hermite_expansion (p : Polynomial ℝ) (m : ℕ) (hp : p.natDegree ≤ m) (x σ z : ℝ) : (finiteInverseHeat m σ p).eval (x+σ*z) = ∑ j ∈ range (m+1), (σ^j * (polyDeriv j p).eval x / (Nat.factorial j : ℝ)) * (aeval z (hermite j) : ℝ) := by let q := p.comp (C x + C σ * X) have hq : q.natDegree ≤ m := by apply (Polynomial.natDegree_comp_le).trans have ha : (C x + C σ * X).natDegree ≤ 1 := by apply (Polynomial.natDegree_add_le _ _).trans simp only [Polynomial.natDegree_C] exact max_le (by omega) ((Polynomial.natDegree_C_mul_le _ _).trans (by simp)) exact (Nat.mul_le_mul_left _ ha).trans (by simpa using hp) rw [finiteInverseHeat_affine_eval, finiteInverseHeat_coeff_decomposition q m 1 hq] simp only [Polynomial.eval_finsetSum, Polynomial.eval_mul, Polynomial.eval_C] apply Finset.sum_congr rfl intro j hj rw [finiteInverseHeat_cutoff (X^j) 1 j m (by simp) (by have := Finset.mem_range.mp hj; omega), finiteInverseHeat_unit_monomial] rw [show q.coeff j = σ^j * (polyDeriv j p).eval x / (Nat.factorial j : ℝ) from affine_coeff_derivative p x σ j] have hcast : castRingHom ℝ = algebraMap ℤ ℝ := by ext n simp rw [hcast, Polynomial.eval_map_algebraMap]
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_hermite_expansion · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:231

The constant Hermite mode extracts each Gaussian mean. This is the stated conclusion.

Formal statement
j :
ℕ
(∫ z, (aeval z (hermite j) : ℝ) ∂gaussianReal 0 1)
= if j = 0 then 1 else 0
Proof (Lean source)
-- @node: hermite_gaussian_mean lemma hermite_gaussian_mean (j : ℕ) : (∫ z, (aeval z (hermite j) : ℝ) ∂gaussianReal 0 1) = if j = 0 then 1 else 0 := by have h := integral_hermite_mul j 0 by_cases hj : j = 0 · subst j simpa [Polynomial.hermite_zero] using h · simpa [Polynomial.hermite_zero, hj] using h
CausalSmith.Stat.NoisydoseWeakdesignTransition.hermite_gaussian_mean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:261
theorem hermite_finite_sum_mean Lemma hermite_finite_sum_mean in the paper ↗

Finite Hermite sums have Gaussian mean equal to their constant coefficient. Under the stated conditions. This is the stated conclusion.

Formal statement
c :
ℕ → ℝ
N :
ℕ
hN :
0 < N
(∫ z, ∑ j ∈ range N, c j * (aeval z (hermite j) : ℝ) ∂gaussianReal 0 1)
= c 0
Proof (Lean source)
-- @node: hermite_finite_sum_mean lemma hermite_finite_sum_mean (c : ℕ → ℝ) (N : ℕ) (hN : 0 < N) : (∫ z, ∑ j ∈ range N, c j * (aeval z (hermite j) : ℝ) ∂gaussianReal 0 1) = c 0 := by rw [integral_finset_sum] · simp_rw [integral_const_mul, hermite_gaussian_mean] simp [mul_ite, hN] · intro j hj have hi := integrable_hermite_mul j 0 simp only [Polynomial.hermite_zero, map_one, mul_one] at hi exact hi.const_mul _
CausalSmith.Stat.NoisydoseWeakdesignTransition.hermite_finite_sum_mean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:272
theorem finiteInverseHeat_gaussian_mean

Finite coefficient comparison and Hermite means prove exact polynomial Gaussian inversion. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
D :
ℕ
hp :
p.natDegree ≤ D
t sigma :
ℝ
(∫ z, (finiteInverseHeat D sigma p).eval (t+sigma*z) ∂gaussianReal 0 1) = p.eval t
Proof (Lean source)
-- @node: finiteInverseHeat_gaussian_mean lemma finiteInverseHeat_gaussian_mean (p : Polynomial ℝ) (D : ℕ) (hp : p.natDegree ≤ D) (t sigma : ℝ) : (∫ z, (finiteInverseHeat D sigma p).eval (t+sigma*z) ∂gaussianReal 0 1) = p.eval t := by simp_rw [finiteInverseHeat_hermite_expansion p D hp t sigma] simpa [polyDeriv] using hermite_finite_sum_mean (fun j => sigma^j * (polyDeriv j p).eval t / (Nat.factorial j : ℝ)) (D+1) (by omega)
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_gaussian_mean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:285

The even Chebyshev expansion has degree at most six times the original index. This is the stated conclusion.

Formal statement
m :
ℕ
(qMPoly m).natDegree ≤ 6*(m-1)
Proof (Lean source)
-- @node: qMPoly_natDegree_le lemma qMPoly_natDegree_le (m : ℕ) : (qMPoly m).natDegree ≤ 6*(m-1) := by have hbase : (1 - C (4 : ℝ) * X^2).natDegree ≤ 2 := by apply (Polynomial.natDegree_sub_le _ _).trans exact max_le (by simp) ((Polynomial.natDegree_C_mul_le _ _).trans (by simp)) have hsum : (∑ k ∈ range m, C ((U ℝ (m-1 : ℕ)).coeff (2*k) / (m : ℝ)) * (1 - C 4 * X^2)^k).natDegree ≤ m-1 := by apply Polynomial.natDegree_sum_le_of_forall_le intro k hk by_cases hdeg : 2*k ≤ m-1 · apply (Polynomial.natDegree_C_mul_le _ _).trans rw [Polynomial.natDegree_pow] exact (Nat.mul_le_mul_left k hbase).trans (by omega) · have hz : (U ℝ (m-1 : ℕ)).coeff (2*k) = 0 := by apply Polynomial.coeff_eq_zero_of_natDegree_lt rw [Polynomial.Chebyshev.natDegree_U_natCast] omega simp [hz] unfold qMPoly rw [Polynomial.natDegree_pow] exact Nat.mul_le_mul_left 6 hsum
theorem ellM_eq_finiteInverseHeat

The declared inverse weight evaluates the finite heat transform at its valid degree cutoff. This is the stated conclusion.

Formal statement
sigma :
ℝ
m :
ℕ
v :
ℝ
ellM sigma m v = (finiteInverseHeat (6*(m-1)) sigma (qMPoly m)).eval v
Proof (Lean source)
-- @node: ellM_eq_finiteInverseHeat lemma ellM_eq_finiteInverseHeat (sigma : ℝ) (m : ℕ) (v : ℝ) : ellM sigma m v = (finiteInverseHeat (6*(m-1)) sigma (qMPoly m)).eval v := by simp only [ellM, finiteInverseHeat, Polynomial.eval_finsetSum, Polynomial.eval_mul, Polynomial.eval_C, polyDeriv] congr 1 congr 1 omega
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_eq_finiteInverseHeat · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:318

Gaussian expectation of every polynomial dictionary inverse equals its latent weight. This is the stated conclusion.

Formal statement
sigma :
ℝ
m :
ℕ
t :
ℝ
(∫ z, ellM sigma m (t+sigma*z) ∂gaussianReal 0 1) = qM m t
Proof (Lean source)
-- @node: ellM_gaussian_inverse lemma ellM_gaussian_inverse (sigma : ℝ) (m : ℕ) (t : ℝ) : (∫ z, ellM sigma m (t+sigma*z) ∂gaussianReal 0 1) = qM m t := by simp_rw [ellM_eq_finiteInverseHeat] exact finiteInverseHeat_gaussian_mean (qMPoly m) (6*(m-1)) (qMPoly_natDegree_le m) t sigma
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_gaussian_inverse · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:328
theorem hermite_finite_sum_square Lemma hermite_finite_sum_square in the paper ↗

Orthogonality removes all mixed modes from a finite Hermite square. This is the stated conclusion.

Formal statement
c :
ℕ → ℝ
N :
ℕ
(∫ z, (∑ j ∈ range N, c j * (aeval z (hermite j) : ℝ))^2 ∂gaussianReal 0 1)
= ∑ j ∈ range N, (c j)^2 * (Nat.factorial j : ℝ)
Proof (Lean source)
-- @node: hermite_finite_sum_square lemma hermite_finite_sum_square (c : ℕ → ℝ) (N : ℕ) : (∫ z, (∑ j ∈ range N, c j * (aeval z (hermite j) : ℝ))^2 ∂gaussianReal 0 1) = ∑ j ∈ range N, (c j)^2 * (Nat.factorial j : ℝ) := by have hi (j k : ℕ) : Integrable (fun z => (c j * c k) * ((aeval z (hermite j) : ℝ) * aeval z (hermite k))) (gaussianReal 0 1) := (integrable_hermite_mul j k).const_mul _ have heq (z : ℝ) : (∑ j ∈ range N, c j * (aeval z (hermite j) : ℝ))^2 = ∑ j ∈ range N, ∑ k ∈ range N, (c j * c k) * ((aeval z (hermite j) : ℝ) * aeval z (hermite k)) := by rw [pow_two, Finset.sum_mul] apply Finset.sum_congr rfl intro j hj rw [Finset.mul_sum] apply Finset.sum_congr rfl intro k hk ring simp_rw [heq] rw [integral_finsetSum _ (fun j _ => integrable_finsetSum _ (fun k _ => hi j k))] apply Finset.sum_congr rfl intro j hj rw [integral_finsetSum _ (fun k _ => hi j k)] simp_rw [integral_const_mul, integral_hermite_mul] simp [mul_ite, ← pow_two, hj]
CausalSmith.Stat.NoisydoseWeakdesignTransition.hermite_finite_sum_square · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:336
theorem finiteInverseHeat_gaussian_second_moment

The finite inverse-heat expansion has the exact derivative-square second moment. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
D :
ℕ
hp :
p.natDegree ≤ D
t sigma :
ℝ
(∫ z, ((finiteInverseHeat D sigma p).eval (t+sigma*z))^2 ∂gaussianReal 0 1)
= ∑ j ∈ range (D+1), sigma^(2*j) * ((polyDeriv j p).eval t)^2 / (Nat.factorial j : ℝ)
Proof (Lean source)
-- @node: finiteInverseHeat_gaussian_second_moment lemma finiteInverseHeat_gaussian_second_moment (p : Polynomial ℝ) (D : ℕ) (hp : p.natDegree ≤ D) (t sigma : ℝ) : (∫ z, ((finiteInverseHeat D sigma p).eval (t+sigma*z))^2 ∂gaussianReal 0 1) = ∑ j ∈ range (D+1), sigma^(2*j) * ((polyDeriv j p).eval t)^2 / (Nat.factorial j : ℝ) := by simp_rw [finiteInverseHeat_hermite_expansion p D hp t sigma] rw [hermite_finite_sum_square] apply Finset.sum_congr rfl intro j hj have hf : (Nat.factorial j : ℝ) ≠ 0 := by positivity rw [pow_mul] field_simp ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_gaussian_second_moment · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:366
theorem ellM_gaussian_second_moment

Every polynomial dictionary inverse satisfies the exact identity in S12, at zero noise too. This is the stated conclusion.

Formal statement
sigma :
ℝ
m :
ℕ
t :
ℝ
(∫ z, (ellM sigma m (t+sigma*z))^2 ∂gaussianReal 0 1)
= ∑ j ∈ range (6*(m-1)+1), sigma^(2*j) * ((polyDeriv j (qMPoly m)).eval t)^2 / (Nat.factorial j : ℝ)
Proof (Lean source)
-- @node: ellM_gaussian_second_moment lemma ellM_gaussian_second_moment (sigma : ℝ) (m : ℕ) (t : ℝ) : (∫ z, (ellM sigma m (t+sigma*z))^2 ∂gaussianReal 0 1) = ∑ j ∈ range (6*(m-1)+1), sigma^(2*j) * ((polyDeriv j (qMPoly m)).eval t)^2 / (Nat.factorial j : ℝ) := by simp_rw [ellM_eq_finiteInverseHeat] exact finiteInverseHeat_gaussian_second_moment (qMPoly m) (6*(m-1)) (qMPoly_natDegree_le m) t sigma
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_gaussian_second_moment · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:382
theorem descFactorial_square_div_factorial_le Lemma descFactorial_square_div_factorial_le in the paper ↗

One falling-factorial square is bounded by a binomial coefficient times a degree power. This is the stated conclusion.

Formal statement
D j :
ℕ
(D.descFactorial j : ℝ)^2 / (j.factorial : ℝ) ≤ (D.choose j : ℝ) * (D : ℝ)^j
Proof (Lean source)
-- @node: descFactorial_square_div_factorial_le lemma descFactorial_square_div_factorial_le (D j : ℕ) : (D.descFactorial j : ℝ)^2 / (j.factorial : ℝ) ≤ (D.choose j : ℝ) * (D : ℝ)^j := by have hf : (j.factorial : ℝ) ≠ 0 := by positivity have hid : (D.descFactorial j : ℝ) = (j.factorial : ℝ) * (D.choose j : ℝ) := by exact_mod_cast Nat.descFactorial_eq_factorial_mul_choose D j have hpow : (D.descFactorial j : ℝ) ≤ (D : ℝ)^j := by exact_mod_cast Nat.descFactorial_le_pow D j calc _ = (D.choose j : ℝ) * (D.descFactorial j : ℝ) := by rw [hid]; field_simp _ ≤ _ := mul_le_mul_of_nonneg_left hpow (by positivity)
CausalSmith.Stat.NoisydoseWeakdesignTransition.descFactorial_square_div_factorial_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:392
theorem finiteInverseHeat_gaussian_second_moment_le

Derivative bounds give the binomial second-moment envelope in roadmap S13. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
D :
ℕ
hp :
p.natDegree ≤ D
t sigma C :
ℝ
hC :
0 ≤ C
hderiv :
∀ j ≤ D, |(polyDeriv j p).eval t| ≤ C * (D.descFactorial j : ℝ)
(∫ z, ((finiteInverseHeat D sigma p).eval (t+sigma*z))^2 ∂gaussianReal 0 1)
≤ C^2 * (1 + (D : ℝ)*sigma^2)^D
Proof (Lean source)
-- @node: finiteInverseHeat_gaussian_second_moment_le lemma finiteInverseHeat_gaussian_second_moment_le (p : Polynomial ℝ) (D : ℕ) (hp : p.natDegree ≤ D) (t sigma C : ℝ) (hC : 0 ≤ C) (hderiv : ∀ j ≤ D, |(polyDeriv j p).eval t| ≤ C * (D.descFactorial j : ℝ)) : (∫ z, ((finiteInverseHeat D sigma p).eval (t+sigma*z))^2 ∂gaussianReal 0 1) ≤ C^2 * (1 + (D : ℝ)*sigma^2)^D := by rw [finiteInverseHeat_gaussian_second_moment, add_comm 1, add_pow, Finset.mul_sum] · apply Finset.sum_le_sum intro j hj have hs : 0 ≤ sigma^(2*j) := by rw [pow_mul] exact pow_nonneg (sq_nonneg sigma) j have hjD : j ≤ D := by have := Finset.mem_range.mp hj; omega have hd : ((polyDeriv j p).eval t)^2 ≤ C^2 * (D.descFactorial j : ℝ)^2 := by have h := pow_le_pow_left₀ (abs_nonneg _) (hderiv j hjD) 2 simpa only [sq_abs, mul_pow] using h calc _ ≤ sigma^(2*j) * (C^2 * (D.descFactorial j : ℝ)^2) / (j.factorial : ℝ) := div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_left hd hs) (by positivity) _ = (C^2 * sigma^(2*j)) * ((D.descFactorial j : ℝ)^2 / (j.factorial : ℝ)) := by ring _ ≤ (C^2 * sigma^(2*j)) * ((D.choose j : ℝ) * (D : ℝ)^j) := mul_le_mul_of_nonneg_left (descFactorial_square_div_factorial_le D j) (mul_nonneg (sq_nonneg C) hs) _ = _ := by simp only [one_pow, mul_one, mul_pow, pow_mul]; ring · exact hp
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_gaussian_second_moment_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/HeatAlgebra.lean:406
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.InverseHeat 27 declarations Helpers — DictionaryScore — InverseHeat

Helpers — DictionaryScore — InverseHeat

The polynomial localization weight is continuous on the entire real line. This is the stated conclusion.

Formal statement
m :
ℕ
Proof (Lean source)
-- @node: qM_continuous lemma qM_continuous (m : ℕ) : Continuous (qM m) := by exact (qMPoly m).continuous

The sixth power defining the latent weight is nonnegative, even off the dose support. This is the stated conclusion.

Formal statement
m :
ℕ
t :
ℝ
0 ≤ qM m t
Proof (Lean source)
-- @node: qM_nonneg lemma qM_nonneg (m : ℕ) (t : ℝ) : 0 ≤ qM m t := by unfold qM qMPoly rw [Polynomial.eval_pow] positivity

Nonnegative design exponents give continuous, finite weighted polynomial moments. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
Continuous (fun t => |t| ^ kappa * qM m t)
Proof (Lean source)
-- @node: qM_weighted_continuous lemma qM_weighted_continuous (kappa : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) : Continuous (fun t => |t| ^ kappa * qM m t) := by exact (continuous_abs.rpow_const (fun _ => inr hkappa)).mul (qM_continuous m)
CausalSmith.Stat.NoisydoseWeakdesignTransition.qM_weighted_continuous · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:29

Compact latent support makes each nonnegative-exponent polynomial moment integrable. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
Integrable (fun t => |t| ^ kappa * qM m t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))
Proof (Lean source)
-- @node: qM_weighted_integrable lemma qM_weighted_integrable (kappa : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) : Integrable (fun t => |t| ^ kappa * qM m t) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := by exact (qM_weighted_continuous kappa hkappa m).integrableOn_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.qM_weighted_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:35

The continuous odd-degree weight is positive on a neighborhood of the target. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
Odd m
hmpos :
0 < m
∃ delta : ℝ,
0 < delta
conclusion 1
t :
|t| < delta
0 < qM m t
Proof (Lean source)
-- @node: qM_positive_near_zero lemma qM_positive_near_zero (m : ℕ) (hm : Odd m) (hmpos : 0 < m) : ∃ delta : ℝ, 0 < delta ∧ ∀ t, |t| < delta → 0 < qM m t := by have hzero : qM m 0 = 1 := by simpa using qM_trig m hm hmpos 0 (by norm_num) have hn : ∀ᶠ t in nhds (0 : ℝ), 0 < qM m t := (qM_continuous m).continuousAt.eventually (lt_mem_nhds (show (0 : ℝ) < qM m 0 by rw [hzero]; norm_num)) obtain ⟨delta, hdelta, hball⟩ := Metric.eventually_nhds_iff.mp hn refine ⟨delta, hdelta, ?_⟩ intro t ht exact hball (by simpa [Real.dist_eq] using ht)
CausalSmith.Stat.NoisydoseWeakdesignTransition.qM_positive_near_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:42

A positive neighborhood and the power design weight give a strictly positive denominator. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
hm :
Odd m
hmpos :
0 < m
0 < weightMoment kappa (qM m)
Proof (Lean source)
-- @node: qM_weightMoment_pos lemma qM_weightMoment_pos (kappa : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) (hm : Odd m) (hmpos : 0 < m) : 0 < weightMoment kappa (qM m) := by obtain ⟨delta, hdelta, hpos⟩ := qM_positive_near_zero m hm hmpos let t : ℝ := min delta 1 / 4 have htpos : 0 < t := by dsimp [t]; positivity have htdelta : |t| < delta := by rw [abs_of_pos htpos] dsimp [t] have := min_le_left delta 1 linarith have htupper : t ≤ 1/2 := by dsimp [t] have := min_le_right delta 1 linarith have hint : 0 < ∫ t in (-1/2 : ℝ)..(1/2), |t| ^ kappa * qM m t := by apply intervalIntegral.integral_pos (by norm_num) (qM_weighted_continuous kappa hkappa m).continuousOn · intro x hx exact mul_nonneg (Real.rpow_nonneg (abs_nonneg x) _) (qM_nonneg m x) · exact ⟨t, ⟨by linarith, htupper⟩, mul_pos (Real.rpow_pos_of_pos (abs_pos.mpr (ne_of_gt htpos)) _) (hpos t htdelta)⟩ simpa only [weightMoment, intervalIntegral.integral_of_le (by norm_num : (-1/2 : ℝ) ≤ 1/2), integral_Icc_eq_integral_Ioc] using hint
theorem polynomial_eval_gaussian_integrable Lemma polynomial_eval_gaussian_integrable in the paper ↗

All polynomial functions have finite Gaussian moments, by finite monomial expansion. This is the stated conclusion.

Formal statement
p :
Integrable (fun z => p.eval z) (gaussianReal 0 1)
Proof (Lean source)
-- @node: polynomial_eval_gaussian_integrable lemma polynomial_eval_gaussian_integrable (p : Polynomial ℝ) : Integrable (fun z => p.eval z) (gaussianReal 0 1) := by induction p using Polynomial.induction_on' with | add p q hp hq => convert hp.add hq using 1 · rfl · ext z exact Polynomial.eval_add | monomial j a => have habs := (memLp_id_gaussianReal' (μ := 0) (v := 1) (j : ℝ≥0∞) (by simp)).integrable_norm_pow' have hpow : Integrable (fun z : ℝ => z^j) (gaussianReal 0 1) := by apply habs.mono' (by fun_prop) exact Eventually.of_forall (fun z => by simp [norm_pow]) simpa only [Polynomial.eval_monomial] using hpow.const_mul a
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_eval_gaussian_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:82
theorem polynomial_shift_gaussian_integrable Lemma polynomial_shift_gaussian_integrable in the paper ↗

Affine substitution preserves polynomiality, so inverse-heat derivatives are Gaussian integrable. This is the stated conclusion.

Formal statement
p :
t sigma :
ℝ
Integrable (fun z => p.eval (t+sigma*z)) (gaussianReal 0 1)
Proof (Lean source)
-- @node: polynomial_shift_gaussian_integrable lemma polynomial_shift_gaussian_integrable (p : Polynomial ℝ) (t sigma : ℝ) : Integrable (fun z => p.eval (t+sigma*z)) (gaussianReal 0 1) := by convert polynomial_eval_gaussian_integrable (p.comp (C t + C sigma * X)) using 1 ext z simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_shift_gaussian_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:100
theorem ellM_gaussian_integrable Lemma ellM_gaussian_integrable in the paper ↗

Every affine Gaussian evaluation of the finite inverse-heat sum is integrable. This is the stated conclusion.

Formal statement
sigma :
ℝ
m :
ℕ
t :
ℝ
Integrable (fun z => ellM sigma m (t+sigma*z)) (gaussianReal 0 1)
Proof (Lean source)
-- @node: ellM_gaussian_integrable lemma ellM_gaussian_integrable (sigma : ℝ) (m : ℕ) (t : ℝ) : Integrable (fun z => ellM sigma m (t+sigma*z)) (gaussianReal 0 1) := by unfold ellM apply integrable_finset_sum intro j hj exact (polynomial_shift_gaussian_integrable ((derivative^[2*j]) (qMPoly m)) t sigma).const_mul _
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_gaussian_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:109
theorem polynomial_weighted_gaussian_prod_integrable Lemma polynomial_weighted_gaussian_prod_integrable in the paper ↗

Compact weighted dose support and Gaussian moments integrate every affine polynomial. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
p :
Integrable (fun x : ℝ × ℝ => |x.1| ^ kappa * p.eval (x.1 + sigma*x.2)) ((volume.restrict (Icc (-1/2 : ℝ) (1/2))).prod (gaussianReal 0 1))
Proof (Lean source)
-- @node: polynomial_weighted_gaussian_prod_integrable lemma polynomial_weighted_gaussian_prod_integrable (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (p : Polynomial ℝ) : Integrable (fun x : ℝ × ℝ => |x.1| ^ kappa * p.eval (x.1 + sigma*x.2)) ((volume.restrict (Icc (-1/2 : ℝ) (1/2))).prod (gaussianReal 0 1)) := by induction p using Polynomial.induction_on' with | add p q hp hq => convert hp.add hq using 1 · rfl · ext x rw [Polynomial.eval_add, mul_add] rfl | monomial j a => have hterm : ∀ i ∈ range (j+1), Integrable (fun x : ℝ × ℝ => (|x.1| ^ kappa * x.1^i) * ((sigma*x.2)^(j-i) * (j.choose i : ℝ))) ((volume.restrict (Icc (-1/2 : ℝ) (1/2))).prod (gaussianReal 0 1)) := by intro i hi have ht : Integrable (fun t : ℝ => |t| ^ kappa * t^i) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := by exact ((continuous_abs.rpow_const (fun _ => inr hkappa)).mul (continuous_id.pow i)).integrableOn_Icc have hz : Integrable (fun z : ℝ => (sigma*z)^(j-i) * (j.choose i : ℝ)) (gaussianReal 0 1) := by simpa using (polynomial_shift_gaussian_integrable (X^(j-i)) 0 sigma).mul_const (j.choose i : ℝ) exact ht.mul_prod hz have hsum := integrable_finset_sum (range (j+1)) hterm convert hsum.const_mul a using 1 ext x simp only [Polynomial.eval_monomial, add_pow, Finset.mul_sum] apply Finset.sum_congr rfl intro i hi ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_weighted_gaussian_prod_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:119

The finite inverse-heat derivative sum is an ordinary polynomial on the whole line. This is the stated conclusion.

Formal statement
sigma :
ℝ
m :
ℕ
∃ p : Polynomial ℝ, ∀ t, ellM sigma m t = p.eval t
Proof (Lean source)
-- @node: ellM_eq_polynomial lemma ellM_eq_polynomial (sigma : ℝ) (m : ℕ) : ∃ p : Polynomial ℝ, ∀ t, ellM sigma m t = p.eval t := by refine ⟨∑ j ∈ range (3*(m-1)+1), C ((-(sigma^2)/2)^j / (j.factorial : ℝ)) * ((derivative^[2*j]) (qMPoly m)), ?_⟩ intro t simp only [ellM, Polynomial.eval_finsetSum, Polynomial.eval_mul, Polynomial.eval_C]
theorem ellM_weighted_sq_integrable Lemma ellM_weighted_sq_integrable in the paper ↗

The squared inverse-heat weight has a finite weighted joint Gaussian moment. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
Integrable (fun x : ℝ × ℝ => |x.1| ^ kappa * (ellM sigma m (x.1+sigma*x.2))^2) ((volume.restrict (Icc (-1/2 : ℝ) (1/2))).prod (gaussianReal 0 1))
Proof (Lean source)
-- @node: ellM_weighted_sq_integrable lemma ellM_weighted_sq_integrable (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) : Integrable (fun x : ℝ × ℝ => |x.1| ^ kappa * (ellM sigma m (x.1+sigma*x.2))^2) ((volume.restrict (Icc (-1/2 : ℝ) (1/2))).prod (gaussianReal 0 1)) := by obtain ⟨p, hp⟩ := ellM_eq_polynomial sigma m simp_rw [hp] have hi := polynomial_weighted_gaussian_prod_integrable kappa sigma hkappa (p^2) simp_rw [Polynomial.eval_pow] at hi exact hi
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_weighted_sq_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:166
theorem ellM_VqENN_lt_top

Finite polynomial Gaussian moments discharge the extended second-moment obligation. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
VqENN kappa sigma (ellM sigma m) < ⊤
Proof (Lean source)
-- @node: ellM_VqENN_lt_top lemma ellM_VqENN_lt_top (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) : VqENN kappa sigma (ellM sigma m) < ⊤ := by have hi := ellM_weighted_sq_integrable kappa sigma hkappa m have hn : ∀ x : ℝ × ℝ, 0 ≤ |x.1| ^ kappa * (ellM sigma m (x.1+sigma*x.2))^2 := fun x => mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (sq_nonneg _) have hf := (hasFiniteIntegral_iff_ofReal (Eventually.of_forall hn)).mp hi.hasFiniteIntegral rw [lintegral_prod _ (by fun_prop)] at hf simp_rw [ENNReal.ofReal_mul (Real.rpow_nonneg (abs_nonneg _) _)] at hf have hm : ∀ t : ℝ, Measurable (fun z => ofReal ((ellM sigma m (t+sigma*z))^2)) := by intro t fun_prop simp_rw [lintegral_const_mul _ (hm _)] at hf exact ENNReal.mul_lt_top (by norm_num : (16 : ℝ≥0∞) < ⊤) hf

The public polynomial second moment is an ordinary nonnegative joint integral. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
Vq kappa sigma (ellM sigma m)
= 16 * ∫ t in Icc (-1/2 : ℝ) (1/2), |t| ^ kappa * (∫ z, (ellM sigma m (t+sigma*z))^2 ∂gaussianReal 0 1)
Proof (Lean source)
-- @node: ellM_Vq_integral lemma ellM_Vq_integral (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) : Vq kappa sigma (ellM sigma m) = 16 * ∫ t in Icc (-1/2 : ℝ) (1/2), |t| ^ kappa * (∫ z, (ellM sigma m (t+sigma*z))^2 ∂gaussianReal 0 1) := by have hi := ellM_weighted_sq_integrable kappa sigma hkappa m have hn : ∀ x : ℝ × ℝ, 0 ≤ |x.1| ^ kappa * (ellM sigma m (x.1+sigma*x.2))^2 := fun x => mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (sq_nonneg _) have he := ofReal_integral_eq_lintegral_ofReal hi (Eventually.of_forall hn) rw [lintegral_prod _ (by fun_prop)] at he simp_rw [ENNReal.ofReal_mul (Real.rpow_nonneg (abs_nonneg _) _)] at he have hm : ∀ t : ℝ, Measurable (fun z => ofReal ((ellM sigma m (t+sigma*z))^2)) := by intro t fun_prop simp_rw [lintegral_const_mul _ (hm _)] at he have hj := integral_prod _ hi simp_rw [integral_const_mul] at hj rw [Vq, VqENN, ENNReal.toReal_mul, ← he, ENNReal.toReal_ofReal (integral_nonneg hn), hj] norm_num
theorem ellM_Vq_derivative_sum

The public polynomial variance is the finite sum of weighted derivative-square moments (S12). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
Vq kappa sigma (ellM sigma m)
= 16 * ∑ j ∈ range (6*(m-1)+1), (sigma^(2*j) / (Nat.factorial j : ℝ)) * ∫ t in Icc (-1/2 : ℝ) (1/2), |t| ^ kappa * ((polyDeriv j (qMPoly m)).eval t)^2
Proof (Lean source)
-- @node: ellM_Vq_derivative_sum lemma ellM_Vq_derivative_sum (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) : Vq kappa sigma (ellM sigma m) = 16 * ∑ j ∈ range (6*(m-1)+1), (sigma^(2*j) / (Nat.factorial j : ℝ)) * ∫ t in Icc (-1/2 : ℝ) (1/2), |t| ^ kappa * ((polyDeriv j (qMPoly m)).eval t)^2 := by rw [ellM_Vq_integral kappa sigma hkappa m] simp_rw [ellM_gaussian_second_moment, Finset.mul_sum] have heq (t : ℝ) (j : ℕ) : |t| ^ kappa * (sigma^(2*j) * ((polyDeriv j (qMPoly m)).eval t)^2 / (Nat.factorial j : ℝ)) = (sigma^(2*j) / (Nat.factorial j : ℝ)) * (|t| ^ kappa * ((polyDeriv j (qMPoly m)).eval t)^2) := by ring simp_rw [heq] rw [integral_finsetSum] · simp_rw [integral_const_mul] rw [Finset.mul_sum] · intro j hj apply Integrable.const_mul have hc : Continuous (fun t : ℝ => |t| ^ kappa * ((polyDeriv j (qMPoly m)).eval t)^2) := (continuous_abs.rpow_const (fun _ => inr hkappa)).mul ((polyDeriv j (qMPoly m)).continuous.pow 2) exact hc.integrableOn_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_Vq_derivative_sum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:215
theorem ellM_Vq_le_of_derivative_bound

Uniform derivative bounds imply the public polynomial variance envelope in S13. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
C :
ℝ
hC :
0 ≤ C
hderiv :
∀ t ∈ Icc (-1/2 : ℝ) (1/2),
∀ j ≤ 6*(m-1), |(polyDeriv j (qMPoly m)).eval t| ≤ C * ((6*(m-1)).descFactorial j : ℝ)
Vq kappa sigma (ellM sigma m)
≤ 16 * weightMoment kappa (fun _ => 1) * (C^2 * (1 + (6*(m-1) : ℕ)*sigma^2)^(6*(m-1)))
Proof (Lean source)
-- @node: ellM_Vq_le_of_derivative_bound lemma ellM_Vq_le_of_derivative_bound (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) (C : ℝ) (hC : 0 ≤ C) (hderiv : ∀ t ∈ Icc (-1/2 : ℝ) (1/2), ∀ j ≤ 6*(m-1), |(polyDeriv j (qMPoly m)).eval t| ≤ C * ((6*(m-1)).descFactorial j : ℝ)) : Vq kappa sigma (ellM sigma m) ≤ 16 * weightMoment kappa (fun _ => 1) * (C^2 * (1 + (6*(m-1) : ℕ)*sigma^2)^(6*(m-1))) := by let B := C^2 * (1 + (6*(m-1) : ℕ)*sigma^2)^(6*(m-1)) have hi := ellM_weighted_sq_integrable kappa sigma hkappa m have hleft : Integrable (fun t => |t| ^ kappa * (∫ z, (ellM sigma m (t+sigma*z))^2 ∂gaussianReal 0 1)) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := by convert hi.integral_prod_left using 1 ext t simp only [integral_const_mul] have hright : Integrable (fun t : ℝ => |t| ^ kappa * B) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := ((continuous_abs.rpow_const (fun _ => inr hkappa)).mul continuous_const).integrableOn_Icc have hb : ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), |t| ^ kappa * (∫ z, (ellM sigma m (t+sigma*z))^2 ∂gaussianReal 0 1) ≤ |t| ^ kappa * B := by filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht apply mul_le_mul_of_nonneg_left _ (Real.rpow_nonneg (abs_nonneg _) _) simp_rw [ellM_eq_finiteInverseHeat] exact finiteInverseHeat_gaussian_second_moment_le (qMPoly m) (6*(m-1)) (qMPoly_natDegree_le m) t sigma C hC (hderiv t ht) rw [ellM_Vq_integral kappa sigma hkappa m] calc _ ≤ 16 * ∫ t in Icc (-1/2 : ℝ) (1/2), |t| ^ kappa * B := mul_le_mul_of_nonneg_left (integral_mono_ae hleft hright hb) (by norm_num) _ = _ := by rw [integral_mul_const]; simp only [weightMoment, mul_one]; ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_Vq_le_of_derivative_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:242
theorem polyDeriv_eval_coeff_sum

Monomial expansion gives the exact finite derivative evaluation used in S13. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
D j :
ℕ
hp :
p.natDegree ≤ D
t :
ℝ
(polyDeriv j p).eval t
= ∑ i ∈ range (D+1), p.coeff i * (i.descFactorial j : ℝ) * t^(i-j)
Proof (Lean source)
-- @node: polyDeriv_eval_coeff_sum lemma polyDeriv_eval_coeff_sum (p : Polynomial ℝ) (D j : ℕ) (hp : p.natDegree ≤ D) (t : ℝ) : (polyDeriv j p).eval t = ∑ i ∈ range (D+1), p.coeff i * (i.descFactorial j : ℝ) * t^(i-j) := by have he := p.as_sum_range_C_mul_X_pow' (n := D+1) (by omega) conv_lhs => rw [he, polyDeriv_sum] simp only [polyDeriv_C_mul, polyDeriv_X_pow, Polynomial.eval_finsetSum, Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_pow, Polynomial.eval_X, mul_assoc]
CausalSmith.Stat.NoisydoseWeakdesignTransition.polyDeriv_eval_coeff_sum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:276
theorem polyDeriv_eval_le_coeff_mass

On the unit interval, coefficient absolute mass controls every polynomial derivative, with the descending factorial of any public degree bound. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
D j :
ℕ
hp :
p.natDegree ≤ D
t :
ℝ
ht :
|t| ≤ 1
|(polyDeriv j p).eval t|
≤ (∑ i ∈ range (D+1), |p.coeff i|) * (D.descFactorial j : ℝ)
Proof (Lean source)
-- @node: polyDeriv_eval_le_coeff_mass lemma polyDeriv_eval_le_coeff_mass (p : Polynomial ℝ) (D j : ℕ) (hp : p.natDegree ≤ D) (t : ℝ) (ht : |t| ≤ 1) : |(polyDeriv j p).eval t| ≤ (∑ i ∈ range (D+1), |p.coeff i|) * (D.descFactorial j : ℝ) := by rw [polyDeriv_eval_coeff_sum p D j hp t, Finset.sum_mul] apply (Finset.abs_sum_le_sum_abs _ _).trans apply Finset.sum_le_sum intro i hi have hiD : i ≤ D := by have := Finset.mem_range.mp hi; omega have hf : (i.descFactorial j : ℝ) ≤ (D.descFactorial j : ℝ) := by exact_mod_cast Nat.descFactorial_le j hiD have htone : |t|^(i-j) ≤ 1 := pow_le_one₀ (abs_nonneg _) ht rw [abs_mul, abs_mul, abs_pow, abs_of_nonneg (by positivity : 0 ≤ (i.descFactorial j : ℝ))] calc _ ≤ |p.coeff i| * (i.descFactorial j : ℝ) * 1 := mul_le_mul_of_nonneg_left htone (by positivity) _ ≤ |p.coeff i| * (D.descFactorial j : ℝ) := by simpa only [mul_one] using mul_le_mul_of_nonneg_left hf (abs_nonneg _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.polyDeriv_eval_le_coeff_mass · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:287
theorem finiteInverseHeat_second_moment_le_coeff_mass

The exact Hermite second moment has an unconditional coefficient-mass envelope. This isolates the remaining exponential coefficient estimate in S13 from all Gaussian algebra. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
D :
ℕ
hp :
p.natDegree ≤ D
t sigma :
ℝ
ht :
|t| ≤ 1
(∫ z, ((finiteInverseHeat D sigma p).eval (t+sigma*z))^2 ∂gaussianReal 0 1)
≤ (∑ i ∈ range (D+1), |p.coeff i|)^2 * (1+(D : ℝ)*sigma^2)^D
Proof (Lean source)
-- @node: finiteInverseHeat_second_moment_le_coeff_mass lemma finiteInverseHeat_second_moment_le_coeff_mass (p : Polynomial ℝ) (D : ℕ) (hp : p.natDegree ≤ D) (t sigma : ℝ) (ht : |t| ≤ 1) : (∫ z, ((finiteInverseHeat D sigma p).eval (t+sigma*z))^2 ∂gaussianReal 0 1) ≤ (∑ i ∈ range (D+1), |p.coeff i|)^2 * (1+(D : ℝ)*sigma^2)^D := by apply finiteInverseHeat_gaussian_second_moment_le p D hp t sigma (∑ i ∈ range (D+1), |p.coeff i|) (Finset.sum_nonneg (fun _ _ => abs_nonneg _)) intro j _ exact polyDeriv_eval_le_coeff_mass p D j hp t ht
CausalSmith.Stat.NoisydoseWeakdesignTransition.finiteInverseHeat_second_moment_le_coeff_mass · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:309

The declared polynomial inverse has a public variance bound computed directly from its finite monomial coefficients, with no derivative-bound premise (roadmap S13). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
Vq kappa sigma (ellM sigma m)
≤ 16 * weightMoment kappa (fun _ => 1) * ((∑ i ∈ range (6*(m-1)+1), |(qMPoly m).coeff i|)^2 * (1 + (6*(m-1) : ℕ)*sigma^2)^(6*(m-1)))
Proof (Lean source)
-- @node: ellM_Vq_le_coeff_mass lemma ellM_Vq_le_coeff_mass (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) : Vq kappa sigma (ellM sigma m) ≤ 16 * weightMoment kappa (fun _ => 1) * ((∑ i ∈ range (6*(m-1)+1), |(qMPoly m).coeff i|)^2 * (1 + (6*(m-1) : ℕ)*sigma^2)^(6*(m-1))) := by apply ellM_Vq_le_of_derivative_bound kappa sigma hkappa m (∑ i ∈ range (6*(m-1)+1), |(qMPoly m).coeff i|) (Finset.sum_nonneg (fun _ _ => abs_nonneg _)) intro t ht j _ apply polyDeriv_eval_le_coeff_mass (qMPoly m) (6*(m-1)) j (qMPoly_natDegree_le m) rw [abs_le] constructor <;> linarith [ht.1, ht.2]
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_Vq_le_coeff_mass · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:321

With zero noise, only the zeroth derivative survives in the inverse-heat sum. This is the stated conclusion.

Formal statement
m :
ℕ
t :
ℝ
ellM 0 m t = qM m t
Proof (Lean source)
-- @node: ellM_zero_noise lemma ellM_zero_noise (m : ℕ) (t : ℝ) : ellM 0 m t = qM m t := by unfold ellM rw [Finset.sum_eq_single 0] · simp [qM] · intro j hj hjzero simp [hjzero] · simp
theorem ellM_zero_noise_inverse Lemma ellM_zero_noise_inverse in the paper ↗

At zero noise the polynomial pair satisfies the exact inverse relation directly. This is the stated conclusion.

Formal statement
m :
ℕ
t :
ℝ
(∫ z, ellM 0 m (t+0*z) ∂gaussianReal 0 1) = qM m t
Proof (Lean source)
-- @node: ellM_zero_noise_inverse lemma ellM_zero_noise_inverse (m : ℕ) (t : ℝ) : (∫ z, ellM 0 m (t+0*z) ∂gaussianReal 0 1) = qM m t := by simp [ellM_zero_noise]
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_zero_noise_inverse · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:347
theorem inverseheat_pair_admissible_zero

Every valid polynomial pair is admissible in the noiseless channel. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
hvalid :
Odd m ∧ 0 < m
conclusion 1
PairAdmissible kappa 0 ⟨qM m, ellM 0 m⟩
conclusion 2
VqENN kappa 0 (ellM 0 m) < ⊤
Proof (Lean source)
-- @node: inverseheat_pair_admissible_zero lemma inverseheat_pair_admissible_zero (kappa : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) (hvalid : Odd m ∧ 0 < m) : PairAdmissible kappa 0 ⟨qM m, ellM 0 m⟩ ∧ VqENN kappa 0 (ellM 0 m) < ⊤ := by refine ⟨⟨(qM_continuous m).measurable, ellM_measurable 0 m, fun t ht => qM_nonneg m t, qM_weighted_integrable kappa hkappa m, qM_weightMoment_pos kappa hkappa m hvalid.1 hvalid.2, fun t ht => ellM_gaussian_integrable 0 m t, fun t ht => ellM_zero_noise_inverse m t⟩, ellM_VqENN_lt_top kappa 0 hkappa m⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverseheat_pair_admissible_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:353

Degree one gives the constant polynomial weight everywhere. This is the stated conclusion.

Formal statement
t :
ℝ
qM 1 t = 1
Proof (Lean source)
-- @node: qM_one lemma qM_one (t : ℝ) : qM 1 t = 1 := by simp [qM, qMPoly, Polynomial.Chebyshev.U_zero]

The degree-one inverse-heat sum is exactly the constant inverse, for every noise scale. This is the stated conclusion.

Formal statement
sigma t :
ℝ
ellM sigma 1 t = 1
Proof (Lean source)
-- @node: ellM_one lemma ellM_one (sigma t : ℝ) : ellM sigma 1 t = 1 := by simp [ellM, qMPoly, Polynomial.Chebyshev.U_zero]
theorem inverseheat_pair_admissible_one

The constant dictionary pair is admissible without any analytic inversion placeholder. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
conclusion 1
PairAdmissible kappa sigma ⟨qM 1, ellM sigma 1⟩
conclusion 2
VqENN kappa sigma (ellM sigma 1) < ⊤
Proof (Lean source)
-- @node: inverseheat_pair_admissible_one lemma inverseheat_pair_admissible_one (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) : PairAdmissible kappa sigma ⟨qM 1, ellM sigma 1⟩ ∧ VqENN kappa sigma (ellM sigma 1) < ⊤ := by constructor · refine ⟨(qM_continuous 1).measurable, ellM_measurable sigma 1, fun t ht => qM_nonneg 1 t, qM_weighted_integrable kappa hkappa 1, qM_weightMoment_pos kappa hkappa 1 (by decide) (by norm_num), fun t ht => ellM_gaussian_integrable sigma 1 t, ?_⟩ intro t ht simp [ellM_one, qM_one] · have hi : Integrable (fun t : ℝ => |t| ^ kappa) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := by simpa only [qM_one, mul_one] using qM_weighted_integrable kappa hkappa 1 have hfinite : (∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal (|t| ^ kappa)) < ⊤ := (hasFiniteIntegral_iff_ofReal (Eventually.of_forall (fun t : ℝ => Real.rpow_nonneg (abs_nonneg t) kappa))).mp hi.hasFiniteIntegral simpa [VqENN, ellM_one] using ENNReal.mul_lt_top (by norm_num : (16 : ℝ≥0∞) < ⊤) hfinite
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverseheat_pair_admissible_one · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:375
theorem inverseheat_pair_admissible

Exact polynomial inversion has positive finite weighted moments and finite Gaussian second moments. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
m :
ℕ
hvalid :
Odd m ∧ 0 < m
conclusion 1
PairAdmissible kappa sigma ⟨qM m, ellM sigma m⟩
conclusion 2
VqENN kappa sigma (⟨qM m, ellM sigma m⟩ : WeightPair).ell < ⊤
Proof (Lean source)
-- @node: inverseheat_pair_admissible lemma inverseheat_pair_admissible (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (m : ℕ) (hvalid : Odd m ∧ 0 < m) : PairAdmissible kappa sigma ⟨qM m, ellM sigma m⟩ ∧ VqENN kappa sigma (⟨qM m, ellM sigma m⟩ : WeightPair).ell < ⊤ := by by_cases hzero : sigma = 0 · subst sigma exact inverseheat_pair_admissible_zero kappa hkappa.1 m hvalid have hanalytic : (∀ t ∈ Icc (-1/2 : ℝ) (1/2), ∫ z, ellM sigma m (t+sigma*z) ∂gaussianReal 0 1 = qM m t) ∧ VqENN kappa sigma (ellM sigma m) < ⊤ := by refine ⟨?_, ellM_VqENN_lt_top kappa sigma hkappa.1 m⟩ intro t ht exact ellM_gaussian_inverse sigma m t exact ⟨⟨(qM_continuous m).measurable, ellM_measurable sigma m, fun t ht => qM_nonneg m t, qM_weighted_integrable kappa hkappa.1 m, qM_weightMoment_pos kappa hkappa.1 m hvalid.1 hvalid.2, fun t ht => ellM_gaussian_integrable sigma m t, hanalytic.1⟩, hanalytic.2⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverseheat_pair_admissible · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/InverseHeat.lean:395
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.PolynomialEnvelope 15 declarations Finite coefficient algebra completes roadmap S13 for the declared polynomial localization weights.

Exponential polynomial variance envelope

Finite coefficient algebra completes roadmap S13 for the declared polynomial localization weights. The second-kind Chebyshev recurrence bounds coefficient mass by an exponential; the quadratic substitution and sixth power preserve an exponential degree bound. Combining this with the exact Gaussian second-moment calculation gives a public variance envelope.

The coefficient norm may be computed over any range beyond the degree. Under the stated conditions. This is the stated conclusion.

Formal statement
p :
ℝ[X]
D :
ℕ
hp :
p.natDegree ≤ D
polynomialCoeffOneNorm p = ∑ i ∈ range (D+1), |p.coeff i|
Proof (Lean source)
-- @node: coeffOneNorm_range lemma coeffOneNorm_range (p : ℝ[X]) (D : ℕ) (hp : p.natDegree ≤ D) : polynomialCoeffOneNorm p = ∑ i ∈ range (D+1), |p.coeff i| := by exact p.sum_over_range' (fun _ => abs_zero) (D+1) (by omega)

The coefficient norm is nonnegative. This is the stated conclusion.

Formal statement
p :
ℝ[X]
Proof (Lean source)
-- @node: coeffOneNorm_nonneg lemma coeffOneNorm_nonneg (p : ℝ[X]) : 0 ≤ polynomialCoeffOneNorm p := by exact Finset.sum_nonneg (fun _ _ => abs_nonneg _)

Coefficientwise triangle inequalities control sums and differences. This is the stated conclusion.

Formal statement
p q :
ℝ[X]
Proof (Lean source)
-- @node: coeffOneNorm_add_le lemma coeffOneNorm_add_le (p q : ℝ[X]) : polynomialCoeffOneNorm (p+q) ≤ polynomialCoeffOneNorm p + polynomialCoeffOneNorm q := by rw [coeffOneNorm_range (p+q) _ (natDegree_add_le _ _), coeffOneNorm_range p _ (le_max_left _ _), coeffOneNorm_range q _ (le_max_right _ _), ← Finset.sum_add_distrib] exact Finset.sum_le_sum (fun i _ => by simpa using abs_add_le (p.coeff i) (q.coeff i))

Differences obey the same coefficientwise triangle inequality. This is the stated conclusion.

Formal statement
p q :
ℝ[X]
Proof (Lean source)
-- @node: coeffOneNorm_sub_le lemma coeffOneNorm_sub_le (p q : ℝ[X]) : polynomialCoeffOneNorm (p-q) ≤ polynomialCoeffOneNorm p + polynomialCoeffOneNorm q := by rw [coeffOneNorm_range (p-q) _ (natDegree_sub_le _ _), coeffOneNorm_range p _ (le_max_left _ _), coeffOneNorm_range q _ (le_max_right _ _), ← Finset.sum_add_distrib] exact Finset.sum_le_sum (fun i _ => by simpa using abs_sub (p.coeff i) (q.coeff i))

Constant multiplication scales coefficient mass exactly. This is the stated conclusion.

Formal statement
c :
ℝ
p :
ℝ[X]
Proof (Lean source)
-- @node: coeffOneNorm_C_mul lemma coeffOneNorm_C_mul (c : ℝ) (p : ℝ[X]) : polynomialCoeffOneNorm (C c * p) = |c| * polynomialCoeffOneNorm p := by rw [coeffOneNorm_range (C c * p) _ (natDegree_C_mul_le _ _), coeffOneNorm_range p _ le_rfl] simp only [coeff_C_mul, abs_mul, Finset.mul_sum]

Finite sums preserve the coefficient triangle inequality. Under the stated conditions. This is the stated conclusion.

Formal statement
s :
Finset ℕ
f :
ℕ → ℝ[X]
polynomialCoeffOneNorm (∑ i ∈ s, f i) ≤ ∑ i ∈ s, polynomialCoeffOneNorm (f i)
Proof (Lean source)
-- @node: coeffOneNorm_sum_le lemma coeffOneNorm_sum_le (s : Finset ℕ) (f : ℕ → ℝ[X]) : polynomialCoeffOneNorm (∑ i ∈ s, f i) ≤ ∑ i ∈ s, polynomialCoeffOneNorm (f i) := by classical induction s using Finset.induction_on with | empty => simp [polynomialCoeffOneNorm, polyCoeffL1] | @insert i s hi ih => simp only [Finset.sum_insert hi] exact (coeffOneNorm_add_le _ _).trans (add_le_add_right ih _)

Submultiplicativity iterates to every finite power. This is the stated conclusion.

Formal statement
p :
ℝ[X]
j :
ℕ
Proof (Lean source)
-- @node: coeffOneNorm_pow_le lemma coeffOneNorm_pow_le (p : ℝ[X]) (j : ℕ) : polynomialCoeffOneNorm (p^j) ≤ (polynomialCoeffOneNorm p)^j := by induction j with | zero => rw [pow_zero, pow_zero, coeffOneNorm_range 1 0 (by simp)] norm_num | succ j ih => rw [pow_succ, pow_succ] exact (polynomialCoeffOneNorm_mul_le _ _).trans (mul_le_mul_of_nonneg_right ih (coeffOneNorm_nonneg p))
theorem chebyshevU_coeffOneNorm_le Lemma chebyshevU_coeffOneNorm_le in the paper ↗

The second-kind Chebyshev recurrence gives an exponential coefficient envelope. This is the stated conclusion.

Formal statement
n :
ℕ
polynomialCoeffOneNorm (Chebyshev.U ℝ (n : ℤ)) ≤ (3 : ℝ)^n
Proof (Lean source)
-- @node: chebyshevU_coeffOneNorm_le lemma chebyshevU_coeffOneNorm_le (n : ℕ) : polynomialCoeffOneNorm (Chebyshev.U ℝ (n : ℤ)) ≤ (3 : ℝ)^n := by have hX : polynomialCoeffOneNorm (X : ℝ[X]) = 1 := by rw [coeffOneNorm_range X 1 (by simp)] norm_num [Finset.sum_range_succ, coeff_X] induction n using Nat.twoStepInduction with | zero => rw [Nat.cast_zero, Chebyshev.U_zero, coeffOneNorm_range 1 0 (by simp)] norm_num | one => rw [Nat.cast_one, Chebyshev.U_one, ← C_ofNat, coeffOneNorm_C_mul, hX] norm_num | more n hn hn1 => have heq : Chebyshev.U ℝ ((n+2 : ℕ) : ℤ) = C 2 * (X * Chebyshev.U ℝ ((n+1 : ℕ) : ℤ)) - Chebyshev.U ℝ (n : ℤ) := by convert Chebyshev.U_add_two ℝ (n : ℤ) using 1 <;> norm_num <;> simp only [C_ofNat] <;> ring rw [heq] calc _ ≤ polynomialCoeffOneNorm (C 2 * (X * Chebyshev.U ℝ ((n+1 : ℕ) : ℤ))) + polynomialCoeffOneNorm (Chebyshev.U ℝ (n : ℤ)) := coeffOneNorm_sub_le _ _ _ ≤ 2 * (polynomialCoeffOneNorm X * polynomialCoeffOneNorm (Chebyshev.U ℝ ((n+1 : ℕ) : ℤ))) + polynomialCoeffOneNorm (Chebyshev.U ℝ (n : ℤ)) := by rw [coeffOneNorm_C_mul]; norm_num only [abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 2)] gcongr exact polynomialCoeffOneNorm_mul_le _ _ _ ≤ 2 * (3 : ℝ)^(n+1) + (3 : ℝ)^n := by rw [hX, one_mul]; gcongr _ ≤ (3 : ℝ)^(n+2) := by rw [show n+2 = (n+1)+1 by omega] simp only [pow_succ] nlinarith [pow_nonneg (by norm_num : (0 : ℝ) ≤ 3) n]
CausalSmith.Stat.NoisydoseWeakdesignTransition.chebyshevU_coeffOneNorm_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialEnvelope.lean:82
theorem abs_coeff_le_coeffOneNorm Lemma abs_coeff_le_coeffOneNorm in the paper ↗

Each coefficient is bounded by the whole coefficient mass. This is the stated conclusion.

Formal statement
p :
ℝ[X]
i :
ℕ
|p.coeff i| ≤ polynomialCoeffOneNorm p
Proof (Lean source)
-- @node: abs_coeff_le_coeffOneNorm lemma abs_coeff_le_coeffOneNorm (p : ℝ[X]) (i : ℕ) : |p.coeff i| ≤ polynomialCoeffOneNorm p := by by_cases hi : i ∈ p.support · change |p.coeff i| ≤ ∑ j ∈ p.support, |p.coeff j| exact Finset.single_le_sum (f := fun j => |p.coeff j|) (fun _ _ => abs_nonneg _) hi · simp only [mem_support_iff, not_not] at hi rw [hi, abs_zero] exact coeffOneNorm_nonneg p
CausalSmith.Stat.NoisydoseWeakdesignTransition.abs_coeff_le_coeffOneNorm · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialEnvelope.lean:117
theorem localizationQuadratic_coeffOneNorm Lemma localizationQuadratic_coeffOneNorm in the paper ↗

The quadratic substitution in the declared localization weight has coefficient mass five. This is the stated conclusion.

Formal statement
polynomialCoeffOneNorm (1 - C 4 * X^2 : ℝ[X]) = 5
Proof (Lean source)
-- @node: localizationQuadratic_coeffOneNorm lemma localizationQuadratic_coeffOneNorm : polynomialCoeffOneNorm (1 - C 4 * X^2 : ℝ[X]) = 5 := by rw [coeffOneNorm_range _ 2 (by compute_degree)] norm_num [Finset.sum_range_succ, coeff_sub, coeff_C_mul, coeff_X_pow, coeff_one]
CausalSmith.Stat.NoisydoseWeakdesignTransition.localizationQuadratic_coeffOneNorm · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialEnvelope.lean:128

Direct finite Chebyshev algebra bounds the declared sixth-power weight exponentially in its degree. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
0 < m
polynomialCoeffOneNorm (qMPoly m) ≤ (15 : ℝ)^(6*(m-1))
Proof (Lean source)
-- @node: qMPoly_coeffOneNorm_le lemma qMPoly_coeffOneNorm_le (m : ℕ) (hm : 0 < m) : polynomialCoeffOneNorm (qMPoly m) ≤ (15 : ℝ)^(6*(m-1)) := by have hmreal : 0 < (m : ℝ) := by exact_mod_cast hm let f : ℕ → ℝ[X] := fun k => C ((Chebyshev.U ℝ (m-1 : ℕ)).coeff (2*k) / (m : ℝ)) * (1 - C 4 * X^2)^k have hterm : ∀ k ∈ range m, polynomialCoeffOneNorm (f k) ≤ (15 : ℝ)^(m-1) / m := by intro k hk have hk' : k ≤ m-1 := by have := Finset.mem_range.mp hk; omega have hc := (abs_coeff_le_coeffOneNorm (Chebyshev.U ℝ (m-1 : ℕ)) (2*k)).trans (chebyshevU_coeffOneNorm_le (m-1)) dsimp [f] rw [coeffOneNorm_C_mul, abs_div, abs_of_pos hmreal] calc _ ≤ ((3 : ℝ)^(m-1) / m) * 5^k := by exact mul_le_mul (div_le_div_of_nonneg_right hc hmreal.le) ((coeffOneNorm_pow_le _ k).trans_eq (by rw [localizationQuadratic_coeffOneNorm])) (coeffOneNorm_nonneg _) (by positivity) _ ≤ ((3 : ℝ)^(m-1) / m) * 5^(m-1) := by gcongr; norm_num _ = (15 : ℝ)^(m-1) / m := by rw [div_mul_eq_mul_div, ← mul_pow]; norm_num have hbase : polynomialCoeffOneNorm (∑ k ∈ range m, f k) ≤ (15 : ℝ)^(m-1) := by apply (coeffOneNorm_sum_le _ _).trans calc _ ≤ ∑ k ∈ range m, (15 : ℝ)^(m-1) / m := Finset.sum_le_sum hterm _ = _ := by simp; field_simp change polynomialCoeffOneNorm ((∑ k ∈ range m, f k)^6) ≤ _ apply (coeffOneNorm_pow_le _ 6).trans have hb := pow_le_pow_left₀ (coeffOneNorm_nonneg _) hbase 6 simpa only [← pow_mul, Nat.mul_comm] using hb

The declared polynomial's finite coefficient sum has the exponential degree envelope in S13. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
0 < m
(∑ i ∈ range (6*(m-1)+1), |(qMPoly m).coeff i|) ≤ (15 : ℝ)^(6*(m-1))
Proof (Lean source)
-- @node: qMPoly_coeff_mass_le lemma qMPoly_coeff_mass_le (m : ℕ) (hm : 0 < m) : (∑ i ∈ range (6*(m-1)+1), |(qMPoly m).coeff i|) ≤ (15 : ℝ)^(6*(m-1)) := by rw [← coeffOneNorm_range (qMPoly m) _ (qMPoly_natDegree_le m)] exact qMPoly_coeffOneNorm_le m hm
theorem ellM_Vq_exponential_envelope Lemma ellM_Vq_exponential_envelope in the paper ↗

The exact inverse-heat variance has a public exponential envelope, without a derivative premise. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
hm :
0 < m
Vq kappa sigma (ellM sigma m)
≤ 16 * weightMoment kappa (fun _ => 1) * ((15 : ℝ)^(2*(6*(m-1))) * (1 + (6*(m-1) : ℕ)*sigma^2)^(6*(m-1)))
Proof (Lean source)
-- @node: ellM_Vq_exponential_envelope lemma ellM_Vq_exponential_envelope (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) (hm : 0 < m) : Vq kappa sigma (ellM sigma m) ≤ 16 * weightMoment kappa (fun _ => 1) * ((15 : ℝ)^(2*(6*(m-1))) * (1 + (6*(m-1) : ℕ)*sigma^2)^(6*(m-1))) := by have hw : 0 ≤ weightMoment kappa (fun _ => 1) := integral_nonneg (fun t => mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (by norm_num)) apply (ellM_Vq_le_coeff_mass kappa sigma hkappa m).trans apply mul_le_mul_of_nonneg_left _ (mul_nonneg (by norm_num) hw) apply mul_le_mul_of_nonneg_right _ (by positivity) have hb := pow_le_pow_left₀ (Finset.sum_nonneg (fun i (_ : i ∈ range (6*(m-1)+1)) => abs_nonneg ((qMPoly m).coeff i))) (qMPoly_coeff_mass_le m hm) 2 simpa only [← pow_mul, Nat.mul_comm] using hb
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_Vq_exponential_envelope · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialEnvelope.lean:175
theorem constant_weightMoment_le_one Lemma constant_weightMoment_le_one in the paper ↗

The unit latent weight has weighted mass at most one for nonnegative design exponents. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
weightMoment kappa (fun _ => 1) ≤ 1
Proof (Lean source)
-- @node: constant_weightMoment_le_one lemma constant_weightMoment_le_one (kappa : ℝ) (hkappa : 0 ≤ kappa) : weightMoment kappa (fun _ => 1) ≤ 1 := by have hi : Integrable (fun t : ℝ => |t| ^ kappa) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := by simpa only [qM_one, mul_one] using qM_weighted_integrable kappa hkappa 1 have hb : ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), |t| ^ kappa ≤ 1 := by filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht apply Real.rpow_le_one (abs_nonneg _) _ hkappa rw [abs_le] constructor <;> linarith [ht.1, ht.2] have h := integral_mono_ae hi (integrable_const (1 : ℝ)) hb norm_num [weightMoment, Real.volume_Icc] at h ⊢ exact h
CausalSmith.Stat.NoisydoseWeakdesignTransition.constant_weightMoment_le_one · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialEnvelope.lean:193

S13 holds with explicit universal coefficient base and prefactor. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
hm :
0 < m
Vq kappa sigma (ellM sigma m)
≤ 16 * (15 : ℝ)^(2*(6*(m-1))) * (1 + (6*(m-1) : ℕ)*sigma^2)^(6*(m-1))
Proof (Lean source)
-- @node: ellM_Vq_explicit_bound lemma ellM_Vq_explicit_bound (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) (hm : 0 < m) : Vq kappa sigma (ellM sigma m) ≤ 16 * (15 : ℝ)^(2*(6*(m-1))) * (1 + (6*(m-1) : ℕ)*sigma^2)^(6*(m-1)) := by apply (ellM_Vq_exponential_envelope kappa sigma hkappa m hm).trans calc _ ≤ 16 * 1 * ((15 : ℝ)^(2*(6*(m-1))) * (1 + (6*(m-1) : ℕ)*sigma^2)^(6*(m-1))) := by apply mul_le_mul_of_nonneg_right _ (by positivity) exact mul_le_mul_of_nonneg_left (constant_weightMoment_le_one kappa hkappa) (by norm_num) _ = _ := by ring
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.PolynomialLocalization 13 declarations Roadmap S11: the odd polynomial weight is bounded by one, has a sixth-order tail, and is bounded below on an interval of radius proportional to the inverse degree.

Polynomial localization bounds

Roadmap S11: the odd polynomial weight is bounded by one, has a sixth-order tail, and is bounded below on an interval of radius proportional to the inverse degree. These estimates use the declared trigonometric representation, including its value at zero.

theorem polynomial_abs_sin_nat_mul_le Lemma polynomial_abs_sin_nat_mul_le in the paper ↗

The addition formula bounds the sine of an integer multiple. This is the stated conclusion.

Formal statement
m :
ℕ
z :
ℝ
|sin ((m : ℝ)*z)| ≤ (m : ℝ)*|sin z|
Proof (Lean source)
-- @node: polynomial_abs_sin_nat_mul_le lemma polynomial_abs_sin_nat_mul_le (m : ℕ) (z : ℝ) : |sin ((m : ℝ)*z)| ≤ (m : ℝ)*|sin z| := by induction m with | zero => simp | succ m ih => rw [Nat.cast_succ, add_mul, one_mul, Real.sin_add] calc _ ≤ |sin ((m : ℝ)*z)*cos z| + |cos ((m : ℝ)*z)*sin z| := abs_add_le _ _ _ ≤ |sin ((m : ℝ)*z)| + |sin z| := by rw [abs_mul, abs_mul] exact add_le_add (by simpa using mul_le_mul_of_nonneg_left (Real.abs_cos_le_one z) (abs_nonneg (sin ((m : ℝ)*z)))) (by simpa using mul_le_mul_of_nonneg_right (Real.abs_cos_le_one ((m : ℝ)*z)) (abs_nonneg (sin z))) _ ≤ _ := by nlinarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_abs_sin_nat_mul_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialLocalization.lean:19

The normalized sine quotient never exceeds one on the latent support. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
Odd m
hmpos :
0 < m
t :
ℝ
ht :
t ∈ Icc (-1/2 : ℝ) (1/2)
qM m t ≤ 1
Proof (Lean source)
-- @node: qM_le_one lemma qM_le_one (m : ℕ) (hm : Odd m) (hmpos : 0 < m) (t : ℝ) (ht : t ∈ Icc (-1/2 : ℝ) (1/2)) : qM m t ≤ 1 := by rw [qM_trig m hm hmpos t ht] split_ifs with htzero · norm_num · have hmR : 0 < (m : ℝ) := by exact_mod_cast hmpos have hsin := polynomial_abs_sin_nat_mul_le m (arcsin (2*t)) rw [Real.sin_arcsin (by linarith [ht.1]) (by linarith [ht.2]), abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 2)] at hsin have hquot : |sin (m*arcsin (2*t)) / (2*m*t)| ≤ 1 := by rw [abs_div, div_le_one (by positivity : 0 < |(2 : ℝ)*m*t|)] simpa [abs_mul, abs_of_pos hmR, mul_assoc, mul_left_comm, mul_comm] using hsin have hp := pow_le_pow_left₀ (abs_nonneg _) hquot 6 simpa only [pow_abs_two_mul (n := 3), one_pow] using hp

The numerator's unit bound gives sixth-order decay away from the target. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
Odd m
hmpos :
0 < m
t :
ℝ
ht :
t ∈ Icc (-1/2 : ℝ) (1/2)
htzero :
t ≠ 0
qM m t ≤ (1 / (2*(m : ℝ)*|t|))^6
Proof (Lean source)
-- @node: qM_tail_bound lemma qM_tail_bound (m : ℕ) (hm : Odd m) (hmpos : 0 < m) (t : ℝ) (ht : t ∈ Icc (-1/2 : ℝ) (1/2)) (htzero : t ≠ 0) : qM m t ≤ (1 / (2*(m : ℝ)*|t|))^6 := by rw [qM_trig m hm hmpos t ht, if_neg htzero] have hmR : 0 < (m : ℝ) := by exact_mod_cast hmpos have hquot : |sin (m*arcsin (2*t)) / (2*m*t)| ≤ 1 / (2*(m : ℝ)*|t|) := by rw [abs_div, abs_mul, abs_mul, abs_of_pos hmR, abs_of_pos (by norm_num : (0 : ℝ) < 2)] exact div_le_div_of_nonneg_right (Real.abs_sin_le_one _) (by positivity) have hp := pow_le_pow_left₀ (abs_nonneg _) hquot 6 simpa only [pow_abs_two_mul (n := 3)] using hp
theorem polynomial_arcsin_bounds Lemma polynomial_arcsin_bounds in the paper ↗

Jordan's inequality controls arcsine linearly throughout the dose support. This is the stated conclusion. Under the stated conditions.

Formal statement
t :
ℝ
ht :
t ∈ Icc (-1/2 : ℝ) (1/2)
conclusion 1
2*|t| ≤ |arcsin (2*t)|
conclusion 2
|arcsin (2*t)| ≤ pi*|t|
Proof (Lean source)
-- @node: polynomial_arcsin_bounds lemma polynomial_arcsin_bounds (t : ℝ) (ht : t ∈ Icc (-1/2 : ℝ) (1/2)) : 2*|t| ≤ |arcsin (2*t)| ∧ |arcsin (2*t)| ≤ pi*|t| := by have hs : sin (arcsin (2*t)) = 2*t := Real.sin_arcsin (by linarith [ht.1]) (by linarith [ht.2]) have ha : |arcsin (2*t)| ≤ pi/2 := abs_le.mpr ⟨Real.neg_pi_div_two_le_arcsin _, Real.arcsin_le_pi_div_two _⟩ have hl := Real.abs_sin_le_abs (x := arcsin (2*t)) have hu := Real.mul_abs_le_abs_sin ha rw [hs, abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 2)] at hl hu refine ⟨hl, ?_⟩ rw [div_mul_eq_mul_div] at hu have h := (div_le_iff₀ Real.pi_pos).mp hu nlinarith

On the inverse-degree central interval the weight has a fixed positive lower bound. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
Odd m
hmpos :
0 < m
t :
ℝ
ht :
|t| ≤ 1 / (2*(m : ℝ))
(2/pi)^6 ≤ qM m t
Proof (Lean source)
-- @node: qM_central_lower lemma qM_central_lower (m : ℕ) (hm : Odd m) (hmpos : 0 < m) (t : ℝ) (ht : |t| ≤ 1 / (2*(m : ℝ))) : (2/pi)^6 ≤ qM m t := by have hmR : 0 < (m : ℝ) := by exact_mod_cast hmpos have hmone : (1 : ℝ) ≤ m := by exact_mod_cast hmpos have hmt : 2*(m : ℝ)*|t| ≤ 1 := by have h := (le_div_iff₀ (by positivity : 0 < 2*(m : ℝ))).mp ht nlinarith have hsupport : t ∈ Icc (-1/2 : ℝ) (1/2) := by have := mul_le_mul_of_nonneg_right hmone (abs_nonneg t) have habs : |t| ≤ 1/2 := by nlinarith exact ⟨by linarith [(abs_le.mp habs).1], by linarith [(abs_le.mp habs).2]⟩ rw [qM_trig m hm hmpos t hsupport] split_ifs with htzero · have hc : 2/pi ≤ 1 := (div_le_one Real.pi_pos).mpr Real.two_le_pi exact (pow_le_pow_left₀ (by positivity) hc 6).trans_eq (by norm_num) · obtain ⟨hl, hu⟩ := polynomial_arcsin_bounds t hsupport have hz : |(m : ℝ)*arcsin (2*t)| ≤ pi/2 := by rw [abs_mul, abs_of_pos hmR] have h := mul_le_mul_of_nonneg_left hu hmR.le have h' := mul_le_mul_of_nonneg_left hmt Real.pi_pos.le nlinarith have hs := Real.mul_abs_le_abs_sin hz rw [abs_mul, abs_of_pos hmR] at hs have hquot : 2/pi ≤ |sin (m*arcsin (2*t)) / (2*m*t)| := by rw [abs_div, abs_mul, abs_mul, abs_of_pos hmR, abs_of_pos (by norm_num : (0 : ℝ) < 2)] apply (le_div_iff₀ (by positivity : 0 < 2*(m : ℝ)*|t|)).mpr have h := mul_le_mul_of_nonneg_left hl (show 0 ≤ (2/pi)*(m : ℝ) by positivity) nlinarith have hp := pow_le_pow_left₀ (by positivity : 0 ≤ 2/pi) hquot 6 simpa only [pow_abs_two_mul (n := 3)] using hp
theorem polynomial_central_power_moment Lemma polynomial_central_power_moment in the paper ↗

Dilation of a central power moment gives the precise localization exponent. Under the stated conditions. This is the stated conclusion.

Formal statement
s h :
ℝ
hh :
0 < h
(∫ t in Icc (-h/2) (h/2), |t|^s) = h^(s+1) * weightMoment s (fun _ => 1)
Proof (Lean source)
-- @node: polynomial_central_power_moment lemma polynomial_central_power_moment (s h : ℝ) (hh : 0 < h) : (∫ t in Icc (-h/2) (h/2), |t|^s) = h^(s+1) * weightMoment s (fun _ => 1) := by have he (t : ℝ) : |t|^s = h^s * |t/h|^s := by have ha : |t| = h * |t/h| := by rw [abs_div, abs_of_pos hh] field_simp rw [ha, Real.mul_rpow hh.le (abs_nonneg _)] rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by linarith : -h/2 ≤ h/2)] conv_lhs => arg 1; ext t; rw [he t] rw [intervalIntegral.integral_const_mul, intervalIntegral.integral_comp_div (fun u : ℝ => |u|^s) hh.ne', smul_eq_mul] have hl : (-h/2)/h = (-1/2 : ℝ) := by field_simp have hu : (h/2)/h = (1/2 : ℝ) := by field_simp rw [hl, hu, intervalIntegral.integral_of_le (by norm_num : (-1/2 : ℝ) ≤ 1/2), ← integral_Icc_eq_integral_Ioc, Real.rpow_add hh, Real.rpow_one] simp only [weightMoment, mul_one] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_central_power_moment · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialLocalization.lean:121

S11's denominator lower bound follows from the fixed central plateau. Under the stated conditions. This is the stated conclusion.

Formal statement
s :
ℝ
hs :
0 ≤ s
m :
ℕ
hm :
Odd m
hmpos :
0 < m
(2/pi)^6 * ((m : ℝ)⁻¹)^(s+1) * weightMoment s (fun _ => 1) ≤ weightMoment s (qM m)
Proof (Lean source)
-- @node: qM_weightMoment_lower lemma qM_weightMoment_lower (s : ℝ) (hs : 0 ≤ s) (m : ℕ) (hm : Odd m) (hmpos : 0 < m) : (2/pi)^6 * ((m : ℝ)⁻¹)^(s+1) * weightMoment s (fun _ => 1) ≤ weightMoment s (qM m) := by let h : ℝ := (m : ℝ)⁻¹ have hmR : 0 < (m : ℝ) := by exact_mod_cast hmpos have hh : 0 < h := inv_pos.mpr hmR have hmone : (1 : ℝ) ≤ m := by exact_mod_cast hmpos have hhone : h ≤ 1 := (inv_le_one₀ hmR).mpr hmone have hsubset : Icc (-h/2) (h/2) ⊆ Icc (-1/2 : ℝ) (1/2) := by intro t ht constructor <;> linarith [ht.1, ht.2] have hcentral : ∀ t ∈ Icc (-h/2) (h/2), (2/pi)^6 ≤ qM m t := by intro t ht apply qM_central_lower m hm hmpos t have ha : |t| ≤ h/2 := abs_le.mpr ⟨by linarith [ht.1], ht.2⟩ convert ha using 1 dsimp [h] field_simp have hi : Integrable (fun t : ℝ => |t|^s) (volume.restrict (Icc (-h/2) (h/2))) := (continuous_abs.rpow_const (fun _ => inr hs)).integrableOn_Icc calc _ = (2/pi)^6 * ∫ t in Icc (-h/2) (h/2), |t|^s := by rw [polynomial_central_power_moment s h hh] simp only [h]; ring _ ≤ ∫ t in Icc (-h/2) (h/2), |t|^s * qM m t := by rw [← integral_const_mul] apply integral_mono_ae (hi.const_mul _) ((qM_weighted_continuous s hs m).integrableOn_Icc) filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht simpa only [mul_comm] using mul_le_mul_of_nonneg_left (hcentral t ht) (Real.rpow_nonneg (abs_nonneg t) s) _ ≤ weightMoment s (qM m) := by apply setIntegral_mono_set (qM_weighted_integrable s hs m) (Eventually.of_forall (fun t => mul_nonneg (Real.rpow_nonneg (abs_nonneg t) s) (qM_nonneg m t))) exact Eventually.of_forall hsubset

A rescaled cubic tail dominates all S11 weighted integrands uniformly in degree. Under the stated conditions. This is the stated conclusion.

Formal statement
s :
ℝ
hs :
s ∈ Icc (0 : ℝ) 3
m :
ℕ
hm :
Odd m
hmpos :
0 < m
t :
ℝ
ht :
t ∈ Icc (-1/2 : ℝ) (1/2)
|t|^s * qM m t ≤ ((m : ℝ)⁻¹)^s * (8 / (1 + |t / (m : ℝ)⁻¹|)^3)
Proof (Lean source)
-- @node: qM_weighted_tail_bound lemma qM_weighted_tail_bound (s : ℝ) (hs : s ∈ Icc (0 : ℝ) 3) (m : ℕ) (hm : Odd m) (hmpos : 0 < m) (t : ℝ) (ht : t ∈ Icc (-1/2 : ℝ) (1/2)) : |t|^s * qM m t ≤ ((m : ℝ)⁻¹)^s * (8 / (1 + |t / (m : ℝ)⁻¹|)^3) := by have hmR : 0 < (m : ℝ) := by exact_mod_cast hmpos let h : ℝ := (m : ℝ)⁻¹ let u : ℝ := t/h have hh : 0 < h := inv_pos.mpr hmR have hscale : |t|^s = h^s * |u|^s := by have ha : |t| = h*|u| := by dsimp [u]; rw [abs_div, abs_of_pos hh]; field_simp rw [ha, Real.mul_rpow hh.le (abs_nonneg _)] have hunit : |u|^s * qM m t ≤ 8 / (1+|u|)^3 := by have ha : 0 ≤ |u| := abs_nonneg u have hp : 0 < 1+|u| := by positivity by_cases hu : |u| ≤ 1 · have hw := Real.rpow_le_one ha hu hs.1 have hq := qM_le_one m hm hmpos t ht have hprod : |u|^s * qM m t ≤ 1 := by nlinarith [Real.rpow_nonneg ha s, qM_nonneg m t] apply hprod.trans apply (le_div_iff₀ (pow_pos hp 3)).mpr have hb := pow_le_pow_left₀ hp.le (show 1+|u| ≤ 2 by linarith) 3 norm_num at hb ⊢ exact hb · have hu1 : 1 ≤ |u| := (lt_of_not_ge hu).le have hup : 0 < |u| := by linarith have htzero : t ≠ 0 := by intro htzero; have : u = 0 := by simp [u, htzero] simp [this] at hu have hw : |u|^s ≤ |u|^(3 : ℕ) := by simpa using Real.rpow_le_rpow_of_exponent_le hu1 hs.2 have hq : qM m t ≤ (1/|u|)^6 := by have htail := qM_tail_bound m hm hmpos t ht htzero have he : 2*(m : ℝ)*|t| = 2*|u| := by simp [u, h, div_eq_mul_inv, abs_mul, abs_of_pos hmR, mul_comm, mul_assoc] rw [he] at htail apply htail.trans apply pow_le_pow_left₀ (by positivity) apply one_div_le_one_div_of_le hup linarith calc _ ≤ |u|^3 * (1/|u|)^6 := mul_le_mul hw hq (qM_nonneg m t) (by positivity) _ = 1/|u|^3 := by field_simp _ ≤ 8/(1+|u|)^3 := by apply (div_le_div_iff₀ (pow_pos hup 3) (pow_pos hp 3)).mpr have hb := pow_le_pow_left₀ hp.le (show 1+|u| ≤ 2*|u| by linarith) 3 nlinarith [hb] rw [hscale, mul_assoc] exact mul_le_mul_of_nonneg_left hunit (Real.rpow_nonneg hh.le s)
theorem polynomial_tail_envelope_integrable Lemma polynomial_tail_envelope_integrable in the paper ↗

The dominating cubic envelope is integrable at every positive localization scale. Under the stated conditions. This is the stated conclusion.

Formal statement
s h :
ℝ
hh :
0 < h
Integrable (fun t : ℝ => h^s * (8 / (1+|t/h|)^3))
Proof (Lean source)
-- @node: polynomial_tail_envelope_integrable lemma polynomial_tail_envelope_integrable (s h : ℝ) (hh : 0 < h) : Integrable (fun t : ℝ => h^s * (8 / (1+|t/h|)^3)) := by have hi : Integrable (fun u : ℝ => (1+‖u‖)^(-(3 : ℝ))) := integrable_one_add_norm (by norm_num) have hd : Integrable (fun u : ℝ => 8/(1+|u|)^3) := by simpa [Real.norm_eq_abs, Real.rpow_neg, div_eq_mul_inv] using hi.const_mul 8 have hc := (integrable_comp_mul_left_iff (fun u : ℝ => 8/(1+|u|)^3) (inv_ne_zero hh.ne')).mpr hd simpa only [← div_eq_inv_mul] using hc.const_mul (h^s)
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_tail_envelope_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialLocalization.lean:236
theorem polynomial_tail_envelope_integral Lemma polynomial_tail_envelope_integral in the paper ↗

The envelope's whole-line integral scales with exactly the S11 moment exponent. Under the stated conditions. This is the stated conclusion.

Formal statement
s h :
ℝ
hh :
0 < h
(∫ t : ℝ, h^s * (8/(1+|t/h|)^3)) = h^(s+1) * (∫ u : ℝ, 8/(1+|u|)^3)
Proof (Lean source)
-- @node: polynomial_tail_envelope_integral lemma polynomial_tail_envelope_integral (s h : ℝ) (hh : 0 < h) : (∫ t : ℝ, h^s * (8/(1+|t/h|)^3)) = h^(s+1) * (∫ u : ℝ, 8/(1+|u|)^3) := by rw [integral_const_mul] have hc := Measure.integral_comp_mul_left (fun u : ℝ => 8/(1+|u|)^3) h⁻¹ simp only [inv_inv, abs_of_pos hh, smul_eq_mul, ← div_eq_inv_mul] at hc rw [hc, Real.rpow_add hh, Real.rpow_one] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_tail_envelope_integral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialLocalization.lean:248

S11's upper bound has a degree-independent constant for every required exponent. Under the stated conditions. This is the stated conclusion.

Formal statement
s :
ℝ
hs :
s ∈ Icc (0 : ℝ) 3
m :
ℕ
hm :
Odd m
hmpos :
0 < m
weightMoment s (qM m) ≤ ((m : ℝ)⁻¹)^(s+1) * (∫ u : ℝ, 8/(1+|u|)^3)
Proof (Lean source)
-- @node: qM_weightMoment_upper lemma qM_weightMoment_upper (s : ℝ) (hs : s ∈ Icc (0 : ℝ) 3) (m : ℕ) (hm : Odd m) (hmpos : 0 < m) : weightMoment s (qM m) ≤ ((m : ℝ)⁻¹)^(s+1) * (∫ u : ℝ, 8/(1+|u|)^3) := by have hmR : 0 < (m : ℝ) := by exact_mod_cast hmpos have hi := polynomial_tail_envelope_integrable s ((m : ℝ)⁻¹) (inv_pos.mpr hmR) calc _ ≤ ∫ t in Icc (-1/2 : ℝ) (1/2), ((m : ℝ)⁻¹)^s * (8/(1+|t/(m : ℝ)⁻¹|)^3) := by apply integral_mono_ae (qM_weighted_integrable s hs.1 m) hi.integrableOn filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht exact qM_weighted_tail_bound s hs m hm hmpos t ht _ ≤ ∫ t : ℝ, ((m : ℝ)⁻¹)^s * (8/(1+|t/(m : ℝ)⁻¹|)^3) := integral_mono_measure Measure.restrict_le_self (Eventually.of_forall (fun t => by positivity)) hi _ = _ := polynomial_tail_envelope_integral s _ (inv_pos.mpr hmR)

The constants in S11 are positive and independent of the odd degree. This is the stated conclusion. Under the stated conditions.

Formal statement
s :
ℝ
hs :
s ∈ Icc (0 : ℝ) 3
∃ c C : ℝ,
0 < c
0 < C
conclusion 1
m :
ℕ
Odd m
0 < m
c * ((m : ℝ)⁻¹)^(s+1) ≤ weightMoment s (qM m)
weightMoment s (qM m) ≤ C * ((m : ℝ)⁻¹)^(s+1)
Proof (Lean source)
-- @node: qM_weightMoment_bounds lemma qM_weightMoment_bounds (s : ℝ) (hs : s ∈ Icc (0 : ℝ) 3) : ∃ c C : ℝ, 0 < c ∧ 0 < C ∧ ∀ m : ℕ, Odd m → 0 < m → c * ((m : ℝ)⁻¹)^(s+1) ≤ weightMoment s (qM m) ∧ weightMoment s (qM m) ≤ C * ((m : ℝ)⁻¹)^(s+1) := by have hI : 0 < weightMoment s (fun _ => 1) := by simpa only [weightMoment, qM_one] using qM_weightMoment_pos s hs.1 1 (by decide) (by norm_num) have hc : 0 < (2/pi)^6 * weightMoment s (fun _ => 1) := by positivity have hC : 0 < ∫ u : ℝ, 8/(1+|u|)^3 := by have hb := qM_weightMoment_upper s hs 1 (by decide) (by norm_num) simp only [Nat.cast_one, inv_one, Real.one_rpow, one_mul, weightMoment, qM_one] at hb exact hI.trans_le hb refine ⟨(2/pi)^6 * weightMoment s (fun _ => 1), ∫ u : ℝ, 8/(1+|u|)^3, hc, hC, ?_⟩ intro m hm hmpos constructor · simpa only [mul_assoc, mul_left_comm, mul_comm] using qM_weightMoment_lower s hs.1 m hm hmpos · simpa only [mul_comm] using qM_weightMoment_upper s hs m hm hmpos

The moment comparison assembles the exact S11 bias rate for every valid degree. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
m :
ℕ
Odd m
0 < m
unitBq beta kappa (qM m) ≤ C * ((m : ℝ)⁻¹)^beta
Proof (Lean source)
-- @node: qM_bias_bound lemma qM_bias_bound (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ m : ℕ, Odd m → 0 < m → unitBq beta kappa (qM m) ≤ C * ((m : ℝ)⁻¹)^beta := by have hs : kappa+beta ∈ Icc (0 : ℝ) 3 := by constructor <;> linarith [hbeta.1, hbeta.2, hkappa.1, hkappa.2] obtain ⟨c, K, hc, hK, hden⟩ := qM_weightMoment_bounds kappa ⟨hkappa.1, by linarith [hkappa.2]⟩ obtain ⟨c', K', hc', hK', hnum⟩ := qM_weightMoment_bounds (kappa+beta) hs refine ⟨64*K'/c, by positivity, ?_⟩ intro m hm hmpos have hmR : 0 < (m : ℝ) := by exact_mod_cast hmpos have hh : 0 < (m : ℝ)⁻¹ := inv_pos.mpr hmR have hlo := (hden m hm hmpos).1 have hhi := (hnum m hm hmpos).2 have hp : 0 < ((m : ℝ)⁻¹)^(kappa+1) := Real.rpow_pos_of_pos hh _ calc unitBq beta kappa (qM m) = 64 * weightMoment (kappa+beta) (qM m) / weightMoment kappa (qM m) := rfl _ ≤ (64 * (K' * ((m : ℝ)⁻¹)^(kappa+beta+1))) / (c * ((m : ℝ)⁻¹)^(kappa+1)) := div_le_div₀ (by positivity) (mul_le_mul_of_nonneg_left hhi (by norm_num)) (mul_pos hc hp) hlo _ = (64*K'/c) * ((m : ℝ)⁻¹)^beta := by rw [show kappa+beta+1 = beta+(kappa+1) by ring, Real.rpow_add hh] field_simp [hp.ne']
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.PolynomialTuning 16 declarations Compact-support dictionary tuning: the odd dyadic degree window (S14) and quantitative control of the exponential inverse-heat variance factor (S15).

Compact-support dictionary tuning: the odd dyadic degree window (S14) and quantitative control of the exponential inverse-heat variance factor (S15).

theorem polynomial_degree_round_down Lemma polynomial_degree_round_down in the paper ↗

Rounding down a target degree at least four gives an available odd degree between one quarter and the target. Under the stated conditions. This is the stated conclusion.

Formal statement
M :
ℝ
hM :
4 ≤ M
∃ j : ℕ,
conclusion 1
Odd (2^j+1)
conclusion 2
M/4 ≤ (2^j+1 : ℕ)
conclusion 3
(2^j+1 : ℕ) ≤ M
Proof (Lean source)
-- @node: polynomial_degree_round_down lemma polynomial_degree_round_down (M : ℝ) (hM : 4 ≤ M) : ∃ j : ℕ, Odd (2^j+1) ∧ M/4 ≤ (2^j+1 : ℕ) ∧ (2^j+1 : ℕ) ≤ M := by obtain ⟨j, hlo, hhi⟩ := exists_nat_pow_near (show (1 : ℝ) ≤ M/2 by linarith) (by norm_num : (1 : ℝ) < 2) have hj : j ≠ 0 := by intro hj subst j norm_num at hhi linarith have heven : Even (2^j : ℕ) := (by decide : Even (2 : ℕ)).pow_of_ne_zero hj refine ⟨j, heven.add_odd (by decide), ?_, ?_⟩ · push_cast rw [pow_succ] at hhi linarith · push_cast linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_degree_round_down · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:15
theorem polynomial_mem_weightDictionary_of_degree

The degree cutoff implies the finite polynomial index cutoff in the public dictionary. Under the stated conditions. This is the stated conclusion.

Formal statement
n j :
ℕ
sigma :
ℝ
hodd :
Odd (2^j+1)
hdegree :
2^j+1 ≤ n^2
DictTag.poly j ∈ weightDictionary n sigma
Proof (Lean source)
-- @node: polynomial_mem_weightDictionary_of_degree lemma polynomial_mem_weightDictionary_of_degree (n j : ℕ) (sigma : ℝ) (hodd : Odd (2^j+1)) (hdegree : 2^j+1 ≤ n^2) : DictTag.poly j ∈ weightDictionary n sigma := by have hj : j < n^2+1 := by have hpow : ∀ k : ℕ, k ≤ 2^k := by intro k induction k with | zero => norm_num | succ j ih => rw [pow_succ] have hp : 1 ≤ 2^j := Nat.one_le_pow j 2 (by omega) omega have := hpow j omega simp only [weightDictionary, List.mem_toFinset, dictionaryList, List.mem_append, List.mem_singleton, List.mem_map, List.mem_filter, List.mem_range] exact inr ⟨j, ⟨hj, by simpa using intro hodd hdegree⟩, rfl⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_mem_weightDictionary_of_degree · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:35
theorem polynomial_dictionary_round_down

S14 rounding gives a dictionary element whenever the target is in the degree window. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
sigma M :
ℝ
hM :
4 ≤ M
hMn :
M ≤ (n : ℝ)^2
∃ j : ℕ,
conclusion 1
DictTag.poly j ∈ weightDictionary n sigma
conclusion 2
Odd (2^j+1)
conclusion 3
M/4 ≤ (2^j+1 : ℕ)
conclusion 4
(2^j+1 : ℕ) ≤ M
Proof (Lean source)
-- @node: polynomial_dictionary_round_down lemma polynomial_dictionary_round_down (n : ℕ) (sigma M : ℝ) (hM : 4 ≤ M) (hMn : M ≤ (n : ℝ)^2) : ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ Odd (2^j+1) ∧ M/4 ≤ (2^j+1 : ℕ) ∧ (2^j+1 : ℕ) ≤ M := by obtain ⟨j, hjodd, hjlo, hjhi⟩ := polynomial_degree_round_down M hM have hjn : 2^j+1 ≤ n^2 := by exact_mod_cast hjhi.trans hMn exact ⟨j, polynomial_mem_weightDictionary_of_degree n j sigma hjodd hjn, hjodd, hjlo, hjhi⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_dictionary_round_down · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:55
theorem polynomial_log_denominator_one_le Lemma polynomial_log_denominator_one_le in the paper ↗

The compact-support logarithmic denominator is at least one, uniformly in noise. Under the stated conditions. This is the stated conclusion.

Formal statement
L sigma :
ℝ
hL :
0 ≤ L
1 ≤ log (exp 1 + sigma^2*L)
Proof (Lean source)
-- @node: polynomial_log_denominator_one_le lemma polynomial_log_denominator_one_le (L sigma : ℝ) (hL : 0 ≤ L) : 1 ≤ log (exp 1 + sigma^2*L) := by simpa only [Real.log_exp] using Real.log_le_log (Real.exp_pos 1) (show exp 1 ≤ exp 1+sigma^2*L by exact le_add_of_nonneg_right (mul_nonneg (sq_nonneg sigma) hL))
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_log_denominator_one_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:66
theorem polynomial_inverseheat_log_bound Lemma polynomial_inverseheat_log_bound in the paper ↗

A degree below L/(4096 B) makes the logarithm of the S13 square-root variance factor at most L/16; the constants are public and independent of noise. Under the stated conditions. This is the stated conclusion.

Formal statement
L sigma :
ℝ
hL :
0 < L
m :
ℕ
hm :
0 < m
hdegree :
(m : ℝ) ≤ L / (4096 * log (exp 1+sigma^2*L))
(6*(m-1 : ℕ) : ℕ) * log 15
+ ((6*(m-1 : ℕ) : ℕ) : ℝ)/2 * log (1+(6*(m-1 : ℕ) : ℕ)*sigma^2)
≤ L/16
Proof (Lean source)
-- @node: polynomial_inverseheat_log_bound lemma polynomial_inverseheat_log_bound (L sigma : ℝ) (hL : 0 < L) (m : ℕ) (hm : 0 < m) (hdegree : (m : ℝ) ≤ L / (4096 * log (exp 1+sigma^2*L))) : (6*(m-1 : ℕ) : ℕ) * log 15 + ((6*(m-1 : ℕ) : ℕ) : ℝ)/2 * log (1+(6*(m-1 : ℕ) : ℕ)*sigma^2) ≤ L/16 := by let B := log (exp 1+sigma^2*L) let D := 6*(m-1 : ℕ) have hB : 1 ≤ B := polynomial_log_denominator_one_le L sigma hL.le have hBpos : 0 < B := by linarith have hD : (D : ℝ) ≤ 6*L/(4096*B) := by have hmle : ((m-1 : ℕ) : ℝ) ≤ m := by exact_mod_cast sub_le m 1 dsimp [D] push_cast calc _ ≤ 6*(m : ℝ) := by gcongr _ ≤ 6*(L/(4096*B)) := mul_le_mul_of_nonneg_left hdegree (by norm_num) _ = _ := by ring have hDs : (D : ℝ)*sigma^2 ≤ 6*(sigma^2*L) := by have hDL : (D : ℝ) ≤ 6*L := hD.trans (div_le_self (by positivity) (by linarith : (1 : ℝ) ≤ 4096*B)) nlinarith [sq_nonneg sigma] have harg : 1+(D : ℝ)*sigma^2 ≤ 6*(exp 1+sigma^2*L) := by have he : 1 ≤ exp 1 := Real.one_le_exp (by norm_num) linarith have hlog : log (1+(D : ℝ)*sigma^2) ≤ B+log 6 := by calc _ ≤ log (6*(exp 1+sigma^2*L)) := Real.log_le_log (by positivity) harg _ = B+log 6 := by rw [Real.log_mul (by norm_num) (by positivity)]; ring have h15 : log 15 ≤ 15 := (Real.log_le_sub_one_of_pos (by norm_num)).trans (by norm_num) have h6 : log 6 ≤ 6 := (Real.log_le_sub_one_of_pos (by norm_num)).trans (by norm_num) have hlog6 : log (1+(D : ℝ)*sigma^2) ≤ B+6 := hlog.trans (by linarith) have hfirst : (D : ℝ)*log 15 + (D : ℝ)/2*log (1+(D : ℝ)*sigma^2) ≤ (D : ℝ)*(15+(B+6)/2) := by nlinarith [mul_nonneg (Nat.cast_nonneg D) (sub_nonneg.mpr h15), mul_nonneg (Nat.cast_nonneg D) (sub_nonneg.mpr hlog6)] calc _ ≤ (D : ℝ)*(15+(B+6)/2) := hfirst _ ≤ (6*L/(4096*B))*(15+(B+6)/2) := mul_le_mul_of_nonneg_right hD (by linarith) _ ≤ L/16 := by -- Clear the positive logarithmic denominator in this numerical inequality. have heq : (6*L/(4096*B))*(15+(B+6)/2) = (6*L*(15+(B+6)/2))/(4096*B) := by ring rw [heq] apply (div_le_iff₀ (show 0 < 4096*B by positivity)).mpr nlinarith [mul_nonneg hL.le (sub_nonneg.mpr hB)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_inverseheat_log_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:74
theorem polynomial_inverseheat_multiplier_bound Lemma polynomial_inverseheat_multiplier_bound in the paper ↗

Exponentiating S15 gives the squared variance multiplier bound directly. Under the stated conditions. This is the stated conclusion.

Formal statement
L sigma :
ℝ
hL :
0 < L
m :
ℕ
hm :
0 < m
hdegree :
(m : ℝ) ≤ L / (4096 * log (exp 1+sigma^2*L))
(15 : ℝ)^(2*(6*(m-1))) * (1+(6*(m-1) : ℕ)*sigma^2)^(6*(m-1)) ≤ exp (L/8)
Proof (Lean source)
-- @node: polynomial_inverseheat_multiplier_bound lemma polynomial_inverseheat_multiplier_bound (L sigma : ℝ) (hL : 0 < L) (m : ℕ) (hm : 0 < m) (hdegree : (m : ℝ) ≤ L / (4096 * log (exp 1+sigma^2*L))) : (15 : ℝ)^(2*(6*(m-1))) * (1+(6*(m-1) : ℕ)*sigma^2)^(6*(m-1)) ≤ exp (L/8) := by have h := polynomial_inverseheat_log_bound L sigma hL m hm hdegree have hbase : 0 < 1+(6*(m-1) : ℕ)*sigma^2 := by positivity rw [← Real.exp_log (by norm_num : (0 : ℝ) < 15), ← Real.exp_nat_mul, ← Real.exp_log hbase, ← Real.exp_nat_mul, ← Real.exp_add] apply Real.exp_le_exp.mpr push_cast at h ⊢ linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_inverseheat_multiplier_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:126
theorem polynomial_target_degree_window

The target degree L/(4096 B) eventually lies between four and n squared, uniformly over the full public noise range (S14). This is the stated conclusion.

Formal statement
∀ᶠ n : ℕ in atTop, ∀ sigma ∈ Icc (0 : ℝ) (1/4), 4
≤ logScale n / (4096*log (exp 1+sigma^2*logScale n)) ∧
logScale n / (4096*log (exp 1+sigma^2*logScale n)) ≤ (n : ℝ)^2
Proof (Lean source)
-- @node: polynomial_target_degree_window lemma polynomial_target_degree_window : ∀ᶠ n : ℕ in atTop, ∀ sigma ∈ Icc (0 : ℝ) (1/4), 4 ≤ logScale n / (4096*log (exp 1+sigma^2*logScale n)) ∧ logScale n / (4096*log (exp 1+sigma^2*logScale n)) ≤ (n : ℝ)^2 := by have hLtop : Tendsto (fun n : ℕ => logScale n) atTop atTop := Real.tendsto_log_atTop.comp (tendsto_natCast_atTop_atTop.const_mul_atTop (Real.exp_pos 1)) have hshift : Tendsto (fun n : ℕ => exp 1+logScale n) atTop atTop := tendsto_const_nhds.add_atTop hLtop have hsmall := hshift.eventually (Real.isLittleO_log_id_atTop.def (by norm_num : (0 : ℝ) < 1/32768)) filter_upwards [hsmall, hLtop.eventually_ge_atTop (exp 1), (tendsto_natCast_atTop_atTop (R := ℝ)).eventually_ge_atTop (exp 1)] with n hnsmall hLn hnexp intro sigma hsigma have he : 1 ≤ exp 1 := Real.one_le_exp (by norm_num) have hnpos : (0 : ℝ) < n := by linarith have hLpos : 0 < logScale n := by linarith let B := log (exp 1+sigma^2*logScale n) have hB : 1 ≤ B := polynomial_log_denominator_one_le _ _ hLpos.le have hBpos : 0 < B := by linarith have hsig : sigma^2 ≤ 1 := by nlinarith [hsigma.1, hsigma.2] have hBlog : B ≤ log (exp 1+logScale n) := Real.log_le_log (by positivity) (add_le_add le_rfl (mul_le_of_le_one_left hLpos.le hsig)) have hsmall' : log (exp 1+logScale n) ≤ logScale n/16384 := by simp only [id_eq, Real.norm_eq_abs, abs_of_nonneg (by positivity : 0 ≤ exp 1+logScale n)] at hnsmall have := le_abs_self (log (exp 1+logScale n)) linarith have hLbound : logScale n ≤ (n : ℝ)^2 := by have hlog := Real.log_le_sub_one_of_pos (mul_pos (Real.exp_pos 1) hnpos) have hmul := mul_le_mul_of_nonneg_right hnexp hnpos.le dsimp [logScale] nlinarith constructor · apply (le_div_iff₀ (show 0 < 4096*B by positivity)).mpr linarith [hBlog.trans hsmall'] · exact (div_le_self hLpos.le (by linarith : (1 : ℝ) ≤ 4096*B)).trans hLbound
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_target_degree_window · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:141
theorem polynomial_tuned_dictionary_degree

S14 provides an actual odd polynomial dictionary element in the public tuning window. This is the stated conclusion.

Formal statement
∀ᶠ n : ℕ in atTop, ∀ sigma ∈ Icc (0 : ℝ) (1/4), ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ Odd (2^j+1) ∧ logScale n / (16384*log (exp 1+sigma^2*logScale n))
≤ (2^j+1 : ℕ) ∧ (2^j+1 : ℕ) ≤ logScale n / (4096*log (exp 1+sigma^2*logScale n))
Proof (Lean source)
-- @node: polynomial_tuned_dictionary_degree lemma polynomial_tuned_dictionary_degree : ∀ᶠ n : ℕ in atTop, ∀ sigma ∈ Icc (0 : ℝ) (1/4), ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ Odd (2^j+1) ∧ logScale n / (16384*log (exp 1+sigma^2*logScale n)) ≤ (2^j+1 : ℕ) ∧ (2^j+1 : ℕ) ≤ logScale n / (4096*log (exp 1+sigma^2*logScale n)) := by filter_upwards [polynomial_target_degree_window] with n hn intro sigma hsigma obtain ⟨j, hjmem, hjodd, hjlo, hjhi⟩ := polynomial_dictionary_round_down n sigma _ (hn sigma hsigma).1 (hn sigma hsigma).2 exact ⟨j, hjmem, hjodd, by convert hjlo using 1 <;> ring, hjhi⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_tuned_dictionary_degree · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:185
theorem polynomial_inverseheat_multiplier_sample_bound

At logarithmic sample sizes at least two, the squared S15 multiplier is at most n^(1/4). Under the stated conditions. This is the stated conclusion.

Formal statement
n m :
ℕ
sigma :
ℝ
hn :
0 < n
hL :
2 ≤ logScale n
hm :
0 < m
hdegree :
(m : ℝ) ≤ logScale n / (4096*log (exp 1+sigma^2*logScale n))
(15 : ℝ)^(2*(6*(m-1))) * (1+(6*(m-1) : ℕ)*sigma^2)^(6*(m-1)) ≤ (n : ℝ)^(1/4 : ℝ)
Proof (Lean source)
-- @node: polynomial_inverseheat_multiplier_sample_bound lemma polynomial_inverseheat_multiplier_sample_bound (n m : ℕ) (sigma : ℝ) (hn : 0 < n) (hL : 2 ≤ logScale n) (hm : 0 < m) (hdegree : (m : ℝ) ≤ logScale n / (4096*log (exp 1+sigma^2*logScale n))) : (15 : ℝ)^(2*(6*(m-1))) * (1+(6*(m-1) : ℕ)*sigma^2)^(6*(m-1)) ≤ (n : ℝ)^(1/4 : ℝ) := by have hnR : (0 : ℝ) < n := by exact_mod_cast hn have hLn : logScale n = 1+log n := by rw [logScale, Real.log_mul (Real.exp_ne_zero _) hnR.ne', Real.log_exp] apply (polynomial_inverseheat_multiplier_bound (logScale n) sigma (by linarith) m hm hdegree).trans rw [Real.rpow_def_of_pos hnR] apply Real.exp_le_exp.mpr rw [hLn] at hL ⊢ linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_inverseheat_multiplier_sample_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:198
theorem ellM_Vq_tuned_sample_bound

S13 and S15 give a finite public variance bounded by 16 n^(1/4), with no analytic premise on the chosen degree. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
n m :
ℕ
hn :
0 < n
hL :
2 ≤ logScale n
hm :
0 < m
hdegree :
(m : ℝ) ≤ logScale n / (4096*log (exp 1+sigma^2*logScale n))
Vq kappa sigma (ellM sigma m) ≤ 16*(n : ℝ)^(1/4 : ℝ)
Proof (Lean source)
-- @node: ellM_Vq_tuned_sample_bound lemma ellM_Vq_tuned_sample_bound (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (n m : ℕ) (hn : 0 < n) (hL : 2 ≤ logScale n) (hm : 0 < m) (hdegree : (m : ℝ) ≤ logScale n / (4096*log (exp 1+sigma^2*logScale n))) : Vq kappa sigma (ellM sigma m) ≤ 16*(n : ℝ)^(1/4 : ℝ) := by apply (ellM_Vq_explicit_bound kappa sigma hkappa m hm).trans rw [mul_assoc] exact mul_le_mul_of_nonneg_left (polynomial_inverseheat_multiplier_sample_bound n m sigma hn hL hm hdegree) (by norm_num)
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_Vq_tuned_sample_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:215
theorem ellM_tuned_standard_deviation_bound

The tuned Gaussian standard deviation is at most 4 n^(-3/8). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
n m :
ℕ
hn :
0 < n
hL :
2 ≤ logScale n
hm :
0 < m
hdegree :
(m : ℝ) ≤ logScale n / (4096*log (exp 1+sigma^2*logScale n))
sqrt (Vq kappa sigma (ellM sigma m)/n) ≤ 4*(n : ℝ)^(-3/8 : ℝ)
Proof (Lean source)
-- @node: ellM_tuned_standard_deviation_bound lemma ellM_tuned_standard_deviation_bound (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (n m : ℕ) (hn : 0 < n) (hL : 2 ≤ logScale n) (hm : 0 < m) (hdegree : (m : ℝ) ≤ logScale n / (4096*log (exp 1+sigma^2*logScale n))) : sqrt (Vq kappa sigma (ellM sigma m)/n) ≤ 4*(n : ℝ)^(-3/8 : ℝ) := by have hnR : (0 : ℝ) < n := by exact_mod_cast hn apply (Real.sqrt_le_left (by positivity)).mpr calc _ ≤ 16*(n : ℝ)^(1/4 : ℝ)/n := div_le_div_of_nonneg_right (ellM_Vq_tuned_sample_bound kappa sigma hkappa n m hn hL hm hdegree) hnR.le _ = (4*(n : ℝ)^(-3/8 : ℝ))^2 := by rw [mul_pow, ← Real.rpow_two ((n : ℝ)^(-3/8 : ℝ)), ← Real.rpow_mul hnR.le] norm_num only [show (-3/8 : ℝ)*2 = -3/4 by norm_num, show (4 : ℝ)^2 = 16 by norm_num] rw [show (1/4 : ℝ) = 1+(-3/4) by norm_num, Real.rpow_add hnR, Real.rpow_one] field_simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_tuned_standard_deviation_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:227
theorem polynomial_logScale_power_absorption

Fixed logarithmic powers are eventually dominated by n^(3/8). This is the uniform stochastic-to-bias comparison in S16. This is the stated conclusion.

Formal statement
∀ᶠ n : ℕ in atTop, (logScale n)^4 ≤ (n : ℝ)^(3/8 : ℝ)
Proof (Lean source)
-- @node: polynomial_logScale_power_absorption lemma polynomial_logScale_power_absorption : ∀ᶠ n : ℕ in atTop, (logScale n)^4 ≤ (n : ℝ)^(3/8 : ℝ) := by let a : ℝ := (exp 1)^(3/8 : ℝ) have ha : 0 < a := by dsimp [a]; positivity have hsmall := (tendsto_natCast_atTop_atTop.const_mul_atTop (Real.exp_pos 1)).eventually ((isLittleO_log_rpow_rpow_atTop 4 (by norm_num : (0 : ℝ) < 3/8)).def (inv_pos.mpr ha)) filter_upwards [hsmall, eventually_ge_atTop 1] with n hn hn1 have hnR : (0 : ℝ) < n := by exact_mod_cast (show 0 < n by omega) have hL : 0 ≤ logScale n := (logScale_one_le n hn1).trans' (by norm_num) have he : 0 < exp 1*(n : ℝ) := mul_pos (Real.exp_pos 1) hnR simp only [Real.norm_eq_abs, abs_of_nonneg (Real.rpow_nonneg (by positivity) _)] at hn rw [Real.mul_rpow (Real.exp_pos 1).le hnR.le] at hn rw [Real.rpow_ofNat] at hn rw [abs_of_nonneg (by positivity), abs_of_nonneg (by positivity)] at hn have hn' : (logScale n)^4 ≤ a⁻¹*(a*(n : ℝ)^(3/8 : ℝ)) := hn simpa only [← mul_assoc, inv_mul_cancel₀ ha.ne', one_mul] using hn'
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_logScale_power_absorption · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:244
theorem qM_ratio_multiplier_bound Lemma qM_ratio_multiplier_bound in the paper ↗

The S11 denominator lower bound controls the public ratio multiplier. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
0 < C
conclusion 1
m :
ℕ
Odd m
0 < m
12 / unitbq kappa (qM m) ≤ C*(m : ℝ)^(kappa+1)
Proof (Lean source)
-- @node: qM_ratio_multiplier_bound lemma qM_ratio_multiplier_bound (kappa : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ m : ℕ, Odd m → 0 < m → 12 / unitbq kappa (qM m) ≤ C*(m : ℝ)^(kappa+1) := by obtain ⟨c, K, hc, hK, hden⟩ := qM_weightMoment_bounds kappa ⟨hkappa.1, by linarith [hkappa.2]⟩ refine ⟨192/c, by positivity, ?_⟩ intro m hm hmpos have hmR : 0 < (m : ℝ) := by exact_mod_cast hmpos have hl := (hden m hm hmpos).1 have hp : 0 < ((m : ℝ)⁻¹)^(kappa+1) := by positivity calc _ = 192/weightMoment kappa (qM m) := by unfold unitbq; ring _ ≤ 192/(c*((m : ℝ)⁻¹)^(kappa+1)) := div_le_div_of_nonneg_left (by norm_num) (mul_pos hc hp) hl _ = (192/c)*(m : ℝ)^(kappa+1) := by rw [Real.inv_rpow hmR.le] field_simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.qM_ratio_multiplier_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:265
theorem polynomial_stochastic_le_bias

If the logarithmic degree is legal and the uniform logarithmic power is absorbed, the stochastic rate n^(-3/8) m^(kappa+1) is at most the localization bias. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
n m :
ℕ
hn :
1 ≤ n
hm :
0 < m
hmL :
(m : ℝ) ≤ logScale n
habsorb :
(logScale n)^4 ≤ (n : ℝ)^(3/8 : ℝ)
(n : ℝ)^(-3/8 : ℝ)*(m : ℝ)^(kappa+1) ≤ ((m : ℝ)⁻¹)^beta
Proof (Lean source)
-- @node: polynomial_stochastic_le_bias lemma polynomial_stochastic_le_bias (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (n m : ℕ) (hn : 1 ≤ n) (hm : 0 < m) (hmL : (m : ℝ) ≤ logScale n) (habsorb : (logScale n)^4 ≤ (n : ℝ)^(3/8 : ℝ)) : (n : ℝ)^(-3/8 : ℝ)*(m : ℝ)^(kappa+1) ≤ ((m : ℝ)⁻¹)^beta := by have hnR : (0 : ℝ) < n := by exact_mod_cast (show 0 < n by omega) have hm1 : (1 : ℝ) ≤ m := by exact_mod_cast hm have hmR : (0 : ℝ) < m := by linarith have hexp : kappa+beta+1 ≤ 4 := by linarith [hbeta.2, hkappa.2] have hpow : (m : ℝ)^(kappa+beta+1) ≤ (n : ℝ)^(3/8 : ℝ) := by calc _ ≤ (m : ℝ)^(4 : ℝ) := Real.rpow_le_rpow_of_exponent_le hm1 hexp _ = (m : ℝ)^4 := Real.rpow_natCast _ _ _ ≤ (logScale n)^4 := pow_le_pow_left₀ hmR.le hmL 4 _ ≤ _ := habsorb have hb : (n : ℝ)^(-3/8 : ℝ)*(m : ℝ)^(kappa+beta+1) ≤ 1 := by calc _ ≤ (n : ℝ)^(-3/8 : ℝ)*(n : ℝ)^(3/8 : ℝ) := mul_le_mul_of_nonneg_left hpow (by positivity) _ = 1 := by rw [← Real.rpow_add hnR]; norm_num have hident : (n : ℝ)^(-3/8 : ℝ)*(m : ℝ)^(kappa+1) = ((m : ℝ)⁻¹)^beta*((n : ℝ)^(-3/8 : ℝ)*(m : ℝ)^(kappa+beta+1)) := by rw [Real.inv_rpow hmR.le, ← Real.rpow_neg hmR.le] calc _ = (n : ℝ)^(-3/8 : ℝ)*(m : ℝ)^(-beta+(kappa+beta+1)) := by congr 2; ring _ = _ := by rw [Real.rpow_add hmR]; ring rw [hident] simpa only [mul_one] using mul_le_mul_of_nonneg_left hb (by positivity : 0 ≤ ((m : ℝ)⁻¹)^beta)
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_stochastic_le_bias · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:285
theorem qM_tuned_certificate_bound

The rounded polynomial certificate has the inverse-degree bias rate (S16). This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
conclusion 1
0 < C
conclusion 2
∀ᶠ n : ℕ in atTop, ∀ sigma : ℝ, ∀ m : ℕ, Odd m → 0 < m → (m : ℝ)
≤ logScale n/(4096*log (exp 1+sigma^2*logScale n)) → unitAq beta kappa n sigma ⟨qM m, ellM sigma m⟩ ≤ C*((m : ℝ)⁻¹)^beta
Proof (Lean source)
-- @node: qM_tuned_certificate_bound lemma qM_tuned_certificate_bound (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∀ᶠ n : ℕ in atTop, ∀ sigma : ℝ, ∀ m : ℕ, Odd m → 0 < m → (m : ℝ) ≤ logScale n/(4096*log (exp 1+sigma^2*logScale n)) → unitAq beta kappa n sigma ⟨qM m, ellM sigma m⟩ ≤ C*((m : ℝ)⁻¹)^beta := by obtain ⟨Cb, hCb, hb⟩ := qM_bias_bound beta kappa hbeta hkappa obtain ⟨Cr, hCr, hr⟩ := qM_ratio_multiplier_bound kappa hkappa refine ⟨Cb+4*Cr+2*sqrt 3, by positivity, ?_⟩ have hLtop : Tendsto (fun n : ℕ => logScale n) atTop atTop := Real.tendsto_log_atTop.comp (tendsto_natCast_atTop_atTop.const_mul_atTop (Real.exp_pos 1)) filter_upwards [polynomial_logScale_power_absorption, hLtop.eventually_ge_atTop 2, eventually_ge_atTop 1] with n habsorb hL hn intro sigma m hm hmpos hmdegree have hnR : (1 : ℝ) ≤ n := by exact_mod_cast hn have hn0 : 0 < n := by omega have hnR0 : (0 : ℝ) < n := by linarith have hmR : (0 : ℝ) < m := by exact_mod_cast hmpos have hB := polynomial_log_denominator_one_le (logScale n) sigma (by linarith) have hmL : (m : ℝ) ≤ logScale n := hmdegree.trans (div_le_self (by linarith) (by linarith)) have hstoch := polynomial_stochastic_le_bias beta kappa hbeta hkappa n m hn hmpos hmL habsorb have hrnonneg : 0 ≤ 12/unitbq kappa (qM m) := by exact div_nonneg (by norm_num) (div_nonneg (qM_weightMoment_pos kappa hkappa.1 m hm hmpos).le (by norm_num)) have hnoise : 12/unitbq kappa (qM m)*sqrt (Vq kappa sigma (ellM sigma m)/n) ≤ 4*Cr*((m : ℝ)⁻¹)^beta := by calc _ ≤ (Cr*(m : ℝ)^(kappa+1))*(4*(n : ℝ)^(-3/8 : ℝ)) := mul_le_mul (hr m hm hmpos) (ellM_tuned_standard_deviation_bound kappa sigma hkappa.1 n m hn0 hL hmpos hmdegree) (Real.sqrt_nonneg _) (by positivity) _ = 4*Cr*((n : ℝ)^(-3/8 : ℝ)*(m : ℝ)^(kappa+1)) := by ring _ ≤ _ := mul_le_mul_of_nonneg_left hstoch (by positivity) have hfreq : sqrt (3/(n : ℝ)) ≤ sqrt 3*((m : ℝ)⁻¹)^beta := by have hfreqpow : (n : ℝ)^(-1/2 : ℝ) ≤ (n : ℝ)^(-3/8 : ℝ) := Real.rpow_le_rpow_of_exponent_le hnR (by norm_num) have hmone : 1 ≤ (m : ℝ)^(kappa+1) := Real.one_le_rpow (by exact_mod_cast hmpos) (by linarith [hkappa.1]) have hsmall : (n : ℝ)^(-1/2 : ℝ) ≤ ((m : ℝ)⁻¹)^beta := (hfreqpow.trans (le_mul_of_one_le_right (by positivity) hmone)).trans hstoch have hsqrt : sqrt (3/(n : ℝ)) = sqrt 3*(n : ℝ)^(-1/2 : ℝ) := by rw [div_eq_mul_inv, Real.sqrt_mul (by norm_num), ← Real.rpow_neg_one, Real.sqrt_eq_rpow ((n : ℝ)^(-1 : ℝ)), ← Real.rpow_mul hnR0.le] norm_num rw [hsqrt] exact mul_le_mul_of_nonneg_left hsmall (Real.sqrt_nonneg _) unfold unitAq dsimp only calc _ ≤ Cb*((m : ℝ)⁻¹)^beta+4*Cr*((m : ℝ)⁻¹)^beta+ 2*(sqrt 3*((m : ℝ)⁻¹)^beta) := by gcongr · exact hb m hm hmpos _ = _ := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.qM_tuned_certificate_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:317
theorem directScale_eventually_below_log_cutoff

The direct cutoff is eventually below the logarithmic cutoff, so high-noise polynomial tuning selects the third branch of the public frontier. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∀ᶠ n : ℕ in atTop, directScale beta kappa n ≤ (logScale n)^(-1/2 : ℝ)
Proof (Lean source)
-- @node: directScale_eventually_below_log_cutoff lemma directScale_eventually_below_log_cutoff (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∀ᶠ n : ℕ in atTop, directScale beta kappa n ≤ (logScale n)^(-1/2 : ℝ) := by filter_upwards [polynomial_logScale_power_absorption, eventually_ge_atTop 1] with n habsorb hn have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast hn have hn0 : (0 : ℝ) < n := by linarith have hL1 := logScale_one_le n hn have hL0 : 0 < logScale n := by linarith have hd0 : 0 < effDim beta kappa := by unfold effDim; linarith [hbeta.1, hkappa.1] have hd5 : effDim beta kappa ≤ 5 := by unfold effDim; linarith [hbeta.2, hkappa.2] have hLpower : (logScale n)^(effDim beta kappa/2) ≤ (n : ℝ) := by calc _ ≤ (logScale n)^(4 : ℝ) := Real.rpow_le_rpow_of_exponent_le hL1 (by linarith) _ = (logScale n)^4 := Real.rpow_ofNat _ _ _ ≤ (n : ℝ)^(3/8 : ℝ) := habsorb _ ≤ (n : ℝ) := by convert Real.rpow_le_rpow_of_exponent_le hn1 (by norm_num : (3/8 : ℝ) ≤ 1) using 1 rw [Real.rpow_one] have hinv := Real.rpow_le_rpow_of_nonpos (by positivity : 0 < (logScale n)^(effDim beta kappa/2)) hLpower (show -1/effDim beta kappa ≤ 0 from div_nonpos_of_nonpos_of_nonneg (by norm_num) hd0.le) simpa only [directScale, ← Real.rpow_mul hL0.le, show (effDim beta kappa/2)*(-1/effDim beta kappa) = -1/2 by field_simp] using hinv
CausalSmith.Stat.NoisydoseWeakdesignTransition.directScale_eventually_below_log_cutoff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialTuning.lean:376
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DictionaryScore.PolynomialWitness 1 declarations The compact-support inverse-heat dictionary witness, assembled from S11--S16.

The compact-support inverse-heat dictionary witness, assembled from S11--S16.

theorem inverseheat_dictionary_witness

This branch supplies a dictionary witness with score at most a fixed multiple of the frontier. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
conclusion 1
0 < C
conclusion 2
∃ n0 : ℕ,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1/4),
(logScale n)^(-1/2 : ℝ) < sigma → ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ unitScore beta kappa n sigma (.poly j)
≤ C*frontierRate beta kappa sigma n
Proof (Lean source)
-- @node: inverseheat_dictionary_witness lemma inverseheat_dictionary_witness (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), (logScale n)^(-1/2 : ℝ) < sigma → ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ unitScore beta kappa n sigma (.poly j) ≤ C*frontierRate beta kappa sigma n := by obtain ⟨C, hC, hcert⟩ := qM_tuned_certificate_bound beta kappa hbeta hkappa have hevent : ∀ᶠ n : ℕ in atTop, (∀ sigma ∈ Icc (0 : ℝ) (1/4), (logScale n)^(-1/2 : ℝ) < sigma → ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ unitScore beta kappa n sigma (.poly j) ≤ (C*(16384 : ℝ)^beta)*frontierRate beta kappa sigma n) := by filter_upwards [hcert, polynomial_tuned_dictionary_degree, directScale_eventually_below_log_cutoff beta kappa hbeta hkappa, eventually_ge_atTop 1] with n hncert hndegree hncut hn1 intro sigma hsigma hbranch obtain ⟨j, hjmem, hjodd, hjlo, hjhi⟩ := hndegree sigma hsigma have hLpos : 0 < logScale n := lt_of_lt_of_le zero_lt_one (logScale_one_le n hn1) let B := log (exp 1+sigma^2*logScale n) have hBpos : 0 < B := lt_of_lt_of_le zero_lt_one (polynomial_log_denominator_one_le _ _ hLpos.le) have hmpos : 0 < (2^j+1 : ℕ) := Nat.succ_pos _ have hmR : (0 : ℝ) < (2^j+1 : ℕ) := by exact_mod_cast hmpos have hscale : ((2^j+1 : ℕ) : ℝ)⁻¹ ≤ 16384*polynomialScale sigma n := by rw [inv_eq_one_div] apply (div_le_iff₀ hmR).mpr have hmul := (div_le_iff₀ (show 0 < 16384*B by positivity)).mp hjlo have heq : 16384*polynomialScale sigma n*((2^j+1 : ℕ) : ℝ) = (((2^j+1 : ℕ) : ℝ)*(16384*B))/logScale n := by dsimp [polynomialScale, B] ring rw [heq] exact (le_div_iff₀ hLpos).mpr (by simpa only [one_mul] using hmul) have hpolypos : 0 < polynomialScale sigma n := div_pos hBpos hLpos have hb : (((2^j+1 : ℕ) : ℝ)⁻¹)^beta ≤ (16384 : ℝ)^beta*(polynomialScale sigma n)^beta := by calc _ ≤ (16384*polynomialScale sigma n)^beta := Real.rpow_le_rpow (by positivity) hscale (by linarith [hbeta.1]) _ = _ := Real.mul_rpow (by norm_num) hpolypos.le have hc := hncert sigma (2^j+1) hjodd hmpos hjhi refine ⟨j, hjmem, ?_⟩ have hdirect : ¬ sigma ≤ directScale beta kappa n := not_le.mpr (hncut.trans_lt hbranch) have hfourier : ¬ sigma ≤ (logScale n)^(-1/2 : ℝ) := not_le.mpr hbranch have hfront : frontierRate beta kappa sigma n = (polynomialScale sigma n)^beta := by simp only [frontierRate, frontierScale, if_neg hdirect, if_neg hfourier] rw [hfront] calc unitScore beta kappa n sigma (.poly j) ≤ C*(((2^j+1 : ℕ) : ℝ)⁻¹)^beta := hc _ ≤ C*((16384 : ℝ)^beta*(polynomialScale sigma n)^beta) := mul_le_mul_of_nonneg_left hb hC.le _ = _ := by ring obtain ⟨N, hN⟩ := eventually_atTop.mp hevent exact ⟨C*(16384 : ℝ)^beta, by positivity, N, hN⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverseheat_dictionary_witness · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DictionaryScore/PolynomialWitness.lean:11
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DirectObservedContraction 7 declarations Direct-regime observed energy contraction, equations (17)--(18).

Direct-regime observed energy contraction, equations (17)--(18).

theorem lower_weighted_integral_cauchy_schwarz Lemma lower_weighted_integral_cauchy_schwarz in the paper ↗

Weighted Cauchy--Schwarz follows from the nonnegative centered quadratic integral. Under the stated conditions. This is the stated conclusion.

Formal statement
g delta :
ℝ → ℝ
hg :
∀ t, 0 ≤ g t
hi :
hid :
Integrable (fun t => g t * delta t)
hid2 :
Integrable (fun t => g t * (delta t)^2)
ha :
0 < ∫ t, g t
(∫ t, g t * delta t)^2 ≤ (∫ t, g t) * ∫ t, g t * (delta t)^2
Proof (Lean source)
-- @node: lower_weighted_integral_cauchy_schwarz lemma lower_weighted_integral_cauchy_schwarz (g delta : ℝ → ℝ) (hg : ∀ t, 0 ≤ g t) (hi : Integrable g) (hid : Integrable (fun t => g t * delta t)) (hid2 : Integrable (fun t => g t * (delta t)^2)) (ha : 0 < ∫ t, g t) : (∫ t, g t * delta t)^2 ≤ (∫ t, g t) * ∫ t, g t * (delta t)^2 := by let a := ∫ t, g t let b := ∫ t, g t * delta t let c := ∫ t, g t * (delta t)^2 have hv : 0 ≤ ∫ t, g t * (a * delta t - b)^2 := integral_nonneg (fun t => mul_nonneg (hg t) (sq_nonneg _)) have he : (∫ t, g t * (a * delta t - b)^2) = a^2*c - (2*a*b)*b + b^2*a := by simp_rw [show ∀ t, g t * (a * delta t - b)^2 = a^2*(g t*(delta t)^2) - (2*a*b)*(g t*delta t) + b^2*g t by intro t; ring] integral_linearity simp only [integral_const_mul, a, b, c] rw [he] at hv change b^2 ≤ a*c have ha' : 0 < a := ha nlinarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_weighted_integral_cauchy_schwarz · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectObservedContraction.lean:13
theorem witnessDesignDensity_mul_continuous_integrable Lemma witnessDesignDensity_mul_continuous_integrable in the paper ↗

Multiplication by a continuous function preserves integrability of the compact design density. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hk :
0 ≤ kappa
f :
ℝ → ℝ
hf :
Integrable (fun t => witnessDesignDensity kappa t * f t)
Proof (Lean source)
-- @node: witnessDesignDensity_mul_continuous_integrable @[fun_prop] lemma witnessDesignDensity_mul_continuous_integrable (kappa : ℝ) (hk : 0 ≤ kappa) (f : ℝ → ℝ) (hf : Continuous f) : Integrable (fun t => witnessDesignDensity kappa t * f t) := by have he : (fun t => witnessDesignDensity kappa t * f t) = (Icc (-1/2 : ℝ) (1/2)).indicator (fun t => (kappa+1)*2^kappa*|t|^kappa*f t) := by funext t simp only [witnessDesignDensity, indicator_apply] split_ifs <;> simp rw [he] have hc : Continuous (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa*f t) := by fun_prop exact hc.integrableOn_Icc.integrable_indicator measurableSet_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDesignDensity_mul_continuous_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectObservedContraction.lean:36
theorem gaussian_design_convolution_cauchy_schwarz Lemma gaussian_design_convolution_cauchy_schwarz in the paper ↗

At each observed dose the squared signed convolution is controlled by its quadratic convolution. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma w :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
delta :
ℝ → ℝ
hd :
(smoothSigned sigma (fun t => witnessDesignDensity kappa t * delta t) w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w
≤ smoothSigned sigma (fun t => witnessDesignDensity kappa t * (delta t)^2) w
Proof (Lean source)
-- @node: gaussian_design_convolution_cauchy_schwarz lemma gaussian_design_convolution_cauchy_schwarz (kappa sigma w : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (delta : ℝ → ℝ) (hd : Continuous delta) : (smoothSigned sigma (fun t => witnessDesignDensity kappa t * delta t) w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w ≤ smoothSigned sigma (fun t => witnessDesignDensity kappa t * (delta t)^2) w := by have hp : 0 < smoothSigned sigma (witnessDesignDensity kappa) w := (gaussian_design_density_lower kappa sigma hk hs w).1 apply (div_le_iff₀ hp).mpr have hc : Continuous (fun t => phiDensity sigma (w-t)) := by unfold phiDensity; fun_prop have h0 := witnessDesignDensity_mul_continuous_integrable kappa hk.1 _ hc have h1 := witnessDesignDensity_mul_continuous_integrable kappa hk.1 _ (hc.mul hd) have h2 := witnessDesignDensity_mul_continuous_integrable kappa hk.1 _ (hc.mul (hd.pow 2)) have hcs := lower_weighted_integral_cauchy_schwarz (fun t => witnessDesignDensity kappa t * phiDensity sigma (w-t)) delta (fun t => mul_nonneg (witnessDesignDensity_nonneg kappa t hk.1) (phiDensity_pos sigma (w-t) hs.1).le) h0 (by simpa only [Pi.mul_apply, mul_assoc] using h1) (by simpa only [Pi.mul_apply, Pi.pow_apply, mul_assoc] using h2) hp simpa only [smoothSigned, mul_assoc, mul_comm, mul_left_comm] using hcs
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_design_convolution_cauchy_schwarz · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectObservedContraction.lean:50
theorem lower_smoothSigned_integrable_integral Lemma lower_smoothSigned_integrable_integral in the paper ↗

Absolute Fubini preserves the signed integral under Gaussian smoothing. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma :
ℝ
hs :
0 < sigma
v :
ℝ → ℝ
hv :
conclusion 1
conclusion 2
(∫ w, smoothSigned sigma v w) = ∫ t, v t
Proof (Lean source)
-- @node: lower_smoothSigned_integrable_integral lemma lower_smoothSigned_integrable_integral (sigma : ℝ) (hs : 0 < sigma) (v : ℝ → ℝ) (hv : Integrable v) : Integrable (smoothSigned sigma v) ∧ (∫ w, smoothSigned sigma v w) = ∫ t, v t := by let K : ℝ → ℝ → ℝ := fun t w => v t * phiDensity sigma (w-t) have hKi (t : ℝ) : Integrable (K t) := (phiDensity_shift_integrable sigma t hs).const_mul _ have hKm : AEStronglyMeasurable (uncurry K) (volume.prod volume) := by have hh := hv.aestronglyMeasurable.comp_fst.mul (show AEStronglyMeasurable (fun p : ℝ × ℝ => phiDensity sigma (p.2-p.1)) (volume.prod volume) by unfold phiDensity; fun_prop) exact hh have hKn (t : ℝ) : (∫ w, ‖K t w‖) = ‖v t‖ := by simp only [K, norm_mul, Real.norm_eq_abs, abs_of_pos (phiDensity_pos sigma _ hs)] rw [integral_const_mul, integral_sub_right_eq_self, phiDensity_integral sigma hs, mul_one] have hK : Integrable (uncurry K) (volume.prod volume) := by apply (integrable_prod_iff hKm).mpr refine ⟨ae_of_all _ hKi, ?_⟩ simpa only [uncurry, hKn] using hv.norm refine ⟨hK.integral_prod_right, ?_⟩ calc _ = ∫ t, ∫ w, K t w := (integral_integral_swap hK).symm _ = _ := by simp only [K, integral_const_mul, integral_sub_right_eq_self, phiDensity_integral sigma hs, mul_one]
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_smoothSigned_integrable_integral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectObservedContraction.lean:72
theorem gaussian_design_observed_energy_contraction Lemma gaussian_design_observed_energy_contraction in the paper ↗

Integrating the pointwise contraction gives the observed energy bound in equation (18). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
delta :
ℝ → ℝ
hd :
(∫ w, (smoothSigned sigma (fun t => witnessDesignDensity kappa t * delta t) w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w)
≤ ∫ t, witnessDesignDensity kappa t * (delta t)^2
Proof (Lean source)
-- @node: gaussian_design_observed_energy_contraction lemma gaussian_design_observed_energy_contraction (kappa sigma : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (delta : ℝ → ℝ) (hd : Continuous delta) : (∫ w, (smoothSigned sigma (fun t => witnessDesignDensity kappa t * delta t) w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w) ≤ ∫ t, witnessDesignDensity kappa t * (delta t)^2 := by have hv := witnessDesignDensity_mul_continuous_integrable kappa hk.1 delta hd have hv2 := witnessDesignDensity_mul_continuous_integrable kappa hk.1 _ (hd.pow 2) have hmass := lower_smoothSigned_integrable_integral sigma hs.1 _ hv2 have henergy := gaussian_observed_energy_integrable kappa sigma (1/2) hk hs _ hv (by have hk0 := hk.1; fun_prop) (fun t ht => by rw [← neg_div] at ht simp only [witnessDesignDensity, if_neg ht, zero_mul]) calc _ ≤ ∫ w, smoothSigned sigma (fun t => witnessDesignDensity kappa t * (delta t)^2) w := integral_mono henergy hmass.1 (fun w => gaussian_design_convolution_cauchy_schwarz kappa sigma w hk hs delta hd) _ = _ := hmass.2
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_design_observed_energy_contraction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectObservedContraction.lean:99
theorem direct_profile_pair_observed_energy_bound

The direct threshold pair has the actual observed one-record budget at every positive noise scale. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
E :
beta kappa sigma epsilon h :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
he :
0 ≤ epsilon
hh :
0 < h
muPlus muMinus :
hrange :
∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)
hformula :
∀ a : Dose,
(muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∧
(muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0)
conclusion 1
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (8*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1)
conclusion 2
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (8*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1)
Proof (Lean source)
-- @node: direct_profile_pair_observed_energy_bound lemma direct_profile_pair_observed_energy_bound {S : Type*} [MeasurableSpace S] (E : PathSpace S) (beta kappa sigma epsilon h : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (he : 0 ≤ epsilon) (hh : 0 < h) (muPlus muMinus : ThresholdProfile) (hrange : ∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0)) : chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1) ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1) := by have hsingle (mu : ThresholdProfile) (delta : ℝ → ℝ) (hd : Continuous delta) (hr : ∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)) (hf : ∀ a : Dose, (mu a : ℝ) = 1/2 + delta ((a : ℝ)-a0)) (henergy : (∫ t, witnessDesignDensity kappa t * (delta t)^2) ≤ (2*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1)) : chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa mu)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1) := by have hchi := (observed_marked_chiSq_identity E kappa sigma hk hs mu hr).2 change chiSqDiv _ _ = 4 * ∫ w, (smoothSigned sigma (markedSignedProfile kappa mu) w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w at hchi rw [markedSignedProfile_eq_perturbation kappa mu delta hf] at hchi rw [hchi] have hc := gaussian_design_observed_energy_contraction kappa sigma hk hs delta hd nlinarith constructor · exact hsingle muPlus (directPerturbation beta epsilon h) (directPerturbation_continuous beta epsilon h hh) (fun a => (hrange a).1) (fun a => (hformula a).1) (directPerturbation_quadratic_energy_le beta kappa epsilon h hk.1 he hh) · refine hsingle muMinus (fun t => -directPerturbation beta epsilon h t) (directPerturbation_continuous beta epsilon h hh).neg (fun a => (hrange a).2) ?_ ?_ · intro a simpa only [sub_eq_add_neg] using (hformula a).2 · simpa only [neg_sq] using directPerturbation_quadratic_energy_le beta kappa epsilon h hk.1 he hh
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_profile_pair_observed_energy_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectObservedContraction.lean:120
theorem direct_profile_pair_observed_sample_budget

With the direct bandwidth, the observed pair has a sample budget independent of noise and sample size. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
E :
beta kappa sigma epsilon :
ℝ
n :
ℕ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
he :
0 ≤ epsilon
hd :
0 < effDim beta kappa
hn :
0 < n
muPlus muMinus :
hrange :
∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)
hformula :
∀ a : Dose,
(muPlus a : ℝ)
= 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧
(muMinus a : ℝ)
= 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0)
conclusion 1
(n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (8*(kappa+1)*2^kappa)*epsilon^2
conclusion 2
(n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (8*(kappa+1)*2^kappa)*epsilon^2
Proof (Lean source)
-- @node: direct_profile_pair_observed_sample_budget lemma direct_profile_pair_observed_sample_budget {S : Type*} [MeasurableSpace S] (E : PathSpace S) (beta kappa sigma epsilon : ℝ) (n : ℕ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (he : 0 ≤ epsilon) (hd : 0 < effDim beta kappa) (hn : 0 < n) (muPlus muMinus : ThresholdProfile) (hrange : ∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0)) : (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa)*epsilon^2 ∧ (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa)*epsilon^2 := by have hh : 0 < directScale beta kappa n := by unfold directScale exact Real.rpow_pos_of_pos (by exact_mod_cast hn) _ have hb := direct_profile_pair_observed_energy_bound E beta kappa sigma epsilon (directScale beta kappa n) hk hs he hh muPlus muMinus hrange hformula have hid := lower_direct_scale_sample_identity beta kappa n hd hn change (n : ℝ)*(directScale beta kappa n)^(2*beta+kappa+1) = 1 at hid constructor all_goals calc _ ≤ (n : ℝ)*((8*(kappa+1)*2^kappa*epsilon^2)* (directScale beta kappa n)^(2*beta+kappa+1)) := mul_le_mul_of_nonneg_left (by first | exact hb.1 | exact hb.2) (Nat.cast_nonneg n) _ = (8*(kappa+1)*2^kappa)*epsilon^2* ((n : ℝ)*(directScale beta kappa n)^(2*beta+kappa+1)) := by ring _ = _ := by rw [hid, mul_one]
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_profile_pair_observed_sample_budget · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectObservedContraction.lean:163
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.DirectPerturbation 11 declarations Direct-regime compact bump bounds for the observed lower-bound construction.

Direct-regime compact bump bounds for the observed lower-bound construction.

The direct-regime compact bump of equation (14), including its zero extension.

Definition (Lean source)
beta epsilon h0 t :
ℝ
directPerturbation beta epsilon h0 t :
ℝ
if |t| ≤ h0 then epsilon*h0^beta*(1-(t/h0)^2)^2 else 0
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:12

Squaring on the unit interval has Lipschitz constant two. This is the stated conclusion. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
a ∈ Icc (0 : ℝ) 1
hb :
b ∈ Icc (0 : ℝ) 1
|a^2-b^2| ≤ 2*|a-b|
Proof (Lean source)
-- @node: unit_square_increment lemma unit_square_increment (a b : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) (hb : b ∈ Icc (0 : ℝ) 1) : |a^2-b^2| ≤ 2*|a-b| := by have hs : |a+b| ≤ 2 := by rw [abs_of_nonneg (by linarith [ha.1, hb.1] : 0 ≤ a+b)]; linarith [ha.2, hb.2] calc |a^2-b^2| = |a-b| *|a+b| := by rw [← abs_mul]; congr 1; ring _ ≤ |a-b| *2 := mul_le_mul_of_nonneg_left hs (abs_nonneg _) _ = _ := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.unit_square_increment · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:17
theorem directPerturbation_clipped

The clipped polynomial representation includes the zero extension at both endpoints. Under the stated conditions. This is the stated conclusion.

Formal statement
beta epsilon h t :
ℝ
hh :
0 < h
directPerturbation beta epsilon h t = epsilon*h^beta*(1-(min |t/h| 1)^2)^2
Proof (Lean source)
-- @node: directPerturbation_clipped lemma directPerturbation_clipped (beta epsilon h t : ℝ) (hh : 0 < h) : directPerturbation beta epsilon h t = epsilon*h^beta*(1-(min |t/h| 1)^2)^2 := by by_cases ht : |t| ≤ h · have hq : |t/h| ≤ 1 := by rw [abs_div, abs_of_pos hh]; exact (div_le_one hh).mpr ht simp only [directPerturbation, if_pos ht, min_eq_left hq, sq_abs] · have hq : 1 ≤ |t/h| := by rw [abs_div, abs_of_pos hh]; exact (le_div_iff₀ hh).mpr (by simpa using (le_of_lt (lt_of_not_ge ht))) simp [directPerturbation, ht, min_eq_right hq]
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation_clipped · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:27
theorem directPerturbation_bounds

The bump lies between zero and its tuning amplitude. Under the stated conditions. This is the stated conclusion.

Formal statement
beta epsilon h t :
ℝ
he :
0 ≤ epsilon
hh :
0 < h
directPerturbation beta epsilon h t ∈ Icc 0 (epsilon*h^beta)
Proof (Lean source)
-- @node: directPerturbation_bounds lemma directPerturbation_bounds (beta epsilon h t : ℝ) (he : 0 ≤ epsilon) (hh : 0 < h) : directPerturbation beta epsilon h t ∈ Icc 0 (epsilon*h^beta) := by rw [directPerturbation_clipped beta epsilon h t hh] have hx : 0 ≤ min |t/h| 1 := le_min (abs_nonneg _) zero_le_one have hy : min |t/h| 1 ≤ 1 := min_le_right _ _ have hz : 0 ≤ 1-(min |t/h| 1)^2 := by nlinarith have hw : (1-(min |t/h| 1)^2)^2 ≤ 1 := by nlinarith [sq_nonneg (min |t/h| 1)] have hA : 0 ≤ epsilon*h^beta := mul_nonneg he (Real.rpow_nonneg hh.le _) exact ⟨mul_nonneg hA (sq_nonneg _), (mul_le_mul_of_nonneg_left hw hA).trans_eq (mul_one _)⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:39
theorem directPerturbation_support

The compact bump vanishes off its stipulated support. Under the stated conditions. This is the stated conclusion.

Formal statement
beta epsilon h t :
ℝ
ht :
t ∉ Icc (-h) h
directPerturbation beta epsilon h t = 0
Proof (Lean source)
-- @node: directPerturbation_support lemma directPerturbation_support (beta epsilon h t : ℝ) (ht : t ∉ Icc (-h) h) : directPerturbation beta epsilon h t = 0 := by have hn : ¬ |t| ≤ h := by simpa only [abs_le, mem_Icc] using ht simp [directPerturbation, hn]
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation_support · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:51
theorem directPerturbation_continuous

Clipping exposes continuity of the zero-extended bump without an endpoint exception. Under the stated conditions. This is the stated conclusion.

Formal statement
beta epsilon h :
ℝ
hh :
0 < h
Proof (Lean source)
-- @node: directPerturbation_continuous @[fun_prop] lemma directPerturbation_continuous (beta epsilon h : ℝ) (hh : 0 < h) : Continuous (directPerturbation beta epsilon h) := by have heq : directPerturbation beta epsilon h = fun t => epsilon*h^beta*(1-(min |t/h| 1)^2)^2 := funext (fun t => directPerturbation_clipped beta epsilon h t hh) rw [heq] fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation_continuous · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:58
theorem directPerturbation_lipschitz_bound

The bump's increment is bounded by four times its amplitude times scaled distance. Under the stated conditions. This is the stated conclusion.

Formal statement
beta epsilon h s t :
ℝ
he :
0 ≤ epsilon
hh :
0 < h
|directPerturbation beta epsilon h s-directPerturbation beta epsilon h t|
≤ 4*epsilon*h^beta*(|s-t|/h)
Proof (Lean source)
-- @node: directPerturbation_lipschitz_bound lemma directPerturbation_lipschitz_bound (beta epsilon h s t : ℝ) (he : 0 ≤ epsilon) (hh : 0 < h) : |directPerturbation beta epsilon h s-directPerturbation beta epsilon h t| ≤ 4*epsilon*h^beta*(|s-t|/h) := by let a := min |s/h| 1 let b := min |t/h| 1 have ha : a ∈ Icc (0 : ℝ) 1 := ⟨le_min (abs_nonneg _) zero_le_one, min_le_right _ _⟩ have hb : b ∈ Icc (0 : ℝ) 1 := ⟨le_min (abs_nonneg _) zero_le_one, min_le_right _ _⟩ have hab : |a-b| ≤ |s-t|/h := by calc _ ≤ max (abs (abs (s/h) - abs (t/h))) (abs ((1 : ℝ)-1)) := abs_min_sub_min_le_max _ _ _ _ _ = abs (abs (s/h) - abs (t/h)) := by simp _ ≤ |s/h-t/h| := abs_abs_sub_abs_le_abs_sub _ _ _ = |s-t|/h := by rw [← sub_div, abs_div, abs_of_pos hh] have ha' : 1-a^2 ∈ Icc (0 : ℝ) 1 := by constructor <;> nlinarith [sq_nonneg a, ha.1, ha.2] have hb' : 1-b^2 ∈ Icc (0 : ℝ) 1 := by constructor <;> nlinarith [sq_nonneg b, hb.1, hb.2] have hf : |(1-a^2)^2-(1-b^2)^2| ≤ 4*(|s-t|/h) := by have h1 := unit_square_increment (1-a^2) (1-b^2) ha' hb' have h2 := unit_square_increment a b ha hb have heq : |(1-a^2)-(1-b^2)| = |a^2-b^2| := by rw [show (1-a^2)-(1-b^2) = -(a^2-b^2) by ring, abs_neg] rw [heq] at h1 linarith rw [directPerturbation_clipped beta epsilon h s hh, directPerturbation_clipped beta epsilon h t hh, ← mul_sub, abs_mul, abs_of_nonneg (mul_nonneg he (Real.rpow_nonneg hh.le _))] exact (mul_le_mul_of_nonneg_left hf (mul_nonneg he (Real.rpow_nonneg hh.le _))).trans_eq (by ring)
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation_lipschitz_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:68
theorem directPerturbation_holder_bound

The two distance regimes in (15) give the scale-free Hölder seminorm. Under the stated conditions. This is the stated conclusion.

Formal statement
beta epsilon h s t :
ℝ
hb :
beta ∈ Icc (0 : ℝ) 1
he :
0 ≤ epsilon
hh :
0 < h
|directPerturbation beta epsilon h s-directPerturbation beta epsilon h t|
≤ 4*epsilon*|s-t|^beta
Proof (Lean source)
-- @node: directPerturbation_holder_bound lemma directPerturbation_holder_bound (beta epsilon h s t : ℝ) (hb : beta ∈ Icc (0 : ℝ) 1) (he : 0 ≤ epsilon) (hh : 0 < h) : |directPerturbation beta epsilon h s-directPerturbation beta epsilon h t| ≤ 4*epsilon*|s-t|^beta := by have hA : 0 ≤ epsilon*h^beta := mul_nonneg he (Real.rpow_nonneg hh.le _) by_cases hst : |s-t| ≤ h · have hr : |s-t|/h ≤ (|s-t|/h)^beta := by simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_ge' (div_nonneg (abs_nonneg _) hh.le) ((div_le_one hh).mpr hst) hb.1 hb.2 calc _ ≤ 4*epsilon*h^beta*(|s-t|/h) := directPerturbation_lipschitz_bound _ _ _ _ _ he hh _ ≤ 4*epsilon*h^beta*((|s-t|/h)^beta) := by gcongr _ = _ := by rw [Real.div_rpow (abs_nonneg _) hh.le]; field_simp · have hsmall := directPerturbation_bounds beta epsilon h s he hh have htall := directPerturbation_bounds beta epsilon h t he hh have hdiff : |directPerturbation beta epsilon h s-directPerturbation beta epsilon h t| ≤ epsilon*h^beta := by rw [abs_le]; constructor <;> linarith [hsmall.1, hsmall.2, htall.1, htall.2] have hp : h^beta ≤ |s-t|^beta := Real.rpow_le_rpow hh.le (le_of_lt (lt_of_not_ge hst)) hb.1 calc _ ≤ epsilon*h^beta := hdiff _ ≤ epsilon*|s-t|^beta := mul_le_mul_of_nonneg_left hp he _ ≤ _ := by nlinarith [Real.rpow_nonneg (abs_nonneg (s-t)) beta]
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation_holder_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:98
theorem direct_threshold_profiles

Small direct-regime amplitudes give the two actual continuous threshold profiles, with the paper's range and radius-one Hölder seminorm. Under the stated conditions. This is the stated conclusion.

Formal statement
beta epsilon h :
ℝ
hb :
beta ∈ Icc (0 : ℝ) 1
he :
0 ≤ epsilon
heSmall :
4*epsilon ≤ 1
hh :
0 < h
hamp :
epsilon*h^beta ≤ 3/8
∃ muPlus muMinus : ThresholdProfile,
conclusion 1
a :
(muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0)
(muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0)
conclusion 2
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
conclusion 3
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
Proof (Lean source)
-- @node: direct_threshold_profiles lemma direct_threshold_profiles (beta epsilon h : ℝ) (hb : beta ∈ Icc (0 : ℝ) 1) (he : 0 ≤ epsilon) (heSmall : 4*epsilon ≤ 1) (hh : 0 < h) (hamp : epsilon*h^beta ≤ 3/8) : ∃ muPlus muMinus : ThresholdProfile, (∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0)) ∧ (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) := by have hbounds (a : Dose) := directPerturbation_bounds beta epsilon h ((a : ℝ)-a0) he hh have hp (a : Dose) : 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∈ Icc (0 : ℝ) 1 := by constructor <;> linarith [(hbounds a).1, (hbounds a).2] have hm (a : Dose) : 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0) ∈ Icc (0 : ℝ) 1 := by constructor <;> linarith [(hbounds a).1, (hbounds a).2] let muPlus : ThresholdProfile := ⟨fun a => ⟨1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0), hp a⟩, by fun_prop⟩ let muMinus : ThresholdProfile := ⟨fun a => ⟨1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0), hm a⟩, by fun_prop⟩ refine ⟨muPlus, muMinus, (fun a => ⟨rfl, rfl⟩), ?_, ?_⟩ · intro a change (1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∈ Icc (1/8 : ℝ) (7/8)) ∧ (1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0) ∈ Icc (1/8 : ℝ) (7/8)) constructor <;> constructor <;> linarith [(hbounds a).1, (hbounds a).2] · intro a b have hinc := directPerturbation_holder_bound beta epsilon h ((a : ℝ)-a0) ((b : ℝ)-a0) hb he hh rw [sub_sub_sub_cancel_right] at hinc have hfinal := hinc.trans (mul_le_of_le_one_left (Real.rpow_nonneg (abs_nonneg ((a : ℝ)-(b : ℝ))) beta) heSmall) change |(1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0))- (1/2 + directPerturbation beta epsilon h ((b : ℝ)-a0))| ≤ _ ∧ |(1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0))- (1/2 - directPerturbation beta epsilon h ((b : ℝ)-a0))| ≤ _ constructor · simpa only [add_sub_add_left_eq_sub] using hfinal · simpa only [sub_sub_sub_cancel_left, abs_sub_comm] using hfinal
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_threshold_profiles · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:123
theorem directPerturbation_zero

The amplitude at the target is exactly the direct tuning amplitude. Under the stated conditions. This is the stated conclusion.

Formal statement
beta epsilon h :
ℝ
hh :
0 < h
directPerturbation beta epsilon h 0 = epsilon*h^beta
Proof (Lean source)
-- @node: directPerturbation_zero lemma directPerturbation_zero (beta epsilon h : ℝ) (hh : 0 < h) : directPerturbation beta epsilon h 0 = epsilon*h^beta := by simp [directPerturbation, hh.le]
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:163
theorem directPerturbation_signed_integrable

The direct bump times the power-law design is an integrable compact signed density. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon h :
ℝ
hk :
0 ≤ kappa
hh :
0 < h
Integrable (fun t => witnessDesignDensity kappa t * directPerturbation beta epsilon h t)
Proof (Lean source)
-- @node: directPerturbation_signed_integrable @[fun_prop] lemma directPerturbation_signed_integrable (beta kappa epsilon h : ℝ) (hk : 0 ≤ kappa) (hh : 0 < h) : Integrable (fun t => witnessDesignDensity kappa t * directPerturbation beta epsilon h t) := by have hc : Continuous (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * directPerturbation beta epsilon h t) := by fun_prop have heq : (fun t => witnessDesignDensity kappa t * directPerturbation beta epsilon h t) = (Icc (-1/2 : ℝ) (1/2)).indicator (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * directPerturbation beta epsilon h t) := by funext t simp only [witnessDesignDensity, indicator_apply] split_ifs <;> simp rw [heq] exact hc.integrableOn_Icc.integrable_indicator measurableSet_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation_signed_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/DirectPerturbation.lean:169
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.Estimator 62 declarations Public inverse pairs, deterministic dictionary selection and the split clipped estimator.

Public inverse pairs, deterministic dictionary selection and the split clipped estimator.

A public latent weight paired with its observable inverse.

Definition (Lean source)
q :
ℝ → ℝ
ell :
ℝ → ℝ
CausalSmith.Stat.NoisydoseWeakdesignTransition.WeightPair · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:20
def weightMoment

Lebesgue moment of a public latent weight against an absolute power of the centered dose.

Definition (Lean source)
s :
ℝ
q :
ℝ → ℝ
weightMoment s q :
ℝ
∫ t in Icc (-1/2 : ℝ) (1/2), |t| ^ s * q t
CausalSmith.Stat.NoisydoseWeakdesignTransition.weightMoment · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:27
def unitbq

Reference denominator floor at the unit constants (stratum mass one quarter, lower envelope one quarter), used only to calibrate the dictionary tuning.

Definition (Lean source)
kappa :
ℝ
q :
ℝ → ℝ
unitbq kappa q :
ℝ
weightMoment kappa q / 16
def unitBq

Reference localization-bias bound at the unit envelope constants, used only to calibrate the dictionary tuning.

Definition (Lean source)
beta kappa :
ℝ
q :
ℝ → ℝ
unitBq beta kappa q :
ℝ
64 * weightMoment (kappa+beta) q / weightMoment kappa q
def bq

Public lower bound for the unmarked weighted denominator: the minimum stratum mass times the lower envelope constant times the weighted moment.

Definition (Lean source)
kappa :
ℝ
q :
ℝ → ℝ
bq K kappa q :
ℝ
K.pmin * K.clo * weightMoment kappa q
def Bq

Public localization-bias bound: the envelope ratio times the ratio of the higher to the base weighted moment.

Definition (Lean source)
beta kappa :
ℝ
q :
ℝ → ℝ
Bq K beta kappa q :
ℝ
K.chi / K.clo * weightMoment (kappa+beta) q / weightMoment kappa q

Extended Gaussian inverse-weight second moment; infinite values are retained.

Definition (Lean source)
kappa sigma :
ℝ
ell :
ℝ → ℝ
VqENN kappa sigma ell :
ℝ≥0∞
16 * ∫⁻ t in Icc (-1/2 : ℝ) (1/2), ofReal (|t| ^ kappa) * (∫⁻ z, ofReal ((ell (t+sigma*z))^2) ∂gaussianReal 0 1)
def Vq

Real value of the reference second moment, used only after its finiteness is established.

Definition (Lean source)
kappa sigma :
ℝ
ell :
ℝ → ℝ
Vq kappa sigma ell :
ℝ
(VqENN kappa sigma ell).toReal
def pubVqENN

Public extended second-moment bound: the reference moment rescaled from the reference upper envelope sixteen to the public upper envelope constant.

Definition (Lean source)
kappa sigma :
ℝ
ell :
ℝ → ℝ
pubVqENN K kappa sigma ell :
ℝ≥0∞
ofReal (K.chi / 16) * VqENN kappa sigma ell
CausalSmith.Stat.NoisydoseWeakdesignTransition.pubVqENN · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:46
def pubVq

Real value of the public second-moment bound.

Definition (Lean source)
kappa sigma :
ℝ
ell :
ℝ → ℝ
pubVq K kappa sigma ell :
ℝ
(pubVqENN K kappa sigma ell).toReal
def Aq

Public sum of localization bias, denominator-scaled second-moment error and stratum-frequency error.

Definition (Lean source)
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
Aq K beta kappa n sigma q :
ℝ
Bq K beta kappa q.q
+ 12 / bq K kappa q.q * sqrt (pubVq K kappa sigma q.ell / n)
+ 2 * sqrt (3 / n)
def unitAq

Reference error certificate at the unit constants, used only to calibrate the dictionary tuning.

Definition (Lean source)
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
unitAq beta kappa n sigma q :
ℝ
unitBq beta kappa q.q
+ 12 / unitbq kappa q.q * sqrt (Vq kappa sigma q.ell / n)
+ 2 * sqrt (3 / n)
theorem pubVqENN_lt_top

The public second-moment bound for class constants K is finite whenever the reference moment is, so it is a real number.

Formal statement
kappa sigma :
ℝ
ell :
ℝ → ℝ
hV :
VqENN kappa sigma ell < ⊤
pubVqENN K kappa sigma ell < ⊤
Proof (Lean source)
lemma pubVqENN_lt_top (K : ClassConstants) (kappa sigma : ℝ) (ell : ℝ → ℝ) (hV : VqENN kappa sigma ell < ⊤) : pubVqENN K kappa sigma ell < ⊤ := ENNReal.mul_lt_top ENNReal.ofReal_lt_top hV
CausalSmith.Stat.NoisydoseWeakdesignTransition.pubVqENN_lt_top · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:60
theorem pubVq_eq

The real public second-moment bound for class constants K equals the upper envelope constant over sixteen times the real reference moment.

Formal statement
kappa sigma :
ℝ
ell :
ℝ → ℝ
pubVq K kappa sigma ell = K.chi / 16 * Vq kappa sigma ell
Proof (Lean source)
lemma pubVq_eq (K : ClassConstants) (kappa sigma : ℝ) (ell : ℝ → ℝ) : pubVq K kappa sigma ell = K.chi / 16 * Vq kappa sigma ell := by rw [pubVq, pubVqENN, ENNReal.toReal_mul, ENNReal.toReal_ofReal (div_nonneg (K.clo_pos.le.trans K.clo_le_chi) (by norm_num))] rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.pubVq_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:65

Exact, finite pointwise Gaussian inversion and a positive finite weighted moment.

Definition (Lean source)
kappa sigma :
ℝ
PairAdmissible kappa sigma q :
Prop
clause 1
clause 2
clause 3
t ∈ Icc (-1/2 : ℝ) (1/2) :
0 ≤ q.q t
clause 4
Integrable (fun t => |t| ^ kappa * q.q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))
clause 5
0 < weightMoment kappa q.q
clause 6
t ∈ Icc (-1/2 : ℝ) (1/2) :
Integrable (fun z => q.ell (t+sigma*z)) (gaussianReal 0 1)
clause 7
t ∈ Icc (-1/2 : ℝ) (1/2) :
∫ z, q.ell (t+sigma*z) ∂gaussianReal 0 1 = q.q t
CausalSmith.Stat.NoisydoseWeakdesignTransition.PairAdmissible · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:72
def LawAdmissible

Absolute integrability of the inverse weight under the structural law’s observed centered dose.

Definition (Lean source)
S :
Type u_1
shared
sigma :
ℝ
LawAdmissible sigma P q :
Prop
Integrable (fun w => q.ell (observedCentered sigma w)) P
CausalSmith.Stat.NoisydoseWeakdesignTransition.LawAdmissible · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:80
def sincSix

The sixth power of sinc, with its continuous value at zero.

Definition (Lean source)
u :
ℝ
sincSix u :
ℝ
if u = 0 then 1 else (sin u / u)^6
def qF

Positive Fourier localization weight at the specified bandwidth.

Definition (Lean source)
h t :
ℝ
qF h t :
ℝ
sincSix (t/h)
def ellF

Mathlib's Fourier convention uses exp(-2π i ξt); the multiplier uses ω=2πξ.

Definition (Lean source)
sigma h v :
ℝ
ellF sigma h v :
ℝ
(fourierIntegral fourierChar volume (fun xi : ℝ => fourierIntegral fourierChar volume (fun t : ℝ => (qF h t : ℂ)) xi * (exp (sigma^2 * (2*pi*xi)^2 / 2) : ℂ)) (-v)).re
def qMPoly

Polynomial extension of the odd-degree sinc-of-arcsine weight, through even U coefficients.

Definition (Lean source)
m :
ℕ
qMPoly m :
(∑ k ∈ range m, C ((U ℝ (m-1 : ℕ)).coeff (2*k) / (m : ℝ)) * (1 - C 4 * X^2)^k)^6
def qM

Evaluation of the polynomial extension of the positive odd-degree localization weight.

Definition (Lean source)
m :
ℕ
t :
ℝ
qM m t :
ℝ
(qMPoly m).eval t
def ellM

Finite polynomial inverse-heat sum of the even derivatives of the latent weight.

Definition (Lean source)
sigma :
ℝ
m :
ℕ
v :
ℝ
ellM sigma m v :
ℝ
∑ j ∈ range (3*(m-1)+1), (-sigma^2/2)^j / (j.factorial : ℝ) * ((derivative^[2*j]) (qMPoly m)).eval v
theorem polynomial_coeff_reflection Lemma polynomial_coeff_reflection in the paper ↗

Reflection multiplies the nth polynomial coefficient by its parity sign. This is the stated conclusion. This is the stated conclusion. This is the stated conclusion. This is the stated conclusion.

Formal statement
p :
n :
ℕ
(p.comp (-X)).coeff n = (-1 : ℝ)^n * p.coeff n
Proof (Lean source)
-- @node: polynomial_coeff_reflection lemma polynomial_coeff_reflection (p : Polynomial ℝ) (n : ℕ) : (p.comp (-Polynomial.X)).coeff n = (-1 : ℝ)^n * p.coeff n := by induction p using Polynomial.induction_on' with | add p q hp hq => simp [hp, hq, mul_add] | monomial j a => rw [Polynomial.monomial_comp] rw [show (-Polynomial.X : Polynomial ℝ)^j = (-1 : ℝ)^j • Polynomial.X^j by rw [show (-Polynomial.X : Polynomial ℝ) = (-1 : ℝ) • Polynomial.X by simp, smul_pow]] by_cases h : j = n · subst j; simp · simp [Polynomial.coeff_monomial, h, Ne.symm h]
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomial_coeff_reflection · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:104
theorem chebyshevU_odd_coeff_zero Lemma chebyshevU_odd_coeff_zero in the paper ↗

An even-degree second-kind Chebyshev polynomial has no odd coefficients. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
hn :
Even n
k :
ℕ
(U ℝ n).coeff (2*k+1) = 0
Proof (Lean source)
-- @node: chebyshevU_odd_coeff_zero lemma chebyshevU_odd_coeff_zero (n : ℕ) (hn : Even n) (k : ℕ) : (U ℝ n).coeff (2*k+1) = 0 := by have hp : (U ℝ n).comp (-X) = U ℝ n := by apply Polynomial.funext intro x simpa [Polynomial.eval_comp, hn.neg_one_pow] using Polynomial.Chebyshev.U_eval_neg (R := ℝ) n x have hc := congrArg (fun p : Polynomial ℝ => p.coeff (2*k+1)) hp rw [polynomial_coeff_reflection] at hc simp only [pow_add, pow_mul] at hc norm_num at hc linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.chebyshevU_odd_coeff_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:119
theorem sum_range_double_parity Lemma sum_range_double_parity in the paper ↗

Splitting a finite sum into its even and odd indices. Under the stated conditions. This is the stated conclusion.

Formal statement
f :
ℕ → ℝ
m :
ℕ
(∑ i ∈ range (2*m), f i) = ∑ k ∈ range m, (f (2*k) + f (2*k+1))
Proof (Lean source)
-- @node: sum_range_double_parity lemma sum_range_double_parity (f : ℕ → ℝ) (m : ℕ) : (∑ i ∈ range (2*m), f i) = ∑ k ∈ range m, (f (2*k) + f (2*k+1)) := by induction m with | zero => simp | succ m ih => rw [show 2*(m+1) = (2*m+1)+1 by omega] simp only [Finset.sum_range_succ] rw [ih] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.sum_range_double_parity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:135
theorem qM_eq_chebyshev_even_eval Lemma qM_eq_chebyshev_even_eval in the paper ↗

The polynomial weight is the sixth power of the normalized Chebyshev evaluation. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
Odd m
hmpos :
0 < m
t c :
ℝ
hc :
c^2 = 1-4*t^2
qM m t = ((U ℝ (m-1 : ℕ)).eval c / (m : ℝ))^6
Proof (Lean source)
-- @node: qM_eq_chebyshev_even_eval lemma qM_eq_chebyshev_even_eval (m : ℕ) (hm : Odd m) (hmpos : 0 < m) (t c : ℝ) (hc : c^2 = 1-4*t^2) : qM m t = ((U ℝ (m-1 : ℕ)).eval c / (m : ℝ))^6 := by have heven : Even (m-1) := by obtain ⟨s, hs⟩ := hm exact ⟨s, by omega⟩ have heval := Polynomial.eval_eq_sum_range' (p := U ℝ (m-1 : ℕ)) (n := 2*m) (by rw [Polynomial.Chebyshev.natDegree_U_natCast]; omega) c rw [sum_range_double_parity] at heval simp only [chebyshevU_odd_coeff_zero (m-1) heven, zero_mul, add_zero] at heval simp only [qM, qMPoly, Polynomial.eval_pow, Polynomial.eval_finsetSum, Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_sub, Polynomial.eval_one, Polynomial.eval_X, Finset.sum_div, heval] congr 1 apply Finset.sum_congr rfl intro k hk rw [pow_mul, hc] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.qM_eq_chebyshev_even_eval · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:148

Odd polynomial weights agree with their continuous trigonometric formula. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
Odd m
hmpos :
0 < m
t :
ℝ
ht :
t ∈ Icc (-1/2 : ℝ) (1/2)
qM m t = if t = 0 then 1 else (sin (m * arcsin (2*t)) / (2*m*t))^6
Proof (Lean source)
-- @node: qM_trig lemma qM_trig (m : ℕ) (hm : Odd m) (hmpos : 0 < m) (t : ℝ) (ht : t ∈ Icc (-1/2 : ℝ) (1/2)) : qM m t = if t = 0 then 1 else (sin (m * arcsin (2*t)) / (2*m*t))^6 := by have hmne : (m : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hmpos) have hcast : ((m-1 : ℕ) : ℝ) + 1 = (m : ℝ) := by rw [Nat.cast_sub (by omega : 1 ≤ m)] simp by_cases ht0 : t = 0 · subst t rw [qM_eq_chebyshev_even_eval m hm hmpos 0 1 (by norm_num)] simp [Polynomial.Chebyshev.U_eval_one, hcast, hmne] · have hsin : sin (arcsin (2*t)) = 2*t := Real.sin_arcsin (by linarith [ht.1]) (by linarith [ht.2]) have hcos : (cos (arcsin (2*t)))^2 = 1-4*t^2 := by have h := Real.sin_sq_add_cos_sq (arcsin (2*t)) rw [hsin] at h nlinarith rw [qM_eq_chebyshev_even_eval m hm hmpos t _ hcos, if_neg ht0] have hU := Polynomial.Chebyshev.U_real_cos (arcsin (2*t)) (m-1 : ℕ) rw [hsin] at hU push_cast at hU rw [hcast] at hU congr 1 apply (eq_div_iff (by positivity : (2 : ℝ)*m*t ≠ 0)).2 field_simp nlinarith [hU]
inductive DictTag

Public family and degree tags, with constant tags first, then Fourier indices, then polynomial indices.

Definition (Lean source)
inductive DictTag where | const | fourier (k : ℕ) | poly (j : ℕ) deriving DecidableEq
instance instDecidableEqDictTag

Public family and degree tags, with constant tags first, then Fourier indices, then polynomial indices.

Definition (Lean source)
deriving DecidableEq
CausalSmith.Stat.NoisydoseWeakdesignTransition.instDecidableEqDictTag · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:204
def dyadicBandwidth

Dyadic localization bandwidth indexed by a nonnegative integer.

Definition (Lean source)
k :
ℕ
dyadicBandwidth k :
ℝ
(2 : ℝ) ^ (-(k : ℤ))
CausalSmith.Stat.NoisydoseWeakdesignTransition.dyadicBandwidth · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:208
def dictionaryList

Finite candidate list in the fixed deterministic tie-breaking order.

Definition (Lean source)
n :
ℕ
dictionaryList n :
[DictTag.const] ++ ((List.range (n^2+1)).filter (fun k => (n : ℝ)^(-2 : ℝ) ≤ dyadicBandwidth k ∧ dyadicBandwidth k ≤ 1/4)).map DictTag.fourier ++ ((List.range (n^2+1)).filter (fun j => Odd (2^j+1) ∧ 2^j+1 ≤ n^2)).map DictTag.poly
CausalSmith.Stat.NoisydoseWeakdesignTransition.dictionaryList · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:210
def weightDictionary

The finite public Fourier, polynomial and constant dictionary with increasing-index tie order.

Definition (Lean source)
n :
ℕ
sigma :
ℝ
weightDictionary n sigma :
CausalSmith.Stat.NoisydoseWeakdesignTransition.weightDictionary · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:216

Latent weight and observable inverse associated with a public dictionary tag.

Definition (Lean source)
sigma :
ℝ
pairOf sigma :
clause 1
| .const => ⟨fun _ => 1, fun _ => 1⟩
clause 2
| .fourier k => ⟨qF (dyadicBandwidth k), ellF sigma (dyadicBandwidth k)⟩
clause 3
| .poly j => ⟨qM (2^j+1), ellM sigma (2^j+1)⟩

Expected-error certificate of the pair associated with a dictionary tag.

Definition (Lean source)
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
tag :
score K beta kappa n sigma tag :
ℝ
Aq K beta kappa n sigma (pairOf sigma tag)
def unitScore

Reference certificate of a dictionary tag at the unit constants, used only to calibrate the dictionary tuning.

Definition (Lean source)
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
tag :
unitScore beta kappa n sigma tag :
ℝ
unitAq beta kappa n sigma (pairOf sigma tag)
CausalSmith.Stat.NoisydoseWeakdesignTransition.unitScore · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:228
def selectedTag

Minimum-score public tag, retaining the first tag in the fixed order when scores tie.

Definition (Lean source)
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
selectedTag K beta kappa n sigma :
(dictionaryList n).foldl (fun best tag => if score K beta kappa n sigma tag < score K beta kappa n sigma best then tag else best) .const
CausalSmith.Stat.NoisydoseWeakdesignTransition.selectedTag · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:231
def splitBlock

Deterministic modulo-three sample block.

Definition (Lean source)
n r :
ℕ
splitBlock n r :
Finset.univ.filter (fun i => i.val % 3 = r)
CausalSmith.Stat.NoisydoseWeakdesignTransition.splitBlock · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:236

All three deterministic split blocks contain at least one observed record.

Definition (Lean source)
n :
ℕ
r < 3 :
blocksNonempty n :
Prop
(splitBlock n r).Nonempty
CausalSmith.Stat.NoisydoseWeakdesignTransition.blocksNonempty · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:239
def phat

Block-zero empirical frequency of a confounder stratum.

Definition (Lean source)
n :
ℕ
data :
Fin n → Obs
x :
phat n data x :
ℝ
(∑ i ∈ splitBlock n 0, if (data i).1 = x then (1 : ℝ) else 0) / (splitBlock n 0).card
def Dhat

Block-one empirical inverse-weight denominator in a confounder stratum.

Definition (Lean source)
n :
ℕ
data :
Fin n → Obs
x :
Dhat n data x q :
ℝ
(∑ i ∈ splitBlock n 1, if (data i).1 = x then q.ell ((data i).2.1-a0) else 0) / (splitBlock n 1).card
def Mhat

Block-two empirical outcome-marked inverse-weight numerator in a confounder stratum.

Definition (Lean source)
n :
ℕ
data :
Fin n → Obs
x :
Mhat n data x q :
ℝ
(∑ i ∈ splitBlock n 2, if (data i).1 = x then (data i).2.2*q.ell ((data i).2.1-a0) else 0) / (splitBlock n 2).card
def muhat

Empirical stratum ratio with the public denominator floor and projection to the unit outcome interval.

Definition (Lean source)
kappa :
ℝ
n :
ℕ
data :
Fin n → Obs
x :
muhat K kappa n data x q :
ℝ
max 0 (min 1 (Mhat n data x q / max (Dhat n data x q) (bq K kappa q.q/2)))
def weightEstimator

Stratum-frequency weighted sum of the clipped empirical stratum ratios.

Definition (Lean source)
kappa :
ℝ
n :
ℕ
data :
Fin n → Obs
weightEstimator K kappa n q data :
ℝ
∑ x : Bool, phat n data x * muhat K kappa n data x q
CausalSmith.Stat.NoisydoseWeakdesignTransition.weightEstimator · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:257
def populationD

Population stratum-restricted inverse-weight denominator.

Definition (Lean source)
S :
Type u_1
shared
sigma :
ℝ
x :
populationD sigma P x q :
ℝ
∫ w, (if sX w = x then q.ell (observedCentered sigma w) else 0) ∂P
CausalSmith.Stat.NoisydoseWeakdesignTransition.populationD · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:260
def populationM

Population stratum-restricted outcome-marked inverse-weight numerator.

Definition (Lean source)
S :
Type u_1
shared
sigma :
ℝ
x :
populationM sigma P x q :
ℝ
∫ w, (if sX w = x then sY w*q.ell (observedCentered sigma w) else 0) ∂P
CausalSmith.Stat.NoisydoseWeakdesignTransition.populationM · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:263
def localizedRatio

Population localized marked-to-unmarked ratio.

Definition (Lean source)
S :
Type u_1
shared
sigma :
ℝ
x :
localizedRatio sigma P x q :
ℝ
populationM sigma P x q / populationD sigma P x q
CausalSmith.Stat.NoisydoseWeakdesignTransition.localizedRatio · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:266
def totalEstimator

Total selected estimator with the midpoint fallback for empty split blocks.

Definition (Lean source)
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
data :
Fin n → Obs
totalEstimator K beta kappa n sigma data :
ℝ
if blocksNonempty n then weightEstimator K kappa n (pairOf sigma (selectedTag K beta kappa n sigma)) data else 1/2
CausalSmith.Stat.NoisydoseWeakdesignTransition.totalEstimator · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:270

The confidence interval for the public class constants at smoothness exponent, design exponent, noncoverage level, sample size and error scale, computed from the observed records: the total estimate plus or minus its public error score divided by the noncoverage level, clipped to the unit interval, with the whole unit interval as the small-sample fallback.

Definition (Lean source)
beta kappa alpha :
ℝ
n :
ℕ
sigma :
ℝ
data :
Fin n → Obs
honestInterval K beta kappa alpha n sigma data :
Set ℝ
if blocksNonempty n then Icc (max 0 (totalEstimator K beta kappa n sigma data - score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha)) (min 1 (totalEstimator K beta kappa n sigma data + score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha)) else Icc 0 1
CausalSmith.Stat.NoisydoseWeakdesignTransition.honestInterval · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:275
theorem selectedTag_minimizes

The selected tag is a dictionary member with score no larger than any other member. This is the stated conclusion. This is the stated conclusion. This is the stated conclusion. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
conclusion 1
selectedTag K beta kappa n sigma ∈ weightDictionary n sigma
conclusion 2
tag ∈ weightDictionary n sigma :
score K beta kappa n sigma (selectedTag K beta kappa n sigma)
≤ score K beta kappa n sigma tag
Proof (Lean source)
-- @node: selectedTag_minimizes lemma selectedTag_minimizes (K : ClassConstants) (beta kappa : ℝ) (n : ℕ) (sigma : ℝ) : selectedTag K beta kappa n sigma ∈ weightDictionary n sigma ∧ ∀ tag ∈ weightDictionary n sigma, score K beta kappa n sigma (selectedTag K beta kappa n sigma) ≤ score K beta kappa n sigma tag := by let f := score K beta kappa n sigma have hfold : ∀ (l : List DictTag) (best : DictTag), l.foldl (fun b t => if f t < f b then t else b) best ∈ best :: l ∧ f (l.foldl (fun b t => if f t < f b then t else b) best) ≤ f best ∧ ∀ t ∈ l, f (l.foldl (fun b t => if f t < f b then t else b) best) ≤ f t := by intro l induction l with | nil => intro best; simp | cons t l ih => intro best simp only [List.foldl_cons] by_cases h : f t < f best · simp only [if_pos h] obtain ⟨hmem, hle, hall⟩ := ih t refine ⟨?_, hle.trans h.le, ?_⟩ · exact List.mem_cons_of_mem best hmem · intro a ha rcases List.mem_cons.mp ha with rfl | ha · exact hle · exact hall a ha · simp only [if_neg h] obtain ⟨hmem, hle, hall⟩ := ih best refine ⟨?_, hle, ?_⟩ · rcases List.mem_cons.mp hmem with heq | hmem · exact List.mem_cons.mpr (inl heq) · exact List.mem_cons_of_mem _ (List.mem_cons_of_mem _ hmem) · intro a ha rcases List.mem_cons.mp ha with rfl | ha · exact hle.trans (le_of_not_gt h) · exact hall a ha obtain ⟨hmem, _, hall⟩ := hfold (dictionaryList n) .const have hc : DictTag.const ∈ dictionaryList n := by simp [dictionaryList] have hm : selectedTag K beta kappa n sigma ∈ dictionaryList n := by rcases List.mem_cons.mp hmem with hmem | hmem · simpa [selectedTag, f, hmem] using hc · exact hmem refine ⟨by simpa [weightDictionary] using hm, ?_⟩ intro tag htag exact hall tag (by simpa [weightDictionary] using htag)
CausalSmith.Stat.NoisydoseWeakdesignTransition.selectedTag_minimizes · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:283
theorem realFourierIntegral_continuous Lemma realFourierIntegral_continuous in the paper ↗

The totalized real Fourier integral is continuous: nonintegrable inputs give the zero function. Under the stated conditions. This is the stated conclusion.

Formal statement
f :
ℝ → ℂ
Proof (Lean source)
-- @node: realFourierIntegral_continuous lemma realFourierIntegral_continuous (f : ℝ → ℂ) : Continuous (fourierIntegral fourierChar volume f) := by by_cases hf : Integrable f · exact VectorFourier.fourierIntegral_continuous Real.continuous_fourierChar (by fun_prop) hf · have hz : fourierIntegral fourierChar volume f = fun _ => 0 := by funext w rw [Fourier.fourierIntegral_def] apply integral_undef exact fun h => hf ((VectorFourier.fourierIntegral_convergent_iff (L := LinearMap.mul ℝ ℝ) Real.continuous_fourierChar (by fun_prop) w).mp h) rw [hz] exact continuous_const
CausalSmith.Stat.NoisydoseWeakdesignTransition.realFourierIntegral_continuous · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:328

The real inverse Fourier weight is Borel measurable for every public scale and bandwidth. This is the stated conclusion.

Formal statement
sigma h :
ℝ
Measurable (ellF sigma h)
Proof (Lean source)
-- @node: ellF_measurable @[fun_prop] lemma ellF_measurable (sigma h : ℝ) : Measurable (ellF sigma h) := by unfold ellF have hc := realFourierIntegral_continuous (fun xi : ℝ => fourierIntegral fourierChar volume (fun t : ℝ => (qF h t : ℂ)) xi * (exp (sigma^2 * (2*pi*xi)^2 / 2) : ℂ)) exact (Complex.continuous_re.comp (hc.comp continuous_neg)).measurable
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellF_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:344

The finite inverse-heat polynomial weight is Borel measurable. This is the stated conclusion.

Formal statement
sigma :
ℝ
m :
ℕ
Measurable (ellM sigma m)
Proof (Lean source)
-- @node: ellM_measurable @[fun_prop] lemma ellM_measurable (sigma : ℝ) (m : ℕ) : Measurable (ellM sigma m) := by unfold ellM fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.ellM_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:353
theorem pairOf_ell_measurable

Every public dictionary tag supplies a Borel measurable inverse weight. This is the stated conclusion.

Formal statement
sigma :
ℝ
tag :
Measurable (pairOf sigma tag).ell
Proof (Lean source)
-- @node: pairOf_ell_measurable @[fun_prop] lemma pairOf_ell_measurable (sigma : ℝ) (tag : DictTag) : Measurable (pairOf sigma tag).ell := by cases tag with | const => exact measurable_const | fourier k => exact ellF_measurable sigma (dyadicBandwidth k) | poly j => exact ellM_measurable sigma (2^j+1)
CausalSmith.Stat.NoisydoseWeakdesignTransition.pairOf_ell_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:359

The empirical stratum frequency is Borel measurable in the records. This is the stated conclusion.

Formal statement
n :
ℕ
x :
Measurable (fun data : Fin n → Obs => phat n data x)
Proof (Lean source)
-- @node: phat_measurable @[fun_prop] lemma phat_measurable (n : ℕ) (x : Bool) : Measurable (fun data : Fin n → Obs => phat n data x) := by have hm (i : Fin n) : Measurable (fun data : Fin n → Obs => if (data i).1 = x then (1 : ℝ) else 0) := by exact Measurable.ite ((measurableSet_singleton x).preimage (by fun_prop)) (by fun_prop) measurable_const unfold phat fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.phat_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:368
theorem Dhat_measurable

The empirical denominator is measurable whenever the public inverse weight is measurable. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
x :
hq :
Measurable (fun data : Fin n → Obs => Dhat n data x q)
Proof (Lean source)
-- @node: Dhat_measurable @[fun_prop] lemma Dhat_measurable (n : ℕ) (x : Bool) (q : WeightPair) (hq : Measurable q.ell) : Measurable (fun data : Fin n → Obs => Dhat n data x q) := by have hm (i : Fin n) : Measurable (fun data : Fin n → Obs => if (data i).1 = x then q.ell ((data i).2.1-a0) else 0) := by exact Measurable.ite ((measurableSet_singleton x).preimage (by fun_prop)) (by fun_prop) measurable_const unfold Dhat fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.Dhat_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:379
theorem Mhat_measurable

The empirical marked numerator is measurable whenever the public inverse weight is measurable. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
x :
hq :
Measurable (fun data : Fin n → Obs => Mhat n data x q)
Proof (Lean source)
-- @node: Mhat_measurable @[fun_prop] lemma Mhat_measurable (n : ℕ) (x : Bool) (q : WeightPair) (hq : Measurable q.ell) : Measurable (fun data : Fin n → Obs => Mhat n data x q) := by have hm (i : Fin n) : Measurable (fun data : Fin n → Obs => if (data i).1 = x then (data i).2.2*q.ell ((data i).2.1-a0) else 0) := by exact Measurable.ite ((measurableSet_singleton x).preimage (by fun_prop)) (by fun_prop) measurable_const unfold Mhat fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.Mhat_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:390
theorem muhat_measurable

The floored and clipped stratum ratio is a measurable function of the records. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
n :
ℕ
x :
hq :
Measurable (fun data : Fin n → Obs => muhat K kappa n data x q)
Proof (Lean source)
-- @node: muhat_measurable @[fun_prop] lemma muhat_measurable (K : ClassConstants) (kappa : ℝ) (n : ℕ) (x : Bool) (q : WeightPair) (hq : Measurable q.ell) : Measurable (fun data : Fin n → Obs => muhat K kappa n data x q) := by unfold muhat fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.muhat_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:401
theorem weightEstimator_measurable

The weighted estimator is measurable whenever its public inverse weight is measurable. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
n :
ℕ
hq :
Proof (Lean source)
-- @node: weightEstimator_measurable @[fun_prop] lemma weightEstimator_measurable (K : ClassConstants) (kappa : ℝ) (n : ℕ) (q : WeightPair) (hq : Measurable q.ell) : Measurable (weightEstimator K kappa n q) := by unfold weightEstimator fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.weightEstimator_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:408
theorem totalEstimator_measurable

The total public selected estimator is a measurable function of the observed records. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
Measurable (totalEstimator K beta kappa n sigma)
Proof (Lean source)
-- @node: totalEstimator_measurable @[fun_prop] lemma totalEstimator_measurable (K : ClassConstants) (beta kappa : ℝ) (n : ℕ) (sigma : ℝ) : Measurable (totalEstimator K beta kappa n sigma) := by unfold totalEstimator by_cases h : blocksNonempty n · simp only [if_pos h] exact weightEstimator_measurable K kappa n _ (pairOf_ell_measurable sigma (selectedTag K beta kappa n sigma)) · simp only [if_neg h] exact measurable_const
CausalSmith.Stat.NoisydoseWeakdesignTransition.totalEstimator_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:415
theorem honestInterval_connected

The declared clipped confidence interval is connected, including its small-sample fallback. This is the stated conclusion.

Formal statement
beta kappa alpha :
ℝ
n :
ℕ
sigma :
ℝ
z :
Fin n → Obs
(honestInterval K beta kappa alpha n sigma z).OrdConnected
Proof (Lean source)
-- @node: honestInterval_connected lemma honestInterval_connected (K : ClassConstants) (beta kappa alpha : ℝ) (n : ℕ) (sigma : ℝ) (z : Fin n → Obs) : (honestInterval K beta kappa alpha n sigma z).OrdConnected := by unfold honestInterval split <;> exact ordConnected_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.honestInterval_connected · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:426
theorem honestInterval_membership_measurable

Membership in the declared confidence interval is jointly measurable in observed records and candidate target. This is the stated conclusion.

Formal statement
beta kappa alpha :
ℝ
n :
ℕ
sigma :
ℝ
MeasurableSet {p : (Fin n → Obs) × ℝ | p.2 ∈ honestInterval K beta kappa alpha n sigma p.1}
Proof (Lean source)
-- @node: honestInterval_membership_measurable lemma honestInterval_membership_measurable (K : ClassConstants) (beta kappa alpha : ℝ) (n : ℕ) (sigma : ℝ) : MeasurableSet {p : (Fin n → Obs) × ℝ | p.2 ∈ honestInterval K beta kappa alpha n sigma p.1} := by have ht : Measurable (fun p : (Fin n → Obs) × ℝ => totalEstimator K beta kappa n sigma p.1) := by fun_prop unfold honestInterval by_cases h : blocksNonempty n · simp only [if_pos h, mem_Icc] exact (measurableSet_le (by fun_prop) measurable_snd).inter (measurableSet_le measurable_snd (by fun_prop)) · simp only [if_neg h, mem_Icc] exact (measurableSet_le measurable_const measurable_snd).inter (measurableSet_le measurable_snd measurable_const)
CausalSmith.Stat.NoisydoseWeakdesignTransition.honestInterval_membership_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:432
def honestIntervalProcedure

The declared confidence interval packaged as a measurable connected procedure based solely on the observed records.

Definition (Lean source)
beta kappa alpha :
ℝ
n :
ℕ
sigma :
ℝ
honestIntervalProcedure K beta kappa alpha n sigma :
⟨honestInterval K beta kappa alpha n sigma, honestInterval_connected K beta kappa alpha n sigma, honestInterval_membership_measurable K beta kappa alpha n sigma⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.honestIntervalProcedure · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Estimator.lean:447
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.FixedNoise 4 declarations Fixed positive noise selects the compact-support branch and its iterated-logarithm order.

Fixed positive noise selects the compact-support branch and its iterated-logarithm order.

theorem logScale_tendsto_atTop

The public sample logarithm diverges. This is the stated conclusion.

Formal statement
Tendsto (fun n : ℕ => logScale n) atTop atTop
Proof (Lean source)
-- @node: logScale_tendsto_atTop lemma logScale_tendsto_atTop : Tendsto (fun n : ℕ => logScale n) atTop atTop := Real.tendsto_log_atTop.comp (tendsto_natCast_atTop_atTop.const_mul_atTop (Real.exp_pos 1))
CausalSmith.Stat.NoisydoseWeakdesignTransition.logScale_tendsto_atTop · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/FixedNoise.lean:11
theorem fixedNoise_frontierScale_eq

Every fixed positive noise eventually exceeds both branch cutoffs. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma :
ℝ
hd :
0 < effDim beta kappa
hs :
0 < sigma
∀ᶠ n : ℕ in atTop, frontierScale beta kappa sigma n = polynomialScale sigma n
Proof (Lean source)
-- @node: fixedNoise_frontierScale_eq lemma fixedNoise_frontierScale_eq (beta kappa sigma : ℝ) (hd : 0 < effDim beta kappa) (hs : 0 < sigma) : ∀ᶠ n : ℕ in atTop, frontierScale beta kappa sigma n = polynomialScale sigma n := by have hD : Tendsto (fun n : ℕ => directScale beta kappa n) atTop (𝓝 0) := by simpa only [directScale, neg_div, Function.comp_def] using (tendsto_rpow_neg_atTop (one_div_pos.mpr hd)).comp tendsto_natCast_atTop_atTop have hE : Tendsto (fun n : ℕ => (logScale n)^(-1/2 : ℝ)) atTop (𝓝 0) := by convert (tendsto_rpow_neg_atTop (by norm_num : (0 : ℝ) < 1/2)).comp logScale_tendsto_atTop using 1 <;> norm_num [Function.comp_def] filter_upwards [hD.eventually (gt_mem_nhds hs), hE.eventually (gt_mem_nhds hs)] with n hnD hnE simp only [frontierScale, if_neg (not_le.mpr hnD), if_neg (not_le.mpr hnE)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.fixedNoise_frontierScale_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/FixedNoise.lean:17
theorem fixedNoise_polynomialScale_bounds

The compact-support scale is bounded above and below by the iterated-logarithm scale. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma :
ℝ
hs :
0 < sigma
∀ᶠ n : ℕ in atTop, 0
≤ log (log n) / log n ∧
(1/4 : ℝ) * (log (log n) / log n) ≤ polynomialScale sigma n ∧
polynomialScale sigma n ≤ 2 * (log (log n) / log n)
Proof (Lean source)
-- @node: fixedNoise_polynomialScale_bounds lemma fixedNoise_polynomialScale_bounds (sigma : ℝ) (hs : 0 < sigma) : ∀ᶠ n : ℕ in atTop, 0 ≤ log (log n) / log n ∧ (1/4 : ℝ) * (log (log n) / log n) ≤ polynomialScale sigma n ∧ polynomialScale sigma n ≤ 2 * (log (log n) / log n) := by have hx : Tendsto (fun n : ℕ => log (n : ℝ)) atTop atTop := Real.tendsto_log_atTop.comp tendsto_natCast_atTop_atTop have hxx := Real.tendsto_log_atTop.comp hx filter_upwards [eventually_ge_atTop (1 : ℕ), hx.eventually_ge_atTop 1, hxx.eventually_ge_atTop 0, hxx.eventually_ge_atTop (-2 * log (sigma^2)), hxx.eventually_ge_atTop (log (exp 1 + 2*sigma^2))] with n hn hx1 hlog0 hlo hhi simp only [Function.comp_def] at hlog0 hlo hhi have hnpos : (0 : ℝ) < n := by exact_mod_cast (lt_of_lt_of_le Nat.zero_lt_one hn) have hL : logScale n = 1 + log n := by rw [logScale, Real.log_mul (Real.exp_pos 1).ne' hnpos.ne', Real.log_exp] have hxpos : 0 < log (n : ℝ) := by linarith have hLpos : 0 < logScale n := by rw [hL]; linarith have hs2 : 0 < sigma^2 := sq_pos_of_pos hs have hargpos : 0 < exp 1 + sigma^2 * logScale n := by positivity have hloglo : log (log n) / 2 ≤ log (exp 1 + sigma^2 * logScale n) := by have hm := Real.log_le_log (mul_pos hs2 hxpos) (show sigma^2 * log n ≤ exp 1 + sigma^2 * logScale n by rw [hL]; nlinarith [Real.exp_pos 1]) rw [Real.log_mul hs2.ne' hxpos.ne'] at hm linarith have hloghi : log (exp 1 + sigma^2 * logScale n) ≤ 2 * log (log n) := by have hm := Real.log_le_log hargpos (show exp 1 + sigma^2 * logScale n ≤ (exp 1 + 2*sigma^2) * log n by rw [hL]; nlinarith [Real.exp_pos 1]) rw [Real.log_mul (by positivity) hxpos.ne'] at hm linarith refine ⟨div_nonneg hlog0 hxpos.le, ?_, ?_⟩ · change _ ≤ log (exp 1 + sigma^2 * logScale n) / logScale n apply (le_div_iff₀ hLpos).mpr rw [hL] have heq : (1/4 : ℝ) * (log (log n) / log n) * (1 + log n) = log (log n) / 4 + (log (log n) / log n) / 4 := by field_simp; ring rw [heq] rw [hL] at hloglo have hdiv : log (log n) / log n ≤ log (log n) := (div_le_iff₀ hxpos).mpr (le_mul_of_one_le_right hlog0 hx1) linarith · change log (exp 1 + sigma^2 * logScale n) / logScale n ≤ _ apply (div_le_iff₀ hLpos).mpr have hdiv0 := div_nonneg hlog0 hxpos.le have heq : 2 * (log (log n) / log n) * logScale n = 2 * log (log n) + 2 * (log (log n) / log n) := by rw [hL]; field_simp; ring rw [heq] linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.fixedNoise_polynomialScale_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/FixedNoise.lean:31
theorem fixedNoise_frontierRate_bounds

Taking the fixed smoothness power preserves the two-sided scale comparison. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma :
ℝ
hb :
0 ≤ beta
hd :
0 < effDim beta kappa
hs :
0 < sigma
∀ᶠ n : ℕ in atTop, 0
≤ (log (log n) / log n)^beta ∧
(1/4 : ℝ)^beta * (log (log n) / log n)^beta
≤ frontierRate beta kappa sigma n ∧
frontierRate beta kappa sigma n ≤ (2 : ℝ)^beta * (log (log n) / log n)^beta
Proof (Lean source)
-- @node: fixedNoise_frontierRate_bounds lemma fixedNoise_frontierRate_bounds (beta kappa sigma : ℝ) (hb : 0 ≤ beta) (hd : 0 < effDim beta kappa) (hs : 0 < sigma) : ∀ᶠ n : ℕ in atTop, 0 ≤ (log (log n) / log n)^beta ∧ (1/4 : ℝ)^beta * (log (log n) / log n)^beta ≤ frontierRate beta kappa sigma n ∧ frontierRate beta kappa sigma n ≤ (2 : ℝ)^beta * (log (log n) / log n)^beta := by filter_upwards [fixedNoise_frontierScale_eq beta kappa sigma hd hs, fixedNoise_polynomialScale_bounds sigma hs] with n hbranch hbounds rw [frontierRate, hbranch] obtain ⟨ht, hlo, hhi⟩ := hbounds refine ⟨Real.rpow_nonneg ht _, ?_, ?_⟩ · have hp := Real.rpow_le_rpow (mul_nonneg (by norm_num) ht) hlo hb rwa [Real.mul_rpow (by norm_num) ht] at hp · have hp := Real.rpow_le_rpow ((mul_nonneg (by norm_num) ht).trans hlo) hhi hb rwa [Real.mul_rpow (by norm_num) ht] at hp
CausalSmith.Stat.NoisydoseWeakdesignTransition.fixedNoise_frontierRate_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/FixedNoise.lean:89
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.FrontierElbows 6 declarations Quantitative comparison of the inverse scales at the second frontier elbow.

Quantitative comparison of the inverse scales at the second frontier elbow.

theorem logScale_one_le

The public logarithmic sample size is at least one for nonzero samples. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
hn :
1 ≤ n
1 ≤ logScale n
Proof (Lean source)
-- @node: logScale_one_le lemma logScale_one_le (n : ℕ) (hn : 1 ≤ n) : 1 ≤ logScale n := by have hn' : (1 : ℝ) ≤ n := by exact_mod_cast hn calc 1 = log (exp 1) := (Real.log_exp 1).symm _ ≤ logScale n := Real.log_le_log (Real.exp_pos 1) (le_mul_of_one_le_right (Real.exp_pos 1).le hn')
CausalSmith.Stat.NoisydoseWeakdesignTransition.logScale_one_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/FrontierElbows.lean:11
theorem secondElbow_inverse_sqrt

At the second elbow the inverse square-root power is the reciprocal square root. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
hn :
1 ≤ n
(logScale n)^(-1/2 : ℝ) = (sqrt (logScale n))⁻¹
Proof (Lean source)
-- @node: secondElbow_inverse_sqrt lemma secondElbow_inverse_sqrt (n : ℕ) (hn : 1 ≤ n) : (logScale n)^(-1/2 : ℝ) = (sqrt (logScale n))⁻¹ := by have hL : 0 ≤ logScale n := (by norm_num : (0 : ℝ) ≤ 1).trans (logScale_one_le n hn) rw [show (-1/2 : ℝ) = -(1/2 : ℝ) by norm_num, Real.rpow_neg hL, ← Real.sqrt_eq_rpow]
CausalSmith.Stat.NoisydoseWeakdesignTransition.secondElbow_inverse_sqrt · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/FrontierElbows.lean:20
theorem polynomialScale_at_secondElbow

The polynomial inverse scale at the second elbow is a fixed constant over log(en). Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
hn :
1 ≤ n
polynomialScale ((logScale n)^(-1/2 : ℝ)) n = log (exp 1 + 1) / logScale n
Proof (Lean source)
-- @node: polynomialScale_at_secondElbow lemma polynomialScale_at_secondElbow (n : ℕ) (hn : 1 ≤ n) : polynomialScale ((logScale n)^(-1/2 : ℝ)) n = log (exp 1 + 1) / logScale n := by have hL : 0 < logScale n := lt_of_lt_of_le zero_lt_one (logScale_one_le n hn) have hsq : ((logScale n)^(-1/2 : ℝ))^2 * logScale n = 1 := by rw [secondElbow_inverse_sqrt n hn, inv_pow, Real.sq_sqrt hL.le, inv_mul_cancel₀ hL.ne'] simp only [polynomialScale, hsq]
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomialScale_at_secondElbow · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/FrontierElbows.lean:28
theorem log_logScale_div_tendsto_zero

The logarithm of log(en) is negligible compared with log(en). This is the stated conclusion.

Formal statement
Tendsto (fun n : ℕ => log (logScale n) / logScale n) atTop (𝓝 0)
Proof (Lean source)
-- @node: log_logScale_div_tendsto_zero lemma log_logScale_div_tendsto_zero : Tendsto (fun n : ℕ => log (logScale n) / logScale n) atTop (𝓝 0) := by have hL : Tendsto (fun n : ℕ => logScale n) atTop atTop := Real.tendsto_log_atTop.comp (tendsto_natCast_atTop_atTop.const_mul_atTop (Real.exp_pos 1)) exact Real.isLittleO_log_id_atTop.tendsto_div_nhds_zero.comp hL
CausalSmith.Stat.NoisydoseWeakdesignTransition.log_logScale_div_tendsto_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/FrontierElbows.lean:39
theorem secondElbow_log_bounds

At the second elbow the Fourier logarithm is comparable to log(en). Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
hd :
0 ≤ effDim beta kappa
∃ n0 : ℕ,
1 ≤ n0
conclusion 1
n ≥ n0 :
logScale n / 4 ≤ log (exp 1 + n * ((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa)
log (exp 1 + n * ((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa) ≤ 4 * logScale n
Proof (Lean source)
-- @node: secondElbow_log_bounds lemma secondElbow_log_bounds (beta kappa : ℝ) (hd : 0 ≤ effDim beta kappa) : ∃ n0 : ℕ, 1 ≤ n0 ∧ ∀ n ≥ n0, logScale n / 4 ≤ log (exp 1 + n * ((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa) ∧ log (exp 1 + n * ((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa) ≤ 4 * logScale n := by have hsmall : ∀ᶠ n : ℕ in atTop, (effDim beta kappa / 2) * (log (logScale n) / logScale n) < 1/2 := (tendsto_const_nhds.mul log_logScale_div_tendsto_zero).eventually (gt_mem_nhds (by norm_num)) have hLtop : Tendsto (fun n : ℕ => logScale n) atTop atTop := Real.tendsto_log_atTop.comp (tendsto_natCast_atTop_atTop.const_mul_atTop (Real.exp_pos 1)) obtain ⟨n0, hn0⟩ := eventually_atTop.1 (hsmall.and (hLtop.eventually_ge_atTop 4)) refine ⟨max n0 1, le_max_right _ _, ?_⟩ intro n hn have hn1 : 1 ≤ n := (le_max_right _ _).trans hn have hnpos : (0 : ℝ) < n := by exact_mod_cast (show 0 < n by omega) obtain ⟨hsmalln, hL4⟩ := hn0 n ((le_max_left _ _).trans hn) have hL : 0 < logScale n := by linarith have hpow : 0 < ((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa := by positivity have hlogn : log (n : ℝ) = logScale n - 1 := by rw [logScale, Real.log_mul (Real.exp_pos 1).ne' hnpos.ne', Real.log_exp] ring have hlogpow : log (((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa) = -(effDim beta kappa / 2) * log (logScale n) := by rw [Real.log_rpow (by positivity), Real.log_rpow hL] ring have hsmall' : (effDim beta kappa / 2) * log (logScale n) < logScale n / 2 := by have h := (mul_lt_mul_of_pos_right hsmalln hL) field_simp at h nlinarith constructor · have hmono := Real.log_le_log (mul_pos hnpos hpow) (le_add_of_nonneg_left (Real.exp_pos 1).le : (n : ℝ) * ((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa ≤ _) rw [Real.log_mul hnpos.ne' hpow.ne', hlogn, hlogpow] at hmono linarith · have hsig : (logScale n)^(-1/2 : ℝ) ≤ 1 := by rw [secondElbow_inverse_sqrt n hn1] apply inv_le_one_of_one_le₀ exact (Real.sqrt_le_sqrt (logScale_one_le n hn1)).trans_eq' (by norm_num) have hp1 : ((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa ≤ 1 := Real.rpow_le_one (by positivity) hsig hd have harg : exp 1 + (n : ℝ) * ((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa ≤ 2 * (exp 1 * n) := by have he : (1 : ℝ) ≤ exp 1 := Real.one_le_exp (by norm_num) have hn' : (1 : ℝ) ≤ n := by exact_mod_cast hn1 have hm := mul_le_mul_of_nonneg_left hp1 hnpos.le nlinarith have hmono := Real.log_le_log (by positivity : 0 < exp 1 + (n : ℝ) * ((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa) harg rw [Real.log_mul (by norm_num : (2 : ℝ) ≠ 0) (by positivity), ← logScale] at hmono have hlog2 : log 2 ≤ 2 := Real.log_le_self (by norm_num) linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.secondElbow_log_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/FrontierElbows.lean:48
theorem secondElbow_comparison

Both inverse scales agree up to fixed constants at the second elbow. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
hd :
0 ≤ effDim beta kappa
∃ C : ℝ,
conclusion 1
0 < C
conclusion 2
∃ n0 : ℕ,
∀ n ≥ n0,
fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n
≤ C * polynomialScale ((logScale n)^(-1/2 : ℝ)) n ∧
polynomialScale ((logScale n)^(-1/2 : ℝ)) n
≤ C * fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n
Proof (Lean source)
-- @node: secondElbow_comparison lemma secondElbow_comparison (beta kappa : ℝ) (hd : 0 ≤ effDim beta kappa) : ∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, ∀ n ≥ n0, fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n ≤ C * polynomialScale ((logScale n)^(-1/2 : ℝ)) n ∧ polynomialScale ((logScale n)^(-1/2 : ℝ)) n ≤ C * fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n := by let a := log (exp 1 + 1) have ha : 0 < a := Real.log_pos (by linarith [Real.exp_pos (1 : ℝ)]) let C := max (2/a) (2*a) have hCa : 2/a ≤ C := le_max_left _ _ have haC : 2*a ≤ C := le_max_right _ _ have hC : 0 < C := lt_of_lt_of_le (by positivity : 0 < 2*a) haC obtain ⟨n0, hn01, hbounds⟩ := secondElbow_log_bounds beta kappa hd refine ⟨C, hC, n0, ?_⟩ intro n hn have hn1 := hn01.trans hn have hL : 0 < logScale n := lt_of_lt_of_le zero_lt_one (logScale_one_le n hn1) let D := log (exp 1 + n * ((logScale n)^(-1/2 : ℝ)) ^ effDim beta kappa) obtain ⟨hDlo, hDhi⟩ := hbounds n hn change logScale n / 4 ≤ D at hDlo change D ≤ 4 * logScale n at hDhi have hD : 0 < D := lt_of_lt_of_le (by positivity) hDlo have hsL := Real.sqrt_nonneg (logScale n) have hsD := Real.sqrt_nonneg D have hsLpos := Real.sqrt_pos.mpr hL have hsDpos := Real.sqrt_pos.mpr hD have hsLsq := Real.sq_sqrt hL.le have hsDsq := Real.sq_sqrt hD.le have hrootlo : sqrt (logScale n) / 2 ≤ sqrt D := by nlinarith have hroothi : sqrt D ≤ 2 * sqrt (logScale n) := by nlinarith have hprodlo : logScale n / 2 ≤ sqrt (logScale n) * sqrt D := by nlinarith [mul_le_mul_of_nonneg_left hrootlo hsL] have hprodhi : sqrt (logScale n) * sqrt D ≤ 2 * logScale n := by nlinarith [mul_le_mul_of_nonneg_left hroothi hsL] have hprodpos : 0 < sqrt (logScale n) * sqrt D := mul_pos hsLpos hsDpos have hF : fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n = 1 / (sqrt (logScale n) * sqrt D) := by change (logScale n)^(-1/2 : ℝ) / sqrt D = _ calc _ = (sqrt (logScale n))⁻¹ / sqrt D := congrArg (fun x : ℝ => x / sqrt D) (secondElbow_inverse_sqrt n hn1) _ = _ := by field_simp have hFlo : 1 / (2 * logScale n) ≤ fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n := by rw [hF] exact one_div_le_one_div_of_le hprodpos hprodhi have hFhi : fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n ≤ 2 / logScale n := by rw [hF] apply (div_le_div_iff₀ hprodpos hL).mpr nlinarith rw [polynomialScale_at_secondElbow n hn1] change fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n ≤ C * (a / logScale n) ∧ a / logScale n ≤ C * fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n constructor · apply hFhi.trans rw [← mul_div_assoc] apply (div_le_div_iff_of_pos_right hL).mpr exact (div_le_iff₀ ha).mp hCa · calc a / logScale n ≤ C * (1 / (2 * logScale n)) := by apply (div_le_iff₀ hL).mpr have heq : C * (1 / (2 * logScale n)) * logScale n = C/2 := by field_simp rw [heq] linarith _ ≤ C * fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n := mul_le_mul_of_nonneg_left hFlo hC.le
CausalSmith.Stat.NoisydoseWeakdesignTransition.secondElbow_comparison · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/FrontierElbows.lean:108
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.GaussianConvolution 22 declarations Compact signed moments, Gaussian kernels, and witness-density domination

Compact signed moments, Gaussian kernels, and witness-density domination

def phiDensity

Centered Gaussian density on the real line for positive sigma.

Definition (Lean source)
sigma w :
ℝ
phiDensity sigma w :
ℝ
exp (-w^2/(2*sigma^2)) / (sqrt (2*pi)*sigma)
def smoothSigned

Convolution of an integrable signed density with the centered Gaussian density.

Definition (Lean source)
sigma :
ℝ
v :
ℝ → ℝ
w :
ℝ
smoothSigned sigma v w :
ℝ
∫ t, v t * phiDensity sigma (w-t)

Factorial tail in the observed Gaussian moment-series comparison.

Definition (Lean source)
sigma ell :
ℝ
J :
ℕ
momentTail sigma ell J :
ℝ
∑' j : ℕ, if J ≤ j then (ell^2/sigma^2)^j/(j.factorial : ℝ) else 0

The centered Gaussian density is strictly positive at every real argument when its scale is positive. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma w :
ℝ
hsigma :
0 < sigma
0 < phiDensity sigma w
Proof (Lean source)
-- @node: phiDensity_pos lemma phiDensity_pos (sigma w : ℝ) (hsigma : 0 < sigma) : 0 < phiDensity sigma w := by unfold phiDensity exact div_pos (Real.exp_pos _) (mul_pos (Real.sqrt_pos.mpr (by positivity)) hsigma)

The centered Gaussian density is invariant under reflection. This is the stated conclusion.

Formal statement
sigma w :
ℝ
phiDensity sigma (-w) = phiDensity sigma w
Proof (Lean source)
-- @node: phiDensity_even lemma phiDensity_even (sigma w : ℝ) : phiDensity sigma (-w) = phiDensity sigma w := by simp [phiDensity]
CausalSmith.Stat.NoisydoseWeakdesignTransition.phiDensity_even · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:34
theorem witnessDesignDensity_nonneg Lemma witnessDesignDensity_nonneg in the paper ↗

The compact power-law witness density is nonnegative for nonnegative degeneracy. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa t :
ℝ
hkappa :
0 ≤ kappa
0 ≤ witnessDesignDensity kappa t
Proof (Lean source)
-- @node: witnessDesignDensity_nonneg lemma witnessDesignDensity_nonneg (kappa t : ℝ) (hkappa : 0 ≤ kappa) : 0 ≤ witnessDesignDensity kappa t := by unfold witnessDesignDensity split_ifs · positivity · rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDesignDensity_nonneg · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:39
theorem witnessDesignDensity_even Lemma witnessDesignDensity_even in the paper ↗

The common compact witness density is symmetric about zero. This is the stated conclusion.

Formal statement
kappa t :
ℝ
Proof (Lean source)
-- @node: witnessDesignDensity_even lemma witnessDesignDensity_even (kappa t : ℝ) : witnessDesignDensity kappa (-t) = witnessDesignDensity kappa t := by have he : -t ∈ Icc (-1/2 : ℝ) (1/2) ↔ t ∈ Icc (-1/2 : ℝ) (1/2) := by constructor <;> rintro ⟨h1, h2⟩ <;> constructor <;> linarith simp only [witnessDesignDensity, he, abs_neg]
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDesignDensity_even · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:48
theorem phiDensity_same_side_lower Lemma phiDensity_same_side_lower in the paper ↗

On the short interval on the same side as the observed dose, the Gaussian kernel is bounded below by its centered value times exp(-1/2). Under the stated conditions. This is the stated conclusion.

Formal statement
sigma w t :
ℝ
hsigma :
0 < sigma
ht :
t ∈ Icc (0 : ℝ) sigma
hw :
0 ≤ w
exp (-1/2) * phiDensity sigma w ≤ phiDensity sigma (w-t)
Proof (Lean source)
-- @node: phiDensity_same_side_lower lemma phiDensity_same_side_lower (sigma w t : ℝ) (hsigma : 0 < sigma) (ht : t ∈ Icc (0 : ℝ) sigma) (hw : 0 ≤ w) : exp (-1/2) * phiDensity sigma w ≤ phiDensity sigma (w-t) := by have hd : 0 < 2*sigma^2 := by positivity have hexp : (-1/2 : ℝ) + -(w^2)/(2*sigma^2) ≤ -((w-t)^2)/(2*sigma^2) := by apply (le_div_iff₀ hd).mpr field_simp nlinarith [mul_nonneg hw ht.1, mul_nonneg (sub_nonneg.mpr ht.2) (show 0 ≤ sigma+t by linarith [ht.1])] unfold phiDensity rw [← mul_div_assoc, ← Real.exp_add] exact div_le_div_of_nonneg_right (Real.exp_le_exp.mpr hexp) (by positivity)
CausalSmith.Stat.NoisydoseWeakdesignTransition.phiDensity_same_side_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:56
theorem gaussian_design_integrable Lemma gaussian_design_integrable in the paper ↗

The Gaussian convolution integrand of the compact witness density is integrable. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma w :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 < sigma
Integrable (fun t => witnessDesignDensity kappa t * phiDensity sigma (w-t))
Proof (Lean source)
-- @node: gaussian_design_integrable @[fun_prop] lemma gaussian_design_integrable (kappa sigma w : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 < sigma) : Integrable (fun t => witnessDesignDensity kappa t * phiDensity sigma (w-t)) := by have hc : Continuous (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * phiDensity sigma (w-t)) := by unfold phiDensity fun_prop have he : (fun t => witnessDesignDensity kappa t * phiDensity sigma (w-t)) = (Icc (-1/2 : ℝ) (1/2)).indicator (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * phiDensity sigma (w-t)) := by funext t simp only [witnessDesignDensity, indicator_apply] split_ifs <;> simp rw [he] exact hc.integrableOn_Icc.integrable_indicator measurableSet_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_design_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:70
theorem smoothSigned_design_even Lemma smoothSigned_design_even in the paper ↗

Convolving the symmetric witness density with a centered Gaussian preserves reflection symmetry. This is the stated conclusion.

Formal statement
kappa sigma w :
ℝ
Proof (Lean source)
-- @node: smoothSigned_design_even lemma smoothSigned_design_even (kappa sigma w : ℝ) : smoothSigned sigma (witnessDesignDensity kappa) (-w) = smoothSigned sigma (witnessDesignDensity kappa) w := by unfold smoothSigned rw [← integral_neg_eq_self (fun t => witnessDesignDensity kappa t * phiDensity sigma (-w-t))] congr 1 funext t rw [witnessDesignDensity_even] have he : -w-(-t) = -(w-t) := by ring rw [he, phiDensity_even]
CausalSmith.Stat.NoisydoseWeakdesignTransition.smoothSigned_design_even · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:87
theorem gaussian_design_lower_nonneg Lemma gaussian_design_lower_nonneg in the paper ↗

Integrating over the positive short interval gives the public Gaussian reference-density bound for nonnegative observed doses. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma w :
ℝ
hkappa :
0 ≤ kappa
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
hw :
0 ≤ w
exp (-1/2)*sigma^(kappa+1)*phiDensity sigma w
Proof (Lean source)
-- @node: gaussian_design_lower_nonneg lemma gaussian_design_lower_nonneg (kappa sigma w : ℝ) (hkappa : 0 ≤ kappa) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (hw : 0 ≤ w) : exp (-1/2)*sigma^(kappa+1)*phiDensity sigma w ≤ smoothSigned sigma (witnessDesignDensity kappa) w := by let c : ℝ := (kappa+1)*2^kappa let f : ℝ → ℝ := fun t => witnessDesignDensity kappa t * phiDensity sigma (w-t) have hc : 0 ≤ c := by dsimp [c]; positivity have hp : 0 < phiDensity sigma w := phiDensity_pos sigma w hsigma.1 have hi : Integrable f := gaussian_design_integrable kappa sigma w hkappa hsigma.1 have hpow : IntervalIntegrable (fun t : ℝ => t^kappa) volume 0 sigma := by exact intervalIntegral.intervalIntegrable_rpow' (by linarith : -1 < kappa) have hcomp : IntervalIntegrable (fun t : ℝ => c*t^kappa*(exp (-1/2)*phiDensity sigma w)) volume 0 sigma := (hpow.const_mul c).mul_const _ have hmono : (∫ t in (0 : ℝ)..sigma, c*t^kappa*(exp (-1/2)*phiDensity sigma w)) ≤ ∫ t in (0 : ℝ)..sigma, f t := by apply intervalIntegral.integral_mono_on hsigma.1.le hcomp hi.intervalIntegrable intro t ht have ht' : t ∈ Icc (-1/2 : ℝ) (1/2) := by constructor <;> linarith [ht.1, ht.2, hsigma.2] dsimp [f, witnessDesignDensity] rw [if_pos ht', abs_of_nonneg ht.1] exact mul_le_mul_of_nonneg_left (phiDensity_same_side_lower sigma w t hsigma.1 ht hw) (mul_nonneg hc (Real.rpow_nonneg ht.1 _)) have hsmall : (∫ t in (0 : ℝ)..sigma, f t) ≤ smoothSigned sigma (witnessDesignDensity kappa) w := by rw [intervalIntegral.integral_of_le hsigma.1.le] exact setIntegral_le_integral hi (ae_of_all _ (fun t => mul_nonneg (witnessDesignDensity_nonneg kappa t hkappa) (phiDensity_pos sigma (w-t) hsigma.1).le)) have heval : (∫ t in (0 : ℝ)..sigma, c*t^kappa*(exp (-1/2)*phiDensity sigma w)) = 2^kappa * (exp (-1/2)*sigma^(kappa+1)*phiDensity sigma w) := by rw [intervalIntegral.integral_mul_const, intervalIntegral.integral_const_mul, integral_rpow (inl (by linarith : -1 < kappa)), Real.zero_rpow (by linarith : kappa+1 ≠ 0), sub_zero] dsimp [c] field_simp rw [heval] at hmono have htwo : 1 ≤ (2 : ℝ)^kappa := Real.one_le_rpow (by norm_num) hkappa calc _ ≤ 2^kappa * (exp (-1/2)*sigma^(kappa+1)*phiDensity sigma w) := by exact le_mul_of_one_le_left (mul_nonneg (mul_nonneg (Real.exp_pos _).le (Real.rpow_nonneg hsigma.1.le _)) hp.le) htwo _ ≤ _ := hmono.trans hsmall
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_design_lower_nonneg · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:100
theorem gaussian_design_density_lower Lemma gaussian_design_density_lower in the paper ↗

Positive Gaussian reference-density domination holds on the entire observed real line. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
w :
conclusion 1
conclusion 2
exp (-1/2)*sigma^(kappa+1)*phiDensity sigma w
Proof (Lean source)
-- @node: gaussian_design_density_lower lemma gaussian_design_density_lower (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) : ∀ w, 0 < smoothSigned sigma (witnessDesignDensity kappa) w ∧ exp (-1/2)*sigma^(kappa+1)*phiDensity sigma w ≤ smoothSigned sigma (witnessDesignDensity kappa) w := by intro w have hlower : exp (-1/2)*sigma^(kappa+1)*phiDensity sigma w ≤ smoothSigned sigma (witnessDesignDensity kappa) w := by by_cases hw : 0 ≤ w · exact gaussian_design_lower_nonneg kappa sigma w hkappa.1 hsigma hw · have h := gaussian_design_lower_nonneg kappa sigma (-w) hkappa.1 hsigma (by linarith) simpa only [phiDensity_even, smoothSigned_design_even] using h exact ⟨(mul_pos (mul_pos (Real.exp_pos _) (Real.rpow_pos_of_pos hsigma.1 _)) (phiDensity_pos sigma w hsigma.1)).trans_le hlower, hlower⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_design_density_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:143
theorem compact_signed_moment_integrable Lemma compact_signed_moment_integrable in the paper ↗

Every polynomial moment of a compactly supported integrable signed density is integrable. Under the stated conditions. This is the stated conclusion.

Formal statement
ell :
ℝ
hell :
0 ≤ ell
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
j :
ℕ
Integrable (fun t => t^j*v t)
Proof (Lean source)
-- @node: compact_signed_moment_integrable lemma compact_signed_moment_integrable (ell : ℝ) (hell : 0 ≤ ell) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) (j : ℕ) : Integrable (fun t => t^j*v t) := by apply (hv.norm.const_mul (ell^j)).mono' ((by fun_prop : Measurable (fun t : ℝ => t^j)).aestronglyMeasurable.mul hv.aestronglyMeasurable) filter_upwards with t by_cases ht : t ∈ Icc (-ell) ell · simp only [Pi.mul_apply, norm_mul, Real.norm_eq_abs, abs_pow] exact mul_le_mul_of_nonneg_right (pow_le_pow_left₀ (abs_nonneg t) (abs_le.mpr ht) j) (abs_nonneg _) · simp [hsupp t ht]
CausalSmith.Stat.NoisydoseWeakdesignTransition.compact_signed_moment_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:160
theorem compact_signed_moment_bound Lemma compact_signed_moment_bound in the paper ↗

The absolute signed moment is bounded by the support radius power times the absolute mass. Under the stated conditions. This is the stated conclusion.

Formal statement
ell :
ℝ
hell :
0 ≤ ell
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
j :
ℕ
|∫ t, t^j*v t| ≤ ell^j * ∫ t, |v t|
Proof (Lean source)
-- @node: compact_signed_moment_bound lemma compact_signed_moment_bound (ell : ℝ) (hell : 0 ≤ ell) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) (j : ℕ) : |∫ t, t^j*v t| ≤ ell^j * ∫ t, |v t| := by calc _ ≤ ∫ t, |t^j*v t| := abs_integral_le_integral_abs _ ≤ ∫ t, ell^j * |v t| := by apply integral_mono_ae (compact_signed_moment_integrable ell hell v hv hsupp j).norm (hv.norm.const_mul _) filter_upwards with t by_cases ht : t ∈ Icc (-ell) ell · simp only [Real.norm_eq_abs, abs_mul, abs_pow] exact mul_le_mul_of_nonneg_right (pow_le_pow_left₀ (abs_nonneg t) (abs_le.mpr ht) j) (abs_nonneg _) · simp [hsupp t ht] _ = _ := integral_const_mul _ _
CausalSmith.Stat.NoisydoseWeakdesignTransition.compact_signed_moment_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:173
theorem compact_signed_moment_coefficient_bound Lemma compact_signed_moment_coefficient_bound in the paper ↗

Each squared Gaussian moment coefficient is bounded by the corresponding factorial majorant. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
hsigma :
0 < sigma
hell :
0 ≤ ell
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
j :
ℕ
(∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ))
≤ (∫ t, |v t|)^2 * ((ell^2/sigma^2)^j/(j.factorial : ℝ))
Proof (Lean source)
-- @node: compact_signed_moment_coefficient_bound lemma compact_signed_moment_coefficient_bound (sigma ell : ℝ) (hsigma : 0 < sigma) (hell : 0 ≤ ell) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) (j : ℕ) : (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)) ≤ (∫ t, |v t|)^2 * ((ell^2/sigma^2)^j/(j.factorial : ℝ)) := by have hm := compact_signed_moment_bound ell hell v hv hsupp j have hmass : 0 ≤ ∫ t, |v t| := integral_nonneg (fun _ => abs_nonneg _) have hsq : (∫ t, t^j*v t)^2 ≤ (ell^j * ∫ t, |v t|)^2 := by simpa only [sq_abs] using (sq_le_sq₀ (abs_nonneg _) (mul_nonneg (pow_nonneg hell j) hmass)).mpr hm calc _ ≤ (ell^j * ∫ t, |v t|)^2 / (sigma^(2*j)*(j.factorial : ℝ)) := div_le_div_of_nonneg_right hsq (by positivity) _ = _ := by rw [div_pow, pow_mul, mul_pow] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.compact_signed_moment_coefficient_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:189
theorem compact_signed_moment_summable Lemma compact_signed_moment_summable in the paper ↗

The Gaussian squared-moment series converges by comparison with the exponential series. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
hsigma :
0 < sigma
hell :
0 ≤ ell
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
Summable (fun j : ℕ => (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)))
Proof (Lean source)
-- @node: compact_signed_moment_summable lemma compact_signed_moment_summable (sigma ell : ℝ) (hsigma : 0 < sigma) (hell : 0 ≤ ell) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) : Summable (fun j : ℕ => (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ))) := by apply Summable.of_nonneg_of_le (fun j => by positivity) (compact_signed_moment_coefficient_bound sigma ell hsigma hell v hv hsupp) ((Real.summable_pow_div_factorial (ell^2/sigma^2)).mul_left ((∫ t, |v t|)^2))
CausalSmith.Stat.NoisydoseWeakdesignTransition.compact_signed_moment_summable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:208

The factorial tail is summable for every real scale and radius. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
J :
ℕ
Summable (fun j : ℕ => if J ≤ j then (ell^2/sigma^2)^j/(j.factorial : ℝ) else 0)
Proof (Lean source)
-- @node: momentTail_summable lemma momentTail_summable (sigma ell : ℝ) (J : ℕ) : Summable (fun j : ℕ => if J ≤ j then (ell^2/sigma^2)^j/(j.factorial : ℝ) else 0) := by apply Summable.of_nonneg_of_le (fun j => by split_ifs <;> positivity) (fun j => by split_ifs <;> first | exact le_rfl | positivity) (Real.summable_pow_div_factorial (ell^2/sigma^2))
CausalSmith.Stat.NoisydoseWeakdesignTransition.momentTail_summable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:217
theorem compact_signed_moment_tail_bound

The unmatched squared-moment sum is bounded by absolute mass squared times the public factorial tail. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
hsigma :
0 < sigma
hell :
0 ≤ ell
J :
ℕ
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
(∑' j : ℕ, if J ≤ j then (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)) else 0)
≤ (∫ t, |v t|)^2 * momentTail sigma ell J
Proof (Lean source)
-- @node: compact_signed_moment_tail_bound lemma compact_signed_moment_tail_bound (sigma ell : ℝ) (hsigma : 0 < sigma) (hell : 0 ≤ ell) (J : ℕ) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) : (∑' j : ℕ, if J ≤ j then (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)) else 0) ≤ (∫ t, |v t|)^2 * momentTail sigma ell J := by have hs : Summable (fun j : ℕ => if J ≤ j then (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)) else 0) := by apply Summable.of_nonneg_of_le (fun j => by split_ifs <;> positivity) (fun j => by split_ifs <;> first | exact le_rfl | positivity) (compact_signed_moment_summable sigma ell hsigma hell v hv hsupp) unfold momentTail rw [← tsum_mul_left] apply Summable.tsum_le_tsum _ hs ((momentTail_summable sigma ell J).mul_left _) intro j split_ifs with hj · exact compact_signed_moment_coefficient_bound sigma ell hsigma hell v hv hsupp j · simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.compact_signed_moment_tail_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:225

Completing the square expresses the Gaussian kernel quotient as a translated Gaussian times an exponential. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma w t s :
ℝ
hsigma :
0 < sigma
phiDensity sigma (w-t) * phiDensity sigma (w-s) / phiDensity sigma w
= exp (t*s/sigma^2) * phiDensity sigma (w-t-s)
Proof (Lean source)
-- @node: phiDensity_product_div lemma phiDensity_product_div (sigma w t s : ℝ) (hsigma : 0 < sigma) : phiDensity sigma (w-t) * phiDensity sigma (w-s) / phiDensity sigma w = exp (t*s/sigma^2) * phiDensity sigma (w-t-s) := by have hd : sqrt (2*pi)*sigma ≠ 0 := ne_of_gt (mul_pos (Real.sqrt_pos.mpr (by positivity)) hsigma) have he : -(w-t)^2/(2*sigma^2) + -(w-s)^2/(2*sigma^2) - (-w^2/(2*sigma^2)) = t*s/sigma^2 + -(w-t-s)^2/(2*sigma^2) := by field_simp <;> ring unfold phiDensity rw [div_mul_div_comm, div_div_div_comm, ← Real.exp_add, ← Real.exp_sub, he, Real.exp_add] field_simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.phiDensity_product_div · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:244
theorem phiDensity_eq_gaussianPDFReal Lemma phiDensity_eq_gaussianPDFReal in the paper ↗

The centered density agrees with Mathlib’s Gaussian density at variance sigma squared. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma w :
ℝ
hsigma :
0 < sigma
phiDensity sigma w = gaussianPDFReal 0 ⟨sigma^2, sq_nonneg sigma⟩ w
Proof (Lean source)
-- @node: phiDensity_eq_gaussianPDFReal lemma phiDensity_eq_gaussianPDFReal (sigma w : ℝ) (hsigma : 0 < sigma) : phiDensity sigma w = gaussianPDFReal 0 ⟨sigma^2, sq_nonneg sigma⟩ w := by unfold phiDensity gaussianPDFReal change exp (-w^2/(2*sigma^2)) / (sqrt (2*pi)*sigma) = (sqrt (2*pi*sigma^2))⁻¹ * exp (-(w-0)^2/(2*sigma^2)) simp only [sub_zero] rw [show 2*pi*sigma^2 = (2*pi)*(sigma^2) by ring, Real.sqrt_mul (by positivity : 0 ≤ 2*pi), Real.sqrt_sq hsigma.le] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.phiDensity_eq_gaussianPDFReal · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:259

The positive-scale centered Gaussian density integrates to one. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma :
ℝ
hsigma :
0 < sigma
(∫ w, phiDensity sigma w) = 1
Proof (Lean source)
-- @node: phiDensity_integral lemma phiDensity_integral (sigma : ℝ) (hsigma : 0 < sigma) : (∫ w, phiDensity sigma w) = 1 := by simp_rw [phiDensity_eq_gaussianPDFReal sigma _ hsigma] exact integral_gaussianPDFReal_eq_one 0 (by intro h have hreal := congrArg (fun z : ℝ≥0 => (z : ℝ)) h change sigma^2 = 0 at hreal exact (ne_of_gt (sq_pos_of_pos hsigma)) hreal)
CausalSmith.Stat.NoisydoseWeakdesignTransition.phiDensity_integral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:271
theorem phiDensity_product_integral Lemma phiDensity_product_integral in the paper ↗

The Gaussian kernel quotient integrates to the exponential interaction kernel. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma t s :
ℝ
hsigma :
0 < sigma
(∫ w, phiDensity sigma (w-t) * phiDensity sigma (w-s) / phiDensity sigma w)
= exp (t*s/sigma^2)
Proof (Lean source)
-- @node: phiDensity_product_integral lemma phiDensity_product_integral (sigma t s : ℝ) (hsigma : 0 < sigma) : (∫ w, phiDensity sigma (w-t) * phiDensity sigma (w-s) / phiDensity sigma w) = exp (t*s/sigma^2) := by simp_rw [phiDensity_product_div sigma _ t s hsigma] rw [integral_const_mul] have hshift : (fun w => phiDensity sigma (w-t-s)) = (fun w => phiDensity sigma (w-(t+s))) := by funext w congr 1 ring rw [hshift, integral_sub_right_eq_self, phiDensity_integral sigma hsigma, mul_one]
CausalSmith.Stat.NoisydoseWeakdesignTransition.phiDensity_product_integral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianConvolution.lean:282
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.GaussianEnergy 7 declarations Absolute Fubini and exponential-series integration for compact signed densities.

Absolute Fubini and exponential-series integration for compact signed densities.

theorem phiDensity_shift_integrable Lemma phiDensity_shift_integrable in the paper ↗

A translated positive-scale Gaussian density is integrable. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma c :
ℝ
hsigma :
0 < sigma
Integrable (fun w => phiDensity sigma (w-c))
Proof (Lean source)
-- @node: phiDensity_shift_integrable @[fun_prop] lemma phiDensity_shift_integrable (sigma c : ℝ) (hsigma : 0 < sigma) : Integrable (fun w => phiDensity sigma (w-c)) := by have hi : Integrable (phiDensity sigma) := by have he : phiDensity sigma = gaussianPDFReal 0 ⟨sigma^2, sq_nonneg sigma⟩ := funext (fun w => phiDensity_eq_gaussianPDFReal sigma w hsigma) rw [he] exact (integrable_gaussianPDFReal 0 ⟨sigma^2, sq_nonneg sigma⟩) exact hi.comp_sub_right c
CausalSmith.Stat.NoisydoseWeakdesignTransition.phiDensity_shift_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianEnergy.lean:12
theorem compact_exponential_bound Lemma compact_exponential_bound in the paper ↗

The interaction exponential is bounded on the support square. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell t s :
ℝ
hsigma :
0 < sigma
ht :
t ∈ Icc (-ell) ell
hs :
s ∈ Icc (-ell) ell
exp (t*s/sigma^2) ≤ exp (ell^2/sigma^2)
Proof (Lean source)
-- @node: compact_exponential_bound lemma compact_exponential_bound (sigma ell t s : ℝ) (hsigma : 0 < sigma) (ht : t ∈ Icc (-ell) ell) (hs : s ∈ Icc (-ell) ell) : exp (t*s/sigma^2) ≤ exp (ell^2/sigma^2) := by apply Real.exp_le_exp.mpr apply div_le_div_of_nonneg_right _ (sq_nonneg sigma) calc t*s ≤ |t*s| := le_abs_self _ _ = |t| * |s| := abs_mul _ _ _ ≤ ell*ell := mul_le_mul (abs_le.mpr ht) (abs_le.mpr hs) (abs_nonneg _) (by linarith [ht.1, ht.2]) _ = ell^2 := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.compact_exponential_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianEnergy.lean:24
theorem compact_exponential_integrable Lemma compact_exponential_integrable in the paper ↗

Absolute mass controls the compact exponential interaction. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
hsigma :
0 < sigma
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
Integrable (fun p : ℝ × ℝ => v p.1*v p.2*exp (p.1*p.2/sigma^2)) (volume.prod volume)
Proof (Lean source)
-- @node: compact_exponential_integrable lemma compact_exponential_integrable (sigma ell : ℝ) (hsigma : 0 < sigma) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) : Integrable (fun p : ℝ × ℝ => v p.1*v p.2*exp (p.1*p.2/sigma^2)) (volume.prod volume) := by have hm : AEStronglyMeasurable (fun p : ℝ × ℝ => v p.1*v p.2*exp (p.1*p.2/sigma^2)) (volume.prod volume) := (hv.mul_prod hv).aestronglyMeasurable.mul (by fun_prop) apply ((hv.norm.mul_prod hv.norm).mul_const (exp (ell^2/sigma^2))).mono' hm filter_upwards with p rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_pos (Real.exp_pos _)] by_cases ht : p.1 ∈ Icc (-ell) ell · by_cases hs : p.2 ∈ Icc (-ell) ell · exact mul_le_mul_of_nonneg_left (compact_exponential_bound sigma ell _ _ hsigma ht hs) (mul_nonneg (abs_nonneg _) (abs_nonneg _)) · simp [hsupp _ hs] · simp [hsupp _ ht]
CausalSmith.Stat.NoisydoseWeakdesignTransition.compact_exponential_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianEnergy.lean:37
theorem gaussian_convolution_energy Lemma gaussian_convolution_energy in the paper ↗

Absolute Fubini converts the squared Gaussian convolution into exponential energy. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
hsigma :
0 < sigma
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
(∫ w, (smoothSigned sigma v w)^2 / phiDensity sigma w)
= ∫ p : ℝ × ℝ, v p.1*v p.2*exp (p.1*p.2/sigma^2) ∂(volume.prod volume)
Proof (Lean source)
-- @node: gaussian_convolution_energy lemma gaussian_convolution_energy (sigma ell : ℝ) (hsigma : 0 < sigma) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) : (∫ w, (smoothSigned sigma v w)^2 / phiDensity sigma w) = ∫ p : ℝ × ℝ, v p.1*v p.2*exp (p.1*p.2/sigma^2) ∂(volume.prod volume) := by let K := fun (p : ℝ × ℝ) (w : ℝ) => v p.1*v p.2*exp (p.1*p.2/sigma^2)*phiDensity sigma (w-(p.1+p.2)) have hKi (p : ℝ × ℝ) : Integrable (K p) := (phiDensity_shift_integrable sigma (p.1+p.2) hsigma).const_mul _ have hg : AEStronglyMeasurable (fun q : (ℝ × ℝ) × ℝ => exp (q.1.1*q.1.2/sigma^2)*phiDensity sigma (q.2-(q.1.1+q.1.2))) ((volume.prod volume).prod volume) := by unfold phiDensity fun_prop have hKm : AEStronglyMeasurable (uncurry K) ((volume.prod volume).prod volume) := by have hh := (hv.mul_prod hv).aestronglyMeasurable.comp_fst.mul hg change AEStronglyMeasurable (fun q : (ℝ × ℝ) × ℝ => (v q.1.1*v q.1.2)*(exp (q.1.1*q.1.2/sigma^2)* phiDensity sigma (q.2-(q.1.1+q.1.2)))) _ at hh simpa only [K, Function.uncurry_def, mul_assoc] using hh have hKn (p : ℝ × ℝ) : (∫ w, ‖K p w‖) = ‖v p.1*v p.2*exp (p.1*p.2/sigma^2)‖ := by simp only [K, norm_mul, Real.norm_eq_abs, abs_of_pos (phiDensity_pos sigma _ hsigma)] rw [integral_const_mul, integral_sub_right_eq_self, phiDensity_integral sigma hsigma, mul_one] have hK : Integrable (uncurry K) ((volume.prod volume).prod volume) := by apply (integrable_prod_iff hKm).mpr refine ⟨ae_of_all _ hKi, ?_⟩ simpa only [uncurry, hKn] using (compact_exponential_integrable sigma ell hsigma v hv hsupp).norm have hpoint (w : ℝ) : (∫ p : ℝ × ℝ, K p w ∂(volume.prod volume)) = (smoothSigned sigma v w)^2 / phiDensity sigma w := by calc _ = ∫ p : ℝ × ℝ, (v p.1*phiDensity sigma (w-p.1))*(v p.2*phiDensity sigma (w-p.2)) / phiDensity sigma w ∂(volume.prod volume) := by apply integral_congr_ae filter_upwards with p dsimp [K] rw [mul_assoc (v p.1*v p.2), show w-(p.1+p.2) = w-p.1-p.2 by ring, ← phiDensity_product_div sigma w p.1 p.2 hsigma] ring _ = _ := by rw [integral_div, integral_prod_mul (fun t => v t*phiDensity sigma (w-t)) (fun t => v t*phiDensity sigma (w-t))] simp only [smoothSigned, pow_two] calc _ = ∫ w, ∫ p : ℝ × ℝ, K p w ∂(volume.prod volume) := by simp_rw [hpoint] _ = ∫ p : ℝ × ℝ, (∫ w : ℝ, K p w) ∂(volume.prod volume) := (integral_integral_swap hK).symm _ = _ := by simp only [K, integral_const_mul, integral_sub_right_eq_self, phiDensity_integral sigma hsigma, mul_one]
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_convolution_energy · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianEnergy.lean:57
theorem compact_exponential_energy_series Lemma compact_exponential_energy_series in the paper ↗

Compact signed moments justify termwise integration of the exponential interaction. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
hsigma :
0 < sigma
hell :
0 ≤ ell
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
(∫ p : ℝ × ℝ, v p.1*v p.2*exp (p.1*p.2/sigma^2) ∂(volume.prod volume))
= ∑' j : ℕ, (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ))
Proof (Lean source)
-- @node: compact_exponential_energy_series lemma compact_exponential_energy_series (sigma ell : ℝ) (hsigma : 0 < sigma) (hell : 0 ≤ ell) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) : (∫ p : ℝ × ℝ, v p.1*v p.2*exp (p.1*p.2/sigma^2) ∂(volume.prod volume)) = ∑' j : ℕ, (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)) := by let F := fun (j : ℕ) (p : ℝ × ℝ) => (p.1^j*v p.1)*(p.2^j*v p.2)/(sigma^(2*j)*(j.factorial : ℝ)) have hFi (j : ℕ) : Integrable (F j) (volume.prod volume) := ((compact_signed_moment_integrable ell hell v hv hsupp j).mul_prod (compact_signed_moment_integrable ell hell v hv hsupp j)).div_const _ have hFbound (j : ℕ) : (∫ p : ℝ × ℝ, ‖F j p‖ ∂(volume.prod volume)) ≤ (∫ t, |v t|)^2*((ell^2/sigma^2)^j/(j.factorial : ℝ)) := by have hp (p : ℝ × ℝ) : ‖F j p‖ ≤ (ell^2/sigma^2)^j/(j.factorial : ℝ)*(|v p.1| * |v p.2|) := by dsimp [F] rw [abs_div, abs_mul, abs_mul, abs_mul, abs_pow, abs_pow, abs_of_pos (by positivity : 0 < sigma^(2*j)*(j.factorial : ℝ))] by_cases ht : p.1 ∈ Icc (-ell) ell · by_cases hs : p.2 ∈ Icc (-ell) ell · calc _ ≤ (ell^j*|v p.1|)*(ell^j*|v p.2|)/(sigma^(2*j)*(j.factorial : ℝ)) := by gcongr · exact abs_le.mpr ht · exact abs_le.mpr hs _ = _ := by rw [div_pow]; ring · simp [hsupp _ hs] · simp [hsupp _ ht] calc _ ≤ ∫ p : ℝ × ℝ, (ell^2/sigma^2)^j/(j.factorial : ℝ)*(|v p.1| * |v p.2|) ∂(volume.prod volume) := integral_mono_ae (hFi j).norm ((hv.norm.mul_prod hv.norm).const_mul _) (ae_of_all _ hp) _ = _ := by rw [integral_const_mul, integral_prod_mul (fun t => |v t|) (fun t => |v t|)] ring have hFs : Summable (fun j : ℕ => ∫ p : ℝ × ℝ, ‖F j p‖ ∂(volume.prod volume)) := Summable.of_nonneg_of_le (fun j => integral_nonneg (fun _ => norm_nonneg _)) hFbound ((Real.summable_pow_div_factorial (ell^2/sigma^2)).mul_left ((∫ t, |v t|)^2)) have hFsum (p : ℝ × ℝ) : (∑' j : ℕ, F j p) = v p.1*v p.2*exp (p.1*p.2/sigma^2) := by have he : (∑' j : ℕ, (p.1*p.2/sigma^2)^j/(j.factorial : ℝ)) = exp (p.1*p.2/sigma^2) := by rw [Real.exp_eq_exp_ℝ] exact (NormedSpace.expSeries_div_hasSum_exp _).tsum_eq calc _ = ∑' j : ℕ, (p.1*p.2/sigma^2)^j/(j.factorial : ℝ)*(v p.1*v p.2) := by apply tsum_congr intro j dsimp [F] rw [div_pow, mul_pow, pow_mul] ring _ = _ := by rw [tsum_mul_right, he]; ring have hFint (j : ℕ) : (∫ p : ℝ × ℝ, F j p ∂(volume.prod volume)) = (∫ t, t^j*v t)^2/(sigma^(2*j)*(j.factorial : ℝ)) := by dsimp [F] rw [integral_div, integral_prod_mul (fun t => t^j*v t) (fun t => t^j*v t), pow_two] calc _ = ∫ p : ℝ × ℝ, ∑' j : ℕ, F j p ∂(volume.prod volume) := by simp_rw [hFsum] _ = ∑' j : ℕ, ∫ p : ℝ × ℝ, F j p ∂(volume.prod volume) := (integral_tsum_of_summable_integral_norm hFi hFs).symm _ = _ := by simp_rw [hFint]
CausalSmith.Stat.NoisydoseWeakdesignTransition.compact_exponential_energy_series · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianEnergy.lean:112
theorem gaussian_compact_energy_tail_identity Lemma gaussian_compact_energy_tail_identity in the paper ↗

Vanishing low-order moments remove exactly the initial terms of the Gaussian energy series. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
hsigma :
0 < sigma
hell :
0 ≤ ell
J :
ℕ
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
hmom :
∀ j < J, ∫ t, t^j*v t = 0
(∫ w, (smoothSigned sigma v w)^2 / phiDensity sigma w)
= (∑' j : ℕ, if J ≤ j then (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)) else 0)
Proof (Lean source)
-- @node: gaussian_compact_energy_tail_identity lemma gaussian_compact_energy_tail_identity (sigma ell : ℝ) (hsigma : 0 < sigma) (hell : 0 ≤ ell) (J : ℕ) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) (hmom : ∀ j < J, ∫ t, t^j*v t = 0) : (∫ w, (smoothSigned sigma v w)^2 / phiDensity sigma w) = (∑' j : ℕ, if J ≤ j then (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)) else 0) := by rw [gaussian_convolution_energy sigma ell hsigma v hv hsupp, compact_exponential_energy_series sigma ell hsigma hell v hv hsupp] apply tsum_congr intro j by_cases hj : J ≤ j · rw [if_pos hj] · rw [if_neg hj, hmom j (lt_of_not_ge hj)] simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_compact_energy_tail_identity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianEnergy.lean:176
theorem gaussian_convolution_energy_integrable Lemma gaussian_convolution_energy_integrable in the paper ↗

Absolute Fubini also supplies integrability of the Gaussian-weighted energy. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
hsigma :
0 < sigma
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
Integrable (fun w => (smoothSigned sigma v w)^2 / phiDensity sigma w)
Proof (Lean source)
-- @node: gaussian_convolution_energy_integrable @[fun_prop] lemma gaussian_convolution_energy_integrable (sigma ell : ℝ) (hsigma : 0 < sigma) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) : Integrable (fun w => (smoothSigned sigma v w)^2 / phiDensity sigma w) := by let K := fun (p : ℝ × ℝ) (w : ℝ) => v p.1*v p.2*exp (p.1*p.2/sigma^2)*phiDensity sigma (w-(p.1+p.2)) have hKi (p : ℝ × ℝ) : Integrable (K p) := (phiDensity_shift_integrable sigma (p.1+p.2) hsigma).const_mul _ have hg : AEStronglyMeasurable (fun q : (ℝ × ℝ) × ℝ => exp (q.1.1*q.1.2/sigma^2)*phiDensity sigma (q.2-(q.1.1+q.1.2))) ((volume.prod volume).prod volume) := by unfold phiDensity fun_prop have hKm : AEStronglyMeasurable (uncurry K) ((volume.prod volume).prod volume) := by have hh := (hv.mul_prod hv).aestronglyMeasurable.comp_fst.mul hg change AEStronglyMeasurable (fun q : (ℝ × ℝ) × ℝ => (v q.1.1*v q.1.2)*(exp (q.1.1*q.1.2/sigma^2)* phiDensity sigma (q.2-(q.1.1+q.1.2)))) _ at hh simpa only [K, Function.uncurry_def, mul_assoc] using hh have hKn (p : ℝ × ℝ) : (∫ w, ‖K p w‖) = ‖v p.1*v p.2*exp (p.1*p.2/sigma^2)‖ := by simp only [K, norm_mul, Real.norm_eq_abs, abs_of_pos (phiDensity_pos sigma _ hsigma)] rw [integral_const_mul, integral_sub_right_eq_self, phiDensity_integral sigma hsigma, mul_one] have hK : Integrable (uncurry K) ((volume.prod volume).prod volume) := by apply (integrable_prod_iff hKm).mpr refine ⟨ae_of_all _ hKi, ?_⟩ simpa only [uncurry, hKn] using (compact_exponential_integrable sigma ell hsigma v hv hsupp).norm have hpoint (w : ℝ) : (∫ p : ℝ × ℝ, K p w ∂(volume.prod volume)) = (smoothSigned sigma v w)^2 / phiDensity sigma w := by calc _ = ∫ p : ℝ × ℝ, (v p.1*phiDensity sigma (w-p.1))*(v p.2*phiDensity sigma (w-p.2)) / phiDensity sigma w ∂(volume.prod volume) := by apply integral_congr_ae filter_upwards with p dsimp [K] rw [mul_assoc (v p.1*v p.2), show w-(p.1+p.2) = w-p.1-p.2 by ring, ← phiDensity_product_div sigma w p.1 p.2 hsigma] ring _ = _ := by rw [integral_div, integral_prod_mul (fun t => v t*phiDensity sigma (w-t)) (fun t => v t*phiDensity sigma (w-t))] simp only [smoothSigned, pow_two] exact hK.integral_prod_right.congr (ae_of_all _ hpoint)
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_convolution_energy_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianEnergy.lean:194
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.GaussianInjective 1 declarations Helpers — GaussianInjective

Helpers — GaussianInjective

theorem compact_gaussian_convolution_injective Lemma 2 in the paper ↗

Gaussian convolution is injective on compactly supported signed measures represented by Jordan pairs. This is the stated conclusion. Under the stated conditions.

Formal statement
sigma :
ℝ
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hmu1 :
mu1 (Icc (-1/2 : ℝ) (1/2))ᶜ = 0
hmu2 :
mu2 (Icc (-1/2 : ℝ) (1/2))ᶜ = 0
hnu1 :
nu1 (Icc (-1/2 : ℝ) (1/2))ᶜ = 0
hnu2 :
nu2 (Icc (-1/2 : ℝ) (1/2))ᶜ = 0
hconv :
mu1.conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma)))
+ nu2.conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma)))
= nu1.conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma)))
+ mu2.conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma)))
mu1 + nu2 = nu1 + mu2
Proof (Lean source)
-- @node: lem:compact-gaussian-convolution-injective lemma compact_gaussian_convolution_injective (sigma : ℝ) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (mu1 mu2 nu1 nu2 : Measure ℝ) [IsFiniteMeasure mu1] [IsFiniteMeasure mu2] [IsFiniteMeasure nu1] [IsFiniteMeasure nu2] (hmu1 : mu1 (Icc (-1/2 : ℝ) (1/2))ᶜ = 0) (hmu2 : mu2 (Icc (-1/2 : ℝ) (1/2))ᶜ = 0) (hnu1 : nu1 (Icc (-1/2 : ℝ) (1/2))ᶜ = 0) (hnu2 : nu2 (Icc (-1/2 : ℝ) (1/2))ᶜ = 0) (hconv : mu1.conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma))) + nu2.conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma))) = nu1.conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma))) + mu2.conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma)))) : mu1 + nu2 = nu1 + mu2 := by -- Combine the Jordan parts before taking characteristic functions. have hsum : (mu1 + nu2).conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma))) = (nu1 + mu2).conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma))) := by simpa only [Measure.add_conv] using hconv apply Measure.ext_of_charFun funext t have hfourier := congrArg (fun μ : Measure ℝ => charFun μ t) hsum rw [charFun_conv, charFun_conv] at hfourier -- The exponential never vanishes, including at zero variance. have hgaussian : charFun (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma))) t ≠ 0 := by rw [charFun_gaussianReal] exact Complex.exp_ne_zero _ exact mul_right_cancel₀ hgaussian hfourier
CausalSmith.Stat.NoisydoseWeakdesignTransition.compact_gaussian_convolution_injective · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianInjective.lean:19
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.GaussianMomentSeries 17 declarations Helpers — GaussianMomentSeries

Helpers — GaussianMomentSeries

theorem doseVolume_threshold_map Lemma doseVolume_threshold_map in the paper ↗

Uniform rank thresholding gives the two-point outcome law. This is the stated conclusion.

Formal statement
p :
doseVolume.map (fun u : Dose => if (u : ℝ) ≤ (p : ℝ) then (1 : ℝ) else 0)
= ofReal (p : ℝ) • Measure.dirac 1 + ofReal (1-(p : ℝ)) • Measure.dirac 0
Proof (Lean source)
-- @node: doseVolume_threshold_map lemma doseVolume_threshold_map (p : Dose) : doseVolume.map (fun u : Dose => if (u : ℝ) ≤ (p : ℝ) then (1 : ℝ) else 0) = ofReal (p : ℝ) • Measure.dirac 1 + ofReal (1-(p : ℝ)) • Measure.dirac 0 := by have hm : Measurable (fun u : Dose => if (u : ℝ) ≤ (p : ℝ) then (1 : ℝ) else 0) := by exact Measurable.ite (measurableSet_le (by fun_prop) measurable_const) measurable_const measurable_const have hlow : doseVolume {u : Dose | (u : ℝ) ≤ (p : ℝ)} = ofReal (p : ℝ) := by rw [doseVolume, comap_subtype_coe_apply measurableSet_Icc] have heq : val '' {u : Dose | (u : ℝ) ≤ (p : ℝ)} = Icc 0 (p : ℝ) := by ext t constructor · rintro ⟨u, hu, rfl⟩; exact ⟨u.property.1, hu⟩ · intro ht; exact ⟨⟨t, ⟨ht.1, ht.2.trans p.property.2⟩⟩, ht.2, rfl⟩ rw [heq, Real.volume_Icc, sub_zero] have hhigh : doseVolume {u : Dose | ¬ (u : ℝ) ≤ (p : ℝ)} = ofReal (1-(p : ℝ)) := by rw [doseVolume, comap_subtype_coe_apply measurableSet_Icc] have heq : val '' {u : Dose | ¬ (u : ℝ) ≤ (p : ℝ)} = Ioc (p : ℝ) 1 := by ext t constructor · rintro ⟨u, hu, rfl⟩; exact ⟨lt_of_not_ge hu, u.property.2⟩ · intro ht; exact ⟨⟨t, ⟨p.property.1.trans ht.1.le, ht.2⟩⟩, not_le_of_gt ht.1, rfl⟩ rw [heq, Real.volume_Ioc] ext B hB rw [Measure.map_apply hm hB, Measure.add_apply, Measure.smul_apply, Measure.smul_apply] by_cases h1 : (1 : ℝ) ∈ B <;> by_cases h0 : (0 : ℝ) ∈ B · have heq : (fun u : Dose => if (u : ℝ) ≤ (p : ℝ) then (1 : ℝ) else 0) ⁻¹' B = univ := by ext u; simp only [mem_preimage, mem_univ, iff_true]; split <;> assumption rw [heq] letI := doseVolume_probability simp only [measure_univ, Measure.dirac_apply_of_mem h1, Measure.dirac_apply_of_mem h0, smul_eq_mul, mul_one] rw [← ENNReal.ofReal_add p.property.1 (sub_nonneg.mpr p.property.2)] simp · have heq : (fun u : Dose => if (u : ℝ) ≤ (p : ℝ) then (1 : ℝ) else 0) ⁻¹' B = {u : Dose | (u : ℝ) ≤ (p : ℝ)} := by ext u; simp only [mem_preimage, mem_setOf_eq]; split_ifs <;> simp_all rw [heq, hlow] simp [Measure.dirac_apply' _ hB, h1, h0] · have heq : (fun u : Dose => if (u : ℝ) ≤ (p : ℝ) then (1 : ℝ) else 0) ⁻¹' B = {u : Dose | ¬ (u : ℝ) ≤ (p : ℝ)} := by ext u; simp only [mem_preimage, mem_setOf_eq]; split_ifs <;> simp_all rw [heq, hhigh] simp [Measure.dirac_apply' _ hB, h1, h0] · have heq : (fun u : Dose => if (u : ℝ) ≤ (p : ℝ) then (1 : ℝ) else 0) ⁻¹' B = ∅ := by ext u; simp only [mem_preimage, mem_empty_iff_false, iff_false]; split <;> assumption rw [heq] simp [Measure.dirac_apply' _ hB, h1, h0]
CausalSmith.Stat.NoisydoseWeakdesignTransition.doseVolume_threshold_map · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:19
theorem obsLaw_witness_lintegral

Integrating out the independent rank exposes the two observed Bernoulli marks. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
f :
Obs → ℝ≥0∞
hf :
(∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa mu))
= ∫⁻ x, ∫⁻ a, ∫⁻ z, ofReal (mu a : ℝ) * f (x, (a : ℝ)+sigma*z, 1)
+ ofReal (1-(mu a : ℝ)) * f (x, (a : ℝ)+sigma*z, 0) ∂gaussianReal 0 1 ∂(doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))) ∂((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true)
Proof (Lean source)
-- @node: obsLaw_witness_lintegral lemma obsLaw_witness_lintegral (E : PathSpace S) (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) (f : Obs → ℝ≥0∞) (hf : Measurable f) : (∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa mu)) = ∫⁻ x, ∫⁻ a, ∫⁻ z, ofReal (mu a : ℝ) * f (x, (a : ℝ)+sigma*z, 1) + ofReal (1-(mu a : ℝ)) * f (x, (a : ℝ)+sigma*z, 0) ∂gaussianReal 0 1 ∂(doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))) ∂((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true) := by letI := doseVolume_probability letI := witnessDose_probability kappa hkappa have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop rw [obsLaw, lintegral_map hf hm, lowerWitnessLaw, lintegral_map (show Measurable (fun w => f (obsMap sigma w)) from hf.comp hm) (lowerWitness_seedMap_measurable E mu)] simp only [Function.comp_def, obsMap, contaminatedDose, sX, sA, sY, E.eval_embed] have hout : Measurable (fun p : Bool × Dose × ℝ × Dose => if (p.2.2.2 : ℝ) ≤ (mu p.2.1 : ℝ) then (1 : ℝ) else 0) := by exact Measurable.ite (measurableSet_le (by fun_prop) (by fun_prop)) measurable_const measurable_const have hfull : Measurable (fun p : Bool × Dose × ℝ × Dose => f (p.1, (p.2.1 : ℝ)+sigma*p.2.2.1, if (p.2.2.2 : ℝ) ≤ (mu p.2.1 : ℝ) then (1 : ℝ) else 0)) := by fun_prop unfold lowerSeedLaw rw [lintegral_prod _ hfull.aemeasurable] congr 1; funext x have hxa := hfull.comp (show Measurable (fun p : Dose × ℝ × Dose => (x, p)) by fun_prop) dsimp only [Function.comp_def] at hxa ⊢ rw [lintegral_prod _ hxa.aemeasurable] congr 1; funext a have hxaz := hxa.comp (show Measurable (fun p : ℝ × Dose => (a, p)) by fun_prop) dsimp only [Function.comp_def] at hxaz ⊢ rw [lintegral_prod _ hxaz.aemeasurable] congr 1; funext z have hmark : Measurable (fun y : ℝ => f (x, (a : ℝ)+sigma*z, y)) := by fun_prop have hthresh : Measurable (fun u : Dose => if (u : ℝ) ≤ (mu a : ℝ) then (1 : ℝ) else 0) := by exact Measurable.ite (measurableSet_le (by fun_prop) measurable_const) measurable_const measurable_const rw [← lintegral_map hmark hthresh, doseVolume_threshold_map, lintegral_add_measure, lintegral_smul_measure, lintegral_smul_measure] simp [lintegral_dirac, hmark, smul_eq_mul]
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_witness_lintegral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:70
theorem gaussian_affine_map_density Lemma gaussian_affine_map_density in the paper ↗

Scaling and translating the standard normal gives the Gaussian kernel used in the observed density. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma a :
ℝ
hsigma :
0 < sigma
(gaussianReal 0 1).map (fun z => a+sigma*z)
= volume.withDensity (fun w => ofReal (phiDensity sigma (w-a)))
Proof (Lean source)
-- @node: gaussian_affine_map_density lemma gaussian_affine_map_density (sigma a : ℝ) (hsigma : 0 < sigma) : (gaussianReal 0 1).map (fun z => a+sigma*z) = volume.withDensity (fun w => ofReal (phiDensity sigma (w-a))) := by have hvar : (NNReal.mk (sigma^2) (sq_nonneg sigma)) ≠ 0 := by intro h have hz := congrArg (fun r : ℝ≥0 => (r : ℝ)) h exact (ne_of_gt (sq_pos_of_pos hsigma)) hz rw [show (fun z => a+sigma*z) = (fun z => a+z) ∘ (fun z => sigma*z) by rfl, ← Measure.map_map (by fun_prop) (by fun_prop), gaussianReal_map_const_mul, gaussianReal_map_const_add] simp only [mul_zero, mul_one, add_zero] rw [gaussianReal_of_var_ne_zero _ hvar] congr 1 funext w rw [phiDensity_eq_gaussianPDFReal sigma (w-a) hsigma] simp [gaussianPDF, gaussianPDFReal] rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_affine_map_density · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:117
theorem gaussian_affine_lintegral Lemma gaussian_affine_lintegral in the paper ↗

The Gaussian channel integrates any measurable nonnegative test against its translated density. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma a :
ℝ
hsigma :
0 < sigma
f :
ℝ → ℝ≥0∞
hf :
(∫⁻ z, f (a+sigma*z) ∂gaussianReal 0 1)
= ∫⁻ w, ofReal (phiDensity sigma (w-a))*f w
Proof (Lean source)
-- @node: gaussian_affine_lintegral lemma gaussian_affine_lintegral (sigma a : ℝ) (hsigma : 0 < sigma) (f : ℝ → ℝ≥0∞) (hf : Measurable f) : (∫⁻ z, f (a+sigma*z) ∂gaussianReal 0 1) = ∫⁻ w, ofReal (phiDensity sigma (w-a))*f w := by rw [← lintegral_map hf (by fun_prop), gaussian_affine_map_density sigma a hsigma] apply lintegral_withDensity_eq_lintegral_mul · unfold phiDensity; fun_prop · exact hf
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_affine_lintegral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:137
theorem obsLaw_witness_kernel_lintegral

Conditioning on dose and integrating out Gaussian noise gives the two nonnegative mark kernels. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 < sigma
f :
Obs → ℝ≥0∞
hf :
(∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa mu))
= ∫⁻ x, ∫⁻ a, ∫⁻ w, ofReal (phiDensity sigma (w-(a : ℝ))) * (ofReal (mu a : ℝ)*f (x,w,1) + ofReal (1-(mu a : ℝ))*f (x,w,0)) ∂volume ∂(doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))) ∂((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true)
Proof (Lean source)
-- @node: obsLaw_witness_kernel_lintegral lemma obsLaw_witness_kernel_lintegral (E : PathSpace S) (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 < sigma) (mu : ThresholdProfile) (f : Obs → ℝ≥0∞) (hf : Measurable f) : (∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa mu)) = ∫⁻ x, ∫⁻ a, ∫⁻ w, ofReal (phiDensity sigma (w-(a : ℝ))) * (ofReal (mu a : ℝ)*f (x,w,1) + ofReal (1-(mu a : ℝ))*f (x,w,0)) ∂volume ∂(doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))) ∂((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true) := by rw [obsLaw_witness_lintegral E kappa sigma hkappa mu f hf] congr 1; funext x congr 1; funext a exact gaussian_affine_lintegral sigma (a : ℝ) hsigma (fun w => ofReal (mu a : ℝ)*f (x,w,1) + ofReal (1-(mu a : ℝ))*f (x,w,0)) (by fun_prop)
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_witness_kernel_lintegral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:148
theorem witnessDose_centered_lintegral

Centering the latent dose replaces the compact subtype measure by its power density on the real line. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
f :
ℝ → ℝ≥0∞
hf :
(∫⁻ a : Dose, f ((a : ℝ)-a0) ∂doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0))))
= ∫⁻ t, ofReal (witnessDesignDensity kappa t)*f t
Proof (Lean source)
-- @node: witnessDose_centered_lintegral lemma witnessDose_centered_lintegral (kappa : ℝ) (hkappa : 0 ≤ kappa) (f : ℝ → ℝ≥0∞) (hf : Measurable f) : (∫⁻ a : Dose, f ((a : ℝ)-a0) ∂doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))) = ∫⁻ t, ofReal (witnessDesignDensity kappa t)*f t := by rw [← lintegral_map hf (by fun_prop), witnessDose_map_centered kappa hkappa, lintegral_withDensity_eq_lintegral_mul _ (show Measurable (fun t => ofReal (witnessDesignDensity kappa t)) by fun_prop) hf, ← lintegral_indicator measurableSet_Icc] apply lintegral_congr intro t by_cases ht : t ∈ Icc (-1/2 : ℝ) (1/2) · rw [indicator_of_mem ht]; rfl · rw [indicator_of_notMem ht] simp only [witnessDesignDensity, if_neg ht, ENNReal.ofReal_zero, zero_mul]
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDose_centered_lintegral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:168
theorem marked_kernel_integrable

Each marked convolution integrand is integrable, so its real and nonnegative integrals agree. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma w :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 < sigma
Integrable (fun t => witnessDesignDensity kappa t * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ) * phiDensity sigma (w-t))
Proof (Lean source)
-- @node: marked_kernel_integrable @[fun_prop] lemma marked_kernel_integrable (kappa sigma w : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 < sigma) (mu : ThresholdProfile) : Integrable (fun t => witnessDesignDensity kappa t * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ) * phiDensity sigma (w-t)) := by have hc : Continuous (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ) * phiDensity sigma (w-t)) := by unfold phiDensity fun_prop have he : (fun t => witnessDesignDensity kappa t * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ) * phiDensity sigma (w-t)) = (Icc (-1/2 : ℝ) (1/2)).indicator (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ) * phiDensity sigma (w-t)) := by funext t simp only [witnessDesignDensity, indicator_apply] split_ifs <;> simp rw [he] exact hc.integrableOn_Icc.integrable_indicator measurableSet_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.marked_kernel_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:186
theorem marked_success_density_eq

The success-mark density is the half-reference density plus the smoothed centered profile. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma w :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 < sigma
smoothSigned sigma (fun t => witnessDesignDensity kappa t * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)) w
= smoothSigned sigma (witnessDesignDensity kappa) w / 2
+ smoothSigned sigma (fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) w
Proof (Lean source)
-- @node: marked_success_density_eq lemma marked_success_density_eq (kappa sigma w : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 < sigma) (mu : ThresholdProfile) : smoothSigned sigma (fun t => witnessDesignDensity kappa t * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)) w = smoothSigned sigma (witnessDesignDensity kappa) w / 2 + smoothSigned sigma (fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) w := by have hbase := gaussian_design_integrable kappa sigma w hkappa hsigma have hsuccess := marked_kernel_integrable kappa sigma w hkappa hsigma mu have hsplit : (fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2) * phiDensity sigma (w-t)) = (fun t => witnessDesignDensity kappa t * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ) * phiDensity sigma (w-t) - (witnessDesignDensity kappa t * phiDensity sigma (w-t))/2) := by funext t; ring unfold smoothSigned rw [hsplit] rw [integral_sub hsuccess (hbase.div_const 2), integral_div] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.marked_success_density_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:206
theorem marked_failure_density_eq

The failure-mark density is the half-reference density minus the same smoothed centered profile. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma w :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 < sigma
smoothSigned sigma (fun t => witnessDesignDensity kappa t * (1-(mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ))) w
= smoothSigned sigma (witnessDesignDensity kappa) w / 2
- smoothSigned sigma (fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) w
Proof (Lean source)
-- @node: marked_failure_density_eq lemma marked_failure_density_eq (kappa sigma w : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 < sigma) (mu : ThresholdProfile) : smoothSigned sigma (fun t => witnessDesignDensity kappa t * (1-(mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ))) w = smoothSigned sigma (witnessDesignDensity kappa) w / 2 - smoothSigned sigma (fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) w := by have hbase := gaussian_design_integrable kappa sigma w hkappa hsigma have hsuccess := marked_kernel_integrable kappa sigma w hkappa hsigma mu have hsplit : (fun t => witnessDesignDensity kappa t * (1-(mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)) * phiDensity sigma (w-t)) = (fun t => witnessDesignDensity kappa t * phiDensity sigma (w-t) - witnessDesignDensity kappa t * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ) * phiDensity sigma (w-t)) := by funext t; ring change (∫ t, witnessDesignDensity kappa t * (1-(mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)) * phiDensity sigma (w-t)) = _ rw [hsplit] rw [integral_sub hbase hsuccess] change smoothSigned sigma (witnessDesignDensity kappa) w - smoothSigned sigma (fun t => witnessDesignDensity kappa t * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)) w = _ rw [marked_success_density_eq kappa sigma w hkappa hsigma mu] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.marked_failure_density_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:228
theorem witness_mark_kernel_lintegral

A nonnegative dose mark integrates to its centered Gaussian convolution density. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma w :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 < sigma
q :
Dose → ℝ
hq :
hnonneg :
∀ a, 0 ≤ q a
hint :
Integrable (fun t => witnessDesignDensity kappa t * q (projIcc 0 1 zero_le_one (t+a0)) * phiDensity sigma ((w-a0)-t))
(∫⁻ a : Dose, ofReal (q a)*ofReal (phiDensity sigma (w-(a : ℝ))) ∂doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0))))
= ofReal (smoothSigned sigma (fun t => witnessDesignDensity kappa t * q (projIcc 0 1 zero_le_one (t+a0))) (w-a0))
Proof (Lean source)
-- @node: witness_mark_kernel_lintegral lemma witness_mark_kernel_lintegral (kappa sigma w : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 < sigma) (q : Dose → ℝ) (hq : Measurable q) (hnonneg : ∀ a, 0 ≤ q a) (hint : Integrable (fun t => witnessDesignDensity kappa t * q (projIcc 0 1 zero_le_one (t+a0)) * phiDensity sigma ((w-a0)-t))) : (∫⁻ a : Dose, ofReal (q a)*ofReal (phiDensity sigma (w-(a : ℝ))) ∂doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))) = ofReal (smoothSigned sigma (fun t => witnessDesignDensity kappa t * q (projIcc 0 1 zero_le_one (t+a0))) (w-a0)) := by have he : (fun a : Dose => ofReal (q a)* ofReal (phiDensity sigma (w-(a : ℝ)))) = (fun a : Dose => ofReal (q (projIcc 0 1 zero_le_one ((a : ℝ)-a0+a0)))* ofReal (phiDensity sigma ((w-a0)-((a : ℝ)-a0)))) := by funext a rw [sub_add_cancel, Set.projIcc_of_mem zero_le_one a.property] congr 2 ring rw [he, witnessDose_centered_lintegral kappa hkappa (fun t => ofReal (q (projIcc 0 1 zero_le_one (t+a0)))* ofReal (phiDensity sigma ((w-a0)-t))) (by unfold phiDensity; fun_prop)] change _ = ofReal (∫ t, witnessDesignDensity kappa t * q (projIcc 0 1 zero_le_one (t+a0)) * phiDensity sigma ((w-a0)-t)) rw [ofReal_integral_eq_lintegral_ofReal hint (ae_of_all _ (fun t => mul_nonneg (mul_nonneg (witnessDesignDensity_nonneg kappa t hkappa) (hnonneg _)) (phiDensity_pos sigma _ hsigma).le))] apply lintegral_congr intro t rw [ENNReal.ofReal_mul (mul_nonneg (witnessDesignDensity_nonneg kappa t hkappa) (hnonneg _)), ENNReal.ofReal_mul (witnessDesignDensity_nonneg kappa t hkappa), mul_assoc]
CausalSmith.Stat.NoisydoseWeakdesignTransition.witness_mark_kernel_lintegral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:255
theorem obsLaw_witness_density_lintegral

The two observed marks have exactly the Gaussian convolutions of their latent success and failure densities. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 < sigma
f :
Obs → ℝ≥0∞
hf :
(∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa mu))
= ∫⁻ x, ∫⁻ w, ofReal (smoothSigned sigma (fun t => witnessDesignDensity kappa t * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)) (w-a0)) * f (x,w,1)
+ ofReal (smoothSigned sigma (fun t => witnessDesignDensity kappa t * (1-(mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ))) (w-a0)) * f (x,w,0) ∂volume ∂((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true)
Proof (Lean source)
-- @node: obsLaw_witness_density_lintegral lemma obsLaw_witness_density_lintegral (E : PathSpace S) (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 < sigma) (mu : ThresholdProfile) (f : Obs → ℝ≥0∞) (hf : Measurable f) : (∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa mu)) = ∫⁻ x, ∫⁻ w, ofReal (smoothSigned sigma (fun t => witnessDesignDensity kappa t * (mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)) (w-a0)) * f (x,w,1) + ofReal (smoothSigned sigma (fun t => witnessDesignDensity kappa t * (1-(mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ))) (w-a0)) * f (x,w,0) ∂volume ∂((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true) := by letI := witnessDose_probability kappa hkappa rw [obsLaw_witness_kernel_lintegral E kappa sigma hkappa hsigma mu f hf] congr 1; funext x rw [lintegral_lintegral_swap (by unfold phiDensity; fun_prop)] apply lintegral_congr intro w have hp := marked_kernel_integrable kappa sigma (w-a0) hkappa hsigma mu have hn : Integrable (fun t => witnessDesignDensity kappa t * (1-(mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)) * phiDensity sigma ((w-a0)-t)) := by convert (gaussian_design_integrable kappa sigma (w-a0) hkappa hsigma).sub hp using 1 funext t; dsimp only [Pi.sub_apply]; ring simp_rw [mul_add, ← mul_assoc, mul_comm (ofReal (phiDensity sigma (w-_)))] rw [lintegral_add_left (by unfold phiDensity; fun_prop), lintegral_mul_const _ (by unfold phiDensity; fun_prop), lintegral_mul_const _ (by unfold phiDensity; fun_prop), witness_mark_kernel_lintegral kappa sigma w hkappa hsigma (fun a => (mu a : ℝ)) (by fun_prop) (fun a => (mu a).property.1) hp, witness_mark_kernel_lintegral kappa sigma w hkappa hsigma (fun a => 1-(mu a : ℝ)) (by fun_prop) (fun a => sub_nonneg.mpr (mu a).property.2) hn]
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_witness_density_lintegral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:288
theorem obsLaw_witness_signed_density_lintegral

Equation (11): the observed law has the half-reference density plus or minus the centered signed convolution. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 < sigma
f :
Obs → ℝ≥0∞
hf :
pV :
v :
fun t
=> witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)
(∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa mu))
= ∫⁻ x, ∫⁻ w, ofReal (pV (w-a0)/2 + smoothSigned sigma v (w-a0)) * f (x,w,1)
+ ofReal (pV (w-a0)/2 - smoothSigned sigma v (w-a0)) * f (x,w,0) ∂volume ∂((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true)
Proof (Lean source)
-- @node: obsLaw_witness_signed_density_lintegral lemma obsLaw_witness_signed_density_lintegral (E : PathSpace S) (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 < sigma) (mu : ThresholdProfile) (f : Obs → ℝ≥0∞) (hf : Measurable f) : let pV := smoothSigned sigma (witnessDesignDensity kappa) let v := fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2) (∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa mu)) = ∫⁻ x, ∫⁻ w, ofReal (pV (w-a0)/2 + smoothSigned sigma v (w-a0)) * f (x,w,1) + ofReal (pV (w-a0)/2 - smoothSigned sigma v (w-a0)) * f (x,w,0) ∂volume ∂((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true) := by dsimp only rw [obsLaw_witness_density_lintegral E kappa sigma hkappa hsigma mu f hf] simp_rw [marked_success_density_eq kappa sigma _ hkappa hsigma mu, marked_failure_density_eq kappa sigma _ hkappa hsigma mu]
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_witness_signed_density_lintegral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:322
theorem obsLaw_witness_le_two

Each observed alternative is dominated by twice the half-success reference law. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
obsLaw sigma (lowerWitnessLaw E kappa mu)
≤ (2 : ℝ≥0∞) • obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)
Proof (Lean source)
-- @node: obsLaw_witness_le_two lemma obsLaw_witness_le_two (E : PathSpace S) (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : obsLaw sigma (lowerWitnessLaw E kappa mu) ≤ (2 : ℝ≥0∞) • obsLaw sigma (lowerWitnessLaw E kappa referenceProfile) := by apply Measure.le_iff.mpr intro B hB let f : Obs → ℝ≥0∞ := B.indicator (fun _ => 1) have hf : Measurable f := measurable_const.indicator hB have hlin : (∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa mu)) ≤ 2 * (∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) := by rw [obsLaw_witness_lintegral E kappa sigma hkappa mu f hf, obsLaw_witness_lintegral E kappa sigma hkappa referenceProfile f hf] simp only [referenceProfile, ContinuousMap.const_apply, show ((projIcc 0 1 zero_le_one (1/2) : Dose) : ℝ) = 1/2 by norm_num [projIcc], show (1 : ℝ)-1/2 = 1/2 by norm_num] rw [← lintegral_const_mul' _ _ (by norm_num)] apply lintegral_mono; intro x dsimp only rw [← lintegral_const_mul' _ _ (by norm_num)] apply lintegral_mono; intro a dsimp only rw [← lintegral_const_mul' _ _ (by norm_num)] apply lintegral_mono; intro z dsimp only have hp : ofReal (mu a : ℝ) ≤ 1 := by exact (ENNReal.ofReal_le_ofReal (mu a).property.2).trans_eq ENNReal.ofReal_one have hn : ofReal (1-(mu a : ℝ)) ≤ 1 := by apply (ENNReal.ofReal_le_ofReal (show 1-(mu a : ℝ) ≤ 1 by linarith [(mu a).property.1])).trans_eq exact ENNReal.ofReal_one calc _ ≤ 1 * f (x, (a : ℝ)+sigma*z, 1) + 1 * f (x, (a : ℝ)+sigma*z, 0) := by gcongr _ = _ := by rw [mul_add, ← mul_assoc, ← mul_assoc] simp [ENNReal.ofReal_div_of_pos, ENNReal.mul_inv_cancel (by norm_num : (2 : ℝ≥0∞) ≠ 0) (by norm_num : (2 : ℝ≥0∞) ≠ ⊤)] simpa [f, Measure.smul_apply, smul_eq_mul, lintegral_indicator hB] using hlin
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_witness_le_two · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:341
theorem obsLaw_witness_ac

The observed threshold alternative is absolutely continuous with respect to the half-success reference. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hrange :
∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)
obsLaw sigma (lowerWitnessLaw E kappa mu) ≪ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)
Proof (Lean source)
-- @node: obsLaw_witness_ac lemma obsLaw_witness_ac (E : PathSpace S) (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (mu : ThresholdProfile) (hrange : ∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)) : obsLaw sigma (lowerWitnessLaw E kappa mu) ≪ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile) := by exact (Measure.absolutelyContinuous_of_le (obsLaw_witness_le_two E kappa sigma hkappa.1 mu)).trans Measure.smul_absolutelyContinuous
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_witness_ac · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:380
theorem obsLaw_witness_sqdev_integrable

The observed likelihood ratio has a finite squared deviation, including at zero noise. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hrange :
∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)
Integrable (fun o => (((obsLaw sigma (lowerWitnessLaw E kappa mu)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal - 1)^2) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
Proof (Lean source)
-- @node: obsLaw_witness_sqdev_integrable lemma obsLaw_witness_sqdev_integrable (E : PathSpace S) (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (mu : ThresholdProfile) (hrange : ∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)) : Integrable (fun o => (((obsLaw sigma (lowerWitnessLaw E kappa mu)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal - 1)^2) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) := by let Q := obsLaw sigma (lowerWitnessLaw E kappa mu) let R := obsLaw sigma (lowerWitnessLaw E kappa referenceProfile) letI := lowerWitnessLaw_probability E kappa hkappa referenceProfile have hobs : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop letI : IsProbabilityMeasure R := Measure.isProbabilityMeasure_map hobs.aemeasurable have hdom : Q ≤ (2 : ℝ≥0∞) • R := obsLaw_witness_le_two E kappa sigma hkappa.1 mu have hb : ∀ᵐ o ∂ R, Q.rnDeriv R o ≤ 2 := by apply ae_le_of_forall_setLIntegral_le_of_sigmaFinite (Measure.measurable_rnDeriv Q R) intro B hB hfinite rw [← withDensity_apply _ hB] calc _ ≤ Q B := Measure.le_iff'.mp (Measure.withDensity_rnDeriv_le Q R) B _ ≤ ((2 : ℝ≥0∞) • R) B := Measure.le_iff'.mp hdom B _ = ∫⁻ o in B, (2 : ℝ≥0∞) ∂ R := by simp [Measure.smul_apply, smul_eq_mul] have hreal : Measurable (fun o => (Q.rnDeriv R o).toReal) := (Measure.measurable_rnDeriv Q R).ennreal_toReal have hm : AEStronglyMeasurable (fun o => ((Q.rnDeriv R o).toReal - 1)^2) R := ((hreal.sub measurable_const).pow_const 2).aestronglyMeasurable apply (integrable_const (1 : ℝ)).mono' hm filter_upwards [hb] with o ho have hlo : 0 ≤ (Q.rnDeriv R o).toReal := ENNReal.toReal_nonneg have hhi : (Q.rnDeriv R o).toReal ≤ 2 := by have h := ENNReal.toReal_mono (by norm_num : (2 : ℝ≥0∞) ≠ ⊤) ho norm_num at h ⊢ exact h rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] nlinarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_witness_sqdev_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:388
theorem gaussian_moment_series

Compact support and integrability justify the exact Gaussian moment identity and its convergent tail. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
hsigma :
0 < sigma
hell :
0 < ell
J :
ℕ
v :
ℝ → ℝ
hv :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
hmom :
∀ j < J, ∫ t, t^j*v t = 0
conclusion 1
Summable (fun j : ℕ => (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)))
conclusion 2
(∫ w, (smoothSigned sigma v w)^2 / phiDensity sigma w)
= (∑' j : ℕ, if J ≤ j then (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)) else 0)
conclusion 3
(∫ w, (smoothSigned sigma v w)^2 / phiDensity sigma w)
≤ (∫ t, |v t|)^2 * momentTail sigma ell J
Proof (Lean source)
-- @node: gaussian_moment_series lemma gaussian_moment_series (sigma ell : ℝ) (hsigma : 0 < sigma) (hell : 0 < ell) (J : ℕ) (v : ℝ → ℝ) (hv : Integrable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) (hmom : ∀ j < J, ∫ t, t^j*v t = 0) : Summable (fun j : ℕ => (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ))) ∧ (∫ w, (smoothSigned sigma v w)^2 / phiDensity sigma w) = (∑' j : ℕ, if J ≤ j then (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)) else 0) ∧ (∫ w, (smoothSigned sigma v w)^2 / phiDensity sigma w) ≤ (∫ t, |v t|)^2 * momentTail sigma ell J := by refine ⟨compact_signed_moment_summable sigma ell hsigma hell.le v hv hsupp, ?_⟩ have hid : (∫ w, (smoothSigned sigma v w)^2 / phiDensity sigma w) = (∑' j : ℕ, if J ≤ j then (∫ t, t^j*v t)^2 / (sigma^(2*j)*(j.factorial : ℝ)) else 0) := by exact gaussian_compact_energy_tail_identity sigma ell hsigma hell.le J v hv hsupp hmom exact ⟨hid, hid.le.trans (compact_signed_moment_tail_bound sigma ell hsigma hell.le J v hv hsupp)⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_moment_series · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:426
theorem witness_tensorization

Explicit AC and square-integrability obligations discharge the general-space iid tensorization API. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hrange :
∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)
n :
ℕ
1
+ chiSqDiv (experiment n sigma (lowerWitnessLaw E kappa mu)) (experiment n sigma (lowerWitnessLaw E kappa referenceProfile))
= (1 + chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa mu)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)))^n
Proof (Lean source)
-- @node: witness_tensorization lemma witness_tensorization (E : PathSpace S) (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (mu : ThresholdProfile) (hrange : ∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)) (n : ℕ) : 1 + chiSqDiv (experiment n sigma (lowerWitnessLaw E kappa mu)) (experiment n sigma (lowerWitnessLaw E kappa referenceProfile)) = (1 + chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa mu)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)))^n := by letI := lowerWitnessLaw_probability E kappa hkappa mu letI := lowerWitnessLaw_probability E kappa hkappa referenceProfile have hobs : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose fun_prop letI : IsProbabilityMeasure (obsLaw sigma (lowerWitnessLaw E kappa mu)) := Measure.isProbabilityMeasure_map hobs.aemeasurable letI : IsProbabilityMeasure (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) := Measure.isProbabilityMeasure_map hobs.aemeasurable exact one_add_chiSqDiv_pi_iid_general (obsLaw sigma (lowerWitnessLaw E kappa mu)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) (obsLaw_witness_ac E kappa sigma hkappa hsigma mu hrange) (obsLaw_witness_sqdev_integrable E kappa sigma hkappa hsigma mu hrange) n
CausalSmith.Stat.NoisydoseWeakdesignTransition.witness_tensorization · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/GaussianMomentSeries.lean:444
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.IdentificationBasics 9 declarations Observed stratum identification, continuous potential means, and target decomposition.

Observed stratum identification, continuous potential means, and target decomposition.

theorem potentialOutcome_measurable

Joint schedule evaluation gives measurability at every public fixed dose. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
a :
ℝ
ha :
a ∈ Icc (0 : ℝ) 1
Proof (Lean source)
-- @node: potentialOutcome_measurable @[fun_prop] lemma potentialOutcome_measurable (E : PathSpace S) (a : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) : Measurable (fun w : StructSpace S => potentialOutcome E w a) := by first | fun_prop | exact E.measurable_eval.comp (show Measurable (fun w : StructSpace S => (sSched w, (⟨a, ha⟩ : Dose))) by fun_prop)
CausalSmith.Stat.NoisydoseWeakdesignTransition.potentialOutcome_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/IdentificationBasics.lean:14
theorem potentialOutcome_integrable

Bounded fixed-dose potential outcomes are integrable without an added premise. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
hbounded :
a :
ℝ
ha :
a ∈ Icc (0 : ℝ) 1
Integrable (fun w => potentialOutcome E w a) P
Proof (Lean source)
lemma potentialOutcome_integrable (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hbounded : BoundedPotentialOutcomes E P) (a : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) : Integrable (fun w => potentialOutcome E w a) P := by apply (integrable_const (1 : ℝ)).mono' (potentialOutcome_measurable E a ha).aestronglyMeasurable filter_upwards [hbounded a ha] with w hw rw [Real.norm_eq_abs, abs_of_nonneg hw.1] exact hw.2
CausalSmith.Stat.NoisydoseWeakdesignTransition.potentialOutcome_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/IdentificationBasics.lean:23
theorem condPotMean_mem_Icc

With bounded potential outcomes, the potential mean at a dose in the public interval, conditional on a positive-mass stratum, lies between zero and one.

Formal statement
S :
Type u_1
shared
E :
hbounded :
x :
hpos :
0 < strataProb P x
a :
ℝ
ha :
a ∈ Icc (0 : ℝ) 1
condPotMean E P x a ∈ Icc (0 : ℝ) 1
Proof (Lean source)
lemma condPotMean_mem_Icc (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hbounded : BoundedPotentialOutcomes E P) (x : Bool) (hpos : 0 < strataProb P x) (a : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) : condPotMean E P x a ∈ Icc (0 : ℝ) 1 := by have hs : MeasurableSet {w : StructSpace S | sX w = x} := measurableSet_eq_fun (by fun_prop) measurable_const have hi := (potentialOutcome_integrable E P hbounded a ha).restrict (s := {w : StructSpace S | sX w = x}) have hb := ae_restrict_of_ae (s := {w : StructSpace S | sX w = x}) (hbounded a ha) unfold condPotMean have heq : (∫ w, (if sX w = x then potentialOutcome E w a else 0) ∂P) = ∫ w in {w : StructSpace S | sX w = x}, potentialOutcome E w a ∂P := by simpa only [indicator, Set.mem_ofPred_eq] using (integral_indicator (f := fun w => potentialOutcome E w a) hs) rw [heq] constructor · exact div_nonneg (integral_nonneg_of_ae (hb.mono fun _ hw => hw.1)) hpos.le · apply (div_le_one hpos).2 calc _ ≤ ∫ _ in {w : StructSpace S | sX w = x}, (1 : ℝ) ∂P := integral_mono_ae hi (integrable_const 1) (hb.mono fun _ hw => hw.2) _ = strataProb P x := by simp [strataProb]
CausalSmith.Stat.NoisydoseWeakdesignTransition.condPotMean_mem_Icc · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/IdentificationBasics.lean:33
theorem strataProb_pos

Overlap makes each finite-stratum normalization strictly positive. Under the stated condition. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
x :
0 < strataProb P x
Proof (Lean source)
-- @node: strataProb_pos lemma strataProb_pos (P : Measure (StructSpace S)) (hoverlap : StratumPositive P) (x : Bool) : 0 < strataProb P x := hoverlap x
theorem causalTarget_eq_stratum_sum

Partitioning the fixed-dose potential expectation into the two positive strata gives its target formula. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
hoverlap :
hbounded :
causalTarget E P = ∑ x : Bool, strataProb P x * condPotMean E P x a0
Proof (Lean source)
-- @node: causalTarget_eq_stratum_sum lemma causalTarget_eq_stratum_sum (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hbounded : BoundedPotentialOutcomes E P) : causalTarget E P = ∑ x : Bool, strataProb P x * condPotMean E P x a0 := by have ha : a0 ∈ Icc (0 : ℝ) 1 := by norm_num [a0] have hi := potentialOutcome_integrable E P hbounded a0 ha have his (x : Bool) : Integrable (fun w => if sX w = x then potentialOutcome E w a0 else 0) P := by apply (hi.indicator (show MeasurableSet {w : StructSpace S | sX w = x} from measurableSet_eq_fun (by fun_prop) measurable_const)).congr filter_upwards with w by_cases hw : sX w = x <;> simp [hw] have heq (w : StructSpace S) : potentialOutcome E w a0 = ∑ x : Bool, if sX w = x then potentialOutcome E w a0 else 0 := by cases sX w <;> simp calc causalTarget E P = ∫ w, ∑ x : Bool, if sX w = x then potentialOutcome E w a0 else 0 ∂P := by exact integral_congr_ae (Eventually.of_forall heq) _ = ∑ x : Bool, ∫ w, (if sX w = x then potentialOutcome E w a0 else 0) ∂P := integral_finsetSum univ (fun x _ => his x) _ = ∑ x : Bool, strataProb P x * condPotMean E P x a0 := by apply Finset.sum_congr rfl intro x hx rw [condPotMean, mul_div_cancel₀ _ (ne_of_gt (strataProb_pos P hoverlap x))]
CausalSmith.Stat.NoisydoseWeakdesignTransition.causalTarget_eq_stratum_sum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/IdentificationBasics.lean:65
theorem obsLaw_stratum_mass

The observed stratum marginal has exactly the structural stratum mass. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
x :
(obsLaw sigma P).real {o : Obs | o.1 = x} = strataProb P x
Proof (Lean source)
-- @node: obsLaw_stratum_mass lemma obsLaw_stratum_mass (sigma : ℝ) (P : Measure (StructSpace S)) (x : Bool) : (obsLaw sigma P).real {o : Obs | o.1 = x} = strataProb P x := by have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose fun_prop unfold obsLaw strataProb Measure.real rw [Measure.map_apply hm (show MeasurableSet {o : Obs | o.1 = x} from measurableSet_eq_fun (by fun_prop) measurable_const)] rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_stratum_mass · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/IdentificationBasics.lean:92
theorem strataProb_eq_of_obsLaw_eq

Observational equivalence identifies the overlap probabilities directly from the marginal. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
P P' :
hobs :
obsLaw sigma P = obsLaw sigma P'
x :
Proof (Lean source)
-- @node: strataProb_eq_of_obsLaw_eq lemma strataProb_eq_of_obsLaw_eq (sigma : ℝ) (P P' : Measure (StructSpace S)) (hobs : obsLaw sigma P = obsLaw sigma P') (x : Bool) : strataProb P x = strataProb P' x := by rw [← obsLaw_stratum_mass sigma P x, hobs, obsLaw_stratum_mass sigma P' x]
CausalSmith.Stat.NoisydoseWeakdesignTransition.strataProb_eq_of_obsLaw_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/IdentificationBasics.lean:104
theorem condPotMean_continuousOn

Positive Holder exponent supplies continuity of the potential mean, including at the endpoints. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta :
ℝ
hbeta :
0 < beta
hholder :
HolderMean E beta P
x :
ContinuousOn (condPotMean E P x) (Icc (0 : ℝ) 1)
Proof (Lean source)
-- @node: condPotMean_continuousOn @[fun_prop] lemma condPotMean_continuousOn (E : PathSpace S) (beta : ℝ) (P : Measure (StructSpace S)) (hbeta : 0 < beta) (hholder : HolderMean E beta P) (x : Bool) : ContinuousOn (condPotMean E P x) (Icc (0 : ℝ) 1) := by have hh : HolderOnWith 1 ⟨beta, hbeta.le⟩ (condPotMean E P x) (Icc (0 : ℝ) 1) := by intro a ha b hb simp only [edist_dist, ENNReal.coe_one, one_mul] change ofReal (dist (condPotMean E P x a) (condPotMean E P x b)) ≤ ofReal (dist a b) ^ beta rw [ENNReal.ofReal_rpow_of_nonneg dist_nonneg hbeta.le] exact ENNReal.ofReal_le_ofReal (by simpa only [Real.dist_eq] using hholder x a ha b hb) exact hh.continuousOn (by exact_mod_cast hbeta)
CausalSmith.Stat.NoisydoseWeakdesignTransition.condPotMean_continuousOn · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/IdentificationBasics.lean:110
theorem condPotMean_eqOn_of_ae_eq

Lebesgue almost-everywhere agreement of the two Holder versions identifies every public dose. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta :
ℝ
P P' :
hbeta :
0 < beta
hholder :
HolderMean E beta P
hholder' :
HolderMean E beta P'
x :
hae :
condPotMean E P x =ᵐ[volume.restrict (Icc (0 : ℝ) 1)] condPotMean E P' x
EqOn (condPotMean E P x) (condPotMean E P' x) (Icc (0 : ℝ) 1)
Proof (Lean source)
-- @node: condPotMean_eqOn_of_ae_eq lemma condPotMean_eqOn_of_ae_eq (E : PathSpace S) (beta : ℝ) (P P' : Measure (StructSpace S)) (hbeta : 0 < beta) (hholder : HolderMean E beta P) (hholder' : HolderMean E beta P') (x : Bool) (hae : condPotMean E P x =ᵐ[volume.restrict (Icc (0 : ℝ) 1)] condPotMean E P' x) : EqOn (condPotMean E P x) (condPotMean E P' x) (Icc (0 : ℝ) 1) := by exact Measure.eqOn_Icc_of_ae_eq volume (by norm_num : (0 : ℝ) ≠ 1) hae (condPotMean_continuousOn E beta P hbeta hholder x) (condPotMean_continuousOn E beta P' hbeta hholder' x)
CausalSmith.Stat.NoisydoseWeakdesignTransition.condPotMean_eqOn_of_ae_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/IdentificationBasics.lean:125
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.InversePerturbation 11 declarations Scaled inverse-regime packet profiles and their weighted cancellations, equations (20)--(23).

Scaled inverse-regime packet profiles and their weighted cancellations, equations (20)--(23).

theorem packetPsi_increment_bound

The packet derivative bound gives the global increment bound, including the zero extension. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa C c :
ℝ
m :
ℕ
hp :
PacketBounds kappa C c m
s t :
ℝ
|packetPsi kappa m s-packetPsi kappa m t| ≤ C*m*|s-t|
Proof (Lean source)
-- @node: packetPsi_increment_bound lemma packetPsi_increment_bound (kappa C c : ℝ) (m : ℕ) (hp : PacketBounds kappa C c m) (s t : ℝ) : |packetPsi kappa m s-packetPsi kappa m t| ≤ C*m*|s-t| := by rcases hp with ⟨_, _, hdiff, _, _, _, hd, _, _, _⟩ simpa only [Real.norm_eq_abs] using Convex.norm_image_sub_le_of_norm_deriv_le (fun x (_ : x ∈ (univ : Set ℝ)) => hdiff.differentiable (by norm_num) x) (fun x (_ : x ∈ (univ : Set ℝ)) => by simpa only [Real.norm_eq_abs] using hd x) convex_univ (mem_univ t) (mem_univ s)
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_increment_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:13
theorem inversePerturbation_support

The scaled packet is supported on the stipulated radius. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon h ell :
ℝ
m :
ℕ
hell :
0 < ell
t :
ℝ
ht :
t ∉ Icc (-ell) ell
epsilon*h^beta*packetPsi kappa m (t/ell) = 0
Proof (Lean source)
-- @node: inversePerturbation_support lemma inversePerturbation_support (beta kappa epsilon h ell : ℝ) (m : ℕ) (hell : 0 < ell) (t : ℝ) (ht : t ∉ Icc (-ell) ell) : epsilon*h^beta*packetPsi kappa m (t/ell) = 0 := by have hout : t/ell ∉ Icc (-1 : ℝ) 1 := by intro hi apply ht constructor · have := (le_div_iff₀ hell).mp hi.1 linarith · simpa only [one_mul] using (div_le_iff₀ hell).mp hi.2 rw [packetPsi_support kappa m (t/ell) hout, mul_zero]
CausalSmith.Stat.NoisydoseWeakdesignTransition.inversePerturbation_support · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:24
theorem inversePerturbation_zero

The scaled packet has the exact tuning amplitude at the target. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon h ell C c :
ℝ
m :
ℕ
hp :
PacketBounds kappa C c m
epsilon*h^beta*packetPsi kappa m (0/ell) = epsilon*h^beta
Proof (Lean source)
-- @node: inversePerturbation_zero lemma inversePerturbation_zero (beta kappa epsilon h ell C c : ℝ) (m : ℕ) (hp : PacketBounds kappa C c m) : epsilon*h^beta*packetPsi kappa m (0/ell) = epsilon*h^beta := by rcases hp with ⟨_, _, _, _, hz, _⟩ rw [zero_div, hz, mul_one]
CausalSmith.Stat.NoisydoseWeakdesignTransition.inversePerturbation_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:38
theorem inversePerturbation_abs_bound

The packet supremum bound scales by the nonnegative tuning amplitude. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon h ell C c :
ℝ
m :
ℕ
hp :
PacketBounds kappa C c m
he :
0 ≤ epsilon
hh :
0 < h
t :
ℝ
|epsilon*h^beta*packetPsi kappa m (t/ell)| ≤ epsilon*h^beta*C
Proof (Lean source)
-- @node: inversePerturbation_abs_bound lemma inversePerturbation_abs_bound (beta kappa epsilon h ell C c : ℝ) (m : ℕ) (hp : PacketBounds kappa C c m) (he : 0 ≤ epsilon) (hh : 0 < h) (t : ℝ) : |epsilon*h^beta*packetPsi kappa m (t/ell)| ≤ epsilon*h^beta*C := by rcases hp with ⟨_, _, _, _, _, hsup, _⟩ rw [abs_mul, abs_of_nonneg (mul_nonneg he (Real.rpow_nonneg hh.le _))] exact mul_le_mul_of_nonneg_left (hsup _) (by positivity)
CausalSmith.Stat.NoisydoseWeakdesignTransition.inversePerturbation_abs_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:46
theorem inversePerturbation_holder_bound

The two distance cases in (21) give a scale-free Hölder bound for the inverse packet. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon ell C c :
ℝ
m :
ℕ
hp :
PacketBounds kappa C c m
hb :
beta ∈ Icc (0 : ℝ) 1
he :
0 ≤ epsilon
hC :
0 ≤ C
hell :
0 < ell
hm :
0 < m
s t :
ℝ
|epsilon*(ell/m)^beta*packetPsi kappa m (s/ell)- epsilon*(ell/m)^beta*packetPsi kappa m (t/ell)|
≤ 2*epsilon*C*|s-t|^beta
Proof (Lean source)
-- @node: inversePerturbation_holder_bound lemma inversePerturbation_holder_bound (beta kappa epsilon ell C c : ℝ) (m : ℕ) (hp : PacketBounds kappa C c m) (hb : beta ∈ Icc (0 : ℝ) 1) (he : 0 ≤ epsilon) (hC : 0 ≤ C) (hell : 0 < ell) (hm : 0 < m) (s t : ℝ) : |epsilon*(ell/m)^beta*packetPsi kappa m (s/ell)- epsilon*(ell/m)^beta*packetPsi kappa m (t/ell)| ≤ 2*epsilon*C*|s-t|^beta := by let h : ℝ := ell/m have hmR : (0 : ℝ) < m := by exact_mod_cast hm have hh : 0 < h := div_pos hell hmR have hA : 0 ≤ epsilon*h^beta := by positivity have hnear : |epsilon*h^beta*packetPsi kappa m (s/ell)- epsilon*h^beta*packetPsi kappa m (t/ell)| ≤ epsilon*h^beta*C*(|s-t|/h) := by rw [← mul_sub, abs_mul, abs_of_nonneg hA] have hi := packetPsi_increment_bound kappa C c m hp (s/ell) (t/ell) rw [← sub_div, abs_div, abs_of_pos hell] at hi calc _ ≤ (epsilon*h^beta)*(C*m*(|s-t|/ell)) := mul_le_mul_of_nonneg_left hi hA _ = _ := by dsimp [h]; field_simp by_cases hst : |s-t| ≤ h · have hr : |s-t|/h ≤ (|s-t|/h)^beta := by simpa only [Real.rpow_one] using Real.rpow_le_rpow_of_exponent_ge' (div_nonneg (abs_nonneg _) hh.le) ((div_le_one hh).mpr hst) hb.1 hb.2 calc _ ≤ epsilon*h^beta*C*(|s-t|/h) := hnear _ ≤ epsilon*h^beta*C*((|s-t|/h)^beta) := by gcongr _ = epsilon*C*|s-t|^beta := by rw [Real.div_rpow (abs_nonneg _) hh.le]; field_simp _ ≤ _ := by nlinarith [mul_nonneg (mul_nonneg he hC) (Real.rpow_nonneg (abs_nonneg (s-t)) beta)] · have hs := inversePerturbation_abs_bound beta kappa epsilon h ell C c m hp he hh s have ht := inversePerturbation_abs_bound beta kappa epsilon h ell C c m hp he hh t have hpow : h^beta ≤ |s-t|^beta := Real.rpow_le_rpow hh.le (le_of_lt (lt_of_not_ge hst)) hb.1 calc _ ≤ |epsilon*h^beta*packetPsi kappa m (s/ell)|+ |epsilon*h^beta*packetPsi kappa m (t/ell)| := by simpa using abs_sub_le (epsilon*h^beta*packetPsi kappa m (s/ell)) 0 (epsilon*h^beta*packetPsi kappa m (t/ell)) _ ≤ 2*epsilon*C*h^beta := by linarith _ ≤ _ := mul_le_mul_of_nonneg_left hpow (by positivity)
CausalSmith.Stat.NoisydoseWeakdesignTransition.inversePerturbation_holder_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:55
theorem inversePerturbation_signed_integrable

The packet times the design density is an integrable compact signed density. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon h ell :
ℝ
m :
ℕ
hk :
0 ≤ kappa
Integrable (fun t => witnessDesignDensity kappa t * (epsilon*h^beta*packetPsi kappa m (t/ell)))
Proof (Lean source)
-- @node: inversePerturbation_signed_integrable @[fun_prop] lemma inversePerturbation_signed_integrable (beta kappa epsilon h ell : ℝ) (m : ℕ) (hk : 0 ≤ kappa) : Integrable (fun t => witnessDesignDensity kappa t * (epsilon*h^beta*packetPsi kappa m (t/ell))) := by have hc : Continuous (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * (epsilon*h^beta*packetPsi kappa m (t/ell))) := by have hp := (packetPsi_contDiff kappa m).continuous fun_prop have heq : (fun t => witnessDesignDensity kappa t * (epsilon*h^beta*packetPsi kappa m (t/ell))) = (Icc (-1/2 : ℝ) (1/2)).indicator (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa*(epsilon*h^beta*packetPsi kappa m (t/ell))) := by funext t simp only [witnessDesignDensity, indicator_apply] split_ifs <;> simp rw [heq] exact hc.integrableOn_Icc.integrable_indicator measurableSet_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.inversePerturbation_signed_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:99
theorem inverse_threshold_profiles

Small inverse-regime packet amplitudes give the two actual continuous threshold profiles, with the paper's range and radius-one Hölder seminorm. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon ell C c :
ℝ
m :
ℕ
hp :
PacketBounds kappa C c m
hb :
beta ∈ Icc (0 : ℝ) 1
he :
0 ≤ epsilon
heSmall :
2*epsilon*C ≤ 1
hC :
0 ≤ C
hell :
0 < ell
hm :
0 < m
hamp :
epsilon*(ell/m)^beta*C ≤ 3/8
∃ muPlus muMinus : ThresholdProfile,
conclusion 1
a :
(muPlus a : ℝ) = 1/2 + (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell))
(muMinus a : ℝ) = 1/2 - (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell))
conclusion 2
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
conclusion 3
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
Proof (Lean source)
-- @node: inverse_threshold_profiles lemma inverse_threshold_profiles (beta kappa epsilon ell C c : ℝ) (m : ℕ) (hp : PacketBounds kappa C c m) (hb : beta ∈ Icc (0 : ℝ) 1) (he : 0 ≤ epsilon) (heSmall : 2*epsilon*C ≤ 1) (hC : 0 ≤ C) (hell : 0 < ell) (hm : 0 < m) (hamp : epsilon*(ell/m)^beta*C ≤ 3/8) : ∃ muPlus muMinus : ThresholdProfile, (∀ a : Dose, (muPlus a : ℝ) = 1/2 + (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)) ∧ (muMinus a : ℝ) = 1/2 - (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell))) ∧ (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) := by have hmR : (0 : ℝ) < m := by exact_mod_cast hm have hh : 0 < ell/m := div_pos hell hmR have hcontinuous := (packetPsi_contDiff kappa m).continuous have hbounds (a : Dose) := inversePerturbation_abs_bound beta kappa epsilon (ell/m) ell C c m hp he hh ((a : ℝ)-a0) have hlower (a : Dose) := (abs_le.mp (hbounds a)).1 have hupper (a : Dose) := (abs_le.mp (hbounds a)).2 have hplus (a : Dose) : 1/2 + (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)) ∈ Icc (0 : ℝ) 1 := by constructor <;> linarith [hlower a, hupper a] have hminus (a : Dose) : 1/2 - (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)) ∈ Icc (0 : ℝ) 1 := by constructor <;> linarith [hlower a, hupper a] let muPlus : ThresholdProfile := ⟨fun a => ⟨1/2 + (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)), hplus a⟩, by fun_prop⟩ let muMinus : ThresholdProfile := ⟨fun a => ⟨1/2 - (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)), hminus a⟩, by fun_prop⟩ refine ⟨muPlus, muMinus, (fun a => ⟨rfl, rfl⟩), ?_, ?_⟩ · intro a change (1/2 + (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)) ∈ Icc (1/8 : ℝ) (7/8)) ∧ (1/2 - (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)) ∈ Icc (1/8 : ℝ) (7/8)) constructor <;> constructor <;> linarith [hlower a, hupper a] · intro a b have hinc := inversePerturbation_holder_bound beta kappa epsilon ell C c m hp hb he hC hell hm ((a : ℝ)-a0) ((b : ℝ)-a0) rw [sub_sub_sub_cancel_right] at hinc have hfinal := hinc.trans (mul_le_of_le_one_left (Real.rpow_nonneg (abs_nonneg ((a : ℝ)-(b : ℝ))) beta) heSmall) change |(1/2 + (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)))- (1/2 + (epsilon*(ell/m)^beta*packetPsi kappa m (((b : ℝ)-a0)/ell)))| ≤ _ ∧ |(1/2 - (epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)))- (1/2 - (epsilon*(ell/m)^beta*packetPsi kappa m (((b : ℝ)-a0)/ell)))| ≤ _ constructor · simpa only [add_sub_add_left_eq_sub] using hfinal · simpa only [sub_sub_sub_cancel_left, abs_sub_comm] using hfinal
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverse_threshold_profiles · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:119
theorem inversePerturbation_weighted_scale

On a packet's support the public design density is its unclipped power law. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon h ell :
ℝ
m j :
ℕ
hell :
ell ∈ Ioc (0 : ℝ) (1/4)
t :
ℝ
t^j * (witnessDesignDensity kappa t * (epsilon*h^beta*packetPsi kappa m (t/ell)))
= ((kappa+1)*2^kappa*(epsilon*h^beta)*ell^kappa*ell^j) * (|t/ell|^kappa*(t/ell)^j*packetPsi kappa m (t/ell))
Proof (Lean source)
-- @node: inversePerturbation_weighted_scale lemma inversePerturbation_weighted_scale (beta kappa epsilon h ell : ℝ) (m j : ℕ) (hell : ell ∈ Ioc (0 : ℝ) (1/4)) (t : ℝ) : t^j * (witnessDesignDensity kappa t * (epsilon*h^beta*packetPsi kappa m (t/ell))) = ((kappa+1)*2^kappa*(epsilon*h^beta)*ell^kappa*ell^j) * (|t/ell|^kappa*(t/ell)^j*packetPsi kappa m (t/ell)) := by by_cases ht : t ∈ Icc (-ell) ell · have htlarge : t ∈ Icc (-1/2 : ℝ) (1/2) := by constructor <;> linarith [ht.1, ht.2, hell.2] rw [witnessDesignDensity, if_pos htlarge] have hscale : t = ell*(t/ell) := by field_simp [hell.1.ne'] have habs : |t|^kappa = ell^kappa*|t/ell|^kappa := by conv_lhs => rw [hscale, abs_mul, abs_of_pos hell.1] exact Real.mul_rpow hell.1.le (abs_nonneg _) have hpow : t^j = ell^j*(t/ell)^j := by conv_lhs => rw [hscale, mul_pow] rw [habs, hpow] ring · have hpsi : packetPsi kappa m (t/ell) = 0 := by have hzero := inversePerturbation_support 0 kappa 1 1 ell m hell.1 t ht simpa using hzero simp [hpsi]
CausalSmith.Stat.NoisydoseWeakdesignTransition.inversePerturbation_weighted_scale · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:169
theorem inversePerturbation_moment_zero

Change of variables transfers every weighted packet cancellation to the signed latent density. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon h ell C c :
ℝ
m j :
ℕ
hp :
PacketBounds kappa C c m
hell :
ell ∈ Ioc (0 : ℝ) (1/4)
hj :
(j : ℝ) < c*m
(∫ t, t^j * (witnessDesignDensity kappa t * (epsilon*h^beta*packetPsi kappa m (t/ell))))
= 0
Proof (Lean source)
-- @node: inversePerturbation_moment_zero lemma inversePerturbation_moment_zero (beta kappa epsilon h ell C c : ℝ) (m j : ℕ) (hp : PacketBounds kappa C c m) (hell : ell ∈ Ioc (0 : ℝ) (1/4)) (hj : (j : ℝ) < c*m) : (∫ t, t^j * (witnessDesignDensity kappa t * (epsilon*h^beta*packetPsi kappa m (t/ell)))) = 0 := by rcases hp with ⟨_, _, _, _, _, _, _, _, _, hcancel⟩ simp_rw [inversePerturbation_weighted_scale beta kappa epsilon h ell m j hell] rw [integral_const_mul, Measure.integral_comp_div (fun u => |u|^kappa*u^j*packetPsi kappa m u) ell] have hfull : (∫ u, |u|^kappa*u^j*packetPsi kappa m u) = ∫ u in Icc (-1 : ℝ) 1, |u|^kappa*u^j*packetPsi kappa m u := by symm apply setIntegral_eq_integral_of_forall_compl_eq_zero intro u hu rw [packetPsi_support kappa m u hu, mul_zero] rw [hfull, hcancel j hj] simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.inversePerturbation_moment_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:194
theorem packet_floor_moment_cutoff Lemma packet_floor_moment_cutoff in the paper ↗

The floor cancellation order only uses moments strictly below the packet's real cutoff. Under the stated conditions. This is the stated conclusion.

Formal statement
c :
ℝ
m j :
ℕ
hc :
0 ≤ c
hj :
j < floor (c*m)
(j : ℝ) < c*m
Proof (Lean source)
-- @node: packet_floor_moment_cutoff lemma packet_floor_moment_cutoff (c : ℝ) (m j : ℕ) (hc : 0 ≤ c) (hj : j < floor (c*m)) : (j : ℝ) < c*m := by have hfloor : (floor (c*m) : ℝ) ≤ c*m := Nat.floor_le (by positivity) exact (show (j : ℝ) < floor (c*m) by exact_mod_cast hj).trans_le hfloor
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_floor_moment_cutoff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:214
theorem inversePerturbation_absolute_mass_le

The packet absolute-mass bound scales as h to the power beta plus kappa plus one, as in (23). Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon ell C c :
ℝ
m :
ℕ
hp :
PacketBounds kappa C c m
hk :
0 ≤ kappa
he :
0 ≤ epsilon
hell :
ell ∈ Ioc (0 : ℝ) (1/4)
hm :
0 < m
(∫ t, |witnessDesignDensity kappa t * (epsilon*(ell/m)^beta*packetPsi kappa m (t/ell))|)
≤ (kappa+1)*2^kappa*epsilon*C*(ell/m)^(beta+kappa+1)
Proof (Lean source)
-- @node: inversePerturbation_absolute_mass_le lemma inversePerturbation_absolute_mass_le (beta kappa epsilon ell C c : ℝ) (m : ℕ) (hp : PacketBounds kappa C c m) (hk : 0 ≤ kappa) (he : 0 ≤ epsilon) (hell : ell ∈ Ioc (0 : ℝ) (1/4)) (hm : 0 < m) : (∫ t, |witnessDesignDensity kappa t * (epsilon*(ell/m)^beta*packetPsi kappa m (t/ell))|) ≤ (kappa+1)*2^kappa*epsilon*C*(ell/m)^(beta+kappa+1) := by have hmR : (0 : ℝ) < m := by exact_mod_cast hm have hh : 0 < ell/m := div_pos hell.1 hmR have hell0 : 0 < ell := hell.1 let A : ℝ := (kappa+1)*2^kappa*(epsilon*(ell/m)^beta)*ell^kappa have hA : 0 ≤ A := by dsimp [A]; positivity have hid (t : ℝ) : |witnessDesignDensity kappa t * (epsilon*(ell/m)^beta*packetPsi kappa m (t/ell))| = A*(|t/ell|^kappa*|packetPsi kappa m (t/ell)|) := by have hs := inversePerturbation_weighted_scale beta kappa epsilon (ell/m) ell m 0 hell t simp only [pow_zero, one_mul, mul_one] at hs rw [hs, abs_mul, abs_of_nonneg hA, abs_mul, abs_of_nonneg (Real.rpow_nonneg (abs_nonneg _) _)] simp_rw [hid] rw [integral_const_mul, Measure.integral_comp_div (fun u => |u|^kappa*|packetPsi kappa m u|) ell, abs_of_pos hell.1, smul_eq_mul] have hfull : (∫ u, |u|^kappa*|packetPsi kappa m u|) = ∫ u in Icc (-1 : ℝ) 1, |u|^kappa*|packetPsi kappa m u| := by symm apply setIntegral_eq_integral_of_forall_compl_eq_zero intro u hu simp [packetPsi_support kappa m u hu] rw [hfull] rcases hp with ⟨_, _, _, _, _, _, _, hmass, _, _⟩ calc _ ≤ A*(ell*(C*(m : ℝ)^(-kappa-1))) := mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hmass hell.1.le) hA _ = (kappa+1)*2^kappa*epsilon*C*(ell/m)^(beta+kappa+1) := by have hr : (ell/m)^(beta+kappa+1) = (ell/m)^beta * ell^kappa * ell * (m : ℝ)^(-kappa-1) := by rw [show beta+kappa+1 = beta+(kappa+1) by ring, Real.rpow_add hh, Real.div_rpow hell.1.le hmR.le (kappa+1), Real.rpow_add hell.1, Real.rpow_one, show -kappa-1 = -(kappa+1) by ring, Real.rpow_neg hmR.le] ring rw [hr] dsimp [A] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.inversePerturbation_absolute_mass_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/InversePerturbation.lean:221
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.LatentIdentification 17 declarations Latent measures, local mass ratios, continuous mean recovery, and unmarked deconvolution.

Latent measures, local mass ratios, continuous mean recovery, and unmarked deconvolution.

def latentDoseLaw

Unmarked and potential-mean-marked conditional latent measures used in identification.

Definition (Lean source)
S :
Type u_1
shared
x :
latentDoseLaw P x :
def latentMeanMeasure

Conditional latent dose measure marked by the conditional potential-outcome mean.

Definition (Lean source)
S :
Type u_1
shared
E :
x :
latentMeanMeasure E P x :
(latentDoseLaw P x).withDensity (fun t => ofReal (condPotMean E P x (t+a0)))
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentMeanMeasure · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:25
def latentLocalRatio

Shrinking-neighborhood mass ratio of the identified marked and unmarked latent measures.

Definition (Lean source)
S :
Type u_1
shared
E :
x :
j :
ℕ
latentLocalRatio E P x j :
ℝ
(latentMeanMeasure E P x).real (Ioo (-1 / ((j : ℝ)+3)) (1 / ((j : ℝ)+3))) / (latentDoseLaw P x).real (Ioo (-1 / ((j : ℝ)+3)) (1 / ((j : ℝ)+3)))
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentLocalRatio · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:28
theorem latentDoseLaw_probability

Normalized positive strata give finite latent dose laws. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
x :
Proof (Lean source)
-- @node: latentDoseLaw_probability lemma latentDoseLaw_probability (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (x : Bool) : IsProbabilityMeasure (latentDoseLaw P x) := by letI := stratumLaw_probability P hoverlap x exact Measure.isProbabilityMeasure_map (by unfold latentCentered; fun_prop : Measurable (latentCentered (S := S))).aemeasurable
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentDoseLaw_probability · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:32
theorem latentDoseLaw_ae_mem

The density representation puts all latent dose mass on the compact interval. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
kappa :
ℝ
hdesign :
WeakDesign K.clo K.chi kappa P
x :
∀ᵐ t ∂latentDoseLaw P x, t ∈ Icc (-1/2 : ℝ) (1/2)
Proof (Lean source)
-- @node: latentDoseLaw_ae_mem lemma latentDoseLaw_ae_mem (P : Measure (StructSpace S)) (kappa : ℝ) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (x : Bool) : ∀ᵐ t ∂latentDoseLaw P x, t ∈ Icc (-1/2 : ℝ) (1/2) := by obtain ⟨g, hg, hlaw, hbounds⟩ := hdesign rw [latentDoseLaw, hlaw x] exact (ae_restrict_mem measurableSet_Icc).filter_mono (Measure.AbsolutelyContinuous.ae_le (show (volume.restrict (Icc (-1/2 : ℝ) (1/2))).withDensity (fun t => ofReal (g x t)) ≪ volume.restrict (Icc (-1/2 : ℝ) (1/2)) from withDensity_absolutelyContinuous _ _))
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentDoseLaw_ae_mem · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:39
theorem latentDoseLaw_local_mass_pos

The lower power envelope makes every target neighborhood have positive mass. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
kappa :
ℝ
hoverlap :
hdesign :
WeakDesign K.clo K.chi kappa P
x :
eps :
ℝ
heps :
0 < eps
hhalf :
eps ≤ 1/2
0 < (latentDoseLaw P x).real (Ioo (-eps) eps)
Proof (Lean source)
-- @node: latentDoseLaw_local_mass_pos lemma latentDoseLaw_local_mass_pos (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (kappa : ℝ) (hoverlap : StratumPositive P) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (x : Bool) (eps : ℝ) (heps : 0 < eps) (hhalf : eps ≤ 1/2) : 0 < (latentDoseLaw P x).real (Ioo (-eps) eps) := by letI := latentDoseLaw_probability P hoverlap x obtain ⟨g, hg, hlaw, hbounds⟩ := hdesign have hsub : Ioo (-eps) eps ⊆ Icc (-1/2 : ℝ) (1/2) := by intro t ht constructor <;> linarith [ht.1, ht.2] have hb : ∀ᵐ t ∂volume.restrict (Ioo (-eps) eps), K.clo * |t| ^ kappa ≤ g x t := by exact (ae_restrict_of_ae_restrict_of_subset hsub (hbounds x)).mono (fun _ h => h.1) have hn : ∀ᵐ t ∂volume.restrict (Ioo (-eps) eps), t ≠ (0 : ℝ) := (ae_iff.mpr (by simp)).filter_mono (ae_mono Measure.restrict_le_self) have hp : ∀ᵐ t ∂volume.restrict (Ioo (-eps) eps), 0 < ofReal (g x t) := by filter_upwards [hb, hn] with t ht hn apply ENNReal.ofReal_pos.mpr exact lt_of_lt_of_le (mul_pos K.clo_pos (Real.rpow_pos_of_pos (abs_pos.mpr hn) _)) ht have hm : (latentDoseLaw P x) (Ioo (-eps) eps) ≠ 0 := by rw [latentDoseLaw, hlaw x, withDensity_apply _ measurableSet_Ioo, Measure.restrict_restrict measurableSet_Ioo, inter_eq_left.mpr hsub] intro hz have hz' := (lintegral_eq_zero_iff' (hg x).ennreal_ofReal.aemeasurable.restrict).mp hz have hfalse : ∀ᵐ t ∂volume.restrict (Ioo (-eps) eps), False := by filter_upwards [hp, hz'] with t ht hz exact (ne_of_gt ht) hz have : volume (Ioo (-eps) eps) = 0 := by simpa using (ae_iff.mp hfalse) rw [Real.volume_Ioo] at this have : eps - -eps ≤ 0 := ENNReal.ofReal_eq_zero.mp this linarith exact ENNReal.toReal_pos hm (measure_ne_top _ _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentDoseLaw_local_mass_pos · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:50
theorem latentMean_integrable

The Holder mean is measurable and integrable under its compact latent dose law. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hbeta :
0 < beta
hoverlap :
hdesign :
WeakDesign K.clo K.chi kappa P
hholder :
HolderMean E beta P
hrange :
x :
Integrable (fun t => condPotMean E P x (t+a0)) (latentDoseLaw P x)
Proof (Lean source)
-- @node: latentMean_integrable lemma latentMean_integrable (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (beta kappa : ℝ) (hbeta : 0 < beta) (hoverlap : StratumPositive P) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (hholder : HolderMean E beta P) (hrange : MeanRange E P) (x : Bool) : Integrable (fun t => condPotMean E P x (t+a0)) (latentDoseLaw P x) := by letI := latentDoseLaw_probability P hoverlap x have hc : Continuous (fun t : ℝ => condPotMean E P x (projIcc 0 1 zero_le_one (t+a0) : ℝ)) := by exact (condPotMean_continuousOn E beta P hbeta hholder x).comp_continuous (continuous_subtype_val.comp (continuous_projIcc.comp (by fun_prop))) (fun t => (projIcc 0 1 zero_le_one (t+a0)).property) have heq : (fun t => condPotMean E P x (projIcc 0 1 zero_le_one (t+a0) : ℝ)) =ᵐ[latentDoseLaw P x] (fun t => condPotMean E P x (t+a0)) := by filter_upwards [latentDoseLaw_ae_mem P kappa hdesign x] with t ht have ha : t+a0 ∈ Icc (0 : ℝ) 1 := by dsimp [a0]; constructor <;> linarith [ht.1, ht.2] rw [Set.projIcc_of_mem _ ha] apply Integrable.of_bound (hc.aestronglyMeasurable.congr heq) 1 filter_upwards [latentDoseLaw_ae_mem P kappa hdesign x] with t ht have ha : t+a0 ∈ Icc (0 : ℝ) 1 := by dsimp [a0]; constructor <;> linarith [ht.1, ht.2] rw [Real.norm_eq_abs, abs_of_nonneg (le_trans (by norm_num) (hrange x _ ha).1)] exact (hrange x _ ha).2.trans (by norm_num)
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentMean_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:85
theorem latentMeanMeasure_real

Marked latent mass is the integral of the potential mean against unmarked mass. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hbeta :
0 < beta
hoverlap :
hdesign :
WeakDesign K.clo K.chi kappa P
hholder :
HolderMean E beta P
hrange :
x :
B :
Set ℝ
hB :
(latentMeanMeasure E P x).real B = ∫ t in B, condPotMean E P x (t+a0) ∂latentDoseLaw P x
Proof (Lean source)
-- @node: latentMeanMeasure_real lemma latentMeanMeasure_real (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (beta kappa : ℝ) (hbeta : 0 < beta) (hoverlap : StratumPositive P) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (hholder : HolderMean E beta P) (hrange : MeanRange E P) (x : Bool) (B : Set ℝ) (hB : MeasurableSet B) : (latentMeanMeasure E P x).real B = ∫ t in B, condPotMean E P x (t+a0) ∂latentDoseLaw P x := by have hi := latentMean_integrable E P beta kappa hbeta hoverlap hdesign hholder hrange x have hn : 0 ≤ᵐ[latentDoseLaw P x] (fun t => condPotMean E P x (t+a0)) := by filter_upwards [latentDoseLaw_ae_mem P kappa hdesign x] with t ht have ha : t+a0 ∈ Icc (0 : ℝ) 1 := by dsimp [a0]; constructor <;> linarith [ht.1, ht.2] exact le_trans (by norm_num) (hrange x _ ha).1 rw [latentMeanMeasure, Measure.real, withDensity_apply _ hB, ← ofReal_integral_eq_lintegral_ofReal hi.integrableOn (hn.filter_mono (ae_mono Measure.restrict_le_self)), ENNReal.toReal_ofReal (integral_nonneg_of_ae (hn.filter_mono (ae_mono Measure.restrict_le_self)))]
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentMeanMeasure_real · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:112
theorem latentLocalRatio_error

A positive local-mass ratio approximates the target with the paper's Holder error. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hbeta :
0 < beta
hoverlap :
hdesign :
WeakDesign K.clo K.chi kappa P
hholder :
HolderMean E beta P
hrange :
x :
j :
ℕ
|latentLocalRatio E P x j - condPotMean E P x a0| ≤ (1 / ((j : ℝ)+3))^beta
Proof (Lean source)
-- @node: latentLocalRatio_error lemma latentLocalRatio_error (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (beta kappa : ℝ) (hbeta : 0 < beta) (hoverlap : StratumPositive P) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (hholder : HolderMean E beta P) (hrange : MeanRange E P) (x : Bool) (j : ℕ) : |latentLocalRatio E P x j - condPotMean E P x a0| ≤ (1 / ((j : ℝ)+3))^beta := by letI := latentDoseLaw_probability P hoverlap x let eps : ℝ := 1 / ((j : ℝ)+3) let B : Set ℝ := Ioo (-eps) eps have heps : 0 < eps := by dsimp [eps]; positivity have hhalf : eps ≤ 1/2 := by dsimp [eps] apply (div_le_iff₀ (by positivity : 0 < (j : ℝ)+3)).mpr have := Nat.cast_nonneg (α := ℝ) j linarith have hp : 0 < (latentDoseLaw P x).real B := latentDoseLaw_local_mass_pos P kappa hoverlap hdesign x eps heps hhalf have hi := latentMean_integrable E P beta kappa hbeta hoverlap hdesign hholder hrange x have herr : ‖∫ t in B, (condPotMean E P x (t+a0) - condPotMean E P x a0) ∂latentDoseLaw P x‖ ≤ eps^beta * (latentDoseLaw P x).real B := by apply norm_setIntegral_le_of_norm_le_const (measure_lt_top _ _) intro t ht have ha : t+a0 ∈ Icc (0 : ℝ) 1 := by dsimp [B] at ht dsimp [a0]; constructor <;> linarith [ht.1, ht.2] have hh := hholder x (t+a0) ha a0 (by norm_num [a0]) rw [Real.norm_eq_abs] apply hh.trans simp only [add_sub_cancel_right] apply Real.rpow_le_rpow (abs_nonneg _) _ hbeta.le apply abs_le.mpr constructor <;> linarith [ht.1, ht.2] rw [integral_sub hi.integrableOn (integrable_const _), setIntegral_const, smul_eq_mul, Real.norm_eq_abs] at herr rw [latentLocalRatio, latentMeanMeasure_real E P beta kappa hbeta hoverlap hdesign hholder hrange x _ measurableSet_Ioo] simp only [neg_div] change |(∫ t in B, condPotMean E P x (t+a0) ∂latentDoseLaw P x) / (latentDoseLaw P x).real B - condPotMean E P x a0| ≤ eps^beta rw [div_sub' (ne_of_gt hp), abs_div, abs_of_pos hp] apply (div_le_iff₀ hp).mpr simpa only [mul_comm] using herr
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentLocalRatio_error · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:130
theorem latentLocalRatio_tendsto

Positive Holder exponent sends the shrinking-neighborhood ratio to the target mean. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hbeta :
0 < beta
hoverlap :
hdesign :
WeakDesign K.clo K.chi kappa P
hholder :
HolderMean E beta P
hrange :
x :
Proof (Lean source)
-- @node: latentLocalRatio_tendsto lemma latentLocalRatio_tendsto (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (beta kappa : ℝ) (hbeta : 0 < beta) (hoverlap : StratumPositive P) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (hholder : HolderMean E beta P) (hrange : MeanRange E P) (x : Bool) : Tendsto (latentLocalRatio E P x) atTop (𝓝 (condPotMean E P x a0)) := by have heps : Tendsto (fun j : ℕ => 1 / ((j : ℝ)+3)) atTop (𝓝 (0 : ℝ)) := by simpa only [Function.comp_def, Nat.cast_add, Nat.cast_ofNat, add_assoc, show (2 : ℝ)+1 = 3 by norm_num] using (tendsto_one_div_add_atTop_nhds_zero_nat (𝕜 := ℝ)).comp (tendsto_add_atTop_nat 2) have hpow : Tendsto (fun j : ℕ => (1 / ((j : ℝ)+3))^beta) atTop (𝓝 (0 : ℝ)) := by simpa [Real.zero_rpow (ne_of_gt hbeta)] using heps.rpow_const (inr hbeta.le) apply tendsto_iff_norm_sub_tendsto_zero.mpr apply squeeze_zero (fun j => norm_nonneg _) _ hpow intro j simpa only [Real.norm_eq_abs] using latentLocalRatio_error E P beta kappa hbeta hoverlap hdesign hholder hrange x j
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentLocalRatio_tendsto · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:173
theorem latentDoseLaw_volume_absolutelyContinuous

The weak-design lower envelope makes Lebesgue measure dominated by latent dose mass, including when the density vanishes at the single target point. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
kappa :
ℝ
hdesign :
WeakDesign K.clo K.chi kappa P
x :
volume.restrict (Icc (-1/2 : ℝ) (1/2)) ≪ latentDoseLaw P x
Proof (Lean source)
-- @node: latentDoseLaw_volume_absolutelyContinuous lemma latentDoseLaw_volume_absolutelyContinuous (P : Measure (StructSpace S)) (kappa : ℝ) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (x : Bool) : volume.restrict (Icc (-1/2 : ℝ) (1/2)) ≪ latentDoseLaw P x := by obtain ⟨g, hg, hlaw, hbounds⟩ := hdesign rw [latentDoseLaw, hlaw x] apply withDensity_absolutelyContinuous' (hg x).ennreal_ofReal.aemeasurable.restrict have hn : ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), t ≠ (0 : ℝ) := (ae_iff.mpr (by simp)).filter_mono (ae_mono Measure.restrict_le_self) filter_upwards [hbounds x, hn] with t ht hn apply ne_of_gt apply ENNReal.ofReal_pos.mpr exact lt_of_lt_of_le (mul_pos K.clo_pos (Real.rpow_pos_of_pos (abs_pos.mpr hn) _)) ht.1
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentDoseLaw_volume_absolutelyContinuous · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:192
theorem latentMean_ae_eq_of_measures_eq

Equality of the marked and unmarked measures identifies their nonnegative mean densities almost everywhere under the common latent law. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hbeta :
0 < beta
hoverlap :
hoverlap' :
hdesign :
WeakDesign K.clo K.chi kappa P
hdesign' :
WeakDesign K.clo K.chi kappa P'
hholder :
HolderMean E beta P
hholder' :
HolderMean E beta P'
hrange :
hrange' :
x :
hDose :
hMean :
(fun t => condPotMean E P x (t+a0))
=ᵐ[latentDoseLaw P x] (fun t => condPotMean E P' x (t+a0))
Proof (Lean source)
-- @node: latentMean_ae_eq_of_measures_eq lemma latentMean_ae_eq_of_measures_eq (E : PathSpace S) (P P' : Measure (StructSpace S)) [IsProbabilityMeasure P] [IsProbabilityMeasure P'] (beta kappa : ℝ) (hbeta : 0 < beta) (hoverlap : StratumPositive P) (hoverlap' : StratumPositive P') {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (hdesign' : WeakDesign K.clo K.chi kappa P') (hholder : HolderMean E beta P) (hholder' : HolderMean E beta P') (hrange : MeanRange E P) (hrange' : MeanRange E P') (x : Bool) (hDose : latentDoseLaw P x = latentDoseLaw P' x) (hMean : latentMeanMeasure E P x = latentMeanMeasure E P' x) : (fun t => condPotMean E P x (t+a0)) =ᵐ[latentDoseLaw P x] (fun t => condPotMean E P' x (t+a0)) := by letI := latentDoseLaw_probability P hoverlap x have hi := latentMean_integrable E P beta kappa hbeta hoverlap hdesign hholder hrange x have hi' := latentMean_integrable E P' beta kappa hbeta hoverlap' hdesign' hholder' hrange' x rw [← hDose] at hi' have heq : (fun t => ofReal (condPotMean E P x (t+a0))) =ᵐ[latentDoseLaw P x] (fun t => ofReal (condPotMean E P' x (t+a0))) := by apply (withDensity_eq_iff_of_sigmaFinite hi.aestronglyMeasurable.aemeasurable.ennreal_ofReal hi'.aestronglyMeasurable.aemeasurable.ennreal_ofReal).mp simpa only [latentMeanMeasure, ← hDose] using hMean filter_upwards [heq, latentDoseLaw_ae_mem P kappa hdesign x] with t ht hsupport have ha : t+a0 ∈ Icc (0 : ℝ) 1 := by dsimp [a0]; constructor <;> linarith [hsupport.1, hsupport.2] exact (ENNReal.ofReal_eq_ofReal_iff (le_trans (by norm_num) (hrange x _ ha).1) (le_trans (by norm_num) (hrange' x _ ha).1)).mp ht
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentMean_ae_eq_of_measures_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:209
theorem condPotMean_eqOn_of_latent_measures_eq

Dominated Lebesgue mass and Holder continuity extend the identified latent density ratio to every dose, including the design zero and both support endpoints. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hbeta :
0 < beta
hoverlap :
hoverlap' :
hdesign :
WeakDesign K.clo K.chi kappa P
hdesign' :
WeakDesign K.clo K.chi kappa P'
hholder :
HolderMean E beta P
hholder' :
HolderMean E beta P'
hrange :
hrange' :
x :
hDose :
hMean :
EqOn (condPotMean E P x) (condPotMean E P' x) (Icc (0 : ℝ) 1)
Proof (Lean source)
-- @node: condPotMean_eqOn_of_latent_measures_eq lemma condPotMean_eqOn_of_latent_measures_eq (E : PathSpace S) (P P' : Measure (StructSpace S)) [IsProbabilityMeasure P] [IsProbabilityMeasure P'] (beta kappa : ℝ) (hbeta : 0 < beta) (hoverlap : StratumPositive P) (hoverlap' : StratumPositive P') {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (hdesign' : WeakDesign K.clo K.chi kappa P') (hholder : HolderMean E beta P) (hholder' : HolderMean E beta P') (hrange : MeanRange E P) (hrange' : MeanRange E P') (x : Bool) (hDose : latentDoseLaw P x = latentDoseLaw P' x) (hMean : latentMeanMeasure E P x = latentMeanMeasure E P' x) : EqOn (condPotMean E P x) (condPotMean E P' x) (Icc (0 : ℝ) 1) := by have hae := latentMean_ae_eq_of_measures_eq E P P' beta kappa hbeta hoverlap hoverlap' hdesign hdesign' hholder hholder' hrange hrange' x hDose hMean have haeVolume := hae.filter_mono (latentDoseLaw_volume_absolutelyContinuous P kappa hdesign x).ae_le have hshift : MapsTo (fun t : ℝ => t+a0) (Icc (-1/2 : ℝ) (1/2)) (Icc (0 : ℝ) 1) := by intro t ht dsimp [a0]; constructor <;> linarith [ht.1, ht.2] have hc := (condPotMean_continuousOn E beta P hbeta hholder x).comp (show ContinuousOn (fun t : ℝ => t+a0) (Icc (-1/2 : ℝ) (1/2)) by fun_prop) hshift have hc' := (condPotMean_continuousOn E beta P' hbeta hholder' x).comp (show ContinuousOn (fun t : ℝ => t+a0) (Icc (-1/2 : ℝ) (1/2)) by fun_prop) hshift have heq := Measure.eqOn_Icc_of_ae_eq volume (by norm_num : (-1/2 : ℝ) ≠ 1/2) haeVolume hc hc' intro a ha have ht : a-a0 ∈ Icc (-1/2 : ℝ) (1/2) := by dsimp [a0]; constructor <;> linarith [ha.1, ha.2] simpa only [sub_add_cancel] using heq ht
CausalSmith.Stat.NoisydoseWeakdesignTransition.condPotMean_eqOn_of_latent_measures_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:240
theorem stratumLaw_map_obsMap

The observed conditional record law is a normalized restriction of the public law. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
x :
(stratumLaw P x).map (obsMap sigma)
= ((obsLaw sigma P) {o : Obs | o.1 = x})⁻¹ • (obsLaw sigma P).restrict {o : Obs | o.1 = x}
Proof (Lean source)
-- @node: stratumLaw_map_obsMap lemma stratumLaw_map_obsMap (sigma : ℝ) (P : Measure (StructSpace S)) (x : Bool) : (stratumLaw P x).map (obsMap sigma) = ((obsLaw sigma P) {o : Obs | o.1 = x})⁻¹ • (obsLaw sigma P).restrict {o : Obs | o.1 = x} := by have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose fun_prop have hx : MeasurableSet {o : Obs | o.1 = x} := measurableSet_eq_fun (by fun_prop) measurable_const rw [obsLaw, Measure.map_apply hm hx, Measure.restrict_map hm hx, stratumLaw, Measure.map_smul] rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.stratumLaw_map_obsMap · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:271
theorem observedCentered_stratum_eq_of_obsLaw_eq

Observational equivalence identifies the stratum-conditional centered observed dose law. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
P P' :
hobs :
obsLaw sigma P = obsLaw sigma P'
x :
Proof (Lean source)
-- @node: observedCentered_stratum_eq_of_obsLaw_eq lemma observedCentered_stratum_eq_of_obsLaw_eq (sigma : ℝ) (P P' : Measure (StructSpace S)) (hobs : obsLaw sigma P = obsLaw sigma P') (x : Bool) : (stratumLaw P x).map (observedCentered sigma) = (stratumLaw P' x).map (observedCentered sigma) := by have hh : (stratumLaw P x).map (obsMap sigma) = (stratumLaw P' x).map (obsMap sigma) := by rw [stratumLaw_map_obsMap, stratumLaw_map_obsMap, hobs] have hh' := congrArg (Measure.map (fun o : Obs => o.2.1 - a0)) hh rw [Measure.map_map (by fun_prop) (by unfold obsMap contaminatedDose; fun_prop), Measure.map_map (by fun_prop) (by unfold obsMap contaminatedDose; fun_prop)] at hh' exact hh'
CausalSmith.Stat.NoisydoseWeakdesignTransition.observedCentered_stratum_eq_of_obsLaw_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:286
theorem observedCentered_stratum_convolution

The unmarked observed conditional dose measure is latent dose convolved with Gaussian noise. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
hoverlap :
hgauss :
x :
= (latentDoseLaw P x).conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma)))
Proof (Lean source)
-- @node: observedCentered_stratum_convolution lemma observedCentered_stratum_convolution (sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (herr : ErrorIndependence P) (hgauss : GaussianChannel P) (x : Bool) : (stratumLaw P x).map (observedCentered sigma) = (latentDoseLaw P x).conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma))) := by letI := stratumLaw_probability P hoverlap x have hT : Measurable (latentCentered (S := S)) := by unfold latentCentered; fun_prop have hp := congrArg (Measure.map (fun p : ℝ × ℝ => p.2 + sigma*p.1)) (error_centered_product_stratum P hoverlap herr x) rw [Measure.map_map (by fun_prop) (by fun_prop), hgauss] at hp have hscale : (gaussianReal (0 : ℝ) 1).map (fun z => sigma*z) = gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma)) := by simpa using (gaussianReal_map_const_mul (μ := 0) (v := 1) sigma) letI := latentDoseLaw_probability P hoverlap x have hprod := Measure.map_prod_map (gaussianReal (0 : ℝ) 1) ((stratumLaw P x).map latentCentered) (show Measurable (fun z : ℝ => sigma*z) by fun_prop) measurable_id simp only [Measure.map_id] at hprod rw [Measure.conv_comm, Measure.conv, latentDoseLaw, ← hscale, hprod, Measure.map_map (by fun_prop) (by fun_prop)] have hp' : (stratumLaw P x).map (fun w => latentCentered w + sigma*sZ w) = (((gaussianReal (0 : ℝ) 1).prod ((stratumLaw P x).map latentCentered)).map ((fun p : ℝ × ℝ => p.1+p.2) ∘ map (fun z => sigma*z) id)) := by simpa [Function.comp_def, map, add_comm] using hp refine (Measure.map_congr ?_).trans hp' filter_upwards with w dsimp [Function.comp_def, observedCentered, contaminatedDose, latentCentered] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.observedCentered_stratum_convolution · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:301
theorem latentDoseLaw_eq_of_obsLaw_eq

Injective Gaussian convolution identifies the unmarked latent dose law from observations. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma kappa :
ℝ
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hoverlap :
hoverlap' :
hdesign :
WeakDesign K.clo K.chi kappa P
hdesign' :
WeakDesign K.clo K.chi kappa P'
herr' :
hgauss :
hgauss' :
hobs :
obsLaw sigma P = obsLaw sigma P'
x :
Proof (Lean source)
-- @node: latentDoseLaw_eq_of_obsLaw_eq lemma latentDoseLaw_eq_of_obsLaw_eq (sigma kappa : ℝ) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P P' : Measure (StructSpace S)) [IsProbabilityMeasure P] [IsProbabilityMeasure P'] (hoverlap : StratumPositive P) (hoverlap' : StratumPositive P') {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (hdesign' : WeakDesign K.clo K.chi kappa P') (herr : ErrorIndependence P) (herr' : ErrorIndependence P') (hgauss : GaussianChannel P) (hgauss' : GaussianChannel P') (hobs : obsLaw sigma P = obsLaw sigma P') (x : Bool) : latentDoseLaw P x = latentDoseLaw P' x := by letI := latentDoseLaw_probability P hoverlap x letI := latentDoseLaw_probability P' hoverlap' x have hc := observedCentered_stratum_eq_of_obsLaw_eq sigma P P' hobs x rw [observedCentered_stratum_convolution sigma P hoverlap herr hgauss x, observedCentered_stratum_convolution sigma P' hoverlap' herr' hgauss' x] at hc have hsupport : (latentDoseLaw P x) (Icc (-1/2 : ℝ) (1/2))ᶜ = 0 := ae_iff.mp (latentDoseLaw_ae_mem P kappa hdesign x) have hsupport' : (latentDoseLaw P' x) (Icc (-1/2 : ℝ) (1/2))ᶜ = 0 := ae_iff.mp (latentDoseLaw_ae_mem P' kappa hdesign' x) have hi := compact_gaussian_convolution_injective sigma hsigma (latentDoseLaw P x) 0 (latentDoseLaw P' x) 0 hsupport (by simp) hsupport' (by simp) (by simpa using hc) simpa using hi
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentDoseLaw_eq_of_obsLaw_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LatentIdentification.lean:333
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.LowerAssembly 10 declarations Target separation (16), (22) and observed-product distance assembly (49)--(51).

Target separation (16), (22) and observed-product distance assembly (49)--(51).

theorem lowerWitness_causalTarget

The independent uniform threshold rank makes the causal target exactly the profile at the public dose. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
causalTarget E (lowerWitnessLaw E kappa mu) = (mu (projIcc 0 1 zero_le_one a0) : ℝ)
Proof (Lean source)
-- @node: lowerWitness_causalTarget lemma lowerWitness_causalTarget (E : PathSpace S) (kappa : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (mu : ThresholdProfile) : causalTarget E (lowerWitnessLaw E kappa mu) = (mu (projIcc 0 1 zero_le_one a0) : ℝ) := by let := lowerWitnessLaw_probability E kappa hk mu rw [causalTarget_eq_stratum_sum E _ (lowerWitness_stratumPositive E kappa hk.1 mu) (lowerWitness_boundedPotentialOutcomes E kappa mu)] simp_rw [lowerWitness_condPotMean E kappa hk.1 mu _ a0 (by norm_num [a0])] have hm (x : Bool) : strataProb (lowerWitnessLaw E kappa mu) x = 1/2 := by rw [strataProb, measureReal_def, lowerWitness_stratum_mass E kappa hk.1 mu x] norm_num simp_rw [hm] simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_causalTarget · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerAssembly.lean:15
theorem lower_profile_target_difference

Symmetric profiles have causal-target difference twice the perturbation at zero, on the fixed public path space. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
muPlus muMinus :
delta :
ℝ → ℝ
hformula :
∀ a : Dose,
(muPlus a : ℝ) = 1/2 + delta ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - delta ((a : ℝ)-a0)
causalTarget E (lowerWitnessLaw E kappa muPlus)
- causalTarget E (lowerWitnessLaw E kappa muMinus)
= 2*delta 0
Proof (Lean source)
-- @node: lower_profile_target_difference lemma lower_profile_target_difference (E : PathSpace S) (kappa : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (muPlus muMinus : ThresholdProfile) (delta : ℝ → ℝ) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + delta ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - delta ((a : ℝ)-a0)) : causalTarget E (lowerWitnessLaw E kappa muPlus) - causalTarget E (lowerWitnessLaw E kappa muMinus) = 2*delta 0 := by rw [lowerWitness_causalTarget E kappa hk muPlus, lowerWitness_causalTarget E kappa hk muMinus] have ha : a0 ∈ Icc (0 : ℝ) 1 := by norm_num [a0] have hf := hformula (projIcc 0 1 zero_le_one a0) rw [Set.projIcc_of_mem zero_le_one ha, sub_self] at hf rw [Set.projIcc_of_mem zero_le_one ha, hf.1, hf.2] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_profile_target_difference · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerAssembly.lean:31
theorem direct_profile_target_separation

Equation (16) is the exact absolute separation of the direct threshold witnesses. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa epsilon h :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
he :
0 ≤ epsilon
hh :
0 < h
muPlus muMinus :
hformula :
∀ a : Dose,
(muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∧
(muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0)
|causalTarget E (lowerWitnessLaw E kappa muPlus)
- causalTarget E (lowerWitnessLaw E kappa muMinus)|
= 2*epsilon*h^beta
Proof (Lean source)
-- @node: direct_profile_target_separation lemma direct_profile_target_separation (E : PathSpace S) (beta kappa epsilon h : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (he : 0 ≤ epsilon) (hh : 0 < h) (muPlus muMinus : ThresholdProfile) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0)) : |causalTarget E (lowerWitnessLaw E kappa muPlus) - causalTarget E (lowerWitnessLaw E kappa muMinus)| = 2*epsilon*h^beta := by rw [lower_profile_target_difference E kappa hk muPlus muMinus _ hformula, directPerturbation_zero beta epsilon h hh, abs_of_nonneg (by positivity)] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_profile_target_separation · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerAssembly.lean:47
theorem inverse_profile_target_separation

Equation (22) uses the same normalized packet as the moment cancellations. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa epsilon h ell C c :
ℝ
m :
ℕ
hk :
kappa ∈ Icc (0 : ℝ) 2
hp :
PacketBounds kappa C c m
he :
0 ≤ epsilon
hh :
0 ≤ h
muPlus muMinus :
hformula :
∀ a : Dose,
(muPlus a : ℝ) = 1/2 + epsilon*h^beta*packetPsi kappa m (((a : ℝ)-a0)/ell) ∧
(muMinus a : ℝ) = 1/2 - epsilon*h^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)
|causalTarget E (lowerWitnessLaw E kappa muPlus)
- causalTarget E (lowerWitnessLaw E kappa muMinus)|
= 2*epsilon*h^beta
Proof (Lean source)
-- @node: inverse_profile_target_separation lemma inverse_profile_target_separation (E : PathSpace S) (beta kappa epsilon h ell C c : ℝ) (m : ℕ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hp : PacketBounds kappa C c m) (he : 0 ≤ epsilon) (hh : 0 ≤ h) (muPlus muMinus : ThresholdProfile) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + epsilon*h^beta*packetPsi kappa m (((a : ℝ)-a0)/ell) ∧ (muMinus a : ℝ) = 1/2 - epsilon*h^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)) : |causalTarget E (lowerWitnessLaw E kappa muPlus) - causalTarget E (lowerWitnessLaw E kappa muMinus)| = 2*epsilon*h^beta := by rw [lower_profile_target_difference E kappa hk muPlus muMinus (fun t => epsilon*h^beta*packetPsi kappa m (t/ell)) hformula] rw [zero_div, hp.2.2.2.2.1, mul_one, abs_of_nonneg (by positivity)] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverse_profile_target_separation · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerAssembly.lean:61
theorem direct_profile_frontier_separation

The direct frontier branch agrees exactly with the separation amplitude. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa epsilon sigma :
ℝ
n :
ℕ
hk :
kappa ∈ Icc (0 : ℝ) 2
he :
0 ≤ epsilon
hh :
0 < directScale beta kappa n
hs :
sigma ≤ directScale beta kappa n
muPlus muMinus :
hformula :
∀ a : Dose,
(muPlus a : ℝ)
= 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧
(muMinus a : ℝ)
= 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0)
|causalTarget E (lowerWitnessLaw E kappa muPlus)
- causalTarget E (lowerWitnessLaw E kappa muMinus)|
= (2*epsilon)*frontierRate beta kappa sigma n
Proof (Lean source)
-- @node: direct_profile_frontier_separation lemma direct_profile_frontier_separation (E : PathSpace S) (beta kappa epsilon sigma : ℝ) (n : ℕ) (hk : kappa ∈ Icc (0 : ℝ) 2) (he : 0 ≤ epsilon) (hh : 0 < directScale beta kappa n) (hs : sigma ≤ directScale beta kappa n) (muPlus muMinus : ThresholdProfile) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0)) : |causalTarget E (lowerWitnessLaw E kappa muPlus) - causalTarget E (lowerWitnessLaw E kappa muMinus)| = (2*epsilon)*frontierRate beta kappa sigma n := by rw [direct_profile_target_separation E beta kappa epsilon _ hk he hh muPlus muMinus hformula] simp only [frontierRate, frontierScale, if_pos hs]
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_profile_frontier_separation · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerAssembly.lean:76
theorem lower_iid_tv_le_half_sqrt_exp Lemma lower_iid_tv_le_half_sqrt_exp in the paper ↗

Tensorization (49), the exponential bound, and Cauchy--Schwarz (50) convert a single-record budget to product TV. Under the stated conditions. This is the stated conclusion.

Formal statement
Ω :
hac :
Q ≪ Qstar
hi :
Integrable (fun x => ((Q.rnDeriv Qstar x).toReal - 1) ^ 2) Qstar
n :
ℕ
budget :
ℝ
hbudget :
(n : ℝ) * chiSqDiv Q Qstar ≤ budget
tvDist (Measure.pi (fun _ : Fin n => Q)) (Measure.pi (fun _ : Fin n => Qstar))
≤ (1/2)*sqrt (exp budget - 1)
Proof (Lean source)
-- @node: lower_iid_tv_le_half_sqrt_exp lemma lower_iid_tv_le_half_sqrt_exp {Ω : Type*} [MeasurableSpace Ω] (Q Qstar : Measure Ω) [IsProbabilityMeasure Q] [IsProbabilityMeasure Qstar] (hac : Q ≪ Qstar) (hi : Integrable (fun x => ((Q.rnDeriv Qstar x).toReal - 1) ^ 2) Qstar) (n : ℕ) (budget : ℝ) (hbudget : (n : ℝ) * chiSqDiv Q Qstar ≤ budget) : tvDist (Measure.pi (fun _ : Fin n => Q)) (Measure.pi (fun _ : Fin n => Qstar)) ≤ (1/2)*sqrt (exp budget - 1) := by have hp := Causalean.Stat.one_add_chiSqDiv_pi_iid_general Q Qstar hac hi n have hnonneg : 0 ≤ chiSqDiv Q Qstar := Causalean.Stat.chiSqDiv_nonneg have hexp : (1 + chiSqDiv Q Qstar)^n ≤ exp budget := by calc _ ≤ (exp (chiSqDiv Q Qstar))^n := pow_le_pow_left₀ (by linarith) (by linarith [Real.add_one_le_exp (chiSqDiv Q Qstar)]) n _ = exp ((n : ℝ) * chiSqDiv Q Qstar) := by rw [Real.exp_nat_mul] _ ≤ _ := Real.exp_le_exp.mpr hbudget have hchi : chiSqDiv (Measure.pi (fun _ : Fin n => Q)) (Measure.pi (fun _ : Fin n => Qstar)) ≤ exp budget - 1 := by linarith exact (tvDist_le_half_sqrt_chiSqDiv _ _ (pi_iid_absolutelyContinuous Q Qstar hac n) (pi_iid_integrable_sq_dev Q Qstar hac hi n)).trans (mul_le_mul_of_nonneg_left (Real.sqrt_le_sqrt hchi) (by norm_num))
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_iid_tv_le_half_sqrt_exp · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerAssembly.lean:91

A common reference and the logarithmic budget log(1+τ²) give the paper's pairwise product-TV bound (51) at level τ. Under the stated conditions. This is the stated conclusion.

Formal statement
Ω :
Qplus Qminus Qstar :
hp :
Qplus ≪ Qstar
hm :
Qminus ≪ Qstar
hip :
Integrable (fun x => ((Qplus.rnDeriv Qstar x).toReal - 1) ^ 2) Qstar
him :
Integrable (fun x => ((Qminus.rnDeriv Qstar x).toReal - 1) ^ 2) Qstar
n :
ℕ
tau :
ℝ
htau :
0 ≤ tau
hbp :
(n : ℝ) * chiSqDiv Qplus Qstar ≤ log (1 + tau^2)
hbm :
(n : ℝ) * chiSqDiv Qminus Qstar ≤ log (1 + tau^2)
tvDist (Measure.pi (fun _ : Fin n => Qplus)) (Measure.pi (fun _ : Fin n => Qminus))
≤ tau
Proof (Lean source)
-- @node: lower_pair_iid_tv_le lemma lower_pair_iid_tv_le {Ω : Type*} [MeasurableSpace Ω] (Qplus Qminus Qstar : Measure Ω) [IsProbabilityMeasure Qplus] [IsProbabilityMeasure Qminus] [IsProbabilityMeasure Qstar] (hp : Qplus ≪ Qstar) (hm : Qminus ≪ Qstar) (hip : Integrable (fun x => ((Qplus.rnDeriv Qstar x).toReal - 1) ^ 2) Qstar) (him : Integrable (fun x => ((Qminus.rnDeriv Qstar x).toReal - 1) ^ 2) Qstar) (n : ℕ) (tau : ℝ) (htau : 0 ≤ tau) (hbp : (n : ℝ) * chiSqDiv Qplus Qstar ≤ log (1 + tau^2)) (hbm : (n : ℝ) * chiSqDiv Qminus Qstar ≤ log (1 + tau^2)) : tvDist (Measure.pi (fun _ : Fin n => Qplus)) (Measure.pi (fun _ : Fin n => Qminus)) ≤ tau := by have hsqrt : sqrt (exp (log (1 + tau^2)) - 1) = tau := by rw [Real.exp_log (by positivity), add_sub_cancel_left] exact Real.sqrt_sq htau have hplus := lower_iid_tv_le_half_sqrt_exp Qplus Qstar hp hip n _ hbp have hminus := lower_iid_tv_le_half_sqrt_exp Qminus Qstar hm him n _ hbm rw [hsqrt] at hplus hminus unfold tvDist apply ciSup_le intro A calc _ ≤ |(Measure.pi (fun _ : Fin n => Qplus)).real A.1 - (Measure.pi (fun _ : Fin n => Qstar)).real A.1| + |(Measure.pi (fun _ : Fin n => Qstar)).real A.1 - (Measure.pi (fun _ : Fin n => Qminus)).real A.1| := abs_sub_le _ _ _ _ ≤ tvDist (Measure.pi (fun _ : Fin n => Qplus)) (Measure.pi (fun _ : Fin n => Qstar)) + tvDist (Measure.pi (fun _ : Fin n => Qminus)) (Measure.pi (fun _ : Fin n => Qstar)) := by rw [abs_sub_comm ((Measure.pi (fun _ : Fin n => Qstar)).real A.1)] exact add_le_add (abs_measureReal_sub_le_tvDist A.2) (abs_measureReal_sub_le_tvDist A.2) _ ≤ tau := by linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_pair_iid_tv_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerAssembly.lean:118
theorem lower_observed_experiment_tv_le

Applied to actual observed marginals, the common-reference budget log(1+τ²) controls the declared experiment's total variation by τ at every noise scale, including zero. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
muPlus muMinus :
n :
ℕ
tau :
ℝ
htau :
0 ≤ tau
hp :
obsLaw sigma (lowerWitnessLaw E kappa muPlus) ≪ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)
hm :
obsLaw sigma (lowerWitnessLaw E kappa muMinus) ≪ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)
hip :
Integrable (fun o => (((obsLaw sigma (lowerWitnessLaw E kappa muPlus)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal - 1) ^ 2) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
him :
Integrable (fun o => (((obsLaw sigma (lowerWitnessLaw E kappa muMinus)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal - 1) ^ 2) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
hbp :
(n : ℝ) * chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ log (1 + tau^2)
hbm :
(n : ℝ) * chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ log (1 + tau^2)
tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus))
≤ tau
Proof (Lean source)
-- @node: lower_observed_experiment_tv_le lemma lower_observed_experiment_tv_le (E : PathSpace S) (kappa sigma : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (muPlus muMinus : ThresholdProfile) (n : ℕ) (tau : ℝ) (htau : 0 ≤ tau) (hp : obsLaw sigma (lowerWitnessLaw E kappa muPlus) ≪ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) (hm : obsLaw sigma (lowerWitnessLaw E kappa muMinus) ≪ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) (hip : Integrable (fun o => (((obsLaw sigma (lowerWitnessLaw E kappa muPlus)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal - 1) ^ 2) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))) (him : Integrable (fun o => (((obsLaw sigma (lowerWitnessLaw E kappa muMinus)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal - 1) ^ 2) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))) (hbp : (n : ℝ) * chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ log (1 + tau^2)) (hbm : (n : ℝ) * chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ log (1 + tau^2)) : tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus)) ≤ tau := by have hobs : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose fun_prop have hprob (mu : ThresholdProfile) : IsProbabilityMeasure (obsLaw sigma (lowerWitnessLaw E kappa mu)) := by let := lowerWitnessLaw_probability E kappa hk mu exact Measure.isProbabilityMeasure_map hobs.aemeasurable let := hprob muPlus let := hprob muMinus let := hprob referenceProfile exact lower_pair_iid_tv_le _ _ _ hp hm hip him n tau htau hbp hbm
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_observed_experiment_tv_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerAssembly.lean:154
theorem lower_pair_iid_tv_le_one_fifth

Two laws absolutely continuous with respect to a common reference, with square-integrable likelihood-ratio deviations and chi-square divergences from it, times the sample size, at most log(26/25), have n-fold product laws within total variation one fifth of each other; this is the paper's pairwise bound (51), the level-one-fifth instance of the general product-TV bound.

Formal statement
Ω :
Qplus Qminus Qstar :
hp :
Qplus ≪ Qstar
hm :
Qminus ≪ Qstar
hip :
Integrable (fun x => ((Qplus.rnDeriv Qstar x).toReal - 1) ^ 2) Qstar
him :
Integrable (fun x => ((Qminus.rnDeriv Qstar x).toReal - 1) ^ 2) Qstar
n :
ℕ
hbp :
(n : ℝ) * chiSqDiv Qplus Qstar ≤ log (26 / 25)
hbm :
(n : ℝ) * chiSqDiv Qminus Qstar ≤ log (26 / 25)
tvDist (Measure.pi (fun _ : Fin n => Qplus)) (Measure.pi (fun _ : Fin n => Qminus))
≤ 1/5
Proof (Lean source)
-- @node: lower_pair_iid_tv_le_one_fifth lemma lower_pair_iid_tv_le_one_fifth {Ω : Type*} [MeasurableSpace Ω] (Qplus Qminus Qstar : Measure Ω) [IsProbabilityMeasure Qplus] [IsProbabilityMeasure Qminus] [IsProbabilityMeasure Qstar] (hp : Qplus ≪ Qstar) (hm : Qminus ≪ Qstar) (hip : Integrable (fun x => ((Qplus.rnDeriv Qstar x).toReal - 1) ^ 2) Qstar) (him : Integrable (fun x => ((Qminus.rnDeriv Qstar x).toReal - 1) ^ 2) Qstar) (n : ℕ) (hbp : (n : ℝ) * chiSqDiv Qplus Qstar ≤ log (26 / 25)) (hbm : (n : ℝ) * chiSqDiv Qminus Qstar ≤ log (26 / 25)) : tvDist (Measure.pi (fun _ : Fin n => Qplus)) (Measure.pi (fun _ : Fin n => Qminus)) ≤ 1/5 := by have h : log (26 / 25) = log (1 + (1/5 : ℝ)^2) := by norm_num rw [h] at hbp hbm exact lower_pair_iid_tv_le Qplus Qminus Qstar hp hm hip him n (1/5) (by norm_num) hbp hbm
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_pair_iid_tv_le_one_fifth · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerAssembly.lean:191
theorem lower_observed_experiment_tv_le_one_fifth

For a design exponent between zero and two, when the observed witness marginals are absolutely continuous with respect to the reference witness marginal, with square-integrable likelihood-ratio deviations and chi-square divergences, times the sample size, at most log(26/25), the two declared observed experiments are within total variation one fifth at every noise scale, including zero; this is the level-one-fifth instance of the general observed-experiment bound.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
muPlus muMinus :
n :
ℕ
hp :
obsLaw sigma (lowerWitnessLaw E kappa muPlus) ≪ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)
hm :
obsLaw sigma (lowerWitnessLaw E kappa muMinus) ≪ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)
hip :
Integrable (fun o => (((obsLaw sigma (lowerWitnessLaw E kappa muPlus)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal - 1) ^ 2) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
him :
Integrable (fun o => (((obsLaw sigma (lowerWitnessLaw E kappa muMinus)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal - 1) ^ 2) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
hbp :
(n : ℝ) * chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ log (26 / 25)
hbm :
(n : ℝ) * chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ log (26 / 25)
tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus))
≤ 1/5
Proof (Lean source)
-- @node: lower_observed_experiment_tv_le_one_fifth lemma lower_observed_experiment_tv_le_one_fifth (E : PathSpace S) (kappa sigma : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (muPlus muMinus : ThresholdProfile) (n : ℕ) (hp : obsLaw sigma (lowerWitnessLaw E kappa muPlus) ≪ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) (hm : obsLaw sigma (lowerWitnessLaw E kappa muMinus) ≪ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) (hip : Integrable (fun o => (((obsLaw sigma (lowerWitnessLaw E kappa muPlus)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal - 1) ^ 2) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))) (him : Integrable (fun o => (((obsLaw sigma (lowerWitnessLaw E kappa muMinus)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal - 1) ^ 2) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))) (hbp : (n : ℝ) * chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ log (26 / 25)) (hbm : (n : ℝ) * chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ log (26 / 25)) : tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus)) ≤ 1/5 := by have h : log (26 / 25) = log (1 + (1/5 : ℝ)^2) := by norm_num rw [h] at hbp hbm exact lower_observed_experiment_tv_le E kappa sigma hk muPlus muMinus n (1/5) (by norm_num) hp hm hip him hbp hbm
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_observed_experiment_tv_le_one_fifth · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerAssembly.lean:208
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.LowerCompactTuning 9 declarations Compact-support degree, bandwidth and cancellation estimates (38)--(45).

Compact-support degree, bandwidth and cancellation estimates (38)--(45).

theorem lower_compact_log_bounds Lemma lower_compact_log_bounds in the paper ↗

The compact logarithm satisfies both deterministic comparisons in (38). Under the stated conditions. This is the stated conclusion.

Formal statement
tau :
ℝ
ht :
1 ≤ tau
conclusion 1
log (exp 1+tau) ≤ 2*sqrt tau
conclusion 2
log (exp 1+tau) ≤ log tau+log (exp 1+1)
Proof (Lean source)
-- @node: lower_compact_log_bounds lemma lower_compact_log_bounds (tau : ℝ) (ht : 1 ≤ tau) : log (exp 1+tau) ≤ 2*sqrt tau ∧ log (exp 1+tau) ≤ log tau+log (exp 1+1) := by have ht0 : 0 < tau := by linarith have he : 0 < exp 1 := Real.exp_pos 1 have hproduct : exp 1+tau ≤ (exp 1+1)*tau := by nlinarith have hlog := Real.log_le_log (by positivity : 0 < exp 1+tau) hproduct rw [Real.log_mul (by positivity) ht0.ne'] at hlog have he2 : 2 < exp 1 := by have := Real.add_one_lt_exp (by norm_num : (1 : ℝ) ≠ 0) linarith have hbase : log (exp 1+1) ≤ 2 := by have hexp : exp 1+1 ≤ exp 2 := by rw [show (2 : ℝ) = 1+1 by norm_num, Real.exp_add] nlinarith have := Real.log_le_log (by positivity : 0 < exp 1+1) hexp simpa using this have hs := Real.log_le_sub_one_of_pos (Real.sqrt_pos.2 ht0) rw [Real.log_sqrt ht0.le] at hs exact ⟨by linarith, by linarith⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_log_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerCompactTuning.lean:11
theorem lower_compact_degree_bounds Lemma lower_compact_degree_bounds in the paper ↗

The ceiling in (37) preserves the two-sided degree estimate (40). Under the stated conditions. This is the stated conclusion.

Formal statement
CM L B :
ℝ
hCM :
1 ≤ CM
hB :
0 < B
hsize :
1 ≤ L/B
conclusion 1
CM*L/B ≤ (ceil (CM*L/B) : ℝ)
conclusion 2
(ceil (CM*L/B) : ℝ) ≤ 2*CM*L/B
conclusion 3
1 ≤ ceil (CM*L/B)
Proof (Lean source)
-- @node: lower_compact_degree_bounds lemma lower_compact_degree_bounds (CM L B : ℝ) (hCM : 1 ≤ CM) (hB : 0 < B) (hsize : 1 ≤ L/B) : CM*L/B ≤ (ceil (CM*L/B) : ℝ) ∧ (ceil (CM*L/B) : ℝ) ≤ 2*CM*L/B ∧ 1 ≤ ceil (CM*L/B) := by have hx : 1 ≤ CM*L/B := by rw [mul_div_assoc] exact one_le_mul_of_one_le_of_one_le hCM hsize have hlo := Nat.le_ceil (CM*L/B) have hhi := Nat.ceil_lt_add_one (show 0 ≤ CM*L/B by linarith) refine ⟨hlo, ?_, ?_⟩ · calc _ ≤ CM*L/B+1 := hhi.le _ ≤ 2*CM*L/B := by rw [show 2*CM*L/B = 2*(CM*L/B) by ring] linarith · exact_mod_cast (hx.trans hlo)
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_degree_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerCompactTuning.lean:34
theorem lower_compact_bandwidth_comparison Lemma lower_compact_bandwidth_comparison in the paper ↗

The rounded compact degree retains the fraction of the frontier in (47). Under the stated conditions. This is the stated conclusion.

Formal statement
ell CM L B :
ℝ
hell :
0 ≤ ell
hCM :
1 ≤ CM
hB :
0 < B
hsize :
1 ≤ L/B
(ell/(2*CM))*(B/L) ≤ ell/(ceil (CM*L/B) : ℝ)
Proof (Lean source)
-- @node: lower_compact_bandwidth_comparison lemma lower_compact_bandwidth_comparison (ell CM L B : ℝ) (hell : 0 ≤ ell) (hCM : 1 ≤ CM) (hB : 0 < B) (hsize : 1 ≤ L/B) : (ell/(2*CM))*(B/L) ≤ ell/(ceil (CM*L/B) : ℝ) := by obtain ⟨hlo, hhi, hm⟩ := lower_compact_degree_bounds CM L B hCM hB hsize have hL : 0 < L := by have : 0 < L/B := by linarith have := (lt_div_iff₀ hB).mp this simpa using this have hmR : (0 : ℝ) < ceil (CM*L/B) := by exact_mod_cast (show 0 < ceil (CM*L/B) by omega) calc _ = ell/(2*CM*L/B) := by field_simp _ ≤ _ := div_le_div_of_nonneg_left hell hmR hhi
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_bandwidth_comparison · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerCompactTuning.lean:54
theorem lower_compact_log_ratio Lemma lower_compact_log_ratio in the paper ↗

Equation (44) follows from (38) and the explicit ratio lower bound (43). Under the stated conditions. This is the stated conclusion.

Formal statement
tau D R :
ℝ
ht :
1 ≤ tau
hD :
2*exp 1 ≤ D
hR :
D*tau/log (exp 1+tau) ≤ R
log (exp 1+tau)/2 ≤ log R
Proof (Lean source)
-- @node: lower_compact_log_ratio lemma lower_compact_log_ratio (tau D R : ℝ) (ht : 1 ≤ tau) (hD : 2*exp 1 ≤ D) (hR : D*tau/log (exp 1+tau) ≤ R) : log (exp 1+tau)/2 ≤ log R := by have ht0 : 0 < tau := by linarith have hB : 0 < log (exp 1+tau) := Real.log_pos (by linarith [Real.exp_pos 1]) obtain ⟨hroot, hlog⟩ := lower_compact_log_bounds tau ht have hs0 := Real.sqrt_pos.2 ht0 have hs2 := Real.sq_sqrt ht0.le have he := Real.exp_pos 1 have hratio : exp 1*sqrt tau ≤ D*tau/log (exp 1+tau) := by apply (le_div_iff₀ hB).2 have hmul := mul_le_mul_of_nonneg_left hroot (show 0 ≤ exp 1*sqrt tau by positivity) have hd := mul_le_mul_of_nonneg_right hD ht0.le nlinarith have hR0 : 0 < R := (mul_pos he hs0).trans_le (hratio.trans hR) have hmono := Real.log_le_log (mul_pos he hs0) (hratio.trans hR) rw [Real.log_mul he.ne' hs0.ne', Real.log_exp, Real.log_sqrt ht0.le] at hmono have hbase : log (exp 1+1) ≤ 2 := by simpa using (lower_compact_log_bounds 1 le_rfl).1 linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_log_ratio · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerCompactTuning.lean:70
theorem lower_compact_cancellation_decay Lemma lower_compact_cancellation_decay in the paper ↗

Equations (40)--(45) force the compact cancellation exponent to exceed four log-scales. Under the stated conditions. This is the stated conclusion.

Formal statement
ell gamma CM L tau :
ℝ
m J :
ℕ
hell :
0 < ell
hg :
0 < gamma
hCM :
1 ≤ CM
hL :
0 < L
ht :
1 ≤ tau
hsize :
1 ≤ L/log (exp 1+tau)
hm :
m = ceil (CM*L/log (exp 1+tau))
hJ :
gamma*m ≤ (J : ℝ)
hD :
2*exp 1 ≤ gamma*CM/(exp 1*ell^2)
hCMlarge :
8 ≤ gamma*CM
4*L ≤ (J : ℝ)*log ((J : ℝ)/(exp 1*(ell^2*L/tau)))
Proof (Lean source)
-- @node: lower_compact_cancellation_decay lemma lower_compact_cancellation_decay (ell gamma CM L tau : ℝ) (m J : ℕ) (hell : 0 < ell) (hg : 0 < gamma) (hCM : 1 ≤ CM) (hL : 0 < L) (ht : 1 ≤ tau) (hsize : 1 ≤ L/log (exp 1+tau)) (hm : m = ceil (CM*L/log (exp 1+tau))) (hJ : gamma*m ≤ (J : ℝ)) (hD : 2*exp 1 ≤ gamma*CM/(exp 1*ell^2)) (hCMlarge : 8 ≤ gamma*CM) : 4*L ≤ (J : ℝ)*log ((J : ℝ)/(exp 1*(ell^2*L/tau))) := by let B := log (exp 1+tau) have hB : 0 < B := Real.log_pos (by linarith [Real.exp_pos 1]) have ht0 : 0 < tau := by linarith have hmlo : CM*L/B ≤ (m : ℝ) := by rw [hm] exact (lower_compact_degree_bounds CM L B hCM hB hsize).1 have hJlo : gamma*CM*L/B ≤ (J : ℝ) := by have := mul_le_mul_of_nonneg_left hmlo hg.le calc _ = gamma*(CM*L/B) := by ring _ ≤ gamma*m := this _ ≤ _ := hJ have hden : 0 < exp 1*(ell^2*L/tau) := by positivity have hratio : (gamma*CM/(exp 1*ell^2))*tau/B ≤ (J : ℝ)/(exp 1*(ell^2*L/tau)) := by apply (le_div_iff₀ hden).2 calc _ = gamma*CM*L/B := by field_simp _ ≤ _ := hJlo have hlog := lower_compact_log_ratio tau _ _ ht hD hratio have hJ0 : 0 ≤ (J : ℝ) := Nat.cast_nonneg J calc 4*L ≤ gamma*CM*L/2 := by nlinarith _ = (gamma*CM*L/B)*(B/2) := by field_simp _ ≤ (J : ℝ)*(B/2) := mul_le_mul_of_nonneg_right hJlo (by positivity) _ ≤ _ := mul_le_mul_of_nonneg_left hlog hJ0
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_cancellation_decay · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerCompactTuning.lean:95
theorem lower_compact_order_decay Lemma lower_compact_order_decay in the paper ↗

Equations (43)--(45) follow uniformly from the compact degree lower bound and (41). Under the stated conditions. This is the stated conclusion.

Formal statement
tau L gamma CM ell :
ℝ
J :
ℕ
ht :
1 ≤ tau
hL :
0 < L
hg :
0 < gamma
hell :
0 < ell
hCM :
0 < CM
hlarge :
2*exp 1 ≤ gamma*CM/(exp 1*ell^2)
hbudget :
8 ≤ gamma*CM
horder :
gamma*CM*L/log (exp 1+tau) ≤ (J : ℝ)
conclusion 1
0 < J
conclusion 2
2*(ell^2*L/tau) ≤ (J : ℝ)
conclusion 3
4*L ≤ (J : ℝ)*log ((J : ℝ)/(exp 1*(ell^2*L/tau)))
Proof (Lean source)
-- @node: lower_compact_order_decay lemma lower_compact_order_decay (tau L gamma CM ell : ℝ) (J : ℕ) (ht : 1 ≤ tau) (hL : 0 < L) (hg : 0 < gamma) (hell : 0 < ell) (hCM : 0 < CM) (hlarge : 2*exp 1 ≤ gamma*CM/(exp 1*ell^2)) (hbudget : 8 ≤ gamma*CM) (horder : gamma*CM*L/log (exp 1+tau) ≤ (J : ℝ)) : 0 < J ∧ 2*(ell^2*L/tau) ≤ (J : ℝ) ∧ 4*L ≤ (J : ℝ)*log ((J : ℝ)/(exp 1*(ell^2*L/tau))) := by let B := log (exp 1+tau) have ht0 : 0 < tau := by linarith have he : 2 ≤ exp 1 := by linarith [Real.add_one_le_exp (1 : ℝ)] have hB : 0 < B := Real.log_pos (by linarith) have hJ : (0 : ℝ) < J := (div_pos (by positivity) hB).trans_le horder have hroot : 1 ≤ sqrt tau := by have := Real.sqrt_le_sqrt ht simpa using this obtain ⟨hBsqrt, hBlog⟩ := lower_compact_log_bounds tau ht have hbase : log (exp 1+1) ≤ 2 := by simpa using (lower_compact_log_bounds 1 le_rfl).1 have hratio : exp 1*sqrt tau ≤ (J : ℝ)/(exp 1*(ell^2*L/tau)) := by apply (le_div_iff₀ (by positivity : 0 < exp 1*(ell^2*L/tau))).2 apply le_trans _ horder apply (le_div_iff₀ hB).2 have h2 := (le_div_iff₀ (show 0 < exp 1*ell^2 by positivity)).mp hlarge calc _ ≤ (exp 1*sqrt tau*(exp 1*(ell^2*L/tau)))*(2*sqrt tau) := mul_le_mul_of_nonneg_left hBsqrt (by positivity) _ = (2*exp 1*(exp 1*ell^2))*L := by field_simp nlinarith [Real.sq_sqrt ht0.le] _ ≤ gamma*CM*L := mul_le_mul_of_nonneg_right h2 hL.le have hratio2 : 2 ≤ (J : ℝ)/(exp 1*(ell^2*L/tau)) := by have := mul_le_mul_of_nonneg_left hroot (Real.exp_pos (1 : ℝ)).le linarith have hcut := (le_div_iff₀ (show 0 < exp 1*(ell^2*L/tau) by positivity)).mp hratio2 have hlog : B/2 ≤ log ((J : ℝ)/(exp 1*(ell^2*L/tau))) := by have hl := Real.log_le_log (show 0 < exp 1*sqrt tau by positivity) hratio rw [Real.log_mul (by positivity) (by positivity), Real.log_exp, Real.log_sqrt ht0.le] at hl dsimp [B] linarith have hprod := mul_le_mul horder hlog (by positivity : 0 ≤ B/2) hJ.le have hid : (gamma*CM*L/B)*(B/2) = gamma*CM*L/2 := by field_simp rw [hid] at hprod refine ⟨by exact_mod_cast hJ, ?_, ?_⟩ · have := mul_le_mul_of_nonneg_right he (show 0 ≤ ell^2*L/tau by positivity) nlinarith · have := mul_le_mul_of_nonneg_right hbudget hL.le linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_order_decay · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerCompactTuning.lean:133
theorem lower_compact_scale_lower_bound Lemma lower_compact_scale_lower_bound in the paper ↗

In the public compact regime, (38) gives a degree scale at least twice the square root of L. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma L :
ℝ
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
hL :
1 ≤ L
ht :
1 ≤ sigma^2*L
conclusion 1
0 < log (exp 1+sigma^2*L)
conclusion 2
2*sqrt L ≤ L/log (exp 1+sigma^2*L)
Proof (Lean source)
-- @node: lower_compact_scale_lower_bound lemma lower_compact_scale_lower_bound (sigma L : ℝ) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (hL : 1 ≤ L) (ht : 1 ≤ sigma^2*L) : 0 < log (exp 1+sigma^2*L) ∧ 2*sqrt L ≤ L/log (exp 1+sigma^2*L) := by have hL0 : 0 < L := by linarith have he : 2 ≤ exp 1 := by linarith [Real.add_one_le_exp (1 : ℝ)] have hB : 0 < log (exp 1+sigma^2*L) := Real.log_pos (by linarith) have hroot : sqrt (sigma^2*L) ≤ sqrt L/4 := by apply (Real.sqrt_le_iff).2 refine ⟨by positivity, ?_⟩ have hsquare : sigma^2 ≤ 1/16 := by nlinarith [hs.1, hs.2] have := mul_le_mul_of_nonneg_right hsquare hL0.le nlinarith [Real.sq_sqrt hL0.le] have hBroot : log (exp 1+sigma^2*L) ≤ sqrt L/2 := by have := (lower_compact_log_bounds (sigma^2*L) ht).1 linarith refine ⟨hB, (le_div_iff₀ hB).2 ?_⟩ have := mul_le_mul_of_nonneg_left hBroot (show 0 ≤ 2*sqrt L by positivity) nlinarith [Real.sq_sqrt hL0.le]
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_scale_lower_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerCompactTuning.lean:185
theorem lower_compact_degree_radius_bounds Lemma lower_compact_degree_radius_bounds in the paper ↗

Equations (39)--(42): a single lower bound on L ensures any fixed degree threshold, and the compact bandwidth is positive and below the noise scale. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma L CM ell M :
ℝ
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
hL :
1 ≤ L
ht :
1 ≤ sigma^2*L
hCM :
1 ≤ CM
hell :
ell ∈ Ioc (0 : ℝ) (1/4)
hM :
0 ≤ M
hsize :
M^2 ≤ L
B :
log (exp 1+sigma^2*L)
m :
ceil (CM*L/B)
M ≤ (m : ℝ)
(m : ℝ) ≤ 2*CM*L/B
ell/(m : ℝ) ∈ Ioc (0 : ℝ) (1/4)
ell/(m : ℝ) ≤ sigma
Proof (Lean source)
-- @node: lower_compact_degree_radius_bounds lemma lower_compact_degree_radius_bounds (sigma L CM ell M : ℝ) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (hL : 1 ≤ L) (ht : 1 ≤ sigma^2*L) (hCM : 1 ≤ CM) (hell : ell ∈ Ioc (0 : ℝ) (1/4)) (hM : 0 ≤ M) (hsize : M^2 ≤ L) : let B := log (exp 1+sigma^2*L) let m := ceil (CM*L/B) M ≤ (m : ℝ) ∧ (m : ℝ) ≤ 2*CM*L/B ∧ ell/(m : ℝ) ∈ Ioc (0 : ℝ) (1/4) ∧ ell/(m : ℝ) ≤ sigma := by dsimp only have hs0 := hs.1 have hell0 := hell.1 obtain ⟨hB, hscale⟩ := lower_compact_scale_lower_bound sigma L hs hL ht have hroot1 : 1 ≤ sqrt L := by have := Real.sqrt_le_sqrt hL simpa using this have hLB : 1 ≤ L/log (exp 1+sigma^2*L) := by linarith obtain ⟨hlo, hhi, hm⟩ := lower_compact_degree_bounds CM L _ hCM hB hLB have hCMscale : L/log (exp 1+sigma^2*L) ≤ CM*L/log (exp 1+sigma^2*L) := by rw [mul_div_assoc] exact le_mul_of_one_le_left (by linarith) hCM have hmscale := hscale.trans (hCMscale.trans hlo) have hm0 : (0 : ℝ) < ceil (CM*L/log (exp 1+sigma^2*L)) := by exact_mod_cast (show 0 < ceil (CM*L/log (exp 1+sigma^2*L)) by omega) have hMroot : M ≤ sqrt L := (Real.le_sqrt hM (by linarith)).2 hsize have hsroot : 1 ≤ sigma*sqrt L := by have hnonneg : 0 ≤ sigma*sqrt L := by positivity have hid : (sigma*sqrt L)^2 = sigma^2*L := by rw [mul_pow, Real.sq_sqrt (by linarith : 0 ≤ L)] nlinarith refine ⟨by linarith, hhi, ⟨by positivity, ?_⟩, ?_⟩ · exact (div_le_self hell.1.le (by exact_mod_cast hm)).trans hell.2 · apply (div_le_iff₀ hm0).2 have := mul_le_mul_of_nonneg_left hmscale hs.1.le nlinarith [hell.2]
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_degree_radius_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerCompactTuning.lean:207
theorem lower_compact_tuning

The concrete compact degree and its floor cancellation order satisfy (40), (42), (45), (46), and (47), uniformly over the public compact noise range. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma CM ell cPacket M :
ℝ
n :
ℕ
hk :
0 ≤ kappa
hd :
0 ≤ effDim beta kappa
hn :
0 < n
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
hL :
1 ≤ logScale n
ht :
1 ≤ sigma^2*logScale n
hCM :
1 ≤ CM
hell :
ell ∈ Ioc (0 : ℝ) (1/4)
hc :
0 < cPacket
hM :
4 ≤ M
hthreshold :
2 ≤ cPacket*M
hsize :
M^2 ≤ logScale n
hlarge :
2*exp 1 ≤ (cPacket/2)*CM/(exp 1*ell^2)
hbudget :
8 ≤ (cPacket/2)*CM
B :
log (exp 1+sigma^2*logScale n)
m :
ceil (CM*logScale n/B)
J :
floor (cPacket*m)
4 ≤ m
1 ≤ J
ell/(m : ℝ) ∈ Ioc (0 : ℝ) (1/4)
ell/(m : ℝ) ≤ sigma
(ell/(2*CM))*(B/logScale n) ≤ ell/(m : ℝ)
(n : ℝ)*(sigma^(-kappa-1)*(ell/m)^(2*beta+2*kappa+2)*momentTail sigma ell J) ≤ 2
Proof (Lean source)
-- @node: lower_compact_tuning lemma lower_compact_tuning (beta kappa sigma CM ell cPacket M : ℝ) (n : ℕ) (hk : 0 ≤ kappa) (hd : 0 ≤ effDim beta kappa) (hn : 0 < n) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (hL : 1 ≤ logScale n) (ht : 1 ≤ sigma^2*logScale n) (hCM : 1 ≤ CM) (hell : ell ∈ Ioc (0 : ℝ) (1/4)) (hc : 0 < cPacket) (hM : 4 ≤ M) (hthreshold : 2 ≤ cPacket*M) (hsize : M^2 ≤ logScale n) (hlarge : 2*exp 1 ≤ (cPacket/2)*CM/(exp 1*ell^2)) (hbudget : 8 ≤ (cPacket/2)*CM) : let B := log (exp 1+sigma^2*logScale n) let m := ceil (CM*logScale n/B) let J := floor (cPacket*m) 4 ≤ m ∧ 1 ≤ J ∧ ell/(m : ℝ) ∈ Ioc (0 : ℝ) (1/4) ∧ ell/(m : ℝ) ≤ sigma ∧ (ell/(2*CM))*(B/logScale n) ≤ ell/(m : ℝ) ∧ (n : ℝ)*(sigma^(-kappa-1)*(ell/m)^(2*beta+2*kappa+2)*momentTail sigma ell J) ≤ 2 := by dsimp only let B := log (exp 1+sigma^2*logScale n) let m := ceil (CM*logScale n/B) let J := floor (cPacket*m) have hL0 : 0 < logScale n := by linarith have hs0 := hs.1 have hell0 := hell.1 obtain ⟨hB, hscale⟩ := lower_compact_scale_lower_bound sigma (logScale n) hs hL ht have hroot1 : 1 ≤ sqrt (logScale n) := by have := Real.sqrt_le_sqrt hL simpa using this have hLB : 1 ≤ logScale n/B := by dsimp [B]; linarith obtain ⟨hmM, hmhi, hh, hhs⟩ := lower_compact_degree_radius_bounds sigma (logScale n) CM ell M hs hL ht hCM hell (by linarith) hsize have hm4 : 4 ≤ m := by have : (4 : ℝ) ≤ m := hM.trans hmM exact_mod_cast this have hthreshold' : 2 ≤ cPacket*m := hthreshold.trans (mul_le_mul_of_nonneg_left hmM hc.le) obtain ⟨horder, hJ1⟩ := lower_packet_cancellation_order cPacket m hthreshold' have hlo := Nat.le_ceil (CM*logScale n/B) have horder' : (cPacket/2)*CM*logScale n/B ≤ (J : ℝ) := by have := mul_le_mul_of_nonneg_left hlo (show 0 ≤ cPacket/2 by positivity) calc _ = (cPacket/2)*(CM*logScale n/B) := by ring _ ≤ (cPacket/2)*m := this _ ≤ _ := horder obtain ⟨hJ, hcut, hdecay⟩ := lower_compact_order_decay (sigma^2*logScale n) (logScale n) (cPacket/2) CM ell J ht hL0 (by positivity) hell0 (by linarith) hlarge hbudget horder' have hlambda : ell^2/sigma^2 = ell^2*logScale n/(sigma^2*logScale n) := by field_simp rw [← hlambda] at hcut hdecay refine ⟨hm4, hJ1, hh, hhs, lower_compact_bandwidth_comparison ell CM (logScale n) B hell0.le hCM hB hLB, ?_⟩ exact lower_compact_gaussian_sample_budget beta kappa sigma (ell/m) ell n J hk hd ⟨hh.1, hh.2.trans (by norm_num)⟩ hhs hn hJ (by positivity) hcut hdecay
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_tuning · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerCompactTuning.lean:246
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.LowerRegimes 13 declarations Helpers — LowerRegimes

Helpers — LowerRegimes

The same centered perturbation determines both threshold profiles. Direct tuning uses h0=n^(-1/d); inverse tuning uses the normalized packet, h=ell/m and J=floor(cPacket*m). Support and weighted cancellations are conclusions about that constructed perturbation.

Definition (Lean source)
beta kappa :
ℝ
n :
ℕ
sigma epsilon cPacket :
ℝ
muPlus muMinus :
h ell :
ℝ
m J :
ℕ
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus h ell m J :
Prop
delta :
if sigma
≤ directScale beta kappa n then directPerturbation beta epsilon (directScale beta kappa n) else fun t => epsilon*h^beta*packetPsi kappa m (t/ell) (: ℝ → ℝ)
h ∈ Ioc (0 : ℝ) (1/4)
ell ∈ Ioc (0 : ℝ) (1/4)
sigma ≤ directScale beta kappa n
h = directScale beta kappa n
ell = h
J = 0
directScale beta kappa n < sigma
4 ≤ m
h = ell/m
J = floor (cPacket*m)
1 ≤ J
a :
(muPlus a : ℝ) = 1/2 + delta ((a : ℝ)-a0)
(muMinus a : ℝ) = 1/2 - delta ((a : ℝ)-a0)
t :
t ∉ Icc (-ell) ell
delta t = 0
Integrable (fun t => witnessDesignDensity kappa t * delta t)
j :
ℕ
j < J
∫ t, t^j * (witnessDesignDensity kappa t * delta t) = 0
CausalSmith.Stat.NoisydoseWeakdesignTransition.LowerProfileConstruction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:26
theorem direct_lower_profile_construction

Equations (14)--(15) provide legal direct-regime profiles with the full localization construction, including compact support and signed-density integrability. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
sigma epsilon cPacket :
ℝ
hb :
beta ∈ Icc (0 : ℝ) 1
hk :
0 ≤ kappa
he :
0 ≤ epsilon
heSmall :
4*epsilon ≤ 1
hh :
directScale beta kappa n ∈ Ioc (0 : ℝ) (1/4)
hamp :
epsilon*(directScale beta kappa n)^beta ≤ 3/8
hsigma :
sigma ≤ directScale beta kappa n
∃ muPlus muMinus : ThresholdProfile,
conclusion 1
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
conclusion 2
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
conclusion 3
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (directScale beta kappa n) (directScale beta kappa n) 0 0
Proof (Lean source)
-- @node: direct_lower_profile_construction lemma direct_lower_profile_construction (beta kappa : ℝ) (n : ℕ) (sigma epsilon cPacket : ℝ) (hb : beta ∈ Icc (0 : ℝ) 1) (hk : 0 ≤ kappa) (he : 0 ≤ epsilon) (heSmall : 4*epsilon ≤ 1) (hh : directScale beta kappa n ∈ Ioc (0 : ℝ) (1/4)) (hamp : epsilon*(directScale beta kappa n)^beta ≤ 3/8) (hsigma : sigma ≤ directScale beta kappa n) : ∃ muPlus muMinus : ThresholdProfile, (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧ LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (directScale beta kappa n) (directScale beta kappa n) 0 0 := by obtain ⟨muPlus, muMinus, hformula, hrange, hholder⟩ := direct_threshold_profiles beta epsilon (directScale beta kappa n) hb he heSmall hh.1 hamp refine ⟨muPlus, muMinus, hrange, hholder, ?_⟩ simp only [LowerProfileConstruction, if_pos hsigma] refine ⟨hh, hh, (fun _ => ⟨True.intro, True.intro, True.intro⟩), ?_, hformula, ?_, directPerturbation_signed_integrable beta kappa epsilon _ hk hh.1, ?_⟩ · intro hinverse exact False.elim (not_lt_of_ge hsigma hinverse) · intro t ht exact directPerturbation_support beta epsilon _ t ht · intro j hj exact False.elim (Nat.not_lt_zero j hj)
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_lower_profile_construction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:46
theorem direct_lower_profile_chiSq_construction

The direct profiles satisfy their localization construction and the Gaussian-series comparison (27) whenever the public noise is positive. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
n :
ℕ
sigma epsilon cPacket :
ℝ
hb :
beta ∈ Icc (0 : ℝ) 1
hk :
kappa ∈ Icc (0 : ℝ) 2
he :
0 ≤ epsilon
heSmall :
4*epsilon ≤ 1
hh :
directScale beta kappa n ∈ Ioc (0 : ℝ) (1/4)
hamp :
epsilon*(directScale beta kappa n)^beta ≤ 3/8
hsigma :
sigma ≤ directScale beta kappa n
hs :
sigma ∈ Icc (0 : ℝ) (1/4)
h :
directScale beta kappa n
K :
2*(kappa+1)*2^kappa*epsilon
B :
(4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)* momentTail sigma h 0
∃ muPlus muMinus : ThresholdProfile,
conclusion 1
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
conclusion 2
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
conclusion 3
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus h h 0 0
conclusion 4
0 < sigma
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
Proof (Lean source)
-- @node: direct_lower_profile_chiSq_construction lemma direct_lower_profile_chiSq_construction (E : PathSpace S) (beta kappa : ℝ) (n : ℕ) (sigma epsilon cPacket : ℝ) (hb : beta ∈ Icc (0 : ℝ) 1) (hk : kappa ∈ Icc (0 : ℝ) 2) (he : 0 ≤ epsilon) (heSmall : 4*epsilon ≤ 1) (hh : directScale beta kappa n ∈ Ioc (0 : ℝ) (1/4)) (hamp : epsilon*(directScale beta kappa n)^beta ≤ 3/8) (hsigma : sigma ≤ directScale beta kappa n) (hs : sigma ∈ Icc (0 : ℝ) (1/4)) : let h := directScale beta kappa n let K := 2*(kappa+1)*2^kappa*epsilon let B := (4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)* momentTail sigma h 0 ∃ muPlus muMinus : ThresholdProfile, (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧ LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus h h 0 0 ∧ (0 < sigma → chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B) := by obtain ⟨muPlus, muMinus, hrange, hholder, hconstruction⟩ := direct_lower_profile_construction beta kappa n sigma epsilon cPacket hb hk.1 he heSmall hh hamp hsigma refine ⟨muPlus, muMinus, hrange, hholder, hconstruction, ?_⟩ intro hs0 have hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) := by have hf := hconstruction.2.2.2.2.1 simpa only [if_pos hsigma] using hf exact direct_profile_pair_chiSq_bound E beta kappa sigma epsilon (directScale beta kappa n) hk ⟨hs0, hs.2⟩ he hh.1 muPlus muMinus hrange hformula
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_lower_profile_chiSq_construction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:74
theorem direct_lower_profile_frontier_construction

Equations (13)--(16) and the positive-noise comparison (27) hold for the same direct profiles after a deterministic, noise-independent sample cutoff. The amplitude and bandwidth range conditions are derived from the public tuning. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon cPacket :
ℝ
hb :
beta ∈ Ioc (0 : ℝ) 1
hk :
kappa ∈ Icc (0 : ℝ) 2
he :
0 ≤ epsilon
heSmall :
epsilon ≤ 1/8
∃ n0 : ℕ,
2 ≤ n0
conclusion 1
S :
Type u
E :
n ≥ n0 :
sigma ∈ Icc (0 : ℝ) (1/4) :
sigma ≤ directScale beta kappa n
∃ muPlus muMinus : ThresholdProfile,
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|causalTarget E (lowerWitnessLaw E kappa muPlus)- causalTarget E (lowerWitnessLaw E kappa muMinus)|
= (2*epsilon)*frontierRate beta kappa sigma n
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (directScale beta kappa n) (directScale beta kappa n) 0 0
0 < sigma
h :
directScale beta kappa n
K :
2*(kappa+1)*2^kappa*epsilon
B :
(4/exp (-1/2)*K^2)*sigma^(-kappa-1)* h^(2*beta+2*kappa+2)*momentTail sigma h 0
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
Proof (Lean source)
-- @node: direct_lower_profile_frontier_construction lemma direct_lower_profile_frontier_construction (beta kappa epsilon cPacket : ℝ) (hb : beta ∈ Ioc (0 : ℝ) 1) (hk : kappa ∈ Icc (0 : ℝ) 2) (he : 0 ≤ epsilon) (heSmall : epsilon ≤ 1/8) : ∃ n0 : ℕ, 2 ≤ n0 ∧ ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), sigma ≤ directScale beta kappa n → ∃ muPlus muMinus : ThresholdProfile, (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧ |causalTarget E (lowerWitnessLaw E kappa muPlus)- causalTarget E (lowerWitnessLaw E kappa muMinus)| = (2*epsilon)*frontierRate beta kappa sigma n ∧ LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (directScale beta kappa n) (directScale beta kappa n) 0 0 ∧ (0 < sigma → let h := directScale beta kappa n let K := 2*(kappa+1)*2^kappa*epsilon let B := (4/exp (-1/2)*K^2)*sigma^(-kappa-1)* h^(2*beta+2*kappa+2)*momentTail sigma h 0 chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B) := by have hd : 0 < effDim beta kappa := by unfold effDim; linarith [hb.1, hk.1] obtain ⟨n0, hn0, hcutoff⟩ := lower_direct_scale_sample_cutoff beta kappa hd refine ⟨n0, hn0, ?_⟩ intro S _ E n hn sigma hs hsigma have hh := hcutoff n hn have hb0 : beta ∈ Icc (0 : ℝ) 1 := ⟨by linarith [hb.1], hb.2⟩ have hamp : epsilon*(directScale beta kappa n)^beta ≤ 3/8 := by have hr := Real.rpow_le_one hh.1.le (hh.2.trans (by norm_num)) hb0.1 have := mul_le_mul_of_nonneg_left hr he linarith obtain ⟨muPlus, muMinus, hrange, hholder, hconstruction, hchi⟩ := direct_lower_profile_chiSq_construction E beta kappa n sigma epsilon cPacket hb0 hk he (by linarith) hh hamp hsigma hs have hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) := by have hf := hconstruction.2.2.2.2.1 simpa only [if_pos hsigma] using hf exact ⟨muPlus, muMinus, hrange, hholder, direct_profile_frontier_separation E beta kappa epsilon sigma n hk he hh.1 hsigma muPlus muMinus hformula, hconstruction, hchi⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_lower_profile_frontier_construction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:112
theorem direct_lower_profile_observed_budget_construction

The direct profile construction also supplies equation (18) for every positive noise, with its sample budget independent of the noise scale. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
n :
ℕ
sigma epsilon cPacket :
ℝ
hb :
beta ∈ Icc (0 : ℝ) 1
hk :
kappa ∈ Icc (0 : ℝ) 2
he :
0 ≤ epsilon
heSmall :
4*epsilon ≤ 1
hh :
directScale beta kappa n ∈ Ioc (0 : ℝ) (1/4)
hamp :
epsilon*(directScale beta kappa n)^beta ≤ 3/8
hsigma :
sigma ≤ directScale beta kappa n
hs :
sigma ∈ Icc (0 : ℝ) (1/4)
hd :
0 < effDim beta kappa
hn :
0 < n
∃ muPlus muMinus : ThresholdProfile,
conclusion 1
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
conclusion 2
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
conclusion 3
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (directScale beta kappa n) (directScale beta kappa n) 0 0
conclusion 4
0 < sigma
(n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (8*(kappa+1)*2^kappa)*epsilon^2
(n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (8*(kappa+1)*2^kappa)*epsilon^2
Proof (Lean source)
-- @node: direct_lower_profile_observed_budget_construction lemma direct_lower_profile_observed_budget_construction (E : PathSpace S) (beta kappa : ℝ) (n : ℕ) (sigma epsilon cPacket : ℝ) (hb : beta ∈ Icc (0 : ℝ) 1) (hk : kappa ∈ Icc (0 : ℝ) 2) (he : 0 ≤ epsilon) (heSmall : 4*epsilon ≤ 1) (hh : directScale beta kappa n ∈ Ioc (0 : ℝ) (1/4)) (hamp : epsilon*(directScale beta kappa n)^beta ≤ 3/8) (hsigma : sigma ≤ directScale beta kappa n) (hs : sigma ∈ Icc (0 : ℝ) (1/4)) (hd : 0 < effDim beta kappa) (hn : 0 < n) : ∃ muPlus muMinus : ThresholdProfile, (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧ LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (directScale beta kappa n) (directScale beta kappa n) 0 0 ∧ (0 < sigma → (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa)*epsilon^2 ∧ (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa)*epsilon^2) := by obtain ⟨muPlus, muMinus, hrange, hholder, hconstruction⟩ := direct_lower_profile_construction beta kappa n sigma epsilon cPacket hb hk.1 he heSmall hh hamp hsigma refine ⟨muPlus, muMinus, hrange, hholder, hconstruction, ?_⟩ intro hs0 have hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) := by have hf := hconstruction.2.2.2.2.1 simpa only [if_pos hsigma] using hf exact direct_profile_pair_observed_sample_budget E beta kappa sigma epsilon n hk ⟨hs0, hs.2⟩ he hd hn muPlus muMinus hrange hformula
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_lower_profile_observed_budget_construction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:164
theorem direct_lower_profile_complete_construction

The direct branch supplies separation, localization, Gaussian-series comparison and observed product-TV control at level τ with one noise-independent cutoff. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon cPacket :
ℝ
hb :
beta ∈ Ioc (0 : ℝ) 1
hk :
kappa ∈ Icc (0 : ℝ) 2
he :
0 ≤ epsilon
heSmall :
epsilon ≤ 1/8
tau :
ℝ
htau :
0 ≤ tau
hbudget :
(8*(kappa+1)*2^kappa)*epsilon^2 ≤ log (1 + tau^2)
∃ n0 : ℕ,
2 ≤ n0
conclusion 1
S :
Type u
E :
n ≥ n0 :
sigma ∈ Icc (0 : ℝ) (1/4) :
sigma ≤ directScale beta kappa n
∃ muPlus muMinus : ThresholdProfile,
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|causalTarget E (lowerWitnessLaw E kappa muPlus)- causalTarget E (lowerWitnessLaw E kappa muMinus)|
= (2*epsilon)*frontierRate beta kappa sigma n
tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus))
≤ tau
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (directScale beta kappa n) (directScale beta kappa n) 0 0
0 < sigma
h :
directScale beta kappa n
K :
2*(kappa+1)*2^kappa*epsilon
B :
(4/exp (-1/2)*K^2)*sigma^(-kappa-1)* h^(2*beta+2*kappa+2)*momentTail sigma h 0
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
Proof (Lean source)
-- @node: direct_lower_profile_complete_construction lemma direct_lower_profile_complete_construction (beta kappa epsilon cPacket : ℝ) (hb : beta ∈ Ioc (0 : ℝ) 1) (hk : kappa ∈ Icc (0 : ℝ) 2) (he : 0 ≤ epsilon) (heSmall : epsilon ≤ 1/8) (tau : ℝ) (htau : 0 ≤ tau) (hbudget : (8*(kappa+1)*2^kappa)*epsilon^2 ≤ log (1 + tau^2)) : ∃ n0 : ℕ, 2 ≤ n0 ∧ ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), sigma ≤ directScale beta kappa n → ∃ muPlus muMinus : ThresholdProfile, (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧ |causalTarget E (lowerWitnessLaw E kappa muPlus)- causalTarget E (lowerWitnessLaw E kappa muMinus)| = (2*epsilon)*frontierRate beta kappa sigma n ∧ tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus)) ≤ tau ∧ LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (directScale beta kappa n) (directScale beta kappa n) 0 0 ∧ (0 < sigma → let h := directScale beta kappa n let K := 2*(kappa+1)*2^kappa*epsilon let B := (4/exp (-1/2)*K^2)*sigma^(-kappa-1)* h^(2*beta+2*kappa+2)*momentTail sigma h 0 chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B) := by obtain ⟨n0, hn0, hprofiles⟩ := direct_lower_profile_frontier_construction beta kappa epsilon cPacket hb hk he heSmall refine ⟨n0, hn0, ?_⟩ intro S _ E n hn sigma hs hsigma obtain ⟨muPlus, muMinus, hrange, hholder, hsep, hconstruction, hchi⟩ := hprofiles S E n hn sigma hs hsigma have hd : 0 < effDim beta kappa := by unfold effDim; linarith [hb.1, hk.1] have hnpos : 0 < n := by omega have hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) := by have hf := hconstruction.2.2.2.2.1 simpa only [if_pos hsigma] using hf exact ⟨muPlus, muMinus, hrange, hholder, hsep, direct_profile_pair_observed_tv_bound E beta kappa sigma epsilon n hk hs he hd hnpos tau htau hbudget muPlus muMinus hrange hformula, hconstruction, hchi⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_lower_profile_complete_construction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:201
theorem inverse_lower_profile_construction

Equations (20)--(23) give legal inverse-regime profiles and the full scaled localization construction, using the same packet and cancellation order throughout. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
sigma epsilon ell Cpacket cPacket :
ℝ
m :
ℕ
hp :
PacketBounds kappa Cpacket cPacket m
hb :
beta ∈ Icc (0 : ℝ) 1
hk :
0 ≤ kappa
he :
0 ≤ epsilon
hC :
0 ≤ Cpacket
hc :
0 ≤ cPacket
heSmall :
2*epsilon*Cpacket ≤ 1
hell :
ell ∈ Ioc (0 : ℝ) (1/4)
hm :
4 ≤ m
hJ :
1 ≤ floor (cPacket*m)
hamp :
epsilon*(ell/m)^beta*Cpacket ≤ 3/8
hsigma :
directScale beta kappa n < sigma
∃ muPlus muMinus : ThresholdProfile,
conclusion 1
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
conclusion 2
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
conclusion 3
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (ell/m) ell m (floor (cPacket*m))
Proof (Lean source)
-- @node: inverse_lower_profile_construction lemma inverse_lower_profile_construction (beta kappa : ℝ) (n : ℕ) (sigma epsilon ell Cpacket cPacket : ℝ) (m : ℕ) (hp : PacketBounds kappa Cpacket cPacket m) (hb : beta ∈ Icc (0 : ℝ) 1) (hk : 0 ≤ kappa) (he : 0 ≤ epsilon) (hC : 0 ≤ Cpacket) (hc : 0 ≤ cPacket) (heSmall : 2*epsilon*Cpacket ≤ 1) (hell : ell ∈ Ioc (0 : ℝ) (1/4)) (hm : 4 ≤ m) (hJ : 1 ≤ floor (cPacket*m)) (hamp : epsilon*(ell/m)^beta*Cpacket ≤ 3/8) (hsigma : directScale beta kappa n < sigma) : ∃ muPlus muMinus : ThresholdProfile, (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧ LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (ell/m) ell m (floor (cPacket*m)) := by have hm0 : 0 < m := by omega have hmR : (1 : ℝ) ≤ m := by exact_mod_cast (show 1 ≤ m by omega) have hh : ell/m ∈ Ioc (0 : ℝ) (1/4) := ⟨div_pos hell.1 (by linarith), (div_le_self hell.1.le hmR).trans hell.2⟩ obtain ⟨muPlus, muMinus, hformula, hrange, hholder⟩ := inverse_threshold_profiles beta kappa epsilon ell Cpacket cPacket m hp hb he heSmall hC hell.1 hm0 hamp refine ⟨muPlus, muMinus, hrange, hholder, ?_⟩ simp only [LowerProfileConstruction, if_neg (not_le.mpr hsigma)] refine ⟨hh, hell, ?_, (fun _ => ⟨hm, True.intro, True.intro, hJ⟩), hformula, ?_, inversePerturbation_signed_integrable beta kappa epsilon (ell/m) ell m hk, ?_⟩ · intro hdirect exact False.elim (not_le_of_gt hsigma hdirect) · intro t ht exact inversePerturbation_support beta kappa epsilon (ell/m) ell m hell.1 t ht · intro j hj exact inversePerturbation_moment_zero beta kappa epsilon (ell/m) ell Cpacket cPacket m j hp hell (packet_floor_moment_cutoff cPacket m j hc hj)
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverse_lower_profile_construction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:252
theorem inverse_lower_profile_chiSq_construction

The inverse profiles satisfy both the full localization construction and the observed comparison (27). Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
n :
ℕ
sigma epsilon ell Cpacket cPacket :
ℝ
m :
ℕ
hp :
PacketBounds kappa Cpacket cPacket m
hb :
beta ∈ Icc (0 : ℝ) 1
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
he :
0 ≤ epsilon
hC :
0 ≤ Cpacket
hc :
0 ≤ cPacket
heSmall :
2*epsilon*Cpacket ≤ 1
hell :
ell ∈ Ioc (0 : ℝ) (1/4)
hm :
4 ≤ m
hJ :
1 ≤ floor (cPacket*m)
hamp :
epsilon*(ell/m)^beta*Cpacket ≤ 3/8
hsigma :
directScale beta kappa n < sigma
K :
(kappa+1)*2^kappa*epsilon*Cpacket
B :
(4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*(ell/m)^(2*beta+2*kappa+2)* momentTail sigma ell (floor (cPacket*m))
∃ muPlus muMinus : ThresholdProfile,
conclusion 1
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
conclusion 2
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
conclusion 3
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (ell/m) ell m (floor (cPacket*m))
conclusion 4
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
conclusion 5
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
Proof (Lean source)
-- @node: inverse_lower_profile_chiSq_construction lemma inverse_lower_profile_chiSq_construction (E : PathSpace S) (beta kappa : ℝ) (n : ℕ) (sigma epsilon ell Cpacket cPacket : ℝ) (m : ℕ) (hp : PacketBounds kappa Cpacket cPacket m) (hb : beta ∈ Icc (0 : ℝ) 1) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (he : 0 ≤ epsilon) (hC : 0 ≤ Cpacket) (hc : 0 ≤ cPacket) (heSmall : 2*epsilon*Cpacket ≤ 1) (hell : ell ∈ Ioc (0 : ℝ) (1/4)) (hm : 4 ≤ m) (hJ : 1 ≤ floor (cPacket*m)) (hamp : epsilon*(ell/m)^beta*Cpacket ≤ 3/8) (hsigma : directScale beta kappa n < sigma) : let K := (kappa+1)*2^kappa*epsilon*Cpacket let B := (4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*(ell/m)^(2*beta+2*kappa+2)* momentTail sigma ell (floor (cPacket*m)) ∃ muPlus muMinus : ThresholdProfile, (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧ LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (ell/m) ell m (floor (cPacket*m)) ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B := by obtain ⟨muPlus, muMinus, hrange, hholder, hconstruction⟩ := inverse_lower_profile_construction beta kappa n sigma epsilon ell Cpacket cPacket m hp hb hk.1 he hC hc heSmall hell hm hJ hamp hsigma have hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell) ∧ (muMinus a : ℝ) = 1/2 - epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell) := by have hf := hconstruction.2.2.2.2.1 simpa only [if_neg (not_le.mpr hsigma)] using hf have hbounds := inverse_profile_pair_chiSq_bound E beta kappa sigma epsilon ell Cpacket cPacket m hp hk hs he hC hc hell (by omega) muPlus muMinus hrange hformula exact ⟨muPlus, muMinus, hrange, hholder, hconstruction, hbounds⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverse_lower_profile_chiSq_construction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:290
theorem lower_intermediate_tuning

Equations (30)--(35) assemble the rounded intermediate degree, legal radius, positive cancellation order and uniform Gaussian-series sample budget. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma a CI cPacket :
ℝ
n :
ℕ
hk :
0 ≤ kappa
hd :
0 ≤ effDim beta kappa
hs :
0 < sigma
ha :
0 < a
ha1 :
a ≤ 1
hCI :
4 ≤ CI
hc :
0 < cPacket
hthreshold :
2 ≤ cPacket*CI
hS :
1 ≤ log (exp 1+(n : ℝ)*sigma^effDim beta kappa)
hSL :
log (exp 1+(n : ℝ)*sigma^effDim beta kappa) ≤ logScale n
hsL :
sigma*sqrt (logScale n) ≤ 1
haCI :
a*sqrt (CI+1) ≤ 1/4
haSmall :
a^2 ≤ (cPacket/2)/2
hexp :
exp 1*a^2/(cPacket/2) ≤ exp (-1/(cPacket/2))
S :
log (exp 1+(n : ℝ)*sigma^effDim beta kappa)
m :
ceil (CI*S)
ell :
a*sigma*sqrt m
J :
floor (cPacket*m)
4 ≤ m
1 ≤ J
ell ∈ Ioc (0 : ℝ) (1/4)
ell/(m : ℝ) ∈ Ioc (0 : ℝ) (1/4)
ell/(m : ℝ) ≤ sigma
(a/sqrt (CI+1))*(sigma/sqrt S) ≤ ell/(m : ℝ)
(n : ℝ)*(sigma^(-kappa-1)*(ell/m)^(2*beta+2*kappa+2)*momentTail sigma ell J) ≤ 2
Proof (Lean source)
-- @node: lower_intermediate_tuning lemma lower_intermediate_tuning (beta kappa sigma a CI cPacket : ℝ) (n : ℕ) (hk : 0 ≤ kappa) (hd : 0 ≤ effDim beta kappa) (hs : 0 < sigma) (ha : 0 < a) (ha1 : a ≤ 1) (hCI : 4 ≤ CI) (hc : 0 < cPacket) (hthreshold : 2 ≤ cPacket*CI) (hS : 1 ≤ log (exp 1+(n : ℝ)*sigma^effDim beta kappa)) (hSL : log (exp 1+(n : ℝ)*sigma^effDim beta kappa) ≤ logScale n) (hsL : sigma*sqrt (logScale n) ≤ 1) (haCI : a*sqrt (CI+1) ≤ 1/4) (haSmall : a^2 ≤ (cPacket/2)/2) (hexp : exp 1*a^2/(cPacket/2) ≤ exp (-1/(cPacket/2))) : let S := log (exp 1+(n : ℝ)*sigma^effDim beta kappa) let m := ceil (CI*S) let ell := a*sigma*sqrt m let J := floor (cPacket*m) 4 ≤ m ∧ 1 ≤ J ∧ ell ∈ Ioc (0 : ℝ) (1/4) ∧ ell/(m : ℝ) ∈ Ioc (0 : ℝ) (1/4) ∧ ell/(m : ℝ) ≤ sigma ∧ (a/sqrt (CI+1))*(sigma/sqrt S) ≤ ell/(m : ℝ) ∧ (n : ℝ)*(sigma^(-kappa-1)*(ell/m)^(2*beta+2*kappa+2)*momentTail sigma ell J) ≤ 2 := by dsimp only let S := log (exp 1+(n : ℝ)*sigma^effDim beta kappa) let m := ceil (CI*S) let ell := a*sigma*sqrt m let J := floor (cPacket*m) have hCI1 : 1 ≤ CI := by linarith obtain ⟨hlo, hhi, hm1⟩ := lower_intermediate_degree_bounds CI S hCI1 hS have hCIm : CI ≤ (m : ℝ) := by calc CI ≤ CI*S := le_mul_of_one_le_right (by linarith) hS _ ≤ _ := hlo have hm4 : 4 ≤ m := by exact_mod_cast (hCI.trans hCIm) have hmR : (1 : ℝ) ≤ m := by exact_mod_cast hm1 have hthreshold' : 2 ≤ cPacket*m := hthreshold.trans (mul_le_mul_of_nonneg_left hCIm hc.le) obtain ⟨horder, hJ⟩ := lower_packet_cancellation_order cPacket m hthreshold' obtain ⟨hell, hh0, hhs⟩ := lower_intermediate_radius_bounds sigma a CI S (logScale n) hs ha ha1 hCI1 hS hSL hsL haCI have hh : ell/(m : ℝ) ∈ Ioc (0 : ℝ) (1/4) := ⟨hh0, (div_le_self hell.1.le hmR).trans hell.2⟩ have hdegree : S ≤ (m : ℝ) := by calc S ≤ CI*S := le_mul_of_one_le_left (by linarith) hCI1 _ ≤ _ := hlo refine ⟨hm4, hJ, hell, hh, hhs, lower_intermediate_bandwidth_comparison sigma a CI S hs ha hCI1 hS, ?_⟩ exact lower_intermediate_gaussian_sample_budget beta kappa sigma (ell/m) ell a (cPacket/2) n m J hk hd hh.1 hhs (by positivity) (by omega) (lower_intermediate_lambda_identity sigma a m hs) horder haSmall hexp hdegree
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_intermediate_tuning · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:327
theorem intermediate_lower_profile_sample_budget

Equations (35)--(36) hold for the actual intermediate threshold profiles, with one rounded packet degree and cancellation order for construction and observed distance. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma epsilon a CI Cpacket cPacket :
ℝ
n :
ℕ
hb :
beta ∈ Icc (0 : ℝ) 1
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
ha :
0 < a
ha1 :
a ≤ 1
hCI :
4 ≤ CI
hc :
0 < cPacket
hthreshold :
2 ≤ cPacket*CI
hS :
1 ≤ log (exp 1+(n : ℝ)*sigma^effDim beta kappa)
hSL :
log (exp 1+(n : ℝ)*sigma^effDim beta kappa) ≤ logScale n
hsL :
sigma*sqrt (logScale n) ≤ 1
haCI :
a*sqrt (CI+1) ≤ 1/4
haSmall :
a^2 ≤ (cPacket/2)/2
hexp :
exp 1*a^2/(cPacket/2) ≤ exp (-1/(cPacket/2))
he :
0 ≤ epsilon
hC :
0 ≤ Cpacket
heSmall :
epsilon*Cpacket ≤ 1/8
hpacket :
∀ m : ℕ
if
4 ≤ m
then
PacketBounds kappa Cpacket cPacket m
hinverse :
directScale beta kappa n < sigma
S :
log (exp 1+(n : ℝ)*sigma^effDim beta kappa)
m :
ceil (CI*S)
ell :
a*sigma*sqrt m
J :
floor (cPacket*m)
K :
(kappa+1)*2^kappa*epsilon*Cpacket
∃ muPlus muMinus : ThresholdProfile,
conclusion 1
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
conclusion 2
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
conclusion 3
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (ell/m) ell m J
conclusion 4
(2*epsilon)*(a/sqrt (CI+1))^beta*(sigma/sqrt S)^beta
≤ |causalTarget E (lowerWitnessLaw E kappa muPlus)-causalTarget E (lowerWitnessLaw E kappa muMinus)|
conclusion 5
(n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ 2*(4/exp (-1/2)*K^2)
conclusion 6
(n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ 2*(4/exp (-1/2)*K^2)
Proof (Lean source)
-- @node: intermediate_lower_profile_sample_budget lemma intermediate_lower_profile_sample_budget (E : PathSpace S) (beta kappa sigma epsilon a CI Cpacket cPacket : ℝ) (n : ℕ) (hb : beta ∈ Icc (0 : ℝ) 1) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (ha : 0 < a) (ha1 : a ≤ 1) (hCI : 4 ≤ CI) (hc : 0 < cPacket) (hthreshold : 2 ≤ cPacket*CI) (hS : 1 ≤ log (exp 1+(n : ℝ)*sigma^effDim beta kappa)) (hSL : log (exp 1+(n : ℝ)*sigma^effDim beta kappa) ≤ logScale n) (hsL : sigma*sqrt (logScale n) ≤ 1) (haCI : a*sqrt (CI+1) ≤ 1/4) (haSmall : a^2 ≤ (cPacket/2)/2) (hexp : exp 1*a^2/(cPacket/2) ≤ exp (-1/(cPacket/2))) (he : 0 ≤ epsilon) (hC : 0 ≤ Cpacket) (heSmall : epsilon*Cpacket ≤ 1/8) (hpacket : ∀ m : ℕ, 4 ≤ m → PacketBounds kappa Cpacket cPacket m) (hinverse : directScale beta kappa n < sigma) : let S := log (exp 1+(n : ℝ)*sigma^effDim beta kappa) let m := ceil (CI*S) let ell := a*sigma*sqrt m let J := floor (cPacket*m) let K := (kappa+1)*2^kappa*epsilon*Cpacket ∃ muPlus muMinus : ThresholdProfile, (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧ LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (ell/m) ell m J ∧ (2*epsilon)*(a/sqrt (CI+1))^beta*(sigma/sqrt S)^beta ≤ |causalTarget E (lowerWitnessLaw E kappa muPlus)-causalTarget E (lowerWitnessLaw E kappa muMinus)| ∧ (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ 2*(4/exp (-1/2)*K^2) ∧ (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ 2*(4/exp (-1/2)*K^2) := by dsimp only let S := log (exp 1+(n : ℝ)*sigma^effDim beta kappa) let m := ceil (CI*S) let ell := a*sigma*sqrt m let J := floor (cPacket*m) let K := (kappa+1)*2^kappa*epsilon*Cpacket have hs0 := hs.1 have hd : 0 ≤ effDim beta kappa := by dsimp [effDim]; linarith [hb.1, hk.1] obtain ⟨hm, hJ, hell, hh, hhs, hcompare, hsample⟩ := lower_intermediate_tuning beta kappa sigma a CI cPacket n hk.1 hd hs.1 ha ha1 hCI hc hthreshold hS hSL hsL haCI haSmall hexp have hp := hpacket m hm have hamp : epsilon*(ell/m)^beta*Cpacket ≤ 3/8 := by have hr := Real.rpow_le_one hh.1.le (hh.2.trans (by norm_num)) hb.1 have := mul_le_mul_of_nonneg_left hr (mul_nonneg he hC) nlinarith obtain ⟨muPlus, muMinus, hrange, hholder, hconstruction, hplus, hminus⟩ := inverse_lower_profile_chiSq_construction E beta kappa n sigma epsilon ell Cpacket cPacket m hp hb hk hs he hC hc.le (by linarith) hell hm hJ hamp hinverse have hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell) ∧ (muMinus a : ℝ) = 1/2 - epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell) := by have hf := hconstruction.2.2.2.2.1 simpa only [if_neg (not_le.mpr hinverse)] using hf refine ⟨muPlus, muMinus, hrange, hholder, hconstruction, ?_, ?_, ?_⟩ · rw [inverse_profile_target_separation E beta kappa epsilon (ell/m) ell Cpacket cPacket m hk hp he hh.1.le muPlus muMinus hformula] have hr := Real.rpow_le_rpow (by positivity : 0 ≤ (a/sqrt (CI+1))*(sigma/sqrt S)) hcompare hb.1 rw [Real.mul_rpow (by positivity : 0 ≤ a/sqrt (CI+1)) (by positivity : 0 ≤ sigma/sqrt S)] at hr have := mul_le_mul_of_nonneg_left hr (show 0 ≤ 2*epsilon by positivity) nlinarith all_goals have hconst : 0 ≤ 4/exp (-1/2)*K^2 := by positivity calc _ ≤ (n : ℝ)*((4/exp (-1/2)*K^2)*sigma^(-kappa-1)* (ell/m)^(2*beta+2*kappa+2)*momentTail sigma ell J) := mul_le_mul_of_nonneg_left (by assumption) (Nat.cast_nonneg n) _ = (4/exp (-1/2)*K^2)*((n : ℝ)*(sigma^(-kappa-1)* (ell/m)^(2*beta+2*kappa+2)*momentTail sigma ell J)) := by ring _ ≤ _ := by nlinarith [mul_le_mul_of_nonneg_left hsample hconst]
CausalSmith.Stat.NoisydoseWeakdesignTransition.intermediate_lower_profile_sample_budget · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:378
theorem compact_lower_profile_sample_budget

The concrete compact tuning assembles (46)--(47) for the actual threshold profiles, with the same packet, bandwidth and cancellation order used in (27). Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma epsilon CM ell Cpacket cPacket M :
ℝ
n :
ℕ
hb :
beta ∈ Icc (0 : ℝ) 1
hk :
kappa ∈ Icc (0 : ℝ) 2
hn :
0 < n
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
hL :
1 ≤ logScale n
ht :
1 ≤ sigma^2*logScale n
hCM :
1 ≤ CM
hell :
ell ∈ Ioc (0 : ℝ) (1/4)
he :
0 ≤ epsilon
hC :
0 ≤ Cpacket
hc :
0 < cPacket
heSmall :
epsilon*Cpacket ≤ 1/8
hpacket :
∀ m : ℕ
if
4 ≤ m
then
PacketBounds kappa Cpacket cPacket m
hM :
4 ≤ M
hthreshold :
2 ≤ cPacket*M
hsize :
M^2 ≤ logScale n
hlarge :
2*exp 1 ≤ (cPacket/2)*CM/(exp 1*ell^2)
hbudget :
8 ≤ (cPacket/2)*CM
hinverse :
directScale beta kappa n < sigma
B :
log (exp 1+sigma^2*logScale n)
m :
ceil (CM*logScale n/B)
J :
floor (cPacket*m)
K :
(kappa+1)*2^kappa*epsilon*Cpacket
∃ muPlus muMinus : ThresholdProfile,
conclusion 1
a :
(muPlus a : ℝ) ∈ Icc (1/8) (7/8)
(muMinus a : ℝ) ∈ Icc (1/8) (7/8)
conclusion 2
a b :
|(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
|(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
conclusion 3
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (ell/m) ell m J
conclusion 4
(2*epsilon)*(ell/(2*CM))^beta*(B/logScale n)^beta
≤ |causalTarget E (lowerWitnessLaw E kappa muPlus)-causalTarget E (lowerWitnessLaw E kappa muMinus)|
conclusion 5
(n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ 2*(4/exp (-1/2)*K^2)
conclusion 6
(n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ 2*(4/exp (-1/2)*K^2)
Proof (Lean source)
-- @node: compact_lower_profile_sample_budget lemma compact_lower_profile_sample_budget (E : PathSpace S) (beta kappa sigma epsilon CM ell Cpacket cPacket M : ℝ) (n : ℕ) (hb : beta ∈ Icc (0 : ℝ) 1) (hk : kappa ∈ Icc (0 : ℝ) 2) (hn : 0 < n) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (hL : 1 ≤ logScale n) (ht : 1 ≤ sigma^2*logScale n) (hCM : 1 ≤ CM) (hell : ell ∈ Ioc (0 : ℝ) (1/4)) (he : 0 ≤ epsilon) (hC : 0 ≤ Cpacket) (hc : 0 < cPacket) (heSmall : epsilon*Cpacket ≤ 1/8) (hpacket : ∀ m : ℕ, 4 ≤ m → PacketBounds kappa Cpacket cPacket m) (hM : 4 ≤ M) (hthreshold : 2 ≤ cPacket*M) (hsize : M^2 ≤ logScale n) (hlarge : 2*exp 1 ≤ (cPacket/2)*CM/(exp 1*ell^2)) (hbudget : 8 ≤ (cPacket/2)*CM) (hinverse : directScale beta kappa n < sigma) : let B := log (exp 1+sigma^2*logScale n) let m := ceil (CM*logScale n/B) let J := floor (cPacket*m) let K := (kappa+1)*2^kappa*epsilon*Cpacket ∃ muPlus muMinus : ThresholdProfile, (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧ LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (ell/m) ell m J ∧ (2*epsilon)*(ell/(2*CM))^beta*(B/logScale n)^beta ≤ |causalTarget E (lowerWitnessLaw E kappa muPlus)-causalTarget E (lowerWitnessLaw E kappa muMinus)| ∧ (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ 2*(4/exp (-1/2)*K^2) ∧ (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ 2*(4/exp (-1/2)*K^2) := by dsimp only let B := log (exp 1+sigma^2*logScale n) let m := ceil (CM*logScale n/B) let J := floor (cPacket*m) let K := (kappa+1)*2^kappa*epsilon*Cpacket have hell0 := hell.1 have hCM0 : 0 < CM := by linarith have hL0 : 0 < logScale n := by linarith have hB0 : 0 < B := Real.log_pos (by have he2 : 2 ≤ exp 1 := by linarith [Real.add_one_le_exp (1 : ℝ)] nlinarith [sq_nonneg sigma]) have hd : 0 ≤ effDim beta kappa := by dsimp [effDim]; linarith [hb.1, hk.1] obtain ⟨hm, hJ, hh, hhs, hcompare, hsample⟩ := lower_compact_tuning beta kappa sigma CM ell cPacket M n hk.1 hd hn hs hL ht hCM hell hc hM hthreshold hsize hlarge hbudget have hp := hpacket m hm have hamp : epsilon*(ell/m)^beta*Cpacket ≤ 3/8 := by have hr := Real.rpow_le_one hh.1.le (hh.2.trans (by norm_num)) hb.1 have := mul_le_mul_of_nonneg_left hr (mul_nonneg he hC) nlinarith obtain ⟨muPlus, muMinus, hrange, hholder, hconstruction, hplus, hminus⟩ := inverse_lower_profile_chiSq_construction E beta kappa n sigma epsilon ell Cpacket cPacket m hp hb hk hs he hC hc.le (by linarith) hell hm hJ hamp hinverse have hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell) ∧ (muMinus a : ℝ) = 1/2 - epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell) := by have hf := hconstruction.2.2.2.2.1 simpa only [if_neg (not_le.mpr hinverse)] using hf refine ⟨muPlus, muMinus, hrange, hholder, hconstruction, ?_, ?_, ?_⟩ · rw [inverse_profile_target_separation E beta kappa epsilon (ell/m) ell Cpacket cPacket m hk hp he hh.1.le muPlus muMinus hformula] have hr := Real.rpow_le_rpow (by positivity : 0 ≤ (ell/(2*CM))*(B/logScale n)) hcompare hb.1 rw [Real.mul_rpow (by positivity : 0 ≤ ell/(2*CM)) (by dsimp [B]; positivity : 0 ≤ B/logScale n)] at hr have := mul_le_mul_of_nonneg_left hr (show 0 ≤ 2*epsilon by positivity) nlinarith all_goals have hconst : 0 ≤ 4/exp (-1/2)*K^2 := by positivity calc _ ≤ (n : ℝ)*((4/exp (-1/2)*K^2)*sigma^(-kappa-1)* (ell/m)^(2*beta+2*kappa+2)*momentTail sigma ell J) := mul_le_mul_of_nonneg_left (by assumption) (Nat.cast_nonneg n) _ = (4/exp (-1/2)*K^2)*((n : ℝ)*(sigma^(-kappa-1)* (ell/m)^(2*beta+2*kappa+2)*momentTail sigma ell J)) := by ring _ ≤ _ := by nlinarith [mul_le_mul_of_nonneg_left hsample hconst]
CausalSmith.Stat.NoisydoseWeakdesignTransition.compact_lower_profile_sample_budget · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:456

All three law witnesses are the explicit product-seed threshold laws. Their profiles, localization, cancellations and observed Gaussian-series bounds share the same tuning data.

Definition (Lean source)
S :
Type u_1
shared
E :
beta kappa :
ℝ
n :
ℕ
sigma epsilon cPacket C :
ℝ
Pplus Pminus Pstar :
LowerWitnessConstruction E beta kappa n sigma epsilon cPacket C Pplus Pminus Pstar :
Prop
∃ muPlus muMinus : ThresholdProfile, ∃ h ell : ℝ, ∃ m J : ℕ,
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus h ell m J
Pplus = lowerWitnessLaw E kappa muPlus
Pminus = lowerWitnessLaw E kappa muMinus
clause 1
0 < sigma
chiSqDiv (obsLaw sigma Pplus) (obsLaw sigma Pstar)
≤ C*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J
chiSqDiv (obsLaw sigma Pminus) (obsLaw sigma Pstar)
≤ C*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J
CausalSmith.Stat.NoisydoseWeakdesignTransition.LowerWitnessConstruction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:532
theorem lower_regime_witnesses

Regime tuning supplies legal threshold profiles with observed separation, observed product total variation at most a prescribed positive level τ, and Gaussian-series control. Under the stated conditions. This is the stated conclusion.

Formal statement
hLocalization_of_gate :
hLipschitz_of_gate :
hNorm_of_gate :
hGamma_of_gate :
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
tau :
ℝ
htau :
0 < tau
∃ c C epsilon Cpacket cPacket : ℝ,
0 < c
0 < C
0 < epsilon
0 < Cpacket
0 < cPacket
conclusion 1
m :
ℕ
4 ≤ m
PacketBounds kappa Cpacket cPacket m
conclusion 2
∃ n0 : ℕ,
∀ (S : Type u) [MeasurableSpace S],
∀ E : PathSpace S,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1/4),
∃ muPlus muMinus : ThresholdProfile,
(∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧
(∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧
c*frontierRate beta kappa sigma n
≤ |causalTarget E (lowerWitnessLaw E kappa muPlus)-causalTarget E (lowerWitnessLaw E kappa muMinus)| ∧
tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus))
≤ tau ∧
∃ h ell : ℝ,
∃ m J : ℕ,
LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus h ell m J ∧
(0 < sigma → chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ C*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ C*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J)
Proof (Lean source)
-- @node: lower_regime_witnesses lemma lower_regime_witnesses (hLocalization_of_gate : FilteredJacobiLocalization) (hLipschitz_of_gate : FilteredJacobiLipschitz) (hNorm_of_gate : JacobiNormOrthogonality) (hGamma_of_gate : GammaRatioAsymptotic) (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (tau : ℝ) (htau : 0 < tau) : ∃ c C epsilon Cpacket cPacket : ℝ, 0 < c ∧ 0 < C ∧ 0 < epsilon ∧ 0 < Cpacket ∧ 0 < cPacket ∧ (∀ m : ℕ, 4 ≤ m → PacketBounds kappa Cpacket cPacket m) ∧ ∃ n0 : ℕ, ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), ∃ muPlus muMinus : ThresholdProfile, (∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) ∧ (∀ a b, |(muPlus a : ℝ)-(muPlus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta ∧ |(muMinus a : ℝ)-(muMinus b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) ∧ c*frontierRate beta kappa sigma n ≤ |causalTarget E (lowerWitnessLaw E kappa muPlus)-causalTarget E (lowerWitnessLaw E kappa muMinus)| ∧ tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus)) ≤ tau ∧ ∃ h ell : ℝ, ∃ m J : ℕ, LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus h ell m J ∧ (0 < sigma → chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ C*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ C*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J) := by obtain ⟨Cpacket, cPacket, hCpacket, hcPacket, hpacket⟩ : ∃ C c : ℝ, 0 < C ∧ 0 < c ∧ ∀ m : ℕ, 4 ≤ m → PacketBounds kappa C c m := by by_cases hk0 : kappa = 0 · exact packetinterior_bounds hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate kappa hk0 · exact packetendpoint_bounds hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate kappa ⟨lt_of_le_of_ne hkappa.1 (Ne.symm hk0), hkappa.2⟩ obtain ⟨M, CI, hM, hcM, hCI, hcCI, hMCI⟩ := lower_packet_degree_constants cPacket hcPacket obtain ⟨a, ha, ha1, haCI, haSmall, haExp⟩ := lower_intermediate_radius_constant CI cPacket hCI hcPacket obtain ⟨CM, hCM, hCMlarge, hCMbudget⟩ := lower_compact_multiplier_constant cPacket (1/8) hcPacket (by norm_num) let D := 8*(kappa+1)*2^kappa let I := 4/exp (-1/2)*((kappa+1)*2^kappa*Cpacket)^2 let F := 4/exp (-1/2)*(2*(kappa+1)*2^kappa)^2 have hD : 0 < D := by dsimp [D]; have := hkappa.1; positivity have hI : 0 < I := by dsimp [I]; have := hkappa.1; positivity have hF : 0 < F := by dsimp [F]; have := hkappa.1; positivity obtain ⟨epsilon, he, heSmall, he4, heC, heBudget⟩ := lower_common_amplitude_constant Cpacket (max D (2*I)) tau hCpacket (lt_of_lt_of_le hD (le_max_left _ _)) htau have hdb : D*epsilon^2 ≤ log (1 + tau^2) := (mul_le_mul_of_nonneg_right (le_max_left _ _) (sq_nonneg epsilon)).trans heBudget have hib : 2*(4/exp (-1/2)*((kappa+1)*2^kappa*epsilon*Cpacket)^2) ≤ log (1 + tau^2) := by have h := (mul_le_mul_of_nonneg_right (le_max_right D (2*I)) (sq_nonneg epsilon)).trans heBudget dsimp [I] at h nlinarith [h] let C := max F I * epsilon^2 have hC : 0 < C := by dsimp [C]; positivity have hFC : 4/exp (-1/2)*(2*(kappa+1)*2^kappa*epsilon)^2 ≤ C := by have h := mul_le_mul_of_nonneg_right (le_max_left F I) (sq_nonneg epsilon) dsimp [F, C] at * nlinarith have hIC : 4/exp (-1/2)*((kappa+1)*2^kappa*epsilon*Cpacket)^2 ≤ C := by have h := mul_le_mul_of_nonneg_right (le_max_right F I) (sq_nonneg epsilon) dsimp [I, C] at * nlinarith let c := (2*epsilon)*min 1 (min ((a/sqrt (CI+1))^beta) (((1/8)/(2*CM))^beta)) have hc : 0 < c := by dsimp [c]; positivity have hcD : c ≤ 2*epsilon := by exact (mul_le_mul_of_nonneg_left (min_le_left _ _) (by positivity)).trans_eq (mul_one _) have hcI : c ≤ (2*epsilon)*(a/sqrt (CI+1))^beta := mul_le_mul_of_nonneg_left ((min_le_right _ _).trans (min_le_left _ _)) (by positivity) have hcM' : c ≤ (2*epsilon)*((1/8)/(2*CM))^beta := mul_le_mul_of_nonneg_left ((min_le_right _ _).trans (min_le_right _ _)) (by positivity) obtain ⟨nd, hnd, hDirect⟩ := direct_lower_profile_complete_construction beta kappa epsilon cPacket hbeta hkappa he.le heSmall tau htau.le hdb obtain ⟨nl, hnl, hLog⟩ := lower_log_sample_cutoff (M : ℝ) refine ⟨c, C, epsilon, Cpacket, cPacket, hc, hC, he, hCpacket, hcPacket, hpacket, max nd nl, ?_⟩ intro S _ E n hn sigma hs have hnD : nd ≤ n := (le_max_left _ _).trans hn have hnL : nl ≤ n := (le_max_right _ _).trans hn have hn2 : 2 ≤ n := hnd.trans hnD have hnpos : 0 < n := by omega have hb0 : beta ∈ Icc (0 : ℝ) 1 := ⟨by linarith [hbeta.1], hbeta.2⟩ have hd : 0 ≤ effDim beta kappa := by dsimp [effDim]; linarith [hbeta.1, hkappa.1] have hwindow := lower_intermediate_log_window beta kappa sigma n hd hs hn2 have hL : 1 ≤ logScale n := hwindow.1.trans hwindow.2 have hL0 : 0 < logScale n := by linarith have hroot : 0 < sqrt (logScale n) := Real.sqrt_pos.mpr hL0 have helbow : (logScale n)^(-1/2 : ℝ) = 1/sqrt (logScale n) := by rw [show (-1/2 : ℝ) = -(1/2 : ℝ) by ring, Real.rpow_neg hL0.le, ← Real.sqrt_eq_rpow, one_div] have htail (ell : ℝ) (J : ℕ) : 0 ≤ momentTail sigma ell J := by unfold momentTail exact tsum_nonneg (fun j => by positivity) have hcompare (h ell : ℝ) (J : ℕ) (hh : 0 ≤ h) {B : ℝ} (hB : B ≤ C) : B*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J ≤ C*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J := by apply mul_le_mul_of_nonneg_right _ (htail ell J) apply mul_le_mul_of_nonneg_right _ (Real.rpow_nonneg hh _) exact mul_le_mul_of_nonneg_right hB (Real.rpow_nonneg hs.1 _) by_cases hdirect : sigma ≤ directScale beta kappa n · obtain ⟨muPlus, muMinus, hrange, hholder, hsep, htv, hconstruction, hchi⟩ := hDirect S E n hnD sigma hs hdirect refine ⟨muPlus, muMinus, hrange, hholder, ?_, htv, directScale beta kappa n, directScale beta kappa n, 0, 0, hconstruction, ?_⟩ · rw [hsep] apply mul_le_mul_of_nonneg_right hcD simp only [frontierRate, frontierScale, if_pos hdirect] exact Real.rpow_nonneg (Real.rpow_nonneg (Nat.cast_nonneg n) _) _ · intro hs0 obtain ⟨hp, hm⟩ := hchi hs0 exact ⟨hp.trans (hcompare _ _ _ hconstruction.1.1.le hFC), hm.trans (hcompare _ _ _ hconstruction.1.1.le hFC)⟩ have hinverse : directScale beta kappa n < sigma := lt_of_not_ge hdirect have hs0 : 0 < sigma := lt_trans (Real.rpow_pos_of_pos (by exact_mod_cast hnpos) _) hinverse have hs' : sigma ∈ Ioc (0 : ℝ) (1/4) := ⟨hs0, hs.2⟩ have finish (muPlus muMinus : ThresholdProfile) (ell : ℝ) (m : ℕ) (hrange : ∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) (hconstruction : LowerProfileConstruction beta kappa n sigma epsilon cPacket muPlus muMinus (ell/m) ell m (floor (cPacket*m))) (hplus : (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ 2*(4/exp (-1/2)*((kappa+1)*2^kappa*epsilon*Cpacket)^2)) (hminus : (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ 2*(4/exp (-1/2)*((kappa+1)*2^kappa*epsilon*Cpacket)^2)) : tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus)) ≤ tau ∧ (0 < sigma → chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ C*sigma^(-kappa-1)*(ell/m)^(2*beta+2*kappa+2)*momentTail sigma ell (floor (cPacket*m)) ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ C*sigma^(-kappa-1)*(ell/m)^(2*beta+2*kappa+2)*momentTail sigma ell (floor (cPacket*m))) := by have hm := (hconstruction.2.2.2.1 hinverse).1 have hf := hconstruction.2.2.2.2.1 simp only [if_neg hdirect] at hf have hchi := inverse_profile_pair_chiSq_bound E beta kappa sigma epsilon ell Cpacket cPacket m (hpacket m hm) hkappa hs' he.le hCpacket.le hcPacket.le hconstruction.2.1 (by omega) muPlus muMinus hrange hf refine ⟨lower_observed_experiment_tv_le E kappa sigma hkappa muPlus muMinus n tau htau.le (obsLaw_witness_ac E kappa sigma hkappa hs muPlus (fun a => (hrange a).1)) (obsLaw_witness_ac E kappa sigma hkappa hs muMinus (fun a => (hrange a).2)) (obsLaw_witness_sqdev_integrable E kappa sigma hkappa hs muPlus (fun a => (hrange a).1)) (obsLaw_witness_sqdev_integrable E kappa sigma hkappa hs muMinus (fun a => (hrange a).2)) (hplus.trans hib) (hminus.trans hib), ?_⟩ intro _ exact ⟨hchi.1.trans (hcompare _ _ _ hconstruction.1.1.le hIC), hchi.2.trans (hcompare _ _ _ hconstruction.1.1.le hIC)⟩ by_cases hinter : sigma ≤ (logScale n)^(-1/2 : ℝ) · have hsL : sigma*sqrt (logScale n) ≤ 1 := by rw [helbow] at hinter exact (le_div_iff₀ hroot).mp hinter obtain ⟨muPlus, muMinus, hrange, hholder, hconstruction, hsep, hp, hm⟩ := intermediate_lower_profile_sample_budget E beta kappa sigma epsilon a CI Cpacket cPacket n hb0 hkappa hs' ha ha1 hCI hcPacket hcCI hwindow.1 hwindow.2 hsL haCI haSmall haExp he.le hCpacket.le heC hpacket hinverse obtain ⟨htv, hchi⟩ := finish muPlus muMinus _ _ hrange hconstruction hp hm refine ⟨muPlus, muMinus, hrange, hholder, ?_, htv, _, _, _, _, hconstruction, hchi⟩ apply le_trans _ hsep simp only [frontierRate, frontierScale, if_neg hdirect, if_pos hinter, fourierScale] exact mul_le_mul_of_nonneg_right hcI (by positivity) · have ht : 1 ≤ sigma^2*logScale n := by have hgt : 1 < sigma*sqrt (logScale n) := by rw [helbow] at hinter exact (div_lt_iff₀ hroot).mp (lt_of_not_ge hinter) have hid : (sigma*sqrt (logScale n))^2 = sigma^2*logScale n := by rw [mul_pow, Real.sq_sqrt hL0.le] rw [← hid] nlinarith only [hgt] obtain ⟨muPlus, muMinus, hrange, hholder, hconstruction, hsep, hp, hm⟩ := compact_lower_profile_sample_budget E beta kappa sigma epsilon CM (1/8) Cpacket cPacket M n hb0 hkappa hnpos hs' hL ht hCM (by norm_num) he.le hCpacket.le hcPacket heC hpacket (by exact_mod_cast hM) hcM (hLog n hnL) hCMlarge hCMbudget hinverse obtain ⟨htv, hchi⟩ := finish muPlus muMinus _ _ hrange hconstruction hp hm refine ⟨muPlus, muMinus, hrange, hholder, ?_, htv, _, _, _, _, hconstruction, hchi⟩ apply le_trans _ hsep simp only [frontierRate, frontierScale, if_neg hdirect, if_neg hinter, polynomialScale] have hB : 0 ≤ log (exp 1+sigma^2*logScale n) := Real.log_nonneg (by linarith only [ht, Real.exp_pos (1 : ℝ)]) exact mul_le_mul_of_nonneg_right hcM' (Real.rpow_nonneg (div_nonneg hB hL0.le) beta)
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_regime_witnesses · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerRegimes.lean:547
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.LowerTuning 26 declarations Lower-bound tuning: cancellation, bandwidth and sample budgets, compatible constants (19), (31), (41), (51), and uniform logarithmic size conditions.

Lower-bound tuning: cancellation, bandwidth and sample budgets, compatible constants (19), (31), (41), (51), and uniform logarithmic size conditions.

theorem lower_packet_cancellation_order Lemma lower_packet_cancellation_order in the paper ↗

Above threshold (19), cancellation order is positive and at least half its unrounded value. Under the stated conditions. This is the stated conclusion.

Formal statement
cPacket :
ℝ
m :
ℕ
hm :
2 ≤ cPacket * m
conclusion 1
(cPacket / 2) * m ≤ (floor (cPacket * m) : ℝ)
conclusion 2
1 ≤ floor (cPacket * m)
Proof (Lean source)
-- @node: lower_packet_cancellation_order lemma lower_packet_cancellation_order (cPacket : ℝ) (m : ℕ) (hm : 2 ≤ cPacket * m) : (cPacket / 2) * m ≤ (floor (cPacket * m) : ℝ) ∧ 1 ≤ floor (cPacket * m) := by have hfloor := Nat.lt_floor_add_one (cPacket * (m : ℝ)) constructor · nlinarith · have hone : (1 : ℝ) ≤ (floor (cPacket * m) : ℝ) := by linarith exact_mod_cast hone
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_packet_cancellation_order · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:12
theorem lower_gaussian_prefactor_identity Lemma lower_gaussian_prefactor_identity in the paper ↗

Equation (29) factors the Gaussian prefactor into a bandwidth power and a noise ratio. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma h :
ℝ
hs :
0 < sigma
hh :
0 < h
sigma^(-kappa-1)*h^(2*beta+2*kappa+2) = h^(effDim beta kappa)*(h/sigma)^(kappa+1)
Proof (Lean source)
-- @node: lower_gaussian_prefactor_identity lemma lower_gaussian_prefactor_identity (beta kappa sigma h : ℝ) (hs : 0 < sigma) (hh : 0 < h) : sigma^(-kappa-1)*h^(2*beta+2*kappa+2) = h^(effDim beta kappa)*(h/sigma)^(kappa+1) := by rw [Real.div_rpow hh.le hs.le] have he : 2*beta+2*kappa+2 = effDim beta kappa + (kappa+1) := by unfold effDim ring rw [he, Real.rpow_add hh] rw [show -kappa-1 = -(kappa+1) by ring, Real.rpow_neg hs.le] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_gaussian_prefactor_identity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:24
theorem lower_gaussian_prefactor_le Lemma lower_gaussian_prefactor_le in the paper ↗

When the bandwidth is below the noise scale, the ratio factor in (29) is at most one. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma h :
ℝ
hk :
0 ≤ kappa
hh :
0 < h
hhs :
h ≤ sigma
sigma^(-kappa-1)*h^(2*beta+2*kappa+2) ≤ h^(effDim beta kappa)
Proof (Lean source)
-- @node: lower_gaussian_prefactor_le lemma lower_gaussian_prefactor_le (beta kappa sigma h : ℝ) (hk : 0 ≤ kappa) (hh : 0 < h) (hhs : h ≤ sigma) : sigma^(-kappa-1)*h^(2*beta+2*kappa+2) ≤ h^(effDim beta kappa) := by have hs : 0 < sigma := hh.trans_le hhs rw [lower_gaussian_prefactor_identity beta kappa sigma h hs hh] have hratio : (h/sigma)^(kappa+1) ≤ 1 := Real.rpow_le_one (div_nonneg hh.le hs.le) ((div_le_one hs).2 hhs) (by linarith) exact (mul_le_mul_of_nonneg_left hratio (Real.rpow_nonneg hh.le _)).trans_eq (mul_one _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_gaussian_prefactor_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:38
theorem lower_direct_scale_sample_identity

The direct scale has exactly the effective-dimensional sample power appearing in (18). Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
hd :
0 < effDim beta kappa
hn :
0 < n
(n : ℝ)*(directScale beta kappa n)^(effDim beta kappa) = 1
Proof (Lean source)
-- @node: lower_direct_scale_sample_identity lemma lower_direct_scale_sample_identity (beta kappa : ℝ) (n : ℕ) (hd : 0 < effDim beta kappa) (hn : 0 < n) : (n : ℝ)*(directScale beta kappa n)^(effDim beta kappa) = 1 := by have hnR : (0 : ℝ) < n := by exact_mod_cast hn rw [directScale, ← Real.rpow_mul hnR.le] rw [show (-1 / effDim beta kappa) * effDim beta kappa = -1 by field_simp, Real.rpow_neg_one] exact mul_inv_cancel₀ hnR.ne'
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_direct_scale_sample_identity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:49
theorem lower_direct_scale_sample_cutoff

The bandwidth cutoff in (13) is chosen from the fixed effective dimension, so it is independent of the public noise scale. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
hd :
0 < effDim beta kappa
∃ n0 : ℕ,
2 ≤ n0
conclusion 1
n ≥ n0 :
directScale beta kappa n ∈ Ioc (0 : ℝ) (1/4)
Proof (Lean source)
-- @node: lower_direct_scale_sample_cutoff lemma lower_direct_scale_sample_cutoff (beta kappa : ℝ) (hd : 0 < effDim beta kappa) : ∃ n0 : ℕ, 2 ≤ n0 ∧ ∀ n ≥ n0, directScale beta kappa n ∈ Ioc (0 : ℝ) (1/4) := by let n0 := max 2 (ceil ((4 : ℝ)^effDim beta kappa)) refine ⟨n0, le_max_left _ _, ?_⟩ intro n hn have hn2 : 2 ≤ n := (le_max_left _ _).trans hn have hn0 : (0 : ℝ) < n := by exact_mod_cast (show 0 < n by omega) have hceil : ceil ((4 : ℝ)^effDim beta kappa) ≤ n := (le_max_right _ _).trans hn have hlarge : (4 : ℝ)^effDim beta kappa ≤ n := (Nat.le_ceil _).trans (by exact_mod_cast hceil) refine ⟨by unfold directScale; positivity, ?_⟩ change (n : ℝ)^(-1/effDim beta kappa) ≤ 1/4 calc _ ≤ ((4 : ℝ)^effDim beta kappa)^(-1/effDim beta kappa) := Real.rpow_le_rpow_of_nonpos (by positivity) hlarge (div_nonpos_of_nonpos_of_nonneg (by norm_num) hd.le) _ = 1/4 := by rw [← Real.rpow_mul (by norm_num : (0 : ℝ) ≤ 4), show effDim beta kappa * (-1/effDim beta kappa) = -1 by field_simp, Real.rpow_neg_one] norm_num
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_direct_scale_sample_cutoff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:60
theorem lower_direct_quadratic_sample_budget

Multiplying direct quadratic energy by n removes bandwidth dependence, as in (18). Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon :
ℝ
n :
ℕ
hk :
0 ≤ kappa
he :
0 ≤ epsilon
hd :
0 < effDim beta kappa
hn :
0 < n
(n : ℝ)*(∫ t, witnessDesignDensity kappa t * (directPerturbation beta epsilon (directScale beta kappa n) t)^2)
≤ 2*(kappa+1)*2^kappa*epsilon^2
Proof (Lean source)
-- @node: lower_direct_quadratic_sample_budget lemma lower_direct_quadratic_sample_budget (beta kappa epsilon : ℝ) (n : ℕ) (hk : 0 ≤ kappa) (he : 0 ≤ epsilon) (hd : 0 < effDim beta kappa) (hn : 0 < n) : (n : ℝ)*(∫ t, witnessDesignDensity kappa t * (directPerturbation beta epsilon (directScale beta kappa n) t)^2) ≤ 2*(kappa+1)*2^kappa*epsilon^2 := by have hh : 0 < directScale beta kappa n := by unfold directScale positivity have hb := mul_le_mul_of_nonneg_left (directPerturbation_quadratic_energy_le beta kappa epsilon _ hk he hh) (Nat.cast_nonneg n : (0 : ℝ) ≤ n) have hid := lower_direct_scale_sample_identity beta kappa n hd hn change (n : ℝ)*(directScale beta kappa n)^(2*beta+kappa+1) = 1 at hid calc _ ≤ (n : ℝ)*((2*(kappa+1)*2^kappa*epsilon^2)* (directScale beta kappa n)^(2*beta+kappa+1)) := hb _ = (2*(kappa+1)*2^kappa*epsilon^2)* ((n : ℝ)*(directScale beta kappa n)^(2*beta+kappa+1)) := by ring _ = _ := by rw [hid, mul_one]
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_direct_quadratic_sample_budget · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:87
theorem lower_factorial_tail_term_le Lemma lower_factorial_tail_term_le in the paper ↗

Factorial-series terms above the cancellation order have ratio at most one half, as in (28). Under the stated conditions. This is the stated conclusion.

Formal statement
lambda :
ℝ
J k :
ℕ
hl :
0 ≤ lambda
hJ :
2 * lambda ≤ (J : ℝ)
lambda^(k+J)/(Nat.factorial (k+J) : ℝ) ≤ (lambda^J/(Nat.factorial J : ℝ))*(1/2 : ℝ)^k
Proof (Lean source)
-- @node: lower_factorial_tail_term_le lemma lower_factorial_tail_term_le (lambda : ℝ) (J k : ℕ) (hl : 0 ≤ lambda) (hJ : 2 * lambda ≤ (J : ℝ)) : lambda^(k+J)/(Nat.factorial (k+J) : ℝ) ≤ (lambda^J/(Nat.factorial J : ℝ))*(1/2 : ℝ)^k := by have hstep (i : ℕ) : lambda^(i+J+1)/(Nat.factorial (i+J+1) : ℝ) ≤ (1/2 : ℝ)*(lambda^(i+J)/(Nat.factorial (i+J) : ℝ)) := by rw [pow_succ, Nat.factorial_succ, Nat.cast_mul, Nat.cast_add, Nat.cast_one] have hf : (0 : ℝ) < (Nat.factorial (i+J) : ℝ) := by positivity have hi : (0 : ℝ) < (i+J : ℕ)+1 := by positivity apply (div_le_iff₀ (mul_pos hi hf)).2 have hratio : lambda ≤ (1/2 : ℝ)*((i+J : ℕ)+1) := by push_cast have : (0 : ℝ) ≤ i := Nat.cast_nonneg i linarith have hm := mul_le_mul_of_nonneg_left hratio (pow_nonneg hl (i+J)) field_simp nlinarith have hgeom := le_geom (u := fun i => lambda^(i+J)/(Nat.factorial (i+J) : ℝ)) (by norm_num : (0 : ℝ) ≤ 1/2) k (fun i _ => by simpa [Nat.add_assoc, Nat.add_comm, Nat.add_left_comm] using hstep i) simpa [mul_comm] using hgeom
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_factorial_tail_term_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:110
theorem lower_momentTail_geometric_le

Summing the geometric ratio estimate gives the first inequality in (28). This is the stated conclusion. Under the stated conditions.

Formal statement
sigma ell :
ℝ
J :
ℕ
hJ :
2 * (ell ^ 2 / sigma ^ 2) ≤ (J : ℝ)
momentTail sigma ell J ≤ 2*(ell^2/sigma^2)^J/(Nat.factorial J : ℝ)
Proof (Lean source)
-- @node: lower_momentTail_geometric_le lemma lower_momentTail_geometric_le (sigma ell : ℝ) (J : ℕ) (hJ : 2 * (ell ^ 2 / sigma ^ 2) ≤ (J : ℝ)) : momentTail sigma ell J ≤ 2*(ell^2/sigma^2)^J/(Nat.factorial J : ℝ) := by let lambda : ℝ := ell^2/sigma^2 have hl : 0 ≤ lambda := by dsimp [lambda]; positivity have hf := momentTail_summable sigma ell J have hshift : momentTail sigma ell J = ∑' k : ℕ, lambda^(k+J)/(Nat.factorial (k+J) : ℝ) := by have he := hf.sum_add_tsum_nat_add J have hz : (∑ j ∈ range J, if J ≤ j then (ell^2/sigma^2)^j/(Nat.factorial j : ℝ) else 0) = 0 := by apply Finset.sum_eq_zero intro j hj simp [not_le.mpr (Finset.mem_range.mp hj)] rw [hz, zero_add] at he simpa [momentTail, lambda] using he.symm rw [hshift] have hg : Summable (fun k : ℕ => (lambda^J/(Nat.factorial J : ℝ))*(1/2 : ℝ)^k) := (summable_geometric_of_lt_one (by norm_num : (0 : ℝ) ≤ 1/2) (by norm_num : (1/2 : ℝ) < 1)).mul_left _ have hb := (Real.summable_pow_div_factorial lambda).comp_injective (show Injective (fun k : ℕ => k+J) from fun _ _ h => Nat.add_right_cancel h) calc _ ≤ ∑' k : ℕ, (lambda^J/(Nat.factorial J : ℝ))*(1/2 : ℝ)^k := hb.tsum_le_tsum (fun k => lower_factorial_tail_term_le lambda J k hl hJ) hg _ = _ := by rw [tsum_mul_left, tsum_geometric_of_lt_one (by norm_num : (0 : ℝ) ≤ 1/2) (by norm_num : (1/2 : ℝ) < 1)] dsimp [lambda] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_momentTail_geometric_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:135
theorem lower_factorial_term_exponential_le Lemma lower_factorial_term_exponential_le in the paper ↗

The factorial estimate in (28) bounds the leading term by its Stirling-scale expression. Under the stated conditions. This is the stated conclusion.

Formal statement
lambda :
ℝ
J :
ℕ
hl :
0 ≤ lambda
hJ :
0 < J
lambda^J/(Nat.factorial J : ℝ) ≤ (exp 1*lambda/J)^J
Proof (Lean source)
-- @node: lower_factorial_term_exponential_le lemma lower_factorial_term_exponential_le (lambda : ℝ) (J : ℕ) (hl : 0 ≤ lambda) (hJ : 0 < J) : lambda^J/(Nat.factorial J : ℝ) ≤ (exp 1*lambda/J)^J := by have hJR : (0 : ℝ) < J := by exact_mod_cast hJ have hfact := Real.pow_div_factorial_le_exp (J : ℝ) (Nat.cast_nonneg J : (0 : ℝ) ≤ J) J have hexp : exp (J : ℝ) = (exp 1)^J := by simp [← Real.exp_nat_mul] rw [hexp] at hfact calc _ = (lambda/(J : ℝ))^J * ((J : ℝ)^J/(Nat.factorial J : ℝ)) := by rw [div_pow] field_simp _ ≤ (lambda/(J : ℝ))^J * (exp 1)^J := mul_le_mul_of_nonneg_left hfact (pow_nonneg (div_nonneg hl hJR.le) J) _ = _ := by rw [← mul_pow]; congr 1; ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_factorial_term_exponential_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:169
theorem lower_momentTail_exponential_le

Both inequalities of (28) apply to the public Gaussian moment tail. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell :
ℝ
J :
ℕ
hpos :
0 < J
hJ :
2 * (ell ^ 2 / sigma ^ 2) ≤ (J : ℝ)
momentTail sigma ell J ≤ 2*(exp 1*(ell^2/sigma^2)/J)^J
Proof (Lean source)
-- @node: lower_momentTail_exponential_le lemma lower_momentTail_exponential_le (sigma ell : ℝ) (J : ℕ) (hpos : 0 < J) (hJ : 2 * (ell ^ 2 / sigma ^ 2) ≤ (J : ℝ)) : momentTail sigma ell J ≤ 2*(exp 1*(ell^2/sigma^2)/J)^J := by have hterm := lower_factorial_term_exponential_le (ell^2/sigma^2) J (by positivity) hpos calc _ ≤ 2*((ell^2/sigma^2)^J/(Nat.factorial J : ℝ)) := by simpa [mul_div_assoc] using lower_momentTail_geometric_le sigma ell J hJ _ ≤ _ := mul_le_mul_of_nonneg_left hterm (by norm_num)
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_momentTail_exponential_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:187
theorem lower_intermediate_tail_decay

Equation (34): the small radius and linear cancellation order give exponential suppression in the packet degree, uniformly at the intermediate-regime boundary. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell a gamma :
ℝ
m J :
ℕ
hg :
0 < gamma
hm :
0 < m
hlambda :
ell^2/sigma^2 = a^2*m
horder :
gamma*m ≤ (J : ℝ)
ha :
a^2 ≤ gamma/2
hexp :
exp 1*a^2/gamma ≤ exp (-1/gamma)
momentTail sigma ell J ≤ 2*exp (-(m : ℝ))
Proof (Lean source)
-- @node: lower_intermediate_tail_decay lemma lower_intermediate_tail_decay (sigma ell a gamma : ℝ) (m J : ℕ) (hg : 0 < gamma) (hm : 0 < m) (hlambda : ell^2/sigma^2 = a^2*m) (horder : gamma*m ≤ (J : ℝ)) (ha : a^2 ≤ gamma/2) (hexp : exp 1*a^2/gamma ≤ exp (-1/gamma)) : momentTail sigma ell J ≤ 2*exp (-(m : ℝ)) := by have hmR : (0 : ℝ) < m := by exact_mod_cast hm have hJR : (0 : ℝ) < J := (mul_pos hg hmR).trans_le horder have hJ : 0 < J := by exact_mod_cast hJR have hcut : 2*(ell^2/sigma^2) ≤ (J : ℝ) := by rw [hlambda] nlinarith have hbase : exp 1*(ell^2/sigma^2)/J ≤ exp (-1/gamma) := by rw [hlambda] apply le_trans _ hexp apply (div_le_div_iff₀ hJR hg).2 have := mul_le_mul_of_nonneg_left horder (show 0 ≤ exp 1*a^2 by positivity) nlinarith calc _ ≤ 2*(exp 1*(ell^2/sigma^2)/J)^J := lower_momentTail_exponential_le sigma ell J hJ hcut _ ≤ 2*(exp (-1/gamma))^J := mul_le_mul_of_nonneg_left (pow_le_pow_left₀ (by positivity) hbase J) (by norm_num) _ = 2*exp ((J : ℝ)*(-1/gamma)) := by rw [Real.exp_nat_mul] _ ≤ _ := by apply mul_le_mul_of_nonneg_left _ (by norm_num) apply Real.exp_le_exp.mpr rw [show (J : ℝ)*(-1/gamma) = -(J : ℝ)/gamma by ring] apply (div_le_iff₀ hg).2 nlinarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_intermediate_tail_decay · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:198
theorem lower_intermediate_sample_decay Lemma lower_intermediate_sample_decay in the paper ↗

The logarithmic degree choice in (30) absorbs the effective sample size in (35). Under the stated conditions. This is the stated conclusion.

Formal statement
N :
ℝ
m :
ℕ
hN :
0 ≤ N
hm :
log (exp 1+N) ≤ (m : ℝ)
N*exp (-(m : ℝ)) ≤ 1
Proof (Lean source)
-- @node: lower_intermediate_sample_decay lemma lower_intermediate_sample_decay (N : ℝ) (m : ℕ) (hN : 0 ≤ N) (hm : log (exp 1+N) ≤ (m : ℝ)) : N*exp (-(m : ℝ)) ≤ 1 := by have hpos : 0 < exp 1+N := by positivity calc _ ≤ N*exp (-log (exp 1+N)) := mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (neg_le_neg hm)) hN _ = N/(exp 1+N) := by rw [Real.exp_neg, Real.exp_log hpos, div_eq_mul_inv] _ ≤ 1 := (div_le_one hpos).2 (by linarith [Real.exp_pos (1 : ℝ)])
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_intermediate_sample_decay · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:233
theorem lower_intermediate_gaussian_sample_budget

Equations (29), (34), and (35) bound the complete intermediate-regime Gaussian-series sample factor by two, without a noise-dependent constant. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma h ell a gamma :
ℝ
n m J :
ℕ
hk :
0 ≤ kappa
hd :
0 ≤ effDim beta kappa
hh :
0 < h
hhs :
h ≤ sigma
hg :
0 < gamma
hm :
0 < m
hlambda :
ell^2/sigma^2 = a^2*m
horder :
gamma*m ≤ (J : ℝ)
ha :
a^2 ≤ gamma/2
hexp :
exp 1*a^2/gamma ≤ exp (-1/gamma)
hdegree :
log (exp 1+(n : ℝ)*sigma^effDim beta kappa) ≤ (m : ℝ)
(n : ℝ)*(sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J) ≤ 2
Proof (Lean source)
-- @node: lower_intermediate_gaussian_sample_budget lemma lower_intermediate_gaussian_sample_budget (beta kappa sigma h ell a gamma : ℝ) (n m J : ℕ) (hk : 0 ≤ kappa) (hd : 0 ≤ effDim beta kappa) (hh : 0 < h) (hhs : h ≤ sigma) (hg : 0 < gamma) (hm : 0 < m) (hlambda : ell^2/sigma^2 = a^2*m) (horder : gamma*m ≤ (J : ℝ)) (ha : a^2 ≤ gamma/2) (hexp : exp 1*a^2/gamma ≤ exp (-1/gamma)) (hdegree : log (exp 1+(n : ℝ)*sigma^effDim beta kappa) ≤ (m : ℝ)) : (n : ℝ)*(sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J) ≤ 2 := by have hs := hh.trans_le hhs have hpref := (lower_gaussian_prefactor_le beta kappa sigma h hk hh hhs).trans (Real.rpow_le_rpow hh.le hhs hd) have htail := lower_intermediate_tail_decay sigma ell a gamma m J hg hm hlambda horder ha hexp have hsample := lower_intermediate_sample_decay ((n : ℝ)*sigma^effDim beta kappa) m (by positivity) hdegree calc _ ≤ (n : ℝ)*(sigma^effDim beta kappa*(2*exp (-(m : ℝ)))) := mul_le_mul_of_nonneg_left (mul_le_mul hpref htail (by unfold momentTail exact tsum_nonneg (fun _ => by positivity)) (by positivity)) (Nat.cast_nonneg n) _ = 2*(((n : ℝ)*sigma^effDim beta kappa)*exp (-(m : ℝ))) := by ring _ ≤ 2 := by linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_intermediate_gaussian_sample_budget · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:245
theorem lower_compact_tail_decay

The decay exponent in (45) yields the compact-regime tail estimate used in (46). Under the stated conditions. This is the stated conclusion.

Formal statement
sigma ell L :
ℝ
J :
ℕ
hJ :
0 < J
hlambda :
0 < ell^2/sigma^2
hcut :
2*(ell^2/sigma^2) ≤ (J : ℝ)
hdecay :
4*L ≤ (J : ℝ)*log ((J : ℝ)/(exp 1*(ell^2/sigma^2)))
momentTail sigma ell J ≤ 2*exp (-4*L)
Proof (Lean source)
-- @node: lower_compact_tail_decay lemma lower_compact_tail_decay (sigma ell L : ℝ) (J : ℕ) (hJ : 0 < J) (hlambda : 0 < ell^2/sigma^2) (hcut : 2*(ell^2/sigma^2) ≤ (J : ℝ)) (hdecay : 4*L ≤ (J : ℝ)*log ((J : ℝ)/(exp 1*(ell^2/sigma^2)))) : momentTail sigma ell J ≤ 2*exp (-4*L) := by have hJR : (0 : ℝ) < J := by exact_mod_cast hJ have hbase : 0 < exp 1*(ell^2/sigma^2)/J := by positivity have hlog : log (exp 1*(ell^2/sigma^2)/J) = -log ((J : ℝ)/(exp 1*(ell^2/sigma^2))) := by rw [← Real.log_inv] congr 1 field_simp calc _ ≤ 2*(exp 1*(ell^2/sigma^2)/J)^J := lower_momentTail_exponential_le sigma ell J hJ hcut _ = 2*exp ((J : ℝ)*log (exp 1*(ell^2/sigma^2)/J)) := by rw [Real.exp_nat_mul, Real.exp_log hbase] _ ≤ _ := by rw [hlog] apply mul_le_mul_of_nonneg_left _ (by norm_num) apply Real.exp_le_exp.mpr linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_tail_decay · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:270
theorem lower_compact_sample_decay

The compact-regime exponential tail absorbs the sample size in (46). Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
hn :
0 < n
(n : ℝ)*exp (-4*logScale n) ≤ 1
Proof (Lean source)
-- @node: lower_compact_sample_decay lemma lower_compact_sample_decay (n : ℕ) (hn : 0 < n) : (n : ℝ)*exp (-4*logScale n) ≤ 1 := by have hnR : (0 : ℝ) < n := by exact_mod_cast hn have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast hn have hL : 0 ≤ logScale n := by unfold logScale apply Real.log_nonneg exact one_le_mul_of_one_le_of_one_le (Real.one_le_exp (by norm_num)) hn1 calc _ ≤ (n : ℝ)*exp (-logScale n) := mul_le_mul_of_nonneg_left (Real.exp_le_exp.mpr (by linarith)) hnR.le _ = 1/exp 1 := by rw [logScale, Real.exp_neg, Real.exp_log (by positivity)] field_simp _ ≤ 1 := (div_le_one (Real.exp_pos 1)).2 (Real.one_le_exp (by norm_num))
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_sample_decay · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:295
theorem lower_compact_gaussian_sample_budget

Equations (29), (45), and (46) give a uniform compact-regime Gaussian-series sample budget, after the degree choice has supplied the logarithmic decay. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma h ell :
ℝ
n J :
ℕ
hk :
0 ≤ kappa
hd :
0 ≤ effDim beta kappa
hh :
h ∈ Ioc (0 : ℝ) 1
hhs :
h ≤ sigma
hn :
0 < n
hJ :
0 < J
hlambda :
0 < ell^2/sigma^2
hcut :
2*(ell^2/sigma^2) ≤ (J : ℝ)
hdecay :
4*logScale n ≤ (J : ℝ)*log ((J : ℝ)/(exp 1*(ell^2/sigma^2)))
(n : ℝ)*(sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J) ≤ 2
Proof (Lean source)
-- @node: lower_compact_gaussian_sample_budget lemma lower_compact_gaussian_sample_budget (beta kappa sigma h ell : ℝ) (n J : ℕ) (hk : 0 ≤ kappa) (hd : 0 ≤ effDim beta kappa) (hh : h ∈ Ioc (0 : ℝ) 1) (hhs : h ≤ sigma) (hn : 0 < n) (hJ : 0 < J) (hlambda : 0 < ell^2/sigma^2) (hcut : 2*(ell^2/sigma^2) ≤ (J : ℝ)) (hdecay : 4*logScale n ≤ (J : ℝ)*log ((J : ℝ)/(exp 1*(ell^2/sigma^2)))) : (n : ℝ)*(sigma^(-kappa-1)*h^(2*beta+2*kappa+2)*momentTail sigma ell J) ≤ 2 := by have hpref := (lower_gaussian_prefactor_le beta kappa sigma h hk hh.1 hhs).trans (Real.rpow_le_one hh.1.le hh.2 hd) have htail := lower_compact_tail_decay sigma ell (logScale n) J hJ hlambda hcut hdecay have hsample := lower_compact_sample_decay n hn calc _ ≤ (n : ℝ)*(1*(2*exp (-4*logScale n))) := mul_le_mul_of_nonneg_left (mul_le_mul hpref htail (by unfold momentTail exact tsum_nonneg (fun _ => by positivity)) (by norm_num)) (Nat.cast_nonneg n) _ = 2*((n : ℝ)*exp (-4*logScale n)) := by ring _ ≤ 2 := by linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_gaussian_sample_budget · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:313
theorem lower_intermediate_degree_bounds Lemma lower_intermediate_degree_bounds in the paper ↗

Equation (32): rounding the logarithmic degree preserves both comparison constants. Under the stated conditions. This is the stated conclusion.

Formal statement
CI S :
ℝ
hCI :
1 ≤ CI
hS :
1 ≤ S
conclusion 1
CI*S ≤ (ceil (CI*S) : ℝ)
conclusion 2
(ceil (CI*S) : ℝ) ≤ (CI+1)*S
conclusion 3
1 ≤ ceil (CI*S)
Proof (Lean source)
-- @node: lower_intermediate_degree_bounds lemma lower_intermediate_degree_bounds (CI S : ℝ) (hCI : 1 ≤ CI) (hS : 1 ≤ S) : CI*S ≤ (ceil (CI*S) : ℝ) ∧ (ceil (CI*S) : ℝ) ≤ (CI+1)*S ∧ 1 ≤ ceil (CI*S) := by have hlo := Nat.le_ceil (CI*S) have hhi := Nat.ceil_lt_add_one (show 0 ≤ CI*S by positivity) have hone : (1 : ℝ) ≤ ceil (CI*S) := by nlinarith exact ⟨hlo, by nlinarith, by exact_mod_cast hone⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_intermediate_degree_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:336
theorem lower_intermediate_radius_bounds Lemma lower_intermediate_radius_bounds in the paper ↗

Equation (33): the concrete intermediate radius is legal and its bandwidth is below noise. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma a CI S L :
ℝ
hs :
0 < sigma
ha :
0 < a
ha1 :
a ≤ 1
hCI :
1 ≤ CI
hS :
1 ≤ S
hSL :
S ≤ L
hsL :
sigma*sqrt L ≤ 1
haCI :
a*sqrt (CI+1) ≤ 1/4
m :
ceil (CI*S)
ell :
a*sigma*sqrt m
ell ∈ Ioc (0 : ℝ) (1/4)
0 < ell/(m : ℝ)
ell/(m : ℝ) ≤ sigma
Proof (Lean source)
-- @node: lower_intermediate_radius_bounds lemma lower_intermediate_radius_bounds (sigma a CI S L : ℝ) (hs : 0 < sigma) (ha : 0 < a) (ha1 : a ≤ 1) (hCI : 1 ≤ CI) (hS : 1 ≤ S) (hSL : S ≤ L) (hsL : sigma*sqrt L ≤ 1) (haCI : a*sqrt (CI+1) ≤ 1/4) : let m := ceil (CI*S) let ell := a*sigma*sqrt m ell ∈ Ioc (0 : ℝ) (1/4) ∧ 0 < ell/(m : ℝ) ∧ ell/(m : ℝ) ≤ sigma := by dsimp only obtain ⟨hlo, hhi, hm⟩ := lower_intermediate_degree_bounds CI S hCI hS have hmR : (1 : ℝ) ≤ ceil (CI*S) := by exact_mod_cast hm have hm0 : (0 : ℝ) < ceil (CI*S) := by linarith have hroot : sqrt (ceil (CI*S) : ℝ) ≤ sqrt (CI+1)*sqrt L := by rw [← Real.sqrt_mul (by linarith : 0 ≤ CI+1)] apply Real.sqrt_le_sqrt exact hhi.trans (mul_le_mul_of_nonneg_left hSL (by linarith)) have hell : a*sigma*sqrt (ceil (CI*S) : ℝ) ≤ 1/4 := by calc _ ≤ a*sigma*(sqrt (CI+1)*sqrt L) := mul_le_mul_of_nonneg_left hroot (by positivity) _ = (a*sqrt (CI+1))*(sigma*sqrt L) := by ring _ ≤ (a*sqrt (CI+1))*1 := mul_le_mul_of_nonneg_left hsL (by positivity) _ ≤ 1/4 := by simpa using haCI have hsqrt : sqrt (ceil (CI*S) : ℝ) ≤ (ceil (CI*S) : ℝ) := by apply (Real.sqrt_le_iff).2 constructor · positivity · nlinarith refine ⟨⟨by positivity, hell⟩, by positivity, ?_⟩ apply (div_le_iff₀ hm0).2 calc _ ≤ 1*sigma*sqrt (ceil (CI*S) : ℝ) := by gcongr _ ≤ sigma*(ceil (CI*S) : ℝ) := by simpa using mul_le_mul_of_nonneg_left hsqrt hs.le
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_intermediate_radius_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:346
theorem lower_intermediate_lambda_identity Lemma lower_intermediate_lambda_identity in the paper ↗

The radius in (30) gives exactly the moment-tail parameter a²m. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma a :
ℝ
m :
ℕ
hs :
0 < sigma
(a*sigma*sqrt m)^2/sigma^2 = a^2*m
Proof (Lean source)
-- @node: lower_intermediate_lambda_identity lemma lower_intermediate_lambda_identity (sigma a : ℝ) (m : ℕ) (hs : 0 < sigma) : (a*sigma*sqrt m)^2/sigma^2 = a^2*m := by rw [mul_pow, mul_pow, Real.sq_sqrt (Nat.cast_nonneg m)] field_simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_intermediate_lambda_identity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:384
theorem lower_intermediate_bandwidth_comparison Lemma lower_intermediate_bandwidth_comparison in the paper ↗

Equation (36): the rounded degree preserves a uniform fraction of the intermediate frontier. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma a CI S :
ℝ
hs :
0 < sigma
ha :
0 < a
hCI :
1 ≤ CI
hS :
1 ≤ S
(a/sqrt (CI+1))*(sigma/sqrt S)
≤ (a*sigma*sqrt (ceil (CI*S) : ℝ))/(ceil (CI*S) : ℝ)
Proof (Lean source)
-- @node: lower_intermediate_bandwidth_comparison lemma lower_intermediate_bandwidth_comparison (sigma a CI S : ℝ) (hs : 0 < sigma) (ha : 0 < a) (hCI : 1 ≤ CI) (hS : 1 ≤ S) : (a/sqrt (CI+1))*(sigma/sqrt S) ≤ (a*sigma*sqrt (ceil (CI*S) : ℝ))/(ceil (CI*S) : ℝ) := by obtain ⟨hlo, hhi, hm⟩ := lower_intermediate_degree_bounds CI S hCI hS have hmR : (0 : ℝ) < ceil (CI*S) := by exact_mod_cast (show 0 < ceil (CI*S) by omega) have hr : 0 < sqrt (ceil (CI*S) : ℝ) := Real.sqrt_pos.2 hmR have hroot := Real.sqrt_le_sqrt hhi rw [Real.sqrt_mul (by linarith : 0 ≤ CI+1)] at hroot have hid : (a*sigma*sqrt (ceil (CI*S) : ℝ))/(ceil (CI*S) : ℝ) = a*sigma/sqrt (ceil (CI*S) : ℝ) := by apply (div_eq_div_iff hmR.ne' hr.ne').2 calc _ = a*sigma*(sqrt (ceil (CI*S) : ℝ))^2 := by ring _ = _ := by rw [Real.sq_sqrt hmR.le] rw [hid] calc _ = a*sigma/(sqrt (CI+1)*sqrt S) := by ring _ ≤ _ := div_le_div_of_nonneg_left (by positivity) hr hroot
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_intermediate_bandwidth_comparison · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:392
theorem lower_packet_degree_constants Lemma lower_packet_degree_constants in the paper ↗

The fixed degree threshold in (19) also supplies the intermediate multiplier in (32). Under the stated conditions. This is the stated conclusion.

Formal statement
cPacket :
ℝ
hc :
0 < cPacket
∃ M : ℕ, ∃ CI : ℝ,
conclusion 1
4 ≤ M
conclusion 2
2 ≤ cPacket*M
conclusion 3
4 ≤ CI
conclusion 4
2 ≤ cPacket*CI
conclusion 5
(M : ℝ) ≤ CI
Proof (Lean source)
-- @node: lower_packet_degree_constants lemma lower_packet_degree_constants (cPacket : ℝ) (hc : 0 < cPacket) : ∃ M : ℕ, ∃ CI : ℝ, 4 ≤ M ∧ 2 ≤ cPacket*M ∧ 4 ≤ CI ∧ 2 ≤ cPacket*CI ∧ (M : ℝ) ≤ CI := by let M := ceil (max (4 : ℝ) (2/cPacket)) have h4 : (4 : ℝ) ≤ M := (le_max_left _ _).trans (Nat.le_ceil _) have hcut : 2/cPacket ≤ (M : ℝ) := (le_max_right _ _).trans (Nat.le_ceil _) have hcM : 2 ≤ cPacket*M := by have := (div_le_iff₀ hc).1 hcut nlinarith exact ⟨M, (M : ℝ), by exact_mod_cast h4, hcM, h4, hcM, le_rfl⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_packet_degree_constants · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:414
theorem lower_intermediate_radius_constant Lemma lower_intermediate_radius_constant in the paper ↗

After fixing the intermediate degree constant, all four small-radius restrictions in (31) can be met by one positive constant, independent of sample size and noise. Under the stated conditions. This is the stated conclusion.

Formal statement
CI cPacket :
ℝ
hCI :
4 ≤ CI
hc :
0 < cPacket
∃ a : ℝ,
conclusion 1
0 < a
conclusion 2
a ≤ 1
conclusion 3
a*sqrt (CI+1) ≤ 1/4
conclusion 4
a^2 ≤ (cPacket/2)/2
conclusion 5
exp 1*a^2/(cPacket/2) ≤ exp (-1/(cPacket/2))
Proof (Lean source)
-- @node: lower_intermediate_radius_constant lemma lower_intermediate_radius_constant (CI cPacket : ℝ) (hCI : 4 ≤ CI) (hc : 0 < cPacket) : ∃ a : ℝ, 0 < a ∧ a ≤ 1 ∧ a*sqrt (CI+1) ≤ 1/4 ∧ a^2 ≤ (cPacket/2)/2 ∧ exp 1*a^2/(cPacket/2) ≤ exp (-1/(cPacket/2)) := by let gamma := cPacket/2 have hg : 0 < gamma := by dsimp [gamma]; positivity let b := min (gamma/2) (gamma*exp (-1/gamma)/exp 1) have hb : 0 < b := by dsimp [b]; positivity let a := min 1 (min (1/(4*sqrt (CI+1))) (sqrt b)) have hroot : 0 < sqrt (CI+1) := Real.sqrt_pos.2 (by linarith) have ha : 0 < a := by dsimp [a]; positivity have ha1 : a ≤ 1 := min_le_left _ _ have har : a ≤ 1/(4*sqrt (CI+1)) := (min_le_right _ _).trans (min_le_left _ _) have has : a ≤ sqrt b := (min_le_right _ _).trans (min_le_right _ _) have hasq : a^2 ≤ b := by nlinarith [Real.sq_sqrt hb.le, Real.sqrt_nonneg b] have hsmall : a^2 ≤ gamma/2 := hasq.trans (min_le_left _ _) have hexp : a^2 ≤ gamma*exp (-1/gamma)/exp 1 := hasq.trans (min_le_right _ _) refine ⟨a, ha, ha1, ?_, hsmall, ?_⟩ · have := (le_div_iff₀ (by positivity : 0 < 4*sqrt (CI+1))).1 har nlinarith · change exp 1*a^2/gamma ≤ exp (-1/gamma) apply (div_le_iff₀ hg).2 simpa only [mul_comm] using (le_div_iff₀ (Real.exp_pos 1)).1 hexp
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_intermediate_radius_constant · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:427
theorem lower_compact_multiplier_constant Lemma lower_compact_multiplier_constant in the paper ↗

The large compact multiplier in (41) satisfies both the tail and sample-budget restrictions with the fixed support radius, independently of sample size and noise. Under the stated conditions. This is the stated conclusion.

Formal statement
cPacket ell :
ℝ
hc :
0 < cPacket
hell :
0 < ell
∃ CM : ℝ,
conclusion 1
1 ≤ CM
conclusion 2
2*exp 1 ≤ (cPacket/2)*CM/(exp 1*ell^2)
conclusion 3
8 ≤ (cPacket/2)*CM
Proof (Lean source)
-- @node: lower_compact_multiplier_constant lemma lower_compact_multiplier_constant (cPacket ell : ℝ) (hc : 0 < cPacket) (hell : 0 < ell) : ∃ CM : ℝ, 1 ≤ CM ∧ 2*exp 1 ≤ (cPacket/2)*CM/(exp 1*ell^2) ∧ 8 ≤ (cPacket/2)*CM := by let gamma := cPacket/2 have hg : 0 < gamma := by dsimp [gamma]; positivity let CM := max 1 (max (8/gamma) (2*exp 1*(exp 1*ell^2)/gamma)) have h1 : 1 ≤ CM := le_max_left _ _ have h8 : 8/gamma ≤ CM := (le_max_left _ _).trans (le_max_right _ _) have htail : 2*exp 1*(exp 1*ell^2)/gamma ≤ CM := (le_max_right _ _).trans (le_max_right _ _) refine ⟨CM, h1, ?_, ?_⟩ · change 2*exp 1 ≤ gamma*CM/(exp 1*ell^2) apply (le_div_iff₀ (by positivity : 0 < exp 1*ell^2)).2 simpa only [mul_comm] using (div_le_iff₀ hg).1 htail · change 8 ≤ gamma*CM simpa only [mul_comm] using (div_le_iff₀ hg).1 h8
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_compact_multiplier_constant · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:458
theorem lower_common_amplitude_constant Lemma lower_common_amplitude_constant in the paper ↗

One positive amplitude meets the direct and inverse range/smoothness requirements and the common logarithmic testing budget log(1+τ²) in (51). The multiplier is fixed before choosing the amplitude, as required by (48). Under the stated conditions. This is the stated conclusion.

Formal statement
Cpacket Cstar tau :
ℝ
hC :
0 < Cpacket
hstar :
0 < Cstar
htau :
0 < tau
∃ epsilon : ℝ,
conclusion 1
0 < epsilon
conclusion 2
epsilon ≤ 1/8
conclusion 3
4*epsilon ≤ 1
conclusion 4
epsilon*Cpacket ≤ 1/8
conclusion 5
Cstar*epsilon^2 ≤ log (1 + tau^2)
Proof (Lean source)
-- @node: lower_common_amplitude_constant lemma lower_common_amplitude_constant (Cpacket Cstar tau : ℝ) (hC : 0 < Cpacket) (hstar : 0 < Cstar) (htau : 0 < tau) : ∃ epsilon : ℝ, 0 < epsilon ∧ epsilon ≤ 1/8 ∧ 4*epsilon ≤ 1 ∧ epsilon*Cpacket ≤ 1/8 ∧ Cstar*epsilon^2 ≤ log (1 + tau^2) := by have hlog : 0 < log (1 + tau^2) := Real.log_pos (by have := pow_pos htau 2; linarith) let b := log (1 + tau^2)/Cstar have hb : 0 < b := by dsimp [b]; positivity let epsilon := min (1/8 : ℝ) (min (1/(8*Cpacket)) (sqrt b)) have he : 0 < epsilon := by dsimp [epsilon]; positivity have heSmall : epsilon ≤ 1/8 := min_le_left _ _ have heC : epsilon ≤ 1/(8*Cpacket) := (min_le_right _ _).trans (min_le_left _ _) have heRoot : epsilon ≤ sqrt b := (min_le_right _ _).trans (min_le_right _ _) have heSq : epsilon^2 ≤ b := by nlinarith [Real.sq_sqrt hb.le, Real.sqrt_nonneg b] refine ⟨epsilon, he, heSmall, by linarith, ?_, ?_⟩ · have := (le_div_iff₀ (by positivity : 0 < 8*Cpacket)).1 heC nlinarith · have := (le_div_iff₀ hstar).1 heSq nlinarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_common_amplitude_constant · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:480
theorem lower_intermediate_log_window

For every admissible noise scale, the intermediate logarithm lies between one and the public sample logarithm once there are at least two observations; this is uniform in noise as used in (32)--(33). Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma :
ℝ
n :
ℕ
hd :
0 ≤ effDim beta kappa
hs :
sigma ∈ Icc (0 : ℝ) (1/4)
hn :
2 ≤ n
conclusion 1
1 ≤ log (exp 1+(n : ℝ)*sigma^effDim beta kappa)
conclusion 2
log (exp 1+(n : ℝ)*sigma^effDim beta kappa) ≤ logScale n
Proof (Lean source)
-- @node: lower_intermediate_log_window lemma lower_intermediate_log_window (beta kappa sigma : ℝ) (n : ℕ) (hd : 0 ≤ effDim beta kappa) (hs : sigma ∈ Icc (0 : ℝ) (1/4)) (hn : 2 ≤ n) : 1 ≤ log (exp 1+(n : ℝ)*sigma^effDim beta kappa) ∧ log (exp 1+(n : ℝ)*sigma^effDim beta kappa) ≤ logScale n := by have hnR : (2 : ℝ) ≤ n := by exact_mod_cast hn have he : 2 ≤ exp 1 := by linarith [Real.add_one_le_exp (1 : ℝ)] have hpower : sigma^effDim beta kappa ≤ 1 := Real.rpow_le_one hs.1 (by linarith [hs.2]) hd have hN : (n : ℝ)*sigma^effDim beta kappa ≤ n := by simpa using mul_le_mul_of_nonneg_left hpower (Nat.cast_nonneg n) have hNpos : 0 ≤ (n : ℝ)*sigma^effDim beta kappa := mul_nonneg (Nat.cast_nonneg n) (Real.rpow_nonneg hs.1 _) constructor · have hlog := Real.log_le_log (Real.exp_pos 1) (show exp 1 ≤ exp 1+(n : ℝ)*sigma^effDim beta kappa by linarith) simpa using hlog · have hbound : exp 1+(n : ℝ)*sigma^effDim beta kappa ≤ exp 1*n := by nlinarith simpa only [logScale] using Real.log_le_log (show 0 < exp 1+(n : ℝ)*sigma^effDim beta kappa by linarith [Real.exp_pos (1 : ℝ)]) hbound
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_intermediate_log_window · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:507
theorem lower_log_sample_cutoff

A deterministic sample cutoff makes the compact degree size condition hold uniformly in noise, without adding it as an assumption on the model. This is the stated conclusion.

Formal statement
M :
ℝ
∃ n0 : ℕ,
2 ≤ n0
conclusion 1
n ≥ n0 :
M^2 ≤ logScale n
Proof (Lean source)
-- @node: lower_log_sample_cutoff lemma lower_log_sample_cutoff (M : ℝ) : ∃ n0 : ℕ, 2 ≤ n0 ∧ ∀ n ≥ n0, M^2 ≤ logScale n := by let n0 := max 2 (ceil (exp (M^2))) refine ⟨n0, le_max_left _ _, ?_⟩ intro n hn have hceil : ceil (exp (M^2)) ≤ n := (le_max_right _ _).trans hn have hlarge : exp (M^2) ≤ (n : ℝ) := (Nat.le_ceil _).trans (by exact_mod_cast hceil) have he : 1 ≤ exp 1 := by linarith [Real.add_one_le_exp (1 : ℝ)] have hproduct : exp (M^2) ≤ exp 1*n := hlarge.trans (le_mul_of_one_le_left (Nat.cast_nonneg n) he) have := Real.log_le_log (Real.exp_pos (M^2)) hproduct simpa only [Real.log_exp, logScale] using this
CausalSmith.Stat.NoisydoseWeakdesignTransition.lower_log_sample_cutoff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerTuning.lean:534
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.LowerWitness 44 declarations Helpers — LowerWitness

Helpers — LowerWitness

def witnessDesignDensity

Common fixed-envelope weak design, including the constant-density kappa=0 case.

Definition (Lean source)
kappa t :
ℝ
witnessDesignDensity kappa t :
ℝ
if t ∈ Icc (-1/2 : ℝ) (1/2) then (kappa+1)*(2 : ℝ)^kappa*|t|^kappa else 0
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDesignDensity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:21
theorem witness_abs_power_integral Lemma witness_abs_power_integral in the paper ↗

The symmetric power integral used to normalize the common latent design. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
(∫ t in (-1/2 : ℝ)..(1/2), |t| ^ kappa) = 2 * (1/2 : ℝ) ^ (kappa+1) / (kappa+1)
Proof (Lean source)
-- @node: witness_abs_power_integral lemma witness_abs_power_integral (kappa : ℝ) (hkappa : 0 ≤ kappa) : (∫ t in (-1/2 : ℝ)..(1/2), |t| ^ kappa) = 2 * (1/2 : ℝ) ^ (kappa+1) / (kappa+1) := by have hc : Continuous (fun t : ℝ => |t| ^ kappa) := by first | fun_prop | exact continuous_abs.rpow_const (fun _ => inr hkappa) have hhalf : (∫ t in (0 : ℝ)..(1/2), |t| ^ kappa) = (1/2 : ℝ) ^ (kappa+1) / (kappa+1) := by calc _ = ∫ t in (0 : ℝ)..(1/2), t ^ kappa := by apply intervalIntegral.integral_congr intro t ht rw [uIcc_of_le (by norm_num : (0 : ℝ) ≤ 1/2)] at ht simp only [abs_of_nonneg ht.1] _ = _ := by rw [integral_rpow (inl (by linarith : -1 < kappa))] rw [Real.zero_rpow (by linarith : kappa+1 ≠ 0), sub_zero] have hleft : (∫ t in (-1/2 : ℝ)..0, |t| ^ kappa) = ∫ t in (0 : ℝ)..(1/2), |t| ^ kappa := by have h := intervalIntegral.integral_comp_neg (fun t : ℝ => |t| ^ kappa) (a := (-1/2 : ℝ)) (b := 0) norm_num only [abs_neg, neg_zero, neg_div, neg_neg] at h simpa only [neg_div] using h rw [← intervalIntegral.integral_add_adjacent_intervals (hc.intervalIntegrable (-1/2) 0) (hc.intervalIntegrable 0 (1/2)), hleft, hhalf] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.witness_abs_power_integral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:24
def doseVolume

Lebesgue measure on the compact dose subtype.

Definition (Lean source)
doseVolume :
volume.comap val
CausalSmith.Stat.NoisydoseWeakdesignTransition.doseVolume · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:52
theorem witnessDesignDensity_integral

The common design integrates to one on the public dose subtype. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
(∫ a : Dose, witnessDesignDensity kappa ((a : ℝ)-a0) ∂doseVolume) = 1
Proof (Lean source)
-- @node: witnessDesignDensity_integral lemma witnessDesignDensity_integral (kappa : ℝ) (hkappa : 0 ≤ kappa) : (∫ a : Dose, witnessDesignDensity kappa ((a : ℝ)-a0) ∂doseVolume) = 1 := by rw [doseVolume, integral_subtype_comap (s := Icc (0 : ℝ) 1) measurableSet_Icc (fun a : ℝ => witnessDesignDensity kappa (a-a0))] have heq : (∫ a in Icc (0 : ℝ) 1, witnessDesignDensity kappa (a-a0)) = ∫ a in Icc (0 : ℝ) 1, (kappa+1)*2^kappa*|a-a0|^kappa := by apply setIntegral_congr_fun measurableSet_Icc intro a ha simp only [witnessDesignDensity, if_pos (show a-a0 ∈ Icc (-1/2 : ℝ) (1/2) by dsimp [a0]; constructor <;> linarith [ha.1, ha.2])] rw [heq, integral_const_mul, integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 1)] rw [intervalIntegral.integral_comp_sub_right (fun t : ℝ => |t|^kappa) a0] norm_num only [a0, zero_sub, ← neg_div, show (1 : ℝ)-1/2 = 1/2 by norm_num] have hsym := witness_abs_power_integral kappa hkappa simp only [neg_div] at hsym rw [hsym, Real.rpow_add (by norm_num : (0 : ℝ) < 1/2), Real.rpow_one] have hpow : (2 : ℝ)^kappa * (1/2 : ℝ)^kappa = 1 := by rw [← Real.mul_rpow (by norm_num : (0 : ℝ) ≤ 2) (by norm_num : (0 : ℝ) ≤ 1/2)] norm_num have hden : kappa+1 ≠ 0 := by linarith field_simp nlinarith [hpow]
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDesignDensity_integral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:54
theorem witnessDesignDensity_integrable

The compact-dose density is integrable, including the constant-power case. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
Integrable (fun a : Dose => witnessDesignDensity kappa ((a : ℝ)-a0)) doseVolume
Proof (Lean source)
-- @node: witnessDesignDensity_integrable lemma witnessDesignDensity_integrable (kappa : ℝ) (hkappa : 0 ≤ kappa) : Integrable (fun a : Dose => witnessDesignDensity kappa ((a : ℝ)-a0)) doseVolume := by apply (integrableOn_iff_comap_subtypeVal (s := Icc (0 : ℝ) 1) (f := fun a : ℝ => witnessDesignDensity kappa (a-a0)) (μ := volume) measurableSet_Icc).mp have hc : Continuous (fun a : ℝ => (kappa+1)*2^kappa*|a-a0|^kappa) := by fun_prop apply hc.integrableOn_Icc.congr filter_upwards [ae_restrict_mem measurableSet_Icc] with a ha simp only [witnessDesignDensity, if_pos (show a-a0 ∈ Icc (-1/2 : ℝ) (1/2) by dsimp [a0]; constructor <;> linarith [ha.1, ha.2])]
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDesignDensity_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:80

Uniform Lebesgue mass on the unit dose and rank subtype is one. This is the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: doseVolume_probability lemma doseVolume_probability : IsProbabilityMeasure doseVolume := by constructor rw [doseVolume, comap_subtype_coe_apply measurableSet_Icc, Subtype.coe_image_univ, Real.volume_Icc] norm_num
CausalSmith.Stat.NoisydoseWeakdesignTransition.doseVolume_probability · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:93
theorem witnessDose_probability

The power-weighted compact dose law is a probability measure. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
IsProbabilityMeasure (doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0))))
Proof (Lean source)
-- @node: witnessDose_probability lemma witnessDose_probability (kappa : ℝ) (hkappa : 0 ≤ kappa) : IsProbabilityMeasure (doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))) := by constructor rw [withDensity_apply _ MeasurableSet.univ, Measure.restrict_univ, ← ofReal_integral_eq_lintegral_ofReal (witnessDesignDensity_integrable kappa hkappa)] · rw [witnessDesignDensity_integral kappa hkappa, ENNReal.ofReal_one] · apply Filter.Eventually.of_forall intro a dsimp only [witnessDesignDensity, Pi.zero_apply] split_ifs · exact mul_nonneg (mul_nonneg (by linarith) (Real.rpow_nonneg (by norm_num) _)) (Real.rpow_nonneg (abs_nonneg _) _) · exact le_rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDose_probability · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:101
def lowerSeedLaw

Independent stratum, latent dose, error and rank seed.

Definition (Lean source)
kappa :
ℝ
lowerSeedLaw kappa :
Measure (Bool × Dose × ℝ × Dose)
(((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true) : Measure Bool).prod ((doseVolume.withDensity (fun a => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))).prod ((gaussianReal 0 1).prod doseVolume))
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerSeedLaw · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:118
def lowerWitnessLaw

Structural threshold outcomes are built in the fixed public schedule space from a continuous profile.

Definition (Lean source)
S :
Type u_1
shared
E :
kappa :
ℝ
lowerWitnessLaw E kappa mu :
(lowerSeedLaw kappa).map (fun p => (p.1, (p.2.1 : ℝ), p.2.2.1, E.embed (mu,p.2.2.2), E.eval (E.embed (mu,p.2.2.2)) p.2.1, (p.2.2.2 : ℝ)))
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitnessLaw · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:123
theorem lowerWitness_seedMap_measurable

The threshold construction is measurable in the independent product seeds. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
Measurable (fun p : Bool × Dose × ℝ × Dose => (p.1, (p.2.1 : ℝ), p.2.2.1, E.embed (mu,p.2.2.2), E.eval (E.embed (mu,p.2.2.2)) p.2.1, (p.2.2.2 : ℝ)))
Proof (Lean source)
-- @node: lowerWitness_seedMap_measurable @[fun_prop] lemma lowerWitness_seedMap_measurable (E : PathSpace S) (mu : ThresholdProfile) : Measurable (fun p : Bool × Dose × ℝ × Dose => (p.1, (p.2.1 : ℝ), p.2.2.1, E.embed (mu,p.2.2.2), E.eval (E.embed (mu,p.2.2.2)) p.2.1, (p.2.2.2 : ℝ))) := by have he : Measurable (fun p : Bool × Dose × ℝ × Dose => E.embed (mu, p.2.2.2)) := by first | fun_prop | exact E.measurable_embed.comp (by fun_prop) have hy : Measurable (fun p : Bool × Dose × ℝ × Dose => E.eval (E.embed (mu,p.2.2.2)) p.2.1) := by first | fun_prop | exact E.measurable_eval.comp (he.prodMk (by fun_prop)) fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_seedMap_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:128
def referenceProfile

The reference threshold profile has constant success probability one half.

Definition (Lean source)
referenceProfile :
ContinuousMap.const Dose (projIcc (0 : ℝ) 1 zero_le_one (1/2))
CausalSmith.Stat.NoisydoseWeakdesignTransition.referenceProfile · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:141
theorem lowerSeedLaw_probability Lemma lowerSeedLaw_probability in the paper ↗

The independent stratum, dose, Gaussian and rank seed has total mass one. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
Proof (Lean source)
-- @node: lowerSeedLaw_probability lemma lowerSeedLaw_probability (kappa : ℝ) (hkappa : 0 ≤ kappa) : IsProbabilityMeasure (lowerSeedLaw kappa) := by letI : IsProbabilityMeasure doseVolume := doseVolume_probability letI : IsProbabilityMeasure (doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))) := witnessDose_probability kappa hkappa letI : IsProbabilityMeasure (((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true) : Measure Bool) := by constructor simp only [Measure.add_apply, Measure.smul_apply, Measure.dirac_apply_of_mem (Set.mem_univ _), smul_eq_mul, mul_one] simpa only [one_div] using ENNReal.inv_two_add_inv_two unfold lowerSeedLaw infer_instance
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerSeedLaw_probability · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:144
theorem lowerWitnessLaw_probability

For a path-space design, an admissible overlap parameter, and a threshold profile, the lower-witness law is a probability measure.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
Proof (Lean source)
-- @node: lowerWitnessLaw_probability lemma lowerWitnessLaw_probability (E : PathSpace S) (kappa : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (mu : ThresholdProfile) : IsProbabilityMeasure (lowerWitnessLaw E kappa mu) := by letI := lowerSeedLaw_probability kappa hkappa.1 exact Measure.isProbabilityMeasure_map (lowerWitness_seedMap_measurable E mu).aemeasurable
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitnessLaw_probability · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:161
def lowerWitness

A threshold witness packaged as a probability law, with normalization proved locally.

Definition (Lean source)
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
lowerWitness E kappa hkappa mu :
⟨lowerWitnessLaw E kappa mu, lowerWitnessLaw_probability E kappa hkappa mu⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:167
theorem lowerWitness_latentSupport

Every threshold witness keeps its latent dose in the public compact interval. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
Proof (Lean source)
-- @node: lowerWitness_latentSupport lemma lowerWitness_latentSupport (E : PathSpace S) (kappa : ℝ) (mu : ThresholdProfile) : LatentSupport (lowerWitnessLaw E kappa mu) := by unfold LatentSupport lowerWitnessLaw rw [ae_map_iff (lowerWitness_seedMap_measurable E mu).aemeasurable (measurableSet_Icc.preimage (by fun_prop))] exact Filter.Eventually.of_forall fun p => p.2.1.property
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_latentSupport · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:171
theorem lowerWitness_binaryPotentialOutcomes

Threshold embedding gives binary potential outcomes at every fixed public dose. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
Proof (Lean source)
-- @node: lowerWitness_binaryPotentialOutcomes lemma lowerWitness_binaryPotentialOutcomes (E : PathSpace S) (kappa : ℝ) (mu : ThresholdProfile) : BinaryPotentialOutcomes E (lowerWitnessLaw E kappa mu) := by intro a ha have hm : Measurable (fun w : StructSpace S => potentialOutcome E w a) := by first | fun_prop | exact E.measurable_eval.comp ((show Measurable (sSched (S := S)) by fun_prop).prodMk (measurable_const (a := (⟨a, ha⟩ : Dose)))) unfold lowerWitnessLaw apply (ae_map_iff (lowerWitness_seedMap_measurable E mu).aemeasurable ((measurableSet_eq_fun hm (measurable_const (a := (0 : ℝ)))).union (measurableSet_eq_fun hm (measurable_const (a := (1 : ℝ)))))).mpr apply Filter.Eventually.of_forall intro p change E.eval (E.embed (mu, p.2.2.2)) a = 0 ∨ E.eval (E.embed (mu, p.2.2.2)) a = 1 rw [show a = ((⟨a, ha⟩ : Dose) : ℝ) from rfl, E.eval_embed] split_ifs <;> simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_binaryPotentialOutcomes · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:180
theorem lowerWitness_boundedPotentialOutcomes

Binary threshold outcomes are bounded in the full model's outcome interval. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
Proof (Lean source)
-- @node: lowerWitness_boundedPotentialOutcomes lemma lowerWitness_boundedPotentialOutcomes (E : PathSpace S) (kappa : ℝ) (mu : ThresholdProfile) : BoundedPotentialOutcomes E (lowerWitnessLaw E kappa mu) := by intro a ha filter_upwards [lowerWitness_binaryPotentialOutcomes E kappa mu a ha] with w hw rcases hw with hw | hw <;> rw [hw] <;> norm_num
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_boundedPotentialOutcomes · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:202
theorem lowerWitness_doseConsistency

The observed outcome is the embedded schedule evaluated at the realized dose. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
Proof (Lean source)
-- @node: lowerWitness_doseConsistency lemma lowerWitness_doseConsistency (E : PathSpace S) (kappa : ℝ) (mu : ThresholdProfile) : DoseConsistency E (lowerWitnessLaw E kappa mu) := by have hm : Measurable (fun w : StructSpace S => E.eval (sSched w) (projIcc 0 1 zero_le_one (sA w))) := by first | fun_prop | exact E.measurable_eval.comp ((show Measurable (sSched (S := S)) by fun_prop).prodMk ((continuous_projIcc (a := (0 : ℝ)) (b := 1) (h := zero_le_one)).measurable.comp (by fun_prop))) have heq : ∀ᵐ w ∂lowerWitnessLaw E kappa mu, sY w = E.eval (sSched w) (projIcc 0 1 zero_le_one (sA w)) := by unfold lowerWitnessLaw rw [ae_map_iff (lowerWitness_seedMap_measurable E mu).aemeasurable (measurableSet_eq_fun (by fun_prop) hm)] apply Filter.Eventually.of_forall intro p simp only [sY, sSched, sA, Set.projIcc_of_mem zero_le_one p.2.1.property] filter_upwards [heq, lowerWitness_latentSupport E kappa mu] with w hw ha simpa only [Set.projIcc_of_mem zero_le_one ha, potentialOutcome] using hw
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_doseConsistency · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:210
theorem lowerWitness_rectangle

The witness factors every stratum/dose rectangle from the schedule and rank seed. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
x :
B :
Set (S × ℝ)
D :
Set ℝ
hB :
hD :
(lowerWitnessLaw E kappa mu) {w | (sSched w, sU w) ∈ B ∧ sA w ∈ D ∧ sX w = x}
= (1/2 : ℝ≥0∞) * (doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))) (val ⁻¹' D) * doseVolume ((fun u : Dose => (E.embed (mu, u), (u : ℝ))) ⁻¹' B)
Proof (Lean source)
-- @node: lowerWitness_rectangle lemma lowerWitness_rectangle (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) (x : Bool) (B : Set (S × ℝ)) (D : Set ℝ) (hB : MeasurableSet B) (hD : MeasurableSet D) : (lowerWitnessLaw E kappa mu) {w | (sSched w, sU w) ∈ B ∧ sA w ∈ D ∧ sX w = x} = (1/2 : ℝ≥0∞) * (doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))) (val ⁻¹' D) * doseVolume ((fun u : Dose => (E.embed (mu, u), (u : ℝ))) ⁻¹' B) := by letI := doseVolume_probability letI := witnessDose_probability kappa hkappa have hset : MeasurableSet {w : StructSpace S | (sSched w, sU w) ∈ B ∧ sA w ∈ D ∧ sX w = x} := by exact (hB.preimage (by fun_prop)).inter ((hD.preimage (by fun_prop)).inter (measurableSet_eq_fun (by fun_prop) measurable_const)) unfold lowerWitnessLaw rw [Measure.map_apply (lowerWitness_seedMap_measurable E mu) hset] have heq : (fun p : Bool × Dose × ℝ × Dose => (p.1, (p.2.1 : ℝ), p.2.2.1, E.embed (mu,p.2.2.2), E.eval (E.embed (mu,p.2.2.2)) p.2.1, (p.2.2.2 : ℝ))) ⁻¹' {w | (sSched w, sU w) ∈ B ∧ sA w ∈ D ∧ sX w = x} = {x} ×ˢ ((val ⁻¹' D) ×ˢ ((univ : Set ℝ) ×ˢ ((fun u : Dose => (E.embed (mu, u), (u : ℝ))) ⁻¹' B))) := by ext p simp only [mem_preimage, mem_setOf_eq, sSched, sU, sA, sX, mem_prod, mem_singleton_iff, mem_univ, true_and] tauto rw [heq, lowerSeedLaw, Measure.prod_prod, Measure.prod_prod, Measure.prod_prod] simp only [measure_univ, one_mul] have hx : (((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true) : Measure Bool) {x} = 1/2 := by cases x <;> simp [Measure.add_apply, Measure.smul_apply, Measure.dirac_apply', smul_eq_mul] rw [hx] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_rectangle · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:232
theorem lowerWitness_stratum_mass

Both strata of every witness have probability one half. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
x :
(lowerWitnessLaw E kappa mu) {w | sX w = x} = 1/2
Proof (Lean source)
-- @node: lowerWitness_stratum_mass lemma lowerWitness_stratum_mass (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) (x : Bool) : (lowerWitnessLaw E kappa mu) {w | sX w = x} = 1/2 := by letI := doseVolume_probability letI := witnessDose_probability kappa hkappa simpa using lowerWitness_rectangle E kappa hkappa mu x univ univ MeasurableSet.univ MeasurableSet.univ
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_stratum_mass · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:270
theorem lowerWitness_strataProb

For a nonnegative design exponent, the witness's two strata each have mass one half.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
x :
strataProb (lowerWitnessLaw E kappa mu) x = 1/2
Proof (Lean source)
lemma lowerWitness_strataProb (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) (x : Bool) : strataProb (lowerWitnessLaw E kappa mu) x = 1/2 := by rw [strataProb, measureReal_def, lowerWitness_stratum_mass E kappa hkappa mu x] norm_num
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_strataProb · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:280
theorem lowerWitness_stratumOverlap

For a nonnegative design exponent, the common half-mass strata satisfy the public overlap interval for any minimum stratum mass at most one half.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
pmin :
ℝ
hpmin :
pmin ≤ 1/2
Proof (Lean source)
-- @node: lowerWitness_stratumOverlap lemma lowerWitness_stratumOverlap (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) (pmin : ℝ) (hpmin : pmin ≤ 1/2) : StratumOverlap pmin (lowerWitnessLaw E kappa mu) := by intro x rw [lowerWitness_strataProb E kappa hkappa mu x] constructor <;> linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_stratumOverlap · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:286
theorem lowerWitness_stratumPositive

For a nonnegative design exponent, both witness strata have positive mass.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
Proof (Lean source)
lemma lowerWitness_stratumPositive (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : StratumPositive (lowerWitnessLaw E kappa mu) := by intro x rw [lowerWitness_strataProb E kappa hkappa mu x] norm_num
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_stratumPositive · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:295
theorem lowerWitness_scheduleUnconfoundedness

Whole-schedule exchangeability follows from the independent rank and dose seeds. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
Proof (Lean source)
-- @node: lowerWitness_scheduleUnconfoundedness lemma lowerWitness_scheduleUnconfoundedness (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : ScheduleUnconfoundedness (lowerWitnessLaw E kappa mu) := by letI := doseVolume_probability letI := witnessDose_probability kappa hkappa intro x B D hB hD have hjoint := lowerWitness_rectangle E kappa hkappa mu x (B ×ˢ univ) D (hB.prod MeasurableSet.univ) hD have hsched := lowerWitness_rectangle E kappa hkappa mu x (B ×ˢ univ) univ (hB.prod MeasurableSet.univ) MeasurableSet.univ have hdose := lowerWitness_rectangle E kappa hkappa mu x univ D MeasurableSet.univ hD simp only [mem_prod, mem_univ, and_true, preimage_univ, measure_univ, mul_one] at hjoint hsched hdose simp only [true_and] at hsched hdose unfold strataProb simp only [measureReal_def, hjoint, hsched, hdose, lowerWitness_stratum_mass E kappa hkappa mu x, ENNReal.toReal_mul] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_scheduleUnconfoundedness · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:302
theorem lowerWitness_rankTreatmentIndependence

The auxiliary rank and latent dose factor within every public stratum. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
Proof (Lean source)
-- @node: lowerWitness_rankTreatmentIndependence lemma lowerWitness_rankTreatmentIndependence (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : RankTreatmentIndependence (lowerWitnessLaw E kappa mu) := by letI := doseVolume_probability letI := witnessDose_probability kappa hkappa intro x B D hB hD have hjoint := lowerWitness_rectangle E kappa hkappa mu x (univ ×ˢ B) D (MeasurableSet.univ.prod hB) hD have hrank := lowerWitness_rectangle E kappa hkappa mu x (univ ×ˢ B) univ (MeasurableSet.univ.prod hB) MeasurableSet.univ have hdose := lowerWitness_rectangle E kappa hkappa mu x univ D MeasurableSet.univ hD simp only [mem_prod, mem_univ, true_and, preimage_univ, measure_univ, mul_one] at hjoint hrank hdose unfold strataProb simp only [measureReal_def, hjoint, hrank, hdose, lowerWitness_stratum_mass E kappa hkappa mu x, ENNReal.toReal_mul] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_rankTreatmentIndependence · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:322

The real-valued rank marginal is exactly uniform on the public unit interval. This is the stated conclusion.

Formal statement
doseVolume.map (Subtype.val : Dose → ℝ) = volume.restrict (Icc (0 : ℝ) 1)
Proof (Lean source)
-- @node: doseVolume_map_coe lemma doseVolume_map_coe : doseVolume.map (Subtype.val : Dose → ℝ) = volume.restrict (Icc (0 : ℝ) 1) := by rw [doseVolume, map_comap_subtype_coe measurableSet_Icc]
CausalSmith.Stat.NoisydoseWeakdesignTransition.doseVolume_map_coe · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:341
theorem lowerWitness_rankUniform

Normalizing a half-mass stratum leaves the independent uniform rank law. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
Proof (Lean source)
-- @node: lowerWitness_rankUniform lemma lowerWitness_rankUniform (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : RankUniform (lowerWitnessLaw E kappa mu) := by letI := doseVolume_probability letI := witnessDose_probability kappa hkappa intro x ext B hB rw [Measure.map_apply (by fun_prop) hB, stratumLaw, Measure.smul_apply, Measure.restrict_apply (hB.preimage (by fun_prop)), lowerWitness_stratum_mass E kappa hkappa mu x] have heq : (sU (S := S) ⁻¹' B) ∩ {w | sX w = x} = {w | sU w ∈ B ∧ sX w = x} := rfl rw [heq] have hrank := lowerWitness_rectangle E kappa hkappa mu x (univ ×ˢ B) univ (MeasurableSet.univ.prod hB) MeasurableSet.univ simp only [mem_prod, mem_univ, true_and, and_true, preimage_univ, measure_univ, mul_one] at hrank have hpre : ((fun u : Dose => (E.embed (mu, u), (u : ℝ))) ⁻¹' (univ ×ˢ B)) = (Subtype.val : Dose → ℝ) ⁻¹' B := by ext u simp rw [hrank, hpre] rw [smul_eq_mul, ← mul_assoc, ENNReal.inv_mul_cancel (by norm_num) (by norm_num), one_mul] rw [← doseVolume_map_coe, Measure.map_apply (by fun_prop) hB]
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_rankUniform · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:347

The probability of a lower-rank threshold is its level on the unit interval. This is the stated conclusion.

Formal statement
p :
doseVolume {u : Dose | (u : ℝ) ≤ (p : ℝ)} = ofReal (p : ℝ)
Proof (Lean source)
-- @node: doseVolume_Iic lemma doseVolume_Iic (p : Dose) : doseVolume {u : Dose | (u : ℝ) ≤ (p : ℝ)} = ofReal (p : ℝ) := by change doseVolume ((Subtype.val : Dose → ℝ) ⁻¹' Iic (p : ℝ)) = _ rw [← Measure.map_apply (by fun_prop) measurableSet_Iic, doseVolume_map_coe, Measure.restrict_apply measurableSet_Iic] have heq : Iic (p : ℝ) ∩ Icc (0 : ℝ) 1 = Icc 0 (p : ℝ) := by ext t simp only [mem_inter_iff, mem_Iic, mem_Icc] constructor · rintro ⟨hp, h0, h1⟩; exact ⟨h0, hp⟩ · rintro ⟨h0, hp⟩; exact ⟨hp, h0, hp.trans p.property.2⟩ rw [heq, Real.volume_Icc, sub_zero]
CausalSmith.Stat.NoisydoseWeakdesignTransition.doseVolume_Iic · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:373
theorem lowerWitness_fixed_threshold

At each fixed dose, the witness evaluates the chosen profile against its auxiliary rank. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
a :
∀ᵐ w ∂lowerWitnessLaw E kappa mu, potentialOutcome E w a
= if sU w ≤ (mu a : ℝ) then 1 else 0
Proof (Lean source)
-- @node: lowerWitness_fixed_threshold lemma lowerWitness_fixed_threshold (E : PathSpace S) (kappa : ℝ) (mu : ThresholdProfile) (a : Dose) : ∀ᵐ w ∂lowerWitnessLaw E kappa mu, potentialOutcome E w a = if sU w ≤ (mu a : ℝ) then 1 else 0 := by have hm : Measurable (fun w : StructSpace S => potentialOutcome E w a) := by first | fun_prop | exact E.measurable_eval.comp ((show Measurable (sSched (S := S)) by fun_prop).prodMk measurable_const) have ht : Measurable (fun w : StructSpace S => if sU w ≤ (mu a : ℝ) then (1 : ℝ) else 0) := by exact Measurable.ite (measurableSet_le (by fun_prop) measurable_const) measurable_const measurable_const unfold lowerWitnessLaw apply (ae_map_iff (lowerWitness_seedMap_measurable E mu).aemeasurable (measurableSet_eq_fun hm ht)).mpr exact Filter.Eventually.of_forall fun p => E.eval_embed mu p.2.2.2 a
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_fixed_threshold · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:388
theorem lowerWitness_condPotMean

Integrating the independent uniform rank recovers exactly the prescribed conditional mean. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
x :
a :
ℝ
ha :
a ∈ Icc (0 : ℝ) 1
condPotMean E (lowerWitnessLaw E kappa mu) x a = (mu (projIcc 0 1 zero_le_one a) : ℝ)
Proof (Lean source)
-- @node: lowerWitness_condPotMean lemma lowerWitness_condPotMean (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) (x : Bool) (a : ℝ) (ha : a ∈ Icc (0 : ℝ) 1) : condPotMean E (lowerWitnessLaw E kappa mu) x a = (mu (projIcc 0 1 zero_le_one a) : ℝ) := by letI := doseVolume_probability letI := witnessDose_probability kappa hkappa let p : Dose := mu ⟨a, ha⟩ have hset : MeasurableSet {w : StructSpace S | sU w ≤ (p : ℝ) ∧ sX w = x} := by exact (measurableSet_le (show Measurable (sU (S := S)) by fun_prop) (measurable_const (a := (p : ℝ)))).inter (measurableSet_eq_fun (show Measurable (sX (S := S)) by fun_prop) (measurable_const (a := x))) have hnum : (∫ w, (if sX w = x then potentialOutcome E w a else 0) ∂lowerWitnessLaw E kappa mu) = (lowerWitnessLaw E kappa mu).real {w | sU w ≤ (p : ℝ) ∧ sX w = x} := by calc _ = ∫ w, ({w : StructSpace S | sU w ≤ (p : ℝ) ∧ sX w = x}.indicator (fun _ => (1 : ℝ))) w ∂lowerWitnessLaw E kappa mu := by apply integral_congr_ae filter_upwards [lowerWitness_fixed_threshold E kappa mu ⟨a, ha⟩] with w hw rw [hw] simp only [indicator_apply, mem_setOf_eq, p] split_ifs <;> simp_all _ = _ := integral_indicator_one hset have hrank := lowerWitness_rectangle E kappa hkappa mu x (univ ×ˢ Iic (p : ℝ)) univ (MeasurableSet.univ.prod measurableSet_Iic) MeasurableSet.univ have hpre : ((fun u : Dose => (E.embed (mu, u), (u : ℝ))) ⁻¹' (univ ×ˢ Iic (p : ℝ))) = {u : Dose | (u : ℝ) ≤ (p : ℝ)} := by ext u simp simp only [mem_prod, mem_univ, mem_Iic, true_and, and_true, preimage_univ, measure_univ, mul_one] at hrank rw [hpre, doseVolume_Iic] at hrank rw [condPotMean, hnum, strataProb, measureReal_def, measureReal_def, hrank, lowerWitness_stratum_mass E kappa hkappa mu x, ENNReal.toReal_mul, ENNReal.toReal_ofReal p.property.1] norm_num [p, Set.projIcc_of_mem zero_le_one ha]
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_condPotMean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:407
theorem lowerWitness_gaussianChannel

The measurement-error marginal is the independent standard Gaussian seed. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
Proof (Lean source)
-- @node: lowerWitness_gaussianChannel lemma lowerWitness_gaussianChannel (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : GaussianChannel (lowerWitnessLaw E kappa mu) := by letI := doseVolume_probability letI := witnessDose_probability kappa hkappa unfold GaussianChannel lowerWitnessLaw rw [Measure.map_map (by fun_prop) (lowerWitness_seedMap_measurable E mu)] ext B hB rw [Measure.map_apply (by fun_prop) hB] have heq : (sZ ∘ (fun p : Bool × Dose × ℝ × Dose => (p.1, (p.2.1 : ℝ), p.2.2.1, E.embed (mu,p.2.2.2), E.eval (E.embed (mu,p.2.2.2)) p.2.1, (p.2.2.2 : ℝ)))) ⁻¹' B = (univ : Set Bool) ×ˢ ((univ : Set Dose) ×ˢ (B ×ˢ (univ : Set Dose))) := by ext p simp [Function.comp_def, sZ] rw [heq, lowerSeedLaw, Measure.prod_prod, Measure.prod_prod, Measure.prod_prod] simp [measure_univ, Measure.add_apply, Measure.smul_apply, smul_eq_mul, ENNReal.inv_two_add_inv_two, one_div]
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_gaussianChannel · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:447
theorem lowerWitness_errorIndependence

The Gaussian seed factors from every measurable joint stratum/dose/schedule event. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
Proof (Lean source)
-- @node: lowerWitness_errorIndependence lemma lowerWitness_errorIndependence (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : ErrorIndependence (lowerWitnessLaw E kappa mu) := by letI := doseVolume_probability letI := witnessDose_probability kappa hkappa let seed := fun p : Bool × Dose × ℝ × Dose => (p.1, (p.2.1 : ℝ), p.2.2.1, E.embed (mu,p.2.2.2), E.eval (E.embed (mu,p.2.2.2)) p.2.1, (p.2.2.2 : ℝ)) have hs : Measurable seed := lowerWitness_seedMap_measurable E mu have he : Measurable (fun p : Bool × Dose × ℝ × Dose => (p.1, (p.2.1 : ℝ), E.embed (mu,p.2.2.2))) := by have hm : Measurable (fun p : Bool × Dose × ℝ × Dose => E.embed (mu,p.2.2.2)) := by exact E.measurable_embed.comp (by fun_prop) fun_prop have hfactor (B : Set ℝ) (D : Set (Bool × ℝ × S)) (hB : MeasurableSet B) (hD : MeasurableSet D) : lowerSeedLaw kappa {p | p.2.2.1 ∈ B ∧ (p.1, (p.2.1 : ℝ), E.embed (mu,p.2.2.2)) ∈ D} = gaussianReal 0 1 B * lowerSeedLaw kappa {p | (p.1, (p.2.1 : ℝ), E.embed (mu,p.2.2.2)) ∈ D} := by have hj : MeasurableSet {p : Bool × Dose × ℝ × Dose | p.2.2.1 ∈ B ∧ (p.1, (p.2.1 : ℝ), E.embed (mu,p.2.2.2)) ∈ D} := (hB.preimage (by fun_prop)).inter (hD.preimage he) have hd : MeasurableSet {p : Bool × Dose × ℝ × Dose | (p.1, (p.2.1 : ℝ), E.embed (mu,p.2.2.2)) ∈ D} := hD.preimage he unfold lowerSeedLaw rw [Measure.prod_apply hj, Measure.prod_apply hd] rw [← lintegral_const_mul' _ _ (measure_ne_top _ _)] apply lintegral_congr intro x rw [Measure.prod_apply (hj.preimage (measurable_prodMk_left)), Measure.prod_apply (hd.preimage (measurable_prodMk_left))] rw [← lintegral_const_mul' _ _ (measure_ne_top _ _)] apply lintegral_congr intro a have hpre : Prod.mk a ⁻¹' Prod.mk x ⁻¹' {p : Bool × Dose × ℝ × Dose | (p.1, (p.2.1 : ℝ), E.embed (mu,p.2.2.2)) ∈ D} = (univ : Set ℝ) ×ˢ {u : Dose | (x, (a : ℝ), E.embed (mu,u)) ∈ D} := by ext p simp rw [hpre] change ((gaussianReal 0 1).prod doseVolume) (B ×ˢ {u : Dose | (x, (a : ℝ), E.embed (mu,u)) ∈ D}) = gaussianReal 0 1 B * ((gaussianReal 0 1).prod doseVolume) ((univ : Set ℝ) ×ˢ {u : Dose | (x, (a : ℝ), E.embed (mu,u)) ∈ D}) rw [Measure.prod_prod, Measure.prod_prod, measure_univ, one_mul] unfold ErrorIndependence apply indepFun_iff_measure_inter_preimage_eq_mul.mpr intro B D hB hD have hvec : Measurable (fun w : StructSpace S => (sX w, sA w, sSched w)) := by fun_prop rw [lowerWitnessLaw, Measure.map_apply hs ((hB.preimage (by fun_prop)).inter (hD.preimage hvec)), Measure.map_apply hs (hB.preimage (by fun_prop)), Measure.map_apply hs (hD.preimage hvec)] change lowerSeedLaw kappa {p | p.2.2.1 ∈ B ∧ (p.1, (p.2.1 : ℝ), E.embed (mu,p.2.2.2)) ∈ D} = lowerSeedLaw kappa {p | p.2.2.1 ∈ B} * lowerSeedLaw kappa {p | (p.1, (p.2.1 : ℝ), E.embed (mu,p.2.2.2)) ∈ D} have hz : lowerSeedLaw kappa {p | p.2.2.1 ∈ B} = gaussianReal 0 1 B := by have hg := lowerWitness_gaussianChannel E kappa hkappa mu rw [GaussianChannel, lowerWitnessLaw, Measure.map_map (by fun_prop) hs] at hg have hv := congrArg (fun M : Measure ℝ => M B) hg rw [Measure.map_apply (by fun_prop) hB] at hv exact hv rw [hz] exact hfactor B D hB hD
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_errorIndependence · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:467
theorem lowerWitness_meanRange

For a nonnegative design exponent, the witness's conditional means lie in the unit interval, because they are the values of a threshold profile with values in the unit interval.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
MeanRange E (lowerWitnessLaw E kappa mu)
Proof (Lean source)
-- @node: lowerWitness_meanRange lemma lowerWitness_meanRange (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : MeanRange E (lowerWitnessLaw E kappa mu) := by intro x a ha rw [lowerWitness_condPotMean E kappa hkappa mu x a ha] exact (mu _).2
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_meanRange · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:531
theorem lowerWitness_holderMean

The radius-one Holder bound transfers from the profile to the actual conditional means. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hkappa :
0 ≤ kappa
hholder :
∀ a b, |(mu a : ℝ)-(mu b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
HolderMean E beta (lowerWitnessLaw E kappa mu)
Proof (Lean source)
-- @node: lowerWitness_holderMean lemma lowerWitness_holderMean (E : PathSpace S) (beta kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) (hholder : ∀ a b, |(mu a : ℝ)-(mu b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) : HolderMean E beta (lowerWitnessLaw E kappa mu) := by intro x a ha b hb rw [lowerWitness_condPotMean E kappa hkappa mu x a ha, lowerWitness_condPotMean E kappa hkappa mu x b hb] simpa only [Set.projIcc_of_mem zero_le_one ha, Set.projIcc_of_mem zero_le_one hb] using hholder ⟨a, ha⟩ ⟨b, hb⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_holderMean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:540
theorem witnessDesignDensity_measurable Lemma witnessDesignDensity_measurable in the paper ↗

The power design is a measurable density on the real centered-dose line. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
Proof (Lean source)
-- @node: witnessDesignDensity_measurable @[fun_prop] lemma witnessDesignDensity_measurable (kappa : ℝ) (hkappa : 0 ≤ kappa) : Measurable (witnessDesignDensity kappa) := by have hc : Continuous (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa) := by fun_prop exact hc.measurable.ite measurableSet_Icc measurable_const
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDesignDensity_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:552
theorem witnessDesignDensity_coefficient Lemma witnessDesignDensity_coefficient in the paper ↗

The normalizing coefficient lies between one and twelve throughout the public exponent range. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
conclusion 1
1 ≤ (kappa+1)*2^kappa
conclusion 2
(kappa+1)*2^kappa ≤ 12
Proof (Lean source)
-- @node: witnessDesignDensity_coefficient lemma witnessDesignDensity_coefficient (kappa : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : 1 ≤ (kappa+1)*2^kappa ∧ (kappa+1)*2^kappa ≤ 12 := by have hlo : (1 : ℝ) ≤ 2^kappa := Real.one_le_rpow (by norm_num) hkappa.1 have hhi : (2 : ℝ)^kappa ≤ 4 := by calc _ ≤ (2 : ℝ)^(2 : ℝ) := Real.rpow_le_rpow_of_exponent_le (by norm_num) hkappa.2 _ = 4 := by norm_num constructor <;> nlinarith [hkappa.1, hkappa.2]
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDesignDensity_coefficient · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:559
theorem witnessDesignDensity_envelopes Lemma witnessDesignDensity_envelopes in the paper ↗

The normalized power density meets the envelopes given by a lower constant at most its normalizing coefficient and an upper constant at least that coefficient on its support.

Formal statement
kappa clo chi :
ℝ
hlo :
clo ≤ (kappa+1)*(2 : ℝ)^kappa
hhi :
(kappa+1)*(2 : ℝ)^kappa ≤ chi
∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), clo*|t|^kappa
≤ witnessDesignDensity kappa t ∧ witnessDesignDensity kappa t ≤ chi*|t|^kappa
Proof (Lean source)
-- @node: witnessDesignDensity_envelopes lemma witnessDesignDensity_envelopes (kappa clo chi : ℝ) (hlo : clo ≤ (kappa+1)*(2 : ℝ)^kappa) (hhi : (kappa+1)*(2 : ℝ)^kappa ≤ chi) : ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), clo*|t|^kappa ≤ witnessDesignDensity kappa t ∧ witnessDesignDensity kappa t ≤ chi*|t|^kappa := by filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht rw [witnessDesignDensity, if_pos ht] have hp := Real.rpow_nonneg (abs_nonneg t) kappa exact ⟨mul_le_mul_of_nonneg_right hlo hp, mul_le_mul_of_nonneg_right hhi hp⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDesignDensity_envelopes · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:570
theorem lowerWitness_conditionalDose

Conditioning on either stratum leaves the common weighted dose seed unchanged. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
x :
(stratumLaw (lowerWitnessLaw E kappa mu) x).map sA
= (doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))).map val
Proof (Lean source)
-- @node: lowerWitness_conditionalDose lemma lowerWitness_conditionalDose (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) (x : Bool) : (stratumLaw (lowerWitnessLaw E kappa mu) x).map sA = (doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))).map val := by letI := doseVolume_probability letI := witnessDose_probability kappa hkappa ext B hB rw [Measure.map_apply (by fun_prop) hB, stratumLaw, Measure.smul_apply, Measure.restrict_apply (hB.preimage (by fun_prop)), lowerWitness_stratum_mass E kappa hkappa mu x] have hdose := lowerWitness_rectangle E kappa hkappa mu x univ B MeasurableSet.univ hB simp only [mem_univ, true_and, preimage_univ, measure_univ, mul_one] at hdose change (1/2 : ℝ≥0∞)⁻¹ • (lowerWitnessLaw E kappa mu) {w | sA w ∈ B ∧ sX w = x} = _ rw [hdose, smul_eq_mul, ← mul_assoc, ENNReal.inv_mul_cancel (by norm_num) (by norm_num), one_mul, Measure.map_apply (by fun_prop) hB]
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_conditionalDose · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:582
theorem doseVolume_map_centered

Subtracting the public center transports compact-dose volume to centered compact volume. This is the stated conclusion.

Formal statement
doseVolume.map (fun a : Dose => (a : ℝ)-a0) = volume.restrict (Icc (-1/2 : ℝ) (1/2))
Proof (Lean source)
-- @node: doseVolume_map_centered lemma doseVolume_map_centered : doseVolume.map (fun a : Dose => (a : ℝ)-a0) = volume.restrict (Icc (-1/2 : ℝ) (1/2)) := by have hpre : (fun a : ℝ => a-a0) ⁻¹' Icc (-1/2 : ℝ) (1/2) = Icc (0 : ℝ) 1 := by ext a simp only [mem_preimage, mem_Icc, a0] constructor <;> rintro ⟨h1, h2⟩ <;> constructor <;> linarith have hm := (measurePreserving_sub_right volume a0).restrict_preimage (s := Icc (-1/2 : ℝ) (1/2)) measurableSet_Icc rw [hpre] at hm have heq := hm.map_eq rw [← doseVolume_map_coe, Measure.map_map (by fun_prop) (by fun_prop)] at heq exact heq
CausalSmith.Stat.NoisydoseWeakdesignTransition.doseVolume_map_centered · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:603
theorem witnessDose_map_centered

Weighting and centering the compact dose gives exactly the stipulated power density. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
(doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))).map (fun a : Dose => (a : ℝ)-a0)
= (volume.restrict (Icc (-1/2 : ℝ) (1/2))).withDensity (fun t => ofReal (witnessDesignDensity kappa t))
Proof (Lean source)
-- @node: witnessDose_map_centered lemma witnessDose_map_centered (kappa : ℝ) (hkappa : 0 ≤ kappa) : (doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0)))).map (fun a : Dose => (a : ℝ)-a0) = (volume.restrict (Icc (-1/2 : ℝ) (1/2))).withDensity (fun t => ofReal (witnessDesignDensity kappa t)) := by ext B hB rw [Measure.map_apply (by fun_prop) hB, withDensity_apply _ (hB.preimage (by fun_prop)), withDensity_apply _ hB, ← doseVolume_map_centered, setLIntegral_map hB (by fun_prop) (by fun_prop)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.witnessDose_map_centered · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:619
theorem lowerWitness_weakDesign

The conditional centered dose has the common density and satisfies the weak-design envelopes for a lower constant at most the power-density coefficient and an upper constant at least it. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
clo chi :
ℝ
hlo :
clo ≤ (kappa+1)*(2 : ℝ)^kappa
hhi :
(kappa+1)*(2 : ℝ)^kappa ≤ chi
WeakDesign clo chi kappa (lowerWitnessLaw E kappa mu)
Proof (Lean source)
-- @node: lowerWitness_weakDesign lemma lowerWitness_weakDesign (E : PathSpace S) (kappa : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (mu : ThresholdProfile) (clo chi : ℝ) (hlo : clo ≤ (kappa+1)*(2 : ℝ)^kappa) (hhi : (kappa+1)*(2 : ℝ)^kappa ≤ chi) : WeakDesign clo chi kappa (lowerWitnessLaw E kappa mu) := by refine ⟨fun _ => witnessDesignDensity kappa, fun _ => witnessDesignDensity_measurable kappa hkappa.1, ?_, fun _ => witnessDesignDensity_envelopes kappa clo chi hlo hhi⟩ intro x have hc := congrArg (fun M : Measure ℝ => M.map (fun a => a-a0)) (lowerWitness_conditionalDose E kappa hkappa.1 mu x) rw [Measure.map_map (by fun_prop) (by fun_prop), Measure.map_map (by fun_prop) (by fun_prop)] at hc exact hc.trans (witnessDose_map_centered kappa hkappa.1)
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_weakDesign · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:632
theorem lowerWitness_structuralThreshold

One full-measure event carries the embedded threshold identity at every public dose. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
0 ≤ kappa
Proof (Lean source)
-- @node: lowerWitness_structuralThreshold lemma lowerWitness_structuralThreshold (E : PathSpace S) (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : StructuralThreshold E (lowerWitnessLaw E kappa mu) := by letI := pathSpace_countablySeparated E obtain ⟨c, hc, hinj⟩ := MeasurableSpace.measurable_injection_nat_bool_of_countablySeparated S have hp : Measurable (fun w : StructSpace S => projIcc 0 1 zero_le_one (sU w)) := by fun_prop have he : Measurable (fun w : StructSpace S => E.embed (mu, projIcc 0 1 zero_le_one (sU w))) := by first | fun_prop | exact E.measurable_embed.comp (measurable_const.prodMk hp) have hgraph : ∀ᵐ w ∂lowerWitnessLaw E kappa mu, c (sSched w) = c (E.embed (mu, projIcc 0 1 zero_le_one (sU w))) := by unfold lowerWitnessLaw apply (ae_map_iff (lowerWitness_seedMap_measurable E mu).aemeasurable (measurableSet_eq_fun (hc.comp (by fun_prop)) (hc.comp he))).mpr apply Filter.Eventually.of_forall intro p simp only [Function.comp_def, sSched, sU, Set.projIcc_of_mem zero_le_one p.2.2.2.property] have hrank : ∀ᵐ w ∂lowerWitnessLaw E kappa mu, sU w ∈ Icc (0 : ℝ) 1 := by unfold lowerWitnessLaw rw [ae_map_iff (lowerWitness_seedMap_measurable E mu).aemeasurable (measurableSet_Icc.preimage (by fun_prop))] exact Filter.Eventually.of_forall fun p => p.2.2.2.property filter_upwards [hgraph, hrank] with w hw hu intro a ha rw [lowerWitness_condPotMean E kappa hkappa mu (sX w) a ha] change E.eval (sSched w) a = _ rw [hinj hw] have h := E.eval_embed mu (projIcc 0 1 zero_le_one (sU w)) ⟨a, ha⟩ simpa only [Set.projIcc_of_mem zero_le_one hu, Set.projIcc_of_mem zero_le_one ha] using h
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_structuralThreshold · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:648
theorem lowerWitness_membership

The assembled witness belongs to the model for any public class constants whose envelope constants bracket the power-density coefficient when the constructed profile has the required smoothness. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hK :
K.clo ≤ (kappa+1)*(2 : ℝ)^kappa ∧ (kappa+1)*(2 : ℝ)^kappa ≤ K.chi
hholder :
∀ a b, |(mu a : ℝ)-(mu b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta
conclusion 1
NoisyDoseModelClass E K beta kappa sigma (lowerWitnessLaw E kappa mu)
conclusion 2
conclusion 3
conclusion 5
conclusion 6
x a :
a ∈ Icc (0 : ℝ) 1
condPotMean E (lowerWitnessLaw E kappa mu) x a = (mu (projIcc 0 1 zero_le_one a) : ℝ)
Proof (Lean source)
-- @node: lowerWitness_membership lemma lowerWitness_membership (E : PathSpace S) (K : ClassConstants) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (hK : K.clo ≤ (kappa+1)*(2 : ℝ)^kappa ∧ (kappa+1)*(2 : ℝ)^kappa ≤ K.chi) (mu : ThresholdProfile) (hholder : ∀ a b, |(mu a : ℝ)-(mu b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta) : NoisyDoseModelClass E K beta kappa sigma (lowerWitnessLaw E kappa mu) ∧ BinaryPotentialOutcomes E (lowerWitnessLaw E kappa mu) ∧ RankUniform (lowerWitnessLaw E kappa mu) ∧ RankTreatmentIndependence (lowerWitnessLaw E kappa mu) ∧ StructuralThreshold E (lowerWitnessLaw E kappa mu) ∧ (∀ x a, a ∈ Icc (0 : ℝ) 1 → condPotMean E (lowerWitnessLaw E kappa mu) x a = (mu (projIcc 0 1 zero_le_one a) : ℝ)) := by refine ⟨?_, lowerWitness_binaryPotentialOutcomes E kappa mu, lowerWitness_rankUniform E kappa hkappa.1 mu, lowerWitness_rankTreatmentIndependence E kappa hkappa.1 mu, ?_, lowerWitness_condPotMean E kappa hkappa.1 mu⟩ · refine { stratumOverlap := lowerWitness_stratumOverlap E kappa hkappa.1 mu K.pmin K.pmin_le_half latentSupport := lowerWitness_latentSupport E kappa mu weakDesign := ?_ holderMean := lowerWitness_holderMean E beta kappa hkappa.1 mu hholder meanRange := lowerWitness_meanRange E kappa hkappa.1 mu gaussianChannel := lowerWitness_gaussianChannel E kappa hkappa.1 mu errorIndependence := ?_ scheduleUnconfoundedness := lowerWitness_scheduleUnconfoundedness E kappa hkappa.1 mu boundedPO := lowerWitness_boundedPotentialOutcomes E kappa mu consistency := lowerWitness_doseConsistency E kappa mu } · exact lowerWitness_weakDesign E kappa hkappa mu K.clo K.chi hK.1 hK.2 · exact lowerWitness_errorIndependence E kappa hkappa.1 mu · exact lowerWitness_structuralThreshold E kappa hkappa.1 mu
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_membership · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:685
theorem lowerWitness_common_design

All threshold profiles use the same stratum and latent-dose design. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
(lowerWitnessLaw E kappa mu).map (fun w => (sX w, sA w))
= (lowerWitnessLaw E kappa nu).map (fun w => (sX w, sA w))
Proof (Lean source)
-- @node: lowerWitness_common_design lemma lowerWitness_common_design (E : PathSpace S) (kappa : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (mu nu : ThresholdProfile) : (lowerWitnessLaw E kappa mu).map (fun w => (sX w, sA w)) = (lowerWitnessLaw E kappa nu).map (fun w => (sX w, sA w)) := by unfold lowerWitnessLaw rw [Measure.map_map (by fun_prop) (lowerWitness_seedMap_measurable E mu), Measure.map_map (by fun_prop) (lowerWitness_seedMap_measurable E nu)] rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.lowerWitness_common_design · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/LowerWitness.lean:718
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.MarkedGaussianEnergy 6 declarations Finiteness and moment-tail control of the observed Gaussian weighted energy.

Finiteness and moment-tail control of the observed Gaussian weighted energy.

theorem smoothSigned_measurable Lemma smoothSigned_measurable in the paper ↗

A measurable signed input gives a measurable Gaussian convolution. Under the stated conditions. This is the stated conclusion.

Formal statement
sigma :
ℝ
v :
ℝ → ℝ
hv :
Proof (Lean source)
-- @node: smoothSigned_measurable @[fun_prop] lemma smoothSigned_measurable (sigma : ℝ) (v : ℝ → ℝ) (hv : Measurable v) : Measurable (smoothSigned sigma v) := by have hm : Measurable (fun p : ℝ × ℝ => v p.2 * phiDensity sigma (p.1-p.2)) := by unfold phiDensity fun_prop exact hm.stronglyMeasurable.integral_prod_right'.measurable
CausalSmith.Stat.NoisydoseWeakdesignTransition.smoothSigned_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedGaussianEnergy.lean:12
theorem gaussian_observed_energy_le Lemma gaussian_observed_energy_le in the paper ↗

Gaussian reference domination converts compact Gaussian energy to observed energy. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa sigma w :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
v :
ℝ → ℝ
(smoothSigned sigma v w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w
≤ (1 / (exp (-1/2)*sigma^(kappa+1))) * ((smoothSigned sigma v w)^2 / phiDensity sigma w)
Proof (Lean source)
-- @node: gaussian_observed_energy_le lemma gaussian_observed_energy_le (kappa sigma w : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (v : ℝ → ℝ) : (smoothSigned sigma v w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w ≤ (1 / (exp (-1/2)*sigma^(kappa+1))) * ((smoothSigned sigma v w)^2 / phiDensity sigma w) := by have hb := gaussian_design_density_lower kappa sigma hkappa hsigma w have hD : 0 < exp (-1/2)*sigma^(kappa+1) := mul_pos (Real.exp_pos _) (Real.rpow_pos_of_pos hsigma.1 _) calc _ ≤ (smoothSigned sigma v w)^2 / ((exp (-1/2)*sigma^(kappa+1))*phiDensity sigma w) := div_le_div_of_nonneg_left (sq_nonneg _) (mul_pos hD (phiDensity_pos _ _ hsigma.1)) hb.2 _ = _ := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_observed_energy_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedGaussianEnergy.lean:21
theorem gaussian_observed_energy_integrable Lemma gaussian_observed_energy_integrable in the paper ↗

Compact signed densities have finite energy under the observed witness density. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma ell :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
v :
ℝ → ℝ
hv :
hm :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
Integrable (fun w => (smoothSigned sigma v w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w)
Proof (Lean source)
-- @node: gaussian_observed_energy_integrable @[fun_prop] lemma gaussian_observed_energy_integrable (kappa sigma ell : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (v : ℝ → ℝ) (hv : Integrable v) (hm : Measurable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) : Integrable (fun w => (smoothSigned sigma v w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w) := by have he := (gaussian_convolution_energy_integrable sigma ell hsigma.1 v hv hsupp).const_mul (1 / (exp (-1/2)*sigma^(kappa+1))) have hm' : AEStronglyMeasurable (fun w => (smoothSigned sigma v w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w) volume := by exact ((smoothSigned_measurable sigma v hm).pow_const 2).div (smoothSigned_measurable sigma _ (witnessDesignDensity_measurable kappa hkappa.1)) |>.aestronglyMeasurable apply he.mono' hm' filter_upwards with w rw [Real.norm_eq_abs, abs_of_nonneg (div_nonneg (sq_nonneg _) (gaussian_design_density_lower kappa sigma hkappa hsigma w).1.le)] exact gaussian_observed_energy_le kappa sigma w hkappa hsigma v
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_observed_energy_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedGaussianEnergy.lean:38
theorem marked_profile_signed_integrable

The constructed threshold profile gives an integrable compact signed density. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
Integrable (fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2))
Proof (Lean source)
-- @node: marked_profile_signed_integrable @[fun_prop] lemma marked_profile_signed_integrable (kappa : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : Integrable (fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) := by have hc : Continuous (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) := by fun_prop have he : (fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) = (Icc (-1/2 : ℝ) (1/2)).indicator (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) := by funext t simp only [witnessDesignDensity, indicator_apply] split_ifs <;> simp rw [he] exact hc.integrableOn_Icc.integrable_indicator measurableSet_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.marked_profile_signed_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedGaussianEnergy.lean:59
theorem marked_profile_energy_integrable

The integrability conclusion in the observed marked-law identity is automatic for its constructed profile. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
Integrable (fun w => (smoothSigned sigma (fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w)
Proof (Lean source)
-- @node: marked_profile_energy_integrable @[fun_prop] lemma marked_profile_energy_integrable (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (mu : ThresholdProfile) : Integrable (fun w => (smoothSigned sigma (fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w) := by apply gaussian_observed_energy_integrable kappa sigma (1/2) hkappa hsigma _ (marked_profile_signed_integrable kappa hkappa.1 mu) · have hk : 0 ≤ kappa := hkappa.1 fun_prop · intro t ht rw [← neg_div] at ht simp only [witnessDesignDensity, if_neg ht, zero_mul]
CausalSmith.Stat.NoisydoseWeakdesignTransition.marked_profile_energy_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedGaussianEnergy.lean:78
theorem gaussian_observed_energy_moment_bound

Weighted cancellations control observed Gaussian energy by the factorial tail, with the same tuning data. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma ell :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
hell :
0 ≤ ell
J :
ℕ
v :
ℝ → ℝ
hv :
hm :
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
v t = 0
hmom :
∀ j < J, ∫ t, t^j*v t = 0
(∫ w, (smoothSigned sigma v w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w)
≤ (1 / (exp (-1/2)*sigma^(kappa+1))) * (∫ t, |v t|)^2 * momentTail sigma ell J
Proof (Lean source)
-- @node: gaussian_observed_energy_moment_bound lemma gaussian_observed_energy_moment_bound (kappa sigma ell : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (hell : 0 ≤ ell) (J : ℕ) (v : ℝ → ℝ) (hv : Integrable v) (hm : Measurable v) (hsupp : ∀ t, t ∉ Icc (-ell) ell → v t = 0) (hmom : ∀ j < J, ∫ t, t^j*v t = 0) : (∫ w, (smoothSigned sigma v w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w) ≤ (1 / (exp (-1/2)*sigma^(kappa+1))) * (∫ t, |v t|)^2 * momentTail sigma ell J := by have hi := gaussian_observed_energy_integrable kappa sigma ell hkappa hsigma v hv hm hsupp have hG := gaussian_convolution_energy_integrable sigma ell hsigma.1 v hv hsupp have hc : 0 ≤ 1 / (exp (-1/2)*sigma^(kappa+1)) := by exact le_of_lt (one_div_pos.mpr (mul_pos (Real.exp_pos _) (Real.rpow_pos_of_pos hsigma.1 _))) calc _ ≤ ∫ w, (1 / (exp (-1/2)*sigma^(kappa+1))) * ((smoothSigned sigma v w)^2 / phiDensity sigma w) := integral_mono hi (hG.const_mul _) (fun w => gaussian_observed_energy_le kappa sigma w hkappa hsigma v) _ = (1 / (exp (-1/2)*sigma^(kappa+1))) * (∫ w, (smoothSigned sigma v w)^2 / phiDensity sigma w) := integral_const_mul _ _ _ ≤ _ := by rw [gaussian_compact_energy_tail_identity sigma ell hsigma.1 hell J v hv hsupp hmom] exact (mul_le_mul_of_nonneg_left (compact_signed_moment_tail_bound sigma ell hsigma.1 hell J v hv hsupp) hc).trans_eq (mul_assoc _ _ _).symm
CausalSmith.Stat.NoisydoseWeakdesignTransition.gaussian_observed_energy_moment_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedGaussianEnergy.lean:95
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.MarkedIdentification 11 declarations Weighted observation factorization for identification.

Weighted observation factorization for identification.

theorem identification_map_withDensity Lemma identification_map_withDensity in the paper ↗

Weighting by a function of the mapped coordinate commutes with pushforward. Under the stated conditions. This is the stated conclusion.

Formal statement
α β :
μ :
f :
α → β
hf :
g :
β → ℝ≥0∞
hg :
(μ.withDensity (fun a => g (f a))).map f = (μ.map f).withDensity g
Proof (Lean source)
-- @node: identification_map_withDensity lemma identification_map_withDensity {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] (μ : Measure α) (f : α → β) (hf : Measurable f) (g : β → ℝ≥0∞) (hg : Measurable g) : (μ.withDensity (fun a => g (f a))).map f = (μ.map f).withDensity g := by apply Measure.ext_of_lintegral intro φ hφ rw [lintegral_map hφ hf] change (∫⁻ a, (φ ∘ f) a ∂μ.withDensity (g ∘ f)) = _ rw [lintegral_withDensity_eq_lintegral_mul μ (hg.comp hf) (hφ.comp hf), lintegral_withDensity_eq_lintegral_mul (μ.map f) hg hφ, lintegral_map (hg.mul hφ) hf] rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.identification_map_withDensity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:14
theorem identification_marked_map_apply Lemma identification_marked_map_apply in the paper ↗

A bounded nonnegative mark gives its pushforward mass by an ordinary integral. Under the stated conditions. This is the stated conclusion.

Formal statement
α β :
μ :
f :
α → β
hf :
g :
α → ℝ
hi :
hn :
0 ≤ᵐ[μ] g
B :
Set β
hB :
((μ.withDensity (fun a => ofReal (g a))).map f) B
= ofReal (∫ a, (f ⁻¹' B).indicator g a ∂μ)
Proof (Lean source)
-- @node: identification_marked_map_apply lemma identification_marked_map_apply {α β : Type*} [MeasurableSpace α] [MeasurableSpace β] (μ : Measure α) (f : α → β) (hf : Measurable f) (g : α → ℝ) (hi : Integrable g μ) (hn : 0 ≤ᵐ[μ] g) (B : Set β) (hB : MeasurableSet B) : ((μ.withDensity (fun a => ofReal (g a))).map f) B = ofReal (∫ a, (f ⁻¹' B).indicator g a ∂μ) := by rw [Measure.map_apply hf hB, withDensity_apply _ (hf hB), ← ofReal_integral_eq_lintegral_ofReal hi.integrableOn (hn.filter_mono (ae_mono Measure.restrict_le_self)), integral_indicator (hf hB)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.identification_marked_map_apply · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:29
theorem identification_weighted_sum_convolution Lemma identification_weighted_sum_convolution in the paper ↗

An independent additive channel also factors after marking the latent coordinate. Under the stated conditions. This is the stated conclusion.

Formal statement
α :
μ :
T N :
α → ℝ
hT :
hN :
ν γ :
hpair :
μ.map (fun a => (T a, N a)) = ν.prod γ
H :
ℝ → ℝ≥0∞
hH :
(μ.withDensity (fun a => H (T a))).map (fun a => T a + N a) = (ν.withDensity H).conv γ
Proof (Lean source)
-- @node: identification_weighted_sum_convolution lemma identification_weighted_sum_convolution {α : Type*} [MeasurableSpace α] (μ : Measure α) (T N : α → ℝ) (hT : Measurable T) (hN : Measurable N) (ν γ : Measure ℝ) [SFinite γ] (hpair : μ.map (fun a => (T a, N a)) = ν.prod γ) (H : ℝ → ℝ≥0∞) (hH : Measurable H) : (μ.withDensity (fun a => H (T a))).map (fun a => T a + N a) = (ν.withDensity H).conv γ := by have hw := identification_map_withDensity μ (fun a => (T a, N a)) (hT.prodMk hN) (fun p : ℝ × ℝ => H p.1) (hH.comp measurable_fst) rw [hpair, ← prod_withDensity_left hH] at hw have hs := congrArg (Measure.map (fun p : ℝ × ℝ => p.1+p.2)) hw rw [Measure.map_map (by fun_prop) (hT.prodMk hN)] at hs exact hs
CausalSmith.Stat.NoisydoseWeakdesignTransition.identification_weighted_sum_convolution · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:41
theorem observedMarked_eq_of_obsLaw_eq

Observational equivalence identifies the outcome-marked centered dose measure. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
P P' :
hobs :
obsLaw sigma P = obsLaw sigma P'
x :
((stratumLaw P x).withDensity (fun w => ofReal (sY w))).map (observedCentered sigma)
= ((stratumLaw P' x).withDensity (fun w => ofReal (sY w))).map (observedCentered sigma)
Proof (Lean source)
-- @node: observedMarked_eq_of_obsLaw_eq lemma observedMarked_eq_of_obsLaw_eq (sigma : ℝ) (P P' : Measure (StructSpace S)) (hobs : obsLaw sigma P = obsLaw sigma P') (x : Bool) : ((stratumLaw P x).withDensity (fun w => ofReal (sY w))).map (observedCentered sigma) = ((stratumLaw P' x).withDensity (fun w => ofReal (sY w))).map (observedCentered sigma) := by have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop have hg : Measurable (fun o : Obs => ofReal o.2.2) := by fun_prop have h := congrArg (fun μ : Measure Obs => μ.withDensity (fun o => ofReal o.2.2)) (show (stratumLaw P x).map (obsMap sigma) = (stratumLaw P' x).map (obsMap sigma) by rw [stratumLaw_map_obsMap, stratumLaw_map_obsMap, hobs]) rw [← identification_map_withDensity _ _ hm _ hg, ← identification_map_withDensity _ _ hm _ hg] at h have h' := congrArg (Measure.map (fun o : Obs => o.2.1-a0)) h rw [Measure.map_map (by fun_prop) hm, Measure.map_map (by fun_prop) hm] at h' exact h'
CausalSmith.Stat.NoisydoseWeakdesignTransition.observedMarked_eq_of_obsLaw_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:57
theorem observedMarked_eq_meanMarked

Bounded regression tests replace the realized mark by its conditional potential mean. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
((stratumLaw P x).withDensity (fun w => ofReal (sY w))).map (observedCentered sigma)
= ((stratumLaw P x).withDensity (fun w => ofReal (projectedMean E P (sA w) x))).map (observedCentered sigma)
Proof (Lean source)
-- @node: observedMarked_eq_meanMarked lemma observedMarked_eq_meanMarked (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) : ((stratumLaw P x).withDensity (fun w => ofReal (sY w))).map (observedCentered sigma) = ((stratumLaw P x).withDensity (fun w => ofReal (projectedMean E P (sA w) x))).map (observedCentered sigma) := by letI := stratumLaw_probability P hP.strataPos x have hb : 0 < beta := hbeta.1 have hY := realized_dose_mean E beta kappa sigma hbeta hkappa hsigma P hP have hiY := integrable_stratumLaw P hP.strataPos x _ (realized_outcome_integrable E P hP.strataPos hP.scheduleUnconfoundedness hP.latentSupport hP.boundedPO hP.consistency) have hiM : Integrable (fun w => projectedMean E P (sA w) x) (stratumLaw P x) := by apply Integrable.of_bound (((projectedMean_measurable E P beta hb hP.holderMean).comp (show Measurable (fun w : StructSpace S => (sA w,x)) by fun_prop)).aestronglyMeasurable) 1 filter_upwards with w have hm := projectedMean_mem_Icc E P hP.meanRange (sA w) x simpa [Real.norm_eq_abs, abs_of_nonneg hm.1] using hm.2 have hnY : 0 ≤ᵐ[stratumLaw P x] sY := (ae_stratumLaw_of_ae P x hY.1).mono (fun _ h => h.1) have hnM : 0 ≤ᵐ[stratumLaw P x] (fun w => projectedMean E P (sA w) x) := Eventually.of_forall (fun w => (projectedMean_mem_Icc E P hP.meanRange (sA w) x).1) have hV : Measurable (observedCentered (S := S) sigma) := by unfold observedCentered contaminatedDose; fun_prop apply Measure.ext intro B hB rw [identification_marked_map_apply _ _ hV _ hiY hnY B hB, identification_marked_map_apply _ _ hV _ hiM hnM B hB] congr 1 rw [stratumLaw_integral, stratumLaw_integral] congr 1 let F : (ℝ × Bool × ℝ) → ℝ := fun p => if p.2.1 = x ∧ p.1+sigma*p.2.2-a0 ∈ B then 1 else 0 have hF : Measurable F := by apply Measurable.ite · exact (measurableSet_eq_fun (by fun_prop) measurable_const).inter (hB.preimage (by fun_prop)) · fun_prop · fun_prop have ht := hY.2.2.2 F hF ⟨1, by intro p; dsimp [F]; split_ifs <;> norm_num⟩ calc _ = ∫ w, F (sA w,sX w,sZ w)*sY w ∂P := by apply integral_congr_ae filter_upwards with w by_cases hx : sX w = x <;> by_cases hv : observedCentered sigma w ∈ B <;> simp [F, hx, hv, indicator_apply, mem_preimage, observedCentered, contaminatedDose] _ = ∫ w, F (sA w,sX w,sZ w)*condPotMean E P (sX w) (sA w) ∂P := ht _ = _ := by apply integral_congr_ae filter_upwards [hP.latentSupport] with w hw by_cases hx : sX w = x <;> by_cases hv : observedCentered sigma w ∈ B <;> simp [F, hx, hv, indicator_apply, mem_preimage, observedCentered, contaminatedDose, projectedMean, Set.projIcc_of_mem zero_le_one hw]
CausalSmith.Stat.NoisydoseWeakdesignTransition.observedMarked_eq_meanMarked · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:74
theorem latent_noise_product_stratum

The centered latent dose and scaled Gaussian error have a product law in each stratum. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
hoverlap :
hgauss :
x :
(stratumLaw P x).map (fun w => (latentCentered w, sigma*sZ w))
= (latentDoseLaw P x).prod (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma)))
Proof (Lean source)
-- @node: latent_noise_product_stratum lemma latent_noise_product_stratum (sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (herr : ErrorIndependence P) (hgauss : GaussianChannel P) (x : Bool) : (stratumLaw P x).map (fun w => (latentCentered w, sigma*sZ w)) = (latentDoseLaw P x).prod (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma))) := by letI := stratumLaw_probability P hoverlap x letI := latentDoseLaw_probability P hoverlap x have hT : Measurable (latentCentered (S := S)) := by unfold latentCentered; fun_prop have hswap := congrArg (Measure.map (Prod.swap : ℝ × ℝ → ℝ × ℝ)) (error_centered_product_stratum P hoverlap herr x) rw [Measure.map_map (by fun_prop) (by fun_prop), Measure.prod_swap, hgauss] at hswap have hscale := congrArg (Measure.map (map (id : ℝ → ℝ) (fun z : ℝ => sigma*z))) hswap rw [Measure.map_map (by fun_prop) (by fun_prop), ← Measure.map_prod_map _ _ measurable_id (by fun_prop), Measure.map_id] at hscale have hg : (gaussianReal (0 : ℝ) 1).map (fun z => sigma*z) = gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma)) := by simpa using (gaussianReal_map_const_mul (μ := 0) (v := 1) sigma) rw [hg] at hscale exact hscale
CausalSmith.Stat.NoisydoseWeakdesignTransition.latent_noise_product_stratum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:133
theorem latentMeanMeasure_projected

The bounded projected version is the same latent mark on the supported dose interval. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hdesign :
WeakDesign K.clo K.chi kappa P
x :
= (latentDoseLaw P x).withDensity (fun t => ofReal (projectedMean E P (t+a0) x))
Proof (Lean source)
-- @node: latentMeanMeasure_projected lemma latentMeanMeasure_projected (E : PathSpace S) (P : Measure (StructSpace S)) (kappa : ℝ) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (x : Bool) : latentMeanMeasure E P x = (latentDoseLaw P x).withDensity (fun t => ofReal (projectedMean E P (t+a0) x)) := by apply withDensity_congr_ae filter_upwards [latentDoseLaw_ae_mem P kappa hdesign x] with t ht have ha : t+a0 ∈ Icc (0 : ℝ) 1 := by dsimp [a0]; constructor <;> linarith [ht.1, ht.2] simp only [projectedMean, Set.projIcc_of_mem zero_le_one ha]
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentMeanMeasure_projected · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:156
theorem observedMarked_stratum_convolution

The observed outcome-marked conditional measure is the marked latent Gaussian convolution. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
((stratumLaw P x).withDensity (fun w => ofReal (sY w))).map (observedCentered sigma)
= (latentMeanMeasure E P x).conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma)))
Proof (Lean source)
-- @node: observedMarked_stratum_convolution lemma observedMarked_stratum_convolution (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) : ((stratumLaw P x).withDensity (fun w => ofReal (sY w))).map (observedCentered sigma) = (latentMeanMeasure E P x).conv (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma))) := by have hb : 0 < beta := hbeta.1 have hH : Measurable (fun t : ℝ => ofReal (projectedMean E P (t+a0) x)) := ((projectedMean_measurable E P beta hb hP.holderMean).comp (show Measurable (fun t : ℝ => (t+a0,x)) by fun_prop)).ennreal_ofReal have h := identification_weighted_sum_convolution (stratumLaw P x) latentCentered (fun w => sigma*sZ w) (by unfold latentCentered; fun_prop) (by fun_prop) (latentDoseLaw P x) (gaussianReal 0 (NNReal.mk (sigma^2) (sq_nonneg sigma))) (latent_noise_product_stratum sigma P hP.strataPos hP.errorIndependence hP.gaussianChannel x) _ hH rw [observedMarked_eq_meanMarked E beta kappa sigma hbeta hkappa hsigma P hP x, latentMeanMeasure_projected E P kappa hP.weakDesign x] have hv : observedCentered (S := S) sigma = (fun w => latentCentered w + sigma*sZ w) := by funext w dsimp [observedCentered, contaminatedDose, latentCentered] ring rw [hv] simpa only [latentCentered, sub_add_cancel] using h
CausalSmith.Stat.NoisydoseWeakdesignTransition.observedMarked_stratum_convolution · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:168
theorem latentMeanMeasure_finite

Mean-range finiteness supplies a finite marked latent measure without moment assumptions. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hbeta :
0 < beta
hoverlap :
hdesign :
WeakDesign K.clo K.chi kappa P
hholder :
HolderMean E beta P
hrange :
x :
Proof (Lean source)
-- @node: latentMeanMeasure_finite lemma latentMeanMeasure_finite (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (beta kappa : ℝ) (hbeta : 0 < beta) (hoverlap : StratumPositive P) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (hholder : HolderMean E beta P) (hrange : MeanRange E P) (x : Bool) : IsFiniteMeasure (latentMeanMeasure E P x) := by have hi := latentMean_integrable E P beta kappa hbeta hoverlap hdesign hholder hrange x apply isFiniteMeasure_withDensity have hn : 0 ≤ᵐ[latentDoseLaw P x] (fun t => condPotMean E P x (t+a0)) := by filter_upwards [latentDoseLaw_ae_mem P kappa hdesign x] with t ht have ha : t+a0 ∈ Icc (0 : ℝ) 1 := by dsimp [a0]; constructor <;> linarith [ht.1, ht.2] exact le_trans (by norm_num) (hrange x _ ha).1 exact ((hasFiniteIntegral_iff_ofReal hn).mp hi.hasFiniteIntegral).ne
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentMeanMeasure_finite · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:196
theorem latentMeanMeasure_support

The marked law inherits compact support by absolute continuity with respect to latent dose. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hdesign :
WeakDesign K.clo K.chi kappa P
x :
(latentMeanMeasure E P x) (Icc (-1/2 : ℝ) (1/2))ᶜ = 0
Proof (Lean source)
-- @node: latentMeanMeasure_support lemma latentMeanMeasure_support (E : PathSpace S) (P : Measure (StructSpace S)) (kappa : ℝ) {K : ClassConstants} (hdesign : WeakDesign K.clo K.chi kappa P) (x : Bool) : (latentMeanMeasure E P x) (Icc (-1/2 : ℝ) (1/2))ᶜ = 0 := by exact withDensity_absolutelyContinuous _ _ (ae_iff.mp (latentDoseLaw_ae_mem P kappa hdesign x))
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentMeanMeasure_support · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:212
theorem latentMeanMeasure_eq_of_obsLaw_eq

Gaussian injectivity recovers the mean-marked latent law from observational equivalence. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
hP' :
NoisyDoseModelClass E K beta kappa sigma P'
hobs :
obsLaw sigma P = obsLaw sigma P'
x :
Proof (Lean source)
-- @node: latentMeanMeasure_eq_of_obsLaw_eq lemma latentMeanMeasure_eq_of_obsLaw_eq (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P P' : Measure (StructSpace S)) [IsProbabilityMeasure P] [IsProbabilityMeasure P'] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (hP' : NoisyDoseModelClass E K beta kappa sigma P') (hobs : obsLaw sigma P = obsLaw sigma P') (x : Bool) : latentMeanMeasure E P x = latentMeanMeasure E P' x := by have hb : 0 < beta := hbeta.1 letI := latentMeanMeasure_finite E P beta kappa hb hP.strataPos hP.weakDesign hP.holderMean hP.meanRange x letI := latentMeanMeasure_finite E P' beta kappa hb hP'.strataPos hP'.weakDesign hP'.holderMean hP'.meanRange x have hc := observedMarked_eq_of_obsLaw_eq sigma P P' hobs x rw [observedMarked_stratum_convolution E beta kappa sigma hbeta hkappa hsigma P hP x, observedMarked_stratum_convolution E beta kappa sigma hbeta hkappa hsigma P' hP' x] at hc have hi := compact_gaussian_convolution_injective sigma hsigma (latentMeanMeasure E P x) 0 (latentMeanMeasure E P' x) 0 (latentMeanMeasure_support E P kappa hP.weakDesign x) (by simp) (latentMeanMeasure_support E P' kappa hP'.weakDesign x) (by simp) (by simpa using hc) simpa using hi
CausalSmith.Stat.NoisydoseWeakdesignTransition.latentMeanMeasure_eq_of_obsLaw_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/MarkedIdentification.lean:219
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.ObservedMarkedChiSquare 11 declarations The observed marked likelihood ratio and its exact chi-square energy (12).

The observed marked likelihood ratio and its exact chi-square energy (12).

The centered signed density of a threshold profile.

Definition (Lean source)
kappa :
ℝ
t :
ℝ
markedSignedProfile kappa mu t :
ℝ
witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)
CausalSmith.Stat.NoisydoseWeakdesignTransition.markedSignedProfile · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedMarkedChiSquare.lean:14

The success mark adds the centered convolution; the failure mark subtracts it.

Definition (Lean source)
kappa sigma :
ℝ
o :
Obs
markedLikelihood kappa sigma mu o :
ℝ
1
+ (if o.2.2 = 1 then 2 else -2) * smoothSigned sigma (markedSignedProfile kappa mu) (o.2.1-a0) / smoothSigned sigma (witnessDesignDensity kappa) (o.2.1-a0)
theorem obsLaw_reference_density_lintegral

The reference has equal success and failure densities. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 < sigma
f :
Obs → ℝ≥0∞
hf :
(∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
= ∫⁻ x, ∫⁻ w, ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2) * (f (x,w,1) + f (x,w,0)) ∂volume ∂((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true)
Proof (Lean source)
-- @node: obsLaw_reference_density_lintegral lemma obsLaw_reference_density_lintegral (E : PathSpace S) (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 < sigma) (f : Obs → ℝ≥0∞) (hf : Measurable f) : (∫⁻ o, f o ∂obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) = ∫⁻ x, ∫⁻ w, ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2) * (f (x,w,1) + f (x,w,0)) ∂volume ∂((1/2 : ℝ≥0∞) • Measure.dirac false + (1/2 : ℝ≥0∞) • Measure.dirac true) := by rw [obsLaw_witness_signed_density_lintegral E kappa sigma hkappa hsigma referenceProfile f hf] have hz : (fun t => witnessDesignDensity kappa t * ((referenceProfile (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)) = 0 := by funext t norm_num [referenceProfile, projIcc] rw [hz] simp only [smoothSigned, Pi.zero_apply, zero_mul, integral_zero, add_zero, sub_zero, mul_add]
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_reference_density_lintegral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedMarkedChiSquare.lean:27
theorem marked_densities_nonneg

The two mark densities are nonnegative because they are convolutions of nonnegative latent densities. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma w :
ℝ
hkappa :
0 ≤ kappa
hsigma :
0 < sigma
conclusion 1
0
≤ smoothSigned sigma (witnessDesignDensity kappa) w / 2
+ smoothSigned sigma (markedSignedProfile kappa mu) w
conclusion 2
0
≤ smoothSigned sigma (witnessDesignDensity kappa) w / 2
- smoothSigned sigma (markedSignedProfile kappa mu) w
Proof (Lean source)
-- @node: marked_densities_nonneg lemma marked_densities_nonneg (kappa sigma w : ℝ) (hkappa : 0 ≤ kappa) (hsigma : 0 < sigma) (mu : ThresholdProfile) : 0 ≤ smoothSigned sigma (witnessDesignDensity kappa) w / 2 + smoothSigned sigma (markedSignedProfile kappa mu) w ∧ 0 ≤ smoothSigned sigma (witnessDesignDensity kappa) w / 2 - smoothSigned sigma (markedSignedProfile kappa mu) w := by unfold markedSignedProfile rw [← marked_success_density_eq kappa sigma w hkappa hsigma mu, ← marked_failure_density_eq kappa sigma w hkappa hsigma mu] constructor · apply integral_nonneg intro t exact mul_nonneg (mul_nonneg (witnessDesignDensity_nonneg kappa t hkappa) (mu _).property.1) (phiDensity_pos sigma _ hsigma).le · apply integral_nonneg intro t exact mul_nonneg (mul_nonneg (witnessDesignDensity_nonneg kappa t hkappa) (sub_nonneg.mpr (mu _).property.2)) (phiDensity_pos sigma _ hsigma).le
CausalSmith.Stat.NoisydoseWeakdesignTransition.marked_densities_nonneg · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedMarkedChiSquare.lean:46
theorem markedLikelihood_measurable

The likelihood is a measurable real function on the entire observed space. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa sigma :
ℝ
hkappa :
0 ≤ kappa
Measurable (markedLikelihood kappa sigma mu)
Proof (Lean source)
-- @node: markedLikelihood_measurable @[fun_prop] lemma markedLikelihood_measurable (kappa sigma : ℝ) (hkappa : 0 ≤ kappa) (mu : ThresholdProfile) : Measurable (markedLikelihood kappa sigma mu) := by have hm : Measurable (fun o : Obs => if o.2.2 = 1 then (2 : ℝ) else -2) := Measurable.ite (measurableSet_eq_fun (by fun_prop) measurable_const) measurable_const measurable_const unfold markedLikelihood markedSignedProfile fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.markedLikelihood_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedMarkedChiSquare.lean:67
theorem markedLikelihood_density_mul

Multiplying the reference mark density by the likelihood recovers each alternative mark. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa sigma w :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
x :
conclusion 1
ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2) * ofReal (markedLikelihood kappa sigma mu (x,w,1))
= ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2 + smoothSigned sigma (markedSignedProfile kappa mu) (w-a0))
conclusion 2
ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2) * ofReal (markedLikelihood kappa sigma mu (x,w,0))
= ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2 - smoothSigned sigma (markedSignedProfile kappa mu) (w-a0))
Proof (Lean source)
-- @node: markedLikelihood_density_mul lemma markedLikelihood_density_mul (kappa sigma w : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (mu : ThresholdProfile) (x : Bool) : ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2) * ofReal (markedLikelihood kappa sigma mu (x,w,1)) = ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2 + smoothSigned sigma (markedSignedProfile kappa mu) (w-a0)) ∧ ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2) * ofReal (markedLikelihood kappa sigma mu (x,w,0)) = ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2 - smoothSigned sigma (markedSignedProfile kappa mu) (w-a0)) := by have hp := (gaussian_design_density_lower kappa sigma hkappa hsigma (w-a0)).1 rw [← ENNReal.ofReal_mul (by positivity), ← ENNReal.ofReal_mul (by positivity)] constructor <;> congr 1 <;> simp only [markedLikelihood, fst, snd, if_true, show (0 : ℝ) ≠ 1 by norm_num, if_false] <;> field_simp [ne_of_gt hp] <;> ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.markedLikelihood_density_mul · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedMarkedChiSquare.lean:78
theorem obsLaw_witness_withDensity

The observed alternative is the reference law weighted by its explicit marked likelihood. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
obsLaw sigma (lowerWitnessLaw E kappa mu)
= (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)).withDensity (fun o => ofReal (markedLikelihood kappa sigma mu o))
Proof (Lean source)
-- @node: obsLaw_witness_withDensity lemma obsLaw_witness_withDensity (E : PathSpace S) (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (mu : ThresholdProfile) : obsLaw sigma (lowerWitnessLaw E kappa mu) = (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)).withDensity (fun o => ofReal (markedLikelihood kappa sigma mu o)) := by have hk : 0 ≤ kappa := hkappa.1 apply Measure.ext_of_lintegral intro f hf rw [lintegral_withDensity_eq_lintegral_mul _ (by fun_prop) hf, obsLaw_reference_density_lintegral E kappa sigma hkappa.1 hsigma.1 _ (by fun_prop), obsLaw_witness_signed_density_lintegral E kappa sigma hkappa.1 hsigma.1 mu f hf] apply lintegral_congr intro x apply lintegral_congr intro w symm simp only [Pi.mul_apply] change _ = ofReal (_ + smoothSigned sigma (markedSignedProfile kappa mu) (w-a0)) * _ + ofReal (_ - smoothSigned sigma (markedSignedProfile kappa mu) (w-a0)) * _ rw [mul_add, ← mul_assoc, ← mul_assoc, (markedLikelihood_density_mul kappa sigma w hkappa hsigma mu x).1, (markedLikelihood_density_mul kappa sigma w hkappa hsigma mu x).2]
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_witness_withDensity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedMarkedChiSquare.lean:96
theorem markedLikelihood_nonneg

The likelihood stays nonnegative for either choice of mark. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
o :
Obs
0 ≤ markedLikelihood kappa sigma mu o
Proof (Lean source)
-- @node: markedLikelihood_nonneg lemma markedLikelihood_nonneg (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (mu : ThresholdProfile) (o : Obs) : 0 ≤ markedLikelihood kappa sigma mu o := by have hp := (gaussian_design_density_lower kappa sigma hkappa hsigma (o.2.1-a0)).1 have hd := marked_densities_nonneg kappa sigma (o.2.1-a0) hkappa.1 hsigma.1 mu unfold markedLikelihood split_ifs · have he : 1 + 2 * smoothSigned sigma (markedSignedProfile kappa mu) (o.2.1-a0) / smoothSigned sigma (witnessDesignDensity kappa) (o.2.1-a0) = (smoothSigned sigma (witnessDesignDensity kappa) (o.2.1-a0) + 2*smoothSigned sigma (markedSignedProfile kappa mu) (o.2.1-a0)) / smoothSigned sigma (witnessDesignDensity kappa) (o.2.1-a0) := by field_simp <;> ring rw [he] exact div_nonneg (by linarith [hd.1]) hp.le · have he : 1 + (-2) * smoothSigned sigma (markedSignedProfile kappa mu) (o.2.1-a0) / smoothSigned sigma (witnessDesignDensity kappa) (o.2.1-a0) = (smoothSigned sigma (witnessDesignDensity kappa) (o.2.1-a0) - 2*smoothSigned sigma (markedSignedProfile kappa mu) (o.2.1-a0)) / smoothSigned sigma (witnessDesignDensity kappa) (o.2.1-a0) := by field_simp <;> ring rw [he] exact div_nonneg (by linarith [hd.2]) hp.le
CausalSmith.Stat.NoisydoseWeakdesignTransition.markedLikelihood_nonneg · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedMarkedChiSquare.lean:122
theorem obsLaw_witness_rnDeriv_toReal

Radon--Nikodym uniqueness identifies the real observed likelihood with the explicit mark ratio. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
(fun o => ((obsLaw sigma (lowerWitnessLaw E kappa mu)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal)
=ᵐ[ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)] markedLikelihood kappa sigma mu
Proof (Lean source)
-- @node: obsLaw_witness_rnDeriv_toReal lemma obsLaw_witness_rnDeriv_toReal (E : PathSpace S) (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (mu : ThresholdProfile) : (fun o => ((obsLaw sigma (lowerWitnessLaw E kappa mu)).rnDeriv (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) o).toReal) =ᵐ[ obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)] markedLikelihood kappa sigma mu := by letI := lowerWitnessLaw_probability E kappa hkappa referenceProfile have hobs : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop letI : IsProbabilityMeasure (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) := Measure.isProbabilityMeasure_map hobs.aemeasurable rw [obsLaw_witness_withDensity E kappa sigma hkappa hsigma mu] have h := Measure.rnDeriv_withDensity (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ((markedLikelihood_measurable kappa sigma hkappa.1 mu).ennreal_ofReal) filter_upwards [h] with o ho rw [ho, ENNReal.toReal_ofReal (markedLikelihood_nonneg kappa sigma hkappa hsigma mu o)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_witness_rnDeriv_toReal · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedMarkedChiSquare.lean:148
theorem markedLikelihood_sq_density

Each reference mark contributes twice the signed-density energy to chi-square. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa sigma w :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
x :
ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2) * (ofReal ((markedLikelihood kappa sigma mu (x,w,1)-1)^2) + ofReal ((markedLikelihood kappa sigma mu (x,w,0)-1)^2))
= ofReal (4 * (smoothSigned sigma (markedSignedProfile kappa mu) (w-a0))^2 / smoothSigned sigma (witnessDesignDensity kappa) (w-a0))
Proof (Lean source)
-- @node: markedLikelihood_sq_density lemma markedLikelihood_sq_density (kappa sigma w : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (mu : ThresholdProfile) (x : Bool) : ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2) * (ofReal ((markedLikelihood kappa sigma mu (x,w,1)-1)^2) + ofReal ((markedLikelihood kappa sigma mu (x,w,0)-1)^2)) = ofReal (4 * (smoothSigned sigma (markedSignedProfile kappa mu) (w-a0))^2 / smoothSigned sigma (witnessDesignDensity kappa) (w-a0)) := by have hp := (gaussian_design_density_lower kappa sigma hkappa hsigma (w-a0)).1 rw [mul_add, ← ENNReal.ofReal_mul (by positivity), ← ENNReal.ofReal_mul (by positivity), ← ENNReal.ofReal_add (by positivity) (by positivity)] congr 1 simp only [markedLikelihood, fst, snd, if_true, show (0 : ℝ) ≠ 1 by norm_num, if_false] field_simp [ne_of_gt hp] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.markedLikelihood_sq_density · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedMarkedChiSquare.lean:168
theorem observed_marked_chiSq_identity

The exact observed marked-law chi-square formula and finiteness, rather than an oracle-treatment distance. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa sigma :
ℝ
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Ioc (0 : ℝ) (1/4)
hrange :
∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)
v :
fun t
=> witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2)
pV :
Integrable (fun w => (smoothSigned sigma v w)^2 / pV w)
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa mu)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
= 4 * ∫ w, (smoothSigned sigma v w)^2 / pV w
Proof (Lean source)
-- @node: observed_marked_chiSq_identity lemma observed_marked_chiSq_identity (E : PathSpace S) (kappa sigma : ℝ) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Ioc (0 : ℝ) (1/4)) (mu : ThresholdProfile) (hrange : ∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)) : let v := fun t => witnessDesignDensity kappa t * ((mu (projIcc 0 1 zero_le_one (t+a0)) : ℝ)-1/2) let pV := smoothSigned sigma (witnessDesignDensity kappa) Integrable (fun w => (smoothSigned sigma v w)^2 / pV w) ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa mu)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) = 4 * ∫ w, (smoothSigned sigma v w)^2 / pV w := by refine ⟨marked_profile_energy_integrable kappa sigma hkappa hsigma mu, ?_⟩ have hk : 0 ≤ kappa := hkappa.1 let R := obsLaw sigma (lowerWitnessLaw E kappa referenceProfile) let f := markedLikelihood kappa sigma mu let e := fun w => (smoothSigned sigma (markedSignedProfile kappa mu) w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w have hm : Measurable (fun o => (f o-1)^2) := by dsimp [f] fun_prop have he : Integrable e := marked_profile_energy_integrable kappa sigma hkappa hsigma mu have hen : ∀ w, 0 ≤ e w := fun w => div_nonneg (sq_nonneg _) (gaussian_design_density_lower kappa sigma hkappa hsigma w).1.le have hchi : chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa mu)) R = ∫ o, (f o-1)^2 ∂ R := by apply integral_congr_ae filter_upwards [obsLaw_witness_rnDeriv_toReal E kappa sigma hkappa hsigma mu] with o ho rw [ho] have hlin : (∫⁻ o, ofReal ((f o-1)^2) ∂ R) = ∫⁻ w, ofReal (4*e w) := by rw [obsLaw_reference_density_lintegral E kappa sigma hk hsigma.1 _ hm.ennreal_ofReal] have hi : ∀ x : Bool, (∫⁻ w, ofReal (smoothSigned sigma (witnessDesignDensity kappa) (w-a0)/2) * (ofReal ((f (x,w,1)-1)^2) + ofReal ((f (x,w,0)-1)^2))) = ∫⁻ w, ofReal (4*e w) := by intro x calc _ = ∫⁻ w, ofReal (4*e (w-a0)) := by apply lintegral_congr intro w convert markedLikelihood_sq_density kappa sigma w hkappa hsigma mu x using 1 <;> dsimp [f, e] <;> congr 1 <;> ring _ = _ := lintegral_sub_right_eq_self (μ := (volume : Measure ℝ)) (fun w => ofReal (4*e w)) a0 simp only [hi, lintegral_const, Measure.add_apply, Measure.smul_apply, Measure.dirac_apply_of_mem (mem_univ _), smul_eq_mul, mul_one] norm_num rw [ENNReal.inv_two_add_inv_two, mul_one] rw [hchi, integral_eq_lintegral_of_nonneg_ae (ae_of_all _ (fun o => sq_nonneg (f o-1))) hm.aestronglyMeasurable, hlin, ← ofReal_integral_eq_lintegral_ofReal (he.const_mul 4) (ae_of_all _ (fun w => mul_nonneg (by norm_num) (hen w))), ENNReal.toReal_ofReal (integral_nonneg (fun w => mul_nonneg (by norm_num) (hen w))), integral_const_mul] rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.observed_marked_chiSq_identity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedMarkedChiSquare.lean:187
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.ObservedPerturbationBounds 8 declarations Equation (27): observed chi-square control from compact signed perturbations and packet mass.

Equation (27): observed chi-square control from compact signed perturbations and packet mass.

theorem markedSignedProfile_eq_perturbation

The threshold mean formula identifies its signed density on the entire real line. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa :
ℝ
delta :
ℝ → ℝ
hformula :
∀ a : Dose, (mu a : ℝ) = 1/2 + delta ((a : ℝ)-a0)
markedSignedProfile kappa mu = fun t => witnessDesignDensity kappa t * delta t
Proof (Lean source)
-- @node: markedSignedProfile_eq_perturbation lemma markedSignedProfile_eq_perturbation (kappa : ℝ) (mu : ThresholdProfile) (delta : ℝ → ℝ) (hformula : ∀ a : Dose, (mu a : ℝ) = 1/2 + delta ((a : ℝ)-a0)) : markedSignedProfile kappa mu = fun t => witnessDesignDensity kappa t * delta t := by funext t by_cases ht : t ∈ Icc (-1/2 : ℝ) (1/2) · have ha : t+a0 ∈ Icc (0 : ℝ) 1 := by dsimp [a0]; constructor <;> linarith [ht.1, ht.2] have hp : ((projIcc 0 1 zero_le_one (t+a0) : Dose) : ℝ) = t+a0 := congrArg val (Set.projIcc_of_mem zero_le_one ha) simp only [markedSignedProfile, hformula, hp, add_sub_cancel_right, add_sub_cancel_left] · simp only [markedSignedProfile, witnessDesignDensity, if_neg ht, zero_mul]
CausalSmith.Stat.NoisydoseWeakdesignTransition.markedSignedProfile_eq_perturbation · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedPerturbationBounds.lean:15
theorem observed_perturbation_chiSq_moment_bound

Equations (12), (24), and (26) give the observed moment-tail comparison for any constructed mean. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa sigma ell :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
hell :
0 ≤ ell
J :
ℕ
delta :
ℝ → ℝ
hrange :
∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)
hformula :
∀ a : Dose, (mu a : ℝ) = 1/2 + delta ((a : ℝ)-a0)
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
delta t = 0
hmom :
∀ j < J, ∫ t, t^j * (witnessDesignDensity kappa t * delta t) = 0
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa mu)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (4 / (exp (-1/2)*sigma^(kappa+1))) * (∫ t, |witnessDesignDensity kappa t * delta t|)^2 * momentTail sigma ell J
Proof (Lean source)
-- @node: observed_perturbation_chiSq_moment_bound lemma observed_perturbation_chiSq_moment_bound (E : PathSpace S) (kappa sigma ell : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (hell : 0 ≤ ell) (J : ℕ) (mu : ThresholdProfile) (delta : ℝ → ℝ) (hrange : ∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)) (hformula : ∀ a : Dose, (mu a : ℝ) = 1/2 + delta ((a : ℝ)-a0)) (hsupp : ∀ t, t ∉ Icc (-ell) ell → delta t = 0) (hmom : ∀ j < J, ∫ t, t^j * (witnessDesignDensity kappa t * delta t) = 0) : chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa mu)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (4 / (exp (-1/2)*sigma^(kappa+1))) * (∫ t, |witnessDesignDensity kappa t * delta t|)^2 * momentTail sigma ell J := by have hid := markedSignedProfile_eq_perturbation kappa mu delta hformula have hv : Integrable (fun t => witnessDesignDensity kappa t * delta t) := by rw [← hid] exact marked_profile_signed_integrable kappa hk.1 mu have hm : Measurable (fun t => witnessDesignDensity kappa t * delta t) := by rw [← hid] unfold markedSignedProfile have hk0 : 0 ≤ kappa := hk.1 fun_prop have hb := gaussian_observed_energy_moment_bound kappa sigma ell hk hs hell J _ hv hm (fun t ht => by rw [hsupp t ht, mul_zero]) hmom have hc := (observed_marked_chiSq_identity E kappa sigma hk hs mu hrange).2 change chiSqDiv _ _ = 4 * ∫ w, (smoothSigned sigma (markedSignedProfile kappa mu) w)^2 / smoothSigned sigma (witnessDesignDensity kappa) w at hc rw [hc, hid] exact (mul_le_mul_of_nonneg_left hb (by norm_num : (0 : ℝ) ≤ 4)).trans_eq (by ring)
CausalSmith.Stat.NoisydoseWeakdesignTransition.observed_perturbation_chiSq_moment_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedPerturbationBounds.lean:29
theorem observed_perturbation_chiSq_scaled_bound

A bound on absolute signed mass gives the precise bandwidth power in equation (27). Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma h ell K :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
hh :
0 < h
hell :
0 ≤ ell
hK :
0 ≤ K
J :
ℕ
delta :
ℝ → ℝ
hrange :
∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)
hformula :
∀ a : Dose, (mu a : ℝ) = 1/2 + delta ((a : ℝ)-a0)
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
delta t = 0
hmom :
∀ j < J, ∫ t, t^j * (witnessDesignDensity kappa t * delta t) = 0
hmass :
(∫ t, |witnessDesignDensity kappa t * delta t|) ≤ K*h^(beta+kappa+1)
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa mu)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)* momentTail sigma ell J
Proof (Lean source)
-- @node: observed_perturbation_chiSq_scaled_bound lemma observed_perturbation_chiSq_scaled_bound (E : PathSpace S) (beta kappa sigma h ell K : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (hh : 0 < h) (hell : 0 ≤ ell) (hK : 0 ≤ K) (J : ℕ) (mu : ThresholdProfile) (delta : ℝ → ℝ) (hrange : ∀ a, (mu a : ℝ) ∈ Icc (1/8) (7/8)) (hformula : ∀ a : Dose, (mu a : ℝ) = 1/2 + delta ((a : ℝ)-a0)) (hsupp : ∀ t, t ∉ Icc (-ell) ell → delta t = 0) (hmom : ∀ j < J, ∫ t, t^j * (witnessDesignDensity kappa t * delta t) = 0) (hmass : (∫ t, |witnessDesignDensity kappa t * delta t|) ≤ K*h^(beta+kappa+1)) : chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa mu)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)* momentTail sigma ell J := by have ht : 0 ≤ momentTail sigma ell J := by unfold momentTail exact tsum_nonneg (fun j => by split_ifs <;> positivity) have hmass0 : 0 ≤ ∫ t, |witnessDesignDensity kappa t * delta t| := integral_nonneg (fun t => abs_nonneg _) have hsq := pow_le_pow_left₀ hmass0 hmass 2 have hc : 0 ≤ 4 / (exp (-1/2)*sigma^(kappa+1)) := div_nonneg (by norm_num) (mul_nonneg (Real.exp_pos _).le (Real.rpow_nonneg hs.1.le _)) calc _ ≤ (4 / (exp (-1/2)*sigma^(kappa+1))) * (∫ t, |witnessDesignDensity kappa t * delta t|)^2 * momentTail sigma ell J := observed_perturbation_chiSq_moment_bound E kappa sigma ell hk hs hell J mu delta hrange hformula hsupp hmom _ ≤ (4 / (exp (-1/2)*sigma^(kappa+1))) * (K*h^(beta+kappa+1))^2 * momentTail sigma ell J := by gcongr _ = _ := by rw [mul_pow, ← Real.rpow_mul_natCast hh.le] norm_num only [Nat.cast_ofNat] rw [show (beta+kappa+1)* (2 : ℝ) = 2*beta+2*kappa+2 by ring, show -kappa-1 = -(kappa+1) by ring, Real.rpow_neg hs.1.le] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.observed_perturbation_chiSq_scaled_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedPerturbationBounds.lean:60
theorem observed_perturbation_pair_chiSq_scaled_bound

Both signs share the same mass and moment control, hence the same observed comparison constant. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma h ell K :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
hh :
0 < h
hell :
0 ≤ ell
hK :
0 ≤ K
J :
ℕ
muPlus muMinus :
delta :
ℝ → ℝ
hrange :
∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)
hformula :
∀ a : Dose,
(muPlus a : ℝ) = 1/2 + delta ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - delta ((a : ℝ)-a0)
hsupp :
∀ t
if
t ∉ Icc (-ell) ell
then
delta t = 0
hmom :
∀ j < J, ∫ t, t^j * (witnessDesignDensity kappa t * delta t) = 0
hmass :
(∫ t, |witnessDesignDensity kappa t * delta t|) ≤ K*h^(beta+kappa+1)
B :
(4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)* momentTail sigma ell J
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
Proof (Lean source)
-- @node: observed_perturbation_pair_chiSq_scaled_bound lemma observed_perturbation_pair_chiSq_scaled_bound (E : PathSpace S) (beta kappa sigma h ell K : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (hh : 0 < h) (hell : 0 ≤ ell) (hK : 0 ≤ K) (J : ℕ) (muPlus muMinus : ThresholdProfile) (delta : ℝ → ℝ) (hrange : ∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + delta ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - delta ((a : ℝ)-a0)) (hsupp : ∀ t, t ∉ Icc (-ell) ell → delta t = 0) (hmom : ∀ j < J, ∫ t, t^j * (witnessDesignDensity kappa t * delta t) = 0) (hmass : (∫ t, |witnessDesignDensity kappa t * delta t|) ≤ K*h^(beta+kappa+1)) : let B := (4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)* momentTail sigma ell J chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B := by constructor · exact observed_perturbation_chiSq_scaled_bound E beta kappa sigma h ell K hk hs hh hell hK J muPlus delta (fun a => (hrange a).1) (fun a => (hformula a).1) hsupp hmom hmass · apply observed_perturbation_chiSq_scaled_bound E beta kappa sigma h ell K hk hs hh hell hK J muMinus (fun t => -delta t) (fun a => (hrange a).2) · intro a simpa only [sub_eq_add_neg] using (hformula a).2 · intro t ht rw [hsupp t ht, neg_zero] · intro j hj simp only [mul_neg, integral_neg, hmom j hj, neg_zero] · simpa only [mul_neg, abs_neg] using hmass
CausalSmith.Stat.NoisydoseWeakdesignTransition.observed_perturbation_pair_chiSq_scaled_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedPerturbationBounds.lean:97
theorem inverse_profile_pair_chiSq_bound

The packet's scaled mass and exact cancellations establish equation (27) for both inverse alternatives. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma epsilon ell Cpacket cPacket :
ℝ
m :
ℕ
hp :
PacketBounds kappa Cpacket cPacket m
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
he :
0 ≤ epsilon
hC :
0 ≤ Cpacket
hc :
0 ≤ cPacket
hell :
ell ∈ Ioc (0 : ℝ) (1/4)
hm :
0 < m
muPlus muMinus :
hrange :
∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)
hformula :
∀ a : Dose,
(muPlus a : ℝ) = 1/2 + epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell) ∧
(muMinus a : ℝ) = 1/2 - epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)
K :
(kappa+1)*2^kappa*epsilon*Cpacket
B :
(4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*(ell/m)^(2*beta+2*kappa+2)* momentTail sigma ell (floor (cPacket*m))
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
Proof (Lean source)
-- @node: inverse_profile_pair_chiSq_bound lemma inverse_profile_pair_chiSq_bound (E : PathSpace S) (beta kappa sigma epsilon ell Cpacket cPacket : ℝ) (m : ℕ) (hp : PacketBounds kappa Cpacket cPacket m) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (he : 0 ≤ epsilon) (hC : 0 ≤ Cpacket) (hc : 0 ≤ cPacket) (hell : ell ∈ Ioc (0 : ℝ) (1/4)) (hm : 0 < m) (muPlus muMinus : ThresholdProfile) (hrange : ∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell) ∧ (muMinus a : ℝ) = 1/2 - epsilon*(ell/m)^beta*packetPsi kappa m (((a : ℝ)-a0)/ell)) : let K := (kappa+1)*2^kappa*epsilon*Cpacket let B := (4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*(ell/m)^(2*beta+2*kappa+2)* momentTail sigma ell (floor (cPacket*m)) chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B := by have hmR : (0 : ℝ) < m := by exact_mod_cast hm apply observed_perturbation_pair_chiSq_scaled_bound E beta kappa sigma (ell/m) ell ((kappa+1)*2^kappa*epsilon*Cpacket) hk hs (div_pos hell.1 hmR) hell.1.le (by have hk0 := hk.1; positivity) (floor (cPacket*m)) muPlus muMinus (fun t => epsilon*(ell/m)^beta*packetPsi kappa m (t/ell)) hrange hformula · exact inversePerturbation_support beta kappa epsilon (ell/m) ell m hell.1 · intro j hj exact inversePerturbation_moment_zero beta kappa epsilon (ell/m) ell Cpacket cPacket m j hp hell (packet_floor_moment_cutoff cPacket m j hc hj) · exact inversePerturbation_absolute_mass_le beta kappa epsilon ell Cpacket cPacket m hp hk.1 he hell hm
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverse_profile_pair_chiSq_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedPerturbationBounds.lean:130
theorem directPerturbation_absolute_mass_le

The compact direct bump has the bandwidth mass required after equation (27). Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon h :
ℝ
hk :
0 ≤ kappa
he :
0 ≤ epsilon
hh :
0 < h
(∫ t, |witnessDesignDensity kappa t * directPerturbation beta epsilon h t|)
≤ (2*(kappa+1)*2^kappa*epsilon)*h^(beta+kappa+1)
Proof (Lean source)
-- @node: directPerturbation_absolute_mass_le lemma directPerturbation_absolute_mass_le (beta kappa epsilon h : ℝ) (hk : 0 ≤ kappa) (he : 0 ≤ epsilon) (hh : 0 < h) : (∫ t, |witnessDesignDensity kappa t * directPerturbation beta epsilon h t|) ≤ (2*(kappa+1)*2^kappa*epsilon)*h^(beta+kappa+1) := by let A := (kappa+1)*2^kappa*h^kappa*(epsilon*h^beta) have hA : 0 ≤ A := by dsimp [A]; positivity have hi := (directPerturbation_signed_integrable beta kappa epsilon h hk hh).abs have hs : (∫ t, |witnessDesignDensity kappa t * directPerturbation beta epsilon h t|) = ∫ t in Icc (-h) h, |witnessDesignDensity kappa t * directPerturbation beta epsilon h t| := by symm apply setIntegral_eq_integral_of_forall_compl_eq_zero intro t ht rw [directPerturbation_support beta epsilon h t ht, mul_zero, abs_zero] rw [hs] have hb : ∀ t ∈ Icc (-h) h, |witnessDesignDensity kappa t * directPerturbation beta epsilon h t| ≤ A := by intro t ht have hd := directPerturbation_bounds beta epsilon h t he hh rw [abs_of_nonneg (mul_nonneg (witnessDesignDensity_nonneg kappa t hk) hd.1)] have hg : witnessDesignDensity kappa t ≤ (kappa+1)*2^kappa*h^kappa := by unfold witnessDesignDensity split_ifs · exact mul_le_mul_of_nonneg_left (Real.rpow_le_rpow (abs_nonneg _) (abs_le.mpr ht) hk) (by positivity) · positivity exact mul_le_mul hg hd.2 hd.1 (by positivity) calc _ ≤ ∫ _t in Icc (-h) h, A := setIntegral_mono_on hi.integrableOn (continuous_const.integrableOn_Icc) measurableSet_Icc hb _ = (2*(kappa+1)*2^kappa*epsilon)*h^(beta+kappa+1) := by rw [setIntegral_const, measureReal_def, Real.volume_Icc, ENNReal.toReal_ofReal (by linarith), smul_eq_mul] rw [Real.rpow_add hh, Real.rpow_add hh, Real.rpow_one] dsimp [A] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation_absolute_mass_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedPerturbationBounds.lean:163
theorem directPerturbation_quadratic_energy_le

The latent quadratic energy in equation (18) has the direct-regime bandwidth power. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa epsilon h :
ℝ
hk :
0 ≤ kappa
he :
0 ≤ epsilon
hh :
0 < h
(∫ t, witnessDesignDensity kappa t * (directPerturbation beta epsilon h t)^2)
≤ (2*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1)
Proof (Lean source)
-- @node: directPerturbation_quadratic_energy_le lemma directPerturbation_quadratic_energy_le (beta kappa epsilon h : ℝ) (hk : 0 ≤ kappa) (he : 0 ≤ epsilon) (hh : 0 < h) : (∫ t, witnessDesignDensity kappa t * (directPerturbation beta epsilon h t)^2) ≤ (2*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1) := by have hcont : Continuous (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * (directPerturbation beta epsilon h t)^2) := by fun_prop have hid : (fun t => witnessDesignDensity kappa t * (directPerturbation beta epsilon h t)^2) = (Icc (-1/2 : ℝ) (1/2)).indicator (fun t : ℝ => (kappa+1)*2^kappa*|t|^kappa * (directPerturbation beta epsilon h t)^2) := by funext t simp only [witnessDesignDensity, indicator_apply] split_ifs <;> simp have hi : Integrable (fun t => witnessDesignDensity kappa t * (directPerturbation beta epsilon h t)^2) := by rw [hid] exact hcont.integrableOn_Icc.integrable_indicator measurableSet_Icc have hm := (directPerturbation_signed_integrable beta kappa epsilon h hk hh).abs have hA : 0 ≤ epsilon*h^beta := mul_nonneg he (Real.rpow_nonneg hh.le _) calc _ ≤ ∫ t, (epsilon*h^beta)*|witnessDesignDensity kappa t * directPerturbation beta epsilon h t| := by apply integral_mono hi (hm.const_mul _) intro t have hb := directPerturbation_bounds beta epsilon h t he hh have hg := witnessDesignDensity_nonneg kappa t hk dsimp only rw [abs_of_nonneg (mul_nonneg hg hb.1)] nlinarith [mul_nonneg hg (mul_nonneg hb.1 (sub_nonneg.mpr hb.2))] _ = (epsilon*h^beta)*(∫ t, |witnessDesignDensity kappa t * directPerturbation beta epsilon h t|) := integral_const_mul _ _ _ ≤ (epsilon*h^beta)*((2*(kappa+1)*2^kappa*epsilon)*h^(beta+kappa+1)) := mul_le_mul_of_nonneg_left (directPerturbation_absolute_mass_le beta kappa epsilon h hk he hh) hA _ = _ := by have hr : h^(2*beta+kappa+1) = h^beta*h^(beta+kappa+1) := by rw [show 2*beta+kappa+1 = beta+(beta+kappa+1) by ring, Real.rpow_add hh] rw [hr] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.directPerturbation_quadratic_energy_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedPerturbationBounds.lean:201
theorem direct_profile_pair_chiSq_bound

The direct pair also obeys equation (27), with cancellation order zero. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma epsilon h :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Ioc (0 : ℝ) (1/4)
he :
0 ≤ epsilon
hh :
0 < h
muPlus muMinus :
hrange :
∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)
hformula :
∀ a : Dose,
(muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∧
(muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0)
K :
2*(kappa+1)*2^kappa*epsilon
B :
(4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)* momentTail sigma h 0
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ B
Proof (Lean source)
-- @node: direct_profile_pair_chiSq_bound lemma direct_profile_pair_chiSq_bound (E : PathSpace S) (beta kappa sigma epsilon h : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Ioc (0 : ℝ) (1/4)) (he : 0 ≤ epsilon) (hh : 0 < h) (muPlus muMinus : ThresholdProfile) (hrange : ∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0)) : let K := 2*(kappa+1)*2^kappa*epsilon let B := (4 / exp (-1/2)*K^2)*sigma^(-kappa-1)*h^(2*beta+2*kappa+2)* momentTail sigma h 0 chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ B := by apply observed_perturbation_pair_chiSq_scaled_bound E beta kappa sigma h h (2*(kappa+1)*2^kappa*epsilon) hk hs hh hh.le (by have hk0 := hk.1; positivity) 0 muPlus muMinus (directPerturbation beta epsilon h) hrange hformula · exact directPerturbation_support beta epsilon h · intro j hj exact False.elim (Nat.not_lt_zero j hj) · exact directPerturbation_absolute_mass_le beta kappa epsilon h hk.1 he hh
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_profile_pair_chiSq_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ObservedPerturbationBounds.lean:240
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.Packet 16 declarations Standard Jacobi normalization, explicit smooth filtering, and the two packet constructions.

Standard Jacobi normalization, explicit smooth filtering, and the two packet constructions.

def stdJacobi

DLMF 18.5.7 normalization of the reused shifted hypergeometric polynomial.

Definition (Lean source)
a b :
ℝ
j :
ℕ
z :
ℝ
stdJacobi a b j z :
ℝ
rising (a+1) j / (j.factorial : ℝ) * jacobiShifted j a b ((1-z)/2)
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:21
def genBinom

Generalized real binomial coefficient defined by the falling factorial divided by the integer factorial.

Definition (Lean source)
v :
ℝ
i :
ℕ
genBinom v i :
ℝ
(descPochhammer ℝ i).eval v / (i.factorial : ℝ)
CausalSmith.Stat.NoisydoseWeakdesignTransition.genBinom · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:24

The local falling-factorial binomial agrees with the binomial-ring coefficient. This is the stated conclusion. This is the stated conclusion. This is the stated conclusion. This is the stated conclusion.

Formal statement
v :
ℝ
i :
ℕ
genBinom v i = choose v i
Proof (Lean source)
-- @node: genBinom_eq_choose lemma genBinom_eq_choose (v : ℝ) (i : ℕ) : genBinom v i = choose v i := by rw [Ring.choose_eq_smul, smul_eq_mul, Polynomial.descPochhammer_smeval_eq_ascPochhammer, Polynomial.ascPochhammer_smeval_eq_eval, genBinom, descPochhammer_eval_eq_ascPochhammer] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.genBinom_eq_choose · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:28

Vandermonde convolution for the local generalized real binomial coefficients. This is the stated conclusion.

Formal statement
A B :
ℝ
m :
ℕ
genBinom (A+B) m = ∑ i ∈ range (m+1), genBinom A i * genBinom B (m-i)
Proof (Lean source)
-- @node: genBinom_vandermonde lemma genBinom_vandermonde (A B : ℝ) (m : ℕ) : genBinom (A+B) m = ∑ i ∈ range (m+1), genBinom A i * genBinom B (m-i) := by simp_rw [genBinom_eq_choose] simpa only [Finset.Nat.sum_antidiagonal_eq_sum_range_succ_mk, Nat.succ_eq_add_one] using Ring.add_choose_eq m (Commute.all A B)
CausalSmith.Stat.NoisydoseWeakdesignTransition.genBinom_vandermonde · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:34
theorem genBinom_choose_product Lemma genBinom_choose_product in the paper ↗

Choosing a second subset factors a generalized binomial coefficient. Under the stated conditions. This is the stated conclusion.

Formal statement
A :
ℝ
j m i :
ℕ
hm :
m ≤ j
hi :
i ≤ m
genBinom A (j-i) * ((j-i).choose (m-i) : ℝ)
= genBinom A (j-m) * genBinom (A-(j-m : ℕ)) (m-i)
Proof (Lean source)
-- @node: genBinom_choose_product lemma genBinom_choose_product (A : ℝ) (j m i : ℕ) (hm : m ≤ j) (hi : i ≤ m) : genBinom A (j-i) * ((j-i).choose (m-i) : ℝ) = genBinom A (j-m) * genBinom (A-(j-m : ℕ)) (m-i) := by simp_rw [genBinom_eq_choose] have h := Ring.choose_smul_choose A (show j-m ≤ j-i by omega) have he : (j-i) - (j-m) = m-i := by omega rw [nsmul_eq_mul, ← Nat.choose_symm (show j-m ≤ j-i by omega), he] at h simpa only [mul_comm] using h
CausalSmith.Stat.NoisydoseWeakdesignTransition.genBinom_choose_product · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:41
theorem genBinom_bernstein_poly Lemma genBinom_bernstein_poly in the paper ↗

Expanding the Bernstein basis gives a Vandermonde convolution in each coefficient. This is the stated conclusion.

Formal statement
A B :
ℝ
j :
ℕ
(∑ i ∈ range (j+1), C (genBinom A (j-i) * genBinom B i) * (X ^ i * (X+1)^(j-i)) : ℝ[X])
= ∑ m ∈ range (j+1), C (genBinom A (j-m) * genBinom (A+B-(j-m : ℕ)) m) * X^m
Proof (Lean source)
-- @node: genBinom_bernstein_poly lemma genBinom_bernstein_poly (A B : ℝ) (j : ℕ) : (∑ i ∈ range (j+1), C (genBinom A (j-i) * genBinom B i) * (X ^ i * (X+1)^(j-i)) : ℝ[X]) = ∑ m ∈ range (j+1), C (genBinom A (j-m) * genBinom (A+B-(j-m : ℕ)) m) * X^m := by ext m have hr : (∑ k ∈ range (j+1), C (genBinom A (j-k) * genBinom (A+B-(j-k : ℕ)) k) * X^k).coeff m = if m ≤ j then genBinom A (j-m) * genBinom (A+B-(j-m : ℕ)) m else 0 := by simp only [finsetSum_coeff, coeff_C_mul_X_pow] simp [Finset.mem_range, Nat.lt_succ_iff] rw [hr] simp only [finsetSum_coeff, coeff_C_mul, coeff_X_pow_mul', coeff_X_add_one_pow] by_cases hm : m ≤ j · rw [if_pos hm] have htrim : (∑ i ∈ range (j+1), genBinom A (j-i) * genBinom B i * (if i ≤ m then ((j-i).choose (m-i) : ℝ) else 0)) = ∑ i ∈ range (m+1), genBinom A (j-i) * genBinom B i * ((j-i).choose (m-i) : ℝ) := by symm calc _ = ∑ i ∈ range (m+1), genBinom A (j-i) * genBinom B i * (if i ≤ m then ((j-i).choose (m-i) : ℝ) else 0) := by apply Finset.sum_congr rfl intro i hi rw [if_pos (by have := Finset.mem_range.mp hi; omega)] _ = _ := Finset.sum_subset (Finset.range_mono (by omega)) (by intro i hi hin rw [if_neg (by simp only [Finset.mem_range] at hin; omega), mul_zero]) rw [htrim] calc _ = ∑ i ∈ range (m+1), genBinom A (j-m) * (genBinom B i * genBinom (A-(j-m : ℕ)) (m-i)) := by apply Finset.sum_congr rfl intro i hi have hi' : i ≤ m := by have := Finset.mem_range.mp hi; omega calc _ = (genBinom A (j-i) * ((j-i).choose (m-i) : ℝ)) * genBinom B i := by ring _ = _ := by rw [genBinom_choose_product A j m i hm hi']; ring _ = _ := by rw [← Finset.mul_sum, ← genBinom_vandermonde] congr 2 ring · have hm' : j < m := by omega rw [if_neg hm] apply Finset.sum_eq_zero intro i hi have hi' : i ≤ j := by have := Finset.mem_range.mp hi; omega rw [if_pos (by omega), Nat.choose_eq_zero_of_lt (by omega), Nat.cast_zero, mul_zero]
CausalSmith.Stat.NoisydoseWeakdesignTransition.genBinom_bernstein_poly · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:51

Split a rising factorial at an index no larger than its order. Under the stated conditions. This is the stated conclusion.

Formal statement
a :
ℝ
j m :
ℕ
hm :
m ≤ j
rising a m * rising (a+m) (j-m) = rising a j
Proof (Lean source)
-- @node: rising_split lemma rising_split (a : ℝ) (j m : ℕ) (hm : m ≤ j) : rising a m * rising (a+m) (j-m) = rising a j := by have h := congrArg (eval a) (ascPochhammer_mul ℝ m (j-m)) simpa only [eval_mul, eval_comp, eval_add, eval_X, eval_natCast, rising, Nat.add_sub_of_le hm] using h
CausalSmith.Stat.NoisydoseWeakdesignTransition.rising_split · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:102
theorem jacobi_coefficient_binomial Lemma jacobi_coefficient_binomial in the paper ↗

The normalized hypergeometric coefficient equals the corresponding binomial product. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
j m :
ℕ
hm :
m ≤ j
rising (a+1) j / (j.factorial : ℝ) * (j.choose m : ℝ) * (rising (j+a+b+1) m / rising (a+1) m)
= genBinom (j+a) (j-m) * genBinom (j+a+b+m) m
Proof (Lean source)
-- @node: jacobi_coefficient_binomial lemma jacobi_coefficient_binomial (a b : ℝ) (ha : -1/2 < a) (j m : ℕ) (hm : m ≤ j) : rising (a+1) j / (j.factorial : ℝ) * (j.choose m : ℝ) * (rising (j+a+b+1) m / rising (a+1) m) = genBinom (j+a) (j-m) * genBinom (j+a+b+m) m := by have hpos : 0 < a+1 := by linarith have hden : rising (a+1) m ≠ 0 := ne_of_gt (rising_pos _ _ hpos) have hfac (n : ℕ) : (n.factorial : ℝ) ≠ 0 := by exact_mod_cast Nat.factorial_ne_zero n have hsplit := rising_split (a+1) j m hm have hchoose := congrArg (fun n : ℕ => (n : ℝ)) (Nat.choose_mul_factorial_mul_factorial hm) push_cast at hchoose have he1 : (j : ℝ)+a-(j-m : ℕ)+1 = (a+1)+m := by rw [Nat.cast_sub hm]; ring have he2 : (j : ℝ)+a+b+m-(m : ℝ)+1 = (j : ℝ)+a+b+1 := by ring simp only [genBinom, descPochhammer_eval_eq_ascPochhammer, he1, he2] change _ = rising ((a+1)+m) (j-m) / ((j-m).factorial : ℝ) * (rising (j+a+b+1) m / (m.factorial : ℝ)) field_simp [hden, hfac] rw [← hchoose] rw [← hsplit] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobi_coefficient_binomial · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:109
theorem stdJacobi_binomial_repr Lemma 6 in the paper ↗

Standard Jacobi's generalized binomial representation (NIST DLMF 18.5.8). This discharged citation is a build-inline algebraic obligation, not a gate. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
hb :
-1/2 < b
j :
ℕ
z :
ℝ
stdJacobi a b j z
= (2 : ℝ)^(-(j : ℤ)) * ∑ i ∈ range (j+1), genBinom (j+a) i * genBinom (j+b) (j-i) * (z-1)^(j-i) * (z+1)^i
Proof (Lean source)
-- @node: lem:jacobi-binomial lemma stdJacobi_binomial_repr (a b : ℝ) (ha : -1/2 < a) (hb : -1/2 < b) (j : ℕ) (z : ℝ) : stdJacobi a b j z = (2 : ℝ)^(-(j : ℤ)) * ∑ i ∈ range (j+1), genBinom (j+a) i * genBinom (j+b) (j-i) * (z-1)^(j-i) * (z+1)^i := by let y : ℝ := (z-1)/2 have hstd : stdJacobi a b j z = ∑ m ∈ range (j+1), genBinom (j+a) (j-m) * genBinom (j+a+b+m) m * y^m := by unfold stdJacobi jacobiShifted rw [Finset.mul_sum] apply Finset.sum_congr rfl intro m hm have hm' : m ≤ j := by have := Finset.mem_range.mp hm; omega have hsign : (-1 : ℝ)^m * ((1-z)/2)^m = y^m := by rw [← mul_pow] congr 1 dsimp [y] ring calc _ = (rising (a+1) j / (j.factorial : ℝ) * (j.choose m : ℝ) * (rising (j+a+b+1) m / rising (a+1) m)) * ((-1 : ℝ)^m * ((1-z)/2)^m) := by ring _ = _ := by rw [hsign, jacobi_coefficient_binomial a b ha j m hm'] have hpoly := congrArg (eval y) (genBinom_bernstein_poly (j+a) (j+b) j) simp only [eval_finsetSum, eval_mul, eval_C, eval_pow, eval_X, eval_add, eval_one] at hpoly have hcoeff (m : ℕ) (hm : m ≤ j) : (j : ℝ)+a+((j : ℝ)+b)-(j-m : ℕ) = (j : ℝ)+a+b+m := by rw [Nat.cast_sub hm] ring have hbern : stdJacobi a b j z = ∑ i ∈ range (j+1), genBinom (j+a) (j-i) * genBinom (j+b) i * (y^i * (y+1)^(j-i)) := by rw [hstd, hpoly] apply Finset.sum_congr rfl intro m hm rw [hcoeff m (by have := Finset.mem_range.mp hm; omega)] have hreflect := Finset.sum_range_reflect (fun i => genBinom (j+a) (j-i) * genBinom (j+b) i * (y^i * (y+1)^(j-i))) (j+1) simp only [Nat.add_sub_cancel] at hreflect rw [hbern, ← hreflect, Finset.mul_sum] apply Finset.sum_congr rfl intro i hi have hi' : i ≤ j := by have := Finset.mem_range.mp hi; omega rw [Nat.sub_sub_self hi'] have hy : y+1 = (z+1)/2 := by dsimp [y]; ring have hp : (2 : ℝ)^(j-i) * 2^i = 2^j := by rw [← pow_add, Nat.sub_add_cancel hi'] rw [hy] dsimp [y] rw [div_pow, div_pow, zpow_neg, zpow_natCast] field_simp rw [← hp] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_binomial_repr · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:131
def jacobiWeight

Standard Jacobi weight on the unit symmetric interval.

Definition (Lean source)
a b z :
ℝ
jacobiWeight a b z :
ℝ
(1-z)^a * (1+z)^b
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobiWeight · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:188
def jacobiSqNorm

Squared Lebesgue norm of the standard Jacobi polynomial under its Jacobi weight.

Definition (Lean source)
a b :
ℝ
j :
ℕ
jacobiSqNorm a b j :
ℝ
∫ z in Icc (-1 : ℝ) 1, jacobiWeight a b z * (stdJacobi a b j z)^2
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobiSqNorm · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:190
def packetFilter

A concrete nonnegative smooth bump supported inside (1,2), positive on [5/4,7/4].

Definition (Lean source)
s :
ℝ
packetFilter s :
ℝ
if s ∈ Ioo (9/8 : ℝ) (15/8) then exp (-1/((s-9/8)*(15/8-s))) else 0
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:193
def filteredJacobiKernel

Finite spectral kernel of the standard Jacobi polynomials with a smooth cutoff and their integral norms.

Definition (Lean source)
a b :
ℝ
eta :
ℝ → ℝ
m :
ℕ
x y :
ℝ
filteredJacobiKernel a b eta m x y :
ℝ
∑ j ∈ range (2*m+1), eta ((j : ℝ)/m) * stdJacobi a b j x * stdJacobi a b j y / jacobiSqNorm a b j
CausalSmith.Stat.NoisydoseWeakdesignTransition.filteredJacobiKernel · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:197
def packetKernel

Endpoint kernel at positive degeneracy, and the symmetric interior kernel at zero degeneracy.

Definition (Lean source)
kappa :
ℝ
m :
ℕ
z :
ℝ
packetKernel kappa m z :
ℝ
if 0 < kappa then filteredJacobiKernel 4 ((kappa-1)/2) packetFilter m (-1) z else filteredJacobiKernel 4 4 packetFilter m 0 z
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetKernel · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:202
def packetPsi

The normalized tapered packet, zero outside its support; denominator positivity is a theorem.

Definition (Lean source)
kappa :
ℝ
m :
ℕ
u :
ℝ
packetPsi kappa m u :
ℝ
if u ∈ Icc (-1 : ℝ) 1 then (1-u^2)^4 * (if 0 < kappa then packetKernel kappa m (2*u^2-1) / packetKernel kappa m (-1) else packetKernel kappa m u / packetKernel kappa m 0) else 0
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:206

Full packet conclusion, including positive normalization and all raw cancellations.

Definition (Lean source)
kappa C c :
ℝ
m :
ℕ
PacketBounds kappa C c m :
Prop
clause 1
0 < (if 0 < kappa then packetKernel kappa m (-1) else packetKernel kappa m 0)
clause 2
Even (packetPsi kappa m)
clause 3
ContDiff ℝ 1 (packetPsi kappa m)
clause 4
u :
u ∉ Icc (-1 : ℝ) 1
packetPsi kappa m u = 0
clause 5
packetPsi kappa m 0 = 1
clause 6
u :
|packetPsi kappa m u| ≤ C
clause 7
u :
|deriv (packetPsi kappa m) u| ≤ C*m
clause 8
(∫ u in Icc (-1 : ℝ) 1, |u|^kappa * |packetPsi kappa m u|) ≤ C*(m : ℝ)^(-kappa-1)
clause 9
(∫ u in Icc (-1 : ℝ) 1, |u|^kappa * (packetPsi kappa m u)^2) ≤ C*(m : ℝ)^(-kappa-1)
clause 10
j :
ℕ
(j : ℝ) < c*m
∫ u in Icc (-1 : ℝ) 1, |u|^kappa * u^j * packetPsi kappa m u = 0
CausalSmith.Stat.NoisydoseWeakdesignTransition.PacketBounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/Packet.lean:214
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketDerivative 7 declarations Nearby-argument limits for the endpoint packet derivative estimate (P9).

Nearby-argument limits for the endpoint packet derivative estimate (P9).

theorem packet_derivative_le_of_increment_bound Lemma packet_derivative_le_of_increment_bound in the paper ↗

Comparing nearby increments of two differentiable functions compares their derivatives. This is the division by the increment and passage to the limit used in (P9). Under the stated conditions. This is the stated conclusion.

Formal statement
f g :
ℝ → ℝ
df dg x C :
ℝ
hf :
HasDerivAt f df x
hg :
HasDerivAt g dg x
h :
∀ᶠ y in 𝓝 x, |f y-f x| ≤ C*|g y-g x|
|df| ≤ C*|dg|
Proof (Lean source)
-- @node: packet_derivative_le_of_increment_bound lemma packet_derivative_le_of_increment_bound {f g : ℝ → ℝ} {df dg x C : ℝ} (hf : HasDerivAt f df x) (hg : HasDerivAt g dg x) (h : ∀ᶠ y in 𝓝 x, |f y-f x| ≤ C*|g y-g x|) : |df| ≤ C*|dg| := by apply le_of_tendsto_of_tendsto hf.tendsto_slope.abs (hg.tendsto_slope.abs.const_mul C) filter_upwards [h.filter_mono nhdsWithin_le_nhds] with y hy simpa only [slope_def_field, abs_div, mul_div_assoc] using div_le_div_of_nonneg_right hy (abs_nonneg (y-x))
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_derivative_le_of_increment_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketDerivative.lean:13
theorem filteredJacobiKernel_symm Lemma filteredJacobiKernel_symm in the paper ↗

The finite Jacobi sum is symmetric in its two arguments. This is the stated conclusion.

Formal statement
a b :
ℝ
eta :
ℝ → ℝ
m :
ℕ
x y :
ℝ
filteredJacobiKernel a b eta m x y = filteredJacobiKernel a b eta m y x
Proof (Lean source)
-- @node: filteredJacobiKernel_symm lemma filteredJacobiKernel_symm (a b : ℝ) (eta : ℝ → ℝ) (m : ℕ) (x y : ℝ) : filteredJacobiKernel a b eta m x y = filteredJacobiKernel a b eta m y x := by unfold filteredJacobiKernel apply Finset.sum_congr rfl intro j hj ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.filteredJacobiKernel_symm · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketDerivative.lean:24
theorem filteredJacobiKernel_derivative_bound

The cited angular Lipschitz estimate bounds the ordinary derivative at each interior Jacobi coordinate. The same uniform constant works for all degrees and coordinates. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
hb :
-1/2 < b
eta :
ℝ → ℝ
heta :
S :
ℝ
hS :
0 < S
∃ C : ℝ,
0 < C
conclusion 1
m :
ℕ
1 ≤ m
x ∈ Ioo (-1 : ℝ) 1 :
y ∈ Icc (-1 : ℝ) 1 :
|deriv (fun t => filteredJacobiKernel a b eta m t y) x|
≤ (C*(m : ℝ)^2 / (sqrt (jacobiRegularizedWeight a b m y * jacobiRegularizedWeight a b m x) * (1+m*jacobiAngularDistance y x)^S)) * (1/sqrt (1-x^2))
Proof (Lean source)
-- @node: filteredJacobiKernel_derivative_bound lemma filteredJacobiKernel_derivative_bound (hLip : FilteredJacobiLipschitz) (a b : ℝ) (ha : -1/2 < a) (hb : -1/2 < b) (eta : ℝ → ℝ) (heta : SmoothJacobiFilter eta) (S : ℝ) (hS : 0 < S) : ∃ C : ℝ, 0 < C ∧ ∀ m : ℕ, 1 ≤ m → ∀ x ∈ Ioo (-1 : ℝ) 1, ∀ y ∈ Icc (-1 : ℝ) 1, |deriv (fun t => filteredJacobiKernel a b eta m t y) x| ≤ (C*(m : ℝ)^2 / (sqrt (jacobiRegularizedWeight a b m y * jacobiRegularizedWeight a b m x) * (1+m*jacobiAngularDistance y x)^S)) * (1/sqrt (1-x^2)) := by obtain ⟨C, hC, hkernel⟩ := hLip a b ha hb eta heta S 1 hS (by norm_num) refine ⟨C, hC, ?_⟩ intro m hm x hx y hy have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) have harc := Real.hasDerivAt_arccos (x := x) (by linarith [hx.1]) (by linarith [hx.2]) have hdiff : DifferentiableAt ℝ (fun t => filteredJacobiKernel a b eta m t y) x := by unfold filteredJacobiKernel stdJacobi Causalean.Mathlib.Analysis.SpecialFunctions.Jacobi.jacobiShifted fun_prop have hnear : ∀ᶠ t in 𝓝 x, t ∈ Icc (-1 : ℝ) 1 ∧ jacobiAngularDistance t x ≤ 1/(m : ℝ) := by have hi : ∀ᶠ t in 𝓝 x, t ∈ Ioo (-1 : ℝ) 1 := isOpen_Ioo.mem_nhds hx have hd : ContinuousAt (fun t => jacobiAngularDistance t x) x := by unfold jacobiAngularDistance fun_prop have he := hd.tendsto.eventually (gt_mem_nhds (show jacobiAngularDistance x x < 1/(m : ℝ) by simp only [jacobiAngularDistance, sub_self, abs_zero]; positivity)) filter_upwards [hi, he] with t ht hd exact ⟨⟨ht.1.le, ht.2.le⟩, hd.le⟩ have hbound := packet_derivative_le_of_increment_bound hdiff.hasDerivAt harc (C := C*(m : ℝ)^2 / (sqrt (jacobiRegularizedWeight a b m y * jacobiRegularizedWeight a b m x) * (1+m*jacobiAngularDistance y x)^S)) (by filter_upwards [hnear] with t ht have hk := hkernel m hm t ht.1 x ⟨hx.1.le, hx.2.le⟩ y hy x ⟨hx.1.le, hx.2.le⟩ ht.2 (by simp [jacobiAngularDistance, hmp.le]) convert hk using 1 <;> simp only [jacobiAngularDistance, Function.comp_apply] <;> ring) simpa only [abs_neg, abs_of_nonneg (by positivity : 0 ≤ 1/sqrt (1-x^2))] using hbound
CausalSmith.Stat.NoisydoseWeakdesignTransition.filteredJacobiKernel_derivative_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketDerivative.lean:33
theorem packet_endpoint_angular_derivative_abs Lemma packet_endpoint_angular_derivative_abs in the paper ↗

The angular derivative of the quadratic endpoint coordinate has the magnitude in (P9). The exclusion of zero is needed only for the arccos chain rule. Under the stated conditions. This is the stated conclusion.

Formal statement
u :
ℝ
hu :
u ∈ Ioo (-1 : ℝ) 1
hu0 :
u ≠ 0
|-(1/sqrt (1-(2*u^2-1)^2))*(4*u)| = 2/sqrt (1-u^2)
Proof (Lean source)
-- @node: packet_endpoint_angular_derivative_abs lemma packet_endpoint_angular_derivative_abs (u : ℝ) (hu : u ∈ Ioo (-1 : ℝ) 1) (hu0 : u ≠ 0) : |-(1/sqrt (1-(2*u^2-1)^2))*(4*u)| = 2/sqrt (1-u^2) := by have hD : 0 < 1-u^2 := by nlinarith [hu.1, hu.2] have he : 1-(2*u^2-1)^2 = (2*u)^2*(1-u^2) := by ring have hs : sqrt (1-(2*u^2-1)^2) = 2*|u| *sqrt (1-u^2) := by rw [he, Real.sqrt_mul (sq_nonneg _), Real.sqrt_sq_eq_abs, abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 2)] rw [hs, abs_mul, abs_neg, abs_div, abs_one, abs_of_nonneg (by positivity : 0 ≤ 2*|u| *sqrt (1-u^2)), abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 4)] field_simp [ne_of_gt (abs_pos.mpr hu0), ne_of_gt (Real.sqrt_pos.mpr hD)] <;> ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_angular_derivative_abs · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketDerivative.lean:75
theorem packetKernel_endpoint_composed_derivative_bound

The nearby-argument Lipschitz estimate gives the derivative of the endpoint kernel along the quadratic dose coordinate, with the exact angular loss in (P9). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
S :
ℝ
hS :
0 < S
∃ C : ℝ,
0 < C
conclusion 1
m :
ℕ
4 ≤ m
u ∈ Ioo (-1 : ℝ) 1 :
u ≠ 0
|deriv (fun v => packetKernel kappa m (2*v^2-1)) u|
≤ (C*(m : ℝ)^2 / (sqrt (jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1) * jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1)) * (1+m*jacobiAngularDistance (-1) (2*u^2-1))^S)) * (2/sqrt (1-u^2))
Proof (Lean source)
-- @node: packetKernel_endpoint_composed_derivative_bound lemma packetKernel_endpoint_composed_derivative_bound (hLip : FilteredJacobiLipschitz) (kappa : ℝ) (hkappa : 0 < kappa) (S : ℝ) (hS : 0 < S) : ∃ C : ℝ, 0 < C ∧ ∀ m : ℕ, 4 ≤ m → ∀ u ∈ Ioo (-1 : ℝ) 1, u ≠ 0 → |deriv (fun v => packetKernel kappa m (2*v^2-1)) u| ≤ (C*(m : ℝ)^2 / (sqrt (jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1) * jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1)) * (1+m*jacobiAngularDistance (-1) (2*u^2-1))^S)) * (2/sqrt (1-u^2)) := by obtain ⟨C, hC, hkernel⟩ := hLip 4 ((kappa-1)/2) (by norm_num) (by linarith) packetFilter packetFilter_smoothJacobiFilter S 1 hS (by norm_num) refine ⟨C, hC, ?_⟩ intro m hm u hu hu0 have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) have hz : 2*u^2-1 ∈ Ioo (-1 : ℝ) 1 := by constructor <;> nlinarith [sq_pos_of_ne_zero hu0, hu.1, hu.2] have hcoord : HasDerivAt (fun v : ℝ => 2*v^2-1) (4*u) u := by have hd := (((hasDerivAt_id (𝕜 := ℝ) u).pow 2).const_mul 2).sub_const 1 simp only [Nat.cast_ofNat, show (2-1 : ℕ) = 1 from rfl, pow_one, mul_one, id_eq] at hd convert hd using 1 <;> first | rfl | ring have harc := (Real.hasDerivAt_arccos (x := 2*u^2-1) (by linarith [hz.1]) (by linarith [hz.2])).comp u hcoord have hdiff : DifferentiableAt ℝ (fun v => packetKernel kappa m (2*v^2-1)) u := by unfold packetKernel filteredJacobiKernel stdJacobi jacobiShifted split_ifs <;> fun_prop have hnear : ∀ᶠ v in 𝓝 u, v ∈ Ioo (-1 : ℝ) 1 ∧ jacobiAngularDistance (2*v^2-1) (2*u^2-1) ≤ 1/(m : ℝ) := by have hi : ∀ᶠ v in 𝓝 u, v ∈ Ioo (-1 : ℝ) 1 := isOpen_Ioo.mem_nhds hu have hd : ContinuousAt (fun v => jacobiAngularDistance (2*v^2-1) (2*u^2-1)) u := by unfold jacobiAngularDistance fun_prop have he := hd.tendsto.eventually (gt_mem_nhds (show jacobiAngularDistance (2*u^2-1) (2*u^2-1) < 1/(m : ℝ) by simp only [jacobiAngularDistance, sub_self, abs_zero]; positivity)) filter_upwards [hi, he] with v hv hd exact ⟨hv, hd.le⟩ have hbound := packet_derivative_le_of_increment_bound hdiff.hasDerivAt harc (C := C*(m : ℝ)^2 / (sqrt (jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1) * jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1)) * (1+m*jacobiAngularDistance (-1) (2*u^2-1))^S)) (by filter_upwards [hnear] with v hv have hk := hkernel m (by omega) (2*v^2-1) (packet_endpoint_coordinate_mem v ⟨hv.1.1.le, hv.1.2.le⟩) (2*u^2-1) ⟨hz.1.le, hz.2.le⟩ (-1) (by norm_num) (2*u^2-1) ⟨hz.1.le, hz.2.le⟩ hv.2 (by simp [jacobiAngularDistance, hmp.le]) simp only [packetKernel, if_pos hkappa] rw [filteredJacobiKernel_symm (x := -1), filteredJacobiKernel_symm (x := -1)] convert hk using 1 <;> simp only [jacobiAngularDistance, Function.comp_apply] <;> ring) simpa only [packet_endpoint_angular_derivative_abs u hu hu0] using hbound
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetKernel_endpoint_composed_derivative_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketDerivative.lean:92
theorem packet_endpoint_derivative_taper_weight_lower Lemma packet_endpoint_derivative_taper_weight_lower in the paper ↗

The cubed taper squared is controlled by the regularized weight after extracting its endpoint degree power. This drops the extra nonnegative decay factor in (P5). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
hm :
0 < m
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 1
(1-u^2)^6 * (m : ℝ)^(-kappa) ≤ jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1)
Proof (Lean source)
-- @node: packet_endpoint_derivative_taper_weight_lower lemma packet_endpoint_derivative_taper_weight_lower (kappa : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) (hm : 0 < m) (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : (1-u^2)^6 * (m : ℝ)^(-kappa) ≤ jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1) := by have hmp : (0 : ℝ) < m := by exact_mod_cast hm have he : 0 ≤ (m : ℝ)^(-2 : ℝ) := (Real.rpow_pos_of_pos hmp _).le have hD : 0 ≤ 1-u^2 := by nlinarith [hu.1, hu.2] have hD1 : 1-u^2 ≤ 1 := by nlinarith [sq_nonneg u] have hfirst : (1-u^2)^6 ≤ (2*(1-u^2)+(m : ℝ)^(-2 : ℝ))^(4+1/2 : ℝ) := by calc _ = (1-u^2)^(6 : ℝ) := by norm_num [Real.rpow_ofNat] _ ≤ (1-u^2)^(4+1/2 : ℝ) := Real.rpow_le_rpow_of_exponent_ge' hD hD1 (by norm_num) (by norm_num) _ ≤ _ := Real.rpow_le_rpow hD (by linarith) (by norm_num) have hsecond : (m : ℝ)^(-kappa) ≤ (2*u^2+(m : ℝ)^(-2 : ℝ))^(kappa/2) := by calc _ = ((m : ℝ)^(-2 : ℝ))^(kappa/2) := by rw [← Real.rpow_mul hmp.le]; congr 1; ring _ ≤ _ := Real.rpow_le_rpow he (by nlinarith [sq_nonneg u]) (by linarith) have hexp : (kappa-1)/2+1/2 = kappa/2 := by ring have hleft : 1-(2*u^2-1)+(m : ℝ)^(-2 : ℝ) = 2*(1-u^2)+(m : ℝ)^(-2 : ℝ) := by ring have hright : 1+(2*u^2-1)+(m : ℝ)^(-2 : ℝ) = 2*u^2+(m : ℝ)^(-2 : ℝ) := by ring rw [jacobiRegularizedWeight, hleft, hright, hexp] exact mul_le_mul hfirst hsecond (Real.rpow_nonneg hmp.le _) (Real.rpow_nonneg (by linarith) _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_derivative_taper_weight_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketDerivative.lean:148
theorem packet_endpoint_derivative_taper_sqrt_weight Lemma packet_endpoint_derivative_taper_sqrt_weight in the paper ↗

The cubed taper cancels the square-root weight loss in the endpoint localization estimate. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
hm :
0 < m
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 1
(1-u^2)^3 * (m : ℝ)^(-kappa)
≤ sqrt (jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1) * jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1))
Proof (Lean source)
-- @node: packet_endpoint_derivative_taper_sqrt_weight lemma packet_endpoint_derivative_taper_sqrt_weight (kappa : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) (hm : 0 < m) (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : (1-u^2)^3 * (m : ℝ)^(-kappa) ≤ sqrt (jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1) * jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1)) := by apply Real.le_sqrt_of_sq_le have hmp : (0 : ℝ) < m := by exact_mod_cast hm have h := mul_le_mul (packet_endpoint_weight_lower kappa m hm) (packet_endpoint_derivative_taper_weight_lower kappa hkappa m hm u hu) (mul_nonneg (by positivity) (Real.rpow_nonneg hmp.le _)) (jacobiRegularizedWeight_pos 4 ((kappa-1)/2) m hm (-1) (by norm_num)).le convert h using 1 <;> first | ring | rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_derivative_taper_sqrt_weight · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketDerivative.lean:176
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketDerivativeAssembly 3 declarations Taper and normalization assembly for the global packet derivative bound (P10).

Taper and normalization assembly for the global packet derivative bound (P10).

theorem packetPsi_endpoint_derivative_formula

On the open support, differentiating the taper and the polynomial kernel gives both terms of the product rule in (P10). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
m :
ℕ
u :
ℝ
hu :
u ∈ Ioo (-1 : ℝ) 1
deriv (packetPsi kappa m) u
= ((-8*u*(1-u^2)^3)*packetKernel kappa m (2*u^2-1) + (1-u^2)^4*deriv (fun v => packetKernel kappa m (2*v^2-1)) u) / packetKernel kappa m (-1)
Proof (Lean source)
-- @node: packetPsi_endpoint_derivative_formula lemma packetPsi_endpoint_derivative_formula (kappa : ℝ) (hkappa : 0 < kappa) (m : ℕ) (u : ℝ) (hu : u ∈ Ioo (-1 : ℝ) 1) : deriv (packetPsi kappa m) u = ((-8*u*(1-u^2)^3)*packetKernel kappa m (2*u^2-1) + (1-u^2)^4*deriv (fun v => packetKernel kappa m (2*v^2-1)) u) / packetKernel kappa m (-1) := by have ht : HasDerivAt (fun v : ℝ => (1-v^2)^4) (-8*u*(1-u^2)^3) u := by have hd := ((hasDerivAt_const u (1 : ℝ)).sub ((hasDerivAt_id u).pow 2)).pow 4 simp only [Nat.cast_ofNat, show (4-1 : ℕ) = 3 from rfl, show (2-1 : ℕ) = 1 from rfl, pow_one, mul_one, zero_sub, Pi.pow_apply, Pi.sub_apply, id_eq] at hd convert hd using 1 <;> first | rfl | ring have hk : DifferentiableAt ℝ (fun v => packetKernel kappa m (2*v^2-1)) u := by have hc : ContDiff ℝ 1 (fun v => packetKernel kappa m (2*v^2-1)) := by fun_prop exact (hc.differentiable (by norm_num)).differentiableAt have he : packetPsi kappa m =ᶠ[𝓝 u] (fun v => (1-v^2)^4*packetKernel kappa m (2*v^2-1)/packetKernel kappa m (-1)) := by filter_upwards [isOpen_Ioo.mem_nhds hu] with v hv rw [packetPsi, if_pos ⟨hv.1.le, hv.2.le⟩, if_pos hkappa] ring rw [he.deriv_eq] exact ((ht.mul hk.hasDerivAt).div_const _).deriv
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_endpoint_derivative_formula · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketDerivativeAssembly.lean:14
theorem packetPsi_derivative_outside

Outside the closed support the packet is locally zero, hence its derivative vanishes. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa :
ℝ
m :
ℕ
u :
ℝ
hu :
u ∉ Icc (-1 : ℝ) 1
deriv (packetPsi kappa m) u = 0
Proof (Lean source)
-- @node: packetPsi_derivative_outside lemma packetPsi_derivative_outside (kappa : ℝ) (m : ℕ) (u : ℝ) (hu : u ∉ Icc (-1 : ℝ) 1) : deriv (packetPsi kappa m) u = 0 := by have he : packetPsi kappa m =ᶠ[𝓝 u] (fun _ => (0 : ℝ)) := by filter_upwards [isClosed_Icc.isOpen_compl.mem_nhds hu] with v hv exact packetPsi_support kappa m v hv rw [he.deriv_eq, deriv_const]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_derivative_outside · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketDerivativeAssembly.lean:39
theorem packetPsi_endpoint_derivative_bound

Normalization and the cubed taper absorb both losses in the nearby-argument derivative bound. Continuity extends the bound to zero and the support endpoints, giving (P10) globally. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
∃ A : ℝ,
0 < A
conclusion 1
m :
ℕ
4 ≤ m
u :
ℝ
|deriv (packetPsi kappa m) u| ≤ A*m
Proof (Lean source)
-- @node: packetPsi_endpoint_derivative_bound lemma packetPsi_endpoint_derivative_bound (hLoc : FilteredJacobiLocalization) (hLip : FilteredJacobiLipschitz) (hNorm : JacobiNormOrthogonality) (hGamma : GammaRatioAsymptotic) (kappa : ℝ) (hkappa : 0 < kappa) : ∃ A : ℝ, 0 < A ∧ ∀ m : ℕ, 4 ≤ m → ∀ u : ℝ, |deriv (packetPsi kappa m) u| ≤ A*m := by obtain ⟨c0, C0, hc0, hC0, hnorm⟩ := packetKernel_endpoint_power_bounds hNorm hGamma kappa hkappa obtain ⟨L, hL, hlocal⟩ := hLoc 4 ((kappa-1)/2) (by norm_num) (by linarith) packetFilter packetFilter_smoothJacobiFilter 1 (by norm_num) obtain ⟨J, hJ, hderiv⟩ := packetKernel_endpoint_composed_derivative_bound hLip kappa hkappa 1 (by norm_num) let A := (8*L+2*J)/c0 have hA : 0 < A := by dsimp [A]; positivity refine ⟨A, hA, ?_⟩ intro m hm have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) have hm1 : (1 : ℝ) ≤ m := by exact_mod_cast (show 1 ≤ m by omega) have hinterior : ∀ u ∈ Ioo (-1 : ℝ) 1, u ≠ 0 → |deriv (packetPsi kappa m) u| ≤ A*m := by intro u hu hu0 let D := 1-u^2 let B := sqrt (jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1) * jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1)) let Q := 1+(m : ℝ)*jacobiAngularDistance (-1) (2*u^2-1) let N := packetKernel kappa m (-1) have hD : 0 < D := by dsimp [D]; nlinarith [hu.1, hu.2] have hD1 : D ≤ 1 := by dsimp [D]; nlinarith [sq_nonneg u] have huabs : |u| ≤ 1 := abs_le.mpr ⟨hu.1.le, hu.2.le⟩ have hB : 0 < B := Real.sqrt_pos.mpr (mul_pos (jacobiRegularizedWeight_pos 4 ((kappa-1)/2) m (by omega) (-1) (by norm_num)) (jacobiRegularizedWeight_pos 4 ((kappa-1)/2) m (by omega) _ (packet_endpoint_coordinate_mem u ⟨hu.1.le, hu.2.le⟩))) have hQ : 1 ≤ Q := by have := abs_nonneg (arccos (-1)-arccos (2*u^2-1)) dsimp [Q, jacobiAngularDistance] nlinarith have hN : 0 < N := packetKernel_endpoint_pos hNorm kappa hkappa m hm have hnormN : c0*((m : ℝ)^kappa*m) ≤ N := by simpa only [Real.rpow_add hmp, Real.rpow_one] using (hnorm m hm).1 have htB : D^3/B ≤ (m : ℝ)^kappa := by apply (div_le_iff₀ hB).mpr have ht := mul_le_mul_of_nonneg_right (packet_endpoint_derivative_taper_sqrt_weight kappa hkappa.le m (by omega) u ⟨hu.1.le, hu.2.le⟩) (Real.rpow_nonneg hmp.le kappa) have he : (m : ℝ)^(-kappa)*(m : ℝ)^kappa = 1 := by rw [← Real.rpow_add hmp]; simp change (D^3*(m : ℝ)^(-kappa))*(m : ℝ)^kappa ≤ B*(m : ℝ)^kappa at ht rw [mul_assoc, he, mul_one] at ht simpa only [mul_comm] using ht have hK : |packetKernel kappa m (2*u^2-1)| ≤ L*m/B := by have hl := hlocal m (by omega) (-1) (by norm_num) _ (packet_endpoint_coordinate_mem u ⟨hu.1.le, hu.2.le⟩) have hl' : |packetKernel kappa m (2*u^2-1)| ≤ L*m/(B*Q) := by simpa only [packetKernel, if_pos hkappa, Real.rpow_one] using hl exact hl'.trans (div_le_div_of_nonneg_left (by positivity) hB (by nlinarith)) have hKd : |deriv (fun v => packetKernel kappa m (2*v^2-1)) u| ≤ (J*(m : ℝ)^2/B)*(2/sqrt D) := by have hd := hderiv m hm u hu hu0 simp only [Real.rpow_one] at hd exact hd.trans (mul_le_mul_of_nonneg_right (div_le_div_of_nonneg_left (by positivity) hB (by nlinarith)) (by positivity)) have hsD : D ≤ sqrt D := by apply Real.le_sqrt_of_sq_le nlinarith have htaper : D^4/sqrt D ≤ D^3 := by apply (div_le_iff₀ (Real.sqrt_pos.mpr hD)).mpr calc D^4 = D^3*D := by ring _ ≤ D^3*sqrt D := mul_le_mul_of_nonneg_left hsD (by positivity) calc |deriv (packetPsi kappa m) u| ≤ (8*D^3*|packetKernel kappa m (2*u^2-1)| + D^4*|deriv (fun v => packetKernel kappa m (2*v^2-1)) u|)/N := by rw [packetPsi_endpoint_derivative_formula kappa hkappa m u hu, abs_div, abs_of_pos hN] apply div_le_div_of_nonneg_right _ hN.le calc _ ≤ |(-8*u*(1-u^2)^3)*packetKernel kappa m (2*u^2-1)| + |(1-u^2)^4*deriv (fun v => packetKernel kappa m (2*v^2-1)) u| := abs_add_le _ _ _ = 8*|u| * D^3*|packetKernel kappa m (2*u^2-1)| + D^4*|deriv (fun v => packetKernel kappa m (2*v^2-1)) u| := by have hab : |1-u^2| = D := abs_of_pos hD simp only [abs_mul, abs_pow, hab] norm_num _ ≤ _ := by gcongr linarith _ ≤ (8*D^3*(L*m/B) + D^4*((J*(m : ℝ)^2/B)*(2/sqrt D)))/N := by gcongr _ = (8*L*m*(D^3/B) + 2*J*(m : ℝ)^2/B*(D^4/sqrt D))/N := by ring _ ≤ (8*L*m*(m : ℝ)^kappa + 2*J*(m : ℝ)^2*(m : ℝ)^kappa)/N := by apply div_le_div_of_nonneg_right _ hN.le apply add_le_add · exact mul_le_mul_of_nonneg_left htB (by positivity) · calc _ ≤ 2*J*(m : ℝ)^2/B*D^3 := mul_le_mul_of_nonneg_left htaper (by positivity) _ = 2*J*(m : ℝ)^2*(D^3/B) := by ring _ ≤ _ := mul_le_mul_of_nonneg_left htB (by positivity) _ ≤ (8*L+2*J*m)/c0 := by apply (div_le_iff₀ hN).mpr calc _ = ((8*L+2*J*m)/c0)*(c0*((m : ℝ)^kappa*m)) := by field_simp _ ≤ _ := mul_le_mul_of_nonneg_left hnormN (by positivity) _ ≤ A*m := by dsimp [A] apply (div_le_iff₀ hc0).mpr have h := mul_le_mul_of_nonneg_left hm1 (show 0 ≤ 8*L by positivity) have he : (8*L+2*J)/c0*m*c0 = (8*L+2*J)*m := by field_simp rw [he] nlinarith have hdense : Dense ({(-1 : ℝ), 0, 1} : Set ℝ)ᶜ := (Set.toFinite _).countable.dense_compl ℝ have hbound : ∀ u ∈ ({(-1 : ℝ), 0, 1} : Set ℝ)ᶜ, |deriv (packetPsi kappa m) u| ≤ A*m := by intro u hu have hex : u ≠ -1 ∧ u ≠ 0 ∧ u ≠ 1 := by simpa using hu by_cases hi : u ∈ Icc (-1 : ℝ) 1 · exact hinterior u ⟨lt_of_le_of_ne hi.1 hex.1.symm, lt_of_le_of_ne hi.2 hex.2.2⟩ hex.2.1 · rw [packetPsi_derivative_outside kappa m u hi, abs_zero] positivity intro u exact le_on_closure hbound (packetPsi_contDiff kappa m).continuous_deriv_one.abs.continuousOn continuous_const.continuousOn (hdense u)
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_endpoint_derivative_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketDerivativeAssembly.lean:48
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketEndpoint 1 declarations Assembly of the endpoint packet bounds from normalization, localization and derivatives.

Assembly of the endpoint packet bounds from normalization, localization and derivatives.

theorem packetendpoint_bounds

The endpoint packet has all weighted localization, derivative and cancellation bounds. Under the stated conditions. This is the stated conclusion.

Formal statement
hLocalization_of_gate :
hLipschitz_of_gate :
hNorm_of_gate :
hGamma_of_gate :
kappa :
ℝ
hkappa :
0 < kappa ∧ kappa ≤ 2
∃ C c : ℝ,
0 < C
0 < c
conclusion 1
m :
ℕ
4 ≤ m
PacketBounds kappa C c m
Proof (Lean source)
-- @node: packetendpoint_bounds lemma packetendpoint_bounds (hLocalization_of_gate : FilteredJacobiLocalization) (hLipschitz_of_gate : FilteredJacobiLipschitz) (hNorm_of_gate : JacobiNormOrthogonality) (hGamma_of_gate : GammaRatioAsymptotic) (kappa : ℝ) (hkappa : 0 < kappa ∧ kappa ≤ 2) : ∃ C c : ℝ, 0 < C ∧ 0 < c ∧ ∀ m : ℕ, 4 ≤ m → PacketBounds kappa C c m := by -- P2--P3 are proved in PacketNormalization and PacketKernelNormalization. -- P5--P6 are proved in PacketGeometry; P9--P10 in PacketDerivativeAssembly. -- P7 follows below from P6 at S = kappa + 2; P4 and P8 are also proved. obtain ⟨A, hA, hlocalized⟩ : ∃ A : ℝ, 0 < A ∧ ∀ m : ℕ, 4 ≤ m → (∀ u, |packetPsi kappa m u| ≤ A*(1+(m : ℝ)*|u|)^(-(kappa+2))) ∧ (∀ u, |deriv (packetPsi kappa m) u| ≤ A*m) := by obtain ⟨A0, hA0, hdecay⟩ := packetPsi_endpoint_localization hLocalization_of_gate hNorm_of_gate hGamma_of_gate kappa hkappa.1 (kappa+2) (by linarith [hkappa.1]) obtain ⟨D, hD, hderiv⟩ : ∃ D : ℝ, 0 < D ∧ ∀ m : ℕ, 4 ≤ m → ∀ u : ℝ, |deriv (packetPsi kappa m) u| ≤ D*m := by exact packetPsi_endpoint_derivative_bound hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate kappa hkappa.1 refine ⟨max A0 D, lt_of_lt_of_le hA0 (le_max_left _ _), ?_⟩ intro m hm constructor · intro u exact (hdecay m hm u).trans (mul_le_mul_of_nonneg_right (le_max_left _ _) (Real.rpow_nonneg (by positivity) _)) · intro u exact (hderiv m hm u).trans (mul_le_mul_of_nonneg_right (le_max_right _ _) (by positivity)) let C := 2*A have hC : 0 < C := by dsimp [C]; positivity have hAC : A ≤ C := by dsimp [C]; linarith have hanalytic : ∀ m : ℕ, 4 ≤ m → (∀ u, |packetPsi kappa m u| ≤ C) ∧ (∀ u, |deriv (packetPsi kappa m) u| ≤ C*m) ∧ (∫ u in Icc (-1 : ℝ) 1, |u|^kappa * |packetPsi kappa m u|) ≤ C*(m : ℝ)^(-kappa-1) := by intro m hm obtain ⟨hdecay, hd⟩ := hlocalized m hm have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) refine ⟨?_, (fun u => (hd u).trans (mul_le_mul_of_nonneg_right hAC hmp.le)), ?_⟩ · intro u have hbase : 1 ≤ 1+(m : ℝ)*|u| := by linarith [mul_nonneg hmp.le (abs_nonneg u)] have hpow : (1+(m : ℝ)*|u|)^(-(kappa+2)) ≤ 1 := Real.rpow_le_one_of_one_le_of_nonpos hbase (by linarith [hkappa.1]) exact (hdecay u).trans ((mul_le_mul_of_nonneg_left hpow hA.le).trans (by simpa using hAC)) · exact packet_decay_absolute_mass_le kappa m A (packetPsi kappa m) hkappa.1.le hmp hA.le (packetPsi_contDiff kappa m).continuous (packetPsi_endpoint_even kappa hkappa.1 m) hdecay let C' := max C (C*C) have hCC' : C ≤ C' := le_max_left _ _ have hsqC' : C*C ≤ C' := le_max_right _ _ refine ⟨C', 1, lt_of_lt_of_le hC hCC', by norm_num, ?_⟩ intro m hm obtain ⟨hsup, hderiv, hmass⟩ := hanalytic m hm have hsquare : (∫ u in Icc (-1 : ℝ) 1, |u|^kappa * (packetPsi kappa m u)^2) ≤ C'*(m : ℝ)^(-kappa-1) := by calc _ ≤ C * (∫ u in Icc (-1 : ℝ) 1, |u|^kappa * |packetPsi kappa m u|) := packetPsi_square_mass_le kappa hkappa.1.le m C hsup _ ≤ C * (C*(m : ℝ)^(-kappa-1)) := mul_le_mul_of_nonneg_left hmass hC.le _ = (C*C)*(m : ℝ)^(-kappa-1) := by ring _ ≤ _ := mul_le_mul_of_nonneg_right hsqC' (Real.rpow_nonneg (by positivity) _) have heven := packetPsi_endpoint_even kappa hkappa.1 m refine ⟨?_, heven, packetPsi_contDiff kappa m, packetPsi_support kappa m, packetPsi_endpoint_zero hNorm_of_gate kappa hkappa.1 m hm, (fun u => (hsup u).trans hCC'), (fun u => (hderiv u).trans (mul_le_mul_of_nonneg_right hCC' (by positivity))), hmass.trans (mul_le_mul_of_nonneg_right hCC' (Real.rpow_nonneg (by positivity) _)), hsquare, ?_⟩ · simpa only [if_pos hkappa.1] using packetKernel_endpoint_pos hNorm_of_gate kappa hkappa.1 m hm · intro j hj rcases Nat.even_or_odd j with he | ho · obtain ⟨s, rfl⟩ := he have hs : s ≤ m := by have h : (s+s : ℝ) < m := by simpa using hj have hn : s+s < m := by exact_mod_cast h omega simpa only [two_mul] using packetPsi_endpoint_even_moment_zero hNorm_of_gate kappa hkappa.1 m s (by omega) hs · exact even_packet_odd_moment kappa (packetPsi kappa m) heven j ho
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetendpoint_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpoint.lean:11
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketEndpointFacts 22 declarations Endpoint packet regularity, normalization and moment cancellation.

Endpoint packet regularity, normalization and moment cancellation.

theorem packetPsi_support

Zero extension provides the packet support for both constructions. This is the stated conclusion. Under the stated conditions.

Formal statement
kappa :
ℝ
m :
ℕ
u :
ℝ
hu :
u ∉ Icc (-1 : ℝ) 1
packetPsi kappa m u = 0
Proof (Lean source)
-- @node: packetPsi_support lemma packetPsi_support (kappa : ℝ) (m : ℕ) (u : ℝ) (hu : u ∉ Icc (-1 : ℝ) 1) : packetPsi kappa m u = 0 := by rw [packetPsi, if_neg hu]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_support · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:23
theorem packetPsi_endpoint_even

Squaring the dose coordinate makes the endpoint packet even. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
m :
ℕ
Even (packetPsi kappa m)
Proof (Lean source)
-- @node: packetPsi_endpoint_even lemma packetPsi_endpoint_even (kappa : ℝ) (hkappa : 0 < kappa) (m : ℕ) : Even (packetPsi kappa m) := by intro u have hs : -u ∈ Icc (-1 : ℝ) 1 ↔ u ∈ Icc (-1 : ℝ) 1 := by simp only [mem_Icc]; constructor <;> intro h <;> constructor <;> linarith [h.1, h.2] simp only [packetPsi, hs, if_pos hkappa, neg_sq]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_endpoint_even · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:28
theorem packetPsi_endpoint_zero

Legal division at the endpoint yields unit value at the target. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
m :
ℕ
hm :
4 ≤ m
packetPsi kappa m 0 = 1
Proof (Lean source)
-- @node: packetPsi_endpoint_zero lemma packetPsi_endpoint_zero (hNorm : JacobiNormOrthogonality) (kappa : ℝ) (hkappa : 0 < kappa) (m : ℕ) (hm : 4 ≤ m) : packetPsi kappa m 0 = 1 := by have hn := ne_of_gt (packetKernel_endpoint_pos hNorm kappa hkappa m hm) simp [packetPsi, hkappa, hn]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_endpoint_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:36

Odd weighted moments of any even packet cancel by reflection of the integration interval. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
psi :
ℝ → ℝ
heven :
Even psi
j :
ℕ
hj :
Odd j
∫ u in Icc (-1 : ℝ) 1, |u|^kappa * u^j * psi u = 0
Proof (Lean source)
-- @node: even_packet_odd_moment lemma even_packet_odd_moment (kappa : ℝ) (psi : ℝ → ℝ) (heven : Even psi) (j : ℕ) (hj : Odd j) : ∫ u in Icc (-1 : ℝ) 1, |u|^kappa * u^j * psi u = 0 := by let f : ℝ → ℝ := fun u => |u|^kappa * u^j * psi u have hodd : ∀ u, f (-u) = -f u := by intro u dsimp [f] rw [abs_neg, hj.neg_pow, heven u] ring have h := intervalIntegral.integral_comp_neg (a := (-1 : ℝ)) (b := 1) f simp only [neg_neg] at h simp_rw [hodd] at h rw [intervalIntegral.integral_neg] at h rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by norm_num : (-1 : ℝ) ≤ 1)] change (∫ u in (-1 : ℝ)..1, f u) = 0 linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.even_packet_odd_moment · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:43

Each standard Jacobi polynomial is smooth as a finite sum of monomials. This is the stated conclusion.

Formal statement
a b :
ℝ
j :
ℕ
ContDiff ℝ 1 (stdJacobi a b j)
Proof (Lean source)
-- @node: stdJacobi_contDiff @[fun_prop] lemma stdJacobi_contDiff (a b : ℝ) (j : ℕ) : ContDiff ℝ 1 (stdJacobi a b j) := by unfold stdJacobi jacobiShifted fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_contDiff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:62
theorem filteredJacobiKernel_contDiff Lemma filteredJacobiKernel_contDiff in the paper ↗

A filtered kernel is smooth in its second coordinate since its spectral sum is finite. This is the stated conclusion.

Formal statement
a b :
ℝ
eta :
ℝ → ℝ
m :
ℕ
x :
ℝ
ContDiff ℝ 1 (filteredJacobiKernel a b eta m x)
Proof (Lean source)
-- @node: filteredJacobiKernel_contDiff @[fun_prop] lemma filteredJacobiKernel_contDiff (a b : ℝ) (eta : ℝ → ℝ) (m : ℕ) (x : ℝ) : ContDiff ℝ 1 (filteredJacobiKernel a b eta m x) := by unfold filteredJacobiKernel fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.filteredJacobiKernel_contDiff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:69

Both choices of the packet kernel are finite polynomial sums. This is the stated conclusion.

Formal statement
kappa :
ℝ
m :
ℕ
ContDiff ℝ 1 (packetKernel kappa m)
Proof (Lean source)
-- @node: packetKernel_contDiff @[fun_prop] lemma packetKernel_contDiff (kappa : ℝ) (m : ℕ) : ContDiff ℝ 1 (packetKernel kappa m) := by unfold packetKernel split_ifs <;> fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetKernel_contDiff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:76

The fourth-order positive taper equals an expression with a smooth cubed norm. This identity includes both support endpoints, where the taper vanishes. This is the stated conclusion.

Formal statement
u :
ℝ
(if u ∈ Icc (-1 : ℝ) 1 then (1-u^2)^4 else 0) = ((1-u^2)^4 + (1-u^2)*|1-u^2|^3)/2
Proof (Lean source)
-- @node: packet_taper_identity lemma packet_taper_identity (u : ℝ) : (if u ∈ Icc (-1 : ℝ) 1 then (1-u^2)^4 else 0) = ((1-u^2)^4 + (1-u^2)*|1-u^2|^3)/2 := by by_cases hu : u ∈ Icc (-1 : ℝ) 1 · have h : 0 ≤ 1-u^2 := by have := hu.1 have := hu.2 nlinarith rw [if_pos hu, abs_of_nonneg h] ring · have h : 1-u^2 ≤ 0 := by simp only [mem_Icc, not_and_or, not_le] at hu rcases hu with hu | hu <;> nlinarith rw [if_neg hu, abs_of_nonpos h] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_taper_identity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:83

The fourth-order taper has a continuously differentiable zero extension. This is the stated conclusion.

Formal statement
ContDiff ℝ 1 (fun u : ℝ => if u ∈ Icc (-1 : ℝ) 1 then (1-u^2)^4 else 0)
Proof (Lean source)
-- @node: packet_taper_contDiff lemma packet_taper_contDiff : ContDiff ℝ 1 (fun u : ℝ => if u ∈ Icc (-1 : ℝ) 1 then (1-u^2)^4 else 0) := by have hbase : ContDiff ℝ 1 (fun u : ℝ => 1-u^2) := by fun_prop have hnorm : ContDiff ℝ 1 (fun u : ℝ => |1-u^2|^3) := by simpa only [Real.norm_eq_abs, Real.rpow_natCast] using hbase.norm_rpow (p := (3 : ℕ)) (by norm_num) simp_rw [packet_taper_identity] exact (hbase.pow 4 |>.add (hbase.mul hnorm)).div_const 2
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_taper_contDiff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:102
theorem packetPsi_contDiff

The finite polynomial kernel times the fourth-order taper is continuously differentiable on the whole line, including the two endpoints of its zero extension (P1), (P10). This is the stated conclusion.

Formal statement
kappa :
ℝ
m :
ℕ
ContDiff ℝ 1 (packetPsi kappa m)
Proof (Lean source)
-- @node: packetPsi_contDiff @[fun_prop] lemma packetPsi_contDiff (kappa : ℝ) (m : ℕ) : ContDiff ℝ 1 (packetPsi kappa m) := by have hkernel : ContDiff ℝ 1 (fun u : ℝ => if 0 < kappa then packetKernel kappa m (2*u^2-1) / packetKernel kappa m (-1) else packetKernel kappa m u / packetKernel kappa m 0) := by split_ifs <;> fun_prop have heq : packetPsi kappa m = fun u => (if u ∈ Icc (-1 : ℝ) 1 then (1-u^2)^4 else 0) * (if 0 < kappa then packetKernel kappa m (2*u^2-1) / packetKernel kappa m (-1) else packetKernel kappa m u / packetKernel kappa m 0) := by funext u simp only [packetPsi] split_ifs <;> simp rw [heq] exact packet_taper_contDiff.mul hkernel
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_contDiff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:113
theorem packetFilter_active_index Lemma packetFilter_active_index in the paper ↗

Every active spectral degree strictly exceeds m and is strictly below 2m (P4). Under the stated conditions. This is the stated conclusion.

Formal statement
m j :
ℕ
hm :
0 < m
hj :
packetFilter ((j : ℝ)/m) ≠ 0
conclusion 1
m < j
conclusion 2
j < 2*m
Proof (Lean source)
-- @node: packetFilter_active_index lemma packetFilter_active_index (m j : ℕ) (hm : 0 < m) (hj : packetFilter ((j : ℝ)/m) ≠ 0) : m < j ∧ j < 2*m := by have hs : (j : ℝ)/m ∈ Ioo (9/8 : ℝ) (15/8) := by rw [← packetFilter_support] exact hj have hmp : (0 : ℝ) < m := by exact_mod_cast hm have hlo := (lt_div_iff₀ hmp).mp hs.1 have hhi := (div_lt_iff₀ hmp).mp hs.2 constructor · exact_mod_cast (show (m : ℝ) < j by nlinarith) · exact_mod_cast (show (j : ℝ) < 2*m by nlinarith)
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_active_index · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:132
theorem packet_spectral_term_orthogonal

Each filtered spectral summand annihilates every polynomial of degree at most m (P4). The inactive terms vanish, and the active terms use the cited Jacobi orthogonality leaf. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
hb :
-1/2 < b
m :
ℕ
hm :
0 < m
j :
ℕ
x :
ℝ
R :
hR :
R.degree ≤ (m : WithBot ℕ)
(∫ z in Icc (-1 : ℝ) 1, jacobiWeight a b z * (packetFilter ((j : ℝ)/m) * stdJacobi a b j x * stdJacobi a b j z / jacobiSqNorm a b j) * R.eval z)
= 0
Proof (Lean source)
-- @node: packet_spectral_term_orthogonal lemma packet_spectral_term_orthogonal (hNorm : JacobiNormOrthogonality) (a b : ℝ) (ha : -1/2 < a) (hb : -1/2 < b) (m : ℕ) (hm : 0 < m) (j : ℕ) (x : ℝ) (R : Polynomial ℝ) (hR : R.degree ≤ (m : WithBot ℕ)) : (∫ z in Icc (-1 : ℝ) 1, jacobiWeight a b z * (packetFilter ((j : ℝ)/m) * stdJacobi a b j x * stdJacobi a b j z / jacobiSqNorm a b j) * R.eval z) = 0 := by by_cases hj : packetFilter ((j : ℝ)/m) = 0 · simp only [hj, zero_mul, zero_div, mul_zero, integral_zero] · have hactive := (packetFilter_active_index m j hm hj).1 have hdeg : R.degree < (j : WithBot ℕ) := hR.trans_lt (by exact_mod_cast hactive) have horth := (hNorm a b ha hb j).1 R hdeg have heq : (fun z => jacobiWeight a b z * (packetFilter ((j : ℝ)/m) * stdJacobi a b j x * stdJacobi a b j z / jacobiSqNorm a b j) * R.eval z) = (fun z => (packetFilter ((j : ℝ)/m) * stdJacobi a b j x / jacobiSqNorm a b j) * (jacobiWeight a b z * stdJacobi a b j z * R.eval z)) := by funext z ring rw [heq, integral_const_mul, horth, mul_zero]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_spectral_term_orthogonal · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:146

The zeroth Jacobi polynomial is the constant one. This is the stated conclusion.

Formal statement
a b z :
ℝ
stdJacobi a b 0 z = 1
Proof (Lean source)
-- @node: stdJacobi_degree_zero lemma stdJacobi_degree_zero (a b z : ℝ) : stdJacobi a b 0 z = 1 := by simp [stdJacobi, jacobiShifted, rising]
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_degree_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:170
theorem jacobiWeight_integrableOn

Positivity of the zeroth squared norm supplies integrability of the Jacobi weight, including a negative endpoint exponent. No extra integrability premise is needed. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
hb :
-1/2 < b
IntegrableOn (jacobiWeight a b) (Icc (-1 : ℝ) 1)
Proof (Lean source)
-- @node: jacobiWeight_integrableOn lemma jacobiWeight_integrableOn (hNorm : JacobiNormOrthogonality) (a b : ℝ) (ha : -1/2 < a) (hb : -1/2 < b) : IntegrableOn (jacobiWeight a b) (Icc (-1 : ℝ) 1) := by have hn := (hNorm a b ha hb 0).2.1 have he : jacobiSqNorm a b 0 = ∫ z in Icc (-1 : ℝ) 1, jacobiWeight a b z := by simp only [jacobiSqNorm, stdJacobi_degree_zero, one_pow, mul_one] rw [he] at hn exact Integrable.of_integral_ne_zero (ne_of_gt hn)
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobiWeight_integrableOn · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:175
theorem packet_spectral_term_integrableOn

The spectral term times any polynomial is integrable under the Jacobi weight. Compactness bounds the continuous polynomial factor even when the weight is singular. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
hb :
-1/2 < b
m j :
ℕ
x :
ℝ
R :
IntegrableOn (fun z => jacobiWeight a b z * (packetFilter ((j : ℝ)/m) * stdJacobi a b j x * stdJacobi a b j z / jacobiSqNorm a b j) * R.eval z) (Icc (-1 : ℝ) 1)
Proof (Lean source)
-- @node: packet_spectral_term_integrableOn lemma packet_spectral_term_integrableOn (hNorm : JacobiNormOrthogonality) (a b : ℝ) (ha : -1/2 < a) (hb : -1/2 < b) (m j : ℕ) (x : ℝ) (R : Polynomial ℝ) : IntegrableOn (fun z => jacobiWeight a b z * (packetFilter ((j : ℝ)/m) * stdJacobi a b j x * stdJacobi a b j z / jacobiSqNorm a b j) * R.eval z) (Icc (-1 : ℝ) 1) := by have hp : Continuous (fun z => (packetFilter ((j : ℝ)/m) * stdJacobi a b j x * stdJacobi a b j z / jacobiSqNorm a b j) * R.eval z) := by fun_prop simpa only [mul_assoc] using (jacobiWeight_integrableOn hNorm a b ha hb).mul_continuousOn hp.continuousOn isCompact_Icc
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_spectral_term_integrableOn · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:187
theorem packet_filtered_kernel_orthogonal

Finite-sum linearity assembles the spectral orthogonality into the filtered kernel's polynomial cancellation. This is the Jacobi-integral side of (P4). Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
hb :
-1/2 < b
m :
ℕ
hm :
0 < m
x :
ℝ
R :
hR :
R.degree ≤ (m : WithBot ℕ)
(∫ z in Icc (-1 : ℝ) 1, jacobiWeight a b z * filteredJacobiKernel a b packetFilter m x z * R.eval z)
= 0
Proof (Lean source)
-- @node: packet_filtered_kernel_orthogonal lemma packet_filtered_kernel_orthogonal (hNorm : JacobiNormOrthogonality) (a b : ℝ) (ha : -1/2 < a) (hb : -1/2 < b) (m : ℕ) (hm : 0 < m) (x : ℝ) (R : Polynomial ℝ) (hR : R.degree ≤ (m : WithBot ℕ)) : (∫ z in Icc (-1 : ℝ) 1, jacobiWeight a b z * filteredJacobiKernel a b packetFilter m x z * R.eval z) = 0 := by have heq : (fun z => jacobiWeight a b z * filteredJacobiKernel a b packetFilter m x z * R.eval z) = (fun z => ∑ j ∈ range (2*m+1), jacobiWeight a b z * (packetFilter ((j : ℝ)/m) * stdJacobi a b j x * stdJacobi a b j z / jacobiSqNorm a b j) * R.eval z) := by funext z simp only [filteredJacobiKernel, Finset.mul_sum, Finset.sum_mul] rw [heq, integral_finsetSum] · apply Finset.sum_eq_zero intro j hj exact packet_spectral_term_orthogonal hNorm a b ha hb m hm j x R hR · intro j hj exact packet_spectral_term_integrableOn hNorm a b ha hb m j x R
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_filtered_kernel_orthogonal · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:204
theorem packet_endpoint_transformed_moment_zero

Orthogonality cancels the transformed even-moment polynomial in (P4). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
m s :
ℕ
hm :
0 < m
hs :
s ≤ m
(∫ z in Icc (-1 : ℝ) 1, jacobiWeight 4 ((kappa-1)/2) z * packetKernel kappa m z * ((1+z)/2)^s)
= 0
Proof (Lean source)
-- @node: packet_endpoint_transformed_moment_zero lemma packet_endpoint_transformed_moment_zero (hNorm : JacobiNormOrthogonality) (kappa : ℝ) (hkappa : 0 < kappa) (m s : ℕ) (hm : 0 < m) (hs : s ≤ m) : (∫ z in Icc (-1 : ℝ) 1, jacobiWeight 4 ((kappa-1)/2) z * packetKernel kappa m z * ((1+z)/2)^s) = 0 := by let R : Polynomial ℝ := (C (1/2) * (X + C 1))^s have hR : R.degree ≤ (m : WithBot ℕ) := by dsimp [R] simp only [Polynomial.degree_pow, Polynomial.degree_C_mul (by norm_num : (1/2 : ℝ) ≠ 0), Polynomial.degree_X_add_C, nsmul_eq_mul, mul_one] exact_mod_cast hs have heval (z : ℝ) : R.eval z = ((1+z)/2)^s := by simp only [R, Polynomial.eval_pow, Polynomial.eval_mul, Polynomial.eval_C, Polynomial.eval_add, Polynomial.eval_X] congr 1 ring simpa only [packetKernel, if_pos hkappa, heval] using packet_filtered_kernel_orthogonal hNorm 4 ((kappa-1)/2) (by norm_num) (by linarith) m hm (-1) R hR
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_transformed_moment_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:226
theorem packet_endpoint_weight_substitution Lemma packet_endpoint_weight_substitution in the paper ↗

The quadratic substitution's Jacobian turns the endpoint Jacobi weight into its original dose power weight, with a fixed strictly positive scalar. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa u :
ℝ
s :
ℕ
hu :
0 < u
jacobiWeight 4 ((kappa-1)/2) (2*u^2-1) * ((1+(2*u^2-1))/2)^s * (4*u)
= (2^4 * (2 : ℝ)^((kappa-1)/2) * 4) * (u^kappa * u^(2*s) * (1-u^2)^4)
Proof (Lean source)
-- @node: packet_endpoint_weight_substitution lemma packet_endpoint_weight_substitution (kappa u : ℝ) (s : ℕ) (hu : 0 < u) : jacobiWeight 4 ((kappa-1)/2) (2*u^2-1) * ((1+(2*u^2-1))/2)^s * (4*u) = (2^4 * (2 : ℝ)^((kappa-1)/2) * 4) * (u^kappa * u^(2*s) * (1-u^2)^4) := by have hleft : 1-(2*u^2-1) = 2*(1-u^2) := by ring have hright : 1+(2*u^2-1) = 2*u^2 := by ring have hpow : (u^2)^((kappa-1)/2) * u = u^kappa := by rw [← Real.rpow_natCast u 2, ← Real.rpow_mul hu.le] have hexp : (2 : ℝ)*((kappa-1)/2) = kappa-1 := by ring norm_num only [Nat.cast_ofNat] at ⊢ rw [hexp] calc u^(kappa-1) * u = u^(kappa-1) * u^(1 : ℝ) := by rw [Real.rpow_one] _ = u^kappa := by rw [← Real.rpow_add hu]; congr 1; ring rw [jacobiWeight, hleft, hright, Real.mul_rpow (by norm_num : (0 : ℝ) ≤ 2) (sq_nonneg u)] have hhalf : (2*u^2)/2 = u^2 := by ring rw [hhalf] norm_num only [Real.rpow_ofNat] rw [mul_pow, ← pow_mul] calc _ = (2^4 * (2 : ℝ)^((kappa-1)/2) * 4) * (((u^2)^((kappa-1)/2) * u) * u^(2*s) * (1-u^2)^4) := by ring _ = _ := by rw [hpow]; norm_num [Real.rpow_ofNat]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_weight_substitution · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:247
theorem packet_endpoint_half_moment_zero

Substitution z = 2u² - 1 and Jacobi orthogonality cancel each unnormalized endpoint packet moment on the positive half interval (P4). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
m s :
ℕ
hm :
0 < m
hs :
s ≤ m
(∫ u in (0 : ℝ)..1, u^kappa * u^(2*s) * (1-u^2)^4 * packetKernel kappa m (2*u^2-1)) = 0
Proof (Lean source)
-- @node: packet_endpoint_half_moment_zero lemma packet_endpoint_half_moment_zero (hNorm : JacobiNormOrthogonality) (kappa : ℝ) (hkappa : 0 < kappa) (m s : ℕ) (hm : 0 < m) (hs : s ≤ m) : (∫ u in (0 : ℝ)..1, u^kappa * u^(2*s) * (1-u^2)^4 * packetKernel kappa m (2*u^2-1)) = 0 := by let g : ℝ → ℝ := fun z => jacobiWeight 4 ((kappa-1)/2) z * packetKernel kappa m z * ((1+z)/2)^s let A : ℝ := (2 : ℝ)^(4 : ℕ) * (2 : ℝ)^((kappa-1)/2) * 4 have hA : A ≠ 0 := by dsimp [A]; positivity have hsub := intervalIntegral.integral_comp_mul_deriv_of_deriv_nonneg (a := (0 : ℝ)) (b := 1) (f := fun u : ℝ => 2*u^2-1) (f' := fun u => 4*u) (g := g) (by fun_prop) (by intro u hu have he : 4*u = 2*(2*u) := by ring rw [he] simpa using (((hasDerivAt_id u).pow 2).const_mul 2).sub_const 1) (by intro u hu; simp only [min_eq_left (by norm_num : (0 : ℝ) ≤ 1)] at hu; linarith [hu.1]) have hzero : (∫ z in (-1 : ℝ)..1, g z) = 0 := by rw [intervalIntegral.integral_of_le (by norm_num), ← integral_Icc_eq_integral_Ioc] exact packet_endpoint_transformed_moment_zero hNorm kappa hkappa m s hm hs norm_num only [mul_zero, zero_pow, mul_one, one_pow, zero_sub, sub_self, sub_zero, one_mul, Nat.ofNat_pos] at hsub have heq : (∫ u in (0 : ℝ)..1, (g ∘ (fun u : ℝ => 2*u^2-1)) u * (4*u)) = A * (∫ u in (0 : ℝ)..1, u^kappa * u^(2*s) * (1-u^2)^4 * packetKernel kappa m (2*u^2-1)) := by rw [← intervalIntegral.integral_const_mul] apply intervalIntegral.integral_congr_Ioo_of_le (by norm_num) intro u hu have hup : 0 < u := hu.1 have hw := packet_endpoint_weight_substitution kappa u s hup dsimp [g, Function.comp_def, A] calc _ = (jacobiWeight 4 ((kappa-1)/2) (2*u^2-1) * ((1+(2*u^2-1))/2)^s * (4*u)) * packetKernel kappa m (2*u^2-1) := by ring _ = _ := by rw [hw]; ring rw [heq, hzero] at hsub exact (mul_eq_zero.mp hsub).resolve_left hA
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_half_moment_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:275
theorem packetPsi_endpoint_half_moment_zero

Legal normalization preserves the vanishing even moment on the positive half interval. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
m s :
ℕ
hm :
0 < m
hs :
s ≤ m
(∫ u in (0 : ℝ)..1, |u|^kappa * u^(2*s) * packetPsi kappa m u) = 0
Proof (Lean source)
-- @node: packetPsi_endpoint_half_moment_zero lemma packetPsi_endpoint_half_moment_zero (hNorm : JacobiNormOrthogonality) (kappa : ℝ) (hkappa : 0 < kappa) (m s : ℕ) (hm : 0 < m) (hs : s ≤ m) : (∫ u in (0 : ℝ)..1, |u|^kappa * u^(2*s) * packetPsi kappa m u) = 0 := by calc _ = (∫ u in (0 : ℝ)..1, u^kappa * u^(2*s) * (1-u^2)^4 * packetKernel kappa m (2*u^2-1)) / packetKernel kappa m (-1) := by rw [← intervalIntegral.integral_div] apply intervalIntegral.integral_congr_Ioo_of_le (by norm_num) intro u hu have hmem : u ∈ Icc (-1 : ℝ) 1 := ⟨by linarith [hu.1], hu.2.le⟩ dsimp only rw [packetPsi, if_pos hmem, if_pos hkappa, abs_of_pos hu.1] ring _ = 0 := by rw [packet_endpoint_half_moment_zero hNorm kappa hkappa m s hm hs, zero_div]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_endpoint_half_moment_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:316
theorem packetPsi_endpoint_even_moment_zero

Reflection joins the two half intervals and proves the endpoint packet's full even weighted moment cancellation (P4), including the zeroth moment. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
m s :
ℕ
hm :
0 < m
hs :
s ≤ m
(∫ u in Icc (-1 : ℝ) 1, |u|^kappa * u^(2*s) * packetPsi kappa m u) = 0
Proof (Lean source)
-- @node: packetPsi_endpoint_even_moment_zero lemma packetPsi_endpoint_even_moment_zero (hNorm : JacobiNormOrthogonality) (kappa : ℝ) (hkappa : 0 < kappa) (m s : ℕ) (hm : 0 < m) (hs : s ≤ m) : (∫ u in Icc (-1 : ℝ) 1, |u|^kappa * u^(2*s) * packetPsi kappa m u) = 0 := by let f : ℝ → ℝ := fun u => |u|^kappa * u^(2*s) * packetPsi kappa m u have hkappa0 : 0 ≤ kappa := hkappa.le have hf : Continuous f := by dsimp [f]; fun_prop have heven : ∀ u, f (-u) = f u := by intro u simp only [f, abs_neg, Even.neg_pow (show Even (2*s) from even_two_mul s), packetPsi_endpoint_even kappa hkappa m u] have hpos : (∫ u in (0 : ℝ)..1, f u) = 0 := packetPsi_endpoint_half_moment_zero hNorm kappa hkappa m s hm hs have hneg : (∫ u in (-1 : ℝ)..0, f u) = 0 := by have he := intervalIntegral.integral_comp_neg (a := (0 : ℝ)) (b := 1) f simp only [heven, neg_zero] at he exact he.symm.trans hpos rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by norm_num : (-1 : ℝ) ≤ 1)] change (∫ u in (-1 : ℝ)..1, f u) = 0 rw [← intervalIntegral.integral_add_adjacent_intervals (hf.intervalIntegrable (-1) 0) (hf.intervalIntegrable 0 1), hneg, hpos, add_zero]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_endpoint_even_moment_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:334
theorem packetPsi_square_mass_le

The squared weighted packet mass is bounded by its supremum times its absolute mass (P8). Integrability follows from the constructed packet's continuity on the compact interval. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
C :
ℝ
hsup :
∀ u, |packetPsi kappa m u| ≤ C
(∫ u in Icc (-1 : ℝ) 1, |u|^kappa * (packetPsi kappa m u)^2)
≤ C * (∫ u in Icc (-1 : ℝ) 1, |u|^kappa * |packetPsi kappa m u|)
Proof (Lean source)
-- @node: packetPsi_square_mass_le lemma packetPsi_square_mass_le (kappa : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) (C : ℝ) (hsup : ∀ u, |packetPsi kappa m u| ≤ C) : (∫ u in Icc (-1 : ℝ) 1, |u|^kappa * (packetPsi kappa m u)^2) ≤ C * (∫ u in Icc (-1 : ℝ) 1, |u|^kappa * |packetPsi kappa m u|) := by have hw : Continuous (fun u : ℝ => |u|^kappa) := by fun_prop have hp := (packetPsi_contDiff kappa m).continuous have hi := (hw.mul (hp.pow 2)).continuousOn.integrableOn_Icc (μ := volume) (a := (-1 : ℝ)) (b := 1) have ha := (hw.mul hp.abs).continuousOn.integrableOn_Icc (μ := volume) (a := (-1 : ℝ)) (b := 1) rw [← integral_const_mul] apply integral_mono hi (ha.const_mul C) intro u have hab : (packetPsi kappa m u)^2 = |packetPsi kappa m u| * |packetPsi kappa m u| := by nlinarith [sq_abs (packetPsi kappa m u)] change |u|^kappa * (packetPsi kappa m u)^2 ≤ C * (|u|^kappa * |packetPsi kappa m u|) rw [hab] calc _ ≤ |u|^kappa * (C * |packetPsi kappa m u|) := mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right (hsup u) (abs_nonneg _)) (Real.rpow_nonneg (abs_nonneg _) _) _ = _ := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_square_mass_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketEndpointFacts.lean:358
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketGeometry 13 declarations Angular geometry and taper comparisons for endpoint packet localization (P5)--(P6).

Angular geometry and taper comparisons for endpoint packet localization (P5)--(P6).

theorem packetFilter_eq_expNegInvGlue Lemma packetFilter_eq_expNegInvGlue in the paper ↗

The explicit filter is the standard smooth exponential glue composed with a quadratic. This is the stated conclusion.

Formal statement
s :
ℝ
packetFilter s = expNegInvGlue ((s-9/8)*(15/8-s))
Proof (Lean source)
-- @node: packetFilter_eq_expNegInvGlue lemma packetFilter_eq_expNegInvGlue (s : ℝ) : packetFilter s = expNegInvGlue ((s-9/8)*(15/8-s)) := by by_cases hs : s ∈ Ioo (9/8 : ℝ) (15/8) · have hp : 0 < (s-9/8)*(15/8-s) := mul_pos (by linarith [hs.1]) (by linarith [hs.2]) simp [packetFilter, hs, expNegInvGlue, not_le.mpr hp, neg_div, one_div, mul_comm] · have hp : (s-9/8)*(15/8-s) ≤ 0 := by simp only [mem_Ioo, not_and_or, not_lt] at hs rcases hs with hs | hs <;> nlinarith rw [packetFilter, if_neg hs, expNegInvGlue.zero_of_nonpos hp]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_eq_expNegInvGlue · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:15

The fixed filter is smooth to every order, including the two support endpoints. This is the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: packetFilter_contDiff @[fun_prop] lemma packetFilter_contDiff : ContDiff ℝ ∞ packetFilter := by have hquad : ContDiff ℝ ∞ (fun s : ℝ => (s-9/8)*(15/8-s)) := by fun_prop have h := expNegInvGlue.contDiff.comp hquad simpa only [Function.comp_def, ← packetFilter_eq_expNegInvGlue] using h
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_contDiff · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:27

Nonzero filter values lie strictly between the two spectral cutoffs. This is the stated conclusion.

Formal statement
support packetFilter = Ioo (9/8 : ℝ) (15/8)
Proof (Lean source)
-- @node: packetFilter_support lemma packetFilter_support : support packetFilter = Ioo (9/8 : ℝ) (15/8) := by ext s constructor · intro hs by_contra h exact hs (by rw [packetFilter, if_neg h]) · intro hs exact ne_of_gt (packetFilter_pos s hs)
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_support · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:34
theorem packetFilter_smoothJacobiFilter

The explicit filter satisfies the common hypothesis of both cited localization gates. This is the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: packetFilter_smoothJacobiFilter lemma packetFilter_smoothJacobiFilter : SmoothJacobiFilter packetFilter := by refine ⟨packetFilter_contDiff.contDiffOn, ?_⟩ rw [packetFilter_support] intro s hs exact ⟨by linarith [hs.1], by linarith [hs.2]⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_smoothJacobiFilter · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:45
theorem packetFilter_uniform_lower Lemma packetFilter_uniform_lower in the paper ↗

Compactness gives one strictly positive filter lower bound on the central spectral band. This is the stated conclusion.

Formal statement
∃ d : ℝ,
0 < d
conclusion 1
s ∈ Icc (5/4 : ℝ) (7/4) :
d ≤ packetFilter s
Proof (Lean source)
-- @node: packetFilter_uniform_lower lemma packetFilter_uniform_lower : ∃ d : ℝ, 0 < d ∧ ∀ s ∈ Icc (5/4 : ℝ) (7/4), d ≤ packetFilter s := by obtain ⟨s, hs, hmin⟩ := isCompact_Icc.exists_isMinOn (show (Icc (5/4 : ℝ) (7/4)).Nonempty from ⟨3/2, by norm_num⟩) packetFilter_contDiff.continuous.continuousOn refine ⟨packetFilter s, packetFilter_pos s ⟨by linarith [hs.1], by linarith [hs.2]⟩, ?_⟩ exact hmin
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_uniform_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:53
theorem packet_endpoint_coordinate_mem Lemma packet_endpoint_coordinate_mem in the paper ↗

The quadratic endpoint coordinate stays in the Jacobi interval. This is the stated conclusion. Under the stated conditions.

Formal statement
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 1
2*u^2-1 ∈ Icc (-1 : ℝ) 1
Proof (Lean source)
-- @node: packet_endpoint_coordinate_mem lemma packet_endpoint_coordinate_mem (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : 2*u^2-1 ∈ Icc (-1 : ℝ) 1 := by have hs : u^2 ≤ 1 := by nlinarith [hu.1, hu.2] constructor <;> nlinarith [sq_nonneg u]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_coordinate_mem · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:65
theorem packet_endpoint_angular_eq Lemma packet_endpoint_angular_eq in the paper ↗

The endpoint angular distance is exactly twice the arcsine of the dose magnitude. This is the stated conclusion. Under the stated conditions.

Formal statement
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 1
jacobiAngularDistance (-1) (2*u^2-1) = 2*arcsin |u|
Proof (Lean source)
-- @node: packet_endpoint_angular_eq lemma packet_endpoint_angular_eq (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : jacobiAngularDistance (-1) (2*u^2-1) = 2*arcsin |u| := by have hab : |u| ≤ 1 := abs_le.mpr hu have ha : 0 ≤ arcsin |u| := Real.arcsin_nonneg.mpr (abs_nonneg u) have hb := Real.arcsin_le_pi_div_two |u| have hc : arccos (2*u^2-1) = pi - 2*arcsin |u| := by apply Real.arccos_eq_of_eq_cos (by linarith) (by linarith) rw [Real.cos_pi_sub, Real.cos_two_mul, Real.cos_sq', Real.sin_arcsin (by linarith [abs_nonneg u]) hab, sq_abs] ring rw [jacobiAngularDistance, Real.arccos_neg_one, hc] rw [abs_of_nonneg (by linarith)] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_angular_eq · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:72
theorem packet_endpoint_angular_lower Lemma packet_endpoint_angular_lower in the paper ↗

The angular distance dominates the dose magnitude, so angular decay implies dose decay. This is the stated conclusion. Under the stated conditions.

Formal statement
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 1
|u| ≤ jacobiAngularDistance (-1) (2*u^2-1)
Proof (Lean source)
-- @node: packet_endpoint_angular_lower lemma packet_endpoint_angular_lower (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : |u| ≤ jacobiAngularDistance (-1) (2*u^2-1) := by rw [packet_endpoint_angular_eq u hu] have ha : 0 ≤ arcsin |u| := Real.arcsin_nonneg.mpr (abs_nonneg u) have hs := Real.sin_le ha rw [Real.sin_arcsin (by linarith [abs_nonneg u]) (abs_le.mpr hu)] at hs linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_angular_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:88
theorem jacobiRegularizedWeight_pos Lemma jacobiRegularizedWeight_pos in the paper ↗

Regularization keeps the Jacobi weight strictly positive at every legal coordinate. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
m :
ℕ
hm :
0 < m
x :
ℝ
hx :
x ∈ Icc (-1 : ℝ) 1
Proof (Lean source)
-- @node: jacobiRegularizedWeight_pos lemma jacobiRegularizedWeight_pos (a b : ℝ) (m : ℕ) (hm : 0 < m) (x : ℝ) (hx : x ∈ Icc (-1 : ℝ) 1) : 0 < jacobiRegularizedWeight a b m x := by have he : 0 < (m : ℝ)^(-2 : ℝ) := Real.rpow_pos_of_pos (by exact_mod_cast hm) _ exact mul_pos (Real.rpow_pos_of_pos (by linarith [hx.2]) _) (Real.rpow_pos_of_pos (by linarith [hx.1]) _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobiRegularizedWeight_pos · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:98
theorem packet_endpoint_weight_lower Lemma packet_endpoint_weight_lower in the paper ↗

At the endpoint the regularized weight dominates the normalization power. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
m :
ℕ
hm :
0 < m
(m : ℝ)^(-kappa) ≤ jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1)
Proof (Lean source)
-- @node: packet_endpoint_weight_lower lemma packet_endpoint_weight_lower (kappa : ℝ) (m : ℕ) (hm : 0 < m) : (m : ℝ)^(-kappa) ≤ jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1) := by have hmp : (0 : ℝ) < m := by exact_mod_cast hm have he : 0 ≤ (m : ℝ)^(-2 : ℝ) := (Real.rpow_pos_of_pos hmp _).le have hp : 1 ≤ (2+(m : ℝ)^(-2 : ℝ))^(4+1/2 : ℝ) := Real.one_le_rpow (by linarith) (by norm_num) have hexp : (kappa-1)/2+1/2 = kappa/2 := by ring have hepow : ((m : ℝ)^(-2 : ℝ))^(kappa/2) = (m : ℝ)^(-kappa) := by rw [← Real.rpow_mul hmp.le] congr 1 ring simp only [jacobiRegularizedWeight, sub_neg_eq_add, add_neg_cancel, zero_add, hexp] norm_num only at ⊢ rw [hepow] norm_num at hp simpa using mul_le_mul_of_nonneg_right hp (Real.rpow_nonneg hmp.le (-kappa))
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_weight_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:107
theorem packet_endpoint_taper_weight_lower Lemma packet_endpoint_taper_weight_lower in the paper ↗

The fourth-order taper squared is controlled by the regularized weight after extracting its endpoint degree power. This drops the extra nonnegative decay factor in (P5). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
hm :
0 < m
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 1
(1-u^2)^8 * (m : ℝ)^(-kappa) ≤ jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1)
Proof (Lean source)
-- @node: packet_endpoint_taper_weight_lower lemma packet_endpoint_taper_weight_lower (kappa : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) (hm : 0 < m) (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : (1-u^2)^8 * (m : ℝ)^(-kappa) ≤ jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1) := by have hmp : (0 : ℝ) < m := by exact_mod_cast hm have he : 0 ≤ (m : ℝ)^(-2 : ℝ) := (Real.rpow_pos_of_pos hmp _).le have hD : 0 ≤ 1-u^2 := by nlinarith [hu.1, hu.2] have hD1 : 1-u^2 ≤ 1 := by nlinarith [sq_nonneg u] have hfirst : (1-u^2)^8 ≤ (2*(1-u^2)+(m : ℝ)^(-2 : ℝ))^(4+1/2 : ℝ) := by calc _ = (1-u^2)^(8 : ℝ) := by norm_num [Real.rpow_ofNat] _ ≤ (1-u^2)^(4+1/2 : ℝ) := Real.rpow_le_rpow_of_exponent_ge' hD hD1 (by norm_num) (by norm_num) _ ≤ _ := Real.rpow_le_rpow hD (by linarith) (by norm_num) have hsecond : (m : ℝ)^(-kappa) ≤ (2*u^2+(m : ℝ)^(-2 : ℝ))^(kappa/2) := by calc _ = ((m : ℝ)^(-2 : ℝ))^(kappa/2) := by rw [← Real.rpow_mul hmp.le]; congr 1; ring _ ≤ _ := Real.rpow_le_rpow he (by nlinarith [sq_nonneg u]) (by linarith) have hexp : (kappa-1)/2+1/2 = kappa/2 := by ring have hleft : 1-(2*u^2-1)+(m : ℝ)^(-2 : ℝ) = 2*(1-u^2)+(m : ℝ)^(-2 : ℝ) := by ring have hright : 1+(2*u^2-1)+(m : ℝ)^(-2 : ℝ) = 2*u^2+(m : ℝ)^(-2 : ℝ) := by ring rw [jacobiRegularizedWeight, hleft, hright, hexp] exact mul_le_mul hfirst hsecond (Real.rpow_nonneg hmp.le _) (Real.rpow_nonneg (by linarith) _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_taper_weight_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:126
theorem packet_endpoint_taper_sqrt_weight Lemma packet_endpoint_taper_sqrt_weight in the paper ↗

The taper cancels the square-root weight loss in the endpoint localization estimate. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 ≤ kappa
m :
ℕ
hm :
0 < m
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 1
(1-u^2)^4 * (m : ℝ)^(-kappa)
≤ sqrt (jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1) * jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1))
Proof (Lean source)
-- @node: packet_endpoint_taper_sqrt_weight lemma packet_endpoint_taper_sqrt_weight (kappa : ℝ) (hkappa : 0 ≤ kappa) (m : ℕ) (hm : 0 < m) (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : (1-u^2)^4 * (m : ℝ)^(-kappa) ≤ sqrt (jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1) * jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1)) := by apply Real.le_sqrt_of_sq_le have hmp : (0 : ℝ) < m := by exact_mod_cast hm have h := mul_le_mul (packet_endpoint_weight_lower kappa m hm) (packet_endpoint_taper_weight_lower kappa hkappa m hm u hu) (mul_nonneg (by positivity) (Real.rpow_nonneg hmp.le _)) (jacobiRegularizedWeight_pos 4 ((kappa-1)/2) m hm (-1) (by norm_num)).le convert h using 1 <;> first | ring | rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_endpoint_taper_sqrt_weight · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:154
theorem packetPsi_endpoint_localization

The cited localization estimate and positive normalization give arbitrary uniform polynomial decay of the endpoint packet, after its fourth-order taper (P5)--(P6). Under the stated conditions. This is the stated conclusion.

Formal statement
hLocalization :
kappa :
ℝ
hkappa :
0 < kappa
S :
ℝ
hS :
0 < S
∃ A : ℝ,
0 < A
conclusion 1
m :
ℕ
4 ≤ m
u :
ℝ
|packetPsi kappa m u| ≤ A*(1+(m : ℝ)*|u|)^(-S)
Proof (Lean source)
-- @node: packetPsi_endpoint_localization lemma packetPsi_endpoint_localization (hLocalization : FilteredJacobiLocalization) (hNorm : JacobiNormOrthogonality) (hGamma : GammaRatioAsymptotic) (kappa : ℝ) (hkappa : 0 < kappa) (S : ℝ) (hS : 0 < S) : ∃ A : ℝ, 0 < A ∧ ∀ m : ℕ, 4 ≤ m → ∀ u : ℝ, |packetPsi kappa m u| ≤ A*(1+(m : ℝ)*|u|)^(-S) := by obtain ⟨c0, C0, hc0, hC0, hnormalization⟩ := packetKernel_endpoint_power_bounds hNorm hGamma kappa hkappa obtain ⟨C, hC, hkernel⟩ := hLocalization 4 ((kappa-1)/2) (by norm_num) (by linarith) packetFilter packetFilter_smoothJacobiFilter S hS refine ⟨C/c0, div_pos hC hc0, ?_⟩ intro m hm u have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) by_cases hu : u ∈ Icc (-1 : ℝ) 1 · let t : ℝ := (1-u^2)^4 let B : ℝ := sqrt (jacobiRegularizedWeight 4 ((kappa-1)/2) m (-1) * jacobiRegularizedWeight 4 ((kappa-1)/2) m (2*u^2-1)) let Q : ℝ := (1+(m : ℝ)*jacobiAngularDistance (-1) (2*u^2-1))^S let R : ℝ := (1+(m : ℝ)*|u|)^S let N : ℝ := packetKernel kappa m (-1) have ht : 0 ≤ t := by dsimp [t]; positivity have hB : 0 < B := Real.sqrt_pos.mpr (mul_pos (jacobiRegularizedWeight_pos 4 ((kappa-1)/2) m (by omega) (-1) (by norm_num)) (jacobiRegularizedWeight_pos 4 ((kappa-1)/2) m (by omega) _ (packet_endpoint_coordinate_mem u hu))) have hQ : 0 < Q := Real.rpow_pos_of_pos (by have := abs_nonneg (arccos (-1)-arccos (2*u^2-1)); dsimp [jacobiAngularDistance] at *; positivity) _ have hR : 0 < R := Real.rpow_pos_of_pos (by positivity) _ have hQR : R ≤ Q := Real.rpow_le_rpow (by positivity) (by nlinarith [packet_endpoint_angular_lower u hu]) hS.le have hN : 0 < N := packetKernel_endpoint_pos hNorm kappa hkappa m hm have hnorm : c0*((m : ℝ)^kappa*m) ≤ N := by have he : (m : ℝ)^(kappa+1) = (m : ℝ)^kappa*m := by rw [Real.rpow_add hmp, Real.rpow_one] simpa only [he] using (hnormalization m hm).1 have htB : t/B ≤ (m : ℝ)^kappa := by apply (div_le_iff₀ hB).mpr have h := mul_le_mul_of_nonneg_right (packet_endpoint_taper_sqrt_weight kappa hkappa.le m (by omega) u hu) (Real.rpow_nonneg hmp.le kappa) have he : (m : ℝ)^(-kappa)*(m : ℝ)^kappa = 1 := by rw [← Real.rpow_add hmp]; simp change (t*(m : ℝ)^(-kappa))*(m : ℝ)^kappa ≤ B*(m : ℝ)^kappa at h rw [mul_assoc, he, mul_one] at h simpa only [mul_comm] using h have hK : |packetKernel kappa m (2*u^2-1)| ≤ C*m/(B*Q) := by simpa only [packetKernel, if_pos hkappa] using hkernel m (by omega) (-1) (by norm_num) _ (packet_endpoint_coordinate_mem u hu) calc |packetPsi kappa m u| = t*|packetKernel kappa m (2*u^2-1)|/N := by rw [packetPsi, if_pos hu, if_pos hkappa, abs_mul, abs_div, abs_of_nonneg ht, abs_of_pos hN] ring _ ≤ t*(C*m/(B*Q))/N := div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_left hK ht) hN.le _ = (t/B)*(C*m/Q)/N := by ring _ ≤ (m : ℝ)^kappa*(C*m/Q)/N := div_le_div_of_nonneg_right (mul_le_mul_of_nonneg_right htB (by positivity)) hN.le _ ≤ (C/c0)/Q := by apply (div_le_iff₀ hN).mpr calc _ = ((C/c0)/Q)*(c0*((m : ℝ)^kappa*m)) := by field_simp _ ≤ _ := mul_le_mul_of_nonneg_left hnorm (by positivity) _ ≤ (C/c0)/R := div_le_div_of_nonneg_left (by positivity) hR hQR _ = (C/c0)*(1+(m : ℝ)*|u|)^(-S) := by rw [Real.rpow_neg (by positivity : 0 ≤ 1+(m : ℝ)*|u|)] rfl · rw [packetPsi, if_neg hu, abs_zero] positivity
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_endpoint_localization · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketGeometry.lean:169
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketInterior 8 declarations Helpers — PacketInterior

Helpers — PacketInterior

theorem stdJacobi_symmetric_parity Lemma stdJacobi_symmetric_parity in the paper ↗

Reflection of the binomial sum gives parity of the symmetric Jacobi system (P12). Under the stated conditions. This is the stated conclusion.

Formal statement
a :
ℝ
ha :
-1/2 < a
j :
ℕ
u :
ℝ
stdJacobi a a j (-u) = (-1 : ℝ)^j * stdJacobi a a j u
Proof (Lean source)
-- @node: stdJacobi_symmetric_parity lemma stdJacobi_symmetric_parity (a : ℝ) (ha : -1/2 < a) (j : ℕ) (u : ℝ) : stdJacobi a a j (-u) = (-1 : ℝ)^j * stdJacobi a a j u := by rw [stdJacobi_binomial_repr a a ha ha j (-u), stdJacobi_binomial_repr a a ha ha j u] have hreflect := Finset.sum_range_reflect (fun i => genBinom (j+a) i * genBinom (j+a) (j-i) * (-u-1)^(j-i) * (-u+1)^i) (j+1) simp only [Nat.add_sub_cancel] at hreflect rw [← hreflect] rw [show (-1 : ℝ)^j * ((2 : ℝ)^(-(j : ℤ)) * ∑ i ∈ range (j+1), genBinom (j+a) i * genBinom (j+a) (j-i) * (u-1)^(j-i) * (u+1)^i) = (2 : ℝ)^(-(j : ℤ)) * ∑ i ∈ range (j+1), (-1 : ℝ)^j * (genBinom (j+a) i * genBinom (j+a) (j-i) * (u-1)^(j-i) * (u+1)^i) by rw [← Finset.mul_sum]; ring] congr 1 apply Finset.sum_congr rfl intro i hi have hi' : i ≤ j := by have := Finset.mem_range.mp hi; omega rw [Nat.sub_sub_self hi', show -u-1 = -(u+1) by ring, show -u+1 = -(u-1) by ring] rw [neg_pow (u+1) i, neg_pow (u-1) (j-i)] have hp : (-1 : ℝ)^i * (-1)^(j-i) = (-1)^j := by rw [← pow_add, Nat.add_sub_of_le hi'] calc _ = ((-1 : ℝ)^i * (-1)^(j-i)) * (genBinom (j+a) i * genBinom (j+a) (j-i) * (u-1)^(j-i) * (u+1)^i) := by ring _ = _ := by rw [hp]
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_symmetric_parity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInterior.lean:17
theorem stdJacobi_symmetric_odd_zero Lemma stdJacobi_symmetric_odd_zero in the paper ↗

Odd symmetric Jacobi polynomials vanish at the interior center (P12). Under the stated conditions. This is the stated conclusion.

Formal statement
a :
ℝ
ha :
-1/2 < a
j :
ℕ
hj :
Odd j
stdJacobi a a j 0 = 0
Proof (Lean source)
-- @node: stdJacobi_symmetric_odd_zero lemma stdJacobi_symmetric_odd_zero (a : ℝ) (ha : -1/2 < a) (j : ℕ) (hj : Odd j) : stdJacobi a a j 0 = 0 := by have h := stdJacobi_symmetric_parity a ha j 0 rw [neg_zero, hj.neg_one_pow, neg_one_mul] at h linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_symmetric_odd_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInterior.lean:49
theorem packetKernel_interior_even Lemma packetKernel_interior_even in the paper ↗

Centering the symmetric filtered kernel kills the odd degrees, leaving an even kernel. This is the stated conclusion.

Formal statement
m :
ℕ
Proof (Lean source)
-- @node: packetKernel_interior_even lemma packetKernel_interior_even (m : ℕ) : Even (packetKernel 0 m) := by intro u simp only [packetKernel, lt_self_iff_false, if_false, filteredJacobiKernel] apply Finset.sum_congr rfl intro j hj rcases Nat.even_or_odd j with he | ho · rw [stdJacobi_symmetric_parity 4 (by norm_num), he.neg_one_pow, one_mul] · rw [stdJacobi_symmetric_odd_zero 4 (by norm_num) j ho] simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetKernel_interior_even · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInterior.lean:57
theorem packetPsi_interior_even

The taper preserves the symmetric interior kernel's evenness (P11). This is the stated conclusion.

Formal statement
m :
ℕ
Proof (Lean source)
-- @node: packetPsi_interior_even lemma packetPsi_interior_even (m : ℕ) : Even (packetPsi 0 m) := by intro u have hs : -u ∈ Icc (-1 : ℝ) 1 ↔ u ∈ Icc (-1 : ℝ) 1 := by simp only [mem_Icc]; constructor <;> intro h <;> constructor <;> linarith [h.1, h.2] simp only [packetPsi, hs, lt_self_iff_false, if_false, neg_sq, packetKernel_interior_even m u]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_interior_even · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInterior.lean:69

On its support the fourth-order taper is exactly the symmetric Jacobi weight. This is the stated conclusion.

Formal statement
u :
ℝ
jacobiWeight 4 4 u = (1-u^2)^4
Proof (Lean source)
-- @node: jacobiWeight_four_four lemma jacobiWeight_four_four (u : ℝ) : jacobiWeight 4 4 u = (1-u^2)^4 := by simp only [jacobiWeight, Real.rpow_ofNat] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobiWeight_four_four · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInterior.lean:78
theorem packetPsi_interior_moment_zero

Interior raw moments cancel by the same finite-sum orthogonality as the endpoint system (P14). Under the stated conditions. This is the stated conclusion.

Formal statement
m j :
ℕ
hm :
0 < m
hj :
j ≤ m
(∫ u in Icc (-1 : ℝ) 1, |u|^(0 : ℝ) * u^j * packetPsi 0 m u) = 0
Proof (Lean source)
-- @node: packetPsi_interior_moment_zero lemma packetPsi_interior_moment_zero (hNorm : JacobiNormOrthogonality) (m j : ℕ) (hm : 0 < m) (hj : j ≤ m) : (∫ u in Icc (-1 : ℝ) 1, |u|^(0 : ℝ) * u^j * packetPsi 0 m u) = 0 := by have hdeg : (X^j : Polynomial ℝ).degree ≤ (m : WithBot ℕ) := by simpa using (show (j : WithBot ℕ) ≤ m by exact_mod_cast hj) have horth := packet_filtered_kernel_orthogonal hNorm 4 4 (by norm_num) (by norm_num) m hm 0 (X^j) hdeg have heq : (∫ u in Icc (-1 : ℝ) 1, |u|^(0 : ℝ) * u^j * packetPsi 0 m u) = (∫ u in Icc (-1 : ℝ) 1, jacobiWeight 4 4 u * filteredJacobiKernel 4 4 packetFilter m 0 u * (X^j).eval u) / packetKernel 0 m 0 := by rw [← integral_div] apply setIntegral_congr_fun measurableSet_Icc intro u hu simp only [packetPsi, if_pos hu, lt_self_iff_false, if_false, Real.rpow_zero, one_mul, packetKernel, Polynomial.eval_pow, Polynomial.eval_X, jacobiWeight_four_four] ring rw [heq, horth, zero_div]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_interior_moment_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInterior.lean:84
theorem packetinterior_analytic_bounds

Interior analytic bounds: the P12 center formula, elementary integral comparison, and norm/Gamma leaves give P13; P15 follows from the proved estimate chain. Under the stated conditions. This is the stated conclusion.

Formal statement
∃ A : ℝ,
0 < A
conclusion 1
m :
ℕ
4 ≤ m
0 < packetKernel 0 m 0
u :
|packetPsi 0 m u| ≤ A*(1+(m : ℝ)*|u|)^(-(0+2 : ℝ))
u :
|deriv (packetPsi 0 m) u| ≤ A*m
Proof (Lean source)
-- @node: packetinterior_analytic_bounds lemma packetinterior_analytic_bounds (hLocalization : FilteredJacobiLocalization) (hLipschitz : FilteredJacobiLipschitz) (hNorm : JacobiNormOrthogonality) (hGamma : GammaRatioAsymptotic) : ∃ A : ℝ, 0 < A ∧ ∀ m : ℕ, 4 ≤ m → 0 < packetKernel 0 m 0 ∧ (∀ u, |packetPsi 0 m u| ≤ A*(1+(m : ℝ)*|u|)^(-(0+2 : ℝ))) ∧ (∀ u, |deriv (packetPsi 0 m) u| ≤ A*m) := by have hnormalization : ∃ c : ℝ, 0 < c ∧ ∀ m : ℕ, 4 ≤ m → c*m ≤ packetKernel 0 m 0 := by have hspectral := jacobi_four_even_spectral_lower hNorm hGamma obtain ⟨c₀, hc₀, hcoef⟩ := hspectral exact packetKernel_interior_lower_of_spectral_lower hNorm c₀ hc₀ hcoef obtain ⟨c, hc, hnorm⟩ := hnormalization exact packetinterior_bounds_of_normalization hLocalization hLipschitz c hc hnorm
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetinterior_analytic_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInterior.lean:105
theorem packetinterior_bounds

The symmetric interior packet has all weighted localization, derivative and cancellation bounds. Under the stated conditions. This is the stated conclusion.

Formal statement
hLocalization_of_gate :
hLipschitz_of_gate :
hNorm_of_gate :
hGamma_of_gate :
kappa :
ℝ
hkappa :
kappa = 0
∃ C c : ℝ,
0 < C
0 < c
conclusion 1
m :
ℕ
4 ≤ m
PacketBounds kappa C c m
Proof (Lean source)
-- @node: packetinterior_bounds lemma packetinterior_bounds (hLocalization_of_gate : FilteredJacobiLocalization) (hLipschitz_of_gate : FilteredJacobiLipschitz) (hNorm_of_gate : JacobiNormOrthogonality) (hGamma_of_gate : GammaRatioAsymptotic) (kappa : ℝ) (hkappa : kappa = 0) : ∃ C c : ℝ, 0 < C ∧ 0 < c ∧ ∀ m : ℕ, 4 ≤ m → PacketBounds kappa C c m := by subst kappa obtain ⟨A, hA, hlocalized⟩ := packetinterior_analytic_bounds hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate let C := 2*A have hC : 0 < C := by dsimp [C]; positivity have hAC : A ≤ C := by dsimp [C]; linarith let C' := max C (C*C) have hCC' : C ≤ C' := le_max_left _ _ refine ⟨C', 1, lt_of_lt_of_le hC hCC', by norm_num, ?_⟩ intro m hm obtain ⟨hnorm, hdecay, hd⟩ := hlocalized m hm have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) have hsup : ∀ u, |packetPsi 0 m u| ≤ C := by intro u have hbase : 1 ≤ 1+(m : ℝ)*|u| := by linarith [mul_nonneg hmp.le (abs_nonneg u)] have hpow : (1+(m : ℝ)*|u|)^(-(0+2 : ℝ)) ≤ 1 := Real.rpow_le_one_of_one_le_of_nonpos hbase (by norm_num) exact (hdecay u).trans ((mul_le_mul_of_nonneg_left hpow hA.le).trans (by simpa using hAC)) have hmass : (∫ u in Icc (-1 : ℝ) 1, |u|^(0 : ℝ) * |packetPsi 0 m u|) ≤ C*(m : ℝ)^(-(0 : ℝ)-1) := by exact packet_decay_absolute_mass_le 0 m A (packetPsi 0 m) (by norm_num) hmp hA.le (packetPsi_contDiff 0 m).continuous (packetPsi_interior_even m) hdecay have hsquare : (∫ u in Icc (-1 : ℝ) 1, |u|^(0 : ℝ) * (packetPsi 0 m u)^2) ≤ C'*(m : ℝ)^(-(0 : ℝ)-1) := by calc _ ≤ C * (∫ u in Icc (-1 : ℝ) 1, |u|^(0 : ℝ) * |packetPsi 0 m u|) := packetPsi_square_mass_le 0 (by norm_num) m C hsup _ ≤ C * (C*(m : ℝ)^(-(0 : ℝ)-1)) := mul_le_mul_of_nonneg_left hmass hC.le _ = (C*C)*(m : ℝ)^(-(0 : ℝ)-1) := by ring _ ≤ _ := mul_le_mul_of_nonneg_right (le_max_right _ _) (Real.rpow_nonneg (by positivity) _) refine ⟨by simpa using hnorm, packetPsi_interior_even m, packetPsi_contDiff 0 m, packetPsi_support 0 m, ?_, (fun u => (hsup u).trans hCC'), (fun u => (hd u).trans (mul_le_mul_of_nonneg_right (hAC.trans hCC') hmp.le)), hmass.trans (mul_le_mul_of_nonneg_right hCC' (Real.rpow_nonneg (by positivity) _)), hsquare, ?_⟩ · simp [packetPsi, hnorm.ne'] · intro j hj have hjm : j ≤ m := by have h : (j : ℝ) < m := by simpa using hj have hn : j < m := by exact_mod_cast h omega exact packetPsi_interior_moment_zero hNorm_of_gate m j (by omega) hjm
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetinterior_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInterior.lean:123
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketInteriorEstimates 8 declarations Interior angular geometry and taper estimates for the P15 localization step.

Interior angular geometry and taper estimates for the P15 localization step.

theorem packet_interior_angular_lower Lemma packet_interior_angular_lower in the paper ↗

The cosine Lipschitz bound turns interior angular decay into dose decay (P15). This is the stated conclusion. Under the stated conditions.

Formal statement
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 1
Proof (Lean source)
-- @node: packet_interior_angular_lower lemma packet_interior_angular_lower (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : |u| ≤ jacobiAngularDistance 0 u := by have h := Real.abs_cos_sub_cos_le (arccos 0) (arccos u) simpa only [Real.cos_arccos (by norm_num : (-1 : ℝ) ≤ 0) (by norm_num : (0 : ℝ) ≤ 1), Real.cos_arccos hu.1 hu.2, zero_sub, abs_neg, jacobiAngularDistance] using h
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_interior_angular_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorEstimates.lean:12
theorem packet_interior_taper_weight_lower Lemma packet_interior_taper_weight_lower in the paper ↗

The symmetric regularized weight dominates the sixth power of the taper (P15). This is the stated conclusion. Under the stated conditions.

Formal statement
m :
ℕ
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 1
(1-u^2)^6 ≤ jacobiRegularizedWeight 4 4 m u
Proof (Lean source)
-- @node: packet_interior_taper_weight_lower lemma packet_interior_taper_weight_lower (m : ℕ) (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : (1-u^2)^6 ≤ jacobiRegularizedWeight 4 4 m u := by have he : 0 ≤ (m : ℝ)^(-2 : ℝ) := Real.rpow_nonneg (Nat.cast_nonneg m) _ have hD : 0 ≤ 1-u^2 := by nlinarith [hu.1, hu.2] have hD1 : 1-u^2 ≤ 1 := by nlinarith [sq_nonneg u] rw [jacobiRegularizedWeight, ← Real.mul_rpow (by linarith [hu.2] : 0 ≤ 1-u+(m : ℝ)^(-2 : ℝ)) (by linarith [hu.1] : 0 ≤ 1+u+(m : ℝ)^(-2 : ℝ))] calc _ = (1-u^2)^(6 : ℝ) := by norm_num [Real.rpow_ofNat] _ ≤ (1-u^2)^(4+1/2 : ℝ) := Real.rpow_le_rpow_of_exponent_ge' hD hD1 (by norm_num) (by norm_num) _ ≤ _ := Real.rpow_le_rpow hD (by nlinarith [sq_nonneg ((m : ℝ)^(-2 : ℝ))]) (by norm_num)
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_interior_taper_weight_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorEstimates.lean:20
theorem packet_interior_center_weight_lower Lemma packet_interior_center_weight_lower in the paper ↗

At the interior center the regularized weight is at least one (P15). This is the stated conclusion.

Formal statement
m :
ℕ
Proof (Lean source)
-- @node: packet_interior_center_weight_lower lemma packet_interior_center_weight_lower (m : ℕ) : 1 ≤ jacobiRegularizedWeight 4 4 m 0 := by have he : 0 ≤ (m : ℝ)^(-2 : ℝ) := Real.rpow_nonneg (Nat.cast_nonneg m) _ have h : 1 ≤ (1+(m : ℝ)^(-2 : ℝ))^(4+1/2 : ℝ) := Real.one_le_rpow (by linarith) (by norm_num) simpa only [jacobiRegularizedWeight, sub_zero, add_zero, one_mul] using mul_le_mul h h (by norm_num : (0 : ℝ) ≤ 1) (by positivity)
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_interior_center_weight_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorEstimates.lean:36
theorem packet_interior_taper_sqrt_weight Lemma packet_interior_taper_sqrt_weight in the paper ↗

The cubed taper absorbs the square-root weight loss of the interior kernel (P15). This is the stated conclusion. Under the stated conditions.

Formal statement
m :
ℕ
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 1
(1-u^2)^3 ≤ sqrt (jacobiRegularizedWeight 4 4 m 0 * jacobiRegularizedWeight 4 4 m u)
Proof (Lean source)
-- @node: packet_interior_taper_sqrt_weight lemma packet_interior_taper_sqrt_weight (m : ℕ) (u : ℝ) (hu : u ∈ Icc (-1 : ℝ) 1) : (1-u^2)^3 ≤ sqrt (jacobiRegularizedWeight 4 4 m 0 * jacobiRegularizedWeight 4 4 m u) := by apply Real.le_sqrt_of_sq_le have h := mul_le_mul (packet_interior_center_weight_lower m) (packet_interior_taper_weight_lower m u hu) (by positivity : 0 ≤ (1-u^2)^6) (le_trans (by norm_num) (packet_interior_center_weight_lower m)) convert h using 1 <;> first | rfl | ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_interior_taper_sqrt_weight · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorEstimates.lean:46
theorem packetKernel_interior_taper_decay

Localization and the fourth-order taper give arbitrary dose decay before normalization. The remaining P13 task is to divide this estimate by a denominator of order m. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
ℝ
hS :
0 < S
∃ L : ℝ,
0 < L
conclusion 1
m :
ℕ
4 ≤ m
u ∈ Icc (-1 : ℝ) 1 :
|(1-u^2)^4 * packetKernel 0 m u| ≤ L*m*(1+(m : ℝ)*|u|)^(-S)
Proof (Lean source)
-- @node: packetKernel_interior_taper_decay lemma packetKernel_interior_taper_decay (hLoc : FilteredJacobiLocalization) (S : ℝ) (hS : 0 < S) : ∃ L : ℝ, 0 < L ∧ ∀ m : ℕ, 4 ≤ m → ∀ u ∈ Icc (-1 : ℝ) 1, |(1-u^2)^4 * packetKernel 0 m u| ≤ L*m*(1+(m : ℝ)*|u|)^(-S) := by obtain ⟨L, hL, hlocal⟩ := hLoc 4 4 (by norm_num) (by norm_num) packetFilter packetFilter_smoothJacobiFilter S hS refine ⟨L, hL, ?_⟩ intro m hm u hu let B := sqrt (jacobiRegularizedWeight 4 4 m 0 * jacobiRegularizedWeight 4 4 m u) let Q := 1+(m : ℝ)*jacobiAngularDistance 0 u let R := 1+(m : ℝ)*|u| have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) have hB : 0 < B := Real.sqrt_pos.mpr (mul_pos (jacobiRegularizedWeight_pos 4 4 m (by omega) 0 (by norm_num)) (jacobiRegularizedWeight_pos 4 4 m (by omega) u hu)) have hD : 0 ≤ 1-u^2 := by nlinarith [hu.1, hu.2] have hD1 : 1-u^2 ≤ 1 := by nlinarith [sq_nonneg u] have ht : (1-u^2)^4 ≤ B := by calc _ ≤ (1-u^2)^3 := by nlinarith [pow_nonneg hD 3] _ ≤ B := packet_interior_taper_sqrt_weight m u hu have hR : 0 < R := by dsimp [R]; positivity have hRQ : R ≤ Q := by dsimp [R, Q] exact add_le_add_right (mul_le_mul_of_nonneg_left (packet_interior_angular_lower u hu) hmp.le) 1 have hQ : 0 < Q := lt_of_lt_of_le hR hRQ have hK : |packetKernel 0 m u| ≤ L*m/(B*Q^S) := by simpa only [packetKernel, lt_self_iff_false, if_false] using hlocal m (by omega) 0 (by norm_num) u hu have hpow : R^S ≤ Q^S := Real.rpow_le_rpow hR.le hRQ hS.le calc _ = (1-u^2)^4 * |packetKernel 0 m u| := by rw [abs_mul, abs_pow, abs_of_nonneg hD] _ ≤ (1-u^2)^4 * (L*m/(B*Q^S)) := mul_le_mul_of_nonneg_left hK (by positivity) _ ≤ B*(L*m/(B*Q^S)) := mul_le_mul_of_nonneg_right ht (by positivity) _ = L*m/Q^S := by field_simp _ ≤ L*m/R^S := div_le_div_of_nonneg_left (by positivity) (Real.rpow_pos_of_pos hR _) hpow _ = _ := by rw [Real.rpow_neg hR.le]; ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetKernel_interior_taper_decay · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorEstimates.lean:58
theorem packetKernel_interior_derivative_bound

The interior first derivative follows from the cited nearby-argument estimate (P15). Under the stated conditions. This is the stated conclusion.

Formal statement
∃ J : ℝ,
0 < J
conclusion 1
m :
ℕ
4 ≤ m
u ∈ Ioo (-1 : ℝ) 1 :
≤ (J*(m : ℝ)^2 / sqrt (jacobiRegularizedWeight 4 4 m 0 * jacobiRegularizedWeight 4 4 m u)) * (1/sqrt (1-u^2))
Proof (Lean source)
-- @node: packetKernel_interior_derivative_bound lemma packetKernel_interior_derivative_bound (hLip : FilteredJacobiLipschitz) : ∃ J : ℝ, 0 < J ∧ ∀ m : ℕ, 4 ≤ m → ∀ u ∈ Ioo (-1 : ℝ) 1, |deriv (packetKernel 0 m) u| ≤ (J*(m : ℝ)^2 / sqrt (jacobiRegularizedWeight 4 4 m 0 * jacobiRegularizedWeight 4 4 m u)) * (1/sqrt (1-u^2)) := by obtain ⟨J, hJ, hd⟩ := filteredJacobiKernel_derivative_bound hLip 4 4 (by norm_num) (by norm_num) packetFilter packetFilter_smoothJacobiFilter 1 (by norm_num) refine ⟨J, hJ, ?_⟩ intro m hm u hu have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) let B := sqrt (jacobiRegularizedWeight 4 4 m 0 * jacobiRegularizedWeight 4 4 m u) have hB : 0 < B := Real.sqrt_pos.mpr (mul_pos (jacobiRegularizedWeight_pos 4 4 m (by omega) 0 (by norm_num)) (jacobiRegularizedWeight_pos 4 4 m (by omega) u ⟨hu.1.le, hu.2.le⟩)) have hQ : 1 ≤ 1+(m : ℝ)*jacobiAngularDistance 0 u := by have h := mul_nonneg hmp.le (abs_nonneg (arccos 0-arccos u)) unfold jacobiAngularDistance linarith have he : packetKernel 0 m = fun t => filteredJacobiKernel 4 4 packetFilter m t 0 := by funext t simp only [packetKernel, lt_self_iff_false, if_false] exact filteredJacobiKernel_symm _ _ _ _ _ _ rw [he] have h := hd m (by omega) u hu 0 (by norm_num) simp only [Real.rpow_one] at h exact h.trans (mul_le_mul_of_nonneg_right (div_le_div_of_nonneg_left (by positivity) hB (by nlinarith)) (by positivity))
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetKernel_interior_derivative_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorEstimates.lean:99
theorem packetPsi_interior_derivative_formula

The product rule for the interior packet on its open support (P15). This is the stated conclusion. Under the stated conditions.

Formal statement
m :
ℕ
u :
ℝ
hu :
u ∈ Ioo (-1 : ℝ) 1
= ((-8*u*(1-u^2)^3)*packetKernel 0 m u + (1-u^2)^4*deriv (packetKernel 0 m) u) / packetKernel 0 m 0
Proof (Lean source)
-- @node: packetPsi_interior_derivative_formula lemma packetPsi_interior_derivative_formula (m : ℕ) (u : ℝ) (hu : u ∈ Ioo (-1 : ℝ) 1) : deriv (packetPsi 0 m) u = ((-8*u*(1-u^2)^3)*packetKernel 0 m u + (1-u^2)^4*deriv (packetKernel 0 m) u) / packetKernel 0 m 0 := by have ht : HasDerivAt (fun v : ℝ => (1-v^2)^4) (-8*u*(1-u^2)^3) u := by have hd := ((hasDerivAt_const u (1 : ℝ)).sub ((hasDerivAt_id u).pow 2)).pow 4 simp only [Nat.cast_ofNat, show (4-1 : ℕ) = 3 from rfl, show (2-1 : ℕ) = 1 from rfl, pow_one, mul_one, zero_sub, Pi.pow_apply, Pi.sub_apply, id_eq] at hd convert hd using 1 <;> first | rfl | ring have hk : DifferentiableAt ℝ (packetKernel 0 m) u := ((packetKernel_contDiff 0 m).differentiable (by norm_num)).differentiableAt have he : packetPsi 0 m =ᶠ[𝓝 u] (fun v => (1-v^2)^4*packetKernel 0 m v/packetKernel 0 m 0) := by filter_upwards [isOpen_Ioo.mem_nhds hu] with v hv rw [packetPsi, if_pos ⟨hv.1.le, hv.2.le⟩, if_neg (lt_irrefl 0)] ring rw [he.deriv_eq] exact ((ht.mul hk.hasDerivAt).div_const _).deriv
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetPsi_interior_derivative_formula · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorEstimates.lean:129
theorem packetinterior_bounds_of_normalization

P15 assembled after the P13 normalization estimate. The normalization premise is an intermediate proof obligation, not a new assumption of the paper theorem. Under the stated conditions. This is the stated conclusion.

Formal statement
c :
ℝ
hc :
0 < c
hnorm :
∀ m : ℕ
if
4 ≤ m
then
c*m ≤ packetKernel 0 m 0
∃ A : ℝ,
0 < A
conclusion 1
m :
ℕ
4 ≤ m
0 < packetKernel 0 m 0
u :
|packetPsi 0 m u| ≤ A*(1+(m : ℝ)*|u|)^(-(0+2 : ℝ))
u :
|deriv (packetPsi 0 m) u| ≤ A*m
Proof (Lean source)
-- @node: packetinterior_bounds_of_normalization lemma packetinterior_bounds_of_normalization (hLoc : FilteredJacobiLocalization) (hLip : FilteredJacobiLipschitz) (c : ℝ) (hc : 0 < c) (hnorm : ∀ m : ℕ, 4 ≤ m → c*m ≤ packetKernel 0 m 0) : ∃ A : ℝ, 0 < A ∧ ∀ m : ℕ, 4 ≤ m → 0 < packetKernel 0 m 0 ∧ (∀ u, |packetPsi 0 m u| ≤ A*(1+(m : ℝ)*|u|)^(-(0+2 : ℝ))) ∧ (∀ u, |deriv (packetPsi 0 m) u| ≤ A*m) := by obtain ⟨L, hL, hdecay⟩ := packetKernel_interior_taper_decay hLoc 2 (by norm_num) obtain ⟨K, hK, hlocal⟩ := hLoc 4 4 (by norm_num) (by norm_num) packetFilter packetFilter_smoothJacobiFilter 1 (by norm_num) obtain ⟨J, hJ, hderiv⟩ := packetKernel_interior_derivative_bound hLip let A := (L+8*K+J)/c have hA : 0 < A := by dsimp [A]; positivity have hLA : L/c ≤ A := by dsimp [A]; apply div_le_div_of_nonneg_right _ hc.le; linarith have hJA : (8*K+J)/c ≤ A := by dsimp [A]; apply div_le_div_of_nonneg_right _ hc.le; linarith refine ⟨A, hA, ?_⟩ intro m hm have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) have hm1 : (1 : ℝ) ≤ m := by exact_mod_cast (show 1 ≤ m by omega) let N := packetKernel 0 m 0 have hN : 0 < N := lt_of_lt_of_le (mul_pos hc hmp) (hnorm m hm) refine ⟨hN, ?_, ?_⟩ · intro u by_cases hu : u ∈ Icc (-1 : ℝ) 1 · have h := hdecay m hm u hu have hp : 0 ≤ (1+(m : ℝ)*|u|)^(-(2 : ℝ)) := Real.rpow_nonneg (by positivity) _ calc |packetPsi 0 m u| = |(1-u^2)^4*packetKernel 0 m u|/N := by rw [packetPsi, if_pos hu, if_neg (lt_irrefl 0)] rw [← mul_div_assoc, abs_div, abs_of_pos hN] _ ≤ (L*m*(1+(m : ℝ)*|u|)^(-(2 : ℝ)))/N := div_le_div_of_nonneg_right h hN.le _ ≤ (L/c)*(1+(m : ℝ)*|u|)^(-(2 : ℝ)) := by apply (div_le_iff₀ hN).mpr calc _ = ((L/c)*(1+(m : ℝ)*|u|)^(-(2 : ℝ)))*(c*m) := by field_simp _ ≤ _ := mul_le_mul_of_nonneg_left (hnorm m hm) (by positivity) _ ≤ _ := by norm_num only; exact mul_le_mul_of_nonneg_right hLA hp · rw [packetPsi_support 0 m u hu, abs_zero] positivity · have hinterior : ∀ u ∈ Ioo (-1 : ℝ) 1, |deriv (packetPsi 0 m) u| ≤ A*m := by intro u hu let D := 1-u^2 let B := sqrt (jacobiRegularizedWeight 4 4 m 0 * jacobiRegularizedWeight 4 4 m u) have hD : 0 < D := by dsimp [D]; nlinarith [hu.1, hu.2] have hD1 : D ≤ 1 := by dsimp [D]; nlinarith [sq_nonneg u] have huabs : |u| ≤ 1 := abs_le.mpr ⟨hu.1.le, hu.2.le⟩ have hB : 0 < B := Real.sqrt_pos.mpr (mul_pos (jacobiRegularizedWeight_pos 4 4 m (by omega) 0 (by norm_num)) (jacobiRegularizedWeight_pos 4 4 m (by omega) u ⟨hu.1.le, hu.2.le⟩)) have htB : D^3/B ≤ 1 := (div_le_iff₀ hB).mpr (by simpa using packet_interior_taper_sqrt_weight m u ⟨hu.1.le, hu.2.le⟩) have hQ : 1 ≤ 1+(m : ℝ)*jacobiAngularDistance 0 u := by have h := mul_nonneg hmp.le (abs_nonneg (arccos 0-arccos u)) unfold jacobiAngularDistance linarith have hkernel : |packetKernel 0 m u| ≤ K*m/B := by have h := hlocal m (by omega) 0 (by norm_num) u ⟨hu.1.le, hu.2.le⟩ simp only [Real.rpow_one] at h have h' : |packetKernel 0 m u| ≤ K*m/(B*(1+m*jacobiAngularDistance 0 u)) := by simpa only [packetKernel, lt_self_iff_false, if_false] using h exact h'.trans (div_le_div_of_nonneg_left (by positivity) hB (by nlinarith)) have hd := hderiv m hm u hu have htaper : D^4/sqrt D ≤ D^3 := by have hs : D ≤ sqrt D := by apply Real.le_sqrt_of_sq_le; nlinarith apply (div_le_iff₀ (Real.sqrt_pos.mpr hD)).mpr calc D^4 = D^3*D := by ring _ ≤ D^3*sqrt D := mul_le_mul_of_nonneg_left hs (by positivity) calc |deriv (packetPsi 0 m) u| ≤ (8*D^3*|packetKernel 0 m u| + D^4*|deriv (packetKernel 0 m) u|)/N := by rw [packetPsi_interior_derivative_formula m u hu, abs_div, abs_of_pos hN] apply div_le_div_of_nonneg_right _ hN.le calc _ ≤ |(-8*u*(1-u^2)^3)*packetKernel 0 m u| + |(1-u^2)^4*deriv (packetKernel 0 m) u| := abs_add_le _ _ _ = 8*|u| *D^3*|packetKernel 0 m u| + D^4*|deriv (packetKernel 0 m) u| := by have hab : |1-u^2| = D := abs_of_pos hD simp only [abs_mul, abs_pow, hab] norm_num _ ≤ _ := by gcongr; linarith _ ≤ (8*D^3*(K*m/B) + D^4*((J*(m : ℝ)^2/B)*(1/sqrt D)))/N := by gcongr _ = (8*K*m*(D^3/B) + J*(m : ℝ)^2/B*(D^4/sqrt D))/N := by ring _ ≤ (8*K*m+J*(m : ℝ)^2)/N := by apply div_le_div_of_nonneg_right _ hN.le apply add_le_add · simpa using mul_le_mul_of_nonneg_left htB (show 0 ≤ 8*K*m by positivity) · calc _ ≤ J*(m : ℝ)^2/B*D^3 := mul_le_mul_of_nonneg_left htaper (by positivity) _ = J*(m : ℝ)^2*(D^3/B) := by ring _ ≤ _ := by simpa using mul_le_mul_of_nonneg_left htB (show 0 ≤ J*(m : ℝ)^2 by positivity) _ ≤ ((8*K+J)/c)*m := by apply (div_le_iff₀ hN).mpr calc _ ≤ (8*K+J)*(m : ℝ)^2 := by nlinarith [mul_le_mul_of_nonneg_left hm1 (show 0 ≤ 8*K*m by positivity)] _ = (((8*K+J)/c)*m)*(c*m) := by field_simp _ ≤ _ := mul_le_mul_of_nonneg_left (hnorm m hm) (by positivity) _ ≤ A*m := mul_le_mul_of_nonneg_right hJA hmp.le have hdense : Dense ({(-1 : ℝ), 1} : Set ℝ)ᶜ := (Set.toFinite _).countable.dense_compl ℝ have hbound : ∀ u ∈ ({(-1 : ℝ), 1} : Set ℝ)ᶜ, |deriv (packetPsi 0 m) u| ≤ A*m := by intro u hu have hex : u ≠ -1 ∧ u ≠ 1 := by simpa using hu by_cases hi : u ∈ Icc (-1 : ℝ) 1 · exact hinterior u ⟨lt_of_le_of_ne hi.1 hex.1.symm, lt_of_le_of_ne hi.2 hex.2⟩ · rw [packetPsi_derivative_outside 0 m u hi, abs_zero] positivity intro u exact le_on_closure hbound (packetPsi_contDiff 0 m).continuous_deriv_one.abs.continuousOn continuous_const.continuousOn (hdense u)
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetinterior_bounds_of_normalization · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorEstimates.lean:151
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketInteriorNormalization 13 declarations Interior Jacobi center evaluations (P12), active even-degree counts, and normalization assembly (P13).

Interior Jacobi center evaluations (P12), active even-degree counts, and normalization assembly (P13).

Generalized binomial coefficients at natural arguments are ordinary binomial coefficients. This is the stated conclusion.

Formal statement
n k :
ℕ
genBinom (n : ℝ) k = (n.choose k : ℝ)
Proof (Lean source)
-- @node: genBinom_natCast lemma genBinom_natCast (n k : ℕ) : genBinom (n : ℝ) k = (n.choose k : ℝ) := by exact (Nat.cast_choose_eq_descPochhammer_div ℝ n k).symm
theorem packet_coeff_one_sub_X_pow Lemma packet_coeff_one_sub_X_pow in the paper ↗

Coefficients of the negative binomial polynomial carry the expected alternating sign. This is the stated conclusion.

Formal statement
n k :
ℕ
((1-X : Polynomial ℝ)^n).coeff k = (-1 : ℝ)^k * (n.choose k : ℝ)
Proof (Lean source)
-- @node: packet_coeff_one_sub_X_pow lemma packet_coeff_one_sub_X_pow (n k : ℕ) : ((1-X : Polynomial ℝ)^n).coeff k = (-1 : ℝ)^k * (n.choose k : ℝ) := by by_cases hk : k ≤ n · have he : (1-X : Polynomial ℝ)^n = C ((-1 : ℝ)^n) * (X+C (-1))^n := by rw [C_pow, ← mul_pow] congr 1 simp [sub_eq_add_neg] rw [he, coeff_C_mul, coeff_X_add_C_pow] have hs : (-1 : ℝ)^n * (-1)^(n-k) = (-1)^k := by have hn : n = k+(n-k) := by omega conv_lhs => lhs; rw [hn, pow_add] rw [mul_assoc, ← pow_two, ← pow_mul, Nat.mul_comm, pow_mul] norm_num rw [← mul_assoc, hs] · have hn : n < k := by omega have he : (1-X : Polynomial ℝ)^n = C ((-1 : ℝ)^n) * (X+C (-1))^n := by rw [C_pow, ← mul_pow] congr 1 simp [sub_eq_add_neg] rw [he, coeff_C_mul, coeff_X_add_C_pow, Nat.choose_eq_zero_of_lt hn] simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_coeff_one_sub_X_pow · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:17
theorem packet_alternating_choose_convolution Lemma packet_alternating_choose_convolution in the paper ↗

The coefficient of degree twice s in the product (1+X)^n (1-X)^n is the coefficient of degree s in (1-X)^n. This is the stated conclusion.

Formal statement
n s :
ℕ
(∑ i ∈ range (2*s+1), (n.choose i : ℝ) * (n.choose (2*s-i) : ℝ) * (-1 : ℝ)^(2*s-i))
= (-1 : ℝ)^s * (n.choose s : ℝ)
Proof (Lean source)
-- @node: packet_alternating_choose_convolution lemma packet_alternating_choose_convolution (n s : ℕ) : (∑ i ∈ range (2*s+1), (n.choose i : ℝ) * (n.choose (2*s-i) : ℝ) * (-1 : ℝ)^(2*s-i)) = (-1 : ℝ)^s * (n.choose s : ℝ) := by have hp : (1+X : Polynomial ℝ)^n * (1-X)^n = (1-X^2)^n := by rw [← mul_pow] congr 1 ring have h := congrArg (fun p : Polynomial ℝ => p.coeff (2*s)) hp rw [coeff_mul, Finset.Nat.sum_antidiagonal_eq_sum_range_succ_mk] at h simp only [coeff_one_add_X_pow, packet_coeff_one_sub_X_pow] at h have he : (1-X^2 : Polynomial ℝ)^n = expand ℝ 2 ((1-X)^n) := by simp rw [he, coeff_expand_mul' (by norm_num : 0 < 2), packet_coeff_one_sub_X_pow] at h convert h using 1 apply Finset.sum_congr rfl intro i hi ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_alternating_choose_convolution · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:40
theorem stdJacobi_four_even_zero Lemma stdJacobi_four_even_zero in the paper ↗

The even symmetric Jacobi center evaluation in P12 follows by coefficient extraction. This is the stated conclusion.

Formal statement
s :
ℕ
stdJacobi 4 4 (2*s) 0 = (-1 : ℝ)^s * (2 : ℝ)^(-(2*s : ℤ)) * ((2*s+4).choose s : ℝ)
Proof (Lean source)
-- @node: stdJacobi_four_even_zero lemma stdJacobi_four_even_zero (s : ℕ) : stdJacobi 4 4 (2*s) 0 = (-1 : ℝ)^s * (2 : ℝ)^(-(2*s : ℤ)) * ((2*s+4).choose s : ℝ) := by rw [stdJacobi_binomial_repr 4 4 (by norm_num) (by norm_num)] simp only [zero_sub, zero_add, one_pow, mul_one] have he : ((2*s : ℕ) : ℝ)+4 = ((2*s+4 : ℕ) : ℝ) := by push_cast; ring rw [he] simp only [genBinom_natCast] rw [packet_alternating_choose_convolution] push_cast ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_four_even_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:59
theorem stdJacobi_four_even_zero_ne_zero Lemma stdJacobi_four_even_zero_ne_zero in the paper ↗

Every even-degree symmetric Jacobi polynomial is nonzero at its center. This is the stated conclusion.

Formal statement
s :
ℕ
stdJacobi 4 4 (2*s) 0 ≠ 0
Proof (Lean source)
-- @node: stdJacobi_four_even_zero_ne_zero lemma stdJacobi_four_even_zero_ne_zero (s : ℕ) : stdJacobi 4 4 (2*s) 0 ≠ 0 := by rw [stdJacobi_four_even_zero] apply mul_ne_zero · exact mul_ne_zero (pow_ne_zero _ (by norm_num)) (by positivity) · exact_mod_cast (Nat.choose_pos (by omega : s ≤ 2*s+4)).ne'
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_four_even_zero_ne_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:71
theorem jacobi_four_sqNorm_upper

The norm and Gamma leaves bound the symmetric squared norm by a constant divided by degree (P13). Under the stated conditions. This is the stated conclusion.

Formal statement
∃ C : ℝ,
0 < C
conclusion 1
j :
ℕ
1 ≤ j
jacobiSqNorm 4 4 j ≤ C/(j : ℝ)
Proof (Lean source)
-- @node: jacobi_four_sqNorm_upper lemma jacobi_four_sqNorm_upper (hNorm : JacobiNormOrthogonality) (hGamma : GammaRatioAsymptotic) : ∃ C : ℝ, 0 < C ∧ ∀ j : ℕ, 1 ≤ j → jacobiSqNorm 4 4 j ≤ C/(j : ℝ) := by obtain ⟨c₁, C₁, hc₁, hC₁, h₁⟩ := gamma_ratio_integer_power_bounds hGamma 5 1 (by norm_num) (by norm_num) obtain ⟨c₂, C₂, hc₂, hC₂, h₂⟩ := gamma_ratio_integer_power_bounds hGamma 5 9 (by norm_num) (by norm_num) refine ⟨512*C₁*C₂, by positivity, ?_⟩ intro j hj have hjp : (0 : ℝ) < j := by exact_mod_cast hj have h₁u := (h₁ j hj).2 have h₂u := (h₂ j hj).2 norm_num only at h₁u h₂u have hratio₁ : 0 ≤ Gamma (j+5)/Gamma (j+1) := by positivity have hratio₂ : 0 ≤ Gamma (j+5)/Gamma (j+9) := by positivity have hprod := mul_le_mul h₁u h₂u hratio₂ (by positivity : 0 ≤ C₁*(j : ℝ)^(4 : ℝ)) have hcancel : (j : ℝ)^(4 : ℝ) * (j : ℝ)^(-4 : ℝ) = 1 := by rw [← Real.rpow_add hjp]; norm_num have hbound : Gamma (j+5)*Gamma (j+5) / (Gamma (j+1)*Gamma (j+9)) ≤ C₁*C₂ := by calc _ = (Gamma (j+5)/Gamma (j+1)) * (Gamma (j+5)/Gamma (j+9)) := by ring _ ≤ C₁*(j : ℝ)^(4 : ℝ)*(C₂*(j : ℝ)^(-4 : ℝ)) := hprod _ = C₁*C₂ := by rw [mul_mul_mul_comm, hcancel, mul_one] rw [(hNorm 4 4 (by norm_num) (by norm_num) j).2.2] norm_num only rw [show (j : ℝ)+4+1 = j+5 by ring, show (j : ℝ)+4+4+1 = j+9 by ring] have hden : (j : ℝ) ≤ 2*j+4+4+1 := by linarith calc _ ≤ (512/(2*(j : ℝ)+4+4+1))*(C₁*C₂) := mul_le_mul_of_nonneg_left hbound (by positivity) _ ≤ (512/(j : ℝ))*(C₁*C₂) := mul_le_mul_of_nonneg_right (div_le_div_of_nonneg_left (by norm_num) hjp hden) (by positivity) _ = _ := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobi_four_sqNorm_upper · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:79
theorem packet_central_binomial_square_lower Lemma packet_central_binomial_square_lower in the paper ↗

Wallis' elementary integral comparison bounds the squared normalized central binomial coefficient below (P12--P13). Under the stated conditions. This is the stated conclusion.

Formal statement
s :
ℕ
hs :
1 ≤ s
2/(3*pi*(s : ℝ)) ≤ ((2 : ℝ)^(-(2*s : ℤ)) * ((2*s).choose s : ℝ))^2
Proof (Lean source)
-- @node: packet_central_binomial_square_lower lemma packet_central_binomial_square_lower (s : ℕ) (hs : 1 ≤ s) : 2/(3*pi*(s : ℝ)) ≤ ((2 : ℝ)^(-(2*s : ℤ)) * ((2*s).choose s : ℝ))^2 := by have hsp : (0 : ℝ) < s := by exact_mod_cast hs have hf : ((2*s).choose s : ℝ) * (s.factorial : ℝ)^2 = ((2*s).factorial : ℝ) := by have h := Nat.choose_mul_factorial_mul_factorial (by omega : s ≤ 2*s) rw [show 2*s-s = s by omega] at h simpa only [pow_two, mul_assoc] using (show ((2*s).choose s : ℝ) * (s.factorial : ℝ) * (s.factorial : ℝ) = ((2*s).factorial : ℝ) by exact_mod_cast h) have hW := Real.Wallis.W_le s have hidentity : Real.Wallis.W s * ((2 : ℝ)^(-(2*s : ℤ)) * ((2*s).choose s : ℝ))^2 * (2*(s : ℝ)+1) = 1 := by rw [Real.Wallis.W_eq_factorial_ratio] have hp : (2 : ℝ)^(-(2*s : ℤ)) = ((2 : ℝ)^(2*s : ℕ))⁻¹ := by rw [zpow_neg, show (2*(s : ℤ)) = ((2*s : ℕ) : ℤ) by push_cast; ring, zpow_natCast] rw [hp] have hf0 : (s.factorial : ℝ) ≠ 0 := by positivity have hf2 : ((2*s).factorial : ℝ) ≠ 0 := by positivity have hp0 : (2 : ℝ)^(2*s) ≠ 0 := by positivity have hp4 : (2 : ℝ)^(4*s) = ((2 : ℝ)^(2*s))^2 := by rw [← pow_mul]; congr 1; omega rw [hp4] field_simp nlinarith [sq_nonneg (((2*s).choose s : ℝ)*(s.factorial : ℝ)^2)] let B := ((2 : ℝ)^(-(2*s : ℤ)) * ((2*s).choose s : ℝ))^2 have hB : 0 ≤ B := sq_nonneg _ have hmul := mul_le_mul_of_nonneg_right hW (mul_nonneg hB (by positivity : 0 ≤ 2*(s : ℝ)+1)) have hlow : 1 ≤ (pi/2)*B*(2*(s : ℝ)+1) := by calc 1 = Real.Wallis.W s * (B*(2*(s : ℝ)+1)) := by dsimp [B]; nlinarith [hidentity] _ ≤ (pi/2)*(B*(2*(s : ℝ)+1)) := hmul _ = _ := by ring have hs1 : (1 : ℝ) ≤ s := by exact_mod_cast hs have hfinal : 2 ≤ (3*pi*(s : ℝ))*B := by have hpi := Real.pi_pos nlinarith [mul_nonneg (mul_nonneg hpi.le hB) (by linarith : 0 ≤ (s : ℝ)-1)] apply (div_le_iff₀ (by positivity : 0 < 3*pi*(s : ℝ))).mpr simpa only [B, mul_comm] using hfinal
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_central_binomial_square_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:117
theorem stdJacobi_four_even_square_lower Lemma stdJacobi_four_even_square_lower in the paper ↗

Increasing the binomial top index transfers the central-binomial lower bound to the even Jacobi center value (P12). Under the stated conditions. This is the stated conclusion.

Formal statement
s :
ℕ
hs :
1 ≤ s
2/(3*pi*(s : ℝ)) ≤ (stdJacobi 4 4 (2*s) 0)^2
Proof (Lean source)
-- @node: stdJacobi_four_even_square_lower lemma stdJacobi_four_even_square_lower (s : ℕ) (hs : 1 ≤ s) : 2/(3*pi*(s : ℝ)) ≤ (stdJacobi 4 4 (2*s) 0)^2 := by have hchoose : ((2*s).choose s : ℝ) ≤ ((2*s+4).choose s : ℝ) := by exact_mod_cast Nat.choose_le_choose s (by omega : 2*s ≤ 2*s+4) have hmul := mul_le_mul_of_nonneg_left hchoose (by positivity : 0 ≤ (2 : ℝ)^(-(2*s : ℤ))) have hnonneg : 0 ≤ (2 : ℝ)^(-(2*s : ℤ)) * ((2*s).choose s : ℝ) := by positivity have hsquare : ((2 : ℝ)^(-(2*s : ℤ)) * ((2*s).choose s : ℝ))^2 ≤ ((2 : ℝ)^(-(2*s : ℤ)) * ((2*s+4).choose s : ℝ))^2 := by nlinarith have hsign : ((-1 : ℝ)^s)^2 = 1 := by rw [← pow_mul, mul_comm s 2, pow_mul]; simp simp only [stdJacobi_four_even_zero, mul_pow, hsign, one_mul] simpa only [mul_pow] using (packet_central_binomial_square_lower s hs).trans hsquare
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_four_even_square_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:157
theorem jacobi_four_even_spectral_lower

The P12 center lower bound divided by the norm/Gamma upper bound gives uniform positive even spectral coefficients (P13). Under the stated conditions. This is the stated conclusion.

Formal statement
∃ c : ℝ,
0 < c
conclusion 1
s :
ℕ
1 ≤ s
c ≤ (stdJacobi 4 4 (2*s) 0)^2 / jacobiSqNorm 4 4 (2*s)
Proof (Lean source)
-- @node: jacobi_four_even_spectral_lower lemma jacobi_four_even_spectral_lower (hNorm : JacobiNormOrthogonality) (hGamma : GammaRatioAsymptotic) : ∃ c : ℝ, 0 < c ∧ ∀ s : ℕ, 1 ≤ s → c ≤ (stdJacobi 4 4 (2*s) 0)^2 / jacobiSqNorm 4 4 (2*s) := by obtain ⟨C, hC, hnorm⟩ := jacobi_four_sqNorm_upper hNorm hGamma refine ⟨2/(3*pi*C), by positivity, ?_⟩ intro s hs have hsp : (0 : ℝ) < s := by exact_mod_cast hs have hnpos := (hNorm 4 4 (by norm_num) (by norm_num) (2*s)).2.1 have hn : jacobiSqNorm 4 4 (2*s) ≤ C/(s : ℝ) := by calc _ ≤ C/((2*s : ℕ) : ℝ) := hnorm (2*s) (by omega) _ ≤ C/(s : ℝ) := div_le_div_of_nonneg_left hC.le hsp (by push_cast; linarith) apply (le_div_iff₀ hnpos).mpr calc (2/(3*pi*C))*jacobiSqNorm 4 4 (2*s) ≤ (2/(3*pi*C))*(C/(s : ℝ)) := mul_le_mul_of_nonneg_left hn (by positivity) _ = 2/(3*pi*(s : ℝ)) := by field_simp _ ≤ _ := stdJacobi_four_even_square_lower s hs
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobi_four_even_spectral_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:173
theorem packetFilter_interior_even_indices Lemma packetFilter_interior_even_indices in the paper ↗

An explicit injective sequence of even degrees lies in the positive filter counting interval for every legal packet degree. Under the stated conditions. This is the stated conclusion.

Formal statement
m i :
ℕ
hm :
4 ≤ m
hi :
i < max 1 (m/8)
conclusion 1
2*((5*m+7)/8+i) ∈ range (2*m+1)
conclusion 2
((2*((5*m+7)/8+i) : ℕ) : ℝ)/(m : ℝ) ∈ Icc (5/4 : ℝ) (7/4)
Proof (Lean source)
-- @node: packetFilter_interior_even_indices lemma packetFilter_interior_even_indices (m i : ℕ) (hm : 4 ≤ m) (hi : i < max 1 (m/8)) : 2*((5*m+7)/8+i) ∈ range (2*m+1) ∧ ((2*((5*m+7)/8+i) : ℕ) : ℝ)/(m : ℝ) ∈ Icc (5/4 : ℝ) (7/4) := by have hlo : 5*m ≤ 8*((5*m+7)/8+i) := by omega have hhi : 8*((5*m+7)/8+i) ≤ 7*m := by by_cases h : 8 ≤ m · omega · omega have hp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) refine ⟨Finset.mem_range.mpr (by omega), ?_, ?_⟩ · rw [le_div_iff₀ hp] have h : (5 : ℝ)*m ≤ 8*((5*m+7)/8+i : ℕ) := by exact_mod_cast hlo push_cast at h ⊢ linarith · rw [div_le_iff₀ hp] have h : (8 : ℝ)*((5*m+7)/8+i : ℕ) ≤ 7*m := by exact_mod_cast hhi push_cast at h ⊢ linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_interior_even_indices · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:195
theorem packetFilter_interior_even_count Lemma packetFilter_interior_even_count in the paper ↗

The explicit even-degree sequence contains at least a fixed positive multiple of the packet degree. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
4 ≤ m
(m : ℝ)/15 ≤ (max 1 (m/8) : ℕ)
Proof (Lean source)
-- @node: packetFilter_interior_even_count lemma packetFilter_interior_even_count (m : ℕ) (hm : 4 ≤ m) : (m : ℝ)/15 ≤ (max 1 (m/8) : ℕ) := by have h : m ≤ 15*(max 1 (m/8)) := by omega have hr : (m : ℝ) ≤ 15*(max 1 (m/8) : ℕ) := by exact_mod_cast h linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_interior_even_count · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:216
theorem packetKernel_interior_pos

The interior normalization denominator is positive, using an active even spectral degree and the P12 center evaluation. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
4 ≤ m
0 < packetKernel 0 m 0
Proof (Lean source)
-- @node: packetKernel_interior_pos lemma packetKernel_interior_pos (hNorm : JacobiNormOrthogonality) (m : ℕ) (hm : 4 ≤ m) : 0 < packetKernel 0 m 0 := by simp only [packetKernel, lt_self_iff_false, if_false, filteredJacobiKernel] apply Finset.sum_pos' · intro j hj have hn := (hNorm 4 4 (by norm_num) (by norm_num) j).2.1 have hnum : 0 ≤ packetFilter ((j : ℝ)/m) * stdJacobi 4 4 j 0 * stdJacobi 4 4 j 0 := by nlinarith [packetFilter_nonneg ((j : ℝ)/m), sq_nonneg (stdJacobi 4 4 j 0)] exact div_nonneg hnum hn.le · obtain ⟨hj, hs⟩ := packetFilter_interior_even_indices m 0 hm (by omega) simp only [Nat.add_zero] at hj hs refine ⟨2*((5*m+7)/8), hj, ?_⟩ have hn := (hNorm 4 4 (by norm_num) (by norm_num) (2*((5*m+7)/8))).2.1 have hf : 0 < packetFilter (((2*((5*m+7)/8) : ℕ) : ℝ)/m) := lt_of_lt_of_le (Real.exp_pos (-64)) (packetFilter_counting_interval_lower _ hs) have hsq := sq_pos_of_ne_zero (stdJacobi_four_even_zero_ne_zero ((5*m+7)/8)) apply div_pos _ hn nlinarith [mul_pos hf hsq]
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetKernel_interior_pos · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:223
theorem packetKernel_interior_lower_of_spectral_lower

Counting active even degrees assembles the P13 normalization lower bound from a uniform positive lower bound on even spectral coefficients. Under the stated conditions. This is the stated conclusion.

Formal statement
c :
ℝ
hc :
0 < c
hcoef :
∀ s : ℕ
if
1 ≤ s
then
c ≤ (stdJacobi 4 4 (2*s) 0)^2 / jacobiSqNorm 4 4 (2*s)
∃ c' : ℝ,
0 < c'
conclusion 1
m :
ℕ
4 ≤ m
c'*m ≤ packetKernel 0 m 0
Proof (Lean source)
-- @node: packetKernel_interior_lower_of_spectral_lower lemma packetKernel_interior_lower_of_spectral_lower (hNorm : JacobiNormOrthogonality) (c : ℝ) (hc : 0 < c) (hcoef : ∀ s : ℕ, 1 ≤ s → c ≤ (stdJacobi 4 4 (2*s) 0)^2 / jacobiSqNorm 4 4 (2*s)) : ∃ c' : ℝ, 0 < c' ∧ ∀ m : ℕ, 4 ≤ m → c'*m ≤ packetKernel 0 m 0 := by let E := exp (-64) have hE : 0 < E := Real.exp_pos _ refine ⟨E*c/15, by positivity, ?_⟩ intro m hm let f : ℕ → ℝ := fun j => packetFilter ((j : ℝ)/m) * (stdJacobi 4 4 j 0)^2 / jacobiSqNorm 4 4 j let g : ℕ → ℕ := fun i => 2*((5*m+7)/8+i) have hfnonneg (j : ℕ) : 0 ≤ f j := div_nonneg (mul_nonneg (packetFilter_nonneg _) (sq_nonneg _)) (hNorm 4 4 (by norm_num) (by norm_num) j).2.1.le have hkernel : packetKernel 0 m 0 = ∑ j ∈ range (2*m+1), f j := by simp only [packetKernel, lt_self_iff_false, if_false, filteredJacobiKernel] apply Finset.sum_congr rfl intro j hj dsimp [f] ring have hginj : Injective g := by intro i j hij; dsimp [g] at hij; omega have hsub : (range (max 1 (m/8))).image g ⊆ range (2*m+1) := by intro j hj obtain ⟨i, hi, rfl⟩ := Finset.mem_image.mp hj exact (packetFilter_interior_even_indices m i hm (Finset.mem_range.mp hi)).1 have hlower (i : ℕ) (hi : i ∈ range (max 1 (m/8))) : E*c ≤ f (g i) := by have hs := (packetFilter_interior_even_indices m i hm (Finset.mem_range.mp hi)).2 have hcp := hcoef ((5*m+7)/8+i) (by omega) have hfilter := packetFilter_counting_interval_lower _ hs have hmul := mul_le_mul hfilter hcp hc.le (packetFilter_nonneg _) dsimp [E, f, g] simpa only [mul_div_assoc] using hmul rw [hkernel] calc E*c/15*(m : ℝ) = ((m : ℝ)/15)*(E*c) := by ring _ ≤ (max 1 (m/8) : ℕ)*(E*c) := mul_le_mul_of_nonneg_right (packetFilter_interior_even_count m hm) (by positivity) _ = ∑ i ∈ range (max 1 (m/8)), E*c := by simp _ ≤ ∑ i ∈ range (max 1 (m/8)), f (g i) := Finset.sum_le_sum hlower _ = ∑ j ∈ (range (max 1 (m/8))).image g, f j := (Finset.sum_image (fun i hi j hj hij => hginj hij)).symm _ ≤ _ := Finset.sum_le_sum_of_subset_of_nonneg hsub (fun j hj hn => hfnonneg j)
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetKernel_interior_lower_of_spectral_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketInteriorNormalization.lean:243
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketKernelNormalization 8 declarations Quantitative endpoint normalization by counting active filtered spectral terms (P3).

Quantitative endpoint normalization by counting active filtered spectral terms (P3).

The fixed exponential filter is nonnegative everywhere. This is the stated conclusion.

Formal statement
s :
ℝ
0 ≤ packetFilter s
Proof (Lean source)
-- @node: packetFilter_nonneg lemma packetFilter_nonneg (s : ℝ) : 0 ≤ packetFilter s := by unfold packetFilter split_ifs · exact (Real.exp_pos _).le · exact le_rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_nonneg · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketKernelNormalization.lean:14

The fixed filter is strictly positive in its active interval. This is the stated conclusion. Under the stated conditions.

Formal statement
s :
ℝ
hs :
s ∈ Ioo (9/8 : ℝ) (15/8)
Proof (Lean source)
-- @node: packetFilter_pos lemma packetFilter_pos (s : ℝ) (hs : s ∈ Ioo (9/8 : ℝ) (15/8)) : 0 < packetFilter s := by rw [packetFilter, if_pos hs] exact Real.exp_pos _
theorem packetFilter_active_degree Lemma packetFilter_active_degree in the paper ↗

Every legal packet degree has a spectral index strictly inside the filter support. Under the stated conditions. This is the stated conclusion.

Formal statement
m :
ℕ
hm :
4 ≤ m
conclusion 1
m + m/2 ∈ range (2*m+1)
conclusion 2
0 < packetFilter ((m+m/2 : ℕ) / (m : ℝ))
Proof (Lean source)
-- @node: packetFilter_active_degree lemma packetFilter_active_degree (m : ℕ) (hm : 4 ≤ m) : m + m/2 ∈ range (2*m+1) ∧ 0 < packetFilter ((m+m/2 : ℕ) / (m : ℝ)) := by have hlo : 9*m < 8*(m+m/2) := by omega have hhi : 8*(m+m/2) < 15*m := by omega have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) refine ⟨Finset.mem_range.mpr (by omega), packetFilter_pos _ ⟨?_, ?_⟩⟩ · rw [lt_div_iff₀ hmp] have h : (9 : ℝ)*m < 8*(m+m/2 : ℕ) := by exact_mod_cast hlo push_cast at h ⊢ linarith · rw [div_lt_iff₀ hmp] have h : (8 : ℝ)*(m+m/2 : ℕ) < 15*m := by exact_mod_cast hhi push_cast at h ⊢ linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_active_degree · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketKernelNormalization.lean:27
theorem filteredJacobiKernel_endpoint_pos

The diagonal filtered kernel is strictly positive because one active spectral term is positive. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
hb :
-1/2 < b
m :
ℕ
hm :
4 ≤ m
Proof (Lean source)
-- @node: filteredJacobiKernel_endpoint_pos lemma filteredJacobiKernel_endpoint_pos (hNorm : JacobiNormOrthogonality) (a b : ℝ) (ha : -1/2 < a) (hb : -1/2 < b) (m : ℕ) (hm : 4 ≤ m) : 0 < filteredJacobiKernel a b packetFilter m (-1) (-1) := by unfold filteredJacobiKernel apply Finset.sum_pos' · intro j hj have hn := (hNorm a b ha hb j).2.1 have hnum : 0 ≤ packetFilter ((j : ℝ)/m) * stdJacobi a b j (-1) * stdJacobi a b j (-1) := by nlinarith [packetFilter_nonneg ((j : ℝ)/m), sq_nonneg (stdJacobi a b j (-1))] exact div_nonneg hnum hn.le · obtain ⟨hj, hp⟩ := packetFilter_active_degree m hm refine ⟨m+m/2, hj, ?_⟩ have hn := (hNorm a b ha hb (m+m/2)).2.1 have hsq := sq_pos_of_ne_zero (stdJacobi_neg_one_ne_zero a b ha hb (m+m/2)) apply div_pos _ hn nlinarith [mul_pos hp hsq]
CausalSmith.Stat.NoisydoseWeakdesignTransition.filteredJacobiKernel_endpoint_pos · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketKernelNormalization.lean:43
theorem packetKernel_endpoint_pos

Positivity of the endpoint packet's normalizing denominator, without an asymptotic gate. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
m :
ℕ
hm :
4 ≤ m
0 < packetKernel kappa m (-1)
Proof (Lean source)
-- @node: packetKernel_endpoint_pos lemma packetKernel_endpoint_pos (hNorm : JacobiNormOrthogonality) (kappa : ℝ) (hkappa : 0 < kappa) (m : ℕ) (hm : 4 ≤ m) : 0 < packetKernel kappa m (-1) := by rw [packetKernel, if_pos hkappa] exact filteredJacobiKernel_endpoint_pos hNorm 4 ((kappa-1)/2) (by norm_num) (by linarith) m hm
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetKernel_endpoint_pos · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketKernelNormalization.lean:62

The explicit filter is bounded by one everywhere. This is the stated conclusion.

Formal statement
s :
ℝ
packetFilter s ≤ 1
Proof (Lean source)
-- @node: packetFilter_le_one lemma packetFilter_le_one (s : ℝ) : packetFilter s ≤ 1 := by unfold packetFilter split_ifs with hs · apply Real.exp_le_one_iff.mpr have hp : 0 < (s-9/8)*(15/8-s) := mul_pos (by linarith [hs.1]) (by linarith [hs.2]) exact div_nonpos_of_nonpos_of_nonneg (by norm_num) hp.le · norm_num
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_le_one · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketKernelNormalization.lean:70
theorem packetFilter_counting_interval_lower Lemma packetFilter_counting_interval_lower in the paper ↗

On the fixed counting interval the explicit filter has a degree-independent positive lower bound. This is the stated conclusion. Under the stated conditions.

Formal statement
s :
ℝ
hs :
s ∈ Icc (5/4 : ℝ) (7/4)
exp (-64) ≤ packetFilter s
Proof (Lean source)
-- @node: packetFilter_counting_interval_lower lemma packetFilter_counting_interval_lower (s : ℝ) (hs : s ∈ Icc (5/4 : ℝ) (7/4)) : exp (-64) ≤ packetFilter s := by rw [packetFilter, if_pos (show s ∈ Ioo (9/8 : ℝ) (15/8) by constructor <;> linarith [hs.1, hs.2])] apply Real.exp_le_exp.mpr have hp : (1/64 : ℝ) ≤ (s-9/8)*(15/8-s) := by nlinarith [hs.1, hs.2] have hpp : 0 < (s-9/8)*(15/8-s) := by linarith have hdiv : 1/((s-9/8)*(15/8-s)) ≤ (64 : ℝ) := (div_le_iff₀ hpp).mpr (by linarith) simpa only [neg_div] using neg_le_neg hdiv
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetFilter_counting_interval_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketKernelNormalization.lean:80
theorem packetKernel_endpoint_power_bounds

Endpoint normalization has the full two-sided degree order claimed in (P3). Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
hkappa :
0 < kappa
∃ c C : ℝ,
0 < c
0 < C
conclusion 1
m :
ℕ
4 ≤ m
c*(m : ℝ)^(kappa+1) ≤ packetKernel kappa m (-1)
packetKernel kappa m (-1) ≤ C*(m : ℝ)^(kappa+1)
Proof (Lean source)
-- @node: packetKernel_endpoint_power_bounds lemma packetKernel_endpoint_power_bounds (hNorm : JacobiNormOrthogonality) (hGamma : GammaRatioAsymptotic) (kappa : ℝ) (hkappa : 0 < kappa) : ∃ c C : ℝ, 0 < c ∧ 0 < C ∧ ∀ m : ℕ, 4 ≤ m → c*(m : ℝ)^(kappa+1) ≤ packetKernel kappa m (-1) ∧ packetKernel kappa m (-1) ≤ C*(m : ℝ)^(kappa+1) := by obtain ⟨c, C, hc, hC, hcoef⟩ := jacobi_endpoint_spectral_power_bounds hNorm hGamma ((kappa-1)/2) (by linarith) have hexp : 2*((kappa-1)/2)+1 = kappa := by ring simp only [hexp] at hcoef let E := exp (-64) have hE : 0 < E := Real.exp_pos _ refine ⟨E*c/7, 3*C*(2 : ℝ)^kappa, by positivity, by positivity, ?_⟩ intro m hm have hmp : (0 : ℝ) < m := by exact_mod_cast (show 0 < m by omega) have hpow : 0 ≤ (m : ℝ)^kappa := (Real.rpow_pos_of_pos hmp _).le have hepow : (m : ℝ)^(kappa+1) = (m : ℝ)^kappa * m := by rw [Real.rpow_add hmp, Real.rpow_one] let f : ℕ → ℝ := fun j => packetFilter ((j : ℝ)/m) * (stdJacobi 4 ((kappa-1)/2) j (-1))^2 / jacobiSqNorm 4 ((kappa-1)/2) j have hkernel : packetKernel kappa m (-1) = ∑ j ∈ range (2*m+1), f j := by rw [packetKernel, if_pos hkappa, filteredJacobiKernel] apply Finset.sum_congr rfl intro j hj dsimp [f] ring have hfnonneg (j : ℕ) : 0 ≤ f j := by exact div_nonneg (mul_nonneg (packetFilter_nonneg _) (sq_nonneg _)) (hNorm 4 ((kappa-1)/2) (by norm_num) (by linarith) j).2.1.le have hupper (j : ℕ) (hj : j ∈ range (2*m+1)) : f j ≤ C*(2 : ℝ)^kappa*(m : ℝ)^kappa := by by_cases hz : packetFilter ((j : ℝ)/m) = 0 · simp only [f, hz, zero_mul, zero_div] positivity · have hs : (j : ℝ)/m ∈ Ioo (9/8 : ℝ) (15/8) := by by_contra hn exact hz (by rw [packetFilter, if_neg hn]) have hjp : 1 ≤ j := by have hlow := (lt_div_iff₀ hmp).mp hs.1 by_contra hn have hjz : j = 0 := by omega simp only [hjz, Nat.cast_zero] at hlow nlinarith have hju : (j : ℝ) ≤ 2*m := by exact_mod_cast (show j ≤ 2*m by have := Finset.mem_range.mp hj; omega) have hcp := (hcoef j hjp).2 have hrpow : (j : ℝ)^kappa ≤ (2*(m : ℝ))^kappa := Real.rpow_le_rpow (by positivity) hju hkappa.le dsimp [f] calc _ = packetFilter ((j : ℝ)/m) * ((stdJacobi 4 ((kappa-1)/2) j (-1))^2 / jacobiSqNorm 4 ((kappa-1)/2) j) := by ring _ ≤ 1 * (C*(j : ℝ)^kappa) := mul_le_mul (packetFilter_le_one _) hcp (div_nonneg (sq_nonneg _) (hNorm 4 ((kappa-1)/2) (by norm_num) (by linarith) j).2.1.le) (by norm_num) _ ≤ C*(2*(m : ℝ))^kappa := by simpa using mul_le_mul_of_nonneg_left hrpow hC.le _ = _ := by rw [Real.mul_rpow (by norm_num) hmp.le]; ring have hlower (i : ℕ) (hi : i ∈ range (m/4)) : E*c*(m : ℝ)^kappa ≤ f (m+m/4+1+i) := by have hi' : i < m/4 := Finset.mem_range.mp hi have hindex : m ≤ m+m/4+1+i := by omega have hindex1 : 1 ≤ m+m/4+1+i := by omega have hlow : 5*m ≤ 4*(m+m/4+1+i) := by omega have hupp : 4*(m+m/4+1+i) ≤ 7*m := by omega have hs : ((m+m/4+1+i : ℕ) : ℝ)/m ∈ Icc (5/4 : ℝ) (7/4) := by constructor · rw [le_div_iff₀ hmp] have h : (5 : ℝ)*m ≤ 4*(m+m/4+1+i : ℕ) := by exact_mod_cast hlow linarith · rw [div_le_iff₀ hmp] have h : (4 : ℝ)*(m+m/4+1+i : ℕ) ≤ 7*m := by exact_mod_cast hupp linarith have hcj := (hcoef (m+m/4+1+i) hindex1).1 have hpj : (m : ℝ)^kappa ≤ ((m+m/4+1+i : ℕ) : ℝ)^kappa := Real.rpow_le_rpow hmp.le (by exact_mod_cast hindex) hkappa.le dsimp [f] calc _ ≤ E*(c*((m+m/4+1+i : ℕ) : ℝ)^kappa) := by simpa only [mul_assoc] using mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hpj hc.le) hE.le _ ≤ packetFilter (((m+m/4+1+i : ℕ) : ℝ)/m) * ((stdJacobi 4 ((kappa-1)/2) (m+m/4+1+i) (-1))^2 / jacobiSqNorm 4 ((kappa-1)/2) (m+m/4+1+i)) := mul_le_mul (packetFilter_counting_interval_lower _ hs) hcj (by positivity) (packetFilter_nonneg _) _ = _ := by ring rw [hkernel] constructor · let g : ℕ → ℕ := fun i => m+m/4+1+i have hginj : Injective g := by intro i j hij; dsimp [g] at hij; omega have hsub : (range (m/4)).image g ⊆ range (2*m+1) := by intro j hj obtain ⟨i, hi, rfl⟩ := Finset.mem_image.mp hj apply Finset.mem_range.mpr dsimp [g] have := Finset.mem_range.mp hi omega have hcount : (m : ℝ)/7 ≤ (m/4 : ℕ) := by have h : m ≤ 7*(m/4) := by omega have hreal : (m : ℝ) ≤ 7*(m/4 : ℕ) := by exact_mod_cast h linarith calc E*c/7*(m : ℝ)^(kappa+1) = ((m : ℝ)/7)*(E*c*(m : ℝ)^kappa) := by rw [hepow]; ring _ ≤ (m/4 : ℕ)*(E*c*(m : ℝ)^kappa) := mul_le_mul_of_nonneg_right hcount (by positivity) _ = ∑ i ∈ range (m/4), E*c*(m : ℝ)^kappa := by simp _ ≤ ∑ i ∈ range (m/4), f (g i) := Finset.sum_le_sum (fun i hi => hlower i hi) _ = ∑ j ∈ (range (m/4)).image g, f j := (Finset.sum_image (fun i hi j hj hij => hginj hij)).symm _ ≤ _ := Finset.sum_le_sum_of_subset_of_nonneg hsub (fun j hj hn => hfnonneg j) · calc _ ≤ ∑ j ∈ range (2*m+1), C*(2 : ℝ)^kappa*(m : ℝ)^kappa := Finset.sum_le_sum hupper _ = (2*m+1 : ℕ)*(C*(2 : ℝ)^kappa*(m : ℝ)^kappa) := by simp _ ≤ (3*(m : ℝ))*(C*(2 : ℝ)^kappa*(m : ℝ)^kappa) := by apply mul_le_mul_of_nonneg_right _ (by positivity) push_cast have hmr : (4 : ℝ) ≤ m := by exact_mod_cast hm linarith _ = _ := by rw [hepow]; ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.packetKernel_endpoint_power_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketKernelNormalization.lean:93
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketMass 3 declarations Weighted absolute mass from a localized packet envelope (P6--P7).

Weighted absolute mass from a localized packet envelope (P6--P7). The decay exponent kappa + 2 leaves an integrable quadratic envelope after absorbing the power-law weight.

theorem packet_weighted_decay_le Lemma packet_weighted_decay_le in the paper ↗

Absorbing the weight into the decay envelope gives the bandwidth power. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa t u :
ℝ
hkappa :
0 ≤ kappa
ht :
0 < t
hu :
0 ≤ u
u^kappa * (1+t*u)^(-(kappa+2)) ≤ t^(-kappa) * (1+t*u)^(-2 : ℝ)
Proof (Lean source)
-- @node: packet_weighted_decay_le lemma packet_weighted_decay_le (kappa t u : ℝ) (hkappa : 0 ≤ kappa) (ht : 0 < t) (hu : 0 ≤ u) : u^kappa * (1+t*u)^(-(kappa+2)) ≤ t^(-kappa) * (1+t*u)^(-2 : ℝ) := by have hb : 0 < 1+t*u := by positivity have hp : (t*u)^kappa ≤ (1+t*u)^kappa := Real.rpow_le_rpow (by positivity) (by linarith) hkappa have hm : t^kappa * u^kappa = (t*u)^kappa := (Real.mul_rpow ht.le hu).symm have hn : (1+t*u)^(-(kappa+2)) = ((1+t*u)^kappa)⁻¹ * (1+t*u)^(-2 : ℝ) := by rw [show -(kappa+2) = -kappa + (-2 : ℝ) by ring, Real.rpow_add hb, Real.rpow_neg hb.le] rw [hn, Real.rpow_neg ht.le] have htk : 0 < t^kappa := Real.rpow_pos_of_pos ht _ have hbk : 0 < (1+t*u)^kappa := Real.rpow_pos_of_pos hb _ have h : u^kappa / (1+t*u)^kappa ≤ (t^kappa)⁻¹ := by apply (div_le_iff₀ hbk).2 rw [mul_comm, ← div_eq_mul_inv] apply (le_div_iff₀ htk).2 nlinarith [hp] simpa only [div_eq_mul_inv, mul_assoc] using mul_le_mul_of_nonneg_right h (Real.rpow_nonneg hb.le (-2))
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_weighted_decay_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketMass.lean:14
theorem packet_quadratic_half_mass_le Lemma packet_quadratic_half_mass_le in the paper ↗

The quadratic envelope on the positive half interval has mass at most 1/t. Under the stated conditions. This is the stated conclusion.

Formal statement
t :
ℝ
ht :
0 < t
(∫ u in (0 : ℝ)..1, (1+t*u)^(-2 : ℝ)) ≤ t⁻¹
Proof (Lean source)
-- @node: packet_quadratic_half_mass_le lemma packet_quadratic_half_mass_le (t : ℝ) (ht : 0 < t) : (∫ u in (0 : ℝ)..1, (1+t*u)^(-2 : ℝ)) ≤ t⁻¹ := by have hc : ContinuousOn (fun u : ℝ => (1+t*u)^(-2 : ℝ)) (Icc 0 1) := by apply ContinuousOn.rpow_const (by fun_prop) intro u hu left have : 0 < 1+t*u := by nlinarith [hu.1] exact ne_of_gt this have hi := hc.intervalIntegrable_of_Icc (μ := volume) (by norm_num : (0 : ℝ) ≤ 1) have he : (∫ u in (0 : ℝ)..1, (1+t*u)^(-2 : ℝ)) = -(1+t)⁻¹/t + 1/t := by have hd : ∀ u ∈ uIcc (0 : ℝ) 1, HasDerivAt (fun u : ℝ => -(1+t*u)⁻¹/t) ((1+t*u)^(-2 : ℝ)) u := by intro u hu have hu0 : 0 ≤ u := by simpa using hu.1 have hb : 1+t*u ≠ 0 := ne_of_gt (by positivity) convert! (((hasDerivAt_id u).const_mul t).const_add 1).inv hb |>.neg |>.div_const t using 1 rw [Real.rpow_neg (by positivity), Real.rpow_two] dsimp field_simp simpa [neg_div, sub_neg_eq_add] using intervalIntegral.integral_eq_sub_of_hasDerivAt hd hi rw [he] have : 0 ≤ (1+t)⁻¹/t := by positivity simp only [neg_div, one_div] linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_quadratic_half_mass_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketMass.lean:38
theorem packet_decay_absolute_mass_le Lemma packet_decay_absolute_mass_le in the paper ↗

P7: a continuous even packet with decay exponent kappa + 2 has weighted absolute mass at most 2 C times the bandwidth power. No improper integral is needed: the residual quadratic envelope has an explicit antiderivative. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa t C :
ℝ
psi :
ℝ → ℝ
hkappa :
0 ≤ kappa
ht :
0 < t
hC :
0 ≤ C
hpsi :
heven :
Even psi
hdecay :
∀ u, |psi u| ≤ C * (1 + t * |u|) ^ (-(kappa + 2))
(∫ u in Icc (-1 : ℝ) 1, |u|^kappa * |psi u|) ≤ 2*C*t^(-kappa-1)
Proof (Lean source)
-- @node: packet_decay_absolute_mass_le lemma packet_decay_absolute_mass_le (kappa t C : ℝ) (psi : ℝ → ℝ) (hkappa : 0 ≤ kappa) (ht : 0 < t) (hC : 0 ≤ C) (hpsi : Continuous psi) (heven : Even psi) (hdecay : ∀ u, |psi u| ≤ C * (1 + t * |u|) ^ (-(kappa + 2))) : (∫ u in Icc (-1 : ℝ) 1, |u|^kappa * |psi u|) ≤ 2*C*t^(-kappa-1) := by let f : ℝ → ℝ := fun u => |u|^kappa * |psi u| have hf : Continuous f := by dsimp [f]; fun_prop have hfeven : ∀ u, f (-u) = f u := by intro u simp only [f, abs_neg, heven u] have hc : ContinuousOn (fun u : ℝ => (1+t*u)^(-2 : ℝ)) (Icc 0 1) := by apply ContinuousOn.rpow_const (by fun_prop) intro u hu left exact ne_of_gt (by nlinarith [hu.1] : 0 < 1+t*u) have hhalf : (∫ u in (0 : ℝ)..1, f u) ≤ C*t^(-kappa)*t⁻¹ := by calc _ ≤ ∫ u in (0 : ℝ)..1, (C*t^(-kappa)) * (1+t*u)^(-2 : ℝ) := by apply intervalIntegral.integral_mono_on (by norm_num) (hf.intervalIntegrable 0 1) ((hc.const_mul (C*t^(-kappa))).intervalIntegrable_of_Icc (μ := volume) (by norm_num)) intro u hu have hu0 : 0 ≤ u := hu.1 dsimp [f] rw [abs_of_nonneg hu0] calc _ ≤ u^kappa * (C*(1+t*u)^(-(kappa+2))) := mul_le_mul_of_nonneg_left (by simpa [abs_of_nonneg hu0] using hdecay u) (Real.rpow_nonneg hu0 _) _ = C * (u^kappa * (1+t*u)^(-(kappa+2))) := by ring _ ≤ C * (t^(-kappa) * (1+t*u)^(-2 : ℝ)) := mul_le_mul_of_nonneg_left (packet_weighted_decay_le kappa t u hkappa ht hu0) hC _ = _ := by ring _ = (C*t^(-kappa)) * (∫ u in (0 : ℝ)..1, (1+t*u)^(-2 : ℝ)) := intervalIntegral.integral_const_mul _ _ _ ≤ _ := mul_le_mul_of_nonneg_left (packet_quadratic_half_mass_le t ht) (by positivity) have hreflect := intervalIntegral.integral_comp_neg (a := (0 : ℝ)) (b := 1) f simp only [hfeven, neg_zero] at hreflect rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by norm_num : (-1 : ℝ) ≤ 1)] change (∫ u in (-1 : ℝ)..1, f u) ≤ _ rw [← intervalIntegral.integral_add_adjacent_intervals (hf.intervalIntegrable (-1) 0) (hf.intervalIntegrable 0 1), ← hreflect] have ht_pow : t^(-kappa-1) = t^(-kappa)*t⁻¹ := by rw [sub_eq_add_neg, Real.rpow_add ht, Real.rpow_neg_one] rw [ht_pow] linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.packet_decay_absolute_mass_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketMass.lean:66
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PacketNormalization 8 declarations Endpoint Gamma identities and uniform spectral power comparisons for (P2)--(P3).

Endpoint Gamma identities and uniform spectral power comparisons for (P2)--(P3).

Standard Jacobi endpoint evaluation inherited from the shifted Vandermonde identity. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
j :
ℕ
stdJacobi a b j (-1) = (-1 : ℝ)^j * rising (b+1) j / (j.factorial : ℝ)
Proof (Lean source)
-- @node: stdJacobi_neg_one lemma stdJacobi_neg_one (a b : ℝ) (ha : -1/2 < a) (j : ℕ) : stdJacobi a b j (-1) = (-1 : ℝ)^j * rising (b+1) j / (j.factorial : ℝ) := by rw [stdJacobi] norm_num only rw [jacobiShifted_one j a b (by linarith)] have hr : rising (a+1) j ≠ 0 := ne_of_gt (rising_pos _ _ (by linarith)) field_simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_neg_one · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketNormalization.lean:14
theorem stdJacobi_neg_one_ne_zero Lemma stdJacobi_neg_one_ne_zero in the paper ↗

A Jacobi endpoint value is nonzero for the positive rising-factorial parameters. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
hb :
-1/2 < b
j :
ℕ
stdJacobi a b j (-1) ≠ 0
Proof (Lean source)
-- @node: stdJacobi_neg_one_ne_zero lemma stdJacobi_neg_one_ne_zero (a b : ℝ) (ha : -1/2 < a) (hb : -1/2 < b) (j : ℕ) : stdJacobi a b j (-1) ≠ 0 := by rw [stdJacobi_neg_one a b ha j] exact div_ne_zero (mul_ne_zero (pow_ne_zero _ (by norm_num)) (ne_of_gt (rising_pos _ _ (by linarith)))) (by positivity)
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_neg_one_ne_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketNormalization.lean:23
theorem rising_eq_gamma_ratio_positive_start Lemma rising_eq_gamma_ratio_positive_start in the paper ↗

The Gamma recurrence represents every positive-start rising factorial, including the negative Jacobi shape parameters permitted in the endpoint construction. Under the stated conditions. This is the stated conclusion.

Formal statement
x :
ℝ
hx :
0 < x
j :
ℕ
rising x j = Gamma (x+j) / Gamma x
Proof (Lean source)
-- @node: rising_eq_gamma_ratio_positive_start lemma rising_eq_gamma_ratio_positive_start (x : ℝ) (hx : 0 < x) (j : ℕ) : rising x j = Gamma (x+j) / Gamma x := by have hg : Gamma x ≠ 0 := ne_of_gt (Real.Gamma_pos_of_pos hx) induction j with | zero => simp [rising, hg] | succ j ih => rw [rising, ascPochhammer_succ_eval] change rising x j * (x+j) = _ rw [ih] have hp : x+(j : ℝ) ≠ 0 := by positivity have he : x+((j+1 : ℕ) : ℝ) = (x+j)+1 := by push_cast; ring rw [he, Real.Gamma_add_one hp] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.rising_eq_gamma_ratio_positive_start · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketNormalization.lean:30
theorem stdJacobi_neg_one_gamma Lemma stdJacobi_neg_one_gamma in the paper ↗

The endpoint evaluation in (P2), with all Gamma denominators positive. Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
hb :
-1/2 < b
j :
ℕ
stdJacobi a b j (-1)
= (-1 : ℝ)^j * Gamma (j+b+1) / (Gamma (b+1) * Gamma (j+1))
Proof (Lean source)
-- @node: stdJacobi_neg_one_gamma lemma stdJacobi_neg_one_gamma (a b : ℝ) (ha : -1/2 < a) (hb : -1/2 < b) (j : ℕ) : stdJacobi a b j (-1) = (-1 : ℝ)^j * Gamma (j+b+1) / (Gamma (b+1) * Gamma (j+1)) := by rw [stdJacobi_neg_one a b ha j, rising_eq_gamma_ratio_positive_start (b+1) (by linarith)] rw [show b+1+(j : ℝ) = j+b+1 by ring, ← Real.Gamma_nat_eq_factorial] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.stdJacobi_neg_one_gamma · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketNormalization.lean:47
theorem positive_sequence_extend_power_bounds Lemma positive_sequence_extend_power_bounds in the paper ↗

Positive finite initial terms can be absorbed into uniform power-comparison constants. Under the stated conditions. This is the stated conclusion.

Formal statement
f :
ℕ → ℝ
p :
ℝ
hf :
∀ j : ℕ
if
1 ≤ j
then
0 < f j
N :
ℕ
htail :
∃ c C : ℝ
if
0 < c ∧ 0 < C ∧ ∀ j : ℕ, N ≤ j
and
1 ≤ j
then
c*(j : ℝ)^p ≤ f j ∧ f j ≤ C*(j : ℝ)^p
∃ c C : ℝ,
0 < c
0 < C
conclusion 1
j :
ℕ
1 ≤ j
c*(j : ℝ)^p ≤ f j
f j ≤ C*(j : ℝ)^p
Proof (Lean source)
-- @node: positive_sequence_extend_power_bounds lemma positive_sequence_extend_power_bounds (f : ℕ → ℝ) (p : ℝ) (hf : ∀ j : ℕ, 1 ≤ j → 0 < f j) (N : ℕ) (htail : ∃ c C : ℝ, 0 < c ∧ 0 < C ∧ ∀ j : ℕ, N ≤ j → 1 ≤ j → c*(j : ℝ)^p ≤ f j ∧ f j ≤ C*(j : ℝ)^p) : ∃ c C : ℝ, 0 < c ∧ 0 < C ∧ ∀ j : ℕ, 1 ≤ j → c*(j : ℝ)^p ≤ f j ∧ f j ≤ C*(j : ℝ)^p := by induction N with | zero => obtain ⟨c, C, hc, hC, h⟩ := htail exact ⟨c, C, hc, hC, fun j hj => h j (zero_le j) hj⟩ | succ N ih => apply ih obtain ⟨c, C, hc, hC, h⟩ := htail by_cases hN : 1 ≤ N · have hp : 0 < (N : ℝ)^p := Real.rpow_pos_of_pos (by exact_mod_cast hN) p let r := f N / (N : ℝ)^p have hr : 0 < r := div_pos (hf N hN) hp refine ⟨min c r, max C r, lt_min hc hr, lt_of_lt_of_le hC (le_max_left _ _), ?_⟩ intro j hj hj1 by_cases he : j = N · subst j have heq : r*(N : ℝ)^p = f N := div_mul_cancel₀ _ hp.ne' constructor · calc min c r * (N : ℝ)^p ≤ r*(N : ℝ)^p := mul_le_mul_of_nonneg_right (min_le_right _ _) hp.le _ = f N := heq · calc f N = r*(N : ℝ)^p := heq.symm _ ≤ max C r * (N : ℝ)^p := mul_le_mul_of_nonneg_right (le_max_right _ _) hp.le · obtain ⟨hl, hu⟩ := h j (by omega) hj1 exact ⟨(mul_le_mul_of_nonneg_right (min_le_left _ _) (Real.rpow_nonneg (by positivity) p)).trans hl, hu.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) (Real.rpow_nonneg (by positivity) p))⟩ · refine ⟨c, C, hc, hC, ?_⟩ intro j hj hj1 exact h j (by omega) hj1
CausalSmith.Stat.NoisydoseWeakdesignTransition.positive_sequence_extend_power_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketNormalization.lean:57
theorem gamma_ratio_integer_power_bounds

The cited Gamma asymptotic gives two-sided power bounds at every positive integer, with the finite initial segment included rather than discarded. Under the stated conditions. This is the stated conclusion.

Formal statement
s t :
ℝ
hs :
0 < s
ht :
0 < t
∃ c C : ℝ,
0 < c
0 < C
conclusion 1
j :
ℕ
1 ≤ j
c*(j : ℝ)^(s-t) ≤ Gamma (j+s)/Gamma (j+t)
Gamma (j+s)/Gamma (j+t) ≤ C*(j : ℝ)^(s-t)
Proof (Lean source)
-- @node: gamma_ratio_integer_power_bounds lemma gamma_ratio_integer_power_bounds (hGamma : GammaRatioAsymptotic) (s t : ℝ) (hs : 0 < s) (ht : 0 < t) : ∃ c C : ℝ, 0 < c ∧ 0 < C ∧ ∀ j : ℕ, 1 ≤ j → c*(j : ℝ)^(s-t) ≤ Gamma (j+s)/Gamma (j+t) ∧ Gamma (j+s)/Gamma (j+t) ≤ C*(j : ℝ)^(s-t) := by have hlim := (hGamma s t).comp tendsto_natCast_atTop_atTop have hlow := hlim.eventually (eventually_gt_nhds (by norm_num : (1/2 : ℝ) < 1)) have hupp := hlim.eventually (eventually_lt_nhds (by norm_num : (1 : ℝ) < 2)) obtain ⟨N, hN⟩ := (hlow.and hupp).exists_forall_of_atTop refine positive_sequence_extend_power_bounds (fun j => Gamma (j+s)/Gamma (j+t)) (s-t) ?_ N ?_ · intro j hj exact div_pos (Real.Gamma_pos_of_pos (by positivity)) (Real.Gamma_pos_of_pos (by positivity)) · refine ⟨1/2, 2, by norm_num, by norm_num, ?_⟩ intro j hj hj1 obtain ⟨hl, hu⟩ := hN j hj have hp : 0 < (j : ℝ)^(s-t) := Real.rpow_pos_of_pos (by exact_mod_cast hj1) _ exact ⟨(le_div_iff₀ hp).mp hl.le, (div_le_iff₀ hp).mp hu.le⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.gamma_ratio_integer_power_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketNormalization.lean:97
theorem jacobi_endpoint_spectral_gamma

Dividing the squared endpoint value by its norm cancels two Gamma factors. This is the spectral coefficient used in the normalization sum (P3). Under the stated conditions. This is the stated conclusion.

Formal statement
a b :
ℝ
ha :
-1/2 < a
hb :
-1/2 < b
j :
ℕ
(stdJacobi a b j (-1))^2 / jacobiSqNorm a b j
= (2*j+a+b+1) / ((2 : ℝ)^(a+b+1) * (Gamma (b+1))^2) * (Gamma (j+b+1) / Gamma (j+1)) * (Gamma (j+a+b+1) / Gamma (j+a+1))
Proof (Lean source)
-- @node: jacobi_endpoint_spectral_gamma lemma jacobi_endpoint_spectral_gamma (hNorm : JacobiNormOrthogonality) (a b : ℝ) (ha : -1/2 < a) (hb : -1/2 < b) (j : ℕ) : (stdJacobi a b j (-1))^2 / jacobiSqNorm a b j = (2*j+a+b+1) / ((2 : ℝ)^(a+b+1) * (Gamma (b+1))^2) * (Gamma (j+b+1) / Gamma (j+1)) * (Gamma (j+a+b+1) / Gamma (j+a+1)) := by rw [stdJacobi_neg_one_gamma a b ha hb j, (hNorm a b ha hb j).2.2] have hg0 : Gamma (b+1) ≠ 0 := ne_of_gt (Real.Gamma_pos_of_pos (by linarith)) have hg1 : Gamma (j+1) ≠ 0 := ne_of_gt (Real.Gamma_pos_of_pos (by positivity)) have hg2 : Gamma (j+a+1) ≠ 0 := ne_of_gt (Real.Gamma_pos_of_pos (by have := Nat.cast_nonneg (α := ℝ) j; linarith)) have hg3 : Gamma (j+b+1) ≠ 0 := ne_of_gt (Real.Gamma_pos_of_pos (by have := Nat.cast_nonneg (α := ℝ) j; linarith)) have hg4 : Gamma (j+a+b+1) ≠ 0 := ne_of_gt (Real.Gamma_pos_of_pos (by have := Nat.cast_nonneg (α := ℝ) j; linarith)) have hd : (2 : ℝ)*j+a+b+1 ≠ 0 := by have := Nat.cast_nonneg (α := ℝ) j; linarith have hp : (2 : ℝ)^(a+b+1) ≠ 0 := by positivity have hsign : ((-1 : ℝ)^j)^2 = 1 := by rw [← pow_mul, mul_comm j 2, pow_mul]; simp field_simp [hg0, hg1, hg2, hg3, hg4, hd, hp] nlinarith [hsign]
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobi_endpoint_spectral_gamma · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketNormalization.lean:120
theorem jacobi_endpoint_spectral_power_bounds

Each endpoint spectral coefficient has the exact power-law order needed in (P3), uniformly over all positive degrees, including the finite initial segment. Under the stated conditions. This is the stated conclusion.

Formal statement
b :
ℝ
hb :
-1/2 < b
∃ c C : ℝ,
0 < c
0 < C
conclusion 1
j :
ℕ
1 ≤ j
c*(j : ℝ)^(2*b+1) ≤ (stdJacobi 4 b j (-1))^2 / jacobiSqNorm 4 b j
(stdJacobi 4 b j (-1))^2 / jacobiSqNorm 4 b j ≤ C*(j : ℝ)^(2*b+1)
Proof (Lean source)
-- @node: jacobi_endpoint_spectral_power_bounds lemma jacobi_endpoint_spectral_power_bounds (hNorm : JacobiNormOrthogonality) (hGamma : GammaRatioAsymptotic) (b : ℝ) (hb : -1/2 < b) : ∃ c C : ℝ, 0 < c ∧ 0 < C ∧ ∀ j : ℕ, 1 ≤ j → c*(j : ℝ)^(2*b+1) ≤ (stdJacobi 4 b j (-1))^2 / jacobiSqNorm 4 b j ∧ (stdJacobi 4 b j (-1))^2 / jacobiSqNorm 4 b j ≤ C*(j : ℝ)^(2*b+1) := by obtain ⟨c1, C1, hc1, hC1, h1⟩ := gamma_ratio_integer_power_bounds hGamma (b+1) 1 (by linarith) (by norm_num) obtain ⟨c2, C2, hc2, hC2, h2⟩ := gamma_ratio_integer_power_bounds hGamma (4+b+1) (4+1) (by linarith) (by norm_num) let D := (2 : ℝ)^(4+b+1) * (Gamma (b+1))^2 have hD : 0 < D := by dsimp [D] exact mul_pos (by positivity) (sq_pos_of_pos (Real.Gamma_pos_of_pos (by linarith))) have hb7 : 0 < b+7 := by linarith refine ⟨2*c1*c2/D, (b+7)*C1*C2/D, by positivity, by positivity, ?_⟩ intro j hj have hjp : (0 : ℝ) < j := by exact_mod_cast hj have hj1 : (1 : ℝ) ≤ j := by exact_mod_cast hj obtain ⟨hl1, hu1⟩ := h1 j hj obtain ⟨hl2, hu2⟩ := h2 j hj have he1 : b+1-1 = b := by ring have he2 : 4+b+1-(4+1) = b := by ring rw [he1] at hl1 hu1 rw [he2] at hl2 hu2 simp only [← add_assoc] at hl1 hu1 hl2 hu2 have hp : 0 < (j : ℝ)^b := Real.rpow_pos_of_pos hjp _ have hr1 : 0 < Gamma (j+b+1)/Gamma (j+1) := div_pos (Real.Gamma_pos_of_pos (by linarith)) (Real.Gamma_pos_of_pos (by positivity)) have hr2 : 0 < Gamma (j+4+b+1)/Gamma (j+4+1) := div_pos (Real.Gamma_pos_of_pos (by linarith)) (Real.Gamma_pos_of_pos (by positivity)) have hprod := mul_le_mul hl1 hl2 (mul_nonneg hc2.le hp.le) hr1.le have huprod := mul_le_mul hu1 hu2 hr2.le (mul_nonneg hC1.le hp.le) have hepow : (j : ℝ) * ((j : ℝ)^b * (j : ℝ)^b) = (j : ℝ)^(2*b+1) := by rw [← Real.rpow_add hjp] conv_lhs => lhs; rw [← Real.rpow_one (j : ℝ)] rw [← Real.rpow_add hjp] congr 1 ring rw [jacobi_endpoint_spectral_gamma hNorm 4 b (by norm_num) hb j] change _ ≤ ((2*j+4+b+1)/D)*_ * _ ∧ ((2*j+4+b+1)/D)*_ * _ ≤ _ have hlofactor : 2*(j : ℝ) ≤ 2*j+4+b+1 := by linarith have hufactor : 2*(j : ℝ)+4+b+1 ≤ (b+7)*j := by nlinarith have hlow : (2*j)*(c1*(j : ℝ)^b*(c2*(j : ℝ)^b)) ≤ (2*j+4+b+1)*(Gamma (j+b+1)/Gamma (j+1)* (Gamma (j+4+b+1)/Gamma (j+4+1))) := mul_le_mul hlofactor hprod (by positivity) (by linarith) have hupp : (2*j+4+b+1)*(Gamma (j+b+1)/Gamma (j+1)* (Gamma (j+4+b+1)/Gamma (j+4+1))) ≤ ((b+7)*j)*(C1*(j : ℝ)^b*(C2*(j : ℝ)^b)) := mul_le_mul hufactor huprod (mul_pos hr1 hr2).le (by linarith) have hel : (2*j)*(c1*(j : ℝ)^b*(c2*(j : ℝ)^b)) = (2*c1*c2)*(j : ℝ)^(2*b+1) := by rw [← hepow]; ring have heu : ((b+7)*j)*(C1*(j : ℝ)^b*(C2*(j : ℝ)^b)) = ((b+7)*C1*C2)*(j : ℝ)^(2*b+1) := by rw [← hepow]; ring rw [hel] at hlow rw [heu] at hupp constructor · convert (div_le_div_of_nonneg_right hlow hD.le) using 1 <;> first | rfl | ring · convert (div_le_div_of_nonneg_right hupp hD.le) using 1 <;> first | rfl | ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.jacobi_endpoint_spectral_power_bounds · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PacketNormalization.lean:142
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PositiveRatio 16 declarations Positive inverse-weight population ratios.

Positive inverse-weight population ratios. Integrable signed weights pass through the realized conditional mean and exact Gaussian inverse; latent density envelopes then give the public positive denominator and Holder localization bias bounds.

theorem integrable_test_outcome

Integrable signed dose-stratum-error weights can multiply the realized outcome. The domination is by the original weight, using the derived outcome range. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
F :
(ℝ × Bool × ℝ) → ℝ
hF :
hiF :
Integrable (fun w => F (sA w, sX w, sZ w)) P
Integrable (fun w => F (sA w, sX w, sZ w) * sY w) P
Proof (Lean source)
-- @node: integrable_test_outcome lemma integrable_test_outcome (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (F : (ℝ × Bool × ℝ) → ℝ) (hF : Measurable F) (hiF : Integrable (fun w => F (sA w, sX w, sZ w)) P) : Integrable (fun w => F (sA w, sX w, sZ w) * sY w) P := by apply hiF.mul_bdd (c := 1) (show Measurable (sY (S := S)) by fun_prop).aestronglyMeasurable filter_upwards [realized_outcome_mem_Icc E P hP.strataPos hP.scheduleUnconfoundedness hP.latentSupport hP.boundedPO hP.consistency] with w hw simpa only [Real.norm_eq_abs, abs_of_nonneg hw.1] using hw.2
CausalSmith.Stat.NoisydoseWeakdesignTransition.integrable_test_outcome · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:22
theorem integrable_test_mean

The conditional-mean bridge extends to every integrable signed test weight. The pull-out theorem includes the dominated truncation argument needed for unbounded weights. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
F :
(ℝ × Bool × ℝ) → ℝ
hF :
hiF :
Integrable (fun w => F (sA w, sX w, sZ w)) P
(∫ w, F (sA w, sX w, sZ w) * sY w ∂P)
= ∫ w, F (sA w, sX w, sZ w) * condPotMean E P (sX w) (sA w) ∂P
Proof (Lean source)
-- @node: integrable_test_mean lemma integrable_test_mean (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (F : (ℝ × Bool × ℝ) → ℝ) (hF : Measurable F) (hiF : Integrable (fun w => F (sA w, sX w, sZ w)) P) : (∫ w, F (sA w, sX w, sZ w) * sY w ∂P) = ∫ w, F (sA w, sX w, sZ w) * condPotMean E P (sX w) (sA w) ∂P := by have hiY := realized_outcome_integrable E P hP.strataPos hP.scheduleUnconfoundedness hP.latentSupport hP.boundedPO hP.consistency have hiFY := integrable_test_outcome E beta kappa sigma P hP F hF hiF have hm : AEStronglyMeasurable[doseXZSigma] (fun w : StructSpace S => F (sA w, sX w, sZ w)) P := (hF.comp (comap_measurable (fun w : StructSpace S => (sA w, sX w, sZ w)))).aestronglyMeasurable have hpull := condExp_mul_of_aestronglyMeasurable_left hm hiFY hiY have hmean := (realized_dose_mean E beta kappa sigma hbeta hkappa hsigma P hP).2.1 calc _ = ∫ w, P[(fun w => F (sA w, sX w, sZ w) * sY w) | doseXZSigma] w ∂P := (integral_condExp (show doseXZSigma ≤ (inferInstance : MeasurableSpace (StructSpace S)) from (show Measurable (fun w : StructSpace S => (sA w, sX w, sZ w)) by fun_prop).comap_le)).symm _ = ∫ w, F (sA w, sX w, sZ w) * P[sY | doseXZSigma] w ∂P := integral_congr_ae hpull _ = _ := by apply integral_congr_ae filter_upwards [hmean] with w hw rw [hw]
CausalSmith.Stat.NoisydoseWeakdesignTransition.integrable_test_mean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:36
theorem populationD_integrable

The unmarked stratum inverse weight is integrable by restriction of the admissible weight. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
x :
hlaw :
LawAdmissible sigma P q
Integrable (fun w => if sX w = x then q.ell (observedCentered sigma w) else 0) P
Proof (Lean source)
-- @node: populationD_integrable lemma populationD_integrable (sigma : ℝ) (P : Measure (StructSpace S)) (x : Bool) (q : WeightPair) (hlaw : LawAdmissible sigma P q) : Integrable (fun w => if sX w = x then q.ell (observedCentered sigma w) else 0) P := by have hi : Integrable (fun w => q.ell (observedCentered sigma w)) P := hlaw apply (hi.indicator (show MeasurableSet {w : StructSpace S | sX w = x} from measurableSet_eq_fun (by fun_prop) measurable_const)).congr filter_upwards [] with w simp only [Set.indicator_apply, Set.mem_setOf_eq]
CausalSmith.Stat.NoisydoseWeakdesignTransition.populationD_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:68
theorem populationM_integrable

The signed inverse-weight numerator is integrable because the realized outcome is bounded. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
hq :
hlaw :
LawAdmissible sigma P q
Integrable (fun w => if sX w = x then sY w * q.ell (observedCentered sigma w) else 0) P
Proof (Lean source)
-- @node: populationM_integrable lemma populationM_integrable (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (q : WeightPair) (hq : Measurable q.ell) (hlaw : LawAdmissible sigma P q) : Integrable (fun w => if sX w = x then sY w * q.ell (observedCentered sigma w) else 0) P := by have h := (populationD_integrable sigma P x q hlaw).mul_bdd (c := 1) (show Measurable (sY (S := S)) by fun_prop).aestronglyMeasurable (show ∀ᵐ w ∂P, ‖sY w‖ ≤ 1 from by filter_upwards [realized_outcome_mem_Icc E P hP.strataPos hP.scheduleUnconfoundedness hP.latentSupport hP.boundedPO hP.consistency] with w hw simpa only [Real.norm_eq_abs, abs_of_nonneg hw.1] using hw.2) convert h using 1 funext w split_ifs <;> simp [mul_comm]
CausalSmith.Stat.NoisydoseWeakdesignTransition.populationM_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:79
theorem populationM_eq_mean

The population marked weight equals its conditional-mean weighted counterpart, including signed unbounded inverse weights. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
hq :
hlaw :
LawAdmissible sigma P q
populationM sigma P x q
= ∫ w, (if sX w = x then condPotMean E P x (sA w) * q.ell (observedCentered sigma w) else 0) ∂P
Proof (Lean source)
-- @node: populationM_eq_mean lemma populationM_eq_mean (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (q : WeightPair) (hq : Measurable q.ell) (hlaw : LawAdmissible sigma P q) : populationM sigma P x q = ∫ w, (if sX w = x then condPotMean E P x (sA w) * q.ell (observedCentered sigma w) else 0) ∂P := by let F : (ℝ × Bool × ℝ) → ℝ := fun p => if p.2.1 = x then q.ell (p.1 + sigma * p.2.2 - a0) else 0 have hF : Measurable F := by apply Measurable.ite (measurableSet_eq_fun (by fun_prop) measurable_const) (hq.comp (by fun_prop)) measurable_const have hiF : Integrable (fun w : StructSpace S => F (sA w, sX w, sZ w)) P := populationD_integrable sigma P x q hlaw have h := integrable_test_mean E beta kappa sigma hbeta hkappa hsigma P hP F hF hiF calc _ = ∫ w, F (sA w, sX w, sZ w) * sY w ∂P := by apply integral_congr_ae filter_upwards [] with w dsimp [populationM, F, observedCentered, contaminatedDose] split_ifs <;> simp [mul_comm] _ = _ := h _ = _ := by apply integral_congr_ae filter_upwards [] with w dsimp [F, observedCentered, contaminatedDose] split_ifs with hw · rw [hw, mul_comm] · simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.populationM_eq_mean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:97
theorem error_centered_product_stratum

Conditioning on a public stratum preserves independence of the centered dose and error. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
x :
(stratumLaw P x).map (fun w => (sZ w, latentCentered w))
= (P.map sZ).prod ((stratumLaw P x).map latentCentered)
Proof (Lean source)
-- @node: error_centered_product_stratum lemma error_centered_product_stratum (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (herr : ErrorIndependence P) (x : Bool) : (stratumLaw P x).map (fun w => (sZ w, latentCentered w)) = (P.map sZ).prod ((stratumLaw P x).map latentCentered) := by have := stratumLaw_probability P hoverlap x have hZ : Measurable (sZ (S := S)) := by fun_prop have hAS : Measurable (fun w : StructSpace S => (sA w, sSched w)) := by fun_prop have hcenter : Measurable (fun p : ℝ × S => p.1 - a0) := by fun_prop have hp := congrArg (Measure.map (map (id : ℝ → ℝ) (fun p : ℝ × S => p.1-a0))) (error_scheduleDose_product_stratum P hoverlap herr x) rw [← Measure.map_prod_map _ _ measurable_id hcenter] at hp rw [Measure.map_map (measurable_id.prodMap hcenter) (hZ.prodMk hAS), Measure.map_map hcenter hAS, Measure.map_id] at hp exact hp
CausalSmith.Stat.NoisydoseWeakdesignTransition.error_centered_product_stratum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:133
theorem integrable_stratumLaw

An integrable population weight remains integrable under every positive-mass stratum. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
x :
f :
StructSpace S → ℝ
hf :
Proof (Lean source)
-- @node: integrable_stratumLaw lemma integrable_stratumLaw (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (x : Bool) (f : StructSpace S → ℝ) (hf : Integrable f P) : Integrable f (stratumLaw P x) := by have hp : P {w | sX w = x} ≠ 0 := by intro hp have h := hoverlap x simp only [strataProb, Measure.real, hp, ENNReal.toReal_zero] at h linarith exact hf.restrict.smul_measure (ENNReal.inv_ne_top.mpr hp)
CausalSmith.Stat.NoisydoseWeakdesignTransition.integrable_stratumLaw · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:151
theorem inverse_weight_stratum_integral

Exact Gaussian inversion turns an integrable signed observed weight into a latent weight, with any measurable multiplier for which the product is integrable. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
hoverlap :
hgauss :
x :
hq :
hsupport :
hinverse :
∀ t ∈ Icc (-1/2 : ℝ) (1/2), ∫ z, q.ell (t+sigma*z) ∂gaussianReal 0 1 = q.q t
H :
ℝ → ℝ
hH :
hi :
Integrable (fun w => H (latentCentered w) * q.ell (observedCentered sigma w)) P
(∫ w, H (latentCentered w) * q.ell (observedCentered sigma w) ∂stratumLaw P x)
= ∫ t, H t * q.q t ∂(stratumLaw P x).map latentCentered
Proof (Lean source)
-- @node: inverse_weight_stratum_integral lemma inverse_weight_stratum_integral (sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (herr : ErrorIndependence P) (hgauss : GaussianChannel P) (x : Bool) (q : WeightPair) (hq : Measurable q.ell) (hsupport : LatentSupport P) (hinverse : ∀ t ∈ Icc (-1/2 : ℝ) (1/2), ∫ z, q.ell (t+sigma*z) ∂gaussianReal 0 1 = q.q t) (H : ℝ → ℝ) (hH : Measurable H) (hi : Integrable (fun w => H (latentCentered w) * q.ell (observedCentered sigma w)) P) : (∫ w, H (latentCentered w) * q.ell (observedCentered sigma w) ∂stratumLaw P x) = ∫ t, H t * q.q t ∂(stratumLaw P x).map latentCentered := by have := stratumLaw_probability P hoverlap x let γ := (stratumLaw P x).map latentCentered let G : ℝ × ℝ → ℝ := fun p => H p.2 * q.ell (p.2 + sigma*p.1) have hm : Measurable G := by fun_prop have hT : Measurable (latentCentered (S := S)) := by unfold latentCentered; fun_prop have hZT : Measurable (fun w : StructSpace S => (sZ w, latentCentered w)) := by fun_prop have hprod : (stratumLaw P x).map (fun w => (sZ w, latentCentered w)) = (gaussianReal 0 1).prod γ := by rw [error_centered_product_stratum P hoverlap herr x, hgauss] have hiR := integrable_stratumLaw P hoverlap x _ hi have hiG : Integrable G ((gaussianReal 0 1).prod γ) := by rw [← hprod] apply (integrable_map_measure hm.aestronglyMeasurable hZT.aemeasurable).mpr apply hiR.congr filter_upwards [] with w dsimp [G, observedCentered, contaminatedDose, latentCentered] congr 2 ring have hsupportT : ∀ᵐ t ∂γ, t ∈ Icc (-1/2 : ℝ) (1/2) := by apply (ae_map_iff hT.aemeasurable (by measurability)).mpr filter_upwards [ae_stratumLaw_of_ae P x hsupport] with w hw dsimp [latentCentered, a0] constructor <;> linarith [hw.1, hw.2] calc _ = ∫ p, G p ∂(gaussianReal 0 1).prod γ := by rw [← hprod, integral_map hZT.aemeasurable hm.aestronglyMeasurable] apply integral_congr_ae filter_upwards [] with w dsimp [G, observedCentered, contaminatedDose, latentCentered] congr 2 ring _ = ∫ t, ∫ z, G (z,t) ∂gaussianReal 0 1 ∂γ := integral_prod_symm _ hiG _ = _ := by apply integral_congr_ae filter_upwards [hsupportT] with t ht dsimp [G] rw [integral_const_mul, hinverse t ht]
CausalSmith.Stat.NoisydoseWeakdesignTransition.inverse_weight_stratum_integral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:163
theorem latent_density_integral

Integrating against the centered conditional density gives the ordinary latent integral. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
kappa :
ℝ
g :
Bool → ℝ → ℝ
hg :
∀ x, Measurable (g x)
hlaw :
∀ x,
= (volume.restrict (Icc (-1/2 : ℝ) (1/2))).withDensity (fun t => ofReal (g x t))
henv :
∀ x,
∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa
≤ g x t ∧ g x t ≤ K.chi * |t| ^ kappa
x :
f :
ℝ → ℝ
(∫ t, f t ∂(stratumLaw P x).map latentCentered) = ∫ t in Icc (-1/2 : ℝ) (1/2), g x t * f t
Proof (Lean source)
-- @node: latent_density_integral lemma latent_density_integral {K : ClassConstants} (kappa : ℝ) (P : Measure (StructSpace S)) (g : Bool → ℝ → ℝ) (hg : ∀ x, Measurable (g x)) (hlaw : ∀ x, (stratumLaw P x).map latentCentered = (volume.restrict (Icc (-1/2 : ℝ) (1/2))).withDensity (fun t => ofReal (g x t))) (henv : ∀ x, ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa ≤ g x t ∧ g x t ≤ K.chi * |t| ^ kappa) (x : Bool) (f : ℝ → ℝ) : (∫ t, f t ∂(stratumLaw P x).map latentCentered) = ∫ t in Icc (-1/2 : ℝ) (1/2), g x t * f t := by rw [hlaw x, integral_withDensity_eq_integral_toReal_smul (hg x).ennreal_ofReal (ae_of_all _ (fun t => ENNReal.ofReal_lt_top))] apply integral_congr_ae filter_upwards [henv x] with t ht have hnonneg : 0 ≤ g x t := (mul_nonneg K.clo_pos.le (Real.rpow_nonneg (abs_nonneg _) _)).trans ht.1 simp only [ENNReal.toReal_ofReal hnonneg, smul_eq_mul]
CausalSmith.Stat.NoisydoseWeakdesignTransition.latent_density_integral · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:215
theorem populationD_eq_latent

The unmarked population inverse moment is the positive latent weighted integral. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
hq :
PairAdmissible kappa sigma q
hweight :
LawAdmissible sigma P q
g :
Bool → ℝ → ℝ
hg :
∀ x, Measurable (g x)
hlaw :
∀ x,
= (volume.restrict (Icc (-1/2 : ℝ) (1/2))).withDensity (fun t => ofReal (g x t))
henv :
∀ x,
∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa
≤ g x t ∧ g x t ≤ K.chi * |t| ^ kappa
populationD sigma P x q = strataProb P x * ∫ t in Icc (-1/2 : ℝ) (1/2), g x t * q.q t
Proof (Lean source)
-- @node: populationD_eq_latent lemma populationD_eq_latent (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (q : WeightPair) (hq : PairAdmissible kappa sigma q) (hweight : LawAdmissible sigma P q) (g : Bool → ℝ → ℝ) (hg : ∀ x, Measurable (g x)) (hlaw : ∀ x, (stratumLaw P x).map latentCentered = (volume.restrict (Icc (-1/2 : ℝ) (1/2))).withDensity (fun t => ofReal (g x t))) (henv : ∀ x, ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa ≤ g x t ∧ g x t ≤ K.chi * |t| ^ kappa) : populationD sigma P x q = strataProb P x * ∫ t in Icc (-1/2 : ℝ) (1/2), g x t * q.q t := by have hi : Integrable (fun w => (1 : ℝ) * q.ell (observedCentered sigma w)) P := by simpa only [one_mul] using (show Integrable (fun w => q.ell (observedCentered sigma w)) P from hweight) have h := inverse_weight_stratum_integral sigma P hP.strataPos hP.errorIndependence hP.gaussianChannel x q hq.2.1 hP.latentSupport hq.2.2.2.2.2.2 (fun _ => 1) measurable_const hi simp only [one_mul] at h rw [stratumLaw_integral, latent_density_integral kappa P g hg hlaw henv] at h exact (eq_div_iff (strataProb_pos P hP.strataPos x).ne').mp h.symm |>.symm.trans (mul_comm _ _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.populationD_eq_latent · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:234
theorem populationM_eq_latent

The marked population moment is the latent mean-weighted integral from equation (1). Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
hq :
PairAdmissible kappa sigma q
hweight :
LawAdmissible sigma P q
g :
Bool → ℝ → ℝ
hg :
∀ x, Measurable (g x)
hlaw :
∀ x,
= (volume.restrict (Icc (-1/2 : ℝ) (1/2))).withDensity (fun t => ofReal (g x t))
henv :
∀ x,
∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa
≤ g x t ∧ g x t ≤ K.chi * |t| ^ kappa
populationM sigma P x q
= strataProb P x * ∫ t in Icc (-1/2 : ℝ) (1/2), g x t * (projectedMean E P (a0+t) x * q.q t)
Proof (Lean source)
-- @node: populationM_eq_latent lemma populationM_eq_latent (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (q : WeightPair) (hq : PairAdmissible kappa sigma q) (hweight : LawAdmissible sigma P q) (g : Bool → ℝ → ℝ) (hg : ∀ x, Measurable (g x)) (hlaw : ∀ x, (stratumLaw P x).map latentCentered = (volume.restrict (Icc (-1/2 : ℝ) (1/2))).withDensity (fun t => ofReal (g x t))) (henv : ∀ x, ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa ≤ g x t ∧ g x t ≤ K.chi * |t| ^ kappa) : populationM sigma P x q = strataProb P x * ∫ t in Icc (-1/2 : ℝ) (1/2), g x t * (projectedMean E P (a0+t) x * q.q t) := by have hb : 0 < beta := hbeta.1 let H : ℝ → ℝ := fun t => projectedMean E P (a0+t) x have hH : Measurable H := (projectedMean_measurable E P beta hb hP.holderMean).comp (show Measurable (fun t : ℝ => (a0+t,x)) by fun_prop) have hi : Integrable (fun w => H (latentCentered w) * q.ell (observedCentered sigma w)) P := by apply (show Integrable (fun w => q.ell (observedCentered sigma w)) P from hweight).bdd_mul (c := 1) ((hH.comp (show Measurable (latentCentered (S := S)) by unfold latentCentered; fun_prop)).aestronglyMeasurable) filter_upwards [] with w have hm := projectedMean_mem_Icc E P hP.meanRange (a0+latentCentered w) x simpa only [H, Function.comp_apply, Real.norm_eq_abs, abs_of_nonneg hm.1] using hm.2 have h := inverse_weight_stratum_integral sigma P hP.strataPos hP.errorIndependence hP.gaussianChannel x q hq.2.1 hP.latentSupport hq.2.2.2.2.2.2 H hH hi rw [stratumLaw_integral, latent_density_integral kappa P g hg hlaw henv] at h have hM : populationM sigma P x q = ∫ w, (if sX w = x then H (latentCentered w) * q.ell (observedCentered sigma w) else 0) ∂P := by rw [populationM_eq_mean E beta kappa sigma hbeta hkappa hsigma P hP x q hq.2.1 hweight] apply integral_congr_ae filter_upwards [hP.latentSupport] with w hw by_cases hx : sX w = x · simp only [if_pos hx, H, latentCentered, add_sub_cancel] rw [projectedMean, Set.projIcc_of_mem zero_le_one hw] · simp only [if_neg hx] rw [← hM] at h exact (eq_div_iff (strataProb_pos P hP.strataPos x).ne').mp h.symm |>.symm.trans (mul_comm _ _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.populationM_eq_latent · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:256
theorem latent_weight_integrable Lemma latent_weight_integrable in the paper ↗

The weak-design upper envelope makes every nonnegative admissible latent weight integrable. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
q g :
ℝ → ℝ
hq :
hg :
hqn :
∀ t ∈ Icc (-1/2 : ℝ) (1/2), 0 ≤ q t
hi :
Integrable (fun t => |t| ^ kappa * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))
henv :
∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa
≤ g t ∧ g t ≤ K.chi * |t| ^ kappa
Integrable (fun t => g t * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))
Proof (Lean source)
-- @node: latent_weight_integrable lemma latent_weight_integrable {K : ClassConstants} (kappa : ℝ) (q g : ℝ → ℝ) (hq : Measurable q) (hg : Measurable g) (hqn : ∀ t ∈ Icc (-1/2 : ℝ) (1/2), 0 ≤ q t) (hi : Integrable (fun t => |t| ^ kappa * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))) (henv : ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa ≤ g t ∧ g t ≤ K.chi * |t| ^ kappa) : Integrable (fun t => g t * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := by apply (hi.const_mul K.chi).mono' (hg.mul hq).aestronglyMeasurable filter_upwards [henv, ae_restrict_mem measurableSet_Icc] with t ht hs have hn : 0 ≤ g t := (mul_nonneg K.clo_pos.le (Real.rpow_nonneg (abs_nonneg _) _)).trans ht.1 change ‖g t * q t‖ ≤ _ rw [Real.norm_eq_abs, abs_of_nonneg (mul_nonneg hn (hqn t hs))] calc _ ≤ (K.chi * |t| ^ kappa) * q t := mul_le_mul_of_nonneg_right ht.2 (hqn t hs) _ = _ := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.latent_weight_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:298

The lower weak-design envelope supplies the sharper latent denominator lower bound. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
q g :
ℝ → ℝ
hq :
hg :
hqn :
∀ t ∈ Icc (-1/2 : ℝ) (1/2), 0 ≤ q t
hi :
Integrable (fun t => |t| ^ kappa * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))
henv :
∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa
≤ g t ∧ g t ≤ K.chi * |t| ^ kappa
K.clo * weightMoment kappa q ≤ ∫ t in Icc (-1/2 : ℝ) (1/2), g t * q t
Proof (Lean source)
-- @node: latent_weight_lower lemma latent_weight_lower {K : ClassConstants} (kappa : ℝ) (q g : ℝ → ℝ) (hq : Measurable q) (hg : Measurable g) (hqn : ∀ t ∈ Icc (-1/2 : ℝ) (1/2), 0 ≤ q t) (hi : Integrable (fun t => |t| ^ kappa * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))) (henv : ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa ≤ g t ∧ g t ≤ K.chi * |t| ^ kappa) : K.clo * weightMoment kappa q ≤ ∫ t in Icc (-1/2 : ℝ) (1/2), g t * q t := by have hl := integral_mono_ae (hi.const_mul K.clo) (latent_weight_integrable kappa q g hq hg hqn hi henv) (show (fun t => K.clo * (|t| ^ kappa * q t)) ≤ᵐ[volume.restrict (Icc (-1/2 : ℝ) (1/2))] (fun t => g t * q t) from by filter_upwards [henv, ae_restrict_mem measurableSet_Icc] with t ht hs calc _ = (K.clo * |t| ^ kappa) * q t := by ring _ ≤ _ := mul_le_mul_of_nonneg_right ht.1 (hqn t hs)) change (∫ t in Icc (-1/2 : ℝ) (1/2), K.clo * (|t| ^ kappa * q t)) ≤ _ at hl rw [integral_const_mul] at hl simpa only [weightMoment] using hl
CausalSmith.Stat.NoisydoseWeakdesignTransition.latent_weight_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:317
theorem higher_weightMoment_integrable Lemma higher_weightMoment_integrable in the paper ↗

Compact support controls the higher localization moment by the admissible base moment. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
hb :
0 ≤ beta
hk :
0 ≤ kappa
q :
ℝ → ℝ
hi :
Integrable (fun t => |t| ^ kappa * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))
Integrable (fun t => |t| ^ (kappa+beta) * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))
Proof (Lean source)
-- @node: higher_weightMoment_integrable lemma higher_weightMoment_integrable (beta kappa : ℝ) (hb : 0 ≤ beta) (hk : 0 ≤ kappa) (q : ℝ → ℝ) (hi : Integrable (fun t => |t| ^ kappa * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))) : Integrable (fun t => |t| ^ (kappa+beta) * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := by have hm : Measurable (fun t : ℝ => |t| ^ beta) := by fun_prop have h := hi.mul_bdd (c := 1) hm.aestronglyMeasurable (show ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), ‖|t| ^ beta‖ ≤ 1 from by filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht rw [Real.norm_eq_abs, abs_of_nonneg (Real.rpow_nonneg (abs_nonneg _) _)] apply Real.rpow_le_one (abs_nonneg _) _ hb exact (abs_le.mpr ⟨by linarith [ht.1], by linarith [ht.2]⟩)) apply h.congr filter_upwards [] with t rw [Real.rpow_add_of_nonneg (abs_nonneg _) hk hb] ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.higher_weightMoment_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:338
theorem latent_weight_centered_bias

Holder continuity and the upper design envelope control the centered latent numerator. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hb :
0 < beta
hk :
0 ≤ kappa
hholder :
HolderMean E beta P
hrange :
x :
q g :
ℝ → ℝ
hq :
hg :
hqn :
∀ t ∈ Icc (-1/2 : ℝ) (1/2), 0 ≤ q t
hi :
Integrable (fun t => |t| ^ kappa * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))
henv :
∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa
≤ g t ∧ g t ≤ K.chi * |t| ^ kappa
|(∫ t in Icc (-1/2 : ℝ) (1/2), g t * (projectedMean E P (a0+t) x * q t))
- condPotMean E P x a0 * (∫ t in Icc (-1/2 : ℝ) (1/2), g t * q t)|
≤ K.chi * weightMoment (kappa+beta) q
Proof (Lean source)
-- @node: latent_weight_centered_bias lemma latent_weight_centered_bias {K : ClassConstants} (E : PathSpace S) (beta kappa : ℝ) (hb : 0 < beta) (hk : 0 ≤ kappa) (P : Measure (StructSpace S)) (hholder : HolderMean E beta P) (hrange : MeanRange E P) (x : Bool) (q g : ℝ → ℝ) (hq : Measurable q) (hg : Measurable g) (hqn : ∀ t ∈ Icc (-1/2 : ℝ) (1/2), 0 ≤ q t) (hi : Integrable (fun t => |t| ^ kappa * q t) (volume.restrict (Icc (-1/2 : ℝ) (1/2)))) (henv : ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), K.clo * |t| ^ kappa ≤ g t ∧ g t ≤ K.chi * |t| ^ kappa) : |(∫ t in Icc (-1/2 : ℝ) (1/2), g t * (projectedMean E P (a0+t) x * q t)) - condPotMean E P x a0 * (∫ t in Icc (-1/2 : ℝ) (1/2), g t * q t)| ≤ K.chi * weightMoment (kappa+beta) q := by have hchi : 0 ≤ K.chi := K.clo_pos.le.trans K.clo_le_chi let H : ℝ → ℝ := fun t => projectedMean E P (a0+t) x let m := condPotMean E P x a0 have ha0 : a0 ∈ Icc (0 : ℝ) 1 := by norm_num [a0] have hmrange := hrange x a0 ha0 have hHm : Measurable H := (projectedMean_measurable E P beta hb hholder).comp (show Measurable (fun t : ℝ => (a0+t,x)) by fun_prop) have higq := latent_weight_integrable kappa q g hq hg hqn hi henv have hiH : Integrable (fun t => g t * q t * H t) (volume.restrict (Icc (-1/2 : ℝ) (1/2))) := by apply higq.mul_bdd (c := 1) hHm.aestronglyMeasurable filter_upwards [] with t have ht := projectedMean_mem_Icc E P hrange (a0+t) x simpa only [H, Real.norm_eq_abs, abs_of_nonneg ht.1] using ht.2 have hidiff := hiH.sub (higq.mul_const m) have hihigher := higher_weightMoment_integrable beta kappa hb.le hk q hi have hid : (∫ t in Icc (-1/2 : ℝ) (1/2), g t * (H t * q t)) - m * (∫ t in Icc (-1/2 : ℝ) (1/2), g t * q t) = ∫ t in Icc (-1/2 : ℝ) (1/2), (g t * q t * H t - g t * q t * m) := by rw [integral_sub hiH (higq.mul_const m), integral_mul_const] have heq : (fun t => g t * (H t * q t)) = (fun t => g t * q t * H t) := by funext t; ring rw [heq, mul_comm m] rw [hid, ← Real.norm_eq_abs] apply (norm_integral_le_integral_norm _).trans have hbound : ∀ᵐ t ∂volume.restrict (Icc (-1/2 : ℝ) (1/2)), ‖g t * q t * H t - g t * q t * m‖ ≤ K.chi * (|t| ^ (kappa+beta) * q t) := by filter_upwards [henv, ae_restrict_mem measurableSet_Icc] with t ht hs have hgn : 0 ≤ g t := (mul_nonneg K.clo_pos.le (Real.rpow_nonneg (abs_nonneg _) _)).trans ht.1 have ha : a0+t ∈ Icc (0 : ℝ) 1 := by dsimp [a0]; constructor <;> linarith [hs.1, hs.2] have hinc : |H t-m| ≤ |t| ^ beta := by dsimp [H, m, projectedMean] rw [Set.projIcc_of_mem zero_le_one ha] simpa only [add_sub_cancel_left] using hholder x (a0+t) ha a0 ha0 rw [show g t*q t*H t - g t*q t*m = (g t*q t)*(H t-m) by ring, Real.norm_eq_abs, abs_mul, abs_of_nonneg (mul_nonneg hgn (hqn t hs))] calc _ ≤ (K.chi * |t| ^ kappa * q t) * (|t| ^ beta) := mul_le_mul (mul_le_mul_of_nonneg_right ht.2 (hqn t hs)) hinc (abs_nonneg _) (mul_nonneg (mul_nonneg hchi (Real.rpow_nonneg (abs_nonneg _) _)) (hqn t hs)) _ = _ := by rw [Real.rpow_add_of_nonneg (abs_nonneg _) hk hb.le]; ring have hle := integral_mono_ae hidiff.norm (hihigher.const_mul K.chi) hbound change (∫ t in Icc (-1/2 : ℝ) (1/2), ‖g t*q t*H t - g t*q t*m‖) ≤ _ at hle change _ ≤ ∫ t in Icc (-1/2 : ℝ) (1/2), K.chi * (|t| ^ (kappa+beta) * q t) at hle simpa only [integral_const_mul, weightMoment] using hle
CausalSmith.Stat.NoisydoseWeakdesignTransition.latent_weight_centered_bias · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:356
theorem positive_ratio

Every admissible positive inverse pair has a positive public denominator and the stated bias bound. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
hq :
PairAdmissible kappa sigma q
hlaw :
LawAdmissible sigma P q
x :
conclusion 1
0 < populationD sigma P x q
conclusion 2
bq K kappa q.q ≤ populationD sigma P x q
conclusion 3
|localizedRatio sigma P x q - condPotMean E P x a0| ≤ Bq K beta kappa q.q
Proof (Lean source)
-- @node: lem:positive-ratio lemma positive_ratio (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (q : WeightPair) (hq : PairAdmissible kappa sigma q) (hlaw : LawAdmissible sigma P q) : ∀ x : Bool, 0 < populationD sigma P x q ∧ bq K kappa q.q ≤ populationD sigma P x q ∧ |localizedRatio sigma P x q - condPotMean E P x a0| ≤ Bq K beta kappa q.q := by obtain ⟨g, hg, hglaw, hgenv⟩ := hP.weakDesign obtain ⟨hqm, hellm, hqn, hi, hIpos, hintegral, hinverse⟩ := hq have hq : PairAdmissible kappa sigma q := ⟨hqm, hellm, hqn, hi, hIpos, hintegral, hinverse⟩ intro x let L := ∫ t in Icc (-1/2 : ℝ) (1/2), g x t * q.q t let N := ∫ t in Icc (-1/2 : ℝ) (1/2), g x t * (projectedMean E P (a0+t) x * q.q t) have hL : K.clo * weightMoment kappa q.q ≤ L := latent_weight_lower kappa q.q (g x) hqm (hg x) hqn hi (hgenv x) have hcI : 0 < K.clo * weightMoment kappa q.q := mul_pos K.clo_pos hIpos have hchi : 0 ≤ K.chi := K.clo_pos.le.trans K.clo_le_chi have hLpos : 0 < L := lt_of_lt_of_le hcI hL have hp : 0 < strataProb P x := strataProb_pos P hP.strataPos x have hD : populationD sigma P x q = strataProb P x * L := populationD_eq_latent E beta kappa sigma P hP x q hq hlaw g hg hglaw hgenv have hM : populationM sigma P x q = strataProb P x * N := populationM_eq_latent E beta kappa sigma hbeta hkappa hsigma P hP x q hq hlaw g hg hglaw hgenv have hDpos : 0 < populationD sigma P x q := by rw [hD]; exact mul_pos hp hLpos refine ⟨hDpos, ?_, ?_⟩ · rw [hD] have h := mul_le_mul (hP.stratumOverlap x).1 hL hcI.le hp.le dsimp [bq] nlinarith · have hb : 0 < beta := hbeta.1 have hcenter : |N - condPotMean E P x a0 * L| ≤ K.chi * weightMoment (kappa+beta) q.q := latent_weight_centered_bias E beta kappa hb hkappa.1 P hP.holderMean hP.meanRange x q.q (g x) hqm (hg x) hqn hi (hgenv x) have hmoment : 0 ≤ weightMoment (kappa+beta) q.q := by apply integral_nonneg_of_ae filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht exact mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (hqn t ht) have hratio : localizedRatio sigma P x q = N/L := by dsimp [localizedRatio] rw [hM, hD] field_simp rw [hratio] have hid : N/L - condPotMean E P x a0 = (N - condPotMean E P x a0 * L)/L := by field_simp <;> ring rw [hid, abs_div, abs_of_pos hLpos] calc _ ≤ (K.chi * weightMoment (kappa+beta) q.q) / L := div_le_div_of_nonneg_right hcenter hLpos.le _ ≤ (K.chi * weightMoment (kappa+beta) q.q) / (K.clo * weightMoment kappa q.q) := div_le_div_of_nonneg_left (mul_nonneg hchi hmoment) hcI hL _ = Bq K beta kappa q.q := by have := K.clo_pos.ne' dsimp [Bq]; field_simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.positive_ratio · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PositiveRatio.lean:417
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.PublicCertificate 15 declarations Helpers — PublicCertificate

Helpers — PublicCertificate

theorem denominator_floor_error Lemma denominator_floor_error in the paper ↗

Flooring at half the public lower bound cannot increase denominator error. Under the stated conditions. This is the stated conclusion.

Formal statement
b D d :
ℝ
hb :
0 < b
hD :
b ≤ D
conclusion 1
0 < max d (b/2)
conclusion 2
|max d (b/2) - D| ≤ |d-D|
Proof (Lean source)
-- @node: denominator_floor_error lemma denominator_floor_error (b D d : ℝ) (hb : 0 < b) (hD : b ≤ D) : 0 < max d (b/2) ∧ |max d (b/2) - D| ≤ |d-D| := by refine ⟨lt_of_lt_of_le (by linarith) (le_max_right _ _), ?_⟩ have hfloor : b/2 ≤ D := by linarith simpa only [max_eq_left hfloor] using abs_max_sub_max_le_abs d D (b/2)
CausalSmith.Stat.NoisydoseWeakdesignTransition.denominator_floor_error · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:18

Clipping to the public mean range contracts distance to any mean in that range. This is the stated conclusion. Under the stated conditions.

Formal statement
z m :
ℝ
hm :
m ∈ Icc (0 : ℝ) 1
|max 0 (min 1 z) - m| ≤ |z-m|
Proof (Lean source)
-- @node: public_mean_clip_error lemma public_mean_clip_error (z m : ℝ) (hm : m ∈ Icc (0 : ℝ) 1) : |max 0 (min 1 z) - m| ≤ |z-m| := by have h := Set.abs_projIcc_sub_projIcc (c := z) (d := m) (zero_le_one : (0 : ℝ) ≤ 1) simpa only [Set.coe_projIcc, min_eq_right hm.2, max_eq_right hm.1] using h
CausalSmith.Stat.NoisydoseWeakdesignTransition.public_mean_clip_error · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:26

The public floor and mean-range projection give the deterministic ratio stability bound. Under the stated conditions. This is the stated conclusion.

Formal statement
b D M d u :
ℝ
hb :
0 < b
hD :
b ≤ D
hm :
M/D ∈ Icc (0 : ℝ) 1
|max 0 (min 1 (u / max d (b/2))) - M/D| ≤ (2/b) * (|u-M| + |d-D|)
Proof (Lean source)
-- @node: clipped_ratio_error lemma clipped_ratio_error (b D M d u : ℝ) (hb : 0 < b) (hD : b ≤ D) (hm : M/D ∈ Icc (0 : ℝ) 1) : |max 0 (min 1 (u / max d (b/2))) - M/D| ≤ (2/b) * (|u-M| + |d-D|) := by obtain ⟨hdpos, hderr⟩ := denominator_floor_error b D d hb hD have hDpos : 0 < D := hb.trans_le hD have hmabs : |M/D| ≤ 1 := by rw [abs_of_nonneg (by linarith [hm.1])] linarith [hm.2] have hid : u / max d (b/2) - M/D = ((u-M) + (M/D)*(D-max d (b/2))) / max d (b/2) := by field_simp <;> ring apply (public_mean_clip_error _ _ hm).trans rw [hid, abs_div, abs_of_pos hdpos] have hnum : |(u-M) + (M/D)*(D-max d (b/2))| ≤ |u-M| + |d-D| := by calc _ ≤ |u-M| + |(M/D)*(D-max d (b/2))| := abs_add_le _ _ _ = |u-M| + |M/D| * |max d (b/2)-D| := by rw [abs_mul, abs_sub_comm D] _ ≤ |u-M| + 1 * |d-D| := by gcongr _ = _ := by ring calc _ ≤ (|u-M| + |d-D|) / max d (b/2) := div_le_div_of_nonneg_right hnum hdpos.le _ ≤ (|u-M| + |d-D|) / (b/2) := div_le_div_of_nonneg_left (by positivity) (by linarith) (le_max_right _ _) _ = _ := by field_simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.clipped_ratio_error · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:34
theorem muhat_error_le

The actual stratum estimator obeys the deterministic public ratio error bound. Under the stated conditions. This is the stated conclusion.

Formal statement
kappa :
ℝ
n :
ℕ
data :
Fin n → Obs
x :
D M :
ℝ
hb :
0 < bq K kappa q.q
hD :
bq K kappa q.q ≤ D
hm :
M/D ∈ Icc (0 : ℝ) 1
|muhat K kappa n data x q - M/D|
≤ (2 / bq K kappa q.q) * (|Mhat n data x q-M| + |Dhat n data x q-D|)
Proof (Lean source)
-- @node: muhat_error_le lemma muhat_error_le (K : ClassConstants) (kappa : ℝ) (n : ℕ) (q : WeightPair) (data : Fin n → Obs) (x : Bool) (D M : ℝ) (hb : 0 < bq K kappa q.q) (hD : bq K kappa q.q ≤ D) (hm : M/D ∈ Icc (0 : ℝ) 1) : |muhat K kappa n data x q - M/D| ≤ (2 / bq K kappa q.q) * (|Mhat n data x q-M| + |Dhat n data x q-D|) := by exact clipped_ratio_error _ _ _ _ _ hb hD hm
CausalSmith.Stat.NoisydoseWeakdesignTransition.muhat_error_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:64

Each modulo-three block contains at least the quotient of the sample size by three. Under the stated conditions. This is the stated conclusion.

Formal statement
n r :
ℕ
hr :
r < 3
n/3 ≤ (splitBlock n r).card
Proof (Lean source)
-- @node: splitBlock_card_lower lemma splitBlock_card_lower (n r : ℕ) (hr : r < 3) : n/3 ≤ (splitBlock n r).card := by let f : Fin (n/3) → Fin n := fun j => ⟨3*j.val+r, by have hj := j.isLt omega⟩ have hmap : Set.MapsTo f (Finset.univ : Finset (Fin (n/3))) (splitBlock n r) := by intro j hj simp only [Finset.mem_coe, splitBlock, mem_filter, Finset.mem_univ, true_and] change (3*j.val+r) % 3 = r omega have hinj : InjOn f (Finset.univ : Finset (Fin (n/3))) := by intro i hi j hj hij have heq := congrArg val hij dsimp [f] at heq apply Fin.ext omega simpa only [Finset.card_univ, Fintype.card_fin] using Finset.card_le_card_of_injOn f hmap hinj
CausalSmith.Stat.NoisydoseWeakdesignTransition.splitBlock_card_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:74

For at least three records every split block has at least one fifth of the records. Under the stated conditions. This is the stated conclusion.

Formal statement
n r :
ℕ
hn :
3 ≤ n
hr :
r < 3
n ≤ 5 * (splitBlock n r).card
Proof (Lean source)
-- @node: splitBlock_card_fifth lemma splitBlock_card_fifth (n r : ℕ) (hn : 3 ≤ n) (hr : r < 3) : n ≤ 5 * (splitBlock n r).card := by have hcard := splitBlock_card_lower n r hr omega
CausalSmith.Stat.NoisydoseWeakdesignTransition.splitBlock_card_fifth · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:95
theorem blocksNonempty_of_three_le

The declared estimator's three blocks are all nonempty for sample size at least three. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
hn :
3 ≤ n
Proof (Lean source)
-- @node: blocksNonempty_of_three_le lemma blocksNonempty_of_three_le (n : ℕ) (hn : 3 ≤ n) : blocksNonempty n := by intro r hr apply Finset.card_pos.mp have hcard := splitBlock_card_lower n r hr omega
CausalSmith.Stat.NoisydoseWeakdesignTransition.blocksNonempty_of_three_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:102

Each empirical stratum frequency is nonnegative. This is the stated conclusion.

Formal statement
n :
ℕ
data :
Fin n → Obs
x :
0 ≤ phat n data x
Proof (Lean source)
-- @node: phat_nonneg lemma phat_nonneg (n : ℕ) (data : Fin n → Obs) (x : Bool) : 0 ≤ phat n data x := by unfold phat positivity

Frequencies in the first nonempty block sum to one over the two strata. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
hn :
3 ≤ n
data :
Fin n → Obs
(∑ x : Bool, phat n data x) = 1
Proof (Lean source)
-- @node: phat_sum_eq_one lemma phat_sum_eq_one (n : ℕ) (hn : 3 ≤ n) (data : Fin n → Obs) : (∑ x : Bool, phat n data x) = 1 := by have hc : (splitBlock n 0).card ≠ 0 := by have h := splitBlock_card_lower n 0 (by omega) omega have hcR : ((splitBlock n 0).card : ℝ) ≠ 0 := by exact_mod_cast hc simp only [phat, ← Finset.sum_div] rw [Finset.sum_comm] have hs (i : Fin n) : (∑ x : Bool, if (data i).1 = x then (1 : ℝ) else 0) = 1 := by cases h : (data i).1 <;> simp [h] simp only [hs, Finset.sum_const, nsmul_eq_mul, mul_one] exact div_self hcR
CausalSmith.Stat.NoisydoseWeakdesignTransition.phat_sum_eq_one · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:117
theorem weightEstimator_error_decomposition

The estimator error splits into a convexly weighted mean error and the stratum-frequency error. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hP :
NoisyDoseModelClass E K beta kappa sigma P
n :
ℕ
data :
Fin n → Obs
|weightEstimator K kappa n q data - causalTarget E P|
≤ (∑ x : Bool, phat n data x * |muhat K kappa n data x q - condPotMean E P x a0|)
+ |∑ x : Bool, (phat n data x - strataProb P x) * condPotMean E P x a0|
Proof (Lean source)
-- @node: weightEstimator_error_decomposition lemma weightEstimator_error_decomposition (E : PathSpace S) (beta kappa sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (n : ℕ) (data : Fin n → Obs) (q : WeightPair) : |weightEstimator K kappa n q data - causalTarget E P| ≤ (∑ x : Bool, phat n data x * |muhat K kappa n data x q - condPotMean E P x a0|) + |∑ x : Bool, (phat n data x - strataProb P x) * condPotMean E P x a0| := by rw [causalTarget_eq_stratum_sum E P hP.strataPos hP.boundedPO] have hid : weightEstimator K kappa n q data - (∑ x : Bool, strataProb P x * condPotMean E P x a0) = (∑ x : Bool, phat n data x * (muhat K kappa n data x q - condPotMean E P x a0)) + (∑ x : Bool, (phat n data x - strataProb P x) * condPotMean E P x a0) := by simp only [weightEstimator, ← Finset.sum_sub_distrib, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro x hx ring rw [hid] apply (abs_add_le _ _).trans apply add_le_add _ le_rfl apply (Finset.abs_sum_le_sum_abs _ _).trans apply Finset.sum_le_sum intro x hx rw [abs_mul, abs_of_nonneg (phat_nonneg n data x)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.weightEstimator_error_decomposition · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:132
theorem localizedRatio_mem_Icc

The positive latent weighted mean remains in the public outcome interval. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
x :
hq :
PairAdmissible kappa sigma q
hlaw :
LawAdmissible sigma P q
localizedRatio sigma P x q ∈ Icc (0 : ℝ) 1
Proof (Lean source)
-- @node: localizedRatio_mem_Icc lemma localizedRatio_mem_Icc (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (x : Bool) (q : WeightPair) (hq : PairAdmissible kappa sigma q) (hlaw : LawAdmissible sigma P q) : localizedRatio sigma P x q ∈ Icc (0 : ℝ) 1 := by obtain ⟨g, hg, hglaw, hgenv⟩ := hP.weakDesign let H := fun t => projectedMean E P (a0+t) x let f := fun t => g x t * q.q t let ν := volume.restrict (Icc (-1/2 : ℝ) (1/2)) have hf : Integrable f ν := latent_weight_integrable kappa q.q (g x) hq.1 (hg x) hq.2.2.1 hq.2.2.2.1 (hgenv x) have hfn : 0 ≤ᵐ[ν] f := by filter_upwards [hgenv x, ae_restrict_mem measurableSet_Icc] with t ht hs exact mul_nonneg ((mul_nonneg K.clo_pos.le (Real.rpow_nonneg (abs_nonneg _) _)).trans ht.1) (hq.2.2.1 t hs) have hH : Measurable H := (projectedMean_measurable E P beta (hbeta.1) hP.holderMean).comp (show Measurable (fun t : ℝ => (a0+t,x)) by fun_prop) have hfi : Integrable (fun t => f t * H t) ν := by apply hf.mul_bdd (c := 1) hH.aestronglyMeasurable filter_upwards [] with t have ht := projectedMean_mem_Icc E P hP.meanRange (a0+t) x simpa [H, Real.norm_eq_abs, abs_of_nonneg ht.1] using ht.2 have hLpos : 0 < ∫ t, f t ∂ν := lt_of_lt_of_le (by have := hq.2.2.2.2.1 have := K.clo_pos positivity) (latent_weight_lower kappa q.q (g x) hq.1 (hg x) hq.2.2.1 hq.2.2.2.1 (hgenv x)) have heq : localizedRatio sigma P x q = (∫ t, f t * H t ∂ν) / (∫ t, f t ∂ν) := by unfold localizedRatio rw [populationD_eq_latent E beta kappa sigma P hP x q hq hlaw g hg hglaw hgenv, populationM_eq_latent E beta kappa sigma hbeta hkappa hsigma P hP x q hq hlaw g hg hglaw hgenv] have hp := strataProb_pos P hP.strataPos x have hi : (fun t => g x t * (projectedMean E P (a0+t) x * q.q t)) = (fun t => f t * H t) := by funext t; dsimp [f, H]; ring rw [hi] change (strataProb P x * (∫ t, f t * H t ∂ν)) / (strataProb P x * (∫ t, f t ∂ν)) = _ field_simp rw [heq] constructor · apply (le_div_iff₀ hLpos).mpr rw [← integral_const_mul] apply integral_mono_ae (hf.const_mul _) hfi filter_upwards [hfn] with t ht have hr := hP.meanRange x _ (projIcc 0 1 zero_le_one (a0+t)).property change projectedMean E P (a0+t) x ∈ Icc (0 : ℝ) 1 at hr dsimp [H] change 0 ≤ f t at ht simpa only [mul_comm] using mul_le_mul_of_nonneg_left hr.1 ht · apply (div_le_iff₀ hLpos).mpr rw [← integral_const_mul] apply integral_mono_ae hfi (hf.const_mul _) filter_upwards [hfn] with t ht have hr := hP.meanRange x _ (projIcc 0 1 zero_le_one (a0+t)).property change projectedMean E P (a0+t) x ∈ Icc (0 : ℝ) 1 at hr dsimp [H] change 0 ≤ f t at ht simpa only [mul_comm] using mul_le_mul_of_nonneg_left hr.2 ht
CausalSmith.Stat.NoisydoseWeakdesignTransition.localizedRatio_mem_Icc · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:158

Distinct modulo-three blocks are disjoint. Under the stated conditions. This is the stated conclusion.

Formal statement
n r s :
ℕ
hrs :
r ≠ s
Proof (Lean source)
-- @node: splitBlock_disjoint lemma splitBlock_disjoint (n r s : ℕ) (hrs : r ≠ s) : Disjoint (splitBlock n r) (splitBlock n s) := by apply Finset.disjoint_left.mpr intro i hi hj simp only [splitBlock, mem_filter, Finset.mem_univ, true_and] at hi hj exact hrs (hi.symm.trans hj)
CausalSmith.Stat.NoisydoseWeakdesignTransition.splitBlock_disjoint · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:223
theorem phat_block_error_factorization

The first-block frequency factors from the absolute error of any other block average. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
sigma :
ℝ
n r :
ℕ
hr :
r ≠ 0
x :
f :
Obs → ℝ
hf :
m :
ℝ
hp :
Integrable (fun data => phat n data x) (experiment n sigma P)
hA :
Integrable (fun data : Fin n → Obs => |(∑ i ∈ splitBlock n r, f (data i)) / (splitBlock n r).card - m|) (experiment n sigma P)
A :
fun data : Fin n → Obs => |(∑ i ∈ splitBlock n r, f (data i)) / (splitBlock n r).card - m|
Integrable (fun data => phat n data x * A data) (experiment n sigma P)
(∫ data, phat n data x * A data ∂experiment n sigma P)
= (∫ data, phat n data x ∂experiment n sigma P) * (∫ data, A data ∂experiment n sigma P)
Proof (Lean source)
-- @node: phat_block_error_factorization lemma phat_block_error_factorization (sigma : ℝ) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (n r : ℕ) (hr : r ≠ 0) (x : Bool) (f : Obs → ℝ) (hf : Measurable f) (m : ℝ) (hp : Integrable (fun data => phat n data x) (experiment n sigma P)) (hA : Integrable (fun data : Fin n → Obs => |(∑ i ∈ splitBlock n r, f (data i)) / (splitBlock n r).card - m|) (experiment n sigma P)) : let A := fun data : Fin n → Obs => |(∑ i ∈ splitBlock n r, f (data i)) / (splitBlock n r).card - m| Integrable (fun data => phat n data x * A data) (experiment n sigma P) ∧ (∫ data, phat n data x * A data ∂experiment n sigma P) = (∫ data, phat n data x ∂experiment n sigma P) * (∫ data, A data ∂experiment n sigma P) := by have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop haveI : IsProbabilityMeasure (obsLaw sigma P) := Measure.isProbabilityMeasure_map hm.aemeasurable have h := iid_disjoint_block_averages_indep (obsLaw sigma P) n (splitBlock n 0) (splitBlock n r) (splitBlock_disjoint n 0 r hr.symm) (fun o : Obs => if o.1 = x then (1 : ℝ) else 0) f (Measurable.ite (measurableSet_eq_fun (by fun_prop) measurable_const) measurable_const measurable_const) hf have hi := h.comp measurable_id (show Measurable (fun z : ℝ => |z-m|) by fun_prop) change IndepFun (fun data => phat n data x) (fun data : Fin n → Obs => |(∑ i ∈ splitBlock n r, f (data i)) / (splitBlock n r).card - m|) (experiment n sigma P) at hi exact ⟨hi.integrable_mul hp hA, hi.integral_fun_mul_eq_mul_integral hp.aestronglyMeasurable hA.aestronglyMeasurable⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.phat_block_error_factorization · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:232
theorem split_standard_deviation_le Lemma split_standard_deviation_le in the paper ↗

The balanced split converts each moment standard deviation to the public sample-size scale. Under the stated conditions. This is the stated conclusion.

Formal statement
n r :
ℕ
hn :
3 ≤ n
hr :
r < 3
V :
ℝ
hV :
0 ≤ V
conclusion 1
sqrt (V / (splitBlock n r).card) ≤ 3 * sqrt (V / n)
conclusion 2
sqrt ((1/4 : ℝ) / (splitBlock n r).card) ≤ sqrt (3 / n)
Proof (Lean source)
-- @node: split_standard_deviation_le lemma split_standard_deviation_le (n r : ℕ) (hn : 3 ≤ n) (hr : r < 3) (V : ℝ) (hV : 0 ≤ V) : sqrt (V / (splitBlock n r).card) ≤ 3 * sqrt (V / n) ∧ sqrt ((1/4 : ℝ) / (splitBlock n r).card) ≤ sqrt (3 / n) := by have hN : 0 < ((splitBlock n r).card : ℝ) := by exact_mod_cast Finset.card_pos.mpr (blocksNonempty_of_three_le n hn r hr) have hnR : 0 < (n : ℝ) := by exact_mod_cast (show 0 < n by omega) have hcard : (n : ℝ) ≤ 5 * (splitBlock n r).card := by exact_mod_cast splitBlock_card_fifth n r hn hr have hv : V / (splitBlock n r).card ≤ 9 * (V/n) := by rw [show 9 * (V/(n : ℝ)) = (9*V)/(n : ℝ) by ring] apply (div_le_div_iff₀ hN hnR).mpr nlinarith have hv' : (1/4 : ℝ) / (splitBlock n r).card ≤ 3 / n := by apply (div_le_div_iff₀ hN hnR).mpr linarith refine ⟨?_, Real.sqrt_le_sqrt hv'⟩ have hs1 := Real.sq_sqrt (div_nonneg hV hN.le) have hs2 := Real.sq_sqrt (div_nonneg hV hnR.le) have hp1 := Real.sqrt_nonneg (V / (splitBlock n r).card) have hp2 := Real.sqrt_nonneg (V / n) nlinarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.split_standard_deviation_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:263
theorem public_error_certificate

The split, floor-clipped and projected ratio has the public finite-sample absolute-risk certificate. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
n :
ℕ
hn :
3 ≤ n
sigma :
ℝ
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
hiid :
IIDSampling n sigma P (experiment n sigma P)
hq :
PairAdmissible kappa sigma q
hlaw :
LawAdmissible sigma P q
hV :
VqENN kappa sigma q.ell < ⊤
(∫ data, |weightEstimator K kappa n q data - causalTarget E P| ∂experiment n sigma P)
≤ Aq K beta kappa n sigma q
Proof (Lean source)
-- @node: lem:public-error-certificate lemma public_error_certificate (E : PathSpace S) (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (n : ℕ) (hn : 3 ≤ n) (sigma : ℝ) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) (hiid : IIDSampling n sigma P (experiment n sigma P)) (q : WeightPair) (hq : PairAdmissible kappa sigma q) (hlaw : LawAdmissible sigma P q) (hV : VqENN kappa sigma q.ell < ⊤) : (∫ data, |weightEstimator K kappa n q data - causalTarget E P| ∂experiment n sigma P) ≤ Aq K beta kappa n sigma q := by have hell := hq.2.1 have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose; fun_prop haveI : IsProbabilityMeasure (obsLaw sigma P) := Measure.isProbabilityMeasure_map hm.aemeasurable haveI : IsProbabilityMeasure (experiment n sigma P) := by unfold experiment; infer_instance let Q := experiment n sigma P let B := Bq K beta kappa q.q let b := bq K kappa q.q let v := pubVq K kappa sigma q.ell let eD := fun (x : Bool) data => |Dhat n data x q - populationD sigma P x q| let eM := fun (x : Bool) data => |Mhat n data x q - populationM sigma P x q| let ep := fun (x : Bool) data => |phat n data x - strataProb P x| have hb : 0 < b := by dsimp [b, bq]; exact mul_pos (mul_pos K.pmin_pos K.clo_pos) hq.2.2.2.2.1 have hblocks := blocksNonempty_of_three_le n hn have hDm (x : Bool) := Dhat_population_moments E beta kappa sigma P hP n (hblocks 1 (by omega)) x q hell hV have hMm (x : Bool) := Mhat_population_moments E beta kappa sigma P hP n (hblocks 2 (by omega)) x q hell hV have hpm (x : Bool) := phat_population_moments sigma P n (hblocks 0 (by omega)) x have hDi (x : Bool) : Integrable (eD x) Q := ((hDm x).1.integrable (by norm_num)).sub (integrable_const _) |>.abs have hMi (x : Bool) : Integrable (eM x) Q := ((hMm x).1.integrable (by norm_num)).sub (integrable_const _) |>.abs have hpi (x : Bool) : Integrable (ep x) Q := ((hpm x).1.integrable (by norm_num)).sub (integrable_const _) |>.abs have hDF (x : Bool) : Integrable (fun data => phat n data x * eD x data) Q ∧ (∫ data, phat n data x * eD x data ∂Q) = strataProb P x * ∫ data, eD x data ∂Q := by have hf : Measurable (fun o : Obs => if o.1 = x then q.ell (o.2.1-a0) else 0) := Measurable.ite (measurableSet_eq_fun (by fun_prop) measurable_const) (by fun_prop) measurable_const obtain ⟨hi, he⟩ := phat_block_error_factorization sigma P n 1 (by omega) x _ hf (populationD sigma P x q) ((hpm x).1.integrable (by norm_num)) (hDi x) refine ⟨hi, ?_⟩ simpa only [eD, eM, Dhat, Mhat, Q, (hpm x).2.1] using he have hMF (x : Bool) : Integrable (fun data => phat n data x * eM x data) Q ∧ (∫ data, phat n data x * eM x data ∂Q) = strataProb P x * ∫ data, eM x data ∂Q := by have hf : Measurable (fun o : Obs => if o.1 = x then o.2.2*q.ell (o.2.1-a0) else 0) := Measurable.ite (measurableSet_eq_fun (by fun_prop) measurable_const) (by fun_prop) measurable_const obtain ⟨hi, he⟩ := phat_block_error_factorization sigma P n 2 (by omega) x _ hf (populationM sigma P x q) ((hpm x).1.integrable (by norm_num)) (hMi x) refine ⟨hi, ?_⟩ simpa only [eD, eM, Dhat, Mhat, Q, (hpm x).2.1] using he have hdev (x : Bool) : (∫ data, eD x data ∂Q) ≤ 3 * sqrt (v/n) ∧ (∫ data, eM x data ∂Q) ≤ 3 * sqrt (v/n) := by have he := inverse_moments_expected_abs_error E beta kappa sigma P hP n (hblocks 1 (by omega)) (hblocks 2 (by omega)) x q hell hV exact ⟨he.1.trans (split_standard_deviation_le n 1 hn (by omega) v ENNReal.toReal_nonneg).1, he.2.trans (split_standard_deviation_le n 2 hn (by omega) v ENNReal.toReal_nonneg).1⟩ have hpdev (x : Bool) : (∫ data, ep x data ∂Q) ≤ sqrt (3/n) := by have he := expected_abs_deviation_le_sqrt_variance Q _ (hpm x).1 rw [(hpm x).2.1] at he exact he.trans ((Real.sqrt_le_sqrt (hpm x).2.2).trans (split_standard_deviation_le n 0 hn (by omega) v ENNReal.toReal_nonneg).2) have hpoint (data : Fin n → Obs) : |weightEstimator K kappa n q data - causalTarget E P| ≤ B + (2/b) * (∑ x : Bool, (phat n data x * eM x data + phat n data x * eD x data)) + ∑ x : Bool, ep x data := by have he := weightEstimator_error_decomposition E beta kappa sigma P hP n data q apply he.trans apply add_le_add · have hratio (x : Bool) : |muhat K kappa n data x q - condPotMean E P x a0| ≤ B + (2/b) * (eM x data + eD x data) := by obtain ⟨hDpos, hD, hbias⟩ := positive_ratio E beta kappa sigma hbeta hkappa hsigma P hP q hq hlaw x have hrange := localizedRatio_mem_Icc E beta kappa sigma hbeta hkappa hsigma P hP x q hq hlaw have hr := muhat_error_le K kappa n q data x _ _ hb hD hrange have ht := abs_sub_le (muhat K kappa n data x q) (localizedRatio sigma P x q) (condPotMean E P x a0) exact ht.trans (by dsimp [localizedRatio] at *; dsimp [eM, eD, B, b]; linarith) calc _ ≤ ∑ x : Bool, phat n data x * (B + (2/b)*(eM x data + eD x data)) := by apply Finset.sum_le_sum intro x hx exact mul_le_mul_of_nonneg_left (hratio x) (phat_nonneg n data x) _ = B + (2/b) * (∑ x : Bool, (phat n data x * eM x data + phat n data x * eD x data)) := by simp only [mul_add, Finset.sum_add_distrib] rw [← Finset.sum_mul, phat_sum_eq_one n hn data, one_mul] simp only [Finset.mul_sum] apply congrArg (fun z => B+z) congr 1 <;> apply Finset.sum_congr rfl <;> intros <;> ring · apply (Finset.abs_sum_le_sum_abs _ _).trans apply Finset.sum_le_sum intro x hx have hrange := hP.meanRange x a0 (by norm_num [a0]) have habs : |condPotMean E P x a0| ≤ 1 := by rw [abs_of_nonneg (by linarith [hrange.1])]; linarith [hrange.2] rw [abs_mul] exact (mul_le_mul_of_nonneg_left habs (abs_nonneg _)).trans_eq (mul_one _) have htermI (x : Bool) : Integrable (fun data => phat n data x * eM x data + phat n data x * eD x data) Q := (hMF x).1.add (hDF x).1 have hsumI : Integrable (fun data => ∑ x : Bool, (phat n data x * eM x data + phat n data x * eD x data)) Q := integrable_finsetSum _ (fun x _ => htermI x) have hepI : Integrable (fun data => ∑ x : Bool, ep x data) Q := integrable_finsetSum _ (fun x _ => hpi x) have hscaledI : Integrable (fun data => (2/b) * ∑ x : Bool, (phat n data x * eM x data + phat n data x * eD x data)) Q := hsumI.const_mul (2/b) have hbaseI : Integrable (fun data => B + (2/b) * ∑ x : Bool, (phat n data x * eM x data + phat n data x * eD x data)) Q := (integrable_const B).add hscaledI have hbound := integral_mono_of_nonneg (ae_of_all Q (fun data => abs_nonneg _)) (hbaseI.add hepI) (ae_of_all Q hpoint) simp only [Pi.add_apply] at hbound rw [integral_add hbaseI hepI, integral_add (integrable_const B) hscaledI, integral_const_mul, integral_const, probReal_univ, smul_eq_mul, one_mul, integral_finsetSum _ (fun x _ => htermI x), integral_finsetSum _ (fun x _ => hpi x)] at hbound have hsum : (∑ x : Bool, ∫ data, (phat n data x * eM x data + phat n data x * eD x data) ∂Q) ≤ 6 * sqrt (v/n) := by have hpart (x : Bool) : (∫ data, (phat n data x * eM x data + phat n data x * eD x data) ∂Q) ≤ strataProb P x * (6 * sqrt (v/n)) := by rw [integral_add (hMF x).1 (hDF x).1, (hMF x).2, (hDF x).2, ← mul_add] exact mul_le_mul_of_nonneg_left (by linarith [(hdev x).1, (hdev x).2]) (strataProb_pos P hP.strataPos x).le have hs : (∑ x : Bool, strataProb P x) = 1 := by have h := phat_sum_eq_one n hn have hi : (∫ data, ∑ x : Bool, phat n data x ∂Q) = 1 := by simp only [h, integral_const, probReal_univ, smul_eq_mul, one_mul] rw [integral_finsetSum _ (fun x _ => (hpm x).1.integrable (by norm_num))] at hi simpa only [(hpm _).2.1] using hi calc _ ≤ ∑ x : Bool, strataProb P x * (6 * sqrt (v/n)) := Finset.sum_le_sum (fun x _ => hpart x) _ = _ := by rw [← Finset.sum_mul, hs, one_mul] have hfreq : (∑ x : Bool, ∫ data, ep x data ∂Q) ≤ 2 * sqrt (3/n) := by calc _ ≤ ∑ x : Bool, sqrt (3/n) := Finset.sum_le_sum (fun x _ => hpdev x) _ = _ := by simp apply hbound.trans change _ ≤ B + 12/b * sqrt (v/n) + 2 * sqrt (3/n) have hcoeff : 0 ≤ 2/b := by positivity have hh := mul_le_mul_of_nonneg_left hsum hcoeff have heq : (2/b) * (6 * sqrt (v/n)) = 12/b * sqrt (v/n) := by ring rw [heq] at hh linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.public_error_certificate · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/PublicCertificate.lean:288
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.RealizedDoseMean 3 declarations Helpers — RealizedDoseMean

Helpers — RealizedDoseMean

def doseXZSigma

The sigma algebra generated by dose, stratum and error.

Definition (Lean source)
S :
Type u_1
shared
doseXZSigma :
comap (fun w : StructSpace S => (sA w, sX w, sZ w)) inferInstance
def doseXSigma

The sigma algebra generated by dose and stratum.

Definition (Lean source)
S :
Type u_1
shared
doseXSigma :
comap (fun w : StructSpace S => (sA w, sX w)) inferInstance
theorem realized_dose_mean

Schedule exchangeability derives both realized-dose conditional means and the observed outcome bound. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma P
conclusion 1
∀ᵐ w ∂P, sY w ∈ Icc 0 1
conclusion 2
P[sY | doseXZSigma] =ᵐ[P] fun w => condPotMean E P (sX w) (sA w)
conclusion 3
P[sY | doseXSigma] =ᵐ[P] fun w => condPotMean E P (sX w) (sA w)
conclusion 4
F :
(ℝ × Bool × ℝ) → ℝ
(∃ B : ℝ, ∀ z, |F z| ≤ B)
∫ w, F (sA w, sX w, sZ w)*sY w ∂P
= ∫ w, F (sA w, sX w, sZ w)*condPotMean E P (sX w) (sA w) ∂P
Proof (Lean source)
-- @node: lem:realized-dose-mean lemma realized_dose_mean (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma P) : (∀ᵐ w ∂P, sY w ∈ Icc 0 1) ∧ -- @realizes Y(derived observed a.s. range [0,1]) (P[sY | doseXZSigma] =ᵐ[P] fun w => condPotMean E P (sX w) (sA w)) ∧ (P[sY | doseXSigma] =ᵐ[P] fun w => condPotMean E P (sX w) (sA w)) ∧ (∀ F : (ℝ × Bool × ℝ) → ℝ, Measurable F → (∃ B : ℝ, ∀ z, |F z| ≤ B) → ∫ w, F (sA w, sX w, sZ w)*sY w ∂P = ∫ w, F (sA w, sX w, sZ w)*condPotMean E P (sX w) (sA w) ∂P) := by refine ⟨realized_outcome_mem_Icc E P hP.strataPos hP.scheduleUnconfoundedness hP.latentSupport hP.boundedPO hP.consistency, ?_⟩ have hb : 0 < beta := hbeta.1 have hiY := realized_outcome_integrable E P hP.strataPos hP.scheduleUnconfoundedness hP.latentSupport hP.boundedPO hP.consistency have hiM := projectedMean_random_integrable E P beta hb hP.holderMean hP.meanRange have hm := projectedMean_measurable E P beta hb hP.holderMean have hactual : (fun w => projectedMean E P (sA w) (sX w)) =ᵐ[P] (fun w => condPotMean E P (sX w) (sA w)) := by filter_upwards [hP.latentSupport] with w hw simp only [projectedMean, Set.projIcc_of_mem zero_le_one hw] have htests : ∀ F : (ℝ × Bool × ℝ) → ℝ, Measurable F → (∃ B : ℝ, ∀ z, |F z| ≤ B) → (∫ w, F (sA w,sX w,sZ w)*sY w ∂P) = ∫ w, F (sA w,sX w,sZ w)*projectedMean E P (sA w) (sX w) ∂P := by intro F hF hbound obtain ⟨B,hB⟩ := hbound exact bounded_test_mean E beta kappa sigma hb P hP F hF B hB have hXZ : P[sY | doseXZSigma] =ᵐ[P] (fun w => projectedMean E P (sA w) (sX w)) := by apply condExp_eq_of_bounded_tests P (fun w => (sA w,sX w,sZ w)) (by fun_prop) sY hiY (fun p => projectedMean E P p.1 p.2.1) (hm.comp (show Measurable (fun p : ℝ × Bool × ℝ => (p.1,p.2.1)) by fun_prop)) hiM exact htests have hX : P[sY | doseXSigma] =ᵐ[P] (fun w => projectedMean E P (sA w) (sX w)) := by apply condExp_eq_of_bounded_tests P (fun w => (sA w,sX w)) (by fun_prop) sY hiY (fun p => projectedMean E P p.1 p.2) hm hiM intro F hF hbound apply htests (fun p => F (p.1,p.2.1)) (hF.comp (show Measurable (fun p : ℝ × Bool × ℝ => (p.1,p.2.1)) by fun_prop)) obtain ⟨B,hB⟩ := hbound exact ⟨B, fun p => hB (p.1,p.2.1)⟩ refine ⟨hXZ.trans hactual, hX.trans hactual, ?_⟩ intro F hF hbound apply (htests F hF hbound).trans apply integral_congr_ae filter_upwards [hactual] with w hw rw [hw]
CausalSmith.Stat.NoisydoseWeakdesignTransition.realized_dose_mean · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/RealizedDoseMean.lean:24
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.ScheduleFactorization 11 declarations Finite-stratum normalization and the schedule/dose product law used in the realized-dose argument.

Finite-stratum normalization and the schedule/dose product law used in the realized-dose argument. These results use whole-schedule exchangeability.

theorem stratumLaw_probability

Each positive stratum carries a normalized probability law. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
x :
Proof (Lean source)
-- @node: stratumLaw_probability lemma stratumLaw_probability (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (x : Bool) : IsProbabilityMeasure (stratumLaw P x) := by have hp : P {w | sX w = x} ≠ 0 := by intro h have := hoverlap x simp [strataProb, Measure.real, h] at this constructor simp only [stratumLaw, Measure.smul_apply, Measure.restrict_apply_univ, smul_eq_mul] exact ENNReal.inv_mul_cancel hp (measure_ne_top _ _)
CausalSmith.Stat.NoisydoseWeakdesignTransition.stratumLaw_probability · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:14
theorem stratumLaw_real_apply

Stratum restriction divides real event masses by the positive stratum mass. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
x :
B :
(stratumLaw P x).real B = P.real (B ∩ {w | sX w = x}) / strataProb P x
Proof (Lean source)
-- @node: stratumLaw_real_apply lemma stratumLaw_real_apply (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (x : Bool) (B : Set (StructSpace S)) : (stratumLaw P x).real B = P.real (B ∩ {w | sX w = x}) / strataProb P x := by have hx : MeasurableSet {w : StructSpace S | sX w = x} := measurableSet_eq_fun (by fun_prop) measurable_const unfold stratumLaw rw [measureReal_ennreal_smul_apply, ENNReal.toReal_inv, measureReal_restrict_apply' hx] simp only [strataProb, Measure.real, div_eq_mul_inv, mul_comm]
CausalSmith.Stat.NoisydoseWeakdesignTransition.stratumLaw_real_apply · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:26
theorem schedule_dose_indep_stratum

Whole-schedule exchangeability becomes ordinary independence in each stratum. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
x :
Proof (Lean source)
-- @node: schedule_dose_indep_stratum lemma schedule_dose_indep_stratum (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hex : ScheduleUnconfoundedness P) (x : Bool) : IndepFun sSched sA (stratumLaw P x) := by have := stratumLaw_probability P hoverlap x apply indepFun_iff_measure_inter_preimage_eq_mul.mpr intro B D hB hD apply (ENNReal.toReal_eq_toReal_iff' (measure_ne_top _ _) (ENNReal.mul_ne_top (measure_ne_top _ _) (measure_ne_top _ _))).mp rw [ENNReal.toReal_mul] change (stratumLaw P x).real (sSched ⁻¹' B ∩ sA ⁻¹' D) = (stratumLaw P x).real (sSched ⁻¹' B) * (stratumLaw P x).real (sA ⁻¹' D) rw [stratumLaw_real_apply, stratumLaw_real_apply, stratumLaw_real_apply] have hp : strataProb P x ≠ 0 := (hoverlap x).ne' have h := hex x B D hB hD have hset : (sSched ⁻¹' B ∩ sA ⁻¹' D) ∩ {w : StructSpace S | sX w = x} = {w | sSched w ∈ B ∧ sA w ∈ D ∧ sX w = x} := by ext w; simp only [mem_inter_iff, mem_preimage, mem_ofPred_eq]; tauto rw [hset] change P.real {w | sSched w ∈ B ∧ sA w ∈ D ∧ sX w = x} / strataProb P x = (P.real {w | sSched w ∈ B ∧ sX w = x} / strataProb P x) * (P.real {w | sA w ∈ D ∧ sX w = x} / strataProb P x) field_simp exact h
CausalSmith.Stat.NoisydoseWeakdesignTransition.schedule_dose_indep_stratum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:37
theorem schedule_dose_product_stratum

The conditional joint schedule/dose law is the product of its marginals. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
x :
(stratumLaw P x).map (fun w => (sSched w, sA w))
Proof (Lean source)
-- @node: schedule_dose_product_stratum lemma schedule_dose_product_stratum (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hex : ScheduleUnconfoundedness P) (x : Bool) : (stratumLaw P x).map (fun w => (sSched w, sA w)) = ((stratumLaw P x).map sSched).prod ((stratumLaw P x).map sA) := by have := stratumLaw_probability P hoverlap x exact (schedule_dose_indep_stratum P hoverlap hex x).map_prod_eq_prod_map_map (by fun_prop) (by fun_prop)
CausalSmith.Stat.NoisydoseWeakdesignTransition.schedule_dose_product_stratum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:63
theorem error_scheduleDose_product_stratum

Error independence survives positive-stratum restriction, with its marginal unchanged. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
x :
(stratumLaw P x).map (fun w => (sZ w, sA w, sSched w))
= (P.map sZ).prod ((stratumLaw P x).map (fun w => (sA w, sSched w)))
Proof (Lean source)
-- @node: error_scheduleDose_product_stratum lemma error_scheduleDose_product_stratum (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (herr : ErrorIndependence P) (x : Bool) : (stratumLaw P x).map (fun w => (sZ w, sA w, sSched w)) = (P.map sZ).prod ((stratumLaw P x).map (fun w => (sA w, sSched w))) := by have := stratumLaw_probability P hoverlap x have hZ : Measurable (sZ (S := S)) := by fun_prop have hAS : Measurable (fun w : StructSpace S => (sA w, sSched w)) := by fun_prop have hx : MeasurableSet {w : StructSpace S | sX w = x} := measurableSet_eq_fun (by fun_prop) measurable_const apply Measure.ext_prod intro B D hB hD let C : Set (Bool × ℝ × S) := {p | p.1 = x ∧ p.2 ∈ D} have hC : MeasurableSet C := (measurableSet_eq_fun measurable_fst measurable_const).inter (measurable_snd hD) have hfactor := herr.measure_inter_preimage_eq_mul B C hB hC rw [Measure.map_apply (hZ.prodMk hAS) (hB.prod hD), Measure.prod_prod, Measure.map_apply hZ hB, Measure.map_apply hAS hD] simp only [stratumLaw, Measure.smul_apply, Measure.restrict_apply' hx, smul_eq_mul] have hevent : (fun w : StructSpace S => (sZ w, sA w, sSched w)) ⁻¹' (B ×ˢ D) ∩ {w | sX w = x} = sZ ⁻¹' B ∩ (fun w => (sX w, sA w, sSched w)) ⁻¹' C := by ext w; simp only [C, mem_inter_iff, mem_preimage, mem_prod, mem_ofPred_eq]; tauto have hright : (fun w : StructSpace S => (sA w, sSched w)) ⁻¹' D ∩ {w | sX w = x} = (fun w => (sX w, sA w, sSched w)) ⁻¹' C := by ext w; simp only [C, mem_inter_iff, mem_preimage, mem_ofPred_eq]; tauto rw [hevent, hright, hfactor] ac_rfl
CausalSmith.Stat.NoisydoseWeakdesignTransition.error_scheduleDose_product_stratum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:73
theorem schedule_dose_error_product_stratum

The schedule, dose, and Gaussian error have the conditional product law in equation (1). Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
hoverlap :
x :
(stratumLaw P x).map (fun w => (sZ w, sA w, sSched w))
= (P.map sZ).prod (((stratumLaw P x).map sA).prod ((stratumLaw P x).map sSched))
Proof (Lean source)
-- @node: schedule_dose_error_product_stratum lemma schedule_dose_error_product_stratum (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hex : ScheduleUnconfoundedness P) (herr : ErrorIndependence P) (x : Bool) : (stratumLaw P x).map (fun w => (sZ w, sA w, sSched w)) = (P.map sZ).prod (((stratumLaw P x).map sA).prod ((stratumLaw P x).map sSched)) := by rw [error_scheduleDose_product_stratum P hoverlap herr x] have := stratumLaw_probability P hoverlap x rw [(schedule_dose_indep_stratum P hoverlap hex x).symm.map_prod_eq_prod_map_map (by fun_prop) (by fun_prop)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.schedule_dose_error_product_stratum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:104
theorem ae_stratumLaw_of_ae

An almost-everywhere assertion under the population law holds in each stratum. Under the stated condition. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
x :
p :
StructSpace S → Prop
hp :
∀ᵐ w ∂P, p w
∀ᵐ w ∂stratumLaw P x, p w
Proof (Lean source)
-- @node: ae_stratumLaw_of_ae lemma ae_stratumLaw_of_ae (P : Measure (StructSpace S)) (x : Bool) {p : StructSpace S → Prop} (hp : ∀ᵐ w ∂P, p w) : ∀ᵐ w ∂stratumLaw P x, p w := Measure.ae_smul_measure (ae_restrict_of_ae hp) _
CausalSmith.Stat.NoisydoseWeakdesignTransition.ae_stratumLaw_of_ae · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:117
theorem ae_of_ae_stratumLaw

The two positive strata suffice to recover a population almost-everywhere assertion. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
p :
StructSpace S → Prop
hp :
∀ x, ∀ᵐ w ∂stratumLaw P x, p w
∀ᵐ w ∂P, p w
Proof (Lean source)
-- @node: ae_of_ae_stratumLaw lemma ae_of_ae_stratumLaw (P : Measure (StructSpace S)) [IsProbabilityMeasure P] {p : StructSpace S → Prop} (hp : ∀ x, ∀ᵐ w ∂stratumLaw P x, p w) : ∀ᵐ w ∂P, p w := by have hrestrict (x : Bool) : ∀ᵐ w ∂P.restrict {w | sX w = x}, p w := by have hs := hp x change ∀ᵐ w ∂(P {w | sX w = x})⁻¹ • P.restrict {w | sX w = x}, p w at hs rw [ae_iff] at hs ⊢ simpa only [Measure.smul_apply, smul_eq_mul, mul_eq_zero, ENNReal.inv_eq_zero, measure_ne_top P _, false_or] using hs have hc : {w : StructSpace S | sX w = false}ᶜ = {w | sX w = true} := by ext w; cases sX w <;> simp apply ae_of_ae_restrict_of_ae_restrict_compl {w | sX w = false} (hrestrict false) simpa only [hc] using hrestrict true
CausalSmith.Stat.NoisydoseWeakdesignTransition.ae_of_ae_stratumLaw · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:124
theorem realized_potential_mem_Icc

Whole-schedule exchangeability integrates fixed-dose exceptional sets at the random dose. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
hoverlap :
hsupport :
hbounded :
∀ᵐ w ∂P, potentialOutcome E w (sA w) ∈ Icc 0 1
Proof (Lean source)
-- @node: realized_potential_mem_Icc lemma realized_potential_mem_Icc (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hex : ScheduleUnconfoundedness P) (hsupport : LatentSupport P) (hbounded : BoundedPotentialOutcomes E P) : ∀ᵐ w ∂P, potentialOutcome E w (sA w) ∈ Icc 0 1 := by let ev : ℝ × S → ℝ := fun p => E.eval p.2 (projIcc 0 1 zero_le_one p.1) have hev : Measurable ev := by first | fun_prop | exact E.measurable_eval.comp (measurable_snd.prodMk ((continuous_projIcc (h := zero_le_one)).measurable.comp measurable_fst)) apply ae_of_ae_stratumLaw P intro x let R := stratumLaw P x have : IsProbabilityMeasure R := stratumLaw_probability P hoverlap x have hA : Measurable (sA (S := S)) := by fun_prop have hS : Measurable (sSched (S := S)) := by fun_prop have hprod : R.map (fun w => (sA w, sSched w)) = (R.map sA).prod (R.map sSched) := (schedule_dose_indep_stratum P hoverlap hex x).symm.map_prod_eq_prod_map_map hA.aemeasurable hS.aemeasurable have hfixed (a : ℝ) : ∀ᵐ s ∂R.map sSched, E.eval s (projIcc 0 1 zero_le_one a) ∈ Icc 0 1 := by have hm : Measurable (fun s : S => E.eval s (projIcc 0 1 zero_le_one a)) := E.measurable_eval.comp (measurable_id.prodMk measurable_const) apply (ae_map_iff hS.aemeasurable (hm measurableSet_Icc)).mpr exact ae_stratumLaw_of_ae P x (hbounded _ (projIcc 0 1 zero_le_one a).property) have hgood : ∀ᵐ p ∂(R.map sA).prod (R.map sSched), ev p ∈ Icc 0 1 := by apply (Measure.ae_prod_iff_ae_ae (hev measurableSet_Icc)).mpr exact ae_of_all _ hfixed rw [← hprod] at hgood have hrandom : ∀ᵐ w ∂R, ev (sA w, sSched w) ∈ Icc 0 1 := (ae_map_iff (hA.prodMk hS).aemeasurable (hev measurableSet_Icc)).mp hgood filter_upwards [hrandom, ae_stratumLaw_of_ae P x hsupport] with w hw ha simpa only [ev, potentialOutcome, Set.projIcc_of_mem zero_le_one ha] using hw
CausalSmith.Stat.NoisydoseWeakdesignTransition.realized_potential_mem_Icc · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:140
theorem realized_outcome_mem_Icc

Consistency transfers the random-evaluation bound to the observed outcome. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
hoverlap :
hsupport :
hbounded :
hcons :
∀ᵐ w ∂P, sY w ∈ Icc 0 1
Proof (Lean source)
-- @node: realized_outcome_mem_Icc lemma realized_outcome_mem_Icc (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hex : ScheduleUnconfoundedness P) (hsupport : LatentSupport P) (hbounded : BoundedPotentialOutcomes E P) (hcons : DoseConsistency E P) : ∀ᵐ w ∂P, sY w ∈ Icc 0 1 := by filter_upwards [realized_potential_mem_Icc E P hoverlap hex hsupport hbounded, hcons] with w hw hc rw [hc] exact hw
CausalSmith.Stat.NoisydoseWeakdesignTransition.realized_outcome_mem_Icc · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:180
theorem realized_outcome_integrable

The derived observed-outcome bound supplies integrability without an extra premise. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
hoverlap :
hsupport :
hbounded :
hcons :
Proof (Lean source)
-- @node: realized_outcome_integrable lemma realized_outcome_integrable (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hex : ScheduleUnconfoundedness P) (hsupport : LatentSupport P) (hbounded : BoundedPotentialOutcomes E P) (hcons : DoseConsistency E P) : Integrable sY P := by apply Integrable.of_bound (show Measurable (sY (S := S)) by fun_prop).aestronglyMeasurable 1 filter_upwards [realized_outcome_mem_Icc E P hoverlap hex hsupport hbounded hcons] with w hw simpa only [Real.norm_eq_abs, abs_of_nonneg hw.1] using hw.2
CausalSmith.Stat.NoisydoseWeakdesignTransition.realized_outcome_integrable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleFactorization.lean:192
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.ScheduleMeasurability 2 declarations Joint evaluation supplies a countable separating family for the public schedule space.

Joint evaluation supplies a countable separating family for the public schedule space.

theorem schedule_product_countable_sections Lemma schedule_product_countable_sections in the paper ↗

A measurable product event depends on countably many measurable first-coordinate sets. Under the stated conditions. This is the stated conclusion.

Formal statement
B :
Set (S × D)
hB :
∃ C : Set (Set S),
C.Countable
conclusion 1
c ∈ C :
conclusion 2
s t :
(∀ c ∈ C, s ∈ c ↔ t ∈ c)
a :
(s, a) ∈ B ↔ (t, a) ∈ B
Proof (Lean source)
-- @node: schedule_product_countable_sections lemma schedule_product_countable_sections {S D : Type*} [MeasurableSpace S] [MeasurableSpace D] (B : Set (S × D)) (hB : MeasurableSet B) : ∃ C : Set (Set S), C.Countable ∧ (∀ c ∈ C, MeasurableSet c) ∧ ∀ s t, (∀ c ∈ C, s ∈ c ↔ t ∈ c) → ∀ a, (s, a) ∈ B ↔ (t, a) ∈ B := by rw [← generateFrom_prod] at hB induction B, hB using MeasurableSpace.generateFrom_induction with | hC B hB hmeas => obtain ⟨c, hc, d, hd, rfl⟩ := hB refine ⟨{c}, countable_singleton c, ?_, ?_⟩ · intro b hb simpa only [mem_singleton_iff.mp hb, mem_ofPred_eq] using hc · intro s t h a exact and_congr (h c (mem_singleton c)) Iff.rfl | empty => exact ⟨∅, countable_empty, by simp, by simp⟩ | compl B hB ih => obtain ⟨C, hC, hm, hs⟩ := ih exact ⟨C, hC, hm, fun s t h a => not_congr (hs s t h a)⟩ | iUnion B hB ih => choose C hC hm hs using ih refine ⟨⋃ n, C n, countable_iUnion hC, ?_, ?_⟩ · intro c hc obtain ⟨n, hn⟩ := mem_iUnion.mp hc exact hm n c hn · intro s t h a simp only [mem_iUnion] exact exists_congr fun n => hs n s t (fun c hc => h c (mem_iUnion.mpr ⟨n, hc⟩)) a
CausalSmith.Stat.NoisydoseWeakdesignTransition.schedule_product_countable_sections · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleMeasurability.lean:12
theorem pathSpace_countablySeparated

Jointly measurable, extensional evaluation supplies countable separation of schedules. This is the stated conclusion.

Formal statement
S :
E :
Proof (Lean source)
-- @node: pathSpace_countablySeparated lemma pathSpace_countablySeparated {S : Type*} [MeasurableSpace S] (E : PathSpace S) : CountablySeparated S := by classical have hq (q : ℚ) : MeasurableSet {p : S × Dose | E.eval p.1 p.2 < (q : ℝ)} := measurableSet_lt E.measurable_eval measurable_const choose C hC hm hs using fun q : ℚ => schedule_product_countable_sections _ (hq q) refine ⟨⟨⋃ q, C q, countable_iUnion hC, ?_, ?_⟩⟩ · intro c hc obtain ⟨q, hq⟩ := mem_iUnion.mp hc exact hm q c hq · intro s _ t _ h apply E.eval_injective funext a have he (q : ℚ) : E.eval s a < (q : ℝ) ↔ E.eval t a < (q : ℝ) := hs q s t (fun c hc => h c (mem_iUnion.mpr ⟨q, hc⟩)) a apply le_antisymm · by_contra hn obtain ⟨q, htq, hqs⟩ := exists_rat_btwn (lt_of_not_ge hn) exact (not_lt_of_ge hqs.le) ((he q).mpr htq) · by_contra hn obtain ⟨q, hsq, hqt⟩ := exists_rat_btwn (lt_of_not_ge hn) exact (not_lt_of_ge hqt.le) ((he q).mp hsq)
CausalSmith.Stat.NoisydoseWeakdesignTransition.pathSpace_countablySeparated · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ScheduleMeasurability.lean:43
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.TransitionWindows 9 declarations Scale comparisons throughout fixed-factor windows about either transition.

Scale comparisons throughout fixed-factor windows about either transition.

Multiplying a positive localization radius by at most K adds at most d log K to the logarithmic denominator. Under the stated conditions. This is the stated conclusion.

Formal statement
K d w a b :
ℝ
hK :
1 ≤ K
hd :
0 ≤ d
hw :
0 ≤ w
ha :
0 < a
hb :
0 < b
hab :
a ≤ K*b
log (exp 1 + w*a^d) ≤ d * log K + log (exp 1 + w*b^d)
Proof (Lean source)
-- @node: window_log_power_le lemma window_log_power_le (K d w a b : ℝ) (hK : 1 ≤ K) (hd : 0 ≤ d) (hw : 0 ≤ w) (ha : 0 < a) (hb : 0 < b) (hab : a ≤ K*b) : log (exp 1 + w*a^d) ≤ d * log K + log (exp 1 + w*b^d) := by exact window_log_power_le K d w a b hK hd hw ha hb hab
CausalSmith.Stat.NoisydoseWeakdesignTransition.window_log_power_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/TransitionWindows.lean:14
theorem window_log_power_comparison Lemma window_log_power_comparison in the paper ↗

Throughout a factor-K window the positive logarithms differ by a bounded factor. Under the stated conditions. This is the stated conclusion.

Formal statement
K d w a b :
ℝ
hK :
1 ≤ K
hd :
0 ≤ d
hw :
0 ≤ w
ha :
0 < a
hb :
0 < b
hab :
a ≤ K*b
hba :
b ≤ K*a
log (exp 1 + w*a^d) ≤ (1+d*log K) * log (exp 1 + w*b^d)
Proof (Lean source)
-- @node: window_log_power_comparison lemma window_log_power_comparison (K d w a b : ℝ) (hK : 1 ≤ K) (hd : 0 ≤ d) (hw : 0 ≤ w) (ha : 0 < a) (hb : 0 < b) (hab : a ≤ K*b) (hba : b ≤ K*a) : log (exp 1 + w*a^d) ≤ (1+d*log K) * log (exp 1 + w*b^d) := by have _hba := hba exact window_log_power_comparison K d w a b hK hd hw ha hb hab
CausalSmith.Stat.NoisydoseWeakdesignTransition.window_log_power_comparison · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/TransitionWindows.lean:23
theorem window_sqrt_log_comparison Lemma window_sqrt_log_comparison in the paper ↗

Square roots inherit the same (slightly enlarged) logarithmic factor. Under the stated conditions. This is the stated conclusion.

Formal statement
K d w a b :
ℝ
hK :
1 ≤ K
hd :
0 ≤ d
hw :
0 ≤ w
ha :
0 < a
hb :
0 < b
hab :
a ≤ K*b
hba :
b ≤ K*a
sqrt (log (exp 1 + w*a^d))
≤ (1+d*log K) * sqrt (log (exp 1 + w*b^d))
Proof (Lean source)
-- @node: window_sqrt_log_comparison lemma window_sqrt_log_comparison (K d w a b : ℝ) (hK : 1 ≤ K) (hd : 0 ≤ d) (hw : 0 ≤ w) (ha : 0 < a) (hb : 0 < b) (hab : a ≤ K*b) (hba : b ≤ K*a) : sqrt (log (exp 1 + w*a^d)) ≤ (1+d*log K) * sqrt (log (exp 1 + w*b^d)) := by have _hba := hba exact window_sqrt_log_comparison K d w a b hK hd hw ha hb hab
CausalSmith.Stat.NoisydoseWeakdesignTransition.window_sqrt_log_comparison · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/TransitionWindows.lean:33
theorem fourierScale_window_comparison

The Fourier scale varies by a fixed multiplicative factor throughout a radius window. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa K b sigma :
ℝ
n :
ℕ
hK :
1 ≤ K
hd :
0 ≤ effDim beta kappa
hb :
0 < b
hs :
sigma ∈ Icc (b/K) (K*b)
conclusion 1
fourierScale beta kappa sigma n
≤ (K*(1+effDim beta kappa*log K)) * fourierScale beta kappa b n
conclusion 2
fourierScale beta kappa b n
≤ (K*(1+effDim beta kappa*log K)) * fourierScale beta kappa sigma n
Proof (Lean source)
-- @node: fourierScale_window_comparison lemma fourierScale_window_comparison (beta kappa K b sigma : ℝ) (n : ℕ) (hK : 1 ≤ K) (hd : 0 ≤ effDim beta kappa) (hb : 0 < b) (hs : sigma ∈ Icc (b/K) (K*b)) : fourierScale beta kappa sigma n ≤ (K*(1+effDim beta kappa*log K)) * fourierScale beta kappa b n ∧ fourierScale beta kappa b n ≤ (K*(1+effDim beta kappa*log K)) * fourierScale beta kappa sigma n := by have hKpos : 0 < K := lt_of_lt_of_le zero_lt_one hK have hspos : 0 < sigma := (div_pos hb hKpos).trans_le hs.1 have hbs : b ≤ K*sigma := by have := (div_le_iff₀ hKpos).mp hs.1 linarith have rootpos (a : ℝ) (ha : 0 < a) : 0 < sqrt (log (exp 1 + (n:ℝ)*a^effDim beta kappa)) := by apply Real.sqrt_pos.mpr apply Real.log_pos have he : 1 < exp 1 := Real.one_lt_exp_iff.mpr (by norm_num) have : 0 ≤ (n:ℝ)*a^effDim beta kappa := by positivity linarith have hrs := rootpos sigma hspos have hrb := rootpos b hb have hsb := window_sqrt_log_comparison K (effDim beta kappa) n sigma b hK hd (Nat.cast_nonneg n) hspos hb hs.2 hbs have hbs' := window_sqrt_log_comparison K (effDim beta kappa) n b sigma hK hd (Nat.cast_nonneg n) hb hspos hbs hs.2 have hc : 0 ≤ 1+effDim beta kappa*log K := by have := mul_nonneg hd (Real.log_nonneg hK) linarith unfold fourierScale simp only [← mul_div_assoc] constructor · apply (div_le_div_iff₀ hrs hrb).mpr nlinarith [mul_le_mul_of_nonneg_left hbs' (mul_nonneg hKpos.le hb.le), mul_le_mul_of_nonneg_right hs.2 hrb.le] · apply (div_le_div_iff₀ hrb hrs).mpr nlinarith [mul_le_mul_of_nonneg_left hsb (mul_nonneg hKpos.le hspos.le), mul_le_mul_of_nonneg_right hbs hrs.le]
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourierScale_window_comparison · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/TransitionWindows.lean:43
theorem polynomialScale_window_comparison

The polynomial scale also varies by a fixed factor in a radius window. Under the stated conditions. This is the stated conclusion.

Formal statement
K b sigma :
ℝ
n :
ℕ
hK :
1 ≤ K
hb :
0 < b
hn :
1 ≤ n
hs :
sigma ∈ Icc (b/K) (K*b)
conclusion 1
polynomialScale sigma n ≤ (1+2*log K) * polynomialScale b n
conclusion 2
polynomialScale b n ≤ (1+2*log K) * polynomialScale sigma n
Proof (Lean source)
-- @node: polynomialScale_window_comparison lemma polynomialScale_window_comparison (K b sigma : ℝ) (n : ℕ) (hK : 1 ≤ K) (hb : 0 < b) (hn : 1 ≤ n) (hs : sigma ∈ Icc (b/K) (K*b)) : polynomialScale sigma n ≤ (1+2*log K) * polynomialScale b n ∧ polynomialScale b n ≤ (1+2*log K) * polynomialScale sigma n := by have hKpos : 0 < K := lt_of_lt_of_le zero_lt_one hK have hspos : 0 < sigma := (div_pos hb hKpos).trans_le hs.1 have hbs : b ≤ K*sigma := by have := (div_le_iff₀ hKpos).mp hs.1 linarith have hL : 0 < logScale n := lt_of_lt_of_le zero_lt_one (logScale_one_le n hn) have hsb := window_log_power_comparison K 2 (logScale n) sigma b hK (by norm_num) hL.le hspos hb hs.2 hbs have hbs' := window_log_power_comparison K 2 (logScale n) b sigma hK (by norm_num) hL.le hb hspos hbs hs.2 simp only [Real.rpow_two, mul_comm (logScale n)] at hsb hbs' unfold polynomialScale constructor · rw [← mul_div_assoc] exact div_le_div_of_nonneg_right (by nlinarith [hsb]) hL.le · rw [← mul_div_assoc] exact div_le_div_of_nonneg_right (by nlinarith [hbs']) hL.le
CausalSmith.Stat.NoisydoseWeakdesignTransition.polynomialScale_window_comparison · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/TransitionWindows.lean:83
theorem directScale_effective_sample

At the direct elbow, the effective noisy sample size is exactly one. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
hd :
effDim beta kappa ≠ 0
hn :
1 ≤ n
(n : ℝ) * directScale beta kappa n ^ effDim beta kappa = 1
Proof (Lean source)
-- @node: directScale_effective_sample lemma directScale_effective_sample (beta kappa : ℝ) (n : ℕ) (hd : effDim beta kappa ≠ 0) (hn : 1 ≤ n) : (n : ℝ) * directScale beta kappa n ^ effDim beta kappa = 1 := by have hnpos : (0 : ℝ) < n := by exact_mod_cast (show 0 < n by omega) unfold directScale rw [← Real.rpow_mul hnpos.le] have he : (-1 / effDim beta kappa) * effDim beta kappa = -1 := by field_simp rw [he, Real.rpow_neg_one, mul_inv_cancel₀ hnpos.ne']
CausalSmith.Stat.NoisydoseWeakdesignTransition.directScale_effective_sample · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/TransitionWindows.lean:108
theorem fourierScale_at_directScale

The Fourier scale at the direct elbow differs by a fixed public constant. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
hd :
effDim beta kappa ≠ 0
hn :
1 ≤ n
fourierScale beta kappa (directScale beta kappa n) n
= directScale beta kappa n / sqrt (log (exp 1 + 1))
Proof (Lean source)
-- @node: fourierScale_at_directScale lemma fourierScale_at_directScale (beta kappa : ℝ) (n : ℕ) (hd : effDim beta kappa ≠ 0) (hn : 1 ≤ n) : fourierScale beta kappa (directScale beta kappa n) n = directScale beta kappa n / sqrt (log (exp 1 + 1)) := by unfold fourierScale rw [directScale_effective_sample beta kappa n hd hn]
CausalSmith.Stat.NoisydoseWeakdesignTransition.fourierScale_at_directScale · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/TransitionWindows.lean:120
theorem direct_fourier_elbow_comparison

A constant dominating the two fixed ratios compares both scales at the first elbow. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa C :
ℝ
n :
ℕ
hd :
effDim beta kappa ≠ 0
hn :
1 ≤ n
hC :
sqrt (log (exp 1 + 1)) ≤ C
hCinv :
1 / sqrt (log (exp 1 + 1)) ≤ C
conclusion 1
directScale beta kappa n ≤ C * fourierScale beta kappa (directScale beta kappa n) n
conclusion 2
fourierScale beta kappa (directScale beta kappa n) n ≤ C * directScale beta kappa n
Proof (Lean source)
-- @node: direct_fourier_elbow_comparison lemma direct_fourier_elbow_comparison (beta kappa C : ℝ) (n : ℕ) (hd : effDim beta kappa ≠ 0) (hn : 1 ≤ n) (hC : sqrt (log (exp 1 + 1)) ≤ C) (hCinv : 1 / sqrt (log (exp 1 + 1)) ≤ C) : directScale beta kappa n ≤ C * fourierScale beta kappa (directScale beta kappa n) n ∧ fourierScale beta kappa (directScale beta kappa n) n ≤ C * directScale beta kappa n := by have hroot : 0 < sqrt (log (exp 1 + 1)) := by apply Real.sqrt_pos.mpr apply Real.log_pos linarith [Real.exp_pos (1 : ℝ)] have hb : 0 ≤ directScale beta kappa n := Real.rpow_nonneg (Nat.cast_nonneg n) _ rw [fourierScale_at_directScale beta kappa n hd hn] constructor · rw [← mul_div_assoc] apply (le_div_iff₀ hroot).mpr exact (mul_le_mul_of_nonneg_left hC hb).trans_eq (mul_comm _ _) · calc directScale beta kappa n / sqrt (log (exp 1 + 1)) = (1 / sqrt (log (exp 1 + 1))) * directScale beta kappa n := by ring _ ≤ C * directScale beta kappa n := mul_le_mul_of_nonneg_right hCinv hb
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_fourier_elbow_comparison · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/TransitionWindows.lean:129
theorem frontier_transition_windows

One constant and sample threshold compare the two scales on both full transition windows. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
hd :
0 < effDim beta kappa
K :
ℝ
hK :
1 ≤ K
∃ CK : ℝ,
conclusion 1
1 ≤ CK
conclusion 2
∃ nK : ℕ,
∀ n ≥ nK,
0 < directScale beta kappa n / K ∧
K * directScale beta kappa n ≤ 1/4 ∧
0 < (logScale n)^(-1/2 : ℝ) / K ∧
K * (logScale n)^(-1/2 : ℝ) ≤ 1/4 ∧
(∀ sigma ∈ Icc (directScale beta kappa n / K) (K * directScale beta kappa n), CK⁻¹ * directScale beta kappa n ≤ fourierScale beta kappa sigma n ∧ fourierScale beta kappa sigma n ≤ CK * directScale beta kappa n) ∧
(∀ sigma ∈ Icc ((logScale n)^(-1/2 : ℝ) / K) (K * (logScale n)^(-1/2 : ℝ)), CK⁻¹ * polynomialScale sigma n ≤ fourierScale beta kappa sigma n ∧ fourierScale beta kappa sigma n ≤ CK * polynomialScale sigma n)
Proof (Lean source)
-- @node: frontier_transition_windows lemma frontier_transition_windows (beta kappa : ℝ) (hd : 0 < effDim beta kappa) (K : ℝ) (hK : 1 ≤ K) : ∃ CK : ℝ, 1 ≤ CK ∧ ∃ nK : ℕ, ∀ n ≥ nK, 0 < directScale beta kappa n / K ∧ K * directScale beta kappa n ≤ 1/4 ∧ 0 < (logScale n)^(-1/2 : ℝ) / K ∧ K * (logScale n)^(-1/2 : ℝ) ≤ 1/4 ∧ (∀ sigma ∈ Icc (directScale beta kappa n / K) (K * directScale beta kappa n), CK⁻¹ * directScale beta kappa n ≤ fourierScale beta kappa sigma n ∧ fourierScale beta kappa sigma n ≤ CK * directScale beta kappa n) ∧ (∀ sigma ∈ Icc ((logScale n)^(-1/2 : ℝ) / K) (K * (logScale n)^(-1/2 : ℝ)), CK⁻¹ * polynomialScale sigma n ≤ fourierScale beta kappa sigma n ∧ fourierScale beta kappa sigma n ≤ CK * polynomialScale sigma n) := by have hKpos : 0 < K := lt_of_lt_of_le zero_lt_one hK let A := K * (1 + effDim beta kappa * log K) let B := 1 + 2 * log K let E := max (sqrt (log (exp 1 + 1))) (1 / sqrt (log (exp 1 + 1))) have hA : 0 ≤ A := by dsimp [A] have := mul_nonneg hd.le (Real.log_nonneg hK) positivity have hB : 0 ≤ B := by dsimp [B] have := Real.log_nonneg hK positivity obtain ⟨CE, hCE, nE, hsecond⟩ := secondElbow_comparison beta kappa hd.le let CK := max 1 (max (A*E) (A*CE*B)) have hCK1 : 1 ≤ CK := le_max_left _ _ have hCK : 0 < CK := zero_lt_one.trans_le hCK1 have hC1 : A*E ≤ CK := (le_max_left _ _).trans (le_max_right _ _) have hC2 : A*CE*B ≤ CK := (le_max_right _ _).trans (le_max_right _ _) have hD : Tendsto (fun n : ℕ => directScale beta kappa n) atTop (𝓝 0) := by simpa only [directScale, neg_div, Function.comp_def] using (tendsto_rpow_neg_atTop (one_div_pos.mpr hd)).comp tendsto_natCast_atTop_atTop have hL : Tendsto (fun n : ℕ => (logScale n)^(-1/2 : ℝ)) atTop (𝓝 0) := by convert (tendsto_rpow_neg_atTop (by norm_num : (0 : ℝ) < 1/2)).comp logScale_tendsto_atTop using 1 <;> norm_num [Function.comp_def] have hDK : Tendsto (fun n : ℕ => K * directScale beta kappa n) atTop (𝓝 0) := by simpa only [mul_zero] using hD.const_mul K have hLK : Tendsto (fun n : ℕ => K * (logScale n)^(-1/2 : ℝ)) atTop (𝓝 0) := by simpa only [mul_zero] using hL.const_mul K obtain ⟨nW, hnW⟩ := eventually_atTop.1 ((hDK.eventually (gt_mem_nhds (by norm_num : (0:ℝ) < 1/4))).and (hLK.eventually (gt_mem_nhds (by norm_num : (0:ℝ) < 1/4)))) refine ⟨CK, hCK1, max 1 (max nW nE), ?_⟩ intro n hn have hn1 : 1 ≤ n := (le_max_left _ _).trans hn have hnWE := (le_max_right 1 (max nW nE)).trans hn have hnW' := (le_max_left nW nE).trans hnWE have hnE := (le_max_right nW nE).trans hnWE have hnpos : (0:ℝ) < n := by exact_mod_cast (show 0 < n by omega) have hDpos : 0 < directScale beta kappa n := Real.rpow_pos_of_pos hnpos _ have hLpos : 0 < logScale n := zero_lt_one.trans_le (logScale_one_le n hn1) have hbpos : 0 < (logScale n)^(-1/2 : ℝ) := Real.rpow_pos_of_pos hLpos _ obtain ⟨hwD, hwL⟩ := hnW n hnW' refine ⟨div_pos hDpos hKpos, hwD.le, div_pos hbpos hKpos, hwL.le, ?_, ?_⟩ · intro sigma hs obtain ⟨hsD, hDs⟩ := fourierScale_window_comparison beta kappa K (directScale beta kappa n) sigma n hK hd.le hDpos hs change fourierScale beta kappa sigma n ≤ A * _ at hsD change fourierScale beta kappa (directScale beta kappa n) n ≤ A * _ at hDs obtain ⟨hDF, hFD⟩ := direct_fourier_elbow_comparison beta kappa E n hd.ne' hn1 (le_max_left _ _) (le_max_right _ _) have hspos : 0 < sigma := (div_pos hDpos hKpos).trans_le hs.1 have hFpos : 0 ≤ fourierScale beta kappa sigma n := div_nonneg hspos.le (Real.sqrt_nonneg _) constructor · rw [inv_mul_eq_div] apply (div_le_iff₀ hCK).mpr calc directScale beta kappa n ≤ E * fourierScale beta kappa (directScale beta kappa n) n := hDF _ ≤ E * (A * fourierScale beta kappa sigma n) := mul_le_mul_of_nonneg_left hDs (by dsimp [E]; positivity) _ = (A*E) * fourierScale beta kappa sigma n := by ring _ ≤ CK * fourierScale beta kappa sigma n := mul_le_mul_of_nonneg_right hC1 hFpos _ = _ := mul_comm _ _ · calc fourierScale beta kappa sigma n ≤ A * fourierScale beta kappa (directScale beta kappa n) n := hsD _ ≤ A * (E * directScale beta kappa n) := mul_le_mul_of_nonneg_left hFD hA _ = (A*E) * directScale beta kappa n := by ring _ ≤ CK * directScale beta kappa n := mul_le_mul_of_nonneg_right hC1 hDpos.le · intro sigma hs obtain ⟨hsF, hFs⟩ := fourierScale_window_comparison beta kappa K ((logScale n)^(-1/2 : ℝ)) sigma n hK hd.le hbpos hs obtain ⟨hsP, hPs⟩ := polynomialScale_window_comparison K ((logScale n)^(-1/2 : ℝ)) sigma n hK hbpos hn1 hs change fourierScale beta kappa sigma n ≤ A * _ at hsF change fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n ≤ A * _ at hFs change polynomialScale sigma n ≤ B * _ at hsP change polynomialScale ((logScale n)^(-1/2 : ℝ)) n ≤ B * _ at hPs obtain ⟨hFP, hPF⟩ := hsecond n hnE have hspos : 0 < sigma := (div_pos hbpos hKpos).trans_le hs.1 have hFpos : 0 ≤ fourierScale beta kappa sigma n := div_nonneg hspos.le (Real.sqrt_nonneg _) have hPpos : 0 ≤ polynomialScale sigma n := by apply div_nonneg _ hLpos.le apply Real.log_nonneg have := Real.one_le_exp (by norm_num : (0:ℝ) ≤ 1) have : 0 ≤ sigma^2 * logScale n := by positivity linarith constructor · rw [inv_mul_eq_div] apply (div_le_iff₀ hCK).mpr calc polynomialScale sigma n ≤ B * polynomialScale ((logScale n)^(-1/2 : ℝ)) n := hsP _ ≤ B * (CE * fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n) := mul_le_mul_of_nonneg_left hPF hB _ ≤ B * (CE * (A * fourierScale beta kappa sigma n)) := mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hFs hCE.le) hB _ = (A*CE*B) * fourierScale beta kappa sigma n := by ring _ ≤ CK * fourierScale beta kappa sigma n := mul_le_mul_of_nonneg_right hC2 hFpos _ = _ := mul_comm _ _ · calc fourierScale beta kappa sigma n ≤ A * fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n := hsF _ ≤ A * (CE * polynomialScale ((logScale n)^(-1/2 : ℝ)) n) := mul_le_mul_of_nonneg_left hFP hA _ ≤ A * (CE * (B * polynomialScale sigma n)) := mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_left hPs hCE.le) hA _ = (A*CE*B) * polynomialScale sigma n := by ring _ ≤ CK * polynomialScale sigma n := mul_le_mul_of_nonneg_right hC2 hPpos
CausalSmith.Stat.NoisydoseWeakdesignTransition.frontier_transition_windows · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/TransitionWindows.lean:152
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.Helpers.ZeroNoiseObserved 9 declarations The zero-noise observed Bernoulli likelihood and its quadratic energy.

The zero-noise observed Bernoulli likelihood and its quadratic energy.

At zero noise the observed dose directly indexes the Bernoulli likelihood.

Definition (Lean source)
o :
Obs
zeroNoiseLikelihood mu o :
ℝ
if o.2.2
= 1 then 2*(mu (projIcc 0 1 zero_le_one o.2.1) : ℝ) else 2*(1-(mu (projIcc 0 1 zero_le_one o.2.1) : ℝ))
CausalSmith.Stat.NoisydoseWeakdesignTransition.zeroNoiseLikelihood · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ZeroNoiseObserved.lean:13
theorem zeroNoiseLikelihood_measurable

The zero-noise likelihood is measurable. This is the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: zeroNoiseLikelihood_measurable @[fun_prop] lemma zeroNoiseLikelihood_measurable (mu : ThresholdProfile) : Measurable (zeroNoiseLikelihood mu) := by unfold zeroNoiseLikelihood apply Measurable.ite (measurableSet_eq_fun (by fun_prop) measurable_const) all_goals fun_prop
CausalSmith.Stat.NoisydoseWeakdesignTransition.zeroNoiseLikelihood_measurable · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ZeroNoiseObserved.lean:19
theorem zeroNoiseLikelihood_nonneg

The zero-noise likelihood is nonnegative on the full observed space. This is the stated conclusion.

Formal statement
o :
Obs
Proof (Lean source)
-- @node: zeroNoiseLikelihood_nonneg lemma zeroNoiseLikelihood_nonneg (mu : ThresholdProfile) (o : Obs) : 0 ≤ zeroNoiseLikelihood mu o := by unfold zeroNoiseLikelihood split_ifs · exact mul_nonneg (by norm_num) (mu _).property.1 · exact mul_nonneg (by norm_num) (sub_nonneg.mpr (mu _).property.2)
CausalSmith.Stat.NoisydoseWeakdesignTransition.zeroNoiseLikelihood_nonneg · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ZeroNoiseObserved.lean:27
theorem obsLaw_zero_witness_withDensity

The exact zero-noise observed law is a likelihood tilt of the half-success reference. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hk :
0 ≤ kappa
obsLaw 0 (lowerWitnessLaw E kappa mu)
= (obsLaw 0 (lowerWitnessLaw E kappa referenceProfile)).withDensity (fun o => ofReal (zeroNoiseLikelihood mu o))
Proof (Lean source)
-- @node: obsLaw_zero_witness_withDensity lemma obsLaw_zero_witness_withDensity (E : PathSpace S) (kappa : ℝ) (hk : 0 ≤ kappa) (mu : ThresholdProfile) : obsLaw 0 (lowerWitnessLaw E kappa mu) = (obsLaw 0 (lowerWitnessLaw E kappa referenceProfile)).withDensity (fun o => ofReal (zeroNoiseLikelihood mu o)) := by apply Measure.ext_of_lintegral intro f hf rw [lintegral_withDensity_eq_lintegral_mul _ (zeroNoiseLikelihood_measurable mu).ennreal_ofReal hf, obsLaw_witness_lintegral E kappa 0 hk mu f hf, obsLaw_witness_lintegral E kappa 0 hk referenceProfile _ ((zeroNoiseLikelihood_measurable mu).ennreal_ofReal.mul hf)] apply lintegral_congr; intro x apply lintegral_congr; intro a apply lintegral_congr; intro z simp only [Pi.mul_apply, zero_mul, add_zero, zeroNoiseLikelihood, Set.projIcc_of_mem zero_le_one a.property, if_pos rfl, show (0 : ℝ) ≠ 1 by norm_num, if_false, referenceProfile, ContinuousMap.const_apply] norm_num only [projIcc, max_eq_right, min_eq_right, ENNReal.ofReal_mul, ENNReal.ofReal_ofNat] rw [← mul_assoc, ← mul_assoc] norm_num [ENNReal.ofReal_div_of_pos] simp [← mul_assoc, ENNReal.inv_mul_cancel]
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_zero_witness_withDensity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ZeroNoiseObserved.lean:36
theorem obsLaw_zero_witness_rnDeriv_toReal

Radon--Nikodym uniqueness identifies the zero-noise observed likelihood. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
(fun o => ((obsLaw 0 (lowerWitnessLaw E kappa mu)).rnDeriv (obsLaw 0 (lowerWitnessLaw E kappa referenceProfile)) o).toReal)
Proof (Lean source)
-- @node: obsLaw_zero_witness_rnDeriv_toReal lemma obsLaw_zero_witness_rnDeriv_toReal (E : PathSpace S) (kappa : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (mu : ThresholdProfile) : (fun o => ((obsLaw 0 (lowerWitnessLaw E kappa mu)).rnDeriv (obsLaw 0 (lowerWitnessLaw E kappa referenceProfile)) o).toReal) =ᵐ[ obsLaw 0 (lowerWitnessLaw E kappa referenceProfile)] zeroNoiseLikelihood mu := by letI := lowerWitnessLaw_probability E kappa hk referenceProfile have hobs : Measurable (obsMap (S := S) 0) := by unfold obsMap contaminatedDose; fun_prop letI : IsProbabilityMeasure (obsLaw 0 (lowerWitnessLaw E kappa referenceProfile)) := Measure.isProbabilityMeasure_map hobs.aemeasurable rw [obsLaw_zero_witness_withDensity E kappa hk.1 mu] filter_upwards [Measure.rnDeriv_withDensity (obsLaw 0 (lowerWitnessLaw E kappa referenceProfile)) (zeroNoiseLikelihood_measurable mu).ennreal_ofReal] with o ho rw [ho, ENNReal.toReal_ofReal (zeroNoiseLikelihood_nonneg mu o)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.obsLaw_zero_witness_rnDeriv_toReal · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ZeroNoiseObserved.lean:62
theorem observed_zero_marked_chiSq_identity

The zero-noise version of (12) is exactly the latent quadratic energy, evaluated in the observed experiment. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
kappa :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
delta :
ℝ → ℝ
hd :
hf :
∀ a : Dose, (mu a : ℝ) = 1/2 + delta ((a : ℝ)-a0)
chiSqDiv (obsLaw 0 (lowerWitnessLaw E kappa mu)) (obsLaw 0 (lowerWitnessLaw E kappa referenceProfile))
= 4 * ∫ t, witnessDesignDensity kappa t * (delta t)^2
Proof (Lean source)
-- @node: observed_zero_marked_chiSq_identity lemma observed_zero_marked_chiSq_identity (E : PathSpace S) (kappa : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (mu : ThresholdProfile) (delta : ℝ → ℝ) (hd : Continuous delta) (hf : ∀ a : Dose, (mu a : ℝ) = 1/2 + delta ((a : ℝ)-a0)) : chiSqDiv (obsLaw 0 (lowerWitnessLaw E kappa mu)) (obsLaw 0 (lowerWitnessLaw E kappa referenceProfile)) = 4 * ∫ t, witnessDesignDensity kappa t * (delta t)^2 := by let R := obsLaw 0 (lowerWitnessLaw E kappa referenceProfile) let D := doseVolume.withDensity (fun a : Dose => ofReal (witnessDesignDensity kappa ((a : ℝ)-a0))) let f := zeroNoiseLikelihood mu have hm : Measurable (fun o => (f o-1)^2) := by dsimp [f]; fun_prop have hi : Integrable (fun t => witnessDesignDensity kappa t * (delta t)^2) := witnessDesignDensity_mul_continuous_integrable kappa hk.1 _ (hd.pow 2) have hchi : chiSqDiv (obsLaw 0 (lowerWitnessLaw E kappa mu)) R = ∫ o, (f o-1)^2 ∂ R := by apply integral_congr_ae filter_upwards [obsLaw_zero_witness_rnDeriv_toReal E kappa hk mu] with o ho rw [ho] have hmarks (x : Bool) (a : Dose) : (f (x,(a : ℝ),1)-1)^2 = 4*(delta ((a : ℝ)-a0))^2 ∧ (f (x,(a : ℝ),0)-1)^2 = 4*(delta ((a : ℝ)-a0))^2 := by dsimp [f, zeroNoiseLikelihood] simp only [if_pos rfl, show (0 : ℝ) ≠ 1 by norm_num, if_false, Set.projIcc_of_mem zero_le_one a.property, hf a, ite_true, ite_false] constructor <;> ring have hlin : (∫⁻ o, ofReal ((f o-1)^2) ∂ R) = ∫⁻ t, ofReal (4*(witnessDesignDensity kappa t*(delta t)^2)) := by rw [obsLaw_witness_lintegral E kappa 0 hk.1 referenceProfile _ hm.ennreal_ofReal] have he (x : Bool) (a : Dose) (z : ℝ) : ofReal (referenceProfile a : ℝ) * ofReal ((f (x,(a : ℝ)+0*z,1)-1)^2) + ofReal (1-(referenceProfile a : ℝ)) * ofReal ((f (x,(a : ℝ)+0*z,0)-1)^2) = ofReal (4*(delta ((a : ℝ)-a0))^2) := by simp only [zero_mul, add_zero, (hmarks x a).1, (hmarks x a).2, referenceProfile, ContinuousMap.const_apply] norm_num [projIcc, ← add_mul, ENNReal.ofReal_div_of_pos] rw [ENNReal.inv_two_add_inv_two, one_mul] simp_rw [he] simp only [lintegral_const, measure_univ, mul_one] simp only [Measure.add_apply, Measure.smul_apply, Measure.dirac_apply_of_mem (mem_univ _), smul_eq_mul, mul_one, ENNReal.inv_two_add_inv_two] simp only [one_div, ENNReal.inv_two_add_inv_two, mul_one] have hmap := witnessDose_map_centered kappa hk.1 have htransport := lintegral_map (show Measurable (fun t => ofReal (4*(delta t)^2)) by fun_prop) (show Measurable (fun a : Dose => (a : ℝ)-a0) by fun_prop) (μ := D) rw [hmap] at htransport rw [← htransport, lintegral_withDensity_eq_lintegral_mul _ (by have hk0 := hk.1; fun_prop) (by fun_prop)] rw [← lintegral_indicator measurableSet_Icc] apply lintegral_congr; intro t by_cases ht : t ∈ Icc (-1/2 : ℝ) (1/2) · rw [indicator_of_mem ht] simp only [Pi.mul_apply] rw [← ENNReal.ofReal_mul (witnessDesignDensity_nonneg kappa t hk.1)] congr 1 ring · rw [indicator_of_notMem ht] rw [witnessDesignDensity, if_neg ht] simp rw [hchi, integral_eq_lintegral_of_nonneg_ae (ae_of_all _ (fun o => sq_nonneg (f o-1))) hm.aestronglyMeasurable, hlin, ← ofReal_integral_eq_lintegral_ofReal (hi.const_mul 4) (ae_of_all _ (fun t => mul_nonneg (by norm_num) (mul_nonneg (witnessDesignDensity_nonneg kappa t hk.1) (sq_nonneg _)))), ENNReal.toReal_ofReal (integral_nonneg (fun t => mul_nonneg (by norm_num) (mul_nonneg (witnessDesignDensity_nonneg kappa t hk.1) (sq_nonneg _)))), integral_const_mul]
CausalSmith.Stat.NoisydoseWeakdesignTransition.observed_zero_marked_chiSq_identity · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ZeroNoiseObserved.lean:80
theorem direct_profile_pair_observed_energy_bound_nonneg_noise

Equation (18) holds for the observed direct profiles uniformly down to zero noise. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma epsilon h :
ℝ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Icc (0 : ℝ) (1/4)
he :
0 ≤ epsilon
hh :
0 < h
muPlus muMinus :
hrange :
∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)
hformula :
∀ a : Dose,
(muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∧
(muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0)
conclusion 1
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (8*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1)
conclusion 2
chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (8*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1)
Proof (Lean source)
-- @node: direct_profile_pair_observed_energy_bound_nonneg_noise lemma direct_profile_pair_observed_energy_bound_nonneg_noise (E : PathSpace S) (beta kappa sigma epsilon h : ℝ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Icc (0 : ℝ) (1/4)) (he : 0 ≤ epsilon) (hh : 0 < h) (muPlus muMinus : ThresholdProfile) (hrange : ∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon h ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon h ((a : ℝ)-a0)) : chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1) ∧ chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa*epsilon^2)*h^(2*beta+kappa+1) := by by_cases hs0 : sigma = 0 · subst sigma have hp := observed_zero_marked_chiSq_identity E kappa hk muPlus (directPerturbation beta epsilon h) (directPerturbation_continuous beta epsilon h hh) (fun a => (hformula a).1) have hm := observed_zero_marked_chiSq_identity E kappa hk muMinus (fun t => -directPerturbation beta epsilon h t) (directPerturbation_continuous beta epsilon h hh).neg (fun a => by simpa only [sub_eq_add_neg] using (hformula a).2) simp only [neg_sq] at hm have hb := directPerturbation_quadratic_energy_le beta kappa epsilon h hk.1 he hh constructor <;> nlinarith · exact direct_profile_pair_observed_energy_bound E beta kappa sigma epsilon h hk ⟨lt_of_le_of_ne hs.1 (Ne.symm hs0), hs.2⟩ he hh muPlus muMinus hrange hformula
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_profile_pair_observed_energy_bound_nonneg_noise · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ZeroNoiseObserved.lean:153
theorem direct_profile_pair_observed_sample_budget_nonneg_noise

The uniform direct sample budget includes the zero-noise boundary. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma epsilon :
ℝ
n :
ℕ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Icc (0 : ℝ) (1/4)
he :
0 ≤ epsilon
hd :
0 < effDim beta kappa
hn :
0 < n
muPlus muMinus :
hrange :
∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)
hformula :
∀ a : Dose,
(muPlus a : ℝ)
= 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧
(muMinus a : ℝ)
= 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0)
conclusion 1
(n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (8*(kappa+1)*2^kappa)*epsilon^2
conclusion 2
(n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile))
≤ (8*(kappa+1)*2^kappa)*epsilon^2
Proof (Lean source)
-- @node: direct_profile_pair_observed_sample_budget_nonneg_noise lemma direct_profile_pair_observed_sample_budget_nonneg_noise (E : PathSpace S) (beta kappa sigma epsilon : ℝ) (n : ℕ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Icc (0 : ℝ) (1/4)) (he : 0 ≤ epsilon) (hd : 0 < effDim beta kappa) (hn : 0 < n) (muPlus muMinus : ThresholdProfile) (hrange : ∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0)) : (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muPlus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa)*epsilon^2 ∧ (n : ℝ)*chiSqDiv (obsLaw sigma (lowerWitnessLaw E kappa muMinus)) (obsLaw sigma (lowerWitnessLaw E kappa referenceProfile)) ≤ (8*(kappa+1)*2^kappa)*epsilon^2 := by have hh : 0 < directScale beta kappa n := by unfold directScale exact Real.rpow_pos_of_pos (by exact_mod_cast hn) _ have hb := direct_profile_pair_observed_energy_bound_nonneg_noise E beta kappa sigma epsilon (directScale beta kappa n) hk hs he hh muPlus muMinus hrange hformula have hid := lower_direct_scale_sample_identity beta kappa n hd hn change (n : ℝ)*(directScale beta kappa n)^(2*beta+kappa+1) = 1 at hid constructor all_goals calc _ ≤ (n : ℝ)*((8*(kappa+1)*2^kappa*epsilon^2)* (directScale beta kappa n)^(2*beta+kappa+1)) := mul_le_mul_of_nonneg_left (by first | exact hb.1 | exact hb.2) (Nat.cast_nonneg n) _ = (8*(kappa+1)*2^kappa)*epsilon^2* ((n : ℝ)*(directScale beta kappa n)^(2*beta+kappa+1)) := by ring _ = _ := by rw [hid, mul_one]
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_profile_pair_observed_sample_budget_nonneg_noise · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ZeroNoiseObserved.lean:185
theorem direct_profile_pair_observed_tv_bound

The direct construction gives observed product total variation at most τ, including zero noise, under the common amplitude budget log(1+τ²) (51). Under the stated conditions. This is the stated conclusion.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma epsilon :
ℝ
n :
ℕ
hk :
kappa ∈ Icc (0 : ℝ) 2
hs :
sigma ∈ Icc (0 : ℝ) (1/4)
he :
0 ≤ epsilon
hd :
0 < effDim beta kappa
hn :
0 < n
tau :
ℝ
htau :
0 ≤ tau
hbudget :
(8*(kappa+1)*2^kappa)*epsilon^2 ≤ log (1 + tau^2)
muPlus muMinus :
hrange :
∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)
hformula :
∀ a : Dose,
(muPlus a : ℝ)
= 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧
(muMinus a : ℝ)
= 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0)
tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus))
≤ tau
Proof (Lean source)
-- @node: direct_profile_pair_observed_tv_bound lemma direct_profile_pair_observed_tv_bound (E : PathSpace S) (beta kappa sigma epsilon : ℝ) (n : ℕ) (hk : kappa ∈ Icc (0 : ℝ) 2) (hs : sigma ∈ Icc (0 : ℝ) (1/4)) (he : 0 ≤ epsilon) (hd : 0 < effDim beta kappa) (hn : 0 < n) (tau : ℝ) (htau : 0 ≤ tau) (hbudget : (8*(kappa+1)*2^kappa)*epsilon^2 ≤ log (1 + tau^2)) (muPlus muMinus : ThresholdProfile) (hrange : ∀ a, (muPlus a : ℝ) ∈ Icc (1/8) (7/8) ∧ (muMinus a : ℝ) ∈ Icc (1/8) (7/8)) (hformula : ∀ a : Dose, (muPlus a : ℝ) = 1/2 + directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0) ∧ (muMinus a : ℝ) = 1/2 - directPerturbation beta epsilon (directScale beta kappa n) ((a : ℝ)-a0)) : tvDist (experiment n sigma (lowerWitnessLaw E kappa muPlus)) (experiment n sigma (lowerWitnessLaw E kappa muMinus)) ≤ tau := by have hb := direct_profile_pair_observed_sample_budget_nonneg_noise E beta kappa sigma epsilon n hk hs he hd hn muPlus muMinus hrange hformula exact lower_observed_experiment_tv_le E kappa sigma hk muPlus muMinus n tau htau (obsLaw_witness_ac E kappa sigma hk hs muPlus (fun a => (hrange a).1)) (obsLaw_witness_ac E kappa sigma hk hs muMinus (fun a => (hrange a).2)) (obsLaw_witness_sqdev_integrable E kappa sigma hk hs muPlus (fun a => (hrange a).1)) (obsLaw_witness_sqdev_integrable E kappa sigma hk hs muMinus (fun a => (hrange a).2)) (hb.1.trans hbudget) (hb.2.trans hbudget)
CausalSmith.Stat.NoisydoseWeakdesignTransition.direct_profile_pair_observed_tv_bound · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/Helpers/ZeroNoiseObserved.lean:222
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.TErrorFreeReduction 2 declarations TErrorFreeReduction

TErrorFreeReduction

theorem frontierRate_zero

At zero noise the direct branch gives the exact weak-design power law. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
frontierRate beta kappa 0 n = (n : ℝ)^(-beta / effDim beta kappa)
Proof (Lean source)
-- @node: frontierRate_zero lemma frontierRate_zero (beta kappa : ℝ) (n : ℕ) : frontierRate beta kappa 0 n = (n : ℝ)^(-beta / effDim beta kappa) := by have hd : 0 ≤ directScale beta kappa n := Real.rpow_nonneg (Nat.cast_nonneg n) _ change (if 0 ≤ directScale beta kappa n then directScale beta kappa n else if 0 ≤ (logScale n)^(-1/2 : ℝ) then fourierScale beta kappa 0 n else polynomialScale 0 n)^beta = _ rw [if_pos hd] change ((n : ℝ)^(-1 / effDim beta kappa))^beta = _ rw [← Real.rpow_mul (Nat.cast_nonneg n)] congr 1 ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.frontierRate_zero · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TErrorFreeReduction.lean:17
theorem error_free_reduction

Zero measurement error gives the same-class weak-design orders for minimax risk and for honest length at a noncoverage level below one half, and the separate Gaiffas experiment has comparable minimax absolute risk. Under the stated conditions. This is the stated conclusion.

Formal statement
hLocalization_of_gate :
hLipschitz_of_gate :
hNorm_of_gate :
hGamma_of_gate :
hGaiffas_of_gate :
beta kappa alpha :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
halpha :
alpha ∈ Ioo (0 : ℝ) (1/2)
hK :
K.clo ≤ (kappa+1)*(2 : ℝ)^kappa ∧ (kappa+1)*(2 : ℝ)^kappa ≤ K.chi
conclusion 1
∃ c C : ℝ,
0 < c
c < C
∃ n0 : ℕ,
∀ (S : Type u) [MeasurableSpace S],
∀ E : PathSpace S,
∀ n ≥ n0,
ofReal (c*(n : ℝ)^(-beta/effDim beta kappa)) ≤ minimaxRisk E K beta kappa n 0 ∧
minimaxRisk E K beta kappa n 0 ≤ ofReal (C*(n : ℝ)^(-beta/effDim beta kappa)) ∧
ofReal (c*(n : ℝ)^(-beta/effDim beta kappa))
≤ honestLength E K beta kappa alpha n 0 ∧
honestLength E K beta kappa alpha n 0
≤ ofReal (C*(n : ℝ)^(-beta/effDim beta kappa))
conclusion 2
cG rG MG tauG :
ℝ
0 < cG
0 < rG
0 < MG
0 < tauG
xstar :
0 < (xstar : ℝ)
(xstar : ℝ) < 1
delta :
ℝ
0 < delta
delta ≤ min (xstar : ℝ) (1-(xstar : ℝ))
GaiffasDesign kappa cG xstar delta nu
∃ c C : ℝ,
0 < c
c < C
∃ n0 : ℕ,
∀ (S : Type u) [MeasurableSpace S],
∀ E : PathSpace S,
∀ n ≥ n0,
ofReal c * gaiffasMinimax beta kappa cG rG MG tauG xstar nu n
≤ minimaxRisk E K beta kappa n 0 ∧
minimaxRisk E K beta kappa n 0
≤ ofReal C * gaiffasMinimax beta kappa cG rG MG tauG xstar nu n
Proof (Lean source)
-- @node: prop:error-free-reduction theorem error_free_reduction (hLocalization_of_gate : FilteredJacobiLocalization) (hLipschitz_of_gate : FilteredJacobiLipschitz) (hNorm_of_gate : JacobiNormOrthogonality) (hGamma_of_gate : GammaRatioAsymptotic) (hGaiffas_of_gate : GaiffasDirectBenchmark) (K : ClassConstants) (beta kappa alpha : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (halpha : alpha ∈ Ioo (0 : ℝ) (1/2)) (hK : K.clo ≤ (kappa+1)*(2 : ℝ)^kappa ∧ (kappa+1)*(2 : ℝ)^kappa ≤ K.chi) : (∃ c C : ℝ, 0 < c ∧ c < C ∧ ∃ n0 : ℕ, ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ofReal (c*(n : ℝ)^(-beta/effDim beta kappa)) ≤ minimaxRisk E K beta kappa n 0 ∧ minimaxRisk E K beta kappa n 0 ≤ ofReal (C*(n : ℝ)^(-beta/effDim beta kappa)) ∧ ofReal (c*(n : ℝ)^(-beta/effDim beta kappa)) ≤ honestLength E K beta kappa alpha n 0 ∧ honestLength E K beta kappa alpha n 0 ≤ ofReal (C*(n : ℝ)^(-beta/effDim beta kappa))) ∧ (∀ cG rG MG tauG : ℝ, 0 < cG → 0 < rG → 0 < MG → 0 < tauG → ∀ xstar : Dose, 0 < (xstar : ℝ) → (xstar : ℝ) < 1 → ∀ delta : ℝ, 0 < delta → delta ≤ min (xstar : ℝ) (1-(xstar : ℝ)) → ∀ nu : ProbabilityMeasure Dose, GaiffasDesign kappa cG xstar delta nu → ∃ c C : ℝ, 0 < c ∧ c < C ∧ ∃ n0 : ℕ, ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ofReal c * gaiffasMinimax beta kappa cG rG MG tauG xstar nu n ≤ minimaxRisk E K beta kappa n 0 ∧ minimaxRisk E K beta kappa n 0 ≤ ofReal C * gaiffasMinimax beta kappa cG rG MG tauG xstar nu n) := by obtain ⟨⟨c, C, hc, hcC, n0, hfront⟩, _⟩ := uniform_frontier hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate K beta kappa alpha hbeta hkappa halpha hK have hzero : (0 : ℝ) ∈ Icc (0 : ℝ) (1/4) := by constructor <;> norm_num have hdirect : ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ofReal (c*(n : ℝ)^(-beta/effDim beta kappa)) ≤ minimaxRisk E K beta kappa n 0 ∧ minimaxRisk E K beta kappa n 0 ≤ ofReal (C*(n : ℝ)^(-beta/effDim beta kappa)) ∧ ofReal (c*(n : ℝ)^(-beta/effDim beta kappa)) ≤ honestLength E K beta kappa alpha n 0 ∧ honestLength E K beta kappa alpha n 0 ≤ ofReal (C*(n : ℝ)^(-beta/effDim beta kappa)) := by intro S _ E n hn simpa only [frontierRate_zero] using (hfront S E n hn).1 0 hzero refine ⟨⟨c, C, hc, hcC, n0, hdirect⟩, ?_⟩ intro cG rG MG tauG hcG hrG hMG htauG xstar hx0 hx1 delta hdelta hdeltaBound nu hdesign have hbeta0 : 0 < beta := hbeta.1 obtain ⟨cg, CG, hcg, hcgCG, nG, hG⟩ := hGaiffas_of_gate beta kappa cG rG MG tauG hbeta0 hbeta.2 hkappa hcG hrG hMG htauG xstar hx0 hx1 delta hdelta hdeltaBound nu hdesign have hCG : 0 < CG := hcg.trans hcgCG have hC : 0 < C := hc.trans hcC let cl := c / CG let Cu := C / cg + cl + 1 have hcl : 0 < cl := div_pos hc hCG have hCu : 0 < Cu := by dsimp [Cu]; positivity have hclCu : cl < Cu := by have : 0 < C / cg := div_pos hC hcg dsimp [Cu] linarith have hcancel : cl * CG = c := by dsimp [cl]; exact div_mul_cancel₀ c (ne_of_gt hCG) have hdom : C ≤ Cu * cg := by have hcancelG : C / cg * cg = C := div_mul_cancel₀ C (ne_of_gt hcg) dsimp [Cu] nlinarith refine ⟨cl, Cu, hcl, hclCu, max n0 nG, ?_⟩ intro S _ E n hn have hn0 : n0 ≤ n := (le_max_left n0 nG).trans hn have hnG : nG ≤ n := (le_max_right n0 nG).trans hn have hrisk := hdirect S E n hn0 have hbench := hG n hnG have hp : 0 ≤ (n : ℝ)^(-beta/effDim beta kappa) := Real.rpow_nonneg (Nat.cast_nonneg n) _ have hbenchLower : ofReal (cg*(n : ℝ)^(-beta/effDim beta kappa)) ≤ gaiffasMinimax beta kappa cG rG MG tauG xstar nu n := by simpa only [effDim] using hbench.2.1 have hbenchUpper : gaiffasMinimax beta kappa cG rG MG tauG xstar nu n ≤ ofReal (CG*(n : ℝ)^(-beta/effDim beta kappa)) := by simpa only [effDim] using hbench.2.2.1 constructor · calc ofReal cl * gaiffasMinimax beta kappa cG rG MG tauG xstar nu n ≤ ofReal cl * ofReal (CG*(n : ℝ)^(-beta/effDim beta kappa)) := mul_le_mul le_rfl hbenchUpper zero_le zero_le _ = ofReal (c*(n : ℝ)^(-beta/effDim beta kappa)) := by rw [← ENNReal.ofReal_mul hcl.le, ← mul_assoc, hcancel] _ ≤ minimaxRisk E K beta kappa n 0 := hrisk.1 · calc minimaxRisk E K beta kappa n 0 ≤ ofReal (C*(n : ℝ)^(-beta/effDim beta kappa)) := hrisk.2.1 _ ≤ ofReal (Cu*(cg*(n : ℝ)^(-beta/effDim beta kappa))) := by apply ENNReal.ofReal_le_ofReal rw [← mul_assoc] exact mul_le_mul_of_nonneg_right hdom hp _ = ofReal Cu * ofReal (cg*(n : ℝ)^(-beta/effDim beta kappa)) := ENNReal.ofReal_mul hCu.le _ ≤ ofReal Cu * gaiffasMinimax beta kappa cG rG MG tauG xstar nu n := mul_le_mul le_rfl hbenchLower zero_le zero_le
CausalSmith.Stat.NoisydoseWeakdesignTransition.error_free_reduction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TErrorFreeReduction.lean:31
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.TFiniteHonesty 11 declarations TFiniteHonesty

TFiniteHonesty

theorem strataProb_bool_sum

The two stratum masses form a probability partition. This is the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: strataProb_bool_sum lemma strataProb_bool_sum {S : Type*} [MeasurableSpace S] (P : Measure (StructSpace S)) [IsProbabilityMeasure P] : strataProb P false + strataProb P true = 1 := by have hm : MeasurableSet {w : StructSpace S | sX w = false} := measurableSet_eq_fun (by fun_prop) measurable_const have hc : {w : StructSpace S | sX w = false}ᶜ = {w | sX w = true} := by ext w cases sX w <;> simp simpa [strataProb, hc] using measureReal_add_measureReal_compl (μ := P) hm
CausalSmith.Stat.NoisydoseWeakdesignTransition.strataProb_bool_sum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TFiniteHonesty.lean:18
theorem causalTarget_strata

The causal target is the stratum-weighted potential mean, by the finite partition. Under the stated conditions. This is the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: causalTarget_strata lemma causalTarget_strata {S : Type*} [MeasurableSpace S] (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hbounded : BoundedPotentialOutcomes E P) : causalTarget E P = strataProb P false * condPotMean E P false a0 + strataProb P true * condPotMean E P true a0 := by have hi := potentialOutcome_integrable E P hbounded a0 (by norm_num [a0]) have hm (x : Bool) : MeasurableSet {w : StructSpace S | sX w = x} := measurableSet_eq_fun (by fun_prop) measurable_const have hir (x : Bool) : Integrable (fun w => if sX w = x then potentialOutcome E w a0 else 0) P := by have heq : (fun w => if sX w = x then potentialOutcome E w a0 else 0) = {w : StructSpace S | sX w = x}.indicator (fun w => potentialOutcome E w a0) := by funext w by_cases hw : sX w = x <;> simp [hw] rw [heq] exact hi.indicator (hm x) have hp (x : Bool) : strataProb P x ≠ 0 := (hoverlap x).ne' simp only [condPotMean, mul_div_cancel₀ _ (hp _)] rw [← integral_add (hir false) (hir true)] apply integral_congr_ae filter_upwards [] with w cases sX w <;> simp
CausalSmith.Stat.NoisydoseWeakdesignTransition.causalTarget_strata · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TFiniteHonesty.lean:30
theorem causalTarget_mem_Icc

The unit mean range transfers to the causal target through its probability weights. Under the stated conditions. This is the stated conclusion.

Formal statement
S :
E :
hoverlap :
hbounded :
hrange :
causalTarget E P ∈ Icc 0 1
Proof (Lean source)
-- @node: causalTarget_mem_Icc lemma causalTarget_mem_Icc {S : Type*} [MeasurableSpace S] (E : PathSpace S) (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (hoverlap : StratumPositive P) (hbounded : BoundedPotentialOutcomes E P) (hrange : MeanRange E P) : causalTarget E P ∈ Icc 0 1 := by rw [causalTarget_strata E P hoverlap hbounded] have hf := hrange false a0 (by norm_num [a0]) have ht := hrange true a0 (by norm_num [a0]) have hs := strataProb_bool_sum P have hpf : 0 ≤ strataProb P false := measureReal_nonneg have hpt : 0 ≤ strataProb P true := measureReal_nonneg constructor · nlinarith [mul_nonneg hpf (sub_nonneg.mpr hf.1), mul_nonneg hpt (sub_nonneg.mpr ht.1)] · nlinarith [mul_nonneg hpf (sub_nonneg.mpr hf.2), mul_nonneg hpt (sub_nonneg.mpr ht.2)]
CausalSmith.Stat.NoisydoseWeakdesignTransition.causalTarget_mem_Icc · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TFiniteHonesty.lean:55
theorem experiment_isProbabilityMeasure

The pushed-forward iid experiment is a probability measure. This is the stated conclusion.

Formal statement
S :
n :
ℕ
sigma :
ℝ
Proof (Lean source)
-- @node: experiment_isProbabilityMeasure lemma experiment_isProbabilityMeasure {S : Type*} [MeasurableSpace S] (P : Measure (StructSpace S)) [IsProbabilityMeasure P] (n : ℕ) (sigma : ℝ) : IsProbabilityMeasure (experiment n sigma P) := by have hm : Measurable (obsMap (S := S) sigma) := by unfold obsMap contaminatedDose fun_prop haveI : IsProbabilityMeasure (obsLaw sigma P) := Measure.isProbabilityMeasure_map hm.aemeasurable unfold experiment infer_instance
CausalSmith.Stat.NoisydoseWeakdesignTransition.experiment_isProbabilityMeasure · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TFiniteHonesty.lean:73
theorem phat_bool_sum

Empirical stratum frequencies form a probability partition on a nonempty frequency block. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
data :
Fin n → Obs
phat n data false + phat n data true = 1
Proof (Lean source)
-- @node: phat_bool_sum lemma phat_bool_sum (n : ℕ) (data : Fin n → Obs) (hn : blocksNonempty n) : phat n data false + phat n data true = 1 := by have hc : ((splitBlock n 0).card : ℝ) ≠ 0 := by exact_mod_cast (Finset.card_ne_zero.mpr (hn 0 (by omega))) unfold phat rw [← add_div, ← Finset.sum_add_distrib] have hs : (∑ i ∈ splitBlock n 0, ((if (data i).1 = false then (1 : ℝ) else 0) + (if (data i).1 = true then (1 : ℝ) else 0))) = (splitBlock n 0).card := by have hi (i : Fin n) : ((if (data i).1 = false then (1 : ℝ) else 0) + (if (data i).1 = true then (1 : ℝ) else 0)) = 1 := by cases (data i).1 <;> norm_num simp_rw [hi] simp rw [hs, div_self hc]
CausalSmith.Stat.NoisydoseWeakdesignTransition.phat_bool_sum · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TFiniteHonesty.lean:86
theorem totalEstimator_mem_Icc

Projection and empirical probability weights keep the total estimator in the unit outcome range. This is the stated conclusion.

Formal statement
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
data :
Fin n → Obs
totalEstimator K beta kappa n sigma data ∈ Icc 0 1
Proof (Lean source)
-- @node: totalEstimator_mem_Icc lemma totalEstimator_mem_Icc (K : ClassConstants) (beta kappa : ℝ) (n : ℕ) (sigma : ℝ) (data : Fin n → Obs) : totalEstimator K beta kappa n sigma data ∈ Icc 0 1 := by unfold totalEstimator split_ifs with hn · have hm (x : Bool) : muhat K kappa n data x (pairOf sigma (selectedTag K beta kappa n sigma)) ∈ Icc 0 1 := by constructor · exact le_max_left _ _ · exact max_le (by norm_num) (min_le_left _ _) have hp (x : Bool) : 0 ≤ phat n data x := by unfold phat positivity have hs := phat_bool_sum n data hn rw [weightEstimator, Fintype.sum_bool] have hf := hm false have ht := hm true constructor · nlinarith [mul_nonneg (hp false) (sub_nonneg.mpr hf.1), mul_nonneg (hp true) (sub_nonneg.mpr ht.1)] · nlinarith [mul_nonneg (hp false) (sub_nonneg.mpr hf.2), mul_nonneg (hp true) (sub_nonneg.mpr ht.2)] · norm_num
CausalSmith.Stat.NoisydoseWeakdesignTransition.totalEstimator_mem_Icc · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TFiniteHonesty.lean:105
theorem three_le_of_blocksNonempty

Nonempty modulo-three blocks require at least three observations. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
3 ≤ n
Proof (Lean source)
-- @node: three_le_of_blocksNonempty lemma three_le_of_blocksNonempty (n : ℕ) (hn : blocksNonempty n) : 3 ≤ n := by obtain ⟨i, hi⟩ := hn 2 (by omega) have hmod : i.val % 3 = 2 := (Finset.mem_filter.mp hi).2 have := i.isLt omega
CausalSmith.Stat.NoisydoseWeakdesignTransition.three_le_of_blocksNonempty · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TFiniteHonesty.lean:130
theorem Aq_pos

Every admissible pair has a strictly positive finite-sample public score. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma :
ℝ
n :
ℕ
hn :
0 < n
hq :
PairAdmissible kappa sigma q
0 < Aq K beta kappa n sigma q
Proof (Lean source)
-- @node: Aq_pos lemma Aq_pos (K : ClassConstants) (beta kappa sigma : ℝ) (n : ℕ) (hn : 0 < n) (q : WeightPair) (hq : PairAdmissible kappa sigma q) : 0 < Aq K beta kappa n sigma q := by have hI : 0 < weightMoment kappa q.q := hq.2.2.2.2.1 have hB : 0 ≤ Bq K beta kappa q.q := by unfold Bq apply div_nonneg _ hI.le apply mul_nonneg (div_nonneg (K.clo_pos.le.trans K.clo_le_chi) K.clo_pos.le) apply integral_nonneg_of_ae filter_upwards [ae_restrict_mem measurableSet_Icc] with t ht exact mul_nonneg (Real.rpow_nonneg (abs_nonneg _) _) (hq.2.2.1 t ht) have hb : 0 < bq K kappa q.q := by unfold bq; have := K.pmin_pos; have := K.clo_pos; positivity have hs : 0 ≤ 12 / bq K kappa q.q * sqrt (pubVq K kappa sigma q.ell / n) := by positivity have hnreal : 0 < (n : ℝ) := by exact_mod_cast hn have hp : 0 < 2 * sqrt (3 / (n : ℝ)) := by positivity unfold Aq linarith
theorem mem_honestInterval_of_abs_le

The interval contains any unit-range target within the declared public radius. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa alpha :
ℝ
n :
ℕ
sigma theta :
ℝ
data :
Fin n → Obs
htheta :
theta ∈ Icc 0 1
herror :
|totalEstimator K beta kappa n sigma data - theta|
≤ score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha
theta ∈ honestInterval K beta kappa alpha n sigma data
Proof (Lean source)
-- @node: mem_honestInterval_of_abs_le lemma mem_honestInterval_of_abs_le (K : ClassConstants) (beta kappa alpha : ℝ) (n : ℕ) (sigma theta : ℝ) (data : Fin n → Obs) (hn : blocksNonempty n) (htheta : theta ∈ Icc 0 1) (herror : |totalEstimator K beta kappa n sigma data - theta| ≤ score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha) : theta ∈ honestInterval K beta kappa alpha n sigma data := by rw [honestInterval, if_pos hn, mem_Icc] obtain ⟨hl, hu⟩ := abs_le.mp herror exact ⟨max_le htheta.1 (by linarith), le_min htheta.2 (by linarith)⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.mem_honestInterval_of_abs_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TFiniteHonesty.lean:158
theorem honestInterval_volume_le

Clipping cannot increase the length beyond twice the public radius, the score divided by the noncoverage level. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa alpha :
ℝ
n :
ℕ
sigma :
ℝ
hscore :
0 ≤ score K beta kappa n sigma (selectedTag K beta kappa n sigma)
data :
Fin n → Obs
volume (honestInterval K beta kappa alpha n sigma data)
≤ ofReal (2 * (score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha))
Proof (Lean source)
-- @node: honestInterval_volume_le lemma honestInterval_volume_le (K : ClassConstants) (beta kappa alpha : ℝ) (n : ℕ) (sigma : ℝ) (hn : blocksNonempty n) (hscore : 0 ≤ score K beta kappa n sigma (selectedTag K beta kappa n sigma)) (data : Fin n → Obs) : volume (honestInterval K beta kappa alpha n sigma data) ≤ ofReal (2 * (score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha)) := by rw [honestInterval, if_pos hn, Real.volume_Icc] apply ENNReal.ofReal_le_ofReal have hl := le_max_right (0 : ℝ) (totalEstimator K beta kappa n sigma data - score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha) have hu := min_le_right (1 : ℝ) (totalEstimator K beta kappa n sigma data + score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha) linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.honestInterval_volume_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TFiniteHonesty.lean:169
theorem finite_honesty

For any public class constants, smoothness exponent positive and at most one, design exponent between zero and two and any noncoverage level strictly between zero and one, the clipped interval covers the causal target with probability at least one minus the noncoverage level at every sample size, and its expected length is at most a constant (depending on the noncoverage level) times the frontier rate, uniformly for large samples.

Formal statement
beta kappa alpha :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
halpha :
alpha ∈ Ioo (0 : ℝ) 1
conclusion 1
S :
Type u
E :
n :
ℕ
sigma ∈ Icc (0 : ℝ) (1/4) :
P :
modelClass E K beta kappa sigma
1-alpha
≤ (experiment n sigma (P.1 : Measure (StructSpace S))).real {data | causalTarget E (P.1 : Measure (StructSpace S)) ∈ honestInterval K beta kappa alpha n sigma data}
conclusion 2
∃ C : ℝ,
0 < C
∃ n0 : ℕ,
∀ (S : Type u) [MeasurableSpace S],
∀ E : PathSpace S,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1/4),
∀ P : modelClass E K beta kappa sigma,
(∫⁻ data, volume (honestInterval K beta kappa alpha n sigma data) ∂experiment n sigma (P.1 : Measure (StructSpace S)))
≤ ofReal (C*frontierRate beta kappa sigma n)
Proof (Lean source)
-- @node: thm:finite-honesty theorem finite_honesty (K : ClassConstants) (beta kappa alpha : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (halpha : alpha ∈ Ioo (0 : ℝ) 1) : -- @realizes alpha(public noncoverage level in the open unit interval for coverage) (∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n : ℕ, ∀ sigma ∈ Icc (0 : ℝ) (1/4), ∀ P : modelClass E K beta kappa sigma, 1-alpha ≤ (experiment n sigma (P.1 : Measure (StructSpace S))).real {data | causalTarget E (P.1 : Measure (StructSpace S)) ∈ honestInterval K beta kappa alpha n sigma data}) ∧ (∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), ∀ P : modelClass E K beta kappa sigma, (∫⁻ data, volume (honestInterval K beta kappa alpha n sigma data) ∂experiment n sigma (P.1 : Measure (StructSpace S))) ≤ ofReal (C*frontierRate beta kappa sigma n)) := by constructor · intro S _ E n sigma hsigma P let μ := experiment n sigma (P.1 : Measure (StructSpace S)) haveI : IsProbabilityMeasure μ := experiment_isProbabilityMeasure _ n sigma have ht := causalTarget_mem_Icc E (P.1 : Measure (StructSpace S)) P.2.strataPos P.2.boundedPO P.2.meanRange by_cases hn : blocksNonempty n · have hn3 := three_le_of_blocksNonempty n hn obtain ⟨hq, hV, hlaw⟩ := (dictionary_score_rate E K beta kappa hbeta hkappa).1 n (by omega) sigma hsigma _ (selectedTag_minimizes K beta kappa n sigma).1 have hpos : 0 < score K beta kappa n sigma (selectedTag K beta kappa n sigma) := Aq_pos K beta kappa sigma n (by omega) _ hq have hcert := public_error_certificate E beta kappa hbeta hkappa n hn3 sigma hsigma (P.1 : Measure (StructSpace S)) P.2 (iidSampling_holds n sigma _) _ hq (hlaw P) hV have hbound : (∫ data, |totalEstimator K beta kappa n sigma data - causalTarget E (P.1 : Measure (StructSpace S))| ∂μ) ≤ score K beta kappa n sigma (selectedTag K beta kappa n sigma) := by simpa only [μ, totalEstimator, if_pos hn, score] using hcert have hi : Integrable (fun data => |totalEstimator K beta kappa n sigma data - causalTarget E (P.1 : Measure (StructSpace S))|) μ := by apply Integrable.of_bound (by fun_prop) 1 filter_upwards [] with data have he := totalEstimator_mem_Icc K beta kappa n sigma data rw [Real.norm_eq_abs, abs_abs] apply abs_le.mpr constructor <;> linarith [he.1, he.2, ht.1, ht.2] let G := {data | |totalEstimator K beta kappa n sigma data - causalTarget E (P.1 : Measure (StructSpace S))| ≤ score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha} have hG : MeasurableSet G := measurableSet_le (by fun_prop) measurable_const have hmarkov := mul_meas_ge_le_integral_of_nonneg (μ := μ) (ae_of_all _ (fun data => abs_nonneg _)) hi (score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha) have hbad : μ.real Gᶜ ≤ alpha := by have hm : μ.real Gᶜ ≤ μ.real {data | score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha ≤ |totalEstimator K beta kappa n sigma data - causalTarget E (P.1 : Measure (StructSpace S))|} := by refine measureReal_mono ?_ (measure_ne_top μ _) intro data hd change ¬ |totalEstimator K beta kappa n sigma data - causalTarget E (P.1 : Measure (StructSpace S))| ≤ score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha at hd exact (lt_of_not_ge hd).le have hsa : 0 < score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha := div_pos hpos halpha.1 have h1 := hmarkov.trans hbound have h2 : score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha * alpha = score K beta kappa n sigma (selectedTag K beta kappa n sigma) := div_mul_cancel₀ _ halpha.1.ne' exact hm.trans (le_of_mul_le_mul_left (h1.trans_eq h2.symm) hsa) have hgood : 1 - alpha ≤ μ.real G := by rw [probReal_compl_eq_one_sub hG] at hbad linarith apply hgood.trans refine measureReal_mono ?_ (measure_ne_top μ _) intro data hd exact mem_honestInterval_of_abs_le K beta kappa alpha n sigma _ data hn ht hd · have heq : {data : Fin n → Obs | causalTarget E (P.1 : Measure (StructSpace S)) ∈ honestInterval K beta kappa alpha n sigma data} = univ := by ext data simp only [honestInterval, if_neg hn, Set.mem_ofPred_eq, Set.mem_univ, iff_true] exact ht rw [heq] change 1 - alpha ≤ μ.real univ rw [probReal_univ] linarith [halpha.1] · obtain ⟨C, hC, n0, hupper⟩ := observable_upper.{u} K beta kappa hbeta hkappa refine ⟨(2/alpha) * C, mul_pos (div_pos two_pos halpha.1) hC, max 3 n0, ?_⟩ intro S _ E n hn sigma hsigma P have hn3 : 3 ≤ n := (le_max_left _ _).trans hn have hn0 : n0 ≤ n := (le_max_right _ _).trans hn have hblocks := blocksNonempty_of_three n hn3 obtain ⟨_, hF, hM⟩ := hupper S E n hn0 sigma hsigma have hs : score K beta kappa n sigma (selectedTag K beta kappa n sigma) ≤ C * frontierRate beta kappa sigma n := by have hmin := (selectedTag_minimizes K beta kappa n sigma).2 by_cases hbranch : sigma ≤ (logScale n)^(-1/2 : ℝ) · obtain ⟨k, hk, _, _, hscore⟩ := hF hbranch exact (hmin _ hk).trans hscore · obtain ⟨j, hj, _, _, hscore⟩ := hM (lt_of_not_ge hbranch) exact (hmin _ hj).trans hscore obtain ⟨hq, _, _⟩ := (dictionary_score_rate E K beta kappa hbeta hkappa).1 n (by omega) sigma hsigma _ (selectedTag_minimizes K beta kappa n sigma).1 have hpos : 0 < score K beta kappa n sigma (selectedTag K beta kappa n sigma) := Aq_pos K beta kappa sigma n (by omega) _ hq haveI := experiment_isProbabilityMeasure (P.1 : Measure (StructSpace S)) n sigma calc _ ≤ ∫⁻ _data, ofReal (2 * (score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha)) ∂experiment n sigma (P.1 : Measure (StructSpace S)) := lintegral_mono (honestInterval_volume_le K beta kappa alpha n sigma hblocks hpos.le) _ = ofReal (2 * (score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha)) := by simp _ ≤ ofReal ((2/alpha) * C * frontierRate beta kappa sigma n) := by apply ENNReal.ofReal_le_ofReal have h2a : 0 ≤ 2/alpha := div_nonneg zero_le_two halpha.1.le calc 2 * (score K beta kappa n sigma (selectedTag K beta kappa n sigma) / alpha) = (2/alpha) * score K beta kappa n sigma (selectedTag K beta kappa n sigma) := by ring _ ≤ (2/alpha) * (C * frontierRate beta kappa sigma n) := mul_le_mul_of_nonneg_left hs h2a _ = _ := by ring
CausalSmith.Stat.NoisydoseWeakdesignTransition.finite_honesty · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TFiniteHonesty.lean:187
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.TIdentification 1 declarations Identification of latent measures, continuous potential means, and the causal target.

Identification of latent measures, continuous potential means, and the causal target.

theorem identification

Observational equivalence identifies both latent measures, every continuous mean value, and the causal target via local-mass limits. This is the stated conclusion. Under the stated conditions.

Formal statement
S :
Type u_1
shared
E :
beta kappa sigma :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hsigma :
sigma ∈ Icc (0 : ℝ) (1/4)
hP :
NoisyDoseModelClass E K beta kappa sigma (P : Measure (StructSpace S))
hP' :
NoisyDoseModelClass E K beta kappa sigma (P' : Measure (StructSpace S))
hobs :
obsLaw sigma (P : Measure (StructSpace S)) = obsLaw sigma (P' : Measure (StructSpace S))
conclusion 1
x :
a ∈ Icc (0 : ℝ) 1 :
= condPotMean E (P' : Measure (StructSpace S)) x a
j :
ℕ
0 < (latentDoseLaw (P : Measure (StructSpace S)) x).real (Ioo (-1 / ((j : ℝ)+3)) (1 / ((j : ℝ)+3)))
conclusion 2
conclusion 3
Proof (Lean source)
-- @node: prop:identification theorem identification (E : PathSpace S) (beta kappa sigma : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hsigma : sigma ∈ Icc (0 : ℝ) (1/4)) (P P' : ProbabilityMeasure (StructSpace S)) {K : ClassConstants} (hP : NoisyDoseModelClass E K beta kappa sigma (P : Measure (StructSpace S))) (hP' : NoisyDoseModelClass E K beta kappa sigma (P' : Measure (StructSpace S))) (hobs : obsLaw sigma (P : Measure (StructSpace S)) = obsLaw sigma (P' : Measure (StructSpace S))) : (∀ x, strataProb (P : Measure (StructSpace S)) x = strataProb (P' : Measure (StructSpace S)) x ∧ latentDoseLaw (P : Measure (StructSpace S)) x = latentDoseLaw (P' : Measure (StructSpace S)) x ∧ latentMeanMeasure E (P : Measure (StructSpace S)) x = latentMeanMeasure E (P' : Measure (StructSpace S)) x ∧ (∀ a ∈ Icc (0 : ℝ) 1, condPotMean E (P : Measure (StructSpace S)) x a = condPotMean E (P' : Measure (StructSpace S)) x a) ∧ (∀ j : ℕ, 0 < (latentDoseLaw (P : Measure (StructSpace S)) x).real (Ioo (-1 / ((j : ℝ)+3)) (1 / ((j : ℝ)+3)))) ∧ Tendsto (latentLocalRatio E (P : Measure (StructSpace S)) x) atTop (𝓝 (condPotMean E (P : Measure (StructSpace S)) x a0))) ∧ causalTarget E (P : Measure (StructSpace S)) = ∑ x : Bool, strataProb (P : Measure (StructSpace S)) x * condPotMean E (P : Measure (StructSpace S)) x a0 ∧ causalTarget E (P : Measure (StructSpace S)) = causalTarget E (P' : Measure (StructSpace S)) := by -- Equations (5)--(7): deconvolution recovers both latent measures. have hlatent : ∀ x : Bool, latentDoseLaw (P : Measure (StructSpace S)) x = latentDoseLaw (P' : Measure (StructSpace S)) x ∧ latentMeanMeasure E (P : Measure (StructSpace S)) x = latentMeanMeasure E (P' : Measure (StructSpace S)) x := by intro x refine ⟨latentDoseLaw_eq_of_obsLaw_eq sigma kappa hsigma _ _ hP.strataPos hP'.strataPos hP.weakDesign hP'.weakDesign hP.errorIndependence hP'.errorIndependence hP.gaussianChannel hP'.gaussianChannel hobs x, ?_⟩ exact latentMeanMeasure_eq_of_obsLaw_eq E beta kappa sigma hbeta hkappa hsigma _ _ hP hP' hobs x have hbetaPos : 0 < beta := hbeta.1 have hmass (x : Bool) (j : ℕ) : 0 < (latentDoseLaw (P : Measure (StructSpace S)) x).real (Ioo (-1 / ((j : ℝ)+3)) (1 / ((j : ℝ)+3))) := by have heps : 0 < 1 / ((j : ℝ)+3) := by positivity have hhalf : 1 / ((j : ℝ)+3) ≤ 1/2 := by apply (div_le_iff₀ (by positivity : 0 < (j : ℝ)+3)).mpr have := Nat.cast_nonneg (α := ℝ) j linarith simpa only [neg_div] using latentDoseLaw_local_mass_pos (P : Measure (StructSpace S)) kappa hP.strataPos hP.weakDesign x (1 / ((j : ℝ)+3)) heps hhalf have hlimit (x : Bool) := latentLocalRatio_tendsto E (P : Measure (StructSpace S)) beta kappa hbetaPos hP.strataPos hP.weakDesign hP.holderMean hP.meanRange x have hp (x : Bool) := strataProb_eq_of_obsLaw_eq sigma (P : Measure (StructSpace S)) (P' : Measure (StructSpace S)) hobs x have hm (x : Bool) : EqOn (condPotMean E (P : Measure (StructSpace S)) x) (condPotMean E (P' : Measure (StructSpace S)) x) (Icc (0 : ℝ) 1) := condPotMean_eqOn_of_latent_measures_eq E _ _ beta kappa hbetaPos hP.strataPos hP'.strataPos hP.weakDesign hP'.weakDesign hP.holderMean hP'.holderMean hP.meanRange hP'.meanRange x (hlatent x).1 (hlatent x).2 have ht := causalTarget_eq_stratum_sum E (P : Measure (StructSpace S)) hP.strataPos hP.boundedPO refine ⟨?_, ht, ?_⟩ · intro x exact ⟨hp x, (hlatent x).1, (hlatent x).2, hm x, hmass x, hlimit x⟩ · rw [ht, causalTarget_eq_stratum_sum E (P' : Measure (StructSpace S)) hP'.strataPos hP'.boundedPO] apply Finset.sum_congr rfl intro x hx rw [hp x, hm x (by norm_num [a0])]
CausalSmith.Stat.NoisydoseWeakdesignTransition.identification · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TIdentification.lean:16
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.TObservableUpper 2 declarations TObservableUpper

TObservableUpper

theorem blocksNonempty_of_three

At least three observations make each modulo-three split block nonempty. Under the stated conditions. This is the stated conclusion.

Formal statement
n :
ℕ
hn :
3 ≤ n
Proof (Lean source)
-- @node: blocksNonempty_of_three lemma blocksNonempty_of_three (n : ℕ) (hn : 3 ≤ n) : blocksNonempty n := by intro r hr refine ⟨⟨r, lt_of_lt_of_le hr hn⟩, ?_⟩ simp [splitBlock, Nat.mod_eq_of_lt hr]
CausalSmith.Stat.NoisydoseWeakdesignTransition.blocksNonempty_of_three · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TObservableUpper.lean:18
theorem observable_upper

The observable estimator and branch-specific dictionary witnesses attain the risk frontier with one noise-uniform threshold. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
@realizes beta(smoothness exponent in (0,1])
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
conclusion 1
0 < C
conclusion 2
∃ n0 : ℕ,
∀ (S : Type u) [MeasurableSpace S],
∀ E : PathSpace S,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1/4),
(∀ P : modelClass E K beta kappa sigma, IIDSampling n sigma (P.1 : Measure (StructSpace S)) (experiment n sigma (P.1 : Measure (StructSpace S))) → (∫ data, |totalEstimator K beta kappa n sigma data - causalTarget E (P.1 : Measure (StructSpace S))| ∂experiment n sigma (P.1 : Measure (StructSpace S))) ≤ C*frontierRate beta kappa sigma n) ∧
(sigma ≤ (logScale n)^(-1/2 : ℝ) → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ PairAdmissible kappa sigma (pairOf sigma (.fourier k)) ∧ VqENN kappa sigma (pairOf sigma (.fourier k)).ell < ⊤ ∧ score K beta kappa n sigma (.fourier k) ≤ C*frontierRate beta kappa sigma n) ∧
((logScale n)^(-1/2 : ℝ) < sigma → ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ PairAdmissible kappa sigma (pairOf sigma (.poly j)) ∧ VqENN kappa sigma (pairOf sigma (.poly j)).ell < ⊤ ∧ score K beta kappa n sigma (.poly j) ≤ C*frontierRate beta kappa sigma n)
Proof (Lean source)
-- @node: thm:observable-upper theorem observable_upper (K : ClassConstants) (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) -- @realizes beta(smoothness exponent in (0,1]) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), -- @realizes sigma(public error scale in [0,1/4]) (∀ P : modelClass E K beta kappa sigma, IIDSampling n sigma (P.1 : Measure (StructSpace S)) (experiment n sigma (P.1 : Measure (StructSpace S))) → (∫ data, |totalEstimator K beta kappa n sigma data - causalTarget E (P.1 : Measure (StructSpace S))| ∂experiment n sigma (P.1 : Measure (StructSpace S))) ≤ C*frontierRate beta kappa sigma n) ∧ (sigma ≤ (logScale n)^(-1/2 : ℝ) → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ PairAdmissible kappa sigma (pairOf sigma (.fourier k)) ∧ VqENN kappa sigma (pairOf sigma (.fourier k)).ell < ⊤ ∧ score K beta kappa n sigma (.fourier k) ≤ C*frontierRate beta kappa sigma n) ∧ ((logScale n)^(-1/2 : ℝ) < sigma → ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ PairAdmissible kappa sigma (pairOf sigma (.poly j)) ∧ VqENN kappa sigma (pairOf sigma (.poly j)).ell < ⊤ ∧ score K beta kappa n sigma (.poly j) ≤ C*frontierRate beta kappa sigma n) := by obtain ⟨CF, hCF, nF, hF⟩ := fourier_dictionary_witness beta kappa hbeta hkappa obtain ⟨CM, hCM, nM, hM⟩ := inverseheat_dictionary_witness beta kappa hbeta hkappa refine ⟨scoreScale K * max CF CM, mul_pos (scoreScale_pos K) (lt_max_of_lt_left hCF), max 3 (max nF nM), ?_⟩ intro S _ E n hn sigma hsigma have hn3 : 3 ≤ n := (le_max_left _ _).trans hn have hnF : nF ≤ n := (le_max_left _ _).trans ((le_max_right _ _).trans hn) have hnM : nM ≤ n := (le_max_right _ _).trans ((le_max_right _ _).trans hn) have hnreal : (1 : ℝ) ≤ n := by exact_mod_cast (show 1 ≤ n by omega) have hexp : (1 : ℝ) ≤ exp 1 := Real.one_le_exp (by norm_num) have hlog : 0 ≤ logScale n := Real.log_nonneg (by exact one_le_mul_of_one_le_of_one_le hexp hnreal) have hrho : 0 ≤ frontierRate beta kappa sigma n := Real.rpow_nonneg (by unfold frontierScale split_ifs · exact Real.rpow_nonneg (Nat.cast_nonneg n) _ · exact div_nonneg hsigma.1 (Real.sqrt_nonneg _) · exact div_nonneg (Real.log_nonneg (by have hm : 0 ≤ sigma^2 * logScale n := mul_nonneg (sq_nonneg sigma) hlog linarith)) hlog) _ have hFourier : sigma ≤ (logScale n)^(-1/2 : ℝ) → ∃ k : ℕ, DictTag.fourier k ∈ weightDictionary n sigma ∧ PairAdmissible kappa sigma (pairOf sigma (.fourier k)) ∧ VqENN kappa sigma (pairOf sigma (.fourier k)).ell < ⊤ ∧ score K beta kappa n sigma (.fourier k) ≤ scoreScale K * max CF CM * frontierRate beta kappa sigma n := by intro hbranch obtain ⟨k, hk, hscore⟩ := hF n hnF sigma hsigma hbranch obtain ⟨hq, hV, _⟩ := (dictionary_score_rate E K beta kappa hbeta hkappa).1 n (by omega) sigma hsigma _ hk exact ⟨k, hk, hq, hV, score_le_of_unitScore_le K beta kappa sigma hkappa hsigma n _ hk (hscore.trans (mul_le_mul_of_nonneg_right (le_max_left _ _) hrho))⟩ have hPoly : (logScale n)^(-1/2 : ℝ) < sigma → ∃ j : ℕ, DictTag.poly j ∈ weightDictionary n sigma ∧ PairAdmissible kappa sigma (pairOf sigma (.poly j)) ∧ VqENN kappa sigma (pairOf sigma (.poly j)).ell < ⊤ ∧ score K beta kappa n sigma (.poly j) ≤ scoreScale K * max CF CM * frontierRate beta kappa sigma n := by intro hbranch obtain ⟨j, hj, hscore⟩ := hM n hnM sigma hsigma hbranch obtain ⟨hq, hV, _⟩ := (dictionary_score_rate E K beta kappa hbeta hkappa).1 n (by omega) sigma hsigma _ hj exact ⟨j, hj, hq, hV, score_le_of_unitScore_le K beta kappa sigma hkappa hsigma n _ hj (hscore.trans (mul_le_mul_of_nonneg_right (le_max_right _ _) hrho))⟩ obtain ⟨hselected, hmin⟩ := selectedTag_minimizes K beta kappa n sigma have hscore : score K beta kappa n sigma (selectedTag K beta kappa n sigma) ≤ scoreScale K * max CF CM * frontierRate beta kappa sigma n := by by_cases hbranch : sigma ≤ (logScale n)^(-1/2 : ℝ) · obtain ⟨k, hk, _, _, hbound⟩ := hFourier hbranch exact (hmin _ hk).trans hbound · obtain ⟨j, hj, _, _, hbound⟩ := hPoly (lt_of_not_ge hbranch) exact (hmin _ hj).trans hbound refine ⟨?_, hFourier, hPoly⟩ intro P hiid obtain ⟨hq, hV, hlaw⟩ := (dictionary_score_rate E K beta kappa hbeta hkappa).1 n (by omega) sigma hsigma _ hselected have hcert := public_error_certificate E beta kappa hbeta hkappa n hn3 sigma hsigma (P.1 : Measure (StructSpace S)) P.2 hiid (pairOf sigma (selectedTag K beta kappa n sigma)) hq (hlaw P) hV simpa only [totalEstimator, if_pos (blocksNonempty_of_three n hn3), score] using hcert.trans hscore
CausalSmith.Stat.NoisydoseWeakdesignTransition.observable_upper · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TObservableUpper.lean:25
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.TObservedLower 1 declarations TObservedLower

TObservedLower

theorem observed_lower

Assuming the four cited Jacobi-packet facts, for any public class constants whose lower and upper envelope constants bracket the power-density coefficient (κ+1)2^κ, so that the class is nonempty, smoothness exponent positive and at most one, design exponent between zero and two and any prescribed positive total-variation level τ, explicit Bernoulli threshold witnesses in the model have a common design, legal ranks, target separation of the order of the frontier rate, and observed-product total variation at most τ; the separation constant depends on τ.

Formal statement
hLocalization_of_gate :
hLipschitz_of_gate :
hNorm_of_gate :
hGamma_of_gate :
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
hK :
K.clo ≤ (kappa+1)*(2 : ℝ)^kappa ∧ (kappa+1)*(2 : ℝ)^kappa ≤ K.chi
tau :
ℝ
htau :
0 < tau
∃ c C epsilon Cpacket cPacket : ℝ,
0 < c
0 < C
0 < epsilon
0 < Cpacket
0 < cPacket
conclusion 1
m :
ℕ
4 ≤ m
PacketBounds kappa Cpacket cPacket m
conclusion 2
∃ n0 : ℕ,
∀ (S : Type u) [MeasurableSpace S],
∀ E : PathSpace S,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1/4),
∃ Pplus Pminus Pstar : ProbabilityMeasure (StructSpace S),
NoisyDoseModelClass E K beta kappa sigma (Pplus : Measure (StructSpace S)) ∧
NoisyDoseModelClass E K beta kappa sigma (Pminus : Measure (StructSpace S)) ∧
NoisyDoseModelClass E K beta kappa sigma (Pstar : Measure (StructSpace S)) ∧
(∀ P ∈ ({Pplus, Pminus, Pstar} : Set (ProbabilityMeasure (StructSpace S))), RankUniform (P : Measure (StructSpace S)) ∧ RankTreatmentIndependence (P : Measure (StructSpace S)) ∧ StructuralThreshold E (P : Measure (StructSpace S)) ∧ IIDSampling n sigma (P : Measure (StructSpace S)) (experiment n sigma (P : Measure (StructSpace S)))) ∧
(Pplus : Measure (StructSpace S)).map (fun w => (sX w, sA w))
= (Pminus : Measure (StructSpace S)).map (fun w => (sX w, sA w)) ∧
(Pplus : Measure (StructSpace S)).map (fun w => (sX w, sA w))
= (Pstar : Measure (StructSpace S)).map (fun w => (sX w, sA w)) ∧
c*frontierRate beta kappa sigma n
≤ |causalTarget E (Pplus : Measure (StructSpace S))-causalTarget E (Pminus : Measure (StructSpace S))| ∧
≤ tau ∧
LowerWitnessConstruction E beta kappa n sigma epsilon cPacket C (Pplus : Measure (StructSpace S)) (Pminus : Measure (StructSpace S)) (Pstar : Measure (StructSpace S))
Proof (Lean source)
-- @node: thm:observed-lower theorem observed_lower (hLocalization_of_gate : FilteredJacobiLocalization) (hLipschitz_of_gate : FilteredJacobiLipschitz) (hNorm_of_gate : JacobiNormOrthogonality) (hGamma_of_gate : GammaRatioAsymptotic) (K : ClassConstants) (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (hK : K.clo ≤ (kappa+1)*(2 : ℝ)^kappa ∧ (kappa+1)*(2 : ℝ)^kappa ≤ K.chi) (tau : ℝ) (htau : 0 < tau) : ∃ c C epsilon Cpacket cPacket : ℝ, 0 < c ∧ 0 < C ∧ 0 < epsilon ∧ 0 < Cpacket ∧ 0 < cPacket ∧ (∀ m : ℕ, 4 ≤ m → PacketBounds kappa Cpacket cPacket m) ∧ ∃ n0 : ℕ, ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), ∃ Pplus Pminus Pstar : ProbabilityMeasure (StructSpace S), -- @realizes Palt(three probability-law witnesses) NoisyDoseModelClass E K beta kappa sigma (Pplus : Measure (StructSpace S)) ∧ NoisyDoseModelClass E K beta kappa sigma (Pminus : Measure (StructSpace S)) ∧ NoisyDoseModelClass E K beta kappa sigma (Pstar : Measure (StructSpace S)) ∧ BinaryPotentialOutcomes E (Pplus : Measure (StructSpace S)) ∧ BinaryPotentialOutcomes E (Pminus : Measure (StructSpace S)) ∧ BinaryPotentialOutcomes E (Pstar : Measure (StructSpace S)) ∧ (∀ P ∈ ({Pplus, Pminus, Pstar} : Set (ProbabilityMeasure (StructSpace S))), RankUniform (P : Measure (StructSpace S)) ∧ RankTreatmentIndependence (P : Measure (StructSpace S)) ∧ StructuralThreshold E (P : Measure (StructSpace S)) ∧ IIDSampling n sigma (P : Measure (StructSpace S)) (experiment n sigma (P : Measure (StructSpace S)))) ∧ (Pplus : Measure (StructSpace S)).map (fun w => (sX w, sA w)) = (Pminus : Measure (StructSpace S)).map (fun w => (sX w, sA w)) ∧ (Pplus : Measure (StructSpace S)).map (fun w => (sX w, sA w)) = (Pstar : Measure (StructSpace S)).map (fun w => (sX w, sA w)) ∧ c*frontierRate beta kappa sigma n ≤ |causalTarget E (Pplus : Measure (StructSpace S))-causalTarget E (Pminus : Measure (StructSpace S))| ∧ tvDist (experiment n sigma (Pplus : Measure (StructSpace S))) (experiment n sigma (Pminus : Measure (StructSpace S))) ≤ tau ∧ LowerWitnessConstruction E beta kappa n sigma epsilon cPacket C (Pplus : Measure (StructSpace S)) (Pminus : Measure (StructSpace S)) (Pstar : Measure (StructSpace S)) := by obtain ⟨c, C, epsilon, Cpacket, cPacket, hc, hC, hepsilon, hCpacket, hcPacket, hpacket, n0, hregimes⟩ := lower_regime_witnesses hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate beta kappa hbeta hkappa tau htau refine ⟨c, C, epsilon, Cpacket, cPacket, hc, hC, hepsilon, hCpacket, hcPacket, hpacket, n0, ?_⟩ intro S _ E n hn sigma hsigma obtain ⟨muPlus, muMinus, hrange, hholder, hsep, htv, h, ell, m, J, hprofiles, hseries⟩ := hregimes S E n hn sigma hsigma have hplus := lowerWitness_membership E K beta kappa sigma hbeta hkappa hsigma hK muPlus (fun a b => (hholder a b).1) have hminus := lowerWitness_membership E K beta kappa sigma hbeta hkappa hsigma hK muMinus (fun a b => (hholder a b).2) have hreferenceHolder : ∀ a b : Dose, |(referenceProfile a : ℝ)-(referenceProfile b : ℝ)| ≤ |(a : ℝ)-(b : ℝ)|^beta := by intro a b simp only [referenceProfile, ContinuousMap.const_apply, sub_self, abs_zero] exact Real.rpow_nonneg (abs_nonneg _) _ have hstar := lowerWitness_membership E K beta kappa sigma hbeta hkappa hsigma hK referenceProfile hreferenceHolder refine ⟨lowerWitness E kappa hkappa muPlus, lowerWitness E kappa hkappa muMinus, lowerWitness E kappa hkappa referenceProfile, hplus.1, hminus.1, hstar.1, hplus.2.1, hminus.2.1, hstar.2.1, ?_, lowerWitness_common_design E kappa hkappa muPlus muMinus, lowerWitness_common_design E kappa hkappa muPlus referenceProfile, hsep, htv, ?_⟩ · intro P hP have hlegal : ∀ mu : ThresholdProfile, RankUniform (lowerWitnessLaw E kappa mu) ∧ RankTreatmentIndependence (lowerWitnessLaw E kappa mu) ∧ StructuralThreshold E (lowerWitnessLaw E kappa mu) → RankUniform (lowerWitnessLaw E kappa mu) ∧ RankTreatmentIndependence (lowerWitnessLaw E kappa mu) ∧ StructuralThreshold E (lowerWitnessLaw E kappa mu) ∧ IIDSampling n sigma (lowerWitnessLaw E kappa mu) (experiment n sigma (lowerWitnessLaw E kappa mu)) := by intro mu hmu exact ⟨hmu.1, hmu.2.1, hmu.2.2, iidSampling_holds n sigma _⟩ rcases hP with rfl | rfl | hP · exact hlegal muPlus ⟨hplus.2.2.1, hplus.2.2.2.1, hplus.2.2.2.2.1⟩ · exact hlegal muMinus ⟨hminus.2.2.1, hminus.2.2.2.1, hminus.2.2.2.2.1⟩ · have hP' : P = lowerWitness E kappa hkappa referenceProfile := hP subst P exact hlegal referenceProfile ⟨hstar.2.2.1, hstar.2.2.2.1, hstar.2.2.2.2.1⟩ · exact ⟨muPlus, muMinus, h, ell, m, J, hprofiles, rfl, rfl, rfl, hseries⟩
CausalSmith.Stat.NoisydoseWeakdesignTransition.observed_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TObservedLower.lean:18
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.TUniformFrontier 10 declarations Uniform matched risk and honest-length frontier, full transition windows, and fixed-noise order.

Uniform matched risk and honest-length frontier, full transition windows, and fixed-noise order.

Appending the same independent probability seed cannot increase total variation. This is the stated conclusion.

Formal statement
tvDist (P.prod R) (Q.prod R) ≤ tvDist P Q
Proof (Lean source)
-- @node: tvDist_common_seed_le lemma tvDist_common_seed_le {Ω U : Type*} [MeasurableSpace Ω] [MeasurableSpace U] (P Q : Measure Ω) (R : Measure U) [IsProbabilityMeasure P] [IsProbabilityMeasure Q] [IsProbabilityMeasure R] : tvDist (P.prod R) (Q.prod R) ≤ tvDist P Q := by unfold tvDist apply ciSup_le rintro ⟨A, hA⟩ have hreal (M : Measure Ω) [IsProbabilityMeasure M] : (M.prod R).real A = ∫ x, (R (Prod.mk x ⁻¹' A)).toReal ∂M := by rw [measureReal_def, Measure.prod_apply hA, ← integral_toReal (measurable_measure_prodMk_left hA).aemeasurable] filter_upwards with x exact measure_lt_top R _ rw [hreal P, hreal Q] simpa only [zero_add, mul_one, tvDist] using tvDist_integral_range P Q (fun x => (R (Prod.mk x ⁻¹' A)).toReal) (measurable_measure_prodMk_left hA).ennreal_toReal 0 1 (by norm_num) (fun x => ⟨ENNReal.toReal_nonneg, by simpa only [measureReal_def, zero_add] using (measureReal_le_one (μ := R) (s := Prod.mk x ⁻¹' A))⟩)
CausalSmith.Stat.NoisydoseWeakdesignTransition.tvDist_common_seed_le · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TUniformFrontier.lean:22
theorem loss_threshold_lintegral_lower Lemma loss_threshold_lintegral_lower in the paper ↗

A nonnegative loss dominates its threshold times the probability of exceeding it. Under the stated conditions. This is the stated conclusion.

Formal statement
Ω :
P :
f :
Ω → ℝ
hf :
r :
ℝ
ofReal r * P {x | r ≤ f x} ≤ ∫⁻ x, ofReal (f x) ∂P
Proof (Lean source)
-- @node: loss_threshold_lintegral_lower lemma loss_threshold_lintegral_lower {Ω : Type*} [MeasurableSpace Ω] (P : Measure Ω) (f : Ω → ℝ) (hf : Measurable f) (r : ℝ) : ofReal r * P {x | r ≤ f x} ≤ ∫⁻ x, ofReal (f x) ∂P := by rw [← lintegral_indicator_const (measurableSet_le measurable_const hf)] apply lintegral_mono intro x by_cases hx : r ≤ f x · rw [Set.indicator_of_mem (show x ∈ {x | r ≤ f x} from hx)] exact ENNReal.ofReal_le_ofReal hx · rw [Set.indicator_of_notMem (show x ∉ {x | r ≤ f x} from hx)] exact bot_le
CausalSmith.Stat.NoisydoseWeakdesignTransition.loss_threshold_lintegral_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TUniformFrontier.lean:46
theorem absolute_risk_two_point_lower Lemma absolute_risk_two_point_lower in the paper ↗

The two-point testing bound implies an extended absolute-risk floor without integrability. Under the stated conditions. This is the stated conclusion.

Formal statement
Ω :
T :
Ω → ℝ
hT :
a b delta :
ℝ
hdelta :
0 ≤ delta
hsep :
delta ≤ |a-b|
htv :
tvDist P Q ≤ 1/5
ofReal (delta / 5)
≤ max (∫⁻ x, ofReal |T x-a| ∂P) (∫⁻ x, ofReal |T x-b| ∂Q)
Proof (Lean source)
-- @node: absolute_risk_two_point_lower lemma absolute_risk_two_point_lower {Ω : Type*} [MeasurableSpace Ω] (P Q : Measure Ω) [IsProbabilityMeasure P] [IsProbabilityMeasure Q] (T : Ω → ℝ) (hT : Measurable T) (a b delta : ℝ) (hdelta : 0 ≤ delta) (hsep : delta ≤ |a-b|) (htv : tvDist P Q ≤ 1/5) : ofReal (delta / 5) ≤ max (∫⁻ x, ofReal |T x-a| ∂P) (∫⁻ x, ofReal |T x-b| ∂Q) := by have hsep' : 2 * (delta / 2) ≤ dist a b := by rw [Real.dist_eq] linarith have htest := half_one_sub_tvDist_le_max_error (P₀ := P) (P₁ := Q) hT hsep' have hprob : (2/5 : ℝ) ≤ max (P.real {x | delta/2 ≤ |T x-a|}) (Q.real {x | delta/2 ≤ |T x-b|}) := by simp only [Real.dist_eq] at htest linarith have hprob' : ofReal (2/5 : ℝ) ≤ max (P {x | delta/2 ≤ |T x-a|}) (Q {x | delta/2 ≤ |T x-b|}) := by simpa [ENNReal.ofReal_max, measureReal_def] using ENNReal.ofReal_le_ofReal hprob have hP := loss_threshold_lintegral_lower P (fun x => |T x-a|) (by fun_prop) (delta/2) have hQ := loss_threshold_lintegral_lower Q (fun x => |T x-b|) (by fun_prop) (delta/2) calc ofReal (delta/5) = ofReal (delta/2) * ofReal (2/5 : ℝ) := by rw [← ENNReal.ofReal_mul (by positivity)] congr 1 ring _ ≤ ofReal (delta/2) * max (P {x | delta/2 ≤ |T x-a|}) (Q {x | delta/2 ≤ |T x-b|}) := mul_le_mul_right hprob' _ _ = max (ofReal (delta/2) * P {x | delta/2 ≤ |T x-a|}) (ofReal (delta/2) * Q {x | delta/2 ≤ |T x-b|}) := mul_max _ _ _ _ ≤ _ := max_le_max hP hQ
CausalSmith.Stat.NoisydoseWeakdesignTransition.absolute_risk_two_point_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TUniformFrontier.lean:60
theorem connected_interval_two_point_lower Lemma connected_interval_two_point_lower in the paper ↗

Connected intervals covering each of two separated laws with probability at least one minus α, whose laws are within total variation τ, have expected length at least the separation times 1 − 2α − τ. Under the stated conditions. This is the stated conclusion.

Formal statement
Ω :
C :
Ω → Set ℝ
hconnected :
∀ x, (C x).OrdConnected
hgraph :
MeasurableSet {p : Ω × ℝ | p.2 ∈ C p.1}
a b delta alpha tau :
ℝ
hdelta :
0 ≤ delta
halpha :
alpha ≤ 1
hsep :
delta ≤ |a-b|
hcoverP :
ofReal (1-alpha) ≤ P {x | a ∈ C x}
hcoverQ :
ofReal (1-alpha) ≤ Q {x | b ∈ C x}
htv :
tvDist P Q ≤ tau
ofReal (delta*(1-2*alpha-tau)) ≤ ∫⁻ x, volume (C x) ∂P
Proof (Lean source)
-- @node: connected_interval_two_point_lower lemma connected_interval_two_point_lower {Ω : Type*} [MeasurableSpace Ω] (P Q : Measure Ω) [IsProbabilityMeasure P] [IsProbabilityMeasure Q] (C : Ω → Set ℝ) (hconnected : ∀ x, (C x).OrdConnected) (hgraph : MeasurableSet {p : Ω × ℝ | p.2 ∈ C p.1}) (a b delta alpha tau : ℝ) (hdelta : 0 ≤ delta) (halpha : alpha ≤ 1) (hsep : delta ≤ |a-b|) (hcoverP : ofReal (1-alpha) ≤ P {x | a ∈ C x}) (hcoverQ : ofReal (1-alpha) ≤ Q {x | b ∈ C x}) (htv : tvDist P Q ≤ tau) : ofReal (delta*(1-2*alpha-tau)) ≤ ∫⁻ x, volume (C x) ∂P := by let A : Set Ω := {x | a ∈ C x} let B : Set Ω := {x | b ∈ C x} have hA : MeasurableSet A := hgraph.preimage (measurable_id.prodMk measurable_const) have hB : MeasurableSet B := hgraph.preimage (measurable_id.prodMk measurable_const) have hp : 1-alpha ≤ P.real A := by have h := ENNReal.toReal_mono (measure_ne_top P _) hcoverP rw [ENNReal.toReal_ofReal (by linarith)] at h exact h have hq : 1-alpha ≤ Q.real B := by have h := ENNReal.toReal_mono (measure_ne_top Q _) hcoverQ rw [ENNReal.toReal_ofReal (by linarith)] at h exact h have hgap := measureReal_sub_le_tvDist (μ := P) (ν := Q) hB have hcompA : P.real Aᶜ = 1 - P.real A := by simpa using measureReal_compl hA (μ := P) have hcompB : P.real Bᶜ = 1 - P.real B := by simpa using measureReal_compl hB (μ := P) have hcompAB : P.real (A ∩ B)ᶜ = 1 - P.real (A ∩ B) := by simpa using measureReal_compl (hA.inter hB) (μ := P) have hunion := measureReal_union_le (μ := P) Aᶜ Bᶜ rw [← Set.compl_inter] at hunion have hboth : 1-2*alpha-tau ≤ P.real (A ∩ B) := by linarith have hboth' : ofReal (1-2*alpha-tau) ≤ P (A ∩ B) := by simpa [measureReal_def] using ENNReal.ofReal_le_ofReal hboth have hlength : ∀ x ∈ A ∩ B, ofReal delta ≤ volume (C x) := by intro x hx have hsub := (hconnected x).uIcc_subset hx.1 hx.2 have hv : volume (uIcc a b) = ofReal |a-b| := by rcases le_total a b with hab | hba · rw [uIcc_of_le hab, Real.volume_Icc, abs_of_nonpos (sub_nonpos.mpr hab)] congr 1 ring · rw [uIcc_of_ge hba, Real.volume_Icc, abs_of_nonneg (sub_nonneg.mpr hba)] exact (ENNReal.ofReal_le_ofReal hsep).trans (hv ▸ measure_mono hsub) calc ofReal (delta*(1-2*alpha-tau)) = ofReal delta * ofReal (1-2*alpha-tau) := by rw [← ENNReal.ofReal_mul hdelta] _ ≤ ofReal delta * P (A ∩ B) := mul_le_mul_right hboth' _ _ = ∫⁻ x, (A ∩ B).indicator (fun _ => ofReal delta) x ∂P := (lintegral_indicator_const (hA.inter hB) _).symm _ ≤ _ := by apply lintegral_mono intro x by_cases hx : x ∈ A ∩ B · rw [Set.indicator_of_mem hx] exact hlength x hx · rw [Set.indicator_of_notMem hx] exact bot_le
CausalSmith.Stat.NoisydoseWeakdesignTransition.connected_interval_two_point_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TUniformFrontier.lean:98
theorem totalEstimator_randomized_risk

Ignoring the independent uniform seed preserves the observable estimator's absolute risk. This is the stated conclusion.

Formal statement
S :
E :
beta kappa :
ℝ
n :
ℕ
sigma :
ℝ
P :
modelClass E K beta kappa sigma
(∫⁻ z, ofReal |totalEstimator K beta kappa n sigma z.1 - causalTarget E (P.1 : Measure (StructSpace S))| ∂randomizedExperiment n sigma (P.1 : Measure (StructSpace S)))
= ofReal (∫ data, |totalEstimator K beta kappa n sigma data - causalTarget E (P.1 : Measure (StructSpace S))| ∂experiment n sigma (P.1 : Measure (StructSpace S)))
Proof (Lean source)
-- @node: totalEstimator_randomized_risk lemma totalEstimator_randomized_risk {S : Type u} [MeasurableSpace S] (E : PathSpace S) (K : ClassConstants) (beta kappa : ℝ) (n : ℕ) (sigma : ℝ) (P : modelClass E K beta kappa sigma) : (∫⁻ z, ofReal |totalEstimator K beta kappa n sigma z.1 - causalTarget E (P.1 : Measure (StructSpace S))| ∂randomizedExperiment n sigma (P.1 : Measure (StructSpace S))) = ofReal (∫ data, |totalEstimator K beta kappa n sigma data - causalTarget E (P.1 : Measure (StructSpace S))| ∂experiment n sigma (P.1 : Measure (StructSpace S))) := by haveI := experiment_isProbabilityMeasure (P.1 : Measure (StructSpace S)) n sigma have ht := causalTarget_mem_Icc E (P.1 : Measure (StructSpace S)) P.2.strataPos P.2.boundedPO P.2.meanRange have hi : Integrable (fun data => |totalEstimator K beta kappa n sigma data - causalTarget E (P.1 : Measure (StructSpace S))|) (experiment n sigma (P.1 : Measure (StructSpace S))) := by apply Integrable.of_bound (by fun_prop) 1 filter_upwards [] with data have he := totalEstimator_mem_Icc K beta kappa n sigma data rw [Real.norm_eq_abs, abs_abs] apply abs_le.mpr constructor <;> linarith [he.1, he.2, ht.1, ht.2] unfold randomizedExperiment seedLaw rw [lintegral_prod _ (by fun_prop)] simp only [lintegral_const, Measure.restrict_apply_univ, Real.volume_Icc, sub_zero, ENNReal.ofReal_one, mul_one] exact (ofReal_integral_eq_lintegral_ofReal hi (ae_of_all _ (fun _ => abs_nonneg _))).symm
CausalSmith.Stat.NoisydoseWeakdesignTransition.totalEstimator_randomized_risk · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TUniformFrontier.lean:159
theorem minimaxRisk_frontier_upper

The observable estimator is admissible for randomized minimax risk and attains its upper frontier. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
∃ C : ℝ,
conclusion 1
0 < C
conclusion 2
∃ n0 : ℕ,
∀ (S : Type u) [MeasurableSpace S],
∀ E : PathSpace S,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1/4),
minimaxRisk E K beta kappa n sigma ≤ ofReal (C * frontierRate beta kappa sigma n)
Proof (Lean source)
-- @node: minimaxRisk_frontier_upper lemma minimaxRisk_frontier_upper (K : ClassConstants) (beta kappa : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) : ∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), minimaxRisk E K beta kappa n sigma ≤ ofReal (C * frontierRate beta kappa sigma n) := by obtain ⟨C, hC, n0, hupper⟩ := observable_upper.{u} K beta kappa hbeta hkappa refine ⟨C, hC, n0, ?_⟩ intro S _ E n hn sigma hsigma let T : Estimator n := ⟨fun z => totalEstimator K beta kappa n sigma z.1, by fun_prop⟩ apply (minimaxValueENNReal_le_worstCaseRisk T).trans apply worstCaseRiskENNReal_le intro P change (∫⁻ z, ofReal |totalEstimator K beta kappa n sigma z.1 - causalTarget E (P.1 : Measure (StructSpace S))| ∂randomizedExperiment n sigma (P.1 : Measure (StructSpace S))) ≤ _ rw [totalEstimator_randomized_risk] exact ENNReal.ofReal_le_ofReal ((hupper S E n hn sigma hsigma).1 P (iidSampling_holds n sigma _))
CausalSmith.Stat.NoisydoseWeakdesignTransition.minimaxRisk_frontier_upper · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TUniformFrontier.lean:188
theorem honestLength_frontier_upper

The finite-honesty interval is admissible for the infimum defining honest expected length at noncoverage level α. This is the stated conclusion. Under the stated conditions.

Formal statement
beta kappa alpha :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
halpha :
alpha ∈ Ioo (0 : ℝ) 1
∃ C : ℝ,
conclusion 1
0 < C
conclusion 2
∃ n0 : ℕ,
∀ (S : Type u) [MeasurableSpace S],
∀ E : PathSpace S,
∀ n ≥ n0,
∀ sigma ∈ Icc (0 : ℝ) (1/4),
honestLength E K beta kappa alpha n sigma
≤ ofReal (C * frontierRate beta kappa sigma n)
Proof (Lean source)
-- @node: honestLength_frontier_upper lemma honestLength_frontier_upper (K : ClassConstants) (beta kappa alpha : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (halpha : alpha ∈ Ioo (0 : ℝ) 1) : ∃ C : ℝ, 0 < C ∧ ∃ n0 : ℕ, ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), honestLength E K beta kappa alpha n sigma ≤ ofReal (C * frontierRate beta kappa sigma n) := by obtain ⟨hcover, C, hC, n0, hlength⟩ := finite_honesty.{u} K beta kappa alpha hbeta hkappa halpha refine ⟨C, hC, n0, ?_⟩ intro S _ E n hn sigma hsigma have hh : IsHonest E K beta kappa alpha n sigma (honestIntervalProcedure K beta kappa alpha n sigma) := by intro P have hc := hcover S E n sigma hsigma P exact (ENNReal.ofReal_le_ofReal hc).trans ENNReal.ofReal_toReal_le unfold honestLength apply (iInf_le _ ⟨honestIntervalProcedure K beta kappa alpha n sigma, hh⟩).trans exact iSup_le (fun P => hlength S E n hn sigma hsigma P)
CausalSmith.Stat.NoisydoseWeakdesignTransition.honestLength_frontier_upper · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TUniformFrontier.lean:210
theorem frontierRate_nonneg

Every branch of the frontier is nonnegative on the public noise domain for nonzero samples. Under the stated conditions. This is the stated conclusion.

Formal statement
beta kappa sigma :
ℝ
n :
ℕ
hn :
1 ≤ n
hsigma :
0 ≤ sigma
0 ≤ frontierRate beta kappa sigma n
Proof (Lean source)
-- @node: frontierRate_nonneg lemma frontierRate_nonneg (beta kappa sigma : ℝ) (n : ℕ) (hn : 1 ≤ n) (hsigma : 0 ≤ sigma) : 0 ≤ frontierRate beta kappa sigma n := by have hnreal : (1 : ℝ) ≤ n := by exact_mod_cast hn have hlog : 0 ≤ logScale n := Real.log_nonneg (one_le_mul_of_one_le_of_one_le (Real.one_le_exp (by norm_num)) hnreal) apply Real.rpow_nonneg unfold frontierScale split_ifs · exact Real.rpow_nonneg (Nat.cast_nonneg n) _ · exact div_nonneg hsigma (Real.sqrt_nonneg _) · apply div_nonneg _ hlog apply Real.log_nonneg have hprod : 0 ≤ sigma^2 * logScale n := mul_nonneg (sq_nonneg sigma) hlog have hexp : (1 : ℝ) ≤ exp 1 := Real.one_le_exp (by norm_num) linarith
CausalSmith.Stat.NoisydoseWeakdesignTransition.frontierRate_nonneg · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TUniformFrontier.lean:232
theorem frontier_both_lower

The observed separated witnesses imply both uniform minimax and honest-length floors at any noncoverage level below one half. Under the stated conditions. This is the stated conclusion.

Formal statement
hLocalization_of_gate :
hLipschitz_of_gate :
hNorm_of_gate :
hGamma_of_gate :
beta kappa alpha :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
halpha :
alpha ∈ Ioo (0 : ℝ) (1/2)
hK :
K.clo ≤ (kappa+1)*(2 : ℝ)^kappa ∧ (kappa+1)*(2 : ℝ)^kappa ≤ K.chi
∃ c : ℝ,
0 < c
conclusion 1
∃ n0 : ℕ,
1 ≤ n0
S :
Type u
E :
n ≥ n0 :
sigma ∈ Icc (0 : ℝ) (1/4) :
ofReal (c * frontierRate beta kappa sigma n) ≤ minimaxRisk E K beta kappa n sigma
ofReal (c * frontierRate beta kappa sigma n)
≤ honestLength E K beta kappa alpha n sigma
Proof (Lean source)
-- @node: frontier_both_lower lemma frontier_both_lower (hLocalization_of_gate : FilteredJacobiLocalization) (hLipschitz_of_gate : FilteredJacobiLipschitz) (hNorm_of_gate : JacobiNormOrthogonality) (hGamma_of_gate : GammaRatioAsymptotic) (K : ClassConstants) (beta kappa alpha : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (halpha : alpha ∈ Ioo (0 : ℝ) (1/2)) (hK : K.clo ≤ (kappa+1)*(2 : ℝ)^kappa ∧ (kappa+1)*(2 : ℝ)^kappa ≤ K.chi) : ∃ c : ℝ, 0 < c ∧ ∃ n0 : ℕ, 1 ≤ n0 ∧ ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ∀ sigma ∈ Icc (0 : ℝ) (1/4), ofReal (c * frontierRate beta kappa sigma n) ≤ minimaxRisk E K beta kappa n sigma ∧ ofReal (c * frontierRate beta kappa sigma n) ≤ honestLength E K beta kappa alpha n sigma := by let tau : ℝ := min (1/5) ((1-2*alpha)/2) have htau : 0 < tau := lt_min (by norm_num) (by linarith [halpha.2]) have htau5 : tau ≤ 1/5 := min_le_left _ _ have htauA : tau ≤ 1-2*alpha-tau := by have := min_le_right (1/5 : ℝ) ((1-2*alpha)/2) linarith obtain ⟨c, C, epsilon, Cpacket, cPacket, hc, hC, hepsilon, hCpacket, hcPacket, hpacket, n0, hwitness⟩ := observed_lower.{u} hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate K beta kappa hbeta hkappa hK tau htau refine ⟨c*tau, mul_pos hc htau, max n0 1, le_max_right _ _, ?_⟩ intro S _ E n hn sigma hsigma obtain ⟨Pplus, Pminus, Pstar, hp, hm, hs, hbp, hbm, hbs, hlegal, hdesign, hdesignStar, hsep, htv, hconstruction⟩ := hwitness S E n ((le_max_left _ _).trans hn) sigma hsigma let pp : modelClass E K beta kappa sigma := ⟨Pplus, hp⟩ let pm : modelClass E K beta kappa sigma := ⟨Pminus, hm⟩ have hrho := frontierRate_nonneg beta kappa sigma n ((le_max_right _ _).trans hn) hsigma.1 have hdelta : 0 ≤ c * frontierRate beta kappa sigma n := mul_nonneg hc.le hrho have := experiment_isProbabilityMeasure (Pplus : Measure (StructSpace S)) n sigma have := experiment_isProbabilityMeasure (Pminus : Measure (StructSpace S)) n sigma have : IsProbabilityMeasure seedLaw := by constructor norm_num [seedLaw, Measure.restrict_apply_univ, Real.volume_Icc] have : IsProbabilityMeasure (randomizedExperiment n sigma (Pplus : Measure (StructSpace S))) := by unfold randomizedExperiment infer_instance have : IsProbabilityMeasure (randomizedExperiment n sigma (Pminus : Measure (StructSpace S))) := by unfold randomizedExperiment infer_instance have htvSeed : tvDist (randomizedExperiment n sigma (Pplus : Measure (StructSpace S))) (randomizedExperiment n sigma (Pminus : Measure (StructSpace S))) ≤ 1/5 := (tvDist_common_seed_le _ _ seedLaw).trans (htv.trans htau5) have hrisk : ofReal ((c * frontierRate beta kappa sigma n)/5) ≤ minimaxRisk E K beta kappa n sigma := by apply Causalean.Stat.le_minimaxValueENNReal_of_two_point pp pm intro T exact absolute_risk_two_point_lower _ _ T.1 T.2 _ _ _ hdelta hsep htvSeed have hlen : ofReal ((c * frontierRate beta kappa sigma n)*(1-2*alpha-tau)) ≤ honestLength E K beta kappa alpha n sigma := by unfold honestLength apply le_iInf intro CI apply le_iSup_of_le pp have hcoverP := CI.2 pp have hcoverM := CI.2 pm exact connected_interval_two_point_lower _ _ CI.1.C CI.1.connected CI.1.measurable _ _ _ alpha tau hdelta (by linarith [halpha.2]) hsep hcoverP hcoverM htv constructor · refine le_trans (ENNReal.ofReal_le_ofReal ?_) hrisk nlinarith [mul_le_mul_of_nonneg_left htau5 hdelta] · refine le_trans (ENNReal.ofReal_le_ofReal ?_) hlen nlinarith [mul_le_mul_of_nonneg_left htauA hdelta]
CausalSmith.Stat.NoisydoseWeakdesignTransition.frontier_both_lower · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TUniformFrontier.lean:250
theorem uniform_frontier

Assuming the four cited Jacobi-packet facts, for any public class constants whose envelope constants bracket the power-density coefficient (κ+1)2^κ, smoothness exponent positive and at most one, design exponent between zero and two and noncoverage level strictly between zero and one half, minimax absolute risk and honest expected connected length at that level share the full uniform three-regime frontier, its elbows, and the fixed-positive-noise order; the constants depend on the noncoverage level and on the class constants.

Formal statement
hLocalization_of_gate :
hLipschitz_of_gate :
hNorm_of_gate :
hGamma_of_gate :
beta kappa alpha :
ℝ
hbeta :
beta ∈ Ioc (0 : ℝ) 1
hkappa :
kappa ∈ Icc (0 : ℝ) 2
halpha :
alpha ∈ Ioo (0 : ℝ) (1/2)
@realizes alpha(public noncoverage level below one half for the frontier)
hK :
K.clo ≤ (kappa+1)*(2 : ℝ)^kappa ∧ (kappa+1)*(2 : ℝ)^kappa ≤ K.chi
conclusion 1
∃ c C : ℝ,
0 < c
c < C
∃ n0 : ℕ,
∀ (S : Type u) [MeasurableSpace S],
∀ E : PathSpace S,
∀ n ≥ n0,
(∀ sigma ∈ Icc (0 : ℝ) (1/4), ofReal (c*frontierRate beta kappa sigma n) ≤ minimaxRisk E K beta kappa n sigma ∧ minimaxRisk E K beta kappa n sigma ≤ ofReal (C*frontierRate beta kappa sigma n) ∧ ofReal (c*frontierRate beta kappa sigma n) ≤ honestLength E K beta kappa alpha n sigma ∧ honestLength E K beta kappa alpha n sigma ≤ ofReal (C*frontierRate beta kappa sigma n)) ∧
(directScale beta kappa n ≤ C*fourierScale beta kappa (directScale beta kappa n) n ∧ fourierScale beta kappa (directScale beta kappa n) n ≤ C*directScale beta kappa n) ∧
(fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n ≤ C*polynomialScale ((logScale n)^(-1/2 : ℝ)) n ∧ polynomialScale ((logScale n)^(-1/2 : ℝ)) n ≤ C*fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n)
conclusion 2
W :
ℝ
1 ≤ W
∃ CK : ℝ,
1 ≤ CK
∃ nK : ℕ,
∀ n ≥ nK,
0 < directScale beta kappa n / W ∧
W * directScale beta kappa n ≤ 1/4 ∧
0 < (logScale n)^(-1/2 : ℝ) / W ∧
W * (logScale n)^(-1/2 : ℝ) ≤ 1/4 ∧
(∀ sigma ∈ Icc (directScale beta kappa n / W) (W * directScale beta kappa n), CK⁻¹ * directScale beta kappa n ≤ fourierScale beta kappa sigma n ∧ fourierScale beta kappa sigma n ≤ CK * directScale beta kappa n) ∧
(∀ sigma ∈ Icc ((logScale n)^(-1/2 : ℝ) / W) (W * (logScale n)^(-1/2 : ℝ)), CK⁻¹ * polynomialScale sigma n ≤ fourierScale beta kappa sigma n ∧ fourierScale beta kappa sigma n ≤ CK * polynomialScale sigma n)
conclusion 3
sigma ∈ Ioc (0 : ℝ) (1/4) :
∃ c C : ℝ,
0 < c
c < C
∃ n0 : ℕ,
∀ (S : Type u) [MeasurableSpace S],
∀ E : PathSpace S,
∀ n ≥ n0,
ofReal (c*(log (log n)/log n)^beta)
≤ minimaxRisk E K beta kappa n sigma ∧
minimaxRisk E K beta kappa n sigma
≤ ofReal (C*(log (log n)/log n)^beta) ∧
ofReal (c*(log (log n)/log n)^beta)
≤ honestLength E K beta kappa alpha n sigma ∧
honestLength E K beta kappa alpha n sigma
≤ ofReal (C*(log (log n)/log n)^beta)
Proof (Lean source)
-- @node: thm:uniform-frontier theorem uniform_frontier (hLocalization_of_gate : FilteredJacobiLocalization) (hLipschitz_of_gate : FilteredJacobiLipschitz) (hNorm_of_gate : JacobiNormOrthogonality) (hGamma_of_gate : GammaRatioAsymptotic) (K : ClassConstants) (beta kappa alpha : ℝ) (hbeta : beta ∈ Ioc (0 : ℝ) 1) (hkappa : kappa ∈ Icc (0 : ℝ) 2) (halpha : alpha ∈ Ioo (0 : ℝ) (1/2)) -- @realizes alpha(public noncoverage level below one half for the frontier) (hK : K.clo ≤ (kappa+1)*(2 : ℝ)^kappa ∧ (kappa+1)*(2 : ℝ)^kappa ≤ K.chi) : (∃ c C : ℝ, 0 < c ∧ c < C ∧ ∃ n0 : ℕ, ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, (∀ sigma ∈ Icc (0 : ℝ) (1/4), ofReal (c*frontierRate beta kappa sigma n) ≤ minimaxRisk E K beta kappa n sigma ∧ minimaxRisk E K beta kappa n sigma ≤ ofReal (C*frontierRate beta kappa sigma n) ∧ ofReal (c*frontierRate beta kappa sigma n) ≤ honestLength E K beta kappa alpha n sigma ∧ honestLength E K beta kappa alpha n sigma ≤ ofReal (C*frontierRate beta kappa sigma n)) ∧ (directScale beta kappa n ≤ C*fourierScale beta kappa (directScale beta kappa n) n ∧ fourierScale beta kappa (directScale beta kappa n) n ≤ C*directScale beta kappa n) ∧ (fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n ≤ C*polynomialScale ((logScale n)^(-1/2 : ℝ)) n ∧ polynomialScale ((logScale n)^(-1/2 : ℝ)) n ≤ C*fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n)) ∧ (∀ W : ℝ, 1 ≤ W → ∃ CK : ℝ, 1 ≤ CK ∧ ∃ nK : ℕ, ∀ n ≥ nK, 0 < directScale beta kappa n / W ∧ W * directScale beta kappa n ≤ 1/4 ∧ 0 < (logScale n)^(-1/2 : ℝ) / W ∧ W * (logScale n)^(-1/2 : ℝ) ≤ 1/4 ∧ (∀ sigma ∈ Icc (directScale beta kappa n / W) (W * directScale beta kappa n), CK⁻¹ * directScale beta kappa n ≤ fourierScale beta kappa sigma n ∧ fourierScale beta kappa sigma n ≤ CK * directScale beta kappa n) ∧ (∀ sigma ∈ Icc ((logScale n)^(-1/2 : ℝ) / W) (W * (logScale n)^(-1/2 : ℝ)), CK⁻¹ * polynomialScale sigma n ≤ fourierScale beta kappa sigma n ∧ fourierScale beta kappa sigma n ≤ CK * polynomialScale sigma n)) ∧ (∀ sigma ∈ Ioc (0 : ℝ) (1/4), ∃ c C : ℝ, 0 < c ∧ c < C ∧ ∃ n0 : ℕ, ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, ofReal (c*(log (log n)/log n)^beta) ≤ minimaxRisk E K beta kappa n sigma ∧ minimaxRisk E K beta kappa n sigma ≤ ofReal (C*(log (log n)/log n)^beta) ∧ ofReal (c*(log (log n)/log n)^beta) ≤ honestLength E K beta kappa alpha n sigma ∧ honestLength E K beta kappa alpha n sigma ≤ ofReal (C*(log (log n)/log n)^beta)) := by obtain ⟨CR, hCR, nR, hRiskUpper⟩ := minimaxRisk_frontier_upper.{u} K beta kappa hbeta hkappa obtain ⟨CH, hCH, nH, hLengthUpper⟩ := honestLength_frontier_upper.{u} K beta kappa alpha hbeta hkappa ⟨halpha.1, by linarith [halpha.2]⟩ constructor · obtain ⟨c, hc, nL, hnL1, hlower⟩ := frontier_both_lower.{u} hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate K beta kappa alpha hbeta hkappa halpha hK -- The second-elbow scales are comparable by the logarithmic denominator bounds. have hSecondElbow : ∃ CE : ℝ, 0 < CE ∧ ∃ nE : ℕ, ∀ n ≥ nE, fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n ≤ CE * polynomialScale ((logScale n)^(-1/2 : ℝ)) n ∧ polynomialScale ((logScale n)^(-1/2 : ℝ)) n ≤ CE * fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n := by apply secondElbow_comparison beta kappa unfold effDim linarith [hbeta.1, hkappa.1] obtain ⟨CE, hCE, nE, hsecond⟩ := hSecondElbow have hLowerAndSecondElbow : ∃ c C : ℝ, 0 < c ∧ c < C ∧ CR ≤ C ∧ CH ≤ C ∧ sqrt (log (exp 1 + 1)) ≤ C ∧ 1 / sqrt (log (exp 1 + 1)) ≤ C ∧ ∃ n0 : ℕ, nR ≤ n0 ∧ nH ≤ n0 ∧ 1 ≤ n0 ∧ ∀ (S : Type u) [MeasurableSpace S], ∀ E : PathSpace S, ∀ n ≥ n0, (∀ sigma ∈ Icc (0 : ℝ) (1/4), ofReal (c * frontierRate beta kappa sigma n) ≤ minimaxRisk E K beta kappa n sigma ∧ ofReal (c * frontierRate beta kappa sigma n) ≤ honestLength E K beta kappa alpha n sigma) ∧ (fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n ≤ C * polynomialScale ((logScale n)^(-1/2 : ℝ)) n ∧ polynomialScale ((logScale n)^(-1/2 : ℝ)) n ≤ C * fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n) := by let C := max CR (max CH (max (sqrt (log (exp 1 + 1))) (max (1 / sqrt (log (exp 1 + 1))) (max CE (c+1))))) have hCRle : CR ≤ C := by simp only [C, le_max_iff, le_refl, true_or] have hCHle : CH ≤ C := by simp only [C, le_max_iff, le_refl, or_true, true_or] have hrootle : sqrt (log (exp 1 + 1)) ≤ C := by simp only [C, le_max_iff, le_refl, or_true, true_or] have hinvle : 1 / sqrt (log (exp 1 + 1)) ≤ C := by simp only [C, le_max_iff, le_refl, or_true, true_or] have hCEle : CE ≤ C := by simp only [C, le_max_iff, le_refl, or_true, true_or] have hcC : c < C := by have : c+1 ≤ C := by simp only [C, le_max_iff, le_refl, or_true] linarith let n0 := max nR (max nH (max nL nE)) have hnR : nR ≤ n0 := by omega have hnH : nH ≤ n0 := by omega have hnL : nL ≤ n0 := by omega have hnE : nE ≤ n0 := by omega refine ⟨c, C, hc, hcC, hCRle, hCHle, hrootle, hinvle, n0, hnR, hnH, hnL1.trans hnL, ?_⟩ intro S _ E n hn refine ⟨hlower S E n (hnL.trans hn), ?_⟩ have hnreal : (1 : ℝ) ≤ n := by exact_mod_cast (hnL1.trans (hnL.trans hn)) have hlog : 0 ≤ logScale n := Real.log_nonneg (one_le_mul_of_one_le_of_one_le (Real.one_le_exp (by norm_num)) hnreal) have hp : 0 ≤ polynomialScale ((logScale n)^(-1/2 : ℝ)) n := by apply div_nonneg _ hlog apply Real.log_nonneg have hx : 0 ≤ ((logScale n)^(-1/2 : ℝ))^2 * logScale n := mul_nonneg (sq_nonneg _) hlog have hexp : (1 : ℝ) ≤ exp 1 := Real.one_le_exp (by norm_num) linarith have hf : 0 ≤ fourierScale beta kappa ((logScale n)^(-1/2 : ℝ)) n := div_nonneg (Real.rpow_nonneg hlog _) (Real.sqrt_nonneg _) obtain ⟨hfp, hpf⟩ := hsecond n (hnE.trans hn) exact ⟨hfp.trans (mul_le_mul_of_nonneg_right hCEle hp), hpf.trans (mul_le_mul_of_nonneg_right hCEle hf)⟩ obtain ⟨c, C, hc, hcC, hCRle, hCHle, hrootle, hinvle, n0, hnR, hnH, hn1, hremaining⟩ := hLowerAndSecondElbow refine ⟨c, C, hc, hcC, n0, ?_⟩ intro S _ E n hn obtain ⟨hlower, helbow2⟩ := hremaining S E n hn have hd : effDim beta kappa ≠ 0 := by unfold effDim linarith [hbeta.1, hkappa.1] have helbow1 := direct_fourier_elbow_comparison beta kappa C n hd (hn1.trans hn) hrootle hinvle refine ⟨?_, helbow1, helbow2⟩ intro sigma hsigma have hrho := frontierRate_nonneg beta kappa sigma n (hn1.trans hn) hsigma.1 obtain ⟨hRiskLower, hLengthLower⟩ := hlower sigma hsigma refine ⟨hRiskLower, ?_, hLengthLower, ?_⟩ · exact (hRiskUpper S E n (hnR.trans hn) sigma hsigma).trans (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hCRle hrho)) · exact (hLengthUpper S E n (hnH.trans hn) sigma hsigma).trans (ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hCHle hrho)) · constructor · intro W hW apply frontier_transition_windows beta kappa _ W hW unfold effDim linarith [hbeta.1, hkappa.1] · intro sigma hsigma have hb : 0 ≤ beta := by linarith [hbeta.1] have hd : 0 < effDim beta kappa := by unfold effDim linarith [hbeta.1, hkappa.1] obtain ⟨nF, hF⟩ := eventually_atTop.1 (fixedNoise_frontierRate_bounds beta kappa sigma hb hd hsigma.1) obtain ⟨cL, hcL, nL, hnL, hlower⟩ := frontier_both_lower.{u} hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate K beta kappa alpha hbeta hkappa halpha hK let c := cL * (1/4 : ℝ)^beta let C := max (max CR CH * (2 : ℝ)^beta) c + 1 have hc : 0 < c := mul_pos hcL (Real.rpow_pos_of_pos (by norm_num) _) have hcC : c < C := by dsimp [C] linarith [le_max_right (max CR CH * (2 : ℝ)^beta) c] have hC : max CR CH * (2 : ℝ)^beta ≤ C := by dsimp [C] linarith [le_max_left (max CR CH * (2 : ℝ)^beta) c] refine ⟨c, C, hc, hcC, max nF (max nL (max nR nH)), ?_⟩ intro S _ E n hn have hnF := (le_max_left nF (max nL (max nR nH))).trans hn have hnLR := (le_max_right nF (max nL (max nR nH))).trans hn have hnL' := (le_max_left nL (max nR nH)).trans hnLR have hnRH := (le_max_right nL (max nR nH)).trans hnLR have hnR' := (le_max_left nR nH).trans hnRH have hnH' := (le_max_right nR nH).trans hnRH obtain ⟨ht, hrateLo, hrateHi⟩ := hF n hnF have hs : sigma ∈ Icc (0 : ℝ) (1/4) := ⟨hsigma.1.le, hsigma.2⟩ refine ⟨?_, ?_, ?_, ?_⟩ · apply (ENNReal.ofReal_le_ofReal ?_).trans (hlower S E n hnL' sigma hs).1 calc c * (log (log n) / log n)^beta = cL * ((1/4 : ℝ)^beta * (log (log n) / log n)^beta) := by dsimp [c]; ring _ ≤ cL * frontierRate beta kappa sigma n := mul_le_mul_of_nonneg_left hrateLo hcL.le · apply (hRiskUpper S E n hnR' sigma hs).trans (ENNReal.ofReal_le_ofReal ?_) calc CR * frontierRate beta kappa sigma n ≤ CR * ((2 : ℝ)^beta * (log (log n) / log n)^beta) := mul_le_mul_of_nonneg_left hrateHi hCR.le _ = (CR * (2 : ℝ)^beta) * (log (log n) / log n)^beta := by ring _ ≤ C * (log (log n) / log n)^beta := mul_le_mul_of_nonneg_right ((mul_le_mul_of_nonneg_right (le_max_left CR CH) (by positivity)).trans hC) ht · apply (ENNReal.ofReal_le_ofReal ?_).trans (hlower S E n hnL' sigma hs).2 calc c * (log (log n) / log n)^beta = cL * ((1/4 : ℝ)^beta * (log (log n) / log n)^beta) := by dsimp [c]; ring _ ≤ cL * frontierRate beta kappa sigma n := mul_le_mul_of_nonneg_left hrateLo hcL.le · apply (hLengthUpper S E n hnH' sigma hs).trans (ENNReal.ofReal_le_ofReal ?_) calc CH * frontierRate beta kappa sigma n ≤ CH * ((2 : ℝ)^beta * (log (log n) / log n)^beta) := mul_le_mul_of_nonneg_left hrateHi hCH.le _ = (CH * (2 : ℝ)^beta) * (log (log n) / log n)^beta := by ring _ ≤ C * (log (log n) / log n)^beta := mul_le_mul_of_nonneg_right ((mul_le_mul_of_nonneg_right (le_max_right CR CH) (by positivity)).trans hC) ht
CausalSmith.Stat.NoisydoseWeakdesignTransition.uniform_frontier · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TUniformFrontier.lean:318
CausalSmith.Stat.STAT_NoisydoseWeakdesignTransition_Research.TWeightedPacketConstruction 1 declarations TWeightedPacketConstruction

TWeightedPacketConstruction

theorem weighted_packet_construction

Conditional on the four disclosed classical gates, the explicit normalized packet has every stated weighted bound and cancellation. Under the stated conditions. This is the stated conclusion.

Formal statement
hLocalization_of_gate :
hLipschitz_of_gate :
hNorm_of_gate :
hGamma_of_gate :
kappa ∈ Icc (0 : ℝ) 2 :
∃ C c : ℝ,
0 < C
0 < c
conclusion 1
m :
ℕ
4 ≤ m
PacketBounds kappa C c m
Proof (Lean source)
-- @node: thm:weighted-packet-construction theorem weighted_packet_construction (hLocalization_of_gate : FilteredJacobiLocalization) (hLipschitz_of_gate : FilteredJacobiLipschitz) (hNorm_of_gate : JacobiNormOrthogonality) (hGamma_of_gate : GammaRatioAsymptotic) : ∀ kappa ∈ Icc (0 : ℝ) 2, -- @realizes kappa(fixed degeneracy exponent in [0,2]) ∃ C c : ℝ, 0 < C ∧ 0 < c ∧ ∀ m : ℕ, 4 ≤ m → PacketBounds kappa C c m := by -- @realizes m(packet degrees m≥4) intro kappa hkappa by_cases hpos : 0 < kappa · exact packetendpoint_bounds hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate kappa ⟨hpos, hkappa.2⟩ · have hzero : kappa = 0 := le_antisymm (le_of_not_gt hpos) hkappa.1 exact packetinterior_bounds hLocalization_of_gate hLipschitz_of_gate hNorm_of_gate hGamma_of_gate kappa hzero
CausalSmith.Stat.NoisydoseWeakdesignTransition.weighted_packet_construction · CausalSmith/Stat/STAT_NoisydoseWeakdesignTransition_Research/TWeightedPacketConstruction.lean:18