Formalization: Minimax Excess Variance with Smooth Pairwise Interactions in Randomized Experiments

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 (1efc342) — statements may have moved since the audit.

CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Basic 63 declarations The continuous covariate world uses Mathlib kernels; the finite-design substrate does not carry covariate-dependent assignment.

Bivariate Sobolev design capacity: carriers and constructions

The continuous covariate world uses Mathlib kernels; the finite-design substrate does not carry covariate-dependent assignment. The minimax functional reuses Causalean's extended nonnegative API. All paper-owned proof obligations are left to the proof-filling stage.

def Cube

[ Ambient coordinates; the sampling measure is supported on the unit cube.

Definition (Lean source)
d :
ℕ
Cube d :
Type
Fin d → ℝ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Cube · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:36
def UnitIdx

Unit indices.

Definition (Lean source)
n :
ℕ
UnitIdx n :
Type
Fin n
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.UnitIdx · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:38
def CoordIdx

Coordinate indices.

Definition (Lean source)
d :
ℕ
CoordIdx d :
Type
Fin d
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.CoordIdx · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:40

Product uniform measure, including the zero-dimensional convention.

Definition (Lean source)
d :
ℕ
cubeMeasure d :
Measure (Cube d)
Measure.pi (fun _ => volume.restrict (Icc (0 : ℝ) 1))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cubeMeasure · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:42

Finite-valued Borel centered square-integrable representatives.

Definition (Lean source)
d :
ℕ
CenteredL2Fn d :
Type
{m : Cube d → ℝ // Measurable m ∧ MemLp m 2 (cubeMeasure d) ∧ ∫ x, m x ∂cubeMeasure d = 0}
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.CenteredL2Fn · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:46
def g1

Canonical main effect, integrating the unused coordinates.

Definition (Lean source)
d :
ℕ
shared
m :
Cube d → ℝ
j :
Fin d
u :
ℝ
g1 m j u :
ℝ
∫ y, m (update y j u) ∂cubeMeasure d
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g1 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:51
def g2

Canonical pair effect, subtracting the two main effects.

Definition (Lean source)
d :
ℕ
shared
m :
Cube d → ℝ
j l :
Fin d
u v :
ℝ
g2 m j l u v :
ℝ
(∫ y, m (update (update y j u) l v) ∂cubeMeasure d)
- g1 m j u
- g1 m l v
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g2 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:54
def euclideanCube

The closed unit cube in Euclidean coordinates.

Definition (Lean source)
p :
ℕ
euclideanCube p :
{u | ∀ h, u h ∈ Icc (0 : ℝ) 1}
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.euclideanCube · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:58
def Fourier

The unitary angular-frequency Fourier integral, initially on integrable extensions.

Definition (Lean source)
p :
ℕ
shared
G :
EuclideanSpace ℝ (Fin p) → ℂ
ω :
Fourier G ω :
ℂ
(2 * pi) ^ (-(p : ℝ) / 2) • ∫ u, exp (-I * ((∑ h, ω h * u h : ℝ) : ℂ)) * G u
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fourier · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:61
def sobolevNormSq

Squared restriction norm, as an extension infimum of weighted Fourier energy. The integrable extensions give the same infimum by cutoff approximation; the squared functional is used directly, avoiding an accidental fourth power in the pooled budget.

Definition (Lean source)
p :
ℕ
s :
ℝ
g :
Cube p → ℝ
sobolevNormSq p s g :
ℝ≥0∞
⨅ (G : EuclideanSpace ℝ (Fin p) → ℂ) (_ : Integrable G volume ∧ MemLp G 2 volume ∧ G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun h => u h) : ℂ)), ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.sobolevNormSq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:68
def OrderTwo

Exact canonical order-two ANOVA with zero intercept.

Definition (Lean source)
d :
ℕ
shared
m :
OrderTwo m :
Prop
m.val
=ᵐ[cubeMeasure d] fun x => (∑ j, g1 m.val j (x j))
+ ∑ j, ∑ l, if j < l then g2 m.val j l (x j) (x l) else 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.OrderTwo · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:79
def PooledBudget

The pooled squared component restriction norms have total budget one.

Definition (Lean source)
d :
ℕ
shared
s :
ℝ
m :
PooledBudget s m :
Prop
(∑ j, sobolevNormSq 1 s (fun u => g1 m.val j (u 0)))
+ (∑ j, ∑ l, if j < l then sobolevNormSq 2 s (fun u => g2 m.val j l (u 0) (u 1)) else 0)
≤ 1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.PooledBudget · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:86
structure SobolevClass

Centered bivariate outcomes with the exact ANOVA decomposition and pooled budget.

Definition (Lean source)
d :
ℕ
s :
ℝ
m :
orderTwo :
pooledBudget :
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.SobolevClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:93
def Signs

A Bool represents a sign; true is +1 and false is −1.

Definition (Lean source)
n :
ℕ
Signs n :
Type
Fin n → Bool
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Signs · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:100
instance signsStandardBorel

The finite sign space is standard Borel.

Definition (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signsStandardBorel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:102

The real sign associated with a coin.

Definition (Lean source)
b :
sgn b :
ℝ
if b then 1 else -1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.sgn · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:104
def Covariates

Covariate arrays.

Definition (Lean source)
n d :
ℕ
Covariates n d :
Type
Fin n → Cube d
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Covariates · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:106
instance covariatesStandardBorel

The covariate array is standard Borel.

Definition (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.covariatesStandardBorel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:108

Independent uniform original covariates.

Definition (Lean source)
n d :
ℕ
covLaw n d :
Measure.pi (fun _ => cubeMeasure d)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.covLaw · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:111
def Sched

Pre-assignment schedules, with control first and treatment second.

Definition (Lean source)
n :
ℕ
Sched n :
Type
Fin n → ℝ × ℝ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Sched · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:114
instance schedStandardBorel

The schedule space is standard Borel.

Definition (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.schedStandardBorel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:116

Joint law drawing a schedule before drawing covariate-only assignment.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
μX :
κ :
π :
experimentLaw μX κ π :
Measure ((Covariates n d × Sched n) × Signs n)
(μX ⊗ₘ κ) ⊗ₘ (π.comap fst measurable_fst)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.experimentLaw · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:118

Independent uniform covariates on an arbitrary sampling space.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
Ω :
Type u_1
shared
μ :
X :
Ω → Covariates n d
UniformDraw μ X :
Prop
clause 1
clause 2
μ.map X = covLaw n d
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.UniformDraw · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:127

Unitwise conditional zero sign means under the original cube-supported sampling law. Null-set representatives and values outside the sampled cube are unrestricted.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
π :
FairKernel π :
Prop
∀ᵐ x ∂covLaw n d, ∀ i, ∫ z, sgn (z i) ∂π x = 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.FairKernel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:132

Pointwise fairness, used internally for concrete constructions and the cited carrier.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
π :
x i :
PointwiseFairKernel π :
Prop
∫ z, sgn (z i) ∂π x = 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.PointwiseFairKernel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:137
def OutcomeIndependentKernel Assumption 5 in the paper ↗

Assignment is conditionally independent of every pre-assignment outcome mechanism.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
π :
hπ :
μX :
κ :
hκ :
OutcomeIndependentKernel π :
Prop
letI := hπ; letI := hμ; letI := hκ letI : IsProbabilityMeasure (experimentLaw μX κ π) := inferInstanceAs (IsProbabilityMeasure ((μX ⊗ₘ κ) ⊗ₘ (π.comap fst measurable_fst))) CondIndepFun (comap (fun ω : (Covariates n d × Sched n) × Signs n => ω.1.1) inferInstance) (measurable_fst.fst.comap_le) (fun ω => ω.2) (fun ω => ω.1.2) (experimentLaw μX κ π)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.OutcomeIndependentKernel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:143

Borel probability assignment kernels, with no outcomes in the input.

Definition (Lean source)
n d :
ℕ
Design n d :
Type
{π : Kernel (Covariates n d) (Signs n) // IsMarkovKernel π}
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Design · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:156
structure DesignClass

Fair outcome-independent original-sample designs.

Definition (Lean source)
n d :
ℕ
π :
Design n d
fair :
FairKernel π.val
outcomeIndep :
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.DesignClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:161
def fairSigns

Independent fair signs.

Definition (Lean source)
n :
ℕ
fairSigns n :
(uniformOfFintype (Signs n)).toMeasure
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSigns · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:166

The independent-sign law is a probability measure.](goal) This uses the stated conclusion.

Formal statement
n :
ℕ
Proof (Lean source)
-- @node: fairSigns_probability lemma fairSigns_probability (n : ℕ) : IsProbabilityMeasure (fairSigns n) := by unfold fairSigns infer_instance
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSigns_probability · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:168

[ The independent-sign branch, constant in the covariates.

Definition (Lean source)
n d :
ℕ
fairSignKernel n d :
Design n d
letI := fairSigns_probability n ⟨Kernel.const (Covariates n d) (fairSigns n), inferInstance⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSignKernel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:173
theorem fairSigns_mean_zero

Uniform signs have zero marginal means by the sign-reversal involution.](goal) This uses the stated conclusion.

Formal statement
n :
ℕ
i :
Fin n
∫ z, sgn (z i) ∂fairSigns n = 0
Proof (Lean source)
-- @node: fairSigns_mean_zero lemma fairSigns_mean_zero (n : ℕ) (i : Fin n) : ∫ z, sgn (z i) ∂fairSigns n = 0 := by letI := fairSigns_probability n rw [integral_fintype (Integrable.of_finite)] simp only [Measure.real, fairSigns, PMF.toMeasure_apply_singleton _ _ (measurableSet_singleton _), PMF.uniformOfFintype_apply, smul_eq_mul] let e : Signs n ≃ Signs n := { toFun := fun z j => !(z j) invFun := fun z j => !(z j) left_inv := by intro z; funext j; simp right_inv := by intro z; funext j; simp } have hsum := e.sum_comp (fun z => ((card (Signs n) : ℝ≥0∞)⁻¹).toReal * sgn (z i)) have hneg (z : Signs n) : sgn (e z i) = -sgn (z i) := by change sgn (!(z i)) = -sgn (z i) cases z i <;> norm_num [sgn] simp only [hneg, mul_neg, Finset.sum_neg_distrib] at hsum linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSigns_mean_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:177
theorem pointwiseFairRepresentative

Every almost-everywhere fair design has a pointwise fair null-equivalent representative. This changes a representative for proof purposes, not membership in the public design class. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
d :
ℕ
shared
π :
Design n d
hfair :
FairKernel π.val
∃ ρ : Design n d,
conclusion 1
conclusion 2
(fun x => ρ.val x) =ᵐ[covLaw n d] (fun x => π.val x)
Proof (Lean source)
-- @node: pointwiseFairRepresentative lemma pointwiseFairRepresentative (π : Design n d) (hfair : FairKernel π.val) : ∃ ρ : Design n d, PointwiseFairKernel ρ.val ∧ (fun x => ρ.val x) =ᵐ[covLaw n d] (fun x => π.val x) := by classical letI : IsMarkovKernel π.val := π.property letI : IsMarkovKernel (fairSignKernel n d).val := (fairSignKernel n d).property let good : Set (Covariates n d) := {x | ∀ i, ∫ z, sgn (z i) ∂π.val x = 0} have hgood : MeasurableSet good := by change MeasurableSet {x | ∀ i, ∫ z, sgn (z i) ∂π.val x = 0} simp only [setOf_forall] apply MeasurableSet.iInter intro i have hm : Measurable (fun x : Covariates n d => ∫ z, sgn (z i) ∂π.val x) := by have hz : Measurable (fun z : Signs n => sgn (z i)) := by fun_prop exact (hz.stronglyMeasurable.integral_kernel (κ := π.val)).measurable exact measurableSet_eq_fun hm measurable_const let ρ : Design n d := ⟨Kernel.piecewise hgood π.val (fairSignKernel n d).val, inferInstance⟩ refine ⟨ρ, ?_, ?_⟩ · intro x i change (∫ z, sgn (z i) ∂Kernel.piecewise hgood π.val (fairSignKernel n d).val x) = 0 rw [Kernel.piecewise_apply] by_cases hx : x ∈ good · rw [if_pos hx] exact hx i · rw [if_neg hx] exact fairSigns_mean_zero n i · filter_upwards [hfair] with x hx change Kernel.piecewise hgood π.val (fairSignKernel n d).val x = π.val x rw [Kernel.piecewise_apply, if_pos (show x ∈ good from hx)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pointwiseFairRepresentative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:197

Extended expected squared prognostic imbalance.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
π :
Design n d
m :
Cube d → ℝ
loss π m :
ℝ≥0∞
ofReal (4 / (n : ℝ)) * ∫⁻ x, ∫⁻ z, ofReal ((∑ i, sgn (z i) * m (x i)) ^ 2) ∂π.val x ∂covLaw n d
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.loss · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:231

Full-design capacity, keeping the fixed-function supremum outside sampling.

Definition (Lean source)
n d :
ℕ
s :
ℝ
capacity n d s :
ℝ≥0∞
minimaxValueENNReal (fun (π : {π : Design n d // DesignClass n d π}) (m : {m : CenteredL2Fn d // SobolevClass d s m}) => loss π.val m.val.val)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.capacity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:238

Worst risk of a specified design.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
π :
Design n d
s :
ℝ
worstLoss π s :
ℝ≥0∞
⨆ m : {m : CenteredL2Fn d // SobolevClass d s m}, loss π m.val.val
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.worstLoss · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:244

Number of coordinate pairs.

Definition (Lean source)
d :
ℕ
pairCount d :
ℕ
d.choose 2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCount · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:250

Pair-cosine indices and positive integer frequencies.

Definition (Lean source)
d L :
ℕ
PairIdx d L :
Type
{α : (Fin d × Fin d) × (Fin L × Fin L) // α.1.1 < α.1.2}
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.PairIdx · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:252
def priorDimension

Number of cosine coordinates.

Definition (Lean source)
d L :
ℕ
priorDimension d L :
ℕ
pairCount d * L ^ 2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.priorDimension · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:256
def C0

Explicit positive cutoff-extension normalization.

Definition (Lean source)
C0 :
ℝ
sqrt (48 + 32 * pi ^ 2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.C0 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:258
def pairFeature

Tensor-pair cosine features.

Definition (Lean source)
d :
ℕ
shared
L :
ℕ
shared
α :
x :
Cube d
pairFeature α x :
ℝ
2 * cos (pi * (α.val.2.1.val + 1 : ℕ) * x α.val.1.1) * cos (pi * (α.val.2.2.val + 1 : ℕ) * x α.val.1.2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:260

The normalized random-sign cosine polynomial.

Definition (Lean source)
d :
ℕ
shared
s :
ℝ
L :
ℕ
ξ :
PairIdx d L → Bool
mXi s L ξ :
Cube d → ℝ
fun x
=> (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * ∑ α, sgn (ξ α) * pairFeature α x
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:265

The prior cutoff.

Definition (Lean source)
n d :
ℕ
priorCutoff n d :
ℕ
max 1 ⌈Real.sqrt (4096 * (n : ℝ) / pairCount d)⌉₊
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.priorCutoff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:270
def cosinePrior

Uniform independent coefficient signs; its function image is the legal-prior candidate.

Definition (Lean source)
n d :
ℕ
_s :
ℝ
cosinePrior n d _s :
PMF (PairIdx d (priorCutoff n d) → Bool)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePrior · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:275

The prior average risk, without a measurable-space choice on the function space.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
π :
Design n d
s :
ℝ
priorRisk π s :
ℝ≥0∞
∑ ξ, (cosinePrior n d s ξ) * loss π (mXi s (priorCutoff n d) ξ)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.priorRisk · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:279

Lower comparison scale.

Definition (Lean source)
n d :
ℕ
s :
ℝ
bScale n d s :
ℝ
min 1 (((pairCount d : ℝ) / n) ^ s)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.bScale · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:282

Sharper lower constant, independent of n and d.

Definition (Lean source)
s :
ℝ
cLower s :
ℝ
2 / ((48 + 32 * pi ^ 2) * (16384 : ℝ) ^ s)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cLower · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:285

Uniform upper constant.

Definition (Lean source)
CUpper :
ℝ
3072
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.CUpper · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:289
def tau0

The fixed average treatment effect.

Definition (Lean source)
tau0 :
ℝ
0.2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.tau0 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:294
def delta

The fixed treatment-effect amplitude.

Definition (Lean source)
delta :
ℝ
0.1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.delta · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:296
def tauFn

The sinusoidal covariate treatment effect.

Definition (Lean source)
d :
ℕ
shared
hd :
0 < d
shared
x :
Cube d
tauFn hd x :
ℝ
tau0 + delta * sqrt 2 * sin (2 * pi * x ⟨0, hd⟩)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.tauFn · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:298
def noiseLaw

Independent unit-variance Gaussian noise, drawn before assignment.

Definition (Lean source)
n :
ℕ
noiseLaw n :
Measure.pi (fun _ => (gaussianReal 0 1).prod (gaussianReal 0 1))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.noiseLaw · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:302
def completionSchedule

Potential outcomes with prognosis m and the fixed heterogeneous treatment effect.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
hd :
0 < d
shared
m :
Cube d → ℝ
x :
e :
completionSchedule hd m x e :
fun i => (m (x i) - tauFn hd (x i) / 2 + (e i).1, m (x i) + tauFn hd (x i) / 2 + (e i).2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.completionSchedule · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:306
theorem measurable_completion

Measurability of the Gaussian completion's measure-valued map. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
d :
ℕ
shared
hd :
0 < d
shared
m :
Measurable (fun x : Covariates n d => (noiseLaw n).map (completionSchedule hd m.val x))
Proof (Lean source)
@[fun_prop] -- @node: measurable_completion lemma measurable_completion (m : CenteredL2Fn d) : Measurable (fun x : Covariates n d => (noiseLaw n).map (completionSchedule hd m.val x)) := by have hm : Measurable m.val := m.property.1 letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw infer_instance have hjoint : Measurable (fun xe : Covariates n d × Sched n => completionSchedule hd m.val xe.1 xe.2) := by unfold completionSchedule tauFn fun_prop have h := (Measure.measurable_map _ hjoint).comp (Measurable.map_prodMk_left (ν := noiseLaw n) (α := Covariates n d)) simpa only [Function.comp_def, Measure.map_map hjoint measurable_prodMk_left] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.measurable_completion · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:311
def gaussianCompletion Definition 7 in the paper ↗

The pre-assignment Gaussian potential-outcome kernel.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
hd :
0 < d
shared
m :
gaussianCompletion hd m :
⟨fun x => (noiseLaw n).map (completionSchedule hd m.val x), measurable_completion hd m⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianCompletion · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:329
def treatment

Treatment indicator corresponding to the original unit sign.

Definition (Lean source)
n :
ℕ
shared
z :
i :
Fin n
treatment z i :
ℝ
(sgn (z i) + 1) / 2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.treatment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:332

Actual unit-weight Horvitz--Thompson ATE estimator.

Definition (Lean source)
n :
ℕ
shared
y :
z :
htEstimator y z :
ℝ
(2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (y i).2 else (y i).1)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.htEstimator · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:335
def finiteATE

Realized full-schedule finite-population ATE.

Definition (Lean source)
n :
ℕ
shared
y :
finiteATE y :
ℝ
(n : ℝ)⁻¹ * ∑ i, ((y i).2 - (y i).1)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteATE · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:339
def prognosis

Potential-outcome midpoint vector.

Definition (Lean source)
n :
ℕ
shared
y :
i :
Fin n
prognosis y i :
ℝ
((y i).2 + (y i).1) / 2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prognosis · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:342
def assignCov

The assignment covariance matrix, including its mean subtraction.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
π :
Design n d
x :
i j :
Fin n
assignCov π x i j :
ℝ
(∫ z, sgn (z i) * sgn (z j) ∂π.val x)
- (∫ z, sgn (z i) ∂π.val x) * (∫ z, sgn (z j) ∂π.val x)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.assignCov · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:345
def Vstar

Gaussian benchmark.

Definition (Lean source)
Vstar :
ℝ
delta ^ 2 + 4
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Vstar · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:350
def gaussianTheta

Superpopulation target under the Gaussian completion.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
hd :
0 < d
shared
m :
gaussianTheta hd m :
ℝ
∫ ω, finiteATE ω.2 ∂(covLaw n d ⊗ₘ gaussianCompletion hd m)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianTheta · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:352
def gaussianCausalCompletion

The frozen causal completion uses independent standard Gaussian pre-assignment noise and the sinusoidal treatment effect specified by S3. It draws X, then the full schedule Y, then assignment from the covariate-only kernel. The remaining components explicitly anchor A=(Z+1)/2, the actual HT estimator, the full-schedule target, and its sampling expectation.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
hd :
0 < d
shared
m :
π :
Design n d
gaussianCausalCompletion hd m π :
Measure ((Covariates n d × Sched n) × Signs n) × (Signs n → Fin n → ℝ) × (Sched n → Signs n → ℝ) × (Sched n → ℝ) × ℝ
(experimentLaw (covLaw n d) (gaussianCompletion hd m) π.val, treatment, htEstimator, finiteATE, gaussianTheta (n := n) hd m)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianCausalCompletion · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Basic.lean:359
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.CapacityHandle 22 declarations One smoothness-free kernel uses the ordered cosine/sine features of the reflected and commonly shifted original sample.

Spectral design and capacity handle

One smoothness-free kernel uses the ordered cosine/sine features of the reflected and commonly shifted original sample. Its seed measure and exact arithmetic map are explicit. Feature prefixes are obtained by finite box sorting, with no well-founded enumeration.

[ One representative of each {k,-k}, taking the first nonzero coordinate positive.

Definition (Lean source)
d :
ℕ
shared
k :
Fin d → ℤ
IsFrequencyRepresentative k :
Prop
clause 1
1 ≤ (frequencySupport k).card
clause 2
(frequencySupport k).card ≤ 2
clause 3
∃ j : Fin d,
0 < k j
l :
Fin d
l < j
k l = 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.IsFrequencyRepresentative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:20
def frequencyBefore

Lexicographic tie-breaking in the original coordinate order.

Definition (Lean source)
d :
ℕ
shared
k l :
Fin d → ℤ
frequencyBefore k l :
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyBefore · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:24
def orderedFrequencyBox

Finite frequency enumeration for a requested prefix.

Definition (Lean source)
d J :
ℕ
orderedFrequencyBox d J :
List (Fin d → ℤ)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedFrequencyBox · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:29
def featureFrequency

The index-th frequency in the prescribed ordering; a box of radius index+1 suffices.

Definition (Lean source)
d index :
ℕ
featureFrequency d index :
Fin d → ℤ
(orderedFrequencyBox d (index + 1)).getD index 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:33
def features

Consecutive real cosine/sine pairs, with row numbering starting at one.

Definition (Lean source)
d h :
ℕ
y :
features d h y :
ℝ
k :
featureFrequency d ((h - 1) / 2)
if (h - 1) % 2 = 0 then sqrt 2 * (ek k y).re else sqrt 2 * (ek k y).im
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.features · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:36
def ReflectionCoins

Independent fair reflection coins for every original unit and coordinate.

Definition (Lean source)
n d :
ℕ
ReflectionCoins n d :
Type
Fin n → Fin d → Bool
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ReflectionCoins · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:41
def reflectionLaw

Uniform law of the reflection coins.

Definition (Lean source)
n d :
ℕ
reflectionLaw n d :
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionLaw · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:44
def lift

The reflected covariates, encoded by half of the period-two coordinate.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
x :
η :
lift x η :
Fin n → Torus d
fun i j => ((if η i j then (2 - x i j) / 2 else x i j / 2 : ℝ) : UnitAddCircle)

Shift the lifted sample by one independent common Haar torus element.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
x :
η :
T :
shiftedSample x η T :
Fin n → Torus d
fun i => lift x η i + T
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.shiftedSample · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:51

Reflection coins, common shift, and independent uniform rounding seeds.

Definition (Lean source)
n d :
ℕ
SpectralSeeds n d :
Type
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.SpectralSeeds · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:56
def spectralSeedLaw

Independent spectral seed law.

Definition (Lean source)
n d :
ℕ
spectralSeedLaw n d :
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralSeedLaw · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:58

Evaluate the first floor(n/4) prescribed real rows at the randomized sample.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
w :
Fin n → Torus d
spectralRows w :
Fin (n / 4) → Fin n → ℝ
fun h i => features d (h.val + 1) (w i)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralRows · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:63

The prescribed exact-real signing map.

Definition (Lean source)
n :
ℕ
shared
d :
ℕ
shared
x :
seed :
spectralSigns x seed :
orderedBoundaryRounding n (spectralRows (shiftedSample x seed.1 seed.2.1)) seed.2.2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralSigns · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:66
theorem spectralSigns_measurable

Joint Borel measurability of the exact spectral signing map. This uses the stated conclusion.

Formal statement
n d :
ℕ
Measurable (fun xs : Covariates n d × SpectralSeeds n d => spectralSigns xs.1 xs.2)
Proof (Lean source)
@[fun_prop] -- @node: spectralSigns_measurable lemma spectralSigns_measurable (n d : ℕ) : Measurable (fun xs : Covariates n d × SpectralSeeds n d => spectralSigns xs.1 xs.2) := by have hround := (ordered_prefix_rounding n (fun _ _ => 0) 0 (by intros; simp)).1 have hfeatures (h : ℕ) : Measurable (features d h) := by unfold features ek split <;> fun_prop have hlift : Measurable (fun xs : Covariates n d × SpectralSeeds n d => shiftedSample xs.1 xs.2.1 xs.2.2.1) := by unfold shiftedSample lift apply measurable_pi_lambda intro i apply measurable_pi_lambda intro j have hcoin : Measurable (fun xs : Covariates n d × SpectralSeeds n d => xs.2.1 i j) := by fun_prop have hcoord : Measurable (fun xs : Covariates n d × SpectralSeeds n d => if xs.2.1 i j = true then (2 - xs.1 i j) / 2 else xs.1 i j / 2) := Measurable.ite (hcoin (measurableSet_singleton true)) (by fun_prop) (by fun_prop) exact ((AddCircle.continuous_mk' (1 : ℝ)).measurable.comp hcoord).add (by fun_prop) have hrows : Measurable (fun xs : Covariates n d × SpectralSeeds n d => spectralRows (shiftedSample xs.1 xs.2.1 xs.2.2.1)) := by apply measurable_pi_lambda intro h apply measurable_pi_lambda intro i exact (hfeatures (h.val + 1)).comp ((measurable_pi_apply i).comp hlift) exact hround.comp (hrows.prodMk (by fun_prop))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralSigns_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:69
theorem spectralMeasure_measurable

Measurability of the seed-image kernel. This uses the stated conclusion.

Formal statement
n d :
ℕ
Proof (Lean source)
@[fun_prop] -- @node: spectralMeasure_measurable lemma spectralMeasure_measurable (n d : ℕ) : Measurable (fun x : Covariates n d => (spectralSeedLaw n d).map (spectralSigns x)) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (spectralSeedLaw n d) := by unfold spectralSeedLaw reflectionLaw roundingSeedLaw cubeMeasure infer_instance have hjoint := spectralSigns_measurable n d have h := (Measure.measurable_map _ hjoint).comp (Measurable.map_prodMk_left (ν := spectralSeedLaw n d) (α := Covariates n d)) simpa only [Function.comp_def, Measure.map_map hjoint measurable_prodMk_left] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralMeasure_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:100

Seed image of the prescribed procedure.

Definition (Lean source)
n d :
ℕ
spectralRoundingKernel n d :
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralRoundingKernel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:114
theorem spectralRoundingKernel_markov

The spectral seed-image kernel has total mass one.](goal) This uses the stated conclusion.

Formal statement
n d :
ℕ
Proof (Lean source)
-- @node: spectralRoundingKernel_markov lemma spectralRoundingKernel_markov (n d : ℕ) : IsMarkovKernel (spectralRoundingKernel n d) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (spectralSeedLaw n d) := by unfold spectralSeedLaw reflectionLaw roundingSeedLaw cubeMeasure infer_instance constructor intro x have hsigns : Measurable (spectralSigns x) := by fun_prop exact Measure.isProbabilityMeasure_map hsigns.aemeasurable
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralRoundingKernel_markov · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:117

Every prescribed real Fourier row has the common envelope √2.

Formal statement
d h :
ℕ
y :
|features d h y| ≤ sqrt 2
Proof (Lean source)
-- @node: features_abs_le lemma features_abs_le (d h : ℕ) (y : Torus d) : |features d h y| ≤ sqrt 2 := by have hn : ‖ek (featureFrequency d ((h - 1) / 2)) y‖ ≤ 1 := by simpa only [ek, UnitAddTorus.mFourier_norm] using (mFourier (featureFrequency d ((h - 1) / 2))).norm_coe_le_norm y unfold features split · rw [abs_mul, abs_of_nonneg (Real.sqrt_nonneg _)] exact (mul_le_mul_of_nonneg_left ((Complex.abs_re_le_norm _).trans hn) (Real.sqrt_nonneg _)).trans_eq (mul_one _) · rw [abs_mul, abs_of_nonneg (Real.sqrt_nonneg _)] exact (mul_le_mul_of_nonneg_left ((Complex.abs_im_le_norm _).trans hn) (Real.sqrt_nonneg _)).trans_eq (mul_one _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.features_abs_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:131

[ One attaining design for every smoothness: independent signs when B≥n.

Definition (Lean source)
n d :
ℕ
piStar n d :
Design n d
if n
≤ pairCount d then fairSignKernel n d else ⟨spectralRoundingKernel n d, spectralRoundingKernel_markov n d⟩
theorem piStar_pointwise_fair

The concrete attaining construction has pointwise zero sign means, a stronger internal property than the public class's almost-everywhere fairness requirement.](goal) This uses the stated conclusion.

Formal statement
n d :
ℕ
Proof (Lean source)
-- @node: piStar_pointwise_fair lemma piStar_pointwise_fair (n d : ℕ) : PointwiseFairKernel (piStar n d).val := by intro x i by_cases hbranch : n ≤ pairCount d · simpa only [piStar, if_pos hbranch, fairSignKernel, Kernel.const_apply] using fairSigns_mean_zero n i · simp only [piStar, if_neg hbranch] change ∫ z, sgn (z i) ∂(spectralSeedLaw n d).map (spectralSigns x) = 0 have hm : Measurable (spectralSigns x) := by fun_prop have hz : Measurable (fun z : Signs n => sgn (z i)) := by fun_prop rw [integral_map hm.aemeasurable hz.aestronglyMeasurable] letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (reflectionLaw n d) := by unfold reflectionLaw; infer_instance letI : IsProbabilityMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw cubeMeasure; infer_instance letI : IsProbabilityMeasure (spectralSeedLaw n d) := by unfold spectralSeedLaw; infer_instance let f : SpectralSeeds n d → ℝ := fun seed => sgn (spectralSigns x seed i) have hf : Measurable f := by fun_prop have hbound : ∀ seed, ‖f seed‖ ≤ 1 := by intro seed dsimp [f] cases spectralSigns x seed i <;> norm_num [sgn] have hi : Integrable f (spectralSeedLaw n d) := Integrable.of_bound hf.aestronglyMeasurable 1 (Filter.Eventually.of_forall hbound) change ∫ seed, f seed ∂spectralSeedLaw n d = 0 rw [spectralSeedLaw, integral_prod _ hi] have hinner (η : ReflectionCoins n d) : ∫ ts, f (η, ts) ∂(torusMeasure d).prod (roundingSeedLaw n) = 0 := by have hfi : Integrable (fun ts => f (η, ts)) ((torusMeasure d).prod (roundingSeedLaw n)) := Integrable.of_bound (hf.comp measurable_prodMk_left).aestronglyMeasurable 1 (Filter.Eventually.of_forall (fun ts => hbound (η, ts))) rw [integral_prod _ hfi] have hround (T : Torus d) : ∫ seeds, f (η, T, seeds) ∂roundingSeedLaw n = 0 := by exact (ordered_prefix_rounding n (fun h j => features d h (shiftedSample x η T j)) (sqrt 2) (fun h j _ => features_abs_le d h _)).2.2.1 i simp_rw [hround] simp simp_rw [hinner] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.piStar_pointwise_fair · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:151

Explicit comparison scale.

Definition (Lean source)
n d :
ℕ
s :
ℝ
aScale n d s :
ℝ
min 1 (((pairCount d : ℝ) / n) ^ s)
def capacityHandle

The comparison scale, single original-sample design, and independent finite prior.

Definition (Lean source)
n d :
ℕ
s :
ℝ
capacityHandle n d s :
ℝ × Design n d × PMF (PairIdx d (priorCutoff n d) → Bool)
(aScale n d s, piStar n d, cosinePrior n d s)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.capacityHandle · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CapacityHandle.lean:203
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.CitedGates 29 declarations Cited facts are recorded as Sort-0 propositions.

Disclosed cited logical gates

Cited facts are recorded as Sort-0 propositions. Torus Parseval and the two exact interpolation facts have proved witnesses; remaining cited facts are explicit consumer inputs. Definitions fix the normalized K norm and the actual published HT benchmark.

def Torus

[ Unit-torus coordinates represent period-two coordinates by y=2u.

Definition (Lean source)
r :
ℕ
Torus r :
Type
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Torus · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:22
def torusMeasure

Normalized Haar probability on the period-two torus.

Definition (Lean source)
r :
ℕ
torusMeasure r :
Measure.pi (fun _ => haarAddCircle)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusMeasure · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:25
instance torusProbability

The explicit torus measure has total mass one.

Definition (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusProbability · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:28
def frequencyBox

Increasing finite integer frequency boxes.

Definition (Lean source)
r J :
ℕ
frequencyBox r J :
Finset (Fin r → ℤ)
piFinset (fun _ => Icc (-(J : ℤ)) (J : ℤ))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyBox · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:30
def torusCharacterLp

Fourier characters in L² for the explicitly chosen normalized torus measure.

Definition (Lean source)
r :
ℕ
k :
Fin r → ℤ
torusCharacterLp k :
Lp ℂ 2 (torusMeasure r)
(mFourier k).toLp 2 (torusMeasure r) ℂ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusCharacterLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:33

Complete orthonormal Fourier characters, Parseval, and L² box convergence. Citation: Nikhil Bansal and Haotian Jiang (2024), §2.2, the Parseval display after the Fourier-series formula; arXiv:2408.06475v1. Classical Fourier theory as recalled there. Source checked separately; no pointwise convergence assertion is imported.

Definition (Lean source)
TorusParseval :
Sort 0
∀ r : ℕ
if
0 < r
then
∀ f : Lp ℂ 2 (torusMeasure r),
Orthonormal ℂ (torusCharacterLp (r := r)) ∧
(⊤ : Submodule ℂ (Lp ℂ 2 (torusMeasure r)))
≤ (span ℂ (range (torusCharacterLp (r := r)))).topologicalClosure ∧
HasSum (fun h : Fin r → ℤ => ‖UnitAddTorus.mFourierCoeff f h‖ ^ 2) (∫ t, ‖f t‖ ^ 2 ∂torusMeasure r) ∧
Tendsto (fun J : ℕ => ‖f - ∑ h ∈ frequencyBox r J, mFourierCoeff f h • torusCharacterLp h‖) atTop (𝓝 0)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.TorusParseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:38
theorem torusParseval

The cited torus Parseval gate follows from Mathlib's Fourier basis and cofinal finite boxes. This uses the stated conclusion.

Formal statement
Proof (Lean source)
theorem torusParseval : TorusParseval := by intro r _ f refine ⟨torusCharacter_orthonormal r, (torusCharacter_dense r).ge, hasSum_sq_torusFourierCoeff f, ?_⟩ have hsum : Tendsto (fun J : ℕ => ∑ h ∈ frequencyBox r J, mFourierCoeff f h • torusCharacterLp h) atTop (𝓝 f) := by exact (hasSum_torusFourier_series f).comp (frequencyBox_tendsto r) have hsub := (tendsto_const_nhds (x := f)).sub hsum exact tendsto_zero_iff_norm_tendsto_zero.mp (by simpa using hsub)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusParseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:141
def kNormSq

Normalized quadratic real-interpolation norm squared.

Definition (Lean source)
V :
n0 n1 :
V → ℝ≥0∞
θ :
ℝ
v :
V
kNormSq n0 n1 θ v :
ℝ≥0∞
ofReal (2 * sin (pi * θ) / pi) * ∫⁻ ρ in Ioi (0 : ℝ), ofReal (ρ ^ (-1 - 2 * θ)) * ⨅ (v0 : V) (v1 : V) (_ : v = v0 + v1), n0 v0 ^ 2
+ ofReal (ρ ^ 2) * n1 v1 ^ 2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.kNormSq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:154
def embeddedNorm

An endpoint norm on the ambient space, infinite outside the embedded Banach space.

Definition (Lean source)
i :
E →L[ℝ] V
v :
V
embeddedNorm i v :
ℝ≥0∞
⨅ (e : E) (_ : i e = v), ofReal ‖e‖
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.embeddedNorm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:161

Exact exponent θ for common linear operators between compatible Banach pairs, with the normalized quadratic K norm. Completeness is required at every endpoint. Citation: S. N. Chandler-Wilde, D. P. Hewett, A. Moiola (2015), Theorem 2.2(i), normalization (8)–(9), arXiv:1404.3599v4; that item credits McLean (2000), Theorem B.2. Compatible pairs may be embedded in their Banach sum spaces, as in the source §2.

Definition (Lean source)
ExactInterpolationOperators :
Sort 0
∀ (E0 E1 G0 G1 V W : Type) [NormedAddCommGroup E0] [NormedSpace ℝ E0] [CompleteSpace E0] [NormedAddCommGroup E1] [NormedSpace ℝ E1] [CompleteSpace E1] [NormedAddCommGroup G0] [NormedSpace ℝ G0] [CompleteSpace G0] [NormedAddCommGroup G1] [NormedSpace ℝ G1] [CompleteSpace G1] [NormedAddCommGroup V] [NormedSpace ℝ V] [NormedAddCommGroup W] [NormedSpace ℝ W] (i0 : E0 →L[ℝ] V) (i1 : E1 →L[ℝ] V) (j0 : G0 →L[ℝ] W) (j1 : G1 →L[ℝ] W),
Injective i0 → Injective i1 → Injective j0 → Injective j1 → ∀ (D : V →ₗ[ℝ] W) (A0 A1 : ℝ≥0∞), A0 < ⊤ → A1 < ⊤ → (∀ e, embeddedNorm j0 (D (i0 e)) ≤ A0 * ofReal ‖e‖) → (∀ e, embeddedNorm j1 (D (i1 e)) ≤ A1 * ofReal ‖e‖) → ∀ θ ∈ Ioo (0 : ℝ) 1, ∀ v, (∃ e0 e1, v = i0 e0 + i1 e1) → kNormSq (embeddedNorm i0) (embeddedNorm i1) θ v < ⊤ → kNormSq (embeddedNorm j0) (embeddedNorm j1) θ (D v)
≤ (rpow A0 (1 - θ) * rpow A1 θ) ^ 2 * kNormSq (embeddedNorm i0) (embeddedNorm i1) θ v
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ExactInterpolationOperators · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:167
theorem exactInterpolationOperators

The exact operator interpolation proposition follows from the generic normalized theorem.](goal) This uses the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: exactInterpolationOperators theorem exactInterpolationOperators : ExactInterpolationOperators := by unfold ExactInterpolationOperators intro E0 E1 G0 G1 V W _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ i0 i1 j0 j1 hi0 hi1 _ _ D A0 A1 hA0 hA1 h0 h1 θ hθ v _ hvfin exact exact_interpolation_operators E0 E1 G0 G1 V W i0 i1 j0 j1 hi0 hi1 D A0 A1 hA0 hA1 h0 h1 θ hθ v hvfin
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.exactInterpolationOperators · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:194
def wNorm

[ Weighted L² norm on measurable functions modulo null sets.

Definition (Lean source)
S :
w :
S → ℝ≥0∞
μ :
f :
S →ₘ[μ] ℂ
wNorm w μ f :
ℝ≥0∞
rpow (∫⁻ x, w x * (‖f x‖₊ : ℝ≥0∞) ^ 2 ∂μ) (1 / 2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.wNorm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:203

Weighted L² real interpolation with exactly equal normalized norms. Infinite values encode membership equivalently as well as the equality of finite norms. Citation: S. N. Chandler-Wilde, D. P. Hewett, A. Moiola (2015), Theorem 3.1, arXiv:1404.3599v4, measurable positive finite weights on an arbitrary measure space. The source includes both Lebesgue and counting measures and credits McLean B.4 for an intermediate pointwise minimization; the theorem itself is proved by these authors.

Definition (Lean source)
WeightedL2Interpolation :
Sort 0
∀ (S : Type) [MeasurableSpace S] (μ : Measure S) (w0 w1 : S → ℝ≥0∞),
Measurable w0 → Measurable w1 → (∀ᵐ x ∂μ, 0 < w0 x ∧ w0 x < ⊤ ∧ 0 < w1 x ∧ w1 x < ⊤) → ∀ θ ∈ Ioo (0 : ℝ) 1, ∀ f : S →ₘ[μ] ℂ, (∃ f0 f1 : S →ₘ[μ] ℂ, f = f0 + f1 ∧ wNorm w0 μ f0 < ⊤ ∧ wNorm w1 μ f1 < ⊤) → kNormSq (wNorm w0 μ) (wNorm w1 μ) θ f
= ∫⁻ x, rpow (w0 x) (1 - θ) * rpow (w1 x) θ * (‖f x‖₊ : ℝ≥0∞) ^ 2 ∂μ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.WeightedL2Interpolation · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:209
theorem weightedL2Interpolation

The weighted L² proposition follows from the generic exact norm identity.](goal) This uses the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: weightedL2Interpolation theorem weightedL2Interpolation : WeightedL2Interpolation := by intro S _ μ w0 w1 hw0 hw1 hw θ hθ f hf exact weighted_l2_interpolation μ w0 w1 hw0 hw1 hw θ hθ f hf
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.weightedL2Interpolation · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:225

Separability in the product topology of pointwise convergence on S → ℝ: a countable subclass is dense, so every finite set of evaluations can be approximated simultaneously to arbitrary positive accuracy. No norm or sequential density is required.

Definition (Lean source)
S :
Type
G :
Set (S → ℝ)
PointwiseSeparable G :
Prop
∃ G0 : Set (S → ℝ),
G0.Countable
G0 ⊆ G
clause 1
g ∈ G :
xs :
ε :
ℝ
0 < ε
∃ g0 ∈ G0, ∀ x ∈ xs, |g0 x - g x| < ε
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.PointwiseSeparable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:232
def radAverage

Expected absolute supremum, with extended nonnegative semantics.

Definition (Lean source)
S :
P :
b :
ℕ
G :
Set (S → ℝ)
φ :
ℝ → ℝ
radAverage P b G φ :
ℝ≥0∞
∫⁻ u, ∫⁻ ρ, ⨆ g : G, ofReal |∑ h : Fin b, sgn (ρ h) * φ (g.val (u h))| ∂fairSigns b ∂Measure.pi (fun _ : Fin b => P)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.radAverage · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:239

The expected absolute-supremum contraction bound with factor two. Citation: Peter L. Bartlett and Shahar Mendelson (2002), Theorem 12(4), Definition 2, JMLR 3, pp. 464, 469–470, https://www.jmlr.org/papers/volume3/bartlett02a/bartlett02a.pdf. Their proof credits Ledoux–Talagrand (1991), Corollary 3.17. The integrable envelope and separability in the product topology of pointwise convergence (countable density, equivalently simultaneous approximation on each finite evaluation set) specify the function-class scope.

Definition (Lean source)
ClassicalRademacherContraction :
Sort 0
∀ (S : Type) [MeasurableSpace S] (P : Measure S),
IsProbabilityMeasure P → ∀ (b : ℕ) (G : Set (S → ℝ)), PointwiseSeparable G → (∀ g ∈ G, Measurable g) → (∃ envelope : S → ℝ, Integrable envelope P ∧ ∀ᵐ x ∂P, ∀ g ∈ G, |g x| ≤ envelope x) → ∀ φ : ℝ → ℝ, LipschitzWith 1 φ → φ 0
= 0 → radAverage P b G φ ≤ 2 * radAverage P b G id
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ClassicalRademacherContraction · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:246
def OutcomeLaw

Probability laws of a single unit's covariate and two potential outcomes.

Definition (Lean source)
d :
ℕ
OutcomeLaw d :
Type
ProbabilityMeasure (Cube d × ℝ × ℝ)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.OutcomeLaw · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:262
def covMarginal

Covariate marginal of a single-unit law.

Definition (Lean source)
d :
ℕ
P :
covMarginal P :
Measure (Cube d)
P.toMeasure.fst
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.covMarginal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:264
def prognosisOf

Conditional midpoint mean, a finite real-valued version modulo covariate null sets.

Definition (Lean source)
d :
ℕ
P :
u :
Cube d
prognosisOf P u :
ℝ
∫ y, (y.2 + y.1) / 2 ∂P.toMeasure.condKernel u
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prognosisOf · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:266
def effectOf

Conditional mean treatment effect.

Definition (Lean source)
d :
ℕ
P :
u :
Cube d
effectOf P u :
ℝ
∫ y, y.2 - y.1 ∂P.toMeasure.condKernel u
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.effectOf · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:269
def VPub

The law-specific conditional-variance benchmark.

Definition (Lean source)
d :
ℕ
P :
VPub P :
ℝ
+ 2 * (∫ u, variance snd (P.toMeasure.condKernel u) ∂covMarginal P)
+ 2 * (∫ u, variance fst (P.toMeasure.condKernel u) ∂covMarginal P)
def publishedExperiment

Actual iid-outcome experiment with covariate-only assignment.

Definition (Lean source)
n d :
ℕ
P :
π :
Design n d
publishedExperiment P π :
Measure ((Fin n → Cube d × ℝ × ℝ) × Signs n)
(Measure.pi (fun _ : Fin n => P.toMeasure)) ⊗ₘ (π.val.comap (fun xs i => (xs i).1) (measurable_pi_lambda _ (fun i => (measurable_pi_apply i).fst)))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedExperiment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:277
def htPub

Actual published HT statistic on iid units and original signs.

Definition (Lean source)
n d :
ℕ
ω :
(Fin n → Cube d × ℝ × ℝ) × Signs n
htPub ω :
ℝ
htEstimator (fun i => (ω.1 i).2) ω.2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.htPub · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:283

Finite second moments of both potential outcomes.

Definition (Lean source)
d :
ℕ
P :
FiniteOutcomeMoments P :
Prop
clause 1
MemLp (fun ω => ω.2.1) 2 P.toMeasure
clause 2
MemLp (fun ω => ω.2.2) 2 P.toMeasure
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.FiniteOutcomeMoments · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:286

Covariate density with fixed strictly positive finite bounds.

Definition (Lean source)
d :
ℕ
P :
lower upper :
ℝ
CovDensityBounds P lower upper :
Prop
clause 1
0 < lower
clause 2
lower ≤ upper
clause 3
∃ f : Cube d → ℝ,
covMarginal P = (cubeMeasure d).withDensity (fun u => ofReal (f u))
∀ᵐ u ∂cubeMeasure d, lower ≤ f u ∧ f u ≤ upper
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.CovDensityBounds · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:289

Bounded positive covariate density.

Definition (Lean source)
d :
ℕ
P :
BoundedPositiveCovDensity P :
Prop
∃ lower upper : ℝ, CovDensityBounds P lower upper
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.BoundedPositiveCovDensity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:294
def publishedExcessReal

Actual (real-valued) HT excess above the law's own benchmark.

Definition (Lean source)
n d :
ℕ
π :
Design n d
P :
publishedExcessReal π P :
ℝ
(n : ℝ) * variance htPub (publishedExperiment P π) - VPub P
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedExcessReal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:297

Cytrynbaum's actual HT excess-variance identity for fair outcome-independent kernels. Citation: Max Cytrynbaum (2026), Proposition 2.3, equation (2.4), with Assumption 2.1 and Definition 2.2, arXiv:2608.18057v1. The source credits Kallus (2018) for an earlier slightly different imbalance-variance equivalence. Conditional means are modulo null sets. The existing cited carrier retains pointwise fairness; public a.e. fairness is bridged by published_excess_of_ae_fair using a null-equivalent representative.

Definition (Lean source)
PublishedHTExcessIdentity :
Sort 0
∀ (n d : ℕ),
2
≤ n → 2 ≤ d → ∀ P : OutcomeLaw d, BoundedPositiveCovDensity P → FiniteOutcomeMoments P → ∀ π : Design n d, PointwiseFairKernel π.val → OutcomeIndependentKernel π.val → publishedExcessReal π P = (4 / (n : ℝ)) * ∫ ω, (∑ i, sgn (ω.2 i) * prognosisOf P ((ω.1 i).1)) ^ 2 ∂publishedExperiment P π
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.PublishedHTExcessIdentity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CitedGates.lean:302
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.CosineDerivative 11 declarations Sine orthogonality supplies the exact derivative energy identity used by the cosine-prior cutoff-extension roadmap.

Spatial derivative energy of finite pair-cosine polynomials

Sine orthogonality supplies the exact derivative energy identity used by the cosine-prior cutoff-extension roadmap. The estimates concern the explicit polynomial, before weak derivatives and Fourier unitarity are applied.

theorem uniform_sine_inner_product Lemma uniform_sine_inner_product in the paper ↗

Positive sine modes have the same diagonal unit-interval inner products as cosine modes. Under the stated conditions.

Formal statement
a b :
ℕ
ha :
0 < a
hb :
0 < b
(∫ u, sin (pi * (a : ℝ) * u) * sin (pi * (b : ℝ) * u) ∂volume.restrict (Icc (0 : ℝ) 1))
= if a = b then (1 / 2 : ℝ) else 0
Proof (Lean source)
-- @node: uniform_sine_inner_product lemma uniform_sine_inner_product (a b : ℕ) (ha : 0 < a) (hb : 0 < b) : (∫ u, sin (pi * (a : ℝ) * u) * sin (pi * (b : ℝ) * u) ∂volume.restrict (Icc (0 : ℝ) 1)) = if a = b then (1 / 2 : ℝ) else 0 := by have he (u : ℝ) : sin (pi * (a : ℝ) * u) * sin (pi * (b : ℝ) * u) = (1 / 2 : ℝ) * (cos (pi * ((a : ℤ) - b : ℤ) * u) - cos (pi * ((a : ℤ) + b : ℤ) * u)) := by push_cast rw [show pi * ((a : ℝ) - b) * u = pi * a * u - pi * b * u by ring, show pi * ((a : ℝ) + b) * u = pi * a * u + pi * b * u by ring, Real.cos_sub, Real.cos_add] ring have hi (k : ℤ) : Integrable (fun u => cos (pi * (k : ℝ) * u)) (volume.restrict (Icc (0 : ℝ) 1)) := Continuous.integrableOn_Icc (by fun_prop) simp_rw [he] rw [integral_const_mul, integral_sub (hi _) (hi _), uniform_integer_cosine_mean, uniform_integer_cosine_mean] have hab : (a : ℤ) + b ≠ 0 := by omega simp [hab, sub_eq_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.uniform_sine_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:17

The pair mode with one sine factor, normalized on the unit square.

Definition (Lean source)
L :
ℕ
α :
Fin L × Fin L
r :
Fin 2
x :
Cube 2
pairDerivativeMode α r x :
ℝ
if r
= 0 then 2 * sin (pi * (α.1.val + 1 : ℕ) * x 0) * cos (pi * (α.2.val + 1 : ℕ) * x 1) else 2 * cos (pi * (α.1.val + 1 : ℕ) * x 0) * sin (pi * (α.2.val + 1 : ℕ) * x 1)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairDerivativeMode · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:39
theorem pairDerivativeMode_inner_product

Each coordinate's differentiated modes are orthonormal under cube probability. The asserted mathematical result follows.

Formal statement
L :
ℕ
α β :
Fin L × Fin L
r :
Fin 2
(∫ x, pairDerivativeMode α r x * pairDerivativeMode β r x ∂cubeMeasure 2)
= if α = β then 1 else 0
Proof (Lean source)
-- @node: pairDerivativeMode_inner_product lemma pairDerivativeMode_inner_product {L : ℕ} (α β : Fin L × Fin L) (r : Fin 2) : (∫ x, pairDerivativeMode α r x * pairDerivativeMode β r x ∂cubeMeasure 2) = if α = β then 1 else 0 := by have heq : α = β ↔ α.1 = β.1 ∧ α.2 = β.2 := Prod.ext_iff fin_cases r · change (∫ x, pairDerivativeMode α 0 x * pairDerivativeMode β 0 x ∂cubeMeasure 2) = _ have he (x : Cube 2) : pairDerivativeMode α 0 x * pairDerivativeMode β 0 x = 4 * ((sin (pi * (α.1.val + 1 : ℕ) * x 0) * sin (pi * (β.1.val + 1 : ℕ) * x 0)) * (cos (pi * (α.2.val + 1 : ℕ) * x 1) * cos (pi * (β.2.val + 1 : ℕ) * x 1))) := by simp only [pairDerivativeMode, ↓reduceIte]; ring conv_lhs => enter [2, x]; rw [he] rw [integral_const_mul, cube_integral_two_coordinates (d := 2) 0 1 (by decide) (fun u => sin (pi * (α.1.val + 1 : ℕ) * u) * sin (pi * (β.1.val + 1 : ℕ) * u)) (fun u => cos (pi * (α.2.val + 1 : ℕ) * u) * cos (pi * (β.2.val + 1 : ℕ) * u)), uniform_sine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _), uniform_cosine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _)] by_cases ha : α.1 = β.1 <;> by_cases hb : α.2 = β.2 <;> norm_num [heq, ha, hb, Nat.add_right_cancel_iff, Fin.val_inj] · change (∫ x, pairDerivativeMode α 1 x * pairDerivativeMode β 1 x ∂cubeMeasure 2) = _ have he (x : Cube 2) : pairDerivativeMode α 1 x * pairDerivativeMode β 1 x = 4 * ((cos (pi * (α.1.val + 1 : ℕ) * x 0) * cos (pi * (β.1.val + 1 : ℕ) * x 0)) * (sin (pi * (α.2.val + 1 : ℕ) * x 1) * sin (pi * (β.2.val + 1 : ℕ) * x 1))) := by norm_num [pairDerivativeMode]; ring conv_lhs => enter [2, x]; rw [he] rw [integral_const_mul, cube_integral_two_coordinates (d := 2) 0 1 (by decide) (fun u => cos (pi * (α.1.val + 1 : ℕ) * u) * cos (pi * (β.1.val + 1 : ℕ) * u)) (fun u => sin (pi * (α.2.val + 1 : ℕ) * u) * sin (pi * (β.2.val + 1 : ℕ) * u)), uniform_cosine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _), uniform_sine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _)] by_cases ha : α.1 = β.1 <;> by_cases hb : α.2 = β.2 <;> norm_num [heq, ha, hb, Nat.add_right_cancel_iff, Fin.val_inj]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairDerivativeMode_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:49
theorem finite_orthogonal_square_integral Lemma finite_orthogonal_square_integral in the paper ↗

Finite linear combinations of integrable orthonormal real modes have coefficient energy. Under the stated conditions, the asserted mathematical result follows.

Formal statement
ι Ω :
μ :
f :
ι → Ω → ℝ
c :
ι → ℝ
hi :
∀ a b, Integrable (fun x => f a x * f b x) μ
ho :
∀ a b, (∫ x, f a x * f b x ∂μ) = if a = b then 1 else 0
(∫ x, (∑ a, c a * f a x) ^ 2 ∂μ) = ∑ a, c a ^ 2
Proof (Lean source)
-- @node: finite_orthogonal_square_integral lemma finite_orthogonal_square_integral {ι Ω : Type*} [Fintype ι] [DecidableEq ι] [MeasurableSpace Ω] (μ : Measure Ω) (f : ι → Ω → ℝ) (c : ι → ℝ) (hi : ∀ a b, Integrable (fun x => f a x * f b x) μ) (ho : ∀ a b, (∫ x, f a x * f b x ∂μ) = if a = b then 1 else 0) : (∫ x, (∑ a, c a * f a x) ^ 2 ∂μ) = ∑ a, c a ^ 2 := by classical have he (x : Ω) : (∑ a, c a * f a x) ^ 2 = ∑ a, ∑ b, (c a * c b) * (f a x * f b x) := by rw [pow_two, Finset.sum_mul] apply Finset.sum_congr rfl intro a _ rw [Finset.mul_sum] apply Finset.sum_congr rfl intro b _ ring simp_rw [he] rw [integral_finsetSum _ (fun a _ => integrable_finsetSum _ (fun b _ => (hi a b).const_mul _))] simp_rw [integral_finsetSum _ (fun b _ => (hi _ b).const_mul _), integral_const_mul, ho] simp [pow_two]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_orthogonal_square_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:91

A finite pair-cosine polynomial with arbitrary real coefficients.

Definition (Lean source)
L :
ℕ
h :
Fin L × Fin L → ℝ
x :
Cube 2
pairCosinePolynomial h x :
ℝ
∑ α, h α * (2 * cos (pi * (α.1.val + 1 : ℕ) * x 0) * cos (pi * (α.2.val + 1 : ℕ) * x 1))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePolynomial · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:115
theorem pairCosinePolynomial_energy

The polynomial's squared cube norm is exactly its coefficient energy. The asserted mathematical result follows.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
(∫ x, pairCosinePolynomial h x ^ 2 ∂cubeMeasure 2) = ∑ α, h α ^ 2
Proof (Lean source)
-- @node: pairCosinePolynomial_energy lemma pairCosinePolynomial_energy {L : ℕ} (h : Fin L × Fin L → ℝ) : (∫ x, pairCosinePolynomial h x ^ 2 ∂cubeMeasure 2) = ∑ α, h α ^ 2 := by let idx (α : Fin L × Fin L) : PairIdx 2 L := ⟨((0, 1), α), by change (0 : Fin 2) < 1; decide⟩ have hinj : Injective idx := by intro α β he exact congrArg (fun γ : PairIdx 2 L => γ.val.2) he change (∫ x, (∑ α, h α * pairFeature (idx α) x) ^ 2 ∂cubeMeasure 2) = _ apply finite_orthogonal_square_integral · intro α β exact (pairFeature_memLp (idx α)).integrable_mul (pairFeature_memLp (idx β)) · intro α β rw [pairFeature_cube_inner_product] simp only [hinj.eq_iff]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePolynomial_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:121

[ The explicit partial derivative polynomial in either coordinate.

Definition (Lean source)
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
x :
Cube 2
pairCosinePartial h r x :
ℝ
∑ α, (-pi * (if r = 0 then (α.1.val + 1 : ℕ) else (α.2.val + 1 : ℕ)) * h α) * pairDerivativeMode α r x
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePartial · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:137
theorem pairCosinePartial_energy

The coordinate partial energy is exactly the corresponding squared frequency sum.](goal) This uses the stated conclusion.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
(∫ x, pairCosinePartial h r x ^ 2 ∂cubeMeasure 2)
= ∑ α, pi ^ 2 * (if r = 0 then (α.1.val + 1 : ℕ) else (α.2.val + 1 : ℕ)) ^ 2 * h α ^ 2
Proof (Lean source)
-- @node: pairCosinePartial_energy lemma pairCosinePartial_energy {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) : (∫ x, pairCosinePartial h r x ^ 2 ∂cubeMeasure 2) = ∑ α, pi ^ 2 * (if r = 0 then (α.1.val + 1 : ℕ) else (α.2.val + 1 : ℕ)) ^ 2 * h α ^ 2 := by have hm (α : Fin L × Fin L) : MemLp (pairDerivativeMode α r) 2 (cubeMeasure 2) := by let : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ let : IsProbabilityMeasure (cubeMeasure 2) := by unfold cubeMeasure; infer_instance apply MemLp.of_bound (by unfold pairDerivativeMode; split_ifs <;> fun_prop) 2 apply Filter.Eventually.of_forall intro x unfold pairDerivativeMode split_ifs <;> simp only [Real.norm_eq_abs, abs_mul, abs_of_nonneg (by norm_num : (0 : ℝ) ≤ 2)] · nlinarith [Real.abs_sin_le_one (pi * (α.1.val + 1 : ℕ) * x 0), Real.abs_cos_le_one (pi * (α.2.val + 1 : ℕ) * x 1), abs_nonneg (sin (pi * (α.1.val + 1 : ℕ) * x 0)), abs_nonneg (cos (pi * (α.2.val + 1 : ℕ) * x 1))] · nlinarith [Real.abs_cos_le_one (pi * (α.1.val + 1 : ℕ) * x 0), Real.abs_sin_le_one (pi * (α.2.val + 1 : ℕ) * x 1), abs_nonneg (cos (pi * (α.1.val + 1 : ℕ) * x 0)), abs_nonneg (sin (pi * (α.2.val + 1 : ℕ) * x 1))] have hi (α β : Fin L × Fin L) := (hm α).integrable_mul (hm β) simp only [pairCosinePartial] rw [finite_orthogonal_square_integral _ _ _ hi (fun α β => pairDerivativeMode_inner_product α β r)] apply Finset.sum_congr rfl intro α _ ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePartial_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:143
theorem pairCosinePolynomial_hasDerivAt

The explicit partial polynomial is the ordinary derivative along its coordinate slice.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
x :
Cube 2
HasDerivAt (fun u => pairCosinePolynomial h (update x r u)) (pairCosinePartial h r x) (x r)
Proof (Lean source)
-- @node: pairCosinePolynomial_hasDerivAt lemma pairCosinePolynomial_hasDerivAt {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) (x : Cube 2) : HasDerivAt (fun u => pairCosinePolynomial h (update x r u)) (pairCosinePartial h r x) (x r) := by classical unfold pairCosinePolynomial pairCosinePartial apply HasDerivAt.fun_sum intro α _ fin_cases r · change HasDerivAt (fun u => h α * (2 * cos (pi * (α.1.val + 1 : ℕ) * u) * cos (pi * (α.2.val + 1 : ℕ) * x 1))) _ (x 0) convert (((hasDerivAt_id (x 0)).const_mul (pi * (α.1.val + 1 : ℕ))).cos.const_mul 2).mul_const (cos (pi * (α.2.val + 1 : ℕ) * x 1)) |>.const_mul (h α) using 1 <;> first | rfl | (simp [pairDerivativeMode]; ring) · change HasDerivAt (fun u => h α * (2 * cos (pi * (α.1.val + 1 : ℕ) * x 0) * cos (pi * (α.2.val + 1 : ℕ) * u))) _ (x 1) convert ((hasDerivAt_id (x 1)).const_mul (pi * (α.2.val + 1 : ℕ))).cos.const_mul (2 * cos (pi * (α.1.val + 1 : ℕ) * x 0)) |>.const_mul (h α) using 1 <;> first | rfl | (simp [pairDerivativeMode]; ring)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePolynomial_hasDerivAt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:174
theorem pairCosinePartial_energy_le

Each coordinate derivative costs at most the squared largest frequency times coefficient energy.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
(∫ x, pairCosinePartial h r x ^ 2 ∂cubeMeasure 2)
≤ pi ^ 2 * (L : ℝ) ^ 2 * ∑ α, h α ^ 2
Proof (Lean source)
-- @node: pairCosinePartial_energy_le lemma pairCosinePartial_energy_le {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) : (∫ x, pairCosinePartial h r x ^ 2 ∂cubeMeasure 2) ≤ pi ^ 2 * (L : ℝ) ^ 2 * ∑ α, h α ^ 2 := by rw [pairCosinePartial_energy, Finset.mul_sum] apply Finset.sum_le_sum intro α _ have ha : (α.1.val + 1 : ℕ) ≤ L := by omega have hb : (α.2.val + 1 : ℕ) ≤ L := by omega have hf : (if r = 0 then (α.1.val + 1 : ℕ) else (α.2.val + 1 : ℕ)) ≤ L := by split_ifs <;> assumption have hc : (0 : ℝ) ≤ (if r = 0 then (α.1.val + 1 : ℕ) else (α.2.val + 1 : ℕ)) := Nat.cast_nonneg _ have hcast : (((if r = 0 then α.1.val + 1 else α.2.val + 1) : ℕ) : ℝ) ≤ L := by exact_mod_cast hf have hsq : (((if r = 0 then α.1.val + 1 else α.2.val + 1) : ℕ) : ℝ) ^ 2 ≤ (L : ℝ) ^ 2 := by nlinarith exact mul_le_mul_of_nonneg_right (mul_le_mul_of_nonneg_left hsq (sq_nonneg _)) (sq_nonneg _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePartial_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:200
theorem pairCosinePolynomial_gradient_energy_le

The two partial energies together obey the roadmap's dimension-two gradient bound.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
(∫ x, pairCosinePartial h 0 x ^ 2 ∂cubeMeasure 2)
+ (∫ x, pairCosinePartial h 1 x ^ 2 ∂cubeMeasure 2)
≤ 2 * pi ^ 2 * (L : ℝ) ^ 2 * ∑ α, h α ^ 2
Proof (Lean source)
-- @node: pairCosinePolynomial_gradient_energy_le lemma pairCosinePolynomial_gradient_energy_le {L : ℕ} (h : Fin L × Fin L → ℝ) : (∫ x, pairCosinePartial h 0 x ^ 2 ∂cubeMeasure 2) + (∫ x, pairCosinePartial h 1 x ^ 2 ∂cubeMeasure 2) ≤ 2 * pi ^ 2 * (L : ℝ) ^ 2 * ∑ α, h α ^ 2 := by have h0 := pairCosinePartial_energy_le h 0 have h1 := pairCosinePartial_energy_le h 1 linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePolynomial_gradient_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineDerivative.lean:222
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.CosineEnergy 7 declarations The cosine-prior roadmap interpolates its zero- and first-order whole-space energy estimates by Hölder's inequality.

Fractional Fourier energy of cutoff extensions

The cosine-prior roadmap interpolates its zero- and first-order whole-space energy estimates by Hölder's inequality. This file proves that step for the paper's angular-frequency transform, including zero-energy and endpoint cases. The weak-derivative identities and endpoint estimates remain separate obligations.

The angular-frequency transform equals Mathlib's transform at the rescaled frequency, with the unitary normalization.

Formal statement
p :
ℕ
G :
EuclideanSpace ℝ (Fin p) → ℂ
ω :
Fourier G ω = (2 * pi) ^ (-(p : ℝ) / 2) • 𝓕 G (((2 * pi)⁻¹ : ℝ) • ω)
Proof (Lean source)
-- @node: Fourier_eq_scaled lemma Fourier_eq_scaled {p : ℕ} (G : EuclideanSpace ℝ (Fin p) → ℂ) (ω : EuclideanSpace ℝ (Fin p)) : Fourier G ω = (2 * Real.pi) ^ (-(p : ℝ) / 2) • 𝓕 G (((2 * Real.pi)⁻¹ : ℝ) • ω) := by unfold Fourier congr 1 rw [Real.fourier_eq'] apply integral_congr_ae filter_upwards with u congr 2 simp only [inner_smul_right, PiLp.inner_apply, RCLike.inner_apply, conj_trivial] push_cast have hpi : (2 * Real.pi : ℝ) ≠ 0 := by positivity field_simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fourier_eq_scaled · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineEnergy.lean:16

[ An integrable extension has a continuous angular-frequency Fourier transform. This uses the hG hypothesis, the stated conclusion.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
Proof (Lean source)
-- @node: Fourier_continuous @[fun_prop] lemma Fourier_continuous {p : ℕ} {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG : Integrable G volume) : Continuous (Fourier G) := by have hc : Continuous (𝓕 G) := VectorFourier.fourierIntegral_continuous Real.continuous_fourierChar (innerSL ℝ).continuous₂ hG have he : Fourier G = fun ω => (2 * pi) ^ (-(p : ℝ) / 2) • 𝓕 G (((2 * pi)⁻¹ : ℝ) • ω) := funext (Fourier_eq_scaled G) rw [he] fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fourier_continuous · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineEnergy.lean:34

The squared whole-space Fourier energy at a local Sobolev exponent.

Definition (Lean source)
p :
ℕ
s :
ℝ
G :
EuclideanSpace ℝ (Fin p) → ℂ
extensionFourierEnergy p s G :
ℝ≥0∞
∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.extensionFourierEnergy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineEnergy.lean:46
theorem extensionFourierEnergy_density Lemma extensionFourierEnergy_density in the paper ↗

The weighted real energy density factors into nonnegative extended-real factors.](goal) This uses the stated conclusion.

Formal statement
p :
ℕ
s :
ℝ
G :
EuclideanSpace ℝ (Fin p) → ℂ
ω :
ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)
= ofReal (‖Fourier G ω‖ ^ 2) * ofReal (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s
Proof (Lean source)
-- @node: extensionFourierEnergy_density lemma extensionFourierEnergy_density {p : ℕ} (s : ℝ) (G : EuclideanSpace ℝ (Fin p) → ℂ) (ω : EuclideanSpace ℝ (Fin p)) : ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s) = ofReal (‖Fourier G ω‖ ^ 2) * ofReal (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s := by rw [ENNReal.ofReal_mul (sq_nonneg _), ENNReal.ofReal_rpow_of_pos (by positivity)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.extensionFourierEnergy_density · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineEnergy.lean:52
theorem extensionFourierEnergy_interpolation

Hölder interpolates the zero- and first-order extension energies, including both endpoints and zero energy. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
s :
ℝ
hs :
0 ≤ s
hs1 :
s ≤ 1
G :
EuclideanSpace ℝ (Fin p) → ℂ
Proof (Lean source)
-- @node: extensionFourierEnergy_interpolation lemma extensionFourierEnergy_interpolation {p : ℕ} {s : ℝ} (hs : 0 ≤ s) (hs1 : s ≤ 1) {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG : Integrable G volume) : extensionFourierEnergy p s G ≤ extensionFourierEnergy p 0 G ^ (1 - s) * extensionFourierEnergy p 1 G ^ s := by let f := fun ω => ofReal (‖Fourier G ω‖ ^ 2) let w := fun ω : EuclideanSpace ℝ (Fin p) => ofReal (1 + ‖ω‖ ^ 2 / (p : ℝ)) have hf : AEMeasurable f volume := by dsimp [f]; fun_prop have hfw : AEMeasurable (fun ω => f ω * w ω) volume := by dsimp [f, w]; fun_prop have he (ω : EuclideanSpace ℝ (Fin p)) : f ω ^ (1 - s) * (f ω * w ω) ^ s = f ω * w ω ^ s := by rw [ENNReal.mul_rpow_of_nonneg _ _ hs, ← mul_assoc, ← ENNReal.rpow_add_of_nonneg _ _ (sub_nonneg.mpr hs1) hs] simp have h := ENNReal.lintegral_mul_norm_pow_le hf hfw (sub_nonneg.mpr hs1) hs (by ring : 1 - s + s = 1) simp_rw [he] at h simpa only [extensionFourierEnergy, extensionFourierEnergy_density, ENNReal.rpow_zero, ENNReal.rpow_one, mul_one, f, w] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.extensionFourierEnergy_interpolation · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineEnergy.lean:61
theorem extensionFourierEnergy_le_of_endpoints

Zero-order energy at most A and first-order energy at most A times the squared cutoff give fractional energy at most A times the cutoff to power twice the smoothness. Under the stated conditions.

Formal statement
p :
ℕ
s L :
ℝ
hs :
0 ≤ s
hs1 :
s ≤ 1
hL :
0 ≤ L
G :
EuclideanSpace ℝ (Fin p) → ℂ
A :
ℝ≥0∞
h0 :
h1 :
extensionFourierEnergy p 1 G ≤ A * ofReal (L ^ 2)
extensionFourierEnergy p s G ≤ A * ofReal ((L ^ s) ^ 2)
Proof (Lean source)
-- @node: extensionFourierEnergy_le_of_endpoints lemma extensionFourierEnergy_le_of_endpoints {p : ℕ} {s L : ℝ} (hs : 0 ≤ s) (hs1 : s ≤ 1) (hL : 0 ≤ L) {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG : Integrable G volume) (A : ℝ≥0∞) (h0 : extensionFourierEnergy p 0 G ≤ A) (h1 : extensionFourierEnergy p 1 G ≤ A * ofReal (L ^ 2)) : extensionFourierEnergy p s G ≤ A * ofReal ((L ^ s) ^ 2) := by have hpow : (L ^ 2) ^ s = (L ^ s) ^ 2 := by rw [← Real.rpow_natCast_mul hL, mul_comm, Real.rpow_mul_natCast hL] calc extensionFourierEnergy p s G ≤ extensionFourierEnergy p 0 G ^ (1 - s) * extensionFourierEnergy p 1 G ^ s := extensionFourierEnergy_interpolation hs hs1 hG _ ≤ A ^ (1 - s) * (A * ofReal (L ^ 2)) ^ s := by exact mul_le_mul' (ENNReal.rpow_le_rpow h0 (sub_nonneg.mpr hs1)) (ENNReal.rpow_le_rpow h1 hs) _ = A * ofReal ((L ^ s) ^ 2) := by rw [ENNReal.mul_rpow_of_nonneg _ _ hs, ← mul_assoc, ← ENNReal.rpow_add_of_nonneg _ _ (sub_nonneg.mpr hs1) hs] simp only [sub_add_cancel, ENNReal.rpow_one] rw [ENNReal.ofReal_rpow_of_nonneg (sq_nonneg _) hs, hpow]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.extensionFourierEnergy_le_of_endpoints · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineEnergy.lean:85
theorem cosinePair_restriction_bound_of_endpoints

The roadmap's two endpoint estimates for the explicit cutoff extension imply the required pair restriction bound; the endpoint estimates are explicit remaining proof obligations. Under the stated conditions.

Formal statement
g :
Cube 2 → ℝ
hg :
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
L :
ℕ
H :
ℝ≥0∞
h1 :
≤ ofReal (C0 ^ 2) * ofReal ((L : ℝ) ^ 2) * H
sobolevNormSq 2 s g ≤ ofReal (C0 ^ 2 * ((L : ℝ) ^ s) ^ 2) * H
Proof (Lean source)
-- @node: cosinePair_restriction_bound_of_endpoints lemma cosinePair_restriction_bound_of_endpoints {g : Cube 2 → ℝ} (hg : Continuous g) {s : ℝ} (hs : 0 < s) (hs1 : s ≤ 1) (L : ℕ) (H : ℝ≥0∞) (h0 : extensionFourierEnergy 2 0 (cosinePairExtension g) ≤ 16 * H) (h1 : extensionFourierEnergy 2 1 (cosinePairExtension g) ≤ ofReal (C0 ^ 2) * ofReal ((L : ℝ) ^ 2) * H) : sobolevNormSq 2 s g ≤ ofReal (C0 ^ 2 * ((L : ℝ) ^ s) ^ 2) * H := by have hC : (16 : ℝ) ≤ C0 ^ 2 := by rw [C0, Real.sq_sqrt (by positivity)] nlinarith [sq_nonneg pi] have h0' : extensionFourierEnergy 2 0 (cosinePairExtension g) ≤ ofReal (C0 ^ 2) * H := h0.trans (mul_le_mul' (by simpa using ENNReal.ofReal_le_ofReal hC) le_rfl) have h1' : extensionFourierEnergy 2 1 (cosinePairExtension g) ≤ (ofReal (C0 ^ 2) * H) * ofReal ((L : ℝ) ^ 2) := by simpa only [mul_assoc, mul_comm H] using h1 have h := extensionFourierEnergy_le_of_endpoints hs.le hs1 (Nat.cast_nonneg L) (cosinePairExtension_admissible hg).1 _ h0' h1' apply (sobolevNormSq_le_extension_energy s g _ (cosinePairExtension_admissible hg)).trans simpa only [extensionFourierEnergy, ENNReal.ofReal_mul (sq_nonneg C0), mul_assoc, mul_comm H] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePair_restriction_bound_of_endpoints · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineEnergy.lean:109
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.CosineExtension 35 declarations The roadmap's piecewise affine cutoff is one on the cube and zero outside [-1,2].

Explicit whole-space extensions of the cosine prior

The roadmap's piecewise affine cutoff is one on the cube and zero outside [-1,2]. Its product gives continuous compactly supported extensions of the canonical pair polynomials, admissible in the restriction-norm infimum. The weak-derivative and weighted Fourier-energy bounds remain separate obligations.

[ The piecewise affine cutoff with plateau [0,1] and support [-1,2].

Definition (Lean source)
u :
ℝ
cosineCutoff u :
ℝ
max 0 (min 1 (min (u + 1) (2 - u)))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:19
theorem cosineCutoff_continuous

The cutoff is continuous, including at every joining point. This uses the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: cosineCutoff_continuous @[fun_prop] lemma cosineCutoff_continuous : Continuous cosineCutoff := by unfold cosineCutoff fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_continuous · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:23
theorem cosineCutoff_bounds

The cutoff takes values between zero and one everywhere.](goal) This uses the stated conclusion.

Formal statement
u :
ℝ
conclusion 1
0 ≤ cosineCutoff u
conclusion 2
cosineCutoff u ≤ 1
Proof (Lean source)
-- @node: cosineCutoff_bounds lemma cosineCutoff_bounds (u : ℝ) : 0 ≤ cosineCutoff u ∧ cosineCutoff u ≤ 1 := by unfold cosineCutoff exact ⟨le_max_left _ _, max_le (by norm_num) (min_le_left _ _)⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_bounds · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:29
theorem cosineCutoff_eq_one

The plateau agrees exactly with one on the closed unit interval. Under the stated conditions, the asserted mathematical result follows.

Formal statement
u :
ℝ
hu :
u ∈ Icc (0 : ℝ) 1
Proof (Lean source)
-- @node: cosineCutoff_eq_one lemma cosineCutoff_eq_one {u : ℝ} (hu : u ∈ Icc (0 : ℝ) 1) : cosineCutoff u = 1 := by unfold cosineCutoff rw [min_eq_left (le_min (by linarith [hu.1]) (by linarith [hu.2]))] norm_num
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_eq_one · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:35
theorem cosineCutoff_eq_add_one

On the left ramp the cutoff has slope one. Under the stated conditions.

Formal statement
u :
ℝ
hu :
u ∈ Icc (-1 : ℝ) 0
cosineCutoff u = u + 1
Proof (Lean source)
-- @node: cosineCutoff_eq_add_one lemma cosineCutoff_eq_add_one {u : ℝ} (hu : u ∈ Icc (-1 : ℝ) 0) : cosineCutoff u = u + 1 := by unfold cosineCutoff rw [min_eq_left (show u + 1 ≤ 2 - u by linarith [hu.2]), min_eq_right (show u + 1 ≤ 1 by linarith [hu.2]), max_eq_right (by linarith [hu.1])]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_eq_add_one · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:43
theorem cosineCutoff_eq_two_sub

On the right ramp the cutoff has slope minus one. Under the stated conditions.

Formal statement
u :
ℝ
hu :
u ∈ Icc (1 : ℝ) 2
cosineCutoff u = 2 - u
Proof (Lean source)
-- @node: cosineCutoff_eq_two_sub lemma cosineCutoff_eq_two_sub {u : ℝ} (hu : u ∈ Icc (1 : ℝ) 2) : cosineCutoff u = 2 - u := by unfold cosineCutoff rw [min_eq_right (show 2 - u ≤ u + 1 by linarith [hu.1]), min_eq_right (show 2 - u ≤ 1 by linarith [hu.1]), max_eq_right (by linarith [hu.2])]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_eq_two_sub · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:52
theorem cosineCutoff_eq_zero

Outside the larger closed interval the cutoff vanishes. Under the stated conditions.

Formal statement
u :
ℝ
hu :
u ∉ Icc (-1 : ℝ) 2
Proof (Lean source)
-- @node: cosineCutoff_eq_zero lemma cosineCutoff_eq_zero {u : ℝ} (hu : u ∉ Icc (-1 : ℝ) 2) : cosineCutoff u = 0 := by apply max_eq_left simp only [mem_Icc, not_and_or, not_le] at hu rcases hu with hu | hu · exact le_trans (min_le_right _ _) (le_trans (min_le_left _ _) (by linarith)) · exact le_trans (min_le_right _ _) (le_trans (min_le_right _ _) (by linarith))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_eq_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:61
theorem cosineCutoff_lipschitz

The cutoff is a contraction on the whole real line. The asserted mathematical result follows.

Formal statement
Proof (Lean source)
-- @node: cosineCutoff_lipschitz lemma cosineCutoff_lipschitz : LipschitzWith 1 cosineCutoff := by have hl : LipschitzWith 1 (fun u : ℝ => u + 1) := by apply LipschitzWith.of_dist_le_mul intro x y simp [Real.dist_eq] have hr : LipschitzWith 1 (fun u : ℝ => 2 - u) := by apply LipschitzWith.of_dist_le_mul intro x y simp only [Real.dist_eq, NNReal.coe_one, one_mul] have he : (2 - x) - (2 - y) = -(x - y) := by ring rw [he, abs_neg] unfold cosineCutoff convert ((hl.min hr).const_min 1).const_max 0 using 1 simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_lipschitz · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:71
theorem cosineCutoff_hasDerivAt_left

On the open left ramp the cutoff has derivative one. Under the stated conditions, the asserted mathematical result follows.

Formal statement
u :
ℝ
hu :
u ∈ Ioo (-1 : ℝ) 0
Proof (Lean source)
-- @node: cosineCutoff_hasDerivAt_left lemma cosineCutoff_hasDerivAt_left {u : ℝ} (hu : u ∈ Ioo (-1 : ℝ) 0) : HasDerivAt cosineCutoff 1 u := by apply ((hasDerivAt_id u).add_const 1).congr_of_eventuallyEq filter_upwards [isOpen_Ioo.mem_nhds hu] with v hv exact cosineCutoff_eq_add_one ⟨hv.1.le, hv.2.le⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_hasDerivAt_left · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:88
theorem cosineCutoff_hasDerivAt_plateau

On the open plateau the cutoff has derivative zero. Under the stated conditions.

Formal statement
u :
ℝ
hu :
u ∈ Ioo (0 : ℝ) 1
Proof (Lean source)
-- @node: cosineCutoff_hasDerivAt_plateau lemma cosineCutoff_hasDerivAt_plateau {u : ℝ} (hu : u ∈ Ioo (0 : ℝ) 1) : HasDerivAt cosineCutoff 0 u := by apply (hasDerivAt_const u (1 : ℝ)).congr_of_eventuallyEq filter_upwards [isOpen_Ioo.mem_nhds hu] with v hv exact cosineCutoff_eq_one ⟨hv.1.le, hv.2.le⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_hasDerivAt_plateau · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:96
theorem cosineCutoff_hasDerivAt_right

On the open right ramp the cutoff has derivative minus one. Under the stated conditions.

Formal statement
u :
ℝ
hu :
u ∈ Ioo (1 : ℝ) 2
Proof (Lean source)
-- @node: cosineCutoff_hasDerivAt_right lemma cosineCutoff_hasDerivAt_right {u : ℝ} (hu : u ∈ Ioo (1 : ℝ) 2) : HasDerivAt cosineCutoff (-1) u := by have h : HasDerivAt (fun v : ℝ => 2 - v) (-1) u := by simpa using (hasDerivAt_id u).const_sub 2 apply h.congr_of_eventuallyEq filter_upwards [isOpen_Ioo.mem_nhds hu] with v hv exact cosineCutoff_eq_two_sub ⟨hv.1.le, hv.2.le⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_hasDerivAt_right · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:104
theorem cosineCutoff_hasDerivAt_exterior

Outside the support interval the cutoff has derivative zero. Under the stated conditions.

Formal statement
u :
ℝ
hu :
u ∉ Icc (-1 : ℝ) 2
Proof (Lean source)
-- @node: cosineCutoff_hasDerivAt_exterior lemma cosineCutoff_hasDerivAt_exterior {u : ℝ} (hu : u ∉ Icc (-1 : ℝ) 2) : HasDerivAt cosineCutoff 0 u := by apply (hasDerivAt_const u (0 : ℝ)).congr_of_eventuallyEq filter_upwards [isClosed_Icc.isOpen_compl.mem_nhds hu] with v hv exact cosineCutoff_eq_zero hv
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_hasDerivAt_exterior · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:114
theorem cosineCutoff_differentiableAt

The cutoff is differentiable away from its four joining points. Under the stated conditions.

Formal statement
u :
ℝ
hm :
u ≠ -1
h0 :
u ≠ 0
h1 :
u ≠ 1
h2 :
u ≠ 2
Proof (Lean source)
-- @node: cosineCutoff_differentiableAt lemma cosineCutoff_differentiableAt {u : ℝ} (hm : u ≠ -1) (h0 : u ≠ 0) (h1 : u ≠ 1) (h2 : u ≠ 2) : DifferentiableAt ℝ cosineCutoff u := by by_cases he : u ∉ Icc (-1 : ℝ) 2 · exact (cosineCutoff_hasDerivAt_exterior he).differentiableAt have hi : u ∈ Icc (-1 : ℝ) 2 := by simpa using he by_cases hz : u < 0 · exact (cosineCutoff_hasDerivAt_left ⟨lt_of_le_of_ne hi.1 hm.symm, hz⟩).differentiableAt by_cases ho : u < 1 · exact (cosineCutoff_hasDerivAt_plateau ⟨lt_of_le_of_ne (le_of_not_gt hz) h0.symm, ho⟩).differentiableAt exact (cosineCutoff_hasDerivAt_right ⟨lt_of_le_of_ne (le_of_not_gt ho) h1.symm, lt_of_le_of_ne hi.2 h2⟩).differentiableAt
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_differentiableAt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:122
theorem cosineCutoff_ae_differentiableAt

The four joining points form a null set, so the cutoff is differentiable almost everywhere. The asserted mathematical result follows.

Formal statement
∀ᵐ u : ℝ ∂volume, DifferentiableAt ℝ cosineCutoff u
Proof (Lean source)
-- @node: cosineCutoff_ae_differentiableAt lemma cosineCutoff_ae_differentiableAt : ∀ᵐ u : ℝ ∂volume, DifferentiableAt ℝ cosineCutoff u := by filter_upwards [Measure.ae_ne volume (-1 : ℝ), Measure.ae_ne volume (0 : ℝ), Measure.ae_ne volume (1 : ℝ), Measure.ae_ne volume (2 : ℝ)] with u hm h0 h1 h2 exact cosineCutoff_differentiableAt hm h0 h1 h2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_ae_differentiableAt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:138
theorem cosineCutoff_deriv_bound

The derivative is bounded by one, including Lean's zero value at nondifferentiable points.

Formal statement
u :
ℝ
Proof (Lean source)
-- @node: cosineCutoff_deriv_bound lemma cosineCutoff_deriv_bound (u : ℝ) : |deriv cosineCutoff u| ≤ 1 := by simpa only [Real.norm_eq_abs, NNReal.coe_one] using (norm_deriv_le_of_lipschitz (x₀ := u) cosineCutoff_lipschitz)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_deriv_bound · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:146

[ The product cutoff in the two component coordinates.

Definition (Lean source)
u :
cosinePairCutoff u :
ℝ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairCutoff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:152
theorem cosinePairCutoff_continuous

The product cutoff is continuous. This uses the stated conclusion.

Formal statement
Proof (Lean source)
-- @node: cosinePairCutoff_continuous @[fun_prop] lemma cosinePairCutoff_continuous : Continuous cosinePairCutoff := by unfold cosinePairCutoff fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairCutoff_continuous · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:157
theorem cosinePairCutoff_bounds

The product cutoff is between zero and one.](goal) This uses the stated conclusion.

Formal statement
u :
conclusion 1
conclusion 2
Proof (Lean source)
-- @node: cosinePairCutoff_bounds lemma cosinePairCutoff_bounds (u : EuclideanSpace ℝ (Fin 2)) : 0 ≤ cosinePairCutoff u ∧ cosinePairCutoff u ≤ 1 := by obtain ⟨h0, h0'⟩ := cosineCutoff_bounds (u 0) obtain ⟨h1, h1'⟩ := cosineCutoff_bounds (u 1) exact ⟨mul_nonneg h0 h1, by unfold cosinePairCutoff; nlinarith⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairCutoff_bounds · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:163
theorem cosinePairCutoff_hasDerivAt_first

Differentiating the first coordinate slice gives the first product-rule term. Under the stated conditions, the asserted mathematical result follows.

Formal statement
u v :
ℝ
Proof (Lean source)
-- @node: cosinePairCutoff_hasDerivAt_first lemma cosinePairCutoff_hasDerivAt_first {u v : ℝ} (hu : DifferentiableAt ℝ cosineCutoff u) : HasDerivAt (fun x => cosineCutoff x * cosineCutoff v) (deriv cosineCutoff u * cosineCutoff v) u := by exact hu.hasDerivAt.mul_const _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairCutoff_hasDerivAt_first · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:171
theorem cosinePairCutoff_hasDerivAt_second

Differentiating the second coordinate slice gives the second product-rule term. Under the stated conditions.

Formal statement
u v :
ℝ
Proof (Lean source)
-- @node: cosinePairCutoff_hasDerivAt_second lemma cosinePairCutoff_hasDerivAt_second {u v : ℝ} (hv : DifferentiableAt ℝ cosineCutoff v) : HasDerivAt (fun x => cosineCutoff u * cosineCutoff x) (cosineCutoff u * deriv cosineCutoff v) v := by exact hv.hasDerivAt.const_mul _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairCutoff_hasDerivAt_second · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:179
theorem cosinePairCutoff_gradient_sq_bound

The squared Euclidean length of the two cutoff partial derivatives is at most two. The asserted mathematical result follows.

Formal statement
u v :
ℝ
Proof (Lean source)
-- @node: cosinePairCutoff_gradient_sq_bound lemma cosinePairCutoff_gradient_sq_bound (u v : ℝ) : (deriv cosineCutoff u * cosineCutoff v) ^ 2 + (cosineCutoff u * deriv cosineCutoff v) ^ 2 ≤ 2 := by have hu := cosineCutoff_bounds u have hv := cosineCutoff_bounds v have hdu := (abs_le.mp (cosineCutoff_deriv_bound u)) have hdv := (abs_le.mp (cosineCutoff_deriv_bound v)) have hdu2 : (deriv cosineCutoff u) ^ 2 ≤ 1 := by nlinarith have hdv2 : (deriv cosineCutoff v) ^ 2 ≤ 1 := by nlinarith have hu2 : cosineCutoff u ^ 2 ≤ 1 := by nlinarith have hv2 : cosineCutoff v ^ 2 ≤ 1 := by nlinarith rw [mul_pow, mul_pow] have hfirst := mul_le_mul hdu2 hv2 (sq_nonneg _) (by norm_num : (0 : ℝ) ≤ 1) have hsecond := mul_le_mul hu2 hdv2 (sq_nonneg _) (by norm_num : (0 : ℝ) ≤ 1) nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairCutoff_gradient_sq_bound · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:187
theorem cosinePairCutoff_eq_one

The product cutoff equals one on the closed Euclidean unit cube. Under the stated conditions, the asserted mathematical result follows.

Formal statement
u :
hu :
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairCutoff_eq_one · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:205
theorem cosinePairCutoff_support_coordinates

A nonzero product cutoff forces both coordinates into [-1,2]. Under the stated conditions.

Formal statement
u :
hu :
conclusion 1
u 0 ∈ Icc (-1 : ℝ) 2
conclusion 2
u 1 ∈ Icc (-1 : ℝ) 2
Proof (Lean source)
-- @node: cosinePairCutoff_support_coordinates lemma cosinePairCutoff_support_coordinates {u : EuclideanSpace ℝ (Fin 2)} (hu : cosinePairCutoff u ≠ 0) : u 0 ∈ Icc (-1 : ℝ) 2 ∧ u 1 ∈ Icc (-1 : ℝ) 2 := by constructor · by_contra h exact hu (by simp [cosinePairCutoff, cosineCutoff_eq_zero h]) · by_contra h exact hu (by simp [cosinePairCutoff, cosineCutoff_eq_zero h])
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairCutoff_support_coordinates · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:211
theorem cosinePairCutoff_hasCompactSupport

The product cutoff has compact support in the whole Euclidean plane. The asserted mathematical result follows.

Formal statement
Proof (Lean source)
-- @node: cosinePairCutoff_hasCompactSupport lemma cosinePairCutoff_hasCompactSupport : HasCompactSupport cosinePairCutoff := by have hsub : support cosinePairCutoff ⊆ closedBall (0 : EuclideanSpace ℝ (Fin 2)) 4 := by intro u hu obtain ⟨h0, h1⟩ := cosinePairCutoff_support_coordinates hu have hsq : ‖u‖ ^ 2 ≤ 8 := by rw [EuclideanSpace.real_norm_sq_eq, Fin.sum_univ_two] nlinarith [h0.1, h0.2, h1.1, h1.2, sq_nonneg (u 0 + 1), sq_nonneg (u 1 + 1)] rw [Metric.mem_closedBall, dist_zero_right] nlinarith [norm_nonneg u] exact (isCompact_closedBall (0 : EuclideanSpace ℝ (Fin 2)) 4).of_isClosed_subset (isClosed_tsupport _) (closure_minimal hsub Metric.isClosed_closedBall)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairCutoff_hasCompactSupport · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:221

[ Multiply a cube formula by the roadmap's product cutoff to extend it globally.

Definition (Lean source)
g :
Cube 2 → ℝ
u :
cosinePairExtension g u :
ℂ
(cosinePairCutoff u * g (fun h => u h) : ℝ)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairExtension · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:237
theorem cosinePairExtension_continuous

Continuous component formulas give continuous cutoff extensions. This uses the hg hypothesis, the stated conclusion.

Formal statement
g :
Cube 2 → ℝ
hg :
Proof (Lean source)
-- @node: cosinePairExtension_continuous @[fun_prop] lemma cosinePairExtension_continuous {g : Cube 2 → ℝ} (hg : Continuous g) : Continuous (cosinePairExtension g) := by unfold cosinePairExtension fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairExtension_continuous · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:242
theorem cosinePairExtension_hasCompactSupport

The extension vanishes outside the support of the fixed product cutoff.](goal) This uses the stated conclusion.

Formal statement
g :
Cube 2 → ℝ
Proof (Lean source)
-- @node: cosinePairExtension_hasCompactSupport lemma cosinePairExtension_hasCompactSupport (g : Cube 2 → ℝ) : HasCompactSupport (cosinePairExtension g) := by have hsub : support (cosinePairExtension g) ⊆ support cosinePairCutoff := by intro u hu change cosinePairCutoff u ≠ 0 intro hz exact hu (by simp [cosinePairExtension, hz]) exact cosinePairCutoff_hasCompactSupport.of_isClosed_subset (isClosed_tsupport _) (closure_mono hsub)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairExtension_hasCompactSupport · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:249
theorem cosinePairExtension_eq_on_cube

On the closed cube the extension is the original formula, including its boundary. Under the stated conditions, the asserted mathematical result follows.

Formal statement
g :
Cube 2 → ℝ
u :
hu :
cosinePairExtension g u = (g (fun h => u h) : ℂ)
Proof (Lean source)
-- @node: cosinePairExtension_eq_on_cube lemma cosinePairExtension_eq_on_cube (g : Cube 2 → ℝ) {u : EuclideanSpace ℝ (Fin 2)} (hu : u ∈ euclideanCube 2) : cosinePairExtension g u = (g (fun h => u h) : ℂ) := by simp [cosinePairExtension, cosinePairCutoff_eq_one hu]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairExtension_eq_on_cube · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:261
theorem cosinePairExtension_admissible

A continuous pair formula has a valid integrable, square-integrable extension in the defining infimum of the restriction norm. Under the stated conditions.

Formal statement
g :
Cube 2 → ℝ
hg :
conclusion 2
conclusion 3
=ᵐ[volume.restrict (euclideanCube 2)] fun u => (g (fun h => u h) : ℂ)
Proof (Lean source)
-- @node: cosinePairExtension_admissible lemma cosinePairExtension_admissible {g : Cube 2 → ℝ} (hg : Continuous g) : Integrable (cosinePairExtension g) volume ∧ MemLp (cosinePairExtension g) 2 volume ∧ cosinePairExtension g =ᵐ[volume.restrict (euclideanCube 2)] fun u => (g (fun h => u h) : ℂ) := by have hc := cosinePairExtension_continuous hg have hs := cosinePairExtension_hasCompactSupport g refine ⟨hc.integrable_of_hasCompactSupport hs, hc.memLp_of_hasCompactSupport hs, ?_⟩ apply (ae_restrict_iff' ?_).2 · exact Filter.Eventually.of_forall (fun u hu => cosinePairExtension_eq_on_cube g hu) · have heq : euclideanCube 2 = ⋂ h : Fin 2, (fun u : EuclideanSpace ℝ (Fin 2) => u h) ⁻¹' Icc (0 : ℝ) 1 := by ext u simp [euclideanCube] rw [heq] exact MeasurableSet.iInter (fun h => measurableSet_Icc.preimage (by fun_prop))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosinePairExtension_admissible · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:268
theorem mXi_g2_continuous

[ The canonical pair effects of every cosine-prior realization are continuous formulas. This uses the hjl hypothesis, the stated conclusion.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
j l :
Fin d
hjl :
j < l
Continuous (fun u : Cube 2 => g2 (mXi s L ξ) j l (u 0) (u 1))
Proof (Lean source)
-- @node: mXi_g2_continuous @[fun_prop] lemma mXi_g2_continuous {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) (j l : Fin d) (hjl : j < l) : Continuous (fun u : Cube 2 => g2 (mXi s L ξ) j l (u 0) (u 1)) := by simp_rw [mXi_g2 s ξ j l hjl] apply continuous_const.mul apply continuous_finsetSum intro α _ by_cases h : α.val.1.1 = j ∧ α.val.1.2 = l · simp only [if_pos h] fun_prop · simp only [if_neg h] fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_g2_continuous · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:288
theorem mXi_g2_extension_admissible

Every canonical pair polynomial has an explicit admissible whole-space extension.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
j l :
Fin d
hjl :
j < l
g :
fun u => g2 (mXi s L ξ) j l (u 0) (u 1) (: Cube 2 → ℝ)
=ᵐ[volume.restrict (euclideanCube 2)] fun u => (g (fun h => u h) : ℂ)
Proof (Lean source)
-- @node: mXi_g2_extension_admissible lemma mXi_g2_extension_admissible {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) (j l : Fin d) (hjl : j < l) : let g : Cube 2 → ℝ := fun u => g2 (mXi s L ξ) j l (u 0) (u 1) Integrable (cosinePairExtension g) volume ∧ MemLp (cosinePairExtension g) 2 volume ∧ cosinePairExtension g =ᵐ[volume.restrict (euclideanCube 2)] fun u => (g (fun h => u h) : ℂ) := by exact cosinePairExtension_admissible (mXi_g2_continuous s ξ j l hjl)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_g2_extension_admissible · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:303
theorem sobolevNormSq_le_extension_energy Lemma sobolevNormSq_le_extension_energy in the paper ↗

Any admissible whole-space extension bounds the restriction-norm infimum by its own weighted Fourier energy. Under the stated conditions.

Formal statement
p :
ℕ
s :
ℝ
g :
Cube p → ℝ
G :
EuclideanSpace ℝ (Fin p) → ℂ
hG :
MemLp G 2 volume ∧
G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun h => u h) : ℂ)
≤ ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)
Proof (Lean source)
-- @node: sobolevNormSq_le_extension_energy lemma sobolevNormSq_le_extension_energy {p : ℕ} (s : ℝ) (g : Cube p → ℝ) (G : EuclideanSpace ℝ (Fin p) → ℂ) (hG : Integrable G volume ∧ MemLp G 2 volume ∧ G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun h => u h) : ℂ)) : sobolevNormSq p s g ≤ ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s) := by exact iInf_le_of_le G (iInf_le_of_le hG le_rfl)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.sobolevNormSq_le_extension_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:313
theorem mXi_g2_norm_le_extension_energy

The explicit cutoff extension can be used directly to bound every canonical pair restriction norm of the prior. Under the stated conditions.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
j l :
Fin d
hjl :
j < l
g :
fun u => g2 (mXi s L ξ) j l (u 0) (u 1) (: Cube 2 → ℝ)
≤ ∫⁻ ω, ofReal (‖Fourier (cosinePairExtension g) ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (2 : ℝ)) ^ s)
Proof (Lean source)
-- @node: mXi_g2_norm_le_extension_energy lemma mXi_g2_norm_le_extension_energy {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) (j l : Fin d) (hjl : j < l) : let g : Cube 2 → ℝ := fun u => g2 (mXi s L ξ) j l (u 0) (u 1) sobolevNormSq 2 s g ≤ ∫⁻ ω, ofReal (‖Fourier (cosinePairExtension g) ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (2 : ℝ)) ^ s) := by exact sobolevNormSq_le_extension_energy s _ _ (mXi_g2_extension_admissible s ξ j l hjl)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_g2_norm_le_extension_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:324
theorem sobolevNormSq_zero

The zero formula has zero restriction energy, using the zero extension. The asserted mathematical result follows.

Formal statement
p :
ℕ
s :
ℝ
sobolevNormSq p s (fun _ => 0) = 0
Proof (Lean source)
-- @node: sobolevNormSq_zero lemma sobolevNormSq_zero (p : ℕ) (s : ℝ) : sobolevNormSq p s (fun _ => 0) = 0 := by apply le_antisymm _ (zero_le) have hG : Integrable (fun _ : EuclideanSpace ℝ (Fin p) => (0 : ℂ)) volume ∧ MemLp (fun _ : EuclideanSpace ℝ (Fin p) => (0 : ℂ)) 2 volume ∧ (fun _ : EuclideanSpace ℝ (Fin p) => (0 : ℂ)) =ᵐ[volume.restrict (euclideanCube p)] fun _ => ((0 : ℝ) : ℂ) := ⟨integrable_zero _ _ _, MemLp.zero, Filter.Eventually.of_forall (fun _ => rfl)⟩ simpa [Fourier] using sobolevNormSq_le_extension_energy s (fun _ => 0) (fun _ => 0) hG
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.sobolevNormSq_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:335
theorem mXi_main_budget_zero

The main effects contribute no restriction energy to any cosine-prior realization.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
(∑ j, sobolevNormSq 1 s (fun u => g1 (mXi s L ξ) j (u 0))) = 0
Proof (Lean source)
-- @node: mXi_main_budget_zero lemma mXi_main_budget_zero {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) : (∑ j, sobolevNormSq 1 s (fun u => g1 (mXi s L ξ) j (u 0))) = 0 := by simp only [mXi_g1_zero, sobolevNormSq_zero, Finset.sum_const_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_main_budget_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineExtension.lean:347
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.CosineFourierEndpoints 4 declarations The proved slice integration-by-parts identity and nine-cell spatial bounds instantiate angular Plancherel with the exact one-half gradient normalization.

Fourier endpoints for the explicit cosine cutoff extension

The proved slice integration-by-parts identity and nine-cell spatial bounds instantiate angular Plancherel with the exact one-half gradient normalization.

theorem Fourier_eq_angularFourier Lemma Fourier_eq_angularFourier in the paper ↗

[ The paper and library angular Fourier definitions have identical normalization and kernel. This uses the stated conclusion.

Formal statement
p :
ℕ
G :
Space p → ℂ
Proof (Lean source)
-- @node: Fourier_eq_angularFourier lemma Fourier_eq_angularFourier {p : ℕ} (G : Space p → ℂ) : Fourier G = angularFourier G := rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fourier_eq_angularFourier · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineFourierEndpoints.lean:19
theorem cosine_lintegral_coordinates Lemma cosine_lintegral_coordinates in the paper ↗

Product-coordinate and Euclidean nonnegative integrals agree with Jacobian one.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
f :
Cube 2 → ℝ≥0∞
(∫⁻ u : Space 2, f (fun j => u j)) = ∫⁻ x : Cube 2, f x
Proof (Lean source)
-- @node: cosine_lintegral_coordinates lemma cosine_lintegral_coordinates (f : Cube 2 → ℝ≥0∞) : (∫⁻ u : Space 2, f (fun j => u j)) = ∫⁻ x : Cube 2, f x := by exact ((PiLp.volume_preserving_toLp (Fin 2)).lintegral_comp_emb (MeasurableEquiv.toLp 2 (Fin 2 → ℝ)).measurableEmbedding _).symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosine_lintegral_coordinates · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineFourierEndpoints.lean:24
theorem pairCosineExtension_fourier_endpoints

The cutoff extension obeys both angular Fourier endpoint bounds with the paper's constants. Under the stated conditions.

Formal statement
L :
ℕ
hL :
1 ≤ L
h :
Fin L × Fin L → ℝ
conclusion 1
conclusion 2
≤ ofReal (C0 ^ 2) * ofReal ((L : ℝ) ^ 2) * ofReal (∑ α, h α ^ 2)
Proof (Lean source)
-- @node: pairCosineExtension_fourier_endpoints lemma pairCosineExtension_fourier_endpoints {L : ℕ} (hL : 1 ≤ L) (h : Fin L × Fin L → ℝ) : extensionFourierEnergy 2 0 (cosinePairExtension (pairCosinePolynomial h)) ≤ 16 * ofReal (∑ α, h α ^ 2) ∧ extensionFourierEnergy 2 1 (cosinePairExtension (pairCosinePolynomial h)) ≤ ofReal (C0 ^ 2) * ofReal ((L : ℝ) ^ 2) * ofReal (∑ α, h α ^ 2) := by let G : Space 2 → ℝ := fun u => cosineCutoff (u 0) * cosineCutoff (u 1) * pairCosinePolynomial h (fun j => u j) let D : Fin 2 → Space 2 → ℝ := fun r u => pairCosineExtensionPartial h r (fun j => u j) have hGc : HasCompactSupport G := by have hs := (cosinePairExtension_hasCompactSupport (pairCosinePolynomial h)).comp_left (g := re) (by simp) simpa [G, cosinePairExtension, cosinePairCutoff, Function.comp_def] using hs have hGcont : Continuous G := by dsimp [G]; fun_prop have hD1 : ∀ r, Integrable (D r) volume := fun r => (pairCosineExtensionPartial_integrable_and_memLp h r).1 have hD2 : ∀ r, MemLp (D r) 2 volume := fun r => (pairCosineExtensionPartial_integrable_and_memLp h r).2 have hDc : ∀ r, HasCompactSupport (D r) := fun r => pairCosineExtensionPartial_hasCompactSupport h r have hslice : HasRealSliceIBP G D := by apply (realSliceIBP_coordinates_iff (fun x => cosineCutoff (x 0) * cosineCutoff (x 1) * pairCosinePolynomial h x) (pairCosineExtensionPartial h)).2 exact fun r x v v' hv hv' => pairCosineExtensionPartial_weak_slice h r x hv hv' have hA : l2Energy G ≤ ofReal (9 * ∑ α, h α ^ 2) := by have hec := cosine_lintegral_coordinates (fun x => ofReal ((cosineCutoff (x 0) * cosineCutoff (x 1) * pairCosinePolynomial h x) ^ 2)) simpa only [l2Energy, G, Real.norm_eq_abs, sq_abs, hec] using pairCosineExtension_spatial_energy_le h have hB : l2Energy (D 0) + l2Energy (D 1) ≤ ofReal ((36 + 36 * Real.pi ^ 2 * (L : ℝ) ^ 2) * ∑ α, h α ^ 2) := by rw [l2Energy, l2Energy, ← lintegral_add_left] · simp only [D, Real.norm_eq_abs, sq_abs, ← ENNReal.ofReal_add (sq_nonneg _) (sq_nonneg _)] rw [cosine_lintegral_coordinates (fun x => ofReal (pairCosineExtensionPartial h 0 x ^ 2 + pairCosineExtensionPartial h 1 x ^ 2))] exact pairCosineExtensionPartial_spatial_energy_le h · dsimp [D] unfold pairCosineExtensionPartial pairCutoffPartial split_ifs <;> fun_prop have hb := energy_bounds_two_real_slices G D (hGcont.integrable_of_hasCompactSupport hGc) (hGcont.memLp_of_hasCompactSupport hGc) hGc hD1 hD2 hslice (9 * ∑ α, h α ^ 2) ((36 + 36 * Real.pi ^ 2 * (L : ℝ) ^ 2) * ∑ α, h α ^ 2) (by positivity) (by positivity) hA hB have he : complexify G = cosinePairExtension (pairCosinePolynomial h) := by funext u simp [complexify, G, cosinePairExtension, cosinePairCutoff] rw [he] at hb have hsum : 0 ≤ ∑ α, h α ^ 2 := Finset.sum_nonneg (fun _ _ => sq_nonneg _) have hLreal : (1 : ℝ) ≤ L := by exact_mod_cast hL have hC : C0 ^ 2 = 48 + 32 * Real.pi ^ 2 := by rw [C0, Real.sq_sqrt (by positivity)] constructor · simp only [extensionFourierEnergy, Fourier_eq_angularFourier, Real.rpow_zero, mul_one] change zeroEnergy (cosinePairExtension (pairCosinePolynomial h)) ≤ _ apply hb.1.trans calc _ ≤ ofReal (16 * ∑ α, h α ^ 2) := ENNReal.ofReal_le_ofReal (by nlinarith) _ = _ := by rw [ENNReal.ofReal_mul (by norm_num : (0 : ℝ) ≤ 16)]; norm_num · simp only [extensionFourierEnergy, Fourier_eq_angularFourier, Real.rpow_one] change firstEnergy (cosinePairExtension (pairCosinePolynomial h)) ≤ _ apply hb.2.trans rw [← ENNReal.ofReal_mul (sq_nonneg C0), ← ENNReal.ofReal_mul (by positivity)] apply ENNReal.ofReal_le_ofReal rw [hC] have hsL : 1 ≤ (L : ℝ) ^ 2 := by nlinarith have hp := sq_nonneg Real.pi have hc : 27 + 18 * Real.pi ^ 2 * (L : ℝ) ^ 2 ≤ (48 + 32 * Real.pi ^ 2) * (L : ℝ) ^ 2 := by nlinarith nlinarith [mul_le_mul_of_nonneg_right hc hsum]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtension_fourier_endpoints · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineFourierEndpoints.lean:31
theorem pairCosinePolynomial_restriction_bound

The explicit cutoff certifies the pair restriction bound for arbitrary coefficients, without any endpoint assumptions. Under the stated conditions.

Formal statement
L :
ℕ
hL :
1 ≤ L
h :
Fin L × Fin L → ℝ
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
≤ ofReal (C0 ^ 2 * ((L : ℝ) ^ s) ^ 2) * ofReal (∑ α, h α ^ 2)
Proof (Lean source)
-- @node: pairCosinePolynomial_restriction_bound lemma pairCosinePolynomial_restriction_bound {L : ℕ} (hL : 1 ≤ L) (h : Fin L × Fin L → ℝ) {s : ℝ} (hs : 0 < s) (hs1 : s ≤ 1) : sobolevNormSq 2 s (pairCosinePolynomial h) ≤ ofReal (C0 ^ 2 * ((L : ℝ) ^ s) ^ 2) * ofReal (∑ α, h α ^ 2) := by have he := pairCosineExtension_fourier_endpoints hL h exact cosinePair_restriction_bound_of_endpoints (by fun_prop) hs hs1 L _ he.1 he.2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePolynomial_restriction_bound · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineFourierEndpoints.lean:106
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.CosineLegality 7 declarations The canonical pair coefficients instantiate the proved cutoff restriction bound.

Pooled legality of the normalized cosine prior

The canonical pair coefficients instantiate the proved cutoff restriction bound.

theorem pairIdx_sum_pairs

Summing prior coordinates is equivalent to summing ordered pairs and local frequencies.

Formal statement
d L :
ℕ
f :
PairIdx d L → ℝ
(∑ α, f α)
= ∑ jl : {jl : Fin d × Fin d // jl.1 < jl.2}, ∑ ab : Fin L × Fin L, f ⟨(jl.val, ab), jl.property⟩
Proof (Lean source)
-- @node: pairIdx_sum_pairs lemma pairIdx_sum_pairs {d L : ℕ} (f : PairIdx d L → ℝ) : (∑ α, f α) = ∑ jl : {jl : Fin d × Fin d // jl.1 < jl.2}, ∑ ab : Fin L × Fin L, f ⟨(jl.val, ab), jl.property⟩ := by let e : PairIdx d L ≃ {jl : Fin d × Fin d // jl.1 < jl.2} × (Fin L × Fin L) := { toFun := fun α => (⟨α.val.1, α.property⟩, α.val.2) invFun := fun α => ⟨(α.1.val, α.2), α.1.property⟩ left_inv := by intro α; rfl right_inv := by intro α; rfl } calc _ = ∑ x : {jl : Fin d × Fin d // jl.1 < jl.2} × (Fin L × Fin L), f (e.symm x) := Fintype.sum_equiv e _ _ (fun _ => rfl) _ = _ := by rw [Fintype.sum_prod_type]; rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairIdx_sum_pairs · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineLegality.lean:15
theorem mXi_g2_pairCosinePolynomial

Each canonical pair effect is the local polynomial with its normalized sign coefficients. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
j l :
Fin d
hjl :
j < l
(fun u : Cube 2 => g2 (mXi s L ξ) j l (u 0) (u 1))
= pairCosinePolynomial (fun ab : Fin L × Fin L => (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * sgn (ξ ⟨((j, l), ab), hjl⟩))
Proof (Lean source)
-- @node: mXi_g2_pairCosinePolynomial lemma mXi_g2_pairCosinePolynomial {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) (j l : Fin d) (hjl : j < l) : (fun u : Cube 2 => g2 (mXi s L ξ) j l (u 0) (u 1)) = pairCosinePolynomial (fun ab : Fin L × Fin L => (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * sgn (ξ ⟨((j, l), ab), hjl⟩)) := by classical funext u rw [mXi_g2 s ξ j l hjl, pairIdx_sum_pairs] have hc (jl : {jl : Fin d × Fin d // jl.1 < jl.2}) : (jl.val.1 = j ∧ jl.val.2 = l) ↔ jl = ⟨(j, l), hjl⟩ := by simp [Subtype.ext_iff, Prod.ext_iff] simp_rw [hc, Finset.sum_ite_irrel, Finset.sum_const_zero] simp only [Finset.sum_ite_eq', Finset.mem_univ, ↓reduceIte] rw [Finset.mul_sum] unfold pairCosinePolynomial apply Finset.sum_congr rfl intro ab _ ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_g2_pairCosinePolynomial · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineLegality.lean:30
theorem prior_pair_coefficient_energy

A local array of normalized signs has squared coefficient energy equal to its cardinality. Under the stated conditions.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
j l :
Fin d
hjl :
j < l
(∑ ab : Fin L × Fin L, ((C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * sgn (ξ ⟨((j, l), ab), hjl⟩)) ^ 2)
= (L : ℝ) ^ 2 * (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ ^ 2
Proof (Lean source)
-- @node: prior_pair_coefficient_energy lemma prior_pair_coefficient_energy {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) (j l : Fin d) (hjl : j < l) : (∑ ab : Fin L × Fin L, ((C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * sgn (ξ ⟨((j, l), ab), hjl⟩)) ^ 2) = (L : ℝ) ^ 2 * (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ ^ 2 := by have hs (ab : Fin L × Fin L) : sgn (ξ ⟨((j, l), ab), hjl⟩) ^ 2 = 1 := by cases ξ ⟨((j, l), ab), hjl⟩ <;> norm_num [sgn] simp only [mul_pow, hs, mul_one, Finset.sum_const, Finset.card_univ, Fintype.card_prod, Fintype.card_fin, nsmul_eq_mul, Nat.cast_mul] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prior_pair_coefficient_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineLegality.lean:52
theorem ordered_pair_budget_sum Lemma ordered_pair_budget_sum in the paper ↗

The ordered-coordinate sum of a common pair budget counts each pair exactly once. Under the stated conditions.

Formal statement
d :
ℕ
a :
ℝ≥0∞
(∑ j : Fin d, ∑ l : Fin d, if j < l then a else 0) = (d.choose 2 : ℝ≥0∞) * a
Proof (Lean source)
-- @node: ordered_pair_budget_sum lemma ordered_pair_budget_sum (d : ℕ) (a : ℝ≥0∞) : (∑ j : Fin d, ∑ l : Fin d, if j < l then a else 0) = (d.choose 2 : ℝ≥0∞) * a := by classical rw [← Fintype.sum_prod_type (fun jl : Fin d × Fin d => if jl.1 < jl.2 then a else 0)] rw [← Finset.sum_filter, Finset.sum_const, nsmul_eq_mul] have hc := Fintype.card_product_filter_lt (α := Fin d) simpa only [Fintype.card_fin] using congrArg (fun k : ℕ => (k : ℝ≥0∞) * a) hc
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ordered_pair_budget_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineLegality.lean:66
theorem prior_pair_budget_normalized

The pooled real coefficient normalization is exactly one. Under the stated conditions.

Formal statement
d L :
ℕ
hd :
2 ≤ d
hL :
1 ≤ L
s :
ℝ
ξ :
PairIdx d L → Bool
(d.choose 2 : ℝ) * (C0 ^ 2 * ((L : ℝ) ^ s) ^ 2) * ((L : ℝ) ^ 2 * (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ ^ 2)
= 1
Proof (Lean source)
-- @node: prior_pair_budget_normalized lemma prior_pair_budget_normalized {d L : ℕ} (hd : 2 ≤ d) (hL : 1 ≤ L) (s : ℝ) (ξ : PairIdx d L → Bool) : (d.choose 2 : ℝ) * (C0 ^ 2 * ((L : ℝ) ^ s) ^ 2) * ((L : ℝ) ^ 2 * (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ ^ 2) = 1 := by have hsign (α : PairIdx d L) : sgn (ξ α) ^ 2 = 1 := by cases ξ α <;> norm_num [sgn] have hb := mXi_coefficient_budget hd hL s ξ simp only [mul_pow, hsign, mul_one, Finset.sum_const, Finset.card_univ, nsmul_eq_mul, pairIdx_card] at hb simp only [priorDimension, pairCount, Nat.cast_mul, Nat.cast_pow] at hb ⊢ nlinarith [hb]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prior_pair_budget_normalized · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineLegality.lean:76
theorem mXi_pooledBudget

Every prior realization satisfies the pooled restriction budget. Under the stated conditions.

Formal statement
d L :
ℕ
hd :
2 ≤ d
hL :
1 ≤ L
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
ξ :
PairIdx d L → Bool
hm :
Measurable (mXi s L ξ) ∧
MemLp (mXi s L ξ) 2 (cubeMeasure d) ∧
(∫ x, mXi s L ξ x ∂cubeMeasure d) = 0
PooledBudget s ⟨mXi s L ξ, hm⟩
Proof (Lean source)
-- @node: mXi_pooledBudget lemma mXi_pooledBudget {d L : ℕ} (hd : 2 ≤ d) (hL : 1 ≤ L) (s : ℝ) (hs : 0 < s) (hs1 : s ≤ 1) (ξ : PairIdx d L → Bool) (hm : Measurable (mXi s L ξ) ∧ MemLp (mXi s L ξ) 2 (cubeMeasure d) ∧ (∫ x, mXi s L ξ x ∂cubeMeasure d) = 0) : PooledBudget s ⟨mXi s L ξ, hm⟩ := by classical let A := ofReal (C0 ^ 2 * ((L : ℝ) ^ s) ^ 2) let H := ofReal ((L : ℝ) ^ 2 * (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ ^ 2) have hp (j l : Fin d) (hjl : j < l) : sobolevNormSq 2 s (fun u => g2 (mXi s L ξ) j l (u 0) (u 1)) ≤ A * H := by rw [mXi_g2_pairCosinePolynomial s ξ j l hjl] have he := pairCosinePolynomial_restriction_bound hL (fun ab : Fin L × Fin L => (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * sgn (ξ ⟨((j, l), ab), hjl⟩)) hs hs1 rw [prior_pair_coefficient_energy] at he exact he unfold PooledBudget change (∑ j, sobolevNormSq 1 s (fun u => g1 (mXi s L ξ) j (u 0))) + _ ≤ 1 rw [mXi_main_budget_zero, zero_add] calc _ ≤ ∑ j : Fin d, ∑ l : Fin d, if j < l then A * H else 0 := by apply Finset.sum_le_sum intro j _ apply Finset.sum_le_sum intro l _ split_ifs with hjl · exact hp j l hjl · rfl _ = (d.choose 2 : ℝ≥0∞) * (A * H) := ordered_pair_budget_sum d (A * H) _ = 1 := by dsimp [A, H] have hcast : (d.choose 2 : ℝ≥0∞) = ofReal (d.choose 2 : ℝ) := by simp rw [hcast, ← ENNReal.ofReal_mul (by positivity), ← ENNReal.ofReal_mul (by positivity)] rw [← mul_assoc, prior_pair_budget_normalized hd hL s ξ] norm_num
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_pooledBudget · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineLegality.lean:90
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.CosinePrior 29 declarations Legality is a conclusion over the constructed polynomial, never a free assumption.

Legal cosine priors and pair-feature isotropy

Legality is a conclusion over the constructed polynomial, never a free assumption. The fixed normalization is independent of every sample and dimension parameter.

theorem uniform_cosine_mean_zero Lemma uniform_cosine_mean_zero in the paper ↗

Positive integer cosine frequencies have zero mean on the unit interval. Under the stated conditions.

Formal statement
a :
ℕ
ha :
0 < a
(∫ u, cos (pi * (a : ℝ) * u) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0
Proof (Lean source)
-- @node: uniform_cosine_mean_zero lemma uniform_cosine_mean_zero (a : ℕ) (ha : 0 < a) : (∫ u, cos (pi * (a : ℝ) * u) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0 := by rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 1)] rw [intervalIntegral.integral_comp_mul_left cos (by positivity : pi * (a : ℝ) ≠ 0)] have hsin : sin (pi * (a : ℝ)) = 0 := by rw [mul_comm] exact Real.sin_nat_mul_pi a simp [integral_cos, hsin]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.uniform_cosine_mean_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:17
theorem uniform_integer_cosine_mean Lemma uniform_integer_cosine_mean in the paper ↗

Integer cosine frequencies integrate to the constant-frequency indicator. The asserted mathematical result follows.

Formal statement
a :
ℤ
(∫ u, cos (pi * (a : ℝ) * u) ∂volume.restrict (Icc (0 : ℝ) 1))
= if a = 0 then 1 else 0
Proof (Lean source)
-- @node: uniform_integer_cosine_mean lemma uniform_integer_cosine_mean (a : ℤ) : (∫ u, cos (pi * (a : ℝ) * u) ∂volume.restrict (Icc (0 : ℝ) 1)) = if a = 0 then 1 else 0 := by by_cases ha : a = 0 · simp [ha] · rw [if_neg ha, integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 1)] rw [intervalIntegral.integral_comp_mul_left cos (mul_ne_zero Real.pi_ne_zero (by exact_mod_cast ha))] have hsin : sin (pi * (a : ℝ)) = 0 := by rw [mul_comm] exact Real.sin_int_mul_pi a simp [integral_cos, hsin]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.uniform_integer_cosine_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:31
theorem uniform_cosine_inner_product Lemma uniform_cosine_inner_product in the paper ↗

The one-dimensional positive-frequency cosine inner products are exactly diagonal. Under the stated conditions, the asserted mathematical result follows.

Formal statement
a b :
ℕ
ha :
0 < a
hb :
0 < b
(∫ u, cos (pi * (a : ℝ) * u) * cos (pi * (b : ℝ) * u) ∂volume.restrict (Icc (0 : ℝ) 1))
= if a = b then (1 / 2 : ℝ) else 0
Proof (Lean source)
-- @node: uniform_cosine_inner_product lemma uniform_cosine_inner_product (a b : ℕ) (ha : 0 < a) (hb : 0 < b) : (∫ u, cos (pi * (a : ℝ) * u) * cos (pi * (b : ℝ) * u) ∂volume.restrict (Icc (0 : ℝ) 1)) = if a = b then (1 / 2 : ℝ) else 0 := by have hidentity (u : ℝ) : cos (pi * (a : ℝ) * u) * cos (pi * (b : ℝ) * u) = (1 / 2 : ℝ) * (cos (pi * ((a : ℤ) - b : ℤ) * u) + cos (pi * ((a : ℤ) + b : ℤ) * u)) := by push_cast rw [show pi * ((a : ℝ) - b) * u = pi * a * u - pi * b * u by ring, show pi * ((a : ℝ) + b) * u = pi * a * u + pi * b * u by ring, Real.cos_sub, Real.cos_add] ring have hi (k : ℤ) : Integrable (fun u => cos (pi * (k : ℝ) * u)) (volume.restrict (Icc (0 : ℝ) 1)) := by exact Continuous.integrableOn_Icc (by fun_prop) simp_rw [hidentity] rw [integral_const_mul, integral_add (hi _) (hi _), uniform_integer_cosine_mean, uniform_integer_cosine_mean] have hab : (a : ℤ) + b ≠ 0 := by omega simp [hab, sub_eq_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.uniform_cosine_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:47
theorem pairFeature_measurable

Every pair-cosine feature is Borel. This uses the stated conclusion.

Formal statement
d L :
ℕ
α :
Proof (Lean source)
-- @node: pairFeature_measurable @[fun_prop] lemma pairFeature_measurable {d L : ℕ} (α : PairIdx d L) : Measurable (pairFeature α) := by unfold pairFeature fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:70
theorem pairFeature_abs_le_two

Pair-cosine features are bounded by two on the entire ambient space. The asserted mathematical result follows.

Formal statement
d L :
ℕ
α :
x :
Cube d
|pairFeature α x| ≤ 2
Proof (Lean source)
-- @node: pairFeature_abs_le_two lemma pairFeature_abs_le_two {d L : ℕ} (α : PairIdx d L) (x : Cube d) : |pairFeature α x| ≤ 2 := by unfold pairFeature rw [abs_mul, abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 2)] nlinarith [Real.abs_cos_le_one (pi * (α.val.2.1.val + 1 : ℕ) * x α.val.1.1), Real.abs_cos_le_one (pi * (α.val.2.2.val + 1 : ℕ) * x α.val.1.2), abs_nonneg (cos (pi * (α.val.2.1.val + 1 : ℕ) * x α.val.1.1)), abs_nonneg (cos (pi * (α.val.2.2.val + 1 : ℕ) * x α.val.1.2))]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_abs_le_two · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:77
theorem pairFeature_memLp

Every pair feature is square-integrable under cube sampling.

Formal statement
d L :
ℕ
α :
Proof (Lean source)
-- @node: pairFeature_memLp lemma pairFeature_memLp {d L : ℕ} (α : PairIdx d L) : MemLp (pairFeature α) 2 (cubeMeasure d) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance exact MemLp.of_bound (pairFeature_measurable α).aestronglyMeasurable 2 (Filter.Eventually.of_forall (fun x => by simpa [Real.norm_eq_abs] using pairFeature_abs_le_two α x))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:88
theorem cube_integral_two_coordinates

Distinct cube coordinates factor the mean of two scalar functions. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
j l :
Fin d
hjl :
j ≠ l
f g :
ℝ → ℝ
(∫ x, f (x j) * g (x l) ∂cubeMeasure d)
= (∫ u, f u ∂volume.restrict (Icc (0 : ℝ) 1)) * (∫ u, g u ∂volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
-- @node: cube_integral_two_coordinates lemma cube_integral_two_coordinates {d : ℕ} (j l : Fin d) (hjl : j ≠ l) (f g : ℝ → ℝ) : (∫ x, f (x j) * g (x l) ∂cubeMeasure d) = (∫ u, f u ∂volume.restrict (Icc (0 : ℝ) 1)) * (∫ u, g u ∂volume.restrict (Icc (0 : ℝ) 1)) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ let factors := fun i : Fin d => fun u : ℝ => (if i = j then f u else 1) * (if i = l then g u else 1) have hprod (x : Cube d) : (∏ i, factors i (x i)) = f (x j) * g (x l) := by dsimp [factors] rw [Finset.prod_mul_distrib] simp rw [show (fun x : Cube d => f (x j) * g (x l)) = (fun x => ∏ i, factors i (x i)) from funext (fun x => (hprod x).symm)] rw [cubeMeasure, integral_fintype_prod_eq_prod] have hfactor (i : Fin d) : (∫ u, factors i u ∂volume.restrict (Icc (0 : ℝ) 1)) = (if i = j then ∫ u, f u ∂volume.restrict (Icc (0 : ℝ) 1) else 1) * (if i = l then ∫ u, g u ∂volume.restrict (Icc (0 : ℝ) 1) else 1) := by by_cases hij : i = j <;> by_cases hil : i = l <;> simp_all [factors] simp_rw [hfactor] rw [Finset.prod_mul_distrib] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_integral_two_coordinates · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:99
theorem pairFeature_mean_zero

Pair features are centered, including when the ambient dimension is larger than two. The asserted mathematical result follows.

Formal statement
d L :
ℕ
α :
(∫ x, pairFeature α x ∂cubeMeasure d) = 0
Proof (Lean source)
-- @node: pairFeature_mean_zero lemma pairFeature_mean_zero {d L : ℕ} (α : PairIdx d L) : (∫ x, pairFeature α x ∂cubeMeasure d) = 0 := by unfold pairFeature simp_rw [mul_assoc] rw [integral_const_mul] simp_rw [← mul_assoc] rw [cube_integral_two_coordinates _ _ (ne_of_lt α.property) (fun u => cos (pi * (α.val.2.1.val + 1 : ℕ) * u)) (fun u => cos (pi * (α.val.2.2.val + 1 : ℕ) * u))] rw [uniform_cosine_mean_zero _ (Nat.succ_pos _)] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_mean_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:126
theorem pairFeature_same_pair_inner_product

Features on one original coordinate pair have diagonal frequency inner products. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d L :
ℕ
α β :
hj :
α.val.1.1 = β.val.1.1
hl :
α.val.1.2 = β.val.1.2
(∫ x, pairFeature α x * pairFeature β x ∂cubeMeasure d) = if α = β then 1 else 0
Proof (Lean source)
-- @node: pairFeature_same_pair_inner_product lemma pairFeature_same_pair_inner_product {d L : ℕ} (α β : PairIdx d L) (hj : α.val.1.1 = β.val.1.1) (hl : α.val.1.2 = β.val.1.2) : (∫ x, pairFeature α x * pairFeature β x ∂cubeMeasure d) = if α = β then 1 else 0 := by have hidentity (x : Cube d) : pairFeature α x * pairFeature β x = 4 * ((cos (pi * (α.val.2.1.val + 1 : ℕ) * x α.val.1.1) * cos (pi * (β.val.2.1.val + 1 : ℕ) * x α.val.1.1)) * (cos (pi * (α.val.2.2.val + 1 : ℕ) * x α.val.1.2) * cos (pi * (β.val.2.2.val + 1 : ℕ) * x α.val.1.2))) := by simp only [pairFeature, ← hj, ← hl] ring simp_rw [hidentity] rw [integral_const_mul, cube_integral_two_coordinates _ _ (ne_of_lt α.property) (fun u => cos (pi * (α.val.2.1.val + 1 : ℕ) * u) * cos (pi * (β.val.2.1.val + 1 : ℕ) * u)) (fun u => cos (pi * (α.val.2.2.val + 1 : ℕ) * u) * cos (pi * (β.val.2.2.val + 1 : ℕ) * u))] rw [uniform_cosine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _), uniform_cosine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _)] have heq : α = β ↔ α.val.2.1 = β.val.2.1 ∧ α.val.2.2 = β.val.2.2 := by constructor · intro h subst β exact ⟨rfl, rfl⟩ · rintro ⟨ha, hb⟩ apply Subtype.ext exact Prod.ext (Prod.ext hj hl) (Prod.ext ha hb) by_cases ha : α.val.2.1 = β.val.2.1 <;> by_cases hb : α.val.2.2 = β.val.2.2 <;> norm_num [heq, ha, hb, Nat.add_right_cancel_iff, Fin.val_inj]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_same_pair_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:140
theorem pairFeature_unmatched_inner_product

A coordinate appearing in only one pair makes the two features orthogonal. Under the stated conditions.

Formal statement
d L :
ℕ
α β :
h :
∃ j : Fin d, (j = α.val.1.1 ∨ j = α.val.1.2) ∧ j ≠ β.val.1.1 ∧ j ≠ β.val.1.2
(∫ x, pairFeature α x * pairFeature β x ∂cubeMeasure d) = 0
Proof (Lean source)
-- @node: pairFeature_unmatched_inner_product lemma pairFeature_unmatched_inner_product {d L : ℕ} (α β : PairIdx d L) (h : ∃ j : Fin d, (j = α.val.1.1 ∨ j = α.val.1.2) ∧ j ≠ β.val.1.1 ∧ j ≠ β.val.1.2) : (∫ x, pairFeature α x * pairFeature β x ∂cubeMeasure d) = 0 := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ let factors := fun i : Fin d => fun u : ℝ => ((if i = α.val.1.1 then cos (pi * (α.val.2.1.val + 1 : ℕ) * u) else 1) * (if i = α.val.1.2 then cos (pi * (α.val.2.2.val + 1 : ℕ) * u) else 1)) * ((if i = β.val.1.1 then cos (pi * (β.val.2.1.val + 1 : ℕ) * u) else 1) * (if i = β.val.1.2 then cos (pi * (β.val.2.2.val + 1 : ℕ) * u) else 1)) have hprod (x : Cube d) : pairFeature α x * pairFeature β x = 4 * ∏ i, factors i (x i) := by dsimp [factors] simp only [Finset.prod_mul_distrib] simp only [Nat.cast_add, Nat.cast_one, Finset.prod_ite_eq', Finset.mem_univ, if_true] unfold pairFeature push_cast ring_nf simp_rw [hprod] rw [integral_const_mul, cubeMeasure, integral_fintype_prod_eq_prod] obtain ⟨j, hj, hbj, hbl⟩ := h have hz : (∫ u, factors j u ∂volume.restrict (Icc (0 : ℝ) 1)) = 0 := by rcases hj with rfl | rfl · have hal : α.val.1.1 ≠ α.val.1.2 := ne_of_lt α.property simpa [factors, hal, hbj, hbl] using uniform_cosine_mean_zero (α.val.2.1.val + 1) (Nat.succ_pos _) · have haj : α.val.1.2 ≠ α.val.1.1 := (ne_of_lt α.property).symm simpa [factors, haj, hbj, hbl] using uniform_cosine_mean_zero (α.val.2.2.val + 1) (Nat.succ_pos _) rw [Finset.prod_eq_zero (Finset.mem_univ j) hz, mul_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_unmatched_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:173
theorem pairFeature_cube_inner_product

All pair-cosine coordinates are jointly isotropic under the cube law. The asserted mathematical result follows.

Formal statement
d L :
ℕ
α β :
(∫ x, pairFeature α x * pairFeature β x ∂cubeMeasure d) = if α = β then 1 else 0
Proof (Lean source)
-- @node: pairFeature_cube_inner_product lemma pairFeature_cube_inner_product {d L : ℕ} (α β : PairIdx d L) : (∫ x, pairFeature α x * pairFeature β x ∂cubeMeasure d) = if α = β then 1 else 0 := by by_cases hj : α.val.1.1 = β.val.1.1 · by_cases hl : α.val.1.2 = β.val.1.2 · exact pairFeature_same_pair_inner_product α β hj hl · have hne : α ≠ β := by intro he; exact hl (congrArg (fun a => a.val.1.2) he) rw [if_neg hne] apply pairFeature_unmatched_inner_product refine ⟨α.val.1.2, inr rfl, ?_, hl⟩ rw [← hj] exact (ne_of_lt α.property).symm · have hne : α ≠ β := by intro he; exact hj (congrArg (fun a => a.val.1.1) he) rw [if_neg hne] apply pairFeature_unmatched_inner_product by_cases hcross : α.val.1.1 = β.val.1.2 · refine ⟨α.val.1.2, inr rfl, ?_, ?_⟩ · exact ne_of_gt (lt_trans β.property (hcross ▸ α.property)) · rw [← hcross] exact (ne_of_lt α.property).symm · exact ⟨α.val.1.1, inl rfl, hj, hcross⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_cube_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:207
theorem pairIdx_card

The feature index really has the prescribed dimension, including pairs that share an original coordinate.

Formal statement
d L :
ℕ
Proof (Lean source)
-- @node: pairIdx_card lemma pairIdx_card (d L : ℕ) : card (PairIdx d L) = priorDimension d L := by let e : PairIdx d L ≃ {jl : Fin d × Fin d // jl.1 < jl.2} × (Fin L × Fin L) := { toFun := fun α => (⟨α.val.1, α.property⟩, α.val.2) invFun := fun α => ⟨(α.1.val, α.2), α.1.property⟩ left_inv := by intro α; rfl right_inv := by intro α; rfl } rw [Fintype.card_congr e, Fintype.card_prod, Fintype.card_prod] have hpair : card {jl : Fin d × Fin d // jl.1 < jl.2} = d.choose 2 := by rw [Fintype.card_subtype] simpa only [Fintype.card_fin] using (Fintype.card_product_filter_lt (α := Fin d)) simp only [hpair, Fintype.card_fin, priorDimension, pairCount, pow_two]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairIdx_card · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:231
theorem pairFeature_expansion_inner_product

The feature inner product extracts a coefficient from any finite cosine expansion.

Formal statement
d L :
ℕ
c :
PairIdx d L → ℝ
β :
(∫ x, (∑ α, c α * pairFeature α x) * pairFeature β x ∂cubeMeasure d) = c β
Proof (Lean source)
-- @node: pairFeature_expansion_inner_product lemma pairFeature_expansion_inner_product {d L : ℕ} (c : PairIdx d L → ℝ) (β : PairIdx d L) : (∫ x, (∑ α, c α * pairFeature α x) * pairFeature β x ∂cubeMeasure d) = c β := by classical simp_rw [Finset.sum_mul, mul_assoc] rw [integral_finsetSum (f := fun α x => c α * (pairFeature α x * pairFeature β x)) univ (fun α _ => ((pairFeature_memLp α).integrable_mul (pairFeature_memLp β)).const_mul (c α))] simp_rw [integral_const_mul, pairFeature_cube_inner_product] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_expansion_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:247
theorem pairFeature_expansion_second_moment

The squared energy of a finite pair-cosine polynomial is its coefficient energy.

Formal statement
d L :
ℕ
c :
PairIdx d L → ℝ
(∫ x, (∑ α, c α * pairFeature α x) ^ 2 ∂cubeMeasure d) = ∑ α, c α ^ 2
Proof (Lean source)
-- @node: pairFeature_expansion_second_moment lemma pairFeature_expansion_second_moment {d L : ℕ} (c : PairIdx d L → ℝ) : (∫ x, (∑ α, c α * pairFeature α x) ^ 2 ∂cubeMeasure d) = ∑ α, c α ^ 2 := by classical have hg : MemLp (fun x => ∑ α, c α * pairFeature α x) 2 (cubeMeasure d) := by exact memLp_finsetSum _ (fun α _ => (pairFeature_memLp α).const_mul (c α)) simp_rw [pow_two] simp_rw [Finset.mul_sum] simp_rw [show ∀ α x, (∑ β, c β * pairFeature β x) * (c α * pairFeature α x) = c α * ((∑ β, c β * pairFeature β x) * pairFeature α x) by intros; ring] rw [integral_finsetSum (f := fun α x => c α * ((∑ β, c β * pairFeature β x) * pairFeature α x)) univ (fun α _ => (hg.integrable_mul (pairFeature_memLp α)).const_mul (c α))] simp_rw [integral_const_mul, pairFeature_expansion_inner_product]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_expansion_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:260
theorem pairFeature_g1_zero

Fixing one coordinate of a pair feature leaves a centered factor to integrate out.

Formal statement
d L :
ℕ
α :
j :
Fin d
u :
ℝ
g1 (pairFeature α) j u = 0
Proof (Lean source)
-- @node: pairFeature_g1_zero lemma pairFeature_g1_zero {d L : ℕ} (α : PairIdx d L) (j : Fin d) (u : ℝ) : g1 (pairFeature α) j u = 0 := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ have hjl : α.val.1.1 ≠ α.val.1.2 := ne_of_lt α.property have hcoord (l : Fin d) (a : ℕ) (ha : 0 < a) : (∫ y : Cube d, cos (pi * (a : ℝ) * y l) ∂cubeMeasure d) = 0 := by rw [cubeMeasure, integral_comp_eval (f := fun u : ℝ => cos (pi * (a : ℝ) * u)) (μ := fun _ : Fin d => volume.restrict (Icc (0 : ℝ) 1)) (i := l) (by fun_prop)] exact uniform_cosine_mean_zero a ha by_cases hj : α.val.1.1 = j · simp only [g1, pairFeature, Function.update_apply, hj, if_true, show α.val.1.2 ≠ j from hj ▸ hjl.symm, if_false] rw [integral_const_mul, hcoord _ _ (Nat.succ_pos _), mul_zero] · by_cases hl : α.val.1.2 = j · simp only [g1, pairFeature, Function.update_apply, hj, hl, if_false, if_true] rw [integral_mul_const, integral_const_mul, hcoord _ _ (Nat.succ_pos _)] simp · simpa only [g1, pairFeature, Function.update_apply, hj, hl, if_false] using pairFeature_mean_zero α
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_g1_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:276
theorem pairFeature_update_integrable

Fixing coordinates in a finite feature sum preserves integrability.

Formal statement
d L :
ℕ
α :
j :
Fin d
u :
ℝ
Integrable (fun y : Cube d => pairFeature α (update y j u)) (cubeMeasure d)
Proof (Lean source)
-- @node: pairFeature_update_integrable lemma pairFeature_update_integrable {d L : ℕ} (α : PairIdx d L) (j : Fin d) (u : ℝ) : Integrable (fun y : Cube d => pairFeature α (update y j u)) (cubeMeasure d) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance apply Integrable.of_bound (by unfold pairFeature; fun_prop) 2 exact Filter.Eventually.of_forall (fun y => by simpa only [Real.norm_eq_abs] using pairFeature_abs_le_two α (update y j u))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_update_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:299
theorem pairFeature_g2

A canonical pair marginal retains exactly the feature on that ordered coordinate pair. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d L :
ℕ
α :
j l :
Fin d
hjl :
j < l
u v :
ℝ
g2 (pairFeature α) j l u v = if α.val.1.1 = j ∧
α.val.1.2
= l then 2 * cos (pi * (α.val.2.1.val + 1 : ℕ) * u) * cos (pi * (α.val.2.2.val + 1 : ℕ) * v) else 0
Proof (Lean source)
-- @node: pairFeature_g2 lemma pairFeature_g2 {d L : ℕ} (α : PairIdx d L) (j l : Fin d) (hjl : j < l) (u v : ℝ) : g2 (pairFeature α) j l u v = if α.val.1.1 = j ∧ α.val.1.2 = l then 2 * cos (pi * (α.val.2.1.val + 1 : ℕ) * u) * cos (pi * (α.val.2.2.val + 1 : ℕ) * v) else 0 := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ have hi (k : Fin d) (a : ℕ) (ha : 0 < a) : (∫ t, cos (pi * (a : ℝ) * (if k = l then v else if k = j then u else t)) ∂volume.restrict (Icc (0 : ℝ) 1)) = if k = l then cos (pi * (a : ℝ) * v) else if k = j then cos (pi * (a : ℝ) * u) else 0 := by by_cases hl : k = l <;> by_cases hj : k = j <;> simp [hl, hj, ne_of_lt hjl, uniform_cosine_mean_zero a ha] simp only [g2, pairFeature_g1_zero, sub_zero] unfold pairFeature simp only [Function.update_apply] conv_lhs => arg 2; ext y; rw [mul_assoc] rw [integral_const_mul, cube_integral_two_coordinates _ _ (ne_of_lt α.property) (fun t => cos (pi * (α.val.2.1.val + 1 : ℕ) * (if α.val.1.1 = l then v else if α.val.1.1 = j then u else t))) (fun t => cos (pi * (α.val.2.2.val + 1 : ℕ) * (if α.val.1.2 = l then v else if α.val.1.2 = j then u else t)))] rw [hi _ _ (Nat.succ_pos _), hi _ _ (Nat.succ_pos _)] have hα := α.property by_cases h1l : α.val.1.1 = l <;> by_cases h1j : α.val.1.1 = j <;> by_cases h2l : α.val.1.2 = l <;> by_cases h2j : α.val.1.2 = j <;> simp_all <;> first | omega | ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_g2 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:311
theorem pairFeature_two_updates_integrable

The finite pair marginals of a cosine expansion are well-defined integrals. The asserted mathematical result follows.

Formal statement
d L :
ℕ
α :
j l :
Fin d
u v :
ℝ
Integrable (fun y : Cube d => pairFeature α (update (update y j u) l v)) (cubeMeasure d)
Proof (Lean source)
-- @node: pairFeature_two_updates_integrable lemma pairFeature_two_updates_integrable {d L : ℕ} (α : PairIdx d L) (j l : Fin d) (u v : ℝ) : Integrable (fun y : Cube d => pairFeature α (update (update y j u) l v)) (cubeMeasure d) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance apply Integrable.of_bound (by unfold pairFeature; fun_prop) 2 exact Filter.Eventually.of_forall (fun y => by simpa only [Real.norm_eq_abs] using pairFeature_abs_le_two α (update (update y j u) l v))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_two_updates_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:344
theorem uniformDraw_pairFeature_inner_product

Uniform-draw transport preserves the pair-feature inner products of any original unit. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d L :
ℕ
Ω :
hX :
i :
Fin n
α β :
(∫ ω, pairFeature α (X ω i) * pairFeature β (X ω i) ∂μ) = if α = β then 1 else 0
Proof (Lean source)
-- @node: uniformDraw_pairFeature_inner_product lemma uniformDraw_pairFeature_inner_product {n d L : ℕ} {Ω : Type} [MeasurableSpace Ω] {μ : Measure Ω} {X : Ω → Covariates n d} (hX : UniformDraw μ X) (i : Fin n) (α β : PairIdx d L) : (∫ ω, pairFeature α (X ω i) * pairFeature β (X ω i) ∂μ) = if α = β then 1 else 0 := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance have hm : Measurable (fun x : Covariates n d => pairFeature α (x i) * pairFeature β (x i)) := by fun_prop rw [← integral_map hX.1.aemeasurable hm.aestronglyMeasurable, hX.2] rw [covLaw, integral_comp_eval (μ := fun _ : Fin n => cubeMeasure d) (i := i) (by fun_prop : AEStronglyMeasurable (fun x : Cube d => pairFeature α x * pairFeature β x) (cubeMeasure d))] exact pairFeature_cube_inner_product α β
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.uniformDraw_pairFeature_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:358
theorem mXi_measurable

Finite coefficient realizations of the prior are Borel. This uses the stated conclusion.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
Measurable (mXi s L ξ)
Proof (Lean source)
-- @node: mXi_measurable @[fun_prop] lemma mXi_measurable {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) : Measurable (mXi s L ξ) := by unfold mXi fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:376
theorem mXi_memLp

Finite coefficient realizations of the prior are square-integrable. The asserted mathematical result follows.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
MemLp (mXi s L ξ) 2 (cubeMeasure d)
Proof (Lean source)
-- @node: mXi_memLp lemma mXi_memLp {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) : MemLp (mXi s L ξ) 2 (cubeMeasure d) := by unfold mXi simpa only [Finset.sum_apply] using (memLp_finsetSum' univ (fun α _ => (pairFeature_memLp α).const_mul (sgn (ξ α)))).const_mul (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:383
theorem mXi_mean_zero

The coefficient prior is centered for each fixed sign realization.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
(∫ x, mXi s L ξ x ∂cubeMeasure d) = 0
Proof (Lean source)
-- @node: mXi_mean_zero lemma mXi_mean_zero {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) : (∫ x, mXi s L ξ x ∂cubeMeasure d) = 0 := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance unfold mXi rw [integral_const_mul, integral_finsetSum] · simp_rw [integral_const_mul, pairFeature_mean_zero, mul_zero] simp · intro α _ exact ((pairFeature_memLp α).integrable (by norm_num)).const_mul _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_mean_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:393
theorem mXi_g1_zero

The canonical main effects of every prior realization vanish.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
j :
Fin d
u :
ℝ
g1 (mXi s L ξ) j u = 0
Proof (Lean source)
-- @node: mXi_g1_zero lemma mXi_g1_zero {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) (j : Fin d) (u : ℝ) : g1 (mXi s L ξ) j u = 0 := by unfold g1 mXi rw [integral_const_mul, integral_finsetSum _ (fun α _ => (pairFeature_update_integrable α j u).const_mul (sgn (ξ α)))] simp_rw [integral_const_mul] change _ * (∑ α, sgn (ξ α) * g1 (pairFeature α) j u) = 0 simp_rw [pairFeature_g1_zero] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_g1_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:407
theorem mXi_g2

Canonical pair effects of the prior are its polynomials on the corresponding pair. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
j l :
Fin d
hjl :
j < l
u v :
ℝ
conclusion 1
g2 (mXi s L ξ) j l u v
= (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * ∑ α, if α.val.1.1 = j
conclusion 2
α.val.1.2
= l then sgn (ξ α) * (2 * cos (pi * (α.val.2.1.val + 1 : ℕ) * u) * cos (pi * (α.val.2.2.val + 1 : ℕ) * v)) else 0
Proof (Lean source)
-- @node: mXi_g2 lemma mXi_g2 {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) (j l : Fin d) (hjl : j < l) (u v : ℝ) : g2 (mXi s L ξ) j l u v = (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * ∑ α, if α.val.1.1 = j ∧ α.val.1.2 = l then sgn (ξ α) * (2 * cos (pi * (α.val.2.1.val + 1 : ℕ) * u) * cos (pi * (α.val.2.2.val + 1 : ℕ) * v)) else 0 := by classical simp only [g2, mXi_g1_zero, sub_zero] unfold mXi rw [integral_const_mul, integral_finsetSum _ (fun α _ => (pairFeature_two_updates_integrable α j l u v).const_mul (sgn (ξ α)))] simp_rw [integral_const_mul] have hg (α : PairIdx d L) : (∫ y, pairFeature α (update (update y j u) l v) ∂cubeMeasure d) = g2 (pairFeature α) j l u v := by simp only [g2, pairFeature_g1_zero, sub_zero] simp_rw [hg] simp_rw [pairFeature_g2 _ j l hjl, mul_ite, mul_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_g2 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:419
theorem mXi_orderTwo

Every cosine-prior realization has exactly its canonical order-two decomposition. Under the stated conditions.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
hm :
Measurable (mXi s L ξ) ∧
MemLp (mXi s L ξ) 2 (cubeMeasure d) ∧
(∫ x, mXi s L ξ x ∂cubeMeasure d) = 0
OrderTwo ⟨mXi s L ξ, hm⟩
Proof (Lean source)
-- @node: mXi_orderTwo lemma mXi_orderTwo {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) (hm : Measurable (mXi s L ξ) ∧ MemLp (mXi s L ξ) 2 (cubeMeasure d) ∧ (∫ x, mXi s L ξ x ∂cubeMeasure d) = 0) : OrderTwo ⟨mXi s L ξ, hm⟩ := by classical apply Filter.Eventually.of_forall intro x simp only [mXi_g1_zero, Finset.sum_const_zero, zero_add] have hp (j l : Fin d) : (if j < l then g2 (mXi s L ξ) j l (x j) (x l) else 0) = (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * ∑ α, if α.val.1.1 = j ∧ α.val.1.2 = l then sgn (ξ α) * pairFeature α x else 0 := by by_cases h : j < l · rw [if_pos h, mXi_g2 s ξ j l h] congr 1 apply Finset.sum_congr rfl intro α _ split_ifs with he · simp only [pairFeature, he.1, he.2] · rfl · rw [if_neg h] have hz (α : PairIdx d L) : ¬(α.val.1.1 = j ∧ α.val.1.2 = l) := by rintro ⟨rfl, rfl⟩ exact h α.property simp [hz] simp_rw [hp, ← Finset.mul_sum] unfold mXi congr 1 simp_rw [Finset.sum_comm (s := (Finset.univ : Finset (Fin d))) (t := (Finset.univ : Finset (PairIdx d L)))] apply Finset.sum_congr rfl intro α _ simp only [ite_and, eq_comm] simp_rw [Finset.sum_ite_irrel, Finset.sum_const_zero] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_orderTwo · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:441
theorem mXi_second_moment

Each prior realization has exactly the squared energy fixed by its normalization. The asserted mathematical result follows.

Formal statement
d L :
ℕ
s :
ℝ
ξ :
PairIdx d L → Bool
(∫ x, mXi s L ξ x ^ 2 ∂cubeMeasure d)
= (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ ^ 2 * priorDimension d L
Proof (Lean source)
-- @node: mXi_second_moment lemma mXi_second_moment {d L : ℕ} (s : ℝ) (ξ : PairIdx d L → Bool) : (∫ x, mXi s L ξ x ^ 2 ∂cubeMeasure d) = (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ ^ 2 * priorDimension d L := by classical unfold mXi simp_rw [mul_pow] rw [integral_const_mul, pairFeature_expansion_second_moment] have hsign (α : PairIdx d L) : sgn (ξ α) ^ 2 = 1 := by cases ξ α <;> norm_num [sgn] simp [hsign, pairIdx_card]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:479

The prior has a positive number of coordinates at every admitted dimension and cutoff. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d L :
ℕ
hd :
2 ≤ d
hL :
1 ≤ L
Proof (Lean source)
-- @node: priorDimension_pos lemma priorDimension_pos {d L : ℕ} (hd : 2 ≤ d) (hL : 1 ≤ L) : 0 < priorDimension d L := by exact Nat.mul_pos (Nat.choose_pos hd) (pow_pos (by omega) 2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.priorDimension_pos · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:493
theorem mXi_second_moment_normalized

The normalized prior has reciprocal cutoff energy, independently of its signs or dimension. Under the stated conditions.

Formal statement
d L :
ℕ
hd :
2 ≤ d
hL :
1 ≤ L
s :
ℝ
ξ :
PairIdx d L → Bool
(∫ x, mXi s L ξ x ^ 2 ∂cubeMeasure d) = (C0 ^ 2 * ((L : ℝ) ^ s) ^ 2)⁻¹
Proof (Lean source)
-- @node: mXi_second_moment_normalized lemma mXi_second_moment_normalized {d L : ℕ} (hd : 2 ≤ d) (hL : 1 ≤ L) (s : ℝ) (ξ : PairIdx d L → Bool) : (∫ x, mXi s L ξ x ^ 2 ∂cubeMeasure d) = (C0 ^ 2 * ((L : ℝ) ^ s) ^ 2)⁻¹ := by have hM : (0 : ℝ) < priorDimension d L := by exact_mod_cast priorDimension_pos hd hL have hC : 0 < C0 := by unfold C0; positivity have hpow : 0 < (L : ℝ) ^ s := Real.rpow_pos_of_pos (by exact_mod_cast (show 0 < L by omega)) s have hsqrt : sqrt (priorDimension d L) ^ 2 = (priorDimension d L : ℝ) := Real.sq_sqrt hM.le rw [mXi_second_moment, inv_pow, mul_pow, mul_pow, hsqrt] field_simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_second_moment_normalized · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:499
theorem mXi_coefficient_budget

The coefficient normalization supplies exactly one unit of the pooled extension budget. Under the stated conditions.

Formal statement
d L :
ℕ
hd :
2 ≤ d
hL :
1 ≤ L
s :
ℝ
ξ :
PairIdx d L → Bool
C0 ^ 2 * ((L : ℝ) ^ s) ^ 2 * (∑ α, ((C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * sgn (ξ α)) ^ 2)
= 1
Proof (Lean source)
-- @node: mXi_coefficient_budget lemma mXi_coefficient_budget {d L : ℕ} (hd : 2 ≤ d) (hL : 1 ≤ L) (s : ℝ) (ξ : PairIdx d L → Bool) : C0 ^ 2 * ((L : ℝ) ^ s) ^ 2 * (∑ α, ((C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ * sgn (ξ α)) ^ 2) = 1 := by classical have hsign (α : PairIdx d L) : sgn (ξ α) ^ 2 = 1 := by cases ξ α <;> norm_num [sgn] simp only [mul_pow, hsign, mul_one, Finset.sum_const, Finset.card_univ, nsmul_eq_mul, pairIdx_card] rw [mul_comm (priorDimension d L : ℝ), ← mXi_second_moment s ξ, mXi_second_moment_normalized hd hL] apply mul_inv_cancel₀ have hC : 0 < C0 := by unfold C0; positivity have hLpos : (0 : ℝ) < L := by exact_mod_cast (show 0 < L by omega) positivity
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_coefficient_budget · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosinePrior.lean:512
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.CosineSpatialEnergy 15 declarations Exact trigonometric orthogonality on the three-unit interval gives the nine-cell polynomial and gradient estimates used by the cosine-prior extension.

Spatial energy on the cutoff support square

Exact trigonometric orthogonality on the three-unit interval gives the nine-cell polynomial and gradient estimates used by the cosine-prior extension.

[ Lebesgue measure on the nine unit cells containing the cutoff support.

Definition (Lean source)
cosineSupportMeasure :
Measure (Cube 2)
Measure.pi (fun _ => volume.restrict (Icc (-1 : ℝ) 2))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineSupportMeasure · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:17
theorem support_integer_cosine_integral Lemma support_integer_cosine_integral in the paper ↗

Integer cosine modes integrate to zero over three complete unit cells.](goal) This uses the stated conclusion.

Formal statement
a :
ℤ
(∫ u, cos (pi * (a : ℝ) * u) ∂volume.restrict (Icc (-1 : ℝ) 2))
= if a = 0 then 3 else 0
Proof (Lean source)
-- @node: support_integer_cosine_integral lemma support_integer_cosine_integral (a : ℤ) : (∫ u, cos (pi * (a : ℝ) * u) ∂volume.restrict (Icc (-1 : ℝ) 2)) = if a = 0 then 3 else 0 := by by_cases ha : a = 0 · norm_num [ha, Real.volume_Icc] · rw [if_neg ha, integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by norm_num : (-1 : ℝ) ≤ 2)] rw [intervalIntegral.integral_comp_mul_left cos (mul_ne_zero Real.pi_ne_zero (by exact_mod_cast ha)), integral_cos] have hright : sin (pi * (a : ℝ) * 2) = 0 := by convert Real.sin_int_mul_pi (2 * a) using 1 <;> push_cast <;> ring simp [hright, show sin (pi * (a : ℝ)) = 0 by simpa [mul_comm] using Real.sin_int_mul_pi a]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.support_integer_cosine_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:22
theorem support_cosine_inner_product Lemma support_cosine_inner_product in the paper ↗

Cosine orthogonality on the three-cell support interval has diagonal energy three halves. Under the stated conditions, the asserted mathematical result follows.

Formal statement
a b :
ℕ
ha :
0 < a
hb :
0 < b
(∫ u, cos (pi * (a : ℝ) * u) * cos (pi * (b : ℝ) * u) ∂volume.restrict (Icc (-1 : ℝ) 2))
= if a = b then (3 / 2 : ℝ) else 0
Proof (Lean source)
-- @node: support_cosine_inner_product lemma support_cosine_inner_product (a b : ℕ) (ha : 0 < a) (hb : 0 < b) : (∫ u, cos (pi * (a : ℝ) * u) * cos (pi * (b : ℝ) * u) ∂volume.restrict (Icc (-1 : ℝ) 2)) = if a = b then (3 / 2 : ℝ) else 0 := by have hidentity (u : ℝ) : cos (pi * (a : ℝ) * u) * cos (pi * (b : ℝ) * u) = (1 / 2 : ℝ) * (cos (pi * ((a : ℤ) - b : ℤ) * u) + cos (pi * ((a : ℤ) + b : ℤ) * u)) := by push_cast rw [show pi * ((a : ℝ) - b) * u = pi * a * u - pi * b * u by ring, show pi * ((a : ℝ) + b) * u = pi * a * u + pi * b * u by ring, Real.cos_sub, Real.cos_add] ring have hi (k : ℤ) : Integrable (fun u => cos (pi * (k : ℝ) * u)) (volume.restrict (Icc (-1 : ℝ) 2)) := by exact Continuous.integrableOn_Icc (by fun_prop) simp_rw [hidentity] rw [integral_const_mul, integral_add (hi _) (hi _), support_integer_cosine_integral, support_integer_cosine_integral] have hab : (a : ℤ) + b ≠ 0 := by omega by_cases heq : a = b <;> norm_num [hab, sub_eq_zero, heq, Nat.ne_of_gt hb]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.support_cosine_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:38
theorem support_sine_inner_product Lemma support_sine_inner_product in the paper ↗

Sine orthogonality on the three-cell support interval has diagonal energy three halves. Under the stated conditions.

Formal statement
a b :
ℕ
ha :
0 < a
hb :
0 < b
(∫ u, sin (pi * (a : ℝ) * u) * sin (pi * (b : ℝ) * u) ∂volume.restrict (Icc (-1 : ℝ) 2))
= if a = b then (3 / 2 : ℝ) else 0
Proof (Lean source)
-- @node: support_sine_inner_product lemma support_sine_inner_product (a b : ℕ) (ha : 0 < a) (hb : 0 < b) : (∫ u, sin (pi * (a : ℝ) * u) * sin (pi * (b : ℝ) * u) ∂volume.restrict (Icc (-1 : ℝ) 2)) = if a = b then (3 / 2 : ℝ) else 0 := by have he (u : ℝ) : sin (pi * (a : ℝ) * u) * sin (pi * (b : ℝ) * u) = (1 / 2 : ℝ) * (cos (pi * ((a : ℤ) - b : ℤ) * u) - cos (pi * ((a : ℤ) + b : ℤ) * u)) := by push_cast rw [show pi * ((a : ℝ) - b) * u = pi * a * u - pi * b * u by ring, show pi * ((a : ℝ) + b) * u = pi * a * u + pi * b * u by ring, Real.cos_sub, Real.cos_add] ring have hi (k : ℤ) : Integrable (fun u => cos (pi * (k : ℝ) * u)) (volume.restrict (Icc (-1 : ℝ) 2)) := Continuous.integrableOn_Icc (by fun_prop) simp_rw [he] rw [integral_const_mul, integral_sub (hi _) (hi _), support_integer_cosine_integral, support_integer_cosine_integral] have hab : (a : ℤ) + b ≠ 0 := by omega by_cases heq : a = b <;> norm_num [hab, sub_eq_zero, heq, Nat.ne_of_gt hb]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.support_sine_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:62
theorem cosineSupportMeasure_integral_product

Fubini factors a product on the cutoff support square into its two interval integrals. The asserted mathematical result follows.

Formal statement
f g :
ℝ → ℝ
(∫ x, f (x 0) * g (x 1) ∂cosineSupportMeasure)
= (∫ u, f u ∂volume.restrict (Icc (-1 : ℝ) 2)) * (∫ u, g u ∂volume.restrict (Icc (-1 : ℝ) 2))
Proof (Lean source)
-- @node: cosineSupportMeasure_integral_product lemma cosineSupportMeasure_integral_product (f g : ℝ → ℝ) : (∫ x, f (x 0) * g (x 1) ∂cosineSupportMeasure) = (∫ u, f u ∂volume.restrict (Icc (-1 : ℝ) 2)) * (∫ u, g u ∂volume.restrict (Icc (-1 : ℝ) 2)) := by let factors := fun i : Fin 2 => if i = 0 then f else g have he (x : Cube 2) : f (x 0) * g (x 1) = ∏ i, factors i (x i) := by simp [Fin.prod_univ_two, factors] simp_rw [he] rw [cosineSupportMeasure, integral_fintype_prod_eq_prod] simp [Fin.prod_univ_two, factors]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineSupportMeasure_integral_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:85
theorem continuous_integrable_cosineSupportMeasure

Continuous functions are integrable on the compact cutoff support square. Under the stated conditions, the asserted mathematical result follows.

Formal statement
f :
Cube 2 → ℝ
hf :
Proof (Lean source)
-- @node: continuous_integrable_cosineSupportMeasure lemma continuous_integrable_cosineSupportMeasure {f : Cube 2 → ℝ} (hf : Continuous f) : Integrable f cosineSupportMeasure := by have hm : cosineSupportMeasure = volume.restrict (univ.pi (fun _ : Fin 2 => Icc (-1 : ℝ) 2)) := by rw [cosineSupportMeasure, ← Measure.restrict_pi_pi] rfl rw [hm] exact hf.continuousOn.integrableOn_compact (isCompact_univ_pi (fun _ => isCompact_Icc))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.continuous_integrable_cosineSupportMeasure · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:98
theorem pairFeature_support_inner_product

Pair-cosine modes have diagonal energy nine on the cutoff support square. The asserted mathematical result follows.

Formal statement
L :
ℕ
α β :
Fin L × Fin L
(∫ x, pairFeature (⟨((0, 1), α), by change (0 : Fin 2) < 1; decide⟩ : PairIdx 2 L) x * pairFeature (⟨((0, 1), β), by change (0 : Fin 2) < 1; decide⟩ : PairIdx 2 L) x ∂cosineSupportMeasure)
= if α = β then 9 else 0
Proof (Lean source)
-- @node: pairFeature_support_inner_product lemma pairFeature_support_inner_product {L : ℕ} (α β : Fin L × Fin L) : (∫ x, pairFeature (⟨((0, 1), α), by change (0 : Fin 2) < 1; decide⟩ : PairIdx 2 L) x * pairFeature (⟨((0, 1), β), by change (0 : Fin 2) < 1; decide⟩ : PairIdx 2 L) x ∂cosineSupportMeasure) = if α = β then 9 else 0 := by have heq : α = β ↔ α.1 = β.1 ∧ α.2 = β.2 := Prod.ext_iff have he (x : Cube 2) : pairFeature (⟨((0, 1), α), by change (0 : Fin 2) < 1; decide⟩ : PairIdx 2 L) x * pairFeature (⟨((0, 1), β), by change (0 : Fin 2) < 1; decide⟩ : PairIdx 2 L) x = 4 * ((cos (pi * (α.1.val + 1 : ℕ) * x 0) * cos (pi * (β.1.val + 1 : ℕ) * x 0)) * (cos (pi * (α.2.val + 1 : ℕ) * x 1) * cos (pi * (β.2.val + 1 : ℕ) * x 1))) := by simp only [pairFeature]; ring conv_lhs => enter [2, x]; rw [he] rw [integral_const_mul, cosineSupportMeasure_integral_product (fun u => cos (pi * (α.1.val + 1 : ℕ) * u) * cos (pi * (β.1.val + 1 : ℕ) * u)) (fun u => cos (pi * (α.2.val + 1 : ℕ) * u) * cos (pi * (β.2.val + 1 : ℕ) * u)), support_cosine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _), support_cosine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _)] by_cases ha : α.1 = β.1 <;> by_cases hb : α.2 = β.2 <;> norm_num [heq, ha, hb, Nat.add_right_cancel_iff, Fin.val_inj]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairFeature_support_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:108
theorem pairDerivativeMode_support_inner_product

Differentiated modes have diagonal energy nine on the cutoff support square.

Formal statement
L :
ℕ
α β :
Fin L × Fin L
r :
Fin 2
(∫ x, pairDerivativeMode α r x * pairDerivativeMode β r x ∂cosineSupportMeasure)
= if α = β then 9 else 0
Proof (Lean source)
-- @node: pairDerivativeMode_support_inner_product lemma pairDerivativeMode_support_inner_product {L : ℕ} (α β : Fin L × Fin L) (r : Fin 2) : (∫ x, pairDerivativeMode α r x * pairDerivativeMode β r x ∂cosineSupportMeasure) = if α = β then 9 else 0 := by have heq : α = β ↔ α.1 = β.1 ∧ α.2 = β.2 := Prod.ext_iff fin_cases r · change (∫ x, pairDerivativeMode α 0 x * pairDerivativeMode β 0 x ∂cosineSupportMeasure) = _ have he (x : Cube 2) : pairDerivativeMode α 0 x * pairDerivativeMode β 0 x = 4 * ((sin (pi * (α.1.val + 1 : ℕ) * x 0) * sin (pi * (β.1.val + 1 : ℕ) * x 0)) * (cos (pi * (α.2.val + 1 : ℕ) * x 1) * cos (pi * (β.2.val + 1 : ℕ) * x 1))) := by simp only [pairDerivativeMode, ↓reduceIte]; ring conv_lhs => enter [2, x]; rw [he] rw [integral_const_mul, cosineSupportMeasure_integral_product (fun u => sin (pi * (α.1.val + 1 : ℕ) * u) * sin (pi * (β.1.val + 1 : ℕ) * u)) (fun u => cos (pi * (α.2.val + 1 : ℕ) * u) * cos (pi * (β.2.val + 1 : ℕ) * u)), support_sine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _), support_cosine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _)] by_cases ha : α.1 = β.1 <;> by_cases hb : α.2 = β.2 <;> norm_num [heq, ha, hb, Nat.add_right_cancel_iff, Fin.val_inj] · change (∫ x, pairDerivativeMode α 1 x * pairDerivativeMode β 1 x ∂cosineSupportMeasure) = _ have he (x : Cube 2) : pairDerivativeMode α 1 x * pairDerivativeMode β 1 x = 4 * ((cos (pi * (α.1.val + 1 : ℕ) * x 0) * cos (pi * (β.1.val + 1 : ℕ) * x 0)) * (sin (pi * (α.2.val + 1 : ℕ) * x 1) * sin (pi * (β.2.val + 1 : ℕ) * x 1))) := by norm_num [pairDerivativeMode]; ring conv_lhs => enter [2, x]; rw [he] rw [integral_const_mul, cosineSupportMeasure_integral_product (fun u => cos (pi * (α.1.val + 1 : ℕ) * u) * cos (pi * (β.1.val + 1 : ℕ) * u)) (fun u => sin (pi * (α.2.val + 1 : ℕ) * u) * sin (pi * (β.2.val + 1 : ℕ) * u)), support_cosine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _), support_sine_inner_product _ _ (Nat.succ_pos _) (Nat.succ_pos _)] by_cases ha : α.1 = β.1 <;> by_cases hb : α.2 = β.2 <;> norm_num [heq, ha, hb, Nat.add_right_cancel_iff, Fin.val_inj]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairDerivativeMode_support_inner_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:133
theorem pairCosinePolynomial_support_energy

The exact polynomial energy over all nine support cells is nine times coefficient energy. The asserted mathematical result follows.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
(∫ x, pairCosinePolynomial h x ^ 2 ∂cosineSupportMeasure) = 9 * ∑ α, h α ^ 2
Proof (Lean source)
-- @node: pairCosinePolynomial_support_energy lemma pairCosinePolynomial_support_energy {L : ℕ} (h : Fin L × Fin L → ℝ) : (∫ x, pairCosinePolynomial h x ^ 2 ∂cosineSupportMeasure) = 9 * ∑ α, h α ^ 2 := by let idx (α : Fin L × Fin L) : PairIdx 2 L := ⟨((0, 1), α), by change (0 : Fin 2) < 1; decide⟩ change (∫ x, (∑ α, h α * pairFeature (idx α) x) ^ 2 ∂cosineSupportMeasure) = _ apply finite_diagonal_square_integral · intro α β apply continuous_integrable_cosineSupportMeasure unfold pairFeature fun_prop · exact fun α β => pairFeature_support_inner_product α β
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePolynomial_support_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:176
theorem pairCosinePartial_support_energy

The exact partial energy on the nine support cells keeps the squared coordinate frequency.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
(∫ x, pairCosinePartial h r x ^ 2 ∂cosineSupportMeasure)
= 9 * ∑ α, pi ^ 2 * (if r = 0 then (α.1.val + 1 : ℕ) else (α.2.val + 1 : ℕ)) ^ 2 * h α ^ 2
Proof (Lean source)
-- @node: pairCosinePartial_support_energy lemma pairCosinePartial_support_energy {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) : (∫ x, pairCosinePartial h r x ^ 2 ∂cosineSupportMeasure) = 9 * ∑ α, pi ^ 2 * (if r = 0 then (α.1.val + 1 : ℕ) else (α.2.val + 1 : ℕ)) ^ 2 * h α ^ 2 := by simp only [pairCosinePartial] rw [finite_diagonal_square_integral _ 9 _ _ (fun α β => continuous_integrable_cosineSupportMeasure (by unfold pairDerivativeMode; split_ifs <;> fun_prop)) (fun α β => pairDerivativeMode_support_inner_product α β r)] congr 1 apply Finset.sum_congr rfl intro α _ ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePartial_support_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:190
theorem pairCosinePartial_support_energy_le

Each partial costs at most nine times squared cutoff frequency times coefficient energy.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
(∫ x, pairCosinePartial h r x ^ 2 ∂cosineSupportMeasure)
≤ 9 * (pi ^ 2 * (L : ℝ) ^ 2 * ∑ α, h α ^ 2)
Proof (Lean source)
-- @node: pairCosinePartial_support_energy_le lemma pairCosinePartial_support_energy_le {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) : (∫ x, pairCosinePartial h r x ^ 2 ∂cosineSupportMeasure) ≤ 9 * (pi ^ 2 * (L : ℝ) ^ 2 * ∑ α, h α ^ 2) := by rw [pairCosinePartial_support_energy, ← pairCosinePartial_energy] exact mul_le_mul_of_nonneg_left (pairCosinePartial_energy_le h r) (by norm_num)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePartial_support_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:206
theorem pairCosinePolynomial_support_gradient_energy_le

The support-square gradient energy is bounded without an ambient-dimension factor.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
(∫ x, pairCosinePartial h 0 x ^ 2 ∂cosineSupportMeasure)
+ (∫ x, pairCosinePartial h 1 x ^ 2 ∂cosineSupportMeasure)
≤ 18 * pi ^ 2 * (L : ℝ) ^ 2 * ∑ α, h α ^ 2
Proof (Lean source)
-- @node: pairCosinePolynomial_support_gradient_energy_le lemma pairCosinePolynomial_support_gradient_energy_le {L : ℕ} (h : Fin L × Fin L → ℝ) : (∫ x, pairCosinePartial h 0 x ^ 2 ∂cosineSupportMeasure) + (∫ x, pairCosinePartial h 1 x ^ 2 ∂cosineSupportMeasure) ≤ 18 * pi ^ 2 * (L : ℝ) ^ 2 * ∑ α, h α ^ 2 := by have h0 := pairCosinePartial_support_energy_le h 0 have h1 := pairCosinePartial_support_energy_le h 1 linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePolynomial_support_gradient_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:214
theorem cosineSupportMeasure_lintegral

A nonnegative energy density supported on the cutoff square has the same integral under ambient Lebesgue measure and the support-square measure. Under the stated conditions, the asserted mathematical result follows.

Formal statement
f :
Cube 2 → ℝ≥0∞
hf :
∀ x
if
x 0 ∉ Icc (-1 : ℝ) 2 ∨ x 1 ∉ Icc (-1 : ℝ) 2
then
f x = 0
(∫⁻ x, f x) = ∫⁻ x, f x ∂cosineSupportMeasure
Proof (Lean source)
-- @node: cosineSupportMeasure_lintegral lemma cosineSupportMeasure_lintegral (f : Cube 2 → ℝ≥0∞) (hf : ∀ x, x 0 ∉ Icc (-1 : ℝ) 2 ∨ x 1 ∉ Icc (-1 : ℝ) 2 → f x = 0) : (∫⁻ x, f x) = ∫⁻ x, f x ∂cosineSupportMeasure := by let S : Set (Cube 2) := univ.pi (fun _ => Icc (-1 : ℝ) 2) have hS : MeasurableSet S := MeasurableSet.univ_pi (fun _ => measurableSet_Icc) have he : S.indicator f = f := by funext x by_cases hx : x ∈ S · exact indicator_of_mem hx f · rw [indicator_of_notMem hx] symm apply hf by_contra hn push_neg at hn apply hx intro i _ fin_cases i · exact hn.1 · exact hn.2 conv_lhs => rw [← he] rw [lintegral_indicator hS] rw [cosineSupportMeasure, ← Measure.restrict_pi_pi] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineSupportMeasure_lintegral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:224
theorem pairCosineExtension_spatial_energy_le

The cutoff polynomial has whole-space squared energy at most nine times coefficient energy. The asserted mathematical result follows.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
(∫⁻ x : Cube 2, ofReal ((cosineCutoff (x 0) * cosineCutoff (x 1) * pairCosinePolynomial h x) ^ 2))
≤ ofReal (9 * ∑ α, h α ^ 2)
Proof (Lean source)
-- @node: pairCosineExtension_spatial_energy_le lemma pairCosineExtension_spatial_energy_le {L : ℕ} (h : Fin L × Fin L → ℝ) : (∫⁻ x : Cube 2, ofReal ((cosineCutoff (x 0) * cosineCutoff (x 1) * pairCosinePolynomial h x) ^ 2)) ≤ ofReal (9 * ∑ α, h α ^ 2) := by rw [cosineSupportMeasure_lintegral _ (by intro x hx rcases hx with hx | hx <;> simp [cosineCutoff_eq_zero hx])] have hbound (x : Cube 2) : (cosineCutoff (x 0) * cosineCutoff (x 1) * pairCosinePolynomial h x) ^ 2 ≤ pairCosinePolynomial h x ^ 2 := by have hq := cosinePairCutoff_bounds (toLp 2 x) change 0 ≤ cosineCutoff (x 0) * cosineCutoff (x 1) ∧ cosineCutoff (x 0) * cosineCutoff (x 1) ≤ 1 at hq rw [mul_pow] apply mul_le_of_le_one_left (sq_nonneg _) nlinarith [hq.1, hq.2] apply (lintegral_mono (fun x => ENNReal.ofReal_le_ofReal (hbound x))).trans rw [← ofReal_integral_eq_lintegral_ofReal (continuous_integrable_cosineSupportMeasure (by fun_prop)) (Filter.Eventually.of_forall (fun x => sq_nonneg _)), pairCosinePolynomial_support_energy]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtension_spatial_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:251
theorem pairCosineExtensionPartial_spatial_energy_le

The weak product derivatives have whole-space gradient energy bounded by the exact nine-cell polynomial energies.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
(∫⁻ x : Cube 2, ofReal (pairCosineExtensionPartial h 0 x ^ 2 + pairCosineExtensionPartial h 1 x ^ 2))
≤ ofReal ((36 + 36 * pi ^ 2 * (L : ℝ) ^ 2) * ∑ α, h α ^ 2)
Proof (Lean source)
-- @node: pairCosineExtensionPartial_spatial_energy_le lemma pairCosineExtensionPartial_spatial_energy_le {L : ℕ} (h : Fin L × Fin L → ℝ) : (∫⁻ x : Cube 2, ofReal (pairCosineExtensionPartial h 0 x ^ 2 + pairCosineExtensionPartial h 1 x ^ 2)) ≤ ofReal ((36 + 36 * pi ^ 2 * (L : ℝ) ^ 2) * ∑ α, h α ^ 2) := by rw [cosineSupportMeasure_lintegral _ (by intro x hx simp [pairCosineExtensionPartial_eq_zero_exterior h 0 x hx, pairCosineExtensionPartial_eq_zero_exterior h 1 x hx])] have hbound (x : Cube 2) : pairCosineExtensionPartial h 0 x ^ 2 + pairCosineExtensionPartial h 1 x ^ 2 ≤ 2 * (pairCosinePartial h 0 x ^ 2 + pairCosinePartial h 1 x ^ 2) + 4 * pairCosinePolynomial h x ^ 2 := by have hg := pairCosineExtensionPartial_gradient_sq_le h x have hq := cosinePairCutoff_bounds (toLp 2 x) change 0 ≤ cosineCutoff (x 0) * cosineCutoff (x 1) ∧ cosineCutoff (x 0) * cosineCutoff (x 1) ≤ 1 at hq have hs : (cosineCutoff (x 0) * cosineCutoff (x 1)) ^ 2 ≤ 1 := by nlinarith [hq.1, hq.2] have hm := mul_le_mul_of_nonneg_right hs (add_nonneg (sq_nonneg (pairCosinePartial h 0 x)) (sq_nonneg (pairCosinePartial h 1 x))) nlinarith apply (lintegral_mono (fun x => ENNReal.ofReal_le_ofReal (hbound x))).trans rw [← ofReal_integral_eq_lintegral_ofReal (continuous_integrable_cosineSupportMeasure (by fun_prop)) (Filter.Eventually.of_forall (fun x => by positivity))] apply ENNReal.ofReal_le_ofReal rw [integral_add (continuous_integrable_cosineSupportMeasure (by fun_prop)) (continuous_integrable_cosineSupportMeasure (by fun_prop)), integral_const_mul, integral_const_mul, integral_add (continuous_integrable_cosineSupportMeasure (by fun_prop)) (continuous_integrable_cosineSupportMeasure (by fun_prop)), pairCosinePolynomial_support_energy] have hg := pairCosinePolynomial_support_gradient_energy_le h nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtensionPartial_spatial_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineSpatialEnergy.lean:273
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.CosineWeakDerivative 22 declarations The piecewise affine cutoff has an integrable derivative.

Integration by parts for the cosine-prior cutoff

The piecewise affine cutoff has an integrable derivative. Splitting at its joining points proves integration by parts for a cutoff times a smooth formula: the shared boundary terms cancel and the exterior boundary terms vanish. This supplies the one-dimensional face-cancellation step of the weak-derivative roadmap, without imposing a periodic boundary condition.

theorem cosineCutoff_deriv_intervalIntegrable

The cutoff derivative is integrable on every finite interval.

Formal statement
a b :
ℝ
Proof (Lean source)
-- @node: cosineCutoff_deriv_intervalIntegrable lemma cosineCutoff_deriv_intervalIntegrable (a b : ℝ) : IntervalIntegrable (deriv cosineCutoff) volume a b := by -- `fun_prop` does not cover this bounded derivative's integrability. rw [intervalIntegrable_iff] apply (intervalIntegrable_iff.mp (intervalIntegrable_const (a := a) (b := b) (c := (1 : ℝ)))).mono' · exact (measurable_deriv cosineCutoff).aestronglyMeasurable · exact Filter.Eventually.of_forall (fun x => by simpa only [Real.norm_eq_abs] using cosineCutoff_deriv_bound x)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_deriv_intervalIntegrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:21
theorem cosineCutoff_exterior_endpoints

The cutoff vanishes at the two exterior faces of its support interval.

Formal statement
conclusion 1
cosineCutoff (-1) = 0
conclusion 2
Proof (Lean source)
-- @node: cosineCutoff_exterior_endpoints lemma cosineCutoff_exterior_endpoints : cosineCutoff (-1) = 0 ∧ cosineCutoff 2 = 0 := by norm_num [cosineCutoff]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_exterior_endpoints · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:33
theorem cosineCutoff_mul_hasDerivAt

On a single smooth piece, the derivative of the cutoff product has the usual product rule. Under the stated conditions, the asserted mathematical result follows.

Formal statement
f f' :
ℝ → ℝ
x :
ℝ
hf :
HasDerivAt f (f' x) x
HasDerivAt (fun u => cosineCutoff u * f u) (deriv cosineCutoff x * f x + cosineCutoff x * f' x) x
Proof (Lean source)
-- @node: cosineCutoff_mul_hasDerivAt lemma cosineCutoff_mul_hasDerivAt {f f' : ℝ → ℝ} {x : ℝ} (hq : DifferentiableAt ℝ cosineCutoff x) (hf : HasDerivAt f (f' x) x) : HasDerivAt (fun u => cosineCutoff u * f u) (deriv cosineCutoff x * f x + cosineCutoff x * f' x) x := by exact hq.hasDerivAt.mul hf
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_mul_hasDerivAt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:38
theorem cosineCutoff_mul_ae_hasDerivAt

The cutoff product rule holds almost everywhere, including across its joins. Under the stated conditions.

Formal statement
f f' :
ℝ → ℝ
hf :
∀ x, HasDerivAt f (f' x) x
∀ᵐ x : ℝ ∂volume, HasDerivAt (fun u => cosineCutoff u * f u) (deriv cosineCutoff x * f x + cosineCutoff x * f' x) x
Proof (Lean source)
-- @node: cosineCutoff_mul_ae_hasDerivAt lemma cosineCutoff_mul_ae_hasDerivAt {f f' : ℝ → ℝ} (hf : ∀ x, HasDerivAt f (f' x) x) : ∀ᵐ x : ℝ ∂volume, HasDerivAt (fun u => cosineCutoff u * f u) (deriv cosineCutoff x * f x + cosineCutoff x * f' x) x := by filter_upwards [cosineCutoff_ae_differentiableAt] with x hx exact cosineCutoff_mul_hasDerivAt hx (hf x)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_mul_ae_hasDerivAt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:46
theorem cosineCutoff_mul_deriv_intervalIntegrable

The candidate product derivative is integrable on any finite interval when the formula has a continuous derivative. Under the stated conditions.

Formal statement
f f' :
ℝ → ℝ
hf :
hf' :
a b :
ℝ
IntervalIntegrable (fun x => deriv cosineCutoff x * f x + cosineCutoff x * f' x) volume a b
Proof (Lean source)
-- @node: cosineCutoff_mul_deriv_intervalIntegrable lemma cosineCutoff_mul_deriv_intervalIntegrable {f f' : ℝ → ℝ} (hf : Continuous f) (hf' : Continuous f') (a b : ℝ) : IntervalIntegrable (fun x => deriv cosineCutoff x * f x + cosineCutoff x * f' x) volume a b := by exact ((cosineCutoff_deriv_intervalIntegrable a b).mul_continuousOn hf.continuousOn).add ((hf'.intervalIntegrable a b).continuousOn_mul cosineCutoff_continuous.continuousOn)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_mul_deriv_intervalIntegrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:55
theorem cosineCutoff_mul_integration_by_parts_piece

Integration by parts for a cutoff product on a piece where the cutoff is differentiable. Under the stated conditions.

Formal statement
f f' v v' :
ℝ → ℝ
hf :
∀ x, HasDerivAt f (f' x) x
hf' :
hv :
∀ x, HasDerivAt v (v' x) x
hv' :
a b :
ℝ
hq :
∀ x ∈ Ioo (min a b) (max a b), DifferentiableAt ℝ cosineCutoff x
(∫ x in a..b, (cosineCutoff x * f x) * v' x)
= (cosineCutoff b * f b) * v b
- (cosineCutoff a * f a) * v a
- ∫ x in a..b, (deriv cosineCutoff x * f x + cosineCutoff x * f' x) * v x
Proof (Lean source)
-- @node: cosineCutoff_mul_integration_by_parts_piece lemma cosineCutoff_mul_integration_by_parts_piece {f f' v v' : ℝ → ℝ} (hf : ∀ x, HasDerivAt f (f' x) x) (hf' : Continuous f') (hv : ∀ x, HasDerivAt v (v' x) x) (hv' : Continuous v') (a b : ℝ) (hq : ∀ x ∈ Ioo (min a b) (max a b), DifferentiableAt ℝ cosineCutoff x) : (∫ x in a..b, (cosineCutoff x * f x) * v' x) = (cosineCutoff b * f b) * v b - (cosineCutoff a * f a) * v a - ∫ x in a..b, (deriv cosineCutoff x * f x + cosineCutoff x * f' x) * v x := by have hfc : Continuous f := continuous_iff_continuousAt.mpr (fun x => (hf x).continuousAt) have hvc : Continuous v := continuous_iff_continuousAt.mpr (fun x => (hv x).continuousAt) exact intervalIntegral.integral_mul_deriv_eq_deriv_mul_of_hasDerivAt (cosineCutoff_continuous.mul hfc).continuousOn hvc.continuousOn (fun x hx => cosineCutoff_mul_hasDerivAt (hq x hx) (hf x)) (fun x _ => hv x) (cosineCutoff_mul_deriv_intervalIntegrable hfc hf' a b) (hv'.intervalIntegrable a b)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_mul_integration_by_parts_piece · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:65
theorem cosineCutoff_mul_integration_by_parts

Integration by parts across all three pieces cancels the interior faces; the exterior faces contribute zero. This is the weak product rule tested on a smooth function. Under the stated conditions.

Formal statement
f f' v v' :
ℝ → ℝ
hf :
∀ x, HasDerivAt f (f' x) x
hf' :
hv :
∀ x, HasDerivAt v (v' x) x
hv' :
(∫ x in (-1 : ℝ)..2, (cosineCutoff x * f x) * v' x)
= -(∫ x in (-1 : ℝ)..2, (deriv cosineCutoff x * f x + cosineCutoff x * f' x) * v x)
Proof (Lean source)
-- @node: cosineCutoff_mul_integration_by_parts lemma cosineCutoff_mul_integration_by_parts {f f' v v' : ℝ → ℝ} (hf : ∀ x, HasDerivAt f (f' x) x) (hf' : Continuous f') (hv : ∀ x, HasDerivAt v (v' x) x) (hv' : Continuous v') : (∫ x in (-1 : ℝ)..2, (cosineCutoff x * f x) * v' x) = -(∫ x in (-1 : ℝ)..2, (deriv cosineCutoff x * f x + cosineCutoff x * f' x) * v x) := by have hfc : Continuous f := continuous_iff_continuousAt.mpr (fun x => (hf x).continuousAt) have hvc : Continuous v := continuous_iff_continuousAt.mpr (fun x => (hv x).continuousAt) have hleft := cosineCutoff_mul_integration_by_parts_piece hf hf' hv hv' (-1) 0 (fun x hx => (cosineCutoff_hasDerivAt_left (by simpa using hx)).differentiableAt) have hmid := cosineCutoff_mul_integration_by_parts_piece hf hf' hv hv' 0 1 (fun x hx => (cosineCutoff_hasDerivAt_plateau (by simpa using hx)).differentiableAt) have hright := cosineCutoff_mul_integration_by_parts_piece hf hf' hv hv' 1 2 (fun x hx => (cosineCutoff_hasDerivAt_right (by simpa using hx)).differentiableAt) have hi (a b : ℝ) : IntervalIntegrable (fun x => (cosineCutoff x * f x) * v' x) volume a b := ((cosineCutoff_continuous.mul hfc).mul hv').intervalIntegrable a b have hj (a b : ℝ) : IntervalIntegrable (fun x => (deriv cosineCutoff x * f x + cosineCutoff x * f' x) * v x) volume a b := (cosineCutoff_mul_deriv_intervalIntegrable hfc hf' a b).mul_continuousOn hvc.continuousOn rw [← intervalIntegral.integral_add_adjacent_intervals (hi (-1) 1) (hi 1 2), ← intervalIntegral.integral_add_adjacent_intervals (hi (-1) 0) (hi 0 1), ← intervalIntegral.integral_add_adjacent_intervals (hj (-1) 1) (hj 1 2), ← intervalIntegral.integral_add_adjacent_intervals (hj (-1) 0) (hj 0 1), hleft, hmid, hright, cosineCutoff_exterior_endpoints.1, cosineCutoff_exterior_endpoints.2] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_mul_integration_by_parts · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:82
theorem cosineCutoff_deriv_eq_zero_exterior

The derivative vanishes outside the cutoff's support interval. Under the stated conditions.

Formal statement
x :
ℝ
hx :
x ∉ Icc (-1 : ℝ) 2
Proof (Lean source)
-- @node: cosineCutoff_deriv_eq_zero_exterior lemma cosineCutoff_deriv_eq_zero_exterior {x : ℝ} (hx : x ∉ Icc (-1 : ℝ) 2) : deriv cosineCutoff x = 0 := by exact (cosineCutoff_hasDerivAt_exterior hx).deriv
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_deriv_eq_zero_exterior · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:114
theorem cosineCutoff_mul_weak_derivative

On the whole real line the cutoff product satisfies integration by parts, with no boundary restriction on either smooth factor. Under the stated conditions.

Formal statement
f f' v v' :
ℝ → ℝ
hf :
∀ x, HasDerivAt f (f' x) x
hf' :
hv :
∀ x, HasDerivAt v (v' x) x
hv' :
(∫ x : ℝ, (cosineCutoff x * f x) * v' x)
= -(∫ x : ℝ, (deriv cosineCutoff x * f x + cosineCutoff x * f' x) * v x)
Proof (Lean source)
-- @node: cosineCutoff_mul_weak_derivative lemma cosineCutoff_mul_weak_derivative {f f' v v' : ℝ → ℝ} (hf : ∀ x, HasDerivAt f (f' x) x) (hf' : Continuous f') (hv : ∀ x, HasDerivAt v (v' x) x) (hv' : Continuous v') : (∫ x : ℝ, (cosineCutoff x * f x) * v' x) = -(∫ x : ℝ, (deriv cosineCutoff x * f x + cosineCutoff x * f' x) * v x) := by have hi : (∫ x in (-1 : ℝ)..2, (cosineCutoff x * f x) * v' x) = ∫ x : ℝ, (cosineCutoff x * f x) * v' x := by rw [intervalIntegral.integral_of_le (by norm_num : (-1 : ℝ) ≤ 2), ← integral_Icc_eq_integral_Ioc] apply setIntegral_eq_integral_of_forall_compl_eq_zero intro x hx simp [cosineCutoff_eq_zero hx] have hj : (∫ x in (-1 : ℝ)..2, (deriv cosineCutoff x * f x + cosineCutoff x * f' x) * v x) = ∫ x : ℝ, (deriv cosineCutoff x * f x + cosineCutoff x * f' x) * v x := by rw [intervalIntegral.integral_of_le (by norm_num : (-1 : ℝ) ≤ 2), ← integral_Icc_eq_integral_Ioc] apply setIntegral_eq_integral_of_forall_compl_eq_zero intro x hx simp [cosineCutoff_eq_zero hx, cosineCutoff_deriv_eq_zero_exterior hx] rw [← hi, ← hj] exact cosineCutoff_mul_integration_by_parts hf hf' hv hv'
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cosineCutoff_mul_weak_derivative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:120
theorem pairCosinePolynomial_continuous

[ The finite cosine polynomial is continuous on the whole coordinate plane. This uses the stated conclusion.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
Proof (Lean source)
-- @node: pairCosinePolynomial_continuous @[fun_prop] lemma pairCosinePolynomial_continuous {L : ℕ} (h : Fin L × Fin L → ℝ) : Continuous (pairCosinePolynomial h) := by unfold pairCosinePolynomial fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePolynomial_continuous · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:146
theorem pairCosinePartial_continuous

Each explicit partial polynomial is continuous on the whole coordinate plane. This uses the stated conclusion.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
Proof (Lean source)
-- @node: pairCosinePartial_continuous @[fun_prop] lemma pairCosinePartial_continuous {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) : Continuous (pairCosinePartial h r) := by unfold pairCosinePartial pairDerivativeMode split_ifs <;> fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosinePartial_continuous · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:153

The cutoff's coordinate partial, using the almost-everywhere scalar derivative.

Definition (Lean source)
r :
Fin 2
x :
Cube 2
pairCutoffPartial r x :
ℝ
if r
= 0 then deriv cosineCutoff (x 0) * cosineCutoff (x 1) else cosineCutoff (x 0) * deriv cosineCutoff (x 1)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCutoffPartial · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:160

The roadmap's explicit weak partial derivative of the cutoff cosine polynomial.

Definition (Lean source)
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
x :
Cube 2
pairCosineExtensionPartial h r x :
ℝ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtensionPartial · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:166
theorem pairCosineExtensionPartial_weak_slice

On every coordinate slice the explicit pair partial is a weak derivative of the cutoff extension. The smooth test function need not vanish at the cutoff's joins.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
x :
Cube 2
v v' :
ℝ → ℝ
hv :
∀ t, HasDerivAt v (v' t) t
hv' :
(∫ t : ℝ, (cosineCutoff (update x r t 0) * cosineCutoff (update x r t 1) * pairCosinePolynomial h (update x r t)) * v' t)
= -(∫ t : ℝ, pairCosineExtensionPartial h r (update x r t) * v t)
Proof (Lean source)
-- @node: pairCosineExtensionPartial_weak_slice lemma pairCosineExtensionPartial_weak_slice {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) (x : Cube 2) {v v' : ℝ → ℝ} (hv : ∀ t, HasDerivAt v (v' t) t) (hv' : Continuous v') : (∫ t : ℝ, (cosineCutoff (update x r t 0) * cosineCutoff (update x r t 1) * pairCosinePolynomial h (update x r t)) * v' t) = -(∫ t : ℝ, pairCosineExtensionPartial h r (update x r t) * v t) := by classical have hd (t : ℝ) : HasDerivAt (fun u => pairCosinePolynomial h (update x r u)) (pairCosinePartial h r (update x r t)) t := by simpa using pairCosinePolynomial_hasDerivAt h r (update x r t) fin_cases r · have hf (t : ℝ) := (hd t).const_mul (cosineCutoff (x 1)) have hf' : Continuous (fun t => cosineCutoff (x 1) * pairCosinePartial h 0 (update x 0 t)) := by fun_prop convert cosineCutoff_mul_weak_derivative hf hf' hv hv' using 1 <;> congr 2 <;> funext t <;> dsimp [pairCosineExtensionPartial, pairCutoffPartial, update] <;> ring · have hf (t : ℝ) := (hd t).const_mul (cosineCutoff (x 0)) have hf' : Continuous (fun t => cosineCutoff (x 0) * pairCosinePartial h 1 (update x 1 t)) := by fun_prop convert cosineCutoff_mul_weak_derivative hf hf' hv hv' using 1 <;> congr 2 <;> funext t <;> dsimp [pairCosineExtensionPartial, pairCutoffPartial, update] <;> ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtensionPartial_weak_slice · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:173
theorem pairCutoffPartial_abs_le

Each cutoff partial has absolute value at most one. The asserted mathematical result follows.

Formal statement
r :
Fin 2
x :
Cube 2
|pairCutoffPartial r x| ≤ 1
Proof (Lean source)
-- @node: pairCutoffPartial_abs_le lemma pairCutoffPartial_abs_le (r : Fin 2) (x : Cube 2) : |pairCutoffPartial r x| ≤ 1 := by have hq (j : Fin 2) : |cosineCutoff (x j)| ≤ 1 := by rw [abs_of_nonneg (cosineCutoff_bounds _).1] exact (cosineCutoff_bounds _).2 fin_cases r <;> simp only [pairCutoffPartial, Fin.zero_eta, ↓reduceIte, abs_mul] · simpa using mul_le_mul (cosineCutoff_deriv_bound _) (hq 1) (abs_nonneg _) (by norm_num) · simpa using mul_le_mul (hq 0) (cosineCutoff_deriv_bound _) (abs_nonneg _) (by norm_num)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCutoffPartial_abs_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:202
theorem pairCosineExtensionPartial_abs_le

The explicit extension partial is dominated by continuous polynomial magnitudes.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
x :
Cube 2
Proof (Lean source)
-- @node: pairCosineExtensionPartial_abs_le lemma pairCosineExtensionPartial_abs_le {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) (x : Cube 2) : |pairCosineExtensionPartial h r x| ≤ |pairCosinePolynomial h x| + |pairCosinePartial h r x| := by have hq : |cosineCutoff (x 0) * cosineCutoff (x 1)| ≤ 1 := by have hb := cosinePairCutoff_bounds (toLp 2 x) change 0 ≤ cosineCutoff (x 0) * cosineCutoff (x 1) ∧ cosineCutoff (x 0) * cosineCutoff (x 1) ≤ 1 at hb rw [abs_of_nonneg hb.1] exact hb.2 calc |pairCosineExtensionPartial h r x| ≤ |pairCutoffPartial r x * pairCosinePolynomial h x| + |(cosineCutoff (x 0) * cosineCutoff (x 1)) * pairCosinePartial h r x| := abs_add_le _ _ _ ≤ |pairCosinePolynomial h x| + |pairCosinePartial h r x| := by simp only [abs_mul] exact add_le_add (by simpa using mul_le_mul_of_nonneg_right (pairCutoffPartial_abs_le r x) (abs_nonneg _)) (by simpa using mul_le_mul_of_nonneg_right hq (abs_nonneg _))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtensionPartial_abs_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:213
theorem pairCosineExtensionPartial_eq_zero_exterior

The extension partial vanishes when either coordinate is outside the support square. Under the stated conditions, the asserted mathematical result follows.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
x :
Cube 2
hx :
x 0 ∉ Icc (-1 : ℝ) 2 ∨ x 1 ∉ Icc (-1 : ℝ) 2
Proof (Lean source)
-- @node: pairCosineExtensionPartial_eq_zero_exterior lemma pairCosineExtensionPartial_eq_zero_exterior {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) (x : Cube 2) (hx : x 0 ∉ Icc (-1 : ℝ) 2 ∨ x 1 ∉ Icc (-1 : ℝ) 2) : pairCosineExtensionPartial h r x = 0 := by rcases hx with hx | hx <;> fin_cases r <;> simp [pairCosineExtensionPartial, pairCutoffPartial, cosineCutoff_eq_zero hx, cosineCutoff_deriv_eq_zero_exterior hx]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtensionPartial_eq_zero_exterior · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:236
theorem pairCosineExtensionPartial_hasCompactSupport

The candidate partial has compact support in the Euclidean plane. The asserted mathematical result follows.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
HasCompactSupport (fun u : EuclideanSpace ℝ (Fin 2) => pairCosineExtensionPartial h r (fun j => u j))
Proof (Lean source)
-- @node: pairCosineExtensionPartial_hasCompactSupport lemma pairCosineExtensionPartial_hasCompactSupport {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) : HasCompactSupport (fun u : EuclideanSpace ℝ (Fin 2) => pairCosineExtensionPartial h r (fun j => u j)) := by have hsub : support (fun u : EuclideanSpace ℝ (Fin 2) => pairCosineExtensionPartial h r (fun j => u j)) ⊆ closedBall 0 4 := by intro u hu have h0 : u 0 ∈ Icc (-1 : ℝ) 2 := by by_contra hx exact hu (pairCosineExtensionPartial_eq_zero_exterior h r _ (inl hx)) have h1 : u 1 ∈ Icc (-1 : ℝ) 2 := by by_contra hx exact hu (pairCosineExtensionPartial_eq_zero_exterior h r _ (inr hx)) have hsq : ‖u‖ ^ 2 ≤ 8 := by rw [EuclideanSpace.real_norm_sq_eq, Fin.sum_univ_two] nlinarith [h0.1, h0.2, h1.1, h1.2, sq_nonneg (u 0 + 1), sq_nonneg (u 1 + 1)] rw [Metric.mem_closedBall, dist_zero_right] nlinarith [norm_nonneg u] exact (isCompact_closedBall (0 : EuclideanSpace ℝ (Fin 2)) 4).of_isClosed_subset (isClosed_tsupport _) (closure_minimal hsub Metric.isClosed_closedBall)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtensionPartial_hasCompactSupport · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:246
theorem pairCosineExtensionPartial_memLp

The explicit weak partial is in every Lp space, in particular L1 and L2: it is measurable, compactly supported, and bounded by a continuous envelope on that support. Under the stated conditions, the asserted mathematical result follows.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
p :
ℝ≥0∞
MemLp (fun u : EuclideanSpace ℝ (Fin 2) => pairCosineExtensionPartial h r (fun j => u j)) p volume
Proof (Lean source)
-- @node: pairCosineExtensionPartial_memLp lemma pairCosineExtensionPartial_memLp {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) (p : ℝ≥0∞) : MemLp (fun u : EuclideanSpace ℝ (Fin 2) => pairCosineExtensionPartial h r (fun j => u j)) p volume := by let F := fun u : EuclideanSpace ℝ (Fin 2) => pairCosineExtensionPartial h r (fun j => u j) have hs : HasCompactSupport F := pairCosineExtensionPartial_hasCompactSupport h r have he : Continuous (fun u : EuclideanSpace ℝ (Fin 2) => |pairCosinePolynomial h (fun j => u j)| + |pairCosinePartial h r (fun j => u j)|) := by fun_prop obtain ⟨C, hC⟩ := hs.bddAbove_image he.continuousOn apply hs.memLp_of_bound (C := max C 0) · apply Measurable.aestronglyMeasurable dsimp [F] unfold pairCosineExtensionPartial pairCutoffPartial split_ifs <;> fun_prop · apply Filter.Eventually.of_forall intro u by_cases hz : F u = 0 · simp [hz] · rw [Real.norm_eq_abs] exact (pairCosineExtensionPartial_abs_le h r _).trans ((hC ⟨u, subset_closure hz, rfl⟩).trans (le_max_left _ _))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtensionPartial_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:269
theorem pairCosineExtensionPartial_integrable_and_memLp

Both analytic integrability obligations for the weak partial follow from its Lp regularity. The asserted mathematical result follows.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
r :
Fin 2
conclusion 1
Integrable (fun u : EuclideanSpace ℝ (Fin 2) => pairCosineExtensionPartial h r (fun j => u j)) volume
conclusion 2
MemLp (fun u : EuclideanSpace ℝ (Fin 2) => pairCosineExtensionPartial h r (fun j => u j)) 2 volume
Proof (Lean source)
-- @node: pairCosineExtensionPartial_integrable_and_memLp lemma pairCosineExtensionPartial_integrable_and_memLp {L : ℕ} (h : Fin L × Fin L → ℝ) (r : Fin 2) : Integrable (fun u : EuclideanSpace ℝ (Fin 2) => pairCosineExtensionPartial h r (fun j => u j)) volume ∧ MemLp (fun u : EuclideanSpace ℝ (Fin 2) => pairCosineExtensionPartial h r (fun j => u j)) 2 volume := by exact ⟨memLp_one_iff_integrable.mp (pairCosineExtensionPartial_memLp h r 1), pairCosineExtensionPartial_memLp h r 2⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtensionPartial_integrable_and_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:295
theorem pairCutoffPartial_gradient_sq_le

The two explicit cutoff partials have total squared length at most two.

Formal statement
x :
Cube 2
pairCutoffPartial 0 x ^ 2 + pairCutoffPartial 1 x ^ 2 ≤ 2
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCutoffPartial_gradient_sq_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:306
theorem pairCosineExtensionPartial_gradient_sq_le

The product rule and the squared triangle inequality give the roadmap's pointwise gradient estimate before integration.

Formal statement
L :
ℕ
h :
Fin L × Fin L → ℝ
x :
Cube 2
≤ (cosineCutoff (x 0) * cosineCutoff (x 1)) ^ 2 * (pairCosinePartial h 0 x ^ 2 + pairCosinePartial h 1 x ^ 2)
+ 2 * pairCosinePolynomial h x ^ 2
Proof (Lean source)
-- @node: pairCosineExtensionPartial_gradient_sq_le lemma pairCosineExtensionPartial_gradient_sq_le {L : ℕ} (h : Fin L × Fin L → ℝ) (x : Cube 2) : (pairCosineExtensionPartial h 0 x ^ 2 + pairCosineExtensionPartial h 1 x ^ 2) / 2 ≤ (cosineCutoff (x 0) * cosineCutoff (x 1)) ^ 2 * (pairCosinePartial h 0 x ^ 2 + pairCosinePartial h 1 x ^ 2) + 2 * pairCosinePolynomial h x ^ 2 := by have hsum (a b : ℝ) : (a + b) ^ 2 ≤ 2 * a ^ 2 + 2 * b ^ 2 := by nlinarith [sq_nonneg (a - b)] have h0 := hsum (pairCutoffPartial 0 x * pairCosinePolynomial h x) ((cosineCutoff (x 0) * cosineCutoff (x 1)) * pairCosinePartial h 0 x) have h1 := hsum (pairCutoffPartial 1 x * pairCosinePolynomial h x) ((cosineCutoff (x 0) * cosineCutoff (x 1)) * pairCosinePartial h 1 x) have hq := mul_le_mul_of_nonneg_right (pairCutoffPartial_gradient_sq_le x) (sq_nonneg (pairCosinePolynomial h x)) change (pairCosineExtensionPartial h 0 x) ^ 2 ≤ _ at h0 change (pairCosineExtensionPartial h 1 x) ^ 2 ≤ _ at h1 simp only [mul_pow] at h0 h1 nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCosineExtensionPartial_gradient_sq_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/CosineWeakDerivative.lean:312
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.GaussianMoments 11 declarations The sinusoidal treatment effect has variance delta squared.

Treatment-effect and selected-noise moments

The sinusoidal treatment effect has variance delta squared. Independent original units give the sample-mean variance, and selected Gaussian errors have zero mean and variance four over n for every fixed assignment. These are the moment steps of HT transfer.

theorem uniform_sine_second_moment Lemma uniform_sine_second_moment in the paper ↗

The squared sine integrates to one half over a full uniform period.

Formal statement
(∫ u, sin (2 * pi * u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1)) = 1 / 2
Proof (Lean source)
-- @node: uniform_sine_second_moment lemma uniform_sine_second_moment : (∫ u, sin (2 * pi * u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1)) = 1 / 2 := by rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 1)] rw [intervalIntegral.integral_comp_mul_left (fun u => sin u ^ 2) (by positivity : 2 * pi ≠ 0)] simp only [mul_zero, mul_one, integral_sin_sq, Real.sin_zero, Real.sin_two_pi, zero_mul, sub_zero] simp only [smul_eq_mul] field_simp [Real.pi_ne_zero] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.uniform_sine_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:18
theorem tauFn_memLp

The treatment effect is square integrable by its uniform bound. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
hd :
0 < d
Proof (Lean source)
-- @node: tauFn_memLp lemma tauFn_memLp {d : ℕ} (hd : 0 < d) : MemLp (tauFn hd) 2 (cubeMeasure d) := by let : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ let : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance have hs : MemLp (fun x : Cube d => sin (2 * pi * x ⟨0, hd⟩)) 2 (cubeMeasure d) := by apply (memLp_const (1 : ℝ)).mono ((by fun_prop : Measurable _).aestronglyMeasurable) filter_upwards with x simpa [Real.norm_eq_abs] using Real.abs_sin_le_one (2 * pi * x ⟨0, hd⟩) exact (memLp_const tau0).add (hs.const_mul (delta * sqrt 2))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.tauFn_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:33
theorem tauFn_variance

The frozen treatment-effect variance is delta squared. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
variance (tauFn hd) (cubeMeasure d) = delta ^ 2
Proof (Lean source)
-- @node: tauFn_variance lemma tauFn_variance {d : ℕ} (hd : 0 < d) : variance (tauFn hd) (cubeMeasure d) = delta ^ 2 := by let : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ let : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance rw [variance_eq_integral (tauFn_memLp hd).aemeasurable, tauFn_mean hd] have hcenter (x : Cube d) : (tauFn hd x - tau0) ^ 2 = delta ^ 2 * 2 * sin (2 * pi * x ⟨0, hd⟩) ^ 2 := by unfold tauFn nlinarith [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2)] simp_rw [hcenter] rw [integral_const_mul] unfold cubeMeasure rw [integral_comp_eval (μ := fun _ : Fin d => volume.restrict (Icc (0 : ℝ) 1)) (i := ⟨0, hd⟩) (by fun_prop : AEStronglyMeasurable (fun u : ℝ => sin (2 * pi * u) ^ 2) (volume.restrict (Icc (0 : ℝ) 1))), uniform_sine_second_moment] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.tauFn_variance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:46
theorem tauFn_sampleMean_variance

Independence of the original covariates gives the sample-average effect variance. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
variance (fun x : Covariates n d => (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i)) (covLaw n d)
= delta ^ 2 / n
Proof (Lean source)
-- @node: tauFn_sampleMean_variance lemma tauFn_sampleMean_variance {n d : ℕ} (hd : 0 < d) : variance (fun x : Covariates n d => (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i)) (covLaw n d) = delta ^ 2 / n := by let : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ let : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance rw [variance_const_mul] have hsum := variance_sum_pi (μ := fun _ : Fin n => cubeMeasure d) (X := fun _ => tauFn hd) (fun _ => tauFn_memLp hd) have hfun : (∑ i : Fin n, fun x : Covariates n d => tauFn hd (x i)) = (fun x => ∑ i, tauFn hd (x i)) := by ext x simp rw [hfun] at hsum unfold covLaw rw [hsum] simp only [tauFn_variance, Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] by_cases hn : (n : ℝ) = 0 · simp [hn] · field_simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.tauFn_sampleMean_variance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:68
theorem signed_selected_unit_noise_memLp

A fixed selected unit error has a finite second moment. The asserted mathematical result follows.

Formal statement
b :
MemLp (fun e : ℝ × ℝ => sgn b * (if b then e.2 else e.1)) 2 ((gaussianReal 0 1).prod (gaussianReal 0 1))
Proof (Lean source)
-- @node: signed_selected_unit_noise_memLp lemma signed_selected_unit_noise_memLp (b : Bool) : MemLp (fun e : ℝ × ℝ => sgn b * (if b then e.2 else e.1)) 2 ((gaussianReal 0 1).prod (gaussianReal 0 1)) := by have h : MemLp (id : ℝ → ℝ) 2 (gaussianReal 0 1) := memLp_id_gaussianReal 2 cases b · simpa [sgn] using (h.comp_fst (gaussianReal 0 1)).const_mul (-1) · simpa [sgn] using h.comp_snd (gaussianReal 0 1)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signed_selected_unit_noise_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:92
theorem signed_selected_unit_noise_mean

Each selected standard Gaussian error is centered for either treatment sign.

Formal statement
b :
(∫ e : ℝ × ℝ, sgn b * (if b then e.2 else e.1) ∂(gaussianReal 0 1).prod (gaussianReal 0 1))
= 0
Proof (Lean source)
-- @node: signed_selected_unit_noise_mean lemma signed_selected_unit_noise_mean (b : Bool) : (∫ e : ℝ × ℝ, sgn b * (if b then e.2 else e.1) ∂(gaussianReal 0 1).prod (gaussianReal 0 1)) = 0 := by have hf := integral_fun_fst (μ := gaussianReal 0 1) (ν := gaussianReal 0 1) (id : ℝ → ℝ) have hs := integral_fun_snd (μ := gaussianReal 0 1) (ν := gaussianReal 0 1) (id : ℝ → ℝ) simp only [id_eq, integral_id_gaussianReal, smul_zero] at hf hs cases b <;> simp [sgn, integral_neg, hf, hs]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signed_selected_unit_noise_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:102
theorem signed_selected_unit_noise_variance

Selection and the treatment sign preserve the unit noise variance.

Formal statement
b :
variance (fun e : ℝ × ℝ => sgn b * (if b then e.2 else e.1)) ((gaussianReal 0 1).prod (gaussianReal 0 1))
= 1
Proof (Lean source)
-- @node: signed_selected_unit_noise_variance lemma signed_selected_unit_noise_variance (b : Bool) : variance (fun e : ℝ × ℝ => sgn b * (if b then e.2 else e.1)) ((gaussianReal 0 1).prod (gaussianReal 0 1)) = 1 := by have hf : variance (Prod.fst : ℝ × ℝ → ℝ) ((gaussianReal 0 1).prod (gaussianReal 0 1)) = 1 := by simpa using (measurePreserving_fst (μ := gaussianReal 0 1) (ν := gaussianReal 0 1)).variance_fun_comp (f := id) (by fun_prop) have hs : variance (Prod.snd : ℝ × ℝ → ℝ) ((gaussianReal 0 1).prod (gaussianReal 0 1)) = 1 := by simpa using (measurePreserving_snd (μ := gaussianReal 0 1) (ν := gaussianReal 0 1)).variance_fun_comp (f := id) (by fun_prop) cases b <;> simp [sgn, variance_fun_neg, hf, hs]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signed_selected_unit_noise_variance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:112
theorem selected_noise_mean

The selected-noise contribution is centered for every fixed original assignment.

Formal statement
n :
ℕ
z :
(∫ e : Sched n, (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1) ∂noiseLaw n)
= 0
Proof (Lean source)
-- @node: selected_noise_mean lemma selected_noise_mean {n : ℕ} (z : Signs n) : (∫ e : Sched n, (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1) ∂noiseLaw n) = 0 := by rw [integral_const_mul] have hint (i : Fin n) : Integrable (fun e : Sched n => sgn (z i) * (if z i then (e i).2 else (e i).1)) (noiseLaw n) := integrable_comp_eval (μ := fun _ : Fin n => (gaussianReal 0 1).prod (gaussianReal 0 1)) (i := i) ((signed_selected_unit_noise_memLp (z i)).integrable (by norm_num)) rw [integral_finsetSum _ (fun i _ => hint i)] have hi (i : Fin n) : (∫ e : Sched n, sgn (z i) * (if z i then (e i).2 else (e i).1) ∂noiseLaw n) = 0 := by unfold noiseLaw rw [integral_comp_eval (μ := fun _ : Fin n => (gaussianReal 0 1).prod (gaussianReal 0 1)) (i := i) (signed_selected_unit_noise_memLp (z i)).aestronglyMeasurable] exact signed_selected_unit_noise_mean (z i) change (2 / (n : ℝ)) * ∑ i, (∫ e : Sched n, sgn (z i) * (if z i then (e i).2 else (e i).1) ∂noiseLaw n) = 0 simp only [hi, Finset.sum_const_zero, mul_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.selected_noise_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:127
theorem selected_noise_variance

Independent unit errors yield exactly four over n selected-noise variance.

Formal statement
n :
ℕ
z :
variance (fun e : Sched n => (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1)) (noiseLaw n)
= 4 / n
Proof (Lean source)
-- @node: selected_noise_variance lemma selected_noise_variance {n : ℕ} (z : Signs n) : variance (fun e : Sched n => (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1)) (noiseLaw n) = 4 / n := by rw [variance_const_mul] have hsum := variance_sum_pi (μ := fun _ : Fin n => (gaussianReal 0 1).prod (gaussianReal 0 1)) (X := fun i e => sgn (z i) * (if z i then e.2 else e.1)) (fun i => signed_selected_unit_noise_memLp (z i)) have hfun : (∑ i : Fin n, fun e : Sched n => sgn (z i) * (if z i then (e i).2 else (e i).1)) = (fun e => ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1)) := by ext e simp rw [hfun] at hsum unfold noiseLaw rw [hsum] simp only [signed_selected_unit_noise_variance, Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, mul_one] by_cases hn : (n : ℝ) = 0 · simp [hn] · field_simp norm_num
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.selected_noise_variance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:149
theorem selected_noise_memLp

The entire selected-noise contribution has a finite second moment.

Formal statement
n :
ℕ
z :
MemLp (fun e : Sched n => (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1)) 2 (noiseLaw n)
Proof (Lean source)
-- @node: selected_noise_memLp lemma selected_noise_memLp {n : ℕ} (z : Signs n) : MemLp (fun e : Sched n => (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1)) 2 (noiseLaw n) := by have hi (i : Fin n) : MemLp (fun e : Sched n => sgn (z i) * (if z i then (e i).2 else (e i).1)) 2 (noiseLaw n) := (signed_selected_unit_noise_memLp (z i)).comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => (gaussianReal 0 1).prod (gaussianReal 0 1)) i) exact (memLp_finsetSum univ (fun i _ => hi i)).const_mul _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.selected_noise_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:175
theorem selected_noise_second_moment

Centering turns the selected-noise variance into its exact second moment.

Formal statement
n :
ℕ
z :
(∫ e : Sched n, ((2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1)) ^ 2 ∂noiseLaw n)
= 4 / (n : ℝ)
Proof (Lean source)
-- @node: selected_noise_second_moment lemma selected_noise_second_moment {n : ℕ} (z : Signs n) : (∫ e : Sched n, ((2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1)) ^ 2 ∂noiseLaw n) = 4 / (n : ℝ) := by have h := selected_noise_variance z rw [variance_eq_integral (selected_noise_memLp z).aemeasurable, selected_noise_mean z] at h simpa only [sub_zero] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.selected_noise_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianMoments.lean:187
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.GaussianTarget 10 declarations Uniform sinusoidal effects have mean tau0, and the independent Gaussian contrasts have mean zero.

Mean of the frozen Gaussian causal completion

Uniform sinusoidal effects have mean tau0, and the independent Gaussian contrasts have mean zero. The calculation uses the actual pre-assignment schedule.

A full sine period has zero mean under the uniform unit interval.

Formal statement
(∫ u, sin (2 * pi * u) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0
Proof (Lean source)
-- @node: uniform_sine_mean_zero lemma uniform_sine_mean_zero : (∫ u, sin (2 * pi * u) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0 := by rw [integral_Icc_eq_integral_Ioc, ← intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 1)] rw [intervalIntegral.integral_comp_mul_left sin (by positivity : 2 * pi ≠ 0)] simp [integral_sin, Real.cos_two_pi]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.uniform_sine_mean_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianTarget.lean:17
theorem tauFn_integrable

The bounded sinusoidal treatment effect is integrable under cube sampling. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
hd :
0 < d
Proof (Lean source)
-- @node: tauFn_integrable lemma tauFn_integrable {d : ℕ} (hd : 0 < d) : Integrable (tauFn hd) (cubeMeasure d) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance have hi : Integrable (fun u : ℝ => sin (2 * pi * u)) (volume.restrict (Icc (0 : ℝ) 1)) := by exact (integrable_const (1 : ℝ)).mono' (by exact (by fun_prop : Measurable _).aestronglyMeasurable) (Filter.Eventually.of_forall (fun u => by simpa [Real.norm_eq_abs] using Real.abs_sin_le_one _)) exact (integrable_const tau0).add ((integrable_comp_eval (μ := fun _ : Fin d => volume.restrict (Icc (0 : ℝ) 1)) (i := ⟨0, hd⟩) hi).const_mul (delta * sqrt 2))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.tauFn_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianTarget.lean:25
theorem tauFn_mean

Uniform covariates give the stipulated average treatment effect. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
(∫ x, tauFn hd x ∂cubeMeasure d) = tau0
Proof (Lean source)
-- @node: tauFn_mean lemma tauFn_mean {d : ℕ} (hd : 0 < d) : (∫ x, tauFn hd x ∂cubeMeasure d) = tau0 := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance have hi : Integrable (fun x : Cube d => sin (2 * pi * x ⟨0, hd⟩)) (cubeMeasure d) := by exact (integrable_const (1 : ℝ)).mono' (by exact (by fun_prop : Measurable _).aestronglyMeasurable) (Filter.Eventually.of_forall (fun x => by simpa [Real.norm_eq_abs] using Real.abs_sin_le_one _)) unfold tauFn rw [integral_add (integrable_const _) (hi.const_mul _), integral_const_mul] unfold cubeMeasure rw [integral_comp_eval (μ := fun _ : Fin d => volume.restrict (Icc (0 : ℝ) 1)) (i := ⟨0, hd⟩) (by fun_prop : AEStronglyMeasurable (fun u : ℝ => sin (2 * pi * u)) (volume.restrict (Icc (0 : ℝ) 1))), uniform_sine_mean_zero] simp [cubeMeasure]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.tauFn_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianTarget.lean:38
theorem noise_coordinate_integrable Lemma noise_coordinate_integrable in the paper ↗

Both coordinates of each original-unit Gaussian noise have finite first moments. The asserted mathematical result follows.

Formal statement
n :
ℕ
i :
Fin n
conclusion 1
Integrable (fun e : Sched n => (e i).1) (noiseLaw n)
conclusion 2
Integrable (fun e : Sched n => (e i).2) (noiseLaw n)
Proof (Lean source)
-- @node: noise_coordinate_integrable lemma noise_coordinate_integrable (n : ℕ) (i : Fin n) : Integrable (fun e : Sched n => (e i).1) (noiseLaw n) ∧ Integrable (fun e : Sched n => (e i).2) (noiseLaw n) := by have hi : Integrable (id : ℝ → ℝ) (gaussianReal 0 1) := (memLp_id_gaussianReal 1).integrable le_rfl exact ⟨integrable_comp_eval (hi.comp_fst (gaussianReal 0 1)), integrable_comp_eval (hi.comp_snd (gaussianReal 0 1))⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.noise_coordinate_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianTarget.lean:57
theorem noise_contrast_mean_zero Lemma noise_contrast_mean_zero in the paper ↗

Independent centered Gaussian noise gives a zero mean unit contrast.

Formal statement
n :
ℕ
i :
Fin n
(∫ e : Sched n, (e i).2 - (e i).1 ∂noiseLaw n) = 0
Proof (Lean source)
-- @node: noise_contrast_mean_zero lemma noise_contrast_mean_zero (n : ℕ) (i : Fin n) : (∫ e : Sched n, (e i).2 - (e i).1 ∂noiseLaw n) = 0 := by rw [integral_sub (noise_coordinate_integrable n i).2 (noise_coordinate_integrable n i).1] simp only [noiseLaw, integral_comp_eval (μ := fun _ : Fin n => (gaussianReal 0 1).prod (gaussianReal 0 1)) (i := i) (by fun_prop : AEStronglyMeasurable (Prod.snd : ℝ × ℝ → ℝ) ((gaussianReal 0 1).prod (gaussianReal 0 1))), integral_comp_eval (μ := fun _ : Fin n => (gaussianReal 0 1).prod (gaussianReal 0 1)) (i := i) (by fun_prop : AEStronglyMeasurable (Prod.fst : ℝ × ℝ → ℝ) ((gaussianReal 0 1).prod (gaussianReal 0 1)))] have hs := integral_fun_snd (μ := gaussianReal 0 1) (ν := gaussianReal 0 1) (id : ℝ → ℝ) have hf := integral_fun_fst (μ := gaussianReal 0 1) (ν := gaussianReal 0 1) (id : ℝ → ℝ) simp only [id_eq, integral_id_gaussianReal, smul_zero] at hs hf rw [hs, hf, sub_self]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.noise_contrast_mean_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianTarget.lean:66
theorem gaussianCompletion_markov

The Gaussian schedule kernel is a probability kernel. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d :
ℕ
hd :
0 < d
m :
Proof (Lean source)
-- @node: gaussianCompletion_markov lemma gaussianCompletion_markov {n d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) : IsMarkovKernel (gaussianCompletion (n := n) hd m) := by letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance have hm : Measurable m.val := m.property.1 constructor intro x have hmap : Measurable (completionSchedule hd m.val x) := by unfold completionSchedule fun_prop exact Measure.isProbabilityMeasure_map hmap.aemeasurable
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianCompletion_markov · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianTarget.lean:80
theorem integrable_gaussianCompletion_of_envelope

A noise envelope uniform in covariates gives integrability after Gaussian completion. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
f :
Covariates n d × Sched n → ℝ
hf :
g :
Sched n → ℝ
hg :
hbound :
∀ x e, ‖f (x, completionSchedule hd m.val x e)‖ ≤ g e
Integrable f (covLaw n d ⊗ₘ gaussianCompletion hd m)
Proof (Lean source)
-- @node: integrable_gaussianCompletion_of_envelope lemma integrable_gaussianCompletion_of_envelope {n d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) (f : Covariates n d × Sched n → ℝ) (hf : Measurable f) (g : Sched n → ℝ) (hg : Integrable g (noiseLaw n)) (hbound : ∀ x e, ‖f (x, completionSchedule hd m.val x e)‖ ≤ g e) : Integrable f (covLaw n d ⊗ₘ gaussianCompletion hd m) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance letI : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance letI := gaussianCompletion_markov (n := n) hd m have hm : Measurable m.val := m.property.1 have hmap (x : Covariates n d) : Measurable (completionSchedule hd m.val x) := by unfold completionSchedule fun_prop have hint (x : Covariates n d) : Integrable (fun y => f (x, y)) (gaussianCompletion hd m x) := by change Integrable (fun y => f (x, y)) ((noiseLaw n).map (completionSchedule hd m.val x)) apply (integrable_map_measure (hf.comp measurable_prodMk_left).aestronglyMeasurable (hmap x).aemeasurable).mpr exact hg.mono' ((hf.comp (measurable_const.prodMk (hmap x))).aestronglyMeasurable) (Filter.Eventually.of_forall (hbound x)) apply (Measure.integrable_compProd_iff hf.aestronglyMeasurable).mpr refine ⟨Filter.Eventually.of_forall hint, ?_⟩ apply (integrable_const (∫ e, g e ∂noiseLaw n)).mono' (hf.stronglyMeasurable.norm.integral_kernel_prod_right'.aestronglyMeasurable) filter_upwards with x rw [Real.norm_eq_abs, abs_of_nonneg (integral_nonneg (fun _ => norm_nonneg _))] change (∫ y, ‖f (x, y)‖ ∂(noiseLaw n).map (completionSchedule hd m.val x)) ≤ _ rw [integral_map (f := fun y => ‖f (x, y)‖) (hmap x).aemeasurable (show AEStronglyMeasurable (fun y => ‖f (x, y)‖) _ from (hf.comp measurable_prodMk_left).norm.aestronglyMeasurable)] exact integral_mono ((integrable_map_measure (hf.comp measurable_prodMk_left).norm.aestronglyMeasurable (hmap x).aemeasurable).mp (hint x).norm) hg (hbound x)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.integrable_gaussianCompletion_of_envelope · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianTarget.lean:93
theorem finiteATE_completionSchedule Lemma finiteATE_completionSchedule in the paper ↗

The finite-population contrast cancels the prognostic function pointwise. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
Cube d → ℝ
x :
e :
= (n : ℝ)⁻¹ * ∑ i, (tauFn hd (x i) + ((e i).2 - (e i).1))
Proof (Lean source)
-- @node: finiteATE_completionSchedule lemma finiteATE_completionSchedule {n d : ℕ} (hd : 0 < d) (m : Cube d → ℝ) (x : Covariates n d) (e : Sched n) : finiteATE (completionSchedule hd m x e) = (n : ℝ)⁻¹ * ∑ i, (tauFn hd (x i) + ((e i).2 - (e i).1)) := by unfold finiteATE completionSchedule congr 1 apply Finset.sum_congr rfl intro i hi ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteATE_completionSchedule · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianTarget.lean:131
theorem finiteATE_gaussian_integrable

The actual pre-assignment finite-population target is integrable. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
Integrable (fun ω : Covariates n d × Sched n => finiteATE ω.2) (covLaw n d ⊗ₘ gaussianCompletion hd m)
Proof (Lean source)
-- @node: finiteATE_gaussian_integrable lemma finiteATE_gaussian_integrable {n d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) : Integrable (fun ω : Covariates n d × Sched n => finiteATE ω.2) (covLaw n d ⊗ₘ gaussianCompletion hd m) := by letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance let K := |tau0| + |delta * sqrt 2| have ht (x : Cube d) : ‖tauFn hd x‖ ≤ K := by unfold tauFn K calc ‖tau0 + delta * sqrt 2 * sin (2 * pi * x ⟨0, hd⟩)‖ ≤ |tau0| + |delta * sqrt 2| * |sin (2 * pi * x ⟨0, hd⟩)| := by simpa [Real.norm_eq_abs, abs_mul] using norm_add_le tau0 (delta * sqrt 2 * sin (2 * pi * x ⟨0, hd⟩)) _ ≤ _ := by nlinarith [Real.abs_sin_le_one (2 * pi * x ⟨0, hd⟩), abs_nonneg (delta * sqrt 2)] let g := fun e : Sched n => (n : ℝ)⁻¹ * ∑ i, (K + ‖(e i).2 - (e i).1‖) have hg : Integrable g (noiseLaw n) := by apply Integrable.const_mul apply integrable_finsetSum intro i hi exact (integrable_const K).add (((noise_coordinate_integrable n i).2.sub (noise_coordinate_integrable n i).1).norm) apply integrable_gaussianCompletion_of_envelope hd m _ (by unfold finiteATE; fun_prop) g hg intro x e rw [finiteATE_completionSchedule, norm_mul, Real.norm_eq_abs, abs_of_nonneg (by positivity : 0 ≤ (n : ℝ)⁻¹)] apply mul_le_mul_of_nonneg_left _ (by positivity) exact (norm_sum_le _ _).trans (Finset.sum_le_sum (fun i hi => (norm_add_le _ _).trans (add_le_add (ht (x i)) le_rfl)))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteATE_gaussian_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianTarget.lean:143
theorem gaussianTheta_eq_tau0

Averaging the frozen Gaussian schedule gives the specified target tau0. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
0 < n
hd :
0 < d
m :
gaussianTheta (n := n) hd m = tau0
Proof (Lean source)
-- @node: gaussianTheta_eq_tau0 lemma gaussianTheta_eq_tau0 {n d : ℕ} (hn : 0 < n) (hd : 0 < d) (m : CenteredL2Fn d) : gaussianTheta (n := n) hd m = tau0 := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance letI : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance letI := gaussianCompletion_markov (n := n) hd m have hm : Measurable m.val := m.property.1 have hmap (x : Covariates n d) : Measurable (completionSchedule hd m.val x) := by unfold completionSchedule fun_prop have hinner (x : Covariates n d) : (∫ y, finiteATE y ∂gaussianCompletion hd m x) = (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) := by change (∫ y, finiteATE y ∂(noiseLaw n).map (completionSchedule hd m.val x)) = _ rw [integral_map (hmap x).aemeasurable (by unfold finiteATE; fun_prop)] simp_rw [finiteATE_completionSchedule] rw [integral_const_mul, integral_finsetSum univ (f := fun (i : Fin n) (e : Sched n) => tauFn hd (x i) + ((e i).2 - (e i).1)) (fun i _ => (integrable_const _).add ((noise_coordinate_integrable n i).2.sub (noise_coordinate_integrable n i).1))] simp_rw [integral_add (f := fun _ => tauFn hd (x _)) (g := fun e : Sched n => (e _).2 - (e _).1) (integrable_const _) ((noise_coordinate_integrable n _).2.sub (noise_coordinate_integrable n _).1), noise_contrast_mean_zero] simp unfold gaussianTheta rw [Measure.integral_compProd (finiteATE_gaussian_integrable hd m)] simp_rw [hinner] rw [integral_const_mul] unfold covLaw rw [integral_finsetSum univ (f := fun (i : Fin n) (x : Covariates n d) => tauFn hd (x i)) (fun i _ => integrable_comp_eval (μ := fun _ : Fin n => cubeMeasure d) (i := i) (tauFn_integrable hd))] have heval (i : Fin n) : (∫ x : Covariates n d, tauFn hd (x i) ∂Measure.pi (fun _ : Fin n => cubeMeasure d)) = tau0 := by rw [integral_comp_eval (μ := fun _ : Fin n => cubeMeasure d) (i := i) (tauFn_integrable hd).aestronglyMeasurable, tauFn_mean] simp_rw [heval] simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast hn.ne' field_simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianTheta_eq_tau0 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/GaussianTarget.lean:173
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.HTConditionalMoments 22 declarations The actual HT statistic decomposes into treatment effects, prognostic imbalance, and selected Gaussian noise.

Conditional Gaussian HT moments

The actual HT statistic decomposes into treatment effects, prognostic imbalance, and selected Gaussian noise. Fair full-schedule and Gaussian conditional moments supply the pointwise identities used in the joint-experiment variance calculation.

def gaussianExcessReal

[ Actual Gaussian HT excess for a fixed prognostic function.

Definition (Lean source)
n d :
ℕ
hd :
0 < d
π :
Design n d
m :
gaussianExcessReal hd π m :
ℝ
(n : ℝ) * variance (fun ω => htEstimator ω.1.2 ω.2) (experimentLaw (covLaw n d) (gaussianCompletion hd m) π.val)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianExcessReal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:20

Fixed-function Gaussian actual HT worst excess.

Definition (Lean source)
n d :
ℕ
hd :
0 < d
π :
Design n d
s :
ℝ
gaussianWorst hd π s :
ℝ≥0∞
⨆ m : {m : CenteredL2Fn d // SobolevClass d s m}, ofReal (gaussianExcessReal hd π m.val)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianWorst · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:25

Minimax Gaussian actual HT excess, with the fixed-function supremum outside sampling.

Definition (Lean source)
n d :
ℕ
hd :
0 < d
s :
ℝ
gaussianCapacity n d hd s :
ℝ≥0∞
minimaxValueENNReal (fun (π : {π : Design n d // DesignClass n d π}) (m : {m : CenteredL2Fn d // SobolevClass d s m}) => ofReal (gaussianExcessReal hd π.val m.val))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianCapacity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:29
theorem htEstimator_midpoint_decomposition

The actual HT estimator splits into the realized target and signed midpoints.](goal) This uses the stated conclusion.

Formal statement
n :
ℕ
y :
z :
htEstimator y z = finiteATE y + (2 / (n : ℝ)) * ∑ i, sgn (z i) * prognosis y i
Proof (Lean source)
-- @node: htEstimator_midpoint_decomposition lemma htEstimator_midpoint_decomposition {n : ℕ} (y : Sched n) (z : Signs n) : htEstimator y z = finiteATE y + (2 / (n : ℝ)) * ∑ i, sgn (z i) * prognosis y i := by have hunit (i : Fin n) : 2 * (sgn (z i) * (if z i then (y i).2 else (y i).1)) = ((y i).2 - (y i).1) + 2 * (sgn (z i) * prognosis y i) := by cases z i <;> simp [sgn, prognosis] <;> ring unfold htEstimator finiteATE calc (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (y i).2 else (y i).1) = (n : ℝ)⁻¹ * ∑ i, 2 * (sgn (z i) * (if z i then (y i).2 else (y i).1)) := by rw [← Finset.mul_sum] ring _ = (n : ℝ)⁻¹ * ∑ i, (((y i).2 - (y i).1) + 2 * (sgn (z i) * prognosis y i)) := by simp_rw [hunit] _ = _ := by rw [Finset.sum_add_distrib, ← Finset.mul_sum]; ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.htEstimator_midpoint_decomposition · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:36
theorem htEstimator_completion_decomposition

Substituting the causal completion gives the sample-average treatment effect, prognostic imbalance, and selected Gaussian-noise contribution in the roadmap. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d :
ℕ
hd :
0 < d
m :
Cube d → ℝ
x :
e :
z :
= (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i)
+ (2 / (n : ℝ)) * ∑ i, sgn (z i) * m (x i)
+ (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1)
Proof (Lean source)
-- @node: htEstimator_completion_decomposition lemma htEstimator_completion_decomposition {n d : ℕ} (hd : 0 < d) (m : Cube d → ℝ) (x : Covariates n d) (e : Sched n) (z : Signs n) : htEstimator (completionSchedule hd m x e) z = (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) + (2 / (n : ℝ)) * ∑ i, sgn (z i) * m (x i) + (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1) := by have hunit (i : Fin n) : 2 * (sgn (z i) * (if z i then (completionSchedule hd m x e i).2 else (completionSchedule hd m x e i).1)) = tauFn hd (x i) + 2 * (sgn (z i) * m (x i)) + 2 * (sgn (z i) * (if z i then (e i).2 else (e i).1)) := by cases z i <;> simp [sgn, completionSchedule] <;> ring unfold htEstimator calc (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (completionSchedule hd m x e i).2 else (completionSchedule hd m x e i).1) = (n : ℝ)⁻¹ * ∑ i, 2 * (sgn (z i) * (if z i then (completionSchedule hd m x e i).2 else (completionSchedule hd m x e i).1)) := by rw [← Finset.mul_sum] ring _ = _ := by simp_rw [hunit] rw [Finset.sum_add_distrib, Finset.sum_add_distrib, ← Finset.mul_sum, ← Finset.mul_sum] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.htEstimator_completion_decomposition · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:56
theorem midpoint_sum_mean_zero

Under a fair finite sign law the signed midpoint sum has expectation zero. Under the stated conditions.

Formal statement
n :
ℕ
hfair :
∀ i, ∫ z, sgn (z i) ∂μ = 0
y :
(∫ z, ∑ i, sgn (z i) * prognosis y i ∂μ) = 0
Proof (Lean source)
-- @node: midpoint_sum_mean_zero lemma midpoint_sum_mean_zero {n : ℕ} (μ : Measure (Signs n)) [IsProbabilityMeasure μ] (hfair : ∀ i, ∫ z, sgn (z i) ∂μ = 0) (y : Sched n) : (∫ z, ∑ i, sgn (z i) * prognosis y i ∂μ) = 0 := by rw [integral_finsetSum _ (fun i _ => Integrable.of_finite)] simp_rw [integral_mul_const, hfair, zero_mul] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.midpoint_sum_mean_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:87
theorem htEstimator_integral_of_fair

Fairness gives fixed-schedule HT unbiasedness for an arbitrary dependent sign law. Under the stated conditions.

Formal statement
n :
ℕ
hfair :
∀ i, ∫ z, sgn (z i) ∂μ = 0
y :
(∫ z, htEstimator y z ∂μ) = finiteATE y
Proof (Lean source)
-- @node: htEstimator_integral_of_fair lemma htEstimator_integral_of_fair {n : ℕ} (μ : Measure (Signs n)) [IsProbabilityMeasure μ] (hfair : ∀ i, ∫ z, sgn (z i) ∂μ = 0) (y : Sched n) : (∫ z, htEstimator y z ∂μ) = finiteATE y := by simp_rw [htEstimator_midpoint_decomposition] rw [integral_add (integrable_const _) (Integrable.of_finite), integral_const, integral_const_mul, midpoint_sum_mean_zero μ hfair y] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.htEstimator_integral_of_fair · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:96
theorem midpoint_sum_second_moment

Expanding the signed midpoint square yields the full double covariance sum. The asserted mathematical result follows.

Formal statement
n :
ℕ
y :
(∫ z, (∑ i, sgn (z i) * prognosis y i) ^ 2 ∂μ)
= ∑ i, ∑ j, prognosis y i * (∫ z, sgn (z i) * sgn (z j) ∂μ) * prognosis y j
Proof (Lean source)
-- @node: midpoint_sum_second_moment lemma midpoint_sum_second_moment {n : ℕ} (μ : Measure (Signs n)) [IsProbabilityMeasure μ] (y : Sched n) : (∫ z, (∑ i, sgn (z i) * prognosis y i) ^ 2 ∂μ) = ∑ i, ∑ j, prognosis y i * (∫ z, sgn (z i) * sgn (z j) ∂μ) * prognosis y j := by have hexpand (z : Signs n) : (∑ i, sgn (z i) * prognosis y i) ^ 2 = ∑ i, ∑ j, prognosis y i * (sgn (z i) * sgn (z j)) * prognosis y j := by rw [pow_two, Finset.sum_mul] apply Finset.sum_congr rfl intro i hi rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j hj ring simp_rw [hexpand] rw [integral_finsetSum _ (fun i _ => Integrable.of_finite)] apply Finset.sum_congr rfl intro i hi rw [integral_finsetSum _ (fun j _ => Integrable.of_finite)] simp_rw [integral_mul_const, integral_const_mul]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.midpoint_sum_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:106
theorem htEstimator_variance_of_fair

The exact fixed-schedule HT covariance identity uses fairness but no independence between the assignment coordinates. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d :
ℕ
hn :
0 < n
π :
Design n d
x :
hfair :
∀ i, ∫ z, sgn (z i) ∂π.val x = 0
y :
(n : ℝ) * variance (htEstimator y) (π.val x)
= (4 / (n : ℝ)) * ∑ i, ∑ j, prognosis y i * assignCov π x i j * prognosis y j
Proof (Lean source)
-- @node: htEstimator_variance_of_fair lemma htEstimator_variance_of_fair {n d : ℕ} (hn : 0 < n) (π : Design n d) (x : Covariates n d) (hfair : ∀ i, ∫ z, sgn (z i) ∂π.val x = 0) (y : Sched n) : (n : ℝ) * variance (htEstimator y) (π.val x) = (4 / (n : ℝ)) * ∑ i, ∑ j, prognosis y i * assignCov π x i j * prognosis y j := by let : IsMarkovKernel π.val := π.property have hmeas : Measurable (htEstimator y) := by fun_prop rw [variance_eq_integral hmeas.aemeasurable, htEstimator_integral_of_fair _ hfair y] have hcenter (z : Signs n) : (htEstimator y z - finiteATE y) ^ 2 = (2 / (n : ℝ)) ^ 2 * (∑ i, sgn (z i) * prognosis y i) ^ 2 := by rw [htEstimator_midpoint_decomposition] ring simp_rw [hcenter] rw [integral_const_mul, midpoint_sum_second_moment] simp only [assignCov, hfair, zero_mul, sub_zero] have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast hn.ne' field_simp ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.htEstimator_variance_of_fair · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:128
theorem ht_conditional_transfer

Conditional on any realized schedule, a fair original-sample design is unbiased and has the exact midpoint covariance quadratic form. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
0 < n
π :
Design n d
hfair :
FairKernel π.val
∀ᵐ x ∂covLaw n d, ∀ y : Sched n, (∫ z, htEstimator y z ∂π.val x)
= finiteATE y ∧
(n : ℝ) * variance (htEstimator y) (π.val x)
= (4 / (n : ℝ)) * ∑ i, ∑ j, prognosis y i * assignCov π x i j * prognosis y j
Proof (Lean source)
-- @node: ht_conditional_transfer lemma ht_conditional_transfer {n d : ℕ} (hn : 0 < n) (π : Design n d) (hfair : FairKernel π.val) : ∀ᵐ x ∂covLaw n d, ∀ y : Sched n, (∫ z, htEstimator y z ∂π.val x) = finiteATE y ∧ (n : ℝ) * variance (htEstimator y) (π.val x) = (4 / (n : ℝ)) * ∑ i, ∑ j, prognosis y i * assignCov π x i j * prognosis y j := by let : IsMarkovKernel π.val := π.property filter_upwards [hfair] with x hx intro y exact ⟨htEstimator_integral_of_fair (π.val x) hx y, htEstimator_variance_of_fair hn π x hx y⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_conditional_transfer · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:150
theorem signed_sum_sq_le

Cauchy–Schwarz bounds every signed sum by the sum of the unitwise squares. The asserted mathematical result follows.

Formal statement
n :
ℕ
z :
u :
Fin n → ℝ
(∑ i, sgn (z i) * u i) ^ 2 ≤ (n : ℝ) * ∑ i, (u i) ^ 2
Proof (Lean source)
-- @node: signed_sum_sq_le lemma signed_sum_sq_le {n : ℕ} (z : Signs n) (u : Fin n → ℝ) : (∑ i, sgn (z i) * u i) ^ 2 ≤ (n : ℝ) * ∑ i, (u i) ^ 2 := by have h := sq_sum_le_card_mul_sum_sq (s := univ) (f := fun i => sgn (z i) * u i) have hs (i : Fin n) : (sgn (z i) * u i) ^ 2 = (u i) ^ 2 := by cases z i <;> simp [sgn] simpa only [hs, Finset.card_univ, Fintype.card_fin] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signed_sum_sq_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:165
theorem loss_lt_top_of_memLp

Square-integrable prognosis has finite imbalance loss for every Markov design. The bound is uniform over all sign laws and does not require fairness.

Formal statement
n d :
ℕ
π :
Design n d
m :
loss π m.val < ⊤
Proof (Lean source)
-- @node: loss_lt_top_of_memLp lemma loss_lt_top_of_memLp {n d : ℕ} (π : Design n d) (m : CenteredL2Fn d) : loss π m.val < ⊤ := by let : IsMarkovKernel π.val := π.property let : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ let : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance have hi (i : Fin n) : Integrable (fun x : Covariates n d => m.val (x i) ^ 2) (covLaw n d) := (m.property.2.1.comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => cubeMeasure d) i)).integrable_sq have hb : Integrable (fun x : Covariates n d => (n : ℝ) * ∑ i, m.val (x i) ^ 2) (covLaw n d) := (integrable_finsetSum univ (fun i _ => hi i)).const_mul _ have hfinite : (∫⁻ x : Covariates n d, ofReal ((n : ℝ) * ∑ i, m.val (x i) ^ 2) ∂covLaw n d) < ⊤ := (hasFiniteIntegral_iff_ofReal (Filter.Eventually.of_forall (fun x => by positivity))).mp hb.2 unfold loss apply ENNReal.mul_lt_top ENNReal.ofReal_lt_top apply lt_of_le_of_lt _ hfinite apply lintegral_mono intro x calc (∫⁻ z, ofReal ((∑ i, sgn (z i) * m.val (x i)) ^ 2) ∂π.val x) ≤ ∫⁻ _z, ofReal ((n : ℝ) * ∑ i, m.val (x i) ^ 2) ∂π.val x := lintegral_mono (fun z => ENNReal.ofReal_le_ofReal (signed_sum_sq_le z _)) _ = _ := by simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.loss_lt_top_of_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:175
theorem ht_completion_noise_memLp

For a fixed covariate array and assignment, the completed HT statistic has finite second moment over the pre-assignment Gaussian noise. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d :
ℕ
hd :
0 < d
m :
Cube d → ℝ
x :
z :
MemLp (fun e => htEstimator (completionSchedule hd m x e) z) 2 (noiseLaw n)
Proof (Lean source)
-- @node: ht_completion_noise_memLp lemma ht_completion_noise_memLp {n d : ℕ} (hd : 0 < d) (m : Cube d → ℝ) (x : Covariates n d) (z : Signs n) : MemLp (fun e => htEstimator (completionSchedule hd m x e) z) 2 (noiseLaw n) := by letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance simp_rw [htEstimator_completion_decomposition] exact (memLp_const ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) + (2 / (n : ℝ)) * ∑ i, sgn (z i) * m (x i))).add (selected_noise_memLp z)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_completion_noise_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:206
theorem ht_completion_noise_mean

Averaging the actual completed HT statistic over noise leaves precisely the sample treatment effect and the signed prognostic imbalance. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
Cube d → ℝ
x :
z :
(∫ e, htEstimator (completionSchedule hd m x e) z ∂noiseLaw n)
= (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) + (2 / (n : ℝ)) * ∑ i, sgn (z i) * m (x i)
Proof (Lean source)
-- @node: ht_completion_noise_mean lemma ht_completion_noise_mean {n d : ℕ} (hd : 0 < d) (m : Cube d → ℝ) (x : Covariates n d) (z : Signs n) : (∫ e, htEstimator (completionSchedule hd m x e) z ∂noiseLaw n) = (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) + (2 / (n : ℝ)) * ∑ i, sgn (z i) * m (x i) := by letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance simp_rw [htEstimator_completion_decomposition] rw [integral_add (integrable_const _) ((selected_noise_memLp z).integrable (by norm_num)), integral_const, selected_noise_mean] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_completion_noise_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:217
theorem ht_completion_noise_variance

Conditional on the original covariates and signs, the only remaining variance of the completed HT statistic is the selected-noise variance, four over n. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
Cube d → ℝ
x :
z :
variance (fun e => htEstimator (completionSchedule hd m x e) z) (noiseLaw n) = 4 / (n : ℝ)
Proof (Lean source)
-- @node: ht_completion_noise_variance lemma ht_completion_noise_variance {n d : ℕ} (hd : 0 < d) (m : Cube d → ℝ) (x : Covariates n d) (z : Signs n) : variance (fun e => htEstimator (completionSchedule hd m x e) z) (noiseLaw n) = 4 / (n : ℝ) := by letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance simp_rw [htEstimator_completion_decomposition] rw [variance_const_add (selected_noise_memLp z).aestronglyMeasurable, selected_noise_variance]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_completion_noise_variance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:231
theorem ht_completion_noise_centered_second_moment

Centering by any deterministic target, the conditional Gaussian second moment is the squared conditional bias plus four over n. This directly removes both noise cross terms in the HT roadmap. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
Cube d → ℝ
x :
z :
c :
ℝ
(∫ e, (htEstimator (completionSchedule hd m x e) z - c) ^ 2 ∂noiseLaw n)
= ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) + (2 / (n : ℝ)) * ∑ i, sgn (z i) * m (x i) - c) ^ 2
+ 4 / (n : ℝ)
Proof (Lean source)
-- @node: ht_completion_noise_centered_second_moment lemma ht_completion_noise_centered_second_moment {n d : ℕ} (hd : 0 < d) (m : Cube d → ℝ) (x : Covariates n d) (z : Signs n) (c : ℝ) : (∫ e, (htEstimator (completionSchedule hd m x e) z - c) ^ 2 ∂noiseLaw n) = ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) + (2 / (n : ℝ)) * ∑ i, sgn (z i) * m (x i) - c) ^ 2 + 4 / (n : ℝ) := by letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance let A := (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) + (2 / (n : ℝ)) * ∑ i, sgn (z i) * m (x i) - c let U := fun e : Sched n => (2 / (n : ℝ)) * ∑ i, sgn (z i) * (if z i then (e i).2 else (e i).1) have hU : MemLp U 2 (noiseLaw n) := selected_noise_memLp z have hexpand (e : Sched n) : (htEstimator (completionSchedule hd m x e) z - c) ^ 2 = A ^ 2 + 2 * A * U e + (U e) ^ 2 := by rw [htEstimator_completion_decomposition] dsimp [A, U] ring simp_rw [hexpand] have hlin : Integrable (fun e => 2 * A * U e) (noiseLaw n) := (hU.integrable (by norm_num)).const_mul (2 * A) have hadd : Integrable (fun e => A ^ 2 + 2 * A * U e) (noiseLaw n) := (integrable_const (A ^ 2)).add hlin rw [integral_add hadd hU.integrable_sq, integral_add (integrable_const (A ^ 2)) hlin, integral_const, integral_const_mul] change _ + 2 * A * (∫ e, U e ∂noiseLaw n) + (∫ e, (U e) ^ 2 ∂noiseLaw n) = _ rw [show (∫ e, U e ∂noiseLaw n) = 0 from selected_noise_mean z, show (∫ e, (U e) ^ 2 ∂noiseLaw n) = 4 / (n : ℝ) from selected_noise_second_moment z] simp [A]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_completion_noise_centered_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:243
theorem signed_prognosis_mean_zero

Fair assignment removes the covariance between any fixed covariate statistic and its signed prognostic imbalance. No independence between signs is needed. Under the stated conditions.

Formal statement
n :
ℕ
hfair :
∀ i, ∫ z, sgn (z i) ∂μ = 0
u :
Fin n → ℝ
(∫ z, ∑ i, sgn (z i) * u i ∂μ) = 0
Proof (Lean source)
-- @node: signed_prognosis_mean_zero lemma signed_prognosis_mean_zero {n : ℕ} (μ : Measure (Signs n)) [IsProbabilityMeasure μ] (hfair : ∀ i, ∫ z, sgn (z i) ∂μ = 0) (u : Fin n → ℝ) : (∫ z, ∑ i, sgn (z i) * u i ∂μ) = 0 := by rw [integral_finsetSum _ (fun i _ => Integrable.of_finite)] simp_rw [integral_mul_const, hfair, zero_mul] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signed_prognosis_mean_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:278
theorem ht_completion_fair_centered_second_moment

Integrating the conditional noise second moment against a fair assignment law leaves the treatment-effect square, the imbalance square, and four over n. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
Cube d → ℝ
x :
hfair :
∀ i, ∫ z, sgn (z i) ∂μ = 0
c :
ℝ
(∫ z, ∫ e, (htEstimator (completionSchedule hd m x e) z - c) ^ 2 ∂noiseLaw n ∂μ)
= ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - c) ^ 2
+ (2 / (n : ℝ)) ^ 2 * (∫ z, (∑ i, sgn (z i) * m (x i)) ^ 2 ∂μ)
+ 4 / (n : ℝ)
Proof (Lean source)
-- @node: ht_completion_fair_centered_second_moment lemma ht_completion_fair_centered_second_moment {n d : ℕ} (hd : 0 < d) (m : Cube d → ℝ) (x : Covariates n d) (μ : Measure (Signs n)) [IsProbabilityMeasure μ] (hfair : ∀ i, ∫ z, sgn (z i) ∂μ = 0) (c : ℝ) : (∫ z, ∫ e, (htEstimator (completionSchedule hd m x e) z - c) ^ 2 ∂noiseLaw n ∂μ) = ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - c) ^ 2 + (2 / (n : ℝ)) ^ 2 * (∫ z, (∑ i, sgn (z i) * m (x i)) ^ 2 ∂μ) + 4 / (n : ℝ) := by simp_rw [ht_completion_noise_centered_second_moment] let A := (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - c let S := fun z : Signs n => ∑ i, sgn (z i) * m (x i) have hexpand (z : Signs n) : ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) + (2 / (n : ℝ)) * S z - c) ^ 2 + 4 / (n : ℝ) = (A ^ 2 + (2 * A * (2 / (n : ℝ))) * S z + (2 / (n : ℝ)) ^ 2 * (S z) ^ 2) + 4 / (n : ℝ) := by dsimp [A] ring change (∫ z, ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) + (2 / (n : ℝ)) * S z - c) ^ 2 + 4 / (n : ℝ) ∂μ) = _ simp_rw [hexpand] rw [integral_add Integrable.of_finite (integrable_const _), integral_add Integrable.of_finite Integrable.of_finite, integral_add (integrable_const _) Integrable.of_finite, integral_const, integral_const, integral_const_mul, integral_const_mul, show (∫ z, S z ∂μ) = 0 from signed_prognosis_mean_zero μ hfair _] simp [A, S]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_completion_fair_centered_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:288
theorem htEstimator_schedule_measurable

[ The actual HT statistic is Borel in the full schedule for each fixed assignment. This uses the stated conclusion.

Formal statement
n :
ℕ
z :
Measurable (fun y : Sched n => htEstimator y z)
Proof (Lean source)
-- @node: htEstimator_schedule_measurable @[fun_prop] lemma htEstimator_schedule_measurable {n : ℕ} (z : Signs n) : Measurable (fun y : Sched n => htEstimator y z) := by unfold htEstimator apply measurable_const.mul apply Finset.measurable_sum intro i _ cases hz : z i <;> simp only [hz, Bool.false_eq_true, if_false, if_true] all_goals fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.htEstimator_schedule_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:319
theorem finite_sign_integral_swap Lemma finite_sign_integral_swap in the paper ↗

A finite assignment space permits exchanging assignment and noise integrals once each fixed-assignment noise statistic is integrable.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n :
ℕ
E :
ν :
f :
E → Signs n → ℝ
hf :
∀ z, Integrable (fun e => f e z) ν
(∫ e, ∫ z, f e z ∂μ ∂ν) = ∫ z, ∫ e, f e z ∂ν ∂μ
Proof (Lean source)
-- @node: finite_sign_integral_swap lemma finite_sign_integral_swap {n : ℕ} {E : Type*} [MeasurableSpace E] (ν : Measure E) (μ : Measure (Signs n)) [IsFiniteMeasure μ] (f : E → Signs n → ℝ) (hf : ∀ z, Integrable (fun e => f e z) ν) : (∫ e, ∫ z, f e z ∂μ ∂ν) = ∫ z, ∫ e, f e z ∂ν ∂μ := by simp_rw [integral_fintype (Integrable.of_finite (μ := μ))] have hterm (z : Signs n) : Integrable (fun e => μ.real {z} • f e z) ν := (hf z).smul (μ.real {z}) rw [integral_finsetSum _ (fun z _ => hterm z)] simp_rw [integral_smul]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_sign_integral_swap · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:330
theorem ht_gaussian_kernel_mean

For a realized original sample, integrating the actual pre-assignment schedule kernel and then any fair assignment kernel gives the sample treatment-effect mean. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
x :
hfair :
∀ i, ∫ z, sgn (z i) ∂μ = 0
(∫ y, ∫ z, htEstimator y z ∂μ ∂gaussianCompletion hd m x)
= (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i)
Proof (Lean source)
-- @node: ht_gaussian_kernel_mean lemma ht_gaussian_kernel_mean {n d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) (x : Covariates n d) (μ : Measure (Signs n)) [IsProbabilityMeasure μ] (hfair : ∀ i, ∫ z, sgn (z i) ∂μ = 0) : (∫ y, ∫ z, htEstimator y z ∂μ ∂gaussianCompletion hd m x) = (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) := by letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance change (∫ y, ∫ z, htEstimator y z ∂μ ∂(noiseLaw n).map (completionSchedule hd m.val x)) = _ have hcompletion : Measurable (completionSchedule hd m.val x) := by unfold completionSchedule tauFn fun_prop have hinner : AEStronglyMeasurable (fun y : Sched n => ∫ z, htEstimator y z ∂μ) ((noiseLaw n).map (completionSchedule hd m.val x)) := by simp_rw [integral_fintype (Integrable.of_finite (μ := μ))] apply Measurable.aestronglyMeasurable apply Finset.measurable_sum intro z _ fun_prop rw [integral_map hcompletion.aemeasurable hinner] rw [finite_sign_integral_swap (noiseLaw n) μ _ (fun z => (ht_completion_noise_memLp hd m.val x z).integrable (by norm_num))] simp_rw [ht_completion_noise_mean] rw [integral_add (integrable_const _) Integrable.of_finite, integral_const, integral_const_mul, signed_prognosis_mean_zero μ hfair] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_gaussian_kernel_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:343
theorem ht_gaussian_kernel_centered_second_moment

The conditional full-schedule Gaussian kernel has the exact centered second moment used by the HT transfer, with no hidden conditional moment assumption. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
x :
hfair :
∀ i, ∫ z, sgn (z i) ∂μ = 0
c :
ℝ
(∫ y, ∫ z, (htEstimator y z - c) ^ 2 ∂μ ∂gaussianCompletion hd m x)
= ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - c) ^ 2
+ (2 / (n : ℝ)) ^ 2 * (∫ z, (∑ i, sgn (z i) * m.val (x i)) ^ 2 ∂μ)
+ 4 / (n : ℝ)
Proof (Lean source)
-- @node: ht_gaussian_kernel_centered_second_moment lemma ht_gaussian_kernel_centered_second_moment {n d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) (x : Covariates n d) (μ : Measure (Signs n)) [IsProbabilityMeasure μ] (hfair : ∀ i, ∫ z, sgn (z i) ∂μ = 0) (c : ℝ) : (∫ y, ∫ z, (htEstimator y z - c) ^ 2 ∂μ ∂gaussianCompletion hd m x) = ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - c) ^ 2 + (2 / (n : ℝ)) ^ 2 * (∫ z, (∑ i, sgn (z i) * m.val (x i)) ^ 2 ∂μ) + 4 / (n : ℝ) := by letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance change (∫ y, ∫ z, (htEstimator y z - c) ^ 2 ∂μ ∂(noiseLaw n).map (completionSchedule hd m.val x)) = _ have hcompletion : Measurable (completionSchedule hd m.val x) := by unfold completionSchedule tauFn fun_prop have hinner : AEStronglyMeasurable (fun y : Sched n => ∫ z, (htEstimator y z - c) ^ 2 ∂μ) ((noiseLaw n).map (completionSchedule hd m.val x)) := by simp_rw [integral_fintype (Integrable.of_finite (μ := μ))] apply Measurable.aestronglyMeasurable apply Finset.measurable_sum intro z _ fun_prop rw [integral_map hcompletion.aemeasurable hinner] have hint (z : Signs n) : Integrable (fun e => (htEstimator (completionSchedule hd m.val x e) z - c) ^ 2) (noiseLaw n) := ((ht_completion_noise_memLp hd m.val x z).sub (memLp_const c)).integrable_sq rw [finite_sign_integral_swap (noiseLaw n) μ _ hint] exact ht_completion_fair_centered_second_moment hd m.val x μ hfair c
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_gaussian_kernel_centered_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTConditionalMoments.lean:372
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.HTTransfer 12 declarations The conditional moments integrate over the original covariates to give the actual HT mean, finite second moment, and exact excess-variance identity.

Gaussian HT joint-experiment variance transfer

The conditional moments integrate over the original covariates to give the actual HT mean, finite second moment, and exact excess-variance identity.

theorem tauFn_sampleMean_memLp

The sample-average treatment effect has a finite second moment. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
MemLp (fun x : Covariates n d => (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i)) 2 (covLaw n d)
Proof (Lean source)
-- @node: tauFn_sampleMean_memLp lemma tauFn_sampleMean_memLp {n d : ℕ} (hd : 0 < d) : MemLp (fun x : Covariates n d => (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i)) 2 (covLaw n d) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance have hi (i : Fin n) : MemLp (fun x : Covariates n d => tauFn hd (x i)) 2 (covLaw n d) := (tauFn_memLp hd).comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => cubeMeasure d) i) simpa only [Finset.sum_apply] using (memLp_finsetSum' univ (fun i _ => hi i)).const_mul (n : ℝ)⁻¹
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.tauFn_sampleMean_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:16
theorem tauFn_sampleMean_mean

Averaging the independent uniform units preserves the population treatment mean. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
0 < n
hd :
0 < d
(∫ x : Covariates n d, (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) ∂covLaw n d) = tau0
Proof (Lean source)
-- @node: tauFn_sampleMean_mean lemma tauFn_sampleMean_mean {n d : ℕ} (hn : 0 < n) (hd : 0 < d) : (∫ x : Covariates n d, (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) ∂covLaw n d) = tau0 := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance have hi (i : Fin n) : Integrable (fun x : Covariates n d => tauFn hd (x i)) (covLaw n d) := (measurePreserving_eval (fun _ : Fin n => cubeMeasure d) i).integrable_comp_of_integrable (tauFn_integrable hd) rw [integral_const_mul, integral_finsetSum _ (fun i _ => hi i)] have heval (i : Fin n) : (∫ x : Covariates n d, tauFn hd (x i) ∂covLaw n d) = tau0 := by unfold covLaw rw [integral_comp_eval (μ := fun _ : Fin n => cubeMeasure d) (i := i) (tauFn_integrable hd).aestronglyMeasurable, tauFn_mean hd] simp only [heval, Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast hn.ne' field_simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.tauFn_sampleMean_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:31
theorem tauFn_sampleMean_centered_second_moment

The centered sample treatment-effect square contributes delta squared over n. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
0 < n
hd :
0 < d
(∫ x : Covariates n d, ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - tau0) ^ 2 ∂covLaw n d)
= delta ^ 2 / n
Proof (Lean source)
-- @node: tauFn_sampleMean_centered_second_moment lemma tauFn_sampleMean_centered_second_moment {n d : ℕ} (hn : 0 < n) (hd : 0 < d) : (∫ x : Covariates n d, ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - tau0) ^ 2 ∂covLaw n d) = delta ^ 2 / n := by have h := tauFn_sampleMean_variance (n := n) hd rw [variance_eq_integral (tauFn_sampleMean_memLp hd).aemeasurable, tauFn_sampleMean_mean hn hd] at h exact h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.tauFn_sampleMean_centered_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:52
theorem imbalance_kernel_second_moment_integrable

The conditional imbalance second moment is integrable over original samples. The asserted mathematical result follows.

Formal statement
n d :
ℕ
π :
Design n d
m :
Integrable (fun x : Covariates n d => ∫ z, (∑ i, sgn (z i) * m.val (x i)) ^ 2 ∂π.val x) (covLaw n d)
Proof (Lean source)
-- @node: imbalance_kernel_second_moment_integrable lemma imbalance_kernel_second_moment_integrable {n d : ℕ} (π : Design n d) (m : CenteredL2Fn d) : Integrable (fun x : Covariates n d => ∫ z, (∑ i, sgn (z i) * m.val (x i)) ^ 2 ∂π.val x) (covLaw n d) := by letI : IsMarkovKernel π.val := π.property letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance have hm : Measurable m.val := m.property.1 have hi (i : Fin n) : Integrable (fun x : Covariates n d => m.val (x i) ^ 2) (covLaw n d) := (m.property.2.1.comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => cubeMeasure d) i)).integrable_sq have hb : Integrable (fun x : Covariates n d => (n : ℝ) * ∑ i, m.val (x i) ^ 2) (covLaw n d) := (integrable_finsetSum univ (fun i _ => hi i)).const_mul _ have hf : Measurable (fun ω : Covariates n d × Signs n => (∑ i, sgn (ω.2 i) * m.val (ω.1 i)) ^ 2) := by fun_prop apply hb.mono' hf.stronglyMeasurable.integral_kernel_prod_right'.aestronglyMeasurable filter_upwards with x rw [Real.norm_eq_abs, abs_of_nonneg (integral_nonneg (fun _ => sq_nonneg _))] calc _ ≤ ∫ _z : Signs n, (n : ℝ) * ∑ i, m.val (x i) ^ 2 ∂π.val x := integral_mono Integrable.of_finite (integrable_const _) (fun z => signed_sum_sq_le z _) _ = _ := by simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.imbalance_kernel_second_moment_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:62
theorem loss_toReal_eq_kernel_second_moment

Taking the real value of the loss gives its iterated real second moment.

Formal statement
n d :
ℕ
π :
Design n d
m :
(loss π m.val).toReal
= (4 / (n : ℝ)) * ∫ x : Covariates n d, ∫ z, (∑ i, sgn (z i) * m.val (x i)) ^ 2 ∂π.val x ∂covLaw n d
Proof (Lean source)
-- @node: loss_toReal_eq_kernel_second_moment lemma loss_toReal_eq_kernel_second_moment {n d : ℕ} (π : Design n d) (m : CenteredL2Fn d) : (loss π m.val).toReal = (4 / (n : ℝ)) * ∫ x : Covariates n d, ∫ z, (∑ i, sgn (z i) * m.val (x i)) ^ 2 ∂π.val x ∂covLaw n d := by letI : IsMarkovKernel π.val := π.property have hnonneg (x : Covariates n d) : 0 ≤ ∫ z, (∑ i, sgn (z i) * m.val (x i)) ^ 2 ∂π.val x := integral_nonneg (fun _ => sq_nonneg _) have hinner (x : Covariates n d) : (∫⁻ z, ofReal ((∑ i, sgn (z i) * m.val (x i)) ^ 2) ∂π.val x) = ofReal (∫ z, (∑ i, sgn (z i) * m.val (x i)) ^ 2 ∂π.val x) := (ofReal_integral_eq_lintegral_ofReal Integrable.of_finite (Filter.Eventually.of_forall (fun _ => sq_nonneg _))).symm unfold loss simp_rw [hinner] rw [← ofReal_integral_eq_lintegral_ofReal (imbalance_kernel_second_moment_integrable π m) (Filter.Eventually.of_forall hnonneg), ENNReal.toReal_mul, ENNReal.toReal_ofReal (by positivity), ENNReal.toReal_ofReal (integral_nonneg hnonneg)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.loss_toReal_eq_kernel_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:91
theorem ht_gaussian_outer_centered_second_moment

Integrating the fair conditional Gaussian square over covariates yields exactly its treatment variation, prognostic loss, and selected-noise contribution. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d :
ℕ
hn :
0 < n
hd :
0 < d
m :
π :
Design n d
hfair :
FairKernel π.val
(∫ x : Covariates n d, ∫ y, ∫ z, (htEstimator y z - tau0) ^ 2 ∂π.val x ∂gaussianCompletion hd m x ∂covLaw n d)
= delta ^ 2 / n + (loss π m.val).toReal / n + 4 / n
Proof (Lean source)
-- @node: ht_gaussian_outer_centered_second_moment lemma ht_gaussian_outer_centered_second_moment {n d : ℕ} (hn : 0 < n) (hd : 0 < d) (m : CenteredL2Fn d) (π : Design n d) (hfair : FairKernel π.val) : (∫ x : Covariates n d, ∫ y, ∫ z, (htEstimator y z - tau0) ^ 2 ∂π.val x ∂gaussianCompletion hd m x ∂covLaw n d) = delta ^ 2 / n + (loss π m.val).toReal / n + 4 / n := by letI : IsMarkovKernel π.val := π.property letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance letI : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance have heq : (∫ x : Covariates n d, ∫ y, ∫ z, (htEstimator y z - tau0) ^ 2 ∂π.val x ∂gaussianCompletion hd m x ∂covLaw n d) = ∫ x : Covariates n d, (((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - tau0) ^ 2 + (2 / (n : ℝ)) ^ 2 * (∫ z, (∑ i, sgn (z i) * m.val (x i)) ^ 2 ∂π.val x)) + 4 / (n : ℝ) ∂covLaw n d := by apply integral_congr_ae filter_upwards [hfair] with x hx exact ht_gaussian_kernel_centered_second_moment hd m x (π.val x) hx tau0 rw [heq] have hA : Integrable (fun x : Covariates n d => ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - tau0) ^ 2) (covLaw n d) := ((tauFn_sampleMean_memLp (n := n) hd).sub (memLp_const tau0)).integrable_sq have hS := (imbalance_kernel_second_moment_integrable π m).const_mul ((2 / (n : ℝ)) ^ 2) have hAS : Integrable (fun x : Covariates n d => ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - tau0) ^ 2 + (2 / (n : ℝ)) ^ 2 * (∫ z, (∑ i, sgn (z i) * m.val (x i)) ^ 2 ∂π.val x)) (covLaw n d) := hA.add hS rw [integral_add hAS (integrable_const _), integral_add hA hS, integral_const, integral_const_mul, tauFn_sampleMean_centered_second_moment hn hd, loss_toReal_eq_kernel_second_moment] simp only [probReal_univ, one_smul] have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast hn.ne' field_simp <;> ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_gaussian_outer_centered_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:115
theorem htEstimator_joint_measurable

[ The finite assignment space makes the actual statistic jointly Borel. This uses the stated conclusion.

Formal statement
n :
ℕ
Measurable (fun ω : Sched n × Signs n => htEstimator ω.1 ω.2)
Proof (Lean source)
-- @node: htEstimator_joint_measurable @[fun_prop] lemma htEstimator_joint_measurable {n : ℕ} : Measurable (fun ω : Sched n × Signs n => htEstimator ω.1 ω.2) := by apply measurable_from_prod_countable_left intro z exact htEstimator_schedule_measurable z
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.htEstimator_joint_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:155
theorem ht_gaussian_schedule_centered_square_integrable

Each fixed assignment has an integrable centered square under its Gaussian schedule.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n d :
ℕ
hd :
0 < d
m :
x :
z :
Integrable (fun y => (htEstimator y z - tau0) ^ 2) (gaussianCompletion hd m x)
Proof (Lean source)
-- @node: ht_gaussian_schedule_centered_square_integrable lemma ht_gaussian_schedule_centered_square_integrable {n d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) (x : Covariates n d) (z : Signs n) : Integrable (fun y => (htEstimator y z - tau0) ^ 2) (gaussianCompletion hd m x) := by letI : IsProbabilityMeasure (noiseLaw n) := by unfold noiseLaw; infer_instance change Integrable _ ((noiseLaw n).map (completionSchedule hd m.val x)) have hm : Measurable (completionSchedule hd m.val x) := by unfold completionSchedule fun_prop apply (integrable_map_measure (by fun_prop) hm.aemeasurable).mpr exact ((ht_completion_noise_memLp hd m.val x z).sub (memLp_const tau0)).integrable_sq
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_gaussian_schedule_centered_square_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:163
theorem ht_gaussian_joint_centered_square_integrable

The actual joint experiment has a finite centered HT second moment. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
π :
Design n d
hfair :
FairKernel π.val
Integrable (fun ω => (htEstimator ω.1.2 ω.2 - tau0) ^ 2) (experimentLaw (covLaw n d) (gaussianCompletion hd m) π.val)
Proof (Lean source)
-- @node: ht_gaussian_joint_centered_square_integrable lemma ht_gaussian_joint_centered_square_integrable {n d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) (π : Design n d) (hfair : FairKernel π.val) : Integrable (fun ω => (htEstimator ω.1.2 ω.2 - tau0) ^ 2) (experimentLaw (covLaw n d) (gaussianCompletion hd m) π.val) := by letI : IsMarkovKernel π.val := π.property letI := gaussianCompletion_markov (n := n) hd m letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance letI : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance have hF : Measurable (fun ω : (Covariates n d × Sched n) × Signs n => (htEstimator ω.1.2 ω.2 - tau0) ^ 2) := by fun_prop have hG : Measurable (fun ω : Covariates n d × Sched n => ∫ z, (htEstimator ω.2 z - tau0) ^ 2 ∂π.val ω.1) := hF.stronglyMeasurable.integral_kernel_prod_right' (κ := π.val.comap fst measurable_fst) |>.measurable have hpoint (x : Covariates n d) : Integrable (fun y => ∫ z, (htEstimator y z - tau0) ^ 2 ∂π.val x) (gaussianCompletion hd m x) := by simp_rw [integral_fintype (Integrable.of_finite (μ := π.val x))] apply integrable_finsetSum intro z _ simpa only [smul_eq_mul] using (ht_gaussian_schedule_centered_square_integrable hd m x z).const_mul ((π.val x).real {z}) have houter : Integrable (fun x : Covariates n d => ∫ y, ‖∫ z, (htEstimator y z - tau0) ^ 2 ∂π.val x‖ ∂gaussianCompletion hd m x) (covLaw n d) := by have hnn (x : Covariates n d) (y : Sched n) : 0 ≤ ∫ z, (htEstimator y z - tau0) ^ 2 ∂π.val x := integral_nonneg (fun _ => sq_nonneg _) simp_rw [Real.norm_eq_abs, abs_of_nonneg (hnn _ _)] have hA : Integrable (fun x : Covariates n d => ((n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) - tau0) ^ 2) (covLaw n d) := ((tauFn_sampleMean_memLp (n := n) hd).sub (memLp_const tau0)).integrable_sq have hS := (imbalance_kernel_second_moment_integrable π m).const_mul ((2 / (n : ℝ)) ^ 2) apply ((hA.add hS).add (integrable_const (4 / (n : ℝ)))).congr filter_upwards [hfair] with x hx exact (ht_gaussian_kernel_centered_second_moment hd m x (π.val x) hx tau0).symm have hinner : Integrable (fun ω : Covariates n d × Sched n => ∫ z, (htEstimator ω.2 z - tau0) ^ 2 ∂π.val ω.1) (covLaw n d ⊗ₘ gaussianCompletion hd m) := (Measure.integrable_compProd_iff hG.aestronglyMeasurable).mpr ⟨Filter.Eventually.of_forall hpoint, houter⟩ unfold experimentLaw apply (Measure.integrable_compProd_iff hF.aestronglyMeasurable).mpr refine ⟨Filter.Eventually.of_forall (fun _ => Integrable.of_finite), ?_⟩ simpa only [Kernel.comap_apply, Real.norm_eq_abs, abs_sq] using hinner
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_gaussian_joint_centered_square_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:176
theorem ht_gaussian_joint_mean

The fair Gaussian joint experiment is centered at the population treatment effect. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
0 < n
hd :
0 < d
m :
π :
Design n d
hfair :
FairKernel π.val
(∫ ω, htEstimator ω.1.2 ω.2 ∂experimentLaw (covLaw n d) (gaussianCompletion hd m) π.val)
Proof (Lean source)
-- @node: ht_gaussian_joint_mean lemma ht_gaussian_joint_mean {n d : ℕ} (hn : 0 < n) (hd : 0 < d) (m : CenteredL2Fn d) (π : Design n d) (hfair : FairKernel π.val) : (∫ ω, htEstimator ω.1.2 ω.2 ∂experimentLaw (covLaw n d) (gaussianCompletion hd m) π.val) = tau0 := by letI : IsMarkovKernel π.val := π.property letI := gaussianCompletion_markov (n := n) hd m letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance letI : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance letI : IsProbabilityMeasure (experimentLaw (covLaw n d) (gaussianCompletion hd m) π.val) := by unfold experimentLaw infer_instance have hf : Measurable (fun ω : (Covariates n d × Sched n) × Signs n => htEstimator ω.1.2 ω.2) := by fun_prop have hmem : MemLp (fun ω => htEstimator ω.1.2 ω.2 - tau0) 2 (experimentLaw (covLaw n d) (gaussianCompletion hd m) π.val) := (memLp_two_iff_integrable_sq (hf.sub measurable_const).aestronglyMeasurable).mpr (ht_gaussian_joint_centered_square_integrable hd m π hfair) have hint : Integrable (fun ω => htEstimator ω.1.2 ω.2) (experimentLaw (covLaw n d) (gaussianCompletion hd m) π.val) := by have hc : Integrable (fun ω => htEstimator ω.1.2 ω.2 - tau0) (experimentLaw (covLaw n d) (gaussianCompletion hd m) π.val) := hmem.integrable (by norm_num) convert hc.add (integrable_const tau0) using 1 · rfl · ext ω exact (sub_add_cancel _ _).symm unfold experimentLaw at hint ⊢ rw [Measure.integral_compProd hint] have hinner := (Measure.integrable_compProd_iff hint.aestronglyMeasurable).mp hint have hi : Integrable (fun ω : Covariates n d × Sched n => ∫ z, htEstimator ω.2 z ∂π.val ω.1) (covLaw n d ⊗ₘ gaussianCompletion hd m) := by exact hinner.2.mono' (hf.stronglyMeasurable.integral_kernel_prod_right' (κ := π.val.comap fst measurable_fst)).aestronglyMeasurable (Filter.Eventually.of_forall (fun _ => norm_integral_le_integral_norm _)) change (∫ ω : Covariates n d × Sched n, ∫ z, htEstimator ω.2 z ∂π.val ω.1 ∂(covLaw n d ⊗ₘ gaussianCompletion hd m)) = tau0 rw [Measure.integral_compProd hi] calc _ = ∫ x : Covariates n d, (n : ℝ)⁻¹ * ∑ i, tauFn hd (x i) ∂covLaw n d := by apply integral_congr_ae filter_upwards [hfair] with x hx exact ht_gaussian_kernel_mean hd m x (π.val x) hx _ = tau0 := tauFn_sampleMean_mean hn hd
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_gaussian_joint_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:226
theorem ht_transfer_centeredL2

Fair outcome-independent assignment is conditionally unbiased and, for any centered square-integrable prognosis, its Gaussian actual HT excess above 4.01 equals the expected prognostic imbalance loss. This uses the hContraction_of_gate hypothesis, the hn hypothesis, the hd hypothesis, the hfair hypothesis, the hindep hypothesis, the stated conclusion.

Formal statement
hContraction_of_gate :
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
m :
π :
Design n d
hfair :
FairKernel π.val
hindep :
conclusion 1
∀ᵐ x ∂covLaw n d, ∀ y : Sched n, (∫ z, htEstimator y z ∂π.val x)
= finiteATE y ∧
(n : ℝ) * variance (htEstimator y) (π.val x)
= (4 / (n : ℝ)) * ∑ i, ∑ j, prognosis y i * assignCov π x i j * prognosis y j
conclusion 2
gaussianTheta (n := n) (lt_of_lt_of_le (zero_lt_succ 1) hd) m = tau0
conclusion 3
Vstar = 4.01
conclusion 4
loss π m.val < ⊤
conclusion 5
(n : ℝ) * variance (fun ω => htEstimator ω.1.2 ω.2) (experimentLaw (covLaw n d) (gaussianCompletion (lt_of_lt_of_le (zero_lt_succ 1) hd) m) π.val)
= (loss π m.val).toReal
Proof (Lean source)
lemma ht_transfer_centeredL2 (hContraction_of_gate : ClassicalRademacherContraction) (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (m : CenteredL2Fn d) (π : Design n d) (hfair : FairKernel π.val) (hindep : OutcomeIndependentKernel π.val) : (∀ᵐ x ∂covLaw n d, ∀ y : Sched n, (∫ z, htEstimator y z ∂π.val x) = finiteATE y ∧ (n : ℝ) * variance (htEstimator y) (π.val x) = (4 / (n : ℝ)) * ∑ i, ∑ j, prognosis y i * assignCov π x i j * prognosis y j) ∧ gaussianTheta (n := n) (lt_of_lt_of_le (zero_lt_succ 1) hd) m = tau0 ∧ Vstar = 4.01 ∧ loss π m.val < ⊤ ∧ (n : ℝ) * variance (fun ω => htEstimator ω.1.2 ω.2) (experimentLaw (covLaw n d) (gaussianCompletion (lt_of_lt_of_le (zero_lt_succ 1) hd) m) π.val) - Vstar = (loss π m.val).toReal := by refine ⟨ht_conditional_transfer (lt_of_lt_of_le (zero_lt_succ 1) hn) π hfair, ?_⟩ refine ⟨?_, ?_, loss_lt_top_of_memLp π m, ?_⟩ · exact gaussianTheta_eq_tau0 (by omega) _ m · norm_num [Vstar, delta] · let hd0 : 0 < d := lt_of_lt_of_le (zero_lt_succ 1) hd have hn0 : 0 < n := lt_of_lt_of_le (zero_lt_succ 1) hn letI : IsMarkovKernel π.val := π.property letI := gaussianCompletion_markov (n := n) hd0 m letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance letI : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance have hf : Measurable (fun ω : (Covariates n d × Sched n) × Signs n => htEstimator ω.1.2 ω.2) := by fun_prop rw [variance_eq_integral hf.aemeasurable, ht_gaussian_joint_mean hn0 hd0 m π hfair] have hint := ht_gaussian_joint_centered_square_integrable hd0 m π hfair unfold experimentLaw at hint ⊢ rw [Measure.integral_compProd hint] have hi : Integrable (fun ω : Covariates n d × Sched n => ∫ z, (htEstimator ω.2 z - tau0) ^ 2 ∂π.val ω.1) (covLaw n d ⊗ₘ gaussianCompletion hd0 m) := by simpa only [Kernel.comap_apply, Real.norm_eq_abs, abs_sq] using ((Measure.integrable_compProd_iff hint.aestronglyMeasurable).mp hint).2 change (n : ℝ) * (∫ ω : Covariates n d × Sched n, ∫ z, (htEstimator ω.2 z - tau0) ^ 2 ∂π.val ω.1 ∂(covLaw n d ⊗ₘ gaussianCompletion hd0 m)) - Vstar = _ rw [Measure.integral_compProd hi, ht_gaussian_outer_centered_second_moment hn0 hd0 m π hfair] have hnR : (n : ℝ) ≠ 0 := by exact_mod_cast hn0.ne' unfold Vstar field_simp <;> ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_transfer_centeredL2 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:275
theorem ht_transfer

Fair outcome-independent assignment is conditionally unbiased and, for every prognosis in the bivariate Sobolev class, its Gaussian actual HT excess above 4.01 equals the expected prognostic imbalance loss. This uses the hContraction_of_gate hypothesis, the hn hypothesis, the hd hypothesis, the hs hypothesis, the hs1 hypothesis, the hm hypothesis, the hfair hypothesis, the hindep hypothesis, the stated conclusion.

Formal statement
hContraction_of_gate :
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
m :
hm :
π :
Design n d
hfair :
FairKernel π.val
hindep :
conclusion 1
∀ᵐ x ∂covLaw n d, ∀ y : Sched n, (∫ z, htEstimator y z ∂π.val x)
= finiteATE y ∧
(n : ℝ) * variance (htEstimator y) (π.val x)
= (4 / (n : ℝ)) * ∑ i, ∑ j, prognosis y i * assignCov π x i j * prognosis y j
conclusion 2
gaussianTheta (n := n) (lt_of_lt_of_le (zero_lt_succ 1) hd) m = tau0
conclusion 3
Vstar = 4.01
conclusion 4
loss π m.val < ⊤
conclusion 5
(n : ℝ) * variance (fun ω => htEstimator ω.1.2 ω.2) (experimentLaw (covLaw n d) (gaussianCompletion (lt_of_lt_of_le (zero_lt_succ 1) hd) m) π.val)
= (loss π m.val).toReal
Proof (Lean source)
lemma ht_transfer (hContraction_of_gate : ClassicalRademacherContraction) (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (s : ℝ) (hs : 0 < s) (hs1 : s ≤ 1) (m : CenteredL2Fn d) (hm : SobolevClass d s m) (π : Design n d) (hfair : FairKernel π.val) (hindep : OutcomeIndependentKernel π.val) : (∀ᵐ x ∂covLaw n d, ∀ y : Sched n, (∫ z, htEstimator y z ∂π.val x) = finiteATE y ∧ (n : ℝ) * variance (htEstimator y) (π.val x) = (4 / (n : ℝ)) * ∑ i, ∑ j, prognosis y i * assignCov π x i j * prognosis y j) ∧ gaussianTheta (n := n) (lt_of_lt_of_le (zero_lt_succ 1) hd) m = tau0 ∧ Vstar = 4.01 ∧ loss π m.val < ⊤ ∧ (n : ℝ) * variance (fun ω => htEstimator ω.1.2 ω.2) (experimentLaw (covLaw n d) (gaussianCompletion (lt_of_lt_of_le (zero_lt_succ 1) hd) m) π.val) - Vstar = (loss π m.val).toReal := by exact ht_transfer_centeredL2 hContraction_of_gate n d hn hd m π hfair hindep
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ht_transfer · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/HTTransfer.lean:324
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.IsotropicSigning 21 declarations Coordinate second moments control isotropic norms and projections.

Isotropic row signing lower bound

Coordinate second moments control isotropic norms and projections. Direct pairwise moment bounds handle at most 256 rows. These results support the full signing theorem assembled in SigningPartition, without coordinate independence.

theorem isotropic_norm_sq_integrable Lemma isotropic_norm_sq_integrable in the paper ↗

Coordinate second moments make the squared Euclidean norm integrable. Under the stated conditions.

Formal statement
r :
ℕ
P :
hmom :
∀ a, MemLp (fun v => v a) 2 P
Integrable (fun v => ‖v‖ ^ 2) P
Proof (Lean source)
-- @node: isotropic_norm_sq_integrable lemma isotropic_norm_sq_integrable (r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) (hmom : ∀ a, MemLp (fun v => v a) 2 P) : Integrable (fun v => ‖v‖ ^ 2) P := by simp_rw [EuclideanSpace.real_norm_sq_eq] exact integrable_finsetSum univ (fun a _ => (hmom a).integrable_sq)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_norm_sq_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:18
theorem isotropic_norm_sq_integral Lemma isotropic_norm_sq_integral in the paper ↗

The diagonal energy of one isotropic row is exactly its dimension. Under the stated conditions.

Formal statement
r :
ℕ
P :
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
(∫ v, ‖v‖ ^ 2 ∂P) = r
Proof (Lean source)
-- @node: isotropic_norm_sq_integral lemma isotropic_norm_sq_integral (r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : (∫ v, ‖v‖ ^ 2 ∂P) = r := by simp_rw [EuclideanSpace.real_norm_sq_eq] rw [integral_finsetSum _ (fun a _ => (hmom a).integrable_sq)] simp only [pow_two, hiso, if_true, Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, mul_one]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_norm_sq_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:26
theorem isotropic_sample_diagonal_integral Lemma isotropic_sample_diagonal_integral in the paper ↗

Independent rows have expected diagonal energy equal to sample size times dimension. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
(∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∑ i, ‖vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P))
= (n : ℝ) * r
Proof (Lean source)
-- @node: isotropic_sample_diagonal_integral lemma isotropic_sample_diagonal_integral (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∑ i, ‖vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P)) = (n : ℝ) * r := by have hi (i : Fin n) : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ‖vs i‖ ^ 2) (Measure.pi (fun _ : Fin n => P)) := (measurePreserving_eval (fun _ : Fin n => P) i).integrable_comp_of_integrable (isotropic_norm_sq_integrable r P hmom) rw [integral_finsetSum _ (fun i _ => hi i)] have heval (i : Fin n) : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ‖vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P)) = r := by rw [integral_comp_eval (μ := fun _ : Fin n => P) (i := i) (isotropic_norm_sq_integrable r P hmom).aestronglyMeasurable] exact isotropic_norm_sq_integral r P hmom hiso simp [heval]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_sample_diagonal_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:37
theorem isotropic_signing_lower_of_offDiagonal

Expected minimum signing energy is diagonal energy minus at most the expected maximum off-diagonal fluctuation, the final subtraction in the proof roadmap. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
(n : ℝ) * r - (∫ vs, signingOffDiagonalMax vs ∂Measure.pi (fun _ : Fin n => P))
≤ ∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P)
Proof (Lean source)
-- @node: isotropic_signing_lower_of_offDiagonal lemma isotropic_signing_lower_of_offDiagonal (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : (n : ℝ) * r - (∫ vs, signingOffDiagonalMax vs ∂Measure.pi (fun _ : Fin n => P)) ≤ ∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P) := by have hdiag : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ∑ i, ‖vs i‖ ^ 2) (Measure.pi (fun _ : Fin n => P)) := by apply integrable_finsetSum intro i _ exact (measurePreserving_eval (fun _ : Fin n => P) i).integrable_comp_of_integrable (isotropic_norm_sq_integrable r P hmom) have h := integral_mono (hdiag.sub (signingOffDiagonalMax_integrable n r P hmom)) (signing_min_integrable n r P hmom) signing_min_ge_diagonal_sub_max change (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), (∑ i, ‖vs i‖ ^ 2) - signingOffDiagonalMax vs ∂Measure.pi (fun _ : Fin n => P)) ≤ _ at h rw [integral_sub hdiag (signingOffDiagonalMax_integrable n r P hmom), isotropic_sample_diagonal_integral n r P hmom hiso] at h exact h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_signing_lower_of_offDiagonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:58
theorem euclidean_inner_sq_expansion Lemma euclidean_inner_sq_expansion in the paper ↗

Expand a squared real Euclidean inner product into coordinate moment products. The asserted mathematical result follows.

Formal statement
r :
ℕ
u v :
(inner ℝ u v) ^ 2 = ∑ a, ∑ b, (u a * u b) * (v a * v b)
Proof (Lean source)
-- @node: euclidean_inner_sq_expansion lemma euclidean_inner_sq_expansion {r : ℕ} (u v : EuclideanSpace ℝ (Fin r)) : (inner ℝ u v) ^ 2 = ∑ a, ∑ b, (u a * u b) * (v a * v b) := by simp only [PiLp.inner_apply, RCLike.inner_apply, conj_trivial, pow_two, Finset.sum_mul, Finset.mul_sum] apply Finset.sum_congr rfl intro a _ apply Finset.sum_congr rfl intro b _ ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.euclidean_inner_sq_expansion · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:83
theorem isotropic_projection_sq_integrable Lemma isotropic_projection_sq_integrable in the paper ↗

Coordinate L² moments suffice to integrate every squared fixed-direction projection. Under the stated conditions, the asserted mathematical result follows.

Formal statement
r :
ℕ
P :
hmom :
∀ a, MemLp (fun v => v a) 2 P
u :
Integrable (fun v => (inner ℝ u v) ^ 2) P
Proof (Lean source)
-- @node: isotropic_projection_sq_integrable lemma isotropic_projection_sq_integrable (r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) (hmom : ∀ a, MemLp (fun v => v a) 2 P) (u : EuclideanSpace ℝ (Fin r)) : Integrable (fun v => (inner ℝ u v) ^ 2) P := by simp_rw [euclidean_inner_sq_expansion] apply integrable_finsetSum intro a _ apply integrable_finsetSum intro b _ exact ((hmom a).integrable_mul (hmom b)).const_mul (u a * u b)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_projection_sq_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:95
theorem isotropic_projection_sq_integral Lemma isotropic_projection_sq_integral in the paper ↗

Isotropy controls all fixed-direction projections without coordinate independence. Under the stated conditions.

Formal statement
r :
ℕ
P :
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
u :
(∫ v, (inner ℝ u v) ^ 2 ∂P) = ‖u‖ ^ 2
Proof (Lean source)
-- @node: isotropic_projection_sq_integral lemma isotropic_projection_sq_integral (r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) (u : EuclideanSpace ℝ (Fin r)) : (∫ v, (inner ℝ u v) ^ 2 ∂P) = ‖u‖ ^ 2 := by simp_rw [euclidean_inner_sq_expansion] have hi (a b : Fin r) : Integrable (fun v => (u a * u b) * (v a * v b)) P := by simpa only [Pi.mul_apply] using ((hmom a).integrable_mul (hmom b)).const_mul (u a * u b) have hs (a : Fin r) : Integrable (fun v => ∑ b, (u a * u b) * (v a * v b)) P := integrable_finsetSum univ (fun b _ => hi a b) rw [integral_finsetSum univ (fun a _ => hs a)] simp_rw [integral_finsetSum univ (fun b _ => hi _ b), integral_const_mul, hiso] simp only [mul_ite, mul_one, mul_zero, Finset.sum_ite_eq, Finset.mem_univ, if_true] simpa only [pow_two] using (EuclideanSpace.real_norm_sq_eq u).symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_projection_sq_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:108
theorem isotropic_independent_inner_sq_integrable Lemma isotropic_independent_inner_sq_integrable in the paper ↗

The squared inner product of independent isotropic rows is integrable. Under the stated conditions.

Formal statement
r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
Integrable (fun vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r) => (inner ℝ vs.1 vs.2) ^ 2) (P.prod P)
Proof (Lean source)
-- @node: isotropic_independent_inner_sq_integrable lemma isotropic_independent_inner_sq_integrable (r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) : Integrable (fun vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r) => (inner ℝ vs.1 vs.2) ^ 2) (P.prod P) := by simp_rw [euclidean_inner_sq_expansion] apply integrable_finsetSum intro a _ apply integrable_finsetSum intro b _ exact ((hmom a).integrable_mul (hmom b)).mul_prod ((hmom a).integrable_mul (hmom b))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_independent_inner_sq_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:127
theorem isotropic_independent_inner_sq_integral Lemma isotropic_independent_inner_sq_integral in the paper ↗

Independent isotropic rows have squared inner-product expectation equal to dimension. Under the stated conditions.

Formal statement
r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
(∫ vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r), (inner ℝ vs.1 vs.2) ^ 2 ∂P.prod P)
= r
Proof (Lean source)
-- @node: isotropic_independent_inner_sq_integral lemma isotropic_independent_inner_sq_integral (r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : (∫ vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r), (inner ℝ vs.1 vs.2) ^ 2 ∂P.prod P) = r := by simp_rw [euclidean_inner_sq_expansion] have hi (a b : Fin r) : Integrable (fun vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r) => (vs.1 a * vs.1 b) * (vs.2 a * vs.2 b)) (P.prod P) := by simpa only [Pi.mul_apply] using ((hmom a).integrable_mul (hmom b)).mul_prod ((hmom a).integrable_mul (hmom b)) have hs (a : Fin r) : Integrable (fun vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r) => ∑ b, (vs.1 a * vs.1 b) * (vs.2 a * vs.2 b)) (P.prod P) := integrable_finsetSum univ (fun b _ => hi a b) rw [integral_finsetSum univ (fun a _ => hs a)] have he (a b : Fin r) : (∫ vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r), (vs.1 a * vs.1 b) * (vs.2 a * vs.2 b) ∂P.prod P) = (if a = b then (1 : ℝ) else 0) * (if a = b then (1 : ℝ) else 0) := by exact (integral_prod_mul (μ := P) (ν := P) (fun v : EuclideanSpace ℝ (Fin r) => v a * v b) (fun v : EuclideanSpace ℝ (Fin r) => v a * v b)).trans (by rw [hiso]) simp_rw [integral_finsetSum univ (fun b _ => hi _ b), he] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_independent_inner_sq_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:142
theorem isotropic_projection_abs_integral_le Lemma isotropic_projection_abs_integral_le in the paper ↗

The mean absolute projection is at most the length of its fixed direction. Under the stated conditions.

Formal statement
r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
u :
(∫ v, |inner ℝ u v| ∂P) ≤ ‖u‖
Proof (Lean source)
-- @node: isotropic_projection_abs_integral_le lemma isotropic_projection_abs_integral_le (r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) (u : EuclideanSpace ℝ (Fin r)) : (∫ v, |inner ℝ u v| ∂P) ≤ ‖u‖ := by have hp : MemLp (fun v => inner ℝ u v) 2 P := (memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_projection_sq_integrable r P hmom u) have ha : MemLp (fun v => |inner ℝ u v|) 2 P := by simpa using hp.norm have hv := variance_nonneg (X := fun v => |inner ℝ u v|) (μ := P) rw [variance_eq_sub ha] at hv simp only [Pi.pow_apply, sq_abs] at hv rw [isotropic_projection_sq_integral r P hmom hiso u] at hv nlinarith [norm_nonneg u]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_projection_abs_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:172
theorem isotropic_independent_inner_abs_integral_le Lemma isotropic_independent_inner_abs_integral_le in the paper ↗

The mean absolute inner product of independent isotropic rows is at most √r. Under the stated conditions.

Formal statement
r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
(∫ vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r), |inner ℝ vs.1 vs.2| ∂P.prod P)
≤ sqrt r
Proof (Lean source)
-- @node: isotropic_independent_inner_abs_integral_le lemma isotropic_independent_inner_abs_integral_le (r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : (∫ vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r), |inner ℝ vs.1 vs.2| ∂P.prod P) ≤ sqrt r := by have hp : MemLp (fun vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r) => inner ℝ vs.1 vs.2) 2 (P.prod P) := (memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_independent_inner_sq_integrable r P hmom) have ha : MemLp (fun vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r) => |inner ℝ vs.1 vs.2|) 2 (P.prod P) := by simpa using hp.norm have hv := variance_nonneg (X := fun vs => |inner ℝ vs.1 vs.2|) (μ := P.prod P) rw [variance_eq_sub ha] at hv simp only [Pi.pow_apply, sq_abs] at hv rw [isotropic_independent_inner_sq_integral r P hmom hiso] at hv nlinarith [Real.sqrt_nonneg (r : ℝ), Real.sq_sqrt (Nat.cast_nonneg r : (0 : ℝ) ≤ r)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_independent_inner_abs_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:190
theorem signing_pair_measurePreserving Lemma signing_pair_measurePreserving in the paper ↗

Two distinct evaluation rows have the original product law. Under the stated conditions.

Formal statement
n r :
ℕ
i j :
Fin n
hij :
i ≠ j
MeasurePreserving (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => (vs i, vs j)) (Measure.pi (fun _ : Fin n => P)) (P.prod P)
Proof (Lean source)
-- @node: signing_pair_measurePreserving lemma signing_pair_measurePreserving (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (i j : Fin n) (hij : i ≠ j) : MeasurePreserving (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => (vs i, vs j)) (Measure.pi (fun _ : Fin n => P)) (P.prod P) := by have hi := (iIndepFun_pi (μ := fun _ : Fin n => P) (X := fun _ => id) (fun _ => aemeasurable_id)).indepFun hij refine ⟨by fun_prop, ?_⟩ simpa only [(measurePreserving_eval (fun _ : Fin n => P) i).map_eq, (measurePreserving_eval (fun _ : Fin n => P) j).map_eq] using hi.map_prod_eq_prod_map_map (measurable_pi_apply i).aemeasurable (measurable_pi_apply j).aemeasurable
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_pair_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:212
theorem isotropic_sample_inner_abs_integral_le Lemma isotropic_sample_inner_abs_integral_le in the paper ↗

The pairwise absolute moment bound applies to any two distinct sample rows. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
i j :
Fin n
hij :
i ≠ j
(∫ vs : Fin n → EuclideanSpace ℝ (Fin r), |inner ℝ (vs i) (vs j)| ∂Measure.pi (fun _ : Fin n => P))
≤ sqrt r
Proof (Lean source)
-- @node: isotropic_sample_inner_abs_integral_le lemma isotropic_sample_inner_abs_integral_le (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) (i j : Fin n) (hij : i ≠ j) : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), |inner ℝ (vs i) (vs j)| ∂Measure.pi (fun _ : Fin n => P)) ≤ sqrt r := by have hmap := (signing_pair_measurePreserving n r P i j hij).map_eq have heq : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), |inner ℝ (vs i) (vs j)| ∂Measure.pi (fun _ : Fin n => P)) = ∫ v : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r), |inner ℝ v.1 v.2| ∂P.prod P := by rw [← hmap, integral_map (by fun_prop) (by fun_prop)] rw [heq] exact isotropic_independent_inner_abs_integral_le r P hmom hiso
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_sample_inner_abs_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:227
theorem signingOffDiagonalMax_le_pair_sum

The triangle inequality bounds every off-diagonal signing by the sum of pair magnitudes. The asserted mathematical result follows.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
signingOffDiagonalMax vs ≤ ∑ i, ∑ j, if i = j then 0 else |inner ℝ (vs i) (vs j)|
Proof (Lean source)
-- @node: signingOffDiagonalMax_le_pair_sum lemma signingOffDiagonalMax_le_pair_sum {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) : signingOffDiagonalMax vs ≤ ∑ i, ∑ j, if i = j then 0 else |inner ℝ (vs i) (vs j)| := by classical apply ciSup_le intro z unfold signingOffDiagonal refine (Finset.abs_sum_le_sum_abs _ _).trans ?_ apply Finset.sum_le_sum intro i _ refine (Finset.abs_sum_le_sum_abs _ _).trans ?_ apply Finset.sum_le_sum intro j _ by_cases hij : i = j · simp [hij] · cases z i <;> cases z j <;> simp [hij, sgn]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingOffDiagonalMax_le_pair_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:245
theorem isotropic_offDiagonal_integral_le_pair_count

Summing distinct-pair moments controls the maximum fluctuation directly, without contraction; the loose n² count also includes the zero diagonal terms. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
(∫ vs : Fin n → EuclideanSpace ℝ (Fin r), signingOffDiagonalMax vs ∂Measure.pi (fun _ : Fin n => P))
≤ (n : ℝ) ^ 2 * sqrt r
Proof (Lean source)
-- @node: isotropic_offDiagonal_integral_le_pair_count lemma isotropic_offDiagonal_integral_le_pair_count (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), signingOffDiagonalMax vs ∂Measure.pi (fun _ : Fin n => P)) ≤ (n : ℝ) ^ 2 * sqrt r := by classical have hi (i j : Fin n) : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => if i = j then 0 else |inner ℝ (vs i) (vs j)|) (Measure.pi (fun _ : Fin n => P)) := by by_cases hij : i = j · simp only [hij, if_true]; exact integrable_zero _ _ _ · simpa only [hij, if_false, Real.norm_eq_abs] using (signing_row_inner_integrable n r P hmom i j).norm have hsum (i : Fin n) := integrable_finsetSum univ (fun j _ => hi i j) have h := integral_mono (signingOffDiagonalMax_integrable n r P hmom) (integrable_finsetSum univ (fun i _ => hsum i)) (fun vs => signingOffDiagonalMax_le_pair_sum vs) rw [integral_finsetSum _ (fun i _ => hsum i)] at h simp_rw [integral_finsetSum _ (fun j _ => hi _ j)] at h have hpair (i j : Fin n) : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), (if i = j then 0 else |inner ℝ (vs i) (vs j)|) ∂Measure.pi (fun _ : Fin n => P)) ≤ sqrt r := by by_cases hij : i = j · simp only [hij, if_true, integral_zero]; exact Real.sqrt_nonneg _ · simp only [hij, if_false] exact isotropic_sample_inner_abs_integral_le n r P hmom hiso i j hij calc _ ≤ ∑ i : Fin n, ∑ j : Fin n, sqrt (r : ℝ) := h.trans (Finset.sum_le_sum (fun i _ => Finset.sum_le_sum (fun j _ => hpair i j))) _ = _ := by simp; ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_offDiagonal_integral_le_pair_count · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:264
theorem isotropic_signing_lower_pair_count

Direct pairwise second moments give a contraction-free signing bound for all sample sizes, useful before the sharper large-sample argument is available. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
(n : ℝ) * r - (n : ℝ) ^ 2 * sqrt r
≤ ∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P)
Proof (Lean source)
-- @node: isotropic_signing_lower_pair_count lemma isotropic_signing_lower_pair_count (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : (n : ℝ) * r - (n : ℝ) ^ 2 * Real.sqrt r ≤ ∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P) := by have hdiag := isotropic_signing_lower_of_offDiagonal n r P hmom hiso have hpairs := isotropic_offDiagonal_integral_le_pair_count n r P hmom hiso linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_signing_lower_pair_count · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:301
theorem isotropic_pair_count_error_le Lemma isotropic_pair_count_error_le in the paper ↗

For at most 256 rows, the direct pair count fits within the paper's 16n√(nr) error allowance. Under the stated conditions.

Formal statement
n r :
ℕ
hn :
n ≤ 256
(n : ℝ) ^ 2 * sqrt r ≤ 16 * n * sqrt ((n : ℝ) * r)
Proof (Lean source)
-- @node: isotropic_pair_count_error_le lemma isotropic_pair_count_error_le (n r : ℕ) (hn : n ≤ 256) : (n : ℝ) ^ 2 * sqrt r ≤ 16 * n * sqrt ((n : ℝ) * r) := by have hnR : (n : ℝ) ≤ 256 := by exact_mod_cast hn have hn0 : (0 : ℝ) ≤ n := Nat.cast_nonneg n have hs := Real.sq_sqrt hn0 have hs0 := Real.sqrt_nonneg (n : ℝ) have hs16 : sqrt (n : ℝ) ≤ 16 := (Real.sqrt_le_iff).2 ⟨by norm_num, by nlinarith⟩ have hnn : (n : ℝ) ≤ 16 * sqrt n := by nlinarith rw [Real.sqrt_mul hn0] nlinarith [mul_nonneg (mul_nonneg hn0 (Real.sqrt_nonneg (r : ℝ))) (sub_nonneg.mpr hnn)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_pair_count_error_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:316
theorem isotropic_small_sample_signing_lower

The small-sample portion of the headline follows directly from isotropic pair moments and diagonal subtraction, with no contraction premise. Under the stated conditions.

Formal statement
n r :
ℕ
hn :
n ≤ 256
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
(n : ℝ) * r - (n : ℝ) ^ 2 - 16 * n * sqrt ((n : ℝ) * r)
≤ ∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P)
Proof (Lean source)
-- @node: isotropic_small_sample_signing_lower lemma isotropic_small_sample_signing_lower (n r : ℕ) (hn : n ≤ 256) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : (n : ℝ) * r - (n : ℝ) ^ 2 - 16 * n * sqrt ((n : ℝ) * r) ≤ ∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P) := by have hpairs := isotropic_signing_lower_pair_count n r P hmom hiso have herr := isotropic_pair_count_error_le n r hn nlinarith [sq_nonneg (n : ℝ)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_small_sample_signing_lower · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:331
theorem two_row_min_signing_eq

For two rows, the four signings reduce exactly to the diagonal energy minus twice the absolute inner product, as in the roadmap's smallest-sample check. The asserted mathematical result follows.

Formal statement
r :
ℕ
u v :
(⨅ z : Signs 2, ‖sgn (z 0) • u + sgn (z 1) • v‖ ^ 2)
= ‖u‖ ^ 2 + ‖v‖ ^ 2 - 2 * |inner ℝ u v|
Proof (Lean source)
-- @node: two_row_min_signing_eq lemma two_row_min_signing_eq {r : ℕ} (u v : EuclideanSpace ℝ (Fin r)) : (⨅ z : Signs 2, ‖sgn (z 0) • u + sgn (z 1) • v‖ ^ 2) = ‖u‖ ^ 2 + ‖v‖ ^ 2 - 2 * |inner ℝ u v| := by have hb : BddBelow (range (fun z : Signs 2 => ‖sgn (z 0) • u + sgn (z 1) • v‖ ^ 2)) := ⟨0, by rintro _ ⟨z, rfl⟩; positivity⟩ apply le_antisymm · have hp : (⨅ z : Signs 2, ‖sgn (z 0) • u + sgn (z 1) • v‖ ^ 2) ≤ ‖u + v‖ ^ 2 := by calc _ ≤ ‖sgn true • u + sgn true • v‖ ^ 2 := ciInf_le hb (fun _ => true) _ = _ := by simp [sgn] have hm : (⨅ z : Signs 2, ‖sgn (z 0) • u + sgn (z 1) • v‖ ^ 2) ≤ ‖u - v‖ ^ 2 := by calc _ ≤ ‖sgn true • u + sgn false • v‖ ^ 2 := ciInf_le hb (fun i => i == 0) _ = _ := by simp [sgn, sub_eq_add_neg] rw [norm_add_sq_real] at hp rw [norm_sub_sq_real] at hm by_cases h : 0 ≤ inner ℝ u v · rw [abs_of_nonneg h] linarith · rw [abs_of_neg (lt_of_not_ge h)] linarith · apply le_ciInf intro z have ha := neg_abs_le (inner ℝ u v) have hb' := le_abs_self (inner ℝ u v) cases z 0 <;> cases z 1 <;> simp only [sgn, Bool.false_eq_true, if_false, if_true, one_smul, neg_one_smul, norm_add_sq_real, inner_neg_left, inner_neg_right, norm_neg, neg_neg] <;> nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.two_row_min_signing_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:346
theorem isotropic_two_row_signing_lower

The complete two-row signing lower bound follows from the independent inner-product moment, with the sharper error 2√r from the roadmap's check. Under the stated conditions, the asserted mathematical result follows.

Formal statement
r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
2 * (r : ℝ) - 2 * sqrt r
≤ ∫ vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r), ⨅ z : Signs 2, ‖sgn (z 0) • vs.1 + sgn (z 1) • vs.2‖ ^ 2 ∂P.prod P
Proof (Lean source)
-- @node: isotropic_two_row_signing_lower lemma isotropic_two_row_signing_lower (r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : 2 * (r : ℝ) - 2 * Real.sqrt r ≤ ∫ vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r), ⨅ z : Signs 2, ‖sgn (z 0) • vs.1 + sgn (z 1) • vs.2‖ ^ 2 ∂P.prod P := by have hnorm := isotropic_norm_sq_integrable r P hmom have hf : Integrable (fun vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r) => ‖vs.1‖ ^ 2) (P.prod P) := hnorm.comp_fst P have hg : Integrable (fun vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r) => ‖vs.2‖ ^ 2) (P.prod P) := hnorm.comp_snd P have hp : MemLp (fun vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r) => inner ℝ vs.1 vs.2) 2 (P.prod P) := (memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_independent_inner_sq_integrable r P hmom) have ha : Integrable (fun vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r) => 2 * |inner ℝ vs.1 vs.2|) (P.prod P) := by simpa using (hp.integrable (by norm_num)).norm.const_mul 2 simp_rw [two_row_min_signing_eq] integral_linearity have he1 : (∫ vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r), ‖vs.1‖ ^ 2 ∂P.prod P) = r := by simpa using (integral_prod_mul (μ := P) (ν := P) (fun v => ‖v‖ ^ 2) (fun _ => (1 : ℝ))).trans (by simp [isotropic_norm_sq_integral r P hmom hiso]) have he2 : (∫ vs : EuclideanSpace ℝ (Fin r) × EuclideanSpace ℝ (Fin r), ‖vs.2‖ ^ 2 ∂P.prod P) = r := by simpa using (integral_prod_mul (μ := P) (ν := P) (fun _ => (1 : ℝ)) (fun v => ‖v‖ ^ 2)).trans (by simp [isotropic_norm_sq_integral r P hmom hiso]) rw [he1, he2] have h := isotropic_independent_inner_abs_integral_le r P hmom hiso linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_two_row_signing_lower · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:379
theorem isotropic_signing_error_le_half Lemma isotropic_signing_error_le_half in the paper ↗

At the prescribed dimension threshold, the two error terms consume at most half of the diagonal energy. Under the stated conditions.

Formal statement
n r :
ℕ
hlarge :
4096 * n ≤ r
(n : ℝ) ^ 2 + 16 * n * sqrt ((n : ℝ) * r) ≤ (n : ℝ) * r / 2
Proof (Lean source)
-- @node: isotropic_signing_error_le_half lemma isotropic_signing_error_le_half (n r : ℕ) (hlarge : 4096 * n ≤ r) : (n : ℝ) ^ 2 + 16 * n * sqrt ((n : ℝ) * r) ≤ (n : ℝ) * r / 2 := by have hn : (0 : ℝ) ≤ n := Nat.cast_nonneg n have hr : (0 : ℝ) ≤ r := Nat.cast_nonneg r have hlargeR : (4096 : ℝ) * n ≤ r := by exact_mod_cast hlarge have hnr : (n : ℝ) * r ≤ ((r : ℝ) / 64) ^ 2 := by nlinarith [mul_nonneg hr (sub_nonneg.mpr hlargeR)] have hsqrt : sqrt ((n : ℝ) * r) ≤ (r : ℝ) / 64 := (Real.sqrt_le_iff).2 ⟨by positivity, hnr⟩ have herr : 16 * (n : ℝ) * sqrt ((n : ℝ) * r) ≤ (n : ℝ) * r / 4 := by nlinarith [mul_nonneg hn (sub_nonneg.mpr hsqrt)] have hdiag : (n : ℝ) ^ 2 ≤ (n : ℝ) * r / 4096 := by nlinarith [mul_nonneg hn (sub_nonneg.mpr hlargeR)] nlinarith [mul_nonneg hn hr]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_signing_error_le_half · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/IsotropicSigning.lean:419
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.LowerConverse 2 declarations A positive comparison-scale lower bound forces the square-root dimension condition, even when the risks are extended real and the dimension sequence oscillates.

Lower constants and the dimension converse

A positive comparison-scale lower bound forces the square-root dimension condition, even when the risks are extended real and the dimension sequence oscillates.

theorem cLower_uniform_positive

The sharper lower constant dominates its positive endpoint value. Under the stated conditions.

Formal statement
s :
ℝ
hs1 :
s ≤ 1
conclusion 1
0 < cLower 1
conclusion 2
cLower 1 ≤ cLower s
Proof (Lean source)
-- @node: cLower_uniform_positive lemma cLower_uniform_positive (s : ℝ) (hs1 : s ≤ 1) : 0 < cLower 1 ∧ cLower 1 ≤ cLower s := by have hbase : 0 < 48 + 32 * pi ^ 2 := by positivity have hpow : (16384 : ℝ) ^ s ≤ (16384 : ℝ) ^ (1 : ℝ) := Real.rpow_le_rpow_of_exponent_le (by norm_num) hs1 constructor · unfold cLower positivity · unfold cLower exact div_le_div_of_nonneg_left (by norm_num) (mul_pos hbase (Real.rpow_pos_of_pos (by norm_num) s)) (mul_le_mul_of_nonneg_left hpow hbase.le)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cLower_uniform_positive · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/LowerConverse.lean:16
theorem dimension_necessity_of_scale_lower

Vanishing extended-real risks bounded below by the comparison scale require sub-square-root dimension growth. Under the stated conditions.

Formal statement
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
ds :
ℕ → ℕ
hd :
∀ n, 2 ≤ ds n
risk :
ℕ → ℝ≥0∞
hlower :
∀ᶠ n in atTop, ofReal (cLower s * bScale n (ds n) s) ≤ risk n
hvanish :
Tendsto risk atTop (𝓝 0)
IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ))
Proof (Lean source)
-- @node: dimension_necessity_of_scale_lower lemma dimension_necessity_of_scale_lower (s : ℝ) (hs : 0 < s) (hs1 : s ≤ 1) (ds : ℕ → ℕ) (hd : ∀ n, 2 ≤ ds n) (risk : ℕ → ℝ≥0∞) (hlower : ∀ᶠ n in atTop, ofReal (cLower s * bScale n (ds n) s) ≤ risk n) (hvanish : Tendsto risk atTop (𝓝 0)) : IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ)) := by have hc : 0 < cLower s := lt_of_lt_of_le (cLower_uniform_positive s hs1).1 (cLower_uniform_positive s hs1).2 have hscale_nonneg (n : ℕ) : 0 ≤ bScale n (ds n) s := by unfold bScale exact le_min (by norm_num) (Real.rpow_nonneg (by positivity) _) have he : Tendsto (fun n => ofReal (cLower s * bScale n (ds n) s)) atTop (𝓝 0) := by apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hvanish (Filter.Eventually.of_forall (fun _ => bot_le)) hlower have hr := (ENNReal.tendsto_toReal ENNReal.zero_ne_top).comp he have hr' : Tendsto (fun n => cLower s * bScale n (ds n) s) atTop (𝓝 0) := by simpa only [Function.comp_def, ENNReal.toReal_ofReal (mul_nonneg hc.le (hscale_nonneg _)), ENNReal.toReal_zero] using hr have hb : Tendsto (fun n => aScale n (ds n) s) atTop (𝓝 0) := by have h := hr'.div_const (cLower s) simpa only [zero_div, mul_div_cancel_left₀ _ hc.ne', bScale, aScale] using h exact (scale_vanishing s hs hs1 ds hd).2.mp ((scale_vanishing s hs hs1 ds hd).1.mp hb)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.dimension_necessity_of_scale_lower · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/LowerConverse.lean:31
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.OrderedRounding 1 declarations The Borel component is assembled from the finite arithmetic and changing-basis proofs.

Ordered boundary rounding guarantee

The Borel component is assembled from the finite arithmetic and changing-basis proofs. Finite termination follows from the active trace and phase invariant; fairness follows by successive fresh-seed integration. Exact direction-lottery covariance, test-row variance, norm-energy increments, and localized projection contraction, exact active-rank counts, and retained-row invariance are proved; finite move-moment accumulation and the geometric phase allowance are proved; predictably selected actual moves have additive moments and exact interval energy budgets; measurable predictable halving intervals partition the actual trace. The row budget follows from the uniform move comparison and the energy telescope after the first loss of protection.

theorem ordered_prefix_rounding

Ordered boundary rounding is Borel, terminates within n moves, is fair, and controls every prefix row without a full-rank or general-position assumption. This uses the hrows hypothesis, the stated conclusion.

Formal statement
n :
ℕ
rows :
ℕ → Fin n → ℝ
Λ :
ℝ
hrows :
∀ h i
if
1 ≤ h
then
|rows h i| ≤ Λ
conclusion 1
Measurable (fun a : (Fin (n / 4) → Fin n → ℝ) × RoundingSeeds n => orderedBoundaryRounding n a.1 a.2)
conclusion 2
seeds :
(∀ h, seeds h ∈ Icc (0 : ℝ) 1)
i :
(roundingIteration (rowPrefix rows) seeds n).1 i
conclusion 3
i :
∫ seeds, sgn (orderedBoundaryRounding n (rowPrefix rows) seeds i) ∂roundingSeedLaw n = 0
conclusion 4
h :
1 ≤ h
(∫ seeds, (∑ i, rows h i * sgn (orderedBoundaryRounding n (rowPrefix rows) seeds i)) ^ 2 ∂roundingSeedLaw n)
≤ 32 * Λ ^ 2 * (min h n : ℕ)
Proof (Lean source)
lemma ordered_prefix_rounding (n : ℕ) (rows : ℕ → Fin n → ℝ) (Λ : ℝ) (hrows : ∀ h i, 1 ≤ h → |rows h i| ≤ Λ) : Measurable (fun a : (Fin (n / 4) → Fin n → ℝ) × RoundingSeeds n => orderedBoundaryRounding n a.1 a.2) ∧ (∀ seeds, (∀ h, seeds h ∈ Icc (0 : ℝ) 1) → ∀ i, (roundingIteration (rowPrefix rows) seeds n).1 i = sgn (orderedBoundaryRounding n (rowPrefix rows) seeds i)) ∧ (∀ i, ∫ seeds, sgn (orderedBoundaryRounding n (rowPrefix rows) seeds i) ∂roundingSeedLaw n = 0) ∧ (∀ h, 1 ≤ h → (∫ seeds, (∑ i, rows h i * sgn (orderedBoundaryRounding n (rowPrefix rows) seeds i)) ^ 2 ∂roundingSeedLaw n) ≤ 32 * Λ ^ 2 * (min h n : ℕ)) := by refine ⟨orderedBoundaryRounding_measurable n, ?_⟩ refine ⟨fun seeds _ i => roundingIteration_terminal_eq_sign _ seeds i, ?_⟩ refine ⟨orderedBoundaryRounding_fair (rowPrefix rows), ?_⟩ exact fun h hh => orderedBoundaryRounding_row_bound rows Λ hrows h hh
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ordered_prefix_rounding · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRounding.lean:24
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.OrderedRoundingCore 41 declarations Exact finite arithmetic, ordered Gram--Schmidt, half-open inverse-CDF choices, and a structural n-step iteration implement the prescribed procedure.

Ordered boundary rounding

Exact finite arithmetic, ordered Gram--Schmidt, half-open inverse-CDF choices, and a structural n-step iteration implement the prescribed procedure. The fractional terminal state is retained separately so termination is a substantive proof obligation.

def rowDot

[ Euclidean dot product on the original coordinates.

Definition (Lean source)
n :
ℕ
shared
v w :
Fin n → ℝ
rowDot v w :
ℝ
∑ i, v i * w i
def removeProjections

Subtract rank-one projections onto an ordered orthonormal list.

Definition (Lean source)
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v :
Fin n → ℝ
removeProjections bs v :
Fin n → ℝ
fun i => v i - (bs.map (fun b => rowDot v b * b i)).sum
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.removeProjections · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:21
def insertOrtho

One ordered Gram--Schmidt insertion, discarding zero residuals.

Definition (Lean source)
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v :
Fin n → ℝ
insertOrtho bs v :
List (Fin n → ℝ)
r :
sqrt (rowDot w w)
if 0 < r then bs ++ [fun i => w i / r] else bs
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.insertOrtho · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:24
def orderedOrtho

Structural ordered Gram--Schmidt; no well-founded recursion enters the algorithm.

Definition (Lean source)
n :
ℕ
shared
vs :
List (Fin n → ℝ)
orderedOrtho vs :
List (Fin n → ℝ)
vs.foldl insertOrtho []
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedOrtho · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:29
def activeIndices

Active coordinates in increasing original-unit order.

Definition (Lean source)
n :
ℕ
shared
u :
Fin n → ℝ
activeIndices u :
List (Fin n)
(finRange n).filter (fun i => decide (|u i| < 1))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.activeIndices · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:32
def activeMask

Restrict a vector to active coordinates.

Definition (Lean source)
n :
ℕ
shared
u v :
Fin n → ℝ
activeMask u v :
Fin n → ℝ
fun i => if |u i| < 1 then v i else 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.activeMask · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:35
def constraintBasis

First q restricted constraints, including zero rows outside the supplied prefix.

Definition (Lean source)
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
constraintBasis a q u :
List (Fin n → ℝ)
orderedOrtho ((List.range q).map (fun h => activeMask u (if hh : h < n / 4 then a ⟨h, hh⟩ else 0)))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.constraintBasis · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:38
def constraintProjection

The projection onto the active-coordinate nullspace of the retained prefix.

Definition (Lean source)
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u v :
Fin n → ℝ
constraintProjection a q u v :
Fin n → ℝ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.constraintProjection · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:43
def nullspaceBasis

Process projected standard basis vectors in index order.

Definition (Lean source)
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
nullspaceBasis a q u :
List (Fin n → ℝ)
orderedOrtho ((finRange n).map (fun j => constraintProjection a q u (fun i => if i = j then 1 else 0)))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:47
def finiteMin

Finite minimum, in original index order.

Definition (Lean source)
xs :
List ℝ
finiteMin xs :
ℝ
match xs with | [] => 0 | a :: as => as.foldl min a
def boundaryPlus

The positive boundary-hit distance along a nonzero active direction.

Definition (Lean source)
n :
ℕ
shared
u v :
Fin n → ℝ
boundaryPlus u v :
ℝ
finiteMin ((activeIndices u).filterMap (fun i => if 0 < v i then some ((1 - u i) / v i) else if v i < 0 then some ((1 + u i) / (-v i)) else none))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryPlus · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:57
def boundaryMinus

The negative boundary-hit distance.

Definition (Lean source)
n :
ℕ
shared
u v :
Fin n → ℝ
boundaryMinus u v :
ℝ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryMinus · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:62
def inverseCDF

Select with half-open cumulative intervals; seed one selects the last interval.

Definition (Lean source)
n :
ℕ
shared
inverseCDF :
List ((Fin n → ℝ) × ℝ) → ℝ → Fin n → ℝ
clause 1
| [], _ => 0
clause 2
| [(v, _)], _ => v
clause 3
| (v, w) :: rest, t => if t < w then v else inverseCDF rest (t - w)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.inverseCDF · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:64
def roundingStep

One asymmetric boundary move with direction weights proportional to 1/(δ⁺δ⁻).

Definition (Lean source)
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
seed₁ seed₂ :
ℝ
roundingStep a q u seed₁ seed₂ :
Fin n → ℝ
bs :
ws :
bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)
S :
ws.sum
v :
inverseCDF (bs.zip (ws.map (fun w => w / S))) seed₁
dp :
dm :
if seed₂ < dm / (dp + dm) then u + dp • v else u - dm • v
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:69
def RoundingState

State is (fractional vector, phase stopping count, retained constraint count).

Definition (Lean source)
n :
ℕ
RoundingState n :
Type
(Fin n → ℝ) × ℕ × ℕ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.RoundingState · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:79
def phaseMove

A move preserves the phase prefix until the phase stopping count is reached. Only at a new phase start is an active count at most three independently rounded, one coordinate per move with its own seed.

Definition (Lean source)
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ seed₂ :
ℝ
phaseMove a st seed₁ seed₂ :
u :
st.1
active :
r :
active.length
if r ≤ st.2.1 ∧
r
≤ 3 then match active with | [] => st | i :: _ => (update u i (if seed₂ < (1 + u i) / 2 then 1 else -1), n, 0) else let stop := if r ≤ st.2.1 then r / 2 else st.2.1 let q := if r ≤ st.2.1 then r / 4 else st.2.2 (roundingStep a q u seed₁ seed₂, stop, q)
def RoundingSeeds

Uniform independent seeds, represented as 3n coordinates.

Definition (Lean source)
n :
ℕ
RoundingSeeds n :
Type
Fin (3 * n) → ℝ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.RoundingSeeds · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:97
def roundingSeed

Read a seed; out-of-range padding is never used during the n actual moves.

Definition (Lean source)
n :
ℕ
shared
seeds :
h :
ℕ
roundingSeed seeds h :
ℝ
if hh : h < 3 * n then seeds ⟨h, hh⟩ else 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingSeed · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:99

Structural k-step fractional-state iteration.

Definition (Lean source)
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
roundingIteration a seeds :
ℕ → RoundingState n
clause 1
| 0 => (0, n, 0)
clause 2
| k + 1
=> phaseMove a (roundingIteration a seeds k) (roundingSeed seeds (2 * k)) (roundingSeed seeds (2 * k + 1))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:102
def orderedBoundaryRounding

The prescribed finite exact-real randomized signing map.

Definition (Lean source)
n :
ℕ
a :
Fin (n / 4) → Fin n → ℝ
seeds :
orderedBoundaryRounding n a seeds :
fun i => decide (0 < (roundingIteration a seeds n).1 i)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedBoundaryRounding · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:110
def roundingSeedLaw

Independent uniform seed law.

Definition (Lean source)
n :
ℕ
roundingSeedLaw n :
cubeMeasure (3 * n)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingSeedLaw · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:114
def rowPrefix

Prefix supplied to the algorithm; rows are numbered starting at one.

Definition (Lean source)
n :
ℕ
shared
rows :
ℕ → Fin n → ℝ
rowPrefix rows :
Fin (n / 4) → Fin n → ℝ
fun h => rows (h.val + 1)

Active membership is exactly strict interior membership of the coordinate.](goal) This uses the stated conclusion.

Formal statement
n :
ℕ
shared
u :
Fin n → ℝ
i :
Fin n
i ∈ activeIndices u ↔ |u i| < 1
Proof (Lean source)
-- @node: mem_activeIndices lemma mem_activeIndices (u : Fin n → ℝ) (i : Fin n) : i ∈ activeIndices u ↔ |u i| < 1 := by simp [activeIndices]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mem_activeIndices · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:120

Taking a finite nonempty minimum preserves strict positivity. Under the stated conditions, the asserted mathematical result follows.

Formal statement
xs :
List ℝ
hne :
xs ≠ []
hpos :
∀ x ∈ xs, 0 < x
0 < finiteMin xs
Proof (Lean source)
-- @node: finiteMin_pos lemma finiteMin_pos (xs : List ℝ) (hne : xs ≠ []) (hpos : ∀ x ∈ xs, 0 < x) : 0 < finiteMin xs := by have hf (ys : List ℝ) : ∀ a : ℝ, 0 < a → (∀ y ∈ ys, 0 < y) → 0 < ys.foldl min a := by induction ys with | nil => intro a ha _; exact ha | cons y ys ih => intro a ha hy exact ih (min a y) (lt_min ha (hy y (by simp))) (fun z hz => hy z (by simp [hz])) cases xs with | nil => exact (hne rfl).elim | cons x xs => exact hf xs x (hpos x (by simp)) (fun y hy => hpos y (by simp [hy]))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteMin_pos · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:126

A nonempty finite minimum is one of the entries and is no larger than any entry. Under the stated conditions.

Formal statement
xs :
List ℝ
hne :
xs ≠ []
conclusion 1
finiteMin xs ∈ xs
conclusion 2
x ∈ xs :
finiteMin xs ≤ x
Proof (Lean source)
-- @node: finiteMin_spec lemma finiteMin_spec (xs : List ℝ) (hne : xs ≠ []) : finiteMin xs ∈ xs ∧ ∀ x ∈ xs, finiteMin xs ≤ x := by have hf (ys : List ℝ) : ∀ a : ℝ, ys.foldl min a ∈ a :: ys ∧ ∀ x ∈ a :: ys, ys.foldl min a ≤ x := by induction ys with | nil => intro a; simp | cons y ys ih => intro a obtain ⟨hm, hl⟩ := ih (min a y) constructor · rcases List.mem_cons.mp hm with hm | hm · change ys.foldl min (min a y) ∈ a :: y :: ys rw [hm] rcases le_total a y with h | h · simp [min_eq_left h] · simp [min_eq_right h] · simp [hm] · intro x hx have hmin := hl (min a y) (by simp) rcases List.mem_cons.mp hx with rfl | hx · exact hmin.trans (min_le_left _ _) · rcases List.mem_cons.mp hx with rfl | hx · exact hmin.trans (min_le_right _ _) · exact hl x (by simp [hx]) cases xs with | nil => exact (hne rfl).elim | cons x xs => exact hf xs x
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteMin_spec · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:143

A nonzero direction supported inside the active coordinates has positive positive boundary distance; sign guards keep every candidate denominator positive. Under the stated conditions.

Formal statement
n :
ℕ
shared
u v :
Fin n → ℝ
hsupport :
∀ i
if
v i ≠ 0
then
|u i| < 1
hv :
v ≠ 0
0 < boundaryPlus u v
Proof (Lean source)
-- @node: boundaryPlus_pos lemma boundaryPlus_pos (u v : Fin n → ℝ) (hsupport : ∀ i, v i ≠ 0 → |u i| < 1) (hv : v ≠ 0) : 0 < boundaryPlus u v := by unfold boundaryPlus apply finiteMin_pos · intro he have hex : ∃ i, v i ≠ 0 := by by_contra h apply hv funext i simpa using (not_exists.mp h i) obtain ⟨i, hi⟩ := hex have hm : i ∈ activeIndices u := (mem_activeIndices u i).mpr (hsupport i hi) have hc : ∃ t : ℝ, (if 0 < v i then some ((1 - u i) / v i) else if v i < 0 then some ((1 + u i) / (-v i)) else none) = some t := by rcases lt_or_gt_of_ne hi with hn | hp · exact ⟨(1 + u i) / (-v i), by simp [hn, not_lt.mpr hn.le]⟩ · exact ⟨(1 - u i) / v i, by simp [hp]⟩ obtain ⟨t, ht⟩ := hc have : t ∈ (activeIndices u).filterMap (fun i => if 0 < v i then some ((1 - u i) / v i) else if v i < 0 then some ((1 + u i) / (-v i)) else none) := by exact List.mem_filterMap.mpr ⟨i, hm, ht⟩ rw [he] at this simp at this · intro t ht obtain ⟨i, hi, ht⟩ := List.mem_filterMap.mp ht have hu := (abs_lt.mp ((mem_activeIndices u i).mp hi)) split_ifs at ht with hp hn · have he := Option.some.inj ht rw [← he] exact div_pos (by linarith) hp · have he := Option.some.inj ht rw [← he] exact div_pos (by linarith) (neg_pos.mpr hn)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryPlus_pos · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:173

Moving by the positive boundary distance stays inside the cube and hits a boundary. This uses the actual finite minimum, without a symmetry or generic-position assumption. Under the stated conditions.

Formal statement
n :
ℕ
shared
u v :
Fin n → ℝ
hu :
∀ i, |u i| ≤ 1
hsupport :
∀ i
if
v i ≠ 0
then
|u i| < 1
hv :
v ≠ 0
conclusion 1
i :
|u i + boundaryPlus u v * v i| ≤ 1
conclusion 2
∃ i,
|u i| < 1
|u i + boundaryPlus u v * v i| = 1
Proof (Lean source)
-- @node: boundaryPlus_hits_cube lemma boundaryPlus_hits_cube (u v : Fin n → ℝ) (hu : ∀ i, |u i| ≤ 1) (hsupport : ∀ i, v i ≠ 0 → |u i| < 1) (hv : v ≠ 0) : (∀ i, |u i + boundaryPlus u v * v i| ≤ 1) ∧ (∃ i, |u i| < 1 ∧ |u i + boundaryPlus u v * v i| = 1) := by let candidates := (activeIndices u).filterMap (fun i => if 0 < v i then some ((1 - u i) / v i) else if v i < 0 then some ((1 + u i) / (-v i)) else none) have hp := boundaryPlus_pos u v hsupport hv have he : candidates ≠ [] := by intro h have hz : boundaryPlus u v = 0 := by change finiteMin candidates = 0 rw [h] rfl linarith have hspec := finiteMin_spec candidates he have hmin (t : ℝ) (ht : t ∈ candidates) : boundaryPlus u v ≤ t := hspec.2 t ht constructor · intro i have hui := abs_le.mp (hu i) apply abs_le.mpr rcases lt_trichotomy (v i) 0 with hn | hz | hn · have hm : (1 + u i) / (-v i) ∈ candidates := by apply List.mem_filterMap.mpr exact ⟨i, (mem_activeIndices u i).mpr (hsupport i hn.ne), by simp [hn, not_lt.mpr hn.le]⟩ have hh := (le_div_iff₀ (neg_pos.mpr hn)).mp (hmin _ hm) have hprod : boundaryPlus u v * v i ≤ 0 := mul_nonpos_of_nonneg_of_nonpos hp.le hn.le constructor <;> nlinarith · simp only [hz, mul_zero, add_zero] exact hui · have hm : (1 - u i) / v i ∈ candidates := by apply List.mem_filterMap.mpr exact ⟨i, (mem_activeIndices u i).mpr (hsupport i hn.ne'), by simp [hn]⟩ have hh := (le_div_iff₀ hn).mp (hmin _ hm) have hprod : 0 ≤ boundaryPlus u v * v i := mul_nonneg hp.le hn.le constructor <;> linarith · obtain ⟨i, hi, ht⟩ := List.mem_filterMap.mp hspec.1 refine ⟨i, (mem_activeIndices u i).mp hi, ?_⟩ change (if 0 < v i then some ((1 - u i) / v i) else if v i < 0 then some ((1 + u i) / (-v i)) else none) = some (boundaryPlus u v) at ht split_ifs at ht with hn hn · have ht := Option.some.inj ht have hh := (div_eq_iff hn.ne').mp ht rw [show u i + boundaryPlus u v * v i = 1 by linarith] norm_num · have ht := Option.some.inj ht have hh := (div_eq_iff (neg_ne_zero.mpr hn.ne)).mp ht rw [show u i + boundaryPlus u v * v i = -1 by nlinarith] norm_num
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryPlus_hits_cube · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:213

Reversing a nonzero active direction gives a positive negative boundary distance. Under the stated conditions.

Formal statement
n :
ℕ
shared
u v :
Fin n → ℝ
hsupport :
∀ i
if
v i ≠ 0
then
|u i| < 1
hv :
v ≠ 0
Proof (Lean source)
-- @node: boundaryMinus_pos lemma boundaryMinus_pos (u v : Fin n → ℝ) (hsupport : ∀ i, v i ≠ 0 → |u i| < 1) (hv : v ≠ 0) : 0 < boundaryMinus u v := by apply boundaryPlus_pos u (-v) · intro i hi apply hsupport i simpa using hi · simpa using hv
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryMinus_pos · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:268
theorem boundary_coin_probability Lemma boundary_coin_probability in the paper ↗

The asymmetric boundary coin is a probability strictly between zero and one. Under the stated conditions.

Formal statement
dp dm :
ℝ
hp :
0 < dp
hm :
0 < dm
conclusion 1
0 < dm / (dp + dm)
conclusion 2
dm / (dp + dm) < 1
Proof (Lean source)
-- @node: boundary_coin_probability lemma boundary_coin_probability (dp dm : ℝ) (hp : 0 < dp) (hm : 0 < dm) : 0 < dm / (dp + dm) ∧ dm / (dp + dm) < 1 := by have hd : 0 < dp + dm := add_pos hp hm exact ⟨div_pos hm hd, (div_lt_one hd).mpr (by linarith)⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundary_coin_probability · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:279
theorem boundary_coin_mean_zero Lemma boundary_coin_mean_zero in the paper ↗

The prescribed asymmetric coin makes each direction increment mean zero. Under the stated conditions.

Formal statement
dp dm :
ℝ
hp :
0 < dp
hm :
0 < dm
dm / (dp + dm) * dp + (1 - dm / (dp + dm)) * (-dm) = 0
Proof (Lean source)
-- @node: boundary_coin_mean_zero lemma boundary_coin_mean_zero (dp dm : ℝ) (hp : 0 < dp) (hm : 0 < dm) : dm / (dp + dm) * dp + (1 - dm / (dp + dm)) * (-dm) = 0 := by have hd : dp + dm ≠ 0 := ne_of_gt (add_pos hp hm) field_simp ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundary_coin_mean_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:286
theorem boundary_coin_second_moment Lemma boundary_coin_second_moment in the paper ↗

The scalar increment variance is exactly the product of the two boundary distances. Under the stated conditions.

Formal statement
dp dm :
ℝ
hp :
0 < dp
hm :
0 < dm
dm / (dp + dm) * dp ^ 2 + (1 - dm / (dp + dm)) * (-dm) ^ 2 = dp * dm
Proof (Lean source)
-- @node: boundary_coin_second_moment lemma boundary_coin_second_moment (dp dm : ℝ) (hp : 0 < dp) (hm : 0 < dm) : dm / (dp + dm) * dp ^ 2 + (1 - dm / (dp + dm)) * (-dm) ^ 2 = dp * dm := by have hd : dp + dm ≠ 0 := ne_of_gt (add_pos hp hm) field_simp ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundary_coin_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:294

The active-coordinate list has no repetitions. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
u :
Fin n → ℝ
Proof (Lean source)
-- @node: activeIndices_nodup lemma activeIndices_nodup (u : Fin n → ℝ) : (activeIndices u).Nodup := by exact List.Nodup.filter _ (List.nodup_finRange n)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.activeIndices_nodup · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:302
theorem activeIndices_strict_decrease Lemma activeIndices_strict_decrease in the paper ↗

A cube move that fixes inactive coordinates and hits a new boundary strictly reduces the active count, regardless of the number of other simultaneous hits. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
u w :
Fin n → ℝ
hfix :
∀ j
if
¬|u j| < 1
then
w j = u j
hhit :
∃ i, |u i| < 1 ∧ |w i| = 1
Proof (Lean source)
-- @node: activeIndices_strict_decrease lemma activeIndices_strict_decrease (u w : Fin n → ℝ) (hfix : ∀ j, ¬|u j| < 1 → w j = u j) (hhit : ∃ i, |u i| < 1 ∧ |w i| = 1) : (activeIndices w).length < (activeIndices u).length := by obtain ⟨i, hi, hwi⟩ := hhit have he : activeIndices w = ((activeIndices u).erase i).filter (fun j => decide (|w j| < 1)) := by rw [(activeIndices_nodup u).erase_eq_filter] unfold activeIndices rw [List.filter_filter, List.filter_filter] apply List.filter_congr intro j _ by_cases hji : j = i · subst j simp [hwi] · by_cases hj : |u j| < 1 · simp [hji, hj] · simp [hj, hfix j hj] rw [he] have hle := List.length_filter_le (fun j => decide (|w j| < 1)) ((activeIndices u).erase i) have hm := (mem_activeIndices u i).mpr hi rw [List.length_erase_of_mem hm] at hle have hpos := List.length_pos_of_mem hm omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.activeIndices_strict_decrease · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:307
theorem boundaryPlus_active_progress Lemma boundaryPlus_active_progress in the paper ↗

A positive boundary move fixes inactive coordinates and strictly decreases their count. Under the stated conditions.

Formal statement
n :
ℕ
shared
u v :
Fin n → ℝ
hu :
∀ i, |u i| ≤ 1
hsupport :
∀ i
if
v i ≠ 0
then
|u i| < 1
hv :
v ≠ 0
(activeIndices (fun i => u i + boundaryPlus u v * v i)).length < (activeIndices u).length
Proof (Lean source)
-- @node: boundaryPlus_active_progress lemma boundaryPlus_active_progress (u v : Fin n → ℝ) (hu : ∀ i, |u i| ≤ 1) (hsupport : ∀ i, v i ≠ 0 → |u i| < 1) (hv : v ≠ 0) : (activeIndices (fun i => u i + boundaryPlus u v * v i)).length < (activeIndices u).length := by apply activeIndices_strict_decrease · intro j hj have hz : v j = 0 := by by_contra h exact hj (hsupport j h) simp [hz] · exact (boundaryPlus_hits_cube u v hu hsupport hv).2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryPlus_active_progress · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:335
theorem boundaryMinus_hits_cube_and_progress Lemma boundaryMinus_hits_cube_and_progress in the paper ↗

Negative boundary moves have the same cube and progress guarantees by direction reversal. Under the stated conditions.

Formal statement
n :
ℕ
shared
u v :
Fin n → ℝ
hu :
∀ i, |u i| ≤ 1
hsupport :
∀ i
if
v i ≠ 0
then
|u i| < 1
hv :
v ≠ 0
conclusion 1
i :
|u i - boundaryMinus u v * v i| ≤ 1
conclusion 2
(activeIndices (fun i => u i - boundaryMinus u v * v i)).length < (activeIndices u).length
Proof (Lean source)
-- @node: boundaryMinus_hits_cube_and_progress lemma boundaryMinus_hits_cube_and_progress (u v : Fin n → ℝ) (hu : ∀ i, |u i| ≤ 1) (hsupport : ∀ i, v i ≠ 0 → |u i| < 1) (hv : v ≠ 0) : (∀ i, |u i - boundaryMinus u v * v i| ≤ 1) ∧ (activeIndices (fun i => u i - boundaryMinus u v * v i)).length < (activeIndices u).length := by have hs : ∀ i, (-v) i ≠ 0 → |u i| < 1 := by intro i hi apply hsupport i simpa using hi have hn : -v ≠ 0 := by simpa using hv have hc := (boundaryPlus_hits_cube u (-v) hu hs hn).1 have hp := boundaryPlus_active_progress u (-v) hu hs hn simpa only [boundaryMinus, Pi.neg_apply, mul_neg, sub_eq_add_neg] using intro hc hp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryMinus_hits_cube_and_progress · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:349
theorem roundingStep_progress_of_direction Lemma roundingStep_progress_of_direction in the paper ↗

Once the selected nullspace direction is nonzero and active-supported, the actual asymmetric rounding step preserves the cube and makes strict progress. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
seed₁ seed₂ :
ℝ
hu :
∀ i, |u i| ≤ 1
bs :
ws :
bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)
v :
inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁
(∀ i, v i ≠ 0 → |u i| < 1)
v ≠ 0
i :
|roundingStep a q u seed₁ seed₂ i| ≤ 1
(activeIndices (roundingStep a q u seed₁ seed₂)).length < (activeIndices u).length
Proof (Lean source)
-- @node: roundingStep_progress_of_direction lemma roundingStep_progress_of_direction (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (seed₁ seed₂ : ℝ) (hu : ∀ i, |u i| ≤ 1) : let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ (∀ i, v i ≠ 0 → |u i| < 1) → v ≠ 0 → (∀ i, |roundingStep a q u seed₁ seed₂ i| ≤ 1) ∧ (activeIndices (roundingStep a q u seed₁ seed₂)).length < (activeIndices u).length := by dsimp only intro hs hv let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ change (∀ i, v i ≠ 0 → |u i| < 1) at hs change v ≠ 0 at hv change (∀ i, |(if seed₂ < boundaryMinus u v / (boundaryPlus u v + boundaryMinus u v) then u + boundaryPlus u v • v else u - boundaryMinus u v • v) i| ≤ 1) ∧ (activeIndices (if seed₂ < boundaryMinus u v / (boundaryPlus u v + boundaryMinus u v) then u + boundaryPlus u v • v else u - boundaryMinus u v • v)).length < (activeIndices u).length split_ifs · exact ⟨(boundaryPlus_hits_cube u v hu hs hv).1, boundaryPlus_active_progress u v hu hs hv⟩ · exact boundaryMinus_hits_cube_and_progress u v hu hs hv
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_progress_of_direction · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:365
theorem activeIndices_update_boundary Lemma activeIndices_update_boundary in the paper ↗

Setting a coordinate to a boundary value removes exactly that active index. Under the stated conditions.

Formal statement
n :
ℕ
shared
u :
Fin n → ℝ
i :
Fin n
b :
ℝ
hb :
|b| = 1
activeIndices (update u i b) = (activeIndices u).erase i
Proof (Lean source)
-- @node: activeIndices_update_boundary lemma activeIndices_update_boundary (u : Fin n → ℝ) (i : Fin n) (b : ℝ) (hb : |b| = 1) : activeIndices (update u i b) = (activeIndices u).erase i := by rw [(activeIndices_nodup u).erase_eq_filter] unfold activeIndices rw [List.filter_filter] apply List.filter_congr intro j _ by_cases hji : j = i · subst j simp [hb] · simp [hji]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.activeIndices_update_boundary · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:393
theorem terminal_update_progress Lemma terminal_update_progress in the paper ↗

A terminal boundary update removes one active coordinate and preserves the cube. Under the stated conditions.

Formal statement
n :
ℕ
shared
u :
Fin n → ℝ
i :
Fin n
b :
ℝ
hu :
∀ j, |u j| ≤ 1
hi :
|u i| < 1
hb :
|b| = 1
conclusion 1
j :
|update u i b j| ≤ 1
conclusion 2
Proof (Lean source)
-- @node: terminal_update_progress lemma terminal_update_progress (u : Fin n → ℝ) (i : Fin n) (b : ℝ) (hu : ∀ j, |u j| ≤ 1) (hi : |u i| < 1) (hb : |b| = 1) : (∀ j, |update u i b j| ≤ 1) ∧ (activeIndices (update u i b)).length = (activeIndices u).length - 1 := by constructor · intro j by_cases hji : j = i · subst j; simp [hb] · simpa [Function.update_of_ne hji] using hu j · rw [activeIndices_update_boundary u i b hb] exact List.length_erase_of_mem ((mem_activeIndices u i).mpr hi)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_update_progress · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:408
theorem phaseMove_terminal_progress Lemma phaseMove_terminal_progress in the paper ↗

The actual terminal branch preserves the cube and strictly decreases the active count. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ seed₂ :
ℝ
hu :
∀ j, |st.1 j| ≤ 1
hsmall :
(activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3
hne :
activeIndices st.1 ≠ []
conclusion 1
j :
|(phaseMove a st seed₁ seed₂).1 j| ≤ 1
conclusion 2
(activeIndices (phaseMove a st seed₁ seed₂).1).length < (activeIndices st.1).length
Proof (Lean source)
-- @node: phaseMove_terminal_progress lemma phaseMove_terminal_progress (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (seed₁ seed₂ : ℝ) (hu : ∀ j, |st.1 j| ≤ 1) (hsmall : (activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3) (hne : activeIndices st.1 ≠ []) : (∀ j, |(phaseMove a st seed₁ seed₂).1 j| ≤ 1) ∧ (activeIndices (phaseMove a st seed₁ seed₂).1).length < (activeIndices st.1).length := by cases ha : activeIndices st.1 with | nil => exact (hne ha).elim | cons i is => have hi : |st.1 i| < 1 := (mem_activeIndices st.1 i).mp (by rw [ha]; simp) have hb : |(if seed₂ < (1 + st.1 i) / 2 then (1 : ℝ) else -1)| = 1 := by split_ifs <;> norm_num have ht := terminal_update_progress st.1 i _ hu hi hb have hstep : (phaseMove a st seed₁ seed₂).1 = update st.1 i (if seed₂ < (1 + st.1 i) / 2 then 1 else -1) := by dsimp only [phaseMove] rw [if_pos hsmall] simp only [ha] rw [hstep] refine ⟨ht.1, ?_⟩ rw [ht.2, ha] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_terminal_progress · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:422

Terminal single-coordinate rounding preserves its current conditional mean. The asserted mathematical result follows.

Formal statement
u :
ℝ
((1 + u) / 2) * 1 + (1 - (1 + u) / 2) * (-1) = u
Proof (Lean source)
-- @node: terminal_coin_mean lemma terminal_coin_mean (u : ℝ) : ((1 + u) / 2) * 1 + (1 - (1 + u) / 2) * (-1) = u := by ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_coin_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:448
theorem terminal_coin_increment_second_moment Lemma terminal_coin_increment_second_moment in the paper ↗

The terminal centered increment has variance one minus the current squared coordinate.

Formal statement
u :
ℝ
((1 + u) / 2) * (1 - u) ^ 2 + (1 - (1 + u) / 2) * (-1 - u) ^ 2 = 1 - u ^ 2
Proof (Lean source)
-- @node: terminal_coin_increment_second_moment lemma terminal_coin_increment_second_moment (u : ℝ) : ((1 + u) / 2) * (1 - u) ^ 2 + (1 - (1 + u) / 2) * (-1 - u) ^ 2 = 1 - u ^ 2 := by ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_coin_increment_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OrderedRoundingCore.lean:454
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.OutcomeLaws 33 declarations Concrete Gaussian completions and the finite-support witness used by the published class bridge, with their probability and conditional-prognosis properties.

Single-unit outcome laws

Concrete Gaussian completions and the finite-support witness used by the published class bridge, with their probability and conditional-prognosis properties.

def gaussianOutcomeMap

[ The single-unit Gaussian completion map.

Definition (Lean source)
d :
ℕ
hd :
0 < d
m :
ω :
Cube d × ℝ × ℝ
gaussianOutcomeMap hd m ω :
Cube d × ℝ × ℝ
(ω.1, m.val ω.1 - tauFn hd ω.1 / 2 + ω.2.1, m.val ω.1 + tauFn hd ω.1 / 2 + ω.2.2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeMap · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:17
def gaussianOutcomeMeasure

The single-unit Gaussian completion measure.

Definition (Lean source)
d :
ℕ
hd :
0 < d
m :
gaussianOutcomeMeasure hd m :
Measure (Cube d × ℝ × ℝ)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeMeasure · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:22
theorem cubeMeasure_probability

The uniform cube sampling measure has total mass one.](goal) This uses the stated conclusion.

Formal statement
d :
ℕ
Proof (Lean source)
-- @node: cubeMeasure_probability lemma cubeMeasure_probability (d : ℕ) : IsProbabilityMeasure (cubeMeasure d) := by let : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ unfold cubeMeasure infer_instance
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cubeMeasure_probability · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:27
theorem gaussianOutcomeMeasure_probability

The concrete Gaussian completion has total mass one. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
hd :
0 < d
m :
Proof (Lean source)
-- @node: gaussianOutcomeMeasure_probability lemma gaussianOutcomeMeasure_probability {d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) : IsProbabilityMeasure (gaussianOutcomeMeasure hd m) := by let := cubeMeasure_probability d have hm : Measurable m.val := m.property.1 have hmap : Measurable (gaussianOutcomeMap hd m) := by unfold gaussianOutcomeMap tauFn fun_prop exact Measure.isProbabilityMeasure_map hmap.aemeasurable
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeMeasure_probability · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:35
def gaussianOutcomeLaw

The Gaussian single-unit completion as a probability law.

Definition (Lean source)
d :
ℕ
hd :
0 < d
m :
gaussianOutcomeLaw hd m :
⟨gaussianOutcomeMeasure hd m, gaussianOutcomeMeasure_probability hd m⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeLaw · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:45

Image of the stated Gaussian completion over legal prognostic functions.

Definition (Lean source)
d :
ℕ
hd :
0 < d
s :
ℝ
gaussianLawClass d hd s :
{P | ∃ m : CenteredL2Fn d, SobolevClass d s m ∧ P = gaussianOutcomeLaw hd m}
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianLawClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:48
def twoPointOutcomeMeasure

Two equal ±1 potential outcomes, independent of the uniform covariate.

Definition (Lean source)
d :
ℕ
twoPointOutcomeMeasure d :
Measure (Cube d × ℝ × ℝ)
((cubeMeasure d).prod ((uniformOfFintype Bool).toMeasure)).map (fun ω => (ω.1, sgn ω.2, sgn ω.2))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoPointOutcomeMeasure · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:51
theorem twoPointOutcomeMeasure_probability Lemma twoPointOutcomeMeasure_probability in the paper ↗

The explicit two-point witness has total mass one. The asserted mathematical result follows.

Formal statement
d :
ℕ
Proof (Lean source)
-- @node: twoPointOutcomeMeasure_probability lemma twoPointOutcomeMeasure_probability (d : ℕ) : IsProbabilityMeasure (twoPointOutcomeMeasure d) := by let := cubeMeasure_probability d have hmap : Measurable (fun ω : Cube d × Bool => (ω.1, sgn ω.2, sgn ω.2)) := by fun_prop exact Measure.isProbabilityMeasure_map hmap.aemeasurable
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoPointOutcomeMeasure_probability · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:55
def twoPointOutcomeLaw

The explicit non-Gaussian completion witness.

Definition (Lean source)
d :
ℕ
twoPointOutcomeLaw d :
⟨twoPointOutcomeMeasure d, twoPointOutcomeMeasure_probability d⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoPointOutcomeLaw · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:63
theorem gaussianOutcomeMap_measurable

The Gaussian outcome map is Borel for every legal representative. This uses the hd hypothesis, the stated conclusion.

Formal statement
d :
ℕ
hd :
0 < d
m :
Proof (Lean source)
@[fun_prop] -- @node: gaussianOutcomeMap_measurable lemma gaussianOutcomeMap_measurable {d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) : Measurable (gaussianOutcomeMap hd m) := by have hm : Measurable m.val := m.property.1 unfold gaussianOutcomeMap tauFn fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeMap_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:67
theorem gaussianOutcomeLaw_covMarginal

The completion preserves the uniform covariate marginal. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
hd :
0 < d
m :
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeLaw_covMarginal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:76
theorem gaussianOutcomeLaw_finiteMoments

Both completed potential outcomes have finite second moments. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
m :
Proof (Lean source)
-- @node: gaussianOutcomeLaw_finiteMoments lemma gaussianOutcomeLaw_finiteMoments {d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) : FiniteOutcomeMoments (gaussianOutcomeLaw hd m) := by let := cubeMeasure_probability d have hm := m.property.2.1.comp_fst ((gaussianReal 0 1).prod (gaussianReal 0 1)) have ht := (tauFn_memLp hd).comp_fst ((gaussianReal 0 1).prod (gaussianReal 0 1)) have hg : MemLp (id : ℝ → ℝ) 2 (gaussianReal 0 1) := memLp_id_gaussianReal 2 have he0 := (hg.comp_fst (gaussianReal 0 1)).comp_snd (cubeMeasure d) have he1 := (hg.comp_snd (gaussianReal 0 1)).comp_snd (cubeMeasure d) constructor · change MemLp (fun ω : Cube d × ℝ × ℝ => ω.2.1) 2 (Measure.map (gaussianOutcomeMap hd m) _) rw [memLp_map_measure_iff (by fun_prop) (gaussianOutcomeMap_measurable hd m).aemeasurable] convert (hm.sub (ht.mul_const (2 : ℝ)⁻¹)).add he0 using 1 · simp [Function.comp_def, gaussianOutcomeMap, div_eq_mul_inv] rfl · change MemLp (fun ω : Cube d × ℝ × ℝ => ω.2.2) 2 (Measure.map (gaussianOutcomeMap hd m) _) rw [memLp_map_measure_iff (by fun_prop) (gaussianOutcomeMap_measurable hd m).aemeasurable] convert (hm.add (ht.mul_const (2 : ℝ)⁻¹)).add he1 using 1 · simp [Function.comp_def, gaussianOutcomeMap, div_eq_mul_inv] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeLaw_finiteMoments · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:88
def gaussianUnitKernel

[ The conditional Gaussian outcome distribution draws two independent unit noises.

Definition (Lean source)
d :
ℕ
hd :
0 < d
m :
gaussianUnitKernel hd m :
Kernel (Cube d) (ℝ × ℝ)
⟨fun x
=> ((gaussianReal 0 1).prod (gaussianReal 0 1)).map (fun e => (gaussianOutcomeMap hd m (x, e)).2), by have hj : Measurable (fun ω : Cube d × ℝ × ℝ => (gaussianOutcomeMap hd m ω).2) := by exact (gaussianOutcomeMap_measurable hd m).snd have h := (Measure.measurable_map _ hj).comp (Measurable.map_prodMk_left (ν := (gaussianReal 0 1).prod (gaussianReal 0 1)) (α := Cube d)) simpa only [Function.comp_def, Measure.map_map hj measurable_prodMk_left] using h⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianUnitKernel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:114
instance gaussianUnitKernel_markov

The explicit conditional outcome distribution is a Markov kernel.

Definition (Lean source)
-- @node: gaussianUnitKernel_markov instance gaussianUnitKernel_markov {d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) : IsMarkovKernel (gaussianUnitKernel hd m) := by constructor intro x have hm : Measurable m.val := m.property.1 change IsProbabilityMeasure (Measure.map (fun e => (gaussianOutcomeMap hd m (x, e)).2) _) exact Measure.isProbabilityMeasure_map (((gaussianOutcomeMap_measurable hd m).comp measurable_prodMk_left).snd.aemeasurable)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianUnitKernel_markov · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:127
theorem gaussianOutcomeMeasure_disintegration

Disintegrating the completion recovers the explicit conditional Gaussian kernel.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
d :
ℕ
hd :
0 < d
m :
Proof (Lean source)
-- @node: gaussianOutcomeMeasure_disintegration lemma gaussianOutcomeMeasure_disintegration {d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) : gaussianOutcomeMeasure hd m = cubeMeasure d ⊗ₘ gaussianUnitKernel hd m := by let := cubeMeasure_probability d have hm : Measurable m.val := m.property.1 ext s hs rw [gaussianOutcomeMeasure, Measure.map_apply (gaussianOutcomeMap_measurable hd m) hs, Measure.prod_apply ((gaussianOutcomeMap_measurable hd m) hs), Measure.compProd_apply hs] congr 1 funext x change _ = Measure.map (fun e => (gaussianOutcomeMap hd m (x, e)).2) _ _ have hf : Measurable (fun e : ℝ × ℝ => (gaussianOutcomeMap hd m (x, e)).2) := ((gaussianOutcomeMap_measurable hd m).comp (measurable_prodMk_left (x := x))).snd rw [Measure.map_apply hf (measurable_prodMk_left hs)] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeMeasure_disintegration · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:138
theorem gaussianUnitKernel_prognosis

Mean-zero independent Gaussian errors leave the conditional midpoint equal to m. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
m :
x :
Cube d
(∫ y, (y.2 + y.1) / 2 ∂gaussianUnitKernel hd m x) = m.val x
Proof (Lean source)
-- @node: gaussianUnitKernel_prognosis lemma gaussianUnitKernel_prognosis {d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) (x : Cube d) : (∫ y, (y.2 + y.1) / 2 ∂gaussianUnitKernel hd m x) = m.val x := by have hm : Measurable m.val := m.property.1 have he0 : Integrable (fun e : ℝ × ℝ => e.1) ((gaussianReal 0 1).prod (gaussianReal 0 1)) := ((memLp_id_gaussianReal 1).integrable le_rfl).comp_fst _ have he1 : Integrable (fun e : ℝ × ℝ => e.2) ((gaussianReal 0 1).prod (gaussianReal 0 1)) := ((memLp_id_gaussianReal 1).integrable le_rfl).comp_snd _ change (∫ y, (y.2 + y.1) / 2 ∂Measure.map (fun e => (gaussianOutcomeMap hd m (x, e)).2) _) = _ have hfmap : Measurable (fun e : ℝ × ℝ => (gaussianOutcomeMap hd m (x, e)).2) := ((gaussianOutcomeMap_measurable hd m).comp (measurable_prodMk_left (x := x))).snd rw [integral_map hfmap.aemeasurable (by fun_prop)] have hid (e : ℝ × ℝ) : ((gaussianOutcomeMap hd m (x, e)).2.2 + (gaussianOutcomeMap hd m (x, e)).2.1) / 2 = m.val x + (e.2 + e.1) / 2 := by simp only [gaussianOutcomeMap] ring simp_rw [hid] have he : Integrable (fun e : ℝ × ℝ => (e.2 + e.1) / 2) ((gaussianReal 0 1).prod (gaussianReal 0 1)) := by simpa only [Pi.add_apply] using (he1.add he0).div_const 2 rw [integral_add (integrable_const _) he, integral_div, integral_add he1 he0, integral_const] have hf := integral_fun_fst (μ := gaussianReal 0 1) (ν := gaussianReal 0 1) (id : ℝ → ℝ) have hs := integral_fun_snd (μ := gaussianReal 0 1) (ν := gaussianReal 0 1) (id : ℝ → ℝ) simp only [id_eq, integral_id_gaussianReal, smul_zero] at hf hs simp [hf, hs]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianUnitKernel_prognosis · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:155
theorem gaussianOutcomeLaw_prognosis

The law's pinned conditional prognosis agrees almost everywhere with its input. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
m :
Proof (Lean source)
-- @node: gaussianOutcomeLaw_prognosis lemma gaussianOutcomeLaw_prognosis {d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) : prognosisOf (gaussianOutcomeLaw hd m) =ᵐ[cubeMeasure d] m.val := by let := cubeMeasure_probability d let := gaussianOutcomeMeasure_probability hd m have hk := condKernel_compProd (cubeMeasure d) (gaussianUnitKernel hd m) have hk' : (gaussianOutcomeMeasure hd m).condKernel =ᵐ[cubeMeasure d] gaussianUnitKernel hd m := by simpa only [← gaussianOutcomeMeasure_disintegration hd m] using hk filter_upwards [hk'] with x hx change (∫ y, (y.2 + y.1) / 2 ∂(gaussianOutcomeMeasure hd m).condKernel x) = _ rw [hx] exact gaussianUnitKernel_prognosis hd m x
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeLaw_prognosis · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:188

[ Uniform zero-intercept correctly specified published laws.

Definition (Lean source)
d :
ℕ
s :
ℝ
frozenUniformClass d s :
{P | covMarginal P = cubeMeasure d ∧ FiniteOutcomeMoments P ∧ ∃ m : CenteredL2Fn d, SobolevClass d s m ∧ prognosisOf P =ᵐ[cubeMeasure d] m.val}
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frozenUniformClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:203
def publishedPrognosticImage

The complete prognostic image, saturated under Lebesgue null representatives.

Definition (Lean source)
d :
ℕ
s :
ℝ
publishedPrognosticImage d s :
Set (Cube d → ℝ)
{f | ∃ P ∈ frozenUniformClass d s, f =ᵐ[cubeMeasure d] prognosisOf P}
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedPrognosticImage · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:208
def sobolevImage

The outcome class image, saturated under Lebesgue null representatives.

Definition (Lean source)
d :
ℕ
s :
ℝ
sobolevImage d s :
Set (Cube d → ℝ)
{f | ∃ m : CenteredL2Fn d, SobolevClass d s m ∧ f =ᵐ[cubeMeasure d] m.val}
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.sobolevImage · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:211
theorem gaussianOutcomeLaw_mem_frozenUniformClass

Gaussian completions belong to the published uniform class with their chosen prognosis.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
d :
ℕ
hd :
0 < d
s :
ℝ
m :
hm :
Proof (Lean source)
-- @node: gaussianOutcomeLaw_mem_frozenUniformClass lemma gaussianOutcomeLaw_mem_frozenUniformClass {d : ℕ} (hd : 0 < d) {s : ℝ} (m : CenteredL2Fn d) (hm : SobolevClass d s m) : gaussianOutcomeLaw hd m ∈ frozenUniformClass d s := ⟨gaussianOutcomeLaw_covMarginal hd m, gaussianOutcomeLaw_finiteMoments hd m, m, hm, gaussianOutcomeLaw_prognosis hd m⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeLaw_mem_frozenUniformClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:215
theorem gaussianLawClass_subset_frozenUniformClass

The Gaussian family is contained in the arbitrary finite-second-moment uniform class. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
s :
ℝ
Proof (Lean source)
-- @node: gaussianLawClass_subset_frozenUniformClass lemma gaussianLawClass_subset_frozenUniformClass {d : ℕ} (hd : 0 < d) (s : ℝ) : gaussianLawClass d hd s ⊆ frozenUniformClass d s := by rintro P ⟨m, hm, rfl⟩ exact gaussianOutcomeLaw_mem_frozenUniformClass hd m hm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianLawClass_subset_frozenUniformClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:223
theorem publishedPrognosticImage_eq_sobolevImage Lemma publishedPrognosticImage_eq_sobolevImage in the paper ↗

The prognostic image is exactly the Sobolev class modulo cube-null changes; every reverse inclusion is witnessed by the prescribed Gaussian completion. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
s :
ℝ
Proof (Lean source)
-- @node: publishedPrognosticImage_eq_sobolevImage lemma publishedPrognosticImage_eq_sobolevImage (d : ℕ) (hd : 0 < d) (s : ℝ) : publishedPrognosticImage d s = sobolevImage d s := by ext f constructor · rintro ⟨P, hP, hf⟩ obtain ⟨hU, hmom, m, hm, heq⟩ := hP exact ⟨m, hm, hf.trans heq⟩ · rintro ⟨m, hm, hf⟩ exact ⟨gaussianOutcomeLaw hd m, gaussianOutcomeLaw_mem_frozenUniformClass hd m hm, hf.trans (gaussianOutcomeLaw_prognosis hd m).symm⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedPrognosticImage_eq_sobolevImage · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:230
theorem sobolevClass_zero

Zero prognosis has the exact order-two representation and zero pooled budget.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
d :
ℕ
s :
ℝ
hm :
Measurable (fun _ : Cube d => (0 : ℝ)) ∧
MemLp (fun _ : Cube d => (0 : ℝ)) 2 (cubeMeasure d) ∧
(∫ _ : Cube d, (0 : ℝ) ∂cubeMeasure d) = 0
SobolevClass d s ⟨fun _ => 0, hm⟩
Proof (Lean source)
-- @node: sobolevClass_zero lemma sobolevClass_zero (d : ℕ) (s : ℝ) (hm : Measurable (fun _ : Cube d => (0 : ℝ)) ∧ MemLp (fun _ : Cube d => (0 : ℝ)) 2 (cubeMeasure d) ∧ (∫ _ : Cube d, (0 : ℝ) ∂cubeMeasure d) = 0) : SobolevClass d s ⟨fun _ => 0, hm⟩ := by have hg1 (j : Fin d) (u : ℝ) : g1 (fun _ : Cube d => 0) j u = 0 := by simp [g1] have hg2 (j l : Fin d) (u v : ℝ) : g2 (fun _ : Cube d => 0) j l u v = 0 := by simp [g2, hg1] constructor · apply Filter.Eventually.of_forall intro x simp [hg1, hg2] · simp [PooledBudget, hg1, hg2, sobolevNormSq_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.sobolevClass_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:253
theorem twoPointOutcomeMeasure_product

The two-point law is a product of uniform covariates and one fair diagonal sign. The asserted mathematical result follows.

Formal statement
d :
ℕ
= (cubeMeasure d).prod (((uniformOfFintype Bool).toMeasure).map (fun b => (sgn b, sgn b)))
Proof (Lean source)
-- @node: twoPointOutcomeMeasure_product lemma twoPointOutcomeMeasure_product (d : ℕ) : twoPointOutcomeMeasure d = (cubeMeasure d).prod (((uniformOfFintype Bool).toMeasure).map (fun b => (sgn b, sgn b))) := by let := cubeMeasure_probability d rw [← Measure.map_id (μ := cubeMeasure d), Measure.map_prod_map _ _ measurable_id (by fun_prop)] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoPointOutcomeMeasure_product · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:269
theorem twoPointOutcomeLaw_covMarginal

The two-point witness retains uniform covariates.

Formal statement
d :
ℕ
Proof (Lean source)
-- @node: twoPointOutcomeLaw_covMarginal lemma twoPointOutcomeLaw_covMarginal (d : ℕ) : covMarginal (twoPointOutcomeLaw d) = cubeMeasure d := by let := cubeMeasure_probability d let : IsProbabilityMeasure (((uniformOfFintype Bool).toMeasure).map (fun b => (sgn b, sgn b))) := Measure.isProbabilityMeasure_map (by fun_prop) change (twoPointOutcomeMeasure d).fst = _ rw [twoPointOutcomeMeasure_product] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoPointOutcomeLaw_covMarginal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:278
theorem twoPointOutcomeLaw_finiteMoments

Bounded two-point outcomes have finite second moments.

Formal statement
d :
ℕ
Proof (Lean source)
-- @node: twoPointOutcomeLaw_finiteMoments lemma twoPointOutcomeLaw_finiteMoments (d : ℕ) : FiniteOutcomeMoments (twoPointOutcomeLaw d) := by let := cubeMeasure_probability d have hb : MemLp sgn 2 (uniformOfFintype Bool).toMeasure := by apply (memLp_const (1 : ℝ)).mono (by fun_prop) filter_upwards with b cases b <;> simp [sgn] have hp := hb.comp_snd (cubeMeasure d) constructor <;> change MemLp _ 2 (Measure.map (fun ω : Cube d × Bool => (ω.1, sgn ω.2, sgn ω.2)) _) all_goals rw [memLp_map_measure_iff (by fun_prop) (by fun_prop)] exact hp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoPointOutcomeLaw_finiteMoments · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:289
theorem twoPointOutcomeLaw_prognosis

The fair diagonal sign has zero conditional midpoint expectation.

Formal statement
d :
ℕ
Proof (Lean source)
-- @node: twoPointOutcomeLaw_prognosis lemma twoPointOutcomeLaw_prognosis (d : ℕ) : prognosisOf (twoPointOutcomeLaw d) =ᵐ[cubeMeasure d] fun _ => 0 := by let := cubeMeasure_probability d let := twoPointOutcomeMeasure_probability d let ν := ((uniformOfFintype Bool).toMeasure).map (fun b => (sgn b, sgn b)) let : IsProbabilityMeasure ν := Measure.isProbabilityMeasure_map (by fun_prop) have hprod : twoPointOutcomeMeasure d = cubeMeasure d ⊗ₘ Kernel.const (Cube d) ν := by rw [Measure.compProd_const] exact twoPointOutcomeMeasure_product d have hk : (twoPointOutcomeMeasure d).condKernel =ᵐ[cubeMeasure d] Kernel.const (Cube d) ν := by simpa only [← hprod] using condKernel_compProd (cubeMeasure d) (Kernel.const (Cube d) ν) filter_upwards [hk] with x hx change (∫ y, (y.2 + y.1) / 2 ∂(twoPointOutcomeMeasure d).condKernel x) = 0 rw [hx] change (∫ y, (y.2 + y.1) / 2 ∂Measure.map (fun b => (sgn b, sgn b)) _) = 0 rw [integral_map (by fun_prop) (by fun_prop)] have heq (b : Bool) : (sgn b + sgn b) / 2 = sgn b := by ring simp_rw [heq] rw [integral_fintype (Integrable.of_finite)] simp [Measure.real, PMF.toMeasure_apply_singleton _ _ (measurableSet_singleton _), PMF.uniformOfFintype_apply, sgn]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoPointOutcomeLaw_prognosis · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:305
theorem twoPointOutcomeLaw_mem_frozenUniformClass

The finite-support witness is legal in every uniform Sobolev law class.

Formal statement
d :
ℕ
s :
ℝ
Proof (Lean source)
-- @node: twoPointOutcomeLaw_mem_frozenUniformClass lemma twoPointOutcomeLaw_mem_frozenUniformClass (d : ℕ) (s : ℝ) : twoPointOutcomeLaw d ∈ frozenUniformClass d s := by have hm : Measurable (fun _ : Cube d => (0 : ℝ)) ∧ MemLp (fun _ : Cube d => (0 : ℝ)) 2 (cubeMeasure d) ∧ (∫ _ : Cube d, (0 : ℝ) ∂cubeMeasure d) = 0 := ⟨measurable_const, MemLp.zero', by simp⟩ exact ⟨twoPointOutcomeLaw_covMarginal d, twoPointOutcomeLaw_finiteMoments d, ⟨fun _ => 0, hm⟩, sobolevClass_zero d s hm, twoPointOutcomeLaw_prognosis d⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoPointOutcomeLaw_mem_frozenUniformClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:329
theorem twoPointOutcomeMeasure_diagonal Lemma twoPointOutcomeMeasure_diagonal in the paper ↗

Equal two-point potential outcomes lie on the diagonal with probability one.

Formal statement
d :
ℕ
twoPointOutcomeMeasure d {ω | ω.2.1 = ω.2.2} = 1
Proof (Lean source)
-- @node: twoPointOutcomeMeasure_diagonal lemma twoPointOutcomeMeasure_diagonal (d : ℕ) : twoPointOutcomeMeasure d {ω | ω.2.1 = ω.2.2} = 1 := by let := cubeMeasure_probability d rw [twoPointOutcomeMeasure, Measure.map_apply (by fun_prop) (measurableSet_eq_fun (by fun_prop) (by fun_prop))] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoPointOutcomeMeasure_diagonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:340
theorem gaussianOutcomeMeasure_diagonal

Independent continuous Gaussian errors give the outcome diagonal probability zero. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
hd :
0 < d
m :
gaussianOutcomeMeasure hd m {ω | ω.2.1 = ω.2.2} = 0
Proof (Lean source)
-- @node: gaussianOutcomeMeasure_diagonal lemma gaussianOutcomeMeasure_diagonal {d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) : gaussianOutcomeMeasure hd m {ω | ω.2.1 = ω.2.2} = 0 := by let := cubeMeasure_probability d let : NullSingletonClass (gaussianReal 0 1) := nullSingletonClass_gaussianReal (by norm_num) rw [gaussianOutcomeMeasure, Measure.map_apply (gaussianOutcomeMap_measurable hd m) (measurableSet_eq_fun (by fun_prop) (by fun_prop)), Measure.prod_apply ((gaussianOutcomeMap_measurable hd m) (measurableSet_eq_fun (by fun_prop) (by fun_prop)))] have hz (x : Cube d) : ((gaussianReal 0 1).prod (gaussianReal 0 1)) {e | m.val x - tauFn hd x / 2 + e.1 = m.val x + tauFn hd x / 2 + e.2} = 0 := by rw [Measure.prod_apply (measurableSet_eq_fun (by fun_prop) (by fun_prop))] have hs (a : ℝ) : {b : ℝ | m.val x - tauFn hd x / 2 + a = m.val x + tauFn hd x / 2 + b} = {a - tauFn hd x} := by ext b simp only [mem_ofPred_eq, mem_singleton_iff] constructor <;> intro h <;> linarith simp only [show ∀ a : ℝ, Prod.mk a ⁻¹' {e : ℝ × ℝ | m.val x - tauFn hd x / 2 + e.1 = m.val x + tauFn hd x / 2 + e.2} = {a - tauFn hd x} from hs, measure_singleton, lintegral_zero] change (∫⁻ x, ((gaussianReal 0 1).prod (gaussianReal 0 1)) {e | m.val x - tauFn hd x / 2 + e.1 = m.val x + tauFn hd x / 2 + e.2} ∂cubeMeasure d) = 0 simp_rw [hz] exact lintegral_zero
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianOutcomeMeasure_diagonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:349
theorem twoPointOutcomeLaw_not_mem_gaussianLawClass

A law supported on equal two-point outcomes cannot be a Gaussian completion. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
s :
ℝ
Proof (Lean source)
-- @node: twoPointOutcomeLaw_not_mem_gaussianLawClass lemma twoPointOutcomeLaw_not_mem_gaussianLawClass {d : ℕ} (hd : 0 < d) (s : ℝ) : twoPointOutcomeLaw d ∉ gaussianLawClass d hd s := by rintro ⟨m, hm, heq⟩ have hmeasure : twoPointOutcomeMeasure d = gaussianOutcomeMeasure hd m := congrArg ProbabilityMeasure.toMeasure heq have hdiag := twoPointOutcomeMeasure_diagonal d rw [hmeasure, gaussianOutcomeMeasure_diagonal hd m] at hdiag exact zero_ne_one hdiag
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoPointOutcomeLaw_not_mem_gaussianLawClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:376
theorem gaussianLawClass_ssubset_frozenUniformClass

The Gaussian inclusion is strict, witnessed by the legal diagonal two-point law. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
s :
ℝ
Proof (Lean source)
-- @node: gaussianLawClass_ssubset_frozenUniformClass lemma gaussianLawClass_ssubset_frozenUniformClass {d : ℕ} (hd : 0 < d) (s : ℝ) : gaussianLawClass d hd s ⊂ frozenUniformClass d s := by refine Set.ssubset_iff_subset_ne.mpr ⟨gaussianLawClass_subset_frozenUniformClass hd s, ?_⟩ intro heq have hmem := twoPointOutcomeLaw_mem_frozenUniformClass d s rw [← heq] at hmem exact twoPointOutcomeLaw_not_mem_gaussianLawClass hd s hmem
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianLawClass_ssubset_frozenUniformClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/OutcomeLaws.lean:387
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.PublishedClass 24 declarations The prognostic function is pinned to each law's conditional kernel.

Published prognostic law classes and exact capacity transfer

The prognostic function is pinned to each law's conditional kernel. The uniform class retains arbitrary square-integrable outcomes; Gaussian completions are a strict subclass. The larger class permits intercepts and fixed covariate-density bounds and receives a converse only. Its original prognostic L² bound is retained.

[ The larger published correctly specified class, with intercepts and a prognostic L² bound.

Definition (Lean source)
d :
ℕ
s lower upper :
ℝ
boundedDensityClass d s lower upper :
{P | CovDensityBounds P lower upper ∧ FiniteOutcomeMoments P ∧ (∫ u, prognosisOf P u ^ 2 ∂covMarginal P) ≤ 1 ∧ ∃ (intercept : ℝ) (m : CenteredL2Fn d), SobolevClass d s m ∧ prognosisOf P =ᵐ[cubeMeasure d] fun u => intercept + m.val u}
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundedDensityClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:23
def sampleCovariates

Covariate projection of the iid single-unit sample.

Definition (Lean source)
n d :
ℕ
xs :
Fin n → Cube d × ℝ × ℝ
sampleCovariates xs :
fun i => (xs i).1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.sampleCovariates · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:29
theorem publishedCovariates_measurable Lemma publishedCovariates_measurable in the paper ↗

Borel measurability of the covariate projection on the full experiment. This uses the stated conclusion.

Formal statement
n d :
ℕ
Measurable (fun ω : (Fin n → Cube d × ℝ × ℝ) × Signs n => sampleCovariates ω.1)
Proof (Lean source)
@[fun_prop] -- @node: publishedCovariates_measurable lemma publishedCovariates_measurable (n d : ℕ) : Measurable (fun ω : (Fin n → Cube d × ℝ × ℝ) × Signs n => sampleCovariates ω.1) := by unfold sampleCovariates fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedCovariates_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:32
theorem publishedExperiment_probability

The iid-outcome experiment is a probability law.](goal) This uses the stated conclusion.

Formal statement
n d :
ℕ
P :
π :
Design n d
Proof (Lean source)
-- @node: publishedExperiment_probability lemma publishedExperiment_probability {n d : ℕ} (P : OutcomeLaw d) (π : Design n d) : IsProbabilityMeasure (publishedExperiment P π) := by let : IsMarkovKernel π.val := π.property unfold publishedExperiment infer_instance
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedExperiment_probability · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:40
def PublishedAdmissible

Published admissibility: iid pre-assignment schedules, conditional fairness and conditional independence given the observed original covariate array.

Definition (Lean source)
n d :
ℕ
π :
Design n d
PublishedAdmissible π :
Prop
clause 1
∀ᵐ x ∂covLaw n d, ∀ i, ∫ z, sgn (z i) ∂π.val x = 0
clause 2
letI := publishedExperiment_probability P π CondIndepFun (comap (fun ω : (Fin n → Cube d × ℝ × ℝ) × Signs n => sampleCovariates ω.1) inferInstance) (publishedCovariates_measurable n d).comap_le (fun ω => ω.2) (fun ω i => (ω.1 i).2) (publishedExperiment P π)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.PublishedAdmissible · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:47
theorem publishedExperiment_eq_of_ae_kernel

Replacing a design on a cube-null set preserves every iid experiment whose covariate marginal is absolutely continuous with respect to the cube law. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d :
ℕ
P :
hac :
π ρ :
Design n d
heq :
(fun x => π.val x) =ᵐ[covLaw n d] (fun x => ρ.val x)
Proof (Lean source)
-- @node: publishedExperiment_eq_of_ae_kernel lemma publishedExperiment_eq_of_ae_kernel {n d : ℕ} (P : OutcomeLaw d) (hac : covMarginal P ≪ cubeMeasure d) (π ρ : Design n d) (heq : (fun x => π.val x) =ᵐ[covLaw n d] (fun x => ρ.val x)) : publishedExperiment P π = publishedExperiment P ρ := by letI := cubeMeasure_probability d letI : IsMarkovKernel π.val := π.property letI : IsMarkovKernel ρ.val := ρ.property letI : IsProbabilityMeasure (covMarginal P) := by unfold covMarginal infer_instance have hmap : (Measure.pi (fun _ : Fin n => P.toMeasure)).map sampleCovariates = Measure.pi (fun _ : Fin n => covMarginal P) := by exact Measure.pi_map_pi (fun _ => measurable_fst.aemeasurable) have hprod := pi_iid_absolutelyContinuous (covMarginal P) (cubeMeasure d) hac n have hsample : ∀ᵐ xs ∂Measure.pi (fun _ : Fin n => P.toMeasure), π.val (sampleCovariates xs) = ρ.val (sampleCovariates xs) := by apply ae_of_ae_map (f := sampleCovariates (n := n) (d := d)) (μ := Measure.pi (fun _ : Fin n => P.toMeasure)) (p := fun x => π.val x = ρ.val x) (by apply aemeasurable unfold sampleCovariates fun_prop) rw [hmap] exact hprod.ae_le heq apply Measure.compProd_congr exact hsample
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedExperiment_eq_of_ae_kernel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:58
theorem outcomeIndependent_of_covariate_kernel

A covariate-only assignment kernel is independent of every outcome mechanism conditional on the covariates, by uniqueness of its conditional distribution. The asserted mathematical result follows.

Formal statement
n d :
ℕ
π :
Design n d
Proof (Lean source)
-- @node: outcomeIndependent_of_covariate_kernel lemma outcomeIndependent_of_covariate_kernel {n d : ℕ} (π : Design n d) : OutcomeIndependentKernel π.val := by intro hπ μX hμ κ hκ letI := hπ letI := hμ letI := hκ let ν := μX ⊗ₘ κ let K : Kernel (Covariates n d × Sched n) (Signs n) := π.val.comap fst measurable_fst let E := ν ⊗ₘ K have hfst : E.map fst = ν := Measure.fst_compProd ν K have hbase : E.map (fun ω => ω.1.1) = μX := by rw [show (fun ω : (Covariates n d × Sched n) × Signs n => ω.1.1) = fst ∘ fst from rfl, ← Measure.map_map measurable_fst measurable_fst, hfst] exact Measure.fst_compProd μX κ have hjoint : E.map (fun ω => (ω.1.1, ω.2)) = μX ⊗ₘ π.val := by apply Measure.ext_prod intro s t hs ht rw [Measure.map_apply (by fun_prop) (hs.prod ht), Measure.compProd_apply_prod hs ht] dsimp only [E] rw [Measure.compProd_apply ((by fun_prop : Measurable (fun ω : (Covariates n d × Sched n) × Signs n => (ω.1.1, ω.2))) (hs.prod ht))] change (∫⁻ xy, K xy {z | (xy.1, z) ∈ s ×ˢ t} ∂ν) = _ have hinner : (fun xy : Covariates n d × Sched n => K xy {z | (xy.1, z) ∈ s ×ˢ t}) = fun xy => s.indicator (fun x => π.val x t) xy.1 := by funext xy by_cases hx : xy.1 ∈ s <;> simp [K, hx, indicator] rw [hinner] dsimp only [ν] rw [Measure.lintegral_compProd (μ := μX) (κ := κ) (f := fun xy => s.indicator (fun x => π.val x t) xy.1) (((Kernel.measurable_coe π.val ht).indicator hs).comp measurable_fst)] simp only [lintegral_const, measure_univ, mul_one] exact lintegral_indicator hs _ have hfull : condDistrib snd fst E =ᵐ[E.map fst] K := by apply condDistrib_ae_eq_of_measure_eq_compProd _ (by fun_prop) rw [hfst] change E.map id = E exact Measure.map_id have hsmall : condDistrib snd (fun ω => ω.1.1) E =ᵐ[μX] π.val := by have h := condDistrib_ae_eq_of_measure_eq_compProd (μ := E) (fun ω => ω.1.1) (Y := snd) (by fun_prop) (κ := π.val) (by rw [hbase]; exact hjoint) rwa [hbase] at h have hsmall' : ∀ᵐ xy ∂ν, condDistrib snd (fun ω => ω.1.1) E xy.1 = π.val xy.1 := by apply ae_of_ae_map (f := fst) (μ := ν) (p := fun x => condDistrib snd (fun ω => ω.1.1) E x = π.val x) measurable_fst.aemeasurable change ∀ᵐ x ∂ν.map fst, _ rw [show ν.map fst = μX from Measure.fst_compProd μX κ] exact hsmall have hci : CondIndepFun (comap (fun ω : (Covariates n d × Sched n) × Signs n => ω.1.1) inferInstance) measurable_fst.fst.comap_le (fun ω => ω.1.2) snd E := by rw [condIndepFun_iff_condDistrib_prod_ae_eq_prodMkRight (by fun_prop) (by fun_prop) (by fun_prop)] change condDistrib snd fst E =ᵐ[E.map fst] (condDistrib snd (fun ω => ω.1.1) E).prodMkRight (Sched n) rw [hfst] at hfull ⊢ filter_upwards [hfull, hsmall'] with xy hxy hx simpa [K, Kernel.prodMkRight, Kernel.comap_apply, hx] using hxy exact hci.symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.outcomeIndependent_of_covariate_kernel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:90

Pushing the base sample through a Borel observation map commutes with drawing an assignment from a kernel that depends only on that observation. Under the stated conditions, the asserted mathematical result follows.

Formal statement
f :
α → β
hf :
κ :
(ν ⊗ₘ κ.comap f hf).map (fun ω => (f ω.1, ω.2)) = ν.map f ⊗ₘ κ
Proof (Lean source)
-- @node: assignment_joint_map lemma assignment_joint_map {α β γ : Type*} [MeasurableSpace α] [MeasurableSpace β] [MeasurableSpace γ] (ν : Measure α) [IsProbabilityMeasure ν] (f : α → β) (hf : Measurable f) (κ : Kernel β γ) [IsMarkovKernel κ] : (ν ⊗ₘ κ.comap f hf).map (fun ω => (f ω.1, ω.2)) = ν.map f ⊗ₘ κ := by apply Measure.ext_prod intro s t hs ht rw [Measure.map_apply (by fun_prop) (hs.prod ht), Measure.compProd_apply_prod hs ht, Measure.compProd_apply ((by fun_prop : Measurable (fun ω : α × γ => (f ω.1, ω.2))) (hs.prod ht))] have hinner : (fun x => κ.comap f hf x {z | (f x, z) ∈ s ×ˢ t}) = fun x => s.indicator (fun y => κ y t) (f x) := by funext x by_cases hx : f x ∈ s <;> simp [hx, indicator] change (∫⁻ x, κ.comap f hf x {z | (f x, z) ∈ s ×ˢ t} ∂ν) = _ rw [hinner, ← lintegral_indicator hs (fun y => κ y t), lintegral_map ((Kernel.measurable_coe κ ht).indicator hs) hf]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.assignment_joint_map · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:161
theorem published_assignment_condIndep

Assignment conditioned on all sampled outcomes has the same conditional law as assignment conditioned on the observed covariates alone. The asserted mathematical result follows.

Formal statement
n d :
ℕ
P :
π :
Design n d
letI
Proof (Lean source)
-- @node: published_assignment_condIndep lemma published_assignment_condIndep {n d : ℕ} (P : OutcomeLaw d) (π : Design n d) : letI := publishedExperiment_probability P π CondIndepFun (comap (fun ω : (Fin n → Cube d × ℝ × ℝ) × Signs n => sampleCovariates ω.1) inferInstance) (publishedCovariates_measurable n d).comap_le (fun ω => ω.2) (fun ω i => (ω.1 i).2) (publishedExperiment P π) := by letI : IsMarkovKernel π.val := π.property letI := publishedExperiment_probability P π let ν := Measure.pi (fun _ : Fin n => P.toMeasure) let f := sampleCovariates (n := n) (d := d) have hf : Measurable f := by unfold f sampleCovariates; fun_prop let E := publishedExperiment P π have hbase : E.map (fun ω => f ω.1) = ν.map f := by rw [show (fun ω : (Fin n → Cube d × ℝ × ℝ) × Signs n => f ω.1) = f ∘ fst from rfl, ← Measure.map_map hf measurable_fst] congr 1 exact Measure.fst_compProd ν (π.val.comap f hf) have hsmall : condDistrib snd (fun ω => f ω.1) E =ᵐ[ν.map f] π.val := by have h := condDistrib_ae_eq_of_measure_eq_compProd (μ := E) (fun ω => f ω.1) (Y := snd) (by fun_prop) (κ := π.val) (by rw [hbase]; exact assignment_joint_map ν f hf π.val) rwa [hbase] at h let g := fun xs : Fin n → Cube d × ℝ × ℝ => (f xs, xs) have hg : Measurable g := hf.prodMk measurable_id have haug : E.map (fun ω => (f ω.1, ω.1)) = ν.map g := by rw [show (fun ω : (Fin n → Cube d × ℝ × ℝ) × Signs n => (f ω.1, ω.1)) = g ∘ fst from rfl, ← Measure.map_map hg measurable_fst] congr 1 exact Measure.fst_compProd ν (π.val.comap f hf) have hfull : condDistrib snd (fun ω => (f ω.1, ω.1)) E =ᵐ[ν.map g] π.val.prodMkRight (Fin n → Cube d × ℝ × ℝ) := by have h := condDistrib_ae_eq_of_measure_eq_compProd (μ := E) (fun ω => (f ω.1, ω.1)) (Y := snd) (by fun_prop) (κ := π.val.prodMkRight (Fin n → Cube d × ℝ × ℝ)) (by rw [haug] exact assignment_joint_map ν g hg (π.val.prodMkRight (Fin n → Cube d × ℝ × ℝ))) rwa [haug] at h have hsmall' : ∀ᵐ xy ∂ν.map g, condDistrib snd (fun ω => f ω.1) E xy.1 = π.val xy.1 := by apply ae_of_ae_map (f := fst) (μ := ν.map g) (p := fun x => condDistrib snd (fun ω => f ω.1) E x = π.val x) measurable_fst.aemeasurable rw [Measure.map_map measurable_fst hg] exact hsmall have hci : CondIndepFun (comap (fun ω : (Fin n → Cube d × ℝ × ℝ) × Signs n => f ω.1) inferInstance) (hf.comp measurable_fst).comap_le fst snd E := by rw [condIndepFun_iff_condDistrib_prod_ae_eq_prodMkRight (μ := E) (f := snd) (g := fst) (k := fun ω => f ω.1) measurable_snd measurable_fst (by fun_prop), haug] filter_upwards [hfull, hsmall'] with xy hxy hx simpa [Kernel.prodMkRight, Kernel.comap_apply, hx] using hxy exact hci.symm.comp measurable_id (show Measurable (fun xs : Fin n → Cube d × ℝ × ℝ => fun i => (xs i).2) by fun_prop)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.published_assignment_condIndep · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:183
theorem published_admissible_iff_designClass

Published and research admissibility are the same fairness condition on the same covariate-only Borel kernel; conditional outcome independence follows from its input.

Formal statement
n d :
ℕ
π :
Design n d
Proof (Lean source)
-- @node: published_admissible_iff_designClass lemma published_admissible_iff_designClass {n d : ℕ} (π : Design n d) : PublishedAdmissible π ↔ DesignClass n d π := by constructor · intro h exact ⟨h.1, outcomeIndependent_of_covariate_kernel π⟩ · intro h refine ⟨h.fair, ?_⟩ intro P _ _ exact published_assignment_condIndep P π
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.published_admissible_iff_designClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:243
theorem published_excess_of_ae_fair

The cited pointwise carrier transfers to every publicly admissible a.e. fair kernel. Bounded positive densities share the cube's null sets, so representative replacement preserves the iid experiment and both sides of the excess identity. Under the stated conditions, the asserted mathematical result follows.

Formal statement
hExcess_of_gate :
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
P :
π :
Design n d
hfair :
FairKernel π.val
hindep :
= (4 / (n : ℝ)) * ∫ ω, (∑ i, sgn (ω.2 i) * prognosisOf P ((ω.1 i).1)) ^ 2 ∂publishedExperiment P π
Proof (Lean source)
-- @node: published_excess_of_ae_fair lemma published_excess_of_ae_fair (hExcess_of_gate : PublishedHTExcessIdentity) (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (P : OutcomeLaw d) (hdensity : BoundedPositiveCovDensity P) (hmom : FiniteOutcomeMoments P) (π : Design n d) (hfair : FairKernel π.val) (hindep : OutcomeIndependentKernel π.val) : publishedExcessReal π P = (4 / (n : ℝ)) * ∫ ω, (∑ i, sgn (ω.2 i) * prognosisOf P ((ω.1 i).1)) ^ 2 ∂publishedExperiment P π := by obtain ⟨ρ, hρfair, hρeq⟩ := pointwiseFairRepresentative π hfair have hρindep : OutcomeIndependentKernel ρ.val := outcomeIndependent_of_covariate_kernel ρ have hac : covMarginal P ≪ cubeMeasure d := by obtain ⟨lower, upper, _, _, f, _, hf, _⟩ := hdensity rw [hf] exact withDensity_absolutelyContinuous _ _ have hexperiment := publishedExperiment_eq_of_ae_kernel P hac π ρ hρeq.symm have hexcess : publishedExcessReal π P = publishedExcessReal ρ P := by unfold publishedExcessReal rw [hexperiment] have himbalance : (∫ ω, (∑ i, sgn (ω.2 i) * prognosisOf P ((ω.1 i).1)) ^ 2 ∂publishedExperiment P ρ) = (∫ ω, (∑ i, sgn (ω.2 i) * prognosisOf P ((ω.1 i).1)) ^ 2 ∂publishedExperiment P π) := by rw [hexperiment] rw [hexcess, hExcess_of_gate n d hn hd P hdensity hmom ρ hρfair hρindep, himbalance]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.published_excess_of_ae_fair · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:256
def excess

[ Nonnegative carrier of the actual law-specific excess, not a surrogate imbalance risk.

Definition (Lean source)
n d :
ℕ
π :
Design n d
P :
excess π P :
ℝ≥0∞

Fixed-law worst excess, outside the experiment expectation.

Definition (Lean source)
n d :
ℕ
π :
Design n d
C :
publishedWorst π C :
ℝ≥0∞
⨆ P : C, excess π P.val
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedWorst · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:291

Minimax actual excess over a specified class of iid laws.

Definition (Lean source)
n d :
ℕ
C :
publishedCapacity n d C :
ℝ≥0∞
minimaxValueENNReal (fun (π : {π : Design n d // DesignClass n d π}) (P : C) => excess π.val P.val)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedCapacity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:294
theorem loss_congr_cube_ae

A fixed cube-null change of prognosis leaves every finite-sample design loss unchanged.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n d :
ℕ
π :
Design n d
f g :
Cube d → ℝ
hfg :
f =ᵐ[cubeMeasure d] g
loss π f = loss π g
Proof (Lean source)
-- @node: loss_congr_cube_ae lemma loss_congr_cube_ae {n d : ℕ} (π : Design n d) {f g : Cube d → ℝ} (hfg : f =ᵐ[cubeMeasure d] g) : loss π f = loss π g := by letI := cubeMeasure_probability d have hi (i : Fin n) : ∀ᵐ x ∂covLaw n d, f (x i) = g (x i) := by exact (measurePreserving_eval (fun _ : Fin n => cubeMeasure d) i).quasiMeasurePreserving.ae hfg have hall : ∀ᵐ x ∂covLaw n d, ∀ i, f (x i) = g (x i) := ae_all_iff.mpr hi unfold loss congr 1 apply lintegral_congr_ae filter_upwards [hall] with x hx congr 1 funext z simp only [hx]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.loss_congr_cube_ae · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:298
theorem published_covariate_sign_map

Uniform outcome laws induce exactly the original covariate/sign experiment. Under the stated conditions.

Formal statement
n d :
ℕ
P :
π :
Design n d
(publishedExperiment P π).map (fun ω => (sampleCovariates ω.1, ω.2)) = covLaw n d ⊗ₘ π.val
Proof (Lean source)
-- @node: published_covariate_sign_map lemma published_covariate_sign_map {n d : ℕ} (P : OutcomeLaw d) (hU : covMarginal P = cubeMeasure d) (π : Design n d) : (publishedExperiment P π).map (fun ω => (sampleCovariates ω.1, ω.2)) = covLaw n d ⊗ₘ π.val := by letI : IsMarkovKernel π.val := π.property have hf : Measurable (sampleCovariates (n := n) (d := d)) := by unfold sampleCovariates fun_prop have hmap : (Measure.pi (fun _ : Fin n => P.toMeasure)).map sampleCovariates = covLaw n d := by change (Measure.pi (fun _ : Fin n => P.toMeasure)).map (fun xs i => (xs i).1) = covLaw n d rw [Measure.pi_map_pi (fun _ => measurable_fst.aemeasurable)] change (Measure.pi (fun _ : Fin n => covMarginal P)) = covLaw n d rw [hU] rfl calc _ = (Measure.pi (fun _ : Fin n => P.toMeasure)).map sampleCovariates ⊗ₘ π.val := assignment_joint_map _ sampleCovariates hf π.val _ = _ := by rw [hmap]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.published_covariate_sign_map · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:315
theorem imbalance_square_integrable

Every Markov sign law preserves integrability of the squared finite imbalance. The asserted mathematical result follows.

Formal statement
n d :
ℕ
π :
Design n d
m :
Integrable (fun ω : Covariates n d × Signs n => (∑ i, sgn (ω.2 i) * m.val (ω.1 i)) ^ 2) (covLaw n d ⊗ₘ π.val)
Proof (Lean source)
-- @node: imbalance_square_integrable lemma imbalance_square_integrable {n d : ℕ} (π : Design n d) (m : CenteredL2Fn d) : Integrable (fun ω : Covariates n d × Signs n => (∑ i, sgn (ω.2 i) * m.val (ω.1 i)) ^ 2) (covLaw n d ⊗ₘ π.val) := by letI : IsMarkovKernel π.val := π.property letI := cubeMeasure_probability d letI : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance have hm : Measurable m.val := m.property.1 have hi (i : Fin n) : Integrable (fun x : Covariates n d => m.val (x i) ^ 2) (covLaw n d) := (m.property.2.1.comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => cubeMeasure d) i)).integrable_sq have hb : Integrable (fun x : Covariates n d => (n : ℝ) * ∑ i, m.val (x i) ^ 2) (covLaw n d) := (integrable_finsetSum univ (fun i _ => hi i)).const_mul _ have hfst : MeasurePreserving fst (covLaw n d ⊗ₘ π.val) (covLaw n d) := ⟨measurable_fst, Measure.fst_compProd _ _⟩ apply (hfst.integrable_comp_of_integrable hb).mono' · exact (by fun_prop : Measurable (fun ω : Covariates n d × Signs n => (∑ i, sgn (ω.2 i) * m.val (ω.1 i)) ^ 2)).aestronglyMeasurable · exact Filter.Eventually.of_forall (fun ω => by rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)] exact signed_sum_sq_le ω.2 _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.imbalance_square_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:338
theorem loss_eq_ofReal_joint_integral

The finite imbalance loss is the nonnegative real joint second moment.

Formal statement
n d :
ℕ
π :
Design n d
m :
loss π m.val
= ofReal ((4 / (n : ℝ)) * ∫ ω : Covariates n d × Signs n, (∑ i, sgn (ω.2 i) * m.val (ω.1 i)) ^ 2 ∂(covLaw n d ⊗ₘ π.val))
Proof (Lean source)
-- @node: loss_eq_ofReal_joint_integral lemma loss_eq_ofReal_joint_integral {n d : ℕ} (π : Design n d) (m : CenteredL2Fn d) : loss π m.val = ofReal ((4 / (n : ℝ)) * ∫ ω : Covariates n d × Signs n, (∑ i, sgn (ω.2 i) * m.val (ω.1 i)) ^ 2 ∂(covLaw n d ⊗ₘ π.val)) := by letI : IsMarkovKernel π.val := π.property letI := cubeMeasure_probability d letI : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance have hm : Measurable m.val := m.property.1 rw [ENNReal.ofReal_mul (by positivity), ofReal_integral_eq_lintegral_ofReal (imbalance_square_integrable π m) (Filter.Eventually.of_forall (fun _ => sq_nonneg _))] unfold loss rw [Measure.lintegral_compProd (by fun_prop)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.loss_eq_ofReal_joint_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:363
theorem published_uniform_excess_eq_loss

The cited excess identity transfers to the original-sample loss for every uniform law with square-integrable Sobolev prognosis; null representatives cause no change. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
s :
ℝ
π :
Design n d
hπ :
P :
hP :
conclusion 1
conclusion 2
excess π P = loss π (prognosisOf P)
Proof (Lean source)
-- @node: published_uniform_excess_eq_loss lemma published_uniform_excess_eq_loss (hExcess : PublishedHTExcessIdentity) {n d : ℕ} (hn : 2 ≤ n) (hd : 2 ≤ d) {s : ℝ} (π : Design n d) (hπ : DesignClass n d π) (P : OutcomeLaw d) (hP : P ∈ frozenUniformClass d s) : 0 ≤ publishedExcessReal π P ∧ excess π P = loss π (prognosisOf P) := by letI := cubeMeasure_probability d letI : IsMarkovKernel π.val := π.property letI : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance obtain ⟨hU, hmom, m, hm, hae⟩ := hP have hjoint : Measurable (fun ω : (Fin n → Cube d × ℝ × ℝ) × Signs n => (sampleCovariates ω.1, ω.2)) := (publishedCovariates_measurable n d).prodMk measurable_snd have hdensity : BoundedPositiveCovDensity P := by refine ⟨1, 1, by norm_num, le_rfl, fun _ => 1, by fun_prop, ?_, ?_⟩ · simpa using hU · exact Filter.Eventually.of_forall (fun _ => ⟨le_rfl, le_rfl⟩) have hmap := published_covariate_sign_map P hU π have hsample : (publishedExperiment P π).map (fun ω => sampleCovariates ω.1) = covLaw n d := by rw [show (fun ω : (Fin n → Cube d × ℝ × ℝ) × Signs n => sampleCovariates ω.1) = fst ∘ (fun ω => (sampleCovariates ω.1, ω.2)) from rfl, ← Measure.map_map measurable_fst hjoint, hmap] exact Measure.fst_compProd _ _ have hall : ∀ᵐ ω ∂publishedExperiment P π, ∀ i, prognosisOf P ((ω.1 i).1) = m.val ((ω.1 i).1) := by have hi (i : Fin n) : ∀ᵐ x ∂covLaw n d, prognosisOf P (x i) = m.val (x i) := (measurePreserving_eval (fun _ : Fin n => cubeMeasure d) i).quasiMeasurePreserving.ae hae apply ae_of_ae_map (p := fun x => ∀ i, prognosisOf P (x i) = m.val (x i)) (publishedCovariates_measurable n d).aemeasurable rw [hsample] exact ae_all_iff.mpr hi have hmean : (∫ ω, (∑ i, sgn (ω.2 i) * prognosisOf P ((ω.1 i).1)) ^ 2 ∂publishedExperiment P π) = ∫ ω : Covariates n d × Signs n, (∑ i, sgn (ω.2 i) * m.val (ω.1 i)) ^ 2 ∂(covLaw n d ⊗ₘ π.val) := by have hmeas : Measurable m.val := m.property.1 calc _ = ∫ ω, (∑ i, sgn (ω.2 i) * m.val ((ω.1 i).1)) ^ 2 ∂publishedExperiment P π := by apply integral_congr_ae filter_upwards [hall] with ω hω simp only [hω] _ = _ := by rw [← hmap, integral_map hjoint.aemeasurable (by rw [hmap]; exact (imbalance_square_integrable π m).aestronglyMeasurable)] rfl have heq := published_excess_of_ae_fair hExcess n d hn hd P hdensity hmom π hπ.1 hπ.2 rw [hmean] at heq refine ⟨?_, ?_⟩ · rw [heq] exact mul_nonneg (by positivity) (integral_nonneg (fun _ => sq_nonneg _)) · rw [excess, heq, loss_congr_cube_ae π hae, loss_eq_ofReal_joint_integral]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.published_uniform_excess_eq_loss · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:379
theorem publishedWorst_eq_of_image_and_excess

Equality of prognostic images modulo null sets and the pointwise excess identity identify the fixed-design suprema, without moving a supremum inside an expectation. Under the stated conditions.

Formal statement
n d :
ℕ
s :
ℝ
π :
Design n d
hexcess :
∀ P ∈ frozenUniformClass d s, excess π P = loss π (prognosisOf P)
Proof (Lean source)
-- @node: publishedWorst_eq_of_image_and_excess lemma publishedWorst_eq_of_image_and_excess {n d : ℕ} {s : ℝ} (π : Design n d) (himage : publishedPrognosticImage d s = sobolevImage d s) (hexcess : ∀ P ∈ frozenUniformClass d s, excess π P = loss π (prognosisOf P)) : publishedWorst π (frozenUniformClass d s) = worstLoss π s := by apply le_antisymm · apply iSup_le intro P obtain ⟨m, hm, heq⟩ := P.property.2.2 rw [hexcess P.val P.property, loss_congr_cube_ae π heq] exact le_iSup_of_le ⟨m, hm⟩ le_rfl · apply iSup_le intro m have hmem : m.val.val ∈ sobolevImage d s := ⟨m.val, m.property, Filter.EventuallyEq.rfl⟩ rw [← himage] at hmem obtain ⟨P, hP, heq⟩ := hmem calc loss π m.val.val = loss π (prognosisOf P) := loss_congr_cube_ae π heq _ = excess π P := (hexcess P hP).symm _ ≤ publishedWorst π (frozenUniformClass d s) := le_iSup_of_le ⟨P, hP⟩ le_rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedWorst_eq_of_image_and_excess · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:436
theorem publishedCapacity_eq_of_worst

Equal worst risks for every admissible original-sample design give equal capacities by taking the infimum over the common design class. Under the stated conditions.

Formal statement
n d :
ℕ
s :
ℝ
hworst :
∀ π : Design n d
Proof (Lean source)
-- @node: publishedCapacity_eq_of_worst lemma publishedCapacity_eq_of_worst {n d : ℕ} {s : ℝ} (hworst : ∀ π : Design n d, DesignClass n d π → publishedWorst π (frozenUniformClass d s) = worstLoss π s) : publishedCapacity n d (frozenUniformClass d s) = capacity n d s := by unfold publishedCapacity capacity minimaxValueENNReal apply iInf_congr intro π exact hworst π.val π.property
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedCapacity_eq_of_worst · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:459
theorem publishedCapacity_mono_class

Enlarging the law class increases its fixed-design supremum and minimax capacity. Under the stated conditions.

Formal statement
n d :
hCD :
C ⊆ D
Proof (Lean source)
-- @node: publishedCapacity_mono_class lemma publishedCapacity_mono_class {n d : ℕ} {C D : Set (OutcomeLaw d)} (hCD : C ⊆ D) : publishedCapacity n d C ≤ publishedCapacity n d D := by unfold publishedCapacity minimaxValueENNReal apply iInf_mono intro π apply iSup_le intro P exact le_iSup_of_le ⟨P.val, hCD P.property⟩ le_rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.publishedCapacity_mono_class · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:471
theorem uniform_covDensityBounds

A uniform law meets all permitted fixed density bounds. Under the stated conditions.

Formal statement
d :
ℕ
P :
lower upper :
ℝ
hl :
0 < lower
hl1 :
lower ≤ 1
hu1 :
1 ≤ upper
CovDensityBounds P lower upper
Proof (Lean source)
-- @node: uniform_covDensityBounds lemma uniform_covDensityBounds {d : ℕ} (P : OutcomeLaw d) (hU : covMarginal P = cubeMeasure d) {lower upper : ℝ} (hl : 0 < lower) (hl1 : lower ≤ 1) (hu1 : 1 ≤ upper) : CovDensityBounds P lower upper := by refine ⟨hl, hl1.trans hu1, fun _ => 1, by fun_prop, ?_, ?_⟩ · simpa using hU · exact Filter.Eventually.of_forall (fun _ => ⟨hl1, hu1⟩)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.uniform_covDensityBounds · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:482
theorem published_prognostic_capacity

The frozen published class has exactly the legal prognostic image and full-design capacity; the bounded-density class inherits the all-design converse and vanishing necessity. This uses the hExcess_of_gate hypothesis, the hContraction_of_gate hypothesis, the stated conclusion.

Formal statement
hExcess_of_gate :
hContraction_of_gate :
conclusion 1
d :
ℕ
hd :
2 ≤ d
s :
ℝ
0 < s
s ≤ 1
gaussianLawClass d (lt_of_lt_of_le (zero_lt_succ 1) hd) s ⊂ frozenUniformClass d s
twoPointOutcomeLaw d ∈ frozenUniformClass d s
twoPointOutcomeLaw d ∉ gaussianLawClass d (lt_of_lt_of_le (zero_lt_succ 1) hd) s
conclusion 2
n d :
ℕ
2 ≤ n
2 ≤ d
π :
Design n d
conclusion 3
n d :
ℕ
2 ≤ n
2 ≤ d
s :
ℝ
0 < s
s ≤ 1
π :
Design n d
P ∈ frozenUniformClass d s :
excess π P = loss π (prognosisOf P)
publishedWorst π (frozenUniformClass d s) = worstLoss π s
conclusion 4
n d :
ℕ
2 ≤ n
2 ≤ d
s :
ℝ
0 < s
s ≤ 1
publishedCapacity n d (frozenUniformClass d s) = capacity n d s
conclusion 5
s lower upper :
ℝ
0 < s
s ≤ 1
0 < lower
lower ≤ 1
1 ≤ upper
0 < cLower 1
cLower 1 ≤ cLower s
n d :
ℕ
2 ≤ n
2 ≤ d
ofReal (cLower s * bScale n d s) ≤ capacity n d s
capacity n d s ≤ publishedCapacity n d (boundedDensityClass d s lower upper)
ds :
ℕ → ℕ
(∀ n, 2 ≤ ds n)
Tendsto (fun n => publishedCapacity n (ds n) (boundedDensityClass (ds n) s lower upper)) atTop (𝓝 0)
IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ))
Proof (Lean source)
lemma published_prognostic_capacity (hExcess_of_gate : PublishedHTExcessIdentity) (hContraction_of_gate : ClassicalRademacherContraction) : (∀ (d : ℕ) (hd : 2 ≤ d) (s : ℝ), 0 < s → s ≤ 1 → publishedPrognosticImage d s = sobolevImage d s ∧ gaussianLawClass d (lt_of_lt_of_le (zero_lt_succ 1) hd) s ⊂ frozenUniformClass d s ∧ twoPointOutcomeLaw d ∈ frozenUniformClass d s ∧ twoPointOutcomeLaw d ∉ gaussianLawClass d (lt_of_lt_of_le (zero_lt_succ 1) hd) s) ∧ (∀ n d : ℕ, 2 ≤ n → 2 ≤ d → ∀ π : Design n d, PublishedAdmissible π ↔ DesignClass n d π) ∧ (∀ n d : ℕ, 2 ≤ n → 2 ≤ d → ∀ s : ℝ, 0 < s → s ≤ 1 → ∀ π : Design n d, DesignClass n d π → (∀ P ∈ frozenUniformClass d s, 0 ≤ publishedExcessReal π P ∧ excess π P = loss π (prognosisOf P)) ∧ publishedWorst π (frozenUniformClass d s) = worstLoss π s) ∧ (∀ n d : ℕ, 2 ≤ n → 2 ≤ d → ∀ s : ℝ, 0 < s → s ≤ 1 → publishedCapacity n d (frozenUniformClass d s) = capacity n d s) ∧ (∀ (s lower upper : ℝ), 0 < s → s ≤ 1 → 0 < lower → lower ≤ 1 → 1 ≤ upper → (0 < cLower 1 ∧ cLower 1 ≤ cLower s) ∧ (∀ n d : ℕ, 2 ≤ n → 2 ≤ d → ofReal (cLower s * bScale n d s) ≤ capacity n d s ∧ capacity n d s ≤ publishedCapacity n d (boundedDensityClass d s lower upper)) ∧ (∀ ds : ℕ → ℕ, (∀ n, 2 ≤ ds n) → Tendsto (fun n => publishedCapacity n (ds n) (boundedDensityClass (ds n) s lower upper)) atTop (𝓝 0) → IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ)))) := by have himage : ∀ (d : ℕ) (hd : 2 ≤ d) (s : ℝ), 0 < s → s ≤ 1 → publishedPrognosticImage d s = sobolevImage d s ∧ gaussianLawClass d (lt_of_lt_of_le (zero_lt_succ 1) hd) s ⊂ frozenUniformClass d s ∧ twoPointOutcomeLaw d ∈ frozenUniformClass d s ∧ twoPointOutcomeLaw d ∉ gaussianLawClass d (lt_of_lt_of_le (zero_lt_succ 1) hd) s := by intro d hd s hs hs1 have hd0 : 0 < d := lt_of_lt_of_le (zero_lt_succ 1) hd exact ⟨publishedPrognosticImage_eq_sobolevImage d hd0 s, gaussianLawClass_ssubset_frozenUniformClass hd0 s, twoPointOutcomeLaw_mem_frozenUniformClass d s, twoPointOutcomeLaw_not_mem_gaussianLawClass hd0 s⟩ have htransfer : ∀ n d : ℕ, 2 ≤ n → 2 ≤ d → ∀ s : ℝ, 0 < s → s ≤ 1 → ∀ π : Design n d, DesignClass n d π → (∀ P ∈ frozenUniformClass d s, 0 ≤ publishedExcessReal π P ∧ excess π P = loss π (prognosisOf P)) ∧ publishedWorst π (frozenUniformClass d s) = worstLoss π s := by intro n d hn hd s hs hs1 π hπ have hpointwise : ∀ P ∈ frozenUniformClass d s, 0 ≤ publishedExcessReal π P ∧ excess π P = loss π (prognosisOf P) := by intro P hP exact published_uniform_excess_eq_loss hExcess_of_gate hn hd π hπ P hP exact ⟨hpointwise, publishedWorst_eq_of_image_and_excess π (himage d hd s hs hs1).1 (fun P hP => (hpointwise P hP).2)⟩ refine ⟨himage, ?_, htransfer, ?_, ?_⟩ · intro n d hn hd π exact published_admissible_iff_designClass π · intro n d hn hd s hs hs1 exact publishedCapacity_eq_of_worst (fun π hπ => (htransfer n d hn hd s hs hs1 π hπ).2) · intro s lower upper hs hs1 hl hl1 hu1 have hsub : ∀ d : ℕ, 2 ≤ d → frozenUniformClass d s ⊆ boundedDensityClass d s lower upper := by intro d hd P hP obtain ⟨hU, hmom, m, hm, heq⟩ := hP refine ⟨uniform_covDensityBounds P hU hl hl1 hu1, hmom, ?_, 0, m, hm, ?_⟩ · rw [hU] have heq_sq : (fun u => prognosisOf P u ^ 2) =ᵐ[cubeMeasure d] (fun u => m.val u ^ 2) := heq.fun_comp (fun x => x ^ 2) rw [integral_congr_ae heq_sq] exact sobolev_cube_second_moment_le_one hd hs hs1 m hm · simpa only [zero_add] using heq have hcapacity : ∀ n d : ℕ, 2 ≤ n → 2 ≤ d → capacity n d s ≤ publishedCapacity n d (boundedDensityClass d s lower upper) := by intro n d hn hd rw [← publishedCapacity_eq_of_worst (fun π hπ => (htransfer n d hn hd s hs hs1 π hπ).2)] exact publishedCapacity_mono_class (hsub d hd) have hbound : ∀ n d : ℕ, 2 ≤ n → 2 ≤ d → ofReal (cLower s * bScale n d s) ≤ capacity n d s := by intro n d hn hd exact ((full_design_lower hContraction_of_gate s hs hs1).2 n d hn hd).2 refine ⟨cLower_uniform_positive s hs1, ?_, ?_⟩ · intro n d hn hd exact ⟨hbound n d hn hd, hcapacity n d hn hd⟩ · intro ds hd hvanish apply dimension_necessity_of_scale_lower s hs hs1 ds hd (fun n => publishedCapacity n (ds n) (boundedDensityClass (ds n) s lower upper)) _ hvanish filter_upwards [eventually_ge_atTop 2] with n hn exact (hbound n (ds n) hn (hd n)).trans (hcapacity n (ds n) hn (hd n))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.published_prognostic_capacity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/PublishedClass.lean:493
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionANOVA 16 declarations Independent coordinate resampling preserves cube probability.

Canonical ANOVA regularity and Fourier supports

Independent coordinate resampling preserves cube probability. Fubini then proves centering of canonical main effects and L² regularity of all canonical effects. Translation invariance localizes their Fourier supports, and their integrability gives exact coefficient additivity for the order-two decomposition.

instance cubeMeasure_isProbabilityMeasure

[ Unit-cube Lebesgue measure has total mass one in every dimension.

Definition (Lean source)
-- @node: cubeMeasure_isProbabilityMeasure instance cubeMeasure_isProbabilityMeasure (d : ℕ) : IsProbabilityMeasure (cubeMeasure d) := by have : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ unfold cubeMeasure infer_instance
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cubeMeasure_isProbabilityMeasure · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:19
theorem cube_resample_measurePreserving

Selecting each coordinate from either of two independent cube draws preserves cube probability.](goal) This uses the stated conclusion.

Formal statement
d :
ℕ
S :
MeasurePreserving (fun z : Cube d × Cube d => fun i => if i ∈ S then z.1 i else z.2 i) ((cubeMeasure d).prod (cubeMeasure d)) (cubeMeasure d)
Proof (Lean source)
-- @node: cube_resample_measurePreserving lemma cube_resample_measurePreserving {d : ℕ} (S : Finset (Fin d)) : MeasurePreserving (fun z : Cube d × Cube d => fun i => if i ∈ S then z.1 i else z.2 i) ((cubeMeasure d).prod (cubeMeasure d)) (cubeMeasure d) := by classical have : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ have h := (measurePreserving_arrowProdEquivProdArrow ℝ ℝ (Fin d) (fun _ => volume.restrict (Icc (0 : ℝ) 1)) (fun _ => volume.restrict (Icc (0 : ℝ) 1))).symm have hp : MeasurePreserving (fun z : Fin d → ℝ × ℝ => fun i => if i ∈ S then (z i).1 else (z i).2) (Measure.pi (fun _ : Fin d => (volume.restrict (Icc (0 : ℝ) 1)).prod (volume.restrict (Icc (0 : ℝ) 1)))) (cubeMeasure d) := by unfold cubeMeasure apply measurePreserving_pi (fun _ : Fin d => (volume.restrict (Icc (0 : ℝ) 1)).prod (volume.restrict (Icc (0 : ℝ) 1))) (fun _ : Fin d => volume.restrict (Icc (0 : ℝ) 1)) (f := fun i z => if i ∈ S then z.1 else z.2) intro i by_cases hi : i ∈ S · simpa only [if_pos hi] using (measurePreserving_fst (μ := volume.restrict (Icc (0 : ℝ) 1)) (ν := volume.restrict (Icc (0 : ℝ) 1))) · simpa only [if_neg hi] using (measurePreserving_snd (μ := volume.restrict (Icc (0 : ℝ) 1)) (ν := volume.restrict (Icc (0 : ℝ) 1))) exact hp.comp h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_resample_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:27

A Borel representative has a Borel canonical main effect, including at exceptional slices where the Bochner integral is defined to be zero. This uses the hm hypothesis, the stated conclusion.

Formal statement
d :
ℕ
Cube d → ℝ
hm :
j :
Fin d
Proof (Lean source)
-- @node: g1_measurable @[fun_prop] lemma g1_measurable {d : ℕ} {m : Cube d → ℝ} (hm : Measurable m) (j : Fin d) : Measurable (g1 m j) := by have h : Measurable (fun z : ℝ × Cube d => m (update z.2 j z.1)) := by fun_prop exact h.stronglyMeasurable.integral_prod_right'.measurable
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g1_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:61
theorem g1_lift_integrable

The lifted main marginal of an integrable cube function is integrable. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
Cube d → ℝ
hm :
j :
Fin d
Integrable (fun x : Cube d => g1 m j (x j)) (cubeMeasure d)
Proof (Lean source)
-- @node: g1_lift_integrable lemma g1_lift_integrable {d : ℕ} {m : Cube d → ℝ} (hm : Integrable m (cubeMeasure d)) (j : Fin d) : Integrable (fun x : Cube d => g1 m j (x j)) (cubeMeasure d) := by have h := (cube_resample_measurePreserving {j}).integrable_comp_of_integrable hm have he : (fun z : Cube d × Cube d => m (fun i => if i ∈ ({j} : Finset (Fin d)) then z.1 i else z.2 i)) = (fun z => m (update z.2 j (z.1 j))) := by funext z congr 1 funext i by_cases hi : i = j · subst i; simp · simp [update, hi] simp only [Function.comp_def] at h rw [he] at h exact h.integral_prod_left
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g1_lift_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:70
theorem integral_g1_lift

Integrating a lifted canonical main effect recovers the original cube mean. Under the stated conditions.

Formal statement
d :
ℕ
Cube d → ℝ
hm :
j :
Fin d
(∫ x : Cube d, g1 m j (x j) ∂cubeMeasure d) = ∫ x, m x ∂cubeMeasure d
Proof (Lean source)
-- @node: integral_g1_lift lemma integral_g1_lift {d : ℕ} {m : Cube d → ℝ} (hm : Integrable m (cubeMeasure d)) (j : Fin d) : (∫ x : Cube d, g1 m j (x j) ∂cubeMeasure d) = ∫ x, m x ∂cubeMeasure d := by have hp := cube_resample_measurePreserving ({j} : Finset (Fin d)) have he : (fun z : Cube d × Cube d => m (fun i => if i ∈ ({j} : Finset (Fin d)) then z.1 i else z.2 i)) = (fun z => m (update z.2 j (z.1 j))) := by funext z congr 1 funext i by_cases hi : i = j · subst i; simp · simp [update, hi] have hi := hp.integrable_comp_of_integrable hm have ht := integral_map hp.measurable.aemeasurable (by rw [hp.map_eq] exact hm.aestronglyMeasurable) rw [hp.map_eq, he] at ht simp only [Function.comp_def] at hi rw [he] at hi exact (integral_prod _ hi).symm.trans ht.symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.integral_g1_lift · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:89
theorem integral_g1_lift_centered

Centering of the original cube outcome centers each lifted canonical main effect. The asserted mathematical result follows.

Formal statement
d :
ℕ
m :
j :
Fin d
(∫ x : Cube d, g1 m.val j (x j) ∂cubeMeasure d) = 0
Proof (Lean source)
-- @node: integral_g1_lift_centered lemma integral_g1_lift_centered {d : ℕ} (m : CenteredL2Fn d) (j : Fin d) : (∫ x : Cube d, g1 m.val j (x j) ∂cubeMeasure d) = 0 := by rw [integral_g1_lift (m.property.2.1.integrable (by norm_num)), m.property.2.2]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.integral_g1_lift_centered · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:114
theorem cube_resample_marginal_memLp

Averaging independent unused coordinates contracts square integrability. This applies to both one-coordinate and two-coordinate raw marginals. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
Cube d → ℝ
hm :
hLp :
S :
MemLp (fun x : Cube d => ∫ y : Cube d, m (fun i => if i ∈ S then x i else y i) ∂cubeMeasure d) 2 (cubeMeasure d)
Proof (Lean source)
-- @node: cube_resample_marginal_memLp lemma cube_resample_marginal_memLp {d : ℕ} {m : Cube d → ℝ} (hm : Measurable m) (hLp : MemLp m 2 (cubeMeasure d)) (S : Finset (Fin d)) : MemLp (fun x : Cube d => ∫ y : Cube d, m (fun i => if i ∈ S then x i else y i) ∂cubeMeasure d) 2 (cubeMeasure d) := by classical let f : Cube d × Cube d → ℝ := fun z => m (fun i => if i ∈ S then z.1 i else z.2 i) have hf : Measurable f := by apply hm.comp apply measurable_pi_lambda intro i by_cases hi : i ∈ S · simp only [if_pos hi]; fun_prop · simp only [if_neg hi]; fun_prop have hprod : MemLp f 2 ((cubeMeasure d).prod (cubeMeasure d)) := hLp.comp_measurePreserving (cube_resample_measurePreserving S) have hsq : Integrable (fun z => f z ^ 2) ((cubeMeasure d).prod (cubeMeasure d)) := (memLp_two_iff_integrable_sq hf.aestronglyMeasurable).mp hprod have hmean : Measurable (fun x => ∫ y, f (x, y) ∂cubeMeasure d) := hf.stronglyMeasurable.integral_prod_right'.measurable apply (memLp_two_iff_integrable_sq hmean.aestronglyMeasurable).mpr apply hsq.integral_prod_left.mono' (hmean.pow_const 2).aestronglyMeasurable filter_upwards [hsq.prod_right_ae] with x hx have hslice : MemLp (fun y => f (x, y)) 2 (cubeMeasure d) := (memLp_two_iff_integrable_sq (hf.comp measurable_prodMk_left).aestronglyMeasurable).mpr hx have hj := variance_nonneg (fun y => f (x, y)) (cubeMeasure d) rw [variance_eq_sub hslice] at hj simpa only [Real.norm_eq_abs, abs_sq, Pi.pow_apply] using (sub_nonneg.mp hj)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_resample_marginal_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:120
theorem g1_lift_memLp

The lifted canonical main effect is square integrable. Under the stated conditions.

Formal statement
d :
ℕ
Cube d → ℝ
hm :
hLp :
j :
Fin d
MemLp (fun x : Cube d => g1 m j (x j)) 2 (cubeMeasure d)
Proof (Lean source)
-- @node: g1_lift_memLp lemma g1_lift_memLp {d : ℕ} {m : Cube d → ℝ} (hm : Measurable m) (hLp : MemLp m 2 (cubeMeasure d)) (j : Fin d) : MemLp (fun x : Cube d => g1 m j (x j)) 2 (cubeMeasure d) := by have h := cube_resample_marginal_memLp hm hLp ({j} : Finset (Fin d)) have he (x y : Cube d) : (fun i => if i ∈ ({j} : Finset (Fin d)) then x i else y i) = update y j (x j) := by funext i by_cases hi : i = j · subst i; simp · simp [update, hi] simpa only [he, g1] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g1_lift_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:154
theorem pair_marginal_resample_eq

The raw two-coordinate marginal equals averaging a two-coordinate resampling. Under the stated conditions.

Formal statement
d :
ℕ
m :
Cube d → ℝ
j l :
Fin d
hjl :
j ≠ l
x :
Cube d
(∫ y : Cube d, m (fun i => if i ∈ ({j, l} : Finset (Fin d)) then x i else y i) ∂cubeMeasure d)
= ∫ y, m (update (update y j (x j)) l (x l)) ∂cubeMeasure d
Proof (Lean source)
-- @node: pair_marginal_resample_eq lemma pair_marginal_resample_eq {d : ℕ} (m : Cube d → ℝ) (j l : Fin d) (hjl : j ≠ l) (x : Cube d) : (∫ y : Cube d, m (fun i => if i ∈ ({j, l} : Finset (Fin d)) then x i else y i) ∂cubeMeasure d) = ∫ y, m (update (update y j (x j)) l (x l)) ∂cubeMeasure d := by congr 1 funext y congr 1 funext i by_cases hij : i = j · subst i; simp [hjl] · by_cases hil : i = l · subst i; simp · simp [update, hij, hil]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pair_marginal_resample_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:168
theorem g2_lift_memLp

The lifted canonical pair effect is square integrable, without any regularity premise beyond the original measurable square-integrable outcome. Under the stated conditions.

Formal statement
d :
ℕ
Cube d → ℝ
hm :
hLp :
j l :
Fin d
hjl :
j ≠ l
MemLp (fun x : Cube d => g2 m j l (x j) (x l)) 2 (cubeMeasure d)
Proof (Lean source)
-- @node: g2_lift_memLp lemma g2_lift_memLp {d : ℕ} {m : Cube d → ℝ} (hm : Measurable m) (hLp : MemLp m 2 (cubeMeasure d)) (j l : Fin d) (hjl : j ≠ l) : MemLp (fun x : Cube d => g2 m j l (x j) (x l)) 2 (cubeMeasure d) := by have h := cube_resample_marginal_memLp hm hLp ({j, l} : Finset (Fin d)) simp_rw [pair_marginal_resample_eq m j l hjl] at h exact (h.sub (g1_lift_memLp hm hLp j)).sub (g1_lift_memLp hm hLp l)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g2_lift_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:185
theorem fourierCoeff_zero_of_coordinate_invariant Lemma fourierCoeff_zero_of_coordinate_invariant in the paper ↗

A nonzero character coordinate has zero coefficient against a function invariant under shifts in that coordinate. Under the stated conditions.

Formal statement
d :
ℕ
k :
Fin d → ℤ
r :
Fin d
hr :
k r ≠ 0
f :
Torus d → ℂ
hinv :
∀ y c, f (y + single r c) = f y
(∫ y, ek (-k) y * f y ∂torusMeasure d) = 0
Proof (Lean source)
-- @node: fourierCoeff_zero_of_coordinate_invariant lemma fourierCoeff_zero_of_coordinate_invariant {d : ℕ} (k : Fin d → ℤ) (r : Fin d) (hr : k r ≠ 0) {f : Torus d → ℂ} (hf : Integrable f (torusMeasure d)) (hinv : ∀ y c, f (y + single r c) = f y) : (∫ y, ek (-k) y * f y ∂torusMeasure d) = 0 := by classical let c : AddCircle (1 : ℝ) := ((1 / 2 / ((-k) r : ℝ) : ℝ) : AddCircle (1 : ℝ)) have hc : (-k) r ≠ 0 := by simpa using hr have h := fourierCoeff_torusDifference k (single r c) hf (ek_half_shift (-k) r hc) rw [torusDifference_eq_zero _ f (fun y => hinv y c)] at h simp only [Pi.zero_apply, mul_zero, integral_zero] at h exact (mul_eq_zero.mp h.symm).resolve_left (by norm_num)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fourierCoeff_zero_of_coordinate_invariant · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:195
theorem Fhat_g1_lift_zero_off_coordinate

Reflected main effects have no frequency outside their own coordinate. Under the stated conditions.

Formal statement
d :
ℕ
m :
j r :
Fin d
hrj :
r ≠ j
k :
Fin d → ℤ
hr :
k r ≠ 0
Fhat (fun x : Cube d => g1 m.val j (x j)) k = 0
Proof (Lean source)
-- @node: Fhat_g1_lift_zero_off_coordinate lemma Fhat_g1_lift_zero_off_coordinate {d : ℕ} (m : CenteredL2Fn d) (j r : Fin d) (hrj : r ≠ j) (k : Fin d → ℤ) (hr : k r ≠ 0) : Fhat (fun x : Cube d => g1 m.val j (x j)) k = 0 := by apply fourierCoeff_zero_of_coordinate_invariant k r hr ((reflExt_memLp_of_cube (g1_lift_memLp m.property.1 m.property.2.1 j)).integrable (by norm_num)) intro y c simp only [reflExt] rw [fold_add_single_of_ne y r j c (Ne.symm hrj)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_g1_lift_zero_off_coordinate · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:212
theorem Fhat_g1_lift_zero

Each reflected main effect has zero intercept. The asserted mathematical result follows.

Formal statement
d :
ℕ
m :
j :
Fin d
Fhat (fun x : Cube d => g1 m.val j (x j)) 0 = 0
Proof (Lean source)
-- @node: Fhat_g1_lift_zero lemma Fhat_g1_lift_zero {d : ℕ} (m : CenteredL2Fn d) (j : Fin d) : Fhat (fun x : Cube d => g1 m.val j (x j)) 0 = 0 := by apply Fhat_zero_of_centered (⟨(fun x : Cube d => g1 m.val j (x j)), (g1_measurable m.property.1 j).comp (measurable_pi_apply j), g1_lift_memLp m.property.1 m.property.2.1 j, integral_g1_lift_centered m j⟩ : CenteredL2Fn d)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_g1_lift_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:224
theorem Fhat_g2_lift_zero_off_coordinates

Reflected pair effects have no frequency outside their two coordinates. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
m :
j l r :
Fin d
hjl :
j ≠ l
hrj :
r ≠ j
hrl :
r ≠ l
k :
Fin d → ℤ
hr :
k r ≠ 0
Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k = 0
Proof (Lean source)
-- @node: Fhat_g2_lift_zero_off_coordinates lemma Fhat_g2_lift_zero_off_coordinates {d : ℕ} (m : CenteredL2Fn d) (j l r : Fin d) (hjl : j ≠ l) (hrj : r ≠ j) (hrl : r ≠ l) (k : Fin d → ℤ) (hr : k r ≠ 0) : Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k = 0 := by apply fourierCoeff_zero_of_coordinate_invariant k r hr ((reflExt_memLp_of_cube (g2_lift_memLp m.property.1 m.property.2.1 j l hjl)).integrable (by norm_num)) intro y c simp only [reflExt] rw [fold_add_single_of_ne y r j c (Ne.symm hrj), fold_add_single_of_ne y r l c (Ne.symm hrl)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_g2_lift_zero_off_coordinates · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:234
theorem Fhat_orderTwo_sum

The order-two decomposition is additive at each Fourier coefficient; all of its canonical summands have derived L² regularity. Under the stated conditions.

Formal statement
d :
ℕ
m :
hm :
k :
Fin d → ℤ
Fhat m.val k
= (∑ j, Fhat (fun x : Cube d => g1 m.val j (x j)) k)
+ ∑ j, ∑ l, if j < l then Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k else 0
Proof (Lean source)
-- @node: Fhat_orderTwo_sum lemma Fhat_orderTwo_sum {d : ℕ} (m : CenteredL2Fn d) (hm : OrderTwo m) (k : Fin d → ℤ) : Fhat m.val k = (∑ j, Fhat (fun x : Cube d => g1 m.val j (x j)) k) + ∑ j, ∑ l, if j < l then Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k else 0 := by classical let A : Fin d → Torus d → ℂ := fun j y => ek (-k) y * (g1 m.val j (fold y j) : ℂ) let B : Fin d → Fin d → Torus d → ℂ := fun j l y => if j < l then ek (-k) y * (g2 m.val j l (fold y j) (fold y l) : ℂ) else 0 have hA (j : Fin d) : Integrable (A j) (torusMeasure d) := ek_mul_integrable (-k) ((reflExt_memLp_of_cube (g1_lift_memLp m.property.1 m.property.2.1 j)).integrable (by norm_num)) have hB (j l : Fin d) : Integrable (B j l) (torusMeasure d) := by by_cases hjl : j < l · simpa only [B, if_pos hjl, reflExt] using ek_mul_integrable (-k) ((reflExt_memLp_of_cube (g2_lift_memLp m.property.1 m.property.2.1 j l (ne_of_lt hjl))).integrable (by norm_num)) · simp only [B, if_neg hjl] exact integrable_const 0 have he : (fun y => ek (-k) y * reflExt m.val y) =ᵐ[torusMeasure d] fun y => (∑ j, A j y) + ∑ j, ∑ l, B j l y := by filter_upwards [(fold_measurePreserving d).quasiMeasurePreserving.ae hm] with y hy simp only [reflExt, hy, A, B, Complex.ofReal_add, Complex.ofReal_sum, mul_add, Finset.mul_sum, apply_ite, Complex.ofReal_zero, mul_zero] unfold Fhat rw [integral_congr_ae he, integral_add (integrable_finsetSum _ (fun j _ => hA j)) (integrable_finsetSum _ (fun j _ => integrable_finsetSum _ (fun l _ => hB j l))), integral_finsetSum _ (fun j _ => hA j), integral_finsetSum _ (fun j _ => integrable_finsetSum _ (fun l _ => hB j l))] congr 1 apply Finset.sum_congr rfl intro j _ rw [integral_finsetSum _ (fun l _ => hB j l)] apply Finset.sum_congr rfl intro l _ by_cases hjl : j < l <;> simp [B, hjl, reflExt]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_orderTwo_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:248
theorem Fhat_zero_of_orderTwo_from_components

Additivity and the individual coordinate supports give the ambient order-two support statement directly from the canonical components. Under the stated conditions.

Formal statement
d :
ℕ
m :
hm :
k :
Fin d → ℤ
hk :
2 < (frequencySupport k).card
Fhat m.val k = 0
Proof (Lean source)
-- @node: Fhat_zero_of_orderTwo_from_components lemma Fhat_zero_of_orderTwo_from_components {d : ℕ} (m : CenteredL2Fn d) (hm : OrderTwo m) (k : Fin d → ℤ) (hk : 2 < (frequencySupport k).card) : Fhat m.val k = 0 := by classical obtain ⟨r, hr, t, ht, u, hu, hrt, hru, htu⟩ := Finset.two_lt_card.mp hk have hrk : k r ≠ 0 := by simpa [frequencySupport] using hr have htk : k t ≠ 0 := by simpa [frequencySupport] using ht have huk : k u ≠ 0 := by simpa [frequencySupport] using hu have hA (j : Fin d) : Fhat (fun x : Cube d => g1 m.val j (x j)) k = 0 := by by_cases hrj : r = j · exact Fhat_g1_lift_zero_off_coordinate m j t (by simpa [hrj] using Ne.symm hrt) k htk · exact Fhat_g1_lift_zero_off_coordinate m j r hrj k hrk have hB (j l : Fin d) : (if j < l then Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k else 0) = 0 := by by_cases hjl : j < l · rw [if_pos hjl] have hchoice : (r ≠ j ∧ r ≠ l) ∨ (t ≠ j ∧ t ≠ l) ∨ (u ≠ j ∧ u ≠ l) := by by_cases hrj : r = j <;> by_cases hrl : r = l <;> by_cases htj : t = j <;> by_cases htl : t = l <;> aesop rcases hchoice with h | h | h · exact Fhat_g2_lift_zero_off_coordinates m j l r (ne_of_lt hjl) h.1 h.2 k hrk · exact Fhat_g2_lift_zero_off_coordinates m j l t (ne_of_lt hjl) h.1 h.2 k htk · exact Fhat_g2_lift_zero_off_coordinates m j l u (ne_of_lt hjl) h.1 h.2 k huk · exact if_neg hjl rw [Fhat_orderTwo_sum m hm k] simp_rw [hA, hB] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_zero_of_orderTwo_from_components · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVA.lean:288
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionANOVACentering 15 declarations Fubini and independent coordinate resampling center canonical pair effects in each coordinate.

Canonical pair centering and exact Fourier component separation

Fubini and independent coordinate resampling center canonical pair effects in each coordinate. Folding preserves these identities, so main and pair effects have disjoint exact Fourier supports. The order-two Fourier sum therefore identifies each coefficient with its unique canonical component.

theorem pair_marginal_tower_right

Averaging the second coordinate of a raw pair marginal recovers the main marginal, with integrable slices almost everywhere. Under the stated conditions.

Formal statement
d :
ℕ
Cube d → ℝ
hm :
j l :
Fin d
hjl :
j ≠ l
∀ᵐ x ∂cubeMeasure d, Integrable (fun y : Cube d => ∫ z : Cube d, m (update (update z j (x j)) l (y l)) ∂cubeMeasure d) (cubeMeasure d) ∧ (∫ y : Cube d, (∫ z : Cube d, m (update (update z j (x j)) l (y l)) ∂cubeMeasure d) ∂cubeMeasure d)
= g1 m j (x j)
Proof (Lean source)
-- @node: pair_marginal_tower_right lemma pair_marginal_tower_right {d : ℕ} {m : Cube d → ℝ} (hm : Integrable m (cubeMeasure d)) (j l : Fin d) (hjl : j ≠ l) : ∀ᵐ x ∂cubeMeasure d, Integrable (fun y : Cube d => ∫ z : Cube d, m (update (update z j (x j)) l (y l)) ∂cubeMeasure d) (cubeMeasure d) ∧ (∫ y : Cube d, (∫ z : Cube d, m (update (update z j (x j)) l (y l)) ∂cubeMeasure d) ∂cubeMeasure d) = g1 m j (x j) := by have hprod := (cube_resample_measurePreserving ({j} : Finset (Fin d))).integrable_comp_of_integrable hm have he : (fun z : Cube d × Cube d => m (fun i => if i ∈ ({j} : Finset (Fin d)) then z.1 i else z.2 i)) = (fun z => m (update z.2 j (z.1 j))) := by funext z congr 1 funext i by_cases hi : i = j · subst i; simp · simp [update, hi] simp only [Function.comp_def] at hprod rw [he] at hprod filter_upwards [hprod.prod_right_ae] with x hx have hp := cube_resample_measurePreserving ({l} : Finset (Fin d)) have hi := hp.integrable_comp_of_integrable hx have ht := integral_map hp.measurable.aemeasurable (by rw [hp.map_eq] exact hx.aestronglyMeasurable) rw [hp.map_eq] at ht have he' : (fun z : Cube d × Cube d => m (update (fun i => if i ∈ ({l} : Finset (Fin d)) then z.1 i else z.2 i) j (x j))) = (fun z => m (update (update z.2 j (x j)) l (z.1 l))) := by funext z congr 1 funext i by_cases hij : i = j · subst i; simp [update, hjl] · by_cases hil : i = l · subst i; simp [update, Ne.symm hjl] · simp [update, hij, hil] simp only [Function.comp_def] at hi rw [he'] at hi ht exact ⟨hi.integral_prod_left, (integral_prod _ hi).symm.trans ht.symm⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pair_marginal_tower_right · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:16

Swapping the two distinct coordinates and their arguments preserves a canonical pair effect. Under the stated conditions.

Formal statement
d :
ℕ
m :
Cube d → ℝ
j l :
Fin d
hjl :
j ≠ l
u v :
ℝ
g2 m j l u v = g2 m l j v u
Proof (Lean source)
-- @node: g2_swap_coordinates lemma g2_swap_coordinates {d : ℕ} (m : Cube d → ℝ) (j l : Fin d) (hjl : j ≠ l) (u v : ℝ) : g2 m j l u v = g2 m l j v u := by unfold g2 have he : (fun y : Cube d => m (update (update y j u) l v)) = (fun y => m (update (update y l v) j u)) := by funext y congr 1 exact Function.update_comm hjl _ _ _ rw [he] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g2_swap_coordinates · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:63
theorem g2_integral_right_centered

Each canonical pair effect is integrable and centered in its second coordinate for almost every fixed first coordinate. Under the stated conditions.

Formal statement
d :
ℕ
m :
j l :
Fin d
hjl :
j ≠ l
∀ᵐ x ∂cubeMeasure d, Integrable (fun y : Cube d => g2 m.val j l (x j) (y l)) (cubeMeasure d) ∧ (∫ y : Cube d, g2 m.val j l (x j) (y l) ∂cubeMeasure d)
= 0
Proof (Lean source)
-- @node: g2_integral_right_centered lemma g2_integral_right_centered {d : ℕ} (m : CenteredL2Fn d) (j l : Fin d) (hjl : j ≠ l) : ∀ᵐ x ∂cubeMeasure d, Integrable (fun y : Cube d => g2 m.val j l (x j) (y l)) (cubeMeasure d) ∧ (∫ y : Cube d, g2 m.val j l (x j) (y l) ∂cubeMeasure d) = 0 := by have hi := m.property.2.1.integrable (by norm_num) filter_upwards [pair_marginal_tower_right hi j l hjl] with x hx have hj : Integrable (fun _ : Cube d => g1 m.val j (x j)) (cubeMeasure d) := by fun_prop have hl := g1_lift_integrable hi l have hr := hx.1 refine ⟨(hx.1.sub hj).sub hl, ?_⟩ change (∫ y : Cube d, ((∫ z : Cube d, m.val (update (update z j (x j)) l (y l)) ∂cubeMeasure d) - g1 m.val j (x j) - g1 m.val l (y l)) ∂cubeMeasure d) = 0 integral_linearity rw [hx.2, integral_g1_lift_centered m l] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g2_integral_right_centered · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:76
theorem g2_integral_left_centered

Each canonical pair effect is integrable and centered in its first coordinate for almost every fixed second coordinate. Under the stated conditions.

Formal statement
d :
ℕ
m :
j l :
Fin d
hjl :
j ≠ l
∀ᵐ x ∂cubeMeasure d, Integrable (fun y : Cube d => g2 m.val j l (y j) (x l)) (cubeMeasure d) ∧ (∫ y : Cube d, g2 m.val j l (y j) (x l) ∂cubeMeasure d)
= 0
Proof (Lean source)
-- @node: g2_integral_left_centered lemma g2_integral_left_centered {d : ℕ} (m : CenteredL2Fn d) (j l : Fin d) (hjl : j ≠ l) : ∀ᵐ x ∂cubeMeasure d, Integrable (fun y : Cube d => g2 m.val j l (y j) (x l)) (cubeMeasure d) ∧ (∫ y : Cube d, g2 m.val j l (y j) (x l) ∂cubeMeasure d) = 0 := by simpa only [g2_swap_coordinates m.val j l hjl] using g2_integral_right_centered m l j (Ne.symm hjl)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g2_integral_left_centered · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:98
theorem integral_g2_lift_centered

The lifted canonical pair effect has zero cube mean. Under the stated conditions.

Formal statement
d :
ℕ
m :
j l :
Fin d
hjl :
j ≠ l
(∫ x : Cube d, g2 m.val j l (x j) (x l) ∂cubeMeasure d) = 0
Proof (Lean source)
-- @node: integral_g2_lift_centered lemma integral_g2_lift_centered {d : ℕ} (m : CenteredL2Fn d) (j l : Fin d) (hjl : j ≠ l) : (∫ x : Cube d, g2 m.val j l (x j) (x l) ∂cubeMeasure d) = 0 := by have hi := m.property.2.1.integrable (by norm_num) have hp := cube_resample_measurePreserving ({j,l} : Finset (Fin d)) have hraw := hp.integrable_comp_of_integrable hi have ht := integral_map hp.measurable.aemeasurable (by rw [hp.map_eq] exact hi.aestronglyMeasurable) rw [hp.map_eq] at ht have he : (fun z : Cube d × Cube d => m.val (fun i => if i ∈ ({j,l} : Finset (Fin d)) then z.1 i else z.2 i)) = (fun z => m.val (update (update z.2 j (z.1 j)) l (z.1 l))) := by funext z apply congrArg m.val funext i by_cases hij : i = j · subst i; simp [hjl] · by_cases hil : i = l · subst i; simp · simp [update, hij, hil] simp only [Function.comp_def] at hraw rw [he] at hraw ht have hmean := (integral_prod _ hraw).symm.trans ht.symm change (∫ x : Cube d, ((∫ y : Cube d, m.val (update (update y j (x j)) l (x l)) ∂cubeMeasure d) - g1 m.val j (x j) - g1 m.val l (x l)) ∂cubeMeasure d) = 0 have hr := hraw.integral_prod_left have hj := g1_lift_integrable hi j have hl := g1_lift_integrable hi l integral_linearity rw [hmean, m.property.2.2, integral_g1_lift_centered m j, integral_g1_lift_centered m l] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.integral_g2_lift_centered · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:109

[ A Borel outcome has a jointly Borel canonical pair effect, including exceptional slices. This uses the hm hypothesis, the stated conclusion.

Formal statement
d :
ℕ
Cube d → ℝ
hm :
j l :
Fin d
Measurable (fun z : ℝ × ℝ => g2 m j l z.1 z.2)
Proof (Lean source)
-- @node: g2_joint_measurable @[fun_prop] lemma g2_joint_measurable {d : ℕ} {m : Cube d → ℝ} (hm : Measurable m) (j l : Fin d) : Measurable (fun z : ℝ × ℝ => g2 m j l z.1 z.2) := by have h : Measurable (fun z : (ℝ × ℝ) × Cube d => m (update (update z.2 j z.1.1) l z.1.2)) := by fun_prop exact (h.stronglyMeasurable.integral_prod_right'.measurable.sub ((g1_measurable hm j).comp measurable_fst)).sub ((g1_measurable hm l).comp measurable_snd)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g2_joint_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:146
theorem Fhat_g2_lift_zero

Each reflected canonical pair effect has zero intercept.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
d :
ℕ
m :
j l :
Fin d
hjl :
j ≠ l
Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) 0 = 0
Proof (Lean source)
-- @node: Fhat_g2_lift_zero lemma Fhat_g2_lift_zero {d : ℕ} (m : CenteredL2Fn d) (j l : Fin d) (hjl : j ≠ l) : Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) 0 = 0 := by have hm : Measurable (fun x : Cube d => g2 m.val j l (x j) (x l)) := by have hmeas := m.property.1 fun_prop apply Fhat_zero_of_centered (⟨_, hm, g2_lift_memLp m.property.1 m.property.2.1 j l hjl, integral_g2_lift_centered m j l hjl⟩ : CenteredL2Fn d)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_g2_lift_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:157
theorem torus_resample_coordinate_measurePreserving Lemma torus_resample_coordinate_measurePreserving in the paper ↗

Replacing one torus coordinate by the corresponding coordinate of an independent Haar draw preserves Haar probability. The asserted mathematical result follows.

Formal statement
d :
ℕ
r :
Fin d
MeasurePreserving (fun z : Torus d × Torus d => fun i => if i = r then z.2 i else z.1 i) ((torusMeasure d).prod (torusMeasure d)) (torusMeasure d)
Proof (Lean source)
-- @node: torus_resample_coordinate_measurePreserving lemma torus_resample_coordinate_measurePreserving {d : ℕ} (r : Fin d) : MeasurePreserving (fun z : Torus d × Torus d => fun i => if i = r then z.2 i else z.1 i) ((torusMeasure d).prod (torusMeasure d)) (torusMeasure d) := by classical have h := (measurePreserving_arrowProdEquivProdArrow (AddCircle (1 : ℝ)) (AddCircle (1 : ℝ)) (Fin d) (fun _ => haarAddCircle) (fun _ => haarAddCircle)).symm have hp : MeasurePreserving (fun z : Fin d → AddCircle (1 : ℝ) × AddCircle (1 : ℝ) => fun i => if i = r then (z i).2 else (z i).1) (Measure.pi (fun _ : Fin d => AddCircle.haarAddCircle.prod haarAddCircle)) (torusMeasure d) := by unfold torusMeasure apply measurePreserving_pi (fun _ : Fin d => AddCircle.haarAddCircle.prod haarAddCircle) (fun _ : Fin d => haarAddCircle) (f := fun i z => if i = r then z.2 else z.1) intro i by_cases hi : i = r · simpa only [if_pos hi] using (measurePreserving_snd (μ := haarAddCircle) (ν := haarAddCircle)) · simpa only [if_neg hi] using (measurePreserving_fst (μ := haarAddCircle) (ν := haarAddCircle)) exact hp.comp h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torus_resample_coordinate_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:169

A character with zero frequency in a coordinate is unchanged by resampling that coordinate. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
k :
Fin d → ℤ
r :
Fin d
hr :
k r = 0
y z :
ek k (fun i => if i = r then z i else y i) = ek k y
Proof (Lean source)
-- @node: ek_resample_coordinate lemma ek_resample_coordinate {d : ℕ} (k : Fin d → ℤ) (r : Fin d) (hr : k r = 0) (y z : Torus d) : ek k (fun i => if i = r then z i else y i) = ek k y := by classical unfold ek mFourier simp only [ContinuousMap.coe_mk] apply Finset.prod_congr rfl intro i _ by_cases hi : i = r · subst i; simp [hr] · simp [hi]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ek_resample_coordinate · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:197
theorem Fhat_g2_lift_zero_right

A reflected pair coefficient vanishes when its second coordinate frequency is zero, by Fubini and canonical centering. Under the stated conditions.

Formal statement
d :
ℕ
m :
j l :
Fin d
hjl :
j ≠ l
k :
Fin d → ℤ
hkl :
k l = 0
Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k = 0
Proof (Lean source)
-- @node: Fhat_g2_lift_zero_right lemma Fhat_g2_lift_zero_right {d : ℕ} (m : CenteredL2Fn d) (j l : Fin d) (hjl : j ≠ l) (k : Fin d → ℤ) (hkl : k l = 0) : Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k = 0 := by classical let f : Torus d → ℂ := fun y => ek (-k) y * (g2 m.val j l (fold y j) (fold y l) : ℂ) have hf : Integrable f (torusMeasure d) := ek_mul_integrable (-k) ((reflExt_memLp_of_cube (g2_lift_memLp m.property.1 m.property.2.1 j l hjl)).integrable (by norm_num)) have hp := torus_resample_coordinate_measurePreserving l have hi := hp.integrable_comp_of_integrable hf have ht := integral_map hp.measurable.aemeasurable (by rw [hp.map_eq] exact hf.aestronglyMeasurable) rw [hp.map_eq] at ht have he : (fun z : Torus d × Torus d => f (fun i => if i = l then z.2 i else z.1 i)) = (fun z => ek (-k) z.1 * (g2 m.val j l (fold z.1 j) (fold z.2 l) : ℂ)) := by funext z simp only [f, ek_resample_coordinate (-k) l (by simpa using hkl), fold, if_neg hjl, if_true] simp only [Function.comp_def] at hi rw [he] at hi ht have hcenter := (fold_measurePreserving d).quasiMeasurePreserving.ae (g2_integral_right_centered m j l hjl) have hz : (fun y : Torus d => ∫ z : Torus d, ek (-k) y * (g2 m.val j l (fold y j) (fold z l) : ℂ) ∂torusMeasure d) =ᵐ[torusMeasure d] 0 := by filter_upwards [hcenter] with y hy have hmap := integral_map (f := fun x : Cube d => (g2 m.val j l (fold y j) (x l) : ℂ)) (fold_measurePreserving d).measurable.aemeasurable (by rw [(fold_measurePreserving d).map_eq] exact hy.1.ofReal.aestronglyMeasurable) rw [(fold_measurePreserving d).map_eq] at hmap rw [integral_const_mul, ← hmap, integral_complex_ofReal, hy.2] simp change (∫ y, f y ∂torusMeasure d) = 0 rw [ht, integral_prod _ hi, integral_congr_ae hz] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_g2_lift_zero_right · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:210
theorem Fhat_g2_lift_zero_left

A reflected pair coefficient vanishes when its first coordinate frequency is zero. Under the stated conditions.

Formal statement
d :
ℕ
m :
j l :
Fin d
hjl :
j ≠ l
k :
Fin d → ℤ
hkj :
k j = 0
Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k = 0
Proof (Lean source)
-- @node: Fhat_g2_lift_zero_left lemma Fhat_g2_lift_zero_left {d : ℕ} (m : CenteredL2Fn d) (j l : Fin d) (hjl : j ≠ l) (k : Fin d → ℤ) (hkj : k j = 0) : Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k = 0 := by simpa only [g2_swap_coordinates m.val j l hjl] using Fhat_g2_lift_zero_right m l j (Ne.symm hjl) k hkj
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_g2_lift_zero_left · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:253
theorem Fhat_g2_lift_support_exact

Every nonzero reflected canonical pair coefficient has support exactly equal to its two coordinates. Under the stated conditions.

Formal statement
d :
ℕ
m :
j l :
Fin d
hjl :
j ≠ l
k :
Fin d → ℤ
hk :
Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k ≠ 0
frequencySupport k = {j, l}
Proof (Lean source)
-- @node: Fhat_g2_lift_support_exact lemma Fhat_g2_lift_support_exact {d : ℕ} (m : CenteredL2Fn d) (j l : Fin d) (hjl : j ≠ l) (k : Fin d → ℤ) (hk : Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k ≠ 0) : frequencySupport k = {j, l} := by classical have hj : k j ≠ 0 := fun h => hk (Fhat_g2_lift_zero_left m j l hjl k h) have hl : k l ≠ 0 := fun h => hk (Fhat_g2_lift_zero_right m j l hjl k h) ext r simp only [frequencySupport, mem_filter, Finset.mem_univ, true_and, Finset.mem_insert, Finset.mem_singleton] constructor · intro hr by_contra h have hrj : r ≠ j := fun e => h (inl e) have hrl : r ≠ l := fun e => h (inr e) exact hk (Fhat_g2_lift_zero_off_coordinates m j l r hjl hrj hrl k hr) · rintro (rfl | rfl) · exact hj · exact hl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_g2_lift_support_exact · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:261
theorem Fhat_g1_lift_support_exact

Every nonzero reflected canonical main coefficient has support exactly equal to its coordinate. Under the stated conditions.

Formal statement
d :
ℕ
m :
j :
Fin d
k :
Fin d → ℤ
hk :
Fhat (fun x : Cube d => g1 m.val j (x j)) k ≠ 0
Proof (Lean source)
-- @node: Fhat_g1_lift_support_exact lemma Fhat_g1_lift_support_exact {d : ℕ} (m : CenteredL2Fn d) (j : Fin d) (k : Fin d → ℤ) (hk : Fhat (fun x : Cube d => g1 m.val j (x j)) k ≠ 0) : frequencySupport k = {j} := by classical have hoff (r : Fin d) (hr : r ≠ j) : k r = 0 := by by_contra h exact hk (Fhat_g1_lift_zero_off_coordinate m j r hr k h) have hj : k j ≠ 0 := by intro h have hz : k = 0 := by funext r by_cases hr : r = j · simpa [hr] using h · exact hoff r hr rw [hz] at hk exact hk (Fhat_g1_lift_zero m j) ext r simp only [frequencySupport, mem_filter, Finset.mem_univ, true_and, Finset.mem_singleton] constructor · intro hr by_contra h exact hr (hoff r h) · rintro rfl exact hj
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_g1_lift_support_exact · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:284
theorem Fhat_orderTwo_single_component

At a singleton-support frequency the full order-two outcome coefficient equals its unique main component coefficient. Under the stated conditions.

Formal statement
d :
ℕ
m :
hm :
j :
Fin d
k :
Fin d → ℤ
hks :
Fhat m.val k = Fhat (fun x : Cube d => g1 m.val j (x j)) k
Proof (Lean source)
-- @node: Fhat_orderTwo_single_component lemma Fhat_orderTwo_single_component {d : ℕ} (m : CenteredL2Fn d) (hm : OrderTwo m) (j : Fin d) (k : Fin d → ℤ) (hks : frequencySupport k = {j}) : Fhat m.val k = Fhat (fun x : Cube d => g1 m.val j (x j)) k := by classical have hA : (∑ r, Fhat (fun x : Cube d => g1 m.val r (x r)) k) = Fhat (fun x : Cube d => g1 m.val j (x j)) k := by apply Finset.sum_eq_single j · intro r _ hrj by_contra hr have he := (Fhat_g1_lift_support_exact m r k hr).symm.trans hks exact hrj (Finset.singleton_inj.mp he) · simp have hB (r t : Fin d) : (if r < t then Fhat (fun x : Cube d => g2 m.val r t (x r) (x t)) k else 0) = 0 := by by_cases hrt : r < t · rw [if_pos hrt] by_contra h have he := (Fhat_g2_lift_support_exact m r t (ne_of_lt hrt) k h).symm.trans hks have hc := congrArg card he simp [ne_of_lt hrt] at hc · exact if_neg hrt rw [Fhat_orderTwo_sum m hm k, hA] simp_rw [hB] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_orderTwo_single_component · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:314
theorem Fhat_orderTwo_pair_component

At an ordered pair-support frequency the full order-two outcome coefficient equals its unique pair component coefficient. Under the stated conditions.

Formal statement
d :
ℕ
m :
hm :
j l :
Fin d
hjl :
j < l
k :
Fin d → ℤ
hks :
frequencySupport k = {j, l}
Fhat m.val k = Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k
Proof (Lean source)
-- @node: Fhat_orderTwo_pair_component lemma Fhat_orderTwo_pair_component {d : ℕ} (m : CenteredL2Fn d) (hm : OrderTwo m) (j l : Fin d) (hjl : j < l) (k : Fin d → ℤ) (hks : frequencySupport k = {j, l}) : Fhat m.val k = Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k := by classical have hA (r : Fin d) : Fhat (fun x : Cube d => g1 m.val r (x r)) k = 0 := by by_contra h have he := (Fhat_g1_lift_support_exact m r k h).symm.trans hks have hc := congrArg card he simp [ne_of_lt hjl] at hc have hB (r t : Fin d) : (if r < t then Fhat (fun x : Cube d => g2 m.val r t (x r) (x t)) k else 0) = if r = j ∧ t = l then Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k else 0 := by by_cases heq : r = j ∧ t = l · obtain ⟨rfl, rfl⟩ := heq simp [hjl] · rw [if_neg heq] by_cases hrt : r < t · rw [if_pos hrt] by_contra h have he := (Fhat_g2_lift_support_exact m r t (ne_of_lt hrt) k h).symm.trans hks have hr : r = j ∨ r = l := by have hmem : r ∈ ({j,l} : Finset (Fin d)) := by rw [← he]; simp simpa using hmem have ht : t = j ∨ t = l := by have hmem : t ∈ ({j,l} : Finset (Fin d)) := by rw [← he]; simp simpa using hmem rcases hr with rfl | rfl <;> rcases ht with rfl | rfl <;> omega · exact if_neg hrt rw [Fhat_orderTwo_sum m hm k] simp_rw [hA, hB] simp [ite_and]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_orderTwo_pair_component · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionANOVACentering.lean:342
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionBudget 2 declarations The component contraction and pooled ANOVA bound for the even reflected extension.

Exact pooled reflection budget

The component contraction and pooled ANOVA bound for the even reflected extension.

theorem exact_reflection_budget

[ Exact component reflection contraction and its pooled ANOVA consequences. Parseval and interpolation have proved witnesses; no periodic cube boundary condition is assumed. This uses the stated conclusion.

Formal statement
conclusion 1
p :
ℕ
p = 1 ∨ p = 2
s :
ℝ
0 < s
s ≤ 1
g :
Cube p → ℝ
sobolevNormSq p s g < ⊤
conclusion 2
d :
ℕ
s :
ℝ
2 ≤ d
0 < s
s ≤ 1
m :
Fhat m.val 0 = 0
k :
2 < (frequencySupport k).card
Fhat m.val k = 0
reflectedBudget s m.val ≤ 1
(∫ x, |m.val x| ^ 2 ∂cubeMeasure d) ≤ 1
Proof (Lean source)
lemma exact_reflection_budget : (∀ (p : ℕ), p = 1 ∨ p = 2 → ∀ s : ℝ, 0 < s → s ≤ 1 → ∀ g : Cube p → ℝ, Measurable g → MemLp g 2 (cubeMeasure p) → sobolevNormSq p s g < ⊤ → componentFourierBudget p s g ≤ sobolevNormSq p s g) ∧ (∀ (d : ℕ) (s : ℝ), 2 ≤ d → 0 < s → s ≤ 1 → ∀ m : CenteredL2Fn d, SobolevClass d s m → Fhat m.val 0 = 0 ∧ (∀ k, 2 < (frequencySupport k).card → Fhat m.val k = 0) ∧ reflectedBudget s m.val ≤ 1 ∧ (∫ x, |m.val x| ^ 2 ∂cubeMeasure d) ≤ 1) := by -- The zero-order endpoint is proved in ReflectionEndpointZero. -- ReflectionWeakDerivative proves the one-dimensional smooth first-order endpoint. -- ReflectionPlaneParseval assembles joint Parseval and the two derivative multipliers -- into the smooth two-dimensional spectral endpoint, with exact gradient factor 1/2. -- ReflectionTruncation constructs the smooth inverse integrals, proves all their -- frequency moments integrable, and proves exact weighted frequency convergence. -- ReflectionInverseL2 proves spatial L² membership, exact energy/distance identities, -- and existence of the spatial L² limit of the smooth inverse truncations. -- ReflectionInversePairing proves Fubini and exact adjoint pairing for these -- inverse integrals, and their a.e. agreement with the normalized, reflected -- Mathlib Fourier L² representatives. -- ReflectionInverseLimit identifies the completeness limit as the explicit normalized, -- reflected Mathlib Fourier L² representative for any measurable L² frequency profile. -- Adjoint pairing and Plancherel now identify the inverse representative of an -- admissible extension's angular profile with that original extension in L². -- ReflectionSmoothDerivative differentiates the smooth inverse integrals on every -- coordinate slice and proves their exact first-order spatial energy identity, -- coordinate-energy identities for differences, and the spectral truncation bound. -- ReflectionGradientLimit derives full coordinate-profile L² regularity from finite -- first-order energy, identifies all actual smooth derivative limits, proves their -- exact limiting energy, and proves convergence of the whole first-order error. -- ReflectionSmoothEndpoint applies the slice and plane spectral estimates to -- the genuine inverse truncations. It completes the one-dimensional endpoint -- in the actual reflection operator and takes the extension infimum in both -- dimensions. Joint Haar-coordinate identification and spatial L² convergence -- now complete the two-dimensional endpoint with exact gradient factor 1/2. -- ReflectionProfileEndpoint constructs the common frequency-to-torus operator -- on complete L² classes, proves both genuine endpoint gauge contractions, -- and applies normalized K-method interpolation with constant exactly one. -- ReflectionTargetInterpolation transports the periodic endpoint gauges through -- Fourier coefficients, applies exact weighted interpolation, and takes the -- extension infimum. The component contraction is now complete for every s. -- ReflectionANOVA derives canonical component L² regularity, main-effect centering, -- coordinate-local Fourier supports, and exact coefficient additivity. -- ReflectionANOVACentering proves pair centering in each coordinate, exact component -- supports, and identification of each ambient coefficient with its unique component. -- ReflectionCoefficientTransport identifies local and ambient coefficients and -- their exact local-dimension weights. ReflectionPooledBudget sums the disjoint -- canonical supports and applies the constant-one component contractions. refine ⟨?_, ?_⟩ · intro p hp s hs hs1 g hg hLp hfinite exact componentFourierBudget_le_sobolevNormSq p hp s hs hs1 g · intro d s hd hs hs1 m hm have hsupport := Fhat_zero_of_orderTwo_from_components m hm.orderTwo have hbudget := reflectedBudget_le_one_of_sobolevClass hs hs1 m hm exact ⟨Fhat_zero_of_centered m, hsupport, hbudget, cube_second_moment_le_of_reflectedBudget (by omega) hs.le m hsupport hbudget⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.exact_reflection_budget · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudget.lean:20
theorem sobolev_cube_second_moment_le_one

The pooled reflection estimate controls the original-cube second moment.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
d :
ℕ
s :
ℝ
hd :
2 ≤ d
hs :
0 < s
hs1 :
s ≤ 1
m :
hm :
(∫ x, m.val x ^ 2 ∂cubeMeasure d) ≤ 1
Proof (Lean source)
-- @node: sobolev_cube_second_moment_le_one lemma sobolev_cube_second_moment_le_one {d : ℕ} {s : ℝ} (hd : 2 ≤ d) (hs : 0 < s) (hs1 : s ≤ 1) (m : CenteredL2Fn d) (hm : SobolevClass d s m) : (∫ x, m.val x ^ 2 ∂cubeMeasure d) ≤ 1 := by have h := (exact_reflection_budget).2 d s hd hs hs1 m hm simpa only [sq_abs] using h.2.2.2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.sobolev_cube_second_moment_le_one · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudget.lean:80
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionBudgetTransport 10 declarations Folding sends normalized Haar measure exactly to cube probability.

Cube transport and the zero Fourier coefficient

Folding sends normalized Haar measure exactly to cube probability. This gives representative-independent reflection and the centered zero-frequency identity.

theorem fold_cubeReflection_ae

Folding the independently reflected cube sample recovers its original point almost surely.

Formal statement
d :
ℕ
(fun z : Cube d × (Fin d → Bool) => fold (fun j => reflectedCoordinate (z.1 j) (z.2 j)))
=ᵐ[ (cubeMeasure d).prod (uniformOfFintype (Fin d → Bool)).toMeasure] fst
Proof (Lean source)
-- @node: fold_cubeReflection_ae lemma fold_cubeReflection_ae (d : ℕ) : (fun z : Cube d × (Fin d → Bool) => fold (fun j => reflectedCoordinate (z.1 j) (z.2 j))) =ᵐ[ (cubeMeasure d).prod (uniformOfFintype (Fin d → Bool)).toMeasure] fst := by haveI : IsProbabilityMeasure (uniformOfFintype (Fin d → Bool)).toMeasure := inferInstance have hc := (measurePreserving_fst (μ := cubeMeasure d) (ν := (uniformOfFintype (Fin d → Bool)).toMeasure)).quasiMeasurePreserving.ae (cube_mem_ae d) filter_upwards [hc] with z hz funext j exact fold_lift_apply (n := 1) (fun _ => z.1) (fun _ => z.2) 0 j (hz j)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fold_cubeReflection_ae · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudgetTransport.lean:16
theorem fold_measurePreserving

Normalized Haar measure folds to unit-cube Lebesgue probability in every dimension.

Formal statement
d :
ℕ
MeasurePreserving (fold : Torus d → Cube d) (torusMeasure d) (cubeMeasure d)
Proof (Lean source)
-- @node: fold_measurePreserving lemma fold_measurePreserving (d : ℕ) : MeasurePreserving (fold : Torus d → Cube d) (torusMeasure d) (cubeMeasure d) := by refine ⟨fold_measurable d, ?_⟩ rw [← cubeReflection_map d, Measure.map_map (fold_measurable d)] · trans Measure.map fst ((cubeMeasure d).prod (uniformOfFintype (Fin d → Bool)).toMeasure) · exact Measure.map_congr (fold_cubeReflection_ae d) · haveI : IsProbabilityMeasure (uniformOfFintype (Fin d → Bool)).toMeasure := inferInstance exact (measurePreserving_fst (μ := cubeMeasure d) (ν := (uniformOfFintype (Fin d → Bool)).toMeasure)).map_eq · unfold reflectedCoordinate apply measurable_pi_lambda intro j apply AddCircle.measurable_mk'.comp apply Measurable.ite · have hb : Measurable (fun z : Cube d × (Fin d → Bool) => z.2 j) := (measurable_pi_apply j).comp measurable_snd exact hb (measurableSet_singleton true) · fun_prop · fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fold_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudgetTransport.lean:30
theorem reflExt_congr_ae

Reflection preserves almost-everywhere equality of cube representatives. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
Cube d → ℝ
h :
m =ᵐ[cubeMeasure d] g
Proof (Lean source)
-- @node: reflExt_congr_ae lemma reflExt_congr_ae {d : ℕ} {m g : Cube d → ℝ} (h : m =ᵐ[cubeMeasure d] g) : reflExt m =ᵐ[torusMeasure d] reflExt g := by filter_upwards [(fold_measurePreserving d).quasiMeasurePreserving.ae h] with y hy simp only [reflExt, hy]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflExt_congr_ae · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudgetTransport.lean:53
theorem Fhat_zero_of_centered

The zero Fourier coefficient of a reflected centered outcome vanishes. The asserted mathematical result follows.

Formal statement
d :
ℕ
m :
Fhat m.val 0 = 0
Proof (Lean source)
-- @node: Fhat_zero_of_centered lemma Fhat_zero_of_centered {d : ℕ} (m : CenteredL2Fn d) : Fhat m.val 0 = 0 := by haveI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ haveI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure infer_instance have hi : Integrable (fun x => (m.val x : ℂ)) (cubeMeasure d) := (m.property.2.1.integrable (by norm_num)).ofReal have ht := integral_map (fold_measurable d).aemeasurable (by rw [(fold_measurePreserving d).map_eq] exact hi.aestronglyMeasurable) rw [(fold_measurePreserving d).map_eq] at ht simp only [Fhat, ek, neg_zero, UnitAddTorus.mFourier_zero, ContinuousMap.one_apply, one_mul, reflExt] rw [← ht, integral_complex_ofReal, m.property.2.2] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_zero_of_centered · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudgetTransport.lean:61
theorem reflExt_memLp_of_cube

Every cube L² representative reflects to a torus L² representative, with no centering requirement. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
Cube d → ℝ
hg :
Proof (Lean source)
-- @node: reflExt_memLp_of_cube lemma reflExt_memLp_of_cube {d : ℕ} {g : Cube d → ℝ} (hg : MemLp g 2 (cubeMeasure d)) : MemLp (reflExt g) 2 (torusMeasure d) := by exact hg.ofReal.comp_measurePreserving (fold_measurePreserving d)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflExt_memLp_of_cube · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudgetTransport.lean:80
theorem cube_fourier_mass

Parseval and folding identify the full Fourier mass with the cube second moment. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
g :
Cube d → ℝ
hg :
hLp :
(∫⁻ x, ofReal |g x| ^ 2 ∂cubeMeasure d)
= ∑' k : Fin d → ℤ, ofReal ‖Fhat g k‖ ^ 2
Proof (Lean source)
-- @node: cube_fourier_mass lemma cube_fourier_mass {d : ℕ} (hd : 0 < d) (g : Cube d → ℝ) (hg : Measurable g) (hLp : MemLp g 2 (cubeMeasure d)) : (∫⁻ x, ofReal |g x| ^ 2 ∂cubeMeasure d) = ∑' k : Fin d → ℤ, ofReal ‖Fhat g k‖ ^ 2 := by have hp := commonShift_parseval_lintegral (n := 1) hd (reflExt g) (reflExt_memLp_of_cube hLp) (fun _ => 1) (fun _ => 0) have hz (k : Fin d → ℤ) : (mFourier k) 0 = 1 := by simp only [mFourier, ContinuousMap.coe_mk, Pi.zero_apply, fourier_eval_zero, Finset.prod_const_one] simp only [Fin.sum_univ_one, one_mul, zero_sub, hz, norm_one, ENNReal.ofReal_one, one_pow, mul_one, mFourierCoeff_reflExt] at hp have hn : MeasurePreserving (fun y : Torus d => -y) (torusMeasure d) (torusMeasure d) := measurePreserving_pi (fun _ : Fin d => haarAddCircle) (fun _ : Fin d => haarAddCircle) (fun _ => Measure.measurePreserving_neg haarAddCircle) have hmeas : Measurable (fun y : Torus d => ofReal ‖reflExt g y‖ ^ 2) := by apply Measurable.pow_const apply ENNReal.measurable_ofReal.comp apply Measurable.norm exact Complex.measurable_ofReal.comp (hg.comp (fold_measurable d)) rw [hn.lintegral_comp hmeas] at hp rw [reflExt_sq_lintegral_eq d g hg] at hp exact hp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_fourier_mass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudgetTransport.lean:87
theorem cube_second_moment_fourier_mass

Centered outcomes inherit the full cube Parseval identity. Under the stated conditions.

Formal statement
d :
ℕ
hd :
0 < d
m :
(∫⁻ x, ofReal |m.val x| ^ 2 ∂cubeMeasure d)
= ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2
Proof (Lean source)
-- @node: cube_second_moment_fourier_mass lemma cube_second_moment_fourier_mass {d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) : (∫⁻ x, ofReal |m.val x| ^ 2 ∂cubeMeasure d) = ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2 := cube_fourier_mass hd m.val m.property.1 m.property.2.1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_second_moment_fourier_mass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudgetTransport.lean:113
theorem componentFourierBudget_zero

The zero-smoothness endpoint is exactly cube L² energy under normalized Haar measure. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
g :
Cube p → ℝ
hg :
hLp :
componentFourierBudget p 0 g = ∫⁻ x, ofReal |g x| ^ 2 ∂cubeMeasure p
Proof (Lean source)
-- @node: componentFourierBudget_zero lemma componentFourierBudget_zero {p : ℕ} (hp : 0 < p) (g : Cube p → ℝ) (hg : Measurable g) (hLp : MemLp g 2 (cubeMeasure p)) : componentFourierBudget p 0 g = ∫⁻ x, ofReal |g x| ^ 2 ∂cubeMeasure p := by rw [cube_fourier_mass hp g hg hLp] simp only [componentFourierBudget, Real.rpow_zero, one_mul, ENNReal.ofReal_pow (norm_nonneg _)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.componentFourierBudget_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudgetTransport.lean:120
theorem fourier_mass_le_reflectedBudget Lemma fourier_mass_le_reflectedBudget in the paper ↗

Nonnegative smoothness weights are at least one, so the pooled spectral budget controls the full Fourier mass when the excluded coefficients vanish. Under the stated conditions.

Formal statement
d :
ℕ
s :
ℝ
hs :
0 ≤ s
m :
Cube d → ℝ
hzero :
Fhat m 0 = 0
hsupport :
∀ k
if
2 < (frequencySupport k).card
then
Fhat m k = 0
(∑' k : Fin d → ℤ, ofReal ‖Fhat m k‖ ^ 2) ≤ reflectedBudget s m
Proof (Lean source)
-- @node: fourier_mass_le_reflectedBudget lemma fourier_mass_le_reflectedBudget {d : ℕ} {s : ℝ} (hs : 0 ≤ s) (m : Cube d → ℝ) (hzero : Fhat m 0 = 0) (hsupport : ∀ k, 2 < (frequencySupport k).card → Fhat m k = 0) : (∑' k : Fin d → ℤ, ofReal ‖Fhat m k‖ ^ 2) ≤ reflectedBudget s m := by apply ENNReal.tsum_le_tsum intro k by_cases hk : 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 · simp only [if_pos hk] rw [← ENNReal.ofReal_pow (norm_nonneg _) 2] apply ENNReal.ofReal_le_ofReal have hn : 0 ≤ frequencyComplexity k := by apply div_nonneg · exact Finset.sum_nonneg (fun j _ => sq_nonneg (k j : ℝ)) · positivity have hw : 1 ≤ (1 + pi ^ 2 * frequencyComplexity k) ^ s := Real.one_le_rpow (by nlinarith [sq_nonneg pi]) hs nlinarith [sq_nonneg ‖Fhat m k‖] · simp only [if_neg hk] have hz : Fhat m k = 0 := by by_cases hc : (frequencySupport k).card = 0 · have hk0 : k = 0 := by funext j have he := Finset.card_eq_zero.mp hc have hj : j ∉ frequencySupport k := by rw [he]; simp simpa [frequencySupport] using hj simpa [hk0] using hzero · exact hsupport k (by omega) simp [hz]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fourier_mass_le_reflectedBudget · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudgetTransport.lean:130
theorem cube_second_moment_le_of_reflectedBudget

Once the pooled spectral estimate and its support statement are proved, Parseval supplies the original-cube second-moment bound without a dimension factor. Under the stated conditions.

Formal statement
d :
ℕ
s :
ℝ
hd :
0 < d
hs :
0 ≤ s
m :
hsupport :
∀ k
if
2 < (frequencySupport k).card
then
Fhat m.val k = 0
hbudget :
reflectedBudget s m.val ≤ 1
(∫ x, |m.val x| ^ 2 ∂cubeMeasure d) ≤ 1
Proof (Lean source)
-- @node: cube_second_moment_le_of_reflectedBudget lemma cube_second_moment_le_of_reflectedBudget {d : ℕ} {s : ℝ} (hd : 0 < d) (hs : 0 ≤ s) (m : CenteredL2Fn d) (hsupport : ∀ k, 2 < (frequencySupport k).card → Fhat m.val k = 0) (hbudget : reflectedBudget s m.val ≤ 1) : (∫ x, |m.val x| ^ 2 ∂cubeMeasure d) ≤ 1 := by have hmass := (fourier_mass_le_reflectedBudget hs m.val (Fhat_zero_of_centered m) hsupport).trans hbudget rw [← cube_second_moment_fourier_mass hd m] at hmass have hi := m.property.2.1.integrable_norm_pow (by norm_num) simp only [Real.norm_eq_abs] at hi have he : ofReal (∫ x, |m.val x| ^ 2 ∂cubeMeasure d) = ∫⁻ x, ofReal |m.val x| ^ 2 ∂cubeMeasure d := by rw [ofReal_integral_eq_lintegral_ofReal hi (Filter.Eventually.of_forall fun x => sq_nonneg |m.val x|)] simp_rw [ENNReal.ofReal_pow (abs_nonneg _) 2] rw [← he, ← ENNReal.ofReal_one] at hmass exact (ENNReal.ofReal_le_ofReal_iff (by norm_num)).mp hmass
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_second_moment_le_of_reflectedBudget · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionBudgetTransport.lean:162
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionCoefficientTransport 16 declarations Selecting distinct coordinates preserves cube and Haar probability.

Local-to-ambient canonical Fourier coefficients

Selecting distinct coordinates preserves cube and Haar probability. Characters supported on those coordinates transport exactly, with normalized coefficients and no factor depending on the ambient dimension.

theorem coordinateSelection_measurePreserving Lemma coordinateSelection_measurePreserving in the paper ↗

A selection of distinct coordinates preserves finite product probability. Under the stated conditions.

Formal statement
p d :
ℕ
A :
e :
Fin p → Fin d
he :
MeasurePreserving (fun x : Fin d → A => fun r => x (e r)) (Measure.pi (fun _ : Fin d => μ)) (Measure.pi (fun _ : Fin p => μ))
Proof (Lean source)
-- @node: coordinateSelection_measurePreserving lemma coordinateSelection_measurePreserving {p d : ℕ} {A : Type*} [MeasurableSpace A] (μ : Measure A) [IsProbabilityMeasure μ] (e : Fin p → Fin d) (he : Injective e) : MeasurePreserving (fun x : Fin d → A => fun r => x (e r)) (Measure.pi (fun _ : Fin d => μ)) (Measure.pi (fun _ : Fin p => μ)) := by have hind := (iIndepFun_pi (μ := fun _ : Fin d => μ) (X := fun _ => id) (fun _ => measurable_id.aemeasurable)).precomp he refine ⟨by fun_prop, ?_⟩ rw [hind.map_fun_eq_pi_map (fun r => (measurable_pi_apply (e r)).aemeasurable)] congr 1 funext r exact (measurePreserving_eval (fun _ : Fin d => μ) (e r)).map_eq
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.coordinateSelection_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:18
theorem torus_coordinateSelection_measurePreserving Lemma torus_coordinateSelection_measurePreserving in the paper ↗

Selecting distinct coordinates sends ambient Haar probability to local Haar probability. Under the stated conditions.

Formal statement
p d :
ℕ
e :
Fin p → Fin d
he :
MeasurePreserving (fun y : Torus d => fun r => y (e r)) (torusMeasure d) (torusMeasure p)
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torus_coordinateSelection_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:33
theorem cube_coordinateSelection_measurePreserving

Selecting distinct coordinates sends ambient cube probability to local cube probability. Under the stated conditions.

Formal statement
p d :
ℕ
e :
Fin p → Fin d
he :
MeasurePreserving (fun x : Cube d => fun r => x (e r)) (cubeMeasure d) (cubeMeasure p)
Proof (Lean source)
-- @node: cube_coordinateSelection_measurePreserving lemma cube_coordinateSelection_measurePreserving {p d : ℕ} (e : Fin p → Fin d) (he : Injective e) : MeasurePreserving (fun x : Cube d => fun r => x (e r)) (cubeMeasure d) (cubeMeasure p) := by have : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ exact coordinateSelection_measurePreserving _ e he
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_coordinateSelection_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:41
theorem fold_coordinateSelection Lemma fold_coordinateSelection in the paper ↗

[ Folding commutes pointwise with selection of coordinates. This uses the stated conclusion.

Formal statement
p d :
ℕ
e :
Fin p → Fin d
y :
fold (fun r => y (e r)) = fun r => fold y (e r)
Proof (Lean source)
-- @node: fold_coordinateSelection lemma fold_coordinateSelection {p d : ℕ} (e : Fin p → Fin d) (y : Torus d) : fold (fun r => y (e r)) = fun r => fold y (e r) := rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fold_coordinateSelection · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:51

A character supported on selected coordinates is exactly the corresponding local character.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
p d :
ℕ
e :
Fin p → Fin d
he :
k :
Fin d → ℤ
hk :
∀ j
if
j ∉ range e
then
k j = 0
y :
ek k y = ek (fun r => k (e r)) (fun r => y (e r))
Proof (Lean source)
-- @node: ek_coordinateSelection lemma ek_coordinateSelection {p d : ℕ} (e : Fin p → Fin d) (he : Injective e) (k : Fin d → ℤ) (hk : ∀ j, j ∉ range e → k j = 0) (y : Torus d) : ek k y = ek (fun r => k (e r)) (fun r => y (e r)) := by classical unfold ek mFourier simp only [ContinuousMap.coe_mk] calc (∏ j : Fin d, fourier (k j) (y j)) = ∏ j ∈ Finset.univ.image e, fourier (k j) (y j) := by symm apply Finset.prod_subset (Finset.subset_univ _) intro j _ hj have hz : k j = 0 := hk j (by simpa using hj) simp [hz] _ = ∏ r : Fin p, fourier (k (e r)) (y (e r)) := by rw [Finset.prod_image] intro a _ b _ hab exact he hab
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ek_coordinateSelection · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:56
theorem Fhat_coordinateSelection Lemma Fhat_coordinateSelection in the paper ↗

Normalized reflected Fourier coefficients transport from local to ambient coordinates. Under the stated conditions.

Formal statement
p d :
ℕ
e :
Fin p → Fin d
he :
g :
Cube p → ℝ
hg :
k :
Fin d → ℤ
hk :
∀ j
if
j ∉ range e
then
k j = 0
Fhat (fun x : Cube d => g (fun r => x (e r))) k = Fhat g (fun r => k (e r))
Proof (Lean source)
-- @node: Fhat_coordinateSelection lemma Fhat_coordinateSelection {p d : ℕ} (e : Fin p → Fin d) (he : Injective e) (g : Cube p → ℝ) (hg : Measurable g) (k : Fin d → ℤ) (hk : ∀ j, j ∉ range e → k j = 0) : Fhat (fun x : Cube d => g (fun r => x (e r))) k = Fhat g (fun r => k (e r)) := by have hp := torus_coordinateSelection_measurePreserving e he have hf : AEStronglyMeasurable (fun y : Torus p => ek (-(fun r => k (e r))) y * reflExt g y) (torusMeasure p) := by apply Measurable.aestronglyMeasurable have hm : Measurable (reflExt g) := Complex.measurable_ofReal.comp (hg.comp (fold_measurable p)) exact (mFourier _).continuous.measurable.mul hm have ht := integral_map hp.measurable.aemeasurable (by rw [hp.map_eq] exact hf) rw [hp.map_eq] at ht unfold Fhat rw [ht] apply integral_congr_ae filter_upwards [] with y rw [ek_coordinateSelection e he (-k) (by intro j hj simp [hk j hj]) y] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_coordinateSelection · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:78
theorem frequencySq_coordinateSelection Lemma frequencySq_coordinateSelection in the paper ↗

Selecting the supporting coordinates preserves the squared Euclidean frequency length. Under the stated conditions.

Formal statement
p d :
ℕ
e :
Fin p → Fin d
he :
k :
Fin d → ℤ
hk :
∀ j
if
j ∉ range e
then
k j = 0
frequencySq k = frequencySq (fun r => k (e r))
Proof (Lean source)
-- @node: frequencySq_coordinateSelection lemma frequencySq_coordinateSelection {p d : ℕ} (e : Fin p → Fin d) (he : Injective e) (k : Fin d → ℤ) (hk : ∀ j, j ∉ range e → k j = 0) : frequencySq k = frequencySq (fun r => k (e r)) := by classical unfold frequencySq calc (∑ j : Fin d, (k j : ℝ) ^ 2) = ∑ j ∈ Finset.univ.image e, (k j : ℝ) ^ 2 := by symm apply Finset.sum_subset (Finset.subset_univ _) intro j _ hj simp [hk j (by simpa using hj)] _ = ∑ r : Fin p, (k (e r) : ℝ) ^ 2 := by rw [Finset.sum_image] intro a _ b _ hab exact he hab
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencySq_coordinateSelection · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:106
theorem frequencySupport_card_coordinateSelection Lemma frequencySupport_card_coordinateSelection in the paper ↗

When all selected coordinates are active, ambient support has exactly local size. Under the stated conditions.

Formal statement
p d :
ℕ
e :
Fin p → Fin d
he :
k :
Fin d → ℤ
hk :
∀ j
if
j ∉ range e
then
k j = 0
hne :
∀ r, k (e r) ≠ 0
(frequencySupport k).card = p
Proof (Lean source)
-- @node: frequencySupport_card_coordinateSelection lemma frequencySupport_card_coordinateSelection {p d : ℕ} (e : Fin p → Fin d) (he : Injective e) (k : Fin d → ℤ) (hk : ∀ j, j ∉ range e → k j = 0) (hne : ∀ r, k (e r) ≠ 0) : (frequencySupport k).card = p := by classical have hs : frequencySupport k = Finset.univ.image e := by ext j simp only [frequencySupport, mem_filter, Finset.mem_univ, true_and, mem_image] constructor · intro hj have hr : j ∈ range e := by by_contra h exact hj (hk j h) obtain ⟨r, rfl⟩ := hr exact ⟨r, rfl⟩ · rintro ⟨r, _, rfl⟩ exact hne r rw [hs, Finset.card_image_of_injective _ he, Finset.card_univ, Fintype.card_fin]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencySupport_card_coordinateSelection · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:126
theorem frequencyComplexity_coordinateSelection Lemma frequencyComplexity_coordinateSelection in the paper ↗

The ambient complexity equals local squared length divided by local dimension. Under the stated conditions.

Formal statement
p d :
ℕ
e :
Fin p → Fin d
he :
k :
Fin d → ℤ
hk :
∀ j
if
j ∉ range e
then
k j = 0
hne :
∀ r, k (e r) ≠ 0
frequencyComplexity k = frequencySq (fun r => k (e r)) / (p : ℝ)
Proof (Lean source)
-- @node: frequencyComplexity_coordinateSelection lemma frequencyComplexity_coordinateSelection {p d : ℕ} (e : Fin p → Fin d) (he : Injective e) (k : Fin d → ℤ) (hk : ∀ j, j ∉ range e → k j = 0) (hne : ∀ r, k (e r) ≠ 0) : frequencyComplexity k = frequencySq (fun r => k (e r)) / (p : ℝ) := by rw [frequencyComplexity, frequencySq_coordinateSelection e he k hk, frequencySupport_card_coordinateSelection e he k hk hne]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyComplexity_coordinateSelection · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:149
theorem g1_local_memLp

The one-coordinate canonical representative is square integrable under local cube measure. The asserted mathematical result follows.

Formal statement
d :
ℕ
m :
j :
Fin d
MemLp (fun u : Cube 1 => g1 m.val j (u 0)) 2 (cubeMeasure 1)
Proof (Lean source)
-- @node: g1_local_memLp lemma g1_local_memLp {d : ℕ} (m : CenteredL2Fn d) (j : Fin d) : MemLp (fun u : Cube 1 => g1 m.val j (u 0)) 2 (cubeMeasure 1) := by have hg : Measurable (fun u : Cube 1 => g1 m.val j (u 0)) := by have hm := m.property.1 fun_prop have hp := cube_coordinateSelection_measurePreserving (fun _ : Fin 1 => j) (by intro a b _; exact Subsingleton.elim a b) refine ⟨hg.aestronglyMeasurable, ?_⟩ rw [← eLpNorm_comp_measurePreserving hg.aestronglyMeasurable hp] exact (g1_lift_memLp m.property.1 m.property.2.1 j).2
theorem g2_local_memLp

The two-coordinate canonical representative is square integrable under local cube measure. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
m :
j l :
Fin d
hjl :
j ≠ l
MemLp (fun u : Cube 2 => g2 m.val j l (u 0) (u 1)) 2 (cubeMeasure 2)
Proof (Lean source)
-- @node: g2_local_memLp lemma g2_local_memLp {d : ℕ} (m : CenteredL2Fn d) (j l : Fin d) (hjl : j ≠ l) : MemLp (fun u : Cube 2 => g2 m.val j l (u 0) (u 1)) 2 (cubeMeasure 2) := by have hg : Measurable (fun u : Cube 2 => g2 m.val j l (u 0) (u 1)) := by have hm := m.property.1 fun_prop have he : Injective (fun r : Fin 2 => if r = 0 then j else l) := by intro a b hab fin_cases a <;> fin_cases b <;> simp_all have hp := cube_coordinateSelection_measurePreserving _ he refine ⟨hg.aestronglyMeasurable, ?_⟩ rw [← eLpNorm_comp_measurePreserving hg.aestronglyMeasurable hp] simpa only [Function.comp_def, Fin.isValue, one_ne_zero, if_true, if_false] using (g2_lift_memLp m.property.1 m.property.2.1 j l hjl).2
theorem Fhat_g1_local_eq

A canonical main coefficient on its supporting coordinate equals its local coefficient. Under the stated conditions.

Formal statement
d :
ℕ
m :
j :
Fin d
k :
Fin d → ℤ
hks :
Fhat (fun x : Cube d => g1 m.val j (x j)) k
= Fhat (fun u : Cube 1 => g1 m.val j (u 0)) (fun _ => k j)
Proof (Lean source)
-- @node: Fhat_g1_local_eq lemma Fhat_g1_local_eq {d : ℕ} (m : CenteredL2Fn d) (j : Fin d) (k : Fin d → ℤ) (hks : frequencySupport k = {j}) : Fhat (fun x : Cube d => g1 m.val j (x j)) k = Fhat (fun u : Cube 1 => g1 m.val j (u 0)) (fun _ => k j) := by apply Fhat_coordinateSelection (fun _ : Fin 1 => j) (by intro a b _; exact Subsingleton.elim a b) (fun u : Cube 1 => g1 m.val j (u 0)) (by have hm := m.property.1 fun_prop) intro r hr have hrj : r ≠ j := by simpa using hr have hnot : r ∉ frequencySupport k := by simp [hks, hrj] simpa [frequencySupport] using hnot
theorem Fhat_g2_local_eq

A canonical pair coefficient on its two supporting coordinates equals its local coefficient. Under the stated conditions.

Formal statement
d :
ℕ
m :
j l :
Fin d
hjl :
j ≠ l
k :
Fin d → ℤ
hks :
frequencySupport k = {j, l}
Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k
= Fhat (fun u : Cube 2 => g2 m.val j l (u 0) (u 1)) (fun r => if r = 0 then k j else k l)
Proof (Lean source)
-- @node: Fhat_g2_local_eq lemma Fhat_g2_local_eq {d : ℕ} (m : CenteredL2Fn d) (j l : Fin d) (hjl : j ≠ l) (k : Fin d → ℤ) (hks : frequencySupport k = {j, l}) : Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k = Fhat (fun u : Cube 2 => g2 m.val j l (u 0) (u 1)) (fun r => if r = 0 then k j else k l) := by have he : Injective (fun r : Fin 2 => if r = 0 then j else l) := by intro a b hab fin_cases a <;> fin_cases b <;> simp_all have h := Fhat_coordinateSelection (fun r : Fin 2 => if r = 0 then j else l) he (fun u : Cube 2 => g2 m.val j l (u 0) (u 1)) (by have hm := m.property.1 fun_prop) k (by intro r hr have hrj : r ≠ j := by intro h exact hr ⟨0, by simp [h]⟩ have hrl : r ≠ l := by intro h exact hr ⟨1, by simp [h]⟩ have hnot : r ∉ frequencySupport k := by simp [hks, hrj, hrl] simpa [frequencySupport] using hnot) simpa only [Fin.isValue, one_ne_zero, if_true, if_false, apply_ite] using h
theorem lifted_component_budget_le_local Lemma lifted_component_budget_le_local in the paper ↗

Disjoint-support localization transports a lifted component's entire weighted budget into its local Fourier budget, with constant one. Under the stated conditions.

Formal statement
p d :
ℕ
e :
Fin p → Fin d
he :
g :
Cube p → ℝ
hg :
s :
ℝ
hsupport :
∀ k
if
Fhat (fun x : Cube d => g (fun r => x (e r))) k ≠ 0
then
frequencySupport k = Finset.univ.image e
(∑' k : Fin d → ℤ, ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g (fun r => x (e r))) k‖ ^ 2))
Proof (Lean source)
-- @node: lifted_component_budget_le_local lemma lifted_component_budget_le_local {p d : ℕ} (e : Fin p → Fin d) (he : Injective e) (g : Cube p → ℝ) (hg : Measurable g) (s : ℝ) (hsupport : ∀ k, Fhat (fun x : Cube d => g (fun r => x (e r))) k ≠ 0 → frequencySupport k = Finset.univ.image e) : (∑' k : Fin d → ℤ, ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g (fun r => x (e r))) k‖ ^ 2)) ≤ componentFourierBudget p s g := by classical let S : Set (Fin d → ℤ) := {k | frequencySupport k = Finset.univ.image e} let f : (Fin d → ℤ) → ℝ≥0∞ := fun k => ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g (fun r => x (e r))) k‖ ^ 2) have hf : support f ⊆ S := by intro k hk apply hsupport intro hz exact hk (by simp [f, hz]) have hoff (k : S) (j : Fin d) (hj : j ∉ range e) : k.val j = 0 := by have hnot : j ∉ frequencySupport k.val := by rw [k.property] simpa using hj simpa [frequencySupport] using hnot have hinj : Injective (fun k : S => fun r => k.val (e r)) := by intro k l hkl apply Subtype.ext funext j by_cases hj : j ∈ range e · obtain ⟨r, rfl⟩ := hj exact congrFun hkl r · rw [hoff k j hj, hoff l j hj] have hterm (k : S) : f k.val = ofReal ((1 + pi ^ 2 * frequencySq (fun r => k.val (e r)) / (p : ℝ)) ^ s * ‖Fhat g (fun r => k.val (e r))‖ ^ 2) := by have hne (r : Fin p) : k.val (e r) ≠ 0 := by have hm : e r ∈ frequencySupport k.val := by rw [k.property]; simp simpa [frequencySupport] using hm dsimp [f] rw [Fhat_coordinateSelection e he g hg k.val (hoff k), frequencyComplexity_coordinateSelection e he k.val (hoff k) hne, mul_div_assoc] change (∑' k, f k) ≤ _ rw [← tsum_subtype_eq_of_support_subset hf] simp_rw [hterm] exact ENNReal.tsum_comp_le_tsum_of_injective hinj _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.lifted_component_budget_le_local · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:229
theorem g1_ambient_budget_le_local

The ambient weighted budget of a canonical main effect is bounded by its local budget. The asserted mathematical result follows.

Formal statement
d :
ℕ
m :
j :
Fin d
s :
ℝ
(∑' k : Fin d → ℤ, ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g1 m.val j (x j)) k‖ ^ 2))
≤ componentFourierBudget 1 s (fun u => g1 m.val j (u 0))
Proof (Lean source)
-- @node: g1_ambient_budget_le_local lemma g1_ambient_budget_le_local {d : ℕ} (m : CenteredL2Fn d) (j : Fin d) (s : ℝ) : (∑' k : Fin d → ℤ, ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g1 m.val j (x j)) k‖ ^ 2)) ≤ componentFourierBudget 1 s (fun u => g1 m.val j (u 0)) := by apply lifted_component_budget_le_local (fun _ : Fin 1 => j) (by intro a b _; exact Subsingleton.elim a b) (fun u : Cube 1 => g1 m.val j (u 0)) (by have hm := m.property.1 fun_prop) s intro k hk simpa using Fhat_g1_lift_support_exact m j k hk
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g1_ambient_budget_le_local · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:278
theorem g2_ambient_budget_le_local

The ambient weighted budget of a canonical pair effect is bounded by its local budget. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
m :
j l :
Fin d
hjl :
j ≠ l
s :
ℝ
(∑' k : Fin d → ℤ, ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k‖ ^ 2))
≤ componentFourierBudget 2 s (fun u => g2 m.val j l (u 0) (u 1))
Proof (Lean source)
-- @node: g2_ambient_budget_le_local lemma g2_ambient_budget_le_local {d : ℕ} (m : CenteredL2Fn d) (j l : Fin d) (hjl : j ≠ l) (s : ℝ) : (∑' k : Fin d → ℤ, ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k‖ ^ 2)) ≤ componentFourierBudget 2 s (fun u => g2 m.val j l (u 0) (u 1)) := by have he : Injective (fun r : Fin 2 => if r = 0 then j else l) := by intro a b hab fin_cases a <;> fin_cases b <;> simp_all have h := lifted_component_budget_le_local (fun r : Fin 2 => if r = 0 then j else l) he (fun u : Cube 2 => g2 m.val j l (u 0) (u 1)) (by have hm := m.property.1 fun_prop) s (by intro k hk simp only [Fin.isValue, one_ne_zero, if_true, if_false] at hk rw [Fhat_g2_lift_support_exact m j l hjl k hk] ext r simp only [Finset.mem_insert, Finset.mem_singleton, mem_image, Finset.mem_univ, true_and] constructor · rintro (rfl | rfl) · exact ⟨0, by simp⟩ · exact ⟨1, by simp⟩ · rintro ⟨a, rfl⟩ fin_cases a <;> simp) simpa only [Fin.isValue, one_ne_zero, if_true, if_false] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.g2_ambient_budget_le_local · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionCoefficientTransport.lean:293
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionDefinitions 9 declarations Definitions fix the period-two folding map, reflected extension, frequency complexity, and component and pooled Fourier budgets, independently of the budget proofs.

Even reflection and the exact pooled Fourier budget

Definitions fix the period-two folding map, reflected extension, frequency complexity, and component and pooled Fourier budgets, independently of the budget proofs.

def fold

Fold y=2u to the closed unit cube, using the half-open representative of u.

Definition (Lean source)
r :
ℕ
shared
u :
fold u :
Cube r
fun h => let v := ((AddCircle.equivIco (1 : ℝ) 0) (u h)).val min (2 * v) (2 - 2 * v)
def reflExt

Even period-two extension.

Definition (Lean source)
d :
ℕ
shared
m :
Cube d → ℝ
y :
reflExt m y :
ℂ
(m (fold y) : ℂ)
def ek

Characters of the period-two torus.

Definition (Lean source)
d :
ℕ
shared
k :
Fin d → ℤ
y :
ek k y :
ℂ
def Fhat

Normalized Fourier coefficients of the reflected function.

Definition (Lean source)
d :
ℕ
shared
m :
Cube d → ℝ
k :
Fin d → ℤ
Fhat m k :
ℂ
∫ y, ek (-k) y * reflExt m y ∂torusMeasure d
def frequencySupport

Integer frequencies with their actual nonzero coordinate support.

Definition (Lean source)
d :
ℕ
shared
k :
Fin d → ℤ
frequencySupport k :
Finset.univ.filter (fun j => k j ≠ 0)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencySupport · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionDefinitions.lean:33
def frequencySq

Squared Euclidean length of an integer frequency.

Definition (Lean source)
d :
ℕ
shared
k :
Fin d → ℤ
frequencySq k :
ℝ
∑ j, (k j : ℝ) ^ 2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencySq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionDefinitions.lean:36
def frequencyComplexity

Complexity of a nonzero frequency, with the harmless value zero at frequency zero.

Definition (Lean source)
d :
ℕ
shared
k :
Fin d → ℤ
frequencyComplexity k :
ℝ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyComplexity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionDefinitions.lean:38
def componentFourierBudget

Squared weighted torus norm in a fixed component dimension.

Definition (Lean source)
p :
ℕ
s :
ℝ
g :
Cube p → ℝ
componentFourierBudget p s g :
ℝ≥0∞
∑' a : Fin p → ℤ, ofReal ((1 + pi ^ 2 * frequencySq a / (p : ℝ)) ^ s * ‖Fhat g a‖ ^ 2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.componentFourierBudget · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionDefinitions.lean:41
def reflectedBudget

The Fourier budget restricted to support sizes one and two.

Definition (Lean source)
d :
ℕ
shared
s :
ℝ
m :
Cube d → ℝ
reflectedBudget s m :
ℝ≥0∞
∑' k : Fin d → ℤ, if 1 ≤ (frequencySupport k).card ∧
≤ 2 then ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat m k‖ ^ 2) else 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectedBudget · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionDefinitions.lean:45
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionEndpointLimit 7 declarations Reflection is continuous on spatial L² classes.

Passage to the reflected spectral endpoint limit

Reflection is continuous on spatial L² classes. Character pairing is continuous on torus L² classes, and finite Fourier sums pass to the limit without losing any part of the weight. These are the completion steps in roadmap (5).

theorem reflectionTorusCoeff_eq_inner Lemma reflectionTorusCoeff_eq_inner in the paper ↗

Character pairing expresses each normalized coefficient as an L² inner product.

Formal statement
p :
ℕ
f :
Lp ℂ 2 (torusMeasure p)
k :
Fin p → ℤ
mFourierCoeff f k = inner ℂ (torusCharacterLp k) f
Proof (Lean source)
-- @node: reflectionTorusCoeff_eq_inner lemma reflectionTorusCoeff_eq_inner {p : ℕ} (f : Lp ℂ 2 (torusMeasure p)) (k : Fin p → ℤ) : mFourierCoeff f k = inner ℂ (torusCharacterLp k) f := by rw [L2.inner_def] apply integral_congr_ae filter_upwards [ContinuousMap.coeFn_toLp (p := (2 : ℝ≥0∞)) (𝕜 := ℂ) (torusMeasure p) (mFourier k)] with y hy simp only [torusCharacterLp] at * rw [hy] simp only [RCLike.inner_apply, UnitAddTorus.mFourier_neg, smul_eq_mul, mul_comm]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTorusCoeff_eq_inner · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointLimit.lean:17
theorem reflectionTorusCoeff_tendsto Lemma reflectionTorusCoeff_tendsto in the paper ↗

Spatial L² convergence implies convergence of each normalized Fourier coefficient.

Formal statement
p :
ℕ
ℕ → Lp ℂ 2 (torusMeasure p)
Lp ℂ 2 (torusMeasure p)
h :
Tendsto f atTop (𝓝 g)
k :
Fin p → ℤ
Tendsto (fun n => mFourierCoeff (f n) k) atTop (𝓝 (mFourierCoeff g k))
Proof (Lean source)
-- @node: reflectionTorusCoeff_tendsto lemma reflectionTorusCoeff_tendsto {p : ℕ} {f : ℕ → Lp ℂ 2 (torusMeasure p)} {g : Lp ℂ 2 (torusMeasure p)} (h : Tendsto f atTop (𝓝 g)) (k : Fin p → ℤ) : Tendsto (fun n => mFourierCoeff (f n) k) atTop (𝓝 (mFourierCoeff g k)) := by simp_rw [reflectionTorusCoeff_eq_inner] exact tendsto_const_nhds.inner h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTorusCoeff_tendsto · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointLimit.lean:30
theorem reflectionTorus_weightedBudget_le_of_tendsto Lemma reflectionTorus_weightedBudget_le_of_tendsto in the paper ↗

A uniform exact weighted Fourier bound survives an L² limit. The proof passes each finite sum to the limit and then takes their supremum. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
ℕ → Lp ℂ 2 (torusMeasure p)
Lp ℂ 2 (torusMeasure p)
h :
Tendsto f atTop (𝓝 g)
w :
(Fin p → ℤ) → ℝ
C :
ℝ≥0∞
hb :
∀ n, (∑' k, ofReal (w k * ‖UnitAddTorus.mFourierCoeff (f n) k‖ ^ 2)) ≤ C
(∑' k, ofReal (w k * ‖UnitAddTorus.mFourierCoeff g k‖ ^ 2)) ≤ C
Proof (Lean source)
-- @node: reflectionTorus_weightedBudget_le_of_tendsto lemma reflectionTorus_weightedBudget_le_of_tendsto {p : ℕ} {f : ℕ → Lp ℂ 2 (torusMeasure p)} {g : Lp ℂ 2 (torusMeasure p)} (h : Tendsto f atTop (𝓝 g)) (w : (Fin p → ℤ) → ℝ) (C : ℝ≥0∞) (hb : ∀ n, (∑' k, ofReal (w k * ‖UnitAddTorus.mFourierCoeff (f n) k‖ ^ 2)) ≤ C) : (∑' k, ofReal (w k * ‖UnitAddTorus.mFourierCoeff g k‖ ^ 2)) ≤ C := by classical rw [ENNReal.tsum_eq_iSup_sum] refine iSup_le fun K => ?_ have ht : Tendsto (fun n => ∑ k ∈ K, ofReal (w k * ‖UnitAddTorus.mFourierCoeff (f n) k‖ ^ 2)) atTop (𝓝 (∑ k ∈ K, ofReal (w k * ‖UnitAddTorus.mFourierCoeff g k‖ ^ 2))) := by apply tendsto_finsetSum intro k hk exact ENNReal.continuous_ofReal.continuousAt.tendsto.comp (tendsto_const_nhds.mul ((reflectionTorusCoeff_tendsto h k).norm.pow 2)) exact le_of_tendsto ht (Eventually.of_forall fun n => (ENNReal.sum_le_tsum K).trans (hb n))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTorus_weightedBudget_le_of_tendsto · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointLimit.lean:40
theorem reflectionSmoothApproximation_tendsto_reflected_original

The genuine smooth inverse truncations converge after even reflection to reflection of the original extension. No periodic trace condition is needed. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hG1 :
hG2 :
hF :
Tendsto (fun n : ℕ => reflectionL2Operator p ((reflectionSmoothApproximation_memLp hF (n : ℝ)).toLp (reflectionSmoothApproximation (Fourier G) (n : ℝ)))) atTop (𝓝 (reflectionL2Operator p (hG2.toLp G)))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_tendsto_reflected_original lemma reflectionSmoothApproximation_tendsto_reflected_original {p : ℕ} {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) : let hF : MemLp (Fourier G) 2 volume := angularFourier_memLp G hG1 hG2 Tendsto (fun n : ℕ => reflectionL2Operator p ((reflectionSmoothApproximation_memLp hF (n : ℝ)).toLp (reflectionSmoothApproximation (Fourier G) (n : ℝ)))) atTop (𝓝 (reflectionL2Operator p (hG2.toLp G))) := by dsimp only exact (reflectionL2Operator p).continuous.continuousAt.tendsto.comp (reflectionSmoothApproximation_tendsto_original hG1 hG2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_tendsto_reflected_original · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointLimit.lean:63
theorem reflectionL2Operator_extension_ae

Every admissible whole-space extension has exactly the cube function's reflected equivalence class under the common operator. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hG2 :
g :
Cube p → ℝ
hG :
G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun j => u j) : ℂ)
reflectionL2Operator p (hG2.toLp G) =ᵐ[torusMeasure p] reflExt g
Proof (Lean source)
-- @node: reflectionL2Operator_extension_ae lemma reflectionL2Operator_extension_ae {p : ℕ} {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG2 : MemLp G 2 volume) (g : Cube p → ℝ) (hG : G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun j => u j) : ℂ)) : reflectionL2Operator p (hG2.toLp G) =ᵐ[torusMeasure p] reflExt g := by have hrep := (foldEuclidean_measurePreserving p).quasiMeasurePreserving.ae (ae_restrict_of_ae hG2.coeFn_toLp) have hext := (foldEuclidean_measurePreserving p).quasiMeasurePreserving.ae hG filter_upwards [reflectionL2Operator_coeFn p (hG2.toLp G), hrep, hext] with y hy hrep hext exact hy.trans (hrep.trans hext)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionL2Operator_extension_ae · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointLimit.lean:79
theorem reflectionTorusCoeff_extension

Fourier coefficients of the reflected extension are independent of which admissible whole-space extension was chosen. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hG2 :
g :
Cube p → ℝ
hG :
G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun j => u j) : ℂ)
k :
Fin p → ℤ
mFourierCoeff (reflectionL2Operator p (hG2.toLp G)) k = Fhat g k
Proof (Lean source)
-- @node: reflectionTorusCoeff_extension lemma reflectionTorusCoeff_extension {p : ℕ} {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG2 : MemLp G 2 volume) (g : Cube p → ℝ) (hG : G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun j => u j) : ℂ)) (k : Fin p → ℤ) : mFourierCoeff (reflectionL2Operator p (hG2.toLp G)) k = Fhat g k := by rw [← mFourierCoeff_reflExt] apply integral_congr_ae filter_upwards [reflectionL2Operator_extension_ae hG2 g hG] with y hy rw [hy]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTorusCoeff_extension · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointLimit.lean:95
theorem reflectionSmoothApproximation_coeff_tendsto_Fhat

Smooth truncations of any admissible extension recover the specified cube function's Fourier coefficients after reflection, with the exact normalization. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hG1 :
hG2 :
g :
Cube p → ℝ
hG :
G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun j => u j) : ℂ)
k :
Fin p → ℤ
hF :
Tendsto (fun n : ℕ => mFourierCoeff (reflectionL2Operator p ((reflectionSmoothApproximation_memLp hF (n : ℝ)).toLp (reflectionSmoothApproximation (Fourier G) (n : ℝ)))) k) atTop (𝓝 (Fhat g k))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_coeff_tendsto_Fhat lemma reflectionSmoothApproximation_coeff_tendsto_Fhat {p : ℕ} {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) (g : Cube p → ℝ) (hG : G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun j => u j) : ℂ)) (k : Fin p → ℤ) : let hF : MemLp (Fourier G) 2 volume := angularFourier_memLp G hG1 hG2 Tendsto (fun n : ℕ => mFourierCoeff (reflectionL2Operator p ((reflectionSmoothApproximation_memLp hF (n : ℝ)).toLp (reflectionSmoothApproximation (Fourier G) (n : ℝ)))) k) atTop (𝓝 (Fhat g k)) := by dsimp only rw [← reflectionTorusCoeff_extension hG2 g hG k] exact reflectionTorusCoeff_tendsto (reflectionSmoothApproximation_tendsto_reflected_original hG1 hG2) k
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_coeff_tendsto_Fhat · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointLimit.lean:109
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionEndpointZero 12 declarations Angular Plancherel and restriction to the unit cube prove the zero-order reflection contraction for every admissible whole-space extension.

Zero-order reflection endpoint

Angular Plancherel and restriction to the unit cube prove the zero-order reflection contraction for every admissible whole-space extension. Taking the extension infimum also bounds cube L² energy by each nonnegative Sobolev norm.

theorem euclideanCube_coordinates_measurePreserving

Euclidean coordinates preserve the restricted unit-cube measure.

Formal statement
p :
ℕ
MeasurePreserving (fun u : EuclideanSpace ℝ (Fin p) => (fun j => u j)) (volume.restrict (euclideanCube p)) (cubeMeasure p)
Proof (Lean source)
-- @node: euclideanCube_coordinates_measurePreserving lemma euclideanCube_coordinates_measurePreserving (p : ℕ) : MeasurePreserving (fun u : EuclideanSpace ℝ (Fin p) => (fun j => u j)) (volume.restrict (euclideanCube p)) (cubeMeasure p) := by have h := (EuclideanSpace.volume_preserving_symm_measurableEquiv_toLp (Fin p)).restrict_preimage_emb (MeasurableEquiv.toLp 2 (Fin p → ℝ)).symm.measurableEmbedding (Set.univ.pi (fun _ : Fin p => Icc (0 : ℝ) 1)) simpa only [cubeMeasure, volume_pi, Measure.restrict_pi_pi, euclideanCube, preimage, Set.mem_pi, Set.mem_univ, forall_const] using! h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.euclideanCube_coordinates_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:18
theorem cube_lintegral_euclidean_coordinates

Restricted Euclidean and product-cube nonnegative integrals agree, including infinite values. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
f :
Cube p → ℝ≥0∞
(∫⁻ u, f (fun j => u j) ∂volume.restrict (euclideanCube p)) = ∫⁻ x, f x ∂cubeMeasure p
Proof (Lean source)
-- @node: cube_lintegral_euclidean_coordinates lemma cube_lintegral_euclidean_coordinates (p : ℕ) (f : Cube p → ℝ≥0∞) : (∫⁻ u, f (fun j => u j) ∂volume.restrict (euclideanCube p)) = ∫⁻ x, f x ∂cubeMeasure p := by exact (euclideanCube_coordinates_measurePreserving p).lintegral_comp_emb (MeasurableEquiv.toLp 2 (Fin p → ℝ)).symm.measurableEmbedding f
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_lintegral_euclidean_coordinates · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:30
theorem cube_l2Energy_le_extension_l2Energy

Every admissible extension has at least the cube's squared L² energy. Under the stated conditions.

Formal statement
p :
ℕ
g :
Cube p → ℝ
G :
EuclideanSpace ℝ (Fin p) → ℂ
hG :
G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun j => u j) : ℂ)
(∫⁻ x, ofReal |g x| ^ 2 ∂cubeMeasure p) ≤ ∫⁻ u, ofReal (‖G u‖ ^ 2)
Proof (Lean source)
-- @node: cube_l2Energy_le_extension_l2Energy lemma cube_l2Energy_le_extension_l2Energy {p : ℕ} (g : Cube p → ℝ) (G : EuclideanSpace ℝ (Fin p) → ℂ) (hG : G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun j => u j) : ℂ)) : (∫⁻ x, ofReal |g x| ^ 2 ∂cubeMeasure p) ≤ ∫⁻ u, ofReal (‖G u‖ ^ 2) := by rw [← cube_lintegral_euclidean_coordinates p] calc _ = ∫⁻ u, ofReal (‖G u‖ ^ 2) ∂volume.restrict (euclideanCube p) := by apply lintegral_congr_ae filter_upwards [hG] with u hu rw [hu, Complex.norm_real, Real.norm_eq_abs, ENNReal.ofReal_pow (abs_nonneg _)] _ ≤ _ := lintegral_mono' Measure.restrict_le_self le_rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_l2Energy_le_extension_l2Energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:38
theorem componentFourierBudget_zero_le_extension

Angular Plancherel gives the exact norm-one zero-order reflection endpoint. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
g :
Cube p → ℝ
hg :
hLp :
G :
EuclideanSpace ℝ (Fin p) → ℂ
hG1 :
hG2 :
hG :
G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun j => u j) : ℂ)
componentFourierBudget p 0 g ≤ ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2)
Proof (Lean source)
-- @node: componentFourierBudget_zero_le_extension lemma componentFourierBudget_zero_le_extension {p : ℕ} (hp : 0 < p) (g : Cube p → ℝ) (hg : Measurable g) (hLp : MemLp g 2 (cubeMeasure p)) (G : EuclideanSpace ℝ (Fin p) → ℂ) (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) (hG : G =ᵐ[volume.restrict (euclideanCube p)] fun u => (g (fun j => u j) : ℂ)) : componentFourierBudget p 0 g ≤ ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2) := by rw [componentFourierBudget_zero hp g hg hLp] change _ ≤ ∫⁻ ω, ofReal (‖Causalean.Mathlib.Analysis.Fourier.angularFourier G ω‖ ^ 2) rw [angular_plancherel_integral G hG1 hG2] exact cube_l2Energy_le_extension_l2Energy g G hG
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.componentFourierBudget_zero_le_extension · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:53
theorem cube_l2Energy_le_sobolevNormSq

Nonnegative Sobolev weights dominate the cube energy for every extension; therefore the same bound survives taking the extension infimum. Under the stated conditions.

Formal statement
p :
ℕ
s :
ℝ
hs :
0 ≤ s
g :
Cube p → ℝ
(∫⁻ x, ofReal |g x| ^ 2 ∂cubeMeasure p) ≤ sobolevNormSq p s g
Proof (Lean source)
-- @node: cube_l2Energy_le_sobolevNormSq lemma cube_l2Energy_le_sobolevNormSq {p : ℕ} {s : ℝ} (hs : 0 ≤ s) (g : Cube p → ℝ) : (∫⁻ x, ofReal |g x| ^ 2 ∂cubeMeasure p) ≤ sobolevNormSq p s g := by unfold sobolevNormSq refine le_iInf fun G => le_iInf fun hG => ?_ have he := cube_l2Energy_le_extension_l2Energy g G hG.2.2 have hp := angular_plancherel_integral G hG.1 hG.2.1 change (∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2)) = _ at hp rw [← hp] at he refine he.trans (lintegral_mono fun ω => ENNReal.ofReal_le_ofReal ?_) have hw : 1 ≤ (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s := Real.one_le_rpow (by have hn : 0 ≤ ‖ω‖ ^ 2 / (p : ℝ) := div_nonneg (sq_nonneg _) (Nat.cast_nonneg _) linarith) hs exact le_mul_of_one_le_right (sq_nonneg _) hw
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_l2Energy_le_sobolevNormSq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:66
theorem componentFourierBudget_zero_le_sobolevNormSq

The zero-order reflected Fourier mass is bounded by the restriction norm at every nonnegative exponent, with constant one and no attainment assumption. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
s :
ℝ
hs :
0 ≤ s
g :
Cube p → ℝ
hg :
hLp :
Proof (Lean source)
-- @node: componentFourierBudget_zero_le_sobolevNormSq lemma componentFourierBudget_zero_le_sobolevNormSq {p : ℕ} (hp : 0 < p) {s : ℝ} (hs : 0 ≤ s) (g : Cube p → ℝ) (hg : Measurable g) (hLp : MemLp g 2 (cubeMeasure p)) : componentFourierBudget p 0 g ≤ sobolevNormSq p s g := by rw [componentFourierBudget_zero hp g hg hLp] exact cube_l2Energy_le_sobolevNormSq hs g
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.componentFourierBudget_zero_le_sobolevNormSq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:85
theorem foldEuclidean_measurePreserving Lemma foldEuclidean_measurePreserving in the paper ↗

Folding into Euclidean coordinates preserves normalized cube measure. The asserted mathematical result follows.

Formal statement
p :
ℕ
MeasurePreserving (fun y : Torus p => toLp 2 (fold y)) (torusMeasure p) (volume.restrict (euclideanCube p))
Proof (Lean source)
-- @node: foldEuclidean_measurePreserving lemma foldEuclidean_measurePreserving (p : ℕ) : MeasurePreserving (fun y : Torus p => toLp 2 (fold y)) (torusMeasure p) (volume.restrict (euclideanCube p)) := by have he : MeasurePreserving (MeasurableEquiv.toLp 2 (Fin p → ℝ)).symm (volume.restrict (euclideanCube p)) (cubeMeasure p) := by exact euclideanCube_coordinates_measurePreserving p exact (he.symm (MeasurableEquiv.toLp 2 (Fin p → ℝ)).symm).comp (fold_measurePreserving p)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.foldEuclidean_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:95

[ Restriction of whole-space L² equivalence classes to the cube as a linear map.

Definition (Lean source)
p :
ℕ
euclideanCubeRestrictionLinear p :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) →ₗ[ℝ] Lp ℂ 2 (volume.restrict (euclideanCube p))
clause 1
toFun f := ((memLp f).restrict (euclideanCube p)).toLp f
clause 2
map_add' f g := by apply Lp.ext filter_upwards [((memLp f).restrict (euclideanCube p)).coeFn_toLp, ((memLp g).restrict (euclideanCube p)).coeFn_toLp, ((memLp (f + g)).restrict (euclideanCube p)).coeFn_toLp, (ae_restrict_of_ae (Lp.coeFn_add f g)), Lp.coeFn_add (((memLp f).restrict (euclideanCube p)).toLp f) (((memLp g).restrict (euclideanCube p)).toLp g)] with x hf hg hfg hadd hradd simp only [hfg, hradd, hf, hg, hadd, Pi.add_apply]
clause 3
map_smul' c f := by apply Lp.ext filter_upwards [((memLp f).restrict (euclideanCube p)).coeFn_toLp, ((memLp (c • f)).restrict (euclideanCube p)).coeFn_toLp, (ae_restrict_of_ae (Lp.coeFn_smul c f)), Lp.coeFn_smul c (((memLp f).restrict (euclideanCube p)).toLp f)] with x hf hcf hsmul hrsmul simp only [RingHom.id_apply, hcf, hrsmul, hf, hsmul, Pi.smul_apply]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.euclideanCubeRestrictionLinear · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:105
theorem euclideanCubeRestrictionLinear_norm_le

The restriction map has norm at most one.](goal) This uses the stated conclusion.

Formal statement
p :
ℕ
f :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
‖euclideanCubeRestrictionLinear p f‖ ≤ ‖f‖
Proof (Lean source)
-- @node: euclideanCubeRestrictionLinear_norm_le lemma euclideanCubeRestrictionLinear_norm_le (p : ℕ) (f : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : ‖euclideanCubeRestrictionLinear p f‖ ≤ ‖f‖ := by change ‖((memLp f).restrict (euclideanCube p)).toLp f‖ ≤ ‖f‖ rw [Lp.norm_toLp, Lp.norm_def] exact ENNReal.toReal_mono (MeasureTheory.Lp.eLpNorm_ne_top f) (eLpNorm_mono_measure f Measure.restrict_le_self)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.euclideanCubeRestrictionLinear_norm_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:130

[ The common even-reflection operator on whole-space L² equivalence classes. Restriction is a contraction and the subsequent folded pullback is an isometry.

Definition (Lean source)
p :
ℕ
reflectionL2Operator p :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) →L[ℝ] Lp ℂ 2 (torusMeasure p)
(Lp.compMeasurePreservingₗᵢ ℝ (fun y : Torus p => toLp 2 (fold y)) (foldEuclidean_measurePreserving p)).toContinuousLinearMap.comp ((euclideanCubeRestrictionLinear p).mkContinuous 1 (by intro f simpa using euclideanCubeRestrictionLinear_norm_le p f))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionL2Operator · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:140
theorem reflectionL2Operator_norm_le

The actual even-reflection L² operator has endpoint norm at most one.](goal) This uses the stated conclusion.

Formal statement
p :
ℕ
‖reflectionL2Operator p‖ ≤ 1
Proof (Lean source)
-- @node: reflectionL2Operator_norm_le lemma reflectionL2Operator_norm_le (p : ℕ) : ‖reflectionL2Operator p‖ ≤ 1 := by refine ContinuousLinearMap.opNorm_le_bound (reflectionL2Operator p) (by norm_num) ?_ intro f simp only [reflectionL2Operator, ContinuousLinearMap.comp_apply, LinearIsometry.coe_toContinuousLinearMap, LinearMap.mkContinuous_apply] change ‖Lp.compMeasurePreserving _ (foldEuclidean_measurePreserving p) (euclideanCubeRestrictionLinear p f)‖ ≤ 1 * ‖f‖ rw [Lp.norm_compMeasurePreserving, one_mul] exact euclideanCubeRestrictionLinear_norm_le p f
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionL2Operator_norm_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:152
theorem reflectionL2Operator_coeFn

The L² operator is the genuine folded pullback, independently of representatives.

Formal statement
p :
ℕ
f :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
reflectionL2Operator p f =ᵐ[torusMeasure p] fun y => f (toLp 2 (fold y))
Proof (Lean source)
-- @node: reflectionL2Operator_coeFn lemma reflectionL2Operator_coeFn (p : ℕ) (f : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : reflectionL2Operator p f =ᵐ[torusMeasure p] fun y => f (toLp 2 (fold y)) := by have h := Lp.coeFn_compMeasurePreserving (euclideanCubeRestrictionLinear p f) (foldEuclidean_measurePreserving p) have hr := (foldEuclidean_measurePreserving p).quasiMeasurePreserving.ae ((memLp f).restrict (euclideanCube p)).coeFn_toLp exact h.trans hr
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionL2Operator_coeFn · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionEndpointZero.lean:164
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionFourier 10 declarations The reflected outcome is rewritten on the torus and the original seed integral is transported to independent Haar sample and shift coordinates.

Reflection transport for the Fourier identity

The reflected outcome is rewritten on the torus and the original seed integral is transported to independent Haar sample and shift coordinates. This isolates the remaining Parseval argument.

Folding a lifted coordinate recovers its original value on the closed unit interval. Under the stated conditions.

Formal statement
n d :
ℕ
x :
η :
i :
Fin n
j :
Fin d
hx :
x i j ∈ Icc (0 : ℝ) 1
fold (lift x η i) j = x i j
Proof (Lean source)
-- @node: fold_lift_apply lemma fold_lift_apply {n d : ℕ} (x : Covariates n d) (η : ReflectionCoins n d) (i : Fin n) (j : Fin d) (hx : x i j ∈ Icc (0 : ℝ) 1) : fold (lift x η i) j = x i j := by unfold fold lift cases η i j · rw [AddCircle.equivIco_coe_of_mem] · simp only [Bool.false_eq_true, if_false] rw [min_eq_left] · ring · linarith [hx.2] · simp only [Bool.false_eq_true, if_false] constructor <;> linarith [hx.1, hx.2] · by_cases hzero : x i j = 0 · simp [hzero, AddCircle.coe_equivIco_mk_apply] · rw [AddCircle.equivIco_coe_of_mem] · simp only [if_true] rw [min_eq_right] · ring · norm_num [div_eq_mul_inv] linarith [hx.2] · simp only [if_true] constructor · norm_num [div_eq_mul_inv] linarith [hx.2] · norm_num [div_eq_mul_inv] have hpos : 0 < x i j := lt_of_le_of_ne hx.1 (Ne.symm hzero) linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fold_lift_apply · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionFourier.lean:16
theorem cube_mem_ae

Cube probability is supported on the closed unit cube. The asserted mathematical result follows.

Formal statement
d :
ℕ
∀ᵐ x ∂cubeMeasure d, ∀ j, x j ∈ Icc (0 : ℝ) 1
Proof (Lean source)
-- @node: cube_mem_ae lemma cube_mem_ae (d : ℕ) : ∀ᵐ x ∂cubeMeasure d, ∀ j, x j ∈ Icc (0 : ℝ) 1 := by unfold cubeMeasure apply Measure.ae_pi_le_pi apply Filter.eventually_pi intro j exact ae_restrict_mem measurableSet_Icc
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_mem_ae · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionFourier.lean:46

The period-two folding map is Borel measurable, including at its endpoints. This uses the stated conclusion.

Formal statement
d :
ℕ
Measurable (fold : Torus d → Cube d)
Proof (Lean source)
-- @node: fold_measurable @[fun_prop] lemma fold_measurable (d : ℕ) : Measurable (fold : Torus d → Cube d) := by unfold fold apply measurable_pi_lambda intro j exact (measurable_const.mul ((AddCircle.measurableEquivIco (1 : ℝ) 0).measurable.comp (measurable_pi_apply j)).subtype_val) |>.min (measurable_const.sub (measurable_const.mul ((AddCircle.measurableEquivIco (1 : ℝ) 0).measurable.comp (measurable_pi_apply j)).subtype_val))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fold_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionFourier.lean:87
theorem reflection_enriched_map

The joint law of the shifted sample, common shift, and original outcome values can be written entirely in independent Haar coordinates. The original value at unit i becomes the even reflected extension evaluated at W i - T. This uses the hX hypothesis, the hm hypothesis, the stated conclusion.

Formal statement
n d :
ℕ
Ω :
μ :
X :
Ω → Covariates n d
hX :
m :
Cube d → ℝ
hm :
(μ.prod ((reflectionLaw n d).prod (torusMeasure d))).map (fun ω => ((shiftedSample (X ω.1) ω.2.1 ω.2.2, ω.2.2), fun i => m (X ω.1 i)))
= ((Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d)).map (fun wt => (wt, fun i => (reflExt m (wt.1 i - wt.2)).re))
Proof (Lean source)
theorem reflection_enriched_map (n d : ℕ) (Ω : Type) [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → Covariates n d) (hX : UniformDraw μ X) (m : Cube d → ℝ) (hm : Measurable m) : (μ.prod ((reflectionLaw n d).prod (torusMeasure d))).map (fun ω => ((shiftedSample (X ω.1) ω.2.1 ω.2.2, ω.2.2), fun i => m (X ω.1 i))) = ((Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d)).map (fun wt => (wt, fun i => (reflExt m (wt.1 i - wt.2)).re)) := by haveI : IsProbabilityMeasure (reflectionLaw n d) := by unfold reflectionLaw infer_instance haveI : IsProbabilityMeasure ((reflectionLaw n d).prod (torusMeasure d)) := inferInstance let f : Ω × (ReflectionCoins n d × Torus d) → (Fin n → Torus d) × Torus d := fun ω => (shiftedSample (X ω.1) ω.2.1 ω.2.2, ω.2.2) let g : ((Fin n → Torus d) × Torus d) → ((Fin n → Torus d) × Torus d) × (Fin n → ℝ) := fun wt => (wt, fun i => (reflExt m (wt.1 i - wt.2)).re) have hf : Measurable f := by dsimp [f, shiftedSample, lift] apply prodMk · apply measurable_pi_lambda intro i change Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => lift (X ω.1) ω.2.1 i + ω.2.2) have hlift : Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => lift (X ω.1) ω.2.1 i) := by unfold lift apply measurable_pi_lambda intro j apply AddCircle.measurable_mk'.comp apply Measurable.ite · have hi : Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => ω.2.1 i) := (measurable_pi_apply i).comp (measurable_fst.comp measurable_snd) exact ((measurable_pi_apply j).comp hi) (measurableSet_singleton true) · have hXi : Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => X ω.1 i) := (measurable_pi_apply i).comp (hX.1.comp measurable_fst) have hXij : Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => X ω.1 i j) := (measurable_pi_apply j).comp hXi exact (measurable_const.sub hXij).div_const 2 · have hXi : Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => X ω.1 i) := (measurable_pi_apply i).comp (hX.1.comp measurable_fst) exact ((measurable_pi_apply j).comp hXi).div_const 2 exact hlift.add (measurable_snd.comp measurable_snd) · exact measurable_snd.comp measurable_snd have hg : Measurable g := by apply prodMk measurable_id apply measurable_pi_lambda intro i apply (reflExt_re_measurable m hm).comp exact ((measurable_pi_apply i).comp measurable_fst).sub measurable_snd rw [← reflectionLaw_map_shiftedSample n d Ω μ X hX] rw [Measure.map_map hg hf] apply Measure.map_congr have hcube := (measurePreserving_fst (μ := μ) (ν := (reflectionLaw n d).prod (torusMeasure d))).quasiMeasurePreserving.ae (sampled_covariates_mem_ae μ X hX) filter_upwards [hcube] with ω hω change ((f ω, fun i => m (X ω.1 i))) = g (f ω) apply Prod.ext · rfl · funext i dsimp [f, g] rw [show shiftedSample (X ω.1) ω.2.1 ω.2.2 i - ω.2.2 = lift (X ω.1) ω.2.1 i by simp [shiftedSample]] exact (reflExt_lift_eq m (X ω.1) ω.2.1 hω i).symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflection_enriched_map · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionFourier.lean:104
theorem reflection_lintegral_transport

Every nonnegative measurable functional of the shifted sample, common shift, and original outcome vector can be averaged instead over independent Haar coordinates, with outcomes recovered by folding W i - T. This uses the hX hypothesis, the hm hypothesis, the Φ hypothesis, the hΦ hypothesis, the stated conclusion.

Formal statement
n d :
ℕ
Ω :
μ :
X :
Ω → Covariates n d
hX :
m :
Cube d → ℝ
hm :
Φ :
(((Fin n → Torus d) × Torus d) × (Fin n → ℝ)) → ℝ≥0∞
hΦ :
(∫⁻ ω, Φ ((shiftedSample (X ω.1) ω.2.1 ω.2.2, ω.2.2), fun i => m (X ω.1 i)) ∂μ.prod ((reflectionLaw n d).prod (torusMeasure d)))
= ∫⁻ wt, Φ (wt, fun i => (reflExt m (wt.1 i - wt.2)).re) ∂(Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d)
Proof (Lean source)
theorem reflection_lintegral_transport (n d : ℕ) (Ω : Type) [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → Covariates n d) (hX : UniformDraw μ X) (m : Cube d → ℝ) (hm : Measurable m) (Φ : (((Fin n → Torus d) × Torus d) × (Fin n → ℝ)) → ℝ≥0∞) (hΦ : Measurable Φ) : (∫⁻ ω, Φ ((shiftedSample (X ω.1) ω.2.1 ω.2.2, ω.2.2), fun i => m (X ω.1 i)) ∂μ.prod ((reflectionLaw n d).prod (torusMeasure d))) = ∫⁻ wt, Φ (wt, fun i => (reflExt m (wt.1 i - wt.2)).re) ∂(Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d) := by let source : Ω × (ReflectionCoins n d × Torus d) → (((Fin n → Torus d) × Torus d) × (Fin n → ℝ)) := fun ω => ((shiftedSample (X ω.1) ω.2.1 ω.2.2, ω.2.2), fun i => m (X ω.1 i)) let target : ((Fin n → Torus d) × Torus d) → (((Fin n → Torus d) × Torus d) × (Fin n → ℝ)) := fun wt => (wt, fun i => (reflExt m (wt.1 i - wt.2)).re) have hsource : Measurable source := by apply prodMk · apply prodMk · apply measurable_pi_lambda intro i change Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => lift (X ω.1) ω.2.1 i + ω.2.2) have hlift : Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => lift (X ω.1) ω.2.1 i) := by unfold lift apply measurable_pi_lambda intro j apply AddCircle.measurable_mk'.comp apply Measurable.ite · have hi : Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => ω.2.1 i) := (measurable_pi_apply i).comp (measurable_fst.comp measurable_snd) exact ((measurable_pi_apply j).comp hi) (measurableSet_singleton true) · have hXi : Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => X ω.1 i) := (measurable_pi_apply i).comp (hX.1.comp measurable_fst) have hXij : Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => X ω.1 i j) := (measurable_pi_apply j).comp hXi exact (measurable_const.sub hXij).div_const 2 · have hXi : Measurable (fun ω : Ω × (ReflectionCoins n d × Torus d) => X ω.1 i) := (measurable_pi_apply i).comp (hX.1.comp measurable_fst) exact ((measurable_pi_apply j).comp hXi).div_const 2 exact hlift.add (measurable_snd.comp measurable_snd) · exact measurable_snd.comp measurable_snd · apply measurable_pi_lambda intro i exact hm.comp ((measurable_pi_apply i).comp (hX.1.comp measurable_fst)) have htarget : Measurable target := by apply prodMk measurable_id apply measurable_pi_lambda intro i exact (reflExt_re_measurable m hm).comp (((measurable_pi_apply i).comp measurable_fst).sub measurable_snd) rw [← lintegral_map hΦ hsource, reflection_enriched_map n d Ω μ X hX m hm, lintegral_map hΦ htarget]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflection_lintegral_transport · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionFourier.lean:180
theorem reflExt_sq_lintegral_eq

Folding normalized Haar measure has the same squared-integral normalization as the unit cube. This is obtained from the reflected sampling law, including its endpoint convention. This uses the hm hypothesis, the stated conclusion.

Formal statement
d :
ℕ
m :
Cube d → ℝ
hm :
(∫⁻ y, ofReal ‖reflExt m y‖ ^ 2 ∂torusMeasure d)
= ∫⁻ x, ofReal |m x| ^ 2 ∂cubeMeasure d
Proof (Lean source)
theorem reflExt_sq_lintegral_eq (d : ℕ) (m : Cube d → ℝ) (hm : Measurable m) : (∫⁻ y, ofReal ‖reflExt m y‖ ^ 2 ∂torusMeasure d) = ∫⁻ x, ofReal |m x| ^ 2 ∂cubeMeasure d := by let Φ : (((Fin 1 → Torus d) × Torus d) × (Fin 1 → ℝ)) → ℝ≥0∞ := fun p => ofReal |p.2 0| ^ 2 have hΦ : Measurable Φ := by fun_prop have hId : UniformDraw (covLaw 1 d) (id : Covariates 1 d → Covariates 1 d) := by refine ⟨measurable_id, ?_⟩ simp have ht := reflection_lintegral_transport 1 d (Covariates 1 d) (covLaw 1 d) id hId m hm Φ hΦ dsimp [Φ] at ht haveI : IsProbabilityMeasure (reflectionLaw 1 d) := by unfold reflectionLaw infer_instance haveI : IsProbabilityMeasure ((reflectionLaw 1 d).prod (torusMeasure d)) := inferInstance haveI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ haveI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure infer_instance have hleft : (∫⁻ (ω : Covariates 1 d × (ReflectionCoins 1 d × Torus d)), ofReal |m (ω.1 0)| ^ 2 ∂(covLaw 1 d).prod ((reflectionLaw 1 d).prod (torusMeasure d))) = ∫⁻ x, ofReal |m x| ^ 2 ∂cubeMeasure d := by rw [lintegral_prod] · simp only [lintegral_const, measure_univ, mul_one] simpa only [covLaw, Function.comp_apply] using (measurePreserving_eval (fun _ : Fin 1 => cubeMeasure d) 0).lintegral_comp ((ENNReal.measurable_ofReal.comp hm.abs).pow_const 2) · fun_prop have hq : Measurable (fun y : Torus d => ofReal |(reflExt m y).re| ^ 2) := ((ENNReal.measurable_ofReal.comp (reflExt_re_measurable m hm).abs).pow_const 2) have hinner (w : Fin 1 → Torus d) : (∫⁻ t, ofReal |(reflExt m (w 0 - t)).re| ^ 2 ∂torusMeasure d) = ∫⁻ y, ofReal |(reflExt m y).re| ^ 2 ∂torusMeasure d := by convert (reflectShiftEquiv_preserving (w 0)).lintegral_comp hq using 1 apply lintegral_congr intro t rw [reflectShiftEquiv_apply] have hright : (∫⁻ (wt : (Fin 1 → Torus d) × Torus d), ofReal |(reflExt m (wt.1 0 - wt.2)).re| ^ 2 ∂(Measure.pi fun _ : Fin 1 => torusMeasure d).prod (torusMeasure d)) = ∫⁻ y, ofReal |(reflExt m y).re| ^ 2 ∂torusMeasure d := by rw [lintegral_prod] · simp_rw [hinner] simp · exact (hq.comp (((measurable_pi_apply 0).comp measurable_fst).sub measurable_snd)).aemeasurable rw [hleft, hright] at ht calc (∫⁻ y, ofReal ‖reflExt m y‖ ^ 2 ∂torusMeasure d) = ∫⁻ y, ofReal |(reflExt m y).re| ^ 2 ∂torusMeasure d := by apply lintegral_congr intro y simp [reflExt] _ = _ := ht.symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflExt_sq_lintegral_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionFourier.lean:260
theorem reflExt_memLp

The even reflected extension of a cube L² representative is L² for normalized Haar measure on the torus. This uses the stated conclusion.

Formal statement
d :
ℕ
m :
MemLp (reflExt m.val) 2 (torusMeasure d)
Proof (Lean source)
theorem reflExt_memLp {d : ℕ} (m : CenteredL2Fn d) : MemLp (reflExt m.val) 2 (torusMeasure d) := by have hmeas : Measurable (reflExt m.val) := Complex.measurable_ofReal.comp (m.property.1.comp (fold_measurable d)) refine ⟨hmeas.aestronglyMeasurable, ?_⟩ apply (eLpNorm_lt_top_iff_lintegral_rpow_enorm_lt_top (by norm_num) (by norm_num)).2 have hs := reflExt_sq_lintegral_eq d m.val m.property.1 have hc := (eLpNorm_lt_top_iff_lintegral_rpow_enorm_lt_top (p := (2 : ℝ≥0∞)) (f := m.val) (μ := cubeMeasure d) (by norm_num) (by norm_num)).1 m.property.2.1.2 norm_num at hc ⊢ simp_rw [← ofReal_norm] at ⊢ simp_rw [Real.enorm_eq_ofReal_abs] at hc exact hs ▸ hc
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflExt_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionFourier.lean:323
theorem mFourierCoeff_reflExt

The paper's reflected coefficient is Mathlib's normalized torus Fourier coefficient. This uses the stated conclusion.

Formal statement
d :
ℕ
m :
Cube d → ℝ
k :
Fin d → ℤ
Proof (Lean source)
theorem mFourierCoeff_reflExt {d : ℕ} (m : Cube d → ℝ) (k : Fin d → ℤ) : mFourierCoeff (reflExt m) k = Fhat m k := by unfold mFourierCoeff Fhat ek simp only [smul_eq_mul] change (∫ y, mFourier (-k) y * reflExt m y ∂torusMeasure d) = _ rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mFourierCoeff_reflExt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionFourier.lean:377
theorem commonShift_parseval

Parseval for a finite complex linear combination of translates by a common Haar shift. The coefficient phase is indexed in the same direction as the Fourier character after reindexing the intermediate formula by k ↦ -k. This uses the hd hypothesis, the hf hypothesis, the stated conclusion.

Formal statement
n d :
ℕ
hd :
0 < d
f :
Torus d → ℂ
hf :
a :
Fin n → ℂ
w :
Fin n → Torus d
HasSum (fun k : Fin d → ℤ => ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2 * ‖∑ i, a i * mFourier k (w i)‖ ^ 2) (∫ t, ‖∑ i, a i * f (w i - t)‖ ^ 2 ∂torusMeasure d)
Proof (Lean source)
theorem commonShift_parseval {n d : ℕ} (hd : 0 < d) (f : Torus d → ℂ) (hf : MemLp f 2 (torusMeasure d)) (a : Fin n → ℂ) (w : Fin n → Torus d) : HasSum (fun k : Fin d → ℤ => ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2 * ‖∑ i, a i * mFourier k (w i)‖ ^ 2) (∫ t, ‖∑ i, a i * f (w i - t)‖ ^ 2 ∂torusMeasure d) := by let g : Torus d → ℂ := fun t => ∑ i, a i * f (w i - t) have hg := shiftCombination_memLp f hf a w have hp := (torusParseval d hd (hg.toLp g)).2.2.1 have hint : (∫ t, ‖(hg.toLp g) t‖ ^ 2 ∂torusMeasure d) = ∫ t, ‖g t‖ ^ 2 ∂torusMeasure d := by apply integral_congr_ae filter_upwards [hg.coeFn_toLp] with t ht rw [ht] rw [hint] at hp have hneg : HasSum (fun k : Fin d → ℤ => ‖UnitAddTorus.mFourierCoeff f (-k)‖ ^ 2 * ‖∑ i, a i * mFourier (-k) (w i)‖ ^ 2) (∫ t, ‖g t‖ ^ 2 ∂torusMeasure d) := by refine HasSum.congr_fun hp (fun k => ?_) have hc : mFourierCoeff (hg.toLp g) k = mFourierCoeff g k := by unfold mFourierCoeff apply integral_congr_ae filter_upwards [hg.coeFn_toLp] with t ht rw [ht] rw [hc, fourierCoeff_shiftCombination f hf a w k, norm_mul, mul_pow] apply (Equiv.hasSum_iff (Equiv.neg (Fin d → ℤ))).mp convert hneg using 1 funext k rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.commonShift_parseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionFourier.lean:433
theorem commonShift_parseval_lintegral

The common-shift Parseval identity in the nonnegative extended-real form used by kernel averages. This uses the hd hypothesis, the hf hypothesis, the stated conclusion.

Formal statement
n d :
ℕ
hd :
0 < d
f :
Torus d → ℂ
hf :
a :
Fin n → ℂ
w :
Fin n → Torus d
(∫⁻ t, ofReal ‖∑ i, a i * f (w i - t)‖ ^ 2 ∂torusMeasure d)
= ∑' k : Fin d → ℤ, ofReal ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2 * ofReal ‖∑ i, a i * mFourier k (w i)‖ ^ 2
Proof (Lean source)
theorem commonShift_parseval_lintegral {n d : ℕ} (hd : 0 < d) (f : Torus d → ℂ) (hf : MemLp f 2 (torusMeasure d)) (a : Fin n → ℂ) (w : Fin n → Torus d) : (∫⁻ t, ofReal ‖∑ i, a i * f (w i - t)‖ ^ 2 ∂torusMeasure d) = ∑' k : Fin d → ℤ, ofReal ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2 * ofReal ‖∑ i, a i * mFourier k (w i)‖ ^ 2 := by let g : Torus d → ℂ := fun t => ∑ i, a i * f (w i - t) let q : (Fin d → ℤ) → ℝ := fun k => ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2 * ‖∑ i, a i * mFourier k (w i)‖ ^ 2 have hg := shiftCombination_memLp f hf a w have hs : HasSum q (∫ t, ‖g t‖ ^ 2 ∂torusMeasure d) := commonShift_parseval hd f hf a w simp_rw [← ENNReal.ofReal_pow (norm_nonneg _) 2] rw [← ofReal_integral_eq_lintegral_ofReal (hg.integrable_norm_pow (by norm_num)) (Filter.Eventually.of_forall fun _ => sq_nonneg _)] rw [← hs.tsum_eq, ENNReal.ofReal_tsum_of_nonneg (fun _ => mul_nonneg (sq_nonneg _) (sq_nonneg _)) hs.summable] apply tsum_congr intro k rw [ENNReal.ofReal_mul (sq_nonneg _)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.commonShift_parseval_lintegral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionFourier.lean:468
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionGradientLimit 8 declarations Finite first-order Fourier energy supplies square-integrable coordinate multipliers.

First-order convergence of the genuine inverse truncations

Finite first-order Fourier energy supplies square-integrable coordinate multipliers. Their inverse L² representatives are the limits of the actual smooth derivatives in roadmap (3), without imposing L¹ regularity on these full multipliers.

theorem reflectionCoordinateProfile_memLp Lemma reflectionCoordinateProfile_memLp in the paper ↗

Finite first-order energy implies L² membership of each full coordinate multiplier; this regularity is derived rather than assumed. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hfinite :
(∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤
r :
Fin p
MemLp (fun ω => I * (ω r : ℂ) * ψ ω) 2 volume
Proof (Lean source)
-- @node: reflectionCoordinateProfile_memLp lemma reflectionCoordinateProfile_memLp {p : ℕ} (hp : 0 < p) {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hfinite : (∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤) (r : Fin p) : MemLp (fun ω => I * (ω r : ℂ) * ψ ω) 2 volume := by have hweight : Integrable (fun ω => ‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ))) volume := by refine ⟨by fun_prop, ?_⟩ exact (hasFiniteIntegral_iff_ofReal (Eventually.of_forall fun ω => by positivity)).2 (lt_top_iff_ne_top.mpr hfinite) have hmul : Measurable (fun ω => I * (ω r : ℂ) * ψ ω) := by fun_prop apply (memLp_two_iff_integrable_sq_norm hmul.aestronglyMeasurable).2 apply (hweight.const_mul (p : ℝ)).mono' (by fun_prop) filter_upwards [] with ω have hc : (ω r) ^ 2 ≤ ‖ω‖ ^ 2 := by rw [norm_sq_eq_sum_coordinates] exact Finset.single_le_sum (fun j _ => sq_nonneg (ω j)) (Finset.mem_univ r) have hp' : 0 < (p : ℝ) := Nat.cast_pos.mpr hp have hw : (ω r) ^ 2 ≤ (p : ℝ) * (1 + ‖ω‖ ^ 2 / (p : ℝ)) := by rw [mul_add, mul_one, mul_div_cancel₀ _ hp'.ne'] linarith simp only [norm_pow, norm_mul, Complex.norm_I, one_mul, Complex.norm_real, Real.norm_eq_abs, mul_pow, sq_abs] nlinarith [mul_le_mul_of_nonneg_right hw (sq_nonneg ‖ψ ω‖)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionCoordinateProfile_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionGradientLimit.lean:20
theorem reflectionSmoothDerivative_eq_multiplier_approximation

Truncation commutes with the coordinate multiplier, so the actual smooth spatial derivative is precisely its inverse Fourier approximation. The asserted mathematical result follows.

Formal statement
p :
ℕ
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
R :
ℝ
r :
Fin p
= reflectionSmoothApproximation (fun ω => I * (ω r : ℂ) * ψ ω) R
Proof (Lean source)
-- @node: reflectionSmoothDerivative_eq_multiplier_approximation lemma reflectionSmoothDerivative_eq_multiplier_approximation {p : ℕ} (ψ : EuclideanSpace ℝ (Fin p) → ℂ) (R : ℝ) (r : Fin p) : reflectionSmoothDerivative ψ R r = reflectionSmoothApproximation (fun ω => I * (ω r : ℂ) * ψ ω) R := by have he : (fun ω => I * (ω r : ℂ) * reflectionFrequencyTruncation ψ R ω) = reflectionFrequencyTruncation (fun ω => I * (ω r : ℂ) * ψ ω) R := by funext ω by_cases hω : ω ∈ closedBall 0 R <;> simp [reflectionFrequencyTruncation, hω] funext u simp only [reflectionSmoothDerivative, reflectionSmoothApproximation, he]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothDerivative_eq_multiplier_approximation · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionGradientLimit.lean:47
theorem reflectionSmoothDerivative_tendsto_inverseL2

Every actual smooth coordinate derivative converges to the inverse L² class of its full frequency multiplier. The multiplier's L² regularity follows from the original finite first-order energy. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
hp :
0 < p
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
hfinite :
(∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤
r :
Fin p
D :
fun ω => I * (ω r : ℂ) * ψ ω
hD :
Tendsto (fun n : ℕ => (reflectionSmoothDerivative_memLp hψ (n : ℝ) r).toLp (reflectionSmoothDerivative ψ (n : ℝ) r)) atTop (𝓝 ((reflectionInverseL2Representative_memLp (hD.toLp D)).toLp (reflectionInverseL2Representative (hD.toLp D))))
Proof (Lean source)
-- @node: reflectionSmoothDerivative_tendsto_inverseL2 lemma reflectionSmoothDerivative_tendsto_inverseL2 {p : ℕ} (hp : 0 < p) {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) (hfinite : (∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤) (r : Fin p) : let D := fun ω => I * (ω r : ℂ) * ψ ω let hD := reflectionCoordinateProfile_memLp hp hm hfinite r Tendsto (fun n : ℕ => (reflectionSmoothDerivative_memLp hψ (n : ℝ) r).toLp (reflectionSmoothDerivative ψ (n : ℝ) r)) atTop (𝓝 ((reflectionInverseL2Representative_memLp (hD.toLp D)).toLp (reflectionInverseL2Representative (hD.toLp D)))) := by dsimp only have hD := reflectionCoordinateProfile_memLp hp hm hfinite r have hDm : Measurable (fun ω => I * (ω r : ℂ) * ψ ω) := by fun_prop have ht := reflectionSmoothApproximation_tendsto_inverseL2Representative hDm hD convert ht using 1 funext n apply Lp.ext filter_upwards [(reflectionSmoothDerivative_memLp hψ (n : ℝ) r).coeFn_toLp, (reflectionSmoothApproximation_memLp hD (n : ℝ)).coeFn_toLp] with u hu hv rw [hu, hv, reflectionSmoothDerivative_eq_multiplier_approximation]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothDerivative_tendsto_inverseL2 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionGradientLimit.lean:62
theorem reflectionInverseCoordinate_energy

The limiting coordinate derivative has exactly its full coordinate-weighted frequency energy, even when that multiplier is not L¹. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hfinite :
(∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤
r :
Fin p
D :
fun ω => I * (ω r : ℂ) * ψ ω
hD :
(∫⁻ u, ofReal (‖reflectionInverseL2Representative (hD.toLp D) u‖ ^ 2))
= ∫⁻ ω, ofReal ((ω r) ^ 2 * ‖ψ ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionInverseCoordinate_energy lemma reflectionInverseCoordinate_energy {p : ℕ} (hp : 0 < p) {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hfinite : (∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤) (r : Fin p) : let D := fun ω => I * (ω r : ℂ) * ψ ω let hD := reflectionCoordinateProfile_memLp hp hm hfinite r (∫⁻ u, ofReal (‖reflectionInverseL2Representative (hD.toLp D) u‖ ^ 2)) = ∫⁻ ω, ofReal ((ω r) ^ 2 * ‖ψ ω‖ ^ 2) := by dsimp only rw [reflectionInverseL2Representative_energy] apply lintegral_congr_ae filter_upwards [(reflectionCoordinateProfile_memLp hp hm hfinite r).coeFn_toLp] with ω hω rw [hω] simp [mul_pow, sq_abs]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseCoordinate_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionGradientLimit.lean:88
theorem reflectionInverse_firstOrder_energy

The limiting inverse function and all limiting coordinate derivatives have the exact first-order energy from roadmap (3), with local gradient factor 1/p. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
hfinite :
(∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤
(∫⁻ u, ofReal (‖reflectionInverseL2Representative (hψ.toLp ψ) u‖ ^ 2))
+ ofReal ((p : ℝ)⁻¹) * (∑ r : Fin p, ∫⁻ u, ofReal (‖reflectionInverseL2Representative ((reflectionCoordinateProfile_memLp hp hm hfinite r).toLp (fun ω => I * (ω r : ℂ) * ψ ω)) u‖ ^ 2))
= ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))
Proof (Lean source)
-- @node: reflectionInverse_firstOrder_energy lemma reflectionInverse_firstOrder_energy {p : ℕ} (hp : 0 < p) {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) (hfinite : (∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤) : (∫⁻ u, ofReal (‖reflectionInverseL2Representative (hψ.toLp ψ) u‖ ^ 2)) + ofReal ((p : ℝ)⁻¹) * (∑ r : Fin p, ∫⁻ u, ofReal (‖reflectionInverseL2Representative ((reflectionCoordinateProfile_memLp hp hm hfinite r).toLp (fun ω => I * (ω r : ℂ) * ψ ω)) u‖ ^ 2)) = ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ))) := by have he : (∫⁻ u, ofReal (‖reflectionInverseL2Representative (hψ.toLp ψ) u‖ ^ 2)) = ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2) := by rw [reflectionInverseL2Representative_energy] apply lintegral_congr_ae filter_upwards [hψ.coeFn_toLp] with ω hω rw [hω] rw [he] simp_rw [reflectionInverseCoordinate_energy hp hm hfinite] rw [← lintegral_finsetSum'] · have hsum : (fun ω : EuclideanSpace ℝ (Fin p) => ∑ r : Fin p, ofReal ((ω r) ^ 2 * ‖ψ ω‖ ^ 2)) = (fun ω => ofReal (‖ω‖ ^ 2 * ‖ψ ω‖ ^ 2)) := by funext ω rw [norm_sq_eq_sum_coordinates, Finset.sum_mul, ENNReal.ofReal_sum_of_nonneg] intro r hr positivity rw [hsum, ← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] have hmE : AEMeasurable (fun ω => ofReal (‖ψ ω‖ ^ 2)) volume := by fun_prop rw [← lintegral_add_left' hmE] apply lintegral_congr intro ω rw [← ENNReal.ofReal_mul (by positivity), ← ENNReal.ofReal_add (by positivity) (by positivity)] congr 1 simp only [div_eq_mul_inv] ring · intro r hr fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverse_firstOrder_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionGradientLimit.lean:106
theorem reflectionSmoothApproximation_firstOrder_tendsto

Spatial inverse truncations and their actual coordinate derivatives converge together to the explicit inverse Fourier classes. All derivative regularity is derived from the one finite first-order energy assumption. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
hfinite :
(∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤
conclusion 1
Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 ((reflectionInverseL2Representative_memLp (hψ.toLp ψ)).toLp (reflectionInverseL2Representative (hψ.toLp ψ))))
conclusion 2
r :
Fin p
Tendsto (fun n : ℕ => (reflectionSmoothDerivative_memLp hψ (n : ℝ) r).toLp (reflectionSmoothDerivative ψ (n : ℝ) r)) atTop (𝓝 ((reflectionInverseL2Representative_memLp ((reflectionCoordinateProfile_memLp hp hm hfinite r).toLp (fun ω => I * (ω r : ℂ) * ψ ω))).toLp (reflectionInverseL2Representative ((reflectionCoordinateProfile_memLp hp hm hfinite r).toLp (fun ω => I * (ω r : ℂ) * ψ ω)))))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_firstOrder_tendsto lemma reflectionSmoothApproximation_firstOrder_tendsto {p : ℕ} (hp : 0 < p) {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) (hfinite : (∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤) : Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 ((reflectionInverseL2Representative_memLp (hψ.toLp ψ)).toLp (reflectionInverseL2Representative (hψ.toLp ψ)))) ∧ (∀ r : Fin p, Tendsto (fun n : ℕ => (reflectionSmoothDerivative_memLp hψ (n : ℝ) r).toLp (reflectionSmoothDerivative ψ (n : ℝ) r)) atTop (𝓝 ((reflectionInverseL2Representative_memLp ((reflectionCoordinateProfile_memLp hp hm hfinite r).toLp (fun ω => I * (ω r : ℂ) * ψ ω))).toLp (reflectionInverseL2Representative ((reflectionCoordinateProfile_memLp hp hm hfinite r).toLp (fun ω => I * (ω r : ℂ) * ψ ω)))))) := by exact ⟨reflectionSmoothApproximation_tendsto_inverseL2Representative hm hψ, fun r => reflectionSmoothDerivative_tendsto_inverseL2 hp hm hψ hfinite r⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_firstOrder_tendsto · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionGradientLimit.lean:151
theorem reflectionSmoothDerivative_inverseL2_error_energy

The derivative error relative to its full inverse class has the exact coordinate-weighted truncation error, with no spatial normalization loss. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hfinite :
(∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤
R :
ℝ
r :
Fin p
D :
fun ω => I * (ω r : ℂ) * ψ ω
hD :
(∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ R r u - reflectionInverseL2Representative (hD.toLp D) u‖ ^ 2))
= ∫⁻ ω, ofReal ((ω r) ^ 2 * ‖reflectionFrequencyTruncation ψ R ω - ψ ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionSmoothDerivative_inverseL2_error_energy lemma reflectionSmoothDerivative_inverseL2_error_energy {p : ℕ} (hp : 0 < p) {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hfinite : (∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤) (R : ℝ) (r : Fin p) : let D := fun ω => I * (ω r : ℂ) * ψ ω let hD := reflectionCoordinateProfile_memLp hp hm hfinite r (∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ R r u - reflectionInverseL2Representative (hD.toLp D) u‖ ^ 2)) = ∫⁻ ω, ofReal ((ω r) ^ 2 * ‖reflectionFrequencyTruncation ψ R ω - ψ ω‖ ^ 2) := by dsimp only simp_rw [reflectionSmoothDerivative_eq_multiplier_approximation] rw [reflectionSmoothApproximation_inverseL2_error_energy] apply lintegral_congr intro ω by_cases hω : ω ∈ closedBall 0 R · simp [reflectionFrequencyTruncation, hω] · simp [reflectionFrequencyTruncation, hω, mul_pow, sq_abs]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothDerivative_inverseL2_error_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionGradientLimit.lean:176
theorem reflectionSmoothApproximation_firstOrder_error_tendsto

Roadmap (3)'s entire first-order squared error tends to zero. This is convergence in the genuine spatial endpoint norm, not only coefficientwise convergence, and keeps the exact local gradient factor 1/p. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
hfinite :
(∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤
Tendsto (fun n : ℕ => (∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ (n : ℝ) u - reflectionInverseL2Representative (hψ.toLp ψ) u‖ ^ 2)) + ofReal ((p : ℝ)⁻¹) * (∑ r : Fin p, ∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ (n : ℝ) r u - reflectionInverseL2Representative ((reflectionCoordinateProfile_memLp hp hm hfinite r).toLp (fun ω => I * (ω r : ℂ) * ψ ω)) u‖ ^ 2))) atTop (𝓝 0)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_firstOrder_error_tendsto lemma reflectionSmoothApproximation_firstOrder_error_tendsto {p : ℕ} (hp : 0 < p) {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) (hfinite : (∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) ≠ ⊤) : Tendsto (fun n : ℕ => (∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ (n : ℝ) u - reflectionInverseL2Representative (hψ.toLp ψ) u‖ ^ 2)) + ofReal ((p : ℝ)⁻¹) * (∑ r : Fin p, ∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ (n : ℝ) r u - reflectionInverseL2Representative ((reflectionCoordinateProfile_memLp hp hm hfinite r).toLp (fun ω => I * (ω r : ℂ) * ψ ω)) u‖ ^ 2))) atTop (𝓝 0) := by have he (n : ℕ) : (∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ (n : ℝ) u - reflectionInverseL2Representative (hψ.toLp ψ) u‖ ^ 2)) + ofReal ((p : ℝ)⁻¹) * (∑ r : Fin p, ∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ (n : ℝ) r u - reflectionInverseL2Representative ((reflectionCoordinateProfile_memLp hp hm hfinite r).toLp (fun ω => I * (ω r : ℂ) * ψ ω)) u‖ ^ 2)) = ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ))) := by rw [reflectionSmoothApproximation_inverseL2_error_energy hψ] simp_rw [reflectionSmoothDerivative_inverseL2_error_energy hp hm hfinite] rw [← lintegral_finsetSum'] · have hsum : (fun ω : EuclideanSpace ℝ (Fin p) => ∑ r : Fin p, ofReal ((ω r) ^ 2 * ‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2)) = (fun ω => ofReal (‖ω‖ ^ 2 * ‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2)) := by funext ω rw [norm_sq_eq_sum_coordinates, Finset.sum_mul, ENNReal.ofReal_sum_of_nonneg] intro r hr positivity rw [hsum, ← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] have hmE : AEMeasurable (fun ω => ofReal (‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2)) volume := by fun_prop rw [← lintegral_add_left' hmE] apply lintegral_congr intro ω rw [← ENNReal.ofReal_mul (by positivity), ← ENNReal.ofReal_add (by positivity) (by positivity)] congr 1 simp only [div_eq_mul_inv] ring · intro r hr fun_prop simp_rw [he] simpa only [Real.rpow_one] using reflectionFrequencyTruncation_weighted_error_tendsto 1 hm (by simpa only [Real.rpow_one] using hfinite)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_firstOrder_error_tendsto · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionGradientLimit.lean:198
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionInterpolation 8 declarations The weighted measurable-function minimizer belongs to the ambient L² space when the first-order weight dominates one.

Weighted interpolation on the ambient frequency L² space

The weighted measurable-function minimizer belongs to the ambient L² space when the first-order weight dominates one. Thus restricting the decomposition infimum to L² classes preserves the exact normalized interpolation energy.

theorem reflection_wNorm_one_eq_enorm Lemma reflection_wNorm_one_eq_enorm in the paper ↗

The unweighted measurable-function gauge is the ambient L² norm.

Formal statement
S :
μ :
f :
Lp ℂ 2 μ
wNorm (fun _ => 1) μ (f : S →ₘ[μ] ℂ) = ‖f‖ₑ
Proof (Lean source)
-- @node: reflection_wNorm_one_eq_enorm lemma reflection_wNorm_one_eq_enorm {S : Type} [MeasurableSpace S] (μ : Measure S) (f : Lp ℂ 2 μ) : wNorm (fun _ => 1) μ (f : S →ₘ[μ] ℂ) = ‖f‖ₑ := by rw [wNorm, Lp.enorm_def] convert (eLpNorm_nnreal_eq_lintegral (f := fun x => f x) (μ := μ) (p := 2) (by norm_num)).symm using 1 <;> norm_num [one_mul, enorm_eq_nnnorm, ENNReal.rpow_two]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflection_wNorm_one_eq_enorm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInterpolation.lean:19
theorem reflection_memLp_of_wNorm_lt_top Lemma reflection_memLp_of_wNorm_lt_top in the paper ↗

A finite weighted gauge with weight at least one gives ambient L² membership. Under the stated conditions, the asserted mathematical result follows.

Formal statement
S :
μ :
w :
S → ℝ≥0∞
hw :
∀ᵐ x ∂μ, 1 ≤ w x
f :
S →ₘ[μ] ℂ
hf :
wNorm w μ f < ⊤
MemLp f 2 μ
Proof (Lean source)
-- @node: reflection_memLp_of_wNorm_lt_top lemma reflection_memLp_of_wNorm_lt_top {S : Type} [MeasurableSpace S] (μ : Measure S) (w : S → ℝ≥0∞) (hw : ∀ᵐ x ∂μ, 1 ≤ w x) (f : S →ₘ[μ] ℂ) (hf : wNorm w μ f < ⊤) : MemLp f 2 μ := by refine ⟨f.aestronglyMeasurable, ?_⟩ have henergy : (∫⁻ x, (‖f x‖₊ : ℝ≥0∞) ^ 2 ∂μ) < ⊤ := by apply lt_of_le_of_lt _ (ENNReal.pow_lt_top hf (n := 2)) rw [wNorm_sq] apply lintegral_mono_ae filter_upwards [hw] with x hx exact le_mul_of_one_le_left' hx have he := eLpNorm_nnreal_eq_lintegral (f := fun x => f x) (μ := μ) (p := 2) (by norm_num) simp only [NNReal.coe_ofNat, ENNReal.coe_ofNat, enorm_eq_nnnorm, ENNReal.rpow_two] at he rw [he] simpa only [enorm_eq_nnnorm, NNReal.coe_ofNat, ENNReal.coe_ofNat, ENNReal.rpow_two] using ENNReal.rpow_lt_top_of_nonneg (by norm_num : (0 : ℝ) ≤ 1 / 2) henergy.ne
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflection_memLp_of_wNorm_lt_top · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInterpolation.lean:28

The weighted gauge of the zero equivalence class vanishes for any weight. Under the stated conditions.

Formal statement
S :
μ :
w :
S → ℝ≥0∞
wNorm w μ (0 : S →ₘ[μ] ℂ) = 0
Proof (Lean source)
-- @node: reflection_wNorm_zero lemma reflection_wNorm_zero {S : Type} [MeasurableSpace S] (μ : Measure S) (w : S → ℝ≥0∞) : wNorm w μ (0 : S →ₘ[μ] ℂ) = 0 := by rw [wNorm] have he : (∫⁻ x, w x * (‖(0 : S →ₘ[μ] ℂ) x‖₊ : ℝ≥0∞) ^ 2 ∂μ) = 0 := by calc _ = ∫⁻ x, (0 : ℝ≥0∞) ∂μ := by apply lintegral_congr_ae filter_upwards [AEEqFun.coeFn_zero (α := S) (μ := μ) (β := ℂ)] with x hx simp [hx] _ = 0 := by simp rw [he] norm_num
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflection_wNorm_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInterpolation.lean:48
theorem reflection_kFunctionalSq_Lp_eq Lemma reflection_kFunctionalSq_Lp_eq in the paper ↗

Restricting weighted quadratic decompositions to ambient L² classes does not change the K-functional. Finite minimizing costs force both summands into L². Under the stated conditions.

Formal statement
S :
μ :
w :
S → ℝ≥0∞
hw :
hwl :
∀ᵐ x ∂μ, 1 ≤ w x ∧ w x < ⊤
t :
ℝ
ht :
0 < t
f :
Lp ℂ 2 μ
kFunctionalSq (fun g : Lp ℂ 2 μ => ‖g‖ₑ) (fun g => wNorm w μ (g : S →ₘ[μ] ℂ)) t f
= kFunctionalSq (wNorm (fun _ => 1) μ) (wNorm w μ) t (f : S →ₘ[μ] ℂ)
Proof (Lean source)
-- @node: reflection_kFunctionalSq_Lp_eq lemma reflection_kFunctionalSq_Lp_eq {S : Type} [MeasurableSpace S] (μ : Measure S) (w : S → ℝ≥0∞) (hw : Measurable w) (hwl : ∀ᵐ x ∂μ, 1 ≤ w x ∧ w x < ⊤) (t : ℝ) (ht : 0 < t) (f : Lp ℂ 2 μ) : kFunctionalSq (fun g : Lp ℂ 2 μ => ‖g‖ₑ) (fun g => wNorm w μ (g : S →ₘ[μ] ℂ)) t f = kFunctionalSq (wNorm (fun _ => 1) μ) (wNorm w μ) t (f : S →ₘ[μ] ℂ) := by have hweights : ∀ᵐ x ∂μ, 0 < (1 : ℝ≥0∞) ∧ (1 : ℝ≥0∞) < ⊤ ∧ 0 < w x ∧ w x < ⊤ := by filter_upwards [hwl] with x hx exact ⟨by norm_num, by norm_num, lt_of_lt_of_le (by norm_num) hx.1, hx.2⟩ apply le_antisymm · obtain ⟨g0, g1, hsum, hcost⟩ := exists_harmonic_minimizer μ (fun _ => 1) w measurable_const hw hweights t ht (f : S →ₘ[μ] ℂ) have hbound := harmonic_energy_le_cost μ (fun _ => 1) w measurable_const hweights t ht (f : S →ₘ[μ] ℂ) (f : S →ₘ[μ] ℂ) 0 (by simp) have hzero := reflection_wNorm_zero μ w rw [hcost.symm, reflection_wNorm_one_eq_enorm, hzero, zero_pow (by decide), mul_zero, add_zero] at hbound have hfinite : wNorm (fun _ => 1) μ g0 ^ 2 + ofReal (t ^ 2) * wNorm w μ g1 ^ 2 < ⊤ := lt_of_le_of_lt hbound (ENNReal.pow_lt_top (by rw [Lp.enorm_def]; exact (Lp.memLp f).2) (n := 2)) have h0 : wNorm (fun _ => 1) μ g0 < ⊤ := by have h := lt_of_le_of_lt le_self_add hfinite simpa using h have h1 : wNorm w μ g1 < ⊤ := by have h := lt_of_le_of_lt le_add_self hfinite have ht0 : ofReal (t ^ 2) ≠ 0 := ne_of_gt (ENNReal.ofReal_pos.mpr (sq_pos_of_pos ht)) rcases ENNReal.mul_lt_top_iff.mp h with h | h | h · simpa using h.2 · exact (ht0 h).elim · have hz : wNorm w μ g1 = 0 := by simpa using h rw [hz] exact ENNReal.zero_lt_top let G0 : Lp ℂ 2 μ := ⟨g0, (reflection_memLp_of_wNorm_lt_top μ (fun _ => 1) (by simp) g0 h0).2⟩ let G1 : Lp ℂ 2 μ := ⟨g1, (reflection_memLp_of_wNorm_lt_top μ w (hwl.mono fun _ hx => hx.1) g1 h1).2⟩ have hsumLp : f = G0 + G1 := Subtype.ext hsum rw [kFunctionalSq_wNorm μ (fun _ => 1) w measurable_const hw hweights t ht] unfold kFunctionalSq refine (iInf_le_of_le G0 (iInf_le_of_le G1 (iInf_le_of_le hsumLp le_rfl))).trans ?_ dsimp only rw [← reflection_wNorm_one_eq_enorm μ G0] exact hcost.le · unfold kFunctionalSq refine le_iInf fun g0 => le_iInf fun g1 => le_iInf fun hsum => ?_ have he : (f : S →ₘ[μ] ℂ) = (g0 : S →ₘ[μ] ℂ) + (g1 : S →ₘ[μ] ℂ) := congrArg val hsum refine (iInf_le_of_le (g0 : S →ₘ[μ] ℂ) (iInf_le_of_le (g1 : S →ₘ[μ] ℂ) (iInf_le_of_le he le_rfl))).trans ?_ rw [reflection_wNorm_one_eq_enorm]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflection_kFunctionalSq_Lp_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInterpolation.lean:64
theorem reflection_kNormSq_Lp_eq Lemma reflection_kNormSq_Lp_eq in the paper ↗

The normalized K norm on L² classes is exactly the fractional weighted energy, with no enlargement of the ambient space and no loss of constant. Under the stated conditions.

Formal statement
S :
μ :
w :
S → ℝ≥0∞
hw :
hwl :
∀ᵐ x ∂μ, 1 ≤ w x ∧ w x < ⊤
s :
ℝ
hs :
s ∈ Ioo (0 : ℝ) 1
f :
Lp ℂ 2 μ
kNormSq (fun g : Lp ℂ 2 μ => ‖g‖ₑ) (fun g => wNorm w μ (g : S →ₘ[μ] ℂ)) s f
= ∫⁻ x, rpow (w x) s * (‖f x‖₊ : ℝ≥0∞) ^ 2 ∂μ
Proof (Lean source)
-- @node: reflection_kNormSq_Lp_eq lemma reflection_kNormSq_Lp_eq {S : Type} [MeasurableSpace S] (μ : Measure S) (w : S → ℝ≥0∞) (hw : Measurable w) (hwl : ∀ᵐ x ∂μ, 1 ≤ w x ∧ w x < ⊤) (s : ℝ) (hs : s ∈ Ioo (0 : ℝ) 1) (f : Lp ℂ 2 μ) : kNormSq (fun g : Lp ℂ 2 μ => ‖g‖ₑ) (fun g => wNorm w μ (g : S →ₘ[μ] ℂ)) s f = ∫⁻ x, rpow (w x) s * (‖f x‖₊ : ℝ≥0∞) ^ 2 ∂μ := by have hweights : ∀ᵐ x ∂μ, 0 < (1 : ℝ≥0∞) ∧ (1 : ℝ≥0∞) < ⊤ ∧ 0 < w x ∧ w x < ⊤ := by filter_upwards [hwl] with x hx exact ⟨by norm_num, by norm_num, lt_of_lt_of_le (by norm_num) hx.1, hx.2⟩ have hf : ∃ f0 f1 : S →ₘ[μ] ℂ, (f : S →ₘ[μ] ℂ) = f0 + f1 ∧ wNorm (fun _ => 1) μ f0 < ⊤ ∧ wNorm w μ f1 < ⊤ := by refine ⟨f, 0, by simp, ?_, ?_⟩ · rw [reflection_wNorm_one_eq_enorm, Lp.enorm_def] exact (Lp.memLp f).2 · rw [reflection_wNorm_zero] exact ENNReal.zero_lt_top calc _ = kNormSq (wNorm (fun _ => 1) μ) (wNorm w μ) s (f : S →ₘ[μ] ℂ) := by unfold kNormSq congr 1 apply setLIntegral_congr_fun measurableSet_Ioi intro t ht dsimp only rw [reflection_kFunctionalSq_Lp_eq μ w hw hwl t ht f] _ = _ := by simpa only [ENNReal.rpow_eq_pow, ENNReal.one_rpow, one_mul] using weighted_l2_interpolation μ (fun _ => 1) w measurable_const hw hweights s hs (f : S →ₘ[μ] ℂ) hf
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflection_kNormSq_Lp_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInterpolation.lean:128
theorem reflectionProfileFirstOrderNorm_eq_wNorm

The frequency first-order gauge agrees with its weighted L² realization. The asserted mathematical result follows.

Formal statement
p :
ℕ
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
= wNorm (fun ω : EuclideanSpace ℝ (Fin p) => ofReal (1 + ‖ω‖ ^ 2 / (p : ℝ))) volume (ψ : EuclideanSpace ℝ (Fin p) →ₘ[volume] ℂ)
Proof (Lean source)
-- @node: reflectionProfileFirstOrderNorm_eq_wNorm lemma reflectionProfileFirstOrderNorm_eq_wNorm (p : ℕ) (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : reflectionProfileFirstOrderNorm p ψ = wNorm (fun ω : EuclideanSpace ℝ (Fin p) => ofReal (1 + ‖ω‖ ^ 2 / (p : ℝ))) volume (ψ : EuclideanSpace ℝ (Fin p) →ₘ[volume] ℂ) := by unfold reflectionProfileFirstOrderNorm wNorm congr 1 apply lintegral_congr intro ω rw [ENNReal.ofReal_mul (sq_nonneg _), ENNReal.ofReal_pow (norm_nonneg _), ofReal_norm, enorm_eq_nnnorm, mul_comm]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileFirstOrderNorm_eq_wNorm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInterpolation.lean:168
theorem reflectionProfile_kNormSq_eq_energy

Source interpolation is precisely the paper's fractional angular Fourier energy, including its local dimension normalization. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
s :
ℝ
hs :
s ∈ Ioo (0 : ℝ) 1
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
kNormSq (fun f : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) => ‖f‖ₑ) (reflectionProfileFirstOrderNorm p) s ψ
= ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)
Proof (Lean source)
-- @node: reflectionProfile_kNormSq_eq_energy lemma reflectionProfile_kNormSq_eq_energy (p : ℕ) (s : ℝ) (hs : s ∈ Ioo (0 : ℝ) 1) (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : kNormSq (fun f : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) => ‖f‖ₑ) (reflectionProfileFirstOrderNorm p) s ψ = ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s) := by have hw : Measurable (fun ω : EuclideanSpace ℝ (Fin p) => ofReal (1 + ‖ω‖ ^ 2 / (p : ℝ))) := by fun_prop have hwl : ∀ᵐ ω ∂(volume : Measure (EuclideanSpace ℝ (Fin p))), 1 ≤ ofReal (1 + ‖ω‖ ^ 2 / (p : ℝ)) ∧ ofReal (1 + ‖ω‖ ^ 2 / (p : ℝ)) < ⊤ := by filter_upwards [] with ω constructor · exact ENNReal.one_le_ofReal.mpr (le_add_of_nonneg_right (by positivity)) · exact ENNReal.ofReal_lt_top have hn : reflectionProfileFirstOrderNorm p = (fun f : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) => wNorm (fun ω : EuclideanSpace ℝ (Fin p) => ofReal (1 + ‖ω‖ ^ 2 / (p : ℝ))) volume (f : EuclideanSpace ℝ (Fin p) →ₘ[volume] ℂ)) := funext (reflectionProfileFirstOrderNorm_eq_wNorm p) rw [hn] rw [reflection_kNormSq_Lp_eq volume _ hw hwl s hs ψ] apply lintegral_congr intro ω rw [ENNReal.rpow_eq_pow, ENNReal.ofReal_rpow_of_nonneg (by positivity) hs.1.le, ENNReal.ofReal_mul (sq_nonneg _), ENNReal.ofReal_pow (norm_nonneg _), ofReal_norm, enorm_eq_nnnorm, mul_comm]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfile_kNormSq_eq_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInterpolation.lean:183
theorem reflectionProfileOperator_kNormSq_le_energy

The genuine reflection operator's target K energy is bounded by the exact fractional whole-space energy. Both endpoint contractions and the source norm identification enter this estimate with constant one. Under the stated conditions.

Formal statement
p :
ℕ
hp :
p = 1 ∨ p = 2
s :
ℝ
hs :
s ∈ Ioo (0 : ℝ) 1
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
kNormSq (fun f : Lp ℂ 2 (torusMeasure p) => ‖f‖ₑ) (reflectionTorusFirstOrderNorm p) s (reflectionProfileOperator p ψ)
≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)
Proof (Lean source)
-- @node: reflectionProfileOperator_kNormSq_le_energy lemma reflectionProfileOperator_kNormSq_le_energy (p : ℕ) (hp : p = 1 ∨ p = 2) (s : ℝ) (hs : s ∈ Ioo (0 : ℝ) 1) (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : kNormSq (fun f : Lp ℂ 2 (torusMeasure p) => ‖f‖ₑ) (reflectionTorusFirstOrderNorm p) s (reflectionProfileOperator p ψ) ≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s) := by rw [← reflectionProfile_kNormSq_eq_energy p s hs ψ] exact reflectionProfileOperator_kNormSq_le p hp s hs ψ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileOperator_kNormSq_le_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInterpolation.lean:216
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionInverseL2 11 declarations Angular Plancherel and the measure-preserving spatial reflection identify the exact spatial energies and differences of the inverse integrals in roadmap step (3).

Spatial L² control of the smooth inverse truncations

Angular Plancherel and the measure-preserving spatial reflection identify the exact spatial energies and differences of the inverse integrals in roadmap step (3).

Angular Fourier transformation commutes with subtraction of L¹ profiles. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
hχ :
Fourier (ψ - χ) = Fourier ψ - Fourier χ
Proof (Lean source)
-- @node: reflectionFourier_sub lemma reflectionFourier_sub {p : ℕ} {ψ χ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : Integrable ψ volume) (hχ : Integrable χ volume) : Fourier (ψ - χ) = Fourier ψ - Fourier χ := by funext u unfold Fourier simp only [Pi.sub_apply, mul_sub] rw [integral_sub (integrable_angular_kernel ψ hψ u) (integrable_angular_kernel χ hχ u), smul_sub]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFourier_sub · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:16
theorem reflectionInverseIntegral_memLp Lemma reflectionInverseIntegral_memLp in the paper ↗

The inverse angular integral of an L¹∩L² profile is square integrable. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ1 :
hψ2 :
MemLp (fun u => Fourier ψ (-u)) 2 volume
Proof (Lean source)
-- @node: reflectionInverseIntegral_memLp lemma reflectionInverseIntegral_memLp {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ1 : Integrable ψ volume) (hψ2 : MemLp ψ 2 volume) : MemLp (fun u => Fourier ψ (-u)) 2 volume := by exact (angularFourier_memLp ψ hψ1 hψ2).comp_measurePreserving (Measure.measurePreserving_neg volume)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseIntegral_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:28
theorem reflectionInverseIntegral_energy Lemma reflectionInverseIntegral_energy in the paper ↗

Spatial negation and angular Plancherel preserve the exact inverse-integral energy. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ1 :
hψ2 :
(∫⁻ u, ofReal (‖Fourier ψ (-u)‖ ^ 2)) = ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionInverseIntegral_energy lemma reflectionInverseIntegral_energy {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ1 : Integrable ψ volume) (hψ2 : MemLp ψ 2 volume) : (∫⁻ u, ofReal (‖Fourier ψ (-u)‖ ^ 2)) = ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2) := by calc _ = ∫⁻ u, ofReal (‖Fourier ψ u‖ ^ 2) := (Measure.measurePreserving_neg volume).lintegral_comp (by have hc := angularFourier_continuous ψ hψ1 change Measurable (fun u => ofReal (‖Causalean.Mathlib.Analysis.Fourier.angularFourier ψ u‖ ^ 2)) fun_prop) _ = _ := angular_plancherel_integral ψ hψ1 hψ2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseIntegral_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:37
theorem reflectionInverseIntegral_difference_energy Lemma reflectionInverseIntegral_difference_energy in the paper ↗

The inverse-integral squared distance equals the frequency squared distance, including profiles whose inverse integrals need not be L¹. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ1 :
hψ2 :
hχ1 :
hχ2 :
(∫⁻ u, ofReal (‖Fourier ψ (-u) - Fourier χ (-u)‖ ^ 2))
= ∫⁻ ω, ofReal (‖ψ ω - χ ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionInverseIntegral_difference_energy lemma reflectionInverseIntegral_difference_energy {p : ℕ} {ψ χ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ1 : Integrable ψ volume) (hψ2 : MemLp ψ 2 volume) (hχ1 : Integrable χ volume) (hχ2 : MemLp χ 2 volume) : (∫⁻ u, ofReal (‖Fourier ψ (-u) - Fourier χ (-u)‖ ^ 2)) = ∫⁻ ω, ofReal (‖ψ ω - χ ω‖ ^ 2) := by simpa only [reflectionFourier_sub hψ1 hχ1, Pi.sub_apply] using reflectionInverseIntegral_energy (hψ1.sub hχ1) (hψ2.sub hχ2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseIntegral_difference_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:53
theorem reflectionSmoothApproximation_memLp

Every smooth ball-truncated inverse integral is genuinely in spatial L². Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:65
theorem reflectionSmoothApproximation_energy

The smooth inverse approximations have exactly the truncated frequency energy. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
(∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u‖ ^ 2))
= ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ R ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_energy lemma reflectionSmoothApproximation_energy {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : (∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u‖ ^ 2)) = ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ R ω‖ ^ 2) := reflectionInverseIntegral_energy (reflectionFrequencyTruncation_integrable hψ R) (reflectionFrequencyTruncation_memLp hψ R)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:73
theorem reflectionSmoothApproximation_difference_energy

Differences of smooth inverse truncations preserve squared L² distance with constant one. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R S :
ℝ
(∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u - reflectionSmoothApproximation ψ S u‖ ^ 2))
= ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ R ω - reflectionFrequencyTruncation ψ S ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_difference_energy lemma reflectionSmoothApproximation_difference_energy {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R S : ℝ) : (∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u - reflectionSmoothApproximation ψ S u‖ ^ 2)) = ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ R ω - reflectionFrequencyTruncation ψ S ω‖ ^ 2) := reflectionInverseIntegral_difference_energy (reflectionFrequencyTruncation_integrable hψ R) (reflectionFrequencyTruncation_memLp hψ R) (reflectionFrequencyTruncation_integrable hψ S) (reflectionFrequencyTruncation_memLp hψ S)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_difference_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:82
theorem reflectionFrequencyTruncation_difference_tendsto

The frequency truncations are Cauchy in squared L² energy, jointly in both radii. The domination has constant one because two nested indicators differ only by a sign. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
Tendsto (fun q : ℕ × ℕ => ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ (q.1 : ℝ) ω - reflectionFrequencyTruncation ψ (q.2 : ℝ) ω‖ ^ 2)) atTop (𝓝 0)
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_difference_tendsto lemma reflectionFrequencyTruncation_difference_tendsto {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) : Tendsto (fun q : ℕ × ℕ => ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ (q.1 : ℝ) ω - reflectionFrequencyTruncation ψ (q.2 : ℝ) ω‖ ^ 2)) atTop (𝓝 0) := by have hmeas (q : ℕ × ℕ) : Measurable (fun ω => ofReal (‖reflectionFrequencyTruncation ψ (q.1 : ℝ) ω - reflectionFrequencyTruncation ψ (q.2 : ℝ) ω‖ ^ 2)) := by fun_prop have hbound (q : ℕ × ℕ) : (fun ω => ofReal (‖reflectionFrequencyTruncation ψ (q.1 : ℝ) ω - reflectionFrequencyTruncation ψ (q.2 : ℝ) ω‖ ^ 2)) ≤ᵐ[volume] (fun ω => ofReal (‖ψ ω‖ ^ 2)) := by apply Eventually.of_forall intro ω by_cases h₁ : ω ∈ closedBall 0 (q.1 : ℝ) <;> by_cases h₂ : ω ∈ closedBall 0 (q.2 : ℝ) <;> simp [reflectionFrequencyTruncation, h₁, h₂] have hlim : ∀ᵐ ω ∂volume, Tendsto (fun q : ℕ × ℕ => ofReal (‖reflectionFrequencyTruncation ψ (q.1 : ℝ) ω - reflectionFrequencyTruncation ψ (q.2 : ℝ) ω‖ ^ 2)) atTop (𝓝 (0 : ℝ≥0∞)) := by apply Eventually.of_forall intro ω obtain ⟨N, hN⟩ := exists_nat_ge ‖ω‖ apply tendsto_const_nhds.congr' filter_upwards [eventually_ge_atTop (N, N)] with q hq have h₁ : ω ∈ closedBall 0 (q.1 : ℝ) := by simpa only [Metric.mem_closedBall, dist_zero_right] using hN.trans (Nat.cast_le.mpr hq.1) have h₂ : ω ∈ closedBall 0 (q.2 : ℝ) := by simpa only [Metric.mem_closedBall, dist_zero_right] using hN.trans (Nat.cast_le.mpr hq.2) simp [reflectionFrequencyTruncation, h₁, h₂] simpa using tendsto_lintegral_filter_of_dominated_convergence (fun ω => ofReal (‖ψ ω‖ ^ 2)) (Eventually.of_forall hmeas) (Eventually.of_forall hbound) (l2Energy_lt_top_of_memLp ψ hψ).ne hlim
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_difference_tendsto · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:94
theorem reflectionSmoothApproximation_difference_tendsto

The smooth inverse integrals are Cauchy in spatial squared L² energy. This uses the exact Plancherel distance identity rather than assuming inverse L¹ regularity. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
Tendsto (fun q : ℕ × ℕ => ∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ (q.1 : ℝ) u - reflectionSmoothApproximation ψ (q.2 : ℝ) u‖ ^ 2)) atTop (𝓝 0)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_difference_tendsto lemma reflectionSmoothApproximation_difference_tendsto {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) : Tendsto (fun q : ℕ × ℕ => ∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ (q.1 : ℝ) u - reflectionSmoothApproximation ψ (q.2 : ℝ) u‖ ^ 2)) atTop (𝓝 0) := by simpa only [reflectionSmoothApproximation_difference_energy hψ] using reflectionFrequencyTruncation_difference_tendsto hm hψ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_difference_tendsto · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:136
theorem reflectionSmoothApproximation_cauchySeq

The inverse truncations define a Cauchy sequence of actual spatial L² classes. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
CauchySeq (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ)))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_cauchySeq lemma reflectionSmoothApproximation_cauchySeq {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) : CauchySeq (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) := by have he := reflectionSmoothApproximation_difference_tendsto hm hψ have hr := (ENNReal.continuous_rpow_const (y := (1 / 2 : ℝ))).tendsto 0 |>.comp he norm_num at hr have ht := (ENNReal.continuousAt_toReal (by simp : (0 : ℝ≥0∞) ≠ ⊤)).tendsto.comp hr apply cauchySeq_iff_tendsto_dist_atTop_0.mpr convert ht using 1 · funext q rw [dist_edist, Lp.edist_toLp_toLp] congr 1 rw [eLpNorm_eq_lintegral_rpow_enorm_toReal (by norm_num) (by norm_num)] congr 1 norm_num only [ENNReal.toReal_ofNat, Pi.sub_apply, ENNReal.rpow_two] · simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_cauchySeq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:148
theorem reflectionSmoothApproximation_exists_L2_limit

Completeness produces the spatial L² limit of the smooth inverse truncations. Identifying this limit with the inverse Fourier class is a separate obligation. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
MemLp ψ 2 volume
∃ H : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))),
Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 H)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_exists_L2_limit lemma reflectionSmoothApproximation_exists_L2_limit {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) : ∃ H : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))), Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 H) := cauchySeq_tendsto_of_complete (reflectionSmoothApproximation_cauchySeq hm hψ)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_exists_L2_limit · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseL2.lean:169
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionInverseLimit 18 declarations The normalized reflected Mathlib Fourier representative gives the inverse angular transform on all frequency L² classes.

Identification of the inverse-truncation L² limit

The normalized reflected Mathlib Fourier representative gives the inverse angular transform on all frequency L² classes. Its exact energy and distance identities identify the limit in reflection-budget roadmap (3), without L¹ regularity of the full frequency profile.

[ The inverse angular L² representative is the normalized, dilated, reflected Mathlib Fourier L² transform. The input is a frequency equivalence class.

Definition (Lean source)
p :
ℕ
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
u :
reflectionInverseL2Representative ψ u :
ℂ
angularPrefactor p • (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ ψ) ((2 * pi)⁻¹ • (-u))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseL2Representative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:18
theorem reflectionInverseDilation_quasiMeasurePreserving Lemma reflectionInverseDilation_quasiMeasurePreserving in the paper ↗

The dilation and reflection used by the inverse preserve null sets.](goal) This uses the stated conclusion.

Formal statement
p :
ℕ
Measure.QuasiMeasurePreserving (fun u : EuclideanSpace ℝ (Fin p) => (2 * pi)⁻¹ • (-u)) volume volume
Proof (Lean source)
-- @node: reflectionInverseDilation_quasiMeasurePreserving lemma reflectionInverseDilation_quasiMeasurePreserving (p : ℕ) : Measure.QuasiMeasurePreserving (fun u : EuclideanSpace ℝ (Fin p) => (2 * pi)⁻¹ • (-u)) volume volume := (Measure.quasiMeasurePreserving_smul volume (inv_ne_zero (by positivity))).comp (Measure.measurePreserving_neg volume).quasiMeasurePreserving
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseDilation_quasiMeasurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:28
theorem reflectionInverseL2Representative_aestronglyMeasurable

The inverse angular representative is strongly measurable almost everywhere.

Formal statement
p :
ℕ
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
Proof (Lean source)
-- @node: reflectionInverseL2Representative_aestronglyMeasurable lemma reflectionInverseL2Representative_aestronglyMeasurable {p : ℕ} (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : AEStronglyMeasurable (reflectionInverseL2Representative ψ) volume := by exact ((Lp.aestronglyMeasurable (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ ψ)).comp_quasiMeasurePreserving (reflectionInverseDilation_quasiMeasurePreserving p)).const_smul (angularPrefactor p)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseL2Representative_aestronglyMeasurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:36
theorem reflectionLp_energy_eq_enorm_sq Lemma reflectionLp_energy_eq_enorm_sq in the paper ↗

The squared energy of any L² representative is its squared extended norm.

Formal statement
p :
ℕ
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
(∫⁻ ω, ofReal (‖ψ ω‖ ^ 2)) = ‖ψ‖ₑ ^ 2
Proof (Lean source)
-- @node: reflectionLp_energy_eq_enorm_sq lemma reflectionLp_energy_eq_enorm_sq {p : ℕ} (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : (∫⁻ ω, ofReal (‖ψ ω‖ ^ 2)) = ‖ψ‖ₑ ^ 2 := by rw [Lp.enorm_def] simpa only [ENNReal.ofReal_pow (norm_nonneg _), ofReal_norm, ENNReal.rpow_two, NNReal.coe_ofNat, ENNReal.coe_ofNat] using (eLpNorm_nnreal_pow_eq_lintegral (f := fun ω => ψ ω) (μ := volume) (p := 2) (by norm_num)).symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionLp_energy_eq_enorm_sq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:46
theorem reflectionInverseL2Representative_energy

Spatial reflection, the exact Jacobian, and Fourier unitarity give the inverse energy with constant one for every L² frequency class.

Formal statement
p :
ℕ
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
(∫⁻ u, ofReal (‖reflectionInverseL2Representative ψ u‖ ^ 2))
= ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionInverseL2Representative_energy lemma reflectionInverseL2Representative_energy {p : ℕ} (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : (∫⁻ u, ofReal (‖reflectionInverseL2Representative ψ u‖ ^ 2)) = ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2) := by let F := Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ ψ have hd := l2Energy_normalized_dilation (fun u => F u) calc _ = ∫⁻ u, ofReal (‖Causalean.Mathlib.Analysis.Fourier.angularPrefactor p • F ((2 * pi)⁻¹ • u)‖ ^ 2) := (Measure.measurePreserving_neg volume).lintegral_comp_emb (MeasurableEquiv.neg _).measurableEmbedding _ _ = ∫⁻ u, ofReal (‖F u‖ ^ 2) := hd _ = ‖F‖ₑ ^ 2 := reflectionLp_energy_eq_enorm_sq F _ = ‖ψ‖ₑ ^ 2 := by congr 1 simpa only [F, ofReal_norm] using congrArg ofReal ((Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ).norm_map ψ) _ = _ := (reflectionLp_energy_eq_enorm_sq ψ).symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseL2Representative_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:57
theorem reflectionInverseL2Representative_memLp

The inverse representative has finite L² norm, without an L¹ premise.

Formal statement
p :
ℕ
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
Proof (Lean source)
-- @node: reflectionInverseL2Representative_memLp lemma reflectionInverseL2Representative_memLp {p : ℕ} (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : MemLp (reflectionInverseL2Representative ψ) 2 volume := by refine ⟨reflectionInverseL2Representative_aestronglyMeasurable ψ, ?_⟩ rw [eLpNorm_eq_lintegral_rpow_enorm_toReal (by norm_num) (by norm_num)] norm_num only [ENNReal.toReal_ofNat, ENNReal.rpow_two] simp only [← ofReal_norm, ← ENNReal.ofReal_pow (norm_nonneg _)] rw [reflectionInverseL2Representative_energy] exact ENNReal.rpow_lt_top_of_nonneg (by positivity) (l2Energy_lt_top_of_memLp (fun ω => ψ ω) (Lp.memLp ψ)).ne
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseL2Representative_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:81
theorem reflectionInverseL2Representative_sub

Subtraction of inverse representatives agrees almost everywhere with the inverse of the difference class; the a.e. Fourier identity is pulled through a map that preserves null sets.

Formal statement
p :
ℕ
ψ χ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
Proof (Lean source)
-- @node: reflectionInverseL2Representative_sub lemma reflectionInverseL2Representative_sub {p : ℕ} (ψ χ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : reflectionInverseL2Representative (ψ - χ) =ᵐ[volume] reflectionInverseL2Representative ψ - reflectionInverseL2Representative χ := by have h := (reflectionInverseDilation_quasiMeasurePreserving p).ae (Lp.coeFn_sub (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ ψ) (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ χ)) filter_upwards [h] with u hu simp only [reflectionInverseL2Representative, map_sub, hu, Pi.sub_apply, smul_sub]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseL2Representative_sub · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:95
theorem reflectionInverseL2Representative_difference_energy

The inverse map preserves the exact squared distance between frequency classes, including profiles with no integrable representative.

Formal statement
p :
ℕ
ψ χ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
(∫⁻ u, ofReal (‖reflectionInverseL2Representative ψ u - reflectionInverseL2Representative χ u‖ ^ 2))
= ∫⁻ ω, ofReal (‖ψ ω - χ ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionInverseL2Representative_difference_energy lemma reflectionInverseL2Representative_difference_energy {p : ℕ} (ψ χ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : (∫⁻ u, ofReal (‖reflectionInverseL2Representative ψ u - reflectionInverseL2Representative χ u‖ ^ 2)) = ∫⁻ ω, ofReal (‖ψ ω - χ ω‖ ^ 2) := by calc _ = ∫⁻ u, ofReal (‖reflectionInverseL2Representative (ψ - χ) u‖ ^ 2) := by apply lintegral_congr_ae filter_upwards [reflectionInverseL2Representative_sub ψ χ] with u hu rw [hu, Pi.sub_apply] _ = ∫⁻ ω, ofReal (‖(ψ - χ) ω‖ ^ 2) := reflectionInverseL2Representative_energy (ψ - χ) _ = _ := by apply lintegral_congr_ae filter_upwards [Lp.coeFn_sub ψ χ] with ω hω rw [hω, Pi.sub_apply]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseL2Representative_difference_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:110
theorem reflectionSmoothApproximation_ae_inverseL2Representative

Smooth inverse truncations agree with the inverse L² representative of their frequency truncation class. Under the stated conditions, the asserted mathematical result follows.

Formal statement
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_ae_inverseL2Representative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:130
theorem reflectionSmoothApproximation_inverseL2_error_energy

The spatial error relative to the full inverse L² class is exactly the frequency truncation error, even when the full frequency profile is not L¹. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
(∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u - reflectionInverseL2Representative (hψ.toLp ψ) u‖ ^ 2))
= ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ R ω - ψ ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_inverseL2_error_energy lemma reflectionSmoothApproximation_inverseL2_error_energy {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : (∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u - reflectionInverseL2Representative (hψ.toLp ψ) u‖ ^ 2)) = ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ R ω - ψ ω‖ ^ 2) := by calc _ = ∫⁻ u, ofReal (‖reflectionInverseL2Representative ((reflectionFrequencyTruncation_memLp hψ R).toLp (reflectionFrequencyTruncation ψ R)) u - reflectionInverseL2Representative (hψ.toLp ψ) u‖ ^ 2) := by apply lintegral_congr_ae filter_upwards [reflectionSmoothApproximation_ae_inverseL2Representative hψ R] with u hu rw [hu] _ = ∫⁻ ω, ofReal (‖((reflectionFrequencyTruncation_memLp hψ R).toLp (reflectionFrequencyTruncation ψ R)) ω - (hψ.toLp ψ) ω‖ ^ 2) := reflectionInverseL2Representative_difference_energy _ _ _ = _ := by apply lintegral_congr_ae filter_upwards [(reflectionFrequencyTruncation_memLp hψ R).coeFn_toLp, hψ.coeFn_toLp] with ω hω hω' rw [hω, hω']
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_inverseL2_error_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:141
theorem reflectionSmoothApproximation_tendsto_inverseL2Representative

The genuine smooth inverse truncations converge to the explicit inverse Fourier L² class of every measurable square-integrable frequency profile. No integrability assumption on the full frequency profile is used. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 ((reflectionInverseL2Representative_memLp (hψ.toLp ψ)).toLp (reflectionInverseL2Representative (hψ.toLp ψ))))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_tendsto_inverseL2Representative lemma reflectionSmoothApproximation_tendsto_inverseL2Representative {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) : Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 ((reflectionInverseL2Representative_memLp (hψ.toLp ψ)).toLp (reflectionInverseL2Representative (hψ.toLp ψ)))) := by apply (Lp.tendsto_Lp_iff_tendsto_eLpNorm'' (fun n : ℕ => reflectionSmoothApproximation ψ (n : ℝ)) (fun n => reflectionSmoothApproximation_memLp hψ (n : ℝ)) (reflectionInverseL2Representative (hψ.toLp ψ)) (reflectionInverseL2Representative_memLp (hψ.toLp ψ))).mpr have he : Tendsto (fun n : ℕ => ∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ (n : ℝ) u - reflectionInverseL2Representative (hψ.toLp ψ) u‖ ^ 2)) atTop (𝓝 0) := by simpa only [reflectionSmoothApproximation_inverseL2_error_energy hψ] using reflectionFrequencyTruncation_error_tendsto hm hψ have hr := (ENNReal.continuous_rpow_const (y := (1 / 2 : ℝ))).tendsto 0 |>.comp he norm_num at hr convert hr using 1 funext n rw [eLpNorm_eq_lintegral_rpow_enorm_toReal (by norm_num) (by norm_num)] congr 1 norm_num only [ENNReal.toReal_ofNat, Pi.sub_apply, ENNReal.rpow_two]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_tendsto_inverseL2Representative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:170
theorem reflectionSmoothApproximation_limit_ae_inverseL2Representative

Every completeness limit of the inverse truncations is the explicit normalized reflected Fourier representative for an arbitrary measurable L² profile. This identifies the limit used in roadmap (3). Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
MemLp ψ 2 volume
H :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
hH :
Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 H)
H =ᵐ[volume] reflectionInverseL2Representative (hψ.toLp ψ)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_limit_ae_inverseL2Representative lemma reflectionSmoothApproximation_limit_ae_inverseL2Representative {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) (H : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) (hH : Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 H)) : H =ᵐ[volume] reflectionInverseL2Representative (hψ.toLp ψ) := by have hident := tendsto_nhds_unique hH (reflectionSmoothApproximation_tendsto_inverseL2Representative hm hψ) rw [hident] exact MemLp.coeFn_toLp (reflectionInverseL2Representative_memLp (hψ.toLp ψ))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_limit_ae_inverseL2Representative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:199

L² class norms recover the squared energy of the supplied representative. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hf :
‖hf.toLp f‖ ^ 2 = (∫⁻ u, ofReal (‖f u‖ ^ 2)).toReal
Proof (Lean source)
-- @node: reflectionToLp_norm_sq lemma reflectionToLp_norm_sq {p : ℕ} {f : EuclideanSpace ℝ (Fin p) → ℂ} (hf : MemLp f 2 volume) : ‖hf.toLp f‖ ^ 2 = (∫⁻ u, ofReal (‖f u‖ ^ 2)).toReal := by have he := reflectionLp_energy_eq_enorm_sq (hf.toLp f) have hc : (∫⁻ u, ofReal (‖(hf.toLp f) u‖ ^ 2)) = ∫⁻ u, ofReal (‖f u‖ ^ 2) := by apply lintegral_congr_ae filter_upwards [hf.coeFn_toLp] with u hu rw [hu] rw [hc] at he simpa using (congrArg toReal he).symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionToLp_norm_sq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:215

The L² inner product is the genuine sesquilinear integral of representatives. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hf :
hg :
inner ℂ (hf.toLp f) (hg.toLp g) = ∫ u, star (f u) * g u
Proof (Lean source)
-- @node: reflectionToLp_inner lemma reflectionToLp_inner {p : ℕ} {f g : EuclideanSpace ℝ (Fin p) → ℂ} (hf : MemLp f 2 volume) (hg : MemLp g 2 volume) : inner ℂ (hf.toLp f) (hg.toLp g) = ∫ u, star (f u) * g u := by rw [L2.inner_def] apply integral_congr_ae filter_upwards [hf.coeFn_toLp, hg.coeFn_toLp] with u hfu hgu simp [hfu, hgu, RCLike.inner_apply, mul_comm]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionToLp_inner · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:229
theorem reflectionSmoothApproximation_original_error_norm_sq

Adjoint pairing and Plancherel give the exact spatial error of a smooth inverse truncation of the Fourier profile of an L¹∩L² extension. The full Fourier profile need not be integrable. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hG1 :
hG2 :
R :
ℝ
hF :
Proof (Lean source)
-- @node: reflectionSmoothApproximation_original_error_norm_sq lemma reflectionSmoothApproximation_original_error_norm_sq {p : ℕ} {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) (R : ℝ) : let hF : MemLp (Fourier G) 2 volume := angularFourier_memLp G hG1 hG2 ‖hG2.toLp G - (reflectionSmoothApproximation_memLp hF R).toLp (reflectionSmoothApproximation (Fourier G) R)‖ ^ 2 = ‖hF.toLp (Fourier G) - (reflectionFrequencyTruncation_memLp hF R).toLp (reflectionFrequencyTruncation (Fourier G) R)‖ ^ 2 := by dsimp only let hF : MemLp (Fourier G) 2 volume := angularFourier_memLp G hG1 hG2 rw [norm_sub_sq (𝕜 := ℂ), norm_sub_sq (𝕜 := ℂ)] have hzero : ‖hG2.toLp G‖ ^ 2 = ‖hF.toLp (Fourier G)‖ ^ 2 := by rw [reflectionToLp_norm_sq, reflectionToLp_norm_sq] exact congrArg toReal (angular_plancherel_integral G hG1 hG2).symm have hcut : ‖(reflectionSmoothApproximation_memLp hF R).toLp (reflectionSmoothApproximation (Fourier G) R)‖ ^ 2 = ‖(reflectionFrequencyTruncation_memLp hF R).toLp (reflectionFrequencyTruncation (Fourier G) R)‖ ^ 2 := by rw [reflectionToLp_norm_sq, reflectionToLp_norm_sq] exact congrArg toReal (reflectionSmoothApproximation_energy hF R) have hinner : inner ℂ (hG2.toLp G) ((reflectionSmoothApproximation_memLp hF R).toLp (reflectionSmoothApproximation (Fourier G) R)) = inner ℂ (hF.toLp (Fourier G)) ((reflectionFrequencyTruncation_memLp hF R).toLp (reflectionFrequencyTruncation (Fourier G) R)) := by rw [reflectionToLp_inner, reflectionToLp_inner] exact reflectionSmoothApproximation_adjoint_pairing hF hG1 R rw [hzero, hcut, hinner]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_original_error_norm_sq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:240
theorem reflectionFrequencyTruncation_tendsto_L2

The actual frequency truncation classes converge to the original frequency class in L², using the proved dominated-convergence error estimate. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
Tendsto (fun n : ℕ => (reflectionFrequencyTruncation_memLp hψ (n : ℝ)).toLp (reflectionFrequencyTruncation ψ (n : ℝ))) atTop (𝓝 (hψ.toLp ψ))
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_tendsto_L2 lemma reflectionFrequencyTruncation_tendsto_L2 {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) : Tendsto (fun n : ℕ => (reflectionFrequencyTruncation_memLp hψ (n : ℝ)).toLp (reflectionFrequencyTruncation ψ (n : ℝ))) atTop (𝓝 (hψ.toLp ψ)) := by apply (Lp.tendsto_Lp_iff_tendsto_eLpNorm'' (fun n : ℕ => reflectionFrequencyTruncation ψ (n : ℝ)) (fun n => reflectionFrequencyTruncation_memLp hψ (n : ℝ)) ψ hψ).mpr have hr := (ENNReal.continuous_rpow_const (y := (1 / 2 : ℝ))).tendsto 0 |>.comp (reflectionFrequencyTruncation_error_tendsto hm hψ) norm_num at hr convert hr using 1 funext n rw [eLpNorm_eq_lintegral_rpow_enorm_toReal (by norm_num) (by norm_num)] congr 1 norm_num only [ENNReal.toReal_ofNat, Pi.sub_apply, ENNReal.rpow_two]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_tendsto_L2 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:277
theorem reflectionSmoothApproximation_tendsto_original

The inverse truncations of an extension's angular Fourier profile converge to that very extension in spatial L². Adjoint pairing supplies the cross term and Plancherel supplies both norms, so no Fourier inversion integrability gate is imposed on the untruncated profile. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hG1 :
hG2 :
hF :
Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hF (n : ℝ)).toLp (reflectionSmoothApproximation (Fourier G) (n : ℝ))) atTop (𝓝 (hG2.toLp G))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_tendsto_original lemma reflectionSmoothApproximation_tendsto_original {p : ℕ} {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) : let hF : MemLp (Fourier G) 2 volume := Causalean.Mathlib.Analysis.Fourier.angularFourier_memLp G hG1 hG2 Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hF (n : ℝ)).toLp (reflectionSmoothApproximation (Fourier G) (n : ℝ))) atTop (𝓝 (hG2.toLp G)) := by dsimp only let hF : MemLp (Fourier G) 2 volume := Causalean.Mathlib.Analysis.Fourier.angularFourier_memLp G hG1 hG2 have hm : Measurable (Fourier G) := angularFourier_measurable G hG1 have ht := tendsto_iff_dist_tendsto_zero.mp (reflectionFrequencyTruncation_tendsto_L2 hm hF) apply tendsto_iff_dist_tendsto_zero.mpr convert ht using 1 funext n rw [dist_comm, dist_eq_norm, dist_comm, dist_eq_norm] exact (sq_eq_sq₀ (norm_nonneg _) (norm_nonneg _)).mp (reflectionSmoothApproximation_original_error_norm_sq hG1 hG2 (n : ℝ))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_tendsto_original · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:297
theorem reflectionInverseL2Representative_fourier_ae_original

The explicit inverse L² representative recovers every admissible extension from its genuine angular Fourier profile. This completes the original-extension identification in reflection-budget roadmap (3). Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hG1 :
hG2 :
hF :
Proof (Lean source)
-- @node: reflectionInverseL2Representative_fourier_ae_original lemma reflectionInverseL2Representative_fourier_ae_original {p : ℕ} {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) : let hF : MemLp (Fourier G) 2 volume := Causalean.Mathlib.Analysis.Fourier.angularFourier_memLp G hG1 hG2 reflectionInverseL2Representative (hF.toLp (Fourier G)) =ᵐ[volume] G := by dsimp only let hF : MemLp (Fourier G) 2 volume := Causalean.Mathlib.Analysis.Fourier.angularFourier_memLp G hG1 hG2 have hm : Measurable (Fourier G) := angularFourier_measurable G hG1 exact (reflectionSmoothApproximation_limit_ae_inverseL2Representative hm hF (hG2.toLp G) (reflectionSmoothApproximation_tendsto_original hG1 hG2)).symm.trans hG2.coeFn_toLp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseL2Representative_fourier_ae_original · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInverseLimit.lean:323
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionInversePairing 13 declarations Fubini transfers the normalized inverse angular integral to an integrable test function.

Test-function pairing for the inverse truncations

Fubini transfers the normalized inverse angular integral to an integrable test function. This is the adjoint-identification step in reflection-budget roadmap (3).

theorem reflectionInversePairing_integrable Lemma reflectionInversePairing_integrable in the paper ↗

Absolute integrability of the two-variable inverse pairing kernel. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
hφ :
Integrable (fun z : EuclideanSpace ℝ (Fin p) × EuclideanSpace ℝ (Fin p) => exp (I * ((∑ j, z.2 j * z.1 j : ℝ) : ℂ)) * (φ z.1 * ψ z.2)) (volume.prod volume)
Proof (Lean source)
-- @node: reflectionInversePairing_integrable lemma reflectionInversePairing_integrable {p : ℕ} {ψ φ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : Integrable ψ volume) (hφ : Integrable φ volume) : Integrable (fun z : EuclideanSpace ℝ (Fin p) × EuclideanSpace ℝ (Fin p) => exp (I * ((∑ j, z.2 j * z.1 j : ℝ) : ℂ)) * (φ z.1 * ψ z.2)) (volume.prod volume) := by have hc : Continuous (fun z : EuclideanSpace ℝ (Fin p) × EuclideanSpace ℝ (Fin p) => exp (I * ((∑ j, z.2 j * z.1 j : ℝ) : ℂ))) := by fun_prop exact (hφ.mul_prod hψ).bdd_mul (c := 1) hc.aestronglyMeasurable (Eventually.of_forall fun z => by simp [Complex.norm_exp])
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInversePairing_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:16
theorem reflectionInverseIntegral_pairing Lemma reflectionInverseIntegral_pairing in the paper ↗

Bilinear pairing with an inverse integral transfers the inverse transform to an arbitrary L¹ test. No L¹ assumption on the inverse integral is needed. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
hφ :
(∫ u, φ u * Fourier ψ (-u)) = ∫ ω, Fourier φ (-ω) * ψ ω
Proof (Lean source)
-- @node: reflectionInverseIntegral_pairing lemma reflectionInverseIntegral_pairing {p : ℕ} {ψ φ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : Integrable ψ volume) (hφ : Integrable φ volume) : (∫ u, φ u * Fourier ψ (-u)) = ∫ ω, Fourier φ (-ω) * ψ ω := by have hswap := integral_integral_swap (f := fun u ω => exp (I * ((∑ j, ω j * u j : ℝ) : ℂ)) * (φ u * ψ ω)) (reflectionInversePairing_integrable hψ hφ) unfold Fourier simp only [PiLp.neg_apply, neg_mul, Finset.sum_neg_distrib, Complex.ofReal_neg, mul_neg, neg_neg] simp only [mul_smul_comm, smul_mul_assoc] simp_rw [← integral_const_mul, ← integral_mul_const] simp only [integral_smul] congr 1 convert hswap using 1 <;> congr 1 <;> funext x <;> congr 1 <;> funext y · simp only [mul_comm, mul_left_comm, mul_assoc] · simp only [mul_comm, mul_assoc]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseIntegral_pairing · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:30
theorem reflectionSmoothApproximation_pairing

The actual ball-truncated smooth inverse integrals satisfy the test pairing used to identify their spatial L² limit in the endpoint proof. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
hφ :
R :
ℝ
(∫ u, φ u * reflectionSmoothApproximation ψ R u)
= ∫ ω, Fourier φ (-ω) * reflectionFrequencyTruncation ψ R ω
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_pairing · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:51
theorem reflectionFourier_conj_neg Lemma reflectionFourier_conj_neg in the paper ↗

Conjugation exchanges the forward angular kernel and the inverse kernel. The real unitary prefactor is unchanged. The asserted mathematical result follows.

Formal statement
p :
ℕ
φ :
EuclideanSpace ℝ (Fin p) → ℂ
ω :
Fourier (fun u => star (φ u)) (-ω) = star (Fourier φ ω)
Proof (Lean source)
-- @node: reflectionFourier_conj_neg lemma reflectionFourier_conj_neg {p : ℕ} (φ : EuclideanSpace ℝ (Fin p) → ℂ) (ω : EuclideanSpace ℝ (Fin p)) : Fourier (fun u => star (φ u)) (-ω) = star (Fourier φ ω) := by unfold Fourier rw [star_smul] simp only [star_trivial, Complex.star_def] rw [← integral_conj] simp only [PiLp.neg_apply, neg_mul, Finset.sum_neg_distrib, Complex.ofReal_neg, mul_neg, neg_neg] congr 1 apply integral_congr_ae filter_upwards [] with u simp [map_mul, ← Complex.exp_conj]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFourier_conj_neg · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:61
theorem reflectionInverseIntegral_adjoint_pairing Lemma reflectionInverseIntegral_adjoint_pairing in the paper ↗

Sesquilinear pairing identifies the inverse integral with the adjoint of the angular transform on integrable tests. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
hφ :
(∫ u, star (φ u) * Fourier ψ (-u)) = ∫ ω, star (Fourier φ ω) * ψ ω
Proof (Lean source)
-- @node: reflectionInverseIntegral_adjoint_pairing lemma reflectionInverseIntegral_adjoint_pairing {p : ℕ} {ψ φ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : Integrable ψ volume) (hφ : Integrable φ volume) : (∫ u, star (φ u) * Fourier ψ (-u)) = ∫ ω, star (Fourier φ ω) * ψ ω := by have hc : Integrable (fun u => star (φ u)) volume := by exact hφ.mono (by fun_prop) (Eventually.of_forall fun u => by simp) have h := reflectionInverseIntegral_pairing hψ hc simpa only [reflectionFourier_conj_neg] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseIntegral_adjoint_pairing · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:78
theorem reflectionSmoothApproximation_adjoint_pairing

The smooth truncations obey the exact adjoint pairing, with the genuine Fourier ball cutoff and the paper's unitary angular normalization. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
hφ :
R :
ℝ
(∫ u, star (φ u) * reflectionSmoothApproximation ψ R u)
= ∫ ω, star (Fourier φ ω) * reflectionFrequencyTruncation ψ R ω
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_adjoint_pairing · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:91
theorem reflectionInverseIntegral_ae_L2 Lemma reflectionInverseIntegral_ae_L2 in the paper ↗

The inverse integral of an L¹∩L² frequency profile agrees with the reflected, normalized dilation of Mathlib's actual Fourier L² representative. Pulling the a.e. identity through negation is justified by measure preservation. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ1 :
hψ2 :
(fun u => Fourier ψ (-u))
=ᵐ[volume] (fun u => angularPrefactor p • (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ (hψ2.toLp ψ)) ((2 * pi)⁻¹ • (-u)))
Proof (Lean source)
-- @node: reflectionInverseIntegral_ae_L2 lemma reflectionInverseIntegral_ae_L2 {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ1 : Integrable ψ volume) (hψ2 : MemLp ψ 2 volume) : (fun u => Fourier ψ (-u)) =ᵐ[volume] (fun u => angularPrefactor p • (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ (hψ2.toLp ψ)) ((2 * pi)⁻¹ • (-u))) := by exact (Measure.measurePreserving_neg volume).quasiMeasurePreserving.ae (angularFourier_ae_L2 ψ hψ1 hψ2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseIntegral_ae_L2 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:102
theorem reflectionSmoothApproximation_ae_L2

Each constructed truncation has the L² representative required for adjoint identification; no integrability of its spatial inverse is assumed. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
=ᵐ[volume] (fun u => angularPrefactor p • (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ ((reflectionFrequencyTruncation_memLp hψ R).toLp (reflectionFrequencyTruncation ψ R))) ((2 * pi)⁻¹ • (-u)))
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_ae_L2 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:116
theorem reflectionFrequencyTruncation_error_tendsto

Unweighted frequency truncation error vanishes for every measurable L² profile. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ :
Tendsto (fun n : ℕ => ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2)) atTop (𝓝 0)
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_error_tendsto lemma reflectionFrequencyTruncation_error_tendsto {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ : MemLp ψ 2 volume) : Tendsto (fun n : ℕ => ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2)) atTop (𝓝 0) := by simpa only [Real.rpow_zero, mul_one] using reflectionFrequencyTruncation_weighted_error_tendsto 0 hm (by simpa only [l2Energy, Real.rpow_zero, mul_one] using (l2Energy_lt_top_of_memLp ψ hψ).ne)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_error_tendsto · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:130
theorem reflectionSmoothApproximation_inverse_error_energy

For an L¹∩L² profile the spatial error relative to its actual inverse integral has exactly the frequency truncation error, with unit constant. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ1 :
hψ2 :
R :
ℝ
(∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u - Fourier ψ (-u)‖ ^ 2))
= ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ R ω - ψ ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_inverse_error_energy lemma reflectionSmoothApproximation_inverse_error_energy {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ1 : Integrable ψ volume) (hψ2 : MemLp ψ 2 volume) (R : ℝ) : (∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u - Fourier ψ (-u)‖ ^ 2)) = ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ R ω - ψ ω‖ ^ 2) := reflectionInverseIntegral_difference_energy (reflectionFrequencyTruncation_integrable hψ2 R) (reflectionFrequencyTruncation_memLp hψ2 R) hψ1 hψ2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_inverse_error_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:142
theorem reflectionSmoothApproximation_inverse_error_tendsto

The smooth inverses converge in squared spatial L² error to the actual inverse integral whenever the profile is L¹∩L². Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ1 :
hψ2 :
Tendsto (fun n : ℕ => ∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ (n : ℝ) u - Fourier ψ (-u)‖ ^ 2)) atTop (𝓝 0)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_inverse_error_tendsto lemma reflectionSmoothApproximation_inverse_error_tendsto {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ1 : Integrable ψ volume) (hψ2 : MemLp ψ 2 volume) : Tendsto (fun n : ℕ => ∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ (n : ℝ) u - Fourier ψ (-u)‖ ^ 2)) atTop (𝓝 0) := by simpa only [reflectionSmoothApproximation_inverse_error_energy hψ1 hψ2] using reflectionFrequencyTruncation_error_tendsto hm hψ2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_inverse_error_tendsto · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:155
theorem reflectionSmoothApproximation_tendsto_inverse_L2

The limit in spatial L² is the class of the genuine inverse integral, rather than an unidentified completeness witness, for L¹∩L² profiles. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ1 :
hψ2 :
Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ2 (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 ((reflectionInverseIntegral_memLp hψ1 hψ2).toLp (fun u => Fourier ψ (-u))))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_tendsto_inverse_L2 lemma reflectionSmoothApproximation_tendsto_inverse_L2 {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ1 : Integrable ψ volume) (hψ2 : MemLp ψ 2 volume) : Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ2 (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 ((reflectionInverseIntegral_memLp hψ1 hψ2).toLp (fun u => Fourier ψ (-u)))) := by apply (Lp.tendsto_Lp_iff_tendsto_eLpNorm'' (fun n : ℕ => reflectionSmoothApproximation ψ (n : ℝ)) (fun n => reflectionSmoothApproximation_memLp hψ2 (n : ℝ)) (fun u => Fourier ψ (-u)) (reflectionInverseIntegral_memLp hψ1 hψ2)).mpr have he := reflectionSmoothApproximation_inverse_error_tendsto hm hψ1 hψ2 have hr := (ENNReal.continuous_rpow_const (y := (1 / 2 : ℝ))).tendsto 0 |>.comp he norm_num at hr convert hr using 1 funext n rw [eLpNorm_eq_lintegral_rpow_enorm_toReal (by norm_num) (by norm_num)] congr 1 norm_num only [ENNReal.toReal_ofNat, Pi.sub_apply, ENNReal.rpow_two]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_tendsto_inverse_L2 · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:167
theorem reflectionSmoothApproximation_limit_ae_inverse

Any spatial L² limit produced by completeness has the normalized reflected Mathlib Fourier representative for an L¹∩L² frequency profile. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hm :
hψ1 :
Integrable ψ volume
hψ2 :
MemLp ψ 2 volume
H :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
hH :
Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ2 (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 H)
H
=ᵐ[volume] (fun u => angularPrefactor p • (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ (hψ2.toLp ψ)) ((2 * pi)⁻¹ • (-u)))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_limit_ae_inverse lemma reflectionSmoothApproximation_limit_ae_inverse {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hm : Measurable ψ) (hψ1 : Integrable ψ volume) (hψ2 : MemLp ψ 2 volume) (H : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) (hH : Tendsto (fun n : ℕ => (reflectionSmoothApproximation_memLp hψ2 (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ))) atTop (𝓝 H)) : H =ᵐ[volume] (fun u => angularPrefactor p • (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ (hψ2.toLp ψ)) ((2 * pi)⁻¹ • (-u))) := by have hident := tendsto_nhds_unique hH (reflectionSmoothApproximation_tendsto_inverse_L2 hm hψ1 hψ2) rw [hident] exact (MemLp.coeFn_toLp (reflectionInverseIntegral_memLp hψ1 hψ2)).trans (reflectionInverseIntegral_ae_L2 hψ1 hψ2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_limit_ae_inverse · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionInversePairing.lean:190
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionKernel 3 declarations Tonelli transports an arbitrary Borel sign kernel through the reflected sampling law, then averages the pointwise common-shift Parseval identity.

Kernel averages of the common-shift identity

Tonelli transports an arbitrary Borel sign kernel through the reflected sampling law, then averages the pointwise common-shift Parseval identity. No fairness assumption is needed.

[ The reflected representative is Borel, including at the fold endpoints. This uses the hm hypothesis, the stated conclusion.

Formal statement
d :
ℕ
Cube d → ℝ
hm :
Proof (Lean source)
-- @node: reflExt_measurable @[fun_prop] lemma reflExt_measurable {d : ℕ} {m : Cube d → ℝ} (hm : Measurable m) : Measurable (reflExt m) := by apply Complex.measurable_ofReal.comp apply hm.comp unfold fold apply measurable_pi_lambda intro j exact (measurable_const.mul ((AddCircle.measurableEquivIco (1 : ℝ) 0).measurable.comp (measurable_pi_apply j)).subtype_val) |>.min (measurable_const.sub (measurable_const.mul ((AddCircle.measurableEquivIco (1 : ℝ) 0).measurable.comp (measurable_pi_apply j)).subtype_val))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflExt_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionKernel.lean:17
theorem commonShift_kernel_parseval

Averaging common-shift Parseval against any Borel sign kernel.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n d :
ℕ
hd :
0 < d
m :
ρ :
(∫⁻ wt, ∫⁻ z, ofReal ‖∑ i, (sgn (z i) : ℂ) * reflExt m.val (wt.1 i - wt.2)‖ ^ 2 ∂ρ wt.1 ∂(Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d))
= ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2 * ∫⁻ w, ∫⁻ z, ofReal ‖∑ i, (sgn (z i) : ℂ) * ek k (w i)‖ ^ 2 ∂ρ w ∂Measure.pi (fun _ : Fin n => torusMeasure d)
Proof (Lean source)
-- @node: commonShift_kernel_parseval lemma commonShift_kernel_parseval {n d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) (ρ : Kernel (Fin n → Torus d) (Signs n)) [IsMarkovKernel ρ] : (∫⁻ wt, ∫⁻ z, ofReal ‖∑ i, (sgn (z i) : ℂ) * reflExt m.val (wt.1 i - wt.2)‖ ^ 2 ∂ρ wt.1 ∂(Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d)) = ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2 * ∫⁻ w, ∫⁻ z, ofReal ‖∑ i, (sgn (z i) : ℂ) * ek k (w i)‖ ^ 2 ∂ρ w ∂Measure.pi (fun _ : Fin n => torusMeasure d) := by have hm := reflExt_measurable m.property.1 have he (k : Fin d → ℤ) : Measurable (ek k) := (mFourier k).continuous.measurable have hmeas : Measurable (fun p : ((Fin n → Torus d) × Torus d) × Signs n => ofReal ‖∑ i, (sgn (p.2 i) : ℂ) * reflExt m.val (p.1.1 i - p.1.2)‖ ^ 2) := by fun_prop rw [lintegral_prod] · have hswap (w : Fin n → Torus d) : (∫⁻ t, ∫⁻ z, ofReal ‖∑ i, (sgn (z i) : ℂ) * reflExt m.val (w i - t)‖ ^ 2 ∂ρ w ∂torusMeasure d) = ∫⁻ z, ∫⁻ t, ofReal ‖∑ i, (sgn (z i) : ℂ) * reflExt m.val (w i - t)‖ ^ 2 ∂torusMeasure d ∂ρ w := by apply lintegral_lintegral_swap exact (hmeas.comp (by fun_prop : Measurable (fun p : Torus d × Signs n => ((w, p.1), p.2)))).aemeasurable simp_rw [hswap] simp_rw [commonShift_parseval_lintegral hd (reflExt m.val) (reflExt_memLp m), mFourierCoeff_reflExt] change (∫⁻ w, ∫⁻ z, ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2 * ofReal ‖∑ i, (sgn (z i) : ℂ) * ek k (w i)‖ ^ 2 ∂ρ w ∂Measure.pi (fun _ : Fin n => torusMeasure d)) = _ have hz (w : Fin n → Torus d) (k : Fin d → ℤ) : Measurable (fun z : Signs n => ofReal ‖Fhat m.val k‖ ^ 2 * ofReal ‖∑ i, (sgn (z i) : ℂ) * ek k (w i)‖ ^ 2) := by fun_prop simp_rw [lintegral_tsum (fun k => (hz _ k).aemeasurable)] rw [lintegral_tsum] · apply tsum_congr intro k have hfactor (w : Fin n → Torus d) : (∫⁻ z, ofReal ‖Fhat m.val k‖ ^ 2 * ofReal ‖∑ i, (sgn (z i) : ℂ) * ek k (w i)‖ ^ 2 ∂ρ w) = ofReal ‖Fhat m.val k‖ ^ 2 * ∫⁻ z, ofReal ‖∑ i, (sgn (z i) : ℂ) * ek k (w i)‖ ^ 2 ∂ρ w := lintegral_const_mul' _ _ (by finiteness) simp_rw [hfactor] exact lintegral_const_mul' _ _ (by finiteness) · intro k have hk : Measurable (fun p : (Fin n → Torus d) × Signs n => ofReal ‖Fhat m.val k‖ ^ 2 * ofReal ‖∑ i, (sgn (p.2 i) : ℂ) * ek k (p.1 i)‖ ^ 2) := by fun_prop exact hk.lintegral_kernel_prod_right'.aemeasurable · let hρ : Kernel ((Fin n → Torus d) × Torus d) (Signs n) := ρ.comap fst measurable_fst exact (hmeas.lintegral_kernel_prod_right' (κ := hρ)).aemeasurable
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.commonShift_kernel_parseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionKernel.lean:32
theorem reflection_kernel_fourier_identity

The original outcome imbalance has the Fourier kernel-average representation. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
Ω :
μ :
X :
Ω → Covariates n d
hX :
ρ :
(∫⁻ ω, ∫⁻ z, ofReal |∑ i, sgn (z i) * m.val (X ω.1 i)| ^ 2 ∂ρ (shiftedSample (X ω.1) ω.2.1 ω.2.2) ∂μ.prod ((reflectionLaw n d).prod (torusMeasure d)))
= ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2 * ∫⁻ w, ∫⁻ z, ofReal ‖∑ i, (sgn (z i) : ℂ) * ek k (w i)‖ ^ 2 ∂ρ w ∂Measure.pi (fun _ : Fin n => torusMeasure d)
Proof (Lean source)
-- @node: reflection_kernel_fourier_identity lemma reflection_kernel_fourier_identity {n d : ℕ} (hd : 0 < d) (m : CenteredL2Fn d) (Ω : Type) [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → Covariates n d) (hX : UniformDraw μ X) (ρ : Kernel (Fin n → Torus d) (Signs n)) [IsMarkovKernel ρ] : (∫⁻ ω, ∫⁻ z, ofReal |∑ i, sgn (z i) * m.val (X ω.1 i)| ^ 2 ∂ρ (shiftedSample (X ω.1) ω.2.1 ω.2.2) ∂μ.prod ((reflectionLaw n d).prod (torusMeasure d))) = ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2 * ∫⁻ w, ∫⁻ z, ofReal ‖∑ i, (sgn (z i) : ℂ) * ek k (w i)‖ ^ 2 ∂ρ w ∂Measure.pi (fun _ : Fin n => torusMeasure d) := by let Φ : (((Fin n → Torus d) × Torus d) × (Fin n → ℝ)) → ℝ≥0∞ := fun p => ∫⁻ z, ofReal |∑ i, sgn (z i) * p.2 i| ^ 2 ∂ρ p.1.1 have hΦ : Measurable Φ := by let hρ : Kernel (((Fin n → Torus d) × Torus d) × (Fin n → ℝ)) (Signs n) := ρ.comap (fun p => p.1.1) (measurable_fst.comp measurable_fst) have hq : Measurable (fun q : ((((Fin n → Torus d) × Torus d) × (Fin n → ℝ)) × Signs n) => ofReal |∑ i, sgn (q.2 i) * q.1.2 i| ^ 2) := by fun_prop exact hq.lintegral_kernel_prod_right' (κ := hρ) rw [show (∫⁻ ω, ∫⁻ z, ofReal |∑ i, sgn (z i) * m.val (X ω.1 i)| ^ 2 ∂ρ (shiftedSample (X ω.1) ω.2.1 ω.2.2) ∂μ.prod ((reflectionLaw n d).prod (torusMeasure d))) = ∫⁻ wt, Φ (wt, fun i => (reflExt m.val (wt.1 i - wt.2)).re) ∂(Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d) from reflection_lintegral_transport n d Ω μ X hX m.val m.property.1 Φ hΦ] have hreal (w : Fin n → Torus d) (t : Torus d) (z : Signs n) : |∑ i, sgn (z i) * (reflExt m.val (w i - t)).re| = ‖∑ i, (sgn (z i) : ℂ) * reflExt m.val (w i - t)‖ := by simp only [reflExt, Complex.ofReal_re, ← Complex.ofReal_mul, ← Complex.ofReal_sum, Complex.norm_real, Real.norm_eq_abs] simp only [Φ, hreal] exact commonShift_kernel_parseval hd m ρ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflection_kernel_fourier_identity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionKernel.lean:90
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionLaw 3 declarations This file proves that independent cube coordinates, independently reflected into the two halves of the circle and then translated by a common Haar element, give an iid Haar sample that is independent of the translating e

Law of the reflected and shifted sample

This file proves that independent cube coordinates, independently reflected into the two halves of the circle and then translated by a common Haar element, give an iid Haar sample that is independent of the translating element.

[ One fair reflection coin lifts a cube coordinate into the period-two circle.

Definition (Lean source)
x :
ℝ
b :
reflectedCoordinate x b :
((if b then (2 - x) / 2 else x / 2 : ℝ) : UnitAddCircle)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectedCoordinate · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionLaw.lean:18
theorem cubeReflection_map

Independent fair coordinate reflections send cube probability to normalized Haar measure.](goal) This uses the stated conclusion.

Formal statement
d :
ℕ
((cubeMeasure d).prod (uniformOfFintype (Fin d → Bool)).toMeasure).map (fun z j => reflectedCoordinate (z.1 j) (z.2 j))
Proof (Lean source)
-- @node: cubeReflection_map lemma cubeReflection_map (d : ℕ) : ((cubeMeasure d).prod (uniformOfFintype (Fin d → Bool)).toMeasure).map (fun z j => reflectedCoordinate (z.1 j) (z.2 j)) = torusMeasure d := by rw [cubeMeasure, uniformBoolFun_measure] have hscalar : MeasurePreserving (fun z : ℝ × Bool => reflectedCoordinate z.1 z.2) ((volume.restrict (Icc (0 : ℝ) 1)).prod (uniformOfFintype Bool).toMeasure) haarAddCircle := ⟨by unfold reflectedCoordinate apply AddCircle.measurable_mk'.comp apply Measurable.ite · exact measurable_snd (measurableSet_singleton true) · fun_prop · fun_prop, reflectedCoordinate_map⟩ have hunzip := (measurePreserving_arrowProdEquivProdArrow ℝ Bool (Fin d) (fun _ => volume.restrict (Icc (0 : ℝ) 1)) (fun _ => (uniformOfFintype Bool).toMeasure)).symm (MeasurableEquiv.arrowProdEquivProdArrow ℝ Bool (Fin d)) have hpi := measurePreserving_pi (fun _ : Fin d => (volume.restrict (Icc (0 : ℝ) 1)).prod (uniformOfFintype Bool).toMeasure) (fun _ : Fin d => haarAddCircle) (fun _ => hscalar) have h := hpi.comp hunzip change _ = Measure.pi (fun _ : Fin d => haarAddCircle) convert h.map_eq using 1 congr 1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cubeReflection_map · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionLaw.lean:149
theorem reflectionLaw_map_shiftedSample

Independent cube coordinates with independent fair reflections, followed by a common Haar shift, have the iid Haar product law and remain independent of that common shift. This uses the hX hypothesis, the stated conclusion.

Formal statement
n d :
ℕ
Ω :
μ :
X :
Ω → Covariates n d
hX :
(μ.prod ((reflectionLaw n d).prod (torusMeasure d))).map (fun ω => (shiftedSample (X ω.1) ω.2.1 ω.2.2, ω.2.2))
= (Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d)
Proof (Lean source)
theorem reflectionLaw_map_shiftedSample (n d : ℕ) (Ω : Type) [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → Covariates n d) (hX : UniformDraw μ X) : (μ.prod ((reflectionLaw n d).prod (torusMeasure d))).map (fun ω => (shiftedSample (X ω.1) ω.2.1 ω.2.2, ω.2.2)) = (Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d) := by let ν := Measure.pi (fun _ : Fin n => torusMeasure d) haveI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ haveI : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure infer_instance haveI : IsProbabilityMeasure (covLaw n d) := by unfold covLaw infer_instance haveI : IsProbabilityMeasure μ := ⟨by have hmass := congrArg (fun ρ : Measure (Covariates n d) => ρ univ) hX.2 simpa [Measure.map_apply_of_aemeasurable hX.1.aemeasurable] using hmass⟩ have hreflect : MeasurePreserving (fun z : Ω × ReflectionCoins n d => lift (X z.1) z.2) (μ.prod (reflectionLaw n d)) ν := by refine ⟨?_, reflectedSample_of_uniform μ X hX⟩ unfold lift apply measurable_pi_lambda intro i apply measurable_pi_lambda intro j apply AddCircle.measurable_mk'.comp apply Measurable.ite · have hi : Measurable (fun z : Ω × ReflectionCoins n d => z.2 i) := (measurable_pi_apply i).comp measurable_snd have hb : Measurable (fun z : Ω × ReflectionCoins n d => z.2 i j) := (measurable_pi_apply j).comp hi exact hb (measurableSet_singleton true) · have hXi : Measurable (fun z : Ω × ReflectionCoins n d => X z.1 i) := (measurable_pi_apply i).comp (hX.1.comp measurable_fst) have hXij : Measurable (fun z : Ω × ReflectionCoins n d => X z.1 i j) := (measurable_pi_apply j).comp hXi exact (measurable_const.sub hXij).div_const 2 · have hXi : Measurable (fun z : Ω × ReflectionCoins n d => X z.1 i) := (measurable_pi_apply i).comp (hX.1.comp measurable_fst) exact ((measurable_pi_apply j).comp hXi).div_const 2 have hgrouped := hreflect.prod (MeasurePreserving.id (torusMeasure d)) have hassoc := (measurePreserving_prodAssoc μ (reflectionLaw n d) (torusMeasure d)).symm (MeasurableEquiv.prodAssoc) have hseed := hgrouped.comp hassoc have h := (commonShift_preserving n d).comp hseed change _ = ν.prod (torusMeasure d) convert h.map_eq using 1 congr 1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionLaw_map_shiftedSample · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionLaw.lean:301
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionPlane 26 declarations The four reflected cells have matching function traces.

Two-dimensional reflected smooth endpoint

The four reflected cells have matching function traces. Slice integration by parts cancels all faces in each coordinate, and the signed gradient preserves the normalized spatial energy. These are the two-dimensional constructions in (4) and (5) of the exact-reflection-budget roadmap.

[ Even reflection in both coordinate directions.

Definition (Lean source)
f :
ℝ → ℝ → ℂ
x y :
ℝ
evenReflectionPlane f x y :
ℂ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:18

The first coordinate derivative has the reflected orientation sign.

Definition (Lean source)
f :
ℝ → ℝ → ℂ
x y :
ℝ
signedReflectionPlaneX f x y :
ℂ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneX · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:23

The second coordinate derivative has its own reflected orientation sign.

Definition (Lean source)
f :
ℝ → ℝ → ℂ
x y :
ℝ
signedReflectionPlaneY f x y :
ℂ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneY · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:28
theorem evenReflectionPlane_transpose

Coordinate transposition commutes with even reflection.](goal) This uses the stated conclusion.

Formal statement
f :
ℝ → ℝ → ℂ
x y :
ℝ
evenReflectionPlane f x y = evenReflectionPlane (fun u v => f v u) y x
Proof (Lean source)
-- @node: evenReflectionPlane_transpose lemma evenReflectionPlane_transpose (f : ℝ → ℝ → ℂ) (x y : ℝ) : evenReflectionPlane f x y = evenReflectionPlane (fun u v => f v u) y x := by simp only [evenReflectionPlane, evenReflectionSlice] split_ifs <;> rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_transpose · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:33
theorem signedReflectionPlaneY_transpose

Transposition exchanges the two reflected gradient coordinates.

Formal statement
f :
ℝ → ℝ → ℂ
x y :
ℝ
signedReflectionPlaneY f x y = signedReflectionPlaneX (fun u v => f v u) y x
Proof (Lean source)
-- @node: signedReflectionPlaneY_transpose lemma signedReflectionPlaneY_transpose (f : ℝ → ℝ → ℂ) (x y : ℝ) : signedReflectionPlaneY f x y = signedReflectionPlaneX (fun u v => f v u) y x := by simp only [signedReflectionPlaneY, signedReflectionPlaneX, evenReflectionSlice, signedReflectionSlice] split_ifs <;> rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneY_transpose · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:40
theorem evenReflectionPlane_slice_hasDerivAt

Reflection in the other coordinate preserves the smooth slice derivative. Under the stated conditions, the asserted mathematical result follows.

Formal statement
f fx :
ℝ → ℝ → ℂ
hf :
∀ x y, HasDerivAt (fun u => f u y) (fx x y) x
x y :
ℝ
HasDerivAt (fun u => evenReflectionSlice (f u) y) (evenReflectionSlice (fx x) y) x
Proof (Lean source)
-- @node: evenReflectionPlane_slice_hasDerivAt lemma evenReflectionPlane_slice_hasDerivAt {f fx : ℝ → ℝ → ℂ} (hf : ∀ x y, HasDerivAt (fun u => f u y) (fx x y) x) (x y : ℝ) : HasDerivAt (fun u => evenReflectionSlice (f u) y) (evenReflectionSlice (fx x) y) x := by by_cases hy : y ≤ 1 · simpa only [evenReflectionSlice, if_pos hy] using hf x y · simpa only [evenReflectionSlice, if_neg hy] using hf x (2 - y)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_slice_hasDerivAt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:48
theorem evenReflectionPlane_integration_by_parts_x

The first coordinate face cancellation is valid for every periodic smooth test slice. Under the stated conditions.

Formal statement
f fx :
ℝ → ℝ → ℂ
hf :
∀ x y, HasDerivAt (fun u => f u y) (fx x y) x
hfx :
Continuous fx.uncurry
y :
ℝ
v v' :
ℝ → ℂ
hv :
∀ x, HasDerivAt v (v' x) x
hv' :
hp :
v 2 = v 0
(∫ x in (0 : ℝ)..2, evenReflectionPlane f x y * v' x)
= -(∫ x in (0 : ℝ)..2, signedReflectionPlaneX fx x y * v x)
Proof (Lean source)
-- @node: evenReflectionPlane_integration_by_parts_x lemma evenReflectionPlane_integration_by_parts_x {f fx : ℝ → ℝ → ℂ} (hf : ∀ x y, HasDerivAt (fun u => f u y) (fx x y) x) (hfx : Continuous fx.uncurry) (y : ℝ) {v v' : ℝ → ℂ} (hv : ∀ x, HasDerivAt v (v' x) x) (hv' : Continuous v') (hp : v 2 = v 0) : (∫ x in (0 : ℝ)..2, evenReflectionPlane f x y * v' x) = -(∫ x in (0 : ℝ)..2, signedReflectionPlaneX fx x y * v x) := by apply evenReflectionSlice_integration_by_parts (fun x => evenReflectionPlane_slice_hasDerivAt hf x y) _ hv hv' hp by_cases hy : y ≤ 1 · simp only [evenReflectionSlice, if_pos hy] exact hfx.comp (continuous_id.prodMk continuous_const) · simp only [evenReflectionSlice, if_neg hy] exact hfx.comp (continuous_id.prodMk continuous_const)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_integration_by_parts_x · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:58
theorem evenReflectionPlane_integration_by_parts_y

The second coordinate cancels faces by the same construction, with no cube trace condition. Under the stated conditions.

Formal statement
f fy :
ℝ → ℝ → ℂ
hf :
∀ x y, HasDerivAt (f x) (fy x y) y
hfy :
Continuous fy.uncurry
x :
ℝ
v v' :
ℝ → ℂ
hv :
∀ y, HasDerivAt v (v' y) y
hv' :
hp :
v 2 = v 0
(∫ y in (0 : ℝ)..2, evenReflectionPlane f x y * v' y)
= -(∫ y in (0 : ℝ)..2, signedReflectionPlaneY fy x y * v y)
Proof (Lean source)
-- @node: evenReflectionPlane_integration_by_parts_y lemma evenReflectionPlane_integration_by_parts_y {f fy : ℝ → ℝ → ℂ} (hf : ∀ x y, HasDerivAt (f x) (fy x y) y) (hfy : Continuous fy.uncurry) (x : ℝ) {v v' : ℝ → ℂ} (hv : ∀ y, HasDerivAt v (v' y) y) (hv' : Continuous v') (hp : v 2 = v 0) : (∫ y in (0 : ℝ)..2, evenReflectionPlane f x y * v' y) = -(∫ y in (0 : ℝ)..2, signedReflectionPlaneY fy x y * v y) := by have he : (fun y => evenReflectionPlane f x y) = (fun y => evenReflectionPlane (fun u v => f v u) y x) := funext (evenReflectionPlane_transpose f x) have hd : (fun y => signedReflectionPlaneY fy x y) = (fun y => signedReflectionPlaneX (fun u v => fy v u) y x) := funext (signedReflectionPlaneY_transpose fy x) change (∫ y in (0 : ℝ)..2, (fun y => evenReflectionPlane f x y) y * v' y) = _ rw [he] change _ = -(∫ y in (0 : ℝ)..2, (fun y => signedReflectionPlaneY fy x y) y * v y) rw [hd] exact evenReflectionPlane_integration_by_parts_x (fun u v => hf v u) (hfy.comp continuous_swap) x hv hv' hp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_integration_by_parts_y · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:74
theorem signedReflectionPlaneX_slice_fourierCoeff

In the first coordinate the character test gives the exact multiplier. Under the stated conditions.

Formal statement
f fx :
ℝ → ℝ → ℂ
hf :
∀ x y, HasDerivAt (fun u => f u y) (fx x y) x
hfx :
Continuous fx.uncurry
y :
ℝ
a :
ℤ
= I * (Real.pi : ℂ) * (a : ℂ) * periodTwoSliceCoeff (fun x => evenReflectionPlane f x y) a
Proof (Lean source)
-- @node: signedReflectionPlaneX_slice_fourierCoeff lemma signedReflectionPlaneX_slice_fourierCoeff {f fx : ℝ → ℝ → ℂ} (hf : ∀ x y, HasDerivAt (fun u => f u y) (fx x y) x) (hfx : Continuous fx.uncurry) (y : ℝ) (a : ℤ) : periodTwoSliceCoeff (fun x => signedReflectionPlaneX fx x y) a = I * (Real.pi : ℂ) * (a : ℂ) * periodTwoSliceCoeff (fun x => evenReflectionPlane f x y) a := by apply signedReflectionSlice_fourierCoeff (fun x => evenReflectionPlane_slice_hasDerivAt hf x y) by_cases hy : y ≤ 1 · simp only [evenReflectionSlice, if_pos hy] exact hfx.comp (continuous_id.prodMk continuous_const) · simp only [evenReflectionSlice, if_neg hy] exact hfx.comp (continuous_id.prodMk continuous_const)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneX_slice_fourierCoeff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:95
theorem signedReflectionPlaneY_slice_fourierCoeff

In the second coordinate the multiplier has the second frequency. Under the stated conditions.

Formal statement
f fy :
ℝ → ℝ → ℂ
hf :
∀ x y, HasDerivAt (f x) (fy x y) y
hfy :
Continuous fy.uncurry
x :
ℝ
b :
ℤ
= I * (Real.pi : ℂ) * (b : ℂ) * periodTwoSliceCoeff (evenReflectionPlane f x) b
Proof (Lean source)
-- @node: signedReflectionPlaneY_slice_fourierCoeff lemma signedReflectionPlaneY_slice_fourierCoeff {f fy : ℝ → ℝ → ℂ} (hf : ∀ x y, HasDerivAt (f x) (fy x y) y) (hfy : Continuous fy.uncurry) (x : ℝ) (b : ℤ) : periodTwoSliceCoeff (signedReflectionPlaneY fy x) b = I * (Real.pi : ℂ) * (b : ℂ) * periodTwoSliceCoeff (evenReflectionPlane f x) b := by have he : evenReflectionPlane f x = (fun y => evenReflectionPlane (fun u v => f v u) y x) := funext (evenReflectionPlane_transpose f x) have hd : signedReflectionPlaneY fy x = (fun y => signedReflectionPlaneX (fun u v => fy v u) y x) := funext (signedReflectionPlaneY_transpose fy x) rw [he, hd] exact signedReflectionPlaneX_slice_fourierCoeff (fun u v => hf v u) (hfy.comp continuous_swap) x b
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneY_slice_fourierCoeff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:111
theorem evenReflectionSlice_integral Lemma evenReflectionSlice_integral in the paper ↗

Normalized reflection transports a continuous scalar slice integral exactly. Under the stated conditions.

Formal statement
E :
hq :
(1 / 2 : ℝ) • (∫ x in (0 : ℝ)..2, if x ≤ 1 then q x else q (2 - x))
= ∫ x in (0 : ℝ)..1, q x
Proof (Lean source)
-- @node: evenReflectionSlice_integral lemma evenReflectionSlice_integral {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {q : ℝ → E} (hq : Continuous q) : (1 / 2 : ℝ) • (∫ x in (0 : ℝ)..2, if x ≤ 1 then q x else q (2 - x)) = ∫ x in (0 : ℝ)..1, q x := by rw [reflectionCells_integral_split hq (by fun_prop), intervalIntegral.integral_comp_sub_left q 2] norm_num module
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionSlice_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:129
theorem evenReflectionPlane_energy

Four-cell normalized L² energy is exactly the original square energy. Under the stated conditions.

Formal statement
f :
ℝ → ℝ → ℂ
hf :
Continuous f.uncurry
(1 / 4 : ℝ) * (∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2)
= ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2
Proof (Lean source)
-- @node: evenReflectionPlane_energy lemma evenReflectionPlane_energy {f : ℝ → ℝ → ℂ} (hf : Continuous f.uncurry) : (1 / 4 : ℝ) * (∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2) = ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2 := by have hinner (x : ℝ) : (1 / 2 : ℝ) * (∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2) = if x ≤ 1 then (∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2) else ∫ y in (0 : ℝ)..1, ‖f (2 - x) y‖ ^ 2 := by by_cases hx : x ≤ 1 · simp only [evenReflectionPlane, evenReflectionSlice, if_pos hx] exact evenReflectionSlice_energy (hf.comp (continuous_const.prodMk continuous_id)) · simp only [evenReflectionPlane, evenReflectionSlice, if_neg hx] exact evenReflectionSlice_energy (hf.comp (continuous_const.prodMk continuous_id)) have hq : Continuous (fun x => ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2) := intervalIntegral.continuous_parametric_intervalIntegral_of_continuous' (by fun_prop) 0 1 have ho := evenReflectionSlice_integral hq simp only [smul_eq_mul] at ho calc _ = (1 / 2 : ℝ) * ∫ x in (0 : ℝ)..2, (1 / 2 : ℝ) * (∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2) := by rw [intervalIntegral.integral_const_mul] ring _ = _ := by simp_rw [hinner]; exact ho
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:140
theorem signedReflectionPlaneX_energy

The first gradient coordinate has exactly the same energy as even reflection. Under the stated conditions.

Formal statement
f :
ℝ → ℝ → ℂ
hf :
Continuous f.uncurry
(1 / 4 : ℝ) * (∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneX f x y‖ ^ 2)
= ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2
Proof (Lean source)
-- @node: signedReflectionPlaneX_energy lemma signedReflectionPlaneX_energy {f : ℝ → ℝ → ℂ} (hf : Continuous f.uncurry) : (1 / 4 : ℝ) * (∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneX f x y‖ ^ 2) = ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2 := by have he (x y : ℝ) : ‖signedReflectionPlaneX f x y‖ ^ 2 = ‖evenReflectionPlane f x y‖ ^ 2 := by simp only [signedReflectionPlaneX, evenReflectionPlane, signedReflectionSlice, evenReflectionSlice] split_ifs <;> simp simp_rw [he] exact evenReflectionPlane_energy hf
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneX_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:167
theorem signedReflectionPlaneY_energy

The second gradient coordinate also preserves energy, including the face jumps. Under the stated conditions.

Formal statement
f :
ℝ → ℝ → ℂ
hf :
Continuous f.uncurry
(1 / 4 : ℝ) * (∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneY f x y‖ ^ 2)
= ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2
Proof (Lean source)
-- @node: signedReflectionPlaneY_energy lemma signedReflectionPlaneY_energy {f : ℝ → ℝ → ℂ} (hf : Continuous f.uncurry) : (1 / 4 : ℝ) * (∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneY f x y‖ ^ 2) = ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2 := by have he (x y : ℝ) : ‖signedReflectionPlaneY f x y‖ ^ 2 = ‖evenReflectionPlane f x y‖ ^ 2 := by simp only [signedReflectionPlaneY, evenReflectionPlane, signedReflectionSlice, evenReflectionSlice] split_ifs <;> simp simp_rw [he] exact evenReflectionPlane_energy hf
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneY_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:181
theorem reflectionPlaneCells_integrable Lemma reflectionPlaneCells_integrable in the paper ↗

Continuous formulas on the four cells are integrable on the representative square, even when their derivative traces disagree on the joining faces. Under the stated conditions.

Formal statement
f₀₀ f₀₁ f₁₀ f₁₁ :
ℝ × ℝ → ℂ
h₀₀ :
Continuous f₀₀
h₀₁ :
Continuous f₀₁
h₁₀ :
Continuous f₁₀
h₁₁ :
Continuous f₁₁
IntegrableOn (fun z : ℝ × ℝ => if z.1 ≤ 1 then (if z.2 ≤ 1 then f₀₀ z else f₀₁ z) else (if z.2 ≤ 1 then f₁₀ z else f₁₁ z)) (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2)
Proof (Lean source)
-- @node: reflectionPlaneCells_integrable lemma reflectionPlaneCells_integrable {f₀₀ f₀₁ f₁₀ f₁₁ : ℝ × ℝ → ℂ} (h₀₀ : Continuous f₀₀) (h₀₁ : Continuous f₀₁) (h₁₀ : Continuous f₁₀) (h₁₁ : Continuous f₁₁) : IntegrableOn (fun z : ℝ × ℝ => if z.1 ≤ 1 then (if z.2 ≤ 1 then f₀₀ z else f₀₁ z) else (if z.2 ≤ 1 then f₁₀ z else f₁₁ z)) (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2) := by classical have hi {f : ℝ × ℝ → ℂ} (hf : Continuous f) : IntegrableOn f (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2) := by apply (hf.integrableOn_Icc (a := (0, 0)) (b := (2, 2))).mono_set intro z hz exact ⟨⟨hz.1.1.le, hz.2.1.le⟩, ⟨hz.1.2, hz.2.2⟩⟩ have hy : MeasurableSet {z : ℝ × ℝ | z.2 ≤ 1} := measurableSet_le measurable_snd measurable_const have hx : MeasurableSet {z : ℝ × ℝ | z.1 ≤ 1} := measurableSet_le measurable_fst measurable_const have hleft := Integrable.piecewise hy (hi h₀₀).integrableOn (hi h₀₁).integrableOn have hright := Integrable.piecewise hy (hi h₁₀).integrableOn (hi h₁₁).integrableOn exact Integrable.piecewise hx hleft.integrableOn hright.integrableOn
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionPlaneCells_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:195

The joint period-two coefficient is an iterated normalized square integral.

Definition (Lean source)
f :
ℝ → ℝ → ℂ
a b :
ℤ
periodTwoPlaneCoeff f a b :
ℂ
(1 / 2 : ℂ) * ∫ x in (0 : ℝ)..2, fourier (-a) (x : AddCircle (2 : ℝ)) * periodTwoSliceCoeff (f x) b
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.periodTwoPlaneCoeff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:219
theorem periodTwoPlaneCoeff_eq_integral

Both one-dimensional normalizations multiply to the square's Haar factor. The asserted mathematical result follows.

Formal statement
f :
ℝ → ℝ → ℂ
a b :
ℤ
= (1 / 4 : ℂ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, fourier (-a) (x : AddCircle (2 : ℝ)) * (fourier (-b) (y : AddCircle (2 : ℝ)) * f x y)
Proof (Lean source)
-- @node: periodTwoPlaneCoeff_eq_integral lemma periodTwoPlaneCoeff_eq_integral (f : ℝ → ℝ → ℂ) (a b : ℤ) : periodTwoPlaneCoeff f a b = (1 / 4 : ℂ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, fourier (-a) (x : AddCircle (2 : ℝ)) * (fourier (-b) (y : AddCircle (2 : ℝ)) * f x y) := by unfold periodTwoPlaneCoeff periodTwoSliceCoeff calc _ = (1 / 2 : ℂ) * ∫ x in (0 : ℝ)..2, (1 / 2 : ℂ) * ∫ y in (0 : ℝ)..2, fourier (-a) (x : AddCircle (2 : ℝ)) * (fourier (-b) (y : AddCircle (2 : ℝ)) * f x y) := by congr 1 apply intervalIntegral.integral_congr intro x _ dsimp only rw [intervalIntegral.integral_const_mul] ring _ = _ := by rw [intervalIntegral.integral_const_mul]; ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.periodTwoPlaneCoeff_eq_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:225
theorem periodTwoPlaneCoeff_transpose

Fubini exchanges the two coefficient orders when the character-weighted cells are integrable. Under the stated conditions, the asserted mathematical result follows.

Formal statement
f :
ℝ → ℝ → ℂ
a b :
ℤ
hi :
IntegrableOn (fun z : ℝ × ℝ => fourier (-a) (z.1 : AddCircle (2 : ℝ)) * (fourier (-b) (z.2 : AddCircle (2 : ℝ)) * f z.1 z.2)) (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2)
periodTwoPlaneCoeff f a b = periodTwoPlaneCoeff (fun x y => f y x) b a
Proof (Lean source)
-- @node: periodTwoPlaneCoeff_transpose lemma periodTwoPlaneCoeff_transpose (f : ℝ → ℝ → ℂ) (a b : ℤ) (hi : IntegrableOn (fun z : ℝ × ℝ => fourier (-a) (z.1 : AddCircle (2 : ℝ)) * (fourier (-b) (z.2 : AddCircle (2 : ℝ)) * f z.1 z.2)) (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2)) : periodTwoPlaneCoeff f a b = periodTwoPlaneCoeff (fun x y => f y x) b a := by have hswap : (∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, fourier (-a) (x : AddCircle (2 : ℝ)) * (fourier (-b) (y : AddCircle (2 : ℝ)) * f x y)) = ∫ y in (0 : ℝ)..2, ∫ x in (0 : ℝ)..2, fourier (-a) (x : AddCircle (2 : ℝ)) * (fourier (-b) (y : AddCircle (2 : ℝ)) * f x y) := by apply intervalIntegral_intervalIntegral_swap simpa only [uIoc_of_le (by norm_num : (0 : ℝ) ≤ 2), uncurry] using! hi rw [periodTwoPlaneCoeff_eq_integral, periodTwoPlaneCoeff_eq_integral, hswap] congr 1 apply intervalIntegral.integral_congr intro y _ apply intervalIntegral.integral_congr intro x _ dsimp only ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.periodTwoPlaneCoeff_transpose · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:245
theorem evenReflectionPlane_character_integrable

Character-weighted even reflection is integrable on the square by its four continuous cells. Under the stated conditions.

Formal statement
f :
ℝ → ℝ → ℂ
hf :
Continuous f.uncurry
a b :
ℤ
IntegrableOn (fun z : ℝ × ℝ => fourier (-a) (z.1 : AddCircle (2 : ℝ)) * (fourier (-b) (z.2 : AddCircle (2 : ℝ)) * evenReflectionPlane f z.1 z.2)) (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2)
Proof (Lean source)
-- @node: evenReflectionPlane_character_integrable lemma evenReflectionPlane_character_integrable {f : ℝ → ℝ → ℂ} (hf : Continuous f.uncurry) (a b : ℤ) : IntegrableOn (fun z : ℝ × ℝ => fourier (-a) (z.1 : AddCircle (2 : ℝ)) * (fourier (-b) (z.2 : AddCircle (2 : ℝ)) * evenReflectionPlane f z.1 z.2)) (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2) := by simp only [evenReflectionPlane, evenReflectionSlice, mul_ite] apply reflectionPlaneCells_integrable <;> fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_character_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:271
theorem signedReflectionPlaneX_character_integrable

The signed first derivative also has four integrable character-weighted cells. Under the stated conditions.

Formal statement
f :
ℝ → ℝ → ℂ
hf :
Continuous f.uncurry
a b :
ℤ
IntegrableOn (fun z : ℝ × ℝ => fourier (-a) (z.1 : AddCircle (2 : ℝ)) * (fourier (-b) (z.2 : AddCircle (2 : ℝ)) * signedReflectionPlaneX f z.1 z.2)) (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2)
Proof (Lean source)
-- @node: signedReflectionPlaneX_character_integrable lemma signedReflectionPlaneX_character_integrable {f : ℝ → ℝ → ℂ} (hf : Continuous f.uncurry) (a b : ℤ) : IntegrableOn (fun z : ℝ × ℝ => fourier (-a) (z.1 : AddCircle (2 : ℝ)) * (fourier (-b) (z.2 : AddCircle (2 : ℝ)) * signedReflectionPlaneX f z.1 z.2)) (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2) := by simp only [signedReflectionPlaneX, signedReflectionSlice, evenReflectionSlice, mul_ite, neg_ite] apply reflectionPlaneCells_integrable <;> fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneX_character_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:282
theorem signedReflectionPlaneY_fourierCoeff

The second-coordinate slice multiplier assembles to the joint Fourier multiplier. Under the stated conditions.

Formal statement
f fy :
ℝ → ℝ → ℂ
hf :
∀ x y, HasDerivAt (f x) (fy x y) y
hfy :
Continuous fy.uncurry
a b :
ℤ
= I * (Real.pi : ℂ) * (b : ℂ) * periodTwoPlaneCoeff (evenReflectionPlane f) a b
Proof (Lean source)
-- @node: signedReflectionPlaneY_fourierCoeff lemma signedReflectionPlaneY_fourierCoeff {f fy : ℝ → ℝ → ℂ} (hf : ∀ x y, HasDerivAt (f x) (fy x y) y) (hfy : Continuous fy.uncurry) (a b : ℤ) : periodTwoPlaneCoeff (signedReflectionPlaneY fy) a b = I * (Real.pi : ℂ) * (b : ℂ) * periodTwoPlaneCoeff (evenReflectionPlane f) a b := by unfold periodTwoPlaneCoeff simp_rw [signedReflectionPlaneY_slice_fourierCoeff hf hfy] have he : (∫ x in (0 : ℝ)..2, fourier (-a) (x : AddCircle (2 : ℝ)) * (I * (Real.pi : ℂ) * (b : ℂ) * periodTwoSliceCoeff (evenReflectionPlane f x) b)) = (I * (Real.pi : ℂ) * (b : ℂ)) * ∫ x in (0 : ℝ)..2, fourier (-a) (x : AddCircle (2 : ℝ)) * periodTwoSliceCoeff (evenReflectionPlane f x) b := by rw [← intervalIntegral.integral_const_mul] apply intervalIntegral.integral_congr intro x _ dsimp only ring rw [he] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneY_fourierCoeff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:294
theorem signedReflectionPlaneX_fourierCoeff

Fubini and transposition assemble the first-coordinate joint multiplier as well. Under the stated conditions.

Formal statement
f fx :
ℝ → ℝ → ℂ
hf :
∀ x y, HasDerivAt (fun u => f u y) (fx x y) x
hfc :
Continuous f.uncurry
hfx :
Continuous fx.uncurry
a b :
ℤ
= I * (Real.pi : ℂ) * (a : ℂ) * periodTwoPlaneCoeff (evenReflectionPlane f) a b
Proof (Lean source)
-- @node: signedReflectionPlaneX_fourierCoeff lemma signedReflectionPlaneX_fourierCoeff {f fx : ℝ → ℝ → ℂ} (hf : ∀ x y, HasDerivAt (fun u => f u y) (fx x y) x) (hfc : Continuous f.uncurry) (hfx : Continuous fx.uncurry) (a b : ℤ) : periodTwoPlaneCoeff (signedReflectionPlaneX fx) a b = I * (Real.pi : ℂ) * (a : ℂ) * periodTwoPlaneCoeff (evenReflectionPlane f) a b := by have he : (fun y x => evenReflectionPlane f x y) = evenReflectionPlane (fun y x => f x y) := by funext y x exact evenReflectionPlane_transpose f x y have hd : (fun y x => signedReflectionPlaneX fx x y) = signedReflectionPlaneY (fun y x => fx x y) := by funext y x exact (signedReflectionPlaneY_transpose (fun y x => fx x y) y x).symm rw [periodTwoPlaneCoeff_transpose (signedReflectionPlaneX fx) a b (signedReflectionPlaneX_character_integrable hfx a b), periodTwoPlaneCoeff_transpose (evenReflectionPlane f) a b (evenReflectionPlane_character_integrable hfc a b), he, hd] exact signedReflectionPlaneY_fourierCoeff (fun y x => hf x y) (hfx.comp continuous_swap) b a
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneX_fourierCoeff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:319
theorem evenReflectionPlane_firstOrder_energy

The two-dimensional spatial endpoint has exactly the local 1/2 gradient coefficient. Every energy on the right is an original-cube energy; the faces impose no trace condition. Under the stated conditions.

Formal statement
f fx fy :
ℝ → ℝ → ℂ
hf :
Continuous f.uncurry
hfx :
Continuous fx.uncurry
hfy :
Continuous fy.uncurry
(1 / 4 : ℝ) * ((∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2) + (1 / 2 : ℝ) * ((∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneX fx x y‖ ^ 2) + ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneY fy x y‖ ^ 2))
= (∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2)
+ (1 / 2 : ℝ) * ((∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖fx x y‖ ^ 2) + ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖fy x y‖ ^ 2)
Proof (Lean source)
-- @node: evenReflectionPlane_firstOrder_energy lemma evenReflectionPlane_firstOrder_energy {f fx fy : ℝ → ℝ → ℂ} (hf : Continuous f.uncurry) (hfx : Continuous fx.uncurry) (hfy : Continuous fy.uncurry) : (1 / 4 : ℝ) * ((∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2) + (1 / 2 : ℝ) * ((∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneX fx x y‖ ^ 2) + ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneY fy x y‖ ^ 2)) = (∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2) + (1 / 2 : ℝ) * ((∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖fx x y‖ ^ 2) + ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖fy x y‖ ^ 2) := by linear_combination evenReflectionPlane_energy hf + (1 / 2 : ℝ) * signedReflectionPlaneX_energy hfx + (1 / 2 : ℝ) * signedReflectionPlaneY_energy hfy
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_firstOrder_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:342
theorem evenReflectionPlane_firstOrder_coeff_energy

Both genuine derivative multipliers give the local two-coordinate spectral weight. Under the stated conditions.

Formal statement
f fx fy :
ℝ → ℝ → ℂ
hfxd :
∀ x y, HasDerivAt (fun u => f u y) (fx x y) x
hfyd :
∀ x y, HasDerivAt (f x) (fy x y) y
hf :
Continuous f.uncurry
hfx :
Continuous fx.uncurry
hfy :
Continuous fy.uncurry
a b :
ℤ
(1 + pi ^ 2 * ((a : ℝ) ^ 2 + (b : ℝ) ^ 2) / 2) * ‖periodTwoPlaneCoeff (evenReflectionPlane f) a b‖ ^ 2
= ‖periodTwoPlaneCoeff (evenReflectionPlane f) a b‖ ^ 2
+ (1 / 2 : ℝ) * (‖periodTwoPlaneCoeff (signedReflectionPlaneX fx) a b‖ ^ 2 + ‖periodTwoPlaneCoeff (signedReflectionPlaneY fy) a b‖ ^ 2)
Proof (Lean source)
-- @node: evenReflectionPlane_firstOrder_coeff_energy lemma evenReflectionPlane_firstOrder_coeff_energy {f fx fy : ℝ → ℝ → ℂ} (hfxd : ∀ x y, HasDerivAt (fun u => f u y) (fx x y) x) (hfyd : ∀ x y, HasDerivAt (f x) (fy x y) y) (hf : Continuous f.uncurry) (hfx : Continuous fx.uncurry) (hfy : Continuous fy.uncurry) (a b : ℤ) : (1 + pi ^ 2 * ((a : ℝ) ^ 2 + (b : ℝ) ^ 2) / 2) * ‖periodTwoPlaneCoeff (evenReflectionPlane f) a b‖ ^ 2 = ‖periodTwoPlaneCoeff (evenReflectionPlane f) a b‖ ^ 2 + (1 / 2 : ℝ) * (‖periodTwoPlaneCoeff (signedReflectionPlaneX fx) a b‖ ^ 2 + ‖periodTwoPlaneCoeff (signedReflectionPlaneY fy) a b‖ ^ 2) := by rw [signedReflectionPlaneX_fourierCoeff hfxd hf hfx, signedReflectionPlaneY_fourierCoeff hfyd hfy] simp only [norm_mul, Complex.norm_I, one_mul, Complex.norm_real, Real.norm_eq_abs, Complex.norm_intCast, mul_pow, sq_abs] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_firstOrder_coeff_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:361
theorem plane_cube_energy_le_wholeSpace Lemma plane_cube_energy_le_wholeSpace in the paper ↗

Restricting spatial square energy to the original square is a contraction. Under the stated conditions.

Formal statement
f :
ℝ → ℝ → ℂ
hf :
MemLp f.uncurry 2 (volume : Measure (ℝ × ℝ))
(∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2) ≤ ∫ z : ℝ × ℝ, ‖f z.1 z.2‖ ^ 2
Proof (Lean source)
-- @node: plane_cube_energy_le_wholeSpace lemma plane_cube_energy_le_wholeSpace {f : ℝ → ℝ → ℂ} (hf : MemLp f.uncurry 2 (volume : Measure (ℝ × ℝ))) : (∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2) ≤ ∫ z : ℝ × ℝ, ‖f z.1 z.2‖ ^ 2 := by have hi := hf.integrable_norm_pow (by norm_num) have hi' : Integrable (fun z : ℝ × ℝ => ‖f z.1 z.2‖ ^ 2) ((volume : Measure ℝ).prod volume) := by simpa only [uncurry, Measure.volume_eq_prod] using! hi simp_rw [intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 1)] rw [← setIntegral_prod _ hi'.integrableOn] exact setIntegral_le_integral hi' (Filter.Eventually.of_forall (fun z => sq_nonneg _))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.plane_cube_energy_le_wholeSpace · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:379
theorem evenReflectionPlane_firstOrder_le_wholeSpace

The four-cell smooth spatial endpoint contracts whole-space H¹ energy with exactly the same local 1/2 gradient normalization. Under the stated conditions.

Formal statement
f fx fy :
ℝ → ℝ → ℂ
hf :
Continuous f.uncurry
hfx :
Continuous fx.uncurry
hfy :
Continuous fy.uncurry
hL :
MemLp f.uncurry 2 (volume : Measure (ℝ × ℝ))
hDx :
MemLp fx.uncurry 2 (volume : Measure (ℝ × ℝ))
hDy :
MemLp fy.uncurry 2 (volume : Measure (ℝ × ℝ))
(1 / 4 : ℝ) * ((∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2) + (1 / 2 : ℝ) * ((∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneX fx x y‖ ^ 2) + ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneY fy x y‖ ^ 2))
≤ (∫ z : ℝ × ℝ, ‖f z.1 z.2‖ ^ 2)
+ (1 / 2 : ℝ) * ((∫ z : ℝ × ℝ, ‖fx z.1 z.2‖ ^ 2) + ∫ z : ℝ × ℝ, ‖fy z.1 z.2‖ ^ 2)
Proof (Lean source)
-- @node: evenReflectionPlane_firstOrder_le_wholeSpace lemma evenReflectionPlane_firstOrder_le_wholeSpace {f fx fy : ℝ → ℝ → ℂ} (hf : Continuous f.uncurry) (hfx : Continuous fx.uncurry) (hfy : Continuous fy.uncurry) (hL : MemLp f.uncurry 2 (volume : Measure (ℝ × ℝ))) (hDx : MemLp fx.uncurry 2 (volume : Measure (ℝ × ℝ))) (hDy : MemLp fy.uncurry 2 (volume : Measure (ℝ × ℝ))) : (1 / 4 : ℝ) * ((∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2) + (1 / 2 : ℝ) * ((∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneX fx x y‖ ^ 2) + ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneY fy x y‖ ^ 2)) ≤ (∫ z : ℝ × ℝ, ‖f z.1 z.2‖ ^ 2) + (1 / 2 : ℝ) * ((∫ z : ℝ × ℝ, ‖fx z.1 z.2‖ ^ 2) + ∫ z : ℝ × ℝ, ‖fy z.1 z.2‖ ^ 2) := by rw [evenReflectionPlane_firstOrder_energy hf hfx hfy] exact add_le_add (plane_cube_energy_le_wholeSpace hL) (mul_le_mul_of_nonneg_left (add_le_add (plane_cube_energy_le_wholeSpace hDx) (plane_cube_energy_le_wholeSpace hDy)) (by norm_num))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_firstOrder_le_wholeSpace · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlane.lean:393
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionPlaneParseval 9 declarations Iterated interval Parseval and dominated convergence sum the joint Fourier coefficients of the four reflected cells.

Joint Parseval for reflected cells

Iterated interval Parseval and dominated convergence sum the joint Fourier coefficients of the four reflected cells. Applying this to the function and both signed derivatives proves the smooth two-dimensional spectral endpoint.

theorem reflectionPlaneCells_memLp Lemma reflectionPlaneCells_memLp in the paper ↗

Four continuous cell formulas have every finite Lp regularity on the square. Under the stated conditions.

Formal statement
f₀₀ f₀₁ f₁₀ f₁₁ :
ℝ × ℝ → ℂ
h₀₀ :
Continuous f₀₀
h₀₁ :
Continuous f₀₁
h₁₀ :
Continuous f₁₀
h₁₁ :
Continuous f₁₁
q :
ℝ≥0∞
MemLp (fun z : ℝ × ℝ => if z.1 ≤ 1 then (if z.2 ≤ 1 then f₀₀ z else f₀₁ z) else (if z.2 ≤ 1 then f₁₀ z else f₁₁ z)) q (volume.restrict (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2))
Proof (Lean source)
-- @node: reflectionPlaneCells_memLp lemma reflectionPlaneCells_memLp {f₀₀ f₀₁ f₁₀ f₁₁ : ℝ × ℝ → ℂ} (h₀₀ : Continuous f₀₀) (h₀₁ : Continuous f₀₁) (h₁₀ : Continuous f₁₀) (h₁₁ : Continuous f₁₁) (q : ℝ≥0∞) : MemLp (fun z : ℝ × ℝ => if z.1 ≤ 1 then (if z.2 ≤ 1 then f₀₀ z else f₀₁ z) else (if z.2 ≤ 1 then f₁₀ z else f₁₁ z)) q (volume.restrict (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2)) := by classical haveI : IsFiniteMeasure (volume.restrict (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2)) := by rw [Measure.volume_eq_prod, ← Measure.prod_restrict] infer_instance have hi {f : ℝ × ℝ → ℂ} (hf : Continuous f) : MemLp f q (volume.restrict (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2)) := by obtain ⟨C, hC⟩ := (isCompact_Icc : IsCompact (Icc ((0, 0) : ℝ × ℝ) (2, 2))).bddAbove_image hf.norm.continuousOn apply MemLp.of_bound (C := C) hf.measurable.aestronglyMeasurable filter_upwards [ae_restrict_mem (measurableSet_Ioc.prod measurableSet_Ioc)] with z hz exact hC ⟨z, ⟨⟨hz.1.1.le, hz.2.1.le⟩, ⟨hz.1.2, hz.2.2⟩⟩, rfl⟩ have hy := measurableSet_le (measurable_snd : Measurable (Prod.snd : ℝ × ℝ → ℝ)) (measurable_const (a := (1 : ℝ))) have hx := measurableSet_le (measurable_fst : Measurable (Prod.fst : ℝ × ℝ → ℝ)) (measurable_const (a := (1 : ℝ))) have hl := MemLp.piecewise hy ((hi h₀₀).restrict _) ((hi h₀₁).restrict _) have hr := MemLp.piecewise hy ((hi h₁₀).restrict _) ((hi h₁₁).restrict _) exact MemLp.piecewise hx (hl.restrict _) (hr.restrict _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionPlaneCells_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlaneParseval.lean:18
theorem reflectionCells_sliceCoeff_continuous

Integrating two continuous inner cell formulas against a character is continuous in the outer parameter, despite a possible jump at the inner face. Under the stated conditions.

Formal statement
f₀ f₁ :
ℝ × ℝ → ℂ
h₀ :
h₁ :
b :
ℤ
Continuous (fun x => periodTwoSliceCoeff (fun y => if y ≤ 1 then f₀ (x, y) else f₁ (x, y)) b)
Proof (Lean source)
-- @node: reflectionCells_sliceCoeff_continuous lemma reflectionCells_sliceCoeff_continuous {f₀ f₁ : ℝ × ℝ → ℂ} (h₀ : Continuous f₀) (h₁ : Continuous f₁) (b : ℤ) : Continuous (fun x => periodTwoSliceCoeff (fun y => if y ≤ 1 then f₀ (x, y) else f₁ (x, y)) b) := by have he (x : ℝ) : periodTwoSliceCoeff (fun y => if y ≤ 1 then f₀ (x, y) else f₁ (x, y)) b = (1 / 2 : ℂ) * ((∫ y in (0 : ℝ)..1, fourier (-b) (y : AddCircle (2 : ℝ)) * f₀ (x, y)) + ∫ y in (1 : ℝ)..2, fourier (-b) (y : AddCircle (2 : ℝ)) * f₁ (x, y)) := by unfold periodTwoSliceCoeff simp only [mul_ite] rw [reflectionCells_integral_split (by fun_prop) (by fun_prop)] simp_rw [he] apply Continuous.const_mul apply Continuous.add <;> apply intervalIntegral.continuous_parametric_intervalIntegral_of_continuous' <;> fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionCells_sliceCoeff_continuous · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlaneParseval.lean:46
theorem periodTwoPlaneCoeff_parseval

Two interval Parseval identities assemble to joint Parseval. The square integrability and partial-coefficient regularity justify exchanging the series and integral. Under the stated conditions.

Formal statement
f :
ℝ → ℝ → ℂ
hL :
∀ x, MemLp (f x) 2 (volume.restrict (Ioc (0 : ℝ) 2))
hC :
∀ b : ℤ, MemLp (fun x => periodTwoSliceCoeff (f x) b) 2 (volume.restrict (Ioc (0 : ℝ) 2))
hi :
IntegrableOn (fun z : ℝ × ℝ => ‖f z.1 z.2‖ ^ 2) (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2)
HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff f k.1 k.2‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖f x y‖ ^ 2)
Proof (Lean source)
-- @node: periodTwoPlaneCoeff_parseval lemma periodTwoPlaneCoeff_parseval (f : ℝ → ℝ → ℂ) (hL : ∀ x, MemLp (f x) 2 (volume.restrict (Ioc (0 : ℝ) 2))) (hC : ∀ b : ℤ, MemLp (fun x => periodTwoSliceCoeff (f x) b) 2 (volume.restrict (Ioc (0 : ℝ) 2))) (hi : IntegrableOn (fun z : ℝ × ℝ => ‖f z.1 z.2‖ ^ 2) (Ioc (0 : ℝ) 2 ×ˢ Ioc (0 : ℝ) 2)) : HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff f k.1 k.2‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖f x y‖ ^ 2) := by let μ : Measure ℝ := volume.restrict (Ioc (0 : ℝ) 2) have hs (x : ℝ) : HasSum (fun b : ℤ => ‖periodTwoSliceCoeff (f x) b‖ ^ 2) ((1 / 2 : ℝ) * ∫ y in (0 : ℝ)..2, ‖f x y‖ ^ 2) := by have h := hasSum_sq_fourierCoeffOn (by norm_num : (0 : ℝ) < 2) (hL x) simpa only [← periodTwoSliceCoeff_eq_fourierCoeffOn, sub_zero, inv_eq_one_div, smul_eq_mul] using h have hi' : Integrable (fun z : ℝ × ℝ => ‖f z.1 z.2‖ ^ 2) (μ.prod μ) := by simpa only [μ, Measure.volume_eq_prod, Measure.prod_restrict, IntegrableOn] using! hi have htotal : Integrable (fun x => ∑' b : ℤ, ‖periodTwoSliceCoeff (f x) b‖ ^ 2) μ := by simp_rw [(hs _).tsum_eq, intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 2)] exact hi'.integral_prod_left.const_mul (1 / 2) have ht := MeasureTheory.hasSum_integral_of_dominated_convergence (μ := μ) (fun b x => ‖periodTwoSliceCoeff (f x) b‖ ^ 2) (fun b => ((hC b).aestronglyMeasurable.norm.pow 2)) (fun b => Filter.Eventually.of_forall (fun x => by change ‖(‖periodTwoSliceCoeff (f x) b‖ ^ 2 : ℝ)‖ ≤ _ rw [Real.norm_eq_abs, abs_of_nonneg (sq_nonneg _)])) (Filter.Eventually.of_forall (fun x => (hs x).summable)) htotal (Filter.Eventually.of_forall hs) have hout : HasSum (fun b : ℤ => (1 / 2 : ℝ) * ∫ x in (0 : ℝ)..2, ‖periodTwoSliceCoeff (f x) b‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖f x y‖ ^ 2) := by have h := ht.mul_left (1 / 2) simp only [μ, ← intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 2), intervalIntegral.integral_const_mul] at h convert! h using 1 <;> first | rfl | ring have hinner (b : ℤ) : HasSum (fun a : ℤ => ‖periodTwoPlaneCoeff f a b‖ ^ 2) ((1 / 2 : ℝ) * ∫ x in (0 : ℝ)..2, ‖periodTwoSliceCoeff (f x) b‖ ^ 2) := by have h := hasSum_sq_fourierCoeffOn (by norm_num : (0 : ℝ) < 2) (hC b) simpa only [← periodTwoSliceCoeff_eq_fourierCoeffOn, periodTwoSliceCoeff, periodTwoPlaneCoeff, sub_zero, inv_eq_one_div, smul_eq_mul] using h have hsum : Summable (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff f k.2 k.1‖ ^ 2) := (summable_prod_of_nonneg (fun _ => sq_nonneg _)).mpr ⟨fun b => (hinner b).summable, by simpa only [(hinner _).tsum_eq] using hout.summable⟩ have he : HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff f k.2 k.1‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖f x y‖ ^ 2) := by have ht : (∑' k : ℤ × ℤ, ‖periodTwoPlaneCoeff f k.2 k.1‖ ^ 2) = (1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖f x y‖ ^ 2 := by rw [hsum.tsum_prod] simp_rw [(hinner _).tsum_eq] exact hout.tsum_eq exact ht ▸ hsum.hasSum exact (Equiv.prodComm ℤ ℤ).hasSum_iff.mp he
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.periodTwoPlaneCoeff_parseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlaneParseval.lean:66
theorem reflectionPlaneCells_parseval

Joint Parseval applies to four continuous cells, including discontinuous signed reflected derivatives; no agreement of derivative traces is required. Under the stated conditions.

Formal statement
f₀₀ f₀₁ f₁₀ f₁₁ :
ℝ × ℝ → ℂ
h₀₀ :
Continuous f₀₀
h₀₁ :
Continuous f₀₁
h₁₀ :
Continuous f₁₀
h₁₁ :
Continuous f₁₁
f :
fun x y
=> if x ≤ 1 then (if y ≤ 1 then f₀₀ (x, y) else f₀₁ (x, y)) else (if y ≤ 1 then f₁₀ (x, y) else f₁₁ (x, y)) (: ℝ → ℝ → ℂ)
HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff f k.1 k.2‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖f x y‖ ^ 2)
Proof (Lean source)
-- @node: reflectionPlaneCells_parseval lemma reflectionPlaneCells_parseval {f₀₀ f₀₁ f₁₀ f₁₁ : ℝ × ℝ → ℂ} (h₀₀ : Continuous f₀₀) (h₀₁ : Continuous f₀₁) (h₁₀ : Continuous f₁₀) (h₁₁ : Continuous f₁₁) : let f : ℝ → ℝ → ℂ := fun x y => if x ≤ 1 then (if y ≤ 1 then f₀₀ (x, y) else f₀₁ (x, y)) else (if y ≤ 1 then f₁₀ (x, y) else f₁₁ (x, y)) HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff f k.1 k.2‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖f x y‖ ^ 2) := by dsimp only apply periodTwoPlaneCoeff_parseval · intro x by_cases hx : x ≤ 1 · simp only [if_pos hx] apply reflectionCells_memLp <;> fun_prop · simp only [if_neg hx] apply reflectionCells_memLp <;> fun_prop · intro b have he (x : ℝ) : periodTwoSliceCoeff (fun y => if x ≤ 1 then (if y ≤ 1 then f₀₀ (x, y) else f₀₁ (x, y)) else (if y ≤ 1 then f₁₀ (x, y) else f₁₁ (x, y))) b = if x ≤ 1 then periodTwoSliceCoeff (fun y => if y ≤ 1 then f₀₀ (x, y) else f₀₁ (x, y)) b else periodTwoSliceCoeff (fun y => if y ≤ 1 then f₁₀ (x, y) else f₁₁ (x, y)) b := by split_ifs <;> rfl simp_rw [he] exact reflectionCells_memLp (reflectionCells_sliceCoeff_continuous h₀₀ h₀₁ b) (reflectionCells_sliceCoeff_continuous h₁₀ h₁₁ b) 2 · exact (reflectionPlaneCells_memLp h₀₀ h₀₁ h₁₀ h₁₁ 2).integrable_norm_pow (by norm_num)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionPlaneCells_parseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlaneParseval.lean:122
theorem evenReflectionPlane_parseval

Joint Parseval recovers the even reflected square's exact normalized spatial energy. Under the stated conditions.

Formal statement
f :
ℝ → ℝ → ℂ
hf :
Continuous f.uncurry
HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff (evenReflectionPlane f) k.1 k.2‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2)
Proof (Lean source)
-- @node: evenReflectionPlane_parseval lemma evenReflectionPlane_parseval {f : ℝ → ℝ → ℂ} (hf : Continuous f.uncurry) : HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff (evenReflectionPlane f) k.1 k.2‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2) := by exact reflectionPlaneCells_parseval (f₀₀ := fun z => f z.1 z.2) (f₀₁ := fun z => f z.1 (2 - z.2)) (f₁₀ := fun z => f (2 - z.1) z.2) (f₁₁ := fun z => f (2 - z.1) (2 - z.2)) hf (by fun_prop) (by fun_prop) (by fun_prop)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_parseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlaneParseval.lean:157
theorem signedReflectionPlaneX_parseval

Joint Parseval also applies to the signed first derivative across its jumping face. Under the stated conditions.

Formal statement
f :
ℝ → ℝ → ℂ
hf :
Continuous f.uncurry
HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff (signedReflectionPlaneX f) k.1 k.2‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneX f x y‖ ^ 2)
Proof (Lean source)
-- @node: signedReflectionPlaneX_parseval lemma signedReflectionPlaneX_parseval {f : ℝ → ℝ → ℂ} (hf : Continuous f.uncurry) : HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff (signedReflectionPlaneX f) k.1 k.2‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneX f x y‖ ^ 2) := by have he : signedReflectionPlaneX f = (fun x y => if x ≤ 1 then (if y ≤ 1 then f x y else f x (2 - y)) else (if y ≤ 1 then -f (2 - x) y else -f (2 - x) (2 - y))) := by funext x y simp only [signedReflectionPlaneX, signedReflectionSlice, evenReflectionSlice, neg_ite] rw [he] exact reflectionPlaneCells_parseval (f₀₀ := fun z => f z.1 z.2) (f₀₁ := fun z => f z.1 (2 - z.2)) (f₁₀ := fun z => -f (2 - z.1) z.2) (f₁₁ := fun z => -f (2 - z.1) (2 - z.2)) hf (by fun_prop) (by fun_prop) (by fun_prop)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneX_parseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlaneParseval.lean:168
theorem signedReflectionPlaneY_parseval

The second signed derivative has the same joint Parseval identity. Under the stated conditions.

Formal statement
f :
ℝ → ℝ → ℂ
hf :
Continuous f.uncurry
HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff (signedReflectionPlaneY f) k.1 k.2‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneY f x y‖ ^ 2)
Proof (Lean source)
-- @node: signedReflectionPlaneY_parseval lemma signedReflectionPlaneY_parseval {f : ℝ → ℝ → ℂ} (hf : Continuous f.uncurry) : HasSum (fun k : ℤ × ℤ => ‖periodTwoPlaneCoeff (signedReflectionPlaneY f) k.1 k.2‖ ^ 2) ((1 / 4 : ℝ) * ∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneY f x y‖ ^ 2) := by exact reflectionPlaneCells_parseval (f₀₀ := fun z => f z.1 z.2) (f₀₁ := fun z => -f z.1 (2 - z.2)) (f₁₀ := fun z => f (2 - z.1) z.2) (f₁₁ := fun z => -f (2 - z.1) (2 - z.2)) hf (by fun_prop) (by fun_prop) (by fun_prop)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionPlaneY_parseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlaneParseval.lean:185
theorem evenReflectionPlane_firstOrder_parseval

Joint Parseval and the two genuine weak derivative multipliers prove the smooth spectral H¹ endpoint, with precisely the local gradient factor one half. Under the stated conditions.

Formal statement
f fx fy :
ℝ → ℝ → ℂ
hfxd :
∀ x y, HasDerivAt (fun u => f u y) (fx x y) x
hfyd :
∀ x y, HasDerivAt (f x) (fy x y) y
hf :
Continuous f.uncurry
hfx :
Continuous fx.uncurry
hfy :
Continuous fy.uncurry
HasSum (fun k : ℤ × ℤ => (1 + pi ^ 2 * ((k.1 : ℝ) ^ 2 + (k.2 : ℝ) ^ 2) / 2) * ‖periodTwoPlaneCoeff (evenReflectionPlane f) k.1 k.2‖ ^ 2) ((∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2) + (1 / 2 : ℝ) * ((∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖fx x y‖ ^ 2) + ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖fy x y‖ ^ 2))
Proof (Lean source)
-- @node: evenReflectionPlane_firstOrder_parseval lemma evenReflectionPlane_firstOrder_parseval {f fx fy : ℝ → ℝ → ℂ} (hfxd : ∀ x y, HasDerivAt (fun u => f u y) (fx x y) x) (hfyd : ∀ x y, HasDerivAt (f x) (fy x y) y) (hf : Continuous f.uncurry) (hfx : Continuous fx.uncurry) (hfy : Continuous fy.uncurry) : HasSum (fun k : ℤ × ℤ => (1 + pi ^ 2 * ((k.1 : ℝ) ^ 2 + (k.2 : ℝ) ^ 2) / 2) * ‖periodTwoPlaneCoeff (evenReflectionPlane f) k.1 k.2‖ ^ 2) ((∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2) + (1 / 2 : ℝ) * ((∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖fx x y‖ ^ 2) + ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖fy x y‖ ^ 2)) := by have h := (evenReflectionPlane_parseval hf).add (((signedReflectionPlaneX_parseval hfx).add (signedReflectionPlaneY_parseval hfy)).mul_left (1 / 2 : ℝ)) have he := evenReflectionPlane_firstOrder_energy hf hfx hfy have hsum : (1 / 4 : ℝ) * (∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖evenReflectionPlane f x y‖ ^ 2) + (1 / 2 : ℝ) * ((1 / 4 : ℝ) * (∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneX fx x y‖ ^ 2) + (1 / 4 : ℝ) * (∫ x in (0 : ℝ)..2, ∫ y in (0 : ℝ)..2, ‖signedReflectionPlaneY fy x y‖ ^ 2)) = (∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖f x y‖ ^ 2) + (1 / 2 : ℝ) * ((∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖fx x y‖ ^ 2) + ∫ x in (0 : ℝ)..1, ∫ y in (0 : ℝ)..1, ‖fy x y‖ ^ 2) := by rw [← he] ring rw [hsum] at h convert! h using 1 funext k exact evenReflectionPlane_firstOrder_coeff_energy hfxd hfyd hf hfx hfy k.1 k.2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_firstOrder_parseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlaneParseval.lean:196
theorem evenReflectionPlane_firstOrder_spectral_le_wholeSpace

The smooth two-dimensional Fourier endpoint contracts the whole-space spatial H¹ norm with constant one, independently of the two cube-face traces. Under the stated conditions.

Formal statement
f fx fy :
ℝ → ℝ → ℂ
hfxd :
∀ x y, HasDerivAt (fun u => f u y) (fx x y) x
hfyd :
∀ x y, HasDerivAt (f x) (fy x y) y
hf :
Continuous f.uncurry
hfx :
Continuous fx.uncurry
hfy :
Continuous fy.uncurry
hL :
MemLp f.uncurry 2 (volume : Measure (ℝ × ℝ))
hDx :
MemLp fx.uncurry 2 (volume : Measure (ℝ × ℝ))
hDy :
MemLp fy.uncurry 2 (volume : Measure (ℝ × ℝ))
(∑' k : ℤ × ℤ, (1 + pi ^ 2 * ((k.1 : ℝ) ^ 2 + (k.2 : ℝ) ^ 2) / 2) * ‖periodTwoPlaneCoeff (evenReflectionPlane f) k.1 k.2‖ ^ 2)
≤ (∫ z : ℝ × ℝ, ‖f z.1 z.2‖ ^ 2)
+ (1 / 2 : ℝ) * ((∫ z : ℝ × ℝ, ‖fx z.1 z.2‖ ^ 2) + ∫ z : ℝ × ℝ, ‖fy z.1 z.2‖ ^ 2)
Proof (Lean source)
-- @node: evenReflectionPlane_firstOrder_spectral_le_wholeSpace lemma evenReflectionPlane_firstOrder_spectral_le_wholeSpace {f fx fy : ℝ → ℝ → ℂ} (hfxd : ∀ x y, HasDerivAt (fun u => f u y) (fx x y) x) (hfyd : ∀ x y, HasDerivAt (f x) (fy x y) y) (hf : Continuous f.uncurry) (hfx : Continuous fx.uncurry) (hfy : Continuous fy.uncurry) (hL : MemLp f.uncurry 2 (volume : Measure (ℝ × ℝ))) (hDx : MemLp fx.uncurry 2 (volume : Measure (ℝ × ℝ))) (hDy : MemLp fy.uncurry 2 (volume : Measure (ℝ × ℝ))) : (∑' k : ℤ × ℤ, (1 + pi ^ 2 * ((k.1 : ℝ) ^ 2 + (k.2 : ℝ) ^ 2) / 2) * ‖periodTwoPlaneCoeff (evenReflectionPlane f) k.1 k.2‖ ^ 2) ≤ (∫ z : ℝ × ℝ, ‖f z.1 z.2‖ ^ 2) + (1 / 2 : ℝ) * ((∫ z : ℝ × ℝ, ‖fx z.1 z.2‖ ^ 2) + ∫ z : ℝ × ℝ, ‖fy z.1 z.2‖ ^ 2) := by rw [(evenReflectionPlane_firstOrder_parseval hfxd hfyd hf hfx hfy).tsum_eq, ← evenReflectionPlane_firstOrder_energy hf hfx hfy] exact evenReflectionPlane_firstOrder_le_wholeSpace hf hfx hfy hL hDx hDy
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionPlane_firstOrder_spectral_le_wholeSpace · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPlaneParseval.lean:231
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionPooledBudget 4 declarations Exact Fourier component separation and local coordinate transport sum the constant-one component contractions into the pooled ambient spectral bound.

Pooled canonical reflection budget

Exact Fourier component separation and local coordinate transport sum the constant-one component contractions into the pooled ambient spectral bound.

theorem component_mass_tsum_sum Lemma component_mass_tsum_sum in the paper ↗

Nonnegative Fourier masses commute with a finite sum of components. Under the stated conditions.

Formal statement
d :
ℕ
K :
Type*
f :
Fin d → K → ℝ≥0∞
(∑' k, ∑ j, f j k) = ∑ j, ∑' k, f j k
Proof (Lean source)
-- @node: component_mass_tsum_sum lemma component_mass_tsum_sum {d : ℕ} {K : Type*} (f : Fin d → K → ℝ≥0∞) : (∑' k, ∑ j, f j k) = ∑ j, ∑' k, f j k := by have h := ENNReal.tsum_comm (f := fun k j => f j k) simpa only [tsum_fintype] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.component_mass_tsum_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPooledBudget.lean:17
theorem reflectedBudget_le_ambient_component_budgets

At each active frequency only its unique canonical component contributes to the weighted outcome mass; summing gives a bound by the ambient component budgets. Under the stated conditions.

Formal statement
d :
ℕ
m :
hm :
s :
ℝ
≤ (∑ j, ∑' k : Fin d → ℤ, ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g1 m.val j (x j)) k‖ ^ 2))
+ ∑ j, ∑ l, if j < l then (∑' k : Fin d → ℤ, ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k‖ ^ 2)) else 0
Proof (Lean source)
-- @node: reflectedBudget_le_ambient_component_budgets lemma reflectedBudget_le_ambient_component_budgets {d : ℕ} (m : CenteredL2Fn d) (hm : OrderTwo m) (s : ℝ) : reflectedBudget s m.val ≤ (∑ j, ∑' k : Fin d → ℤ, ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g1 m.val j (x j)) k‖ ^ 2)) + ∑ j, ∑ l, if j < l then (∑' k : Fin d → ℤ, ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k‖ ^ 2)) else 0 := by classical let A : Fin d → (Fin d → ℤ) → ℝ≥0∞ := fun j k => ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g1 m.val j (x j)) k‖ ^ 2) let B : Fin d → Fin d → (Fin d → ℤ) → ℝ≥0∞ := fun j l k => if j < l then ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat (fun x : Cube d => g2 m.val j l (x j) (x l)) k‖ ^ 2) else 0 have hpoint (k : Fin d → ℤ) : (if 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 then ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat m.val k‖ ^ 2) else 0) ≤ (∑ j, A j k) + ∑ j, ∑ l, B j l k := by by_cases hk : 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 · rw [if_pos hk] by_cases hc : (frequencySupport k).card = 1 · obtain ⟨j, hj⟩ := Finset.card_eq_one.mp hc rw [Fhat_orderTwo_single_component m hm j k hj] change A j k ≤ _ calc A j k ≤ ∑ r, A r k := Finset.single_le_sum (f := fun r => A r k) (fun _ _ => bot_le) (Finset.mem_univ j) _ ≤ (∑ r, A r k) + ∑ r, ∑ t, B r t k := le_add_of_nonneg_right bot_le · obtain ⟨j, l, hjl, hsupport⟩ := (Finset.card_eq_two (s := frequencySupport k)).mp (by omega) have hp (r t : Fin d) (hrt : r < t) (heq : frequencySupport k = {r, t}) : ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat m.val k‖ ^ 2) ≤ (∑ j, A j k) + ∑ j, ∑ l, B j l k := by rw [Fhat_orderTwo_pair_component m hm r t hrt k heq] have ht : B r t k ≤ ∑ l, B r l k := Finset.single_le_sum (f := fun l => B r l k) (fun _ _ => bot_le) (Finset.mem_univ t) have hr : (∑ l, B r l k) ≤ ∑ j, ∑ l, B j l k := Finset.single_le_sum (f := fun j => ∑ l, B j l k) (fun _ _ => bot_le) (Finset.mem_univ r) have h : B r t k ≤ (∑ j, A j k) + ∑ j, ∑ l, B j l k := (ht.trans hr).trans (le_add_of_nonneg_left bot_le) simpa only [B, if_pos hrt] using h rcases lt_or_gt_of_ne hjl with hlt | hgt · exact hp j l hlt hsupport · exact hp l j hgt (hsupport.trans (Finset.pair_comm j l)) · rw [if_neg hk] exact bot_le have hsum := ENNReal.tsum_le_tsum hpoint rw [ENNReal.tsum_add, component_mass_tsum_sum] at hsum simp_rw [component_mass_tsum_sum] at hsum change reflectedBudget s m.val ≤ _ at hsum convert hsum using 1 congr 1 apply Finset.sum_congr rfl intro j _ apply Finset.sum_congr rfl intro l _ by_cases hjl : j < l <;> simp [B, hjl]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectedBudget_le_ambient_component_budgets · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPooledBudget.lean:24
theorem reflectedBudget_le_local_component_budgets

Local coordinate transport pools the ambient spectral mass into local component budgets. Under the stated conditions.

Formal statement
d :
ℕ
m :
hm :
s :
ℝ
≤ (∑ j, componentFourierBudget 1 s (fun u => g1 m.val j (u 0)))
+ ∑ j, ∑ l, if j < l then componentFourierBudget 2 s (fun u => g2 m.val j l (u 0) (u 1)) else 0
Proof (Lean source)
-- @node: reflectedBudget_le_local_component_budgets lemma reflectedBudget_le_local_component_budgets {d : ℕ} (m : CenteredL2Fn d) (hm : OrderTwo m) (s : ℝ) : reflectedBudget s m.val ≤ (∑ j, componentFourierBudget 1 s (fun u => g1 m.val j (u 0))) + ∑ j, ∑ l, if j < l then componentFourierBudget 2 s (fun u => g2 m.val j l (u 0) (u 1)) else 0 := by apply (reflectedBudget_le_ambient_component_budgets m hm s).trans apply add_le_add · exact Finset.sum_le_sum (fun j _ => g1_ambient_budget_le_local m j s) · apply Finset.sum_le_sum intro j _ apply Finset.sum_le_sum intro l _ by_cases hjl : j < l · simp only [if_pos hjl] exact g2_ambient_budget_le_local m j l (ne_of_lt hjl) s · simp only [if_neg hjl, le_refl]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectedBudget_le_local_component_budgets · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPooledBudget.lean:91
theorem reflectedBudget_le_one_of_sobolevClass

Exact component contraction and the defining pooled restriction budget bound the reflected outcome's weighted Fourier budget by one. Under the stated conditions.

Formal statement
d :
ℕ
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
m :
hm :
reflectedBudget s m.val ≤ 1
Proof (Lean source)
-- @node: reflectedBudget_le_one_of_sobolevClass lemma reflectedBudget_le_one_of_sobolevClass {d : ℕ} {s : ℝ} (hs : 0 < s) (hs1 : s ≤ 1) (m : CenteredL2Fn d) (hm : SobolevClass d s m) : reflectedBudget s m.val ≤ 1 := by apply (reflectedBudget_le_local_component_budgets m hm.orderTwo s).trans apply le_trans _ hm.pooledBudget apply add_le_add · apply Finset.sum_le_sum intro j _ exact componentFourierBudget_le_sobolevNormSq 1 (inl rfl) s hs hs1 _ · apply Finset.sum_le_sum intro j _ apply Finset.sum_le_sum intro l _ by_cases hjl : j < l · simp only [if_pos hjl] exact componentFourierBudget_le_sobolevNormSq 2 (inr rfl) s hs hs1 _ · simp only [if_neg hjl, le_refl]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectedBudget_le_one_of_sobolevClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionPooledBudget.lean:111
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionProfileEndpoint 12 declarations The inverse angular transform is a real linear isometry on all frequency L² classes.

Reflection endpoints on full frequency L² classes

The inverse angular transform is a real linear isometry on all frequency L² classes. Composing it with even reflection supplies the common operator for interpolation. Smooth inverse truncations prove its first-order endpoints in both component dimensions without any L¹ premise on the spatial representative.

[ The inverse angular transform on equivalence classes is real linear.

Definition (Lean source)
p :
ℕ
reflectionInverseL2Linear p :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) →ₗ[ℝ] Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
clause 2
map_add' ψ χ := by apply Lp.ext have h := (reflectionInverseDilation_quasiMeasurePreserving p).ae (Lp.coeFn_add (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ ψ) (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ χ)) filter_upwards [(reflectionInverseL2Representative_memLp (ψ + χ)).coeFn_toLp, (reflectionInverseL2Representative_memLp ψ).coeFn_toLp, (reflectionInverseL2Representative_memLp χ).coeFn_toLp, Lp.coeFn_add ((reflectionInverseL2Representative_memLp ψ).toLp _) ((reflectionInverseL2Representative_memLp χ).toLp _), h] with u hsum hψ hχ hadd hF simp only [hadd, hsum, hψ, hχ, reflectionInverseL2Representative, map_add, hF, Pi.add_apply, smul_add]
clause 3
map_smul' c ψ := by apply Lp.ext have h := (reflectionInverseDilation_quasiMeasurePreserving p).ae (Lp.coeFn_smul c (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ ψ)) filter_upwards [(reflectionInverseL2Representative_memLp (c • ψ)).coeFn_toLp, (reflectionInverseL2Representative_memLp ψ).coeFn_toLp, Lp.coeFn_smul c ((reflectionInverseL2Representative_memLp ψ).toLp _), h] with u hsmul hψ hout hF have hmap := ((Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ).restrictScalars ℝ).map_smul c ψ change (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ) (c • ψ)
= c • (Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ) ψ at hmap simp only [RingHom.id_apply, hout, hsmul, Pi.smul_apply, hψ, reflectionInverseL2Representative] rw [hmap, hF] rw [Pi.smul_apply] exact smul_comm (angularPrefactor p) c ((Lp.fourierTransformₗᵢ (EuclideanSpace ℝ (Fin p)) ℂ ψ) ((2 * pi)⁻¹ • (-u)))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseL2Linear · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:19
theorem reflectionInverseL2Linear_norm

Angular inversion preserves the L² norm with constant exactly one.](goal) This uses the stated conclusion.

Formal statement
p :
ℕ
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
‖reflectionInverseL2Linear p ψ‖ = ‖ψ‖
Proof (Lean source)
-- @node: reflectionInverseL2Linear_norm lemma reflectionInverseL2Linear_norm (p : ℕ) (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : ‖reflectionInverseL2Linear p ψ‖ = ‖ψ‖ := by have h : ‖reflectionInverseL2Linear p ψ‖ ^ 2 = ‖ψ‖ ^ 2 := by rw [reflectionInverseL2Linear, LinearMap.coe_mk, AddHom.coe_mk, reflectionToLp_norm_sq, reflectionInverseL2Representative_energy, reflectionLp_energy_eq_enorm_sq] simp nlinarith [norm_nonneg (reflectionInverseL2Linear p ψ), norm_nonneg ψ]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseL2Linear_norm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:60

[ The complete frequency L² space maps isometrically into spatial L².

Definition (Lean source)
p :
ℕ
reflectionInverseL2Isometry p :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) →ₗᵢ[ℝ] Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
⟨reflectionInverseL2Linear p, reflectionInverseL2Linear_norm p⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInverseL2Isometry · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:72

The common operator for both interpolation endpoints: angular inversion followed by genuine restriction and even reflection.

Definition (Lean source)
p :
ℕ
reflectionProfileOperator p :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) →L[ℝ] Lp ℂ 2 (torusMeasure p)
(reflectionL2Operator p).comp (reflectionInverseL2Isometry p).toContinuousLinearMap
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileOperator · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:79
theorem reflectionProfileOperator_norm_le

The common frequency-to-torus operator contracts the zero-order norm.](goal) This uses the stated conclusion.

Formal statement
p :
ℕ
‖reflectionProfileOperator p‖ ≤ 1
Proof (Lean source)
-- @node: reflectionProfileOperator_norm_le lemma reflectionProfileOperator_norm_le (p : ℕ) : ‖reflectionProfileOperator p‖ ≤ 1 := by refine ContinuousLinearMap.opNorm_le_bound _ (by norm_num) ?_ intro ψ change ‖reflectionL2Operator p (reflectionInverseL2Isometry p ψ)‖ ≤ 1 * ‖ψ‖ calc _ ≤ ‖reflectionL2Operator p‖ * ‖reflectionInverseL2Isometry p ψ‖ := ContinuousLinearMap.le_opNorm _ _ _ ≤ 1 * ‖ψ‖ := by rw [(reflectionInverseL2Isometry p).norm_map] exact mul_le_mul_of_nonneg_right (reflectionL2Operator_norm_le p) (norm_nonneg _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileOperator_norm_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:87
theorem reflectionProfileOperator_tendsto

Smooth profile truncations converge under the actual common reflection operator on every frequency L² class.

Formal statement
p :
ℕ
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
Tendsto (fun n : ℕ => reflectionL2Operator p ((reflectionSmoothApproximation_memLp (Lp.memLp ψ) (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ)))) atTop (𝓝 (reflectionProfileOperator p ψ))
Proof (Lean source)
-- @node: reflectionProfileOperator_tendsto lemma reflectionProfileOperator_tendsto (p : ℕ) (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : Tendsto (fun n : ℕ => reflectionL2Operator p ((reflectionSmoothApproximation_memLp (Lp.memLp ψ) (n : ℝ)).toLp (reflectionSmoothApproximation ψ (n : ℝ)))) atTop (𝓝 (reflectionProfileOperator p ψ)) := by have hclass : (Lp.memLp ψ).toLp (fun ω => ψ ω) = ψ := by apply Lp.ext exact (Lp.memLp ψ).coeFn_toLp have h := (reflectionL2Operator p).continuous.continuousAt.tendsto.comp (reflectionSmoothApproximation_tendsto_inverseL2Representative (Lp.stronglyMeasurable ψ).measurable (Lp.memLp ψ)) rw [hclass] at h exact h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileOperator_tendsto · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:100
theorem reflectionProfileOperator_line_firstOrder_le

The full one-dimensional first-order endpoint holds for all frequency L² classes, including those whose spatial inverse has no L¹ representative.

Formal statement
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin 1)))
(∑' k : Fin 1 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k) * ‖UnitAddTorus.mFourierCoeff (reflectionProfileOperator 1 ψ) k‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2))
Proof (Lean source)
-- @node: reflectionProfileOperator_line_firstOrder_le lemma reflectionProfileOperator_line_firstOrder_le (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin 1)))) : (∑' k : Fin 1 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k) * ‖UnitAddTorus.mFourierCoeff (reflectionProfileOperator 1 ψ) k‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2)) := by exact reflectionTorus_weightedBudget_le_of_tendsto (reflectionProfileOperator_tendsto 1 ψ) (fun k => 1 + pi ^ 2 * frequencySq k) _ (fun n => reflectionSmoothApproximation_line_operator_budget (Lp.memLp ψ) (n : ℝ))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileOperator_line_firstOrder_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:118
theorem reflectionProfileOperator_plane_firstOrder_le

The full two-dimensional endpoint retains the exact gradient factor 1/2 on all frequency L² classes, without additional integrability assumptions.

Formal statement
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin 2)))
(∑' k : Fin 2 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k / 2) * ‖UnitAddTorus.mFourierCoeff (reflectionProfileOperator 2 ψ) k‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / 2))
Proof (Lean source)
-- @node: reflectionProfileOperator_plane_firstOrder_le lemma reflectionProfileOperator_plane_firstOrder_le (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin 2)))) : (∑' k : Fin 2 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k / 2) * ‖UnitAddTorus.mFourierCoeff (reflectionProfileOperator 2 ψ) k‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / 2)) := by exact reflectionTorus_weightedBudget_le_of_tendsto (reflectionProfileOperator_tendsto 2 ψ) (fun k => 1 + pi ^ 2 * frequencySq k / 2) _ (fun n => reflectionSmoothApproximation_plane_operator_budget (Lp.memLp ψ) (n : ℝ))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileOperator_plane_firstOrder_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:131

The whole-space first-order frequency gauge, infinite off the endpoint.

Definition (Lean source)
p :
ℕ
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
reflectionProfileFirstOrderNorm p ψ :
ℝ≥0∞
rpow (∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))) (1 / 2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileFirstOrderNorm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:144

The periodic first-order Fourier gauge with the exact local dimension factor.

Definition (Lean source)
p :
ℕ
f :
Lp ℂ 2 (torusMeasure p)
reflectionTorusFirstOrderNorm p f :
ℝ≥0∞
rpow (∑' k : Fin p → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k / (p : ℝ)) * ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2)) (1 / 2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTorusFirstOrderNorm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:150
theorem reflectionProfileOperator_firstOrder_norm_le

The common operator contracts the full first-order endpoint gauge in both component dimensions; the bound was derived from smooth truncations. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
hp :
p = 1 ∨ p = 2
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
Proof (Lean source)
-- @node: reflectionProfileOperator_firstOrder_norm_le lemma reflectionProfileOperator_firstOrder_norm_le (p : ℕ) (hp : p = 1 ∨ p = 2) (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : reflectionTorusFirstOrderNorm p (reflectionProfileOperator p ψ) ≤ reflectionProfileFirstOrderNorm p ψ := by apply ENNReal.rpow_le_rpow _ (by positivity : (0 : ℝ) ≤ 1 / 2) rcases hp with rfl | rfl · simpa only [Nat.cast_one, div_one] using reflectionProfileOperator_line_firstOrder_le ψ · simpa only [Nat.cast_ofNat] using reflectionProfileOperator_plane_firstOrder_le ψ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileOperator_firstOrder_norm_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:157
theorem reflectionProfileOperator_kNormSq_le

The normalized quadratic K norm contracts under the genuine common reflection operator. Both endpoint bounds are proved here, rather than assumed; the remaining fractional step is identification with the weighted Fourier norms. Under the stated conditions.

Formal statement
p :
ℕ
hp :
p = 1 ∨ p = 2
s :
ℝ
hs :
s ∈ Ioo (0 : ℝ) 1
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
kNormSq (fun f : Lp ℂ 2 (torusMeasure p) => ‖f‖ₑ) (reflectionTorusFirstOrderNorm p) s (reflectionProfileOperator p ψ)
≤ kNormSq (fun f : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) => ‖f‖ₑ) (reflectionProfileFirstOrderNorm p) s ψ
Proof (Lean source)
-- @node: reflectionProfileOperator_kNormSq_le lemma reflectionProfileOperator_kNormSq_le (p : ℕ) (hp : p = 1 ∨ p = 2) (s : ℝ) (hs : s ∈ Ioo (0 : ℝ) 1) (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : kNormSq (fun f : Lp ℂ 2 (torusMeasure p) => ‖f‖ₑ) (reflectionTorusFirstOrderNorm p) s (reflectionProfileOperator p ψ) ≤ kNormSq (fun f : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) => ‖f‖ₑ) (reflectionProfileFirstOrderNorm p) s ψ := by have hzero (χ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : ‖reflectionProfileOperator p χ‖ₑ ≤ (1 : ℝ≥0∞) * ‖χ‖ₑ := by simp only [one_mul, ← ofReal_norm] apply ENNReal.ofReal_le_ofReal calc _ ≤ ‖reflectionProfileOperator p‖ * ‖χ‖ := ContinuousLinearMap.le_opNorm _ _ _ ≤ ‖χ‖ := by simpa using mul_le_mul_of_nonneg_right (reflectionProfileOperator_norm_le p) (norm_nonneg χ) have hone (χ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : reflectionTorusFirstOrderNorm p (reflectionProfileOperator p χ) ≤ (1 : ℝ≥0∞) * reflectionProfileFirstOrderNorm p χ := by simpa only [one_mul] using reflectionProfileOperator_firstOrder_norm_le p hp χ have h := kNormSq_map_le_of_pos (fun f : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p))) => ‖f‖ₑ) (reflectionProfileFirstOrderNorm p) (fun f : Lp ℂ 2 (torusMeasure p) => ‖f‖ₑ) (reflectionTorusFirstOrderNorm p) (reflectionProfileOperator p).toLinearMap.toAddMonoidHom 1 1 (by norm_num) (by norm_num) hzero hone s hs ψ simpa using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileOperator_kNormSq_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionProfileEndpoint.lean:169
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionSmoothDerivative 14 declarations Differentiation under the inverse integral in roadmap (3) produces the genuine coordinate multiplier.

Coordinate derivatives of the smooth inverse truncations

Differentiation under the inverse integral in roadmap (3) produces the genuine coordinate multiplier. Plancherel then identifies its spatial energy exactly.

[ The spatial coordinate derivative constructed by the inverse angular integral.

Definition (Lean source)
p :
ℕ
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
R :
ℝ
r :
Fin p
u :
reflectionSmoothDerivative ψ R r u :
ℂ
Fourier (fun ω => I * (ω r : ℂ) * reflectionFrequencyTruncation ψ R ω) (-u)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothDerivative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:18
theorem reflectionSmoothDerivative_profile_integrable

The derivative's frequency profile is both L¹ and L².](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
r :
Fin p
Integrable (fun ω => I * (ω r : ℂ) * reflectionFrequencyTruncation ψ R ω) volume
Proof (Lean source)
-- @node: reflectionSmoothDerivative_profile_integrable lemma reflectionSmoothDerivative_profile_integrable {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) (r : Fin p) : Integrable (fun ω => I * (ω r : ℂ) * reflectionFrequencyTruncation ψ R ω) volume := by apply reflectionFrequencyTruncation_multiplier_integrable hψ fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothDerivative_profile_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:25
theorem reflectionSmoothDerivative_profile_memLp

Polynomial multiplication on a compact frequency ball preserves L². Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
r :
Fin p
MemLp (fun ω => I * (ω r : ℂ) * reflectionFrequencyTruncation ψ R ω) 2 volume
Proof (Lean source)
-- @node: reflectionSmoothDerivative_profile_memLp lemma reflectionSmoothDerivative_profile_memLp {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) (r : Fin p) : MemLp (fun ω => I * (ω r : ℂ) * reflectionFrequencyTruncation ψ R ω) 2 volume := by apply reflectionFrequencyTruncation_multiplier_memLp hψ fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothDerivative_profile_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:35
theorem reflectionSmoothDerivative_memLp

The actual inverse derivative is spatially square integrable. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
r :
Fin p
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothDerivative_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:45
theorem reflectionSmoothDerivative_energy

Plancherel gives the exact coordinate-weighted energy, without an extra constant. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
r :
Fin p
(∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ R r u‖ ^ 2))
= ∫⁻ ω, ofReal ((ω r) ^ 2 * ‖reflectionFrequencyTruncation ψ R ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionSmoothDerivative_energy lemma reflectionSmoothDerivative_energy {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) (r : Fin p) : (∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ R r u‖ ^ 2)) = ∫⁻ ω, ofReal ((ω r) ^ 2 * ‖reflectionFrequencyTruncation ψ R ω‖ ^ 2) := by simp only [reflectionSmoothDerivative] rw [reflectionInverseIntegral_energy (reflectionSmoothDerivative_profile_integrable hψ R r) (reflectionSmoothDerivative_profile_memLp hψ R r)] apply lintegral_congr intro ω simp [mul_pow, sq_abs]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothDerivative_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:55
theorem reflectionInversePhase_hasDerivAt Lemma reflectionInversePhase_hasDerivAt in the paper ↗

The positive angular phase has the expected derivative on each coordinate slice. The asserted mathematical result follows.

Formal statement
p :
ℕ
ω x :
r :
Fin p
t :
ℝ
HasDerivAt (fun v : ℝ => exp (I * ((∑ j, ω j * updateCoordinate x r v j : ℝ) : ℂ))) (I * (ω r : ℂ) * exp (I * ((∑ j, ω j * updateCoordinate x r t j : ℝ) : ℂ))) t
Proof (Lean source)
-- @node: reflectionInversePhase_hasDerivAt lemma reflectionInversePhase_hasDerivAt {p : ℕ} (ω x : EuclideanSpace ℝ (Fin p)) (r : Fin p) (t : ℝ) : HasDerivAt (fun v : ℝ => exp (I * ((∑ j, ω j * updateCoordinate x r v j : ℝ) : ℂ))) (I * (ω r : ℂ) * exp (I * ((∑ j, ω j * updateCoordinate x r t j : ℝ) : ℂ))) t := by have hc : ContDiff ℝ (↑(⊤ : ℕ∞)) (fun u : EuclideanSpace ℝ (Fin p) => exp (-I * ((∑ j, (-ω) j * u j : ℝ) : ℂ))) := by have hs : ContDiff ℝ (↑(⊤ : ℕ∞)) (fun u : EuclideanSpace ℝ (Fin p) => ∑ j, (-ω) j * u j) := by fun_prop exact (contDiff_const.mul (Complex.ofRealCLM.contDiff.comp hs)).cexp have h := hasDerivAt_test_coordinate_slice _ hc x r t rw [coordinateDerivative_angular_phase] at h simpa only [PiLp.neg_apply, neg_mul, Finset.sum_neg_distrib, Complex.ofReal_neg, mul_neg, neg_neg] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInversePhase_hasDerivAt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:70
theorem reflectionInversePhase_integrable Lemma reflectionInversePhase_integrable in the paper ↗

Positive angular kernels preserve integrability of any L¹ profile. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hχ :
u :
Integrable (fun ω => exp (I * ((∑ j, ω j * u j : ℝ) : ℂ)) * χ ω) volume
Proof (Lean source)
-- @node: reflectionInversePhase_integrable lemma reflectionInversePhase_integrable {p : ℕ} {χ : EuclideanSpace ℝ (Fin p) → ℂ} (hχ : Integrable χ volume) (u : EuclideanSpace ℝ (Fin p)) : Integrable (fun ω => exp (I * ((∑ j, ω j * u j : ℝ) : ℂ)) * χ ω) volume := by simpa only [PiLp.neg_apply, neg_mul, Finset.sum_neg_distrib, Complex.ofReal_neg, mul_neg, neg_neg, mul_comm] using integrable_angular_kernel χ hχ (-u)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionInversePhase_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:89
theorem reflectionSmoothApproximation_hasDerivAt_slice

Differentiation under the inverse integral identifies the constructed derivative on every coordinate line. Compact spectral support supplies its integrable dominator. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
x :
r :
Fin p
t :
ℝ
Proof (Lean source)
-- @node: reflectionSmoothApproximation_hasDerivAt_slice lemma reflectionSmoothApproximation_hasDerivAt_slice {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) (x : EuclideanSpace ℝ (Fin p)) (r : Fin p) (t : ℝ) : HasDerivAt (fun v : ℝ => reflectionSmoothApproximation ψ R (updateCoordinate x r v)) (reflectionSmoothDerivative ψ R r (updateCoordinate x r t)) t := by let χ := reflectionFrequencyTruncation ψ R let D := fun ω => I * (ω r : ℂ) * χ ω let F := fun v ω => exp (I * ((∑ j, ω j * updateCoordinate x r v j : ℝ) : ℂ)) * χ ω let F' := fun v ω => exp (I * ((∑ j, ω j * updateCoordinate x r v j : ℝ) : ℂ)) * D ω have hχ : Integrable χ volume := reflectionFrequencyTruncation_integrable hψ R have hD : Integrable D volume := reflectionSmoothDerivative_profile_integrable hψ R r have hF (v : ℝ) : Integrable (F v) volume := reflectionInversePhase_integrable hχ (updateCoordinate x r v) have hF' (v : ℝ) : Integrable (F' v) volume := reflectionInversePhase_integrable hD (updateCoordinate x r v) have hb : ∀ᵐ ω ∂volume, ∀ v ∈ (Set.univ : Set ℝ), ‖F' v ω‖ ≤ ‖D ω‖ := by filter_upwards [] with ω v hv simp [F', Complex.norm_exp] have hd : ∀ᵐ ω ∂volume, ∀ v ∈ (Set.univ : Set ℝ), HasDerivAt (fun z => F z ω) (F' v ω) v := by filter_upwards [] with ω v hv convert! (reflectionInversePhase_hasDerivAt ω x r v).mul_const (χ ω) using 1 dsimp [F', D] ring have h := (hasDerivAt_integral_of_dominated_loc_of_deriv_le (s := Set.univ) (bound := fun ω => ‖D ω‖) (Filter.univ_mem) (Eventually.of_forall fun v => (hF v).aestronglyMeasurable) (hF t) (hF' t).aestronglyMeasurable hb hD.norm hd).2 have he : reflectionSmoothDerivative ψ R r (updateCoordinate x r t) = (2 * pi) ^ (-(p : ℝ) / 2) • ∫ ω, F' t ω := by simp only [reflectionSmoothDerivative, Fourier, PiLp.neg_apply, neg_mul, Finset.sum_neg_distrib, Complex.ofReal_neg, mul_neg, neg_neg] congr 1 apply integral_congr_ae filter_upwards [] with ω dsimp [F', D, χ] congr 4 exact Finset.sum_congr rfl (fun j hj => mul_comm _ _) rw [he] convert! h.const_smul ((2 * pi) ^ (-(p : ℝ) / 2)) using 1 funext v exact reflectionSmoothApproximation_eq_integral ψ R (updateCoordinate x r v)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_hasDerivAt_slice · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:100
theorem reflectionSmoothApproximation_coordinateDerivative

The constructed slice derivative is the genuine Fréchet coordinate derivative. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
r :
Fin p
x :
Proof (Lean source)
-- @node: reflectionSmoothApproximation_coordinateDerivative lemma reflectionSmoothApproximation_coordinateDerivative {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) (r : Fin p) (x : EuclideanSpace ℝ (Fin p)) : coordinateDerivative (reflectionSmoothApproximation ψ R) r x = reflectionSmoothDerivative ψ R r x := by have he : updateCoordinate x r (x r) = x := by ext j simp [updateCoordinate] have h₁ := hasDerivAt_test_coordinate_slice _ (reflectionSmoothApproximation_contDiff hψ R) x r (x r) have h₂ := reflectionSmoothApproximation_hasDerivAt_slice hψ R x r (x r) rw [he] at h₁ h₂ exact h₁.unique h₂
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_coordinateDerivative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:148
theorem reflectionSmoothDerivative_continuous

[ Each constructed coordinate derivative is continuous, even though the spectral cutoff itself has a discontinuity at the ball boundary. This uses the hψ hypothesis, the stated conclusion.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
r :
Fin p
Proof (Lean source)
-- @node: reflectionSmoothDerivative_continuous @[fun_prop] lemma reflectionSmoothDerivative_continuous {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) (r : Fin p) : Continuous (reflectionSmoothDerivative ψ R r) := by exact (angularFourier_continuous _ (reflectionSmoothDerivative_profile_integrable hψ R r)).comp continuous_neg
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothDerivative_continuous · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:164
theorem reflectionSmoothApproximation_gradient_energy

All spatial coordinate derivative energies together equal the exact radial frequency moment; no dimension factor enters Plancherel.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
(∑ r : Fin p, ∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ R r u‖ ^ 2))
= ∫⁻ ω, ofReal (‖ω‖ ^ 2 * ‖reflectionFrequencyTruncation ψ R ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_gradient_energy lemma reflectionSmoothApproximation_gradient_energy {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : (∑ r : Fin p, ∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ R r u‖ ^ 2)) = ∫⁻ ω, ofReal (‖ω‖ ^ 2 * ‖reflectionFrequencyTruncation ψ R ω‖ ^ 2) := by simp_rw [reflectionSmoothDerivative_energy hψ] rw [← lintegral_finsetSum'] · apply lintegral_congr intro ω rw [norm_sq_eq_sum_coordinates, Finset.sum_mul, ENNReal.ofReal_sum_of_nonneg] intro r hr positivity · intro r hr have hm := (reflectionFrequencyTruncation_memLp hψ R).aestronglyMeasurable exact (ENNReal.continuous_ofReal.comp_aestronglyMeasurable ((by fun_prop : Continuous (fun ω : EuclideanSpace ℝ (Fin p) => (ω r) ^ 2)).aestronglyMeasurable.mul (hm.norm.pow 2))).aemeasurable
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_gradient_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:173
theorem reflectionSmoothApproximation_firstOrder_energy

Roadmap (3)'s exact first-order energy identity for the smooth inverse truncations, expressed using their actual coordinate derivatives. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
(∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u‖ ^ 2))
+ ofReal ((p : ℝ)⁻¹) * (∑ r : Fin p, ∫⁻ u, ofReal (‖coordinateDerivative (reflectionSmoothApproximation ψ R) r u‖ ^ 2))
= ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ R ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_firstOrder_energy lemma reflectionSmoothApproximation_firstOrder_energy {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : (∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u‖ ^ 2)) + ofReal ((p : ℝ)⁻¹) * (∑ r : Fin p, ∫⁻ u, ofReal (‖coordinateDerivative (reflectionSmoothApproximation ψ R) r u‖ ^ 2)) = ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ R ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ))) := by simp_rw [reflectionSmoothApproximation_coordinateDerivative hψ] rw [reflectionSmoothApproximation_energy hψ, reflectionSmoothApproximation_gradient_energy hψ, ← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] have hm : AEMeasurable (fun ω => ofReal (‖reflectionFrequencyTruncation ψ R ω‖ ^ 2)) volume := (ENNReal.continuous_ofReal.comp_aestronglyMeasurable ((reflectionFrequencyTruncation_memLp hψ R).aestronglyMeasurable.norm.pow 2)).aemeasurable rw [← lintegral_add_left' hm] apply lintegral_congr intro ω rw [← ENNReal.ofReal_mul (by positivity), ← ENNReal.ofReal_add (by positivity) (by positivity)] congr 1 simp only [div_eq_mul_inv] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_firstOrder_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:195
theorem reflectionSmoothApproximation_firstOrder_le_profile

Restricting the spectral profile to a ball cannot increase the exact H¹ energy. Combined with the identity above this is the spatial approximation bound. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
(∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u‖ ^ 2))
+ ofReal ((p : ℝ)⁻¹) * (∑ r : Fin p, ∫⁻ u, ofReal (‖coordinateDerivative (reflectionSmoothApproximation ψ R) r u‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_firstOrder_le_profile lemma reflectionSmoothApproximation_firstOrder_le_profile {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : (∫⁻ u, ofReal (‖reflectionSmoothApproximation ψ R u‖ ^ 2)) + ofReal ((p : ℝ)⁻¹) * (∑ r : Fin p, ∫⁻ u, ofReal (‖coordinateDerivative (reflectionSmoothApproximation ψ R) r u‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ))) := by rw [reflectionSmoothApproximation_firstOrder_energy hψ] apply lintegral_mono intro ω by_cases hω : ω ∈ closedBall 0 R · simp [reflectionFrequencyTruncation, hω] · simp [reflectionFrequencyTruncation, hω]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_firstOrder_le_profile · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:223
theorem reflectionSmoothDerivative_difference_energy

The exact coordinate-energy identity also holds for differences of two smooth truncations, as required in endpoint completion. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R S :
ℝ
r :
Fin p
(∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ R r u - reflectionSmoothDerivative ψ S r u‖ ^ 2))
= ∫⁻ ω, ofReal ((ω r) ^ 2 * ‖reflectionFrequencyTruncation ψ R ω - reflectionFrequencyTruncation ψ S ω‖ ^ 2)
Proof (Lean source)
-- @node: reflectionSmoothDerivative_difference_energy lemma reflectionSmoothDerivative_difference_energy {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R S : ℝ) (r : Fin p) : (∫⁻ u, ofReal (‖reflectionSmoothDerivative ψ R r u - reflectionSmoothDerivative ψ S r u‖ ^ 2)) = ∫⁻ ω, ofReal ((ω r) ^ 2 * ‖reflectionFrequencyTruncation ψ R ω - reflectionFrequencyTruncation ψ S ω‖ ^ 2) := by simp only [reflectionSmoothDerivative] rw [reflectionInverseIntegral_difference_energy (reflectionSmoothDerivative_profile_integrable hψ R r) (reflectionSmoothDerivative_profile_memLp hψ R r) (reflectionSmoothDerivative_profile_integrable hψ S r) (reflectionSmoothDerivative_profile_memLp hψ S r)] apply lintegral_congr intro ω rw [← mul_sub] simp [mul_pow, sq_abs]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothDerivative_difference_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothDerivative.lean:240
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionSmoothEndpoint 17 declarations Coordinate changes preserve Lebesgue measure.

Spectral endpoints for the actual smooth inverse truncations

Coordinate changes preserve Lebesgue measure. The slice and plane reflected Parseval identities therefore apply to the genuine inverse angular truncations, with their actual derivatives and exact whole-space Fourier energy.

theorem reflectionLine_coordinates_measurePreserving Lemma reflectionLine_coordinates_measurePreserving in the paper ↗

The single-coordinate parametrization of Euclidean one-space preserves volume.

Formal statement
MeasurePreserving (fun x : ℝ => toLp 2 (fun _ : Fin 1 => x)) volume (volume : Measure (EuclideanSpace ℝ (Fin 1)))
Proof (Lean source)
-- @node: reflectionLine_coordinates_measurePreserving lemma reflectionLine_coordinates_measurePreserving : MeasurePreserving (fun x : ℝ => toLp 2 (fun _ : Fin 1 => x)) volume (volume : Measure (EuclideanSpace ℝ (Fin 1))) := by have h := (volume_preserving_funUnique (Fin 1) ℝ).symm (MeasurableEquiv.funUnique (Fin 1) ℝ) exact (PiLp.volume_preserving_toLp (Fin 1)).comp h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionLine_coordinates_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:20
theorem reflectionSmoothApproximation_line_hasDerivAt

On the real-line parametrization, the constructed coordinate derivative is the actual derivative of the smooth inverse truncation. Under the stated conditions, the asserted mathematical result follows.

Formal statement
ψ :
EuclideanSpace ℝ (Fin 1) → ℂ
hψ :
R x :
ℝ
HasDerivAt (fun t : ℝ => reflectionSmoothApproximation ψ R (toLp 2 (fun _ : Fin 1 => t))) (reflectionSmoothDerivative ψ R 0 (toLp 2 (fun _ : Fin 1 => x))) x
Proof (Lean source)
-- @node: reflectionSmoothApproximation_line_hasDerivAt lemma reflectionSmoothApproximation_line_hasDerivAt {ψ : EuclideanSpace ℝ (Fin 1) → ℂ} (hψ : MemLp ψ 2 volume) (R x : ℝ) : HasDerivAt (fun t : ℝ => reflectionSmoothApproximation ψ R (toLp 2 (fun _ : Fin 1 => t))) (reflectionSmoothDerivative ψ R 0 (toLp 2 (fun _ : Fin 1 => x))) x := by have he (t : ℝ) : updateCoordinate (0 : EuclideanSpace ℝ (Fin 1)) 0 t = toLp 2 (fun _ : Fin 1 => t) := by ext j fin_cases j simp [updateCoordinate] simpa only [he] using reflectionSmoothApproximation_hasDerivAt_slice hψ R 0 0 x
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_line_hasDerivAt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:29
theorem reflectionSmoothApproximation_line_spectral_le_profile

The one-dimensional smooth reflected spectrum contracts the exact angular first-order frequency energy. No derivative or endpoint bound is assumed. Under the stated conditions.

Formal statement
ψ :
EuclideanSpace ℝ (Fin 1) → ℂ
hψ :
R :
ℝ
(∑' a : ℤ, ofReal ((1 + pi ^ 2 * (a : ℝ) ^ 2) * ‖periodTwoSliceCoeff (evenReflectionSlice (fun x => reflectionSmoothApproximation ψ R (toLp 2 (fun _ : Fin 1 => x)))) a‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_line_spectral_le_profile lemma reflectionSmoothApproximation_line_spectral_le_profile {ψ : EuclideanSpace ℝ (Fin 1) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : (∑' a : ℤ, ofReal ((1 + pi ^ 2 * (a : ℝ) ^ 2) * ‖periodTwoSliceCoeff (evenReflectionSlice (fun x => reflectionSmoothApproximation ψ R (toLp 2 (fun _ : Fin 1 => x)))) a‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2)) := by let e : ℝ → EuclideanSpace ℝ (Fin 1) := fun x => toLp 2 (fun _ => x) let f : ℝ → ℂ := fun x => reflectionSmoothApproximation ψ R (e x) let f' : ℝ → ℂ := fun x => reflectionSmoothDerivative ψ R 0 (e x) have hd : ∀ x, HasDerivAt f (f' x) x := reflectionSmoothApproximation_line_hasDerivAt hψ R have hc : Continuous f' := by dsimp [f', e] fun_prop have hL : MemLp f 2 volume := (reflectionSmoothApproximation_memLp hψ R).comp_measurePreserving reflectionLine_coordinates_measurePreserving have hD : MemLp f' 2 volume := (reflectionSmoothDerivative_memLp hψ R 0).comp_measurePreserving reflectionLine_coordinates_measurePreserving have hs := evenReflectionSlice_firstOrder_parseval hd hc have hb := evenReflectionSlice_firstOrder_le_wholeSpace hd hc hL hD have he (F : EuclideanSpace ℝ (Fin 1) → ℂ) : (∫⁻ x : ℝ, ofReal (‖F (e x)‖ ^ 2)) = ∫⁻ u, ofReal (‖F u‖ ^ 2) := by exact reflectionLine_coordinates_measurePreserving.lintegral_comp_emb ((MeasurableEquiv.funUnique (Fin 1) ℝ).symm.trans (MeasurableEquiv.toLp 2 (Fin 1 → ℝ))).measurableEmbedding (fun u => ofReal (‖F u‖ ^ 2)) change (∑' a : ℤ, ofReal ((1 + pi ^ 2 * (a : ℝ) ^ 2) * ‖periodTwoSliceCoeff (evenReflectionSlice f) a‖ ^ 2)) ≤ _ rw [← ENNReal.ofReal_tsum_of_nonneg (fun a => by positivity) hs.summable] refine (ENNReal.ofReal_le_ofReal hb).trans ?_ rw [ENNReal.ofReal_add (integral_nonneg (fun _ => sq_nonneg _)) (integral_nonneg (fun _ => sq_nonneg _)), ofReal_integral_eq_lintegral_ofReal (hL.integrable_norm_pow (by norm_num)) (Eventually.of_forall fun _ => sq_nonneg _), ofReal_integral_eq_lintegral_ofReal (hD.integrable_norm_pow (by norm_num)) (Eventually.of_forall fun _ => sq_nonneg _)] dsimp only [f, f'] rw [he, he] have h := reflectionSmoothApproximation_firstOrder_le_profile hψ R simp only [reflectionSmoothApproximation_coordinateDerivative hψ, Fin.sum_univ_one, Nat.cast_one, inv_one, ENNReal.ofReal_one, one_mul, div_one] at h exact h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_line_spectral_le_profile · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:45
theorem reflectionPlane_coordinates_measurePreserving Lemma reflectionPlane_coordinates_measurePreserving in the paper ↗

The two-coordinate parametrization of Euclidean two-space preserves volume. The asserted mathematical result follows.

Formal statement
MeasurePreserving (fun z : ℝ × ℝ => toLp 2 ![z.1, z.2]) volume (volume : Measure (EuclideanSpace ℝ (Fin 2)))
Proof (Lean source)
-- @node: reflectionPlane_coordinates_measurePreserving lemma reflectionPlane_coordinates_measurePreserving : MeasurePreserving (fun z : ℝ × ℝ => toLp 2 ![z.1, z.2]) volume (volume : Measure (EuclideanSpace ℝ (Fin 2))) := by have h := (volume_preserving_finTwoArrow ℝ).symm MeasurableEquiv.finTwoArrow exact (PiLp.volume_preserving_toLp (Fin 2)).comp h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionPlane_coordinates_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:94
theorem reflectionSmoothApproximation_plane_hasDerivAt

Both real coordinate slices of the genuine two-dimensional truncation have the constructed inverse derivatives. Under the stated conditions, the asserted mathematical result follows.

Formal statement
ψ :
EuclideanSpace ℝ (Fin 2) → ℂ
hψ :
R x y :
ℝ
conclusion 1
HasDerivAt (fun t : ℝ => reflectionSmoothApproximation ψ R (toLp 2 ![t, y])) (reflectionSmoothDerivative ψ R 0 (toLp 2 ![x, y])) x
conclusion 2
HasDerivAt (fun t : ℝ => reflectionSmoothApproximation ψ R (toLp 2 ![x, t])) (reflectionSmoothDerivative ψ R 1 (toLp 2 ![x, y])) y
Proof (Lean source)
-- @node: reflectionSmoothApproximation_plane_hasDerivAt lemma reflectionSmoothApproximation_plane_hasDerivAt {ψ : EuclideanSpace ℝ (Fin 2) → ℂ} (hψ : MemLp ψ 2 volume) (R x y : ℝ) : HasDerivAt (fun t : ℝ => reflectionSmoothApproximation ψ R (toLp 2 ![t, y])) (reflectionSmoothDerivative ψ R 0 (toLp 2 ![x, y])) x ∧ HasDerivAt (fun t : ℝ => reflectionSmoothApproximation ψ R (toLp 2 ![x, t])) (reflectionSmoothDerivative ψ R 1 (toLp 2 ![x, y])) y := by have hx (t : ℝ) : updateCoordinate (toLp 2 ![x, y]) 0 t = toLp 2 ![t, y] := by ext j fin_cases j <;> simp [updateCoordinate] have hy (t : ℝ) : updateCoordinate (toLp 2 ![x, y]) 1 t = toLp 2 ![x, t] := by ext j fin_cases j <;> simp [updateCoordinate] constructor · simpa only [hx] using reflectionSmoothApproximation_hasDerivAt_slice hψ R (toLp 2 ![x, y]) 0 x · simpa only [hy] using reflectionSmoothApproximation_hasDerivAt_slice hψ R (toLp 2 ![x, y]) 1 y
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_plane_hasDerivAt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:102
theorem reflectionSmoothApproximation_plane_spectral_le_profile

The actual two-dimensional smooth reflected spectrum contracts the angular first-order energy with exactly the local gradient factor one half. Under the stated conditions.

Formal statement
ψ :
EuclideanSpace ℝ (Fin 2) → ℂ
hψ :
R :
ℝ
(∑' k : ℤ × ℤ, ofReal ((1 + pi ^ 2 * ((k.1 : ℝ) ^ 2 + (k.2 : ℝ) ^ 2) / 2) * ‖periodTwoPlaneCoeff (evenReflectionPlane (fun x y => reflectionSmoothApproximation ψ R (toLp 2 ![x, y]))) k.1 k.2‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / 2))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_plane_spectral_le_profile lemma reflectionSmoothApproximation_plane_spectral_le_profile {ψ : EuclideanSpace ℝ (Fin 2) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : (∑' k : ℤ × ℤ, ofReal ((1 + pi ^ 2 * ((k.1 : ℝ) ^ 2 + (k.2 : ℝ) ^ 2) / 2) * ‖periodTwoPlaneCoeff (evenReflectionPlane (fun x y => reflectionSmoothApproximation ψ R (toLp 2 ![x, y]))) k.1 k.2‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / 2)) := by let e : ℝ × ℝ → EuclideanSpace ℝ (Fin 2) := fun z => toLp 2 ![z.1, z.2] let f : ℝ → ℝ → ℂ := fun x y => reflectionSmoothApproximation ψ R (e (x, y)) let fx : ℝ → ℝ → ℂ := fun x y => reflectionSmoothDerivative ψ R 0 (e (x, y)) let fy : ℝ → ℝ → ℂ := fun x y => reflectionSmoothDerivative ψ R 1 (e (x, y)) have hdx : ∀ x y, HasDerivAt (fun t => f t y) (fx x y) x := fun x y => (reflectionSmoothApproximation_plane_hasDerivAt hψ R x y).1 have hdy : ∀ x y, HasDerivAt (f x) (fy x y) y := fun x y => (reflectionSmoothApproximation_plane_hasDerivAt hψ R x y).2 have hf : Continuous f.uncurry := by dsimp [f, uncurry, e] exact (reflectionSmoothApproximation_contDiff hψ R).continuous.comp (by fun_prop) have hfx : Continuous fx.uncurry := by dsimp [fx, uncurry, e]; fun_prop have hfy : Continuous fy.uncurry := by dsimp [fy, uncurry, e]; fun_prop have hL : MemLp f.uncurry 2 volume := (reflectionSmoothApproximation_memLp hψ R).comp_measurePreserving reflectionPlane_coordinates_measurePreserving have hDx : MemLp fx.uncurry 2 volume := (reflectionSmoothDerivative_memLp hψ R 0).comp_measurePreserving reflectionPlane_coordinates_measurePreserving have hDy : MemLp fy.uncurry 2 volume := (reflectionSmoothDerivative_memLp hψ R 1).comp_measurePreserving reflectionPlane_coordinates_measurePreserving have hs := evenReflectionPlane_firstOrder_parseval hdx hdy hf hfx hfy have hb := evenReflectionPlane_firstOrder_spectral_le_wholeSpace hdx hdy hf hfx hfy hL hDx hDy have he (F : EuclideanSpace ℝ (Fin 2) → ℂ) : (∫⁻ z : ℝ × ℝ, ofReal (‖F (e z)‖ ^ 2)) = ∫⁻ u, ofReal (‖F u‖ ^ 2) := by exact reflectionPlane_coordinates_measurePreserving.lintegral_comp_emb (MeasurableEquiv.finTwoArrow.symm.trans (MeasurableEquiv.toLp 2 (Fin 2 → ℝ))).measurableEmbedding (fun u => ofReal (‖F u‖ ^ 2)) change (∑' k : ℤ × ℤ, ofReal ((1 + pi ^ 2 * ((k.1 : ℝ) ^ 2 + (k.2 : ℝ) ^ 2) / 2) * ‖periodTwoPlaneCoeff (evenReflectionPlane f) k.1 k.2‖ ^ 2)) ≤ _ rw [← ENNReal.ofReal_tsum_of_nonneg (fun k => by positivity) hs.summable] refine (ENNReal.ofReal_le_ofReal hb).trans ?_ change MemLp (fun z : ℝ × ℝ => f z.1 z.2) 2 volume at hL change MemLp (fun z : ℝ × ℝ => fx z.1 z.2) 2 volume at hDx change MemLp (fun z : ℝ × ℝ => fy z.1 z.2) 2 volume at hDy rw [ENNReal.ofReal_add (integral_nonneg (fun _ => sq_nonneg _)) (by positivity), ENNReal.ofReal_mul (by norm_num : (0 : ℝ) ≤ 1 / 2), ENNReal.ofReal_add (integral_nonneg (fun _ => sq_nonneg _)) (integral_nonneg (fun _ => sq_nonneg _)), ofReal_integral_eq_lintegral_ofReal (hL.integrable_norm_pow (by norm_num)) (Eventually.of_forall fun _ => sq_nonneg _), ofReal_integral_eq_lintegral_ofReal (hDx.integrable_norm_pow (by norm_num)) (Eventually.of_forall fun _ => sq_nonneg _), ofReal_integral_eq_lintegral_ofReal (hDy.integrable_norm_pow (by norm_num)) (Eventually.of_forall fun _ => sq_nonneg _)] dsimp only [f, fx, fy] rw [he, he, he] have h := reflectionSmoothApproximation_firstOrder_le_profile hψ R simpa only [reflectionSmoothApproximation_coordinateDerivative hψ, Fin.sum_univ_two, Nat.cast_ofNat, one_div] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_plane_spectral_le_profile · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:126
theorem reflectionTorusCoeff_line_eq_slice

The unit-circle coordinate convention gives precisely the normalized period-two slice coefficient after folding, for any complex cube slice. The asserted mathematical result follows.

Formal statement
f :
ℝ → ℂ
a :
ℤ
mFourierCoeff (fun y : Torus 1 => f (fold y 0)) (fun _ => a)
Proof (Lean source)
-- @node: reflectionTorusCoeff_line_eq_slice lemma reflectionTorusCoeff_line_eq_slice (f : ℝ → ℂ) (a : ℤ) : mFourierCoeff (fun y : Torus 1 => f (fold y 0)) (fun _ => a) = periodTwoSliceCoeff (evenReflectionSlice f) a := by have h := (measurePreserving_funUnique haarAddCircle (Fin 1)).symm (MeasurableEquiv.funUnique (Fin 1) UnitAddCircle) have hi := h.integral_comp (MeasurableEquiv.funUnique (Fin 1) UnitAddCircle).symm.measurableEmbedding (fun y : Torus 1 => mFourier (-(fun _ => a)) y * f (fold y 0)) unfold mFourierCoeff simp only [smul_eq_mul] change (∫ y : Torus 1, mFourier (-(fun _ => a)) y * f (fold y 0) ∂torusMeasure 1) = _ rw [← hi, AddCircle.integral_haarAddCircle] norm_num only [inv_one, one_smul] rw [← UnitAddCircle.intervalIntegral_preimage 0] norm_num only [zero_add] change (∫ u in (0 : ℝ)..1, mFourier (-(fun _ : Fin 1 => a)) (fun _ => (u : UnitAddCircle)) * f (fold (fun _ : Fin 1 => (u : UnitAddCircle)) 0)) = _ have he : (∫ u in (0 : ℝ)..1, mFourier (-(fun _ : Fin 1 => a)) (fun _ => (u : UnitAddCircle)) * f (fold (fun _ : Fin 1 => (u : UnitAddCircle)) 0)) = ∫ u in (0 : ℝ)..1, fourier (-a) ((2 * u : ℝ) : AddCircle (2 : ℝ)) * evenReflectionSlice f (2 * u) := by apply intervalIntegral.integral_congr_uIoo intro u hu have hu' : u ∈ Ioo (0 : ℝ) 1 := by simpa [uIoo] using hu have hfold : fold (fun _ : Fin 1 => (u : UnitAddCircle)) 0 = min (2 * u) (2 - 2 * u) := by unfold fold rw [AddCircle.equivIco_coe_of_mem] exact ⟨hu'.1.le, by simpa using hu'.2⟩ have hf : f (fold (fun _ : Fin 1 => (u : UnitAddCircle)) 0) = evenReflectionSlice f (2 * u) := by rw [hfold] unfold evenReflectionSlice by_cases hu2 : 2 * u ≤ 1 · rw [if_pos hu2, min_eq_left (by linarith)] · rw [if_neg hu2, min_eq_right (by linarith)] dsimp only rw [hf] congr 1 simp only [mFourier, ContinuousMap.coe_mk, Fin.prod_univ_one, Pi.neg_apply, fourier_coe_apply] congr 1 push_cast ring rw [he, intervalIntegral.integral_comp_mul_left (fun y : ℝ => fourier (-a) (y : AddCircle (2 : ℝ)) * evenReflectionSlice f y) (by norm_num : (2 : ℝ) ≠ 0)] norm_num [periodTwoSliceCoeff, Complex.real_smul, smul_eq_mul]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTorusCoeff_line_eq_slice · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:192
theorem reflectionL2Operator_line_coeff_eq_slice

The actual whole-space reflection operator's coefficients agree with the period-two slice coefficients, independently of the chosen L² representative. Under the stated conditions, the asserted mathematical result follows.

Formal statement
G :
EuclideanSpace ℝ (Fin 1) → ℂ
hG :
a :
ℤ
mFourierCoeff (reflectionL2Operator 1 (hG.toLp G)) (fun _ => a)
= periodTwoSliceCoeff (evenReflectionSlice (fun x => G (toLp 2 (fun _ : Fin 1 => x)))) a
Proof (Lean source)
-- @node: reflectionL2Operator_line_coeff_eq_slice lemma reflectionL2Operator_line_coeff_eq_slice {G : EuclideanSpace ℝ (Fin 1) → ℂ} (hG : MemLp G 2 volume) (a : ℤ) : mFourierCoeff (reflectionL2Operator 1 (hG.toLp G)) (fun _ => a) = periodTwoSliceCoeff (evenReflectionSlice (fun x => G (toLp 2 (fun _ : Fin 1 => x)))) a := by rw [← reflectionTorusCoeff_line_eq_slice] have hr := (foldEuclidean_measurePreserving 1).quasiMeasurePreserving.ae (ae_restrict_of_ae hG.coeFn_toLp) apply integral_congr_ae filter_upwards [reflectionL2Operator_coeFn 1 (hG.toLp G), hr] with y hy hr have he : toLp 2 (fold y) = toLp 2 (fun _ : Fin 1 => fold y 0) := by ext j fin_cases j rfl simp only [smul_eq_mul] rw [hy, hr, he]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionL2Operator_line_coeff_eq_slice · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:245
theorem reflectionSmoothApproximation_line_operator_budget

Smooth inverse truncations satisfy the first-order bound in the actual torus L² operator, rather than merely in interval coordinates. Under the stated conditions.

Formal statement
ψ :
EuclideanSpace ℝ (Fin 1) → ℂ
hψ :
R :
ℝ
(∑' k : Fin 1 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k) * ‖UnitAddTorus.mFourierCoeff (reflectionL2Operator 1 ((reflectionSmoothApproximation_memLp hψ R).toLp (reflectionSmoothApproximation ψ R))) k‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_line_operator_budget lemma reflectionSmoothApproximation_line_operator_budget {ψ : EuclideanSpace ℝ (Fin 1) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : (∑' k : Fin 1 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k) * ‖UnitAddTorus.mFourierCoeff (reflectionL2Operator 1 ((reflectionSmoothApproximation_memLp hψ R).toLp (reflectionSmoothApproximation ψ R))) k‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2)) := by rw [← (Equiv.funUnique (Fin 1) ℤ).symm.tsum_eq] have he (a : ℤ) : (Equiv.funUnique (Fin 1) ℤ).symm a = (fun _ => a) := by funext j simp [Equiv.funUnique, Equiv.piUnique, uniqueElim_const] simp_rw [he] simpa only [reflectionL2Operator_line_coeff_eq_slice, frequencySq, Fin.sum_univ_one] using reflectionSmoothApproximation_line_spectral_le_profile hψ R
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_line_operator_budget · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:265
theorem reflectionL2Operator_line_firstOrder_le

Spatial L² convergence passes the proved smooth spectral bound to every admissible one-dimensional extension, with no trace condition or assumed endpoint. Under the stated conditions.

Formal statement
G :
EuclideanSpace ℝ (Fin 1) → ℂ
hG1 :
hG2 :
(∑' k : Fin 1 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k) * ‖UnitAddTorus.mFourierCoeff (reflectionL2Operator 1 (hG2.toLp G)) k‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2))
Proof (Lean source)
-- @node: reflectionL2Operator_line_firstOrder_le lemma reflectionL2Operator_line_firstOrder_le {G : EuclideanSpace ℝ (Fin 1) → ℂ} (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) : (∑' k : Fin 1 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k) * ‖UnitAddTorus.mFourierCoeff (reflectionL2Operator 1 (hG2.toLp G)) k‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2)) := by have hF := angularFourier_memLp G hG1 hG2 exact reflectionTorus_weightedBudget_le_of_tendsto (reflectionSmoothApproximation_tendsto_reflected_original hG1 hG2) (fun k => 1 + pi ^ 2 * frequencySq k) _ (fun n => reflectionSmoothApproximation_line_operator_budget hF (n : ℝ))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionL2Operator_line_firstOrder_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:283
theorem componentFourierBudget_one_firstOrder_le Lemma componentFourierBudget_one_firstOrder_le in the paper ↗

Taking the infimum over genuine extensions proves the complete one-dimensional component contraction at the first-order endpoint. The asserted mathematical result follows.

Formal statement
g :
Cube 1 → ℝ
Proof (Lean source)
-- @node: componentFourierBudget_one_firstOrder_le lemma componentFourierBudget_one_firstOrder_le (g : Cube 1 → ℝ) : componentFourierBudget 1 1 g ≤ sobolevNormSq 1 1 g := by unfold sobolevNormSq refine le_iInf fun G => le_iInf fun hG => ?_ have h := reflectionL2Operator_line_firstOrder_le hG.1 hG.2.1 simp_rw [reflectionTorusCoeff_extension hG.2.1 g hG.2.2] at h simpa only [componentFourierBudget, Nat.cast_one, div_one, Real.rpow_one] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.componentFourierBudget_one_firstOrder_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:298
theorem reflectionCircleCoeff_eq_slice

The folded one-coordinate coefficient can be integrated directly on the circle.

Formal statement
f :
ℝ → ℂ
a :
ℤ
(∫ u : UnitAddCircle, mFourier (fun _ : Fin 1 => -a) (fun _ => u) * f (fold (fun _ : Fin 1 => u) 0) ∂AddCircle.haarAddCircle)
Proof (Lean source)
-- @node: reflectionCircleCoeff_eq_slice lemma reflectionCircleCoeff_eq_slice (f : ℝ → ℂ) (a : ℤ) : (∫ u : UnitAddCircle, mFourier (fun _ : Fin 1 => -a) (fun _ => u) * f (fold (fun _ : Fin 1 => u) 0) ∂AddCircle.haarAddCircle) = periodTwoSliceCoeff (evenReflectionSlice f) a := by have h := (measurePreserving_funUnique haarAddCircle (Fin 1)).symm (MeasurableEquiv.funUnique (Fin 1) UnitAddCircle) have hi := h.integral_comp (MeasurableEquiv.funUnique (Fin 1) UnitAddCircle).symm.measurableEmbedding (fun y : Torus 1 => mFourier (-(fun _ => a)) y * f (fold y 0)) exact hi.trans (reflectionTorusCoeff_line_eq_slice f a)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionCircleCoeff_eq_slice · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:309
theorem reflectionTorusCoeff_plane_eq_plane

The two-dimensional torus coefficient is the iterated period-two coefficient of the actual folded whole-space representative. Under the stated conditions, the asserted mathematical result follows.

Formal statement
G :
EuclideanSpace ℝ (Fin 2) → ℂ
hG :
a b :
ℤ
mFourierCoeff (fun y : Torus 2 => G (toLp 2 (fold y))) ![a, b]
= periodTwoPlaneCoeff (evenReflectionPlane (fun x y => G (toLp 2 ![x, y]))) a b
Proof (Lean source)
-- @node: reflectionTorusCoeff_plane_eq_plane lemma reflectionTorusCoeff_plane_eq_plane {G : EuclideanSpace ℝ (Fin 2) → ℂ} (hG : MemLp G 2 volume) (a b : ℤ) : mFourierCoeff (fun y : Torus 2 => G (toLp 2 (fold y))) ![a, b] = periodTwoPlaneCoeff (evenReflectionPlane (fun x y => G (toLp 2 ![x, y]))) a b := by let f : Torus 2 → ℂ := fun y => G (toLp 2 (fold y)) have hL : MemLp f 2 (torusMeasure 2) := (hG.restrict (euclideanCube 2)).comp_measurePreserving (foldEuclidean_measurePreserving 2) have hI : Integrable (fun y => mFourier (-![a, b]) y * f y) (torusMeasure 2) := hL.integrable (by norm_num) |>.bdd_mul (by fun_prop) (Eventually.of_forall fun y => ((mFourier (-![a, b])).norm_coe_le_norm y).trans (by rw [UnitAddTorus.mFourier_norm])) have h := (measurePreserving_finTwoArrow haarAddCircle).symm (MeasurableEquiv.finTwoArrow : Torus 2 ≃ᵐ UnitAddCircle × UnitAddCircle) have hi := h.integral_comp MeasurableEquiv.finTwoArrow.symm.measurableEmbedding (fun y => mFourier (-![a, b]) y * f y) unfold mFourierCoeff simp only [smul_eq_mul] change (∫ y, mFourier (-![a, b]) y * f y ∂torusMeasure 2) = _ rw [← hi] have hIp : Integrable (fun z : UnitAddCircle × UnitAddCircle => mFourier (-![a, b]) (MeasurableEquiv.finTwoArrow.symm z) * f (MeasurableEquiv.finTwoArrow.symm z)) (AddCircle.haarAddCircle.prod haarAddCircle) := (h.integrable_comp_emb MeasurableEquiv.finTwoArrow.symm.measurableEmbedding).2 hI rw [integral_prod _ hIp] have he (u v : UnitAddCircle) : mFourier (-![a, b]) (MeasurableEquiv.finTwoArrow.symm (u, v)) = mFourier (fun _ : Fin 1 => -a) (fun _ => u) * mFourier (fun _ : Fin 1 => -b) (fun _ => v) := by simp [mFourier, Fin.prod_univ_two] simp_rw [he, mul_assoc, integral_const_mul] have hf (u v : UnitAddCircle) : f (MeasurableEquiv.finTwoArrow.symm (u, v)) = G (toLp 2 ![fold (fun _ : Fin 1 => u) 0, fold (fun _ : Fin 1 => v) 0]) := by dsimp only [f] congr 1 ext j fin_cases j <;> rfl simp_rw [hf] have hs (u : UnitAddCircle) := reflectionCircleCoeff_eq_slice (fun y => G (toLp 2 ![fold (fun _ : Fin 1 => u) 0, y])) b simp_rw [hs] rw [reflectionCircleCoeff_eq_slice (fun x => periodTwoSliceCoeff (evenReflectionSlice (fun y => G (toLp 2 ![x, y]))) b) a] unfold periodTwoPlaneCoeff change (1 / 2 : ℂ) * (∫ x in (0 : ℝ)..2, fourier (-a) (x : AddCircle (2 : ℝ)) * evenReflectionSlice (fun x => periodTwoSliceCoeff (evenReflectionSlice (fun y => G (toLp 2 ![x, y]))) b) x) = _ congr 1 apply intervalIntegral.integral_congr intro x hx unfold evenReflectionPlane by_cases h : x ≤ 1 <;> simp [evenReflectionSlice, h] <;> rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTorusCoeff_plane_eq_plane · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:322
theorem reflectionL2Operator_plane_coeff_eq_plane

The actual reflection operator has the joint period-two coefficients of any whole-space L² representative. Under the stated conditions.

Formal statement
G :
EuclideanSpace ℝ (Fin 2) → ℂ
hG :
a b :
ℤ
mFourierCoeff (reflectionL2Operator 2 (hG.toLp G)) ![a, b]
= periodTwoPlaneCoeff (evenReflectionPlane (fun x y => G (toLp 2 ![x, y]))) a b
Proof (Lean source)
-- @node: reflectionL2Operator_plane_coeff_eq_plane lemma reflectionL2Operator_plane_coeff_eq_plane {G : EuclideanSpace ℝ (Fin 2) → ℂ} (hG : MemLp G 2 volume) (a b : ℤ) : mFourierCoeff (reflectionL2Operator 2 (hG.toLp G)) ![a, b] = periodTwoPlaneCoeff (evenReflectionPlane (fun x y => G (toLp 2 ![x, y]))) a b := by rw [← reflectionTorusCoeff_plane_eq_plane hG] have hr := (foldEuclidean_measurePreserving 2).quasiMeasurePreserving.ae (ae_restrict_of_ae hG.coeFn_toLp) apply integral_congr_ae filter_upwards [reflectionL2Operator_coeFn 2 (hG.toLp G), hr] with y hy hr simp only [smul_eq_mul] rw [hy, hr]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionL2Operator_plane_coeff_eq_plane · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:381
theorem reflectionSmoothApproximation_plane_operator_budget

The smooth plane estimate holds in the actual torus reflection operator, with precisely the local factor one half. Under the stated conditions.

Formal statement
ψ :
EuclideanSpace ℝ (Fin 2) → ℂ
hψ :
R :
ℝ
(∑' k : Fin 2 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k / 2) * ‖UnitAddTorus.mFourierCoeff (reflectionL2Operator 2 ((reflectionSmoothApproximation_memLp hψ R).toLp (reflectionSmoothApproximation ψ R))) k‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / 2))
Proof (Lean source)
-- @node: reflectionSmoothApproximation_plane_operator_budget lemma reflectionSmoothApproximation_plane_operator_budget {ψ : EuclideanSpace ℝ (Fin 2) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : (∑' k : Fin 2 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k / 2) * ‖UnitAddTorus.mFourierCoeff (reflectionL2Operator 2 ((reflectionSmoothApproximation_memLp hψ R).toLp (reflectionSmoothApproximation ψ R))) k‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / 2)) := by rw [← (finTwoArrowEquiv ℤ).symm.tsum_eq] have he (k : ℤ × ℤ) : (finTwoArrowEquiv ℤ).symm k = ![k.1, k.2] := rfl simp_rw [he] simpa only [reflectionL2Operator_plane_coeff_eq_plane, frequencySq, Fin.sum_univ_two, Matrix.cons_val_zero, Matrix.cons_val_one] using reflectionSmoothApproximation_plane_spectral_le_profile hψ R
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_plane_operator_budget · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:396
theorem reflectionL2Operator_plane_firstOrder_le

The proved smooth two-dimensional endpoint passes to every whole-space extension by spatial L² convergence, without a cube trace assumption. Under the stated conditions.

Formal statement
G :
EuclideanSpace ℝ (Fin 2) → ℂ
hG1 :
hG2 :
(∑' k : Fin 2 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k / 2) * ‖UnitAddTorus.mFourierCoeff (reflectionL2Operator 2 (hG2.toLp G)) k‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / 2))
Proof (Lean source)
-- @node: reflectionL2Operator_plane_firstOrder_le lemma reflectionL2Operator_plane_firstOrder_le {G : EuclideanSpace ℝ (Fin 2) → ℂ} (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) : (∑' k : Fin 2 → ℤ, ofReal ((1 + pi ^ 2 * frequencySq k / 2) * ‖UnitAddTorus.mFourierCoeff (reflectionL2Operator 2 (hG2.toLp G)) k‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / 2)) := by have hF := angularFourier_memLp G hG1 hG2 exact reflectionTorus_weightedBudget_le_of_tendsto (reflectionSmoothApproximation_tendsto_reflected_original hG1 hG2) (fun k => 1 + pi ^ 2 * frequencySq k / 2) _ (fun n => reflectionSmoothApproximation_plane_operator_budget hF (n : ℝ))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionL2Operator_plane_firstOrder_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:413
theorem componentFourierBudget_two_firstOrder_le Lemma componentFourierBudget_two_firstOrder_le in the paper ↗

The extension infimum gives the complete two-dimensional component contraction at smoothness one, with constant one. The asserted mathematical result follows.

Formal statement
g :
Cube 2 → ℝ
Proof (Lean source)
-- @node: componentFourierBudget_two_firstOrder_le lemma componentFourierBudget_two_firstOrder_le (g : Cube 2 → ℝ) : componentFourierBudget 2 1 g ≤ sobolevNormSq 2 1 g := by unfold sobolevNormSq refine le_iInf fun G => le_iInf fun hG => ?_ have h := reflectionL2Operator_plane_firstOrder_le hG.1 hG.2.1 simp_rw [reflectionTorusCoeff_extension hG.2.1 g hG.2.2] at h simpa only [componentFourierBudget, Nat.cast_ofNat, Real.rpow_one] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.componentFourierBudget_two_firstOrder_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSmoothEndpoint.lean:428
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionSupport 17 declarations Mixed translation differences annihilate effects using at most two coordinates.

Fourier support of reflected ANOVA effects

Mixed translation differences annihilate effects using at most two coordinates. This proves the order-two Fourier support without requiring pointwise versions of conditional marginal regularity.

[ The translation difference on the normalized torus.

Definition (Lean source)
d :
ℕ
a :
f :
Torus d → ℂ
torusDifference a f :
Torus d → ℂ
fun y => f y - f (y + a)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusDifference · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:17
theorem torusDifference_comm

Translation differences commute.](goal) This uses the stated conclusion.

Formal statement
d :
ℕ
a b :
f :
Torus d → ℂ
Proof (Lean source)
-- @node: torusDifference_comm lemma torusDifference_comm {d : ℕ} (a b : Torus d) (f : Torus d → ℂ) : torusDifference a (torusDifference b f) = torusDifference b (torusDifference a f) := by funext y simp only [torusDifference, add_assoc, add_comm a b] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusDifference_comm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:22
theorem torusDifference_eq_zero

A translation-invariant summand is annihilated by its difference. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
a :
f :
Torus d → ℂ
h :
∀ y, f (y + a) = f y
Proof (Lean source)
-- @node: torusDifference_eq_zero lemma torusDifference_eq_zero {d : ℕ} (a : Torus d) (f : Torus d → ℂ) (h : ∀ y, f (y + a) = f y) : torusDifference a f = 0 := by funext y simp [torusDifference, h]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusDifference_eq_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:30
theorem torusDifference_add

Translation differences distribute over addition. The asserted mathematical result follows.

Formal statement
d :
ℕ
a :
f g :
Torus d → ℂ
Proof (Lean source)
-- @node: torusDifference_add lemma torusDifference_add {d : ℕ} (a : Torus d) (f g : Torus d → ℂ) : torusDifference a (f + g) = torusDifference a f + torusDifference a g := by funext y simp only [torusDifference, Pi.add_apply] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusDifference_add · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:37
theorem torusDifference_sum

Translation differences distribute over finite sums.

Formal statement
d :
ℕ
ι :
Type*
a :
s :
f :
ι → Torus d → ℂ
torusDifference a (∑ i ∈ s, f i) = ∑ i ∈ s, torusDifference a (f i)
Proof (Lean source)
-- @node: torusDifference_sum lemma torusDifference_sum {d : ℕ} {ι : Type*} (a : Torus d) (s : Finset ι) (f : ι → Torus d → ℂ) : torusDifference a (∑ i ∈ s, f i) = ∑ i ∈ s, torusDifference a (f i) := by classical funext y simp [torusDifference, Finset.sum_sub_distrib]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusDifference_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:45
theorem torusDifference_three_eq_zero

Any invariant direction kills the third mixed difference. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
a b c :
f :
Torus d → ℂ
h :
(∀ y, f (y + a) = f y) ∨ (∀ y, f (y + b) = f y) ∨ (∀ y, f (y + c) = f y)
Proof (Lean source)
-- @node: torusDifference_three_eq_zero lemma torusDifference_three_eq_zero {d : ℕ} (a b c : Torus d) (f : Torus d → ℂ) (h : (∀ y, f (y + a) = f y) ∨ (∀ y, f (y + b) = f y) ∨ (∀ y, f (y + c) = f y)) : torusDifference a (torusDifference b (torusDifference c f)) = 0 := by rcases h with ha | hb | hc · rw [torusDifference_comm a b, torusDifference_comm a c, torusDifference_eq_zero a f ha] funext y simp [torusDifference] · rw [torusDifference_comm b c, torusDifference_eq_zero b f hb] funext y simp [torusDifference] · rw [torusDifference_eq_zero c f hc] funext y simp [torusDifference]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusDifference_three_eq_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:54
theorem torus_add_measurePreserving Lemma torus_add_measurePreserving in the paper ↗

Translation preserves normalized product Haar measure. The asserted mathematical result follows.

Formal statement
d :
ℕ
a :
MeasurePreserving (fun y : Torus d => y + a) (torusMeasure d) (torusMeasure d)
Proof (Lean source)
-- @node: torus_add_measurePreserving lemma torus_add_measurePreserving {d : ℕ} (a : Torus d) : MeasurePreserving (fun y : Torus d => y + a) (torusMeasure d) (torusMeasure d) := by exact measurePreserving_pi (fun _ : Fin d => haarAddCircle) (fun _ : Fin d => haarAddCircle) (fun j => measurePreserving_add_right haarAddCircle (a j))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torus_add_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:72
theorem torusDifference_integrable

Translation differences preserve integrability. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
a :
f :
Torus d → ℂ
Proof (Lean source)
-- @node: torusDifference_integrable lemma torusDifference_integrable {d : ℕ} (a : Torus d) {f : Torus d → ℂ} (hf : Integrable f (torusMeasure d)) : Integrable (torusDifference a f) (torusMeasure d) := by exact hf.sub ((torus_add_measurePreserving a).integrable_comp_of_integrable hf)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusDifference_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:80
theorem torusDifference_congr_ae

Translation differences preserve almost-everywhere equality. Under the stated conditions.

Formal statement
d :
ℕ
a :
f g :
Torus d → ℂ
h :
f =ᵐ[torusMeasure d] g
Proof (Lean source)
-- @node: torusDifference_congr_ae lemma torusDifference_congr_ae {d : ℕ} (a : Torus d) {f g : Torus d → ℂ} (h : f =ᵐ[torusMeasure d] g) : torusDifference a f =ᵐ[torusMeasure d] torusDifference a g := by filter_upwards [h, (torus_add_measurePreserving a).quasiMeasurePreserving.ae h] with y hy ht simp only [torusDifference, hy, ht]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusDifference_congr_ae · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:87

A character times an integrable torus function is integrable. Under the stated conditions.

Formal statement
d :
ℕ
k :
Fin d → ℤ
f :
Torus d → ℂ
Integrable (fun y => ek k y * f y) (torusMeasure d)
Proof (Lean source)
-- @node: ek_mul_integrable lemma ek_mul_integrable {d : ℕ} (k : Fin d → ℤ) {f : Torus d → ℂ} (hf : Integrable f (torusMeasure d)) : Integrable (fun y => ek k y * f y) (torusMeasure d) := by exact hf.bdd_mul (mFourier k).continuous.aestronglyMeasurable (Filter.Eventually.of_forall fun y => (mFourier k).norm_coe_le_norm y)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ek_mul_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:95

Shifting one coordinate by half an inverse nonzero frequency negates its character. Under the stated conditions.

Formal statement
d :
ℕ
k :
Fin d → ℤ
j :
Fin d
hj :
k j ≠ 0
y :
ek k (y + single j ((1 / 2 / (k j : ℝ) : ℝ) : AddCircle (1 : ℝ))) = -ek k y
Proof (Lean source)
-- @node: ek_half_shift lemma ek_half_shift {d : ℕ} (k : Fin d → ℤ) (j : Fin d) (hj : k j ≠ 0) (y : Torus d) : ek k (y + single j ((1 / 2 / (k j : ℝ) : ℝ) : AddCircle (1 : ℝ))) = -ek k y := by classical unfold ek mFourier simp only [ContinuousMap.coe_mk] rw [← Finset.mul_prod_erase _ _ (Finset.mem_univ j)] rw [← Finset.mul_prod_erase _ _ (Finset.mem_univ j)] simp only [Pi.add_apply, Pi.single_eq_same] rw [fourier_add_half_inv_index hj (by norm_num)] have he : (∏ i ∈ Finset.univ.erase j, fourier (k i) (y i + (single j ((1 / 2 / (k j : ℝ) : ℝ) : AddCircle (1 : ℝ)) : Torus d) i)) = ∏ i ∈ Finset.univ.erase j, fourier (k i) (y i) := by apply Finset.prod_congr rfl intro i hi simp [Pi.single_eq_of_ne (Finset.mem_erase.mp hi).1] rw [he, neg_mul]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ek_half_shift · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:103
theorem fourierCoeff_torusDifference

A half-character translation difference doubles that Fourier coefficient. Under the stated conditions.

Formal statement
d :
ℕ
k :
Fin d → ℤ
a :
f :
Torus d → ℂ
ha :
∀ y, ek (-k) (y + a) = -ek (-k) y
(∫ y, ek (-k) y * torusDifference a f y ∂torusMeasure d)
= 2 * ∫ y, ek (-k) y * f y ∂torusMeasure d
Proof (Lean source)
-- @node: fourierCoeff_torusDifference lemma fourierCoeff_torusDifference {d : ℕ} (k : Fin d → ℤ) (a : Torus d) {f : Torus d → ℂ} (hf : Integrable f (torusMeasure d)) (ha : ∀ y, ek (-k) (y + a) = -ek (-k) y) : (∫ y, ek (-k) y * torusDifference a f y ∂torusMeasure d) = 2 * ∫ y, ek (-k) y * f y ∂torusMeasure d := by have ht := (torus_add_measurePreserving a).integral_comp (MeasurableEquiv.addRight a).measurableEmbedding (fun y => ek (-k) y * f y) have he : (∫ y, ek (-k) y * f (y + a) ∂torusMeasure d) = -(∫ y, ek (-k) y * f y ∂torusMeasure d) := by simp only [Function.comp_def, ha, neg_mul, integral_neg] at ht exact neg_eq_iff_eq_neg.mp ht simp only [torusDifference, mul_sub] have hi : Integrable (fun y => ek (-k) y * f (y + a)) (torusMeasure d) := ek_mul_integrable (-k) ((torus_add_measurePreserving a).integrable_comp_of_integrable hf) rw [integral_sub (ek_mul_integrable (-k) hf) hi, he] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fourierCoeff_torusDifference · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:123

A shift in another coordinate leaves a folded coordinate unchanged. Under the stated conditions.

Formal statement
d :
ℕ
y :
r j :
Fin d
c :
AddCircle (1 : ℝ)
h :
j ≠ r
fold (y + single r c) j = fold y j
Proof (Lean source)
-- @node: fold_add_single_of_ne lemma fold_add_single_of_ne {d : ℕ} (y : Torus d) (r j : Fin d) (c : AddCircle (1 : ℝ)) (h : j ≠ r) : fold (y + single r c) j = fold y j := by simp [fold, Pi.add_apply, Pi.single_eq_of_ne h]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fold_add_single_of_ne · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:142
theorem torusDifference_three_pair

Three distinct coordinate differences annihilate every two-coordinate effect. Under the stated conditions.

Formal statement
d :
ℕ
r t u j l :
Fin d
hrt :
r ≠ t
hru :
r ≠ u
htu :
t ≠ u
a b c :
AddCircle (1 : ℝ)
g :
ℝ → ℝ → ℂ
torusDifference (single r a) (torusDifference (single t b) (torusDifference (single u c) (fun y => g (fold y j) (fold y l))))
= 0
Proof (Lean source)
-- @node: torusDifference_three_pair lemma torusDifference_three_pair {d : ℕ} (r t u j l : Fin d) (hrt : r ≠ t) (hru : r ≠ u) (htu : t ≠ u) (a b c : AddCircle (1 : ℝ)) (g : ℝ → ℝ → ℂ) : torusDifference (single r a) (torusDifference (single t b) (torusDifference (single u c) (fun y => g (fold y j) (fold y l)))) = 0 := by have hchoice : (j ≠ r ∧ l ≠ r) ∨ (j ≠ t ∧ l ≠ t) ∨ (j ≠ u ∧ l ≠ u) := by by_cases hjr : j = r <;> by_cases hjt : j = t <;> by_cases hlu : l = u <;> by_cases hlr : l = r <;> aesop apply torusDifference_three_eq_zero rcases hchoice with hr | ht | hu · left intro y rw [fold_add_single_of_ne y r j a hr.1, fold_add_single_of_ne y r l a hr.2] · right; left intro y rw [fold_add_single_of_ne y t j b ht.1, fold_add_single_of_ne y t l b ht.2] · right; right intro y rw [fold_add_single_of_ne y u j c hu.1, fold_add_single_of_ne y u l c hu.2]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusDifference_three_pair · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:149
theorem orderTwo_third_difference_ae

The exact order-two decomposition has zero third mixed translation difference, modulo Haar null sets. No marginal representative regularity is needed. Under the stated conditions.

Formal statement
d :
ℕ
m :
hm :
r t u :
Fin d
hrt :
r ≠ t
hru :
r ≠ u
htu :
t ≠ u
a b c :
AddCircle (1 : ℝ)
Proof (Lean source)
-- @node: orderTwo_third_difference_ae lemma orderTwo_third_difference_ae {d : ℕ} (m : CenteredL2Fn d) (hm : OrderTwo m) (r t u : Fin d) (hrt : r ≠ t) (hru : r ≠ u) (htu : t ≠ u) (a b c : AddCircle (1 : ℝ)) : torusDifference (single r a) (torusDifference (single t b) (torusDifference (single u c) (reflExt m.val))) =ᵐ[torusMeasure d] 0 := by classical let A : Fin d → Torus d → ℂ := fun j y => (g1 m.val j (fold y j) : ℂ) let B : Fin d → Fin d → Torus d → ℂ := fun j l y => if j < l then (g2 m.val j l (fold y j) (fold y l) : ℂ) else 0 have hrep : reflExt m.val =ᵐ[torusMeasure d] (∑ j, A j) + ∑ j, ∑ l, B j l := by have h := (fold_measurePreserving d).quasiMeasurePreserving.ae hm filter_upwards [h] with y hy simpa [reflExt, A, B, apply_ite] using congrArg ofReal hy have hA (j : Fin d) : torusDifference (single r a) (torusDifference (single t b) (torusDifference (single u c) (A j))) = 0 := torusDifference_three_pair r t u j j hrt hru htu a b c (fun x _ => (g1 m.val j x : ℂ)) have hB (j l : Fin d) : torusDifference (single r a) (torusDifference (single t b) (torusDifference (single u c) (B j l))) = 0 := by by_cases hjl : j < l · simp only [B, if_pos hjl] exact torusDifference_three_pair r t u j l hrt hru htu a b c (fun x v => (g2 m.val j l x v : ℂ)) · funext y simp [B, hjl, torusDifference] have he := torusDifference_congr_ae (single r a) (torusDifference_congr_ae (single t b) (torusDifference_congr_ae (single u c) hrep)) simp_rw [torusDifference_add, torusDifference_sum, hA, hB] at he simpa using he
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderTwo_third_difference_ae · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:171
theorem fourierCoeff_zero_of_third_difference

A zero third difference in three half-character directions forces a zero coefficient. Under the stated conditions.

Formal statement
d :
ℕ
k :
Fin d → ℤ
a b c :
f :
Torus d → ℂ
ha :
∀ y, ek (-k) (y + a) = -ek (-k) y
hb :
∀ y, ek (-k) (y + b) = -ek (-k) y
hc :
∀ y, ek (-k) (y + c) = -ek (-k) y
(∫ y, ek (-k) y * f y ∂torusMeasure d) = 0
Proof (Lean source)
-- @node: fourierCoeff_zero_of_third_difference lemma fourierCoeff_zero_of_third_difference {d : ℕ} (k : Fin d → ℤ) (a b c : Torus d) {f : Torus d → ℂ} (hf : Integrable f (torusMeasure d)) (ha : ∀ y, ek (-k) (y + a) = -ek (-k) y) (hb : ∀ y, ek (-k) (y + b) = -ek (-k) y) (hc : ∀ y, ek (-k) (y + c) = -ek (-k) y) (hz : torusDifference a (torusDifference b (torusDifference c f)) =ᵐ[torusMeasure d] 0) : (∫ y, ek (-k) y * f y ∂torusMeasure d) = 0 := by have hi := torusDifference_integrable c hf have hii := torusDifference_integrable b hi have he := fourierCoeff_torusDifference k a hii ha rw [fourierCoeff_torusDifference k b hi hb, fourierCoeff_torusDifference k c hf hc] at he have hzint : (∫ y, ek (-k) y * torusDifference a (torusDifference b (torusDifference c f)) y ∂torusMeasure d) = 0 := by calc _ = ∫ y, (0 : ℂ) ∂torusMeasure d := by apply integral_congr_ae filter_upwards [hz] with y hy simp only [hy, Pi.zero_apply, mul_zero] _ = 0 := integral_zero _ _ rw [hzint] at he linear_combination (1 / 8 : ℂ) * he.symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fourierCoeff_zero_of_third_difference · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:203
theorem Fhat_zero_of_orderTwo

An exactly order-two centered cube outcome has no reflected Fourier coefficient supported on more than two coordinates. Under the stated conditions.

Formal statement
d :
ℕ
m :
hm :
k :
Fin d → ℤ
hk :
2 < (frequencySupport k).card
Fhat m.val k = 0
Proof (Lean source)
-- @node: Fhat_zero_of_orderTwo lemma Fhat_zero_of_orderTwo {d : ℕ} (m : CenteredL2Fn d) (hm : OrderTwo m) (k : Fin d → ℤ) (hk : 2 < (frequencySupport k).card) : Fhat m.val k = 0 := by classical obtain ⟨r, hr, t, ht, u, hu, hrt, hru, htu⟩ := Finset.two_lt_card.mp hk have hrk : (-k) r ≠ 0 := by simpa [frequencySupport] using hr have htk : (-k) t ≠ 0 := by simpa [frequencySupport] using ht have huk : (-k) u ≠ 0 := by simpa [frequencySupport] using hu let a : AddCircle (1 : ℝ) := ((1 / 2 / ((-k) r : ℝ) : ℝ) : AddCircle (1 : ℝ)) let b : AddCircle (1 : ℝ) := ((1 / 2 / ((-k) t : ℝ) : ℝ) : AddCircle (1 : ℝ)) let c : AddCircle (1 : ℝ) := ((1 / 2 / ((-k) u : ℝ) : ℝ) : AddCircle (1 : ℝ)) exact fourierCoeff_zero_of_third_difference k (single r a) (single t b) (single u c) ((reflExt_memLp m).integrable (by norm_num)) (ek_half_shift (-k) r hrk) (ek_half_shift (-k) t htk) (ek_half_shift (-k) u huk) (orderTwo_third_difference_ae m hm r t u hrt hru htu a b c)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.Fhat_zero_of_orderTwo · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionSupport.lean:227
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionTargetInterpolation 13 declarations Fourier coefficients transport the periodic endpoint gauges to weighted counting measure spaces.

Target Fourier interpolation

Fourier coefficients transport the periodic endpoint gauges to weighted counting measure spaces. Exact weighted interpolation gives the fractional spectral budget from the genuine reflection operator's K norm without any loss of constant.

[ The normalized Fourier characters form the periodic L² basis.

Definition (Lean source)
p :
ℕ
hp :
0 < p
reflectionTargetBasis p hp :
HilbertBasis (Fin p → ℤ) ℂ (Lp ℂ 2 (torusMeasure p))
HilbertBasis.mk (torusParseval p hp 0).1 (torusParseval p hp 0).2.1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTargetBasis · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:19
theorem reflectionTargetBasis_repr

The basis coordinates are the paper's normalized Fourier coefficients.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
p :
ℕ
hp :
0 < p
f :
Lp ℂ 2 (torusMeasure p)
k :
Fin p → ℤ
Proof (Lean source)
-- @node: reflectionTargetBasis_repr lemma reflectionTargetBasis_repr (p : ℕ) (hp : 0 < p) (f : Lp ℂ 2 (torusMeasure p)) (k : Fin p → ℤ) : (reflectionTargetBasis p hp).repr f k = mFourierCoeff f k := by trans ∫ t, conj (torusCharacterLp k t) * f t ∂torusMeasure p · rw [HilbertBasis.repr_apply_apply, MeasureTheory.L2.inner_def] simp only [reflectionTargetBasis, HilbertBasis.coe_mk, RCLike.inner_apply, mul_comm] · apply integral_congr_ae filter_upwards [ContinuousMap.coeFn_toLp (p := (2 : ℝ≥0∞)) (𝕜 := ℂ) (torusMeasure p) (mFourier k)] with t ht simp only [torusCharacterLp] rw [ht, ← UnitAddTorus.mFourier_neg, smul_eq_mul]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTargetBasis_repr · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:25

[ Fourier coordinates define an additive map into measurable counting classes.

Definition (Lean source)
p :
ℕ
hp :
0 < p
reflectionTargetCoefficients p hp :
Lp ℂ 2 (torusMeasure p) →+ ((Fin p → ℤ) →ₘ[Measure.count] ℂ)
clause 1
toFun f := AEEqFun.mk (fun k => mFourierCoeff f k) (measurable_of_countable _).aestronglyMeasurable
clause 2
map_zero' := by apply AEEqFun.ext filter_upwards [AEEqFun.coeFn_mk (fun k => mFourierCoeff (0 : Lp ℂ 2 (torusMeasure p)) k) (measurable_of_countable _).aestronglyMeasurable, AEEqFun.coeFn_zero (α := Fin p → ℤ) (μ := Measure.count) (β := ℂ)] with k hk hz rw [hk, hz, ← reflectionTargetBasis_repr p hp] simp
clause 3
map_add' f g := by apply AEEqFun.ext filter_upwards [AEEqFun.coeFn_mk (fun k => mFourierCoeff (f + g) k) (measurable_of_countable _).aestronglyMeasurable, AEEqFun.coeFn_mk (fun k => mFourierCoeff f k) (measurable_of_countable _).aestronglyMeasurable, AEEqFun.coeFn_mk (fun k => mFourierCoeff g k) (measurable_of_countable _).aestronglyMeasurable, AEEqFun.coeFn_add (AEEqFun.mk (fun k => mFourierCoeff f k) (measurable_of_countable _).aestronglyMeasurable) (AEEqFun.mk (fun k => mFourierCoeff g k) (measurable_of_countable _).aestronglyMeasurable)] with k hsum hf hg hadd rw [hadd, hsum, Pi.add_apply, hf, hg] simp only [← reflectionTargetBasis_repr p hp, map_add, lp.coeFn_add, Pi.add_apply]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTargetCoefficients · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:39
theorem reflectionTargetCoefficients_wNorm

Every weighted coefficient gauge is its explicit spectral sum.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
p :
ℕ
hp :
0 < p
w :
(Fin p → ℤ) → ℝ≥0∞
f :
Lp ℂ 2 (torusMeasure p)
wNorm w Measure.count (reflectionTargetCoefficients p hp f)
= rpow (∑' k, w k * ofReal (‖UnitAddTorus.mFourierCoeff f k‖ ^ 2)) (1 / 2)
Proof (Lean source)
-- @node: reflectionTargetCoefficients_wNorm lemma reflectionTargetCoefficients_wNorm (p : ℕ) (hp : 0 < p) (w : (Fin p → ℤ) → ℝ≥0∞) (f : Lp ℂ 2 (torusMeasure p)) : wNorm w Measure.count (reflectionTargetCoefficients p hp f) = rpow (∑' k, w k * ofReal (‖UnitAddTorus.mFourierCoeff f k‖ ^ 2)) (1 / 2) := by unfold wNorm congr 1 calc _ = ∫⁻ k, w k * ofReal (‖UnitAddTorus.mFourierCoeff f k‖ ^ 2) ∂Measure.count := by apply lintegral_congr_ae filter_upwards [AEEqFun.coeFn_mk (fun k => mFourierCoeff f k) (measurable_of_countable _).aestronglyMeasurable] with k hk change w k * (‖(AEEqFun.mk _ _) k‖₊ : ℝ≥0∞) ^ 2 = _ rw [hk, ENNReal.ofReal_pow (norm_nonneg _), ofReal_norm, enorm_eq_nnnorm] _ = _ := lintegral_count _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTargetCoefficients_wNorm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:66
theorem reflectionTargetCoefficients_zeroNorm

Parseval identifies the zero-order coefficient gauge with the torus norm. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
f :
Lp ℂ 2 (torusMeasure p)
wNorm (fun _ => 1) Measure.count (reflectionTargetCoefficients p hp f)
= ‖f‖ₑ
Proof (Lean source)
-- @node: reflectionTargetCoefficients_zeroNorm lemma reflectionTargetCoefficients_zeroNorm (p : ℕ) (hp : 0 < p) (f : Lp ℂ 2 (torusMeasure p)) : wNorm (fun _ => 1) Measure.count (reflectionTargetCoefficients p hp f) = ‖f‖ₑ := by rw [reflectionTargetCoefficients_wNorm] simp only [one_mul] have hs := (torusParseval p hp f).2.2.1 rw [← ENNReal.ofReal_tsum_of_nonneg (fun k => sq_nonneg _) hs.summable, hs.tsum_eq, ofReal_integral_eq_lintegral_ofReal ((Lp.memLp f).integrable_norm_pow (by norm_num)) (Filter.Eventually.of_forall fun _ => sq_nonneg _)] rw [Lp.enorm_def] symm simpa only [ENNReal.ofReal_pow (norm_nonneg _), ofReal_norm, enorm_eq_nnnorm, NNReal.coe_ofNat, ENNReal.coe_ofNat, ENNReal.rpow_two, ENNReal.rpow_eq_pow] using eLpNorm_nnreal_eq_lintegral (f := fun t => f t) (μ := torusMeasure p) (p := 2) (by norm_num)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTargetCoefficients_zeroNorm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:83
theorem reflectionTargetCoefficients_firstNorm

The first-order target gauge is exactly the weighted coefficient gauge. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
f :
Lp ℂ 2 (torusMeasure p)
wNorm (fun k => ofReal (1 + pi ^ 2 * frequencySq k / (p : ℝ))) Measure.count (reflectionTargetCoefficients p hp f)
Proof (Lean source)
-- @node: reflectionTargetCoefficients_firstNorm lemma reflectionTargetCoefficients_firstNorm (p : ℕ) (hp : 0 < p) (f : Lp ℂ 2 (torusMeasure p)) : wNorm (fun k => ofReal (1 + pi ^ 2 * frequencySq k / (p : ℝ))) Measure.count (reflectionTargetCoefficients p hp f) = reflectionTorusFirstOrderNorm p f := by rw [reflectionTargetCoefficients_wNorm] unfold reflectionTorusFirstOrderNorm congr 1 apply tsum_congr intro k rw [ENNReal.ofReal_mul (by unfold frequencySq; positivity : 0 ≤ 1 + pi ^ 2 * frequencySq k / (p : ℝ))]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTargetCoefficients_firstNorm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:102
theorem reflectionTargetCoefficients_kNormSq

Exact weighted interpolation evaluates the coefficient K norm. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
s :
ℝ
hs :
s ∈ Ioo (0 : ℝ) 1
f :
Lp ℂ 2 (torusMeasure p)
kNormSq (wNorm (fun _ => 1) Measure.count) (wNorm (fun k => ofReal (1 + pi ^ 2 * frequencySq k / (p : ℝ))) Measure.count) s (reflectionTargetCoefficients p hp f)
= ∑' k, ofReal ((1 + pi ^ 2 * frequencySq k / (p : ℝ)) ^ s * ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2)
Proof (Lean source)
-- @node: reflectionTargetCoefficients_kNormSq lemma reflectionTargetCoefficients_kNormSq (p : ℕ) (hp : 0 < p) (s : ℝ) (hs : s ∈ Ioo (0 : ℝ) 1) (f : Lp ℂ 2 (torusMeasure p)) : kNormSq (wNorm (fun _ => 1) Measure.count) (wNorm (fun k => ofReal (1 + pi ^ 2 * frequencySq k / (p : ℝ))) Measure.count) s (reflectionTargetCoefficients p hp f) = ∑' k, ofReal ((1 + pi ^ 2 * frequencySq k / (p : ℝ)) ^ s * ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2) := by have hw : ∀ᵐ k : Fin p → ℤ ∂Measure.count, 0 < (1 : ℝ≥0∞) ∧ (1 : ℝ≥0∞) < ⊤ ∧ 0 < ofReal (1 + pi ^ 2 * frequencySq k / (p : ℝ)) ∧ ofReal (1 + pi ^ 2 * frequencySq k / (p : ℝ)) < ⊤ := by filter_upwards [] with k refine ⟨by norm_num, by norm_num, ENNReal.ofReal_pos.mpr (by unfold frequencySq; positivity), ENNReal.ofReal_lt_top⟩ have hsum : ∃ f0 f1 : (Fin p → ℤ) →ₘ[Measure.count] ℂ, reflectionTargetCoefficients p hp f = f0 + f1 ∧ wNorm (fun _ => 1) Measure.count f0 < ⊤ ∧ wNorm (fun k => ofReal (1 + pi ^ 2 * frequencySq k / (p : ℝ))) Measure.count f1 < ⊤ := by refine ⟨reflectionTargetCoefficients p hp f, 0, by simp, ?_, ?_⟩ · rw [reflectionTargetCoefficients_zeroNorm, Lp.enorm_def] exact (Lp.memLp f).2 · rw [reflection_wNorm_zero] exact ENNReal.zero_lt_top rw [weighted_l2_interpolation Measure.count _ _ measurable_const (measurable_of_countable _) hw s hs _ hsum] calc _ = ∫⁻ k, ofReal ((1 + pi ^ 2 * frequencySq k / (p : ℝ)) ^ s * ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2) ∂Measure.count := by apply lintegral_congr_ae filter_upwards [AEEqFun.coeFn_mk (fun k => mFourierCoeff f k) (measurable_of_countable _).aestronglyMeasurable] with k hk change _ * (‖(AEEqFun.mk _ _) k‖₊ : ℝ≥0∞) ^ 2 = _ rw [hk] simp only [ENNReal.rpow_eq_pow, ENNReal.one_rpow, one_mul] rw [ENNReal.ofReal_rpow_of_nonneg (by unfold frequencySq; positivity) hs.1.le, ENNReal.ofReal_mul (Real.rpow_nonneg (by unfold frequencySq; positivity) _), ENNReal.ofReal_pow (norm_nonneg _), ofReal_norm, enorm_eq_nnnorm] _ = _ := lintegral_count _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTargetCoefficients_kNormSq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:115
theorem reflectionTorus_fractionalBudget_le_kNormSq

The fractional spectral energy is controlled by the actual torus K norm. Under the stated conditions.

Formal statement
p :
ℕ
hp :
0 < p
s :
ℝ
hs :
s ∈ Ioo (0 : ℝ) 1
f :
Lp ℂ 2 (torusMeasure p)
(∑' k, ofReal ((1 + pi ^ 2 * frequencySq k / (p : ℝ)) ^ s * ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2))
≤ kNormSq (fun g : Lp ℂ 2 (torusMeasure p) => ‖g‖ₑ) (reflectionTorusFirstOrderNorm p) s f
Proof (Lean source)
-- @node: reflectionTorus_fractionalBudget_le_kNormSq lemma reflectionTorus_fractionalBudget_le_kNormSq (p : ℕ) (hp : 0 < p) (s : ℝ) (hs : s ∈ Ioo (0 : ℝ) 1) (f : Lp ℂ 2 (torusMeasure p)) : (∑' k, ofReal ((1 + pi ^ 2 * frequencySq k / (p : ℝ)) ^ s * ‖UnitAddTorus.mFourierCoeff f k‖ ^ 2)) ≤ kNormSq (fun g : Lp ℂ 2 (torusMeasure p) => ‖g‖ₑ) (reflectionTorusFirstOrderNorm p) s f := by rw [← reflectionTargetCoefficients_kNormSq p hp s hs f] have h := kNormSq_map_le_of_pos (fun g : Lp ℂ 2 (torusMeasure p) => ‖g‖ₑ) (reflectionTorusFirstOrderNorm p) (wNorm (fun _ => 1) Measure.count) (wNorm (fun k => ofReal (1 + pi ^ 2 * frequencySq k / (p : ℝ))) Measure.count) (reflectionTargetCoefficients p hp) 1 1 (by norm_num) (by norm_num) (fun g => by rw [reflectionTargetCoefficients_zeroNorm]; simp) (fun g => by rw [reflectionTargetCoefficients_firstNorm]; simp) s hs f simpa using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionTorus_fractionalBudget_le_kNormSq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:155
theorem reflectionProfileOperator_fractionalBudget_le

Both genuine endpoint contractions give the exact fractional reflection budget. Under the stated conditions.

Formal statement
p :
ℕ
hp :
p = 1 ∨ p = 2
s :
ℝ
hs :
s ∈ Ioo (0 : ℝ) 1
ψ :
Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))
(∑' k, ofReal ((1 + pi ^ 2 * frequencySq k / (p : ℝ)) ^ s * ‖UnitAddTorus.mFourierCoeff (reflectionProfileOperator p ψ) k‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)
Proof (Lean source)
-- @node: reflectionProfileOperator_fractionalBudget_le lemma reflectionProfileOperator_fractionalBudget_le (p : ℕ) (hp : p = 1 ∨ p = 2) (s : ℝ) (hs : s ∈ Ioo (0 : ℝ) 1) (ψ : Lp ℂ 2 (volume : Measure (EuclideanSpace ℝ (Fin p)))) : (∑' k, ofReal ((1 + pi ^ 2 * frequencySq k / (p : ℝ)) ^ s * ‖UnitAddTorus.mFourierCoeff (reflectionProfileOperator p ψ) k‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s) := by have hp0 : 0 < p := by rcases hp with rfl | rfl <;> omega exact (reflectionTorus_fractionalBudget_le_kNormSq p hp0 s hs _).trans (reflectionProfileOperator_kNormSq_le_energy p hp s hs ψ)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileOperator_fractionalBudget_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:173
theorem reflectionProfileOperator_fourier_original

Angular inversion identifies the common profile operator with reflection of an original admissible spatial extension. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hG1 :
hG2 :
hF :
reflectionProfileOperator p (hF.toLp (Fourier G)) = reflectionL2Operator p (hG2.toLp G)
Proof (Lean source)
-- @node: reflectionProfileOperator_fourier_original lemma reflectionProfileOperator_fourier_original {p : ℕ} {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) : let hF : MemLp (Fourier G) 2 volume := angularFourier_memLp G hG1 hG2 reflectionProfileOperator p (hF.toLp (Fourier G)) = reflectionL2Operator p (hG2.toLp G) := by dsimp only let hF : MemLp (Fourier G) 2 volume := angularFourier_memLp G hG1 hG2 change reflectionL2Operator p ((reflectionInverseL2Representative_memLp (hF.toLp (Fourier G))).toLp (reflectionInverseL2Representative (hF.toLp (Fourier G)))) = _ congr 1 apply Lp.ext exact ((reflectionInverseL2Representative_memLp (hF.toLp (Fourier G))).coeFn_toLp).trans ((reflectionInverseL2Representative_fourier_ae_original hG1 hG2).trans hG2.coeFn_toLp.symm)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionProfileOperator_fourier_original · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:185
theorem reflectionL2Operator_fractionalBudget_le

Each whole-space extension contracts to its exact fractional periodic budget. Under the stated conditions.

Formal statement
p :
ℕ
hp :
p = 1 ∨ p = 2
s :
ℝ
hs :
s ∈ Ioo (0 : ℝ) 1
G :
EuclideanSpace ℝ (Fin p) → ℂ
hG1 :
hG2 :
(∑' k, ofReal ((1 + pi ^ 2 * frequencySq k / (p : ℝ)) ^ s * ‖UnitAddTorus.mFourierCoeff (reflectionL2Operator p (hG2.toLp G)) k‖ ^ 2))
≤ ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)
Proof (Lean source)
-- @node: reflectionL2Operator_fractionalBudget_le lemma reflectionL2Operator_fractionalBudget_le {p : ℕ} (hp : p = 1 ∨ p = 2) (s : ℝ) (hs : s ∈ Ioo (0 : ℝ) 1) {G : EuclideanSpace ℝ (Fin p) → ℂ} (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) : (∑' k, ofReal ((1 + pi ^ 2 * frequencySq k / (p : ℝ)) ^ s * ‖UnitAddTorus.mFourierCoeff (reflectionL2Operator p (hG2.toLp G)) k‖ ^ 2)) ≤ ∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s) := by let hF : MemLp (Fourier G) 2 volume := angularFourier_memLp G hG1 hG2 have h := reflectionProfileOperator_fractionalBudget_le p hp s hs (hF.toLp (Fourier G)) rw [reflectionProfileOperator_fourier_original hG1 hG2] at h refine h.trans_eq ?_ apply lintegral_congr_ae filter_upwards [hF.coeFn_toLp] with ω hω rw [hω]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionL2Operator_fractionalBudget_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:205
theorem componentFourierBudget_fractional_le Lemma componentFourierBudget_fractional_le in the paper ↗

Infimizing over extensions completes the fractional component contraction. Under the stated conditions.

Formal statement
p :
ℕ
hp :
p = 1 ∨ p = 2
s :
ℝ
hs :
s ∈ Ioo (0 : ℝ) 1
g :
Cube p → ℝ
Proof (Lean source)
-- @node: componentFourierBudget_fractional_le lemma componentFourierBudget_fractional_le (p : ℕ) (hp : p = 1 ∨ p = 2) (s : ℝ) (hs : s ∈ Ioo (0 : ℝ) 1) (g : Cube p → ℝ) : componentFourierBudget p s g ≤ sobolevNormSq p s g := by unfold sobolevNormSq refine le_iInf fun G => le_iInf fun hG => ?_ have h := reflectionL2Operator_fractionalBudget_le hp s hs hG.1 hG.2.1 simp_rw [reflectionTorusCoeff_extension hG.2.1 g hG.2.2] at h simpa only [componentFourierBudget, mul_comm] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.componentFourierBudget_fractional_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:222
theorem componentFourierBudget_le_sobolevNormSq Lemma componentFourierBudget_le_sobolevNormSq in the paper ↗

The complete component reflection contraction, including the first-order endpoint, has constant one in each local dimension. Under the stated conditions.

Formal statement
p :
ℕ
hp :
p = 1 ∨ p = 2
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
g :
Cube p → ℝ
Proof (Lean source)
-- @node: componentFourierBudget_le_sobolevNormSq lemma componentFourierBudget_le_sobolevNormSq (p : ℕ) (hp : p = 1 ∨ p = 2) (s : ℝ) (hs : 0 < s) (hs1 : s ≤ 1) (g : Cube p → ℝ) : componentFourierBudget p s g ≤ sobolevNormSq p s g := by by_cases hendpoint : s = 1 · subst s rcases hp with rfl | rfl · exact componentFourierBudget_one_firstOrder_le g · exact componentFourierBudget_two_firstOrder_le g · exact componentFourierBudget_fractional_le p hp s ⟨hs, lt_of_le_of_ne hs1 hendpoint⟩ g
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.componentFourierBudget_le_sobolevNormSq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTargetInterpolation.lean:233
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionTransfer 1 declarations The product-law assertion simultaneously states iid Haar sampling and independence from the common shift.

Reflection, common shift, and Fourier transfer

The product-law assertion simultaneously states iid Haar sampling and independence from the common shift. The arbitrary assignment kernel reads only W and its own fresh randomness.

theorem reflection_transfer

Even reflection transfers restriction norms, random shifts produce independent Haar samples, and squared imbalance decomposes over the Fourier coefficients in L². This uses the stated conclusion.

Formal statement
conclusion 1
p :
ℕ
p = 1 ∨ p = 2
s :
ℝ
0 < s
s ≤ 1
∃ c : ℝ,
0 < c
g :
Cube p → ℝ
sobolevNormSq p s g < ⊤
conclusion 2
d :
ℕ
2 ≤ d
s :
ℝ
0 < s
s ≤ 1
m :
conclusion 3
n d :
ℕ
Ω :
Type
μ :
X :
Ω → Covariates n d
(μ.prod ((reflectionLaw n d).prod (torusMeasure d))).map (fun ω => (shiftedSample (X ω.1) ω.2.1 ω.2.2, ω.2.2))
= (Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d)
conclusion 4
n d :
ℕ
2 ≤ n
2 ≤ d
s :
ℝ
0 < s
s ≤ 1
m :
Ω :
Type
μ :
X :
Ω → Covariates n d
ρ :
Kernel (Fin n → Torus d) (Signs n)
(∫⁻ ω, ∫⁻ z, ofReal |∑ i, sgn (z i) * m.val (X ω.1 i)| ^ 2 ∂ρ (shiftedSample (X ω.1) ω.2.1 ω.2.2) ∂μ.prod ((reflectionLaw n d).prod (torusMeasure d)))
= ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2 * ∫⁻ w, ∫⁻ z, ofReal ‖∑ i, (sgn (z i) : ℂ) * ek k (w i)‖ ^ 2 ∂ρ w ∂Measure.pi (fun _ : Fin n => torusMeasure d)
Proof (Lean source)
lemma reflection_transfer : (∀ p : ℕ, p = 1 ∨ p = 2 → ∀ s : ℝ, 0 < s → s ≤ 1 → ∃ c : ℝ, 0 < c ∧ ∀ g : Cube p → ℝ, Measurable g → MemLp g 2 (cubeMeasure p) → sobolevNormSq p s g < ⊤ → componentFourierBudget p s g ≤ ofReal c * sobolevNormSq p s g) ∧ (∀ d : ℕ, 2 ≤ d → ∀ s : ℝ, 0 < s → s ≤ 1 → ∀ m : CenteredL2Fn d, SobolevClass d s m → reflectedBudget s m.val ≤ ofReal CUpper) ∧ (∀ (n d : ℕ) (Ω : Type) [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → Covariates n d), UniformDraw μ X → (μ.prod ((reflectionLaw n d).prod (torusMeasure d))).map (fun ω => (shiftedSample (X ω.1) ω.2.1 ω.2.2, ω.2.2)) = (Measure.pi (fun _ : Fin n => torusMeasure d)).prod (torusMeasure d)) ∧ (∀ (n d : ℕ), 2 ≤ n → 2 ≤ d → ∀ s : ℝ, 0 < s → s ≤ 1 → ∀ m : CenteredL2Fn d, SobolevClass d s m → ∀ (Ω : Type) [MeasurableSpace Ω] (μ : Measure Ω) (X : Ω → Covariates n d), UniformDraw μ X → ∀ ρ : Kernel (Fin n → Torus d) (Signs n), IsMarkovKernel ρ → (∫⁻ ω, ∫⁻ z, ofReal |∑ i, sgn (z i) * m.val (X ω.1 i)| ^ 2 ∂ρ (shiftedSample (X ω.1) ω.2.1 ω.2.2) ∂μ.prod ((reflectionLaw n d).prod (torusMeasure d))) = ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2 * ∫⁻ w, ∫⁻ z, ofReal ‖∑ i, (sgn (z i) : ℂ) * ek k (w i)‖ ^ 2 ∂ρ w ∂Measure.pi (fun _ : Fin n => torusMeasure d)) := by refine ⟨?_, ?_, ?_, ?_⟩ · intro p hp s hs hs1 refine ⟨1, zero_lt_one, ?_⟩ intro g hg hLp hfinite simpa using exact_reflection_budget.1 p hp s hs hs1 g hg hLp hfinite · intro d hd s hs hs1 m hm have hbudget := (exact_reflection_budget.2 d s hd hs hs1 m hm).2.2.1 exact hbudget.trans (by norm_num [CUpper]) · intro n d Ω _ μ X hX exact reflectionLaw_map_shiftedSample n d Ω μ X hX · intro n d hn hd s hs hs1 m hm Ω _ μ X hX ρ hρ letI : IsMarkovKernel ρ := hρ exact reflection_kernel_fourier_identity (by omega) m Ω μ X hX ρ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflection_transfer · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTransfer.lean:19
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionTruncation 14 declarations The frequency truncations in step (3) of the reflection-budget proof have compact support and converge in the exact weighted Fourier energy.

Fourier ball truncations for endpoint completion

The frequency truncations in step (3) of the reflection-budget proof have compact support and converge in the exact weighted Fourier energy. No endpoint estimate or periodic boundary condition is assumed here.

[ Cut a frequency profile off at the closed ball of radius R.

Definition (Lean source)
p :
ℕ
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
R :
ℝ
reflectionFrequencyTruncation ψ R :
EuclideanSpace ℝ (Fin p) → ℂ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:18
theorem reflectionFrequencyTruncation_measurable

The cutoff of a measurable frequency profile is measurable. This uses the hψ hypothesis, the stated conclusion.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_measurable @[fun_prop] lemma reflectionFrequencyTruncation_measurable {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : Measurable ψ) (R : ℝ) : Measurable (reflectionFrequencyTruncation ψ R) := by exact hψ.indicator Metric.isClosed_closedBall.measurableSet
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:25
theorem reflectionFrequencyTruncation_memLp

Cutting off a square-integrable profile preserves square integrability.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_memLp lemma reflectionFrequencyTruncation_memLp {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : MemLp (reflectionFrequencyTruncation ψ R) 2 volume := by exact hψ.indicator Metric.isClosed_closedBall.measurableSet
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:32
theorem reflectionFrequencyTruncation_hasCompactSupport

Every frequency cutoff has compact support, including negative-radius cutoffs. The asserted mathematical result follows.

Formal statement
p :
ℕ
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
R :
ℝ
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_hasCompactSupport lemma reflectionFrequencyTruncation_hasCompactSupport {p : ℕ} (ψ : EuclideanSpace ℝ (Fin p) → ℂ) (R : ℝ) : HasCompactSupport (reflectionFrequencyTruncation ψ R) := by apply (isCompact_closedBall (0 : EuclideanSpace ℝ (Fin p)) R).of_isClosed_subset isClosed_closure apply closure_minimal _ Metric.isClosed_closedBall exact support_indicator_subset
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_hasCompactSupport · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:39
theorem reflectionFrequencyTruncation_integrable

A frequency cutoff of an L² profile is L¹ by finite volume of the ball. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_integrable lemma reflectionFrequencyTruncation_integrable {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : Integrable (reflectionFrequencyTruncation ψ R) volume := by have : IsFiniteMeasure (volume.restrict (closedBall (0 : EuclideanSpace ℝ (Fin p)) R)) := ⟨by simpa using (isCompact_closedBall (0 : EuclideanSpace ℝ (Fin p)) R).measure_lt_top⟩ exact (integrable_indicator_iff Metric.isClosed_closedBall.measurableSet).2 ((hψ.restrict _).integrable (by norm_num))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:49
theorem reflectionFrequencyTruncation_multiplier_memLp

Every continuous multiplier of an L² frequency cutoff is again L². In particular this covers all polynomial moments used to differentiate the inverse integral. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
P :
EuclideanSpace ℝ (Fin p) → ℂ
hP :
R :
ℝ
MemLp (fun ω => P ω * reflectionFrequencyTruncation ψ R ω) 2 volume
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_multiplier_memLp lemma reflectionFrequencyTruncation_multiplier_memLp {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (P : EuclideanSpace ℝ (Fin p) → ℂ) (hP : Continuous P) (R : ℝ) : MemLp (fun ω => P ω * reflectionFrequencyTruncation ψ R ω) 2 volume := by obtain ⟨B, hB⟩ := ((isCompact_closedBall (0 : EuclideanSpace ℝ (Fin p)) R).image hP).isBounded.exists_norm_le have hcut := reflectionFrequencyTruncation_memLp hψ R refine (hcut.const_smul (B : ℝ)).mono (hP.aestronglyMeasurable.mul hcut.aestronglyMeasurable) ?_ apply Eventually.of_forall intro ω by_cases hω : ω ∈ closedBall 0 R · rw [norm_mul, Pi.smul_apply, norm_smul, Real.norm_eq_abs] exact mul_le_mul_of_nonneg_right ((hB (P ω) ⟨ω, hω, rfl⟩).trans (le_abs_self B)) (norm_nonneg _) · simp [reflectionFrequencyTruncation, indicator_of_notMem hω]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_multiplier_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:60
theorem reflectionFrequencyTruncation_multiplier_integrable

Continuous multipliers of frequency cutoffs are L¹ as well as L², since their supports lie in the same finite-volume ball. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
P :
EuclideanSpace ℝ (Fin p) → ℂ
hP :
R :
ℝ
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_multiplier_integrable lemma reflectionFrequencyTruncation_multiplier_integrable {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (P : EuclideanSpace ℝ (Fin p) → ℂ) (hP : Continuous P) (R : ℝ) : Integrable (fun ω => P ω * reflectionFrequencyTruncation ψ R ω) volume := by have hmul := reflectionFrequencyTruncation_multiplier_memLp hψ P hP R have : IsFiniteMeasure (volume.restrict (closedBall (0 : EuclideanSpace ℝ (Fin p)) R)) := ⟨by simpa using (isCompact_closedBall (0 : EuclideanSpace ℝ (Fin p)) R).measure_lt_top⟩ have hi := (integrable_indicator_iff Metric.isClosed_closedBall.measurableSet).2 ((hmul.restrict (closedBall 0 R)).integrable (by norm_num)) have he : (closedBall 0 R).indicator (fun ω => P ω * reflectionFrequencyTruncation ψ R ω) = (fun ω => P ω * reflectionFrequencyTruncation ψ R ω) := by funext ω by_cases hω : ω ∈ closedBall 0 R · simp [hω] · simp [reflectionFrequencyTruncation, hω] rw [he] at hi exact hi
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_multiplier_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:80
theorem reflectionFrequencyTruncation_norm_moment_integrable

Every norm moment of a truncated L² profile is integrable. Under the stated conditions.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
n :
ℕ
Integrable (fun ω => ‖ω‖ ^ n * ‖reflectionFrequencyTruncation ψ R ω‖) volume
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_norm_moment_integrable lemma reflectionFrequencyTruncation_norm_moment_integrable {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) (n : ℕ) : Integrable (fun ω => ‖ω‖ ^ n * ‖reflectionFrequencyTruncation ψ R ω‖) volume := by have hc : Continuous (fun ω : EuclideanSpace ℝ (Fin p) => (‖ω‖ ^ n : ℂ)) := by fun_prop have hi := (reflectionFrequencyTruncation_multiplier_integrable hψ _ hc R).norm simpa only [norm_mul, norm_pow, Complex.norm_real, Real.norm_eq_abs, abs_of_nonneg (norm_nonneg _)] using hi
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_norm_moment_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:103

The smooth inverse angular Fourier integral of a ball-truncated profile. Evaluating the forward angular transform at minus the spatial argument gives exactly the positive exponential and the unitary prefactor in step (3).

Definition (Lean source)
p :
ℕ
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
R :
ℝ
reflectionSmoothApproximation ψ R :
EuclideanSpace ℝ (Fin p) → ℂ
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:115
theorem reflectionSmoothApproximation_eq_integral

The constructed smooth approximation is the normalized inverse angular integral from step (3), with the positive exponential and no extra dilation constant. The asserted mathematical result follows.

Formal statement
p :
ℕ
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
R :
ℝ
u :
= (2 * pi) ^ (-(p : ℝ) / 2) • ∫ ω, exp (I * ((∑ h, ω h * u h : ℝ) : ℂ)) * reflectionFrequencyTruncation ψ R ω
Proof (Lean source)
-- @node: reflectionSmoothApproximation_eq_integral lemma reflectionSmoothApproximation_eq_integral {p : ℕ} (ψ : EuclideanSpace ℝ (Fin p) → ℂ) (R : ℝ) (u : EuclideanSpace ℝ (Fin p)) : reflectionSmoothApproximation ψ R u = (2 * pi) ^ (-(p : ℝ) / 2) • ∫ ω, exp (I * ((∑ h, ω h * u h : ℝ) : ℂ)) * reflectionFrequencyTruncation ψ R ω := by simp only [reflectionSmoothApproximation, Fourier, PiLp.neg_apply, neg_mul, Finset.sum_neg_distrib, Complex.ofReal_neg, mul_neg, neg_neg, mul_comm]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_eq_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:124
theorem reflectionSmoothApproximation_contDiff

The inverse integral from the roadmap is smooth to every order, because all norm moments of its compactly supported L² frequency profile are L¹. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
R :
ℝ
ContDiff ℝ (↑(⊤ : ℕ∞)) (reflectionSmoothApproximation ψ R)
Proof (Lean source)
-- @node: reflectionSmoothApproximation_contDiff lemma reflectionSmoothApproximation_contDiff {p : ℕ} {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : MemLp ψ 2 volume) (R : ℝ) : ContDiff ℝ (↑(⊤ : ℕ∞)) (reflectionSmoothApproximation ψ R) := by have hf : ContDiff ℝ (↑(⊤ : ℕ∞)) (𝓕 (reflectionFrequencyTruncation ψ R)) := Real.contDiff_fourier (fun n _ => reflectionFrequencyTruncation_norm_moment_integrable hψ R n) have he : reflectionSmoothApproximation ψ R = (fun u => angularPrefactor p • (𝓕 (reflectionFrequencyTruncation ψ R)) ((2 * pi)⁻¹ • (-u))) := by funext u exact angularFourier_eq_mathlib _ _ rw [he] have hd : ContDiff ℝ (↑(⊤ : ℕ∞)) (fun u : EuclideanSpace ℝ (Fin p) => (2 * pi)⁻¹ • (-u)) := by fun_prop exact (hf.comp hd).const_smul _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionSmoothApproximation_contDiff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:137
theorem reflectionFrequencyTruncation_eventually_eq

At each frequency the integer-radius truncations eventually equal the profile. The asserted mathematical result follows.

Formal statement
p :
ℕ
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
ω :
∀ᶠ n : ℕ in atTop, reflectionFrequencyTruncation ψ (n : ℝ) ω = ψ ω
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_eventually_eq lemma reflectionFrequencyTruncation_eventually_eq {p : ℕ} (ψ : EuclideanSpace ℝ (Fin p) → ℂ) (ω : EuclideanSpace ℝ (Fin p)) : ∀ᶠ n : ℕ in atTop, reflectionFrequencyTruncation ψ (n : ℝ) ω = ψ ω := by obtain ⟨N, hN⟩ := exists_nat_ge ‖ω‖ filter_upwards [eventually_ge_atTop N] with n hn apply indicator_of_mem simpa only [Metric.mem_closedBall, dist_zero_right] using hN.trans (Nat.cast_le.mpr hn)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_eventually_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:157
theorem reflectionFrequencyTruncation_weighted_error_tendsto

The exact weighted squared error of the frequency truncations tends to zero. This is the dominated-convergence assertion in step (3), with the paper's local normalization by p and with no loss in the weight. Under the stated conditions, the asserted mathematical result follows.

Formal statement
p :
ℕ
s :
ℝ
ψ :
EuclideanSpace ℝ (Fin p) → ℂ
hψ :
hfinite :
(∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) ≠ ⊤
Tendsto (fun n : ℕ => ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) atTop (𝓝 0)
Proof (Lean source)
-- @node: reflectionFrequencyTruncation_weighted_error_tendsto lemma reflectionFrequencyTruncation_weighted_error_tendsto {p : ℕ} (s : ℝ) {ψ : EuclideanSpace ℝ (Fin p) → ℂ} (hψ : Measurable ψ) (hfinite : (∫⁻ ω, ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) ≠ ⊤) : Tendsto (fun n : ℕ => ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) atTop (𝓝 0) := by have hmeas (n : ℕ) : Measurable (fun ω => ofReal (‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) := by fun_prop have hbound (n : ℕ) : (fun ω => ofReal (‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) ≤ᵐ[volume] (fun ω => ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) := by apply Eventually.of_forall intro ω by_cases hω : ω ∈ closedBall 0 (n : ℝ) · simp only [reflectionFrequencyTruncation, indicator_of_mem hω, sub_self, norm_zero, zero_pow (by decide : 2 ≠ 0), zero_mul, ENNReal.ofReal_zero] exact bot_le · simp only [reflectionFrequencyTruncation, indicator_of_notMem hω, zero_sub, norm_neg] exact le_rfl have hlim : ∀ᵐ ω ∂volume, Tendsto (fun n : ℕ => ofReal (‖reflectionFrequencyTruncation ψ (n : ℝ) ω - ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) atTop (𝓝 (0 : ℝ≥0∞)) := by apply Eventually.of_forall intro ω apply tendsto_const_nhds.congr' filter_upwards [reflectionFrequencyTruncation_eventually_eq ψ ω] with n hn simp [hn] simpa using tendsto_lintegral_of_dominated_convergence (fun ω => ofReal (‖ψ ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) hmeas hbound hfinite hlim
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFrequencyTruncation_weighted_error_tendsto · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:168
theorem reflectionFourierTruncation_approximation

The genuine Fourier ball truncations of an admissible whole-space extension satisfy the smoothness, integrable-moment and weighted frequency-convergence parts of step (3). Identifying the inverse integrals in L² remains a separate step. Under the stated conditions.

Formal statement
p :
ℕ
s :
ℝ
G :
EuclideanSpace ℝ (Fin p) → ℂ
hG1 :
hG2 :
hfinite :
(∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) ≠ ⊤
conclusion 1
R :
ℝ
ContDiff ℝ (↑(⊤ : ℕ∞)) (reflectionSmoothApproximation (Fourier G) R)
conclusion 2
R :
ℝ
n :
ℕ
Integrable (fun ω => ‖ω‖ ^ n * ‖reflectionFrequencyTruncation (Fourier G) R ω‖) volume
conclusion 3
Tendsto (fun n : ℕ => ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation (Fourier G) (n : ℝ) ω - Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) atTop (𝓝 0)
Proof (Lean source)
-- @node: reflectionFourierTruncation_approximation lemma reflectionFourierTruncation_approximation {p : ℕ} (s : ℝ) (G : EuclideanSpace ℝ (Fin p) → ℂ) (hG1 : Integrable G volume) (hG2 : MemLp G 2 volume) (hfinite : (∫⁻ ω, ofReal (‖Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) ≠ ⊤) : (∀ R : ℝ, ContDiff ℝ (↑(⊤ : ℕ∞)) (reflectionSmoothApproximation (Fourier G) R)) ∧ (∀ (R : ℝ) (n : ℕ), Integrable (fun ω => ‖ω‖ ^ n * ‖reflectionFrequencyTruncation (Fourier G) R ω‖) volume) ∧ Tendsto (fun n : ℕ => ∫⁻ ω, ofReal (‖reflectionFrequencyTruncation (Fourier G) (n : ℝ) ω - Fourier G ω‖ ^ 2 * (1 + ‖ω‖ ^ 2 / (p : ℝ)) ^ s)) atTop (𝓝 0) := by have hLp : MemLp (Fourier G) 2 volume := Causalean.Mathlib.Analysis.Fourier.angularFourier_memLp G hG1 hG2 have hm : Measurable (Fourier G) := angularFourier_measurable G hG1 exact ⟨fun R => reflectionSmoothApproximation_contDiff hLp R, fun R n => reflectionFrequencyTruncation_norm_moment_integrable hLp R n, reflectionFrequencyTruncation_weighted_error_tendsto s hm hfinite⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionFourierTruncation_approximation · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionTruncation.lean:208
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.ReflectionWeakDerivative 15 declarations On the period-two representative interval, a smooth cube slice is reflected at one.

Face cancellation for the first-order reflection endpoint

On the period-two representative interval, a smooth cube slice is reflected at one. Its signed derivative satisfies integration by parts against periodic smooth tests: the internal face cancels, and the two external faces cancel using periodicity of the test alone. The cube slice has no boundary condition. Parseval then proves the one-dimensional smooth first-order spectral endpoint with constant one. These establish equations (4) and (5) of the reflection-budget roadmap on slices, before Fourier truncation and completion.

[ The even reflected slice on the period-two representative interval.

Definition (Lean source)
f :
ℝ → ℂ
y :
ℝ
evenReflectionSlice f y :
ℂ
if y ≤ 1 then f y else f (2 - y)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionSlice · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:22

The derivative on reflected open cells has opposite signs on the two halves.

Definition (Lean source)
f' :
ℝ → ℂ
y :
ℝ
signedReflectionSlice f' y :
ℂ
if y ≤ 1 then f' y else -f' (2 - y)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionSlice · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:27
theorem reflectionCells_integral_split Lemma reflectionCells_integral_split in the paper ↗

Splitting a two-cell integral is valid even if its two formulas disagree on the join.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
E :
h₀ :
h₁ :
(∫ y in (0 : ℝ)..2, if y ≤ 1 then f₀ y else f₁ y)
= (∫ y in (0 : ℝ)..1, f₀ y) + ∫ y in (1 : ℝ)..2, f₁ y
Proof (Lean source)
-- @node: reflectionCells_integral_split lemma reflectionCells_integral_split {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [CompleteSpace E] {f₀ f₁ : ℝ → E} (h₀ : Continuous f₀) (h₁ : Continuous f₁) : (∫ y in (0 : ℝ)..2, if y ≤ 1 then f₀ y else f₁ y) = (∫ y in (0 : ℝ)..1, f₀ y) + ∫ y in (1 : ℝ)..2, f₁ y := by have hi₀ : IntervalIntegrable (fun y => if y ≤ 1 then f₀ y else f₁ y) volume 0 1 := by apply (intervalIntegrable_congr_uIoo ?_).mpr (h₀.intervalIntegrable 0 1) intro y hy have hy' : y ∈ Ioo (0 : ℝ) 1 := by simpa [uIoo] using hy simp [hy'.2.le] have hi₁ : IntervalIntegrable (fun y => if y ≤ 1 then f₀ y else f₁ y) volume 1 2 := by apply (intervalIntegrable_congr_uIoo ?_).mpr (h₁.intervalIntegrable 1 2) intro y hy have hy' : y ∈ Ioo (1 : ℝ) 2 := by simpa [uIoo] using hy simp [not_le.mpr hy'.1] rw [← intervalIntegral.integral_add_adjacent_intervals hi₀ hi₁] congr 1 · apply intervalIntegral.integral_congr_ae exact Filter.Eventually.of_forall (fun y hy => by have hy' : y ∈ Ioc (0 : ℝ) 1 := by simpa using hy simp [hy'.2]) · apply intervalIntegral.integral_congr_ae exact Filter.Eventually.of_forall (fun y hy => by have hy' : y ∈ Ioc (1 : ℝ) 2 := by simpa using hy simp [not_le.mpr hy'.1])
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionCells_integral_split · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:32
theorem reflectedSlice_hasDerivAt Lemma reflectedSlice_hasDerivAt in the paper ↗

Reflecting a differentiable slice reverses its derivative on the second cell. Under the stated conditions.

Formal statement
f :
ℝ → ℂ
f' :
ℂ
y :
ℝ
hf :
HasDerivAt f f' (2 - y)
HasDerivAt (fun t => f (2 - t)) (-f') y
Proof (Lean source)
-- @node: reflectedSlice_hasDerivAt lemma reflectedSlice_hasDerivAt {f : ℝ → ℂ} {f' : ℂ} {y : ℝ} (hf : HasDerivAt f f' (2 - y)) : HasDerivAt (fun t => f (2 - t)) (-f') y := by simpa using! hf.scomp y ((hasDerivAt_id y).const_sub 2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectedSlice_hasDerivAt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:62
theorem evenReflectionSlice_integration_by_parts

Integration by parts cancels both reflected faces. Only the test values at zero and two must agree; no equality between the cube function's values at zero and one is used. Under the stated conditions.

Formal statement
f f' v v' :
ℝ → ℂ
hf :
∀ x, HasDerivAt f (f' x) x
hf' :
hv :
∀ x, HasDerivAt v (v' x) x
hv' :
hperiod :
v 2 = v 0
(∫ y in (0 : ℝ)..2, evenReflectionSlice f y * v' y)
= -(∫ y in (0 : ℝ)..2, signedReflectionSlice f' y * v y)
Proof (Lean source)
-- @node: evenReflectionSlice_integration_by_parts lemma evenReflectionSlice_integration_by_parts {f f' v v' : ℝ → ℂ} (hf : ∀ x, HasDerivAt f (f' x) x) (hf' : Continuous f') (hv : ∀ x, HasDerivAt v (v' x) x) (hv' : Continuous v') (hperiod : v 2 = v 0) : (∫ y in (0 : ℝ)..2, evenReflectionSlice f y * v' y) = -(∫ y in (0 : ℝ)..2, signedReflectionSlice f' y * v y) := by have hfc : Continuous f := continuous_iff_continuousAt.mpr (fun x => (hf x).continuousAt) have hvc : Continuous v := continuous_iff_continuousAt.mpr (fun x => (hv x).continuousAt) have hrc : Continuous (fun y => f (2 - y)) := by fun_prop have hrd : Continuous (fun y => -f' (2 - y)) := by fun_prop have hleft := intervalIntegral.integral_mul_deriv_eq_deriv_mul_of_hasDerivAt hfc.continuousOn hvc.continuousOn (fun x _ => hf x) (fun x _ => hv x) (hf'.intervalIntegrable 0 1) (hv'.intervalIntegrable 0 1) have hright := intervalIntegral.integral_mul_deriv_eq_deriv_mul_of_hasDerivAt hrc.continuousOn hvc.continuousOn (fun x _ => reflectedSlice_hasDerivAt (hf (2 - x))) (fun x _ => hv x) (hrd.intervalIntegrable 1 2) (hv'.intervalIntegrable 1 2) simp only [evenReflectionSlice, signedReflectionSlice, ite_mul] have hi := reflectionCells_integral_split (hfc.mul hv') (hrc.mul hv') have hj := reflectionCells_integral_split (hf'.mul hvc) (hrd.mul hvc) simp only [Pi.mul_apply] at hi hj rw [hi, hj, hleft, hright] norm_num only at * rw [hperiod] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionSlice_integration_by_parts · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:69
theorem evenReflectionSlice_energy

The normalized reflected L² energy is exactly the cube-slice energy. Under the stated conditions.

Formal statement
f :
ℝ → ℂ
hf :
(1 / 2 : ℝ) * (∫ y in (0 : ℝ)..2, ‖evenReflectionSlice f y‖ ^ 2)
= ∫ x in (0 : ℝ)..1, ‖f x‖ ^ 2
Proof (Lean source)
-- @node: evenReflectionSlice_energy lemma evenReflectionSlice_energy {f : ℝ → ℂ} (hf : Continuous f) : (1 / 2 : ℝ) * (∫ y in (0 : ℝ)..2, ‖evenReflectionSlice f y‖ ^ 2) = ∫ x in (0 : ℝ)..1, ‖f x‖ ^ 2 := by have h₀ : Continuous (fun y => ‖f y‖ ^ 2) := by fun_prop have h₁ : Continuous (fun y => ‖f (2 - y)‖ ^ 2) := by fun_prop simp only [evenReflectionSlice, apply_ite (fun z : ℂ => ‖z‖ ^ 2)] rw [reflectionCells_integral_split h₀ h₁, intervalIntegral.integral_comp_sub_left (fun y => ‖f y‖ ^ 2) 2] norm_num ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionSlice_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:97
theorem signedReflectionSlice_energy

The sign reversal preserves the normalized derivative energy, with constant one. Under the stated conditions.

Formal statement
f' :
ℝ → ℂ
hf' :
(1 / 2 : ℝ) * (∫ y in (0 : ℝ)..2, ‖signedReflectionSlice f' y‖ ^ 2)
= ∫ x in (0 : ℝ)..1, ‖f' x‖ ^ 2
Proof (Lean source)
-- @node: signedReflectionSlice_energy lemma signedReflectionSlice_energy {f' : ℝ → ℂ} (hf' : Continuous f') : (1 / 2 : ℝ) * (∫ y in (0 : ℝ)..2, ‖signedReflectionSlice f' y‖ ^ 2) = ∫ x in (0 : ℝ)..1, ‖f' x‖ ^ 2 := by have he : (fun y => ‖signedReflectionSlice f' y‖ ^ 2) = fun y => ‖evenReflectionSlice f' y‖ ^ 2 := by funext y simp only [signedReflectionSlice, evenReflectionSlice] split_ifs <;> simp rw [he] exact evenReflectionSlice_energy hf'
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionSlice_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:110

[ Fourier coefficients on the period-two representative interval use normalized Haar mass.

Definition (Lean source)
f :
ℝ → ℂ
a :
ℤ
periodTwoSliceCoeff f a :
ℂ
(1 / 2 : ℂ) * ∫ y in (0 : ℝ)..2, fourier (-a) (y : AddCircle (2 : ℝ)) * f y
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.periodTwoSliceCoeff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:123
theorem signedReflectionSlice_fourierCoeff

Testing the cancelled slice identity with a character gives the exact derivative multiplier, including zero frequency.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
f f' :
ℝ → ℂ
hf :
∀ x, HasDerivAt f (f' x) x
hf' :
a :
ℤ
Proof (Lean source)
-- @node: signedReflectionSlice_fourierCoeff lemma signedReflectionSlice_fourierCoeff {f f' : ℝ → ℂ} (hf : ∀ x, HasDerivAt f (f' x) x) (hf' : Continuous f') (a : ℤ) : periodTwoSliceCoeff (signedReflectionSlice f') a = I * (Real.pi : ℂ) * (a : ℂ) * periodTwoSliceCoeff (evenReflectionSlice f) a := by let v : ℝ → ℂ := fun y => fourier (-a) (y : AddCircle (2 : ℝ)) let c : ℂ := -2 * (Real.pi : ℂ) * I * (a : ℂ) / 2 have hv (y : ℝ) : HasDerivAt v (c * v y) y := hasDerivAt_fourier_neg 2 a y have hvc : Continuous v := continuous_iff_continuousAt.mpr (fun y => (hv y).continuousAt) have hv' : Continuous (fun y => c * v y) := by fun_prop have hp : v 2 = v 0 := by change fourier (-a) ((2 : ℝ) : AddCircle (2 : ℝ)) = fourier (-a) (0 : AddCircle (2 : ℝ)) rw [AddCircle.coe_period] have h := evenReflectionSlice_integration_by_parts hf hf' hv hv' hp have hl : (∫ y in (0 : ℝ)..2, evenReflectionSlice f y * (c * v y)) = c * ∫ y in (0 : ℝ)..2, v y * evenReflectionSlice f y := by rw [← intervalIntegral.integral_const_mul] apply intervalIntegral.integral_congr intro y _ ring have hr : (∫ y in (0 : ℝ)..2, signedReflectionSlice f' y * v y) = ∫ y in (0 : ℝ)..2, v y * signedReflectionSlice f' y := by apply intervalIntegral.integral_congr intro y _ ring rw [hl, hr] at h dsimp only [periodTwoSliceCoeff, v, c] at h ⊢ linear_combination (1 / 2 : ℂ) * h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionSlice_fourierCoeff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:128
theorem evenReflectionSlice_firstOrder_energy

The zeroth and derivative energies add without loss under normalized even reflection. Under the stated conditions.

Formal statement
f f' :
ℝ → ℂ
hf :
hf' :
(1 / 2 : ℝ) * ((∫ y in (0 : ℝ)..2, ‖evenReflectionSlice f y‖ ^ 2) + ∫ y in (0 : ℝ)..2, ‖signedReflectionSlice f' y‖ ^ 2)
= (∫ x in (0 : ℝ)..1, ‖f x‖ ^ 2) + ∫ x in (0 : ℝ)..1, ‖f' x‖ ^ 2
Proof (Lean source)
-- @node: evenReflectionSlice_firstOrder_energy lemma evenReflectionSlice_firstOrder_energy {f f' : ℝ → ℂ} (hf : Continuous f) (hf' : Continuous f') : (1 / 2 : ℝ) * ((∫ y in (0 : ℝ)..2, ‖evenReflectionSlice f y‖ ^ 2) + ∫ y in (0 : ℝ)..2, ‖signedReflectionSlice f' y‖ ^ 2) = (∫ x in (0 : ℝ)..1, ‖f x‖ ^ 2) + ∫ x in (0 : ℝ)..1, ‖f' x‖ ^ 2 := by rw [mul_add, evenReflectionSlice_energy hf, signedReflectionSlice_energy hf']
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionSlice_firstOrder_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:162

Continuous cell formulas give Lp regularity on the finite representative interval, even when the signed derivative jumps at the reflection face. Under the stated conditions.

Formal statement
f₀ f₁ :
ℝ → ℂ
h₀ :
h₁ :
q :
ℝ≥0∞
MemLp (fun y => if y ≤ 1 then f₀ y else f₁ y) q (volume.restrict (Ioc (0 : ℝ) 2))
Proof (Lean source)
-- @node: reflectionCells_memLp lemma reflectionCells_memLp {f₀ f₁ : ℝ → ℂ} (h₀ : Continuous f₀) (h₁ : Continuous f₁) (q : ℝ≥0∞) : MemLp (fun y => if y ≤ 1 then f₀ y else f₁ y) q (volume.restrict (Ioc (0 : ℝ) 2)) := by obtain ⟨C₀, hC₀⟩ := (isCompact_Icc : IsCompact (Icc (0 : ℝ) 2)).bddAbove_image h₀.norm.continuousOn obtain ⟨C₁, hC₁⟩ := (isCompact_Icc : IsCompact (Icc (0 : ℝ) 2)).bddAbove_image h₁.norm.continuousOn apply MemLp.of_bound (C := max C₀ C₁) · apply Measurable.aestronglyMeasurable exact Measurable.ite measurableSet_Iic h₀.measurable h₁.measurable · filter_upwards [ae_restrict_mem measurableSet_Ioc] with y hy have hyc : y ∈ Icc (0 : ℝ) 2 := ⟨hy.1.le, hy.2⟩ by_cases h : y ≤ 1 · simp only [if_pos h] exact (hC₀ ⟨y, hyc, rfl⟩).trans (le_max_left _ _) · simp only [if_neg h] exact (hC₁ ⟨y, hyc, rfl⟩).trans (le_max_right _ _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.reflectionCells_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:171
theorem periodTwoSliceCoeff_eq_fourierCoeffOn

The local slice normalization agrees with Mathlib's interval Fourier coefficients. The asserted mathematical result follows.

Formal statement
f :
ℝ → ℂ
a :
ℤ
periodTwoSliceCoeff f a = fourierCoeffOn (by norm_num : (0 : ℝ) < 2) f a
Proof (Lean source)
-- @node: periodTwoSliceCoeff_eq_fourierCoeffOn lemma periodTwoSliceCoeff_eq_fourierCoeffOn (f : ℝ → ℂ) (a : ℤ) : periodTwoSliceCoeff f a = fourierCoeffOn (by norm_num : (0 : ℝ) < 2) f a := by rw [fourierCoeffOn_eq_integral] simp only [periodTwoSliceCoeff, sub_zero, Complex.real_smul, Complex.ofReal_div, Complex.ofReal_one, Complex.ofReal_ofNat, smul_eq_mul] simp only [fourier_coe_apply, sub_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.periodTwoSliceCoeff_eq_fourierCoeffOn · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:193
theorem signedReflectionSlice_fourierCoeff_normSq

Squaring the exact derivative multiplier supplies the first-order Fourier weight. Under the stated conditions, the asserted mathematical result follows.

Formal statement
f f' :
ℝ → ℂ
hf :
∀ x, HasDerivAt f (f' x) x
hf' :
a :
ℤ
‖periodTwoSliceCoeff (signedReflectionSlice f') a‖ ^ 2
= pi ^ 2 * (a : ℝ) ^ 2 * ‖periodTwoSliceCoeff (evenReflectionSlice f) a‖ ^ 2
Proof (Lean source)
-- @node: signedReflectionSlice_fourierCoeff_normSq lemma signedReflectionSlice_fourierCoeff_normSq {f f' : ℝ → ℂ} (hf : ∀ x, HasDerivAt f (f' x) x) (hf' : Continuous f') (a : ℤ) : ‖periodTwoSliceCoeff (signedReflectionSlice f') a‖ ^ 2 = pi ^ 2 * (a : ℝ) ^ 2 * ‖periodTwoSliceCoeff (evenReflectionSlice f) a‖ ^ 2 := by rw [signedReflectionSlice_fourierCoeff hf hf'] simp [mul_pow, Complex.norm_intCast, Real.norm_eq_abs, sq_abs]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signedReflectionSlice_fourierCoeff_normSq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:202
theorem evenReflectionSlice_firstOrder_parseval

Parseval on the function and its signed weak derivative proves the smooth, one-dimensional first-order endpoint with the exact constant one. Under the stated conditions.

Formal statement
f f' :
ℝ → ℂ
hf :
∀ x, HasDerivAt f (f' x) x
hf' :
HasSum (fun a : ℤ => (1 + pi ^ 2 * (a : ℝ) ^ 2) * ‖periodTwoSliceCoeff (evenReflectionSlice f) a‖ ^ 2) ((∫ x in (0 : ℝ)..1, ‖f x‖ ^ 2) + ∫ x in (0 : ℝ)..1, ‖f' x‖ ^ 2)
Proof (Lean source)
-- @node: evenReflectionSlice_firstOrder_parseval lemma evenReflectionSlice_firstOrder_parseval {f f' : ℝ → ℂ} (hf : ∀ x, HasDerivAt f (f' x) x) (hf' : Continuous f') : HasSum (fun a : ℤ => (1 + pi ^ 2 * (a : ℝ) ^ 2) * ‖periodTwoSliceCoeff (evenReflectionSlice f) a‖ ^ 2) ((∫ x in (0 : ℝ)..1, ‖f x‖ ^ 2) + ∫ x in (0 : ℝ)..1, ‖f' x‖ ^ 2) := by have hfc : Continuous f := continuous_iff_continuousAt.mpr (fun x => (hf x).continuousAt) have hrc : Continuous (fun y => f (2 - y)) := by fun_prop have hrd : Continuous (fun y => -f' (2 - y)) := by fun_prop have hL : MemLp (evenReflectionSlice f) 2 (volume.restrict (Ioc (0 : ℝ) 2)) := reflectionCells_memLp hfc hrc 2 have hD : MemLp (signedReflectionSlice f') 2 (volume.restrict (Ioc (0 : ℝ) 2)) := reflectionCells_memLp hf' hrd 2 have h₀ := hasSum_sq_fourierCoeffOn (by norm_num : (0 : ℝ) < 2) hL have h₁ := hasSum_sq_fourierCoeffOn (by norm_num : (0 : ℝ) < 2) hD simp only [← periodTwoSliceCoeff_eq_fourierCoeffOn, sub_zero, inv_eq_one_div, smul_eq_mul, evenReflectionSlice_energy hfc, signedReflectionSlice_energy hf'] at h₀ h₁ convert h₀.add h₁ using 1 funext a rw [signedReflectionSlice_fourierCoeff_normSq hf hf'] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionSlice_firstOrder_parseval · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:211
theorem evenReflectionSlice_firstOrder_le_wholeSpace

Restricting the smooth one-dimensional endpoint energy to the cube is a contraction from whole-space spatial H¹ energy, independently of the two original face values. Under the stated conditions.

Formal statement
f f' :
ℝ → ℂ
hf :
∀ x, HasDerivAt f (f' x) x
hf' :
hL :
hD :
(∑' a : ℤ, (1 + pi ^ 2 * (a : ℝ) ^ 2) * ‖periodTwoSliceCoeff (evenReflectionSlice f) a‖ ^ 2)
≤ (∫ x : ℝ, ‖f x‖ ^ 2) + ∫ x : ℝ, ‖f' x‖ ^ 2
Proof (Lean source)
-- @node: evenReflectionSlice_firstOrder_le_wholeSpace lemma evenReflectionSlice_firstOrder_le_wholeSpace {f f' : ℝ → ℂ} (hf : ∀ x, HasDerivAt f (f' x) x) (hf' : Continuous f') (hL : MemLp f 2 volume) (hD : MemLp f' 2 volume) : (∑' a : ℤ, (1 + pi ^ 2 * (a : ℝ) ^ 2) * ‖periodTwoSliceCoeff (evenReflectionSlice f) a‖ ^ 2) ≤ (∫ x : ℝ, ‖f x‖ ^ 2) + ∫ x : ℝ, ‖f' x‖ ^ 2 := by rw [(evenReflectionSlice_firstOrder_parseval hf hf').tsum_eq] have hi := hL.integrable_norm_pow (by norm_num) have hd := hD.integrable_norm_pow (by norm_num) have h₀ : (∫ x in (0 : ℝ)..1, ‖f x‖ ^ 2) ≤ ∫ x : ℝ, ‖f x‖ ^ 2 := by rw [intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 1)] exact setIntegral_le_integral hi (Filter.Eventually.of_forall (fun x => sq_nonneg ‖f x‖)) have h₁ : (∫ x in (0 : ℝ)..1, ‖f' x‖ ^ 2) ≤ ∫ x : ℝ, ‖f' x‖ ^ 2 := by rw [intervalIntegral.integral_of_le (by norm_num : (0 : ℝ) ≤ 1)] exact setIntegral_le_integral hd (Filter.Eventually.of_forall (fun x => sq_nonneg ‖f' x‖)) exact add_le_add h₀ h₁
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.evenReflectionSlice_firstOrder_le_wholeSpace · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/ReflectionWeakDerivative.lean:235
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingBorel 15 declarations The active-coordinate masks, sign-guarded finite boundary minima, and finite inverse-CDF selections are measurable without rank or nondegeneracy assumptions.

Borel arithmetic for ordered boundary rounding

The active-coordinate masks, sign-guarded finite boundary minima, and finite inverse-CDF selections are measurable without rank or nondegeneracy assumptions. These are the arithmetic ingredients of the roadmap's Borel-stratum argument.

theorem finiteMin_cons_of_ne_nil Lemma finiteMin_cons_of_ne_nil in the paper ↗

Adding an entry to a nonempty finite minimum takes the minimum of the two values. Under the stated conditions.

Formal statement
a :
ℝ
xs :
List ℝ
hne :
xs ≠ []
finiteMin (a :: xs) = min a (finiteMin xs)
Proof (Lean source)
-- @node: finiteMin_cons_of_ne_nil lemma finiteMin_cons_of_ne_nil (a : ℝ) (xs : List ℝ) (hne : xs ≠ []) : finiteMin (a :: xs) = min a (finiteMin xs) := by cases xs with | nil => exact (hne rfl).elim | cons b bs => simp [finiteMin, List.foldl_assoc]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteMin_cons_of_ne_nil · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:18
theorem finiteMin_guarded_measurable Lemma finiteMin_guarded_measurable in the paper ↗

A sign-guarded list is empty on a measurable set and its finite minimum is measurable. Under the stated conditions.

Formal statement
Ω ι :
l :
List ι
p :
ι → Ω → Prop
∀ i, DecidablePred (p i)
f :
ι → Ω → ℝ
hp :
∀ i, MeasurableSet {x | p i x}
hf :
∀ i, Measurable (f i)
conclusion 1
MeasurableSet {x | l.filterMap (fun i => if p i x then some (f i x) else none) = []}
conclusion 2
Measurable (fun x => finiteMin (l.filterMap (fun i => if p i x then some (f i x) else none)))
Proof (Lean source)
-- @node: finiteMin_guarded_measurable lemma finiteMin_guarded_measurable {Ω ι : Type*} [MeasurableSpace Ω] (l : List ι) (p : ι → Ω → Prop) [∀ i, DecidablePred (p i)] (f : ι → Ω → ℝ) (hp : ∀ i, MeasurableSet {x | p i x}) (hf : ∀ i, Measurable (f i)) : MeasurableSet {x | l.filterMap (fun i => if p i x then some (f i x) else none) = []} ∧ Measurable (fun x => finiteMin (l.filterMap (fun i => if p i x then some (f i x) else none))) := by classical induction l with | nil => exact ⟨by simp, measurable_const⟩ | cons i l ih => have he : MeasurableSet {x | ¬p i x ∧ l.filterMap (fun j => if p j x then some (f j x) else none) = []} := (hp i).compl.inter ih.1 constructor · convert he using 1 ext x by_cases h : p i x <;> simp [h] · have hm := (hf i).min ih.2 have ht : Measurable (fun x => if l.filterMap (fun j => if p j x then some (f j x) else none) = [] then f i x else min (f i x) (finiteMin (l.filterMap (fun j => if p j x then some (f j x) else none)))) := (hf i).ite ih.1 hm have hout : Measurable (fun x => if p i x then (if l.filterMap (fun j => if p j x then some (f j x) else none) = [] then f i x else min (f i x) (finiteMin (l.filterMap (fun j => if p j x then some (f j x) else none)))) else finiteMin (l.filterMap (fun j => if p j x then some (f j x) else none))) := ht.ite (hp i) ih.2 convert hout using 1 ext x by_cases h : p i x · simp only [List.filterMap_cons, if_pos h] by_cases hl : l.filterMap (fun j => if p j x then some (f j x) else none) = [] · simp [hl, finiteMin] · simp [hl, finiteMin_cons_of_ne_nil _ _ hl] · simp [h]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteMin_guarded_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:26

[ Finite row inner products are Borel in both vectors. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
Measurable (fun vw : (Fin n → ℝ) × (Fin n → ℝ) => rowDot vw.1 vw.2)
Proof (Lean source)
@[fun_prop] -- @node: rowDot_measurable lemma rowDot_measurable : Measurable (fun vw : (Fin n → ℝ) × (Fin n → ℝ) => rowDot vw.1 vw.2) := by unfold rowDot fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.rowDot_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:67

Restriction to the active coordinates is Borel even at boundary states. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => activeMask uv.1 uv.2)
Proof (Lean source)
@[fun_prop] -- @node: activeMask_measurable lemma activeMask_measurable : Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => activeMask uv.1 uv.2) := by unfold activeMask apply measurable_pi_lambda intro i exact Measurable.ite (measurableSet_lt (show Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => |uv.1 i|) by fun_prop) measurable_const) (by fun_prop) measurable_const
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.activeMask_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:75
theorem boundaryPlus_measurable Lemma boundaryPlus_measurable in the paper ↗

The boundary minimum is Borel in state and direction, including empty-candidate strata. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => boundaryPlus uv.1 uv.2)
Proof (Lean source)
@[fun_prop] -- @node: boundaryPlus_measurable lemma boundaryPlus_measurable : Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => boundaryPlus uv.1 uv.2) := by classical let p (i : Fin n) (uv : (Fin n → ℝ) × (Fin n → ℝ)) := |uv.1 i| < 1 ∧ uv.2 i ≠ 0 let f (i : Fin n) (uv : (Fin n → ℝ) × (Fin n → ℝ)) := if 0 < uv.2 i then (1 - uv.1 i) / uv.2 i else (1 + uv.1 i) / (-uv.2 i) have hp (i : Fin n) : MeasurableSet {uv | p i uv} := by dsimp [p] exact (measurableSet_lt (show Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => |uv.1 i|) by fun_prop) measurable_const).inter (measurableSet_eq_fun (show Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => uv.2 i) by fun_prop) measurable_const).compl have hf (i : Fin n) : Measurable (f i) := by dsimp [f] apply Measurable.ite (measurableSet_lt measurable_const (show Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => uv.2 i) by fun_prop)) <;> fun_prop have hm := (finiteMin_guarded_measurable (finRange n) p f hp hf).2 convert hm using 1 ext uv unfold boundaryPlus activeIndices congr 1 rw [List.filterMap_filter] apply List.filterMap_congr intro i hi dsimp [p, f] by_cases ha : |uv.1 i| < 1 · by_cases hv : 0 < uv.2 i · simp [ha, hv, ne_of_gt hv] · by_cases hn : uv.2 i < 0 · simp [ha, hv, hn, ne_of_lt hn] · have hz : uv.2 i = 0 := le_antisymm (le_of_not_gt hv) (le_of_not_gt hn) simp [ha, hz] · simp [ha]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryPlus_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:87
theorem boundaryMinus_measurable Lemma boundaryMinus_measurable in the paper ↗

The opposite boundary distance is Borel by negating the direction. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => boundaryMinus uv.1 uv.2)
Proof (Lean source)
@[fun_prop] -- @node: boundaryMinus_measurable lemma boundaryMinus_measurable : Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => boundaryMinus uv.1 uv.2) := by unfold boundaryMinus exact boundaryPlus_measurable.comp (measurable_fst.prodMk (by fun_prop))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryMinus_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:129
theorem roundingSeed_measurable Lemma roundingSeed_measurable in the paper ↗

Every padded seed read is measurable. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
h :
ℕ
Measurable (fun seeds : RoundingSeeds n => roundingSeed seeds h)
Proof (Lean source)
@[fun_prop] -- @node: roundingSeed_measurable lemma roundingSeed_measurable (h : ℕ) : Measurable (fun seeds : RoundingSeeds n => roundingSeed seeds h) := by unfold roundingSeed split <;> fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingSeed_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:137
theorem removeProjections_family_measurable Lemma removeProjections_family_measurable in the paper ↗

Removing a fixed finite family of measurable rank-one projections is Borel. This uses the hb hypothesis, the hv hypothesis, the stated conclusion.

Formal statement
n :
ℕ
shared
Ω ι :
l :
List ι
b :
ι → Ω → Fin n → ℝ
v :
Ω → Fin n → ℝ
hb :
∀ i, Measurable (b i)
hv :
Measurable (fun x => removeProjections (l.map (fun i => b i x)) (v x))
Proof (Lean source)
@[fun_prop] -- @node: removeProjections_family_measurable lemma removeProjections_family_measurable {Ω ι : Type*} [MeasurableSpace Ω] (l : List ι) (b : ι → Ω → Fin n → ℝ) (v : Ω → Fin n → ℝ) (hb : ∀ i, Measurable (b i)) (hv : Measurable v) : Measurable (fun x => removeProjections (l.map (fun i => b i x)) (v x)) := by apply measurable_pi_lambda intro j unfold removeProjections simp only [List.map_map] have hs : Measurable (fun x => (l.map (fun i => rowDot (v x) (b i x) * b i x j)).sum) := by induction l with | nil => exact measurable_const | cons i l ih => simp only [List.map_cons, List.sum_cons] exact ((rowDot_measurable.comp (hv.prodMk (hb i))).mul ((measurable_pi_apply j).comp (hb i))).add ih exact ((measurable_pi_apply j).comp hv).sub hs
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.removeProjections_family_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:145
theorem residualNorm_family_measurable Lemma residualNorm_family_measurable in the paper ↗

The Gram--Schmidt residual norm is Borel for each fixed family of preceding vectors. This uses the hb hypothesis, the hv hypothesis, the stated conclusion.

Formal statement
n :
ℕ
shared
Ω ι :
l :
List ι
b :
ι → Ω → Fin n → ℝ
v :
Ω → Fin n → ℝ
hb :
∀ i, Measurable (b i)
hv :
Measurable (fun x => let w := removeProjections (l.map (fun i => b i x)) (v x) sqrt (rowDot w w))
Proof (Lean source)
-- Generic arithmetic head: invoke this lemma explicitly. -- @node: residualNorm_family_measurable lemma residualNorm_family_measurable {Ω ι : Type*} [MeasurableSpace Ω] (l : List ι) (b : ι → Ω → Fin n → ℝ) (v : Ω → Fin n → ℝ) (hb : ∀ i, Measurable (b i)) (hv : Measurable v) : Measurable (fun x => let w := removeProjections (l.map (fun i => b i x)) (v x) sqrt (rowDot w w)) := by have hw := removeProjections_family_measurable l b v hb hv exact (rowDot_measurable.comp (hw.prodMk hw)).sqrt
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.residualNorm_family_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:166
theorem residualNorm_positive_measurableSet Lemma residualNorm_positive_measurableSet in the paper ↗

The zero-residual branch of Gram--Schmidt is a Borel stratum.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
Ω ι :
l :
List ι
b :
ι → Ω → Fin n → ℝ
v :
Ω → Fin n → ℝ
hb :
∀ i, Measurable (b i)
hv :
MeasurableSet {x | 0 < sqrt (rowDot (removeProjections (l.map (fun i => b i x)) (v x)) (removeProjections (l.map (fun i => b i x)) (v x)))}
Proof (Lean source)
-- @node: residualNorm_positive_measurableSet lemma residualNorm_positive_measurableSet {Ω ι : Type*} [MeasurableSpace Ω] (l : List ι) (b : ι → Ω → Fin n → ℝ) (v : Ω → Fin n → ℝ) (hb : ∀ i, Measurable (b i)) (hv : Measurable v) : MeasurableSet {x | 0 < sqrt (rowDot (removeProjections (l.map (fun i => b i x)) (v x)) (removeProjections (l.map (fun i => b i x)) (v x)))} := by exact measurableSet_lt measurable_const (residualNorm_family_measurable l b v hb hv)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.residualNorm_positive_measurableSet · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:178
theorem inverseCDF_family_measurable Lemma inverseCDF_family_measurable in the paper ↗

[ Finite inverse-CDF selection is Borel for measurable candidates, weights, and seed. Neither positivity nor distinct interval boundaries are needed for this arithmetic fact. This uses the hv hypothesis, the hw hypothesis, the ht hypothesis, the stated conclusion.

Formal statement
n :
ℕ
shared
Ω ι :
l :
List ι
v :
ι → Ω → Fin n → ℝ
w :
ι → Ω → ℝ
t :
Ω → ℝ
hv :
∀ i, Measurable (v i)
hw :
∀ i, Measurable (w i)
ht :
Measurable (fun x => inverseCDF (l.map (fun i => (v i x, w i x))) (t x))
Proof (Lean source)
@[fun_prop] -- @node: inverseCDF_family_measurable lemma inverseCDF_family_measurable {Ω ι : Type*} [MeasurableSpace Ω] (l : List ι) (v : ι → Ω → Fin n → ℝ) (w : ι → Ω → ℝ) (t : Ω → ℝ) (hv : ∀ i, Measurable (v i)) (hw : ∀ i, Measurable (w i)) (ht : Measurable t) : Measurable (fun x => inverseCDF (l.map (fun i => (v i x, w i x))) (t x)) := by induction l generalizing t with | nil => exact measurable_const | cons i l ih => cases l with | nil => simpa [inverseCDF] using hv i | cons j l => simp only [List.map_cons, inverseCDF] exact Measurable.ite (measurableSet_lt ht (hw i)) (hv i) (ih (fun x => t x - w i x) (ht.sub (hw i)))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.inverseCDF_family_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:188
theorem boundaryCoin_probability_measurable Lemma boundaryCoin_probability_measurable in the paper ↗

The asymmetric boundary coin probability is Borel in the state and direction. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => boundaryMinus uv.1 uv.2 / (boundaryPlus uv.1 uv.2 + boundaryMinus uv.1 uv.2))
Proof (Lean source)
-- Generic arithmetic head: invoke this lemma explicitly. -- @node: boundaryCoin_probability_measurable lemma boundaryCoin_probability_measurable : Measurable (fun uv : (Fin n → ℝ) × (Fin n → ℝ) => boundaryMinus uv.1 uv.2 / (boundaryPlus uv.1 uv.2 + boundaryMinus uv.1 uv.2)) := by exact boundaryMinus_measurable.div (boundaryPlus_measurable.add boundaryMinus_measurable)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryCoin_probability_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:207
theorem boundaryMove_measurable Lemma boundaryMove_measurable in the paper ↗

A boundary move with a supplied measurable direction and fresh seed is Borel. This uses the hu hypothesis, the hv hypothesis, the ht hypothesis, the stated conclusion.

Formal statement
n :
ℕ
shared
Ω :
u v :
Ω → Fin n → ℝ
t :
Ω → ℝ
hu :
hv :
ht :
Measurable (fun x => if t x < boundaryMinus (u x) (v x) / (boundaryPlus (u x) (v x) + boundaryMinus (u x) (v x)) then u x + boundaryPlus (u x) (v x) • v x else u x - boundaryMinus (u x) (v x) • v x)
Proof (Lean source)
-- Generic arithmetic head: invoke this lemma explicitly. -- @node: boundaryMove_measurable lemma boundaryMove_measurable {Ω : Type*} [MeasurableSpace Ω] (u v : Ω → Fin n → ℝ) (t : Ω → ℝ) (hu : Measurable u) (hv : Measurable v) (ht : Measurable t) : Measurable (fun x => if t x < boundaryMinus (u x) (v x) / (boundaryPlus (u x) (v x) + boundaryMinus (u x) (v x)) then u x + boundaryPlus (u x) (v x) • v x else u x - boundaryMinus (u x) (v x) • v x) := by have hp := boundaryPlus_measurable.comp (hu.prodMk hv) have hm := boundaryMinus_measurable.comp (hu.prodMk hv) exact Measurable.ite (measurableSet_lt ht (hm.div (hp.add hm))) (hu.add (hp.smul hv)) (hu.sub (hm.smul hv))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryMove_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:215
theorem terminalMove_measurable Lemma terminalMove_measurable in the paper ↗

A terminal single-coordinate round is Borel, including the threshold tie. This uses the hu hypothesis, the ht hypothesis, the stated conclusion.

Formal statement
n :
ℕ
shared
Ω :
u :
Ω → Fin n → ℝ
t :
Ω → ℝ
i :
Fin n
hu :
ht :
Measurable (fun x => update (u x) i (if t x < (1 + u x i) / 2 then (1 : ℝ) else -1))
Proof (Lean source)
-- Generic arithmetic head: invoke this lemma explicitly. -- @node: terminalMove_measurable lemma terminalMove_measurable {Ω : Type*} [MeasurableSpace Ω] (u : Ω → Fin n → ℝ) (t : Ω → ℝ) (i : Fin n) (hu : Measurable u) (ht : Measurable t) : Measurable (fun x => update (u x) i (if t x < (1 + u x i) / 2 then (1 : ℝ) else -1)) := by have hc : Measurable (fun x => (1 + u x i) / 2) := by fun_prop have hb : Measurable (fun x => if t x < (1 + u x i) / 2 then (1 : ℝ) else -1) := Measurable.ite (measurableSet_lt ht hc) measurable_const measurable_const exact (measurable_update' (a := i)).comp (hu.prodMk hb)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminalMove_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:231
theorem roundingStep_measurable_of_basis_family Lemma roundingStep_measurable_of_basis_family in the paper ↗

On a stratum with a fixed measurable basis family, the complete nonterminal move is Borel. The list representation is a local description of a rank stratum, not a rank assumption.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
Ω ι :
l :
List ι
b :
ι → Ω → Fin n → ℝ
a :
Ω → Fin (n / 4) → Fin n → ℝ
q :
Ω → ℕ
u :
Ω → Fin n → ℝ
t₁ t₂ :
Ω → ℝ
hb :
∀ i, Measurable (b i)
hu :
ht₁ :
ht₂ :
hbs :
∀ x, nullspaceBasis (a x) (q x) (u x) = l.map (fun i => b i x)
Measurable (fun x => roundingStep (a x) (q x) (u x) (t₁ x) (t₂ x))
Proof (Lean source)
-- @node: roundingStep_measurable_of_basis_family lemma roundingStep_measurable_of_basis_family {Ω ι : Type*} [MeasurableSpace Ω] (l : List ι) (b : ι → Ω → Fin n → ℝ) (a : Ω → Fin (n / 4) → Fin n → ℝ) (q : Ω → ℕ) (u : Ω → Fin n → ℝ) (t₁ t₂ : Ω → ℝ) (hb : ∀ i, Measurable (b i)) (hu : Measurable u) (ht₁ : Measurable t₁) (ht₂ : Measurable t₂) (hbs : ∀ x, nullspaceBasis (a x) (q x) (u x) = l.map (fun i => b i x)) : Measurable (fun x => roundingStep (a x) (q x) (u x) (t₁ x) (t₂ x)) := by let w (i : ι) (x : Ω) := (boundaryPlus (u x) (b i x) * boundaryMinus (u x) (b i x))⁻¹ have hw (i : ι) : Measurable (w i) := ((boundaryPlus_measurable.comp (hu.prodMk (hb i))).mul (boundaryMinus_measurable.comp (hu.prodMk (hb i)))).inv let S (x : Ω) := (l.map (fun i => w i x)).sum have hS : Measurable S := by dsimp [S] clear S hbs induction l with | nil => exact measurable_const | cons i l ih => simp only [List.map_cons, List.sum_cons] exact (hw i).add ih let v (x : Ω) := inverseCDF (l.map (fun i => (b i x, w i x / S x))) (t₁ x) have hv : Measurable v := inverseCDF_family_measurable l b (fun i x => w i x / S x) t₁ hb (fun i => (hw i).div hS) ht₁ have hmove := boundaryMove_measurable u v t₂ hu hv ht₂ convert hmove using 1 ext x unfold roundingStep rw [hbs] have hzip : (l.map (fun i => b i x)).zip ((l.map (fun i => w i x)).map (fun z => z / S x)) = l.map (fun i => (b i x, w i x / S x)) := by have hz (ls : List ι) : (ls.map (fun i => b i x)).zip ((ls.map (fun i => w i x)).map (fun z => z / S x)) = ls.map (fun i => (b i x, w i x / S x)) := by induction ls with | nil => rfl | cons i ls ih => simp only [List.map_cons, List.zip_cons_cons, ih] exact hz l simp only [List.map_map, Function.comp_def] simp only [List.map_map, S, w, Function.comp_def] at hzip rw [hzip]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_measurable_of_basis_family · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingBorel.lean:244
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingCrossingTimes 32 declarations The first active-count crossing after a measurable starting time is bounded by n.

Bounded crossing times of the actual rounding trace

The first active-count crossing after a measurable starting time is bounded by n. Its interval mask depends only on the current history. In particular, the first loss of row protection is a measurable, predictable crossing, with an actual starting active count below 4h. Successive halving crossings give measurable intervals ending at the terminal state and the pathwise 8 min(h,n) active-count allowance. These intervals refine the move trace and need not coincide with metadata refreshes.

theorem roundingIteration_crossing_exists

The terminal state supplies a crossing for every nonnegative active threshold.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
K R :
ℕ
∃ k,
conclusion 1
min K n ≤ k
conclusion 2
(activeIndices (roundingIteration a seeds k).1).length ≤ R
Proof (Lean source)
-- @node: roundingIteration_crossing_exists lemma roundingIteration_crossing_exists (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (K R : ℕ) : ∃ k, min K n ≤ k ∧ (activeIndices (roundingIteration a seeds k).1).length ≤ R := by refine ⟨n, Nat.min_le_right _ _, ?_⟩ simp [roundingIteration_no_active]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_crossing_exists · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:22

[ First active-count crossing after the clipped starting time, on the actual trace.

Definition (Lean source)
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K R :
RoundingSeeds n → ℕ
seeds :
roundingCrossingTime a K R seeds :
ℕ
find (roundingIteration_crossing_exists a seeds (K seeds) (R seeds))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingCrossingTime · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:30
theorem roundingCrossingTime_spec

The crossing respects its starting time and attains the prescribed active bound. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K R :
RoundingSeeds n → ℕ
seeds :
conclusion 1
min (K seeds) n ≤ roundingCrossingTime a K R seeds
conclusion 2
≤ R seeds
Proof (Lean source)
-- @node: roundingCrossingTime_spec lemma roundingCrossingTime_spec (a : Fin (n / 4) → Fin n → ℝ) (K R : RoundingSeeds n → ℕ) (seeds : RoundingSeeds n) : min (K seeds) n ≤ roundingCrossingTime a K R seeds ∧ (activeIndices (roundingIteration a seeds (roundingCrossingTime a K R seeds)).1).length ≤ R seeds := Nat.find_spec (roundingIteration_crossing_exists a seeds (K seeds) (R seeds))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingCrossingTime_spec · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:36
theorem roundingCrossingTime_le_horizon

Every crossing lies within the deterministic move horizon.](goal) This uses the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K R :
RoundingSeeds n → ℕ
seeds :
roundingCrossingTime a K R seeds ≤ n
Proof (Lean source)
-- @node: roundingCrossingTime_le_horizon lemma roundingCrossingTime_le_horizon (a : Fin (n / 4) → Fin n → ℝ) (K R : RoundingSeeds n → ℕ) (seeds : RoundingSeeds n) : roundingCrossingTime a K R seeds ≤ n := by apply Nat.find_min' exact ⟨Nat.min_le_right _ _, by simp [roundingIteration_no_active]⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingCrossingTime_le_horizon · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:44
theorem roundingCrossingTime_before_iff

By monotonicity, a crossing has not occurred exactly when the start is still in the future or the current active count is above the threshold.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K R :
RoundingSeeds n → ℕ
seeds :
k :
ℕ
k < roundingCrossingTime a K R seeds
↔ k < min (K seeds) n ∨ R seeds < (activeIndices (roundingIteration a seeds k).1).length
Proof (Lean source)
-- @node: roundingCrossingTime_before_iff lemma roundingCrossingTime_before_iff (a : Fin (n / 4) → Fin n → ℝ) (K R : RoundingSeeds n → ℕ) (seeds : RoundingSeeds n) (k : ℕ) : k < roundingCrossingTime a K R seeds ↔ k < min (K seeds) n ∨ R seeds < (activeIndices (roundingIteration a seeds k).1).length := by constructor · intro hk by_contra h have hstart : min (K seeds) n ≤ k := by omega have hcount : (activeIndices (roundingIteration a seeds k).1).length ≤ R seeds := by omega have he : roundingCrossingTime a K R seeds ≤ k := Nat.find_min' _ ⟨hstart, hcount⟩ omega · intro h by_contra hk have he : roundingCrossingTime a K R seeds ≤ k := by omega have hs := roundingCrossingTime_spec a K R seeds have hm := roundingIteration_active_count_antitone a seeds he dsimp only at hm omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingCrossingTime_before_iff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:52
theorem roundingCrossingTime_le_iff

A crossing has occurred precisely when its start has occurred and the current active count is at or below the threshold.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K R :
RoundingSeeds n → ℕ
seeds :
k :
ℕ
roundingCrossingTime a K R seeds ≤ k ↔ min (K seeds) n ≤ k ∧
(activeIndices (roundingIteration a seeds k).1).length ≤ R seeds
Proof (Lean source)
-- @node: roundingCrossingTime_le_iff lemma roundingCrossingTime_le_iff (a : Fin (n / 4) → Fin n → ℝ) (K R : RoundingSeeds n → ℕ) (seeds : RoundingSeeds n) (k : ℕ) : roundingCrossingTime a K R seeds ≤ k ↔ min (K seeds) n ≤ k ∧ (activeIndices (roundingIteration a seeds k).1).length ≤ R seeds := by have hh := roundingCrossingTime_before_iff a K R seeds k omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingCrossingTime_le_iff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:74
theorem roundingCrossingTime_measurable

Measurable random starts and active thresholds give a measurable first crossing. This uses the hK hypothesis, the hR hypothesis, the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K R :
RoundingSeeds n → ℕ
hK :
hR :
Proof (Lean source)
@[fun_prop] -- @node: roundingCrossingTime_measurable lemma roundingCrossingTime_measurable (a : Fin (n / 4) → Fin n → ℝ) (K R : RoundingSeeds n → ℕ) (hK : Measurable K) (hR : Measurable R) : Measurable (roundingCrossingTime a K R) := by apply measurable_find intro k exact (measurableSet_le (hK.min measurable_const) measurable_const).inter (measurableSet_le (roundingIteration_active_count_measurable a k) hR)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingCrossingTime_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:84
theorem roundingCrossingTime_interval_iff

Inside the horizon, the crossing interval is decided by the current active count and the event that the random start has occurred. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K R :
RoundingSeeds n → ℕ
seeds :
k :
ℕ
hk :
k < n
(K seeds ≤ k ∧ k < roundingCrossingTime a K R seeds)
↔ (K seeds ≤ k ∧ R seeds < (activeIndices (roundingIteration a seeds k).1).length)
Proof (Lean source)
-- @node: roundingCrossingTime_interval_iff lemma roundingCrossingTime_interval_iff (a : Fin (n / 4) → Fin n → ℝ) (K R : RoundingSeeds n → ℕ) (seeds : RoundingSeeds n) (k : ℕ) (hk : k < n) : (K seeds ≤ k ∧ k < roundingCrossingTime a K R seeds) ↔ (K seeds ≤ k ∧ R seeds < (activeIndices (roundingIteration a seeds k).1).length) := by rw [roundingCrossingTime_before_iff] omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingCrossingTime_interval_iff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:95
theorem roundingCrossingTime_interval_predictable

Crossing intervals are predictable when their start event and threshold are unchanged by the fresh coin. The end time itself need not be unchanged. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K R :
RoundingSeeds n → ℕ
k :
ℕ
hk :
k < n
hK :
∀ seeds t, K (update seeds ⟨2 * k + 1, by omega⟩ t) ≤ k ↔ K seeds ≤ k
hR :
∀ seeds t, R (update seeds ⟨2 * k + 1, by omega⟩ t) = R seeds
seeds :
t :
ℝ
(K (update seeds ⟨2 * k + 1, by omega⟩ t) ≤ k ∧ k < roundingCrossingTime a K R (update seeds ⟨2 * k + 1, by omega⟩ t))
↔ (K seeds ≤ k ∧ k < roundingCrossingTime a K R seeds)
Proof (Lean source)
-- @node: roundingCrossingTime_interval_predictable lemma roundingCrossingTime_interval_predictable (a : Fin (n / 4) → Fin n → ℝ) (K R : RoundingSeeds n → ℕ) (k : ℕ) (hk : k < n) (hK : ∀ seeds t, K (update seeds ⟨2 * k + 1, by omega⟩ t) ≤ k ↔ K seeds ≤ k) (hR : ∀ seeds t, R (update seeds ⟨2 * k + 1, by omega⟩ t) = R seeds) (seeds : RoundingSeeds n) (t : ℝ) : (K (update seeds ⟨2 * k + 1, by omega⟩ t) ≤ k ∧ k < roundingCrossingTime a K R (update seeds ⟨2 * k + 1, by omega⟩ t)) ↔ (K seeds ≤ k ∧ k < roundingCrossingTime a K R seeds) := by rw [roundingCrossingTime_interval_iff a K R _ k hk, roundingCrossingTime_interval_iff a K R _ k hk, hK, hR, roundingIteration_update_future a seeds k _ t (by dsimp; omega)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingCrossingTime_interval_predictable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:105

The first unprotected move is the crossing of the integer threshold 4h-1.

Definition (Lean source)
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
roundingUnprotectedTime a h :
RoundingSeeds n → ℕ
roundingCrossingTime a (fun _ => 0) (fun _ => 4 * h - 1)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingUnprotectedTime · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:120
theorem roundingUnprotectedTime_measurable

The row's first unprotected time is Borel. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingUnprotectedTime_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:125
theorem roundingUnprotectedTime_le_horizon

An unprotected-time crossing always occurs before or at the terminal state. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
seeds :
roundingUnprotectedTime a h seeds ≤ n
Proof (Lean source)
-- @node: roundingUnprotectedTime_le_horizon lemma roundingUnprotectedTime_le_horizon (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (seeds : RoundingSeeds n) : roundingUnprotectedTime a h seeds ≤ n := roundingCrossingTime_le_horizon a _ _ seeds
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingUnprotectedTime_le_horizon · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:132
theorem roundingUnprotectedTime_le_iff

Loss of protection occurs exactly on the terminal interval starting at the crossing. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
seeds :
k :
ℕ
≤ k ↔ (activeIndices (roundingIteration a seeds k).1).length < 4 * h
Proof (Lean source)
-- @node: roundingUnprotectedTime_le_iff lemma roundingUnprotectedTime_le_iff (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) (seeds : RoundingSeeds n) (k : ℕ) : roundingUnprotectedTime a h seeds ≤ k ↔ (activeIndices (roundingIteration a seeds k).1).length < 4 * h := by have he := roundingCrossingTime_before_iff a (fun _ => 0) (fun _ => 4 * h - 1) seeds k change k < roundingUnprotectedTime a h seeds ↔ _ at he simp only [min_def, zero_le, if_true, Nat.not_lt_zero, false_or] at he omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingUnprotectedTime_le_iff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:138
theorem roundingUnprotectedTime_active_bound

The crossing starts with fewer than 4h active coordinates and at most n. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
seeds :
conclusion 1
conclusion 2
Proof (Lean source)
-- @node: roundingUnprotectedTime_active_bound lemma roundingUnprotectedTime_active_bound (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) (seeds : RoundingSeeds n) : (activeIndices (roundingIteration a seeds (roundingUnprotectedTime a h seeds)).1).length < 4 * h ∧ (activeIndices (roundingIteration a seeds (roundingUnprotectedTime a h seeds)).1).length ≤ n := by refine ⟨(roundingUnprotectedTime_le_iff a h hh seeds _).mp le_rfl, ?_⟩ exact (roundingIteration_cube_and_count a seeds _).2.trans (sub_le _ _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingUnprotectedTime_active_bound · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:149
theorem roundingUnprotectedTime_interval_predictable

Membership in the unprotected terminal interval is predictable before the next coin. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
k :
ℕ
hk :
k < n
seeds :
t :
ℝ
(roundingUnprotectedTime a h (update seeds ⟨2 * k + 1, by omega⟩ t) ≤ k ∧ k < n)
↔ (roundingUnprotectedTime a h seeds ≤ k ∧ k < n)
Proof (Lean source)
-- @node: roundingUnprotectedTime_interval_predictable lemma roundingUnprotectedTime_interval_predictable (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) (k : ℕ) (hk : k < n) (seeds : RoundingSeeds n) (t : ℝ) : (roundingUnprotectedTime a h (update seeds ⟨2 * k + 1, by omega⟩ t) ≤ k ∧ k < n) ↔ (roundingUnprotectedTime a h seeds ≤ k ∧ k < n) := by rw [roundingUnprotectedTime_le_iff a h hh, roundingUnprotectedTime_le_iff a h hh, roundingIteration_update_future a seeds k _ t (by dsimp; omega)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingUnprotectedTime_interval_predictable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:160
theorem roundingIteration_random_time_active_count_measurable

The active count at a measurable random time is measurable. This uses the hK hypothesis, the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
hK :
Measurable (fun seeds => (activeIndices (roundingIteration a seeds (K seeds)).1).length)
Proof (Lean source)
@[fun_prop] -- @node: roundingIteration_random_time_active_count_measurable lemma roundingIteration_random_time_active_count_measurable (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (hK : Measurable K) : Measurable (fun seeds => (activeIndices (roundingIteration a seeds (K seeds)).1).length) := by have hu : Measurable (fun seeds => (roundingIteration a seeds (K seeds)).1) := by apply measurable_pi_lambda intro i exact roundingIteration_random_time_coordinate_measurable a K hK i exact activeIndices_consumer_measurable _ hu (fun _ cs => cs.length) (fun _ => measurable_const)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_random_time_active_count_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:170
def roundingHalvingTimes

Starting at a clipped time, repeatedly stop at the first halving of the actual active count. Empty intervals pad the trace once every coordinate is fixed.

Definition (Lean source)
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
roundingHalvingTimes a K :
ℕ → RoundingSeeds n → ℕ
clause 1
| 0 => fun seeds => min (K seeds) n
clause 2
| j + 1
=> roundingCrossingTime a (roundingHalvingTimes a K j) (fun seeds => (activeIndices (roundingIteration a seeds (roundingHalvingTimes a K j seeds)).1).length / 2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:183
theorem roundingHalvingTimes_le_horizon

Every realized halving endpoint lies within the finite move horizon. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
j :
ℕ
seeds :
roundingHalvingTimes a K j seeds ≤ n
Proof (Lean source)
-- @node: roundingHalvingTimes_le_horizon lemma roundingHalvingTimes_le_horizon (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (j : ℕ) (seeds : RoundingSeeds n) : roundingHalvingTimes a K j seeds ≤ n := by cases j with | zero => exact Nat.min_le_right _ _ | succ j => exact roundingCrossingTime_le_horizon a _ _ seeds
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_le_horizon · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:193
theorem roundingHalvingTimes_step_le

Successive realized halving intervals occur in chronological order.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
j :
ℕ
seeds :
roundingHalvingTimes a K j seeds ≤ roundingHalvingTimes a K (j + 1) seeds
Proof (Lean source)
-- @node: roundingHalvingTimes_step_le lemma roundingHalvingTimes_step_le (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (j : ℕ) (seeds : RoundingSeeds n) : roundingHalvingTimes a K j seeds ≤ roundingHalvingTimes a K (j + 1) seeds := by have hs := (roundingCrossingTime_spec a (roundingHalvingTimes a K j) (fun seeds => (activeIndices (roundingIteration a seeds (roundingHalvingTimes a K j seeds)).1).length / 2) seeds).1 rw [roundingHalvingTimes] simpa only [min_eq_left (roundingHalvingTimes_le_horizon a K j seeds)] using hs
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_step_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:202
theorem roundingHalvingTimes_active_halves

The starting active counts of consecutive actual intervals at least halve.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
j :
ℕ
seeds :
2 * (activeIndices (roundingIteration a seeds (roundingHalvingTimes a K (j + 1) seeds)).1).length
Proof (Lean source)
-- @node: roundingHalvingTimes_active_halves lemma roundingHalvingTimes_active_halves (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (j : ℕ) (seeds : RoundingSeeds n) : 2 * (activeIndices (roundingIteration a seeds (roundingHalvingTimes a K (j + 1) seeds)).1).length ≤ (activeIndices (roundingIteration a seeds (roundingHalvingTimes a K j seeds)).1).length := by have hs := (roundingCrossingTime_spec a (roundingHalvingTimes a K j) (fun seeds => (activeIndices (roundingIteration a seeds (roundingHalvingTimes a K j seeds)).1).length / 2) seeds).2 change (activeIndices (roundingIteration a seeds (roundingHalvingTimes a K (j + 1) seeds)).1).length ≤ _ at hs omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_active_halves · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:213
theorem roundingHalvingTimes_measurable

[ Each halving time is a measurable function of the original finite seed list. This uses the hK hypothesis, the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
hK :
j :
ℕ
Proof (Lean source)
@[fun_prop] -- @node: roundingHalvingTimes_measurable lemma roundingHalvingTimes_measurable (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (hK : Measurable K) (j : ℕ) : Measurable (roundingHalvingTimes a K j) := by induction j with | zero => exact hK.min measurable_const | succ j ih => apply roundingCrossingTime_measurable a _ _ ih exact (roundingIteration_random_time_active_count_measurable a _ ih).div_const 2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:226
theorem roundingHalvingTimes_active_count_le

After j halving intervals, at most n-j coordinates remain active.](goal) This uses the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
j :
ℕ
seeds :
≤ n - j
Proof (Lean source)
-- @node: roundingHalvingTimes_active_count_le lemma roundingHalvingTimes_active_count_le (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (j : ℕ) (seeds : RoundingSeeds n) : (activeIndices (roundingIteration a seeds (roundingHalvingTimes a K j seeds)).1).length ≤ n - j := by induction j with | zero => exact (roundingIteration_cube_and_count a seeds _).2.trans (sub_le _ _) | succ j ih => have hh := roundingHalvingTimes_active_halves a K j seeds omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_active_count_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:238
theorem roundingHalvingTimes_no_active

Padding to n intervals includes every nonzero actual increment: the last endpoint already has no active coordinates.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
seeds :
Proof (Lean source)
-- @node: roundingHalvingTimes_no_active lemma roundingHalvingTimes_no_active (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (seeds : RoundingSeeds n) : activeIndices (roundingIteration a seeds (roundingHalvingTimes a K n seeds)).1 = [] := by have hh := roundingHalvingTimes_active_count_le a K n seeds have hz : (activeIndices (roundingIteration a seeds (roundingHalvingTimes a K n seeds)).1).length = 0 := by omega simpa using hz
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_no_active · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:250
theorem roundingHalvingTimes_terminal_state

The padded endpoint is the same actual state as the final output signing.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
seeds :
(roundingIteration a seeds (roundingHalvingTimes a K n seeds)).1
= (roundingIteration a seeds n).1
Proof (Lean source)
-- @node: roundingHalvingTimes_terminal_state lemma roundingHalvingTimes_terminal_state (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (seeds : RoundingSeeds n) : (roundingIteration a seeds (roundingHalvingTimes a K n seeds)).1 = (roundingIteration a seeds n).1 := by funext i symm apply roundingIteration_inactive_fixed a seeds _ n (roundingHalvingTimes_le_horizon a K n seeds) i intro hi have hm := (mem_activeIndices _ i).mpr hi rw [roundingHalvingTimes_no_active a K seeds] at hm simpa using hm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_terminal_state · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:261
theorem roundingHalvingTimes_unprotected_count_sum_le

Starting the realized intervals when a row loses protection gives the paper's deterministic geometric active-count allowance on every seed realization. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
m :
ℕ
seeds :
≤ 8 * min h n
Proof (Lean source)
-- @node: roundingHalvingTimes_unprotected_count_sum_le lemma roundingHalvingTimes_unprotected_count_sum_le (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) (m : ℕ) (seeds : RoundingSeeds n) : (∑ j ∈ range m, (activeIndices (roundingIteration a seeds (roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds)).1).length) ≤ 8 * min h n := by apply unprotected_phase_sum_le (fun j => (activeIndices (roundingIteration a seeds (roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds)).1).length) m n h · intro j _ exact roundingHalvingTimes_active_halves a _ j seeds · exact (roundingIteration_cube_and_count a seeds _).2.trans (sub_le _ _) · have he : roundingHalvingTimes a (roundingUnprotectedTime a h) 0 seeds = roundingUnprotectedTime a h seeds := min_eq_left (roundingUnprotectedTime_le_horizon a h seeds) rw [he] exact (roundingUnprotectedTime_active_bound a h hh seeds).1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_unprotected_count_sum_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:275
theorem nat_min_succ_eq_of_sublevels Lemma nat_min_succ_eq_of_sublevels in the paper ↗

Equal sublevel events up to k determine the same time clipped at k+1. Under the stated conditions.

Formal statement
u v k :
ℕ
h :
∀ l ≤ k, u ≤ l ↔ v ≤ l
min u (k + 1) = min v (k + 1)
Proof (Lean source)
-- @node: nat_min_succ_eq_of_sublevels lemma nat_min_succ_eq_of_sublevels (u v k : ℕ) (h : ∀ l ≤ k, u ≤ l ↔ v ≤ l) : min u (k + 1) = min v (k + 1) := by by_cases hu : u ≤ k · have hv := (h k le_rfl).mp hu have huv := (h u hu).mp le_rfl have hvu := (h v hv).mpr le_rfl omega · have hv : ¬v ≤ k := by simpa only [h k le_rfl] using hu omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nat_min_succ_eq_of_sublevels · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:296
theorem roundingUnprotectedTime_update_future_clipped

The first unprotected time, clipped just after the current move, ignores all seed coordinates that have not yet been read. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
k :
ℕ
idx :
Fin (3 * n)
hidx :
2 * k ≤ idx.val
seeds :
t :
ℝ
min (roundingUnprotectedTime a h (update seeds idx t)) (k + 1)
= min (roundingUnprotectedTime a h seeds) (k + 1)
Proof (Lean source)
-- @node: roundingUnprotectedTime_update_future_clipped lemma roundingUnprotectedTime_update_future_clipped (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) (k : ℕ) (idx : Fin (3 * n)) (hidx : 2 * k ≤ idx.val) (seeds : RoundingSeeds n) (t : ℝ) : min (roundingUnprotectedTime a h (update seeds idx t)) (k + 1) = min (roundingUnprotectedTime a h seeds) (k + 1) := by apply nat_min_succ_eq_of_sublevels intro l hl rw [roundingUnprotectedTime_le_iff a h hh, roundingUnprotectedTime_le_iff a h hh, roundingIteration_update_future a seeds l idx t (by omega)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingUnprotectedTime_update_future_clipped · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:308
theorem roundingHalvingTimes_update_future_clipped

Realized halving endpoints are stopping times for the finite seed history: only their part up to the current move can be observed before the fresh seeds. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
j k :
ℕ
idx :
Fin (3 * n)
hidx :
2 * k ≤ idx.val
seeds :
t :
ℝ
min (roundingHalvingTimes a (roundingUnprotectedTime a h) j (update seeds idx t)) (k + 1)
Proof (Lean source)
-- @node: roundingHalvingTimes_update_future_clipped lemma roundingHalvingTimes_update_future_clipped (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) (j k : ℕ) (idx : Fin (3 * n)) (hidx : 2 * k ≤ idx.val) (seeds : RoundingSeeds n) (t : ℝ) : min (roundingHalvingTimes a (roundingUnprotectedTime a h) j (update seeds idx t)) (k + 1) = min (roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds) (k + 1) := by induction j with | zero => simp only [roundingHalvingTimes, min_eq_left (roundingUnprotectedTime_le_horizon a h _)] exact roundingUnprotectedTime_update_future_clipped a h hh k idx hidx seeds t | succ j ih => apply nat_min_succ_eq_of_sublevels intro l hl simp only [roundingHalvingTimes, roundingCrossingTime_le_iff, min_eq_left (roundingHalvingTimes_le_horizon a _ j _)] have hstart : roundingHalvingTimes a (roundingUnprotectedTime a h) j (update seeds idx t) ≤ l ↔ roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds ≤ l := by omega by_cases hs : roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds ≤ l · have hs' := hstart.mpr hs have he : roundingHalvingTimes a (roundingUnprotectedTime a h) j (update seeds idx t) = roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds := by omega rw [he, roundingIteration_update_future a seeds l idx t (by omega), roundingIteration_update_future a seeds (roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds) idx t (by omega)] · have hs' : ¬roundingHalvingTimes a (roundingUnprotectedTime a h) j (update seeds idx t) ≤ l := by simpa only [hstart] using hs simp only [hs, hs', false_and]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_update_future_clipped · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:321
theorem roundingHalvingTimes_interval_predictable

Each realized halving interval has a predictable move mask, including empty intervals after the terminal state. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
j k :
ℕ
idx :
Fin (3 * n)
hidx :
2 * k ≤ idx.val
seeds :
t :
ℝ
(roundingHalvingTimes a (roundingUnprotectedTime a h) j (update seeds idx t) ≤ k ∧ k < roundingHalvingTimes a (roundingUnprotectedTime a h) (j + 1) (update seeds idx t))
↔ (roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds ≤ k ∧ k < roundingHalvingTimes a (roundingUnprotectedTime a h) (j + 1) seeds)
Proof (Lean source)
-- @node: roundingHalvingTimes_interval_predictable lemma roundingHalvingTimes_interval_predictable (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) (j k : ℕ) (idx : Fin (3 * n)) (hidx : 2 * k ≤ idx.val) (seeds : RoundingSeeds n) (t : ℝ) : (roundingHalvingTimes a (roundingUnprotectedTime a h) j (update seeds idx t) ≤ k ∧ k < roundingHalvingTimes a (roundingUnprotectedTime a h) (j + 1) (update seeds idx t)) ↔ (roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds ≤ k ∧ k < roundingHalvingTimes a (roundingUnprotectedTime a h) (j + 1) seeds) := by have hstart := roundingHalvingTimes_update_future_clipped a h hh j k idx hidx seeds t have hend := roundingHalvingTimes_update_future_clipped a h hh (j + 1) k idx hidx seeds t omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_interval_predictable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:357
theorem roundingHalvingTimes_coordinate_variance_le

The actual halving interval has the integrated coordinate-variance budget of its realized starting active count, with no extra stopping-time premises. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
j :
ℕ
(∑ k ∈ range n, ∑ i : Fin n, ∫ seeds, ({seeds | T j seeds ≤ k ∧ k < T (j + 1) seeds}.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n)
≤ ∫ seeds, ((activeIndices (roundingIteration a seeds (T j seeds)).1).length : ℝ) ∂roundingSeedLaw n
Proof (Lean source)
-- @node: roundingHalvingTimes_coordinate_variance_le lemma roundingHalvingTimes_coordinate_variance_le (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) (j : ℕ) : let T := roundingHalvingTimes a (roundingUnprotectedTime a h) (∑ k ∈ range n, ∑ i : Fin n, ∫ seeds, ({seeds | T j seeds ≤ k ∧ k < T (j + 1) seeds}.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n) ≤ ∫ seeds, ((activeIndices (roundingIteration a seeds (T j seeds)).1).length : ℝ) ∂roundingSeedLaw n := by dsimp only apply roundingIteration_interval_coordinate_variance_le · exact roundingHalvingTimes_measurable a _ (roundingUnprotectedTime_measurable a h) j · exact roundingHalvingTimes_measurable a _ (roundingUnprotectedTime_measurable a h) (j + 1) · exact roundingHalvingTimes_step_le a _ j · exact roundingHalvingTimes_le_horizon a _ (j + 1) · intro k hk seeds t exact roundingHalvingTimes_interval_predictable a h hh j k ⟨2 * k + 1, by omega⟩ (by dsimp; omega) seeds t
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_coordinate_variance_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:376
theorem roundingHalvingTimes_row_second_moment_sum

The realized interval row increment has exactly the sum of its move second moments. This combines the crossing-time mask with the actual martingale telescope. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
j :
ℕ
c :
Fin n → ℝ
(∫ seeds, (rowDot c (roundingIteration a seeds (T (j + 1) seeds)).1 - rowDot c (roundingIteration a seeds (T j seeds)).1) ^ 2 ∂roundingSeedLaw n)
= ∑ k ∈ range n, ∫ seeds, ({seeds | T j seeds ≤ k ∧ k < T (j + 1) seeds}.indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 ∂roundingSeedLaw n
Proof (Lean source)
-- @node: roundingHalvingTimes_row_second_moment_sum lemma roundingHalvingTimes_row_second_moment_sum (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) (j : ℕ) (c : Fin n → ℝ) : let T := roundingHalvingTimes a (roundingUnprotectedTime a h) (∫ seeds, (rowDot c (roundingIteration a seeds (T (j + 1) seeds)).1 - rowDot c (roundingIteration a seeds (T j seeds)).1) ^ 2 ∂roundingSeedLaw n) = ∑ k ∈ range n, ∫ seeds, ({seeds | T j seeds ≤ k ∧ k < T (j + 1) seeds}.indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 ∂roundingSeedLaw n := by classical let T := roundingHalvingTimes a (roundingUnprotectedTime a h) have hm (l : ℕ) : Measurable (T l) := roundingHalvingTimes_measurable a _ (roundingUnprotectedTime_measurable a h) l have he (k : ℕ) : MeasurableSet {seeds | T j seeds ≤ k ∧ k < T (j + 1) seeds} := (measurableSet_le (hm j) measurable_const).inter (measurableSet_lt measurable_const (hm (j + 1))) have hs := roundingIteration_masked_row_second_moment_sum a c (fun k => {seeds | T j seeds ≤ k ∧ k < T (j + 1) seeds}) n le_rfl (fun k _ => he k) (fun k _ seeds idx t hidx => roundingHalvingTimes_interval_predictable a h hh j k idx hidx seeds t) have ht (seeds : RoundingSeeds n) : (∑ k ∈ range n, ({seeds | T j seeds ≤ k ∧ k < T (j + 1) seeds}.indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds)) = rowDot c (roundingIteration a seeds (T (j + 1) seeds)).1 - rowDot c (roundingIteration a seeds (T j seeds)).1 := by simp only [indicator, Set.mem_setOf_eq] exact finite_interval_increment_sum (fun k => rowDot c (roundingIteration a seeds k).1) n _ _ (roundingHalvingTimes_step_le a _ j seeds) (roundingHalvingTimes_le_horizon a _ (j + 1) seeds) simpa only [ht] using hs
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_row_second_moment_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:398
theorem roundingHalvingTimes_unprotected_expected_count_sum_le

Integrating the realized geometric count allowance preserves the paper's 8 min(h,n) budget; each random count is bounded and measurable. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
m :
ℕ
(∑ j ∈ range m, ∫ seeds, ((activeIndices (roundingIteration a seeds (roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds)).1).length : ℝ) ∂roundingSeedLaw n)
≤ 8 * (min h n : ℕ)
Proof (Lean source)
-- @node: roundingHalvingTimes_unprotected_expected_count_sum_le lemma roundingHalvingTimes_unprotected_expected_count_sum_le (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) (m : ℕ) : (∑ j ∈ range m, ∫ seeds, ((activeIndices (roundingIteration a seeds (roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds)).1).length : ℝ) ∂roundingSeedLaw n) ≤ 8 * (min h n : ℕ) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ have : IsProbabilityMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw cubeMeasure infer_instance have hi (j : ℕ) := roundingIteration_random_time_active_count_integrable a (roundingHalvingTimes a (roundingUnprotectedTime a h) j) (roundingHalvingTimes_measurable a _ (roundingUnprotectedTime_measurable a h) j) rw [← integral_finsetSum _ (fun j _ => hi j)] calc _ ≤ ∫ _ : RoundingSeeds n, (8 * (min h n : ℕ) : ℝ) ∂roundingSeedLaw n := by apply integral_mono (integrable_finsetSum _ (fun j _ => hi j)) (integrable_const _) intro seeds change (∑ j ∈ range m, ((activeIndices (roundingIteration a seeds (roundingHalvingTimes a (roundingUnprotectedTime a h) j seeds)).1).length : ℝ)) ≤ 8 * (min h n : ℕ) exact_mod_cast roundingHalvingTimes_unprotected_count_sum_le a h hh m seeds _ = _ := by simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingHalvingTimes_unprotected_expected_count_sum_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingCrossingTimes.lean:435
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingFairness 6 declarations Integrating one fresh coordinate of the product seed law preserves the fractional-state mean.

Seed-history integration and fairness

Integrating one fresh coordinate of the product seed law preserves the fractional-state mean. Finite iteration from zero gives fair terminal signs.

theorem cube_integral_eq_of_fresh_coordinate

A fresh-coordinate conditional mean integrates to the preceding mean under product uniform seeds, provided that the preceding state ignores that seed. Under the stated conditions.

Formal statement
m :
ℕ
j :
Fin m
f g :
Cube m → ℝ
hf :
hg :
hmean :
∀ x, (∫ t, f (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = g x
hignore :
∀ x t, g (update x j t) = g x
(∫ x, f x ∂cubeMeasure m) = ∫ x, g x ∂cubeMeasure m
Proof (Lean source)
-- @node: cube_integral_eq_of_fresh_coordinate lemma cube_integral_eq_of_fresh_coordinate {m : ℕ} (j : Fin m) (f g : Cube m → ℝ) (hf : Integrable f (cubeMeasure m)) (hg : Integrable g (cubeMeasure m)) (hmean : ∀ x, (∫ t, f (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = g x) (hignore : ∀ x t, g (update x j t) = g x) : (∫ x, f x ∂cubeMeasure m) = ∫ x, g x ∂cubeMeasure m := by classical cases m with | zero => exact elim0 j | succ m => let μ : Measure ℝ := volume.restrict (Icc (0 : ℝ) 1) have : IsFiniteMeasure (cubeMeasure m) := by unfold cubeMeasure infer_instance let e := (piFinSuccAbove (fun _ : Fin (m + 1) => ℝ) j).symm have hp := (measurePreserving_piFinSuccAbove (fun _ : Fin (m + 1) => μ) j).symm have hf' : Integrable (fun x => f (e x)) (μ.prod (cubeMeasure m)) := (hp.integrable_comp_emb e.measurableEmbedding).mpr hf have hg' : Integrable (fun x => g (e x)) (μ.prod (cubeMeasure m)) := (hp.integrable_comp_emb e.measurableEmbedding).mpr hg change (∫ x, f x ∂Measure.pi (fun _ : Fin (m + 1) => μ)) = ∫ x, g x ∂Measure.pi (fun _ : Fin (m + 1) => μ) rw [← hp.integral_comp' f, ← hp.integral_comp' g] change (∫ x, f (e x) ∂μ.prod (cubeMeasure m)) = ∫ x, g (e x) ∂μ.prod (cubeMeasure m) rw [integral_prod_symm _ hf', integral_prod_symm _ hg'] apply integral_congr_ae filter_upwards [] with x have he (t : ℝ) : e (t, x) = update (e (0, x)) j t := by simp [e, MeasurableEquiv.piFinSuccAbove_symm_apply, Fin.insertNthEquiv, Fin.update_insertNth] have hfc : (fun t => f (e (t, x))) = (fun t => f (update (e (0, x)) j t)) := by funext t rw [he t] have hgc : (fun t => g (e (t, x))) = (fun _ : ℝ => g (e (0, x))) := by funext t rw [he t, hignore] rw [hfc, hgc, hmean] simp [μ, integral_const, measureReal_def, Real.volume_Icc]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_integral_eq_of_fresh_coordinate · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingFairness.lean:16
theorem roundingIteration_coordinate_measurable

Each fractional coordinate is Borel as a function of all seeds. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k :
ℕ
i :
Fin n
Measurable (fun seeds : RoundingSeeds n => (roundingIteration a seeds k).1 i)
Proof (Lean source)
@[fun_prop] -- @node: roundingIteration_coordinate_measurable lemma roundingIteration_coordinate_measurable (a : Fin (n / 4) → Fin n → ℝ) (k : ℕ) (i : Fin n) : Measurable (fun seeds : RoundingSeeds n => (roundingIteration a seeds k).1 i) := by fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_coordinate_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingFairness.lean:63
theorem roundingIteration_coordinate_integrable

Cube preservation makes every fractional coordinate integrable under the full product seed law, without any row bound. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k :
ℕ
i :
Fin n
Integrable (fun seeds => (roundingIteration a seeds k).1 i) (roundingSeedLaw n)
Proof (Lean source)
-- @node: roundingIteration_coordinate_integrable lemma roundingIteration_coordinate_integrable (a : Fin (n / 4) → Fin n → ℝ) (k : ℕ) (i : Fin n) : Integrable (fun seeds => (roundingIteration a seeds k).1 i) (roundingSeedLaw n) := by have : IsFiniteMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw cubeMeasure infer_instance apply Integrable.of_bound (roundingIteration_coordinate_measurable a k i).aestronglyMeasurable 1 filter_upwards [] with seeds simpa only [Real.norm_eq_abs] using (roundingIteration_cube_and_count a seeds k).1 i
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_coordinate_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingFairness.lean:71
theorem roundingIteration_integral_succ

Successive fresh-coin integration preserves the full-seed coordinate mean. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k :
ℕ
hk :
k < n
i :
Fin n
(∫ seeds, (roundingIteration a seeds (k + 1)).1 i ∂roundingSeedLaw n)
= ∫ seeds, (roundingIteration a seeds k).1 i ∂roundingSeedLaw n
Proof (Lean source)
-- @node: roundingIteration_integral_succ lemma roundingIteration_integral_succ (a : Fin (n / 4) → Fin n → ℝ) (k : ℕ) (hk : k < n) (i : Fin n) : (∫ seeds, (roundingIteration a seeds (k + 1)).1 i ∂roundingSeedLaw n) = ∫ seeds, (roundingIteration a seeds k).1 i ∂roundingSeedLaw n := by apply cube_integral_eq_of_fresh_coordinate ⟨2 * k + 1, by omega⟩ _ _ (roundingIteration_coordinate_integrable a (k + 1) i) (roundingIteration_coordinate_integrable a k i) · exact fun seeds => roundingIteration_next_coin_mean a seeds k hk i · intro seeds t rw [roundingIteration_update_future a seeds k _ t (by dsimp; omega)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_integral_succ · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingFairness.lean:84
theorem roundingIteration_integral_zero

Starting at zero and integrating the fresh seed at each move gives zero mean for every fractional coordinate up to the deterministic move limit. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k :
ℕ
hk :
k ≤ n
i :
Fin n
(∫ seeds, (roundingIteration a seeds k).1 i ∂roundingSeedLaw n) = 0
Proof (Lean source)
-- @node: roundingIteration_integral_zero lemma roundingIteration_integral_zero (a : Fin (n / 4) → Fin n → ℝ) (k : ℕ) (hk : k ≤ n) (i : Fin n) : (∫ seeds, (roundingIteration a seeds k).1 i ∂roundingSeedLaw n) = 0 := by induction k with | zero => simp [roundingIteration] | succ k ih => rw [roundingIteration_integral_succ a k (by omega) i] exact ih (by omega)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_integral_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingFairness.lean:97
theorem orderedBoundaryRounding_fair

Terminal signs equal the final fractional state, so the constructed signing is fair under its actual product seed law. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
i :
Fin n
(∫ seeds, sgn (orderedBoundaryRounding n a seeds i) ∂roundingSeedLaw n) = 0
Proof (Lean source)
-- @node: orderedBoundaryRounding_fair lemma orderedBoundaryRounding_fair (a : Fin (n / 4) → Fin n → ℝ) (i : Fin n) : (∫ seeds, sgn (orderedBoundaryRounding n a seeds i) ∂roundingSeedLaw n) = 0 := by simp_rw [← roundingIteration_terminal_eq_sign a] exact roundingIteration_integral_zero a n le_rfl i
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedBoundaryRounding_fair · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingFairness.lean:109
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingGeometry 15 declarations Ordered Gram--Schmidt preserves active-coordinate support and discards zero vectors.

Support and nonzero directions in ordered boundary rounding

Ordered Gram--Schmidt preserves active-coordinate support and discards zero vectors. Finite inverse-CDF sampling therefore selects a valid direction from any nonempty constructed nullspace basis, yielding strict active-count progress.

theorem removeProjections_active_support Lemma removeProjections_active_support in the paper ↗

Removing projections onto active-supported vectors preserves active support. Under the stated conditions.

Formal statement
n :
ℕ
shared
u v :
Fin n → ℝ
bs :
List (Fin n → ℝ)
hv :
∀ i
if
¬|u i| < 1
then
v i = 0
hbs :
∀ b ∈ bs, ∀ i, ¬|u i| < 1 → b i = 0
i :
¬|u i| < 1
Proof (Lean source)
-- @node: removeProjections_active_support lemma removeProjections_active_support (u v : Fin n → ℝ) (bs : List (Fin n → ℝ)) (hv : ∀ i, ¬|u i| < 1 → v i = 0) (hbs : ∀ b ∈ bs, ∀ i, ¬|u i| < 1 → b i = 0) : ∀ i, ¬|u i| < 1 → removeProjections bs v i = 0 := by intro i hi have hz : (bs.map (fun b => rowDot v b * b i)).sum = 0 := by apply List.sum_eq_zero intro x hx obtain ⟨b, hb, rfl⟩ := List.mem_map.mp hx simp [hbs b hb i hi] simp [removeProjections, hv i hi, hz]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.removeProjections_active_support · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:18
theorem insertOrtho_active_support Lemma insertOrtho_active_support in the paper ↗

Gram--Schmidt insertion cannot introduce a coordinate outside the input support. Under the stated conditions.

Formal statement
n :
ℕ
shared
u v :
Fin n → ℝ
bs :
List (Fin n → ℝ)
hv :
∀ i
if
¬|u i| < 1
then
v i = 0
hbs :
∀ b ∈ bs, ∀ i, ¬|u i| < 1 → b i = 0
b ∈ insertOrtho bs v :
i :
¬|u i| < 1
b i = 0
Proof (Lean source)
-- @node: insertOrtho_active_support lemma insertOrtho_active_support (u v : Fin n → ℝ) (bs : List (Fin n → ℝ)) (hv : ∀ i, ¬|u i| < 1 → v i = 0) (hbs : ∀ b ∈ bs, ∀ i, ¬|u i| < 1 → b i = 0) : ∀ b ∈ insertOrtho bs v, ∀ i, ¬|u i| < 1 → b i = 0 := by intro b hb i hi dsimp only [insertOrtho] at hb split_ifs at hb with hp · rcases List.mem_append.mp hb with hb | hb · exact hbs b hb i hi · have he := List.mem_singleton.mp hb rw [he] simp [removeProjections_active_support u v bs hv hbs i hi] · exact hbs b hb i hi
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.insertOrtho_active_support · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:32
theorem orderedOrtho_active_support Lemma orderedOrtho_active_support in the paper ↗

Every vector returned by ordered Gram--Schmidt has the common input support. Under the stated conditions.

Formal statement
n :
ℕ
shared
u :
Fin n → ℝ
vs :
List (Fin n → ℝ)
hvs :
∀ v ∈ vs, ∀ i, ¬|u i| < 1 → v i = 0
b ∈ orderedOrtho vs :
i :
¬|u i| < 1
b i = 0
Proof (Lean source)
-- @node: orderedOrtho_active_support lemma orderedOrtho_active_support (u : Fin n → ℝ) (vs : List (Fin n → ℝ)) (hvs : ∀ v ∈ vs, ∀ i, ¬|u i| < 1 → v i = 0) : ∀ b ∈ orderedOrtho vs, ∀ i, ¬|u i| < 1 → b i = 0 := by have hf (ls : List (Fin n → ℝ)) : (∀ v ∈ ls, ∀ i, ¬|u i| < 1 → v i = 0) → ∀ bs, (∀ b ∈ bs, ∀ i, ¬|u i| < 1 → b i = 0) → ∀ b ∈ ls.foldl insertOrtho bs, ∀ i, ¬|u i| < 1 → b i = 0 := by induction ls with | nil => intro _ bs hbs; exact hbs | cons v ls ih => intro hls bs hbs apply ih (fun w hw => hls w (by simp [hw])) exact insertOrtho_active_support u v bs (hls v (by simp)) hbs exact hf vs hvs [] (by simp)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedOrtho_active_support · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:48
theorem constraintProjection_active_support Lemma constraintProjection_active_support in the paper ↗

The constructed constraint projection vanishes on inactive coordinates. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u v :
Fin n → ℝ
i :
¬|u i| < 1
constraintProjection a q u v i = 0
Proof (Lean source)
-- @node: constraintProjection_active_support lemma constraintProjection_active_support (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u v : Fin n → ℝ) : ∀ i, ¬|u i| < 1 → constraintProjection a q u v i = 0 := by apply removeProjections_active_support · intro i hi; simp [activeMask, hi] · apply orderedOrtho_active_support intro b hb i hi obtain ⟨h, _, rfl⟩ := List.mem_map.mp hb simp [activeMask, hi]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.constraintProjection_active_support · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:65
theorem nullspaceBasis_active_support Lemma nullspaceBasis_active_support in the paper ↗

Every constructed nullspace basis vector is supported on active coordinates.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
b ∈ nullspaceBasis a q u :
i :
¬|u i| < 1
b i = 0
Proof (Lean source)
-- @node: nullspaceBasis_active_support lemma nullspaceBasis_active_support (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) : ∀ b ∈ nullspaceBasis a q u, ∀ i, ¬|u i| < 1 → b i = 0 := by apply orderedOrtho_active_support intro b hb obtain ⟨j, _, rfl⟩ := List.mem_map.mp hb exact constraintProjection_active_support a q u _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_active_support · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:77
theorem normalized_residual_ne_zero Lemma normalized_residual_ne_zero in the paper ↗

A positive residual norm makes its normalized direction nonzero. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
w :
Fin n → ℝ
hp :
0 < sqrt (rowDot w w)
(fun i => w i / sqrt (rowDot w w)) ≠ 0
Proof (Lean source)
-- @node: normalized_residual_ne_zero lemma normalized_residual_ne_zero (w : Fin n → ℝ) (hp : 0 < sqrt (rowDot w w)) : (fun i => w i / sqrt (rowDot w w)) ≠ 0 := by intro hz have hw : w = 0 := by funext i have hi := congrFun hz i have hd : sqrt (rowDot w w) ≠ 0 := ne_of_gt hp exact (div_eq_zero_iff.mp hi).resolve_right hd subst w simpa [rowDot] using hp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.normalized_residual_ne_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:87

The insertion rule preserves nonzero old directions and adds only a nonzero residual. Under the stated conditions.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v :
Fin n → ℝ
hbs :
∀ b ∈ bs, b ≠ 0
b ∈ insertOrtho bs v :
b ≠ 0
Proof (Lean source)
-- @node: insertOrtho_nonzero lemma insertOrtho_nonzero (bs : List (Fin n → ℝ)) (v : Fin n → ℝ) (hbs : ∀ b ∈ bs, b ≠ 0) : ∀ b ∈ insertOrtho bs v, b ≠ 0 := by intro b hb dsimp only [insertOrtho] at hb split_ifs at hb with hp · rcases List.mem_append.mp hb with hb | hb · exact hbs b hb · rw [List.mem_singleton.mp hb] exact normalized_residual_ne_zero _ hp · exact hbs b hb
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.insertOrtho_nonzero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:101

Zero residuals are discarded throughout the structural Gram--Schmidt fold. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
vs :
List (Fin n → ℝ)
b ∈ orderedOrtho vs :
b ≠ 0
Proof (Lean source)
-- @node: orderedOrtho_nonzero lemma orderedOrtho_nonzero (vs : List (Fin n → ℝ)) : ∀ b ∈ orderedOrtho vs, b ≠ 0 := by have hf (ls : List (Fin n → ℝ)) : ∀ bs, (∀ b ∈ bs, b ≠ 0) → ∀ b ∈ ls.foldl insertOrtho bs, b ≠ 0 := by induction ls with | nil => intro bs hbs; exact hbs | cons v ls ih => intro bs hbs exact ih (insertOrtho bs v) (insertOrtho_nonzero bs v hbs) exact hf vs [] (by simp)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedOrtho_nonzero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:114
theorem normalized_residual_rowDot Lemma normalized_residual_rowDot in the paper ↗

Normalization gives the unit squared length used in the covariance trace. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
w :
Fin n → ℝ
hp :
0 < sqrt (rowDot w w)
rowDot (fun i => w i / sqrt (rowDot w w)) (fun i => w i / sqrt (rowDot w w)) = 1
Proof (Lean source)
-- @node: normalized_residual_rowDot lemma normalized_residual_rowDot (w : Fin n → ℝ) (hp : 0 < sqrt (rowDot w w)) : rowDot (fun i => w i / sqrt (rowDot w w)) (fun i => w i / sqrt (rowDot w w)) = 1 := by have hn : 0 ≤ rowDot w w := Finset.sum_nonneg (fun i _ => mul_self_nonneg (w i)) have hs := Real.sq_sqrt hn have hd : sqrt (rowDot w w) ≠ 0 := ne_of_gt hp unfold rowDot simp only [div_mul_div_comm, ← Finset.sum_div] rw [← pow_two] change rowDot w w / sqrt (rowDot w w) ^ 2 = 1 rw [hs] exact div_self (by nlinarith [sq_pos_of_ne_zero hd])
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.normalized_residual_rowDot · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:127
theorem insertOrtho_unit_length Lemma insertOrtho_unit_length in the paper ↗

Every inserted Gram--Schmidt residual has unit squared length. Under the stated conditions.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v :
Fin n → ℝ
hbs :
∀ b ∈ bs, rowDot b b = 1
b ∈ insertOrtho bs v :
rowDot b b = 1
Proof (Lean source)
-- @node: insertOrtho_unit_length lemma insertOrtho_unit_length (bs : List (Fin n → ℝ)) (v : Fin n → ℝ) (hbs : ∀ b ∈ bs, rowDot b b = 1) : ∀ b ∈ insertOrtho bs v, rowDot b b = 1 := by intro b hb dsimp only [insertOrtho] at hb split_ifs at hb with hp · rcases List.mem_append.mp hb with hb | hb · exact hbs b hb · rw [List.mem_singleton.mp hb] exact normalized_residual_rowDot _ hp · exact hbs b hb
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.insertOrtho_unit_length · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:143
theorem orderedOrtho_unit_length Lemma orderedOrtho_unit_length in the paper ↗

All output directions of the ordered Gram--Schmidt construction are unit vectors. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
vs :
List (Fin n → ℝ)
b ∈ orderedOrtho vs :
rowDot b b = 1
Proof (Lean source)
-- @node: orderedOrtho_unit_length lemma orderedOrtho_unit_length (vs : List (Fin n → ℝ)) : ∀ b ∈ orderedOrtho vs, rowDot b b = 1 := by have hf (ls : List (Fin n → ℝ)) : ∀ bs, (∀ b ∈ bs, rowDot b b = 1) → ∀ b ∈ ls.foldl insertOrtho bs, rowDot b b = 1 := by induction ls with | nil => intro bs hbs; exact hbs | cons v ls ih => intro bs hbs exact ih (insertOrtho bs v) (insertOrtho_unit_length bs v hbs) exact hf vs [] (by simp)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedOrtho_unit_length · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:157
theorem nullspaceBasis_boundary_weight_pos Lemma nullspaceBasis_boundary_weight_pos in the paper ↗

Each inverse boundary-product weight in the actual nullspace basis is positive.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
b ∈ nullspaceBasis a q u :
0 < (boundaryPlus u b * boundaryMinus u b)⁻¹
Proof (Lean source)
-- @node: nullspaceBasis_boundary_weight_pos lemma nullspaceBasis_boundary_weight_pos (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) : ∀ b ∈ nullspaceBasis a q u, 0 < (boundaryPlus u b * boundaryMinus u b)⁻¹ := by intro b hb have hs : ∀ i, b i ≠ 0 → |u i| < 1 := by intro i hi by_contra hn exact hi (nullspaceBasis_active_support a q u b hb i hn) have hn := orderedOrtho_nonzero _ b hb exact inv_pos.mpr (mul_pos (boundaryPlus_pos u b hs hn) (boundaryMinus_pos u b hs hn))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_boundary_weight_pos · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:171
theorem nullspaceBasis_boundary_weight_sum_pos Lemma nullspaceBasis_boundary_weight_sum_pos in the paper ↗

The finite basis-sampling normalizer is strictly positive whenever a direction exists. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
hne :
nullspaceBasis a q u ≠ []
0 < ((nullspaceBasis a q u).map (fun b => (boundaryPlus u b * boundaryMinus u b)⁻¹)).sum
Proof (Lean source)
-- @node: nullspaceBasis_boundary_weight_sum_pos lemma nullspaceBasis_boundary_weight_sum_pos (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (hne : nullspaceBasis a q u ≠ []) : 0 < ((nullspaceBasis a q u).map (fun b => (boundaryPlus u b * boundaryMinus u b)⁻¹)).sum := by have hp := nullspaceBasis_boundary_weight_pos a q u cases he : nullspaceBasis a q u with | nil => exact (hne he).elim | cons b bs => have hb : 0 < (boundaryPlus u b * boundaryMinus u b)⁻¹ := hp b (by rw [he]; simp) have ht : 0 ≤ (bs.map (fun b => (boundaryPlus u b * boundaryMinus u b)⁻¹)).sum := by apply List.sum_nonneg intro x hx obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hx exact (hp v (by rw [he]; simp [hv])).le simpa only [List.map_cons, List.sum_cons] using add_pos_of_pos_of_nonneg hb ht
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_boundary_weight_sum_pos · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:184
theorem inverseCDF_mem_directions Lemma inverseCDF_mem_directions in the paper ↗

Sampling a nonempty finite distribution always returns one of its directions, including seeds at interval ties and at the final endpoint. Under the stated conditions.

Formal statement
n :
ℕ
shared
xs :
List ((Fin n → ℝ) × ℝ)
hne :
xs ≠ []
t :
ℝ
inverseCDF xs t ∈ xs.map fst
Proof (Lean source)
-- @node: inverseCDF_mem_directions lemma inverseCDF_mem_directions (xs : List ((Fin n → ℝ) × ℝ)) (hne : xs ≠ []) (t : ℝ) : inverseCDF xs t ∈ xs.map fst := by induction xs generalizing t with | nil => exact (hne rfl).elim | cons x xs ih => cases xs with | nil => simp [inverseCDF] | cons y ys => simp only [inverseCDF] split_ifs · simp · exact List.mem_cons_of_mem _ (ih (by simp) _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.inverseCDF_mem_directions · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:202
theorem roundingStep_progress_of_nonempty_basis Lemma roundingStep_progress_of_nonempty_basis in the paper ↗

Any nonempty nullspace basis makes the actual move preserve the cube and strictly decrease the active count; no seed restrictions or generic rank are needed. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
seed₁ seed₂ :
ℝ
hu :
∀ i, |u i| ≤ 1
hne :
nullspaceBasis a q u ≠ []
conclusion 1
i :
|roundingStep a q u seed₁ seed₂ i| ≤ 1
conclusion 2
(activeIndices (roundingStep a q u seed₁ seed₂)).length < (activeIndices u).length
Proof (Lean source)
-- @node: roundingStep_progress_of_nonempty_basis lemma roundingStep_progress_of_nonempty_basis (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (seed₁ seed₂ : ℝ) (hu : ∀ i, |u i| ≤ 1) (hne : nullspaceBasis a q u ≠ []) : (∀ i, |roundingStep a q u seed₁ seed₂ i| ≤ 1) ∧ (activeIndices (roundingStep a q u seed₁ seed₂)).length < (activeIndices u).length := by let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let xs := bs.zip (ws.map (fun w => w / ws.sum)) have hlen : (ws.map (fun w => w / ws.sum)).length = bs.length := by simp [ws] have hxne : xs ≠ [] := by intro hz have hl : xs.length = bs.length := by simp [xs, hlen] rw [hz] at hl exact hne (by simpa using hl.symm) have hfst : xs.map fst = bs := by exact List.map_fst_zip hlen.ge have hm : inverseCDF xs seed₁ ∈ bs := by rw [← hfst] exact inverseCDF_mem_directions xs hxne seed₁ apply roundingStep_progress_of_direction a q u seed₁ seed₂ hu · intro i hi by_contra hn exact hi (nullspaceBasis_active_support a q u _ hm i hn) · exact orderedOrtho_nonzero _ _ hm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_progress_of_nonempty_basis · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingGeometry.lean:218
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingLottery 11 declarations The half-open inverse-CDF sampler integrates finite rewards with their prescribed weights.

Exact direction-lottery moments

The half-open inverse-CDF sampler integrates finite rewards with their prescribed weights. Applied to reciprocal boundary-distance weights, this supplies the isotropic covariance of a boundary move before the phase energy argument.

theorem inverseCDF_interval_integral Lemma inverseCDF_interval_integral in the paper ↗

A nonnegative finite direction lottery integrates every reward on its full weight interval, including zero weights and tied cumulative boundaries. Under the stated conditions.

Formal statement
n :
ℕ
shared
xs :
List ((Fin n → ℝ) × ℝ)
f :
(Fin n → ℝ) → ℝ
hw :
∀ x ∈ xs, 0 ≤ x.2
conclusion 1
IntervalIntegrable (fun t => f (inverseCDF xs t)) volume 0 (xs.map snd).sum
conclusion 2
(∫ t in 0..(xs.map snd).sum, f (inverseCDF xs t))
= (xs.map (fun x => x.2 * f x.1)).sum
Proof (Lean source)
-- @node: inverseCDF_interval_integral lemma inverseCDF_interval_integral (xs : List ((Fin n → ℝ) × ℝ)) (f : (Fin n → ℝ) → ℝ) (hw : ∀ x ∈ xs, 0 ≤ x.2) : IntervalIntegrable (fun t => f (inverseCDF xs t)) volume 0 (xs.map snd).sum ∧ (∫ t in 0..(xs.map snd).sum, f (inverseCDF xs t)) = (xs.map (fun x => x.2 * f x.1)).sum := by induction xs with | nil => simp [inverseCDF] | cons x xs ih => have hx : 0 ≤ x.2 := hw x (by simp) have htail : ∀ y ∈ xs, 0 ≤ y.2 := fun y hy => hw y (by simp [hy]) obtain ⟨hi, he⟩ := ih htail cases xs with | nil => simp [inverseCDF, intervalIntegral.integral_const] | cons y ys => let S : ℝ := ((y :: ys).map snd).sum have hS : 0 ≤ S := by change 0 ≤ ((y :: ys).map snd).sum have hnonneg (l : List ((Fin n → ℝ) × ℝ)) (hl : ∀ z ∈ l, 0 ≤ z.2) : 0 ≤ (l.map snd).sum := by induction l with | nil => simp | cons z l ih => simp only [List.map_cons, List.sum_cons] exact add_nonneg (hl z (by simp)) (ih (fun v hv => hl v (by simp [hv]))) exact hnonneg _ htail have hleft : EqOn (fun _ : ℝ => f x.1) (fun t => f (inverseCDF (x :: y :: ys) t)) (uIoo 0 x.2) := by intro t ht rw [uIoo_of_le hx] at ht simp [inverseCDF, ht.2] have hright : EqOn (fun t => f (inverseCDF (y :: ys) (t - x.2))) (fun t => f (inverseCDF (x :: y :: ys) t)) (uIoo x.2 (x.2 + S)) := by intro t ht rw [uIoo_of_le (by linarith : x.2 ≤ x.2 + S)] at ht simp [inverseCDF, not_lt.mpr ht.1.le] have hil : IntervalIntegrable (fun t => f (inverseCDF (x :: y :: ys) t)) volume 0 x.2 := intervalIntegrable_const.congr_uIoo hleft have hir : IntervalIntegrable (fun t => f (inverseCDF (x :: y :: ys) t)) volume x.2 (x.2 + S) := by apply IntervalIntegrable.congr_uIoo _ hright simpa [S, add_comm] using hi.comp_sub_right x.2 constructor · simpa [S] using hil.trans hir · change (∫ t in 0..x.2 + S, f (inverseCDF (x :: y :: ys) t)) = _ rw [← intervalIntegral.integral_add_adjacent_intervals hil hir, ← intervalIntegral.integral_congr_uIoo hleft, ← intervalIntegral.integral_congr_uIoo hright, intervalIntegral.integral_const, intervalIntegral.integral_comp_sub_right (fun t => f (inverseCDF (y :: ys) t)) x.2] simp only [sub_self, add_sub_cancel_left, sub_zero, smul_eq_mul] rw [he] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.inverseCDF_interval_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:19
theorem inverseCDF_uniform_integral Lemma inverseCDF_uniform_integral in the paper ↗

A unit-mass finite direction lottery has precisely the expected weighted reward under the uniform seed used by the rounding construction. Under the stated conditions.

Formal statement
n :
ℕ
shared
xs :
List ((Fin n → ℝ) × ℝ)
f :
(Fin n → ℝ) → ℝ
hw :
∀ x ∈ xs, 0 ≤ x.2
hs :
(xs.map snd).sum = 1
(∫ t, f (inverseCDF xs t) ∂volume.restrict (Icc (0 : ℝ) 1))
= (xs.map (fun x => x.2 * f x.1)).sum
Proof (Lean source)
-- @node: inverseCDF_uniform_integral lemma inverseCDF_uniform_integral (xs : List ((Fin n → ℝ) × ℝ)) (f : (Fin n → ℝ) → ℝ) (hw : ∀ x ∈ xs, 0 ≤ x.2) (hs : (xs.map snd).sum = 1) : (∫ t, f (inverseCDF xs t) ∂volume.restrict (Icc (0 : ℝ) 1)) = (xs.map (fun x => x.2 * f x.1)).sum := by rw [integral_Icc_eq_integral_Ioc] rw [← intervalIntegral.integral_of_le (show (0 : ℝ) ≤ 1 by norm_num), ← hs] exact (inverseCDF_interval_integral xs f hw).2
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.inverseCDF_uniform_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:75

Zipping each direction with its own weight keeps the ordered finite lottery. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
w :
(Fin n → ℝ) → ℝ
bs.zip (bs.map w) = bs.map (fun v => (v, w v))
Proof (Lean source)
-- @node: direction_lottery_zip lemma direction_lottery_zip (bs : List (Fin n → ℝ)) (w : (Fin n → ℝ) → ℝ) : bs.zip (bs.map w) = bs.map (fun v => (v, w v)) := by induction bs with | nil => rfl | cons v bs ih => simp [ih]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.direction_lottery_zip · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:87
theorem inverseCDF_normalized_integral Lemma inverseCDF_normalized_integral in the paper ↗

Dividing positive finite weights by their total gives the exact normalized uniform-seed expectation, without independence of vector coordinates. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
w f :
(Fin n → ℝ) → ℝ
hw :
∀ v ∈ bs, 0 ≤ w v
hS :
0 < (bs.map w).sum
(∫ t, f (inverseCDF (bs.map (fun v => (v, w v / (bs.map w).sum))) t) ∂volume.restrict (Icc (0 : ℝ) 1))
= (bs.map w).sum⁻¹ * (bs.map (fun v => w v * f v)).sum
Proof (Lean source)
-- @node: inverseCDF_normalized_integral lemma inverseCDF_normalized_integral (bs : List (Fin n → ℝ)) (w f : (Fin n → ℝ) → ℝ) (hw : ∀ v ∈ bs, 0 ≤ w v) (hS : 0 < (bs.map w).sum) : (∫ t, f (inverseCDF (bs.map (fun v => (v, w v / (bs.map w).sum))) t) ∂volume.restrict (Icc (0 : ℝ) 1)) = (bs.map w).sum⁻¹ * (bs.map (fun v => w v * f v)).sum := by let S := (bs.map w).sum have hdivide (l : List (Fin n → ℝ)) : (l.map (fun v => w v / S)).sum = (l.map w).sum / S := by induction l with | nil => simp | cons v l ih => simp [ih, add_div] have hmass : ((bs.map (fun v => (v, w v / S))).map snd).sum = 1 := by simp only [List.map_map, Function.comp_def] rw [hdivide] exact div_self (ne_of_gt hS) have hweights : ∀ x ∈ bs.map (fun v => (v, w v / S)), 0 ≤ x.2 := by intro x hx obtain ⟨v, hv, rfl⟩ := List.mem_map.mp hx exact div_nonneg (hw v hv) hS.le rw [inverseCDF_uniform_integral _ f hweights hmass] simp only [List.map_map, Function.comp_def] change (bs.map (fun v => w v / S * f v)).sum = S⁻¹ * (bs.map (fun v => w v * f v)).sum have hscale (l : List (Fin n → ℝ)) : (l.map (fun v => w v / S * f v)).sum = S⁻¹ * (l.map (fun v => w v * f v)).sum := by induction l with | nil => simp | cons v l ih => simp only [List.map_cons, List.sum_cons] rw [ih, mul_add] congr 1 ring exact hscale bs
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.inverseCDF_normalized_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:95
theorem roundingStep_lottery_covariance Lemma roundingStep_lottery_covariance in the paper ↗

The actual direction lottery averages the direction-conditioned boundary covariance to the reciprocal total weight times the basis outer-product sum. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
i j :
Fin n
hne :
nullspaceBasis a q u ≠ []
(∫ seed₁, ∫ seed₂, (roundingStep a q u seed₁ seed₂ i - u i) * (roundingStep a q u seed₁ seed₂ j - u j) ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
= ((nullspaceBasis a q u).map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)).sum⁻¹ * ((nullspaceBasis a q u).map (fun v => v i * v j)).sum
Proof (Lean source)
-- @node: roundingStep_lottery_covariance lemma roundingStep_lottery_covariance (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (i j : Fin n) (hne : nullspaceBasis a q u ≠ []) : (∫ seed₁, ∫ seed₂, (roundingStep a q u seed₁ seed₂ i - u i) * (roundingStep a q u seed₁ seed₂ j - u j) ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) = ((nullspaceBasis a q u).map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)).sum⁻¹ * ((nullspaceBasis a q u).map (fun v => v i * v j)).sum := by let bs := nullspaceBasis a q u let w := fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹ have hS := nullspaceBasis_boundary_weight_sum_pos a q u hne have hw := nullspaceBasis_boundary_weight_pos a q u simp_rw [roundingStep_seed_covariance] change (∫ t, boundaryPlus u (inverseCDF (bs.zip ((bs.map w).map (fun z => z / (bs.map w).sum))) t) * boundaryMinus u (inverseCDF (bs.zip ((bs.map w).map (fun z => z / (bs.map w).sum))) t) * inverseCDF (bs.zip ((bs.map w).map (fun z => z / (bs.map w).sum))) t i * inverseCDF (bs.zip ((bs.map w).map (fun z => z / (bs.map w).sum))) t j ∂volume.restrict (Icc (0 : ℝ) 1)) = _ simp only [List.map_map, Function.comp_def, direction_lottery_zip] rw [inverseCDF_normalized_integral bs w (fun v => boundaryPlus u v * boundaryMinus u v * v i * v j) (fun v hv => (hw v hv).le) hS] congr 1 apply congrArg List.sum apply List.map_congr_left intro v hv have ht : boundaryPlus u v * boundaryMinus u v ≠ 0 := ne_of_gt (inv_pos.mp (hw v hv)) change (boundaryPlus u v * boundaryMinus u v)⁻¹ * (boundaryPlus u v * boundaryMinus u v * v i * v j) = v i * v j calc _ = ((boundaryPlus u v * boundaryMinus u v)⁻¹ * (boundaryPlus u v * boundaryMinus u v)) * (v i * v j) := by ring _ = v i * v j := by rw [inv_mul_cancel₀ ht, one_mul]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_lottery_covariance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:134
theorem rounding_direction_reward_integral Lemma rounding_direction_reward_integral in the paper ↗

Reciprocal boundary-product sampling cancels that product for any finite basis reward. This is the common averaging step for row and norm energies. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
f :
(Fin n → ℝ) → ℝ
hne :
nullspaceBasis a q u ≠ []
bs :
ws :
bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)
(∫ t, let v := inverseCDF (bs.zip (ws.map (fun z => z / ws.sum))) t boundaryPlus u v * boundaryMinus u v * f v ∂volume.restrict (Icc (0 : ℝ) 1))
= ws.sum⁻¹ * (bs.map f).sum
Proof (Lean source)
-- @node: rounding_direction_reward_integral lemma rounding_direction_reward_integral (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (f : (Fin n → ℝ) → ℝ) (hne : nullspaceBasis a q u ≠ []) : let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) (∫ t, let v := inverseCDF (bs.zip (ws.map (fun z => z / ws.sum))) t boundaryPlus u v * boundaryMinus u v * f v ∂volume.restrict (Icc (0 : ℝ) 1)) = ws.sum⁻¹ * (bs.map f).sum := by dsimp only let bs := nullspaceBasis a q u let w := fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹ have hw := nullspaceBasis_boundary_weight_pos a q u simp only [List.map_map, Function.comp_def, direction_lottery_zip] rw [inverseCDF_normalized_integral bs w (fun v => boundaryPlus u v * boundaryMinus u v * f v) (fun v hv => (hw v hv).le) (nullspaceBasis_boundary_weight_sum_pos a q u hne)] congr 1 apply congrArg List.sum apply List.map_congr_left intro v hv have ht : boundaryPlus u v * boundaryMinus u v ≠ 0 := ne_of_gt (inv_pos.mp (hw v hv)) change (boundaryPlus u v * boundaryMinus u v)⁻¹ * (boundaryPlus u v * boundaryMinus u v * f v) = f v rw [← mul_assoc, inv_mul_cancel₀ ht, one_mul]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.rounding_direction_reward_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:174
theorem roundingStep_seed_row_variance Lemma roundingStep_seed_row_variance in the paper ↗

The actual move's test-row increment has the exact conditional second moment, with the asymmetric boundary coin rather than a symmetric surrogate. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u c :
Fin n → ℝ
seed₁ :
ℝ
bs :
ws :
bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)
v :
inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁
(∫ seed₂, rowDot c (roundingStep a q u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1))
= boundaryPlus u v * boundaryMinus u v * rowDot c v ^ 2
Proof (Lean source)
-- @node: roundingStep_seed_row_variance lemma roundingStep_seed_row_variance (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u c : Fin n → ℝ) (seed₁ : ℝ) : let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ (∫ seed₂, rowDot c (roundingStep a q u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1)) = boundaryPlus u v * boundaryMinus u v * rowDot c v ^ 2 := by dsimp only let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ by_cases he : bs = [] · simp [roundingStep, show nullspaceBasis a q u = [] from he, inverseCDF, rowDot] · have hv : v ∈ bs := rounding_selected_direction_mem a q u seed₁ he have hs : ∀ k, v k ≠ 0 → |u k| < 1 := by intro k hk by_contra hn exact hk (nullspaceBasis_active_support a q u v hv k hn) have hn := orderedOrtho_nonzero _ v hv have hp := boundaryPlus_pos u v hs hn have hm := boundaryMinus_pos u v hs hn have hcoin := boundary_seed_covariance (rowDot c v) (rowDot c v) (boundaryPlus u v) (boundaryMinus u v) hp hm rw [pow_two, ← mul_assoc, ← hcoin] apply integral_congr_ae filter_upwards [] with t change dotProduct c ((if t < boundaryMinus u v / (boundaryPlus u v + boundaryMinus u v) then u + boundaryPlus u v • v else u - boundaryMinus u v • v) - u) ^ 2 = _ split_ifs <;> simp only [dotProduct_sub, dotProduct_add, dotProduct_smul, smul_eq_mul] <;> simp only [rowDot, dotProduct] <;> ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_seed_row_variance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:203
theorem roundingStep_lottery_row_variance Lemma roundingStep_lottery_row_variance in the paper ↗

Averaging both fresh seeds gives the exact test-row quadratic form in the constructed nullspace basis, the phase variance identity in the roadmap. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u c :
Fin n → ℝ
hne :
nullspaceBasis a q u ≠ []
(∫ seed₁, ∫ seed₂, rowDot c (roundingStep a q u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
= ((nullspaceBasis a q u).map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)).sum⁻¹ * ((nullspaceBasis a q u).map (fun v => rowDot c v ^ 2)).sum
Proof (Lean source)
-- @node: roundingStep_lottery_row_variance lemma roundingStep_lottery_row_variance (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u c : Fin n → ℝ) (hne : nullspaceBasis a q u ≠ []) : (∫ seed₁, ∫ seed₂, rowDot c (roundingStep a q u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) = ((nullspaceBasis a q u).map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)).sum⁻¹ * ((nullspaceBasis a q u).map (fun v => rowDot c v ^ 2)).sum := by simp_rw [roundingStep_seed_row_variance] exact rounding_direction_reward_integral a q u (fun v => rowDot c v ^ 2) hne
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_lottery_row_variance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:239
theorem boundary_seed_energy_increment Lemma boundary_seed_energy_increment in the paper ↗

A single asymmetric boundary coin increases squared norm in expectation by its distance product times the direction's squared norm. Under the stated conditions.

Formal statement
n :
ℕ
shared
u v :
Fin n → ℝ
dp dm :
ℝ
hp :
0 < dp
hm :
0 < dm
(∫ t, (if t < dm / (dp + dm) then rowDot (u + dp • v) (u + dp • v) - rowDot u u else rowDot (u - dm • v) (u - dm • v) - rowDot u u) ∂volume.restrict (Icc (0 : ℝ) 1))
= dp * dm * rowDot v v
Proof (Lean source)
-- @node: boundary_seed_energy_increment lemma boundary_seed_energy_increment (u v : Fin n → ℝ) (dp dm : ℝ) (hp : 0 < dp) (hm : 0 < dm) : (∫ t, (if t < dm / (dp + dm) then rowDot (u + dp • v) (u + dp • v) - rowDot u u else rowDot (u - dm • v) (u - dm • v) - rowDot u u) ∂volume.restrict (Icc (0 : ℝ) 1)) = dp * dm * rowDot v v := by rw [uniform_threshold_integral _ _ _ ⟨(boundary_coin_probability dp dm hp hm).1.le, (boundary_coin_probability dp dm hp hm).2.le⟩] change dm / (dp + dm) * (dotProduct (u + dp • v) (u + dp • v) - dotProduct u u) + (1 - dm / (dp + dm)) * (dotProduct (u - dm • v) (u - dm • v) - dotProduct u u) = _ simp only [add_dotProduct, dotProduct_add, sub_dotProduct, dotProduct_sub, smul_dotProduct, dotProduct_smul, smul_eq_mul] calc _ = (dm / (dp + dm) * dp + (1 - dm / (dp + dm)) * (-dm)) * (dotProduct u v + dotProduct v u) + (dm / (dp + dm) * dp ^ 2 + (1 - dm / (dp + dm)) * (-dm) ^ 2) * dotProduct v v := by ring _ = dp * dm * rowDot v v := by rw [boundary_coin_mean_zero dp dm hp hm, boundary_coin_second_moment dp dm hp hm, zero_mul, zero_add] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundary_seed_energy_increment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:252
theorem roundingStep_seed_energy_increment Lemma roundingStep_seed_energy_increment in the paper ↗

The squared-norm potential's conditional increase for the actual move is its boundary-distance product, since every selected basis direction is a unit vector. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
seed₁ :
ℝ
bs :
ws :
bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)
v :
inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁
(∫ seed₂, rowDot (roundingStep a q u seed₁ seed₂) (roundingStep a q u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
-- @node: roundingStep_seed_energy_increment lemma roundingStep_seed_energy_increment (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (seed₁ : ℝ) : let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ (∫ seed₂, rowDot (roundingStep a q u seed₁ seed₂) (roundingStep a q u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1)) = boundaryPlus u v * boundaryMinus u v * rowDot v v := by dsimp only let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ by_cases he : bs = [] · simp [roundingStep, show nullspaceBasis a q u = [] from he, inverseCDF, rowDot] · have hv : v ∈ bs := rounding_selected_direction_mem a q u seed₁ he have hs : ∀ k, v k ≠ 0 → |u k| < 1 := by intro k hk by_contra hn exact hk (nullspaceBasis_active_support a q u v hv k hn) have hn := orderedOrtho_nonzero _ v hv have hcoin := boundary_seed_energy_increment u v (boundaryPlus u v) (boundaryMinus u v) (boundaryPlus_pos u v hs hn) (boundaryMinus_pos u v hs hn) rw [← hcoin] apply integral_congr_ae filter_upwards [] with t change rowDot (if t < boundaryMinus u v / (boundaryPlus u v + boundaryMinus u v) then u + boundaryPlus u v • v else u - boundaryMinus u v • v) (if t < boundaryMinus u v / (boundaryPlus u v + boundaryMinus u v) then u + boundaryPlus u v • v else u - boundaryMinus u v • v) - rowDot u u = _ split_ifs <;> rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_seed_energy_increment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:278
theorem roundingStep_lottery_energy_increment Lemma roundingStep_lottery_energy_increment in the paper ↗

The two-seed squared-norm increase is reciprocal total weight times the actual basis size, giving the trace term needed for the phase energy budget. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
hne :
nullspaceBasis a q u ≠ []
(∫ seed₁, ∫ seed₂, rowDot (roundingStep a q u seed₁ seed₂) (roundingStep a q u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
= ((nullspaceBasis a q u).map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)).sum⁻¹ * (nullspaceBasis a q u).length
Proof (Lean source)
-- @node: roundingStep_lottery_energy_increment lemma roundingStep_lottery_energy_increment (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (hne : nullspaceBasis a q u ≠ []) : (∫ seed₁, ∫ seed₂, rowDot (roundingStep a q u seed₁ seed₂) (roundingStep a q u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) = ((nullspaceBasis a q u).map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)).sum⁻¹ * (nullspaceBasis a q u).length := by simp_rw [roundingStep_seed_energy_increment] rw [rounding_direction_reward_integral a q u (fun v => rowDot v v) hne] congr 1 have hunit : (nullspaceBasis a q u).map (fun v => rowDot v v) = (nullspaceBasis a q u).map (fun _ => (1 : ℝ)) := by apply List.map_congr_left intro v hv exact orderedOrtho_unit_length _ v hv rw [hunit] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_lottery_energy_increment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingLottery.lean:312
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingMoments 15 declarations Half-open uniform threshold sampling realizes the asymmetric boundary coin.

Fresh-seed boundary moments

Half-open uniform threshold sampling realizes the asymmetric boundary coin. Its coordinate mean and covariance are computed before integrating over the selected nullspace direction or the preceding seed history.

theorem uniform_threshold_integral Lemma uniform_threshold_integral in the paper ↗

A half-open uniform threshold has the prescribed two-point expectation, including thresholds at either endpoint of the unit interval. Under the stated conditions.

Formal statement
p x y :
ℝ
hp :
p ∈ Icc (0 : ℝ) 1
(∫ t, (if t < p then x else y) ∂volume.restrict (Icc (0 : ℝ) 1)) = p * x + (1 - p) * y
Proof (Lean source)
-- @node: uniform_threshold_integral lemma uniform_threshold_integral (p x y : ℝ) (hp : p ∈ Icc (0 : ℝ) 1) : (∫ t, (if t < p then x else y) ∂volume.restrict (Icc (0 : ℝ) 1)) = p * x + (1 - p) * y := by have hleft : Iio p ∩ Icc (0 : ℝ) 1 = Ico 0 p := by ext t simp only [mem_inter_iff, mem_Iio, mem_Icc, mem_Ico] constructor · rintro ⟨ht, h0, _⟩ exact ⟨h0, ht⟩ · rintro ⟨h0, ht⟩ exact ⟨ht, h0, ht.le.trans hp.2⟩ have hright : (Iio p)ᶜ ∩ Icc (0 : ℝ) 1 = Icc p 1 := by ext t simp only [mem_inter_iff, mem_compl_iff, mem_Iio, not_lt, mem_Icc] constructor · rintro ⟨ht, _, h1⟩ exact ⟨ht, h1⟩ · rintro ⟨ht, h1⟩ exact ⟨ht, hp.1.trans ht, h1⟩ change (∫ t, (Iio p).piecewise (fun _ => x) (fun _ => y) t ∂volume.restrict (Icc (0 : ℝ) 1)) = _ rw [integral_piecewise measurableSet_Iio (integrable_const x).integrableOn (integrable_const y).integrableOn] rw [Measure.restrict_restrict measurableSet_Iio, Measure.restrict_restrict measurableSet_Iio.compl, hleft, hright] simp [integral_const, measureReal_def, Real.volume_Ico, Real.volume_Icc, ENNReal.toReal_ofReal hp.1, ENNReal.toReal_ofReal (sub_nonneg.mpr hp.2)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.uniform_threshold_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:18
theorem uniform_threshold_integrable Lemma uniform_threshold_integrable in the paper ↗

A finite threshold coin is integrable under its fresh uniform seed. The asserted mathematical result follows.

Formal statement
p x y :
ℝ
Integrable (fun t => if t < p then x else y) (volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
-- @node: uniform_threshold_integrable lemma uniform_threshold_integrable (p x y : ℝ) : Integrable (fun t => if t < p then x else y) (volume.restrict (Icc (0 : ℝ) 1)) := by classical exact Integrable.piecewise measurableSet_Iio (integrable_const x).integrableOn (integrable_const y).integrableOn
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.uniform_threshold_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:49

The actual half-open asymmetric boundary coin preserves a coordinate mean. Under the stated conditions, the asserted mathematical result follows.

Formal statement
u v dp dm :
ℝ
hp :
0 < dp
hm :
0 < dm
(∫ t, (if t < dm / (dp + dm) then u + dp * v else u - dm * v) ∂volume.restrict (Icc (0 : ℝ) 1))
= u
Proof (Lean source)
-- @node: boundary_seed_mean lemma boundary_seed_mean (u v dp dm : ℝ) (hp : 0 < dp) (hm : 0 < dm) : (∫ t, (if t < dm / (dp + dm) then u + dp * v else u - dm * v) ∂volume.restrict (Icc (0 : ℝ) 1)) = u := by rw [uniform_threshold_integral _ _ _ ⟨(boundary_coin_probability dp dm hp hm).1.le, (boundary_coin_probability dp dm hp hm).2.le⟩] have hzero := boundary_coin_mean_zero dp dm hp hm nlinarith [show (dm / (dp + dm) * dp + (1 - dm / (dp + dm)) * (-dm)) * v = 0 by rw [hzero, zero_mul]]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundary_seed_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:58
theorem boundary_seed_covariance Lemma boundary_seed_covariance in the paper ↗

The centered boundary increment has the roadmap's exact coordinate covariance. Under the stated conditions.

Formal statement
v w dp dm :
ℝ
hp :
0 < dp
hm :
0 < dm
(∫ t, (if t < dm / (dp + dm) then (dp * v) * (dp * w) else (-dm * v) * (-dm * w)) ∂volume.restrict (Icc (0 : ℝ) 1))
= dp * dm * v * w
Proof (Lean source)
-- @node: boundary_seed_covariance lemma boundary_seed_covariance (v w dp dm : ℝ) (hp : 0 < dp) (hm : 0 < dm) : (∫ t, (if t < dm / (dp + dm) then (dp * v) * (dp * w) else (-dm * v) * (-dm * w)) ∂volume.restrict (Icc (0 : ℝ) 1)) = dp * dm * v * w := by rw [uniform_threshold_integral _ _ _ ⟨(boundary_coin_probability dp dm hp hm).1.le, (boundary_coin_probability dp dm hp hm).2.le⟩] calc _ = (dm / (dp + dm) * dp ^ 2 + (1 - dm / (dp + dm)) * (-dm) ^ 2) * v * w := by ring _ = dp * dm * v * w := by rw [boundary_coin_second_moment dp dm hp hm]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundary_seed_covariance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:70

A fresh terminal coin preserves the current fractional coordinate. Under the stated conditions.

Formal statement
u :
ℝ
hu :
|u| ≤ 1
(∫ t, (if t < (1 + u) / 2 then (1 : ℝ) else -1) ∂volume.restrict (Icc (0 : ℝ) 1)) = u
Proof (Lean source)
-- @node: terminal_seed_mean lemma terminal_seed_mean (u : ℝ) (hu : |u| ≤ 1) : (∫ t, (if t < (1 + u) / 2 then (1 : ℝ) else -1) ∂volume.restrict (Icc (0 : ℝ) 1)) = u := by have hp : (1 + u) / 2 ∈ Icc (0 : ℝ) 1 := by obtain ⟨hl, hr⟩ := abs_le.mp hu constructor <;> linarith rw [uniform_threshold_integral _ _ _ hp] exact terminal_coin_mean u
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_seed_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:84
theorem terminal_seed_increment_second_moment Lemma terminal_seed_increment_second_moment in the paper ↗

A fresh terminal increment has variance one minus the current square. Under the stated conditions.

Formal statement
u :
ℝ
hu :
|u| ≤ 1
(∫ t, (if t < (1 + u) / 2 then (1 - u) ^ 2 else (-1 - u) ^ 2) ∂volume.restrict (Icc (0 : ℝ) 1))
= 1 - u ^ 2
Proof (Lean source)
-- @node: terminal_seed_increment_second_moment lemma terminal_seed_increment_second_moment (u : ℝ) (hu : |u| ≤ 1) : (∫ t, (if t < (1 + u) / 2 then (1 - u) ^ 2 else (-1 - u) ^ 2) ∂volume.restrict (Icc (0 : ℝ) 1)) = 1 - u ^ 2 := by have hp : (1 + u) / 2 ∈ Icc (0 : ℝ) 1 := by obtain ⟨hl, hr⟩ := abs_le.mp hu constructor <;> linarith rw [uniform_threshold_integral _ _ _ hp] exact terminal_coin_increment_second_moment u
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_seed_increment_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:95
theorem rounding_selected_direction_mem Lemma rounding_selected_direction_mem in the paper ↗

The constructed finite sampler selects a genuine nullspace basis vector. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
seed :
ℝ
hne :
nullspaceBasis a q u ≠ []
bs :
ws :
bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)
inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed ∈ bs
Proof (Lean source)
-- @node: rounding_selected_direction_mem lemma rounding_selected_direction_mem (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (seed : ℝ) (hne : nullspaceBasis a q u ≠ []) : let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed ∈ bs := by dsimp only let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let xs := bs.zip (ws.map (fun w => w / ws.sum)) have hlen : (ws.map (fun w => w / ws.sum)).length = bs.length := by simp [ws] have hxne : xs ≠ [] := by intro hz have hl : xs.length = bs.length := by simp [xs, hlen] rw [hz] at hl exact hne (by simpa using hl.symm) have hfst : xs.map fst = bs := List.map_fst_zip hlen.ge change inverseCDF xs seed ∈ bs rw [← hfst] exact inverseCDF_mem_directions xs hxne seed
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.rounding_selected_direction_mem · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:106

The actual boundary step preserves each coordinate mean conditional on the entire current state and the selected direction seed. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
seed₁ :
ℝ
i :
Fin n
(∫ seed₂, roundingStep a q u seed₁ seed₂ i ∂volume.restrict (Icc (0 : ℝ) 1)) = u i
Proof (Lean source)
-- @node: roundingStep_seed_mean lemma roundingStep_seed_mean (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (seed₁ : ℝ) (i : Fin n) : (∫ seed₂, roundingStep a q u seed₁ seed₂ i ∂volume.restrict (Icc (0 : ℝ) 1)) = u i := by let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ by_cases he : bs = [] · simp [roundingStep, show nullspaceBasis a q u = [] from he, inverseCDF, integral_const, measureReal_def, Real.volume_Icc] · have hv : v ∈ bs := rounding_selected_direction_mem a q u seed₁ he have hs : ∀ j, v j ≠ 0 → |u j| < 1 := by intro j hj by_contra hn exact hj (nullspaceBasis_active_support a q u v hv j hn) have hn : v ≠ 0 := orderedOrtho_nonzero _ v hv simp only [roundingStep, ite_apply, Pi.add_apply, Pi.sub_apply, Pi.smul_apply, smul_eq_mul] change (∫ t, (if t < boundaryMinus u v / (boundaryPlus u v + boundaryMinus u v) then u i + boundaryPlus u v * v i else u i - boundaryMinus u v * v i) ∂volume.restrict (Icc (0 : ℝ) 1)) = u i exact boundary_seed_mean (u i) (v i) _ _ (boundaryPlus_pos u v hs hn) (boundaryMinus_pos u v hs hn)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_seed_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:128
theorem roundingStep_seed_integrable Lemma roundingStep_seed_integrable in the paper ↗

Each coordinate of the actual boundary step is integrable over its coin seed.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
seed₁ :
ℝ
i :
Fin n
Integrable (fun seed₂ => roundingStep a q u seed₁ seed₂ i) (volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
-- @node: roundingStep_seed_integrable lemma roundingStep_seed_integrable (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (seed₁ : ℝ) (i : Fin n) : Integrable (fun seed₂ => roundingStep a q u seed₁ seed₂ i) (volume.restrict (Icc (0 : ℝ) 1)) := by simp only [roundingStep, ite_apply, Pi.add_apply, Pi.sub_apply, Pi.smul_apply, smul_eq_mul] exact uniform_threshold_integrable _ _ _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_seed_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:154
theorem roundingStep_seed_covariance Lemma roundingStep_seed_covariance in the paper ↗

The actual direction-conditioned increment covariance is the boundary-distance product times the selected direction's outer product.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
seed₁ :
ℝ
i j :
Fin n
bs :
ws :
bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)
v :
inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁
(∫ seed₂, (roundingStep a q u seed₁ seed₂ i - u i) * (roundingStep a q u seed₁ seed₂ j - u j) ∂volume.restrict (Icc (0 : ℝ) 1))
= boundaryPlus u v * boundaryMinus u v * v i * v j
Proof (Lean source)
-- @node: roundingStep_seed_covariance lemma roundingStep_seed_covariance (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (seed₁ : ℝ) (i j : Fin n) : let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ (∫ seed₂, (roundingStep a q u seed₁ seed₂ i - u i) * (roundingStep a q u seed₁ seed₂ j - u j) ∂volume.restrict (Icc (0 : ℝ) 1)) = boundaryPlus u v * boundaryMinus u v * v i * v j := by dsimp only let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ change (∫ seed₂, (roundingStep a q u seed₁ seed₂ i - u i) * (roundingStep a q u seed₁ seed₂ j - u j) ∂volume.restrict (Icc (0 : ℝ) 1)) = boundaryPlus u v * boundaryMinus u v * v i * v j by_cases he : bs = [] · have hv : v = 0 := by simp [v, ws, he, inverseCDF] simp [roundingStep, show nullspaceBasis a q u = [] from he, inverseCDF, hv] · have hv : v ∈ bs := rounding_selected_direction_mem a q u seed₁ he have hs : ∀ k, v k ≠ 0 → |u k| < 1 := by intro k hk by_contra hn exact hk (nullspaceBasis_active_support a q u v hv k hn) have hn : v ≠ 0 := orderedOrtho_nonzero _ v hv have hcoin := boundary_seed_covariance (v i) (v j) (boundaryPlus u v) (boundaryMinus u v) (boundaryPlus_pos u v hs hn) (boundaryMinus_pos u v hs hn) rw [← hcoin] apply integral_congr_ae filter_upwards [] with t simp only [roundingStep, ite_apply, Pi.add_apply, Pi.sub_apply, Pi.smul_apply, smul_eq_mul] change ((if t < boundaryMinus u v / (boundaryPlus u v + boundaryMinus u v) then u i + boundaryPlus u v * v i else u i - boundaryMinus u v * v i) - u i) * ((if t < boundaryMinus u v / (boundaryPlus u v + boundaryMinus u v) then u j + boundaryPlus u v * v j else u j - boundaryMinus u v * v j) - u j) = _ split_ifs <;> ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_seed_covariance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:163

Every padded phase move preserves each fractional coordinate's mean under its fresh coin seed, including terminal and already-finished branches. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ :
ℝ
j :
Fin n
hu :
∀ i, |st.1 i| ≤ 1
(∫ seed₂, (phaseMove a st seed₁ seed₂).1 j ∂volume.restrict (Icc (0 : ℝ) 1)) = st.1 j
Proof (Lean source)
-- @node: phaseMove_seed_mean lemma phaseMove_seed_mean (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (seed₁ : ℝ) (j : Fin n) (hu : ∀ i, |st.1 i| ≤ 1) : (∫ seed₂, (phaseMove a st seed₁ seed₂).1 j ∂volume.restrict (Icc (0 : ℝ) 1)) = st.1 j := by by_cases hsmall : (activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3 · simp only [phaseMove, if_pos hsmall] cases ha : activeIndices st.1 with | nil => simp [integral_const, measureReal_def, Real.volume_Icc] | cons i is => by_cases hj : j = i · subst j simpa using terminal_seed_mean (st.1 i) (hu i) · simp [hj, integral_const, measureReal_def, Real.volume_Icc] · simpa only [phaseMove, if_neg hsmall] using roundingStep_seed_mean a (if (activeIndices st.1).length ≤ st.2.1 then (activeIndices st.1).length / 4 else st.2.2) st.1 seed₁ j
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_seed_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:204
theorem phaseMove_seed_integrable Lemma phaseMove_seed_integrable in the paper ↗

Every phase-move coordinate is integrable over its fresh coin seed. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ :
ℝ
j :
Fin n
Integrable (fun seed₂ => (phaseMove a st seed₁ seed₂).1 j) (volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
-- @node: phaseMove_seed_integrable lemma phaseMove_seed_integrable (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (seed₁ : ℝ) (j : Fin n) : Integrable (fun seed₂ => (phaseMove a st seed₁ seed₂).1 j) (volume.restrict (Icc (0 : ℝ) 1)) := by by_cases hsmall : (activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3 · simp only [phaseMove, if_pos hsmall] cases ha : activeIndices st.1 with | nil => simp | cons i is => by_cases hj : j = i · subst j simpa using uniform_threshold_integrable ((1 + st.1 i) / 2) 1 (-1) · simp [hj] · simpa only [phaseMove, if_neg hsmall] using roundingStep_seed_integrable a (if (activeIndices st.1).length ≤ st.2.1 then (activeIndices st.1).length / 4 else st.2.2) st.1 seed₁ j
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_seed_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:229
theorem roundingIteration_eq_of_seed_prefix

The first k moves depend only on their first 2k seeds. This is the finite-history property needed when integrating the next independent coin. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds seeds' :
k :
ℕ
hseed :
∀ h
if
h < 2 * k
then
roundingSeed seeds h = roundingSeed seeds' h
roundingIteration a seeds k = roundingIteration a seeds' k
Proof (Lean source)
-- @node: roundingIteration_eq_of_seed_prefix lemma roundingIteration_eq_of_seed_prefix (a : Fin (n / 4) → Fin n → ℝ) (seeds seeds' : RoundingSeeds n) (k : ℕ) (hseed : ∀ h, h < 2 * k → roundingSeed seeds h = roundingSeed seeds' h) : roundingIteration a seeds k = roundingIteration a seeds' k := by induction k with | zero => rfl | succ k ih => have hs := ih (fun h hh => hseed h (by omega)) simp only [roundingIteration, hs, hseed (2 * k) (by omega), hseed (2 * k + 1) (by omega)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_eq_of_seed_prefix · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:250
theorem roundingIteration_update_future

Changing a future seed cannot change the current fractional state. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
j :
Fin (3 * n)
t :
ℝ
hj :
2 * k ≤ j.val
roundingIteration a (update seeds j t) k = roundingIteration a seeds k
Proof (Lean source)
-- @node: roundingIteration_update_future lemma roundingIteration_update_future (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) (j : Fin (3 * n)) (t : ℝ) (hj : 2 * k ≤ j.val) : roundingIteration a (update seeds j t) k = roundingIteration a seeds k := by apply roundingIteration_eq_of_seed_prefix intro h hh by_cases hb : h < 3 * n · have hne : (⟨h, hb⟩ : Fin (3 * n)) ≠ j := by intro he have hv := congrArg val he dsimp at hv omega simp [roundingSeed, hb, hne] · simp [roundingSeed, hb]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_update_future · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:264
theorem roundingIteration_next_coin_mean

Integrating the next actual coin, while holding all other seeds fixed, returns the preceding fractional coordinate. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
hk :
k < n
i :
Fin n
(∫ t, (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 i ∂volume.restrict (Icc (0 : ℝ) 1))
= (roundingIteration a seeds k).1 i
Proof (Lean source)
-- @node: roundingIteration_next_coin_mean lemma roundingIteration_next_coin_mean (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) (hk : k < n) (i : Fin n) : (∫ t, (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 i ∂volume.restrict (Icc (0 : ℝ) 1)) = (roundingIteration a seeds k).1 i := by have hidx : 2 * k + 1 < 3 * n := by omega have hfirst : 2 * k < 3 * n := by omega have hne : (⟨2 * k, hfirst⟩ : Fin (3 * n)) ≠ ⟨2 * k + 1, hidx⟩ := by intro he have hv := congrArg val he dsimp at hv omega have hprev (t : ℝ) := roundingIteration_update_future a seeds k ⟨2 * k + 1, hidx⟩ t (by dsimp; omega) simp only [roundingIteration, hprev] simp only [roundingSeed, dif_pos hfirst, dif_pos hidx, Function.update_of_ne hne, Function.update_self] exact phaseMove_seed_mean a (roundingIteration a seeds k) (seeds ⟨2 * k, hfirst⟩) i (roundingIteration_cube_and_count a seeds k).1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_next_coin_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingMoments.lean:281
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingPhaseSums 21 declarations The deterministic halving estimate gives the total active-count allowance after any row loses protection.

Finite phase sums for ordered rounding

The deterministic halving estimate gives the total active-count allowance after any row loses protection. Orthogonal finite increments have additive second moments. Terminal single-coordinate rounding has the exact test-row variance and norm-energy increment required by the phase argument. The actual row seed iteration has centered increments and exact finite second-moment accumulation.

theorem halving_phase_sum_with_endpoint Lemma halving_phase_sum_with_endpoint in the paper ↗

Halving phase counts telescope, including the unused terminal endpoint. Under the stated conditions.

Formal statement
r :
ℕ → ℕ
m :
ℕ
hr :
∀ j < m, 2 * r (j + 1) ≤ r j
(∑ j ∈ range m, r j) + 2 * r m ≤ 2 * r 0
Proof (Lean source)
-- @node: halving_phase_sum_with_endpoint lemma halving_phase_sum_with_endpoint (r : ℕ → ℕ) (m : ℕ) (hr : ∀ j < m, 2 * r (j + 1) ≤ r j) : (∑ j ∈ range m, r j) + 2 * r m ≤ 2 * r 0 := by induction m with | zero => simp | succ m ih => have hprev := ih (fun j hj => hr j (by omega)) have hlast := hr m (by omega) rw [Finset.sum_range_succ] omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.halving_phase_sum_with_endpoint · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:20

A finite halving chain spends at most twice its initial active count. Under the stated conditions.

Formal statement
r :
ℕ → ℕ
m :
ℕ
hr :
∀ j < m, 2 * r (j + 1) ≤ r j
(∑ j ∈ range m, r j) ≤ 2 * r 0
Proof (Lean source)
-- @node: halving_phase_sum_le lemma halving_phase_sum_le (r : ℕ → ℕ) (m : ℕ) (hr : ∀ j < m, 2 * r (j + 1) ≤ r j) : (∑ j ∈ range m, r j) ≤ 2 * r 0 := by have h := halving_phase_sum_with_endpoint r m hr omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.halving_phase_sum_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:33
theorem unprotected_phase_sum_le Lemma unprotected_phase_sum_le in the paper ↗

Once a row is unprotected, the halving phase chain spends at most eight times its row index, and also at most twice the original sample size. Under the stated conditions.

Formal statement
r :
ℕ → ℕ
m n h :
ℕ
hr :
∀ j < m, 2 * r (j + 1) ≤ r j
hn :
r 0 ≤ n
hh :
r 0 < 4 * h
(∑ j ∈ range m, r j) ≤ 8 * min h n
Proof (Lean source)
-- @node: unprotected_phase_sum_le lemma unprotected_phase_sum_le (r : ℕ → ℕ) (m n h : ℕ) (hr : ∀ j < m, 2 * r (j + 1) ≤ r j) (hn : r 0 ≤ n) (hh : r 0 < 4 * h) : (∑ j ∈ range m, r j) ≤ 8 * min h n := by have hs := halving_phase_sum_le r m hr omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.unprotected_phase_sum_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:41
theorem unprotected_phase_variance_allowance Lemma unprotected_phase_variance_allowance in the paper ↗

The paper's constant 32 is the product of the phase variance allowance 4 and the deterministic unprotected-count allowance 8. Under the stated conditions.

Formal statement
r :
ℕ → ℕ
m n h :
ℕ
Λ :
ℝ
hr :
∀ j < m, 2 * r (j + 1) ≤ r j
hn :
r 0 ≤ n
hh :
r 0 < 4 * h
4 * Λ ^ 2 * (∑ j ∈ range m, (r j : ℝ)) ≤ 32 * Λ ^ 2 * (min h n : ℕ)
Proof (Lean source)
-- @node: unprotected_phase_variance_allowance lemma unprotected_phase_variance_allowance (r : ℕ → ℕ) (m n h : ℕ) (Λ : ℝ) (hr : ∀ j < m, 2 * r (j + 1) ≤ r j) (hn : r 0 ≤ n) (hh : r 0 < 4 * h) : 4 * Λ ^ 2 * (∑ j ∈ range m, (r j : ℝ)) ≤ 32 * Λ ^ 2 * (min h n : ℕ) := by have hs : (∑ j ∈ range m, (r j : ℝ)) ≤ 8 * (min h n : ℕ) := by exact_mod_cast unprotected_phase_sum_le r m n h hr hn hh have hm := mul_le_mul_of_nonneg_left hs (show 0 ≤ 4 * Λ ^ 2 by positivity) nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.unprotected_phase_variance_allowance · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:51
theorem finite_orthogonal_increment_second_moment Lemma finite_orthogonal_increment_second_moment in the paper ↗

Orthogonality to the preceding partial sum removes exactly the cross term in a finite second-moment expansion. Under the stated conditions.

Formal statement
Ω :
μ :
D :
ℕ → Ω → ℝ
m :
ℕ
hD :
∀ j < m, MemLp (D j) 2 μ
horth :
∀ j < m, (∫ ω, (∑ k ∈ range j, D k ω) * D j ω ∂μ) = 0
(∫ ω, (∑ j ∈ range m, D j ω) ^ 2 ∂μ) = ∑ j ∈ range m, ∫ ω, D j ω ^ 2 ∂μ
Proof (Lean source)
-- @node: finite_orthogonal_increment_second_moment lemma finite_orthogonal_increment_second_moment {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (D : ℕ → Ω → ℝ) (m : ℕ) (hD : ∀ j < m, MemLp (D j) 2 μ) (horth : ∀ j < m, (∫ ω, (∑ k ∈ range j, D k ω) * D j ω ∂μ) = 0) : (∫ ω, (∑ j ∈ range m, D j ω) ^ 2 ∂μ) = ∑ j ∈ range m, ∫ ω, D j ω ^ 2 ∂μ := by induction m with | zero => simp | succ m ih => have hprev := ih (fun j hj => hD j (by omega)) (fun j hj => horth j (by omega)) have hsum : MemLp (fun ω => ∑ j ∈ range m, D j ω) 2 μ := memLp_finsetSum _ (fun j hj => hD j (by have := Finset.mem_range.mp hj; omega)) have hj := hD m (by omega) have hexp (ω : Ω) : (∑ j ∈ range (m + 1), D j ω) ^ 2 = (∑ j ∈ range m, D j ω) ^ 2 + D m ω ^ 2 + 2 * ((∑ j ∈ range m, D j ω) * D m ω) := by rw [Finset.sum_range_succ] ring simp_rw [hexp] have hsqi := hsum.integrable_sq have hjqi := hj.integrable_sq have hprod : Integrable (fun ω => (∑ j ∈ range m, D j ω) * D m ω) μ := hsum.integrable_mul hj integral_linearity rw [horth m (by omega), mul_zero, add_zero, hprev, Finset.sum_range_succ]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_orthogonal_increment_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:64
theorem finite_phase_second_moment_le Lemma finite_phase_second_moment_le in the paper ↗

Finite orthogonal phase increments inherit the sum of their separate variance allowances. The increments and counts can be zero-padded. Under the stated conditions.

Formal statement
Ω :
μ :
D :
ℕ → Ω → ℝ
r :
ℕ → ℕ
m n h :
ℕ
Λ :
ℝ
hD :
∀ j < m, MemLp (D j) 2 μ
horth :
∀ j < m, (∫ ω, (∑ k ∈ range j, D k ω) * D j ω ∂μ) = 0
hphase :
∀ j < m, (∫ ω, D j ω ^ 2 ∂μ) ≤ 4 * Λ ^ 2 * r j
hr :
∀ j < m, 2 * r (j + 1) ≤ r j
hn :
r 0 ≤ n
hh :
r 0 < 4 * h
(∫ ω, (∑ j ∈ range m, D j ω) ^ 2 ∂μ) ≤ 32 * Λ ^ 2 * (min h n : ℕ)
Proof (Lean source)
-- @node: finite_phase_second_moment_le lemma finite_phase_second_moment_le {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (D : ℕ → Ω → ℝ) (r : ℕ → ℕ) (m n h : ℕ) (Λ : ℝ) (hD : ∀ j < m, MemLp (D j) 2 μ) (horth : ∀ j < m, (∫ ω, (∑ k ∈ range j, D k ω) * D j ω ∂μ) = 0) (hphase : ∀ j < m, (∫ ω, D j ω ^ 2 ∂μ) ≤ 4 * Λ ^ 2 * r j) (hr : ∀ j < m, 2 * r (j + 1) ≤ r j) (hn : r 0 ≤ n) (hh : r 0 < 4 * h) : (∫ ω, (∑ j ∈ range m, D j ω) ^ 2 ∂μ) ≤ 32 * Λ ^ 2 * (min h n : ℕ) := by rw [finite_orthogonal_increment_second_moment μ D m hD horth] calc _ ≤ ∑ j ∈ range m, 4 * Λ ^ 2 * (r j : ℝ) := Finset.sum_le_sum (fun j hj => hphase j (by simpa using hj)) _ = 4 * Λ ^ 2 * (∑ j ∈ range m, (r j : ℝ)) := by rw [Finset.mul_sum] _ ≤ _ := unprotected_phase_variance_allowance r m n h Λ hr hn hh
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_phase_second_moment_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:94
theorem cube_fresh_increment_orthogonal

A preceding seed-history statistic is orthogonal to a fresh centered increment. This is the conditional-mean argument used for padded moves and phases. Under the stated conditions.

Formal statement
m :
ℕ
j :
Fin m
A D :
Cube m → ℝ
hA :
hD :
hignore :
∀ x t, A (update x j t) = A x
hmean :
∀ x, (∫ t, D (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0
(∫ x, A x * D x ∂cubeMeasure m) = 0
Proof (Lean source)
-- @node: cube_fresh_increment_orthogonal lemma cube_fresh_increment_orthogonal {m : ℕ} (j : Fin m) (A D : Cube m → ℝ) (hA : MemLp A 2 (cubeMeasure m)) (hD : MemLp D 2 (cubeMeasure m)) (hignore : ∀ x t, A (update x j t) = A x) (hmean : ∀ x, (∫ t, D (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0) : (∫ x, A x * D x ∂cubeMeasure m) = 0 := by have he : (∫ x, A x * D x ∂cubeMeasure m) = ∫ _ : Cube m, (0 : ℝ) ∂cubeMeasure m := by apply cube_integral_eq_of_fresh_coordinate j _ _ (hA.integrable_mul hD) (integrable_zero _ _ _) · intro x change (∫ t, A (update x j t) * D (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0 simp_rw [hignore] rw [integral_const_mul, hmean x, mul_zero] · intro x t rfl simpa using he
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_fresh_increment_orthogonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:114
theorem random_phase_second_moment_le Lemma random_phase_second_moment_le in the paper ↗

Random realized phase counts obey the same pathwise halving budget before integration. This keeps the active-count bound inside the seed expectation. Under the stated conditions.

Formal statement
Ω :
D :
ℕ → Ω → ℝ
R :
ℕ → Ω → ℕ
m n h :
ℕ
Λ :
ℝ
hD :
∀ j < m, MemLp (D j) 2 μ
hR :
∀ j < m, Integrable (fun ω => (R j ω : ℝ)) μ
horth :
∀ j < m, (∫ ω, (∑ k ∈ range j, D k ω) * D j ω ∂μ) = 0
hphase :
∀ j < m, (∫ ω, D j ω ^ 2 ∂μ) ≤ 4 * Λ ^ 2 * ∫ ω, (R j ω : ℝ) ∂μ
hr :
∀ ω j
if
j < m
then
2 * R (j + 1) ω ≤ R j ω
hn :
∀ ω, R 0 ω ≤ n
hh :
∀ ω, R 0 ω < 4 * h
(∫ ω, (∑ j ∈ range m, D j ω) ^ 2 ∂μ) ≤ 32 * Λ ^ 2 * (min h n : ℕ)
Proof (Lean source)
-- @node: random_phase_second_moment_le lemma random_phase_second_moment_le {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (D : ℕ → Ω → ℝ) (R : ℕ → Ω → ℕ) (m n h : ℕ) (Λ : ℝ) (hD : ∀ j < m, MemLp (D j) 2 μ) (hR : ∀ j < m, Integrable (fun ω => (R j ω : ℝ)) μ) (horth : ∀ j < m, (∫ ω, (∑ k ∈ range j, D k ω) * D j ω ∂μ) = 0) (hphase : ∀ j < m, (∫ ω, D j ω ^ 2 ∂μ) ≤ 4 * Λ ^ 2 * ∫ ω, (R j ω : ℝ) ∂μ) (hr : ∀ ω j, j < m → 2 * R (j + 1) ω ≤ R j ω) (hn : ∀ ω, R 0 ω ≤ n) (hh : ∀ ω, R 0 ω < 4 * h) : (∫ ω, (∑ j ∈ range m, D j ω) ^ 2 ∂μ) ≤ 32 * Λ ^ 2 * (min h n : ℕ) := by rw [finite_orthogonal_increment_second_moment μ D m hD horth] have hi : Integrable (fun ω => ∑ j ∈ range m, (R j ω : ℝ)) μ := integrable_finsetSum _ (fun j hj => hR j (Finset.mem_range.mp hj)) have hcount : (∫ ω, ∑ j ∈ range m, (R j ω : ℝ) ∂μ) ≤ 8 * (min h n : ℕ) := by calc _ ≤ ∫ _ : Ω, (8 * (min h n : ℕ) : ℝ) ∂μ := by apply integral_mono hi (integrable_const _) intro ω change (∑ j ∈ range m, (R j ω : ℝ)) ≤ 8 * (min h n : ℕ) exact_mod_cast unprotected_phase_sum_le (fun j => R j ω) m n h (hr ω) (hn ω) (hh ω) _ = _ := by simp calc _ ≤ ∑ j ∈ range m, 4 * Λ ^ 2 * ∫ ω, (R j ω : ℝ) ∂μ := Finset.sum_le_sum (fun j hj => hphase j (Finset.mem_range.mp hj)) _ = 4 * Λ ^ 2 * (∫ ω, ∑ j ∈ range m, (R j ω : ℝ) ∂μ) := by rw [integral_finsetSum _ (fun j hj => hR j (Finset.mem_range.mp hj)), Finset.mul_sum] _ ≤ _ := by have hm := mul_le_mul_of_nonneg_left hcount (show 0 ≤ 4 * Λ ^ 2 by positivity) nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.random_phase_second_moment_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:137
theorem terminal_update_row_increment Lemma terminal_update_row_increment in the paper ↗

Updating one coordinate changes a test row by its coefficient times the single-coordinate increment. The asserted mathematical result follows.

Formal statement
n :
ℕ
u c :
Fin n → ℝ
i :
Fin n
b :
ℝ
rowDot c (update u i b - u) = c i * (b - u i)
Proof (Lean source)
-- @node: terminal_update_row_increment lemma terminal_update_row_increment {n : ℕ} (u c : Fin n → ℝ) (i : Fin n) (b : ℝ) : rowDot c (update u i b - u) = c i * (b - u i) := by classical have he : update u i b - u = (fun j => if j = i then b - u i else 0) := by funext j by_cases hj : j = i · subst j; simp · simp [hj] rw [he] simp [rowDot]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_update_row_increment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:174
theorem terminal_seed_row_second_moment Lemma terminal_seed_row_second_moment in the paper ↗

The actual terminal coordinate update contributes exactly its coefficient square times one minus the current coordinate square to the row variance. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
u c :
Fin n → ℝ
i :
Fin n
hu :
|u i| ≤ 1
(∫ t, rowDot c (update u i (if t < (1 + u i) / 2 then 1 else -1) - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1))
= c i ^ 2 * (1 - u i ^ 2)
Proof (Lean source)
-- @node: terminal_seed_row_second_moment lemma terminal_seed_row_second_moment {n : ℕ} (u c : Fin n → ℝ) (i : Fin n) (hu : |u i| ≤ 1) : (∫ t, rowDot c (update u i (if t < (1 + u i) / 2 then 1 else -1) - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1)) = c i ^ 2 * (1 - u i ^ 2) := by simp_rw [terminal_update_row_increment, mul_pow] have he (t : ℝ) : ((if t < (1 + u i) / 2 then (1 : ℝ) else -1) - u i) ^ 2 = if t < (1 + u i) / 2 then (1 - u i) ^ 2 else (-1 - u i) ^ 2 := by split_ifs <;> rfl simp_rw [he] rw [integral_const_mul, terminal_seed_increment_second_moment _ hu]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_seed_row_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:189
theorem terminal_seed_row_second_moment_le Lemma terminal_seed_row_second_moment_le in the paper ↗

Each terminal row increment spends at most one coefficient-square allowance. Under the stated conditions.

Formal statement
n :
ℕ
u c :
Fin n → ℝ
i :
Fin n
Λ :
ℝ
hu :
|u i| ≤ 1
hc :
|c i| ≤ Λ
(∫ t, rowDot c (update u i (if t < (1 + u i) / 2 then 1 else -1) - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1))
≤ Λ ^ 2
Proof (Lean source)
-- @node: terminal_seed_row_second_moment_le lemma terminal_seed_row_second_moment_le {n : ℕ} (u c : Fin n → ℝ) (i : Fin n) (Λ : ℝ) (hu : |u i| ≤ 1) (hc : |c i| ≤ Λ) : (∫ t, rowDot c (update u i (if t < (1 + u i) / 2 then 1 else -1) - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1)) ≤ Λ ^ 2 := by rw [terminal_seed_row_second_moment u c i hu] have hsq : c i ^ 2 ≤ Λ ^ 2 := by have hΛ := (abs_nonneg (c i)).trans hc simpa only [← pow_two, sq_abs] using mul_self_le_mul_self (abs_nonneg (c i)) hc nlinarith [sq_nonneg (u i), mul_nonneg (sq_nonneg (c i)) (sq_nonneg (u i))]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_seed_row_second_moment_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:204
theorem terminal_update_energy_increment Lemma terminal_update_energy_increment in the paper ↗

A single-coordinate terminal update changes norm energy only at that coordinate. The asserted mathematical result follows.

Formal statement
n :
ℕ
u :
Fin n → ℝ
i :
Fin n
b :
ℝ
rowDot (update u i b) (update u i b) - rowDot u u = b ^ 2 - u i ^ 2
Proof (Lean source)
-- @node: terminal_update_energy_increment lemma terminal_update_energy_increment {n : ℕ} (u : Fin n → ℝ) (i : Fin n) (b : ℝ) : rowDot (update u i b) (update u i b) - rowDot u u = b ^ 2 - u i ^ 2 := by classical change (∑ j, update u i b j * update u i b j) - (∑ j, u j * u j) = _ rw [← Finset.sum_sub_distrib] have he (j : Fin n) : update u i b j * update u i b j - u j * u j = if j = i then b ^ 2 - u i ^ 2 else 0 := by by_cases hj : j = i · subst j; simp [pow_two] · simp [hj] simp_rw [he] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_update_energy_increment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:217
theorem terminal_seed_energy_increment Lemma terminal_seed_energy_increment in the paper ↗

Every fresh terminal coin spends exactly one minus the current coordinate square in norm energy, independently of the threshold's asymmetry.

Formal statement
n :
ℕ
u :
Fin n → ℝ
i :
Fin n
(∫ t, rowDot (update u i (if t < (1 + u i) / 2 then 1 else -1)) (update u i (if t < (1 + u i) / 2 then 1 else -1)) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1))
= 1 - u i ^ 2
Proof (Lean source)
-- @node: terminal_seed_energy_increment lemma terminal_seed_energy_increment {n : ℕ} (u : Fin n → ℝ) (i : Fin n) : (∫ t, rowDot (update u i (if t < (1 + u i) / 2 then 1 else -1)) (update u i (if t < (1 + u i) / 2 then 1 else -1)) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1)) = 1 - u i ^ 2 := by simp_rw [terminal_update_energy_increment] have he (t : ℝ) : (if t < (1 + u i) / 2 then (1 : ℝ) else -1) ^ 2 = 1 := by split_ifs <;> norm_num simp_rw [he] simp [integral_const, measureReal_def, Real.volume_Icc]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_seed_energy_increment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:234
theorem terminal_seed_row_variance_energy_le Lemma terminal_seed_row_variance_energy_le in the paper ↗

Terminal moves satisfy the row variance-to-energy comparison with constant one. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
u c :
Fin n → ℝ
i :
Fin n
Λ :
ℝ
hu :
|u i| ≤ 1
hc :
|c i| ≤ Λ
(∫ t, rowDot c (update u i (if t < (1 + u i) / 2 then 1 else -1) - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1))
≤ Λ ^ 2 * (∫ t, rowDot (update u i (if t < (1 + u i) / 2 then 1 else -1)) (update u i (if t < (1 + u i) / 2 then 1 else -1)) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
-- @node: terminal_seed_row_variance_energy_le lemma terminal_seed_row_variance_energy_le {n : ℕ} (u c : Fin n → ℝ) (i : Fin n) (Λ : ℝ) (hu : |u i| ≤ 1) (hc : |c i| ≤ Λ) : (∫ t, rowDot c (update u i (if t < (1 + u i) / 2 then 1 else -1) - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1)) ≤ Λ ^ 2 * (∫ t, rowDot (update u i (if t < (1 + u i) / 2 then 1 else -1)) (update u i (if t < (1 + u i) / 2 then 1 else -1)) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1)) := by rw [terminal_seed_row_second_moment u c i hu, terminal_seed_energy_increment] have hsq : c i ^ 2 ≤ Λ ^ 2 := by simpa only [← pow_two, sq_abs] using mul_self_le_mul_self (abs_nonneg (c i)) hc have he : 0 ≤ 1 - u i ^ 2 := by have h := mul_self_le_mul_self (abs_nonneg (u i)) hu simp only [← pow_two, sq_abs, one_pow] at h linarith exact mul_le_mul_of_nonneg_right hsq he
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.terminal_seed_row_variance_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:247
theorem roundingIteration_coordinate_memLp

Every actual fractional coordinate has all finite moments, by cube preservation. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k :
ℕ
i :
Fin n
MemLp (fun seeds => (roundingIteration a seeds k).1 i) 2 (roundingSeedLaw n)
Proof (Lean source)
-- @node: roundingIteration_coordinate_memLp lemma roundingIteration_coordinate_memLp (a : Fin (n / 4) → Fin n → ℝ) (k : ℕ) (i : Fin n) : MemLp (fun seeds => (roundingIteration a seeds k).1 i) 2 (roundingSeedLaw n) := by have : IsFiniteMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw cubeMeasure infer_instance apply MemLp.of_bound (roundingIteration_coordinate_measurable a k i).aestronglyMeasurable 1 filter_upwards [] with seeds simpa only [Real.norm_eq_abs] using (roundingIteration_cube_and_count a seeds k).1 i
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_coordinate_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:268
theorem roundingIteration_row_memLp

A finite deterministic test row preserves square-integrability of the state.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
c :
Fin n → ℝ
k :
ℕ
MemLp (fun seeds => rowDot c (roundingIteration a seeds k).1) 2 (roundingSeedLaw n)
Proof (Lean source)
-- @node: roundingIteration_row_memLp lemma roundingIteration_row_memLp (a : Fin (n / 4) → Fin n → ℝ) (c : Fin n → ℝ) (k : ℕ) : MemLp (fun seeds => rowDot c (roundingIteration a seeds k).1) 2 (roundingSeedLaw n) := by unfold rowDot exact memLp_finsetSum _ (fun i _ => (roundingIteration_coordinate_memLp a k i).const_mul (c i))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_row_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:280
theorem roundingIteration_next_coordinate_increment_mean

Integrating the next fresh actual coin centers each coordinate increment. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
hk :
k < n
i :
Fin n
(∫ t, (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 i - (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) k).1 i ∂volume.restrict (Icc (0 : ℝ) 1))
= 0
Proof (Lean source)
-- @node: roundingIteration_next_coordinate_increment_mean lemma roundingIteration_next_coordinate_increment_mean (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) (hk : k < n) (i : Fin n) : (∫ t, (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 i - (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) k).1 i ∂volume.restrict (Icc (0 : ℝ) 1)) = 0 := by have hpost : Integrable (fun t => (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 i) (volume.restrict (Icc (0 : ℝ) 1)) := by apply Integrable.of_bound ((roundingIteration_coordinate_measurable a (k + 1) i).comp (by fun_prop : Measurable (fun t : ℝ => update seeds ⟨2 * k + 1, by omega⟩ t))).aestronglyMeasurable 1 filter_upwards [] with t simpa only [Real.norm_eq_abs, Function.comp_apply] using (roundingIteration_cube_and_count a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 i simp_rw [roundingIteration_update_future a seeds k (⟨2 * k + 1, by omega⟩ : Fin (3 * n)) _ (by dsimp; omega)] rw [integral_sub hpost (integrable_const _), roundingIteration_next_coin_mean a seeds k hk i] simp [integral_const, measureReal_def, Real.volume_Icc]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_next_coordinate_increment_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:288
theorem roundingIteration_next_row_increment_mean

The actual row increment has zero conditional mean under its fresh coin. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
c :
Fin n → ℝ
seeds :
k :
ℕ
hk :
k < n
(∫ t, rowDot c ((roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 - (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) k).1) ∂volume.restrict (Icc (0 : ℝ) 1))
= 0
Proof (Lean source)
-- @node: roundingIteration_next_row_increment_mean lemma roundingIteration_next_row_increment_mean (a : Fin (n / 4) → Fin n → ℝ) (c : Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) (hk : k < n) : (∫ t, rowDot c ((roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 - (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) k).1) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0 := by have hi (i : Fin n) : Integrable (fun t => c i * ((roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 i - (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) k).1 i)) (volume.restrict (Icc (0 : ℝ) 1)) := by apply Integrable.of_bound (by fun_prop) (2 * |c i|) filter_upwards [] with t rw [Real.norm_eq_abs, abs_mul] have hp := (roundingIteration_cube_and_count a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 i have hb := (roundingIteration_cube_and_count a (update seeds ⟨2 * k + 1, by omega⟩ t) k).1 i have hd := abs_sub ((roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 i) ((roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) k).1 i) nlinarith [abs_nonneg (c i)] simp only [rowDot, Pi.sub_apply] rw [integral_finsetSum _ (fun i _ => hi i)] simp_rw [integral_const_mul, roundingIteration_next_coordinate_increment_mean a seeds k hk] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_next_row_increment_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:312
theorem finite_increment_sum_telescope Lemma finite_increment_sum_telescope in the paper ↗

Finite increment sums telescope without any convergence or stopping-time theorem. The asserted mathematical result follows.

Formal statement
f :
ℕ → ℝ
m :
ℕ
(∑ k ∈ range m, (f (k + 1) - f k)) = f m - f 0
Proof (Lean source)
-- @node: finite_increment_sum_telescope lemma finite_increment_sum_telescope (f : ℕ → ℝ) (m : ℕ) : (∑ k ∈ range m, (f (k + 1) - f k)) = f m - f 0 := by induction m with | zero => simp | succ m ih => rw [Finset.sum_range_succ, ih]; ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_increment_sum_telescope · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:340
theorem roundingIteration_row_increment_orthogonal

Orthogonality holds for the actual row increments and the preceding fractional row. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
c :
Fin n → ℝ
k :
ℕ
hk :
k < n
(∫ seeds, rowDot c (roundingIteration a seeds k).1 * (rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) ∂roundingSeedLaw n)
= 0
Proof (Lean source)
-- @node: roundingIteration_row_increment_orthogonal lemma roundingIteration_row_increment_orthogonal (a : Fin (n / 4) → Fin n → ℝ) (c : Fin n → ℝ) (k : ℕ) (hk : k < n) : (∫ seeds, rowDot c (roundingIteration a seeds k).1 * (rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) ∂roundingSeedLaw n) = 0 := by apply cube_fresh_increment_orthogonal ⟨2 * k + 1, by omega⟩ _ _ (roundingIteration_row_memLp a c k) ((roundingIteration_row_memLp a c (k + 1)).sub (roundingIteration_row_memLp a c k)) · intro seeds t rw [roundingIteration_update_future a seeds k _ _ (by dsimp; omega)] · intro seeds change (∫ t, rowDot c (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) (k + 1)).1 - rowDot c (roundingIteration a (update seeds ⟨2 * k + 1, by omega⟩ t) k).1 ∂volume.restrict (Icc (0 : ℝ) 1)) = 0 simp_rw [show ∀ u v : Fin n → ℝ, rowDot c u - rowDot c v = rowDot c (u - v) from fun u v => (dotProduct_sub c u v).symm] exact roundingIteration_next_row_increment_mean a c seeds k hk
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_row_increment_orthogonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:348
theorem orderedBoundaryRounding_row_second_moment_sum

The constructed signing's second moment is exactly the finite sum of its move variances. The initial state is zero and the terminal state is the actual signing. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
c :
Fin n → ℝ
(∫ seeds, (∑ i, c i * sgn (orderedBoundaryRounding n a seeds i)) ^ 2 ∂roundingSeedLaw n)
= ∑ k ∈ range n, ∫ seeds, (rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) ^ 2 ∂roundingSeedLaw n
Proof (Lean source)
-- @node: orderedBoundaryRounding_row_second_moment_sum lemma orderedBoundaryRounding_row_second_moment_sum (a : Fin (n / 4) → Fin n → ℝ) (c : Fin n → ℝ) : (∫ seeds, (∑ i, c i * sgn (orderedBoundaryRounding n a seeds i)) ^ 2 ∂roundingSeedLaw n) = ∑ k ∈ range n, ∫ seeds, (rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) ^ 2 ∂roundingSeedLaw n := by have ht (seeds : RoundingSeeds n) (m : ℕ) : (∑ k ∈ range m, (rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1)) = rowDot c (roundingIteration a seeds m).1 := by rw [finite_increment_sum_telescope (fun k => rowDot c (roundingIteration a seeds k).1) m] simp [roundingIteration, rowDot] have he := finite_orthogonal_increment_second_moment (roundingSeedLaw n) (fun k seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) n (fun k _ => (roundingIteration_row_memLp a c (k + 1)).sub (roundingIteration_row_memLp a c k)) (fun k hk => by simp_rw [ht] exact roundingIteration_row_increment_orthogonal a c k hk) simp_rw [ht] at he rw [← he] congr 1 funext seeds congr 1 simp_rw [← roundingIteration_terminal_eq_sign a] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedBoundaryRounding_row_second_moment_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseSums.lean:370
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingPhaseTrace 15 declarations The retained prefix dominates one quarter of the active count on live moves.

Protected rows along the actual rounding trace

The retained prefix dominates one quarter of the active count on live moves. Consequently, row h cannot change until fewer than 4h coordinates remain active. These pathwise facts connect the actual iteration to the unprotected phase budget.

theorem roundingIteration_active_count_antitone

Active counts decrease monotonically along the actual seed realization.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
Antitone (fun k => (activeIndices (roundingIteration a seeds k).1).length)
Proof (Lean source)
-- @node: roundingIteration_active_count_antitone lemma roundingIteration_active_count_antitone (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) : Antitone (fun k => (activeIndices (roundingIteration a seeds k).1).length) := by apply antitone_nat_of_succ_le intro k have hp := (phaseMove_cube_and_count a (roundingIteration a seeds k) (roundingSeed seeds (2 * k)) (roundingSeed seeds (2 * k + 1)) (roundingIteration_cube_and_count a seeds k).1 (roundingIteration_retained_le_stop a seeds k)).2 exact hp.trans (sub_le _ _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_active_count_antitone · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:17
theorem phaseMove_live_prefix_invariant Lemma phaseMove_live_prefix_invariant in the paper ↗

A move preserves the lower bound on the retained prefix when its phase is live. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ seed₂ :
ℝ
hu :
∀ i, |st.1 i| ≤ 1
hq :
st.2.2 ≤ st.2.1
hn :
(activeIndices st.1).length ≤ n
hlive :
st.2.1 < (activeIndices st.1).length → (activeIndices st.1).length / 4 ≤ st.2.2
(phaseMove a st seed₁ seed₂).2.1 < (activeIndices (phaseMove a st seed₁ seed₂).1).length
(activeIndices (phaseMove a st seed₁ seed₂).1).length / 4
≤ (phaseMove a st seed₁ seed₂).2.2
Proof (Lean source)
-- @node: phaseMove_live_prefix_invariant lemma phaseMove_live_prefix_invariant (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (seed₁ seed₂ : ℝ) (hu : ∀ i, |st.1 i| ≤ 1) (hq : st.2.2 ≤ st.2.1) (hn : (activeIndices st.1).length ≤ n) (hlive : st.2.1 < (activeIndices st.1).length → (activeIndices st.1).length / 4 ≤ st.2.2) : (phaseMove a st seed₁ seed₂).2.1 < (activeIndices (phaseMove a st seed₁ seed₂).1).length → (activeIndices (phaseMove a st seed₁ seed₂).1).length / 4 ≤ (phaseMove a st seed₁ seed₂).2.2 := by have hp := (phaseMove_cube_and_count a st seed₁ seed₂ hu hq).2 have hmono : (activeIndices (phaseMove a st seed₁ seed₂).1).length ≤ (activeIndices st.1).length := hp.trans (sub_le _ _) by_cases hs : (activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3 · cases he : activeIndices st.1 with | nil => simp [phaseMove, hs, he] | cons i is => have hstop : (phaseMove a st seed₁ seed₂).2.1 = n := by dsimp only [phaseMove] rw [if_pos hs] simp only [he] rw [hstop] intro h omega · have he : (phaseMove a st seed₁ seed₂).2.2 = if (activeIndices st.1).length ≤ st.2.1 then (activeIndices st.1).length / 4 else st.2.2 := by simp [phaseMove, hs] rw [he] intro _ split_ifs with hnew · exact Nat.div_le_div_right hmono · exact (Nat.div_le_div_right hmono).trans (hlive (by omega))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_live_prefix_invariant · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:30
theorem roundingIteration_live_prefix_invariant

On a live actual phase, the retained prefix contains at least a quarter of its current active coordinates. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
(roundingIteration a seeds k).2.1 < (activeIndices (roundingIteration a seeds k).1).length
≤ (roundingIteration a seeds k).2.2
Proof (Lean source)
-- @node: roundingIteration_live_prefix_invariant lemma roundingIteration_live_prefix_invariant (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) : (roundingIteration a seeds k).2.1 < (activeIndices (roundingIteration a seeds k).1).length → (activeIndices (roundingIteration a seeds k).1).length / 4 ≤ (roundingIteration a seeds k).2.2 := by induction k with | zero => have hn := (roundingIteration_cube_and_count a seeds 0).2 intro h simp only [roundingIteration] at h hn omega | succ k ih => exact phaseMove_live_prefix_invariant a _ _ _ (roundingIteration_cube_and_count a seeds k).1 (roundingIteration_retained_le_stop a seeds k) ((roundingIteration_cube_and_count a seeds k).2.trans (sub_le _ _)) ih
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_live_prefix_invariant · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:68
theorem roundingIteration_protected_row_fixed

A supplied row stays fixed on a move with at least four times its row number active coordinates, whether that move starts a new phase or continues one. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
h :
Fin (n / 4)
hactive :
4 * (h.val + 1) ≤ (activeIndices (roundingIteration a seeds k).1).length
rowDot (a h) (roundingIteration a seeds (k + 1)).1
= rowDot (a h) (roundingIteration a seeds k).1
Proof (Lean source)
-- @node: roundingIteration_protected_row_fixed lemma roundingIteration_protected_row_fixed (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) (h : Fin (n / 4)) (hactive : 4 * (h.val + 1) ≤ (activeIndices (roundingIteration a seeds k).1).length) : rowDot (a h) (roundingIteration a seeds (k + 1)).1 = rowDot (a h) (roundingIteration a seeds k).1 := by let st := roundingIteration a seeds k have hs : ¬((activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3) := by dsimp only [st] omega have hret : h.val < (if (activeIndices st.1).length ≤ st.2.1 then (activeIndices st.1).length / 4 else st.2.2) := by split_ifs with hnew · dsimp only [st] omega · have hi := roundingIteration_live_prefix_invariant a seeds k (by change st.2.1 < (activeIndices st.1).length omega) dsimp only [st] at * omega change rowDot (a h) (phaseMove a st _ _).1 = rowDot (a h) st.1 simp only [phaseMove, if_neg hs] exact roundingStep_retained_row_fixed a _ st.1 _ _ h hret
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_protected_row_fixed · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:89
theorem roundingIteration_live_phase_metadata

While a phase is live, its stopping threshold and retained row count do not change on the next actual move. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
hlive :
(roundingIteration a seeds k).2.1 < (activeIndices (roundingIteration a seeds k).1).length
(roundingIteration a seeds (k + 1)).2 = (roundingIteration a seeds k).2
Proof (Lean source)
-- @node: roundingIteration_live_phase_metadata lemma roundingIteration_live_phase_metadata (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) (hlive : (roundingIteration a seeds k).2.1 < (activeIndices (roundingIteration a seeds k).1).length) : (roundingIteration a seeds (k + 1)).2 = (roundingIteration a seeds k).2 := by have hnew : ¬(activeIndices (roundingIteration a seeds k).1).length ≤ (roundingIteration a seeds k).2.1 := by omega simp [roundingIteration, phaseMove, hnew]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_live_phase_metadata · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:116
theorem roundingIteration_protected_row_zero

A supplied row is still zero at every actual state above its protection threshold, because all earlier states have at least as many active coordinates. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
h :
Fin (n / 4)
hactive :
4 * (h.val + 1) ≤ (activeIndices (roundingIteration a seeds k).1).length
rowDot (a h) (roundingIteration a seeds k).1 = 0
Proof (Lean source)
-- @node: roundingIteration_protected_row_zero lemma roundingIteration_protected_row_zero (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) (h : Fin (n / 4)) (hactive : 4 * (h.val + 1) ≤ (activeIndices (roundingIteration a seeds k).1).length) : rowDot (a h) (roundingIteration a seeds k).1 = 0 := by induction k with | zero => simp [roundingIteration, rowDot] | succ k ih => have hk : 4 * (h.val + 1) ≤ (activeIndices (roundingIteration a seeds k).1).length := hactive.trans (roundingIteration_active_count_antitone a seeds (le_succ k)) rw [roundingIteration_protected_row_fixed a seeds k h hk] exact ih hk
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_protected_row_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:128
theorem roundingIteration_numbered_protected_row_fixed

The paper's one-based row numbering has the same protection threshold, even for rows beyond the supplied prefix (whose protection premise is impossible). Under the stated conditions.

Formal statement
n :
ℕ
shared
rows :
ℕ → Fin n → ℝ
seeds :
k h :
ℕ
hh :
1 ≤ h
hactive :
4 * h ≤ (activeIndices (roundingIteration (rowPrefix rows) seeds k).1).length
rowDot (rows h) (roundingIteration (rowPrefix rows) seeds (k + 1)).1
= rowDot (rows h) (roundingIteration (rowPrefix rows) seeds k).1
Proof (Lean source)
-- @node: roundingIteration_numbered_protected_row_fixed lemma roundingIteration_numbered_protected_row_fixed (rows : ℕ → Fin n → ℝ) (seeds : RoundingSeeds n) (k h : ℕ) (hh : 1 ≤ h) (hactive : 4 * h ≤ (activeIndices (roundingIteration (rowPrefix rows) seeds k).1).length) : rowDot (rows h) (roundingIteration (rowPrefix rows) seeds (k + 1)).1 = rowDot (rows h) (roundingIteration (rowPrefix rows) seeds k).1 := by have hn := (roundingIteration_cube_and_count (rowPrefix rows) seeds k).2 have hprefix : h - 1 < n / 4 := by omega have he : (h - 1) + 1 = h := by omega simpa only [rowPrefix, he] using roundingIteration_protected_row_fixed (rowPrefix rows) seeds k ⟨h - 1, hprefix⟩ (by simpa only [he] using hactive)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_numbered_protected_row_fixed · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:144
theorem roundingIteration_unprotected_row_increment

Protection can be represented by a zero-padded increment supported precisely on the unprotected active-count event. Under the stated conditions.

Formal statement
n :
ℕ
shared
rows :
ℕ → Fin n → ℝ
seeds :
k h :
ℕ
hh :
1 ≤ h
rowDot (rows h) (fun i => (roundingIteration (rowPrefix rows) seeds (k + 1)).1 i - (roundingIteration (rowPrefix rows) seeds k).1 i)
= if (activeIndices (roundingIteration (rowPrefix rows) seeds k).1).length < 4 * h then rowDot (rows h) (fun i => (roundingIteration (rowPrefix rows) seeds (k + 1)).1 i - (roundingIteration (rowPrefix rows) seeds k).1 i) else 0
Proof (Lean source)
-- @node: roundingIteration_unprotected_row_increment lemma roundingIteration_unprotected_row_increment (rows : ℕ → Fin n → ℝ) (seeds : RoundingSeeds n) (k h : ℕ) (hh : 1 ≤ h) : rowDot (rows h) (fun i => (roundingIteration (rowPrefix rows) seeds (k + 1)).1 i - (roundingIteration (rowPrefix rows) seeds k).1 i) = if (activeIndices (roundingIteration (rowPrefix rows) seeds k).1).length < 4 * h then rowDot (rows h) (fun i => (roundingIteration (rowPrefix rows) seeds (k + 1)).1 i - (roundingIteration (rowPrefix rows) seeds k).1 i) else 0 := by split_ifs with hsmall · rfl · change dotProduct (rows h) (_ - _) = 0 rw [dotProduct_sub] exact sub_eq_zero.mpr (roundingIteration_numbered_protected_row_fixed rows seeds k h hh (by omega))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_unprotected_row_increment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:159
theorem roundingIteration_active_count_measurable

The actual active count is a Borel statistic of the seeds. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k :
ℕ
Proof (Lean source)
@[fun_prop] -- @node: roundingIteration_active_count_measurable lemma roundingIteration_active_count_measurable (a : Fin (n / 4) → Fin n → ℝ) (k : ℕ) : Measurable (fun seeds : RoundingSeeds n => (activeIndices (roundingIteration a seeds k).1).length) := by have hu : Measurable (fun seeds : RoundingSeeds n => (roundingIteration a seeds k).1) := by fun_prop exact activeIndices_consumer_measurable _ hu (fun _ cs => cs.length) (fun _ => measurable_const)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_active_count_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:178
theorem roundingIteration_unprotected_event_measurable

The event that a numbered row is unprotected before a move is Borel. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k h :
ℕ
MeasurableSet {seeds : RoundingSeeds n | (activeIndices (roundingIteration a seeds k).1).length < 4 * h}
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_unprotected_event_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:189
theorem roundingIteration_unprotected_event_predictable

Protection is decided before either fresh seed used by the next move is read. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k h :
ℕ
j :
Fin (3 * n)
hj :
2 * k ≤ j.val
seeds :
t :
ℝ
((activeIndices (roundingIteration a (update seeds j t) k).1).length < 4 * h)
↔ (activeIndices (roundingIteration a seeds k).1).length < 4 * h
Proof (Lean source)
-- @node: roundingIteration_unprotected_event_predictable lemma roundingIteration_unprotected_event_predictable (a : Fin (n / 4) → Fin n → ℝ) (k h : ℕ) (j : Fin (3 * n)) (hj : 2 * k ≤ j.val) (seeds : RoundingSeeds n) (t : ℝ) : ((activeIndices (roundingIteration a (update seeds j t) k).1).length < 4 * h) ↔ (activeIndices (roundingIteration a seeds k).1).length < 4 * h := by rw [roundingIteration_update_future a seeds k j t hj]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_unprotected_event_predictable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:196
theorem roundingIteration_unprotected_persistent

Once a row is unprotected it remains so; the selected moves form a terminal interval of the actual trace. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k l h :
ℕ
hkl :
k ≤ l
hk :
(activeIndices (roundingIteration a seeds k).1).length < 4 * h
(activeIndices (roundingIteration a seeds l).1).length < 4 * h
Proof (Lean source)
-- @node: roundingIteration_unprotected_persistent lemma roundingIteration_unprotected_persistent (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k l h : ℕ) (hkl : k ≤ l) (hk : (activeIndices (roundingIteration a seeds k).1).length < 4 * h) : (activeIndices (roundingIteration a seeds l).1).length < 4 * h := by exact (roundingIteration_active_count_antitone a seeds hkl).trans_lt hk
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_unprotected_persistent · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:205
theorem orderedBoundaryRounding_unprotected_second_moment_sum

The final row second moment is exactly the sum over its unprotected moves. This specializes the proved martingale identity to the paper's actual trace. Under the stated conditions.

Formal statement
n :
ℕ
shared
rows :
ℕ → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
(∫ seeds, (∑ i, rows h i * sgn (orderedBoundaryRounding n (rowPrefix rows) seeds i)) ^ 2 ∂roundingSeedLaw n)
= ∑ k ∈ range n, ∫ seeds, (indicator {seeds | (activeIndices (roundingIteration (rowPrefix rows) seeds k).1).length < 4 * h} (fun seeds => rowDot (rows h) (fun i => (roundingIteration (rowPrefix rows) seeds (k + 1)).1 i - (roundingIteration (rowPrefix rows) seeds k).1 i)) seeds) ^ 2 ∂roundingSeedLaw n
Proof (Lean source)
-- @node: orderedBoundaryRounding_unprotected_second_moment_sum lemma orderedBoundaryRounding_unprotected_second_moment_sum (rows : ℕ → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) : (∫ seeds, (∑ i, rows h i * sgn (orderedBoundaryRounding n (rowPrefix rows) seeds i)) ^ 2 ∂roundingSeedLaw n) = ∑ k ∈ range n, ∫ seeds, (indicator {seeds | (activeIndices (roundingIteration (rowPrefix rows) seeds k).1).length < 4 * h} (fun seeds => rowDot (rows h) (fun i => (roundingIteration (rowPrefix rows) seeds (k + 1)).1 i - (roundingIteration (rowPrefix rows) seeds k).1 i)) seeds) ^ 2 ∂roundingSeedLaw n := by rw [orderedBoundaryRounding_row_second_moment_sum] apply Finset.sum_congr rfl intro k _ apply integral_congr_ae filter_upwards [] with seeds by_cases hs : (activeIndices (roundingIteration (rowPrefix rows) seeds k).1).length < 4 * h · simp only [indicator, Set.mem_setOf_eq, hs, if_true] congr 1 change dotProduct (rows h) _ - dotProduct (rows h) _ = dotProduct (rows h) (_ - _) exact (dotProduct_sub _ _ _).symm · have he := roundingIteration_numbered_protected_row_fixed rows seeds k h hh (by omega) simp only [indicator, Set.mem_setOf_eq, hs, if_false, he, sub_self]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedBoundaryRounding_unprotected_second_moment_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:214
theorem roundingIteration_new_phase_metadata

A nonterminal refresh records exactly the paper's halving threshold and quarter-prefix length for its realized starting active count. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
hnew :
(activeIndices (roundingIteration a seeds k).1).length ≤ (roundingIteration a seeds k).2.1
hlarge :
4 ≤ (activeIndices (roundingIteration a seeds k).1).length
(roundingIteration a seeds (k + 1)).2
= ((activeIndices (roundingIteration a seeds k).1).length / 2, (activeIndices (roundingIteration a seeds k).1).length / 4)
Proof (Lean source)
-- @node: roundingIteration_new_phase_metadata lemma roundingIteration_new_phase_metadata (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) (hnew : (activeIndices (roundingIteration a seeds k).1).length ≤ (roundingIteration a seeds k).2.1) (hlarge : 4 ≤ (activeIndices (roundingIteration a seeds k).1).length) : (roundingIteration a seeds (k + 1)).2 = ((activeIndices (roundingIteration a seeds k).1).length / 2, (activeIndices (roundingIteration a seeds k).1).length / 4) := by have hs : ¬((activeIndices (roundingIteration a seeds k).1).length ≤ (roundingIteration a seeds k).2.1 ∧ (activeIndices (roundingIteration a seeds k).1).length ≤ 3) := by omega change (phaseMove a (roundingIteration a seeds k) _ _).2 = _ simp only [phaseMove, if_neg hs, if_pos hnew]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_new_phase_metadata · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:241
theorem roundingIteration_phase_end_halves

Keeping a refreshed phase's metadata until its threshold is reached gives an actual active count at most half that phase's starting count. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k l :
ℕ
hnew :
(activeIndices (roundingIteration a seeds k).1).length ≤ (roundingIteration a seeds k).2.1
hlarge :
4 ≤ (activeIndices (roundingIteration a seeds k).1).length
hmetadata :
(roundingIteration a seeds l).2 = (roundingIteration a seeds (k + 1)).2
hend :
(activeIndices (roundingIteration a seeds l).1).length ≤ (roundingIteration a seeds l).2.1
Proof (Lean source)
-- @node: roundingIteration_phase_end_halves lemma roundingIteration_phase_end_halves (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k l : ℕ) (hnew : (activeIndices (roundingIteration a seeds k).1).length ≤ (roundingIteration a seeds k).2.1) (hlarge : 4 ≤ (activeIndices (roundingIteration a seeds k).1).length) (hmetadata : (roundingIteration a seeds l).2 = (roundingIteration a seeds (k + 1)).2) (hend : (activeIndices (roundingIteration a seeds l).1).length ≤ (roundingIteration a seeds l).2.1) : 2 * (activeIndices (roundingIteration a seeds l).1).length ≤ (activeIndices (roundingIteration a seeds k).1).length := by have he := roundingIteration_new_phase_metadata a seeds k hnew hlarge rw [hmetadata, he] at hend omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_phase_end_halves · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingPhaseTrace.lean:258
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingProjection 15 declarations Ordered Gram--Schmidt produces orthogonal unit directions.

Projection contraction for the constructed rounding basis

Ordered Gram--Schmidt produces orthogonal unit directions. Its residual energy identity bounds the basis quadratic form by the active-coordinate row energy.

theorem removeProjections_rowDot Lemma removeProjections_rowDot in the paper ↗

Dotting a finite projection residual distributes over its basis list.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v b :
Fin n → ℝ
= rowDot v b - (bs.map (fun c => rowDot v c * rowDot c b)).sum
Proof (Lean source)
-- @node: removeProjections_rowDot lemma removeProjections_rowDot (bs : List (Fin n → ℝ)) (v b : Fin n → ℝ) : rowDot (removeProjections bs v) b = rowDot v b - (bs.map (fun c => rowDot v c * rowDot c b)).sum := by induction bs with | nil => simp [removeProjections_nil] | cons c bs ih => have he : removeProjections (c :: bs) v = removeProjections bs v - rowDot v c • c := by funext i simp only [removeProjections, List.map_cons, List.sum_cons, Pi.sub_apply, Pi.smul_apply, smul_eq_mul] ring rw [he] change dotProduct (removeProjections bs v - rowDot v c • c) b = _ rw [sub_dotProduct, smul_dotProduct] change rowDot (removeProjections bs v) b - rowDot v c * rowDot c b = _ rw [ih] simp only [List.map_cons, List.sum_cons] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.removeProjections_rowDot · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:17
theorem orthogonal_list_coefficient Lemma orthogonal_list_coefficient in the paper ↗

An orthogonal unit list extracts the coefficient of each member exactly. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
ho :
bs.Pairwise (fun b c => rowDot b c = 0)
hu :
∀ b ∈ bs, rowDot b b = 1
v :
Fin n → ℝ
b ∈ bs :
(bs.map (fun c => rowDot v c * rowDot c b)).sum = rowDot v b
Proof (Lean source)
-- @node: orthogonal_list_coefficient lemma orthogonal_list_coefficient (bs : List (Fin n → ℝ)) (ho : bs.Pairwise (fun b c => rowDot b c = 0)) (hu : ∀ b ∈ bs, rowDot b b = 1) (v : Fin n → ℝ) : ∀ b ∈ bs, (bs.map (fun c => rowDot v c * rowDot c b)).sum = rowDot v b := by induction bs with | nil => simp | cons c bs ih => obtain ⟨hc, ht⟩ := List.pairwise_cons.mp ho intro b hb rcases List.mem_cons.mp hb with he | hb · subst b have hz : (bs.map (fun b => rowDot v b * rowDot b c)).sum = 0 := by apply List.sum_eq_zero intro x hx obtain ⟨b, hb, rfl⟩ := List.mem_map.mp hx have hbc : rowDot b c = 0 := by change dotProduct b c = 0 rw [dotProduct_comm] exact hc b hb simp [hbc] simp [hu c (by simp), hz] · have htail := ih ht (fun b hb => hu b (by simp [hb])) b hb simp [hc b hb, htail]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orthogonal_list_coefficient · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:39
theorem removeProjections_orthogonal Lemma removeProjections_orthogonal in the paper ↗

The residual is orthogonal to every direction already in the basis. Under the stated conditions.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
ho :
bs.Pairwise (fun b c => rowDot b c = 0)
hu :
∀ b ∈ bs, rowDot b b = 1
v :
Fin n → ℝ
b ∈ bs :
Proof (Lean source)
-- @node: removeProjections_orthogonal lemma removeProjections_orthogonal (bs : List (Fin n → ℝ)) (ho : bs.Pairwise (fun b c => rowDot b c = 0)) (hu : ∀ b ∈ bs, rowDot b b = 1) (v : Fin n → ℝ) : ∀ b ∈ bs, rowDot (removeProjections bs v) b = 0 := by intro b hb rw [removeProjections_rowDot, orthogonal_list_coefficient bs ho hu v b hb, sub_self]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.removeProjections_orthogonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:65
theorem insertOrtho_pairwise_orthogonal Lemma insertOrtho_pairwise_orthogonal in the paper ↗

Gram--Schmidt insertion preserves orthogonality, including discarded residuals. Under the stated conditions.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v :
Fin n → ℝ
ho :
bs.Pairwise (fun b c => rowDot b c = 0)
hu :
∀ b ∈ bs, rowDot b b = 1
(insertOrtho bs v).Pairwise (fun b c => rowDot b c = 0)
Proof (Lean source)
-- @node: insertOrtho_pairwise_orthogonal lemma insertOrtho_pairwise_orthogonal (bs : List (Fin n → ℝ)) (v : Fin n → ℝ) (ho : bs.Pairwise (fun b c => rowDot b c = 0)) (hu : ∀ b ∈ bs, rowDot b b = 1) : (insertOrtho bs v).Pairwise (fun b c => rowDot b c = 0) := by dsimp only [insertOrtho] split_ifs with hp · rw [List.pairwise_append] refine ⟨ho, by simp, ?_⟩ intro b hb c hc rw [List.mem_singleton.mp hc] have hz := removeProjections_orthogonal bs ho hu v b hb have hr : rowDot b (removeProjections bs v) = 0 := by change dotProduct b (removeProjections bs v) = 0 rw [dotProduct_comm] exact hz simp only [rowDot, ← mul_div_assoc, ← Finset.sum_div] change rowDot b (removeProjections bs v) / _ = 0 rw [hr, zero_div] · exact ho
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.insertOrtho_pairwise_orthogonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:74
theorem orderedOrtho_pairwise_orthogonal Lemma orderedOrtho_pairwise_orthogonal in the paper ↗

The actual ordered construction yields pairwise orthogonal directions. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
vs :
List (Fin n → ℝ)
(orderedOrtho vs).Pairwise (fun b c => rowDot b c = 0)
Proof (Lean source)
-- @node: orderedOrtho_pairwise_orthogonal lemma orderedOrtho_pairwise_orthogonal (vs : List (Fin n → ℝ)) : (orderedOrtho vs).Pairwise (fun b c => rowDot b c = 0) := by have hf (ls : List (Fin n → ℝ)) : ∀ bs, bs.Pairwise (fun b c => rowDot b c = 0) → (∀ b ∈ bs, rowDot b b = 1) → (ls.foldl insertOrtho bs).Pairwise (fun b c => rowDot b c = 0) := by induction ls with | nil => intro bs ho _; exact ho | cons v ls ih => intro bs ho hu exact ih (insertOrtho bs v) (insertOrtho_pairwise_orthogonal bs v ho hu) (insertOrtho_unit_length bs v hu) exact hf vs [] (by simp) (by simp)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedOrtho_pairwise_orthogonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:96
theorem removeProjections_energy_identity Lemma removeProjections_energy_identity in the paper ↗

Pythagoras for the explicit residual accounts for every basis coefficient. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
ho :
bs.Pairwise (fun b c => rowDot b c = 0)
hu :
∀ b ∈ bs, rowDot b b = 1
v :
Fin n → ℝ
+ (bs.map (fun b => rowDot v b ^ 2)).sum
= rowDot v v
Proof (Lean source)
-- @node: removeProjections_energy_identity lemma removeProjections_energy_identity (bs : List (Fin n → ℝ)) (ho : bs.Pairwise (fun b c => rowDot b c = 0)) (hu : ∀ b ∈ bs, rowDot b b = 1) (v : Fin n → ℝ) : rowDot (removeProjections bs v) (removeProjections bs v) + (bs.map (fun b => rowDot v b ^ 2)).sum = rowDot v v := by induction bs with | nil => simp [removeProjections_nil] | cons c bs ih => obtain ⟨hc, ht⟩ := List.pairwise_cons.mp ho have he : removeProjections (c :: bs) v = removeProjections bs v - rowDot v c • c := by funext i simp only [removeProjections, List.map_cons, List.sum_cons, Pi.sub_apply, Pi.smul_apply, smul_eq_mul] ring have hz : (bs.map (fun b => rowDot v b * rowDot b c)).sum = 0 := by apply List.sum_eq_zero intro x hx obtain ⟨b, hb, rfl⟩ := List.mem_map.mp hx have hbc : rowDot b c = 0 := by change dotProduct b c = 0 rw [dotProduct_comm] exact hc b hb simp [hbc] have hd : rowDot (removeProjections bs v) c = rowDot v c := by rw [removeProjections_rowDot, hz, sub_zero] have hd' : rowDot c (removeProjections bs v) = rowDot v c := by change dotProduct c (removeProjections bs v) = _ rw [dotProduct_comm] exact hd have hi := ih ht (fun b hb => hu b (by simp [hb])) rw [he] change dotProduct (removeProjections bs v - rowDot v c • c) (removeProjections bs v - rowDot v c • c) + _ = _ simp only [sub_dotProduct, dotProduct_sub, smul_dotProduct, dotProduct_smul, smul_eq_mul] change rowDot (removeProjections bs v) (removeProjections bs v) - rowDot v c * rowDot c (removeProjections bs v) - (rowDot v c * (rowDot (removeProjections bs v) c - rowDot v c * rowDot c c)) + _ = _ rw [hd, hd', hu c (by simp)] simp only [List.map_cons, List.sum_cons] nlinarith [hi]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.removeProjections_energy_identity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:112

Nonnegative residual energy gives Bessel contraction for the explicit list. Under the stated conditions.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
ho :
bs.Pairwise (fun b c => rowDot b c = 0)
hu :
∀ b ∈ bs, rowDot b b = 1
v :
Fin n → ℝ
(bs.map (fun b => rowDot v b ^ 2)).sum ≤ rowDot v v
Proof (Lean source)
-- @node: orthogonal_list_bessel lemma orthogonal_list_bessel (bs : List (Fin n → ℝ)) (ho : bs.Pairwise (fun b c => rowDot b c = 0)) (hu : ∀ b ∈ bs, rowDot b b = 1) (v : Fin n → ℝ) : (bs.map (fun b => rowDot v b ^ 2)).sum ≤ rowDot v v := by have he := removeProjections_energy_identity bs ho hu v have hn : 0 ≤ rowDot (removeProjections bs v) (removeProjections bs v) := Finset.sum_nonneg (fun i _ => mul_self_nonneg _) linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orthogonal_list_bessel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:158

The actual nullspace basis contracts every test-row quadratic form. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u c :
Fin n → ℝ
((nullspaceBasis a q u).map (fun v => rowDot c v ^ 2)).sum ≤ rowDot c c
Proof (Lean source)
-- @node: nullspaceBasis_bessel lemma nullspaceBasis_bessel (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u c : Fin n → ℝ) : ((nullspaceBasis a q u).map (fun v => rowDot c v ^ 2)).sum ≤ rowDot c c := by exact orthogonal_list_bessel _ (orderedOrtho_pairwise_orthogonal _) (orderedOrtho_unit_length _) c
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_bessel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:169
theorem nullspaceBasis_rowDot_activeMask Lemma nullspaceBasis_rowDot_activeMask in the paper ↗

Inactive coordinates contribute no coefficient against any nullspace direction. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u c :
Fin n → ℝ
v :
Fin n → ℝ
hv :
v ∈ nullspaceBasis a q u
rowDot (activeMask u c) v = rowDot c v
Proof (Lean source)
-- @node: nullspaceBasis_rowDot_activeMask lemma nullspaceBasis_rowDot_activeMask (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u c : Fin n → ℝ) (v : Fin n → ℝ) (hv : v ∈ nullspaceBasis a q u) : rowDot (activeMask u c) v = rowDot c v := by apply Finset.sum_congr rfl intro i _ by_cases hi : |u i| < 1 · simp [activeMask, hi] · simp [activeMask, hi, nullspaceBasis_active_support a q u v hv i hi]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_rowDot_activeMask · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:177
theorem nullspaceBasis_active_bessel Lemma nullspaceBasis_active_bessel in the paper ↗

Projection contraction can be localized to the current active coordinates. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u c :
Fin n → ℝ
((nullspaceBasis a q u).map (fun v => rowDot c v ^ 2)).sum
≤ rowDot (activeMask u c) (activeMask u c)
Proof (Lean source)
-- @node: nullspaceBasis_active_bessel lemma nullspaceBasis_active_bessel (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u c : Fin n → ℝ) : ((nullspaceBasis a q u).map (fun v => rowDot c v ^ 2)).sum ≤ rowDot (activeMask u c) (activeMask u c) := by have he : (nullspaceBasis a q u).map (fun v => rowDot c v ^ 2) = (nullspaceBasis a q u).map (fun v => rowDot (activeMask u c) v ^ 2) := by apply List.map_congr_left intro v hv rw [nullspaceBasis_rowDot_activeMask a q u c v hv] rw [he] exact nullspaceBasis_bessel a q u (activeMask u c)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_active_bessel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:188
theorem activeMask_row_energy_le Lemma activeMask_row_energy_le in the paper ↗

A bounded test row has at most one squared-entry budget per active coordinate. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
u c :
Fin n → ℝ
Λ :
ℝ
hc :
∀ i, |c i| ≤ Λ
rowDot (activeMask u c) (activeMask u c) ≤ Λ ^ 2 * (activeIndices u).length
Proof (Lean source)
-- @node: activeMask_row_energy_le lemma activeMask_row_energy_le (u c : Fin n → ℝ) (Λ : ℝ) (hc : ∀ i, |c i| ≤ Λ) : rowDot (activeMask u c) (activeMask u c) ≤ Λ ^ 2 * (activeIndices u).length := by rw [activeIndices_length_eq_trace, Finset.mul_sum] apply Finset.sum_le_sum intro i _ by_cases hi : |u i| < 1 · simp only [activeMask, if_pos hi, mul_one] have hab := hc i have hs := mul_self_le_mul_self (abs_nonneg (c i)) hab simpa only [← pow_two, sq_abs] using hs · simp [activeMask, hi]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.activeMask_row_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:202
theorem nullspaceBasis_bounded_row_energy Lemma nullspaceBasis_bounded_row_energy in the paper ↗

The roadmap's localized projection quadratic bound holds for the actual basis. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u c :
Fin n → ℝ
Λ :
ℝ
hc :
∀ i, |c i| ≤ Λ
((nullspaceBasis a q u).map (fun v => rowDot c v ^ 2)).sum
≤ Λ ^ 2 * (activeIndices u).length
Proof (Lean source)
-- @node: nullspaceBasis_bounded_row_energy lemma nullspaceBasis_bounded_row_energy (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u c : Fin n → ℝ) (Λ : ℝ) (hc : ∀ i, |c i| ≤ Λ) : ((nullspaceBasis a q u).map (fun v => rowDot c v ^ 2)).sum ≤ Λ ^ 2 * (activeIndices u).length := by exact (nullspaceBasis_active_bessel a q u c).trans (activeMask_row_energy_le u c Λ hc)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_bounded_row_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:217
theorem roundingStep_lottery_row_variance_le Lemma roundingStep_lottery_row_variance_le in the paper ↗

Each actual two-seed row variance is bounded by gamma times active row energy. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u c :
Fin n → ℝ
Λ :
ℝ
hc :
∀ i, |c i| ≤ Λ
hne :
nullspaceBasis a q u ≠ []
(∫ seed₁, ∫ seed₂, rowDot c (roundingStep a q u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
≤ ((nullspaceBasis a q u).map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)).sum⁻¹ * (Λ ^ 2 * (activeIndices u).length)
Proof (Lean source)
-- @node: roundingStep_lottery_row_variance_le lemma roundingStep_lottery_row_variance_le (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u c : Fin n → ℝ) (Λ : ℝ) (hc : ∀ i, |c i| ≤ Λ) (hne : nullspaceBasis a q u ≠ []) : (∫ seed₁, ∫ seed₂, rowDot c (roundingStep a q u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) ≤ ((nullspaceBasis a q u).map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹)).sum⁻¹ * (Λ ^ 2 * (activeIndices u).length) := by rw [roundingStep_lottery_row_variance a q u c hne] exact mul_le_mul_of_nonneg_left (nullspaceBasis_bounded_row_energy a q u c Λ hc) (inv_nonneg.mpr (nullspaceBasis_boundary_weight_sum_pos a q u hne).le)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_lottery_row_variance_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:225
theorem roundingStep_row_variance_energy_le Lemma roundingStep_row_variance_energy_le in the paper ↗

The actual row variance and norm increment obey the same gamma-weighted budget, with the constructed basis length retained explicitly. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u c :
Fin n → ℝ
Λ :
ℝ
hc :
∀ i, |c i| ≤ Λ
hne :
nullspaceBasis a q u ≠ []
(∫ seed₁, ∫ seed₂, rowDot c (roundingStep a q u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) * (nullspaceBasis a q u).length
≤ (Λ ^ 2 * (activeIndices u).length) * (∫ seed₁, ∫ seed₂, rowDot (roundingStep a q u seed₁ seed₂) (roundingStep a q u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
-- @node: roundingStep_row_variance_energy_le lemma roundingStep_row_variance_energy_le (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u c : Fin n → ℝ) (Λ : ℝ) (hc : ∀ i, |c i| ≤ Λ) (hne : nullspaceBasis a q u ≠ []) : (∫ seed₁, ∫ seed₂, rowDot c (roundingStep a q u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) * (nullspaceBasis a q u).length ≤ (Λ ^ 2 * (activeIndices u).length) * (∫ seed₁, ∫ seed₂, rowDot (roundingStep a q u seed₁ seed₂) (roundingStep a q u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) := by rw [roundingStep_lottery_energy_increment a q u hne] have hb := mul_le_mul_of_nonneg_right (roundingStep_lottery_row_variance_le a q u c Λ hc hne) (show 0 ≤ ((nullspaceBasis a q u).length : ℝ) by positivity) calc _ ≤ _ := hb _ = _ := by ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_row_variance_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:239
theorem active_endpoint_energy_le Lemma active_endpoint_energy_le in the paper ↗

Only initially active coordinates can spend endpoint norm energy; their combined increase is bounded by the phase's initial count. Under the stated conditions.

Formal statement
n :
ℕ
shared
u w :
Fin n → ℝ
hw :
∀ i, |w i| ≤ 1
hfix :
∀ i
if
¬ |u i| < 1
then
w i = u i
rowDot w w - rowDot u u ≤ (activeIndices u).length
Proof (Lean source)
-- @node: active_endpoint_energy_le lemma active_endpoint_energy_le (u w : Fin n → ℝ) (hw : ∀ i, |w i| ≤ 1) (hfix : ∀ i, ¬ |u i| < 1 → w i = u i) : rowDot w w - rowDot u u ≤ (activeIndices u).length := by rw [activeIndices_length_eq_trace] unfold rowDot rw [← Finset.sum_sub_distrib] apply Finset.sum_le_sum intro i _ by_cases hi : |u i| < 1 · simp only [if_pos hi] have hs := mul_self_le_mul_self (abs_nonneg (w i)) (hw i) have hs' : w i * w i ≤ 1 := by simpa only [← pow_two, sq_abs, one_pow] using hs nlinarith [mul_self_nonneg (u i)] · simp [hi, hfix i hi]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.active_endpoint_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingProjection.lean:261
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingRank 14 declarations The actual ordered orthonormalization preserves its input orthogonal complement.

Quantitative rank and protected rows in ordered rounding

The actual ordered orthonormalization preserves its input orthogonal complement. A trace argument gives the exact constraint-plus-nullspace rank identity on active coordinates, even for dependent rows. The live-phase rank estimate bounds each fresh-seed row variance by four times its squared-norm energy increment. Retained rows are fixed by every boundary move. Finite phase accumulation is separate.

theorem removeProjections_rowDot_of_orthogonal Lemma removeProjections_rowDot_of_orthogonal in the paper ↗

A test vector orthogonal to the basis sees the same coefficient before and after projection. Under the stated conditions.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v w :
Fin n → ℝ
hw :
∀ b ∈ bs, rowDot w b = 0
Proof (Lean source)
-- @node: removeProjections_rowDot_of_orthogonal lemma removeProjections_rowDot_of_orthogonal (bs : List (Fin n → ℝ)) (v w : Fin n → ℝ) (hw : ∀ b ∈ bs, rowDot w b = 0) : rowDot w (removeProjections bs v) = rowDot w v := by rw [show rowDot w (removeProjections bs v) = rowDot (removeProjections bs v) w from dotProduct_comm _ _, removeProjections_rowDot] have hz : (bs.map (fun b => rowDot v b * rowDot b w)).sum = 0 := by apply List.sum_eq_zero intro x hx obtain ⟨b, hb, rfl⟩ := List.mem_map.mp hx rw [show rowDot b w = rowDot w b from dotProduct_comm _ _, hw b hb, mul_zero] rw [hz, sub_zero] exact dotProduct_comm _ _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.removeProjections_rowDot_of_orthogonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:18
theorem insertOrtho_orthogonal_iff Lemma insertOrtho_orthogonal_iff in the paper ↗

One insertion preserves exactly the orthogonal complement of the old basis and new input. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v w :
Fin n → ℝ
(∀ b ∈ insertOrtho bs v, rowDot w b = 0) ↔ (∀ b ∈ bs, rowDot w b = 0) ∧ rowDot w v = 0
Proof (Lean source)
-- @node: insertOrtho_orthogonal_iff lemma insertOrtho_orthogonal_iff (bs : List (Fin n → ℝ)) (v w : Fin n → ℝ) : (∀ b ∈ insertOrtho bs v, rowDot w b = 0) ↔ (∀ b ∈ bs, rowDot w b = 0) ∧ rowDot w v = 0 := by have hd (h : ∀ b ∈ bs, rowDot w b = 0) : rowDot w (removeProjections bs v) = rowDot w v := removeProjections_rowDot_of_orthogonal bs v w h constructor · intro h have hb : ∀ b ∈ bs, rowDot w b = 0 := fun b hb => h b (insertOrtho_contains_old bs v b hb) refine ⟨hb, ?_⟩ by_cases hp : 0 < sqrt (rowDot (removeProjections bs v) (removeProjections bs v)) · have hn := h (fun i => removeProjections bs v i / sqrt (rowDot (removeProjections bs v) (removeProjections bs v))) (by simp [insertOrtho, hp]) have he : rowDot w (fun i => removeProjections bs v i / sqrt (rowDot (removeProjections bs v) (removeProjections bs v))) = rowDot w (removeProjections bs v) / sqrt (rowDot (removeProjections bs v) (removeProjections bs v)) := by simp only [rowDot, ← mul_div_assoc, ← Finset.sum_div] rw [he, hd hb] at hn exact (div_eq_zero_iff.mp hn).resolve_right hp.ne' · have hz : removeProjections bs v = 0 := by apply (rowDot_self_eq_zero_iff _).mp have hnon : 0 ≤ rowDot (removeProjections bs v) (removeProjections bs v) := Finset.sum_nonneg (fun i _ => mul_self_nonneg _) exact le_antisymm (by simpa using Real.sqrt_pos.not.mp hp) hnon rw [← hd hb, hz] simp [rowDot] · rintro ⟨hb, hv⟩ b hmem dsimp only [insertOrtho] at hmem split_ifs at hmem with hp · rcases List.mem_append.mp hmem with hmem | hmem · exact hb b hmem · rw [List.mem_singleton.mp hmem] simp only [rowDot, ← mul_div_assoc, ← Finset.sum_div] change rowDot w (removeProjections bs v) / _ = 0 rw [hd hb, hv, zero_div] · exact hb b hmem
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.insertOrtho_orthogonal_iff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:33
theorem orderedOrtho_orthogonal_iff Lemma orderedOrtho_orthogonal_iff in the paper ↗

Discarding zero residuals preserves the orthogonal complement of all input vectors.

Formal statement
n :
ℕ
shared
vs :
List (Fin n → ℝ)
w :
Fin n → ℝ
(∀ b ∈ orderedOrtho vs, rowDot w b = 0) ↔ ∀ v ∈ vs, rowDot w v = 0
Proof (Lean source)
-- @node: orderedOrtho_orthogonal_iff lemma orderedOrtho_orthogonal_iff (vs : List (Fin n → ℝ)) (w : Fin n → ℝ) : (∀ b ∈ orderedOrtho vs, rowDot w b = 0) ↔ ∀ v ∈ vs, rowDot w v = 0 := by have hf (ls : List (Fin n → ℝ)) : ∀ bs, (∀ b ∈ ls.foldl insertOrtho bs, rowDot w b = 0) ↔ (∀ b ∈ bs, rowDot w b = 0) ∧ ∀ v ∈ ls, rowDot w v = 0 := by induction ls with | nil => intro bs; simp | cons v ls ih => intro bs rw [List.foldl_cons, ih, insertOrtho_orthogonal_iff] simp only [List.mem_cons, forall_eq_or_imp] exact and_assoc simpa [orderedOrtho] using hf vs []
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedOrtho_orthogonal_iff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:75
theorem rowDot_active_coordinate Lemma rowDot_active_coordinate in the paper ↗

An active-supported vector pairs with a masked coordinate vector to give that coordinate. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
u w :
Fin n → ℝ
j :
Fin n
hw :
∀ i
if
¬ |u i| < 1
then
w i = 0
rowDot w (activeMask u (fun i => if i = j then 1 else 0)) = w j
Proof (Lean source)
-- @node: rowDot_active_coordinate lemma rowDot_active_coordinate (u w : Fin n → ℝ) (j : Fin n) (hw : ∀ i, ¬ |u i| < 1 → w i = 0) : rowDot w (activeMask u (fun i => if i = j then 1 else 0)) = w j := by classical have hm : activeMask u (fun i => if i = j then 1 else 0) = (fun i => if i = j then (if |u j| < 1 then 1 else 0) else 0) := by funext i by_cases hi : i = j · subst i; simp [activeMask] · simp [activeMask, hi] rw [hm] by_cases hj : |u j| < 1 · simp [rowDot, hj] · simp [rowDot, hj, hw j hj]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.rowDot_active_coordinate · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:91
theorem nullspaceBasis_orthogonal_constraints Lemma nullspaceBasis_orthogonal_constraints in the paper ↗

Every constructed nullspace direction is orthogonal to every constraint-basis vector. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
b :
Fin n → ℝ
hb :
b ∈ constraintBasis a q u
v ∈ nullspaceBasis a q u :
rowDot b v = 0
Proof (Lean source)
-- @node: nullspaceBasis_orthogonal_constraints lemma nullspaceBasis_orthogonal_constraints (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (b : Fin n → ℝ) (hb : b ∈ constraintBasis a q u) : ∀ v ∈ nullspaceBasis a q u, rowDot b v = 0 := by apply (orderedOrtho_orthogonal_iff _ b).mpr intro v hv obtain ⟨j, _, rfl⟩ := List.mem_map.mp hv rw [show rowDot b (constraintProjection a q u (fun i => if i = j then 1 else 0)) = rowDot (constraintProjection a q u (fun i => if i = j then 1 else 0)) b from dotProduct_comm _ _] exact removeProjections_orthogonal _ (orderedOrtho_pairwise_orthogonal _) (orderedOrtho_unit_length _) _ b hb
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_orthogonal_constraints · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:108
theorem nullspaceBasis_complete_active Lemma nullspaceBasis_complete_active in the paper ↗

An active-supported vector orthogonal to both constructed bases must vanish. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u w :
Fin n → ℝ
hs :
∀ i
if
¬ |u i| < 1
then
w i = 0
hc :
∀ b ∈ constraintBasis a q u, rowDot w b = 0
hn :
∀ b ∈ nullspaceBasis a q u, rowDot w b = 0
w = 0
Proof (Lean source)
-- @node: nullspaceBasis_complete_active lemma nullspaceBasis_complete_active (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u w : Fin n → ℝ) (hs : ∀ i, ¬ |u i| < 1 → w i = 0) (hc : ∀ b ∈ constraintBasis a q u, rowDot w b = 0) (hn : ∀ b ∈ nullspaceBasis a q u, rowDot w b = 0) : w = 0 := by have hp := (orderedOrtho_orthogonal_iff _ w).mp hn funext j have hz := hp (constraintProjection a q u (fun i => if i = j then 1 else 0)) (List.mem_map.mpr ⟨j, by simp, rfl⟩) rw [constraintProjection, removeProjections_rowDot_of_orthogonal _ _ _ hc, rowDot_active_coordinate u w j hs] at hz exact hz
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_complete_active · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:122
theorem active_complete_basis_trace Lemma active_complete_basis_trace in the paper ↗

A unit active-supported basis resolving every active coordinate has size equal to the active count. Under the stated conditions.

Formal statement
n :
ℕ
shared
u :
Fin n → ℝ
bs :
List (Fin n → ℝ)
hu :
∀ b ∈ bs, rowDot b b = 1
hs :
∀ b ∈ bs, ∀ j, ¬ |u j| < 1 → b j = 0
hz :
∀ j : Fin n, removeProjections bs (activeMask u (fun i => if i = j then 1 else 0)) = 0
(activeIndices u).length = bs.length
Proof (Lean source)
-- @node: active_complete_basis_trace lemma active_complete_basis_trace (u : Fin n → ℝ) (bs : List (Fin n → ℝ)) (hu : ∀ b ∈ bs, rowDot b b = 1) (hs : ∀ b ∈ bs, ∀ j, ¬ |u j| < 1 → b j = 0) (hz : ∀ j : Fin n, removeProjections bs (activeMask u (fun i => if i = j then 1 else 0)) = 0) : (activeIndices u).length = bs.length := by have hd (j : Fin n) : (if |u j| < 1 then (1 : ℝ) else 0) = (bs.map (fun b => b j * b j)).sum := by have he := congrFun (hz j) j have hm : (bs.map (fun b => rowDot (activeMask u (fun i => if i = j then 1 else 0)) b * b j)) = bs.map (fun b => b j * b j) := by apply List.map_congr_left intro b hb rw [show rowDot (activeMask u (fun i => if i = j then 1 else 0)) b = rowDot b (activeMask u (fun i => if i = j then 1 else 0)) from dotProduct_comm _ _, rowDot_active_coordinate u b j (hs b hb)] change (if |u j| < 1 then (if j = j then (1 : ℝ) else 0) else 0) - (bs.map (fun b => rowDot (activeMask u (fun i => if i = j then 1 else 0)) b * b j)).sum = 0 at he simp only [if_true, hm] at he linarith have ht : ((activeIndices u).length : ℝ) = bs.length := by rw [activeIndices_length_eq_trace, Finset.sum_congr rfl (fun j _ => hd j), basis_diagonal_trace, basis_unit_trace bs hu] exact_mod_cast ht
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.active_complete_basis_trace · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:137
theorem nullspaceBasis_rank_identity Lemma nullspaceBasis_rank_identity in the paper ↗

The actual constraint and nullspace basis sizes sum exactly to the active-coordinate count. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
Proof (Lean source)
-- @node: nullspaceBasis_rank_identity lemma nullspaceBasis_rank_identity (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) : (constraintBasis a q u).length + (nullspaceBasis a q u).length = (activeIndices u).length := by let bs := constraintBasis a q u ++ nullspaceBasis a q u have hc : ∀ b ∈ constraintBasis a q u, ∀ i, ¬ |u i| < 1 → b i = 0 := by apply orderedOrtho_active_support intro b hb i hi obtain ⟨h, _, rfl⟩ := List.mem_map.mp hb simp [activeMask, hi] have hs : ∀ b ∈ bs, ∀ i, ¬ |u i| < 1 → b i = 0 := by intro b hb rcases List.mem_append.mp hb with hb | hb · exact hc b hb · exact nullspaceBasis_active_support a q u b hb have hu : ∀ b ∈ bs, rowDot b b = 1 := by intro b hb rcases List.mem_append.mp hb with hb | hb · exact orderedOrtho_unit_length _ b hb · exact orderedOrtho_unit_length _ b hb have ho : bs.Pairwise (fun b c => rowDot b c = 0) := by rw [List.pairwise_append] exact ⟨orderedOrtho_pairwise_orthogonal _, orderedOrtho_pairwise_orthogonal _, fun b hb c hc => nullspaceBasis_orthogonal_constraints a q u b hb c hc⟩ have hz (j : Fin n) : removeProjections bs (activeMask u (fun i => if i = j then 1 else 0)) = 0 := by apply nullspaceBasis_complete_active a q u · apply removeProjections_active_support · intro i hi; simp [activeMask, hi] · exact hs · intro b hb exact removeProjections_orthogonal bs ho hu _ b (List.mem_append_left _ hb) · intro b hb exact removeProjections_orthogonal bs ho hu _ b (List.mem_append_right _ hb) have ht := active_complete_basis_trace u bs hu hs hz simpa only [bs, List.length_append] using ht.symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_rank_identity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:167
theorem nullspaceBasis_rank_lower_bound Lemma nullspaceBasis_rank_lower_bound in the paper ↗

Dependent constraints only increase the constructed nullspace rank above active count minus row count.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
Proof (Lean source)
-- @node: nullspaceBasis_rank_lower_bound lemma nullspaceBasis_rank_lower_bound (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) : (activeIndices u).length - q ≤ (nullspaceBasis a q u).length := by have ht := nullspaceBasis_rank_identity a q u have hq := constraintBasis_length_le a q u omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_rank_lower_bound · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:206
theorem nullspaceBasis_phase_rank Lemma nullspaceBasis_phase_rank in the paper ↗

Before the phase stopping threshold, the actual nullspace rank is at least one quarter of the initial count. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
r :
ℕ
u :
Fin n → ℝ
hlive :
r / 2 < (activeIndices u).length
(r : ℝ) / 4 ≤ ((nullspaceBasis a (r / 4) u).length : ℝ)
Proof (Lean source)
-- @node: nullspaceBasis_phase_rank lemma nullspaceBasis_phase_rank (a : Fin (n / 4) → Fin n → ℝ) (r : ℕ) (u : Fin n → ℝ) (hlive : r / 2 < (activeIndices u).length) : (r : ℝ) / 4 ≤ ((nullspaceBasis a (r / 4) u).length : ℝ) := by have ht := nullspaceBasis_rank_identity a (r / 4) u have hq := constraintBasis_length_le a (r / 4) u have hn : r ≤ 4 * (nullspaceBasis a (r / 4) u).length := by omega have hr : (r : ℝ) ≤ 4 * (nullspaceBasis a (r / 4) u).length := by exact_mod_cast hn linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_phase_rank · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:216
theorem nullspaceBasis_phase_active_ratio Lemma nullspaceBasis_phase_active_ratio in the paper ↗

A live phase has at most four active coordinates per constructed nullspace direction. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
r :
ℕ
u :
Fin n → ℝ
hlive :
r / 2 < (activeIndices u).length
(activeIndices u).length ≤ 4 * (nullspaceBasis a (r / 4) u).length
Proof (Lean source)
-- @node: nullspaceBasis_phase_active_ratio lemma nullspaceBasis_phase_active_ratio (a : Fin (n / 4) → Fin n → ℝ) (r : ℕ) (u : Fin n → ℝ) (hlive : r / 2 < (activeIndices u).length) : (activeIndices u).length ≤ 4 * (nullspaceBasis a (r / 4) u).length := by have ht := nullspaceBasis_rank_identity a (r / 4) u have hq := constraintBasis_length_le a (r / 4) u omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_phase_active_ratio · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:228
theorem roundingStep_phase_variance_energy_le Lemma roundingStep_phase_variance_energy_le in the paper ↗

The fresh two-seed row variance in a live phase is bounded by four times its norm-energy increment and squared entry bound. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
r :
ℕ
u c :
Fin n → ℝ
Λ :
ℝ
hc :
∀ i, |c i| ≤ Λ
hlive :
r / 2 < (activeIndices u).length
(∫ seed₁, ∫ seed₂, rowDot c (roundingStep a (r / 4) u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
≤ 4 * Λ ^ 2 * (∫ seed₁, ∫ seed₂, rowDot (roundingStep a (r / 4) u seed₁ seed₂) (roundingStep a (r / 4) u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
-- @node: roundingStep_phase_variance_energy_le lemma roundingStep_phase_variance_energy_le (a : Fin (n / 4) → Fin n → ℝ) (r : ℕ) (u c : Fin n → ℝ) (Λ : ℝ) (hc : ∀ i, |c i| ≤ Λ) (hlive : r / 2 < (activeIndices u).length) : (∫ seed₁, ∫ seed₂, rowDot c (roundingStep a (r / 4) u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) ≤ 4 * Λ ^ 2 * (∫ seed₁, ∫ seed₂, rowDot (roundingStep a (r / 4) u seed₁ seed₂) (roundingStep a (r / 4) u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) := by have hq : r / 4 < (activeIndices u).length := by omega have hne := nullspaceBasis_nonempty_of_active_count a (r / 4) u hq have hk : 0 < ((nullspaceBasis a (r / 4) u).length : ℝ) := by exact_mod_cast List.length_pos_iff.mpr hne have ha : ((activeIndices u).length : ℝ) ≤ 4 * (nullspaceBasis a (r / 4) u).length := by exact_mod_cast nullspaceBasis_phase_active_ratio a r u hlive have he : 0 ≤ (∫ seed₁, ∫ seed₂, rowDot (roundingStep a (r / 4) u seed₁ seed₂) (roundingStep a (r / 4) u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) := by rw [roundingStep_lottery_energy_increment a (r / 4) u hne] exact mul_nonneg (inv_nonneg.mpr (nullspaceBasis_boundary_weight_sum_pos a (r / 4) u hne).le) hk.le have hb := roundingStep_row_variance_energy_le a (r / 4) u c Λ hc hne have hm := mul_le_mul_of_nonneg_left ha (mul_nonneg (sq_nonneg Λ) he) nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_phase_variance_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:237
theorem nullspaceBasis_retained_row_zero Lemma nullspaceBasis_retained_row_zero in the paper ↗

Each constructed nullspace direction annihilates every retained original row. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u v :
Fin n → ℝ
hv :
v ∈ nullspaceBasis a q u
h :
Fin (n / 4)
hh :
h.val < q
rowDot (a h) v = 0
Proof (Lean source)
-- @node: nullspaceBasis_retained_row_zero lemma nullspaceBasis_retained_row_zero (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u v : Fin n → ℝ) (hv : v ∈ nullspaceBasis a q u) (h : Fin (n / 4)) (hh : h.val < q) : rowDot (a h) v = 0 := by have hc : ∀ b ∈ constraintBasis a q u, rowDot v b = 0 := by intro b hb rw [show rowDot v b = rowDot b v from dotProduct_comm _ _] exact nullspaceBasis_orthogonal_constraints a q u b hb v hv have hr := (orderedOrtho_orthogonal_iff _ v).mp hc have hm : activeMask u (a h) ∈ (List.range q).map (fun k => activeMask u (if hk : k < n / 4 then a ⟨k, hk⟩ else 0)) := by exact List.mem_map.mpr ⟨h.val, List.mem_range.mpr hh, by simp [h.isLt]⟩ have hz := hr (activeMask u (a h)) hm rw [show rowDot v (activeMask u (a h)) = rowDot (activeMask u (a h)) v from dotProduct_comm _ _, nullspaceBasis_rowDot_activeMask a q u (a h) v hv] at hz exact hz
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_retained_row_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:267
theorem roundingStep_retained_row_fixed Lemma roundingStep_retained_row_fixed in the paper ↗

The asymmetric boundary move fixes each retained row for every seed, including empty-basis padding. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
seed₁ seed₂ :
ℝ
h :
Fin (n / 4)
hh :
h.val < q
rowDot (a h) (roundingStep a q u seed₁ seed₂) = rowDot (a h) u
Proof (Lean source)
-- @node: roundingStep_retained_row_fixed lemma roundingStep_retained_row_fixed (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (seed₁ seed₂ : ℝ) (h : Fin (n / 4)) (hh : h.val < q) : rowDot (a h) (roundingStep a q u seed₁ seed₂) = rowDot (a h) u := by by_cases he : nullspaceBasis a q u = [] · simp [roundingStep, he, inverseCDF, boundaryPlus, boundaryMinus, finiteMin, rowDot, activeIndices] · let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ have hv : v ∈ nullspaceBasis a q u := rounding_selected_direction_mem a q u seed₁ he have hz := nullspaceBasis_retained_row_zero a q u v hv h hh change rowDot (a h) (if seed₂ < boundaryMinus u v / (boundaryPlus u v + boundaryMinus u v) then u + boundaryPlus u v • v else u - boundaryMinus u v • v) = _ split_ifs · change dotProduct (a h) (u + boundaryPlus u v • v) = _ rw [dotProduct_add, dotProduct_smul] change rowDot (a h) u + _ * rowDot (a h) v = _ rw [hz, mul_zero, add_zero] · change dotProduct (a h) (u - boundaryMinus u v • v) = _ rw [dotProduct_sub, dotProduct_smul] change rowDot (a h) u - _ * rowDot (a h) v = _ rw [hz, mul_zero, sub_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_retained_row_fixed · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRank.lean:285
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingRankBorel 14 declarations Finite branching at zero residuals preserves measurability for every consumer of a basis.

Borel elimination of changing Gram--Schmidt bases

Finite branching at zero residuals preserves measurability for every consumer of a basis. This proves the rank-stratum step without imposing a fixed rank.

theorem orderedOrtho_foldl_consumer_measurable Lemma orderedOrtho_foldl_consumer_measurable in the paper ↗

A measurable consumer of every fixed measurable basis family remains measurable through the finite Gram--Schmidt branching, including discarded residuals. Under the stated conditions.

Formal statement
n :
ℕ
shared
Ω β :
vs bs :
List (Ω → Fin n → ℝ)
hvs :
∀ v ∈ vs, Measurable v
hbs :
∀ b ∈ bs, Measurable b
F :
Ω → List (Fin n → ℝ) → β
hF :
∀ cs : List (Ω → Fin n → ℝ)
if
(∀ c ∈ cs, Measurable c)
then
Measurable (fun x => F x (cs.map (fun c => c x)))
Measurable (fun x => F x ((vs.map (fun v => v x)).foldl insertOrtho (bs.map (fun b => b x))))
Proof (Lean source)
-- @node: orderedOrtho_foldl_consumer_measurable lemma orderedOrtho_foldl_consumer_measurable {Ω β : Type*} [MeasurableSpace Ω] [MeasurableSpace β] (vs bs : List (Ω → Fin n → ℝ)) (hvs : ∀ v ∈ vs, Measurable v) (hbs : ∀ b ∈ bs, Measurable b) (F : Ω → List (Fin n → ℝ) → β) (hF : ∀ cs : List (Ω → Fin n → ℝ), (∀ c ∈ cs, Measurable c) → Measurable (fun x => F x (cs.map (fun c => c x)))) : Measurable (fun x => F x ((vs.map (fun v => v x)).foldl insertOrtho (bs.map (fun b => b x)))) := by classical induction vs generalizing bs with | nil => exact hF bs hbs | cons v vs ih => have hv := hvs v (by simp) have htail : ∀ w ∈ vs, Measurable w := fun w hw => hvs w (by simp [hw]) let w (x : Ω) := removeProjections (bs.map (fun b => b x)) (v x) let r (x : Ω) := sqrt (rowDot (w x) (w x)) have hw : Measurable w := by apply measurable_pi_lambda intro j have hs : Measurable (fun x => (bs.map (fun b => rowDot (v x) (b x) * b x j)).sum) := by induction bs with | nil => exact measurable_const | cons b bs ih => have hb := hbs b (by simp) have ht : ∀ c ∈ bs, Measurable c := fun c hc => hbs c (by simp [hc]) simp only [List.map_cons, List.sum_cons] exact ((rowDot_measurable.comp (hv.prodMk hb)).mul ((measurable_pi_apply j).comp hb)).add (ih ht) exact ((measurable_pi_apply j).comp hv).sub (by simpa only [List.map_map, Function.comp_def] using hs) have hr : Measurable r := (rowDot_measurable.comp (hw.prodMk hw)).sqrt let c (x : Ω) : Fin n → ℝ := fun i => w x i / r x have hc : Measurable c := by apply measurable_pi_lambda intro i exact ((measurable_pi_apply i).comp hw).div hr have hyes := ih (bs ++ [c]) htail (by intro b hb rcases List.mem_append.mp hb with hb | hb · exact hbs b hb · have he : b = c := List.mem_singleton.mp hb exact he ▸ hc) have hno := ih bs htail hbs have hout : Measurable (fun x => if 0 < r x then F x ((vs.map (fun v => v x)).foldl insertOrtho ((bs ++ [c]).map (fun b => b x))) else F x ((vs.map (fun v => v x)).foldl insertOrtho (bs.map (fun b => b x)))) := Measurable.ite (measurableSet_lt (measurable_const (a := (0 : ℝ))) hr) hyes hno convert hout using 1 ext x simp only [List.map_cons, List.foldl_cons, insertOrtho] change F x ((vs.map (fun v => v x)).foldl insertOrtho (if 0 < r x then (bs.map (fun b => b x)) ++ [c x] else bs.map (fun b => b x))) = _ split_ifs <;> simp only [List.map_append, List.map_cons, List.map_nil]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedOrtho_foldl_consumer_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:17
theorem orderedOrtho_consumer_measurable Lemma orderedOrtho_consumer_measurable in the paper ↗

Ordered orthonormalization admits measurable consumers with no rank premise. Under the stated conditions.

Formal statement
n :
ℕ
shared
Ω β :
vs :
List (Ω → Fin n → ℝ)
hvs :
∀ v ∈ vs, Measurable v
F :
Ω → List (Fin n → ℝ) → β
hF :
∀ cs : List (Ω → Fin n → ℝ)
if
(∀ c ∈ cs, Measurable c)
then
Measurable (fun x => F x (cs.map (fun c => c x)))
Measurable (fun x => F x (orderedOrtho (vs.map (fun v => v x))))
Proof (Lean source)
-- @node: orderedOrtho_consumer_measurable lemma orderedOrtho_consumer_measurable {Ω β : Type*} [MeasurableSpace Ω] [MeasurableSpace β] (vs : List (Ω → Fin n → ℝ)) (hvs : ∀ v ∈ vs, Measurable v) (F : Ω → List (Fin n → ℝ) → β) (hF : ∀ cs : List (Ω → Fin n → ℝ), (∀ c ∈ cs, Measurable c) → Measurable (fun x => F x (cs.map (fun c => c x)))) : Measurable (fun x => F x (orderedOrtho (vs.map (fun v => v x)))) := by exact orderedOrtho_foldl_consumer_measurable vs [] hvs (by simp) F hF
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedOrtho_consumer_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:77
theorem removeProjections_list_measurable Lemma removeProjections_list_measurable in the paper ↗

Finite projection subtraction is Borel for a list of measurable vectors. Under the stated conditions.

Formal statement
n :
ℕ
shared
Ω :
bs :
List (Ω → Fin n → ℝ)
v :
Ω → Fin n → ℝ
hbs :
∀ b ∈ bs, Measurable b
hv :
Measurable (fun x => removeProjections (bs.map (fun b => b x)) (v x))
Proof (Lean source)
-- @node: removeProjections_list_measurable lemma removeProjections_list_measurable {Ω : Type*} [MeasurableSpace Ω] (bs : List (Ω → Fin n → ℝ)) (v : Ω → Fin n → ℝ) (hbs : ∀ b ∈ bs, Measurable b) (hv : Measurable v) : Measurable (fun x => removeProjections (bs.map (fun b => b x)) (v x)) := by apply measurable_pi_lambda intro j have hs : Measurable (fun x => (bs.map (fun b => rowDot (v x) (b x) * b x j)).sum) := by induction bs with | nil => exact measurable_const | cons b bs ih => have hb := hbs b (by simp) simp only [List.map_cons, List.sum_cons] exact ((rowDot_measurable.comp (hv.prodMk hb)).mul ((measurable_pi_apply j).comp hb)).add (ih (fun c hc => hbs c (by simp [hc]))) exact ((measurable_pi_apply j).comp hv).sub (by simpa only [removeProjections, List.map_map, Function.comp_def] using hs)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.removeProjections_list_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:88
theorem constraintProjection_measurable Lemma constraintProjection_measurable in the paper ↗

[ At any fixed retained prefix length, the actual constraint projection is Borel. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
q :
ℕ
Measurable (fun x : (Fin (n / 4) → Fin n → ℝ) × ((Fin n → ℝ) × (Fin n → ℝ)) => constraintProjection x.1 q x.2.1 x.2.2)
Proof (Lean source)
@[fun_prop] -- @node: constraintProjection_measurable lemma constraintProjection_measurable (q : ℕ) : Measurable (fun x : (Fin (n / 4) → Fin n → ℝ) × ((Fin n → ℝ) × (Fin n → ℝ)) => constraintProjection x.1 q x.2.1 x.2.2) := by classical let vs := (List.range q).map (fun h => fun x : (Fin (n / 4) → Fin n → ℝ) × ((Fin n → ℝ) × (Fin n → ℝ)) => activeMask x.2.1 (if hh : h < n / 4 then x.1 ⟨h, hh⟩ else 0)) have hvs : ∀ v ∈ vs, Measurable v := by intro v hv obtain ⟨h, _, rfl⟩ := List.mem_map.mp hv split <;> fun_prop have hout := orderedOrtho_consumer_measurable vs hvs (fun x bs => removeProjections bs (activeMask x.2.1 x.2.2)) (fun cs hcs => removeProjections_list_measurable cs _ hcs (activeMask_measurable.comp (by fun_prop))) simpa only [vs, List.map_map, Function.comp_def, constraintProjection, constraintBasis] using hout
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.constraintProjection_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:109
theorem nullspaceBasis_consumer_measurable Lemma nullspaceBasis_consumer_measurable in the paper ↗

Consumers of the actual nullspace basis are measurable for each retained prefix.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
Ω β :
q :
ℕ
a :
Ω → Fin (n / 4) → Fin n → ℝ
u :
Ω → Fin n → ℝ
ha :
hu :
F :
Ω → List (Fin n → ℝ) → β
hF :
∀ cs : List (Ω → Fin n → ℝ)
if
(∀ c ∈ cs, Measurable c)
then
Measurable (fun x => F x (cs.map (fun c => c x)))
Measurable (fun x => F x (nullspaceBasis (a x) q (u x)))
Proof (Lean source)
-- @node: nullspaceBasis_consumer_measurable lemma nullspaceBasis_consumer_measurable {Ω β : Type*} [MeasurableSpace Ω] [MeasurableSpace β] (q : ℕ) (a : Ω → Fin (n / 4) → Fin n → ℝ) (u : Ω → Fin n → ℝ) (ha : Measurable a) (hu : Measurable u) (F : Ω → List (Fin n → ℝ) → β) (hF : ∀ cs : List (Ω → Fin n → ℝ), (∀ c ∈ cs, Measurable c) → Measurable (fun x => F x (cs.map (fun c => c x)))) : Measurable (fun x => F x (nullspaceBasis (a x) q (u x))) := by let vs := (finRange n).map (fun j => fun x => constraintProjection (a x) q (u x) (fun i => if i = j then 1 else 0)) have hvs : ∀ v ∈ vs, Measurable v := by intro v hv obtain ⟨j, _, rfl⟩ := List.mem_map.mp hv fun_prop have hout := orderedOrtho_consumer_measurable vs hvs F hF simpa only [vs, List.map_map, Function.comp_def, nullspaceBasis] using hout
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_consumer_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:131
theorem inverseCDF_list_measurable Lemma inverseCDF_list_measurable in the paper ↗

Inverse-CDF selection is measurable for lists indexed by their measurable members. Under the stated conditions.

Formal statement
n :
ℕ
shared
Ω :
cs :
List (Ω → Fin n → ℝ)
w :
(Ω → Fin n → ℝ) → Ω → ℝ
t :
Ω → ℝ
hcs :
∀ c ∈ cs, Measurable c
hw :
∀ c ∈ cs, Measurable (w c)
ht :
Measurable (fun x => inverseCDF (cs.map (fun c => (c x, w c x))) (t x))
Proof (Lean source)
-- @node: inverseCDF_list_measurable lemma inverseCDF_list_measurable {Ω : Type*} [MeasurableSpace Ω] (cs : List (Ω → Fin n → ℝ)) (w : (Ω → Fin n → ℝ) → Ω → ℝ) (t : Ω → ℝ) (hcs : ∀ c ∈ cs, Measurable c) (hw : ∀ c ∈ cs, Measurable (w c)) (ht : Measurable t) : Measurable (fun x => inverseCDF (cs.map (fun c => (c x, w c x))) (t x)) := by have h := inverseCDF_family_measurable cs.attach (fun c x => c.val x) (fun c x => w c.val x) t (fun c => hcs c.val c.property) (fun c => hw c.val c.property) ht convert h using 1 funext x have he := List.attach_map_val (l := cs) (f := fun c => (c x, w c x)) rw [he]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.inverseCDF_list_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:150
theorem boundaryBasisMove_list_measurable Lemma boundaryBasisMove_list_measurable in the paper ↗

The specified basis sampling and asymmetric boundary move form a Borel consumer. Under the stated conditions.

Formal statement
n :
ℕ
shared
Ω :
cs :
List (Ω → Fin n → ℝ)
u :
Ω → Fin n → ℝ
t₁ t₂ :
Ω → ℝ
hcs :
∀ c ∈ cs, Measurable c
hu :
ht₁ :
ht₂ :
Measurable (fun x => let bs := cs.map (fun c => c x) let ws := bs.map (fun v => (boundaryPlus (u x) v * boundaryMinus (u x) v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) (t₁ x) if t₂ x < boundaryMinus (u x) v / (boundaryPlus (u x) v + boundaryMinus (u x) v) then u x + boundaryPlus (u x) v • v else u x - boundaryMinus (u x) v • v)
Proof (Lean source)
-- @node: boundaryBasisMove_list_measurable lemma boundaryBasisMove_list_measurable {Ω : Type*} [MeasurableSpace Ω] (cs : List (Ω → Fin n → ℝ)) (u : Ω → Fin n → ℝ) (t₁ t₂ : Ω → ℝ) (hcs : ∀ c ∈ cs, Measurable c) (hu : Measurable u) (ht₁ : Measurable t₁) (ht₂ : Measurable t₂) : Measurable (fun x => let bs := cs.map (fun c => c x) let ws := bs.map (fun v => (boundaryPlus (u x) v * boundaryMinus (u x) v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) (t₁ x) if t₂ x < boundaryMinus (u x) v / (boundaryPlus (u x) v + boundaryMinus (u x) v) then u x + boundaryPlus (u x) v • v else u x - boundaryMinus (u x) v • v) := by let w (c : Ω → Fin n → ℝ) (x : Ω) := (boundaryPlus (u x) (c x) * boundaryMinus (u x) (c x))⁻¹ have hw (c) (hc : c ∈ cs) : Measurable (w c) := by have hcm := hcs c hc dsimp [w] fun_prop let S (x : Ω) := (cs.map (fun c => w c x)).sum have hS : Measurable S := by dsimp [S] have hm := List.measurable_fun_sum (cs.map w) (by intro f hf obtain ⟨c, hc, rfl⟩ := List.mem_map.mp hf exact hw c hc) simpa only [List.map_map, Function.comp_def] using hm let v (x : Ω) := inverseCDF (cs.map (fun c => (c x, w c x / S x))) (t₁ x) have hv : Measurable v := inverseCDF_list_measurable cs (fun c x => w c x / S x) t₁ hcs (fun c hc => (hw c hc).div hS) ht₁ have hout := boundaryMove_measurable u v t₂ hu hv ht₂ convert hout using 1 ext x have hz (ls : List (Ω → Fin n → ℝ)) : (ls.map (fun c => c x)).zip ((ls.map (fun c => w c x)).map (fun z => z / S x)) = ls.map (fun c => (c x, w c x / S x)) := by induction ls with | nil => rfl | cons c ls ih => simp only [List.map_cons, List.zip_cons_cons, ih] simp only [List.map_map, Function.comp_def] dsimp only [v, S, w] at hz ⊢ simp only [List.map_map, Function.comp_def] at hz rw [hz cs]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.boundaryBasisMove_list_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:165
theorem roundingStep_measurable Lemma roundingStep_measurable in the paper ↗

[ The actual nonterminal move is Borel for a fixed number of retained constraints. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
q :
ℕ
Measurable (fun x : (Fin (n / 4) → Fin n → ℝ) × ((Fin n → ℝ) × (ℝ × ℝ)) => roundingStep x.1 q x.2.1 x.2.2.1 x.2.2.2)
Proof (Lean source)
@[fun_prop] -- @node: roundingStep_measurable lemma roundingStep_measurable (q : ℕ) : Measurable (fun x : (Fin (n / 4) → Fin n → ℝ) × ((Fin n → ℝ) × (ℝ × ℝ)) => roundingStep x.1 q x.2.1 x.2.2.1 x.2.2.2) := by let F (x : (Fin (n / 4) → Fin n → ℝ) × ((Fin n → ℝ) × (ℝ × ℝ))) (bs : List (Fin n → ℝ)) := let ws := bs.map (fun v => (boundaryPlus x.2.1 v * boundaryMinus x.2.1 v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) x.2.2.1 if x.2.2.2 < boundaryMinus x.2.1 v / (boundaryPlus x.2.1 v + boundaryMinus x.2.1 v) then x.2.1 + boundaryPlus x.2.1 v • v else x.2.1 - boundaryMinus x.2.1 v • v have hF (cs : List (((Fin (n / 4) → Fin n → ℝ) × ((Fin n → ℝ) × (ℝ × ℝ))) → Fin n → ℝ)) (hcs : ∀ c ∈ cs, Measurable c) : Measurable (fun x => F x (cs.map (fun c => c x))) := by exact boundaryBasisMove_list_measurable cs (fun x => x.2.1) (fun x => x.2.2.1) (fun x => x.2.2.2) hcs (measurable_fst.comp measurable_snd) (measurable_fst.comp (measurable_snd.comp measurable_snd)) (measurable_snd.comp (measurable_snd.comp measurable_snd)) have hout := nullspaceBasis_consumer_measurable q (fun x => x.1) (fun x => x.2.1) measurable_fst (measurable_fst.comp measurable_snd) F hF exact hout
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:208
theorem roundingStep_family_measurable Lemma roundingStep_family_measurable in the paper ↗

Discrete retained-count choices can be combined with the Borel step family.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
Ω :
a :
Ω → Fin (n / 4) → Fin n → ℝ
q :
Ω → ℕ
u :
Ω → Fin n → ℝ
t₁ t₂ :
Ω → ℝ
ha :
hq :
hu :
ht₁ :
ht₂ :
Measurable (fun x => roundingStep (a x) (q x) (u x) (t₁ x) (t₂ x))
Proof (Lean source)
-- @node: roundingStep_family_measurable lemma roundingStep_family_measurable {Ω : Type*} [MeasurableSpace Ω] (a : Ω → Fin (n / 4) → Fin n → ℝ) (q : Ω → ℕ) (u : Ω → Fin n → ℝ) (t₁ t₂ : Ω → ℝ) (ha : Measurable a) (hq : Measurable q) (hu : Measurable u) (ht₁ : Measurable t₁) (ht₂ : Measurable t₂) : Measurable (fun x => roundingStep (a x) (q x) (u x) (t₁ x) (t₂ x)) := by have h : Measurable (fun x : ((Fin (n / 4) → Fin n → ℝ) × ((Fin n → ℝ) × (ℝ × ℝ))) × ℕ => roundingStep x.1.1 x.2 x.1.2.1 x.1.2.2.1 x.1.2.2.2) := measurable_from_prod_countable_left roundingStep_measurable exact h.comp ((ha.prodMk (hu.prodMk (ht₁.prodMk ht₂))).prodMk hq)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_family_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:232
theorem activeFilter_consumer_measurable Lemma activeFilter_consumer_measurable in the paper ↗

Filtering a finite index list by active tests preserves measurable consumers. Under the stated conditions.

Formal statement
n :
ℕ
shared
Ω β :
l :
List (Fin n)
u :
Ω → Fin n → ℝ
hu :
F :
Ω → List (Fin n) → β
hF :
∀ cs, Measurable (fun x => F x cs)
Measurable (fun x => F x (l.filter (fun i => decide (|u x i| < 1))))
Proof (Lean source)
-- @node: activeFilter_consumer_measurable lemma activeFilter_consumer_measurable {Ω β : Type*} [MeasurableSpace Ω] [MeasurableSpace β] (l : List (Fin n)) (u : Ω → Fin n → ℝ) (hu : Measurable u) (F : Ω → List (Fin n) → β) (hF : ∀ cs, Measurable (fun x => F x cs)) : Measurable (fun x => F x (l.filter (fun i => decide (|u x i| < 1)))) := by classical induction l generalizing F with | nil => exact hF [] | cons i l ih => have hp : MeasurableSet {x | |u x i| < 1} := by apply measurableSet_lt <;> fun_prop have hyes := ih (fun x cs => F x (i :: cs)) (fun cs => hF (i :: cs)) have hno := ih F hF have hout : Measurable (fun x => if |u x i| < 1 then F x (i :: l.filter (fun i => decide (|u x i| < 1))) else F x (l.filter (fun i => decide (|u x i| < 1)))) := Measurable.ite hp hyes hno convert hout using 1 ext x by_cases hx : |u x i| < 1 <;> simp [hx]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.activeFilter_consumer_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:246
theorem activeIndices_consumer_measurable Lemma activeIndices_consumer_measurable in the paper ↗

The actual active list has measurable consumers, including changing lengths and heads. Under the stated conditions.

Formal statement
n :
ℕ
shared
Ω β :
u :
Ω → Fin n → ℝ
hu :
F :
Ω → List (Fin n) → β
hF :
∀ cs, Measurable (fun x => F x cs)
Measurable (fun x => F x (activeIndices (u x)))
Proof (Lean source)
-- @node: activeIndices_consumer_measurable lemma activeIndices_consumer_measurable {Ω β : Type*} [MeasurableSpace Ω] [MeasurableSpace β] (u : Ω → Fin n → ℝ) (hu : Measurable u) (F : Ω → List (Fin n) → β) (hF : ∀ cs, Measurable (fun x => F x cs)) : Measurable (fun x => F x (activeIndices (u x))) := by exact activeFilter_consumer_measurable (finRange n) u hu F hF
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.activeIndices_consumer_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:269
theorem phaseMove_family_measurable Lemma phaseMove_family_measurable in the paper ↗

Phase transitions, including terminal head selection, are Borel. Under the stated conditions.

Formal statement
n :
ℕ
shared
Ω :
a :
Ω → Fin (n / 4) → Fin n → ℝ
st :
Ω → RoundingState n
t₁ t₂ :
Ω → ℝ
ha :
hst :
ht₁ :
ht₂ :
Measurable (fun x => phaseMove (a x) (st x) (t₁ x) (t₂ x))
Proof (Lean source)
-- @node: phaseMove_family_measurable lemma phaseMove_family_measurable {Ω : Type*} [MeasurableSpace Ω] (a : Ω → Fin (n / 4) → Fin n → ℝ) (st : Ω → RoundingState n) (t₁ t₂ : Ω → ℝ) (ha : Measurable a) (hst : Measurable st) (ht₁ : Measurable t₁) (ht₂ : Measurable t₂) : Measurable (fun x => phaseMove (a x) (st x) (t₁ x) (t₂ x)) := by classical let F (x : Ω) (active : List (Fin n)) : RoundingState n := if active.length ≤ (st x).2.1 ∧ active.length ≤ 3 then match active with | [] => st x | i :: _ => (update (st x).1 i (if t₂ x < (1 + (st x).1 i) / 2 then 1 else -1), n, 0) else (roundingStep (a x) (if active.length ≤ (st x).2.1 then active.length / 4 else (st x).2.2) (st x).1 (t₁ x) (t₂ x), (if active.length ≤ (st x).2.1 then active.length / 2 else (st x).2.1), (if active.length ≤ (st x).2.1 then active.length / 4 else (st x).2.2)) have hu : Measurable (fun x => (st x).1) := by fun_prop have hF (active : List (Fin n)) : Measurable (fun x => F x active) := by have hp : MeasurableSet {x | active.length ≤ (st x).2.1} := by apply measurableSet_le <;> fun_prop have hq : Measurable (fun x => if active.length ≤ (st x).2.1 then active.length / 4 else (st x).2.2) := Measurable.ite hp measurable_const (by fun_prop) have hs : Measurable (fun x => if active.length ≤ (st x).2.1 then active.length / 2 else (st x).2.1) := Measurable.ite hp measurable_const (by fun_prop) have hm := roundingStep_family_measurable a _ _ t₁ t₂ ha hq hu ht₁ ht₂ have hnon := hm.prodMk (hs.prodMk hq) have hterm : Measurable (fun x => match active with | [] => st x | i :: _ => (update (st x).1 i (if t₂ x < (1 + (st x).1 i) / 2 then (1 : ℝ) else -1), n, 0)) := by cases active with | nil => exact hst | cons i is => exact (terminalMove_measurable _ t₂ i hu ht₂).prodMk (measurable_const.prodMk measurable_const) by_cases hsmall : active.length ≤ 3 · simpa only [F, hsmall, and_true] using Measurable.ite hp hterm hnon · simpa only [F, hsmall, and_false, if_false] using hnon exact activeIndices_consumer_measurable _ hu F hF
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_family_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:278
theorem roundingIteration_measurable

Every fractional iteration is jointly Borel in input rows and all seeds. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
k :
ℕ
Measurable (fun x : (Fin (n / 4) → Fin n → ℝ) × RoundingSeeds n => roundingIteration x.1 x.2 k)
Proof (Lean source)
@[fun_prop] -- @node: roundingIteration_measurable lemma roundingIteration_measurable (k : ℕ) : Measurable (fun x : (Fin (n / 4) → Fin n → ℝ) × RoundingSeeds n => roundingIteration x.1 x.2 k) := by induction k with | zero => exact measurable_const | succ k ih => exact phaseMove_family_measurable _ _ _ _ measurable_fst ih ((roundingSeed_measurable (2 * k)).comp measurable_snd) ((roundingSeed_measurable (2 * k + 1)).comp measurable_snd)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:324
theorem orderedBoundaryRounding_measurable

The full signing map is Borel, without any rank or row-bound premise. This uses the stated conclusion.

Formal statement
n :
ℕ
Measurable (fun x : (Fin (n / 4) → Fin n → ℝ) × RoundingSeeds n => orderedBoundaryRounding n x.1 x.2)
Proof (Lean source)
@[fun_prop] -- @node: orderedBoundaryRounding_measurable lemma orderedBoundaryRounding_measurable (n : ℕ) : Measurable (fun x : (Fin (n / 4) → Fin n → ℝ) × RoundingSeeds n => orderedBoundaryRounding n x.1 x.2) := by unfold orderedBoundaryRounding apply measurable_pi_lambda intro i apply measurable_to_bool have h : MeasurableSet {x : (Fin (n / 4) → Fin n → ℝ) × RoundingSeeds n | 0 < (roundingIteration x.1 x.2 n).1 i} := by apply measurableSet_lt <;> fun_prop convert h using 1 ext x simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedBoundaryRounding_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRankBorel.lean:337
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingRowBudget 14 declarations The phase metadata keeps twice the retained count below the stopping count.

Row variance budgets for the actual rounding moves

The phase metadata keeps twice the retained count below the stopping count. Thus each live move has a uniform row-to-energy comparison, including refreshes and terminal single-coordinate moves.

theorem phaseMove_twice_retained_le_stop Lemma phaseMove_twice_retained_le_stop in the paper ↗

Phase refreshes preserve the stronger rank invariant needed for energy comparison. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ seed₂ :
ℝ
hq :
2 * st.2.2 ≤ st.2.1
2 * (phaseMove a st seed₁ seed₂).2.2 ≤ (phaseMove a st seed₁ seed₂).2.1
Proof (Lean source)
-- @node: phaseMove_twice_retained_le_stop lemma phaseMove_twice_retained_le_stop (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (seed₁ seed₂ : ℝ) (hq : 2 * st.2.2 ≤ st.2.1) : 2 * (phaseMove a st seed₁ seed₂).2.2 ≤ (phaseMove a st seed₁ seed₂).2.1 := by dsimp only [phaseMove] split_ifs with hsmall hstart · cases activeIndices st.1 with | nil => exact hq | cons i is => simp · dsimp only omega · exact hq
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_twice_retained_le_stop · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:18
theorem roundingIteration_twice_retained_le_stop

Every actual state carries the stronger retained-count invariant. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
2 * (roundingIteration a seeds k).2.2 ≤ (roundingIteration a seeds k).2.1
Proof (Lean source)
-- @node: roundingIteration_twice_retained_le_stop lemma roundingIteration_twice_retained_le_stop (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) : 2 * (roundingIteration a seeds k).2.2 ≤ (roundingIteration a seeds k).2.1 := by induction k with | zero => simp [roundingIteration] | succ k ih => exact phaseMove_twice_retained_le_stop a _ _ _ ih
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_twice_retained_le_stop · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:32
theorem roundingStep_half_rank_variance_energy_le Lemma roundingStep_half_rank_variance_energy_le in the paper ↗

Any move retaining at most half the active count has a uniform row-to-energy bound. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u c :
Fin n → ℝ
Λ :
ℝ
hc :
∀ i, |c i| ≤ Λ
hq :
2 * q < (activeIndices u).length
(∫ seed₁, ∫ seed₂, rowDot c (roundingStep a q u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
≤ 4 * Λ ^ 2 * (∫ seed₁, ∫ seed₂, rowDot (roundingStep a q u seed₁ seed₂) (roundingStep a q u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
-- @node: roundingStep_half_rank_variance_energy_le lemma roundingStep_half_rank_variance_energy_le (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u c : Fin n → ℝ) (Λ : ℝ) (hc : ∀ i, |c i| ≤ Λ) (hq : 2 * q < (activeIndices u).length) : (∫ seed₁, ∫ seed₂, rowDot c (roundingStep a q u seed₁ seed₂ - u) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) ≤ 4 * Λ ^ 2 * (∫ seed₁, ∫ seed₂, rowDot (roundingStep a q u seed₁ seed₂) (roundingStep a q u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) := by have hne := nullspaceBasis_nonempty_of_active_count a q u (by omega) have hk : 0 < ((nullspaceBasis a q u).length : ℝ) := by exact_mod_cast List.length_pos_iff.mpr hne have hr := nullspaceBasis_rank_lower_bound a q u have ha : ((activeIndices u).length : ℝ) ≤ 4 * (nullspaceBasis a q u).length := by exact_mod_cast (show (activeIndices u).length ≤ 4 * (nullspaceBasis a q u).length by omega) have he : 0 ≤ (∫ seed₁, ∫ seed₂, rowDot (roundingStep a q u seed₁ seed₂) (roundingStep a q u seed₁ seed₂) - rowDot u u ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) := by rw [roundingStep_lottery_energy_increment a q u hne] exact mul_nonneg (inv_nonneg.mpr (nullspaceBasis_boundary_weight_sum_pos a q u hne).le) hk.le have hb := roundingStep_row_variance_energy_le a q u c Λ hc hne have hm := mul_le_mul_of_nonneg_left ha (mul_nonneg (sq_nonneg Λ) he) nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_half_rank_variance_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:41
theorem phaseMove_row_variance_energy_le Lemma phaseMove_row_variance_energy_le in the paper ↗

Actual metadata gives the row-to-energy comparison on every move, including phase refreshes, terminal coins, and identity padding. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
c :
Fin n → ℝ
Λ :
ℝ
hc :
∀ i, |c i| ≤ Λ
hu :
∀ i, |st.1 i| ≤ 1
hq :
2 * st.2.2 ≤ st.2.1
(∫ seed₁, ∫ seed₂, rowDot c ((phaseMove a st seed₁ seed₂).1 - st.1) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
≤ 4 * Λ ^ 2 * (∫ seed₁, ∫ seed₂, rowDot (phaseMove a st seed₁ seed₂).1 (phaseMove a st seed₁ seed₂).1 - rowDot st.1 st.1 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
-- @node: phaseMove_row_variance_energy_le lemma phaseMove_row_variance_energy_le (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (c : Fin n → ℝ) (Λ : ℝ) (hc : ∀ i, |c i| ≤ Λ) (hu : ∀ i, |st.1 i| ≤ 1) (hq : 2 * st.2.2 ≤ st.2.1) : (∫ seed₁, ∫ seed₂, rowDot c ((phaseMove a st seed₁ seed₂).1 - st.1) ^ 2 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) ≤ 4 * Λ ^ 2 * (∫ seed₁, ∫ seed₂, rowDot (phaseMove a st seed₁ seed₂).1 (phaseMove a st seed₁ seed₂).1 - rowDot st.1 st.1 ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ by_cases hs : (activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3 · cases he : activeIndices st.1 with | nil => simp [phaseMove, hs, he, rowDot] | cons i is => have hs' : (i :: is).length ≤ st.2.1 ∧ (i :: is).length ≤ 3 := by simpa only [he] using hs simp only [phaseMove, he, if_pos hs'] have hb := terminal_seed_row_variance_energy_le st.1 c i Λ (hu i) (hc i) have hnonneg : 0 ≤ 1 - st.1 i ^ 2 := by have hh := mul_self_le_mul_self (abs_nonneg (st.1 i)) (hu i) simp only [← pow_two, sq_abs, one_pow] at hh linarith simp only [integral_const, measureReal_def, measure_univ, ENNReal.toReal_one, one_smul] apply hb.trans rw [terminal_seed_energy_increment] nlinarith [mul_nonneg (sq_nonneg Λ) hnonneg] · simp only [phaseMove, if_neg hs] by_cases hstart : (activeIndices st.1).length ≤ st.2.1 · simp only [if_pos hstart] apply roundingStep_half_rank_variance_energy_le a _ st.1 c Λ hc omega · simp only [if_neg hstart] apply roundingStep_half_rank_variance_energy_le a _ st.1 c Λ hc omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_row_variance_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:67
theorem cube_coordinate_average_measurable Lemma cube_coordinate_average_measurable in the paper ↗

[ Averaging a fresh cube coordinate preserves measurability. This uses the hf hypothesis, the stated conclusion.

Formal statement
m :
ℕ
j :
Fin m
f :
Cube m → ℝ
hf :
Measurable (fun x => ∫ t, f (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1))
Proof (Lean source)
@[fun_prop] -- @node: cube_coordinate_average_measurable lemma cube_coordinate_average_measurable {m : ℕ} (j : Fin m) (f : Cube m → ℝ) (hf : Measurable f) : Measurable (fun x => ∫ t, f (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) := by have hm : Measurable (fun p : Cube m × ℝ => f (update p.1 j p.2)) := by fun_prop exact hm.stronglyMeasurable.integral_prod_right'.measurable
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_coordinate_average_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:107
theorem cube_coordinate_average_bound Lemma cube_coordinate_average_bound in the paper ↗

A uniform bound survives averaging one independent cube coordinate.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
m :
ℕ
j :
Fin m
f :
Cube m → ℝ
C :
ℝ
hC :
∀ x, ‖f x‖ ≤ C
x :
Cube m
‖∫ t, f (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)‖ ≤ C
Proof (Lean source)
-- @node: cube_coordinate_average_bound lemma cube_coordinate_average_bound {m : ℕ} (j : Fin m) (f : Cube m → ℝ) (C : ℝ) (hC : ∀ x, ‖f x‖ ≤ C) (x : Cube m) : ‖∫ t, f (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)‖ ≤ C := by letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ simpa only [measureReal_def, measure_univ, ENNReal.toReal_one, mul_one] using norm_integral_le_of_norm_le_const (μ := volume.restrict (Icc (0 : ℝ) 1)) (f := fun t => f (update x j t)) (Filter.Eventually.of_forall (fun t => hC _))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_coordinate_average_bound · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:118
theorem cube_integral_coordinate_average

Independent coordinate averaging preserves the full cube integral. Under the stated conditions.

Formal statement
m :
ℕ
j :
Fin m
f :
Cube m → ℝ
hf :
C :
ℝ
hC :
∀ x, ‖f x‖ ≤ C
(∫ x, f x ∂cubeMeasure m)
= ∫ x, ∫ t, f (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1) ∂cubeMeasure m
Proof (Lean source)
-- @node: cube_integral_coordinate_average lemma cube_integral_coordinate_average {m : ℕ} (j : Fin m) (f : Cube m → ℝ) (hf : Measurable f) (C : ℝ) (hC : ∀ x, ‖f x‖ ≤ C) : (∫ x, f x ∂cubeMeasure m) = ∫ x, ∫ t, f (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1) ∂cubeMeasure m := by have : IsFiniteMeasure (cubeMeasure m) := by unfold cubeMeasure; infer_instance apply cube_integral_eq_of_fresh_coordinate j · exact Integrable.of_bound hf.aestronglyMeasurable C (Filter.Eventually.of_forall hC) · exact Integrable.of_bound (cube_coordinate_average_measurable j f hf).aestronglyMeasurable C (Filter.Eventually.of_forall (cube_coordinate_average_bound j f C hC)) · intro x; rfl · intro x t simp only [Function.update_idem]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_integral_coordinate_average · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:131
theorem cube_integral_le_of_two_fresh_coordinates

A bounded two-fresh-coordinate comparison integrates over all preceding history. Under the stated conditions.

Formal statement
m :
ℕ
j l :
Fin m
f g :
Cube m → ℝ
hf :
hg :
C D :
ℝ
hC :
∀ x, ‖f x‖ ≤ C
hD :
∀ x, ‖g x‖ ≤ D
hle :
∀ x,
(∫ s, ∫ t, f (update (update x j s) l t) ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1))
≤ ∫ s, ∫ t, g (update (update x j s) l t) ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)
(∫ x, f x ∂cubeMeasure m) ≤ ∫ x, g x ∂cubeMeasure m
Proof (Lean source)
-- @node: cube_integral_le_of_two_fresh_coordinates lemma cube_integral_le_of_two_fresh_coordinates {m : ℕ} (j l : Fin m) (f g : Cube m → ℝ) (hf : Measurable f) (hg : Measurable g) (C D : ℝ) (hC : ∀ x, ‖f x‖ ≤ C) (hD : ∀ x, ‖g x‖ ≤ D) (hle : ∀ x, (∫ s, ∫ t, f (update (update x j s) l t) ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) ≤ ∫ s, ∫ t, g (update (update x j s) l t) ∂volume.restrict (Icc (0 : ℝ) 1) ∂volume.restrict (Icc (0 : ℝ) 1)) : (∫ x, f x ∂cubeMeasure m) ≤ ∫ x, g x ∂cubeMeasure m := by have : IsFiniteMeasure (cubeMeasure m) := by unfold cubeMeasure; infer_instance rw [cube_integral_coordinate_average l f hf C hC, cube_integral_coordinate_average l g hg D hD] rw [cube_integral_coordinate_average j _ (cube_coordinate_average_measurable l f hf) C (cube_coordinate_average_bound l f C hC), cube_integral_coordinate_average j _ (cube_coordinate_average_measurable l g hg) D (cube_coordinate_average_bound l g D hD)] apply integral_mono · exact Integrable.of_bound (cube_coordinate_average_measurable j _ (cube_coordinate_average_measurable l f hf)).aestronglyMeasurable C (Filter.Eventually.of_forall (cube_coordinate_average_bound j _ C (cube_coordinate_average_bound l f C hC))) · exact Integrable.of_bound (cube_coordinate_average_measurable j _ (cube_coordinate_average_measurable l g hg)).aestronglyMeasurable D (Filter.Eventually.of_forall (cube_coordinate_average_bound j _ D (cube_coordinate_average_bound l g D hD))) · exact hle
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_integral_le_of_two_fresh_coordinates · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:146

A cube-valued state has a uniformly bounded deterministic row evaluation. Under the stated conditions.

Formal statement
n :
ℕ
shared
c u :
Fin n → ℝ
hu :
∀ i, |u i| ≤ 1
|rowDot c u| ≤ ∑ i, |c i|
Proof (Lean source)
-- @node: rowDot_cube_abs_le lemma rowDot_cube_abs_le (c u : Fin n → ℝ) (hu : ∀ i, |u i| ≤ 1) : |rowDot c u| ≤ ∑ i, |c i| := by unfold rowDot apply (Finset.abs_sum_le_sum_abs _ _).trans apply Finset.sum_le_sum intro i _ rw [abs_mul] simpa using mul_le_mul_of_nonneg_left (hu i) (abs_nonneg (c i))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.rowDot_cube_abs_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:175
theorem rowDot_cube_energy_bounds Lemma rowDot_cube_energy_bounds in the paper ↗

Cube-valued states have norm energy between zero and the ambient count. Under the stated conditions.

Formal statement
n :
ℕ
shared
u :
Fin n → ℝ
hu :
∀ i, |u i| ≤ 1
conclusion 1
0 ≤ rowDot u u
conclusion 2
rowDot u u ≤ n
Proof (Lean source)
-- @node: rowDot_cube_energy_bounds lemma rowDot_cube_energy_bounds (u : Fin n → ℝ) (hu : ∀ i, |u i| ≤ 1) : 0 ≤ rowDot u u ∧ rowDot u u ≤ n := by refine ⟨Finset.sum_nonneg (fun i _ => mul_self_nonneg (u i)), ?_⟩ have hi (i : Fin n) : u i * u i ≤ 1 := by have hh := mul_self_le_mul_self (abs_nonneg (u i)) (hu i) simpa only [mul_one, ← pow_two, sq_abs, one_pow] using hh simpa only [rowDot, Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul, mul_one] using Finset.sum_le_sum (s := univ) (fun i _ => hi i)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.rowDot_cube_energy_bounds · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:186
theorem roundingIteration_masked_row_variance_energy_le

Averaging a predictably selected actual move compares its row variance with its norm-energy expenditure, after integrating both fresh seeds. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
c :
Fin n → ℝ
Λ :
ℝ
hc :
∀ i, |c i| ≤ Λ
k :
ℕ
hk :
k < n
E :
hE :
hpast :
∀ seeds (j : Fin (3 * n)) t
if
2 * k ≤ j.val
then
(update seeds j t ∈ E ↔ seeds ∈ E)
(∫ seeds, (E.indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 ∂roundingSeedLaw n)
≤ 4 * Λ ^ 2 * (∫ seeds, E.indicator (fun seeds => rowDot (roundingIteration a seeds (k + 1)).1 (roundingIteration a seeds (k + 1)).1 - rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1) seeds ∂roundingSeedLaw n)
Proof (Lean source)
-- @node: roundingIteration_masked_row_variance_energy_le lemma roundingIteration_masked_row_variance_energy_le (a : Fin (n / 4) → Fin n → ℝ) (c : Fin n → ℝ) (Λ : ℝ) (hc : ∀ i, |c i| ≤ Λ) (k : ℕ) (hk : k < n) (E : Set (RoundingSeeds n)) (hE : MeasurableSet E) (hpast : ∀ seeds (j : Fin (3 * n)) t, 2 * k ≤ j.val → (update seeds j t ∈ E ↔ seeds ∈ E)) : (∫ seeds, (E.indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 ∂roundingSeedLaw n) ≤ 4 * Λ ^ 2 * (∫ seeds, E.indicator (fun seeds => rowDot (roundingIteration a seeds (k + 1)).1 (roundingIteration a seeds (k + 1)).1 - rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1) seeds ∂roundingSeedLaw n) := by classical let f (seeds : RoundingSeeds n) := (E.indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 let g (seeds : RoundingSeeds n) := 4 * Λ ^ 2 * E.indicator (fun seeds => rowDot (roundingIteration a seeds (k + 1)).1 (roundingIteration a seeds (k + 1)).1 - rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1) seeds rw [← integral_const_mul] change (∫ seeds, f seeds ∂cubeMeasure (3 * n)) ≤ ∫ seeds, g seeds ∂cubeMeasure (3 * n) have hf : Measurable f := by apply Measurable.pow_const apply Measurable.indicator _ hE unfold rowDot fun_prop have hg : Measurable g := by apply Measurable.const_mul apply Measurable.indicator _ hE unfold rowDot fun_prop apply cube_integral_le_of_two_fresh_coordinates (⟨2 * k, by omega⟩ : Fin (3 * n)) ⟨2 * k + 1, by omega⟩ f g hf hg ((2 * ∑ i, |c i|) ^ 2) (|4 * Λ ^ 2| * (2 * n)) · intro seeds have hb (l : ℕ) := rowDot_cube_abs_le c (roundingIteration a seeds l).1 (roundingIteration_cube_and_count a seeds l).1 have hd : |rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1| ≤ 2 * ∑ i, |c i| := by have hh := abs_sub_le (rowDot c (roundingIteration a seeds (k + 1)).1) 0 (rowDot c (roundingIteration a seeds k).1) simp only [sub_zero, zero_sub, abs_neg] at hh linarith [hb (k + 1), hb k] by_cases hs : seeds ∈ E · simp only [f, Set.indicator_of_mem hs, Real.norm_eq_abs, abs_sq] simpa only [← pow_two, sq_abs] using mul_self_le_mul_self (abs_nonneg _) hd · simp [f, Set.indicator_of_notMem hs, sq_nonneg] · intro seeds have hb (l : ℕ) := rowDot_cube_energy_bounds (roundingIteration a seeds l).1 (roundingIteration_cube_and_count a seeds l).1 have hd : |rowDot (roundingIteration a seeds (k + 1)).1 (roundingIteration a seeds (k + 1)).1 - rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1| ≤ 2 * n := by apply abs_le.mpr constructor <;> linarith [hb (k + 1), hb k] by_cases hs : seeds ∈ E · simp only [g, Set.indicator_of_mem hs, Real.norm_eq_abs, abs_mul] exact mul_le_mul_of_nonneg_left hd (by positivity) · simp [g, Set.indicator_of_notMem hs]; positivity · intro seeds have hfirst : 2 * k < 3 * n := by omega have hsecond : 2 * k + 1 < 3 * n := by omega have hne : (⟨2 * k, hfirst⟩ : Fin (3 * n)) ≠ ⟨2 * k + 1, hsecond⟩ := by intro he; have hh := congrArg val he; dsimp at hh; omega have hprev (s t : ℝ) : roundingIteration a (update (update seeds ⟨2 * k, hfirst⟩ s) ⟨2 * k + 1, hsecond⟩ t) k = roundingIteration a seeds k := by rw [roundingIteration_update_future a _ k _ t (by dsimp; omega), roundingIteration_update_future a seeds k _ s (by dsimp; omega)] have hnext (s t : ℝ) : roundingIteration a (update (update seeds ⟨2 * k, hfirst⟩ s) ⟨2 * k + 1, hsecond⟩ t) (k + 1) = phaseMove a (roundingIteration a seeds k) s t := by simp only [roundingIteration, hprev, roundingSeed, dif_pos hfirst, dif_pos hsecond, Function.update_of_ne hne, Function.update_self] have hevent (s t : ℝ) : update (update seeds ⟨2 * k, hfirst⟩ s) ⟨2 * k + 1, hsecond⟩ t ∈ E ↔ seeds ∈ E := by rw [hpast _ _ t (by dsimp; omega), hpast _ _ s (by dsimp; omega)] by_cases hs : seeds ∈ E · simp only [f, g, indicator, hevent, hs, if_true, hnext, hprev] simp_rw [show ∀ u v : Fin n → ℝ, rowDot c u - rowDot c v = rowDot c (u - v) from fun u v => (dotProduct_sub c u v).symm] simp_rw [integral_const_mul] exact phaseMove_row_variance_energy_le a (roundingIteration a seeds k) c Λ hc (roundingIteration_cube_and_count a seeds k).1 (roundingIteration_twice_retained_le_stop a seeds k) · simp only [f, g, indicator, hevent, hs, if_false, zero_pow (by decide : 2 ≠ 0), mul_zero, integral_zero, le_refl]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_masked_row_variance_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:197
theorem roundingIteration_masked_row_variance_sum_le

The variance-to-energy comparison sums over any predictable family of move masks. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
c :
Fin n → ℝ
Λ :
ℝ
hc :
∀ i, |c i| ≤ Λ
E :
ℕ → Set (RoundingSeeds n)
hE :
∀ k < n, MeasurableSet (E k)
hpast :
∀ k < n,
∀ seeds (j : Fin (3 * n)) t,
2 * k ≤ j.val → (update seeds j t ∈ E k ↔ seeds ∈ E k)
(∑ k ∈ range n, ∫ seeds, ((E k).indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 ∂roundingSeedLaw n)
≤ 4 * Λ ^ 2 * (∑ k ∈ range n, ∑ i : Fin n, ∫ seeds, ((E k).indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n)
Proof (Lean source)
-- @node: roundingIteration_masked_row_variance_sum_le lemma roundingIteration_masked_row_variance_sum_le (a : Fin (n / 4) → Fin n → ℝ) (c : Fin n → ℝ) (Λ : ℝ) (hc : ∀ i, |c i| ≤ Λ) (E : ℕ → Set (RoundingSeeds n)) (hE : ∀ k < n, MeasurableSet (E k)) (hpast : ∀ k < n, ∀ seeds (j : Fin (3 * n)) t, 2 * k ≤ j.val → (update seeds j t ∈ E k ↔ seeds ∈ E k)) : (∑ k ∈ range n, ∫ seeds, ((E k).indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 ∂roundingSeedLaw n) ≤ 4 * Λ ^ 2 * (∑ k ∈ range n, ∑ i : Fin n, ∫ seeds, ((E k).indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n) := by rw [Finset.mul_sum] apply Finset.sum_le_sum intro k hk have hkn := Finset.mem_range.mp hk rw [roundingIteration_masked_norm_energy a k hkn (E k) (hE k hkn) (fun seeds t => hpast k hkn seeds _ t (by dsimp; omega))] exact roundingIteration_masked_row_variance_energy_le a c Λ hc k hkn (E k) (hE k hkn) (hpast k hkn)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_masked_row_variance_sum_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:290
theorem roundingIteration_unprotected_coordinate_variance_sum_le

Energy spent after the first loss of row protection is bounded by the active count at that crossing, hence by four times the smaller of the row number and n. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
h :
ℕ
hh :
1 ≤ h
(∑ k ∈ range n, ∑ i : Fin n, ∫ seeds, ({seeds | (activeIndices (roundingIteration a seeds k).1).length < 4 * h}.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n)
≤ 4 * (min h n : ℕ)
Proof (Lean source)
-- @node: roundingIteration_unprotected_coordinate_variance_sum_le lemma roundingIteration_unprotected_coordinate_variance_sum_le (a : Fin (n / 4) → Fin n → ℝ) (h : ℕ) (hh : 1 ≤ h) : (∑ k ∈ range n, ∑ i : Fin n, ∫ seeds, ({seeds | (activeIndices (roundingIteration a seeds k).1).length < 4 * h}.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n) ≤ 4 * (min h n : ℕ) := by let K := roundingUnprotectedTime a h have hK : Measurable K := roundingUnprotectedTime_measurable a h have he (k : ℕ) (hk : k < n) : {seeds | K seeds ≤ k ∧ k < n} = {seeds | (activeIndices (roundingIteration a seeds k).1).length < 4 * h} := by ext seeds simp only [Set.mem_setOf_eq, hk, and_true, K, roundingUnprotectedTime_le_iff a h hh] have hb := roundingIteration_interval_coordinate_variance_le a K (fun _ => n) hK measurable_const (roundingUnprotectedTime_le_horizon a h) (fun _ => le_rfl) (roundingUnprotectedTime_interval_predictable a h hh) apply le_trans (b := ∫ seeds, ((activeIndices (roundingIteration a seeds (K seeds)).1).length : ℝ) ∂roundingSeedLaw n) · convert hb using 1 <;> try rfl apply Finset.sum_congr rfl intro k hk rw [he k (Finset.mem_range.mp hk)] · letI : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ letI : IsProbabilityMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw cubeMeasure infer_instance have hcount (seeds : RoundingSeeds n) : ((activeIndices (roundingIteration a seeds (K seeds)).1).length : ℝ) ≤ 4 * (min h n : ℕ) := by have hs := roundingUnprotectedTime_active_bound a h hh seeds exact_mod_cast (show (activeIndices (roundingIteration a seeds (K seeds)).1).length ≤ 4 * min h n by dsimp only [K]; omega) calc _ ≤ ∫ _ : RoundingSeeds n, (4 * (min h n : ℕ) : ℝ) ∂roundingSeedLaw n := integral_mono (roundingIteration_random_time_active_count_integrable a K hK) (integrable_const _) hcount _ = _ := by simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_unprotected_coordinate_variance_sum_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:314
theorem orderedBoundaryRounding_row_bound

Actual rounding signs satisfy the paper's row bound by predictable move orthogonality, the rank comparison, and the crossing-time energy telescope. Under the stated conditions.

Formal statement
n :
ℕ
shared
rows :
ℕ → Fin n → ℝ
Λ :
ℝ
hrows :
∀ h i
if
1 ≤ h
then
|rows h i| ≤ Λ
h :
ℕ
hh :
1 ≤ h
(∫ seeds, (∑ i, rows h i * sgn (orderedBoundaryRounding n (rowPrefix rows) seeds i)) ^ 2 ∂roundingSeedLaw n)
≤ 32 * Λ ^ 2 * (min h n : ℕ)
Proof (Lean source)
-- @node: orderedBoundaryRounding_row_bound lemma orderedBoundaryRounding_row_bound (rows : ℕ → Fin n → ℝ) (Λ : ℝ) (hrows : ∀ h i, 1 ≤ h → |rows h i| ≤ Λ) (h : ℕ) (hh : 1 ≤ h) : (∫ seeds, (∑ i, rows h i * sgn (orderedBoundaryRounding n (rowPrefix rows) seeds i)) ^ 2 ∂roundingSeedLaw n) ≤ 32 * Λ ^ 2 * (min h n : ℕ) := by let E (k : ℕ) := {seeds | (activeIndices (roundingIteration (rowPrefix rows) seeds k).1).length < 4 * h} have hb := roundingIteration_masked_row_variance_sum_le (rowPrefix rows) (rows h) Λ (fun i => hrows h i hh) E (fun k _ => roundingIteration_unprotected_event_measurable (rowPrefix rows) k h) (fun k _ seeds j t hj => roundingIteration_unprotected_event_predictable (rowPrefix rows) k h j hj seeds t) have he := roundingIteration_unprotected_coordinate_variance_sum_le (rowPrefix rows) h hh have hmul := mul_le_mul_of_nonneg_left he (by positivity : 0 ≤ 4 * Λ ^ 2) rw [orderedBoundaryRounding_unprotected_second_moment_sum rows h hh] have hid (u v : Fin n → ℝ) : rowDot (rows h) u - rowDot (rows h) v = rowDot (rows h) (fun i => u i - v i) := (dotProduct_sub _ _ _).symm simp only [hid] at hb change _ ≤ 4 * Λ ^ 2 * _ at hb have hn' : (0 : ℝ) ≤ (min h n : ℕ) := by positivity nlinarith [mul_nonneg (sq_nonneg Λ) hn']
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedBoundaryRounding_row_bound · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingRowBudget.lean:356
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingStoppedPhases 20 declarations Seed-history events select zero-padded phase increments without changing their conditional means.

Predictable selection of actual rounding moves

Seed-history events select zero-padded phase increments without changing their conditional means. Their finite second moments add exactly, and their coordinate variance is the corresponding selected norm-energy expenditure. Random interval masks telescope pathwise, so a phase's endpoint bound can be applied before integrating. The construction of the actual phase intervals is separate.

theorem cube_predictable_indicator_mean Lemma cube_predictable_indicator_mean in the paper ↗

A seed-history event can select a centered fresh increment without bias. Under the stated conditions.

Formal statement
m :
ℕ
j :
Fin m
E :
Set (Cube m)
D :
Cube m → ℝ
hignore :
∀ x t, update x j t ∈ E ↔ x ∈ E
hmean :
∀ x, (∫ t, D (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0
x :
(∫ t, E.indicator D (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0
Proof (Lean source)
-- @node: cube_predictable_indicator_mean lemma cube_predictable_indicator_mean {m : ℕ} (j : Fin m) (E : Set (Cube m)) (D : Cube m → ℝ) (hignore : ∀ x t, update x j t ∈ E ↔ x ∈ E) (hmean : ∀ x, (∫ t, D (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0) : ∀ x, (∫ t, E.indicator D (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0 := by classical intro x by_cases hx : x ∈ E · simp only [indicator, hignore, hx, if_true] exact hmean x · simp only [indicator, hignore, hx, if_false, integral_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_predictable_indicator_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:20
theorem cube_predictable_indicator_orthogonal

A predictable selected increment is orthogonal to any preceding square-integrable statistic, including a preceding selected partial sum. Under the stated conditions.

Formal statement
m :
ℕ
j :
Fin m
E :
Set (Cube m)
A D :
Cube m → ℝ
hE :
hA :
hD :
hignoreA :
∀ x t, A (update x j t) = A x
hignoreE :
∀ x t, update x j t ∈ E ↔ x ∈ E
hmean :
∀ x, (∫ t, D (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0
(∫ x, A x * E.indicator D x ∂cubeMeasure m) = 0
Proof (Lean source)
-- @node: cube_predictable_indicator_orthogonal lemma cube_predictable_indicator_orthogonal {m : ℕ} (j : Fin m) (E : Set (Cube m)) (A D : Cube m → ℝ) (hE : MeasurableSet E) (hA : MemLp A 2 (cubeMeasure m)) (hD : MemLp D 2 (cubeMeasure m)) (hignoreA : ∀ x t, A (update x j t) = A x) (hignoreE : ∀ x t, update x j t ∈ E ↔ x ∈ E) (hmean : ∀ x, (∫ t, D (update x j t) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0) : (∫ x, A x * E.indicator D x ∂cubeMeasure m) = 0 := by exact cube_fresh_increment_orthogonal j A (E.indicator D) hA (hD.indicator hE) hignoreA (cube_predictable_indicator_mean j E D hignoreE hmean)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cube_predictable_indicator_orthogonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:36
theorem roundingIteration_past_row_increment_update

Earlier actual row increments ignore every seed at or after the current move. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
c :
Fin n → ℝ
seeds :
k l :
ℕ
hl :
l < k
j :
Fin (3 * n)
hj :
2 * k ≤ j.val
t :
ℝ
rowDot c (roundingIteration a (update seeds j t) (l + 1)).1
- rowDot c (roundingIteration a (update seeds j t) l).1
= rowDot c (roundingIteration a seeds (l + 1)).1
- rowDot c (roundingIteration a seeds l).1
Proof (Lean source)
-- @node: roundingIteration_past_row_increment_update lemma roundingIteration_past_row_increment_update (a : Fin (n / 4) → Fin n → ℝ) (c : Fin n → ℝ) (seeds : RoundingSeeds n) (k l : ℕ) (hl : l < k) (j : Fin (3 * n)) (hj : 2 * k ≤ j.val) (t : ℝ) : rowDot c (roundingIteration a (update seeds j t) (l + 1)).1 - rowDot c (roundingIteration a (update seeds j t) l).1 = rowDot c (roundingIteration a seeds (l + 1)).1 - rowDot c (roundingIteration a seeds l).1 := by rw [roundingIteration_update_future a seeds (l + 1) j t (by omega), roundingIteration_update_future a seeds l j t (by omega)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_past_row_increment_update · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:53
theorem roundingIteration_masked_row_increment_memLp

Measurable phase membership preserves the actual increment's second moment domain. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
c :
Fin n → ℝ
k :
ℕ
E :
hE :
MemLp (E.indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1)) 2 (roundingSeedLaw n)
Proof (Lean source)
-- @node: roundingIteration_masked_row_increment_memLp lemma roundingIteration_masked_row_increment_memLp (a : Fin (n / 4) → Fin n → ℝ) (c : Fin n → ℝ) (k : ℕ) (E : Set (RoundingSeeds n)) (hE : MeasurableSet E) : MemLp (E.indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1)) 2 (roundingSeedLaw n) := ((roundingIteration_row_memLp a c (k + 1)).sub (roundingIteration_row_memLp a c k)).indicator hE
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_masked_row_increment_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:65
theorem roundingIteration_masked_row_increment_mean

The actual next coin centers every predictably selected row increment. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
c :
Fin n → ℝ
k :
ℕ
hk :
k < n
E :
hE :
∀ seeds t, update seeds ⟨2 * k + 1, by omega⟩ t ∈ E ↔ seeds ∈ E
seeds :
(∫ t, E.indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) (update seeds ⟨2 * k + 1, by omega⟩ t) ∂volume.restrict (Icc (0 : ℝ) 1))
= 0
Proof (Lean source)
-- @node: roundingIteration_masked_row_increment_mean lemma roundingIteration_masked_row_increment_mean (a : Fin (n / 4) → Fin n → ℝ) (c : Fin n → ℝ) (k : ℕ) (hk : k < n) (E : Set (RoundingSeeds n)) (hE : ∀ seeds t, update seeds ⟨2 * k + 1, by omega⟩ t ∈ E ↔ seeds ∈ E) : ∀ seeds, (∫ t, E.indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) (update seeds ⟨2 * k + 1, by omega⟩ t) ∂volume.restrict (Icc (0 : ℝ) 1)) = 0 := by apply cube_predictable_indicator_mean _ _ _ hE intro seeds simp_rw [show ∀ u v : Fin n → ℝ, rowDot c u - rowDot c v = rowDot c (u - v) from fun u v => (dotProduct_sub c u v).symm] exact roundingIteration_next_row_increment_mean a c seeds k hk
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_masked_row_increment_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:75
theorem roundingIteration_masked_row_second_moment_sum

The zero-padded moves in any predictable phase have additive second moments. Membership may depend on all preceding seeds; no deterministic phase lengths are assumed. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
c :
Fin n → ℝ
E :
ℕ → Set (RoundingSeeds n)
m :
ℕ
hm :
m ≤ n
hE :
∀ k < m, MeasurableSet (E k)
hpast :
∀ k < m,
∀ seeds (j : Fin (3 * n)) t,
2 * k ≤ j.val → (update seeds j t ∈ E k ↔ seeds ∈ E k)
(∫ seeds, (∑ k ∈ range m, (E k).indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 ∂roundingSeedLaw n)
= ∑ k ∈ range m, ∫ seeds, ((E k).indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 ∂roundingSeedLaw n
Proof (Lean source)
-- @node: roundingIteration_masked_row_second_moment_sum lemma roundingIteration_masked_row_second_moment_sum (a : Fin (n / 4) → Fin n → ℝ) (c : Fin n → ℝ) (E : ℕ → Set (RoundingSeeds n)) (m : ℕ) (hm : m ≤ n) (hE : ∀ k < m, MeasurableSet (E k)) (hpast : ∀ k < m, ∀ seeds (j : Fin (3 * n)) t, 2 * k ≤ j.val → (update seeds j t ∈ E k ↔ seeds ∈ E k)) : (∫ seeds, (∑ k ∈ range m, (E k).indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 ∂roundingSeedLaw n) = ∑ k ∈ range m, ∫ seeds, ((E k).indicator (fun seeds => rowDot c (roundingIteration a seeds (k + 1)).1 - rowDot c (roundingIteration a seeds k).1) seeds) ^ 2 ∂roundingSeedLaw n := by classical apply finite_orthogonal_increment_second_moment · intro k hk exact roundingIteration_masked_row_increment_memLp a c k (E k) (hE k hk) · intro k hk apply cube_fresh_increment_orthogonal ⟨2 * k + 1, by omega⟩ · exact memLp_finsetSum _ (fun l hl => roundingIteration_masked_row_increment_memLp a c l (E l) (hE l (by have := Finset.mem_range.mp hl; omega))) · exact roundingIteration_masked_row_increment_memLp a c k (E k) (hE k hk) · intro seeds t apply Finset.sum_congr rfl intro l hl have hlk := Finset.mem_range.mp hl simp only [indicator, hpast l (by omega) seeds ⟨2 * k + 1, by omega⟩ t (by dsimp; omega), roundingIteration_past_row_increment_update a c seeds k l hlk ⟨2 * k + 1, by omega⟩ (by dsimp; omega) t] · exact roundingIteration_masked_row_increment_mean a c k (by omega) (E k) (fun seeds t => hpast k hk seeds _ t (by dsimp; omega))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_masked_row_second_moment_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:91
theorem roundingIteration_masked_coordinate_orthogonal

A selected actual move remains orthogonal to the current fractional coordinate. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k :
ℕ
hk :
k < n
i :
Fin n
E :
hE :
hpast :
∀ seeds t, update seeds ⟨2 * k + 1, by omega⟩ t ∈ E ↔ seeds ∈ E
(∫ seeds, (roundingIteration a seeds k).1 i * E.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds ∂roundingSeedLaw n)
= 0
Proof (Lean source)
-- @node: roundingIteration_masked_coordinate_orthogonal lemma roundingIteration_masked_coordinate_orthogonal (a : Fin (n / 4) → Fin n → ℝ) (k : ℕ) (hk : k < n) (i : Fin n) (E : Set (RoundingSeeds n)) (hE : MeasurableSet E) (hpast : ∀ seeds t, update seeds ⟨2 * k + 1, by omega⟩ t ∈ E ↔ seeds ∈ E) : (∫ seeds, (roundingIteration a seeds k).1 i * E.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds ∂roundingSeedLaw n) = 0 := by apply cube_predictable_indicator_orthogonal ⟨2 * k + 1, by omega⟩ E · exact hE · exact roundingIteration_coordinate_memLp a k i · exact (roundingIteration_coordinate_memLp a (k + 1) i).sub (roundingIteration_coordinate_memLp a k i) · intro seeds t rw [roundingIteration_update_future a seeds k _ t (by dsimp; omega)] · exact hpast · intro seeds exact roundingIteration_next_coordinate_increment_mean a seeds k hk i
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_masked_coordinate_orthogonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:127
theorem roundingIteration_masked_coordinate_energy

The selected coordinate variance is exactly its selected square-energy increment. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k :
ℕ
hk :
k < n
i :
Fin n
E :
hE :
hpast :
∀ seeds t, update seeds ⟨2 * k + 1, by omega⟩ t ∈ E ↔ seeds ∈ E
(∫ seeds, (E.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n)
= ∫ seeds, E.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i ^ 2 - (roundingIteration a seeds k).1 i ^ 2) seeds ∂roundingSeedLaw n
Proof (Lean source)
-- @node: roundingIteration_masked_coordinate_energy lemma roundingIteration_masked_coordinate_energy (a : Fin (n / 4) → Fin n → ℝ) (k : ℕ) (hk : k < n) (i : Fin n) (E : Set (RoundingSeeds n)) (hE : MeasurableSet E) (hpast : ∀ seeds t, update seeds ⟨2 * k + 1, by omega⟩ t ∈ E ↔ seeds ∈ E) : (∫ seeds, (E.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n) = ∫ seeds, E.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i ^ 2 - (roundingIteration a seeds k).1 i ^ 2) seeds ∂roundingSeedLaw n := by classical let u (seeds : RoundingSeeds n) := (roundingIteration a seeds k).1 i let v (seeds : RoundingSeeds n) := (roundingIteration a seeds (k + 1)).1 i have hu : MemLp u 2 (roundingSeedLaw n) := roundingIteration_coordinate_memLp a k i have hv : MemLp v 2 (roundingSeedLaw n) := roundingIteration_coordinate_memLp a (k + 1) i have hd : MemLp (E.indicator (fun seeds => v seeds - u seeds)) 2 (roundingSeedLaw n) := (hv.sub hu).indicator hE have hi : Integrable (E.indicator (fun seeds => v seeds ^ 2 - u seeds ^ 2)) (roundingSeedLaw n) := (hv.integrable_sq.sub hu.integrable_sq).indicator hE have hp : Integrable (fun seeds => u seeds * E.indicator (fun seeds => v seeds - u seeds) seeds) (roundingSeedLaw n) := by convert hu.integrable_mul hd using 1 funext seeds exact (Pi.mul_apply _ _ seeds).symm have hexp (seeds : RoundingSeeds n) : (E.indicator (fun seeds => v seeds - u seeds) seeds) ^ 2 = E.indicator (fun seeds => v seeds ^ 2 - u seeds ^ 2) seeds - 2 * (u seeds * E.indicator (fun seeds => v seeds - u seeds) seeds) := by by_cases hs : seeds ∈ E · simp only [Set.indicator_of_mem hs] ring · simp [Set.indicator_of_notMem hs] change (∫ seeds, (E.indicator (fun seeds => v seeds - u seeds) seeds) ^ 2 ∂roundingSeedLaw n) = _ simp_rw [hexp] have ht : Integrable (fun seeds => 2 * (u seeds * E.indicator (fun seeds => v seeds - u seeds) seeds)) (roundingSeedLaw n) := hp.const_mul 2 rw [integral_sub hi ht, integral_const_mul] have hz := roundingIteration_masked_coordinate_orthogonal a k hk i E hE hpast change (∫ seeds, u seeds * E.indicator (fun seeds => v seeds - u seeds) seeds ∂roundingSeedLaw n) = 0 at hz rw [hz, mul_zero, sub_zero]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_masked_coordinate_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:148
theorem roundingStep_inactive_fixed Lemma roundingStep_inactive_fixed in the paper ↗

No boundary move changes an already inactive coordinate, even with an empty basis. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
seed₁ seed₂ :
ℝ
i :
Fin n
hi :
¬ |u i| < 1
roundingStep a q u seed₁ seed₂ i = u i
Proof (Lean source)
-- @node: roundingStep_inactive_fixed lemma roundingStep_inactive_fixed (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (seed₁ seed₂ : ℝ) (i : Fin n) (hi : ¬ |u i| < 1) : roundingStep a q u seed₁ seed₂ i = u i := by let bs := nullspaceBasis a q u let ws := bs.map (fun v => (boundaryPlus u v * boundaryMinus u v)⁻¹) let v := inverseCDF (bs.zip (ws.map (fun w => w / ws.sum))) seed₁ have hz : v i = 0 := by by_cases he : bs = [] · simp [v, he, ws, inverseCDF] · exact nullspaceBasis_active_support a q u v (rounding_selected_direction_mem a q u seed₁ he) i hi simp only [roundingStep, ite_apply, Pi.add_apply, Pi.sub_apply, Pi.smul_apply, smul_eq_mul] change (if seed₂ < boundaryMinus u v / (boundaryPlus u v + boundaryMinus u v) then u i + boundaryPlus u v * v i else u i - boundaryMinus u v * v i) = u i simp [hz]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingStep_inactive_fixed · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:193
theorem phaseMove_inactive_fixed Lemma phaseMove_inactive_fixed in the paper ↗

Phase changes and terminal moves also preserve all inactive coordinates. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ seed₂ :
ℝ
i :
Fin n
hi :
¬ |st.1 i| < 1
(phaseMove a st seed₁ seed₂).1 i = st.1 i
Proof (Lean source)
-- @node: phaseMove_inactive_fixed lemma phaseMove_inactive_fixed (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (seed₁ seed₂ : ℝ) (i : Fin n) (hi : ¬ |st.1 i| < 1) : (phaseMove a st seed₁ seed₂).1 i = st.1 i := by by_cases hsmall : (activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3 · simp only [phaseMove, if_pos hsmall] cases he : activeIndices st.1 with | nil => rfl | cons j js => have hj : j ∈ activeIndices st.1 := by rw [he]; simp have hne : i ≠ j := by intro hij subst j exact hi ((mem_activeIndices st.1 i).mp hj) simp [Function.update_of_ne hne] · simpa only [phaseMove, if_neg hsmall] using roundingStep_inactive_fixed a _ st.1 seed₁ seed₂ i hi
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_inactive_fixed · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:212
theorem roundingIteration_inactive_fixed

Once a coordinate is inactive, every later actual state retains it. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k l :
ℕ
hkl :
k ≤ l
i :
Fin n
hi :
¬ |(roundingIteration a seeds k).1 i| < 1
(roundingIteration a seeds l).1 i = (roundingIteration a seeds k).1 i
Proof (Lean source)
-- @node: roundingIteration_inactive_fixed lemma roundingIteration_inactive_fixed (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k l : ℕ) (hkl : k ≤ l) (i : Fin n) (hi : ¬ |(roundingIteration a seeds k).1 i| < 1) : (roundingIteration a seeds l).1 i = (roundingIteration a seeds k).1 i := by obtain ⟨b, rfl⟩ := Nat.exists_eq_add_of_le hkl clear hkl induction b with | zero => simp | succ b ih => rw [show k + (b + 1) = (k + b) + 1 by omega, roundingIteration] rw [phaseMove_inactive_fixed a _ _ _ i (by simpa only [ih] using hi), ih]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_inactive_fixed · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:232
theorem roundingIteration_interval_endpoint_energy_le

Every actual interval can spend at most its initially active count in endpoint energy. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k l :
ℕ
hkl :
k ≤ l
rowDot (roundingIteration a seeds l).1 (roundingIteration a seeds l).1
- rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1
Proof (Lean source)
-- @node: roundingIteration_interval_endpoint_energy_le lemma roundingIteration_interval_endpoint_energy_le (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k l : ℕ) (hkl : k ≤ l) : rowDot (roundingIteration a seeds l).1 (roundingIteration a seeds l).1 - rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1 ≤ (activeIndices (roundingIteration a seeds k).1).length := by exact active_endpoint_energy_le _ _ (roundingIteration_cube_and_count a seeds l).1 (fun i hi => roundingIteration_inactive_fixed a seeds k l hkl i hi)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_interval_endpoint_energy_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:246
theorem finite_interval_increment_sum Lemma finite_interval_increment_sum in the paper ↗

A finite interval mask telescopes even when the interval is empty. Under the stated conditions.

Formal statement
f :
ℕ → ℝ
m K H :
ℕ
hKH :
K ≤ H
hHm :
H ≤ m
(∑ k ∈ range m, if K ≤ k ∧ k < H then f (k + 1) - f k else 0) = f H - f K
Proof (Lean source)
-- @node: finite_interval_increment_sum lemma finite_interval_increment_sum (f : ℕ → ℝ) (m K H : ℕ) (hKH : K ≤ H) (hHm : H ≤ m) : (∑ k ∈ range m, if K ≤ k ∧ k < H then f (k + 1) - f k else 0) = f H - f K := by induction m generalizing K H with | zero => have hH : H = 0 := by omega have hK : K = 0 := by omega simp [hH, hK] | succ m ih => rw [Finset.sum_range_succ] by_cases hH : H ≤ m · rw [ih K H hKH hH, if_neg (by omega)] simp · have he : H = m + 1 := by omega subst H by_cases hK : K ≤ m · have hs : (∑ k ∈ range m, if K ≤ k ∧ k < m + 1 then f (k + 1) - f k else 0) = ∑ k ∈ range m, if K ≤ k ∧ k < m then f (k + 1) - f k else 0 := by apply Finset.sum_congr rfl intro k hk have hkm := Finset.mem_range.mp hk simp only [hkm, Nat.lt_succ_of_lt hkm, and_true] rw [hs, ih K m hK (by omega), if_pos (by omega)] ring · have he : K = m + 1 := by omega subst K have hs : (∑ k ∈ range m, if m + 1 ≤ k ∧ k < m + 1 then f (k + 1) - f k else 0) = 0 := by apply Finset.sum_eq_zero intro k hk rw [if_neg (by omega)] rw [hs, if_neg (by omega)] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_interval_increment_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:256
theorem roundingIteration_masked_norm_energy

Summing the selected coordinate variances gives the selected norm-energy expenditure. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
k :
ℕ
hk :
k < n
E :
hE :
hpast :
∀ seeds t, update seeds ⟨2 * k + 1, by omega⟩ t ∈ E ↔ seeds ∈ E
(∑ i : Fin n, ∫ seeds, (E.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n)
= ∫ seeds, E.indicator (fun seeds => rowDot (roundingIteration a seeds (k + 1)).1 (roundingIteration a seeds (k + 1)).1 - rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1) seeds ∂roundingSeedLaw n
Proof (Lean source)
-- @node: roundingIteration_masked_norm_energy lemma roundingIteration_masked_norm_energy (a : Fin (n / 4) → Fin n → ℝ) (k : ℕ) (hk : k < n) (E : Set (RoundingSeeds n)) (hE : MeasurableSet E) (hpast : ∀ seeds t, update seeds ⟨2 * k + 1, by omega⟩ t ∈ E ↔ seeds ∈ E) : (∑ i : Fin n, ∫ seeds, (E.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n) = ∫ seeds, E.indicator (fun seeds => rowDot (roundingIteration a seeds (k + 1)).1 (roundingIteration a seeds (k + 1)).1 - rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1) seeds ∂roundingSeedLaw n := by classical simp_rw [roundingIteration_masked_coordinate_energy a k hk _ E hE hpast] have hi (i : Fin n) : Integrable (E.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i ^ 2 - (roundingIteration a seeds k).1 i ^ 2)) (roundingSeedLaw n) := by have hraw : Integrable (fun seeds => (roundingIteration a seeds (k + 1)).1 i ^ 2 - (roundingIteration a seeds k).1 i ^ 2) (roundingSeedLaw n) := by convert (roundingIteration_coordinate_memLp a (k + 1) i).integrable_sq.sub (roundingIteration_coordinate_memLp a k i).integrable_sq using 1 funext seeds exact (Pi.sub_apply (fun seeds : RoundingSeeds n => (roundingIteration a seeds (k + 1)).1 i ^ 2) (fun seeds : RoundingSeeds n => (roundingIteration a seeds k).1 i ^ 2) seeds).symm exact hraw.indicator hE rw [← integral_finsetSum _ (fun i _ => hi i)] apply integral_congr_ae filter_upwards [] with seeds by_cases hs : seeds ∈ E · simp only [Set.indicator_of_mem hs, rowDot, ← Finset.sum_sub_distrib, pow_two] · simp [Set.indicator_of_notMem hs]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_masked_norm_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:294
theorem roundingIteration_interval_variance_energy

Predictable random intervals inherit the exact norm-energy telescope of actual states. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K H :
RoundingSeeds n → ℕ
hKH :
∀ seeds, K seeds ≤ H seeds
hH :
∀ seeds, H seeds ≤ n
hE :
∀ k < n, MeasurableSet {seeds | K seeds ≤ k ∧ k < H seeds}
hpast :
∀ (k : ℕ) (hk : k < n),
∀ seeds t,
(K (update seeds ⟨2 * k + 1, by omega⟩ t) ≤ k ∧ k < H (update seeds ⟨2 * k + 1, by omega⟩ t))
↔ (K seeds ≤ k ∧ k < H seeds)
(∑ k ∈ range n, ∑ i : Fin n, ∫ seeds, ({seeds | K seeds ≤ k ∧ k < H seeds}.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n)
= ∫ seeds, rowDot (roundingIteration a seeds (H seeds)).1 (roundingIteration a seeds (H seeds)).1
- rowDot (roundingIteration a seeds (K seeds)).1 (roundingIteration a seeds (K seeds)).1 ∂roundingSeedLaw n
Proof (Lean source)
-- @node: roundingIteration_interval_variance_energy lemma roundingIteration_interval_variance_energy (a : Fin (n / 4) → Fin n → ℝ) (K H : RoundingSeeds n → ℕ) (hKH : ∀ seeds, K seeds ≤ H seeds) (hH : ∀ seeds, H seeds ≤ n) (hE : ∀ k < n, MeasurableSet {seeds | K seeds ≤ k ∧ k < H seeds}) (hpast : ∀ (k : ℕ) (hk : k < n), ∀ seeds t, (K (update seeds ⟨2 * k + 1, by omega⟩ t) ≤ k ∧ k < H (update seeds ⟨2 * k + 1, by omega⟩ t)) ↔ (K seeds ≤ k ∧ k < H seeds)) : (∑ k ∈ range n, ∑ i : Fin n, ∫ seeds, ({seeds | K seeds ≤ k ∧ k < H seeds}.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n) = ∫ seeds, rowDot (roundingIteration a seeds (H seeds)).1 (roundingIteration a seeds (H seeds)).1 - rowDot (roundingIteration a seeds (K seeds)).1 (roundingIteration a seeds (K seeds)).1 ∂roundingSeedLaw n := by classical have hi (k : ℕ) (hk : k < n) : Integrable ({seeds | K seeds ≤ k ∧ k < H seeds}.indicator (fun seeds => rowDot (roundingIteration a seeds (k + 1)).1 (roundingIteration a seeds (k + 1)).1 - rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1)) (roundingSeedLaw n) := by have hu (l : ℕ) : Integrable (fun seeds => rowDot (roundingIteration a seeds l).1 (roundingIteration a seeds l).1) (roundingSeedLaw n) := by unfold rowDot apply integrable_finsetSum intro i _ exact (roundingIteration_coordinate_memLp a l i).integrable_mul (roundingIteration_coordinate_memLp a l i) exact ((hu (k + 1)).sub (hu k)).indicator (hE k hk) calc _ = ∑ k ∈ range n, ∫ seeds, {seeds | K seeds ≤ k ∧ k < H seeds}.indicator (fun seeds => rowDot (roundingIteration a seeds (k + 1)).1 (roundingIteration a seeds (k + 1)).1 - rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1) seeds ∂roundingSeedLaw n := by apply Finset.sum_congr rfl intro k hk exact roundingIteration_masked_norm_energy a k (Finset.mem_range.mp hk) _ (hE k (Finset.mem_range.mp hk)) (hpast k (Finset.mem_range.mp hk)) _ = ∫ seeds, ∑ k ∈ range n, {seeds | K seeds ≤ k ∧ k < H seeds}.indicator (fun seeds => rowDot (roundingIteration a seeds (k + 1)).1 (roundingIteration a seeds (k + 1)).1 - rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1) seeds ∂roundingSeedLaw n := by rw [integral_finsetSum _ (fun k hk => hi k (Finset.mem_range.mp hk))] _ = _ := by apply integral_congr_ae filter_upwards [] with seeds simp only [indicator, Set.mem_ofPred_eq] exact finite_interval_increment_sum (fun k => rowDot (roundingIteration a seeds k).1 (roundingIteration a seeds k).1) n (K seeds) (H seeds) (hKH seeds) (hH seeds)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_interval_variance_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:330
theorem roundingIteration_random_time_coordinate_measurable

[ Evaluating an actual coordinate at any measurable integer time is Borel. This uses the hK hypothesis, the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
hK :
i :
Fin n
Measurable (fun seeds => (roundingIteration a seeds (K seeds)).1 i)
Proof (Lean source)
@[fun_prop] -- @node: roundingIteration_random_time_coordinate_measurable lemma roundingIteration_random_time_coordinate_measurable (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (hK : Measurable K) (i : Fin n) : Measurable (fun seeds => (roundingIteration a seeds (K seeds)).1 i) := by have hm : Measurable (fun x : RoundingSeeds n × ℕ => (roundingIteration a x.1 x.2).1 i) := measurable_from_prod_countable_left (fun k => roundingIteration_coordinate_measurable a k i) exact hm.comp (measurable_id.prodMk hK)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_random_time_coordinate_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:387
theorem roundingIteration_random_time_coordinate_memLp

A measurable random endpoint still has square-integrable coordinates, by cube preservation.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
hK :
i :
Fin n
MemLp (fun seeds => (roundingIteration a seeds (K seeds)).1 i) 2 (roundingSeedLaw n)
Proof (Lean source)
-- @node: roundingIteration_random_time_coordinate_memLp lemma roundingIteration_random_time_coordinate_memLp (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (hK : Measurable K) (i : Fin n) : MemLp (fun seeds => (roundingIteration a seeds (K seeds)).1 i) 2 (roundingSeedLaw n) := by have : IsFiniteMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw cubeMeasure infer_instance apply MemLp.of_bound (roundingIteration_random_time_coordinate_measurable a K hK i).aestronglyMeasurable 1 filter_upwards [] with seeds simpa only [Real.norm_eq_abs] using (roundingIteration_cube_and_count a seeds (K seeds)).1 i
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_random_time_coordinate_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:398
theorem roundingIteration_random_time_energy_integrable

Random-endpoint norm energy is integrable; no stopping-time theorem is needed. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
hK :
Integrable (fun seeds => rowDot (roundingIteration a seeds (K seeds)).1 (roundingIteration a seeds (K seeds)).1) (roundingSeedLaw n)
Proof (Lean source)
-- @node: roundingIteration_random_time_energy_integrable lemma roundingIteration_random_time_energy_integrable (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (hK : Measurable K) : Integrable (fun seeds => rowDot (roundingIteration a seeds (K seeds)).1 (roundingIteration a seeds (K seeds)).1) (roundingSeedLaw n) := by unfold rowDot apply integrable_finsetSum intro i _ exact (roundingIteration_random_time_coordinate_memLp a K hK i).integrable_mul (roundingIteration_random_time_coordinate_memLp a K hK i)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_random_time_energy_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:413
theorem roundingIteration_random_time_active_count_integrable

The initial active-count allowance at a measurable random phase start is integrable. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K :
RoundingSeeds n → ℕ
hK :
Integrable (fun seeds => ((activeIndices (roundingIteration a seeds (K seeds)).1).length : ℝ)) (roundingSeedLaw n)
Proof (Lean source)
-- @node: roundingIteration_random_time_active_count_integrable lemma roundingIteration_random_time_active_count_integrable (a : Fin (n / 4) → Fin n → ℝ) (K : RoundingSeeds n → ℕ) (hK : Measurable K) : Integrable (fun seeds => ((activeIndices (roundingIteration a seeds (K seeds)).1).length : ℝ)) (roundingSeedLaw n) := by have : IsFiniteMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw cubeMeasure infer_instance have hu : Measurable (fun seeds => (roundingIteration a seeds (K seeds)).1) := by apply measurable_pi_lambda intro i exact roundingIteration_random_time_coordinate_measurable a K hK i have hc : Measurable (fun seeds => ((activeIndices (roundingIteration a seeds (K seeds)).1).length : ℝ)) := activeIndices_consumer_measurable _ hu (fun _ cs => (cs.length : ℝ)) (fun _ => measurable_const) apply Integrable.of_bound hc.aestronglyMeasurable (n : ℝ) filter_upwards [] with seeds rw [Real.norm_eq_abs, abs_of_nonneg (by positivity)] exact_mod_cast (roundingIteration_cube_and_count a seeds (K seeds)).2.trans (sub_le _ _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_random_time_active_count_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:425
theorem roundingIteration_interval_coordinate_variance_le

The predictable random phase's total coordinate variance is bounded by its expected initial active count. This is the conditional energy budget integrated over the phase-start history, for the actual finite rounding iteration. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
K H :
RoundingSeeds n → ℕ
hK :
hH :
hKH :
∀ seeds, K seeds ≤ H seeds
hHn :
∀ seeds, H seeds ≤ n
hpast :
∀ (k : ℕ) (hk : k < n),
∀ seeds t,
(K (update seeds ⟨2 * k + 1, by omega⟩ t) ≤ k ∧ k < H (update seeds ⟨2 * k + 1, by omega⟩ t))
↔ (K seeds ≤ k ∧ k < H seeds)
(∑ k ∈ range n, ∑ i : Fin n, ∫ seeds, ({seeds | K seeds ≤ k ∧ k < H seeds}.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n)
≤ ∫ seeds, ((activeIndices (roundingIteration a seeds (K seeds)).1).length : ℝ) ∂roundingSeedLaw n
Proof (Lean source)
-- @node: roundingIteration_interval_coordinate_variance_le lemma roundingIteration_interval_coordinate_variance_le (a : Fin (n / 4) → Fin n → ℝ) (K H : RoundingSeeds n → ℕ) (hK : Measurable K) (hH : Measurable H) (hKH : ∀ seeds, K seeds ≤ H seeds) (hHn : ∀ seeds, H seeds ≤ n) (hpast : ∀ (k : ℕ) (hk : k < n), ∀ seeds t, (K (update seeds ⟨2 * k + 1, by omega⟩ t) ≤ k ∧ k < H (update seeds ⟨2 * k + 1, by omega⟩ t)) ↔ (K seeds ≤ k ∧ k < H seeds)) : (∑ k ∈ range n, ∑ i : Fin n, ∫ seeds, ({seeds | K seeds ≤ k ∧ k < H seeds}.indicator (fun seeds => (roundingIteration a seeds (k + 1)).1 i - (roundingIteration a seeds k).1 i) seeds) ^ 2 ∂roundingSeedLaw n) ≤ ∫ seeds, ((activeIndices (roundingIteration a seeds (K seeds)).1).length : ℝ) ∂roundingSeedLaw n := by have hE (k : ℕ) (_hk : k < n) : MeasurableSet {seeds | K seeds ≤ k ∧ k < H seeds} := by exact (measurableSet_le hK measurable_const).inter (measurableSet_lt measurable_const hH) rw [roundingIteration_interval_variance_energy a K H hKH hHn hE hpast] apply integral_mono ((roundingIteration_random_time_energy_integrable a H hH).sub (roundingIteration_random_time_energy_integrable a K hK)) (roundingIteration_random_time_active_count_integrable a K hK) intro seeds exact roundingIteration_interval_endpoint_energy_le a seeds (K seeds) (H seeds) (hKH seeds)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_interval_coordinate_variance_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingStoppedPhases.lean:447
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.RoundingTermination 23 declarations A trace count forces a nonempty constructed nullspace basis whenever the active count exceeds the retained constraint count.

Finite termination of ordered boundary rounding

A trace count forces a nonempty constructed nullspace basis whenever the active count exceeds the retained constraint count. The phase invariant and strict boundary progress then exhaust all active coordinates in at most n moves.

theorem rowDot_self_eq_zero_iff Lemma rowDot_self_eq_zero_iff in the paper ↗

A vector with zero squared Euclidean length is zero.

Formal statement
n :
ℕ
shared
v :
Fin n → ℝ
rowDot v v = 0 ↔ v = 0
Proof (Lean source)
-- @node: rowDot_self_eq_zero_iff lemma rowDot_self_eq_zero_iff (v : Fin n → ℝ) : rowDot v v = 0 ↔ v = 0 := by constructor · intro h funext i have hi := Finset.single_le_sum (fun j _ => mul_self_nonneg (v j)) (Finset.mem_univ i) change v i * v i ≤ rowDot v v at hi rw [h] at hi change v i = 0 nlinarith [sq_nonneg (v i)] · rintro rfl simp [rowDot]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.rowDot_self_eq_zero_iff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:18

With no constraints the residual is the input vector itself.

Formal statement
n :
ℕ
shared
v :
Fin n → ℝ
Proof (Lean source)
-- @node: removeProjections_nil lemma removeProjections_nil (v : Fin n → ℝ) : removeProjections [] v = v := by funext i simp [removeProjections]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.removeProjections_nil · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:33
theorem insertOrtho_contains_old Lemma insertOrtho_contains_old in the paper ↗

Gram--Schmidt never removes old vectors.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v :
Fin n → ℝ
b ∈ bs :
b ∈ insertOrtho bs v
Proof (Lean source)
-- @node: insertOrtho_contains_old lemma insertOrtho_contains_old (bs : List (Fin n → ℝ)) (v : Fin n → ℝ) : ∀ b ∈ bs, b ∈ insertOrtho bs v := by intro b hb dsimp only [insertOrtho] split_ifs <;> simp [hb]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.insertOrtho_contains_old · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:39

An empty insertion has both an empty input basis and a zero input vector.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v :
Fin n → ℝ
insertOrtho bs v = [] ↔ bs = [] ∧ v = 0
Proof (Lean source)
-- @node: insertOrtho_eq_nil_iff lemma insertOrtho_eq_nil_iff (bs : List (Fin n → ℝ)) (v : Fin n → ℝ) : insertOrtho bs v = [] ↔ bs = [] ∧ v = 0 := by constructor · intro h have hb : bs = [] := by by_contra hn obtain ⟨b, hmem⟩ := List.exists_mem_of_ne_nil bs hn have hm := insertOrtho_contains_old bs v b hmem rw [h] at hm simp at hm subst bs have hz : rowDot v v = 0 := by have hn : 0 ≤ rowDot v v := Finset.sum_nonneg (fun i _ => mul_self_nonneg (v i)) by_contra hh have hp : 0 < sqrt (rowDot v v) := Real.sqrt_pos.2 (lt_of_le_of_ne hn (Ne.symm hh)) simp [insertOrtho, removeProjections_nil, hp] at h exact ⟨rfl, (rowDot_self_eq_zero_iff v).mp hz⟩ · rintro ⟨rfl, rfl⟩ simp [insertOrtho, removeProjections, rowDot]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.insertOrtho_eq_nil_iff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:47
theorem orderedOrtho_eq_nil_iff Lemma orderedOrtho_eq_nil_iff in the paper ↗

The structural orthonormalization is empty only when every input vector is zero.

Formal statement
n :
ℕ
shared
vs :
List (Fin n → ℝ)
orderedOrtho vs = [] ↔ ∀ v ∈ vs, v = 0
Proof (Lean source)
-- @node: orderedOrtho_eq_nil_iff lemma orderedOrtho_eq_nil_iff (vs : List (Fin n → ℝ)) : orderedOrtho vs = [] ↔ ∀ v ∈ vs, v = 0 := by have hf (ls : List (Fin n → ℝ)) : ∀ bs, ls.foldl insertOrtho bs = [] ↔ bs = [] ∧ ∀ v ∈ ls, v = 0 := by induction ls with | nil => intro bs; simp | cons v ls ih => intro bs rw [List.foldl_cons, ih, insertOrtho_eq_nil_iff] simp only [List.mem_cons, forall_eq_or_imp] tauto simpa [orderedOrtho] using hf vs []
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedOrtho_eq_nil_iff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:69

At most one vector is added by each insertion.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
v :
Fin n → ℝ
(insertOrtho bs v).length ≤ bs.length + 1
Proof (Lean source)
-- @node: insertOrtho_length_le lemma insertOrtho_length_le (bs : List (Fin n → ℝ)) (v : Fin n → ℝ) : (insertOrtho bs v).length ≤ bs.length + 1 := by dsimp only [insertOrtho] split_ifs <;> simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.insertOrtho_length_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:84

Discarding residuals cannot increase the number of input constraints.

Formal statement
n :
ℕ
shared
vs :
List (Fin n → ℝ)
(orderedOrtho vs).length ≤ vs.length
Proof (Lean source)
-- @node: orderedOrtho_length_le lemma orderedOrtho_length_le (vs : List (Fin n → ℝ)) : (orderedOrtho vs).length ≤ vs.length := by have hf (ls : List (Fin n → ℝ)) : ∀ bs, (ls.foldl insertOrtho bs).length ≤ bs.length + ls.length := by induction ls with | nil => intro bs; simp | cons v ls ih => intro bs have h := ih (insertOrtho bs v) have hi := insertOrtho_length_le bs v simp only [List.foldl_cons, List.length_cons] omega simpa [orderedOrtho] using hf vs []
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedOrtho_length_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:91
theorem constraintBasis_length_le Lemma constraintBasis_length_le in the paper ↗

The constraint basis has no more vectors than retained rows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
(constraintBasis a q u).length ≤ q
Proof (Lean source)
-- @node: constraintBasis_length_le lemma constraintBasis_length_le (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) : (constraintBasis a q u).length ≤ q := by simpa [constraintBasis] using orderedOrtho_length_le ((List.range q).map (fun h => activeMask u (if hh : h < n / 4 then a ⟨h, hh⟩ else 0)))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.constraintBasis_length_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:107
theorem nullspaceBasis_empty_projection Lemma nullspaceBasis_empty_projection in the paper ↗

An empty constructed nullspace basis annihilates every projected coordinate vector. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
he :
nullspaceBasis a q u = []
j :
Fin n
constraintProjection a q u (fun i => if i = j then 1 else 0) = 0
Proof (Lean source)
-- @node: nullspaceBasis_empty_projection lemma nullspaceBasis_empty_projection (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (he : nullspaceBasis a q u = []) (j : Fin n) : constraintProjection a q u (fun i => if i = j then 1 else 0) = 0 := by apply (orderedOrtho_eq_nil_iff _).mp he exact List.mem_map.mpr ⟨j, by simp, rfl⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_empty_projection · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:114
theorem activeIndices_length_eq_trace Lemma activeIndices_length_eq_trace in the paper ↗

The active-coordinate count is the trace of the active mask. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
u :
Fin n → ℝ
((activeIndices u).length : ℝ) = ∑ j : Fin n, if |u j| < 1 then 1 else 0
Proof (Lean source)
-- @node: activeIndices_length_eq_trace lemma activeIndices_length_eq_trace (u : Fin n → ℝ) : ((activeIndices u).length : ℝ) = ∑ j : Fin n, if |u j| < 1 then 1 else 0 := by classical have he : (activeIndices u).toFinset = Finset.univ.filter (fun j => |u j| < 1) := by ext j simp [mem_activeIndices] rw [← List.toFinset_card_of_nodup (activeIndices_nodup u), he] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.activeIndices_length_eq_trace · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:122

Summing the diagonal contributions of a finite basis gives its total squared length.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
(∑ j : Fin n, (bs.map (fun b => b j * b j)).sum) = (bs.map (fun b => rowDot b b)).sum
Proof (Lean source)
-- @node: basis_diagonal_trace lemma basis_diagonal_trace (bs : List (Fin n → ℝ)) : (∑ j : Fin n, (bs.map (fun b => b j * b j)).sum) = (bs.map (fun b => rowDot b b)).sum := by induction bs with | nil => simp | cons b bs ih => simp only [List.map_cons, List.sum_cons, Finset.sum_add_distrib, ih] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.basis_diagonal_trace · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:133

Unit squared lengths make the basis trace exactly its number of vectors. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n :
ℕ
shared
bs :
List (Fin n → ℝ)
hb :
∀ b ∈ bs, rowDot b b = 1
(bs.map (fun b => rowDot b b)).sum = (bs.length : ℝ)
Proof (Lean source)
-- @node: basis_unit_trace lemma basis_unit_trace (bs : List (Fin n → ℝ)) (hb : ∀ b ∈ bs, rowDot b b = 1) : (bs.map (fun b => rowDot b b)).sum = (bs.length : ℝ) := by induction bs with | nil => simp | cons b bs ih => simp only [List.map_cons, List.sum_cons, List.length_cons, Nat.cast_add, Nat.cast_one] rw [hb b (by simp), ih (fun c hc => hb c (by simp [hc]))] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.basis_unit_trace · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:144
theorem nullspaceBasis_empty_trace Lemma nullspaceBasis_empty_trace in the paper ↗

If all projected coordinate vectors vanish, the active trace equals the constraint trace. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
he :
nullspaceBasis a q u = []
Proof (Lean source)
-- @node: nullspaceBasis_empty_trace lemma nullspaceBasis_empty_trace (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (he : nullspaceBasis a q u = []) : (activeIndices u).length = (constraintBasis a q u).length := by have hs : ∀ b ∈ constraintBasis a q u, ∀ j, ¬|u j| < 1 → b j = 0 := by apply orderedOrtho_active_support intro b hb j hj obtain ⟨h, _, rfl⟩ := List.mem_map.mp hb simp [activeMask, hj] have hd (j : Fin n) : (if |u j| < 1 then (1 : ℝ) else 0) = ((constraintBasis a q u).map (fun b => b j * b j)).sum := by have hz := congrFun (nullspaceBasis_empty_projection a q u he j) j have hdot (b : Fin n → ℝ) (hb : b ∈ constraintBasis a q u) : rowDot (activeMask u (fun i => if i = j then 1 else 0)) b = b j := by have hm : activeMask u (fun i => if i = j then 1 else 0) = (fun i => if i = j then (if |u j| < 1 then 1 else 0) else 0) := by funext i by_cases hi : i = j · subst i; simp [activeMask] · simp [activeMask, hi] rw [hm] by_cases hj : |u j| < 1 · simp [rowDot, hj] · simp [rowDot, hj, hs b hb j hj] have hmap : ((constraintBasis a q u).map (fun b => rowDot (activeMask u (fun i => if i = j then 1 else 0)) b * b j)).sum = ((constraintBasis a q u).map (fun b => b j * b j)).sum := by congr 1 apply List.map_congr_left intro b hb rw [hdot b hb] change (if |u j| < 1 then (if j = j then (1 : ℝ) else 0) else 0) - ((constraintBasis a q u).map (fun b => rowDot (activeMask u (fun i => if i = j then 1 else 0)) b * b j)).sum = 0 at hz simp only [if_true, hmap] at hz linarith have ht : ((activeIndices u).length : ℝ) = (constraintBasis a q u).length := by rw [activeIndices_length_eq_trace, Finset.sum_congr rfl (fun j _ => hd j), basis_diagonal_trace] exact basis_unit_trace (constraintBasis a q u) (orderedOrtho_unit_length _) exact_mod_cast ht
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_empty_trace · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:156
theorem nullspaceBasis_nonempty_of_active_count Lemma nullspaceBasis_nonempty_of_active_count in the paper ↗

More active coordinates than retained rows forces an actual constructed direction. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
q :
ℕ
u :
Fin n → ℝ
hq :
nullspaceBasis a q u ≠ []
Proof (Lean source)
-- @node: nullspaceBasis_nonempty_of_active_count lemma nullspaceBasis_nonempty_of_active_count (a : Fin (n / 4) → Fin n → ℝ) (q : ℕ) (u : Fin n → ℝ) (hq : q < (activeIndices u).length) : nullspaceBasis a q u ≠ [] := by intro he have ht := nullspaceBasis_empty_trace a q u he have hl := constraintBasis_length_le a q u omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.nullspaceBasis_nonempty_of_active_count · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:200
theorem phaseMove_retained_le_stop Lemma phaseMove_retained_le_stop in the paper ↗

The retained row count never exceeds the phase stopping count. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ seed₂ :
ℝ
hq :
st.2.2 ≤ st.2.1
(phaseMove a st seed₁ seed₂).2.2 ≤ (phaseMove a st seed₁ seed₂).2.1
Proof (Lean source)
-- @node: phaseMove_retained_le_stop lemma phaseMove_retained_le_stop (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (seed₁ seed₂ : ℝ) (hq : st.2.2 ≤ st.2.1) : (phaseMove a st seed₁ seed₂).2.2 ≤ (phaseMove a st seed₁ seed₂).2.1 := by dsimp only [phaseMove] split_ifs with hsmall hstart · cases activeIndices st.1 with | nil => exact hq | cons i is => simp · dsimp only omega · exact hq
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_retained_le_stop · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:210
theorem phaseMove_fixed_of_no_active Lemma phaseMove_fixed_of_no_active in the paper ↗

At zero active count the padded iteration is exactly the identity. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ seed₂ :
ℝ
he :
activeIndices st.1 = []
phaseMove a st seed₁ seed₂ = st
Proof (Lean source)
-- @node: phaseMove_fixed_of_no_active lemma phaseMove_fixed_of_no_active (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (seed₁ seed₂ : ℝ) (he : activeIndices st.1 = []) : phaseMove a st seed₁ seed₂ = st := by simp [phaseMove, he]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_fixed_of_no_active · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:224
theorem phaseMove_nonterminal_basis_nonempty Lemma phaseMove_nonterminal_basis_nonempty in the paper ↗

The phase invariant ensures a nonempty constructed basis on every live nonterminal move. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
hq :
st.2.2 ≤ st.2.1
hlarge :
¬((activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3)
nullspaceBasis a (if (activeIndices st.1).length ≤ st.2.1 then (activeIndices st.1).length / 4 else st.2.2) st.1
≠ []
Proof (Lean source)
-- @node: phaseMove_nonterminal_basis_nonempty lemma phaseMove_nonterminal_basis_nonempty (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (hq : st.2.2 ≤ st.2.1) (hlarge : ¬((activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3)) : nullspaceBasis a (if (activeIndices st.1).length ≤ st.2.1 then (activeIndices st.1).length / 4 else st.2.2) st.1 ≠ [] := by apply nullspaceBasis_nonempty_of_active_count split_ifs with hstart · have hr : 3 < (activeIndices st.1).length := by omega omega · omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_nonterminal_basis_nonempty · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:231

Every live move preserves the cube and removes at least one active coordinate. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ seed₂ :
ℝ
hu :
∀ j, |st.1 j| ≤ 1
hq :
st.2.2 ≤ st.2.1
hne :
activeIndices st.1 ≠ []
conclusion 1
j :
|(phaseMove a st seed₁ seed₂).1 j| ≤ 1
conclusion 2
(activeIndices (phaseMove a st seed₁ seed₂).1).length < (activeIndices st.1).length
Proof (Lean source)
-- @node: phaseMove_progress lemma phaseMove_progress (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (seed₁ seed₂ : ℝ) (hu : ∀ j, |st.1 j| ≤ 1) (hq : st.2.2 ≤ st.2.1) (hne : activeIndices st.1 ≠ []) : (∀ j, |(phaseMove a st seed₁ seed₂).1 j| ≤ 1) ∧ (activeIndices (phaseMove a st seed₁ seed₂).1).length < (activeIndices st.1).length := by by_cases hsmall : (activeIndices st.1).length ≤ st.2.1 ∧ (activeIndices st.1).length ≤ 3 · exact phaseMove_terminal_progress a st seed₁ seed₂ hu hsmall hne · have hp := roundingStep_progress_of_nonempty_basis a (if (activeIndices st.1).length ≤ st.2.1 then (activeIndices st.1).length / 4 else st.2.2) st.1 seed₁ seed₂ hu (phaseMove_nonterminal_basis_nonempty a st hq hsmall) simpa only [phaseMove, if_neg hsmall] using hp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_progress · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:246
theorem phaseMove_cube_and_count Lemma phaseMove_cube_and_count in the paper ↗

One padded move preserves the cube and lowers the active count by one until exhaustion. Under the stated conditions.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
st :
seed₁ seed₂ :
ℝ
hu :
∀ j, |st.1 j| ≤ 1
hq :
st.2.2 ≤ st.2.1
conclusion 1
j :
|(phaseMove a st seed₁ seed₂).1 j| ≤ 1
conclusion 2
(activeIndices (phaseMove a st seed₁ seed₂).1).length ≤ (activeIndices st.1).length - 1
Proof (Lean source)
-- @node: phaseMove_cube_and_count lemma phaseMove_cube_and_count (a : Fin (n / 4) → Fin n → ℝ) (st : RoundingState n) (seed₁ seed₂ : ℝ) (hu : ∀ j, |st.1 j| ≤ 1) (hq : st.2.2 ≤ st.2.1) : (∀ j, |(phaseMove a st seed₁ seed₂).1 j| ≤ 1) ∧ (activeIndices (phaseMove a st seed₁ seed₂).1).length ≤ (activeIndices st.1).length - 1 := by by_cases he : activeIndices st.1 = [] · rw [phaseMove_fixed_of_no_active a st seed₁ seed₂ he, he] exact ⟨hu, by simp⟩ · have hp := phaseMove_progress a st seed₁ seed₂ hu hq he exact ⟨hp.1, by have hh := hp.2; omega⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.phaseMove_cube_and_count · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:263
theorem roundingIteration_retained_le_stop

The finite iteration preserves the phase invariant at every step. The asserted mathematical result follows.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
(roundingIteration a seeds k).2.2 ≤ (roundingIteration a seeds k).2.1
Proof (Lean source)
-- @node: roundingIteration_retained_le_stop lemma roundingIteration_retained_le_stop (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) : (roundingIteration a seeds k).2.2 ≤ (roundingIteration a seeds k).2.1 := by induction k with | zero => simp [roundingIteration] | succ k ih => exact phaseMove_retained_le_stop a _ _ _ ih
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_retained_le_stop · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:277
theorem roundingIteration_cube_and_count

Every seed realization remains in the cube and has at most n-k active coordinates.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
k :
ℕ
conclusion 1
j :
|(roundingIteration a seeds k).1 j| ≤ 1
conclusion 2
(activeIndices (roundingIteration a seeds k).1).length ≤ n - k
Proof (Lean source)
-- @node: roundingIteration_cube_and_count lemma roundingIteration_cube_and_count (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (k : ℕ) : (∀ j, |(roundingIteration a seeds k).1 j| ≤ 1) ∧ (activeIndices (roundingIteration a seeds k).1).length ≤ n - k := by induction k with | zero => simp [roundingIteration, activeIndices] | succ k ih => have hp := phaseMove_cube_and_count a (roundingIteration a seeds k) (roundingSeed seeds (2 * k)) (roundingSeed seeds (2 * k + 1)) ih.1 (roundingIteration_retained_le_stop a seeds k) refine ⟨hp.1, ?_⟩ change (activeIndices (phaseMove a (roundingIteration a seeds k) (roundingSeed seeds (2 * k)) (roundingSeed seeds (2 * k + 1))).1).length ≤ n - (k + 1) have hh := hp.2 have hi := ih.2 omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_cube_and_count · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:286
theorem roundingIteration_no_active

After n moves no coordinate is fractional.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
activeIndices (roundingIteration a seeds n).1 = []
Proof (Lean source)
-- @node: roundingIteration_no_active lemma roundingIteration_no_active (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) : activeIndices (roundingIteration a seeds n).1 = [] := by have h := (roundingIteration_cube_and_count a seeds n).2 have he : (activeIndices (roundingIteration a seeds n).1).length = 0 := by omega simpa using he
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_no_active · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:305
theorem roundingIteration_terminal_eq_sign

The actual terminal state equals the output signing, for every seed realization.

Formal statement
n :
ℕ
shared
a :
Fin (n / 4) → Fin n → ℝ
seeds :
i :
Fin n
(roundingIteration a seeds n).1 i = sgn (orderedBoundaryRounding n a seeds i)
Proof (Lean source)
-- @node: roundingIteration_terminal_eq_sign lemma roundingIteration_terminal_eq_sign (a : Fin (n / 4) → Fin n → ℝ) (seeds : RoundingSeeds n) (i : Fin n) : (roundingIteration a seeds n).1 i = sgn (orderedBoundaryRounding n a seeds i) := by have hu := (roundingIteration_cube_and_count a seeds n).1 i have hnot : ¬|(roundingIteration a seeds n).1 i| < 1 := by intro hi have hm := (mem_activeIndices _ i).mpr hi rw [roundingIteration_no_active a seeds] at hm simp at hm have he : |(roundingIteration a seeds n).1 i| = 1 := le_antisymm hu (le_of_not_gt hnot) by_cases hp : 0 < (roundingIteration a seeds n).1 i · rw [abs_of_pos hp] at he simpa [orderedBoundaryRounding, sgn, hp] using he · rw [abs_of_nonpos (le_of_not_gt hp)] at he simp only [orderedBoundaryRounding, hp, decide_false, sgn, Bool.false_eq_true, if_false] linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.roundingIteration_terminal_eq_sign · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/RoundingTermination.lean:313
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.SigningCrossExpectation 16 declarations Finite projection classes retain their exact Rademacher average after centering and contraction.

Conditional cross-group expectations

Finite projection classes retain their exact Rademacher average after centering and contraction. For a fixed complementary sample this gives the conditional cross-group bound used in the isotropic signing roadmap.

theorem isotropic_abs_projection_integrable Lemma isotropic_abs_projection_integrable in the paper ↗

Isotropic projections have integrable absolute values. Under the stated conditions.

Formal statement
r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
u :
Integrable (fun v => |inner ℝ u v|) P
Proof (Lean source)
-- @node: isotropic_abs_projection_integrable lemma isotropic_abs_projection_integrable (r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (u : EuclideanSpace ℝ (Fin r)) : Integrable (fun v => |inner ℝ u v|) P := by have h : MemLp (fun v => inner ℝ u v) 2 P := (memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_projection_sq_integrable r P hmom u) exact (h.integrable (by norm_num)).abs
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_abs_projection_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:17
theorem finite_projection_sum_le_centered

Centering a finite bounded direction class costs at most its radius times the sample size. The remaining term is the actual centered supremum. Under the stated conditions.

Formal statement
ι :
Type
Finite ι
Nonempty ι
n r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
u :
ι → EuclideanSpace ℝ (Fin r)
R :
ℝ
hu :
∀ a, ‖u a‖ ≤ R
x :
Fin n → EuclideanSpace ℝ (Fin r)
(⨆ a, ∑ i, |inner ℝ (u a) (x i)|)
≤ (n : ℝ) * R + finiteCenteredSumSup P (fun a v => |inner ℝ (u a) v|) x
Proof (Lean source)
-- @node: finite_projection_sum_le_centered lemma finite_projection_sum_le_centered {ι : Type} [Finite ι] [Nonempty ι] (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) (u : ι → EuclideanSpace ℝ (Fin r)) {R : ℝ} (hu : ∀ a, ‖u a‖ ≤ R) (x : Fin n → EuclideanSpace ℝ (Fin r)) : (⨆ a, ∑ i, |inner ℝ (u a) (x i)|) ≤ (n : ℝ) * R + finiteCenteredSumSup P (fun a v => |inner ℝ (u a) v|) x := by apply ciSup_le intro a have hc := (isotropic_projection_abs_integral_le r P hmom hiso (u a)).trans (hu a) have hs := le_ciSup (Finite.bddAbove_range (fun a => |∑ i, (|inner ℝ (u a) (x i)| - ∫ v, |inner ℝ (u a) v| ∂P)|)) a have he : (∑ i, |inner ℝ (u a) (x i)|) = (∑ i, (|inner ℝ (u a) (x i)| - ∫ v, |inner ℝ (u a) v| ∂P)) + (n : ℝ) * (∫ v, |inner ℝ (u a) v| ∂P) := by simp [Finset.sum_sub_distrib] dsimp only [finiteCenteredSumSup] at ⊢ rw [he] have hm := mul_le_mul_of_nonneg_left hc (Nat.cast_nonneg n : (0 : ℝ) ≤ n) linarith [le_abs_self (∑ i, (|inner ℝ (u a) (x i)| - ∫ v, |inner ℝ (u a) v| ∂P))]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_projection_sum_le_centered · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:28
theorem finite_projection_sum_integral_le_exact_rad

Symmetrization and contraction bound the uncentered finite projection supremum while preserving the exact linear Rademacher average for the independent-group step. Under the stated conditions.

Formal statement
ι :
Type
Finite ι
Nonempty ι
n r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
u :
ι → EuclideanSpace ℝ (Fin r)
R :
ℝ
hu :
∀ a, ‖u a‖ ≤ R
(∫ x : Fin n → EuclideanSpace ℝ (Fin r), ⨆ a, ∑ i, |inner ℝ (u a) (x i)| ∂Measure.pi (fun _ : Fin n => P))
≤ (n : ℝ) * R
+ 4 * (∫ x : Fin n → EuclideanSpace ℝ (Fin r), ∫ z : Signs n, finiteRadSumSup (fun a v => inner ℝ (u a) v) x z ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: finite_projection_sum_integral_le_exact_rad lemma finite_projection_sum_integral_le_exact_rad {ι : Type} [Finite ι] [Nonempty ι] (hContraction : ClassicalRademacherContraction) (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) (u : ι → EuclideanSpace ℝ (Fin r)) {R : ℝ} (hu : ∀ a, ‖u a‖ ≤ R) : (∫ x : Fin n → EuclideanSpace ℝ (Fin r), ⨆ a, ∑ i, |inner ℝ (u a) (x i)| ∂Measure.pi (fun _ : Fin n => P)) ≤ (n : ℝ) * R + 4 * (∫ x : Fin n → EuclideanSpace ℝ (Fin r), ∫ z : Signs n, finiteRadSumSup (fun a v => inner ℝ (u a) v) x z ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P)) := by let f : ι → EuclideanSpace ℝ (Fin r) → ℝ := fun a v => inner ℝ (u a) v have hm : ∀ a, Measurable (f a) := by intro a; fun_prop have hi : ∀ a, Integrable (f a) P := by intro a exact ((memLp_two_iff_integrable_sq (hm a).aestronglyMeasurable).mpr (isotropic_projection_sq_integrable r P hmom (u a))).integrable (by norm_num) have hC := finiteCenteredSumSup_integrable P (fun a v => |f a v|) (fun a => (hm a).abs) (fun a => (hi a).abs) n have hL : Integrable (fun x : Fin n → EuclideanSpace ℝ (Fin r) => ⨆ a, ∑ i, |f a (x i)|) (Measure.pi (fun _ : Fin n => P)) := by have h := finite_abs_sup_integrable (Measure.pi (fun _ : Fin n => P)) (fun a x => ∑ i, |f a (x i)|) (by intro a; fun_prop) (fun a => integrable_finsetSum _ (fun i _ => (measurePreserving_eval (fun _ : Fin n => P) i).integrable_comp_of_integrable (hi a).abs)) have he (x : Fin n → EuclideanSpace ℝ (Fin r)) (a : ι) : |(∑ i, |f a (x i)|)| = ∑ i, |f a (x i)| := abs_of_nonneg (Finset.sum_nonneg (fun i _ => abs_nonneg _)) simpa only [he] using h have hcenter := finite_abs_centered_ofReal_le_contraction hContraction P f hm hi n rw [finiteRadSumSup_radAverage_eq P f hm hi n] at hcenter have hnonneg : 0 ≤ (∫ x : Fin n → EuclideanSpace ℝ (Fin r), ∫ z : Signs n, finiteRadSumSup f x z ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P)) := by apply integral_nonneg; intro x apply integral_nonneg; intro z obtain ⟨a⟩ := (inferInstance : Nonempty ι) unfold finiteRadSumSup exact (abs_nonneg _).trans (le_ciSup (Finite.bddAbove_range (fun a => |∑ i, sgn (z i) * f a (x i)|)) a) have hfour : (4 : ENNReal) = ofReal 4 := by norm_num rw [hfour, ← ENNReal.ofReal_mul (by norm_num : (0 : ℝ) ≤ 4)] at hcenter have hbound := (ENNReal.ofReal_le_ofReal_iff (mul_nonneg (by norm_num) hnonneg)).mp hcenter have hmono := integral_mono hL ((integrable_const ((n : ℝ) * R)).add hC) (finite_projection_sum_le_centered n r P hmom hiso u hu) simp only [Pi.add_apply] at hmono rw [integral_add (integrable_const _) hC, integral_const] at hmono simp only [probReal_univ, one_smul] at hmono exact hmono.trans (add_le_add_right hbound ((n : ℝ) * R))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_projection_sum_integral_le_exact_rad · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:53

Cross-group sign optimization as a finite class of absolute projections.

Definition (Lean source)
a b r :
ℕ
x :
Fin a → EuclideanSpace ℝ (Fin r)
y :
Fin b → EuclideanSpace ℝ (Fin r)
twoGroupCrossMax x y :
ℝ
⨆ w : Signs b, ∑ i, |inner ℝ (∑ j, sgn (w j) • y j) (x i)|
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoGroupCrossMax · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:107
theorem twoGroupCrossMax_nonneg

The cross-group maximum is nonnegative, also for empty groups. The asserted mathematical result follows.

Formal statement
a b r :
ℕ
x :
Fin a → EuclideanSpace ℝ (Fin r)
y :
Fin b → EuclideanSpace ℝ (Fin r)
Proof (Lean source)
-- @node: twoGroupCrossMax_nonneg lemma twoGroupCrossMax_nonneg {a b r : ℕ} (x : Fin a → EuclideanSpace ℝ (Fin r)) (y : Fin b → EuclideanSpace ℝ (Fin r)) : 0 ≤ twoGroupCrossMax x y := by unfold twoGroupCrossMax exact (Finset.sum_nonneg (fun _ _ => abs_nonneg _)).trans (le_ciSup (Finite.bddAbove_range (fun w : Signs b => ∑ i, |inner ℝ (∑ j, sgn (w j) • y j) (x i)|)) (fun _ => true))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoGroupCrossMax_nonneg · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:113
theorem twoGroupCrossMax_joint_integrable

Two independent groups give a product-integrable cross maximum under the common envelope consisting of the product of their summed row norms. Under the stated conditions, the asserted mathematical result follows.

Formal statement
a b r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
Integrable (fun p : (Fin b → EuclideanSpace ℝ (Fin r)) × (Fin a → EuclideanSpace ℝ (Fin r)) => twoGroupCrossMax p.2 p.1) ((Measure.pi (fun _ : Fin b => P)).prod (Measure.pi (fun _ : Fin a => P)))
Proof (Lean source)
-- @node: twoGroupCrossMax_joint_integrable lemma twoGroupCrossMax_joint_integrable (a b r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) : Integrable (fun p : (Fin b → EuclideanSpace ℝ (Fin r)) × (Fin a → EuclideanSpace ℝ (Fin r)) => twoGroupCrossMax p.2 p.1) ((Measure.pi (fun _ : Fin b => P)).prod (Measure.pi (fun _ : Fin a => P))) := by have hn : Integrable (fun v : EuclideanSpace ℝ (Fin r) => ‖v‖) P := ((memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_norm_sq_integrable r P hmom)).integrable (by norm_num) have hs (k : ℕ) : Integrable (fun x : Fin k → EuclideanSpace ℝ (Fin r) => ∑ i, ‖x i‖) (Measure.pi (fun _ : Fin k => P)) := integrable_finsetSum _ (fun i _ => (measurePreserving_eval (fun _ : Fin k => P) i).integrable_comp_of_integrable hn) apply ((hs b).mul_prod (hs a)).mono' (by unfold twoGroupCrossMax apply Measurable.aestronglyMeasurable apply Measurable.iSup intro w fun_prop) apply Filter.Eventually.of_forall intro p rw [Real.norm_eq_abs, abs_of_nonneg (twoGroupCrossMax_nonneg _ _)] unfold twoGroupCrossMax apply ciSup_le intro w rw [Finset.mul_sum] apply Finset.sum_le_sum intro i _ apply (abs_real_inner_le_norm _ _).trans apply mul_le_mul_of_nonneg_right _ (norm_nonneg _) calc ‖∑ j, sgn (w j) • p.1 j‖ ≤ ∑ j, ‖sgn (w j) • p.1 j‖ := norm_sum_le _ _ _ = ∑ j, ‖p.1 j‖ := by apply Finset.sum_congr rfl intro j _ cases w j <;> simp [sgn]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.twoGroupCrossMax_joint_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:122
theorem fixed_group_cross_integral_le_exact_rad

For a fixed complementary sample, the finite class of its signed sums gives the conditional cross-group bound with no loss of the independent-group structure. Under the stated conditions.

Formal statement
a b r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
y :
Fin b → EuclideanSpace ℝ (Fin r)
(∫ x : Fin a → EuclideanSpace ℝ (Fin r), ⨆ w : Signs b, ∑ i, |inner ℝ (∑ j, sgn (w j) • y j) (x i)| ∂Measure.pi (fun _ : Fin a => P))
≤ (a : ℝ) * signingNormMax y
+ 4 * (∫ x : Fin a → EuclideanSpace ℝ (Fin r), ∫ z : Signs a, ∑ j, |inner ℝ (∑ i, sgn (z i) • x i) (y j)| ∂fairSigns a ∂Measure.pi (fun _ : Fin a => P))
Proof (Lean source)
-- @node: fixed_group_cross_integral_le_exact_rad lemma fixed_group_cross_integral_le_exact_rad (hContraction : ClassicalRademacherContraction) (a b r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) (y : Fin b → EuclideanSpace ℝ (Fin r)) : (∫ x : Fin a → EuclideanSpace ℝ (Fin r), ⨆ w : Signs b, ∑ i, |inner ℝ (∑ j, sgn (w j) • y j) (x i)| ∂Measure.pi (fun _ : Fin a => P)) ≤ (a : ℝ) * signingNormMax y + 4 * (∫ x : Fin a → EuclideanSpace ℝ (Fin r), ∫ z : Signs a, ∑ j, |inner ℝ (∑ i, sgn (z i) • x i) (y j)| ∂fairSigns a ∂Measure.pi (fun _ : Fin a => P)) := by have h := finite_projection_sum_integral_le_exact_rad hContraction a r P hmom hiso (fun w : Signs b => ∑ j, sgn (w j) • y j) (fun w => signing_norm_le_max y w) have he (x : Fin a → EuclideanSpace ℝ (Fin r)) (z : Signs a) : finiteRadSumSup (fun (w : Signs b) v => inner ℝ (∑ j, sgn (w j) • y j) v) x z = ∑ j, |inner ℝ (∑ i, sgn (z i) • x i) (y j)| := by unfold finiteRadSumSup have hsum (w : Signs b) : (∑ i, sgn (z i) * inner ℝ (∑ j, sgn (w j) • y j) (x i)) = inner ℝ (∑ i, sgn (z i) • x i) (∑ j, sgn (w j) • y j) := by rw [sum_inner] apply Finset.sum_congr rfl intro i _ rw [real_inner_smul_left, real_inner_comm] simp_rw [hsum] exact signing_projection_max_eq_sum_abs y _ simpa only [he] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fixed_group_cross_integral_le_exact_rad · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:161
theorem isotropic_group_abs_projection_integral_le Lemma isotropic_group_abs_projection_integral_le in the paper ↗

An independent group of isotropic rows costs at most its size times the norm of a fixed direction, including the empty-group convention. Under the stated conditions.

Formal statement
b r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
u :
(∫ y : Fin b → EuclideanSpace ℝ (Fin r), ∑ j, |inner ℝ u (y j)| ∂Measure.pi (fun _ : Fin b => P))
≤ (b : ℝ) * ‖u‖
Proof (Lean source)
-- @node: isotropic_group_abs_projection_integral_le lemma isotropic_group_abs_projection_integral_le (b r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) (u : EuclideanSpace ℝ (Fin r)) : (∫ y : Fin b → EuclideanSpace ℝ (Fin r), ∑ j, |inner ℝ u (y j)| ∂Measure.pi (fun _ : Fin b => P)) ≤ (b : ℝ) * ‖u‖ := by have hi := isotropic_abs_projection_integrable r P hmom u have he (j : Fin b) : Integrable (fun y : Fin b → EuclideanSpace ℝ (Fin r) => |inner ℝ u (y j)|) (Measure.pi (fun _ : Fin b => P)) := (measurePreserving_eval (fun _ : Fin b => P) j).integrable_comp_of_integrable hi rw [integral_finsetSum _ (fun j _ => he j)] simp_rw [integral_comp_eval (μ := fun _ : Fin b => P) hi.aestronglyMeasurable] simpa using mul_le_mul_of_nonneg_left (isotropic_projection_abs_integral_le r P hmom hiso u) (Nat.cast_nonneg b : (0 : ℝ) ≤ b)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_group_abs_projection_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:192
theorem isotropic_rademacher_norm_integrable

The signed first-group norm is jointly integrable under rows and fresh signs. Under the stated conditions.

Formal statement
a r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
Integrable (fun ω : (Fin a → EuclideanSpace ℝ (Fin r)) × Signs a => ‖∑ i, sgn (ω.2 i) • ω.1 i‖) ((Measure.pi (fun _ : Fin a => P)).prod (fairSigns a))
Proof (Lean source)
-- @node: isotropic_rademacher_norm_integrable lemma isotropic_rademacher_norm_integrable (a r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) : Integrable (fun ω : (Fin a → EuclideanSpace ℝ (Fin r)) × Signs a => ‖∑ i, sgn (ω.2 i) • ω.1 i‖) ((Measure.pi (fun _ : Fin a => P)).prod (fairSigns a)) := by let := fairSigns_probability a exact ((memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_rademacher_norm_sq_integrable a r P hmom)).integrable (by norm_num)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_rademacher_norm_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:212
theorem rademacher_group_projection_joint_integrable

The linear Rademacher cross term has a product-integrable norm envelope; this justifies exchanging the two independent groups without higher moments. Under the stated conditions.

Formal statement
a b r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
Integrable (fun p : ((Fin a → EuclideanSpace ℝ (Fin r)) × Signs a) × (Fin b → EuclideanSpace ℝ (Fin r)) => ∑ j, |inner ℝ (∑ i, sgn (p.1.2 i) • p.1.1 i) (p.2 j)|) (((Measure.pi (fun _ : Fin a => P)).prod (fairSigns a)).prod (Measure.pi (fun _ : Fin b => P)))
Proof (Lean source)
-- @node: rademacher_group_projection_joint_integrable lemma rademacher_group_projection_joint_integrable (a b r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) : Integrable (fun p : ((Fin a → EuclideanSpace ℝ (Fin r)) × Signs a) × (Fin b → EuclideanSpace ℝ (Fin r)) => ∑ j, |inner ℝ (∑ i, sgn (p.1.2 i) • p.1.1 i) (p.2 j)|) (((Measure.pi (fun _ : Fin a => P)).prod (fairSigns a)).prod (Measure.pi (fun _ : Fin b => P))) := by let := fairSigns_probability a have hn : Integrable (fun v : EuclideanSpace ℝ (Fin r) => ‖v‖) P := ((memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_norm_sq_integrable r P hmom)).integrable (by norm_num) have hy : Integrable (fun y : Fin b → EuclideanSpace ℝ (Fin r) => ∑ j, ‖y j‖) (Measure.pi (fun _ : Fin b => P)) := integrable_finsetSum _ (fun j _ => (measurePreserving_eval (fun _ : Fin b => P) j).integrable_comp_of_integrable hn) apply ((isotropic_rademacher_norm_integrable a r P hmom).mul_prod hy).mono' (by fun_prop) apply Filter.Eventually.of_forall intro p rw [Real.norm_eq_abs, abs_of_nonneg (Finset.sum_nonneg (fun _ _ => abs_nonneg _)), Finset.mul_sum] exact Finset.sum_le_sum (fun j _ => abs_real_inner_le_norm _ _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.rademacher_group_projection_joint_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:224
theorem independent_group_rad_projection_integral_le

After exchanging the independent samples, isotropy bounds the exact cross Rademacher average by the second-group size times the first-group square-root scale. Under the stated conditions.

Formal statement
a b r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
(∫ y : Fin b → EuclideanSpace ℝ (Fin r), ∫ ω : (Fin a → EuclideanSpace ℝ (Fin r)) × Signs a, ∑ j, |inner ℝ (∑ i, sgn (ω.2 i) • ω.1 i) (y j)| ∂(Measure.pi (fun _ : Fin a => P)).prod (fairSigns a) ∂Measure.pi (fun _ : Fin b => P))
≤ (b : ℝ) * sqrt ((a : ℝ) * r)
Proof (Lean source)
-- @node: independent_group_rad_projection_integral_le lemma independent_group_rad_projection_integral_le (a b r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) : (∫ y : Fin b → EuclideanSpace ℝ (Fin r), ∫ ω : (Fin a → EuclideanSpace ℝ (Fin r)) × Signs a, ∑ j, |inner ℝ (∑ i, sgn (ω.2 i) • ω.1 i) (y j)| ∂(Measure.pi (fun _ : Fin a => P)).prod (fairSigns a) ∂Measure.pi (fun _ : Fin b => P)) ≤ (b : ℝ) * sqrt ((a : ℝ) * r) := by let := fairSigns_probability a have hI := rademacher_group_projection_joint_integrable a b r P hmom rw [← integral_integral_swap (f := fun (ω : (Fin a → EuclideanSpace ℝ (Fin r)) × Signs a) (y : Fin b → EuclideanSpace ℝ (Fin r)) => ∑ j, |inner ℝ (∑ i, sgn (ω.2 i) • ω.1 i) (y j)|) hI] have hnorm := isotropic_rademacher_norm_integrable a r P hmom have hmono := integral_mono hI.integral_prod_left (hnorm.const_mul (b : ℝ)) (fun (ω : (Fin a → EuclideanSpace ℝ (Fin r)) × Signs a) => isotropic_group_abs_projection_integral_le b r P hmom hiso (∑ i, sgn (ω.2 i) • ω.1 i)) have heq : (∫ ω : (Fin a → EuclideanSpace ℝ (Fin r)) × Signs a, (b : ℝ) * ‖∑ i, sgn (ω.2 i) • ω.1 i‖ ∂(Measure.pi (fun _ : Fin a => P)).prod (fairSigns a)) = (b : ℝ) * (∫ x : Fin a → EuclideanSpace ℝ (Fin r), ∫ z : Signs a, ‖∑ i, sgn (z i) • x i‖ ∂fairSigns a ∂Measure.pi (fun _ : Fin a => P)) := by rw [integral_const_mul] congr 1 exact integral_prod _ hnorm rw [heq] at hmono exact hmono.trans (mul_le_mul_of_nonneg_left (isotropic_rademacher_norm_integral_le a r P hmom hiso) (Nat.cast_nonneg b : (0 : ℝ) ≤ b))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.independent_group_rad_projection_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:250
theorem independent_group_cross_integral_le

Integrating the conditional finite-class bound gives the cross-group estimate in terms of the complementary group's expected maximum norm. Its Rademacher term already has the sharp independent-group square-root scale. Under the stated conditions.

Formal statement
a b r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
(∫ y : Fin b → EuclideanSpace ℝ (Fin r), ∫ x : Fin a → EuclideanSpace ℝ (Fin r), twoGroupCrossMax x y ∂Measure.pi (fun _ : Fin a => P) ∂Measure.pi (fun _ : Fin b => P))
≤ (a : ℝ) * (∫ y : Fin b → EuclideanSpace ℝ (Fin r), signingNormMax y ∂Measure.pi (fun _ : Fin b => P))
+ 4 * b * sqrt ((a : ℝ) * r)
Proof (Lean source)
-- @node: independent_group_cross_integral_le lemma independent_group_cross_integral_le (hContraction : ClassicalRademacherContraction) (a b r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) : (∫ y : Fin b → EuclideanSpace ℝ (Fin r), ∫ x : Fin a → EuclideanSpace ℝ (Fin r), twoGroupCrossMax x y ∂Measure.pi (fun _ : Fin a => P) ∂Measure.pi (fun _ : Fin b => P)) ≤ (a : ℝ) * (∫ y : Fin b → EuclideanSpace ℝ (Fin r), signingNormMax y ∂Measure.pi (fun _ : Fin b => P)) + 4 * b * sqrt ((a : ℝ) * r) := by let := fairSigns_probability a have hI := rademacher_group_projection_joint_integrable a b r P hmom have hnorm := isotropic_rademacher_norm_integrable a r P hmom have hfixed (y : Fin b → EuclideanSpace ℝ (Fin r)) : Integrable (fun ω : (Fin a → EuclideanSpace ℝ (Fin r)) × Signs a => ∑ j, |inner ℝ (∑ i, sgn (ω.2 i) • ω.1 i) (y j)|) ((Measure.pi (fun _ : Fin a => P)).prod (fairSigns a)) := by apply (hnorm.mul_const (∑ j, ‖y j‖)).mono' (by fun_prop) apply Filter.Eventually.of_forall intro ω rw [Real.norm_eq_abs, abs_of_nonneg (Finset.sum_nonneg (fun _ _ => abs_nonneg _)), Finset.mul_sum] exact Finset.sum_le_sum (fun j _ => abs_real_inner_le_norm _ _) have hpoint (y : Fin b → EuclideanSpace ℝ (Fin r)) := fixed_group_cross_integral_le_exact_rad hContraction a b r P hmom hiso y simp_rw [← integral_prod _ (hfixed _)] at hpoint have hmono := integral_mono (twoGroupCrossMax_joint_integrable a b r P hmom).integral_prod_left (((signingNormMax_integrable b r P hmom).const_mul (a : ℝ)).add (hI.integral_prod_right.const_mul 4)) hpoint simp only [Pi.add_apply] at hmono rw [integral_add ((signingNormMax_integrable b r P hmom).const_mul (a : ℝ)) (hI.integral_prod_right.const_mul 4), integral_const_mul, integral_const_mul] at hmono have hrad := independent_group_rad_projection_integral_le a b r P hmom hiso nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.independent_group_cross_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:287
theorem finite_unit_projection_sum_integral_le

Finite classes of unit directions obey the uncentered isotropic projection bound. Under the stated conditions.

Formal statement
ι :
Type
Finite ι
Nonempty ι
n r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
u :
ι → EuclideanSpace ℝ (Fin r)
hu :
∀ a, ‖u a‖ ≤ 1
(∫ x : Fin n → EuclideanSpace ℝ (Fin r), ⨆ a, ∑ i, |inner ℝ (u a) (x i)| ∂Measure.pi (fun _ : Fin n => P))
≤ n + 4 * sqrt ((n : ℝ) * r)
Proof (Lean source)
-- @node: finite_unit_projection_sum_integral_le lemma finite_unit_projection_sum_integral_le {ι : Type} [Finite ι] [Nonempty ι] (hContraction : ClassicalRademacherContraction) (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) (u : ι → EuclideanSpace ℝ (Fin r)) (hu : ∀ a, ‖u a‖ ≤ 1) : (∫ x : Fin n → EuclideanSpace ℝ (Fin r), ⨆ a, ∑ i, |inner ℝ (u a) (x i)| ∂Measure.pi (fun _ : Fin n => P)) ≤ n + 4 * sqrt ((n : ℝ) * r) := by have hC := finiteCenteredSumSup_integrable P (fun a v => |inner ℝ (u a) v|) (by intro a; fun_prop) (fun a => isotropic_abs_projection_integrable r P hmom (u a)) n have hL : Integrable (fun x : Fin n → EuclideanSpace ℝ (Fin r) => ⨆ a, ∑ i, |inner ℝ (u a) (x i)|) (Measure.pi (fun _ : Fin n => P)) := by have h := finite_abs_sup_integrable (Measure.pi (fun _ : Fin n => P)) (fun a x => ∑ i, |inner ℝ (u a) (x i)|) (by intro a; fun_prop) (fun a => integrable_finsetSum _ (fun i _ => (measurePreserving_eval (fun _ : Fin n => P) i).integrable_comp_of_integrable (isotropic_abs_projection_integrable r P hmom (u a)))) have he (x : Fin n → EuclideanSpace ℝ (Fin r)) (a : ι) : |(∑ i, |inner ℝ (u a) (x i)|)| = ∑ i, |inner ℝ (u a) (x i)| := abs_of_nonneg (Finset.sum_nonneg (fun _ _ => abs_nonneg _)) simpa only [he] using h have hmono := integral_mono hL ((integrable_const (n : ℝ)).add hC) (by intro x; simpa using finite_projection_sum_le_centered n r P hmom hiso u hu x) simp only [Pi.add_apply] at hmono rw [integral_add (integrable_const _) hC, integral_const] at hmono simp only [probReal_univ, one_smul] at hmono have hc := finite_projection_centered_integral_le hContraction n r P hmom hiso u (R := 1) (by norm_num) hu simpa only [mul_one] using hmono.trans (add_le_add (le_refl (n : ℝ)) hc)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_unit_projection_sum_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:325
theorem signingNormMax_le_finite_net

A finite net of unit directions approximates the signed norm maximum uniformly on every sample, with an error controlled by the sum of row norms. Under the stated conditions.

Formal statement
n r :
ℕ
ι :
Type
Finite ι
Nonempty ι
u :
ι → EuclideanSpace ℝ (Fin r)
ε :
ℝ
hnet :
∀ v : EuclideanSpace ℝ (Fin r)
if
‖v‖ ≤ 1
then
∃ a, ‖v - u a‖ ≤ ε
x :
Fin n → EuclideanSpace ℝ (Fin r)
signingNormMax x ≤ (⨆ a, ∑ i, |inner ℝ (u a) (x i)|) + ε * ∑ i, ‖x i‖
Proof (Lean source)
-- @node: signingNormMax_le_finite_net lemma signingNormMax_le_finite_net {n r : ℕ} {ι : Type} [Finite ι] [Nonempty ι] (u : ι → EuclideanSpace ℝ (Fin r)) {ε : ℝ} (hnet : ∀ v : EuclideanSpace ℝ (Fin r), ‖v‖ ≤ 1 → ∃ a, ‖v - u a‖ ≤ ε) (x : Fin n → EuclideanSpace ℝ (Fin r)) : signingNormMax x ≤ (⨆ a, ∑ i, |inner ℝ (u a) (x i)|) + ε * ∑ i, ‖x i‖ := by letI : Nonempty {v : EuclideanSpace ℝ (Fin r) // ‖v‖ ≤ 1} := ⟨⟨0, by simp⟩⟩ rw [signingNormMax_eq_unit_projection_sum] apply ciSup_le intro v obtain ⟨a, ha⟩ := hnet v.val v.property have hpoint (i : Fin n) : |inner ℝ v.val (x i)| ≤ |inner ℝ (u a) (x i)| + ε * ‖x i‖ := by have hinner := abs_real_inner_le_norm (v.val - u a) (x i) have hmul := mul_le_mul_of_nonneg_right ha (norm_nonneg (x i)) have ht := abs_add_le (inner ℝ (u a) (x i)) (inner ℝ (v.val - u a) (x i)) rw [inner_sub_left] at ht hinner have he : inner ℝ (u a) (x i) + (inner ℝ v.val (x i) - inner ℝ (u a) (x i)) = inner ℝ v.val (x i) := by ring rw [he] at ht linarith calc _ ≤ ∑ i, (|inner ℝ (u a) (x i)| + ε * ‖x i‖) := Finset.sum_le_sum (fun i _ => hpoint i) _ = (∑ i, |inner ℝ (u a) (x i)|) + ε * ∑ i, ‖x i‖ := by rw [Finset.sum_add_distrib, Finset.mul_sum] _ ≤ _ := add_le_add (le_ciSup (Finite.bddAbove_range (fun a => ∑ i, |inner ℝ (u a) (x i)|)) a) (le_refl _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingNormMax_le_finite_net · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:357
theorem isotropic_signingNormMax_integral_le

Compact unit-ball approximation passes finite-class symmetrization and contraction to the expected maximum signed norm, with no extra moment assumption. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
(∫ x : Fin n → EuclideanSpace ℝ (Fin r), signingNormMax x ∂Measure.pi (fun _ : Fin n => P))
≤ n + 4 * sqrt ((n : ℝ) * r)
Proof (Lean source)
-- @node: isotropic_signingNormMax_integral_le lemma isotropic_signingNormMax_integral_le (hContraction : ClassicalRademacherContraction) (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) : (∫ x : Fin n → EuclideanSpace ℝ (Fin r), signingNormMax x ∂Measure.pi (fun _ : Fin n => P)) ≤ n + 4 * sqrt ((n : ℝ) * r) := by classical have hn : Integrable (fun v : EuclideanSpace ℝ (Fin r) => ‖v‖) P := ((memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_norm_sq_integrable r P hmom)).integrable (by norm_num) have hs : Integrable (fun x : Fin n → EuclideanSpace ℝ (Fin r) => ∑ i, ‖x i‖) (Measure.pi (fun _ : Fin n => P)) := integrable_finsetSum _ (fun i _ => (measurePreserving_eval (fun _ : Fin n => P) i).integrable_comp_of_integrable hn) let A := ∫ x : Fin n → EuclideanSpace ℝ (Fin r), ∑ i, ‖x i‖ ∂Measure.pi (fun _ : Fin n => P) have hA : 0 ≤ A := integral_nonneg (fun x => Finset.sum_nonneg (fun i _ => norm_nonneg _)) apply le_of_forall_pos_le_add intro δ hδ let ε := δ / (A + 1) have hε : 0 < ε := div_pos hδ (by linarith) obtain ⟨t, ht, htfin, hcover⟩ := (isCompact_closedBall (0 : EuclideanSpace ℝ (Fin r)) 1).finite_cover_balls hε have hzero : (0 : EuclideanSpace ℝ (Fin r)) ∈ closedBall 0 1 := by simp obtain ⟨v, hvt, hv⟩ := Set.mem_iUnion₂.mp (hcover hzero) letI : Finite t := htfin.to_subtype letI : Nonempty t := ⟨⟨v, hvt⟩⟩ have hu (a : t) : ‖a.val‖ ≤ 1 := by simpa using ht a.property have hnet (v : EuclideanSpace ℝ (Fin r)) (hv : ‖v‖ ≤ 1) : ∃ a : t, ‖v - a.val‖ ≤ ε := by have hv' : v ∈ closedBall 0 1 := by simpa using hv obtain ⟨a, hat, ha⟩ := Set.mem_iUnion₂.mp (hcover hv') refine ⟨⟨a, hat⟩, ?_⟩ exact le_of_lt (by simpa only [Metric.mem_ball, dist_eq_norm] using ha) have hL : Integrable (fun x : Fin n → EuclideanSpace ℝ (Fin r) => ⨆ a : t, ∑ i, |inner ℝ a.val (x i)|) (Measure.pi (fun _ : Fin n => P)) := by have h := finite_abs_sup_integrable (Measure.pi (fun _ : Fin n => P)) (fun (a : t) x => ∑ i, |inner ℝ a.val (x i)|) (by intro a; fun_prop) (fun a => integrable_finsetSum _ (fun i _ => (measurePreserving_eval (fun _ : Fin n => P) i).integrable_comp_of_integrable (isotropic_abs_projection_integrable r P hmom a.val))) have he (x : Fin n → EuclideanSpace ℝ (Fin r)) (a : t) : |(∑ i, |inner ℝ a.val (x i)|)| = ∑ i, |inner ℝ a.val (x i)| := abs_of_nonneg (Finset.sum_nonneg (fun _ _ => abs_nonneg _)) simpa only [he] using h have hmono := integral_mono (signingNormMax_integrable n r P hmom) (hL.add (hs.const_mul ε)) (signingNormMax_le_finite_net (fun a : t => a.val) hnet) simp only [Pi.add_apply] at hmono rw [integral_add hL (hs.const_mul ε), integral_const_mul] at hmono have hfinite := finite_unit_projection_sum_integral_le hContraction n r P hmom hiso (fun a : t => a.val) hu have herr : ε * A ≤ δ := by dsimp [ε] rw [div_mul_eq_mul_div] apply (div_le_iff₀ (by linarith : 0 < A + 1)).2 nlinarith change _ ≤ _ + ε * A at hmono linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_signingNormMax_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:388
theorem independent_group_cross_integral_le_explicit

The two independent groups satisfy the roadmap's explicit cross bound. Under the stated conditions.

Formal statement
a b r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
(∫ y : Fin b → EuclideanSpace ℝ (Fin r), ∫ x : Fin a → EuclideanSpace ℝ (Fin r), twoGroupCrossMax x y ∂Measure.pi (fun _ : Fin a => P) ∂Measure.pi (fun _ : Fin b => P))
≤ (a : ℝ) * b + 4 * a * sqrt ((b : ℝ) * r) + 4 * b * sqrt ((a : ℝ) * r)
Proof (Lean source)
-- @node: independent_group_cross_integral_le_explicit lemma independent_group_cross_integral_le_explicit (hContraction : ClassicalRademacherContraction) (a b r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) : (∫ y : Fin b → EuclideanSpace ℝ (Fin r), ∫ x : Fin a → EuclideanSpace ℝ (Fin r), twoGroupCrossMax x y ∂Measure.pi (fun _ : Fin a => P) ∂Measure.pi (fun _ : Fin b => P)) ≤ (a : ℝ) * b + 4 * a * sqrt ((b : ℝ) * r) + 4 * b * sqrt ((a : ℝ) * r) := by have hcross := independent_group_cross_integral_le hContraction a b r P hmom hiso have hnorm := isotropic_signingNormMax_integral_le hContraction b r P hmom hiso have hmul := mul_le_mul_of_nonneg_left hnorm (Nat.cast_nonneg a : (0 : ℝ) ≤ a) nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.independent_group_cross_integral_le_explicit · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningCrossExpectation.lean:449
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.SigningDecoupling 23 declarations Signed squared norms split into a sign-independent diagonal and an off-diagonal quadratic form.

Deterministic diagonal separation for isotropic row signing

Signed squared norms split into a sign-independent diagonal and an off-diagonal quadratic form. Random partitioning recovers one quarter of each form, and optimizing after averaging is bounded by averaging the cross-group maxima. Finite extrema and selector averages are measurable and integrable under coordinate second moments.

[ The off-diagonal quadratic form for a fixed signing of deterministic rows.

Definition (Lean source)
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
z :
signingOffDiagonal vs z :
ℝ
∑ i, ∑ j, if i = j then 0 else sgn (z i) * sgn (z j) * inner ℝ (vs i) (vs j)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingOffDiagonal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:19

The maximum absolute off-diagonal quadratic form over the finite sign space.

Definition (Lean source)
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
signingOffDiagonalMax vs :
ℝ
⨆ z : Signs n, |signingOffDiagonal vs z|
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingOffDiagonalMax · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:25
theorem signing_norm_sq_eq_diagonal_add

Every signed squared norm has the same diagonal part.](goal) This uses the stated conclusion.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
z :
‖∑ i, sgn (z i) • vs i‖ ^ 2 = (∑ i, ‖vs i‖ ^ 2) + signingOffDiagonal vs z
Proof (Lean source)
-- @node: signing_norm_sq_eq_diagonal_add lemma signing_norm_sq_eq_diagonal_add {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) (z : Signs n) : ‖∑ i, sgn (z i) • vs i‖ ^ 2 = (∑ i, ‖vs i‖ ^ 2) + signingOffDiagonal vs z := by classical rw [← real_inner_self_eq_norm_sq] simp_rw [sum_inner, inner_sum, real_inner_smul_left, real_inner_smul_right] unfold signingOffDiagonal rw [← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro i _ have hdiag : ‖vs i‖ ^ 2 = ∑ j : Fin n, if i = j then ‖vs i‖ ^ 2 else 0 := by simp rw [hdiag, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro j _ by_cases hij : i = j · subst j cases z i <;> simp [sgn] · simp [hij, mul_assoc]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_norm_sq_eq_diagonal_add · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:30
theorem signing_min_ge_diagonal_sub_max

The finite minimum is bounded below by diagonal energy minus maximum fluctuation.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
(∑ i, ‖vs i‖ ^ 2) - signingOffDiagonalMax vs ≤ ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2
Proof (Lean source)
-- @node: signing_min_ge_diagonal_sub_max lemma signing_min_ge_diagonal_sub_max {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) : (∑ i, ‖vs i‖ ^ 2) - signingOffDiagonalMax vs ≤ ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 := by apply le_ciInf intro z have hmax : |signingOffDiagonal vs z| ≤ signingOffDiagonalMax vs := le_ciSup (Finite.bddAbove_range (fun z : Signs n => |signingOffDiagonal vs z|)) z rw [signing_norm_sq_eq_diagonal_add] linarith [neg_abs_le (signingOffDiagonal vs z)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_min_ge_diagonal_sub_max · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:52
theorem signing_norm_sq_integrable

Coordinate second moments integrate the squared norm of every fixed signing. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
z :
Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ‖∑ i, sgn (z i) • vs i‖ ^ 2) (Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: signing_norm_sq_integrable lemma signing_norm_sq_integrable (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (z : Signs n) : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ‖∑ i, sgn (z i) • vs i‖ ^ 2) (Measure.pi (fun _ : Fin n => P)) := by simp_rw [EuclideanSpace.real_norm_sq_eq] apply integrable_finsetSum intro a _ have hcoord (i : Fin n) : MemLp (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => sgn (z i) * vs i a) 2 (Measure.pi (fun _ : Fin n => P)) := ((hmom a).comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => P) i)).const_mul _ simpa only [WithLp.ofLp_sum, WithLp.ofLp_smul, Finset.sum_apply, Pi.smul_apply, smul_eq_mul] using (memLp_finsetSum univ (fun i _ => hcoord i)).integrable_sq
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_norm_sq_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:65
theorem signing_min_measurable

[ The genuine finite signing minimum is Borel. This uses the stated conclusion.

Formal statement
n r :
ℕ
Measurable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2)
Proof (Lean source)
@[fun_prop] -- @node: signing_min_measurable lemma signing_min_measurable (n r : ℕ) : Measurable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2) := by apply Measurable.iInf intro z fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_min_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:83
theorem signing_min_integrable

The finite minimum is integrable, since it lies between zero and one fixed signing.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2) (Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: signing_min_integrable lemma signing_min_integrable (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2) (Measure.pi (fun _ : Fin n => P)) := by apply (signing_norm_sq_integrable n r P hmom (fun _ => true)).mono' (signing_min_measurable n r).aestronglyMeasurable apply Filter.Eventually.of_forall intro vs have hnonneg : 0 ≤ ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 := le_ciInf (fun _ => sq_nonneg _) rw [Real.norm_eq_abs, abs_of_nonneg hnonneg] exact ciInf_le (Finite.bddBelow_range _) (fun _ => true)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_min_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:93
theorem signingOffDiagonalMax_measurable

[ The maximum off-diagonal fluctuation is Borel. This uses the stated conclusion.

Formal statement
n r :
ℕ
Measurable (signingOffDiagonalMax (n := n) (r := r))
Proof (Lean source)
@[fun_prop] -- @node: signingOffDiagonalMax_measurable lemma signingOffDiagonalMax_measurable (n r : ℕ) : Measurable (signingOffDiagonalMax (n := n) (r := r)) := by unfold signingOffDiagonalMax signingOffDiagonal apply Measurable.iSup intro z apply Measurable.abs apply Finset.measurable_sum intro i _ apply Finset.measurable_sum intro j _ split_ifs <;> fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingOffDiagonalMax_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:109
theorem signingOffDiagonal_integrable

Each off-diagonal form is integrable, as the difference of two quadratic energies.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
z :
Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingOffDiagonal vs z) (Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: signingOffDiagonal_integrable lemma signingOffDiagonal_integrable (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (z : Signs n) : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingOffDiagonal vs z) (Measure.pi (fun _ : Fin n => P)) := by have hdiag : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ∑ i, ‖vs i‖ ^ 2) (Measure.pi (fun _ : Fin n => P)) := by apply integrable_finsetSum intro i _ simp_rw [EuclideanSpace.real_norm_sq_eq] apply integrable_finsetSum intro a _ exact ((hmom a).comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => P) i)).integrable_sq have h := (signing_norm_sq_integrable n r P hmom z).sub hdiag change Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ‖∑ i, sgn (z i) • vs i‖ ^ 2 - ∑ i, ‖vs i‖ ^ 2) _ at h simpa only [signing_norm_sq_eq_diagonal_add, add_sub_cancel_left] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingOffDiagonal_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:124
theorem signingOffDiagonalMax_integrable

The maximum absolute fluctuation is integrable, bounded by the finite sum of fluctuations. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
Integrable (signingOffDiagonalMax (n := n) (r := r)) (Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: signingOffDiagonalMax_integrable lemma signingOffDiagonalMax_integrable (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) : Integrable (signingOffDiagonalMax (n := n) (r := r)) (Measure.pi (fun _ : Fin n => P)) := by classical have hsum : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ∑ z : Signs n, |signingOffDiagonal vs z|) (Measure.pi (fun _ : Fin n => P)) := integrable_finsetSum _ (fun z _ => (signingOffDiagonal_integrable n r P hmom z).abs) apply hsum.mono' (signingOffDiagonalMax_measurable n r).aestronglyMeasurable apply Filter.Eventually.of_forall intro vs have hnonneg : 0 ≤ signingOffDiagonalMax vs := (abs_nonneg _).trans (le_ciSup (Finite.bddAbove_range (fun z : Signs n => |signingOffDiagonal vs z|)) (fun _ => true)) rw [Real.norm_eq_abs, abs_of_nonneg hnonneg] apply ciSup_le intro z exact Finset.single_le_sum (f := fun z : Signs n => |signingOffDiagonal vs z|) (fun _ _ => abs_nonneg _) (Finset.mem_univ z)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingOffDiagonalMax_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:145
theorem fairSigns_distinct_product_mean_zero

Distinct coordinates of a uniformly sampled sign vector have zero product mean. Under the stated conditions.

Formal statement
n :
ℕ
i j :
Fin n
hij :
i ≠ j
(∫ z, sgn (z i) * sgn (z j) ∂fairSigns n) = 0
Proof (Lean source)
-- @node: fairSigns_distinct_product_mean_zero lemma fairSigns_distinct_product_mean_zero (n : ℕ) (i j : Fin n) (hij : i ≠ j) : (∫ z, sgn (z i) * sgn (z j) ∂fairSigns n) = 0 := by classical let := fairSigns_probability n rw [integral_fintype (Integrable.of_finite)] simp only [Measure.real, fairSigns, PMF.toMeasure_apply_singleton _ _ (measurableSet_singleton _), PMF.uniformOfFintype_apply, smul_eq_mul] let e : Signs n ≃ Signs n := { toFun := fun z => update z i (!(z i)) invFun := fun z => update z i (!(z i)) left_inv := by intro z; funext k; by_cases hk : k = i <;> simp [hk] right_inv := by intro z; funext k; by_cases hk : k = i <;> simp [hk] } have hsum := e.sum_comp (fun z => ((card (Signs n) : ℝ≥0∞)⁻¹).toReal * (sgn (z i) * sgn (z j))) have hneg (z : Signs n) : sgn (e z i) * sgn (e z j) = -(sgn (z i) * sgn (z j)) := by change sgn (update z i (!(z i)) i) * sgn (update z i (!(z i)) j) = _ simp only [Function.update_self, Function.update_of_ne hij.symm] cases z i <;> cases z j <;> norm_num [sgn] simp only [hneg, mul_neg, Finset.sum_neg_distrib] at hsum linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSigns_distinct_product_mean_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:168
theorem fairSigns_partition_pair_mean Lemma fairSigns_partition_pair_mean in the paper ↗

An ordered pair of distinct rows belongs to the selected and complementary groups with probability exactly one quarter. Under the stated conditions.

Formal statement
n :
ℕ
i j :
Fin n
hij :
i ≠ j
(∫ η : Signs n, if η i = true ∧ η j = false then (1 : ℝ) else 0 ∂fairSigns n) = 1 / 4
Proof (Lean source)
-- @node: fairSigns_partition_pair_mean lemma fairSigns_partition_pair_mean (n : ℕ) (i j : Fin n) (hij : i ≠ j) : (∫ η : Signs n, if η i = true ∧ η j = false then (1 : ℝ) else 0 ∂fairSigns n) = 1 / 4 := by let := fairSigns_probability n have hp (η : Signs n) : (if η i = true ∧ η j = false then (1 : ℝ) else 0) = (1 + sgn (η i) - sgn (η j) - sgn (η i) * sgn (η j)) / 4 := by cases η i <;> cases η j <;> norm_num [sgn] simp_rw [hp] integral_linearity rw [integral_sub (Integrable.of_finite) (Integrable.of_finite), integral_sub (Integrable.of_finite) (Integrable.of_finite), integral_add (Integrable.of_finite) (Integrable.of_finite)] rw [fairSigns_mean_zero, fairSigns_mean_zero, fairSigns_distinct_product_mean_zero n i j hij] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSigns_partition_pair_mean · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:192

The cross-group signed quadratic form for a selected set and its complement.

Definition (Lean source)
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
z η :
signingPartitionCross vs z η :
ℝ
∑ i, ∑ j, if η i = true ∧
η j = false then sgn (z i) * sgn (z j) * inner ℝ (vs i) (vs j) else 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCross · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:210
theorem signingOffDiagonal_eq_partition_average

Random partitioning recovers exactly one quarter of every fixed off-diagonal form. The asserted mathematical result follows.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
z :
signingOffDiagonal vs z = 4 * ∫ η, signingPartitionCross vs z η ∂fairSigns n
Proof (Lean source)
-- @node: signingOffDiagonal_eq_partition_average lemma signingOffDiagonal_eq_partition_average {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) (z : Signs n) : signingOffDiagonal vs z = 4 * ∫ η, signingPartitionCross vs z η ∂fairSigns n := by classical let := fairSigns_probability n unfold signingPartitionCross rw [integral_finsetSum _ (fun _ _ => Integrable.of_finite)] simp_rw [integral_finsetSum _ (fun _ _ => Integrable.of_finite)] rw [Finset.mul_sum] unfold signingOffDiagonal apply Finset.sum_congr rfl intro i _ rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j _ by_cases hij : i = j · subst j simp · rw [if_neg hij] have hc : (∫ η : Signs n, if η i = true ∧ η j = false then sgn (z i) * sgn (z j) * inner ℝ (vs i) (vs j) else 0 ∂fairSigns n) = (sgn (z i) * sgn (z j) * inner ℝ (vs i) (vs j)) * (1 / 4) := by have he (η : Signs n) : (if η i = true ∧ η j = false then sgn (z i) * sgn (z j) * inner ℝ (vs i) (vs j) else 0) = (sgn (z i) * sgn (z j) * inner ℝ (vs i) (vs j)) * (if η i = true ∧ η j = false then (1 : ℝ) else 0) := by split_ifs <;> simp simp_rw [he] rw [integral_const_mul, fairSigns_partition_pair_mean n i j hij] rw [hc] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingOffDiagonal_eq_partition_average · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:217
theorem signingPartitionCross_eq_inner

The cross-group form is the actual inner product of the two disjoint signed sums.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
z η :
= inner ℝ (∑ i, if η i = true then sgn (z i) • vs i else 0) (∑ j, if η j = false then sgn (z j) • vs j else 0)
Proof (Lean source)
-- @node: signingPartitionCross_eq_inner lemma signingPartitionCross_eq_inner {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) (z η : Signs n) : signingPartitionCross vs z η = inner ℝ (∑ i, if η i = true then sgn (z i) • vs i else 0) (∑ j, if η j = false then sgn (z j) • vs j else 0) := by classical unfold signingPartitionCross simp_rw [sum_inner, inner_sum] apply Finset.sum_congr rfl intro i _ apply Finset.sum_congr rfl intro j _ by_cases hi : η i = true <;> by_cases hj : η j = false <;> simp [hi, hj, real_inner_smul_left, real_inner_smul_right, mul_assoc, mul_left_comm]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCross_eq_inner · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:252

[ Maximum absolute signed cross-group fluctuation for a realized partition.

Definition (Lean source)
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
η :
signingPartitionCrossMax vs η :
ℝ
⨆ z : Signs n, |signingPartitionCross vs z η|
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCrossMax · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:269
theorem signingOffDiagonalMax_le_partition_average

Optimizing after averaging can only decrease the absolute supremum. This is the load-bearing direction of the random-partition inequality in the roadmap.](goal) This uses the stated conclusion.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
signingOffDiagonalMax vs ≤ 4 * ∫ η, signingPartitionCrossMax vs η ∂fairSigns n
Proof (Lean source)
-- @node: signingOffDiagonalMax_le_partition_average lemma signingOffDiagonalMax_le_partition_average {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) : signingOffDiagonalMax vs ≤ 4 * ∫ η, signingPartitionCrossMax vs η ∂fairSigns n := by classical let := fairSigns_probability n unfold signingOffDiagonalMax apply ciSup_le intro z rw [signingOffDiagonal_eq_partition_average, abs_mul, abs_of_pos (by norm_num : (0 : ℝ) < 4)] apply mul_le_mul_of_nonneg_left _ (by norm_num) calc |∫ η, signingPartitionCross vs z η ∂fairSigns n| ≤ ∫ η, |signingPartitionCross vs z η| ∂fairSigns n := abs_integral_le_integral_abs _ ≤ ∫ η, signingPartitionCrossMax vs η ∂fairSigns n := by apply integral_mono (Integrable.of_finite) (Integrable.of_finite) intro η exact le_ciSup (Finite.bddAbove_range (fun z : Signs n => |signingPartitionCross vs z η|)) z
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingOffDiagonalMax_le_partition_average · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:275
theorem signing_row_inner_integrable Lemma signing_row_inner_integrable in the paper ↗

Coordinate second moments integrate inner products of any two rows, even when equal. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
i j :
Fin n
Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => inner ℝ (vs i) (vs j)) (Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: signing_row_inner_integrable lemma signing_row_inner_integrable (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (i j : Fin n) : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => inner ℝ (vs i) (vs j)) (Measure.pi (fun _ : Fin n => P)) := by simp only [PiLp.inner_apply, RCLike.inner_apply, conj_trivial] apply integrable_finsetSum intro a _ exact ((hmom a).comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => P) j)).integrable_mul ((hmom a).comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => P) i))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_row_inner_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:296
theorem signingPartitionCross_integrable

Each signed cross-group quadratic form is integrable under coordinate second moments. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
z η :
Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingPartitionCross vs z η) (Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: signingPartitionCross_integrable lemma signingPartitionCross_integrable (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (z η : Signs n) : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingPartitionCross vs z η) (Measure.pi (fun _ : Fin n => P)) := by unfold signingPartitionCross apply integrable_finsetSum intro i _ apply integrable_finsetSum intro j _ split_ifs · exact (signing_row_inner_integrable n r P hmom i j).const_mul _ · exact integrable_zero _ _ _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCross_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:310
theorem signingPartitionCrossMax_measurable

[ The finite cross-group maximum is Borel for every realized selector. This uses the stated conclusion.

Formal statement
n r :
ℕ
η :
Measurable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingPartitionCrossMax vs η)
Proof (Lean source)
@[fun_prop] -- @node: signingPartitionCrossMax_measurable lemma signingPartitionCrossMax_measurable (n r : ℕ) (η : Signs n) : Measurable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingPartitionCrossMax vs η) := by unfold signingPartitionCrossMax signingPartitionCross apply Measurable.iSup intro z apply Measurable.abs apply Finset.measurable_sum intro i _ apply Finset.measurable_sum intro j _ split_ifs <;> fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCrossMax_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:326
theorem signingPartitionCrossMax_integrable

The finite cross-group maximum is integrable under coordinate second moments.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
η :
Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingPartitionCrossMax vs η) (Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: signingPartitionCrossMax_integrable lemma signingPartitionCrossMax_integrable (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (η : Signs n) : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingPartitionCrossMax vs η) (Measure.pi (fun _ : Fin n => P)) := by classical have hsum : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ∑ z : Signs n, |signingPartitionCross vs z η|) (Measure.pi (fun _ : Fin n => P)) := integrable_finsetSum _ (fun z _ => (signingPartitionCross_integrable n r P hmom z η).abs) apply hsum.mono' (signingPartitionCrossMax_measurable n r η).aestronglyMeasurable apply Filter.Eventually.of_forall intro vs have hnonneg : 0 ≤ signingPartitionCrossMax vs η := (abs_nonneg _).trans (le_ciSup (Finite.bddAbove_range (fun z : Signs n => |signingPartitionCross vs z η|)) (fun _ => true)) rw [Real.norm_eq_abs, abs_of_nonneg hnonneg] apply ciSup_le intro z exact Finset.single_le_sum (f := fun z : Signs n => |signingPartitionCross vs z η|) (fun _ _ => abs_nonneg _) (Finset.mem_univ z)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCrossMax_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:341
theorem signingPartitionCross_average_integrable

Averaging a finite cross-group maximum over selectors preserves integrability. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ∫ η, signingPartitionCrossMax vs η ∂fairSigns n) (Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: signingPartitionCross_average_integrable lemma signingPartitionCross_average_integrable (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ∫ η, signingPartitionCrossMax vs η ∂fairSigns n) (Measure.pi (fun _ : Fin n => P)) := by let := fairSigns_probability n simp_rw [integral_fintype (Integrable.of_finite), smul_eq_mul] exact integrable_finsetSum _ (fun η _ => (signingPartitionCrossMax_integrable n r P hmom η).const_mul _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCross_average_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:364
theorem signingOffDiagonal_integral_le_partition_average

The expected absolute off-diagonal maximum is at most four times the expected cross-group maximum. The finite selector average is inside the row expectation. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
(∫ vs : Fin n → EuclideanSpace ℝ (Fin r), signingOffDiagonalMax vs ∂Measure.pi (fun _ : Fin n => P))
≤ 4 * ∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ η, signingPartitionCrossMax vs η ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P)
Proof (Lean source)
-- @node: signingOffDiagonal_integral_le_partition_average lemma signingOffDiagonal_integral_le_partition_average (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), signingOffDiagonalMax vs ∂Measure.pi (fun _ : Fin n => P)) ≤ 4 * ∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ η, signingPartitionCrossMax vs η ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P) := by have h := integral_mono (signingOffDiagonalMax_integrable n r P hmom) ((signingPartitionCross_average_integrable n r P hmom).const_mul 4) signingOffDiagonalMax_le_partition_average rwa [integral_const_mul] at h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingOffDiagonal_integral_le_partition_average · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDecoupling.lean:376
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.SigningDuality 7 declarations Norm duality and a countable dense direction class supply the unit-ball specialization of the cited contraction interface in the row-signing roadmap.

Unit-ball projections for isotropic signing

Norm duality and a countable dense direction class supply the unit-ball specialization of the cited contraction interface in the row-signing roadmap.

theorem euclidean_unit_direction Lemma euclidean_unit_direction in the paper ↗

Every real Euclidean vector has a unit-ball direction attaining its norm.

Formal statement
r :
ℕ
v :
∃ u : EuclideanSpace ℝ (Fin r),
conclusion 1
‖u‖ ≤ 1
conclusion 2
inner ℝ u v = ‖v‖
Proof (Lean source)
-- @node: euclidean_unit_direction lemma euclidean_unit_direction {r : ℕ} (v : EuclideanSpace ℝ (Fin r)) : ∃ u : EuclideanSpace ℝ (Fin r), ‖u‖ ≤ 1 ∧ inner ℝ u v = ‖v‖ := by by_cases hv : v = 0 · exact ⟨0, by simp, by simp [hv]⟩ have hn : ‖v‖ ≠ 0 := norm_ne_zero_iff.mpr hv refine ⟨‖v‖⁻¹ • v, ?_, ?_⟩ · simp [norm_smul, hn] · rw [real_inner_smul_left, real_inner_self_eq_norm_sq] field_simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.euclidean_unit_direction · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDuality.lean:16
theorem signingNormMax_eq_unit_projection_sum

The signed norm maximum equals the supremum of absolute projections summed over the rows; this is the deterministic duality step in the roadmap.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
= ⨆ u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1}, ∑ i, |inner ℝ u.val (vs i)|
Proof (Lean source)
-- @node: signingNormMax_eq_unit_projection_sum lemma signingNormMax_eq_unit_projection_sum {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) : signingNormMax vs = ⨆ u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1}, ∑ i, |inner ℝ u.val (vs i)| := by have hb : BddAbove (range (fun u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} => ∑ i, |inner ℝ u.val (vs i)|)) := by refine ⟨∑ i, ‖vs i‖, ?_⟩ rintro _ ⟨u, rfl⟩ apply Finset.sum_le_sum intro i _ exact (abs_real_inner_le_norm _ _).trans (by nlinarith [u.property, norm_nonneg (vs i)]) let : Nonempty {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} := ⟨⟨0, by simp⟩⟩ apply le_antisymm · apply ciSup_le intro z obtain ⟨u, hu, he⟩ := euclidean_unit_direction (∑ i, sgn (z i) • vs i) calc ‖∑ i, sgn (z i) • vs i‖ = |inner ℝ u (∑ i, sgn (z i) • vs i)| := by rw [he, abs_of_nonneg (norm_nonneg _)] _ ≤ ∑ i, |inner ℝ u (vs i)| := by rw [← signing_projection_max_eq_sum_abs] exact le_ciSup (Finite.bddAbove_range (fun z : Signs n => |inner ℝ u (∑ i, sgn (z i) • vs i)|)) z _ ≤ _ := le_ciSup hb ⟨u, hu⟩ · apply ciSup_le intro u rw [← signing_projection_max_eq_sum_abs] apply ciSup_le intro z exact ((abs_real_inner_le_norm _ _).trans (by nlinarith [u.property, norm_nonneg (∑ i, sgn (z i) • vs i)])).trans (signing_norm_le_max vs z)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingNormMax_eq_unit_projection_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDuality.lean:28
theorem euclidean_projection_pointwiseSeparable

A separable Euclidean direction set gives a countable class that simultaneously approximates every finite evaluation set of its linear projections.

Formal statement
r :
ℕ
U :
PointwiseSeparable (range (fun u : U => fun v => inner ℝ u.val v))
Proof (Lean source)
-- @node: euclidean_projection_pointwiseSeparable lemma euclidean_projection_pointwiseSeparable {r : ℕ} (U : Set (EuclideanSpace ℝ (Fin r))) : PointwiseSeparable (range (fun u : U => fun v => inner ℝ u.val v)) := by classical obtain ⟨D, hD, hdense⟩ := TopologicalSpace.exists_countable_dense U let f := fun u : U => fun v : EuclideanSpace ℝ (Fin r) => inner ℝ u.val v refine ⟨f '' D, hD.image f, image_subset_range _ _, ?_⟩ rintro g ⟨u, rfl⟩ xs ε hε let R : ℝ := 1 + ∑ x ∈ xs, ‖x‖ have hR : 0 < R := by dsimp [R] positivity obtain ⟨u0, hu0, hdist⟩ := hdense.exists_dist_lt u (div_pos hε hR) refine ⟨f u0, mem_image_of_mem f hu0, ?_⟩ intro x hx have hxR : ‖x‖ ≤ R := by have hxsum := Finset.single_le_sum (fun y _ => norm_nonneg y) hx dsimp [R] linarith have hd : ‖u0.val - u.val‖ < ε / R := by simpa only [Subtype.dist_eq, dist_eq_norm, norm_sub_rev] using hdist calc |f u0 x - f u x| = |inner ℝ (u0.val - u.val) x| := by rw [inner_sub_left] _ ≤ ‖u0.val - u.val‖ * ‖x‖ := abs_real_inner_le_norm _ _ _ ≤ ‖u0.val - u.val‖ * R := mul_le_mul_of_nonneg_left hxR (norm_nonneg _) _ < (ε / R) * R := mul_lt_mul_of_pos_right hd hR _ = ε := div_mul_cancel₀ ε hR.ne'
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.euclidean_projection_pointwiseSeparable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDuality.lean:66
theorem unit_projection_abs_contraction

The unit-ball projection class satisfies factor-two contraction, with no extra separability assumption on its callers. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
radAverage P n (range (fun u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} => fun v => inner ℝ u.val v)) abs
≤ 2 * ofReal (sqrt ((n : ℝ) * r))
Proof (Lean source)
-- @node: unit_projection_abs_contraction lemma unit_projection_abs_contraction (hContraction : ClassicalRademacherContraction) (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : radAverage P n (range (fun u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} => fun v => inner ℝ u.val v)) abs ≤ 2 * ofReal (sqrt ((n : ℝ) * r)) := by let U := {u : EuclideanSpace ℝ (Fin r) | ‖u‖ ≤ 1} let f := fun u : U => fun v => inner ℝ u.val v have hnorm : Integrable (fun v : EuclideanSpace ℝ (Fin r) => ‖v‖) P := ((memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_norm_sq_integrable r P hmom)).integrable (by norm_num) have hgate := hContraction (EuclideanSpace ℝ (Fin r)) P inferInstance n (range f) (euclidean_projection_pointwiseSeparable U) (by rintro g ⟨u, rfl⟩; fun_prop) ⟨fun v => ‖v‖, hnorm, Filter.Eventually.of_forall (by rintro v g ⟨u, rfl⟩ have hu : ‖u.val‖ ≤ 1 := u.property exact (abs_real_inner_le_norm _ _).trans (by nlinarith [norm_nonneg v]))⟩ abs (by convert (lipschitzWith_one_norm : LipschitzWith 1 (norm : ℝ → ℝ)) using 1 <;> rfl) abs_zero have hlinear := projection_radAverage_id_le n r P hmom hiso (fun u : U => u.val) (R := 1) (by norm_num) (fun u => u.property) simpa only [one_mul, f, U] using! hgate.trans (mul_le_mul_right hlinear 2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.unit_projection_abs_contraction · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDuality.lean:97
theorem unit_projection_rademacher_sup_eq_norm

Unit-ball projections recover the length of each Rademacher sum exactly. The asserted mathematical result follows.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
z :
(⨆ g : range (fun u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} => fun v => inner ℝ u.val v), ofReal |∑ i, sgn (z i) * id (g.val (vs i))|)
= ofReal ‖∑ i, sgn (z i) • vs i‖
Proof (Lean source)
-- @node: unit_projection_rademacher_sup_eq_norm lemma unit_projection_rademacher_sup_eq_norm {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) (z : Signs n) : (⨆ g : range (fun u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} => fun v => inner ℝ u.val v), ofReal |∑ i, sgn (z i) * id (g.val (vs i))|) = ofReal ‖∑ i, sgn (z i) • vs i‖ := by apply le_antisymm · apply iSup_le rintro ⟨g, u, rfl⟩ simp only [id_eq, ← real_inner_smul_right, ← inner_sum] apply ENNReal.ofReal_le_ofReal exact (abs_real_inner_le_norm _ _).trans (by nlinarith [u.property, norm_nonneg (∑ i, sgn (z i) • vs i)]) · obtain ⟨u, hu, he⟩ := euclidean_unit_direction (∑ i, sgn (z i) • vs i) let g : range (fun u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} => fun v => inner ℝ u.val v) := ⟨fun v => inner ℝ u v, ⟨⟨u, hu⟩, rfl⟩⟩ have h := le_iSup (fun g : range (fun u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} => fun v => inner ℝ u.val v) => ofReal |∑ i, sgn (z i) * id (g.val (vs i))|) g simpa only [g, id_eq, ← real_inner_smul_right, ← inner_sum, he, abs_of_nonneg (norm_nonneg _)] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.unit_projection_rademacher_sup_eq_norm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDuality.lean:125
theorem unit_projection_radAverage_id_eq

The unit-ball linear Rademacher average is exactly the expected signed norm, so no slack is introduced by the projection representation. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
radAverage P n (range (fun u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} => fun v => inner ℝ u.val v)) id
= ofReal (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: unit_projection_radAverage_id_eq lemma unit_projection_radAverage_id_eq (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) : radAverage P n (range (fun u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} => fun v => inner ℝ u.val v)) id = ofReal (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P)) := by let := fairSigns_probability n let Q := (Measure.pi (fun _ : Fin n => P)).prod (fairSigns n) let f := fun ω : (Fin n → EuclideanSpace ℝ (Fin r)) × Signs n => ‖∑ i, sgn (ω.2 i) • ω.1 i‖ have hp : MemLp f 2 Q := (memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_rademacher_norm_sq_integrable n r P hmom) have hf : Integrable f Q := hp.integrable (by norm_num) unfold radAverage simp_rw [unit_projection_rademacher_sup_eq_norm] rw [← lintegral_prod (fun ω : (Fin n → EuclideanSpace ℝ (Fin r)) × Signs n => ofReal (f ω)) (by fun_prop), ← ofReal_integral_eq_lintegral_ofReal hf (Filter.Eventually.of_forall (fun ω => norm_nonneg _)), integral_prod _ hf]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.unit_projection_radAverage_id_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDuality.lean:150
theorem signingNormMax_le_centered_unit_projection

Removing the population mean from each unit projection bounds the signed norm maximum by the row count plus the largest centered empirical fluctuation. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
vs :
Fin n → EuclideanSpace ℝ (Fin r)
≤ (n : ℝ)
+ ⨆ u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1}, |∑ i, (|inner ℝ u.val (vs i)| - ∫ v, |inner ℝ u.val v| ∂P)|
Proof (Lean source)
-- @node: signingNormMax_le_centered_unit_projection lemma signingNormMax_le_centered_unit_projection (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) (vs : Fin n → EuclideanSpace ℝ (Fin r)) : signingNormMax vs ≤ (n : ℝ) + ⨆ u : {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1}, |∑ i, (|inner ℝ u.val (vs i)| - ∫ v, |inner ℝ u.val v| ∂P)| := by let U := {u : EuclideanSpace ℝ (Fin r) // ‖u‖ ≤ 1} let c := fun u : U => ∫ v, |inner ℝ u.val v| ∂P have hc (u : U) : 0 ≤ c u ∧ c u ≤ 1 := ⟨integral_nonneg (fun _ => abs_nonneg _), (isotropic_projection_abs_integral_le r P hmom hiso u.val).trans u.property⟩ have hb : BddAbove (range (fun u : U => |∑ i, (|inner ℝ u.val (vs i)| - c u)|)) := by refine ⟨(∑ i, ‖vs i‖) + n, ?_⟩ rintro _ ⟨u, rfl⟩ calc |∑ i, (|inner ℝ u.val (vs i)| - c u)| ≤ ∑ i, |(|inner ℝ u.val (vs i)|) - c u| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ i, (‖vs i‖ + 1) := by apply Finset.sum_le_sum intro i _ have hproj : |inner ℝ u.val (vs i)| ≤ ‖vs i‖ := (abs_real_inner_le_norm _ _).trans (by nlinarith [u.property, norm_nonneg (vs i)]) exact (abs_sub _ _).trans (by rw [abs_abs, abs_of_nonneg (hc u).1] linarith [(hc u).2]) _ = _ := by simp [Finset.sum_add_distrib] let : Nonempty U := ⟨⟨0, by simp⟩⟩ rw [signingNormMax_eq_unit_projection_sum] apply ciSup_le intro u have hsup := le_ciSup hb u have he : ∑ i, |inner ℝ u.val (vs i)| = (∑ i : Fin n, (|inner ℝ u.val (vs i)| - c u)) + (n : ℝ) * c u := by simp [Finset.sum_sub_distrib] have hmean : (n : ℝ) * c u ≤ n := by nlinarith [(hc u).2, (Nat.cast_nonneg n : (0 : ℝ) ≤ n)] change ∑ i, |inner ℝ u.val (vs i)| ≤ (n : ℝ) + ⨆ u : U, |∑ i, (|inner ℝ u.val (vs i)| - c u)| rw [he] linarith [le_abs_self (∑ i, (|inner ℝ u.val (vs i)| - c u))]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingNormMax_le_centered_unit_projection · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningDuality.lean:175
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.SigningPartition 8 declarations The selected rows and their complement are independent product samples after reindexing.

Reindexing the random signing partition

The selected rows and their complement are independent product samples after reindexing. Their cross maximum is controlled by the independent-group bound, and partition averaging completes the expected minimum-signing lower bound.

An indicator sum is exactly the sum on its selected subtype.

Formal statement
ι E :
p :
ι → Prop
f :
ι → E
(∑ i, if p i then f i else 0) = ∑ i : Subtype p, f i
Proof (Lean source)
-- @node: signing_sum_select_eq lemma signing_sum_select_eq {ι E : Type} [Fintype ι] [AddCommMonoid E] (p : ι → Prop) [DecidablePred p] (f : ι → E) : (∑ i, if p i then f i else 0) = ∑ i : Subtype p, f i := by have h := Fintype.sum_subtype_add_sum_subtype p (fun i => if p i then f i else 0) have hy (i : Subtype p) : p i := i.property have hn (i : {i // ¬p i}) : ¬p i := i.property simpa only [hy, hn, ite_true, ite_false, Finset.sum_const_zero, add_zero] using h.symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_sum_select_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningPartition.lean:17

[ Selected and complementary arrays, each indexed by its own finite cardinality.

Definition (Lean source)
n r :
ℕ
η :
signingPartitionReindex n r η :
(Fin n → EuclideanSpace ℝ (Fin r)) ≃ᵐ (Fin (card {i : Fin n // η i = true}) → EuclideanSpace ℝ (Fin r)) × (Fin (card {i : Fin n // ¬η i = true}) → EuclideanSpace ℝ (Fin r))
(MeasurableEquiv.piEquivPiSubtypeProd (fun _ : Fin n => EuclideanSpace ℝ (Fin r)) (fun i => η i = true)).trans ((MeasurableEquiv.piCongrLeft (fun _ => EuclideanSpace ℝ (Fin r)) (Fintype.equivFin {i : Fin n // η i = true})).prodCongr (MeasurableEquiv.piCongrLeft (fun _ => EuclideanSpace ℝ (Fin r)) (Fintype.equivFin {i : Fin n // ¬η i = true})))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionReindex · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningPartition.lean:27
theorem signingPartitionReindex_measurePreserving

Partition reindexing preserves the product law, proving independence of the groups.](goal) This uses the stated conclusion.

Formal statement
n r :
ℕ
η :
MeasurePreserving (signingPartitionReindex n r η) (Measure.pi (fun _ : Fin n => P)) ((Measure.pi (fun _ : Fin (card {i : Fin n // η i = true}) => P)).prod (Measure.pi (fun _ : Fin (card {i : Fin n // ¬η i = true}) => P)))
Proof (Lean source)
-- @node: signingPartitionReindex_measurePreserving lemma signingPartitionReindex_measurePreserving (n r : ℕ) (η : Signs n) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] : MeasurePreserving (signingPartitionReindex n r η) (Measure.pi (fun _ : Fin n => P)) ((Measure.pi (fun _ : Fin (card {i : Fin n // η i = true}) => P)).prod (Measure.pi (fun _ : Fin (card {i : Fin n // ¬η i = true}) => P))) := by exact ((measurePreserving_piCongrLeft (fun _ => P) (Fintype.equivFin {i : Fin n // η i = true})).prod (measurePreserving_piCongrLeft (fun _ => P) (Fintype.equivFin {i : Fin n // ¬η i = true}))).comp (measurePreserving_piEquivPiSubtypeProd (fun _ : Fin n => P) (fun i => η i = true))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionReindex_measurePreserving · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningPartition.lean:40
theorem signingPartitionCrossMax_le_reindexed

A realized partition's cross maximum is bounded by the independent-group projection maximum after reindexing, including either empty group.

Formal statement
n r :
ℕ
η :
vs :
Fin n → EuclideanSpace ℝ (Fin r)
Proof (Lean source)
-- @node: signingPartitionCrossMax_le_reindexed lemma signingPartitionCrossMax_le_reindexed (n r : ℕ) (η : Signs n) (vs : Fin n → EuclideanSpace ℝ (Fin r)) : signingPartitionCrossMax vs η ≤ twoGroupCrossMax (signingPartitionReindex n r η vs).1 (signingPartitionReindex n r η vs).2 := by classical let I := {i : Fin n // η i = true} let J := {i : Fin n // ¬η i = true} let eI := Fintype.equivFin I let eJ := Fintype.equivFin J let x : Fin (card I) → EuclideanSpace ℝ (Fin r) := fun i => vs (eI.symm i) let y : Fin (card J) → EuclideanSpace ℝ (Fin r) := fun j => vs (eJ.symm j) simp only [signingPartitionReindex, MeasurableEquiv.trans_apply, MeasurableEquiv.prodCongr, MeasurableEquiv.coe_mk, Equiv.prodCongr_apply, MeasurableEquiv.piEquivPiSubtypeProd_apply, Prod.map_apply, MeasurableEquiv.piCongrLeft] have hx : (Equiv.piCongrLeft (fun _ => EuclideanSpace ℝ (Fin r)) eI) (fun i : I => vs i) = x := by funext i simp [Equiv.piCongrLeft_apply, x] have hy : (Equiv.piCongrLeft (fun _ => EuclideanSpace ℝ (Fin r)) eJ) (fun j : J => vs j) = y := by funext j simp [Equiv.piCongrLeft_apply, y] change signingPartitionCrossMax vs η ≤ twoGroupCrossMax ((Equiv.piCongrLeft (fun _ => EuclideanSpace ℝ (Fin r)) eI) (fun i : I => vs i)) ((Equiv.piCongrLeft (fun _ => EuclideanSpace ℝ (Fin r)) eJ) (fun j : J => vs j)) rw [hx, hy] unfold signingPartitionCrossMax apply ciSup_le intro z let w : Signs (card J) := fun j => z (eJ.symm j) have hI : (∑ i, if η i = true then sgn (z i) • vs i else 0) = ∑ i : Fin (card I), sgn (z (eI.symm i)) • x i := by rw [signing_sum_select_eq] exact (eI.symm.sum_comp (fun i : I => sgn (z i) • vs i)).symm have hJ : (∑ j, if η j = false then sgn (z j) • vs j else 0) = ∑ j, sgn (w j) • y j := by have he (j : Fin n) : (η j = false) ↔ ¬η j = true := by cases η j <;> simp simp_rw [he] rw [signing_sum_select_eq] exact (eJ.symm.sum_comp (fun j : J => sgn (z j) • vs j)).symm rw [signingPartitionCross_eq_inner, hI, hJ, sum_inner] have hpoint (i : Fin (card I)) : |inner ℝ (sgn (z (eI.symm i)) • x i) (∑ j, sgn (w j) • y j)| = |inner ℝ (∑ j, sgn (w j) • y j) (x i)| := by rw [real_inner_smul_left, real_inner_comm] cases z (eI.symm i) <;> simp [sgn] apply (Finset.abs_sum_le_sum_abs _ _).trans simp_rw [hpoint] exact le_ciSup (Finite.bddAbove_range (fun w : Signs (card J) => ∑ i, |inner ℝ (∑ j, sgn (w j) • y j) (x i)|)) w
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCrossMax_le_reindexed · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningPartition.lean:53

The explicit cross-group error is bounded uniformly over all partitions of n rows. Under the stated conditions, the asserted mathematical result follows.

Formal statement
a b n r :
ℕ
hab :
a + b = n
(a : ℝ) * b + 4 * a * sqrt ((b : ℝ) * r) + 4 * b * sqrt ((a : ℝ) * r)
≤ (n : ℝ) ^ 2 / 4 + 4 * n * sqrt ((n : ℝ) * r)
Proof (Lean source)
-- @node: signing_group_error_le lemma signing_group_error_le (a b n r : ℕ) (hab : a + b = n) : (a : ℝ) * b + 4 * a * sqrt ((b : ℝ) * r) + 4 * b * sqrt ((a : ℝ) * r) ≤ (n : ℝ) ^ 2 / 4 + 4 * n * sqrt ((n : ℝ) * r) := by have habR : (a : ℝ) + b = n := by exact_mod_cast hab have ha : (0 : ℝ) ≤ a := Nat.cast_nonneg a have hb : (0 : ℝ) ≤ b := Nat.cast_nonneg b have hr : (0 : ℝ) ≤ r := Nat.cast_nonneg r have hsa : sqrt ((a : ℝ) * r) ≤ sqrt ((n : ℝ) * r) := Real.sqrt_le_sqrt (mul_le_mul_of_nonneg_right (by linarith) hr) have hsb : sqrt ((b : ℝ) * r) ≤ sqrt ((n : ℝ) * r) := Real.sqrt_le_sqrt (mul_le_mul_of_nonneg_right (by linarith) hr) have hm1 := mul_le_mul_of_nonneg_left hsb (by positivity : 0 ≤ 4 * (a : ℝ)) have hm2 := mul_le_mul_of_nonneg_left hsa (by positivity : 0 ≤ 4 * (b : ℝ)) have hprod : (a : ℝ) * b ≤ (n : ℝ) ^ 2 / 4 := by nlinarith [sq_nonneg ((a : ℝ) - b)] calc _ ≤ (a : ℝ) * b + 4 * a * sqrt ((n : ℝ) * r) + 4 * b * sqrt ((n : ℝ) * r) := add_le_add (add_le_add (le_refl _) hm1) hm2 _ = (a : ℝ) * b + 4 * n * sqrt ((n : ℝ) * r) := by rw [← habR]; ring _ ≤ _ := by linarith [hprod]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_group_error_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningPartition.lean:109
theorem signingPartitionCrossMax_integral_le

Each fixed selector satisfies the independent-group cross bound under the original row law. Reindexing supplies the independence required by the roadmap. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
η :
(∫ vs : Fin n → EuclideanSpace ℝ (Fin r), signingPartitionCrossMax vs η ∂Measure.pi (fun _ : Fin n => P))
≤ (n : ℝ) ^ 2 / 4 + 4 * n * sqrt ((n : ℝ) * r)
Proof (Lean source)
-- @node: signingPartitionCrossMax_integral_le lemma signingPartitionCrossMax_integral_le (hContraction : ClassicalRademacherContraction) (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) (η : Signs n) : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), signingPartitionCrossMax vs η ∂Measure.pi (fun _ : Fin n => P)) ≤ (n : ℝ) ^ 2 / 4 + 4 * n * sqrt ((n : ℝ) * r) := by let a := card {i : Fin n // η i = true} let b := card {i : Fin n // ¬η i = true} have hmp := signingPartitionReindex_measurePreserving n r η P have hi : Integrable (fun p : (Fin a → EuclideanSpace ℝ (Fin r)) × (Fin b → EuclideanSpace ℝ (Fin r)) => twoGroupCrossMax p.1 p.2) ((Measure.pi (fun _ : Fin a => P)).prod (Measure.pi (fun _ : Fin b => P))) := (twoGroupCrossMax_joint_integrable a b r P hmom).swap have hmono := integral_mono (signingPartitionCrossMax_integrable n r P hmom η) (hmp.integrable_comp_of_integrable hi) (signingPartitionCrossMax_le_reindexed n r η) simp only [Function.comp_apply] at hmono rw [hmp.integral_comp' (fun p => twoGroupCrossMax p.1 p.2)] at hmono rw [integral_prod_symm _ hi] at hmono have hcross := independent_group_cross_integral_le_explicit hContraction a b r P hmom hiso have hab : a + b = n := by dsimp [a, b] rw [Fintype.card_subtype_compl, Fintype.card_fin] have hle := Fintype.card_subtype_le (fun i : Fin n => η i = true) simp only [Fintype.card_fin] at hle omega exact hmono.trans (hcross.trans (signing_group_error_le a b n r hab))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCrossMax_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningPartition.lean:133
theorem signingPartitionCross_average_le

Averaging the uniform cross bound over fair selectors closes the random-partition step, with the exact factor four from the ordered-pair selection probability. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
4 * (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ η, signingPartitionCrossMax vs η ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P))
≤ (n : ℝ) ^ 2 + 16 * n * sqrt ((n : ℝ) * r)
Proof (Lean source)
-- @node: signingPartitionCross_average_le lemma signingPartitionCross_average_le (hContraction : ClassicalRademacherContraction) (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) : 4 * (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ η, signingPartitionCrossMax vs η ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P)) ≤ (n : ℝ) ^ 2 + 16 * n * sqrt ((n : ℝ) * r) := by let := fairSigns_probability n have hswap : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ η, signingPartitionCrossMax vs η ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P)) = ∫ η, ∫ vs : Fin n → EuclideanSpace ℝ (Fin r), signingPartitionCrossMax vs η ∂Measure.pi (fun _ : Fin n => P) ∂fairSigns n := by simp_rw [integral_fintype (μ := fairSigns n) (Integrable.of_finite), smul_eq_mul] rw [integral_finsetSum _ (fun η _ => (signingPartitionCrossMax_integrable n r P hmom η).const_mul _)] simp_rw [integral_const_mul] rw [hswap] have hbound := integral_mono (μ := fairSigns n) (Integrable.of_finite) (integrable_const ((n : ℝ) ^ 2 / 4 + 4 * n * sqrt ((n : ℝ) * r))) (signingPartitionCrossMax_integral_le hContraction n r P hmom hiso) rw [integral_const] at hbound simp only [probReal_univ, one_smul] at hbound linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCross_average_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningPartition.lean:165
theorem isotropic_row_signing

Independent isotropic rows have the stated expected minimum-signing lower bound. Under the stated conditions.

Formal statement
hContraction_of_gate :
r0 n :
ℕ
hr :
0 < r0
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
I :
∫ vs : Fin n → EuclideanSpace ℝ (Fin r0), ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P)
(n : ℝ) * r0 - (n : ℝ) ^ 2 - 16 * n * sqrt ((n : ℝ) * r0) ≤ I
4096 * n ≤ r0
(n : ℝ) * r0 / 2 ≤ I
Proof (Lean source)
-- @node: lem:isotropic-row-signing lemma isotropic_row_signing (hContraction_of_gate : ClassicalRademacherContraction) (r0 n : ℕ) (hr : 0 < r0) (P : Measure (EuclideanSpace ℝ (Fin r0))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : let I := ∫ vs : Fin n → EuclideanSpace ℝ (Fin r0), ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P) (n : ℝ) * r0 - (n : ℝ) ^ 2 - 16 * n * sqrt ((n : ℝ) * r0) ≤ I ∧ (4096 * n ≤ r0 → (n : ℝ) * r0 / 2 ≤ I) := by dsimp only have hgeneral : (n : ℝ) * r0 - (n : ℝ) ^ 2 - 16 * n * sqrt ((n : ℝ) * r0) ≤ ∫ vs : Fin n → EuclideanSpace ℝ (Fin r0), ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂Measure.pi (fun _ : Fin n => P) := by by_cases hn : n ≤ 256 · exact isotropic_small_sample_signing_lower n r0 hn P hmom hiso · have hfluctuation : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r0), signingOffDiagonalMax vs ∂Measure.pi (fun _ : Fin n => P)) ≤ (n : ℝ) ^ 2 + 16 * n * sqrt ((n : ℝ) * r0) := by have hcross : 4 * (∫ vs : Fin n → EuclideanSpace ℝ (Fin r0), ∫ η, signingPartitionCrossMax vs η ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P)) ≤ (n : ℝ) ^ 2 + 16 * n * sqrt ((n : ℝ) * r0) := by exact signingPartitionCross_average_le hContraction_of_gate n r0 P hmom hiso exact (signingOffDiagonal_integral_le_partition_average n r0 P hmom).trans hcross have hdiagonal := isotropic_signing_lower_of_offDiagonal n r0 P hmom hiso linarith refine ⟨hgeneral, ?_⟩ intro hlarge have herr := isotropic_signing_error_le_half n r0 hlarge linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_row_signing · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningPartition.lean:194
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.SigningRademacher 19 declarations Independent fair signs cancel every off-diagonal term without centering the row law.

Rademacher moments for isotropic signing

Independent fair signs cancel every off-diagonal term without centering the row law. The resulting exact second moment gives the square-root first-moment estimate used by the symmetrization and contraction roadmap. Finite projection classes satisfy the cited contraction bound, and cross-group maxima are expressed as absolute projections.

theorem signingOffDiagonal_fair_integral_zero

Fair signs annihilate the entire off-diagonal form for deterministic rows.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
(∫ z, signingOffDiagonal vs z ∂fairSigns n) = 0
Proof (Lean source)
-- @node: signingOffDiagonal_fair_integral_zero lemma signingOffDiagonal_fair_integral_zero {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) : (∫ z, signingOffDiagonal vs z ∂fairSigns n) = 0 := by classical let := fairSigns_probability n unfold signingOffDiagonal rw [integral_finsetSum _ (fun _ _ => Integrable.of_finite)] simp_rw [integral_finsetSum _ (fun _ _ => Integrable.of_finite)] apply Finset.sum_eq_zero intro i _ apply Finset.sum_eq_zero intro j _ by_cases hij : i = j · simp [hij] · simp only [if_neg hij] rw [integral_mul_const, fairSigns_distinct_product_mean_zero n i j hij, zero_mul]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingOffDiagonal_fair_integral_zero · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:18
theorem signing_fair_norm_sq_integral

The fair-sign second moment is precisely the deterministic diagonal energy.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
(∫ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂fairSigns n) = ∑ i, ‖vs i‖ ^ 2
Proof (Lean source)
-- @node: signing_fair_norm_sq_integral lemma signing_fair_norm_sq_integral {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) : (∫ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂fairSigns n) = ∑ i, ‖vs i‖ ^ 2 := by let := fairSigns_probability n simp_rw [signing_norm_sq_eq_diagonal_add] rw [integral_add (Integrable.of_finite) (Integrable.of_finite), signingOffDiagonal_fair_integral_zero] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_fair_norm_sq_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:37
theorem signing_fair_norm_integral_le

The fair-sign first moment is bounded by the square root of diagonal energy.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
(∫ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ∂fairSigns n) ≤ sqrt (∑ i, ‖vs i‖ ^ 2)
Proof (Lean source)
-- @node: signing_fair_norm_integral_le lemma signing_fair_norm_integral_le {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) : (∫ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ∂fairSigns n) ≤ sqrt (∑ i, ‖vs i‖ ^ 2) := by let := fairSigns_probability n have hp : MemLp (fun z : Signs n => ‖∑ i, sgn (z i) • vs i‖) 2 (fairSigns n) := (memLp_two_iff_integrable_sq (measurable_of_finite _).aestronglyMeasurable).mpr Integrable.of_finite have hv := variance_nonneg (X := fun z : Signs n => ‖∑ i, sgn (z i) • vs i‖) (μ := fairSigns n) rw [variance_eq_sub hp] at hv simp only [Pi.pow_apply] at hv rw [signing_fair_norm_sq_integral] at hv have henergy : 0 ≤ ∑ i, ‖vs i‖ ^ 2 := Finset.sum_nonneg (fun _ _ => sq_nonneg _) nlinarith [Real.sqrt_nonneg (∑ i, ‖vs i‖ ^ 2), Real.sq_sqrt henergy]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_fair_norm_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:49
theorem isotropic_rademacher_norm_sq_integral

Averaging the exact fair-sign moment over isotropic rows gives sample size times dimension. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
(∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P))
= (n : ℝ) * r
Proof (Lean source)
-- @node: isotropic_rademacher_norm_sq_integral lemma isotropic_rademacher_norm_sq_integral (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2 ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P)) = (n : ℝ) * r := by simp_rw [signing_fair_norm_sq_integral] exact isotropic_sample_diagonal_integral n r P hmom hiso
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_rademacher_norm_sq_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:67
theorem isotropic_rademacher_norm_sq_integrable

Joint row/sign squared energy is integrable using only coordinate second moments. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
Integrable (fun ω : (Fin n → EuclideanSpace ℝ (Fin r)) × Signs n => ‖∑ i, sgn (ω.2 i) • ω.1 i‖ ^ 2) ((Measure.pi (fun _ : Fin n => P)).prod (fairSigns n))
Proof (Lean source)
-- @node: isotropic_rademacher_norm_sq_integrable lemma isotropic_rademacher_norm_sq_integrable (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) : Integrable (fun ω : (Fin n → EuclideanSpace ℝ (Fin r)) × Signs n => ‖∑ i, sgn (ω.2 i) • ω.1 i‖ ^ 2) ((Measure.pi (fun _ : Fin n => P)).prod (fairSigns n)) := by let := fairSigns_probability n apply (integrable_prod_iff (by fun_prop)).mpr constructor · exact Filter.Eventually.of_forall (fun _ => Integrable.of_finite) · simp only [norm_pow, norm_norm] simp_rw [signing_fair_norm_sq_integral] exact integrable_finsetSum _ (fun i _ => (measurePreserving_eval (fun _ : Fin n => P) i).integrable_comp_of_integrable (isotropic_norm_sq_integrable r P hmom))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_rademacher_norm_sq_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:79
theorem isotropic_rademacher_norm_integral_le

Joint Rademacher averaging has first moment at most the isotropic square-root scale. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
(∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P))
≤ sqrt ((n : ℝ) * r)
Proof (Lean source)
-- @node: isotropic_rademacher_norm_integral_le lemma isotropic_rademacher_norm_integral_le (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) : (∫ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P)) ≤ sqrt ((n : ℝ) * r) := by let := fairSigns_probability n let Q := (Measure.pi (fun _ : Fin n => P)).prod (fairSigns n) let f := fun ω : (Fin n → EuclideanSpace ℝ (Fin r)) × Signs n => ‖∑ i, sgn (ω.2 i) • ω.1 i‖ have hp : MemLp f 2 Q := (memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_rademacher_norm_sq_integrable n r P hmom) have hv := variance_nonneg (X := f) (μ := Q) rw [variance_eq_sub hp] at hv have hsecond : (∫ ω, f ω ^ 2 ∂Q) = (n : ℝ) * r := by rw [integral_prod _ (isotropic_rademacher_norm_sq_integrable n r P hmom)] exact isotropic_rademacher_norm_sq_integral n r P hmom hiso simp only [Pi.pow_apply] at hv rw [hsecond] at hv have hfirst : (∫ ω, f ω ∂Q) ≤ sqrt ((n : ℝ) * r) := by nlinarith [Real.sqrt_nonneg ((n : ℝ) * r), Real.sq_sqrt (mul_nonneg (Nat.cast_nonneg n) (Nat.cast_nonneg r))] rw [integral_prod _ (hp.integrable (by norm_num))] at hfirst exact hfirst
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.isotropic_rademacher_norm_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:97
theorem finite_pointwiseSeparable

A finite function class is its own countable pointwise-dense subclass. Under the stated conditions.

Formal statement
S :
Type
Set (S → ℝ)
hG :
G.Finite
Proof (Lean source)
-- @node: finite_pointwiseSeparable lemma finite_pointwiseSeparable {S : Type} {G : Set (S → ℝ)} (hG : G.Finite) : PointwiseSeparable G := by refine ⟨G, hG.countable, subset_rfl, ?_⟩ intro g hg xs ε hε exact ⟨g, hg, fun x _ => by simpa using hε⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_pointwiseSeparable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:125
theorem projection_radAverage_id_le Lemma projection_radAverage_id_le in the paper ↗

Linear projections in a bounded direction class are controlled by the random signed norm. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
ι :
Type
u :
ι → EuclideanSpace ℝ (Fin r)
R :
ℝ
hR :
0 ≤ R
hu :
∀ a, ‖u a‖ ≤ R
radAverage P n (range (fun a => fun v => inner ℝ (u a) v)) id
≤ ofReal (R * sqrt ((n : ℝ) * r))
Proof (Lean source)
-- @node: projection_radAverage_id_le lemma projection_radAverage_id_le (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) {ι : Type} (u : ι → EuclideanSpace ℝ (Fin r)) {R : ℝ} (hR : 0 ≤ R) (hu : ∀ a, ‖u a‖ ≤ R) : radAverage P n (range (fun a => fun v => inner ℝ (u a) v)) id ≤ ofReal (R * sqrt ((n : ℝ) * r)) := by let := fairSigns_probability n let Q := (Measure.pi (fun _ : Fin n => P)).prod (fairSigns n) let f := fun ω : (Fin n → EuclideanSpace ℝ (Fin r)) × Signs n => ‖∑ i, sgn (ω.2 i) • ω.1 i‖ have hp : MemLp f 2 Q := (memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_rademacher_norm_sq_integrable n r P hmom) have hf : Integrable f Q := hp.integrable (by norm_num) have hpoint (vs : Fin n → EuclideanSpace ℝ (Fin r)) (z : Signs n) : (⨆ g : range (fun a => fun v => inner ℝ (u a) v), ofReal |∑ i, sgn (z i) * id (g.val (vs i))|) ≤ ofReal (R * ‖∑ i, sgn (z i) • vs i‖) := by apply iSup_le intro g obtain ⟨a, ha⟩ := g.property rw [← ha] simp only [id_eq, ← real_inner_smul_right, ← inner_sum] exact ENNReal.ofReal_le_ofReal ((abs_real_inner_le_norm _ _).trans (mul_le_mul_of_nonneg_right (hu a) (norm_nonneg _))) calc radAverage P n (range (fun a => fun v => inner ℝ (u a) v)) id ≤ ∫⁻ vs : Fin n → EuclideanSpace ℝ (Fin r), ∫⁻ z : Signs n, ofReal (R * ‖∑ i, sgn (z i) • vs i‖) ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P) := lintegral_mono (fun vs => lintegral_mono (hpoint vs)) _ = ofReal (R * ∫ ω, f ω ∂Q) := by rw [← lintegral_prod (fun ω : (Fin n → EuclideanSpace ℝ (Fin r)) × Signs n => ofReal (R * f ω)) (by fun_prop), ← ofReal_integral_eq_lintegral_ofReal (hf.const_mul R) (Filter.Eventually.of_forall (fun ω => mul_nonneg hR (norm_nonneg _))), integral_const_mul] _ ≤ ofReal (R * sqrt ((n : ℝ) * r)) := by apply ENNReal.ofReal_le_ofReal apply mul_le_mul_of_nonneg_left _ hR rw [integral_prod _ hf] exact isotropic_rademacher_norm_integral_le n r P hmom hiso
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.projection_radAverage_id_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:133
theorem finite_projection_abs_contraction

The cited factor-two contraction applies to every finite bounded projection family. This is the deterministic class used after conditioning on the other row group. Under the stated conditions.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
hiso :
∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0
ι :
Type
Finite ι
u :
ι → EuclideanSpace ℝ (Fin r)
R :
ℝ
hR :
0 ≤ R
hu :
∀ a, ‖u a‖ ≤ R
radAverage P n (range (fun a => fun v => inner ℝ (u a) v)) abs
≤ 2 * ofReal (R * sqrt ((n : ℝ) * r))
Proof (Lean source)
-- @node: finite_projection_abs_contraction lemma finite_projection_abs_contraction (hContraction : ClassicalRademacherContraction) (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) (hiso : ∀ a b, (∫ v, v a * v b ∂P) = if a = b then 1 else 0) {ι : Type} [Finite ι] (u : ι → EuclideanSpace ℝ (Fin r)) {R : ℝ} (hR : 0 ≤ R) (hu : ∀ a, ‖u a‖ ≤ R) : radAverage P n (range (fun a => fun v => inner ℝ (u a) v)) abs ≤ 2 * ofReal (R * sqrt ((n : ℝ) * r)) := by have hnorm : Integrable (fun v : EuclideanSpace ℝ (Fin r) => ‖v‖) P := ((memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_norm_sq_integrable r P hmom)).integrable (by norm_num) have hgate := hContraction (EuclideanSpace ℝ (Fin r)) P inferInstance n (range (fun a => fun v => inner ℝ (u a) v)) (finite_pointwiseSeparable (finite_range _)) (by rintro g ⟨a, rfl⟩; fun_prop) ⟨fun v => R * ‖v‖, hnorm.const_mul R, Filter.Eventually.of_forall (by intro v g hg obtain ⟨a, rfl⟩ := hg exact (abs_real_inner_le_norm _ _).trans (mul_le_mul_of_nonneg_right (hu a) (norm_nonneg _)))⟩ abs (by convert (lipschitzWith_one_norm : LipschitzWith 1 (norm : ℝ → ℝ)) using 1 <;> rfl) (abs_zero) exact hgate.trans (mul_le_mul_right (projection_radAverage_id_le n r P hmom hiso u hR hu) 2)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_projection_abs_contraction · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:179
theorem signing_projection_max_eq_sum_abs

Signs chosen according to a fixed projection attain the sum of absolute projections. The asserted mathematical result follows.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
u :
(⨆ z : Signs n, |inner ℝ u (∑ i, sgn (z i) • vs i)|) = ∑ i, |inner ℝ u (vs i)|
Proof (Lean source)
-- @node: signing_projection_max_eq_sum_abs lemma signing_projection_max_eq_sum_abs {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) (u : EuclideanSpace ℝ (Fin r)) : (⨆ z : Signs n, |inner ℝ u (∑ i, sgn (z i) • vs i)|) = ∑ i, |inner ℝ u (vs i)| := by classical apply le_antisymm · apply ciSup_le intro z simp only [inner_sum, real_inner_smul_right] calc |∑ i, sgn (z i) * inner ℝ u (vs i)| ≤ ∑ i, |sgn (z i) * inner ℝ u (vs i)| := Finset.abs_sum_le_sum_abs _ _ _ = ∑ i, |inner ℝ u (vs i)| := by apply Finset.sum_congr rfl intro i _ cases z i <;> simp [sgn] · let z : Signs n := fun i => decide (0 ≤ inner ℝ u (vs i)) have he : inner ℝ u (∑ i, sgn (z i) • vs i) = ∑ i, |inner ℝ u (vs i)| := by simp only [inner_sum, real_inner_smul_right] apply Finset.sum_congr rfl intro i _ by_cases hi : 0 ≤ inner ℝ u (vs i) · simp [z, hi, sgn, abs_of_nonneg hi] · simp [z, hi, sgn, abs_of_neg (lt_of_not_ge hi)] have h := le_ciSup (Finite.bddAbove_range (fun z : Signs n => |inner ℝ u (∑ i, sgn (z i) • vs i)|)) z rwa [he, abs_of_nonneg (Finset.sum_nonneg (fun _ _ => abs_nonneg _))] at h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_projection_max_eq_sum_abs · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:207

[ Maximum norm over all signings of deterministic rows.

Definition (Lean source)
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
signingNormMax vs :
ℝ
⨆ z : Signs n, ‖∑ i, sgn (z i) • vs i‖
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingNormMax · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:238
theorem signing_norm_le_max

Every signed norm is at most the finite maximum.](goal) This uses the stated conclusion.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
z :
‖∑ i, sgn (z i) • vs i‖ ≤ signingNormMax vs
Proof (Lean source)
-- @node: signing_norm_le_max lemma signing_norm_le_max {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) (z : Signs n) : ‖∑ i, sgn (z i) • vs i‖ ≤ signingNormMax vs := le_ciSup (Finite.bddAbove_range (fun z : Signs n => ‖∑ i, sgn (z i) • vs i‖)) z
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signing_norm_le_max · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:243
theorem signingNormMax_nonneg

The maximum signed norm is nonnegative, including the empty sample.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
Proof (Lean source)
-- @node: signingNormMax_nonneg lemma signingNormMax_nonneg {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) : 0 ≤ signingNormMax vs := (norm_nonneg _).trans (signing_norm_le_max vs (fun _ => true))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingNormMax_nonneg · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:250
theorem signingNormMax_le_sum_norm

The sum of row lengths is a common envelope for all signed norms.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
signingNormMax vs ≤ ∑ i, ‖vs i‖
Proof (Lean source)
-- @node: signingNormMax_le_sum_norm lemma signingNormMax_le_sum_norm {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) : signingNormMax vs ≤ ∑ i, ‖vs i‖ := by apply ciSup_le intro z calc ‖∑ i, sgn (z i) • vs i‖ ≤ ∑ i, ‖sgn (z i) • vs i‖ := norm_sum_le _ _ _ = ∑ i, ‖vs i‖ := by apply Finset.sum_congr rfl intro i _ cases z i <;> simp [sgn]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingNormMax_le_sum_norm · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:256
theorem signingNormMax_measurable

The finite signed-norm maximum is Borel. This uses the stated conclusion.

Formal statement
n r :
ℕ
Measurable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingNormMax vs)
Proof (Lean source)
@[fun_prop] -- @node: signingNormMax_measurable lemma signingNormMax_measurable (n r : ℕ) : Measurable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingNormMax vs) := by unfold signingNormMax apply Measurable.iSup intro z fun_prop
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingNormMax_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:270
theorem signingNormMax_integrable

Coordinate second moments integrate the signed-norm maximum's common envelope. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n r :
ℕ
hmom :
∀ a, MemLp (fun v => v a) 2 P
Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingNormMax vs) (Measure.pi (fun _ : Fin n => P))
Proof (Lean source)
-- @node: signingNormMax_integrable lemma signingNormMax_integrable (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ a, MemLp (fun v => v a) 2 P) : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => signingNormMax vs) (Measure.pi (fun _ : Fin n => P)) := by have hnorm : Integrable (fun v : EuclideanSpace ℝ (Fin r) => ‖v‖) P := ((memLp_two_iff_integrable_sq (by fun_prop)).mpr (isotropic_norm_sq_integrable r P hmom)).integrable (by norm_num) have hsum : Integrable (fun vs : Fin n → EuclideanSpace ℝ (Fin r) => ∑ i, ‖vs i‖) (Measure.pi (fun _ : Fin n => P)) := integrable_finsetSum _ (fun i _ => (measurePreserving_eval (fun _ : Fin n => P) i).integrable_comp_of_integrable hnorm) apply hsum.mono' (signingNormMax_measurable n r).aestronglyMeasurable apply Filter.Eventually.of_forall intro vs rw [Real.norm_eq_abs, abs_of_nonneg (signingNormMax_nonneg vs)] exact signingNormMax_le_sum_norm vs
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingNormMax_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:280
theorem signed_sum_projection_abs_contraction

The conditional finite class of all signed sums satisfies the contraction bound. Under the stated conditions.

Formal statement
a b r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
vs :
Fin b → EuclideanSpace ℝ (Fin r)
radAverage P a (range (fun z : Signs b => fun v => inner ℝ (∑ j, sgn (z j) • vs j) v)) abs
≤ 2 * ofReal (signingNormMax vs * sqrt ((a : ℝ) * r))
Proof (Lean source)
-- @node: signed_sum_projection_abs_contraction lemma signed_sum_projection_abs_contraction (hContraction : ClassicalRademacherContraction) (a b r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) (vs : Fin b → EuclideanSpace ℝ (Fin r)) : radAverage P a (range (fun z : Signs b => fun v => inner ℝ (∑ j, sgn (z j) • vs j) v)) abs ≤ 2 * ofReal (signingNormMax vs * sqrt ((a : ℝ) * r)) := by exact finite_projection_abs_contraction hContraction a r P hmom hiso (fun z : Signs b => ∑ j, sgn (z j) • vs j) (signingNormMax_nonneg vs) (signing_norm_le_max vs)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signed_sum_projection_abs_contraction · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:300
theorem signingPartitionCrossMax_eq_two_signings

Disjoint groups allow their signs to be optimized independently, even though the original cross form uses a single signing of all rows. The asserted mathematical result follows.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
η :
= ⨆ w : Signs n, ⨆ z : Signs n, |inner ℝ (∑ i, if η i = true then sgn (z i) • vs i else 0) (∑ j, if η j = false then sgn (w j) • vs j else 0)|
Proof (Lean source)
-- @node: signingPartitionCrossMax_eq_two_signings lemma signingPartitionCrossMax_eq_two_signings {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) (η : Signs n) : signingPartitionCrossMax vs η = ⨆ w : Signs n, ⨆ z : Signs n, |inner ℝ (∑ i, if η i = true then sgn (z i) • vs i else 0) (∑ j, if η j = false then sgn (w j) • vs j else 0)| := by classical apply le_antisymm · apply ciSup_le intro z rw [signingPartitionCross_eq_inner] let H (w q : Signs n) : ℝ := |inner ℝ (∑ i, if η i = true then sgn (q i) • vs i else 0) (∑ j, if η j = false then sgn (w j) • vs j else 0)| have h1 : H z z ≤ ⨆ q : Signs n, H z q := le_ciSup (Finite.bddAbove_range (H z)) z have h2 : (⨆ q : Signs n, H z q) ≤ ⨆ w : Signs n, ⨆ q : Signs n, H w q := le_ciSup (Finite.bddAbove_range (fun w : Signs n => ⨆ q : Signs n, H w q)) z exact h1.trans h2 · apply ciSup_le intro w apply ciSup_le intro z let q : Signs n := fun i => if η i = true then z i else w i have hleft : (∑ i, if η i = true then sgn (q i) • vs i else 0) = ∑ i, if η i = true then sgn (z i) • vs i else 0 := by apply Finset.sum_congr rfl intro i _ cases hη : η i <;> simp [q, hη] have hright : (∑ i, if η i = false then sgn (q i) • vs i else 0) = ∑ i, if η i = false then sgn (w i) • vs i else 0 := by apply Finset.sum_congr rfl intro i _ cases hη : η i <;> simp [q, hη] have h := le_ciSup (Finite.bddAbove_range (fun q : Signs n => |signingPartitionCross vs q η|)) q rwa [signingPartitionCross_eq_inner, hleft, hright] at h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCrossMax_eq_two_signings · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:314
theorem signingPartitionCrossMax_eq_projection_sum

Conditional on the complementary group, the cross-group maximum is exactly a finite supremum of sums of absolute projections, as in the proof roadmap.

Formal statement
n r :
ℕ
vs :
Fin n → EuclideanSpace ℝ (Fin r)
η :
= ⨆ w : Signs n, ∑ i, if η i = true then |inner ℝ (vs i) (∑ j, if η j = false then sgn (w j) • vs j else 0)| else 0
Proof (Lean source)
-- @node: signingPartitionCrossMax_eq_projection_sum lemma signingPartitionCrossMax_eq_projection_sum {n r : ℕ} (vs : Fin n → EuclideanSpace ℝ (Fin r)) (η : Signs n) : signingPartitionCrossMax vs η = ⨆ w : Signs n, ∑ i, if η i = true then |inner ℝ (vs i) (∑ j, if η j = false then sgn (w j) • vs j else 0)| else 0 := by classical rw [signingPartitionCrossMax_eq_two_signings] congr 1 funext w have h := signing_projection_max_eq_sum_abs (fun i => if η i = true then vs i else 0) (∑ j, if η j = false then sgn (w j) • vs j else 0) simp only [smul_ite, smul_zero, real_inner_comm] at h ⊢ convert h using 1 apply Finset.sum_congr rfl intro i _ split_ifs <;> simp [*]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signingPartitionCrossMax_eq_projection_sum · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningRademacher.lean:355
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.SigningSymmetrization 20 declarations The row-signing roadmap introduces an independent ghost sample, exchanges paired observations with fair signs, and uses the triangle inequality before contraction.

First-moment symmetrization for finite projection classes

The row-signing roadmap introduces an independent ghost sample, exchanges paired observations with fair signs, and uses the triangle inequality before contraction. These comparisons need only integrability of the finite class; no boundedness or higher moments are imposed.

theorem finite_abs_sup_integrable Lemma finite_abs_sup_integrable in the paper ↗

A finite absolute supremum is integrable if each measurable member is integrable. Under the stated conditions.

Formal statement
Ω ι :
Type
Finite ι
Nonempty ι
μ :
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
Integrable (fun x => ⨆ a, |f a x|) μ
Proof (Lean source)
-- @node: finite_abs_sup_integrable lemma finite_abs_sup_integrable {Ω ι : Type} [MeasurableSpace Ω] [Finite ι] [Nonempty ι] (μ : Measure Ω) (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) : Integrable (fun x => ⨆ a, |f a x|) μ := by classical let := Fintype.ofFinite ι have hs : Integrable (fun x => ∑ a, |f a x|) μ := integrable_finsetSum _ (fun a _ => (hi a).abs) apply hs.mono' (Measurable.iSup (fun a => (hm a).abs)).aestronglyMeasurable apply Filter.Eventually.of_forall intro x have hn : 0 ≤ ⨆ a, |f a x| := (abs_nonneg (f (choice (inferInstance : Nonempty ι)) x)).trans (le_ciSup (Finite.bddAbove_range (fun a => |f a x|)) _) rw [Real.norm_eq_abs, abs_of_nonneg hn] apply ciSup_le intro a exact Finset.single_le_sum (fun b _ => abs_nonneg (f b x)) (Finset.mem_univ a)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_abs_sup_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:19

[ Largest population-centered sum over a deterministic finite class.

Definition (Lean source)
Ω ι :
μ :
f :
ι → Ω → ℝ
n :
ℕ
x :
Fin n → Ω
finiteCenteredSumSup μ f x :
ℝ
⨆ a, |∑ i, (f a (x i) - ∫ v, f a v ∂μ)|
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteCenteredSumSup · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:40

Largest two-copy empirical difference over a deterministic finite class.

Definition (Lean source)
Ω ι :
Type
f :
ι → Ω → ℝ
n :
ℕ
x y :
Fin n → Ω
finiteGhostSumSup f x y :
ℝ
⨆ a, |∑ i, (f a (x i) - f a (y i))|
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteGhostSumSup · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:46

Largest signed empirical sum over a deterministic finite class.

Definition (Lean source)
Ω ι :
Type
f :
ι → Ω → ℝ
n :
ℕ
x :
Fin n → Ω
z :
finiteRadSumSup f x z :
ℝ
⨆ a, |∑ i, sgn (z i) * f a (x i)|
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteRadSumSup · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:52
theorem finiteCenteredSumSup_integrable

Centered empirical sums have an integrable finite supremum under the iid law.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
n :
ℕ
Integrable (finiteCenteredSumSup μ f (n := n)) (Measure.pi (fun _ : Fin n => μ))
Proof (Lean source)
-- @node: finiteCenteredSumSup_integrable lemma finiteCenteredSumSup_integrable (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) (n : ℕ) : Integrable (finiteCenteredSumSup μ f (n := n)) (Measure.pi (fun _ : Fin n => μ)) := by apply finite_abs_sup_integrable · intro a; fun_prop · intro a exact integrable_finsetSum _ (fun i _ => (integrable_comp_eval (hi a)).sub (integrable_const _))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteCenteredSumSup_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:60
theorem finiteGhostSumSup_integrable

Ghost differences have an integrable finite supremum under the two-copy law. Under the stated conditions.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
n :
ℕ
Integrable (fun p : (Fin n → Ω) × (Fin n → Ω) => finiteGhostSumSup f p.1 p.2) ((Measure.pi (fun _ : Fin n => μ)).prod (Measure.pi (fun _ : Fin n => μ)))
Proof (Lean source)
-- @node: finiteGhostSumSup_integrable lemma finiteGhostSumSup_integrable (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) (n : ℕ) : Integrable (fun p : (Fin n → Ω) × (Fin n → Ω) => finiteGhostSumSup f p.1 p.2) ((Measure.pi (fun _ : Fin n => μ)).prod (Measure.pi (fun _ : Fin n => μ))) := by apply finite_abs_sup_integrable · intro a; fun_prop · intro a exact integrable_finsetSum _ (fun i _ => ((integrable_comp_eval (μ := fun _ : Fin n => μ) (i := i) (hi a)).comp_fst _).sub ((integrable_comp_eval (μ := fun _ : Fin n => μ) (i := i) (hi a)).comp_snd _))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteGhostSumSup_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:72
theorem finiteRadSumSup_integrable

Each fixed-sign empirical supremum is integrable under the iid law. Under the stated conditions.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
n :
ℕ
z :
Integrable (fun x : Fin n → Ω => finiteRadSumSup f x z) (Measure.pi (fun _ : Fin n => μ))
Proof (Lean source)
-- @node: finiteRadSumSup_integrable lemma finiteRadSumSup_integrable (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) (n : ℕ) (z : Signs n) : Integrable (fun x : Fin n → Ω => finiteRadSumSup f x z) (Measure.pi (fun _ : Fin n => μ)) := by apply finite_abs_sup_integrable · intro a; fun_prop · intro a exact integrable_finsetSum _ (fun i _ => (integrable_comp_eval (hi a)).const_mul _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteRadSumSup_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:86
theorem finite_centered_sum_eq_ghost_integral Lemma finite_centered_sum_eq_ghost_integral in the paper ↗

A centered empirical sum is exactly the expectation of its ghost difference. Under the stated conditions.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hi :
∀ a, Integrable (f a) μ
n :
ℕ
x :
Fin n → Ω
a :
ι
(∑ i, (f a (x i) - ∫ v, f a v ∂μ))
= ∫ y : Fin n → Ω, ∑ i, (f a (x i) - f a (y i)) ∂Measure.pi (fun _ : Fin n => μ)
Proof (Lean source)
-- @node: finite_centered_sum_eq_ghost_integral lemma finite_centered_sum_eq_ghost_integral (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hi : ∀ a, Integrable (f a) μ) {n : ℕ} (x : Fin n → Ω) (a : ι) : (∑ i, (f a (x i) - ∫ v, f a v ∂μ)) = ∫ y : Fin n → Ω, ∑ i, (f a (x i) - f a (y i)) ∂Measure.pi (fun _ : Fin n => μ) := by rw [integral_finsetSum (f := fun (i : Fin n) (y : Fin n → Ω) => f a (x i) - f a (y i)) univ (fun i _ => (integrable_const _).sub (integrable_comp_eval (μ := fun _ : Fin n => μ) (i := i) (hi a)))] apply Finset.sum_congr rfl intro i _ rw [integral_sub (integrable_const _) (integrable_comp_eval (hi a)), integral_comp_eval (hi a).aestronglyMeasurable] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_centered_sum_eq_ghost_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:99
theorem finiteCenteredSumSup_le_ghost_integral

Conditional Jensen compares the centered supremum to an independent ghost sample. Under the stated conditions.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
n :
ℕ
x :
Fin n → Ω
≤ ∫ y : Fin n → Ω, finiteGhostSumSup f x y ∂Measure.pi (fun _ : Fin n => μ)
Proof (Lean source)
-- @node: finiteCenteredSumSup_le_ghost_integral lemma finiteCenteredSumSup_le_ghost_integral (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) {n : ℕ} (x : Fin n → Ω) : finiteCenteredSumSup μ f x ≤ ∫ y : Fin n → Ω, finiteGhostSumSup f x y ∂Measure.pi (fun _ : Fin n => μ) := by have hG : Integrable (fun y : Fin n → Ω => finiteGhostSumSup f x y) (Measure.pi (fun _ : Fin n => μ)) := by apply finite_abs_sup_integrable · intro a; fun_prop · intro a exact integrable_finsetSum _ (fun i _ => (integrable_const _).sub (integrable_comp_eval (hi a))) apply ciSup_le intro a have hg : Integrable (fun y : Fin n → Ω => ∑ i, (f a (x i) - f a (y i))) (Measure.pi (fun _ : Fin n => μ)) := integrable_finsetSum _ (fun i _ => (integrable_const _).sub (integrable_comp_eval (hi a))) rw [finite_centered_sum_eq_ghost_integral μ f hi] calc _ ≤ ∫ y : Fin n → Ω, |∑ i, (f a (x i) - f a (y i))| ∂Measure.pi (fun _ : Fin n => μ) := by simpa only [Real.norm_eq_abs] using norm_integral_le_integral_norm (fun y : Fin n → Ω => ∑ i, (f a (x i) - f a (y i))) _ ≤ _ := integral_mono hg.abs hG (fun y => le_ciSup (Finite.bddAbove_range (fun a => |∑ i, (f a (x i) - f a (y i))|)) a)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteCenteredSumSup_le_ghost_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:116
theorem finiteGhostSumSup_swap_eq

Paired-coordinate exchange turns each ghost difference into its fixed-sign version. The asserted mathematical result follows.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
n :
ℕ
z :
p :
(Fin n → Ω) × (Fin n → Ω)
= ⨆ a, |∑ i, sgn (z i) * (f a (p.1 i) - f a (p.2 i))|
Proof (Lean source)
-- @node: finiteGhostSumSup_swap_eq lemma finiteGhostSumSup_swap_eq (f : ι → Ω → ℝ) {n : ℕ} (z : Signs n) (p : (Fin n → Ω) × (Fin n → Ω)) : finiteGhostSumSup f ((pairedSampleSwap z p).1) ((pairedSampleSwap z p).2) = ⨆ a, |∑ i, sgn (z i) * (f a (p.1 i) - f a (p.2 i))| := by unfold finiteGhostSumSup congr 1 funext a congr 1 apply Finset.sum_congr rfl intro i _ cases h : z i <;> simp [pairedSampleSwap, h, sgn, sub_eq_add_neg, add_comm]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteGhostSumSup_swap_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:146
theorem finite_signed_ghost_triangle

The signed ghost supremum is bounded by the two separate signed suprema.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
n :
ℕ
x y :
Fin n → Ω
z :
(⨆ a, |∑ i, sgn (z i) * (f a (x i) - f a (y i))|)
Proof (Lean source)
-- @node: finite_signed_ghost_triangle lemma finite_signed_ghost_triangle (f : ι → Ω → ℝ) {n : ℕ} (x y : Fin n → Ω) (z : Signs n) : (⨆ a, |∑ i, sgn (z i) * (f a (x i) - f a (y i))|) ≤ finiteRadSumSup f x z + finiteRadSumSup f y z := by apply ciSup_le intro a simp only [mul_sub, Finset.sum_sub_distrib] exact (abs_sub _ _).trans (add_le_add (le_ciSup (Finite.bddAbove_range (fun a => |∑ i, sgn (z i) * f a (x i)|)) a) (le_ciSup (Finite.bddAbove_range (fun a => |∑ i, sgn (z i) * f a (y i)|)) a))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_signed_ghost_triangle · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:164
theorem finiteGhostSumSup_integral_le_fixed_sign

The product-law symmetry and triangle inequality give the factor-two ghost bound for every fixed signing, before taking the fair-sign average. Under the stated conditions, the asserted mathematical result follows.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
n :
ℕ
z :
(∫ p : (Fin n → Ω) × (Fin n → Ω), finiteGhostSumSup f p.1 p.2 ∂((Measure.pi (fun _ : Fin n => μ)).prod (Measure.pi (fun _ : Fin n => μ))))
≤ 2 * ∫ x : Fin n → Ω, finiteRadSumSup f x z ∂Measure.pi (fun _ : Fin n => μ)
Proof (Lean source)
-- @node: finiteGhostSumSup_integral_le_fixed_sign lemma finiteGhostSumSup_integral_le_fixed_sign (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) (n : ℕ) (z : Signs n) : (∫ p : (Fin n → Ω) × (Fin n → Ω), finiteGhostSumSup f p.1 p.2 ∂((Measure.pi (fun _ : Fin n => μ)).prod (Measure.pi (fun _ : Fin n => μ)))) ≤ 2 * ∫ x : Fin n → Ω, finiteRadSumSup f x z ∂Measure.pi (fun _ : Fin n => μ) := by let ν := Measure.pi (fun _ : Fin n => μ) have hswap := pairedSampleSwap_measurePreserving μ z have hG := finiteGhostSumSup_integrable μ f hm hi n have hR := finiteRadSumSup_integrable μ f hm hi n z rw [← hswap.integral_comp' (fun p => finiteGhostSumSup f p.1 p.2)] simp_rw [finiteGhostSumSup_swap_eq] calc _ ≤ ∫ p : (Fin n → Ω) × (Fin n → Ω), finiteRadSumSup f p.1 z + finiteRadSumSup f p.2 z ∂ν.prod ν := by apply integral_mono · simpa only [Function.comp_def, finiteGhostSumSup_swap_eq] using hswap.integrable_comp_of_integrable hG · exact (hR.comp_fst ν).add (hR.comp_snd ν) · intro p; exact finite_signed_ghost_triangle f p.1 p.2 z _ = _ := by rw [integral_add (hR.comp_fst ν) (hR.comp_snd ν), integral_fun_fst (fun x => finiteRadSumSup f x z), integral_fun_snd (fun x => finiteRadSumSup f x z)] simp only [probReal_univ, one_smul] ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteGhostSumSup_integral_le_fixed_sign · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:177
theorem finiteRadSumSup_joint_integrable

The fair-sign empirical supremum is jointly integrable under sample and sign laws. Under the stated conditions.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
n :
ℕ
Integrable (fun p : (Fin n → Ω) × Signs n => finiteRadSumSup f p.1 p.2) ((Measure.pi (fun _ : Fin n => μ)).prod (fairSigns n))
Proof (Lean source)
-- @node: finiteRadSumSup_joint_integrable lemma finiteRadSumSup_joint_integrable (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) (n : ℕ) : Integrable (fun p : (Fin n → Ω) × Signs n => finiteRadSumSup f p.1 p.2) ((Measure.pi (fun _ : Fin n => μ)).prod (fairSigns n)) := by let := fairSigns_probability n apply finite_abs_sup_integrable · intro a; fun_prop · intro a apply integrable_finsetSum intro i _ simpa only [mul_comm] using (integrable_comp_eval (μ := fun _ : Fin n => μ) (i := i) (hi a)).mul_prod (Integrable.of_finite : Integrable (fun z : Signs n => sgn (z i)) (fairSigns n))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteRadSumSup_joint_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:207
theorem finite_centered_integral_le_ghost

Averaging conditional Jensen bounds the centered expectation by the ghost expectation. Under the stated conditions.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
n :
ℕ
(∫ x : Fin n → Ω, finiteCenteredSumSup μ f x ∂Measure.pi (fun _ : Fin n => μ))
≤ ∫ p : (Fin n → Ω) × (Fin n → Ω), finiteGhostSumSup f p.1 p.2 ∂((Measure.pi (fun _ : Fin n => μ)).prod (Measure.pi (fun _ : Fin n => μ)))
Proof (Lean source)
-- @node: finite_centered_integral_le_ghost lemma finite_centered_integral_le_ghost (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) (n : ℕ) : (∫ x : Fin n → Ω, finiteCenteredSumSup μ f x ∂Measure.pi (fun _ : Fin n => μ)) ≤ ∫ p : (Fin n → Ω) × (Fin n → Ω), finiteGhostSumSup f p.1 p.2 ∂((Measure.pi (fun _ : Fin n => μ)).prod (Measure.pi (fun _ : Fin n => μ))) := by have hG := finiteGhostSumSup_integrable μ f hm hi n rw [integral_prod _ hG] exact integral_mono (finiteCenteredSumSup_integrable μ f hm hi n) hG.integral_prod_left (fun x => finiteCenteredSumSup_le_ghost_integral μ f hm hi x)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_centered_integral_le_ghost · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:224
theorem finite_first_moment_symmetrization

A finite integrable class satisfies first-moment Rademacher symmetrization with factor two, including an empty sample. Under the stated conditions.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
n :
ℕ
(∫ x : Fin n → Ω, finiteCenteredSumSup μ f x ∂Measure.pi (fun _ : Fin n => μ))
≤ 2 * ∫ x : Fin n → Ω, ∫ z : Signs n, finiteRadSumSup f x z ∂fairSigns n ∂Measure.pi (fun _ : Fin n => μ)
Proof (Lean source)
-- @node: finite_first_moment_symmetrization lemma finite_first_moment_symmetrization (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) (n : ℕ) : (∫ x : Fin n → Ω, finiteCenteredSumSup μ f x ∂Measure.pi (fun _ : Fin n => μ)) ≤ 2 * ∫ x : Fin n → Ω, ∫ z : Signs n, finiteRadSumSup f x z ∂fairSigns n ∂Measure.pi (fun _ : Fin n => μ) := by let := fairSigns_probability n have hR := finiteRadSumSup_joint_integrable μ f hm hi n have hfixed := finiteGhostSumSup_integral_le_fixed_sign μ f hm hi n have havg := integral_mono (μ := fairSigns n) (integrable_const _) (hR.integral_prod_right.const_mul 2) hfixed rw [integral_const, integral_const_mul, ← integral_integral_swap hR] at havg simp only [probReal_univ, one_smul] at havg exact (finite_centered_integral_le_ghost μ f hm hi n).trans havg
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_first_moment_symmetrization · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:237

Passing a finite real supremum through ofReal agrees with the nonnegative supremum. The asserted mathematical result follows.

Formal statement
ι :
Type
shared
g :
ι → ℝ
ofReal (⨆ a, |g a|) = ⨆ a, ofReal |g a|
Proof (Lean source)
-- @node: ofReal_finite_abs_sup lemma ofReal_finite_abs_sup (g : ι → ℝ) : ofReal (⨆ a, |g a|) = ⨆ a, ofReal |g a| := by obtain ⟨a, ha⟩ := exists_eq_ciSup_of_finite (f := fun a => |g a|) apply le_antisymm · rw [← ha] exact le_iSup (fun a => ofReal |g a|) a · apply iSup_le intro b exact ENNReal.ofReal_le_ofReal (le_ciSup (Finite.bddAbove_range (fun a => |g a|)) b)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ofReal_finite_abs_sup · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:255
theorem finiteRadSumSup_radAverage_eq

The finite-class real signed supremum represents the extended-valued contraction interface exactly, with no moment lost in the change of codomain. Under the stated conditions, the asserted mathematical result follows.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
n :
ℕ
radAverage μ n (range f) id
= ofReal (∫ x : Fin n → Ω, ∫ z : Signs n, finiteRadSumSup f x z ∂fairSigns n ∂Measure.pi (fun _ : Fin n => μ))
Proof (Lean source)
-- @node: finiteRadSumSup_radAverage_eq lemma finiteRadSumSup_radAverage_eq (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) (n : ℕ) : radAverage μ n (range f) id = ofReal (∫ x : Fin n → Ω, ∫ z : Signs n, finiteRadSumSup f x z ∂fairSigns n ∂Measure.pi (fun _ : Fin n => μ)) := by let := fairSigns_probability n have hR := finiteRadSumSup_joint_integrable μ f hm hi n unfold radAverage simp only [id_eq] have he (x : Fin n → Ω) (z : Signs n) : (⨆ g : range f, ofReal |∑ i, sgn (z i) * g.val (x i)|) = ofReal (finiteRadSumSup f x z) := by rw [iSup_range' (fun g : Ω → ℝ => ofReal |∑ i, sgn (z i) * g (x i)|) f] exact (ofReal_finite_abs_sup (fun a => ∑ i, sgn (z i) * f a (x i))).symm simp_rw [he] rw [← lintegral_prod (fun p : (Fin n → Ω) × Signs n => ofReal (finiteRadSumSup f p.1 p.2)) (by unfold finiteRadSumSup; fun_prop), ← ofReal_integral_eq_lintegral_ofReal hR (Filter.Eventually.of_forall (fun p => by obtain ⟨a⟩ := (inferInstance : Nonempty ι) exact (abs_nonneg _).trans (le_ciSup (Finite.bddAbove_range (fun a => |∑ i, sgn (p.2 i) * f a (p.1 i)|)) a))), integral_prod _ hR]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finiteRadSumSup_radAverage_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:267
theorem finite_radAverage_abs_eq Lemma finite_radAverage_abs_eq in the paper ↗

Absolute transformation of a finite class agrees exactly with the signed supremum used in the contraction interface. The asserted mathematical result follows.

Formal statement
Ω :
Type
shared
ι :
Type
shared
μ :
f :
ι → Ω → ℝ
n :
ℕ
radAverage μ n (range f) abs = radAverage μ n (range (fun a v => |f a v|)) id
Proof (Lean source)
-- @node: finite_radAverage_abs_eq lemma finite_radAverage_abs_eq (μ : Measure Ω) (f : ι → Ω → ℝ) (n : ℕ) : radAverage μ n (range f) abs = radAverage μ n (range (fun a v => |f a v|)) id := by unfold radAverage congr 1 funext x congr 1 funext z rw [iSup_range' (fun g : Ω → ℝ => ofReal |∑ i, sgn (z i) * abs (g (x i))|) f, iSup_range' (fun g : Ω → ℝ => ofReal |∑ i, sgn (z i) * id (g (x i))|) (fun a v => |f a v|)] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_radAverage_abs_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:296
theorem finite_abs_centered_ofReal_le_contraction

Symmetrization followed by the cited contraction controls a finite class of absolute functions by four times the original linear Rademacher average. Keeping the exact average permits the subsequent independent-group isotropy argument. Under the stated conditions, the asserted mathematical result follows.

Formal statement
Ω :
Type
shared
ι :
Type
shared
f :
ι → Ω → ℝ
hm :
∀ a, Measurable (f a)
hi :
∀ a, Integrable (f a) μ
n :
ℕ
ofReal (∫ x : Fin n → Ω, finiteCenteredSumSup μ (fun a v => |f a v|) x ∂Measure.pi (fun _ : Fin n => μ))
≤ 4 * radAverage μ n (range f) id
Proof (Lean source)
-- @node: finite_abs_centered_ofReal_le_contraction lemma finite_abs_centered_ofReal_le_contraction (hContraction : ClassicalRademacherContraction) (μ : Measure Ω) [IsProbabilityMeasure μ] (f : ι → Ω → ℝ) (hm : ∀ a, Measurable (f a)) (hi : ∀ a, Integrable (f a) μ) (n : ℕ) : ofReal (∫ x : Fin n → Ω, finiteCenteredSumSup μ (fun a v => |f a v|) x ∂Measure.pi (fun _ : Fin n => μ)) ≤ 4 * radAverage μ n (range f) id := by classical let := ofFinite ι have hgate := hContraction Ω μ inferInstance n (range f) (finite_pointwiseSeparable (finite_range _)) (by rintro g ⟨a, rfl⟩; exact hm a) ⟨fun v => ∑ a, |f a v|, integrable_finsetSum _ (fun a _ => (hi a).abs), Filter.Eventually.of_forall (by rintro v g ⟨a, rfl⟩ exact Finset.single_le_sum (fun b _ => abs_nonneg (f b v)) (Finset.mem_univ a))⟩ abs (by convert (lipschitzWith_one_norm : LipschitzWith 1 (norm : ℝ → ℝ)) using 1 <;> rfl) abs_zero have hsym := ENNReal.ofReal_le_ofReal (finite_first_moment_symmetrization μ (fun a v => |f a v|) (fun a => (hm a).abs) (fun a => (hi a).abs) n) rw [ENNReal.ofReal_mul (by norm_num : (0 : ℝ) ≤ 2), ← finiteRadSumSup_radAverage_eq μ (fun a v => |f a v|) (fun a => (hm a).abs) (fun a => (hi a).abs) n, ← finite_radAverage_abs_eq] at hsym calc _ ≤ 2 * radAverage μ n (range f) abs := by simpa using hsym _ ≤ 2 * (2 * radAverage μ n (range f) id) := mul_le_mul_right hgate 2 _ = _ := by ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_abs_centered_ofReal_le_contraction · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:312
theorem finite_projection_centered_integral_le

Absolute projections in any finite bounded direction class have expected centered supremum at most four times its radius times the isotropic square-root scale. Under the stated conditions.

Formal statement
ι :
Type
shared
n r :
ℕ
hmom :
∀ h, MemLp (fun v => v h) 2 P
hiso :
∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0
u :
ι → EuclideanSpace ℝ (Fin r)
R :
ℝ
hR :
0 ≤ R
hu :
∀ a, ‖u a‖ ≤ R
(∫ x : Fin n → EuclideanSpace ℝ (Fin r), finiteCenteredSumSup P (fun a v => |inner ℝ (u a) v|) x ∂Measure.pi (fun _ : Fin n => P))
≤ 4 * R * sqrt ((n : ℝ) * r)
Proof (Lean source)
-- @node: finite_projection_centered_integral_le lemma finite_projection_centered_integral_le (hContraction : ClassicalRademacherContraction) (n r : ℕ) (P : Measure (EuclideanSpace ℝ (Fin r))) [IsProbabilityMeasure P] (hmom : ∀ h, MemLp (fun v => v h) 2 P) (hiso : ∀ h k, (∫ v, v h * v k ∂P) = if h = k then 1 else 0) (u : ι → EuclideanSpace ℝ (Fin r)) {R : ℝ} (hR : 0 ≤ R) (hu : ∀ a, ‖u a‖ ≤ R) : (∫ x : Fin n → EuclideanSpace ℝ (Fin r), finiteCenteredSumSup P (fun a v => |inner ℝ (u a) v|) x ∂Measure.pi (fun _ : Fin n => P)) ≤ 4 * R * sqrt ((n : ℝ) * r) := by let f : ι → EuclideanSpace ℝ (Fin r) → ℝ := fun a v => inner ℝ (u a) v have hm : ∀ a, Measurable (f a) := by intro a; fun_prop have hi : ∀ a, Integrable (f a) P := by intro a exact ((memLp_two_iff_integrable_sq (hm a).aestronglyMeasurable).mpr (isotropic_projection_sq_integrable r P hmom (u a))).integrable (by norm_num) have hsym := finite_first_moment_symmetrization P (fun a v => |f a v|) (fun a => (hm a).abs) (fun a => (hi a).abs) n have hcontract := finite_projection_abs_contraction hContraction n r P hmom hiso u hR hu have heq := finite_radAverage_abs_eq P f n rw [heq, finiteRadSumSup_radAverage_eq P (fun a v => |f a v|) (fun a => (hm a).abs) (fun a => (hi a).abs) n] at hcontract have htwo : (2 : ENNReal) = ofReal 2 := by norm_num have hrhs : 2 * ofReal (R * sqrt ((n : ℝ) * r)) = ofReal (2 * (R * sqrt ((n : ℝ) * r))) := by rw [htwo, ← ENNReal.ofReal_mul (by norm_num : (0 : ℝ) ≤ 2)] rw [hrhs] at hcontract have hbound : (∫ x : Fin n → EuclideanSpace ℝ (Fin r), ∫ z : Signs n, finiteRadSumSup (fun a v => |f a v|) x z ∂fairSigns n ∂Measure.pi (fun _ : Fin n => P)) ≤ 2 * (R * sqrt ((n : ℝ) * r)) := (ENNReal.ofReal_le_ofReal_iff (by positivity)).mp hcontract dsimp only [f] at hsym hbound linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.finite_projection_centered_integral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SigningSymmetrization.lean:343
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.SpectralCounting 27 declarations A square-root box contains every supported frequency below a given complexity.

Finite counts through a spectral complexity cutoff

A square-root box contains every supported frequency below a given complexity. The resulting finite count bounds the global indices of both real rows, including ties.

theorem frequency_coordinate_sq_le_two_complexity Lemma frequency_coordinate_sq_le_two_complexity in the paper ↗

Each coordinate of a supported frequency is bounded by its averaged energy. Under the stated conditions.

Formal statement
d :
ℕ
Fin d → ℤ
hk :
1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2
j :
Fin d
(k j : ℝ) ^ 2 ≤ 2 * frequencyComplexity k
Proof (Lean source)
-- @node: frequency_coordinate_sq_le_two_complexity lemma frequency_coordinate_sq_le_two_complexity {d : ℕ} {k : Fin d → ℤ} (hk : 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2) (j : Fin d) : (k j : ℝ) ^ 2 ≤ 2 * frequencyComplexity k := by have hpos : 0 < ((frequencySupport k).card : ℝ) := by exact_mod_cast hk.1 have htwo : ((frequencySupport k).card : ℝ) ≤ 2 := by exact_mod_cast hk.2 have hnonneg : 0 ≤ frequencyComplexity k := by unfold frequencyComplexity frequencySq positivity have heq : frequencyComplexity k * (frequencySupport k).card = frequencySq k := by exact div_mul_cancel₀ _ (ne_of_gt hpos) have hsingle : (k j : ℝ) ^ 2 ≤ frequencySq k := Finset.single_le_sum (fun l _ => sq_nonneg (k l : ℝ)) (Finset.mem_univ j) nlinarith [mul_le_mul_of_nonneg_left htwo hnonneg]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequency_coordinate_sq_le_two_complexity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:16
theorem frequency_mem_complexity_box Lemma frequency_mem_complexity_box in the paper ↗

The square-root box contains every frequency of support one or two below the cutoff. Under the stated conditions.

Formal statement
d :
ℕ
Fin d → ℤ
u :
ℝ
hk :
1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2
hu :
k ∈ frequencyBox d (ceil (sqrt (2 * u)))
Proof (Lean source)
-- @node: frequency_mem_complexity_box lemma frequency_mem_complexity_box {d : ℕ} {k : Fin d → ℤ} {u : ℝ} (hk : 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2) (hu : frequencyComplexity k ≤ u) : k ∈ frequencyBox d (ceil (sqrt (2 * u))) := by simp only [frequencyBox, Fintype.mem_piFinset, Finset.mem_Icc, ← abs_le] intro j have hs : (k j : ℝ) ^ 2 ≤ 2 * u := (frequency_coordinate_sq_le_two_complexity hk j).trans (by linarith) have hb := (Real.abs_le_sqrt hs).trans (Nat.le_ceil (sqrt (2 * u))) exact_mod_cast hb
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequency_mem_complexity_box · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:32
theorem frequency_natAbs_le_floor_sqrt Lemma frequency_natAbs_le_floor_sqrt in the paper ↗

Integer magnitudes respect the floor of the real square-root bound. Under the stated conditions.

Formal statement
a :
ℤ
v :
ℝ
h :
(a : ℝ) ^ 2 ≤ v
a.natAbs ≤ floor (sqrt v)
Proof (Lean source)
-- @node: frequency_natAbs_le_floor_sqrt lemma frequency_natAbs_le_floor_sqrt {a : ℤ} {v : ℝ} (h : (a : ℝ) ^ 2 ≤ v) : a.natAbs ≤ floor (sqrt v) := by apply (Nat.le_floor_iff (Real.sqrt_nonneg v)).mpr have hb : ((|a| : ℤ) : ℝ) ≤ sqrt v := by exact_mod_cast Real.abs_le_sqrt h rw [Int.abs_eq_natAbs] at hb simpa only [Int.cast_natCast] using hb
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequency_natAbs_le_floor_sqrt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:45
theorem frequencyComplexity_single_support Lemma frequencyComplexity_single_support in the paper ↗

A support-one frequency has exactly its single coordinate's squared complexity. Under the stated conditions.

Formal statement
d :
ℕ
Fin d → ℤ
Fin d
hj :
frequencyComplexity k = (k j : ℝ) ^ 2
Proof (Lean source)
-- @node: frequencyComplexity_single_support lemma frequencyComplexity_single_support {d : ℕ} {k : Fin d → ℤ} {j : Fin d} (hj : frequencySupport k = {j}) : frequencyComplexity k = (k j : ℝ) ^ 2 := by have hz (l : Fin d) (hl : l ≠ j) : k l = 0 := by by_contra h have hm : l ∈ frequencySupport k := by simp [frequencySupport, h] simp [hj, hl] at hm simp only [frequencyComplexity, hj, Finset.card_singleton, Nat.cast_one, div_one, frequencySq] exact Finset.sum_eq_single j (fun l _ hl => by simp [hz l hl]) (by simp)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyComplexity_single_support · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:54

The representatives through a complexity cutoff, including every tie.

Definition (Lean source)
d :
ℕ
u :
ℝ
spectralCutoffRepresentatives d u :
Finset (Fin d → ℤ)
(frequencyBox d (ceil (sqrt (2 * u)))).filter (fun k => IsFrequencyRepresentative k ∧ frequencyComplexity k ≤ u)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralCutoffRepresentatives · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:66
theorem mem_spectralCutoffRepresentatives

The finite cutoff set captures precisely all representatives below its cutoff. The asserted mathematical result follows.

Formal statement
d :
ℕ
u :
ℝ
k :
Fin d → ℤ
Proof (Lean source)
-- @node: mem_spectralCutoffRepresentatives lemma mem_spectralCutoffRepresentatives {d : ℕ} {u : ℝ} {k : Fin d → ℤ} : k ∈ spectralCutoffRepresentatives d u ↔ IsFrequencyRepresentative k ∧ frequencyComplexity k ≤ u := by constructor · intro h exact (Finset.mem_filter.mp h).2 · rintro ⟨hk, hu⟩ exact Finset.mem_filter.mpr ⟨frequency_mem_complexity_box ⟨hk.1, hk.2.1⟩ hu, hk, hu⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mem_spectralCutoffRepresentatives · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:72
theorem featureFrequency_prefix_mem_cutoff

The entire global prefix up to an indexed frequency lies below its complexity. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d i j :
ℕ
hd :
2 ≤ d
hji :
j ≤ i
Proof (Lean source)
-- @node: featureFrequency_prefix_mem_cutoff lemma featureFrequency_prefix_mem_cutoff {d i j : ℕ} (hd : 2 ≤ d) (hji : j ≤ i) : featureFrequency d j ∈ spectralCutoffRepresentatives d (frequencyComplexity (featureFrequency d i)) := by apply mem_spectralCutoffRepresentatives.mpr refine ⟨featureFrequency_isRepresentative (by omega), ?_⟩ rcases hji.eq_or_lt with rfl | hji · exact le_rfl · exact frequencyComplexity_le_of_frequencyBefore_eq_true (featureFrequency_strict_order hd hji)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_prefix_mem_cutoff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:83
theorem featureFrequency_real_rows_le_cutoff_count

Counting the global prefix bounds both real-row indices, even at complexity ties. Under the stated conditions.

Formal statement
d i :
ℕ
hd :
2 ≤ d
Proof (Lean source)
-- @node: featureFrequency_real_rows_le_cutoff_count lemma featureFrequency_real_rows_le_cutoff_count {d i : ℕ} (hd : 2 ≤ d) : 2 * i + 2 ≤ 2 * (spectralCutoffRepresentatives d (frequencyComplexity (featureFrequency d i))).card := by let A := (range (i + 1)).image (featureFrequency d) have hc : A.card = i + 1 := by rw [Finset.card_image_of_injective _ (featureFrequency_injective hd), Finset.card_range] have hsub : A ⊆ spectralCutoffRepresentatives d (frequencyComplexity (featureFrequency d i)) := by intro k hk rcases Finset.mem_image.mp hk with ⟨j, hj, rfl⟩ exact featureFrequency_prefix_mem_cutoff hd (by simpa using Finset.mem_range.mp hj) have hb := Finset.card_le_card hsub rw [hc] at hb omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_real_rows_le_cutoff_count · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:95
theorem representative_single_positive

The first nonzero coordinate of a singleton representative is positive. Under the stated conditions.

Formal statement
d :
ℕ
Fin d → ℤ
Fin d
hj :
0 < k j
Proof (Lean source)
-- @node: representative_single_positive lemma representative_single_positive {d : ℕ} {k : Fin d → ℤ} {j : Fin d} (hk : IsFrequencyRepresentative k) (hj : frequencySupport k = {j}) : 0 < k j := by rcases hk.2.2 with ⟨t, ht, _⟩ have hm : t ∈ frequencySupport k := by simp [frequencySupport, ne_of_gt ht] have htj : t = j := by simpa [hj] using hm simpa only [htj] using ht
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.representative_single_positive · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:112
theorem representative_pair_positive

The smaller support coordinate of a pair representative is positive. Under the stated conditions.

Formal statement
d :
ℕ
Fin d → ℤ
Fin d
hjl :
j < l
hj :
frequencySupport k = {j, l}
0 < k j
Proof (Lean source)
-- @node: representative_pair_positive lemma representative_pair_positive {d : ℕ} {k : Fin d → ℤ} {j l : Fin d} (hk : IsFrequencyRepresentative k) (hjl : j < l) (hj : frequencySupport k = {j, l}) : 0 < k j := by rcases hk.2.2 with ⟨t, ht, hprev⟩ have hm : t ∈ frequencySupport k := by simp [frequencySupport, ne_of_gt ht] have hmem : t = j ∨ t = l := by simpa [hj] using hm rcases hmem with rfl | rfl · exact ht · have hz := hprev j hjl have hnj : k j ≠ 0 := by have hmem : j ∈ frequencySupport k := by simp [hj] simpa [frequencySupport] using hmem exact False.elim (hnj hz)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.representative_pair_positive · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:121
theorem representative_support_cases

Every representative has either a singleton or an increasing two-coordinate support. Under the stated conditions.

Formal statement
d :
ℕ
Fin d → ℤ
(∃ j, frequencySupport k = {j}) ∨ ∃ j l, j < l ∧ frequencySupport k = {j, l}
Proof (Lean source)
-- @node: representative_support_cases lemma representative_support_cases {d : ℕ} {k : Fin d → ℤ} (hk : IsFrequencyRepresentative k) : (∃ j, frequencySupport k = {j}) ∨ ∃ j l, j < l ∧ frequencySupport k = {j, l} := by by_cases hc : (frequencySupport k).card = 1 · exact inl (Finset.card_eq_one.mp hc) · have hlow := hk.1 have hhigh := hk.2.1 rcases Finset.card_eq_two.mp (by omega : (frequencySupport k).card = 2) with ⟨j, l, hne, heq⟩ rcases lt_or_gt_of_ne hne with hjl | hlj · exact inr ⟨j, l, hjl, heq⟩ · exact inr ⟨l, j, hlj, by simpa [Finset.pair_comm] using heq⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.representative_support_cases · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:137

[ Single-coordinate integer frequencies with positive amplitude.

Definition (Lean source)
d R :
ℕ
a :
Fin d × Fin R
spectralSingleEncoding a :
Fin d → ℤ
fun t => if t = a.1 then (a.2.val + 1 : ℕ) else 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralSingleEncoding · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:153

Two-coordinate representatives, with a positive first amplitude and a signed second one.

Definition (Lean source)
d L :
ℕ
a :
{jl : Fin d × Fin d // jl.1 < jl.2} × (Fin L × Fin L) × Bool
spectralPairEncoding a :
Fin d → ℤ
fun t
=> if t = a.1.val.1 then (a.2.1.1.val + 1 : ℕ) else if t = a.1.val.2 then (if a.2.2 then -((a.2.1.2.val + 1 : ℕ) : ℤ) else (a.2.1.2.val + 1 : ℕ)) else 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralPairEncoding · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:158
theorem positive_integer_amplitude_index Lemma positive_integer_amplitude_index in the paper ↗

Every positive integer of bounded magnitude has a positive-amplitude index.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
a :
ℤ
R :
ℕ
ha :
0 < a
hb :
a.natAbs ≤ R
∃ r : Fin R, (r.val + 1 : ℕ) = a
Proof (Lean source)
-- @node: positive_integer_amplitude_index lemma positive_integer_amplitude_index {a : ℤ} {R : ℕ} (ha : 0 < a) (hb : a.natAbs ≤ R) : ∃ r : Fin R, (r.val + 1 : ℕ) = a := by have hpos : 0 < a.natAbs := Int.natAbs_pos.mpr (ne_of_gt ha) refine ⟨⟨a.natAbs - 1, by omega⟩, ?_⟩ have hn : a.natAbs - 1 + 1 = a.natAbs := by omega rw [hn, Int.natCast_natAbs, abs_of_pos ha]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.positive_integer_amplitude_index · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:167
theorem signed_integer_amplitude_index Lemma signed_integer_amplitude_index in the paper ↗

Every nonzero bounded integer is a signed positive-amplitude index. Under the stated conditions.

Formal statement
a :
ℤ
L :
ℕ
ha :
a ≠ 0
hb :
a.natAbs ≤ L
∃ r : Fin L, ∃ b : Bool, (if b then -((r.val + 1 : ℕ) : ℤ) else (r.val + 1 : ℕ)) = a
Proof (Lean source)
-- @node: signed_integer_amplitude_index lemma signed_integer_amplitude_index {a : ℤ} {L : ℕ} (ha : a ≠ 0) (hb : a.natAbs ≤ L) : ∃ r : Fin L, ∃ b : Bool, (if b then -((r.val + 1 : ℕ) : ℤ) else (r.val + 1 : ℕ)) = a := by have hpos : 0 < a.natAbs := Int.natAbs_pos.mpr ha let r : Fin L := ⟨a.natAbs - 1, by omega⟩ have hn : r.val + 1 = a.natAbs := by dsimp [r]; omega by_cases hneg : a < 0 · refine ⟨r, true, ?_⟩ simp only [ite_true, hn, Int.natCast_natAbs, abs_of_neg hneg, neg_neg] · refine ⟨r, false, ?_⟩ simp only [Bool.false_eq_true, ite_false, hn, Int.natCast_natAbs, abs_of_nonneg (by omega : 0 ≤ a)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.signed_integer_amplitude_index · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:176
theorem cutoff_single_in_encoding

A singleton representative below the cutoff is in the finite main-effect encoding. Under the stated conditions.

Formal statement
d :
ℕ
u :
ℝ
k :
Fin d → ℤ
hu :
j :
Fin d
hj :
k ∈ (Finset.univ : Finset (Fin d × Fin (floor (sqrt u)))).image spectralSingleEncoding
Proof (Lean source)
-- @node: cutoff_single_in_encoding lemma cutoff_single_in_encoding {d : ℕ} {u : ℝ} {k : Fin d → ℤ} (hk : IsFrequencyRepresentative k) (hu : frequencyComplexity k ≤ u) {j : Fin d} (hj : frequencySupport k = {j}) : k ∈ (Finset.univ : Finset (Fin d × Fin (floor (sqrt u)))).image spectralSingleEncoding := by have hsq : (k j : ℝ) ^ 2 ≤ u := by rwa [frequencyComplexity_single_support hj] at hu rcases positive_integer_amplitude_index (representative_single_positive hk hj) (frequency_natAbs_le_floor_sqrt hsq) with ⟨r, hr⟩ apply Finset.mem_image.mpr refine ⟨(j, r), Finset.mem_univ _, ?_⟩ funext t by_cases ht : t = j · subst t simp [spectralSingleEncoding, hr] · have hz : k t = 0 := by by_contra h have hm : t ∈ frequencySupport k := by simp [frequencySupport, h] simp [hj, ht] at hm simp [spectralSingleEncoding, ht, hz]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cutoff_single_in_encoding · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:191
theorem cutoff_pair_in_encoding

A pair representative below the cutoff is in the finite signed pair encoding. Under the stated conditions.

Formal statement
d :
ℕ
u :
ℝ
k :
Fin d → ℤ
hu :
j l :
Fin d
hjl :
j < l
hj :
frequencySupport k = {j, l}
k ∈ (Finset.univ : Finset ({jl : Fin d × Fin d // jl.1 < jl.2} × (Fin (floor (sqrt (2 * u))) × Fin (floor (sqrt (2 * u)))) × Bool)).image spectralPairEncoding
Proof (Lean source)
-- @node: cutoff_pair_in_encoding lemma cutoff_pair_in_encoding {d : ℕ} {u : ℝ} {k : Fin d → ℤ} (hk : IsFrequencyRepresentative k) (hu : frequencyComplexity k ≤ u) {j l : Fin d} (hjl : j < l) (hj : frequencySupport k = {j, l}) : k ∈ (Finset.univ : Finset ({jl : Fin d × Fin d // jl.1 < jl.2} × (Fin (floor (sqrt (2 * u))) × Fin (floor (sqrt (2 * u)))) × Bool)).image spectralPairEncoding := by have hb (t : Fin d) : (k t).natAbs ≤ floor (sqrt (2 * u)) := frequency_natAbs_le_floor_sqrt ((frequency_coordinate_sq_le_two_complexity ⟨hk.1, hk.2.1⟩ t).trans (by linarith)) rcases positive_integer_amplitude_index (representative_pair_positive hk hjl hj) (hb j) with ⟨a, ha⟩ have hl : k l ≠ 0 := by have hm : l ∈ frequencySupport k := by simp [hj] simpa [frequencySupport] using hm rcases signed_integer_amplitude_index hl (hb l) with ⟨b, neg, hb'⟩ apply Finset.mem_image.mpr refine ⟨(⟨(j, l), hjl⟩, (a, b), neg), Finset.mem_univ _, ?_⟩ funext t by_cases htj : t = j · subst t simp [spectralPairEncoding, ha] · by_cases htl : t = l · subst t simpa only [spectralPairEncoding, htj, if_false, if_true] using hb' · have hz : k t = 0 := by by_contra h have hm : t ∈ frequencySupport k := by simp [frequencySupport, h] simp [hj, htj, htl] at hm simp [spectralPairEncoding, htj, htl, hz]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.cutoff_pair_in_encoding · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:213
theorem ordered_coordinate_pair_card

There are exactly binomially many increasing coordinate pairs. The asserted mathematical result follows.

Formal statement
d :
ℕ
card {jl : Fin d × Fin d // jl.1 < jl.2} = pairCount d
Proof (Lean source)
-- @node: ordered_coordinate_pair_card lemma ordered_coordinate_pair_card (d : ℕ) : card {jl : Fin d × Fin d // jl.1 < jl.2} = pairCount d := by rw [Fintype.card_subtype] simpa only [Fintype.card_fin, pairCount] using (Fintype.card_product_filter_lt (α := Fin d))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.ordered_coordinate_pair_card · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:246
theorem spectralCutoffRepresentatives_card_le

Main effects and signed pairs give the finite cutoff-count bound before scalar simplification.

Formal statement
d :
ℕ
u :
ℝ
≤ d * floor (sqrt u) + 2 * pairCount d * floor (sqrt (2 * u)) ^ 2
Proof (Lean source)
-- @node: spectralCutoffRepresentatives_card_le lemma spectralCutoffRepresentatives_card_le (d : ℕ) (u : ℝ) : (spectralCutoffRepresentatives d u).card ≤ d * floor (sqrt u) + 2 * pairCount d * floor (sqrt (2 * u)) ^ 2 := by let A := (Finset.univ : Finset (Fin d × Fin (floor (sqrt u)))).image spectralSingleEncoding let B := (Finset.univ : Finset ({jl : Fin d × Fin d // jl.1 < jl.2} × (Fin (floor (sqrt (2 * u))) × Fin (floor (sqrt (2 * u)))) × Bool)).image spectralPairEncoding have hsub : spectralCutoffRepresentatives d u ⊆ A ∪ B := by intro k hk rcases mem_spectralCutoffRepresentatives.mp hk with ⟨hr, hu⟩ rcases representative_support_cases hr with ⟨j, hj⟩ | ⟨j, l, hjl, hj⟩ · exact Finset.mem_union.mpr (inl (cutoff_single_in_encoding hr hu hj)) · exact Finset.mem_union.mpr (inr (cutoff_pair_in_encoding hr hu hjl hj)) have ha : A.card ≤ d * floor (sqrt u) := by simpa [A] using Finset.card_image_le (s := (Finset.univ : Finset (Fin d × Fin (floor (sqrt u))))) (f := spectralSingleEncoding) have hb : B.card ≤ 2 * pairCount d * floor (sqrt (2 * u)) ^ 2 := by have h := Finset.card_image_le (s := (Finset.univ : Finset ({jl : Fin d × Fin d // jl.1 < jl.2} × (Fin (floor (sqrt (2 * u))) × Fin (floor (sqrt (2 * u)))) × Bool))) (f := spectralPairEncoding) simpa only [B, Finset.card_univ, Fintype.card_prod, Fintype.card_fin, Fintype.card_bool, ordered_coordinate_pair_card, pow_two, mul_comm, mul_left_comm, mul_assoc] using h exact (Finset.card_le_card hsub).trans ((Finset.card_union_le A B).trans (Nat.add_le_add ha hb))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralCutoffRepresentatives_card_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:254
theorem one_le_frequencyComplexity Lemma one_le_frequencyComplexity in the paper ↗

A nonzero integer frequency has averaged squared complexity at least one. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
Fin d → ℤ
hk :
1 ≤ (frequencySupport k).card
Proof (Lean source)
-- @node: one_le_frequencyComplexity lemma one_le_frequencyComplexity {d : ℕ} {k : Fin d → ℤ} (hk : 1 ≤ (frequencySupport k).card) : 1 ≤ frequencyComplexity k := by have hpos : 0 < ((frequencySupport k).card : ℝ) := by exact_mod_cast hk have hc : ((frequencySupport k).card : ℝ) ≤ frequencySq k := by calc _ = ∑ j ∈ frequencySupport k, (1 : ℝ) := by simp _ ≤ ∑ j ∈ frequencySupport k, (k j : ℝ) ^ 2 := by apply Finset.sum_le_sum intro j hj have hne : k j ≠ 0 := by simpa [frequencySupport] using hj have hz : 1 ≤ k j ∨ k j ≤ -1 := by omega rcases hz with hz | hz · have hr : (1 : ℝ) ≤ k j := by exact_mod_cast hz nlinarith [sq_nonneg ((k j : ℝ) - 1)] · have hr : (k j : ℝ) ≤ -1 := by exact_mod_cast hz nlinarith [sq_nonneg ((k j : ℝ) + 1)] _ ≤ frequencySq k := by exact Finset.sum_le_sum_of_subset_of_nonneg (Finset.subset_univ _) (fun j _ _ => sq_nonneg (k j : ℝ)) exact (le_div_iff₀ hpos).mpr (by simpa using hc)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.one_le_frequencyComplexity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:286
theorem spectral_dimension_le_two_pairCount

In dimension at least two, the coordinate count is at most twice the pair count. Under the stated conditions.

Formal statement
d :
ℕ
hd :
2 ≤ d
(d : ℝ) ≤ 2 * pairCount d
Proof (Lean source)
-- @node: spectral_dimension_le_two_pairCount lemma spectral_dimension_le_two_pairCount {d : ℕ} (hd : 2 ≤ d) : (d : ℝ) ≤ 2 * pairCount d := by have heq := Nat.descFactorial_eq_factorial_mul_choose d 2 simp only [Nat.descFactorial_succ, Nat.descFactorial_zero, Nat.sub_zero, mul_one, Nat.factorial_succ, Nat.factorial_zero] at heq have hreal : ((d : ℝ) - 1) * d = 2 * (pairCount d : ℝ) := by have hc := congrArg (Nat.cast : ℕ → ℝ) heq simpa [Nat.cast_sub (by omega : 1 ≤ d), pairCount] using hc have hdim : (2 : ℝ) ≤ d := by exact_mod_cast hd nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_dimension_le_two_pairCount · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:309
theorem spectral_real_cutoff_count_le

The two real rows for every conjugate pair have total cutoff count at most twelve times the pair count and the complexity cutoff. Under the stated conditions.

Formal statement
d :
ℕ
u :
ℝ
hd :
2 ≤ d
hu :
1 ≤ u
2 * ((spectralCutoffRepresentatives d u).card : ℝ) ≤ 12 * pairCount d * u
Proof (Lean source)
-- @node: spectral_real_cutoff_count_le lemma spectral_real_cutoff_count_le {d : ℕ} {u : ℝ} (hd : 2 ≤ d) (hu : 1 ≤ u) : 2 * ((spectralCutoffRepresentatives d u).card : ℝ) ≤ 12 * pairCount d * u := by have hc : ((spectralCutoffRepresentatives d u).card : ℝ) ≤ (d : ℝ) * floor (sqrt u) + 2 * pairCount d * (floor (sqrt (2 * u)) : ℝ) ^ 2 := by exact_mod_cast spectralCutoffRepresentatives_card_le d u have hsqrt : sqrt u ≤ u := by have hsq := Real.sq_sqrt (by linarith : 0 ≤ u) have hnonneg := Real.sqrt_nonneg u nlinarith [sq_nonneg (sqrt u - 1)] have hr := (Nat.floor_le (Real.sqrt_nonneg u)).trans hsqrt have hl := Nat.floor_le (Real.sqrt_nonneg (2 * u)) have hlpos : (0 : ℝ) ≤ floor (sqrt (2 * u)) := by positivity have hl2 : (floor (sqrt (2 * u)) : ℝ) ^ 2 ≤ 2 * u := by have hs := Real.sq_sqrt (by linarith : 0 ≤ 2 * u) nlinarith [Real.sqrt_nonneg (2 * u)] have hdB := spectral_dimension_le_two_pairCount hd have hdpos : (0 : ℝ) ≤ d := by positivity have hBpos : (0 : ℝ) ≤ pairCount d := by positivity have hm := mul_le_mul_of_nonneg_left hr hdpos have hp := mul_le_mul_of_nonneg_left hl2 (by positivity : (0 : ℝ) ≤ 2 * pairCount d) have hdBu := mul_le_mul_of_nonneg_right hdB (by linarith : 0 ≤ u) nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_real_cutoff_count_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:322
theorem featureFrequency_real_rows_le_complexity

Both real row indices of an indexed frequency obey the explicit twelve-pair cutoff. Under the stated conditions.

Formal statement
d i :
ℕ
hd :
2 ≤ d
(2 * i + 2 : ℝ) ≤ 12 * pairCount d * frequencyComplexity (featureFrequency d i)
Proof (Lean source)
-- @node: featureFrequency_real_rows_le_complexity lemma featureFrequency_real_rows_le_complexity {d i : ℕ} (hd : 2 ≤ d) : (2 * i + 2 : ℝ) ≤ 12 * pairCount d * frequencyComplexity (featureFrequency d i) := by have hr : (2 * i + 2 : ℝ) ≤ 2 * ((spectralCutoffRepresentatives d (frequencyComplexity (featureFrequency d i))).card : ℝ) := by exact_mod_cast featureFrequency_real_rows_le_cutoff_count (i := i) hd exact hr.trans (spectral_real_cutoff_count_le hd (one_le_frequencyComplexity (featureFrequency_support_nonempty (by omega))))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_real_rows_le_complexity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:349

Negating a frequency preserves its support. The asserted mathematical result follows.

Formal statement
d :
ℕ
k :
Fin d → ℤ
Proof (Lean source)
-- @node: frequencySupport_neg lemma frequencySupport_neg {d : ℕ} (k : Fin d → ℤ) : frequencySupport (-k) = frequencySupport k := by ext j simp [frequencySupport]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencySupport_neg · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:360
theorem frequencyComplexity_neg Lemma frequencyComplexity_neg in the paper ↗

Opposite frequencies have the same averaged squared complexity.

Formal statement
d :
ℕ
k :
Fin d → ℤ
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyComplexity_neg · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:367
theorem representative_or_neg_of_supported

Every supported nonzero frequency has exactly a prescribed orientation up to sign. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d :
ℕ
Fin d → ℤ
hk :
1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2
Proof (Lean source)
-- @node: representative_or_neg_of_supported lemma representative_or_neg_of_supported {d : ℕ} {k : Fin d → ℤ} (hk : 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2) : IsFrequencyRepresentative k ∨ IsFrequencyRepresentative (-k) := by have hne : (frequencySupport k).Nonempty := Finset.card_pos.mp (by omega) let j := (frequencySupport k).min' hne have hjmem : j ∈ frequencySupport k := Finset.min'_mem _ _ have hjnz : k j ≠ 0 := by simpa [frequencySupport] using hjmem have hprev : ∀ l : Fin d, l < j → k l = 0 := by intro l hlj by_contra h have hlmem : l ∈ frequencySupport k := by simp [frequencySupport, h] have hjl : j ≤ l := Finset.min'_le _ l hlmem exact (not_le_of_gt hlj) hjl rcases lt_or_gt_of_ne hjnz with hneg | hpos · right refine ⟨by simpa [frequencySupport_neg] using hk.1, by simpa [frequencySupport_neg] using hk.2, j, ?_, ?_⟩ · simpa using neg_pos.mpr hneg · intro l hl simp [hprev l hl] · exact inl ⟨hk.1, hk.2, j, hpos, hprev⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.representative_or_neg_of_supported · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:373
theorem supported_frequency_eq_feature_or_neg Lemma supported_frequency_eq_feature_or_neg in the paper ↗

Every support-one or support-two frequency occurs in the global real-row enumeration up to the unique choice of conjugate orientation. Under the stated conditions.

Formal statement
d :
ℕ
hd :
2 ≤ d
k :
Fin d → ℤ
hk :
1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2
∃ i : ℕ, k = featureFrequency d i ∨ k = -featureFrequency d i
Proof (Lean source)
-- @node: supported_frequency_eq_feature_or_neg lemma supported_frequency_eq_feature_or_neg {d : ℕ} (hd : 2 ≤ d) (k : Fin d → ℤ) (hk : 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2) : ∃ i : ℕ, k = featureFrequency d i ∨ k = -featureFrequency d i := by rcases representative_or_neg_of_supported hk with hr | hr · rcases featureFrequency_surjective_representatives hd k hr with ⟨i, hi⟩ exact ⟨i, inl hi.symm⟩ · rcases featureFrequency_surjective_representatives hd (-k) hr with ⟨i, hi⟩ refine ⟨i, inr ?_⟩ simpa using congrArg neg hi.symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.supported_frequency_eq_feature_or_neg · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralCounting.lean:397
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.SpectralFrequency 19 declarations The positive frequencies on the first coordinate supply an explicit finite family inside every sufficiently large frequency box.

Elementary properties of the ordered spectral frequencies

The positive frequencies on the first coordinate supply an explicit finite family inside every sufficiently large frequency box. This proves that the ordered prefix lookup is in range and hence that every selected frequency is a nonzero representative supported on at most two coordinates.

def firstCoordinateFrequency

The positive frequency of size m + 1 on the first coordinate.

Definition (Lean source)
d m :
ℕ
firstCoordinateFrequency d m :
Fin d → ℤ
fun j => if j.val = 0 then (m + 1 : ℕ) else 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.firstCoordinateFrequency · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:22
theorem frequencySupport_firstCoordinateFrequency

In positive dimension, the first-coordinate frequency has singleton support. This uses the hd hypothesis, the stated conclusion.

Formal statement
d m :
ℕ
hd :
0 < d
Proof (Lean source)
lemma frequencySupport_firstCoordinateFrequency {d m : ℕ} (hd : 0 < d) : frequencySupport (firstCoordinateFrequency d m) = {⟨0, hd⟩} := by ext j by_cases hj : j.val = 0 · have heq : j = (⟨0, hd⟩ : Fin d) := Fin.ext hj subst j simp [frequencySupport, firstCoordinateFrequency] omega · have hne : j ≠ (⟨0, hd⟩ : Fin d) := fun h => hj (congrArg val h) simp [frequencySupport, firstCoordinateFrequency, hj, hne]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencySupport_firstCoordinateFrequency · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:27
theorem firstCoordinateFrequency_isRepresentative

In positive dimension, every first-coordinate frequency is a prescribed representative. This uses the hd hypothesis, the stated conclusion.

Formal statement
d m :
ℕ
hd :
0 < d
Proof (Lean source)
lemma firstCoordinateFrequency_isRepresentative {d m : ℕ} (hd : 0 < d) : IsFrequencyRepresentative (firstCoordinateFrequency d m) := by rw [IsFrequencyRepresentative, frequencySupport_firstCoordinateFrequency hd] refine ⟨by simp, by simp, ⟨⟨0, hd⟩, ?_, ?_⟩⟩ · simp [firstCoordinateFrequency] · intro l hl exact False.elim ((Nat.not_lt_zero l.val) hl)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.firstCoordinateFrequency_isRepresentative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:39
theorem firstCoordinateFrequency_injective

Frequencies of distinct positive sizes on the first coordinate are distinct. This uses the hd hypothesis, the stated conclusion.

Formal statement
d :
ℕ
hd :
0 < d
Proof (Lean source)
lemma firstCoordinateFrequency_injective {d : ℕ} (hd : 0 < d) : Injective (firstCoordinateFrequency d) := by intro a b hab have h := congrFun hab ⟨0, hd⟩ simpa [firstCoordinateFrequency] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.firstCoordinateFrequency_injective · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:48
theorem firstCoordinateFrequency_mem_frequencyBox

The first J positive first-coordinate frequencies lie in the radius-J box. This uses the hm hypothesis, the stated conclusion.

Formal statement
d J m :
ℕ
hm :
m < J
Proof (Lean source)
lemma firstCoordinateFrequency_mem_frequencyBox {d J m : ℕ} (hm : m < J) : firstCoordinateFrequency d m ∈ frequencyBox d J := by simp only [frequencyBox, Fintype.mem_piFinset, Finset.mem_Icc] intro j simp only [firstCoordinateFrequency] split_ifs · constructor · omega · exact_mod_cast Nat.succ_le_iff.mpr hm · constructor <;> omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.firstCoordinateFrequency_mem_frequencyBox · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:55
theorem frequencyBefore_self_eq_false

The strict spectral comparator is false on equal frequencies. This uses the stated conclusion.

Formal statement
d :
ℕ
k :
Fin d → ℤ
Proof (Lean source)
lemma frequencyBefore_self_eq_false {d : ℕ} (k : Fin d → ℤ) : frequencyBefore k k = false := by simp [frequencyBefore]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyBefore_self_eq_false · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:67
theorem pairwise_mergeSort_of_nodup_of_strictTotal

A transitive strict comparator that compares every pair of distinct entries makes merge sort strictly pairwise sorted on every noduplicated input. This uses the htrans hypothesis, the hcompare hypothesis, the hnodup hypothesis, the stated conclusion.

Formal statement
α :
Type*
cmp :
α → α → Bool
htrans :
∀ a b c
if
cmp a b = true
and
cmp b c = true
then
cmp a c = true
hcompare :
∀ a b
if
a ≠ b
then
cmp a b = true ∨ cmp b a = true
l :
List α
hnodup :
l.Nodup
(l.mergeSort cmp).Pairwise fun a b => cmp a b = true
Proof (Lean source)
lemma pairwise_mergeSort_of_nodup_of_strictTotal {α : Type*} [DecidableEq α] (cmp : α → α → Bool) (htrans : ∀ a b c, cmp a b = true → cmp b c = true → cmp a c = true) (hcompare : ∀ a b, a ≠ b → cmp a b = true ∨ cmp b a = true) (l : List α) (hnodup : l.Nodup) : (l.mergeSort cmp).Pairwise fun a b => cmp a b = true := by let cmpLE := strictComparatorLE cmp have htransLE : ∀ a b c, cmpLE a b = true → cmpLE b c = true → cmpLE a c = true := by intro a b c hab hbc simp only [cmpLE, strictComparatorLE, Bool.or_eq_true, decide_eq_true_eq] at hab hbc ⊢ rcases hab with rfl | hab · exact hbc rcases hbc with rfl | hbc · exact inr hab · exact inr (htrans _ _ _ hab hbc) have htotalLE : ∀ a b, (cmpLE a b || cmpLE b a) = true := by intro a b by_cases hab : a = b · subst b simp [cmpLE, strictComparatorLE] · rcases hcompare a b hab with hab' | hba' · simp [cmpLE, strictComparatorLE, hab'] · simp [cmpLE, strictComparatorLE, hba'] have hsortLE := List.pairwise_mergeSort htransLE htotalLE l have heq : l.mergeSort cmp = l.mergeSort cmpLE := by apply mergeSort_eq_mergeSort_of_nodup cmp cmpLE l hnodup intro a b hab simp [cmpLE, strictComparatorLE, hab] rw [← heq] at hsortLE rw [List.pairwise_iff_getElem] at hsortLE ⊢ intro i j hi hj hij have hle := hsortLE i j hi hj hij have hne : (l.mergeSort cmp)[i] ≠ (l.mergeSort cmp)[j] := by have hout : (l.mergeSort cmp).Nodup := List.nodup_mergeSort.mpr hnodup have hpne := List.nodup_iff_pairwise_ne.mp hout exact (List.pairwise_iff_getElem.mp hpne) i j hi hj hij simp only [cmpLE, strictComparatorLE, Bool.or_eq_true, decide_eq_true_eq] at hle exact hle.resolve_left hne
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairwise_mergeSort_of_nodup_of_strictTotal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:140
theorem frequencyBefore_transitive

The strict spectral comparator is transitive. This uses the hab hypothesis, the hbc hypothesis, the stated conclusion.

Formal statement
d :
ℕ
a b c :
Fin d → ℤ
hab :
hbc :
Proof (Lean source)
lemma frequencyBefore_transitive {d : ℕ} (a b c : Fin d → ℤ) (hab : frequencyBefore a b = true) (hbc : frequencyBefore b c = true) : frequencyBefore a c = true := by apply decide_eq_true have hab' := of_decide_eq_true hab have hbc' := of_decide_eq_true hbc rcases hab' with hab' | ⟨habc, hab'⟩ · rcases hbc' with hbc' | ⟨hbcc, _⟩ · exact inl (hab'.trans hbc') · exact inl (hbcc ▸ hab') · rcases hbc' with hbc' | ⟨hbcc, hbc'⟩ · exact inl (habc ▸ hbc') · have hlex : (finRange d).map a < (finRange d).map c := lt_trans ((List.lt_iff_lex_lt _ _).mpr hab') ((List.lt_iff_lex_lt _ _).mpr hbc') exact inr ⟨habc.trans hbcc, (List.lt_iff_lex_lt _ _).mp hlex⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyBefore_transitive · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:181
theorem frequencyCoordinateList_injective

A frequency is determined by its coordinate list. This uses the stated conclusion.

Formal statement
d :
ℕ
Injective (fun k : Fin d → ℤ => (finRange d).map k)
Proof (Lean source)
lemma frequencyCoordinateList_injective (d : ℕ) : Injective (fun k : Fin d → ℤ => (finRange d).map k) := by intro k l hkl funext i have h := congrArg (fun xs : List ℤ => xs.getD i.val 0) hkl rw [List.getD_eq_getElem _ _ (by simp [i.isLt]), List.getD_eq_getElem _ _ (by simp [i.isLt])] at h simp only [List.getElem_map, List.getElem_finRange] at h convert h using 1 <;> congr
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyCoordinateList_injective · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:198
theorem frequencyBefore_comparable_of_ne

Distinct frequencies are comparable by the strict spectral comparator. This uses the hab hypothesis, the stated conclusion.

Formal statement
d :
ℕ
a b :
Fin d → ℤ
hab :
a ≠ b
Proof (Lean source)
lemma frequencyBefore_comparable_of_ne {d : ℕ} (a b : Fin d → ℤ) (hab : a ≠ b) : frequencyBefore a b = true ∨ frequencyBefore b a = true := by unfold frequencyBefore rcases lt_trichotomy (frequencyComplexity a) (frequencyComplexity b) with hlt | heq | hgt · exact inl (decide_eq_true (inl hlt)) · have hlist : (finRange d).map a ≠ (finRange d).map b := fun h => hab (frequencyCoordinateList_injective d h) rcases trichotomous_of (List.Lex (· < ·)) ((finRange d).map a) ((finRange d).map b) with hlex | hsame | hlex · exact inl (decide_eq_true (inr ⟨heq, hlex⟩)) · exact (hlist hsame).elim · exact inr (decide_eq_true (inr ⟨heq.symm, hlex⟩)) · exact inr (decide_eq_true (inl hgt))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyBefore_comparable_of_ne · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:209
theorem orderedFrequencyBox_pairwise_frequencyBefore

Every ordered frequency box is strictly pairwise sorted by the prescribed comparator. This uses the stated conclusion.

Formal statement
d J :
ℕ
(orderedFrequencyBox d J).Pairwise fun a b => frequencyBefore a b = true
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedFrequencyBox_pairwise_frequencyBefore · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:224
theorem frequencyComplexity_le_of_frequencyBefore_eq_true

A frequency placed before another by the spectral comparator has no larger complexity. This uses the h hypothesis, the stated conclusion.

Formal statement
d :
ℕ
Fin d → ℤ
h :
Proof (Lean source)
lemma frequencyComplexity_le_of_frequencyBefore_eq_true {d : ℕ} {k l : Fin d → ℤ} (h : frequencyBefore k l = true) : frequencyComplexity k ≤ frequencyComplexity l := by have horder := of_decide_eq_true h rcases horder with hlt | ⟨heq, _⟩ · exact hlt.le · exact heq.le
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequencyComplexity_le_of_frequencyBefore_eq_true · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:232
theorem card_representative_frequencyBox_ge

In positive dimension, the representative part of the radius-J box has at least J elements. This uses the hd hypothesis, the stated conclusion.

Formal statement
d J :
ℕ
hd :
0 < d
J ≤ ((frequencyBox d J).filter IsFrequencyRepresentative).card
Proof (Lean source)
lemma card_representative_frequencyBox_ge {d J : ℕ} (hd : 0 < d) : J ≤ ((frequencyBox d J).filter IsFrequencyRepresentative).card := by let A := (range J).image (firstCoordinateFrequency d) have hcard : A.card = J := by rw [Finset.card_image_of_injective _ (firstCoordinateFrequency_injective hd), Finset.card_range] have hsub : A ⊆ (frequencyBox d J).filter IsFrequencyRepresentative := by intro k hk rcases Finset.mem_image.mp hk with ⟨m, hm, rfl⟩ rw [mem_filter] exact ⟨firstCoordinateFrequency_mem_frequencyBox (Finset.mem_range.mp hm), firstCoordinateFrequency_isRepresentative hd⟩ calc J = A.card := hcard.symm _ ≤ ((frequencyBox d J).filter IsFrequencyRepresentative).card := Finset.card_le_card hsub
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.card_representative_frequencyBox_ge · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:241
theorem orderedFrequencyBox_length_ge

In positive dimension, the ordered radius-J box contains at least J entries. This uses the hd hypothesis, the stated conclusion.

Formal statement
d J :
ℕ
hd :
0 < d
Proof (Lean source)
lemma orderedFrequencyBox_length_ge {d J : ℕ} (hd : 0 < d) : J ≤ (orderedFrequencyBox d J).length := by let l := (frequencyBox d J).toList.filter (fun k => decide (IsFrequencyRepresentative k)) have hnodup : l.Nodup := (frequencyBox d J).nodup_toList.filter _ have hcard := List.toFinset_card_of_nodup hnodup have htoFinset : l.toFinset = (frequencyBox d J).filter IsFrequencyRepresentative := by symm simpa only [l, Finset.toList_toFinset] using (List.filter_toFinset (frequencyBox d J).toList IsFrequencyRepresentative) rw [htoFinset] at hcard rw [orderedFrequencyBox, List.length_mergeSort, ← hcard] exact card_representative_frequencyBox_ge hd
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedFrequencyBox_length_ge · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:260
theorem featureFrequency_index_lt

The lookup defining the index-th feature frequency is in range in positive dimension. This uses the hd hypothesis, the stated conclusion.

Formal statement
d index :
ℕ
hd :
0 < d
index < (orderedFrequencyBox d (index + 1)).length
Proof (Lean source)
lemma featureFrequency_index_lt {d index : ℕ} (hd : 0 < d) : index < (orderedFrequencyBox d (index + 1)).length := by exact lt_of_lt_of_le (lt_succ_self index) (orderedFrequencyBox_length_ge hd)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_index_lt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:275
theorem featureFrequency_eq_getElem

In positive dimension, the feature-frequency lookup never uses its zero fallback. This uses the hd hypothesis, the stated conclusion.

Formal statement
d index :
ℕ
hd :
0 < d
Proof (Lean source)
lemma featureFrequency_eq_getElem {d index : ℕ} (hd : 0 < d) : featureFrequency d index = (orderedFrequencyBox d (index + 1))[index]'(featureFrequency_index_lt hd) := by unfold featureFrequency exact List.getD_eq_getElem _ _ (featureFrequency_index_lt hd)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_eq_getElem · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:280
theorem featureFrequency_mem_frequencyBox_and_isRepresentative

In positive dimension, every selected feature frequency belongs to its defining box and is a prescribed representative. This uses the hd hypothesis, the stated conclusion.

Formal statement
d index :
ℕ
hd :
0 < d
conclusion 1
featureFrequency d index ∈ frequencyBox d (index + 1)
Proof (Lean source)
lemma featureFrequency_mem_frequencyBox_and_isRepresentative {d index : ℕ} (hd : 0 < d) : featureFrequency d index ∈ frequencyBox d (index + 1) ∧ IsFrequencyRepresentative (featureFrequency d index) := by have hmem : featureFrequency d index ∈ orderedFrequencyBox d (index + 1) := by rw [featureFrequency_eq_getElem hd] exact List.getElem_mem (featureFrequency_index_lt hd) change featureFrequency d index ∈ ((frequencyBox d (index + 1)).toList.filter (fun k => decide (IsFrequencyRepresentative k))).mergeSort frequencyBefore at hmem have hfilter := (List.mergeSort_perm ((frequencyBox d (index + 1)).toList.filter (fun k => decide (IsFrequencyRepresentative k))) frequencyBefore).mem_iff.mp hmem simp only [List.mem_filter, Finset.mem_toList] at hfilter exact ⟨hfilter.1, of_decide_eq_true hfilter.2⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_mem_frequencyBox_and_isRepresentative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:287
theorem featureFrequency_isRepresentative

In positive dimension, every selected feature frequency is a prescribed representative. This uses the hd hypothesis, the stated conclusion.

Formal statement
d index :
ℕ
hd :
0 < d
Proof (Lean source)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_isRepresentative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:304
theorem featureFrequency_support_nonempty

Every selected feature frequency has nonempty support. This uses the hd hypothesis, the stated conclusion.

Formal statement
d index :
ℕ
hd :
0 < d
1 ≤ (frequencySupport (featureFrequency d index)).card
Proof (Lean source)
lemma featureFrequency_support_nonempty {d index : ℕ} (hd : 0 < d) : 1 ≤ (frequencySupport (featureFrequency d index)).card := (featureFrequency_isRepresentative hd).1
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_support_nonempty · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralFrequency.lean:309
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.SpectralPrefix 20 declarations Two-coordinate witnesses bound the complexity of each selected frequency.

Stability of finite spectral prefixes

Two-coordinate witnesses bound the complexity of each selected frequency. Frequencies outside its defining box have strictly greater complexity, so enlarging the box preserves all earlier entries, including the lexicographic order at ties.

[ A family of two-coordinate representatives with controlled complexity.

Definition (Lean source)
d m :
ℕ
prefixPairFrequency d m :
Fin d → ℤ
fun j => if j.val = 0 then (m + 1 : ℕ) else if j.val = 1 then 1 else 0
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prefixPairFrequency · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:17
theorem prefixPairFrequency_support

The witness family has exactly the first two coordinates in its support.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
d m :
ℕ
hd :
2 ≤ d
frequencySupport (prefixPairFrequency d m) = {⟨0, by omega⟩, ⟨1, by omega⟩}
Proof (Lean source)
-- @node: prefixPairFrequency_support lemma prefixPairFrequency_support {d m : ℕ} (hd : 2 ≤ d) : frequencySupport (prefixPairFrequency d m) = {⟨0, by omega⟩, ⟨1, by omega⟩} := by ext j simp only [frequencySupport, mem_filter, Finset.mem_univ, true_and, Finset.mem_insert, Finset.mem_singleton] by_cases h0 : j.val = 0 · have hj : j = (⟨0, by omega⟩ : Fin d) := Fin.ext h0 rw [hj] simp [prefixPairFrequency] omega · by_cases h1 : j.val = 1 · have hj : j = (⟨1, by omega⟩ : Fin d) := Fin.ext h1 rw [hj] simp [prefixPairFrequency] · have hn0 : j ≠ (⟨0, by omega⟩ : Fin d) := fun h => h0 (congrArg val h) have hn1 : j ≠ (⟨1, by omega⟩ : Fin d) := fun h => h1 (congrArg val h) simp [prefixPairFrequency, h0, h1, hn0, hn1]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prefixPairFrequency_support · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:22
theorem prefixPairFrequency_representative

The witness family consists of distinct representatives. Under the stated conditions.

Formal statement
d m :
ℕ
hd :
2 ≤ d
Proof (Lean source)
-- @node: prefixPairFrequency_representative lemma prefixPairFrequency_representative {d m : ℕ} (hd : 2 ≤ d) : IsFrequencyRepresentative (prefixPairFrequency d m) := by rw [IsFrequencyRepresentative, prefixPairFrequency_support hd] refine ⟨by simp, by simp, ⟨⟨0, by omega⟩, ?_, ?_⟩⟩ · simp [prefixPairFrequency] · intro l hl exact False.elim ((Nat.not_lt_zero l.val) hl)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prefixPairFrequency_representative · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:42
theorem prefixPairFrequency_injective

Distinct witness sizes give distinct frequencies. Under the stated conditions.

Formal statement
d :
ℕ
hd :
2 ≤ d
Proof (Lean source)
-- @node: prefixPairFrequency_injective lemma prefixPairFrequency_injective {d : ℕ} (hd : 2 ≤ d) : Injective (prefixPairFrequency d) := by intro a b hab have h := congrFun hab ⟨0, by omega⟩ simpa [prefixPairFrequency] using h
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prefixPairFrequency_injective · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:52
theorem prefixPairFrequency_mem_box

The first J witnesses belong to the radius-J frequency box. Under the stated conditions.

Formal statement
d J m :
ℕ
hm :
m < J
Proof (Lean source)
-- @node: prefixPairFrequency_mem_box lemma prefixPairFrequency_mem_box {d J m : ℕ} (hm : m < J) : prefixPairFrequency d m ∈ frequencyBox d J := by simp only [frequencyBox, Fintype.mem_piFinset, Finset.mem_Icc] intro j simp only [prefixPairFrequency] split_ifs <;> constructor <;> omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prefixPairFrequency_mem_box · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:60
theorem prefixPairFrequency_complexity

The exact witness complexity uses the averaged two-coordinate normalization. Under the stated conditions.

Formal statement
d m :
ℕ
hd :
2 ≤ d
frequencyComplexity (prefixPairFrequency d m) = ((m + 1 : ℝ) ^ 2 + 1) / 2
Proof (Lean source)
-- @node: prefixPairFrequency_complexity lemma prefixPairFrequency_complexity {d m : ℕ} (hd : 2 ≤ d) : frequencyComplexity (prefixPairFrequency d m) = ((m + 1 : ℝ) ^ 2 + 1) / 2 := by rw [frequencyComplexity, prefixPairFrequency_support hd] have hc2 : ({⟨0, by omega⟩, ⟨1, by omega⟩} : Finset (Fin d)).card = 2 := by simp rw [hc2] have hsum : (∑ j : Fin d, (prefixPairFrequency d m j : ℝ) ^ 2) = ∑ j ∈ ({⟨0, by omega⟩, ⟨1, by omega⟩} : Finset (Fin d)), (prefixPairFrequency d m j : ℝ) ^ 2 := by symm apply Finset.sum_subset (Finset.subset_univ _) intro j _ hj have hj0 : j.val ≠ 0 := by intro h apply hj exact Finset.mem_insert.mpr (inl (Fin.ext h)) have hj1 : j.val ≠ 1 := by intro h apply hj exact Finset.mem_insert.mpr (inr (Finset.mem_singleton.mpr (Fin.ext h))) simp [prefixPairFrequency, hj0, hj1] unfold frequencySq rw [hsum] simp [prefixPairFrequency]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prefixPairFrequency_complexity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:69
theorem prefix_low_complexity_card

The witness family supplies J representatives below a strict outside-box cutoff. Under the stated conditions.

Formal statement
d J :
ℕ
hd :
2 ≤ d
J
≤ ((frequencyBox d J).filter fun k => IsFrequencyRepresentative k ∧ frequencyComplexity k ≤ ((J : ℝ) ^ 2 + 1) / 2).card
Proof (Lean source)
-- @node: prefix_low_complexity_card lemma prefix_low_complexity_card {d J : ℕ} (hd : 2 ≤ d) : J ≤ ((frequencyBox d J).filter fun k => IsFrequencyRepresentative k ∧ frequencyComplexity k ≤ ((J : ℝ) ^ 2 + 1) / 2).card := by let A := (range J).image (prefixPairFrequency d) have hc : A.card = J := by rw [Finset.card_image_of_injective _ (prefixPairFrequency_injective hd), Finset.card_range] calc J = A.card := hc.symm _ ≤ _ := ?_ apply Finset.card_le_card intro k hk rcases Finset.mem_image.mp hk with ⟨m, hm, rfl⟩ have hmJ : m + 1 ≤ J := by simpa using Finset.mem_range.mp hm have hreal : (m + 1 : ℝ) ≤ J := by exact_mod_cast hmJ refine Finset.mem_filter.mpr ⟨prefixPairFrequency_mem_box (Finset.mem_range.mp hm), prefixPairFrequency_representative hd, ?_⟩ rw [prefixPairFrequency_complexity hd] nlinarith [sq_nonneg ((J : ℝ) - (m + 1 : ℝ))]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prefix_low_complexity_card · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:95
theorem mem_orderedFrequencyBox_iff

Membership in the sorted box is exactly boundedness and representative status. The asserted mathematical result follows.

Formal statement
d J :
ℕ
Fin d → ℤ
Proof (Lean source)
-- @node: mem_orderedFrequencyBox_iff lemma mem_orderedFrequencyBox_iff {d J : ℕ} {k : Fin d → ℤ} : k ∈ orderedFrequencyBox d J ↔ k ∈ frequencyBox d J ∧ IsFrequencyRepresentative k := by unfold orderedFrequencyBox rw [(List.mergeSort_perm _ _).mem_iff] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mem_orderedFrequencyBox_iff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:116
theorem orderedFrequencyBox_nodup Lemma orderedFrequencyBox_nodup in the paper ↗

Sorted frequency boxes have no duplicate entries.

Formal statement
d J :
ℕ
Proof (Lean source)
-- @node: orderedFrequencyBox_nodup lemma orderedFrequencyBox_nodup (d J : ℕ) : (orderedFrequencyBox d J).Nodup := by unfold orderedFrequencyBox exact List.nodup_mergeSort.mpr ((frequencyBox d J).nodup_toList.filter _)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedFrequencyBox_nodup · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:124
theorem orderedFrequencyBox_entry_complexity_le Lemma orderedFrequencyBox_entry_complexity_le in the paper ↗

Enough low-complexity witnesses bound the complexity of an indexed sorted entry. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d J K i :
ℕ
hd :
2 ≤ d
hiJ :
i < J
hJK :
J ≤ K
hi :
frequencyComplexity ((orderedFrequencyBox d K)[i]) ≤ ((J : ℝ) ^ 2 + 1) / 2
Proof (Lean source)
-- @node: orderedFrequencyBox_entry_complexity_le lemma orderedFrequencyBox_entry_complexity_le {d J K i : ℕ} (hd : 2 ≤ d) (hiJ : i < J) (hJK : J ≤ K) (hi : i < (orderedFrequencyBox d K).length) : frequencyComplexity ((orderedFrequencyBox d K)[i]) ≤ ((J : ℝ) ^ 2 + 1) / 2 := by classical by_contra h have hlt := lt_of_not_ge h let A := (frequencyBox d J).filter fun k => IsFrequencyRepresentative k ∧ frequencyComplexity k ≤ ((J : ℝ) ^ 2 + 1) / 2 have hsub : A ⊆ ((orderedFrequencyBox d K).take i).toFinset := by intro k hk rcases Finset.mem_filter.mp hk with ⟨hbox, hrep, hbound⟩ have hboxK : k ∈ frequencyBox d K := by simp only [frequencyBox, Fintype.mem_piFinset, Finset.mem_Icc] at hbox ⊢ intro j have hj := hbox j constructor <;> omega have hmem : k ∈ orderedFrequencyBox d K := mem_orderedFrequencyBox_iff.mpr ⟨hboxK, hrep⟩ rcases List.mem_iff_getElem.mp hmem with ⟨j, hj, hkj⟩ have hji : j < i := by by_contra hji have hij : i ≤ j := le_of_not_gt hji have horder : frequencyComplexity ((orderedFrequencyBox d K)[i]) ≤ frequencyComplexity ((orderedFrequencyBox d K)[j]) := by rcases hij.eq_or_lt with rfl | hij · exact le_rfl · exact frequencyComplexity_le_of_frequencyBefore_eq_true ((List.pairwise_iff_getElem.mp (orderedFrequencyBox_pairwise_frequencyBefore d K)) i j hi hj hij) rw [hkj] at horder exact (not_le_of_gt hlt) (horder.trans hbound) apply List.mem_toFinset.mpr have ht : j < ((orderedFrequencyBox d K).take i).length := by simp; omega have he : ((orderedFrequencyBox d K).take i)[j] = k := by simpa using hkj exact he ▸ List.getElem_mem ht have hc := Finset.card_le_card hsub have hcard : (((orderedFrequencyBox d K).take i).toFinset).card = i := by rw [List.toFinset_card_of_nodup ((orderedFrequencyBox_nodup d K).take (i := i)), List.length_take] exact min_eq_left hi.le rw [hcard] at hc have hw := prefix_low_complexity_card (J := J) hd change J ≤ A.card at hw omega
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedFrequencyBox_entry_complexity_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:130
theorem outside_frequencyBox_complexity_gt

Any supported representative outside a box exceeds the witness cutoff strictly. Under the stated conditions.

Formal statement
d J :
ℕ
hJ :
0 < J
k :
Fin d → ℤ
hout :
k ∉ frequencyBox d J
((J : ℝ) ^ 2 + 1) / 2 < frequencyComplexity k
Proof (Lean source)
-- @node: outside_frequencyBox_complexity_gt lemma outside_frequencyBox_complexity_gt {d J : ℕ} (hJ : 0 < J) {k : Fin d → ℤ} (hk : IsFrequencyRepresentative k) (hout : k ∉ frequencyBox d J) : ((J : ℝ) ^ 2 + 1) / 2 < frequencyComplexity k := by have hex : ∃ j : Fin d, ¬ (-(J : ℤ) ≤ k j ∧ k j ≤ J) := by simpa only [frequencyBox, Fintype.mem_piFinset, Finset.mem_Icc, not_forall] using hout rcases hex with ⟨j, hj⟩ have hcoord : ((J + 1 : ℕ) : ℝ) ^ 2 ≤ (k j : ℝ) ^ 2 := by have hz : (J + 1 : ℤ) ≤ k j ∨ k j ≤ -(J + 1 : ℤ) := by omega rcases hz with hz | hz · have hz' : (J : ℝ) + 1 ≤ k j := by exact_mod_cast hz push_cast nlinarith [sq_nonneg ((k j : ℝ) - ((J : ℝ) + 1))] · have hz' : (k j : ℝ) ≤ -((J : ℝ) + 1) := by exact_mod_cast hz push_cast nlinarith [sq_nonneg ((k j : ℝ) + ((J : ℝ) + 1))] have hsum : (k j : ℝ) ^ 2 ≤ frequencySq k := Finset.single_le_sum (fun l _ => sq_nonneg (k l : ℝ)) (Finset.mem_univ j) have hcpos : 0 < ((frequencySupport k).card : ℝ) := by exact_mod_cast hk.1 have hctwo : ((frequencySupport k).card : ℝ) ≤ 2 := by exact_mod_cast hk.2.1 have hJ' : 0 < (J : ℝ) := by exact_mod_cast hJ unfold frequencyComplexity apply (lt_div_iff₀ hcpos).mpr have hcut : 0 ≤ ((J : ℝ) ^ 2 + 1) / 2 := by positivity have hprod := mul_le_mul_of_nonneg_left hctwo hcut push_cast at hcoord nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.outside_frequencyBox_complexity_gt · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:178
theorem orderedFrequencyBox_low_filter_eq Lemma orderedFrequencyBox_low_filter_eq in the paper ↗

Enlarging a box leaves its low-complexity sorted portion unchanged. Under the stated conditions.

Formal statement
d J K :
ℕ
hJ :
0 < J
hJK :
J ≤ K
(orderedFrequencyBox d J).filter (fun k => decide (frequencyComplexity k ≤ ((J : ℝ) ^ 2 + 1) / 2))
= (orderedFrequencyBox d K).filter (fun k => decide (frequencyComplexity k ≤ ((J : ℝ) ^ 2 + 1) / 2))
Proof (Lean source)
-- @node: orderedFrequencyBox_low_filter_eq lemma orderedFrequencyBox_low_filter_eq {d J K : ℕ} (hJ : 0 < J) (hJK : J ≤ K) : (orderedFrequencyBox d J).filter (fun k => decide (frequencyComplexity k ≤ ((J : ℝ) ^ 2 + 1) / 2)) = (orderedFrequencyBox d K).filter (fun k => decide (frequencyComplexity k ≤ ((J : ℝ) ^ 2 + 1) / 2)) := by classical let R := fun a b : Fin d → ℤ => frequencyBefore a b = true let : Irrefl R := ⟨fun a h => by simp [R, frequencyBefore_self_eq_false] at h⟩ let : Std.Antisymm R := ⟨fun a b hab hba => by have h := frequencyBefore_transitive a b a hab hba simp [frequencyBefore_self_eq_false] at h⟩ apply List.Pairwise.eq_of_mem_iff ((orderedFrequencyBox_pairwise_frequencyBefore d J).filter _) ((orderedFrequencyBox_pairwise_frequencyBefore d K).filter _) intro k simp only [List.mem_filter, mem_orderedFrequencyBox_iff, decide_eq_true_eq] constructor · rintro ⟨⟨hk, hr⟩, hc⟩ refine ⟨⟨?_, hr⟩, hc⟩ simp only [frequencyBox, Fintype.mem_piFinset, Finset.mem_Icc] at hk ⊢ intro j have hj := hk j constructor <;> omega · rintro ⟨⟨_, hr⟩, hc⟩ refine ⟨⟨?_, hr⟩, hc⟩ by_contra hout exact (not_le_of_gt (outside_frequencyBox_complexity_gt hJ hr hout)) hc
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedFrequencyBox_low_filter_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:207
theorem getElem_filter_eq_of_prefix Lemma getElem_filter_eq_of_prefix in the paper ↗

Filtering a list preserves an index if all entries up to that index pass the test. Under the stated conditions.

Formal statement
α :
Type*
p :
α → Bool
l :
List α
i :
ℕ
hi :
i < l.length
hp :
∀ j (hj : j < l.length)
if
j ≤ i
then
p l[j] = true
∃ hif : i < (l.filter p).length, (l.filter p)[i]'hif = l[i]
Proof (Lean source)
-- @node: getElem_filter_eq_of_prefix lemma getElem_filter_eq_of_prefix {α : Type*} (p : α → Bool) (l : List α) (i : ℕ) (hi : i < l.length) (hp : ∀ j (hj : j < l.length), j ≤ i → p l[j] = true) : ∃ hif : i < (l.filter p).length, (l.filter p)[i]'hif = l[i] := by induction i generalizing l with | zero => cases l with | nil => simp at hi | cons a l => have ha : p a = true := hp 0 (by simp) le_rfl simp only [List.filter_cons, ha, ite_true] exact ⟨by simp, rfl⟩ | succ i ih => cases l with | nil => simp at hi | cons a l => have ha : p a = true := hp 0 (by simp) (zero_le _) have hi' : i < l.length := by simpa using hi have hp' : ∀ j (hj : j < l.length), j ≤ i → p l[j] = true := by intro j hj hji exact hp (j + 1) (by simpa using hj) (by omega) rcases ih l hi' hp' with ⟨hif, heq⟩ simp only [List.filter_cons, ha, ite_true] exact ⟨by simpa using hif, heq⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.getElem_filter_eq_of_prefix · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:237
theorem featureFrequency_eq_getElem_larger_box Lemma featureFrequency_eq_getElem_larger_box in the paper ↗

Every selected frequency has exactly the same index in every larger box. Under the stated conditions.

Formal statement
d i K :
ℕ
hd :
2 ≤ d
hK :
i + 1 ≤ K
∃ hiK : i < (orderedFrequencyBox d K).length,
Proof (Lean source)
-- @node: featureFrequency_eq_getElem_larger_box lemma featureFrequency_eq_getElem_larger_box {d i K : ℕ} (hd : 2 ≤ d) (hK : i + 1 ≤ K) : ∃ hiK : i < (orderedFrequencyBox d K).length, featureFrequency d i = (orderedFrequencyBox d K)[i]'hiK := by let p := fun k : Fin d → ℤ => decide (frequencyComplexity k ≤ (((i + 1 : ℕ) : ℝ) ^ 2 + 1) / 2) have hiJ := featureFrequency_index_lt (d := d) (index := i) (by omega) have hiK : i < (orderedFrequencyBox d K).length := lt_of_lt_of_le (by omega : i < K) (orderedFrequencyBox_length_ge (by omega)) have hpJ : ∀ j (hj : j < (orderedFrequencyBox d (i + 1)).length), j ≤ i → p ((orderedFrequencyBox d (i + 1))[j]) = true := by intro j hj hji apply decide_eq_true have hb := orderedFrequencyBox_entry_complexity_le hd (by omega : j < i + 1) le_rfl hj linarith have heqfilter : (orderedFrequencyBox d (i + 1)).filter p = (orderedFrequencyBox d K).filter p := by exact orderedFrequencyBox_low_filter_eq (d := d) (by omega : 0 < i + 1) hK rcases getElem_filter_eq_of_prefix p _ i hiJ hpJ with ⟨hifJ, heqJ⟩ have hbK := orderedFrequencyBox_entry_complexity_le hd (by omega : i < i + 1) hK hiK have hpK : ∀ j (hj : j < (orderedFrequencyBox d K).length), j ≤ i → p ((orderedFrequencyBox d K)[j]) = true := by intro j hj hji apply decide_eq_true have hjb : frequencyComplexity ((orderedFrequencyBox d K)[j]) ≤ frequencyComplexity ((orderedFrequencyBox d K)[i]) := by rcases hji.eq_or_lt with rfl | hji · exact le_rfl · exact frequencyComplexity_le_of_frequencyBefore_eq_true ((List.pairwise_iff_getElem.mp (orderedFrequencyBox_pairwise_frequencyBefore d K)) j i hj hiK hji) linarith rcases getElem_filter_eq_of_prefix p _ i hiK hpK with ⟨hifK, heqK⟩ refine ⟨hiK, ?_⟩ rw [featureFrequency_eq_getElem (by omega), ← heqJ] simpa only [heqfilter] using heqK
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_eq_getElem_larger_box · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:263
theorem featureFrequency_strict_order Lemma featureFrequency_strict_order in the paper ↗

The indexed frequency sequence is strictly sorted globally, including ties. Under the stated conditions.

Formal statement
d i j :
ℕ
hd :
2 ≤ d
hij :
i < j
Proof (Lean source)
-- @node: featureFrequency_strict_order lemma featureFrequency_strict_order {d i j : ℕ} (hd : 2 ≤ d) (hij : i < j) : frequencyBefore (featureFrequency d i) (featureFrequency d j) = true := by rcases featureFrequency_eq_getElem_larger_box hd (by omega : i + 1 ≤ j + 1) with ⟨hi, hei⟩ rw [hei, featureFrequency_eq_getElem (by omega)] exact (List.pairwise_iff_getElem.mp (orderedFrequencyBox_pairwise_frequencyBefore d (j + 1))) i j hi (featureFrequency_index_lt (by omega)) hij
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_strict_order · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:303
theorem featureFrequency_injective Lemma featureFrequency_injective in the paper ↗

Global prefix stability prevents any frequency from being enumerated twice. Under the stated conditions.

Formal statement
d :
ℕ
hd :
2 ≤ d
Proof (Lean source)
-- @node: featureFrequency_injective lemma featureFrequency_injective {d : ℕ} (hd : 2 ≤ d) : Injective (featureFrequency d) := by intro i j heq rcases lt_trichotomy i j with hij | hij | hji · have h := featureFrequency_strict_order hd hij rw [heq, frequencyBefore_self_eq_false] at h contradiction · exact hij · have h := featureFrequency_strict_order hd hji rw [heq, frequencyBefore_self_eq_false] at h contradiction
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_injective · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:313
theorem frequency_mem_positive_box Lemma frequency_mem_positive_box in the paper ↗

Every finite integer frequency lies in a positive-radius box. The asserted mathematical result follows.

Formal statement
d :
ℕ
k :
Fin d → ℤ
∃ J : ℕ,
conclusion 1
0 < J
conclusion 2
k ∈ frequencyBox d J
Proof (Lean source)
-- @node: frequency_mem_positive_box lemma frequency_mem_positive_box {d : ℕ} (k : Fin d → ℤ) : ∃ J : ℕ, 0 < J ∧ k ∈ frequencyBox d J := by let J := ∑ j : Fin d, (k j).natAbs refine ⟨J + 1, by omega, ?_⟩ simp only [frequencyBox, Fintype.mem_piFinset, Finset.mem_Icc, ← abs_le] intro j have hj : (k j).natAbs ≤ J := Finset.single_le_sum (fun l _ => zero_le (k l).natAbs) (Finset.mem_univ j) have hj' : (k j).natAbs ≤ J + 1 := by omega rw [Int.abs_eq_natAbs] exact_mod_cast hj'
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.frequency_mem_positive_box · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:327
theorem orderedFrequencyBox_entry_le_of_filter_length Lemma orderedFrequencyBox_entry_le_of_filter_length in the paper ↗

In a sorted box, enough entries below a cutoff bound the indexed entry by that cutoff. Under the stated conditions, the asserted mathematical result follows.

Formal statement
d J i :
ℕ
c :
ℝ
hi :
hf :
i < ((orderedFrequencyBox d J).filter (fun k => decide (frequencyComplexity k ≤ c))).length
Proof (Lean source)
-- @node: orderedFrequencyBox_entry_le_of_filter_length lemma orderedFrequencyBox_entry_le_of_filter_length {d J i : ℕ} {c : ℝ} (hi : i < (orderedFrequencyBox d J).length) (hf : i < ((orderedFrequencyBox d J).filter (fun k => decide (frequencyComplexity k ≤ c))).length) : frequencyComplexity ((orderedFrequencyBox d J)[i]) ≤ c := by classical by_contra h have hlt := lt_of_not_ge h let l := orderedFrequencyBox d J let A := (l.filter (fun k => decide (frequencyComplexity k ≤ c))).toFinset have hsub : A ⊆ (l.take i).toFinset := by intro k hk have hmem := List.mem_filter.mp (List.mem_toFinset.mp hk) have hc := of_decide_eq_true hmem.2 rcases List.mem_iff_getElem.mp hmem.1 with ⟨j, hj, hej⟩ have hji : j < i := by by_contra hji have hij : i ≤ j := le_of_not_gt hji have hb : frequencyComplexity (l[i]) ≤ frequencyComplexity (l[j]) := by rcases hij.eq_or_lt with rfl | hij · exact le_rfl · exact frequencyComplexity_le_of_frequencyBefore_eq_true ((List.pairwise_iff_getElem.mp (orderedFrequencyBox_pairwise_frequencyBefore d J)) i j hi hj hij) rw [hej] at hb exact (not_le_of_gt hlt) (hb.trans hc) apply List.mem_toFinset.mpr have ht : j < (l.take i).length := by simp; omega have he : (l.take i)[j] = k := by simpa using hej exact he ▸ List.getElem_mem ht have hc := Finset.card_le_card hsub have hleft : A.card = (l.filter (fun k => decide (frequencyComplexity k ≤ c))).length := List.toFinset_card_of_nodup ((orderedFrequencyBox_nodup d J).filter _) have hright : (l.take i).toFinset.card = i := by rw [List.toFinset_card_of_nodup ((orderedFrequencyBox_nodup d J).take (i := i)), List.length_take] exact min_eq_left hi.le rw [hleft, hright] at hc exact (not_le_of_gt hf) hc
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.orderedFrequencyBox_entry_le_of_filter_length · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:341
theorem featureFrequency_surjective_representatives

The indexed sequence enumerates every prescribed representative. Under the stated conditions.

Formal statement
d :
ℕ
hd :
2 ≤ d
k :
Fin d → ℤ
∃ i : ℕ, featureFrequency d i = k
Proof (Lean source)
-- @node: featureFrequency_surjective_representatives lemma featureFrequency_surjective_representatives {d : ℕ} (hd : 2 ≤ d) (k : Fin d → ℤ) (hk : IsFrequencyRepresentative k) : ∃ i : ℕ, featureFrequency d i = k := by rcases frequency_mem_positive_box k with ⟨R, hR, hkR⟩ -- Choose a radius also large enough that the entire predecessor set is inside the box. let J := max R (ceil (frequencySq k) + 2) have hRJ : R ≤ J := le_max_left _ _ have hJ : 0 < J := lt_of_lt_of_le hR hRJ have hkJ : k ∈ frequencyBox d J := by simp only [frequencyBox, Fintype.mem_piFinset, Finset.mem_Icc] at hkR ⊢ intro l have hl := hkR l constructor <;> omega have hsum : 0 ≤ frequencySq k := Finset.sum_nonneg (fun _ _ => sq_nonneg _) have hcc : frequencyComplexity k ≤ frequencySq k := by have hc : (1 : ℝ) ≤ (frequencySupport k).card := by exact_mod_cast hk.1 unfold frequencyComplexity exact div_le_self hsum hc have hceil : frequencySq k ≤ (ceil (frequencySq k) : ℝ) := Nat.le_ceil _ have hrad : (ceil (frequencySq k) : ℝ) + 2 ≤ J := by exact_mod_cast (le_max_right R (ceil (frequencySq k) + 2)) have hcut : frequencyComplexity k ≤ ((J : ℝ) ^ 2 + 1) / 2 := by nlinarith [sq_nonneg ((J : ℝ) - 1)] have hmem : k ∈ orderedFrequencyBox d J := mem_orderedFrequencyBox_iff.mpr ⟨hkJ, hk⟩ rcases List.mem_iff_getElem.mp hmem with ⟨i, hi, hei⟩ let K := max J (i + 1) have hJK : J ≤ K := le_max_left _ _ let p := fun l : Fin d → ℤ => decide (frequencyComplexity l ≤ ((J : ℝ) ^ 2 + 1) / 2) have hp : ∀ j (hj : j < (orderedFrequencyBox d J).length), j ≤ i → p ((orderedFrequencyBox d J)[j]) = true := by intro j hj hji apply decide_eq_true have hb : frequencyComplexity ((orderedFrequencyBox d J)[j]) ≤ frequencyComplexity k := by rcases hji.eq_or_lt with rfl | hji · rw [hei] · have ho := frequencyComplexity_le_of_frequencyBefore_eq_true ((List.pairwise_iff_getElem.mp (orderedFrequencyBox_pairwise_frequencyBefore d J)) j i hj hi hji) simpa only [hei] using ho exact hb.trans hcut rcases getElem_filter_eq_of_prefix p _ i hi hp with ⟨hif, hef⟩ have heqf : (orderedFrequencyBox d J).filter p = (orderedFrequencyBox d K).filter p := orderedFrequencyBox_low_filter_eq hJ hJK have hifK : i < ((orderedFrequencyBox d K).filter p).length := by simpa only [← heqf] using hif have hKi : i < (orderedFrequencyBox d K).length := lt_of_lt_of_le hifK (List.length_filter_le _ _) -- The selected index in the larger box is the same low-frequency filtered index. have hpK : ∀ j (hj : j < (orderedFrequencyBox d K).length), j ≤ i → p ((orderedFrequencyBox d K)[j]) = true := by intro j hj hji apply decide_eq_true have hlast : frequencyComplexity ((orderedFrequencyBox d K)[i]) ≤ ((J : ℝ) ^ 2 + 1) / 2 := by exact orderedFrequencyBox_entry_le_of_filter_length hKi hifK have hb : frequencyComplexity ((orderedFrequencyBox d K)[j]) ≤ frequencyComplexity ((orderedFrequencyBox d K)[i]) := by rcases hji.eq_or_lt with rfl | hji · exact le_rfl · exact frequencyComplexity_le_of_frequencyBefore_eq_true ((List.pairwise_iff_getElem.mp (orderedFrequencyBox_pairwise_frequencyBefore d K)) j i hj hKi hji) exact hb.trans hlast rcases getElem_filter_eq_of_prefix p _ i hKi hpK with ⟨_, hefK⟩ rcases featureFrequency_eq_getElem_larger_box hd (le_max_right J (i + 1)) with ⟨_, heK⟩ refine ⟨i, heK.trans ?_⟩ rw [← hefK] simpa only [← heqf, hef] using hei
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_surjective_representatives · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:383
theorem featureFrequency_prefix_eq_take Lemma featureFrequency_prefix_eq_take in the paper ↗

A single finite box computes exactly the entire global prefix requested by rounding. Under the stated conditions.

Formal statement
d N J :
ℕ
hd :
2 ≤ d
hNJ :
N ≤ J
ofFn (fun i : Fin N => featureFrequency d i.val) = (orderedFrequencyBox d J).take N
Proof (Lean source)
-- @node: featureFrequency_prefix_eq_take lemma featureFrequency_prefix_eq_take {d N J : ℕ} (hd : 2 ≤ d) (hNJ : N ≤ J) : ofFn (fun i : Fin N => featureFrequency d i.val) = (orderedFrequencyBox d J).take N := by have hlen : N ≤ (orderedFrequencyBox d J).length := hNJ.trans (orderedFrequencyBox_length_ge (by omega)) apply List.ext_getElem · simp [List.length_take, min_eq_left hlen] · intro i hi₁ hi₂ have hiN : i < N := by simpa using hi₁ rcases featureFrequency_eq_getElem_larger_box hd (by omega : i + 1 ≤ J) with ⟨hiJ, heq⟩ simpa only [List.getElem_ofFn, List.getElem_take] using heq
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.featureFrequency_prefix_eq_take · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralPrefix.lean:454
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.SpectralRisk 6 declarations The torus kernel averages only the fresh rounding seeds.

Fourier representation of the spectral seed-image design

The torus kernel averages only the fresh rounding seeds. Reflection and the common shift are then transported by the proved reflection identity.

theorem torusRounding_measurable

[ Joint measurability of rounding on the torus feature rows. This uses the stated conclusion.

Formal statement
n d :
ℕ
Measurable (fun p : (Fin n → Torus d) × RoundingSeeds n => orderedBoundaryRounding n (spectralRows p.1) p.2)
Proof (Lean source)
-- @node: torusRounding_measurable @[fun_prop] lemma torusRounding_measurable (n d : ℕ) : Measurable (fun p : (Fin n → Torus d) × RoundingSeeds n => orderedBoundaryRounding n (spectralRows p.1) p.2) := by have hround := (ordered_prefix_rounding n (fun _ _ => 0) 0 (by intros; simp)).1 have hfeatures (h : ℕ) : Measurable (features d h) := by unfold features ek split <;> fun_prop have hrows : Measurable (fun w : Fin n → Torus d => spectralRows w) := by apply measurable_pi_lambda intro h apply measurable_pi_lambda intro i exact (hfeatures (h.val + 1)).comp (measurable_pi_apply i) exact hround.comp ((hrows.comp measurable_fst).prodMk measurable_snd)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusRounding_measurable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralRisk.lean:16

The fresh-seed kernel on torus samples.

Definition (Lean source)
n d :
ℕ
torusRoundingKernel n d :
Kernel (Fin n → Torus d) (Signs n)
⟨fun w
=> (roundingSeedLaw n).map (orderedBoundaryRounding n (spectralRows w)), by letI : IsProbabilityMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw infer_instance have h := (Measure.measurable_map _ (torusRounding_measurable n d)).comp (Measurable.map_prodMk_left (ν := roundingSeedLaw n) (α := Fin n → Torus d)) simpa only [Function.comp_def, Measure.map_map (torusRounding_measurable n d) measurable_prodMk_left] using h⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusRoundingKernel · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralRisk.lean:34
instance torusRoundingKernel_markov

Rounding seed images are probability measures.

Definition (Lean source)
-- @node: torusRoundingKernel_markov instance torusRoundingKernel_markov (n d : ℕ) : IsMarkovKernel (torusRoundingKernel n d) := by letI : IsProbabilityMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw infer_instance constructor intro w exact Measure.isProbabilityMeasure_map (((torusRounding_measurable n d).comp (measurable_const.prodMk measurable_id)).aemeasurable)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusRoundingKernel_markov · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralRisk.lean:47
theorem torusRoundingKernel_lintegral

Integrating the torus kernel is exactly integrating the fresh rounding seeds.](goal) Under the stated conditions. This uses the stated conclusion.

Formal statement
n d :
ℕ
w :
Fin n → Torus d
f :
Signs n → ℝ≥0∞
hf :
(∫⁻ z, f z ∂torusRoundingKernel n d w)
= ∫⁻ seeds, f (orderedBoundaryRounding n (spectralRows w) seeds) ∂roundingSeedLaw n
Proof (Lean source)
-- @node: torusRoundingKernel_lintegral lemma torusRoundingKernel_lintegral (n d : ℕ) (w : Fin n → Torus d) (f : Signs n → ℝ≥0∞) (hf : Measurable f) : (∫⁻ z, f z ∂torusRoundingKernel n d w) = ∫⁻ seeds, f (orderedBoundaryRounding n (spectralRows w) seeds) ∂roundingSeedLaw n := by change (∫⁻ z, f z ∂(roundingSeedLaw n).map (orderedBoundaryRounding n (spectralRows w))) = _ have hg : Measurable (orderedBoundaryRounding n (spectralRows w)) := (orderedBoundaryRounding_measurable n).comp (measurable_const.prodMk measurable_id) exact lintegral_map hf hg
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.torusRoundingKernel_lintegral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralRisk.lean:60
theorem spectralRoundingKernel_lintegral

The original-sample kernel averages the torus kernel over reflection and shift. Under the stated conditions.

Formal statement
n d :
ℕ
x :
f :
Signs n → ℝ≥0∞
hf :
(∫⁻ z, f z ∂spectralRoundingKernel n d x)
= ∫⁻ η, ∫⁻ t, ∫⁻ z, f z ∂torusRoundingKernel n d (shiftedSample x η t) ∂torusMeasure d ∂reflectionLaw n d
Proof (Lean source)
-- @node: spectralRoundingKernel_lintegral lemma spectralRoundingKernel_lintegral (n d : ℕ) (x : Covariates n d) (f : Signs n → ℝ≥0∞) (hf : Measurable f) : (∫⁻ z, f z ∂spectralRoundingKernel n d x) = ∫⁻ η, ∫⁻ t, ∫⁻ z, f z ∂torusRoundingKernel n d (shiftedSample x η t) ∂torusMeasure d ∂reflectionLaw n d := by letI : IsProbabilityMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw; infer_instance have hm : Measurable (spectralSigns x) := by fun_prop change (∫⁻ z, f z ∂(spectralSeedLaw n d).map (spectralSigns x)) = _ rw [lintegral_map hf hm] unfold spectralSeedLaw rw [lintegral_prod] rotate_left · exact (hf.comp hm).aemeasurable apply lintegral_congr intro η rw [lintegral_prod] rotate_left · exact ((hf.comp hm).comp (measurable_const.prodMk measurable_id)).aemeasurable apply lintegral_congr intro t exact (torusRoundingKernel_lintegral n d (shiftedSample x η t) f hf).symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralRoundingKernel_lintegral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralRisk.lean:74
theorem spectralRounding_loss_fourier

Exact Fourier loss representation for the spectral branch of the design. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
0 < d
m :
loss ⟨spectralRoundingKernel n d, spectralRoundingKernel_markov n d⟩ m.val
= ofReal (4 / (n : ℝ)) * ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2 * ∫⁻ w, ∫⁻ seeds, ofReal ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek k (w i)‖ ^ 2 ∂roundingSeedLaw n ∂Measure.pi (fun _ : Fin n => torusMeasure d)
Proof (Lean source)
-- @node: spectralRounding_loss_fourier lemma spectralRounding_loss_fourier (n d : ℕ) (hd : 0 < d) (m : CenteredL2Fn d) : loss ⟨spectralRoundingKernel n d, spectralRoundingKernel_markov n d⟩ m.val = ofReal (4 / (n : ℝ)) * ∑' k : Fin d → ℤ, ofReal ‖Fhat m.val k‖ ^ 2 * ∫⁻ w, ∫⁻ seeds, ofReal ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek k (w i)‖ ^ 2 ∂roundingSeedLaw n ∂Measure.pi (fun _ : Fin n => torusMeasure d) := by unfold loss congr 1 have hpoint (x : Covariates n d) := spectralRoundingKernel_lintegral n d x (fun z => ofReal ((∑ i, sgn (z i) * m.val (x i)) ^ 2)) (by fun_prop) simp_rw [hpoint] have hm : Measurable (fun p : (Covariates n d × (ReflectionCoins n d × Torus d)) × Signs n => ofReal |∑ i, sgn (p.2 i) * m.val (p.1.1 i)| ^ 2) := by have := m.property.1 fun_prop have hshift : Measurable (fun p : Covariates n d × (ReflectionCoins n d × Torus d) => shiftedSample p.1 p.2.1 p.2.2) := by unfold shiftedSample lift apply measurable_pi_lambda intro i apply measurable_pi_lambda intro j have hcoin : Measurable (fun p : Covariates n d × (ReflectionCoins n d × Torus d) => p.2.1 i j) := by fun_prop exact ((AddCircle.continuous_mk' (1 : ℝ)).measurable.comp (Measurable.ite (hcoin (measurableSet_singleton true)) (by fun_prop) (by fun_prop))).add (by fun_prop) let ρ := (torusRoundingKernel n d).comap (fun p : Covariates n d × (ReflectionCoins n d × Torus d) => shiftedSample p.1 p.2.1 p.2.2) hshift have hint : Measurable (fun p : Covariates n d × (ReflectionCoins n d × Torus d) => ∫⁻ z, ofReal |∑ i, sgn (z i) * m.val (p.1 i)| ^ 2 ∂torusRoundingKernel n d (shiftedSample p.1 p.2.1 p.2.2)) := hm.lintegral_kernel_prod_right' (κ := ρ) have hX : UniformDraw (covLaw n d) (id : Covariates n d → Covariates n d) := ⟨measurable_id, Measure.map_id⟩ have h := reflection_kernel_fourier_identity hd m (Covariates n d) (covLaw n d) id hX (torusRoundingKernel n d) simp only [id_eq] at h rw [lintegral_prod _ hint.aemeasurable] at h have hη (x : Covariates n d) := hint.comp (measurable_prodMk_left (x := x)) dsimp only [Function.comp_def] at hη have hassoc : (∫⁻ x, ∫⁻ η, ∫⁻ t, ∫⁻ z, ofReal ((∑ i, sgn (z i) * m.val (x i)) ^ 2) ∂torusRoundingKernel n d (shiftedSample x η t) ∂torusMeasure d ∂reflectionLaw n d ∂covLaw n d) = ∫⁻ x, ∫⁻ p : ReflectionCoins n d × Torus d, ∫⁻ z, ofReal |∑ i, sgn (z i) * m.val (x i)| ^ 2 ∂torusRoundingKernel n d (shiftedSample x p.1 p.2) ∂(reflectionLaw n d).prod (torusMeasure d) ∂covLaw n d := by apply lintegral_congr intro x rw [lintegral_prod] · simp only [← ENNReal.ofReal_pow (abs_nonneg _) 2, sq_abs] · exact (hη x).aemeasurable rw [hassoc, h] apply tsum_congr intro k congr 1 apply lintegral_congr intro w exact torusRoundingKernel_lintegral n d w _ (by fun_prop)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralRounding_loss_fourier · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/SpectralRisk.lean:100
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.UpperBound 26 declarations The single design is fair and outcome independent.

Spectral upper-bound proof subsystem

The single design is fair and outcome independent. The scalar spectral estimate converts its frequencywise minimum bound into the simultaneous fractional rate; the Fourier-row assembly and both design branches have proved risk bounds.

theorem piStar_designClass

The spectral construction is an admissible design for every sample size and dimension.

Formal statement
n d :
ℕ
Proof (Lean source)
-- @node: piStar_designClass lemma piStar_designClass (n d : ℕ) : DesignClass n d (piStar n d) := by refine ⟨Filter.Eventually.of_forall (piStar_pointwise_fair n d), ?_⟩ exact outcomeIndependent_of_covariate_kernel (piStar n d)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.piStar_designClass · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:21
theorem spectral_min_one_le_rpow Lemma spectral_min_one_le_rpow in the paper ↗

A truncated linear weight is bounded by every fractional power through exponent one. Under the stated conditions, the asserted mathematical result follows.

Formal statement
x s :
ℝ
hx :
0 ≤ x
hs :
0 ≤ s
hs1 :
s ≤ 1
min 1 x ≤ x ^ s
Proof (Lean source)
-- @node: spectral_min_one_le_rpow lemma spectral_min_one_le_rpow {x s : ℝ} (hx : 0 ≤ x) (hs : 0 ≤ s) (hs1 : s ≤ 1) : min 1 x ≤ x ^ s := by by_cases hx1 : x ≤ 1 · rw [min_eq_right hx1] simpa only [Real.rpow_one] using (Real.rpow_le_rpow_of_exponent_ge' hx hx1 hs hs1) · rw [min_eq_left (le_of_not_ge hx1)] exact Real.one_le_rpow (le_of_not_ge hx1) hs
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_min_one_le_rpow · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:27
theorem spectral_min_rate_weight Lemma spectral_min_rate_weight in the paper ↗

The frequencywise minimum is dominated by the pooled Sobolev weight times the minimum rate, including the endpoint exponent one. Under the stated conditions.

Formal statement
r u q s :
ℝ
hr :
0 ≤ r
hu :
0 ≤ u
huq :
u ≤ q
hq :
1 ≤ q
hs :
0 ≤ s
hs1 :
s ≤ 1
min 1 (r * u) ≤ min 1 (r ^ s) * q ^ s
Proof (Lean source)
-- @node: spectral_min_rate_weight lemma spectral_min_rate_weight {r u q s : ℝ} (hr : 0 ≤ r) (hu : 0 ≤ u) (huq : u ≤ q) (hq : 1 ≤ q) (hs : 0 ≤ s) (hs1 : s ≤ 1) : min 1 (r * u) ≤ min 1 (r ^ s) * q ^ s := by have hqpow : 1 ≤ q ^ s := Real.one_le_rpow hq hs have hfrac : min 1 (r * u) ≤ r ^ s * q ^ s := by calc min 1 (r * u) ≤ (r * u) ^ s := spectral_min_one_le_rpow (mul_nonneg hr hu) hs hs1 _ = r ^ s * u ^ s := Real.mul_rpow hr hu _ ≤ r ^ s * q ^ s := mul_le_mul_of_nonneg_left (Real.rpow_le_rpow hu huq hs) (Real.rpow_nonneg hr s) by_cases hrpow : r ^ s ≤ 1 · simpa only [min_eq_right hrpow] using hfrac · rw [min_eq_left (le_of_not_ge hrpow), one_mul] exact (min_le_left _ _).trans hqpow
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_min_rate_weight · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:38

Odd feature rows are the normalized real parts of the indexed characters. The asserted mathematical result follows.

Formal statement
d j :
ℕ
y :
features d (2 * j + 1) y = sqrt 2 * (ek (featureFrequency d j) y).re
Proof (Lean source)
-- @node: features_odd_eq_re lemma features_odd_eq_re (d j : ℕ) (y : Torus d) : features d (2 * j + 1) y = sqrt 2 * (ek (featureFrequency d j) y).re := by have hsub : 2 * j + 1 - 1 = 2 * j := by omega have hdiv : 2 * j / 2 = j := by omega have hmod : 2 * j % 2 = 0 := by omega simp only [features, hsub, hdiv, hmod, ite_true]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.features_odd_eq_re · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:57

Even feature rows are the normalized imaginary parts of the same indexed characters.

Formal statement
d j :
ℕ
y :
features d (2 * j + 2) y = sqrt 2 * (ek (featureFrequency d j) y).im
Proof (Lean source)
-- @node: features_even_eq_im lemma features_even_eq_im (d j : ℕ) (y : Torus d) : features d (2 * j + 2) y = sqrt 2 * (ek (featureFrequency d j) y).im := by have hsub : 2 * j + 2 - 1 = 2 * j + 1 := by omega have hdiv : (2 * j + 1) / 2 = j := by omega have hmod : (2 * j + 1) % 2 = 1 := by omega simp only [features, hsub, hdiv, hmod, Nat.one_ne_zero, if_false]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.features_even_eq_im · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:66
theorem character_imbalance_eq_real_rows Lemma character_imbalance_eq_real_rows in the paper ↗

The squared character imbalance is exactly half the sum of its two real-row squares, for every deterministic sample and every real coefficient vector.

Formal statement
n d j :
ℕ
w :
Fin n → Torus d
a :
Fin n → ℝ
‖∑ i, (a i : ℂ) * ek (featureFrequency d j) (w i)‖ ^ 2
= ((∑ i, a i * features d (2 * j + 1) (w i)) ^ 2 + (∑ i, a i * features d (2 * j + 2) (w i)) ^ 2) / 2
Proof (Lean source)
-- @node: character_imbalance_eq_real_rows lemma character_imbalance_eq_real_rows (n d j : ℕ) (w : Fin n → Torus d) (a : Fin n → ℝ) : ‖∑ i, (a i : ℂ) * ek (featureFrequency d j) (w i)‖ ^ 2 = ((∑ i, a i * features d (2 * j + 1) (w i)) ^ 2 + (∑ i, a i * features d (2 * j + 2) (w i)) ^ 2) / 2 := by let z : ℂ := ∑ i, (a i : ℂ) * ek (featureFrequency d j) (w i) have hre : ∑ i, a i * features d (2 * j + 1) (w i) = sqrt 2 * z.re := by simp only [features_odd_eq_re, z, Complex.re_sum, Complex.mul_re, Complex.ofReal_re, Complex.ofReal_im, zero_mul, sub_zero, Finset.mul_sum] apply Finset.sum_congr rfl intro i _ ring have him : ∑ i, a i * features d (2 * j + 2) (w i) = sqrt 2 * z.im := by simp only [features_even_eq_im, z, Complex.im_sum, Complex.mul_im, Complex.ofReal_re, Complex.ofReal_im, zero_mul, add_zero, Finset.mul_sum] apply Finset.sum_congr rfl intro i _ ring rw [hre, him] change ‖z‖ ^ 2 = _ rw [Complex.sq_norm, Complex.normSq_apply] have hsqrt : (sqrt 2) ^ 2 = 2 := Real.sq_sqrt (by norm_num) nlinarith [hsqrt]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.character_imbalance_eq_real_rows · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:75
theorem spectral_min_rate_angular Lemma spectral_min_rate_angular in the paper ↗

The scalar rate bound applies to the precise angular Sobolev normalization. Under the stated conditions, the asserted mathematical result follows.

Formal statement
r u s :
ℝ
hr :
0 ≤ r
hu :
0 ≤ u
hs :
0 ≤ s
hs1 :
s ≤ 1
min 1 (r * u) ≤ min 1 (r ^ s) * (1 + pi ^ 2 * u) ^ s
Proof (Lean source)
-- @node: spectral_min_rate_angular lemma spectral_min_rate_angular {r u s : ℝ} (hr : 0 ≤ r) (hu : 0 ≤ u) (hs : 0 ≤ s) (hs1 : s ≤ 1) : min 1 (r * u) ≤ min 1 (r ^ s) * (1 + pi ^ 2 * u) ^ s := by have hpi : 1 ≤ pi ^ 2 := by nlinarith [Real.pi_gt_three] apply spectral_min_rate_weight hr hu _ _ hs hs1 · nlinarith [mul_nonneg (sub_nonneg.mpr hpi) hu] · nlinarith [mul_nonneg (sq_nonneg pi) hu]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_min_rate_angular · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:102
theorem sobolev_truncated_spectral_sum_le_scale

The exact pooled budget controls the entire truncated spectral sum at the minimum rate, without a frequency-scale sum or logarithmic loss. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
2 ≤ d
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
m :
hm :
(∑' k : Fin d → ℤ, if 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 then ofReal (‖Fhat m.val k‖ ^ 2 * min 1 (((pairCount d : ℝ) / n) * frequencyComplexity k)) else 0)
≤ ofReal (aScale n d s)
Proof (Lean source)
-- @node: sobolev_truncated_spectral_sum_le_scale lemma sobolev_truncated_spectral_sum_le_scale (n d : ℕ) (hd : 2 ≤ d) (s : ℝ) (hs : 0 < s) (hs1 : s ≤ 1) (m : CenteredL2Fn d) (hm : SobolevClass d s m) : (∑' k : Fin d → ℤ, if 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 then ofReal (‖Fhat m.val k‖ ^ 2 * min 1 (((pairCount d : ℝ) / n) * frequencyComplexity k)) else 0) ≤ ofReal (aScale n d s) := by classical have hr : 0 ≤ (pairCount d : ℝ) / n := by positivity have ha : 0 ≤ aScale n d s := le_min zero_le_one (Real.rpow_nonneg hr s) have hpoint (k : Fin d → ℤ) : (if 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 then ofReal (‖Fhat m.val k‖ ^ 2 * min 1 (((pairCount d : ℝ) / n) * frequencyComplexity k)) else 0) ≤ ofReal (aScale n d s) * (if 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 then ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat m.val k‖ ^ 2) else 0) := by by_cases hk : 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 · rw [if_pos hk, if_pos hk, ← ENNReal.ofReal_mul ha] apply ENNReal.ofReal_le_ofReal have hu : 0 ≤ frequencyComplexity k := by unfold frequencyComplexity frequencySq positivity have hscalar := spectral_min_rate_angular hr hu hs.le hs1 have hmul := mul_le_mul_of_nonneg_left hscalar (sq_nonneg ‖Fhat m.val k‖) simpa only [aScale, mul_comm, mul_left_comm, mul_assoc] using hmul · simp only [if_neg hk, mul_zero, le_refl] calc _ ≤ ∑' k : Fin d → ℤ, ofReal (aScale n d s) * (if 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 then ofReal ((1 + pi ^ 2 * frequencyComplexity k) ^ s * ‖Fhat m.val k‖ ^ 2) else 0) := ENNReal.tsum_le_tsum hpoint _ = ofReal (aScale n d s) * reflectedBudget s m.val := ENNReal.tsum_mul_left _ ≤ ofReal (aScale n d s) * 1 := by gcongr exact (exact_reflection_budget.2 d s hd hs hs1 m hm).2.2.1 _ = ofReal (aScale n d s) := mul_one _
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.sobolev_truncated_spectral_sum_le_scale · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:112
theorem spectral_rounding_sign_memLp

Every terminal spectral sign has a finite second moment under the rounding seeds. The asserted mathematical result follows.

Formal statement
n d :
ℕ
w :
Fin n → Torus d
i :
Fin n
MemLp (fun seeds => sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) 2 (roundingSeedLaw n)
Proof (Lean source)
-- @node: spectral_rounding_sign_memLp lemma spectral_rounding_sign_memLp (n d : ℕ) (w : Fin n → Torus d) (i : Fin n) : MemLp (fun seeds => sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) 2 (roundingSeedLaw n) := by have : IsFiniteMeasure (roundingSeedLaw n) := by unfold roundingSeedLaw cubeMeasure infer_instance have hm : Measurable (fun seeds => orderedBoundaryRounding n (spectralRows w) seeds) := (orderedBoundaryRounding_measurable n).comp (measurable_const.prodMk measurable_id) have hs : Measurable (fun seeds => sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) := by fun_prop apply MeasureTheory.MemLp.of_bound hs.aestronglyMeasurable 1 filter_upwards [] with seeds cases orderedBoundaryRounding n (spectralRows w) seeds i <;> norm_num [sgn]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_rounding_sign_memLp · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:157
theorem spectral_rounding_row_sq_integrable

The square of any deterministic test row is integrable under the actual spectral rounding.

Formal statement
n d :
ℕ
w :
Fin n → Torus d
a :
Fin n → ℝ
Integrable (fun seeds => (∑ i, a i * sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) ^ 2) (roundingSeedLaw n)
Proof (Lean source)
-- @node: spectral_rounding_row_sq_integrable lemma spectral_rounding_row_sq_integrable (n d : ℕ) (w : Fin n → Torus d) (a : Fin n → ℝ) : Integrable (fun seeds => (∑ i, a i * sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) ^ 2) (roundingSeedLaw n) := by have h : MemLp (fun seeds => ∑ i, a i * sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) 2 (roundingSeedLaw n) := MeasureTheory.memLp_finsetSum _ (fun i _ => (spectral_rounding_sign_memLp n d w i).const_mul (a i)) exact h.integrable_sq
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_rounding_row_sq_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:174
theorem spectral_rounding_row_second_moment

The proved ordered-rounding theorem controls each actual spectral test row, including rows beyond the supplied prefix. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d h :
ℕ
w :
Fin n → Torus d
hh :
1 ≤ h
(∫ seeds, (∑ i, features d h (w i) * sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) ^ 2 ∂roundingSeedLaw n)
≤ 64 * (min h n : ℕ)
Proof (Lean source)
-- @node: spectral_rounding_row_second_moment lemma spectral_rounding_row_second_moment (n d h : ℕ) (w : Fin n → Torus d) (hh : 1 ≤ h) : (∫ seeds, (∑ i, features d h (w i) * sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) ^ 2 ∂roundingSeedLaw n) ≤ 64 * (min h n : ℕ) := by have hb := (ordered_prefix_rounding n (fun h i => features d h (w i)) (sqrt 2) (fun h i _ => features_abs_le d h (w i))).2.2.2 h hh have hp : rowPrefix (n := n) (fun h i => features d h (w i)) = spectralRows w := rfl rw [hp] at hb simpa only [Real.sq_sqrt (by norm_num : (0 : ℝ) ≤ 2), show (32 : ℝ) * 2 = 64 by norm_num] using hb
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_rounding_row_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:188
theorem spectral_rounding_character_second_moment

A character inherits the average of its two real-row moment bounds. The asserted mathematical result follows.

Formal statement
n d j :
ℕ
w :
Fin n → Torus d
(∫ seeds, ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek (featureFrequency d j) (w i)‖ ^ 2 ∂roundingSeedLaw n)
≤ 64 * (min (2 * j + 2) n : ℕ)
Proof (Lean source)
-- @node: spectral_rounding_character_second_moment lemma spectral_rounding_character_second_moment (n d j : ℕ) (w : Fin n → Torus d) : (∫ seeds, ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek (featureFrequency d j) (w i)‖ ^ 2 ∂roundingSeedLaw n) ≤ 64 * (min (2 * j + 2) n : ℕ) := by have hodd := spectral_rounding_row_second_moment n d (2 * j + 1) w (by omega) have heven := spectral_rounding_row_second_moment n d (2 * j + 2) w (by omega) have hi₁ := spectral_rounding_row_sq_integrable n d w (fun i => features d (2 * j + 1) (w i)) have hi₂ := spectral_rounding_row_sq_integrable n d w (fun i => features d (2 * j + 2) (w i)) have heq : (∫ seeds, ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek (featureFrequency d j) (w i)‖ ^ 2 ∂roundingSeedLaw n) = ((∫ seeds, (∑ i, features d (2 * j + 1) (w i) * sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) ^ 2 ∂roundingSeedLaw n) + (∫ seeds, (∑ i, features d (2 * j + 2) (w i) * sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) ^ 2 ∂roundingSeedLaw n)) / 2 := by calc _ = ∫ seeds, ((∑ i, features d (2 * j + 1) (w i) * sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) ^ 2 + (∑ i, features d (2 * j + 2) (w i) * sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) ^ 2) / 2 ∂roundingSeedLaw n := by apply MeasureTheory.integral_congr_ae filter_upwards [] with seeds simpa only [mul_comm] using character_imbalance_eq_real_rows n d j w (fun i => sgn (orderedBoundaryRounding n (spectralRows w) seeds i)) _ = _ := by integral_linearity rw [heq] have hmin : ((min (2 * j + 1) n : ℕ) : ℝ) ≤ (min (2 * j + 2) n : ℕ) := by exact_mod_cast min_le_min_right n (by omega : 2 * j + 1 ≤ 2 * j + 2) linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_rounding_character_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:203
theorem character_imbalance_neg_eq Lemma character_imbalance_neg_eq in the paper ↗

Real signs make the imbalances at opposite frequencies complex conjugates, so their squared moduli coincide pointwise.

Formal statement
n d :
ℕ
k :
Fin d → ℤ
w :
Fin n → Torus d
a :
Fin n → ℝ
‖∑ i, (a i : ℂ) * ek (-k) (w i)‖ ^ 2 = ‖∑ i, (a i : ℂ) * ek k (w i)‖ ^ 2
Proof (Lean source)
-- @node: character_imbalance_neg_eq lemma character_imbalance_neg_eq (n d : ℕ) (k : Fin d → ℤ) (w : Fin n → Torus d) (a : Fin n → ℝ) : ‖∑ i, (a i : ℂ) * ek (-k) (w i)‖ ^ 2 = ‖∑ i, (a i : ℂ) * ek k (w i)‖ ^ 2 := by have heq : (∑ i, (a i : ℂ) * ek (-k) (w i)) = star (∑ i, (a i : ℂ) * ek k (w i)) := by simp only [ek, UnitAddTorus.mFourier_neg, map_sum, map_mul, Complex.conj_ofReal, RCLike.star_def] rw [heq, norm_star]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.character_imbalance_neg_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:239
theorem spectral_rounding_neg_character_second_moment

The same ordered-row moment estimate holds for the other member of each conjugate frequency pair.

Formal statement
n d j :
ℕ
w :
Fin n → Torus d
(∫ seeds, ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek (-featureFrequency d j) (w i)‖ ^ 2 ∂roundingSeedLaw n)
≤ 64 * (min (2 * j + 2) n : ℕ)
Proof (Lean source)
-- @node: spectral_rounding_neg_character_second_moment lemma spectral_rounding_neg_character_second_moment (n d j : ℕ) (w : Fin n → Torus d) : (∫ seeds, ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek (-featureFrequency d j) (w i)‖ ^ 2 ∂roundingSeedLaw n) ≤ 64 * (min (2 * j + 2) n : ℕ) := by simp_rw [character_imbalance_neg_eq] exact spectral_rounding_character_second_moment n d j w
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_rounding_neg_character_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:252
theorem spectral_rounding_character_sq_integrable

Character squared imbalance is integrable, by its exact real-row decomposition.

Formal statement
n d j :
ℕ
w :
Fin n → Torus d
Integrable (fun seeds => ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek (featureFrequency d j) (w i)‖ ^ 2) (roundingSeedLaw n)
Proof (Lean source)
-- @node: spectral_rounding_character_sq_integrable lemma spectral_rounding_character_sq_integrable (n d j : ℕ) (w : Fin n → Torus d) : Integrable (fun seeds => ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek (featureFrequency d j) (w i)‖ ^ 2) (roundingSeedLaw n) := by have hi₁ := spectral_rounding_row_sq_integrable n d w (fun i => features d (2 * j + 1) (w i)) have hi₂ := spectral_rounding_row_sq_integrable n d w (fun i => features d (2 * j + 2) (w i)) apply (hi₁.add hi₂).div_const 2 |>.congr filter_upwards [] with seeds simpa only [Pi.add_apply, mul_comm] using (character_imbalance_eq_real_rows n d j w (fun i => sgn (orderedBoundaryRounding n (spectralRows w) seeds i))).symm
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_rounding_character_sq_integrable · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:263
theorem spectral_rounding_character_lintegral_le

The conditional character bound in the nonnegative integral form needed for Tonelli and the reflected Fourier loss identity.

Formal statement
n d j :
ℕ
w :
Fin n → Torus d
(∫⁻ seeds, ofReal (‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek (featureFrequency d j) (w i)‖ ^ 2) ∂roundingSeedLaw n)
≤ ofReal (64 * (min (2 * j + 2) n : ℕ))
Proof (Lean source)
-- @node: spectral_rounding_character_lintegral_le lemma spectral_rounding_character_lintegral_le (n d j : ℕ) (w : Fin n → Torus d) : (∫⁻ seeds, ofReal (‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek (featureFrequency d j) (w i)‖ ^ 2) ∂roundingSeedLaw n) ≤ ofReal (64 * (min (2 * j + 2) n : ℕ)) := by rw [← MeasureTheory.ofReal_integral_eq_lintegral_ofReal (spectral_rounding_character_sq_integrable n d j w) (Filter.Eventually.of_forall (fun _ => sq_nonneg _))] exact ENNReal.ofReal_le_ofReal (spectral_rounding_character_second_moment n d j w)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_rounding_character_lintegral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:280
theorem spectral_rounding_character_min_bound

The explicit frequency count converts the indexed rounding bound to its spectral minimum. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d i :
ℕ
hd :
2 ≤ d
w :
Fin n → Torus d
(∫ seeds, ‖∑ j, (sgn (orderedBoundaryRounding n (spectralRows w) seeds j) : ℂ) * ek (featureFrequency d i) (w j)‖ ^ 2 ∂roundingSeedLaw n)
≤ 768 * min (n : ℝ) ((pairCount d : ℝ) * frequencyComplexity (featureFrequency d i))
Proof (Lean source)
-- @node: spectral_rounding_character_min_bound lemma spectral_rounding_character_min_bound (n d i : ℕ) (hd : 2 ≤ d) (w : Fin n → Torus d) : (∫ seeds, ‖∑ j, (sgn (orderedBoundaryRounding n (spectralRows w) seeds j) : ℂ) * ek (featureFrequency d i) (w j)‖ ^ 2 ∂roundingSeedLaw n) ≤ 768 * min (n : ℝ) ((pairCount d : ℝ) * frequencyComplexity (featureFrequency d i)) := by have hmoment := spectral_rounding_character_second_moment n d i w have hindex := featureFrequency_real_rows_le_complexity (i := i) hd have hmidx : ((min (2 * i + 2) n : ℕ) : ℝ) ≤ (2 * i + 2 : ℝ) := by exact_mod_cast min_le_left (2 * i + 2) n have hmn : ((min (2 * i + 2) n : ℕ) : ℝ) ≤ n := by exact_mod_cast min_le_right (2 * i + 2) n by_cases hb : (pairCount d : ℝ) * frequencyComplexity (featureFrequency d i) ≤ n · rw [min_eq_right hb] linarith · rw [min_eq_left (le_of_not_ge hb)] have hn : (0 : ℝ) ≤ n := by positivity linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_rounding_character_min_bound · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:294
theorem spectral_rounding_supported_second_moment

Every nonzero frequency of support one or two obeys the same conditional minimum bound, regardless of its conjugate orientation. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
2 ≤ d
k :
Fin d → ℤ
hk :
1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2
w :
Fin n → Torus d
(∫ seeds, ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek k (w i)‖ ^ 2 ∂roundingSeedLaw n)
≤ 768 * min (n : ℝ) ((pairCount d : ℝ) * frequencyComplexity k)
Proof (Lean source)
-- @node: spectral_rounding_supported_second_moment lemma spectral_rounding_supported_second_moment (n d : ℕ) (hd : 2 ≤ d) (k : Fin d → ℤ) (hk : 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2) (w : Fin n → Torus d) : (∫ seeds, ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek k (w i)‖ ^ 2 ∂roundingSeedLaw n) ≤ 768 * min (n : ℝ) ((pairCount d : ℝ) * frequencyComplexity k) := by rcases supported_frequency_eq_feature_or_neg hd k hk with ⟨j, rfl | rfl⟩ · exact spectral_rounding_character_min_bound n d j hd w · simp_rw [character_imbalance_neg_eq, frequencyComplexity_neg] exact spectral_rounding_character_min_bound n d j hd w
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_rounding_supported_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:315
theorem spectral_rounding_supported_lintegral_le

The supported conditional character estimate in the nonnegative integral form for Tonelli. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
2 ≤ d
k :
Fin d → ℤ
hk :
1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2
w :
Fin n → Torus d
(∫⁻ seeds, ofReal (‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek k (w i)‖ ^ 2) ∂roundingSeedLaw n)
≤ ofReal (768 * min (n : ℝ) ((pairCount d : ℝ) * frequencyComplexity k))
Proof (Lean source)
-- @node: spectral_rounding_supported_lintegral_le lemma spectral_rounding_supported_lintegral_le (n d : ℕ) (hd : 2 ≤ d) (k : Fin d → ℤ) (hk : 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2) (w : Fin n → Torus d) : (∫⁻ seeds, ofReal (‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek k (w i)‖ ^ 2) ∂roundingSeedLaw n) ≤ ofReal (768 * min (n : ℝ) ((pairCount d : ℝ) * frequencyComplexity k)) := by have hi : Integrable (fun seeds => ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek k (w i)‖ ^ 2) (roundingSeedLaw n) := by rcases supported_frequency_eq_feature_or_neg hd k hk with ⟨j, rfl | rfl⟩ · exact spectral_rounding_character_sq_integrable n d j w · simp_rw [character_imbalance_neg_eq] exact spectral_rounding_character_sq_integrable n d j w rw [← MeasureTheory.ofReal_integral_eq_lintegral_ofReal hi (Filter.Eventually.of_forall (fun _ => sq_nonneg _))] exact ENNReal.ofReal_le_ofReal (spectral_rounding_supported_second_moment n d hd k hk w)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_rounding_supported_lintegral_le · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:330
theorem spectral_min_loss_normalization

Scaling the conditional minimum gives the normalized loss weight exactly. Under the stated conditions.

Formal statement
n :
ℕ
hn :
0 < n
v :
ℝ
(4 / (n : ℝ)) * (768 * min (n : ℝ) v) = CUpper * min 1 (v / n)
Proof (Lean source)
-- @node: spectral_min_loss_normalization lemma spectral_min_loss_normalization {n : ℕ} (hn : 0 < n) (v : ℝ) : (4 / (n : ℝ)) * (768 * min (n : ℝ) v) = CUpper * min 1 (v / n) := by have hnR : (0 : ℝ) < n := by exact_mod_cast hn by_cases hv : v ≤ n · rw [min_eq_right hv, min_eq_right ((div_le_one hnR).mpr hv)] unfold CUpper field_simp <;> ring · rw [min_eq_left (le_of_not_ge hv), min_eq_left ((one_le_div hnR).mpr (le_of_not_ge hv))] unfold CUpper field_simp <;> ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_min_loss_normalization · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:351
theorem sobolev_Fhat_eq_zero_outside_support

Fourier coefficients outside the nonzero order-two support vanish. Under the stated conditions.

Formal statement
d :
ℕ
s :
ℝ
hd :
2 ≤ d
hs :
0 < s
hs1 :
s ≤ 1
m :
hm :
k :
Fin d → ℤ
hk :
¬ (1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2)
Fhat m.val k = 0
Proof (Lean source)
-- @node: sobolev_Fhat_eq_zero_outside_support lemma sobolev_Fhat_eq_zero_outside_support {d : ℕ} {s : ℝ} (hd : 2 ≤ d) (hs : 0 < s) (hs1 : s ≤ 1) (m : CenteredL2Fn d) (hm : SobolevClass d s m) (k : Fin d → ℤ) (hk : ¬ (1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2)) : Fhat m.val k = 0 := by have hbudget := exact_reflection_budget.2 d s hd hs hs1 m hm by_cases hc : (frequencySupport k).card = 0 · have he : frequencySupport k = ∅ := Finset.card_eq_zero.mp hc have hk0 : k = 0 := by ext j have hj : j ∉ frequencySupport k := by rw [he]; simp simpa [frequencySupport] using hj rw [hk0] exact hbudget.1 · exact hbudget.2.1 k (by omega)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.sobolev_Fhat_eq_zero_outside_support · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:368
theorem spectralRounding_loss_le_truncated

The original spectral branch obeys the truncated Fourier risk estimate. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
m :
hm :
conclusion 1
loss ⟨spectralRoundingKernel n d, spectralRoundingKernel_markov n d⟩ m.val
≤ ofReal CUpper * ∑' k : Fin d → ℤ, if 1 ≤ (frequencySupport k).card
conclusion 2
≤ 2 then ofReal (‖Fhat m.val k‖ ^ 2 * min 1 (((pairCount d : ℝ) / n) * frequencyComplexity k)) else 0
Proof (Lean source)
-- @node: spectralRounding_loss_le_truncated lemma spectralRounding_loss_le_truncated (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (s : ℝ) (hs : 0 < s) (hs1 : s ≤ 1) (m : CenteredL2Fn d) (hm : SobolevClass d s m) : loss ⟨spectralRoundingKernel n d, spectralRoundingKernel_markov n d⟩ m.val ≤ ofReal CUpper * ∑' k : Fin d → ℤ, if 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 then ofReal (‖Fhat m.val k‖ ^ 2 * min 1 (((pairCount d : ℝ) / n) * frequencyComplexity k)) else 0 := by classical rw [spectralRounding_loss_fourier n d (by omega) m, ← ENNReal.tsum_mul_left, ← ENNReal.tsum_mul_left] apply ENNReal.tsum_le_tsum intro k by_cases hk : 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 · rw [if_pos hk] have hmoment : (∫⁻ w, ∫⁻ seeds, ofReal ‖∑ i, (sgn (orderedBoundaryRounding n (spectralRows w) seeds i) : ℂ) * ek k (w i)‖ ^ 2 ∂roundingSeedLaw n ∂Measure.pi (fun _ : Fin n => torusMeasure d)) ≤ ofReal (768 * min (n : ℝ) ((pairCount d : ℝ) * frequencyComplexity k)) := by calc _ ≤ ∫⁻ _w : Fin n → Torus d, ofReal (768 * min (n : ℝ) ((pairCount d : ℝ) * frequencyComplexity k)) ∂Measure.pi (fun _ : Fin n => torusMeasure d) := by apply lintegral_mono intro w simpa only [← ENNReal.ofReal_pow (norm_nonneg _) 2] using spectral_rounding_supported_lintegral_le n d hd k hk w _ = _ := by simp calc _ ≤ ofReal (4 / (n : ℝ)) * (ofReal ‖Fhat m.val k‖ ^ 2 * ofReal (768 * min (n : ℝ) ((pairCount d : ℝ) * frequencyComplexity k))) := by gcongr _ = _ := by rw [← ENNReal.ofReal_pow (norm_nonneg _) 2, ← ENNReal.ofReal_mul (sq_nonneg _), ← ENNReal.ofReal_mul (by positivity), ← ENNReal.ofReal_mul (by norm_num [CUpper])] congr 1 have hnorm := spectral_min_loss_normalization (n := n) (by omega) ((pairCount d : ℝ) * frequencyComplexity k) have hdiv : ((pairCount d : ℝ) * frequencyComplexity k) / n = ((pairCount d : ℝ) / n) * frequencyComplexity k := by ring rw [hdiv] at hnorm nlinarith [hnorm] · rw [if_neg hk, sobolev_Fhat_eq_zero_outside_support hd hs hs1 m hm k hk] simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectralRounding_loss_le_truncated · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:386
theorem fairSigns_real_second_moment

Independent fair signs cancel the real-valued off-diagonal terms. The asserted mathematical result follows.

Formal statement
n :
ℕ
a :
Fin n → ℝ
(∫ z, (∑ i, sgn (z i) * a i) ^ 2 ∂fairSigns n) = ∑ i, a i ^ 2
Proof (Lean source)
-- @node: fairSigns_real_second_moment lemma fairSigns_real_second_moment (n : ℕ) (a : Fin n → ℝ) : (∫ z, (∑ i, sgn (z i) * a i) ^ 2 ∂fairSigns n) = ∑ i, a i ^ 2 := by classical letI := fairSigns_probability n simp_rw [pow_two, Finset.sum_mul, Finset.mul_sum] rw [integral_finsetSum _ (fun _ _ => Integrable.of_finite)] apply Finset.sum_congr rfl intro i _ rw [integral_finsetSum _ (fun _ _ => Integrable.of_finite)] rw [Finset.sum_eq_single i] · have hdiag (z : Signs n) : sgn (z i) * a i * (sgn (z i) * a i) = a i * a i := by cases z i <;> simp [sgn] simp_rw [hdiag] simp · intro j _ hij have hprod (z : Signs n) : sgn (z i) * a i * (sgn (z j) * a j) = sgn (z i) * sgn (z j) * (a i * a j) := by ring simp_rw [hprod] rw [integral_mul_const, fairSigns_distinct_product_mean_zero n i j (Ne.symm hij), zero_mul] · simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSigns_real_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:434
theorem fairSignKernel_loss_eq

The independent-sign branch's loss is exactly four times the cube second moment. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d :
ℕ
hn :
0 < n
m :
loss (fairSignKernel n d) m.val
= ofReal 4 * ∫⁻ x, ofReal (m.val x ^ 2) ∂cubeMeasure d
Proof (Lean source)
-- @node: fairSignKernel_loss_eq lemma fairSignKernel_loss_eq (n d : ℕ) (hn : 0 < n) (m : CenteredL2Fn d) : loss (fairSignKernel n d) m.val = ofReal 4 * ∫⁻ x, ofReal (m.val x ^ 2) ∂cubeMeasure d := by classical letI := fairSigns_probability n have hm := m.property.1 have hpoint (x : Covariates n d) : (∫⁻ z, ofReal ((∑ i, sgn (z i) * m.val (x i)) ^ 2) ∂fairSigns n) = ∑ i, ofReal (m.val (x i) ^ 2) := by rw [← ofReal_integral_eq_lintegral_ofReal (Integrable.of_finite) (Filter.Eventually.of_forall (fun _ => sq_nonneg _)), fairSigns_real_second_moment, ENNReal.ofReal_sum_of_nonneg (fun _ _ => sq_nonneg _)] unfold loss simp only [fairSignKernel, Kernel.const_apply, hpoint] rw [lintegral_finsetSum _ (fun i _ => (by fun_prop : Measurable (fun x : Covariates n d => ofReal (m.val (x i) ^ 2))))] have heval (i : Fin n) : (∫⁻ x, ofReal (m.val (x i) ^ 2) ∂covLaw n d) = ∫⁻ x, ofReal (m.val x ^ 2) ∂cubeMeasure d := by have hpres := measurePreserving_eval (fun _ : Fin n => cubeMeasure d) i exact hpres.lintegral_comp (by fun_prop : Measurable (fun x : Cube d => ofReal (m.val x ^ 2))) simp_rw [heval] simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] rw [← mul_assoc, ← ENNReal.ofReal_natCast, ← ENNReal.ofReal_mul (by positivity)] have hnR : (n : ℝ) ≠ 0 := by exact_mod_cast Nat.ne_of_gt hn rw [div_mul_cancel₀ 4 hnR]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSignKernel_loss_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:457
theorem fairSignKernel_loss_le_four

The cube Sobolev budget bounds independent-sign loss by four. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
m :
hm :
loss (fairSignKernel n d) m.val ≤ ofReal 4
Proof (Lean source)
-- @node: fairSignKernel_loss_le_four lemma fairSignKernel_loss_le_four (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (s : ℝ) (hs : 0 < s) (hs1 : s ≤ 1) (m : CenteredL2Fn d) (hm : SobolevClass d s m) : loss (fairSignKernel n d) m.val ≤ ofReal 4 := by rw [fairSignKernel_loss_eq n d (by omega) m] have hi : Integrable (fun x => m.val x ^ 2) (cubeMeasure d) := (memLp_two_iff_integrable_sq m.property.1.aestronglyMeasurable).mp m.property.2.1 rw [← ofReal_integral_eq_lintegral_ofReal hi (Filter.Eventually.of_forall (fun _ => sq_nonneg _))] calc _ ≤ ofReal 4 * ofReal 1 := by gcongr exact sobolev_cube_second_moment_le_one hd hs hs1 m hm _ = _ := by simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSignKernel_loss_le_four · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:487
theorem spectral_design_upper

The concrete spectral design is fair, outcome independent, and has the stated upper risk. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
conclusion 1
conclusion 2
s :
ℝ
0 < s
s ≤ 1
worstLoss (piStar n d) s ≤ ofReal (CUpper * aScale n d s)
Proof (Lean source)
-- @node: spectral_design_upper lemma spectral_design_upper (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) : DesignClass n d (piStar n d) ∧ ∀ s : ℝ, 0 < s → s ≤ 1 → worstLoss (piStar n d) s ≤ ofReal (CUpper * aScale n d s) := by refine ⟨piStar_designClass n d, ?_⟩ intro s hs hs1 unfold worstLoss refine iSup_le fun m => ?_ by_cases hb : n ≤ pairCount d · have hnR : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) have ha : aScale n d s = 1 := by unfold aScale apply min_eq_left apply Real.one_le_rpow _ hs.le apply (one_le_div hnR).mpr exact_mod_cast hb rw [ha, mul_one] have hfour := fairSignKernel_loss_le_four n d hn hd s hs hs1 m.val m.property simpa only [piStar, if_pos hb] using hfour.trans (ENNReal.ofReal_le_ofReal (by norm_num [CUpper])) · let S : ℝ≥0∞ := ∑' k : Fin d → ℤ, if 1 ≤ (frequencySupport k).card ∧ (frequencySupport k).card ≤ 2 then ofReal (‖Fhat m.val.val k‖ ^ 2 * min 1 (((pairCount d : ℝ) / n) * frequencyComplexity k)) else 0 calc loss (piStar n d) m.val.val ≤ ofReal CUpper * S := by simpa only [piStar, if_neg hb] using spectralRounding_loss_le_truncated n d hn hd s hs hs1 m.val m.property _ ≤ ofReal CUpper * ofReal (aScale n d s) := by gcongr exact sobolev_truncated_spectral_sum_le_scale n d hd s hs hs1 m.val m.property _ = ofReal (CUpper * aScale n d s) := by rw [ENNReal.ofReal_mul (by norm_num [CUpper])]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.spectral_design_upper · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/UpperBound.lean:504
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.Helpers.Vanishing 2 declarations The binomial-ratio and square-root dimension criteria include arbitrary oscillating sequences.

Vanishing comparison-scale subsystem

The binomial-ratio and square-root dimension criteria include arbitrary oscillating sequences.

theorem pairCount_quadratic_bounds

The pair count is uniformly comparable to the squared dimension. Under the stated conditions.

Formal statement
d :
ℕ
hd :
2 ≤ d
conclusion 1
(d : ℝ) ^ 2 / 4 ≤ (pairCount d : ℝ)
conclusion 2
(pairCount d : ℝ) ≤ (d : ℝ) ^ 2 / 2
Proof (Lean source)
-- @node: pairCount_quadratic_bounds lemma pairCount_quadratic_bounds (d : ℕ) (hd : 2 ≤ d) : (d : ℝ) ^ 2 / 4 ≤ (pairCount d : ℝ) ∧ (pairCount d : ℝ) ≤ (d : ℝ) ^ 2 / 2 := by have heq := Nat.descFactorial_eq_factorial_mul_choose d 2 simp only [Nat.descFactorial_succ, Nat.descFactorial_zero, Nat.sub_zero, mul_one, Nat.factorial_succ, Nat.factorial_zero] at heq have hreal : ((d : ℝ) - 1) * d = 2 * (pairCount d : ℝ) := by have hc := congrArg (Nat.cast : ℕ → ℝ) heq simpa [Nat.cast_sub (by omega : 1 ≤ d), pairCount] using hc have hdreal : (2 : ℝ) ≤ d := by exact_mod_cast hd constructor <;> nlinarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.pairCount_quadratic_bounds · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/Vanishing.lean:17
theorem scale_vanishing

The explicit scale vanishes exactly below the square-root dimension frontier. Under the stated conditions.

Formal statement
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
ds :
ℕ → ℕ
hd :
∀ n, 2 ≤ ds n
conclusion 1
Tendsto (fun n => aScale n (ds n) s) atTop (𝓝 0)
↔ Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0)
conclusion 2
Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0)
↔ IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ))
Proof (Lean source)
-- @node: scale_vanishing lemma scale_vanishing (s : ℝ) (hs : 0 < s) (hs1 : s ≤ 1) (ds : ℕ → ℕ) (hd : ∀ n, 2 ≤ ds n) : (Tendsto (fun n => aScale n (ds n) s) atTop (𝓝 0) ↔ Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0)) ∧ (Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0) ↔ IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ))) := by have hratio (n : ℕ) : 0 ≤ (pairCount (ds n) : ℝ) / n := by positivity refine ⟨Causalean.Mathlib.Analysis.SpecialFunctions.tendsto_min_one_rpow_zero_iff _ hratio s hs, ?_⟩ have hquadratic : Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0) ↔ Tendsto (fun n => (ds n : ℝ) ^ 2 / n) atTop (𝓝 0) := by constructor · intro h have hfour := h.const_mul 4 simp only [mul_zero] at hfour apply squeeze_zero (fun n => by positivity) _ hfour intro n have hb := (pairCount_quadratic_bounds (ds n) (hd n)).1 calc (ds n : ℝ) ^ 2 / n ≤ (4 * (pairCount (ds n) : ℝ)) / n := div_le_div_of_nonneg_right (by linarith) (Nat.cast_nonneg n) _ = 4 * ((pairCount (ds n) : ℝ) / n) := by ring · intro h apply squeeze_zero hratio _ h intro n exact div_le_div_of_nonneg_right (le_trans (pairCount_quadratic_bounds (ds n) (hd n)).2 (by nlinarith [sq_nonneg (ds n : ℝ)])) (Nat.cast_nonneg n) rw [hquadratic] have hnonzero : ∀ᶠ n : ℕ in atTop, sqrt (n : ℝ) = 0 → (ds n : ℝ) = 0 := by filter_upwards [eventually_ge_atTop 1] with n hn have hpos : 0 < (n : ℝ) := by exact_mod_cast (show 0 < n by omega) exact fun h => (ne_of_gt (Real.sqrt_pos.mpr hpos) h).elim rw [Asymptotics.isLittleO_iff_tendsto' hnonzero] constructor · intro h have hroot := h.sqrt simpa [Real.sqrt_div (sq_nonneg _), Real.sqrt_sq_eq_abs] using hroot · intro h have hsq := h.pow 2 simp only [zero_pow (by decide : 2 ≠ 0)] at hsq apply hsq.congr' exact Filter.Eventually.of_forall fun n => by dsimp only rw [div_pow, Real.sq_sqrt (Nat.cast_nonneg n)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.scale_vanishing · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/Helpers/Vanishing.lean:31
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.TCapacityAnswer 1 declarations This capstone retains the concrete attaining kernel, legal prior, actual Gaussian HT transfer, exact frozen-class capacity, and the entire dimension-sequence equivalence.

Complete answer to the bivariate design-capacity question

This capstone retains the concrete attaining kernel, legal prior, actual Gaussian HT transfer, exact frozen-class capacity, and the entire dimension-sequence equivalence.

theorem capacity_answer

The single smoothness-free kernel and independent legal prior give the complete capacity answer, including actual HT excess and exact published-law minimax transfer. This uses the hContraction_of_gate hypothesis, the hExcess_of_gate hypothesis, the stated conclusion.

Formal statement
hContraction_of_gate :
hExcess_of_gate :
conclusion 1
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
n ≤ pairCount d
pairCount d < n
seed :
(∀ h, seed.2.2 h ∈ Icc (0 : ℝ) 1)
x i :
(roundingIteration (spectralRows (shiftedSample x seed.1 seed.2.1)) seed.2.2 n).1 i
= sgn (spectralSigns x seed i)
s :
ℝ
0 < s
s ≤ 1
aScale n d s = bScale n d s
0 < cLower 1
cLower 1 ≤ cLower s
ofReal (cLower s * aScale n d s) ≤ capacity n d s
capacity n d s ≤ worstLoss (piStar n d) s
worstLoss (piStar n d) s ≤ ofReal (3072 * aScale n d s)
ξ :
∃ hm : Measurable (mXi s (priorCutoff n d) ξ) ∧ MemLp (mXi s (priorCutoff n d) ξ) 2 (cubeMeasure d) ∧ (∫ x, mXi s (priorCutoff n d) ξ x ∂cubeMeasure d) = 0,
SobolevClass d s ⟨mXi s (priorCutoff n d) ξ, hm⟩
π :
Design n d
ofReal (cLower s * aScale n d s) ≤ priorRisk π s
π :
Design n d
m :
loss π m.val < ⊤
(n : ℝ) * variance (fun ω => htEstimator ω.1.2 ω.2) (experimentLaw (covLaw n d) (gaussianCompletion (lt_of_lt_of_le (zero_lt_succ 1) hd) m) π.val)
- 4.01
= (loss π m.val).toReal
gaussianCapacity n d (lt_of_lt_of_le (zero_lt_succ 1) hd) s = capacity n d s
gaussianWorst (lt_of_lt_of_le (zero_lt_succ 1) hd) (piStar n d) s
= worstLoss (piStar n d) s
conclusion 2
s :
ℝ
0 < s
s ≤ 1
ds :
ℕ → ℕ
(∀ n, 2 ≤ ds n)
Tendsto (fun n => capacity n (ds n) s) atTop (𝓝 0)
↔ Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0)
Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0)
↔ IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ))
Proof (Lean source)
theorem capacity_answer (hContraction_of_gate : ClassicalRademacherContraction) (hExcess_of_gate : PublishedHTExcessIdentity) : (∀ (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d), DesignClass n d (piStar n d) ∧ (n ≤ pairCount d → piStar n d = fairSignKernel n d) ∧ (pairCount d < n → (piStar n d).val = spectralRoundingKernel n d) ∧ (∀ seed : SpectralSeeds n d, (∀ h, seed.2.2 h ∈ Icc (0 : ℝ) 1) → ∀ x i, (roundingIteration (spectralRows (shiftedSample x seed.1 seed.2.1)) seed.2.2 n).1 i = sgn (spectralSigns x seed i)) ∧ ∀ s : ℝ, 0 < s → s ≤ 1 → aScale n d s = bScale n d s ∧ 0 < cLower 1 ∧ cLower 1 ≤ cLower s ∧ ofReal (cLower s * aScale n d s) ≤ capacity n d s ∧ capacity n d s ≤ worstLoss (piStar n d) s ∧ worstLoss (piStar n d) s ≤ ofReal (3072 * aScale n d s) ∧ (∀ ξ : PairIdx d (priorCutoff n d) → Bool, ∃ hm : Measurable (mXi s (priorCutoff n d) ξ) ∧ MemLp (mXi s (priorCutoff n d) ξ) 2 (cubeMeasure d) ∧ (∫ x, mXi s (priorCutoff n d) ξ x ∂cubeMeasure d) = 0, SobolevClass d s ⟨mXi s (priorCutoff n d) ξ, hm⟩) ∧ (∀ π : Design n d, DesignClass n d π → ofReal (cLower s * aScale n d s) ≤ priorRisk π s) ∧ (∀ π : Design n d, DesignClass n d π → ∀ m : CenteredL2Fn d, SobolevClass d s m → loss π m.val < ⊤ ∧ (n : ℝ) * variance (fun ω => htEstimator ω.1.2 ω.2) (experimentLaw (covLaw n d) (gaussianCompletion (lt_of_lt_of_le (zero_lt_succ 1) hd) m) π.val) - 4.01 = (loss π m.val).toReal) ∧ gaussianCapacity n d (lt_of_lt_of_le (zero_lt_succ 1) hd) s = capacity n d s ∧ gaussianWorst (lt_of_lt_of_le (zero_lt_succ 1) hd) (piStar n d) s = worstLoss (piStar n d) s ∧ publishedCapacity n d (frozenUniformClass d s) = capacity n d s) ∧ (∀ s : ℝ, 0 < s → s ≤ 1 → ∀ ds : ℕ → ℕ, (∀ n, 2 ≤ ds n) → (Tendsto (fun n => capacity n (ds n) s) atTop (𝓝 0) ↔ Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0)) ∧ (Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0) ↔ IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ)))) := by obtain ⟨hCapacity, hVanishing, _⟩ := log_free_bivariate_capacity hContraction_of_gate hExcess_of_gate refine ⟨?_, hVanishing⟩ intro n d hn hd obtain ⟨hDesign, hFairBranch, hSpectralBranch, hMoves, hSmoothness⟩ := hCapacity n d hn hd refine ⟨hDesign, hFairBranch, hSpectralBranch, hMoves, ?_⟩ intro s hs hs1 obtain ⟨hScale, _, _, hPositive, hConstant, _, _, hLower, hMiddle, hUpper, hLegal, hPrior, hPublished, _, hGaussianCapacity, hGaussianWorst, _, _, hHT, _, _⟩ := hSmoothness s hs hs1 refine ⟨hScale, hPositive, hConstant, hLower, hMiddle, hUpper, hLegal, hPrior, ?_, hGaussianCapacity, hGaussianWorst, hPublished⟩ intro π hπ m hm obtain ⟨hIdentity, hFinite⟩ := hHT π hπ m hm exact ⟨hFinite, hIdentity⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.capacity_answer · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TCapacityAnswer.lean:17
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.TFullDesignLower 14 declarations The explicit lower constant is chosen outside the sample and dimension quantifiers.

The full-design prior lower bound

The explicit lower constant is chosen outside the sample and dimension quantifiers. Every admissible covariate-dependent randomized original-sign law is covered. Finite coefficient averaging gives the exact feature-energy identity, which is compared with the pointwise minimum and the isotropic signing lemma. The explicit ceiling cutoff then gives the published lower constant. Prior legality and isotropic signing retain their separate proof obligations in the imported modules.

theorem coefficientSigns_product_integral

Uniform coefficient signs have diagonal second moments for any finite index type.

Formal statement
ι :
i j :
ι
(∫ ξ, sgn (ξ i) * sgn (ξ j) ∂(uniformOfFintype (ι → Bool)).toMeasure)
= if i = j then 1 else 0
Proof (Lean source)
-- @node: coefficientSigns_product_integral lemma coefficientSigns_product_integral {ι : Type} [Fintype ι] [DecidableEq ι] (i j : ι) : (∫ ξ, sgn (ξ i) * sgn (ξ j) ∂(uniformOfFintype (ι → Bool)).toMeasure) = if i = j then 1 else 0 := by by_cases hij : i = j · subst j have hsq (ξ : ι → Bool) : sgn (ξ i) * sgn (ξ i) = 1 := by cases ξ i <;> norm_num [sgn] simp [hsq] · rw [if_neg hij, integral_fintype (Integrable.of_finite)] simp only [Measure.real, PMF.toMeasure_apply_singleton _ _ (measurableSet_singleton _), PMF.uniformOfFintype_apply, smul_eq_mul] let e : (ι → Bool) ≃ (ι → Bool) := { toFun := fun ξ => update ξ i (!(ξ i)) invFun := fun ξ => update ξ i (!(ξ i)) left_inv := by intro ξ; funext k; by_cases hk : k = i <;> simp [hk] right_inv := by intro ξ; funext k; by_cases hk : k = i <;> simp [hk] } have hsum := e.sum_comp (fun ξ => ((card (ι → Bool) : ℝ≥0∞)⁻¹).toReal * (sgn (ξ i) * sgn (ξ j))) have hi (ξ : ι → Bool) : sgn (e ξ i) = -sgn (ξ i) := by change sgn (update ξ i (!(ξ i)) i) = _ simp only [Function.update_self] cases ξ i <;> norm_num [sgn] have hj (ξ : ι → Bool) : e ξ j = ξ j := Function.update_of_ne (Ne.symm hij) _ _ simp only [hi, hj, neg_mul, mul_neg, Finset.sum_neg_distrib] at hsum linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.coefficientSigns_product_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:21
theorem coefficientSigns_sum_second_moment

A finite independent coefficient prior averages a square to its diagonal energy.

Formal statement
ι :
u :
ι → ℝ
(∫ ξ, (∑ i, sgn (ξ i) * u i) ^ 2 ∂(uniformOfFintype (ι → Bool)).toMeasure)
= ∑ i, u i ^ 2
Proof (Lean source)
-- @node: coefficientSigns_sum_second_moment lemma coefficientSigns_sum_second_moment {ι : Type} [Fintype ι] [DecidableEq ι] (u : ι → ℝ) : (∫ ξ, (∑ i, sgn (ξ i) * u i) ^ 2 ∂(uniformOfFintype (ι → Bool)).toMeasure) = ∑ i, u i ^ 2 := by have hexpand (ξ : ι → Bool) : (∑ i, sgn (ξ i) * u i) ^ 2 = ∑ i, ∑ j, u i * (sgn (ξ i) * sgn (ξ j)) * u j := by rw [pow_two, Finset.sum_mul] apply Finset.sum_congr rfl intro i hi rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j hj ring simp_rw [hexpand] rw [integral_finsetSum _ (fun i _ => Integrable.of_finite)] apply Finset.sum_congr rfl intro i hi rw [integral_finsetSum _ (fun j _ => Integrable.of_finite)] simp_rw [integral_mul_const, integral_const_mul, coefficientSigns_product_integral] simp [pow_two]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.coefficientSigns_sum_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:52
theorem coefficientSigns_sum_second_moment_ennreal

The nonnegative finite prior has the same diagonal-energy identity.

Formal statement
ι :
u :
ι → ℝ
(∑ ξ : ι → Bool, uniformOfFintype (ι → Bool) ξ * ofReal ((∑ i, sgn (ξ i) * u i) ^ 2))
= ofReal (∑ i, u i ^ 2)
Proof (Lean source)
-- @node: coefficientSigns_sum_second_moment_ennreal lemma coefficientSigns_sum_second_moment_ennreal {ι : Type} [Fintype ι] [DecidableEq ι] (u : ι → ℝ) : (∑ ξ : ι → Bool, uniformOfFintype (ι → Bool) ξ * ofReal ((∑ i, sgn (ξ i) * u i) ^ 2)) = ofReal (∑ i, u i ^ 2) := by rw [← coefficientSigns_sum_second_moment u, ofReal_integral_eq_lintegral_ofReal Integrable.of_finite (Filter.Eventually.of_forall (fun ξ => sq_nonneg _)), lintegral_fintype] simp only [PMF.toMeasure_apply_singleton _ _ (measurableSet_singleton _), mul_comm]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.coefficientSigns_sum_second_moment_ennreal · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:75
theorem mXi_signed_sum_prior_second_moment

Before averaging over the sample, coefficient averaging produces precisely the squared feature-signing norm with the stated normalization.

Formal statement
n d L :
ℕ
s :
ℝ
x :
z :
(∑ ξ : PairIdx d L → Bool, uniformOfFintype (PairIdx d L → Bool) ξ * ofReal ((∑ i, sgn (z i) * mXi s L ξ (x i)) ^ 2))
= ofReal ((C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ ^ 2) * ofReal (∑ α : PairIdx d L, (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2)
Proof (Lean source)
-- @node: mXi_signed_sum_prior_second_moment lemma mXi_signed_sum_prior_second_moment (n d L : ℕ) (s : ℝ) (x : Covariates n d) (z : Signs n) : (∑ ξ : PairIdx d L → Bool, uniformOfFintype (PairIdx d L → Bool) ξ * ofReal ((∑ i, sgn (z i) * mXi s L ξ (x i)) ^ 2)) = ofReal ((C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ ^ 2) * ofReal (∑ α : PairIdx d L, (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2) := by classical let c := (C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ have hexpand (ξ : PairIdx d L → Bool) : (∑ i, sgn (z i) * mXi s L ξ (x i)) = c * ∑ α, sgn (ξ α) * ∑ i, sgn (z i) * pairFeature α (x i) := by simp only [mXi, Finset.mul_sum] rw [Finset.sum_comm] apply Finset.sum_congr rfl intro α _ apply Finset.sum_congr rfl intro i _ dsimp [c] ring simp_rw [hexpand, mul_pow, ENNReal.ofReal_mul (sq_nonneg c)] simp_rw [mul_left_comm _ (ofReal (c ^ 2))] rw [← Finset.mul_sum, coefficientSigns_sum_second_moment_ennreal]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.mXi_signed_sum_prior_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:87
theorem priorRisk_eq_feature_energy

Coefficient averaging commutes with the fixed design and covariate integrals, giving the exact prior-risk identity from the lower-bound roadmap.

Formal statement
n d :
ℕ
π :
Design n d
s :
ℝ
= ofReal (4 / (n : ℝ)) * ofReal ((C0 * (priorCutoff n d : ℝ) ^ s * sqrt (priorDimension d (priorCutoff n d)))⁻¹ ^ 2) * ∫⁻ x, ∫⁻ z, ofReal (∑ α : PairIdx d (priorCutoff n d), (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2) ∂π.val x ∂covLaw n d
Proof (Lean source)
-- @node: priorRisk_eq_feature_energy lemma priorRisk_eq_feature_energy {n d : ℕ} (π : Design n d) (s : ℝ) : priorRisk π s = ofReal (4 / (n : ℝ)) * ofReal ((C0 * (priorCutoff n d : ℝ) ^ s * sqrt (priorDimension d (priorCutoff n d)))⁻¹ ^ 2) * ∫⁻ x, ∫⁻ z, ofReal (∑ α : PairIdx d (priorCutoff n d), (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2) ∂π.val x ∂covLaw n d := by classical let : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ let : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance let : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance let := π.property let L := priorCutoff n d let c := ofReal ((C0 * (L : ℝ) ^ s * sqrt (priorDimension d L))⁻¹ ^ 2) let μ := covLaw n d ⊗ₘ π.val have hm (ξ : PairIdx d L → Bool) : Measurable (fun ω : Covariates n d × Signs n => ofReal ((∑ i, sgn (ω.2 i) * mXi s L ξ (ω.1 i)) ^ 2)) := by fun_prop have he : Measurable (fun ω : Covariates n d × Signs n => ofReal (∑ α : PairIdx d L, (∑ i, sgn (ω.2 i) * pairFeature α (ω.1 i)) ^ 2)) := by fun_prop have hloss (ξ : PairIdx d L → Bool) : loss π (mXi s L ξ) = ofReal (4 / (n : ℝ)) * ∫⁻ ω, ofReal ((∑ i, sgn (ω.2 i) * mXi s L ξ (ω.1 i)) ^ 2) ∂μ := by rw [Measure.lintegral_compProd (hm ξ)] rfl change (∑ ξ, uniformOfFintype (PairIdx d L → Bool) ξ * loss π (mXi s L ξ)) = _ simp_rw [hloss, mul_left_comm _ (ofReal (4 / (n : ℝ)))] rw [← Finset.mul_sum] have havg : (∑ ξ : PairIdx d L → Bool, uniformOfFintype (PairIdx d L → Bool) ξ * ∫⁻ ω, ofReal ((∑ i, sgn (ω.2 i) * mXi s L ξ (ω.1 i)) ^ 2) ∂μ) = c * ∫⁻ ω, ofReal (∑ α : PairIdx d L, (∑ i, sgn (ω.2 i) * pairFeature α (ω.1 i)) ^ 2) ∂μ := by simp_rw [← lintegral_const_mul' _ _ (PMF.apply_ne_top _ _)] rw [← lintegral_finsetSum univ (fun ξ _ => (hm ξ).const_mul _)] simp_rw [mXi_signed_sum_prior_second_moment] exact lintegral_const_mul c he rw [havg, Measure.lintegral_compProd he] simp only [c, L, mul_assoc]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.priorRisk_eq_feature_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:115
theorem priorRisk_ge_min_feature_energy

Any covariate-dependent randomized design dominates the pointwise minimum over all original sign vectors. Fairness is not needed for this comparison.

Formal statement
n d :
ℕ
π :
Design n d
s :
ℝ
ofReal (4 / (n : ℝ)) * ofReal ((C0 * (priorCutoff n d : ℝ) ^ s * sqrt (priorDimension d (priorCutoff n d)))⁻¹ ^ 2) * (∫⁻ x : Covariates n d, ⨅ z : Signs n, ofReal (∑ α : PairIdx d (priorCutoff n d), (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2) ∂covLaw n d)
≤ priorRisk π s
Proof (Lean source)
-- @node: priorRisk_ge_min_feature_energy lemma priorRisk_ge_min_feature_energy {n d : ℕ} (π : Design n d) (s : ℝ) : ofReal (4 / (n : ℝ)) * ofReal ((C0 * (priorCutoff n d : ℝ) ^ s * sqrt (priorDimension d (priorCutoff n d)))⁻¹ ^ 2) * (∫⁻ x : Covariates n d, ⨅ z : Signs n, ofReal (∑ α : PairIdx d (priorCutoff n d), (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2) ∂covLaw n d) ≤ priorRisk π s := by rw [priorRisk_eq_feature_energy] apply mul_le_mul' le_rfl apply lintegral_mono intro x let := π.property calc (⨅ z : Signs n, ofReal (∑ α : PairIdx d (priorCutoff n d), (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2)) = ∫⁻ _z : Signs n, ⨅ z : Signs n, ofReal (∑ α : PairIdx d (priorCutoff n d), (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2) ∂π.val x := by simp _ ≤ _ := lintegral_mono (fun z => iInf_le _ z)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.priorRisk_ge_min_feature_energy · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:162
theorem priorCutoff_dimension_lower

The prescribed cutoff has enough features for the isotropic signing threshold. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d :
ℕ
hd :
2 ≤ d
4096 * n ≤ priorDimension d (priorCutoff n d)
Proof (Lean source)
-- @node: priorCutoff_dimension_lower lemma priorCutoff_dimension_lower (n d : ℕ) (hd : 2 ≤ d) : 4096 * n ≤ priorDimension d (priorCutoff n d) := by have hB : (0 : ℝ) < pairCount d := by exact_mod_cast (Nat.choose_pos hd : 0 < d.choose 2) have hL : sqrt (4096 * (n : ℝ) / pairCount d) ≤ (priorCutoff n d : ℝ) := by apply (Nat.le_ceil _).trans unfold priorCutoff exact_mod_cast (le_max_right 1 ⌈Real.sqrt (4096 * (n : ℝ) / pairCount d)⌉₊) have hsq := Real.sq_sqrt (show 0 ≤ 4096 * (n : ℝ) / pairCount d by positivity) have hdimension : 4096 * (n : ℝ) ≤ (pairCount d : ℝ) * (priorCutoff n d : ℝ) ^ 2 := by have hLsq : 4096 * (n : ℝ) / pairCount d ≤ (priorCutoff n d : ℝ) ^ 2 := by nlinarith [Real.sqrt_nonneg (4096 * (n : ℝ) / pairCount d)] simpa only [mul_comm] using (div_le_iff₀ hB).mp hLsq exact_mod_cast hdimension
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.priorCutoff_dimension_lower · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:186
theorem priorCutoff_sq_upper

The ceiling cutoff loses only the explicit factor 16384 in squared frequency. The asserted mathematical result follows.

Formal statement
n d :
ℕ
(priorCutoff n d : ℝ) ^ 2 ≤ 16384 * max 1 ((n : ℝ) / pairCount d)
Proof (Lean source)
-- @node: priorCutoff_sq_upper lemma priorCutoff_sq_upper (n d : ℕ) : (priorCutoff n d : ℝ) ^ 2 ≤ 16384 * max 1 ((n : ℝ) / pairCount d) := by let q : ℝ := 4096 * (n : ℝ) / pairCount d let R : ℝ := max 1 ((n : ℝ) / pairCount d) have hR : 1 ≤ R := le_max_left _ _ have hratio : (n : ℝ) / pairCount d ≤ R := le_max_right _ _ have hq : 0 ≤ q := by dsimp [q]; positivity have hs : sqrt q ≤ 64 * sqrt R := by apply (Real.sqrt_le_iff).2 constructor · positivity · rw [mul_pow, Real.sq_sqrt (by positivity : 0 ≤ R)] dsimp [q] rw [mul_div_assoc] nlinarith have hceil : (⌈Real.sqrt q⌉₊ : ℝ) ≤ sqrt q + 1 := (Nat.ceil_lt_add_one (Real.sqrt_nonneg q)).le have hL : (priorCutoff n d : ℝ) ≤ 64 * sqrt R + 1 := by simp only [priorCutoff, Nat.cast_max, Nat.cast_one] apply max_le · have hsR := Real.sqrt_nonneg R linarith · exact hceil.trans (by linarith) have hsR : 1 ≤ sqrt R := by exact (Real.le_sqrt (by norm_num) (by linarith)).2 (by simpa using hR) have hL' : (priorCutoff n d : ℝ) ≤ 128 * sqrt R := by linarith have hRsq := Real.sq_sqrt (by positivity : 0 ≤ R) change (priorCutoff n d : ℝ) ^ 2 ≤ 16384 * R nlinarith [mul_nonneg (sub_nonneg.mpr hL') (show 0 ≤ 128 * sqrt R + (priorCutoff n d : ℝ) by positivity)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.priorCutoff_sq_upper · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:204
theorem prior_min_feature_energy_lower

The cosine feature map transports independent uniform rows to the isotropic row law, so the signing lemma lower-bounds the original-sample minimum. Under the stated conditions, the asserted mathematical result follows.

Formal statement
hContraction_of_gate :
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
ofReal ((n : ℝ) * priorDimension d (priorCutoff n d) / 2)
≤ ∫⁻ x : Covariates n d, ⨅ z : Signs n, ofReal (∑ α : PairIdx d (priorCutoff n d), (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2) ∂covLaw n d
Proof (Lean source)
-- @node: prior_min_feature_energy_lower lemma prior_min_feature_energy_lower (hContraction_of_gate : ClassicalRademacherContraction) (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) : ofReal ((n : ℝ) * priorDimension d (priorCutoff n d) / 2) ≤ ∫⁻ x : Covariates n d, ⨅ z : Signs n, ofReal (∑ α : PairIdx d (priorCutoff n d), (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2) ∂covLaw n d := by classical let : IsProbabilityMeasure (volume.restrict (Icc (0 : ℝ) 1)) := ⟨by simp [Real.volume_Icc]⟩ let : IsProbabilityMeasure (cubeMeasure d) := by unfold cubeMeasure; infer_instance let : IsProbabilityMeasure (covLaw n d) := by unfold covLaw; infer_instance let L := priorCutoff n d let M := priorDimension d L let e : PairIdx d L ≃ Fin M := Fintype.equivFinOfCardEq (pairIdx_card d L) let V : Cube d → EuclideanSpace ℝ (Fin M) := fun x => toLp 2 (fun a => pairFeature (e.symm a) x) have hV : Measurable V := by dsimp [V]; fun_prop let P := (cubeMeasure d).map V let : IsProbabilityMeasure P := Measure.isProbabilityMeasure_map hV.aemeasurable have hmom (a : Fin M) : MemLp (fun v : EuclideanSpace ℝ (Fin M) => v a) 2 P := by apply (memLp_map_measure_iff (by fun_prop) hV.aemeasurable).mpr exact pairFeature_memLp (e.symm a) have hiso (a b : Fin M) : (∫ v, v a * v b ∂P) = if a = b then 1 else 0 := by rw [integral_map hV.aemeasurable (by fun_prop)] change (∫ x, pairFeature (e.symm a) x * pairFeature (e.symm b) x ∂cubeMeasure d) = _ rw [pairFeature_cube_inner_product] simp only [e.symm.injective.eq_iff] have hlarge : 4096 * n ≤ M := priorCutoff_dimension_lower n d hd have hM : 0 < M := lt_of_lt_of_le (by omega) hlarge have hbound := (isotropic_row_signing hContraction_of_gate M n hM P hmom hiso).2 hlarge have hmap : (covLaw n d).map (fun x i => V (x i)) = Measure.pi (fun _ : Fin n => P) := by exact Measure.pi_map_pi (fun _ => hV.aemeasurable) have hmeas : Measurable (fun vs : Fin n → EuclideanSpace ℝ (Fin M) => ⨅ z : Signs n, ‖∑ i, sgn (z i) • vs i‖ ^ 2) := by apply Measurable.iInf intro z fun_prop have hVs : Measurable (fun x : Covariates n d => fun i => V (x i)) := measurable_pi_lambda _ (fun i => hV.comp (measurable_pi_apply i)) rw [← hmap, integral_map hVs.aemeasurable hmeas.aestronglyMeasurable] at hbound have hnorm (x : Covariates n d) (z : Signs n) : ‖∑ i, sgn (z i) • V (x i)‖ ^ 2 = ∑ α : PairIdx d L, (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2 := by rw [EuclideanSpace.real_norm_sq_eq] simp only [WithLp.ofLp_sum, Finset.sum_apply, WithLp.ofLp_smul, Pi.smul_apply, smul_eq_mul] change (∑ a : Fin M, (∑ i, sgn (z i) * pairFeature (e.symm a) (x i)) ^ 2) = _ exact e.symm.sum_comp (fun α => (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2) simp_rw [hnorm] at hbound have hpos : 0 < (n : ℝ) * M / 2 := by positivity have hint : Integrable (fun x : Covariates n d => ⨅ z : Signs n, ∑ α : PairIdx d L, (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2) (covLaw n d) := by by_contra h rw [integral_undef h] at hbound linarith have hnonneg (x : Covariates n d) : 0 ≤ ⨅ z : Signs n, ∑ α : PairIdx d L, (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2 := by apply le_ciInf intro z exact Finset.sum_nonneg (fun _ _ => sq_nonneg _) calc ofReal ((n : ℝ) * M / 2) ≤ ofReal (∫ x : Covariates n d, ⨅ z : Signs n, ∑ α : PairIdx d L, (∑ i, sgn (z i) * pairFeature α (x i)) ^ 2 ∂covLaw n d) := ENNReal.ofReal_le_ofReal hbound _ = _ := by rw [ofReal_integral_eq_lintegral_ofReal hint (Filter.Eventually.of_forall hnonneg)] simp only [ENNReal.ofReal_iInf] rfl
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.prior_min_feature_energy_lower · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:237
theorem priorCutoff_normalized_lower

The ceiling comparison yields the paper's explicit lower constant and scale. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
s :
ℝ
hs :
0 < s
cLower s * bScale n d s ≤ 2 / (C0 ^ 2 * ((priorCutoff n d : ℝ) ^ s) ^ 2)
Proof (Lean source)
-- @node: priorCutoff_normalized_lower lemma priorCutoff_normalized_lower (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (s : ℝ) (hs : 0 < s) : cLower s * bScale n d s ≤ 2 / (C0 ^ 2 * ((priorCutoff n d : ℝ) ^ s) ^ 2) := by have hnpos : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) have hBpos : (0 : ℝ) < pairCount d := by exact_mod_cast (Nat.choose_pos hd : 0 < d.choose 2) have hLpos : (0 : ℝ) < priorCutoff n d := by exact_mod_cast (lt_of_lt_of_le Nat.zero_lt_one (le_max_left 1 _)) have hC0 : C0 ^ 2 = 48 + 32 * pi ^ 2 := by exact Real.sq_sqrt (by positivity) have hCpos : 0 < C0 := by unfold C0; positivity let R := max 1 ((n : ℝ) / pairCount d) let K := (16384 : ℝ) ^ s have hKpos : 0 < K := by dsimp [K]; positivity have hpower : ((priorCutoff n d : ℝ) ^ s) ^ 2 ≤ K * R ^ s := by rw [Real.rpow_pow_comm (Nat.cast_nonneg _) s 2] calc ((priorCutoff n d : ℝ) ^ 2) ^ s ≤ (16384 * R) ^ s := Real.rpow_le_rpow (sq_nonneg _) (priorCutoff_sq_upper n d) hs.le _ = K * R ^ s := Real.mul_rpow (by norm_num) (by dsimp [R]; positivity) have hb : 0 ≤ bScale n d s := by unfold bScale; positivity have hscale : bScale n d s * R ^ s ≤ 1 := by by_cases hr : (n : ℝ) / pairCount d ≤ 1 · simp only [R, max_eq_left hr, Real.one_rpow, mul_one] exact min_le_left _ _ · have hr' : 1 ≤ (n : ℝ) / pairCount d := le_of_lt (lt_of_not_ge hr) rw [show R = (n : ℝ) / pairCount d from max_eq_right hr'] calc bScale n d s * ((n : ℝ) / pairCount d) ^ s ≤ ((pairCount d : ℝ) / n) ^ s * ((n : ℝ) / pairCount d) ^ s := mul_le_mul_of_nonneg_right (min_le_right _ _) (by positivity) _ = 1 := by rw [← Real.mul_rpow (by positivity) (by positivity)] have hrat : ((pairCount d : ℝ) / n) * ((n : ℝ) / pairCount d) = 1 := by field_simp rw [hrat, Real.one_rpow] have hprod : ((priorCutoff n d : ℝ) ^ s) ^ 2 * bScale n d s ≤ K := by calc _ ≤ (K * R ^ s) * bScale n d s := mul_le_mul_of_nonneg_right hpower hb _ = K * (bScale n d s * R ^ s) := by ring _ ≤ K * 1 := mul_le_mul_of_nonneg_left hscale hKpos.le _ = K := mul_one _ unfold cLower rw [← hC0, div_mul_eq_mul_div] apply (div_le_div_iff₀ (by positivity) (by positivity)).2 convert mul_le_mul_of_nonneg_left hprod (show 0 ≤ 2 * C0 ^ 2 by positivity) using 1 <;> (try dsimp [K]) <;> ring
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.priorCutoff_normalized_lower · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:313
theorem priorRisk_ge_normalized_cutoff

After isotropic signing, normalization cancels the original sample size and feature dimension, leaving the inverse-frequency lower bound. Under the stated conditions.

Formal statement
hContraction_of_gate :
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
s :
ℝ
π :
Design n d
ofReal (2 / (C0 ^ 2 * ((priorCutoff n d : ℝ) ^ s) ^ 2)) ≤ priorRisk π s
Proof (Lean source)
-- @node: priorRisk_ge_normalized_cutoff lemma priorRisk_ge_normalized_cutoff (hContraction_of_gate : ClassicalRademacherContraction) (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (s : ℝ) (π : Design n d) : ofReal (2 / (C0 ^ 2 * ((priorCutoff n d : ℝ) ^ s) ^ 2)) ≤ priorRisk π s := by have hnpos : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) have hLpos : (0 : ℝ) < priorCutoff n d := by exact_mod_cast (lt_of_lt_of_le Nat.zero_lt_one (le_max_left 1 _)) have hMpos : (0 : ℝ) < priorDimension d (priorCutoff n d) := by exact_mod_cast (lt_of_lt_of_le (by omega : 0 < 4096 * n) (priorCutoff_dimension_lower n d hd)) have hCpos : 0 < C0 := by unfold C0; positivity have hsqrt := Real.sq_sqrt hMpos.le have hcoeff : ofReal (4 / (n : ℝ)) * ofReal ((C0 * (priorCutoff n d : ℝ) ^ s * sqrt (priorDimension d (priorCutoff n d)))⁻¹ ^ 2) * ofReal ((n : ℝ) * priorDimension d (priorCutoff n d) / 2) = ofReal (2 / (C0 ^ 2 * ((priorCutoff n d : ℝ) ^ s) ^ 2)) := by rw [← ENNReal.ofReal_mul (by positivity), ← ENNReal.ofReal_mul (by positivity)] congr 1 have htpos : 0 < (priorCutoff n d : ℝ) ^ s := Real.rpow_pos_of_pos hLpos s have hspos : 0 < sqrt (priorDimension d (priorCutoff n d)) := Real.sqrt_pos.2 hMpos field_simp nlinarith rw [← hcoeff] exact (mul_le_mul' le_rfl (prior_min_feature_energy_lower hContraction_of_gate n d hn hd)).trans (priorRisk_ge_min_feature_energy π s)
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.priorRisk_ge_normalized_cutoff · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:364
theorem capacity_lower_of_priorRisk

A lower bound for every design's legal finite prior transfers to full capacity. Under the stated conditions.

Formal statement
n d :
ℕ
hd :
2 ≤ d
s :
ℝ
hs :
0 < s
hs1 :
s ≤ 1
c :
ℝ≥0∞
hprior :
∀ π : Design n d
if
then
c ≤ priorRisk π s
c ≤ capacity n d s
Proof (Lean source)
-- @node: capacity_lower_of_priorRisk lemma capacity_lower_of_priorRisk (n d : ℕ) (hd : 2 ≤ d) (s : ℝ) (hs : 0 < s) (hs1 : s ≤ 1) (c : ℝ≥0∞) (hprior : ∀ π : Design n d, DesignClass n d π → c ≤ priorRisk π s) : c ≤ capacity n d s := by apply le_minimaxValueENNReal intro π exact (hprior π.val π.property).trans (priorRisk_le_worstLoss_of_legal π.val s (cosinePrior_legal_and_isotropic.1 d (priorCutoff n d) hd (le_max_left _ _) s hs hs1))
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.capacity_lower_of_priorRisk · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:419
theorem full_design_lower

The independent legal cosine prior lower-bounds every design and hence capacity. This uses the hContraction_of_gate hypothesis, the stated conclusion.

Formal statement
hContraction_of_gate :
s :
ℝ
0 < s
s ≤ 1
conclusion 1
0 < cLower s
conclusion 2
n d :
ℕ
2 ≤ n
2 ≤ d
π :
Design n d
ofReal (cLower s * bScale n d s) ≤ priorRisk π s
ofReal (cLower s * bScale n d s) ≤ capacity n d s
Proof (Lean source)
theorem full_design_lower (hContraction_of_gate : ClassicalRademacherContraction) : ∀ s : ℝ, 0 < s → s ≤ 1 → 0 < cLower s ∧ ∀ n d : ℕ, 2 ≤ n → 2 ≤ d → (∀ π : Design n d, DesignClass n d π → ofReal (cLower s * bScale n d s) ≤ priorRisk π s) ∧ ofReal (cLower s * bScale n d s) ≤ capacity n d s := by intro s hs hs1 have hc : 0 < cLower s := by unfold cLower; positivity refine ⟨hc, ?_⟩ intro n d hn hd have hprior : ∀ π : Design n d, DesignClass n d π → ofReal (cLower s * bScale n d s) ≤ priorRisk π s := by intro π _hπ exact (ENNReal.ofReal_le_ofReal (priorCutoff_normalized_lower n d hn hd s hs)).trans (priorRisk_ge_normalized_cutoff hContraction_of_gate n d hn hd s π) exact ⟨hprior, capacity_lower_of_priorRisk n d hd s hs hs1 _ hprior⟩
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.full_design_lower · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TFullDesignLower.lean:433
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.TLogFreeBivariateCapacity 5 declarations All asserted bounds refer to the concrete smoothness-free original-sample design.

Log-free bivariate full-design capacity

All asserted bounds refer to the concrete smoothness-free original-sample design. Both law-level capacity transfer and the converse-only bounded-density comparison are retained, as are the oscillating-sequence frontier and Gaussian sample-size corollaries.

theorem gaussianWorst_eq_worstLoss

The Gaussian identity identifies each admissible design's worst excess with loss. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
π :
Design n d
hπ :
s :
ℝ
gaussianWorst (lt_of_lt_of_le (zero_lt_succ 1) hd) π s = worstLoss π s
Proof (Lean source)
-- @node: gaussianWorst_eq_worstLoss lemma gaussianWorst_eq_worstLoss (hC : ClassicalRademacherContraction) (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (π : Design n d) (hπ : DesignClass n d π) (s : ℝ) : gaussianWorst (lt_of_lt_of_le (zero_lt_succ 1) hd) π s = worstLoss π s := by unfold gaussianWorst worstLoss congr 1 funext m have h := ht_transfer_centeredL2 hC n d hn hd m.val π hπ.fair hπ.outcomeIndep change ofReal (gaussianExcessReal _ π m.val) = _ rw [gaussianExcessReal, h.2.2.2.2, ENNReal.ofReal_toReal (ne_of_lt h.2.2.2.1)]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianWorst_eq_worstLoss · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TLogFreeBivariateCapacity.lean:20
theorem gaussianCapacity_eq_capacity

The Gaussian identity also identifies the full admissible-design infimum. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
s :
ℝ
gaussianCapacity n d (lt_of_lt_of_le (zero_lt_succ 1) hd) s = capacity n d s
Proof (Lean source)
-- @node: gaussianCapacity_eq_capacity lemma gaussianCapacity_eq_capacity (hC : ClassicalRademacherContraction) (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (s : ℝ) : gaussianCapacity n d (lt_of_lt_of_le (zero_lt_succ 1) hd) s = capacity n d s := by change (⨅ π : {π : Design n d // DesignClass n d π}, gaussianWorst _ π.val s) = ⨅ π : {π : Design n d // DesignClass n d π}, worstLoss π.val s congr 1 funext π exact gaussianWorst_eq_worstLoss hC n d hn hd π.val π.property s
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.gaussianCapacity_eq_capacity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TLogFreeBivariateCapacity.lean:33
theorem scale_sample_size_sufficient

Inverting the upper power bound gives the sufficient sample-size condition. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
s ε :
ℝ
hs :
0 < s
hε :
0 < ε
hsize :
(pairCount d : ℝ) * max 1 ((3072 / (4.01 * ε)) ^ (1 / s)) ≤ n
3072 * aScale n d s ≤ 4.01 * ε
Proof (Lean source)
-- @node: scale_sample_size_sufficient lemma scale_sample_size_sufficient (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (s ε : ℝ) (hs : 0 < s) (hε : 0 < ε) (hsize : (pairCount d : ℝ) * max 1 ((3072 / (4.01 * ε)) ^ (1 / s)) ≤ n) : 3072 * aScale n d s ≤ 4.01 * ε := by have hn0 : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) have hB : (0 : ℝ) < pairCount d := by exact_mod_cast (Nat.choose_pos hd) have he : 0 < 4.01 * ε := by positivity have hp : (3072 / (4.01 * ε)) ^ (s⁻¹) ≤ (n : ℝ) / pairCount d := by apply (le_div_iff₀ hB).2 simpa only [one_div, mul_comm] using (mul_le_mul_of_nonneg_left (le_max_right 1 _) hB.le).trans hsize have hp' := (Real.rpow_inv_le_iff_of_pos (by positivity) (by positivity) hs).mp hp have hratio : ((pairCount d : ℝ) / n) ^ s * ((n : ℝ) / pairCount d) ^ s = 1 := by rw [← Real.mul_rpow (by positivity) (by positivity)] have h : ((pairCount d : ℝ) / n) * ((n : ℝ) / pairCount d) = 1 := by field_simp rw [h, Real.one_rpow] have hmul := mul_le_mul_of_nonneg_left hp' (Real.rpow_nonneg (show 0 ≤ (pairCount d : ℝ) / n by positivity) s) rw [hratio] at hmul have hbound : 3072 * (((pairCount d : ℝ) / n) ^ s) ≤ 4.01 * ε := by have hdiv : 3072 * (((pairCount d : ℝ) / n) ^ s) / (4.01 * ε) ≤ 1 := by convert hmul using 1 <;> first | ring | rfl simpa only [one_mul] using (div_le_iff₀ he).mp hdiv exact (mul_le_mul_of_nonneg_left (min_le_right _ _) (by norm_num)).trans hbound
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.scale_sample_size_sufficient · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TLogFreeBivariateCapacity.lean:45
theorem scale_sample_size_necessary

Below saturation, inverting the lower power bound gives the necessary sample size. Under the stated conditions.

Formal statement
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
s ε :
ℝ
hs :
0 < s
hε :
0 < ε
hsmall :
ε < cLower s / 4.01
hbound :
cLower s * aScale n d s ≤ 4.01 * ε
(pairCount d : ℝ) * ((cLower s / (4.01 * ε)) ^ (1 / s)) ≤ n
Proof (Lean source)
-- @node: scale_sample_size_necessary lemma scale_sample_size_necessary (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d) (s ε : ℝ) (hs : 0 < s) (hε : 0 < ε) (hsmall : ε < cLower s / 4.01) (hbound : cLower s * aScale n d s ≤ 4.01 * ε) : (pairCount d : ℝ) * ((cLower s / (4.01 * ε)) ^ (1 / s)) ≤ n := by have hn0 : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) have hB : (0 : ℝ) < pairCount d := by exact_mod_cast (Nat.choose_pos hd) have he : 0 < 4.01 * ε := by positivity have hc : 0 < cLower s := by unfold cLower; positivity have hstrict : 4.01 * ε < cLower s := by have h := (lt_div_iff₀ (by norm_num : (0 : ℝ) < 4.01)).mp hsmall linarith have hpow : (((pairCount d : ℝ) / n) ^ s) < 1 := by by_contra h have ha : aScale n d s = 1 := min_eq_left (le_of_not_gt h) rw [ha, mul_one] at hbound linarith rw [aScale, min_eq_right hpow.le] at hbound have hratio : ((pairCount d : ℝ) / n) ^ s * ((n : ℝ) / pairCount d) ^ s = 1 := by rw [← Real.mul_rpow (by positivity) (by positivity)] have h : ((pairCount d : ℝ) / n) * ((n : ℝ) / pairCount d) = 1 := by field_simp rw [h, Real.one_rpow] have hmul := mul_le_mul_of_nonneg_right hbound (Real.rpow_nonneg (show 0 ≤ (n : ℝ) / pairCount d by positivity) s) have hpower : cLower s / (4.01 * ε) ≤ ((n : ℝ) / pairCount d) ^ s := by apply (div_le_iff₀ he).2 rw [mul_assoc, hratio, mul_one] at hmul simpa only [mul_comm] using hmul have hroot := (Real.rpow_inv_le_iff_of_pos (by positivity) (by positivity) hs).mpr hpower simpa only [one_div, mul_comm] using (le_div_iff₀ hB).mp hroot
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.scale_sample_size_necessary · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TLogFreeBivariateCapacity.lean:72
theorem log_free_bivariate_capacity

One original-sample kernel attains the log-free scale for all smoothnesses, with a legal independent finite prior, the exact published capacity, and the square-root frontier. This uses the hContraction_of_gate hypothesis, the hExcess_of_gate hypothesis, the stated conclusion.

Formal statement
hContraction_of_gate :
hExcess_of_gate :
conclusion 1
n d :
ℕ
hn :
2 ≤ n
hd :
2 ≤ d
n ≤ pairCount d
pairCount d < n
seed :
(∀ h, seed.2.2 h ∈ Icc (0 : ℝ) 1)
x i :
(roundingIteration (spectralRows (shiftedSample x seed.1 seed.2.1)) seed.2.2 n).1 i
= sgn (spectralSigns x seed i)
s :
ℝ
0 < s
s ≤ 1
aScale n d s = bScale n d s
n < pairCount d
aScale n d s = 1
pairCount d ≤ n
aScale n d s = ((pairCount d : ℝ) / n) ^ s
0 < cLower 1
cLower 1 ≤ cLower s
ofReal (cLower 1 * aScale n d s) ≤ ofReal (cLower s * aScale n d s)
ofReal (cLower s * aScale n d s) ≤ capacity n d s
capacity n d s ≤ worstLoss (piStar n d) s
worstLoss (piStar n d) s ≤ ofReal (3072 * aScale n d s)
ξ :
∃ hm : Measurable (mXi s (priorCutoff n d) ξ) ∧ MemLp (mXi s (priorCutoff n d) ξ) 2 (cubeMeasure d) ∧ (∫ x, mXi s (priorCutoff n d) ξ x ∂cubeMeasure d) = 0,
SobolevClass d s ⟨mXi s (priorCutoff n d) ξ, hm⟩
π :
Design n d
ofReal (cLower s * aScale n d s) ≤ priorRisk π s
gaussianCapacity n d (lt_of_lt_of_le (zero_lt_succ 1) hd) s = capacity n d s
gaussianWorst (lt_of_lt_of_le (zero_lt_succ 1) hd) (piStar n d) s
= worstLoss (piStar n d) s
gaussianLawClass d (lt_of_lt_of_le (zero_lt_succ 1) hd) s ⊂ frozenUniformClass d s
lower upper :
ℝ
0 < lower
lower ≤ 1
1 ≤ upper
capacity n d s ≤ publishedCapacity n d (boundedDensityClass d s lower upper)
π :
Design n d
m :
(n : ℝ) * variance (fun ω => htEstimator ω.1.2 ω.2) (experimentLaw (covLaw n d) (gaussianCompletion (lt_of_lt_of_le (zero_lt_succ 1) hd) m) π.val)
- 4.01
= (loss π m.val).toReal
loss π m.val < ⊤
ε :
ℝ
0 < ε
(pairCount d : ℝ) * max 1 ((3072 / (4.01 * ε)) ^ (1 / s)) ≤ n
gaussianWorst (lt_of_lt_of_le (zero_lt_succ 1) hd) (piStar n d) s
≤ ofReal (4.01 * ε)
ε :
ℝ
0 < ε
ε < cLower s / 4.01
gaussianCapacity n d (lt_of_lt_of_le (zero_lt_succ 1) hd) s
≤ ofReal (4.01 * ε)
(pairCount d : ℝ) * ((cLower s / (4.01 * ε)) ^ (1 / s)) ≤ n
conclusion 2
s :
ℝ
0 < s
s ≤ 1
ds :
ℕ → ℕ
(∀ n, 2 ≤ ds n)
Tendsto (fun n => capacity n (ds n) s) atTop (𝓝 0)
↔ Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0)
Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0)
↔ IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ))
conclusion 3
s lower upper :
ℝ
0 < s
s ≤ 1
0 < lower
lower ≤ 1
1 ≤ upper
ds :
ℕ → ℕ
(∀ n, 2 ≤ ds n)
Tendsto (fun n => publishedCapacity n (ds n) (boundedDensityClass (ds n) s lower upper)) atTop (𝓝 0)
IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ))
Proof (Lean source)
theorem log_free_bivariate_capacity (hContraction_of_gate : ClassicalRademacherContraction) (hExcess_of_gate : PublishedHTExcessIdentity) : (∀ (n d : ℕ) (hn : 2 ≤ n) (hd : 2 ≤ d), -- @realizes n(n≥2) @realizes d(d≥2) DesignClass n d (piStar n d) ∧ (n ≤ pairCount d → piStar n d = fairSignKernel n d) ∧ (pairCount d < n → (piStar n d).val = spectralRoundingKernel n d) ∧ (∀ seed : SpectralSeeds n d, (∀ h, seed.2.2 h ∈ Icc (0 : ℝ) 1) → ∀ x i, (roundingIteration (spectralRows (shiftedSample x seed.1 seed.2.1)) seed.2.2 n).1 i = sgn (spectralSigns x seed i)) ∧ ∀ s : ℝ, 0 < s → s ≤ 1 → -- @realizes s(0<s≤1) aScale n d s = bScale n d s ∧ (n < pairCount d → aScale n d s = 1) ∧ (pairCount d ≤ n → aScale n d s = ((pairCount d : ℝ) / n) ^ s) ∧ 0 < cLower 1 ∧ cLower 1 ≤ cLower s ∧ cLower s < CUpper ∧ ofReal (cLower 1 * aScale n d s) ≤ ofReal (cLower s * aScale n d s) ∧ ofReal (cLower s * aScale n d s) ≤ capacity n d s ∧ capacity n d s ≤ worstLoss (piStar n d) s ∧ worstLoss (piStar n d) s ≤ ofReal (3072 * aScale n d s) ∧ (∀ ξ : PairIdx d (priorCutoff n d) → Bool, ∃ hm : Measurable (mXi s (priorCutoff n d) ξ) ∧ MemLp (mXi s (priorCutoff n d) ξ) 2 (cubeMeasure d) ∧ (∫ x, mXi s (priorCutoff n d) ξ x ∂cubeMeasure d) = 0, SobolevClass d s ⟨mXi s (priorCutoff n d) ξ, hm⟩) ∧ (∀ π : Design n d, DesignClass n d π → ofReal (cLower s * aScale n d s) ≤ priorRisk π s) ∧ publishedCapacity n d (frozenUniformClass d s) = capacity n d s ∧ publishedWorst (piStar n d) (frozenUniformClass d s) = worstLoss (piStar n d) s ∧ gaussianCapacity n d (lt_of_lt_of_le (zero_lt_succ 1) hd) s = capacity n d s ∧ gaussianWorst (lt_of_lt_of_le (zero_lt_succ 1) hd) (piStar n d) s = worstLoss (piStar n d) s ∧ gaussianLawClass d (lt_of_lt_of_le (zero_lt_succ 1) hd) s ⊂ frozenUniformClass d s ∧ (∀ lower upper : ℝ, 0 < lower → lower ≤ 1 → 1 ≤ upper → capacity n d s ≤ publishedCapacity n d (boundedDensityClass d s lower upper)) ∧ (∀ π : Design n d, DesignClass n d π → ∀ m : CenteredL2Fn d, SobolevClass d s m → (n : ℝ) * variance (fun ω => htEstimator ω.1.2 ω.2) (experimentLaw (covLaw n d) (gaussianCompletion (lt_of_lt_of_le (zero_lt_succ 1) hd) m) π.val) - 4.01 = (loss π m.val).toReal ∧ loss π m.val < ⊤) ∧ (∀ ε : ℝ, 0 < ε → (pairCount d : ℝ) * max 1 ((3072 / (4.01 * ε)) ^ (1 / s)) ≤ n → gaussianWorst (lt_of_lt_of_le (zero_lt_succ 1) hd) (piStar n d) s ≤ ofReal (4.01 * ε)) ∧ (∀ ε : ℝ, 0 < ε → ε < cLower s / 4.01 → gaussianCapacity n d (lt_of_lt_of_le (zero_lt_succ 1) hd) s ≤ ofReal (4.01 * ε) → (pairCount d : ℝ) * ((cLower s / (4.01 * ε)) ^ (1 / s)) ≤ n)) ∧ (∀ s : ℝ, 0 < s → s ≤ 1 → ∀ ds : ℕ → ℕ, (∀ n, 2 ≤ ds n) → (Tendsto (fun n => capacity n (ds n) s) atTop (𝓝 0) ↔ Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0)) ∧ (Tendsto (fun n => (pairCount (ds n) : ℝ) / n) atTop (𝓝 0) ↔ IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ)))) ∧ (∀ s lower upper : ℝ, 0 < s → s ≤ 1 → 0 < lower → lower ≤ 1 → 1 ≤ upper → ∀ ds : ℕ → ℕ, (∀ n, 2 ≤ ds n) → Tendsto (fun n => publishedCapacity n (ds n) (boundedDensityClass (ds n) s lower upper)) atTop (𝓝 0) → IsLittleO atTop (fun n => (ds n : ℝ)) (fun n => sqrt (n : ℝ))) := by have hpub := published_prognostic_capacity hExcess_of_gate hContraction_of_gate have hlow := full_design_lower hContraction_of_gate have hmiddle (n d : ℕ) (hπ : DesignClass n d (piStar n d)) (s : ℝ) : capacity n d s ≤ worstLoss (piStar n d) s := by unfold capacity minimaxValueENNReal exact iInf_le (fun π : {π : Design n d // DesignClass n d π} => worstLoss π.val s) ⟨piStar n d, hπ⟩ refine ⟨?_, ?_, ?_⟩ · intro n d hn hd have hu := spectral_design_upper n d hn hd refine ⟨hu.1, ?_, ?_, ?_, ?_⟩ · intro h; simp only [piStar, if_pos h] · intro h; simp only [piStar, if_neg (not_le.mpr h)] · intro seed hseed x i have ht := (ordered_prefix_rounding n (fun h i => features d h (shiftedSample x seed.1 seed.2.1 i)) (sqrt 2) (fun h i _ => features_abs_le d h _)).2.1 seed.2.2 hseed i have hp : rowPrefix (fun h i => features d h (shiftedSample x seed.1 seed.2.1 i)) = spectralRows (shiftedSample x seed.1 seed.2.1) := by funext h i rfl rw [hp] at ht exact ht · intro s hs hs1 have hc := cLower_uniform_positive s hs1 have hl := (hlow s hs hs1).2 n d hn hd have hupper := hu.2 s hs hs1 have hgcap := gaussianCapacity_eq_capacity hContraction_of_gate n d hn hd s have hgw := gaussianWorst_eq_worstLoss hContraction_of_gate n d hn hd (piStar n d) hu.1 s have hn0 : (0 : ℝ) < n := by exact_mod_cast (by omega : 0 < n) have hnonneg : 0 ≤ aScale n d s := by unfold aScale; positivity have hscale : aScale n d s = bScale n d s := rfl refine ⟨hscale, ?_, ?_, hc.1, hc.2, ?_, ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_right hc.2 hnonneg), hl.2, hmiddle n d hu.1 s, hupper, cosinePrior_legal_and_isotropic.1 d (priorCutoff n d) hd (le_max_left _ _) s hs hs1, hl.1, hpub.2.2.2.1 n d hn hd s hs hs1, (hpub.2.2.1 n d hn hd s hs hs1 (piStar n d) hu.1).2, hgcap, hgw, (hpub.1 d hd s hs hs1).2.1, ?_, ?_, ?_, ?_⟩ · intro h have hr : 1 ≤ (pairCount d : ℝ) / n := (le_div_iff₀ hn0).2 (by simpa only [one_mul] using (show (n : ℝ) ≤ pairCount d by exact_mod_cast h.le)) exact min_eq_left (Real.one_le_rpow hr hs.le) · intro h have hr : (pairCount d : ℝ) / n ≤ 1 := (div_le_iff₀ hn0).2 (by simpa only [one_mul] using (show (pairCount d : ℝ) ≤ n by exact_mod_cast h)) exact min_eq_right (Real.rpow_le_one (by positivity) hr hs.le) · have hpow : 1 ≤ (16384 : ℝ) ^ s := Real.one_le_rpow (by norm_num) hs.le have hden : 48 ≤ (48 + 32 * pi ^ 2) * (16384 : ℝ) ^ s := by nlinarith [sq_nonneg pi] have hc' : cLower s ≤ 2 / 48 := by exact div_le_div_of_nonneg_left (by norm_num) (by norm_num) hden dsimp only [CUpper] linarith · intro lower upper hlower hl1 hu1 exact (hpub.2.2.2.2 s lower upper hs hs1 hlower hl1 hu1).2.1 n d hn hd |>.2 · intro π hπ m hm have ht := ht_transfer hContraction_of_gate n d hn hd s hs hs1 m hm π hπ.fair hπ.outcomeIndep exact ⟨by simpa only [ht.2.2.1] using ht.2.2.2.2, ht.2.2.2.1⟩ · intro ε hε hsize rw [hgw] exact hupper.trans (ENNReal.ofReal_le_ofReal (scale_sample_size_sufficient n d hn hd s ε hs hε hsize)) · intro ε hε hsmall hcap rw [hgcap] at hcap have hb := hl.2.trans hcap have hbR : cLower s * aScale n d s ≤ 4.01 * ε := (ENNReal.ofReal_le_ofReal_iff (by positivity)).mp hb exact scale_sample_size_necessary n d hn hd s ε hs hε hsmall hbR · intro s hs hs1 ds hd have hscale := scale_vanishing s hs hs1 ds hd refine ⟨?_, hscale.2⟩ constructor · intro hv have hnecess := dimension_necessity_of_scale_lower s hs hs1 ds hd (fun n => capacity n (ds n) s) ?_ hv · exact hscale.2.mpr hnecess · filter_upwards [eventually_ge_atTop 2] with n hn exact ((hlow s hs hs1).2 n (ds n) hn (hd n)).2 · intro hv have ha := hscale.1.mpr hv have hupper : Tendsto (fun n => ofReal (CUpper * aScale n (ds n) s)) atTop (𝓝 0) := by simpa only [Function.comp_def, mul_zero, ENNReal.ofReal_zero] using (ENNReal.continuous_ofReal.tendsto 0).comp (show Tendsto (fun n => CUpper * aScale n (ds n) s) atTop (𝓝 0) by simpa only [mul_zero] using ha.const_mul CUpper) apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hupper (Filter.Eventually.of_forall (fun _ => bot_le)) filter_upwards [eventually_ge_atTop 2] with n hn have hu := spectral_design_upper n (ds n) hn (hd n) exact (hmiddle n (ds n) hu.1 s).trans (hu.2 s hs hs1) · intro s lower upper hs hs1 hl hl1 hu1 ds hd hv exact (hpub.2.2.2.2 s lower upper hs hs1 hl hl1 hu1).2.2 ds hd hv
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.log_free_bivariate_capacity · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TLogFreeBivariateCapacity.lean:105
CausalSmith.Experimentation.EXP_BivariateSobolevDesignCapacity_Research.TPublishedClassInclusion 5 declarations The d=2 converse and the independent-sign L² identity retain the full frozen outcome class.

Strict published-class inclusion and independent-sign comparison

The d=2 converse and the independent-sign L² identity retain the full frozen outcome class.

theorem fairSigns_product_integral

Independent fair signs have identity second-moment matrix.

Formal statement
n :
ℕ
i j :
Fin n
(∫ z, sgn (z i) * sgn (z j) ∂fairSigns n) = if i = j then 1 else 0
Proof (Lean source)
-- @node: fairSigns_product_integral lemma fairSigns_product_integral (n : ℕ) (i j : Fin n) : (∫ z, sgn (z i) * sgn (z j) ∂fairSigns n) = if i = j then 1 else 0 := by letI := fairSigns_probability n by_cases hij : i = j · subst j have hsq (z : Signs n) : sgn (z i) * sgn (z i) = 1 := by cases z i <;> norm_num [sgn] simp [hsq] · rw [if_neg hij, integral_fintype (Integrable.of_finite)] simp only [Measure.real, fairSigns, PMF.toMeasure_apply_singleton _ _ (measurableSet_singleton _), PMF.uniformOfFintype_apply, smul_eq_mul] let e : Signs n ≃ Signs n := { toFun := fun z => update z i (!(z i)) invFun := fun z => update z i (!(z i)) left_inv := by intro z; funext k; by_cases hk : k = i <;> simp [hk] right_inv := by intro z; funext k; by_cases hk : k = i <;> simp [hk] } have hsum := e.sum_comp (fun z => ((card (Signs n) : ℝ≥0∞)⁻¹).toReal * (sgn (z i) * sgn (z j))) have hi (z : Signs n) : sgn (e z i) = -sgn (z i) := by change sgn (update z i (!(z i)) i) = _ simp only [Function.update_self] cases z i <;> norm_num [sgn] have hj (z : Signs n) : e z j = z j := by exact Function.update_of_ne (Ne.symm hij) _ _ simp only [hi, hj, neg_mul, mul_neg, Finset.sum_neg_distrib] at hsum linarith
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSigns_product_integral · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TPublishedClassInclusion.lean:15
theorem fairSigns_sum_second_moment

Averaging a deterministic signed sum over all independent fair signs leaves only its diagonal squares.

Formal statement
n :
ℕ
u :
Fin n → ℝ
(∫ z, (∑ i, sgn (z i) * u i) ^ 2 ∂fairSigns n) = ∑ i, u i ^ 2
Proof (Lean source)
-- @node: fairSigns_sum_second_moment lemma fairSigns_sum_second_moment (n : ℕ) (u : Fin n → ℝ) : (∫ z, (∑ i, sgn (z i) * u i) ^ 2 ∂fairSigns n) = ∑ i, u i ^ 2 := by letI := fairSigns_probability n have hexpand (z : Signs n) : (∑ i, sgn (z i) * u i) ^ 2 = ∑ i, ∑ j, u i * (sgn (z i) * sgn (z j)) * u j := by rw [pow_two, Finset.sum_mul] apply Finset.sum_congr rfl intro i hi rw [Finset.mul_sum] apply Finset.sum_congr rfl intro j hj ring simp_rw [hexpand] rw [integral_finsetSum _ (fun i _ => Integrable.of_finite)] apply Finset.sum_congr rfl intro i hi rw [integral_finsetSum _ (fun j _ => Integrable.of_finite)] simp_rw [integral_mul_const, integral_const_mul, fairSigns_product_integral] simp [pow_two]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.fairSigns_sum_second_moment · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TPublishedClassInclusion.lean:45
theorem loss_fairSigns_eq

Independent fair assignment has exactly four times the prognostic second moment as its original-unit imbalance loss. Under the stated conditions, the asserted mathematical result follows.

Formal statement
n d :
ℕ
hn :
0 < n
m :
loss (fairSignKernel n d) m.val = ofReal (4 * ∫ x, m.val x ^ 2 ∂cubeMeasure d)
Proof (Lean source)
-- @node: loss_fairSigns_eq lemma loss_fairSigns_eq (n d : ℕ) (hn : 0 < n) (m : CenteredL2Fn d) : loss (fairSignKernel n d) m.val = ofReal (4 * ∫ x, m.val x ^ 2 ∂cubeMeasure d) := by letI := cubeMeasure_probability d letI := fairSigns_probability n have hi (i : Fin n) : Integrable (fun x : Covariates n d => m.val (x i) ^ 2) (covLaw n d) := (m.property.2.1.comp_measurePreserving (measurePreserving_eval (fun _ : Fin n => cubeMeasure d) i)).integrable_sq have hsum : Integrable (fun x : Covariates n d => ∑ i, m.val (x i) ^ 2) (covLaw n d) := integrable_finsetSum univ (fun i _ => hi i) have hinner (x : Covariates n d) : (∫⁻ z, ofReal ((∑ i, sgn (z i) * m.val (x i)) ^ 2) ∂fairSigns n) = ofReal (∑ i, m.val (x i) ^ 2) := by rw [← ofReal_integral_eq_lintegral_ofReal Integrable.of_finite (Filter.Eventually.of_forall (fun z => sq_nonneg _)), fairSigns_sum_second_moment] have heval (i : Fin n) : (∫ x : Covariates n d, m.val (x i) ^ 2 ∂covLaw n d) = ∫ x, m.val x ^ 2 ∂cubeMeasure d := by exact integral_comp_eval (μ := fun _ : Fin n => cubeMeasure d) (i := i) (m.property.1.pow_const 2).aestronglyMeasurable change ofReal (4 / (n : ℝ)) * (∫⁻ x, ∫⁻ z, ofReal ((∑ i, sgn (z i) * m.val (x i)) ^ 2) ∂fairSigns n ∂covLaw n d) = _ simp_rw [hinner] rw [← ofReal_integral_eq_lintegral_ofReal hsum (Filter.Eventually.of_forall (fun x => Finset.sum_nonneg (fun i _ => sq_nonneg _))), integral_finsetSum _ (fun i _ => hi i)] simp_rw [heval] simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, nsmul_eq_mul] rw [← ENNReal.ofReal_mul (by positivity)] congr 1 have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast hn.ne' field_simp
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.loss_fairSigns_eq · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TPublishedClassInclusion.lean:68
theorem bScale_two

In dimension two the comparison scale is the single-pair power of sample size. Under the stated conditions.

Formal statement
n :
ℕ
hn :
2 ≤ n
s :
ℝ
hs :
0 < s
bScale n 2 s = (n : ℝ) ^ (-s)
Proof (Lean source)
-- @node: bScale_two lemma bScale_two (n : ℕ) (hn : 2 ≤ n) (s : ℝ) (hs : 0 < s) : bScale n 2 s = (n : ℝ) ^ (-s) := by have hn1 : (1 : ℝ) ≤ n := by exact_mod_cast (show 1 ≤ n by omega) have hpow : (n : ℝ) ^ (-s) ≤ 1 := Real.rpow_le_one_of_one_le_of_nonpos hn1 (neg_nonpos.mpr hs.le) norm_num [bScale, pairCount, one_div, ← Real.rpow_neg_eq_inv_rpow, min_eq_right hpow]
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.bScale_two · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TPublishedClassInclusion.lean:107
theorem published_class_inclusion

Gaussian completions form a proper published subclass, with the same admissible kernels, a single-pair lower exponent, and independent-sign loss at most four. This uses the hExcess_of_gate hypothesis, the hContraction_of_gate hypothesis, the stated conclusion.

Formal statement
hExcess_of_gate :
hContraction_of_gate :
s :
ℝ
0 < s
s ≤ 1
conclusion 1
d :
ℕ
hd :
2 ≤ d
gaussianLawClass d (lt_of_lt_of_le (zero_lt_succ 1) hd) s ⊂ frozenUniformClass d s
conclusion 2
n d :
ℕ
2 ≤ n
2 ≤ d
π :
Design n d
conclusion 3
n :
ℕ
2 ≤ n
ofReal (cLower s * (n : ℝ) ^ (-s)) ≤ capacity n 2 s
conclusion 4
n d :
ℕ
2 ≤ n
2 ≤ d
m :
loss (fairSignKernel n d) m.val = ofReal (4 * ∫ x, m.val x ^ 2 ∂cubeMeasure d)
loss (fairSignKernel n d) m.val ≤ 4
Proof (Lean source)
theorem published_class_inclusion (hExcess_of_gate : PublishedHTExcessIdentity) (hContraction_of_gate : ClassicalRademacherContraction) : ∀ s : ℝ, 0 < s → s ≤ 1 → (∀ (d : ℕ) (hd : 2 ≤ d), gaussianLawClass d (lt_of_lt_of_le (zero_lt_succ 1) hd) s ⊂ frozenUniformClass d s) ∧ (∀ n d : ℕ, 2 ≤ n → 2 ≤ d → ∀ π : Design n d, PublishedAdmissible π ↔ DesignClass n d π) ∧ (∀ n : ℕ, 2 ≤ n → ofReal (cLower s * (n : ℝ) ^ (-s)) ≤ capacity n 2 s) ∧ (∀ n d : ℕ, 2 ≤ n → 2 ≤ d → ∀ m : CenteredL2Fn d, SobolevClass d s m → loss (fairSignKernel n d) m.val = ofReal (4 * ∫ x, m.val x ^ 2 ∂cubeMeasure d) ∧ loss (fairSignKernel n d) m.val ≤ 4) := by intro s hs hs1 have hpublished := published_prognostic_capacity hExcess_of_gate hContraction_of_gate refine ⟨?_, hpublished.2.1, ?_, ?_⟩ · intro d hd exact (hpublished.1 d hd s hs hs1).2.1 · intro n hn have hlower := ((full_design_lower hContraction_of_gate s hs hs1).2 n 2 hn (by omega)).2 rw [bScale_two n hn s hs] at hlower exact hlower · intro n d hn hd m hm refine ⟨loss_fairSigns_eq n d (by omega) m, ?_⟩ rw [loss_fairSigns_eq n d (by omega) m] have hmoment := sobolev_cube_second_moment_le_one hd hs hs1 m hm calc ofReal (4 * ∫ x, m.val x ^ 2 ∂cubeMeasure d) ≤ ofReal (4 * 1) := ENNReal.ofReal_le_ofReal (mul_le_mul_of_nonneg_left hmoment (by norm_num)) _ = 4 := by norm_num
CausalSmith.Experimentation.BivariateSobolevDesignCapacity.published_class_inclusion · CausalSmith/Experimentation/EXP_BivariateSobolevDesignCapacity_Research/TPublishedClassInclusion.lean:118