Formalization: Efficient Estimation of Binary Treatment Effects under Local Differential Privacy

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

CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Basic 72 declarations This file fixes the four input symbols of a randomized binary trial and gives the fourteen ray staircase program for its private information surface.

Binary trial and finite staircase program

This file fixes the four input symbols of a randomized binary trial and gives the fourteen ray staircase program for its private information surface.

def PrivateAlphabet

the private alphabet is the mathematical object specified below.

Definition (Lean source)
PrivateAlphabet :
Type
Fin 4
CausalSmith.Stat.LdpAteEfficiencySurface.PrivateAlphabet · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:26
def StaircasePattern

Coordinates of the fourteen nonconstant rays used in the finite program. The stated result follows.

Definition (Lean source)
StaircasePattern :
Type
Fin 14
CausalSmith.Stat.LdpAteEfficiencySurface.StaircasePattern · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:28
def StaircaseSubset

The declared pattern carrier is the full power set, including the empty and full sets. The stated result follows.

Definition (Lean source)
StaircaseSubset :
Type
CausalSmith.Stat.LdpAteEfficiencySurface.StaircaseSubset · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:31
def staircasePatternSpace

the staircase pattern space is the mathematical object specified below.

Definition (Lean source)
staircasePatternSpace :
CausalSmith.Stat.LdpAteEfficiencySurface.staircasePatternSpace · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:35
theorem staircasePatternSpace_eq_univ

the staircase pattern space eq univ assertion holds.

Formal statement
Proof (Lean source)
lemma staircasePatternSpace_eq_univ : staircasePatternSpace = univ := by ext s simp [staircasePatternSpace]
CausalSmith.Stat.LdpAteEfficiencySurface.staircasePatternSpace_eq_univ · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:41
theorem staircasePatternSpace_card

the staircase pattern space card assertion holds.

Formal statement
staircasePatternSpace.card = 16
Proof (Lean source)
lemma staircasePatternSpace_card : staircasePatternSpace.card = 16 := by simp [staircasePatternSpace]
CausalSmith.Stat.LdpAteEfficiencySurface.staircasePatternSpace_card · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:47
theorem staircasePatternSpace_contains_constants

the staircase pattern space contains constants assertion holds.

Formal statement
conclusion 1
conclusion 2
Proof (Lean source)
lemma staircasePatternSpace_contains_constants : (∅ : StaircaseSubset) ∈ staircasePatternSpace ∧ (Finset.univ : StaircaseSubset) ∈ staircasePatternSpace := by simp [staircasePatternSpace]
CausalSmith.Stat.LdpAteEfficiencySurface.staircasePatternSpace_contains_constants · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:52
def TrialParameter

the trial parameter is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Trial Parameter is the displayed object.

Definition (Lean source)
TrialParameter :
Type
Fin 2 → ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.TrialParameter · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:57

the staircase weight is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Staircase Weight is the displayed object.

Definition (Lean source)
StaircaseWeight :
Type
CausalSmith.Stat.LdpAteEfficiencySurface.StaircaseWeight · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:59

the contrast is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
contrast θ :
ℝ
θ 1 - θ 0
CausalSmith.Stat.LdpAteEfficiencySurface.contrast · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:62
def contrastVector

the contrast vector is the mathematical object specified below.

Definition (Lean source)
contrastVector :
fun k => if k = 0 then -1 else 1
CausalSmith.Stat.LdpAteEfficiencySurface.contrastVector · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:65
def controlProb

For the supplied quantities and conditions, the control prob is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
controlProb p :
ℝ
1 - p
CausalSmith.Stat.LdpAteEfficiencySurface.controlProb · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:68
def piTheta

For the supplied quantities and conditions, the pi theta is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p :
ℝ
piTheta θ p :
clause 1
| ⟨0, _⟩ => controlProb p * (1 - θ 0)
clause 2
| ⟨1, _⟩ => controlProb p * θ 0
clause 3
| ⟨2, _⟩ => p * (1 - θ 1)
clause 4
| _ => p * θ 1
CausalSmith.Stat.LdpAteEfficiencySurface.piTheta · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:71
def inputLaw

For the supplied quantities and conditions, the input law is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p :
ℝ
inputLaw θ p :
Measure.count.withDensity (fun j => ofReal (piTheta θ p j))
CausalSmith.Stat.LdpAteEfficiencySurface.inputLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:78
def inputScore

the input score is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
inputScore θ :
clause 1
| ⟨0, _⟩ => fun k => if k = 0 then -(1 - θ 0)⁻¹ else 0
clause 2
| ⟨1, _⟩ => fun k => if k = 0 then (θ 0)⁻¹ else 0
clause 3
| ⟨2, _⟩ => fun k => if k = 1 then -(1 - θ 1)⁻¹ else 0
clause 4
| _ => fun k => if k = 1 then (θ 1)⁻¹ else 0
CausalSmith.Stat.LdpAteEfficiencySurface.inputScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:85

For the supplied quantities and conditions, the private record is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Ω :
Sort u_1
shared
W Y :
ℕ → Ω → ℝ
i :
ℕ
ω :
Ω
privateRecord W Y i ω :
if W i ω = 0 then if Y i ω = 0 then 0 else 1 else if Y i ω = 0 then 2 else 3
CausalSmith.Stat.LdpAteEfficiencySurface.privateRecord · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:92
def armMeanParameter

For the supplied quantities and conditions, the arm mean parameter is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Ω :
Type u_1
shared
μ :
Y0 Y1 :
ℕ → Ω → ℝ
armMeanParameter μ Y0 Y1 :
fun k => if k = 0 then ∫ ω, Y0 0 ω ∂μ else ∫ ω, Y1 0 ω ∂μ
CausalSmith.Stat.LdpAteEfficiencySurface.armMeanParameter · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:105

the iid subjects is the mathematical object specified below. The Iid Subjects is determined by the displayed parameters.

Definition (Lean source)
Ω :
Type u_1
shared
μ :
shared
Y0 :
ℕ → Ω → ℝ
shared
Y1 :
ℕ → Ω → ℝ
shared
W :
ℕ → Ω → ℝ
shared
IidSubjects μ Y0 Y1 W :
Prop
clause 1
iIndepFun (fun i ω => (Y0 i ω, Y1 i ω, W i ω)) μ
clause 2
i :
IdentDistrib (fun ω => (Y0 0 ω, Y1 0 ω, W 0 ω)) (fun ω => (Y0 i ω, Y1 i ω, W i ω)) μ μ
CausalSmith.Stat.LdpAteEfficiencySurface.IidSubjects · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:113
def RandomAssignment Assumption 2 in the paper ↗

the random assignment is the mathematical object specified below. The Random Assignment is determined by the displayed parameters.

Definition (Lean source)
Ω :
Type u_1
shared
μ :
shared
Y0 :
ℕ → Ω → ℝ
shared
Y1 :
ℕ → Ω → ℝ
shared
W :
ℕ → Ω → ℝ
shared
i :
RandomAssignment μ Y0 Y1 W :
Prop
IndepFun (W i) (fun ω => (Y0 i ω, Y1 i ω)) μ
CausalSmith.Stat.LdpAteEfficiencySurface.RandomAssignment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:121

the known assignment is the mathematical object specified below. The Known Assignment is determined by the displayed parameters.

Definition (Lean source)
Ω :
Type u_1
shared
μ :
shared
W :
ℕ → Ω → ℝ
shared
p :
ℝ
shared
i :
KnownAssignment μ W p :
Prop
clause 1
∀ᵐ ω ∂μ, W i ω ∈ ({0, 1} : Set ℝ)
clause 2
μ {ω | W i ω = 1} = ofReal p
CausalSmith.Stat.LdpAteEfficiencySurface.KnownAssignment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:126
def OutcomeConsistency Assumption 4 in the paper ↗

the outcome consistency is the mathematical object specified below. The Outcome Consistency is determined by the displayed parameters.

Definition (Lean source)
Ω :
Type u_1
shared
Y0 :
ℕ → Ω → ℝ
shared
Y1 :
ℕ → Ω → ℝ
shared
W :
ℕ → Ω → ℝ
shared
Y :
ℕ → Ω → ℝ
shared
i ω :
OutcomeConsistency Y0 Y1 W Y :
Prop
Y i ω = W i ω * Y1 i ω + (1 - W i ω) * Y0 i ω
CausalSmith.Stat.LdpAteEfficiencySurface.OutcomeConsistency · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:133

the binary outcomes is the mathematical object specified below. The Binary Outcomes is determined by the displayed parameters.

Definition (Lean source)
Ω :
Type u_1
shared
μ :
shared
Y0 :
ℕ → Ω → ℝ
shared
Y1 :
ℕ → Ω → ℝ
shared
i :
BinaryOutcomes μ Y0 Y1 :
Prop
∀ᵐ ω ∂μ, Y0 i ω ∈ ({0, 1} : Set ℝ) ∧ Y1 i ω ∈ ({0, 1} : Set ℝ)
CausalSmith.Stat.LdpAteEfficiencySurface.BinaryOutcomes · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:139
def InteriorAssignment Assumption 6 in the paper ↗

the interior assignment is the mathematical object specified below. The Interior Assignment is determined by the displayed parameters.

Definition (Lean source)
p :
ℝ
shared
InteriorAssignment p :
Prop
clause 1
0 < p
clause 2
p < 1
CausalSmith.Stat.LdpAteEfficiencySurface.InteriorAssignment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:145

the interior means is the mathematical object specified below. The Interior Means is determined by the displayed parameters.

Definition (Lean source)
θ :
shared
InteriorMeans θ :
Prop
clause 1
0 < θ 0
clause 2
θ 0 < 1
clause 3
0 < θ 1
clause 4
θ 1 < 1
CausalSmith.Stat.LdpAteEfficiencySurface.InteriorMeans · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:149

For the supplied quantities and conditions, the assignment range is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
AssignmentRange p :
Prop
clause 1
0 ≤ p
clause 2
p ≤ 1
CausalSmith.Stat.LdpAteEfficiencySurface.AssignmentRange · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:154

the mean range is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
MeanRange θ :
Prop
clause 1
0 ≤ θ 0
clause 2
θ 0 ≤ 1
clause 3
0 ≤ θ 1
clause 4
θ 1 ≤ 1
CausalSmith.Stat.LdpAteEfficiencySurface.MeanRange · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:159
def ContrastRange

the contrast range is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
τ :
ℝ
ContrastRange τ :
Prop
clause 1
-1 ≤ τ
clause 2
τ ≤ 1
CausalSmith.Stat.LdpAteEfficiencySurface.ContrastRange · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:165

For the supplied quantities and conditions, the control range is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
ControlRange p :
Prop
clause 1
0 ≤ controlProb p
clause 2
controlProb p ≤ 1
CausalSmith.Stat.LdpAteEfficiencySurface.ControlRange · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:170
theorem assignmentRange

Under the supplied quantities and conditions, the assignment range assertion holds.

Formal statement
p :
ℝ
shared
Proof (Lean source)
lemma InteriorAssignment.assignmentRange (hp : InteriorAssignment p) : AssignmentRange p := ⟨hp.1.le, hp.2.le⟩
CausalSmith.Stat.LdpAteEfficiencySurface.InteriorAssignment.assignmentRange · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:175
theorem meanRange

Under the supplied quantities and conditions, the mean range assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the mean Range.

Formal statement
θ :
shared
hθ :
Proof (Lean source)
lemma InteriorMeans.meanRange (hθ : InteriorMeans θ) : MeanRange θ := ⟨hθ.1.le, hθ.2.1.le, hθ.2.2.1.le, hθ.2.2.2.le⟩
CausalSmith.Stat.LdpAteEfficiencySurface.InteriorMeans.meanRange · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:180
theorem contrastRange

Under the supplied quantities and conditions, the contrast range assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the contrast Range.

Formal statement
θ :
shared
hθ :
ContrastRange (contrast θ)
Proof (Lean source)
lemma MeanRange.contrastRange (hθ : MeanRange θ) : ContrastRange (contrast θ) := by unfold MeanRange at hθ unfold ContrastRange contrast constructor <;> linarith [hθ.1, hθ.2.1, hθ.2.2.1, hθ.2.2.2]
CausalSmith.Stat.LdpAteEfficiencySurface.MeanRange.contrastRange · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:186
theorem controlRange

Under the supplied quantities and conditions, the control range assertion holds.

Formal statement
p :
ℝ
shared
Proof (Lean source)
lemma AssignmentRange.controlRange (hp : AssignmentRange p) : ControlRange p := by unfold AssignmentRange at hp unfold ControlRange controlProb constructor <;> linarith [hp.1, hp.2]
CausalSmith.Stat.LdpAteEfficiencySurface.AssignmentRange.controlRange · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:195
def PositiveSampleSize

the positive sample size is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Positive Sample Size is the displayed object.

Definition (Lean source)
PositiveSampleSize :
Type
{n : ℕ // 0 < n}
CausalSmith.Stat.LdpAteEfficiencySurface.PositiveSampleSize · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:201

The public binary-trial model is the family of IID laws of the observed treatment-outcome record. Its nth member is the n-fold product of the four-point law at (θ,p). The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. For the displayed quantities and conditions, these specify the stated inputs. The Binary Trial Model is determined by the displayed parameters.

Definition (Lean source)
BinaryTrialModel θ p _hθ _hp n :
Measure.pi fun _ => inputLaw θ p
CausalSmith.Stat.LdpAteEfficiencySurface.BinaryTrialModel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:205
structure LatentBinaryTrialRepresentation

A latent representation of the public binary-trial model by potential outcomes, assignment, and the observed outcome. The Latent Binary Trial Representation is determined by the displayed parameters.

Definition (Lean source)
Ω :
Type u_1
shared
μ :
shared
Y0 :
ℕ → Ω → ℝ
shared
Y1 :
ℕ → Ω → ℝ
shared
W :
ℕ → Ω → ℝ
shared
Y :
ℕ → Ω → ℝ
shared
p :
ℝ
shared
θ :
shared
measurable :
∀ i, Measurable (fun ω => (Y0 i ω, Y1 i ω, W i ω))
iid :
IidSubjects μ Y0 Y1 W
randomized :
RandomAssignment μ Y0 Y1 W
assigned :
consistent :
binary :
assignmentInterior :
meansInterior :
parameterLaw :
θ = armMeanParameter μ Y0 Y1
CausalSmith.Stat.LdpAteEfficiencySurface.LatentBinaryTrialRepresentation · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:212

Under the supplied quantities and conditions, the binary event probs assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Type u_1
shared
μ :
shared
X :
Ω → ℝ
hXmeas :
hX :
∀ᵐ ω ∂μ, X ω = 0 ∨ X ω = 1
conclusion 1
μ.real {ω | X ω = 1} = ∫ ω, X ω ∂μ
conclusion 2
μ.real {ω | X ω = 0} = 1 - ∫ ω, X ω ∂μ
Proof (Lean source)
lemma binary_event_probs [IsProbabilityMeasure μ] (X : Ω → ℝ) (hXmeas : AEMeasurable X μ) (hX : ∀ᵐ ω ∂μ, X ω = 0 ∨ X ω = 1) : μ.real {ω | X ω = 1} = ∫ ω, X ω ∂μ ∧ μ.real {ω | X ω = 0} = 1 - ∫ ω, X ω ∂μ := by constructor · exact (integral_of_ae_eq_zero_or_one hXmeas hX).symm · rw [← integral_one_sub_of_ae_eq_zero_or_one hXmeas hX] have hXint : Integrable X μ := Integrable.of_mem_Icc (0 : ℝ) 1 hXmeas (by filter_upwards [hX] with ω hω rcases hω with hω | hω <;> simp [hω]) rw [integral_sub (integrable_const 1) hXint] simp
CausalSmith.Stat.LdpAteEfficiencySurface.binary_event_probs · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:225
theorem recordLaw_eq_piTheta

Under the supplied quantities and conditions, the record law eq pi theta assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Type u_1
shared
μ :
shared
Y0 :
ℕ → Ω → ℝ
shared
Y1 :
ℕ → Ω → ℝ
shared
W :
ℕ → Ω → ℝ
shared
Y :
ℕ → Ω → ℝ
shared
p :
ℝ
shared
θ :
shared
hmodel :
i :
ℕ
μ.map (privateRecord W Y i) = inputLaw θ p
Proof (Lean source)
lemma recordLaw_eq_piTheta (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (i : ℕ) : μ.map (privateRecord W Y i) = inputLaw θ p := by letI : IsProbabilityMeasure μ := hmodel.iid.1.isProbabilityMeasure have hY0dist : IdentDistrib (Y0 0) (Y0 i) μ μ := by convert (hmodel.iid.2 i).comp (by fun_prop : Measurable (fun x : ℝ × ℝ × ℝ => x.1)) using 1 <;> rfl have hY1dist : IdentDistrib (Y1 0) (Y1 i) μ μ := by convert (hmodel.iid.2 i).comp (by fun_prop : Measurable (fun x : ℝ × ℝ × ℝ => x.2.1)) using 1 <;> rfl have hWdist : IdentDistrib (W 0) (W i) μ μ := by convert (hmodel.iid.2 i).comp (by fun_prop : Measurable (fun x : ℝ × ℝ × ℝ => x.2.2)) using 1 <;> rfl have hmean0 : ∫ ω, Y0 i ω ∂μ = θ 0 := by rw [← hY0dist.integral_eq, hmodel.parameterLaw] rfl have hmean1 : ∫ ω, Y1 i ω ∂μ = θ 1 := by rw [← hY1dist.integral_eq, hmodel.parameterLaw] rfl have hbinary0 : ∀ᵐ ω ∂μ, Y0 i ω = 0 ∨ Y0 i ω = 1 := by filter_upwards [(hmodel.binary i)] with ω hω simpa using hω.1 have hbinary1 : ∀ᵐ ω ∂μ, Y1 i ω = 0 ∨ Y1 i ω = 1 := by filter_upwards [(hmodel.binary i)] with ω hω simpa using hω.2 have hbinaryW : ∀ᵐ ω ∂μ, W i ω = 0 ∨ W i ω = 1 := by filter_upwards [(hmodel.assigned i).1] with ω hω simpa using hω have hy0 := binary_event_probs μ (Y0 i) hY0dist.aemeasurable_snd hbinary0 have hy1 := binary_event_probs μ (Y1 i) hY1dist.aemeasurable_snd hbinary1 have hw := binary_event_probs μ (W i) hWdist.aemeasurable_snd hbinaryW have hm0 : Measurable (Y0 i) := (hmodel.measurable i).fst have hm1 : Measurable (Y1 i) := (hmodel.measurable i).snd.fst have hmw : Measurable (W i) := (hmodel.measurable i).snd.snd have hmy : Measurable (Y i) := by have hf : Measurable (fun ω => W i ω * Y1 i ω + (1 - W i ω) * Y0 i ω) := by fun_prop convert hf using 1 funext ω exact hmodel.consistent i ω have hmr : Measurable (privateRecord W Y i) := by unfold privateRecord apply Measurable.ite (hmw (measurableSet_singleton 0)) · exact Measurable.ite (hmy (measurableSet_singleton 0)) measurable_const measurable_const · exact Measurable.ite (hmy (measurableSet_singleton 0)) measurable_const measurable_const have hmassY0one : μ {ω | Y0 i ω = 1} = ofReal (θ 0) := by rw [← ENNReal.ofReal_toReal (measure_ne_top μ _)] change ofReal (μ.real {ω | Y0 i ω = 1}) = _ rw [hy0.1, hmean0] have hmassY0zero : μ {ω | Y0 i ω = 0} = ofReal (1 - θ 0) := by rw [← ENNReal.ofReal_toReal (measure_ne_top μ _)] change ofReal (μ.real {ω | Y0 i ω = 0}) = _ rw [hy0.2, hmean0] have hmassY1one : μ {ω | Y1 i ω = 1} = ofReal (θ 1) := by rw [← ENNReal.ofReal_toReal (measure_ne_top μ _)] change ofReal (μ.real {ω | Y1 i ω = 1}) = _ rw [hy1.1, hmean1] have hmassY1zero : μ {ω | Y1 i ω = 0} = ofReal (1 - θ 1) := by rw [← ENNReal.ofReal_toReal (measure_ne_top μ _)] change ofReal (μ.real {ω | Y1 i ω = 0}) = _ rw [hy1.2, hmean1] have hmassWone : μ {ω | W i ω = 1} = ofReal p := (hmodel.assigned i).2 have hmeanW : ∫ ω, W i ω ∂μ = p := by rw [← hw.1] change (μ {ω | W i ω = 1}).toReal = p rw [hmassWone] exact ENNReal.toReal_ofReal hmodel.assignmentInterior.1.le have hmassWzero : μ {ω | W i ω = 0} = ofReal (controlProb p) := by rw [← ENNReal.ofReal_toReal (measure_ne_top μ _)] change ofReal (μ.real {ω | W i ω = 0}) = _ rw [hw.2, hmeanW] rfl have hprod0 (a b : ℝ) : μ {ω | W i ω = a ∧ Y0 i ω = b} = μ {ω | W i ω = a} * μ {ω | Y0 i ω = b} := by have h := (hmodel.randomized i).measure_inter_preimage_eq_mul ({a} : Set ℝ) ({x : ℝ × ℝ | x.1 = b}) (measurableSet_singleton a) (measurable_fst (measurableSet_singleton b)) change μ {ω | W i ω = a ∧ Y0 i ω = b} = μ {ω | W i ω = a} * μ {ω | Y0 i ω = b} at h exact h have hprod1 (a b : ℝ) : μ {ω | W i ω = a ∧ Y1 i ω = b} = μ {ω | W i ω = a} * μ {ω | Y1 i ω = b} := by have h := (hmodel.randomized i).measure_inter_preimage_eq_mul ({a} : Set ℝ) ({x : ℝ × ℝ | x.2 = b}) (measurableSet_singleton a) (measurable_snd (measurableSet_singleton b)) change μ {ω | W i ω = a ∧ Y1 i ω = b} = μ {ω | W i ω = a} * μ {ω | Y1 i ω = b} at h exact h have hrec (ω : Ω) (hwω : W i ω = 0 ∨ W i ω = 1) : privateRecord W Y i ω = if W i ω = 0 then (if Y0 i ω = 0 then (0 : Fin 4) else 1) else if Y1 i ω = 0 then 2 else 3 := by unfold privateRecord rw [hmodel.consistent i ω] rcases hwω with h0 | h1 · simp [h0] · simp [h1] have hatom0 : μ ((privateRecord W Y i) ⁻¹' {0}) = μ {ω | W i ω = 0 ∧ Y0 i ω = 0} := by apply measure_congr filter_upwards [hbinaryW] with ω hwω change (privateRecord W Y i ω = 0) = (W i ω = 0 ∧ Y0 i ω = 0) apply propext rw [hrec ω hwω] by_cases h0 : W i ω = 0 · simp [h0] · simp [h0] split_ifs <;> decide have hatom1 : μ ((privateRecord W Y i) ⁻¹' {1}) = μ {ω | W i ω = 0 ∧ Y0 i ω = 1} := by apply measure_congr filter_upwards [hbinaryW, hbinary0, hbinary1] with ω hwω hy0ω hy1ω change (privateRecord W Y i ω = 1) = (W i ω = 0 ∧ Y0 i ω = 1) apply propext rw [hrec ω hwω] rcases hwω with h0 | h1 · rcases hy0ω with h | h <;> simp [h0, h] · rcases hy1ω with h | h <;> simp [h1, h] have hatom2 : μ ((privateRecord W Y i) ⁻¹' {2}) = μ {ω | W i ω = 1 ∧ Y1 i ω = 0} := by apply measure_congr filter_upwards [hbinaryW, hbinary0, hbinary1] with ω hwω hy0ω hy1ω change (privateRecord W Y i ω = 2) = (W i ω = 1 ∧ Y1 i ω = 0) apply propext rw [hrec ω hwω] rcases hwω with h0 | h1 · rcases hy0ω with h | h <;> simp [h0, h] · rcases hy1ω with h | h <;> simp [h1, h] have hatom3 : μ ((privateRecord W Y i) ⁻¹' {3}) = μ {ω | W i ω = 1 ∧ Y1 i ω = 1} := by apply measure_congr filter_upwards [hbinaryW, hbinary0, hbinary1] with ω hwω hy0ω hy1ω change (privateRecord W Y i ω = 3) = (W i ω = 1 ∧ Y1 i ω = 1) apply propext rw [hrec ω hwω] rcases hwω with h0 | h1 · rcases hy0ω with h | h <;> simp [h0, h] · rcases hy1ω with h | h <;> simp [h1, h] have hinput (j : Fin 4) : inputLaw θ p {j} = ofReal (piTheta θ p j) := by unfold inputLaw rw [withDensity_apply _ (measurableSet_singleton j), lintegral_singleton] simp apply Measure.ext_of_singleton intro j fin_cases j · change (μ.map (privateRecord W Y i)) {0} = inputLaw θ p {0} rw [Measure.map_apply hmr (measurableSet_singleton 0), hatom0, hprod0, hmassWzero, hmassY0zero, hinput 0] change ofReal (controlProb p) * ofReal (1 - θ 0) = ofReal (controlProb p * (1 - θ 0)) exact (ENNReal.ofReal_mul (le_of_lt (by dsimp [controlProb] exact sub_pos.mpr hmodel.assignmentInterior.2))).symm · change (μ.map (privateRecord W Y i)) {1} = inputLaw θ p {1} rw [Measure.map_apply hmr (measurableSet_singleton 1), hatom1, hprod0, hmassWzero, hmassY0one, hinput 1] change ofReal (controlProb p) * ofReal (θ 0) = ofReal (controlProb p * θ 0) exact (ENNReal.ofReal_mul (le_of_lt (by dsimp [controlProb] exact sub_pos.mpr hmodel.assignmentInterior.2))).symm · change (μ.map (privateRecord W Y i)) {2} = inputLaw θ p {2} rw [Measure.map_apply hmr (measurableSet_singleton 2), hatom2, hprod1, hmassWone, hmassY1zero, hinput 2] change ofReal p * ofReal (1 - θ 1) = ofReal (p * (1 - θ 1)) exact (ENNReal.ofReal_mul hmodel.assignmentInterior.1.le).symm · change (μ.map (privateRecord W Y i)) {3} = inputLaw θ p {3} rw [Measure.map_apply hmr (measurableSet_singleton 3), hatom3, hprod1, hmassWone, hmassY1one, hinput 3] change ofReal p * ofReal (θ 1) = ofReal (p * θ 1) exact (ENNReal.ofReal_mul hmodel.assignmentInterior.1.le).symm
CausalSmith.Stat.LdpAteEfficiencySurface.recordLaw_eq_piTheta · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:242
theorem latentRepresentation_prefixLaw

A latent representation realizes every finite prefix of the public observed-law model. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Type u_1
shared
μ :
shared
Y0 :
ℕ → Ω → ℝ
shared
Y1 :
ℕ → Ω → ℝ
shared
W :
ℕ → Ω → ℝ
shared
Y :
ℕ → Ω → ℝ
shared
p :
ℝ
shared
θ :
shared
hmodel :
μ.map (fun ω => fun i : Fin n.val => privateRecord W Y i ω)
= BinaryTrialModel θ p hmodel.meansInterior hmodel.assignmentInterior n
Proof (Lean source)
lemma latentRepresentation_prefixLaw (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (n : PositiveSampleSize) : μ.map (fun ω => fun i : Fin n.val => privateRecord W Y i ω) = BinaryTrialModel θ p hmodel.meansInterior hmodel.assignmentInterior n := by have hmeas (i : Fin n.val) : Measurable (privateRecord W Y i) := by have hm := hmodel.measurable i.val have hmw : Measurable (W i) := hm.snd.snd have hmy : Measurable (Y i) := by have hf : Measurable (fun ω => W i ω * Y1 i ω + (1 - W i ω) * Y0 i ω) := by exact hmw.mul hm.snd.fst |>.add ((measurable_const.sub hmw).mul hm.fst) convert hf using 1 funext ω exact hmodel.consistent i ω unfold privateRecord exact Measurable.ite (hmw (measurableSet_singleton 0)) (Measurable.ite (hmy (measurableSet_singleton 0)) measurable_const measurable_const) (Measurable.ite (hmy (measurableSet_singleton 0)) measurable_const measurable_const) let g : (Fin n.val) → (ℝ × ℝ × ℝ) → PrivateAlphabet := fun _ x => if x.2.2 = 0 then (if x.1 = 0 then 0 else 1) else if x.2.1 = 0 then 2 else 3 have hg (i : Fin n.val) : Measurable (g i) := by unfold g apply Measurable.ite (measurable_snd.snd (measurableSet_singleton 0)) · exact Measurable.ite (measurable_fst (measurableSet_singleton 0)) measurable_const measurable_const · exact Measurable.ite (measurable_snd.fst (measurableSet_singleton 0)) measurable_const measurable_const have hindTriple : iIndepFun (fun i : Fin n.val => fun ω => (Y0 i ω, Y1 i ω, W i ω)) μ := hmodel.iid.1.precomp Fin.val_injective have hindG := hindTriple.comp g hg have hcomp (i : Fin n.val) : g i ∘ (fun ω => (Y0 i ω, Y1 i ω, W i ω)) =ᵐ[μ] privateRecord W Y i := by filter_upwards [(hmodel.assigned i).1] with ω hw have hw' : W i ω = 0 ∨ W i ω = 1 := by simpa using hw simp only [Function.comp_apply, g, privateRecord] rw [hmodel.consistent i ω] rcases hw' with hw | hw <;> simp [hw] have hind : iIndepFun (fun i : Fin n.val => privateRecord W Y i) μ := by apply hindG.congr exact hcomp rw [hind.map_fun_eq_pi_map (fun i => (hmeas i).aemeasurable)] unfold BinaryTrialModel congr 1 funext i exact recordLaw_eq_piTheta μ Y0 Y1 W Y p θ hmodel i
CausalSmith.Stat.LdpAteEfficiencySurface.latentRepresentation_prefixLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:425
theorem binaryTrialModel_iff_latentRepresentation

A family belongs to the public observed-law model exactly when some latent binary-trial representation realizes all of its finite-prefix laws. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the binary Trial Model iff latent Representation.

Formal statement
p :
ℝ
shared
θ :
shared
hθ :
P :
P = BinaryTrialModel θ p hθ hp ↔ ∃ (Ω : Type) (mΩ : MeasurableSpace Ω), letI
Proof (Lean source)
theorem binaryTrialModel_iff_latentRepresentation (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (P : (n : PositiveSampleSize) → Measure (Fin n.val → PrivateAlphabet)) : P = BinaryTrialModel θ p hθ hp ↔ ∃ (Ω : Type) (mΩ : MeasurableSpace Ω), letI := mΩ ∃ (μ : Measure Ω) (Y0 Y1 W Y : ℕ → Ω → ℝ), LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ ∧ ∀ n, μ.map (fun ω => fun i : Fin n.val => privateRecord W Y i ω) = P n := by constructor · rintro rfl let ν := canonicalSubjectLaw θ p hθ hp let μ := Measure.infinitePi (fun _ : ℕ => ν) have hrep : LatentBinaryTrialRepresentation μ canonicalY0 canonicalY1 canonicalW canonicalY p θ := canonicalLatentRepresentation θ p hθ hp exact ⟨ℕ → ((Bool × Bool) × Bool), inferInstance, μ, canonicalY0, canonicalY1, canonicalW, canonicalY, hrep, latentRepresentation_prefixLaw μ canonicalY0 canonicalY1 canonicalW canonicalY p θ hrep⟩ · rintro ⟨Ω, mΩ, hrep⟩ letI := mΩ rcases hrep with ⟨μ, Y0, Y1, W, Y, hmodel, hP⟩ funext n rw [← hP n] exact latentRepresentation_prefixLaw μ Y0 Y1 W Y p θ hmodel n
CausalSmith.Stat.LdpAteEfficiencySurface.binaryTrialModel_iff_latentRepresentation · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:680
def privacyRatio

the privacy ratio is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
ε :
ℝ
privacyRatio ε :
ℝ
exp ε
CausalSmith.Stat.LdpAteEfficiencySurface.privacyRatio · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:713
def privacyIncrement

the privacy increment is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
ε :
ℝ
privacyIncrement ε :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.privacyIncrement · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:715
def admissiblePrivacyRatio

The paper's likelihood-ratio parameter is evaluated only at a positive privacy budget. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The admissible Privacy Ratio is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
_hε :
0 < ε
admissiblePrivacyRatio ε _hε :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.admissiblePrivacyRatio · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:718
def admissiblePrivacyIncrement

The paper's staircase increment is evaluated only at a positive privacy budget. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The admissible Privacy Increment is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
_hε :
0 < ε
admissiblePrivacyIncrement ε _hε :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.admissiblePrivacyIncrement · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:722
theorem admissiblePrivacyRatio_gt_one

Under the supplied quantities and conditions, the admissible privacy ratio gt one assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the admissible Privacy Ratio gt one.

Formal statement
ε :
ℝ
hε :
0 < ε
Proof (Lean source)
lemma admissiblePrivacyRatio_gt_one (ε : ℝ) (hε : 0 < ε) : 1 < admissiblePrivacyRatio ε hε := by exact Real.one_lt_exp_iff.mpr hε
CausalSmith.Stat.LdpAteEfficiencySurface.admissiblePrivacyRatio_gt_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:726
theorem admissiblePrivacyIncrement_pos

Under the supplied quantities and conditions, the admissible privacy increment pos assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the admissible Privacy Increment pos.

Formal statement
ε :
ℝ
hε :
0 < ε
Proof (Lean source)
lemma admissiblePrivacyIncrement_pos (ε : ℝ) (hε : 0 < ε) : 0 < admissiblePrivacyIncrement ε hε := by exact sub_pos.mpr (admissiblePrivacyRatio_gt_one ε hε)
CausalSmith.Stat.LdpAteEfficiencySurface.admissiblePrivacyIncrement_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:733
theorem admissiblePrivacyRatio_covers

Under the supplied quantities and conditions, the admissible privacy ratio covers assertion holds.

Formal statement
r :
ℝ
hr :
1 < r
∃ (ε : ℝ) (hε : 0 < ε), admissiblePrivacyRatio ε hε = r
Proof (Lean source)
lemma admissiblePrivacyRatio_covers (r : ℝ) (hr : 1 < r) : ∃ (ε : ℝ) (hε : 0 < ε), admissiblePrivacyRatio ε hε = r := by exact ⟨Real.log r, Real.log_pos hr, Real.exp_log (by linarith)⟩
CausalSmith.Stat.LdpAteEfficiencySurface.admissiblePrivacyRatio_covers · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:741
theorem admissiblePrivacyIncrement_covers

Under the supplied quantities and conditions, the admissible privacy increment covers assertion holds.

Formal statement
d :
ℝ
hd :
0 < d
∃ (ε : ℝ) (hε : 0 < ε), admissiblePrivacyIncrement ε hε = d
Proof (Lean source)
lemma admissiblePrivacyIncrement_covers (d : ℝ) (hd : 0 < d) : ∃ (ε : ℝ) (hε : 0 < ε), admissiblePrivacyIncrement ε hε = d := by refine ⟨Real.log (d + 1), Real.log_pos (by linarith), ?_⟩ simp [admissiblePrivacyIncrement, privacyIncrement, privacyRatio, Real.exp_log (show 0 < d + 1 by linarith)]
CausalSmith.Stat.LdpAteEfficiencySurface.admissiblePrivacyIncrement_covers · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:747
def patternContains

For the supplied quantities and conditions, the pattern contains is the mathematical object specified below.

Definition (Lean source)
s :
Fin 14
j :
Fin 4
patternContains s j :
Nat.testBit (s.val + 1) j.val
CausalSmith.Stat.LdpAteEfficiencySurface.patternContains · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:754
def staircasePatternSubset

The fixed enumeration embeds the fourteen nonconstant masks into the full power set. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
staircasePatternSubset s :
Finset.univ.filter (fun j => patternContains s j = true)
CausalSmith.Stat.LdpAteEfficiencySurface.staircasePatternSubset · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:759
def patternRay

For the supplied quantities and conditions, the pattern ray is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
ε :
ℝ
s :
Fin 14
j :
Fin 4
patternRay ε s j :
ℝ
1 + privacyIncrement ε * if patternContains s j then 1 else 0
CausalSmith.Stat.LdpAteEfficiencySurface.patternRay · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:764
def patternMass

For the supplied quantities and conditions, the pattern mass is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p ε :
ℝ
s :
Fin 14
patternMass θ p ε s :
ℝ
∑ j : Fin 4, piTheta θ p j * patternRay ε s j
CausalSmith.Stat.LdpAteEfficiencySurface.patternMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:769
def admissiblePatternMass

The paper's mass factor is computed on the declared probability-parameter domains. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. For the displayed quantities and conditions, these specify the stated inputs. The admissible Pattern Mass is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
_hθ :
_hp :
_hε :
0 < ε
admissiblePatternMass θ p ε _hθ _hp _hε s :
ℝ
patternMass θ p ε s
CausalSmith.Stat.LdpAteEfficiencySurface.admissiblePatternMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:773
theorem admissiblePatternMass_pos

Under the supplied quantities and conditions, the admissible pattern mass pos assertion holds. For the displayed quantities and conditions, these specify the stated inputs. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the admissible Pattern Mass pos.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
0 < admissiblePatternMass θ p ε hθ hp hε s
Proof (Lean source)
lemma admissiblePatternMass_pos (θ : TrialParameter) (p ε : ℝ) (hθ : MeanRange θ) (hp : AssignmentRange p) (hε : 0 < ε) (s : StaircasePattern) : 0 < admissiblePatternMass θ p ε hθ hp hε s := by have hπ (j : Fin 4) : 0 ≤ piTheta θ p j := by rcases hp with ⟨hp0, hp1⟩ rcases hθ with ⟨h00, h01, h10, h11⟩ fin_cases j <;> simp only [piTheta, controlProb] <;> apply mul_nonneg <;> linarith have hr (j : Fin 4) : 1 ≤ patternRay ε s j := by have hd := (admissiblePrivacyIncrement_pos ε hε).le change 0 ≤ privacyIncrement ε at hd unfold patternRay split_ifs <;> simp_all have hsum : (∑ j : Fin 4, piTheta θ p j) = 1 := by rw [Fin.sum_univ_four] change controlProb p * (1 - θ 0) + controlProb p * θ 0 + p * (1 - θ 1) + p * θ 1 = 1 dsimp [controlProb] ring have hbound : 1 ≤ patternMass θ p ε s := by rw [← hsum] unfold patternMass exact Finset.sum_le_sum fun j _ => by simpa using mul_le_mul_of_nonneg_left (hr j) (hπ j) exact lt_of_lt_of_le (by norm_num) hbound
CausalSmith.Stat.LdpAteEfficiencySurface.admissiblePatternMass_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:781
def patternGradient

For the supplied quantities and conditions, the pattern gradient is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p ε :
ℝ
s :
Fin 14
patternGradient p ε s :
fun k
=> if k = 0 then privacyIncrement ε * controlProb p * ((if patternContains s 1 then 1 else 0) - (if patternContains s 0 then 1 else 0)) else privacyIncrement ε * p * ((if patternContains s 3 then 1 else 0) - (if patternContains s 2 then 1 else 0))
CausalSmith.Stat.LdpAteEfficiencySurface.patternGradient · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:810
def staircaseMatrix

For the supplied quantities and conditions, the staircase matrix is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
ε :
ℝ
j :
Fin 4
staircaseMatrix ε α j :
ℝ
∑ s : Fin 14, α s * patternRay ε s j
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseMatrix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:821

the staircase feasible is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
ε :
ℝ
staircaseFeasible ε α :
Prop
clause 1
s :
0 ≤ α s
clause 2
j :
staircaseMatrix ε α j = 1
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseFeasible · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:826
def direction

For the supplied quantities and conditions, the direction is the mathematical object specified below.

Definition (Lean source)
t :
ℝ
direction t :
fun k => if k = 0 then t else t + 1
CausalSmith.Stat.LdpAteEfficiencySurface.direction · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:831
def projectedGradient

For the supplied quantities and conditions, the projected gradient is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p ε :
ℝ
s :
Fin 14
t :
ℝ
projectedGradient p ε s t :
ℝ
∑ k : Fin 2, patternGradient p ε s k * direction t k
CausalSmith.Stat.LdpAteEfficiencySurface.projectedGradient · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:835
def patternInformation

For the supplied quantities and conditions, the pattern information is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p ε :
ℝ
s :
Fin 14
t :
ℝ
patternInformation θ p ε s t :
ℝ
(projectedGradient p ε s t) ^ 2 / patternMass θ p ε s
CausalSmith.Stat.LdpAteEfficiencySurface.patternInformation · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:839

For the supplied quantities and conditions, the information matrix is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p ε :
ℝ
informationMatrix θ p ε α :
Matrix (Fin 2) (Fin 2) ℝ
fun a b
=> ∑ s : Fin 14, α s * patternGradient p ε s a * patternGradient p ε s b / patternMass θ p ε s
CausalSmith.Stat.LdpAteEfficiencySurface.informationMatrix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:844
def outputScore

For the supplied quantities and conditions, the output score is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p ε :
ℝ
s :
Fin 14
outputScore θ p ε s :
fun k => patternGradient p ε s k / patternMass θ p ε s
CausalSmith.Stat.LdpAteEfficiencySurface.outputScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:853
def projectedScore

For the supplied quantities and conditions, the projected score is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p ε :
ℝ
s :
Fin 14
t :
ℝ
projectedScore θ p ε s t :
ℝ
projectedGradient p ε s t / patternMass θ p ε s
CausalSmith.Stat.LdpAteEfficiencySurface.projectedScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:858

For the supplied quantities and conditions, the information objective is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p ε :
ℝ
t :
ℝ
informationObjective θ p ε α t :
ℝ
∑ s : Fin 14, α s * patternInformation θ p ε s t
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:863
def Jstar

The optimized Fisher-information value is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
Jstar θ p ε :
ℝ
sSup {z : ℝ | ∃ α : StaircaseWeight, staircaseFeasible ε α ∧ z = sInf {y : ℝ | ∃ t : ℝ, y = informationObjective θ p ε α t}}
CausalSmith.Stat.LdpAteEfficiencySurface.Jstar · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:870

The reciprocal optimized contrast variance is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
Vstar θ p ε :
ℝ
(Jstar θ p ε)⁻¹
CausalSmith.Stat.LdpAteEfficiencySurface.Vstar · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:877
def PrivateHistory

For the supplied quantities and conditions, the private history is the mathematical object specified below. The Private History is determined by the displayed parameters.

Definition (Lean source)
n :
ℕ
Fin n → Type u_2
shared
i :
Fin n
PrivateHistory i :
Type (max u_2 0)
(j : {j : Fin n // j < i}) → Z j.1
CausalSmith.Stat.LdpAteEfficiencySurface.PrivateHistory · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:885
def SequentialKernel

the sequential kernel is the mathematical object specified below.

Definition (Lean source)
n :
ℕ
Fin n → Type u_2
shared
SequentialKernel :
Type u_2
∀ i : Fin n, Kernel (Fin 4 × PrivateHistory (Z := Z) i) (Z i)
CausalSmith.Stat.LdpAteEfficiencySurface.SequentialKernel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:889

For the supplied quantities and conditions, the fixed privacy is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
epsSeq :
ℕ → ℝ
ε :
ℝ
FixedPrivacy epsSeq ε :
Prop
clause 1
0 < ε
clause 2
k :
epsSeq k = ε
CausalSmith.Stat.LdpAteEfficiencySurface.FixedPrivacy · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:895

For the supplied quantities and conditions, the sequential ldp is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
Fin n → Type u_2
shared
ε :
ℝ
Q :
SequentialLDP ε Q :
Prop
clause 1
i :
clause 2
i A :
x x' h :
Q i (x, h) A ≤ ofReal (exp ε) * Q i (x', h) A
CausalSmith.Stat.LdpAteEfficiencySurface.SequentialLDP · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:901
structure SequentialChannels

For the supplied quantities and conditions, this sequential channels packages the stated mathematical data. For the displayed quantities and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
shared
Z :
Fin n → Type u_2
shared
epsSeq :
ℕ → ℝ
ε :
ℝ
Q :
fixed :
FixedPrivacy epsSeq ε
ldp :
SequentialLDP (Z := Z) (epsSeq n) Q
CausalSmith.Stat.LdpAteEfficiencySurface.SequentialChannels · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:909

For the supplied quantities and conditions, the pilot diverges is the mathematical object specified below.

Definition (Lean source)
m :
ℕ → ℕ
PilotDiverges m :
Prop
CausalSmith.Stat.LdpAteEfficiencySurface.PilotDiverges · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:916

For the supplied quantities and conditions, the pilot sublinear is the mathematical object specified below.

Definition (Lean source)
m :
ℕ → ℕ
PilotSublinear m :
Prop
clause 1
Tendsto (fun k => (m k : ℝ) / k) atTop (nhds 0)
clause 2
k ≥ 2 :
1 ≤ m k
m k < k
CausalSmith.Stat.LdpAteEfficiencySurface.PilotSublinear · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Basic.lean:921
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.AttainmentRigidity 3 declarations Variance attainment forces equality in every certified information direction.

Directional equality and postprocessing nonmerger

Variance attainment forces equality in every certified information direction. After staircase refinement, distinct projected scores then force the active postprocessing rows to be pairwise mutually singular, giving an output cardinality lower bound for arbitrary measurable output spaces.

theorem attainment_forces_direction_lower

If a stationary channel attains the oracle variance, its Fisher information in every affine contrast direction is at least the oracle information. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the attainment forces direction lower.

Formal statement
Z :
p ε t :
ℝ
hθ :
hε :
0 < ε
Q :
Kernel (Fin 4) Z
hQ :
hattain :
Proof (Lean source)
-- @node: attainment_forces_direction_lower lemma attainment_forces_direction_lower {Z : Type*} [MeasurableSpace Z] (θ : TrialParameter) (p ε t : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP ε Q) (hattain : contrastVariance (channelFisherInfo θ p Q) = ofReal (Vstar θ p ε)) : Jstar θ p ε ≤ informationQuadratic (channelFisherInfo θ p Q) (direction t) := by let I := channelFisherInfo θ p Q have hI : I.PosSemidef := channelFisherInfo_posSemidef p θ hp hθ ε Q hQ have hJ : 0 < Jstar θ p ε := Jstar_pos_interior θ p ε hp hθ hε have hrange : contrastInRange I := by by_contra hn have htop : contrastVariance I = ⊤ := by simp [contrastVariance, hn] rw [htop, Vstar] at hattain exact ENNReal.top_ne_ofReal hattain obtain ⟨w, hw⟩ := hrange let r := ∑ k : Fin 2, contrastVector k * w k have hr : 0 < r := contrastSolution_value_pos I hI w hw have her : ofReal r = ofReal (Jstar θ p ε)⁻¹ := by rw [← contrastVariance_eq_solution_value I hI w hw] simpa [I, Vstar] using hattain have hr_eq : r = (Jstar θ p ε)⁻¹ := (ENNReal.ofReal_eq_ofReal_iff hr.le (inv_nonneg.mpr hJ.le)).mp her have hc := contrastInformation_cauchy I hI w hw t dsimp [r] at hr_eq rw [hr_eq] at hc calc Jstar θ p ε = 1 * Jstar θ p ε := by ring _ ≤ (informationQuadratic I (direction t) * (Jstar θ p ε)⁻¹) * Jstar θ p ε := mul_le_mul_of_nonneg_right hc hJ.le _ = informationQuadratic I (direction t) := by field_simp [ne_of_gt hJ]
CausalSmith.Stat.LdpAteEfficiencySurface.attainment_forces_direction_lower · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/AttainmentRigidity.lean:22
theorem attaining_staircase_refinement_direction_eq

Under a uniform directional upper bound, an attaining channel has a staircase refinement with equality in that direction, so the refinement's equality-rigidity conclusion is available. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the attaining staircase refinement direction eq.

Formal statement
Z :
p ε t :
ℝ
hθ :
hε :
0 < ε
Q :
Kernel (Fin 4) Z
hQ :
hattain :
hupper :
then
informationObjective θ p ε β t ≤ Jstar θ p ε
conclusion 1
s u :
Fin 14
α s ≠ 0
α u ≠ 0
¬ (K s) ⟂ₘ (K u)
projectedScore θ p ε s t = projectedScore θ p ε u t
Proof (Lean source)
-- @node: attaining_staircase_refinement_direction_eq lemma attaining_staircase_refinement_direction_eq {Z : Type*} [MeasurableSpace Z] (θ : TrialParameter) (p ε t : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP ε Q) (hattain : contrastVariance (channelFisherInfo θ p Q) = ofReal (Vstar θ p ε)) (hupper : ∀ β : StaircaseWeight, staircaseFeasible ε β → informationObjective θ p ε β t ≤ Jstar θ p ε) : ∃ α : StaircaseWeight, ∃ K : Kernel (Fin 14) Z, staircaseFeasible ε α ∧ IsMarkovKernel K ∧ Q = K.comp (staircaseChannel ε α) ∧ informationObjective θ p ε α t = Jstar θ p ε ∧ informationQuadratic (informationMatrix θ p ε α) (direction t) = informationQuadratic (channelFisherInfo θ p Q) (direction t) ∧ (∀ s u : Fin 14, α s ≠ 0 → α u ≠ 0 → ¬ (K s) ⟂ₘ (K u) → projectedScore θ p ε s t = projectedScore θ p ε u t) := by let epsSeq : ℕ → ℝ := fun _ ↦ ε have hfixed : FixedPrivacy epsSeq ε := ⟨hε, fun _ ↦ rfl⟩ obtain ⟨α, K, hα, hK, hfactor, hdiff, hrigid⟩ := staircase_refinement_interior p θ ε hp hθ epsSeq hfixed Q hQ have horder : informationQuadratic (channelFisherInfo θ p Q) (direction t) ≤ informationQuadratic (informationMatrix θ p ε α) (direction t) := by have hn := hdiff.dotProduct_mulVec_nonneg (direction t) simp [informationQuadratic, dotProduct, mulVec, star_trivial] at hn ⊢ linarith have hαupper : informationQuadratic (informationMatrix θ p ε α) (direction t) ≤ Jstar θ p ε := by have heq : informationObjective θ p ε α t = informationQuadratic (informationMatrix θ p ε α) (direction t) := by rw [informationObjective_eq_informationQuadratic θ p ε α t] rfl rw [← heq] exact hupper α hα have hQlower : Jstar θ p ε ≤ informationQuadratic (channelFisherInfo θ p Q) (direction t) := attainment_forces_direction_lower θ p ε t hp hθ hε Q hQ hattain have hQeq : informationQuadratic (channelFisherInfo θ p Q) (direction t) = Jstar θ p ε := le_antisymm (horder.trans hαupper) hQlower have hαeq : informationQuadratic (informationMatrix θ p ε α) (direction t) = Jstar θ p ε := le_antisymm hαupper (hQlower.trans horder) refine ⟨α, K, hα, hK, hfactor, ?_, hαeq.trans hQeq.symm, ?_⟩ · calc informationObjective θ p ε α t = informationQuadratic (informationMatrix θ p ε α) (direction t) := by rw [informationObjective_eq_informationQuadratic θ p ε α t] rfl _ = Jstar θ p ε := hαeq · exact hrigid t (hαeq.trans hQeq.symm)
CausalSmith.Stat.LdpAteEfficiencySurface.attaining_staircase_refinement_direction_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/AttainmentRigidity.lean:63
theorem outputCardinality_ge_of_attainment_direction

A certified attaining direction with positive, pairwise distinct active scores requires at least as many output atoms as active staircase rays. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the output Cardinality ge of attainment direction.

Formal statement
Z :
p ε t :
ℝ
hθ :
hε :
0 < ε
A :
Finset (Fin 14)
hupper :
then
informationObjective θ p ε β t ≤ Jstar θ p ε
hpositive :
and
informationObjective θ p ε β t = Jstar θ p ε
then
∀ s ∈ A, 0 < β s
hdistinct :
∀ s ∈ A, ∀ u ∈ A, s ≠ u → projectedScore θ p ε s t ≠ projectedScore θ p ε u t
Q :
Kernel (Fin 4) Z
hQ :
hattain :
(A.card : ℕ∞) ≤ outputCardinality θ p Q
Proof (Lean source)
-- @node: outputCardinality_ge_of_attainment_direction lemma outputCardinality_ge_of_attainment_direction {Z : Type*} [MeasurableSpace Z] (θ : TrialParameter) (p ε t : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (A : Finset (Fin 14)) (hupper : ∀ β : StaircaseWeight, staircaseFeasible ε β → informationObjective θ p ε β t ≤ Jstar θ p ε) (hpositive : ∀ β : StaircaseWeight, staircaseFeasible ε β → informationObjective θ p ε β t = Jstar θ p ε → ∀ s ∈ A, 0 < β s) (hdistinct : ∀ s ∈ A, ∀ u ∈ A, s ≠ u → projectedScore θ p ε s t ≠ projectedScore θ p ε u t) (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP ε Q) (hattain : contrastVariance (channelFisherInfo θ p Q) = ofReal (Vstar θ p ε)) : (A.card : ℕ∞) ≤ outputCardinality θ p Q := by obtain ⟨α, K, hα, hK, hfactor, hαeq, heq, hrigid⟩ := attaining_staircase_refinement_direction_eq θ p ε t hp hθ hε Q hQ hattain hupper have hpos : ∀ s ∈ A, 0 < α s := hpositive α hα hαeq have hsing : ∀ s ∈ A, ∀ u ∈ A, s ≠ u → K s ⟂ₘ K u := by intro s hs u hu hne by_contra hn exact hdistinct s hs u hu hne (hrigid s u (ne_of_gt (hpos s hs)) (ne_of_gt (hpos u hu)) hn) exact active_card_le_outputCardinality_of_pairwise_singular θ p ε hp hθ A α hpos K hK Q hfactor hsing
CausalSmith.Stat.LdpAteEfficiencySurface.outputCardinality_ge_of_attainment_direction · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/AttainmentRigidity.lean:121
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.BalancedBinary 20 declarations This file groups the four trial cells by the signed treatment--outcome bit.

Binary submodel for the balanced trial

This file groups the four trial cells by the signed treatment--outcome bit. The grouped experiment is the one-dimensional Bernoulli submodel used in the balanced randomized-response calculation.

def halfNN

the half nn is the mathematical object specified below.

Definition (Lean source)
halfNN :
⟨(1 / 2 : ℝ), by norm_num⟩
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.halfNN · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:25
def half

the half is the mathematical object specified below.

Definition (Lean source)
half :
ℝ≥0∞
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.half · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:27
def groupedChannel

Average the two full-record rows having the same signed bit. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
groupedChannel Q :
Kernel.ofFunOfCountable fun b => if b then half • (Q 0 + Q 3) else half • (Q 1 + Q 2)
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.groupedChannel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:30
theorem groupedChannel_apply

Under the supplied quantities and conditions, the grouped channel apply assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
b :
groupedChannel Q b = if b then half • (Q 0 + Q 3) else half • (Q 1 + Q 2)
Proof (Lean source)
lemma groupedChannel_apply (Q : Kernel (Fin 4) Z) (b : Bool) : groupedChannel Q b = if b then half • (Q 0 + Q 3) else half • (Q 1 + Q 2) := by rfl
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.groupedChannel_apply · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:35
theorem groupedChannel_markov

the grouped channel markov assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
Proof (Lean source)
lemma groupedChannel_markov (Q : Kernel (Fin 4) Z) [IsMarkovKernel Q] : IsMarkovKernel (groupedChannel Q) := by have hhalf : half * 2 = (1 : ENNReal) := by change (↑halfNN : ENNReal) * ↑(2 : NNReal) = ↑(1 : NNReal) rw [← ENNReal.coe_mul] congr 1 apply NNReal.eq change (1 / 2 : ℝ) * 2 = 1 norm_num constructor intro b constructor cases b <;> simp [groupedChannel_apply] all_goals calc half + half = half * 2 := by ring _ = 1 := hhalf
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.groupedChannel_markov · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:41
theorem groupedChannel_private

the grouped channel private assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
ε :
ℝ
hQ :
Proof (Lean source)
lemma groupedChannel_private (Q : Kernel (Fin 4) Z) {ε : ℝ} (hQ : StationaryLDP ε Q) : SetwisePrivate (groupedChannel Q) ε := by intro b c A hA cases b <;> cases c · simp only [groupedChannel_apply, Measure.smul_apply, hA, Measure.add_apply] calc half * (Q 1 A + Q 2 A) ≤ half * (ofReal (exp ε) * Q 1 A + ofReal (exp ε) * Q 2 A) := by gcongr exact hQ.2 A hA 1 1 exact hQ.2 A hA 2 2 _ = ofReal (exp ε) * (half * (Q 1 A + Q 2 A)) := by ring · simp only [groupedChannel_apply, Measure.smul_apply, hA, Measure.add_apply] calc half * (Q 1 A + Q 2 A) ≤ half * (ofReal (exp ε) * Q 0 A + ofReal (exp ε) * Q 3 A) := by gcongr exact hQ.2 A hA 1 0 exact hQ.2 A hA 2 3 _ = ofReal (exp ε) * (half * (Q 0 A + Q 3 A)) := by ring · simp only [groupedChannel_apply, Measure.smul_apply, hA, Measure.add_apply] calc half * (Q 0 A + Q 3 A) ≤ half * (ofReal (exp ε) * Q 1 A + ofReal (exp ε) * Q 2 A) := by gcongr exact hQ.2 A hA 0 1 exact hQ.2 A hA 3 2 _ = ofReal (exp ε) * (half * (Q 1 A + Q 2 A)) := by ring · simp only [groupedChannel_apply, Measure.smul_apply, hA, Measure.add_apply] calc half * (Q 0 A + Q 3 A) ≤ half * (ofReal (exp ε) * Q 0 A + ofReal (exp ε) * Q 3 A) := by gcongr exact hQ.2 A hA 0 0 exact hQ.2 A hA 3 3 _ = ofReal (exp ε) * (half * (Q 0 A + Q 3 A)) := by ring
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.groupedChannel_private · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:60
theorem reference_groupedChannel

the reference grouped channel assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
Proof (Lean source)
lemma reference_groupedChannel (Q : Kernel (Fin 4) Z) : reference (groupedChannel Q) = half • dominatingMeasure Q := by ext A hA simp [reference, groupedChannel_apply, dominatingMeasure, Measure.sum_apply, hA, Fin.sum_univ_succ] ring
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.reference_groupedChannel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:105
theorem groupedDensity_true

the grouped density true assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
∀ᵐ z ∂dominatingMeasure Q, rowDensity (groupedChannel Q) true z
Proof (Lean source)
lemma groupedDensity_true (Q : Kernel (Fin 4) Z) [IsMarkovKernel Q] : ∀ᵐ z ∂dominatingMeasure Q, rowDensity (groupedChannel Q) true z = channelDensity Q 0 z + channelDensity Q 3 z := by let D := dominatingMeasure Q let A := Q 0 + Q 3 letI : IsFiniteMeasure D := by dsimp [D, dominatingMeasure]; infer_instance letI : IsFiniteMeasure A := by dsimp [A]; infer_instance have hs := Measure.rnDeriv_smul_same A D (r := halfNN) (by apply ne_of_gt change 0 < (1 / 2 : ℝ) norm_num) have ha := Measure.rnDeriv_add (Q 0) (Q 3) D filter_upwards [hs, ha, (Q 0).rnDeriv_ne_top D, (Q 3).rnDeriv_ne_top D] with z hs ha h0 h3 unfold rowDensity channelDensity rw [reference_groupedChannel, groupedChannel_apply] change (((halfNN • A).rnDeriv (halfNN • D) z).toReal) = _ rw [hs, ha] change (((Q 0).rnDeriv D z + (Q 3).rnDeriv D z).toReal) = _ rw [ENNReal.toReal_add h0 h3]
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.groupedDensity_true · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:114
theorem groupedDensity_false

the grouped density false assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
∀ᵐ z ∂dominatingMeasure Q, rowDensity (groupedChannel Q) false z
Proof (Lean source)
lemma groupedDensity_false (Q : Kernel (Fin 4) Z) [IsMarkovKernel Q] : ∀ᵐ z ∂dominatingMeasure Q, rowDensity (groupedChannel Q) false z = channelDensity Q 1 z + channelDensity Q 2 z := by let D := dominatingMeasure Q let A := Q 1 + Q 2 letI : IsFiniteMeasure D := by dsimp [D, dominatingMeasure]; infer_instance letI : IsFiniteMeasure A := by dsimp [A]; infer_instance have hs := Measure.rnDeriv_smul_same A D (r := halfNN) (by apply ne_of_gt change 0 < (1 / 2 : ℝ) norm_num) have ha := Measure.rnDeriv_add (Q 1) (Q 2) D filter_upwards [hs, ha, (Q 1).rnDeriv_ne_top D, (Q 2).rnDeriv_ne_top D] with z hs ha h1 h2 unfold rowDensity channelDensity rw [reference_groupedChannel, groupedChannel_apply] change (((halfNN • A).rnDeriv (halfNN • D) z).toReal) = _ rw [hs, ha] change (((Q 1).rnDeriv D z + (Q 2).rnDeriv D z).toReal) = _ rw [ENNReal.toReal_add h1 h2]
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.groupedDensity_false · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:136
theorem abs_contrast_lt_one

Under the supplied quantities and conditions, the abs contrast lt one assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the abs contrast lt one.

Formal statement
hθ :
hbalance :
θ 0 + θ 1 = 1
|contrast θ| < 1
Proof (Lean source)
lemma abs_contrast_lt_one (θ : TrialParameter) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) : |contrast θ| < 1 := by rcases hθ with ⟨h00, h01, h10, h11⟩ rw [abs_lt] constructor <;> simp [contrast] <;> linarith
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.abs_contrast_lt_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:158
theorem piTheta_balanced_by_val

Under the supplied quantities and conditions, the pi theta balanced by val assertion holds.

Formal statement
j :
Fin 4
piTheta θ (1 / 2) j
= if j.val = 0 then controlProb (1 / 2) * (1 - θ 0) else if j.val = 1 then controlProb (1 / 2) * θ 0 else if j.val = 2 then (1 / 2) * (1 - θ 1) else (1 / 2) * θ 1
Proof (Lean source)
lemma piTheta_balanced_by_val (θ : TrialParameter) (j : Fin 4) : piTheta θ (1 / 2) j = if j.val = 0 then controlProb (1 / 2) * (1 - θ 0) else if j.val = 1 then controlProb (1 / 2) * θ 0 else if j.val = 2 then (1 / 2) * (1 - θ 1) else (1 / 2) * θ 1 := by rcases j with ⟨j, hj⟩ interval_cases j <;> rfl
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.piTheta_balanced_by_val · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:168
theorem channelOutputDensity_balanced

the channel output density balanced assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
hbalance :
θ 0 + θ 1 = 1
Q :
Kernel (Fin 4) Z
z :
Z
channelOutputDensity θ (1 / 2) Q z
= ((1 - θ 0) * (channelDensity Q 0 z + channelDensity Q 3 z) + θ 0 * (channelDensity Q 1 z + channelDensity Q 2 z)) / 2
Proof (Lean source)
lemma channelOutputDensity_balanced (θ : TrialParameter) (hbalance : θ 0 + θ 1 = 1) (Q : Kernel (Fin 4) Z) (z : Z) : channelOutputDensity θ (1 / 2) Q z = ((1 - θ 0) * (channelDensity Q 0 z + channelDensity Q 3 z) + θ 0 * (channelDensity Q 1 z + channelDensity Q 2 z)) / 2 := by have hθ1 : θ 1 = 1 - θ 0 := by linarith unfold channelOutputDensity rw [show (∑ j : Fin 4, piTheta θ (1 / 2) j * channelDensity Q j z) = piTheta θ (1 / 2) 0 * channelDensity Q 0 z + piTheta θ (1 / 2) 1 * channelDensity Q 1 z + piTheta θ (1 / 2) 2 * channelDensity Q 2 z + piTheta θ (1 / 2) 3 * channelDensity Q 3 z by simp [Fin.sum_univ_succ] ring] have hp0 : piTheta θ (1 / 2) 0 = (1 - θ 0) / 2 := by rw [piTheta_balanced_by_val] norm_num [controlProb] ring have hp1 : piTheta θ (1 / 2) 1 = θ 0 / 2 := by rw [piTheta_balanced_by_val] norm_num [controlProb] ring have hp2 : piTheta θ (1 / 2) 2 = θ 0 / 2 := by rw [piTheta_balanced_by_val, hθ1] norm_num ring have hp3 : piTheta θ (1 / 2) 3 = (1 - θ 0) / 2 := by rw [piTheta_balanced_by_val, hθ1] norm_num ring rw [hp0, hp1, hp2, hp3] ring
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.channelOutputDensity_balanced · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:178
theorem directionalDerivative_balanced

Under the supplied quantities and conditions, the directional derivative balanced assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
z :
Z
(∑ k, direction (-1 / 2) k * channelDerivativeDensity (1 / 2) Q k z)
= (channelDensity Q 0 z + channelDensity Q 3 z - (channelDensity Q 1 z + channelDensity Q 2 z)) / 4
Proof (Lean source)
lemma directionalDerivative_balanced (Q : Kernel (Fin 4) Z) (z : Z) : (∑ k, direction (-1 / 2) k * channelDerivativeDensity (1 / 2) Q k z) = (channelDensity Q 0 z + channelDensity Q 3 z - (channelDensity Q 1 z + channelDensity Q 2 z)) / 4 := by simp +decide [channelDerivativeDensity, inputDerivative, direction, controlProb, Fin.sum_univ_succ] ring
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.directionalDerivative_balanced · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:212
theorem grouped_information_eq_channelQuadratic

Under the supplied quantities and conditions, the grouped information eq channel quadratic assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the grouped information eq channel Quadratic.

Formal statement
Z :
Type u_1
shared
hθ :
hbalance :
θ 0 + θ 1 = 1
ε :
ℝ
Q :
Kernel (Fin 4) Z
hQ :
information (groupedChannel Q) (contrast θ)
Proof (Lean source)
lemma grouped_information_eq_channelQuadratic (θ : TrialParameter) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) (ε : ℝ) (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP ε Q) : information (groupedChannel Q) (contrast θ) = informationQuadratic (channelFisherInfo θ (1 / 2) Q) (direction (-1 / 2)) := by letI : IsMarkovKernel Q := hQ.1 letI : IsMarkovKernel (groupedChannel Q) := groupedChannel_markov Q have ht := abs_contrast_lt_one θ hθ hbalance rw [information_eq_contrast_integral (groupedChannel Q) (contrast θ) ht] rw [informationQuadratic_eq_channelIntegral (1 / 2) θ (by constructor <;> norm_num) hθ ε Q hQ (direction (-1 / 2))] rw [reference_groupedChannel] rw [show half • dominatingMeasure Q = halfNN • dominatingMeasure Q by rfl] rw [integral_smul_nnreal_measure] change (halfNN : ℝ) * (∫ x, balancedDensity (groupedChannel Q) x * contrast (groupedChannel Q) x ^ 2 / (1 + contrast θ * contrast (groupedChannel Q) x) ∂dominatingMeasure Q) = _ rw [← integral_const_mul] apply integral_congr_ae filter_upwards [groupedDensity_true Q, groupedDensity_false Q] with z hzT hzF rw [show (halfNN : ℝ) = 1 / 2 by rfl] unfold balancedDensity contrast rw [hzT, hzF] rw [directionalDerivative_balanced, channelOutputDensity_balanced θ hbalance] have hcontrast : contrast θ = 1 - 2 * θ 0 := by simp [contrast] linarith rw [hcontrast] by_cases hs : channelDensity Q 0 z + channelDensity Q 3 z + (channelDensity Q 1 z + channelDensity Q 2 z) = 0 · have h0 : channelDensity Q 0 z = 0 := by have hn (j : Fin 4) : 0 ≤ channelDensity Q j z := ENNReal.toReal_nonneg nlinarith [hn 0, hn 1, hn 2, hn 3] have h1 : channelDensity Q 1 z = 0 := by have hn (j : Fin 4) : 0 ≤ channelDensity Q j z := ENNReal.toReal_nonneg nlinarith [hn 0, hn 1, hn 2, hn 3] have h2 : channelDensity Q 2 z = 0 := by have hn (j : Fin 4) : 0 ≤ channelDensity Q j z := ENNReal.toReal_nonneg nlinarith [hn 0, hn 1, hn 2, hn 3] have h3 : channelDensity Q 3 z = 0 := by have hn (j : Fin 4) : 0 ≤ channelDensity Q j z := ENNReal.toReal_nonneg nlinarith [hn 0, hn 1, hn 2, hn 3] simp [h0, h1, h2, h3] · have hn (j : Fin 4) : 0 ≤ channelDensity Q j z := ENNReal.toReal_nonneg have hsumpos : 0 < channelDensity Q 0 z + channelDensity Q 3 z + (channelDensity Q 1 z + channelDensity Q 2 z) := by exact lt_of_le_of_ne (add_nonneg (add_nonneg (hn 0) (hn 3)) (add_nonneg (hn 1) (hn 2))) (Ne.symm hs) have hθ0 := hθ.1 have hθ0' := hθ.2.1 have hdenpos : 0 < (1 - θ 0) * (channelDensity Q 0 z + channelDensity Q 3 z) + θ 0 * (channelDensity Q 1 z + channelDensity Q 2 z) := by by_cases ha : channelDensity Q 0 z + channelDensity Q 3 z = 0 · have hb : 0 < channelDensity Q 1 z + channelDensity Q 2 z := by linarith rw [ha] simpa using mul_pos hθ0 hb · have ha' : 0 < channelDensity Q 0 z + channelDensity Q 3 z := lt_of_le_of_ne (add_nonneg (hn 0) (hn 3)) (Ne.symm ha) exact add_pos_of_pos_of_nonneg (mul_pos (by linarith) ha') (mul_nonneg hθ0.le (add_nonneg (hn 1) (hn 2))) have hden2 : channelDensity Q 0 z * 2 - channelDensity Q 0 z * θ 0 * 2 + channelDensity Q 3 z * 2 - channelDensity Q 3 z * θ 0 * 2 + channelDensity Q 1 z * θ 0 * 2 + channelDensity Q 2 z * θ 0 * 2 ≠ 0 := by intro hz nlinarith field_simp [hs, hden2] rw [show channelDensity Q 0 z + channelDensity Q 3 z + (channelDensity Q 1 z + channelDensity Q 2 z) + (channelDensity Q 0 z + channelDensity Q 3 z - (channelDensity Q 1 z + channelDensity Q 2 z)) * (1 - 2 * θ 0) = 2 * ((1 - θ 0) * (channelDensity Q 0 z + channelDensity Q 3 z) + θ 0 * (channelDensity Q 1 z + channelDensity Q 2 z)) by ring] field_simp [ne_of_gt hdenpos] ring
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.grouped_information_eq_channelQuadratic · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:221
theorem groupedStaircase_atom

the grouped staircase atom assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the grouped Staircase atom.

Formal statement
ε :
ℝ
hα :
b :
s :
Fin 14
= if b then α s * (patternRay ε s 0 + patternRay ε s 3) / 2 else α s * (patternRay ε s 1 + patternRay ε s 2) / 2
Proof (Lean source)
lemma groupedStaircase_atom (ε : ℝ) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (b : Bool) (s : Fin 14) : ((groupedChannel (staircaseChannel ε α) b) {s}).toReal = if b then α s * (patternRay ε s 0 + patternRay ε s 3) / 2 else α s * (patternRay ε s 1 + patternRay ε s 2) / 2 := by have hnonneg (j : Fin 4) : 0 ≤ α s * patternRay ε s j := by apply mul_nonneg (hα.1 s) unfold patternRay privacyIncrement privacyRatio split_ifs <;> simp <;> positivity have hrow (j : Fin 4) : ((staircaseChannel ε α) j {s}).toReal = α s * patternRay ε s j := by change (Measure.count.withDensity (fun u : Fin 14 => ofReal (α u * patternRay ε u j)) {s}).toReal = _ rw [withDensity_apply _ (measurableSet_singleton s), lintegral_singleton] simp exact hnonneg j letI : IsMarkovKernel (staircaseChannel ε α) := staircaseChannel_markov ε α hα have hfinite (j : Fin 4) : (staircaseChannel ε α) j {s} ≠ ∞ := measure_ne_top _ _ have hhalfReal : half.toReal = (1 / 2 : ℝ) := by rw [half, ENNReal.coe_toReal] rfl cases b · change (half * ((staircaseChannel ε α) 1 {s} + (staircaseChannel ε α) 2 {s})).toReal = _ rw [ENNReal.toReal_mul] rw [ENNReal.toReal_add (hfinite 1) (hfinite 2)] rw [hrow, hrow] rw [hhalfReal] simp ring · change (half * ((staircaseChannel ε α) 0 {s} + (staircaseChannel ε α) 3 {s})).toReal = _ rw [ENNReal.toReal_mul] rw [ENNReal.toReal_add (hfinite 0) (hfinite 3)] rw [hrow, hrow] rw [hhalfReal] simp ring
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.groupedStaircase_atom · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:309
theorem patternMass_balanced

the pattern mass balanced assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
hbalance :
θ 0 + θ 1 = 1
ε :
ℝ
s :
Fin 14
patternMass θ (1 / 2) ε s
= ((1 - θ 0) * (patternRay ε s 0 + patternRay ε s 3) + θ 0 * (patternRay ε s 1 + patternRay ε s 2)) / 2
Proof (Lean source)
lemma patternMass_balanced (θ : TrialParameter) (hbalance : θ 0 + θ 1 = 1) (ε : ℝ) (s : Fin 14) : patternMass θ (1 / 2) ε s = ((1 - θ 0) * (patternRay ε s 0 + patternRay ε s 3) + θ 0 * (patternRay ε s 1 + patternRay ε s 2)) / 2 := by unfold patternMass rw [show (∑ j : Fin 4, piTheta θ (1 / 2) j * patternRay ε s j) = piTheta θ (1 / 2) 0 * patternRay ε s 0 + piTheta θ (1 / 2) 1 * patternRay ε s 1 + piTheta θ (1 / 2) 2 * patternRay ε s 2 + piTheta θ (1 / 2) 3 * patternRay ε s 3 by simp [Fin.sum_univ_succ]; ring] have hθ1 : θ 1 = 1 - θ 0 := by linarith rw [piTheta_balanced_by_val, piTheta_balanced_by_val, piTheta_balanced_by_val, piTheta_balanced_by_val, hθ1] norm_num [controlProb] ring
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.patternMass_balanced · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:355
theorem projectedGradient_balanced

Under the supplied quantities and conditions, the projected gradient balanced assertion holds.

Formal statement
ε :
ℝ
s :
Fin 14
projectedGradient (1 / 2) ε s (-1 / 2)
= (patternRay ε s 0 + patternRay ε s 3 - (patternRay ε s 1 + patternRay ε s 2)) / 4
Proof (Lean source)
lemma projectedGradient_balanced (ε : ℝ) (s : Fin 14) : projectedGradient (1 / 2) ε s (-1 / 2) = (patternRay ε s 0 + patternRay ε s 3 - (patternRay ε s 1 + patternRay ε s 2)) / 4 := by cases h0 : patternContains s 0 <;> cases h1 : patternContains s 1 <;> cases h2 : patternContains s 2 <;> cases h3 : patternContains s 3 <;> simp [projectedGradient, patternGradient, patternRay, privacyIncrement, direction, controlProb, Fin.sum_univ_two, h0, h1, h2, h3] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.projectedGradient_balanced · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:374
theorem groupedStaircase_information_eq_objective

Under the supplied quantities and conditions, the grouped staircase information eq objective assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the grouped Staircase information eq objective.

Formal statement
hθ :
hbalance :
θ 0 + θ 1 = 1
ε :
ℝ
hε :
0 < ε
hα :
= informationObjective θ (1 / 2) ε α (-1 / 2)
Proof (Lean source)
lemma groupedStaircase_information_eq_objective (θ : TrialParameter) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) (ε : ℝ) (hε : 0 < ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : information (groupedChannel (staircaseChannel ε α)) (contrast θ) = informationObjective θ (1 / 2) ε α (-1 / 2) := by letI : IsMarkovKernel (staircaseChannel ε α) := staircaseChannel_markov ε α hα letI : IsMarkovKernel (groupedChannel (staircaseChannel ε α)) := groupedChannel_markov _ rw [information_eq_discrete _ _ (abs_contrast_lt_one θ hθ hbalance)] unfold discreteInformation informationObjective rw [tsum_fintype] apply Finset.sum_congr rfl intro s hs rw [groupedStaircase_atom ε α hα true s, groupedStaircase_atom ε α hα false s] simp rw [show (2 : ℝ)⁻¹ = (1 / 2 : ℝ) by norm_num] unfold patternInformation rw [patternMass_balanced θ hbalance ε s, projectedGradient_balanced ε s] have hcontrast : contrast θ = 1 - 2 * θ 0 := by simp [contrast] linarith rw [hcontrast] by_cases ha : α s = 0 · simp [ha] · have hm := patternMass_pos_interior θ (1 / 2) ε (by constructor <;> norm_num) hθ hε.le s have hmassne : ((1 - θ 0) * (patternRay ε s 0 + patternRay ε s 3) + θ 0 * (patternRay ε s 1 + patternRay ε s 2)) ≠ 0 := by intro h rw [patternMass_balanced θ hbalance ε s, h] at hm norm_num at hm have hd : (1 + (1 - 2 * θ 0)) * (α s * (patternRay ε s 0 + patternRay ε s 3) / 2) + (1 - (1 - 2 * θ 0)) * (α s * (patternRay ε s 1 + patternRay ε s 2) / 2) ≠ 0 := by rw [show (1 + (1 - 2 * θ 0)) * (α s * (patternRay ε s 0 + patternRay ε s 3) / 2) + (1 - (1 - 2 * θ 0)) * (α s * (patternRay ε s 1 + patternRay ε s 2) / 2) = α s * ((1 - θ 0) * (patternRay ε s 0 + patternRay ε s 3) + θ 0 * (patternRay ε s 1 + patternRay ε s 2)) by ring] exact mul_ne_zero ha hmassne field_simp [ha, hd, ne_of_gt hm] rw [show (patternRay ε s 0 + patternRay ε s 3) * (1 + (1 - 2 * θ 0)) + (patternRay ε s 1 + patternRay ε s 2) * (1 - (1 - 2 * θ 0)) = 2 * ((1 - θ 0) * (patternRay ε s 0 + patternRay ε s 3) + θ 0 * (patternRay ε s 1 + patternRay ε s 2)) by ring] field_simp [hmassne] ring
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.groupedStaircase_information_eq_objective · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:386
theorem informationObjective_balanced_le_sharp

Under the supplied quantities and conditions, the information objective balanced le sharp assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Objective balanced le sharp.

Formal statement
hθ :
hbalance :
θ 0 + θ 1 = 1
ε :
ℝ
hε :
0 < ε
hα :
informationObjective θ (1 / 2) ε α (-1 / 2)
≤ contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2)
Proof (Lean source)
lemma informationObjective_balanced_le_sharp (θ : TrialParameter) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) (ε : ℝ) (hε : 0 < ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : informationObjective θ (1 / 2) ε α (-1 / 2) ≤ contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2) := by letI : IsMarkovKernel (staircaseChannel ε α) := staircaseChannel_markov ε α hα letI : IsMarkovKernel (groupedChannel (staircaseChannel ε α)) := groupedChannel_markov _ rw [← groupedStaircase_information_eq_objective θ hθ hbalance ε hε α hα] exact information_le_sharp (groupedChannel (staircaseChannel ε α)) ε (contrast θ) hε (abs_contrast_lt_one θ hθ hbalance) (groupedChannel_private _ ⟨inferInstance, fun A hA j j' => staircaseChannel_private ε hε α hα A j j'⟩)
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.informationObjective_balanced_le_sharp · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:447
theorem Jstar_balanced_le_sharp

Under the supplied quantities and conditions, the jstar balanced le sharp assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Jstar balanced le sharp.

Formal statement
hθ :
hbalance :
θ 0 + θ 1 = 1
ε :
ℝ
hε :
0 < ε
Jstar θ (1 / 2) ε
≤ contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2)
Proof (Lean source)
lemma Jstar_balanced_le_sharp (θ : TrialParameter) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) (ε : ℝ) (hε : 0 < ε) : Jstar θ (1 / 2) ε ≤ contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2) := by refine (Jstar_le_upperEnvelope θ (1 / 2) ε (by constructor <;> norm_num) hθ hε.le (-1 / 2)).trans ?_ obtain ⟨α, hα, hupper⟩ := upperEnvelope_attained θ (1 / 2) ε (-1 / 2) hε.le rw [hupper] exact informationObjective_balanced_le_sharp θ hθ hbalance ε hε α hα
CausalSmith.Stat.LdpAteEfficiencySurface.BalancedBinary.Jstar_balanced_le_sharp · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/BalancedBinary.lean:469
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.CenteredR5Certificate 42 declarations Explicit centered five-ray certificate

Explicit centered five-ray certificate

def centeredR5Scale

For the supplied quantities and conditions, the centered r5 scale is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
centeredR5Scale p :
ℝ
sqrt (8 * p ^ 2 / (5 * (1 + p)))
def centeredR5Denom

For the supplied quantities and conditions, the centered r5 denom is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
centeredR5Denom p :
ℝ
1 - 2 * p + centeredR5Scale p
def centeredR5Direction

For the supplied quantities and conditions, the centered r5 direction is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
centeredR5Direction p :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Direction · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:18
def centeredR5Mix

For the supplied quantities and conditions, the centered r5 mix is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
centeredR5Mix p :
ℝ
def centeredR5Value

For the supplied quantities and conditions, the centered r5 value is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
centeredR5Value p :
ℝ
centeredR5Scale p ^ 2 * (1 - p) ^ 2 / centeredR5Denom p ^ 2
def centeredR5Dual

For the supplied quantities and conditions, the centered r5 dual is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
centeredR5Dual p :
Fin 4 → ℝ
fun j => if j.val < 2 then -centeredR5Value p / 4 else 3 * centeredR5Value p / 4
def centeredR5LeftScore

For the supplied quantities and conditions, the centered r5 left score is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
centeredR5LeftScore p :
ℝ
p - (1 - 2 * p) * centeredR5Direction p
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5LeftScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:33
def centeredR5RightScore

For the supplied quantities and conditions, the centered r5 right score is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
centeredR5RightScore p :
ℝ
2 * p * (centeredR5Direction p + 1) / (1 + p)
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5RightScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:37
def centeredR5InformationTable

For the supplied quantities and conditions, the centered r5 information table is the mathematical object specified below.

Definition (Lean source)
p t :
ℝ
s :
Fin 14
centeredR5InformationTable p t s :
ℝ
match s.val with | 0 | 1
=> 4 * (1 - p) ^ 2 * t ^ 2 / (2 - p) | 2 => 0 | 3 | 7 => 4 * p ^ 2 * (t + 1) ^ 2 / (1 + p) | 4 | 9 => 2 * (p + t) ^ 2 | 5 | 8 => 2 * (p - (1 - 2 * p) * t) ^ 2 | 6 | 10 => 4 * p ^ 2 * (t + 1) ^ 2 / (3 - p) | 11 => 0 | _ => 4 * (1 - p) ^ 2 * t ^ 2 / (2 + p)
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5InformationTable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:41
def centeredR5DualCoeff

For the supplied quantities and conditions, the centered r5 dual coeff is the mathematical object specified below.

Definition (Lean source)
s :
Fin 14
centeredR5DualCoeff s :
ℝ
match s.val with | 0 | 1
=> 1 / 2 | 2 => 0 | 3 | 7 => 5 / 2 | 4 | 9 => 2 | 5 | 8 => 2 | 6 | 10 => 3 / 2 | 11 => 4 | _ => 7 / 2
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5DualCoeff · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:53
def centeredR5Weight

For the supplied quantities and conditions, the centered r5 weight is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
centeredR5Weight p :
fun s
=> if s = 5 ∨ s = 8 then centeredR5Mix p / 4 else if s = 2 ∨ s = 3 ∨ s = 7 then (1 - centeredR5Mix p) / 5 else 0
theorem centered_piTheta

Under the supplied quantities and conditions, the centered pi theta assertion holds.

Formal statement
p :
ℝ
j :
Fin 4
piTheta (fun _ => (1 / 2 : ℝ)) p j = if j.val < 2 then (1 - p) / 2 else p / 2
Proof (Lean source)
lemma centered_piTheta (p : ℝ) (j : Fin 4) : piTheta (fun _ => (1 / 2 : ℝ)) p j = if j.val < 2 then (1 - p) / 2 else p / 2 := by rw [centered_piTheta_by_val] rcases j with ⟨j, hj⟩ interval_cases j <;> norm_num [controlProb] <;> ring
theorem centered_patternMass

Under the supplied quantities and conditions, the centered pattern mass assertion holds.

Formal statement
p ε :
ℝ
s :
Fin 14
patternMass (fun _ => (1 / 2 : ℝ)) p ε s
= ∑ j : Fin 4, (if j.val < 2 then (1 - p) / 2 else p / 2) * patternRay ε s j
Proof (Lean source)
lemma centered_patternMass (p ε : ℝ) (s : Fin 14) : patternMass (fun _ => (1 / 2 : ℝ)) p ε s = ∑ j : Fin 4, (if j.val < 2 then (1 - p) / 2 else p / 2) * patternRay ε s j := by unfold patternMass simp_rw [centered_piTheta]
CausalSmith.Stat.LdpAteEfficiencySurface.centered_patternMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:88
theorem centered_patternMass_inv

Under the supplied quantities and conditions, the centered pattern mass inv assertion holds.

Formal statement
p ε :
ℝ
s :
Fin 14
patternMass (fun _ => (2 : ℝ)⁻¹) p ε s
= ∑ j : Fin 4, (if j.val < 2 then (1 - p) / 2 else p / 2) * patternRay ε s j
Proof (Lean source)
lemma centered_patternMass_inv (p ε : ℝ) (s : Fin 14) : patternMass (fun _ => (2 : ℝ)⁻¹) p ε s = ∑ j : Fin 4, (if j.val < 2 then (1 - p) / 2 else p / 2) * patternRay ε s j := by simpa only [one_div] using centered_patternMass p ε s
CausalSmith.Stat.LdpAteEfficiencySurface.centered_patternMass_inv · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:96
theorem centered_patternInformation

Under the supplied quantities and conditions, the centered pattern information assertion holds.

Formal statement
p ε t :
ℝ
s :
Fin 14
patternInformation (fun _ => (2 : ℝ)⁻¹) p ε s t
= projectedGradient p ε s t ^ 2 / (∑ j : Fin 4, (if j.val < 2 then (1 - p) / 2 else p / 2) * patternRay ε s j)
Proof (Lean source)
lemma centered_patternInformation (p ε t : ℝ) (s : Fin 14) : patternInformation (fun _ => (2 : ℝ)⁻¹) p ε s t = projectedGradient p ε s t ^ 2 / (∑ j : Fin 4, (if j.val < 2 then (1 - p) / 2 else p / 2) * patternRay ε s j) := by rw [patternInformation, centered_patternMass_inv]
CausalSmith.Stat.LdpAteEfficiencySurface.centered_patternInformation · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:103
theorem centered_projectedScore

Under the supplied quantities and conditions, the centered projected score assertion holds.

Formal statement
p ε t :
ℝ
s :
Fin 14
projectedScore (fun _ => (2 : ℝ)⁻¹) p ε s t
= projectedGradient p ε s t / (∑ j : Fin 4, (if j.val < 2 then (1 - p) / 2 else p / 2) * patternRay ε s j)
Proof (Lean source)
lemma centered_projectedScore (p ε t : ℝ) (s : Fin 14) : projectedScore (fun _ => (2 : ℝ)⁻¹) p ε s t = projectedGradient p ε s t / (∑ j : Fin 4, (if j.val < 2 then (1 - p) / 2 else p / 2) * patternRay ε s j) := by rw [projectedScore, centered_patternMass_inv]
CausalSmith.Stat.LdpAteEfficiencySurface.centered_projectedScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:112
theorem centeredR5_information_table

Under the supplied quantities and conditions, the centered r5 information table assertion holds.

Formal statement
p t :
ℝ
s :
Fin 14
patternInformation (fun _ => (1 / 2 : ℝ)) p (log 3) s t
Proof (Lean source)
lemma centeredR5_information_table (p t : ℝ) (s : Fin 14) : patternInformation (fun _ => (1 / 2 : ℝ)) p (log 3) s t = centeredR5InformationTable p t s := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) simp only [one_div] rw [centered_patternInformation] rcases s with ⟨s, hs⟩ interval_cases s <;> simp +decide [centeredR5InformationTable, projectedGradient, patternGradient, patternRay, patternContains, controlProb, direction, privacyIncrement, privacyRatio, he, Fin.sum_univ_succ] <;> try ring
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_information_table · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:122
theorem centeredR5_dual_table

Under the supplied quantities and conditions, the centered r5 dual table assertion holds.

Formal statement
p :
ℝ
s :
Fin 14
Proof (Lean source)
lemma centeredR5_dual_table (p : ℝ) (s : Fin 14) : dualRay (log 3) (centeredR5Dual p) s = centeredR5DualCoeff s * centeredR5Value p := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) rcases s with ⟨s, hs⟩ interval_cases s <;> simp +decide [centeredR5DualCoeff, dualRay, centeredR5Dual, patternRay, patternContains, privacyIncrement, privacyRatio, he, Fin.sum_univ_succ] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_dual_table · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:135
theorem centeredR5Scale_sq

Under the supplied quantities and conditions, the centered r5 scale sq assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
centeredR5Scale p ^ 2 = 8 * p ^ 2 / (5 * (1 + p))
Proof (Lean source)
lemma centeredR5Scale_sq (p : ℝ) (hp0 : 0 < p) : centeredR5Scale p ^ 2 = 8 * p ^ 2 / (5 * (1 + p)) := by unfold centeredR5Scale rw [Real.sq_sqrt] positivity
theorem centeredR5Scale_bounds

Under the supplied quantities and conditions, the centered r5 scale bounds assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
conclusion 1
conclusion 2
centeredR5Scale p < 2 * p
Proof (Lean source)
lemma centeredR5Scale_bounds (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : p < centeredR5Scale p ∧ centeredR5Scale p < 2 * p := by have hpden : 0 < 5 * (1 + p) := by positivity have hs0 : 0 ≤ centeredR5Scale p := Real.sqrt_nonneg _ have hs2 := centeredR5Scale_sq p hp0 field_simp [ne_of_gt hpden] at hs2 constructor · nlinarith [sq_nonneg (centeredR5Scale p - p)] · nlinarith [sq_nonneg (2 * p - centeredR5Scale p)]
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Scale_bounds · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:153
theorem centeredR5Denom_pos

Under the supplied quantities and conditions, the centered r5 denom pos assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
Proof (Lean source)
lemma centeredR5Denom_pos (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : 0 < centeredR5Denom p := by have hs0 : 0 ≤ centeredR5Scale p := Real.sqrt_nonneg _ unfold centeredR5Denom linarith
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Denom_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:164
theorem centeredR5Mix_mem_Ioo

Under the supplied quantities and conditions, the centered r5 mix mem ioo assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
conclusion 1
conclusion 2
Proof (Lean source)
lemma centeredR5Mix_mem_Ioo (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : 0 < centeredR5Mix p ∧ centeredR5Mix p < 1 := by have hd := centeredR5Denom_pos p hp0 hp1 have hs := (centeredR5Scale_bounds p hp0 hp1).1 unfold centeredR5Mix constructor · exact div_pos (hp0.trans hs) hd · rw [div_lt_one hd] unfold centeredR5Denom linarith
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Mix_mem_Ioo · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:171
theorem centeredR5Direction_neg

Under the supplied quantities and conditions, the centered r5 direction neg assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
Proof (Lean source)
lemma centeredR5Direction_neg (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : centeredR5Direction p < 0 := by exact div_neg_of_neg_of_pos (sub_neg.mpr (centeredR5Scale_bounds p hp0 hp1).1) (centeredR5Denom_pos p hp0 hp1)
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Direction_neg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:183
theorem centeredR5LeftScore_pos

Under the supplied quantities and conditions, the centered r5 left score pos assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
Proof (Lean source)
lemma centeredR5LeftScore_pos (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : 0 < centeredR5LeftScore p := by have ht := centeredR5Direction_neg p hp0 hp1 unfold centeredR5LeftScore nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5LeftScore_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:191
theorem centeredR5RightScore_pos

Under the supplied quantities and conditions, the centered r5 right score pos assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
Proof (Lean source)
lemma centeredR5RightScore_pos (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : 0 < centeredR5RightScore p := by have hd := centeredR5Denom_pos p hp0 hp1 have htp1 : 0 < centeredR5Direction p + 1 := by unfold centeredR5Direction centeredR5Denom have hd' : 1 - 2 * p + centeredR5Scale p ≠ 0 := by exact ne_of_gt hd have hd'' : 1 - p * 2 + centeredR5Scale p ≠ 0 := by intro h apply hd' nlinarith rw [show (p - centeredR5Scale p) / (1 - 2 * p + centeredR5Scale p) + 1 = (1 - p) / (1 - 2 * p + centeredR5Scale p) by field_simp [hd', hd''] ring] exact div_pos (by linarith) hd unfold centeredR5RightScore positivity
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5RightScore_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:199
theorem centeredR5Direction_add_one

Under the supplied quantities and conditions, the centered r5 direction add one assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
Proof (Lean source)
lemma centeredR5Direction_add_one (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : centeredR5Direction p + 1 = (1 - p) / centeredR5Denom p := by have hd := ne_of_gt (centeredR5Denom_pos p hp0 hp1) unfold centeredR5Direction field_simp [hd] unfold centeredR5Denom ring
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Direction_add_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:220
theorem centeredR5_common_score

Under the supplied quantities and conditions, the centered r5 common score assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
p - (1 - 2 * p) * centeredR5Direction p = centeredR5Scale p * (1 - p) / centeredR5Denom p
Proof (Lean source)
lemma centeredR5_common_score (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : p - (1 - 2 * p) * centeredR5Direction p = centeredR5Scale p * (1 - p) / centeredR5Denom p := by have hd := ne_of_gt (centeredR5Denom_pos p hp0 hp1) unfold centeredR5Direction field_simp [hd] unfold centeredR5Denom ring
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_common_score · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:229
theorem centeredR5Value_eq_common_score_sq

Under the supplied quantities and conditions, the centered r5 value eq common score sq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
centeredR5Value p = (p - (1 - 2 * p) * centeredR5Direction p) ^ 2
Proof (Lean source)
lemma centeredR5Value_eq_common_score_sq (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : centeredR5Value p = (p - (1 - 2 * p) * centeredR5Direction p) ^ 2 := by rw [centeredR5_common_score p hp0 hp1] unfold centeredR5Value ring
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Value_eq_common_score_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:239
theorem centeredR5Value_pos

Under the supplied quantities and conditions, the centered r5 value pos assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
Proof (Lean source)
lemma centeredR5Value_pos (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : 0 < centeredR5Value p := by unfold centeredR5Value have hs : 0 < centeredR5Scale p := hp0.trans (centeredR5Scale_bounds p hp0 hp1).1 have hd := centeredR5Denom_pos p hp0 hp1 exact div_pos (mul_pos (sq_pos_of_pos hs) (sq_pos_of_pos (by linarith))) (sq_pos_of_pos hd)
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Value_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:248
theorem centeredR5_slack_mask12

Under the supplied quantities and conditions, the centered r5 slack mask12 assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
4 * (1 - p) ^ 2 * centeredR5Direction p ^ 2 / (2 - p) < centeredR5Value p / 2
Proof (Lean source)
lemma centeredR5_slack_mask12 (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : 4 * (1 - p) ^ 2 * centeredR5Direction p ^ 2 / (2 - p) < centeredR5Value p / 2 := by have hd := centeredR5Denom_pos p hp0 hp1 have hd' := ne_of_gt hd have hp2 : 0 < 2 - p := by linarith have hr := centeredR5_mask12_reduced p hp0 hp1 have hq : 0 < (1 - p) ^ 2 := sq_pos_of_pos (by linarith) unfold centeredR5Direction centeredR5Value rw [div_lt_div_iff₀ hp2 (by positivity : (0 : ℝ) < 2)] field_simp [hd'] nlinarith [mul_lt_mul_of_pos_left hr hq]
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_slack_mask12 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:272
theorem centeredR5_slack_mask5_10

Under the supplied quantities and conditions, the centered r5 slack mask5 10 assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
2 * (p + centeredR5Direction p) ^ 2 < 2 * centeredR5Value p
Proof (Lean source)
lemma centeredR5_slack_mask5_10 (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : 2 * (p + centeredR5Direction p) ^ 2 < 2 * centeredR5Value p := by have hd := centeredR5Denom_pos p hp0 hp1 have hd' := ne_of_gt hd have hsb := centeredR5Scale_bounds p hp0 hp1 have hq : 0 < 1 - p := by linarith have hpt : p + centeredR5Direction p = (1 - p) * (2 * p - centeredR5Scale p) / centeredR5Denom p := by unfold centeredR5Direction field_simp [hd'] unfold centeredR5Denom ring have hl := centeredR5_common_score p hp0 hp1 have hpt0 : 0 < p + centeredR5Direction p := by rw [hpt] exact div_pos (mul_pos hq (sub_pos.mpr hsb.2)) hd have hlt : p + centeredR5Direction p < p - (1 - 2 * p) * centeredR5Direction p := by rw [hpt, hl, div_lt_div_iff_of_pos_right hd] nlinarith [mul_pos hq (sub_pos.mpr hsb.1)] have hl0 : 0 < p - (1 - 2 * p) * centeredR5Direction p := by rw [hl] exact div_pos (mul_pos (hp0.trans hsb.1) hq) hd rw [centeredR5Value_eq_common_score_sq p hp0 hp1] nlinarith [mul_pos (add_pos hpt0 hl0) (sub_pos.mpr hlt)]
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_slack_mask5_10 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:286
theorem centeredR5_slack_mask7_11

Under the supplied quantities and conditions, the centered r5 slack mask7 11 assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
4 * p ^ 2 * (centeredR5Direction p + 1) ^ 2 / (3 - p) < (3 / 2 : ℝ) * centeredR5Value p
Proof (Lean source)
lemma centeredR5_slack_mask7_11 (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : 4 * p ^ 2 * (centeredR5Direction p + 1) ^ 2 / (3 - p) < (3 / 2 : ℝ) * centeredR5Value p := by have hp3 : 0 < 3 - p := by linarith have hd := centeredR5Denom_pos p hp0 hp1 have hd' := ne_of_gt hd have hs2 := centeredR5Scale_sq p hp0 rw [centeredR5Direction_add_one p hp0 hp1] unfold centeredR5Value rw [div_lt_iff₀ hp3] field_simp [hd'] field_simp at hs2 have hspos : 0 < centeredR5Scale p := hp0.trans (centeredR5Scale_bounds p hp0 hp1).1 have hc : 8 * p ^ 2 < 3 * centeredR5Scale p ^ 2 * (3 - p) := by nlinarith [sq_pos_of_pos hspos] have hq : 0 < (1 - p) ^ 2 := sq_pos_of_pos (by linarith) nlinarith [mul_lt_mul_of_pos_right hc hq]
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_slack_mask7_11 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:314
theorem centeredR5_slack_mask12_zero

Under the supplied quantities and conditions, the centered r5 slack mask12 zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
(0 : ℝ) < 4 * centeredR5Value p
Proof (Lean source)
lemma centeredR5_slack_mask12_zero (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : (0 : ℝ) < 4 * centeredR5Value p := by exact mul_pos (by norm_num) (centeredR5Value_pos p hp0 hp1)
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_slack_mask12_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:335
theorem centeredR5_slack_mask13_14

Under the supplied quantities and conditions, the centered r5 slack mask13 14 assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
4 * (1 - p) ^ 2 * centeredR5Direction p ^ 2 / (2 + p) < (7 / 2 : ℝ) * centeredR5Value p
Proof (Lean source)
lemma centeredR5_slack_mask13_14 (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : 4 * (1 - p) ^ 2 * centeredR5Direction p ^ 2 / (2 + p) < (7 / 2 : ℝ) * centeredR5Value p := by have hd := centeredR5Denom_pos p hp0 hp1 have hd' := ne_of_gt hd have hp2 : 0 < 2 + p := by linarith have hr := centeredR5_mask12_reduced p hp0 hp1 have hq : 0 < (1 - p) ^ 2 := sq_pos_of_pos (by linarith) have hlarge : 8 * (p - centeredR5Scale p) ^ 2 < 7 * (2 + p) * centeredR5Scale p ^ 2 := by have hspos : 0 < centeredR5Scale p := hp0.trans (centeredR5Scale_bounds p hp0 hp1).1 nlinarith [sq_pos_of_pos hspos] unfold centeredR5Direction centeredR5Value rw [div_lt_iff₀ hp2] field_simp [hd'] nlinarith [mul_lt_mul_of_pos_left hlarge hq]
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_slack_mask13_14 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:340
theorem centeredR5Weight_feasible

Under the supplied quantities and conditions, the centered r5 weight feasible assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
Proof (Lean source)
lemma centeredR5Weight_feasible (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : staircaseFeasible (log 3) (centeredR5Weight p) := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) obtain ⟨hmix0, hmix1⟩ := centeredR5Mix_mem_Ioo p hp0 hp1 constructor · intro s simp only [centeredR5Weight] split_ifs <;> positivity · intro j fin_cases j <;> simp +decide [staircaseMatrix, centeredR5Weight, patternRay, patternContains, privacyRatio, privacyIncrement, he, Fin.sum_univ_succ] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Weight_feasible · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:360
theorem centeredR5Weight_active

Under the supplied quantities and conditions, the centered r5 weight active assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
conclusion 1
conclusion 2
s ∈ r5Active :
Proof (Lean source)
lemma centeredR5Weight_active (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : activeSupport (centeredR5Weight p) r5Active ∧ ∀ s ∈ r5Active, 0 < centeredR5Weight p s := by obtain ⟨hm0, hm1⟩ := centeredR5Mix_mem_Ioo p hp0 hp1 constructor · intro s rcases s with ⟨s, hs⟩ interval_cases s <;> simp_all [centeredR5Weight, r5Active] <;> linarith · intro s hs rcases s with ⟨s, hslt⟩ interval_cases s <;> simp_all [centeredR5Weight, r5Active] <;> positivity
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Weight_active · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:375
theorem centeredR5Weight_stationary

Under the supplied quantities and conditions, the centered r5 weight stationary assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
(∑ s : Fin 14, centeredR5Weight p s * patternInformationSlope (fun _ => (1 / 2 : ℝ)) p (log 3) s (centeredR5Direction p))
= 0
Proof (Lean source)
lemma centeredR5Weight_stationary (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : (∑ s : Fin 14, centeredR5Weight p s * patternInformationSlope (fun _ => (1 / 2 : ℝ)) p (log 3) s (centeredR5Direction p)) = 0 := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have hd := centeredR5Denom_pos p hp0 hp1 have hd' : 1 + centeredR5Scale p - p * 2 ≠ 0 := by intro hz unfold centeredR5Denom at hd nlinarith have hs2 := centeredR5Scale_sq p hp0 unfold patternInformationSlope patternMass simp_rw [centered_piTheta] simp +decide [centeredR5Weight, centeredR5Direction, centeredR5Mix, centeredR5Denom, projectedGradient, patternGradient, patternRay, patternContains, controlProb, direction, privacyIncrement, privacyRatio, he, Fin.sum_univ_succ] ring_nf field_simp [hd'] field_simp at hs2 nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5Weight_stationary · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:388
theorem centeredR5_active_dual_equalities

Under the supplied quantities and conditions, the centered r5 active dual equalities assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
s ∈ r5Active :
= patternInformation (fun _ => (1 / 2 : ℝ)) p (log 3) s (centeredR5Direction p)
Proof (Lean source)
lemma centeredR5_active_dual_equalities (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : ∀ s ∈ r5Active, dualRay (log 3) (centeredR5Dual p) s = patternInformation (fun _ => (1 / 2 : ℝ)) p (log 3) s (centeredR5Direction p) := by intro s hs rw [centeredR5_dual_table, centeredR5_information_table] have hs2 := centeredR5Scale_sq p hp0 have ht := centeredR5Direction_add_one p hp0 hp1 have hv := centeredR5Value_eq_common_score_sq p hp0 hp1 rcases s with ⟨s, hsl⟩ interval_cases s <;> simp_all [r5Active, centeredR5DualCoeff, centeredR5InformationTable] all_goals have hp1' : p < 1 / 2 := by simpa only [one_div] using hp1 rw [centeredR5_common_score p hp0 hp1'] have hd := ne_of_gt (centeredR5Denom_pos p hp0 hp1') field_simp [hd] field_simp at hs2 nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_active_dual_equalities · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:415
theorem centeredR5_inactive_dual_slacks

Under the supplied quantities and conditions, the centered r5 inactive dual slacks assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
s ∉ r5Active :
patternInformation (fun _ => (1 / 2 : ℝ)) p (log 3) s (centeredR5Direction p) < dualRay (log 3) (centeredR5Dual p) s
Proof (Lean source)
lemma centeredR5_inactive_dual_slacks (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : ∀ s ∉ r5Active, patternInformation (fun _ => (1 / 2 : ℝ)) p (log 3) s (centeredR5Direction p) < dualRay (log 3) (centeredR5Dual p) s := by intro s hs rw [centeredR5_dual_table, centeredR5_information_table] have hA := centeredR5_slack_mask12 p hp0 hp1 have hB := centeredR5_slack_mask5_10 p hp0 hp1 have hC := centeredR5_slack_mask7_11 p hp0 hp1 have hD := centeredR5_slack_mask12_zero p hp0 hp1 have hE := centeredR5_slack_mask13_14 p hp0 hp1 rcases s with ⟨s, hsl⟩ interval_cases s <;> simp_all [r5Active, centeredR5DualCoeff, centeredR5InformationTable] all_goals convert hA using 1 ring
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_inactive_dual_slacks · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:438
theorem centeredR5_active_scores_pairwise_ne

Under the supplied quantities and conditions, the centered r5 active scores pairwise ne assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
s ∈ r5Active :
u ∈ r5Active :
s ≠ u
projectedScore (fun _ => (1 / 2 : ℝ)) p (log 3) s (centeredR5Direction p)
≠ projectedScore (fun _ => (1 / 2 : ℝ)) p (log 3) u (centeredR5Direction p)
Proof (Lean source)
lemma centeredR5_active_scores_pairwise_ne (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : ∀ s ∈ r5Active, ∀ u ∈ r5Active, s ≠ u → projectedScore (fun _ => (1 / 2 : ℝ)) p (log 3) s (centeredR5Direction p) ≠ projectedScore (fun _ => (1 / 2 : ℝ)) p (log 3) u (centeredR5Direction p) := by intro s hs u hu hne wlog hlt : s.val < u.val generalizing s u · apply Ne.symm apply this u hu s hs (Ne.symm hne) omega have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have hd := centeredR5Denom_pos p hp0 hp1 have hd' : 1 + centeredR5Scale p - p * 2 ≠ 0 := by intro hz unfold centeredR5Denom at hd nlinarith have hd2 : 1 - p * 2 + centeredR5Scale p ≠ 0 := by intro hz apply hd' nlinarith have hsb := centeredR5Scale_bounds p hp0 hp1 have hs2 := centeredR5Scale_sq p hp0 rcases s with ⟨s, hslt⟩ rcases u with ⟨u, hult⟩ interval_cases s <;> interval_cases u <;> simp_all [r5Active] all_goals unfold projectedScore simp_rw [centered_patternMass_inv] simp +decide [centeredR5Direction, centeredR5Denom, projectedGradient, patternGradient, patternRay, patternContains, controlProb, direction, privacyIncrement, privacyRatio, he, Fin.sum_univ_succ] ring_nf field_simp [hd', hd2] ring_nf field_simp [hd', hd2] field_simp at hs2 simp only [inv_eq_one_div] at * field_simp [hd', hd2] at * ring_nf at * nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_active_scores_pairwise_ne · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:461
theorem centeredR5_supported_stationary_eq

Under the supplied quantities and conditions, the centered r5 supported stationary eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the centered R5 supported stationary eq.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
hβ :
hout :
∀ s ∉ r5Active, β s = 0
hstat :
∑ s : Fin 14, β s * patternInformationSlope (fun _ => (1 / 2 : ℝ)) p (log 3) s (centeredR5Direction p)
= 0
Proof (Lean source)
lemma centeredR5_supported_stationary_eq (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) (β : StaircaseWeight) (hβ : staircaseFeasible (log 3) β) (hout : ∀ s ∉ r5Active, β s = 0) (hstat : ∑ s : Fin 14, β s * patternInformationSlope (fun _ => (1 / 2 : ℝ)) p (log 3) s (centeredR5Direction p) = 0) : β = centeredR5Weight p := by obtain ⟨h23, h37, h58, hnorm⟩ := r5_supported_feasible_coordinates (log 3) (Real.log_pos (by norm_num)) β hβ hout have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have hd := centeredR5Denom_pos p hp0 hp1 have hd' : 1 + centeredR5Scale p - p * 2 ≠ 0 := by intro hz unfold centeredR5Denom at hd nlinarith have hd2 : 1 - p * 2 + centeredR5Scale p ≠ 0 := by intro hz apply hd' nlinarith have hs2 := centeredR5Scale_sq p hp0 have hstat' := hstat rw [he] at hnorm unfold patternInformationSlope patternMass at hstat' simp_rw [centered_piTheta] at hstat' simp +decide [hout, r5Active, centeredR5Direction, centeredR5Denom, projectedGradient, patternGradient, patternRay, patternContains, controlProb, direction, privacyIncrement, privacyRatio, he, Fin.sum_univ_succ] at hstat' rw [← h37, ← h23, ← h58] at hstat' ring_nf at hstat' field_simp [hd', hd2] at hstat' ring_nf at hstat' field_simp at hs2 let C := 10 * centeredR5Scale p * p ^ 2 + 5 * centeredR5Scale p * p - 5 * centeredR5Scale p - 8 * p ^ 2 have hfac : (-8 / 5 : ℝ) * (p - 1) * (C * β 5 + 2 * p ^ 2) = 0 := by rw [← hstat'] dsimp [C] rw [show β 2 = (1 - 4 * β 5) / 5 by nlinarith [hnorm]] ring have hX : C * β 5 + 2 * p ^ 2 = 0 := by rcases mul_eq_zero.mp hfac with hleft | hX · rcases mul_eq_zero.mp hleft with hnum | hp · norm_num at hnum · linarith · exact hX have hCS : C * centeredR5Scale p = -8 * p ^ 2 * centeredR5Denom p := by dsimp [C, centeredR5Denom] nlinarith [hs2] have hspos : 0 < centeredR5Scale p := hp0.trans (centeredR5Scale_bounds p hp0 hp1).1 have hC : C ≠ 0 := by intro hC rw [hC, zero_mul] at hCS nlinarith [sq_pos_of_pos hp0] have htarget : 4 * centeredR5Denom p * β 5 = centeredR5Scale p := by apply (mul_left_cancel₀ hC) calc C * (4 * centeredR5Denom p * β 5) = 4 * centeredR5Denom p * (C * β 5) := by ring _ = C * centeredR5Scale p := by rw [hCS]; nlinarith [hX] have hfive : β 5 = centeredR5Weight p 5 := by simp [centeredR5Weight, centeredR5Mix, centeredR5Denom] field_simp [hd', hd2] apply (eq_div_iff (by unfold centeredR5Denom at hd exact ne_of_gt hd)).2 unfold centeredR5Denom at htarget nlinarith [htarget] exact r5_supported_feasible_eq_of_five_eq (log 3) (Real.log_pos (by norm_num)) β (centeredR5Weight p) hβ (centeredR5Weight_feasible p hp0 hp1) hout (fun s hs => by by_contra hn exact hs (((centeredR5Weight_active p hp0 hp1).1 s).mp hn)) hfive
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_supported_stationary_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:505
theorem centeredPoint_mem_R5

Under the supplied quantities and conditions, the centered point mem r5 assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
(p, (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5
Proof (Lean source)
lemma centeredPoint_mem_R5 (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : (p, (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5 := by simp only [R5, certifiedRegion, Set.mem_ofPred_eq] refine ⟨hp0, by linarith, by norm_num, by norm_num, by norm_num, by norm_num, Real.log_pos (by norm_num), ?_⟩ have hθ : (fun k : Fin 2 => if k = 0 then (1 / 2 : ℝ) else 1 / 2) = (fun _ => (1 / 2 : ℝ)) := by funext k split <;> rfl simp only [hθ] refine ⟨centeredR5Weight p, centeredR5Direction p, centeredR5Dual p, centeredR5Weight_feasible p hp0 hp1, ?_, ?_, ?_, ?_, ?_, ?_⟩ · exact (centeredR5Weight_active p hp0 hp1).1 · exact (centeredR5Weight_active p hp0 hp1).2 · simpa only [one_div] using centeredR5Weight_stationary p hp0 hp1 · intro s hs simpa only [one_div] using centeredR5_active_dual_equalities p hp0 hp1 s hs · intro s hs simpa only [one_div] using centeredR5_inactive_dual_slacks p hp0 hp1 s hs · intro _ s hs u hu hne simpa only [one_div] using centeredR5_active_scores_pairwise_ne p hp0 hp1 s hs u hu hne
CausalSmith.Stat.LdpAteEfficiencySurface.centeredPoint_mem_R5 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Certificate.lean:585
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.CenteredR5Rigidity 2 declarations Centered five-ray profile rigidity

Centered five-ray profile rigidity

theorem centeredR5_profile_optimal_unique

Under the supplied quantities and conditions, the centered r5 profile optimal unique assertion holds.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
conclusion 2
Jstar (fun _ => (1 / 2 : ℝ)) p (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) (centeredR5Weight p) t}
conclusion 3
Jstar (fun _ => (1 / 2 : ℝ)) p (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t}
Proof (Lean source)
lemma centeredR5_profile_optimal_unique (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) : staircaseFeasible (log 3) (centeredR5Weight p) ∧ Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) (centeredR5Weight p) t} ∧ ∀ β : StaircaseWeight, staircaseFeasible (log 3) β → Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t} → β = centeredR5Weight p := by let θ : TrialParameter := fun _ => (1 / 2 : ℝ) let α := centeredR5Weight p let t := centeredR5Direction p let η := centeredR5Dual p have hp : InteriorAssignment p := ⟨hp0, by linarith⟩ have hθ : InteriorMeans θ := by dsimp [θ, InteriorMeans] norm_num have hε : 0 ≤ log 3 := (Real.log_pos (by norm_num)).le have hα : staircaseFeasible (log 3) α := centeredR5Weight_feasible p hp0 hp1 have hsupp : activeSupport α r5Active := (centeredR5Weight_active p hp0 hp1).1 have hstat : ∑ s : Fin 14, α s * patternInformationSlope θ p (log 3) s t = 0 := by simpa [θ, α, t] using centeredR5Weight_stationary p hp0 hp1 have hactive : ∀ s ∈ r5Active, dualRay (log 3) η s = patternInformation θ p (log 3) s t := by intro s hs simpa [θ, η, t] using centeredR5_active_dual_equalities p hp0 hp1 s hs have hinactive : ∀ s ∉ r5Active, patternInformation θ p (log 3) s t < dualRay (log 3) η s := by intro s hs simpa [θ, η, t] using centeredR5_inactive_dual_slacks p hp0 hp1 s hs obtain ⟨hopt, hrigid⟩ := strictCertificate_profile_optimal_and_rigid θ p (log 3) hp hθ hε r5Active α t η hα hsupp hstat hactive hinactive refine ⟨hα, hopt, ?_⟩ intro β hβ hβopt have hout := hrigid β hβ hβopt have hbelow : BddBelow {u : ℝ | ∃ v : ℝ, u = informationObjective θ p (log 3) β v} := by refine ⟨0, ?_⟩ rintro u ⟨v, rfl⟩ exact informationObjective_nonneg_interior θ p (log 3) hp hθ hε β hβ v have hvalue : informationObjective θ p (log 3) α t = ∑ j : Fin 4, η j := by calc _ = ∑ s : Fin 14, α s * dualRay (log 3) η s := by apply Finset.sum_congr rfl intro s _ by_cases hs : s ∈ r5Active · rw [hactive s hs] · have hz : α s = 0 := by by_contra hn exact hs ((hsupp s).mp hn) simp [hz] _ = _ := feasible_dualRay_sum_general (log 3) α hα η have hprofile : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p (log 3) α v} = informationObjective θ p (log 3) α t := by apply IsLeast.csInf_eq refine ⟨⟨t, rfl⟩, ?_⟩ rintro _ ⟨v, rfl⟩ have hslope := centeredR5Weight_stationary p hp0 hp1 exact informationObjective_min_of_stationary θ p (log 3) hp hθ hε α hα t (by rw [← hslope] apply Finset.sum_congr rfl intro s _ simp [θ, α, t, patternInformationSlope] ring) v have hβat : informationObjective θ p (log 3) β t = Jstar θ p (log 3) := by apply le_antisymm · calc _ ≤ ∑ j : Fin 4, η j := certificate_dual_upper_bound θ p (log 3) t r5Active η hactive hinactive β hβ _ = _ := by rw [← hvalue, ← hprofile, ← hopt] · rw [hβopt] exact csInf_le hbelow ⟨t, rfl⟩ have hmin (u : ℝ) : informationObjective θ p (log 3) β t ≤ informationObjective θ p (log 3) β u := by rw [hβat, hβopt] exact csInf_le hbelow ⟨u, rfl⟩ have hraw := informationObjective_stationary_of_min θ p (log 3) β t hmin have hslope : ∑ s : Fin 14, β s * patternInformationSlope θ p (log 3) s t = 0 := by rw [← hraw] apply Finset.sum_congr rfl intro s _ simp [patternInformationSlope] ring exact centeredR5_supported_stationary_eq p hp0 hp1 β hβ (by simpa [r5Active] using hout) (by simpa [θ, t] using hslope)
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_profile_optimal_unique · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Rigidity.lean:16
theorem centeredR5_outputCardinality_ge_five

Under the supplied quantities and conditions, the centered r5 output cardinality ge five assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p :
ℝ
hp0 :
0 < p
hp1 :
p < 1 / 2
Z :
Q :
Kernel (Fin 4) Z
hQ :
hattain :
contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q)
= ofReal (Vstar (fun _ => (1 / 2 : ℝ)) p (log 3))
5 ≤ outputCardinality (fun _ => (1 / 2 : ℝ)) p Q
Proof (Lean source)
lemma centeredR5_outputCardinality_ge_five (p : ℝ) (hp0 : 0 < p) (hp1 : p < 1 / 2) (Z : Type*) [MeasurableSpace Z] (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP (log 3) Q) (hattain : contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q) = ofReal (Vstar (fun _ => (1 / 2 : ℝ)) p (log 3))) : 5 ≤ outputCardinality (fun _ => (1 / 2 : ℝ)) p Q := by let θ : TrialParameter := fun _ => (1 / 2 : ℝ) let α0 := centeredR5Weight p let t0 := centeredR5Direction p let η := centeredR5Dual p have hp : InteriorAssignment p := ⟨hp0, by linarith⟩ have hθ : InteriorMeans θ := by dsimp [θ, InteriorMeans]; norm_num have hε : 0 < log 3 := Real.log_pos (by norm_num) have hα0 : staircaseFeasible (log 3) α0 := centeredR5Weight_feasible p hp0 hp1 have hsupp0 : activeSupport α0 r5Active := (centeredR5Weight_active p hp0 hp1).1 have hactive : ∀ s ∈ r5Active, dualRay (log 3) η s = patternInformation θ p (log 3) s t0 := by intro s hs simpa [θ, η, t0] using centeredR5_active_dual_equalities p hp0 hp1 s hs have hinactive : ∀ s ∉ r5Active, patternInformation θ p (log 3) s t0 < dualRay (log 3) η s := by intro s hs simpa [θ, η, t0] using centeredR5_inactive_dual_slacks p hp0 hp1 s hs have hvalue : informationObjective θ p (log 3) α0 t0 = ∑ j : Fin 4, η j := by calc _ = ∑ s : Fin 14, α0 s * dualRay (log 3) η s := by apply Finset.sum_congr rfl intro s _ by_cases hs : s ∈ r5Active · rw [hactive s hs] · have hz : α0 s = 0 := by by_contra hn exact hs ((hsupp0 s).mp hn) simp [hz] _ = _ := feasible_dualRay_sum_general (log 3) α0 hα0 η obtain ⟨_, hopt, _⟩ := centeredR5_profile_optimal_unique p hp0 hp1 have hmin0 (u : ℝ) : informationObjective θ p (log 3) α0 t0 ≤ informationObjective θ p (log 3) α0 u := by have hslope := centeredR5Weight_stationary p hp0 hp1 exact informationObjective_min_of_stationary θ p (log 3) hp hθ hε.le α0 hα0 t0 (by rw [← hslope] apply Finset.sum_congr rfl intro s _ simp [θ, α0, t0, patternInformationSlope] ring) u have hleast : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p (log 3) α0 v} = informationObjective θ p (log 3) α0 t0 := by apply IsLeast.csInf_eq exact ⟨⟨t0, rfl⟩, by rintro _ ⟨u, rfl⟩; exact hmin0 u⟩ have hJsum : Jstar θ p (log 3) = ∑ j : Fin 4, η j := by rw [hopt, hleast, hvalue] have hupper (β : StaircaseWeight) (hβ : staircaseFeasible (log 3) β) : informationObjective θ p (log 3) β t0 ≤ Jstar θ p (log 3) := by rw [hJsum] exact certificate_dual_upper_bound θ p (log 3) t0 r5Active η hactive hinactive β hβ let epsSeq : ℕ → ℝ := fun _ => log 3 have hfixed : FixedPrivacy epsSeq (log 3) := ⟨hε, fun _ => rfl⟩ obtain ⟨β, K, hβ, hK, hfactor, hdiff, hrigid⟩ := staircase_refinement_interior p θ (log 3) hp hθ epsSeq hfixed Q hQ have horder (u : ℝ) : informationQuadratic (channelFisherInfo θ p Q) (direction u) ≤ informationQuadratic (informationMatrix θ p (log 3) β) (direction u) := by have hn := hdiff.dotProduct_mulVec_nonneg (direction u) simp [informationQuadratic, dotProduct, mulVec, star_trivial] at hn ⊢ linarith have hlower (u : ℝ) : Jstar θ p (log 3) ≤ informationObjective θ p (log 3) β u := by calc _ ≤ informationQuadratic (channelFisherInfo θ p Q) (direction u) := attainment_forces_direction_lower θ p (log 3) u hp hθ hε Q hQ (by simpa [θ] using hattain) _ ≤ informationQuadratic (informationMatrix θ p (log 3) β) (direction u) := horder u _ = informationObjective θ p (log 3) β u := by rw [informationObjective_eq_informationQuadratic] rfl have hβat : informationObjective θ p (log 3) β t0 = Jstar θ p (log 3) := le_antisymm (hupper β hβ) (hlower t0) have hout : ∀ s ∉ r5Active, β s = 0 := certificate_equality_forces_inactive_zero θ p (log 3) t0 r5Active η hactive hinactive β hβ (hβat.trans hJsum) have hmin (u : ℝ) : informationObjective θ p (log 3) β t0 ≤ informationObjective θ p (log 3) β u := by rw [hβat]; exact hlower u have hraw := informationObjective_stationary_of_min θ p (log 3) β t0 hmin have hslope : ∑ s : Fin 14, β s * patternInformationSlope θ p (log 3) s t0 = 0 := by rw [← hraw] apply Finset.sum_congr rfl intro s _ simp [patternInformationSlope] ring have hβeq : β = α0 := centeredR5_supported_stationary_eq p hp0 hp1 β hβ (by simpa [r5Active] using hout) (by simpa [θ, t0] using hslope) have hpos : ∀ s ∈ r5Active, 0 < β s := by rw [hβeq] exact (centeredR5Weight_active p hp0 hp1).2 have heq : informationQuadratic (informationMatrix θ p (log 3) β) (direction t0) = informationQuadratic (channelFisherInfo θ p Q) (direction t0) := by have hQlower := attainment_forces_direction_lower θ p (log 3) t0 hp hθ hε Q hQ (by simpa [θ] using hattain) have hβupper : informationQuadratic (informationMatrix θ p (log 3) β) (direction t0) ≤ Jstar θ p (log 3) := by calc _ = informationObjective θ p (log 3) β t0 := by rw [informationObjective_eq_informationQuadratic] rfl _ ≤ _ := hupper β hβ exact le_antisymm (hβupper.trans hQlower) (horder t0) have hsing : ∀ s ∈ r5Active, ∀ u ∈ r5Active, s ≠ u → K s ⟂ₘ K u := by intro s hs u hu hne by_contra hn have hscore := hrigid t0 heq s u (ne_of_gt (hpos s hs)) (ne_of_gt (hpos u hu)) hn exact centeredR5_active_scores_pairwise_ne p hp0 hp1 s hs u hu hne (by simpa [θ, t0] using hscore) have hcard := active_card_le_outputCardinality_of_pairwise_singular θ p (log 3) hp hθ r5Active β hpos K hK Q hfactor hsing norm_num [r5Active] at hcard ⊢ simpa [θ] using hcard
CausalSmith.Stat.LdpAteEfficiencySurface.centeredR5_outputCardinality_ge_five · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CenteredR5Rigidity.lean:110
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.CertificateRigidity 5 declarations These lemmas isolate the finite duality step used by the certified support regions.

Consequences of a strict staircase dual certificate

These lemmas isolate the finite duality step used by the certified support regions. Equality in the certificate bound forces every inactive staircase weight to vanish.

theorem feasible_dualRay_sum_general

the feasible dual ray sum general assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the feasible dual Ray sum general.

Formal statement
ε :
ℝ
hα :
η :
Fin 4 → ℝ
(∑ s : Fin 14, α s * dualRay ε η s) = ∑ j : Fin 4, η j
Proof (Lean source)
lemma feasible_dualRay_sum_general (ε : ℝ) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (η : Fin 4 → ℝ) : (∑ s : Fin 14, α s * dualRay ε η s) = ∑ j : Fin 4, η j := by simp only [dualRay, Finset.mul_sum] rw [Finset.sum_comm] simp_rw [← mul_assoc, ← Finset.sum_mul] change (∑ j : Fin 4, staircaseMatrix ε α j * η j) = ∑ j : Fin 4, η j simp only [hα.2, one_mul]
CausalSmith.Stat.LdpAteEfficiencySurface.feasible_dualRay_sum_general · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CertificateRigidity.lean:20
theorem certificate_dual_upper_bound

Under the supplied quantities and conditions, the certificate dual upper bound assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the certificate dual upper bound.

Formal statement
p ε t :
ℝ
K :
Finset (Fin 14)
η :
Fin 4 → ℝ
hactive :
∀ s ∈ K, dualRay ε η s = patternInformation θ p ε s t
hinactive :
∀ s ∉ K, patternInformation θ p ε s t < dualRay ε η s
hβ :
informationObjective θ p ε β t ≤ ∑ j : Fin 4, η j
Proof (Lean source)
lemma certificate_dual_upper_bound (θ : TrialParameter) (p ε t : ℝ) (K : Finset (Fin 14)) (η : Fin 4 → ℝ) (hactive : ∀ s ∈ K, dualRay ε η s = patternInformation θ p ε s t) (hinactive : ∀ s ∉ K, patternInformation θ p ε s t < dualRay ε η s) (β : StaircaseWeight) (hβ : staircaseFeasible ε β) : informationObjective θ p ε β t ≤ ∑ j : Fin 4, η j := by calc informationObjective θ p ε β t = ∑ s : Fin 14, β s * patternInformation θ p ε s t := rfl _ ≤ ∑ s : Fin 14, β s * dualRay ε η s := by apply Finset.sum_le_sum intro s _ apply mul_le_mul_of_nonneg_left _ (hβ.1 s) by_cases hs : s ∈ K · exact le_of_eq (hactive s hs).symm · exact le_of_lt (hinactive s hs) _ = ∑ j : Fin 4, η j := feasible_dualRay_sum_general ε β hβ η
CausalSmith.Stat.LdpAteEfficiencySurface.certificate_dual_upper_bound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CertificateRigidity.lean:33
theorem certificate_equality_forces_inactive_zero

Under the supplied quantities and conditions, the certificate equality forces inactive zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the certificate equality forces inactive zero.

Formal statement
p ε t :
ℝ
K :
Finset (Fin 14)
η :
Fin 4 → ℝ
hactive :
∀ s ∈ K, dualRay ε η s = patternInformation θ p ε s t
hinactive :
∀ s ∉ K, patternInformation θ p ε s t < dualRay ε η s
hβ :
heq :
informationObjective θ p ε β t = ∑ j : Fin 4, η j
s ∉ K :
β s = 0
Proof (Lean source)
lemma certificate_equality_forces_inactive_zero (θ : TrialParameter) (p ε t : ℝ) (K : Finset (Fin 14)) (η : Fin 4 → ℝ) (hactive : ∀ s ∈ K, dualRay ε η s = patternInformation θ p ε s t) (hinactive : ∀ s ∉ K, patternInformation θ p ε s t < dualRay ε η s) (β : StaircaseWeight) (hβ : staircaseFeasible ε β) (heq : informationObjective θ p ε β t = ∑ j : Fin 4, η j) : ∀ s ∉ K, β s = 0 := by have hsum : (∑ s : Fin 14, β s * patternInformation θ p ε s t) = ∑ s : Fin 14, β s * dualRay ε η s := by calc _ = informationObjective θ p ε β t := rfl _ = ∑ j : Fin 4, η j := heq _ = _ := (feasible_dualRay_sum_general ε β hβ η).symm have hterm (s : Fin 14) : β s * patternInformation θ p ε s t ≤ β s * dualRay ε η s := by apply mul_le_mul_of_nonneg_left _ (hβ.1 s) by_cases hs : s ∈ K · exact le_of_eq (hactive s hs).symm · exact le_of_lt (hinactive s hs) have hterm_eq (s : Fin 14) : β s * patternInformation θ p ε s t = β s * dualRay ε η s := (Finset.sum_eq_sum_iff_of_le (fun s _ ↦ hterm s)).mp hsum s (Finset.mem_univ s) intro s hs have hstrict := hinactive s hs have hnonneg := hβ.1 s have he := hterm_eq s nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.certificate_equality_forces_inactive_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CertificateRigidity.lean:57
theorem strictCertificate_profile_optimal_and_rigid

Under the supplied quantities and conditions, the strict certificate profile optimal and rigid assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the strict Certificate profile optimal and rigid.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
K :
Finset (Fin 14)
t :
ℝ
η :
Fin 4 → ℝ
hα :
hsupport :
hstationary :
∑ s : Fin 14, α s * patternInformationSlope θ p ε s t = 0
hactive :
∀ s ∈ K, dualRay ε η s = patternInformation θ p ε s t
hinactive :
∀ s ∉ K, patternInformation θ p ε s t < dualRay ε η s
conclusion 1
Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v}
conclusion 2
Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v}
s ∉ K :
β s = 0
Proof (Lean source)
lemma strictCertificate_profile_optimal_and_rigid (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (K : Finset (Fin 14)) (α : StaircaseWeight) (t : ℝ) (η : Fin 4 → ℝ) (hα : staircaseFeasible ε α) (hsupport : activeSupport α K) (hstationary : ∑ s : Fin 14, α s * patternInformationSlope θ p ε s t = 0) (hactive : ∀ s ∈ K, dualRay ε η s = patternInformation θ p ε s t) (hinactive : ∀ s ∉ K, patternInformation θ p ε s t < dualRay ε η s) : Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} ∧ ∀ β : StaircaseWeight, staircaseFeasible ε β → Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} → ∀ s ∉ K, β s = 0 := by have hstat : ∑ s : Fin 14, 2 * α s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s = 0 := by rw [← hstationary] apply Finset.sum_congr rfl intro s _ simp only [patternInformationSlope] ring have hmin (u : ℝ) : informationObjective θ p ε α t ≤ informationObjective θ p ε α u := informationObjective_min_of_stationary θ p ε hp hθ hε α hα t hstat u have hprofile : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} = informationObjective θ p ε α t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro u ⟨v, rfl⟩; exact hmin v⟩ have hvalue : informationObjective θ p ε α t = ∑ j : Fin 4, η j := by calc informationObjective θ p ε α t = ∑ s : Fin 14, α s * patternInformation θ p ε s t := rfl _ = ∑ s : Fin 14, α s * dualRay ε η s := by apply Finset.sum_congr rfl intro s _ by_cases hs : s ∈ K · rw [hactive s hs] · have hz : α s = 0 := by by_contra hn exact hs ((hsupport s).mp hn) simp [hz] _ = ∑ j : Fin 4, η j := feasible_dualRay_sum_general ε α hα η have hJ : Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} := by unfold Jstar apply IsGreatest.csSup_eq refine ⟨⟨α, hα, rfl⟩, ?_⟩ rintro u ⟨β, hβ, rfl⟩ have hbelow : BddBelow {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} := by refine ⟨0, ?_⟩ rintro u ⟨v, rfl⟩ exact informationObjective_nonneg_interior θ p ε hp hθ hε β hβ v calc sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} ≤ informationObjective θ p ε β t := csInf_le hbelow ⟨t, rfl⟩ _ ≤ ∑ j : Fin 4, η j := certificate_dual_upper_bound θ p ε t K η hactive hinactive β hβ _ = informationObjective θ p ε α t := hvalue.symm _ = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} := hprofile.symm refine ⟨hJ, ?_⟩ intro β hβ hβopt have hbelow : BddBelow {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} := by refine ⟨0, ?_⟩ rintro u ⟨v, rfl⟩ exact informationObjective_nonneg_interior θ p ε hp hθ hε β hβ v have hβeq : informationObjective θ p ε β t = ∑ j : Fin 4, η j := by apply le_antisymm · exact certificate_dual_upper_bound θ p ε t K η hactive hinactive β hβ · rw [← hvalue, ← hprofile, ← hJ, hβopt] exact csInf_le hbelow ⟨t, rfl⟩ exact certificate_equality_forces_inactive_zero θ p ε t K η hactive hinactive β hβ hβeq
CausalSmith.Stat.LdpAteEfficiencySurface.strictCertificate_profile_optimal_and_rigid · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CertificateRigidity.lean:94
theorem r5Certificate_profile_optimal_and_rigid

Under the supplied quantities and conditions, the r5 certificate profile optimal and rigid assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 ε :
ℝ
hx :
(p, μ0, μ1, ε) ∈ R5
θ :
fun k ↦ if k = 0 then μ0 else μ1 (: TrialParameter)
∃ α : StaircaseWeight,
activeSupport α ({2, 3, 5, 7, 8} : Finset (Fin 14))
conclusion 1
s ∈ ({2, 3, 5, 7, 8} : Finset (Fin 14)) :
0 < α s
conclusion 2
Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v}
conclusion 3
Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v}
s ∉ ({2, 3, 5, 7, 8} : Finset (Fin 14)) :
β s = 0
Proof (Lean source)
lemma r5Certificate_profile_optimal_and_rigid (p μ0 μ1 ε : ℝ) (hx : (p, μ0, μ1, ε) ∈ R5) : let θ : TrialParameter := fun k ↦ if k = 0 then μ0 else μ1 ∃ α : StaircaseWeight, staircaseFeasible ε α ∧ activeSupport α ({2, 3, 5, 7, 8} : Finset (Fin 14)) ∧ (∀ s ∈ ({2, 3, 5, 7, 8} : Finset (Fin 14)), 0 < α s) ∧ Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} ∧ ∀ β : StaircaseWeight, staircaseFeasible ε β → Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} → ∀ s ∉ ({2, 3, 5, 7, 8} : Finset (Fin 14)), β s = 0 := by dsimp only change 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < ε ∧ ∃ α : StaircaseWeight, ∃ t : ℝ, ∃ η : Fin 4 → ℝ, staircaseFeasible ε α ∧ activeSupport α ({2, 3, 5, 7, 8} : Finset (Fin 14)) ∧ (∀ s ∈ ({2, 3, 5, 7, 8} : Finset (Fin 14)), 0 < α s) ∧ (∑ s : Fin 14, α s * patternInformationSlope (fun k ↦ if k = 0 then μ0 else μ1) p ε s t) = 0 ∧ (∀ s ∈ ({2, 3, 5, 7, 8} : Finset (Fin 14)), dualRay ε η s = patternInformation (fun k ↦ if k = 0 then μ0 else μ1) p ε s t) ∧ (∀ s ∉ ({2, 3, 5, 7, 8} : Finset (Fin 14)), patternInformation (fun k ↦ if k = 0 then μ0 else μ1) p ε s t < dualRay ε η s) ∧ (true → ∀ s ∈ ({2, 3, 5, 7, 8} : Finset (Fin 14)), ∀ u ∈ ({2, 3, 5, 7, 8} : Finset (Fin 14)), s ≠ u → projectedScore (fun k ↦ if k = 0 then μ0 else μ1) p ε s t ≠ projectedScore (fun k ↦ if k = 0 then μ0 else μ1) p ε u t) at hx rcases hx with ⟨hp0, hp1, hμ0, hμ0', hμ1, hμ1', hε, α, t, η, hα, hsupp, hpos, hstat, hactive, hinactive, _⟩ have hp : InteriorAssignment p := ⟨hp0, hp1⟩ have hθ : InteriorMeans (fun k ↦ if k = 0 then μ0 else μ1) := by change 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 exact ⟨hμ0, hμ0', hμ1, hμ1'⟩ obtain ⟨hopt, hrigid⟩ := strictCertificate_profile_optimal_and_rigid (fun k ↦ if k = 0 then μ0 else μ1) p ε hp hθ hε.le ({2, 3, 5, 7, 8} : Finset (Fin 14)) α t η hα hsupp hstat hactive hinactive exact ⟨α, hα, hsupp, hpos, hopt, hrigid⟩
CausalSmith.Stat.LdpAteEfficiencySurface.r5Certificate_profile_optimal_and_rigid · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/CertificateRigidity.lean:187
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.Channels 16 declarations Radon–Nikodym densities are taken against the finite sum of the four channel rows, so no countable-generation condition is imposed on the output space.

Stationary private channels and their information

Radon–Nikodym densities are taken against the finite sum of the four channel rows, so no countable-generation condition is imposed on the output space.

the stationary ldp is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Stationary LDP is determined by the displayed parameters.

Definition (Lean source)
Z :
Type u_1
shared
ε :
ℝ
Q :
Kernel (Fin 4) Z
StationaryLDP ε Q :
Prop
clause 1
clause 2
A :
x x' :
Q x A ≤ ofReal (exp ε) * Q x' A
CausalSmith.Stat.LdpAteEfficiencySurface.StationaryLDP · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:22
def dominatingMeasure

the dominating measure is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
dominatingMeasure Q :
∑ j : Fin 4, Q j
CausalSmith.Stat.LdpAteEfficiencySurface.dominatingMeasure · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:29
def channelDensity

For the supplied quantities and conditions, the channel density is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
j :
Fin 4
channelDensity Q j :
Z → ℝ
fun z => (Q j |>.rnDeriv (dominatingMeasure Q) z).toReal
CausalSmith.Stat.LdpAteEfficiencySurface.channelDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:33
def inputDerivative

For the supplied quantities and conditions, the input derivative is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
j :
Fin 4
k :
Fin 2
inputDerivative p j k :
ℝ
if k
= 0 then if j = 0 then -controlProb p else if j = 1 then controlProb p else 0 else if j = 2 then -p else if j = 3 then p else 0
CausalSmith.Stat.LdpAteEfficiencySurface.inputDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:37
def channelOutputDensity

For the supplied quantities and conditions, the channel output density is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The channel Output Density is determined by the displayed parameters.

Definition (Lean source)
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
z :
Z
channelOutputDensity θ p Q z :
ℝ
∑ j : Fin 4, piTheta θ p j * channelDensity Q j z
CausalSmith.Stat.LdpAteEfficiencySurface.channelOutputDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:44
def channelDerivativeDensity

For the supplied quantities and conditions, the channel derivative density is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
k :
Fin 2
z :
Z
channelDerivativeDensity p Q k z :
ℝ
∑ j : Fin 4, inputDerivative p j k * channelDensity Q j z
CausalSmith.Stat.LdpAteEfficiencySurface.channelDerivativeDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:49

For the supplied quantities and conditions, the channel fisher info is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The channel Fisher Info is determined by the displayed parameters.

Definition (Lean source)
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
channelFisherInfo θ p Q :
Matrix (Fin 2) (Fin 2) ℝ
fun a b
=> ∫ z, (channelDerivativeDensity p Q a z * channelDerivativeDensity p Q b z) / channelOutputDensity θ p Q z ∂dominatingMeasure Q
CausalSmith.Stat.LdpAteEfficiencySurface.channelFisherInfo · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:54
def outputLaw

For the supplied quantities and conditions, the output law is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The output Law is determined by the displayed parameters.

Definition (Lean source)
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
outputLaw θ p Q :
∑ j : Fin 4, ofReal (piTheta θ p j) • Q j
CausalSmith.Stat.LdpAteEfficiencySurface.outputLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:62

For the supplied quantities and conditions, the output cardinality is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The output Cardinality is determined by the displayed parameters.

Definition (Lean source)
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
outputCardinality θ p Q :
ℕ∞
if h : Finite Z then letI := h encard {z : Z | outputLaw θ p Q {z} ≠ 0} else ⊤
CausalSmith.Stat.LdpAteEfficiencySurface.outputCardinality · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:67

the staircase channel is the mathematical object specified below. The staircase Channel is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
staircaseChannel ε α :
Kernel (Fin 4) (Fin 14)
Kernel.ofFunOfCountable fun j
=> Measure.count.withDensity (fun s : Fin 14 => ofReal (α s * patternRay ε s j))
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseChannel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:76
theorem channelDensity_staircase_ae

the channel density staircase ae assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the channel Density staircase ae.

Formal statement
ε :
ℝ
hε :
0 ≤ ε
hα :
∀ s, 0 ≤ α s
j :
Fin 4
=ᵐ[ dominatingMeasure (staircaseChannel ε α)] fun s => if α s = 0 then 0 else patternRay ε s j / ∑ i : Fin 4, patternRay ε s i
Proof (Lean source)
lemma channelDensity_staircase_ae (ε : ℝ) (α : StaircaseWeight) (hε : 0 ≤ ε) (hα : ∀ s, 0 ≤ α s) (j : Fin 4) : channelDensity (staircaseChannel ε α) j =ᵐ[ dominatingMeasure (staircaseChannel ε α)] fun s => if α s = 0 then 0 else patternRay ε s j / ∑ i : Fin 4, patternRay ε s i := by filter_upwards [channelDensity_staircase_raw_ae ε α j] with s hs rw [hs] have hray (i : Fin 4) : 0 ≤ patternRay ε s i := by unfold patternRay privacyIncrement privacyRatio cases patternContains s i <;> simp <;> positivity have htotal : staircaseTotalMass ε α s = ofReal (α s * ∑ i : Fin 4, patternRay ε s i) := by unfold staircaseTotalMass staircaseRowMass rw [← ENNReal.ofReal_sum_of_nonneg] · congr 1 rw [Finset.mul_sum] · intro i hi exact mul_nonneg (hα s) (hray i) rw [htotal] unfold staircaseRowMass by_cases ha : α s = 0 · simp [ha] · have ha_pos : 0 < α s := lt_of_le_of_ne (hα s) (Ne.symm ha) have hR_pos : 0 < ∑ i : Fin 4, patternRay ε s i := by have hone : 0 < patternRay ε s (0 : Fin 4) := lt_of_lt_of_le zero_lt_one (by unfold patternRay split_ifs <;> simp [privacyIncrement, privacyRatio, (Real.one_le_exp_iff).2 hε]) exact lt_of_lt_of_le hone (Finset.single_le_sum (fun i hi => hray i) (Finset.mem_univ 0)) rw [ENNReal.toReal_div, ENNReal.toReal_ofReal (mul_nonneg ha_pos.le (hray j)), ENNReal.toReal_ofReal (mul_nonneg ha_pos.le hR_pos.le)] simp [ha] field_simp
CausalSmith.Stat.LdpAteEfficiencySurface.channelDensity_staircase_ae · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:152
theorem dominatingMeasure_staircase_singleton_real

the dominating measure staircase singleton real assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the dominating Measure staircase singleton real.

Formal statement
ε :
ℝ
hε :
0 ≤ ε
hα :
∀ s, 0 ≤ α s
s :
Fin 14
(dominatingMeasure (staircaseChannel ε α)).real {s} = α s * ∑ j : Fin 4, patternRay ε s j
Proof (Lean source)
lemma dominatingMeasure_staircase_singleton_real (ε : ℝ) (α : StaircaseWeight) (hε : 0 ≤ ε) (hα : ∀ s, 0 ≤ α s) (s : Fin 14) : (dominatingMeasure (staircaseChannel ε α)).real {s} = α s * ∑ j : Fin 4, patternRay ε s j := by rw [dominatingMeasure_staircaseChannel] change ((Measure.count.withDensity (staircaseTotalMass ε α)) {s}).toReal = _ rw [withDensity_apply _ (measurableSet_singleton s)] simp only [lintegral_singleton] have hray (j : Fin 4) : 0 ≤ patternRay ε s j := by unfold patternRay privacyIncrement privacyRatio cases patternContains s j <;> simp <;> positivity have htotal : staircaseTotalMass ε α s = ofReal (α s * ∑ j : Fin 4, patternRay ε s j) := by unfold staircaseTotalMass staircaseRowMass rw [← ENNReal.ofReal_sum_of_nonneg] · congr 1 rw [Finset.mul_sum] · intro j hj exact mul_nonneg (hα s) (hray j) have hRnonneg : 0 ≤ ∑ j : Fin 4, patternRay ε s j := Finset.sum_nonneg fun j hj => hray j rw [htotal] simp [ENNReal.toReal_ofReal (mul_nonneg (hα s) hRnonneg)]
CausalSmith.Stat.LdpAteEfficiencySurface.dominatingMeasure_staircase_singleton_real · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:191

Under the supplied quantities and conditions, the pattern ray ldp assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pattern Ray ldp.

Formal statement
ε :
ℝ
hε :
0 < ε
s :
Fin 14
j j' :
Fin 4
patternRay ε s j ≤ exp ε * patternRay ε s j'
Proof (Lean source)
lemma patternRay_ldp (ε : ℝ) (hε : 0 < ε) (s : Fin 14) (j j' : Fin 4) : patternRay ε s j ≤ exp ε * patternRay ε s j' := by have he : 1 ≤ exp ε := (Real.one_le_exp_iff).2 (le_of_lt hε) cases h : patternContains s j <;> cases h' : patternContains s j' <;> simp [patternRay, privacyIncrement, privacyRatio, h, h'] <;> nlinarith [sq_nonneg (exp ε - 1)]
CausalSmith.Stat.LdpAteEfficiencySurface.patternRay_ldp · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:220
theorem staircaseChannel_markov

the staircase channel markov assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the staircase Channel markov.

Formal statement
ε :
ℝ
hα :
Proof (Lean source)
lemma staircaseChannel_markov (ε : ℝ) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : IsMarkovKernel (staircaseChannel ε α) := by constructor intro j constructor have hsum : (∑ s : Fin 14, α s * patternRay ε s j) = 1 := hα.2 j rw [← ENNReal.ofReal_one, ← hsum] change (Measure.count.withDensity (fun s : Fin 14 => ofReal (α s * patternRay ε s j))) univ = _ simp only [withDensity_apply _ MeasurableSet.univ, setLIntegral_univ, lintegral_count] rw [tsum_fintype, ENNReal.ofReal_sum_of_nonneg] intro s hs apply mul_nonneg (hα.1 s) unfold patternRay privacyIncrement privacyRatio cases patternContains s j <;> simp <;> positivity
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseChannel_markov · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:232
theorem staircaseChannel_private

Under the supplied quantities and conditions, the staircase channel private assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the staircase Channel private.

Formal statement
ε :
ℝ
hε :
0 < ε
hα :
A :
Set (Fin 14)
j j' :
Fin 4
staircaseChannel ε α j A ≤ ofReal (exp ε) * staircaseChannel ε α j' A
Proof (Lean source)
lemma staircaseChannel_private (ε : ℝ) (hε : 0 < ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (A : Set (Fin 14)) (j j' : Fin 4) : staircaseChannel ε α j A ≤ ofReal (exp ε) * staircaseChannel ε α j' A := by let r := ofReal (exp ε) have hr : r ≠ ∞ := ENNReal.ofReal_ne_top have hm : Measure.count.withDensity (fun s : Fin 14 => ofReal (α s * patternRay ε s j)) ≤ r • Measure.count.withDensity (fun s : Fin 14 => ofReal (α s * patternRay ε s j')) := by rw [← withDensity_smul' r _ hr] apply withDensity_mono filter_upwards [] with s dsimp [r] rw [← ENNReal.ofReal_mul (le_of_lt (Real.exp_pos ε))] apply ENNReal.ofReal_le_ofReal have h := mul_le_mul_of_nonneg_left (patternRay_ldp ε hε s j j') (hα.1 s) nlinarith exact hm A
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseChannel_private · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:253
theorem staircaseChannel_stationaryLDP

Under the supplied quantities and conditions, the staircase channel stationary ldp assertion holds. Under the stated assumptions, the staircase Channel stationary LDP.

Formal statement
ε :
ℝ
hε :
0 < ε
hα :
Proof (Lean source)
lemma staircaseChannel_stationaryLDP (ε : ℝ) (hε : 0 < ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : StationaryLDP ε (staircaseChannel ε α) := by exact ⟨staircaseChannel_markov ε α hα, fun A _ j j' => staircaseChannel_private ε hε α hα A j j'⟩
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseChannel_stationaryLDP · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Channels.lean:277
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.GeneralR3Cardinality 3 declarations General three-ray cardinality in the distinct-score neighborhood

General three-ray cardinality in the distinct-score neighborhood

theorem r3Certificate_direction_eq

Under the supplied quantities and conditions, the r3 certificate direction eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r3 Certificate direction eq.

Formal statement
p μ0 μ1 ε :
ℝ
hp0 :
0 < p
hp1 :
p < 1
hμ00 :
0 < μ0
hμ01 :
μ0 < 1
hμ10 :
0 < μ1
hμ11 :
μ1 < 1
hε :
0 < ε
t :
ℝ
hα :
hsupp :
activeSupport α ({0, 5, 7} : Finset (Fin 14))
hstat :
∑ s : Fin 14, α s * patternInformationSlope (fun k => if k = 0 then μ0 else μ1) p ε s t
= 0
t = r3Direction p μ0 μ1 ε
Proof (Lean source)
lemma r3Certificate_direction_eq (p μ0 μ1 ε : ℝ) (hp0 : 0 < p) (hp1 : p < 1) (hμ00 : 0 < μ0) (hμ01 : μ0 < 1) (hμ10 : 0 < μ1) (hμ11 : μ1 < 1) (hε : 0 < ε) (α : StaircaseWeight) (t : ℝ) (hα : staircaseFeasible ε α) (hsupp : activeSupport α ({0, 5, 7} : Finset (Fin 14))) (hstat : ∑ s : Fin 14, α s * patternInformationSlope (fun k => if k = 0 then μ0 else μ1) p ε s t = 0) : t = r3Direction p μ0 μ1 ε := by have hsupp' : staircaseSupport α = ({0, 5, 7} : Finset (Fin 14)) := by ext s simpa [staircaseSupport] using hsupp s have hαeq := threeMaskWeights_unique ε hε α hα hsupp' have hstat' : r3Stationarity p μ0 μ1 ε t = 0 := by rw [r3Stationarity, ← hstat] apply Finset.sum_congr rfl intro s _ rw [hαeq] rfl have hc : r3StationarityCoeff p μ0 μ1 ε ≠ 0 := ne_of_gt (r3StationarityCoeff_pos p μ0 μ1 ε hp0 hp1 hμ00 hμ01 hμ10 hμ11 hε) have hdir := r3Stationarity_r3Direction_eq_zero p μ0 μ1 ε hc rw [r3Stationarity_affine] at hstat' hdir have hm : (t - r3Direction p μ0 μ1 ε) * r3StationarityCoeff p μ0 μ1 ε = 0 := by linarith exact sub_eq_zero.mp ((mul_eq_zero.mp hm).resolve_right hc)
CausalSmith.Stat.LdpAteEfficiencySurface.r3Certificate_direction_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/GeneralR3Cardinality.lean:17
theorem r3Certificate_staircase_attains_three

Under the supplied quantities and conditions, the r3 certificate staircase attains three assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 :
ℝ
hx :
(p, μ0, μ1, log 3) ∈ R3
θ :
fun k => if k = 0 then μ0 else μ1 (: TrialParameter)
∃ α : StaircaseWeight,
conclusion 1
conclusion 2
conclusion 3
Proof (Lean source)
lemma r3Certificate_staircase_attains_three (p μ0 μ1 : ℝ) (hx : (p, μ0, μ1, log 3) ∈ R3) : let θ : TrialParameter := fun k => if k = 0 then μ0 else μ1 ∃ α : StaircaseWeight, staircaseFeasible (log 3) α ∧ contrastVariance (informationMatrix θ p (log 3) α) = ofReal (Vstar θ p (log 3)) ∧ outputCardinality θ p (staircaseChannel (log 3) α) = 3 := by dsimp only obtain ⟨α, hα, hsupp, hopt, _⟩ := r3Certificate_unique_optimum_log3 p μ0 μ1 hx change 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < log 3 ∧ _ at hx rcases hx with ⟨hp0, hp1, hμ00, hμ01, hμ10, hμ11, hε, α0, t, η, hα0, hsupp0, _, hstat, hactive, hinactive, _⟩ let θ : TrialParameter := fun k => if k = 0 then μ0 else μ1 have hp : InteriorAssignment p := ⟨hp0, hp1⟩ have hθ : InteriorMeans θ := ⟨hμ00, hμ01, hμ10, hμ11⟩ have hαeq : α = α0 := by have ha := r3_feasible_eq_canonical α hα (by intro s hs by_contra hn exact hs ((hsupp s).mp hn)) have hb := r3_feasible_eq_canonical α0 hα0 (by intro s hs by_contra hn exact hs ((hsupp0 s).mp hn)) exact ha.trans hb.symm subst α0 have hmin (u : ℝ) : informationObjective θ p (log 3) α t ≤ informationObjective θ p (log 3) α u := informationObjective_min_of_stationary θ p (log 3) hp hθ hε.le α hα t (by rw [← hstat]; apply Finset.sum_congr rfl; intro s _; simp [patternInformationSlope]; ring) u have hprofile : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p (log 3) α v} = informationObjective θ p (log 3) α t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro _ ⟨u, rfl⟩; exact hmin u⟩ have hvalue : informationObjective θ p (log 3) α t = Jstar θ p (log 3) := by rw [← hprofile, ← hopt] have hquad (u : ℝ) : informationObjective θ p (log 3) α u = informationQuadratic (informationMatrix θ p (log 3) α) (direction u) := by rw [informationObjective_eq_informationQuadratic] rfl have hqmin (u : ℝ) := show informationQuadratic (informationMatrix θ p (log 3) α) (direction t) ≤ informationQuadratic (informationMatrix θ p (log 3) α) (direction u) by rw [← hquad t, ← hquad u] exact hmin u have hqpos : 0 < informationQuadratic (informationMatrix θ p (log 3) α) (direction t) := by rw [← hquad t, hvalue] exact Jstar_pos_interior θ p (log 3) hp hθ hε have hvariance : contrastVariance (informationMatrix θ p (log 3) α) = ofReal (Vstar θ p (log 3)) := by rw [contrastVariance_eq_reciprocal_of_minimizer (informationMatrix θ p (log 3) α) (informationMatrix_posSemidef_interior θ p (log 3) hp hθ hε.le α hα) t hqmin hqpos] congr 1 rw [← hquad t, hvalue] rfl have hsuppcard : staircaseSupport α = ({0, 5, 7} : Finset (Fin 14)) := by ext s simpa [staircaseSupport] using hsupp s have hcard : outputCardinality θ p (staircaseChannel (log 3) α) = 3 := by rw [outputCardinality_staircase_eq_support_card θ p (log 3) hp hθ α hα.1, hsuppcard] have hc : ({0, 5, 7} : Finset (Fin 14)).card = 3 := by decide rw [hc] norm_num exact ⟨α, hα, hvariance, hcard⟩
CausalSmith.Stat.LdpAteEfficiencySurface.r3Certificate_staircase_attains_three · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/GeneralR3Cardinality.lean:47
theorem r3Certificate_outputCardinality_ge_three_of_distinct

Under the supplied quantities and conditions, the r3 certificate output cardinality ge three of distinct assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 :
ℝ
hx :
(p, μ0, μ1, log 3) ∈ R3
hdistinct :
∀ i k : Fin 3
if
i ≠ k
then
r3ProjectedScoreAt (p, μ0, μ1, log 3) i
≠ r3ProjectedScoreAt (p, μ0, μ1, log 3) k
Z :
Q :
Kernel (Fin 4) Z
hQ :
hattain :
contrastVariance (channelFisherInfo (fun k => if k = 0 then μ0 else μ1) p Q)
= ofReal (Vstar (fun k => if k = 0 then μ0 else μ1) p (log 3))
3 ≤ outputCardinality (fun k => if k = 0 then μ0 else μ1) p Q
Proof (Lean source)
lemma r3Certificate_outputCardinality_ge_three_of_distinct (p μ0 μ1 : ℝ) (hx : (p, μ0, μ1, log 3) ∈ R3) (hdistinct : ∀ i k : Fin 3, i ≠ k → r3ProjectedScoreAt (p, μ0, μ1, log 3) i ≠ r3ProjectedScoreAt (p, μ0, μ1, log 3) k) {Z : Type*} [MeasurableSpace Z] (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP (log 3) Q) (hattain : contrastVariance (channelFisherInfo (fun k => if k = 0 then μ0 else μ1) p Q) = ofReal (Vstar (fun k => if k = 0 then μ0 else μ1) p (log 3))) : 3 ≤ outputCardinality (fun k => if k = 0 then μ0 else μ1) p Q := by have hxcopy := hx change 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < log 3 ∧ _ at hxcopy rcases hxcopy with ⟨hp0, hp1, hμ00, hμ01, hμ10, hμ11, hε, α, t, η, hα, hsupp, _, hstat, hactive, hinactive, _⟩ let θ : TrialParameter := fun k => if k = 0 then μ0 else μ1 let A : Finset (Fin 14) := {0, 5, 7} have hp : InteriorAssignment p := ⟨hp0, hp1⟩ have hθ : InteriorMeans θ := ⟨hμ00, hμ01, hμ10, hμ11⟩ have ht : t = r3Direction p μ0 μ1 (log 3) := r3Certificate_direction_eq p μ0 μ1 (log 3) hp0 hp1 hμ00 hμ01 hμ10 hμ11 hε α t hα hsupp hstat obtain ⟨hopt, _⟩ := strictCertificate_profile_optimal_and_rigid θ p (log 3) hp hθ hε.le A α t η hα hsupp hstat hactive hinactive have hmin (u : ℝ) : informationObjective θ p (log 3) α t ≤ informationObjective θ p (log 3) α u := informationObjective_min_of_stationary θ p (log 3) hp hθ hε.le α hα t (by rw [← hstat]; apply Finset.sum_congr rfl; intro s _; simp [patternInformationSlope]; ring) u have hprofile : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p (log 3) α v} = informationObjective θ p (log 3) α t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro _ ⟨u, rfl⟩; exact hmin u⟩ have hvalue : informationObjective θ p (log 3) α t = ∑ j : Fin 4, η j := by calc _ = ∑ s : Fin 14, α s * dualRay (log 3) η s := by apply Finset.sum_congr rfl intro s _ by_cases hs : s ∈ A · rw [hactive s hs] · have hz : α s = 0 := by by_contra hn; exact hs ((hsupp s).mp hn) simp [hz] _ = _ := feasible_dualRay_sum_general (log 3) α hα η have hJsum : Jstar θ p (log 3) = ∑ j : Fin 4, η j := by rw [hopt, hprofile, hvalue] have hupper : ∀ β : StaircaseWeight, staircaseFeasible (log 3) β → informationObjective θ p (log 3) β t ≤ Jstar θ p (log 3) := by intro β hβ rw [hJsum] exact certificate_dual_upper_bound θ p (log 3) t A η hactive hinactive β hβ have hpositive : ∀ β : StaircaseWeight, staircaseFeasible (log 3) β → informationObjective θ p (log 3) β t = Jstar θ p (log 3) → ∀ s ∈ A, 0 < β s := by intro β hβ heq have hout := certificate_equality_forces_inactive_zero θ p (log 3) t A η hactive hinactive β hβ (heq.trans hJsum) have hcanonical := r3_feasible_eq_canonical β hβ hout intro s hs rw [hcanonical] change s ∈ ({0, 5, 7} : Finset (Fin 14)) at hs simp [hs] have hmaskinj : Injective r3Mask := by intro i k hik fin_cases i <;> fin_cases k <;> simp_all [r3Mask] have htheta : regionTheta (p, μ0, μ1, log 3) = θ := by funext k fin_cases k <;> rfl have hscores : ∀ s ∈ A, ∀ u ∈ A, s ≠ u → projectedScore θ p (log 3) s t ≠ projectedScore θ p (log 3) u t := by intro s hs u hu hne obtain ⟨i, rfl⟩ : ∃ i : Fin 3, r3Mask i = s := by have hs' : s = 0 ∨ s = 5 ∨ s = 7 := by simpa [A] using hs rcases hs' with rfl | rfl | rfl · exact ⟨0, by simp [r3Mask]⟩ · exact ⟨1, by simp [r3Mask]⟩ · exact ⟨2, by simp [r3Mask]⟩ obtain ⟨k, rfl⟩ : ∃ k : Fin 3, r3Mask k = u := by have hu' : u = 0 ∨ u = 5 ∨ u = 7 := by simpa [A] using hu rcases hu' with rfl | rfl | rfl · exact ⟨0, by simp [r3Mask]⟩ · exact ⟨1, by simp [r3Mask]⟩ · exact ⟨2, by simp [r3Mask]⟩ have hik : i ≠ k := fun e => hne (congrArg r3Mask e) have hd := hdistinct i k hik rw [r3ProjectedScoreAt_eq, r3ProjectedScoreAt_eq, htheta] at hd simpa only [θ, ht] using hd have hcard := outputCardinality_ge_of_attainment_direction θ p (log 3) t hp hθ hε A hupper hpositive hscores Q hQ (by simpa only [θ] using hattain) have hAcard : A.card = 3 := by decide rw [hAcard] at hcard norm_num at hcard ⊢ simpa only [θ] using hcard
CausalSmith.Stat.LdpAteEfficiencySurface.r3Certificate_outputCardinality_ge_three_of_distinct · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/GeneralR3Cardinality.lean:121
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.GeneralR5Rigidity 3 declarations General five-ray certificate rigidity

General five-ray certificate rigidity

theorem r5Certificate_unique_optimum

Every R5 certificate has a unique optimal staircase weight, including away from the centered explicit family. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 ε :
ℝ
hx :
(p, μ0, μ1, ε) ∈ R5
θ :
fun k => if k = 0 then μ0 else μ1 (: TrialParameter)
∃ α : StaircaseWeight,
conclusion 1
s ∈ r5Active :
0 < α s
conclusion 2
Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v}
conclusion 3
Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v}
β = α
Proof (Lean source)
lemma r5Certificate_unique_optimum (p μ0 μ1 ε : ℝ) (hx : (p, μ0, μ1, ε) ∈ R5) : let θ : TrialParameter := fun k => if k = 0 then μ0 else μ1 ∃ α : StaircaseWeight, staircaseFeasible ε α ∧ activeSupport α r5Active ∧ (∀ s ∈ r5Active, 0 < α s) ∧ Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} ∧ ∀ β : StaircaseWeight, staircaseFeasible ε β → Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} → β = α := by dsimp only change 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < ε ∧ ∃ α : StaircaseWeight, ∃ t : ℝ, ∃ η : Fin 4 → ℝ, staircaseFeasible ε α ∧ activeSupport α r5Active ∧ (∀ s ∈ r5Active, 0 < α s) ∧ (∑ s : Fin 14, α s * patternInformationSlope (fun k => if k = 0 then μ0 else μ1) p ε s t) = 0 ∧ (∀ s ∈ r5Active, dualRay ε η s = patternInformation (fun k => if k = 0 then μ0 else μ1) p ε s t) ∧ (∀ s ∉ r5Active, patternInformation (fun k => if k = 0 then μ0 else μ1) p ε s t < dualRay ε η s) ∧ (true → ∀ s ∈ r5Active, ∀ u ∈ r5Active, s ≠ u → projectedScore (fun k => if k = 0 then μ0 else μ1) p ε s t ≠ projectedScore (fun k => if k = 0 then μ0 else μ1) p ε u t) at hx rcases hx with ⟨hp0, hp1, hμ00, hμ01, hμ10, hμ11, hε, α, t, η, hα, hsupp, hpos, hstat, hactive, hinactive, _⟩ let θ : TrialParameter := fun k => if k = 0 then μ0 else μ1 let x : RegionParameter := (p, μ0, μ1, ε) have hxθ : regionTheta x = θ := by funext k fin_cases k <;> rfl have hp : InteriorAssignment p := ⟨hp0, hp1⟩ have hθ : InteriorMeans θ := by change 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 exact ⟨hμ00, hμ01, hμ10, hμ11⟩ have hm (s : Fin 14) : patternMass θ p ε s ≠ 0 := ne_of_gt (patternMass_pos_interior θ p ε hp hθ hε.le s) have hαout : ∀ s ∉ r5Active, α s = 0 := by intro s hs by_contra hn exact hs ((hsupp s).mp hn) obtain ⟨hopt, hrigid⟩ := strictCertificate_profile_optimal_and_rigid θ p ε hp hθ hε.le r5Active α t η hα hsupp hstat hactive hinactive have hcoeff : 0 < r5BinaryCoeff x ∧ 0 < r5TernaryCoeff x := r5Coeffs_pos_of_interior x hp0 hp1 hμ00 hμ01 hμ10 hμ11 hε have hobj : r5BinaryObjective x t = r5TernaryObjective x t := by apply r5_objectives_eq_of_activeDual x η t intro s hs simpa only [hxθ] using hactive s hs have heq : r5BinaryCoeff x * (p - (1 - 2 * p) * t) ^ 2 = r5TernaryCoeff x * (t + 1) ^ 2 := by rw [← r5BinaryObjective_eq_quadratic x t (by simpa [hxθ] using hm 5) (by simpa [hxθ] using hm 8), ← r5TernaryObjective_eq_quadratic x t (by simpa [hxθ] using hm 3) (by simpa [hxθ] using hm 7)] exact hobj have hR : r5TernaryDerivative x t ≠ 0 := r5TernaryDerivative_ne_zero_of_objectives_eq x t hp1 hcoeff.1 hcoeff.2 (by simpa [hxθ] using hm 3) (by simpa [hxθ] using hm 7) heq have hαmix : r5MixtureCoordinate ε α = -r5TernaryDerivative x t / (r5BinaryDerivative x t - r5TernaryDerivative x t) := by have hs := r5_stationarity_eq_mixture x α hε hα hαout t (by simpa only [hxθ] using hstat) exact (mixture_stationarity_solve hR hs).2 refine ⟨α, hα, hsupp, hpos, hopt, ?_⟩ intro β hβ hβopt have hβout : ∀ s ∉ r5Active, β s = 0 := hrigid β hβ hβopt have hbelow : BddBelow {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} := by refine ⟨0, ?_⟩ rintro u ⟨v, rfl⟩ exact informationObjective_nonneg_interior θ p ε hp hθ hε.le β hβ v have hαvalue : informationObjective θ p ε α t = ∑ j : Fin 4, η j := by calc _ = ∑ s : Fin 14, α s * dualRay ε η s := by apply Finset.sum_congr rfl intro s _ by_cases hs : s ∈ r5Active · rw [hactive s hs] · simp [hαout s hs] _ = _ := feasible_dualRay_sum_general ε α hα η have hαprofile : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} = informationObjective θ p ε α t := by apply IsLeast.csInf_eq refine ⟨⟨t, rfl⟩, ?_⟩ rintro _ ⟨v, rfl⟩ exact informationObjective_min_of_stationary θ p ε hp hθ hε.le α hα t (by rw [← hstat] apply Finset.sum_congr rfl intro s _ simp [patternInformationSlope] ring) v have hβat : informationObjective θ p ε β t = Jstar θ p ε := by apply le_antisymm · calc _ ≤ ∑ j : Fin 4, η j := certificate_dual_upper_bound θ p ε t r5Active η hactive hinactive β hβ _ = _ := by rw [← hαvalue, ← hαprofile, ← hopt] · rw [hβopt] exact csInf_le hbelow ⟨t, rfl⟩ have hβmin (u : ℝ) : informationObjective θ p ε β t ≤ informationObjective θ p ε β u := by rw [hβat, hβopt] exact csInf_le hbelow ⟨u, rfl⟩ have hraw := informationObjective_stationary_of_min θ p ε β t hβmin have hβstat : ∑ s : Fin 14, β s * patternInformationSlope θ p ε s t = 0 := by rw [← hraw] apply Finset.sum_congr rfl intro s _ simp [patternInformationSlope] ring have hβmix : r5MixtureCoordinate ε β = -r5TernaryDerivative x t / (r5BinaryDerivative x t - r5TernaryDerivative x t) := by have hs := r5_stationarity_eq_mixture x β hε hβ hβout t (by simpa only [hxθ] using hβstat) exact (mixture_stationarity_solve hR hs).2 have hfive : β 5 = α 5 := by unfold r5MixtureCoordinate at hαmix hβmix have hd : 0 < exp ε + 1 := by positivity nlinarith exact r5_supported_feasible_eq_of_five_eq ε hε β α hβ hα hβout hαout hfive
CausalSmith.Stat.LdpAteEfficiencySurface.r5Certificate_unique_optimum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/GeneralR5Rigidity.lean:17
theorem r5Certificate_outputCardinality_ge_five

Every channel attaining an oracle certified by R5 has at least five positive output atoms. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 ε :
ℝ
hx :
(p, μ0, μ1, ε) ∈ R5
Z :
Q :
Kernel (Fin 4) Z
hQ :
hattain :
contrastVariance (channelFisherInfo (fun k => if k = 0 then μ0 else μ1) p Q)
= ofReal (Vstar (fun k => if k = 0 then μ0 else μ1) p ε)
5 ≤ outputCardinality (fun k => if k = 0 then μ0 else μ1) p Q
Proof (Lean source)
lemma r5Certificate_outputCardinality_ge_five (p μ0 μ1 ε : ℝ) (hx : (p, μ0, μ1, ε) ∈ R5) {Z : Type*} [MeasurableSpace Z] (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP ε Q) (hattain : contrastVariance (channelFisherInfo (fun k => if k = 0 then μ0 else μ1) p Q) = ofReal (Vstar (fun k => if k = 0 then μ0 else μ1) p ε)) : 5 ≤ outputCardinality (fun k => if k = 0 then μ0 else μ1) p Q := by have hxcopy := hx change 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < ε ∧ _ at hxcopy rcases hxcopy with ⟨hp0, hp1, hμ00, hμ01, hμ10, hμ11, hε, α0, t, η, hα0, hsupp0, hpos0, hstat0, hactive, hinactive, hdistinct⟩ let θ : TrialParameter := fun k => if k = 0 then μ0 else μ1 have hp : InteriorAssignment p := ⟨hp0, hp1⟩ have hθ : InteriorMeans θ := by change 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 exact ⟨hμ00, hμ01, hμ10, hμ11⟩ obtain ⟨αu, hαu, _, hposu, hoptu, hunique⟩ := r5Certificate_unique_optimum p μ0 μ1 ε hx obtain ⟨hopt0, _⟩ := strictCertificate_profile_optimal_and_rigid θ p ε hp hθ hε.le r5Active α0 t η hα0 hsupp0 hstat0 hactive hinactive have hα0value : informationObjective θ p ε α0 t = ∑ j : Fin 4, η j := by calc _ = ∑ s : Fin 14, α0 s * dualRay ε η s := by apply Finset.sum_congr rfl intro s _ by_cases hs : s ∈ r5Active · rw [hactive s hs] · have hz : α0 s = 0 := by by_contra hn exact hs ((hsupp0 s).mp hn) simp [hz] _ = _ := feasible_dualRay_sum_general ε α0 hα0 η have hα0min (u : ℝ) : informationObjective θ p ε α0 t ≤ informationObjective θ p ε α0 u := informationObjective_min_of_stationary θ p ε hp hθ hε.le α0 hα0 t (by rw [← hstat0] apply Finset.sum_congr rfl intro s _ simp [patternInformationSlope] ring) u have hα0profile : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α0 v} = informationObjective θ p ε α0 t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro _ ⟨u, rfl⟩; exact hα0min u⟩ have hJsum : Jstar θ p ε = ∑ j : Fin 4, η j := by rw [hopt0, hα0profile, hα0value] have hupper (β : StaircaseWeight) (hβ : staircaseFeasible ε β) : informationObjective θ p ε β t ≤ Jstar θ p ε := by rw [hJsum] exact certificate_dual_upper_bound θ p ε t r5Active η hactive hinactive β hβ let epsSeq : ℕ → ℝ := fun _ => ε have hfixed : FixedPrivacy epsSeq ε := ⟨hε, fun _ => rfl⟩ obtain ⟨β, K, hβ, hK, hfactor, hdiff, hrigid⟩ := staircase_refinement_interior p θ ε hp hθ epsSeq hfixed Q hQ have horder (u : ℝ) : informationQuadratic (channelFisherInfo θ p Q) (direction u) ≤ informationQuadratic (informationMatrix θ p ε β) (direction u) := by have hn := hdiff.dotProduct_mulVec_nonneg (direction u) simp [informationQuadratic, dotProduct, mulVec, star_trivial] at hn ⊢ linarith have hlower (u : ℝ) : Jstar θ p ε ≤ informationObjective θ p ε β u := by calc _ ≤ informationQuadratic (channelFisherInfo θ p Q) (direction u) := attainment_forces_direction_lower θ p ε u hp hθ hε Q hQ (by simpa only [θ] using hattain) _ ≤ informationQuadratic (informationMatrix θ p ε β) (direction u) := horder u _ = informationObjective θ p ε β u := by rw [informationObjective_eq_informationQuadratic] rfl have hβat : informationObjective θ p ε β t = Jstar θ p ε := le_antisymm (hupper β hβ) (hlower t) have hβprofile : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} = informationObjective θ p ε β t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro _ ⟨u, rfl⟩; rw [hβat]; exact hlower u⟩ have hβopt : Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} := by rw [hβprofile, hβat] have hβeq : β = αu := hunique β hβ hβopt have hpos : ∀ s ∈ r5Active, 0 < β s := by rw [hβeq] exact hposu have heq : informationQuadratic (informationMatrix θ p ε β) (direction t) = informationQuadratic (channelFisherInfo θ p Q) (direction t) := by have hQlower := attainment_forces_direction_lower θ p ε t hp hθ hε Q hQ (by simpa only [θ] using hattain) have hβupper : informationQuadratic (informationMatrix θ p ε β) (direction t) ≤ Jstar θ p ε := by calc _ = informationObjective θ p ε β t := by rw [informationObjective_eq_informationQuadratic] rfl _ ≤ _ := hupper β hβ exact le_antisymm (hβupper.trans hQlower) (horder t) have hsing : ∀ s ∈ r5Active, ∀ u ∈ r5Active, s ≠ u → K s ⟂ₘ K u := by intro s hs u hu hne by_contra hn have hscore := hrigid t heq s u (ne_of_gt (hpos s hs)) (ne_of_gt (hpos u hu)) hn exact hdistinct rfl s hs u hu hne (by simpa only [θ] using hscore) have hcard := active_card_le_outputCardinality_of_pairwise_singular θ p ε hp hθ r5Active β hpos K hK Q hfactor hsing have hAcard : r5Active.card = 5 := by decide rw [hAcard] at hcard norm_num at hcard ⊢ simpa only [θ] using hcard
CausalSmith.Stat.LdpAteEfficiencySurface.r5Certificate_outputCardinality_ge_five · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/GeneralR5Rigidity.lean:150
theorem r5Certificate_staircase_attains_five

The primal witness carried by an R5 certificate attains the oracle and has exactly five positive staircase outputs. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 ε :
ℝ
hx :
(p, μ0, μ1, ε) ∈ R5
θ :
fun k => if k = 0 then μ0 else μ1 (: TrialParameter)
∃ α : StaircaseWeight,
conclusion 1
conclusion 2
conclusion 3
Proof (Lean source)
lemma r5Certificate_staircase_attains_five (p μ0 μ1 ε : ℝ) (hx : (p, μ0, μ1, ε) ∈ R5) : let θ : TrialParameter := fun k => if k = 0 then μ0 else μ1 ∃ α : StaircaseWeight, staircaseFeasible ε α ∧ contrastVariance (informationMatrix θ p ε α) = ofReal (Vstar θ p ε) ∧ outputCardinality θ p (staircaseChannel ε α) = 5 := by dsimp only change 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < ε ∧ _ at hx rcases hx with ⟨hp0, hp1, hμ00, hμ01, hμ10, hμ11, hε, α, t, η, hα, hsupp, hpos, hstat, hactive, hinactive, _⟩ let θ : TrialParameter := fun k => if k = 0 then μ0 else μ1 have hp : InteriorAssignment p := ⟨hp0, hp1⟩ have hθ : InteriorMeans θ := by change 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 exact ⟨hμ00, hμ01, hμ10, hμ11⟩ obtain ⟨hopt, _⟩ := strictCertificate_profile_optimal_and_rigid θ p ε hp hθ hε.le r5Active α t η hα hsupp hstat hactive hinactive have hmin (u : ℝ) : informationObjective θ p ε α t ≤ informationObjective θ p ε α u := informationObjective_min_of_stationary θ p ε hp hθ hε.le α hα t (by rw [← hstat] apply Finset.sum_congr rfl intro s _ simp [patternInformationSlope] ring) u have hprofile : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} = informationObjective θ p ε α t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro _ ⟨u, rfl⟩; exact hmin u⟩ have hvalue : informationObjective θ p ε α t = Jstar θ p ε := by rw [← hprofile, ← hopt] have hquad (u : ℝ) : informationObjective θ p ε α u = informationQuadratic (informationMatrix θ p ε α) (direction u) := by rw [informationObjective_eq_informationQuadratic] rfl have hqmin (u : ℝ) : informationQuadratic (informationMatrix θ p ε α) (direction t) ≤ informationQuadratic (informationMatrix θ p ε α) (direction u) := by rw [← hquad t, ← hquad u] exact hmin u have hqpos : 0 < informationQuadratic (informationMatrix θ p ε α) (direction t) := by rw [← hquad t, hvalue] exact Jstar_pos_interior θ p ε hp hθ hε have hvariance : contrastVariance (informationMatrix θ p ε α) = ofReal (Vstar θ p ε) := by rw [contrastVariance_eq_reciprocal_of_minimizer (informationMatrix θ p ε α) (informationMatrix_posSemidef_interior θ p ε hp hθ hε.le α hα) t hqmin hqpos] congr 1 rw [← hquad t, hvalue] rfl have hsuppcard : (staircaseSupport α).card = 5 := by have hs : staircaseSupport α = r5Active := by ext s simp only [staircaseSupport, mem_filter, Finset.mem_univ, true_and] exact hsupp s rw [hs] decide have hcard : outputCardinality θ p (staircaseChannel ε α) = 5 := by rw [outputCardinality_staircase_eq_support_card θ p ε hp hθ α hα.1, hsuppcard] norm_num exact ⟨α, hα, hvariance, hcard⟩
CausalSmith.Stat.LdpAteEfficiencySurface.r5Certificate_staircase_attains_five · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/GeneralR5Rigidity.lean:267
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.Laplace 9 declarations The custom Horvitz–Thompson score is released with independent centered Laplace noise at the published sensitivity scale.

Published custom Laplace comparator

The custom Horvitz–Thompson score is released with independent centered Laplace noise at the published sensitivity scale.

def sensitivity

For the supplied quantities and conditions, the sensitivity is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
sensitivity p :
ℝ
p⁻¹ + (controlProb p)⁻¹
CausalSmith.Stat.LdpAteEfficiencySurface.sensitivity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Laplace.lean:21
def comparatorNoiseLaw

For the supplied quantities and conditions, the comparator noise law is the mathematical object specified below. The comparator Noise Law is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
comparatorNoiseLaw p ε :
CausalSmith.Stat.LdpAteEfficiencySurface.comparatorNoiseLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Laplace.lean:26
def ComparatorNoise

The observed-record/noise pairs are jointly independent across subjects; each noise has the published Laplace marginal and is independent of its observed private record. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The Comparator Noise is determined by the displayed parameters.

Definition (Lean source)
Ω :
μ :
W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
ComparatorNoise μ W Y L p ε :
Prop
clause 1
iIndepFun (fun i ω => (privateRecord W Y i ω, L i ω)) μ
clause 2
i :
μ.map (L i) = comparatorNoiseLaw p ε
clause 3
i :
IndepFun (L i) (privateRecord W Y i) μ
CausalSmith.Stat.LdpAteEfficiencySurface.ComparatorNoise · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Laplace.lean:31
def oaReleaseValue

For the supplied quantities and conditions, the oa release value is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The oa Release Value is determined by the displayed parameters.

Definition (Lean source)
Ω :
Type*
W Y L :
ℕ → Ω → ℝ
p :
ℝ
i :
ℕ
ω :
Ω
oaReleaseValue W Y L p i ω :
ℝ
W i ω * Y i ω / p - (1 - W i ω) * Y i ω / controlProb p + L i ω
CausalSmith.Stat.LdpAteEfficiencySurface.oaReleaseValue · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Laplace.lean:38

the oa release is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The oa Release is determined by the displayed parameters.

Definition (Lean source)
Ω :
μ :
W Y L A :
ℕ → Ω → ℝ
τhat :
ℕ → Ω → ℝ
p ε Δ :
ℝ
oaRelease μ W Y L A τhat p ε Δ :
Prop
clause 2
0 < ε
clause 3
clause 4
Δ = 1 / (p * controlProb p)
clause 5
ComparatorNoise μ W Y L p ε
clause 6
i ω :
A i ω = oaReleaseValue W Y L p i ω
clause 7
n ≥ 1 :
ω :
τhat n ω = (n : ℝ)⁻¹ * ∑ i ∈ range n, A i ω
CausalSmith.Stat.LdpAteEfficiencySurface.oaRelease · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Laplace.lean:46

For the supplied quantities and conditions, the tau oa is the mathematical object specified below. The tau OA is determined by the displayed parameters.

Definition (Lean source)
Ω :
Type*
W Y L :
ℕ → Ω → ℝ
p :
ℝ
n :
ℕ
ω :
Ω
tauOA W Y L p n ω :
ℝ
(n : ℝ)⁻¹ * ∑ i ∈ range n, oaReleaseValue W Y L p i ω

For the supplied quantities and conditions, the vhat oa is the mathematical object specified below. The Vhat OA is determined by the displayed parameters.

Definition (Lean source)
Ω :
Type*
W Y L :
ℕ → Ω → ℝ
p :
ℝ
n :
ℕ
ω :
Ω
VhatOA W Y L p n ω :
ℝ
(n : ℝ)⁻¹ * ∑ i ∈ range n, (oaReleaseValue W Y L p i ω - tauOA W Y L p n ω) ^ 2
theorem VhatOA_eq_second_moment_sub_sq

the vhat oa eq second moment sub sq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Type*
W Y L :
ℕ → Ω → ℝ
p :
ℝ
n :
ℕ
hn :
0 < n
ω :
Ω
VhatOA W Y L p n ω
= (n : ℝ)⁻¹ * ∑ i ∈ range n, (oaReleaseValue W Y L p i ω) ^ 2
- (tauOA W Y L p n ω) ^ 2
Proof (Lean source)
lemma VhatOA_eq_second_moment_sub_sq {Ω : Type*} (W Y L : ℕ → Ω → ℝ) (p : ℝ) (n : ℕ) (hn : 0 < n) (ω : Ω) : VhatOA W Y L p n ω = (n : ℝ)⁻¹ * ∑ i ∈ range n, (oaReleaseValue W Y L p i ω) ^ 2 - (tauOA W Y L p n ω) ^ 2 := by let a : ℕ → ℝ := fun i => oaReleaseValue W Y L p i ω let m : ℝ := tauOA W Y L p n ω have hn' : (n : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hn) have hm : (n : ℝ)⁻¹ * ∑ i ∈ range n, a i = m := rfl simp only [VhatOA, a, m, sub_sq] rw [Finset.sum_add_distrib, Finset.sum_sub_distrib] have hcross : (∑ i ∈ range n, 2 * a i * m) = 2 * m * ∑ i ∈ range n, a i := by rw [← Finset.sum_mul, ← Finset.mul_sum] ring simp only [Finset.sum_const, Finset.card_range] change (n : ℝ)⁻¹ * ((∑ i ∈ range n, a i ^ 2) - (∑ i ∈ range n, 2 * a i * m) + n • m ^ 2) = (n : ℝ)⁻¹ * ∑ i ∈ range n, a i ^ 2 - m ^ 2 rw [hcross] simp only [nsmul_eq_mul] field_simp at hm ⊢ rw [hm] ring
CausalSmith.Stat.LdpAteEfficiencySurface.VhatOA_eq_second_moment_sub_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Laplace.lean:71

For the supplied quantities and conditions, the voa is the mathematical object specified below. The VOA is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
VOA θ p ε :
ℝ
θ 1 / p + θ 0 / controlProb p - (contrast θ) ^ 2 + 2 * (sensitivity p) ^ 2 / ε ^ 2
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.LaplaceMoments 5 declarations This file records the first two moments and square integrability of the positive-scale centered Laplace distribution used by the comparator release.

Moments of the centered Laplace law

This file records the first two moments and square integrability of the positive-scale centered Laplace distribution used by the comparator release.

theorem laplaceMeasure_integral_id

A centered Laplace draw has mean zero at every positive scale. For the displayed inputs and conditions, the stated result follows.

Formal statement
b :
ℝ
hb :
0 < b
∫ x, x ∂(laplaceMeasure b) = 0
Proof (Lean source)
lemma laplaceMeasure_integral_id (b : ℝ) (hb : 0 < b) : ∫ x, x ∂(laplaceMeasure b) = 0 := by rw [laplaceMeasure, integral_withDensity_eq_integral_toReal_smul (measurable_laplacePDF b).ennreal_ofReal (ae_of_all _ fun _ => ENNReal.ofReal_lt_top)] simp_rw [ENNReal.toReal_ofReal (laplacePDF_nonneg' hb _), smul_eq_mul] have hneg := integral_neg_eq_self (μ := (volume : Measure ℝ)) (f := fun x : ℝ => laplacePDF b x * x) have hodd : (fun x : ℝ => laplacePDF b (-x) * (-x)) = fun x => -(laplacePDF b x * x) := by funext x simp [laplacePDF] rw [hodd, integral_neg] at hneg linarith
CausalSmith.Stat.LdpAteEfficiencySurface.laplaceMeasure_integral_id · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/LaplaceMoments.lean:66
theorem laplaceMeasure_integrable_sq

The square of a centered Laplace draw is integrable at every positive scale. For the displayed inputs and conditions, the stated result follows.

Formal statement
b :
ℝ
hb :
0 < b
Integrable (fun x : ℝ => x ^ 2) (laplaceMeasure b)
Proof (Lean source)
lemma laplaceMeasure_integrable_sq (b : ℝ) (hb : 0 < b) : Integrable (fun x : ℝ => x ^ 2) (laplaceMeasure b) := by rw [laplaceMeasure, integrable_withDensity_iff_integrable_smul' (measurable_laplacePDF b).ennreal_ofReal (ae_of_all _ fun _ => ENNReal.ofReal_lt_top)] simpa only [ENNReal.toReal_ofReal (laplacePDF_nonneg' hb _), smul_eq_mul, mul_comm] using integrable_sq_mul_laplacePDF b hb
CausalSmith.Stat.LdpAteEfficiencySurface.laplaceMeasure_integrable_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/LaplaceMoments.lean:82
theorem laplaceMeasure_integral_sq

The second moment of a centered Laplace draw with positive scale b is 2 * b ^ 2. For the displayed inputs and conditions, the stated result follows.

Formal statement
b :
ℝ
hb :
0 < b
∫ x, x ^ 2 ∂(laplaceMeasure b) = 2 * b ^ 2
Proof (Lean source)
lemma laplaceMeasure_integral_sq (b : ℝ) (hb : 0 < b) : ∫ x, x ^ 2 ∂(laplaceMeasure b) = 2 * b ^ 2 := by rw [laplaceMeasure, integral_withDensity_eq_integral_toReal_smul (measurable_laplacePDF b).ennreal_ofReal (ae_of_all _ fun _ => ENNReal.ofReal_lt_top)] simp_rw [ENNReal.toReal_ofReal (laplacePDF_nonneg' hb _), smul_eq_mul] let f : ℝ → ℝ := fun x => (2 * b)⁻¹ * (x ^ 2 * exp (-x / b)) rw [show (fun x : ℝ => laplacePDF b x * x ^ 2) = fun x => f |x| by funext x simp only [f, laplacePDF, sq_abs] ring, integral_comp_abs] have hplain : (∫ x in Ioi (0 : ℝ), x ^ 2 * exp (-x / b)) = 2 * b ^ 3 := by calc _ = ∫ x in Ioi (0 : ℝ), x ^ ((3 : ℝ) - 1) * exp (-((1 / b) * x)) := by apply setIntegral_congr_fun measurableSet_Ioi intro x hx simp only [show (3 : ℝ) - 1 = 2 by norm_num, Real.rpow_two] rw [show -x / b = -(1 / b * x) by ring] _ = (1 / (1 / b)) ^ (3 : ℝ) * Gamma (3 : ℝ) := Real.integral_rpow_mul_exp_neg_mul_Ioi (by norm_num) (one_div_pos.mpr hb) _ = 2 * b ^ 3 := by rw [show Gamma (3 : ℝ) = 2 by norm_num] field_simp [hb.ne'] exact Real.rpow_natCast b 3 rw [show (∫ x in Ioi (0 : ℝ), f x) = (2 * b)⁻¹ * (2 * b ^ 3) by rw [integral_const_mul, hplain]] field_simp [hb.ne']
CausalSmith.Stat.LdpAteEfficiencySurface.laplaceMeasure_integral_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/LaplaceMoments.lean:91
theorem aemeasurable

Each comparator noise coordinate is almost everywhere measurable. This is recovered from its stipulated nonzero Laplace pushforward law, so no separate measurability assumption is needed. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the aemeasurable.

Formal statement
Ω :
Type*
ℕ → Ω → ℝ
p ε :
ℝ
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
AEMeasurable (L i) μ
Proof (Lean source)
lemma ComparatorNoise.aemeasurable {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} {W Y L : ℕ → Ω → ℝ} {p ε : ℝ} (hnoise : ComparatorNoise μ W Y L p ε) (hp : InteriorAssignment p) (hε : 0 < ε) (i : ℕ) : AEMeasurable (L i) μ := by have hsens : 0 < sensitivity p := by unfold sensitivity controlProb exact add_pos (inv_pos.mpr hp.1) (inv_pos.mpr (sub_pos.mpr hp.2)) have hscale : 0 < sensitivity p / ε := div_pos hsens hε letI : IsProbabilityMeasure (comparatorNoiseLaw p ε) := by unfold comparatorNoiseLaw exact laplaceMeasure_isProbabilityMeasure _ hscale have hne : μ.map (L i) ≠ 0 := by rw [hnoise.2.1 i] exact IsProbabilityMeasure.ne_zero _ exact AEMeasurable.of_map_ne_zero hne
CausalSmith.Stat.LdpAteEfficiencySurface.ComparatorNoise.aemeasurable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/LaplaceMoments.lean:121
theorem oaReleaseValue_aemeasurable

Every noisy release coordinate is almost everywhere measurable under the binary-trial and comparator-noise assumptions. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Release Value aemeasurable.

Formal statement
Ω :
Type*
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
Proof (Lean source)
lemma oaReleaseValue_aemeasurable {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} {Y0 Y1 W Y L : ℕ → Ω → ℝ} {θ : TrialParameter} {p ε : ℝ} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : AEMeasurable (oaReleaseValue W Y L p i) μ := by have hY0 : Measurable (Y0 i) := (hmodel.measurable i).fst have hY1 : Measurable (Y1 i) := (hmodel.measurable i).snd.fst have hW : Measurable (W i) := (hmodel.measurable i).snd.snd have hY : Measurable (Y i) := by have hformula : Y i = fun ω => W i ω * Y1 i ω + (1 - W i ω) * Y0 i ω := by funext ω exact hmodel.consistent i ω rw [hformula] exact (hW.mul hY1).add ((measurable_const.sub hW).mul hY0) have hL : AEMeasurable (L i) μ := hnoise.aemeasurable hmodel.assignmentInterior hε i unfold oaReleaseValue exact (((hW.mul hY).div_const p).sub ((measurable_const.sub hW).mul hY |>.div_const (controlProb p))).aemeasurable.add hL
CausalSmith.Stat.LdpAteEfficiencySurface.oaReleaseValue_aemeasurable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/LaplaceMoments.lean:141
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.LaplaceRatio 1 declarations A nonnegative estimated denominator makes the ordinary square-root ratio agree with the total fallback map.

Coupled variance-ratio continuity

A nonnegative estimated denominator makes the ordinary square-root ratio agree with the total fallback map. Consequently marginal convergence in probability passes through every coupling of the two rows.

theorem VhatStar_nonneg

Under the supplied quantities and conditions, the vhat star nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
select :
n :
ℕ
z :
Transcript (pilotOutputFamily n)
0 ≤ VhatStar p ε m select z
Proof (Lean source)
lemma VhatStar_nonneg (p ε : ℝ) (m : ℕ → ℕ) (select : TrialParameter → StaircaseWeight × ℝ × ℝ) {n : ℕ} (z : Transcript (pilotOutputFamily n)) : 0 ≤ VhatStar p ε m select z := by unfold VhatStar exact mul_nonneg (inv_nonneg.mpr (Nat.cast_nonneg _)) (Finset.sum_nonneg fun i _ => by split_ifs · exact sq_nonneg _ · exact le_rfl)
CausalSmith.Stat.LdpAteEfficiencySurface.VhatStar_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/LaplaceRatio.lean:19
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.OAConsistency 28 declarations IID and moment adapters for the custom Laplace release

IID and moment adapters for the custom Laplace release

def oaTrialValue

For the supplied quantities and conditions, the oa trial value is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
j :
Fin 4
oaTrialValue p j :
ℝ
if j = 0 then 0 else if j = 1 then -(controlProb p)⁻¹ else if j = 2 then 0 else p⁻¹
theorem oaTrialValue_mean_inputLaw

Under the supplied quantities and conditions, the oa trial value mean input law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Trial Value mean input Law.

Formal statement
p :
ℝ
hθ :
∫ j, oaTrialValue p j ∂(inputLaw θ p) = contrast θ
Proof (Lean source)
lemma oaTrialValue_mean_inputLaw (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : ∫ j, oaTrialValue p j ∂(inputLaw θ p) = contrast θ := by have hpi (j : Fin 4) : 0 ≤ piTheta θ p j := by rcases hp with ⟨hp0, hp1⟩ rcases hθ with ⟨h00, h01, h10, h11⟩ fin_cases j <;> simp only [piTheta, controlProb] <;> positivity have hpi0 : piTheta θ p (0 : Fin 4) = controlProb p * (1 - θ 0) := rfl have hpi1 : piTheta θ p (1 : Fin 4) = controlProb p * θ 0 := rfl have hpi2 : piTheta θ p (2 : Fin 4) = p * (1 - θ 1) := rfl have hpi3 : piTheta θ p (3 : Fin 4) = p * θ 1 := rfl rw [inputLaw, integral_withDensity_eq_integral_toReal_smul] · simp_rw [ENNReal.toReal_ofReal (hpi _), smul_eq_mul] rw [integral_count] simp +decide [oaTrialValue, hpi0, hpi1, hpi2, hpi3, controlProb, contrast, Fin.sum_univ_succ] field_simp [ne_of_gt hp.1, ne_of_gt (sub_pos.mpr hp.2)] ring · exact (measurable_of_finite _).ennreal_ofReal · exact ae_of_all _ fun _ => ENNReal.ofReal_lt_top
CausalSmith.Stat.LdpAteEfficiencySurface.oaTrialValue_mean_inputLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:23
theorem oaTrialValue_sq_mean_inputLaw

Under the supplied quantities and conditions, the oa trial value sq mean input law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Trial Value sq mean input Law.

Formal statement
p :
ℝ
hθ :
∫ j, (oaTrialValue p j) ^ 2 ∂(inputLaw θ p) = θ 1 / p + θ 0 / controlProb p
Proof (Lean source)
lemma oaTrialValue_sq_mean_inputLaw (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : ∫ j, (oaTrialValue p j) ^ 2 ∂(inputLaw θ p) = θ 1 / p + θ 0 / controlProb p := by have hpi (j : Fin 4) : 0 ≤ piTheta θ p j := by rcases hp with ⟨hp0, hp1⟩ rcases hθ with ⟨h00, h01, h10, h11⟩ fin_cases j <;> simp only [piTheta, controlProb] <;> positivity have hpi0 : piTheta θ p (0 : Fin 4) = controlProb p * (1 - θ 0) := rfl have hpi1 : piTheta θ p (1 : Fin 4) = controlProb p * θ 0 := rfl have hpi2 : piTheta θ p (2 : Fin 4) = p * (1 - θ 1) := rfl have hpi3 : piTheta θ p (3 : Fin 4) = p * θ 1 := rfl rw [inputLaw, integral_withDensity_eq_integral_toReal_smul] · simp_rw [ENNReal.toReal_ofReal (hpi _), smul_eq_mul] rw [integral_count] simp +decide [oaTrialValue, hpi0, hpi1, hpi2, hpi3, controlProb, Fin.sum_univ_succ] field_simp [ne_of_gt hp.1, ne_of_gt (sub_pos.mpr hp.2)] ring · exact (measurable_of_finite _).ennreal_ofReal · exact ae_of_all _ fun _ => ENNReal.ofReal_lt_top
CausalSmith.Stat.LdpAteEfficiencySurface.oaTrialValue_sq_mean_inputLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:48
def oaTrialPart

For the supplied quantities and conditions, the oa trial part is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The oa Trial Part is determined by the displayed parameters.

Definition (Lean source)
Ω :
Type*
W Y :
ℕ → Ω → ℝ
p :
ℝ
i :
ℕ
ω :
Ω
oaTrialPart W Y p i ω :
ℝ
W i ω * Y i ω / p - (1 - W i ω) * Y i ω / controlProb p
theorem privateRecord_measurable_of_model

the private record measurable of model assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Type*
ℕ → Ω → ℝ
p :
ℝ
hmodel :
i :
ℕ
Proof (Lean source)
lemma privateRecord_measurable_of_model {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} {Y0 Y1 W Y : ℕ → Ω → ℝ} {p : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (i : ℕ) : Measurable (privateRecord W Y i) := by have hW : Measurable (W i) := (hmodel.measurable i).snd.snd have hY0 : Measurable (Y0 i) := (hmodel.measurable i).fst have hY1 : Measurable (Y1 i) := (hmodel.measurable i).snd.fst have hY : Measurable (Y i) := by rw [show Y i = fun ω => W i ω * Y1 i ω + (1 - W i ω) * Y0 i ω by funext ω; exact hmodel.consistent i ω] exact (hW.mul hY1).add ((measurable_const.sub hW).mul hY0) unfold privateRecord exact Measurable.ite (hW (measurableSet_singleton 0)) (Measurable.ite (hY (measurableSet_singleton 0)) measurable_const measurable_const) (Measurable.ite (hY (measurableSet_singleton 0)) measurable_const measurable_const)
CausalSmith.Stat.LdpAteEfficiencySurface.privateRecord_measurable_of_model · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:79
theorem oaTrialPart_ae_eq_record

the oa trial part ae eq record assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Type*
ℕ → Ω → ℝ
p :
ℝ
hmodel :
i :
ℕ
oaTrialPart W Y p i =ᵐ[μ] fun ω => oaTrialValue p (privateRecord W Y i ω)
Proof (Lean source)
lemma oaTrialPart_ae_eq_record {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} {Y0 Y1 W Y : ℕ → Ω → ℝ} {p : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (i : ℕ) : oaTrialPart W Y p i =ᵐ[μ] fun ω => oaTrialValue p (privateRecord W Y i ω) := by filter_upwards [(hmodel.assigned i).1, hmodel.binary i] with ω hW hY simp only [Set.mem_insert_iff, Set.mem_singleton_iff] at hW hY rcases hW with hW | hW · rcases hY.1 with hY0 | hY0 <;> simp [oaTrialPart, oaTrialValue, privateRecord, hmodel.consistent i ω, hW, hY0] · rcases hY.2 with hY1 | hY1 <;> simp [oaTrialPart, oaTrialValue, privateRecord, hmodel.consistent i ω, hW, hY1]
CausalSmith.Stat.LdpAteEfficiencySurface.oaTrialPart_ae_eq_record · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:96
theorem oaTrialPart_integral

the oa trial part integral assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Y0 Y1 W Y :
ℕ → Ω → ℝ
p :
ℝ
hmodel :
i :
ℕ
∫ ω, oaTrialPart W Y p i ω ∂μ = contrast θ
Proof (Lean source)
lemma oaTrialPart_integral {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Y0 Y1 W Y : ℕ → Ω → ℝ} {p : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (i : ℕ) : ∫ ω, oaTrialPart W Y p i ω ∂μ = contrast θ := by rw [integral_congr_ae (oaTrialPart_ae_eq_record hmodel i)] rw [← integral_map (privateRecord_measurable_of_model hmodel i).aemeasurable (measurable_of_finite _).aestronglyMeasurable, recordLaw_eq_piTheta μ Y0 Y1 W Y p θ hmodel i] exact oaTrialValue_mean_inputLaw θ p hmodel.assignmentInterior hmodel.meansInterior
CausalSmith.Stat.LdpAteEfficiencySurface.oaTrialPart_integral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:112
theorem oaTrialPart_sq_integral

the oa trial part sq integral assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Y0 Y1 W Y :
ℕ → Ω → ℝ
p :
ℝ
hmodel :
i :
ℕ
∫ ω, (oaTrialPart W Y p i ω) ^ 2 ∂μ = θ 1 / p + θ 0 / controlProb p
Proof (Lean source)
lemma oaTrialPart_sq_integral {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Y0 Y1 W Y : ℕ → Ω → ℝ} {p : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (i : ℕ) : ∫ ω, (oaTrialPart W Y p i ω) ^ 2 ∂μ = θ 1 / p + θ 0 / controlProb p := by have hsq : (fun ω => (oaTrialPart W Y p i ω) ^ 2) =ᵐ[μ] fun ω => (oaTrialValue p (privateRecord W Y i ω)) ^ 2 := by filter_upwards [oaTrialPart_ae_eq_record hmodel i] with ω hω rw [hω] rw [integral_congr_ae hsq] rw [← integral_map (privateRecord_measurable_of_model hmodel i).aemeasurable ((measurable_of_finite _).pow_const 2).aestronglyMeasurable, recordLaw_eq_piTheta μ Y0 Y1 W Y p θ hmodel i] exact oaTrialValue_sq_mean_inputLaw θ p hmodel.assignmentInterior hmodel.meansInterior
CausalSmith.Stat.LdpAteEfficiencySurface.oaTrialPart_sq_integral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:124
theorem oaTrialPart_integrable

the oa trial part integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Y0 Y1 W Y :
ℕ → Ω → ℝ
p :
ℝ
hmodel :
i :
ℕ
Integrable (oaTrialPart W Y p i) μ
Proof (Lean source)
lemma oaTrialPart_integrable {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Y0 Y1 W Y : ℕ → Ω → ℝ} {p : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (i : ℕ) : Integrable (oaTrialPart W Y p i) μ := by have hm : Measurable (fun ω => oaTrialValue p (privateRecord W Y i ω)) := (show Measurable (oaTrialValue p) from measurable_of_finite _).comp (privateRecord_measurable_of_model hmodel i) have hi : Integrable (fun ω => oaTrialValue p (privateRecord W Y i ω)) μ := Integrable.of_bound hm.aestronglyMeasurable (|(controlProb p)⁻¹| + |p⁻¹|) (Filter.Eventually.of_forall fun ω => by simpa [Real.norm_eq_abs] using oaTrialValue_abs_le p (privateRecord W Y i ω)) exact hi.congr (oaTrialPart_ae_eq_record hmodel i).symm
CausalSmith.Stat.LdpAteEfficiencySurface.oaTrialPart_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:145
theorem oaTrialPart_sq_integrable

the oa trial part sq integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Y0 Y1 W Y :
ℕ → Ω → ℝ
p :
ℝ
hmodel :
i :
ℕ
Integrable (fun ω => (oaTrialPart W Y p i ω) ^ 2) μ
Proof (Lean source)
lemma oaTrialPart_sq_integrable {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Y0 Y1 W Y : ℕ → Ω → ℝ} {p : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (i : ℕ) : Integrable (fun ω => (oaTrialPart W Y p i ω) ^ 2) μ := by have hm : Measurable (fun ω => (oaTrialValue p (privateRecord W Y i ω)) ^ 2) := ((show Measurable (oaTrialValue p) from measurable_of_finite _).comp (privateRecord_measurable_of_model hmodel i)).pow_const 2 have hi : Integrable (fun ω => (oaTrialValue p (privateRecord W Y i ω)) ^ 2) μ := Integrable.of_bound hm.aestronglyMeasurable ((|(controlProb p)⁻¹| + |p⁻¹|) ^ 2) (Filter.Eventually.of_forall fun ω => by have h := oaTrialValue_abs_le p (privateRecord W Y i ω) rw [Real.norm_eq_abs, abs_sq] have hs := mul_self_le_mul_self (abs_nonneg _) h nlinarith [sq_abs (oaTrialValue p (privateRecord W Y i ω))]) have hsq : (fun ω => (oaTrialValue p (privateRecord W Y i ω)) ^ 2) =ᵐ[μ] fun ω => (oaTrialPart W Y p i ω) ^ 2 := by filter_upwards [oaTrialPart_ae_eq_record hmodel i] with ω hω rw [hω] exact hi.congr hsq
CausalSmith.Stat.LdpAteEfficiencySurface.oaTrialPart_sq_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:161
theorem comparatorNoise_integral

the comparator noise integral assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the comparator Noise integral.

Formal statement
Ω :
W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
∫ ω, L i ω ∂μ = 0
Proof (Lean source)
lemma comparatorNoise_integral {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {W Y L : ℕ → Ω → ℝ} {p ε : ℝ} (hp : InteriorAssignment p) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : ∫ ω, L i ω ∂μ = 0 := by have hL := hnoise.aemeasurable hp hε i have hscale : 0 < sensitivity p / ε := by apply div_pos _ hε unfold sensitivity controlProb exact add_pos (inv_pos.mpr hp.1) (inv_pos.mpr (sub_pos.mpr hp.2)) change (∫ ω, id (L i ω) ∂μ) = 0 rw [← integral_map hL measurable_id.aestronglyMeasurable, hnoise.2.1 i] exact laplaceMeasure_integral_id (sensitivity p / ε) hscale
CausalSmith.Stat.LdpAteEfficiencySurface.comparatorNoise_integral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:184
theorem comparatorNoise_sq_integral

the comparator noise sq integral assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the comparator Noise sq integral.

Formal statement
Ω :
W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
∫ ω, (L i ω) ^ 2 ∂μ = 2 * (sensitivity p) ^ 2 / ε ^ 2
Proof (Lean source)
lemma comparatorNoise_sq_integral {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {W Y L : ℕ → Ω → ℝ} {p ε : ℝ} (hp : InteriorAssignment p) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : ∫ ω, (L i ω) ^ 2 ∂μ = 2 * (sensitivity p) ^ 2 / ε ^ 2 := by have hL := hnoise.aemeasurable hp hε i have hscale : 0 < sensitivity p / ε := by apply div_pos _ hε unfold sensitivity controlProb exact add_pos (inv_pos.mpr hp.1) (inv_pos.mpr (sub_pos.mpr hp.2)) change (∫ ω, (id (L i ω)) ^ 2 ∂μ) = _ rw [← integral_map hL (measurable_id.pow_const 2).aestronglyMeasurable, hnoise.2.1 i] simp only [comparatorNoiseLaw, id_eq] rw [laplaceMeasure_integral_sq (sensitivity p / ε) hscale] ring
CausalSmith.Stat.LdpAteEfficiencySurface.comparatorNoise_sq_integral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:202
theorem comparatorNoise_sq_integrable

the comparator noise sq integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the comparator Noise sq integrable.

Formal statement
Ω :
W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
Integrable (fun ω => (L i ω) ^ 2) μ
Proof (Lean source)
lemma comparatorNoise_sq_integrable {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {W Y L : ℕ → Ω → ℝ} {p ε : ℝ} (hp : InteriorAssignment p) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : Integrable (fun ω => (L i ω) ^ 2) μ := by have hL := hnoise.aemeasurable hp hε i have hscale : 0 < sensitivity p / ε := by apply div_pos _ hε unfold sensitivity controlProb exact add_pos (inv_pos.mpr hp.1) (inv_pos.mpr (sub_pos.mpr hp.2)) have hmap : Integrable (fun x : ℝ => x ^ 2) (μ.map (L i)) := by rw [hnoise.2.1 i] exact laplaceMeasure_integrable_sq (sensitivity p / ε) hscale exact (integrable_map_measure (measurable_id.pow_const 2).aestronglyMeasurable hL).mp hmap
CausalSmith.Stat.LdpAteEfficiencySurface.comparatorNoise_sq_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:223
theorem comparatorNoise_integrable

the comparator noise integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the comparator Noise integrable.

Formal statement
Ω :
W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
Integrable (L i) μ
Proof (Lean source)
lemma comparatorNoise_integrable {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {W Y L : ℕ → Ω → ℝ} {p ε : ℝ} (hp : InteriorAssignment p) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : Integrable (L i) μ := by have hL := hnoise.aemeasurable hp hε i exact ((memLp_two_iff_integrable_sq hL.aestronglyMeasurable).2 (comparatorNoise_sq_integrable hp hnoise hε i)).integrable (by norm_num)
CausalSmith.Stat.LdpAteEfficiencySurface.comparatorNoise_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:242
theorem oaTrialPart_indep_noise

the oa trial part indep noise assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Type*
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
i :
ℕ
IndepFun (L i) (oaTrialPart W Y p i) μ
Proof (Lean source)
lemma oaTrialPart_indep_noise {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p ε : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) (i : ℕ) : IndepFun (L i) (oaTrialPart W Y p i) μ := by have h := (hnoise.2.2 i).comp measurable_id (show Measurable (oaTrialValue p) from measurable_of_finite _) apply h.congr (Filter.Eventually.of_forall fun _ => rfl) simpa [Function.comp_def] using (oaTrialPart_ae_eq_record hmodel i).symm
CausalSmith.Stat.LdpAteEfficiencySurface.oaTrialPart_indep_noise · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:255
theorem oaReleaseValue_eq_trial_add

the oa release value eq trial add assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Type*
W Y L :
ℕ → Ω → ℝ
p :
ℝ
i :
ℕ
ω :
Ω
oaReleaseValue W Y L p i ω = oaTrialPart W Y p i ω + L i ω
Proof (Lean source)
lemma oaReleaseValue_eq_trial_add {Ω : Type*} (W Y L : ℕ → Ω → ℝ) (p : ℝ) (i : ℕ) (ω : Ω) : oaReleaseValue W Y L p i ω = oaTrialPart W Y p i ω + L i ω := rfl
CausalSmith.Stat.LdpAteEfficiencySurface.oaReleaseValue_eq_trial_add · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:266
theorem oaReleaseValue_integral

the oa release value integral assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Release Value integral.

Formal statement
Ω :
Y0 Y1 W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
∫ ω, oaReleaseValue W Y L p i ω ∂μ = contrast θ
Proof (Lean source)
lemma oaReleaseValue_integral {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p ε : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : ∫ ω, oaReleaseValue W Y L p i ω ∂μ = contrast θ := by rw [show (fun ω => oaReleaseValue W Y L p i ω) = fun ω => oaTrialPart W Y p i ω + L i ω by funext ω; rfl, integral_add (oaTrialPart_integrable hmodel i) (comparatorNoise_integrable hmodel.assignmentInterior hnoise hε i), oaTrialPart_integral hmodel i, comparatorNoise_integral hmodel.assignmentInterior hnoise hε i, add_zero]
CausalSmith.Stat.LdpAteEfficiencySurface.oaReleaseValue_integral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:271
theorem oaReleaseValue_sq_integrable

the oa release value sq integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Release Value sq integrable.

Formal statement
Ω :
Y0 Y1 W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
Integrable (fun ω => (oaReleaseValue W Y L p i ω) ^ 2) μ
Proof (Lean source)
lemma oaReleaseValue_sq_integrable {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p ε : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : Integrable (fun ω => (oaReleaseValue W Y L p i ω) ^ 2) μ := by have hb : MemLp (oaTrialPart W Y p i) 2 μ := (memLp_two_iff_integrable_sq (oaTrialPart_integrable hmodel i).aestronglyMeasurable).2 (oaTrialPart_sq_integrable hmodel i) have hn : MemLp (L i) 2 μ := (memLp_two_iff_integrable_sq (hnoise.aemeasurable hmodel.assignmentInterior hε i).aestronglyMeasurable).2 (comparatorNoise_sq_integrable hmodel.assignmentInterior hnoise hε i) have ha := hb.add hn have heq : (oaTrialPart W Y p i + L i) = fun ω => oaReleaseValue W Y L p i ω := by funext ω; rfl rw [heq] at ha exact ha.integrable_sq
CausalSmith.Stat.LdpAteEfficiencySurface.oaReleaseValue_sq_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:287
theorem oaReleaseValue_sq_integral

the oa release value sq integral assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Release Value sq integral.

Formal statement
Ω :
Y0 Y1 W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
∫ ω, (oaReleaseValue W Y L p i ω) ^ 2 ∂μ
= θ 1 / p + θ 0 / controlProb p + 2 * (sensitivity p) ^ 2 / ε ^ 2
Proof (Lean source)
lemma oaReleaseValue_sq_integral {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p ε : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : ∫ ω, (oaReleaseValue W Y L p i ω) ^ 2 ∂μ = θ 1 / p + θ 0 / controlProb p + 2 * (sensitivity p) ^ 2 / ε ^ 2 := by have hb2 := oaTrialPart_sq_integrable hmodel i have hn2 := comparatorNoise_sq_integrable hmodel.assignmentInterior hnoise hε i have hb : MemLp (oaTrialPart W Y p i) 2 μ := (memLp_two_iff_integrable_sq (oaTrialPart_integrable hmodel i).aestronglyMeasurable).2 hb2 have hn : MemLp (L i) 2 μ := (memLp_two_iff_integrable_sq (hnoise.aemeasurable hmodel.assignmentInterior hε i).aestronglyMeasurable).2 hn2 have hcrossInt : Integrable (fun ω => L i ω * oaTrialPart W Y p i ω) μ := by change Integrable (L i * oaTrialPart W Y p i) μ exact hn.integrable_mul hb have hcross : (∫ ω, L i ω * oaTrialPart W Y p i ω ∂μ) = 0 := by rw [IndepFun.integral_fun_mul_eq_mul_integral (oaTrialPart_indep_noise hmodel hnoise i) (hnoise.aemeasurable hmodel.assignmentInterior hε i).aestronglyMeasurable (oaTrialPart_integrable hmodel i).aestronglyMeasurable, comparatorNoise_integral hmodel.assignmentInterior hnoise hε i, zero_mul] calc _ = ∫ ω, ((oaTrialPart W Y p i ω) ^ 2 + 2 * (L i ω * oaTrialPart W Y p i ω)) + (L i ω) ^ 2 ∂μ := by apply integral_congr_ae filter_upwards with ω rw [oaReleaseValue_eq_trial_add] ring _ = (∫ ω, ((oaTrialPart W Y p i ω) ^ 2 + 2 * (L i ω * oaTrialPart W Y p i ω)) ∂μ) + ∫ ω, (L i ω) ^ 2 ∂μ := integral_add (hb2.add (hcrossInt.const_mul 2)) hn2 _ = ((∫ ω, (oaTrialPart W Y p i ω) ^ 2 ∂μ) + ∫ ω, 2 * (L i ω * oaTrialPart W Y p i ω) ∂μ) + ∫ ω, (L i ω) ^ 2 ∂μ := by rw [integral_add hb2 (hcrossInt.const_mul 2)] _ = (∫ ω, (oaTrialPart W Y p i ω) ^ 2 ∂μ) + 2 * (∫ ω, L i ω * oaTrialPart W Y p i ω ∂μ) + ∫ ω, (L i ω) ^ 2 ∂μ := by rw [integral_const_mul] _ = _ := by rw [hcross, oaTrialPart_sq_integral hmodel i, comparatorNoise_sq_integral hmodel.assignmentInterior hnoise hε i] ring
CausalSmith.Stat.LdpAteEfficiencySurface.oaReleaseValue_sq_integral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:310
theorem oaReleaseValue_centered_sq_integral

the oa release value centered sq integral assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Release Value centered sq integral.

Formal statement
Ω :
Y0 Y1 W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
∫ ω, (oaReleaseValue W Y L p i ω - contrast θ) ^ 2 ∂μ = VOA θ p ε
Proof (Lean source)
lemma oaReleaseValue_centered_sq_integral {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p ε : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : ∫ ω, (oaReleaseValue W Y L p i ω - contrast θ) ^ 2 ∂μ = VOA θ p ε := by have hA2 := oaReleaseValue_sq_integrable hmodel hnoise hε i have hA : Integrable (fun ω => oaReleaseValue W Y L p i ω) μ := by change Integrable (oaTrialPart W Y p i + L i) μ exact (oaTrialPart_integrable hmodel i).add (comparatorNoise_integrable hmodel.assignmentInterior hnoise hε i) calc _ = (∫ ω, (oaReleaseValue W Y L p i ω) ^ 2 ∂μ) - 2 * contrast θ * (∫ ω, oaReleaseValue W Y L p i ω ∂μ) + (contrast θ) ^ 2 := by rw [show (fun ω => (oaReleaseValue W Y L p i ω - contrast θ) ^ 2) = fun ω => (oaReleaseValue W Y L p i ω) ^ 2 - 2 * contrast θ * oaReleaseValue W Y L p i ω + (contrast θ) ^ 2 by funext ω; ring] calc _ = (∫ ω, (oaReleaseValue W Y L p i ω) ^ 2 - 2 * contrast θ * oaReleaseValue W Y L p i ω ∂μ) + ∫ _ : Ω, (contrast θ) ^ 2 ∂μ := integral_add (hA2.sub (hA.const_mul (2 * contrast θ))) (integrable_const _) _ = ((∫ ω, (oaReleaseValue W Y L p i ω) ^ 2 ∂μ) - ∫ ω, 2 * contrast θ * oaReleaseValue W Y L p i ω ∂μ) + ∫ _ : Ω, (contrast θ) ^ 2 ∂μ := by rw [integral_sub hA2 (hA.const_mul (2 * contrast θ))] _ = _ := by rw [integral_const_mul, integral_const]; simp _ = _ := by rw [oaReleaseValue_sq_integral hmodel hnoise hε i, oaReleaseValue_integral hmodel hnoise hε i] unfold VOA ring
CausalSmith.Stat.LdpAteEfficiencySurface.oaReleaseValue_centered_sq_integral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:361
def oaCombinedValue

For the supplied quantities and conditions, the oa combined value is the mathematical object specified below.

Definition (Lean source)
p :
ℝ
x :
oaCombinedValue p x :
ℝ
oaTrialValue p x.1 + x.2
CausalSmith.Stat.LdpAteEfficiencySurface.oaCombinedValue · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:399
theorem oaCombinedValue_measurable

Under the supplied quantities and conditions, the oa combined value measurable assertion holds.

Formal statement
p :
ℝ
Proof (Lean source)
lemma oaCombinedValue_measurable (p : ℝ) : Measurable (oaCombinedValue p) := by unfold oaCombinedValue exact ((show Measurable (oaTrialValue p) from measurable_of_finite _).comp measurable_fst).add measurable_snd
CausalSmith.Stat.LdpAteEfficiencySurface.oaCombinedValue_measurable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:403
theorem oaReleaseValue_ae_eq_combined

the oa release value ae eq combined assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Type*
ℕ → Ω → ℝ
p :
ℝ
hmodel :
i :
ℕ
oaReleaseValue W Y L p i =ᵐ[μ] fun ω => oaCombinedValue p (privateRecord W Y i ω, L i ω)
Proof (Lean source)
lemma oaReleaseValue_ae_eq_combined {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (i : ℕ) : oaReleaseValue W Y L p i =ᵐ[μ] fun ω => oaCombinedValue p (privateRecord W Y i ω, L i ω) := by filter_upwards [oaTrialPart_ae_eq_record hmodel i] with ω hω rw [oaReleaseValue_eq_trial_add, hω] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.oaReleaseValue_ae_eq_combined · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:409
theorem oaReleaseValue_iIndep

the oa release value i indep assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Ω :
Type*
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
iIndepFun (fun i => oaReleaseValue W Y L p i) μ
Proof (Lean source)
lemma oaReleaseValue_iIndep {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p ε : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) : iIndepFun (fun i => oaReleaseValue W Y L p i) μ := by have hcomp := hnoise.1.comp (fun _ : ℕ => oaCombinedValue p) (fun _ => oaCombinedValue_measurable p) exact hcomp.congr fun i => (oaReleaseValue_ae_eq_combined hmodel i).symm
CausalSmith.Stat.LdpAteEfficiencySurface.oaReleaseValue_iIndep · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:419
theorem oaCombined_identDistrib

the oa combined ident distrib assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Combined ident Distrib.

Formal statement
Ω :
Type*
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
IdentDistrib (fun ω => (privateRecord W Y 0 ω, L 0 ω)) (fun ω => (privateRecord W Y i ω, L i ω)) μ μ
Proof (Lean source)
lemma oaCombined_identDistrib {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p ε : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : IdentDistrib (fun ω => (privateRecord W Y 0 ω, L 0 ω)) (fun ω => (privateRecord W Y i ω, L i ω)) μ μ := by letI : IsProbabilityMeasure μ := hmodel.iid.1.isProbabilityMeasure let B : ℕ → Ω → PrivateAlphabet := privateRecord W Y have hB (k : ℕ) : Measurable (B k) := privateRecord_measurable_of_model hmodel k have hL (k : ℕ) : AEMeasurable (L k) μ := hnoise.aemeasurable hmodel.assignmentInterior hε k have hprod (k : ℕ) : μ.map (fun ω => (B k ω, L k ω)) = (μ.map (B k)).prod (μ.map (L k)) := by exact (indepFun_iff_map_prod_eq_prod_map_map (hB k).aemeasurable (hL k)).mp (hnoise.2.2 k).symm refine ⟨(hB 0).aemeasurable.prodMk (hL 0), (hB i).aemeasurable.prodMk (hL i), ?_⟩ change μ.map (fun ω => (B 0 ω, L 0 ω)) = μ.map (fun ω => (B i ω, L i ω)) rw [hprod 0, hprod i, show μ.map (B 0) = inputLaw θ p from recordLaw_eq_piTheta μ Y0 Y1 W Y p θ hmodel 0, show μ.map (B i) = inputLaw θ p from recordLaw_eq_piTheta μ Y0 Y1 W Y p θ hmodel i, hnoise.2.1 0, hnoise.2.1 i]
CausalSmith.Stat.LdpAteEfficiencySurface.oaCombined_identDistrib · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:430
theorem oaReleaseValue_identDistrib

the oa release value ident distrib assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Release Value ident Distrib.

Formal statement
Ω :
Type*
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
i :
ℕ
IdentDistrib (oaReleaseValue W Y L p 0) (oaReleaseValue W Y L p i) μ μ
Proof (Lean source)
lemma oaReleaseValue_identDistrib {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p ε : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (i : ℕ) : IdentDistrib (oaReleaseValue W Y L p 0) (oaReleaseValue W Y L p i) μ μ := by have hc := (oaCombined_identDistrib hmodel hnoise hε i).comp (oaCombinedValue_measurable p) refine ⟨oaReleaseValue_aemeasurable hmodel hnoise hε 0, oaReleaseValue_aemeasurable hmodel hnoise hε i, ?_⟩ rw [Measure.map_congr (oaReleaseValue_ae_eq_combined hmodel 0), Measure.map_congr (oaReleaseValue_ae_eq_combined hmodel i)] exact hc.map_eq
CausalSmith.Stat.LdpAteEfficiencySurface.oaReleaseValue_identDistrib · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:459
theorem oaRelease_clt

the oa release clt assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Release clt.

Formal statement
Ω :
Y0 Y1 W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n ω => sqrt n * (tauOA W Y L p n ω - contrast θ)) atTop (gaussianMeasure 0 (VOA θ p ε))
Proof (Lean source)
lemma oaRelease_clt {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p ε : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) : Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n ω => sqrt n * (tauOA W Y L p n ω - contrast θ)) atTop (gaussianMeasure 0 (VOA θ p ε)) := by let A : ℕ → Ω → ℝ := fun i => oaReleaseValue W Y L p i have hA (i : ℕ) : AEMeasurable (A i) μ := oaReleaseValue_aemeasurable hmodel hnoise hε i have hAI : iIndepFun A μ := oaReleaseValue_iIndep hmodel hnoise have hAD (i : ℕ) : IdentDistrib (A 0) (A i) μ μ := oaReleaseValue_identDistrib hmodel hnoise hε i let Am : ℕ → Ω → ℝ := fun i => (hA i).mk (A i) have hAmMeas (i : ℕ) : Measurable (Am i) := (hA i).measurable_mk have hAmAE (i : ℕ) : Am i =ᵐ[μ] A i := (hA i).ae_eq_mk.symm have hAmI : iIndepFun Am μ := hAI.congr fun i => (hAmAE i).symm have hAmD (i : ℕ) : IdentDistrib (Am 0) (Am i) μ μ := by refine ⟨(hAmMeas 0).aemeasurable, (hAmMeas i).aemeasurable, ?_⟩ rw [Measure.map_congr (hAmAE 0), Measure.map_congr (hAmAE i)] exact (hAD i).map_eq let S : IIDSample Ω ℝ μ (μ.map (A 0)) := { Z := Am meas := hAmMeas indep := hAmI identDist := hAmD law := Measure.map_congr (hAmAE 0) } let ψ : ℝ → ℝ := id - fun _ => contrast θ letI : IsProbabilityMeasure (μ.map (A 0)) := Measure.isProbabilityMeasure_map (hA 0) have hmean : ∫ x, ψ x ∂(μ.map (A 0)) = 0 := by change (∫ x, x - contrast θ ∂(μ.map (A 0))) = 0 rw [integral_map (hA 0) (show AEStronglyMeasurable (fun x : ℝ => x - contrast θ) (μ.map (A 0)) by fun_prop)] have hAint : Integrable (A 0) μ := by change Integrable (oaTrialPart W Y p 0 + L 0) μ exact (oaTrialPart_integrable hmodel 0).add (comparatorNoise_integrable hmodel.assignmentInterior hnoise hε 0) rw [integral_sub hAint (integrable_const _), oaReleaseValue_integral hmodel hnoise hε 0, integral_const] simp have hsq : Integrable (fun x => (ψ x) ^ 2) (μ.map (A 0)) := by change Integrable (fun x : ℝ => (x - contrast θ) ^ 2) (μ.map (A 0)) rw [integrable_map_measure (show AEStronglyMeasurable (fun x : ℝ => (x - contrast θ) ^ 2) (μ.map (A 0)) by fun_prop) (hA 0)] have hrel2 := oaReleaseValue_sq_integrable hmodel hnoise hε 0 have hrel : Integrable (fun ω => oaReleaseValue W Y L p 0 ω) μ := by change Integrable (oaTrialPart W Y p 0 + L 0) μ exact (oaTrialPart_integrable hmodel 0).add (comparatorNoise_integrable hmodel.assignmentInterior hnoise hε 0) have hexpand : Integrable (fun ω => (oaReleaseValue W Y L p 0 ω) ^ 2 - 2 * contrast θ * oaReleaseValue W Y L p 0 ω + (contrast θ) ^ 2) μ := (hrel2.sub (hrel.const_mul (2 * contrast θ))).add (integrable_const _) exact hexpand.congr (Filter.Eventually.of_forall fun ω => by change _ = (oaReleaseValue W Y L p 0 ω - contrast θ) ^ 2 ring) have hvar : ∫ x, (ψ x) ^ 2 ∂(μ.map (A 0)) = VOA θ p ε := by change (∫ x : ℝ, (x - contrast θ) ^ 2 ∂(μ.map (A 0))) = VOA θ p ε rw [integral_map (hA 0) (show AEStronglyMeasurable (fun x : ℝ => (x - contrast θ) ^ 2) (μ.map (A 0)) by fun_prop)] simpa only [Function.comp_apply, A] using oaReleaseValue_centered_sq_integral hmodel hnoise hε 0 have hclt0 := S.clt_normalized_sum (measurable_id.sub measurable_const) hmean hsq have hclt : Modes.TendstoInLaw (fun _ : ℕ => μ) (IsAsymLinear.normalizedSum S ψ (fun m => range m)) atTop (gaussianMeasure 0 (VOA θ p ε)) := by change Modes.TendstoInLaw (fun _ : ℕ => μ) (IsAsymLinear.normalizedSum S ψ (fun m => range m)) atTop (gaussianMeasure 0 (∫ x, (ψ x) ^ 2 ∂(μ.map (A 0)))) at hclt0 rw [hvar] at hclt0 exact hclt0 have htargetMeas (n : ℕ) : AEMeasurable (fun ω => sqrt n * (tauOA W Y L p n ω - contrast θ)) μ := by have hsum (s : Finset ℕ) : AEMeasurable (fun ω => ∑ i ∈ s, A i ω) μ := by induction s using Finset.induction_on with | empty => simp | @insert a s ha ih => have heq : (fun ω => ∑ i ∈ insert a s, A i ω) = A a + fun ω => ∑ i ∈ s, A i ω := by funext ω rw [Finset.sum_insert ha] rfl rw [heq] change AEMeasurable (A a + fun ω => ∑ i ∈ s, A i ω) μ exact (hA a).add ih unfold tauOA exact aemeasurable_const.mul ((aemeasurable_const.mul (hsum (range n))).sub aemeasurable_const) have hnormMeas (n : ℕ) : AEMeasurable (IsAsymLinear.normalizedSum S ψ (fun m => range m) n) μ := by exact ((Finset.measurable_sum _ fun i _ => (measurable_id.sub measurable_const).comp (S.meas i)).const_mul _).aemeasurable apply Modes.TendstoInLaw.congr_ae hclt htargetMeas filter_upwards with n have hall : ∀ᵐ ω ∂μ, ∀ i ∈ range n, S.Z i ω = A i ω := by induction range n using Finset.induction_on with | empty => simp | @insert a s ha ih => filter_upwards [hAmAE a, ih] with ω haω hsω intro i hi simp only [Finset.mem_insert] at hi rcases hi with rfl | hi · exact haω · exact hsω i hi filter_upwards [hall] with ω hω unfold IsAsymLinear.normalizedSum tauOA ψ simp only [Finset.card_range, Pi.sub_apply, id_eq] change (sqrt n)⁻¹ * (∑ i ∈ range n, (S.Z i ω - contrast θ)) = sqrt n * ((n : ℝ)⁻¹ * ∑ i ∈ range n, oaReleaseValue W Y L p i ω - contrast θ) have hsumEq : (∑ i ∈ range n, (S.Z i ω - contrast θ)) = ∑ i ∈ range n, (A i ω - contrast θ) := by apply Finset.sum_congr rfl intro i hi rw [hω i hi] rw [hsumEq] simp only [A] rcases n with _ | n · simp · have hn : (0 : ℝ) < (n + 1 : ℕ) := by positivity have hspos : 0 < sqrt (n + 1 : ℕ) := Real.sqrt_pos.2 hn have hrsq : (sqrt (n + 1 : ℕ)) ^ 2 = ((n + 1 : ℕ) : ℝ) := Real.sq_sqrt hn.le rw [Finset.sum_sub_distrib, Finset.sum_const, Finset.card_range] simp only [nsmul_eq_mul] field_simp [ne_of_gt hspos, ne_of_gt hn] rw [hrsq]
CausalSmith.Stat.LdpAteEfficiencySurface.oaRelease_clt · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:475
theorem oaVariance_consistency

the oa variance consistency assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the oa Variance consistency.

Formal statement
Ω :
Y0 Y1 W Y L :
ℕ → Ω → ℝ
p ε :
ℝ
hmodel :
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
δ :
ℝ
0 < δ
Tendsto (fun n => μ {ω | δ < |VhatOA W Y L p n ω - VOA θ p ε|}) atTop (nhds 0)
Proof (Lean source)
lemma oaVariance_consistency {Ω : Type*} [MeasurableSpace Ω] {μ : Measure Ω} [IsProbabilityMeasure μ] {Y0 Y1 W Y L : ℕ → Ω → ℝ} {p ε : ℝ} {θ : TrialParameter} (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) : ∀ δ : ℝ, 0 < δ → Tendsto (fun n => μ {ω | δ < |VhatOA W Y L p n ω - VOA θ p ε|}) atTop (nhds 0) := by let A : ℕ → Ω → ℝ := fun i => oaReleaseValue W Y L p i have hA (i : ℕ) : AEMeasurable (A i) μ := oaReleaseValue_aemeasurable hmodel hnoise hε i have hAI : iIndepFun A μ := oaReleaseValue_iIndep hmodel hnoise have hAD (i : ℕ) : IdentDistrib (A 0) (A i) μ μ := oaReleaseValue_identDistrib hmodel hnoise hε i let Am : ℕ → Ω → ℝ := fun i => (hA i).mk (A i) have hAmMeas (i : ℕ) : Measurable (Am i) := (hA i).measurable_mk have hAmAE (i : ℕ) : Am i =ᵐ[μ] A i := (hA i).ae_eq_mk.symm have hAmI : iIndepFun Am μ := hAI.congr fun i => (hAmAE i).symm have hAmD (i : ℕ) : IdentDistrib (Am 0) (Am i) μ μ := by refine ⟨(hAmMeas 0).aemeasurable, (hAmMeas i).aemeasurable, ?_⟩ rw [Measure.map_congr (hAmAE 0), Measure.map_congr (hAmAE i)] exact (hAD i).map_eq let S : IIDSample Ω ℝ μ (μ.map (A 0)) := { Z := Am meas := hAmMeas indep := hAmI identDist := hAmD law := Measure.map_congr (hAmAE 0) } let ψ : ℝ → ℝ := fun x => x - contrast θ letI : IsProbabilityMeasure (μ.map (A 0)) := Measure.isProbabilityMeasure_map (hA 0) have hψmean : ∫ x, ψ x ∂(μ.map (A 0)) = 0 := by change (∫ x, x - contrast θ ∂(μ.map (A 0))) = 0 rw [integral_map (hA 0) (show AEStronglyMeasurable (fun x : ℝ => x - contrast θ) (μ.map (A 0)) by fun_prop)] have hAint : Integrable (A 0) μ := by change Integrable (oaTrialPart W Y p 0 + L 0) μ exact (oaTrialPart_integrable hmodel 0).add (comparatorNoise_integrable hmodel.assignmentInterior hnoise hε 0) rw [integral_sub hAint (integrable_const _), oaReleaseValue_integral hmodel hnoise hε 0, integral_const] simp have hψint : Integrable (fun ω => ψ (S.Z 0 ω)) μ := by have hAint : Integrable (A 0) μ := by change Integrable (oaTrialPart W Y p 0 + L 0) μ exact (oaTrialPart_integrable hmodel 0).add (comparatorNoise_integrable hmodel.assignmentInterior hnoise hε 0) have hi : Integrable (fun ω => A 0 ω - contrast θ) μ := hAint.sub (integrable_const _) exact hi.congr (by filter_upwards [hAmAE 0] with ω hω simp only [ψ, S] rw [hω]) have hψsq : Integrable (fun ω => (ψ (S.Z 0 ω)) ^ 2) μ := by have hi : Integrable (fun ω => (A 0 ω - contrast θ) ^ 2) μ := by have hrel2 := oaReleaseValue_sq_integrable hmodel hnoise hε 0 have hrel : Integrable (A 0) μ := by change Integrable (oaTrialPart W Y p 0 + L 0) μ exact (oaTrialPart_integrable hmodel 0).add (comparatorNoise_integrable hmodel.assignmentInterior hnoise hε 0) exact ((hrel2.sub (hrel.const_mul (2 * contrast θ))).add (integrable_const ((contrast θ) ^ 2))).congr (Filter.Eventually.of_forall fun ω => by change (A 0 ω) ^ 2 - 2 * contrast θ * A 0 ω + (contrast θ) ^ 2 = (A 0 ω - contrast θ) ^ 2 ring) exact hi.congr (by filter_upwards [hAmAE 0] with ω hω simp only [ψ, S] rw [hω]) have hpop : ∫ x, (ψ x) ^ 2 ∂(μ.map (A 0)) = VOA θ p ε := by change (∫ x : ℝ, (x - contrast θ) ^ 2 ∂(μ.map (A 0))) = VOA θ p ε rw [integral_map (hA 0) (show AEStronglyMeasurable (fun x : ℝ => (x - contrast θ) ^ 2) (μ.map (A 0)) by fun_prop)] simpa only [Function.comp_apply, A] using oaReleaseValue_centered_sq_integral hmodel hnoise hε 0 have hcons := S.empiricalVar_tendsto_inProb (measurable_id.sub measurable_const) hψint hψsq hψmean change Modes.TendstoInProbability (fun _ : ℕ => μ) (S.empiricalVar ψ) atTop (fun _ _ => ∫ x, (ψ x) ^ 2 ∂(μ.map (A 0))) at hcons rw [hpop] at hcons have hemp (n : ℕ) : S.empiricalVar ψ n =ᵐ[μ] VhatOA W Y L p n := by have hall : ∀ᵐ ω ∂μ, ∀ i ∈ range n, S.Z i ω = A i ω := by induction range n using Finset.induction_on with | empty => simp | @insert a s ha ih => filter_upwards [hAmAE a, ih] with ω haω hsω intro i hi simp only [Finset.mem_insert] at hi rcases hi with rfl | hi · exact haω · exact hsω i hi filter_upwards [hall] with ω hω rcases n with _ | n · simp [IIDSample.empiricalVar, IIDSample.sampleMean, VhatOA, tauOA] · rw [VhatOA_eq_second_moment_sub_sq W Y L p (n + 1) (by omega)] unfold IIDSample.empiricalVar IIDSample.sampleMean ψ tauOA have hsum1 : (∑ i ∈ range (n + 1), (S.Z i ω - contrast θ)) = ∑ i ∈ range (n + 1), (A i ω - contrast θ) := by apply Finset.sum_congr rfl intro i hi rw [hω i hi] have hsum2 : (∑ i ∈ range (n + 1), (S.Z i ω - contrast θ) ^ 2) = ∑ i ∈ range (n + 1), (A i ω - contrast θ) ^ 2 := by apply Finset.sum_congr rfl intro i hi rw [hω i hi] have hsqexpand : (∑ i ∈ range (n + 1), (A i ω - contrast θ) ^ 2) = (∑ i ∈ range (n + 1), (A i ω) ^ 2) - 2 * contrast θ * (∑ i ∈ range (n + 1), A i ω) + (n + 1 : ℝ) * (contrast θ) ^ 2 := by have hpoint (x : ℝ) : (x - contrast θ) ^ 2 = x ^ 2 - (2 * contrast θ) * x + (contrast θ) ^ 2 := by ring simp_rw [hpoint] rw [Finset.sum_add_distrib, Finset.sum_sub_distrib, ← Finset.mul_sum, Finset.sum_const, Finset.card_range] simp only [nsmul_eq_mul] norm_num [Nat.cast_add, Nat.cast_one] rw [hsum1, hsum2, hsqexpand, Finset.sum_sub_distrib, Finset.sum_const, Finset.card_range] simp only [nsmul_eq_mul, A] have hn : ((n + 1 : ℕ) : ℝ) ≠ 0 := by positivity field_simp [hn] norm_num [Nat.cast_add, Nat.cast_one] ring intro δ hδ have htail := (Modes.tendstoInProbability_iff_norm (fun _ : ℕ => μ) (S.empiricalVar ψ) atTop (fun _ _ => VOA θ p ε)).mp hcons δ hδ have htail' : Tendsto (fun n => μ {ω | δ ≤ |VhatOA W Y L p n ω - VOA θ p ε|}) atTop (nhds 0) := by apply htail.congr' filter_upwards with n apply measure_congr filter_upwards [hemp n] with ω hω simp only [Real.norm_eq_abs] change (δ ≤ |S.empiricalVar ψ n ω - VOA θ p ε|) = (δ ≤ |VhatOA W Y L p n ω - VOA θ p ε|) rw [hω] exact tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds htail' (fun n => (bot_le : (0 : ENNReal) ≤ μ {ω | δ < |VhatOA W Y L p n ω - VOA θ p ε|})) (fun n => measure_mono (by intro ω hω change δ < |VhatOA W Y L p n ω - VOA θ p ε| at hω change δ ≤ |VhatOA W Y L p n ω - VOA θ p ε| exact le_of_lt hω))
CausalSmith.Stat.LdpAteEfficiencySurface.oaVariance_consistency · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OAConsistency.lean:612
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.OracleEnvelope 9 declarations Staircase information envelope

Staircase information envelope

theorem informationObjective_affine_weights

Under the supplied quantities and conditions, the information objective affine weights assertion holds.

Formal statement
p ε t a b :
ℝ
α β :
informationObjective θ p ε (a • α + b • β) t
= a * informationObjective θ p ε α t + b * informationObjective θ p ε β t
Proof (Lean source)
lemma informationObjective_affine_weights (θ : TrialParameter) (p ε t a b : ℝ) (α β : StaircaseWeight) : informationObjective θ p ε (a • α + b • β) t = a * informationObjective θ p ε α t + b * informationObjective θ p ε β t := by unfold informationObjective rw [Finset.mul_sum, Finset.mul_sum, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro s _ change (a * α s + b * β s) * patternInformation θ p ε s t = a * (α s * patternInformation θ p ε s t) + b * (β s * patternInformation θ p ε s t) ring
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_affine_weights · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleEnvelope.lean:15
theorem informationObjective_exists_maximizer

the information objective exists maximizer assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Objective exists maximizer.

Formal statement
p ε t :
ℝ
hε :
0 ≤ ε
∃ α ∈ feasibleSet ε,
∀ β ∈ feasibleSet ε, informationObjective θ p ε β t ≤ informationObjective θ p ε α t
Proof (Lean source)
lemma informationObjective_exists_maximizer (θ : TrialParameter) (p ε t : ℝ) (hε : 0 ≤ ε) : ∃ α ∈ feasibleSet ε, ∀ β ∈ feasibleSet ε, informationObjective θ p ε β t ≤ informationObjective θ p ε α t := by obtain ⟨α, hα, hmax⟩ := (staircaseFeasible_compact ε hε).exists_isMaxOn (staircaseFeasible_nonempty ε) (informationObjective_continuous_weight θ p ε t).continuousOn exact ⟨α, hα, fun β hβ => hmax hβ⟩
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_exists_maximizer · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleEnvelope.lean:31
theorem upperEnvelope_attained

Under the supplied quantities and conditions, the upper envelope attained assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the upper Envelope attained.

Formal statement
p ε t :
ℝ
hε :
0 ≤ ε
∃ α ∈ feasibleSet ε, upperEnvelope θ p ε t = informationObjective θ p ε α t
Proof (Lean source)
lemma upperEnvelope_attained (θ : TrialParameter) (p ε t : ℝ) (hε : 0 ≤ ε) : ∃ α ∈ feasibleSet ε, upperEnvelope θ p ε t = informationObjective θ p ε α t := by obtain ⟨α, hα, hmax⟩ := informationObjective_exists_maximizer θ p ε t hε refine ⟨α, hα, ?_⟩ unfold upperEnvelope apply IsGreatest.csSup_eq constructor · exact ⟨α, hα, rfl⟩ · rintro u ⟨β, hβ, rfl⟩ exact hmax β hβ
CausalSmith.Stat.LdpAteEfficiencySurface.upperEnvelope_attained · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleEnvelope.lean:45
theorem upperEnvelope_quadratic_lower_bound

Under the supplied quantities and conditions, the upper envelope quadratic lower bound assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the upper Envelope quadratic lower bound.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
∃ c : ℝ,
0 < c
conclusion 1
t :
ℝ
c * t ^ 2 ≤ upperEnvelope θ p ε t
Proof (Lean source)
lemma upperEnvelope_quadratic_lower_bound (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : ∃ c : ℝ, 0 < c ∧ ∀ t : ℝ, c * t ^ 2 ≤ upperEnvelope θ p ε t := by obtain ⟨α, hα, hα0⟩ := staircaseFeasible_positive_first_pattern ε let c := α 0 * ((privacyIncrement ε * controlProb p) ^ 2 / patternMass θ p ε 0) have hc : 0 < c := by have hd : 0 < privacyIncrement ε := privacyIncrement_pos hε have hq : 0 < controlProb p := by dsimp [controlProb]; linarith [hp.2] have hm := patternMass_pos_interior θ p ε hp hθ hε.le 0 dsimp [c] positivity refine ⟨c, hc, fun t => ?_⟩ obtain ⟨β, hβ, hmax⟩ := informationObjective_exists_maximizer θ p ε t hε.le have hterm : α 0 * patternInformation θ p ε 0 t ≤ informationObjective θ p ε α t := by unfold informationObjective exact Finset.single_le_sum (fun s _ => show 0 ≤ α s * patternInformation θ p ε s t from mul_nonneg (hα.1 s) (by unfold patternInformation exact div_nonneg (sq_nonneg _) (le_of_lt (patternMass_pos_interior θ p ε hp hθ hε.le s)))) (Finset.mem_univ 0) calc c * t ^ 2 = α 0 * patternInformation θ p ε 0 t := by rw [first_pattern_information_quadratic] dsimp [c] ring _ ≤ informationObjective θ p ε α t := hterm _ ≤ upperEnvelope θ p ε t := by unfold upperEnvelope exact le_csSup ⟨informationObjective θ p ε β t, by rintro u ⟨γ, hγ, rfl⟩ exact hmax γ hγ⟩ ⟨α, hα, rfl⟩
CausalSmith.Stat.LdpAteEfficiencySurface.upperEnvelope_quadratic_lower_bound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleEnvelope.lean:63
theorem upperEnvelope_continuous

Under the supplied quantities and conditions, the upper envelope continuous assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the upper Envelope continuous.

Formal statement
p ε :
ℝ
hε :
0 ≤ ε
Continuous (fun t : ℝ => upperEnvelope θ p ε t)
Proof (Lean source)
lemma upperEnvelope_continuous (θ : TrialParameter) (p ε : ℝ) (hε : 0 ≤ ε) : Continuous (fun t : ℝ => upperEnvelope θ p ε t) := by have hf : Continuous (fun z : ℝ × StaircaseWeight => informationObjective θ p ε z.2 z.1) := by unfold informationObjective apply continuous_finsetSum intro s _ unfold patternInformation projectedGradient direction simp +decide only [Fin.sum_univ_succ, Fin.sum_univ_zero, ite_true, ite_false, add_zero] fun_prop have hc := (staircaseFeasible_compact ε hε).continuous_sSup (f := fun t α => informationObjective θ p ε α t) hf simpa [upperEnvelope, image, eq_comm] using hc
CausalSmith.Stat.LdpAteEfficiencySurface.upperEnvelope_continuous · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleEnvelope.lean:104

For the supplied quantities and conditions, the vertex envelope is the mathematical object specified below. The vertex Envelope is determined by the displayed parameters.

Definition (Lean source)
p ε t :
ℝ
vertexEnvelope θ p ε t :
ℝ
sSup {u : ℝ | ∃ α ∈ (feasibleSet ε).extremePoints ℝ, u = informationObjective θ p ε α t}
CausalSmith.Stat.LdpAteEfficiencySurface.vertexEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleEnvelope.lean:123
theorem upperEnvelope_eq_vertexEnvelope

Under the supplied quantities and conditions, the upper envelope eq vertex envelope assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the upper Envelope eq vertex Envelope.

Formal statement
p ε t :
ℝ
hε :
0 ≤ ε
upperEnvelope θ p ε t = vertexEnvelope θ p ε t
Proof (Lean source)
lemma upperEnvelope_eq_vertexEnvelope (θ : TrialParameter) (p ε t : ℝ) (hε : 0 ≤ ε) : upperEnvelope θ p ε t = vertexEnvelope θ p ε t := by let S := feasibleSet ε let f : StaircaseWeight → ℝ := fun α => informationObjective θ p ε α t have hcompact : IsCompact S := staircaseFeasible_compact ε hε have hconvex : Convex ℝ S := staircaseFeasible_convex ε have hne : S.Nonempty := staircaseFeasible_nonempty ε obtain ⟨v, hv⟩ := hcompact.extremePoints_nonempty hne obtain ⟨a, ha, hmax⟩ := informationObjective_exists_maximizer θ p ε t hε have hsup : upperEnvelope θ p ε t = f a := by unfold upperEnvelope apply IsGreatest.csSup_eq exact ⟨⟨a, ha, rfl⟩, by rintro z ⟨b, hb, rfl⟩ exact hmax b hb⟩ have hvBound : ∀ x ∈ S.extremePoints ℝ, f x ≤ f a := by intro x hx exact hmax x (extremePoints_subset hx) have hvertex : vertexEnvelope θ p ε t ≤ f a := by unfold vertexEnvelope apply csSup_le · exact ⟨f v, v, hv, rfl⟩ · rintro z ⟨x, hx, rfl⟩ exact hvBound x hx have hsub : S.extremePoints ℝ ⊆ {x | f x ≤ vertexEnvelope θ p ε t} := by intro x hx unfold vertexEnvelope exact le_csSup ⟨f a, by rintro z ⟨y, hy, rfl⟩ exact hvBound y hy⟩ ⟨x, hx, rfl⟩ have hclosed : IsClosed {x : StaircaseWeight | f x ≤ vertexEnvelope θ p ε t} := isClosed_le (informationObjective_continuous_weight θ p ε t) continuous_const have hconvexBound : Convex ℝ {x : StaircaseWeight | f x ≤ vertexEnvelope θ p ε t} := by intro x hx y hy a b ha hb hab change f (a • x + b • y) ≤ vertexEnvelope θ p ε t rw [show f (a • x + b • y) = a * f x + b * f y from informationObjective_affine_weights θ p ε t a b x y] calc a * f x + b * f y ≤ a * vertexEnvelope θ p ε t + b * vertexEnvelope θ p ε t := add_le_add (mul_le_mul_of_nonneg_left hx ha) (mul_le_mul_of_nonneg_left hy hb) _ = vertexEnvelope θ p ε t := by rw [← add_mul, hab, one_mul] have hclosure : S ⊆ {x | f x ≤ vertexEnvelope θ p ε t} := by rw [← closure_convexHull_extremePoints hcompact hconvex] exact closure_minimal (convexHull_min hsub hconvexBound) hclosed exact le_antisymm (hsup ▸ hclosure ha) (hsup ▸ hvertex)
CausalSmith.Stat.LdpAteEfficiencySurface.upperEnvelope_eq_vertexEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleEnvelope.lean:129
theorem Jstar_le_upperEnvelope

Under the supplied quantities and conditions, the jstar le upper envelope assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Jstar le upper Envelope.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
t :
ℝ
Jstar θ p ε ≤ upperEnvelope θ p ε t
Proof (Lean source)
lemma Jstar_le_upperEnvelope (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (t : ℝ) : Jstar θ p ε ≤ upperEnvelope θ p ε t := by obtain ⟨β, hβ, hmax⟩ := informationObjective_exists_maximizer θ p ε t hε have hH : upperEnvelope θ p ε t = informationObjective θ p ε β t := by unfold upperEnvelope apply IsGreatest.csSup_eq exact ⟨⟨β, hβ, rfl⟩, by rintro u ⟨γ, hγ, rfl⟩ exact hmax γ hγ⟩ unfold Jstar apply csSup_le · obtain ⟨α, hα⟩ := staircaseFeasible_nonempty ε exact ⟨_, α, hα, rfl⟩ · rintro z ⟨α, hα, rfl⟩ have hbdd : BddBelow {y : ℝ | ∃ u : ℝ, y = informationObjective θ p ε α u} := by refine ⟨0, ?_⟩ rintro y ⟨u, rfl⟩ exact informationObjective_nonneg_interior θ p ε hp hθ hε α hα u exact (csInf_le hbdd ⟨t, rfl⟩).trans (hH ▸ hmax α hα)
CausalSmith.Stat.LdpAteEfficiencySurface.Jstar_le_upperEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleEnvelope.lean:183
theorem upperEnvelope_exists_minimizer

Under the supplied quantities and conditions, the upper envelope exists minimizer assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the upper Envelope exists minimizer.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
∃ t : ℝ, ∀ u : ℝ, upperEnvelope θ p ε t ≤ upperEnvelope θ p ε u
Proof (Lean source)
lemma upperEnvelope_exists_minimizer (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : ∃ t : ℝ, ∀ u : ℝ, upperEnvelope θ p ε t ≤ upperEnvelope θ p ε u := by obtain ⟨c, hc, hbound⟩ := upperEnvelope_quadratic_lower_bound θ p ε hp hθ hε have hnonneg : 0 ≤ upperEnvelope θ p ε 0 := by have h := hbound 0 simpa using h have hbounded : Bornology.IsBounded {t : ℝ | upperEnvelope θ p ε t ≤ upperEnvelope θ p ε 0} := by rw [isBounded_iff_forall_norm_le] refine ⟨Real.sqrt (upperEnvelope θ p ε 0 / c), ?_⟩ intro t ht have hs : t ^ 2 ≤ upperEnvelope θ p ε 0 / c := (le_div_iff₀ hc).2 (by rw [mul_comm]; exact (hbound t).trans ht) have hdiv : 0 ≤ upperEnvelope θ p ε 0 / c := div_nonneg hnonneg hc.le rw [Real.norm_eq_abs] nlinarith [Real.sq_sqrt hdiv, sq_abs t, abs_nonneg t, Real.sqrt_nonneg (upperEnvelope θ p ε 0 / c)] exact (upperEnvelope_continuous θ p ε hε.le).exists_forall_le_of_isBounded 0 hbounded
CausalSmith.Stat.LdpAteEfficiencySurface.upperEnvelope_exists_minimizer · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleEnvelope.lean:211
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.OracleGeometry 31 declarations The contrast variance is the information-matrix quadratic solution value, with infinity when the contrast is outside the information range.

Exact finite staircase oracle

The contrast variance is the information-matrix quadratic solution value, with infinity when the contrast is outside the information range. The theorem states both the arbitrary-channel comparison and the finite saddle identity.

the contrast in range is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
I :
Matrix (Fin 2) (Fin 2) ℝ
contrastInRange I :
Prop
∃ v : TrialParameter, I.mulVec v = contrastVector
CausalSmith.Stat.LdpAteEfficiencySurface.contrastInRange · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:22

the contrast variance is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
I :
Matrix (Fin 2) (Fin 2) ℝ
contrastVariance I :
ℝ≥0∞
if contrastInRange I then ofReal (sInf {u : ℝ | ∃ v : TrialParameter, I.mulVec v = contrastVector ∧ u = ∑ k : Fin 2, contrastVector k * v k}) else ⊤
CausalSmith.Stat.LdpAteEfficiencySurface.contrastVariance · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:27
def feasibleSet

the feasible set is the mathematical object specified below. The feasible Set is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
feasibleSet ε :
{α | staircaseFeasible ε α}
theorem piTheta_pos_interior

Under the supplied quantities and conditions, the pi theta pos interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pi Theta pos interior.

Formal statement
p :
ℝ
hθ :
j :
Fin 4
0 < piTheta θ p j
Proof (Lean source)
lemma piTheta_pos_interior (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (j : Fin 4) : 0 < piTheta θ p j := by rcases hp with ⟨hp0, hp1⟩ rcases hθ with ⟨h00, h01, h10, h11⟩ fin_cases j <;> dsimp [piTheta, controlProb] <;> apply mul_pos <;> linarith
CausalSmith.Stat.LdpAteEfficiencySurface.piTheta_pos_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:40
theorem patternRay_one_le_interior Lemma patternRay_one_le_interior in the paper ↗

Under the supplied quantities and conditions, the pattern ray one le interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pattern Ray one le interior.

Formal statement
ε :
ℝ
hε :
0 ≤ ε
s :
Fin 14
j :
Fin 4
1 ≤ patternRay ε s j
Proof (Lean source)
lemma patternRay_one_le_interior (ε : ℝ) (hε : 0 ≤ ε) (s : Fin 14) (j : Fin 4) : 1 ≤ patternRay ε s j := by unfold patternRay privacyIncrement privacyRatio split_ifs <;> simp_all [Real.one_le_exp_iff]
CausalSmith.Stat.LdpAteEfficiencySurface.patternRay_one_le_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:51
theorem patternMass_pos_interior

Under the supplied quantities and conditions, the pattern mass pos interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pattern Mass pos interior.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
s :
Fin 14
0 < patternMass θ p ε s
Proof (Lean source)
lemma patternMass_pos_interior (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (s : Fin 14) : 0 < patternMass θ p ε s := by unfold patternMass apply Finset.sum_pos' · intro j _ exact le_of_lt (mul_pos (piTheta_pos_interior θ p hp hθ j) (lt_of_lt_of_le (by norm_num) (patternRay_one_le_interior ε hε s j))) · exact ⟨0, Finset.mem_univ _, mul_pos (piTheta_pos_interior θ p hp hθ 0) (lt_of_lt_of_le (by norm_num) (patternRay_one_le_interior ε hε s 0))⟩
CausalSmith.Stat.LdpAteEfficiencySurface.patternMass_pos_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:60
theorem informationObjective_nonneg_interior

Under the supplied quantities and conditions, the information objective nonneg interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Objective nonneg interior.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
hα :
t :
ℝ
0 ≤ informationObjective θ p ε α t
Proof (Lean source)
lemma informationObjective_nonneg_interior (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (t : ℝ) : 0 ≤ informationObjective θ p ε α t := by unfold informationObjective patternInformation apply Finset.sum_nonneg intro s _ exact mul_nonneg (hα.1 s) (div_nonneg (sq_nonneg _) (le_of_lt (patternMass_pos_interior θ p ε hp hθ hε s)))
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_nonneg_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:77
theorem informationQuadratic_nonneg_staircase

Under the supplied quantities and conditions, the information quadratic nonneg staircase assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Quadratic nonneg staircase.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
hα :
Proof (Lean source)
lemma informationQuadratic_nonneg_staircase (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (v : TrialParameter) : 0 ≤ informationQuadratic (informationMatrix θ p ε α) v := by rw [informationQuadratic_eq_pattern_sum] apply Finset.sum_nonneg intro s _ exact div_nonneg (mul_nonneg (hα.1 s) (sq_nonneg _)) (le_of_lt (patternMass_pos_interior θ p ε hp hθ hε s))
CausalSmith.Stat.LdpAteEfficiencySurface.informationQuadratic_nonneg_staircase · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:91
theorem informationMatrix_posSemidef_interior

Under the supplied quantities and conditions, the information matrix pos semidef interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Matrix pos Semidef interior.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
hα :
Proof (Lean source)
lemma informationMatrix_posSemidef_interior (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : (informationMatrix θ p ε α).PosSemidef := by rw [Matrix.posSemidef_iff_dotProduct_mulVec] constructor · ext i j simp only [Matrix.conjTranspose_apply, star_trivial] unfold informationMatrix apply Finset.sum_congr rfl intro s _ ring · intro v have hq := informationQuadratic_nonneg_staircase θ p ε hp hθ hε α hα v have heq : star v ⬝ᵥ (informationMatrix θ p ε α).mulVec v = informationQuadratic (informationMatrix θ p ε α) v := by simp [informationQuadratic, dotProduct, mulVec, Fin.sum_univ_succ, star_trivial] ring rw [heq] exact hq
CausalSmith.Stat.LdpAteEfficiencySurface.informationMatrix_posSemidef_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:106
theorem contrastSolution_value_pos Lemma contrastSolution_value_pos in the paper ↗

the contrast solution value pos assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
hI :
I.PosSemidef
hw :
I.mulVec w = contrastVector
0 < ∑ k : Fin 2, contrastVector k * w k
Proof (Lean source)
lemma contrastSolution_value_pos (I : Matrix (Fin 2) (Fin 2) ℝ) (hI : I.PosSemidef) (w : TrialParameter) (hw : I.mulVec w = contrastVector) : 0 < ∑ k : Fin 2, contrastVector k * w k := by let r := ∑ k : Fin 2, contrastVector k * w k have hq : informationQuadratic I w = r := by dsimp [r] calc informationQuadratic I w = ∑ k, w k * (I.mulVec w) k := by simp [informationQuadratic, mulVec, Finset.mul_sum] ring _ = ∑ k, w k * contrastVector k := by rw [hw] _ = ∑ k, contrastVector k * w k := by apply Finset.sum_congr rfl intro k _ ring have hr : 0 ≤ r := by rw [← hq] have hn := hI.dotProduct_mulVec_nonneg w rw [show star w ⬝ᵥ I.mulVec w = informationQuadratic I w by simp [informationQuadratic, dotProduct, mulVec, star_trivial] ring] at hn exact hn refine lt_of_le_of_ne hr ?_ intro hr0 have hzero : I.mulVec w = 0 := by apply (hI.dotProduct_mulVec_zero_iff w).mp rw [show star w ⬝ᵥ I.mulVec w = informationQuadratic I w by simp [informationQuadratic, dotProduct, mulVec, star_trivial] ring] rw [hq, hr0] rw [hw] at hzero have := congrFun hzero 0 norm_num [contrastVector] at this
CausalSmith.Stat.LdpAteEfficiencySurface.contrastSolution_value_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:132
theorem contrastSolution_value_unique Lemma contrastSolution_value_unique in the paper ↗

the contrast solution value unique assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
hI :
I.PosSemidef
hw :
I.mulVec w = contrastVector
hv :
I.mulVec v = contrastVector
(∑ k : Fin 2, contrastVector k * v k) = ∑ k : Fin 2, contrastVector k * w k
Proof (Lean source)
lemma contrastSolution_value_unique (I : Matrix (Fin 2) (Fin 2) ℝ) (hI : I.PosSemidef) (w v : TrialParameter) (hw : I.mulVec w = contrastVector) (hv : I.mulVec v = contrastVector) : (∑ k : Fin 2, contrastVector k * v k) = ∑ k : Fin 2, contrastVector k * w k := by have hsym := hI.isHermitian have hs := congrFun₂ hsym 0 1 calc (∑ k, contrastVector k * v k) = ∑ k, (I.mulVec w) k * v k := by rw [hw] _ = ∑ k, w k * (I.mulVec v) k := by simp [mulVec, Fin.sum_univ_succ, star_trivial] at hs ⊢ rw [hs] ring _ = ∑ k, w k * contrastVector k := by rw [hv] _ = ∑ k, contrastVector k * w k := by apply Finset.sum_congr rfl intro k _ ring
CausalSmith.Stat.LdpAteEfficiencySurface.contrastSolution_value_unique · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:169
theorem contrastVariance_eq_solution_value

the contrast variance eq solution value assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
hI :
I.PosSemidef
hw :
I.mulVec w = contrastVector
contrastVariance I = ofReal (∑ k : Fin 2, contrastVector k * w k)
Proof (Lean source)
lemma contrastVariance_eq_solution_value (I : Matrix (Fin 2) (Fin 2) ℝ) (hI : I.PosSemidef) (w : TrialParameter) (hw : I.mulVec w = contrastVector) : contrastVariance I = ofReal (∑ k : Fin 2, contrastVector k * w k) := by have hrange : contrastInRange I := ⟨w, hw⟩ rw [contrastVariance, if_pos hrange] congr 1 apply IsLeast.csInf_eq refine ⟨⟨w, hw, rfl⟩, ?_⟩ rintro u ⟨v, hv, rfl⟩ exact le_of_eq (contrastSolution_value_unique I hI w v hw hv).symm
CausalSmith.Stat.LdpAteEfficiencySurface.contrastVariance_eq_solution_value · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:191
theorem contrastInformation_cauchy Lemma contrastInformation_cauchy in the paper ↗

the contrast information cauchy assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
hI :
I.PosSemidef
hw :
I.mulVec w = contrastVector
t :
ℝ
1 ≤ informationQuadratic I (direction t) * (∑ k : Fin 2, contrastVector k * w k)
Proof (Lean source)
lemma contrastInformation_cauchy (I : Matrix (Fin 2) (Fin 2) ℝ) (hI : I.PosSemidef) (w : TrialParameter) (hw : I.mulVec w = contrastVector) (t : ℝ) : 1 ≤ informationQuadratic I (direction t) * (∑ k : Fin 2, contrastVector k * w k) := by let r := ∑ k : Fin 2, contrastVector k * w k let x := direction t let y : TrialParameter := fun k => r * x k - w k have hr : 0 < r := contrastSolution_value_pos I hI w hw have hy : 0 ≤ informationQuadratic I y := by have hn := hI.dotProduct_mulVec_nonneg y rw [show star y ⬝ᵥ I.mulVec y = informationQuadratic I y by simp [informationQuadratic, dotProduct, mulVec, star_trivial] ring] at hn exact hn have hsym := hI.isHermitian have hs := congrFun₂ hsym 0 1 have hqw : informationQuadratic I w = r := by dsimp [r] calc informationQuadratic I w = ∑ k, w k * (I.mulVec w) k := by simp [informationQuadratic, mulVec] ring _ = ∑ k, w k * contrastVector k := by rw [hw] _ = ∑ k, contrastVector k * w k := by apply Finset.sum_congr rfl intro k _ ring have hcross : (∑ k, x k * (I.mulVec w) k) = 1 := by rw [hw] simp [x, direction, contrastVector, Fin.sum_univ_succ] have hid : informationQuadratic I y = r * (r * informationQuadratic I x - 1) := by have hexpand : informationQuadratic I y = r ^ 2 * informationQuadratic I x - 2 * r * (∑ k, x k * (I.mulVec w) k) + informationQuadratic I w := by dsimp [y] simp [informationQuadratic, mulVec, Fin.sum_univ_succ, star_trivial] at hs ⊢ rw [hs] ring rw [hexpand, hcross, hqw] ring rw [hid] at hy dsimp [r, x] at hy hr ⊢ nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.contrastInformation_cauchy · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:206
theorem reciprocal_le_contrastVariance

the reciprocal le contrast variance assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
hI :
I.PosSemidef
j :
ℝ
hj :
0 < j
t :
ℝ
ht :
Proof (Lean source)
lemma reciprocal_le_contrastVariance (I : Matrix (Fin 2) (Fin 2) ℝ) (hI : I.PosSemidef) (j : ℝ) (hj : 0 < j) (t : ℝ) (ht : informationQuadratic I (direction t) ≤ j) : ofReal j⁻¹ ≤ contrastVariance I := by by_cases hrange : contrastInRange I · obtain ⟨w, hw⟩ := hrange rw [contrastVariance_eq_solution_value I hI w hw] apply ENNReal.ofReal_le_ofReal apply (inv_le_iff_one_le_mul₀' hj).2 exact (contrastInformation_cauchy I hI w hw t).trans (mul_le_mul_of_nonneg_right ht (contrastSolution_value_pos I hI w hw).le) · simp [contrastVariance, hrange]
CausalSmith.Stat.LdpAteEfficiencySurface.reciprocal_le_contrastVariance · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:256
theorem contrastVariance_eq_reciprocal_of_minimizer

Under the supplied quantities and conditions, the contrast variance eq reciprocal of minimizer assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
hI :
I.PosSemidef
t :
ℝ
hmin :
hpos :
Proof (Lean source)
lemma contrastVariance_eq_reciprocal_of_minimizer (I : Matrix (Fin 2) (Fin 2) ℝ) (hI : I.PosSemidef) (t : ℝ) (hmin : ∀ u : ℝ, informationQuadratic I (direction t) ≤ informationQuadratic I (direction u)) (hpos : 0 < informationQuadratic I (direction t)) : contrastVariance I = ofReal (informationQuadratic I (direction t))⁻¹ := by let j := informationQuadratic I (direction t) let A := I 0 0 + I 0 1 + I 1 0 + I 1 1 let B := 2 * (I 0 0 * t + I 0 1 * (t + 1) + I 1 0 * t + I 1 1 * (t + 1)) have hsym := hI.isHermitian have hs := congrFun₂ hsym 0 1 have hpoly (x : ℝ) : 0 ≤ x * B + x ^ 2 * A := by have h := hmin (t + x) have hid : informationQuadratic I (direction (t + x)) = informationQuadratic I (direction t) + x * B + x ^ 2 * A := by dsimp [A, B] simp [informationQuadratic, direction, Fin.sum_univ_succ, star_trivial] at hs ⊢ rw [hs] ring rw [hid] at h linarith have hB : B = 0 := by by_contra hB0 have hden : 0 < |A| + 1 := by positivity have hAle : A ≤ |A| := le_abs_self A have h := hpoly (-B / (2 * (|A| + 1))) have hsq : 0 < B ^ 2 := sq_pos_of_ne_zero hB0 field_simp at h nlinarith [mul_nonneg hsq.le (sub_nonneg.mpr hAle)] let w : TrialParameter := fun k => direction t k / j have hsum : (I 0 0 * t + I 0 1 * (t + 1)) + (I 1 0 * t + I 1 1 * (t + 1)) = 0 := by dsimp [B] at hB linarith have hj_eq : j = I 1 0 * t + I 1 1 * (t + 1) := by dsimp [j] simp [informationQuadratic, direction, Fin.sum_univ_succ] linear_combination t * hsum have hw : I.mulVec w = contrastVector := by have hj : 0 < j := hpos funext k fin_cases k <;> simp [mulVec, dotProduct, w, direction, contrastVector, Fin.sum_univ_succ] at hs ⊢ <;> field_simp [ne_of_gt hj] <;> nlinarith rw [contrastVariance_eq_solution_value I hI w hw] congr 1 dsimp [w, j] simp [direction, contrastVector, Fin.sum_univ_succ] field_simp ring
CausalSmith.Stat.LdpAteEfficiencySurface.contrastVariance_eq_reciprocal_of_minimizer · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:272
theorem first_pattern_information_quadratic Lemma first_pattern_information_quadratic in the paper ↗

Under the supplied quantities and conditions, the first pattern information quadratic assertion holds.

Formal statement
p ε t :
ℝ
patternInformation θ p ε 0 t
= ((privacyIncrement ε * controlProb p) ^ 2 / patternMass θ p ε 0) * t ^ 2
Proof (Lean source)
lemma first_pattern_information_quadratic (θ : TrialParameter) (p ε t : ℝ) : patternInformation θ p ε 0 t = ((privacyIncrement ε * controlProb p) ^ 2 / patternMass θ p ε 0) * t ^ 2 := by simp +decide [patternInformation, projectedGradient, patternGradient, direction, Fin.sum_univ_succ] ring
CausalSmith.Stat.LdpAteEfficiencySurface.first_pattern_information_quadratic · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:331
theorem informationObjective_eq_informationQuadratic

Under the supplied quantities and conditions, the information objective eq information quadratic assertion holds.

Formal statement
p ε :
ℝ
t :
ℝ
= ∑ a : Fin 2, ∑ b : Fin 2, direction t a * informationMatrix θ p ε α a b * direction t b
Proof (Lean source)
lemma informationObjective_eq_informationQuadratic (θ : TrialParameter) (p ε : ℝ) (α : StaircaseWeight) (t : ℝ) : informationObjective θ p ε α t = ∑ a : Fin 2, ∑ b : Fin 2, direction t a * informationMatrix θ p ε α a b * direction t b := by have h : (∑ a : Fin 2, ∑ b : Fin 2, direction t a * informationMatrix θ p ε α a b * direction t b) = ∑ s : Fin 14, α s * (∑ k : Fin 2, patternGradient p ε s k * direction t k) ^ 2 / patternMass θ p ε s := by unfold informationMatrix simp_rw [Finset.mul_sum, Finset.sum_mul, pow_two] calc (∑ a, ∑ b, ∑ s, direction t a * (α s * patternGradient p ε s a * patternGradient p ε s b / patternMass θ p ε s) * direction t b) = ∑ a, ∑ s, ∑ b, direction t a * (α s * patternGradient p ε s a * patternGradient p ε s b / patternMass θ p ε s) * direction t b := by apply Finset.sum_congr rfl intro a _ rw [Finset.sum_comm] _ = ∑ s, ∑ a, ∑ b, direction t a * (α s * patternGradient p ε s a * patternGradient p ε s b / patternMass θ p ε s) * direction t b := by rw [Finset.sum_comm] _ = _ := by apply Finset.sum_congr rfl intro s _ simp_rw [Finset.mul_sum, Finset.sum_mul, Finset.sum_div] apply Finset.sum_congr rfl intro a _ simp_rw [Finset.mul_sum, Finset.sum_div] apply Finset.sum_congr rfl intro b _ ring calc informationObjective θ p ε α t = ∑ s : Fin 14, α s * (∑ k : Fin 2, patternGradient p ε s k * direction t k) ^ 2 / patternMass θ p ε s := by unfold informationObjective patternInformation projectedGradient apply Finset.sum_congr rfl intro s _ ring _ = _ := h.symm
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_eq_informationQuadratic · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:341
theorem staircaseFeasible_weight_le_one

Under the supplied quantities and conditions, the staircase feasible weight le one assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the staircase Feasible weight le one.

Formal statement
ε :
ℝ
hε :
0 ≤ ε
hα :
s :
Fin 14
α s ≤ 1
Proof (Lean source)
lemma staircaseFeasible_weight_le_one (ε : ℝ) (hε : 0 ≤ ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (s : Fin 14) : α s ≤ 1 := by have hr (u : Fin 14) : 1 ≤ patternRay ε u 0 := by unfold patternRay privacyIncrement privacyRatio split_ifs <;> simp_all [Real.one_le_exp_iff] have hterm (u : Fin 14) : 0 ≤ α u * patternRay ε u 0 := mul_nonneg (hα.1 u) (by linarith [hr u]) have hle : α s ≤ α s * patternRay ε s 0 := by nlinarith [mul_nonneg (hα.1 s) (sub_nonneg.mpr (hr s))] have hsingle : α s * patternRay ε s 0 ≤ ∑ u : Fin 14, α u * patternRay ε u 0 := Finset.single_le_sum (fun u _ => hterm u) (Finset.mem_univ s) rw [← staircaseMatrix, hα.2 0] at hsingle exact hle.trans hsingle
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseFeasible_weight_le_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:390
theorem staircaseFeasible_sum_le_one

Under the supplied quantities and conditions, the staircase feasible sum le one assertion holds. Under the stated assumptions, the staircase Feasible sum le one.

Formal statement
ε :
ℝ
hε :
0 ≤ ε
hα :
(∑ s : Fin 14, α s) ≤ 1
Proof (Lean source)
lemma staircaseFeasible_sum_le_one (ε : ℝ) (hε : 0 ≤ ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : (∑ s : Fin 14, α s) ≤ 1 := by have hr (s : Fin 14) : 1 ≤ patternRay ε s 0 := by unfold patternRay privacyIncrement privacyRatio split_ifs <;> simp_all [Real.one_le_exp_iff] calc (∑ s : Fin 14, α s) = ∑ s : Fin 14, α s * 1 := by simp _ ≤ ∑ s : Fin 14, α s * patternRay ε s 0 := by apply Finset.sum_le_sum intro s hs exact mul_le_mul_of_nonneg_left (hr s) (hα.1 s) _ = 1 := hα.2 0
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseFeasible_sum_le_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:410
theorem staircaseFeasible_nonempty Lemma staircaseFeasible_nonempty in the paper ↗

the staircase feasible nonempty assertion holds.

Formal statement
ε :
ℝ
(feasibleSet ε).Nonempty
Proof (Lean source)
lemma staircaseFeasible_nonempty (ε : ℝ) : (feasibleSet ε).Nonempty := by let α : StaircaseWeight := fun s => if s = 0 ∨ s = 13 then 1 / (exp ε + 1) else 0 refine ⟨α, ?_⟩ change staircaseFeasible ε α constructor · intro s dsimp [α] split_ifs <;> positivity · intro j fin_cases j <;> simp +decide [staircaseMatrix, α, patternRay, patternContains, privacyIncrement, privacyRatio, Fin.sum_univ_succ] <;> field_simp <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseFeasible_nonempty · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:428
theorem staircaseFeasible_singleton_design

the staircase feasible singleton design assertion holds.

Formal statement
ε :
ℝ
staircaseFeasible ε (fun s : Fin 14 => if s ∈ ({0, 1, 3, 7} : Finset (Fin 14)) then 1 / (exp ε + 3) else 0)
Proof (Lean source)
lemma staircaseFeasible_singleton_design (ε : ℝ) : staircaseFeasible ε (fun s : Fin 14 => if s ∈ ({0, 1, 3, 7} : Finset (Fin 14)) then 1 / (exp ε + 3) else 0) := by constructor · intro s dsimp split_ifs <;> positivity · intro j fin_cases j <;> simp +decide [staircaseMatrix, patternRay, patternContains, privacyIncrement, privacyRatio, Fin.sum_univ_succ] <;> field_simp <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseFeasible_singleton_design · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:446
theorem staircaseFeasible_positive_first_pattern

the staircase feasible positive first pattern assertion holds.

Formal statement
ε :
ℝ
∃ α : StaircaseWeight,
conclusion 1
conclusion 2
0 < α 0
Proof (Lean source)
lemma staircaseFeasible_positive_first_pattern (ε : ℝ) : ∃ α : StaircaseWeight, staircaseFeasible ε α ∧ 0 < α 0 := by let α : StaircaseWeight := fun s => if s = 0 ∨ s = 13 then 1 / (exp ε + 1) else 0 refine ⟨α, ?_, by dsimp [α]; positivity⟩ constructor · intro s dsimp [α] split_ifs <;> positivity · intro j fin_cases j <;> simp +decide [staircaseMatrix, α, patternRay, patternContains, privacyIncrement, privacyRatio, Fin.sum_univ_succ] <;> field_simp <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseFeasible_positive_first_pattern · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:462
theorem staircaseFeasible_closed Lemma staircaseFeasible_closed in the paper ↗

the staircase feasible closed assertion holds.

Formal statement
ε :
ℝ
Proof (Lean source)
lemma staircaseFeasible_closed (ε : ℝ) : IsClosed (feasibleSet ε) := by have hcoord (s : Fin 14) : Continuous (fun α : StaircaseWeight => α s) := continuous_apply s have hrow (j : Fin 4) : Continuous (fun α : StaircaseWeight => staircaseMatrix ε α j) := by unfold staircaseMatrix fun_prop have hnonneg : IsClosed {α : StaircaseWeight | ∀ s, 0 ≤ α s} := by simpa only [Set.ofPred_forall] using (isClosed_iInter (fun s : Fin 14 => isClosed_le continuous_const (hcoord s))) have hnormal : IsClosed {α : StaircaseWeight | ∀ j, staircaseMatrix ε α j = 1} := by simpa only [Set.ofPred_forall] using (isClosed_iInter (fun j : Fin 4 => isClosed_eq (hrow j) continuous_const)) convert hnonneg.inter hnormal using 1 ext α simp only [feasibleSet, Set.mem_ofPred_eq, Set.mem_inter_iff, staircaseFeasible]
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseFeasible_closed · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:479
theorem staircaseFeasible_compact Lemma staircaseFeasible_compact in the paper ↗

Under the supplied quantities and conditions, the staircase feasible compact assertion holds. Under the stated assumptions, the staircase Feasible compact.

Formal statement
ε :
ℝ
hε :
0 ≤ ε
Proof (Lean source)
lemma staircaseFeasible_compact (ε : ℝ) (hε : 0 ≤ ε) : IsCompact (feasibleSet ε) := by have hbox : IsCompact {α : StaircaseWeight | ∀ s, α s ∈ Icc (0 : ℝ) 1} := isCompact_pi_infinite (fun _ => isCompact_Icc) apply hbox.of_isClosed_subset (staircaseFeasible_closed ε) intro α hα s have hsingle : α s ≤ ∑ u : Fin 14, α u := by exact Finset.single_le_sum (fun u _ => hα.1 u) (Finset.mem_univ s) exact ⟨hα.1 s, hsingle.trans (staircaseFeasible_sum_le_one ε hε α hα)⟩
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseFeasible_compact · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:501
theorem staircaseFeasible_convex Lemma staircaseFeasible_convex in the paper ↗

the staircase feasible convex assertion holds.

Formal statement
ε :
ℝ
Proof (Lean source)
lemma staircaseFeasible_convex (ε : ℝ) : Convex ℝ (feasibleSet ε) := by intro α hα β hβ a b ha hb hab constructor · intro s change 0 ≤ a * α s + b * β s exact add_nonneg (mul_nonneg ha (hα.1 s)) (mul_nonneg hb (hβ.1 s)) · intro j change (∑ s : Fin 14, (a * α s + b * β s) * patternRay ε s j) = 1 calc _ = a * staircaseMatrix ε α j + b * staircaseMatrix ε β j := by simp only [staircaseMatrix, Finset.mul_sum] rw [← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro s hs ring _ = 1 := by rw [hα.2 j, hβ.2 j]; linarith
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseFeasible_convex · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:515

For the supplied quantities and conditions, the upper envelope is the mathematical object specified below. The upper Envelope is determined by the displayed parameters.

Definition (Lean source)
p ε t :
ℝ
upperEnvelope θ p ε t :
ℝ
sSup {u : ℝ | ∃ α ∈ feasibleSet ε, u = informationObjective θ p ε α t}
theorem informationObjective_continuous_weight

the information objective continuous weight assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε t :
ℝ
Proof (Lean source)
lemma informationObjective_continuous_weight (θ : TrialParameter) (p ε t : ℝ) : Continuous (fun α : StaircaseWeight => informationObjective θ p ε α t) := by unfold informationObjective fun_prop
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_continuous_weight · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:539
theorem informationObjective_quadratic_difference

Under the supplied quantities and conditions, the information objective quadratic difference assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
t u :
ℝ
= informationObjective θ p ε α t
+ (u - t) * (∑ s : Fin 14, 2 * α s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s)
+ (u - t) ^ 2 * (∑ s : Fin 14, α s * (patternGradient p ε s 0 + patternGradient p ε s 1) ^ 2 / patternMass θ p ε s)
Proof (Lean source)
lemma informationObjective_quadratic_difference (θ : TrialParameter) (p ε : ℝ) (α : StaircaseWeight) (t u : ℝ) : informationObjective θ p ε α u = informationObjective θ p ε α t + (u - t) * (∑ s : Fin 14, 2 * α s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s) + (u - t) ^ 2 * (∑ s : Fin 14, α s * (patternGradient p ε s 0 + patternGradient p ε s 1) ^ 2 / patternMass θ p ε s) := by simp only [informationObjective, Finset.mul_sum, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro s _ simp [patternInformation, projectedGradient, direction, Fin.sum_univ_succ] ring
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_quadratic_difference · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:547
theorem informationObjective_min_of_stationary

Under the supplied quantities and conditions, the information objective min of stationary assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Objective min of stationary.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
hα :
t :
ℝ
hstationary :
(∑ s : Fin 14, 2 * α s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s)
= 0
u :
ℝ
informationObjective θ p ε α t ≤ informationObjective θ p ε α u
Proof (Lean source)
lemma informationObjective_min_of_stationary (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (t : ℝ) (hstationary : (∑ s : Fin 14, 2 * α s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s) = 0) : ∀ u : ℝ, informationObjective θ p ε α t ≤ informationObjective θ p ε α u := by intro u conv_rhs => rw [informationObjective_quadratic_difference θ p ε α t u] rw [hstationary, mul_zero, add_zero] have hnonneg : 0 ≤ ∑ s : Fin 14, α s * (patternGradient p ε s 0 + patternGradient p ε s 1) ^ 2 / patternMass θ p ε s := by apply Finset.sum_nonneg intro s _ exact div_nonneg (mul_nonneg (hα.1 s) (sq_nonneg _)) (le_of_lt (patternMass_pos_interior θ p ε hp hθ hε s)) exact le_add_of_nonneg_right (mul_nonneg (sq_nonneg _) hnonneg)
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_min_of_stationary · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:566
theorem informationObjective_stationary_of_min

Under the supplied quantities and conditions, the information objective stationary of min assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
t :
ℝ
hmin :
∀ u : ℝ, informationObjective θ p ε α t ≤ informationObjective θ p ε α u
(∑ s : Fin 14, 2 * α s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s)
= 0
Proof (Lean source)
lemma informationObjective_stationary_of_min (θ : TrialParameter) (p ε : ℝ) (α : StaircaseWeight) (t : ℝ) (hmin : ∀ u : ℝ, informationObjective θ p ε α t ≤ informationObjective θ p ε α u) : (∑ s : Fin 14, 2 * α s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s) = 0 := by let A := ∑ s : Fin 14, 2 * α s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s let B := ∑ s : Fin 14, α s * (patternGradient p ε s 0 + patternGradient p ε s 1) ^ 2 / patternMass θ p ε s have hpoly (x : ℝ) : 0 ≤ x * A + x ^ 2 * B := by have h := hmin (t + x) have hdiff := informationObjective_quadratic_difference θ p ε α t (t + x) rw [hdiff] at h simp only [add_sub_cancel_left] at h dsimp [A, B] linarith have hp (x : ℝ) : 0 ≤ x * A + x ^ 2 * B := hpoly x by_contra hn have hA : A ≠ 0 := hn have hden : 0 < |B| + 1 := by positivity have hB : B ≤ |B| := le_abs_self B have h := hp (-A / (2 * (|B| + 1))) have hsq : 0 < A ^ 2 := sq_pos_of_ne_zero hA have hden2 : 0 < (|B| + 1) ^ 2 := sq_pos_of_pos hden field_simp at h nlinarith [mul_nonneg hsq.le (sub_nonneg.mpr hB)]
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_stationary_of_min · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:591
theorem informationObjective_exists_minimizer

Under the supplied quantities and conditions, the information objective exists minimizer assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Objective exists minimizer.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
hα :
∃ t : ℝ, ∀ u : ℝ, informationObjective θ p ε α t ≤ informationObjective θ p ε α u
Proof (Lean source)
lemma informationObjective_exists_minimizer (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : ∃ t : ℝ, ∀ u : ℝ, informationObjective θ p ε α t ≤ informationObjective θ p ε α u := by let A := ∑ s : Fin 14, 2 * α s * projectedGradient p ε s 0 * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s let B := ∑ s : Fin 14, α s * (patternGradient p ε s 0 + patternGradient p ε s 1) ^ 2 / patternMass θ p ε s have hB : 0 ≤ B := by dsimp [B] apply Finset.sum_nonneg intro s _ exact div_nonneg (mul_nonneg (hα.1 s) (sq_nonneg _)) (le_of_lt (patternMass_pos_interior θ p ε hp hθ hε s)) have hquad (u : ℝ) : informationObjective θ p ε α u = informationObjective θ p ε α 0 + u * A + u ^ 2 * B := by convert informationObjective_quadratic_difference θ p ε α 0 u using 1 simp [A, B] by_cases hB0 : B = 0 · have hA0 : A = 0 := by by_contra hA have hval := informationObjective_nonneg_interior θ p ε hp hθ hε α hα (-(informationObjective θ p ε α 0 + 1) / A) rw [hquad, hB0] at hval have hident : informationObjective θ p ε α 0 + (-(informationObjective θ p ε α 0 + 1) / A) * A + (-(informationObjective θ p ε α 0 + 1) / A) ^ 2 * 0 = -1 := by field_simp [hA] ring rw [hident] at hval linarith refine ⟨0, fun u => ?_⟩ rw [hquad u, hA0, hB0] simp · have hBpos : 0 < B := lt_of_le_of_ne hB (Ne.symm hB0) let t := -A / (2 * B) refine ⟨t, fun u => ?_⟩ rw [hquad u, hquad t] have hsq : 0 ≤ B * (u - t) ^ 2 := mul_nonneg hB (sq_nonneg _) have hid : u * A + u ^ 2 * B - (t * A + t ^ 2 * B) = B * (u - t) ^ 2 := by dsimp [t] field_simp ring linarith
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_exists_minimizer · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleGeometry.lean:626
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.OracleValue 5 declarations Staircase profile values

Staircase profile values

theorem informationObjective_profile_upperSemicontinuous

Under the supplied quantities and conditions, the information objective profile upper semicontinuous assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Objective profile upper Semicontinuous.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
UpperSemicontinuousOn (fun α : StaircaseWeight => ⨅ t : ℝ, informationObjective θ p ε α t) (feasibleSet ε)
Proof (Lean source)
lemma informationObjective_profile_upperSemicontinuous (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) : UpperSemicontinuousOn (fun α : StaircaseWeight => ⨅ t : ℝ, informationObjective θ p ε α t) (feasibleSet ε) := by apply upperSemicontinuousOn_ciInf · intro α hα refine ⟨0, ?_⟩ rintro u ⟨t, rfl⟩ exact informationObjective_nonneg_interior θ p ε hp hθ hε α hα t · intro t exact (informationObjective_continuous_weight θ p ε t).continuousOn.upperSemicontinuousOn
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_profile_upperSemicontinuous · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleValue.lean:15
theorem informationObjective_profile_exists_maximizer

Under the supplied quantities and conditions, the information objective profile exists maximizer assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Objective profile exists maximizer.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
conclusion 1
(⨅ t : ℝ, informationObjective θ p ε β t) ≤ ⨅ t : ℝ, informationObjective θ p ε α t
Proof (Lean source)
lemma informationObjective_profile_exists_maximizer (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) : ∃ α : StaircaseWeight, staircaseFeasible ε α ∧ ∀ β : StaircaseWeight, staircaseFeasible ε β → (⨅ t : ℝ, informationObjective θ p ε β t) ≤ ⨅ t : ℝ, informationObjective θ p ε α t := by obtain ⟨α, hα, hmax⟩ := (informationObjective_profile_upperSemicontinuous θ p ε hp hθ hε).exists_isMaxOn (staircaseFeasible_nonempty ε) (staircaseFeasible_compact ε hε) exact ⟨α, hα, fun β hβ => hmax hβ⟩
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_profile_exists_maximizer · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleValue.lean:33
theorem Jstar_exists_optimal_weight

Under the supplied quantities and conditions, the jstar exists optimal weight assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Jstar exists optimal weight.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
∃ α : StaircaseWeight,
conclusion 1
conclusion 2
Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε α t}
Proof (Lean source)
lemma Jstar_exists_optimal_weight (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) : ∃ α : StaircaseWeight, staircaseFeasible ε α ∧ Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε α t} := by obtain ⟨α, hα, hmax⟩ := informationObjective_profile_exists_maximizer θ p ε hp hθ hε refine ⟨α, hα, ?_⟩ have hprofile (β : StaircaseWeight) : (⨅ t : ℝ, informationObjective θ p ε β t) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε β t} := by rw [show {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε β t} = range (informationObjective θ p ε β) from by ext u; simp [eq_comm]] rfl apply IsGreatest.csSup_eq refine ⟨⟨α, hα, rfl⟩, ?_⟩ rintro u ⟨β, hβ, rfl⟩ rw [← hprofile β, ← hprofile α] exact hmax β hβ
CausalSmith.Stat.LdpAteEfficiencySurface.Jstar_exists_optimal_weight · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleValue.lean:49
theorem Jstar_pos_interior

Under the supplied quantities and conditions, the jstar pos interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Jstar pos interior.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
0 < Jstar θ p ε
Proof (Lean source)
lemma Jstar_pos_interior (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : 0 < Jstar θ p ε := by let α : StaircaseWeight := fun s => if s ∈ ({0, 1, 3, 7} : Finset (Fin 14)) then 1 / (exp ε + 3) else 0 have hα : staircaseFeasible ε α := staircaseFeasible_singleton_design ε obtain ⟨t, ht⟩ := informationObjective_exists_minimizer θ p ε hp hθ hε.le α hα have hmass (s : Fin 14) : 0 < patternMass θ p ε s := patternMass_pos_interior θ p ε hp hθ hε.le s have hterm (s : Fin 14) : α s * patternInformation θ p ε s t ≤ informationObjective θ p ε α t := by unfold informationObjective apply Finset.single_le_sum (s := univ) (a := s) (fun u hu => ?_) (Finset.mem_univ _) exact mul_nonneg (hα.1 u) (div_nonneg (sq_nonneg _ ) (hmass u).le) have h0 : 0 < α 0 * ((privacyIncrement ε * controlProb p) ^ 2 / patternMass θ p ε 0) := by have hd := privacyIncrement_pos hε have hq : 0 < controlProb p := by dsimp [controlProb]; linarith [hp.2] have hm := hmass 0 dsimp [α] positivity have h7form : patternInformation θ p ε 7 t = ((privacyIncrement ε * p) ^ 2 / patternMass θ p ε 7) * (t + 1) ^ 2 := by simp +decide [patternInformation, projectedGradient, patternGradient, direction, Fin.sum_univ_succ] ring have h7 : 0 < α 7 * ((privacyIncrement ε * p) ^ 2 / patternMass θ p ε 7) := by have hd := privacyIncrement_pos hε have hm := hmass 7 have hp0 := hp.1 dsimp [α] positivity have hvalue : 0 < informationObjective θ p ε α t := by have hnonneg := informationObjective_nonneg_interior θ p ε hp hθ hε.le α hα t by_contra hn have hz : informationObjective θ p ε α t = 0 := le_antisymm (le_of_not_gt hn) hnonneg have hterm0 := hterm 0 have hterm7 := hterm 7 rw [first_pattern_information_quadratic, hz] at hterm0 rw [h7form, hz] at hterm7 have ht0 : t = 0 := by by_contra htne nlinarith [mul_pos h0 (sq_pos_of_ne_zero htne)] have ht7 : t + 1 = 0 := by by_contra htne nlinarith [mul_pos h7 (sq_pos_of_ne_zero htne)] linarith have hleast : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} = informationObjective θ p ε α t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro u ⟨v, rfl⟩; exact ht v⟩ have hbound : informationObjective θ p ε α t ≤ Jstar θ p ε := by obtain ⟨γ, hγ, hmax⟩ := informationObjective_profile_exists_maximizer θ p ε hp hθ hε.le have hprofile (β : StaircaseWeight) : (⨅ v : ℝ, informationObjective θ p ε β v) = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} := by rw [show {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} = range (informationObjective θ p ε β) from by ext u; simp [eq_comm]] rfl rw [Jstar, ← hleast] apply le_csSup · refine ⟨sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε γ v}, ?_⟩ rintro u ⟨β, hβ, rfl⟩ rw [← hprofile β, ← hprofile γ] exact hmax β hβ · exact ⟨α, hα, rfl⟩ exact lt_of_lt_of_le hvalue hbound
CausalSmith.Stat.LdpAteEfficiencySurface.Jstar_pos_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleValue.lean:75
theorem Jstar_eq_envelope_of_stationary_maximizer

Under the supplied quantities and conditions, the jstar eq envelope of stationary maximizer assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Jstar eq envelope of stationary maximizer.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
hα :
t :
ℝ
hmax :
then
informationObjective θ p ε β t ≤ informationObjective θ p ε α t
hstationary :
(∑ s : Fin 14, 2 * α s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s)
= 0
Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = upperEnvelope θ p ε v}
Proof (Lean source)
lemma Jstar_eq_envelope_of_stationary_maximizer (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (t : ℝ) (hmax : ∀ β : StaircaseWeight, staircaseFeasible ε β → informationObjective θ p ε β t ≤ informationObjective θ p ε α t) (hstationary : (∑ s : Fin 14, 2 * α s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s) = 0) : Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = upperEnvelope θ p ε v} := by have hleast : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} = informationObjective θ p ε α t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro u ⟨v, rfl⟩ exact informationObjective_min_of_stationary θ p ε hp hθ hε α hα t hstationary v⟩ have hbound : informationObjective θ p ε α t ≤ Jstar θ p ε := by obtain ⟨γ, hγ, hγmax⟩ := informationObjective_profile_exists_maximizer θ p ε hp hθ hε have hprofile (β : StaircaseWeight) : (⨅ v : ℝ, informationObjective θ p ε β v) = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} := by rw [show {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} = range (informationObjective θ p ε β) from by ext u; simp [eq_comm]] rfl rw [Jstar, ← hleast] apply le_csSup · refine ⟨sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε γ v}, ?_⟩ rintro u ⟨β, hβ, rfl⟩ rw [← hprofile β, ← hprofile γ] exact hγmax β hβ · exact ⟨α, hα, rfl⟩ have henvelope : upperEnvelope θ p ε t = informationObjective θ p ε α t := by unfold upperEnvelope apply IsGreatest.csSup_eq exact ⟨⟨α, hα, rfl⟩, by rintro u ⟨β, hβ, rfl⟩ exact hmax β hβ⟩ apply le_antisymm · apply le_csInf · exact ⟨upperEnvelope θ p ε 0, 0, rfl⟩ · rintro u ⟨v, rfl⟩ exact Jstar_le_upperEnvelope θ p ε hp hθ hε v · have hlow : BddBelow {u : ℝ | ∃ v : ℝ, u = upperEnvelope θ p ε v} := by refine ⟨0, ?_⟩ rintro u ⟨v, rfl⟩ obtain ⟨β, hβ, hβmax⟩ := informationObjective_exists_maximizer θ p ε v hε have heq : upperEnvelope θ p ε v = informationObjective θ p ε β v := by unfold upperEnvelope apply IsGreatest.csSup_eq exact ⟨⟨β, hβ, rfl⟩, by rintro w ⟨δ, hδ, rfl⟩ exact hβmax δ hδ⟩ rw [heq] exact informationObjective_nonneg_interior θ p ε hp hθ hε β hβ v exact (csInf_le hlow ⟨t, rfl⟩).trans (henvelope.trans_le hbound)
CausalSmith.Stat.LdpAteEfficiencySurface.Jstar_eq_envelope_of_stationary_maximizer · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/OracleValue.lean:156
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.Pilot 32 declarations Four-category randomized response estimates the input probabilities.

Private pilot and affine main-sample estimator

Four-category randomized response estimates the input probabilities. A measurable saddle selector chooses the main staircase channel and influence values from that pilot, with the pilot discarded from the final average.

def PilotOutput

the pilot output is the mathematical object specified below.

Definition (Lean source)
PilotOutput :
Type
Fin 4 ⊕ Fin 14
CausalSmith.Stat.LdpAteEfficiencySurface.PilotOutput · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:25

the pilot output family is the mathematical object specified below.

Definition (Lean source)
pilotOutputFamily :
fun _ _ => PilotOutput
CausalSmith.Stat.LdpAteEfficiencySurface.pilotOutputFamily · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:28
instance instMeasurableSpacePilotOutputFamily

The measurable-space instance for pilot outputs is determined by the displayed parameters.

Definition (Lean source)
instance : ∀ n i, MeasurableSpace (pilotOutputFamily n i) := fun _ _ => inferInstanceAs (MeasurableSpace PilotOutput)
CausalSmith.Stat.LdpAteEfficiencySurface.instMeasurableSpacePilotOutputFamily · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:31
instance instMeasurableSingletonClassPilotOutput Definition instMeasurableSingletonClassPilotOutput in the paper ↗

the inst measurable singleton class pilot output is the mathematical object specified below.

Definition (Lean source)
instance instMeasurableSingletonClassPilotOutput : MeasurableSingletonClass PilotOutput := by refine ⟨fun x => ?_⟩ cases x with | inl a => simpa only [Set.image_singleton] using (measurableSet_singleton a).inl_image | inr b => simpa only [Set.image_singleton] using (measurableSet_singleton b).inr_image
CausalSmith.Stat.LdpAteEfficiencySurface.instMeasurableSingletonClassPilotOutput · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:36
instance instMeasurableSingletonClassPilotOutputFamily

The measurable-singleton instance for pilot outputs is determined by the displayed parameters.

Definition (Lean source)
instance : ∀ n i, MeasurableSingletonClass (pilotOutputFamily n i) := fun _ _ => inferInstanceAs (MeasurableSingletonClass PilotOutput)
CausalSmith.Stat.LdpAteEfficiencySurface.instMeasurableSingletonClassPilotOutputFamily · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:43
instance instCountablePrivateHistoryPilotOutputFamily

The countability instance for private pilot histories is determined by the displayed parameters.

Definition (Lean source)
instance (n : ℕ) (i : Fin n) : Countable (PrivateHistory (Z := pilotOutputFamily n) i) := inferInstance
CausalSmith.Stat.LdpAteEfficiencySurface.instCountablePrivateHistoryPilotOutputFamily · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:47
instance instMeasurableSingletonClassPilotHistory

For the supplied quantities and conditions, the inst measurable singleton class pilot history is the mathematical object specified below.

Definition (Lean source)
instance instMeasurableSingletonClassPilotHistory (n : ℕ) (i : Fin n) : MeasurableSingletonClass (PrivateHistory (Z := pilotOutputFamily n) i) := by infer_instance
CausalSmith.Stat.LdpAteEfficiencySurface.instMeasurableSingletonClassPilotHistory · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:52
def rrPilotProbability

For the supplied quantities and conditions, the rr pilot probability is the mathematical object specified below. The rr Pilot Probability is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
j k :
Fin 4
rrPilotProbability ε j k :
ℝ
(if j = k then exp ε else 1) / (exp ε + 3)
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilotProbability · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:57

Under the supplied quantities and conditions, the rr pilot probability ldp assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the rr Pilot Probability ldp.

Formal statement
ε :
ℝ
hε :
0 < ε
j j' k :
Fin 4
rrPilotProbability ε j k ≤ exp ε * rrPilotProbability ε j' k
Proof (Lean source)
lemma rrPilotProbability_ldp (ε : ℝ) (hε : 0 < ε) (j j' k : Fin 4) : rrPilotProbability ε j k ≤ exp ε * rrPilotProbability ε j' k := by have he : 1 ≤ exp ε := (Real.one_le_exp_iff).2 (le_of_lt hε) have hd : 0 < exp ε + 3 := by positivity unfold rrPilotProbability rw [← mul_div_assoc] apply (div_le_div_iff_of_pos_right hd).2 split_ifs <;> nlinarith [sq_nonneg (exp ε - 1)]
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilotProbability_ldp · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:62
def rrPilotKernel

the rr pilot kernel is the mathematical object specified below. The rr Pilot Kernel is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
rrPilotKernel ε :
Kernel (Fin 4) (Fin 4)
Kernel.ofFunOfCountable fun j
=> Measure.count.withDensity (fun k : Fin 4 => ofReal (rrPilotProbability ε j k))
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilotKernel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:75

the rr pilot kernel markov assertion holds.

Formal statement
ε :
ℝ
Proof (Lean source)
lemma rrPilotKernel_markov (ε : ℝ) : IsMarkovKernel (rrPilotKernel ε) := by constructor intro j constructor have he : 0 < exp ε := Real.exp_pos ε have hd : exp ε + 3 ≠ 0 := by positivity have hsum : (∑ k : Fin 4, rrPilotProbability ε j k) = 1 := by fin_cases j <;> simp +decide [rrPilotProbability, Fin.sum_univ_succ] <;> field_simp <;> ring rw [← ENNReal.ofReal_one, ← hsum] change (Measure.count.withDensity (fun k : Fin 4 => ofReal (rrPilotProbability ε j k))) univ = _ simp only [withDensity_apply _ MeasurableSet.univ, setLIntegral_univ, lintegral_count] rw [tsum_fintype, ENNReal.ofReal_sum_of_nonneg] intro k hk unfold rrPilotProbability split_ifs <;> positivity
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilotKernel_markov · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:82

Under the supplied quantities and conditions, the rr pilot kernel private assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the rr Pilot Kernel private.

Formal statement
ε :
ℝ
hε :
0 < ε
A :
Set (Fin 4)
j j' :
Fin 4
rrPilotKernel ε j A ≤ ofReal (exp ε) * rrPilotKernel ε j' A
Proof (Lean source)
lemma rrPilotKernel_private (ε : ℝ) (hε : 0 < ε) (A : Set (Fin 4)) (j j' : Fin 4) : rrPilotKernel ε j A ≤ ofReal (exp ε) * rrPilotKernel ε j' A := by let r := ofReal (exp ε) have hr : r ≠ ∞ := ENNReal.ofReal_ne_top have hm : Measure.count.withDensity (fun k : Fin 4 => ofReal (rrPilotProbability ε j k)) ≤ r • Measure.count.withDensity (fun k : Fin 4 => ofReal (rrPilotProbability ε j' k)) := by rw [← withDensity_smul' r _ hr] apply withDensity_mono filter_upwards [] with k dsimp [r] rw [← ENNReal.ofReal_mul (le_of_lt (Real.exp_pos ε))] exact ENNReal.ofReal_le_ofReal (rrPilotProbability_ldp ε hε j j' k) exact hm A
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilotKernel_private · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:103
def clipInterior

For the supplied quantities and conditions, the clip interior is the mathematical object specified below. The clip Interior is determined by the displayed parameters.

Definition (Lean source)
δ x :
ℝ
clipInterior δ x :
ℝ
max δ (min (1 - δ) x)
CausalSmith.Stat.LdpAteEfficiencySurface.clipInterior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:123
def pilotFrequency

For the supplied quantities and conditions, the pilot frequency is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
m :
ℕ → ℕ
z :
Transcript (pilotOutputFamily n)
k :
Fin 4
pilotFrequency m z k :
ℝ
(m n : ℝ)⁻¹ * ∑ i : Fin n, if i.val < m n ∧ z i = inl k then (1 : ℝ) else 0
CausalSmith.Stat.LdpAteEfficiencySurface.pilotFrequency · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:127
def pilotTheta

For the supplied quantities and conditions, the pilot theta is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The pilot Theta is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
z :
Transcript (pilotOutputFamily n)
pilotTheta p ε m z :
δ :
(m n + 2 : ℝ)⁻¹
invFreq :
((exp ε + 3) * pilotFrequency m z k - 1) / (exp ε - 1) (: (k : Fin 4))
fun a
=> if a = 0 then clipInterior δ (invFreq 1 / controlProb p) else clipInterior δ (invFreq 3 / p)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotTheta · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:133
def pilotHistoryFrequency

For the supplied quantities and conditions, the pilot history frequency is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
m :
ℕ → ℕ
i :
Fin n
k :
Fin 4
pilotHistoryFrequency m i h k :
ℝ
(m n : ℝ)⁻¹ * ∑ j : {j : Fin n // j < i}, if j.1.val < m n ∧
h j = inl k then (1 : ℝ) else 0
CausalSmith.Stat.LdpAteEfficiencySurface.pilotHistoryFrequency · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:145
def pilotHistoryTheta

For the supplied quantities and conditions, the pilot history theta is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The pilot History Theta is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
i :
Fin n
pilotHistoryTheta p ε m i h :
δ :
(m n + 2 : ℝ)⁻¹
invFreq :
((exp ε + 3) * pilotHistoryFrequency m i h k - 1) / (exp ε - 1) (: (k : Fin 4))
fun a
=> if a = 0 then clipInterior δ (invFreq 1 / controlProb p) else clipInterior δ (invFreq 3 / p)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotHistoryTheta · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:152

Under the supplied quantities and conditions, the clip interior interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the clip Interior interior.

Formal statement
δ x :
ℝ
hδ :
0 < δ
hhalf :
δ ≤ 1 / 2
conclusion 1
0 < clipInterior δ x
conclusion 2
clipInterior δ x < 1
Proof (Lean source)
lemma clipInterior_interior (δ x : ℝ) (hδ : 0 < δ) (hhalf : δ ≤ 1 / 2) : 0 < clipInterior δ x ∧ clipInterior δ x < 1 := by unfold clipInterior constructor · exact lt_of_lt_of_le hδ (le_max_left _ _) · have hbound : max δ (min (1 - δ) x) ≤ 1 - δ := max_le (by linarith) (min_le_left _ _) linarith
CausalSmith.Stat.LdpAteEfficiencySurface.clipInterior_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:165
theorem pilotHistoryTheta_interior

Under the supplied quantities and conditions, the pilot history theta interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
i :
Fin n
Proof (Lean source)
lemma pilotHistoryTheta_interior (p ε : ℝ) (m : ℕ → ℕ) {n : ℕ} (i : Fin n) (h : PrivateHistory (Z := pilotOutputFamily n) i) : InteriorMeans (pilotHistoryTheta p ε m i h) := by have hδ : 0 < ((m n + 2 : ℝ)⁻¹) := by positivity have hhalf : ((m n + 2 : ℝ)⁻¹) ≤ 1 / 2 := by rw [one_div] have hden : (2 : ℝ) ≤ m n + 2 := by exact_mod_cast Nat.le_add_left 2 (m n) simpa [one_div] using one_div_le_one_div_of_le (by norm_num : (0 : ℝ) < 2) hden have h0 := clipInterior_interior ((m n + 2 : ℝ)⁻¹) (((exp ε + 3) * pilotHistoryFrequency m i h 1 - 1) / (exp ε - 1) / controlProb p) hδ hhalf have h1 := clipInterior_interior ((m n + 2 : ℝ)⁻¹) (((exp ε + 3) * pilotHistoryFrequency m i h 3 - 1) / (exp ε - 1) / p) hδ hhalf simpa [InteriorMeans, pilotHistoryTheta] using intro h0.1 (intro h0.2 (intro h1.1 h1.2))
CausalSmith.Stat.LdpAteEfficiencySurface.pilotHistoryTheta_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:178

For the supplied quantities and conditions, the saddle selection is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Saddle Selection is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
select :
SaddleSelection p ε select :
Prop
clause 1
Measurable select
clause 2
θ :
staircaseFeasible ε (select θ).1
u :
informationObjective θ p ε (select θ).1 (select θ).2.1
≤ informationObjective θ p ε (select θ).1 u
Jstar θ p ε = (select θ).2.2
(select θ).2.2 = informationObjective θ p ε (select θ).1 (select θ).2.1
CausalSmith.Stat.LdpAteEfficiencySurface.SaddleSelection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:198

For the supplied quantities and conditions, the strong saddle selection is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Strong Saddle Selection is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
select :
StrongSaddleSelection p ε select :
Prop
clause 1
SaddleSelection p ε select
clause 2
θ :
β :
informationObjective θ p ε β (select θ).2.1
≤ informationObjective θ p ε (select θ).1 (select θ).2.1
CausalSmith.Stat.LdpAteEfficiencySurface.StrongSaddleSelection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:210
theorem exists_measurable_strong_saddle_selector

Under the supplied quantities and conditions, the exists measurable strong saddle selector assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the exists measurable strong saddle selector.

Formal statement
p ε :
ℝ
hε :
0 < ε
∃ select : TrialParameter → StaircaseWeight × ℝ × ℝ, StrongSaddleSelection p ε select
Proof (Lean source)
lemma exists_measurable_strong_saddle_selector (p ε : ℝ) (hp : InteriorAssignment p) (hε : 0 < ε) : ∃ select : TrialParameter → StaircaseWeight × ℝ × ℝ, StrongSaddleSelection p ε select := by obtain ⟨select, hm, hs⟩ := exists_measurable_saddle_selector_bridge_strong p ε hp hε refine ⟨select, ⟨⟨hm, ?_⟩, ?_⟩⟩ · intro θ hθ have h := hs θ hθ exact ⟨h.1, h.2.1, h.2.2.1, h.2.2.2.1⟩ · intro θ hθ exact (hs θ hθ).2.2.2.2
CausalSmith.Stat.LdpAteEfficiencySurface.exists_measurable_strong_saddle_selector · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:219
theorem exists_measurable_saddle_selector

Under the supplied quantities and conditions, the exists measurable saddle selector assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the exists measurable saddle selector.

Formal statement
p ε :
ℝ
hε :
0 < ε
∃ select : TrialParameter → StaircaseWeight × ℝ × ℝ, SaddleSelection p ε select
Proof (Lean source)
lemma exists_measurable_saddle_selector (p ε : ℝ) (hp : InteriorAssignment p) (hε : 0 < ε) : ∃ select : TrialParameter → StaircaseWeight × ℝ × ℝ, SaddleSelection p ε select := by exact exists_measurable_saddle_selector_bridge p ε hp hε
CausalSmith.Stat.LdpAteEfficiencySurface.exists_measurable_saddle_selector · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:236
def phiTilde

For the supplied quantities and conditions, the phi tilde is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The phi Tilde is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
select :
s :
Fin 14
phiTilde θ p ε select s :
ℝ
projectedGradient p ε s (select θ).2.1 / ((select θ).2.2 * patternMass θ p ε s)
CausalSmith.Stat.LdpAteEfficiencySurface.phiTilde · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:245
def phiOutput

For the supplied quantities and conditions, the phi output is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The phi Output is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
select :
phiOutput θ p ε select z :
ℝ
match z with | inl _ => 0 | inr s => phiTilde θ p ε select s
CausalSmith.Stat.LdpAteEfficiencySurface.phiOutput · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:253
def tauStar

For the supplied quantities and conditions, the tau star is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The tau Star is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
m :
ℕ → ℕ
select :
n :
ℕ
z :
Transcript (pilotOutputFamily n)
tauStar p ε m select z :
ℝ
θtilde :
pilotTheta p ε m z
N :
n - m n
contrast θtilde + (N : ℝ)⁻¹ * ∑ i : Fin n, if m n
≤ i.val then phiOutput θtilde p ε select (z i) else 0

For the supplied quantities and conditions, the vhat star is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Vhat Star is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
m :
ℕ → ℕ
select :
n :
ℕ
z :
Transcript (pilotOutputFamily n)
VhatStar p ε m select z :
ℝ
θtilde :
pilotTheta p ε m z
N :
n - m n
mean :
(N : ℝ)⁻¹ * ∑ i : Fin n, if m n ≤ i.val then phiOutput θtilde p ε select (z i) else 0
(N : ℝ)⁻¹ * ∑ i : Fin n, if m n
≤ i.val then (phiOutput θtilde p ε select (z i) - mean) ^ 2 else 0
CausalSmith.Stat.LdpAteEfficiencySurface.VhatStar · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:272
def pilotProtocol

For the supplied quantities and conditions, the pilot protocol is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The pilot Protocol is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
m :
ℕ → ℕ
select :
n :
ℕ
pilotProtocol p ε m select n :
fun i
=> Kernel.ofFunOfCountable fun xh => if i.val < m n then (rrPilotKernel ε xh.1).map inl else ((staircaseChannel ε (select (pilotHistoryTheta p ε m i xh.2)).1) xh.1).map inr
CausalSmith.Stat.LdpAteEfficiencySurface.pilotProtocol · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:286
theorem pilotProtocol_private

Under the supplied quantities and conditions, the pilot protocol private assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Protocol private.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
select :
hselect :
hε :
0 < ε
n :
ℕ
SequentialLDP (Z := pilotOutputFamily n) ε (pilotProtocol p ε m select n)
Proof (Lean source)
lemma pilotProtocol_private (p ε : ℝ) (m : ℕ → ℕ) (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (n : ℕ) : SequentialLDP (Z := pilotOutputFamily n) ε (pilotProtocol p ε m select n) := by constructor · intro i constructor intro xh change IsProbabilityMeasure (if i.val < m n then (rrPilotKernel ε xh.1).map inl else (staircaseChannel ε (select (pilotHistoryTheta p ε m i xh.2)).1 xh.1).map inr) split_ifs with hi · haveI : IsMarkovKernel (rrPilotKernel ε) := rrPilotKernel_markov ε exact Measure.isProbabilityMeasure_map (by fun_prop) · have hsel := hselect.1.2 (pilotHistoryTheta p ε m i xh.2) (pilotHistoryTheta_interior p ε m i xh.2) haveI : IsMarkovKernel (staircaseChannel ε (select (pilotHistoryTheta p ε m i xh.2)).1) := staircaseChannel_markov ε _ hsel.1 exact Measure.isProbabilityMeasure_map (by fun_prop) · intro i A hA x x' h change (if i.val < m n then (rrPilotKernel ε x).map inl else (staircaseChannel ε (select (pilotHistoryTheta p ε m i h)).1 x).map inr) A ≤ ofReal (exp ε) * (if i.val < m n then (rrPilotKernel ε x').map inl else (staircaseChannel ε (select (pilotHistoryTheta p ε m i h)).1 x').map inr) A split_ifs with hi · rw [Measure.map_apply (by fun_prop) hA, Measure.map_apply (by fun_prop) hA] exact rrPilotKernel_private ε hε _ x x' · rw [Measure.map_apply (by fun_prop) hA, Measure.map_apply (by fun_prop) hA] have hsel := hselect.1.2 (pilotHistoryTheta p ε m i h) (pilotHistoryTheta_interior p ε m i h) exact staircaseChannel_private ε hε _ hsel.1 _ x x'
CausalSmith.Stat.LdpAteEfficiencySurface.pilotProtocol_private · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:297
theorem tauStar_measurable

Under the supplied quantities and conditions, the tau star measurable assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
select :
n :
ℕ
Measurable (tauStar p ε m select (n := n))
Proof (Lean source)
lemma tauStar_measurable (p ε : ℝ) (m : ℕ → ℕ) (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (n : ℕ) : Measurable (tauStar p ε m select (n := n)) := by exact measurable_of_finite _
CausalSmith.Stat.LdpAteEfficiencySurface.tauStar_measurable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:344
theorem exists_pilot_transcript

Under the supplied quantities and conditions, the exists pilot transcript assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the exists pilot transcript.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
select :
hselect :
hε :
0 < ε
n :
ℕ
∃ R : (Fin n → Fin 4) → Measure (Transcript (pilotOutputFamily n)),
Proof (Lean source)
lemma exists_pilot_transcript (p ε : ℝ) (m : ℕ → ℕ) (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (n : ℕ) : ∃ R : (Fin n → Fin 4) → Measure (Transcript (pilotOutputFamily n)), TranscriptFactorizes (pilotProtocol p ε m select n) R := by exact exists_transcript_factorization (pilotProtocol p ε m select n) (pilotProtocol_private p ε m select hselect hp hε n).1
CausalSmith.Stat.LdpAteEfficiencySurface.exists_pilot_transcript · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:351
def pilotEstimator

For the supplied quantities and conditions, the pilot estimator is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The pilot Estimator is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
m :
ℕ → ℕ
select :
hselect :
hε :
0 < ε
pilotEstimator p ε m select hselect hp hε :
clause 1
channel n := pilotProtocol p ε m select n
clause 2
transcript n := finiteSequenceTranscript (pilotProtocol p ε m select n)
clause 3
factorizes n := finiteSequenceTranscript_factorizes (pilotProtocol p ε m select n) (pilotProtocol_private p ε m select hselect hp hε n).1
clause 4
privacy n := pilotProtocol_private p ε m select hselect hp hε n
clause 5
estimate n := tauStar p ε m select (n := n)
clause 6
estimate_measurable n := tauStar_measurable p ε m select n
CausalSmith.Stat.LdpAteEfficiencySurface.pilotEstimator · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Pilot.lean:366
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotAdaptiveAveraging 7 declarations Finite pilot averaging and main-row scale transfer

Finite pilot averaging and main-row scale transfer

theorem finitePilot_average_error_le

the finite pilot average error le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the finite Pilot average error le.

Formal statement
P :
Type*
w f :
P → ℝ
L δ :
ℝ
hw :
∀ a, 0 ≤ w a
hsum :
∑ a, w a = 1
hf :
∀ a, |f a| ≤ 1
hL :
|L| ≤ 1
hδ :
0 ≤ δ
|∑ a, w a * f a - L| ≤ δ + 2 * ∑ a, w a * if δ ≤ |f a - L| then 1 else 0
Proof (Lean source)
lemma finitePilot_average_error_le {P : Type*} [Fintype P] (w f : P → ℝ) (L δ : ℝ) (hw : ∀ a, 0 ≤ w a) (hsum : ∑ a, w a = 1) (hf : ∀ a, |f a| ≤ 1) (hL : |L| ≤ 1) (hδ : 0 ≤ δ) : |∑ a, w a * f a - L| ≤ δ + 2 * ∑ a, w a * if δ ≤ |f a - L| then 1 else 0 := by have hpoint (a : P) : w a * |f a - L| ≤ w a * (δ + 2 * if δ ≤ |f a - L| then 1 else 0) := by apply mul_le_mul_of_nonneg_left _ (hw a) split_ifs with hbad · have hdiff : |f a - L| ≤ 2 := by calc |f a - L| ≤ |f a| + |L| := abs_sub _ _ _ ≤ 2 := by linarith [hf a, hL] linarith · simpa [hbad] using (le_of_lt (lt_of_not_ge hbad)) calc |∑ a, w a * f a - L| = |∑ a, w a * (f a - L)| := by congr 1 calc ∑ a, w a * f a - L = ∑ a, w a * f a - L * ∑ a, w a := by rw [hsum]; ring _ = ∑ a, w a * (f a - L) := by rw [Finset.mul_sum, ← Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro a _ ring _ ≤ ∑ a, |w a * (f a - L)| := Finset.abs_sum_le_sum_abs _ _ _ = ∑ a, w a * |f a - L| := by apply Finset.sum_congr rfl intro a _ rw [abs_mul, abs_of_nonneg (hw a)] _ ≤ ∑ a, w a * (δ + 2 * if δ ≤ |f a - L| then 1 else 0) := Finset.sum_le_sum fun a _ => hpoint a _ = δ + 2 * ∑ a, w a * if δ ≤ |f a - L| then 1 else 0 := by simp_rw [mul_add] rw [Finset.sum_add_distrib, ← Finset.sum_mul] simp_rw [show ∀ a : P, w a * (2 * if δ ≤ |f a - L| then 1 else 0) = 2 * (w a * if δ ≤ |f a - L| then 1 else 0) by intro a; ring] rw [← Finset.mul_sum, hsum] ring
CausalSmith.Stat.LdpAteEfficiencySurface.finitePilot_average_error_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveAveraging.lean:14
theorem finitePilot_average_tendsto_of_badMass

the finite pilot average tendsto of bad mass assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
P :
ℕ → Type*
∀ n, Fintype (P n)
w :
(n : ℕ) → P n → ℝ
f :
(n : ℕ) → P n → ℝ
L :
ℝ
hw :
∀ n a, 0 ≤ w n a
hsum :
∀ n, ∑ a, w n a = 1
hf :
∀ n a, |f n a| ≤ 1
hL :
|L| ≤ 1
hbad :
∀ δ : ℝ
if
0 < δ
then
Tendsto (fun n => ∑ a, w n a * if δ ≤ |f n a - L| then 1 else 0) atTop (𝓝 0)
Tendsto (fun n => ∑ a, w n a * f n a) atTop (𝓝 L)
Proof (Lean source)
lemma finitePilot_average_tendsto_of_badMass {P : ℕ → Type*} [∀ n, Fintype (P n)] (w : (n : ℕ) → P n → ℝ) (f : (n : ℕ) → P n → ℝ) (L : ℝ) (hw : ∀ n a, 0 ≤ w n a) (hsum : ∀ n, ∑ a, w n a = 1) (hf : ∀ n a, |f n a| ≤ 1) (hL : |L| ≤ 1) (hbad : ∀ δ : ℝ, 0 < δ → Tendsto (fun n => ∑ a, w n a * if δ ≤ |f n a - L| then 1 else 0) atTop (𝓝 0)) : Tendsto (fun n => ∑ a, w n a * f n a) atTop (𝓝 L) := by rw [Metric.tendsto_atTop] intro η hη have hbadη := hbad (η / 2) (half_pos hη) have hevent : ∀ᶠ n in atTop, (∑ a, w n a * if η / 2 ≤ |f n a - L| then 1 else 0) < η / 4 := (tendsto_order.1 hbadη).2 _ (by linarith) rcases (eventually_atTop.1 hevent) with ⟨N, hN⟩ exact ⟨N, fun n hn => by rw [Real.dist_eq] have hbound := finitePilot_average_error_le (w n) (f n) L (η / 2) (hw n) (hsum n) (hf n) hL (by positivity) exact lt_of_le_of_lt hbound (by linarith [hN n hn])⟩
CausalSmith.Stat.LdpAteEfficiencySurface.finitePilot_average_tendsto_of_badMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveAveraging.lean:61
def adaptiveMainSize

For the supplied quantities and conditions, the adaptive main size is the mathematical object specified below.

Definition (Lean source)
m :
ℕ → ℕ
n :
ℕ
adaptiveMainSize m n :
ℕ
theorem adaptiveMainSize_add_pilot

Under the supplied quantities and conditions, the adaptive main size add pilot assertion holds.

Formal statement
m :
ℕ → ℕ
n :
ℕ
Proof (Lean source)
lemma adaptiveMainSize_add_pilot (m : ℕ → ℕ) (n : ℕ) : adaptiveMainSize m n + adaptivePilotSize m n = n := by exact Nat.sub_add_cancel (adaptivePilotSize_le m n)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveMainSize_add_pilot · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveAveraging.lean:88
theorem adaptiveMainSize_ratio_tendsto_one

Under the supplied quantities and conditions, the adaptive main size ratio tendsto one assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hsub :
Tendsto (fun n => (adaptiveMainSize m n : ℝ) / n) atTop (𝓝 1)
Proof (Lean source)
lemma adaptiveMainSize_ratio_tendsto_one (m : ℕ → ℕ) (hsub : PilotSublinear m) : Tendsto (fun n => (adaptiveMainSize m n : ℝ) / n) atTop (𝓝 1) := by have hpilot := adaptivePilotSize_sublinear m hsub have ht : Tendsto (fun n => (1 : ℝ) - (adaptivePilotSize m n : ℝ) / n) atTop (𝓝 1) := by simpa using tendsto_const_nhds.sub hpilot apply ht.congr' filter_upwards [eventually_ne_atTop 0] with n hn rw [adaptiveMainSize, Nat.cast_sub (adaptivePilotSize_le m n)] field_simp
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveMainSize_ratio_tendsto_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveAveraging.lean:93
theorem adaptiveMainSize_tendsto_atTop

Under the supplied quantities and conditions, the adaptive main size tendsto at top assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hsub :
Proof (Lean source)
lemma adaptiveMainSize_tendsto_atTop (m : ℕ → ℕ) (hsub : PilotSublinear m) : Tendsto (adaptiveMainSize m) atTop atTop := by have hratio := adaptiveMainSize_ratio_tendsto_one m hsub have hreal : Tendsto (fun n => (adaptiveMainSize m n : ℝ)) atTop atTop := by have hprod := hratio.pos_mul_atTop zero_lt_one tendsto_natCast_atTop_atTop apply hprod.congr' filter_upwards [eventually_ne_atTop 0] with n hn change (adaptiveMainSize m n : ℝ) / n * n = adaptiveMainSize m n rw [div_mul_cancel₀] exact_mod_cast hn exact tendsto_natCast_atTop_iff.mp hreal
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveMainSize_tendsto_atTop · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveAveraging.lean:105
theorem adaptive_row_main_sqrt_ratio_tendsto_one

Under the supplied quantities and conditions, the adaptive row main sqrt ratio tendsto one assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hsub :
Tendsto (fun n : ℕ => sqrt ((n : ℝ) / (adaptiveMainSize m n : ℝ))) atTop (𝓝 1)
Proof (Lean source)
lemma adaptive_row_main_sqrt_ratio_tendsto_one (m : ℕ → ℕ) (hsub : PilotSublinear m) : Tendsto (fun n : ℕ => sqrt ((n : ℝ) / (adaptiveMainSize m n : ℝ))) atTop (𝓝 1) := by have hratio := adaptiveMainSize_ratio_tendsto_one m hsub have hinv : Tendsto (fun n : ℕ => ((adaptiveMainSize m n : ℝ) / n)⁻¹) atTop (𝓝 (1 : ℝ)) := by simpa using hratio.inv₀ one_ne_zero have hinv' : Tendsto (fun n : ℕ => (n : ℝ) / (adaptiveMainSize m n : ℝ)) atTop (𝓝 (1 : ℝ)) := by simpa only [inv_div] using hinv convert (Real.continuous_sqrt.tendsto 1).comp hinv' using 1 <;> simp [Function.comp_def]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptive_row_main_sqrt_ratio_tendsto_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveAveraging.lean:119
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotAdaptiveContinuity 6 declarations Continuity of the private-pilot oracle value and adaptive variance

Continuity of the private-pilot oracle value and adaptive variance

def adaptivePilotPolytope

For the supplied quantities and conditions, the adaptive pilot polytope is the mathematical object specified below. The adaptive Pilot Polytope is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
hε :
0 ≤ ε
adaptivePilotPolytope ε hε :
Polytope (Fin 14) (Fin 4)
clause 1
A j s := patternRay ε s j
clause 2
b _ := 1
clause 3
compact := by have hc := (staircaseFeasible_compact ε hε).image (EuclideanSpace.equiv (Fin 14) ℝ).symm.continuous convert hc using 1 ext α simp only [Set.mem_setOf_eq, Set.mem_image, feasibleSet] constructor · rintro ⟨hn, heq⟩ refine ⟨adaptiveToWeight α, ⟨hn, ?_⟩, adaptiveOfWeight_adaptiveToWeight α⟩ intro j simpa [adaptiveToWeight, staircaseMatrix, mul_comm] using heq j · rintro ⟨β, ⟨hn, heq⟩, rfl⟩ refine ⟨?_, ?_⟩ · simpa [adaptiveOfWeight, adaptiveToWeight] using hn · intro j simpa [adaptiveOfWeight, adaptiveToWeight, staircaseMatrix, mul_comm] using heq j
clause 4
nonempty := by obtain ⟨α, hα⟩ := staircaseFeasible_nonempty ε refine ⟨adaptiveOfWeight α, ?_, ?_⟩ · simpa [adaptiveOfWeight, adaptiveToWeight] using hα.1 · intro j simpa [adaptiveOfWeight, adaptiveToWeight, staircaseMatrix, mul_comm] using hα.2 j
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotPolytope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveContinuity.lean:39
def adaptivePilotQuadratics

For the supplied quantities and conditions, the adaptive pilot quadratics is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Quadratics is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
hε :
0 ≤ ε
adaptivePilotQuadratics p ε hp hε :
clause 1
a s θ := (patternGradient p ε s 0 + patternGradient p ε s 1) ^ 2 / patternMass θ.1 p ε s
clause 2
b s θ := 2 * (patternGradient p ε s 0 + patternGradient p ε s 1) * patternGradient p ε s 1 / patternMass θ.1 p ε s
clause 3
c s θ := (patternGradient p ε s 1) ^ 2 / patternMass θ.1 p ε s
clause 4
measurable_a := by intro s exact measurable_const.div (measurable_adaptivePatternMass_subtype p ε s)
clause 5
measurable_b := by intro s exact measurable_const.div (measurable_adaptivePatternMass_subtype p ε s)
clause 6
measurable_c := by intro s exact measurable_const.div (measurable_adaptivePatternMass_subtype p ε s)
clause 7
nonneg_a := by intro θ s exact div_nonneg (sq_nonneg _) (patternMass_pos_interior θ.1 p ε hp θ.2 hε s).le
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotQuadratics · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveContinuity.lean:96
theorem Jstar_eq_adaptiveQuadraticValue

Under the supplied quantities and conditions, the jstar eq adaptive quadratic value assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Jstar eq adaptive Quadratic Value.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hε :
0 < ε
θ :
Jstar θ.1 p ε
= value (adaptivePilotPolytope ε hε.le) (adaptivePilotQuadratics p ε hp hε.le) θ
Proof (Lean source)
lemma Jstar_eq_adaptiveQuadraticValue (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (θ : {θ : TrialParameter // InteriorMeans θ}) : Jstar θ.1 p ε = value (adaptivePilotPolytope ε hε.le) (adaptivePilotQuadratics p ε hp hε.le) θ := by let select := select have hsaddle := adaptivePilot_selected_isSaddle select p ε hselect hp hε θ rw [value_eq_of_isSaddle _ _ _ _ _ hsaddle, adaptivePilotQuadratics_objective] simp only [adaptiveToWeight_adaptiveOfWeight] have hs := (hselect.1).2 θ.1 θ.2 exact hs.2.2.1.trans hs.2.2.2
CausalSmith.Stat.LdpAteEfficiencySurface.Jstar_eq_adaptiveQuadraticValue · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveContinuity.lean:174
theorem continuousAt_Jstar

Under the supplied quantities and conditions, the continuous at jstar assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the continuous At Jstar.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hθ :
hε :
0 < ε
ContinuousAt (fun η => Jstar η p ε) θ
Proof (Lean source)
lemma continuousAt_Jstar (θ : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : ContinuousAt (fun η => Jstar η p ε) θ := by let Θ := {η : TrialParameter // InteriorMeans η} let θ0 : Θ := ⟨θ, hθ⟩ let B := pilotTUpper p ε let K : Set ℝ := Icc (-B) B have hB : 0 ≤ B := by unfold B pilotTUpper exact Real.sqrt_nonneg _ have hatt : {η : Θ | ∃ α : EuclideanSpace ℝ (Fin 14), ∃ t ∈ K, IsSaddle (adaptivePilotPolytope ε hε.le) (adaptivePilotQuadratics p ε hp hε.le) η α t} ∈ nhds θ0 := by filter_upwards [] with η let select := select refine ⟨adaptiveOfWeight (select η.1).1, (select η.1).2.1, ?_, ?_⟩ · have ht := strongSelector_t_bound select (hselect) hp hε η.1 η.2 exact (abs_le.mp ht) · exact adaptivePilot_selected_isSaddle select p ε hselect hp hε η have hvalue : ContinuousAt (value (adaptivePilotPolytope ε hε.le) (adaptivePilotQuadratics p ε hp hε.le)) θ0 := by apply continuousAt_quadratic_value (adaptivePilotPolytope ε hε.le) (adaptivePilotQuadratics p ε hp hε.le) K (isCompact_Icc) ⟨0, by simpa [K] using hB⟩ θ0 univ isOpen_univ (Set.mem_univ θ0) · exact (continuous_adaptivePilotQuadratics_objective p ε hp hε).continuousOn · exact hatt have hsub : ContinuousAt (fun η : Θ => Jstar η.1 p ε) θ0 := by apply hvalue.congr_of_eventuallyEq filter_upwards [] with η exact Jstar_eq_adaptiveQuadraticValue select p ε hselect hp hε η have hwithin : ContinuousWithinAt (fun η => Jstar η p ε) {η | InteriorMeans η} θ := by apply (continuousWithinAt_iff_continuousAt_domRestrict (f := fun η => Jstar η p ε) (s := {η | InteriorMeans η}) hθ).2 change ContinuousAt (fun η : {η : TrialParameter // InteriorMeans η} => Jstar η.1 p ε) ⟨θ, hθ⟩ simpa only [Θ, θ0] using hsub exact hwithin.continuousAt (isOpen_interiorMeans.mem_nhds hθ)
theorem continuousAt_Vstar

Under the supplied quantities and conditions, the continuous at vstar assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the continuous At Vstar.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hθ :
hε :
0 < ε
ContinuousAt (fun η => Vstar η p ε) θ
Proof (Lean source)
lemma continuousAt_Vstar (θ : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : ContinuousAt (fun η => Vstar η p ε) θ := by change ContinuousAt ((fun η => Jstar η p ε)⁻¹) θ exact (continuousAt_Jstar select θ p ε hselect hp hθ hε).inv₀ (ne_of_gt (Jstar_pos_interior θ p ε hp hθ hε))
theorem continuousAt_adaptiveScoreVariance_diag

Under the supplied quantities and conditions, the continuous at adaptive score variance diag assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the continuous At adaptive Score Variance diag.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hθ :
hε :
0 < ε
ContinuousAt (fun pair : TrialParameter × TrialParameter => adaptiveScoreVariance select pair.1 pair.2 p ε) (θ, θ)
Proof (Lean source)
lemma continuousAt_adaptiveScoreVariance_diag (θ : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : ContinuousAt (fun pair : TrialParameter × TrialParameter => adaptiveScoreVariance select pair.1 pair.2 p ε) (θ, θ) := by let B := pilotPhiUpper p ε let g : TrialParameter × TrialParameter → ℝ := fun q => B ^ 2 * ∑ s : Fin 14, |patternMass q.1 p ε s - patternMass q.2 p ε s| + (contrast q.1 - contrast q.2) ^ 2 have hgcont : Continuous g := by unfold g apply Continuous.add · apply Continuous.mul continuous_const apply continuous_finset_sum intro s _ exact (((continuous_adaptivePatternMass p ε s).comp continuous_fst).sub ((continuous_adaptivePatternMass p ε s).comp continuous_snd)).abs · unfold contrast fun_prop have hgzero : g (θ, θ) = 0 := by simp [g] have hinterior : {q : TrialParameter × TrialParameter | InteriorMeans q.1 ∧ InteriorMeans q.2} ∈ nhds (θ, θ) := by have hopen := isOpen_interiorMeans.prod isOpen_interiorMeans exact hopen.mem_nhds ⟨hθ, hθ⟩ let f : TrialParameter × TrialParameter → ℝ := fun q => adaptiveScoreVariance select q.1 q.2 p ε - Vstar q.2 p ε have hbound : {q : TrialParameter × TrialParameter | ‖f q‖ ≤ g q} ∈ nhds (θ, θ) := by filter_upwards [hinterior] with q hq rw [Real.norm_eq_abs] exact adaptiveScoreVariance_diag_error_le select q.1 q.2 p ε hselect hp hq.1 hq.2 hε have hgtend : Tendsto g (nhds (θ, θ)) (nhds 0) := by rw [← hgzero] exact hgcont.continuousAt have hftend : Tendsto f (nhds (θ, θ)) (nhds 0) := squeeze_zero_norm' hbound hgtend have hv : ContinuousAt (fun q : TrialParameter × TrialParameter => Vstar q.2 p ε) (θ, θ) := by have hsnd : ContinuousAt (fun q : TrialParameter × TrialParameter => q.2) (θ, θ) := continuousAt_snd change ContinuousAt ((fun η => Vstar η p ε) ∘ (fun q : TrialParameter × TrialParameter => q.2)) (θ, θ) exact (continuousAt_Vstar select θ p ε hselect hp hθ hε).comp hsnd have hsum := hftend.add hv change Tendsto (fun pair : TrialParameter × TrialParameter => adaptiveScoreVariance select pair.1 pair.2 p ε) (nhds (θ, θ)) (nhds (adaptiveScoreVariance select θ θ p ε)) rw [adaptiveScoreVariance_diag select θ p ε hselect hp hθ hε] simpa only [f, zero_add, sub_add_cancel] using hsum
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_adaptiveScoreVariance_diag · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveContinuity.lean:417
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotAdaptiveInputs 19 declarations Finite adaptive main-release inputs

Finite adaptive main-release inputs

def adaptiveMainMass

For the supplied quantities and conditions, the adaptive main mass is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Main Mass is determined by the displayed parameters.

Definition (Lean source)
select :
shared
θ η :
p ε :
ℝ
s :
Fin 14
adaptiveMainMass select θ η p ε s :
ℝ
(select η).1 s * patternMass θ p ε s
def adaptiveSelectedScore

For the supplied quantities and conditions, the adaptive selected score is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Selected Score is determined by the displayed parameters.

Definition (Lean source)
select :
shared
p ε :
ℝ
s :
Fin 14
adaptiveSelectedScore select η p ε s :
ℝ
phiTilde η p ε (select) s
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveSelectedScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:22
theorem adaptiveMainMass_nonneg

Under the supplied quantities and conditions, the adaptive main mass nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Main Mass nonneg.

Formal statement
select :
shared
θ η :
p ε :
ℝ
hselect :
hθ :
hη :
hε :
0 < ε
s :
Fin 14
0 ≤ adaptiveMainMass select θ η p ε s
Proof (Lean source)
lemma adaptiveMainMass_nonneg (θ η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : InteriorMeans η) (hε : 0 < ε) (s : Fin 14) : 0 ≤ adaptiveMainMass select θ η p ε s := by exact mul_nonneg (((hselect.1).2 η hη).1.1 s) (patternMass_pos_interior θ p ε hp hθ hε.le s).le
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveMainMass_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:27
theorem staircaseWeightedMass_sum

Under the supplied quantities and conditions, the staircase weighted mass sum assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the staircase Weighted Mass sum.

Formal statement
p ε :
ℝ
hα :
∑ s : Fin 14, α s * patternMass θ p ε s = 1
Proof (Lean source)
lemma staircaseWeightedMass_sum (θ : TrialParameter) (p ε : ℝ) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : ∑ s : Fin 14, α s * patternMass θ p ε s = 1 := by unfold patternMass simp_rw [Finset.mul_sum] calc (∑ s : Fin 14, ∑ j : Fin 4, α s * (piTheta θ p j * patternRay ε s j)) = ∑ j : Fin 4, piTheta θ p j * ∑ s : Fin 14, α s * patternRay ε s j := by rw [Finset.sum_comm] apply Finset.sum_congr rfl intro j _ rw [Finset.mul_sum] apply Finset.sum_congr rfl intro s _ ring _ = ∑ j : Fin 4, piTheta θ p j * 1 := by apply Finset.sum_congr rfl intro j _ have hj := hα.2 j unfold staircaseMatrix at hj rw [hj] _ = 1 := by simp [piTheta_sum_eq_one]
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseWeightedMass_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:38
theorem adaptiveMainMass_sum

Under the supplied quantities and conditions, the adaptive main mass sum assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Main Mass sum.

Formal statement
select :
shared
θ η :
p ε :
ℝ
hselect :
hη :
hε :
0 < ε
∑ s : Fin 14, adaptiveMainMass select θ η p ε s = 1
Proof (Lean source)
lemma adaptiveMainMass_sum (θ η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 < ε) : ∑ s : Fin 14, adaptiveMainMass select θ η p ε s = 1 := by exact staircaseWeightedMass_sum θ p ε _ (((hselect.1).2 η hη).1)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveMainMass_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:66
theorem adaptiveSelectedScore_mean

Under the supplied quantities and conditions, the adaptive selected score mean assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Selected Score mean.

Formal statement
select :
shared
θ η :
p ε :
ℝ
hselect :
hη :
hε :
0 < ε
∑ s : Fin 14, adaptiveMainMass select θ η p ε s * adaptiveSelectedScore select η p ε s
= contrast θ - contrast η
Proof (Lean source)
lemma adaptiveSelectedScore_mean (θ η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 < ε) : ∑ s : Fin 14, adaptiveMainMass select θ η p ε s * adaptiveSelectedScore select η p ε s = contrast θ - contrast η := by exact phiTilde_mean_identity θ η p ε _ hp hη hε (hselect.1)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveSelectedScore_mean · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:76
theorem adaptiveSelectedScore_secondMoment_diag

Under the supplied quantities and conditions, the adaptive selected score second moment diag assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Selected Score second Moment diag.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hη :
hε :
0 < ε
∑ s : Fin 14, adaptiveMainMass select η η p ε s * (adaptiveSelectedScore select η p ε s) ^ 2
= Vstar η p ε
Proof (Lean source)
lemma adaptiveSelectedScore_secondMoment_diag (η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 < ε) : ∑ s : Fin 14, adaptiveMainMass select η η p ε s * (adaptiveSelectedScore select η p ε s) ^ 2 = Vstar η p ε := by exact phiTilde_secondMoment_identity η p ε _ hp hη hε (hselect.1)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveSelectedScore_secondMoment_diag · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:87
def adaptiveScoreVariance

For the supplied quantities and conditions, the adaptive score variance is the mathematical object specified below. The adaptive Score Variance is determined by the displayed parameters.

Definition (Lean source)
select :
shared
θ η :
p ε :
ℝ
adaptiveScoreVariance select θ η p ε :
ℝ
∑ s : Fin 14, adaptiveMainMass select θ η p ε s * (adaptiveSelectedScore select η p ε s) ^ 2
- (contrast θ - contrast η) ^ 2
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveScoreVariance · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:98
def adaptiveScoreMoment

For the supplied quantities and conditions, the adaptive score moment is the mathematical object specified below. The adaptive Score Moment is determined by the displayed parameters.

Definition (Lean source)
select :
shared
r :
ℝ
θ η :
p ε :
ℝ
adaptiveScoreMoment select r θ η p ε :
ℝ
∑ s : Fin 14, adaptiveMainMass select θ η p ε s * |adaptiveSelectedScore select η p ε s| ^ r
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveScoreMoment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:105
theorem adaptiveScoreMoment_nonneg

Under the supplied quantities and conditions, the adaptive score moment nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Score Moment nonneg.

Formal statement
select :
shared
r :
ℝ
θ η :
p ε :
ℝ
hselect :
hθ :
hη :
hε :
0 < ε
0 ≤ adaptiveScoreMoment select r θ η p ε
Proof (Lean source)
lemma adaptiveScoreMoment_nonneg (r : ℝ) (θ η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : InteriorMeans η) (hε : 0 < ε) : 0 ≤ adaptiveScoreMoment select r θ η p ε := by unfold adaptiveScoreMoment exact Finset.sum_nonneg fun s _ => mul_nonneg (adaptiveMainMass_nonneg select θ η p ε hselect hp hθ hη hε s) (Real.rpow_nonneg (abs_nonneg _) _)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveScoreMoment_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:111
theorem adaptiveScoreVariance_eq_centered_sum

Under the supplied quantities and conditions, the adaptive score variance eq centered sum assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Score Variance eq centered sum.

Formal statement
select :
shared
θ η :
p ε :
ℝ
hselect :
hη :
hε :
0 < ε
adaptiveScoreVariance select θ η p ε
= ∑ s : Fin 14, adaptiveMainMass select θ η p ε s * (adaptiveSelectedScore select η p ε s - (contrast θ - contrast η)) ^ 2
Proof (Lean source)
lemma adaptiveScoreVariance_eq_centered_sum (θ η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 < ε) : adaptiveScoreVariance select θ η p ε = ∑ s : Fin 14, adaptiveMainMass select θ η p ε s * (adaptiveSelectedScore select η p ε s - (contrast θ - contrast η)) ^ 2 := by rw [adaptiveScoreVariance] have hm := adaptiveSelectedScore_mean select θ η p ε hselect hp hη hε have hmass := adaptiveMainMass_sum select θ η p ε hselect hp hη hε have hpoint (s : Fin 14) : adaptiveMainMass select θ η p ε s * (adaptiveSelectedScore select η p ε s - (contrast θ - contrast η)) ^ 2 = adaptiveMainMass select θ η p ε s * (adaptiveSelectedScore select η p ε s) ^ 2 - 2 * (contrast θ - contrast η) * (adaptiveMainMass select θ η p ε s * adaptiveSelectedScore select η p ε s) + (contrast θ - contrast η) ^ 2 * adaptiveMainMass select θ η p ε s := by ring simp_rw [hpoint] rw [Finset.sum_add_distrib, Finset.sum_sub_distrib, ← Finset.mul_sum, ← Finset.mul_sum, hm, hmass] ring
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveScoreVariance_eq_centered_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:123
theorem adaptiveScoreVariance_nonneg

Under the supplied quantities and conditions, the adaptive score variance nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Score Variance nonneg.

Formal statement
select :
shared
θ η :
p ε :
ℝ
hselect :
hθ :
hη :
hε :
0 < ε
0 ≤ adaptiveScoreVariance select θ η p ε
Proof (Lean source)
lemma adaptiveScoreVariance_nonneg (θ η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : InteriorMeans η) (hε : 0 < ε) : 0 ≤ adaptiveScoreVariance select θ η p ε := by rw [adaptiveScoreVariance_eq_centered_sum select θ η p ε hselect hp hη hε] exact Finset.sum_nonneg fun s _ => mul_nonneg (adaptiveMainMass_nonneg select θ η p ε hselect hp hθ hη hε s) (sq_nonneg _)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveScoreVariance_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:153
theorem adaptiveScoreVariance_diag

Under the supplied quantities and conditions, the adaptive score variance diag assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Score Variance diag.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hη :
hε :
0 < ε
adaptiveScoreVariance select η η p ε = Vstar η p ε
Proof (Lean source)
lemma adaptiveScoreVariance_diag (η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 < ε) : adaptiveScoreVariance select η η p ε = Vstar η p ε := by rw [adaptiveScoreVariance, adaptiveSelectedScore_secondMoment_diag select η p ε hselect hp hη hε] simp
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveScoreVariance_diag · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:164
theorem adaptiveSelectedScore_abs_le

Under the supplied quantities and conditions, the adaptive selected score abs le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Selected Score abs le.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hη :
hε :
0 < ε
s :
Fin 14
|adaptiveSelectedScore select η p ε s| ≤ pilotPhiUpper p ε
Proof (Lean source)
lemma adaptiveSelectedScore_abs_le (η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 < ε) (s : Fin 14) : |adaptiveSelectedScore select η p ε s| ≤ pilotPhiUpper p ε := strongSelector_phiTilde_bound select p ε hselect hp hε η hη s
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveSelectedScore_abs_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:174
theorem adaptiveSelectedScore_secondMoment_le

Under the supplied quantities and conditions, the adaptive selected score second moment le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Selected Score second Moment le.

Formal statement
select :
shared
θ η :
p ε :
ℝ
hselect :
hθ :
hη :
hε :
0 < ε
∑ s : Fin 14, adaptiveMainMass select θ η p ε s * (adaptiveSelectedScore select η p ε s) ^ 2
≤ (pilotPhiUpper p ε) ^ 2
Proof (Lean source)
lemma adaptiveSelectedScore_secondMoment_le (θ η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : InteriorMeans η) (hε : 0 < ε) : ∑ s : Fin 14, adaptiveMainMass select θ η p ε s * (adaptiveSelectedScore select η p ε s) ^ 2 ≤ (pilotPhiUpper p ε) ^ 2 := by calc _ ≤ ∑ s : Fin 14, adaptiveMainMass select θ η p ε s * (pilotPhiUpper p ε) ^ 2 := by apply Finset.sum_le_sum intro s _ have hab := adaptiveSelectedScore_abs_le select η p ε hselect hp hη hε s have hB : 0 ≤ pilotPhiUpper p ε := (abs_nonneg _).trans hab apply mul_le_mul_of_nonneg_left · simpa [sq_abs] using (sq_le_sq₀ (abs_nonneg _) hB).2 hab · exact adaptiveMainMass_nonneg select θ η p ε hselect hp hθ hη hε s _ = _ := by rw [← Finset.sum_mul, adaptiveMainMass_sum select θ η p ε hselect hp hη hε, one_mul]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveSelectedScore_secondMoment_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:184
theorem adaptiveSelectedScore_absMoment_le

Under the supplied quantities and conditions, the adaptive selected score abs moment le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Selected Score abs Moment le.

Formal statement
select :
shared
θ η :
p ε r :
ℝ
hselect :
hθ :
hη :
hε :
0 < ε
hr :
0 < r
∑ s : Fin 14, adaptiveMainMass select θ η p ε s * |adaptiveSelectedScore select η p ε s| ^ r
≤ (pilotPhiUpper p ε) ^ r
Proof (Lean source)
lemma adaptiveSelectedScore_absMoment_le (θ η : TrialParameter) (p ε r : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : InteriorMeans η) (hε : 0 < ε) (hr : 0 < r) : ∑ s : Fin 14, adaptiveMainMass select θ η p ε s * |adaptiveSelectedScore select η p ε s| ^ r ≤ (pilotPhiUpper p ε) ^ r := by calc _ ≤ ∑ s : Fin 14, adaptiveMainMass select θ η p ε s * (pilotPhiUpper p ε) ^ r := by apply Finset.sum_le_sum intro s _ apply mul_le_mul_of_nonneg_left · exact Real.rpow_le_rpow (abs_nonneg _) (adaptiveSelectedScore_abs_le select η p ε hselect hp hη hε s) hr.le · exact adaptiveMainMass_nonneg select θ η p ε hselect hp hθ hη hε s _ = _ := by rw [← Finset.sum_mul, adaptiveMainMass_sum select θ η p ε hselect hp hη hε, one_mul]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveSelectedScore_absMoment_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:206
theorem adaptiveScoreMoment_le

Under the supplied quantities and conditions, the adaptive score moment le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Score Moment le.

Formal statement
select :
shared
θ η :
p ε r :
ℝ
hselect :
hθ :
hη :
hε :
0 < ε
hr :
0 < r
adaptiveScoreMoment select r θ η p ε ≤ (pilotPhiUpper p ε) ^ r
Proof (Lean source)
lemma adaptiveScoreMoment_le (θ η : TrialParameter) (p ε r : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : InteriorMeans η) (hε : 0 < ε) (hr : 0 < r) : adaptiveScoreMoment select r θ η p ε ≤ (pilotPhiUpper p ε) ^ r := by exact adaptiveSelectedScore_absMoment_le select θ η p ε r hselect hp hθ hη hε hr
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveScoreMoment_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:228
theorem adaptiveScoreVariance_le

Under the supplied quantities and conditions, the adaptive score variance le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Score Variance le.

Formal statement
select :
shared
θ η :
p ε :
ℝ
hselect :
hθ :
hη :
hε :
0 < ε
adaptiveScoreVariance select θ η p ε ≤ (pilotPhiUpper p ε) ^ 2
Proof (Lean source)
lemma adaptiveScoreVariance_le (θ η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : InteriorMeans η) (hε : 0 < ε) : adaptiveScoreVariance select θ η p ε ≤ (pilotPhiUpper p ε) ^ 2 := by unfold adaptiveScoreVariance nlinarith [adaptiveSelectedScore_secondMoment_le select θ η p ε hselect hp hθ hη hε, sq_nonneg (contrast θ - contrast η)]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveScoreVariance_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:238
theorem adaptiveRareEventIntegrand_bounds

Under the supplied quantities and conditions, the adaptive rare event integrand bounds assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Rare Event Integrand bounds.

Formal statement
select :
shared
θ η :
p ε r :
ℝ
hselect :
hθ :
hη :
hε :
0 < ε
hr :
0 < r
conclusion 1
1 ≤ 1 + adaptiveScoreVariance select θ η p ε + adaptiveScoreMoment select r θ η p ε
conclusion 2
1 + adaptiveScoreVariance select θ η p ε + adaptiveScoreMoment select r θ η p ε
≤ 1 + (pilotPhiUpper p ε) ^ 2 + (pilotPhiUpper p ε) ^ r
Proof (Lean source)
lemma adaptiveRareEventIntegrand_bounds (θ η : TrialParameter) (p ε r : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : InteriorMeans η) (hε : 0 < ε) (hr : 0 < r) : 1 ≤ 1 + adaptiveScoreVariance select θ η p ε + adaptiveScoreMoment select r θ η p ε ∧ 1 + adaptiveScoreVariance select θ η p ε + adaptiveScoreMoment select r θ η p ε ≤ 1 + (pilotPhiUpper p ε) ^ 2 + (pilotPhiUpper p ε) ^ r := by constructor · nlinarith [adaptiveScoreVariance_nonneg select θ η p ε hselect hp hθ hη hε, adaptiveScoreMoment_nonneg select r θ η p ε hselect hp hθ hη hε] · linarith [adaptiveScoreVariance_le select θ η p ε hselect hp hθ hη hε, adaptiveScoreMoment_le select θ η p ε r hselect hp hθ hη hε hr]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveRareEventIntegrand_bounds · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveInputs.lean:250
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotAdaptiveLaw 15 declarations Exact finite-law bridges for the adaptive pilot protocol

Exact finite-law bridges for the adaptive pilot protocol

theorem fin_prod_split

Under the supplied quantities and conditions, the fin prod split assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
M :
Type*
m n :
ℕ
hmn :
m ≤ n
f :
Fin m → M
g :
Fin (n - m) → M
(∏ i : Fin n, if hi : i.val < m then f ⟨i.val, hi⟩ else g ⟨i.val - m, by omega⟩)
= (∏ j : Fin m, f j) * ∏ j : Fin (n - m), g j
Proof (Lean source)
lemma fin_prod_split {M : Type*} [CommMonoid M] {m n : ℕ} (hmn : m ≤ n) (f : Fin m → M) (g : Fin (n - m) → M) : (∏ i : Fin n, if hi : i.val < m then f ⟨i.val, hi⟩ else g ⟨i.val - m, by omega⟩) = (∏ j : Fin m, f j) * ∏ j : Fin (n - m), g j := by let e : Fin (m + (n - m)) ≃ Fin n := Fin.castOrderIso (Nat.add_sub_of_le hmn) rw [← e.prod_comp] rw [Fin.prod_univ_add] congr 1 · apply Finset.prod_congr rfl intro j _ simp [e] · apply Finset.prod_congr rfl intro j _ simp [e]
def pilotAdaptiveEncode

For the supplied quantities and conditions, the pilot adaptive encode is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
m n :
ℕ
hmn :
m ≤ n
u :
Fin m → Fin 4
v :
Fin (n - m) → Fin 14
pilotAdaptiveEncode hmn u v :
Transcript (pilotOutputFamily n)
fun i
=> if hi : i.val < m then inl (u ⟨i.val, hi⟩) else inr (v ⟨i.val - m, by omega⟩)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotAdaptiveEncode · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:34
theorem pilotAdaptiveEncode_pilot

Under the supplied quantities and conditions, the pilot adaptive encode pilot assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m n :
ℕ
hmn :
m ≤ n
u :
Fin m → Fin 4
v :
Fin (n - m) → Fin 14
j :
Fin m
pilotAdaptiveEncode hmn u v (castLE hmn j) = inl (u j)
Proof (Lean source)
lemma pilotAdaptiveEncode_pilot {m n : ℕ} (hmn : m ≤ n) (u : Fin m → Fin 4) (v : Fin (n - m) → Fin 14) (j : Fin m) : pilotAdaptiveEncode hmn u v (castLE hmn j) = inl (u j) := by simp [pilotAdaptiveEncode]
CausalSmith.Stat.LdpAteEfficiencySurface.pilotAdaptiveEncode_pilot · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:43
theorem pilotAdaptiveEncode_main

Under the supplied quantities and conditions, the pilot adaptive encode main assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m n :
ℕ
hmn :
m ≤ n
u :
Fin m → Fin 4
v :
Fin (n - m) → Fin 14
j :
Fin (n - m)
pilotAdaptiveEncode hmn u v ⟨m + j.val, by omega⟩ = inr (v j)
Proof (Lean source)
lemma pilotAdaptiveEncode_main {m n : ℕ} (hmn : m ≤ n) (u : Fin m → Fin 4) (v : Fin (n - m) → Fin 14) (j : Fin (n - m)) : pilotAdaptiveEncode hmn u v ⟨m + j.val, by omega⟩ = inr (v j) := by simp [pilotAdaptiveEncode]
CausalSmith.Stat.LdpAteEfficiencySurface.pilotAdaptiveEncode_main · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:49
def pilotAdaptivePrefixTheta

For the supplied quantities and conditions, the pilot adaptive prefix theta is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The pilot Adaptive Prefix Theta is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
mseq :
ℕ → ℕ
n :
ℕ
hmn :
mseq n ≤ n
u :
Fin (mseq n) → Fin 4
pilotAdaptivePrefixTheta p ε mseq hmn u :
pilotTheta p ε mseq (pilotAdaptiveEncode hmn u (fun _ => 0))
CausalSmith.Stat.LdpAteEfficiencySurface.pilotAdaptivePrefixTheta · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:56
theorem pilotTheta_pilotAdaptiveEncode

Under the supplied quantities and conditions, the pilot theta pilot adaptive encode assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
mseq :
ℕ → ℕ
n :
ℕ
hmn :
mseq n ≤ n
u :
Fin (mseq n) → Fin 4
v :
Fin (n - mseq n) → Fin 14
pilotTheta p ε mseq (pilotAdaptiveEncode hmn u v)
= pilotAdaptivePrefixTheta p ε mseq hmn u
Proof (Lean source)
lemma pilotTheta_pilotAdaptiveEncode (p ε : ℝ) (mseq : ℕ → ℕ) {n : ℕ} (hmn : mseq n ≤ n) (u : Fin (mseq n) → Fin 4) (v : Fin (n - mseq n) → Fin 14) : pilotTheta p ε mseq (pilotAdaptiveEncode hmn u v) = pilotAdaptivePrefixTheta p ε mseq hmn u := by have hfreq (k : Fin 4) : pilotFrequency mseq (pilotAdaptiveEncode hmn u v) k = pilotFrequency mseq (pilotAdaptiveEncode hmn u (fun _ => 0)) k := by unfold pilotFrequency congr 1 apply Finset.sum_congr rfl intro i _ by_cases hi : i.val < mseq n <;> simp [pilotAdaptiveEncode, hi] funext a simp only [pilotTheta, pilotAdaptivePrefixTheta] rw [hfreq 1, hfreq 3]
CausalSmith.Stat.LdpAteEfficiencySurface.pilotTheta_pilotAdaptiveEncode · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:61
theorem finiteSequenceTranscript_singleton_apply

the finite sequence transcript singleton apply assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
hQ :
∀ i, IsMarkovKernel (Q i)
x :
Fin n → Fin 4
t :
Transcript Z
finiteSequenceTranscript Q x {t} = ∏ i : Fin n, Q i (x i, fun j => t j.1) {t i}
Proof (Lean source)
lemma finiteSequenceTranscript_singleton_apply {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] [∀ i, MeasurableSingletonClass (Z i)] (Q : SequentialKernel (Z := Z)) (hQ : ∀ i, IsMarkovKernel (Q i)) (x : Fin n → Fin 4) (t : Transcript Z) : finiteSequenceTranscript Q x {t} = ∏ i : Fin n, Q i (x i, fun j => t j.1) {t i} := by have hQa : ∀ i, IsMarkovKernel (finiteSequenceKernel Q i) := by intro i letI : IsMarkovKernel (Q i) := hQ i dsimp [finiteSequenceKernel] infer_instance unfold finiteSequenceTranscript rw [Measure.map_apply measurable_fsTranscriptToTranscript (measurableSet_singleton t)] have hpre : fsTranscriptToTranscript ⁻¹' ({t} : Set (Transcript Z)) = {transcriptToFSTranscript t} := by ext y simp only [Set.mem_preimage, Set.mem_singleton_iff] constructor · intro hy funext i exact congrFun hy i · intro hy subst y rfl rw [hpre, transcriptLaw_singleton (finiteSequenceKernel Q) hQa] apply Finset.prod_congr rfl intro i _ rfl
CausalSmith.Stat.LdpAteEfficiencySurface.finiteSequenceTranscript_singleton_apply · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:79
theorem pilotHistoryFrequency_restrict_eq

Under the supplied quantities and conditions, the pilot history frequency restrict eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
n :
ℕ
i :
Fin n
hi :
m n ≤ i.val
z :
Transcript (pilotOutputFamily n)
k :
Fin 4
pilotHistoryFrequency m i (fun j => z j.1) k = pilotFrequency m z k
Proof (Lean source)
lemma pilotHistoryFrequency_restrict_eq (m : ℕ → ℕ) {n : ℕ} (i : Fin n) (hi : m n ≤ i.val) (z : Transcript (pilotOutputFamily n)) (k : Fin 4) : pilotHistoryFrequency m i (fun j => z j.1) k = pilotFrequency m z k := by have hmn : m n ≤ n := hi.trans (le_of_lt i.isLt) unfold pilotHistoryFrequency pilotFrequency congr 1 have hleft : (∑ j : {j : Fin n // j < i}, if j.1.val < m n ∧ z j.1 = inl k then (1 : ℝ) else 0) = ∑ a : Fin (m n), if z (castLE hmn a) = inl k then (1 : ℝ) else 0 := by have hfilter : (∑ j : {j : Fin n // j < i}, if j.1.val < m n ∧ z j.1 = inl k then (1 : ℝ) else 0) = ∑ j ∈ (Finset.univ.filter fun j : {j : Fin n // j < i} => j.1.val < m n), if z j.1 = inl k then (1 : ℝ) else 0 := by rw [Finset.sum_filter] apply Finset.sum_congr rfl intro j _ by_cases hj : j.1.val < m n <;> simp [hj] rw [hfilter] symm apply Finset.sum_bij (fun a _ => ⟨Fin.castLE hmn a, by change a.val < i.val exact lt_of_lt_of_le a.isLt hi⟩) · intro a _ simp · intro a _ b _ hab exact Fin.ext (congrArg (fun x => x.1.val) hab) · intro j hj have hjlt : j.1.val < m n := (Finset.mem_filter.mp hj).2 let a : Fin (m n) := ⟨j.1.val, hjlt⟩ refine ⟨a, Finset.mem_univ _, ?_⟩ apply Subtype.ext exact Fin.ext rfl · intro a _ simp rw [hleft] symm rw [← fin_sum_ite_lt hmn (fun a : Fin (m n) => if z (castLE hmn a) = inl k then (1 : ℝ) else 0)] apply Finset.sum_congr rfl intro j _ by_cases hj : j.val < m n <;> simp [hj]
CausalSmith.Stat.LdpAteEfficiencySurface.pilotHistoryFrequency_restrict_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:110
theorem pilotHistoryTheta_restrict_eq

Under the supplied quantities and conditions, the pilot history theta restrict eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
i :
Fin n
hi :
m n ≤ i.val
z :
Transcript (pilotOutputFamily n)
pilotHistoryTheta p ε m i (fun j => z j.1) = pilotTheta p ε m z
Proof (Lean source)
lemma pilotHistoryTheta_restrict_eq (p ε : ℝ) (m : ℕ → ℕ) {n : ℕ} (i : Fin n) (hi : m n ≤ i.val) (z : Transcript (pilotOutputFamily n)) : pilotHistoryTheta p ε m i (fun j => z j.1) = pilotTheta p ε m z := by funext a simp only [pilotHistoryTheta, pilotTheta] rw [pilotHistoryFrequency_restrict_eq m i hi z 1, pilotHistoryFrequency_restrict_eq m i hi z 3]
CausalSmith.Stat.LdpAteEfficiencySurface.pilotHistoryTheta_restrict_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:158
theorem pilotProtocol_main_singleton

Under the supplied quantities and conditions, the pilot protocol main singleton assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Protocol main singleton.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
i :
Fin n
hi :
m n ≤ i.val
x :
Fin 4
z :
Transcript (pilotOutputFamily n)
s :
Fin 14
pilotProtocol p ε m (select) n i (x, fun j => z j.1) {inr s}
= ofReal ((select (pilotTheta p ε m z)).1 s * patternRay ε s x)
Proof (Lean source)
lemma pilotProtocol_main_singleton (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) {n : ℕ} (i : Fin n) (hi : m n ≤ i.val) (x : Fin 4) (z : Transcript (pilotOutputFamily n)) (s : Fin 14) : pilotProtocol p ε m (select) n i (x, fun j => z j.1) {Sum.inr s} = ofReal ((select (pilotTheta p ε m z)).1 s * patternRay ε s x) := by simp only [pilotProtocol] change (if i.val < m n then ((rrPilotKernel ε x).map inl) else ((staircaseChannel ε (select (pilotHistoryTheta p ε m i (fun j => z j.1))).1 x).map Sum.inr)) {Sum.inr s} = _ rw [if_neg (not_lt_of_ge hi), pilotHistoryTheta_restrict_eq p ε m i hi z] rw [Measure.map_apply (by fun_prop) (measurableSet_singleton _)] have hpre : (Sum.inr : Fin 14 → PilotOutput) ⁻¹' ({Sum.inr s} : Set PilotOutput) = ({s} : Set (Fin 14)) := by ext y simp rw [hpre] change (Measure.count.withDensity (fun u : Fin 14 => ofReal ((select (pilotTheta p ε m z)).1 u * patternRay ε u x))) {s} = _ rw [withDensity_apply _ (measurableSet_singleton s)] simp
CausalSmith.Stat.LdpAteEfficiencySurface.pilotProtocol_main_singleton · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:168
theorem pilotProtocol_main_output_singleton

Under the supplied quantities and conditions, the pilot protocol main output singleton assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Protocol main output singleton.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
n :
ℕ
i :
Fin n
hi :
m n ≤ i.val
z :
Transcript (pilotOutputFamily n)
s :
Fin 14
∑ x : Fin 4, ofReal (piTheta θ p x) * pilotProtocol p ε m (select) n i (x, fun j => z j.1) {inr s}
= ofReal (adaptiveMainMass select θ (pilotTheta p ε m z) p ε s)
Proof (Lean source)
lemma pilotProtocol_main_output_singleton (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) {n : ℕ} (i : Fin n) (hi : m n ≤ i.val) (z : Transcript (pilotOutputFamily n)) (s : Fin 14) : ∑ x : Fin 4, ofReal (piTheta θ p x) * pilotProtocol p ε m (select) n i (x, fun j => z j.1) {inr s} = ofReal (adaptiveMainMass select θ (pilotTheta p ε m z) p ε s) := by let α := (select (pilotTheta p ε m z)).1 have hη : InteriorMeans (pilotTheta p ε m z) := by rw [← pilotHistoryTheta_restrict_eq p ε m i hi z] exact pilotHistoryTheta_interior p ε m i (fun j => z j.1) have hα : staircaseFeasible ε α := ((hselect.1).2 _ hη).1 simp_rw [pilotProtocol_main_singleton select p ε m hselect hp hε i hi _ z s] have hpi (x : Fin 4) : 0 ≤ piTheta θ p x := (piTheta_pos_interior θ p hp hθ x).le simp_rw [← ENNReal.ofReal_mul (hpi _)] rw [← ENNReal.ofReal_sum_of_nonneg] · congr 1 simp only [adaptiveMainMass, patternMass] rw [Finset.mul_sum] apply Finset.sum_congr rfl intro x _ ring · intro x _ exact mul_nonneg (hpi x) (mul_nonneg (hα.1 s) (by unfold patternRay privacyIncrement privacyRatio cases patternContains s x <;> simp <;> positivity))
CausalSmith.Stat.LdpAteEfficiencySurface.pilotProtocol_main_output_singleton · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:202
theorem pilotProtocol_pilot_output_singleton

Under the supplied quantities and conditions, the pilot protocol pilot output singleton assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Protocol pilot output singleton.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
n :
ℕ
i :
Fin n
hi :
i.val < m n
k :
Fin 4
∑ x : Fin 4, ofReal (piTheta θ p x) * pilotProtocol p ε m (select) n i (x, h) {inl k}
= ofReal (∑ x : Fin 4, piTheta θ p x * rrPilotProbability ε x k)
Proof (Lean source)
lemma pilotProtocol_pilot_output_singleton (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) {n : ℕ} (i : Fin n) (hi : i.val < m n) (h : PrivateHistory (Z := pilotOutputFamily n) i) (k : Fin 4) : ∑ x : Fin 4, ofReal (piTheta θ p x) * pilotProtocol p ε m (select) n i (x, h) {Sum.inl k} = ofReal (∑ x : Fin 4, piTheta θ p x * rrPilotProbability ε x k) := by have hstage (x : Fin 4) : pilotProtocol p ε m (select) n i (x, h) {Sum.inl k} = ofReal (rrPilotProbability ε x k) := by simp only [pilotProtocol] change (if i.val < m n then ((rrPilotKernel ε x).map Sum.inl) else _) {Sum.inl k} = _ rw [if_pos hi, Measure.map_apply (by fun_prop) (measurableSet_singleton _)] have hpre : (Sum.inl : Fin 4 → PilotOutput) ⁻¹' ({Sum.inl k} : Set PilotOutput) = {k} := by ext y simp rw [hpre, rrPilotKernel_singleton] simp_rw [hstage] have hpi (x : Fin 4) : 0 ≤ piTheta θ p x := (piTheta_pos_interior θ p hp hθ x).le simp_rw [← ENNReal.ofReal_mul (hpi _)] rw [ENNReal.ofReal_sum_of_nonneg] intro x _ exact mul_nonneg (hpi x) (by unfold rrPilotProbability split_ifs <;> positivity)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotProtocol_pilot_output_singleton · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:239
theorem pilotAdaptive_joint_singleton

Under the supplied quantities and conditions, the pilot adaptive joint singleton assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Adaptive joint singleton.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
u :
Fin (m n) → Fin 4
v :
Fin (n - m n) → Fin 14
transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n {pilotAdaptiveEncode hmn u v}
= (∏ j : Fin (m n), ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j))) * ∏ j : Fin (n - m n), ofReal (adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))
Proof (Lean source)
lemma pilotAdaptive_joint_singleton (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n {pilotAdaptiveEncode hmn u v} = (∏ j : Fin (m n), ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j))) * ∏ j : Fin (n - m n), ofReal (adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) := by let t := pilotAdaptiveEncode hmn u v let Q := pilotProtocol p ε m (select) n let F : (i : Fin n) → Fin 4 → ℝ≥0∞ := fun i a => ofReal (piTheta θ p a) * Q i (a, fun j => t j.1) {t i} have hQ : ∀ i, IsMarkovKernel (Q i) := by intro i exact (pilotProtocol_private p ε m select hselect hp hε n).1 i have hpi (a : Fin 4) : 0 ≤ piTheta θ p a := (piTheta_pos_interior θ p hp hθ a).le have hpath (x : Fin n → Fin 4) : ofReal (inputPathProbability θ p x) = ∏ i : Fin n, ofReal (piTheta θ p (x i)) := by change ofReal (∏ i : Fin n, piTheta θ p (x i)) = _ rw [ENNReal.ofReal_prod_of_nonneg] intro i _ exact hpi (x i) have hstage (i : Fin n) : (∑ a : Fin 4, F i a) = if hi : i.val < m n then ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u ⟨i.val, hi⟩)) else ofReal (adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v ⟨i.val - m n, by omega⟩)) := by by_cases hi : i.val < m n · rw [dif_pos hi] have ht : t i = inl (u ⟨i.val, hi⟩) := by simp [t, pilotAdaptiveEncode, hi] simp only [F, Q] rw [ht] exact pilotProtocol_pilot_output_singleton select θ p ε m hselect hp hθ hε i hi (fun j => t j.1) (u ⟨i.val, hi⟩) · rw [dif_neg hi] have himain : m n ≤ i.val := Nat.le_of_not_gt hi have ht : t i = inr (v ⟨i.val - m n, by omega⟩) := by simp [t, pilotAdaptiveEncode, hi] simp only [F, Q] rw [ht] rw [pilotProtocol_main_output_singleton select θ p ε m hselect hp hθ hε i himain t] rw [pilotTheta_pilotAdaptiveEncode p ε m hmn u v] unfold transcriptLaw simp only [Measure.coe_finsetSum, Finset.sum_apply, Measure.smul_apply, smul_eq_mul] change (∑ x : Fin n → Fin 4, ofReal (inputPathProbability θ p x) * finiteSequenceTranscript Q x {t}) = _ simp_rw [finiteSequenceTranscript_singleton_apply Q hQ] calc (∑ x : Fin n → Fin 4, ofReal (inputPathProbability θ p x) * ∏ i : Fin n, Q i (x i, fun j => t j.1) {t i}) = ∑ x : Fin n → Fin 4, ∏ i : Fin n, F i (x i) := by apply Finset.sum_congr rfl intro x _ rw [hpath x, ← Finset.prod_mul_distrib] _ = ∏ i : Fin n, ∑ a : Fin 4, F i a := (Fintype.prod_sum F).symm _ = ∏ i : Fin n, if hi : i.val < m n then ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u ⟨i.val, hi⟩)) else ofReal (adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v ⟨i.val - m n, by omega⟩)) := by apply Finset.prod_congr rfl intro i _ exact hstage i _ = _ := by simpa using fin_prod_split hmn (fun j : Fin (m n) => ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j))) (fun j : Fin (n - m n) => ofReal (adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)))
CausalSmith.Stat.LdpAteEfficiencySurface.pilotAdaptive_joint_singleton · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:275
theorem pilotProtocol_main_wrongTag

Under the supplied quantities and conditions, the pilot protocol main wrong tag assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Protocol main wrong Tag.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
i :
Fin n
hi :
m n ≤ i.val
x :
Fin 4
k :
Fin 4
pilotProtocol p ε m (select) n i (x, h) {inl k} = 0
Proof (Lean source)
lemma pilotProtocol_main_wrongTag (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) {n : ℕ} (i : Fin n) (hi : m n ≤ i.val) (x : Fin 4) (h : PrivateHistory (Z := pilotOutputFamily n) i) (k : Fin 4) : pilotProtocol p ε m (select) n i (x, h) {inl k} = 0 := by simp only [pilotProtocol] change (if i.val < m n then ((rrPilotKernel ε x).map inl) else ((staircaseChannel ε (select (pilotHistoryTheta p ε m i h)).1 x).map Sum.inr)) {inl k} = 0 rw [if_neg (not_lt_of_ge hi), Measure.map_apply (by fun_prop) (measurableSet_singleton _)] have hpre : (Sum.inr : Fin 14 → PilotOutput) ⁻¹' ({inl k} : Set PilotOutput) = ∅ := by ext y simp rw [hpre] simp
CausalSmith.Stat.LdpAteEfficiencySurface.pilotProtocol_main_wrongTag · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:370
theorem pilotProtocol_pilot_wrongTag

Under the supplied quantities and conditions, the pilot protocol pilot wrong tag assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Protocol pilot wrong Tag.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
i :
Fin n
hi :
i.val < m n
x :
Fin 4
s :
Fin 14
pilotProtocol p ε m (select) n i (x, h) {inr s} = 0
Proof (Lean source)
lemma pilotProtocol_pilot_wrongTag (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) {n : ℕ} (i : Fin n) (hi : i.val < m n) (x : Fin 4) (h : PrivateHistory (Z := pilotOutputFamily n) i) (s : Fin 14) : pilotProtocol p ε m (select) n i (x, h) {inr s} = 0 := by simp only [pilotProtocol] change (if i.val < m n then ((rrPilotKernel ε x).map Sum.inl) else _) {inr s} = 0 rw [if_pos hi, Measure.map_apply (by fun_prop) (measurableSet_singleton _)] have hpre : (Sum.inl : Fin 4 → PilotOutput) ⁻¹' ({inr s} : Set PilotOutput) = ∅ := by ext y simp rw [hpre] simp
CausalSmith.Stat.LdpAteEfficiencySurface.pilotProtocol_pilot_wrongTag · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLaw.lean:396
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotAdaptiveLocalization 2 declarations Localization bounds for adaptive pilot inputs

Localization bounds for adaptive pilot inputs

theorem pilotTheta_interior

Under the supplied quantities and conditions, the pilot theta interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
z :
Transcript (pilotOutputFamily n)
Proof (Lean source)
lemma pilotTheta_interior (p ε : ℝ) (m : ℕ → ℕ) {n : ℕ} (z : Transcript (pilotOutputFamily n)) : InteriorMeans (pilotTheta p ε m z) := by have hδ : 0 < ((m n + 2 : ℝ)⁻¹) := by positivity have hhalf : ((m n + 2 : ℝ)⁻¹) ≤ 1 / 2 := by rw [one_div] have hden : (2 : ℝ) ≤ m n + 2 := by exact_mod_cast Nat.le_add_left 2 (m n) simpa [one_div] using one_div_le_one_div_of_le (by norm_num : (0 : ℝ) < 2) hden have h0 := clipInterior_interior ((m n + 2 : ℝ)⁻¹) (((exp ε + 3) * pilotFrequency m z 1 - 1) / (exp ε - 1) / controlProb p) hδ hhalf have h1 := clipInterior_interior ((m n + 2 : ℝ)⁻¹) (((exp ε + 3) * pilotFrequency m z 3 - 1) / (exp ε - 1) / p) hδ hhalf simpa [InteriorMeans, pilotTheta] using intro h0.1 (intro h0.2 (intro h1.1 h1.2))
theorem adaptivePilotRareEvent_integral_le

Under the supplied quantities and conditions, the adaptive pilot rare event integral le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Rare Event integral le.

Formal statement
select :
shared
p ε r q :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hr :
0 < r
hq :
0 < q
n :
ℕ
hmn :
m n ≤ n
hmpos :
0 < m n
hδ0l :
(m n + 2 : ℝ)⁻¹ + r ≤ θ 0
hδ0r :
(m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 0
hδ1l :
(m n + 2 : ℝ)⁻¹ + r ≤ θ 1
hδ1r :
(m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 1
a0 :
r * controlProb p * (exp ε - 1) / (exp ε + 3)
a1 :
r * p * (exp ε - 1) / (exp ε + 3)
μ :
transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n
∫ z in {z | r ≤ |pilotTheta p ε m z 0 - θ 0| ∨ r ≤ |pilotTheta p ε m z 1 - θ 1|}, (1 + adaptiveScoreVariance select θ (pilotTheta p ε m z) p ε + adaptiveScoreMoment select q θ (pilotTheta p ε m z) p ε) ∂μ
≤ (1 + (pilotPhiUpper p ε) ^ 2 + (pilotPhiUpper p ε) ^ q) * (ofReal (1 / ((m n : ℝ) * a0 ^ 2)) + ofReal (1 / ((m n : ℝ) * a1 ^ 2))).toReal
Proof (Lean source)
lemma adaptivePilotRareEvent_integral_le (θ : TrialParameter) (p ε r q : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hr : 0 < r) (hq : 0 < q) {n : ℕ} (hmn : m n ≤ n) (hmpos : 0 < m n) (hδ0l : (m n + 2 : ℝ)⁻¹ + r ≤ θ 0) (hδ0r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 0) (hδ1l : (m n + 2 : ℝ)⁻¹ + r ≤ θ 1) (hδ1r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 1) : let a0 := r * controlProb p * (exp ε - 1) / (exp ε + 3) let a1 := r * p * (exp ε - 1) / (exp ε + 3) let μ := transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n ∫ z in {z | r ≤ |pilotTheta p ε m z 0 - θ 0| ∨ r ≤ |pilotTheta p ε m z 1 - θ 1|}, (1 + adaptiveScoreVariance select θ (pilotTheta p ε m z) p ε + adaptiveScoreMoment select q θ (pilotTheta p ε m z) p ε) ∂μ ≤ (1 + (pilotPhiUpper p ε) ^ 2 + (pilotPhiUpper p ε) ^ q) * (ofReal (1 / ((m n : ℝ) * a0 ^ 2)) + ofReal (1 / ((m n : ℝ) * a1 ^ 2))).toReal := by dsimp only let μ := transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n let A : Set (Transcript (pilotOutputFamily n)) := {z | r ≤ |pilotTheta p ε m z 0 - θ 0| ∨ r ≤ |pilotTheta p ε m z 1 - θ 1|} let C := 1 + (pilotPhiUpper p ε) ^ 2 + (pilotPhiUpper p ε) ^ q let f : Transcript (pilotOutputFamily n) → ℝ := fun z => 1 + adaptiveScoreVariance select θ (pilotTheta p ε m z) p ε + adaptiveScoreMoment select q θ (pilotTheta p ε m z) p ε letI : IsProbabilityMeasure μ := transcriptLaw_isProbability (pilotEstimator p ε m select hselect hp hε) θ p hp hθ n have hfint : IntegrableOn f A μ := Integrable.of_finite have hcint : IntegrableOn (fun _ : Transcript (pilotOutputFamily n) => C) A μ := integrableOn_const have hpoint (z : Transcript (pilotOutputFamily n)) : f z ≤ C := by exact (adaptiveRareEventIntegrand_bounds select θ (pilotTheta p ε m z) p ε q hselect hp hθ (pilotTheta_interior p ε m z) hε hq).2 have hdev : μ A ≤ ofReal (1 / ((m n : ℝ) * (r * controlProb p * (exp ε - 1) / (exp ε + 3)) ^ 2)) + ofReal (1 / ((m n : ℝ) * (r * p * (exp ε - 1) / (exp ε + 3)) ^ 2)) := by simpa [μ, A] using pilotTheta_deviation_le select θ p ε r m hselect hp hθ hε hr hmn hmpos hδ0l hδ0r hδ1l hδ1r have hdevReal : μ.real A ≤ (ofReal (1 / ((m n : ℝ) * (r * controlProb p * (exp ε - 1) / (exp ε + 3)) ^ 2)) + ofReal (1 / ((m n : ℝ) * (r * p * (exp ε - 1) / (exp ε + 3)) ^ 2))).toReal := by rw [measureReal_def] exact ENNReal.toReal_mono (by simp) hdev have hC : 0 ≤ C := by dsimp [C] have hB := pilotPhiUpper_nonneg p ε hp hε positivity change ∫ z in A, f z ∂μ ≤ C * _ calc (∫ z in A, f z ∂μ) ≤ ∫ _z in A, C ∂μ := by apply integral_mono_ae hfint hcint exact Filter.Eventually.of_forall hpoint _ = C * μ.real A := by rw [setIntegral_const] simp only [smul_eq_mul] ring _ ≤ C * _ := mul_le_mul_of_nonneg_left hdevReal hC
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRareEvent_integral_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveLocalization.lean:37
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotAdaptiveModelFields 19 declarations This file packages the finite pilot sample, its selected parameter, and fixed compact interior neighborhoods used by the adaptive asymptotic model.

Routine model fields for adaptive pilot asymptotics

This file packages the finite pilot sample, its selected parameter, and fixed compact interior neighborhoods used by the adaptive asymptotic model. It does not depend on the generic adaptive limit theorem.

def AdaptivePilotSample

For the supplied quantities and conditions, the adaptive pilot sample is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Adaptive Pilot Sample is determined by the displayed parameters.

Definition (Lean source)
m :
ℕ → ℕ
n :
ℕ
AdaptivePilotSample m n :
Type
def adaptivePilotSelector

For the supplied quantities and conditions, the adaptive pilot selector is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Selector is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
adaptivePilotSelector p ε m n u :
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotSelector · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:25
theorem adaptivePilotSelector_interior

Under the supplied quantities and conditions, the adaptive pilot selector interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
Proof (Lean source)
lemma adaptivePilotSelector_interior (p ε : ℝ) (m : ℕ → ℕ) (n : ℕ) (u : AdaptivePilotSample m n) : InteriorMeans (adaptivePilotSelector p ε m n u) := by exact pilotTheta_interior p ε (adaptivePilotSize m) (pilotAdaptiveEncode (adaptivePilotSize_le m n) u (fun _ => 0))
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotSelector_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:32
theorem measurable_adaptivePilotSelector

Under the supplied quantities and conditions, the measurable adaptive pilot selector assertion holds.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
Proof (Lean source)
lemma measurable_adaptivePilotSelector (p ε : ℝ) (m : ℕ → ℕ) (n : ℕ) : Measurable (adaptivePilotSelector p ε m n) := by exact measurable_of_finite _
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_adaptivePilotSelector · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:39
theorem measurable_adaptiveSelectedScore_pair

Under the supplied quantities and conditions, the measurable adaptive selected score pair assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the measurable adaptive Selected Score pair.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hε :
0 < ε
Measurable (fun pair : TrialParameter × Fin 14 => adaptiveSelectedScore select pair.1 p ε pair.2)
Proof (Lean source)
lemma measurable_adaptiveSelectedScore_pair (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) : Measurable (fun pair : TrialParameter × Fin 14 => adaptiveSelectedScore select pair.1 p ε pair.2) := by have hs : Measurable (select) := (hselect.1).1 apply measurable_from_prod_countable_left intro s have ht : Measurable (fun η => (select η).2.1) := measurable_fst.comp (measurable_snd.comp hs) have hJ : Measurable (fun η => (select η).2.2) := measurable_snd.comp (measurable_snd.comp hs) have hg : Measurable (fun η => projectedGradient p ε s (select η).2.1) := by exact measurable_projectedGradient_comp p ε s _ ht have hm : Measurable (fun η => patternMass η p ε s) := measurable_patternMass_arg p ε s unfold adaptiveSelectedScore phiTilde exact hg.div (hJ.mul hm)
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_adaptiveSelectedScore_pair · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:60
theorem measurable_adaptiveMainMass_pair

Under the supplied quantities and conditions, the measurable adaptive main mass pair assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the measurable adaptive Main Mass pair.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hε :
0 < ε
Measurable (fun pair : (TrialParameter × TrialParameter) × Fin 14 => adaptiveMainMass select pair.1.1 pair.1.2 p ε pair.2)
Proof (Lean source)
lemma measurable_adaptiveMainMass_pair (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) : Measurable (fun pair : (TrialParameter × TrialParameter) × Fin 14 => adaptiveMainMass select pair.1.1 pair.1.2 p ε pair.2) := by have hs : Measurable (select) := (hselect.1).1 apply measurable_from_prod_countable_left intro s have hα : Measurable (fun η => (select η).1 s) := measurable_pi_apply s |>.comp (measurable_fst.comp hs) have hm : Measurable (fun θ => patternMass θ p ε s) := measurable_patternMass_arg p ε s unfold adaptiveMainMass exact (hα.comp measurable_snd).mul (hm.comp measurable_fst)
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_adaptiveMainMass_pair · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:85
def adaptiveInteriorMargin

the adaptive interior margin is the mathematical object specified below. The adaptive Interior Margin is determined by the displayed parameters.

Definition (Lean source)
adaptiveInteriorMargin θ :
ℝ
min (min (θ 0) (1 - θ 0)) (min (θ 1) (1 - θ 1))
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveInteriorMargin · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:104
def adaptiveNeighborhood

the adaptive neighborhood is the mathematical object specified below.

Definition (Lean source)
adaptiveNeighborhood :
{η | InteriorMeans η}
def adaptiveCompactValues

the adaptive compact values is the mathematical object specified below. The adaptive Compact Values is determined by the displayed parameters.

Definition (Lean source)
adaptiveCompactValues θ :
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveCompactValues · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:112
theorem adaptiveInteriorMargin_pos

Under the supplied quantities and conditions, the adaptive interior margin pos assertion holds. Under the stated assumptions, the adaptive Interior Margin pos.

Formal statement
Proof (Lean source)
lemma adaptiveInteriorMargin_pos (θ : TrialParameter) (hθ : InteriorMeans θ) : 0 < adaptiveInteriorMargin θ := by simp only [adaptiveInteriorMargin, lt_min_iff] exact ⟨⟨hθ.1, sub_pos.mpr hθ.2.1⟩, ⟨hθ.2.2.1, sub_pos.mpr hθ.2.2.2⟩⟩
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveInteriorMargin_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:116
theorem adaptiveNeighborhood_isOpen

the adaptive neighborhood is open assertion holds.

Formal statement
Proof (Lean source)
lemma adaptiveNeighborhood_isOpen : IsOpen adaptiveNeighborhood := by change IsOpen { η : TrialParameter | 0 < η 0 ∧ η 0 < 1 ∧ 0 < η 1 ∧ η 1 < 1 } have h0l : IsOpen { η : TrialParameter | (0 : ℝ) < η 0 } := isOpen_lt continuous_const (continuous_apply 0) have h0r : IsOpen { η : TrialParameter | η 0 < (1 : ℝ) } := isOpen_lt (continuous_apply 0) continuous_const have h1l : IsOpen { η : TrialParameter | (0 : ℝ) < η 1 } := isOpen_lt continuous_const (continuous_apply 1) have h1r : IsOpen { η : TrialParameter | η 1 < (1 : ℝ) } := isOpen_lt (continuous_apply 1) continuous_const convert ((h0l.inter h0r).inter h1l).inter h1r using 1 <;> ext η <;> simp [and_assoc]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveNeighborhood_isOpen · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:126
theorem adaptiveCompactValues_isCompact

the adaptive compact values is compact assertion holds.

Formal statement
Proof (Lean source)
lemma adaptiveCompactValues_isCompact (θ : TrialParameter) : IsCompact (adaptiveCompactValues θ) := by exact isCompact_closedBall _ _
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveCompactValues_isCompact · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:142
theorem adaptiveCompactValues_mem

Under the supplied quantities and conditions, the adaptive compact values mem assertion holds. Under the stated assumptions, the adaptive Compact Values mem.

Formal statement
Proof (Lean source)
lemma adaptiveCompactValues_mem (θ : TrialParameter) (hθ : InteriorMeans θ) : θ ∈ adaptiveCompactValues θ := by exact Metric.mem_closedBall_self (div_nonneg (adaptiveInteriorMargin_pos θ hθ).le (by norm_num))
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveCompactValues_mem · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:148
theorem adaptiveCompactValues_mem_interior

the adaptive compact values mem interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Compact Values mem interior.

Formal statement
Proof (Lean source)
lemma adaptiveCompactValues_mem_interior (θ : TrialParameter) (hθ : InteriorMeans θ) : θ ∈ interior (adaptiveCompactValues θ) := by rw [mem_interior_iff_mem_nhds] apply mem_of_superset (Metric.ball_mem_nhds θ (half_pos (adaptiveInteriorMargin_pos θ hθ))) exact Metric.ball_subset_closedBall
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveCompactValues_mem_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:157
theorem adaptiveCompactValues_interiorMeans

the adaptive compact values interior means assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Compact Values interior Means.

Formal statement
Proof (Lean source)
lemma adaptiveCompactValues_interiorMeans (θ : TrialParameter) (hθ : InteriorMeans θ) : adaptiveCompactValues θ ⊆ adaptiveNeighborhood := by intro η hη have hmpos := adaptiveInteriorMargin_pos θ hθ have hrnonneg : 0 ≤ adaptiveInteriorMargin θ / 2 := by positivity have hd := (dist_pi_le_iff hrnonneg).mp (Metric.mem_closedBall.mp hη) have hd0 := hd 0 have hd1 := hd 1 rw [Real.dist_eq] at hd0 hd1 have hm0l : adaptiveInteriorMargin θ ≤ θ 0 := by exact (min_le_left _ _).trans (min_le_left _ _) have hm0r : adaptiveInteriorMargin θ ≤ 1 - θ 0 := by exact (min_le_left _ _).trans (min_le_right _ _) have hm1l : adaptiveInteriorMargin θ ≤ θ 1 := by exact (min_le_right _ _).trans (min_le_left _ _) have hm1r : adaptiveInteriorMargin θ ≤ 1 - θ 1 := by exact (min_le_right _ _).trans (min_le_right _ _) change 0 < η 0 ∧ η 0 < 1 ∧ 0 < η 1 ∧ η 1 < 1 have habs0 := abs_le.mp hd0 have habs1 := abs_le.mp hd1 constructor · linarith constructor · linarith constructor <;> linarith
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveCompactValues_interiorMeans · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:168
def adaptiveGoodPilot

For the supplied quantities and conditions, the adaptive good pilot is the mathematical object specified below. The adaptive Good Pilot is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
adaptiveGoodPilot θ p ε m n :
theorem adaptiveGoodPilot_measurable

Under the supplied quantities and conditions, the adaptive good pilot measurable assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
Proof (Lean source)
lemma adaptiveGoodPilot_measurable (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (n : ℕ) : MeasurableSet (adaptiveGoodPilot θ p ε m n) := by change MeasurableSet ((adaptivePilotSelector p ε m n) ⁻¹' closedBall θ (adaptiveInteriorMargin θ / 2)) exact Metric.isClosed_closedBall.measurableSet.preimage (measurable_adaptivePilotSelector p ε m n)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveGoodPilot_measurable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:204
theorem adaptiveGoodPilot_selector_mem

Under the supplied quantities and conditions, the adaptive good pilot selector mem assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
hu :
u ∈ adaptiveGoodPilot θ p ε m n
Proof (Lean source)
lemma adaptiveGoodPilot_selector_mem (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (n : ℕ) {u : AdaptivePilotSample m n} (hu : u ∈ adaptiveGoodPilot θ p ε m n) : adaptivePilotSelector p ε m n u ∈ adaptiveCompactValues θ := by exact hu
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveGoodPilot_selector_mem · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:215
theorem adaptiveScoreMoment_uniform_on_compact

Under the supplied quantities and conditions, the adaptive score moment uniform on compact assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Score Moment uniform on compact.

Formal statement
select :
shared
p ε r :
ℝ
hselect :
hθ :
hε :
0 < ε
hr :
0 < r
∃ C : ℝ,
0 ≤ C
conclusion 1
θ' η :
adaptiveScoreMoment select r θ' η p ε ≤ C
Proof (Lean source)
lemma adaptiveScoreMoment_uniform_on_compact (θ : TrialParameter) (p ε r : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hr : 0 < r) : ∃ C : ℝ, 0 ≤ C ∧ ∀ θ' η, θ' ∈ adaptiveNeighborhood → η ∈ adaptiveCompactValues θ → adaptiveScoreMoment select r θ' η p ε ≤ C := by refine ⟨(pilotPhiUpper p ε) ^ r, Real.rpow_nonneg (pilotPhiUpper_nonneg p ε hp hε) r, ?_⟩ intro θ' η hθ' hη exact adaptiveScoreMoment_le select θ' η p ε r hselect hp hθ' (adaptiveCompactValues_interiorMeans θ hθ hη) hε hr
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveScoreMoment_uniform_on_compact · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveModelFields.lean:223
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotAdaptiveRegularization 20 declarations Finite-row regularization for the adaptive pilot

Finite-row regularization for the adaptive pilot

def adaptivePilotSize

For the supplied quantities and conditions, the adaptive pilot size is the mathematical object specified below.

Definition (Lean source)
m :
ℕ → ℕ
n :
ℕ
adaptivePilotSize m n :
ℕ
min (m n) n
theorem adaptivePilotSize_le

Under the supplied quantities and conditions, the adaptive pilot size le assertion holds.

Formal statement
m :
ℕ → ℕ
n :
ℕ
Proof (Lean source)
lemma adaptivePilotSize_le (m : ℕ → ℕ) (n : ℕ) : adaptivePilotSize m n ≤ n := by exact min_le_right _ _
theorem adaptivePilotSize_eq

Under the supplied quantities and conditions, the adaptive pilot size eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hsub :
n :
ℕ
hn :
2 ≤ n
Proof (Lean source)
lemma adaptivePilotSize_eq (m : ℕ → ℕ) (hsub : PilotSublinear m) {n : ℕ} (hn : 2 ≤ n) : adaptivePilotSize m n = m n := by exact min_eq_left (hsub.2 n hn).2.le
theorem adaptivePilotSize_tendsto_atTop

Under the supplied quantities and conditions, the adaptive pilot size tendsto at top assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hdiv :
hsub :
Proof (Lean source)
lemma adaptivePilotSize_tendsto_atTop (m : ℕ → ℕ) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) : Tendsto (adaptivePilotSize m) atTop atTop := by apply hdiv.congr' filter_upwards [eventually_ge_atTop 2] with n hn exact (adaptivePilotSize_eq m hsub hn).symm
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotSize_tendsto_atTop · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:30
theorem adaptivePilotSize_sublinear

Under the supplied quantities and conditions, the adaptive pilot size sublinear assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hsub :
Tendsto (fun n => (adaptivePilotSize m n : ℝ) / n) atTop (nhds 0)
Proof (Lean source)
lemma adaptivePilotSize_sublinear (m : ℕ → ℕ) (hsub : PilotSublinear m) : Tendsto (fun n => (adaptivePilotSize m n : ℝ) / n) atTop (nhds 0) := by apply hsub.1.congr' filter_upwards [eventually_ge_atTop 2] with n hn rw [adaptivePilotSize_eq m hsub hn]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotSize_sublinear · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:38
def adaptiveTrueParam

For the supplied quantities and conditions, the adaptive true param is the mathematical object specified below. The adaptive True Param is determined by the displayed parameters.

Definition (Lean source)
n :
ℕ
adaptiveTrueParam θ h n :
if InteriorMeans (localAlternative θ h n) then localAlternative θ h n else θ
theorem adaptiveTrueParam_interior

Under the supplied quantities and conditions, the adaptive true param interior assertion holds. Under the stated assumptions, the adaptive True Param interior.

Formal statement
n :
ℕ
hθ :
Proof (Lean source)
lemma adaptiveTrueParam_interior (θ h : TrialParameter) (n : ℕ) (hθ : InteriorMeans θ) : InteriorMeans (adaptiveTrueParam θ h n) := by unfold adaptiveTrueParam split_ifs with hlocal · exact hlocal · exact hθ
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveTrueParam_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:51
theorem adaptiveTrueParam_eq_localAlternative

Under the supplied quantities and conditions, the adaptive true param eq local alternative assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
hlocal :
Proof (Lean source)
lemma adaptiveTrueParam_eq_localAlternative (θ h : TrialParameter) (n : ℕ) (hlocal : InteriorMeans (localAlternative θ h n)) : adaptiveTrueParam θ h n = localAlternative θ h n := by simp [adaptiveTrueParam, hlocal]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveTrueParam_eq_localAlternative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:61
theorem localAlternative_tendsto

Under the supplied quantities and conditions, the local alternative tendsto assertion holds.

Formal statement
Proof (Lean source)
lemma localAlternative_tendsto (θ h : TrialParameter) : Tendsto (localAlternative θ h) atTop (nhds θ) := by have hsqrt : Tendsto (fun n : ℕ => sqrt (n : ℝ)) atTop atTop := Real.tendsto_sqrt_atTop.comp tendsto_natCast_atTop_atTop have hinv : Tendsto (fun n : ℕ => (sqrt (n : ℝ))⁻¹) atTop (nhds 0) := tendsto_inv_atTop_zero.comp hsqrt rw [tendsto_pi_nhds] intro k have hpert : Tendsto (fun n : ℕ => h k * (sqrt (n : ℝ))⁻¹) atTop (nhds 0) := by convert (tendsto_const_nhds.mul hinv : Tendsto (fun n : ℕ => h k * (sqrt (n : ℝ))⁻¹) atTop (nhds (h k * 0))) using 1 <;> simp simpa [localAlternative, div_eq_mul_inv] using tendsto_const_nhds.add hpert
CausalSmith.Stat.LdpAteEfficiencySurface.localAlternative_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:67
theorem eventually_localAlternative_interior

Under the supplied quantities and conditions, the eventually local alternative interior assertion holds. Under the stated assumptions, the eventually local Alternative interior.

Formal statement
hθ :
∀ᶠ n in atTop, InteriorMeans (localAlternative θ h n)
Proof (Lean source)
lemma eventually_localAlternative_interior (θ h : TrialParameter) (hθ : InteriorMeans θ) : ∀ᶠ n in atTop, InteriorMeans (localAlternative θ h n) := by have ht := localAlternative_tendsto θ h have h0 := tendsto_pi_nhds.1 ht 0 have h1 := tendsto_pi_nhds.1 ht 1 filter_upwards [ (tendsto_order.1 h0).1 0 hθ.1, (tendsto_order.1 h0).2 1 hθ.2.1, (tendsto_order.1 h1).1 0 hθ.2.2.1, (tendsto_order.1 h1).2 1 hθ.2.2.2] with n hn0l hn0r hn1l hn1r exact ⟨hn0l, hn0r, hn1l, hn1r⟩
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_localAlternative_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:83
theorem eventually_adaptiveTrueParam_eq

Under the supplied quantities and conditions, the eventually adaptive true param eq assertion holds. Under the stated assumptions, the eventually adaptive True Param eq.

Formal statement
hθ :
∀ᶠ n in atTop, adaptiveTrueParam θ h n = localAlternative θ h n
Proof (Lean source)
lemma eventually_adaptiveTrueParam_eq (θ h : TrialParameter) (hθ : InteriorMeans θ) : ∀ᶠ n in atTop, adaptiveTrueParam θ h n = localAlternative θ h n := by filter_upwards [eventually_localAlternative_interior θ h hθ] with n hn exact adaptiveTrueParam_eq_localAlternative θ h n hn
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_adaptiveTrueParam_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:99
theorem direction_coord_abs_le

the direction coord abs le assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
H :
ℝ
hH :
sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H
k :
Fin 2
|h k| ≤ H
Proof (Lean source)
lemma direction_coord_abs_le {h : TrialParameter} {H : ℝ} (hH : sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H) (k : Fin 2) : |h k| ≤ H := by have hsqrt : 0 ≤ sqrt ((h 0) ^ 2 + (h 1) ^ 2) := Real.sqrt_nonneg _ have hsum : 0 ≤ (h 0) ^ 2 + (h 1) ^ 2 := add_nonneg (sq_nonneg _) (sq_nonneg _) fin_cases k · have hsq : |h 0| ^ 2 ≤ (sqrt ((h 0) ^ 2 + (h 1) ^ 2)) ^ 2 := by rw [sq_abs, Real.sq_sqrt hsum] exact le_add_of_nonneg_right (sq_nonneg _) exact ((sq_le_sq₀ (abs_nonneg _) hsqrt).mp hsq).trans hH · have hsq : |h 1| ^ 2 ≤ (sqrt ((h 0) ^ 2 + (h 1) ^ 2)) ^ 2 := by rw [sq_abs, Real.sq_sqrt hsum] exact le_add_of_nonneg_left (sq_nonneg _) exact ((sq_le_sq₀ (abs_nonneg _) hsqrt).mp hsq).trans hH
theorem eventually_localAlternative_dist_lt_uniform

Under the supplied quantities and conditions, the eventually local alternative dist lt uniform assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the eventually local Alternative dist lt uniform.

Formal statement
H δ :
ℝ
hδ :
0 < δ
∀ᶠ n in atTop, ∀ h : TrialParameter, sqrt ((h 0) ^ 2 + (h 1) ^ 2)
≤ H → dist (localAlternative θ h n) θ < δ
Proof (Lean source)
lemma eventually_localAlternative_dist_lt_uniform (θ : TrialParameter) (H δ : ℝ) (hδ : 0 < δ) : ∀ᶠ n in atTop, ∀ h : TrialParameter, sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H → dist (localAlternative θ h n) θ < δ := by have hsqrt : Tendsto (fun n : ℕ => sqrt (n : ℝ)) atTop atTop := Real.tendsto_sqrt_atTop.comp tendsto_natCast_atTop_atTop have hev := hsqrt.eventually_gt_atTop (max 0 (H / δ)) filter_upwards [hev] with n hn h hH have hsqrtpos : 0 < sqrt (n : ℝ) := lt_of_le_of_lt (le_max_left 0 (H / δ)) hn rw [dist_pi_lt_iff hδ] intro k rw [Real.dist_eq] change |θ k + h k / sqrt (n : ℝ) - θ k| < δ rw [add_sub_cancel_left, abs_div, abs_of_pos hsqrtpos] have hk := direction_coord_abs_le hH k have hratio : H / δ < sqrt (n : ℝ) := lt_of_le_of_lt (le_max_right 0 (H / δ)) hn calc |h k| / sqrt (n : ℝ) ≤ H / sqrt (n : ℝ) := by exact div_le_div_of_nonneg_right hk hsqrtpos.le _ < δ := by apply (div_lt_iff₀ hsqrtpos).2 have hmul := (div_lt_iff₀ hδ).1 hratio nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_localAlternative_dist_lt_uniform · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:124
theorem eventually_localAlternative_interior_uniform

Under the supplied quantities and conditions, the eventually local alternative interior uniform assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the eventually local Alternative interior uniform.

Formal statement
H :
ℝ
hθ :
∀ᶠ n in atTop, ∀ h : TrialParameter, sqrt ((h 0) ^ 2 + (h 1) ^ 2)
≤ H → InteriorMeans (localAlternative θ h n)
Proof (Lean source)
lemma eventually_localAlternative_interior_uniform (θ : TrialParameter) (H : ℝ) (hθ : InteriorMeans θ) : ∀ᶠ n in atTop, ∀ h : TrialParameter, sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H → InteriorMeans (localAlternative θ h n) := by let δ := min (min (θ 0) (1 - θ 0)) (min (θ 1) (1 - θ 1)) have hδ : 0 < δ := by simp only [δ, lt_min_iff] exact ⟨⟨hθ.1, sub_pos.mpr hθ.2.1⟩, ⟨hθ.2.2.1, sub_pos.mpr hθ.2.2.2⟩⟩ filter_upwards [eventually_localAlternative_dist_lt_uniform θ H δ hδ] with n hn intro h hH have hd := (dist_pi_lt_iff hδ).mp (hn h hH) have hd0 := hd 0 have hd1 := hd 1 rw [Real.dist_eq] at hd0 hd1 dsimp [localAlternative] at hd0 hd1 ⊢ have hδ0 : δ ≤ θ 0 ∧ δ ≤ 1 - θ 0 := by dsimp [δ] exact ⟨(min_le_left _ _).trans (min_le_left _ _), (min_le_left _ _).trans (min_le_right _ _)⟩ have hδ1 : δ ≤ θ 1 ∧ δ ≤ 1 - θ 1 := by dsimp [δ] exact ⟨(min_le_right _ _).trans (min_le_left _ _), (min_le_right _ _).trans (min_le_right _ _)⟩ constructor · change 0 < θ 0 + h 0 / sqrt (n : ℝ) linarith [(abs_lt.mp hd0).1] constructor · change θ 0 + h 0 / sqrt (n : ℝ) < 1 linarith [(abs_lt.mp hd0).2] constructor · change 0 < θ 1 + h 1 / sqrt (n : ℝ) linarith [(abs_lt.mp hd1).1] · change θ 1 + h 1 / sqrt (n : ℝ) < 1 linarith [(abs_lt.mp hd1).2]
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_localAlternative_interior_uniform · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:154
theorem eventually_adaptiveTrueParam_eq_uniform

Under the supplied quantities and conditions, the eventually adaptive true param eq uniform assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the eventually adaptive True Param eq uniform.

Formal statement
H :
ℝ
hθ :
∀ᶠ n in atTop, ∀ h : TrialParameter, sqrt ((h 0) ^ 2 + (h 1) ^ 2)
≤ H → adaptiveTrueParam θ h n = localAlternative θ h n
Proof (Lean source)
lemma eventually_adaptiveTrueParam_eq_uniform (θ : TrialParameter) (H : ℝ) (hθ : InteriorMeans θ) : ∀ᶠ n in atTop, ∀ h : TrialParameter, sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H → adaptiveTrueParam θ h n = localAlternative θ h n := by filter_upwards [eventually_localAlternative_interior_uniform θ H hθ] with n hn intro h hH exact adaptiveTrueParam_eq_localAlternative θ h n (hn h hH)
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_adaptiveTrueParam_eq_uniform · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:193
theorem eventually_adaptiveTrueParam_dist_lt_uniform

Under the supplied quantities and conditions, the eventually adaptive true param dist lt uniform assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the eventually adaptive True Param dist lt uniform.

Formal statement
H δ :
ℝ
hθ :
hδ :
0 < δ
∀ᶠ n in atTop, ∀ h : TrialParameter, sqrt ((h 0) ^ 2 + (h 1) ^ 2)
≤ H → dist (adaptiveTrueParam θ h n) θ < δ
Proof (Lean source)
lemma eventually_adaptiveTrueParam_dist_lt_uniform (θ : TrialParameter) (H δ : ℝ) (hθ : InteriorMeans θ) (hδ : 0 < δ) : ∀ᶠ n in atTop, ∀ h : TrialParameter, sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H → dist (adaptiveTrueParam θ h n) θ < δ := by filter_upwards [eventually_adaptiveTrueParam_eq_uniform θ H hθ, eventually_localAlternative_dist_lt_uniform θ H δ hδ] with n heq hdist intro h hH rw [heq h hH] exact hdist h hH
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_adaptiveTrueParam_dist_lt_uniform · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:205
theorem eventually_adaptiveTrueParam_mem_open_uniform

Under the supplied quantities and conditions, the eventually adaptive true param mem open uniform assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the eventually adaptive True Param mem open uniform.

Formal statement
H :
ℝ
hθ :
hNopen :
hθN :
θ ∈ N
∀ᶠ n in atTop, ∀ h : TrialParameter, sqrt ((h 0) ^ 2 + (h 1) ^ 2)
≤ H → adaptiveTrueParam θ h n ∈ N
Proof (Lean source)
lemma eventually_adaptiveTrueParam_mem_open_uniform (θ : TrialParameter) (H : ℝ) (N : Set TrialParameter) (hθ : InteriorMeans θ) (hNopen : IsOpen N) (hθN : θ ∈ N) : ∀ᶠ n in atTop, ∀ h : TrialParameter, sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H → adaptiveTrueParam θ h n ∈ N := by obtain ⟨δ, hδ, hball⟩ := Metric.isOpen_iff.mp hNopen θ hθN filter_upwards [eventually_adaptiveTrueParam_dist_lt_uniform θ H δ hθ hδ] with n hn intro h hH exact hball (by simpa [Metric.mem_ball, dist_comm] using hn h hH)
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_adaptiveTrueParam_mem_open_uniform · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:220
def adaptivePilotPrefixMass

For the supplied quantities and conditions, the adaptive pilot prefix mass is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Prefix Mass is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
u :
adaptivePilotPrefixMass θ h p ε m n u :
ℝ
∏ j : Fin (adaptivePilotSize m n), ∑ a : Fin 4, piTheta (adaptiveTrueParam θ h n) p a * rrPilotProbability ε a (u j)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotPrefixMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:234
theorem adaptivePilotPrefixMass_nonneg

Under the supplied quantities and conditions, the adaptive pilot prefix mass nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Prefix Mass nonneg.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
hθ :
u :
0 ≤ adaptivePilotPrefixMass θ h p ε m n u
Proof (Lean source)
lemma adaptivePilotPrefixMass_nonneg (θ h : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (u : Fin (adaptivePilotSize m n) → Fin 4) : 0 ≤ adaptivePilotPrefixMass θ h p ε m n u := by unfold adaptivePilotPrefixMass apply Finset.prod_nonneg intro j _ apply Finset.sum_nonneg intro a _ exact mul_nonneg (piTheta_pos_interior (adaptiveTrueParam θ h n) p hp (adaptiveTrueParam_interior θ h n hθ) a).le (by unfold rrPilotProbability split_ifs <;> positivity)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotPrefixMass_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:242
theorem adaptivePilotPrefixMass_sum

Under the supplied quantities and conditions, the adaptive pilot prefix mass sum assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
∑ u : Fin (adaptivePilotSize m n) → Fin 4, adaptivePilotPrefixMass θ h p ε m n u = 1
Proof (Lean source)
lemma adaptivePilotPrefixMass_sum (θ h : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (n : ℕ) : ∑ u : Fin (adaptivePilotSize m n) → Fin 4, adaptivePilotPrefixMass θ h p ε m n u = 1 := by unfold adaptivePilotPrefixMass calc (∑ u : Fin (adaptivePilotSize m n) → Fin 4, ∏ j : Fin (adaptivePilotSize m n), ∑ a : Fin 4, piTheta (adaptiveTrueParam θ h n) p a * rrPilotProbability ε a (u j)) = ∏ _j : Fin (adaptivePilotSize m n), ∑ k : Fin 4, ∑ a : Fin 4, piTheta (adaptiveTrueParam θ h n) p a * rrPilotProbability ε a k := (Fintype.prod_sum (fun _j : Fin (adaptivePilotSize m n) => fun k : Fin 4 => ∑ a : Fin 4, piTheta (adaptiveTrueParam θ h n) p a * rrPilotProbability ε a k)).symm _ = 1 := by simp [rrPilot_marginal_sum_eq_one]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotPrefixMass_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveRegularization.lean:262
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotAdaptiveTransfer 6 declarations Finite pilot transfer lemmas for local limits and risks

Finite pilot transfer lemmas for local limits and risks

theorem finitePilot_conditionalCDF_tendsto

the finite pilot conditional cdf tendsto assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
P :
ℕ → Type*
∀ n, Fintype (P n)
w :
(n : ℕ) → P n → ℝ
F :
(n : ℕ) → P n → ℝ
L :
ℝ
hw :
∀ n a, 0 ≤ w n a
hsum :
∀ n, ∑ a, w n a = 1
hF0 :
∀ n a, 0 ≤ F n a
hF1 :
∀ n a, F n a ≤ 1
hL0 :
0 ≤ L
hL1 :
L ≤ 1
hbad :
∀ δ : ℝ
if
0 < δ
then
Tendsto (fun n => ∑ a, w n a * if δ ≤ |F n a - L| then 1 else 0) atTop (𝓝 0)
Tendsto (fun n => ∑ a, w n a * F n a) atTop (𝓝 L)
Proof (Lean source)
lemma finitePilot_conditionalCDF_tendsto {P : ℕ → Type*} [∀ n, Fintype (P n)] (w : (n : ℕ) → P n → ℝ) (F : (n : ℕ) → P n → ℝ) (L : ℝ) (hw : ∀ n a, 0 ≤ w n a) (hsum : ∀ n, ∑ a, w n a = 1) (hF0 : ∀ n a, 0 ≤ F n a) (hF1 : ∀ n a, F n a ≤ 1) (hL0 : 0 ≤ L) (hL1 : L ≤ 1) (hbad : ∀ δ : ℝ, 0 < δ → Tendsto (fun n => ∑ a, w n a * if δ ≤ |F n a - L| then 1 else 0) atTop (𝓝 0)) : Tendsto (fun n => ∑ a, w n a * F n a) atTop (𝓝 L) := by apply finitePilot_average_tendsto_of_badMass w F L hw hsum · intro n a rw [abs_le] exact ⟨by linarith [hF0 n a], hF1 n a⟩ · rw [abs_le] exact ⟨by linarith, hL1⟩ · exact hbad
CausalSmith.Stat.LdpAteEfficiencySurface.finitePilot_conditionalCDF_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveTransfer.lean:14
theorem finitePilot_good_bad_average_error_le

the finite pilot good bad average error le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the finite Pilot good bad average error le.

Formal statement
P :
Type*
w g :
P → ℝ
good :
P → Prop
L δ :
ℝ
hw :
∀ a, 0 ≤ w a
hsum :
∑ a, w a = 1
hL :
0 ≤ L
hδ :
0 ≤ δ
hgood :
∀ a
if
good a
then
|g a - L| ≤ δ
|∑ a, w a * g a - L| ≤ δ + ∑ a, w a * if good a then 0 else |g a - L|
Proof (Lean source)
lemma finitePilot_good_bad_average_error_le {P : Type*} [Fintype P] (w g : P → ℝ) (good : P → Prop) [DecidablePred good] (L δ : ℝ) (hw : ∀ a, 0 ≤ w a) (hsum : ∑ a, w a = 1) (hL : 0 ≤ L) (hδ : 0 ≤ δ) (hgood : ∀ a, good a → |g a - L| ≤ δ) : |∑ a, w a * g a - L| ≤ δ + ∑ a, w a * if good a then 0 else |g a - L| := by have hpoint (a : P) : w a * |g a - L| ≤ w a * (δ + if good a then 0 else |g a - L|) := by apply mul_le_mul_of_nonneg_left _ (hw a) split_ifs with ha · simpa using hgood a ha · linarith [abs_nonneg (g a - L)] calc |∑ a, w a * g a - L| = |∑ a, w a * (g a - L)| := by congr 1 calc ∑ a, w a * g a - L = ∑ a, w a * g a - L * ∑ a, w a := by rw [hsum] ring _ = ∑ a, w a * (g a - L) := by rw [Finset.mul_sum, ← Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro a _ ring _ ≤ ∑ a, |w a * (g a - L)| := Finset.abs_sum_le_sum_abs _ _ _ = ∑ a, w a * |g a - L| := by apply Finset.sum_congr rfl intro a _ rw [abs_mul, abs_of_nonneg (hw a)] _ ≤ ∑ a, w a * (δ + if good a then 0 else |g a - L|) := Finset.sum_le_sum fun a _ => hpoint a _ = δ + ∑ a, w a * if good a then 0 else |g a - L| := by simp_rw [mul_add] rw [Finset.sum_add_distrib, ← Finset.sum_mul, hsum] ring
CausalSmith.Stat.LdpAteEfficiencySurface.finitePilot_good_bad_average_error_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveTransfer.lean:32
theorem finitePilot_good_bad_average_tendsto

the finite pilot good bad average tendsto assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
P :
ℕ → Type*
∀ n, Fintype (P n)
w g :
(n : ℕ) → P n → ℝ
good :
(n : ℕ) → P n → Prop
∀ n, DecidablePred (good n)
L :
ℝ
hw :
∀ n a, 0 ≤ w n a
hsum :
∀ n, ∑ a, w n a = 1
hL :
0 ≤ L
hgood :
∀ δ : ℝ, 0 < δ → ∀ᶠ n in atTop, ∀ a, good n a → |g n a - L| ≤ δ
hbad :
Tendsto (fun n => ∑ a, w n a * if good n a then 0 else |g n a - L|) atTop (𝓝 0)
Tendsto (fun n => ∑ a, w n a * g n a) atTop (𝓝 L)
Proof (Lean source)
lemma finitePilot_good_bad_average_tendsto {P : ℕ → Type*} [∀ n, Fintype (P n)] (w g : (n : ℕ) → P n → ℝ) (good : (n : ℕ) → P n → Prop) [∀ n, DecidablePred (good n)] (L : ℝ) (hw : ∀ n a, 0 ≤ w n a) (hsum : ∀ n, ∑ a, w n a = 1) (hL : 0 ≤ L) (hgood : ∀ δ : ℝ, 0 < δ → ∀ᶠ n in atTop, ∀ a, good n a → |g n a - L| ≤ δ) (hbad : Tendsto (fun n => ∑ a, w n a * if good n a then 0 else |g n a - L|) atTop (𝓝 0)) : Tendsto (fun n => ∑ a, w n a * g n a) atTop (𝓝 L) := by rw [Metric.tendsto_atTop] intro η hη have hgoodη := hgood (η / 2) (half_pos hη) have hbadη : ∀ᶠ n in atTop, (∑ a, w n a * if good n a then 0 else |g n a - L|) < η / 2 := (tendsto_order.1 hbad).2 _ (half_pos hη) have hevent := hgoodη.and hbadη rcases (eventually_atTop.1 hevent) with ⟨N, hN⟩ exact ⟨N, fun n hn => by rw [Real.dist_eq] have hpair := hN n hn have hbound := finitePilot_good_bad_average_error_le (w n) (g n) (good n) L (η / 2) (hw n) (hsum n) hL (by positivity) hpair.1 exact lt_of_le_of_lt hbound (by linarith [hpair.2])⟩
CausalSmith.Stat.LdpAteEfficiencySurface.finitePilot_good_bad_average_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveTransfer.lean:74
theorem adaptive_mainScale_tendsto_one

Under the supplied quantities and conditions, the adaptive main scale tendsto one assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hsub :
Tendsto (fun n : ℕ => (n : ℝ) / (adaptiveMainSize m n : ℝ)) atTop (𝓝 1)
Proof (Lean source)
lemma adaptive_mainScale_tendsto_one (m : ℕ → ℕ) (hsub : PilotSublinear m) : Tendsto (fun n : ℕ => (n : ℝ) / (adaptiveMainSize m n : ℝ)) atTop (𝓝 1) := by have hratio := adaptiveMainSize_ratio_tendsto_one m hsub simpa only [inv_div, inv_one] using hratio.inv₀ one_ne_zero
CausalSmith.Stat.LdpAteEfficiencySurface.adaptive_mainScale_tendsto_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveTransfer.lean:102
theorem adaptive_mainScale_mul_tendsto

the adaptive main scale mul tendsto assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hsub :
a :
ℕ → ℝ
L :
ℝ
ha :
Tendsto a atTop (𝓝 L)
Tendsto (fun n : ℕ => ((n : ℝ) / (adaptiveMainSize m n : ℝ)) * a n) atTop (𝓝 L)
Proof (Lean source)
lemma adaptive_mainScale_mul_tendsto {m : ℕ → ℕ} (hsub : PilotSublinear m) {a : ℕ → ℝ} {L : ℝ} (ha : Tendsto a atTop (𝓝 L)) : Tendsto (fun n : ℕ => ((n : ℝ) / (adaptiveMainSize m n : ℝ)) * a n) atTop (𝓝 L) := by simpa using (adaptive_mainScale_tendsto_one m hsub).mul ha
CausalSmith.Stat.LdpAteEfficiencySurface.adaptive_mainScale_mul_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveTransfer.lean:110
theorem adaptive_sqrtScale_mul_tendsto

the adaptive sqrt scale mul tendsto assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hsub :
a :
ℕ → ℝ
L :
ℝ
ha :
Tendsto a atTop (𝓝 L)
Tendsto (fun n : ℕ => sqrt ((n : ℝ) / (adaptiveMainSize m n : ℝ)) * a n) atTop (𝓝 L)
Proof (Lean source)
lemma adaptive_sqrtScale_mul_tendsto {m : ℕ → ℕ} (hsub : PilotSublinear m) {a : ℕ → ℝ} {L : ℝ} (ha : Tendsto a atTop (𝓝 L)) : Tendsto (fun n : ℕ => sqrt ((n : ℝ) / (adaptiveMainSize m n : ℝ)) * a n) atTop (𝓝 L) := by simpa using (adaptive_row_main_sqrt_ratio_tendsto_one m hsub).mul ha
CausalSmith.Stat.LdpAteEfficiencySurface.adaptive_sqrtScale_mul_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAdaptiveTransfer.lean:119
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotAttainmentSupport 23 declarations This file supplies the finite pilot-prefix integral decomposition and the outer asymptotic packaging used by the private-pilot theorem.

Assembly lemmas for private-pilot attainment

This file supplies the finite pilot-prefix integral decomposition and the outer asymptotic packaging used by the private-pilot theorem. It deliberately does not depend on the generic triangular-array limit theorem.

def pilotObservedPrefix

The observed coordinates lying in the pilot portion of a transcript. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
m :
ℕ → ℕ
z :
Transcript (pilotOutputFamily n)
pilotObservedPrefix m z :
{i : Fin n // i.val < m n} → PilotOutput
fun i => z i.1
CausalSmith.Stat.LdpAteEfficiencySurface.pilotObservedPrefix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:23
theorem finiteProduct_weighted_sum_expectation

Under a finite product law with normalized one-coordinate weights, the weighted expectation of a coordinate sum is the number of coordinates times the one-coordinate weighted expectation. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
A :
Type*
N :
ℕ
w q :
A → ℝ
hw :
∑ a, w a = 1
∑ v : Fin N → A, (∏ j, w (v j)) * (∑ j, q (v j)) = (N : ℝ) * (∑ a, w a * q a)
Proof (Lean source)
lemma finiteProduct_weighted_sum_expectation {A : Type*} [Fintype A] (N : ℕ) (w q : A → ℝ) (hw : ∑ a, w a = 1) : ∑ v : Fin N → A, (∏ j, w (v j)) * (∑ j, q (v j)) = (N : ℝ) * (∑ a, w a * q a) := by classical rw [show (∑ v : Fin N → A, (∏ j, w (v j)) * (∑ j, q (v j))) = ∑ v : Fin N → A, ∑ j, (∏ k, w (v k)) * q (v j) by apply Finset.sum_congr rfl intro v _ exact Finset.mul_sum _ _ _] rw [Finset.sum_comm] calc (∑ j : Fin N, ∑ v : Fin N → A, (∏ k, w (v k)) * q (v j)) = ∑ j : Fin N, ∑ a, w a * q a := by apply Finset.sum_congr rfl intro j _ let F : Fin N → A → ℝ := fun k a => w a * if k = j then q a else 1 calc (∑ v : Fin N → A, (∏ k, w (v k)) * q (v j)) = ∑ v : Fin N → A, ∏ k, F k (v k) := by apply Finset.sum_congr rfl intro v _ rw [show (∏ k, F k (v k)) = (∏ k, w (v k)) * q (v j) by unfold F rw [Finset.prod_mul_distrib] simp] _ = ∏ k : Fin N, ∑ a, F k a := (Fintype.prod_sum F).symm _ = ∑ a, w a * q a := by rw [Finset.prod_eq_single j] · simp [F] · intro k _ hkj simp [F, hkj, hw] · simp _ = (N : ℝ) * (∑ a, w a * q a) := by simp [Finset.sum_const, nsmul_eq_mul]
CausalSmith.Stat.LdpAteEfficiencySurface.finiteProduct_weighted_sum_expectation · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:29
theorem adaptiveMain_centered_product_sum

For a fixed pilot selection and a nonempty main row, the product-law expectation of the corrected main-sample estimator is centered at the true contrast. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Main centered product sum.

Formal statement
select :
shared
θ η :
p ε :
ℝ
hselect :
hη :
hε :
0 < ε
N :
ℕ
hN :
0 < N
∑ v : Fin N → Fin 14, (∏ j, adaptiveMainMass select θ η p ε (v j)) * (contrast η + (N : ℝ)⁻¹ * ∑ j, adaptiveSelectedScore select η p ε (v j) - contrast θ)
= 0
Proof (Lean source)
lemma adaptiveMain_centered_product_sum (θ η : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 < ε) (N : ℕ) (hN : 0 < N) : ∑ v : Fin N → Fin 14, (∏ j, adaptiveMainMass select θ η p ε (v j)) * (contrast η + (N : ℝ)⁻¹ * ∑ j, adaptiveSelectedScore select η p ε (v j) - contrast θ) = 0 := by let w : Fin 14 → ℝ := adaptiveMainMass select θ η p ε let q : Fin 14 → ℝ := adaptiveSelectedScore select η p ε have hw : ∑ s, w s = 1 := adaptiveMainMass_sum select θ η p ε hselect hp hη hε have hq : ∑ s, w s * q s = contrast θ - contrast η := adaptiveSelectedScore_mean select θ η p ε hselect hp hη hε have hprod : ∑ v : Fin N → Fin 14, ∏ j, w (v j) = 1 := by rw [← Fintype.prod_sum] simp [hw] have hsum := finiteProduct_weighted_sum_expectation N w q hw change (∑ v : Fin N → Fin 14, (∏ j, w (v j)) * (contrast η + (N : ℝ)⁻¹ * ∑ j, q (v j) - contrast θ)) = 0 calc _ = (contrast η - contrast θ) * (∑ v : Fin N → Fin 14, ∏ j, w (v j)) + (N : ℝ)⁻¹ * (∑ v : Fin N → Fin 14, (∏ j, w (v j)) * ∑ j, q (v j)) := by rw [Finset.mul_sum, Finset.mul_sum] rw [← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro v _ ring _ = (contrast η - contrast θ) + (N : ℝ)⁻¹ * ((N : ℝ) * (contrast θ - contrast η)) := by rw [hprod, hsum, hq] ring _ = 0 := by have hNr : (N : ℝ) ≠ 0 := by exact_mod_cast (ne_of_gt hN) field_simp ring
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveMain_centered_product_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:70
theorem fin_sum_split

Split a finite sum at a bounded initial segment. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
M :
m n :
ℕ
hmn :
m ≤ n
f :
Fin m → M
g :
Fin (n - m) → M
(∑ i : Fin n, if hi : i.val < m then f ⟨i.val, hi⟩ else g ⟨i.val - m, by omega⟩)
= (∑ j : Fin m, f j) + ∑ j : Fin (n - m), g j
Proof (Lean source)
lemma fin_sum_split {M : Type*} [AddCommMonoid M] {m n : ℕ} (hmn : m ≤ n) (f : Fin m → M) (g : Fin (n - m) → M) : (∑ i : Fin n, if hi : i.val < m then f ⟨i.val, hi⟩ else g ⟨i.val - m, by omega⟩) = (∑ j : Fin m, f j) + ∑ j : Fin (n - m), g j := by let e : Fin (m + (n - m)) ≃ Fin n := Fin.castOrderIso (Nat.add_sub_of_le hmn) rw [← e.sum_comp] rw [Fin.sum_univ_add] congr 1 · apply Finset.sum_congr rfl intro j _ simp [e] · apply Finset.sum_congr rfl intro j _ simp [e]
theorem tauStar_pilotAdaptiveEncode

On an encoded pilot/main transcript, tauStar is the pilot contrast plus the average of the selected main-release scores. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the tau Star pilot Adaptive Encode.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
u :
Fin (m n) → Fin 4
v :
Fin (n - m n) → Fin 14
tauStar p ε m (select) (pilotAdaptiveEncode hmn u v)
= contrast (pilotAdaptivePrefixTheta p ε m hmn u)
+ ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)
Proof (Lean source)
lemma tauStar_pilotAdaptiveEncode (p ε : ℝ) (m : ℕ → ℕ) (hp : InteriorAssignment p) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : tauStar p ε m (select) (pilotAdaptiveEncode hmn u v) = contrast (pilotAdaptivePrefixTheta p ε m hmn u) + ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j) := by unfold tauStar rw [pilotTheta_pilotAdaptiveEncode p ε m hmn u v] dsimp only congr 1 rw [show (∑ i : Fin n, if m n ≤ i.val then phiOutput (pilotAdaptivePrefixTheta p ε m hmn u) p ε (select) (pilotAdaptiveEncode hmn u v i) else 0) = ∑ i : Fin n, if hi : i.val < m n then (0 : ℝ) else adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v ⟨i.val - m n, by omega⟩) by apply Finset.sum_congr rfl intro i _ by_cases hi : i.val < m n · simp [hi] · have him : m n ≤ i.val := Nat.le_of_not_gt hi simp [hi, him, pilotAdaptiveEncode, phiOutput, adaptiveSelectedScore]] rw [fin_sum_split hmn (fun _ : Fin (m n) => (0 : ℝ)) (fun j : Fin (n - m n) => adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))] simp
CausalSmith.Stat.LdpAteEfficiencySurface.tauStar_pilotAdaptiveEncode · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:128
theorem pilotAdaptive_encoded_centered_sum

Conditional on a proper pilot prefix, the exact joint-law atom masses center the encoded main-row estimator at the true contrast. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Adaptive encoded centered sum.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hsub :
n :
ℕ
hn :
2 ≤ n
u :
Fin (m n) → Fin 4
∑ v : Fin (n - m n) → Fin 14, (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n {pilotAdaptiveEncode (le_of_lt (hsub.2 n hn).2) u v}).toReal * ((pilotEstimator p ε m select hselect hp hε).estimate n (pilotAdaptiveEncode (le_of_lt (hsub.2 n hn).2) u v) - contrast θ)
= 0
Proof (Lean source)
lemma pilotAdaptive_encoded_centered_sum (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hsub : PilotSublinear m) (n : ℕ) (hn : 2 ≤ n) (u : Fin (m n) → Fin 4) : ∑ v : Fin (n - m n) → Fin 14, (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n {pilotAdaptiveEncode (le_of_lt (hsub.2 n hn).2) u v}).toReal * ((pilotEstimator p ε m select hselect hp hε).estimate n (pilotAdaptiveEncode (le_of_lt (hsub.2 n hn).2) u v) - contrast θ) = 0 := by let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 let η := pilotAdaptivePrefixTheta p ε m hmn u have hη : InteriorMeans η := by exact pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0)) have hN : 0 < n - m n := Nat.sub_pos_of_lt (hsub.2 n hn).2 let a : ℝ := ∏ j : Fin (m n), ∑ x : Fin 4, piTheta θ p x * rrPilotProbability ε x (u j) have hpilot_nonneg (j : Fin (m n)) : 0 ≤ ∑ x : Fin 4, piTheta θ p x * rrPilotProbability ε x (u j) := by apply Finset.sum_nonneg intro x _ exact mul_nonneg (piTheta_pos_interior θ p hp hθ x).le (by unfold rrPilotProbability split_ifs <;> positivity) have hmain_nonneg (s : Fin 14) : 0 ≤ adaptiveMainMass select θ η p ε s := adaptiveMainMass_nonneg select θ η p ε hselect hp hθ hη hε s have hmass (v : Fin (n - m n) → Fin 14) : (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n {pilotAdaptiveEncode hmn u v}).toReal = a * ∏ j, adaptiveMainMass select θ η p ε (v j) := by have hpProd : 0 ≤ ∏ j : Fin (m n), ∑ x : Fin 4, piTheta θ p x * rrPilotProbability ε x (u j) := Finset.prod_nonneg fun j _ => hpilot_nonneg j have hmProd : 0 ≤ ∏ j : Fin (n - m n), adaptiveMainMass select θ η p ε (v j) := Finset.prod_nonneg fun j _ => hmain_nonneg (v j) rw [pilotAdaptive_joint_singleton select θ p ε m hselect hp hθ hε hmn u v] rw [ENNReal.toReal_mul] rw [← ENNReal.ofReal_prod_of_nonneg (fun j _ => hpilot_nonneg j)] rw [← ENNReal.ofReal_prod_of_nonneg (fun j _ => hmain_nonneg (v j))] rw [ENNReal.toReal_ofReal hpProd, ENNReal.toReal_ofReal hmProd] change (∑ v : Fin (n - m n) → Fin 14, (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n {pilotAdaptiveEncode hmn u v}).toReal * (tauStar p ε m (select) (pilotAdaptiveEncode hmn u v) - contrast θ)) = 0 simp_rw [hmass, tauStar_pilotAdaptiveEncode select p ε m hp hε hmn u] change (∑ x : Fin (n - m n) → Fin 14, (a * ∏ j, adaptiveMainMass select θ η p ε (x j)) * (contrast η + ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, adaptiveSelectedScore select η p ε (x j) - contrast θ)) = 0 rw [show (∑ x : Fin (n - m n) → Fin 14, (a * ∏ j, adaptiveMainMass select θ η p ε (x j)) * (contrast η + ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, adaptiveSelectedScore select η p ε (x j) - contrast θ)) = a * ∑ x : Fin (n - m n) → Fin 14, (∏ j, adaptiveMainMass select θ η p ε (x j)) * (contrast η + ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, adaptiveSelectedScore select η p ε (x j) - contrast θ) by rw [Finset.mul_sum] apply Finset.sum_congr rfl intro x _ ring] rw [adaptiveMain_centered_product_sum select θ η p ε hselect hp hη hε (n - m n) hN] simp
CausalSmith.Stat.LdpAteEfficiencySurface.pilotAdaptive_encoded_centered_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:163
theorem pilotAdaptive_singleton_zero_of_not_range

A transcript outside the correctly tagged pilot/main encoding has zero mass under the exact private-pilot law. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Adaptive singleton zero of not range.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
t :
Transcript (pilotOutputFamily n)
ht :
t ∉ Set.range fun uv : (Fin (m n) → Fin 4) × (Fin (n - m n) → Fin 14)
=> pilotAdaptiveEncode hmn uv.1 uv.2
transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n {t} = 0
Proof (Lean source)
lemma pilotAdaptive_singleton_zero_of_not_range (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (t : Transcript (pilotOutputFamily n)) (ht : t ∉ Set.range fun uv : (Fin (m n) → Fin 4) × (Fin (n - m n) → Fin 14) => pilotAdaptiveEncode hmn uv.1 uv.2) : transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n {t} = 0 := by have hwrong : (∃ i : Fin n, i.val < m n ∧ ∃ s : Fin 14, t i = inr s) ∨ (∃ i : Fin n, m n ≤ i.val ∧ ∃ k : Fin 4, t i = inl k) := by by_contra hnone push Not at hnone let u : Fin (m n) → Fin 4 := fun j => elim id (fun _ => 0) (t (castLE hmn j) : PilotOutput) let v : Fin (n - m n) → Fin 14 := fun j => elim (fun _ => 0) id (t ⟨m n + j.val, by omega⟩ : PilotOutput) apply ht refine ⟨(u, v), ?_⟩ funext i by_cases hi : i.val < m n · cases hti : t i with | inl k => simp [pilotAdaptiveEncode, hi, u, hti] | inr s => exact False.elim (hnone.1 i hi s hti) · have him : m n ≤ i.val := Nat.le_of_not_gt hi have hjlt : i.val - m n < n - m n := by omega have hidx : (⟨m n + (⟨i.val - m n, hjlt⟩ : Fin (n - m n)).val, by omega⟩ : Fin n) = i := Fin.ext (Nat.add_sub_of_le him) cases hti : t i with | inl k => exact False.elim (hnone.2 i him k hti) | inr s => have htidx : t ⟨m n + (⟨i.val - m n, hjlt⟩ : Fin (n - m n)).val, by omega⟩ = inr s := by rw [hidx]; exact hti simp [pilotAdaptiveEncode, hi, v, htidx] unfold transcriptLaw simp only [Measure.coe_finsetSum, Finset.sum_apply, Measure.smul_apply, smul_eq_mul] apply Finset.sum_eq_zero intro x _ suffices (pilotEstimator p ε m select hselect hp hε).transcript n x {t} = 0 by simp [this] change finiteSequenceTranscript (pilotProtocol p ε m (select) n) x {t} = 0 rw [finiteSequenceTranscript_singleton_apply] · rcases hwrong with ⟨i, hi, s, hs⟩ | ⟨i, hi, k, hk⟩ · apply Finset.prod_eq_zero (Finset.mem_univ i) rw [hs] exact pilotProtocol_pilot_wrongTag select p ε m hselect hp hε i hi (x i) (fun j => t j.1) s · apply Finset.prod_eq_zero (Finset.mem_univ i) rw [hk] exact pilotProtocol_main_wrongTag select p ε m hselect hp hε i hi (x i) (fun j => t j.1) k · exact (pilotProtocol_private p ε m select hselect hp hε n).1
CausalSmith.Stat.LdpAteEfficiencySurface.pilotAdaptive_singleton_zero_of_not_range · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:235
theorem pilotAdaptiveEncode_pair_injective

The joint pilot/main transcript encoding is injective. For the displayed inputs and conditions, the stated result follows.

Formal statement
m n :
ℕ
hmn :
m ≤ n
Injective (fun uv : (Fin m → Fin 4) × (Fin (n - m) → Fin 14) => pilotAdaptiveEncode hmn uv.1 uv.2)
Proof (Lean source)
lemma pilotAdaptiveEncode_pair_injective {m n : ℕ} (hmn : m ≤ n) : Injective (fun uv : (Fin m → Fin 4) × (Fin (n - m) → Fin 14) => pilotAdaptiveEncode hmn uv.1 uv.2) := by intro uv uv' h apply Prod.ext · funext j have hj := congrFun h (castLE hmn j) dsimp only at hj rw [pilotAdaptiveEncode_pilot hmn uv.1 uv.2 j, pilotAdaptiveEncode_pilot hmn uv'.1 uv'.2 j] at hj exact Sum.inl_injective hj · funext j have hj := congrFun h (⟨m + j.val, by omega⟩ : Fin n) dsimp only at hj rw [pilotAdaptiveEncode_main hmn uv.1 uv.2 j, pilotAdaptiveEncode_main hmn uv'.1 uv'.2 j] at hj exact Sum.inr_injective hj
CausalSmith.Stat.LdpAteEfficiencySurface.pilotAdaptiveEncode_pair_injective · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:294
theorem sum_eq_sum_image_of_zero_off_range

A finite sum supported on an injectively parameterized range can be reindexed by the parameters. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
A Ω M :
e :
A → Ω
he :
F :
Ω → M
hzero :
∀ x
if
x ∉ range e
then
F x = 0
∑ x : Ω, F x = ∑ a : A, F (e a)
Proof (Lean source)
lemma sum_eq_sum_image_of_zero_off_range {A Ω M : Type*} [Fintype A] [Fintype Ω] [AddCommMonoid M] (e : A → Ω) (he : Injective e) (F : Ω → M) (hzero : ∀ x, x ∉ range e → F x = 0) : ∑ x : Ω, F x = ∑ a : A, F (e a) := by classical rw [← Finset.sum_image (fun a _ b _ hab => he hab)] symm apply Finset.sum_subset (by simp) intro x _ hx apply hzero x simpa using hx
CausalSmith.Stat.LdpAteEfficiencySurface.sum_eq_sum_image_of_zero_off_range · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:313
theorem pilot_prefix_cell_centered

The centered private-pilot estimator has integral zero on every observed pilot-prefix fiber. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot prefix cell centered.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hsub :
n :
ℕ
hn :
2 ≤ n
r :
{i : Fin n // i.val < m n} → PilotOutput
(∫ z in (pilotObservedPrefix (n := n) m) ⁻¹' {r}, ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n)
= 0
Proof (Lean source)
lemma pilot_prefix_cell_centered (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hsub : PilotSublinear m) (n : ℕ) (hn : 2 ≤ n) (r : {i : Fin n // i.val < m n} → PilotOutput) : (∫ z in (pilotObservedPrefix (n := n) m) ⁻¹' {r}, ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) = 0 := by classical let μ := transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n let H := pilotObservedPrefix (n := n) m let g : Transcript (pilotOutputFamily n) → ℝ := fun z => (pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 let e := fun uv : (Fin (m n) → Fin 4) × (Fin (n - m n) → Fin 14) => pilotAdaptiveEncode hmn uv.1 uv.2 letI : IsProbabilityMeasure μ := transcriptLaw_isProbability (pilotEstimator p ε m select hselect hp hε) θ p hp hθ n have hprefix (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : H (e (u, v)) = fun i => inl (u ⟨i.val, i.property⟩) := by funext i change (if hi : i.val < m n then inl (u ⟨i.val, hi⟩) else inr (v ⟨i.val - m n, by omega⟩)) = _ simp [i.property] rw [MeasureTheory.integral_fintype Integrable.of_finite] change (∑ z, (μ.restrict (H ⁻¹' {r}) {z}).toReal * g z) = 0 rw [sum_eq_sum_image_of_zero_off_range e (pilotAdaptiveEncode_pair_injective hmn)] · rw [Fintype.sum_prod_type] apply Finset.sum_eq_zero intro u _ by_cases hur : H (e (u, fun _ => 0)) = r · have huv (v : Fin (n - m n) → Fin 14) : H (e (u, v)) = r := by calc H (e (u, v)) = (fun i => inl (u ⟨i.val, i.property⟩)) := hprefix u v _ = H (e (u, fun _ => 0)) := (hprefix u (fun _ => 0)).symm _ = r := hur simp_rw [show ∀ v : Fin (n - m n) → Fin 14, (μ.restrict (H ⁻¹' {r}) {e (u, v)}).toReal = (μ {e (u, v)}).toReal by intro v rw [MeasureTheory.Measure.restrict_apply (measurableSet_singleton _)] simp [huv v]] exact pilotAdaptive_encoded_centered_sum select θ p ε m hselect hp hθ hε hsub n hn u · have huv (v : Fin (n - m n) → Fin 14) : H (e (u, v)) ≠ r := by intro h apply hur calc H (e (u, fun _ => 0)) = (fun i => inl (u ⟨i.val, i.property⟩)) := hprefix u (fun _ => 0) _ = H (e (u, v)) := (hprefix u v).symm _ = r := h apply Finset.sum_eq_zero intro v _ rw [MeasureTheory.Measure.restrict_apply (measurableSet_singleton _)] simp [huv v] · intro t ht have hzero := pilotAdaptive_singleton_zero_of_not_range select θ p ε m hselect hp hε hmn t ht rw [MeasureTheory.Measure.restrict_apply (measurableSet_singleton _)] have hsubsingleton : {t} ∩ H ⁻¹' {r} ⊆ ({t} : Set _) := Set.inter_subset_left have hz : μ ({t} ∩ H ⁻¹' {r}) = 0 := measure_mono_null hsubsingleton hzero simp [hz]
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_prefix_cell_centered · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:328
def waldFallbackPivot

A Wald pivot with an explicit zero-variance fallback. The fallback makes the closed-interval event exactly equivalent to the unstudentized Wald event, including samples on which the variance estimate is zero. The wald Fallback Pivot is determined by the displayed parameters.

Definition (Lean source)
cutoff :
ℝ
n :
ℕ
e v :
ℝ
waldFallbackPivot cutoff n e v :
ℝ
if v = 0 then if e = 0 then 0 else cutoff + 1 else sqrt n * e / sqrt v
theorem mem_Icc_waldFallbackPivot_iff

Membership of the fallback pivot in the symmetric cutoff interval is exactly the corresponding Wald inequality. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
cutoff :
ℝ
hcutoff :
0 < cutoff
n :
ℕ
hn :
0 < n
e v :
ℝ
hv :
0 ≤ v
waldFallbackPivot cutoff n e v ∈ Icc (-cutoff) cutoff
↔ |e| ≤ cutoff * sqrt (v / n)
Proof (Lean source)
lemma mem_Icc_waldFallbackPivot_iff {cutoff : ℝ} (hcutoff : 0 < cutoff) {n : ℕ} (hn : 0 < n) {e v : ℝ} (hv : 0 ≤ v) : waldFallbackPivot cutoff n e v ∈ Icc (-cutoff) cutoff ↔ |e| ≤ cutoff * sqrt (v / n) := by by_cases hv0 : v = 0 · subst v by_cases he0 : e = 0 · subst e simp [waldFallbackPivot, hcutoff.le] · have habs : 0 < |e| := abs_pos.mpr he0 simp [waldFallbackPivot, he0, not_le_of_gt habs] · have hvpos : 0 < v := lt_of_le_of_ne hv (Ne.symm hv0) have hnreal : 0 < (n : ℝ) := by exact_mod_cast hn have hsn : 0 < sqrt (n : ℝ) := Real.sqrt_pos.2 hnreal have hsv : 0 < sqrt v := Real.sqrt_pos.2 hvpos rw [show waldFallbackPivot cutoff n e v = sqrt n * e / sqrt v by simp [waldFallbackPivot, hv0]] rw [show (sqrt n * e / sqrt v ∈ Icc (-cutoff) cutoff) ↔ |sqrt n * e / sqrt v| ≤ cutoff by simp [abs_le]] rw [Real.sqrt_div hv] simp only [abs_div, abs_mul] rw [abs_of_nonneg (Real.sqrt_nonneg _), abs_of_nonneg (Real.sqrt_nonneg _)] rw [div_le_iff₀ hsv] rw [show cutoff * (sqrt v / sqrt (n : ℝ)) = (cutoff * sqrt v) / sqrt (n : ℝ) by ring] rw [le_div_iff₀ hsn] ring_nf
CausalSmith.Stat.LdpAteEfficiencySurface.mem_Icc_waldFallbackPivot_iff · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:401
theorem pilotVhatStar_nonneg

The main-sample empirical variance is nonnegative on every transcript. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
select :
n :
ℕ
z :
Transcript (pilotOutputFamily n)
0 ≤ VhatStar p ε m select z
Proof (Lean source)
lemma pilotVhatStar_nonneg (p ε : ℝ) (m : ℕ → ℕ) (select : TrialParameter → StaircaseWeight × ℝ × ℝ) {n : ℕ} (z : Transcript (pilotOutputFamily n)) : 0 ≤ VhatStar p ε m select z := by unfold VhatStar exact mul_nonneg (inv_nonneg.mpr (Nat.cast_nonneg _)) (Finset.sum_nonneg fun i _ => by split_ifs <;> positivity)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotVhatStar_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:433
def pilotWaldPivot

The fallback-studentized private-pilot estimation error. The pilot Wald Pivot is determined by the displayed parameters.

Definition (Lean source)
select :
shared
cutoff :
ℝ
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
z :
Transcript (pilotOutputFamily n)
pilotWaldPivot select cutoff θ p ε m hselect hp hε n z :
ℝ
waldFallbackPivot cutoff n ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) (VhatStar p ε m (select) z)
theorem pilot_wald_event_eq

At every positive sample size, the private-pilot Wald coverage event is the symmetric closed-interval event for the fallback pivot. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot wald event eq.

Formal statement
select :
shared
cutoff :
ℝ
hcutoff :
0 < cutoff
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hn :
0 < n
{z : Transcript (pilotOutputFamily n) | |(pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ| ≤ cutoff * sqrt (VhatStar p ε m (select) z / n)}
= {z | pilotWaldPivot select cutoff θ p ε m hselect hp hε n z ∈ Icc (-cutoff) cutoff}
Proof (Lean source)
lemma pilot_wald_event_eq (cutoff : ℝ) (hcutoff : 0 < cutoff) (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (n : ℕ) (hn : 0 < n) : {z : Transcript (pilotOutputFamily n) | |(pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ| ≤ cutoff * sqrt (VhatStar p ε m (select) z / n)} = {z | pilotWaldPivot select cutoff θ p ε m hselect hp hε n z ∈ Icc (-cutoff) cutoff} := by ext z exact (mem_Icc_waldFallbackPivot_iff hcutoff hn (pilotVhatStar_nonneg p ε m (select) z)).symm
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_wald_event_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:452
theorem pilot_wald_coverage_of_pivot_Icc

Convergence of the fallback-pivot interval probability transfers directly to the private-pilot Wald coverage probability. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot wald coverage of pivot Icc.

Formal statement
select :
shared
cutoff :
ℝ
hcutoff :
0 < cutoff
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
L :
ℝ
hpivot :
Tendsto (fun n => ((transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | pilotWaldPivot select cutoff θ p ε m hselect hp hε n z ∈ Icc (-cutoff) cutoff}).toReal) atTop (nhds L)
Tendsto (fun n => ((transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | |(pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ| ≤ cutoff * sqrt (VhatStar p ε m (select) z / n)}).toReal) atTop (nhds L)
Proof (Lean source)
lemma pilot_wald_coverage_of_pivot_Icc (cutoff : ℝ) (hcutoff : 0 < cutoff) (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (L : ℝ) (hpivot : Tendsto (fun n => ((transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | pilotWaldPivot select cutoff θ p ε m hselect hp hε n z ∈ Icc (-cutoff) cutoff}).toReal) atTop (nhds L)) : Tendsto (fun n => ((transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | |(pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ| ≤ cutoff * sqrt (VhatStar p ε m (select) z / n)}).toReal) atTop (nhds L) := by refine hpivot.congr' ?_ filter_upwards [eventually_gt_atTop (0 : ℕ)] with n hn rw [pilot_wald_event_eq select cutoff hcutoff θ p ε m hselect hp hε n hn]
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_wald_coverage_of_pivot_Icc · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:470
theorem pilot_adapted_centered_integral

If a centered integrand has integral zero on every finite pilot-prefix fiber, multiplying it by any statistic determined by the pilot prefix remains integrable and has integral zero. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
m :
ℕ → ℕ
μ :
g f :
Transcript (pilotOutputFamily n) → ℝ
hcenter :
∀ u, ∫ z in (pilotObservedPrefix (n := n) m) ⁻¹' {u}, g z ∂μ = 0
hadapt :
∀ z z'
if
(∀ i : Fin n, i.val < m n → z i = z' i)
then
f z = f z'
conclusion 1
Integrable (fun z => g z * f z) μ
conclusion 2
(∫ z, g z * f z ∂μ) = 0
Proof (Lean source)
lemma pilot_adapted_centered_integral {n : ℕ} (m : ℕ → ℕ) (μ : Measure (Transcript (pilotOutputFamily n))) [IsFiniteMeasure μ] (g f : Transcript (pilotOutputFamily n) → ℝ) (hcenter : ∀ u, ∫ z in (pilotObservedPrefix (n := n) m) ⁻¹' {u}, g z ∂μ = 0) (hadapt : ∀ z z', (∀ i : Fin n, i.val < m n → z i = z' i) → f z = f z') : Integrable (fun z => g z * f z) μ ∧ (∫ z, g z * f z ∂μ) = 0 := by classical let extend : ({i : Fin n // i.val < m n} → PilotOutput) → Transcript (pilotOutputFamily n) := fun u i => if hi : i.val < m n then u ⟨i, hi⟩ else inl 0 let c : ({i : Fin n // i.val < m n} → PilotOutput) → ℝ := fun u => f (extend u) have hf_eq : ∀ z, f z = c (pilotObservedPrefix m z) := by intro z apply hadapt z intro i hi simp [extend, pilotObservedPrefix, hi] constructor · exact Integrable.of_finite · have hfiber : ∀ u : ({i : Fin n // i.val < m n} → PilotOutput), MeasurableSet ((pilotObservedPrefix (n := n) m) ⁻¹' {u}) := by intro u exact (measurable_of_finite _) (measurableSet_singleton u) have hdecomp := integral_cellConst_mul (μ := μ) (H := pilotObservedPrefix (n := n) m) hfiber c (f := g) (hf := Integrable.of_finite) rw [show (∫ z, g z * f z ∂μ) = ∫ z, c (pilotObservedPrefix m z) • g z ∂μ by apply integral_congr_ae filter_upwards with z rw [hf_eq z] simp [mul_comm]] rw [hdecomp] simp [hcenter]
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_adapted_centered_integral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:492
theorem pilot_conditional_unbiasedness_of_prefix_cells

Fiberwise centering of the pilot estimator implies the full conditional unbiasedness clause against every bounded measurable pilot statistic. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot conditional unbiasedness of prefix cells.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hcenter :
∀ n ≥ 2,
∀ u : ({i : Fin n // i.val < m n} → PilotOutput),
(∫ z in (pilotObservedPrefix (n := n) m) ⁻¹' {u}, ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n)
= 0
n ≥ 2 :
f :
Transcript (pilotOutputFamily n) → ℝ
(∃ C : ℝ, ∀ z, |f z| ≤ C)
(∀ z z', (∀ i : Fin n, i.val < m n → z i = z' i) → f z = f z')
conclusion 1
Integrable (fun z => ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) * f z) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n)
conclusion 2
(∫ z, ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) * f z ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n)
= 0
Proof (Lean source)
lemma pilot_conditional_unbiasedness_of_prefix_cells (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hcenter : ∀ n ≥ 2, ∀ u : ({i : Fin n // i.val < m n} → PilotOutput), (∫ z in (pilotObservedPrefix (n := n) m) ⁻¹' {u}, ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) = 0) : ∀ n ≥ 2, ∀ f : Transcript (pilotOutputFamily n) → ℝ, Measurable f → (∃ C : ℝ, ∀ z, |f z| ≤ C) → (∀ z z', (∀ i : Fin n, i.val < m n → z i = z' i) → f z = f z') → Integrable (fun z => ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) * f z) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) ∧ (∫ z, ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) * f z ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) = 0 := by intro n hn f _ _ hadapt haveI : IsProbabilityMeasure (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) := transcriptLaw_isProbability _ θ p hp hθ n exact pilot_adapted_centered_integral m (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) (fun z => (pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) f (hcenter n hn) hadapt
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_conditional_unbiasedness_of_prefix_cells · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:535
theorem pilot_conditional_unbiasedness

The private-pilot estimator satisfies the headline conditional unbiasedness clause under the stated sublinear pilot condition. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot conditional unbiasedness.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hsub :
n ≥ 2 :
f :
Transcript (pilotOutputFamily n) → ℝ
(∃ C : ℝ, ∀ z, |f z| ≤ C)
(∀ z z', (∀ i : Fin n, i.val < m n → z i = z' i) → f z = f z')
conclusion 1
Integrable (fun z => ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) * f z) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n)
conclusion 2
(∫ z, ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) * f z ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n)
= 0
Proof (Lean source)
lemma pilot_conditional_unbiasedness (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hsub : PilotSublinear m) : ∀ n ≥ 2, ∀ f : Transcript (pilotOutputFamily n) → ℝ, Measurable f → (∃ C : ℝ, ∀ z, |f z| ≤ C) → (∀ z z', (∀ i : Fin n, i.val < m n → z i = z' i) → f z = f z') → Integrable (fun z => ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) * f z) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) ∧ (∫ z, ((pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ) * f z ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) = 0 := by apply pilot_conditional_unbiasedness_of_prefix_cells select θ p ε m hselect hp hθ hε intro n hn r exact pilot_prefix_cell_centered select θ p ε m hselect hp hθ hε hsub n hn r
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_conditional_unbiasedness · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:565
theorem gaussian_second_lintegral_lt_top

A centered Gaussian law has a finite second moment in the extended-real form required by RegularProcedure. For the displayed inputs and conditions, the stated result follows.

Formal statement
v :
ℝ
(∫⁻ u, ofReal (u ^ 2) ∂gaussianMeasure 0 v) < ⊤
Proof (Lean source)
lemma gaussian_second_lintegral_lt_top (v : ℝ) : (∫⁻ u, ofReal (u ^ 2) ∂gaussianMeasure 0 v) < ⊤ := by have hmem : MemLp id 2 (gaussianMeasure 0 v) := by unfold gaussianMeasure exact ProbabilityTheory.memLp_id_gaussianReal 2 exact hmem.integrable_sq.lintegral_lt_top
CausalSmith.Stat.LdpAteEfficiencySurface.gaussian_second_lintegral_lt_top · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:586
theorem regular_of_weakLocalLimit_and_uniformTails

A weak local Gaussian limit and the defining uniform squared-tail condition assemble into the regular-procedure interface. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p v :
ℝ
hweak :
htails :
∀ H : ℝ
if
0 < H
then
Tendsto (fun M : ℕ => limsup (fun n => sSup {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ n H, u = ∫⁻ z, ofReal ((scaledError P θ h n z) ^ 2 * if M < |scaledError P θ h n z| then 1 else 0) ∂transcriptLaw P (localAlternative θ h n) p n}) atTop) atTop (nhds 0)
Proof (Lean source)
lemma regular_of_weakLocalLimit_and_uniformTails {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p v : ℝ) (hweak : WeakLocalLimit P θ p (gaussianMeasure 0 v)) (htails : ∀ H : ℝ, 0 < H → Tendsto (fun M : ℕ => limsup (fun n => sSup {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ n H, u = ∫⁻ z, ofReal ((scaledError P θ h n z) ^ 2 * if M < |scaledError P θ h n z| then 1 else 0) ∂transcriptLaw P (localAlternative θ h n) p n}) atTop) atTop (nhds 0)) : RegularProcedure P θ p := by refine ⟨gaussianMeasure 0 v, inferInstance, ?_, hweak, htails⟩ exact gaussian_second_lintegral_lt_top v
CausalSmith.Stat.LdpAteEfficiencySurface.regular_of_weakLocalLimit_and_uniformTails · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:595
theorem pilot_limit_variance_regular_of_core

The pilot weak limit, plug-in variance consistency, and uniform squared tails package the three asymptotic interfaces consumed together by the attainment theorem. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot limit variance regular of core.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
hweak :
WeakLocalLimit (pilotEstimator p ε m select hselect hp hε) θ p (gaussianMeasure 0 (Vstar θ p ε))
hvhat :
∀ δ : ℝ
if
0 < δ
then
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)
htails :
∀ H : ℝ
if
0 < H
then
Tendsto (fun M : ℕ => limsup (fun n => sSup {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ n H, u = ∫⁻ z, ofReal ((scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z) ^ 2 * if M < |scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z| then 1 else 0) ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n}) atTop) atTop (nhds 0)
conclusion 1
WeakLocalLimit (pilotEstimator p ε m select hselect hp hε) θ p (gaussianMeasure 0 (Vstar θ p ε))
conclusion 2
δ :
ℝ
0 < δ
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)
conclusion 3
RegularProcedure (pilotEstimator p ε m select hselect hp hε) θ p
Proof (Lean source)
-- keep: reusable finite-pilot construction, law, localization, or limit API for related adaptive procedures lemma pilot_limit_variance_regular_of_core (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (hweak : WeakLocalLimit (pilotEstimator p ε m select hselect hp hε) θ p (gaussianMeasure 0 (Vstar θ p ε))) (hvhat : ∀ δ : ℝ, 0 < δ → Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)) (htails : ∀ H : ℝ, 0 < H → Tendsto (fun M : ℕ => limsup (fun n => sSup {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ n H, u = ∫⁻ z, ofReal ((scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z) ^ 2 * if M < |scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z| then 1 else 0) ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n}) atTop) atTop (nhds 0)) : WeakLocalLimit (pilotEstimator p ε m select hselect hp hε) θ p (gaussianMeasure 0 (Vstar θ p ε)) ∧ (∀ δ : ℝ, 0 < δ → Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)) ∧ RegularProcedure (pilotEstimator p ε m select hselect hp hε) θ p := by exact ⟨hweak, hvhat, regular_of_weakLocalLimit_and_uniformTails (pilotEstimator p ε m select hselect hp hε) θ p (Vstar θ p ε) hweak htails⟩
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_limit_variance_regular_of_core · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:615
theorem localAsymptoticRisk_eq_of_liminf_localWorstRisk

If every positive-radius local worst-risk sequence has the same liminf, the outer radius supremum in localAsymptoticRisk equals that value. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
v :
ℝ≥0∞
hlim :
∀ H : ℝ
if
0 < H
then
liminf (fun n => localWorstRisk P θ p H n) atTop = v
Proof (Lean source)
lemma localAsymptoticRisk_eq_of_liminf_localWorstRisk {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (v : ℝ≥0∞) (hlim : ∀ H : ℝ, 0 < H → liminf (fun n => localWorstRisk P θ p H n) atTop = v) : localAsymptoticRisk P θ p = v := by unfold localAsymptoticRisk apply le_antisymm · apply sSup_le intro u hu obtain ⟨H, hH, rfl⟩ := hu exact le_of_eq (hlim H hH) · apply le_sSup exact ⟨1, by norm_num, (hlim 1 (by norm_num)).symm⟩
CausalSmith.Stat.LdpAteEfficiencySurface.localAsymptoticRisk_eq_of_liminf_localWorstRisk · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotAttainmentSupport.lean:653
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotBridge 20 declarations This file isolates two interfaces needed by the pilot construction: reducing conditional cylinder factorization to a joint-law identity, and the pointwise existence part of the saddle selector.

Bridges for the private-pilot construction

This file isolates two interfaces needed by the pilot construction: reducing conditional cylinder factorization to a joint-law identity, and the pointwise existence part of the saddle selector.

theorem transcriptFactorizes_of_joint

the transcript factorizes of joint assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
R :
(Fin n → Fin 4) → Measure (Transcript Z)
hmarkov :
∀ i, IsMarkovKernel (Q i)
hprob :
hjoint :
∀ (x : Fin n → Fin 4) (i : Fin n),
(R x).map (fun z ↦ (historyPrefix i z, z i))
= (R x).map (historyPrefix i) ⊗ₘ (Q i).comap (fun h ↦ (x i, h)) (by fun_prop)
Proof (Lean source)
lemma transcriptFactorizes_of_joint {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] (Q : SequentialKernel (Z := Z)) (R : (Fin n → Fin 4) → Measure (Transcript Z)) (hmarkov : ∀ i, IsMarkovKernel (Q i)) (hprob : ∀ x, IsProbabilityMeasure (R x)) (hjoint : ∀ (x : Fin n → Fin 4) (i : Fin n), (R x).map (fun z ↦ (historyPrefix i z, z i)) = (R x).map (historyPrefix i) ⊗ₘ (Q i).comap (fun h ↦ (x i, h)) (by fun_prop)) : TranscriptFactorizes Q R := by intro x refine ⟨hprob x, ?_⟩ intro i B A hB hA letI : IsMarkovKernel (Q i) := hmarkov i have hhist : Measurable (historyPrefix i : Transcript Z → PrivateHistory i) := measurable_pi_lambda _ fun j ↦ measurable_pi_apply j.1 have hpair : Measurable (fun z : Transcript Z ↦ (historyPrefix i z, z i)) := hhist.prodMk (measurable_pi_apply i) change (R x) ((fun z ↦ (historyPrefix i z, z i)) ⁻¹' (B ×ˢ A)) = _ rw [← Measure.map_apply hpair (hB.prod hA), hjoint x i, Measure.compProd_apply_prod hB hA] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptFactorizes_of_joint · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:19
theorem exists_saddle_pointwise

Under the supplied quantities and conditions, the exists saddle pointwise assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the exists saddle pointwise.

Formal statement
p ε :
ℝ
hε :
0 < ε
hθ :
∃ α : StaircaseWeight, ∃ t : ℝ,
conclusion 1
u :
informationObjective θ p ε α t ≤ informationObjective θ p ε α u
conclusion 2
Jstar θ p ε = informationObjective θ p ε α t
Proof (Lean source)
lemma exists_saddle_pointwise (p ε : ℝ) (hp : InteriorAssignment p) (hε : 0 < ε) (θ : TrialParameter) (hθ : InteriorMeans θ) : ∃ α : StaircaseWeight, ∃ t : ℝ, staircaseFeasible ε α ∧ (∀ u, informationObjective θ p ε α t ≤ informationObjective θ p ε α u) ∧ Jstar θ p ε = informationObjective θ p ε α t := by obtain ⟨α, hα, hopt⟩ := Jstar_exists_optimal_weight θ p ε hp hθ hε.le obtain ⟨t, ht⟩ := informationObjective_exists_minimizer θ p ε hp hθ hε.le α hα refine ⟨α, t, hα, ht, ?_⟩ apply hopt.trans apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro _ ⟨u, rfl⟩; exact ht u⟩
CausalSmith.Stat.LdpAteEfficiencySurface.exists_saddle_pointwise · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:45
def fsHistoryToPrivate

the fs history to private is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
Fin n → Type
i :
Fin n
h :
History Z i.val (le_of_lt i.isLt)
fsHistoryToPrivate i h :
PrivateHistory (Z := Z) i
fun j => h ⟨j.1.val, j.2⟩
CausalSmith.Stat.LdpAteEfficiencySurface.fsHistoryToPrivate · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:65
theorem measurable_fsHistoryToPrivate

the measurable fs history to private assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
i :
Fin n
Proof (Lean source)
lemma measurable_fsHistoryToPrivate {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] (i : Fin n) : Measurable (fsHistoryToPrivate (Z := Z) i) := by apply measurable_pi_iff.mpr intro j let k : Fin i.val := ⟨j.1.val, j.2⟩ exact measurable_pi_apply k
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_fsHistoryToPrivate · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:71
def privateToFSHistory

the private to fs history is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
Fin n → Type
i :
Fin n
h :
PrivateHistory (Z := Z) i
privateToFSHistory i h :
History Z i.val (le_of_lt i.isLt)
fun j => h ⟨Fin.castLE (le_of_lt i.isLt) j, j.isLt⟩
CausalSmith.Stat.LdpAteEfficiencySurface.privateToFSHistory · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:79
theorem measurable_privateToFSHistory

the measurable private to fs history assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
i :
Fin n
Proof (Lean source)
lemma measurable_privateToFSHistory {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] (i : Fin n) : Measurable (privateToFSHistory (Z := Z) i) := by apply measurable_pi_iff.mpr intro j let k : {k : Fin n // k < i} := ⟨Fin.castLE (le_of_lt i.isLt) j, j.isLt⟩ exact measurable_pi_apply k
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_privateToFSHistory · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:86
theorem fsHistoryToPrivate_left_inv

the fs history to private left inv assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
Fin n → Type
i :
Fin n
h :
PrivateHistory (Z := Z) i
Proof (Lean source)
lemma fsHistoryToPrivate_left_inv {n : ℕ} {Z : Fin n → Type} (i : Fin n) (h : PrivateHistory (Z := Z) i) : fsHistoryToPrivate i (privateToFSHistory i h) = h := by funext j rfl
CausalSmith.Stat.LdpAteEfficiencySurface.fsHistoryToPrivate_left_inv · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:96
theorem fsHistoryToPrivate_right_inv

the fs history to private right inv assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
Fin n → Type
i :
Fin n
h :
History Z i.val (le_of_lt i.isLt)
Proof (Lean source)
lemma fsHistoryToPrivate_right_inv {n : ℕ} {Z : Fin n → Type} (i : Fin n) (h : History Z i.val (le_of_lt i.isLt)) : privateToFSHistory i (fsHistoryToPrivate i h) = h := by funext j rfl
CausalSmith.Stat.LdpAteEfficiencySurface.fsHistoryToPrivate_right_inv · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:103
def historyMeasurableEquiv

the history measurable equiv is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
i :
Fin n
historyMeasurableEquiv i :
History Z i.val (le_of_lt i.isLt) ≃ᵐ PrivateHistory (Z := Z) i
clause 1
toEquiv := { toFun := fsHistoryToPrivate i invFun := privateToFSHistory i left_inv := fsHistoryToPrivate_right_inv i right_inv := fsHistoryToPrivate_left_inv i }
clause 2
measurable_toFun := measurable_fsHistoryToPrivate i
clause 3
measurable_invFun := measurable_privateToFSHistory i
CausalSmith.Stat.LdpAteEfficiencySurface.historyMeasurableEquiv · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:112
def fsTranscriptToTranscript

the fs transcript to transcript is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
Fin n → Type
z :
fsTranscriptToTranscript z :
Transcript Z
fun i => z i
CausalSmith.Stat.LdpAteEfficiencySurface.fsTranscriptToTranscript · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:125
def transcriptToFSTranscript

the transcript to fs transcript is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
Fin n → Type
z :
Transcript Z
transcriptToFSTranscript z :
fun i => z i
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptToFSTranscript · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:130
theorem measurable_fsTranscriptToTranscript

the measurable fs transcript to transcript assertion holds.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Proof (Lean source)
lemma measurable_fsTranscriptToTranscript {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] : Measurable (fsTranscriptToTranscript (Z := Z)) := by apply measurable_pi_iff.mpr intro i exact measurable_pi_apply i
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_fsTranscriptToTranscript · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:135
theorem measurable_transcriptToFSTranscript

the measurable transcript to fs transcript assertion holds.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Proof (Lean source)
lemma measurable_transcriptToFSTranscript {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] : Measurable (transcriptToFSTranscript (Z := Z)) := by apply measurable_pi_iff.mpr intro i exact measurable_pi_apply i
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_transcriptToFSTranscript · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:144
def finiteSequenceKernel

The finite-sequence kernel family is determined by the displayed parameters.

Definition (Lean source)
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
finiteSequenceKernel Q :
fun i
=> (Q i).comap (fun xh => (xh.1, fsHistoryToPrivate i xh.2)) (by apply prodMk measurable_fst exact (measurable_fsHistoryToPrivate i).comp measurable_snd)
CausalSmith.Stat.LdpAteEfficiencySurface.finiteSequenceKernel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:152
def finiteSequenceTranscript

The transcript law generated by a finite sequence of kernels is determined by the displayed parameters.

Definition (Lean source)
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
x :
Fin n → Fin 4
finiteSequenceTranscript Q x :
Measure (Transcript Z)
CausalSmith.Stat.LdpAteEfficiencySurface.finiteSequenceTranscript · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:163
def transcriptPrefix

For the supplied quantities and conditions, the transcript prefix is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n k :
ℕ
Fin n → Type
hk :
k ≤ n
z :
Transcript Z
transcriptPrefix hk z :
History Z k hk
fun j => z (castLE hk j)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:170
theorem measurable_transcriptPrefix

the measurable transcript prefix assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n k :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
hk :
k ≤ n
Proof (Lean source)
lemma measurable_transcriptPrefix {n k : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] (hk : k ≤ n) : Measurable (transcriptPrefix (Z := Z) hk) := by apply measurable_pi_iff.mpr intro j exact measurable_pi_apply (castLE hk j)
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_transcriptPrefix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:175
theorem finiteSequenceTranscript_map_prefix

The explicit finite transcript construction has exactly the library finite-sequence prefix law. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n k :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
hQ :
∀ i, IsMarkovKernel (Q i)
x :
Fin n → Fin 4
hk :
k ≤ n
Measure.map (transcriptPrefix (Z := Z) hk) (finiteSequenceTranscript Q x)
Proof (Lean source)
lemma finiteSequenceTranscript_map_prefix {n k : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] (Q : SequentialKernel (Z := Z)) (hQ : ∀ i, IsMarkovKernel (Q i)) (x : Fin n → Fin 4) (hk : k ≤ n) : Measure.map (transcriptPrefix (Z := Z) hk) (finiteSequenceTranscript Q x) = prefixLaw (finiteSequenceKernel Q) x k hk := by have hQa : ∀ i, IsMarkovKernel (finiteSequenceKernel Q i) := by intro i letI : IsMarkovKernel (Q i) := hQ i dsimp [finiteSequenceKernel] infer_instance unfold finiteSequenceTranscript rw [Measure.map_map (measurable_transcriptPrefix hk) measurable_fsTranscriptToTranscript] have hcomp : transcriptPrefix (Z := Z) hk ∘ fsTranscriptToTranscript = take hk := by rfl rw [hcomp] exact transcriptLaw_map_prefix (finiteSequenceKernel Q) hQa x k hk
CausalSmith.Stat.LdpAteEfficiencySurface.finiteSequenceTranscript_map_prefix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:183
theorem finiteSequenceTranscript_factorizes

the finite sequence transcript factorizes assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
hmarkov :
∀ i, IsMarkovKernel (Q i)
Proof (Lean source)
lemma finiteSequenceTranscript_factorizes {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] (Q : SequentialKernel (Z := Z)) (hmarkov : ∀ i, IsMarkovKernel (Q i)) : TranscriptFactorizes Q (finiteSequenceTranscript Q) := by let Qa := finiteSequenceKernel Q have hQa : ∀ i, IsMarkovKernel (Qa i) := by intro i letI : IsMarkovKernel (Q i) := hmarkov i dsimp [Qa, finiteSequenceKernel] infer_instance let R : (Fin n → Fin 4) → Measure (Transcript Z) := finiteSequenceTranscript Q change TranscriptFactorizes Q R refine transcriptFactorizes_of_joint Q R hmarkov ?_ ?_ · intro x letI := Causalean.Mathlib.Probability.Kernel.FiniteSequence.isProbabilityMeasure_transcriptLaw Qa hQa x exact Measure.isProbabilityMeasure_map measurable_fsTranscriptToTranscript.aemeasurable · intro x i have hi : i.val + 1 ≤ n := i.isLt have hidx : nextIndex hi = i := Fin.ext (by rfl) let e := historyMeasurableEquiv (Z := Z) i let ez : Z (nextIndex hi) ≃ᵐ Z i := MeasurableEquiv.cast (congrArg Z hidx) (by cases hidx; rfl) let law := transcriptLaw Qa x let μ := prefixLaw Qa x i.val (le_of_succ_le hi) let κ : Kernel (History Z i.val (le_of_succ_le hi)) (Z (nextIndex hi)) := (Qa (nextIndex hi)).comap (fun h => (x (nextIndex hi), h)) (by fun_prop) let f := fun z : Transcript Z => (take (le_of_succ_le hi) z, z (nextIndex hi)) have hf : Measurable f := by dsimp only [f] apply Measurable.prodMk · apply measurable_pi_iff.mpr intro j exact measurable_pi_apply (castLE (le_of_succ_le hi) j) · exact measurable_pi_apply (nextIndex hi) have hbase : Measure.map f law = μ ⊗ₘ κ := by exact Causalean.Mathlib.Probability.Kernel.FiniteSequence.transcriptLaw_map_take_next Qa hQa x i.val hi haveI : IsProbabilityMeasure μ := Causalean.Mathlib.Probability.Kernel.FiniteSequence.isProbabilityMeasure_prefixLaw Qa hQa x i.val _ haveI : IsMarkovKernel κ := by dsimp [κ]; infer_instance haveI : IsMarkovKernel (κ.map ez) := ProbabilityTheory.Kernel.IsMarkovKernel.map κ ez.measurable have hpair : (fun z : Transcript Z => (historyPrefix i z, z i)) ∘ fsTranscriptToTranscript = map e ez ∘ f := by funext z apply Prod.ext · funext j rfl · cases hidx rfl have hownPair : Measurable (fun z : Transcript Z => (historyPrefix i z, z i)) := by apply Measurable.prodMk · apply measurable_pi_iff.mpr intro j exact measurable_pi_apply j.1 · exact measurable_pi_apply i have hjointRaw : Measure.map (map e ez) (μ ⊗ₘ κ) = Measure.map e μ ⊗ₘ (κ.map ez).comap e.symm e.symm.measurable := by calc _ = Measure.map (map e (id : Z i → Z i)) (Measure.map (map (id : _ → _) ez) (μ ⊗ₘ κ)) := by rw [Measure.map_map (by fun_prop) (by fun_prop)] congr 1 _ = Measure.map (map e (id : Z i → Z i)) (μ ⊗ₘ κ.map ez) := by rw [← Measure.compProd_map ez.measurable] _ = _ := map_compProd_prodMap_left_eq_compProd_comap μ e (κ.map ez) have hpref : Measurable (historyPrefix i : Transcript Z → PrivateHistory i) := by apply measurable_pi_iff.mpr intro j exact measurable_pi_apply j.1 have hμ : Measure.map e μ = Measure.map (historyPrefix i) (R x) := by have hprefix := transcriptLaw_map_prefix Qa hQa x i.val (le_of_succ_le hi) calc Measure.map e μ = Measure.map e (Measure.map (take (le_of_succ_le hi)) law) := by rw [hprefix] _ = Measure.map (e ∘ take (le_of_succ_le hi)) law := by rw [Measure.map_map e.measurable (by apply measurable_pi_iff.mpr intro j exact measurable_pi_apply (castLE (le_of_succ_le hi) j))] _ = Measure.map (historyPrefix i ∘ fsTranscriptToTranscript) law := by congr 1 _ = Measure.map (historyPrefix i) (Measure.map fsTranscriptToTranscript law) := by rw [Measure.map_map hpref measurable_fsTranscriptToTranscript] _ = _ := by rfl have hκ : (κ.map ez).comap e.symm e.symm.measurable = (Q i).comap (fun h => (x i, h)) (by fun_prop) := by ext h A hA rw [ProbabilityTheory.Kernel.comap_apply, ProbabilityTheory.Kernel.map_apply' _ _ _ hA, ProbabilityTheory.Kernel.comap_apply, ProbabilityTheory.Kernel.comap_apply] dsimp only [Qa, finiteSequenceKernel] rw [ProbabilityTheory.Kernel.comap_apply] cases hidx · change ((Q i) (x i, fsHistoryToPrivate i (privateToFSHistory i h))) A = ((Q i) (x i, h)) A rw [fsHistoryToPrivate_left_inv] · exact ez.measurable dsimp only [R] unfold finiteSequenceTranscript rw [Measure.map_map hownPair measurable_fsTranscriptToTranscript, hpair, ← Measure.map_map (by fun_prop) hf, hbase, hjointRaw, hμ, hκ] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.finiteSequenceTranscript_factorizes · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:204
theorem exists_transcript_factorization

the exists transcript factorization assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
hmarkov :
∀ i, IsMarkovKernel (Q i)
∃ R : (Fin n → Fin 4) → Measure (Transcript Z), TranscriptFactorizes Q R
Proof (Lean source)
lemma exists_transcript_factorization {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] (Q : SequentialKernel (Z := Z)) (hmarkov : ∀ i, IsMarkovKernel (Q i)) : ∃ R : (Fin n → Fin 4) → Measure (Transcript Z), TranscriptFactorizes Q R := ⟨finiteSequenceTranscript Q, finiteSequenceTranscript_factorizes Q hmarkov⟩
CausalSmith.Stat.LdpAteEfficiencySurface.exists_transcript_factorization · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotBridge.lean:320
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotCDFIdentity 6 declarations This file separates the finite-sample distributional step from the later triangular-row Gaussian limit.

Exact conditional CDF identity for the private pilot estimator

This file separates the finite-sample distributional step from the later triangular-row Gaussian limit. The conditional CDF below is the literal iid main-row product mass evaluated on the centered root-n estimator error.

theorem finite_sum_cast_eq

A finite sum is invariant under the canonical transport along an equality of its row lengths. For the displayed inputs and conditions, the stated result follows.

Formal statement
N K :
ℕ
h :
N = K
q :
Fin K → ℝ
(∑ i : Fin N, q (cast h i)) = ∑ j : Fin K, q j
Proof (Lean source)
lemma finite_sum_cast_eq {N K : ℕ} (h : N = K) (q : Fin K → ℝ) : (∑ i : Fin N, q (cast h i)) = ∑ j : Fin K, q j := by subst K rfl
CausalSmith.Stat.LdpAteEfficiencySurface.finite_sum_cast_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotCDFIdentity.lean:21
def adaptivePilotRowScaledCDF

The conditional CDF of the centered root-n error in one adaptive iid main row. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Row Scaled CDF is determined by the displayed parameters.

Definition (Lean source)
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
x :
ℝ
adaptivePilotRowScaledCDF select θ h η p ε m hselect hp hε n x :
ℝ
∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v * if sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j))
≤ x then 1 else 0
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowScaledCDF · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotCDFIdentity.lean:28
def pilotPrefixScaledErrorCDF

The genuine released-prefix mixture of the conditional adaptive-row CDF. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The pilot Prefix Scaled Error CDF is determined by the displayed parameters.

Definition (Lean source)
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
x :
ℝ
pilotPrefixScaledErrorCDF select θ h p ε m hselect hp hε hmn x :
ℝ
∑ u : Fin (m n) → Fin 4, pilotPrefixWeight (localAlternative θ h n) p ε m n u * adaptivePilotRowScaledCDF select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n x
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixScaledErrorCDF · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotCDFIdentity.lean:40
theorem scaledError_pilotAdaptiveEncode_eq_adaptivePilotRow

On a correctly encoded transcript, the centered scaled estimator error is the scaled average of the literal centered adaptive main-row scores. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the scaled Error pilot Adaptive Encode eq adaptive Pilot Row.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
hlocal :
hN :
0 < adaptiveMainSize m n
hmain :
adaptiveMainSize m n = n - m n
u :
Fin (m n) → Fin 4
v :
Fin (n - m n) → Fin 14
scaledError (pilotEstimator p ε m select hselect hp hε) θ h n (pilotAdaptiveEncode hmn u v)
= sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * ∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i))
Proof (Lean source)
lemma scaledError_pilotAdaptiveEncode_eq_adaptivePilotRow (θ h : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (hlocal : InteriorMeans (localAlternative θ h n)) (hN : 0 < adaptiveMainSize m n) (hmain : adaptiveMainSize m n = n - m n) (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : scaledError (pilotEstimator p ε m select hselect hp hε) θ h n (pilotAdaptiveEncode hmn u v) = sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * ∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i)) := by let η := pilotAdaptivePrefixTheta p ε m hmn u have htrue : adaptiveTrueParam θ h n = localAlternative θ h n := adaptiveTrueParam_eq_localAlternative θ h n hlocal have herr := adaptivePilotRow_estimatorError_eq select θ h (fun _ => η) p ε m hselect hp hε n hN (fun i => v (cast hmain i)) have hcast : (adaptiveMainSize m n : ℝ) = (n - m n : ℕ) := by exact_mod_cast hmain have hsum : (∑ i : Fin (adaptiveMainSize m n), adaptiveSelectedScore select η p ε (v (cast hmain i))) = ∑ j : Fin (n - m n), adaptiveSelectedScore select η p ε (v j) := finite_sum_cast_eq hmain (fun j => adaptiveSelectedScore select η p ε (v j)) unfold scaledError change sqrt (n : ℝ) * (tauStar p ε m (select) (pilotAdaptiveEncode hmn u v) - contrast (localAlternative θ h n)) = _ rw [tauStar_pilotAdaptiveEncode select p ε m hp hε hmn u v] calc sqrt (n : ℝ) * (contrast η + ((n - m n : ℕ) : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select η p ε (v j)) - contrast (localAlternative θ h n)) = sqrt (n : ℝ) * (contrast η + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ i, adaptiveSelectedScore select η p ε (v (cast hmain i))) - contrast (adaptiveTrueParam θ h n)) := by rw [htrue, hcast, hsum] _ = sqrt (n : ℝ) * ((adaptiveMainSize m n : ℝ)⁻¹ * ∑ i, adaptivePilotRowScore select θ h (fun _ => η) p ε hselect hp hε n (v (cast hmain i))) := by rw [herr] _ = _ := by simp only [η]; ring
CausalSmith.Stat.LdpAteEfficiencySurface.scaledError_pilotAdaptiveEncode_eq_adaptivePilotRow · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotCDFIdentity.lean:52
theorem transcriptLaw_scaledError_le_eq_ofReal_pilotPrefixScaledErrorCDF

At every proper pilot split with an interior local alternative, the actual scaled-error transcript CDF is exactly the released-prefix mixture of the conditional centered iid-row CDFs. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Law scaled Error le eq of Real pilot Prefix Scaled Error CDF.

Formal statement
select :
shared
p ε x :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
hsub :
n :
ℕ
hn :
2 ≤ n
hlocal :
(transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n) {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z ≤ x}
= ofReal (pilotPrefixScaledErrorCDF select θ h p ε m hselect hp hε (le_of_lt (hsub.2 n hn).2) x)
Proof (Lean source)
lemma transcriptLaw_scaledError_le_eq_ofReal_pilotPrefixScaledErrorCDF (θ h : TrialParameter) (p ε x : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (hsub : PilotSublinear m) {n : ℕ} (hn : 2 ≤ n) (hlocal : InteriorMeans (localAlternative θ h n)) : (transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n) {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z ≤ x} = ofReal (pilotPrefixScaledErrorCDF select θ h p ε m hselect hp hε (le_of_lt (hsub.2 n hn).2) x) := by classical let θn := localAlternative θ h n let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 let μ := transcriptLaw (pilotEstimator p ε m select hselect hp hε) θn p n let A : Set (Transcript (pilotOutputFamily n)) := {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z ≤ x} let e := fun uv : (Fin (m n) → Fin 4) × (Fin (n - m n) → Fin 14) => pilotAdaptiveEncode hmn uv.1 uv.2 have hN : 0 < adaptiveMainSize m n := by rw [adaptiveMainSize, adaptivePilotSize_eq m hsub hn] exact Nat.sub_pos_of_lt (hsub.2 n hn).2 have hmain : adaptiveMainSize m n = n - m n := by simp [adaptiveMainSize, adaptivePilotSize_eq m hsub hn] have htrue : adaptiveTrueParam θ h n = θn := adaptiveTrueParam_eq_localAlternative θ h n hlocal have hw (u : Fin (m n) → Fin 4) : 0 ≤ pilotPrefixWeight θn p ε m n u := pilotPrefixWeight_nonneg θn p ε m n hp hlocal u have hm (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : 0 ≤ ∏ j, adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j) := by apply Finset.prod_nonneg intro j _ exact adaptiveMainMass_nonneg select θn _ p ε hselect hp hlocal (pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0))) hε (v j) have hatom (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : μ {e (u, v)} = ofReal (pilotPrefixWeight θn p ε m n u * ∏ j, adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) := by rw [pilotAdaptive_joint_singleton_eq_prefix_mul_mainProduct select θn p ε m hselect hp hlocal hε hmn u v] change ofReal (pilotPrefixWeight θn p ε m n u) * ofReal (∏ j, adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) = _ exact (ENNReal.ofReal_mul (hw u)).symm have hA : MeasurableSet A := MeasurableSet.of_discrete rw [show μ A = ∫⁻ z, A.indicator (fun _ => (1 : ENNReal)) z ∂μ by rw [lintegral_indicator hA, setLIntegral_one]] rw [MeasureTheory.lintegral_fintype] rw [sum_eq_sum_image_of_zero_off_range e (pilotAdaptiveEncode_pair_injective hmn)] · rw [Fintype.sum_prod_type] simp_rw [hatom] have hind (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : A.indicator (fun _ => (1 : ENNReal)) (e (u, v)) = if sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * (∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i))) ≤ x then 1 else 0 := by rw [Set.indicator_apply] simp only [A, Set.mem_ofPred_eq, e, scaledError_pilotAdaptiveEncode_eq_adaptivePilotRow select θ h p ε m hselect hp hε hmn hlocal hN hmain u v] simp_rw [hind] have hindOfReal (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : (if sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * (∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i))) ≤ x then (1 : ENNReal) else 0) = ofReal (if sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * (∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i))) ≤ x then (1 : ℝ) else 0) := by split_ifs <;> simp simp_rw [hindOfReal] have hmul (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : ofReal (if sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * (∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i))) ≤ x then (1 : ℝ) else 0) * ofReal (pilotPrefixWeight θn p ε m n u * ∏ j, adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) = ofReal ((if sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * (∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i))) ≤ x then (1 : ℝ) else 0) * (pilotPrefixWeight θn p ε m n u * ∏ j, adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) := by exact (ENNReal.ofReal_mul (by split_ifs <;> positivity)).symm simp_rw [hmul] have hofReal_sum {B : Type} [Fintype B] (f : B → ℝ) (hf : ∀ b, 0 ≤ f b) : (∑ b, ofReal (f b)) = ofReal (∑ b, f b) := by simpa using (ENNReal.ofReal_sum_of_nonneg (s := univ) (fun b _ => hf b)).symm rw [show (∑ u : Fin (m n) → Fin 4, ∑ v : Fin (n - m n) → Fin 14, ofReal ((if sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * (∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i))) ≤ x then (1 : ℝ) else 0) * (pilotPrefixWeight θn p ε m n u * ∏ j, adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)))) = ofReal (∑ u : Fin (m n) → Fin 4, ∑ v : Fin (n - m n) → Fin 14, (if sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * (∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i))) ≤ x then (1 : ℝ) else 0) * (pilotPrefixWeight θn p ε m n u * ∏ j, adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) by rw [show (∑ u : Fin (m n) → Fin 4, ∑ v : Fin (n - m n) → Fin 14, ofReal ((if sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * (∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i))) ≤ x then (1 : ℝ) else 0) * (pilotPrefixWeight θn p ε m n u * ∏ j, adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)))) = ∑ u : Fin (m n) → Fin 4, ofReal (∑ v : Fin (n - m n) → Fin 14, (if sqrt (n : ℝ) * (adaptiveMainSize m n : ℝ)⁻¹ * (∑ i, adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v (cast hmain i))) ≤ x then (1 : ℝ) else 0) * (pilotPrefixWeight θn p ε m n u * ∏ j, adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) by apply Finset.sum_congr rfl intro u _ exact hofReal_sum _ (fun v => mul_nonneg (by split_ifs <;> positivity) (mul_nonneg (hw u) (hm u v))) ] exact hofReal_sum _ (fun u => Finset.sum_nonneg fun v _ => mul_nonneg (by split_ifs <;> positivity) (mul_nonneg (hw u) (hm u v))) ] congr 1 rw [show hmn = le_of_lt (hsub.2 n hn).2 from Subsingleton.elim _ _] unfold pilotPrefixScaledErrorCDF adaptivePilotRowScaledCDF apply Finset.sum_congr rfl intro u _ rw [Finset.mul_sum] let rowEquiv : (Fin (adaptiveMainSize m n) → Fin 14) ≃ (Fin (n - m n) → Fin 14) := Equiv.piCongrLeft (fun _ : Fin (n - m n) => Fin 14) (finCongr hmain) symm apply Fintype.sum_equiv rowEquiv intro v have happly (i : Fin (adaptiveMainSize m n)) : rowEquiv v (cast hmain i) = v i := by rfl have happly' (i : Fin (adaptiveMainSize m n)) : rowEquiv v ((finCongr hmain) i) = v i := by change rowEquiv v (cast hmain i) = v i exact happly i have hscores : (∑ i : Fin (adaptiveMainSize m n), adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (rowEquiv v (cast hmain i))) = ∑ i : Fin (adaptiveMainSize m n), adaptivePilotRowScore select θ h (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε hselect hp hε n (v i) := by apply Finset.sum_congr rfl intro i _ rw [happly] have hprod : (∏ i : Fin (adaptiveMainSize m n), adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v i)) = ∏ j : Fin (n - m n), adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (rowEquiv v j) := by simpa only [happly'] using (Equiv.prod_comp (finCongr hmain) (fun j : Fin (n - m n) => adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (rowEquiv v j))) simp only [adaptivePilotRowProductMass, adaptivePilotRowMass, htrue] rw [hprod, hscores] ring · intro z hz have hzμ := pilotAdaptive_singleton_zero_of_not_range select θn p ε m hselect hp hε hmn z hz apply mul_eq_zero.mpr right simpa only [μ] using hzμ
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw_scaledError_le_eq_ofReal_pilotPrefixScaledErrorCDF · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotCDFIdentity.lean:103
theorem transcriptLaw_real_scaledError_le_eq_pilotPrefixScaledErrorCDF

The real-valued CDF of the actual scaled estimator error is the genuine prefix-weighted conditional row CDF. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Law real scaled Error le eq pilot Prefix Scaled Error CDF.

Formal statement
select :
shared
p ε x :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
hsub :
n :
ℕ
hn :
2 ≤ n
hlocal :
(transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z ≤ x}
= pilotPrefixScaledErrorCDF select θ h p ε m hselect hp hε (le_of_lt (hsub.2 n hn).2) x
Proof (Lean source)
lemma transcriptLaw_real_scaledError_le_eq_pilotPrefixScaledErrorCDF (θ h : TrialParameter) (p ε x : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (hsub : PilotSublinear m) {n : ℕ} (hn : 2 ≤ n) (hlocal : InteriorMeans (localAlternative θ h n)) : (transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z ≤ x} = pilotPrefixScaledErrorCDF select θ h p ε m hselect hp hε (le_of_lt (hsub.2 n hn).2) x := by let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 have htrue : adaptiveTrueParam θ h n = localAlternative θ h n := adaptiveTrueParam_eq_localAlternative θ h n hlocal have hw (u : Fin (m n) → Fin 4) : 0 ≤ pilotPrefixWeight (localAlternative θ h n) p ε m n u := pilotPrefixWeight_nonneg (localAlternative θ h n) p ε m n hp hlocal u have hmix : 0 ≤ pilotPrefixScaledErrorCDF select θ h p ε m hselect hp hε hmn x := by unfold pilotPrefixScaledErrorCDF adaptivePilotRowScaledCDF apply Finset.sum_nonneg intro u _ apply mul_nonneg (hw u) apply Finset.sum_nonneg intro v _ apply mul_nonneg · unfold adaptivePilotRowProductMass adaptivePilotRowMass rw [htrue] apply Finset.prod_nonneg intro j _ exact adaptiveMainMass_nonneg select (localAlternative θ h n) _ p ε hselect hp hlocal (pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0))) hε (v j) · split_ifs <;> positivity rw [Measure.real_def, transcriptLaw_scaledError_le_eq_ofReal_pilotPrefixScaledErrorCDF select θ h p ε x m hselect hp hε hsub hn hlocal] exact ENNReal.toReal_ofReal hmix
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw_real_scaledError_le_eq_pilotPrefixScaledErrorCDF · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotCDFIdentity.lean:311
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotGaussianTransfer 7 declarations This module transfers an explicit conditional Gaussian CDF limit for every convergent sequence of genuine pilot selectors to the unconditional CDF of the actual private-pilot transcript.

Transfer of conditional pilot-row Gaussian limits

This module transfers an explicit conditional Gaussian CDF limit for every convergent sequence of genuine pilot selectors to the unconditional CDF of the actual private-pilot transcript. It contains no triangular-array CLT: that analytic input remains a premise of the main theorem.

def pilotGaussianRadius

The shrinking localization radius used to average conditional row limits. It goes to zero slowly enough that the pilot Chebyshev bound still vanishes. For the displayed inputs and conditions, the stated result follows. The pilot Gaussian Radius is determined by the displayed parameters.

Definition (Lean source)
m :
ℕ → ℕ
n :
ℕ
pilotGaussianRadius θ h m n :
ℝ
2 * max (sqrt ((sqrt (m n : ℝ))⁻¹)) (sqrt (dist (localAlternative θ h n) θ))
CausalSmith.Stat.LdpAteEfficiencySurface.pilotGaussianRadius · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGaussianTransfer.lean:26
theorem pilotGaussianBaseRadius_tendsto_zero

The pilot-size component of pilotGaussianRadius tends to zero. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hdiv :
Tendsto (fun n => sqrt ((sqrt (m n : ℝ))⁻¹)) atTop (nhds 0)
Proof (Lean source)
lemma pilotGaussianBaseRadius_tendsto_zero (m : ℕ → ℕ) (hdiv : PilotDiverges m) : Tendsto (fun n => sqrt ((sqrt (m n : ℝ))⁻¹)) atTop (nhds 0) := by have hm : Tendsto (fun n => (m n : ℝ)) atTop atTop := tendsto_natCast_atTop_atTop.comp hdiv have hsqrt : Tendsto (fun n => sqrt (m n : ℝ)) atTop atTop := Real.tendsto_sqrt_atTop.comp hm have hinv : Tendsto (fun n => (sqrt (m n : ℝ))⁻¹) atTop (nhds 0) := tendsto_inv_atTop_zero.comp hsqrt simpa using hinv.sqrt
CausalSmith.Stat.LdpAteEfficiencySurface.pilotGaussianBaseRadius_tendsto_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGaussianTransfer.lean:32
theorem pilotGaussianRadius_tendsto_zero

The localization radius tends to zero. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
hdiv :
Proof (Lean source)
lemma pilotGaussianRadius_tendsto_zero (θ h : TrialParameter) (m : ℕ → ℕ) (hdiv : PilotDiverges m) : Tendsto (pilotGaussianRadius θ h m) atTop (nhds 0) := by have hbase := pilotGaussianBaseRadius_tendsto_zero m hdiv have hdist : Tendsto (fun n => dist (localAlternative θ h n) θ) atTop (nhds 0) := by simpa using (localAlternative_tendsto θ h).dist (tendsto_const_nhds : Tendsto (fun _ : ℕ => θ) atTop (nhds θ)) have hshift : Tendsto (fun n => sqrt (dist (localAlternative θ h n) θ)) atTop (nhds 0) := by simpa using hdist.sqrt change Tendsto (fun n => 2 * max (sqrt ((sqrt (m n : ℝ))⁻¹)) (sqrt (dist (localAlternative θ h n) θ))) atTop (nhds 0) convert ((tendsto_const_nhds : Tendsto (fun _ : ℕ => (2 : ℝ)) atTop (nhds 2)).mul (hbase.max hshift)) using 1 <;> norm_num
CausalSmith.Stat.LdpAteEfficiencySurface.pilotGaussianRadius_tendsto_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGaussianTransfer.lean:45
theorem pilotPrefixCDF_uniform_of_subsequential_tendsto

Convergence along every selected subsequence gives uniform control over raw released prefixes in the shrinking Gaussian-transfer neighborhood. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Prefix CDF uniform of subsequential tendsto.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
ρ :
ℕ → ℝ
E :
(n : ℕ) → (Fin (m n) → Fin 4) → ℝ
L :
ℝ
hρ :
hseq :
∀ (φ : ℕ → ℕ),
StrictMono φ → ∀ (hφlarge : ∀ k, m (φ k) < φ k) (u : (k : ℕ) → Fin (m (φ k)) → Fin 4), Tendsto (fun k => pilotAdaptivePrefixTheta p ε m (le_of_lt (hφlarge k)) (u k)) atTop (nhds θ) → Tendsto (fun k => E (φ k) (u k)) atTop (nhds L)
hlt :
∀ᶠ n in atTop, m n < n
δ :
ℝ
0 < δ
∀ᶠ n in atTop, ∀ (hmn : m n ≤ n) (u : Fin (m n) → Fin 4), dist (pilotAdaptivePrefixTheta p ε m hmn u) θ
≤ ρ n → |E n u - L| < δ
Proof (Lean source)
lemma pilotPrefixCDF_uniform_of_subsequential_tendsto (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (ρ : ℕ → ℝ) (E : (n : ℕ) → (Fin (m n) → Fin 4) → ℝ) (L : ℝ) (hρ : Tendsto ρ atTop (nhds 0)) (hseq : ∀ (φ : ℕ → ℕ), StrictMono φ → ∀ (hφlarge : ∀ k, m (φ k) < φ k) (u : (k : ℕ) → Fin (m (φ k)) → Fin 4), Tendsto (fun k => pilotAdaptivePrefixTheta p ε m (le_of_lt (hφlarge k)) (u k)) atTop (nhds θ) → Tendsto (fun k => E (φ k) (u k)) atTop (nhds L)) (hlt : ∀ᶠ n in atTop, m n < n) : ∀ δ : ℝ, 0 < δ → ∀ᶠ n in atTop, ∀ (hmn : m n ≤ n) (u : Fin (m n) → Fin 4), dist (pilotAdaptivePrefixTheta p ε m hmn u) θ ≤ ρ n → |E n u - L| < δ := by intro δ hδ by_contra huniform have hfrequent : ∃ᶠ n in atTop, ¬(∀ (hmn : m n ≤ n) (u : Fin (m n) → Fin 4), dist (pilotAdaptivePrefixTheta p ε m hmn u) θ ≤ ρ n → |E n u - L| < δ) := not_eventually.mp huniform have hbad : ∃ᶠ n in atTop, ∃ hmn : m n < n, ∃ (u : Fin (m n) → Fin 4), dist (pilotAdaptivePrefixTheta p ε m (le_of_lt hmn) u) θ ≤ ρ n ∧ δ ≤ |E n u - L| := by apply (hfrequent.and_eventually hlt).mono intro n hpair rcases hpair with ⟨hn, hmn⟩ push Not at hn obtain ⟨hmn', u, hu, hE⟩ := hn refine ⟨hmn, u, ?_, hE⟩ simpa only [Subsingleton.elim hmn' (le_of_lt hmn)] using hu obtain ⟨φ, hφ, hφbad⟩ := extraction_of_frequently_atTop hbad choose u hu using fun k => (hφbad k).2 have hselector : Tendsto (fun k => pilotAdaptivePrefixTheta p ε m (le_of_lt (hφbad k).1) (u k)) atTop (nhds θ) := by rw [Metric.tendsto_atTop] intro η hη have hρsub : Tendsto (fun k => ρ (φ k)) atTop (nhds 0) := hρ.comp hφ.tendsto_atTop have hρlt : ∀ᶠ k in atTop, ρ (φ k) < η := (tendsto_order.1 hρsub).2 η hη rcases eventually_atTop.1 hρlt with ⟨N, hN⟩ exact ⟨N, fun k hk => lt_of_le_of_lt (hu k).1 (hN k hk)⟩ have hE := hseq φ hφ (fun k => (hφbad k).1) u hselector have hclose : ∀ᶠ k in atTop, |E (φ k) (u k) - L| < δ := by exact eventually_atTop.2 (Metric.tendsto_atTop.1 hE δ hδ) rcases eventually_atTop.1 hclose with ⟨N, hN⟩ exact (not_lt_of_ge (hu N).2 (hN N le_rfl)).elim
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixCDF_uniform_of_subsequential_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGaussianTransfer.lean:63
theorem pilotGaussianBadEnvelope_tendsto_zero

The varying-radius Chebyshev envelope used in Gaussian transfer vanishes. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Gaussian Bad Envelope tendsto zero.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
hε :
0 < ε
hdiv :
Tendsto (fun n => pilotBadMassEnvelope p ε (sqrt ((sqrt (m n : ℝ))⁻¹)) m n) atTop (nhds 0)
Proof (Lean source)
lemma pilotGaussianBadEnvelope_tendsto_zero (p ε : ℝ) (m : ℕ → ℕ) (hp : InteriorAssignment p) (hε : 0 < ε) (hdiv : PilotDiverges m) : Tendsto (fun n => pilotBadMassEnvelope p ε (sqrt ((sqrt (m n : ℝ))⁻¹)) m n) atTop (nhds 0) := by let c0 := controlProb p * (exp ε - 1) / (exp ε + 3) let c1 := p * (exp ε - 1) / (exp ε + 3) have hc0 : 0 < c0 := by dsimp [c0, controlProb] have hep : 1 < exp ε := by simpa using (Real.exp_lt_exp.mpr hε : exp 0 < exp ε) have hcp : 0 < 1 - p := by linarith [hp.2] exact div_pos (mul_pos hcp (sub_pos.mpr hep)) (by positivity) have hc1 : 0 < c1 := by dsimp [c1] have hep : 1 < exp ε := by simpa using (Real.exp_lt_exp.mpr hε : exp 0 < exp ε) exact div_pos (mul_pos hp.1 (sub_pos.mpr hep)) (by positivity) have hm : Tendsto (fun n => (m n : ℝ)) atTop atTop := tendsto_natCast_atTop_atTop.comp hdiv have hsqrt : Tendsto (fun n => sqrt (m n : ℝ)) atTop atTop := Real.tendsto_sqrt_atTop.comp hm have hpos : ∀ᶠ n in atTop, 0 < (m n : ℝ) := hm.eventually_gt_atTop 0 have hrewrite : ∀ᶠ n in atTop, pilotBadMassEnvelope p ε (sqrt ((sqrt (m n : ℝ))⁻¹)) m n = 1 / (sqrt (m n : ℝ) * c0 ^ 2) + 1 / (sqrt (m n : ℝ) * c1 ^ 2) := by filter_upwards [hpos] with n hn have hs : 0 < sqrt (m n : ℝ) := Real.sqrt_pos.2 hn have hsq : (sqrt ((sqrt (m n : ℝ))⁻¹)) ^ 2 = (sqrt (m n : ℝ))⁻¹ := Real.sq_sqrt (inv_nonneg.mpr hs.le) have hcancel : (m n : ℝ) * (sqrt (m n : ℝ))⁻¹ = sqrt (m n : ℝ) := by nth_rewrite 1 [← Real.sq_sqrt hn.le] field_simp unfold pilotBadMassEnvelope have heq0 : sqrt ((sqrt (m n : ℝ))⁻¹) * controlProb p * (exp ε - 1) / (exp ε + 3) = sqrt ((sqrt (m n : ℝ))⁻¹) * c0 := by dsimp only [c0] ring have heq1 : sqrt ((sqrt (m n : ℝ))⁻¹) * p * (exp ε - 1) / (exp ε + 3) = sqrt ((sqrt (m n : ℝ))⁻¹) * c1 := by dsimp only [c1] ring rw [heq0, heq1] simp only [mul_pow, hsq, ← mul_assoc, hcancel] have h0 : Tendsto (fun n => 1 / (sqrt (m n : ℝ) * c0 ^ 2)) atTop (nhds 0) := by convert tendsto_inv_atTop_zero.comp (hsqrt.const_mul_atTop (sq_pos_of_pos hc0)) using 1 <;> simp [Function.comp_def, one_div, mul_comm] have h1 : Tendsto (fun n => 1 / (sqrt (m n : ℝ) * c1 ^ 2)) atTop (nhds 0) := by convert tendsto_inv_atTop_zero.comp (hsqrt.const_mul_atTop (sq_pos_of_pos hc1)) using 1 <;> simp [Function.comp_def, one_div, mul_comm] have ht : Tendsto (fun n => 1 / (sqrt (m n : ℝ) * c0 ^ 2) + 1 / (sqrt (m n : ℝ) * c1 ^ 2)) atTop (nhds 0) := by convert h0.add h1 using 1 <;> norm_num exact ht.congr' (hrewrite.mono fun _ hn => hn.symm)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotGaussianBadEnvelope_tendsto_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGaussianTransfer.lean:119
theorem pilot_scaledError_cdf_tendsto_of_conditionalRows

An explicit conditional adaptive-row Gaussian CDF limit along every subsequence and every convergent genuine selector sequence implies the exact unconditional scaled-error CDF limit of the private-pilot transcript. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot scaled Error cdf tendsto of conditional Rows.

Formal statement
select :
shared
p ε x :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiv :
hsub :
hrow :
∀ (φ : ℕ → ℕ),
StrictMono φ → ∀ η : ℕ → TrialParameter, (∀ k, InteriorMeans (η k)) → Tendsto η atTop (nhds θ) → Tendsto (fun k => adaptivePilotRowScaledCDF select θ h (fun _ => η k) p ε m hselect hp hε (φ k) x) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x)))
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z ≤ x}) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x)))
Proof (Lean source)
theorem pilot_scaledError_cdf_tendsto_of_conditionalRows (θ h : TrialParameter) (p ε x : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) (hrow : ∀ (φ : ℕ → ℕ), StrictMono φ → ∀ η : ℕ → TrialParameter, (∀ k, InteriorMeans (η k)) → Tendsto η atTop (nhds θ) → Tendsto (fun k => adaptivePilotRowScaledCDF select θ h (fun _ => η k) p ε m hselect hp hε (φ k) x) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x)))) : Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z ≤ x}) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x))) := by classical let L := (gaussianMeasure 0 (Vstar θ p ε)).real (Iic x) let base : ℕ → ℝ := fun n => sqrt ((sqrt (m n : ℝ))⁻¹) let ρ := pilotGaussianRadius θ h m let E : (n : ℕ) → (Fin (m n) → Fin 4) → ℝ := fun n u => if hn : 2 ≤ n then adaptivePilotRowScaledCDF select θ h (fun _ => pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε m hselect hp hε n x else L have huniform : ∀ δ : ℝ, 0 < δ → ∀ᶠ n in atTop, ∀ (hmn : m n ≤ n) (u : Fin (m n) → Fin 4), dist (pilotAdaptivePrefixTheta p ε m hmn u) θ ≤ ρ n → |E n u - L| < δ := by apply pilotPrefixCDF_uniform_of_subsequential_tendsto θ p ε m ρ E L (pilotGaussianRadius_tendsto_zero θ h m hdiv) · intro φ hφ hφlarge u hu let η : ℕ → TrialParameter := fun k => pilotAdaptivePrefixTheta p ε m (le_of_lt (hφlarge k)) (u k) have hηint : ∀ k, InteriorMeans (η k) := by intro k exact pilotTheta_interior p ε m (pilotAdaptiveEncode _ (u k) (fun _ => 0)) have hev : ∀ᶠ k in atTop, 2 ≤ φ k := hφ.tendsto_atTop.eventually_ge_atTop 2 apply (hrow φ hφ η hηint hu).congr' filter_upwards [hev] with k hk simp only [E, dif_pos hk, η, Subsingleton.elim] · filter_upwards [eventually_ge_atTop 2] with n hn exact (hsub.2 n hn).2 have htarget0 : 0 ≤ L := measureReal_nonneg have htarget1 : L ≤ 1 := by letI : IsProbabilityMeasure (gaussianMeasure 0 (Vstar θ p ε)) := by infer_instance exact measureReal_le_one let rowParam : ℕ → TrialParameter := fun n => if InteriorMeans (localAlternative θ h n) then localAlternative θ h n else θ have hrowParamInterior (n : ℕ) : InteriorMeans (rowParam n) := by dsimp only [rowParam] split_ifs with hn · exact hn · exact hθ let w : (n : ℕ) → (Fin (m n) → Fin 4) → ℝ := fun n => pilotPrefixWeight (rowParam n) p ε m n have havg : Tendsto (fun n => ∑ u, w n u * E n u) atTop (nhds L) := by apply finitePilot_conditionalCDF_tendsto w E L · intro n u exact pilotPrefixWeight_nonneg (rowParam n) p ε m n hp (hrowParamInterior n) u · intro n exact pilotPrefixWeight_sum (rowParam n) p ε m n · intro n u by_cases hn : 2 ≤ n · simp only [E, dif_pos hn] let η : ℕ → TrialParameter := fun _ => pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u have hηint : ∀ k, InteriorMeans (η k) := fun _ => pilotTheta_interior p ε m (pilotAdaptiveEncode _ u (fun _ => 0)) unfold adaptivePilotRowScaledCDF apply Finset.sum_nonneg intro v _ apply mul_nonneg · simpa only [η, Subsingleton.elim] using adaptivePilotRowProductMass_nonneg select θ h η p ε m hselect hp hθ hηint hε n v · split_ifs <;> positivity · simp only [E, dif_neg hn] exact htarget0 · intro n u by_cases hn : 2 ≤ n · simp only [E, dif_pos hn] let η : ℕ → TrialParameter := fun _ => pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u have hηint : ∀ k, InteriorMeans (η k) := fun _ => pilotTheta_interior p ε m (pilotAdaptiveEncode _ u (fun _ => 0)) unfold adaptivePilotRowScaledCDF calc _ ≤ ∑ v, adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v := by apply Finset.sum_le_sum intro v _ have hm0 := adaptivePilotRowProductMass_nonneg select θ h η p ε m hselect hp hθ hηint hε n v split_ifs · simpa only [mul_one, η] using (le_refl (adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v)) · simpa only [mul_zero] using hm0 _ = 1 := adaptivePilotRowProductMass_sum select θ h η p ε m hselect hp hηint hε n · simp only [E, dif_neg hn] exact htarget1 · exact htarget0 · exact htarget1 · intro δ hδ have hu := huniform δ hδ have hbase0 : Tendsto base atTop (nhds 0) := pilotGaussianBaseRadius_tendsto_zero m hdiv have hbasepos : ∀ᶠ n in atTop, 0 < base n := by have hmpos : ∀ᶠ n in atTop, 0 < (m n : ℝ) := (tendsto_natCast_atTop_atTop.comp hdiv).eventually_gt_atTop 0 filter_upwards [hmpos] with n hn exact Real.sqrt_pos.2 (inv_pos.mpr (Real.sqrt_pos.2 hn)) have hdist0 : Tendsto (fun n => dist (localAlternative θ h n) θ) atTop (nhds 0) := by simpa using (localAlternative_tendsto θ h).dist (tendsto_const_nhds : Tendsto (fun _ : ℕ => θ) atTop (nhds θ)) have hdistle : ∀ᶠ n in atTop, dist (localAlternative θ h n) θ ≤ sqrt (dist (localAlternative θ h n) θ) := by have hdlt : ∀ᶠ n in atTop, dist (localAlternative θ h n) θ < 1 := (tendsto_order.1 hdist0).2 1 zero_lt_one filter_upwards [hdlt] with n hn let d := dist (localAlternative θ h n) θ have hd0 : 0 ≤ d := dist_nonneg have hs0 : 0 ≤ sqrt d := Real.sqrt_nonneg d have hs2 : (sqrt d) ^ 2 = d := Real.sq_sqrt hd0 have hd1 : d ≤ 1 := hn.le nlinarith [sq_nonneg (d - sqrt d)] let M := adaptiveInteriorMargin θ have hM : 0 < M := adaptiveInteriorMargin_pos θ hθ have hbaseSmall : ∀ᶠ n in atTop, base n < M / 4 := (tendsto_order.1 hbase0).2 _ (by positivity) have hregSmall := pilotRegularizer_eventually_lt m hdiv (M / 4) (by positivity) have hlocalClose : ∀ᶠ n in atTop, dist (localAlternative θ h n) θ < M / 4 := (Metric.tendsto_atTop.1 (localAlternative_tendsto θ h) (M / 4) (by positivity)) |> eventually_atTop.2 have hlocal := eventually_localAlternative_interior θ h hθ have hn2 : ∀ᶠ n in atTop, 2 ≤ n := eventually_ge_atTop 2 have hprefixBad : Tendsto (fun n => if hn : 2 ≤ n then pilotPrefixBadMass (localAlternative θ h n) p ε (base n) m (le_of_lt (hsub.2 n hn).2) else 0) atTop (nhds 0) := by have henv := pilotGaussianBadEnvelope_tendsto_zero p ε m hp hε hdiv apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds henv · filter_upwards [hn2, hlocal] with n hn hln rw [dif_pos hn] unfold pilotPrefixBadMass apply Finset.sum_nonneg intro u _ exact mul_nonneg (pilotPrefixWeight_nonneg _ p ε m n hp hln u) (by split_ifs <;> positivity) · filter_upwards [hn2, hlocal, hbasepos, hbaseSmall, hregSmall, hlocalClose] with n hn hln hbpos hbsmall hreg hclose rw [dif_pos hn] let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 have hmpos : 0 < m n := lt_of_lt_of_le Nat.zero_lt_one (hsub.2 n hn).1 have hcoord : ∀ k : Fin 2, |localAlternative θ h n k - θ k| < M / 4 := by have hd := (dist_pi_lt_iff (by positivity : 0 < M / 4)).mp hclose intro k simpa only [Real.dist_eq] using hd k have hM0l : M ≤ θ 0 := (min_le_left _ _).trans (min_le_left _ _) have hM0r : M ≤ 1 - θ 0 := (min_le_left _ _).trans (min_le_right _ _) have hM1l : M ≤ θ 1 := (min_le_right _ _).trans (min_le_left _ _) have hM1r : M ≤ 1 - θ 1 := (min_le_right _ _).trans (min_le_right _ _) have hδ0l : (m n + 2 : ℝ)⁻¹ + base n ≤ localAlternative θ h n 0 := by have hc := (abs_lt.mp (hcoord 0)).1 dsimp only [M] at hM0l hreg hbsmall hc ⊢ linarith have hδ0r : (m n + 2 : ℝ)⁻¹ + base n ≤ 1 - localAlternative θ h n 0 := by have hc := (abs_lt.mp (hcoord 0)).2 dsimp only [M] at hM0r hreg hbsmall hc ⊢ linarith have hδ1l : (m n + 2 : ℝ)⁻¹ + base n ≤ localAlternative θ h n 1 := by have hc := (abs_lt.mp (hcoord 1)).1 dsimp only [M] at hM1l hreg hbsmall hc ⊢ linarith have hδ1r : (m n + 2 : ℝ)⁻¹ + base n ≤ 1 - localAlternative θ h n 1 := by have hc := (abs_lt.mp (hcoord 1)).2 dsimp only [M] at hM1r hreg hbsmall hc ⊢ linarith simpa only [pilotBadMassEnvelope, base, Subsingleton.elim] using pilotPrefixBadMass_le select (localAlternative θ h n) p ε (base n) m hselect hp hln hε hbpos hmn hmpos hδ0l hδ0r hδ1l hδ1r apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hprefixBad · filter_upwards [] with n apply Finset.sum_nonneg intro u _ exact mul_nonneg (pilotPrefixWeight_nonneg (rowParam n) p ε m n hp (hrowParamInterior n) u) (by split_ifs <;> positivity) · filter_upwards [hn2, hlocal, hu, hbasepos, hdistle] with n hn hln hunif hbpos hdle rw [dif_pos hn] apply Finset.sum_le_sum intro u _ simp only [w, rowParam, if_pos hln] apply mul_le_mul_of_nonneg_left _ (pilotPrefixWeight_nonneg (localAlternative θ h n) p ε m n hp hln u) by_cases hgood : |pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u 0 - localAlternative θ h n 0| < base n ∧ |pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u 1 - localAlternative θ h n 1| < base n · have hnearRow : dist (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) (localAlternative θ h n) < base n := by rw [dist_pi_lt_iff hbpos] intro k fin_cases k · rw [Real.dist_eq] change |pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u 0 - localAlternative θ h n 0| < base n exact hgood.1 · rw [Real.dist_eq] change |pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u 1 - localAlternative θ h n 1| < base n exact hgood.2 have hnear : dist (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) θ ≤ ρ n := by calc _ ≤ dist (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) (localAlternative θ h n) + dist (localAlternative θ h n) θ := dist_triangle _ _ _ _ ≤ max (base n) (sqrt (dist (localAlternative θ h n) θ)) + -- … truncated; follow the source link for the rest …
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_scaledError_cdf_tendsto_of_conditionalRows · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGaussianTransfer.lean:187
theorem pilot_scaledError_cdf_tendsto_of_all_conditionalRows

A conditional adaptive-row Gaussian CDF limit for every local direction and threshold transfers to the corresponding family of actual transcript CDF limits. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot scaled Error cdf tendsto of all conditional Rows.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiv :
hsub :
hrow :
∀ (h : TrialParameter) (x : ℝ) (φ : ℕ → ℕ),
StrictMono φ → ∀ η : ℕ → TrialParameter, (∀ k, InteriorMeans (η k)) → Tendsto η atTop (nhds θ) → Tendsto (fun k => adaptivePilotRowScaledCDF select θ h (fun _ => η k) p ε m hselect hp hε (φ k) x) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x)))
x :
ℝ
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z ≤ x}) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x)))
Proof (Lean source)
theorem pilot_scaledError_cdf_tendsto_of_all_conditionalRows (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) (hrow : ∀ (h : TrialParameter) (x : ℝ) (φ : ℕ → ℕ), StrictMono φ → ∀ η : ℕ → TrialParameter, (∀ k, InteriorMeans (η k)) → Tendsto η atTop (nhds θ) → Tendsto (fun k => adaptivePilotRowScaledCDF select θ h (fun _ => η k) p ε m hselect hp hε (φ k) x) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x)))) : ∀ h : TrialParameter, ∀ x : ℝ, Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z ≤ x}) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x))) := by intro h x exact pilot_scaledError_cdf_tendsto_of_conditionalRows select θ h p ε x m hselect hp hθ hε hdiv hsub (hrow h x)
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_scaledError_cdf_tendsto_of_all_conditionalRows · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGaussianTransfer.lean:489
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotGrowth 29 declarations Uniform growth bounds for the pilot saddle score

Uniform growth bounds for the pilot saddle score

theorem patternRay_le_exp

Under the supplied quantities and conditions, the pattern ray le exp assertion holds. Under the stated assumptions, the pattern Ray le exp.

Formal statement
ε :
ℝ
hε :
0 ≤ ε
s :
Fin 14
j :
Fin 4
patternRay ε s j ≤ exp ε
Proof (Lean source)
lemma patternRay_le_exp (ε : ℝ) (hε : 0 ≤ ε) (s : Fin 14) (j : Fin 4) : patternRay ε s j ≤ exp ε := by unfold patternRay privacyIncrement privacyRatio split_ifs <;> simp_all [Real.one_le_exp_iff]
CausalSmith.Stat.LdpAteEfficiencySurface.patternRay_le_exp · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:17
theorem patternMass_one_le

Under the supplied quantities and conditions, the pattern mass one le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pattern Mass one le.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
s :
Fin 14
1 ≤ patternMass θ p ε s
Proof (Lean source)
lemma patternMass_one_le (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (s : Fin 14) : 1 ≤ patternMass θ p ε s := by rw [← piTheta_sum_eq_one θ p] unfold patternMass apply Finset.sum_le_sum intro j hj rw [← mul_one (piTheta θ p j)] simpa only [mul_one] using mul_le_mul_of_nonneg_left (patternRay_one_le_interior ε hε s j) (piTheta_pos_interior θ p hp hθ j).le
CausalSmith.Stat.LdpAteEfficiencySurface.patternMass_one_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:25
theorem patternMass_le_exp

Under the supplied quantities and conditions, the pattern mass le exp assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pattern Mass le exp.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
s :
Fin 14
patternMass θ p ε s ≤ exp ε
Proof (Lean source)
lemma patternMass_le_exp (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (s : Fin 14) : patternMass θ p ε s ≤ exp ε := by rw [← one_mul (exp ε), ← piTheta_sum_eq_one θ p, Finset.sum_mul] unfold patternMass apply Finset.sum_le_sum intro j hj exact mul_le_mul_of_nonneg_left (patternRay_le_exp ε hε s j) (piTheta_pos_interior θ p hp hθ j).le
CausalSmith.Stat.LdpAteEfficiencySurface.patternMass_le_exp · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:41
def pilotReferenceWeight

the pilot reference weight is the mathematical object specified below. The pilot Reference Weight is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
pilotReferenceWeight ε :
fun s => if s ∈ ({0, 1, 3, 7} : Finset (Fin 14)) then 1 / (exp ε + 3) else 0
CausalSmith.Stat.LdpAteEfficiencySurface.pilotReferenceWeight · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:56
theorem pilotReferenceWeight_feasible

the pilot reference weight feasible assertion holds.

Formal statement
ε :
ℝ
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotReferenceWeight_feasible · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:61
def pilotLowerA

For the supplied quantities and conditions, the pilot lower a is the mathematical object specified below. The pilot Lower A is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
pilotLowerA p ε :
ℝ
(1 / (exp ε + 3)) * (privacyIncrement ε * controlProb p) ^ 2 / exp ε
CausalSmith.Stat.LdpAteEfficiencySurface.pilotLowerA · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:66
def pilotLowerB

For the supplied quantities and conditions, the pilot lower b is the mathematical object specified below. The pilot Lower B is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
pilotLowerB p ε :
ℝ
(1 / (exp ε + 3)) * (privacyIncrement ε * p) ^ 2 / exp ε
CausalSmith.Stat.LdpAteEfficiencySurface.pilotLowerB · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:71
theorem pilotLowerA_pos

Under the supplied quantities and conditions, the pilot lower a pos assertion holds. Under the stated assumptions, the pilot Lower A pos.

Formal statement
p ε :
ℝ
hε :
0 < ε
0 < pilotLowerA p ε
Proof (Lean source)
lemma pilotLowerA_pos (p ε : ℝ) (hp : InteriorAssignment p) (hε : 0 < ε) : 0 < pilotLowerA p ε := by have hq : 0 < controlProb p := by dsimp [controlProb]; linarith [hp.2] have hd := privacyIncrement_pos hε dsimp [pilotLowerA] positivity
CausalSmith.Stat.LdpAteEfficiencySurface.pilotLowerA_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:76
theorem pilotLowerB_pos

Under the supplied quantities and conditions, the pilot lower b pos assertion holds. Under the stated assumptions, the pilot Lower B pos.

Formal statement
p ε :
ℝ
hε :
0 < ε
0 < pilotLowerB p ε
Proof (Lean source)
lemma pilotLowerB_pos (p ε : ℝ) (hp : InteriorAssignment p) (hε : 0 < ε) : 0 < pilotLowerB p ε := by have hd := privacyIncrement_pos hε have hp0 := hp.1 dsimp [pilotLowerB] positivity
CausalSmith.Stat.LdpAteEfficiencySurface.pilotLowerB_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:86
theorem seventh_pattern_information_quadratic

Under the supplied quantities and conditions, the seventh pattern information quadratic assertion holds.

Formal statement
p ε t :
ℝ
patternInformation θ p ε 7 t
= ((privacyIncrement ε * p) ^ 2 / patternMass θ p ε 7) * (t + 1) ^ 2
Proof (Lean source)
lemma seventh_pattern_information_quadratic (θ : TrialParameter) (p ε t : ℝ) : patternInformation θ p ε 7 t = ((privacyIncrement ε * p) ^ 2 / patternMass θ p ε 7) * (t + 1) ^ 2 := by simp +decide [patternInformation, projectedGradient, patternGradient, direction, Fin.sum_univ_succ] ring
CausalSmith.Stat.LdpAteEfficiencySurface.seventh_pattern_information_quadratic · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:96
theorem pilotReferenceObjective_lower

Under the supplied quantities and conditions, the pilot reference objective lower assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Reference Objective lower.

Formal statement
p ε t :
ℝ
hθ :
hε :
0 < ε
pilotLowerA p ε * t ^ 2 + pilotLowerB p ε * (t + 1) ^ 2
Proof (Lean source)
lemma pilotReferenceObjective_lower (θ : TrialParameter) (p ε t : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : pilotLowerA p ε * t ^ 2 + pilotLowerB p ε * (t + 1) ^ 2 ≤ informationObjective θ p ε (pilotReferenceWeight ε) t := by have hm0pos := patternMass_pos_interior θ p ε hp hθ hε.le 0 have hm7pos := patternMass_pos_interior θ p ε hp hθ hε.le 7 have hm0le := patternMass_le_exp θ p ε hp hθ hε.le 0 have hm7le := patternMass_le_exp θ p ε hp hθ hε.le 7 have hterm0 : pilotLowerA p ε * t ^ 2 ≤ pilotReferenceWeight ε 0 * patternInformation θ p ε 0 t := by rw [first_pattern_information_quadratic] simp only [pilotReferenceWeight, Finset.mem_insert, Finset.mem_singleton, true_or, if_true] dsimp [pilotLowerA] have hn : 0 ≤ (privacyIncrement ε * controlProb p) ^ 2 := sq_nonneg _ have hd := (div_le_div_iff₀ (Real.exp_pos ε) hm0pos).2 (mul_le_mul_of_nonneg_left hm0le hn) have hc : 0 ≤ 1 / (exp ε + 3) := by positivity calc 1 / (exp ε + 3) * (privacyIncrement ε * controlProb p) ^ 2 / exp ε * t ^ 2 = 1 / (exp ε + 3) * ((privacyIncrement ε * controlProb p) ^ 2 / exp ε * t ^ 2) := by ring _ ≤ 1 / (exp ε + 3) * ((privacyIncrement ε * controlProb p) ^ 2 / patternMass θ p ε 0 * t ^ 2) := mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right hd (sq_nonneg t)) hc have hterm7 : pilotLowerB p ε * (t + 1) ^ 2 ≤ pilotReferenceWeight ε 7 * patternInformation θ p ε 7 t := by rw [seventh_pattern_information_quadratic] simp only [pilotReferenceWeight, Finset.mem_insert, Finset.mem_singleton, OfNat.ofNat_ne_zero, OfNat.ofNat_ne_one, or_false, true_or, if_true] dsimp [pilotLowerB] have hn : 0 ≤ (privacyIncrement ε * p) ^ 2 := sq_nonneg _ have hd := (div_le_div_iff₀ (Real.exp_pos ε) hm7pos).2 (mul_le_mul_of_nonneg_left hm7le hn) have hc : 0 ≤ 1 / (exp ε + 3) := by positivity calc 1 / (exp ε + 3) * (privacyIncrement ε * p) ^ 2 / exp ε * (t + 1) ^ 2 = 1 / (exp ε + 3) * ((privacyIncrement ε * p) ^ 2 / exp ε * (t + 1) ^ 2) := by ring _ ≤ 1 / (exp ε + 3) * ((privacyIncrement ε * p) ^ 2 / patternMass θ p ε 7 * (t + 1) ^ 2) := mul_le_mul_of_nonneg_left (mul_le_mul_of_nonneg_right hd (sq_nonneg (t + 1))) hc calc pilotLowerA p ε * t ^ 2 + pilotLowerB p ε * (t + 1) ^ 2 ≤ pilotReferenceWeight ε 0 * patternInformation θ p ε 0 t + pilotReferenceWeight ε 7 * patternInformation θ p ε 7 t := add_le_add hterm0 hterm7 _ = ∑ s ∈ ({0, 7} : Finset (Fin 14)), pilotReferenceWeight ε s * patternInformation θ p ε s t := by simp _ ≤ informationObjective θ p ε (pilotReferenceWeight ε) t := by unfold informationObjective apply Finset.sum_le_sum_of_subset_of_nonneg (by simp) intro s hs hnot exact mul_nonneg ((pilotReferenceWeight_feasible ε).1 s) (div_nonneg (sq_nonneg _) (patternMass_pos_interior θ p ε hp hθ hε.le s).le)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotReferenceObjective_lower · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:105
def pilotJLower

For the supplied quantities and conditions, the pilot j lower is the mathematical object specified below. The pilot JLower is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
pilotJLower p ε :
ℝ
pilotLowerA p ε * pilotLowerB p ε / (pilotLowerA p ε + pilotLowerB p ε)
theorem pilotJLower_pos

Under the supplied quantities and conditions, the pilot j lower pos assertion holds. Under the stated assumptions, the pilot JLower pos.

Formal statement
p ε :
ℝ
hε :
0 < ε
0 < pilotJLower p ε
Proof (Lean source)
lemma pilotJLower_pos (p ε : ℝ) (hp : InteriorAssignment p) (hε : 0 < ε) : 0 < pilotJLower p ε := by exact div_pos (mul_pos (pilotLowerA_pos p ε hp hε) (pilotLowerB_pos p ε hp hε)) (add_pos (pilotLowerA_pos p ε hp hε) (pilotLowerB_pos p ε hp hε))
CausalSmith.Stat.LdpAteEfficiencySurface.pilotJLower_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:177
theorem pilotJLower_le_quadratic

Under the supplied quantities and conditions, the pilot j lower le quadratic assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot JLower le quadratic.

Formal statement
p ε t :
ℝ
hε :
0 < ε
pilotJLower p ε ≤ pilotLowerA p ε * t ^ 2 + pilotLowerB p ε * (t + 1) ^ 2
Proof (Lean source)
lemma pilotJLower_le_quadratic (p ε t : ℝ) (hp : InteriorAssignment p) (hε : 0 < ε) : pilotJLower p ε ≤ pilotLowerA p ε * t ^ 2 + pilotLowerB p ε * (t + 1) ^ 2 := by let A := pilotLowerA p ε let B := pilotLowerB p ε have hA : 0 < A := pilotLowerA_pos p ε hp hε have hB : 0 < B := pilotLowerB_pos p ε hp hε have hsq : 0 ≤ (A * t + B * (t + 1)) ^ 2 := sq_nonneg _ dsimp [pilotJLower, A, B] apply (div_le_iff₀ (add_pos hA hB)).2 nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.pilotJLower_le_quadratic · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:186
theorem staircaseWeight_le_one

Under the supplied quantities and conditions, the staircase weight le one assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the staircase Weight le one.

Formal statement
ε :
ℝ
hε :
0 ≤ ε
hα :
s :
Fin 14
α s ≤ 1
Proof (Lean source)
lemma staircaseWeight_le_one (ε : ℝ) (hε : 0 ≤ ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (s : Fin 14) : α s ≤ 1 := by have hterm : α s * patternRay ε s 0 ≤ ∑ u : Fin 14, α u * patternRay ε u 0 := by apply Finset.single_le_sum (s := univ) (a := s) · intro u hu exact mul_nonneg (hα.1 u) (le_trans (by norm_num) (patternRay_one_le_interior ε hε u 0)) · exact Finset.mem_univ s calc α s = α s * 1 := by ring _ ≤ α s * patternRay ε s 0 := mul_le_mul_of_nonneg_left (patternRay_one_le_interior ε hε s 0) (hα.1 s) _ ≤ _ := hterm _ = 1 := hα.2 0
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseWeight_le_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:202
def pilotObjectiveZeroUpper

For the supplied quantities and conditions, the pilot objective zero upper is the mathematical object specified below. The pilot Objective Zero Upper is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
pilotObjectiveZeroUpper p ε :
ℝ
∑ s : Fin 14, projectedGradient p ε s 0 ^ 2
CausalSmith.Stat.LdpAteEfficiencySurface.pilotObjectiveZeroUpper · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:222
theorem informationObjective_zero_le_upper

Under the supplied quantities and conditions, the information objective zero le upper assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Objective zero le upper.

Formal statement
p ε :
ℝ
hθ :
hε :
0 ≤ ε
hα :
Proof (Lean source)
lemma informationObjective_zero_le_upper (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 ≤ ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : informationObjective θ p ε α 0 ≤ pilotObjectiveZeroUpper p ε := by unfold informationObjective patternInformation pilotObjectiveZeroUpper apply Finset.sum_le_sum intro s hs have hm := patternMass_one_le θ p ε hp hθ hε s have ha := staircaseWeight_le_one ε hε α hα s have hdiv : projectedGradient p ε s 0 ^ 2 / patternMass θ p ε s ≤ projectedGradient p ε s 0 ^ 2 := by apply (div_le_iff₀ (lt_of_lt_of_le (by norm_num) hm)).2 nlinarith [sq_nonneg (projectedGradient p ε s 0)] calc α s * (projectedGradient p ε s 0 ^ 2 / patternMass θ p ε s) ≤ 1 * (projectedGradient p ε s 0 ^ 2 / patternMass θ p ε s) := by exact mul_le_mul_of_nonneg_right ha (div_nonneg (sq_nonneg _) (le_trans (by norm_num) hm)) _ ≤ projectedGradient p ε s 0 ^ 2 := by simpa using hdiv
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_zero_le_upper · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:226
theorem strongSelector_J_bounds

Under the supplied quantities and conditions, the strong selector j bounds assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the strong Selector J bounds.

Formal statement
p :
ℝ
shared
ε :
ℝ
shared
select :
hselect :
hε :
0 < ε
hθ :
conclusion 1
pilotJLower p ε ≤ (select θ).2.2
conclusion 2
(select θ).2.2 ≤ pilotObjectiveZeroUpper p ε
Proof (Lean source)
lemma strongSelector_J_bounds (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (θ : TrialParameter) (hθ : InteriorMeans θ) : pilotJLower p ε ≤ (select θ).2.2 ∧ (select θ).2.2 ≤ pilotObjectiveZeroUpper p ε := by have hs := hselect.1.2 θ hθ have hmax := hselect.2 θ hθ have href := pilotReferenceObjective_lower θ p ε (select θ).2.1 hp hθ hε have hquad := pilotJLower_le_quadratic p ε (select θ).2.1 hp hε constructor · calc pilotJLower p ε ≤ pilotLowerA p ε * (select θ).2.1 ^ 2 + pilotLowerB p ε * ((select θ).2.1 + 1) ^ 2 := hquad _ ≤ informationObjective θ p ε (pilotReferenceWeight ε) (select θ).2.1 := href _ ≤ informationObjective θ p ε (select θ).1 (select θ).2.1 := hmax (pilotReferenceWeight ε) (pilotReferenceWeight_feasible ε) _ = (select θ).2.2 := hs.2.2.2.symm · calc (select θ).2.2 = informationObjective θ p ε (select θ).1 (select θ).2.1 := hs.2.2.2 _ ≤ informationObjective θ p ε (select θ).1 0 := hs.2.1 0 _ ≤ pilotObjectiveZeroUpper p ε := informationObjective_zero_le_upper θ p ε hp hθ hε.le _ hs.1
CausalSmith.Stat.LdpAteEfficiencySurface.strongSelector_J_bounds · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:249
def pilotTUpper

For the supplied quantities and conditions, the pilot t upper is the mathematical object specified below. The pilot TUpper is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
pilotTUpper p ε :
ℝ
theorem strongSelector_t_bound

Under the supplied quantities and conditions, the strong selector t bound assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the strong Selector t bound.

Formal statement
p :
ℝ
shared
ε :
ℝ
shared
select :
hselect :
hε :
0 < ε
hθ :
|(select θ).2.1| ≤ pilotTUpper p ε
Proof (Lean source)
lemma strongSelector_t_bound (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (θ : TrialParameter) (hθ : InteriorMeans θ) : |(select θ).2.1| ≤ pilotTUpper p ε := by have hs := hselect.1.2 θ hθ have hmax := hselect.2 θ hθ have href := pilotReferenceObjective_lower θ p ε (select θ).2.1 hp hθ hε have hJupper := (strongSelector_J_bounds select hselect hp hε θ hθ).2 have hAt : pilotLowerA p ε * (select θ).2.1 ^ 2 ≤ pilotObjectiveZeroUpper p ε := by calc pilotLowerA p ε * (select θ).2.1 ^ 2 ≤ pilotLowerA p ε * (select θ).2.1 ^ 2 + pilotLowerB p ε * ((select θ).2.1 + 1) ^ 2 := by exact le_add_of_nonneg_right (mul_nonneg (pilotLowerB_pos p ε hp hε).le (sq_nonneg _)) _ ≤ informationObjective θ p ε (pilotReferenceWeight ε) (select θ).2.1 := href _ ≤ informationObjective θ p ε (select θ).1 (select θ).2.1 := hmax (pilotReferenceWeight ε) (pilotReferenceWeight_feasible ε) _ = (select θ).2.2 := hs.2.2.2.symm _ ≤ pilotObjectiveZeroUpper p ε := hJupper have hratio : (select θ).2.1 ^ 2 ≤ pilotObjectiveZeroUpper p ε / pilotLowerA p ε := by exact (le_div_iff₀ (pilotLowerA_pos p ε hp hε)).2 (by simpa [mul_comm] using hAt) rw [pilotTUpper, Real.le_sqrt (abs_nonneg _) (div_nonneg (by unfold pilotObjectiveZeroUpper; positivity) (pilotLowerA_pos p ε hp hε).le)] simpa [sq_abs] using hratio
CausalSmith.Stat.LdpAteEfficiencySurface.strongSelector_t_bound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:281
def pilotScoreGrowthUpper

For the supplied quantities and conditions, the pilot score growth upper is the mathematical object specified below. The pilot Score Growth Upper is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
pilotScoreGrowthUpper p ε :
ℝ
(1 + pilotTUpper p ε) / pilotJLower p ε
CausalSmith.Stat.LdpAteEfficiencySurface.pilotScoreGrowthUpper · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:314
theorem strongSelector_scoreGrowth_bound

Under the supplied quantities and conditions, the strong selector score growth bound assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the strong Selector score Growth bound.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hε :
0 < ε
hθ :
(1 + |(select θ).2.1|) / (select θ).2.2 ≤ pilotScoreGrowthUpper p ε
Proof (Lean source)
lemma strongSelector_scoreGrowth_bound (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (θ : TrialParameter) (hθ : InteriorMeans θ) : (1 + |(select θ).2.1|) / (select θ).2.2 ≤ pilotScoreGrowthUpper p ε := by have hJ := strongSelector_J_bounds select hselect hp hε θ hθ have ht := strongSelector_t_bound select hselect hp hε θ hθ have hT : 0 ≤ pilotTUpper p ε := by unfold pilotTUpper exact Real.sqrt_nonneg _ apply div_le_div₀ · exact add_nonneg (by norm_num) hT · linarith · exact pilotJLower_pos p ε hp hε · exact hJ.1
CausalSmith.Stat.LdpAteEfficiencySurface.strongSelector_scoreGrowth_bound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:319
def pilotGradientUpper

For the supplied quantities and conditions, the pilot gradient upper is the mathematical object specified below. The pilot Gradient Upper is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
pilotGradientUpper p ε :
ℝ
∑ s : Fin 14, (|patternGradient p ε s 0| + |patternGradient p ε s 1|)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotGradientUpper · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:339
theorem pilotGradientUpper_nonneg

Under the supplied quantities and conditions, the pilot gradient upper nonneg assertion holds.

Formal statement
p ε :
ℝ
Proof (Lean source)
lemma pilotGradientUpper_nonneg (p ε : ℝ) : 0 ≤ pilotGradientUpper p ε := by unfold pilotGradientUpper positivity
CausalSmith.Stat.LdpAteEfficiencySurface.pilotGradientUpper_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:344
theorem projectedGradient_abs_le

Under the supplied quantities and conditions, the projected gradient abs le assertion holds.

Formal statement
p ε t :
ℝ
s :
Fin 14
|projectedGradient p ε s t| ≤ pilotGradientUpper p ε * (|t| + 1)
Proof (Lean source)
lemma projectedGradient_abs_le (p ε t : ℝ) (s : Fin 14) : |projectedGradient p ε s t| ≤ pilotGradientUpper p ε * (|t| + 1) := by have hlocal : |patternGradient p ε s 0| + |patternGradient p ε s 1| ≤ pilotGradientUpper p ε := by unfold pilotGradientUpper apply Finset.single_le_sum (s := univ) (a := s) · intro u hu positivity · exact Finset.mem_univ s have ht1 : |t + 1| ≤ |t| + 1 := by calc |t + 1| ≤ |t| + |(1 : ℝ)| := abs_add_le _ _ _ = |t| + 1 := by norm_num unfold projectedGradient simp only [Fin.sum_univ_two, direction, ↓reduceIte, Fin.isValue] calc |patternGradient p ε s 0 * t + patternGradient p ε s 1 * (t + 1)| ≤ |patternGradient p ε s 0 * t| + |patternGradient p ε s 1 * (t + 1)| := abs_add_le _ _ _ = |patternGradient p ε s 0| * |t| + |patternGradient p ε s 1| * |t + 1| := by rw [abs_mul, abs_mul] _ ≤ |patternGradient p ε s 0| * (|t| + 1) + |patternGradient p ε s 1| * (|t| + 1) := by exact add_le_add (mul_le_mul_of_nonneg_left (le_add_of_nonneg_right (by norm_num)) (abs_nonneg _)) (mul_le_mul_of_nonneg_left ht1 (abs_nonneg _)) _ = (|patternGradient p ε s 0| + |patternGradient p ε s 1|) * (|t| + 1) := by ring _ ≤ pilotGradientUpper p ε * (|t| + 1) := by exact mul_le_mul_of_nonneg_right hlocal (by positivity)
CausalSmith.Stat.LdpAteEfficiencySurface.projectedGradient_abs_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:349
def pilotPhiUpper

For the supplied quantities and conditions, the pilot phi upper is the mathematical object specified below. The pilot Phi Upper is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
pilotPhiUpper p ε :
ℝ
pilotGradientUpper p ε * (pilotTUpper p ε + 1) / pilotJLower p ε
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPhiUpper · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:383
theorem strongSelector_phiTilde_bound

Under the supplied quantities and conditions, the strong selector phi tilde bound assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the strong Selector phi Tilde bound.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hε :
0 < ε
hθ :
s :
Fin 14
|phiTilde θ p ε (select) s| ≤ pilotPhiUpper p ε
Proof (Lean source)
lemma strongSelector_phiTilde_bound (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (θ : TrialParameter) (hθ : InteriorMeans θ) (s : Fin 14) : |phiTilde θ p ε (select) s| ≤ pilotPhiUpper p ε := by have hJ := strongSelector_J_bounds select hselect hp hε θ hθ have ht := strongSelector_t_bound select hselect hp hε θ hθ have hT : 0 ≤ pilotTUpper p ε := by unfold pilotTUpper exact Real.sqrt_nonneg _ have hm := patternMass_one_le θ p ε hp hθ hε.le s have hJpos : 0 < (select θ).2.2 := lt_of_lt_of_le (pilotJLower_pos p ε hp hε) hJ.1 have hden : pilotJLower p ε ≤ (select θ).2.2 * patternMass θ p ε s := by calc pilotJLower p ε ≤ (select θ).2.2 := hJ.1 _ = (select θ).2.2 * 1 := by ring _ ≤ (select θ).2.2 * patternMass θ p ε s := mul_le_mul_of_nonneg_left hm hJpos.le rw [phiTilde, abs_div, abs_of_pos (mul_pos hJpos (lt_of_lt_of_le (by norm_num) hm))] apply div_le_div₀ · exact mul_nonneg (pilotGradientUpper_nonneg p ε) (add_nonneg hT (by norm_num)) · calc |projectedGradient p ε s (select θ).2.1| ≤ pilotGradientUpper p ε * (|(select θ).2.1| + 1) := projectedGradient_abs_le p ε _ s _ ≤ pilotGradientUpper p ε * (pilotTUpper p ε + 1) := by exact mul_le_mul_of_nonneg_left (by linarith) (pilotGradientUpper_nonneg p ε) · exact pilotJLower_pos p ε hp hε · exact hden
CausalSmith.Stat.LdpAteEfficiencySurface.strongSelector_phiTilde_bound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:387
theorem pilotPhiUpper_nonneg

Under the supplied quantities and conditions, the pilot phi upper nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Phi Upper nonneg.

Formal statement
p ε :
ℝ
hε :
0 < ε
0 ≤ pilotPhiUpper p ε
Proof (Lean source)
lemma pilotPhiUpper_nonneg (p ε : ℝ) (hp : InteriorAssignment p) (hε : 0 < ε) : 0 ≤ pilotPhiUpper p ε := by unfold pilotPhiUpper exact div_nonneg (mul_nonneg (pilotGradientUpper_nonneg p ε) (add_nonneg (by unfold pilotTUpper; exact Real.sqrt_nonneg _) (by norm_num))) (pilotJLower_pos p ε hp hε).le
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPhiUpper_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:425
theorem strongSelector_phiOutput_bound

Under the supplied quantities and conditions, the strong selector phi output bound assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the strong Selector phi Output bound.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hε :
0 < ε
hθ :
|phiOutput θ p ε (select) z| ≤ pilotPhiUpper p ε
Proof (Lean source)
lemma strongSelector_phiOutput_bound (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (θ : TrialParameter) (hθ : InteriorMeans θ) (z : PilotOutput) : |phiOutput θ p ε (select) z| ≤ pilotPhiUpper p ε := by cases z with | inl k => simp [phiOutput, pilotPhiUpper_nonneg p ε hp hε] | inr s => simpa [phiOutput] using strongSelector_phiTilde_bound select p ε hselect hp hε θ hθ s
CausalSmith.Stat.LdpAteEfficiencySurface.strongSelector_phiOutput_bound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotGrowth.lean:438
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotLocalRiskAttainment 10 declarations Exact local-risk attainment for the private-pilot estimator

Exact local-risk attainment for the private-pilot estimator

def pilotBadMassEnvelope

The parameter-free Chebyshev envelope appearing in the bad-prefix bound. For the displayed inputs and conditions, the stated result follows. The pilot Bad Mass Envelope is determined by the displayed parameters.

Definition (Lean source)
p ε r :
ℝ
m :
ℕ → ℕ
n :
ℕ
pilotBadMassEnvelope p ε r m n :
ℝ
1 / ((m n : ℝ) * (r * controlProb p * (exp ε - 1) / (exp ε + 3)) ^ 2)
+ 1 / ((m n : ℝ) * (r * p * (exp ε - 1) / (exp ε + 3)) ^ 2)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotBadMassEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskAttainment.lean:16
theorem pilotBadMassEnvelope_tendsto_zero

For every fixed positive localization radius, pilot divergence makes the uniform Chebyshev envelope vanish. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Bad Mass Envelope tendsto zero.

Formal statement
p ε r :
ℝ
m :
ℕ → ℕ
hε :
0 < ε
hr :
0 < r
hdiv :
Proof (Lean source)
lemma pilotBadMassEnvelope_tendsto_zero (p ε r : ℝ) (m : ℕ → ℕ) (hp : InteriorAssignment p) (hε : 0 < ε) (hr : 0 < r) (hdiv : PilotDiverges m) : Tendsto (pilotBadMassEnvelope p ε r m) atTop (nhds 0) := by let a0 := r * controlProb p * (exp ε - 1) / (exp ε + 3) let a1 := r * p * (exp ε - 1) / (exp ε + 3) have hep : 1 < exp ε := by simpa using (Real.exp_lt_exp.mpr hε : exp 0 < exp ε) have ha0 : 0 < a0 := by dsimp [a0, controlProb] have hcp : 0 < 1 - p := by linarith [hp.2] exact div_pos (mul_pos (mul_pos hr hcp) (sub_pos.mpr hep)) (by positivity) have ha1 : 0 < a1 := by dsimp [a1] exact div_pos (mul_pos (mul_pos hr hp.1) (sub_pos.mpr hep)) (by positivity) have hmreal : Tendsto (fun n => (m n : ℝ)) atTop atTop := tendsto_natCast_atTop_atTop.comp hdiv have hinv : Tendsto (fun n => ((m n : ℝ))⁻¹) atTop (nhds 0) := tendsto_inv_atTop_zero.comp hmreal have h0 : Tendsto (fun n => 1 / ((m n : ℝ) * a0 ^ 2)) atTop (nhds 0) := by have ht := hinv.mul_const (a0 ^ 2)⁻¹ convert ht using 1 · funext n rw [one_div, mul_inv_rev] ring · simp have h1 : Tendsto (fun n => 1 / ((m n : ℝ) * a1 ^ 2)) atTop (nhds 0) := by have ht := hinv.mul_const (a1 ^ 2)⁻¹ convert ht using 1 · funext n rw [one_div, mul_inv_rev] ring · simp change Tendsto (fun n => 1 / ((m n : ℝ) * a0 ^ 2) + 1 / ((m n : ℝ) * a1 ^ 2)) atTop (nhds 0) simpa using h0.add h1
CausalSmith.Stat.LdpAteEfficiencySurface.pilotBadMassEnvelope_tendsto_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskAttainment.lean:23
theorem pilotRegularizer_eventually_lt

The clipping regularizer is eventually smaller than every fixed positive margin when the pilot size diverges. For the displayed inputs and conditions, the stated result follows.

Formal statement
m :
ℕ → ℕ
hdiv :
c :
ℝ
hc :
0 < c
∀ᶠ n in atTop, (m n + 2 : ℝ)⁻¹ < c
Proof (Lean source)
lemma pilotRegularizer_eventually_lt (m : ℕ → ℕ) (hdiv : PilotDiverges m) (c : ℝ) (hc : 0 < c) : ∀ᶠ n in atTop, (m n + 2 : ℝ)⁻¹ < c := by have hmreal : Tendsto (fun n => (m n : ℝ)) atTop atTop := tendsto_natCast_atTop_atTop.comp hdiv have hadd : Tendsto (fun n => (m n : ℝ) + 2) atTop atTop := by rw [tendsto_atTop] intro b filter_upwards [hmreal.eventually_ge_atTop b] with n hn linarith have hinv : Tendsto (fun n => ((m n : ℝ) + 2)⁻¹) atTop (nhds 0) := tendsto_inv_atTop_zero.comp hadd have hev := (tendsto_order.1 hinv).2 c hc simpa only [Nat.cast_add, Nat.cast_ofNat] using hev
CausalSmith.Stat.LdpAteEfficiencySurface.pilotRegularizer_eventually_lt · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskAttainment.lean:63
theorem eventually_uniform_pilotPrefixVarianceAverage

For every bounded local direction, the genuine prefix-averaged selected variance converges uniformly to the oracle variance. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the eventually uniform pilot Prefix Variance Average.

Formal statement
select :
shared
p ε H :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiv :
hsub :
δ :
ℝ
0 < δ
∀ᶠ n in atTop, ∀ (hn : 2 ≤ n) (h : TrialParameter), sqrt ((h 0) ^ 2 + (h 1) ^ 2)
≤ H → InteriorMeans (localAlternative θ h n) → |pilotPrefixVarianceAverage select (localAlternative θ h n) p ε m (le_of_lt (hsub.2 n hn).2) hselect hp hε
- Vstar θ p ε| < δ
Proof (Lean source)
lemma eventually_uniform_pilotPrefixVarianceAverage (θ : TrialParameter) (p ε H : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) : ∀ δ : ℝ, 0 < δ → ∀ᶠ n in atTop, ∀ (hn : 2 ≤ n) (h : TrialParameter), sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H → InteriorMeans (localAlternative θ h n) → |pilotPrefixVarianceAverage select (localAlternative θ h n) p ε m (le_of_lt (hsub.2 n hn).2) hselect hp hε - Vstar θ p ε| < δ := by intro δ hδ obtain ⟨R, hR, hcont⟩ := adaptiveScoreVariance_uniform_near_diag select θ p ε hselect hp hθ hε (δ / 2) (half_pos hδ) let M := adaptiveInteriorMargin θ have hM : 0 < M := adaptiveInteriorMargin_pos θ hθ let r := min (R / 3) (M / 8) have hr : 0 < r := by dsimp [r]; positivity have hrR : r ≤ R / 3 := min_le_left _ _ have hrM : r ≤ M / 8 := min_le_right _ _ let C := (pilotPhiUpper p ε) ^ 2 + |Vstar θ p ε| have hC : 0 ≤ C := by dsimp [C]; positivity have hloc := eventually_localAlternative_dist_lt_uniform θ H r hr have hreg := pilotRegularizer_eventually_lt m hdiv (M / 4) (by positivity) have henv : ∀ᶠ n in atTop, pilotBadMassEnvelope p ε r m n < δ / (2 * (C + 1)) := (tendsto_order.1 (pilotBadMassEnvelope_tendsto_zero p ε r m hp hε hr hdiv)).2 _ (by positivity) filter_upwards [hloc, hreg, henv] with n hnloc hnreg hnenv intro hn h hH hlocal let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 have hmpos : 0 < m n := lt_of_lt_of_le Nat.zero_lt_one (hsub.2 n hn).1 have hd : ∀ k : Fin 2, dist (localAlternative θ h n k) (θ k) < r := (dist_pi_lt_iff hr).mp (hnloc h hH) have hM0l : M ≤ θ 0 := (min_le_left _ _).trans (min_le_left _ _) have hM0r : M ≤ 1 - θ 0 := (min_le_left _ _).trans (min_le_right _ _) have hM1l : M ≤ θ 1 := (min_le_right _ _).trans (min_le_left _ _) have hM1r : M ≤ 1 - θ 1 := (min_le_right _ _).trans (min_le_right _ _) have hd0 := hd 0 have hd1 := hd 1 rw [Real.dist_eq] at hd0 hd1 have hδ0l : (m n + 2 : ℝ)⁻¹ + r ≤ localAlternative θ h n 0 := by have := (abs_lt.mp hd0).1 dsimp [M] at hM0l dsimp [M] at hnreg hrM linarith have hδ0r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - localAlternative θ h n 0 := by have := (abs_lt.mp hd0).2 dsimp [M] at hM0r dsimp [M] at hnreg hrM linarith have hδ1l : (m n + 2 : ℝ)⁻¹ + r ≤ localAlternative θ h n 1 := by have := (abs_lt.mp hd1).1 dsimp [M] at hM1l dsimp [M] at hnreg hrM linarith have hδ1r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - localAlternative θ h n 1 := by have := (abs_lt.mp hd1).2 dsimp [M] at hM1r dsimp [M] at hnreg hrM linarith have hbad := pilotPrefixBadMass_le select (localAlternative θ h n) p ε r m hselect hp hlocal hε hr hmn hmpos hδ0l hδ0r hδ1l hδ1r have hbad' : pilotPrefixBadMass (localAlternative θ h n) p ε r m hmn ≤ pilotBadMassEnvelope p ε r m n := by exact hbad have hgood (η : TrialParameter) (hη : InteriorMeans η) (hηclose : ∀ k : Fin 2, |η k - localAlternative θ h n k| < r) : |adaptiveScoreVariance select (localAlternative θ h n) η p ε - Vstar θ p ε| ≤ δ / 2 := by have hηrow : dist η (localAlternative θ h n) < r := by rw [dist_pi_lt_iff hr] intro k simpa only [Real.dist_eq] using hηclose k have hθrow : dist (localAlternative θ h n) θ < R := lt_of_lt_of_le (hnloc h hH) (by linarith [hrR, hR]) have hηθ : dist η θ < R := by calc dist η θ ≤ dist η (localAlternative θ h n) + dist (localAlternative θ h n) θ := dist_triangle _ _ _ _ < r + r := add_lt_add hηrow (hnloc h hH) _ < R := by linarith [hrR, hR] exact (hcont _ _ hθrow hηθ).le have havg := pilotPrefixVarianceAverage_error_le select θ (localAlternative θ h n) p ε r (δ / 2) m hselect hp hθ hlocal hε (half_pos hδ).le hmn hgood have hCbad : C * pilotPrefixBadMass (localAlternative θ h n) p ε r m hmn < δ / 2 := by calc C * pilotPrefixBadMass (localAlternative θ h n) p ε r m hmn ≤ C * pilotBadMassEnvelope p ε r m n := mul_le_mul_of_nonneg_left hbad' hC _ ≤ (C + 1) * pilotBadMassEnvelope p ε r m n := by apply mul_le_mul_of_nonneg_right (by linarith) unfold pilotBadMassEnvelope positivity _ < (C + 1) * (δ / (2 * (C + 1))) := mul_lt_mul_of_pos_left hnenv (by linarith) _ = δ / 2 := by have hCp : 0 < C + 1 := by linarith field_simp [ne_of_gt hCp] dsimp only [C] at hCbad exact lt_of_le_of_lt havg (by linarith)
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_uniform_pilotPrefixVarianceAverage · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskAttainment.lean:81
theorem pilotPrefixVarianceAverage_bounds

Under the supplied quantities and conditions, the pilot prefix variance average bounds assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Prefix Variance Average bounds.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
hmn :
m n ≤ n
hselect :
hθ :
hε :
0 < ε
conclusion 1
0 ≤ pilotPrefixVarianceAverage select θ p ε m hmn hselect hp hε
conclusion 2
pilotPrefixVarianceAverage select θ p ε m hmn hselect hp hε ≤ (pilotPhiUpper p ε) ^ 2
Proof (Lean source)
lemma pilotPrefixVarianceAverage_bounds (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) {n : ℕ} (hmn : m n ≤ n) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : 0 ≤ pilotPrefixVarianceAverage select θ p ε m hmn hselect hp hε ∧ pilotPrefixVarianceAverage select θ p ε m hmn hselect hp hε ≤ (pilotPhiUpper p ε) ^ 2 := by have hw (u : Fin (m n) → Fin 4) : 0 ≤ pilotPrefixWeight θ p ε m n u := pilotPrefixWeight_nonneg θ p ε m n hp hθ u have hη (u : Fin (m n) → Fin 4) : InteriorMeans (pilotAdaptivePrefixTheta p ε m hmn u) := by exact pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0)) constructor · unfold pilotPrefixVarianceAverage exact Finset.sum_nonneg fun u _ => mul_nonneg (hw u) (adaptiveScoreVariance_nonneg select θ _ p ε hselect hp hθ (hη u) hε) · calc pilotPrefixVarianceAverage select θ p ε m hmn hselect hp hε ≤ ∑ u : Fin (m n) → Fin 4, pilotPrefixWeight θ p ε m n u * (pilotPhiUpper p ε) ^ 2 := by unfold pilotPrefixVarianceAverage apply Finset.sum_le_sum intro u _ exact mul_le_mul_of_nonneg_left (adaptiveScoreVariance_le select θ _ p ε hselect hp hθ (hη u) hε) (hw u) _ = (pilotPhiUpper p ε) ^ 2 := by rw [← Finset.sum_mul, pilotPrefixWeight_sum θ p ε m n, one_mul]
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixVarianceAverage_bounds · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskAttainment.lean:187
theorem eventually_uniform_scaledPrefixVarianceAverage

The finite main-row correction preserves the uniform prefix-risk limit. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the eventually uniform scaled Prefix Variance Average.

Formal statement
select :
shared
p ε H :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiv :
hsub :
δ :
ℝ
0 < δ
∀ᶠ n in atTop, ∀ (hn : 2 ≤ n) (h : TrialParameter), sqrt ((h 0) ^ 2 + (h 1) ^ 2)
≤ H → InteriorMeans (localAlternative θ h n) → |(n : ℝ) / (adaptiveMainSize m n : ℝ) * pilotPrefixVarianceAverage select (localAlternative θ h n) p ε m (le_of_lt (hsub.2 n hn).2) hselect hp hε
- Vstar θ p ε| < δ
Proof (Lean source)
lemma eventually_uniform_scaledPrefixVarianceAverage (θ : TrialParameter) (p ε H : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) : ∀ δ : ℝ, 0 < δ → ∀ᶠ n in atTop, ∀ (hn : 2 ≤ n) (h : TrialParameter), sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H → InteriorMeans (localAlternative θ h n) → |(n : ℝ) / (adaptiveMainSize m n : ℝ) * pilotPrefixVarianceAverage select (localAlternative θ h n) p ε m (le_of_lt (hsub.2 n hn).2) hselect hp hε - Vstar θ p ε| < δ := by intro δ hδ let K := (pilotPhiUpper p ε) ^ 2 + 1 have hK : 0 < K := by dsimp [K]; positivity have havg := eventually_uniform_pilotPrefixVarianceAverage select θ p ε H m hselect hp hθ hε hdiv hsub (δ / 2) (half_pos hδ) have hscale : ∀ᶠ n : ℕ in atTop, |(n : ℝ) / (adaptiveMainSize m n : ℝ) - 1| < δ / (2 * K) := by have ht := adaptive_mainScale_tendsto_one m hsub obtain ⟨N, hN⟩ := Metric.tendsto_atTop.1 ht (δ / (2 * K)) (by positivity) exact eventually_atTop.2 ⟨N, fun n hn => by simpa only [Real.dist_eq] using hN n hn⟩ filter_upwards [havg, hscale] with n hnavg hnscale intro hn h hH hlocal let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 let A := pilotPrefixVarianceAverage select (localAlternative θ h n) p ε m hmn hselect hp hε have hA := pilotPrefixVarianceAverage_bounds select (localAlternative θ h n) p ε m hmn hselect hp hlocal hε have hAabs : |A| ≤ (pilotPhiUpper p ε) ^ 2 := by rw [abs_of_nonneg hA.1] exact hA.2 have havg' : |A - Vstar θ p ε| < δ / 2 := by simpa only [A, hmn] using hnavg hn h hH hlocal calc |(n : ℝ) / (adaptiveMainSize m n : ℝ) * A - Vstar θ p ε| ≤ |((n : ℝ) / (adaptiveMainSize m n : ℝ) - 1) * A| + |A - Vstar θ p ε| := by have hid : (n : ℝ) / (adaptiveMainSize m n : ℝ) * A - Vstar θ p ε = ((n : ℝ) / (adaptiveMainSize m n : ℝ) - 1) * A + (A - Vstar θ p ε) := by ring rw [hid] exact abs_add_le _ _ _ ≤ |(n : ℝ) / (adaptiveMainSize m n : ℝ) - 1| * (pilotPhiUpper p ε) ^ 2 + |A - Vstar θ p ε| := by rw [abs_mul] gcongr _ ≤ |(n : ℝ) / (adaptiveMainSize m n : ℝ) - 1| * K + |A - Vstar θ p ε| := by gcongr dsimp [K] linarith _ < δ / (2 * K) * K + δ / 2 := add_lt_add_of_lt_of_lt (mul_lt_mul_of_pos_right hnscale hK) havg' _ = δ := by field_simp [ne_of_gt hK] norm_num
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_uniform_scaledPrefixVarianceAverage · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskAttainment.lean:219
theorem eventually_localWorstRisk_sandwich

Uniform real-risk control sandwiches the local worst risk between two finite ENNReal.ofReal bounds. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the eventually local Worst Risk sandwich.

Formal statement
select :
shared
p ε H :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiv :
hsub :
hH :
0 < H
δ :
ℝ
0 < δ
∀ᶠ n in atTop, ofReal (Vstar θ p ε - δ)
≤ localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n ∧
localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n
≤ ofReal (Vstar θ p ε + δ)
Proof (Lean source)
lemma eventually_localWorstRisk_sandwich (θ : TrialParameter) (p ε H : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) (hH : 0 < H) : ∀ δ : ℝ, 0 < δ → ∀ᶠ n in atTop, ofReal (Vstar θ p ε - δ) ≤ localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n ∧ localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n ≤ ofReal (Vstar θ p ε + δ) := by intro δ hδ have hunif := eventually_uniform_scaledPrefixVarianceAverage select θ p ε H m hselect hp hθ hε hdiv hsub δ hδ filter_upwards [hunif, eventually_ge_atTop 2] with n hnif hn have hlower : ofReal (Vstar θ p ε - δ) ≤ localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n := by let h0 : TrialParameter := fun _ => 0 have hh0 : h0 ∈ localIndexSet θ n H := by constructor · dsimp [h0] simpa using hH.le · have hz : localAlternative θ h0 n = θ := by funext k simp [h0, localAlternative] rw [hz] exact hθ have hid := pilotEstimator_localRisk_eq_scaled_prefixVarianceAverage select θ h0 p ε H m hselect hp hθ hε hsub n hn hh0 have hclose := hnif hn h0 hh0.1 hh0.2 have hreal : Vstar θ p ε - δ < (n : ℝ) / (adaptiveMainSize m n : ℝ) * pilotPrefixVarianceAverage select (localAlternative θ h0 n) p ε m (le_of_lt (hsub.2 n hn).2) hselect hp hε := by linarith [(abs_lt.mp hclose).1] have hmember : localRisk (pilotEstimator p ε m select hselect hp hε) θ h0 p n ∈ {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ n H, u = localRisk (pilotEstimator p ε m select hselect hp hε) θ h p n} := ⟨h0, hh0, rfl⟩ calc ofReal (Vstar θ p ε - δ) ≤ localRisk (pilotEstimator p ε m select hselect hp hε) θ h0 p n := by rw [hid] exact ENNReal.ofReal_le_ofReal hreal.le _ ≤ localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n := by unfold localWorstRisk exact le_sSup hmember have hupper : localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n ≤ ofReal (Vstar θ p ε + δ) := by unfold localWorstRisk apply sSup_le intro u hu obtain ⟨h, hh, rfl⟩ := hu rw [pilotEstimator_localRisk_eq_scaled_prefixVarianceAverage select θ h p ε H m hselect hp hθ hε hsub n hn hh] apply ENNReal.ofReal_le_ofReal linarith [(abs_lt.mp (hnif hn h hh.1 hh.2)).2] exact ⟨hlower, hupper⟩
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_localWorstRisk_sandwich · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskAttainment.lean:282
theorem pilot_localWorstRisk_tendsto

Under the supplied quantities and conditions, the pilot local worst risk tendsto assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot local Worst Risk tendsto.

Formal statement
select :
shared
p ε H :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiv :
hsub :
hH :
0 < H
Tendsto (fun n => localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n) atTop (nhds (ofReal (Vstar θ p ε)))
Proof (Lean source)
lemma pilot_localWorstRisk_tendsto (θ : TrialParameter) (p ε H : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) (hH : 0 < H) : Tendsto (fun n => localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n) atTop (nhds (ofReal (Vstar θ p ε))) := by rw [tendsto_order] constructor · intro a ha have haTop : a ≠ ⊤ := by intro hat rw [hat] at ha exact (not_lt_of_ge le_top) ha have hV0 : 0 ≤ Vstar θ p ε := (inv_pos.mpr (Jstar_pos_interior θ p ε hp hθ hε)).le have haV : a.toReal < Vstar θ p ε := by have := (ENNReal.toReal_lt_toReal haTop ENNReal.ofReal_ne_top).2 ha simpa [ENNReal.toReal_ofReal hV0] using this let δ := (Vstar θ p ε - a.toReal) / 2 have hδ : 0 < δ := by dsimp [δ]; linarith have hsand := eventually_localWorstRisk_sandwich select θ p ε H m hselect hp hθ hε hdiv hsub hH δ hδ filter_upwards [hsand] with n hn have hreal : a.toReal < Vstar θ p ε - δ := by dsimp [δ] linarith have hlt : a < ofReal (Vstar θ p ε - δ) := (ENNReal.lt_ofReal_iff_toReal_lt haTop).2 hreal exact hlt.trans_le hn.1 · intro b hb by_cases hbTop : b = ⊤ · have hsand := eventually_localWorstRisk_sandwich select θ p ε H m hselect hp hθ hε hdiv hsub hH 1 (by norm_num) filter_upwards [hsand] with n hn rw [hbTop] exact lt_top_iff_ne_top.2 (ne_top_of_le_ne_top ENNReal.ofReal_ne_top hn.2) · have hV0 : 0 ≤ Vstar θ p ε := (inv_pos.mpr (Jstar_pos_interior θ p ε hp hθ hε)).le have hVb : Vstar θ p ε < b.toReal := by have := (ENNReal.toReal_lt_toReal ENNReal.ofReal_ne_top hbTop).2 hb simpa [ENNReal.toReal_ofReal hV0] using this let δ := (b.toReal - Vstar θ p ε) / 2 have hδ : 0 < δ := by dsimp [δ]; linarith have hsand := eventually_localWorstRisk_sandwich select θ p ε H m hselect hp hθ hε hdiv hsub hH δ hδ filter_upwards [hsand] with n hn have hsum0 : 0 ≤ Vstar θ p ε + δ := by positivity have hreal : Vstar θ p ε + δ < b.toReal := by dsimp [δ] linarith have hlt : ofReal (Vstar θ p ε + δ) < b := by apply (ENNReal.toReal_lt_toReal ENNReal.ofReal_ne_top hbTop).1 simpa [ENNReal.toReal_ofReal hsum0] using hreal exact hn.2.trans_lt hlt
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_localWorstRisk_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskAttainment.lean:343
theorem pilot_liminf_localWorstRisk_eq

Under the supplied quantities and conditions, the pilot liminf local worst risk eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot liminf local Worst Risk eq.

Formal statement
select :
shared
p ε H :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiv :
hsub :
hH :
0 < H
liminf (fun n => localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n) atTop
= ofReal (Vstar θ p ε)
Proof (Lean source)
lemma pilot_liminf_localWorstRisk_eq (θ : TrialParameter) (p ε H : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) (hH : 0 < H) : liminf (fun n => localWorstRisk (pilotEstimator p ε m select hselect hp hε) θ p H n) atTop = ofReal (Vstar θ p ε) := (pilot_localWorstRisk_tendsto select θ p ε H m hselect hp hθ hε hdiv hsub hH).liminf_eq
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_liminf_localWorstRisk_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskAttainment.lean:403
theorem pilot_localAsymptoticRisk_eq

The private-pilot estimator attains the exact local asymptotic risk. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot local Asymptotic Risk eq.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiv :
hsub :
localAsymptoticRisk (pilotEstimator p ε m select hselect hp hε) θ p
= ofReal (Vstar θ p ε)
Proof (Lean source)
lemma pilot_localAsymptoticRisk_eq (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) : localAsymptoticRisk (pilotEstimator p ε m select hselect hp hε) θ p = ofReal (Vstar θ p ε) := by apply localAsymptoticRisk_eq_of_liminf_localWorstRisk intro H hH exact pilot_liminf_localWorstRisk_eq select θ p ε H m hselect hp hθ hε hdiv hsub hH
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_localAsymptoticRisk_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskAttainment.lean:416
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotLocalRiskConvergence 10 declarations Uniform finite-prefix control for private-pilot local risk

Uniform finite-prefix control for private-pilot local risk

def pilotPrefixWeight

The literal probability mass of a released pilot prefix. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The pilot Prefix Weight is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
u :
Fin (m n) → Fin 4
pilotPrefixWeight θ p ε m n u :
ℝ
∏ j : Fin (m n), ∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j)
def pilotPrefixBadMass

Prefix mass on which the clipped pilot selector leaves a coordinatewise r-neighborhood of the row parameter. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The pilot Prefix Bad Mass is determined by the displayed parameters.

Definition (Lean source)
p ε r :
ℝ
m :
ℕ → ℕ
n :
ℕ
hmn :
m n ≤ n
pilotPrefixBadMass θ p ε r m hmn :
ℝ
∑ u : Fin (m n) → Fin 4, pilotPrefixWeight θ p ε m n u * if r
≤ |pilotAdaptivePrefixTheta p ε m hmn u 0
- θ 0| ∨ r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 1
- θ 1| then 1 else 0
def pilotPrefixVarianceAverage

The selected-score variance averaged over the genuine pilot-prefix law. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The pilot Prefix Variance Average is determined by the displayed parameters.

Definition (Lean source)
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
hmn :
m n ≤ n
hselect :
hε :
0 < ε
pilotPrefixVarianceAverage select θ p ε m hmn hselect hp hε :
ℝ
∑ u : Fin (m n) → Fin 4, pilotPrefixWeight θ p ε m n u * adaptiveScoreVariance select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixVarianceAverage · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskConvergence.lean:30
theorem pilotPrefixWeight_nonneg

Under the supplied quantities and conditions, the pilot prefix weight nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Prefix Weight nonneg.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
hθ :
u :
Fin (m n) → Fin 4
0 ≤ pilotPrefixWeight θ p ε m n u
Proof (Lean source)
lemma pilotPrefixWeight_nonneg (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (u : Fin (m n) → Fin 4) : 0 ≤ pilotPrefixWeight θ p ε m n u := by apply Finset.prod_nonneg intro j _ apply Finset.sum_nonneg intro a _ exact mul_nonneg (piTheta_pos_interior θ p hp hθ a).le (by unfold rrPilotProbability split_ifs <;> positivity)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixWeight_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskConvergence.lean:39
theorem pilotPrefixWeight_sum

Under the supplied quantities and conditions, the pilot prefix weight sum assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
n :
ℕ
∑ u : Fin (m n) → Fin 4, pilotPrefixWeight θ p ε m n u = 1
Proof (Lean source)
lemma pilotPrefixWeight_sum (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (n : ℕ) : ∑ u : Fin (m n) → Fin 4, pilotPrefixWeight θ p ε m n u = 1 := by unfold pilotPrefixWeight calc _ = ∏ _j : Fin (m n), ∑ k : Fin 4, ∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a k := by simpa using (Fintype.prod_sum (fun _j : Fin (m n) => fun k : Fin 4 => ∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a k)).symm _ = 1 := by simp [rrPilot_marginal_sum_eq_one]
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixWeight_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskConvergence.lean:54
theorem transcriptLaw_pilotTheta_bad_eq_ofReal_prefixBadMass

The real bad-prefix mass is exactly the corresponding event probability under the full transcript law. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Law pilot Theta bad eq of Real prefix Bad Mass.

Formal statement
select :
shared
p ε r :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
(transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | r ≤ |pilotTheta p ε m z 0 - θ 0| ∨ r ≤ |pilotTheta p ε m z 1 - θ 1|}
= ofReal (pilotPrefixBadMass θ p ε r m hmn)
Proof (Lean source)
lemma transcriptLaw_pilotTheta_bad_eq_ofReal_prefixBadMass (θ : TrialParameter) (p ε r : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) : (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | r ≤ |pilotTheta p ε m z 0 - θ 0| ∨ r ≤ |pilotTheta p ε m z 1 - θ 1|} = ofReal (pilotPrefixBadMass θ p ε r m hmn) := by classical let μ := transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n let A : Set (Transcript (pilotOutputFamily n)) := {z | r ≤ |pilotTheta p ε m z 0 - θ 0| ∨ r ≤ |pilotTheta p ε m z 1 - θ 1|} let e := fun uv : (Fin (m n) → Fin 4) × (Fin (n - m n) → Fin 14) => pilotAdaptiveEncode hmn uv.1 uv.2 have hmainSum (u : Fin (m n) → Fin 4) : ∑ v : Fin (n - m n) → Fin 14, ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j) = 1 := by calc _ = ∏ _j : Fin (n - m n), ∑ s : Fin 14, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε s := by simpa using (Fintype.prod_sum (fun _j : Fin (n - m n) => fun s : Fin 14 => adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε s)).symm _ = ∏ _j : Fin (n - m n), (1 : ℝ) := by apply Finset.prod_congr rfl intro j _ have hη : InteriorMeans (pilotAdaptivePrefixTheta p ε m hmn u) := by exact pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0)) exact adaptiveMainMass_sum select θ _ p ε hselect hp hη hε _ = 1 := by simp have hw (u : Fin (m n) → Fin 4) : 0 ≤ pilotPrefixWeight θ p ε m n u := pilotPrefixWeight_nonneg θ p ε m n hp hθ u have hm (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : 0 ≤ ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j) := by apply Finset.prod_nonneg intro j _ exact adaptiveMainMass_nonneg select θ _ p ε hselect hp hθ (pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0))) hε (v j) have hatom (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : μ {e (u, v)} = ofReal (pilotPrefixWeight θ p ε m n u * ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) := by rw [pilotAdaptive_joint_singleton_eq_prefix_mul_mainProduct select θ p ε m hselect hp hθ hε hmn u v] change ofReal (pilotPrefixWeight θ p ε m n u) * ofReal (∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) = _ exact (ENNReal.ofReal_mul (hw u)).symm have hA : MeasurableSet A := MeasurableSet.of_discrete rw [show μ A = ∫⁻ z, A.indicator (fun _ => (1 : ENNReal)) z ∂μ by rw [lintegral_indicator hA, setLIntegral_one]] rw [MeasureTheory.lintegral_fintype] rw [sum_eq_sum_image_of_zero_off_range e (pilotAdaptiveEncode_pair_injective hmn)] · rw [Fintype.sum_prod_type] simp_rw [hatom] change (∑ u, ∑ v, A.indicator (fun _ => (1 : ENNReal)) (e (u, v)) * ofReal (pilotPrefixWeight θ p ε m n u * ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) = _ have hind (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : A.indicator (fun _ => (1 : ENNReal)) (e (u, v)) = if r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ 0| ∨ r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ 1| then 1 else 0 := by rw [Set.indicator_apply] simp only [A, Set.mem_ofPred_eq, e, pilotTheta_pilotAdaptiveEncode p ε m hmn u v] simp_rw [hind] unfold pilotPrefixBadMass have hofReal_sum {B : Type} [Fintype B] (f : B → ℝ) (hf : ∀ b, 0 ≤ f b) : (∑ b, ofReal (f b)) = ofReal (∑ b, f b) := by simpa using (ENNReal.ofReal_sum_of_nonneg (s := univ) (fun b _ => hf b)).symm have hinner (u : Fin (m n) → Fin 4) : (∑ v : Fin (n - m n) → Fin 14, (if r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ 0| ∨ r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ 1| then 1 else 0) * ofReal (pilotPrefixWeight θ p ε m n u * ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) = ofReal (pilotPrefixWeight θ p ε m n u * if r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ 0| ∨ r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ 1| then 1 else 0) := by split_ifs with hu · simp only [one_mul, mul_one] rw [hofReal_sum] · congr 1 rw [← Finset.mul_sum, hmainSum u, mul_one] · intro v exact mul_nonneg (hw u) (hm u v) · simp simp_rw [hinner] apply hofReal_sum intro u exact mul_nonneg (hw u) (by split_ifs <;> positivity) · intro z hz have hzμ := pilotAdaptive_singleton_zero_of_not_range select θ p ε m hselect hp hε hmn z hz apply mul_eq_zero.mpr right simpa only [μ] using hzμ
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw_pilotTheta_bad_eq_ofReal_prefixBadMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskConvergence.lean:66
theorem pilotPrefixBadMass_le

Uniform Chebyshev control of the bad prefix mass. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Prefix Bad Mass le.

Formal statement
select :
shared
p ε r :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hr :
0 < r
n :
ℕ
hmn :
m n ≤ n
hmpos :
0 < m n
hδ0l :
(m n + 2 : ℝ)⁻¹ + r ≤ θ 0
hδ0r :
(m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 0
hδ1l :
(m n + 2 : ℝ)⁻¹ + r ≤ θ 1
hδ1r :
(m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 1
pilotPrefixBadMass θ p ε r m hmn
≤ 1 / ((m n : ℝ) * (r * controlProb p * (exp ε - 1) / (exp ε + 3)) ^ 2)
+ 1 / ((m n : ℝ) * (r * p * (exp ε - 1) / (exp ε + 3)) ^ 2)
Proof (Lean source)
lemma pilotPrefixBadMass_le (θ : TrialParameter) (p ε r : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hr : 0 < r) {n : ℕ} (hmn : m n ≤ n) (hmpos : 0 < m n) (hδ0l : (m n + 2 : ℝ)⁻¹ + r ≤ θ 0) (hδ0r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 0) (hδ1l : (m n + 2 : ℝ)⁻¹ + r ≤ θ 1) (hδ1r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 1) : pilotPrefixBadMass θ p ε r m hmn ≤ 1 / ((m n : ℝ) * (r * controlProb p * (exp ε - 1) / (exp ε + 3)) ^ 2) + 1 / ((m n : ℝ) * (r * p * (exp ε - 1) / (exp ε + 3)) ^ 2) := by have hmeasure := pilotTheta_deviation_le select θ p ε r m hselect hp hθ hε hr hmn hmpos hδ0l hδ0r hδ1l hδ1r rw [transcriptLaw_pilotTheta_bad_eq_ofReal_prefixBadMass select θ p ε r m hselect hp hθ hε hmn] at hmeasure let x := 1 / ((m n : ℝ) * (r * controlProb p * (exp ε - 1) / (exp ε + 3)) ^ 2) let y := 1 / ((m n : ℝ) * (r * p * (exp ε - 1) / (exp ε + 3)) ^ 2) have hx : 0 ≤ x := by dsimp [x]; positivity have hy : 0 ≤ y := by dsimp [y]; positivity change ofReal (pilotPrefixBadMass θ p ε r m hmn) ≤ ofReal x + ofReal y at hmeasure rw [← ENNReal.ofReal_add hx hy] at hmeasure exact (ENNReal.ofReal_le_ofReal_iff (add_nonneg hx hy)).mp hmeasure
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixBadMass_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskConvergence.lean:181
theorem pilotPrefixVarianceAverage_error_le

A deterministic good/bad decomposition for the prefix-averaged variance. It uses the exact prefix weights and leaves only the genuine bad-prefix mass. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Prefix Variance Average error le.

Formal statement
select :
shared
θ θ' :
p ε r δ :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hθ' :
hε :
0 < ε
hδ :
0 ≤ δ
n :
ℕ
hmn :
m n ≤ n
hgood :
and
(∀ k : Fin 2, |η k - θ' k| < r)
then
|adaptiveScoreVariance select θ' η p ε - Vstar θ p ε| ≤ δ
|pilotPrefixVarianceAverage select θ' p ε m hmn hselect hp hε - Vstar θ p ε|
≤ δ + ((pilotPhiUpper p ε) ^ 2 + |Vstar θ p ε|) * pilotPrefixBadMass θ' p ε r m hmn
Proof (Lean source)
lemma pilotPrefixVarianceAverage_error_le (θ θ' : TrialParameter) (p ε r δ : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hθ' : InteriorMeans θ') (hε : 0 < ε) (hδ : 0 ≤ δ) {n : ℕ} (hmn : m n ≤ n) (hgood : ∀ η : TrialParameter, InteriorMeans η → (∀ k : Fin 2, |η k - θ' k| < r) → |adaptiveScoreVariance select θ' η p ε - Vstar θ p ε| ≤ δ) : |pilotPrefixVarianceAverage select θ' p ε m hmn hselect hp hε - Vstar θ p ε| ≤ δ + ((pilotPhiUpper p ε) ^ 2 + |Vstar θ p ε|) * pilotPrefixBadMass θ' p ε r m hmn := by let good : (Fin (m n) → Fin 4) → Prop := fun u => |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ' 0| < r ∧ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ' 1| < r let w : (Fin (m n) → Fin 4) → ℝ := pilotPrefixWeight θ' p ε m n let g : (Fin (m n) → Fin 4) → ℝ := fun u => adaptiveScoreVariance select θ' (pilotAdaptivePrefixTheta p ε m hmn u) p ε have hw (u : Fin (m n) → Fin 4) : 0 ≤ w u := pilotPrefixWeight_nonneg θ' p ε m n hp hθ' u have hsum : ∑ u, w u = 1 := pilotPrefixWeight_sum θ' p ε m n have hgood' (u : Fin (m n) → Fin 4) (hu : good u) : |g u - Vstar θ p ε| ≤ δ := by apply hgood _ · exact pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0)) · intro k fin_cases k · exact hu.1 · exact hu.2 have hdecomp := finitePilot_good_bad_average_error_le w g good (Vstar θ p ε) δ hw hsum (le_of_lt (inv_pos.mpr (Jstar_pos_interior θ p ε hp hθ hε))) hδ hgood' calc |pilotPrefixVarianceAverage select θ' p ε m hmn hselect hp hε - Vstar θ p ε| ≤ δ + ∑ u, w u * if good u then 0 else |g u - Vstar θ p ε| := by simpa [pilotPrefixVarianceAverage, w, g] using hdecomp _ ≤ δ + ∑ u, w u * if good u then 0 else ((pilotPhiUpper p ε) ^ 2 + |Vstar θ p ε|) := by apply add_le_add le_rfl apply Finset.sum_le_sum intro u _ apply mul_le_mul_of_nonneg_left _ (hw u) split_ifs with hu · exact le_rfl · calc |g u - Vstar θ p ε| ≤ |g u| + |Vstar θ p ε| := abs_sub _ _ _ ≤ (pilotPhiUpper p ε) ^ 2 + |Vstar θ p ε| := by gcongr have hη : InteriorMeans (pilotAdaptivePrefixTheta p ε m hmn u) := by exact pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0)) have hv0 : 0 ≤ g u := adaptiveScoreVariance_nonneg select θ' _ p ε hselect hp hθ' hη hε rw [abs_of_nonneg hv0] exact adaptiveScoreVariance_le select θ' _ p ε hselect hp hθ' hη hε _ = δ + ((pilotPhiUpper p ε) ^ 2 + |Vstar θ p ε|) * pilotPrefixBadMass θ' p ε r m hmn := by unfold pilotPrefixBadMass good w congr 1 rw [Finset.mul_sum] apply Finset.sum_congr rfl intro u _ by_cases hbad : r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ' 0| ∨ r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ' 1| · have hngood : ¬(|pilotAdaptivePrefixTheta p ε m hmn u 0 - θ' 0| < r ∧ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ' 1| < r) := by intro hg exact hbad.elim (fun h => (not_le_of_gt hg.1) h) (fun h => (not_le_of_gt hg.2) h) simp [hbad, hngood] ring · have hgood : |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ' 0| < r ∧ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ' 1| < r := by push Not at hbad exact hbad simp [hbad, hgood]
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixVarianceAverage_error_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskConvergence.lean:213
theorem adaptiveScoreVariance_uniform_near_diag

Continuity at the diagonal gives one common neighborhood controlling both the local row parameter and the selected pilot parameter. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Score Variance uniform near diag.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hθ :
hε :
0 < ε
δ :
ℝ
0 < δ
∃ r : ℝ,
0 < r
conclusion 1
θ' η :
dist θ' θ < r
dist η θ < r
|adaptiveScoreVariance select θ' η p ε - Vstar θ p ε| < δ
Proof (Lean source)
lemma adaptiveScoreVariance_uniform_near_diag (θ : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : ∀ δ : ℝ, 0 < δ → ∃ r : ℝ, 0 < r ∧ ∀ θ' η : TrialParameter, dist θ' θ < r → dist η θ < r → |adaptiveScoreVariance select θ' η p ε - Vstar θ p ε| < δ := by intro δ hδ have hc := continuousAt_adaptiveScoreVariance_diag select θ p ε hselect hp hθ hε rw [Metric.continuousAt_iff] at hc obtain ⟨r, hr, hcontrol⟩ := hc δ hδ refine ⟨r, hr, ?_⟩ intro θ' η hθ' hη have hpair : dist (θ', η) (θ, θ) < r := by simpa only [Prod.dist_eq, max_lt_iff] using intro hθ' hη simpa only [Real.dist_eq, adaptiveScoreVariance_diag select θ p ε hselect hp hθ hε] using hcontrol hpair
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveScoreVariance_uniform_near_diag · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskConvergence.lean:295
theorem pilotEstimator_localRisk_eq_scaled_prefixVarianceAverage

Compact notation for the exact local-risk identity on the local index set. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Estimator local Risk eq scaled prefix Variance Average.

Formal statement
select :
shared
p ε H :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hsub :
n :
ℕ
hn :
2 ≤ n
hh :
h ∈ localIndexSet θ n H
localRisk (pilotEstimator p ε m select hselect hp hε) θ h p n
= ofReal ((n : ℝ) / (adaptiveMainSize m n : ℝ) * pilotPrefixVarianceAverage select (localAlternative θ h n) p ε m (le_of_lt (hsub.2 n hn).2) hselect hp hε)
Proof (Lean source)
lemma pilotEstimator_localRisk_eq_scaled_prefixVarianceAverage (θ h : TrialParameter) (p ε H : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hsub : PilotSublinear m) (n : ℕ) (hn : 2 ≤ n) (hh : h ∈ localIndexSet θ n H) : localRisk (pilotEstimator p ε m select hselect hp hε) θ h p n = ofReal ((n : ℝ) / (adaptiveMainSize m n : ℝ) * pilotPrefixVarianceAverage select (localAlternative θ h n) p ε m (le_of_lt (hsub.2 n hn).2) hselect hp hε) := by simpa only [pilotPrefixVarianceAverage, pilotPrefixWeight] using pilotEstimator_localRisk_eq_prefixVariance_of_mem_localIndexSet select θ h p ε H m hselect hp hθ hε hsub n hn hh
CausalSmith.Stat.LdpAteEfficiencySurface.pilotEstimator_localRisk_eq_scaled_prefixVarianceAverage · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskConvergence.lean:317
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotLocalRiskIdentity 2 declarations Exact transcript-law identity for private-pilot local risk

Exact transcript-law identity for private-pilot local risk

theorem pilotEstimator_localRisk_eq_prefixVariance

At every proper finite pilot split for which the local alternative is interior, the transcript-law local risk is exactly the prefix average of the conditional selected-score variances, including the finite main-size factor. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Estimator local Risk eq prefix Variance.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hsub :
n :
ℕ
hn :
2 ≤ n
hlocal :
localRisk (pilotEstimator p ε m select hselect hp hε) θ h p n
= ofReal ((n : ℝ) / (adaptiveMainSize m n : ℝ) * ∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta (localAlternative θ h n) p a * rrPilotProbability ε a (u j)) * adaptiveScoreVariance select (localAlternative θ h n) (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε)
Proof (Lean source)
lemma pilotEstimator_localRisk_eq_prefixVariance (θ h : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hsub : PilotSublinear m) (n : ℕ) (hn : 2 ≤ n) (hlocal : InteriorMeans (localAlternative θ h n)) : localRisk (pilotEstimator p ε m select hselect hp hε) θ h p n = ofReal ((n : ℝ) / (adaptiveMainSize m n : ℝ) * ∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta (localAlternative θ h n) p a * rrPilotProbability ε a (u j)) * adaptiveScoreVariance select (localAlternative θ h n) (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε) := by classical let θn := localAlternative θ h n let P := pilotEstimator p ε m select hselect hp hε let μ := transcriptLaw P θn p n let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 let e := fun uv : (Fin (m n) → Fin 4) × (Fin (n - m n) → Fin 14) => pilotAdaptiveEncode hmn uv.1 uv.2 have htrue : adaptiveTrueParam θ h n = θn := adaptiveTrueParam_eq_localAlternative θ h n hlocal have hmain : adaptiveMainSize m n = n - m n := by simp [adaptiveMainSize, adaptivePilotSize_eq m hsub hn] have hrisk := adaptivePilotPrefix_rootN_meanSquare select θ h p ε m hselect hp hθ hε hsub n hn rw [htrue] at hrisk rw [hmain] at hrisk unfold localRisk rw [MeasureTheory.lintegral_fintype] change (∑ z : Transcript (pilotOutputFamily n), ofReal ((scaledError P θ h n z) ^ 2) * μ {z}) = _ rw [sum_eq_sum_image_of_zero_off_range e (pilotAdaptiveEncode_pair_injective hmn)] · rw [Fintype.sum_prod_type] have hpilot_nonneg (u : Fin (m n) → Fin 4) : 0 ≤ ∏ j : Fin (m n), ∑ a : Fin 4, piTheta θn p a * rrPilotProbability ε a (u j) := by apply Finset.prod_nonneg intro j _ apply Finset.sum_nonneg intro a _ exact mul_nonneg (piTheta_pos_interior θn p hp hlocal a).le (by unfold rrPilotProbability split_ifs <;> positivity) have hmain_nonneg (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : 0 ≤ ∏ j : Fin (n - m n), adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j) := by apply Finset.prod_nonneg intro j _ exact adaptiveMainMass_nonneg select θn _ p ε hselect hp hlocal (pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0))) hε (v j) have hatom (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : μ {e (u, v)} = ofReal ((∏ j : Fin (m n), ∑ a : Fin 4, piTheta θn p a * rrPilotProbability ε a (u j)) * ∏ j : Fin (n - m n), adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) := by rw [pilotAdaptive_joint_singleton_eq_prefix_mul_mainProduct select θn p ε m hselect hp hlocal hε hmn u v] rw [← ENNReal.ofReal_mul (hpilot_nonneg u)] simp_rw [hatom] have herr (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : scaledError P θ h n (e (u, v)) = sqrt (n : ℝ) * (contrast (pilotAdaptivePrefixTheta p ε m hmn u) + ((n - m n : ℕ) : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) - contrast θn) := by unfold scaledError P change sqrt (n : ℝ) * (tauStar p ε m (select) (e (u, v)) - contrast θn) = _ rw [tauStar_pilotAdaptiveEncode select p ε m hp hε hmn u v] simp_rw [herr] simp_rw [← ENNReal.ofReal_mul (sq_nonneg _)] have hofReal_sum {A : Type} [Fintype A] (f : A → ℝ) (hf : ∀ a, 0 ≤ f a) : (∑ a, ofReal (f a)) = ofReal (∑ a, f a) := by simpa using (ENNReal.ofReal_sum_of_nonneg (s := univ) (fun a _ => hf a)).symm calc (∑ u : Fin (m n) → Fin 4, ∑ v : Fin (n - m n) → Fin 14, ofReal ((sqrt (n : ℝ) * (contrast (pilotAdaptivePrefixTheta p ε m hmn u) + ((n - m n : ℕ) : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) - contrast θn)) ^ 2 * ((∏ j : Fin (m n), ∑ a : Fin 4, piTheta θn p a * rrPilotProbability ε a (u j)) * ∏ j : Fin (n - m n), adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)))) = ∑ u : Fin (m n) → Fin 4, ofReal (∑ v : Fin (n - m n) → Fin 14, (sqrt (n : ℝ) * (contrast (pilotAdaptivePrefixTheta p ε m hmn u) + ((n - m n : ℕ) : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) - contrast θn)) ^ 2 * ((∏ j : Fin (m n), ∑ a : Fin 4, piTheta θn p a * rrPilotProbability ε a (u j)) * ∏ j : Fin (n - m n), adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) := by apply Finset.sum_congr rfl intro u _ refine hofReal_sum (A := Fin (n - m n) → Fin 14) _ ?_ intro v exact mul_nonneg (sq_nonneg _) (mul_nonneg (hpilot_nonneg u) (hmain_nonneg u v)) _ = ofReal (∑ u : Fin (m n) → Fin 4, ∑ v : Fin (n - m n) → Fin 14, (sqrt (n : ℝ) * (contrast (pilotAdaptivePrefixTheta p ε m hmn u) + ((n - m n : ℕ) : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) - contrast θn)) ^ 2 * ((∏ j : Fin (m n), ∑ a : Fin 4, piTheta θn p a * rrPilotProbability ε a (u j)) * ∏ j : Fin (n - m n), adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) := by refine hofReal_sum (A := Fin (m n) → Fin 4) _ ?_ intro u exact Finset.sum_nonneg fun v _ => mul_nonneg (sq_nonneg _) (mul_nonneg (hpilot_nonneg u) (hmain_nonneg u v)) _ = _ := by congr 1 calc (∑ u : Fin (m n) → Fin 4, ∑ v : Fin (n - m n) → Fin 14, (sqrt (n : ℝ) * (contrast (pilotAdaptivePrefixTheta p ε m hmn u) + ((n - m n : ℕ) : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) - contrast θn)) ^ 2 * ((∏ j : Fin (m n), ∑ a : Fin 4, piTheta θn p a * rrPilotProbability ε a (u j)) * ∏ j : Fin (n - m n), adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) = ∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta θn p a * rrPilotProbability ε a (u j)) * ∑ v : Fin (n - m n) → Fin 14, (∏ j, adaptiveMainMass select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) * (sqrt (n : ℝ) * (contrast (pilotAdaptivePrefixTheta p ε m hmn u) + ((n - m n : ℕ) : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) - contrast θn)) ^ 2 := by apply Finset.sum_congr rfl intro u _ rw [Finset.mul_sum] apply Finset.sum_congr rfl intro v _ ring _ = ∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta θn p a * rrPilotProbability ε a (u j)) * ((n : ℝ) / (n - m n : ℕ) * adaptiveScoreVariance select θn (pilotAdaptivePrefixTheta p ε m hmn u) p ε) := by simpa only [hmn] using hrisk _ = (n : ℝ) / (adaptiveMainSize m n : ℝ) * ∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta (localAlternative θ h n) p a * rrPilotProbability ε a (u j)) * adaptiveScoreVariance select (localAlternative θ h n) (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε := by rw [hmain] simp only [θn] rw [Finset.mul_sum] apply Finset.sum_congr rfl intro u _ ring · intro z hz have hzμ := pilotAdaptive_singleton_zero_of_not_range select θn p ε m hselect hp hε hmn z hz apply mul_eq_zero.mpr right simpa only [μ, P] using hzμ
CausalSmith.Stat.LdpAteEfficiencySurface.pilotEstimator_localRisk_eq_prefixVariance · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskIdentity.lean:17
theorem pilotEstimator_localRisk_eq_prefixVariance_of_mem_localIndexSet

The exact risk identity applies to every direction in the finite-sample local index set; its membership condition supplies precisely the interiority needed by the transcript-law factorization. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Estimator local Risk eq prefix Variance of mem local Index Set.

Formal statement
select :
shared
p ε H :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hsub :
n :
ℕ
hn :
2 ≤ n
hh :
h ∈ localIndexSet θ n H
localRisk (pilotEstimator p ε m select hselect hp hε) θ h p n
= ofReal ((n : ℝ) / (adaptiveMainSize m n : ℝ) * ∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta (localAlternative θ h n) p a * rrPilotProbability ε a (u j)) * adaptiveScoreVariance select (localAlternative θ h n) (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε)
Proof (Lean source)
lemma pilotEstimator_localRisk_eq_prefixVariance_of_mem_localIndexSet (θ h : TrialParameter) (p ε H : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hsub : PilotSublinear m) (n : ℕ) (hn : 2 ≤ n) (hh : h ∈ localIndexSet θ n H) : localRisk (pilotEstimator p ε m select hselect hp hε) θ h p n = ofReal ((n : ℝ) / (adaptiveMainSize m n : ℝ) * ∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta (localAlternative θ h n) p a * rrPilotProbability ε a (u j)) * adaptiveScoreVariance select (localAlternative θ h n) (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε) := by exact pilotEstimator_localRisk_eq_prefixVariance select θ h p ε m hselect hp hθ hε hsub n hn hh.2
CausalSmith.Stat.LdpAteEfficiencySurface.pilotEstimator_localRisk_eq_prefixVariance_of_mem_localIndexSet · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskIdentity.lean:230
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotLocalRiskSupport 5 declarations Exact conditional local risk of the adaptive main row

Exact conditional local risk of the adaptive main row

theorem expect_scoreSum_sq

The squared sum of a centered finite iid row has expectation equal to the row length times the one-coordinate second moment. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Y :
Type*
M :
n :
ℕ
M.expect n (fun ys => (M.scoreSum n ys) ^ 2) = (M.N n : ℝ) * M.oneSecond n
Proof (Lean source)
lemma RowModel.expect_scoreSum_sq {Y : Type*} [Fintype Y] (M : RowModel Y) (n : ℕ) : M.expect n (fun ys => (M.scoreSum n ys) ^ 2) = (M.N n : ℝ) * M.oneSecond n := by classical have hsumsq (ys : Fin (M.N n) → Y) : (∑ i, M.f n (ys i)) ^ 2 = ∑ i, ∑ j, M.f n (ys i) * M.f n (ys j) := by rw [pow_two, Finset.sum_mul] apply Finset.sum_congr rfl intro i _ rw [Finset.mul_sum] simp only [scoreSum] simp_rw [hsumsq] rw [expect] simp_rw [Finset.mul_sum] calc (∑ ys : Fin (M.N n) → Y, ∑ i, ∑ j, M.mass n ys * (M.f n (ys i) * M.f n (ys j))) = ∑ i, ∑ ys : Fin (M.N n) → Y, ∑ j, M.mass n ys * (M.f n (ys i) * M.f n (ys j)) := by rw [Finset.sum_comm] _ = ∑ i, ∑ j, ∑ ys : Fin (M.N n) → Y, M.mass n ys * (M.f n (ys i) * M.f n (ys j)) := by apply Finset.sum_congr rfl intro i _ rw [Finset.sum_comm] _ = ∑ i, ∑ j, M.expect n (fun ys => M.f n (ys i) * M.f n (ys j)) := by rfl _ = ∑ i, M.expect n (fun ys => (M.f n (ys i)) ^ 2) := by apply Finset.sum_congr rfl intro i _ rw [Finset.sum_eq_single i] · simp [pow_two] · intro j _ hji rw [M.expect_coordinate_mul n i j (Ne.symm hji)] simp [M.centered] · simp _ = ∑ _i : Fin (M.N n), M.oneSecond n := by apply Finset.sum_congr rfl intro i _ simpa [oneSecond] using M.expect_coordinate n i (fun y => (M.f n y) ^ 2) _ = (M.N n : ℝ) * M.oneSecond n := by simp
Causalean.Stat.CLT.FiniteIidTriangular.RowModel.expect_scoreSum_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskSupport.lean:15
theorem adaptivePilotRow_conditional_meanSquare

Conditional on a convergent sequence of interior pilot selectors, the exact squared main-row estimation error is the adaptive score variance divided by the main-row size. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row conditional mean Square.

Formal statement
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
hηlim :
hsub :
n :
ℕ
hN :
0 < adaptiveMainSize m n
(∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v * (contrast (η n) + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (η n) p ε (v j)) - contrast (adaptiveTrueParam θ h n)) ^ 2)
= (adaptiveMainSize m n : ℝ)⁻¹ * adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε
Proof (Lean source)
lemma adaptivePilotRow_conditional_meanSquare (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (hηlim : Tendsto η atTop (nhds θ)) (hsub : PilotSublinear m) (n : ℕ) (hN : 0 < adaptiveMainSize m n) : (∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v * (contrast (η n) + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (η n) p ε (v j)) - contrast (adaptiveTrueParam θ h n)) ^ 2) = (adaptiveMainSize m n : ℝ)⁻¹ * adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε := by let M : RowModel (Fin 14) := { N := adaptiveMainSize m w := adaptivePilotRowMass select θ h η p ε hselect hp hε f := adaptivePilotRowScore select θ h η p ε hselect hp hε B := 2 * pilotPhiUpper p ε v₀ := adaptivePilotLimitVariance select θ p ε hselect hp hθ hε mass_nonneg := adaptivePilotRowMass_nonneg select θ h η p ε hselect hp hθ hη hε mass_one := adaptivePilotRowMass_sum select θ h η p ε hselect hp hη hε centered := adaptivePilotRowScore_centered select θ h η p ε hselect hp hη hε bound := adaptivePilotRowScore_abs_le select θ h η p ε hselect hp hθ hη hε variance_tendsto := adaptivePilotRow_variance_tendsto select θ h η p ε hselect hp hθ hη hε hηlim variance_pos := adaptivePilotLimitVariance_pos select θ p ε hselect hp hθ hε length_tendsto := adaptiveMainSize_tendsto_atTop m hsub } have hsquare := M.expect_scoreSum_sq n have hNr : (adaptiveMainSize m n : ℝ) ≠ 0 := by exact_mod_cast ne_of_gt hN simp only [M, RowModel.expect, RowModel.mass, RowModel.scoreSum, RowModel.oneSecond] at hsquare simp_rw [adaptivePilotRow_estimatorError_eq select θ h η p ε m hselect hp hε n hN] calc _ = ((adaptiveMainSize m n : ℝ)⁻¹) ^ 2 * (∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v * (∑ j, adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j)) ^ 2) := by rw [Finset.mul_sum] apply Finset.sum_congr rfl intro v _ ring _ = ((adaptiveMainSize m n : ℝ)⁻¹) ^ 2 * ((adaptiveMainSize m n : ℝ) * adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε) := by congr 1 simpa [adaptivePilotRowProductMass, adaptivePilotRow_secondMoment_eq select θ h η p ε hselect hp hη hε n] using hsquare _ = _ := by field_simp
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRow_conditional_meanSquare · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskSupport.lean:71
theorem adaptivePilotRow_conditional_rootN_meanSquare

The exact conditional mean-square error after root-n scaling. The finite-sample discrepancy from the selected-score variance is precisely the main-row fraction n / (n - m n). For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row conditional root N mean Square.

Formal statement
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
hηlim :
hsub :
n :
ℕ
hN :
0 < adaptiveMainSize m n
(∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v * (sqrt (n : ℝ) * (contrast (η n) + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (η n) p ε (v j)) - contrast (adaptiveTrueParam θ h n))) ^ 2)
= (n : ℝ) / (adaptiveMainSize m n : ℝ) * adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε
Proof (Lean source)
lemma adaptivePilotRow_conditional_rootN_meanSquare (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (hηlim : Tendsto η atTop (nhds θ)) (hsub : PilotSublinear m) (n : ℕ) (hN : 0 < adaptiveMainSize m n) : (∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v * (sqrt (n : ℝ) * (contrast (η n) + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (η n) p ε (v j)) - contrast (adaptiveTrueParam θ h n))) ^ 2) = (n : ℝ) / (adaptiveMainSize m n : ℝ) * adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε := by have hsqrt : (sqrt (n : ℝ)) ^ 2 = (n : ℝ) := Real.sq_sqrt (Nat.cast_nonneg n) have hrisk := adaptivePilotRow_conditional_meanSquare select θ h η p ε m hselect hp hθ hη hε hηlim hsub n hN have hNr : (adaptiveMainSize m n : ℝ) ≠ 0 := by exact_mod_cast ne_of_gt hN calc _ = (n : ℝ) * (∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v * (contrast (η n) + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (η n) p ε (v j)) - contrast (adaptiveTrueParam θ h n)) ^ 2) := by rw [Finset.mul_sum] apply Finset.sum_congr rfl intro v _ rw [mul_pow, hsqrt] ring _ = (n : ℝ) * ((adaptiveMainSize m n : ℝ)⁻¹ * adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε) := by rw [hrisk] _ = _ := by field_simp
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRow_conditional_rootN_meanSquare · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskSupport.lean:124
theorem adaptivePilotRow_rootN_riskValue_tendsto

Along every convergent sequence of interior pilot selectors, the exact conditional root-n risk value converges to the oracle variance. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row root N risk Value tendsto.

Formal statement
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
hηlim :
hsub :
Tendsto (fun n : ℕ => (n : ℝ) / (adaptiveMainSize m n : ℝ) * adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε) atTop (nhds (Vstar θ p ε))
Proof (Lean source)
-- keep: reusable finite-pilot construction, law, localization, or limit API for related adaptive procedures lemma adaptivePilotRow_rootN_riskValue_tendsto (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (hηlim : Tendsto η atTop (nhds θ)) (hsub : PilotSublinear m) : Tendsto (fun n : ℕ => (n : ℝ) / (adaptiveMainSize m n : ℝ) * adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε) atTop (nhds (Vstar θ p ε)) := by have hvar : Tendsto (fun n => adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε) atTop (nhds (Vstar θ p ε)) := by have ht := adaptivePilotRow_variance_tendsto select θ h η p ε hselect hp hθ hη hε hηlim convert ht using 1 · funext n rw [adaptivePilotRow_secondMoment_eq select θ h η p ε hselect hp hη hε n] · rfl exact adaptive_mainScale_mul_tendsto hsub hvar
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRow_rootN_riskValue_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskSupport.lean:165
theorem adaptivePilotPrefix_rootN_meanSquare

Averaging the exact conditional risk over every finite pilot prefix leaves only the prefix average of the selected-score variances. This is the exact finite-law risk decomposition, before any pilot-localization limit is used. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Prefix root N mean Square.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hsub :
n :
ℕ
hn :
2 ≤ n
(∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta (adaptiveTrueParam θ h n) p a * rrPilotProbability ε a (u j)) * (∑ v : Fin (adaptiveMainSize m n) → Fin 14, (∏ j, adaptiveMainMass select (adaptiveTrueParam θ h n) (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε (v j)) * (sqrt (n : ℝ) * (contrast (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε (v j)) - contrast (adaptiveTrueParam θ h n))) ^ 2))
= ∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta (adaptiveTrueParam θ h n) p a * rrPilotProbability ε a (u j)) * ((n : ℝ) / (adaptiveMainSize m n : ℝ) * adaptiveScoreVariance select (adaptiveTrueParam θ h n) (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε)
Proof (Lean source)
lemma adaptivePilotPrefix_rootN_meanSquare (θ h : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hsub : PilotSublinear m) (n : ℕ) (hn : 2 ≤ n) : (∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta (adaptiveTrueParam θ h n) p a * rrPilotProbability ε a (u j)) * (∑ v : Fin (adaptiveMainSize m n) → Fin 14, (∏ j, adaptiveMainMass select (adaptiveTrueParam θ h n) (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε (v j)) * (sqrt (n : ℝ) * (contrast (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε (v j)) - contrast (adaptiveTrueParam θ h n))) ^ 2)) = ∑ u : Fin (m n) → Fin 4, (∏ j : Fin (m n), ∑ a : Fin 4, piTheta (adaptiveTrueParam θ h n) p a * rrPilotProbability ε a (u j)) * ((n : ℝ) / (adaptiveMainSize m n : ℝ) * adaptiveScoreVariance select (adaptiveTrueParam θ h n) (pilotAdaptivePrefixTheta p ε m (le_of_lt (hsub.2 n hn).2) u) p ε) := by classical let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 have hN : 0 < adaptiveMainSize m n := by rw [adaptiveMainSize, adaptivePilotSize_eq m hsub hn] exact Nat.sub_pos_of_lt (hsub.2 n hn).2 apply Finset.sum_congr rfl intro u _ congr 1 let η₀ := pilotAdaptivePrefixTheta p ε m hmn u let η : ℕ → TrialParameter := fun k => if k = n then η₀ else θ have hη₀ : InteriorMeans η₀ := by exact pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0)) have hη : ∀ k, InteriorMeans (η k) := by intro k simp only [η] split_ifs <;> assumption have hηlim : Tendsto η atTop (nhds θ) := by apply tendsto_const_nhds.congr' filter_upwards [eventually_gt_atTop n] with k hk simp [η, ne_of_gt hk] have hrisk := adaptivePilotRow_conditional_rootN_meanSquare select θ h η p ε m hselect hp hθ hη hε hηlim hsub n hN simpa only [adaptivePilotRowProductMass, adaptivePilotRowMass, η, if_pos, η₀, hmn] using hrisk
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotPrefix_rootN_meanSquare · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalRiskSupport.lean:190
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotLocalization 7 declarations Quantitative localization of the randomized-response pilot

Quantitative localization of the randomized-response pilot

def pilotInverseFrequency

The affine inverse applied to one released-category frequency. For the displayed inputs and conditions, the stated result follows. The pilot Inverse Frequency is determined by the displayed parameters.

Definition (Lean source)
ε x :
ℝ
pilotInverseFrequency ε x :
ℝ
((exp ε + 3) * x - 1) / (exp ε - 1)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotInverseFrequency · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalization.lean:17
theorem pilotInverseFrequency_sub_privateMass

Under the supplied quantities and conditions, the pilot inverse frequency sub private mass assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Inverse Frequency sub private Mass.

Formal statement
p ε x :
ℝ
hε :
0 < ε
k :
Fin 4
= (exp ε + 3) / (exp ε - 1) * (x - ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k)
Proof (Lean source)
lemma pilotInverseFrequency_sub_privateMass (θ : TrialParameter) (p ε x : ℝ) (hε : 0 < ε) (k : Fin 4) : pilotInverseFrequency ε x - piTheta θ p k = (exp ε + 3) / (exp ε - 1) * (x - ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k) := by have he : exp ε - 1 ≠ 0 := by have : 1 < exp ε := by simpa using (Real.exp_lt_exp.mpr hε : exp 0 < exp ε) linarith rw [pilotInverseFrequency, rrPilot_marginal_probability] field_simp [he, ne_of_gt (by positivity : 0 < exp ε + 3)] ring
CausalSmith.Stat.LdpAteEfficiencySurface.pilotInverseFrequency_sub_privateMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalization.lean:21
theorem pilotInverseFrequency_error_abs

Under the supplied quantities and conditions, the pilot inverse frequency error abs assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Inverse Frequency error abs.

Formal statement
p ε x :
ℝ
hε :
0 < ε
k :
Fin 4
= (exp ε + 3) / (exp ε - 1) * |x
- ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k|
Proof (Lean source)
lemma pilotInverseFrequency_error_abs (θ : TrialParameter) (p ε x : ℝ) (hε : 0 < ε) (k : Fin 4) : |pilotInverseFrequency ε x - piTheta θ p k| = (exp ε + 3) / (exp ε - 1) * |x - ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k| := by rw [pilotInverseFrequency_sub_privateMass θ p ε x hε k, abs_mul] have hn : 0 ≤ (exp ε + 3) / (exp ε - 1) := by have : 1 < exp ε := by simpa using (Real.exp_lt_exp.mpr hε : exp 0 < exp ε) positivity rw [abs_of_nonneg hn]
CausalSmith.Stat.LdpAteEfficiencySurface.pilotInverseFrequency_error_abs · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalization.lean:37
theorem clipInterior_eq_of_abs_sub_lt

Clipping does not change a raw inverse which lies in its clipping interval. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the clip Interior eq of abs sub lt.

Formal statement
δ x θ r :
ℝ
hδleft :
δ + r ≤ θ
hδright :
δ + r ≤ 1 - θ
hx :
|x - θ| < r
clipInterior δ x = x
Proof (Lean source)
lemma clipInterior_eq_of_abs_sub_lt {δ x θ r : ℝ} (hδleft : δ + r ≤ θ) (hδright : δ + r ≤ 1 - θ) (hx : |x - θ| < r) : clipInterior δ x = x := by apply clipInterior_eq_self · linarith [(abs_lt.mp hx).1] · linarith [(abs_lt.mp hx).2]
CausalSmith.Stat.LdpAteEfficiencySurface.clipInterior_eq_of_abs_sub_lt · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalization.lean:52
theorem pilotTheta_localized_of_frequency

A sufficiently accurate pair of calibrated pilot frequencies puts the clipped pilot estimate in the fixed coordinatewise r-neighborhood of the truth. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Theta localized of frequency.

Formal statement
p ε r :
ℝ
m :
ℕ → ℕ
n :
ℕ
z :
Transcript (pilotOutputFamily n)
hθ :
hε :
0 < ε
hr :
0 < r
hδ0l :
(m n + 2 : ℝ)⁻¹ + r ≤ θ 0
hδ0r :
(m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 0
hδ1l :
(m n + 2 : ℝ)⁻¹ + r ≤ θ 1
hδ1r :
(m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 1
hfreq0 :
- ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j 1| < r * controlProb p * (exp ε - 1) / (exp ε + 3)
hfreq1 :
- ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j 3| < r * p * (exp ε - 1) / (exp ε + 3)
conclusion 1
|pilotTheta p ε m z 0 - θ 0| < r
conclusion 2
|pilotTheta p ε m z 1 - θ 1| < r
Proof (Lean source)
lemma pilotTheta_localized_of_frequency (θ : TrialParameter) (p ε r : ℝ) (m : ℕ → ℕ) {n : ℕ} (z : Transcript (pilotOutputFamily n)) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hr : 0 < r) (hδ0l : (m n + 2 : ℝ)⁻¹ + r ≤ θ 0) (hδ0r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 0) (hδ1l : (m n + 2 : ℝ)⁻¹ + r ≤ θ 1) (hδ1r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 1) (hfreq0 : |pilotFrequency m z 1 - ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j 1| < r * controlProb p * (exp ε - 1) / (exp ε + 3)) (hfreq1 : |pilotFrequency m z 3 - ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j 3| < r * p * (exp ε - 1) / (exp ε + 3)) : |pilotTheta p ε m z 0 - θ 0| < r ∧ |pilotTheta p ε m z 1 - θ 1| < r := by have hep : 1 < exp ε := by simpa using (Real.exp_lt_exp.mpr hε : exp 0 < exp ε) have hcp : 0 < controlProb p := by dsimp [controlProb] linarith [hp.2] have hraw0 : |pilotInverseFrequency ε (pilotFrequency m z 1) / controlProb p - θ 0| < r := by have hpi : piTheta θ p 1 = controlProb p * θ 0 := rfl have htheta : θ 0 = piTheta θ p 1 / controlProb p := by rw [hpi] field_simp rw [htheta, ← sub_div] have herr := pilotInverseFrequency_error_abs θ p ε (pilotFrequency m z 1) hε 1 rw [abs_div, abs_of_pos hcp, herr] apply (div_lt_iff₀ hcp).2 calc (exp ε + 3) / (exp ε - 1) * |pilotFrequency m z 1 - ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j 1| < (exp ε + 3) / (exp ε - 1) * (r * controlProb p * (exp ε - 1) / (exp ε + 3)) := by gcongr <;> positivity _ = r * controlProb p := by field_simp [ne_of_gt (sub_pos.mpr hep), ne_of_gt (by positivity : 0 < exp ε + 3)] have hraw1 : |pilotInverseFrequency ε (pilotFrequency m z 3) / p - θ 1| < r := by have hp0 : 0 < p := hp.1 have hpi : piTheta θ p 3 = p * θ 1 := rfl have htheta : θ 1 = piTheta θ p 3 / p := by rw [hpi] field_simp rw [htheta, ← sub_div] have herr := pilotInverseFrequency_error_abs θ p ε (pilotFrequency m z 3) hε 3 rw [abs_div, abs_of_pos hp0, herr] apply (div_lt_iff₀ hp0).2 calc (exp ε + 3) / (exp ε - 1) * |pilotFrequency m z 3 - ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j 3| < (exp ε + 3) / (exp ε - 1) * (r * p * (exp ε - 1) / (exp ε + 3)) := by gcongr <;> positivity _ = r * p := by field_simp [ne_of_gt (sub_pos.mpr hep), ne_of_gt (by positivity : 0 < exp ε + 3)] have hclip0 := clipInterior_eq_of_abs_sub_lt hδ0l hδ0r hraw0 have hclip1 := clipInterior_eq_of_abs_sub_lt hδ1l hδ1r hraw1 constructor · change |clipInterior (m n + 2 : ℝ)⁻¹ (pilotInverseFrequency ε (pilotFrequency m z 1) / controlProb p) - θ 0| < r rw [hclip0] exact hraw0 · change |clipInterior (m n + 2 : ℝ)⁻¹ (pilotInverseFrequency ε (pilotFrequency m z 3) / p) - θ 1| < r rw [hclip1] exact hraw1
CausalSmith.Stat.LdpAteEfficiencySurface.pilotTheta_localized_of_frequency · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalization.lean:63
theorem pilotFrequency_deviation_le

Uniform Chebyshev concentration of one released pilot-cell frequency. The bound is parameter free apart from the exact centering probability. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Frequency deviation le.

Formal statement
select :
shared
p ε a :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
hmpos :
0 < m n
ha :
0 < a
k :
Fin 4
(transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | a ≤ |pilotFrequency m z k - ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k|}
≤ ofReal (1 / ((m n : ℝ) * a ^ 2))
Proof (Lean source)
lemma pilotFrequency_deviation_le (θ : TrialParameter) (p ε a : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (hmpos : 0 < m n) (ha : 0 < a) (k : Fin 4) : (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | a ≤ |pilotFrequency m z k - ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k|} ≤ ofReal (1 / ((m n : ℝ) * a ^ 2)) := by let P := rrPilotMarginal θ p ε letI : IsProbabilityMeasure P := rrPilotMarginal_isProbability θ p ε hp hθ let g := pilotCellIndicator k have hg : MemLp g 2 P := by apply MemLp.of_bound (measurable_pilotCellIndicator k).aestronglyMeasurable 1 filter_upwards [] with x dsimp [g, pilotCellIndicator] split_ifs <;> norm_num have hcheb := iid_sum_chebyshev (N := m n) P g hg (mul_pos (Nat.cast_pos.mpr hmpos) ha) have hvar : Var[g; P] ≤ 1 := by have hg2 : Integrable (fun x => (g x) ^ 2) P := by apply Integrable.of_bound ((measurable_pilotCellIndicator k).pow_const 2).aestronglyMeasurable 1 filter_upwards [] with x dsimp [g, pilotCellIndicator] split_ifs <;> norm_num calc Var[g; P] ≤ ∫ x, (g x) ^ 2 ∂P := variance_le_expectation_sq hg.aestronglyMeasurable _ ≤ 1 := by have hpoint : ∀ x, (g x) ^ 2 ≤ (1 : ℝ) := by intro x dsimp [g, pilotCellIndicator] split_ifs <;> norm_num calc (∫ x, (g x) ^ 2 ∂P) ≤ ∫ _x, (1 : ℝ) ∂P := by apply integral_mono_ae hg2 (integrable_const 1) exact Filter.Eventually.of_forall hpoint _ = 1 := by simp have hlaw := pilotFrequency_map_eq_pi select θ p ε m hselect hp hθ hε hmn k have hfreq : Measurable (fun z : Transcript (pilotOutputFamily n) => pilotFrequency m z k) := measurable_pilotFrequency m k have hsum : Measurable (fun u : Fin (m n) → Fin 4 => ∑ i : Fin (m n), g (u i)) := by fun_prop let q := ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k have hmean : ∫ x, g x ∂P = q := integral_pilotCellIndicator θ p ε hp hθ k let B : Set ℝ := {x | a ≤ |x - q|} have hB : MeasurableSet B := by exact measurableSet_le measurable_const ((measurable_id.sub measurable_const).abs) change (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) ((fun z => pilotFrequency m z k) ⁻¹' B) ≤ _ rw [← Measure.map_apply hfreq hB, hlaw, Measure.map_apply (by fun_prop) hB] have hevent : {u : Fin (m n) → Fin 4 | a ≤ |pilotPrefixFrequency u k - q|} = {u | (m n : ℝ) * a ≤ |(∑ i : Fin (m n), g (u i)) - (m n : ℝ) * ∫ x, g x ∂P|} := by ext u simp only [Set.mem_setOf_eq, pilotPrefixFrequency] have hmne : (m n : ℝ) ≠ 0 := ne_of_gt (Nat.cast_pos.mpr hmpos) change a ≤ |(m n : ℝ)⁻¹ * ∑ j : Fin (m n), g (u j) - q| ↔ (m n : ℝ) * a ≤ |(∑ j : Fin (m n), g (u j)) - (m n : ℝ) * ∫ x, g x ∂P| rw [hmean, inv_eq_one_div] have hid : (m n : ℝ) * ((1 / (m n : ℝ) * ∑ j : Fin (m n), g (u j)) - q) = (∑ j : Fin (m n), g (u j)) - (m n : ℝ) * q := by field_simp [hmne] have habs : |(∑ j : Fin (m n), g (u j)) - (m n : ℝ) * q| = (m n : ℝ) * |(1 / (m n : ℝ) * ∑ j : Fin (m n), g (u j)) - q| := by rw [← hid, abs_mul, abs_of_pos (Nat.cast_pos.mpr hmpos)] constructor <;> intro h · rw [habs] exact (mul_le_mul_iff_of_pos_left (Nat.cast_pos.mpr hmpos)).2 h · rw [habs] at h exact (mul_le_mul_iff_of_pos_left (Nat.cast_pos.mpr hmpos)).1 h change (Measure.pi fun _ : Fin (m n) => rrPilotMarginal θ p ε) {u | a ≤ |pilotPrefixFrequency u k - q|} ≤ _ rw [hevent] calc _ ≤ ofReal ((m n : ℝ) * Var[g; P] / ((m n : ℝ) * a) ^ 2) := hcheb _ ≤ ofReal (1 / ((m n : ℝ) * a ^ 2)) := by apply ENNReal.ofReal_le_ofReal have hm0 : 0 < (m n : ℝ) := Nat.cast_pos.mpr hmpos calc (m n : ℝ) * Var[g; P] / ((m n : ℝ) * a) ^ 2 ≤ (m n : ℝ) * 1 / ((m n : ℝ) * a) ^ 2 := by gcongr _ = 1 / ((m n : ℝ) * a ^ 2) := by field_simp
CausalSmith.Stat.LdpAteEfficiencySurface.pilotFrequency_deviation_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalization.lean:139
theorem pilotTheta_deviation_le

The two-coordinate clipped pilot leaves an r-neighborhood of its true parameter with probability at most the sum of two parameter-uniform Chebyshev bounds. This form applies row by row to local parameter sequences. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Theta deviation le.

Formal statement
select :
shared
p ε r :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hr :
0 < r
n :
ℕ
hmn :
m n ≤ n
hmpos :
0 < m n
hδ0l :
(m n + 2 : ℝ)⁻¹ + r ≤ θ 0
hδ0r :
(m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 0
hδ1l :
(m n + 2 : ℝ)⁻¹ + r ≤ θ 1
hδ1r :
(m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 1
a0 :
r * controlProb p * (exp ε - 1) / (exp ε + 3)
a1 :
r * p * (exp ε - 1) / (exp ε + 3)
(transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | r ≤ |pilotTheta p ε m z 0 - θ 0| ∨ r ≤ |pilotTheta p ε m z 1 - θ 1|}
≤ ofReal (1 / ((m n : ℝ) * a0 ^ 2)) + ofReal (1 / ((m n : ℝ) * a1 ^ 2))
Proof (Lean source)
lemma pilotTheta_deviation_le (θ : TrialParameter) (p ε r : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hr : 0 < r) {n : ℕ} (hmn : m n ≤ n) (hmpos : 0 < m n) (hδ0l : (m n + 2 : ℝ)⁻¹ + r ≤ θ 0) (hδ0r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 0) (hδ1l : (m n + 2 : ℝ)⁻¹ + r ≤ θ 1) (hδ1r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 1) : let a0 := r * controlProb p * (exp ε - 1) / (exp ε + 3) let a1 := r * p * (exp ε - 1) / (exp ε + 3) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | r ≤ |pilotTheta p ε m z 0 - θ 0| ∨ r ≤ |pilotTheta p ε m z 1 - θ 1|} ≤ ofReal (1 / ((m n : ℝ) * a0 ^ 2)) + ofReal (1 / ((m n : ℝ) * a1 ^ 2)) := by dsimp only let q0 := ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j 1 let q1 := ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j 3 let a0 := r * controlProb p * (exp ε - 1) / (exp ε + 3) let a1 := r * p * (exp ε - 1) / (exp ε + 3) have ha0 : 0 < a0 := by dsimp [a0, controlProb] have hep : 1 < exp ε := by simpa using (Real.exp_lt_exp.mpr hε : exp 0 < exp ε) exact div_pos (mul_pos (mul_pos hr (by linarith [hp.2])) (by linarith)) (by positivity) have ha1 : 0 < a1 := by dsimp [a1] have hep : 1 < exp ε := by simpa using (Real.exp_lt_exp.mpr hε : exp 0 < exp ε) exact div_pos (mul_pos (mul_pos hr hp.1) (by linarith)) (by positivity) let A0 : Set (Transcript (pilotOutputFamily n)) := {z | a0 ≤ |pilotFrequency m z 1 - q0|} let A1 : Set (Transcript (pilotOutputFamily n)) := {z | a1 ≤ |pilotFrequency m z 3 - q1|} have hsub : {z | r ≤ |pilotTheta p ε m z 0 - θ 0| ∨ r ≤ |pilotTheta p ε m z 1 - θ 1|} ⊆ A0 ∪ A1 := by intro z hz by_contra hzunion have hz0 : |pilotFrequency m z 1 - q0| < a0 := by exact lt_of_not_ge (fun h => hzunion (Set.mem_union_left A1 h)) have hz1 : |pilotFrequency m z 3 - q1| < a1 := by exact lt_of_not_ge (fun h => hzunion (Set.mem_union_right A0 h)) have hloc := pilotTheta_localized_of_frequency θ p ε r m z hp hθ hε hr hδ0l hδ0r hδ1l hδ1r (by simpa [a0, q0] using hz0) (by simpa [a1, q1] using hz1) exact hz.elim (fun h => (not_le_of_gt hloc.1) h) (fun h => (not_le_of_gt hloc.2) h) let μ := transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n calc μ {z | r ≤ |pilotTheta p ε m z 0 - θ 0| ∨ r ≤ |pilotTheta p ε m z 1 - θ 1|} ≤ μ (A0 ∪ A1) := measure_mono hsub _ ≤ μ A0 + μ A1 := measure_union_le A0 A1 _ ≤ ofReal (1 / ((m n : ℝ) * a0 ^ 2)) + ofReal (1 / ((m n : ℝ) * a1 ^ 2)) := by apply add_le_add · simpa [μ, A0, a0, q0] using pilotFrequency_deviation_le select θ p ε a0 m hselect hp hθ hε hmn hmpos ha0 1 · simpa [μ, A1, a1, q1] using pilotFrequency_deviation_le select θ p ε a1 m hselect hp hθ hε hmn hmpos ha1 3
CausalSmith.Stat.LdpAteEfficiencySurface.pilotTheta_deviation_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotLocalization.lean:232
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotMoments 14 declarations Algebraic moment identities for the pilot score

Algebraic moment identities for the pilot score

theorem rrPilot_marginal_probability

The randomized-response pilot output has the affine categorical probability used by the inverse-frequency estimator. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
k :
Fin 4
∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k
= ((exp ε - 1) * piTheta θ p k + 1) / (exp ε + 3)
Proof (Lean source)
lemma rrPilot_marginal_probability (θ : TrialParameter) (p ε : ℝ) (k : Fin 4) : ∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k = ((exp ε - 1) * piTheta θ p k + 1) / (exp ε + 3) := by have hpi0 : piTheta θ p 0 = controlProb p * (1 - θ 0) := rfl have hpi1 : piTheta θ p 1 = controlProb p * θ 0 := rfl have hpi2 : piTheta θ p 2 = p * (1 - θ 1) := rfl have hpi3 : piTheta θ p 3 = p * θ 1 := rfl fin_cases k <;> simp +decide [rrPilotProbability, controlProb, Fin.sum_univ_succ, hpi0, hpi1, hpi2, hpi3] <;> field_simp [ne_of_gt (by positivity : 0 < exp ε + 3)] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilot_marginal_probability · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:13
theorem rrPilot_inverse_marginal_probability

Inverting the exact randomized-response pilot probability recovers the corresponding private-input cell probability. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the rr Pilot inverse marginal probability.

Formal statement
p ε :
ℝ
hε :
0 < ε
k :
Fin 4
((exp ε + 3) * (∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k) - 1) / (exp ε - 1)
= piTheta θ p k
Proof (Lean source)
-- keep: reusable finite-pilot construction, law, localization, or limit API for related adaptive procedures lemma rrPilot_inverse_marginal_probability (θ : TrialParameter) (p ε : ℝ) (hε : 0 < ε) (k : Fin 4) : ((exp ε + 3) * (∑ j : Fin 4, piTheta θ p j * rrPilotProbability ε j k) - 1) / (exp ε - 1) = piTheta θ p k := by rw [rrPilot_marginal_probability] have he : exp ε - 1 ≠ 0 := by have : 1 < exp ε := by simpa using (Real.exp_lt_exp.mpr hε : exp 0 < exp ε) linarith field_simp [he, ne_of_gt (by positivity : 0 < exp ε + 3)] ring
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilot_inverse_marginal_probability · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:28
theorem clipInterior_eq_self

Clipping is inactive once its margin is inside both distances to the boundary. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
δ x :
ℝ
hleft :
δ ≤ x
hright :
δ ≤ 1 - x
clipInterior δ x = x
Proof (Lean source)
lemma clipInterior_eq_self {δ x : ℝ} (hleft : δ ≤ x) (hright : δ ≤ 1 - x) : clipInterior δ x = x := by rw [clipInterior, min_eq_right (by linarith), max_eq_right hleft]
CausalSmith.Stat.LdpAteEfficiencySurface.clipInterior_eq_self · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:45
theorem matrix_mulVec_direction_eq_value_contrast

At a minimizing contrast direction, the information matrix sends that direction to its quadratic value times the contrast vector. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
hI :
I.IsHermitian
t :
ℝ
hmin :
I.mulVec (direction t) = fun k => informationQuadratic I (direction t) * contrastVector k
Proof (Lean source)
lemma matrix_mulVec_direction_eq_value_contrast (I : Matrix (Fin 2) (Fin 2) ℝ) (hI : I.IsHermitian) (t : ℝ) (hmin : ∀ u : ℝ, informationQuadratic I (direction t) ≤ informationQuadratic I (direction u)) : I.mulVec (direction t) = fun k => informationQuadratic I (direction t) * contrastVector k := by let A := I 0 0 + I 0 1 + I 1 0 + I 1 1 let B := 2 * (I 0 0 * t + I 0 1 * (t + 1) + I 1 0 * t + I 1 1 * (t + 1)) have hs := congrFun₂ hI 0 1 have hpoly (x : ℝ) : 0 ≤ x * B + x ^ 2 * A := by have h := hmin (t + x) have hid : informationQuadratic I (direction (t + x)) = informationQuadratic I (direction t) + x * B + x ^ 2 * A := by dsimp [A, B] simp [informationQuadratic, direction, Fin.sum_univ_succ, star_trivial] at hs ⊢ rw [hs] ring rw [hid] at h linarith have hB : B = 0 := by by_contra hB0 have hden : 0 < |A| + 1 := by positivity have hAle : A ≤ |A| := le_abs_self A have h := hpoly (-B / (2 * (|A| + 1))) have hsq : 0 < B ^ 2 := sq_pos_of_ne_zero hB0 field_simp at h nlinarith [mul_nonneg hsq.le (sub_nonneg.mpr hAle)] have hsum : (I 0 0 * t + I 0 1 * (t + 1)) + (I 1 0 * t + I 1 1 * (t + 1)) = 0 := by dsimp [B] at hB linarith have hj : informationQuadratic I (direction t) = I 1 0 * t + I 1 1 * (t + 1) := by simp [informationQuadratic, direction, Fin.sum_univ_succ] linear_combination t * hsum funext k fin_cases k <;> simp [mulVec, direction, contrastVector, Fin.sum_univ_succ] at hs ⊢ <;> rw [hj] <;> linarith
CausalSmith.Stat.LdpAteEfficiencySurface.matrix_mulVec_direction_eq_value_contrast · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:52
theorem saddle_information_normalEquation

The saddle direction satisfies the exact score normal equation. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
t J :
ℝ
hmin :
∀ u, informationObjective θ p ε α t ≤ informationObjective θ p ε α u
hJ :
J = informationObjective θ p ε α t
(informationMatrix θ p ε α).mulVec (direction t) = fun k => J * contrastVector k
Proof (Lean source)
lemma saddle_information_normalEquation (θ : TrialParameter) (p ε : ℝ) (α : StaircaseWeight) (t J : ℝ) (hmin : ∀ u, informationObjective θ p ε α t ≤ informationObjective θ p ε α u) (hJ : J = informationObjective θ p ε α t) : (informationMatrix θ p ε α).mulVec (direction t) = fun k => J * contrastVector k := by have hquad (u : ℝ) : informationQuadratic (informationMatrix θ p ε α) (direction u) = informationObjective θ p ε α u := by rw [informationObjective_eq_informationQuadratic] simp [informationQuadratic, dotProduct, mulVec, star_trivial] have hmin' : ∀ u : ℝ, informationQuadratic (informationMatrix θ p ε α) (direction t) ≤ informationQuadratic (informationMatrix θ p ε α) (direction u) := by intro u rw [hquad, hquad] exact hmin u have hHermitian : (informationMatrix θ p ε α).IsHermitian := by ext i j simp only [Matrix.conjTranspose_apply, star_trivial] unfold informationMatrix apply Finset.sum_congr rfl intro s _ ring have hnormal := matrix_mulVec_direction_eq_value_contrast (informationMatrix θ p ε α) hHermitian t hmin' calc (informationMatrix θ p ε α).mulVec (direction t) = fun k => informationObjective θ p ε α t * contrastVector k := by rw [← hquad] exact hnormal _ = fun k => J * contrastVector k := by rw [hJ]
CausalSmith.Stat.LdpAteEfficiencySurface.saddle_information_normalEquation · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:98
theorem patternMass_affine_difference

Under the supplied quantities and conditions, the pattern mass affine difference assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
θ η :
p ε :
ℝ
s :
Fin 14
patternMass θ p ε s
= patternMass η p ε s + ∑ k : Fin 2, (θ k - η k) * patternGradient p ε s k
Proof (Lean source)
lemma patternMass_affine_difference (θ η : TrialParameter) (p ε : ℝ) (s : Fin 14) : patternMass θ p ε s = patternMass η p ε s + ∑ k : Fin 2, (θ k - η k) * patternGradient p ε s k := by have hpi (ξ : TrialParameter) (j : Fin 4) : piTheta ξ p j = if j.val = 0 then controlProb p * (1 - ξ 0) else if j.val = 1 then controlProb p * ξ 0 else if j.val = 2 then p * (1 - ξ 1) else p * ξ 1 := by fin_cases j <;> rfl cases h0 : patternContains s 0 <;> cases h1 : patternContains s 1 <;> cases h2 : patternContains s 2 <;> cases h3 : patternContains s 3 <;> simp [patternMass, hpi, patternRay, patternGradient, privacyIncrement, controlProb, Fin.sum_univ_two, Fin.sum_univ_four, h0, h1, h2, h3] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.patternMass_affine_difference · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:134
theorem patternGradient_eq_ray_sub

Under the supplied quantities and conditions, the pattern gradient eq ray sub assertion holds.

Formal statement
p ε :
ℝ
s :
Fin 14
conclusion 1
patternGradient p ε s 0 = controlProb p * (patternRay ε s 1 - patternRay ε s 0)
conclusion 2
patternGradient p ε s 1 = p * (patternRay ε s 3 - patternRay ε s 2)
Proof (Lean source)
lemma patternGradient_eq_ray_sub (p ε : ℝ) (s : Fin 14) : patternGradient p ε s 0 = controlProb p * (patternRay ε s 1 - patternRay ε s 0) ∧ patternGradient p ε s 1 = p * (patternRay ε s 3 - patternRay ε s 2) := by cases h0 : patternContains s 0 <;> cases h1 : patternContains s 1 <;> cases h2 : patternContains s 2 <;> cases h3 : patternContains s 3 <;> simp [patternGradient, patternRay, privacyIncrement, h0, h1, h2, h3] <;> ring <;> simp
CausalSmith.Stat.LdpAteEfficiencySurface.patternGradient_eq_ray_sub · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:152
theorem staircase_weightedGradient_sum_eq_zero

Under the supplied quantities and conditions, the staircase weighted gradient sum eq zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the staircase weighted Gradient sum eq zero.

Formal statement
p ε :
ℝ
hα :
k :
Fin 2
∑ s : Fin 14, α s * patternGradient p ε s k = 0
Proof (Lean source)
lemma staircase_weightedGradient_sum_eq_zero (p ε : ℝ) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (k : Fin 2) : ∑ s : Fin 14, α s * patternGradient p ε s k = 0 := by fin_cases k · calc (∑ s : Fin 14, α s * patternGradient p ε s 0) = ∑ s : Fin 14, α s * (controlProb p * (patternRay ε s 1 - patternRay ε s 0)) := by apply Finset.sum_congr rfl intro s _ rw [(patternGradient_eq_ray_sub p ε s).1] _ = controlProb p * ((∑ s : Fin 14, α s * patternRay ε s 1) - ∑ s : Fin 14, α s * patternRay ε s 0) := by rw [← Finset.sum_sub_distrib, Finset.mul_sum] apply Finset.sum_congr rfl intro s _ ring _ = controlProb p * (staircaseMatrix ε α 1 - staircaseMatrix ε α 0) := rfl _ = 0 := by rw [hα.2 1, hα.2 0]; ring · calc (∑ s : Fin 14, α s * patternGradient p ε s 1) = ∑ s : Fin 14, α s * (p * (patternRay ε s 3 - patternRay ε s 2)) := by apply Finset.sum_congr rfl intro s _ rw [(patternGradient_eq_ray_sub p ε s).2] _ = p * ((∑ s : Fin 14, α s * patternRay ε s 3) - ∑ s : Fin 14, α s * patternRay ε s 2) := by rw [← Finset.sum_sub_distrib, Finset.mul_sum] apply Finset.sum_congr rfl intro s _ ring _ = p * (staircaseMatrix ε α 3 - staircaseMatrix ε α 2) := rfl _ = 0 := by rw [hα.2 3, hα.2 2]; ring
CausalSmith.Stat.LdpAteEfficiencySurface.staircase_weightedGradient_sum_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:165
theorem staircase_weightedProjectedGradient_sum_eq_zero

Under the supplied quantities and conditions, the staircase weighted projected gradient sum eq zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the staircase weighted Projected Gradient sum eq zero.

Formal statement
p ε t :
ℝ
hα :
∑ s : Fin 14, α s * projectedGradient p ε s t = 0
Proof (Lean source)
lemma staircase_weightedProjectedGradient_sum_eq_zero (p ε t : ℝ) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : ∑ s : Fin 14, α s * projectedGradient p ε s t = 0 := by have h0 := staircase_weightedGradient_sum_eq_zero p ε α hα 0 have h1 := staircase_weightedGradient_sum_eq_zero p ε α hα 1 calc (∑ s : Fin 14, α s * projectedGradient p ε s t) = (∑ s : Fin 14, α s * patternGradient p ε s 0) * direction t 0 + (∑ s : Fin 14, α s * patternGradient p ε s 1) * direction t 1 := by unfold projectedGradient simp only [Fin.sum_univ_two] rw [Finset.sum_mul, Finset.sum_mul, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro s _ ring _ = 0 := by rw [h0, h1]; ring
CausalSmith.Stat.LdpAteEfficiencySurface.staircase_weightedProjectedGradient_sum_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:205
theorem informationMatrix_mulVec_direction_apply

Under the supplied quantities and conditions, the information matrix mul vec direction apply assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
t :
ℝ
k :
Fin 2
= ∑ s : Fin 14, α s * patternGradient p ε s k * projectedGradient p ε s t / patternMass θ p ε s
Proof (Lean source)
lemma informationMatrix_mulVec_direction_apply (θ : TrialParameter) (p ε : ℝ) (α : StaircaseWeight) (t : ℝ) (k : Fin 2) : (informationMatrix θ p ε α).mulVec (direction t) k = ∑ s : Fin 14, α s * patternGradient p ε s k * projectedGradient p ε s t / patternMass θ p ε s := by fin_cases k <;> simp [informationMatrix, mulVec, projectedGradient, Fin.sum_univ_two] <;> rw [Finset.sum_mul, Finset.sum_mul, ← Finset.sum_add_distrib] <;> apply Finset.sum_congr rfl <;> intro s _ <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.informationMatrix_mulVec_direction_apply · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:225
theorem affineCorrection_mean_identity

Exact one-step affine correction identity. If η selects a feasible saddle (α,t,J), then averaging its influence score under the true parameter θ corrects contrast η exactly to contrast θ. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the affine Correction mean identity.

Formal statement
θ η :
p ε :
ℝ
hη :
hε :
0 ≤ ε
t J :
ℝ
hα :
hJ :
J ≠ 0
hnormal :
(informationMatrix η p ε α).mulVec (direction t) = fun k => J * contrastVector k
∑ s : Fin 14, α s * patternMass θ p ε s * (projectedGradient p ε s t / (J * patternMass η p ε s))
= contrast θ - contrast η
Proof (Lean source)
lemma affineCorrection_mean_identity (θ η : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 ≤ ε) (α : StaircaseWeight) (t J : ℝ) (hα : staircaseFeasible ε α) (hJ : J ≠ 0) (hnormal : (informationMatrix η p ε α).mulVec (direction t) = fun k => J * contrastVector k) : ∑ s : Fin 14, α s * patternMass θ p ε s * (projectedGradient p ε s t / (J * patternMass η p ε s)) = contrast θ - contrast η := by have hm (s : Fin 14) : patternMass η p ε s ≠ 0 := ne_of_gt (patternMass_pos_interior η p ε hp hη hε s) have hexpand : (∑ s : Fin 14, α s * patternMass θ p ε s * (projectedGradient p ε s t / (J * patternMass η p ε s))) = J⁻¹ * ((∑ s : Fin 14, α s * projectedGradient p ε s t) + ∑ k : Fin 2, (θ k - η k) * (informationMatrix η p ε α).mulVec (direction t) k) := by simp only [Fin.sum_univ_two] rw [informationMatrix_mulVec_direction_apply η p ε α t 0, informationMatrix_mulVec_direction_apply η p ε α t 1] rw [Finset.mul_sum, Finset.mul_sum, ← Finset.sum_add_distrib, ← Finset.sum_add_distrib, Finset.mul_sum] apply Finset.sum_congr rfl intro s _ rw [patternMass_affine_difference θ η p ε s] simp only [Fin.sum_univ_two] field_simp [hJ, hm s] rw [hexpand, staircase_weightedProjectedGradient_sum_eq_zero p ε t α hα, zero_add, hnormal] simp only [Fin.sum_univ_two] simp [contrastVector, contrast] field_simp [hJ] ring
CausalSmith.Stat.LdpAteEfficiencySurface.affineCorrection_mean_identity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:238
theorem phiTilde_mean_identity

The selected affine correction has the exact mean shift under every interior parameter. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the phi Tilde mean identity.

Formal statement
θ η :
p ε :
ℝ
select :
hη :
hε :
0 < ε
hselect :
SaddleSelection p ε select
∑ s : Fin 14, (select η).1 s * patternMass θ p ε s * phiTilde η p ε select s
= contrast θ - contrast η
Proof (Lean source)
lemma phiTilde_mean_identity (θ η : TrialParameter) (p ε : ℝ) (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 < ε) (hselect : SaddleSelection p ε select) : ∑ s : Fin 14, (select η).1 s * patternMass θ p ε s * phiTilde η p ε select s = contrast θ - contrast η := by have hs := hselect.2 η hη have hJpos : 0 < (select η).2.2 := by rw [← hs.2.2.1] exact Jstar_pos_interior η p ε hp hη hε have hnormal := saddle_information_normalEquation η p ε (select η).1 (select η).2.1 (select η).2.2 hs.2.1 hs.2.2.2 simpa [phiTilde] using affineCorrection_mean_identity θ η p ε hp hη hε.le (select η).1 (select η).2.1 (select η).2.2 hs.1 hJpos.ne' hnormal
CausalSmith.Stat.LdpAteEfficiencySurface.phiTilde_mean_identity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:276
theorem affineCorrection_secondMoment_identity

At its construction parameter, a saddle affine correction has second moment equal to reciprocal saddle information. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the affine Correction second Moment identity.

Formal statement
p ε :
ℝ
hη :
hε :
0 ≤ ε
t J :
ℝ
hJ :
J ≠ 0
hvalue :
J = informationObjective η p ε α t
∑ s : Fin 14, α s * patternMass η p ε s * (projectedGradient p ε s t / (J * patternMass η p ε s)) ^ 2
= J⁻¹
Proof (Lean source)
lemma affineCorrection_secondMoment_identity (η : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 ≤ ε) (α : StaircaseWeight) (t J : ℝ) (hJ : J ≠ 0) (hvalue : J = informationObjective η p ε α t) : ∑ s : Fin 14, α s * patternMass η p ε s * (projectedGradient p ε s t / (J * patternMass η p ε s)) ^ 2 = J⁻¹ := by have hm (s : Fin 14) : patternMass η p ε s ≠ 0 := ne_of_gt (patternMass_pos_interior η p ε hp hη hε s) calc (∑ s : Fin 14, α s * patternMass η p ε s * (projectedGradient p ε s t / (J * patternMass η p ε s)) ^ 2) = (J ^ 2)⁻¹ * informationObjective η p ε α t := by unfold informationObjective patternInformation rw [Finset.mul_sum] apply Finset.sum_congr rfl intro s _ field_simp [hJ, hm s] _ = J⁻¹ := by rw [← hvalue]; field_simp [hJ]
CausalSmith.Stat.LdpAteEfficiencySurface.affineCorrection_secondMoment_identity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:295
theorem phiTilde_secondMoment_identity

The selected influence value has exact conditional second moment Vstar at the selection parameter. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the phi Tilde second Moment identity.

Formal statement
p ε :
ℝ
select :
hη :
hε :
0 < ε
hselect :
SaddleSelection p ε select
∑ s : Fin 14, (select η).1 s * patternMass η p ε s * (phiTilde η p ε select s) ^ 2
= Vstar η p ε
Proof (Lean source)
lemma phiTilde_secondMoment_identity (η : TrialParameter) (p ε : ℝ) (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hε : 0 < ε) (hselect : SaddleSelection p ε select) : ∑ s : Fin 14, (select η).1 s * patternMass η p ε s * (phiTilde η p ε select s) ^ 2 = Vstar η p ε := by have hs := hselect.2 η hη have hJpos : 0 < (select η).2.2 := by rw [← hs.2.2.1] exact Jstar_pos_interior η p ε hp hη hε have hmoment := affineCorrection_secondMoment_identity η p ε hp hη hε.le (select η).1 (select η).2.1 (select η).2.2 hJpos.ne' hs.2.2.2 simpa [phiTilde, Vstar, hs.2.2.1] using hmoment
CausalSmith.Stat.LdpAteEfficiencySurface.phiTilde_secondMoment_identity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotMoments.lean:318
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotPrefix 29 declarations Finite-prefix laws for the randomized-response pilot

Finite-prefix laws for the randomized-response pilot

theorem fin_prod_ite_lt

the fin prod ite lt assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the fin prod ite lt.

Formal statement
M :
Type*
n ℓ :
ℕ
hℓn :
ℓ ≤ n
f :
Fin ℓ → M
∏ i : Fin n, (if hi : i.val < ℓ then f ⟨i.val, hi⟩ else 1) = ∏ j : Fin ℓ, f j
Proof (Lean source)
lemma fin_prod_ite_lt {M : Type*} [CommMonoid M] {n ℓ : ℕ} (hℓn : ℓ ≤ n) (f : Fin ℓ → M) : ∏ i : Fin n, (if hi : i.val < ℓ then f ⟨i.val, hi⟩ else 1) = ∏ j : Fin ℓ, f j := by let g : Fin n → M := fun i => if hi : i.val < ℓ then f ⟨i.val, hi⟩ else 1 change (∏ i : Fin n, g i) = _ have hfilter : (∏ i : Fin n, g i) = ∏ i ∈ (Finset.univ.filter fun i : Fin n => i.val < ℓ), g i := by rw [Finset.prod_filter] apply Finset.prod_congr rfl intro i _ by_cases hi : i.val < ℓ <;> simp [g, hi] rw [hfilter] symm apply Finset.prod_bij (fun j _ => castLE hℓn j) · intro j _ simp · intro a _ b _ hab exact Fin.castLE_injective hℓn hab · intro i hi have hil : i.val < ℓ := (Finset.mem_filter.mp hi).2 exact ⟨⟨i.val, hil⟩, Finset.mem_univ _, Fin.ext rfl⟩ · intro j _ simp [g]
CausalSmith.Stat.LdpAteEfficiencySurface.fin_prod_ite_lt · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:19
theorem fin_sum_ite_lt

the fin sum ite lt assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the fin sum ite lt.

Formal statement
M :
n ℓ :
ℕ
hℓn :
ℓ ≤ n
f :
Fin ℓ → M
∑ i : Fin n, (if hi : i.val < ℓ then f ⟨i.val, hi⟩ else 0) = ∑ j : Fin ℓ, f j
Proof (Lean source)
lemma fin_sum_ite_lt {M : Type*} [AddCommMonoid M] {n ℓ : ℕ} (hℓn : ℓ ≤ n) (f : Fin ℓ → M) : ∑ i : Fin n, (if hi : i.val < ℓ then f ⟨i.val, hi⟩ else 0) = ∑ j : Fin ℓ, f j := by let g : Fin n → M := fun i => if hi : i.val < ℓ then f ⟨i.val, hi⟩ else 0 change (∑ i : Fin n, g i) = _ have hfilter : (∑ i : Fin n, g i) = ∑ i ∈ (Finset.univ.filter fun i : Fin n => i.val < ℓ), g i := by rw [Finset.sum_filter] apply Finset.sum_congr rfl intro i _ by_cases hi : i.val < ℓ <;> simp [g, hi] rw [hfilter] symm apply Finset.sum_bij (fun j _ => castLE hℓn j) · intro j _ simp · intro a _ b _ hab exact Fin.castLE_injective hℓn hab · intro i hi have hil : i.val < ℓ := (Finset.mem_filter.mp hi).2 exact ⟨⟨i.val, hil⟩, Finset.mem_univ _, Fin.ext rfl⟩ · intro j _ simp [g]
CausalSmith.Stat.LdpAteEfficiencySurface.fin_sum_ite_lt · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:48
theorem rrPilotKernel_singleton

Under the supplied quantities and conditions, the rr pilot kernel singleton assertion holds.

Formal statement
ε :
ℝ
j k :
Fin 4
Proof (Lean source)
lemma rrPilotKernel_singleton (ε : ℝ) (j k : Fin 4) : rrPilotKernel ε j {k} = ofReal (rrPilotProbability ε j k) := by change (Measure.count.withDensity (fun l : Fin 4 => ofReal (rrPilotProbability ε j l))) {k} = _ rw [withDensity_apply _ (measurableSet_singleton k)] simp
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilotKernel_singleton · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:77
theorem piTheta_sum_eq_one

Under the supplied quantities and conditions, the pi theta sum eq one assertion holds.

Formal statement
p :
ℝ
∑ j : Fin 4, piTheta θ p j = 1
Proof (Lean source)
lemma piTheta_sum_eq_one (θ : TrialParameter) (p : ℝ) : ∑ j : Fin 4, piTheta θ p j = 1 := by have hpi0 : piTheta θ p 0 = controlProb p * (1 - θ 0) := rfl have hpi1 : piTheta θ p 1 = controlProb p * θ 0 := rfl have hpi2 : piTheta θ p 2 = p * (1 - θ 1) := rfl have hpi3 : piTheta θ p 3 = p * θ 1 := rfl simp [Fin.sum_univ_four, hpi0, hpi1, hpi2, hpi3, controlProb] ring
CausalSmith.Stat.LdpAteEfficiencySurface.piTheta_sum_eq_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:85
theorem inputPathProbability_sum_eq_one

Under the supplied quantities and conditions, the input path probability sum eq one assertion holds.

Formal statement
p :
ℝ
n :
ℕ
∑ x : Fin n → Fin 4, inputPathProbability θ p x = 1
Proof (Lean source)
lemma inputPathProbability_sum_eq_one (θ : TrialParameter) (p : ℝ) (n : ℕ) : ∑ x : Fin n → Fin 4, inputPathProbability θ p x = 1 := by change (∑ x : Fin n → Fin 4, ∏ i : Fin n, piTheta θ p (x i)) = 1 calc (∑ x : Fin n → Fin 4, ∏ i : Fin n, piTheta θ p (x i)) = ∏ _i : Fin n, ∑ a : Fin 4, piTheta θ p a := (Fintype.prod_sum (fun _i : Fin n => fun a : Fin 4 => piTheta θ p a)).symm _ = 1 := by simp [piTheta_sum_eq_one]
CausalSmith.Stat.LdpAteEfficiencySurface.inputPathProbability_sum_eq_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:95
theorem transcriptLaw_isProbability

the transcript law is probability assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Law is Probability.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n :
ℕ
IsProbabilityMeasure (transcriptLaw P θ p n)
Proof (Lean source)
lemma transcriptLaw_isProbability {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n : ℕ) : IsProbabilityMeasure (transcriptLaw P θ p n) := by rw [isProbabilityMeasure_iff] unfold transcriptLaw simp only [Measure.coe_finsetSum, Finset.sum_apply, Measure.smul_apply, smul_eq_mul] have hpath (x : Fin n → Fin 4) : 0 ≤ inputPathProbability θ p x := by unfold inputPathProbability exact Finset.prod_nonneg fun i _ => (piTheta_pos_interior θ p hp hθ (x i)).le rw [show (∑ x : Fin n → Fin 4, ofReal (inputPathProbability θ p x) * P.transcript n x univ) = ∑ x : Fin n → Fin 4, ofReal (inputPathProbability θ p x) by apply Finset.sum_congr rfl intro x _ rw [(P.factorizes n x).1.measure_univ, mul_one]] rw [← ENNReal.ofReal_sum_of_nonneg] · rw [inputPathProbability_sum_eq_one] simp · intro x _ exact hpath x
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw_isProbability · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:105
theorem inputPath_prefix_rr_sum

Marginalizing independent private inputs turns the deterministic-path pilot prefix product into the product of calibrated RR marginals. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the input Path prefix rr sum.

Formal statement
p ε :
ℝ
n ℓ :
ℕ
hℓn :
ℓ ≤ n
u :
Fin ℓ → Fin 4
∑ x : Fin n → Fin 4, inputPathProbability θ p x * (∏ j : Fin ℓ, rrPilotProbability ε (x (castLE hℓn j)) (u j))
= ∏ j : Fin ℓ, (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j))
Proof (Lean source)
lemma inputPath_prefix_rr_sum (θ : TrialParameter) (p ε : ℝ) {n ℓ : ℕ} (hℓn : ℓ ≤ n) (u : Fin ℓ → Fin 4) : ∑ x : Fin n → Fin 4, inputPathProbability θ p x * (∏ j : Fin ℓ, rrPilotProbability ε (x (castLE hℓn j)) (u j)) = ∏ j : Fin ℓ, (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j)) := by let F : (i : Fin n) → Fin 4 → ℝ := fun i a => piTheta θ p a * if hi : i.val < ℓ then rrPilotProbability ε a (u ⟨i.val, hi⟩) else 1 calc (∑ x : Fin n → Fin 4, inputPathProbability θ p x * (∏ j : Fin ℓ, rrPilotProbability ε (x (castLE hℓn j)) (u j))) = ∑ x : Fin n → Fin 4, ∏ i : Fin n, F i (x i) := by apply Finset.sum_congr rfl intro x _ rw [show inputPathProbability θ p x = ∏ i : Fin n, piTheta θ p (x i) by rfl] rw [← fin_prod_ite_lt hℓn (fun j => rrPilotProbability ε (x (castLE hℓn j)) (u j))] rw [← Finset.prod_mul_distrib] apply Finset.prod_congr rfl intro i _ simp only [F] split_ifs with hi <;> rfl _ = ∏ i : Fin n, ∑ a : Fin 4, F i a := (Fintype.prod_sum F).symm _ = ∏ i : Fin n, (if hi : i.val < ℓ then ∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u ⟨i.val, hi⟩) else 1) := by apply Finset.prod_congr rfl intro i _ simp only [F] split_ifs with hi · rfl · simp [piTheta_sum_eq_one] _ = _ := fin_prod_ite_lt hℓn (fun j => ∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j))
CausalSmith.Stat.LdpAteEfficiencySurface.inputPath_prefix_rr_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:135
theorem rrPilot_marginal_sum_eq_one

Under the supplied quantities and conditions, the rr pilot marginal sum eq one assertion holds.

Formal statement
p ε :
ℝ
∑ k : Fin 4, (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a k) = 1
Proof (Lean source)
lemma rrPilot_marginal_sum_eq_one (θ : TrialParameter) (p ε : ℝ) : ∑ k : Fin 4, (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a k) = 1 := by simp_rw [rrPilot_marginal_probability] rw [← Finset.sum_div, Finset.sum_add_distrib, ← Finset.mul_sum, piTheta_sum_eq_one] simp only [Finset.sum_const, Finset.card_univ, Fintype.card_fin, Nat.cast_ofNat] field_simp [ne_of_gt (by positivity : 0 < exp ε + 3)] ring
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilot_marginal_sum_eq_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:177
def rrPilotMarginal

The one-coordinate randomized-response marginal after integrating out the private four-cell input. For the displayed inputs and conditions, the stated result follows. The rr Pilot Marginal is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
rrPilotMarginal θ p ε :
Measure.count.withDensity fun k
=> ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a k)
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilotMarginal · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:189
theorem rrPilotMarginal_singleton

Under the supplied quantities and conditions, the rr pilot marginal singleton assertion holds.

Formal statement
p ε :
ℝ
k :
Fin 4
rrPilotMarginal θ p ε {k}
= ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a k)
Proof (Lean source)
lemma rrPilotMarginal_singleton (θ : TrialParameter) (p ε : ℝ) (k : Fin 4) : rrPilotMarginal θ p ε {k} = ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a k) := by rw [rrPilotMarginal, withDensity_apply _ (measurableSet_singleton k)] simp
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilotMarginal_singleton · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:194
theorem rrPilotMarginal_isProbability

Under the supplied quantities and conditions, the rr pilot marginal is probability assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the rr Pilot Marginal is Probability.

Formal statement
p ε :
ℝ
hθ :
Proof (Lean source)
lemma rrPilotMarginal_isProbability (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : IsProbabilityMeasure (rrPilotMarginal θ p ε) := by rw [isProbabilityMeasure_iff, rrPilotMarginal, withDensity_apply _ MeasurableSet.univ, setLIntegral_univ, lintegral_count, tsum_fintype, ← ENNReal.ofReal_sum_of_nonneg] · rw [rrPilot_marginal_sum_eq_one] simp · intro k _ exact Finset.sum_nonneg fun a _ => mul_nonneg (piTheta_pos_interior θ p hp hθ a).le (by unfold rrPilotProbability split_ifs <;> positivity)
CausalSmith.Stat.LdpAteEfficiencySurface.rrPilotMarginal_isProbability · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:201
theorem pilotPrefix_component_singleton

For a deterministic private-input path, every initial segment lying wholly inside the pilot has the product randomized-response atom probability. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Prefix component singleton.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n ℓ :
ℕ
hℓn :
ℓ ≤ n
hℓm :
ℓ ≤ m n
x :
Fin n → Fin 4
u :
Fin ℓ → Fin 4
prefixLaw (finiteSequenceKernel (pilotProtocol p ε m (select) n)) x ℓ hℓn {fun j => (inl (u j) : PilotOutput)}
= ∏ j : Fin ℓ, ofReal (rrPilotProbability ε (x (castLE hℓn j)) (u j))
Proof (Lean source)
lemma pilotPrefix_component_singleton (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) {n ℓ : ℕ} (hℓn : ℓ ≤ n) (hℓm : ℓ ≤ m n) (x : Fin n → Fin 4) (u : Fin ℓ → Fin 4) : prefixLaw (finiteSequenceKernel (pilotProtocol p ε m (select) n)) x ℓ hℓn {fun j => (Sum.inl (u j) : PilotOutput)} = ∏ j : Fin ℓ, ofReal (rrPilotProbability ε (x (castLE hℓn j)) (u j)) := by induction ℓ with | zero => have he : ({fun j : Fin 0 => (Sum.inl (u j) : PilotOutput)} : Set (History (pilotOutputFamily n) 0 hℓn)) = univ := by ext v have hv : v = fun j : Fin 0 => (Sum.inl (u j) : PilotOutput) := by funext j exact j.elim0 constructor <;> intro · exact Set.mem_univ _ · exact Set.mem_singleton_iff.mpr hv rw [he] have hQ : ∀ i, IsMarkovKernel (finiteSequenceKernel (pilotProtocol p ε m (select) n) i) := by intro i letI : IsMarkovKernel (pilotProtocol p ε m (select) n i) := (pilotProtocol_private p ε m select hselect hp hε n).1 i dsimp [finiteSequenceKernel] infer_instance haveI := isProbabilityMeasure_prefixLaw (finiteSequenceKernel (pilotProtocol p ε m (select) n)) hQ x 0 hℓn simp | succ r ih => have hrn : r ≤ n := Nat.le_of_succ_le hℓn have hrm : r ≤ m n := le_trans (le_succ r) hℓm have hQ : ∀ i, IsMarkovKernel (finiteSequenceKernel (pilotProtocol p ε m (select) n) i) := by intro i letI : IsMarkovKernel (pilotProtocol p ε m (select) n i) := (pilotProtocol_private p ε m select hselect hp hε n).1 i dsimp [finiteSequenceKernel] infer_instance let up : Fin r → Fin 4 := fun j => u j.castSucc let uf : History (pilotOutputFamily n) (r + 1) hℓn := fun j => (Sum.inl (u j) : PilotOutput) let ufp : History (pilotOutputFamily n) r (Nat.le_of_succ_le hℓn) := Fin.init uf have hu : uf = snoc (Z := pilotOutputFamily n) hℓn ufp (Sum.inl (u (last r))) := by exact (Fin.snoc_init_self uf).symm change (prefixLaw _ x (r + 1) hℓn) {uf} = _ rw [hu, prefixLaw_succ_singleton _ hQ] change (prefixLaw _ x r (Nat.le_of_succ_le hℓn)) ({((fun j => (Sum.inl (up j) : PilotOutput)) : History (pilotOutputFamily n) r (Nat.le_of_succ_le hℓn))} : Set (History (pilotOutputFamily n) r (Nat.le_of_succ_le hℓn))) * _ = _ rw [ih (Nat.le_of_succ_le hℓn) hrm up] rw [Fin.prod_univ_castSucc] congr 1 have hidx : nextIndex hℓn = castLE hℓn (last r) := Fin.ext rfl cases hidx dsimp [finiteSequenceKernel, pilotProtocol] simp only [nextIndex, castLE, last, Nat.succ_eq_add_one] change (if r < m n then ((rrPilotKernel ε) (x ⟨r, by omega⟩)).map Sum.inl else _) {Sum.inl (u (last r))} = _ rw [if_pos (by exact_mod_cast (lt_of_lt_of_le (lt_succ_self r) hℓm))] rw [Measure.map_apply (by fun_prop) (measurableSet_singleton _)] have hpre : (Sum.inl : Fin 4 → PilotOutput) ⁻¹' ({Sum.inl (u (last r))} : Set PilotOutput) = ({u (last r)} : Set (Fin 4)) := by ext y; simp rw [hpre] convert rrPilotKernel_singleton ε (x ⟨r, by omega⟩) (u (last r)) rfl
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefix_component_singleton · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:218
theorem pilotPrefix_marginal_singleton

After marginalizing the IID private-input path, every all-pilot prefix atom has the product of the calibrated RR marginal probabilities. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Prefix marginal singleton.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
u :
Fin (m n) → Fin 4
Measure.map (transcriptPrefix (Z := pilotOutputFamily n) hmn) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {fun j => (inl (u j) : PilotOutput)}
= ∏ j : Fin (m n), ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j))
Proof (Lean source)
lemma pilotPrefix_marginal_singleton (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (u : Fin (m n) → Fin 4) : Measure.map (transcriptPrefix (Z := pilotOutputFamily n) hmn) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {fun j => (inl (u j) : PilotOutput)} = ∏ j : Fin (m n), ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j)) := by have hs : MeasurableSet ({fun j => (inl (u j) : PilotOutput)} : Set (History (pilotOutputFamily n) (m n) hmn)) := by change MeasurableSet ({fun j : Fin (m n) => (inl (u j) : PilotOutput)} : Set (Fin (m n) → PilotOutput)) have h := MeasurableSet.univ_pi (fun j => measurableSet_singleton (inl (u j) : PilotOutput)) exact (Set.univ_pi_singleton _).symm ▸ h rw [Measure.map_apply (measurable_transcriptPrefix hmn) hs] unfold transcriptLaw simp only [Measure.coe_finsetSum, Finset.sum_apply, Measure.smul_apply, smul_eq_mul] have hpath (x : Fin n → Fin 4) : 0 ≤ inputPathProbability θ p x := by unfold inputPathProbability exact Finset.prod_nonneg fun i _ => (piTheta_pos_interior θ p hp hθ (x i)).le have hrr (a k : Fin 4) : 0 ≤ rrPilotProbability ε a k := by unfold rrPilotProbability split_ifs <;> positivity calc (∑ x : Fin n → Fin 4, ofReal (inputPathProbability θ p x) * (pilotEstimator p ε m select hselect hp hε).transcript n x (transcriptPrefix hmn ⁻¹' {fun j => inl (u j)})) = ∑ x : Fin n → Fin 4, ofReal (inputPathProbability θ p x) * ∏ j : Fin (m n), ofReal (rrPilotProbability ε (x (castLE hmn j)) (u j)) := by apply Finset.sum_congr rfl intro x _ congr 1 rw [show (pilotEstimator p ε m select hselect hp hε).transcript n x = finiteSequenceTranscript (pilotProtocol p ε m (select) n) x by rfl] rw [← Measure.map_apply (measurable_transcriptPrefix hmn) hs, finiteSequenceTranscript_map_prefix _ (pilotProtocol_private p ε m select hselect hp hε n).1 x hmn] exact pilotPrefix_component_singleton select p ε m hselect hp hε hmn le_rfl x u _ = ofReal (∑ x : Fin n → Fin 4, inputPathProbability θ p x * ∏ j : Fin (m n), rrPilotProbability ε (x (castLE hmn j)) (u j)) := by rw [ENNReal.ofReal_sum_of_nonneg] · apply Finset.sum_congr rfl intro x _ rw [ENNReal.ofReal_mul (hpath x), ENNReal.ofReal_prod_of_nonneg] intro j _ exact hrr _ _ · intro x _ exact mul_nonneg (hpath x) (Finset.prod_nonneg fun j _ => hrr _ _) _ = ofReal (∏ j : Fin (m n), ∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j)) := by rw [inputPath_prefix_rr_sum θ p ε hmn u] _ = _ := by rw [ENNReal.ofReal_prod_of_nonneg] intro j _ exact Finset.sum_nonneg fun a _ => mul_nonneg (piTheta_pos_interior θ p hp hθ a).le (hrr _ _)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefix_marginal_singleton · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:304
def pilotPrefixEmbed

For the supplied quantities and conditions, the pilot prefix embed is the mathematical object specified below.

Definition (Lean source)
ℓ :
ℕ
u :
Fin ℓ → Fin 4
pilotPrefixEmbed u :
fun j => inl (u j)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixEmbed · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:377
theorem pilotPrefixEmbed_injective

the pilot prefix embed injective assertion holds.

Formal statement
ℓ :
ℕ
Proof (Lean source)
lemma pilotPrefixEmbed_injective {ℓ : ℕ} : Injective (@pilotPrefixEmbed ℓ) := by intro u v huv funext j exact Sum.inl_injective (congrFun huv j)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixEmbed_injective · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:382
theorem pilotPrefix_range_measure

The marginalized pilot prefix is concentrated on four-category releases; the masses of those atoms sum to one. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Prefix range measure.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
Measure.map (transcriptPrefix (Z := pilotOutputFamily n) hmn) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) (range (fun u : Fin (m n) → Fin 4 => ((fun j => inl (u j)) : History (pilotOutputFamily n) (m n) hmn)))
= 1
Proof (Lean source)
lemma pilotPrefix_range_measure (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) : Measure.map (transcriptPrefix (Z := pilotOutputFamily n) hmn) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) (range (fun u : Fin (m n) → Fin 4 => ((fun j => inl (u j)) : History (pilotOutputFamily n) (m n) hmn))) = 1 := by classical let μ := Measure.map (transcriptPrefix (Z := pilotOutputFamily n) hmn) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) let e : (Fin (m n) → Fin 4) → History (pilotOutputFamily n) (m n) hmn := fun u j => inl (u j) have he : Injective e := by intro u v huv funext j exact Sum.inl_injective (congrFun huv j) letI : MeasurableSingletonClass (History (pilotOutputFamily n) (m n) hmn) := by constructor intro v change MeasurableSet ({v} : Set (Fin (m n) → PilotOutput)) have hv := MeasurableSet.univ_pi (fun j => measurableSet_singleton (v j)) exact (Set.univ_pi_singleton v).symm ▸ hv have hrange : range e = (↑(Finset.univ.image e) : Set (History (pilotOutputFamily n) (m n) hmn)) := by ext z simp change μ (range e) = 1 rw [hrange, ← MeasureTheory.sum_measure_singleton] rw [Finset.sum_image] · rw [show (∑ u ∈ (Finset.univ : Finset (Fin (m n) → Fin 4)), μ {e u}) = ∑ u : Fin (m n) → Fin 4, ∏ j : Fin (m n), ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j)) by apply Finset.sum_congr rfl intro u _ change Measure.map (transcriptPrefix (Z := pilotOutputFamily n) hmn) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {((fun j => inl (u j)) : History (pilotOutputFamily n) (m n) hmn)} = _ exact pilotPrefix_marginal_singleton select θ p ε m hselect hp hθ hε hmn u] calc (∑ u : Fin (m n) → Fin 4, ∏ j : Fin (m n), ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j))) = ∏ j : Fin (m n), ∑ k : Fin 4, ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a k) := (Fintype.prod_sum (fun _j : Fin (m n) => fun k : Fin 4 => ofReal (∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a k))).symm _ = 1 := by apply Finset.prod_eq_one intro j _ rw [← ENNReal.ofReal_sum_of_nonneg] · rw [rrPilot_marginal_sum_eq_one] simp · intro k _ exact Finset.sum_nonneg fun a _ => mul_nonneg (piTheta_pos_interior θ p hp hθ a).le (by unfold rrPilotProbability split_ifs <;> positivity) · exact Set.injOn_of_injective he
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefix_range_measure · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:389
theorem pilotPrefix_law_eq_map_pi

The finite pilot prefix has exactly the IID product law of the calibrated four-category randomized-response marginal, embedded into pilot outputs. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Prefix law eq map pi.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
Measure.map (transcriptPrefix (Z := pilotOutputFamily n) hmn) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n)
= Measure.map (fun u : Fin (m n) → Fin 4 => ((fun j => inl (u j)) : History (pilotOutputFamily n) (m n) hmn)) (Measure.pi fun _ : Fin (m n) => rrPilotMarginal θ p ε)
Proof (Lean source)
lemma pilotPrefix_law_eq_map_pi (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) : Measure.map (transcriptPrefix (Z := pilotOutputFamily n) hmn) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) = Measure.map (fun u : Fin (m n) → Fin 4 => ((fun j => inl (u j)) : History (pilotOutputFamily n) (m n) hmn)) (Measure.pi fun _ : Fin (m n) => rrPilotMarginal θ p ε) := by classical let e : (Fin (m n) → Fin 4) → History (pilotOutputFamily n) (m n) hmn := fun u j => inl (u j) have he : Injective e := by intro u v huv funext j exact Sum.inl_injective (congrFun huv j) have hme : Measurable e := by fun_prop letI : IsProbabilityMeasure (rrPilotMarginal θ p ε) := rrPilotMarginal_isProbability θ p ε hp hθ letI : IsProbabilityMeasure (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) := transcriptLaw_isProbability _ θ p hp hθ n let μ := Measure.map (transcriptPrefix (Z := pilotOutputFamily n) hmn) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) letI : IsProbabilityMeasure μ := Measure.isProbabilityMeasure_map (measurable_transcriptPrefix hmn).aemeasurable letI : Countable (History (pilotOutputFamily n) (m n) hmn) := inferInstanceAs (Countable (Fin (m n) → PilotOutput)) letI : MeasurableSingletonClass (History (pilotOutputFamily n) (m n) hmn) := by constructor intro v change MeasurableSet ({v} : Set (Fin (m n) → PilotOutput)) have hv := MeasurableSet.univ_pi (fun j => measurableSet_singleton (v j)) exact (Set.univ_pi_singleton v).symm ▸ hv have hrangeMeas : MeasurableSet (range e) := by exact Set.Finite.measurableSet (Set.toFinite (range e)) have hrange : μ (range e) = 1 := by exact pilotPrefix_range_measure select θ p ε m hselect hp hθ hε hmn have hcompl : μ (range e)ᶜ = 0 := by rw [MeasureTheory.measure_compl hrangeMeas (by simp [hrange]), measure_univ, hrange] simp apply Measure.ext_of_singleton intro z by_cases hz : z ∈ range e · obtain ⟨u, rfl⟩ := hz change μ {e u} = (Measure.map e (Measure.pi fun _ : Fin (m n) => rrPilotMarginal θ p ε)) {e u} rw [Measure.map_apply hme (measurableSet_singleton _)] have hpre : e ⁻¹' ({e u} : Set (History (pilotOutputFamily n) (m n) hmn)) = {u} := by ext v simp [he.eq_iff] rw [hpre, Measure.pi_singleton] change Measure.map (transcriptPrefix (Z := pilotOutputFamily n) hmn) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {((fun j => inl (u j)) : History (pilotOutputFamily n) (m n) hmn)} = _ rw [pilotPrefix_marginal_singleton select θ p ε m hselect hp hθ hε hmn] apply Finset.prod_congr rfl intro j _ exact (rrPilotMarginal_singleton θ p ε (u j)).symm · change μ {z} = (Measure.map e (Measure.pi fun _ : Fin (m n) => rrPilotMarginal θ p ε)) {z} have hzsub : ({z} : Set (History (pilotOutputFamily n) (m n) hmn)) ⊆ (range e)ᶜ := by intro y hy have hyz : y = z := Set.mem_singleton_iff.mp hy subst y exact hz rw [MeasureTheory.measure_mono_null hzsub hcompl] rw [Measure.map_apply hme (measurableSet_singleton _)] have hpre : e ⁻¹' ({z} : Set (History (pilotOutputFamily n) (m n) hmn)) = ∅ := by ext u change (e u = z) ↔ False constructor · intro heu exact hz ⟨u, heu⟩ · intro hf exact hf.elim rw [hpre] simp
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefix_law_eq_map_pi · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:461
def pilotPrefixFrequency

For the supplied quantities and conditions, the pilot prefix frequency is the mathematical object specified below.

Definition (Lean source)
ℓ :
ℕ
u :
Fin ℓ → Fin 4
k :
Fin 4
pilotPrefixFrequency u k :
ℝ
(ℓ : ℝ)⁻¹ * ∑ j : Fin ℓ, if u j = k then (1 : ℝ) else 0
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixFrequency · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:552
def pilotPrefixOutputFrequency

For the supplied quantities and conditions, the pilot prefix output frequency is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
ℓ :
ℕ
v :
k :
Fin 4
pilotPrefixOutputFrequency v k :
ℝ
(ℓ : ℝ)⁻¹ * ∑ j : Fin ℓ, if v j = inl k then (1 : ℝ) else 0
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixOutputFrequency · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:556
theorem pilotFrequency_eq_prefixFrequency

Under the supplied quantities and conditions, the pilot frequency eq prefix frequency assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
m :
ℕ → ℕ
n :
ℕ
hmn :
m n ≤ n
z :
Transcript (pilotOutputFamily n)
k :
Fin 4
Proof (Lean source)
lemma pilotFrequency_eq_prefixFrequency (m : ℕ → ℕ) {n : ℕ} (hmn : m n ≤ n) (z : Transcript (pilotOutputFamily n)) (k : Fin 4) : pilotFrequency m z k = pilotPrefixOutputFrequency (transcriptPrefix hmn z) k := by unfold pilotFrequency pilotPrefixOutputFrequency transcriptPrefix congr 1 calc (∑ i : Fin n, if i.val < m n ∧ z i = inl k then (1 : ℝ) else 0) = ∑ j : Fin (m n), if z (castLE hmn j) = inl k then (1 : ℝ) else 0 := by rw [← fin_sum_ite_lt hmn (fun j : Fin (m n) => if z (castLE hmn j) = inl k then (1 : ℝ) else 0)] apply Finset.sum_congr rfl intro i _ by_cases hi : i.val < m n <;> simp [hi] _ = _ := rfl
CausalSmith.Stat.LdpAteEfficiencySurface.pilotFrequency_eq_prefixFrequency · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:561
theorem measurable_pilotFrequency

Each empirical pilot-cell frequency is measurable.

Formal statement
m :
ℕ → ℕ
n :
ℕ
k :
Fin 4
Measurable (fun z : Transcript (pilotOutputFamily n) => pilotFrequency m z k)
Proof (Lean source)
@[fun_prop] lemma measurable_pilotFrequency (m : ℕ → ℕ) {n : ℕ} (k : Fin 4) : Measurable (fun z : Transcript (pilotOutputFamily n) => pilotFrequency m z k) := by unfold pilotFrequency apply Measurable.const_mul apply Finset.measurable_sum intro i _ have hi : MeasurableSet {z : Transcript (pilotOutputFamily n) | i.val < m n ∧ z i = inl k} := by by_cases hlt : i.val < m n · have heval : Measurable (fun z : Transcript (pilotOutputFamily n) => z i) := measurable_pi_apply i have heq : {z : Transcript (pilotOutputFamily n) | i.val < m n ∧ z i = inl k} = (fun z : Transcript (pilotOutputFamily n) => z i) ⁻¹' ({inl k} : Set PilotOutput) := by ext z simp [hlt] rw [heq] exact heval (measurableSet_singleton (inl k)) · simp [hlt] exact measurable_const.ite hi measurable_const
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_pilotFrequency · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:580
theorem pilotPrefixFrequency_embed

Under the supplied quantities and conditions, the pilot prefix frequency embed assertion holds.

Formal statement
ℓ :
ℕ
u :
Fin ℓ → Fin 4
k :
Fin 4
Proof (Lean source)
lemma pilotPrefixFrequency_embed {ℓ : ℕ} (u : Fin ℓ → Fin 4) (k : Fin 4) : pilotPrefixOutputFrequency (fun j => (inl (u j) : PilotOutput)) k = pilotPrefixFrequency u k := by unfold pilotPrefixOutputFrequency pilotPrefixFrequency simp
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixFrequency_embed · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:603
theorem pilotFrequency_map_eq_pi

Under the supplied quantities and conditions, the pilot frequency map eq pi assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Frequency map eq pi.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
k :
Fin 4
Measure.map (fun z => pilotFrequency m z k) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n)
= Measure.map (fun u : Fin (m n) → Fin 4 => pilotPrefixFrequency u k) (Measure.pi fun _ : Fin (m n) => rrPilotMarginal θ p ε)
Proof (Lean source)
lemma pilotFrequency_map_eq_pi (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (k : Fin 4) : Measure.map (fun z => pilotFrequency m z k) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) = Measure.map (fun u : Fin (m n) → Fin 4 => pilotPrefixFrequency u k) (Measure.pi fun _ : Fin (m n) => rrPilotMarginal θ p ε) := by let prefixFreq : History (pilotOutputFamily n) (m n) hmn → ℝ := fun v => pilotPrefixOutputFrequency v k have hprefixFreq : Measurable prefixFreq := by unfold prefixFreq pilotPrefixOutputFrequency apply Measurable.const_mul apply Finset.measurable_sum intro j _ have hj : Measurable (fun v : History (pilotOutputFamily n) (m n) hmn => v j) := measurable_pi_apply j have hs : MeasurableSet {v : History (pilotOutputFamily n) (m n) hmn | v j = inl k} := hj (measurableSet_singleton (inl k)) exact measurable_const.ite hs measurable_const have hcomp : (fun z : Transcript (pilotOutputFamily n) => pilotFrequency m z k) = prefixFreq ∘ transcriptPrefix hmn := by funext z exact pilotFrequency_eq_prefixFrequency m hmn z k rw [hcomp, ← Measure.map_map hprefixFreq (measurable_transcriptPrefix hmn), pilotPrefix_law_eq_map_pi select θ p ε m hselect hp hθ hε hmn] let e : (Fin (m n) → Fin 4) → History (pilotOutputFamily n) (m n) hmn := fun u j => inl (u j) have hme : Measurable e := by fun_prop change Measure.map prefixFreq (Measure.map e (Measure.pi fun _ : Fin (m n) => rrPilotMarginal θ p ε)) = _ rw [Measure.map_map hprefixFreq hme] congr 1 funext u exact pilotPrefixFrequency_embed u k
CausalSmith.Stat.LdpAteEfficiencySurface.pilotFrequency_map_eq_pi · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:610
def pilotCellIndicator

For the supplied quantities and conditions, the pilot cell indicator is the mathematical object specified below.

Definition (Lean source)
k a :
Fin 4
pilotCellIndicator k a :
ℝ
if a = k then 1 else 0
CausalSmith.Stat.LdpAteEfficiencySurface.pilotCellIndicator · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:652
theorem measurable_pilotCellIndicator

Each pilot-cell indicator is measurable.

Formal statement
k :
Fin 4
Proof (Lean source)
@[fun_prop] lemma measurable_pilotCellIndicator (k : Fin 4) : Measurable (pilotCellIndicator k) := by unfold pilotCellIndicator exact measurable_const.ite (measurableSet_singleton k) measurable_const
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_pilotCellIndicator · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:656
theorem integrable_pilotCellIndicator

Under the supplied quantities and conditions, the integrable pilot cell indicator assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integrable pilot Cell Indicator.

Formal statement
p ε :
ℝ
hθ :
k :
Fin 4
Proof (Lean source)
lemma integrable_pilotCellIndicator (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (k : Fin 4) : Integrable (pilotCellIndicator k) (rrPilotMarginal θ p ε) := by letI : IsProbabilityMeasure (rrPilotMarginal θ p ε) := rrPilotMarginal_isProbability θ p ε hp hθ exact Integrable.of_bound (measurable_pilotCellIndicator k).aestronglyMeasurable 1 (ae_of_all _ fun a => by unfold pilotCellIndicator split_ifs <;> norm_num)
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_pilotCellIndicator · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:662
theorem integral_pilotCellIndicator

Under the supplied quantities and conditions, the integral pilot cell indicator assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integral pilot Cell Indicator.

Formal statement
p ε :
ℝ
hθ :
k :
Fin 4
∫ a, pilotCellIndicator k a ∂rrPilotMarginal θ p ε
= ∑ b : Fin 4, piTheta θ p b * rrPilotProbability ε b k
Proof (Lean source)
lemma integral_pilotCellIndicator (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (k : Fin 4) : ∫ a, pilotCellIndicator k a ∂rrPilotMarginal θ p ε = ∑ b : Fin 4, piTheta θ p b * rrPilotProbability ε b k := by letI : IsProbabilityMeasure (rrPilotMarginal θ p ε) := rrPilotMarginal_isProbability θ p ε hp hθ rw [show pilotCellIndicator k = ({k} : Set (Fin 4)).indicator (fun _ => (1 : ℝ)) by funext a by_cases ha : a = k <;> simp [pilotCellIndicator, ha]] rw [integral_indicator (measurableSet_singleton k), integral_const] rw [MeasureTheory.measureReal_def, Measure.restrict_apply_univ, rrPilotMarginal_singleton] simp only [smul_eq_mul, mul_one] rw [ENNReal.toReal_ofReal] exact Finset.sum_nonneg fun b _ => mul_nonneg (piTheta_pos_interior θ p hp hθ b).le (by unfold rrPilotProbability split_ifs <;> positivity)
CausalSmith.Stat.LdpAteEfficiencySurface.integral_pilotCellIndicator · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:675
theorem pilotPrefixFrequency_map_pi_eq_sampleMean

Under the supplied quantities and conditions, the pilot prefix frequency map pi eq sample mean assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Prefix Frequency map pi eq sample Mean.

Formal statement
p ε :
ℝ
hθ :
N :
ℕ
k :
Fin 4
P :
Measure.map (fun u : Fin N → Fin 4 => pilotPrefixFrequency u k) (Measure.pi fun _ : Fin N => P)
= Measure.map (fun ω : ℕ → Fin 4 => (N : ℝ)⁻¹ * ∑ i ∈ range N, pilotCellIndicator k (ω i)) (Measure.infinitePi fun _ : ℕ => P)
Proof (Lean source)
lemma pilotPrefixFrequency_map_pi_eq_sampleMean (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (N : ℕ) (k : Fin 4) : let P := rrPilotMarginal θ p ε Measure.map (fun u : Fin N → Fin 4 => pilotPrefixFrequency u k) (Measure.pi fun _ : Fin N => P) = Measure.map (fun ω : ℕ → Fin 4 => (N : ℝ)⁻¹ * ∑ i ∈ range N, pilotCellIndicator k (ω i)) (Measure.infinitePi fun _ : ℕ => P) := by dsimp let P := rrPilotMarginal θ p ε letI : IsProbabilityMeasure P := rrPilotMarginal_isProbability θ p ε hp hθ let S := iidSample_infinitePi P have hpush := iidSample_finN_pushforward S N rw [← hpush] have hmeanMeas : Measurable (fun u : Fin N → Fin 4 => pilotPrefixFrequency u k) := by unfold pilotPrefixFrequency apply Measurable.const_mul apply Finset.measurable_sum intro j _ have hj : Measurable (fun u : Fin N → Fin 4 => u j) := measurable_pi_apply j exact measurable_const.ite (hj (measurableSet_singleton k)) measurable_const rw [Measure.map_map hmeanMeas (iidSample_finN_measurable S N)] congr 1 funext ω change pilotPrefixFrequency (fun j : Fin N => ω j) k = _ unfold pilotPrefixFrequency pilotCellIndicator congr 1 exact Fin.sum_univ_eq_sum_range (fun i => if ω i = k then (1 : ℝ) else 0) N
CausalSmith.Stat.LdpAteEfficiencySurface.pilotPrefixFrequency_map_pi_eq_sampleMean · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:698
theorem pilotFrequency_tendstoInProbability

Each released pilot-cell frequency obeys the categorical weak law under the actual finite transcript experiment. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Frequency tendsto In Probability.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiverges :
hsublinear :
k :
Fin 4
TendstoInProbability (fun n => transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) (fun n z => pilotFrequency m z k) atTop (fun _ _ => ∑ b : Fin 4, piTheta θ p b * rrPilotProbability ε b k)
Proof (Lean source)
-- keep: reusable finite-pilot construction, law, localization, or limit API for related adaptive procedures lemma pilotFrequency_tendstoInProbability (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiverges : PilotDiverges m) (hsublinear : PilotSublinear m) (k : Fin 4) : TendstoInProbability (fun n => transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) (fun n z => pilotFrequency m z k) atTop (fun _ _ => ∑ b : Fin 4, piTheta θ p b * rrPilotProbability ε b k) := by let P := rrPilotMarginal θ p ε letI : IsProbabilityMeasure P := rrPilotMarginal_isProbability θ p ε hp hθ let S := iidSample_infinitePi P have hw := S.sampleMean_tendsto_inProb (measurable_pilotCellIndicator k) (integrable_pilotCellIndicator θ p ε hp hθ k) rw [integral_pilotCellIndicator θ p ε hp hθ k] at hw intro δ hδ have hwδ := hw δ hδ have hwcomp := hwδ.comp hdiverges have hwcomp' : Tendsto (fun n => (Measure.infinitePi fun _ : ℕ => P) {ω | δ ≤ edist (S.sampleMean (pilotCellIndicator k) (m n) ω) (∑ b : Fin 4, piTheta θ p b * rrPilotProbability ε b k)}) atTop (nhds 0) := by convert hwcomp using 1 <;> rfl have heq : (fun n => (Measure.infinitePi fun _ : ℕ => P) {ω | δ ≤ edist (S.sampleMean (pilotCellIndicator k) (m n) ω) (∑ b : Fin 4, piTheta θ p b * rrPilotProbability ε b k)}) =ᶠ[atTop] (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | δ ≤ edist (pilotFrequency m z k) (∑ b : Fin 4, piTheta θ p b * rrPilotProbability ε b k)}) := by change ∀ᶠ n in atTop, (Measure.infinitePi fun _ : ℕ => P) {ω | δ ≤ edist (S.sampleMean (pilotCellIndicator k) (m n) ω) (∑ b : Fin 4, piTheta θ p b * rrPilotProbability ε b k)} = (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | δ ≤ edist (pilotFrequency m z k) (∑ b : Fin 4, piTheta θ p b * rrPilotProbability ε b k)} apply (Filter.eventually_atTop (α := ℕ)).2 refine ⟨2, ?_⟩ intro n hn have hmn : m n ≤ n := (hsublinear.2 n hn).2.le let B : Set ℝ := {r | δ ≤ edist r (∑ b : Fin 4, piTheta θ p b * rrPilotProbability ε b k)} have hB : MeasurableSet B := by exact measurableSet_le measurable_const (measurable_id.edist measurable_const) have hfreq := measurable_pilotFrequency m (n := n) k have hsample := S.measurable_sampleMean (measurable_pilotCellIndicator k) (m n) have hlaw : Measure.map (fun z => pilotFrequency m z k) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) = Measure.map (S.sampleMean (pilotCellIndicator k) (m n)) (Measure.infinitePi fun _ : ℕ => P) := by calc Measure.map (fun z => pilotFrequency m z k) (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) = Measure.map (fun u : Fin (m n) → Fin 4 => pilotPrefixFrequency u k) (Measure.pi fun _ : Fin (m n) => P) := pilotFrequency_map_eq_pi select θ p ε m hselect hp hθ hε hmn k _ = Measure.map (S.sampleMean (pilotCellIndicator k) (m n)) (Measure.infinitePi fun _ : ℕ => P) := by have hbase := pilotPrefixFrequency_map_pi_eq_sampleMean θ p ε hp hθ (m n) k have hfun : S.sampleMean (pilotCellIndicator k) (m n) = fun ω : ℕ → Fin 4 => (m n : ℝ)⁻¹ * ∑ i ∈ range (m n), pilotCellIndicator k (ω i) := by funext ω rfl rw [hfun] simpa [P] using hbase change (Measure.infinitePi fun _ : ℕ => P) ((S.sampleMean (pilotCellIndicator k) (m n)) ⁻¹' B) = (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) ((fun z => pilotFrequency m z k) ⁻¹' B) rw [← Measure.map_apply hsample hB, ← hlaw, Measure.map_apply hfreq hB] exact Filter.Tendsto.congr' heq hwcomp'
CausalSmith.Stat.LdpAteEfficiencySurface.pilotFrequency_tendstoInProbability · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotPrefix.lean:731
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotRates 2 declarations The integer square-root pilot size diverges, remains asymptotically negligible, and lies strictly between zero and the full sample size once n ≥ 2.

Square-root pilot sample size

The integer square-root pilot size diverges, remains asymptotically negligible, and lies strictly between zero and the full sample size once n ≥ 2.

theorem natSqrt_pilotDiverges

The integer square-root pilot sample size tends to infinity. The stated result follows.

Formal statement
Proof (Lean source)
-- @node: natSqrt_pilotDiverges lemma natSqrt_pilotDiverges : PilotDiverges sqrt := by rw [PilotDiverges, tendsto_atTop_atTop] intro b refine ⟨b * b, ?_⟩ intro a ha exact Nat.le_sqrt.mpr ha
CausalSmith.Stat.LdpAteEfficiencySurface.natSqrt_pilotDiverges · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRates.lean:19
theorem natSqrt_pilotSublinear

The integer square-root pilot is sublinear and is a nonempty proper split for every sample size at least two. The stated result follows.

Formal statement
Proof (Lean source)
-- @node: natSqrt_pilotSublinear lemma natSqrt_pilotSublinear : PilotSublinear Nat.sqrt := by constructor · have hsqrt : Tendsto (fun n : ℕ => sqrt (n : ℝ)) atTop atTop := Real.tendsto_sqrt_atTop.comp tendsto_natCast_atTop_atTop apply squeeze_zero' (Eventually.of_forall fun n => div_nonneg (Nat.cast_nonneg _) (Nat.cast_nonneg _)) ?_ (tendsto_inv_atTop_zero.comp hsqrt) filter_upwards [eventually_gt_atTop 0] with n hn have hnreal : 0 < (n : ℝ) := by exact_mod_cast hn have hspos : 0 < sqrt (n : ℝ) := Real.sqrt_pos.mpr hnreal calc (Nat.sqrt n : ℝ) / n ≤ sqrt (n : ℝ) / n := div_le_div_of_nonneg_right Real.nat_sqrt_le_real_sqrt hnreal.le _ = (sqrt (n : ℝ))⁻¹ := by nth_rewrite 2 [← Real.mul_self_sqrt hnreal.le] field_simp · intro n hn constructor · exact Nat.le_sqrt.mpr (by omega) · exact Nat.sqrt_lt_self (by omega)
CausalSmith.Stat.LdpAteEfficiencySurface.natSqrt_pilotSublinear · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRates.lean:28
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotRowGaussianLimit 1 declarations This module instantiates the finite bounded iid triangular-row central limit theorem with the genuine adaptive main-release mass and centered score.

Gaussian limit for the conditional adaptive pilot row

This module instantiates the finite bounded iid triangular-row central limit theorem with the genuine adaptive main-release mass and centered score. It also transfers the generic row-length normalization to the paper's root-total-sample normalization.

theorem adaptivePilotRowScaledCDF_subsequence_tendsto_gaussian

Along every strict sample-size subsequence and every convergent sequence of interior pilot selectors, the actual centered conditional main-row CDF converges to the oracle Gaussian CDF under root-total-sample scaling. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
select :
shared
theta h :
p eps :
ℝ
m :
ℕ → ℕ
hselect :
htheta :
heps :
0 < eps
hsub :
x :
ℝ
phi :
ℕ → ℕ
hphi :
eta :
heta :
∀ k, InteriorMeans (eta k)
hetalim :
Tendsto eta atTop (nhds theta)
Tendsto (fun k => adaptivePilotRowScaledCDF select theta h (fun _ => eta k) p eps m hselect hp heps (phi k) x) atTop (nhds ((gaussianMeasure 0 (Vstar theta p eps)).real (Iic x)))
Proof (Lean source)
theorem adaptivePilotRowScaledCDF_subsequence_tendsto_gaussian (theta h : TrialParameter) (p eps : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p eps select) (hp : InteriorAssignment p) (htheta : InteriorMeans theta) (heps : 0 < eps) (hsub : PilotSublinear m) (x : ℝ) (phi : ℕ → ℕ) (hphi : StrictMono phi) (eta : ℕ → TrialParameter) (heta : ∀ k, InteriorMeans (eta k)) (hetalim : Tendsto eta atTop (nhds theta)) : Tendsto (fun k => adaptivePilotRowScaledCDF select theta h (fun _ => eta k) p eps m hselect hp heps (phi k) x) atTop (nhds ((gaussianMeasure 0 (Vstar theta p eps)).real (Iic x))) := by let M := pilotSubsequenceRowModel select theta h eta p eps m phi hselect hp htheta heta heps hsub hphi hetalim let a : ℕ → ℝ := fun k => sqrt (((phi k : ℕ) : ℝ) / (adaptiveMainSize m (phi k) : ℝ)) let t : ℕ → ℝ := fun k => x / a k have ha : Tendsto a atTop (nhds 1) := by exact (adaptive_row_main_sqrt_ratio_tendsto_one m hsub).comp hphi.tendsto_atTop have ht : Tendsto t atTop (nhds x) := by change Tendsto ((fun _ : ℕ => x) / a) atTop (nhds x) simpa using tendsto_const_nhds.div ha one_ne_zero have hMpoint (y : ℝ) : Tendsto (fun k => M.normalizedCDF k y) atTop (nhds (cdf (gaussianReal 0 M.v₀) y)) := M.normalizedCDF_tendsto_gaussian y have hMmono (k : ℕ) : Monotone (M.normalizedCDF k) := by intro y z hyz unfold RowModel.normalizedCDF RowModel.expect apply Finset.sum_le_sum intro v _ apply mul_le_mul_of_nonneg_left _ (M.mass_nonnegative k v) change (if M.normalizedSum k v ≤ y then 1 else 0) ≤ if M.normalizedSum k v ≤ z then 1 else 0 split_ifs with hy hz · exact le_rfl · exact (hz (hy.trans hyz)).elim · exact zero_le_one · exact le_rfl have hmoving : Tendsto (fun k => M.normalizedCDF k (t k)) atTop (nhds (cdf (gaussianReal 0 M.v₀) x)) := tendsto_moving_of_monotone_pointwise (fun k => M.normalizedCDF k) (cdf (gaussianReal 0 M.v₀)) t x hMmono (continuous_cdf_gaussianReal_zero M.variance_pos).continuousAt hMpoint ht have heq : ∀ᶠ k in atTop, adaptivePilotRowScaledCDF select theta h (fun _ => eta k) p eps m hselect hp heps (phi k) x = M.normalizedCDF k (t k) := by have hN : ∀ᶠ k in atTop, 0 < adaptiveMainSize m (phi k) := by exact (M.length_tendsto.eventually (eventually_ge_atTop 1)).mono (fun k hk => hk) filter_upwards [hN] with k hNk classical unfold adaptivePilotRowScaledCDF RowModel.normalizedCDF RowModel.expect apply Finset.sum_congr rfl intro v _ dsimp only [adaptivePilotRowProductMass, adaptivePilotRowMass, M, pilotSubsequenceRowModel, RowModel.mass, RowModel.normalizedSum, RowModel.scoreSum, t, a] have hNr : 0 < (adaptiveMainSize m (phi k) : ℝ) := by exact_mod_cast hNk have hphir : 0 < (phi k : ℝ) := by have hle : adaptiveMainSize m (phi k) ≤ phi k := by unfold adaptiveMainSize omega exact_mod_cast lt_of_lt_of_le hNk hle have hsN : 0 < sqrt (adaptiveMainSize m (phi k) : ℝ) := Real.sqrt_pos.2 hNr have hsa : 0 < sqrt ((phi k : ℝ) / (adaptiveMainSize m (phi k) : ℝ)) := Real.sqrt_pos.2 (div_pos hphir hNr) let S : ℝ := ∑ j, adaptivePilotRowScore select theta h (fun _ => eta k) p eps hselect hp heps (phi k) (v j) change (∏ j, adaptiveMainMass select (adaptiveTrueParam theta h (phi k)) (eta k) p eps (v j)) * (if sqrt (phi k : ℝ) * (adaptiveMainSize m (phi k) : ℝ)⁻¹ * S ≤ x then 1 else 0) = (∏ j, adaptiveMainMass select (adaptiveTrueParam theta h (phi k)) (eta k) p eps (v j)) * (if (sqrt (adaptiveMainSize m (phi k) : ℝ))⁻¹ * S ≤ x / sqrt ((phi k : ℝ) / (adaptiveMainSize m (phi k) : ℝ)) then 1 else 0) have hscale : sqrt (phi k : ℝ) * (adaptiveMainSize m (phi k) : ℝ)⁻¹ * S ≤ x ↔ (sqrt (adaptiveMainSize m (phi k) : ℝ))⁻¹ * S ≤ x / sqrt ((phi k : ℝ) / (adaptiveMainSize m (phi k) : ℝ)) := by rw [le_div_iff₀ hsa] rw [show sqrt (phi k : ℝ) * (adaptiveMainSize m (phi k) : ℝ)⁻¹ * S = (sqrt (adaptiveMainSize m (phi k) : ℝ))⁻¹ * S * sqrt ((phi k : ℝ) / (adaptiveMainSize m (phi k) : ℝ)) by rw [Real.sqrt_div (Nat.cast_nonneg (phi k))] field_simp rw [Real.sq_sqrt hNr.le] ring] by_cases hc : sqrt (phi k : ℝ) * (adaptiveMainSize m (phi k) : ℝ)⁻¹ * S ≤ x · rw [if_pos hc, if_pos (hscale.mp hc)] · rw [if_neg hc, if_neg (fun hz => hc (hscale.mpr hz))] have hfinal := hmoving.congr' (heq.mono fun _ hk => hk.symm) have htarget : cdf (gaussianReal 0 M.v₀) x = (gaussianMeasure 0 (Vstar theta p eps)).real (Iic x) := by change cdf (gaussianReal 0 (adaptivePilotLimitVariance select theta p eps hselect hp htheta heps)) x = _ rw [ProbabilityTheory.cdf_eq_real] unfold gaussianMeasure have hv : 0 ≤ Vstar theta p eps := (inv_pos.mpr (Jstar_pos_interior theta p eps hp htheta heps)).le have hvar : adaptivePilotLimitVariance select theta p eps hselect hp htheta heps = (Vstar theta p eps).toNNReal := by apply NNReal.eq change Vstar theta p eps = max (Vstar theta p eps) 0 exact (max_eq_left hv).symm rw [hvar] rw [htarget] at hfinal exact hfinal
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowScaledCDF_subsequence_tendsto_gaussian · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowGaussianLimit.lean:116
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotRowInputs 17 declarations This module packages the exact finite alphabet mass and centered score used by the adaptive main sample.

Finite triangular-row inputs for private-pilot attainment

This module packages the exact finite alphabet mass and centered score used by the adaptive main sample. It stays independent of the generic triangular-array substrate, so a later adapter can instantiate that substrate without rebuilding the paper-specific mass, centering, boundedness, variance, and finite-product algebra.

def adaptivePilotRowMass

The one-coordinate mass in the adaptive main row along a local alternative and a chosen sequence of pilot selectors. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Row Mass is determined by the displayed parameters.

Definition (Lean source)
select :
shared
η :
p ε :
ℝ
hselect :
hε :
0 < ε
n :
ℕ
s :
Fin 14
adaptivePilotRowMass select θ h η p ε hselect hp hε n s :
ℝ
adaptiveMainMass select (adaptiveTrueParam θ h n) (η n) p ε s
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:24
def adaptivePilotRowScore

The selected main-release score centered by its exact one-coordinate mean. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Row Score is determined by the displayed parameters.

Definition (Lean source)
select :
shared
η :
p ε :
ℝ
hselect :
hε :
0 < ε
n :
ℕ
s :
Fin 14
adaptivePilotRowScore select θ h η p ε hselect hp hε n s :
ℝ
adaptiveSelectedScore select (η n) p ε s
- (contrast (adaptiveTrueParam θ h n) - contrast (η n))
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:30
def adaptivePilotLimitVariance

The limiting row variance as a nonnegative real. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Limit Variance is determined by the displayed parameters.

Definition (Lean source)
select :
shared
p ε :
ℝ
hselect :
hθ :
hε :
0 < ε
adaptivePilotLimitVariance select θ p ε hselect hp hθ hε :
⟨Vstar θ p ε, (inv_pos.mpr (Jstar_pos_interior θ p ε hp hθ hε)).le⟩
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotLimitVariance · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:37
theorem adaptivePilotRowMass_nonneg

The adaptive main row has nonnegative one-coordinate masses. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row Mass nonneg.

Formal statement
select :
shared
η :
p ε :
ℝ
hselect :
hθ :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
n :
ℕ
s :
Fin 14
0 ≤ adaptivePilotRowMass select θ h η p ε hselect hp hε n s
Proof (Lean source)
lemma adaptivePilotRowMass_nonneg (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (n : ℕ) (s : Fin 14) : 0 ≤ adaptivePilotRowMass select θ h η p ε hselect hp hε n s := by exact adaptiveMainMass_nonneg select _ _ p ε hselect hp (adaptiveTrueParam_interior θ h n hθ) (hη n) hε s
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowMass_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:44
theorem adaptivePilotRowMass_sum

The adaptive main row masses sum to one. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row Mass sum.

Formal statement
select :
shared
η :
p ε :
ℝ
hselect :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
n :
ℕ
∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s = 1
Proof (Lean source)
lemma adaptivePilotRowMass_sum (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (n : ℕ) : ∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s = 1 := by exact adaptiveMainMass_sum select _ _ p ε hselect hp (hη n) hε
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowMass_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:55
theorem adaptivePilotRowScore_centered

The adaptive main-row score is exactly centered under its row mass. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row Score centered.

Formal statement
select :
shared
η :
p ε :
ℝ
hselect :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
n :
ℕ
∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s * adaptivePilotRowScore select θ h η p ε hselect hp hε n s
= 0
Proof (Lean source)
lemma adaptivePilotRowScore_centered (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (n : ℕ) : ∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s * adaptivePilotRowScore select θ h η p ε hselect hp hε n s = 0 := by rw [show (∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s * adaptivePilotRowScore select θ h η p ε hselect hp hε n s) = (∑ s : Fin 14, adaptiveMainMass select (adaptiveTrueParam θ h n) (η n) p ε s * adaptiveSelectedScore select (η n) p ε s) - (contrast (adaptiveTrueParam θ h n) - contrast (η n)) * ∑ s : Fin 14, adaptiveMainMass select (adaptiveTrueParam θ h n) (η n) p ε s by simp only [adaptivePilotRowMass, adaptivePilotRowScore] simp_rw [mul_sub] rw [Finset.sum_sub_distrib, Finset.mul_sum] apply congrArg₂ (· - ·) rfl apply Finset.sum_congr rfl intro s _ ring] rw [adaptiveSelectedScore_mean select _ _ p ε hselect hp (hη n) hε, adaptiveMainMass_sum select _ _ p ε hselect hp (hη n) hε] ring
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowScore_centered · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:64
theorem adaptivePilotRowMean_abs_le

The exact mean correction is no larger than the common selected-score bound. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row Mean abs le.

Formal statement
select :
shared
η :
p ε :
ℝ
hselect :
hθ :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
n :
ℕ
|contrast (adaptiveTrueParam θ h n) - contrast (η n)| ≤ pilotPhiUpper p ε
Proof (Lean source)
lemma adaptivePilotRowMean_abs_le (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (n : ℕ) : |contrast (adaptiveTrueParam θ h n) - contrast (η n)| ≤ pilotPhiUpper p ε := by rw [← adaptiveSelectedScore_mean select (adaptiveTrueParam θ h n) (η n) p ε hselect hp (hη n) hε] calc |∑ s : Fin 14, adaptiveMainMass select (adaptiveTrueParam θ h n) (η n) p ε s * adaptiveSelectedScore select (η n) p ε s| ≤ ∑ s : Fin 14, |adaptiveMainMass select (adaptiveTrueParam θ h n) (η n) p ε s * adaptiveSelectedScore select (η n) p ε s| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ s : Fin 14, adaptiveMainMass select (adaptiveTrueParam θ h n) (η n) p ε s * pilotPhiUpper p ε := by apply Finset.sum_le_sum intro s _ rw [abs_mul, abs_of_nonneg (adaptiveMainMass_nonneg select _ _ p ε hselect hp (adaptiveTrueParam_interior θ h n hθ) (hη n) hε s)] exact mul_le_mul_of_nonneg_left (adaptiveSelectedScore_abs_le select (η n) p ε hselect hp (hη n) hε s) (adaptiveMainMass_nonneg select _ _ p ε hselect hp (adaptiveTrueParam_interior θ h n hθ) (hη n) hε s) _ = pilotPhiUpper p ε := by rw [← Finset.sum_mul, adaptiveMainMass_sum select _ _ p ε hselect hp (hη n) hε, one_mul]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowMean_abs_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:90
theorem adaptivePilotRowScore_abs_le

Every centered adaptive row score is bounded by twice the common selected-score bound. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row Score abs le.

Formal statement
select :
shared
η :
p ε :
ℝ
hselect :
hθ :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
n :
ℕ
s :
Fin 14
|adaptivePilotRowScore select θ h η p ε hselect hp hε n s| ≤ 2 * pilotPhiUpper p ε
Proof (Lean source)
lemma adaptivePilotRowScore_abs_le (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (n : ℕ) (s : Fin 14) : |adaptivePilotRowScore select θ h η p ε hselect hp hε n s| ≤ 2 * pilotPhiUpper p ε := by unfold adaptivePilotRowScore calc |_ - _| ≤ |adaptiveSelectedScore select (η n) p ε s| + |contrast (adaptiveTrueParam θ h n) - contrast (η n)| := abs_sub _ _ _ ≤ pilotPhiUpper p ε + pilotPhiUpper p ε := add_le_add (adaptiveSelectedScore_abs_le select (η n) p ε hselect hp (hη n) hε s) (adaptivePilotRowMean_abs_le select θ h η p ε hselect hp hθ hη hε n) _ = 2 * pilotPhiUpper p ε := by ring
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowScore_abs_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:121
theorem adaptivePilotRow_secondMoment_eq

The one-coordinate second moment of the centered row score is exactly the adaptive score variance. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row second Moment eq.

Formal statement
select :
shared
η :
p ε :
ℝ
hselect :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
n :
ℕ
(∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s * (adaptivePilotRowScore select θ h η p ε hselect hp hε n s) ^ 2)
= adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε
Proof (Lean source)
lemma adaptivePilotRow_secondMoment_eq (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (n : ℕ) : (∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s * (adaptivePilotRowScore select θ h η p ε hselect hp hε n s) ^ 2) = adaptiveScoreVariance select (adaptiveTrueParam θ h n) (η n) p ε := by exact (adaptiveScoreVariance_eq_centered_sum select (adaptiveTrueParam θ h n) (η n) p ε hselect hp (hη n) hε).symm
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRow_secondMoment_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:141
theorem adaptiveTrueParam_tendsto

The regularized local parameter converges to the base parameter. For the displayed inputs and conditions, the stated result follows. Under the stated assumptions, the adaptive True Param tendsto.

Formal statement
hθ :
Proof (Lean source)
lemma adaptiveTrueParam_tendsto (θ h : TrialParameter) (hθ : InteriorMeans θ) : Tendsto (adaptiveTrueParam θ h) atTop (nhds θ) := by apply (localAlternative_tendsto θ h).congr' filter_upwards [eventually_adaptiveTrueParam_eq θ h hθ] with n hn exact hn.symm
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveTrueParam_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:153
theorem adaptivePilotRow_variance_tendsto

If the selected pilot parameters converge to the base point, the centered adaptive row variances converge to the oracle variance. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row variance tendsto.

Formal statement
select :
shared
η :
p ε :
ℝ
hselect :
hθ :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
hηlim :
Tendsto (fun n => ∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s * (adaptivePilotRowScore select θ h η p ε hselect hp hε n s) ^ 2) atTop (nhds ((adaptivePilotLimitVariance select θ p ε hselect hp hθ hε : NNReal) : ℝ))
Proof (Lean source)
lemma adaptivePilotRow_variance_tendsto (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (hηlim : Tendsto η atTop (nhds θ)) : Tendsto (fun n => ∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s * (adaptivePilotRowScore select θ h η p ε hselect hp hε n s) ^ 2) atTop (nhds ((adaptivePilotLimitVariance select θ p ε hselect hp hθ hε : NNReal) : ℝ)) := by have hpair : Tendsto (fun n => (adaptiveTrueParam θ h n, η n)) atTop (nhds (θ, θ)) := (adaptiveTrueParam_tendsto θ h hθ).prodMk_nhds hηlim have hv := (continuousAt_adaptiveScoreVariance_diag select θ p ε hselect hp hθ hε).tendsto.comp hpair change Tendsto (fun n => ∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s * (adaptivePilotRowScore select θ h η p ε hselect hp hε n s) ^ 2) atTop (nhds (Vstar θ p ε)) convert hv using 1 · funext n exact adaptivePilotRow_secondMoment_eq select θ h η p ε hselect hp hη hε n · simp [adaptiveScoreVariance_diag select θ p ε hselect hp hθ hε]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRow_variance_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:162
theorem adaptivePilotLimitVariance_pos

The limiting adaptive row variance is strictly positive. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Limit Variance pos.

Formal statement
select :
shared
p ε :
ℝ
hselect :
hθ :
hε :
0 < ε
0 < adaptivePilotLimitVariance select θ p ε hselect hp hθ hε
Proof (Lean source)
lemma adaptivePilotLimitVariance_pos (θ : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : 0 < adaptivePilotLimitVariance select θ p ε hselect hp hθ hε := by change 0 < Vstar θ p ε unfold Vstar exact inv_pos.mpr (Jstar_pos_interior θ p ε hp hθ hε)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotLimitVariance_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:185
def adaptivePilotRowProductMass

The literal iid product mass of an adaptive main row. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Row Product Mass is determined by the displayed parameters.

Definition (Lean source)
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
v :
Fin (adaptiveMainSize m n) → Fin 14
adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v :
ℝ
∏ j, adaptivePilotRowMass select θ h η p ε hselect hp hε n (v j)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowProductMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:196
theorem adaptivePilotRowProductMass_nonneg

Every conditional main-row product atom has nonnegative mass. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row Product Mass nonneg.

Formal statement
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
n :
ℕ
v :
Fin (adaptiveMainSize m n) → Fin 14
0 ≤ adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v
Proof (Lean source)
lemma adaptivePilotRowProductMass_nonneg (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (n : ℕ) (v : Fin (adaptiveMainSize m n) → Fin 14) : 0 ≤ adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v := by exact Finset.prod_nonneg fun j _ => adaptivePilotRowMass_nonneg select θ h η p ε hselect hp hθ hη hε n (v j)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowProductMass_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:204
theorem adaptivePilotRowProductMass_sum

The conditional iid main-row product masses sum to one. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row Product Mass sum.

Formal statement
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hη :
∀ n, InteriorMeans (η n)
hε :
0 < ε
n :
ℕ
∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v
= 1
Proof (Lean source)
lemma adaptivePilotRowProductMass_sum (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hη : ∀ n, InteriorMeans (η n)) (hε : 0 < ε) (n : ℕ) : ∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ h η p ε m hselect hp hε n v = 1 := by classical calc _ = ∏ _j : Fin (adaptiveMainSize m n), ∑ s : Fin 14, adaptivePilotRowMass select θ h η p ε hselect hp hε n s := by simpa [adaptivePilotRowProductMass] using (Fintype.prod_sum (fun _j : Fin (adaptiveMainSize m n) => adaptivePilotRowMass select θ h η p ε hselect hp hε n)).symm _ = 1 := by simp [adaptivePilotRowMass_sum select θ h η p ε hselect hp hη hε n]
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowProductMass_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:217
theorem adaptivePilotRowScore_sum_eq

Summing the centered row score subtracts exactly the row length times the paper estimator's mean correction. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row Score sum eq.

Formal statement
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
v :
Fin (adaptiveMainSize m n) → Fin 14
∑ j, adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j)
= (∑ j, adaptiveSelectedScore select (η n) p ε (v j))
- (adaptiveMainSize m n : ℝ) * (contrast (adaptiveTrueParam θ h n) - contrast (η n))
Proof (Lean source)
lemma adaptivePilotRowScore_sum_eq (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (n : ℕ) (v : Fin (adaptiveMainSize m n) → Fin 14) : ∑ j, adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j) = (∑ j, adaptiveSelectedScore select (η n) p ε (v j)) - (adaptiveMainSize m n : ℝ) * (contrast (adaptiveTrueParam θ h n) - contrast (η n)) := by simp only [adaptivePilotRowScore, Finset.sum_sub_distrib, Finset.sum_const, nsmul_eq_mul] have hcard : (Finset.univ : Finset (Fin (adaptiveMainSize m n))).card = adaptiveMainSize m n := by simp rw [hcard] ring
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowScore_sum_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:236
theorem adaptivePilotRow_estimatorError_eq

For a nonempty main row, its corrected sample average minus the true contrast is the average centered row score. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row estimator Error eq.

Formal statement
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hn :
0 < adaptiveMainSize m n
v :
Fin (adaptiveMainSize m n) → Fin 14
contrast (η n)
+ (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (η n) p ε (v j))
- contrast (adaptiveTrueParam θ h n)
= (adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j)
Proof (Lean source)
lemma adaptivePilotRow_estimatorError_eq (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (n : ℕ) (hn : 0 < adaptiveMainSize m n) (v : Fin (adaptiveMainSize m n) → Fin 14) : contrast (η n) + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (η n) p ε (v j)) - contrast (adaptiveTrueParam θ h n) = (adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j) := by rw [adaptivePilotRowScore_sum_eq select θ h η p ε m hselect hp hε n v] have hN : (adaptiveMainSize m n : ℝ) ≠ 0 := by exact_mod_cast (ne_of_gt hn) field_simp ring
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRow_estimatorError_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowInputs.lean:255
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotRowUniformization 1 declarations This module turns convergence along every selected bad subsequence of finite pilot prefixes into eventual uniform control over all prefixes whose selected parameter lies in a shrinking neighborhood of the base point.

Sequential uniformization over shrinking pilot neighborhoods

This module turns convergence along every selected bad subsequence of finite pilot prefixes into eventual uniform control over all prefixes whose selected parameter lies in a shrinking neighborhood of the base point.

theorem adaptivePilotSelector_uniform_of_subsequential_tendsto

If every subsequence of finite pilot prefixes whose selected parameters converge to the base point has the same scalar limit, then the scalar errors are eventually uniform over all pilot prefixes selected inside any shrinking radius. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Selector uniform of subsequential tendsto.

Formal statement
p ε :
ℝ
m :
ℕ → ℕ
ρ :
ℕ → ℝ
E :
(n : ℕ) → AdaptivePilotSample m n → ℝ
L :
ℝ
hρ :
hseq :
∀ (φ : ℕ → ℕ),
StrictMono φ → ∀ u : (k : ℕ) → AdaptivePilotSample m (φ k), Tendsto (fun k => adaptivePilotSelector p ε m (φ k) (u k)) atTop (nhds θ) → Tendsto (fun k => E (φ k) (u k)) atTop (nhds L)
δ :
ℝ
0 < δ
∀ᶠ n in atTop, ∀ u : AdaptivePilotSample m n, dist (adaptivePilotSelector p ε m n u) θ
≤ ρ n → |E n u - L| < δ
Proof (Lean source)
-- keep: reusable finite-pilot construction, law, localization, or limit API for related adaptive procedures lemma adaptivePilotSelector_uniform_of_subsequential_tendsto (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (ρ : ℕ → ℝ) (E : (n : ℕ) → AdaptivePilotSample m n → ℝ) (L : ℝ) (hρ : Tendsto ρ atTop (nhds 0)) (hseq : ∀ (φ : ℕ → ℕ), StrictMono φ → ∀ u : (k : ℕ) → AdaptivePilotSample m (φ k), Tendsto (fun k => adaptivePilotSelector p ε m (φ k) (u k)) atTop (nhds θ) → Tendsto (fun k => E (φ k) (u k)) atTop (nhds L)) : ∀ δ : ℝ, 0 < δ → ∀ᶠ n in atTop, ∀ u : AdaptivePilotSample m n, dist (adaptivePilotSelector p ε m n u) θ ≤ ρ n → |E n u - L| < δ := by intro δ hδ by_contra huniform have hfrequent : ∃ᶠ n in atTop, ¬(∀ u : AdaptivePilotSample m n, dist (adaptivePilotSelector p ε m n u) θ ≤ ρ n → |E n u - L| < δ) := not_eventually.mp huniform have hbad : ∃ᶠ n in atTop, ∃ u : AdaptivePilotSample m n, dist (adaptivePilotSelector p ε m n u) θ ≤ ρ n ∧ δ ≤ |E n u - L| := by apply hfrequent.mono intro n hn push Not at hn exact hn obtain ⟨φ, hφ, hφbad⟩ := extraction_of_frequently_atTop hbad choose u hu using hφbad have hselector : Tendsto (fun k => adaptivePilotSelector p ε m (φ k) (u k)) atTop (nhds θ) := by rw [Metric.tendsto_atTop] intro η hη have hρsub : Tendsto (fun k => ρ (φ k)) atTop (nhds 0) := hρ.comp hφ.tendsto_atTop have hρlt : ∀ᶠ k in atTop, ρ (φ k) < η := (tendsto_order.1 hρsub).2 η hη rcases eventually_atTop.1 hρlt with ⟨N, hN⟩ exact ⟨N, fun k hk => lt_of_le_of_lt (hu k).1 (hN k hk)⟩ have hE := hseq φ hφ u hselector have hclose : ∀ᶠ k in atTop, |E (φ k) (u k) - L| < δ := by rcases (Metric.tendsto_atTop.1 hE) δ hδ with ⟨N, hN⟩ exact eventually_atTop.2 ⟨N, fun k hk => by simpa [Real.dist_eq] using hN k hk⟩ rcases eventually_atTop.1 hclose with ⟨N, hN⟩ exact (not_lt_of_ge (hu N).2 (hN N le_rfl)).elim
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotSelector_uniform_of_subsequential_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowUniformization.lean:20
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotRowVariance 12 declarations This module identifies the paper's main-sample variance estimator with the literal empirical variance of the centered finite row.

Empirical variance identities for adaptive pilot rows

This module identifies the paper's main-sample variance estimator with the literal empirical variance of the centered finite row. It also records the encoded-transcript support factorization and the sample-size scaling used for root-n errors.

def adaptivePilotRowEmpiricalMean

The empirical mean of the centered adaptive row score. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Row Empirical Mean is determined by the displayed parameters.

Definition (Lean source)
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
v :
Fin (adaptiveMainSize m n) → Fin 14
adaptivePilotRowEmpiricalMean select θ h η p ε m hselect hp hε n v :
ℝ
(adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j)
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowEmpiricalMean · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:22
def adaptivePilotRowEmpiricalSecond

The empirical second moment of the centered adaptive row score. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Row Empirical Second is determined by the displayed parameters.

Definition (Lean source)
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
v :
Fin (adaptiveMainSize m n) → Fin 14
adaptivePilotRowEmpiricalSecond select θ h η p ε m hselect hp hε n v :
ℝ
(adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, (adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j)) ^ 2
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowEmpiricalSecond · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:31
def adaptivePilotRowEmpiricalVariance

The empirical variance of the centered adaptive row score. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Pilot Row Empirical Variance is determined by the displayed parameters.

Definition (Lean source)
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
v :
Fin (adaptiveMainSize m n) → Fin 14
adaptivePilotRowEmpiricalVariance select θ h η p ε m hselect hp hε n v :
ℝ
adaptivePilotRowEmpiricalSecond select θ h η p ε m hselect hp hε n v
- (adaptivePilotRowEmpiricalMean select θ h η p ε m hselect hp hε n v) ^ 2
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowEmpiricalVariance · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:40
theorem finite_empiricalVariance_eq_average_sq_deviation

A finite nonempty sample's second-moment-minus-mean-square formula equals its average squared deviation from the empirical mean. For the displayed inputs and conditions, the stated result follows.

Formal statement
N :
ℕ
hN :
0 < N
x :
Fin N → ℝ
(N : ℝ)⁻¹ * ∑ j, (x j) ^ 2 - ((N : ℝ)⁻¹ * ∑ j, x j) ^ 2
= (N : ℝ)⁻¹ * ∑ j, (x j - (N : ℝ)⁻¹ * ∑ k, x k) ^ 2
Proof (Lean source)
lemma finite_empiricalVariance_eq_average_sq_deviation {N : ℕ} (hN : 0 < N) (x : Fin N → ℝ) : (N : ℝ)⁻¹ * ∑ j, (x j) ^ 2 - ((N : ℝ)⁻¹ * ∑ j, x j) ^ 2 = (N : ℝ)⁻¹ * ∑ j, (x j - (N : ℝ)⁻¹ * ∑ k, x k) ^ 2 := by have hNr : (N : ℝ) ≠ 0 := by exact_mod_cast (ne_of_gt hN) have hcard : (Finset.univ : Finset (Fin N)).card = N := by simp simp_rw [sub_sq] rw [Finset.sum_add_distrib, Finset.sum_sub_distrib, Finset.mul_sum, Finset.sum_const, nsmul_eq_mul, hcard] have hsq : (∑ i : Fin N, (N : ℝ)⁻¹ * x i ^ 2) = (N : ℝ)⁻¹ * ∑ i, x i ^ 2 := (Finset.mul_sum _ _ _).symm have hcross : (∑ i : Fin N, 2 * x i * ((N : ℝ)⁻¹ * ∑ j, x j)) = (2 * ((N : ℝ)⁻¹ * ∑ j, x j)) * ∑ j, x j := by calc _ = ∑ i : Fin N, (2 * ((N : ℝ)⁻¹ * ∑ j, x j)) * x i := by apply Finset.sum_congr rfl intro i _ ring _ = _ := (Finset.mul_sum _ _ _).symm rw [hsq, hcross] field_simp ring
CausalSmith.Stat.LdpAteEfficiencySurface.finite_empiricalVariance_eq_average_sq_deviation · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:49
theorem adaptivePilotRowEmpiricalVariance_eq_average_sq_deviation

The adaptive row empirical variance is its average squared deviation from the empirical row mean. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row Empirical Variance eq average sq deviation.

Formal statement
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hN :
0 < adaptiveMainSize m n
v :
Fin (adaptiveMainSize m n) → Fin 14
adaptivePilotRowEmpiricalVariance select θ h η p ε m hselect hp hε n v
= (adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, (adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j) - adaptivePilotRowEmpiricalMean select θ h η p ε m hselect hp hε n v) ^ 2
Proof (Lean source)
lemma adaptivePilotRowEmpiricalVariance_eq_average_sq_deviation (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (n : ℕ) (hN : 0 < adaptiveMainSize m n) (v : Fin (adaptiveMainSize m n) → Fin 14) : adaptivePilotRowEmpiricalVariance select θ h η p ε m hselect hp hε n v = (adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, (adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j) - adaptivePilotRowEmpiricalMean select θ h η p ε m hselect hp hε n v) ^ 2 := by exact finite_empiricalVariance_eq_average_sq_deviation hN (fun j => adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j))
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowEmpiricalVariance_eq_average_sq_deviation · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:75
theorem pilotAdaptiveEncode_main_score_sum

On an encoded transcript, summing any transformed main-release score over the full transcript is the corresponding sum over the main row. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Adaptive Encode main score sum.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
u :
Fin (m n) → Fin 4
v :
Fin (n - m n) → Fin 14
g :
ℝ → ℝ
(∑ i : Fin n, if m n ≤ i.val then g (phiOutput (pilotAdaptivePrefixTheta p ε m hmn u) p ε (select) (pilotAdaptiveEncode hmn u v i)) else 0)
= ∑ j, g (adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))
Proof (Lean source)
lemma pilotAdaptiveEncode_main_score_sum (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) (g : ℝ → ℝ) : (∑ i : Fin n, if m n ≤ i.val then g (phiOutput (pilotAdaptivePrefixTheta p ε m hmn u) p ε (select) (pilotAdaptiveEncode hmn u v i)) else 0) = ∑ j, g (adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) := by rw [show (∑ i : Fin n, if m n ≤ i.val then g (phiOutput (pilotAdaptivePrefixTheta p ε m hmn u) p ε (select) (pilotAdaptiveEncode hmn u v i)) else 0) = ∑ i : Fin n, if hi : i.val < m n then (0 : ℝ) else g (adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v ⟨i.val - m n, by omega⟩)) by apply Finset.sum_congr rfl intro i _ by_cases hi : i.val < m n · simp [hi] · have him : m n ≤ i.val := Nat.le_of_not_gt hi simp [hi, him, pilotAdaptiveEncode, phiOutput, adaptiveSelectedScore]] rw [fin_sum_split hmn (fun _ : Fin (m n) => (0 : ℝ)) (fun j : Fin (n - m n) => g (adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)))] simp
CausalSmith.Stat.LdpAteEfficiencySurface.pilotAdaptiveEncode_main_score_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:91
theorem VhatStar_pilotAdaptiveEncode

On a properly encoded transcript, VhatStar is exactly the empirical variance of the selected main-release scores. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Vhat Star pilot Adaptive Encode.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
u :
Fin (m n) → Fin 4
v :
Fin (n - m n) → Fin 14
VhatStar p ε m (select) (pilotAdaptiveEncode hmn u v)
= let η := pilotAdaptivePrefixTheta p ε m hmn u let q : Fin 14 → ℝ := adaptiveSelectedScore select η p ε let qbar := ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, q (v j) ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, (q (v j) - qbar) ^ 2
Proof (Lean source)
lemma VhatStar_pilotAdaptiveEncode (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : VhatStar p ε m (select) (pilotAdaptiveEncode hmn u v) = let η := pilotAdaptivePrefixTheta p ε m hmn u let q : Fin 14 → ℝ := adaptiveSelectedScore select η p ε let qbar := ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, q (v j) ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, (q (v j) - qbar) ^ 2 := by rw [VhatStar, pilotTheta_pilotAdaptiveEncode p ε m hmn u v] dsimp only have hsum := pilotAdaptiveEncode_main_score_sum select p ε m hselect hp hε hmn u v id simp only [id_eq] at hsum rw [hsum] rw [pilotAdaptiveEncode_main_score_sum select p ε m hselect hp hε hmn u v (fun x => (x - ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) ^ 2)]
CausalSmith.Stat.LdpAteEfficiencySurface.VhatStar_pilotAdaptiveEncode · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:124
theorem adaptivePilotRowEmpiricalVariance_eq_selected

Centering every selected score by the same population correction does not change its empirical variance. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row Empirical Variance eq selected.

Formal statement
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hN :
0 < adaptiveMainSize m n
v :
Fin (adaptiveMainSize m n) → Fin 14
adaptivePilotRowEmpiricalVariance select θ h η p ε m hselect hp hε n v
= let q : Fin 14 → ℝ := adaptiveSelectedScore select (η n) p ε let qbar := (adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, q (v j) (adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, (q (v j) - qbar) ^ 2
Proof (Lean source)
lemma adaptivePilotRowEmpiricalVariance_eq_selected (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (n : ℕ) (hN : 0 < adaptiveMainSize m n) (v : Fin (adaptiveMainSize m n) → Fin 14) : adaptivePilotRowEmpiricalVariance select θ h η p ε m hselect hp hε n v = let q : Fin 14 → ℝ := adaptiveSelectedScore select (η n) p ε let qbar := (adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, q (v j) (adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, (q (v j) - qbar) ^ 2 := by rw [adaptivePilotRowEmpiricalVariance_eq_average_sq_deviation select θ h η p ε m hselect hp hε n hN v] have hNr : (adaptiveMainSize m n : ℝ) ≠ 0 := by exact_mod_cast (ne_of_gt hN) have hmean : adaptivePilotRowEmpiricalMean select θ h η p ε m hselect hp hε n v = (adaptiveMainSize m n : ℝ)⁻¹ * ∑ j, adaptiveSelectedScore select (η n) p ε (v j) - (contrast (adaptiveTrueParam θ h n) - contrast (η n)) := by unfold adaptivePilotRowEmpiricalMean rw [adaptivePilotRowScore_sum_eq select θ h η p ε m hselect hp hε n v] field_simp rw [hmean] apply congrArg ((adaptiveMainSize m n : ℝ)⁻¹ * ·) apply Finset.sum_congr rfl intro j _ unfold adaptivePilotRowScore ring
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRowEmpiricalVariance_eq_selected · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:148
def adaptiveEncodedRowEmpiricalVariance

The empirical variance of the population-centered scores in an encoded main row. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The adaptive Encoded Row Empirical Variance is determined by the displayed parameters.

Definition (Lean source)
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
u :
Fin (m n) → Fin 4
v :
Fin (n - m n) → Fin 14
adaptiveEncodedRowEmpiricalVariance select θ h p ε m hselect hp hε hmn u v :
ℝ
η :
f :
fun s
=> adaptiveSelectedScore select η p ε s
- (contrast (adaptiveTrueParam θ h n) - contrast η) (: Fin 14 → ℝ)
((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, (f (v j)) ^ 2 - (((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, f (v j)) ^ 2
CausalSmith.Stat.LdpAteEfficiencySurface.adaptiveEncodedRowEmpiricalVariance · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:179
theorem VhatStar_pilotAdaptiveEncode_eq_rowVariance

Under a proper nonempty pilot split, VhatStar on an encoded transcript is exactly the empirical variance of the population-centered main-row score. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Vhat Star pilot Adaptive Encode eq row Variance.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
hN :
0 < n - m n
u :
Fin (m n) → Fin 4
v :
Fin (n - m n) → Fin 14
VhatStar p ε m (select) (pilotAdaptiveEncode hmn u v)
= adaptiveEncodedRowEmpiricalVariance select θ h p ε m hselect hp hε hmn u v
Proof (Lean source)
-- keep: reusable finite-pilot construction, law, localization, or limit API for related adaptive procedures lemma VhatStar_pilotAdaptiveEncode_eq_rowVariance (θ h : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (hN : 0 < n - m n) (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : VhatStar p ε m (select) (pilotAdaptiveEncode hmn u v) = adaptiveEncodedRowEmpiricalVariance select θ h p ε m hselect hp hε hmn u v := by rw [VhatStar_pilotAdaptiveEncode select p ε m hselect hp hε hmn u v] unfold adaptiveEncodedRowEmpiricalVariance dsimp only rw [finite_empiricalVariance_eq_average_sq_deviation hN] let q : Fin 14 → ℝ := adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε let c := contrast (adaptiveTrueParam θ h n) - contrast (pilotAdaptivePrefixTheta p ε m hmn u) have hNr : ((n - m n : ℕ) : ℝ) ≠ 0 := by exact_mod_cast (ne_of_gt hN) have hmean : ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, (q (v j) - c) = ((n - m n : ℕ) : ℝ)⁻¹ * ∑ j, q (v j) - c := by rw [Finset.sum_sub_distrib, Finset.sum_const, nsmul_eq_mul] have hcard : (Finset.univ : Finset (Fin (n - m n))).card = n - m n := by simp rw [hcard] field_simp rw [hmean] apply congrArg (((n - m n : ℕ) : ℝ)⁻¹ * ·) apply Finset.sum_congr rfl intro j _ ring
CausalSmith.Stat.LdpAteEfficiencySurface.VhatStar_pilotAdaptiveEncode_eq_rowVariance · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:193
theorem adaptivePilotRow_rootN_error_sq

Root-n squared main-estimation error is the row-normalized squared sum multiplied by the exact sample-size ratio n / adaptiveMainSize m n. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the adaptive Pilot Row root N error sq.

Formal statement
select :
shared
η :
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hN :
0 < adaptiveMainSize m n
v :
Fin (adaptiveMainSize m n) → Fin 14
(n : ℝ) * (contrast (η n) + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (η n) p ε (v j)) - contrast (adaptiveTrueParam θ h n)) ^ 2
= ((n : ℝ) / (adaptiveMainSize m n : ℝ)) * ((sqrt (adaptiveMainSize m n : ℝ))⁻¹ * ∑ j, adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j)) ^ 2
Proof (Lean source)
-- keep: reusable finite-pilot construction, law, localization, or limit API for related adaptive procedures lemma adaptivePilotRow_rootN_error_sq (θ h : TrialParameter) (η : ℕ → TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) (n : ℕ) (hN : 0 < adaptiveMainSize m n) (v : Fin (adaptiveMainSize m n) → Fin 14) : (n : ℝ) * (contrast (η n) + (adaptiveMainSize m n : ℝ)⁻¹ * (∑ j, adaptiveSelectedScore select (η n) p ε (v j)) - contrast (adaptiveTrueParam θ h n)) ^ 2 = ((n : ℝ) / (adaptiveMainSize m n : ℝ)) * ((sqrt (adaptiveMainSize m n : ℝ))⁻¹ * ∑ j, adaptivePilotRowScore select θ h η p ε hselect hp hε n (v j)) ^ 2 := by rw [adaptivePilotRow_estimatorError_eq select θ h η p ε m hselect hp hε n hN v] have hNr : 0 < (adaptiveMainSize m n : ℝ) := by exact_mod_cast hN have hsqrt : (sqrt (adaptiveMainSize m n : ℝ)) ^ 2 = adaptiveMainSize m n := Real.sq_sqrt hNr.le have hsqrt_ne : sqrt (adaptiveMainSize m n : ℝ) ≠ 0 := ne_of_gt (Real.sqrt_pos.2 hNr) field_simp rw [hsqrt] ring
CausalSmith.Stat.LdpAteEfficiencySurface.adaptivePilotRow_rootN_error_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:228
theorem pilotAdaptive_joint_singleton_eq_prefix_mul_mainProduct

The exact transcript atom is its pilot-prefix mass times the conditional iid main-row product mass. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Adaptive joint singleton eq prefix mul main Product.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
u :
Fin (m n) → Fin 4
v :
Fin (n - m n) → Fin 14
transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n {pilotAdaptiveEncode hmn u v}
= ofReal (∏ j : Fin (m n), ∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j)) * ofReal (∏ j : Fin (n - m n), adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))
Proof (Lean source)
lemma pilotAdaptive_joint_singleton_eq_prefix_mul_mainProduct (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n {pilotAdaptiveEncode hmn u v} = ofReal (∏ j : Fin (m n), ∑ a : Fin 4, piTheta θ p a * rrPilotProbability ε a (u j)) * ofReal (∏ j : Fin (n - m n), adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) := by rw [pilotAdaptive_joint_singleton select θ p ε m hselect hp hθ hε hmn u v] rw [ENNReal.ofReal_prod_of_nonneg] · rw [ENNReal.ofReal_prod_of_nonneg] intro j _ exact adaptiveMainMass_nonneg select θ _ p ε hselect hp hθ (pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0))) hε (v j) · intro j _ apply Finset.sum_nonneg intro a _ exact mul_nonneg (piTheta_pos_interior θ p hp hθ a).le (by unfold rrPilotProbability split_ifs <;> positivity)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotAdaptive_joint_singleton_eq_prefix_mul_mainProduct · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotRowVariance.lean:255
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotSelectorBridge 2 declarations Measurable finite-quadratic selector adapter

Measurable finite-quadratic selector adapter

theorem exists_measurable_saddle_selector_bridge_strong

Under the supplied quantities and conditions, the exists measurable saddle selector bridge strong assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the exists measurable saddle selector bridge strong.

Formal statement
p ε :
ℝ
hε :
0 < ε
∃ select : TrialParameter → StaircaseWeight × ℝ × ℝ,
Measurable select
conclusion 1
θ :
staircaseFeasible ε (select θ).1
u :
informationObjective θ p ε (select θ).1 (select θ).2.1
≤ informationObjective θ p ε (select θ).1 u
Jstar θ p ε = (select θ).2.2
(select θ).2.2 = informationObjective θ p ε (select θ).1 (select θ).2.1
β :
informationObjective θ p ε β (select θ).2.1
≤ informationObjective θ p ε (select θ).1 (select θ).2.1
Proof (Lean source)
lemma exists_measurable_saddle_selector_bridge_strong (p ε : ℝ) (hp : InteriorAssignment p) (hε : 0 < ε) : ∃ select : TrialParameter → StaircaseWeight × ℝ × ℝ, Measurable select ∧ ∀ θ, InteriorMeans θ → staircaseFeasible ε (select θ).1 ∧ (∀ u, informationObjective θ p ε (select θ).1 (select θ).2.1 ≤ informationObjective θ p ε (select θ).1 u) ∧ Jstar θ p ε = (select θ).2.2 ∧ (select θ).2.2 = informationObjective θ p ε (select θ).1 (select θ).2.1 ∧ (∀ β, staircaseFeasible ε β → informationObjective θ p ε β (select θ).2.1 ≤ informationObjective θ p ε (select θ).1 (select θ).2.1) := by classical let Θ := {θ : TrialParameter // InteriorMeans θ} letI : StandardBorelSpace Θ := measurableSet_interiorMeans.standardBorel have hatt : ∀ θ : Θ, θ ∈ Set.univ → ∃ α t, IsSaddle (pilotPolytope ε hε.le) (pilotQuadratics p ε hp hε.le) θ α t := fun θ _ => exists_quadratic_saddle p ε hp hε θ obtain ⟨α, t, hαm, htm, hs⟩ := exists_measurable_saddle_on (pilotPolytope ε hε.le) (pilotQuadratics p ε hp hε.le) Set.univ MeasurableSet.univ hatt let lift : Θ → (Set.univ : Set Θ) := fun x => ⟨x, Set.mem_univ x⟩ have hlift : Measurable lift := by dsimp [lift] fun_prop let αD : Θ → EuclideanSpace ℝ (Fin 14) := α ∘ lift let tD : Θ → ℝ := t ∘ lift have hαD : Measurable αD := hαm.comp hlift have htD : Measurable tD := htm.comp hlift let policyD : Θ → StaircaseWeight × ℝ × ℝ := fun x => (toWeight (αD x), tD x, (pilotQuadratics p ε hp hε.le).objective x (αD x) (tD x)) have hpolicyD : Measurable policyD := by apply prodMk · apply measurable_pi_lambda intro s exact ((EuclideanSpace.proj (𝕜 := ℝ) s).continuous.measurable.comp hαD) · exact htD.prodMk ((pilotQuadratics p ε hp hε.le).measurable_objective.comp (measurable_id.prodMk (hαD.prodMk htD))) let select : TrialParameter → StaircaseWeight × ℝ × ℝ := fun θ => if hθ : InteriorMeans θ then policyD ⟨θ, hθ⟩ else (0, 0, 0) have hselect : Measurable select := by exact Measurable.dite hpolicyD measurable_const measurableSet_interiorMeans refine ⟨select, hselect, ?_⟩ intro θ hθ let x : Θ := ⟨θ, hθ⟩ let xu : (Set.univ : Set Θ) := ⟨x, Set.mem_univ x⟩ have hsx := hs xu have hfeasSel : staircaseFeasible ε (toWeight (α xu)) := (pilotPolytope_weights ε hε.le _).1 hsx.1 have hupper : ∀ z ∈ {z : ℝ | ∃ β : StaircaseWeight, staircaseFeasible ε β ∧ z = sInf {y : ℝ | ∃ u : ℝ, y = informationObjective θ p ε β u}}, z ≤ informationObjective θ p ε (toWeight (α xu)) (t xu) := by rintro _ ⟨β, hβ, rfl⟩ have hb : BddBelow {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} := by refine ⟨0, ?_⟩ rintro _ ⟨u, rfl⟩ exact informationObjective_nonneg_interior θ p ε hp hθ hε.le β hβ u calc sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} ≤ informationObjective θ p ε β (t xu) := csInf_le hb ⟨t xu, rfl⟩ _ ≤ informationObjective θ p ε (toWeight (α xu)) (t xu) := by have hh := hsx.2.2 (ofWeight β) ((pilotPolytope_weights ε hε.le _).2 (by simpa)) rw [pilotQuadratics_objective, pilotQuadratics_objective] at hh simpa [x, xu] using hh have hne : {z : ℝ | ∃ β : StaircaseWeight, staircaseFeasible ε β ∧ z = sInf {y : ℝ | ∃ u : ℝ, y = informationObjective θ p ε β u}}.Nonempty := ⟨sInf {y : ℝ | ∃ u : ℝ, y = informationObjective θ p ε (toWeight (α xu)) u}, toWeight (α xu), hfeasSel, rfl⟩ have hj : Jstar θ p ε = (pilotQuadratics p ε hp hε.le).objective x (α xu) (t xu) := by rw [pilotQuadratics_objective] apply le_antisymm · rw [Jstar] apply csSup_le · exact hne · exact hupper · rw [Jstar] apply le_csSup · exact ⟨_, hupper⟩ · refine ⟨toWeight (α xu), (pilotPolytope_weights ε hε.le _).1 hsx.1, ?_⟩ symm apply IsLeast.csInf_eq refine ⟨⟨t xu, rfl⟩, ?_⟩ rintro _ ⟨u, rfl⟩ have hh := hsx.2.1 u rw [pilotQuadratics_objective, pilotQuadratics_objective] at hh simpa [x, xu] using hh simp only [select, hθ, dite_true, policyD, αD, tD, lift, Function.comp_apply] refine ⟨(pilotPolytope_weights ε hε.le _).1 hsx.1, ?_, hj, ?_, ?_⟩ · intro u have hh := hsx.2.1 u rw [pilotQuadratics_objective, pilotQuadratics_objective] at hh simpa [x, xu] using hh · exact pilotQuadratics_objective p ε hp hε.le x (α xu) (t xu) · intro β hβ have hh := hsx.2.2 (ofWeight β) ((pilotPolytope_weights ε hε.le _).2 (by simpa)) rw [pilotQuadratics_objective, pilotQuadratics_objective] at hh simpa [x, xu] using hh
CausalSmith.Stat.LdpAteEfficiencySurface.exists_measurable_saddle_selector_bridge_strong · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotSelectorBridge.lean:182
theorem exists_measurable_saddle_selector_bridge

Under the supplied quantities and conditions, the exists measurable saddle selector bridge assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the exists measurable saddle selector bridge.

Formal statement
p ε :
ℝ
hε :
0 < ε
∃ select : TrialParameter → StaircaseWeight × ℝ × ℝ,
Measurable select
conclusion 1
θ :
staircaseFeasible ε (select θ).1
u :
informationObjective θ p ε (select θ).1 (select θ).2.1
≤ informationObjective θ p ε (select θ).1 u
Jstar θ p ε = (select θ).2.2
(select θ).2.2 = informationObjective θ p ε (select θ).1 (select θ).2.1
Proof (Lean source)
lemma exists_measurable_saddle_selector_bridge (p ε : ℝ) (hp : InteriorAssignment p) (hε : 0 < ε) : ∃ select : TrialParameter → StaircaseWeight × ℝ × ℝ, Measurable select ∧ ∀ θ, InteriorMeans θ → staircaseFeasible ε (select θ).1 ∧ (∀ u, informationObjective θ p ε (select θ).1 (select θ).2.1 ≤ informationObjective θ p ε (select θ).1 u) ∧ Jstar θ p ε = (select θ).2.2 ∧ (select θ).2.2 = informationObjective θ p ε (select θ).1 (select θ).2.1 := by obtain ⟨select, hm, hs⟩ := exists_measurable_saddle_selector_bridge_strong p ε hp hε refine ⟨select, hm, ?_⟩ intro θ hθ have h := hs θ hθ exact ⟨h.1, h.2.1, h.2.2.1, h.2.2.2.1⟩
CausalSmith.Stat.LdpAteEfficiencySurface.exists_measurable_saddle_selector_bridge · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotSelectorBridge.lean:294
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotStudentizationSupport 3 declarations This file derives the Slutsky approximation required by the varying-law Wald adapter from the genuine CDF and plug-in variance consistency premises.

Row-varying studentization for the private pilot

This file derives the Slutsky approximation required by the varying-law Wald adapter from the genuine CDF and plug-in variance consistency premises.

theorem varyingLaw_tight_of_standardNormal_cdf

A row-varying statistic whose CDF converges to the standard normal is tight. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the varying Law tight of standard Normal cdf.

Formal statement
Ω :
ℕ → Type*
∀ n, MeasurableSpace (Ω n)
μ :
∀ n, Measure (Ω n)
∀ n, IsProbabilityMeasure (μ n)
T :
∀ n
if
Ω n
then
ℝ
hTmeas :
∀ n, Measurable (T n)
hcdf :
∀ x : ℝ,
Tendsto (fun n => (μ n).real {z | T n z ≤ x}) atTop (nhds ((gaussianMeasure 0 1).real (Iic x)))
η :
ℝ
0 < η
∃ M : ℝ,
conclusion 1
0 < M
conclusion 2
∀ᶠ n in atTop, (μ n).real {z | M ≤ |T n z|} < η
Proof (Lean source)
lemma varyingLaw_tight_of_standardNormal_cdf {Ω : ℕ → Type*} [∀ n, MeasurableSpace (Ω n)] (μ : ∀ n, Measure (Ω n)) [∀ n, IsProbabilityMeasure (μ n)] (T : ∀ n, Ω n → ℝ) (hTmeas : ∀ n, Measurable (T n)) (hcdf : ∀ x : ℝ, Tendsto (fun n => (μ n).real {z | T n z ≤ x}) atTop (nhds ((gaussianMeasure 0 1).real (Iic x)))) : ∀ η : ℝ, 0 < η → ∃ M : ℝ, 0 < M ∧ ∀ᶠ n in atTop, (μ n).real {z | M ≤ |T n z|} < η := by intro η hη let η₀ : ℝ := min (η / 8) (1 / 8) have hη₀ : 0 < η₀ := lt_min (by linarith) (by norm_num) obtain ⟨R, hR, hleft, hright⟩ := gaussian_tail_small_gaussian (m := 0) (v := 1) hη₀ have hleftR : (gaussianMeasure 0 1).real (Iic (-R)) ≤ η₀ := by have ht := ENNReal.toReal_mono ENNReal.ofReal_ne_top hleft simpa [MeasureTheory.measureReal_def, ENNReal.toReal_ofReal hη₀.le] using ht have hrightR : (gaussianMeasure 0 1).real (Ici R) ≤ η₀ := by have ht := ENNReal.toReal_mono ENNReal.ofReal_ne_top hright simpa [MeasureTheory.measureReal_def, ENNReal.toReal_ofReal hη₀.le] using ht have hcomp : (gaussianMeasure 0 1).real (Icc (-R) R)ᶜ ≤ 2 * η₀ := by calc _ ≤ (gaussianMeasure 0 1).real (Iic (-R) ∪ Ici R) := by apply MeasureTheory.measureReal_mono (h₂ := measure_ne_top _ _) intro x hx simp only [mem_compl_iff, mem_Icc, not_and_or, not_le] at hx exact hx.imp le_of_lt le_of_lt _ ≤ (gaussianMeasure 0 1).real (Iic (-R)) + (gaussianMeasure 0 1).real (Ici R) := MeasureTheory.measureReal_union_le _ _ _ ≤ 2 * η₀ := by linarith have hzeroApprox : ∀ δ : ℝ, 0 < δ → Tendsto (fun n => (μ n).real {z | δ ≤ |T n z - T n z|}) atTop (nhds 0) := by intro δ hδ convert tendsto_const_nhds (x := (0 : ℝ)) using 1 funext n simp [not_le_of_gt hδ] have hinter := varyingLaw_Icc_tendsto_of_cdf_and_approx μ T T (gaussianMeasure 0 1) hTmeas hzeroApprox hcdf (by simpa [gaussianMeasure] using (continuous_cdf_gaussianReal_zero (v := (1 : NNReal)) (by norm_num))) (gaussianMeasure_zero_one_frontier_Icc hR) have hcompl : Tendsto (fun n => (μ n).real {z | T n z ∉ Icc (-R) R}) atTop (nhds ((gaussianMeasure 0 1).real (Icc (-R) R)ᶜ)) := by have hsub := (tendsto_const_nhds : Tendsto (fun _ : ℕ => (1 : ℝ)) atTop (nhds 1)).sub hinter have hq := MeasureTheory.measureReal_add_measureReal_compl (μ := gaussianMeasure 0 1) (show MeasurableSet (Icc (-R) R) from measurableSet_Icc) have hq' : (gaussianMeasure 0 1).real (Icc (-R) R) + (gaussianMeasure 0 1).real (Icc (-R) R)ᶜ = 1 := by simpa [MeasureTheory.measureReal_def] using hq rw [show (gaussianMeasure 0 1).real (Icc (-R) R)ᶜ = 1 - (gaussianMeasure 0 1).real (Icc (-R) R) by linarith [hq']] apply hsub.congr' filter_upwards with n have hn := MeasureTheory.measureReal_add_measureReal_compl (μ := μ n) (hTmeas n (show MeasurableSet (Icc (-R) R) from measurableSet_Icc)) have hn' : (μ n).real (T n ⁻¹' Icc (-R) R) + (μ n).real (T n ⁻¹' Icc (-R) R)ᶜ = 1 := by simpa [MeasureTheory.measureReal_def] using hn rw [show {z | T n z ∈ Icc (-R) R} = T n ⁻¹' Icc (-R) R by rfl, show {z | T n z ∉ Icc (-R) R} = (T n ⁻¹' Icc (-R) R)ᶜ by rfl] linarith [hn'] refine ⟨R + 1, by linarith, ?_⟩ have hev := hcompl.eventually_lt_const (by have h2η : 2 * η₀ < η := by dsimp [η₀] have hm := min_le_left (η / 8) (1 / 8) linarith exact lt_of_le_of_lt hcomp h2η) filter_upwards [hev] with n hn apply lt_of_le_of_lt (MeasureTheory.measureReal_mono (h₂ := measure_ne_top _ _) ?_) hn intro z hz simp only [mem_Icc, not_and_or, not_le] change R + 1 ≤ |T n z| at hz rcases (le_abs.mp hz) with hz | hz · exact inr (by linarith) · exact inl (by linarith)
CausalSmith.Stat.LdpAteEfficiencySurface.varyingLaw_tight_of_standardNormal_cdf · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotStudentizationSupport.lean:21
theorem pilotWaldPivot_approx_standardizedScaledError

Plug-in variance consistency and the Gaussian CDF limit imply that the fallback-studentized pilot pivot is asymptotically indistinguishable from the oracle-standardized scaled error. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Wald Pivot approx standardized Scaled Error.

Formal statement
select :
shared
cutoff :
ℝ
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hstandardCDF :
∀ x : ℝ,
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / sqrt (Vstar θ p ε) ≤ x}) atTop (nhds ((gaussianMeasure 0 1).real (Iic x)))
hvhat :
∀ r : ℝ
if
0 < r
then
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | r ≤ |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)
δ :
ℝ
0 < δ
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | δ ≤ |pilotWaldPivot select cutoff θ p ε m hselect hp hε n z - scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / sqrt (Vstar θ p ε)|}) atTop (nhds 0)
Proof (Lean source)
lemma pilotWaldPivot_approx_standardizedScaledError (cutoff : ℝ) (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hstandardCDF : ∀ x : ℝ, Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / Real.sqrt (Vstar θ p ε) ≤ x}) atTop (nhds ((gaussianMeasure 0 1).real (Iic x)))) (hvhat : ∀ r : ℝ, 0 < r → Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | r ≤ |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)) : ∀ δ : ℝ, 0 < δ → Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | δ ≤ |pilotWaldPivot select cutoff θ p ε m hselect hp hε n z - scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / Real.sqrt (Vstar θ p ε)|}) atTop (nhds 0) := by let μ : ∀ n, Measure (Transcript (pilotOutputFamily n)) := fun n => transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n let T : ∀ n, Transcript (pilotOutputFamily n) → ℝ := fun n z => scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / Real.sqrt (Vstar θ p ε) let _ (n : ℕ) : IsProbabilityMeasure (μ n) := transcriptLaw_isProbability _ θ p hp hθ n have hTmeas (n : ℕ) : Measurable (T n) := measurable_of_finite _ have hV : 0 < Vstar θ p ε := inv_pos.mpr (Jstar_pos_interior θ p ε hp hθ hε) let g : ℝ → ℝ := fun v => Real.sqrt (Vstar θ p ε) / Real.sqrt v have hg : ContinuousAt g (Vstar θ p ε) := by dsimp [g] exact continuousAt_const.div₀ Real.continuous_sqrt.continuousAt (ne_of_gt (Real.sqrt_pos.2 hV)) have hgV : g (Vstar θ p ε) = 1 := by dsimp [g] field_simp [ne_of_gt (Real.sqrt_pos.2 hV)] intro δ hδ rw [Metric.tendsto_atTop] intro ζ hζ obtain ⟨M, hM, hMtight⟩ := varyingLaw_tight_of_standardNormal_cdf μ T hTmeas hstandardCDF (ζ / 2) (by linarith) obtain ⟨r₀, hr₀, hgr₀⟩ := (Metric.continuousAt_iff.mp hg) (δ / M) (div_pos hδ hM) let r : ℝ := min (r₀ / 2) (Vstar θ p ε / 2) have hr : 0 < r := lt_min (half_pos hr₀) (half_pos hV) have hrV : r < Vstar θ p ε := (min_le_right _ _).trans_lt (half_lt_self hV) have hvarEv := (hvhat r hr).eventually_lt_const (half_pos hζ) refine Filter.eventually_atTop.1 ?_ filter_upwards [hMtight, hvarEv] with n htight hvar rw [Real.dist_eq, sub_zero, abs_of_nonneg MeasureTheory.measureReal_nonneg] have hsubset : {z | δ ≤ |pilotWaldPivot select cutoff θ p ε m hselect hp hε n z - T n z|} ⊆ {z | r ≤ |VhatStar p ε m (select) z - Vstar θ p ε|} ∪ {z | M ≤ |T n z|} := by intro z hz by_contra hbad simp only [mem_union, mem_ofPred_eq, not_or, not_le] at hbad have hVn : 0 < VhatStar p ε m (select) z := by linarith [abs_lt.mp hbad.1 |>.1] have hdist : dist (VhatStar p ε m (select) z) (Vstar θ p ε) < r₀ := by rw [Real.dist_eq] exact hbad.1.trans_le (min_le_left _ _ |>.trans (half_le_self hr₀.le)) have hgclose := hgr₀ hdist rw [Real.dist_eq, hgV] at hgclose have hpivot : pilotWaldPivot select cutoff θ p ε m hselect hp hε n z = T n z * g (VhatStar p ε m (select) z) := by have hlocal : localAlternative θ 0 n = θ := by funext k simp [localAlternative] simp [pilotWaldPivot, waldFallbackPivot, ne_of_gt hVn, T, g, scaledError, hlocal] field_simp [ne_of_gt (Real.sqrt_pos.2 hV), ne_of_gt (Real.sqrt_pos.2 hVn)] change δ ≤ |pilotWaldPivot select cutoff θ p ε m hselect hp hε n z - T n z| at hz rw [hpivot, show T n z * g (VhatStar p ε m (select) z) - T n z = T n z * (g (VhatStar p ε m (select) z) - 1) by ring, abs_mul] at hz have hprod : |T n z| * |g (VhatStar p ε m (select) z) - 1| < δ := by calc _ ≤ M * |g (VhatStar p ε m (select) z) - 1| := mul_le_mul_of_nonneg_right hbad.2.le (abs_nonneg _) _ < M * (δ / M) := mul_lt_mul_of_pos_left hgclose hM _ = δ := by field_simp exact (not_lt_of_ge hz) hprod have hmono := MeasureTheory.measureReal_mono (μ := μ n) (h₂ := measure_ne_top _ _) hsubset have hunion := MeasureTheory.measureReal_union_le (μ := μ n) {z | r ≤ |VhatStar p ε m (select) z - Vstar θ p ε|} {z | M ≤ |T n z|} exact lt_of_le_of_lt (hmono.trans hunion) (by linarith)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotWaldPivot_approx_standardizedScaledError · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotStudentizationSupport.lean:106
theorem pilot_wald_coverage_of_standardized_cdf_and_VhatStar_consistent

The actual standardized-error CDF limit and consistent VhatStar imply the private-pilot Wald coverage limit, with the zero-variance fallback handled inside the proved Slutsky approximation. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot wald coverage of standardized cdf and Vhat Star consistent.

Formal statement
select :
shared
cutoff :
ℝ
hcutoff :
0 < cutoff
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hstandardCDF :
∀ x : ℝ,
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / sqrt (Vstar θ p ε) ≤ x}) atTop (nhds ((gaussianMeasure 0 1).real (Iic x)))
hvhat :
∀ r : ℝ
if
0 < r
then
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | r ≤ |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)
Tendsto (fun n => ((transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | |(pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ| ≤ cutoff * sqrt (VhatStar p ε m (select) z / n)}).toReal) atTop (nhds ((gaussianMeasure 0 1).real (Icc (-cutoff) cutoff)))
Proof (Lean source)
lemma pilot_wald_coverage_of_standardized_cdf_and_VhatStar_consistent (cutoff : ℝ) (hcutoff : 0 < cutoff) (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hstandardCDF : ∀ x : ℝ, Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / sqrt (Vstar θ p ε) ≤ x}) atTop (nhds ((gaussianMeasure 0 1).real (Iic x)))) (hvhat : ∀ r : ℝ, 0 < r → Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | r ≤ |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)) : Tendsto (fun n => ((transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | |(pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ| ≤ cutoff * sqrt (VhatStar p ε m (select) z / n)}).toReal) atTop (nhds ((gaussianMeasure 0 1).real (Icc (-cutoff) cutoff))) := by apply pilot_wald_coverage_of_standardized_cdf_and_approx select cutoff hcutoff θ p ε m hselect hp hθ hε · exact pilotWaldPivot_approx_standardizedScaledError select cutoff θ p ε m hselect hp hθ hε hstandardCDF hvhat · exact hstandardCDF
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_wald_coverage_of_standardized_cdf_and_VhatStar_consistent · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotStudentizationSupport.lean:210
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotUniformTails 1 declarations Uniform squared tails for the private-pilot estimator — finite-product fourth moments.

Uniform squared tails for the private-pilot estimator — finite-product fourth moments.

theorem pilot_scaledError_uniform_squared_tails

The private-pilot scaled error has uniformly vanishing squared tails over bounded local directions. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot scaled Error uniform squared tails.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hsub :
H :
ℝ
0 < H
Tendsto (fun M : ℕ => limsup (fun n => sSup {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ n H, u = ∫⁻ z, ofReal ((scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z) ^ 2 * if M < |scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z| then 1 else 0) ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n}) atTop) atTop (nhds 0)
Proof (Lean source)
lemma pilot_scaledError_uniform_squared_tails (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hsub : PilotSublinear m) : ∀ H : ℝ, 0 < H → Tendsto (fun M : ℕ => limsup (fun n => sSup {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ n H, u = ∫⁻ z, ofReal ((scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z) ^ 2 * if M < |scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z| then 1 else 0) ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n}) Filter.atTop) Filter.atTop (nhds 0) := by intro H _hH let C : ℝ := 16 * (2 * pilotPhiUpper p ε) ^ 4 let F : ℕ → ℝ≥0∞ := fun M => limsup (fun n => sSup {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ n H, u = ∫⁻ z, ofReal ((scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z) ^ 2 * if M < |scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z| then 1 else 0) ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n}) Filter.atTop let D : ℕ → ℝ≥0∞ := fun M => ofReal C / ofReal ((M : ℝ) ^ 2) have hratio : ∀ᶠ n : ℕ in Filter.atTop, (n : ℝ) / (adaptiveMainSize m n : ℝ) ≤ 2 := by have ht := adaptive_mainScale_tendsto_one m hsub exact ((tendsto_order.1 ht).2 2 (by norm_num)).mono fun _ hn => hn.le have hn2 : ∀ᶠ n : ℕ in Filter.atTop, 2 ≤ n := Filter.eventually_atTop.2 ⟨2, fun _ hn => hn⟩ have hFD : ∀ᶠ M : ℕ in Filter.atTop, F M ≤ D M := by filter_upwards [Filter.eventually_gt_atTop 0] with M hM dsimp only [F, D] apply Filter.limsup_le_of_le (hf := by change ∃ b : ℝ≥0∞, ∀ a, (∀ᶠ n : ℕ in Filter.atTop, sSup {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ n H, u = ∫⁻ z, ofReal ((scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z) ^ 2 * if M < |scaledError (pilotEstimator p ε m select hselect hp hε) θ h n z| then 1 else 0) ∂transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n} ≤ a) → b ≤ a exact ⟨0, fun _ _ => bot_le⟩) filter_upwards [hratio, hn2] with n hnratio hn apply sSup_le intro u hu obtain ⟨h, hh, rfl⟩ := hu have hfour := pilot_scaledError_fourth_lintegral_le select θ h p ε m hselect hp hθ hε hsub n hn hh.2 hnratio exact squaredTail_lintegral_le_of_fourth (transcriptLaw (pilotEstimator p ε m select hselect hp hε) (localAlternative θ h n) p n) (scaledError (pilotEstimator p ε m select hselect hp hε) θ h n) (M : ℝ) C (by exact_mod_cast hM) hfour have hD : Tendsto D Filter.atTop (nhds 0) := by have hcast : Tendsto (fun M : ℕ => (M : ℝ)) Filter.atTop Filter.atTop := tendsto_natCast_atTop_atTop have hden : Tendsto (fun M : ℕ => (M : ℝ) * (M : ℝ)) Filter.atTop Filter.atTop := by rw [Filter.tendsto_atTop] intro b filter_upwards [(Filter.tendsto_atTop.1 hcast) b, Filter.eventually_gt_atTop 0] with M hb hM have hMreal : 1 ≤ (M : ℝ) := by exact_mod_cast hM nlinarith have hreal : Tendsto (fun M : ℕ => C / ((M : ℝ) ^ 2)) Filter.atTop (nhds 0) := by simpa only [pow_two] using tendsto_const_nhds.div_atTop hden have heq : (fun M : ℕ => ofReal (C / ((M : ℝ) ^ 2))) =ᶠ[ Filter.atTop] D := by filter_upwards [Filter.eventually_gt_atTop 0] with M hM dsimp only [D] rw [ENNReal.ofReal_div_of_pos] positivity simpa using (ENNReal.tendsto_ofReal hreal).congr' heq exact tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hD (Filter.Eventually.of_forall fun _ => bot_le) hFD
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_scaledError_uniform_squared_tails · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotUniformTails.lean:524
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotVarianceConsistency 5 declarations The arguments here use only finite-product second-moment bounds.

Consistency of the pilot plug-in variance

The arguments here use only finite-product second-moment bounds. In particular, they are independent of the triangular-array central limit theorem.

theorem eventProbability_empiricalVariance_sub_oneSecond_le

A finite-row Chebyshev bound for empirical variance around its own one-coordinate second moment. For the displayed inputs and conditions, the stated result follows. Under the stated assumptions, the event Probability empirical Variance sub one Second le.

Formal statement
Y :
Type u_1
shared
M :
shared
n :
ℕ
hn :
0 < M.N n
δ :
ℝ
hδ :
0 < δ
M.eventProbability n (fun ys => δ ≤ |M.empiricalVariance n ys - M.oneSecond n|)
≤ M.B ^ 4 / (M.N n : ℝ) / (δ / 2) ^ 2 + M.B ^ 2 / (M.N n : ℝ) / (δ / 2)
Proof (Lean source)
theorem eventProbability_empiricalVariance_sub_oneSecond_le (n : ℕ) (hn : 0 < M.N n) (δ : ℝ) (hδ : 0 < δ) : M.eventProbability n (fun ys => δ ≤ |M.empiricalVariance n ys - M.oneSecond n|) ≤ M.B ^ 4 / (M.N n : ℝ) / (δ / 2) ^ 2 + M.B ^ 2 / (M.N n : ℝ) / (δ / 2) := by classical have hhalf : 0 < δ / 2 := half_pos hδ have hsqrt : 0 < sqrt (δ / 2) := Real.sqrt_pos.2 hhalf rw [M.eventProbability_eq_designPr] have hmono : (M.productDesign n).Pr (fun ys => δ ≤ |M.empiricalVariance n ys - M.oneSecond n|) ≤ (M.productDesign n).Pr (fun ys => δ / 2 ≤ |M.empiricalSecond n ys - M.oneSecond n| ∨ sqrt (δ / 2) ≤ |M.empiricalMean n ys|) := by apply (M.productDesign n).Pr_mono intro ys hys by_contra hc push Not at hc obtain ⟨hsecond, hmean⟩ := hc have hmean_sq : (M.empiricalMean n ys) ^ 2 < δ / 2 := by have hpow := (sq_lt_sq₀ (abs_nonneg (M.empiricalMean n ys)) hsqrt.le).2 hmean rw [sq_abs, Real.sq_sqrt hhalf.le] at hpow exact hpow have htri : |M.empiricalVariance n ys - M.oneSecond n| ≤ |M.empiricalSecond n ys - M.oneSecond n| + (M.empiricalMean n ys) ^ 2 := by rw [empiricalVariance] have heq : M.empiricalSecond n ys - (M.empiricalMean n ys) ^ 2 - M.oneSecond n = (M.empiricalSecond n ys - M.oneSecond n) - (M.empiricalMean n ys) ^ 2 := by ring rw [heq] calc _ ≤ |M.empiricalSecond n ys - M.oneSecond n| + |(M.empiricalMean n ys) ^ 2| := abs_sub _ _ _ = _ := by rw [abs_of_nonneg (sq_nonneg (M.empiricalMean n ys))] linarith have hEsecond : (M.productDesign n).E (M.empiricalSecond n) = M.oneSecond n := M.expect_empiricalSecond n hn have hsecondCheb := (M.productDesign n).chebyshev (M.empiricalSecond n) hhalf rw [hEsecond] at hsecondCheb have hsecondVar : (M.productDesign n).Var (M.empiricalSecond n) = M.expect n (fun ys => (M.empiricalSecond n ys - M.oneSecond n) ^ 2) := by rw [show (M.productDesign n).Var (M.empiricalSecond n) = M.expect n (fun ys => (M.empiricalSecond n ys - (M.productDesign n).E (M.empiricalSecond n)) ^ 2) from rfl, hEsecond] rw [hsecondVar] at hsecondCheb have hsecondBound : (M.productDesign n).Pr (fun ys => δ / 2 ≤ |M.empiricalSecond n ys - M.oneSecond n|) ≤ M.B ^ 4 / (M.N n : ℝ) / (δ / 2) ^ 2 := hsecondCheb.trans (div_le_div_of_nonneg_right (M.empiricalSecond_mse_le n hn) (sq_nonneg _)) have hEmean : (M.productDesign n).E (M.empiricalMean n) = 0 := by change M.expect n (M.empiricalMean n) = 0 simp only [expect, empiricalMean, scoreSum, Finset.mul_sum] rw [Finset.sum_comm] have hcoord (i : Fin (M.N n)) : ∑ ys : Fin (M.N n) → Y, M.mass n ys * M.f n (ys i) = 0 := by change M.expect n (fun ys => M.f n (ys i)) = 0 rw [M.expect_coordinate] exact M.centered n calc (∑ i : Fin (M.N n), ∑ ys : Fin (M.N n) → Y, M.mass n ys * ((M.N n : ℝ)⁻¹ * M.f n (ys i))) = ∑ i : Fin (M.N n), (M.N n : ℝ)⁻¹ * (∑ ys : Fin (M.N n) → Y, M.mass n ys * M.f n (ys i)) := by apply Finset.sum_congr rfl intro i _ rw [Finset.mul_sum] apply Finset.sum_congr rfl intro ys _ ring _ = 0 := by simp [hcoord] have hmeanCheb := (M.productDesign n).chebyshev (M.empiricalMean n) hsqrt rw [hEmean] at hmeanCheb simp only [sub_zero, Real.sq_sqrt hhalf.le] at hmeanCheb have hmeanVar : (M.productDesign n).Var (M.empiricalMean n) = M.expect n (fun ys => (M.empiricalMean n ys) ^ 2) := by rw [show (M.productDesign n).Var (M.empiricalMean n) = M.expect n (fun ys => (M.empiricalMean n ys - (M.productDesign n).E (M.empiricalMean n)) ^ 2) from rfl, hEmean] simp rw [hmeanVar] at hmeanCheb have hmeanBound : (M.productDesign n).Pr (fun ys => sqrt (δ / 2) ≤ |M.empiricalMean n ys|) ≤ M.B ^ 2 / (M.N n : ℝ) / (δ / 2) := hmeanCheb.trans (div_le_div_of_nonneg_right (M.empiricalMean_mse_le n hn) hhalf.le) calc _ ≤ (M.productDesign n).Pr (fun ys => δ / 2 ≤ |M.empiricalSecond n ys - M.oneSecond n|) + (M.productDesign n).Pr (fun ys => sqrt (δ / 2) ≤ |M.empiricalMean n ys|) := hmono.trans (Pr_or_le (M.productDesign n) _ _) _ ≤ M.B ^ 4 / (M.N n : ℝ) / (δ / 2) ^ 2 + M.B ^ 2 / (M.N n : ℝ) / (δ / 2) := add_le_add hsecondBound hmeanBound
Causalean.Stat.CLT.FiniteIidTriangular.RowModel.eventProbability_empiricalVariance_sub_oneSecond_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotVarianceConsistency.lean:24
def pilotConditionalVarianceBadMass

Conditional main-row probability that the encoded empirical variance misses the oracle variance. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The pilot Conditional Variance Bad Mass is determined by the displayed parameters.

Definition (Lean source)
select :
shared
p ε δ :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
u :
Fin (m n) → Fin 4
pilotConditionalVarianceBadMass select θ p ε δ m hselect hp hε hmn u :
ℝ
η :
fun _ : ℕ => pilotAdaptivePrefixTheta p ε m hmn u
∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ (fun _ => 0) η p ε m hselect hp hε n v * if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) η p ε m hselect hp hε n v
- Vstar θ p ε| then 1 else 0
CausalSmith.Stat.LdpAteEfficiencySurface.pilotConditionalVarianceBadMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotVarianceConsistency.lean:144
def pilotVarianceBadMass

Prefix mixture of the conditional bad-variance probabilities. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The pilot Variance Bad Mass is determined by the displayed parameters.

Definition (Lean source)
select :
shared
p ε δ :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
pilotVarianceBadMass select θ p ε δ m hselect hp hε hmn :
ℝ
∑ u : Fin (m n) → Fin 4, pilotPrefixWeight θ p ε m n u * pilotConditionalVarianceBadMass select θ p ε δ m hselect hp hε hmn u
theorem pilotConditionalVarianceBadMass_le

The finite-product Chebyshev bound, specialized to one genuine adaptive main row and centered at its population variance. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Conditional Variance Bad Mass le.

Formal statement
select :
shared
p ε δ :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hsub :
n :
ℕ
hn :
2 ≤ n
hmn :
m n ≤ n
u :
Fin (m n) → Fin 4
hδ :
0 < δ
hclose :
|adaptiveScoreVariance select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε
- Vstar θ p ε| < δ / 2
pilotConditionalVarianceBadMass select θ p ε δ m hselect hp hε hmn u
≤ (2 * pilotPhiUpper p ε) ^ 4 / (adaptiveMainSize m n : ℝ) / (δ / 4) ^ 2
+ (2 * pilotPhiUpper p ε) ^ 2 / (adaptiveMainSize m n : ℝ) / (δ / 4)
Proof (Lean source)
lemma pilotConditionalVarianceBadMass_le (θ : TrialParameter) (p ε δ : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hsub : PilotSublinear m) {n : ℕ} (hn : 2 ≤ n) (hmn : m n ≤ n) (u : Fin (m n) → Fin 4) (hδ : 0 < δ) (hclose : |adaptiveScoreVariance select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε - Vstar θ p ε| < δ / 2) : pilotConditionalVarianceBadMass select θ p ε δ m hselect hp hε hmn u ≤ (2 * pilotPhiUpper p ε) ^ 4 / (adaptiveMainSize m n : ℝ) / (δ / 4) ^ 2 + (2 * pilotPhiUpper p ε) ^ 2 / (adaptiveMainSize m n : ℝ) / (δ / 4) := by classical let η₀ := pilotAdaptivePrefixTheta p ε m hmn u let η : ℕ → TrialParameter := fun k => if k = n then η₀ else θ have hη₀ : InteriorMeans η₀ := by exact pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0)) have hη : ∀ k, InteriorMeans (η k) := by intro k simp only [η] split_ifs <;> assumption have hηlim : Tendsto η atTop (nhds θ) := by apply tendsto_const_nhds.congr' filter_upwards [eventually_gt_atTop n] with k hk simp [η, ne_of_gt hk] let M : RowModel (Fin 14) := { N := adaptiveMainSize m w := adaptivePilotRowMass select θ (fun _ => 0) η p ε hselect hp hε f := adaptivePilotRowScore select θ (fun _ => 0) η p ε hselect hp hε B := 2 * pilotPhiUpper p ε v₀ := adaptivePilotLimitVariance select θ p ε hselect hp hθ hε mass_nonneg := adaptivePilotRowMass_nonneg select θ (fun _ => 0) η p ε hselect hp hθ hη hε mass_one := adaptivePilotRowMass_sum select θ (fun _ => 0) η p ε hselect hp hη hε centered := adaptivePilotRowScore_centered select θ (fun _ => 0) η p ε hselect hp hη hε bound := adaptivePilotRowScore_abs_le select θ (fun _ => 0) η p ε hselect hp hθ hη hε variance_tendsto := adaptivePilotRow_variance_tendsto select θ (fun _ => 0) η p ε hselect hp hθ hη hε hηlim variance_pos := adaptivePilotLimitVariance_pos select θ p ε hselect hp hθ hε length_tendsto := adaptiveMainSize_tendsto_atTop m hsub } have hN : 0 < M.N n := by change 0 < adaptiveMainSize m n rw [adaptiveMainSize, adaptivePilotSize_eq m hsub hn] exact Nat.sub_pos_of_lt (hsub.2 n hn).2 have hmain : adaptiveMainSize m n = n - m n := by simp [adaptiveMainSize, adaptivePilotSize_eq m hsub hn] have hzero : adaptiveTrueParam θ (fun _ => 0) n = θ := by have hlocal : localAlternative θ (fun _ => 0) n = θ := by funext k simp [localAlternative] rw [adaptiveTrueParam_eq_localAlternative] · exact hlocal · simpa only [hlocal] using hθ have honeSecond : M.oneSecond n = adaptiveScoreVariance select θ η₀ p ε := by change (∑ s : Fin 14, adaptivePilotRowMass select θ (fun _ => 0) η p ε hselect hp hε n s * (adaptivePilotRowScore select θ (fun _ => 0) η p ε hselect hp hε n s) ^ 2) = _ rw [adaptivePilotRow_secondMoment_eq select θ (fun _ => 0) η p ε hselect hp hη hε n, hzero] simp only [η, if_pos, η₀] have hrow (v : Fin (adaptiveMainSize m n) → Fin 14) : M.empiricalVariance n v = adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => η₀) p ε m hselect hp hε n v := by simp only [M, RowModel.empiricalVariance, RowModel.empiricalSecond, RowModel.empiricalMean, RowModel.scoreSum, adaptivePilotRowEmpiricalVariance, adaptivePilotRowEmpiricalSecond, adaptivePilotRowEmpiricalMean, adaptivePilotRowScore, η] simp have hmass (v : Fin (adaptiveMainSize m n) → Fin 14) : adaptivePilotRowProductMass select θ (fun _ => 0) (fun _ => η₀) p ε m hselect hp hε n v = M.mass n v := by simp only [M, RowModel.mass, adaptivePilotRowProductMass, adaptivePilotRowMass, η, if_pos] have hmono : pilotConditionalVarianceBadMass select θ p ε δ m hselect hp hε hmn u ≤ (M.productDesign n).Pr (fun v => δ / 2 ≤ |M.empiricalVariance n v - M.oneSecond n|) := by unfold pilotConditionalVarianceBadMass dsimp only rw [Pr, M.productDesign_expect] unfold RowModel.expect ind change (∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ (fun _ => 0) (fun _ => η₀) p ε m hselect hp hε n v * (if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => η₀) p ε m hselect hp hε n v - Vstar θ p ε| then 1 else 0)) ≤ _ apply Finset.sum_le_sum intro v _ rw [hmass v] have hind : (if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => η₀) p ε m hselect hp hε n v - Vstar θ p ε| then (1 : ℝ) else 0) ≤ if δ / 2 ≤ |M.empiricalVariance n v - M.oneSecond n| then (1 : ℝ) else 0 := by by_cases hv : δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => η₀) p ε m hselect hp hε n v - Vstar θ p ε| · have hgood : δ / 2 ≤ |M.empiricalVariance n v - M.oneSecond n| := by rw [hrow v, honeSecond] have htri := abs_sub_le (adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => η₀) p ε m hselect hp hε n v) (adaptiveScoreVariance select θ η₀ p ε) (Vstar θ p ε) by_contra hc have hc' : |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => η₀) p ε m hselect hp hε n v - adaptiveScoreVariance select θ η₀ p ε| < δ / 2 := lt_of_not_ge hc linarith simp [hv, hgood] · by_cases hg : δ / 2 ≤ |M.empiricalVariance n v - M.oneSecond n| · simp [hv, hg] · simp [hv, hg] exact mul_le_mul_of_nonneg_left hind (M.mass_nonnegative n v) rw [← M.eventProbability_eq_designPr] at hmono have hbound := M.eventProbability_empiricalVariance_sub_oneSecond_le n hN (δ / 2) (half_pos hδ) have hrhs : M.B ^ 4 / (M.N n : ℝ) / (δ / 2 / 2) ^ 2 + M.B ^ 2 / (M.N n : ℝ) / (δ / 2 / 2) = (2 * pilotPhiUpper p ε) ^ 4 / (adaptiveMainSize m n : ℝ) / (δ / 4) ^ 2 + (2 * pilotPhiUpper p ε) ^ 2 / (adaptiveMainSize m n : ℝ) / (δ / 4) := by dsimp only [M] ring exact (hmono.trans hbound).trans_eq hrhs
CausalSmith.Stat.LdpAteEfficiencySurface.pilotConditionalVarianceBadMass_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotVarianceConsistency.lean:166
theorem pilotVarianceBadMass_tendsto_zero

Averaging the uniform finite-row bound over the genuine pilot prefixes gives vanishing bad variance mass. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Variance Bad Mass tendsto zero.

Formal statement
select :
shared
p ε δ :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiv :
hsub :
hδ :
0 < δ
Tendsto (fun n => if hn : 2 ≤ n then pilotVarianceBadMass select θ p ε δ m hselect hp hε (le_of_lt (hsub.2 n hn).2) else 0) atTop (nhds 0)
Proof (Lean source)
lemma pilotVarianceBadMass_tendsto_zero (θ : TrialParameter) (p ε δ : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) (hδ : 0 < δ) : Tendsto (fun n => if hn : 2 ≤ n then pilotVarianceBadMass select θ p ε δ m hselect hp hε (le_of_lt (hsub.2 n hn).2) else 0) atTop (nhds 0) := by obtain ⟨R, hR, hcont⟩ := adaptiveScoreVariance_uniform_near_diag select θ p ε hselect hp hθ hε (δ / 2) (half_pos hδ) let M₀ := adaptiveInteriorMargin θ have hM₀ : 0 < M₀ := adaptiveInteriorMargin_pos θ hθ let r := min (R / 2) (M₀ / 4) have hr : 0 < r := by dsimp [r]; positivity have hrR : r ≤ R / 2 := min_le_left _ _ have hrM : r ≤ M₀ / 4 := min_le_right _ _ let rowEnvelope : ℕ → ℝ := fun n => (2 * pilotPhiUpper p ε) ^ 4 / (adaptiveMainSize m n : ℝ) / (δ / 4) ^ 2 + (2 * pilotPhiUpper p ε) ^ 2 / (adaptiveMainSize m n : ℝ) / (δ / 4) have hrowEnv : Tendsto rowEnvelope atTop (nhds 0) := by have hlen := adaptiveMainSize_tendsto_atTop m hsub have hfirst := (tendsto_const_div_atTop_nhds_zero_nat ((2 * pilotPhiUpper p ε) ^ 4)).comp hlen have hsecond := (tendsto_const_div_atTop_nhds_zero_nat ((2 * pilotPhiUpper p ε) ^ 2)).comp hlen dsimp only [rowEnvelope] simpa only [Function.comp_def, zero_div, add_zero] using (hfirst.div_const ((δ / 4) ^ 2)).add (hsecond.div_const (δ / 4)) have hreg := pilotRegularizer_eventually_lt m hdiv (M₀ / 2) (by positivity) have hbadEnv := pilotBadMassEnvelope_tendsto_zero p ε r m hp hε hr hdiv have hbound : ∀ᶠ n in atTop, (if hn : 2 ≤ n then pilotVarianceBadMass select θ p ε δ m hselect hp hε (le_of_lt (hsub.2 n hn).2) else 0) ≤ pilotBadMassEnvelope p ε r m n + rowEnvelope n := by filter_upwards [eventually_ge_atTop 2, hreg] with n hn hnreg let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 rw [dif_pos hn] have hproof : le_of_lt (hsub.2 n hn).2 = hmn := Subsingleton.elim _ _ rw [show le_of_lt (hsub.2 n hn).2 = hmn from hproof] have hmpos : 0 < m n := lt_of_lt_of_le Nat.zero_lt_one (hsub.2 n hn).1 have hM0l : M₀ ≤ θ 0 := (min_le_left _ _).trans (min_le_left _ _) have hM0r : M₀ ≤ 1 - θ 0 := (min_le_left _ _).trans (min_le_right _ _) have hM1l : M₀ ≤ θ 1 := (min_le_right _ _).trans (min_le_left _ _) have hM1r : M₀ ≤ 1 - θ 1 := (min_le_right _ _).trans (min_le_right _ _) have hδ0l : (m n + 2 : ℝ)⁻¹ + r ≤ θ 0 := by dsimp only [M₀] at hnreg hrM hM0l linarith have hδ0r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 0 := by dsimp only [M₀] at hnreg hrM hM0r linarith have hδ1l : (m n + 2 : ℝ)⁻¹ + r ≤ θ 1 := by dsimp only [M₀] at hnreg hrM hM1l linarith have hδ1r : (m n + 2 : ℝ)⁻¹ + r ≤ 1 - θ 1 := by dsimp only [M₀] at hnreg hrM hM1r linarith have hbad := pilotPrefixBadMass_le select θ p ε r m hselect hp hθ hε hr hmn hmpos hδ0l hδ0r hδ1l hδ1r have hw (u : Fin (m n) → Fin 4) : 0 ≤ pilotPrefixWeight θ p ε m n u := pilotPrefixWeight_nonneg θ p ε m n hp hθ u have hcond (u : Fin (m n) → Fin 4) : pilotConditionalVarianceBadMass select θ p ε δ m hselect hp hε hmn u ≤ (if r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ 0| ∨ r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ 1| then 1 else rowEnvelope n) := by by_cases hu : r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ 0| ∨ r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ 1| · rw [if_pos hu] let η := fun _ : ℕ => pilotAdaptivePrefixTheta p ε m hmn u have hη : ∀ k, InteriorMeans (η k) := fun _ => pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0)) unfold pilotConditionalVarianceBadMass dsimp only calc _ ≤ ∑ v : Fin (adaptiveMainSize m n) → Fin 14, adaptivePilotRowProductMass select θ (fun _ => 0) η p ε m hselect hp hε n v := by apply Finset.sum_le_sum intro v _ apply mul_le_of_le_one_right · exact adaptivePilotRowProductMass_nonneg select θ (fun _ => 0) η p ε m hselect hp hθ hη hε n v · split_ifs <;> norm_num _ = 1 := adaptivePilotRowProductMass_sum select θ (fun _ => 0) η p ε m hselect hp hη hε n · rw [if_neg hu] push Not at hu have hηdist : dist (pilotAdaptivePrefixTheta p ε m hmn u) θ < R := by rw [dist_pi_lt_iff hR] intro k have hrltR : r < R := lt_of_le_of_lt hrR (by linarith) fin_cases k · rw [Real.dist_eq] change |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ 0| < R linarith [hu.1] · rw [Real.dist_eq] change |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ 1| < R linarith [hu.2] have hclose : |adaptiveScoreVariance select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε - Vstar θ p ε| < δ / 2 := by exact hcont θ (pilotAdaptivePrefixTheta p ε m hmn u) (by simpa using hR) hηdist exact pilotConditionalVarianceBadMass_le select θ p ε δ m hselect hp hθ hε hsub hn hmn u hδ hclose unfold pilotVarianceBadMass calc _ ≤ ∑ u : Fin (m n) → Fin 4, pilotPrefixWeight θ p ε m n u * (if r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ 0| ∨ r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ 1| then 1 else rowEnvelope n) := Finset.sum_le_sum fun u _ => mul_le_mul_of_nonneg_left (hcond u) (hw u) _ ≤ ∑ u : Fin (m n) → Fin 4, pilotPrefixWeight θ p ε m n u * ((if r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 0 - θ 0| ∨ r ≤ |pilotAdaptivePrefixTheta p ε m hmn u 1 - θ 1| then 1 else 0) + rowEnvelope n) := by apply Finset.sum_le_sum intro u _ apply mul_le_mul_of_nonneg_left _ (hw u) have hrow0 : 0 ≤ rowEnvelope n := by dsimp only [rowEnvelope] positivity split_ifs <;> linarith _ = pilotPrefixBadMass θ p ε r m hmn + rowEnvelope n := by simp_rw [mul_add] rw [Finset.sum_add_distrib, ← Finset.sum_mul, pilotPrefixWeight_sum θ p ε m n, one_mul] rfl _ ≤ pilotBadMassEnvelope p ε r m n + rowEnvelope n := add_le_add hbad le_rfl have hnonneg : ∀ n, 0 ≤ (if hn : 2 ≤ n then pilotVarianceBadMass select θ p ε δ m hselect hp hε (le_of_lt (hsub.2 n hn).2) else 0) := by intro n by_cases hn : 2 ≤ n · rw [dif_pos hn] let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 have hproof : le_of_lt (hsub.2 n hn).2 = hmn := Subsingleton.elim _ _ rw [show le_of_lt (hsub.2 n hn).2 = hmn from hproof] unfold pilotVarianceBadMass pilotConditionalVarianceBadMass exact Finset.sum_nonneg fun u _ => mul_nonneg (pilotPrefixWeight_nonneg θ p ε m n hp hθ u) (Finset.sum_nonneg fun v _ => mul_nonneg (adaptivePilotRowProductMass_nonneg select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hθ (fun _ => pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0))) hε n v) (by split_ifs <;> positivity)) · simp [hn] exact squeeze_zero' (Eventually.of_forall hnonneg) hbound (by simpa only [add_zero] using hbadEnv.add hrowEnv)
CausalSmith.Stat.LdpAteEfficiencySurface.pilotVarianceBadMass_tendsto_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotVarianceConsistency.lean:302
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotVhatConsistency 5 declarations Transcript-law wrapper for pilot variance consistency

Transcript-law wrapper for pilot variance consistency

theorem finite_empiricalVariance_cast_eq

Empirical variance is invariant under transport along an equality of finite row lengths. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
N K :
ℕ
h :
N = K
q :
Fin K → ℝ
(N : ℝ)⁻¹ * ∑ i : Fin N, (q (cast h i)) ^ 2
- ((N : ℝ)⁻¹ * ∑ i : Fin N, q (cast h i)) ^ 2
= (K : ℝ)⁻¹ * ∑ j : Fin K, (q j) ^ 2 - ((K : ℝ)⁻¹ * ∑ j : Fin K, q j) ^ 2
Proof (Lean source)
-- keep: reusable finite-pilot construction, law, localization, or limit API for related adaptive procedures lemma finite_empiricalVariance_cast_eq {N K : ℕ} (h : N = K) (q : Fin K → ℝ) : (N : ℝ)⁻¹ * ∑ i : Fin N, (q (cast h i)) ^ 2 - ((N : ℝ)⁻¹ * ∑ i : Fin N, q (cast h i)) ^ 2 = (K : ℝ)⁻¹ * ∑ j : Fin K, (q j) ^ 2 - ((K : ℝ)⁻¹ * ∑ j : Fin K, q j) ^ 2 := by subst K rfl
CausalSmith.Stat.LdpAteEfficiencySurface.finite_empiricalVariance_cast_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotVhatConsistency.lean:16
theorem finite_average_sq_deviation_cast_eq

Average squared deviations are invariant under transport along an equality of finite row lengths. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
N K :
ℕ
h :
N = K
q :
Fin K → ℝ
qbarN :
(N : ℝ)⁻¹ * ∑ i : Fin N, q (cast h i)
qbarK :
(K : ℝ)⁻¹ * ∑ j : Fin K, q j
(N : ℝ)⁻¹ * ∑ i : Fin N, (q (cast h i) - qbarN) ^ 2
= (K : ℝ)⁻¹ * ∑ j : Fin K, (q j - qbarK) ^ 2
Proof (Lean source)
lemma finite_average_sq_deviation_cast_eq {N K : ℕ} (h : N = K) (q : Fin K → ℝ) : let qbarN := (N : ℝ)⁻¹ * ∑ i : Fin N, q (cast h i) let qbarK := (K : ℝ)⁻¹ * ∑ j : Fin K, q j (N : ℝ)⁻¹ * ∑ i : Fin N, (q (cast h i) - qbarN) ^ 2 = (K : ℝ)⁻¹ * ∑ j : Fin K, (q j - qbarK) ^ 2 := by subst K rfl
CausalSmith.Stat.LdpAteEfficiencySurface.finite_average_sq_deviation_cast_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotVhatConsistency.lean:28
theorem VhatStar_pilotAdaptiveEncode_eq_adaptiveEmpiricalVariance

On an encoded row, VhatStar equals the adaptive empirical variance after the canonical main-size reindexing. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Vhat Star pilot Adaptive Encode eq adaptive Empirical Variance.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hε :
0 < ε
n :
ℕ
hmn :
m n ≤ n
hN :
hmain :
adaptiveMainSize m n = n - m n
u :
Fin (m n) → Fin 4
v :
Fin (n - m n) → Fin 14
VhatStar p ε m (select) (pilotAdaptiveEncode hmn u v)
= adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i))
Proof (Lean source)
lemma VhatStar_pilotAdaptiveEncode_eq_adaptiveEmpiricalVariance (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hε : 0 < ε) {n : ℕ} (hmn : m n ≤ n) (hN : 0 < adaptiveMainSize m n) (hmain : adaptiveMainSize m n = n - m n) (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : VhatStar p ε m (select) (pilotAdaptiveEncode hmn u v) = adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i)) := by rw [VhatStar_pilotAdaptiveEncode select p ε m hselect hp hε hmn u v] rw [adaptivePilotRowEmpiricalVariance_eq_selected select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n hN] exact (finite_average_sq_deviation_cast_eq hmain (fun j => adaptiveSelectedScore select (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))).symm
CausalSmith.Stat.LdpAteEfficiencySurface.VhatStar_pilotAdaptiveEncode_eq_adaptiveEmpiricalVariance · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotVhatConsistency.lean:39
theorem transcriptLaw_VhatStar_bad_eq_ofReal_pilotVarianceBadMass

The actual bad-variance transcript event is exactly the real prefix mixture proved consistent in PilotVarianceConsistency. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Law Vhat Star bad eq of Real pilot Variance Bad Mass.

Formal statement
select :
shared
p ε δ :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hsub :
n :
ℕ
hn :
2 ≤ n
(transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|}
= ofReal (pilotVarianceBadMass select θ p ε δ m hselect hp hε (le_of_lt (hsub.2 n hn).2))
Proof (Lean source)
lemma transcriptLaw_VhatStar_bad_eq_ofReal_pilotVarianceBadMass (θ : TrialParameter) (p ε δ : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hsub : PilotSublinear m) {n : ℕ} (hn : 2 ≤ n) : (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|} = ofReal (pilotVarianceBadMass select θ p ε δ m hselect hp hε (le_of_lt (hsub.2 n hn).2)) := by classical let hmn : m n ≤ n := le_of_lt (hsub.2 n hn).2 let μ := transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n let A : Set (Transcript (pilotOutputFamily n)) := {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|} let e := fun uv : (Fin (m n) → Fin 4) × (Fin (n - m n) → Fin 14) => pilotAdaptiveEncode hmn uv.1 uv.2 have hN : 0 < adaptiveMainSize m n := by rw [adaptiveMainSize, adaptivePilotSize_eq m hsub hn] exact Nat.sub_pos_of_lt (hsub.2 n hn).2 have hmain : adaptiveMainSize m n = n - m n := by simp [adaptiveMainSize, adaptivePilotSize_eq m hsub hn] have hzero : adaptiveTrueParam θ (fun _ => 0) n = θ := by have hlocal : localAlternative θ (fun _ => 0) n = θ := by funext k simp [localAlternative] rw [adaptiveTrueParam_eq_localAlternative] · exact hlocal · simpa only [hlocal] using hθ have hw (u : Fin (m n) → Fin 4) : 0 ≤ pilotPrefixWeight θ p ε m n u := pilotPrefixWeight_nonneg θ p ε m n hp hθ u have hm (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : 0 ≤ ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j) := by apply Finset.prod_nonneg intro j _ exact adaptiveMainMass_nonneg select θ _ p ε hselect hp hθ (pilotTheta_interior p ε m (pilotAdaptiveEncode hmn u (fun _ => 0))) hε (v j) have hatom (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : μ {e (u, v)} = ofReal (pilotPrefixWeight θ p ε m n u * ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) := by rw [pilotAdaptive_joint_singleton_eq_prefix_mul_mainProduct select θ p ε m hselect hp hθ hε hmn u v] change ofReal (pilotPrefixWeight θ p ε m n u) * ofReal (∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) = _ exact (ENNReal.ofReal_mul (hw u)).symm have hA : MeasurableSet A := MeasurableSet.of_discrete rw [show μ A = ∫⁻ z, A.indicator (fun _ => (1 : ENNReal)) z ∂μ by rw [lintegral_indicator hA, setLIntegral_one]] rw [MeasureTheory.lintegral_fintype] rw [sum_eq_sum_image_of_zero_off_range e (pilotAdaptiveEncode_pair_injective hmn)] · rw [Fintype.sum_prod_type] simp_rw [hatom] have hind (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : A.indicator (fun _ => (1 : ENNReal)) (e (u, v)) = if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i)) - Vstar θ p ε| then 1 else 0 := by rw [Set.indicator_apply] simp only [A, Set.mem_ofPred_eq, e, VhatStar_pilotAdaptiveEncode_eq_adaptiveEmpiricalVariance select θ p ε m hselect hp hε hmn hN hmain u v] simp_rw [hind] have hindOfReal (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : (if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i)) - Vstar θ p ε| then (1 : ENNReal) else 0) = ofReal (if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i)) - Vstar θ p ε| then (1 : ℝ) else 0) := by split_ifs <;> simp simp_rw [hindOfReal] have hmul (u : Fin (m n) → Fin 4) (v : Fin (n - m n) → Fin 14) : ofReal (if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i)) - Vstar θ p ε| then (1 : ℝ) else 0) * ofReal (pilotPrefixWeight θ p ε m n u * ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)) = ofReal ((if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i)) - Vstar θ p ε| then (1 : ℝ) else 0) * (pilotPrefixWeight θ p ε m n u * ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) := by exact (ENNReal.ofReal_mul (by split_ifs <;> positivity)).symm simp_rw [hmul] have hofReal_sum {B : Type} [Fintype B] (f : B → ℝ) (hf : ∀ b, 0 ≤ f b) : (∑ b, ofReal (f b)) = ofReal (∑ b, f b) := by simpa using (ENNReal.ofReal_sum_of_nonneg (s := univ) (fun b _ => hf b)).symm calc (∑ u : Fin (m n) → Fin 4, ∑ v : Fin (n - m n) → Fin 14, ofReal ((if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i)) - Vstar θ p ε| then (1 : ℝ) else 0) * (pilotPrefixWeight θ p ε m n u * ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)))) = ofReal (∑ u : Fin (m n) → Fin 4, ∑ v : Fin (n - m n) → Fin 14, (if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i)) - Vstar θ p ε| then (1 : ℝ) else 0) * (pilotPrefixWeight θ p ε m n u * ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) := by rw [show (∑ u : Fin (m n) → Fin 4, ∑ v : Fin (n - m n) → Fin 14, ofReal ((if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i)) - Vstar θ p ε| then (1 : ℝ) else 0) * (pilotPrefixWeight θ p ε m n u * ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j)))) = ∑ u : Fin (m n) → Fin 4, ofReal (∑ v : Fin (n - m n) → Fin 14, (if δ < |adaptivePilotRowEmpiricalVariance select θ (fun _ => 0) (fun _ => pilotAdaptivePrefixTheta p ε m hmn u) p ε m hselect hp hε n (fun i => v (cast hmain i)) - Vstar θ p ε| then (1 : ℝ) else 0) * (pilotPrefixWeight θ p ε m n u * ∏ j, adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v j))) by apply Finset.sum_congr rfl intro u _ exact hofReal_sum _ (fun v => mul_nonneg (by split_ifs <;> positivity) (mul_nonneg (hw u) (hm u v)))] exact hofReal_sum _ (fun u => Finset.sum_nonneg fun v _ => mul_nonneg (by split_ifs <;> positivity) (mul_nonneg (hw u) (hm u v))) _ = ofReal (pilotVarianceBadMass select θ p ε δ m hselect hp hε (le_of_lt (hsub.2 n hn).2)) := by congr 1 rw [show hmn = le_of_lt (hsub.2 n hn).2 from Subsingleton.elim _ _] unfold pilotVarianceBadMass pilotConditionalVarianceBadMass apply Finset.sum_congr rfl intro u _ rw [Finset.mul_sum] let rowEquiv : (Fin (adaptiveMainSize m n) → Fin 14) ≃ (Fin (n - m n) → Fin 14) := Equiv.piCongrLeft (fun _ : Fin (n - m n) => Fin 14) (finCongr hmain) symm apply Fintype.sum_equiv rowEquiv intro v have happly (i : Fin (adaptiveMainSize m n)) : rowEquiv v (cast hmain i) = v i := by rfl have happly' (i : Fin (adaptiveMainSize m n)) : rowEquiv v ((finCongr hmain) i) = v i := by change rowEquiv v (cast hmain i) = v i exact happly i have hfun : (fun i => rowEquiv v (cast hmain i)) = v := funext happly have hprod : (∏ i : Fin (adaptiveMainSize m n), adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (v i)) = ∏ j : Fin (n - m n), adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (rowEquiv v j) := by simpa only [happly'] using (Equiv.prod_comp (finCongr hmain) (fun j : Fin (n - m n) => adaptiveMainMass select θ (pilotAdaptivePrefixTheta p ε m hmn u) p ε (rowEquiv v j))) simp only [adaptivePilotRowProductMass, adaptivePilotRowMass, hzero, hfun, hprod] ring · intro z hz have hzμ := pilotAdaptive_singleton_zero_of_not_range select θ p ε m hselect hp hε hmn z hz apply mul_eq_zero.mpr right simpa only [μ] using hzμ
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw_VhatStar_bad_eq_ofReal_pilotVarianceBadMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotVhatConsistency.lean:62
theorem pilot_VhatStar_consistent

Under the pilot growth and interiority conditions, the probability under the actual transcript law that VhatStar differs from Vstar by more than any positive tolerance tends to zero. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot Vhat Star consistent.

Formal statement
select :
shared
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hdiv :
hsub :
δ :
ℝ
0 < δ
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)
Proof (Lean source)
lemma pilot_VhatStar_consistent (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hdiv : PilotDiverges m) (hsub : PilotSublinear m) : ∀ δ : ℝ, 0 < δ → Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0) := by intro δ hδ have hmass := pilotVarianceBadMass_tendsto_zero select θ p ε δ m hselect hp hθ hε hdiv hsub hδ have hof := ENNReal.continuous_ofReal.continuousAt.tendsto.comp hmass simpa only [ENNReal.ofReal_zero] using hof.congr' (by filter_upwards [eventually_ge_atTop 2] with n hn rw [Function.comp_apply, dif_pos hn, transcriptLaw_VhatStar_bad_eq_ofReal_pilotVarianceBadMass select θ p ε δ m hselect hp hθ hε hsub hn])
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_VhatStar_consistent · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotVhatConsistency.lean:252
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotWaldLimitSupport 3 declarations The standard studentization API uses one fixed sample space.

Varying-law support for pilot Wald limits

The standard studentization API uses one fixed sample space. Pilot transcripts change with the sample size, so this file supplies the corresponding CDF-level converging-together and interval-probability adapters.

theorem varyingLaw_cdf_converging_together

CDF-level converging together for row-varying probability spaces. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the varying Law cdf converging together.

Formal statement
Ω :
ℕ → Type*
∀ n, MeasurableSpace (Ω n)
μ :
∀ n, Measure (Ω n)
∀ n, IsProbabilityMeasure (μ n)
S T :
∀ n
if
Ω n
then
ℝ
Φ :
ℝ → ℝ
hApprox :
∀ η : ℝ
if
0 < η
then
Tendsto (fun n => (μ n).real {z | η ≤ |S n z - T n z|}) atTop (nhds 0)
hT :
∀ x : ℝ, Tendsto (fun n => (μ n).real {z | T n z ≤ x}) atTop (nhds (Φ x))
hΦ :
x :
ℝ
Tendsto (fun n => (μ n).real {z | S n z ≤ x}) atTop (nhds (Φ x))
Proof (Lean source)
lemma varyingLaw_cdf_converging_together {Ω : ℕ → Type*} [∀ n, MeasurableSpace (Ω n)] (μ : ∀ n, Measure (Ω n)) [∀ n, IsProbabilityMeasure (μ n)] (S T : ∀ n, Ω n → ℝ) (Φ : ℝ → ℝ) (hApprox : ∀ η : ℝ, 0 < η → Tendsto (fun n => (μ n).real {z | η ≤ |S n z - T n z|}) atTop (nhds 0)) (hT : ∀ x : ℝ, Tendsto (fun n => (μ n).real {z | T n z ≤ x}) atTop (nhds (Φ x))) (hΦ : Continuous Φ) : ∀ x : ℝ, Tendsto (fun n => (μ n).real {z | S n z ≤ x}) atTop (nhds (Φ x)) := by intro x rw [Metric.tendsto_atTop] intro ε hε have hε4 : 0 < ε / 4 := by linarith obtain ⟨η, hηpos, hη⟩ := (Metric.continuousAt_iff.mp hΦ.continuousAt) (ε / 4) hε4 let γ : ℝ := η / 2 have hγpos : 0 < γ := by dsimp [γ]; linarith have hγ_lt_η : γ < η := by dsimp [γ]; linarith have hΦplus : dist (Φ (x + γ)) (Φ x) < ε / 4 := by apply hη rw [Real.dist_eq] simpa [abs_of_pos hγpos] using hγ_lt_η have hΦminus : dist (Φ (x - γ)) (Φ x) < ε / 4 := by apply hη rw [Real.dist_eq] simpa [abs_of_pos hγpos] using hγ_lt_η rw [Real.dist_eq] at hΦplus hΦminus have hR := hApprox γ hγpos have hTplus := hT (x + γ) have hTminus := hT (x - γ) have hRev : ∀ᶠ n in atTop, (μ n).real {z | γ ≤ |S n z - T n z|} < ε / 4 := by have h := (Metric.tendsto_nhds.mp hR) (ε / 4) hε4 filter_upwards [h] with n hn rw [Real.dist_eq, sub_zero, abs_of_nonneg MeasureTheory.measureReal_nonneg] at hn exact hn have hTplusEv : ∀ᶠ n in atTop, (μ n).real {z | T n z ≤ x + γ} < Φ (x + γ) + ε / 4 := by have h := (Metric.tendsto_nhds.mp hTplus) (ε / 4) hε4 filter_upwards [h] with n hn rw [Real.dist_eq] at hn linarith [(abs_lt.mp hn).2] have hTminusEv : ∀ᶠ n in atTop, Φ (x - γ) - ε / 4 < (μ n).real {z | T n z ≤ x - γ} := by have h := (Metric.tendsto_nhds.mp hTminus) (ε / 4) hε4 filter_upwards [h] with n hn rw [Real.dist_eq] at hn linarith [(abs_lt.mp hn).1] refine Filter.eventually_atTop.1 ?_ filter_upwards [hRev, hTplusEv, hTminusEv] with n hRn hTpn hTmn rw [Real.dist_eq, abs_sub_lt_iff] constructor · have hmono : (μ n).real {z | S n z ≤ x} ≤ (μ n).real ({z | T n z ≤ x + γ} ∪ {z | γ ≤ |S n z - T n z|}) := by apply MeasureTheory.measureReal_mono (h₂ := measure_ne_top _ _) intro z hz change S n z ≤ x at hz by_cases hfar : γ ≤ |S n z - T n z| · exact inr hfar · apply inl rw [not_le, abs_sub_lt_iff] at hfar change T n z ≤ x + γ linarith have hunion := MeasureTheory.measureReal_union_le (μ := μ n) {z | T n z ≤ x + γ} {z | γ ≤ |S n z - T n z|} linarith [hmono.trans hunion, (abs_lt.mp hΦplus).2] · have hmono : (μ n).real {z | T n z ≤ x - γ} ≤ (μ n).real ({z | S n z ≤ x} ∪ {z | γ ≤ |S n z - T n z|}) := by apply MeasureTheory.measureReal_mono (h₂ := measure_ne_top _ _) intro z hz change T n z ≤ x - γ at hz by_cases hfar : γ ≤ |S n z - T n z| · exact inr hfar · apply inl rw [not_le, abs_sub_lt_iff] at hfar change S n z ≤ x linarith have hunion := MeasureTheory.measureReal_union_le (μ := μ n) {z | S n z ≤ x} {z | γ ≤ |S n z - T n z|} linarith [hmono.trans hunion, (abs_lt.mp hΦminus).1]
CausalSmith.Stat.LdpAteEfficiencySurface.varyingLaw_cdf_converging_together · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotWaldLimitSupport.lean:23
theorem varyingLaw_Icc_tendsto_of_cdf_and_approx

A negligible row-varying perturbation of a statistic with continuous-limit CDF has the expected probability limit on every continuity interval. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the varying Law Icc tendsto of cdf and approx.

Formal statement
Ω :
ℕ → Type*
∀ n, MeasurableSpace (Ω n)
μ :
∀ n, Measure (Ω n)
∀ n, IsProbabilityMeasure (μ n)
S T :
∀ n
if
Ω n
then
ℝ
hS :
∀ n, Measurable (S n)
hApprox :
∀ η : ℝ
if
0 < η
then
Tendsto (fun n => (μ n).real {z | η ≤ |S n z - T n z|}) atTop (nhds 0)
hT :
∀ x : ℝ, Tendsto (fun n => (μ n).real {z | T n z ≤ x}) atTop (nhds (Q.real (Iic x)))
hQcdf :
a b :
ℝ
hboundary :
Q (frontier (Icc a b)) = 0
Tendsto (fun n => (μ n).real {z | S n z ∈ Icc a b}) atTop (nhds (Q.real (Icc a b)))
Proof (Lean source)
lemma varyingLaw_Icc_tendsto_of_cdf_and_approx {Ω : ℕ → Type*} [∀ n, MeasurableSpace (Ω n)] (μ : ∀ n, Measure (Ω n)) [∀ n, IsProbabilityMeasure (μ n)] (S T : ∀ n, Ω n → ℝ) (Q : Measure ℝ) [IsProbabilityMeasure Q] (hS : ∀ n, Measurable (S n)) (hApprox : ∀ η : ℝ, 0 < η → Tendsto (fun n => (μ n).real {z | η ≤ |S n z - T n z|}) atTop (nhds 0)) (hT : ∀ x : ℝ, Tendsto (fun n => (μ n).real {z | T n z ≤ x}) atTop (nhds (Q.real (Iic x)))) (hQcdf : Continuous (cdf Q)) {a b : ℝ} (hboundary : Q (frontier (Icc a b)) = 0) : Tendsto (fun n => (μ n).real {z | S n z ∈ Icc a b}) atTop (nhds (Q.real (Icc a b))) := by let νs : ℕ → ProbabilityMeasure ℝ := fun n => ⟨Measure.map (S n) (μ n), Measure.isProbabilityMeasure_map (hS n).aemeasurable⟩ let ν : ProbabilityMeasure ℝ := ⟨Q, inferInstance⟩ have hScdf (x : ℝ) : Tendsto (fun n => (cdf (νs n : Measure ℝ) x : ℝ)) atTop (nhds (cdf (ν : Measure ℝ) x : ℝ)) := by have hraw := varyingLaw_cdf_converging_together μ S T (fun x => Q.real (Iic x)) hApprox hT (by simpa only [← ProbabilityTheory.cdf_eq_real] using hQcdf) have htarget : (cdf (ν : Measure ℝ) x : ℝ) = Q.real (Iic x) := by rw [ProbabilityTheory.cdf_eq_real] rfl rw [htarget] apply (hraw x).congr' filter_upwards with n rw [ProbabilityTheory.cdf_eq_real] change (μ n).real {z | S n z ≤ x} = (Measure.map (S n) (μ n)).real (Iic x) rw [MeasureTheory.measureReal_def, MeasureTheory.measureReal_def, Measure.map_apply (hS n) measurableSet_Iic] rfl have hν : Tendsto νs atTop (nhds ν) := probabilityMeasure_tendsto_of_cdf_tendsto νs ν hScdf have hprob := ProbabilityMeasure.tendsto_measure_of_null_frontier_of_tendsto hν (E := Icc a b) (by change toNNReal (Q (frontier (Icc a b))) = 0 simp [hboundary]) have hreal := NNReal.continuous_coe.tendsto _ |>.comp hprob apply hreal.congr' filter_upwards with n change (((νs n) (Icc a b) : NNReal) : ℝ) = (μ n).real {z | S n z ∈ Icc a b} rw [show (((νs n) (Icc a b) : NNReal) : ℝ) = (Measure.map (S n) (μ n)).real (Icc a b) by change ((toNNReal ((Measure.map (S n) (μ n)) (Icc a b)) : NNReal) : ℝ) = _ rw [ENNReal.coe_toNNReal_eq_toReal] rfl] rw [MeasureTheory.measureReal_def, MeasureTheory.measureReal_def, Measure.map_apply (hS n) measurableSet_Icc] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.varyingLaw_Icc_tendsto_of_cdf_and_approx · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotWaldLimitSupport.lean:115
theorem pilot_wald_coverage_of_standardized_cdf_and_approx

Exact pilot Wald coverage once the standardized oracle CDF and the row-varying Slutsky approximation to the fallback pivot have been proved. The fallback is retained verbatim, so samples with zero estimated variance are handled by pilot_wald_event_eq. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot wald coverage of standardized cdf and approx.

Formal statement
select :
shared
cutoff :
ℝ
hcutoff :
0 < cutoff
p ε :
ℝ
m :
ℕ → ℕ
hselect :
hθ :
hε :
0 < ε
hApprox :
∀ η : ℝ
if
0 < η
then
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | η ≤ |pilotWaldPivot select cutoff θ p ε m hselect hp hε n z - scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / sqrt (Vstar θ p ε)|}) atTop (nhds 0)
hstandardCDF :
∀ x : ℝ,
Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / sqrt (Vstar θ p ε) ≤ x}) atTop (nhds ((gaussianMeasure 0 1).real (Iic x)))
Tendsto (fun n => ((transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | |(pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ| ≤ cutoff * sqrt (VhatStar p ε m (select) z / n)}).toReal) atTop (nhds ((gaussianMeasure 0 1).real (Icc (-cutoff) cutoff)))
Proof (Lean source)
lemma pilot_wald_coverage_of_standardized_cdf_and_approx (cutoff : ℝ) (hcutoff : 0 < cutoff) (θ : TrialParameter) (p ε : ℝ) (m : ℕ → ℕ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hApprox : ∀ η : ℝ, 0 < η → Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | η ≤ |pilotWaldPivot select cutoff θ p ε m hselect hp hε n z - scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / sqrt (Vstar θ p ε)|}) atTop (nhds 0)) (hstandardCDF : ∀ x : ℝ, Tendsto (fun n => (transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n).real {z | scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / sqrt (Vstar θ p ε) ≤ x}) atTop (nhds ((gaussianMeasure 0 1).real (Iic x)))) : Tendsto (fun n => ((transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n) {z | |(pilotEstimator p ε m select hselect hp hε).estimate n z - contrast θ| ≤ cutoff * sqrt (VhatStar p ε m (select) z / n)}).toReal) atTop (nhds ((gaussianMeasure 0 1).real (Icc (-cutoff) cutoff))) := by let μ : ∀ n, Measure (Transcript (pilotOutputFamily n)) := fun n => transcriptLaw (pilotEstimator p ε m select hselect hp hε) θ p n let S : ∀ n, Transcript (pilotOutputFamily n) → ℝ := fun n => pilotWaldPivot select cutoff θ p ε m hselect hp hε n let T : ∀ n, Transcript (pilotOutputFamily n) → ℝ := fun n z => scaledError (pilotEstimator p ε m select hselect hp hε) θ 0 n z / sqrt (Vstar θ p ε) let _ (n : ℕ) : IsProbabilityMeasure (μ n) := transcriptLaw_isProbability _ θ p hp hθ n have hS (n : ℕ) : Measurable (S n) := measurable_of_finite _ have hpivot : Tendsto (fun n => (μ n).real {z | S n z ∈ Icc (-cutoff) cutoff}) atTop (nhds ((gaussianMeasure 0 1).real (Icc (-cutoff) cutoff))) := by apply varyingLaw_Icc_tendsto_of_cdf_and_approx μ S T (gaussianMeasure 0 1) hS hApprox hstandardCDF · simpa [gaussianMeasure] using (continuous_cdf_gaussianReal_zero (v := (1 : NNReal)) (by norm_num)) · exact gaussianMeasure_zero_one_frontier_Icc hcutoff apply pilot_wald_coverage_of_pivot_Icc select cutoff hcutoff θ p ε m hselect hp hε ((gaussianMeasure 0 1).real (Icc (-cutoff) cutoff)) simpa only [μ, S, MeasureTheory.measureReal_def] using hpivot
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_wald_coverage_of_standardized_cdf_and_approx · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotWaldLimitSupport.lean:175
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PilotWeakLimitSupport 2 declarations This file supplies the measure-theoretic bridge from convergence of real CDFs to weak convergence.

CDF support for the pilot weak limit

This file supplies the measure-theoretic bridge from convergence of real CDFs to weak convergence. The paper-specific theorem below deliberately leaves the CDF convergence of the actual centered estimator as an explicit hypothesis.

theorem probabilityMeasure_tendsto_of_cdf_tendsto

Pointwise convergence of the CDFs of real probability measures implies weak convergence. This all-points form is convenient for triangular-array adapters. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the probability Measure tendsto of cdf tendsto.

Formal statement
μs :
ℕ → ProbabilityMeasure ℝ
hcdf :
∀ x : ℝ,
Tendsto (fun n => (cdf (μs n : Measure ℝ) x : ℝ)) atTop (nhds (cdf (μ : Measure ℝ) x : ℝ))
Tendsto μs atTop (nhds μ)
Proof (Lean source)
lemma probabilityMeasure_tendsto_of_cdf_tendsto (μs : ℕ → ProbabilityMeasure ℝ) (μ : ProbabilityMeasure ℝ) (hcdf : ∀ x : ℝ, Tendsto (fun n => (cdf (μs n : Measure ℝ) x : ℝ)) atTop (nhds (cdf (μ : Measure ℝ) x : ℝ))) : Tendsto μs atTop (nhds μ) := by let S : Set (Set ℝ) := {s | ∃ a b : ℝ, a < b ∧ Ioc a b = s} have hpi : IsPiSystem S := by simpa only [S, id_eq] using (isPiSystem_Ioc (id : ℝ → ℝ) id) apply hpi.tendsto_probabilityMeasure_of_tendsto_of_mem · rintro s ⟨a, b, hab, rfl⟩ exact measurableSet_Ioc · intro u hu x hxu obtain ⟨r, hr, hball⟩ := Metric.isOpen_iff.mp hu x hxu refine ⟨Ioc (x - r / 2) (x + r / 2), ?_, ?_, ?_⟩ · exact ⟨x - r / 2, x + r / 2, by linarith, rfl⟩ · exact Ioc_mem_nhds (by linarith) (by linarith) · intro y hy apply hball rw [Metric.mem_ball, Real.dist_eq] rw [abs_lt] constructor <;> linarith [hy.1, hy.2] · rintro s ⟨a, b, hab, rfl⟩ rw [← NNReal.tendsto_coe] have hmass (ν : ProbabilityMeasure ℝ) : ((ν (Ioc a b) : NNReal) : ℝ) = (cdf (ν : Measure ℝ) b : ℝ) - (cdf (ν : Measure ℝ) a : ℝ) := by change (ν : Measure ℝ).real (Ioc a b) = _ rw [show Ioc a b = Iic b \ Iic a by ext y; simp] rw [MeasureTheory.measureReal_sdiff (μ := (ν : Measure ℝ)) (Iic_subset_Iic.mpr hab.le) measurableSet_Iic] rw [← ProbabilityTheory.cdf_eq_real, ← ProbabilityTheory.cdf_eq_real] simpa only [hmass] using (hcdf b).sub (hcdf a)
CausalSmith.Stat.LdpAteEfficiencySurface.probabilityMeasure_tendsto_of_cdf_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotWeakLimitSupport.lean:24
theorem weakLocalLimit_of_scaledError_cdf_tendsto

CDF convergence of the actual centered, root-scaled estimator laws implies the bounded-continuous-test formulation of the local weak limit. The transcript spaces may vary with n; the hypothesis is stated directly using their induced laws. No pilot CLT or CDF convergence is hidden in this adapter. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the weak Local Limit of scaled Error cdf tendsto.

Formal statement
select :
shared
Z :
ε :
ℝ
p :
ℝ
hselect :
hθ :
hε :
0 < ε
hcdf :
∀ x : ℝ,
Tendsto (fun n => (transcriptLaw P (localAlternative θ h n) p n).real {z | scaledError P θ h n z ≤ x}) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x)))
WeakLocalLimit P θ p (gaussianMeasure 0 (Vstar θ p ε))
Proof (Lean source)
lemma weakLocalLimit_of_scaledError_cdf_tendsto {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hcdf : ∀ h : TrialParameter, ∀ x : ℝ, Tendsto (fun n => (transcriptLaw P (localAlternative θ h n) p n).real {z | scaledError P θ h n z ≤ x}) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x)))) : WeakLocalLimit P θ p (gaussianMeasure 0 (Vstar θ p ε)) := by classical have hvpos : 0 < Vstar θ p ε := by exact_mod_cast adaptivePilotLimitVariance_pos select θ p ε hselect hp hθ hε let L : Measure ℝ := gaussianMeasure 0 (Vstar θ p ε) let _ : IsProbabilityMeasure L := by dsimp [L, gaussianMeasure] rw [Real.toNNReal_of_nonneg hvpos.le] infer_instance intro h f hf ⟨C, hC⟩ have hscaled (n : ℕ) : Measurable (scaledError P θ h n) := by exact measurable_const.mul ((P.estimate_measurable n).sub measurable_const) let ν : ℕ → ProbabilityMeasure ℝ := fun n => if hn : InteriorMeans (localAlternative θ h n) then letI : IsProbabilityMeasure (transcriptLaw P (localAlternative θ h n) p n) := transcriptLaw_isProbability P _ p hp hn n ⟨Measure.map (scaledError P θ h n) (transcriptLaw P (localAlternative θ h n) p n), Measure.isProbabilityMeasure_map (hscaled n).aemeasurable⟩ else ⟨L, inferInstance⟩ let νlim : ProbabilityMeasure ℝ := ⟨L, inferInstance⟩ have hνcdf (x : ℝ) : Tendsto (fun n => (cdf (ν n : Measure ℝ) x : ℝ)) atTop (nhds (cdf (νlim : Measure ℝ) x : ℝ)) := by have htarget : (cdf (νlim : Measure ℝ) x : ℝ) = (gaussianMeasure 0 (Vstar θ p ε)).real (Iic x) := by rw [ProbabilityTheory.cdf_eq_real] rfl rw [htarget] apply (hcdf h x).congr' filter_upwards [eventually_localAlternative_interior θ h hθ] with n hn have hmap : (ν n : Measure ℝ) = Measure.map (scaledError P θ h n) (transcriptLaw P (localAlternative θ h n) p n) := by simp only [ν, hn, ↓reduceDIte] rfl rw [ProbabilityTheory.cdf_eq_real, hmap] rw [MeasureTheory.measureReal_def, MeasureTheory.measureReal_def] congr 1 change (transcriptLaw P (localAlternative θ h n) p n) ((scaledError P θ h n) ⁻¹' Iic x) = _ exact (Measure.map_apply (hscaled n) measurableSet_Iic).symm have hν : Tendsto ν atTop (nhds νlim) := probabilityMeasure_tendsto_of_cdf_tendsto ν νlim hνcdf let fb : BoundedContinuousFunction ℝ ℝ := BoundedContinuousFunction.ofNormedAddCommGroup f hf C (by intro x simpa only [Real.norm_eq_abs] using hC x) have hint := (ProbabilityMeasure.tendsto_iff_forall_integral_tendsto.mp hν) fb apply hint.congr' filter_upwards [eventually_localAlternative_interior θ h hθ] with n hn have hmap : (ν n : Measure ℝ) = Measure.map (scaledError P θ h n) (transcriptLaw P (localAlternative θ h n) p n) := by simp only [ν, hn, ↓reduceDIte] rfl rw [hmap] change (∫ y, f y ∂Measure.map (scaledError P θ h n) (transcriptLaw P (localAlternative θ h n) p n)) = _ rw [MeasureTheory.integral_map (hscaled n).aemeasurable hf.aestronglyMeasurable]
CausalSmith.Stat.LdpAteEfficiencySurface.weakLocalLimit_of_scaledError_cdf_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PilotWeakLimitSupport.lean:61
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.PostprocessCardinality 3 declarations Positive active staircase rays whose postprocessing laws are pairwise mutually singular require distinct positive-mass output atoms.

Output cardinality under a singular postprocessing refinement

Positive active staircase rays whose postprocessing laws are pairwise mutually singular require distinct positive-mass output atoms. The argument works for arbitrary measurable structures on a finite output type and returns the definitional infinite bound for nonfinite output types.

theorem postprocess_row_ac_input

the postprocess row ac input assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
K :
Kernel (Fin 14) Z
Q :
Kernel (Fin 4) Z
hfactor :
Q = K.comp (staircaseChannel ε α)
s :
Fin 14
hs :
0 < α s
K s ≪ Q 0
Proof (Lean source)
lemma postprocess_row_ac_input {Z : Type*} [MeasurableSpace Z] (ε : ℝ) (α : StaircaseWeight) (K : Kernel (Fin 14) Z) (hK : IsMarkovKernel K) (Q : Kernel (Fin 4) Z) (hfactor : Q = K.comp (staircaseChannel ε α)) (s : Fin 14) (hs : 0 < α s) : K s ≪ Q 0 := by letI : IsMarkovKernel K := hK apply Measure.AbsolutelyContinuous.mk intro A hA hQA rw [hfactor, Kernel.comp_apply' _ _ _ hA, lintegral_fintype] at hQA have hsum : ∑ u : Fin 14, K u A * (staircaseChannel ε α) 0 {u} = 0 := hQA have hterm : K s A * (staircaseChannel ε α) 0 {s} = 0 := (Finset.sum_eq_zero_iff_of_nonneg (fun _ _ ↦ zero_le)).mp hsum s (Finset.mem_univ s) have hT : (staircaseChannel ε α) 0 {s} ≠ 0 := by change (Measure.count.withDensity (fun u : Fin 14 ↦ ofReal (α u * patternRay ε u 0))) {s} ≠ 0 simp [withDensity_apply _ (measurableSet_singleton s)] have hr : 0 < patternRay ε s 0 := by simp only [patternRay, privacyIncrement, privacyRatio] split <;> simp_all <;> positivity exact mul_pos hs hr exact (mul_eq_zero.mp hterm).resolve_right hT
CausalSmith.Stat.LdpAteEfficiencySurface.postprocess_row_ac_input · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PostprocessCardinality.lean:21
theorem input_zero_ac_outputLaw Lemma input_zero_ac_outputLaw in the paper ↗

the input zero ac output law assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
p :
ℝ
Q :
Kernel (Fin 4) Z
hpi :
0 < piTheta θ p 0
Q 0 ≪ outputLaw θ p Q
Proof (Lean source)
lemma input_zero_ac_outputLaw {Z : Type*} [MeasurableSpace Z] (θ : TrialParameter) (p : ℝ) (Q : Kernel (Fin 4) Z) (hpi : 0 < piTheta θ p 0) : Q 0 ≪ outputLaw θ p Q := by apply Measure.AbsolutelyContinuous.mk intro A _ hout have hsum : ∑ j : Fin 4, ofReal (piTheta θ p j) * Q j A = 0 := by simpa only [outputLaw, Measure.coe_finsetSum, Measure.coe_smul, Finset.sum_apply, Pi.smul_apply, smul_eq_mul] using hout have hterm : ofReal (piTheta θ p 0) * Q 0 A = 0 := (Finset.sum_eq_zero_iff_of_nonneg (fun _ _ ↦ zero_le)).mp hsum 0 (Finset.mem_univ 0) have hcoef : ofReal (piTheta θ p 0) ≠ 0 := by simp [hpi] exact (mul_eq_zero.mp hterm).resolve_left hcoef
CausalSmith.Stat.LdpAteEfficiencySurface.input_zero_ac_outputLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PostprocessCardinality.lean:48
theorem active_card_le_outputCardinality_of_pairwise_singular

the active card le output cardinality of pairwise singular assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the active card le output Cardinality of pairwise singular.

Formal statement
Z :
p ε :
ℝ
hθ :
A :
Finset (Fin 14)
hpos :
∀ s ∈ A, 0 < α s
K :
Kernel (Fin 14) Z
Q :
Kernel (Fin 4) Z
hfactor :
Q = K.comp (staircaseChannel ε α)
hsing :
∀ s ∈ A, ∀ u ∈ A, s ≠ u → K s ⟂ₘ K u
(A.card : ℕ∞) ≤ outputCardinality θ p Q
Proof (Lean source)
lemma active_card_le_outputCardinality_of_pairwise_singular {Z : Type*} [MeasurableSpace Z] (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (A : Finset (Fin 14)) (α : StaircaseWeight) (hpos : ∀ s ∈ A, 0 < α s) (K : Kernel (Fin 14) Z) (hK : IsMarkovKernel K) (Q : Kernel (Fin 4) Z) (hfactor : Q = K.comp (staircaseChannel ε α)) (hsing : ∀ s ∈ A, ∀ u ∈ A, s ≠ u → K s ⟂ₘ K u) : (A.card : ℕ∞) ≤ outputCardinality θ p Q := by have hpi : 0 < piTheta θ p 0 := by rcases hp with ⟨hp0, hp1⟩ rcases hθ with ⟨h00, h01, h10, h11⟩ simp only [piTheta, controlProb] exact mul_pos (by linarith) (by linarith) have hac (s : Fin 14) (hs : s ∈ A) : K s ≪ outputLaw θ p Q := (postprocess_row_ac_input ε α K hK Q hfactor s (hpos s hs)).trans (input_zero_ac_outputLaw θ p Q hpi) unfold outputCardinality split_ifs with hfinite · letI := hfinite letI : IsMarkovKernel K := hK exact pairwise_singular_card_le_positive_atoms A (fun s ↦ K s) (outputLaw θ p Q) hac hsing · exact le_top
CausalSmith.Stat.LdpAteEfficiencySurface.active_card_le_outputCardinality_of_pairwise_singular · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/PostprocessCardinality.lean:66
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.Procedures 18 declarations A transcript experiment carries its history-dependent channels and the induced finite transcript laws.

Sequential experiments and local procedures

A transcript experiment carries its history-dependent channels and the induced finite transcript laws. The laws are pinned by the conditional cylinder factorization, which is valid on arbitrary measurable output spaces.

For the supplied quantities and conditions, the output family is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Output Family is the displayed object.

Definition (Lean source)
OutputFamily :
Type 1
(n : ℕ) → Fin n → Type
CausalSmith.Stat.LdpAteEfficiencySurface.OutputFamily · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:24

For the supplied quantities and conditions, the transcript is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Transcript is determined by the displayed parameters.

Definition (Lean source)
n :
ℕ
Z :
Fin n → Type
Transcript Z :
Type
∀ i, Z i
def historyPrefix

the history prefix is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
Fin n → Type
i :
Fin n
z :
Transcript Z
historyPrefix i z :
PrivateHistory (Z := Z) i
fun j => z j.1
CausalSmith.Stat.LdpAteEfficiencySurface.historyPrefix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:32

the transcript factorizes is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
R :
(Fin n → Fin 4) → Measure (Transcript Z)
x :
TranscriptFactorizes Q R :
Prop
clause 1
clause 2
i :
Fin n
B :
Set (PrivateHistory (Z := Z) i)
A :
Set (Z i)
R x {z | historyPrefix i z ∈ B ∧ z i ∈ A}
= ∫⁻ h in B, Q i (x i, h) A ∂(R x).map (historyPrefix i)
CausalSmith.Stat.LdpAteEfficiencySurface.TranscriptFactorizes · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:38

For the supplied quantities and conditions, this procedure sequence packages the stated mathematical data. The Procedure Sequence is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
@realizes (\mathcal Z_i,\mathcal G_i)(arbitrary output measurable spaces)
channel :
∀ n, SequentialKernel (Z := Z n)
transcript :
∀ n
if
(Fin n → Fin 4)
then
Measure (Transcript (Z n))
factorizes :
∀ n, TranscriptFactorizes (channel n) (transcript n)
privacy :
∀ n, SequentialLDP (Z := Z n) ε (channel n)
estimate :
∀ n
if
Transcript (Z n)
then
ℝ
estimate_measurable :
∀ n, Measurable (estimate n)
CausalSmith.Stat.LdpAteEfficiencySurface.ProcedureSequence · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:50
def inputPathProbability

For the supplied quantities and conditions, the input path probability is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The input Path Probability is determined by the displayed parameters.

Definition (Lean source)
n :
ℕ
p :
ℝ
x :
Fin n → Fin 4
inputPathProbability θ p x :
ℝ
∏ i : Fin n, piTheta θ p (x i)
CausalSmith.Stat.LdpAteEfficiencySurface.inputPathProbability · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:63

the transcript law is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The transcript Law is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
transcriptLaw P θ p n :
Measure (Transcript (Z n))
∑ x : Fin n → Fin 4, ofReal (inputPathProbability θ p x) • P.transcript n x
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:68
def localAlternative Definition 6 in the paper ↗

For the supplied quantities and conditions, the local alternative is the mathematical object specified below. The local Alternative is determined by the displayed parameters.

Definition (Lean source)
θ0 h :
n :
ℕ
localAlternative θ0 h n :
fun k => θ0 k + h k / sqrt n
CausalSmith.Stat.LdpAteEfficiencySurface.localAlternative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:77
def localIndexSet

For the supplied quantities and conditions, the local index set is the mathematical object specified below. The local Index Set is determined by the displayed parameters.

Definition (Lean source)
n :
ℕ
H :
ℝ
localIndexSet θ0 n H :
{h | sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H ∧ InteriorMeans (localAlternative θ0 h n)}
CausalSmith.Stat.LdpAteEfficiencySurface.localIndexSet · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:82

the scaled error is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The scaled Error is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
θ0 h :
n :
ℕ
z :
Transcript (Z n)
scaledError P θ0 h n z :
ℝ
sqrt n * (P.estimate n z - contrast (localAlternative θ0 h n))
CausalSmith.Stat.LdpAteEfficiencySurface.scaledError · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:89
def localRisk

the local risk is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The local Risk is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
θ0 h :
p :
ℝ
n :
ℕ
localRisk P θ0 h p n :
ℝ≥0∞
∫⁻ z, ofReal ((scaledError P θ0 h n z) ^ 2) ∂transcriptLaw P (localAlternative θ0 h n) p n
def localWorstRisk

the local worst risk is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The local Worst Risk is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p H :
ℝ
n :
ℕ
localWorstRisk P θ0 p H n :
ℝ≥0∞
sSup {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ0 n H, u = localRisk P θ0 h p n}
CausalSmith.Stat.LdpAteEfficiencySurface.localWorstRisk · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:103

the local asymptotic risk is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The local Asymptotic Risk is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
localAsymptoticRisk P θ0 p :
ℝ≥0∞
sSup {u : ℝ≥0∞ | ∃ H : ℝ, 0 < H ∧ u = liminf (fun n => localWorstRisk P θ0 p H n) atTop}
CausalSmith.Stat.LdpAteEfficiencySurface.localAsymptoticRisk · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:110

the weak local limit is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Weak Local Limit is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
L :
f :
ℝ → ℝ
(∃ C : ℝ, ∀ u, |f u| ≤ C)
WeakLocalLimit P θ0 p L :
Prop
Tendsto (fun n => ∫ z, f (scaledError P θ0 h n z) ∂transcriptLaw P (localAlternative θ0 h n) p n) atTop (nhds (∫ u, f u ∂L))
CausalSmith.Stat.LdpAteEfficiencySurface.WeakLocalLimit · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:117

the regular procedure is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Regular Procedure is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
RegularProcedure P θ0 p :
Prop
∃ L : Measure ℝ,
(∫⁻ u, ofReal (u ^ 2) ∂L) < ⊤
WeakLocalLimit P θ0 p L
clause 1
H :
ℝ
0 < H
Tendsto (fun M : ℕ => limsup (fun n => sSup {u : ℝ≥0∞ | ∃ h ∈ localIndexSet θ0 n H, u = ∫⁻ z, ofReal ((scaledError P θ0 h n z) ^ 2 * if M < |scaledError P θ0 h n z| then 1 else 0) ∂transcriptLaw P (localAlternative θ0 h n) p n}) atTop) atTop (nhds 0)
CausalSmith.Stat.LdpAteEfficiencySurface.RegularProcedure · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:128
theorem exists_selectedDirection

Under the supplied quantities and conditions, the exists selected direction assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the exists selected Direction.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
∃ t : ℝ, upperEnvelope θ p ε t = Jstar θ p ε
Proof (Lean source)
lemma exists_selectedDirection (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : ∃ t : ℝ, upperEnvelope θ p ε t = Jstar θ p ε := by have hfixed : FixedPrivacy (fun _ => ε) ε := ⟨hε, fun _ => rfl⟩ exact (finite_oracle.{0} θ p ε hp hθ (fun _ => ε) hfixed).2.2.2.2
CausalSmith.Stat.LdpAteEfficiencySurface.exists_selectedDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:149
def selectedDirection

For the supplied quantities and conditions, the selected direction is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The selected Direction is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
hθ :
hε :
0 < ε
selectedDirection θ p ε hp hθ hε :
ℝ
choose (exists_selectedDirection θ p ε hp hθ hε)
CausalSmith.Stat.LdpAteEfficiencySurface.selectedDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Procedures.lean:159
def vtHandle

For the supplied quantities and conditions, the vt handle is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The vt Handle is determined by the displayed parameters.

Definition (Lean source)
p ε R :
ℝ
hθ :
hε :
0 < ε
_hR :
0 < R
vtHandle θ p ε R hp hθ hε _hR :
TrialParameter × (ℝ → ℝ)
(direction (selectedDirection θ p ε hp hθ hε), smoothPrior 0 R)
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.QuadraticConvexity 2 declarations The profile is a nonnegative weighted sum of squared affine scores.

Convexity of the staircase information profile

The profile is a nonnegative weighted sum of squared affine scores.

theorem informationObjective_convex_time

Under the supplied quantities and conditions, the information objective convex time assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Objective convex time.

Formal statement
p ε :
ℝ
hα :
∀ s, 0 ≤ α s
hmass :
∀ s, 0 < patternMass θ p ε s
t u a b :
ℝ
ha :
0 ≤ a
hb :
0 ≤ b
hab :
a + b = 1
informationObjective θ p ε α (a * t + b * u)
≤ a * informationObjective θ p ε α t + b * informationObjective θ p ε α u
Proof (Lean source)
lemma informationObjective_convex_time (θ : TrialParameter) (p ε : ℝ) (α : StaircaseWeight) (hα : ∀ s, 0 ≤ α s) (hmass : ∀ s, 0 < patternMass θ p ε s) (t u a b : ℝ) (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) : informationObjective θ p ε α (a * t + b * u) ≤ a * informationObjective θ p ε α t + b * informationObjective θ p ε α u := by unfold informationObjective rw [Finset.mul_sum, Finset.mul_sum, ← Finset.sum_add_distrib] apply Finset.sum_le_sum intro s _ have hslope : projectedGradient p ε s (a * t + b * u) = a * projectedGradient p ε s t + b * projectedGradient p ε s u := by simp [projectedGradient, direction, Fin.sum_univ_succ] linear_combination -(patternGradient p ε s 1) * hab have hsq : (a * projectedGradient p ε s t + b * projectedGradient p ε s u) ^ 2 ≤ a * (projectedGradient p ε s t) ^ 2 + b * (projectedGradient p ε s u) ^ 2 := by have h := mul_nonneg (mul_nonneg ha hb) (sq_nonneg (projectedGradient p ε s t - projectedGradient p ε s u)) nlinarith [h] unfold patternInformation rw [hslope] have hc : 0 ≤ α s / patternMass θ p ε s := div_nonneg (hα s) (hmass s).le calc α s * ((a * projectedGradient p ε s t + b * projectedGradient p ε s u) ^ 2 / patternMass θ p ε s) = (α s / patternMass θ p ε s) * (a * projectedGradient p ε s t + b * projectedGradient p ε s u) ^ 2 := by ring _ ≤ (α s / patternMass θ p ε s) * (a * (projectedGradient p ε s t) ^ 2 + b * (projectedGradient p ε s u) ^ 2) := mul_le_mul_of_nonneg_left hsq hc _ = a * (α s * ((projectedGradient p ε s t) ^ 2 / patternMass θ p ε s)) + b * (α s * ((projectedGradient p ε s u) ^ 2 / patternMass θ p ε s)) := by ring
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_convex_time · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/QuadraticConvexity.lean:16
theorem informationObjective_convexOn_time

Under the supplied quantities and conditions, the information objective convex on time assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Objective convex On time.

Formal statement
p ε :
ℝ
hα :
∀ s, 0 ≤ α s
hmass :
∀ s, 0 < patternMass θ p ε s
Proof (Lean source)
lemma informationObjective_convexOn_time (θ : TrialParameter) (p ε : ℝ) (α : StaircaseWeight) (hα : ∀ s, 0 ≤ α s) (hmass : ∀ s, 0 < patternMass θ p ε s) : ConvexOn ℝ univ (informationObjective θ p ε α) := by refine ⟨convex_univ, ?_⟩ intro t _ u _ a b ha hb hab simpa only [smul_eq_mul] using informationObjective_convex_time θ p ε α hα hmass t u a b ha hb hab
CausalSmith.Stat.LdpAteEfficiencySurface.informationObjective_convexOn_time · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/QuadraticConvexity.lean:64
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.R3Continuity 19 declarations This file supplies the canonical stationarity direction, continuity of the rational information data on the interior, and an explicit right inverse for the three active dual-ray equations.

Continuous certificate data for the three-output region

This file supplies the canonical stationarity direction, continuity of the rational information data on the interior, and an explicit right inverse for the three active dual-ray equations. It also gives the local form of the promoted anchored linear solver needed when coefficients are only continuous at the certificate point.

def r3Direction

The scalar score direction used in the three-output region is determined by the displayed parameters.

Definition (Lean source)
p μ0 μ1 ε :
ℝ
r3Direction p μ0 μ1 ε :
ℝ
-r3Stationarity p μ0 μ1 ε 0 / r3StationarityCoeff p μ0 μ1 ε
theorem r3Stationarity_affine

Under the supplied quantities and conditions, the r3 stationarity affine assertion holds.

Formal statement
p μ0 μ1 ε t :
ℝ
r3Stationarity p μ0 μ1 ε t
= r3Stationarity p μ0 μ1 ε 0 + t * r3StationarityCoeff p μ0 μ1 ε
Proof (Lean source)
lemma r3Stationarity_affine (p μ0 μ1 ε t : ℝ) : r3Stationarity p μ0 μ1 ε t = r3Stationarity p μ0 μ1 ε 0 + t * r3StationarityCoeff p μ0 μ1 ε := by unfold r3StationarityCoeff r3Stationarity rw [← Finset.sum_sub_distrib] rw [Finset.mul_sum, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro s _ simp [patternInformationSlope, projectedGradient, direction, Fin.sum_univ_succ] ring
CausalSmith.Stat.LdpAteEfficiencySurface.r3Stationarity_affine · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:24
theorem r3Stationarity_r3Direction_eq_zero

Under the supplied quantities and conditions, the r3 stationarity r3 direction eq zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 ε :
ℝ
hcoeff :
r3StationarityCoeff p μ0 μ1 ε ≠ 0
r3Stationarity p μ0 μ1 ε (r3Direction p μ0 μ1 ε) = 0
Proof (Lean source)
lemma r3Stationarity_r3Direction_eq_zero (p μ0 μ1 ε : ℝ) (hcoeff : r3StationarityCoeff p μ0 μ1 ε ≠ 0) : r3Stationarity p μ0 μ1 ε (r3Direction p μ0 μ1 ε) = 0 := by rw [r3Stationarity_affine] unfold r3Direction field_simp ring
CausalSmith.Stat.LdpAteEfficiencySurface.r3Stationarity_r3Direction_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:38
def RegionParameter

the region parameter is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The Region Parameter is the displayed object.

Definition (Lean source)
RegionParameter :
Type
ℝ × ℝ × ℝ × ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.RegionParameter · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:51
def regionTheta

For the supplied quantities and conditions, the region theta is the mathematical object specified below.

Definition (Lean source)
regionTheta x :
fun k => if k = 0 then x.2.1 else x.2.2.1
theorem continuous_patternRay_region

Under the supplied quantities and conditions, the continuous pattern ray region assertion holds.

Formal statement
s :
Fin 14
j :
Fin 4
Continuous (fun x : RegionParameter => patternRay x.2.2.2 s j)
Proof (Lean source)
lemma continuous_patternRay_region (s : Fin 14) (j : Fin 4) : Continuous (fun x : RegionParameter => patternRay x.2.2.2 s j) := by unfold patternRay privacyIncrement privacyRatio by_cases h : patternContains s j · simp [h] fun_prop · simp [h] exact continuous_const
CausalSmith.Stat.LdpAteEfficiencySurface.continuous_patternRay_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:58
theorem continuous_patternMass_region

Under the supplied quantities and conditions, the continuous pattern mass region assertion holds.

Formal statement
s :
Fin 14
Continuous (fun x : RegionParameter => patternMass (regionTheta x) x.1 x.2.2.2 s)
Proof (Lean source)
lemma continuous_patternMass_region (s : Fin 14) : Continuous (fun x : RegionParameter => patternMass (regionTheta x) x.1 x.2.2.2 s) := by unfold patternMass apply continuous_finsetSum intro j _ apply Continuous.mul · fin_cases j <;> simp +decide [regionTheta, piTheta, controlProb] <;> fun_prop · exact continuous_patternRay_region s j
CausalSmith.Stat.LdpAteEfficiencySurface.continuous_patternMass_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:68
theorem continuousAt_projectedGradient_region

Under the supplied quantities and conditions, the continuous at projected gradient region assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
s :
Fin 14
t :
ht :
ContinuousAt (fun y : RegionParameter => projectedGradient y.1 y.2.2.2 s (t y)) x
Proof (Lean source)
lemma continuousAt_projectedGradient_region (s : Fin 14) (t : RegionParameter → ℝ) (x : RegionParameter) (ht : ContinuousAt t x) : ContinuousAt (fun y : RegionParameter => projectedGradient y.1 y.2.2.2 s (t y)) x := by simp +decide [projectedGradient, patternGradient, direction, privacyIncrement, privacyRatio, controlProb, Fin.sum_univ_succ] fun_prop
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_projectedGradient_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:79
theorem continuousAt_patternInformation_region

Under the supplied quantities and conditions, the continuous at pattern information region assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
s :
Fin 14
t :
ht :
hm :
patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0
ContinuousAt (fun y : RegionParameter => patternInformation (regionTheta y) y.1 y.2.2.2 s (t y)) x
Proof (Lean source)
lemma continuousAt_patternInformation_region (s : Fin 14) (t : RegionParameter → ℝ) (x : RegionParameter) (ht : ContinuousAt t x) (hm : patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0) : ContinuousAt (fun y : RegionParameter => patternInformation (regionTheta y) y.1 y.2.2.2 s (t y)) x := by unfold patternInformation apply ContinuousAt.div · exact (continuousAt_projectedGradient_region s t x ht).pow 2 · exact (continuous_patternMass_region s).continuousAt · exact hm
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_patternInformation_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:89
theorem continuousAt_projectedScore_region

Under the supplied quantities and conditions, the continuous at projected score region assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
s :
Fin 14
t :
ht :
hm :
patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0
ContinuousAt (fun y : RegionParameter => projectedScore (regionTheta y) y.1 y.2.2.2 s (t y)) x
Proof (Lean source)
lemma continuousAt_projectedScore_region (s : Fin 14) (t : RegionParameter → ℝ) (x : RegionParameter) (ht : ContinuousAt t x) (hm : patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0) : ContinuousAt (fun y : RegionParameter => projectedScore (regionTheta y) y.1 y.2.2.2 s (t y)) x := by unfold projectedScore exact (continuousAt_projectedGradient_region s t x ht).div (continuous_patternMass_region s).continuousAt hm
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_projectedScore_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:102
theorem continuousAt_patternInformationSlope_region

Under the supplied quantities and conditions, the continuous at pattern information slope region assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
s :
Fin 14
t :
ht :
hm :
patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0
ContinuousAt (fun y : RegionParameter => patternInformationSlope (regionTheta y) y.1 y.2.2.2 s (t y)) x
Proof (Lean source)
lemma continuousAt_patternInformationSlope_region (s : Fin 14) (t : RegionParameter → ℝ) (x : RegionParameter) (ht : ContinuousAt t x) (hm : patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0) : ContinuousAt (fun y : RegionParameter => patternInformationSlope (regionTheta y) y.1 y.2.2.2 s (t y)) x := by unfold patternInformationSlope apply ContinuousAt.div · apply ContinuousAt.mul · apply ContinuousAt.mul continuousAt_const (continuousAt_projectedGradient_region s t x ht) · simp +decide [patternGradient, privacyIncrement, privacyRatio, controlProb] fun_prop · exact (continuous_patternMass_region s).continuousAt · exact hm
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_patternInformationSlope_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:117
theorem continuousAt_r3Stationarity_region

Under the supplied quantities and conditions, the continuous at r3 stationarity region assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
t :
ht :
hm :
∀ s : Fin 14, patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0
ContinuousAt (fun y : RegionParameter => r3Stationarity y.1 y.2.1 y.2.2.1 y.2.2.2 (t y)) x
Proof (Lean source)
lemma continuousAt_r3Stationarity_region (t : RegionParameter → ℝ) (x : RegionParameter) (ht : ContinuousAt t x) (hm : ∀ s : Fin 14, patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0) : ContinuousAt (fun y : RegionParameter => r3Stationarity y.1 y.2.1 y.2.2.1 y.2.2.2 (t y)) x := by unfold r3Stationarity let f := fun s : Fin 14 => fun y : RegionParameter => r3Weight y.2.2.2 s * patternInformationSlope (regionTheta y) y.1 y.2.2.2 s (t y) have hf (s : Fin 14) : ContinuousAt (f s) x := by apply ContinuousAt.mul · unfold r3Weight by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · simp [hs] exact (((Real.continuous_exp.comp continuous_snd.snd.snd).add continuous_const).continuousAt.inv₀ (show exp x.2.2.2 + 2 ≠ 0 by positivity)) · simp [hs] exact continuousAt_const · exact continuousAt_patternInformationSlope_region s t x ht (hm s) have hsum : ∀ S : Finset (Fin 14), ContinuousAt (fun y => ∑ s ∈ S, f s y) x := by intro S induction S using Finset.induction_on with | empty => simpa using (continuousAt_const : ContinuousAt (fun _ : RegionParameter => (0 : ℝ)) x) | @insert a S ha ih => simp only [Finset.sum_insert ha] change ContinuousAt (fun y => f a y + ∑ s ∈ S, f s y) x exact (hf a).add ih change ContinuousAt (fun y => ∑ s : Fin 14, r3Weight y.2.2.2 s * patternInformationSlope (regionTheta y) y.1 y.2.2.2 s (t y)) x simpa only [f] using hsum univ
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_r3Stationarity_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:135
theorem continuousAt_r3Direction_region

Under the supplied quantities and conditions, the continuous at r3 direction region assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
hm :
∀ s : Fin 14, patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0
hc :
r3StationarityCoeff x.1 x.2.1 x.2.2.1 x.2.2.2 ≠ 0
ContinuousAt (fun y : RegionParameter => r3Direction y.1 y.2.1 y.2.2.1 y.2.2.2) x
Proof (Lean source)
lemma continuousAt_r3Direction_region (x : RegionParameter) (hm : ∀ s : Fin 14, patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0) (hc : r3StationarityCoeff x.1 x.2.1 x.2.2.1 x.2.2.2 ≠ 0) : ContinuousAt (fun y : RegionParameter => r3Direction y.1 y.2.1 y.2.2.1 y.2.2.2) x := by unfold r3Direction r3StationarityCoeff apply ContinuousAt.div · exact (continuousAt_r3Stationarity_region (fun _ => 0) x continuousAt_const hm).neg · exact (continuousAt_r3Stationarity_region (fun _ => 1) x continuousAt_const hm).sub (continuousAt_r3Stationarity_region (fun _ => 0) x continuousAt_const hm) · exact hc
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_r3Direction_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:172
def r3Mask

For the supplied quantities and conditions, the r3 mask is the mathematical object specified below.

Definition (Lean source)
i :
Fin 3
r3Mask i :
Fin 14
![0, 5, 7] i
def r3DualMatrix

The dual constraint matrix for the three-output region is determined by the displayed parameters.

Definition (Lean source)
r3DualMatrix x :
Matrix (Fin 3) (Fin 4) ℝ
fun i j => patternRay x.2.2.2 (r3Mask i) j
def r3DualRightInverse

A right inverse for the three-output dual matrix is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
r3DualRightInverse ε :
Matrix (Fin 4) (Fin 3) ℝ
r :
exp ε
den :
(r - 1) * (r + 2)
fun j i
=> if j = 2 then 0 else if (j = 0 ∧ i = 0) ∨ (j = 1 ∧ i = 1) ∨ (j = 3 ∧ i = 2) then (r + 1) / den else -1 / den
CausalSmith.Stat.LdpAteEfficiencySurface.r3DualRightInverse · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:197
theorem r3DualMatrix_mul_rightInverse

Under the supplied quantities and conditions, the r3 dual matrix mul right inverse assertion holds. Under the stated assumptions, the r3 Dual Matrix mul right Inverse.

Formal statement
hε :
0 < x.2.2.2
Proof (Lean source)
lemma r3DualMatrix_mul_rightInverse (x : RegionParameter) (hε : 0 < x.2.2.2) : r3DualMatrix x * r3DualRightInverse x.2.2.2 = 1 := by have hr : 1 < exp x.2.2.2 := (Real.one_lt_exp_iff).2 hε have hd : (exp x.2.2.2 - 1) * (exp x.2.2.2 + 2) ≠ 0 := by positivity have hd1 : exp x.2.2.2 - 1 ≠ 0 := by positivity ext i k change (∑ j : Fin 4, r3DualMatrix x i j * r3DualRightInverse x.2.2.2 j k) = (1 : Matrix (Fin 3) (Fin 3) ℝ) i k fin_cases i <;> fin_cases k <;> simp +decide [r3DualMatrix, r3DualRightInverse, r3Mask, patternRay, patternContains, privacyIncrement, privacyRatio, Fin.sum_univ_succ] <;> field_simp [hd, hd1] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.r3DualMatrix_mul_rightInverse · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:206
theorem continuous_r3DualMatrix

the continuous r3 dual matrix assertion holds.

Formal statement
Proof (Lean source)
lemma continuous_r3DualMatrix : Continuous r3DualMatrix := by apply continuous_matrix intro i j exact continuous_patternRay_region (r3Mask i) j
CausalSmith.Stat.LdpAteEfficiencySurface.continuous_r3DualMatrix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:223
theorem exists_eventually_anchoredSolution_of_rightInverse

the exists eventually anchored solution of right inverse assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the exists eventually anchored Solution of right Inverse.

Formal statement
X :
k n :
ℕ
A :
X → Matrix (Fin k) (Fin n) ℝ
b :
X → Fin k → ℝ
R₀ :
Matrix (Fin n) (Fin k) ℝ
x₀ :
X
y₀ :
Fin n → ℝ
hA :
hb :
hR :
A x₀ * R₀ = 1
hy :
mulVec (A x₀) y₀ = b x₀
y :
anchoredSolution A b R₀ y₀
y x₀ = y₀
∀ᶠ x in nhds x₀, mulVec (A x) (y x) = b x
Proof (Lean source)
lemma exists_eventually_anchoredSolution_of_rightInverse {X : Type*} [TopologicalSpace X] {k n : ℕ} (A : X → Matrix (Fin k) (Fin n) ℝ) (b : X → Fin k → ℝ) (R₀ : Matrix (Fin n) (Fin k) ℝ) (x₀ : X) (y₀ : Fin n → ℝ) (hA : ContinuousAt A x₀) (hb : ContinuousAt b x₀) (hR : A x₀ * R₀ = 1) (hy : mulVec (A x₀) y₀ = b x₀) : let y := anchoredSolution A b R₀ y₀ ContinuousAt y x₀ ∧ y x₀ = y₀ ∧ ∀ᶠ x in nhds x₀, mulVec (A x) (y x) = b x := by dsimp only have hM : ContinuousAt (fun x => A x * R₀) x₀ := (continuous_fst.matrix_mul continuous_snd).continuousAt.comp (hA.prodMk continuousAt_const) have hdet : ContinuousAt (fun x => (A x * R₀).det) x₀ := continuous_id.matrix_det.continuousAt.comp hM have hdet0 : (A x₀ * R₀).det ≠ 0 := by rw [hR]; simp have hev : ∀ᶠ x in nhds x₀, (A x * R₀).det ≠ 0 := hdet.eventually_ne hdet0 have hInv : ContinuousAt (fun x => (A x * R₀)⁻¹) x₀ := by have hringInv : ContinuousAt Ring.inverse (A x₀ * R₀).det := by rw [show (Ring.inverse : ℝ → ℝ) = inv from funext Ring.inverse_eq_inv] exact continuousAt_inv₀ hdet0 exact ContinuousAt.comp' (f := fun x => A x * R₀) (continuousAt_matrix_inv (A x₀ * R₀) hringInv) hM have hResidual : ContinuousAt (fun x => b x - mulVec (A x) y₀) x₀ := hb.sub ((continuous_fst.matrix_mulVec continuous_snd).continuousAt.comp (hA.prodMk continuousAt_const)) have hInner : ContinuousAt (fun x => mulVec (A x * R₀)⁻¹ (b x - mulVec (A x) y₀)) x₀ := (continuous_fst.matrix_mulVec continuous_snd).continuousAt.comp (hInv.prodMk hResidual) have hcont : ContinuousAt (anchoredSolution A b R₀ y₀) x₀ := by change ContinuousAt (fun x => y₀ + mulVec R₀ (mulVec (A x * R₀)⁻¹ (b x - mulVec (A x) y₀))) x₀ exact continuousAt_const.add ((continuous_fst.matrix_mulVec continuous_snd).continuousAt.comp (continuousAt_const.prodMk hInner)) refine ⟨hcont, anchoredSolution_at_base A b R₀ y₀ x₀ hR hy, ?_⟩ filter_upwards [hev] with x hx exact anchoredSolution_eq_of_det_ne_zero A b R₀ y₀ x hx
CausalSmith.Stat.LdpAteEfficiencySurface.exists_eventually_anchoredSolution_of_rightInverse · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Continuity.lean:234
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.R3Rigidity 3 declarations The strict certificate confines every optimal staircase design to the three active masks.

Rigidity of the three-ray certificate

The strict certificate confines every optimal staircase design to the three active masks. At privacy level log 3, normalization then fixes all three weights to 1/5.

theorem r3Certificate_profile_optimal_and_rigid

Under the supplied quantities and conditions, the r3 certificate profile optimal and rigid assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 ε :
ℝ
hx :
(p, μ0, μ1, ε) ∈ R3
θ :
fun k ↦ if k = 0 then μ0 else μ1 (: TrialParameter)
∃ α : StaircaseWeight,
activeSupport α ({0, 5, 7} : Finset (Fin 14))
conclusion 1
s ∈ ({0, 5, 7} : Finset (Fin 14)) :
0 < α s
conclusion 2
Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v}
conclusion 3
Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v}
s ∉ ({0, 5, 7} : Finset (Fin 14)) :
β s = 0
Proof (Lean source)
lemma r3Certificate_profile_optimal_and_rigid (p μ0 μ1 ε : ℝ) (hx : (p, μ0, μ1, ε) ∈ R3) : let θ : TrialParameter := fun k ↦ if k = 0 then μ0 else μ1 ∃ α : StaircaseWeight, staircaseFeasible ε α ∧ activeSupport α ({0, 5, 7} : Finset (Fin 14)) ∧ (∀ s ∈ ({0, 5, 7} : Finset (Fin 14)), 0 < α s) ∧ Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} ∧ ∀ β : StaircaseWeight, staircaseFeasible ε β → Jstar θ p ε = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} → ∀ s ∉ ({0, 5, 7} : Finset (Fin 14)), β s = 0 := by dsimp only change 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < ε ∧ ∃ α : StaircaseWeight, ∃ t : ℝ, ∃ η : Fin 4 → ℝ, staircaseFeasible ε α ∧ activeSupport α ({0, 5, 7} : Finset (Fin 14)) ∧ (∀ s ∈ ({0, 5, 7} : Finset (Fin 14)), 0 < α s) ∧ (∑ s : Fin 14, α s * patternInformationSlope (fun k ↦ if k = 0 then μ0 else μ1) p ε s t) = 0 ∧ (∀ s ∈ ({0, 5, 7} : Finset (Fin 14)), dualRay ε η s = patternInformation (fun k ↦ if k = 0 then μ0 else μ1) p ε s t) ∧ (∀ s ∉ ({0, 5, 7} : Finset (Fin 14)), patternInformation (fun k ↦ if k = 0 then μ0 else μ1) p ε s t < dualRay ε η s) ∧ (false → ∀ s ∈ ({0, 5, 7} : Finset (Fin 14)), ∀ u ∈ ({0, 5, 7} : Finset (Fin 14)), s ≠ u → projectedScore (fun k ↦ if k = 0 then μ0 else μ1) p ε s t ≠ projectedScore (fun k ↦ if k = 0 then μ0 else μ1) p ε u t) at hx rcases hx with ⟨hp0, hp1, hμ0, hμ0', hμ1, hμ1', hε, α, t, η, hα, hsupp, hpos, hstat, hactive, hinactive, _⟩ have hp : InteriorAssignment p := ⟨hp0, hp1⟩ have hθ : InteriorMeans (fun k ↦ if k = 0 then μ0 else μ1) := by change 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 exact ⟨hμ0, hμ0', hμ1, hμ1'⟩ obtain ⟨hopt, hrigid⟩ := strictCertificate_profile_optimal_and_rigid (fun k ↦ if k = 0 then μ0 else μ1) p ε hp hθ hε.le ({0, 5, 7} : Finset (Fin 14)) α t η hα hsupp hstat hactive hinactive exact ⟨α, hα, hsupp, hpos, hopt, hrigid⟩
CausalSmith.Stat.LdpAteEfficiencySurface.r3Certificate_profile_optimal_and_rigid · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Rigidity.lean:20
theorem r3_feasible_eq_canonical

the r3 feasible eq canonical assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r3 feasible eq canonical.

Formal statement
hβ :
hout :
∀ s ∉ ({0, 5, 7} : Finset (Fin 14)), β s = 0
β = fun s ↦ if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0
Proof (Lean source)
lemma r3_feasible_eq_canonical (β : StaircaseWeight) (hβ : staircaseFeasible (log 3) β) (hout : ∀ s ∉ ({0, 5, 7} : Finset (Fin 14)), β s = 0) : β = fun s ↦ if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0 := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have h0 := hβ.2 0 have h1 := hβ.2 1 have h2 := hβ.2 2 have h3 := hβ.2 3 simp +decide [staircaseMatrix, patternRay, patternContains, privacyIncrement, privacyRatio, he, Fin.sum_univ_succ, hout] at h0 h1 h2 h3 funext s by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · have hs' : s = 0 ∨ s = 5 ∨ s = 7 := by simpa using hs rcases hs' with rfl | rfl | rfl <;> simp +decide <;> linarith · rw [hout s hs] simp [hs]
CausalSmith.Stat.LdpAteEfficiencySurface.r3_feasible_eq_canonical · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Rigidity.lean:66
theorem r3Certificate_unique_optimum_log3

Under the supplied quantities and conditions, the r3 certificate unique optimum log3 assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 :
ℝ
hx :
(p, μ0, μ1, log 3) ∈ R3
θ :
fun k ↦ if k = 0 then μ0 else μ1 (: TrialParameter)
∃ α : StaircaseWeight,
activeSupport α ({0, 5, 7} : Finset (Fin 14))
Jstar θ p (log 3)
= sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p (log 3) α v}
conclusion 1
Jstar θ p (log 3)
= sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p (log 3) β v}
β = α
Proof (Lean source)
lemma r3Certificate_unique_optimum_log3 (p μ0 μ1 : ℝ) (hx : (p, μ0, μ1, log 3) ∈ R3) : let θ : TrialParameter := fun k ↦ if k = 0 then μ0 else μ1 ∃ α : StaircaseWeight, staircaseFeasible (log 3) α ∧ activeSupport α ({0, 5, 7} : Finset (Fin 14)) ∧ Jstar θ p (log 3) = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p (log 3) α v} ∧ ∀ β : StaircaseWeight, staircaseFeasible (log 3) β → Jstar θ p (log 3) = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p (log 3) β v} → β = α := by dsimp only obtain ⟨α, hα, hsupp, _, hopt, hrigid⟩ := r3Certificate_profile_optimal_and_rigid p μ0 μ1 (log 3) hx have houtα : ∀ s ∉ ({0, 5, 7} : Finset (Fin 14)), α s = 0 := by intro s hs by_contra hn exact hs ((hsupp s).mp hn) have hαcanonical := r3_feasible_eq_canonical α hα houtα refine ⟨α, hα, hsupp, hopt, ?_⟩ intro β hβ hβopt have hβcanonical := r3_feasible_eq_canonical β hβ (hrigid β hβ hβopt) exact hβcanonical.trans hαcanonical.symm
CausalSmith.Stat.LdpAteEfficiencySurface.r3Certificate_unique_optimum_log3 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R3Rigidity.lean:88
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.R5Continuity 48 declarations The four active rows used to determine the dual certificate have an explicit right inverse throughout the positive-privacy parameter region.

Continuous active-dual solver for the five-output region

The four active rows used to determine the dual certificate have an explicit right inverse throughout the positive-privacy parameter region. The fifth active equality is supplied separately by the two constituent-objective identity in the R5 continuation argument.

def r5DualMask

For the supplied quantities and conditions, the r5 dual mask is the mathematical object specified below.

Definition (Lean source)
i :
Fin 4
r5DualMask i :
Fin 14
![2, 3, 5, 7] i
def r5DualMatrix

The dual constraint matrix for the five-output region is determined by the displayed parameters.

Definition (Lean source)
r5DualMatrix x :
Matrix (Fin 4) (Fin 4) ℝ
fun i j => patternRay x.2.2.2 (r5DualMask i) j
CausalSmith.Stat.LdpAteEfficiencySurface.r5DualMatrix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:21
def r5DualRightInverse

A right inverse for the five-output dual matrix is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
r5DualRightInverse ε :
Matrix (Fin 4) (Fin 4) ℝ
r :
exp ε
a :
(r - 1) * (r + 2)
!![(r + 1) / a, (r + 1) / a, -1 / (r - 1), -1 / a; 0, -1 / (r - 1), 1 / (r - 1), 0; -1 / a, (r + 1) / a, 0, -1 / a; -1 / a, -1 / a, 0, (r + 1) / a]
CausalSmith.Stat.LdpAteEfficiencySurface.r5DualRightInverse · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:25
theorem r5DualMatrix_mul_rightInverse

Under the supplied quantities and conditions, the r5 dual matrix mul right inverse assertion holds. Under the stated assumptions, the r5 Dual Matrix mul right Inverse.

Formal statement
hε :
0 < x.2.2.2
Proof (Lean source)
lemma r5DualMatrix_mul_rightInverse (x : RegionParameter) (hε : 0 < x.2.2.2) : r5DualMatrix x * r5DualRightInverse x.2.2.2 = 1 := by have hr : 1 < exp x.2.2.2 := (Real.one_lt_exp_iff).2 hε have hd1 : exp x.2.2.2 - 1 ≠ 0 := by positivity have hda : (exp x.2.2.2 - 1) * (exp x.2.2.2 + 2) ≠ 0 := by positivity ext i k change (∑ j : Fin 4, r5DualMatrix x i j * r5DualRightInverse x.2.2.2 j k) = (1 : Matrix (Fin 4) (Fin 4) ℝ) i k fin_cases i <;> fin_cases k <;> simp +decide [r5DualMatrix, r5DualRightInverse, r5DualMask, patternRay, patternContains, privacyIncrement, privacyRatio, Fin.sum_univ_succ] <;> field_simp [hd1, hda] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.r5DualMatrix_mul_rightInverse · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:34
theorem continuous_r5DualMatrix

the continuous r5 dual matrix assertion holds.

Formal statement
Proof (Lean source)
lemma continuous_r5DualMatrix : Continuous r5DualMatrix := by apply continuous_matrix intro i j exact continuous_patternRay_region (r5DualMask i) j
CausalSmith.Stat.LdpAteEfficiencySurface.continuous_r5DualMatrix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:51
def r5BinaryObjective

The normalized objective contributed by the two binary active rays. The r5 Binary Objective is determined by the displayed parameters.

Definition (Lean source)
t :
ℝ
r5BinaryObjective x t :
ℝ
(patternInformation (regionTheta x) x.1 x.2.2.2 5 t + patternInformation (regionTheta x) x.1 x.2.2.2 8 t) / (exp x.2.2.2 + 1)
CausalSmith.Stat.LdpAteEfficiencySurface.r5BinaryObjective · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:57
def r5TernaryObjective

The normalized objective contributed by the three ternary active rays. The r5 Ternary Objective is determined by the displayed parameters.

Definition (Lean source)
t :
ℝ
r5TernaryObjective x t :
ℝ
(patternInformation (regionTheta x) x.1 x.2.2.2 2 t + patternInformation (regionTheta x) x.1 x.2.2.2 3 t + patternInformation (regionTheta x) x.1 x.2.2.2 7 t) / (exp x.2.2.2 + 2)
CausalSmith.Stat.LdpAteEfficiencySurface.r5TernaryObjective · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:63
def r5BinaryCoeff

The binary component coefficient in the five-output continuation argument is determined by the displayed parameters.

Definition (Lean source)
r5BinaryCoeff x :
ℝ
privacyIncrement x.2.2.2 ^ 2 / (exp x.2.2.2 + 1) * (1 / patternMass (regionTheta x) x.1 x.2.2.2 5 + 1 / patternMass (regionTheta x) x.1 x.2.2.2 8)
CausalSmith.Stat.LdpAteEfficiencySurface.r5BinaryCoeff · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:70
def r5TernaryCoeff

The ternary component coefficient in the five-output continuation argument is determined by the displayed parameters.

Definition (Lean source)
r5TernaryCoeff x :
ℝ
privacyIncrement x.2.2.2 ^ 2 * x.1 ^ 2 / (exp x.2.2.2 + 2) * (1 / patternMass (regionTheta x) x.1 x.2.2.2 3 + 1 / patternMass (regionTheta x) x.1 x.2.2.2 7)
CausalSmith.Stat.LdpAteEfficiencySurface.r5TernaryCoeff · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:76
theorem r5BinaryObjective_eq_quadratic

Under the supplied quantities and conditions, the r5 binary objective eq quadratic assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
t :
ℝ
hm5 :
patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0
hm8 :
patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0
r5BinaryObjective x t = r5BinaryCoeff x * (x.1 - (1 - 2 * x.1) * t) ^ 2
Proof (Lean source)
lemma r5BinaryObjective_eq_quadratic (x : RegionParameter) (t : ℝ) (hm5 : patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0) (hm8 : patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0) : r5BinaryObjective x t = r5BinaryCoeff x * (x.1 - (1 - 2 * x.1) * t) ^ 2 := by have hd : exp x.2.2.2 + 1 ≠ 0 := by positivity unfold r5BinaryObjective r5BinaryCoeff patternInformation simp +decide [projectedGradient, patternGradient, patternContains, controlProb, direction, Fin.sum_univ_succ] field_simp [hm5, hm8, hd] ring
CausalSmith.Stat.LdpAteEfficiencySurface.r5BinaryObjective_eq_quadratic · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:83
theorem r5TernaryObjective_eq_quadratic

Under the supplied quantities and conditions, the r5 ternary objective eq quadratic assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
t :
ℝ
hm3 :
patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0
hm7 :
patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0
r5TernaryObjective x t = r5TernaryCoeff x * (t + 1) ^ 2
Proof (Lean source)
lemma r5TernaryObjective_eq_quadratic (x : RegionParameter) (t : ℝ) (hm3 : patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0) (hm7 : patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0) : r5TernaryObjective x t = r5TernaryCoeff x * (t + 1) ^ 2 := by have hd : exp x.2.2.2 + 2 ≠ 0 := by positivity unfold r5TernaryObjective r5TernaryCoeff patternInformation simp +decide [projectedGradient, patternGradient, patternContains, controlProb, direction, Fin.sum_univ_succ] field_simp [hm3, hm7, hd]
CausalSmith.Stat.LdpAteEfficiencySurface.r5TernaryObjective_eq_quadratic · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:96
theorem r5Coeffs_pos_of_interior

Under the supplied quantities and conditions, the r5 coeffs pos of interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r5 Coeffs pos of interior.

Formal statement
hp0 :
0 < x.1
hp1 :
x.1 < 1
hμ00 :
0 < x.2.1
hμ01 :
x.2.1 < 1
hμ10 :
0 < x.2.2.1
hμ11 :
x.2.2.1 < 1
hε :
0 < x.2.2.2
conclusion 1
conclusion 2
Proof (Lean source)
lemma r5Coeffs_pos_of_interior (x : RegionParameter) (hp0 : 0 < x.1) (hp1 : x.1 < 1) (hμ00 : 0 < x.2.1) (hμ01 : x.2.1 < 1) (hμ10 : 0 < x.2.2.1) (hμ11 : x.2.2.1 < 1) (hε : 0 < x.2.2.2) : 0 < r5BinaryCoeff x ∧ 0 < r5TernaryCoeff x := by have hd : 0 < privacyIncrement x.2.2.2 := by unfold privacyIncrement privacyRatio exact sub_pos.mpr ((Real.one_lt_exp_iff).2 hε) have hm (s : Fin 14) : 0 < patternMass (regionTheta x) x.1 x.2.2.2 s := by exact patternMass_pos_of_interior x.1 x.2.1 x.2.2.1 x.2.2.2 hp0 hp1 hμ00 hμ01 hμ10 hμ11 s constructor · unfold r5BinaryCoeff exact mul_pos (div_pos (sq_pos_of_pos hd) (by positivity)) (add_pos (one_div_pos.mpr (hm 5)) (one_div_pos.mpr (hm 8))) · unfold r5TernaryCoeff exact mul_pos (div_pos (mul_pos (sq_pos_of_pos hd) (sq_pos_of_pos hp0)) (by positivity)) (add_pos (one_div_pos.mpr (hm 3)) (one_div_pos.mpr (hm 7)))
CausalSmith.Stat.LdpAteEfficiencySurface.r5Coeffs_pos_of_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:107
theorem continuousAt_r5BinaryCoeff

Under the supplied quantities and conditions, the continuous at r5 binary coeff assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
hm5 :
patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0
hm8 :
patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0
Proof (Lean source)
lemma continuousAt_r5BinaryCoeff (x : RegionParameter) (hm5 : patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0) (hm8 : patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0) : ContinuousAt r5BinaryCoeff x := by unfold r5BinaryCoeff privacyIncrement privacyRatio apply ContinuousAt.mul · apply ContinuousAt.div · exact (((Real.continuous_exp.comp continuous_snd.snd.snd).sub continuous_const).pow 2).continuousAt · exact ((Real.continuous_exp.comp continuous_snd.snd.snd).add continuous_const).continuousAt · positivity · apply ContinuousAt.add · exact continuousAt_const.div (continuous_patternMass_region 5).continuousAt hm5 · exact continuousAt_const.div (continuous_patternMass_region 8).continuousAt hm8
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_r5BinaryCoeff · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:132
theorem continuousAt_r5TernaryCoeff

Under the supplied quantities and conditions, the continuous at r5 ternary coeff assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
hm3 :
patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0
hm7 :
patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0
Proof (Lean source)
lemma continuousAt_r5TernaryCoeff (x : RegionParameter) (hm3 : patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0) (hm7 : patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0) : ContinuousAt r5TernaryCoeff x := by unfold r5TernaryCoeff privacyIncrement privacyRatio apply ContinuousAt.mul · apply ContinuousAt.div · exact ((((Real.continuous_exp.comp continuous_snd.snd.snd).sub continuous_const).pow 2).mul (continuous_fst.pow 2)).continuousAt · exact ((Real.continuous_exp.comp continuous_snd.snd.snd).add continuous_const).continuousAt · positivity · apply ContinuousAt.add · exact continuousAt_const.div (continuous_patternMass_region 3).continuousAt hm3 · exact continuousAt_const.div (continuous_patternMass_region 7).continuousAt hm7
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_r5TernaryCoeff · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:151
def r5Scale

The scaling factor in the five-output continuation argument is determined by the displayed parameters.

Definition (Lean source)
r5Scale x :
ℝ
def r5DirectionBranch

The selected directional branch for the five-output region is determined by the displayed parameters.

Definition (Lean source)
σ :
ℝ
r5DirectionBranch σ x :
ℝ
(x.1 - σ * r5Scale x) / (1 - 2 * x.1 + σ * r5Scale x)
CausalSmith.Stat.LdpAteEfficiencySurface.r5DirectionBranch · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:174
theorem r5Scale_sq

Under the supplied quantities and conditions, the r5 scale sq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
hA :
hC :
Proof (Lean source)
lemma r5Scale_sq (x : RegionParameter) (hA : 0 < r5BinaryCoeff x) (hC : 0 ≤ r5TernaryCoeff x) : r5Scale x ^ 2 = r5TernaryCoeff x / r5BinaryCoeff x := by unfold r5Scale rw [Real.sq_sqrt] exact div_nonneg hC hA.le
theorem r5DirectionBranch_objectives_eq

Under the supplied quantities and conditions, the r5 direction branch objectives eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r5 Direction Branch objectives eq.

Formal statement
σ :
ℝ
hσ :
σ ^ 2 = 1
hA :
hC :
hden :
1 - 2 * x.1 + σ * r5Scale x ≠ 0
r5BinaryCoeff x * (x.1 - (1 - 2 * x.1) * r5DirectionBranch σ x) ^ 2
= r5TernaryCoeff x * (r5DirectionBranch σ x + 1) ^ 2
Proof (Lean source)
lemma r5DirectionBranch_objectives_eq (x : RegionParameter) (σ : ℝ) (hσ : σ ^ 2 = 1) (hA : 0 < r5BinaryCoeff x) (hC : 0 ≤ r5TernaryCoeff x) (hden : 1 - 2 * x.1 + σ * r5Scale x ≠ 0) : r5BinaryCoeff x * (x.1 - (1 - 2 * x.1) * r5DirectionBranch σ x) ^ 2 = r5TernaryCoeff x * (r5DirectionBranch σ x + 1) ^ 2 := by have hs := r5Scale_sq x hA hC have hden' : 1 - x.1 * 2 + σ * r5Scale x ≠ 0 := by convert hden using 1 <;> ring have hleft : x.1 - (1 - 2 * x.1) * r5DirectionBranch σ x = σ * r5Scale x * (1 - x.1) / (1 - 2 * x.1 + σ * r5Scale x) := by unfold r5DirectionBranch field_simp [hden, hden'] ring have hright : r5DirectionBranch σ x + 1 = (1 - x.1) / (1 - 2 * x.1 + σ * r5Scale x) := by unfold r5DirectionBranch field_simp [hden, hden'] ring have hCA : r5BinaryCoeff x * r5Scale x ^ 2 = r5TernaryCoeff x := by rw [hs, mul_div_cancel₀ _ (ne_of_gt hA)] have hcore : r5BinaryCoeff x * σ ^ 2 * r5Scale x ^ 2 = r5TernaryCoeff x := by rw [hσ, mul_one] exact hCA rw [hleft, hright] field_simp [hden] rw [hcore] ring
CausalSmith.Stat.LdpAteEfficiencySurface.r5DirectionBranch_objectives_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:186
theorem exists_r5DirectionBranch_eq

Under the supplied quantities and conditions, the exists r5 direction branch eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
t :
ℝ
hp1 :
x.1 < 1
hA :
hC :
heq :
r5BinaryCoeff x * (x.1 - (1 - 2 * x.1) * t) ^ 2 = r5TernaryCoeff x * (t + 1) ^ 2
∃ σ : ℝ,
conclusion 1
σ = 1 ∨ σ = -1
conclusion 2
1 - 2 * x.1 + σ * r5Scale x ≠ 0
conclusion 3
Proof (Lean source)
lemma exists_r5DirectionBranch_eq (x : RegionParameter) (t : ℝ) (hp1 : x.1 < 1) (hA : 0 < r5BinaryCoeff x) (hC : 0 ≤ r5TernaryCoeff x) (heq : r5BinaryCoeff x * (x.1 - (1 - 2 * x.1) * t) ^ 2 = r5TernaryCoeff x * (t + 1) ^ 2) : ∃ σ : ℝ, (σ = 1 ∨ σ = -1) ∧ 1 - 2 * x.1 + σ * r5Scale x ≠ 0 ∧ r5DirectionBranch σ x = t := by have hs := r5Scale_sq x hA hC have hCA : r5BinaryCoeff x * r5Scale x ^ 2 = r5TernaryCoeff x := by rw [hs, mul_div_cancel₀ _ (ne_of_gt hA)] have habsq : (x.1 - (1 - 2 * x.1) * t) ^ 2 = (r5Scale x * (t + 1)) ^ 2 := by rw [← hCA] at heq nlinarith [sq_nonneg (x.1 - (1 - 2 * x.1) * t), sq_nonneg (r5Scale x * (t + 1))] rcases (sq_eq_sq_iff_eq_or_eq_neg.mp habsq) with hrel | hrel · refine ⟨1, inl rfl, ?_, ?_⟩ · intro hden have hnum : x.1 - r5Scale x = 0 := by linear_combination hrel + t * hden nlinarith · unfold r5DirectionBranch rw [div_eq_iff (by intro hden have hnum : x.1 - r5Scale x = 0 := by linear_combination hrel + t * hden nlinarith : 1 - 2 * x.1 + 1 * r5Scale x ≠ 0)] nlinarith · refine ⟨-1, inr rfl, ?_, ?_⟩ · intro hden have hnum : x.1 + r5Scale x = 0 := by linear_combination hrel + t * hden nlinarith · unfold r5DirectionBranch rw [div_eq_iff (by intro hden have hnum : x.1 + r5Scale x = 0 := by linear_combination hrel + t * hden nlinarith : 1 - 2 * x.1 + (-1) * r5Scale x ≠ 0)] nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.exists_r5DirectionBranch_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:222
theorem continuousAt_r5Scale

Under the supplied quantities and conditions, the continuous at r5 scale assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
hA :
hm3 :
patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0
hm5 :
patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0
hm7 :
patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0
hm8 :
patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0
Proof (Lean source)
lemma continuousAt_r5Scale (x : RegionParameter) (hA : r5BinaryCoeff x ≠ 0) (hm3 : patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0) (hm5 : patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0) (hm7 : patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0) (hm8 : patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0) : ContinuousAt r5Scale x := by unfold r5Scale exact Real.continuous_sqrt.continuousAt.comp ((continuousAt_r5TernaryCoeff x hm3 hm7).div (continuousAt_r5BinaryCoeff x hm5 hm8) hA)
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_r5Scale · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:265
theorem continuousAt_r5DirectionBranch

Under the supplied quantities and conditions, the continuous at r5 direction branch assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
σ :
ℝ
hA :
hm3 :
patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0
hm5 :
patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0
hm7 :
patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0
hm8 :
patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0
hden :
1 - 2 * x.1 + σ * r5Scale x ≠ 0
Proof (Lean source)
lemma continuousAt_r5DirectionBranch (x : RegionParameter) (σ : ℝ) (hA : r5BinaryCoeff x ≠ 0) (hm3 : patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0) (hm5 : patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0) (hm7 : patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0) (hm8 : patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0) (hden : 1 - 2 * x.1 + σ * r5Scale x ≠ 0) : ContinuousAt (r5DirectionBranch σ) x := by have hs := continuousAt_r5Scale x hA hm3 hm5 hm7 hm8 unfold r5DirectionBranch apply ContinuousAt.div · exact continuous_fst.continuousAt.sub (continuousAt_const.mul hs) · exact (continuousAt_const.sub (continuousAt_const.mul continuous_fst.continuousAt)).add (continuousAt_const.mul hs) · exact hden
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_r5DirectionBranch · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:278
def r5MixtureCoordinate

The mixture coordinate induced by a staircase weight is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
r5MixtureCoordinate ε α :
ℝ
(exp ε + 1) * α 5
CausalSmith.Stat.LdpAteEfficiencySurface.r5MixtureCoordinate · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:295
theorem r5_supported_feasible_parameterization

Under the supplied quantities and conditions, the r5 supported feasible parameterization assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r5 supported feasible parameterization.

Formal statement
ε :
ℝ
hε :
0 < ε
hα :
hout :
∀ s ∉ r5Active, α s = 0
conclusion 1
α 5 = r5MixtureCoordinate ε α / (exp ε + 1)
conclusion 2
α 8 = r5MixtureCoordinate ε α / (exp ε + 1)
conclusion 3
α 2 = (1 - r5MixtureCoordinate ε α) / (exp ε + 2)
conclusion 4
α 3 = (1 - r5MixtureCoordinate ε α) / (exp ε + 2)
conclusion 5
α 7 = (1 - r5MixtureCoordinate ε α) / (exp ε + 2)
Proof (Lean source)
lemma r5_supported_feasible_parameterization (ε : ℝ) (hε : 0 < ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (hout : ∀ s ∉ r5Active, α s = 0) : α 5 = r5MixtureCoordinate ε α / (exp ε + 1) ∧ α 8 = r5MixtureCoordinate ε α / (exp ε + 1) ∧ α 2 = (1 - r5MixtureCoordinate ε α) / (exp ε + 2) ∧ α 3 = (1 - r5MixtureCoordinate ε α) / (exp ε + 2) ∧ α 7 = (1 - r5MixtureCoordinate ε α) / (exp ε + 2) := by obtain ⟨h23, h37, h58, hnorm⟩ := r5_supported_feasible_coordinates ε hε α hα hout have hd1 : exp ε + 1 ≠ 0 := by positivity have hd2 : exp ε + 2 ≠ 0 := by positivity have h5 : α 5 = r5MixtureCoordinate ε α / (exp ε + 1) := by unfold r5MixtureCoordinate field_simp [hd1] have h2 : α 2 = (1 - r5MixtureCoordinate ε α) / (exp ε + 2) := by unfold r5MixtureCoordinate apply (eq_div_iff hd2).2 nlinarith exact ⟨h5, h58 ▸ h5, h2, h23 ▸ h2, h37 ▸ h23 ▸ h2⟩
CausalSmith.Stat.LdpAteEfficiencySurface.r5_supported_feasible_parameterization · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:299
theorem r5MixtureCoordinate_mem_Ioo

Under the supplied quantities and conditions, the r5 mixture coordinate mem ioo assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r5 Mixture Coordinate mem Ioo.

Formal statement
ε :
ℝ
hε :
0 < ε
hα :
hout :
∀ s ∉ r5Active, α s = 0
hpos :
∀ s ∈ r5Active, 0 < α s
r5MixtureCoordinate ε α ∈ Ioo 0 1
Proof (Lean source)
lemma r5MixtureCoordinate_mem_Ioo (ε : ℝ) (hε : 0 < ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (hout : ∀ s ∉ r5Active, α s = 0) (hpos : ∀ s ∈ r5Active, 0 < α s) : r5MixtureCoordinate ε α ∈ Ioo 0 1 := by obtain ⟨_, _, h2, _, _⟩ := r5_supported_feasible_parameterization ε hε α hα hout have hu0 : 0 < r5MixtureCoordinate ε α := by unfold r5MixtureCoordinate exact mul_pos (by positivity) (hpos 5 (by simp [r5Active])) have h2pos := hpos 2 (by simp [r5Active]) have hd2 : 0 < exp ε + 2 := by positivity rw [h2] at h2pos rcases div_pos_iff.mp h2pos with h | h · exact ⟨hu0, by linarith [h.1]⟩ · linarith [h.2]
CausalSmith.Stat.LdpAteEfficiencySurface.r5MixtureCoordinate_mem_Ioo · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:323
def r5BinaryDerivative

The derivative of the binary continuation component is determined by the displayed parameters.

Definition (Lean source)
t :
ℝ
r5BinaryDerivative x t :
ℝ
(patternInformationSlope (regionTheta x) x.1 x.2.2.2 5 t + patternInformationSlope (regionTheta x) x.1 x.2.2.2 8 t) / (exp x.2.2.2 + 1)
CausalSmith.Stat.LdpAteEfficiencySurface.r5BinaryDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:343
def r5TernaryDerivative

The derivative of the ternary continuation component is determined by the displayed parameters.

Definition (Lean source)
t :
ℝ
r5TernaryDerivative x t :
ℝ
(patternInformationSlope (regionTheta x) x.1 x.2.2.2 2 t + patternInformationSlope (regionTheta x) x.1 x.2.2.2 3 t + patternInformationSlope (regionTheta x) x.1 x.2.2.2 7 t) / (exp x.2.2.2 + 2)
CausalSmith.Stat.LdpAteEfficiencySurface.r5TernaryDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:349
theorem r5BinaryDerivative_eq

Under the supplied quantities and conditions, the r5 binary derivative eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
t :
ℝ
hm5 :
patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0
hm8 :
patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0
r5BinaryDerivative x t = -2 * r5BinaryCoeff x * (1 - 2 * x.1) * (x.1 - (1 - 2 * x.1) * t)
Proof (Lean source)
lemma r5BinaryDerivative_eq (x : RegionParameter) (t : ℝ) (hm5 : patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0) (hm8 : patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0) : r5BinaryDerivative x t = -2 * r5BinaryCoeff x * (1 - 2 * x.1) * (x.1 - (1 - 2 * x.1) * t) := by have hd : exp x.2.2.2 + 1 ≠ 0 := by positivity unfold r5BinaryDerivative r5BinaryCoeff patternInformationSlope simp +decide [projectedGradient, patternGradient, patternContains, controlProb, direction, Fin.sum_univ_succ] field_simp [hm5, hm8, hd] ring
CausalSmith.Stat.LdpAteEfficiencySurface.r5BinaryDerivative_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:357
theorem r5TernaryDerivative_eq

Under the supplied quantities and conditions, the r5 ternary derivative eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
t :
ℝ
hm3 :
patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0
hm7 :
patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0
r5TernaryDerivative x t = 2 * r5TernaryCoeff x * (t + 1)
Proof (Lean source)
lemma r5TernaryDerivative_eq (x : RegionParameter) (t : ℝ) (hm3 : patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0) (hm7 : patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0) : r5TernaryDerivative x t = 2 * r5TernaryCoeff x * (t + 1) := by have hd : exp x.2.2.2 + 2 ≠ 0 := by positivity unfold r5TernaryDerivative r5TernaryCoeff patternInformationSlope simp +decide [projectedGradient, patternGradient, patternContains, controlProb, direction, Fin.sum_univ_succ] field_simp [hm3, hm7, hd]
CausalSmith.Stat.LdpAteEfficiencySurface.r5TernaryDerivative_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:371
theorem r5_stationarity_eq_mixture

Under the supplied quantities and conditions, the r5 stationarity eq mixture assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r5 stationarity eq mixture.

Formal statement
hε :
0 < x.2.2.2
hα :
hout :
∀ s ∉ r5Active, α s = 0
t :
ℝ
hstationary :
(∑ s : Fin 14, α s * patternInformationSlope (regionTheta x) x.1 x.2.2.2 s t) = 0
Proof (Lean source)
lemma r5_stationarity_eq_mixture (x : RegionParameter) (α : StaircaseWeight) (hε : 0 < x.2.2.2) (hα : staircaseFeasible x.2.2.2 α) (hout : ∀ s ∉ r5Active, α s = 0) (t : ℝ) (hstationary : (∑ s : Fin 14, α s * patternInformationSlope (regionTheta x) x.1 x.2.2.2 s t) = 0) : r5MixtureCoordinate x.2.2.2 α * r5BinaryDerivative x t + (1 - r5MixtureCoordinate x.2.2.2 α) * r5TernaryDerivative x t = 0 := by obtain ⟨h5, h8, h2, h3, h7⟩ := r5_supported_feasible_parameterization x.2.2.2 hε α hα hout have hd1 : exp x.2.2.2 + 1 ≠ 0 := by positivity have hd2 : exp x.2.2.2 + 2 ≠ 0 := by positivity unfold r5BinaryDerivative r5TernaryDerivative simp only [Fin.sum_univ_succ] at hstationary simp +decide [r5Active, hout] at hstationary rw [h2, h3, h5, h7, h8] at hstationary field_simp [hd1, hd2] at hstationary ⊢ nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.r5_stationarity_eq_mixture · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:382
theorem r5TernaryDerivative_ne_zero_of_objectives_eq

Under the supplied quantities and conditions, the r5 ternary derivative ne zero of objectives eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
t :
ℝ
hp1 :
x.1 < 1
hA :
hC :
hm3 :
patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0
hm7 :
patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0
heq :
r5BinaryCoeff x * (x.1 - (1 - 2 * x.1) * t) ^ 2 = r5TernaryCoeff x * (t + 1) ^ 2
Proof (Lean source)
lemma r5TernaryDerivative_ne_zero_of_objectives_eq (x : RegionParameter) (t : ℝ) (hp1 : x.1 < 1) (hA : 0 < r5BinaryCoeff x) (hC : 0 < r5TernaryCoeff x) (hm3 : patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0) (hm7 : patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0) (heq : r5BinaryCoeff x * (x.1 - (1 - 2 * x.1) * t) ^ 2 = r5TernaryCoeff x * (t + 1) ^ 2) : r5TernaryDerivative x t ≠ 0 := by rw [r5TernaryDerivative_eq x t hm3 hm7] intro hz have ht : t + 1 = 0 := by nlinarith rw [ht, zero_pow (by norm_num : (2 : ℕ) ≠ 0), mul_zero] at heq have hpzero : x.1 - (1 - 2 * x.1) * t = 0 := by have hsquare : (x.1 - (1 - 2 * x.1) * t) ^ 2 = 0 := (mul_eq_zero.mp heq).resolve_left (ne_of_gt hA) exact (sq_eq_zero_iff).mp hsquare nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.r5TernaryDerivative_ne_zero_of_objectives_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:404
theorem mixture_stationarity_solve

the mixture stationarity solve assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
u P R :
ℝ
hR :
R ≠ 0
hstationary :
u * P + (1 - u) * R = 0
conclusion 1
P - R ≠ 0
conclusion 2
u = -R / (P - R)
Proof (Lean source)
lemma mixture_stationarity_solve {u P R : ℝ} (hR : R ≠ 0) (hstationary : u * P + (1 - u) * R = 0) : P - R ≠ 0 ∧ u = -R / (P - R) := by have hden : P - R ≠ 0 := by intro h have : P = R := by linarith rw [this] at hstationary apply hR linear_combination hstationary refine ⟨hden, ?_⟩ apply (eq_div_iff hden).2 nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.mixture_stationarity_solve · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:423
def r5ContinuedMixture

The continued mixture coordinate for the five-output region is determined by the displayed parameters.

Definition (Lean source)
σ :
ℝ
r5ContinuedMixture σ x :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.r5ContinuedMixture · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:437
theorem r5ContinuedMixture_eq

Under the supplied quantities and conditions, the r5 continued mixture eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r5 Continued Mixture eq.

Formal statement
t σ :
ℝ
ht :
hε :
0 < x.2.2.2
hα :
hout :
∀ s ∉ r5Active, α s = 0
hstationary :
(∑ s : Fin 14, α s * patternInformationSlope (regionTheta x) x.1 x.2.2.2 s t) = 0
hR :
Proof (Lean source)
lemma r5ContinuedMixture_eq (x : RegionParameter) (α : StaircaseWeight) (t σ : ℝ) (ht : r5DirectionBranch σ x = t) (hε : 0 < x.2.2.2) (hα : staircaseFeasible x.2.2.2 α) (hout : ∀ s ∉ r5Active, α s = 0) (hstationary : (∑ s : Fin 14, α s * patternInformationSlope (regionTheta x) x.1 x.2.2.2 s t) = 0) (hR : r5TernaryDerivative x t ≠ 0) : r5ContinuedMixture σ x = r5MixtureCoordinate x.2.2.2 α := by have hmix := r5_stationarity_eq_mixture x α hε hα hout t hstationary obtain ⟨_, hu⟩ := mixture_stationarity_solve hR hmix unfold r5ContinuedMixture rw [ht] exact hu.symm
CausalSmith.Stat.LdpAteEfficiencySurface.r5ContinuedMixture_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:443
theorem continuousAt_r5BinaryDerivative_comp

Under the supplied quantities and conditions, the continuous at r5 binary derivative comp assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
t :
ht :
hm5 :
patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0
hm8 :
patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0
ContinuousAt (fun y ↦ r5BinaryDerivative y (t y)) x
Proof (Lean source)
lemma continuousAt_r5BinaryDerivative_comp (x : RegionParameter) (t : RegionParameter → ℝ) (ht : ContinuousAt t x) (hm5 : patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0) (hm8 : patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0) : ContinuousAt (fun y ↦ r5BinaryDerivative y (t y)) x := by unfold r5BinaryDerivative apply ContinuousAt.div · exact (continuousAt_patternInformationSlope_region 5 t x ht hm5).add (continuousAt_patternInformationSlope_region 8 t x ht hm8) · exact ((Real.continuous_exp.comp continuous_snd.snd.snd).add continuous_const).continuousAt · positivity
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_r5BinaryDerivative_comp · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:461
theorem continuousAt_r5TernaryDerivative_comp

Under the supplied quantities and conditions, the continuous at r5 ternary derivative comp assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
t :
ht :
hm2 :
patternMass (regionTheta x) x.1 x.2.2.2 2 ≠ 0
hm3 :
patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0
hm7 :
patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0
ContinuousAt (fun y ↦ r5TernaryDerivative y (t y)) x
Proof (Lean source)
lemma continuousAt_r5TernaryDerivative_comp (x : RegionParameter) (t : RegionParameter → ℝ) (ht : ContinuousAt t x) (hm2 : patternMass (regionTheta x) x.1 x.2.2.2 2 ≠ 0) (hm3 : patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0) (hm7 : patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0) : ContinuousAt (fun y ↦ r5TernaryDerivative y (t y)) x := by unfold r5TernaryDerivative apply ContinuousAt.div · exact ((continuousAt_patternInformationSlope_region 2 t x ht hm2).add (continuousAt_patternInformationSlope_region 3 t x ht hm3)).add (continuousAt_patternInformationSlope_region 7 t x ht hm7) · exact ((Real.continuous_exp.comp continuous_snd.snd.snd).add continuous_const).continuousAt · positivity
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_r5TernaryDerivative_comp · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:475
theorem continuousAt_r5ContinuedMixture

Under the supplied quantities and conditions, the continuous at r5 continued mixture assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
σ :
ℝ
hm2 :
patternMass (regionTheta x) x.1 x.2.2.2 2 ≠ 0
hm3 :
patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0
hm5 :
patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0
hm7 :
patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0
hm8 :
patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0
Proof (Lean source)
lemma continuousAt_r5ContinuedMixture (x : RegionParameter) (σ : ℝ) (ht : ContinuousAt (r5DirectionBranch σ) x) (hm2 : patternMass (regionTheta x) x.1 x.2.2.2 2 ≠ 0) (hm3 : patternMass (regionTheta x) x.1 x.2.2.2 3 ≠ 0) (hm5 : patternMass (regionTheta x) x.1 x.2.2.2 5 ≠ 0) (hm7 : patternMass (regionTheta x) x.1 x.2.2.2 7 ≠ 0) (hm8 : patternMass (regionTheta x) x.1 x.2.2.2 8 ≠ 0) (hden : r5BinaryDerivative x (r5DirectionBranch σ x) - r5TernaryDerivative x (r5DirectionBranch σ x) ≠ 0) : ContinuousAt (r5ContinuedMixture σ) x := by have hP := continuousAt_r5BinaryDerivative_comp x (r5DirectionBranch σ) ht hm5 hm8 have hR := continuousAt_r5TernaryDerivative_comp x (r5DirectionBranch σ) ht hm2 hm3 hm7 unfold r5ContinuedMixture exact hR.neg.div (hP.sub hR) hden
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_r5ContinuedMixture · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:491
def r5WeightFromCoordinate

The staircase weight reconstructed from a mixture coordinate is determined by the displayed parameters.

Definition (Lean source)
ε u :
ℝ
r5WeightFromCoordinate ε u :
fun s ↦ if s
= 5 ∨ s = 8 then u / (exp ε + 1) else if s = 2 ∨ s = 3 ∨ s = 7 then (1 - u) / (exp ε + 2) else 0
CausalSmith.Stat.LdpAteEfficiencySurface.r5WeightFromCoordinate · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:509
theorem r5WeightFromCoordinate_feasible

Under the supplied quantities and conditions, the r5 weight from coordinate feasible assertion holds.

Formal statement
ε u :
ℝ
Proof (Lean source)
lemma r5WeightFromCoordinate_feasible (ε u : ℝ) : staircaseFeasible ε (r5WeightFromCoordinate ε u) ↔ u ∈ Icc 0 1 := by have hd1 : 0 < exp ε + 1 := by positivity have hd2 : 0 < exp ε + 2 := by positivity constructor · intro h have h5 := h.1 5 have h2 := h.1 2 simp +decide [r5WeightFromCoordinate] at h5 h2 constructor · rcases div_nonneg_iff.mp h5 with hpos | hneg · exact hpos.1 · exact False.elim ((not_le_of_gt hd1) hneg.2) · have hn : 0 ≤ 1 - u := by rcases div_nonneg_iff.mp h2 with hpos | hneg · exact hpos.1 · exact False.elim ((not_le_of_gt hd2) hneg.2) linarith · rintro ⟨hu0, hu1⟩ constructor · intro s unfold r5WeightFromCoordinate split_ifs <;> positivity · intro j rcases j with ⟨j, hj⟩ interval_cases j <;> simp +decide [staircaseMatrix, r5WeightFromCoordinate, patternRay, patternContains, privacyIncrement, privacyRatio, Fin.sum_univ_succ] <;> field_simp <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.r5WeightFromCoordinate_feasible · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:515
theorem r5WeightFromCoordinate_eq

Under the supplied quantities and conditions, the r5 weight from coordinate eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r5 Weight From Coordinate eq.

Formal statement
ε :
ℝ
hε :
0 < ε
hα :
hout :
∀ s ∉ r5Active, α s = 0
Proof (Lean source)
lemma r5WeightFromCoordinate_eq (ε : ℝ) (hε : 0 < ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (hout : ∀ s ∉ r5Active, α s = 0) : r5WeightFromCoordinate ε (r5MixtureCoordinate ε α) = α := by obtain ⟨h5, h8, h2, h3, h7⟩ := r5_supported_feasible_parameterization ε hε α hα hout funext s rcases s with ⟨s, hs⟩ interval_cases s <;> simp_all +decide [r5WeightFromCoordinate, r5Active]
CausalSmith.Stat.LdpAteEfficiencySurface.r5WeightFromCoordinate_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:547
theorem r5WeightFromCoordinate_active

Under the supplied quantities and conditions, the r5 weight from coordinate active assertion holds.

Formal statement
ε u :
ℝ
hu :
u ∈ Ioo 0 1
Proof (Lean source)
lemma r5WeightFromCoordinate_active (ε u : ℝ) (hu : u ∈ Ioo 0 1) : activeSupport (r5WeightFromCoordinate ε u) r5Active := by rcases hu with ⟨hu0, hu1⟩ intro s rcases s with ⟨s, hs⟩ interval_cases s <;> simp +decide [r5WeightFromCoordinate, r5Active] <;> try (constructor <;> positivity) <;> try positivity
CausalSmith.Stat.LdpAteEfficiencySurface.r5WeightFromCoordinate_active · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:561
theorem r5WeightFromCoordinate_pos

Under the supplied quantities and conditions, the r5 weight from coordinate pos assertion holds.

Formal statement
ε u :
ℝ
hu :
u ∈ Ioo 0 1
s ∈ r5Active :
Proof (Lean source)
lemma r5WeightFromCoordinate_pos (ε u : ℝ) (hu : u ∈ Ioo 0 1) : ∀ s ∈ r5Active, 0 < r5WeightFromCoordinate ε u s := by rcases hu with ⟨hu0, hu1⟩ intro s hs rcases s with ⟨s, hslt⟩ interval_cases s <;> simp_all +decide [r5WeightFromCoordinate, r5Active] <;> try positivity
CausalSmith.Stat.LdpAteEfficiencySurface.r5WeightFromCoordinate_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:571
theorem r5WeightFromCoordinate_stationarity

Under the supplied quantities and conditions, the r5 weight from coordinate stationarity assertion holds.

Formal statement
u t :
ℝ
(∑ s : Fin 14, r5WeightFromCoordinate x.2.2.2 u s * patternInformationSlope (regionTheta x) x.1 x.2.2.2 s t)
= u * r5BinaryDerivative x t + (1 - u) * r5TernaryDerivative x t
Proof (Lean source)
lemma r5WeightFromCoordinate_stationarity (x : RegionParameter) (u t : ℝ) : (∑ s : Fin 14, r5WeightFromCoordinate x.2.2.2 u s * patternInformationSlope (regionTheta x) x.1 x.2.2.2 s t) = u * r5BinaryDerivative x t + (1 - u) * r5TernaryDerivative x t := by have hd1 : exp x.2.2.2 + 1 ≠ 0 := by positivity have hd2 : exp x.2.2.2 + 2 ≠ 0 := by positivity unfold r5BinaryDerivative r5TernaryDerivative simp +decide [r5WeightFromCoordinate, Fin.sum_univ_succ] field_simp [hd1, hd2] ring
CausalSmith.Stat.LdpAteEfficiencySurface.r5WeightFromCoordinate_stationarity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:580
theorem r5ContinuedWeight_stationary

Under the supplied quantities and conditions, the r5 continued weight stationary assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
(∑ s : Fin 14, r5WeightFromCoordinate x.2.2.2 (r5ContinuedMixture σ x) s * patternInformationSlope (regionTheta x) x.1 x.2.2.2 s (r5DirectionBranch σ x))
= 0
Proof (Lean source)
lemma r5ContinuedWeight_stationary (x : RegionParameter) (σ : ℝ) (hden : r5BinaryDerivative x (r5DirectionBranch σ x) - r5TernaryDerivative x (r5DirectionBranch σ x) ≠ 0) : (∑ s : Fin 14, r5WeightFromCoordinate x.2.2.2 (r5ContinuedMixture σ x) s * patternInformationSlope (regionTheta x) x.1 x.2.2.2 s (r5DirectionBranch σ x)) = 0 := by rw [r5WeightFromCoordinate_stationarity] unfold r5ContinuedMixture field_simp [hden] ring
CausalSmith.Stat.LdpAteEfficiencySurface.r5ContinuedWeight_stationary · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:592
def r5DualTarget

The target vector in the five-output dual system is determined by the displayed parameters.

Definition (Lean source)
r5DualTarget t x :
Fin 4 → ℝ
fun i ↦ patternInformation (regionTheta x) x.1 x.2.2.2 (r5DualMask i) (t x)
theorem continuousAt_r5DualTarget

Under the supplied quantities and conditions, the continuous at r5 dual target assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
t :
ht :
hm :
∀ s : Fin 14, patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0
Proof (Lean source)
lemma continuousAt_r5DualTarget (t : RegionParameter → ℝ) (x : RegionParameter) (ht : ContinuousAt t x) (hm : ∀ s : Fin 14, patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0) : ContinuousAt (r5DualTarget t) x := by apply continuousAt_pi.mpr intro i exact continuousAt_patternInformation_region (r5DualMask i) t x ht (hm (r5DualMask i))
CausalSmith.Stat.LdpAteEfficiencySurface.continuousAt_r5DualTarget · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:611
theorem exists_local_r5Dual

Under the supplied quantities and conditions, the exists local r5 dual assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the exists local r5 Dual.

Formal statement
t :
η0 :
Fin 4 → ℝ
hε :
0 < x.2.2.2
ht :
hm :
∀ s : Fin 14, patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0
hactive :
∀ s ∈ r5Active,
dualRay x.2.2.2 η0 s = patternInformation (regionTheta x) x.1 x.2.2.2 s (t x)
∃ η : RegionParameter → Fin 4 → ℝ,
conclusion 1
conclusion 2
η x = η0
conclusion 3
∀ᶠ y in nhds x, mulVec (r5DualMatrix y) (η y) = r5DualTarget t y
Proof (Lean source)
lemma exists_local_r5Dual (x : RegionParameter) (t : RegionParameter → ℝ) (η0 : Fin 4 → ℝ) (hε : 0 < x.2.2.2) (ht : ContinuousAt t x) (hm : ∀ s : Fin 14, patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0) (hactive : ∀ s ∈ r5Active, dualRay x.2.2.2 η0 s = patternInformation (regionTheta x) x.1 x.2.2.2 s (t x)) : ∃ η : RegionParameter → Fin 4 → ℝ, ContinuousAt η x ∧ η x = η0 ∧ ∀ᶠ y in nhds x, mulVec (r5DualMatrix y) (η y) = r5DualTarget t y := by have hbase : mulVec (r5DualMatrix x) η0 = r5DualTarget t x := by funext i have hi := hactive (r5DualMask i) (by fin_cases i <;> simp [r5DualMask, r5Active]) simpa [r5DualMatrix, r5DualTarget, mulVec, dotProduct, dualRay, mul_comm] using hi let η := anchoredSolution r5DualMatrix (r5DualTarget t) (r5DualRightInverse x.2.2.2) η0 obtain ⟨hcont, hbaseη, hev⟩ := exists_eventually_anchoredSolution_of_rightInverse r5DualMatrix (r5DualTarget t) (r5DualRightInverse x.2.2.2) x η0 continuous_r5DualMatrix.continuousAt (continuousAt_r5DualTarget t x ht hm) (r5DualMatrix_mul_rightInverse x hε) hbase exact ⟨η, hcont, hbaseη, hev⟩
CausalSmith.Stat.LdpAteEfficiencySurface.exists_local_r5Dual · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:622
theorem r5_fifthDual_eq

Under the supplied quantities and conditions, the r5 fifth dual eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
η :
Fin 4 → ℝ
t :
ℝ
h2 :
dualRay x.2.2.2 η 2 = patternInformation (regionTheta x) x.1 x.2.2.2 2 t
h3 :
dualRay x.2.2.2 η 3 = patternInformation (regionTheta x) x.1 x.2.2.2 3 t
h5 :
dualRay x.2.2.2 η 5 = patternInformation (regionTheta x) x.1 x.2.2.2 5 t
h7 :
dualRay x.2.2.2 η 7 = patternInformation (regionTheta x) x.1 x.2.2.2 7 t
dualRay x.2.2.2 η 8 = patternInformation (regionTheta x) x.1 x.2.2.2 8 t
Proof (Lean source)
lemma r5_fifthDual_eq (x : RegionParameter) (η : Fin 4 → ℝ) (t : ℝ) (hobj : r5BinaryObjective x t = r5TernaryObjective x t) (h2 : dualRay x.2.2.2 η 2 = patternInformation (regionTheta x) x.1 x.2.2.2 2 t) (h3 : dualRay x.2.2.2 η 3 = patternInformation (regionTheta x) x.1 x.2.2.2 3 t) (h5 : dualRay x.2.2.2 η 5 = patternInformation (regionTheta x) x.1 x.2.2.2 5 t) (h7 : dualRay x.2.2.2 η 7 = patternInformation (regionTheta x) x.1 x.2.2.2 7 t) : dualRay x.2.2.2 η 8 = patternInformation (regionTheta x) x.1 x.2.2.2 8 t := by have hd1 : exp x.2.2.2 + 1 ≠ 0 := by positivity have hd2 : exp x.2.2.2 + 2 ≠ 0 := by positivity have hdualavg : (dualRay x.2.2.2 η 5 + dualRay x.2.2.2 η 8) / (exp x.2.2.2 + 1) = (dualRay x.2.2.2 η 2 + dualRay x.2.2.2 η 3 + dualRay x.2.2.2 η 7) / (exp x.2.2.2 + 2) := by simp +decide [dualRay, patternRay, patternContains, privacyIncrement, privacyRatio, Fin.sum_univ_succ] field_simp [hd1, hd2] ring unfold r5BinaryObjective r5TernaryObjective at hobj rw [← h5, ← h2, ← h3, ← h7] at hobj field_simp [hd1, hd2] at hobj hdualavg have hprod : (exp x.2.2.2 + 2) * (patternInformation (regionTheta x) x.1 x.2.2.2 8 t - dualRay x.2.2.2 η 8) = 0 := by linear_combination hobj - hdualavg have hz := (mul_eq_zero.mp hprod).resolve_left hd2 linarith
CausalSmith.Stat.LdpAteEfficiencySurface.r5_fifthDual_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:652
theorem r5_objectives_eq_of_activeDual

The five active dual equalities force the two normalized constituent objectives to agree. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
η :
Fin 4 → ℝ
t :
ℝ
hdual :
∀ s ∈ r5Active, dualRay x.2.2.2 η s = patternInformation (regionTheta x) x.1 x.2.2.2 s t
Proof (Lean source)
lemma r5_objectives_eq_of_activeDual (x : RegionParameter) (η : Fin 4 → ℝ) (t : ℝ) (hdual : ∀ s ∈ r5Active, dualRay x.2.2.2 η s = patternInformation (regionTheta x) x.1 x.2.2.2 s t) : r5BinaryObjective x t = r5TernaryObjective x t := by have hr1 : exp x.2.2.2 + 1 ≠ 0 := by positivity have hr2 : exp x.2.2.2 + 2 ≠ 0 := by positivity have h2 := hdual 2 (by simp [r5Active]) have h3 := hdual 3 (by simp [r5Active]) have h5 := hdual 5 (by simp [r5Active]) have h7 := hdual 7 (by simp [r5Active]) have h8 := hdual 8 (by simp [r5Active]) unfold r5BinaryObjective r5TernaryObjective rw [← h5, ← h8, ← h2, ← h3, ← h7] simp +decide [dualRay, patternRay, patternContains, privacyIncrement, privacyRatio, Fin.sum_univ_succ] field_simp [hr1, hr2] ring
CausalSmith.Stat.LdpAteEfficiencySurface.r5_objectives_eq_of_activeDual · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Continuity.lean:686
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.R5Rigidity 3 declarations Linear rigidity of the five-ray feasible family

Linear rigidity of the five-ray feasible family

def r5Active

the r5 active is the mathematical object specified below.

Definition (Lean source)
r5Active :
Finset (Fin 14)
{2, 3, 5, 7, 8}
theorem r5_supported_feasible_coordinates

The four normalization equations leave exactly the expected one-dimensional family on the five active rays. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r5 supported feasible coordinates.

Formal statement
ε :
ℝ
hε :
0 < ε
hβ :
hout :
∀ s ∉ r5Active, β s = 0
conclusion 1
β 2 = β 3
conclusion 2
β 3 = β 7
conclusion 3
β 5 = β 8
conclusion 4
(exp ε + 2) * β 2 + (exp ε + 1) * β 5 = 1
Proof (Lean source)
lemma r5_supported_feasible_coordinates (ε : ℝ) (hε : 0 < ε) (β : StaircaseWeight) (hβ : staircaseFeasible ε β) (hout : ∀ s ∉ r5Active, β s = 0) : β 2 = β 3 ∧ β 3 = β 7 ∧ β 5 = β 8 ∧ (exp ε + 2) * β 2 + (exp ε + 1) * β 5 = 1 := by have h0 := hβ.2 0 have h1 := hβ.2 1 have h2 := hβ.2 2 have h3 := hβ.2 3 simp +decide [staircaseMatrix, patternRay, patternContains, privacyRatio, privacyIncrement, r5Active, hout, Fin.sum_univ_succ] at h0 h1 h2 h3 have he : 1 < exp ε := (Real.one_lt_exp_iff).2 hε have h23 : β 2 = β 3 := by nlinarith have h37 : β 3 = β 7 := by nlinarith have h58 : β 5 = β 8 := by nlinarith refine ⟨h23, h37, h58, ?_⟩ nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.r5_supported_feasible_coordinates · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Rigidity.lean:16
theorem r5_supported_feasible_eq_of_five_eq

A single binary-ray coordinate determines a feasible weight supported on the five-ray family. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r5 supported feasible eq of five eq.

Formal statement
ε :
ℝ
hε :
0 < ε
β γ :
hβ :
hγ :
hβout :
∀ s ∉ r5Active, β s = 0
hγout :
∀ s ∉ r5Active, γ s = 0
hfive :
β 5 = γ 5
β = γ
Proof (Lean source)
lemma r5_supported_feasible_eq_of_five_eq (ε : ℝ) (hε : 0 < ε) (β γ : StaircaseWeight) (hβ : staircaseFeasible ε β) (hγ : staircaseFeasible ε γ) (hβout : ∀ s ∉ r5Active, β s = 0) (hγout : ∀ s ∉ r5Active, γ s = 0) (hfive : β 5 = γ 5) : β = γ := by obtain ⟨hβ23, hβ37, hβ58, hβnorm⟩ := r5_supported_feasible_coordinates ε hε β hβ hβout obtain ⟨hγ23, hγ37, hγ58, hγnorm⟩ := r5_supported_feasible_coordinates ε hε γ hγ hγout have he : 0 < exp ε + 2 := by positivity have htwo : β 2 = γ 2 := by nlinarith funext s by_cases hs : s ∈ r5Active · rcases s with ⟨s, hslt⟩ interval_cases s <;> simp_all [r5Active] · rw [hβout s hs, hγout s hs]
CausalSmith.Stat.LdpAteEfficiencySurface.r5_supported_feasible_eq_of_five_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/R5Rigidity.lean:37
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.Refinement 17 declarations The refinement splits each output density into fourteen extreme rays.

Measurable staircase refinement

The refinement splits each output density into fourteen extreme rays. Equality in one information direction constrains rays mixed by a common output law.

theorem channelFisherInfo_staircase_eq_informationMatrix

Under the supplied quantities and conditions, the channel fisher info staircase eq information matrix assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the channel Fisher Info staircase eq information Matrix.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
hα :
Proof (Lean source)
lemma channelFisherInfo_staircase_eq_informationMatrix (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) : channelFisherInfo θ p (staircaseChannel ε α) = informationMatrix θ p ε α := by let Q := staircaseChannel ε α let R : Fin 14 → ℝ := fun s => ∑ j : Fin 4, patternRay ε s j have hray (s : Fin 14) (j : Fin 4) : 0 < patternRay ε s j := by unfold patternRay privacyIncrement privacyRatio cases patternContains s j <;> simp <;> positivity have hR (s : Fin 14) : 0 < R s := by exact lt_of_lt_of_le (hray s 0) (Finset.single_le_sum (fun j hj => (hray s j).le) (Finset.mem_univ 0)) have hmass (s : Fin 14) : 0 < patternMass θ p ε s := by unfold patternMass apply Finset.sum_pos · intro j hj exact mul_pos (piTheta_pos p θ ⟨hp, hθ⟩ j) (hray s j) · simp have hdensity (j : Fin 4) : channelDensity Q j =ᵐ[dominatingMeasure Q] fun s => if α s = 0 then 0 else patternRay ε s j / R s := by exact channelDensity_staircase_ae ε α hε.le hα.1 j let _ : IsMarkovKernel Q := staircaseChannel_markov ε α hα let _ : IsFiniteMeasure (dominatingMeasure Q) := ⟨by simp [dominatingMeasure]⟩ ext a b unfold channelFisherInfo informationMatrix have hintegrand : (fun s => channelDerivativeDensity p Q a s * channelDerivativeDensity p Q b s / channelOutputDensity θ p Q s) =ᵐ[ dominatingMeasure Q] fun s => if α s = 0 then 0 else patternGradient p ε s a * patternGradient p ε s b / (patternMass θ p ε s * R s) := by filter_upwards [hdensity 0, hdensity 1, hdensity 2, hdensity 3] with s h0 h1 h2 h3 have hd (j : Fin 4) : channelDensity Q j s = if α s = 0 then 0 else patternRay ε s j / R s := by fin_cases j <;> assumption simp_rw [channelDerivativeDensity, channelOutputDensity, hd] by_cases ha : α s = 0 · simp [ha] · simp only [ha, ↓reduceIte] have hder (k : Fin 2) : (∑ j : Fin 4, inputDerivative p j k * (patternRay ε s j / R s)) = patternGradient p ε s k / R s := by simp only [div_eq_mul_inv, ← mul_assoc, ← Finset.sum_mul] rw [sum_inputDerivative_mul_patternRay] have hout : (∑ j : Fin 4, piTheta θ p j * (patternRay ε s j / R s)) = patternMass θ p ε s / R s := by simp only [div_eq_mul_inv, ← mul_assoc, ← Finset.sum_mul] rfl rw [hder a, hder b, hout] field_simp [ne_of_gt (hR s), ne_of_gt (hmass s)] rw [integral_congr_ae hintegrand] rw [integral_fintype Integrable.of_finite] apply Finset.sum_congr rfl intro s hs rw [show (dominatingMeasure Q).real {s} = α s * R s by exact dominatingMeasure_staircase_singleton_real ε α hε.le hα.1 s] by_cases ha : α s = 0 · simp [ha] · simp only [ha, ↓reduceIte, smul_eq_mul] field_simp [ne_of_gt (hR s), ne_of_gt (hmass s)]
CausalSmith.Stat.LdpAteEfficiencySurface.channelFisherInfo_staircase_eq_informationMatrix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:107
def informationQuadratic

the information quadratic is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
I :
Matrix (Fin 2) (Fin 2) ℝ
informationQuadratic I v :
ℝ
∑ a : Fin 2, ∑ b : Fin 2, v a * I a b * v b
CausalSmith.Stat.LdpAteEfficiencySurface.informationQuadratic · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:305
theorem informationQuadratic_eq_pattern_sum

Under the supplied quantities and conditions, the information quadratic eq pattern sum assertion holds.

Formal statement
p eps :
ℝ
= ∑ s, α s * (∑ k, patternGradient p eps s k * v k) ^ 2 / patternMass θ p eps s
Proof (Lean source)
lemma informationQuadratic_eq_pattern_sum (θ : TrialParameter) (p eps : ℝ) (α : StaircaseWeight) (v : TrialParameter) : informationQuadratic (informationMatrix θ p eps α) v = ∑ s, α s * (∑ k, patternGradient p eps s k * v k) ^ 2 / patternMass θ p eps s := by unfold informationQuadratic informationMatrix simp_rw [Finset.mul_sum, Finset.sum_mul, pow_two] calc (∑ a, ∑ b, ∑ s, v a * (α s * patternGradient p eps s a * patternGradient p eps s b / patternMass θ p eps s) * v b) = ∑ a, ∑ s, ∑ b, v a * (α s * patternGradient p eps s a * patternGradient p eps s b / patternMass θ p eps s) * v b := by apply Finset.sum_congr rfl intro a _ rw [Finset.sum_comm] _ = ∑ s, ∑ a, ∑ b, v a * (α s * patternGradient p eps s a * patternGradient p eps s b / patternMass θ p eps s) * v b := by rw [Finset.sum_comm] _ = _ := by apply Finset.sum_congr rfl intro s _ simp_rw [Finset.mul_sum, Finset.sum_mul, Finset.sum_div] apply Finset.sum_congr rfl intro a _ simp_rw [Finset.mul_sum, Finset.sum_div] apply Finset.sum_congr rfl intro b _ ring
CausalSmith.Stat.LdpAteEfficiencySurface.informationQuadratic_eq_pattern_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:311
theorem channelRow_le_dominating

Every row of a finite-input channel is bounded by its dominating measure.

Formal statement
Z :
Q :
Kernel (Fin 4) Z
j :
Fin 4
Proof (Lean source)
lemma channelRow_le_dominating {Z : Type*} [MeasurableSpace Z] (Q : Kernel (Fin 4) Z) (j : Fin 4) : Q j ≤ dominatingMeasure Q := by simp only [dominatingMeasure] exact Finset.single_le_sum (fun _ _ ↦ bot_le) (Finset.mem_univ j)
CausalSmith.Stat.LdpAteEfficiencySurface.channelRow_le_dominating · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:451
theorem channelRow_absolutelyContinuous_dominating

the channel row absolutely continuous dominating assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Q :
Kernel (Fin 4) Z
j :
Fin 4
Proof (Lean source)
lemma channelRow_absolutelyContinuous_dominating {Z : Type*} [MeasurableSpace Z] (Q : Kernel (Fin 4) Z) (j : Fin 4) : Q j ≪ dominatingMeasure Q := Measure.absolutelyContinuous_of_le (channelRow_le_dominating Q j)
CausalSmith.Stat.LdpAteEfficiencySurface.channelRow_absolutelyContinuous_dominating · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:458
theorem channelDensity_measurable

the channel density measurable assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Q :
Kernel (Fin 4) Z
j :
Fin 4
Proof (Lean source)
lemma channelDensity_measurable {Z : Type*} [MeasurableSpace Z] (Q : Kernel (Fin 4) Z) (j : Fin 4) : Measurable (channelDensity Q j) := by exact (Measure.measurable_rnDeriv (Q j) (dominatingMeasure Q)).ennreal_toReal
CausalSmith.Stat.LdpAteEfficiencySurface.channelDensity_measurable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:465
theorem channelDensity_nonneg

the channel density nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Q :
Kernel (Fin 4) Z
j :
Fin 4
z :
Z
0 ≤ channelDensity Q j z
Proof (Lean source)
lemma channelDensity_nonneg {Z : Type*} [MeasurableSpace Z] (Q : Kernel (Fin 4) Z) (j : Fin 4) (z : Z) : 0 ≤ channelDensity Q j z := ENNReal.toReal_nonneg
CausalSmith.Stat.LdpAteEfficiencySurface.channelDensity_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:472
theorem channelDensity_le_one_ae

the channel density le one ae assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
eps :
ℝ
Q :
Kernel (Fin 4) Z
hQ :
j :
Fin 4
∀ᵐ z ∂dominatingMeasure Q, channelDensity Q j z ≤ 1
Proof (Lean source)
lemma channelDensity_le_one_ae {Z : Type*} [MeasurableSpace Z] {eps : ℝ} (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP eps Q) (j : Fin 4) : ∀ᵐ z ∂dominatingMeasure Q, channelDensity Q j z ≤ 1 := by let _ : IsMarkovKernel Q := hQ.1 let _ : IsFiniteMeasure (dominatingMeasure Q) := ⟨by simp [dominatingMeasure]⟩ filter_upwards [Measure.rnDeriv_le_one_of_le (channelRow_le_dominating Q j)] with z hz exact ENNReal.toReal_mono (by simp) hz
CausalSmith.Stat.LdpAteEfficiencySurface.channelDensity_le_one_ae · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:478
theorem informationQuadratic_eq_channelIntegral

Directional information as a single row-sum Radon--Nikodym integral. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the information Quadratic eq channel Integral.

Formal statement
Z :
p :
ℝ
hθ :
ε :
ℝ
Q :
Kernel (Fin 4) Z
hQ :
= ∫ z, (∑ k, v k * channelDerivativeDensity p Q k z) ^ 2 / channelOutputDensity θ p Q z ∂dominatingMeasure Q
Proof (Lean source)
lemma informationQuadratic_eq_channelIntegral {Z : Type*} [MeasurableSpace Z] (p : ℝ) (θ : TrialParameter) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (ε : ℝ) (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP ε Q) (v : TrialParameter) : informationQuadratic (channelFisherInfo θ p Q) v = ∫ z, (∑ k, v k * channelDerivativeDensity p Q k z) ^ 2 / channelOutputDensity θ p Q z ∂dominatingMeasure Q := by exact (outputFisher_eq_informationQuadratic p θ ⟨hp, hθ⟩ ε Q hQ v).symm.trans (outputFisher_eq_integral p θ Q ⟨hp, hθ⟩ v)
CausalSmith.Stat.LdpAteEfficiencySurface.informationQuadratic_eq_channelIntegral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:674
theorem ldp_row_le

the ldp row le assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
eps :
ℝ
Q :
Kernel (Fin 4) Z
hQ :
x x' :
Fin 4
Q x ≤ ofReal (exp eps) • Q x'
Proof (Lean source)
lemma ldp_row_le {Z : Type*} [MeasurableSpace Z] {eps : ℝ} (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP eps Q) (x x' : Fin 4) : Q x ≤ ofReal (exp eps) • Q x' := by rw [Measure.le_iff] intro A hA simpa [Measure.smul_apply, smul_eq_mul] using hQ.2 A hA x x'
theorem integral_channelDensity

the integral channel density assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
eps :
ℝ
Q :
Kernel (Fin 4) Z
hQ :
j :
Fin 4
∫ z, channelDensity Q j z ∂dominatingMeasure Q = (Q j).real univ
Proof (Lean source)
lemma integral_channelDensity {Z : Type*} [MeasurableSpace Z] {eps : ℝ} (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP eps Q) (j : Fin 4) : ∫ z, channelDensity Q j z ∂dominatingMeasure Q = (Q j).real univ := by let _ : IsMarkovKernel Q := hQ.1 let _ : IsFiniteMeasure (dominatingMeasure Q) := ⟨by simp [dominatingMeasure]⟩ exact Measure.integral_toReal_rnDeriv (channelRow_absolutelyContinuous_dominating Q j)
CausalSmith.Stat.LdpAteEfficiencySurface.integral_channelDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:757
theorem integral_channelDensity_eq_one

the integral channel density eq one assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
eps :
ℝ
Q :
Kernel (Fin 4) Z
hQ :
j :
Fin 4
∫ z, channelDensity Q j z ∂dominatingMeasure Q = 1
Proof (Lean source)
lemma integral_channelDensity_eq_one {Z : Type*} [MeasurableSpace Z] {eps : ℝ} (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP eps Q) (j : Fin 4) : ∫ z, channelDensity Q j z ∂dominatingMeasure Q = 1 := by rw [integral_channelDensity Q hQ j] let _ : IsMarkovKernel Q := hQ.1 simp
CausalSmith.Stat.LdpAteEfficiencySurface.integral_channelDensity_eq_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:767
theorem privacyIncrement_pos

Under the supplied quantities and conditions, the privacy increment pos assertion holds.

Formal statement
eps :
ℝ
heps :
0 < eps
Proof (Lean source)
lemma privacyIncrement_pos {eps : ℝ} (heps : 0 < eps) : 0 < privacyIncrement eps := by rw [privacyIncrement, privacyRatio, sub_pos] exact Real.one_lt_exp_iff.mpr heps
CausalSmith.Stat.LdpAteEfficiencySurface.privacyIncrement_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:775
theorem complementary_patternRay

Under the supplied quantities and conditions, the complementary pattern ray assertion holds.

Formal statement
eps :
ℝ
j :
Fin 4
patternRay eps 0 j + patternRay eps 13 j = exp eps + 1
Proof (Lean source)
lemma complementary_patternRay (eps : ℝ) (j : Fin 4) : patternRay eps 0 j + patternRay eps 13 j = exp eps + 1 := by have h : patternContains 0 j = !(patternContains 13 j) := by fin_cases j <;> decide rw [patternRay, patternRay, h] cases h13 : patternContains 13 j <;> simp [privacyIncrement, privacyRatio] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.complementary_patternRay · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:782
theorem staircase_refinement_interior

the staircase refinement interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the staircase refinement interior.

Formal statement
Z :
p :
ℝ
ε :
ℝ
hθ :
epsSeq :
ℕ → ℝ
hfixed :
FixedPrivacy epsSeq ε
Q :
Kernel (Fin 4) Z
hQ :
∃ α : StaircaseWeight, ∃ K : Kernel (Fin 14) Z,
conclusion 1
t :
ℝ
s u :
Fin 14
α s ≠ 0
α u ≠ 0
¬ (K s) ⟂ₘ (K u)
projectedScore θ p ε s t = projectedScore θ p ε u t
Proof (Lean source)
lemma staircase_refinement_interior {Z : Type*} [MeasurableSpace Z] (p : ℝ) (θ : TrialParameter) (ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (epsSeq : ℕ → ℝ) (hfixed : FixedPrivacy epsSeq ε) (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP ε Q) : ∃ α : StaircaseWeight, ∃ K : Kernel (Fin 14) Z, staircaseFeasible ε α ∧ IsMarkovKernel K ∧ Q = K.comp (staircaseChannel ε α) ∧ (informationMatrix θ p ε α - channelFisherInfo θ p Q).PosSemidef ∧ (∀ t : ℝ, informationQuadratic (informationMatrix θ p ε α) (direction t) = informationQuadratic (channelFisherInfo θ p Q) (direction t) → ∀ s u : Fin 14, α s ≠ 0 → α u ≠ 0 → ¬ (K s) ⟂ₘ (K u) → projectedScore θ p ε s t = projectedScore θ p ε u t) := by let hmodel : InteriorData p θ := ⟨hp, hθ⟩ letI : IsMarkovKernel Q := hQ.1 have hr : 1 < exp ε := Real.one_lt_exp_iff.mpr hfixed.1 obtain ⟨R⟩ := Staircase.exists_refinement Q (exp ε) hr (by intro i j A hA exact hQ.2 A hA i j) refine ⟨reindexedWeight R, reindexedPostprocess R, reindexedWeight_feasible ε R, reindexedPostprocess_markov R, reindexed_factorizes ε R, informationDifference_posSemidef p θ ε Q hQ R hmodel, ?_⟩ intro t heq s u hs hu hnot have hgap : Staircase.finiteFisher R.T (piTheta θ p) (Staircase.projectedScore (trialScore θ p) (direction t)) - Staircase.outputFisher Q (piTheta θ p) (Staircase.projectedScore (trialScore θ p) (direction t)) = 0 := by rw [finiteFisher_reindex p θ R hmodel (direction t), outputFisher_eq_informationQuadratic p θ hmodel ε Q hQ (direction t)] linarith exact reindexed_rigidity p θ Q R hmodel t hgap s u hs hu hnot
CausalSmith.Stat.LdpAteEfficiencySurface.staircase_refinement_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:792
theorem channelFisherInfo_posSemidef

the channel fisher info pos semidef assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the channel Fisher Info pos Semidef.

Formal statement
Z :
p :
ℝ
hθ :
ε :
ℝ
Q :
Kernel (Fin 4) Z
hQ :
Proof (Lean source)
lemma channelFisherInfo_posSemidef {Z : Type*} [MeasurableSpace Z] (p : ℝ) (θ : TrialParameter) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (ε : ℝ) (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP ε Q) : (channelFisherInfo θ p Q).PosSemidef := by exact channelFisherInfo_posSemidef_interior p θ ⟨hp, hθ⟩ ε Q hQ
CausalSmith.Stat.LdpAteEfficiencySurface.channelFisherInfo_posSemidef · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:831
theorem staircase_refinement

the staircase refinement assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
μ :
Y0 Y1 W Y :
ℕ → Ω → ℝ
p :
ℝ
ε :
ℝ
hmodel :
epsSeq :
ℕ → ℝ
hfixed :
FixedPrivacy epsSeq ε
Q :
Kernel (Fin 4) Z
hQ :
∃ α : StaircaseWeight, ∃ K : Kernel (Fin 14) Z,
conclusion 1
t :
ℝ
s u :
Fin 14
α s ≠ 0
α u ≠ 0
¬ (K s) ⟂ₘ (K u)
projectedScore θ p ε s t = projectedScore θ p ε u t
Proof (Lean source)
lemma staircase_refinement {Ω Z : Type*} [MeasurableSpace Ω] [MeasurableSpace Z] (μ : Measure Ω) (Y0 Y1 W Y : ℕ → Ω → ℝ) (p : ℝ) (θ : TrialParameter) (ε : ℝ) (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (epsSeq : ℕ → ℝ) (hfixed : FixedPrivacy epsSeq ε) (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP ε Q) : ∃ α : StaircaseWeight, ∃ K : Kernel (Fin 14) Z, staircaseFeasible ε α ∧ IsMarkovKernel K ∧ Q = K.comp (staircaseChannel ε α) ∧ (informationMatrix θ p ε α - channelFisherInfo θ p Q).PosSemidef ∧ (∀ t : ℝ, informationQuadratic (informationMatrix θ p ε α) (direction t) = informationQuadratic (channelFisherInfo θ p Q) (direction t) → ∀ s u : Fin 14, α s ≠ 0 → α u ≠ 0 → ¬ (K s) ⟂ₘ (K u) → projectedScore θ p ε s t = projectedScore θ p ε u t) := by exact staircase_refinement_interior p θ ε hmodel.assignmentInterior hmodel.meansInterior epsSeq hfixed Q hQ
CausalSmith.Stat.LdpAteEfficiencySurface.staircase_refinement · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Refinement.lean:842
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.RegionOpenness 6 declarations This file provides the positivity facts and affine stationarity coefficient used to construct local certificates for the three-mask support regime.

Continuity substrate for the three-output region

This file provides the positivity facts and affine stationarity coefficient used to construct local certificates for the three-mask support regime.

theorem patternMass_pos_of_interior

Every staircase-pattern mass is positive at interior trial parameters. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pattern Mass pos of interior.

Formal statement
p μ0 μ1 ε :
ℝ
hp0 :
0 < p
hp1 :
p < 1
hμ00 :
0 < μ0
hμ01 :
μ0 < 1
hμ10 :
0 < μ1
hμ11 :
μ1 < 1
s :
Fin 14
0 < patternMass (fun k => if k = 0 then μ0 else μ1) p ε s
Proof (Lean source)
lemma patternMass_pos_of_interior (p μ0 μ1 ε : ℝ) (hp0 : 0 < p) (hp1 : p < 1) (hμ00 : 0 < μ0) (hμ01 : μ0 < 1) (hμ10 : 0 < μ1) (hμ11 : μ1 < 1) (s : Fin 14) : 0 < patternMass (fun k => if k = 0 then μ0 else μ1) p ε s := by have hr (j : Fin 4) : 0 < patternRay ε s j := by simp only [patternRay, privacyIncrement, privacyRatio] split <;> simp_all <;> positivity have hpi (j : Fin 4) : 0 ≤ piTheta (fun k => if k = 0 then μ0 else μ1) p j := by fin_cases j <;> simp only [piTheta, controlProb] <;> simp_all <;> try positivity all_goals linarith unfold patternMass apply Finset.sum_pos' · intro j _ exact mul_nonneg (hpi j) (hr j).le · refine ⟨0, Finset.mem_univ _, ?_⟩ change 0 < ((1 - p) * (1 - μ0)) * patternRay ε s 0 exact mul_pos (mul_pos (sub_pos.mpr hp1) (sub_pos.mpr hμ01)) (hr 0)
CausalSmith.Stat.LdpAteEfficiencySurface.patternMass_pos_of_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/RegionOpenness.lean:16
def r3Weight

The canonical weights on masks 0, 5, and 7. The stated result follows. The r3 Weight is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
r3Weight ε :
fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (exp ε + 2)⁻¹ else 0
def r3Stationarity

The stationarity equation evaluated at the canonical three-mask weights. For the displayed inputs and conditions, the stated result follows. The r3 Stationarity is determined by the displayed parameters.

Definition (Lean source)
p μ0 μ1 ε t :
ℝ
r3Stationarity p μ0 μ1 ε t :
ℝ
∑ s : Fin 14, r3Weight ε s * patternInformationSlope (fun k => if k = 0 then μ0 else μ1) p ε s t
CausalSmith.Stat.LdpAteEfficiencySurface.r3Stationarity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/RegionOpenness.lean:42
def r3StationarityCoeff

The linear coefficient of the canonical three-mask stationarity equation. For the displayed inputs and conditions, the stated result follows. The r3 Stationarity Coeff is determined by the displayed parameters.

Definition (Lean source)
p μ0 μ1 ε :
ℝ
r3StationarityCoeff p μ0 μ1 ε :
ℝ
r3Stationarity p μ0 μ1 ε 1 - r3Stationarity p μ0 μ1 ε 0
CausalSmith.Stat.LdpAteEfficiencySurface.r3StationarityCoeff · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/RegionOpenness.lean:47
theorem patternInformationSlope_one_sub_zero

The unit finite difference of a pattern's information slope is its positive quadratic coefficient. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
s :
Fin 14
= 2 * (patternGradient p ε s 0 + patternGradient p ε s 1) ^ 2 / patternMass θ p ε s
Proof (Lean source)
lemma patternInformationSlope_one_sub_zero (θ : TrialParameter) (p ε : ℝ) (s : Fin 14) : patternInformationSlope θ p ε s 1 - patternInformationSlope θ p ε s 0 = 2 * (patternGradient p ε s 0 + patternGradient p ε s 1) ^ 2 / patternMass θ p ε s := by simp [patternInformationSlope, projectedGradient, direction, Fin.sum_univ_succ] ring
CausalSmith.Stat.LdpAteEfficiencySurface.patternInformationSlope_one_sub_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/RegionOpenness.lean:51
theorem r3StationarityCoeff_pos

The canonical three-mask stationarity equation has positive linear coefficient at interior trial parameters and positive privacy budget. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the r3 Stationarity Coeff pos.

Formal statement
p μ0 μ1 ε :
ℝ
hp0 :
0 < p
hp1 :
p < 1
hμ00 :
0 < μ0
hμ01 :
μ0 < 1
hμ10 :
0 < μ1
hμ11 :
μ1 < 1
hε :
0 < ε
0 < r3StationarityCoeff p μ0 μ1 ε
Proof (Lean source)
lemma r3StationarityCoeff_pos (p μ0 μ1 ε : ℝ) (hp0 : 0 < p) (hp1 : p < 1) (hμ00 : 0 < μ0) (hμ01 : μ0 < 1) (hμ10 : 0 < μ1) (hμ11 : μ1 < 1) (hε : 0 < ε) : 0 < r3StationarityCoeff p μ0 μ1 ε := by have hm (s : Fin 14) : 0 < patternMass (fun k => if k = 0 then μ0 else μ1) p ε s := patternMass_pos_of_interior p μ0 μ1 ε hp0 hp1 hμ00 hμ01 hμ10 hμ11 s rw [show r3StationarityCoeff p μ0 μ1 ε = ∑ s : Fin 14, r3Weight ε s * (patternInformationSlope (fun k => if k = 0 then μ0 else μ1) p ε s 1 - patternInformationSlope (fun k => if k = 0 then μ0 else μ1) p ε s 0) by unfold r3StationarityCoeff r3Stationarity rw [← Finset.sum_sub_distrib] apply Finset.sum_congr rfl intro s _ ring] simp_rw [patternInformationSlope_one_sub_zero] apply Finset.sum_pos' · intro s _ apply mul_nonneg · simp only [r3Weight] split <;> positivity · exact div_nonneg (mul_nonneg (by norm_num) (sq_nonneg _)) (hm s).le · refine ⟨0, Finset.mem_univ _, ?_⟩ apply mul_pos · simp [r3Weight] positivity · apply div_pos · apply mul_pos · norm_num · simp +decide [patternGradient, controlProb, privacyIncrement, privacyRatio] have : 1 < exp ε := (Real.one_lt_exp_iff).2 hε positivity · exact hm 0
CausalSmith.Stat.LdpAteEfficiencySurface.r3StationarityCoeff_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/RegionOpenness.lean:61
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.Regions 6 declarations The two support regimes are instances of one finite primal and strict dual certificate predicate.

Certified staircase support regions

The two support regimes are instances of one finite primal and strict dual certificate predicate. The pattern numbers follow the four-bit enumeration.

def patternInformationSlope

For the supplied quantities and conditions, the pattern information slope is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The pattern Information Slope is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
s :
Fin 14
t :
ℝ
patternInformationSlope θ p ε s t :
ℝ
2 * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s
CausalSmith.Stat.LdpAteEfficiencySurface.patternInformationSlope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Regions.lean:17
def dualRay

For the supplied quantities and conditions, the dual ray is the mathematical object specified below. The dual Ray is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
η :
Fin 4 → ℝ
s :
Fin 14
dualRay ε η s :
ℝ
∑ j : Fin 4, patternRay ε s j * η j

the active support is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The active Support is determined by the displayed parameters.

Definition (Lean source)
K :
Finset (Fin 14)
s :
activeSupport α K :
Prop
α s ≠ 0 ↔ s ∈ K
CausalSmith.Stat.LdpAteEfficiencySurface.activeSupport · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Regions.lean:28
def certifiedRegion

For the supplied quantities and conditions, the certified region is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
K :
Finset (Fin 14)
distinct :
certifiedRegion K distinct :
Set (ℝ × ℝ × ℝ × ℝ)
{x | let p := x.1 let μ0 := x.2.1 let μ1 := x.2.2.1 let ε := x.2.2.2 let θ : TrialParameter := fun k => if k = 0 then μ0 else μ1 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < ε ∧ ∃ α : StaircaseWeight, ∃ t : ℝ, ∃ η : Fin 4 → ℝ, staircaseFeasible ε α ∧ activeSupport α K ∧ (∀ s ∈ K, 0 < α s) ∧ (∑ s : Fin 14, α s * patternInformationSlope θ p ε s t) = 0 ∧ (∀ s ∈ K, dualRay ε η s = patternInformation θ p ε s t) ∧ (∀ s ∉ K, patternInformation θ p ε s t < dualRay ε η s) ∧ (distinct → ∀ s ∈ K, ∀ u ∈ K, s ≠ u → projectedScore θ p ε s t ≠ projectedScore θ p ε u t)}
CausalSmith.Stat.LdpAteEfficiencySurface.certifiedRegion · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/Regions.lean:33

the r3 is the mathematical object specified below.

Definition (Lean source)
R3 :
Set (ℝ × ℝ × ℝ × ℝ)
certifiedRegion ({0, 5, 7} : Finset (Fin 14)) false

the r5 is the mathematical object specified below.

Definition (Lean source)
R5 :
Set (ℝ × ℝ × ℝ × ℝ)
certifiedRegion ({2, 3, 5, 7, 8} : Finset (Fin 14)) true
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialAdjacentScore 16 declarations Actual adjacent-prefix score characterization

Actual adjacent-prefix score characterization

def canonicalInitLast

Canonical splitting coordinates, with the last coordinate indexed by the literal successor index rather than by an opaque proof term. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n k :
ℕ
Fin n → Type*
hk :
k + 1 ≤ n
u :
History Z (k + 1) hk
canonicalInitLast hk u :
History Z k (le_of_succ_le hk) × Z (canonicalNextIndex hk)
(Fin.init u, u (last k))
def canonicalSnoc

The inverse of canonicalInitLast. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
n k :
ℕ
Fin n → Type*
hk :
k + 1 ≤ n
u :
History Z k (le_of_succ_le hk) × Z (canonicalNextIndex hk)
canonicalSnoc hk u :
History Z (k + 1) hk
snoc u.1 u.2
theorem measurable_canonicalInitLast

the measurable canonical init last assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n k :
ℕ
Fin n → Type*
∀ i, MeasurableSpace (Z i)
hk :
k + 1 ≤ n
Proof (Lean source)
lemma measurable_canonicalInitLast {n k : ℕ} {Z : Fin n → Type*} [∀ i, MeasurableSpace (Z i)] (hk : k + 1 ≤ n) : Measurable (canonicalInitLast (Z := Z) hk) := by cases nextIndex_eq_canonicalNextIndex hk exact measurable_init_last hk
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_canonicalInitLast · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:30
theorem measurable_canonicalSnoc

the measurable canonical snoc assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n k :
ℕ
Fin n → Type*
∀ i, MeasurableSpace (Z i)
hk :
k + 1 ≤ n
Proof (Lean source)
lemma measurable_canonicalSnoc {n k : ℕ} {Z : Fin n → Type*} [∀ i, MeasurableSpace (Z i)] (hk : k + 1 ≤ n) : Measurable (canonicalSnoc (Z := Z) hk) := by cases nextIndex_eq_canonicalNextIndex hk exact measurable_snoc hk
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_canonicalSnoc · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:37
theorem canonicalSnoc_initLast

Under the stated assumptions, canonically rejoining a history with its last observation recovers the original history.

Formal statement
n k :
ℕ
Fin n → Type*
hk :
k + 1 ≤ n
u :
History Z (k + 1) hk
Proof (Lean source)
@[simp] lemma canonicalSnoc_initLast {n k : ℕ} {Z : Fin n → Type*} (hk : k + 1 ≤ n) (u : History Z (k + 1) hk) : canonicalSnoc hk (canonicalInitLast hk u) = u := by exact Fin.snoc_init_self u
CausalSmith.Stat.LdpAteEfficiencySurface.canonicalSnoc_initLast · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:44
theorem canonicalInitLast_snoc

Under the stated assumptions, splitting a canonically extended history recovers its original history and last observation.

Formal statement
n k :
ℕ
Fin n → Type*
hk :
k + 1 ≤ n
u :
History Z k (le_of_succ_le hk) × Z (canonicalNextIndex hk)
Proof (Lean source)
@[simp] lemma canonicalInitLast_snoc {n k : ℕ} {Z : Fin n → Type*} (hk : k + 1 ≤ n) (u : History Z k (le_of_succ_le hk) × Z (canonicalNextIndex hk)) : canonicalInitLast hk (canonicalSnoc hk u) = u := by cases u with | mk h z => apply Prod.ext · funext i exact congrFun (Fin.init_snoc (α := fun j : Fin (k + 1) => Z (castLE hk j)) (p := h) (x := z)) i · exact Fin.snoc_last (α := fun j : Fin (k + 1) => Z (castLE hk j)) (p := h) (x := z)
CausalSmith.Stat.LdpAteEfficiencySurface.canonicalInitLast_snoc · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:50
theorem integrable_transcriptPrefixMixtureRealDerivative

the integrable transcript prefix mixture real derivative assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
Proof (Lean source)
lemma integrable_transcriptPrefixMixtureRealDerivative {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) : Integrable (transcriptPrefixMixtureRealDerivative P θ v p n k hk) (transcriptPrefixReferenceMeasure P n k hk) := by let ν := transcriptPrefixReferenceMeasure P n k hk let μ (x : Fin n → Fin 4) := (P.transcript n x).map (transcriptPrefix hk) letI (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 letI (x : Fin n → Fin 4) : IsProbabilityMeasure (μ x) := Measure.isProbabilityMeasure_map (measurable_transcriptPrefix hk).aemeasurable letI : IsFiniteMeasure ν := by dsimp [ν, transcriptPrefixReferenceMeasure] infer_instance have hac (x : Fin n → Fin 4) : μ x ≪ ν := by dsimp [μ, ν, transcriptPrefixReferenceMeasure] exact (transcriptComponent_ac_reference P n x).map (measurable_transcriptPrefix hk) have hcomponent (x : Fin n → Fin 4) : Integrable (transcriptPrefixComponentRealDensity P n k hk x) ν := by have h := (integrable_toReal_rnDeriv_mul_iff (hac x) (f := fun _ => (1 : ℝ))).2 (integrable_const (1 : ℝ)) change Integrable (fun y => ((μ x).rnDeriv ν y).toReal) ν simpa only [mul_one] using h unfold transcriptPrefixMixtureRealDerivative exact integrable_finsetSum _ fun x _ => (hcomponent x).const_mul _
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_transcriptPrefixMixtureRealDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:66
theorem conditionalTranscriptPrefixDirectionalScore_integrable_general

the conditional transcript prefix directional score integrable general assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the conditional Transcript Prefix Directional Score integrable general.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k ≤ n
Proof (Lean source)
lemma conditionalTranscriptPrefixDirectionalScore_integrable_general {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k ≤ n) : Integrable (conditionalTranscriptPrefixDirectionalScore P θ v p n k hk) (transcriptPrefixLaw P θ p n k hk) := by let ν := transcriptPrefixReferenceMeasure P n k hk let μ := transcriptPrefixLaw P θ p n k hk letI : IsFiniteMeasure ν := by dsimp [ν, transcriptPrefixReferenceMeasure] infer_instance letI : IsFiniteMeasure μ := by dsimp [μ, transcriptPrefixLaw] infer_instance rw [← transcriptPrefixLaw_eq_withDensity_reference P θ p n k hk] rw [integrable_withDensity_iff_integrable_smul' (Measure.measurable_rnDeriv μ ν) (Measure.rnDeriv_lt_top μ ν)] refine (integrable_transcriptPrefixMixtureRealDerivative P θ v p n k hk).congr ?_ filter_upwards [transcriptPrefixDensity_toReal_ae_eq_mixture_of_interior P θ p n k hk hp hθ] with h hdensity rw [smul_eq_mul, hdensity] rw [← conditionalTranscriptPrefixDirectionalScore_mul_density P θ v p hp hθ n k hk h]
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptPrefixDirectionalScore_integrable_general · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:96
theorem setIntegral_conditionalTranscriptPrefixDirectionalScore

the set integral conditional transcript prefix directional score assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the set Integral conditional Transcript Prefix Directional Score.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k ≤ n
A :
Set (History (Z n) k hk)
hA :
∫ h in A, conditionalTranscriptPrefixDirectionalScore P θ v p n k hk h ∂transcriptPrefixLaw P θ p n k hk
= ∫ h in A, transcriptPrefixMixtureRealDerivative P θ v p n k hk h ∂transcriptPrefixReferenceMeasure P n k hk
Proof (Lean source)
lemma setIntegral_conditionalTranscriptPrefixDirectionalScore {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k ≤ n) (A : Set (History (Z n) k hk)) (hA : MeasurableSet A) : ∫ h in A, conditionalTranscriptPrefixDirectionalScore P θ v p n k hk h ∂transcriptPrefixLaw P θ p n k hk = ∫ h in A, transcriptPrefixMixtureRealDerivative P θ v p n k hk h ∂transcriptPrefixReferenceMeasure P n k hk := by let ν := transcriptPrefixReferenceMeasure P n k hk let μ := transcriptPrefixLaw P θ p n k hk letI : IsFiniteMeasure ν := by dsimp [ν, transcriptPrefixReferenceMeasure] infer_instance letI : IsFiniteMeasure μ := by dsimp [μ, transcriptPrefixLaw] infer_instance rw [← transcriptPrefixLaw_eq_withDensity_reference P θ p n k hk] simp_rw [← integral_indicator hA] rw [integral_withDensity_eq_integral_toReal_smul (Measure.measurable_rnDeriv μ ν) (Measure.rnDeriv_lt_top μ ν)] apply integral_congr_ae filter_upwards [transcriptPrefixDensity_toReal_ae_eq_mixture_of_interior P θ p n k hk hp hθ] with h hdensity by_cases hh : h ∈ A · simp only [hh, indicator_of_mem, smul_eq_mul] rw [show (μ.rnDeriv ν h).toReal = transcriptPrefixMixtureRealDensity P θ p n k hk h by simpa [μ, ν] using hdensity] simpa only [mul_comm] using (conditionalTranscriptPrefixDirectionalScore_mul_density P θ v p hp hθ n k hk h) · simp [hh]
CausalSmith.Stat.LdpAteEfficiencySurface.setIntegral_conditionalTranscriptPrefixDirectionalScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:124
theorem transcriptSuccessorLaw_map_canonicalInitLast

the transcript successor law map canonical init last assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Successor Law map canonical Init Last.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
(transcriptPrefixLaw P θ p n (k + 1) hk).map (canonicalInitLast (Z := Z n) hk)
= outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))
Proof (Lean source)
lemma transcriptSuccessorLaw_map_canonicalInitLast {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : (transcriptPrefixLaw P θ p n (k + 1) hk).map (canonicalInitLast (Z := Z n) hk) = outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) := by cases nextIndex_eq_canonicalNextIndex hk exact transcriptSuccessorLaw_eq_jointChannel P θ p hp hθ n k hk
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptSuccessorLaw_map_canonicalInitLast · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:162
def actualSuccessorScoreInCoordinates

The actual successor-prefix score, written in canonical split coordinates. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The actual Successor Score In Coordinates is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
z :
History (Z n) k (le_of_succ_le hk) × Z n (canonicalNextIndex hk)
actualSuccessorScoreInCoordinates P θ v p n k hk z :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.actualSuccessorScoreInCoordinates · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:177
theorem measurable_actualSuccessorScoreInCoordinates

the measurable actual successor score in coordinates assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_actualSuccessorScoreInCoordinates · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:187
theorem actualSuccessorScoreInCoordinates_integrable

the actual successor score in coordinates integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the actual Successor Score In Coordinates integrable.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma actualSuccessorScoreInCoordinates_integrable {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : Integrable (actualSuccessorScoreInCoordinates P θ v p n k hk) (outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))) := by rw [← transcriptSuccessorLaw_map_canonicalInitLast P θ p hp hθ n k hk] rw [integrable_map_measure (measurable_actualSuccessorScoreInCoordinates P θ v p n k hk).aestronglyMeasurable (measurable_canonicalInitLast hk).aemeasurable] simpa [Function.comp_def, actualSuccessorScoreInCoordinates] using (conditionalTranscriptPrefixDirectionalScore_integrable_general P θ v p hp hθ n (k + 1) hk)
CausalSmith.Stat.LdpAteEfficiencySurface.actualSuccessorScoreInCoordinates_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:200
theorem hasDerivAt_transcriptPrefixEventMass

the has deriv at transcript prefix event mass assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the has Deriv At transcript Prefix Event Mass.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k ≤ n
A :
Set (History (Z n) k hk)
hA :
HasDerivAt (fun u => (transcriptPrefixLaw P (parameterPath θ v u) p n k hk A).toReal) (∫ h in A, transcriptPrefixMixtureRealDerivative P θ v p n k hk h ∂transcriptPrefixReferenceMeasure P n k hk) 0
Proof (Lean source)
lemma hasDerivAt_transcriptPrefixEventMass {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k ≤ n) (A : Set (History (Z n) k hk)) (hA : MeasurableSet A) : HasDerivAt (fun u => (transcriptPrefixLaw P (parameterPath θ v u) p n k hk A).toReal) (∫ h in A, transcriptPrefixMixtureRealDerivative P θ v p n k hk h ∂transcriptPrefixReferenceMeasure P n k hk) 0 := by let g : History (Z n) k hk → ℝ := A.indicator (fun _ => 1) have hg : Measurable g := measurable_const.indicator hA have hgInt (x : Fin n → Fin 4) : Integrable g ((P.transcript n x).map (transcriptPrefix hk)) := by letI : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 letI : IsProbabilityMeasure ((P.transcript n x).map (transcriptPrefix hk)) := Measure.isProbabilityMeasure_map (measurable_transcriptPrefix hk).aemeasurable exact (integrable_const (1 : ℝ)).indicator hA have h := hasDerivAt_integral_transcriptPrefixLaw P θ v p hp hθ n k hk g hg hgInt have hcoef : (∫ h, transcriptPrefixMixtureRealDerivative P θ v p n k hk h * g h ∂transcriptPrefixReferenceMeasure P n k hk) = ∫ h in A, transcriptPrefixMixtureRealDerivative P θ v p n k hk h ∂transcriptPrefixReferenceMeasure P n k hk := by rw [← integral_indicator hA] apply integral_congr_ae filter_upwards with y by_cases hy : y ∈ A <;> simp [g, hy] rw [hcoef] at h simpa [g, integral_indicator hA, measureReal_def] using h
CausalSmith.Stat.LdpAteEfficiencySurface.hasDerivAt_transcriptPrefixEventMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:220
theorem actualSuccessorScoreInCoordinates_ae_eq_candidate

The actual adjacent prefix score is the inherited prefix score plus the current channel score, almost everywhere under the actual successor law. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the actual Successor Score In Coordinates ae eq candidate.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma actualSuccessorScoreInCoordinates_ae_eq_candidate {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : actualSuccessorScoreInCoordinates P θ v p n k hk =ᵐ[ outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))] successorDirectionalScoreCandidate P θ v p n k hk := by cases nextIndex_eq_canonicalNextIndex hk let μ := transcriptPrefixLaw P θ p n (k + 1) hk let split := canonicalInitLast (Z := Z n) hk let ν := outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) have hmap : μ.map split = ν := transcriptSuccessorLaw_map_canonicalInitLast P θ p hp hθ n k hk have hf := actualSuccessorScoreInCoordinates_integrable P θ v p hp hθ n k hk have hg := successorDirectionalScoreCandidate_integrable P θ v p hp hθ n k hk refine Integrable.ae_eq_of_forall_setIntegral_eq _ _ hf hg ?_ intro A hA _ have hprefix := hasDerivAt_transcriptPrefixEventMass P θ v p hp hθ n (k + 1) hk (split ⁻¹' A) (hA.preimage (measurable_canonicalInitLast hk)) have hsuccessor := hasDerivAt_successorPrefixEventMass P θ v p hp hθ n k hk A hA have hevent : (fun u => (transcriptPrefixLaw P (parameterPath θ v u) p n (k + 1) hk (split ⁻¹' A)).toReal) = fun u => successorPrefixEventMass P θ v p n k hk u A := by funext u unfold successorPrefixEventMass change ((transcriptPrefixLaw P (parameterPath θ v u) p n (k + 1) hk) (split ⁻¹' A)).toReal = ((Measure.map split (transcriptPrefixLaw P (parameterPath θ v u) p n (k + 1) hk)) A).toReal rw [Measure.map_apply (measurable_canonicalInitLast hk) hA] rw [hevent] at hprefix have hcoeff := hprefix.unique hsuccessor change (∫ x in A, actualSuccessorScoreInCoordinates P θ v p n k hk x ∂ν) = ∫ x in A, successorDirectionalScoreCandidate P θ v p n k hk x ∂ν rw [← hmap] simp_rw [← integral_indicator hA] have hactualMeas : AEStronglyMeasurable (A.indicator (actualSuccessorScoreInCoordinates P θ v p n k hk)) (Measure.map split μ) := by have hm : Measurable (A.indicator (actualSuccessorScoreInCoordinates P θ v p n k hk)) := (measurable_actualSuccessorScoreInCoordinates P θ v p n k hk).indicator hA exact hm.aestronglyMeasurable rw [integral_map (measurable_canonicalInitLast hk).aemeasurable hactualMeas] have hactual : (fun u => A.indicator (actualSuccessorScoreInCoordinates P θ v p n k hk) (split u)) = (split ⁻¹' A).indicator (conditionalTranscriptPrefixDirectionalScore P θ v p n (k + 1) hk) := by funext u by_cases hu : split u ∈ A <;> simp [hu, split, actualSuccessorScoreInCoordinates] rw [hactual, integral_indicator (hA.preimage (measurable_canonicalInitLast hk))] rw [setIntegral_conditionalTranscriptPrefixDirectionalScore P θ v p hp hθ n (k + 1) hk (split ⁻¹' A) (hA.preimage (measurable_canonicalInitLast hk))] rw [hmap, integral_indicator hA] rw [← successorEventDerivative_eq_setIntegral_successorDirectionalScoreCandidate P θ v p hp hθ n k hk A hA] exact hcoeff
CausalSmith.Stat.LdpAteEfficiencySurface.actualSuccessorScoreInCoordinates_ae_eq_candidate · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:255
theorem actualSuccessorScoreIncrement_ae_eq_channelDirectionalScore

Consequently, the adjacent score increment is exactly the current joint-channel directional score almost everywhere. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the actual Successor Score Increment ae eq channel Directional Score.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma actualSuccessorScoreIncrement_ae_eq_channelDirectionalScore {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : (fun z => actualSuccessorScoreInCoordinates P θ v p n k hk z - liftedPrefixDirectionalScore P θ v p n k hk z) =ᵐ[ outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))] channelDirectionalScore θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) v := by filter_upwards [actualSuccessorScoreInCoordinates_ae_eq_candidate P θ v p hp hθ n k hk] with z hz rw [hz] simp [successorDirectionalScoreCandidate]
CausalSmith.Stat.LdpAteEfficiencySurface.actualSuccessorScoreIncrement_ae_eq_channelDirectionalScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialAdjacentScore.lean:327
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialBayesMeasurability 4 declarations Measurability of scalar-direction local risks

Measurability of scalar-direction local risks

theorem measurable_scaledError_sq_scaledDirection

Squared scaled error is jointly measurable in a scalar local direction and an arbitrary released transcript. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta v :
n :
ℕ
Measurable (fun az : ℝ × Transcript (Z n) => ofReal ((scaledError P theta (scaledDirection az.1 v) n az.2) ^ 2))
Proof (Lean source)
lemma measurable_scaledError_sq_scaledDirection {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta v : TrialParameter) (n : ℕ) : Measurable (fun az : ℝ × Transcript (Z n) => ofReal ((scaledError P theta (scaledDirection az.1 v) n az.2) ^ 2)) := by apply ENNReal.measurable_ofReal.comp apply Measurable.pow_const unfold scaledError contrast localAlternative simp only [scaledDirection] exact measurable_const.mul ((P.estimate_measurable n).comp measurable_snd |>.sub (by fun_prop))
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_scaledError_sq_scaledDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialBayesMeasurability.lean:14
theorem measurable_localRisk_scaledDirection

For every procedure, the local risk along a scalar direction is measurable without any countability assumption on the output spaces. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta v :
p :
ℝ
n :
ℕ
Measurable (fun a => localRisk P theta (scaledDirection a v) p n)
Proof (Lean source)
lemma measurable_localRisk_scaledDirection {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta v : TrialParameter) (p : ℝ) (n : ℕ) : Measurable (fun a => localRisk P theta (scaledDirection a v) p n) := by let loss : ℝ → Transcript (Z n) → ℝ≥0∞ := fun a z => ofReal ((scaledError P theta (scaledDirection a v) n z) ^ 2) have hloss : Measurable (uncurry loss) := by exact measurable_scaledError_sq_scaledDirection P theta v n have hcomponent (x : Fin n → Fin 4) : Measurable (fun a => ∫⁻ z, loss a z ∂P.transcript n x) := by letI : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 exact hloss.lintegral_prod_right have hweight (x : Fin n → Fin 4) : Measurable (fun a => ofReal (inputPathProbability (localAlternative theta (scaledDirection a v) n) p x)) := by apply ENNReal.measurable_ofReal.comp have heq (a : ℝ) : localAlternative theta (scaledDirection a v) n = parameterPath theta v (a / sqrt n) := by funext k simp only [localAlternative, scaledDirection, parameterPath] ring simp_rw [heq] have hc : Continuous (fun u => inputPathProbability (parameterPath theta v u) p x) := by rw [continuous_iff_continuousAt] intro u exact (hasDerivAt_inputPathProbability_parameterPath theta v p u x).continuousAt exact hc.measurable.comp (by fun_prop) have hsum : Measurable (fun a => ∑ x : Fin n → Fin 4, ofReal (inputPathProbability (localAlternative theta (scaledDirection a v) n) p x) * ∫⁻ z, loss a z ∂P.transcript n x) := by apply Finset.measurable_fun_sum intro x hx exact (hweight x).mul (hcomponent x) convert hsum using 1 funext a unfold localRisk transcriptLaw rw [MeasureTheory.lintegral_finset_sum_measure] apply Finset.sum_congr rfl intro x hx rw [MeasureTheory.lintegral_smul_measure] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_localRisk_scaledDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialBayesMeasurability.lean:27
theorem aemeasurable_localRisk_scaledDirection

The scalar local-risk measurability hypothesis used by compact-prior Bayes ordering is therefore automatic. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta v :
p ell upper :
ℝ
n :
ℕ
AEMeasurable (fun a => localRisk P theta (scaledDirection a v) p n) (parameterMeasure ell upper)
Proof (Lean source)
lemma aemeasurable_localRisk_scaledDirection {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta v : TrialParameter) (p ell upper : ℝ) (n : ℕ) : AEMeasurable (fun a => localRisk P theta (scaledDirection a v) p n) (parameterMeasure ell upper) := (measurable_localRisk_scaledDirection P theta v p n).aemeasurable
CausalSmith.Stat.LdpAteEfficiencySurface.aemeasurable_localRisk_scaledDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialBayesMeasurability.lean:73
theorem eventually_compactPrior_bayesRisk_le_localWorstRisk_auto

The compact-prior Bayes ordering theorem has no remaining measurability premise for a paper procedure. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta v :
p H ell upper :
ℝ
htheta :
w :
ℝ → ℝ
hw :
hwint :
hw_nonneg :
∀ a, 0 ≤ w a
hnorm :
∫ a, w a ∂Causalean.Stat.Minimax.ObservationDependentVanTrees.parameterMeasure ell upper
= 1
hcover :
∀ a ∈ Icc ell upper,
sqrt (((scaledDirection a v) 0) ^ 2 + ((scaledDirection a v) 1) ^ 2) ≤ H
∀ᶠ n in atTop, AEMeasurable (fun a => ofReal (w a) * localRisk P theta (scaledDirection a v) p n) (parameterMeasure ell upper) ∧ (∫⁻ a, ofReal (w a) * localRisk P theta (scaledDirection a v) p n ∂Causalean.Stat.Minimax.ObservationDependentVanTrees.parameterMeasure ell upper)
≤ localWorstRisk P theta p H n
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma eventually_compactPrior_bayesRisk_le_localWorstRisk_auto {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta v : TrialParameter) (p H ell upper : ℝ) (htheta : InteriorMeans theta) (w : ℝ → ℝ) (hw : Measurable w) (hwint : Integrable w (parameterMeasure ell upper)) (hw_nonneg : ∀ a, 0 ≤ w a) (hnorm : ∫ a, w a ∂Causalean.Stat.Minimax.ObservationDependentVanTrees.parameterMeasure ell upper = 1) (hcover : ∀ a ∈ Icc ell upper, sqrt (((scaledDirection a v) 0) ^ 2 + ((scaledDirection a v) 1) ^ 2) ≤ H) : ∀ᶠ n in atTop, AEMeasurable (fun a => ofReal (w a) * localRisk P theta (scaledDirection a v) p n) (parameterMeasure ell upper) ∧ (∫⁻ a, ofReal (w a) * localRisk P theta (scaledDirection a v) p n ∂Causalean.Stat.Minimax.ObservationDependentVanTrees.parameterMeasure ell upper) ≤ localWorstRisk P theta p H n := by exact eventually_compactPrior_bayesRisk_le_localWorstRisk P theta v p H ell upper htheta w hw hwint hw_nonneg hnorm hcover (fun n ↦ aemeasurable_localRisk_scaledDirection P theta v p ell upper n)
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_compactPrior_bayesRisk_le_localWorstRisk_auto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialBayesMeasurability.lean:83
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialBayesOrdering 6 declarations Compact-prior Bayes risk versus local worst risk

Compact-prior Bayes risk versus local worst risk

def scaledDirection

Scalar multiplication of a trial-parameter direction. For the displayed inputs and conditions, the stated result follows.

Definition (Lean source)
a :
ℝ
scaledDirection a v :
fun k => a * v k
theorem norm_scaledDirection

Euclidean norm scales by the absolute scalar along a trial direction. For the displayed inputs and conditions, the stated result follows.

Formal statement
a :
ℝ
sqrt (((scaledDirection a v) 0) ^ 2 + ((scaledDirection a v) 1) ^ 2)
= |a| * sqrt ((v 0) ^ 2 + (v 1) ^ 2)
Proof (Lean source)
lemma norm_scaledDirection (a : ℝ) (v : TrialParameter) : sqrt (((scaledDirection a v) 0) ^ 2 + ((scaledDirection a v) 1) ^ 2) = |a| * sqrt ((v 0) ^ 2 + (v 1) ^ 2) := by unfold scaledDirection rw [show (a * v 0) ^ 2 + (a * v 1) ^ 2 = a ^ 2 * ((v 0) ^ 2 + (v 1) ^ 2) by ring] rw [Real.sqrt_mul (sq_nonneg a), Real.sqrt_sq_eq_abs]
CausalSmith.Stat.LdpAteEfficiencySurface.norm_scaledDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialBayesOrdering.lean:19
theorem scaledDirection_mem_cover

The scalar directions indexed by [-R,R] fit in the radius obtained by multiplying R by the Euclidean norm of the base direction. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
R a :
ℝ
ha :
a ∈ Icc (-R) R
sqrt (((scaledDirection a v) 0) ^ 2 + ((scaledDirection a v) 1) ^ 2)
≤ R * sqrt ((v 0) ^ 2 + (v 1) ^ 2)
Proof (Lean source)
lemma scaledDirection_mem_cover {R a : ℝ} (v : TrialParameter) (ha : a ∈ Icc (-R) R) : sqrt (((scaledDirection a v) 0) ^ 2 + ((scaledDirection a v) 1) ^ 2) ≤ R * sqrt ((v 0) ^ 2 + (v 1) ^ 2) := by rw [norm_scaledDirection] apply mul_le_mul_of_nonneg_right _ (Real.sqrt_nonneg _) rw [abs_le] exact ⟨ha.1, ha.2⟩
CausalSmith.Stat.LdpAteEfficiencySurface.scaledDirection_mem_cover · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialBayesOrdering.lean:29
theorem lintegral_ofReal_eq_one_of_integral_eq_one

An integrable nonnegative real density normalized in the Bochner integral is also normalized after embedding into ENNReal. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
A :
mu :
w :
A → ℝ
hwint :
hw_nonneg :
∀ᵐ a ∂mu, 0 ≤ w a
hnorm :
∫ a, w a ∂mu = 1
∫⁻ a, ofReal (w a) ∂mu = 1
Proof (Lean source)
lemma lintegral_ofReal_eq_one_of_integral_eq_one {A : Type*} [MeasurableSpace A] (mu : Measure A) (w : A → ℝ) (hwint : Integrable w mu) (hw_nonneg : ∀ᵐ a ∂mu, 0 ≤ w a) (hnorm : ∫ a, w a ∂mu = 1) : ∫⁻ a, ofReal (w a) ∂mu = 1 := by rw [← ofReal_integral_eq_lintegral_ofReal hwint hw_nonneg, hnorm, ENNReal.ofReal_one]
CausalSmith.Stat.LdpAteEfficiencySurface.lintegral_ofReal_eq_one_of_integral_eq_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialBayesOrdering.lean:41
theorem weighted_lintegral_le_uniform

A normalized nonnegative weight preserves a uniform ENNReal upper bound under integration. The measurability conclusion records the exact hypothesis needed by later product and iterated-integral rewrites. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
A :
mu :
w :
A → ℝ
f :
A → ℝ≥0∞
B :
ℝ≥0∞
hw :
hf :
hwint :
hw_nonneg :
∀ᵐ a ∂mu, 0 ≤ w a
hnorm :
∫ a, w a ∂mu = 1
hle :
∀ᵐ a ∂mu, f a ≤ B
conclusion 1
AEMeasurable (fun a => ofReal (w a) * f a) mu
conclusion 2
(∫⁻ a, ofReal (w a) * f a ∂mu) ≤ B
Proof (Lean source)
lemma weighted_lintegral_le_uniform {A : Type*} [MeasurableSpace A] (mu : Measure A) (w : A → ℝ) (f : A → ℝ≥0∞) (B : ℝ≥0∞) (hw : Measurable w) (hf : AEMeasurable f mu) (hwint : Integrable w mu) (hw_nonneg : ∀ᵐ a ∂mu, 0 ≤ w a) (hnorm : ∫ a, w a ∂mu = 1) (hle : ∀ᵐ a ∂mu, f a ≤ B) : AEMeasurable (fun a => ofReal (w a) * f a) mu ∧ (∫⁻ a, ofReal (w a) * f a ∂mu) ≤ B := by have hwm : AEMeasurable (fun a => ofReal (w a)) mu := (ENNReal.measurable_ofReal.comp hw).aemeasurable constructor · exact hwm.mul hf · calc (∫⁻ a, ofReal (w a) * f a ∂mu) ≤ ∫⁻ a, ofReal (w a) * B ∂mu := by apply lintegral_mono_ae filter_upwards [hle] with a ha gcongr _ = (∫⁻ a, ofReal (w a) ∂mu) * B := lintegral_mul_const B (ENNReal.measurable_ofReal.comp hw) _ = B := by rw [lintegral_ofReal_eq_one_of_integral_eq_one mu w hwint hw_nonneg hnorm, one_mul]
CausalSmith.Stat.LdpAteEfficiencySurface.weighted_lintegral_le_uniform · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialBayesOrdering.lean:50
theorem eventually_compactPrior_bayesRisk_le_localWorstRisk

If a compact family of scalar directions fits inside radius H, then at all sufficiently large sample sizes its normalized Bayes average risk is at most the local worst risk at that radius. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta v :
p H ell upper :
ℝ
htheta :
w :
ℝ → ℝ
hw :
hwint :
hw_nonneg :
∀ a, 0 ≤ w a
hnorm :
∫ a, w a ∂parameterMeasure ell upper = 1
hcover :
∀ a ∈ Icc ell upper,
sqrt (((scaledDirection a v) 0) ^ 2 + ((scaledDirection a v) 1) ^ 2) ≤ H
hriskMeas :
∀ n,
AEMeasurable (fun a => localRisk P theta (scaledDirection a v) p n) (parameterMeasure ell upper)
∀ᶠ n in atTop, AEMeasurable (fun a => ofReal (w a) * localRisk P theta (scaledDirection a v) p n) (parameterMeasure ell upper) ∧ (∫⁻ a, ofReal (w a) * localRisk P theta (scaledDirection a v) p n ∂parameterMeasure ell upper)
≤ localWorstRisk P theta p H n
Proof (Lean source)
lemma eventually_compactPrior_bayesRisk_le_localWorstRisk {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta v : TrialParameter) (p H ell upper : ℝ) (htheta : InteriorMeans theta) (w : ℝ → ℝ) (hw : Measurable w) (hwint : Integrable w (parameterMeasure ell upper)) (hw_nonneg : ∀ a, 0 ≤ w a) (hnorm : ∫ a, w a ∂parameterMeasure ell upper = 1) (hcover : ∀ a ∈ Icc ell upper, sqrt (((scaledDirection a v) 0) ^ 2 + ((scaledDirection a v) 1) ^ 2) ≤ H) (hriskMeas : ∀ n, AEMeasurable (fun a => localRisk P theta (scaledDirection a v) p n) (parameterMeasure ell upper)) : ∀ᶠ n in atTop, AEMeasurable (fun a => ofReal (w a) * localRisk P theta (scaledDirection a v) p n) (parameterMeasure ell upper) ∧ (∫⁻ a, ofReal (w a) * localRisk P theta (scaledDirection a v) p n ∂parameterMeasure ell upper) ≤ localWorstRisk P theta p H n := by filter_upwards [eventually_localAlternative_interior_uniform theta H htheta] with n hinterior have hmem : ∀ᵐ a ∂parameterMeasure ell upper, a ∈ Icc ell upper := by unfold parameterMeasure exact ae_restrict_mem measurableSet_Icc apply weighted_lintegral_le_uniform (parameterMeasure ell upper) w (fun a => localRisk P theta (scaledDirection a v) p n) (localWorstRisk P theta p H n) hw (hriskMeas n) hwint (Filter.Eventually.of_forall hw_nonneg) hnorm filter_upwards [hmem] with a ha apply localRisk_le_localWorstRisk exact ⟨hcover a ha, hinterior (scaledDirection a v) (hcover a ha)⟩
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_compactPrior_bayesRisk_le_localWorstRisk · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialBayesOrdering.lean:76
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialDomination 8 declarations For a fixed procedure and sample size, summing the deterministic-input transcript laws gives one finite reference measure.

Common domination of sequential transcript experiments

For a fixed procedure and sample size, summing the deterministic-input transcript laws gives one finite reference measure. Every parameterized transcript mixture is absolutely continuous with respect to this measure and therefore has a Radon--Nikodym density on arbitrary measurable output spaces.

def transcriptReferenceMeasure

The sum of all deterministic-input transcript laws is a common reference measure for the fixed procedure and sample size. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
ε :
ℝ
n :
ℕ
transcriptReferenceMeasure P n :
Measure (Transcript (Z n))
∑ x : Fin n → Fin 4, P.transcript n x
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptReferenceMeasure · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDomination.lean:20
theorem transcriptComponent_ac_reference

Every deterministic-input transcript law is dominated by the common reference measure. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
n :
ℕ
x :
Fin n → Fin 4
P.transcript n x ≪ transcriptReferenceMeasure P n
Proof (Lean source)
-- @node: transcriptComponent_ac_reference lemma transcriptComponent_ac_reference {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n : ℕ) (x : Fin n → Fin 4) : P.transcript n x ≪ transcriptReferenceMeasure P n := by apply Measure.AbsolutelyContinuous.mk intro A hA href simp only [transcriptReferenceMeasure, Measure.coe_finsetSum, Finset.sum_apply] at href exact (Finset.sum_eq_zero_iff_of_nonneg (fun _ _ ↦ zero_le)).mp href x (Finset.mem_univ x)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptComponent_ac_reference · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDomination.lean:27
theorem transcriptLaw_ac_reference

Every parameterized transcript law is dominated by the same reference measure, without any countability assumption on the output sigma-fields. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
transcriptLaw P θ p n ≪ transcriptReferenceMeasure P n
Proof (Lean source)
-- @node: transcriptLaw_ac_reference lemma transcriptLaw_ac_reference {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) : transcriptLaw P θ p n ≪ transcriptReferenceMeasure P n := by unfold transcriptLaw apply Measure.AbsolutelyContinuous.mk intro A hA href simp only [Measure.coe_finsetSum, Finset.sum_apply] apply Finset.sum_eq_zero intro x _ rw [Measure.smul_apply, smul_eq_mul] exact mul_eq_zero_of_right _ (transcriptComponent_ac_reference P n x href)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw_ac_reference · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDomination.lean:41
theorem transcriptReferenceMeasure_apply_univ

The reference measure has total mass equal to the number of deterministic input paths. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
n :
ℕ
Proof (Lean source)
-- @node: transcriptReferenceMeasure_apply_univ lemma transcriptReferenceMeasure_apply_univ {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n : ℕ) : transcriptReferenceMeasure P n univ = card (Fin n → Fin 4) := by simp only [transcriptReferenceMeasure, Measure.coe_finsetSum, Finset.sum_apply] simp only [(P.factorizes n _).1.measure_univ, Finset.sum_const, nsmul_eq_mul, mul_one] norm_cast
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptReferenceMeasure_apply_univ · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDomination.lean:57
instance transcriptReferenceMeasure_isFinite

the transcript reference measure is finite is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
instance transcriptReferenceMeasure_isFinite {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n : ℕ) : IsFiniteMeasure (transcriptReferenceMeasure P n) := by constructor rw [transcriptReferenceMeasure_apply_univ] exact ENNReal.natCast_lt_top _
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptReferenceMeasure_isFinite · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDomination.lean:70
instance transcriptLaw_isFinite

the transcript law is finite is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The transcript Law is Finite is determined by the displayed parameters.

Definition (Lean source)
instance transcriptLaw_isFinite {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) : IsFiniteMeasure (transcriptLaw P θ p n) := by constructor simp only [transcriptLaw, Measure.coe_finsetSum, Finset.sum_apply, Measure.smul_apply, smul_eq_mul, (P.factorizes n _).1.measure_univ, mul_one] exact ENNReal.sum_lt_top.mpr fun _ _ ↦ ENNReal.ofReal_lt_top
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw_isFinite · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDomination.lean:79
def transcriptDensity

The Radon--Nikodym density of a transcript law against its common finite reference measure. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The transcript Density is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
transcriptDensity P θ p n :
Transcript (Z n) → ℝ≥0∞
(transcriptLaw P θ p n).rnDeriv (transcriptReferenceMeasure P n)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDomination.lean:89
theorem transcriptLaw_eq_withDensity_reference

Integrating the transcript density against the common reference measure recovers the parameterized transcript law. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
(transcriptReferenceMeasure P n).withDensity (transcriptDensity P θ p n)
= transcriptLaw P θ p n
Proof (Lean source)
-- @node: transcriptLaw_eq_withDensity_reference lemma transcriptLaw_eq_withDensity_reference {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) : (transcriptReferenceMeasure P n).withDensity (transcriptDensity P θ p n) = transcriptLaw P θ p n := by exact Measure.withDensity_rnDeriv_eq (transcriptLaw P θ p n) (transcriptReferenceMeasure P n) (transcriptLaw_ac_reference P θ p n)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw_eq_withDensity_reference · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDomination.lean:96
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialDoob 11 declarations This file equips a full released transcript with its coordinate-prefix filtration and instantiates the generic finite-horizon Doob information decomposition for the paper's global finite-mixture score.

Doob decomposition of the sequential transcript score

This file equips a full released transcript with its coordinate-prefix filtration and instantiates the generic finite-horizon Doob information decomposition for the paper's global finite-mixture score. Identifying the conditional expectations with the explicit prefix scores is kept separate until the score-projection substrate is available.

def transcriptPrefixFiltration

The prefix filtration on a length-n transcript is generated at time k by the coordinates whose indices are strictly below k. The stated result follows.

Definition (Lean source)
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
transcriptPrefixFiltration :
Filtration ℕ (inferInstance : MeasurableSpace (Transcript Z))
clause 1
seq k := ⨆ i : Fin n, ⨆ _h : i.val < k, comap (fun z : Transcript Z ↦ z i) inferInstance
clause 2
mono' i j hij := by apply iSup₂_le intro a ha exact le_iSup_of_le a (le_iSup_of_le (lt_of_lt_of_le ha hij) le_rfl)
clause 3
le' k := by apply iSup₂_le intro i hi exact (measurable_pi_apply i).comap_le
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixFiltration · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:22
theorem transcriptPrefixFiltration_zero

the transcript prefix filtration zero assertion holds.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Proof (Lean source)
lemma transcriptPrefixFiltration_zero {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] : transcriptPrefixFiltration (Z := Z) 0 = ⊥ := by apply le_antisymm · change (⨆ i : Fin n, ⨆ _h : i.val < 0, comap (fun z : Transcript Z ↦ z i) inferInstance) ≤ ⊥ apply iSup₂_le intro i hi exact (Nat.not_lt_zero _ hi).elim · exact bot_le
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixFiltration_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:38
theorem transcriptPrefixFiltration_terminal

the transcript prefix filtration terminal assertion holds.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
transcriptPrefixFiltration (Z := Z) n = (inferInstance : MeasurableSpace (Transcript Z))
Proof (Lean source)
lemma transcriptPrefixFiltration_terminal {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] : transcriptPrefixFiltration (Z := Z) n = (inferInstance : MeasurableSpace (Transcript Z)) := by apply le_antisymm (Filtration.le _ _) change (⨆ i : Fin n, comap (fun z : Transcript Z ↦ z i) inferInstance) ≤ (⨆ i : Fin n, ⨆ _h : i.val < n, comap (fun z : Transcript Z ↦ z i) inferInstance) apply iSup_le intro i exact le_iSup_of_le i (le_iSup_of_le i.isLt le_rfl)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixFiltration_terminal · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:50
theorem transcriptPrefixFiltration_eq_comap

The coordinate-prefix filtration agrees with the sigma-algebra pulled back by the explicit prefix map. This is the bridge needed to apply measurable-statistic score projection to the Doob increments. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n k :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
hk :
k ≤ n
= comap (transcriptPrefix (Z := Z) hk) (inferInstance : MeasurableSpace (History Z k hk))
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma transcriptPrefixFiltration_eq_comap {n k : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] (hk : k ≤ n) : transcriptPrefixFiltration (Z := Z) k = comap (transcriptPrefix (Z := Z) hk) (inferInstance : MeasurableSpace (History Z k hk)) := by apply le_antisymm · apply iSup₂_le intro i hi let j : Fin k := ⟨i.val, hi⟩ have hij : castLE hk j = i := Fin.ext (by rfl) rw [← hij] have hj : Measurable (fun h : History Z k hk ↦ h j) := measurable_pi_apply j change comap (fun z : Transcript Z ↦ (transcriptPrefix (Z := Z) hk z) j) inferInstance ≤ comap (transcriptPrefix (Z := Z) hk) inferInstance rw [show (fun z : Transcript Z ↦ (transcriptPrefix (Z := Z) hk z) j) = (fun h : History Z k hk ↦ h j) ∘ transcriptPrefix (Z := Z) hk by rfl] rw [← MeasurableSpace.comap_comp] exact comap_mono (g := transcriptPrefix (Z := Z) hk) hj.comap_le · rw [show (inferInstance : MeasurableSpace (History Z k hk)) = ⨆ j : Fin k, comap (fun h : History Z k hk ↦ h j) inferInstance by rfl] rw [MeasurableSpace.comap_iSup] apply iSup_le intro j rw [MeasurableSpace.comap_comp] exact le_iSup_of_le (castLE hk j) (le_iSup_of_le j.isLt le_rfl)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixFiltration_eq_comap · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:64
theorem condExp_globalScore_terminal

At the terminal time, conditioning the global transcript score on the prefix filtration returns the score itself. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the cond Exp global Score terminal.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
(transcriptLaw P θ p n)[conditionalTranscriptDirectionalScore P θ v p n | transcriptPrefixFiltration (Z := Z n) n]
=ᵐ[transcriptLaw P θ p n] conditionalTranscriptDirectionalScore P θ v p n
Proof (Lean source)
lemma condExp_globalScore_terminal {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : (transcriptLaw P θ p n)[conditionalTranscriptDirectionalScore P θ v p n | transcriptPrefixFiltration (Z := Z n) n] =ᵐ[transcriptLaw P θ p n] conditionalTranscriptDirectionalScore P θ v p n := by letI : IsProbabilityMeasure (transcriptLaw P θ p n) := transcriptLaw_isProbability P θ p hp hθ n rw [transcriptPrefixFiltration_terminal] exact Filter.Eventually.of_forall (fun z ↦ congrFun (condExp_of_stronglyMeasurable le_rfl (measurable_conditionalTranscriptDirectionalScore P θ v p n).stronglyMeasurable (conditionalTranscriptDirectionalScore_integrable P θ v p n hp hθ)) z)
CausalSmith.Stat.LdpAteEfficiencySurface.condExp_globalScore_terminal · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:96
theorem condExp_globalScore_initial

At time zero, conditioning the centered global transcript score on the prefix filtration is zero. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the cond Exp global Score initial.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
(transcriptLaw P θ p n)[conditionalTranscriptDirectionalScore P θ v p n | transcriptPrefixFiltration (Z := Z n) 0]
=ᵐ[transcriptLaw P θ p n] (0 : Transcript (Z n) → ℝ)
Proof (Lean source)
lemma condExp_globalScore_initial {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : (transcriptLaw P θ p n)[conditionalTranscriptDirectionalScore P θ v p n | transcriptPrefixFiltration (Z := Z n) 0] =ᵐ[transcriptLaw P θ p n] (0 : Transcript (Z n) → ℝ) := by letI : IsProbabilityMeasure (transcriptLaw P θ p n) := transcriptLaw_isProbability P θ p hp hθ n rw [transcriptPrefixFiltration_zero, condExp_bot] rw [integral_conditionalTranscriptDirectionalScore_eq_zero P θ v p n hp hθ] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.condExp_globalScore_initial · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:113
theorem globalScore_fisher_eq_doob_sum

The paper's global transcript Fisher information is the sum of the squared Doob prefix increments. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the global Score fisher eq doob sum.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
(∫ z, conditionalTranscriptDirectionalScore P θ v p n z ^ 2 ∂transcriptLaw P θ p n)
= ∑ k ∈ range n, ∫ z, increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) k z ^ 2 ∂transcriptLaw P θ p n
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma globalScore_fisher_eq_doob_sum {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : (∫ z, conditionalTranscriptDirectionalScore P θ v p n z ^ 2 ∂transcriptLaw P θ p n) = ∑ k ∈ range n, ∫ z, increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) k z ^ 2 ∂transcriptLaw P θ p n := by letI : IsProbabilityMeasure (transcriptLaw P θ p n) := transcriptLaw_isProbability P θ p hp hθ n exact fisher_eq_sum (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) (conditionalTranscriptDirectionalScore_memLp_two P θ v p n hp hθ) n (condExp_globalScore_terminal P θ v p n hp hθ) (condExp_globalScore_initial P θ v p n hp hθ)
CausalSmith.Stat.LdpAteEfficiencySurface.globalScore_fisher_eq_doob_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:129
theorem globalScore_doobIncrement_memLp_two

Every prefix increment of the global transcript score is square-integrable. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the global Score doob Increment mem Lp two.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hθ :
MemLp (increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) k) 2 (transcriptLaw P θ p n)
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma globalScore_doobIncrement_memLp_two {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n k : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : MemLp (increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) k) 2 (transcriptLaw P θ p n) := by letI : IsProbabilityMeasure (transcriptLaw P θ p n) := transcriptLaw_isProbability P θ p hp hθ n exact increment_memLp (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) (conditionalTranscriptDirectionalScore_memLp_two P θ v p n hp hθ) k
CausalSmith.Stat.LdpAteEfficiencySurface.globalScore_doobIncrement_memLp_two · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:153
theorem condExp_globalScore_doobIncrement_zero

Every prefix increment of the global transcript score has conditional mean zero given the preceding prefix sigma-algebra. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the cond Exp global Score doob Increment zero.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hθ :
(transcriptLaw P θ p n)[ increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) k | transcriptPrefixFiltration (Z := Z n) k]
=ᵐ[transcriptLaw P θ p n] (0 : Transcript (Z n) → ℝ)
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma condExp_globalScore_doobIncrement_zero {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n k : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : (transcriptLaw P θ p n)[ increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) k | transcriptPrefixFiltration (Z := Z n) k] =ᵐ[transcriptLaw P θ p n] (0 : Transcript (Z n) → ℝ) := by letI : IsProbabilityMeasure (transcriptLaw P θ p n) := transcriptLaw_isProbability P θ p hp hθ n exact increment_condExp_zero (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) (conditionalTranscriptDirectionalScore_memLp_two P θ v p n hp hθ) k
CausalSmith.Stat.LdpAteEfficiencySurface.condExp_globalScore_doobIncrement_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:172
theorem globalScore_eq_sum_doobIncrement

The finite sum of the prefix increments recovers the centered global transcript score almost everywhere. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the global Score eq sum doob Increment.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
(fun z ↦ ∑ k ∈ range n, increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) k z)
=ᵐ[ transcriptLaw P θ p n] conditionalTranscriptDirectionalScore P θ v p n
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma globalScore_eq_sum_doobIncrement {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : (fun z ↦ ∑ k ∈ range n, increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) k z) =ᵐ[ transcriptLaw P θ p n] conditionalTranscriptDirectionalScore P θ v p n := by letI : IsProbabilityMeasure (transcriptLaw P θ p n) := transcriptLaw_isProbability P θ p hp hθ n filter_upwards [increment_sum (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) (conditionalTranscriptDirectionalScore_memLp_two P θ v p n hp hθ) n, condExp_globalScore_terminal P θ v p n hp hθ, condExp_globalScore_initial P θ v p n hp hθ] with z hsum hterminal hinitial rw [hsum, hterminal, hinitial] simp
CausalSmith.Stat.LdpAteEfficiencySurface.globalScore_eq_sum_doobIncrement · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:193
theorem globalScore_doobIncrement_orthogonal

Distinct prefix increments of the global transcript score are orthogonal. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the global Score doob Increment orthogonal.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
i j :
ℕ
hij :
i ≠ j
∫ z, increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) i z * increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) j z ∂transcriptLaw P θ p n
= 0
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma globalScore_doobIncrement_orthogonal {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) {i j : ℕ} (hij : i ≠ j) : ∫ z, increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) i z * increment (transcriptLaw P θ p n) (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) j z ∂transcriptLaw P θ p n = 0 := by letI : IsProbabilityMeasure (transcriptLaw P θ p n) := transcriptLaw_isProbability P θ p hp hθ n exact increment_orthogonal (transcriptPrefixFiltration (Z := Z n)) (conditionalTranscriptDirectionalScore P θ v p n) (conditionalTranscriptDirectionalScore_memLp_two P θ v p n hp hθ) hij
CausalSmith.Stat.LdpAteEfficiencySurface.globalScore_doobIncrement_orthogonal · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialDoob.lean:218
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialFisherInformation 13 declarations Square integrability and one-step Fisher information

Square integrability and one-step Fisher information

theorem transcriptPrefixDerivative_eq_completeDataScoreMixture

the transcript prefix derivative eq complete data score mixture assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
h :
History (Z n) k hk
hx :
∀ x : Fin n → Fin 4, inputPathProbability θ p x ≠ 0
Proof (Lean source)
lemma transcriptPrefixDerivative_eq_completeDataScoreMixture {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) (h : History (Z n) k hk) (hx : ∀ x : Fin n → Fin 4, inputPathProbability θ p x ≠ 0) : transcriptPrefixMixtureRealDerivative P θ v p n k hk h = ∑ x : Fin n → Fin 4, inputPathProbability θ p x * inputPathDirectionalScore θ v p x * transcriptPrefixComponentRealDensity P n k hk x h := by unfold transcriptPrefixMixtureRealDerivative apply Finset.sum_congr rfl intro x _ rw [inputPathDerivative_eq_probability_mul_score θ v p x (hx x)]
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixDerivative_eq_completeDataScoreMixture · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:16
theorem abs_conditionalTranscriptPrefixDirectionalScore_le

the abs conditional transcript prefix directional score le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the abs conditional Transcript Prefix Directional Score le.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k ≤ n
h :
History (Z n) k hk
Proof (Lean source)
lemma abs_conditionalTranscriptPrefixDirectionalScore_le {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k ≤ n) (h : History (Z n) k hk) : |conditionalTranscriptPrefixDirectionalScore P θ v p n k hk h| ≤ inputPathScoreBound (n := n) θ v p := by let B := inputPathScoreBound (n := n) θ v p let d := transcriptPrefixMixtureRealDensity P θ p n k hk h have hB : 0 ≤ B := inputPathScoreBound_nonneg θ v p have hd : 0 ≤ d := transcriptPrefixMixtureRealDensity_nonneg P θ p n k hk hp hθ h have hx (x : Fin n → Fin 4) : inputPathProbability θ p x ≠ 0 := ne_of_gt (inputPathProbability_pos_of_interior θ p hp hθ x) have hn : |transcriptPrefixMixtureRealDerivative P θ v p n k hk h| ≤ B * d := by rw [transcriptPrefixDerivative_eq_completeDataScoreMixture P θ v p n k hk h hx] calc |∑ x : Fin n → Fin 4, inputPathProbability θ p x * inputPathDirectionalScore θ v p x * transcriptPrefixComponentRealDensity P n k hk x h| ≤ ∑ x : Fin n → Fin 4, |inputPathProbability θ p x * inputPathDirectionalScore θ v p x * transcriptPrefixComponentRealDensity P n k hk x h| := Finset.abs_sum_le_sum_abs _ _ _ = ∑ x : Fin n → Fin 4, (inputPathProbability θ p x * transcriptPrefixComponentRealDensity P n k hk x h) * |inputPathDirectionalScore θ v p x| := by apply Finset.sum_congr rfl intro x _ have hc : 0 ≤ transcriptPrefixComponentRealDensity P n k hk x h := ENNReal.toReal_nonneg rw [abs_mul, abs_mul, abs_of_pos (inputPathProbability_pos_of_interior θ p hp hθ x), abs_of_nonneg hc] ring _ ≤ ∑ x : Fin n → Fin 4, (inputPathProbability θ p x * transcriptPrefixComponentRealDensity P n k hk x h) * B := by apply Finset.sum_le_sum intro x _ exact mul_le_mul_of_nonneg_left (abs_inputPathDirectionalScore_le_bound θ v p x) (mul_nonneg (inputPathProbability_pos_of_interior θ p hp hθ x).le ENNReal.toReal_nonneg) _ = B * d := by simp only [d, transcriptPrefixMixtureRealDensity] rw [Finset.mul_sum] apply Finset.sum_congr rfl intro x _ ring by_cases hdz : d = 0 · have hn0 : transcriptPrefixMixtureRealDerivative P θ v p n k hk h = 0 := by rw [hdz, mul_zero] at hn exact abs_eq_zero.mp (le_antisymm hn (abs_nonneg _)) rw [conditionalTranscriptPrefixDirectionalScore, hn0, show transcriptPrefixMixtureRealDensity P θ p n k hk h = 0 from hdz] simpa using hB · have hdpos : 0 < d := lt_of_le_of_ne hd (Ne.symm hdz) rw [conditionalTranscriptPrefixDirectionalScore, abs_div, abs_of_nonneg hd] exact (div_le_iff₀ hdpos).2 (by simpa [d] using hn)
CausalSmith.Stat.LdpAteEfficiencySurface.abs_conditionalTranscriptPrefixDirectionalScore_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:31
theorem conditionalTranscriptPrefixDirectionalScore_memLp_two

the conditional transcript prefix directional score mem lp two assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the conditional Transcript Prefix Directional Score mem Lp two.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k ≤ n
Proof (Lean source)
lemma conditionalTranscriptPrefixDirectionalScore_memLp_two {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k ≤ n) : MemLp (conditionalTranscriptPrefixDirectionalScore P θ v p n k hk) 2 (transcriptPrefixLaw P θ p n k hk) := by letI : IsProbabilityMeasure (transcriptPrefixLaw P θ p n k hk) := transcriptPrefixLaw_isProbability P θ p hp hθ n k hk apply MemLp.of_bound ((measurable_transcriptPrefixMixtureRealDerivative P θ v p n k hk).div (measurable_transcriptPrefixMixtureRealDensity P θ p n k hk)).aestronglyMeasurable (inputPathScoreBound (n := n) θ v p) filter_upwards with h rw [Real.norm_eq_abs] exact abs_conditionalTranscriptPrefixDirectionalScore_le P θ v p hp hθ n k hk h
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptPrefixDirectionalScore_memLp_two · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:98
theorem conditionalTranscriptPrefixDirectionalScore_sq_integrable

the conditional transcript prefix directional score sq integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the conditional Transcript Prefix Directional Score sq integrable.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k ≤ n
Integrable (fun h => conditionalTranscriptPrefixDirectionalScore P θ v p n k hk h ^ 2) (transcriptPrefixLaw P θ p n k hk)
Proof (Lean source)
lemma conditionalTranscriptPrefixDirectionalScore_sq_integrable {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k ≤ n) : Integrable (fun h => conditionalTranscriptPrefixDirectionalScore P θ v p n k hk h ^ 2) (transcriptPrefixLaw P θ p n k hk) := (conditionalTranscriptPrefixDirectionalScore_memLp_two P θ v p hp hθ n k hk).integrable_sq
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptPrefixDirectionalScore_sq_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:119
theorem actualSuccessorScoreInCoordinates_sq_integrable

the actual successor score in coordinates sq integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the actual Successor Score In Coordinates sq integrable.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Integrable (fun z => actualSuccessorScoreInCoordinates P θ v p n k hk z ^ 2) (outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))))
Proof (Lean source)
lemma actualSuccessorScoreInCoordinates_sq_integrable {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : Integrable (fun z => actualSuccessorScoreInCoordinates P θ v p n k hk z ^ 2) (outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))) := by rw [← transcriptSuccessorLaw_map_canonicalInitLast P θ p hp hθ n k hk] have hm : Measurable (fun z => actualSuccessorScoreInCoordinates P θ v p n k hk z ^ 2) := (measurable_actualSuccessorScoreInCoordinates P θ v p n k hk).pow_const 2 rw [integrable_map_measure hm.aestronglyMeasurable (measurable_canonicalInitLast hk).aemeasurable] simpa [Function.comp_def, actualSuccessorScoreInCoordinates] using (conditionalTranscriptPrefixDirectionalScore_sq_integrable P θ v p hp hθ n (k + 1) hk)
CausalSmith.Stat.LdpAteEfficiencySurface.actualSuccessorScoreInCoordinates_sq_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:133
theorem liftedPrefixDirectionalScore_sq_integrable_successorLaw

the lifted prefix directional score sq integrable successor law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the lifted Prefix Directional Score sq integrable successor Law.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Integrable (fun z => liftedPrefixDirectionalScore P θ v p n k hk z ^ 2) (outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))))
Proof (Lean source)
lemma liftedPrefixDirectionalScore_sq_integrable_successorLaw {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : Integrable (fun z => liftedPrefixDirectionalScore P θ v p n k hk z ^ 2) (outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))) := by let i := canonicalNextIndex hk let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let K : Kernel (History (Z n) k (le_of_succ_le hk)) (Z n i) := (observedStageKernel P θ p n i).comap (fun h => ((), h)) (measurable_const.prodMk measurable_id) letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) letI : IsMarkovKernel (observedStageKernel P θ p n i) := observedStageKernel_isMarkov P θ p hp hθ n i letI : IsMarkovKernel K := by dsimp [K] infer_instance have hout : outputLaw θ p (sequentialJointChannel P n i μ) = μ ⊗ₘ K := by simpa [K] using outputLaw_sequentialJointChannel P θ p hp hθ n i μ rw [hout] have hmeas : AEStronglyMeasurable (fun z => liftedPrefixDirectionalScore P θ v p n k hk z ^ 2) (μ ⊗ₘ K) := by have hm : Measurable (fun z => liftedPrefixDirectionalScore P θ v p n k hk z ^ 2) := (measurable_liftedPrefixDirectionalScore P θ v p n k hk).pow_const 2 exact hm.aestronglyMeasurable rw [Measure.integrable_compProd_iff hmeas] constructor · filter_upwards with h simpa [liftedPrefixDirectionalScore] using (integrable_const (conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h ^ 2) : Integrable _ (K h)) · simpa [liftedPrefixDirectionalScore, μ] using (conditionalTranscriptPrefixDirectionalScore_sq_integrable P θ v p hp hθ n k (le_of_succ_le hk)).norm
CausalSmith.Stat.LdpAteEfficiencySurface.liftedPrefixDirectionalScore_sq_integrable_successorLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:155
theorem channelDirectionalScore_sq_integrable_successorLaw

the channel directional score sq integrable successor law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the channel Directional Score sq integrable successor Law.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma channelDirectionalScore_sq_integrable_successorLaw {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : Integrable (fun z => channelDirectionalScore θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) v z ^ 2) (outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))) := by let ν := outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) have ha := actualSuccessorScoreInCoordinates_sq_integrable P θ v p hp hθ n k hk have hl := liftedPrefixDirectionalScore_sq_integrable_successorLaw P θ v p hp hθ n k hk have hmaMeas : AEStronglyMeasurable (actualSuccessorScoreInCoordinates P θ v p n k hk) ν := by exact (measurable_actualSuccessorScoreInCoordinates P θ v p n k hk) |>.aestronglyMeasurable have hmlMeas : AEStronglyMeasurable (liftedPrefixDirectionalScore P θ v p n k hk) ν := by exact (measurable_liftedPrefixDirectionalScore P θ v p n k hk) |>.aestronglyMeasurable have hma : MemLp (actualSuccessorScoreInCoordinates P θ v p n k hk) 2 ν := (memLp_two_iff_integrable_sq hmaMeas).2 ha have hml : MemLp (liftedPrefixDirectionalScore P θ v p n k hk) 2 ν := (memLp_two_iff_integrable_sq hmlMeas).2 hl have hsub := hma.sub hml have hae := actualSuccessorScoreIncrement_ae_eq_channelDirectionalScore P θ v p hp hθ n k hk exact (((memLp_congr_ae hae).mp hsub).integrable_sq)
CausalSmith.Stat.LdpAteEfficiencySurface.channelDirectionalScore_sq_integrable_successorLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:198
theorem integral_channelDirectionalScore_sq_successorLaw

the integral channel directional score sq successor law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integral channel Directional Score sq successor Law.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma integral_channelDirectionalScore_sq_successorLaw {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : ∫ z, channelDirectionalScore θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) v z ^ 2 ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) = informationQuadratic (channelFisherInfo θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))) v := by let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let Q := sequentialJointChannel P n (canonicalNextIndex hk) μ let ν := dominatingMeasure Q let ρ := outputLaw θ p Q letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) letI : IsMarkovKernel Q := sequentialJointChannel_isMarkov P n (canonicalNextIndex hk) μ letI : IsFiniteMeasure ν := ⟨by simp [ν, dominatingMeasure]⟩ letI : IsFiniteMeasure ρ := by constructor dsimp [ρ, outputLaw] simp only [Measure.coe_finsetSum, Finset.sum_apply, Measure.smul_apply, smul_eq_mul, measure_univ, mul_one] exact ENNReal.sum_lt_top.mpr fun _ _ => ENNReal.ofReal_lt_top change (∫ z, channelDirectionalScore θ p Q v z ^ 2 ∂ρ) = _ rw [← Measure.withDensity_rnDeriv_eq ρ ν (outputLaw_ac_dominatingMeasure θ p Q)] rw [integral_withDensity_eq_integral_toReal_smul (Measure.measurable_rnDeriv ρ ν) (Measure.rnDeriv_lt_top ρ ν)] rw [show (∫ z, (ρ.rnDeriv ν z).toReal • channelDirectionalScore θ p Q v z ^ 2 ∂ν) = ∫ z, channelDirectionalScore θ p Q v z ^ 2 * channelOutputDensity θ p Q z ∂ν by apply integral_congr_ae filter_upwards [outputLawDensity_toReal_ae_eq_channelOutputDensity θ p Q hp hθ] with z hz rw [smul_eq_mul, hz] ring] exact @integral_sequentialJoint_channelDirectionalScore_sq Z _ ε P θ v p hp hθ n (canonicalNextIndex hk) μ _
CausalSmith.Stat.LdpAteEfficiencySurface.integral_channelDirectionalScore_sq_successorLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:234
theorem successor_channelFisher_le_upperEnvelope

the successor channel fisher le upper envelope assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the successor channel Fisher le upper Envelope.

Formal statement
Z :
ε :
ℝ
p t :
ℝ
hθ :
hε :
0 < ε
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma successor_channelFisher_le_upperEnvelope {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p t : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (n k : ℕ) (hk : k + 1 ≤ n) : ∫ z, channelDirectionalScore θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) (direction t) z ^ 2 ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) ≤ upperEnvelope θ p ε t := by rw [integral_channelDirectionalScore_sq_successorLaw P θ (direction t) p hp hθ n k hk] letI : IsProbabilityMeasure (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) exact sequentialJointChannel_fisher_le_upperEnvelope P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) θ p t hp hθ hε
CausalSmith.Stat.LdpAteEfficiencySurface.successor_channelFisher_le_upperEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:282
theorem sum_inputDirectionalDerivative_eq_zero

Under the supplied quantities and conditions, the sum input directional derivative eq zero assertion holds.

Formal statement
p :
ℝ
∑ a : Fin 4, inputDirectionalDerivative p v a = 0
Proof (Lean source)
lemma sum_inputDirectionalDerivative_eq_zero (p : ℝ) (v : TrialParameter) : ∑ a : Fin 4, inputDirectionalDerivative p v a = 0 := by unfold inputDirectionalDerivative inputDerivative simp [Fin.sum_univ_succ]
CausalSmith.Stat.LdpAteEfficiencySurface.sum_inputDirectionalDerivative_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:307
theorem setIntegral_channelDirectionalScore_fst_preimage_eq_zero

The current channel score has zero integral on every event determined by the predecessor history. This is the exact first-marginal centering input for the remaining cross-term argument. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the set Integral channel Directional Score fst preimage eq zero.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
B :
Set (History (Z n) k (le_of_succ_le hk))
hB :
= 0
Proof (Lean source)
lemma setIntegral_channelDirectionalScore_fst_preimage_eq_zero {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (B : Set (History (Z n) k (le_of_succ_le hk))) (hB : MeasurableSet B) : ∫ z in Prod.fst ⁻¹' B, channelDirectionalScore θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) v z ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) = 0 := by let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let i := canonicalNextIndex hk let Q := sequentialJointChannel P n i μ letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) letI : IsMarkovKernel Q := sequentialJointChannel_isMarkov P n i μ have hA : MeasurableSet (Prod.fst ⁻¹' B : Set (History (Z n) k (le_of_succ_le hk) × Z n i)) := hB.preimage measurable_fst rw [setIntegral_channelDirectionalScore_outputLaw θ v p Q hp hθ _ hA] rw [@setIntegral_sequentialJoint_channelDirectionalScore Z _ ε P θ v p hp hθ n i μ _ (Prod.fst ⁻¹' B)] unfold sequentialJointEventDerivative change (∑ a : Fin 4, inputDirectionalDerivative p v a * (Q a (Prod.fst ⁻¹' B)).toReal) = 0 have hrow (a : Fin 4) : (Q a (Prod.fst ⁻¹' B)).toReal = (μ B).toReal := by letI : IsMarkovKernel (P.channel n i) := (P.privacy n).1 i rw [show Prod.fst ⁻¹' B = B ×ˢ univ by ext z; simp] dsimp [Q, sequentialJointChannel, releasedHistoryRowKernel] rw [Kernel.compProd_apply_prod hB MeasurableSet.univ] simp_rw [Kernel.comap_apply', measure_univ] rw [Kernel.const_apply, setLIntegral_one] simp_rw [hrow] rw [← Finset.sum_mul] rw [sum_inputDirectionalDerivative_eq_zero] simp
CausalSmith.Stat.LdpAteEfficiencySurface.setIntegral_channelDirectionalScore_fst_preimage_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:313
theorem condExp_channelDirectionalScore_fst_eq_zero

The score increment is conditionally centered given the predecessor history. This formulation is the one needed to kill the Fisher cross term. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the cond Exp channel Directional Score fst eq zero.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma condExp_channelDirectionalScore_fst_eq_zero {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : condExp (comap fst inferInstance) (outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))) (channelDirectionalScore θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) v) =ᵐ[ outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))] 0 := by let i := canonicalNextIndex hk let H := History (Z n) i.val i.isLt.le let μ : Measure H := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let Q := sequentialJointChannel P n i μ let ρ := outputLaw θ p Q letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) letI : IsMarkovKernel Q := sequentialJointChannel_isMarkov P n (canonicalNextIndex hk) μ letI : IsFiniteMeasure ρ := by constructor dsimp [ρ, outputLaw] simp only [Measure.coe_finsetSum, Finset.sum_apply, Measure.smul_apply, smul_eq_mul, measure_univ, mul_one] exact ENNReal.sum_lt_top.mpr fun _ _ => ENNReal.ofReal_lt_top have hc2 := channelDirectionalScore_sq_integrable_successorLaw P θ v p hp hθ n k hk have hcMeas : Measurable (channelDirectionalScore θ p Q v) := by have hdens (j : Fin 4) : Measurable (channelDensity Q j) := (Measure.measurable_rnDeriv (Q j) (dominatingMeasure Q)).ennreal_toReal have hout : Measurable (channelOutputDensity θ p Q) := by unfold channelOutputDensity exact Finset.measurable_sum _ fun j _ => measurable_const.mul (hdens j) have hder : Measurable (channelDirectionalDerivativeDensity p Q v) := by unfold channelDirectionalDerivativeDensity channelDerivativeDensity exact Finset.measurable_sum _ fun j _ => measurable_const.mul (Finset.measurable_sum _ fun a _ => measurable_const.mul (hdens a)) unfold channelDirectionalScore exact (hder.div hout).ite (measurableSet_lt measurable_const hout) measurable_const have hcMem : MemLp (channelDirectionalScore θ p Q v) 2 ρ := (memLp_two_iff_integrable_sq hcMeas.aestronglyMeasurable).2 hc2 have hc : Integrable (channelDirectionalScore θ p Q v) ρ := hcMem.integrable (by norm_num) have hm : comap (@fst H (Z n i)) inferInstance ≤ (inferInstance : MeasurableSpace (H × Z n i)) := (measurable_fst (α := H) (β := Z n i)).comap_le have hz : (fun _ : H × Z n i => (0 : ℝ)) =ᵐ[ρ] condExp (comap (@fst H (Z n i)) inferInstance) ρ (channelDirectionalScore θ p Q v) := by refine ae_eq_condExp_of_forall_setIntegral_eq hm hc (fun s _ _ => ?_) ?_ ?_ · exact integrableOn_zero · intro s hs _ obtain ⟨B, hB, rfl⟩ := hs simpa [Q, ρ] using (setIntegral_channelDirectionalScore_fst_preimage_eq_zero P θ v p hp hθ n k hk B hB).symm · exact aestronglyMeasurable_zero exact hz.symm
CausalSmith.Stat.LdpAteEfficiencySurface.condExp_channelDirectionalScore_fst_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:355
theorem integral_liftedPrefix_mul_channelDirectionalScore_eq_zero

The lifted predecessor score is orthogonal to the current channel-score increment under the actual successor law. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integral lifted Prefix mul channel Directional Score eq zero.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma integral_liftedPrefix_mul_channelDirectionalScore_eq_zero {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : ∫ z, liftedPrefixDirectionalScore P θ v p n k hk z * channelDirectionalScore θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) v z ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) = 0 := by let i := canonicalNextIndex hk let H := History (Z n) i.val i.isLt.le let μ : Measure H := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let Q := sequentialJointChannel P n i μ let ρ := outputLaw θ p Q let past : H × Z n i → ℝ := liftedPrefixDirectionalScore P θ v p n k hk let current : H × Z n i → ℝ := channelDirectionalScore θ p Q v letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) letI : IsMarkovKernel Q := sequentialJointChannel_isMarkov P n i μ letI : IsFiniteMeasure ρ := by constructor dsimp [ρ, outputLaw] simp only [Measure.coe_finsetSum, Finset.sum_apply, Measure.smul_apply, smul_eq_mul, measure_univ, mul_one] exact ENNReal.sum_lt_top.mpr fun _ _ => ENNReal.ofReal_lt_top have hm : comap (@fst H (Z n i)) inferInstance ≤ (inferInstance : MeasurableSpace (H × Z n i)) := (measurable_fst (α := H) (β := Z n i)).comap_le have hpastMeas : @Measurable (H × Z n i) ℝ (comap (@fst H (Z n i)) inferInstance) (borel ℝ) past := by dsimp [past, liftedPrefixDirectionalScore] exact (measurable_transcriptPrefixMixtureRealDerivative P θ v p n k (le_of_succ_le hk)).div (measurable_transcriptPrefixMixtureRealDensity P θ p n k (le_of_succ_le hk)) |>.comp (Measurable.of_comap_le le_rfl) have hpastSq := liftedPrefixDirectionalScore_sq_integrable_successorLaw P θ v p hp hθ n k hk have hcurrentSq := channelDirectionalScore_sq_integrable_successorLaw P θ v p hp hθ n k hk have hpastMem : MemLp past 2 ρ := (memLp_two_iff_integrable_sq (measurable_liftedPrefixDirectionalScore P θ v p n k hk).aestronglyMeasurable).2 hpastSq have hcurrentMeas : Measurable current := by dsimp [current] have hdens (j : Fin 4) : Measurable (channelDensity Q j) := (Measure.measurable_rnDeriv (Q j) (dominatingMeasure Q)).ennreal_toReal have hout : Measurable (channelOutputDensity θ p Q) := by unfold channelOutputDensity exact Finset.measurable_sum _ fun j _ => measurable_const.mul (hdens j) have hder : Measurable (channelDirectionalDerivativeDensity p Q v) := by unfold channelDirectionalDerivativeDensity channelDerivativeDensity exact Finset.measurable_sum _ fun j _ => measurable_const.mul (Finset.measurable_sum _ fun a _ => measurable_const.mul (hdens a)) unfold channelDirectionalScore exact (hder.div hout).ite (measurableSet_lt measurable_const hout) measurable_const have hcurrentMem : MemLp current 2 ρ := (memLp_two_iff_integrable_sq hcurrentMeas.aestronglyMeasurable).2 hcurrentSq have hprod : Integrable (past * current) ρ := hpastMem.integrable_mul hcurrentMem have hcurrentInt : Integrable current ρ := hcurrentMem.integrable (by norm_num) have hpull := condExp_mul_of_aestronglyMeasurable_left hpastMeas.aestronglyMeasurable hprod hcurrentInt have hcenter := condExp_channelDirectionalScore_fst_eq_zero P θ v p hp hθ n k hk change ∫ z, past z * current z ∂ρ = 0 calc ∫ z, past z * current z ∂ρ = ∫ z, condExp (comap (@fst H (Z n i)) inferInstance) ρ (past * current) z ∂ρ := (integral_condExp hm).symm _ = ∫ z, past z * condExp (comap (@fst H (Z n i)) inferInstance) ρ current z ∂ρ := integral_congr_ae hpull _ = 0 := by apply integral_eq_zero_of_ae filter_upwards [hcenter] with z hz have hz' : condExp (comap (@fst H (Z n i)) inferInstance) ρ current z = 0 := by simpa [current, ρ, Q, μ, i] using hz simp [hz']
CausalSmith.Stat.LdpAteEfficiencySurface.integral_liftedPrefix_mul_channelDirectionalScore_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherInformation.lean:419
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialFisherRecursion 13 declarations Finite sequential Fisher recursion

Finite sequential Fisher recursion

theorem integral_liftedPrefixScore_sq_eq_prefixScore_sq

the integral lifted prefix score sq eq prefix score sq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integral lifted Prefix Score sq eq prefix Score sq.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
∫ z, liftedPrefixDirectionalScore P θ v p n k hk z ^ 2 ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))
= ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h ^ 2 ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk)
Proof (Lean source)
lemma integral_liftedPrefixScore_sq_eq_prefixScore_sq {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : ∫ z, liftedPrefixDirectionalScore P θ v p n k hk z ^ 2 ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) = ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h ^ 2 ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk) := by let i := canonicalNextIndex hk let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let K : Kernel (History (Z n) k (le_of_succ_le hk)) (Z n i) := (observedStageKernel P θ p n i).comap (fun h => ((), h)) (measurable_const.prodMk measurable_id) letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) letI : IsMarkovKernel (observedStageKernel P θ p n i) := observedStageKernel_isMarkov P θ p hp hθ n i letI : IsMarkovKernel K := by dsimp [K] infer_instance have hout : outputLaw θ p (sequentialJointChannel P n i μ) = μ ⊗ₘ K := by simpa [K] using outputLaw_sequentialJointChannel P θ p hp hθ n i μ have hint := liftedPrefixDirectionalScore_sq_integrable_successorLaw P θ v p hp hθ n k hk have hint' : Integrable (fun z => liftedPrefixDirectionalScore P θ v p n k hk z ^ 2) (μ ⊗ₘ K) := by rw [← hout] simpa [i, μ] using hint rw [hout, Measure.integral_compProd hint'] simp [liftedPrefixDirectionalScore, μ]
CausalSmith.Stat.LdpAteEfficiencySurface.integral_liftedPrefixScore_sq_eq_prefixScore_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:14
theorem integral_actualSuccessorScore_sq_eq_prefixSuccessorScore_sq

the integral actual successor score sq eq prefix successor score sq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integral actual Successor Score sq eq prefix Successor Score sq.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
∫ z, actualSuccessorScoreInCoordinates P θ v p n k hk z ^ 2 ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))
= ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n (k + 1) hk h ^ 2 ∂transcriptPrefixLaw P θ p n (k + 1) hk
Proof (Lean source)
lemma integral_actualSuccessorScore_sq_eq_prefixSuccessorScore_sq {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : ∫ z, actualSuccessorScoreInCoordinates P θ v p n k hk z ^ 2 ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) = ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n (k + 1) hk h ^ 2 ∂transcriptPrefixLaw P θ p n (k + 1) hk := by rw [← transcriptSuccessorLaw_map_canonicalInitLast P θ p hp hθ n k hk] have hm : Measurable (fun z => actualSuccessorScoreInCoordinates P θ v p n k hk z ^ 2) := (measurable_actualSuccessorScoreInCoordinates P θ v p n k hk).pow_const 2 rw [integral_map (measurable_canonicalInitLast hk).aemeasurable hm.aestronglyMeasurable] simp [Function.comp_def, actualSuccessorScoreInCoordinates]
CausalSmith.Stat.LdpAteEfficiencySurface.integral_actualSuccessorScore_sq_eq_prefixSuccessorScore_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:51
theorem measurable_channelDirectionalScore_recursion

the measurable channel directional score recursion assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Y :
p :
ℝ
Q :
Kernel (Fin 4) Y
Proof (Lean source)
lemma measurable_channelDirectionalScore_recursion {Y : Type*} [MeasurableSpace Y] (θ v : TrialParameter) (p : ℝ) (Q : Kernel (Fin 4) Y) : Measurable (channelDirectionalScore θ p Q v) := by have hdens (j : Fin 4) : Measurable (channelDensity Q j) := (Measure.measurable_rnDeriv (Q j) (dominatingMeasure Q)).ennreal_toReal have hout : Measurable (channelOutputDensity θ p Q) := by unfold channelOutputDensity exact Finset.measurable_sum _ fun j _ => measurable_const.mul (hdens j) have hder : Measurable (channelDirectionalDerivativeDensity p Q v) := by unfold channelDirectionalDerivativeDensity channelDerivativeDensity exact Finset.measurable_sum _ fun j _ => measurable_const.mul (Finset.measurable_sum _ fun a _ => measurable_const.mul (hdens a)) unfold channelDirectionalScore exact (hder.div hout).ite (measurableSet_lt measurable_const hout) measurable_const
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_channelDirectionalScore_recursion · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:72
theorem prefixScoreEnergy_succ

the prefix score energy succ assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the prefix Score Energy succ.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
(∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n (k + 1) hk h ^ 2 ∂transcriptPrefixLaw P θ p n (k + 1) hk)
= (∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h ^ 2 ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk))
Proof (Lean source)
lemma prefixScoreEnergy_succ {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : (∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n (k + 1) hk h ^ 2 ∂transcriptPrefixLaw P θ p n (k + 1) hk) = (∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h ^ 2 ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) + ∫ z, channelDirectionalScore θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) v z ^ 2 ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) := by rw [← integral_actualSuccessorScore_sq_eq_prefixSuccessorScore_sq P θ v p hp hθ n k hk] rw [← integral_liftedPrefixScore_sq_eq_prefixScore_sq P θ v p hp hθ n k hk] let i := canonicalNextIndex hk let H := History (Z n) i.val i.isLt.le let ρ : Measure (H × Z n i) := outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) let A : H × Z n i → ℝ := actualSuccessorScoreInCoordinates P θ v p n k hk let L : H × Z n i → ℝ := liftedPrefixDirectionalScore P θ v p n k hk let C : H × Z n i → ℝ := channelDirectionalScore θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) v have hL2 := liftedPrefixDirectionalScore_sq_integrable_successorLaw P θ v p hp hθ n k hk have hC2 := channelDirectionalScore_sq_integrable_successorLaw P θ v p hp hθ n k hk have hLMem : MemLp L 2 ρ := (memLp_two_iff_integrable_sq (measurable_liftedPrefixDirectionalScore P θ v p n k hk).aestronglyMeasurable).2 hL2 have hCMem : MemLp C 2 ρ := (memLp_two_iff_integrable_sq (measurable_channelDirectionalScore_recursion θ v p _).aestronglyMeasurable).2 hC2 have hLC : Integrable (L * C) ρ := hLMem.integrable_mul hCMem have hae := actualSuccessorScoreInCoordinates_ae_eq_candidate P θ v p hp hθ n k hk have hcross := integral_liftedPrefix_mul_channelDirectionalScore_eq_zero P θ v p hp hθ n k hk change (∫ z, A z ^ 2 ∂ρ) = (∫ z, L z ^ 2 ∂ρ) + ∫ z, C z ^ 2 ∂ρ calc ∫ z, A z ^ 2 ∂ρ = ∫ z, (L z + C z) ^ 2 ∂ρ := by apply integral_congr_ae filter_upwards [hae] with z hz simpa [A, L, C, successorDirectionalScoreCandidate] using congrArg (fun x => x ^ 2) hz _ = ∫ z, (L z ^ 2 + 2 * (L z * C z)) + C z ^ 2 ∂ρ := by congr 1 funext z ring _ = (∫ z, L z ^ 2 + 2 * (L z * C z) ∂ρ) + ∫ z, C z ^ 2 ∂ρ := integral_add (hLMem.integrable_sq.add (hLC.const_mul 2)) hCMem.integrable_sq _ = ((∫ z, L z ^ 2 ∂ρ) + ∫ z, 2 * (L z * C z) ∂ρ) + ∫ z, C z ^ 2 ∂ρ := by congr 1 exact integral_add hLMem.integrable_sq (hLC.const_mul 2) _ = ((∫ z, L z ^ 2 ∂ρ) + 2 * ∫ z, L z * C z ∂ρ) + ∫ z, C z ^ 2 ∂ρ := by rw [integral_const_mul] _ = (∫ z, L z ^ 2 ∂ρ) + ∫ z, C z ^ 2 ∂ρ := by rw [show (∫ z, L z * C z ∂ρ) = 0 by simpa [L, C, ρ] using hcross] ring
CausalSmith.Stat.LdpAteEfficiencySurface.prefixScoreEnergy_succ · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:89
theorem integral_transcriptPrefixMixtureRealDerivative_eq_zero

the integral transcript prefix mixture real derivative eq zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
∫ h, transcriptPrefixMixtureRealDerivative P θ v p n k hk h ∂transcriptPrefixReferenceMeasure P n k hk
= 0
Proof (Lean source)
lemma integral_transcriptPrefixMixtureRealDerivative_eq_zero {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) : ∫ h, transcriptPrefixMixtureRealDerivative P θ v p n k hk h ∂transcriptPrefixReferenceMeasure P n k hk = 0 := by let ν := transcriptPrefixReferenceMeasure P n k hk let μ (x : Fin n → Fin 4) := (P.transcript n x).map (transcriptPrefix hk) letI (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 letI (x : Fin n → Fin 4) : IsProbabilityMeasure (μ x) := Measure.isProbabilityMeasure_map (measurable_transcriptPrefix hk).aemeasurable letI : IsFiniteMeasure ν := by dsimp [ν, transcriptPrefixReferenceMeasure] infer_instance have hac (x : Fin n → Fin 4) : μ x ≪ ν := by dsimp [μ, ν] exact (transcriptComponent_ac_reference P n x).map (measurable_transcriptPrefix hk) have hint (x : Fin n → Fin 4) : Integrable (transcriptPrefixComponentRealDensity P n k hk x) ν := by have h := (integrable_toReal_rnDeriv_mul_iff (hac x) (f := fun _ => (1 : ℝ))).2 (integrable_const (1 : ℝ)) change Integrable (fun z => ((μ x).rnDeriv ν z).toReal) ν simpa only [mul_one] using h unfold transcriptPrefixMixtureRealDerivative rw [integral_finset_sum _ (fun x _ => (hint x).const_mul _)] calc ∑ x : Fin n → Fin 4, ∫ h, inputPathDirectionalDerivative θ v p x * transcriptPrefixComponentRealDensity P n k hk x h ∂ν = ∑ x : Fin n → Fin 4, inputPathDirectionalDerivative θ v p x := by apply Finset.sum_congr rfl intro x _ rw [integral_const_mul] rw [show (∫ h, transcriptPrefixComponentRealDensity P n k hk x h ∂ν) = 1 by unfold transcriptPrefixComponentRealDensity rw [Measure.integral_toReal_rnDeriv (hac x)] simp [measureReal_def, μ]] ring _ = 0 := sum_inputPathDirectionalDerivative_eq_zero θ v p
CausalSmith.Stat.LdpAteEfficiencySurface.integral_transcriptPrefixMixtureRealDerivative_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:162
theorem prefixScoreEnergy_zero

the prefix score energy zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the prefix Score Energy zero.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n :
ℕ
h0 :
0 ≤ n
∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n 0 h0 h ^ 2 ∂transcriptPrefixLaw P θ p n 0 h0
= 0
Proof (Lean source)
lemma prefixScoreEnergy_zero {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n : ℕ) (h0 : 0 ≤ n) : ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n 0 h0 h ^ 2 ∂transcriptPrefixLaw P θ p n 0 h0 = 0 := by let μ := transcriptPrefixLaw P θ p n 0 h0 let emptyHistory : History (Z n) 0 h0 := fun j => j.elim0 let score := conditionalTranscriptPrefixDirectionalScore P θ v p n 0 h0 letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n 0 h0 have hscoreInt : ∫ h, score h ∂μ = 0 := by have hset := setIntegral_conditionalTranscriptPrefixDirectionalScore P θ v p hp hθ n 0 h0 univ MeasurableSet.univ simpa [score, μ, integral_transcriptPrefixMixtureRealDerivative_eq_zero P θ v p n 0 h0] using hset have hconst : score = fun _ => score emptyHistory := by funext h congr 1 funext j exact j.elim0 rw [hconst] at hscoreInt have hvalue : score emptyHistory = 0 := by simpa [μ] using hscoreInt change ∫ h, score h ^ 2 ∂μ = 0 rw [hconst] simp [hvalue]
CausalSmith.Stat.LdpAteEfficiencySurface.prefixScoreEnergy_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:205
theorem prefixScoreEnergy_le_mul_upperEnvelope

the prefix score energy le mul upper envelope assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the prefix Score Energy le mul upper Envelope.

Formal statement
Z :
ε :
ℝ
p t :
ℝ
hθ :
hε :
0 < ε
n k :
ℕ
hk :
k ≤ n
(∫ h, conditionalTranscriptPrefixDirectionalScore P θ (direction t) p n k hk h ^ 2 ∂transcriptPrefixLaw P θ p n k hk)
≤ (k : ℝ) * upperEnvelope θ p ε t
Proof (Lean source)
lemma prefixScoreEnergy_le_mul_upperEnvelope {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p t : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (n k : ℕ) (hk : k ≤ n) : (∫ h, conditionalTranscriptPrefixDirectionalScore P θ (direction t) p n k hk h ^ 2 ∂transcriptPrefixLaw P θ p n k hk) ≤ (k : ℝ) * upperEnvelope θ p ε t := by induction k with | zero => rw [prefixScoreEnergy_zero P θ (direction t) p hp hθ n hk] simp | succ k ih => have hprev : k ≤ n := le_of_succ_le hk rw [prefixScoreEnergy_succ P θ (direction t) p hp hθ n k hk] calc (∫ h, conditionalTranscriptPrefixDirectionalScore P θ (direction t) p n k hprev h ^ 2 ∂transcriptPrefixLaw P θ p n k hprev) + ∫ z, channelDirectionalScore θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k hprev)) (direction t) z ^ 2 ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k hprev)) ≤ (k : ℝ) * upperEnvelope θ p ε t + upperEnvelope θ p ε t := add_le_add (ih hprev) (successor_channelFisher_le_upperEnvelope P θ p t hp hθ hε n k hk) _ = ((k + 1 : ℕ) : ℝ) * upperEnvelope θ p ε t := by push_cast ring
CausalSmith.Stat.LdpAteEfficiencySurface.prefixScoreEnergy_le_mul_upperEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:238
theorem terminalPrefixScoreEnergy_eq_transcriptScoreEnergy

the terminal prefix score energy eq transcript score energy assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
(∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n n (le_refl n) h ^ 2 ∂transcriptPrefixLaw P θ p n n (le_refl n))
= ∫ z, conditionalTranscriptDirectionalScore P θ v p n z ^ 2 ∂transcriptLaw P θ p n
Proof (Lean source)
lemma terminalPrefixScoreEnergy_eq_transcriptScoreEnergy {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) : (∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n n (le_refl n) h ^ 2 ∂transcriptPrefixLaw P θ p n n (le_refl n)) = ∫ z, conditionalTranscriptDirectionalScore P θ v p n z ^ 2 ∂transcriptLaw P θ p n := by have hmap (μ : Measure (Transcript (Z n))) : μ.map (transcriptPrefix (Z := Z n) (le_refl n)) = μ := by have hf : transcriptPrefix (Z := Z n) (le_refl n) = (fun z : Transcript (Z n) => z) := by funext z funext j rfl rw [hf] exact Measure.map_id' unfold conditionalTranscriptPrefixDirectionalScore transcriptPrefixMixtureRealDerivative transcriptPrefixMixtureRealDensity transcriptPrefixComponentRealDensity transcriptPrefixLaw transcriptPrefixReferenceMeasure simp_rw [hmap] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.terminalPrefixScoreEnergy_eq_transcriptScoreEnergy · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:272
theorem transcriptDirectionalFisher_le_mul_upperEnvelope

the transcript directional fisher le mul upper envelope assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Directional Fisher le mul upper Envelope.

Formal statement
Z :
ε :
ℝ
p t :
ℝ
hθ :
hε :
0 < ε
n :
ℕ
(∫ z, conditionalTranscriptDirectionalScore P θ (direction t) p n z ^ 2 ∂transcriptLaw P θ p n)
≤ (n : ℝ) * upperEnvelope θ p ε t
Proof (Lean source)
lemma transcriptDirectionalFisher_le_mul_upperEnvelope {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p t : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (n : ℕ) : (∫ z, conditionalTranscriptDirectionalScore P θ (direction t) p n z ^ 2 ∂transcriptLaw P θ p n) ≤ (n : ℝ) * upperEnvelope θ p ε t := by rw [← terminalPrefixScoreEnergy_eq_transcriptScoreEnergy P θ (direction t) p n] exact prefixScoreEnergy_le_mul_upperEnvelope P θ p t hp hθ hε n n (le_refl n)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptDirectionalFisher_le_mul_upperEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:296
theorem inputDirectionalDerivative_scaledDirection

Under the supplied quantities and conditions, the input directional derivative scaled direction assertion holds.

Formal statement
p c :
ℝ
j :
Fin 4
Proof (Lean source)
lemma inputDirectionalDerivative_scaledDirection (p c : ℝ) (v : TrialParameter) (j : Fin 4) : inputDirectionalDerivative p (scaledDirection c v) j = c * inputDirectionalDerivative p v j := by unfold inputDirectionalDerivative scaledDirection rw [Finset.mul_sum] apply Finset.sum_congr rfl intro k _ ring
CausalSmith.Stat.LdpAteEfficiencySurface.inputDirectionalDerivative_scaledDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:313
theorem inputPathDirectionalDerivative_scaledDirection

the input path directional derivative scaled direction assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
p c :
ℝ
x :
Fin n → Fin 4
Proof (Lean source)
lemma inputPathDirectionalDerivative_scaledDirection {n : ℕ} (θ v : TrialParameter) (p c : ℝ) (x : Fin n → Fin 4) : inputPathDirectionalDerivative θ (scaledDirection c v) p x = c * inputPathDirectionalDerivative θ v p x := by unfold inputPathDirectionalDerivative rw [Finset.mul_sum] apply Finset.sum_congr rfl intro i _ rw [inputDirectionalDerivative_scaledDirection] ring
CausalSmith.Stat.LdpAteEfficiencySurface.inputPathDirectionalDerivative_scaledDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:324
theorem conditionalTranscriptDirectionalScore_scaledDirection

the conditional transcript directional score scaled direction assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p c :
ℝ
n :
ℕ
Proof (Lean source)
lemma conditionalTranscriptDirectionalScore_scaledDirection {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p c : ℝ) (n : ℕ) : conditionalTranscriptDirectionalScore P θ (scaledDirection c v) p n = fun z => c * conditionalTranscriptDirectionalScore P θ v p n z := by funext z unfold conditionalTranscriptDirectionalScore transcriptMixtureRealDerivative simp_rw [inputPathDirectionalDerivative_scaledDirection] simp_rw [mul_assoc] rw [← Finset.mul_sum] ring
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptDirectionalScore_scaledDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:336
theorem transcriptScaledDirectionalFisher_le

the transcript scaled directional fisher le assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Scaled Directional Fisher le.

Formal statement
Z :
ε :
ℝ
p t c :
ℝ
hθ :
hε :
0 < ε
n :
ℕ
(∫ z, conditionalTranscriptDirectionalScore P θ (scaledDirection c (direction t)) p n z ^ 2 ∂transcriptLaw P θ p n)
≤ c ^ 2 * ((n : ℝ) * upperEnvelope θ p ε t)
Proof (Lean source)
lemma transcriptScaledDirectionalFisher_le {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p t c : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (n : ℕ) : (∫ z, conditionalTranscriptDirectionalScore P θ (scaledDirection c (direction t)) p n z ^ 2 ∂transcriptLaw P θ p n) ≤ c ^ 2 * ((n : ℝ) * upperEnvelope θ p ε t) := by rw [conditionalTranscriptDirectionalScore_scaledDirection] rw [show (∫ z, (c * conditionalTranscriptDirectionalScore P θ (direction t) p n z) ^ 2 ∂transcriptLaw P θ p n) = c ^ 2 * ∫ z, conditionalTranscriptDirectionalScore P θ (direction t) p n z ^ 2 ∂transcriptLaw P θ p n by rw [← integral_const_mul] apply integral_congr_ae filter_upwards with z ring] exact mul_le_mul_of_nonneg_left (transcriptDirectionalFisher_le_mul_upperEnvelope P θ p t hp hθ hε n) (sq_nonneg c)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptScaledDirectionalFisher_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialFisherRecursion.lean:349
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialGlobalScore 17 declarations Global finite-mixture transcript scores

Global finite-mixture transcript scores

def inputPathScoreBound

A finite bound for the complete-data path scores. For the displayed inputs and conditions, the stated result follows. The input Path Score Bound is determined by the displayed parameters.

Definition (Lean source)
n :
ℕ
p :
ℝ
inputPathScoreBound θ v p :
ℝ
∑ x : Fin n → Fin 4, |inputPathDirectionalScore θ v p x|
CausalSmith.Stat.LdpAteEfficiencySurface.inputPathScoreBound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:18
theorem inputPathScoreBound_nonneg

Under the supplied quantities and conditions, the input path score bound nonneg assertion holds.

Formal statement
n :
ℕ
p :
ℝ
0 ≤ inputPathScoreBound (n := n) θ v p
Proof (Lean source)
lemma inputPathScoreBound_nonneg {n : ℕ} (θ v : TrialParameter) (p : ℝ) : 0 ≤ inputPathScoreBound (n := n) θ v p := by exact Finset.sum_nonneg fun _ _ => abs_nonneg _
CausalSmith.Stat.LdpAteEfficiencySurface.inputPathScoreBound_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:22
theorem abs_inputPathDirectionalScore_le_bound

the abs input path directional score le bound assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
p :
ℝ
x :
Fin n → Fin 4
|inputPathDirectionalScore θ v p x| ≤ inputPathScoreBound (n := n) θ v p
Proof (Lean source)
lemma abs_inputPathDirectionalScore_le_bound {n : ℕ} (θ v : TrialParameter) (p : ℝ) (x : Fin n → Fin 4) : |inputPathDirectionalScore θ v p x| ≤ inputPathScoreBound (n := n) θ v p := by unfold inputPathScoreBound exact Finset.single_le_sum (fun y _ => abs_nonneg (inputPathDirectionalScore θ v p y)) (Finset.mem_univ x)
CausalSmith.Stat.LdpAteEfficiencySurface.abs_inputPathDirectionalScore_le_bound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:27
theorem measurable_transcriptComponentRealDensity

the measurable transcript component real density assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
n :
ℕ
x :
Fin n → Fin 4
Proof (Lean source)
lemma measurable_transcriptComponentRealDensity {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n : ℕ) (x : Fin n → Fin 4) : Measurable (transcriptComponentRealDensity P n x) := by exact (Measure.measurable_rnDeriv _ _).ennreal_toReal
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_transcriptComponentRealDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:36
theorem measurable_transcriptMixtureRealDensity

the measurable transcript mixture real density assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
Proof (Lean source)
lemma measurable_transcriptMixtureRealDensity {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) : Measurable (transcriptMixtureRealDensity P θ p n) := by unfold transcriptMixtureRealDensity exact Finset.measurable_fun_sum _ fun x _ => measurable_const.mul (measurable_transcriptComponentRealDensity P n x)
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_transcriptMixtureRealDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:43
theorem measurable_transcriptMixtureRealDerivative

the measurable transcript mixture real derivative assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
Proof (Lean source)
lemma measurable_transcriptMixtureRealDerivative {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) : Measurable (transcriptMixtureRealDerivative P θ v p n) := by unfold transcriptMixtureRealDerivative exact Finset.measurable_fun_sum _ fun x _ => measurable_const.mul (measurable_transcriptComponentRealDensity P n x)
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_transcriptMixtureRealDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:52
theorem measurable_conditionalTranscriptDirectionalScore

the measurable conditional transcript directional score assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_conditionalTranscriptDirectionalScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:61
theorem transcriptMixtureRealDensity_nonneg

the transcript mixture real density nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Mixture Real Density nonneg.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
z :
Transcript (Z n)
Proof (Lean source)
lemma transcriptMixtureRealDensity_nonneg {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (z : Transcript (Z n)) : 0 ≤ transcriptMixtureRealDensity P θ p n z := by unfold transcriptMixtureRealDensity exact Finset.sum_nonneg fun x _ => mul_nonneg (inputPathProbability_pos_of_interior θ p hp hθ x).le ENNReal.toReal_nonneg
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptMixtureRealDensity_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:69
theorem abs_conditionalTranscriptDirectionalScore_le

The observed transcript score is a finite weighted average of the complete-data path scores and is therefore uniformly bounded. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the abs conditional Transcript Directional Score le.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
z :
Transcript (Z n)
Proof (Lean source)
lemma abs_conditionalTranscriptDirectionalScore_le {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (z : Transcript (Z n)) : |conditionalTranscriptDirectionalScore P θ v p n z| ≤ inputPathScoreBound (n := n) θ v p := by let B := inputPathScoreBound (n := n) θ v p let d := transcriptMixtureRealDensity P θ p n z have hB : 0 ≤ B := inputPathScoreBound_nonneg θ v p have hd : 0 ≤ d := transcriptMixtureRealDensity_nonneg P θ p n hp hθ z have hx (x : Fin n → Fin 4) : inputPathProbability θ p x ≠ 0 := ne_of_gt (inputPathProbability_pos_of_interior θ p hp hθ x) have hn : |transcriptMixtureRealDerivative P θ v p n z| ≤ B * d := by rw [transcriptDerivative_eq_completeDataScoreMixture P θ v p n z hx] calc |∑ x : Fin n → Fin 4, inputPathProbability θ p x * inputPathDirectionalScore θ v p x * transcriptComponentRealDensity P n x z| ≤ ∑ x : Fin n → Fin 4, |inputPathProbability θ p x * inputPathDirectionalScore θ v p x * transcriptComponentRealDensity P n x z| := Finset.abs_sum_le_sum_abs _ _ _ = ∑ x : Fin n → Fin 4, (inputPathProbability θ p x * transcriptComponentRealDensity P n x z) * |inputPathDirectionalScore θ v p x| := by apply Finset.sum_congr rfl intro x _ rw [abs_mul, abs_mul, abs_of_pos (inputPathProbability_pos_of_interior θ p hp hθ x), abs_of_nonneg (show 0 ≤ transcriptComponentRealDensity P n x z by exact ENNReal.toReal_nonneg)] ring _ ≤ ∑ x : Fin n → Fin 4, (inputPathProbability θ p x * transcriptComponentRealDensity P n x z) * B := by apply Finset.sum_le_sum intro x _ exact mul_le_mul_of_nonneg_left (abs_inputPathDirectionalScore_le_bound θ v p x) (mul_nonneg (inputPathProbability_pos_of_interior θ p hp hθ x).le ENNReal.toReal_nonneg) _ = B * d := by simp only [d, transcriptMixtureRealDensity] rw [Finset.mul_sum] apply Finset.sum_congr rfl intro x _ ring by_cases hdz : d = 0 · have hn0 : transcriptMixtureRealDerivative P θ v p n z = 0 := by rw [hdz, mul_zero] at hn exact abs_eq_zero.mp (le_antisymm hn (abs_nonneg _)) rw [conditionalTranscriptDirectionalScore, hn0, show transcriptMixtureRealDensity P θ p n z = 0 by exact hdz] simp only [zero_div, abs_zero] exact hB · have hdpos : 0 < d := lt_of_le_of_ne hd (Ne.symm hdz) rw [conditionalTranscriptDirectionalScore, abs_div, abs_of_nonneg (show 0 ≤ transcriptMixtureRealDensity P θ p n z by exact hd)] exact (div_le_iff₀ hdpos).2 (by simpa [d] using hn)
CausalSmith.Stat.LdpAteEfficiencySurface.abs_conditionalTranscriptDirectionalScore_le · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:82
theorem conditionalTranscriptDirectionalScore_memLp_two

the conditional transcript directional score mem lp two assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the conditional Transcript Directional Score mem Lp two.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
MemLp (conditionalTranscriptDirectionalScore P θ v p n) 2 (transcriptLaw P θ p n)
Proof (Lean source)
lemma conditionalTranscriptDirectionalScore_memLp_two {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : MemLp (conditionalTranscriptDirectionalScore P θ v p n) 2 (transcriptLaw P θ p n) := by apply MemLp.of_bound (measurable_conditionalTranscriptDirectionalScore P θ v p n).aestronglyMeasurable (inputPathScoreBound (n := n) θ v p) filter_upwards [] with z simpa [Real.norm_eq_abs] using abs_conditionalTranscriptDirectionalScore_le P θ v p n hp hθ z
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptDirectionalScore_memLp_two · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:147
theorem transcriptReference_ac_transcriptLaw_of_interior

the transcript reference ac transcript law of interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Reference ac transcript Law of interior.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
transcriptReferenceMeasure P n ≪ transcriptLaw P θ p n
Proof (Lean source)
lemma transcriptReference_ac_transcriptLaw_of_interior {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : transcriptReferenceMeasure P n ≪ transcriptLaw P θ p n := by classical apply Measure.AbsolutelyContinuous.mk intro A hA hlaw have hsum : ∑ x : Fin n → Fin 4, ofReal (inputPathProbability θ p x) * P.transcript n x A = 0 := by simpa [transcriptLaw, Measure.finsetSum_apply, Measure.smul_apply, smul_eq_mul] using hlaw have hcomponent (x : Fin n → Fin 4) : P.transcript n x A = 0 := by have hx := (Finset.sum_eq_zero_iff.mp hsum x (Finset.mem_univ x)) exact (mul_eq_zero.mp hx).resolve_left (ne_of_gt (ENNReal.ofReal_pos.mpr (inputPathProbability_pos_of_interior θ p hp hθ x))) simp [transcriptReferenceMeasure, Measure.finsetSum_apply, hcomponent]
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptReference_ac_transcriptLaw_of_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:163
theorem transcriptMixtureRealDensity_pos_ae

the transcript mixture real density pos ae assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Mixture Real Density pos ae.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
∀ᵐ z ∂transcriptReferenceMeasure P n, 0 < transcriptMixtureRealDensity P θ p n z
Proof (Lean source)
lemma transcriptMixtureRealDensity_pos_ae {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : ∀ᵐ z ∂transcriptReferenceMeasure P n, 0 < transcriptMixtureRealDensity P θ p n z := by have hac := transcriptLaw_ac_reference P θ p n have hrev := transcriptReference_ac_transcriptLaw_of_interior P θ p n hp hθ have hposENN : ∀ᵐ z ∂transcriptReferenceMeasure P n, 0 < transcriptDensity P θ p n z := hrev.ae_le (Measure.rnDeriv_pos hac) have hneTop : ∀ᵐ z ∂transcriptReferenceMeasure P n, transcriptDensity P θ p n z ≠ ∞ := Measure.rnDeriv_ne_top _ _ have hpos : ∀ᵐ z ∂transcriptReferenceMeasure P n, 0 < (transcriptDensity P θ p n z).toReal := by filter_upwards [hposENN, hneTop] with z hz htop exact ENNReal.toReal_pos hz.ne' htop filter_upwards [hpos, transcriptDensity_toReal_ae_eq_mixture_of_interior P θ p n hp hθ] with z hz heq simpa [heq] using hz
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptMixtureRealDensity_pos_ae · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:185
theorem sum_inputPathDirectionalDerivative_eq_zero

the sum input path directional derivative eq zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
p :
ℝ
∑ x : Fin n → Fin 4, inputPathDirectionalDerivative θ v p x = 0
Proof (Lean source)
lemma sum_inputPathDirectionalDerivative_eq_zero {n : ℕ} (θ v : TrialParameter) (p : ℝ) : ∑ x : Fin n → Fin 4, inputPathDirectionalDerivative θ v p x = 0 := by have hzero : parameterPath θ v 0 = θ := by funext k simp [parameterPath] have hder : HasDerivAt (fun a => ∑ x : Fin n → Fin 4, inputPathProbability (parameterPath θ v a) p x) (∑ x : Fin n → Fin 4, inputPathDirectionalDerivative θ v p x) 0 := by simpa only [hzero] using HasDerivAt.fun_sum (u := (Finset.univ : Finset (Fin n → Fin 4))) (fun x _ => hasDerivAt_inputPathProbability_parameterPath θ v p 0 x) have heq : (fun a => ∑ x : Fin n → Fin 4, inputPathProbability (parameterPath θ v a) p x) = fun _ : ℝ => 1 := by funext a exact inputPathProbability_sum_eq_one _ p n rw [heq] at hder exact hder.unique (hasDerivAt_const (x := (0 : ℝ)) (c := (1 : ℝ)))
CausalSmith.Stat.LdpAteEfficiencySurface.sum_inputPathDirectionalDerivative_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:211
theorem integral_transcriptMixtureRealDerivative_eq_zero

the integral transcript mixture real derivative eq zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
∫ z, transcriptMixtureRealDerivative P θ v p n z ∂transcriptReferenceMeasure P n = 0
Proof (Lean source)
lemma integral_transcriptMixtureRealDerivative_eq_zero {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) : ∫ z, transcriptMixtureRealDerivative P θ v p n z ∂transcriptReferenceMeasure P n = 0 := by letI (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 have hint (x : Fin n → Fin 4) : Integrable (transcriptComponentRealDensity P n x) (transcriptReferenceMeasure P n) := by have h := (integrable_toReal_rnDeriv_mul_iff (transcriptComponent_ac_reference P n x) (f := fun _ => (1 : ℝ))).2 (integrable_const (1 : ℝ)) change Integrable (fun z => ((P.transcript n x).rnDeriv (transcriptReferenceMeasure P n) z).toReal) (transcriptReferenceMeasure P n) simpa only [mul_one] using h simp_rw [transcriptMixtureRealDerivative] rw [integral_finset_sum _ (fun x _ => (hint x).const_mul _)] calc ∑ x : Fin n → Fin 4, ∫ z, inputPathDirectionalDerivative θ v p x * transcriptComponentRealDensity P n x z ∂transcriptReferenceMeasure P n = ∑ x : Fin n → Fin 4, inputPathDirectionalDerivative θ v p x := by apply Finset.sum_congr rfl intro x _ rw [integral_const_mul] rw [show (∫ z, transcriptComponentRealDensity P n x z ∂transcriptReferenceMeasure P n) = 1 by unfold transcriptComponentRealDensity rw [Measure.integral_toReal_rnDeriv (transcriptComponent_ac_reference P n x)] simp [measureReal_def]] ring _ = 0 := sum_inputPathDirectionalDerivative_eq_zero θ v p
CausalSmith.Stat.LdpAteEfficiencySurface.integral_transcriptMixtureRealDerivative_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:232
theorem conditionalTranscriptDirectionalScore_integrable

the conditional transcript directional score integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the conditional Transcript Directional Score integrable.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
Integrable (conditionalTranscriptDirectionalScore P θ v p n) (transcriptLaw P θ p n)
Proof (Lean source)
lemma conditionalTranscriptDirectionalScore_integrable {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : Integrable (conditionalTranscriptDirectionalScore P θ v p n) (transcriptLaw P θ p n) := (conditionalTranscriptDirectionalScore_memLp_two P θ v p n hp hθ).integrable (by norm_num)
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptDirectionalScore_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:269
theorem integral_conditionalTranscriptDirectionalScore_eq_zero

The global observed transcript score is centered under the transcript law. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integral conditional Transcript Directional Score eq zero.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
∫ z, conditionalTranscriptDirectionalScore P θ v p n z ∂transcriptLaw P θ p n = 0
Proof (Lean source)
lemma integral_conditionalTranscriptDirectionalScore_eq_zero {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : ∫ z, conditionalTranscriptDirectionalScore P θ v p n z ∂transcriptLaw P θ p n = 0 := by rw [← transcriptLaw_eq_withDensity_reference P θ p n] change (∫ z, conditionalTranscriptDirectionalScore P θ v p n z ∂(transcriptReferenceMeasure P n).withDensity ((transcriptLaw P θ p n).rnDeriv (transcriptReferenceMeasure P n))) = 0 rw [integral_withDensity_eq_integral_toReal_smul (Measure.measurable_rnDeriv _ _) (Measure.rnDeriv_lt_top _ _)] change (∫ z, (transcriptDensity P θ p n z).toReal • conditionalTranscriptDirectionalScore P θ v p n z ∂transcriptReferenceMeasure P n) = 0 rw [show (∫ z, (transcriptDensity P θ p n z).toReal • conditionalTranscriptDirectionalScore P θ v p n z ∂transcriptReferenceMeasure P n) = ∫ z, transcriptMixtureRealDerivative P θ v p n z ∂transcriptReferenceMeasure P n by apply integral_congr_ae filter_upwards [transcriptDensity_toReal_ae_eq_mixture_of_interior P θ p n hp hθ, transcriptMixtureRealDensity_pos_ae P θ p n hp hθ] with z heq hpos simpa [smul_eq_mul, heq] using (transcriptDerivative_eq_density_mul_conditionalScore P θ v p n z hpos.ne').symm] exact integral_transcriptMixtureRealDerivative_eq_zero P θ v p n
CausalSmith.Stat.LdpAteEfficiencySurface.integral_conditionalTranscriptDirectionalScore_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:281
theorem conditionalTranscriptDirectionalScore_sq_integrable

the conditional transcript directional score sq integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the conditional Transcript Directional Score sq integrable.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
Integrable (fun z => (conditionalTranscriptDirectionalScore P θ v p n z) ^ 2) (transcriptLaw P θ p n)
Proof (Lean source)
lemma conditionalTranscriptDirectionalScore_sq_integrable {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : Integrable (fun z => (conditionalTranscriptDirectionalScore P θ v p n z) ^ 2) (transcriptLaw P θ p n) := (conditionalTranscriptDirectionalScore_memLp_two P θ v p n hp hθ).integrable_sq
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptDirectionalScore_sq_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialGlobalScore.lean:317
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialHistoryTransport 3 declarations Canonical successor history index

Canonical successor history index

def canonicalNextIndex

The successor index is the canonical Fin n value with numeral part k. Rewriting by this equality before forming a dependent History also aligns its measurable-space instance; the remaining bound proofs are propositionally irrelevant. For the displayed inputs and conditions, the stated result follows.

Definition (Lean source)
n k :
ℕ
hk :
k + 1 ≤ n
canonicalNextIndex hk :
Fin n
⟨k, Nat.lt_of_succ_le hk⟩
theorem nextIndex_eq_canonicalNextIndex

Under the supplied quantities and conditions, the next index eq canonical next index assertion holds.

Formal statement
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma nextIndex_eq_canonicalNextIndex {n k : ℕ} (hk : k + 1 ≤ n) : nextIndex hk = canonicalNextIndex hk := by apply Fin.ext rfl
CausalSmith.Stat.LdpAteEfficiencySurface.nextIndex_eq_canonicalNextIndex · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialHistoryTransport.lean:19
theorem canonicalNextIndex_val

Under the stated assumptions, the canonical next index has natural-number value equal to the current history length.

Formal statement
n k :
ℕ
hk :
k + 1 ≤ n
(canonicalNextIndex hk).val = k
Proof (Lean source)
@[simp] lemma canonicalNextIndex_val {n k : ℕ} (hk : k + 1 ≤ n) : (canonicalNextIndex hk).val = k := rfl
CausalSmith.Stat.LdpAteEfficiencySurface.canonicalNextIndex_val · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialHistoryTransport.lean:25
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialInformationEnvelope 6 declarations This file identifies the least-favorable contrast direction and proves local continuity of its stationary staircase information envelope.

Local sequential information envelope

This file identifies the least-favorable contrast direction and proves local continuity of its stationary staircase information envelope. The resulting sequential criterion is uniform over arbitrary scalar sequences staying in a fixed compact interval.

theorem contrast_selectedDirection

The selected least-favorable direction has unit contrast. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the contrast selected Direction.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
contrast (direction (selectedDirection θ p ε hp hθ hε)) = 1
Proof (Lean source)
lemma contrast_selectedDirection (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : contrast (direction (selectedDirection θ p ε hp hθ hε)) = 1 := by simp [contrast, direction]
CausalSmith.Stat.LdpAteEfficiencySurface.contrast_selectedDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialInformationEnvelope.lean:22
theorem upperEnvelope_selectedDirection

At the base parameter, the selected direction attains the stationary staircase envelope value Jstar. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the upper Envelope selected Direction.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
upperEnvelope θ p ε (selectedDirection θ p ε hp hθ hε) = Jstar θ p ε
Proof (Lean source)
lemma upperEnvelope_selectedDirection (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : upperEnvelope θ p ε (selectedDirection θ p ε hp hθ hε) = Jstar θ p ε := Classical.choose_spec (exists_selectedDirection θ p ε hp hθ hε)
CausalSmith.Stat.LdpAteEfficiencySurface.upperEnvelope_selectedDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialInformationEnvelope.lean:30
theorem sequentialJointChannel_fisher_selectedDirection_le_upperEnvelope

Every history-conditioned sequential channel has directional Fisher information at most the stationary envelope in the selected direction. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the sequential Joint Channel fisher selected Direction le upper Envelope.

Formal statement
Z :
ε :
ℝ
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
η θ :
p :
ℝ
hη :
hθ :
hε :
0 < ε
≤ upperEnvelope η p ε (selectedDirection θ p ε hp hθ hε)
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma sequentialJointChannel_fisher_selectedDirection_le_upperEnvelope {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) [IsProbabilityMeasure μ] (η θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hη : InteriorMeans η) (hθ : InteriorMeans θ) (hε : 0 < ε) : informationQuadratic (channelFisherInfo η p (sequentialJointChannel P n i μ)) (direction (selectedDirection θ p ε hp hθ hε)) ≤ upperEnvelope η p ε (selectedDirection θ p ε hp hθ hε) := by exact sequentialJointChannel_fisher_le_upperEnvelope P n i μ η p (selectedDirection θ p ε hp hθ hε) hp hη hε
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialJointChannel_fisher_selectedDirection_le_upperEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialInformationEnvelope.lean:39
theorem continuous_upperEnvelope_interior

At fixed direction, the staircase upper envelope is continuous on the interior trial-parameter space. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the continuous upper Envelope interior.

Formal statement
p ε t :
ℝ
hε :
0 ≤ ε
Continuous (fun θ : {η : TrialParameter // InteriorMeans η} => upperEnvelope θ.1 p ε t)
Proof (Lean source)
lemma continuous_upperEnvelope_interior (p ε t : ℝ) (hp : InteriorAssignment p) (hε : 0 ≤ ε) : Continuous (fun θ : {η : TrialParameter // InteriorMeans η} => upperEnvelope θ.1 p ε t) := by let Θ := {η : TrialParameter // InteriorMeans η} have hmass (s : Fin 14) : Continuous (fun θ : Θ => patternMass θ.1 p ε s) := by unfold patternMass apply continuous_finsetSum intro j _ apply Continuous.mul · fin_cases j <;> simp only [piTheta] · exact continuous_const.mul (continuous_const.sub ((continuous_apply 0).comp continuous_subtype_val)) · exact continuous_const.mul ((continuous_apply 0).comp continuous_subtype_val) · exact continuous_const.mul (continuous_const.sub ((continuous_apply 1).comp continuous_subtype_val)) · exact continuous_const.mul ((continuous_apply 1).comp continuous_subtype_val) · exact continuous_const have hobj : Continuous (fun z : Θ × StaircaseWeight => informationObjective z.1.1 p ε z.2 t) := by unfold informationObjective patternInformation apply continuous_finsetSum intro s _ apply Continuous.mul · exact (continuous_apply s).comp continuous_snd · apply Continuous.div continuous_const ((hmass s).comp continuous_fst) intro z exact ne_of_gt (patternMass_pos_interior z.1.1 p ε hp z.1.2 hε s) have hc := (staircaseFeasible_compact ε hε).continuous_sSup (f := fun (θ : Θ) (α : StaircaseWeight) => informationObjective θ.1 p ε α t) hobj simpa [upperEnvelope, image, eq_comm] using hc
CausalSmith.Stat.LdpAteEfficiencySurface.continuous_upperEnvelope_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialInformationEnvelope.lean:59
theorem tendsto_upperEnvelope_selectedDirection_of_tendsto

Any interior parameter sequence converging to the base point has its selected-direction envelope converge to Jstar at that point. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the tendsto upper Envelope selected Direction of tendsto.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
η :
hη :
∀ n, InteriorMeans (η n)
hηθ :
Tendsto (fun n => upperEnvelope (η n) p ε (selectedDirection θ p ε hp hθ hε)) atTop (nhds (Jstar θ p ε))
Proof (Lean source)
lemma tendsto_upperEnvelope_selectedDirection_of_tendsto (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (η : ℕ → TrialParameter) (hη : ∀ n, InteriorMeans (η n)) (hηθ : Tendsto η atTop (nhds θ)) : Tendsto (fun n => upperEnvelope (η n) p ε (selectedDirection θ p ε hp hθ hε)) atTop (nhds (Jstar θ p ε)) := by let Θ := {x : TrialParameter // InteriorMeans x} let θsub : Θ := ⟨θ, hθ⟩ let ηsub : ℕ → Θ := fun n => ⟨η n, hη n⟩ have hlift : Tendsto ηsub atTop (nhds θsub) := by rw [tendsto_subtype_rng] exact hηθ have hc := (continuous_upperEnvelope_interior p ε (selectedDirection θ p ε hp hθ hε) hp hε.le).continuousAt (x := θsub) have ht := Filter.Tendsto.comp hc hlift have heq : (fun x : Θ => upperEnvelope x.1 p ε (selectedDirection θ p ε hp hθ hε)) ∘ ηsub = fun n => upperEnvelope (η n) p ε (selectedDirection θ p ε hp hθ hε) := by funext n rfl rw [heq] at ht simpa only [θsub, upperEnvelope_selectedDirection θ p ε hp hθ hε] using ht
CausalSmith.Stat.LdpAteEfficiencySurface.tendsto_upperEnvelope_selectedDirection_of_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialInformationEnvelope.lean:100
theorem tendsto_upperEnvelope_compactScaled_selectedDirection

Uniform sequential form: along any scalar sequence contained in a fixed compact interval, the inverse-root-sample local envelope in the selected direction converges to the base Jstar. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the tendsto upper Envelope compact Scaled selected Direction.

Formal statement
p ε R :
ℝ
hθ :
hε :
0 < ε
_hR :
0 ≤ R
a :
ℕ → ℝ
ha :
∀ n, a n ∈ Icc (-R) R
hinterior :
∀ n,
InteriorMeans (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a n / sqrt n))
Tendsto (fun n => upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a n / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) atTop (nhds (Jstar θ p ε))
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma tendsto_upperEnvelope_compactScaled_selectedDirection (θ : TrialParameter) (p ε R : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (_hR : 0 ≤ R) (a : ℕ → ℝ) (ha : ∀ n, a n ∈ Icc (-R) R) (hinterior : ∀ n, InteriorMeans (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a n / sqrt n))) : Tendsto (fun n => upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a n / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) atTop (nhds (Jstar θ p ε)) := by have hinv : Tendsto (fun n : ℕ => (sqrt (n : ℝ))⁻¹) atTop (nhds 0) := tendsto_inv_atTop_zero.comp (Real.tendsto_sqrt_atTop.comp tendsto_natCast_atTop_atTop) have habounded : ∀ᶠ n : ℕ in atTop, |a n| ≤ R := Filter.Eventually.of_forall fun n => abs_le.2 (ha n) have hscalar : Tendsto (fun n => a n / sqrt n) atTop (nhds 0) := by simpa only [div_eq_mul_inv] using bdd_le_mul_tendsto_zero' R habounded hinv have hpath : Tendsto (fun n => parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a n / sqrt n)) atTop (nhds θ) := by rw [tendsto_pi_nhds] intro k simpa [parameterPath] using tendsto_const_nhds.add (hscalar.mul tendsto_const_nhds) exact tendsto_upperEnvelope_selectedDirection_of_tendsto θ p ε hp hθ hε _ hinterior hpath
CausalSmith.Stat.LdpAteEfficiencySurface.tendsto_upperEnvelope_compactScaled_selectedDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialInformationEnvelope.lean:131
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialJointChannel 6 declarations Joint prefix and next-release channels

Joint prefix and next-release channels

def releasedHistoryRowKernel

The original next-release channel, with a finite input row and a released finite-sequence history. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
ε :
ℝ
n :
ℕ
i :
Fin n
releasedHistoryRowKernel P n i :
Kernel (Fin 4 × History (Z n) i.val (le_of_lt i.isLt)) (Z n i)
(P.channel n i).comap (fun jh => (jh.1, fsHistoryToPrivate i jh.2)) (measurable_fst.prodMk ((measurable_fsHistoryToPrivate i).comp measurable_snd))
CausalSmith.Stat.LdpAteEfficiencySurface.releasedHistoryRowKernel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialJointChannel.lean:19
def sequentialJointChannel

Adjoin a common random released prefix to each of the four current-input rows. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The sequential Joint Channel is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
sequentialJointChannel P n i μ :
Kernel (Fin 4) (History (Z n) i.val (le_of_lt i.isLt) × Z n i)
(Kernel.const (Fin 4) μ).compProd (releasedHistoryRowKernel P n i)
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialJointChannel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialJointChannel.lean:30
theorem sequentialJointChannel_isMarkov

the sequential joint channel is markov assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
Proof (Lean source)
lemma sequentialJointChannel_isMarkov {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) [IsProbabilityMeasure μ] : IsMarkovKernel (sequentialJointChannel P n i μ) := by letI : IsMarkovKernel (P.channel n i) := (P.privacy n).1 i letI : IsMarkovKernel (releasedHistoryRowKernel P n i) := by unfold releasedHistoryRowKernel infer_instance unfold sequentialJointChannel releasedHistoryRowKernel infer_instance
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialJointChannel_isMarkov · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialJointChannel.lean:38
theorem sequentialJointChannel_stationaryLDP

the sequential joint channel stationary ldp assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
Proof (Lean source)
lemma sequentialJointChannel_stationaryLDP {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) [IsProbabilityMeasure μ] : StationaryLDP (ε) (sequentialJointChannel P n i μ) := by letI : IsMarkovKernel (P.channel n i) := (P.privacy n).1 i letI : IsMarkovKernel (releasedHistoryRowKernel P n i) := by unfold releasedHistoryRowKernel infer_instance refine ⟨sequentialJointChannel_isMarkov P n i μ, ?_⟩ intro A hA j j' rw [sequentialJointChannel, Kernel.compProd_apply hA, Kernel.compProd_apply hA] have hsection (a : Fin 4) : Measurable (fun h => releasedHistoryRowKernel P n i (a, h) (Prod.mk h ⁻¹' A)) := ((releasedHistoryRowKernel P n i).comap (fun h => (a, h)) (measurable_const.prodMk measurable_id)).measurable_kernel_prodMk_left hA calc (∫⁻ h, releasedHistoryRowKernel P n i (j, h) (Prod.mk h ⁻¹' A) ∂μ) ≤ ∫⁻ h, ofReal (exp (ε)) * releasedHistoryRowKernel P n i (j', h) (Prod.mk h ⁻¹' A) ∂μ := by apply lintegral_mono intro h exact (P.privacy n).2 i (Prod.mk h ⁻¹' A) (hA.preimage (measurable_const.prodMk measurable_id)) j j' (fsHistoryToPrivate i h) _ = ofReal (exp (ε)) * ∫⁻ h, releasedHistoryRowKernel P n i (j', h) (Prod.mk h ⁻¹' A) ∂μ := by rw [lintegral_const_mul _ (hsection j')]
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialJointChannel_stationaryLDP · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialJointChannel.lean:51
theorem outputLaw_sequentialJointChannel

Mixing the four joint rows gives the prefix measure composed with the observed next-release kernel. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the output Law sequential Joint Channel.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
outputLaw θ p (sequentialJointChannel P n i μ)
= μ ⊗ₘ ((observedStageKernel P θ p n i).comap (fun h => ((), h)) (measurable_const.prodMk measurable_id))
Proof (Lean source)
lemma outputLaw_sequentialJointChannel {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) [IsProbabilityMeasure μ] : outputLaw θ p (sequentialJointChannel P n i μ) = μ ⊗ₘ ((observedStageKernel P θ p n i).comap (fun h => ((), h)) (measurable_const.prodMk measurable_id)) := by classical letI : IsMarkovKernel (P.channel n i) := (P.privacy n).1 i letI : IsMarkovKernel (releasedHistoryRowKernel P n i) := by unfold releasedHistoryRowKernel infer_instance letI : IsMarkovKernel (observedStageKernel P θ p n i) := observedStageKernel_isMarkov P θ p hp hθ n i ext A hA have hsection (j : Fin 4) : Measurable (fun h => P.channel n i (j, fsHistoryToPrivate i h) (Prod.mk h ⁻¹' A)) := ((releasedHistoryRowKernel P n i).comap (fun h => (j, h)) (measurable_const.prodMk measurable_id)).measurable_kernel_prodMk_left hA simp_rw [outputLaw, Measure.finsetSum_apply, Measure.smul_apply, smul_eq_mul, sequentialJointChannel, Kernel.compProd_apply hA] rw [Measure.compProd_apply hA] change (∑ j : Fin 4, ofReal (piTheta θ p j) * ∫⁻ h, P.channel n i (j, fsHistoryToPrivate i h) (Prod.mk h ⁻¹' A) ∂μ) = ∫⁻ h, ∑ j : Fin 4, ofReal (piTheta θ p j) * P.channel n i (j, fsHistoryToPrivate i h) (Prod.mk h ⁻¹' A) ∂μ rw [lintegral_finset_sum] · apply Finset.sum_congr rfl intro j _ rw [lintegral_const_mul _ (hsection j)] · intro j _ exact measurable_const.mul (hsection j)
CausalSmith.Stat.LdpAteEfficiencySurface.outputLaw_sequentialJointChannel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialJointChannel.lean:83
theorem sequentialJointChannel_fisher_le_upperEnvelope

The joint channel's directional Fisher information is bounded by the finite staircase envelope. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the sequential Joint Channel fisher le upper Envelope.

Formal statement
Z :
ε :
ℝ
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
p t :
ℝ
hθ :
heps :
0 < ε
Proof (Lean source)
lemma sequentialJointChannel_fisher_le_upperEnvelope {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) [IsProbabilityMeasure μ] (θ : TrialParameter) (p t : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (heps : 0 < ε) : informationQuadratic (channelFisherInfo θ p (sequentialJointChannel P n i μ)) (direction t) ≤ upperEnvelope θ p (ε) t := by let Q := sequentialJointChannel P n i μ have hQ : StationaryLDP (ε) Q := sequentialJointChannel_stationaryLDP P n i μ obtain ⟨α, K, hα, hK, hfac, hpsd, hrigid⟩ := staircase_refinement_interior p θ (ε) hp hθ (fun _ => ε) ⟨heps, fun _ => rfl⟩ Q hQ have hquad : informationQuadratic (channelFisherInfo θ p Q) (direction t) ≤ informationQuadratic (informationMatrix θ p (ε) α) (direction t) := by have hz := hpsd.dotProduct_mulVec_nonneg (direction t) have hnonneg : 0 ≤ informationQuadratic (informationMatrix θ p ε α - channelFisherInfo θ p Q) (direction t) := by rw [show informationQuadratic (informationMatrix θ p ε α - channelFisherInfo θ p Q) (direction t) = star (direction t) ⬝ᵥ (informationMatrix θ p ε α - channelFisherInfo θ p Q).mulVec (direction t) by simp [informationQuadratic, mulVec, dotProduct, Fin.sum_univ_two] ring] exact hz have heq : informationQuadratic (informationMatrix θ p ε α - channelFisherInfo θ p Q) (direction t) = informationQuadratic (informationMatrix θ p ε α) (direction t) - informationQuadratic (channelFisherInfo θ p Q) (direction t) := by unfold informationQuadratic simp [Fin.sum_univ_two] ring linarith calc informationQuadratic (channelFisherInfo θ p Q) (direction t) ≤ informationQuadratic (informationMatrix θ p (ε) α) (direction t) := hquad _ = informationObjective θ p (ε) α t := (informationObjective_eq_informationQuadratic θ p ε α t).symm _ ≤ upperEnvelope θ p (ε) t := by obtain ⟨β, hβ, hmax⟩ := informationObjective_exists_maximizer θ p ε t heps.le have hub : upperEnvelope θ p ε t = informationObjective θ p ε β t := by unfold upperEnvelope apply IsGreatest.csSup_eq exact ⟨⟨β, hβ, rfl⟩, by rintro u ⟨γ, hγ, rfl⟩ exact hmax γ hγ⟩ rw [hub] exact hmax α hα
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialJointChannel_fisher_le_upperEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialJointChannel.lean:122
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialLocalRiskOrder 9 declarations Order and limit calculus for the sequential local minimax lower bound

Order and limit calculus for the sequential local minimax lower bound

theorem localRisk_le_localWorstRisk

Every admissible local alternative's risk is bounded by the corresponding local worst risk. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p H :
ℝ
n :
ℕ
hh :
h ∈ localIndexSet θ n H
localRisk P θ h p n ≤ localWorstRisk P θ p H n
Proof (Lean source)
lemma localRisk_le_localWorstRisk {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p H : ℝ) (n : ℕ) (h : TrialParameter) (hh : h ∈ localIndexSet θ n H) : localRisk P θ h p n ≤ localWorstRisk P θ p H n := by unfold localWorstRisk apply le_sSup exact ⟨h, hh, rfl⟩
CausalSmith.Stat.LdpAteEfficiencySurface.localRisk_le_localWorstRisk · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLocalRiskOrder.lean:15
theorem eventually_mem_localIndexSet

Every fixed direction whose Euclidean norm is at most the radius is eventually admissible at an interior base parameter. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
theta h :
H :
ℝ
htheta :
hh :
sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H
∀ᶠ n in atTop, h ∈ localIndexSet theta n H
Proof (Lean source)
lemma eventually_mem_localIndexSet (theta h : TrialParameter) (H : ℝ) (htheta : InteriorMeans theta) (hh : sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H) : ∀ᶠ n in atTop, h ∈ localIndexSet theta n H := by filter_upwards [eventually_localAlternative_interior theta h htheta] with n hn exact ⟨hh, hn⟩
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_mem_localIndexSet · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLocalRiskOrder.lean:26
theorem eventually_localRisk_le_localWorstRisk

Consequently, the risk at any fixed bounded direction is eventually below the local worst-risk sequence. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta :
p H :
ℝ
htheta :
hh :
sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H
∀ᶠ n in atTop, localRisk P theta h p n ≤ localWorstRisk P theta p H n
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma eventually_localRisk_le_localWorstRisk {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta : TrialParameter) (p H : ℝ) (h : TrialParameter) (htheta : InteriorMeans theta) (hh : sqrt ((h 0) ^ 2 + (h 1) ^ 2) ≤ H) : ∀ᶠ n in atTop, localRisk P theta h p n ≤ localWorstRisk P theta p H n := by filter_upwards [eventually_mem_localIndexSet theta h H htheta hh] with n hn exact localRisk_le_localWorstRisk P theta p H n h hn
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_localRisk_le_localWorstRisk · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLocalRiskOrder.lean:35
theorem le_localAsymptoticRisk_of_le_liminf

A lower bound on the liminf at one positive radius is already a lower bound on the outer-radius local asymptotic risk. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p H :
ℝ
hH :
0 < H
v :
ℝ≥0∞
hlim :
v ≤ liminf (fun n => localWorstRisk P θ p H n) atTop
v ≤ localAsymptoticRisk P θ p
Proof (Lean source)
lemma le_localAsymptoticRisk_of_le_liminf {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p H : ℝ) (hH : 0 < H) (v : ℝ≥0∞) (hlim : v ≤ liminf (fun n => localWorstRisk P θ p H n) atTop) : v ≤ localAsymptoticRisk P θ p := by unfold localAsymptoticRisk exact hlim.trans (le_sSup ⟨H, hH, rfl⟩)
CausalSmith.Stat.LdpAteEfficiencySurface.le_localAsymptoticRisk_of_le_liminf · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLocalRiskOrder.lean:48
theorem le_localAsymptoticRisk_of_eventually_ge_of_tendsto

An eventually valid finite-sample lower envelope transfers through the liminf and the outer radius supremum. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p H :
ℝ
hH :
0 < H
b :
ℕ → ℝ≥0∞
v :
ℝ≥0∞
hb :
hlower :
∀ᶠ n in atTop, b n ≤ localWorstRisk P θ p H n
v ≤ localAsymptoticRisk P θ p
Proof (Lean source)
lemma le_localAsymptoticRisk_of_eventually_ge_of_tendsto {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p H : ℝ) (hH : 0 < H) (b : ℕ → ℝ≥0∞) (v : ℝ≥0∞) (hb : Tendsto b atTop (nhds v)) (hlower : ∀ᶠ n in atTop, b n ≤ localWorstRisk P θ p H n) : v ≤ localAsymptoticRisk P θ p := by apply le_localAsymptoticRisk_of_le_liminf P θ p H hH v rw [← hb.liminf_eq] exact liminf_le_liminf hlower (by isBoundedDefault) (by isBoundedDefault)
CausalSmith.Stat.LdpAteEfficiencySurface.le_localAsymptoticRisk_of_eventually_ge_of_tendsto · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLocalRiskOrder.lean:59
theorem ofReal_le_localAsymptoticRisk_of_bayes_envelope

A real finite-sample Bayes envelope converging to v gives the exact ENNReal.ofReal v local asymptotic lower bound. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p H :
ℝ
hH :
0 < H
b :
ℕ → ℝ
v :
ℝ
hb :
hlower :
∀ᶠ n in atTop, ofReal (b n) ≤ localWorstRisk P θ p H n
Proof (Lean source)
lemma ofReal_le_localAsymptoticRisk_of_bayes_envelope {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p H : ℝ) (hH : 0 < H) (b : ℕ → ℝ) (v : ℝ) (hb : Tendsto b atTop (nhds v)) (hlower : ∀ᶠ n in atTop, ofReal (b n) ≤ localWorstRisk P θ p H n) : ofReal v ≤ localAsymptoticRisk P θ p := by apply le_localAsymptoticRisk_of_eventually_ge_of_tendsto P θ p H hH (fun n => ofReal (b n)) (ofReal v) · exact ENNReal.continuous_ofReal.continuousAt.tendsto.comp hb · exact hlower
CausalSmith.Stat.LdpAteEfficiencySurface.ofReal_le_localAsymptoticRisk_of_bayes_envelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLocalRiskOrder.lean:72
theorem tendsto_nat_div_const_add_nat_mul

The result identifies the relation called tendsto nat div const add nat mul: given the declared inputs and assumptions, the stated mathematical conclusion holds. Under the stated assumptions, the tendsto nat div const add nat mul.

Formal statement
c :
ℝ
info :
ℕ → ℝ
I :
ℝ
hI :
0 < I
hinfo :
Tendsto info atTop (nhds I)
Tendsto (fun n : ℕ => (n : ℝ) / (c + (n : ℝ) * info n)) atTop (nhds (1 / I))
Proof (Lean source)
lemma tendsto_nat_div_const_add_nat_mul (c : ℝ) (info : ℕ → ℝ) (I : ℝ) (hI : 0 < I) (hinfo : Tendsto info atTop (nhds I)) : Tendsto (fun n : ℕ => (n : ℝ) / (c + (n : ℝ) * info n)) atTop (nhds (1 / I)) := by have hn : Tendsto (fun n : ℕ => (n : ℝ)) atTop atTop := tendsto_natCast_atTop_atTop have hinv : Tendsto (fun n : ℕ => ((n : ℝ))⁻¹) atTop (nhds 0) := tendsto_inv_atTop_zero.comp hn have hc : Tendsto (fun n : ℕ => c / (n : ℝ)) atTop (nhds 0) := by simpa only [div_eq_mul_inv, mul_zero] using tendsto_const_nhds.mul hinv have hquot : Tendsto (fun n : ℕ => 1 / (c / (n : ℝ) + info n)) atTop (nhds (1 / I)) := by change Tendsto ((fun _ : ℕ ↦ (1 : ℝ)) / (fun n : ℕ ↦ c / (n : ℝ) + info n)) atTop (nhds (1 / I)) simpa only [zero_add] using tendsto_const_nhds.div (hc.add hinfo) (by simpa using ne_of_gt hI) apply hquot.congr' filter_upwards [eventually_atTop.2 ⟨1, fun n hn1 => hn1⟩] with n hn1 have hn0 : (n : ℝ) ≠ 0 := by exact_mod_cast (Nat.ne_of_gt hn1) field_simp
CausalSmith.Stat.LdpAteEfficiencySurface.tendsto_nat_div_const_add_nat_mul · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLocalRiskOrder.lean:87
theorem tendsto_ofReal_nat_div_const_add_nat_mul

The preceding real van Trees envelope also converges after embedding into nonnegative extended reals. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
c :
ℝ
info :
ℕ → ℝ
I :
ℝ
hI :
0 < I
hinfo :
Tendsto info atTop (nhds I)
Tendsto (fun n : ℕ => ofReal ((n : ℝ) / (c + (n : ℝ) * info n))) atTop (nhds (ofReal (1 / I)))
Proof (Lean source)
lemma tendsto_ofReal_nat_div_const_add_nat_mul (c : ℝ) (info : ℕ → ℝ) (I : ℝ) (hI : 0 < I) (hinfo : Tendsto info atTop (nhds I)) : Tendsto (fun n : ℕ => ofReal ((n : ℝ) / (c + (n : ℝ) * info n))) atTop (nhds (ofReal (1 / I))) := by exact ENNReal.continuous_ofReal.continuousAt.tendsto.comp (tendsto_nat_div_const_add_nat_mul c info I hI hinfo)
CausalSmith.Stat.LdpAteEfficiencySurface.tendsto_ofReal_nat_div_const_add_nat_mul · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLocalRiskOrder.lean:111
theorem inv_le_localAsymptoticRisk_of_finite_vanTrees

A finite-n van Trees lower bound with a convergent per-sample information envelope yields the exact local asymptotic reciprocal-information bound. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p H c I :
ℝ
hH :
0 < H
hI :
0 < I
info :
ℕ → ℝ
hinfo :
Tendsto info atTop (nhds I)
hbayes :
∀ᶠ n : ℕ in atTop, ofReal ((n : ℝ) / (c + (n : ℝ) * info n))
≤ localWorstRisk P θ p H n
ofReal (1 / I) ≤ localAsymptoticRisk P θ p
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma inv_le_localAsymptoticRisk_of_finite_vanTrees {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p H c I : ℝ) (hH : 0 < H) (hI : 0 < I) (info : ℕ → ℝ) (hinfo : Tendsto info atTop (nhds I)) (hbayes : ∀ᶠ n : ℕ in atTop, ofReal ((n : ℝ) / (c + (n : ℝ) * info n)) ≤ localWorstRisk P θ p H n) : ofReal (1 / I) ≤ localAsymptoticRisk P θ p := by exact le_localAsymptoticRisk_of_eventually_ge_of_tendsto P θ p H hH _ _ (tendsto_ofReal_nat_div_const_add_nat_mul c info I hI hinfo) hbayes
CausalSmith.Stat.LdpAteEfficiencySurface.inv_le_localAsymptoticRisk_of_finite_vanTrees · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLocalRiskOrder.lean:122
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialLowerBound 6 declarations Universal sequential local asymptotic lower bound

Universal sequential local asymptotic lower bound

theorem likelihoodScore_vtDensity_eq_transcriptScore

the likelihood score vt density eq transcript score assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the likelihood Score vt Density eq transcript Score.

Formal statement
Z :
ε :
ℝ
p ell upper a :
ℝ
n :
ℕ
hη :
ha :
a ∈ Icc ell upper
z :
Transcript (Z n)
likelihoodScore (vtDensity P θ d p n ell upper) (vtDensityDeriv P θ d p n ell upper) a z
Proof (Lean source)
lemma likelihoodScore_vtDensity_eq_transcriptScore {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ d : TrialParameter) (p ell upper a : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hη : InteriorMeans (parameterPath θ d a)) (ha : a ∈ Icc ell upper) (z : Transcript (Z n)) : likelihoodScore (vtDensity P θ d p n ell upper) (vtDensityDeriv P θ d p n ell upper) a z = conditionalTranscriptDirectionalScore P (parameterPath θ d a) d p n z := by rw [conditionalTranscriptDirectionalScore_eq_guarded P (parameterPath θ d a) d p n hp hη z] unfold likelihoodScore vtDensity vtDensityDeriv simp only [ha, ↓reduceIte]
CausalSmith.Stat.LdpAteEfficiencySurface.likelihoodScore_vtDensity_eq_transcriptScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLowerBound.lean:17
theorem fisherInformation_vtDensity_eq_transcriptScoreEnergy

the fisher information vt density eq transcript score energy assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the fisher Information vt Density eq transcript Score Energy.

Formal statement
Z :
ε :
ℝ
p ell upper a :
ℝ
n :
ℕ
hη :
ha :
a ∈ Icc ell upper
fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ d p n ell upper) (vtDensityDeriv P θ d p n ell upper) a
= ∫ z, conditionalTranscriptDirectionalScore P (parameterPath θ d a) d p n z ^ 2 ∂transcriptLaw P (parameterPath θ d a) p n
Proof (Lean source)
lemma fisherInformation_vtDensity_eq_transcriptScoreEnergy {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ d : TrialParameter) (p ell upper a : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hη : InteriorMeans (parameterPath θ d a)) (ha : a ∈ Icc ell upper) : fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ d p n ell upper) (vtDensityDeriv P θ d p n ell upper) a = ∫ z, conditionalTranscriptDirectionalScore P (parameterPath θ d a) d p n z ^ 2 ∂transcriptLaw P (parameterPath θ d a) p n := by let q := transcriptMixtureRealDensity P (parameterPath θ d a) p n let s := conditionalTranscriptDirectionalScore P (parameterPath θ d a) d p n have hqnonneg (z : Transcript (Z n)) : 0 ≤ q z := transcriptMixtureRealDensity_nonneg P (parameterPath θ d a) p n hp hη z unfold fisherInformation rw [show (fun z => vtDensity P θ d p n ell upper a z * likelihoodScore (vtDensity P θ d p n ell upper) (vtDensityDeriv P θ d p n ell upper) a z ^ 2) = fun z => q z * s z ^ 2 by funext z rw [likelihoodScore_vtDensity_eq_transcriptScore P θ d p ell upper a n hp hη ha z] simp [q, s, vtDensity, ha]] rw [← transcriptLaw_eq_withDensity_mixture P (parameterPath θ d a) p n hp hη] rw [integral_withDensity_eq_integral_toReal_smul (measurable_transcriptMixtureRealDensity P (parameterPath θ d a) p n).ennreal_ofReal (Filter.Eventually.of_forall fun _ => ENNReal.ofReal_lt_top)] apply integral_congr_ae filter_upwards with z rw [ENNReal.toReal_ofReal (hqnonneg z), smul_eq_mul]
CausalSmith.Stat.LdpAteEfficiencySurface.fisherInformation_vtDensity_eq_transcriptScoreEnergy · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLowerBound.lean:35
theorem fisherInformation_scaledSelected_le_upperEnvelope

the fisher information scaled selected le upper envelope assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the fisher Information scaled Selected le upper Envelope.

Formal statement
Z :
ε :
ℝ
p R a :
ℝ
hθ :
hε :
0 < ε
n :
ℕ
hn :
0 < n
ha :
a ∈ Icc (-R) R
hη :
InteriorMeans (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n))
fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) a
≤ upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)
Proof (Lean source)
lemma fisherInformation_scaledSelected_le_upperEnvelope {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p R a : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (n : ℕ) (hn : 0 < n) (ha : a ∈ Icc (-R) R) (hη : InteriorMeans (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n))) : fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) a ≤ upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε) := by let v := direction (selectedDirection θ p ε hp hθ hε) let c := (sqrt n)⁻¹ let η := parameterPath θ v (a / sqrt n) have hpath : parameterPath θ (scaledDirection c v) a = η := by funext k simp [η, v, c, parameterPath, scaledDirection] ring rw [fisherInformation_vtDensity_eq_transcriptScoreEnergy P θ (scaledDirection c v) p (-R) R a n hp (hpath ▸ hη) ha] rw [hpath] have hb := transcriptScaledDirectionalFisher_le P η p (selectedDirection θ p ε hp hθ hε) c hp hη hε n calc (∫ z, conditionalTranscriptDirectionalScore P η (scaledDirection c v) p n z ^ 2 ∂transcriptLaw P η p n) ≤ c ^ 2 * ((n : ℝ) * upperEnvelope η p ε (selectedDirection θ p ε hp hθ hε)) := by simpa [v] using hb _ = upperEnvelope η p ε (selectedDirection θ p ε hp hθ hε) := by have hnreal : (0 : ℝ) < n := by exact_mod_cast hn have hsqrt : sqrt (n : ℝ) ≠ 0 := ne_of_gt (Real.sqrt_pos.2 hnreal) dsimp [c] rw [inv_pow] rw [show (sqrt (n : ℝ)) ^ 2 = n by exact Real.sq_sqrt (Nat.cast_nonneg n)] field_simp _ = _ := rfl
CausalSmith.Stat.LdpAteEfficiencySurface.fisherInformation_scaledSelected_le_upperEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLowerBound.lean:73
theorem integrable_vtLikelihoodFisher_section

the integrable vt likelihood fisher section assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p ell upper a :
ℝ
n :
ℕ
hinterior :
∀ a ∈ Icc ell upper, InteriorMeans (parameterPath θ d a)
Integrable (fun z => vtDensity P θ d p n ell upper a z * likelihoodScore (vtDensity P θ d p n ell upper) (vtDensityDeriv P θ d p n ell upper) a z ^ 2) (transcriptReferenceMeasure P n)
Proof (Lean source)
lemma integrable_vtLikelihoodFisher_section {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ d : TrialParameter) (p ell upper a : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hinterior : ∀ a ∈ Icc ell upper, InteriorMeans (parameterPath θ d a)) : Integrable (fun z => vtDensity P θ d p n ell upper a z * likelihoodScore (vtDensity P θ d p n ell upper) (vtDensityDeriv P θ d p n ell upper) a z ^ 2) (transcriptReferenceMeasure P n) := by by_cases ha : a ∈ Icc ell upper · let η := parameterPath θ d a let q := transcriptMixtureRealDensity P η p n let score := conditionalTranscriptDirectionalScore P η d p n have hη := hinterior a ha have hs : Integrable (fun z => score z ^ 2) (transcriptLaw P η p n) := (conditionalTranscriptDirectionalScore_memLp_two P η d p n hp hη).integrable_sq rw [← transcriptLaw_eq_withDensity_mixture P η p n hp hη] at hs have hs' := (integrable_withDensity_iff_integrable_smul' (measurable_transcriptMixtureRealDensity P η p n).ennreal_ofReal (Filter.Eventually.of_forall fun _ => ENNReal.ofReal_lt_top)).mp hs convert hs' using 1 funext z rw [likelihoodScore_vtDensity_eq_transcriptScore P θ d p ell upper a n hp hη ha z] have hq := transcriptMixtureRealDensity_nonneg P η p n hp hη z simp [vtDensity, ha, η, score, ENNReal.toReal_ofReal hq, smul_eq_mul] · simp [vtDensity, likelihoodScore, ha]
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_vtLikelihoodFisher_section · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLowerBound.lean:127
theorem scaledSelected_fisher_integrable_and_control

the scaled selected fisher integrable and control assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the scaled Selected fisher integrable and control.

Formal statement
Z :
ε :
ℝ
p R :
ℝ
hθ :
hε :
0 < ε
hR :
0 < R
n :
ℕ
hn :
0 < n
hinterior :
∀ a ∈ Icc (-R) R,
InteriorMeans (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n))
henvInt :
Integrable (fun a => sequentialVTPrior R a * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) (parameterMeasure (-R) R)
conclusion 1
Integrable (fun z : ℝ × Transcript (Z n) => sequentialVTPrior R z.1 * vtDensity P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R z.1 z.2 * (likelihoodScore (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) z.1 z.2) ^ 2) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))
conclusion 2
(∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) a ∂parameterMeasure (-R) R)
≤ sequentialPriorInformationEnvelope θ p ε R hp hθ hε n
Proof (Lean source)
lemma scaledSelected_fisher_integrable_and_control {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p R : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hR : 0 < R) (n : ℕ) (hn : 0 < n) (hinterior : ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n))) (henvInt : Integrable (fun a => sequentialVTPrior R a * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) (parameterMeasure (-R) R)) : Integrable (fun z : ℝ × Transcript (Z n) => sequentialVTPrior R z.1 * vtDensity P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R z.1 z.2 * (likelihoodScore (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) z.1 z.2) ^ 2) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n)) ∧ (∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) (direction (selectedDirection θ p ε hp hθ hε))) p n (-R) R) a ∂parameterMeasure (-R) R) ≤ sequentialPriorInformationEnvelope θ p ε R hp hθ hε n := by let v := direction (selectedDirection θ p ε hp hθ hε) let d := scaledDirection ((sqrt n)⁻¹) v let q := vtDensity P θ d p n (-R) R let dq := vtDensityDeriv P θ d p n (-R) R let w := sequentialVTPrior R let ν := transcriptReferenceMeasure P n let π := parameterMeasure (-R) R let F : ℝ × Transcript (Z n) → ℝ := fun z => w z.1 * q z.1 z.2 * (likelihoodScore q dq z.1 z.2) ^ 2 let env : ℝ → ℝ := fun a => upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε) let info : ℝ → ℝ := fun a => fisherInformation ν q dq a have hpath (a : ℝ) : parameterPath θ d a = parameterPath θ v (a / sqrt n) := by funext k simp [d, v, parameterPath, scaledDirection, div_eq_mul_inv] ring have hmeas := sequentialVanTreesProductMeasurable P θ d p R n hR (P.estimate n) (P.estimate_measurable n) have hFmeas : AEStronglyMeasurable F (π.prod ν) := by exact hmeas.fisherSq.aestronglyMeasurable have hFnonneg (z : ℝ × Transcript (Z n)) : 0 ≤ F z := by dsimp [F] exact mul_nonneg (mul_nonneg (sequentialVTPrior_facts hR |>.nonneg z.1) (vtDensity_nonneg P θ d p n (-R) R hp (by intro a ha exact hpath a ▸ hinterior a ha) z.1 z.2)) (sq_nonneg _) have hsection (a : ℝ) : Integrable (fun z => F (a, z)) ν := by have hs := integrable_vtLikelihoodFisher_section P θ d p (-R) R a n hp (by intro b hb exact hpath b ▸ hinterior b hb) exact (hs.const_mul (w a)).congr (Filter.Eventually.of_forall fun z => by dsimp [F] ring) let G : ℝ → ℝ := fun a => ∫ z, ‖F (a, z)‖ ∂ν have hGmeas : AEStronglyMeasurable G π := by exact hFmeas.norm.integral_prod_right' have hG_eq (a : ℝ) : G a = w a * info a := by calc G a = ∫ z, F (a, z) ∂ν := by apply integral_congr_ae filter_upwards with z rw [Real.norm_eq_abs, abs_of_nonneg (hFnonneg (a, z))] _ = w a * ∫ z, q a z * (likelihoodScore q dq a z) ^ 2 ∂ν := by rw [← integral_const_mul] apply integral_congr_ae filter_upwards with z dsimp [F] ring _ = w a * info a := rfl have hGInt : Integrable G π := by apply henvInt.mono' hGmeas have hmem : ∀ᵐ a ∂π, a ∈ Icc (-R) R := by dsimp [π, parameterMeasure] exact ae_restrict_mem measurableSet_Icc filter_upwards [hmem] with a ha rw [hG_eq, Real.norm_eq_abs, abs_of_nonneg (mul_nonneg (sequentialVTPrior_facts hR |>.nonneg a) (by dsimp [info] rw [fisherInformation_vtDensity_eq_transcriptScoreEnergy P θ d p (-R) R a n hp (by exact hpath a ▸ hinterior a ha) ha] exact integral_nonneg fun _ => sq_nonneg _))] exact mul_le_mul_of_nonneg_left (by dsimp [info, env] simpa [d, v] using fisherInformation_scaledSelected_le_upperEnvelope P θ p R a hp hθ hε n hn ha (hinterior a ha)) (sequentialVTPrior_facts hR |>.nonneg a) have hFInt : Integrable F (π.prod ν) := (integrable_prod_iff hFmeas).2 ⟨Filter.Eventually.of_forall hsection, hGInt⟩ constructor · simpa [F, π, ν, w, q, dq, d, v] using hFInt · have hweightedInt : Integrable (fun a => w a * info a) π := by exact hGInt.congr (Filter.Eventually.of_forall fun a => hG_eq a) calc (∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ d p n (-R) R) (vtDensityDeriv P θ d p n (-R) R) a ∂π) ≤ ∫ a, w a * env a ∂π := by apply integral_mono_ae (by simpa [w, info, q, dq, ν, d, v] using hweightedInt) (by simpa [w, env, π, v] using henvInt) have hmem : ∀ᵐ a ∂π, a ∈ Icc (-R) R := by dsimp [π, parameterMeasure] exact ae_restrict_mem measurableSet_Icc filter_upwards [hmem] with a ha exact mul_le_mul_of_nonneg_left (by dsimp [info, env, ν, q, dq, d, v] exact fisherInformation_scaledSelected_le_upperEnvelope P θ p R a hp hθ hε n hn ha (hinterior a ha)) (sequentialVTPrior_facts hR |>.nonneg a) _ = sequentialPriorInformationEnvelope θ p ε R hp hθ hε n := by rfl
CausalSmith.Stat.LdpAteEfficiencySurface.scaledSelected_fisher_integrable_and_control · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLowerBound.lean:159
theorem sequential_localAsymptoticRisk_lower_bound

Every sequentially private procedure has local asymptotic risk at least the stationary minimax reciprocal information. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the sequential local Asymptotic Risk lower bound.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
hε :
0 < ε
ofReal (Vstar θ p ε) ≤ localAsymptoticRisk P θ p
Proof (Lean source)
lemma sequential_localAsymptoticRisk_lower_bound {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : ofReal (Vstar θ p ε) ≤ localAsymptoticRisk P θ p := by let t := selectedDirection θ p ε hp hθ hε let v := direction t let normv := sqrt ((v 0) ^ 2 + (v 1) ^ 2) let H : ℝ → ℝ := fun R => R * normv let info : ℝ → ℕ → ℝ := fun R n => sequentialPriorInformationEnvelope θ p ε R hp hθ hε n have hnormv : 0 < normv := by have hsum : 0 < (v 0) ^ 2 + (v 1) ^ 2 := by dsimp [v] simp [direction] nlinarith [sq_nonneg t, sq_nonneg (t + 1)] exact Real.sqrt_pos.2 hsum have hH : ∀ R, 0 < R → 0 < H R := by intro R hR exact mul_pos hR hnormv have hinfo : ∀ R, 0 < R → Tendsto (info R) atTop (nhds (Jstar θ p ε)) := by intro R hR exact tendsto_sequentialPriorInformationEnvelope θ p ε R hp hθ hε hR have hlower : ∀ R, 0 < R → ∀ᶠ n : ℕ in atTop, ofReal (1 / (info R n + 40 / R ^ 2)) ≤ localWorstRisk P θ p (H R) n := by intro R hR have hinterior := eventually_parameterPath_compactScaled_interior θ v R hθ have henvInt := eventually_integrable_priorWeighted_upperEnvelope θ p ε R hp hθ hε hR filter_upwards [eventually_gt_atTop (0 : ℕ), hinterior, henvInt] with n hn hnInterior hnEnvInt have hcontrol := scaledSelected_fisher_integrable_and_control P θ p R hp hθ hε hR n hn hnInterior hnEnvInt have hpath (a : ℝ) : parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a = parameterPath θ v (a / sqrt n) := by funext k simp [parameterPath, scaledDirection, div_eq_mul_inv] ring have hactualInterior : ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a) := by intro a ha exact hpath a ▸ hnInterior a ha have havgNonneg : 0 ≤ ∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) a ∂parameterMeasure (-R) R := by apply integral_nonneg_of_ae have hmem : ∀ᵐ a ∂parameterMeasure (-R) R, a ∈ Icc (-R) R := by unfold parameterMeasure exact ae_restrict_mem measurableSet_Icc filter_upwards [hmem] with a ha apply mul_nonneg (sequentialVTPrior_facts hR |>.nonneg a) rw [fisherInformation_vtDensity_eq_transcriptScoreEnergy P θ (scaledDirection ((sqrt n)⁻¹) v) p (-R) R a n hp (hactualInterior a ha) ha] exact integral_nonneg fun _ => sq_nonneg _ have hinfoPos : 0 < priorInformation (-R) R (sequentialVTPrior R) (sequentialVTPriorDeriv R) + ∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) a ∂parameterMeasure (-R) R := by rw [(sequentialVTPrior_facts hR).information] have hprior : 0 < 40 / R ^ 2 := div_pos (by norm_num) (sq_pos_of_pos hR) linarith have hbound := ofReal_vanTreesEnvelope_le_localWorstRisk_of_fisher_control_allErrors P θ v p R (H R) (info R n) n hn hR hp hactualInterior (le_rfl : R * sqrt ((v 0) ^ 2 + (v 1) ^ 2) ≤ H R) hcontrol.1 hcontrol.2 hinfoPos have hcontrast : contrast v = 1 := by simpa [v, t] using contrast_selectedDirection θ p ε hp hθ hε simpa [hcontrast] using hbound have hrecip := inv_information_le_localAsymptoticRisk_of_priorRadius_family P θ p (Jstar θ p ε) H info (Jstar_pos_interior θ p ε hp hθ hε) hH hinfo hlower simpa [Vstar, one_div] using hrecip
CausalSmith.Stat.LdpAteEfficiencySurface.sequential_localAsymptoticRisk_lower_bound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialLowerBound.lean:312
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialMinimaxAssembly 5 declarations This file packages the elementary order-theoretic and pilot-rate steps used to assemble the sequential local asymptotic minimax theorem.

Structural assembly for sequential minimaxity

This file packages the elementary order-theoretic and pilot-rate steps used to assemble the sequential local asymptotic minimax theorem. In particular, the infimum argument only needs a universal risk lower bound and one regular procedure attaining that bound.

def regularProcedureRiskSet

The risks achieved by regular sequential procedures over arbitrary measurable output families. For the displayed inputs and conditions, the stated result follows. The regular Procedure Risk Set is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
regularProcedureRiskSet θ p ε :
Set ℝ≥0∞
{u | ∃ Z : OutputFamily, ∃ mZ : ∀ n i, MeasurableSpace (Z n i), letI := mZ ∃ P : ProcedureSequence Z ε, RegularProcedure P θ p ∧ u = localAsymptoticRisk P θ p}
CausalSmith.Stat.LdpAteEfficiencySurface.regularProcedureRiskSet · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialMinimaxAssembly.lean:20
theorem natSqrt_pilotRates

The integer square-root pilot simultaneously diverges and is sublinear. The stated result follows.

Formal statement
conclusion 1
conclusion 2
Proof (Lean source)
lemma natSqrt_pilotRates : PilotDiverges sqrt ∧ PilotSublinear sqrt := ⟨natSqrt_pilotDiverges, natSqrt_pilotSublinear⟩
theorem lowerBound_regularProcedureRiskSet

A universal lower bound for procedure risk is a lower bound for the risks of regular procedures. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε v :
ℝ
hlower :
∀ (Z : OutputFamily) [∀ n i, MeasurableSpace (Z n i)] (P : ProcedureSequence Z ε),
u ∈ regularProcedureRiskSet θ p ε :
ofReal v ≤ u
Proof (Lean source)
lemma lowerBound_regularProcedureRiskSet {θ : TrialParameter} {p ε v : ℝ} (hlower : ∀ (Z : OutputFamily) [∀ n i, MeasurableSpace (Z n i)] (P : ProcedureSequence Z ε), ofReal v ≤ localAsymptoticRisk P θ p) : ∀ u ∈ regularProcedureRiskSet θ p ε, ofReal v ≤ u := by rintro u ⟨Z, mZ, P, -, rfl⟩ let _ : ∀ n i, MeasurableSpace (Z n i) := mZ exact hlower Z P
CausalSmith.Stat.LdpAteEfficiencySurface.lowerBound_regularProcedureRiskSet · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialMinimaxAssembly.lean:35
theorem localAsymptoticRisk_mem_regularProcedureRiskSet

The risk of any displayed regular procedure belongs to the regular risk set. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
mZ :
∀ n i, MeasurableSpace (Z n i)
P :
hregular :
Proof (Lean source)
lemma localAsymptoticRisk_mem_regularProcedureRiskSet {θ : TrialParameter} {p ε : ℝ} (Z : OutputFamily) (mZ : ∀ n i, MeasurableSpace (Z n i)) (P : @ProcedureSequence Z mZ ε) (hregular : RegularProcedure P θ p) : localAsymptoticRisk P θ p ∈ regularProcedureRiskSet θ p ε := by refine ⟨Z, mZ, ?_⟩ let _ : ∀ n i, MeasurableSpace (Z n i) := mZ exact ⟨P, hregular, rfl⟩
CausalSmith.Stat.LdpAteEfficiencySurface.localAsymptoticRisk_mem_regularProcedureRiskSet · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialMinimaxAssembly.lean:46
theorem sInf_regularProcedureRiskSet_eq_of_lowerBound_of_attained

If every procedure has risk at least the target and one regular procedure attains it, then the infimum over regular risks equals the target. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε v :
ℝ
hlower :
∀ (Z : OutputFamily) [∀ n i, MeasurableSpace (Z n i)] (P : ProcedureSequence Z ε),
mZ :
∀ n i, MeasurableSpace (Z n i)
P :
hregular :
hattains :
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma sInf_regularProcedureRiskSet_eq_of_lowerBound_of_attained {θ : TrialParameter} {p ε v : ℝ} (hlower : ∀ (Z : OutputFamily) [∀ n i, MeasurableSpace (Z n i)] (P : ProcedureSequence Z ε), ofReal v ≤ localAsymptoticRisk P θ p) (Z : OutputFamily) (mZ : ∀ n i, MeasurableSpace (Z n i)) (P : @ProcedureSequence Z mZ ε) (hregular : RegularProcedure P θ p) (hattains : localAsymptoticRisk P θ p = ofReal v) : sInf (regularProcedureRiskSet θ p ε) = ofReal v := by apply le_antisymm · apply sInf_le rw [← hattains] exact localAsymptoticRisk_mem_regularProcedureRiskSet Z mZ P hregular · apply le_sInf exact lowerBound_regularProcedureRiskSet hlower
CausalSmith.Stat.LdpAteEfficiencySurface.sInf_regularProcedureRiskSet_eq_of_lowerBound_of_attained · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialMinimaxAssembly.lean:57
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialObservedKernel 7 declarations Observed kernels for finite IID latent inputs

Observed kernels for finite IID latent inputs

def observedStageMeasure

Average one private release row over the fresh IID four-cell input. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The observed Stage Measure is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
i :
Fin n
observedStageMeasure P θ p n i :
PrivateHistory (Z := Z n) i → Measure (Z n i)
fun h => ∑ j : Fin 4, ofReal (piTheta θ p j) • P.channel n i (j, h)
CausalSmith.Stat.LdpAteEfficiencySurface.observedStageMeasure · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialObservedKernel.lean:17
theorem measurable_observedStageMeasure

the measurable observed stage measure assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
i :
Fin n
Proof (Lean source)
lemma measurable_observedStageMeasure {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) (i : Fin n) : Measurable (observedStageMeasure P θ p n i) := by refine Measure.measurable_of_measurable_coe _ fun A hA => ?_ simp only [observedStageMeasure, Measure.finsetSum_apply, Measure.smul_apply, smul_eq_mul] exact Finset.measurable_fun_sum _ fun j _ => measurable_const.mul ((P.channel n i).measurable_coe hA |>.comp (measurable_const.prodMk measurable_id))
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_observedStageMeasure · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialObservedKernel.lean:25
def observedStageKernel

The observed next-output kernel. The unit coordinate matches the generic finite-horizon score API; the history is the released history only. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The observed Stage Kernel is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
i :
Fin n
observedStageKernel P θ p n i :
Kernel (Unit × History (Z n) i.val (le_of_lt i.isLt)) (Z n i)
(⟨observedStageMeasure P θ p n i, measurable_observedStageMeasure P θ p n i⟩ : Kernel (PrivateHistory (Z := Z n) i) (Z n i)).comap (fun uh => fsHistoryToPrivate i uh.2) ((measurable_fsHistoryToPrivate i).comp measurable_snd)
theorem observedStageKernel_apply

the observed stage kernel apply assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
i :
Fin n
uh :
Unit × History (Z n) i.val (le_of_lt i.isLt)
observedStageKernel P θ p n i uh
= ∑ j : Fin 4, ofReal (piTheta θ p j) • P.channel n i (j, fsHistoryToPrivate i uh.2)
Proof (Lean source)
lemma observedStageKernel_apply {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) (i : Fin n) (uh : Unit × History (Z n) i.val (le_of_lt i.isLt)) : observedStageKernel P θ p n i uh = ∑ j : Fin 4, ofReal (piTheta θ p j) • P.channel n i (j, fsHistoryToPrivate i uh.2) := by rfl
CausalSmith.Stat.LdpAteEfficiencySurface.observedStageKernel_apply · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialObservedKernel.lean:50
theorem observedStageKernel_isMarkov

the observed stage kernel is markov assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the observed Stage Kernel is Markov.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n :
ℕ
i :
Fin n
Proof (Lean source)
lemma observedStageKernel_isMarkov {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n : ℕ) (i : Fin n) : IsMarkovKernel (observedStageKernel P θ p n i) := by refine ⟨fun uh => ⟨?_⟩⟩ rw [observedStageKernel_apply] simp only [Measure.finsetSum_apply, Measure.smul_apply, smul_eq_mul] have hmarkov := (P.privacy n).1 i letI : IsMarkovKernel (P.channel n i) := hmarkov simp only [measure_univ, mul_one] rw [← ENNReal.ofReal_sum_of_nonneg] · rw [piTheta_sum_eq_one] norm_num · intro j _ exact (piTheta_pos_interior θ p hp hθ j).le
CausalSmith.Stat.LdpAteEfficiencySurface.observedStageKernel_isMarkov · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialObservedKernel.lean:61
def observedKernelFamily

Parameterize the observed release kernels along a local affine path. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The observed Kernel Family is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
u :
ℝ
observedKernelFamily P θ v p n u :
fun i => observedStageKernel P (parameterPath θ v u) p n i
CausalSmith.Stat.LdpAteEfficiencySurface.observedKernelFamily · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialObservedKernel.lean:82
theorem observedKernelFamily_isMarkov

the observed kernel family is markov assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
u :
ℝ
i :
Fin n
Proof (Lean source)
lemma observedKernelFamily_isMarkov {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (n : ℕ) (u : ℝ) (hu : InteriorMeans (parameterPath θ v u)) (i : Fin n) : IsMarkovKernel (observedKernelFamily P θ v p n u i) := observedStageKernel_isMarkov P _ p hp hu n i
CausalSmith.Stat.LdpAteEfficiencySurface.observedKernelFamily_isMarkov · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialObservedKernel.lean:90
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialObservedLaw 1 declarations This file marginalizes the finite IID four-cell input path and identifies the resulting transcript law with the law generated by the observed kernels.

Exact law of the observed sequential experiment

This file marginalizes the finite IID four-cell input path and identifies the resulting transcript law with the law generated by the observed kernels.

theorem transcriptLaw_eq_observedKernelLaw

Marginalizing the IID four-cell input path in the paper transcript law gives exactly the promoted finite-sequence law of the observed kernels. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
u :
ℝ
transcriptLaw P (parameterPath θ v u) p n
= law (observedKernelFamily P θ v p n) u
Proof (Lean source)
theorem transcriptLaw_eq_observedKernelLaw {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (n : ℕ) (u : ℝ) (hu : InteriorMeans (parameterPath θ v u)) : transcriptLaw P (parameterPath θ v u) p n = law (observedKernelFamily P θ v p n) u := by let θu := parameterPath θ v u have hQ (i : Fin n) : IsMarkovKernel (P.channel n i) := (P.privacy n).1 i have hdet (x : Fin n → Fin 4) : P.transcript n x = finiteSequenceTranscript (P.channel n) x := (P.factorizes n).eq_finiteSequenceTranscript hQ x unfold transcriptLaw simp_rw [hdet] unfold finiteSequenceTranscript simp_rw [← Measure.map_smul] rw [← Measure.map_finset_sum' measurable_fsTranscriptToTranscript.aemeasurable] change Measure.map fsTranscriptToTranscript (prefixMixtureLaw (finiteSequenceKernel (P.channel n)) θu p n le_rfl) = _ rw [prefixMixtureLaw_eq_observed P θu p hp hu n n le_rfl] unfold law observedKernelFamily dsimp only [θu] ext A hA rw [Measure.map_apply measurable_fsTranscriptToTranscript hA] congr 1
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw_eq_observedKernelLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialObservedLaw.lean:296
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialPastScoreIntegral 7 declarations This file rewrites the explicit prefix-mixture derivative from SequentialSuccessorDerivative as an integral of the prefix directional score against the actual prefix law.

The predecessor score in a successor event derivative

This file rewrites the explicit prefix-mixture derivative from SequentialSuccessorDerivative as an integral of the prefix directional score against the actual prefix law. It uses only finite-mixture domination and does not invoke score projection.

theorem integrable_transcriptPrefixMixtureRealDerivative_mul_successorRowKernelSection

The explicit prefix derivative remains integrable after multiplication by a measurable successor-row event section. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
a :
Fin 4
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
Proof (Lean source)
lemma integrable_transcriptPrefixMixtureRealDerivative_mul_successorRowKernelSection {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k + 1 ≤ n) (a : Fin 4) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) : Integrable (fun h => transcriptPrefixMixtureRealDerivative P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h) (transcriptPrefixReferenceMeasure P n k (le_of_succ_le hk)) := by let ν := transcriptPrefixReferenceMeasure P n k (le_of_succ_le hk) let μ (x : Fin n → Fin 4) := (P.transcript n x).map (transcriptPrefix (le_of_succ_le hk)) letI (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 letI (x : Fin n → Fin 4) : IsProbabilityMeasure (μ x) := by dsimp [μ] exact Measure.isProbabilityMeasure_map (measurable_transcriptPrefix (le_of_succ_le hk)).aemeasurable letI : IsFiniteMeasure ν := by dsimp [ν, transcriptPrefixReferenceMeasure] infer_instance have hac (x : Fin n → Fin 4) : μ x ≪ ν := by dsimp [μ, ν, transcriptPrefixReferenceMeasure] exact (transcriptComponent_ac_reference P n x).map (measurable_transcriptPrefix (le_of_succ_le hk)) have hcomponent (x : Fin n → Fin 4) : Integrable (fun h => transcriptPrefixComponentRealDensity P n k (le_of_succ_le hk) x h * successorRowKernelSection P n k hk a A h) ν := by have h := (integrable_toReal_rnDeriv_mul_iff (hac x)).2 (integrable_successorRowKernelSection_component P n k hk a A hA x) simpa [transcriptPrefixComponentRealDensity, μ, ν] using h unfold transcriptPrefixMixtureRealDerivative simp_rw [Finset.sum_mul] exact integrable_finsetSum _ fun x _ => by simpa only [mul_assoc] using (hcomponent x).const_mul (inputPathDirectionalDerivative θ v p x)
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_transcriptPrefixMixtureRealDerivative_mul_successorRowKernelSection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPastScoreIntegral.lean:22
theorem transcriptPrefixLaw_eq_withDensity_reference

A prefix law is its common reference measure weighted by its Radon--Nikodym derivative. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
(transcriptPrefixReferenceMeasure P n k hk).withDensity ((transcriptPrefixLaw P θ p n k hk).rnDeriv (transcriptPrefixReferenceMeasure P n k hk))
= transcriptPrefixLaw P θ p n k hk
Proof (Lean source)
lemma transcriptPrefixLaw_eq_withDensity_reference {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) : (transcriptPrefixReferenceMeasure P n k hk).withDensity ((transcriptPrefixLaw P θ p n k hk).rnDeriv (transcriptPrefixReferenceMeasure P n k hk)) = transcriptPrefixLaw P θ p n k hk := by letI : IsFiniteMeasure (transcriptPrefixReferenceMeasure P n k hk) := by unfold transcriptPrefixReferenceMeasure infer_instance letI : IsFiniteMeasure (transcriptPrefixLaw P θ p n k hk) := by unfold transcriptPrefixLaw infer_instance exact Measure.withDensity_rnDeriv_eq (transcriptPrefixLaw P θ p n k hk) (transcriptPrefixReferenceMeasure P n k hk) (transcriptPrefixLaw_ac_reference P θ p n k hk)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixLaw_eq_withDensity_reference · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPastScoreIntegral.lean:63
theorem conditionalTranscriptPrefixDirectionalScore_mul_density

Multiplying the guarded prefix score by the prefix density recovers the explicit real derivative density everywhere. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the conditional Transcript Prefix Directional Score mul density.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k ≤ n
h :
History (Z n) k hk
Proof (Lean source)
lemma conditionalTranscriptPrefixDirectionalScore_mul_density {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k ≤ n) (h : History (Z n) k hk) : transcriptPrefixMixtureRealDensity P θ p n k hk h * conditionalTranscriptPrefixDirectionalScore P θ v p n k hk h = transcriptPrefixMixtureRealDerivative P θ v p n k hk h := by rw [conditionalTranscriptPrefixDirectionalScore_eq_guarded P θ v p n k hk hp hθ h] split_ifs with hpos · field_simp · have hnonneg := transcriptPrefixMixtureRealDensity_nonneg P θ p n k hk hp hθ h have hz : transcriptPrefixMixtureRealDensity P θ p n k hk h = 0 := le_antisymm (le_of_not_gt hpos) hnonneg rw [hz, zero_mul, transcriptPrefixMixtureRealDerivative_eq_zero_of_density_eq_zero P θ v p n k hk hp hθ h hz]
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptPrefixDirectionalScore_mul_density · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPastScoreIntegral.lean:83
theorem predecessorRowEventDerivative_eq_integral_pastScore

The predecessor-row derivative is the integral of the actual prefix score times the bounded row-event section under the actual prefix law. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the predecessor Row Event Derivative eq integral past Score.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
a :
Fin 4
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
predecessorRowEventDerivative P θ v p n k hk a A
= ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk)
Proof (Lean source)
lemma predecessorRowEventDerivative_eq_integral_pastScore {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (a : Fin 4) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) : predecessorRowEventDerivative P θ v p n k hk a A = ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk) := by let ν := transcriptPrefixReferenceMeasure P n k (le_of_succ_le hk) let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) letI : IsFiniteMeasure ν := by dsimp [ν, transcriptPrefixReferenceMeasure] infer_instance letI : IsFiniteMeasure μ := by dsimp [μ, transcriptPrefixLaw] infer_instance rw [← transcriptPrefixLaw_eq_withDensity_reference P θ p n k (le_of_succ_le hk)] rw [integral_withDensity_eq_integral_toReal_smul (Measure.measurable_rnDeriv μ ν) (Measure.rnDeriv_lt_top μ ν)] unfold predecessorRowEventDerivative apply integral_congr_ae filter_upwards [transcriptPrefixDensity_toReal_ae_eq_mixture_of_interior P θ p n k (le_of_succ_le hk) hp hθ] with h hdensity rw [smul_eq_mul, hdensity] rw [← conditionalTranscriptPrefixDirectionalScore_mul_density P θ v p hp hθ n k (le_of_succ_le hk) h] ring
CausalSmith.Stat.LdpAteEfficiencySurface.predecessorRowEventDerivative_eq_integral_pastScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPastScoreIntegral.lean:106
theorem integrable_conditionalTranscriptPrefixDirectionalScore_mul_successorRowKernelSection

The past-score integrand used above is integrable under the actual prefix law. This is the integrability input needed by a subsequent projection or conditional-expectation uniqueness argument. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integrable conditional Transcript Prefix Directional Score mul successor Row Kernel Section.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
a :
Fin 4
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
Proof (Lean source)
lemma integrable_conditionalTranscriptPrefixDirectionalScore_mul_successorRowKernelSection {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (a : Fin 4) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) : Integrable (fun h => conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) := by let ν := transcriptPrefixReferenceMeasure P n k (le_of_succ_le hk) let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) letI : IsFiniteMeasure ν := by dsimp [ν, transcriptPrefixReferenceMeasure] infer_instance letI : IsFiniteMeasure μ := by dsimp [μ, transcriptPrefixLaw] infer_instance rw [← transcriptPrefixLaw_eq_withDensity_reference P θ p n k (le_of_succ_le hk)] rw [integrable_withDensity_iff_integrable_smul' (Measure.measurable_rnDeriv μ ν) (Measure.rnDeriv_lt_top μ ν)] have hderiv := integrable_transcriptPrefixMixtureRealDerivative_mul_successorRowKernelSection P θ v p n k hk a A hA refine hderiv.congr ?_ filter_upwards [transcriptPrefixDensity_toReal_ae_eq_mixture_of_interior P θ p n k (le_of_succ_le hk) hp hθ] with h hdensity rw [smul_eq_mul, hdensity, ← conditionalTranscriptPrefixDirectionalScore_mul_density P θ v p hp hθ n k (le_of_succ_le hk) h] ring
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_conditionalTranscriptPrefixDirectionalScore_mul_successorRowKernelSection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPastScoreIntegral.lean:144
theorem predecessorSuccessorEventDerivative_eq_sum_integral_pastScore

Summing the row identities with the base four-cell probabilities gives the complete predecessor contribution in the successor product rule. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the predecessor Successor Event Derivative eq sum integral past Score.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
= ∑ a : Fin 4, piTheta θ p a * ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk)
Proof (Lean source)
lemma predecessorSuccessorEventDerivative_eq_sum_integral_pastScore {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) : predecessorSuccessorEventDerivative θ p (fun a => predecessorRowEventDerivative P θ v p n k hk a A) = ∑ a : Fin 4, piTheta θ p a * ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk) := by unfold predecessorSuccessorEventDerivative apply Finset.sum_congr rfl intro a _ change piTheta θ p a * predecessorRowEventDerivative P θ v p n k hk a A = _ rw [predecessorRowEventDerivative_eq_integral_pastScore P θ v p hp hθ n k hk a A hA]
CausalSmith.Stat.LdpAteEfficiencySurface.predecessorSuccessorEventDerivative_eq_sum_integral_pastScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPastScoreIntegral.lean:184
theorem transcriptSuccessorLaw_pastScore_characterization

Paper-side successor characterization before score projection: the mapped successor law is the joint-channel output law, and every predecessor row derivative is represented by the integrable prefix-score kernel integral. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Successor Law past Score characterization.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
μ :
(transcriptPrefixLaw P θ p n (k + 1) hk).map (fun u => (init hk u, last hk u))
= outputLaw θ p (sequentialJointChannel P n (nextIndex hk) μ)
a :
Fin 4
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma transcriptSuccessorLaw_pastScore_characterization {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) : let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) (transcriptPrefixLaw P θ p n (k + 1) hk).map (fun u => (init hk u, last hk u)) = outputLaw θ p (sequentialJointChannel P n (nextIndex hk) μ) ∧ ∀ a : Fin 4, Integrable (fun h => conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h) μ ∧ predecessorRowEventDerivative P θ v p n k hk a A = ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h ∂μ := by dsimp only refine ⟨transcriptSuccessorLaw_eq_jointChannel P θ p hp hθ n k hk, ?_⟩ intro a exact ⟨ integrable_conditionalTranscriptPrefixDirectionalScore_mul_successorRowKernelSection P θ v p hp hθ n k hk a A hA, predecessorRowEventDerivative_eq_integral_pastScore P θ v p hp hθ n k hk a A hA⟩
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptSuccessorLaw_pastScore_characterization · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPastScoreIntegral.lean:208
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialPrefixDensity 13 declarations This file constructs explicit common references, densities, and directional derivative densities after projecting a full transcript to a finite prefix.

Dominated finite-mixture scores on transcript prefixes

This file constructs explicit common references, densities, and directional derivative densities after projecting a full transcript to a finite prefix. The identities are paper-side inputs for score projection and do not use a conditional expectation theorem.

def transcriptPrefixReferenceMeasure

the transcript prefix reference measure is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
ε :
ℝ
n k :
ℕ
hk :
k ≤ n
transcriptPrefixReferenceMeasure P n k hk :
Measure (History (Z n) k hk)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixReferenceMeasure · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:32
def transcriptPrefixLaw

the transcript prefix law is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The transcript Prefix Law is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
transcriptPrefixLaw P θ p n k hk :
Measure (History (Z n) k hk)
(transcriptLaw P θ p n).map (transcriptPrefix hk)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:39
def transcriptPrefixComponentRealDensity

the transcript prefix component real density is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
ε :
ℝ
n k :
ℕ
hk :
k ≤ n
x :
Fin n → Fin 4
h :
History (Z n) k hk
transcriptPrefixComponentRealDensity P n k hk x h :
ℝ
(((P.transcript n x).map (transcriptPrefix hk)).rnDeriv (transcriptPrefixReferenceMeasure P n k hk) h).toReal
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixComponentRealDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:46
def transcriptPrefixMixtureRealDensity

the transcript prefix mixture real density is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The transcript Prefix Mixture Real Density is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
h :
History (Z n) k hk
transcriptPrefixMixtureRealDensity P θ p n k hk h :
ℝ
∑ x : Fin n → Fin 4, inputPathProbability θ p x * transcriptPrefixComponentRealDensity P n k hk x h
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixMixtureRealDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:54
def transcriptPrefixMixtureRealDerivative

the transcript prefix mixture real derivative is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The transcript Prefix Mixture Real Derivative is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
h :
History (Z n) k hk
transcriptPrefixMixtureRealDerivative P θ v p n k hk h :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixMixtureRealDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:62
def conditionalTranscriptPrefixDirectionalScore

the conditional transcript prefix directional score is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The conditional Transcript Prefix Directional Score is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
h :
History (Z n) k hk
conditionalTranscriptPrefixDirectionalScore P θ v p n k hk h :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptPrefixDirectionalScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:70
theorem transcriptPrefixReferenceMeasure_eq_sum

the transcript prefix reference measure eq sum assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
n k :
ℕ
hk :
k ≤ n
= ∑ x : Fin n → Fin 4, (P.transcript n x).map (transcriptPrefix hk)
Proof (Lean source)
lemma transcriptPrefixReferenceMeasure_eq_sum {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n k : ℕ) (hk : k ≤ n) : transcriptPrefixReferenceMeasure P n k hk = ∑ x : Fin n → Fin 4, (P.transcript n x).map (transcriptPrefix hk) := by unfold transcriptPrefixReferenceMeasure transcriptReferenceMeasure exact map_finset_sum_measure (transcriptPrefix hk) (measurable_transcriptPrefix hk) univ _
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixReferenceMeasure_eq_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:78
theorem transcriptPrefixLaw_eq_sum

the transcript prefix law eq sum assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
transcriptPrefixLaw P θ p n k hk
= ∑ x : Fin n → Fin 4, ofReal (inputPathProbability θ p x) • (P.transcript n x).map (transcriptPrefix hk)
Proof (Lean source)
lemma transcriptPrefixLaw_eq_sum {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) : transcriptPrefixLaw P θ p n k hk = ∑ x : Fin n → Fin 4, ofReal (inputPathProbability θ p x) • (P.transcript n x).map (transcriptPrefix hk) := by unfold transcriptPrefixLaw transcriptLaw rw [map_finset_sum_measure (transcriptPrefix hk) (measurable_transcriptPrefix hk) univ] simp_rw [Measure.map_smul]
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixLaw_eq_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:88
theorem transcriptPrefixLaw_ac_reference

the transcript prefix law ac reference assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
Proof (Lean source)
lemma transcriptPrefixLaw_ac_reference {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) : transcriptPrefixLaw P θ p n k hk ≪ transcriptPrefixReferenceMeasure P n k hk := by rw [transcriptPrefixLaw_eq_sum, transcriptPrefixReferenceMeasure_eq_sum] apply Measure.AbsolutelyContinuous.mk intro A hA href simp only [Measure.coe_finsetSum, Finset.sum_apply] at href ⊢ apply Finset.sum_eq_zero intro x _ rw [Measure.smul_apply, smul_eq_mul] apply mul_eq_zero_of_right exact (Finset.sum_eq_zero_iff_of_nonneg (fun _ _ ↦ zero_le)).mp href x (Finset.mem_univ x)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixLaw_ac_reference · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:101
theorem transcriptPrefixDensity_toReal_ae_eq_mixture_of_interior

the transcript prefix density to real ae eq mixture of interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Prefix Density to Real ae eq mixture of interior.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
hθ :
(fun h => ((transcriptPrefixLaw P θ p n k hk).rnDeriv (transcriptPrefixReferenceMeasure P n k hk) h).toReal)
Proof (Lean source)
lemma transcriptPrefixDensity_toReal_ae_eq_mixture_of_interior {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : (fun h => ((transcriptPrefixLaw P θ p n k hk).rnDeriv (transcriptPrefixReferenceMeasure P n k hk) h).toReal) =ᵐ[ transcriptPrefixReferenceMeasure P n k hk] transcriptPrefixMixtureRealDensity P θ p n k hk := by classical let ν := transcriptPrefixReferenceMeasure P n k hk let μ (x : Fin n → Fin 4) := (P.transcript n x).map (transcriptPrefix hk) let w (x : Fin n → Fin 4) : ℝ≥0∞ := ofReal (inputPathProbability θ p x) letI (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 letI (x : Fin n → Fin 4) : IsProbabilityMeasure (μ x) := Measure.isProbabilityMeasure_map (measurable_transcriptPrefix hk).aemeasurable letI : IsFiniteMeasure ν := by dsimp [ν, transcriptPrefixReferenceMeasure] infer_instance have hw (x : Fin n → Fin 4) : w x ≠ ∞ := by simp [w] haveI (x : Fin n → Fin 4) : IsFiniteMeasure (w x • μ x) := (μ x).smul_finite (hw x) have hrn (t : Finset (Fin n → Fin 4)) : (t.sum fun x ↦ w x • μ x).rnDeriv ν =ᵐ[ν] fun h ↦ t.sum fun x ↦ w x * (μ x).rnDeriv ν h := by induction t using Finset.induction_on with | empty => filter_upwards [Measure.rnDeriv_zero ν] with h hh simpa using hh | @insert x t hx ih => haveI : IsFiniteMeasure (t.sum fun y ↦ w y • μ y) := inferInstance have hadd := Measure.rnDeriv_add (w x • μ x) (t.sum fun y ↦ w y • μ y) ν have hsmul := Measure.rnDeriv_smul_left_of_ne_top (μ x) ν (hw x) filter_upwards [hadd, hsmul, ih] with h hh ha hb simpa [Finset.sum_insert hx, Pi.add_apply, Pi.smul_apply, smul_eq_mul, ha, hb] using hh have hfinite : ∀ᵐ h ∂ν, ∀ x : Fin n → Fin 4, (μ x).rnDeriv ν h ≠ ∞ := by rw [Filter.eventually_all] intro x exact (Measure.rnDeriv_lt_top (μ x) ν).mono (fun _ hh ↦ ne_of_lt hh) filter_upwards [hrn univ, hfinite] with h hh hfin change ((transcriptPrefixLaw P θ p n k hk).rnDeriv ν h).toReal = transcriptPrefixMixtureRealDensity P θ p n k hk h rw [transcriptPrefixLaw_eq_sum P θ p n k hk] rw [hh, ENNReal.toReal_sum (fun x _ ↦ ENNReal.mul_ne_top (hw x) (hfin x))] simp [transcriptPrefixMixtureRealDensity, transcriptPrefixComponentRealDensity, μ, w, ν, ENNReal.toReal_mul, (inputPathProbability_pos_of_interior θ p hp hθ _).le]
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixDensity_toReal_ae_eq_mixture_of_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:119
theorem measurable_transcriptPrefixMixtureRealDensity

the measurable transcript prefix mixture real density assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
Proof (Lean source)
lemma measurable_transcriptPrefixMixtureRealDensity {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) : Measurable (transcriptPrefixMixtureRealDensity P θ p n k hk) := by unfold transcriptPrefixMixtureRealDensity transcriptPrefixComponentRealDensity exact Finset.measurable_fun_sum _ fun x _ ↦ measurable_const.mul (Measure.measurable_rnDeriv _ _).ennreal_toReal
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_transcriptPrefixMixtureRealDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:177
theorem measurable_transcriptPrefixMixtureRealDerivative

the measurable transcript prefix mixture real derivative assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
Proof (Lean source)
lemma measurable_transcriptPrefixMixtureRealDerivative {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) : Measurable (transcriptPrefixMixtureRealDerivative P θ v p n k hk) := by unfold transcriptPrefixMixtureRealDerivative transcriptPrefixComponentRealDensity exact Finset.measurable_fun_sum _ fun x _ ↦ measurable_const.mul (Measure.measurable_rnDeriv _ _).ennreal_toReal
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_transcriptPrefixMixtureRealDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:187
theorem transcriptPrefix_derivative_pushforward

the transcript prefix derivative pushforward assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k ≤ n
A :
Set (History (Z n) k hk)
hA :
∫ z in transcriptPrefix hk ⁻¹' A, transcriptMixtureRealDerivative P θ v p n z ∂transcriptReferenceMeasure P n
= ∫ h in A, transcriptPrefixMixtureRealDerivative P θ v p n k hk h ∂transcriptPrefixReferenceMeasure P n k hk
Proof (Lean source)
lemma transcriptPrefix_derivative_pushforward {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) (A : Set (History (Z n) k hk)) (hA : MeasurableSet A) : ∫ z in transcriptPrefix hk ⁻¹' A, transcriptMixtureRealDerivative P θ v p n z ∂transcriptReferenceMeasure P n = ∫ h in A, transcriptPrefixMixtureRealDerivative P θ v p n k hk h ∂transcriptPrefixReferenceMeasure P n k hk := by letI (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 letI (x : Fin n → Fin 4) : IsProbabilityMeasure ((P.transcript n x).map (transcriptPrefix hk)) := Measure.isProbabilityMeasure_map (measurable_transcriptPrefix hk).aemeasurable letI : IsFiniteMeasure (transcriptPrefixReferenceMeasure P n k hk) := by unfold transcriptPrefixReferenceMeasure infer_instance have hpac (x : Fin n → Fin 4) : (P.transcript n x).map (transcriptPrefix hk) ≪ transcriptPrefixReferenceMeasure P n k hk := by unfold transcriptPrefixReferenceMeasure exact (transcriptComponent_ac_reference P n x).map (measurable_transcriptPrefix hk) have hintFull (x : Fin n → Fin 4) : Integrable (transcriptComponentRealDensity P n x) (transcriptReferenceMeasure P n) := by have h := (integrable_toReal_rnDeriv_mul_iff (transcriptComponent_ac_reference P n x) (f := fun _ ↦ (1 : ℝ))).2 (integrable_const (1 : ℝ)) change Integrable (fun z ↦ ((P.transcript n x).rnDeriv (transcriptReferenceMeasure P n) z).toReal) (transcriptReferenceMeasure P n) simpa only [mul_one] using h have hintPrefix (x : Fin n → Fin 4) : Integrable (transcriptPrefixComponentRealDensity P n k hk x) (transcriptPrefixReferenceMeasure P n k hk) := by have h := (integrable_toReal_rnDeriv_mul_iff (hpac x) (f := fun _ ↦ (1 : ℝ))).2 (integrable_const (1 : ℝ)) change Integrable (fun z ↦ (((P.transcript n x).map (transcriptPrefix hk)).rnDeriv (transcriptPrefixReferenceMeasure P n k hk) z).toReal) (transcriptPrefixReferenceMeasure P n k hk) simpa only [mul_one] using h simp_rw [transcriptMixtureRealDerivative, transcriptPrefixMixtureRealDerivative] rw [integral_finset_sum _ (fun x _ ↦ ((hintFull x).const_mul _).integrableOn), integral_finset_sum _ (fun x _ ↦ ((hintPrefix x).const_mul _).integrableOn)] apply Finset.sum_congr rfl intro x _ rw [MeasureTheory.integral_const_mul, MeasureTheory.integral_const_mul] unfold transcriptComponentRealDensity transcriptPrefixComponentRealDensity rw [ Measure.setIntegral_toReal_rnDeriv (transcriptComponent_ac_reference P n x), Measure.setIntegral_toReal_rnDeriv (hpac x)] simp only [measureReal_def] rw [Measure.map_apply (measurable_transcriptPrefix hk) hA]
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefix_derivative_pushforward · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPrefixDensity.lean:198
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialPriorInformationEnvelope 8 declarations This file upgrades the local stationary-envelope limit to uniform convergence over the compact scalar prior and integrates that envelope against the exact normalized quartic prior used by the sequential van Trees argumen

Compact-prior sequential information envelope

This file upgrades the local stationary-envelope limit to uniform convergence over the compact scalar prior and integrates that envelope against the exact normalized quartic prior used by the sequential van Trees argument.

theorem parameterPath_compactScaled_eq_localAlternative

The inverse-root-sample parameter path agrees with the local alternative indexed by the corresponding scalar multiple of the direction. For the displayed inputs and conditions, the stated result follows.

Formal statement
a :
ℝ
n :
ℕ
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.parameterPath_compactScaled_eq_localAlternative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorInformationEnvelope.lean:23
theorem eventually_parameterPath_compactScaled_interior

A compact scalar family of inverse-root-sample paths is eventually contained in the interior parameter space. For the displayed inputs and conditions, the stated result follows. Under the stated assumptions, the eventually parameter Path compact Scaled interior.

Formal statement
R :
ℝ
hθ :
∀ᶠ n : ℕ in atTop, ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ v (a / sqrt n))
Proof (Lean source)
lemma eventually_parameterPath_compactScaled_interior (θ v : TrialParameter) (R : ℝ) (hθ : InteriorMeans θ) : ∀ᶠ n : ℕ in atTop, ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ v (a / sqrt n)) := by let H := R * sqrt ((v 0) ^ 2 + (v 1) ^ 2) have hev := eventually_localAlternative_interior_uniform θ H hθ refine hev.mono ?_ intro n hn a ha rw [parameterPath_compactScaled_eq_localAlternative] exact hn (scaledDirection a v) (scaledDirection_mem_cover v ha)
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_parameterPath_compactScaled_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorInformationEnvelope.lean:33
theorem tendstoUniformlyOn_upperEnvelope_compactScaled_selectedDirection

The selected stationary information envelope converges uniformly over a fixed compact scalar family of inverse-root-sample local paths. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the tendsto Uniformly On upper Envelope compact Scaled selected Direction.

Formal statement
p ε R :
ℝ
hθ :
hε :
0 < ε
TendstoUniformlyOn (fun (n : ℕ) a => upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) (fun _ => Jstar θ p ε) atTop (Icc (-R) R)
Proof (Lean source)
lemma tendstoUniformlyOn_upperEnvelope_compactScaled_selectedDirection (θ : TrialParameter) (p ε R : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : TendstoUniformlyOn (fun (n : ℕ) a => upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) (fun _ => Jstar θ p ε) atTop (Icc (-R) R) := by rw [Metric.tendstoUniformlyOn_iff] intro δ hδ let v := direction (selectedDirection θ p ε hp hθ hε) let Θ := {η : TrialParameter // InteriorMeans η} let θsub : Θ := ⟨θ, hθ⟩ have hc := (continuous_upperEnvelope_interior p ε (selectedDirection θ p ε hp hθ hε) hp hε.le).continuousAt (x := θsub) obtain ⟨r, hr, hcontrol⟩ := (Metric.continuousAt_iff.mp hc) δ hδ let H := R * sqrt ((v 0) ^ 2 + (v 1) ^ 2) have hevDist := eventually_localAlternative_dist_lt_uniform θ H r hr have hevInterior := eventually_localAlternative_interior_uniform θ H hθ refine (hevDist.and hevInterior).mono ?_ intro n hn a ha rcases hn with ⟨hdist, hinterior⟩ have hcover : sqrt (((scaledDirection a v) 0) ^ 2 + ((scaledDirection a v) 1) ^ 2) ≤ H := scaledDirection_mem_cover v ha have heq : parameterPath θ v (a / sqrt n) = localAlternative θ (scaledDirection a v) n := parameterPath_compactScaled_eq_localAlternative θ v a n have hη : InteriorMeans (parameterPath θ v (a / sqrt n)) := by rw [heq] exact hinterior (scaledDirection a v) hcover have hclose : dist (parameterPath θ v (a / sqrt n)) θ < r := by rw [heq] exact hdist (scaledDirection a v) hcover have hsubclose : dist (⟨parameterPath θ v (a / sqrt n), hη⟩ : Θ) θsub < r := by change dist (parameterPath θ v (a / sqrt n)) θ < r exact hclose have hout := hcontrol (x := (⟨parameterPath θ v (a / sqrt n), hη⟩ : Θ)) hsubclose simpa [v, θsub, upperEnvelope_selectedDirection θ p ε hp hθ hε, dist_comm] using hout
CausalSmith.Stat.LdpAteEfficiencySurface.tendstoUniformlyOn_upperEnvelope_compactScaled_selectedDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorInformationEnvelope.lean:47
def sequentialPriorInformationEnvelope

The prior-averaged per-sample stationary information envelope. The sequential Prior Information Envelope is determined by the displayed parameters.

Definition (Lean source)
p ε R :
ℝ
hθ :
hε :
0 < ε
n :
ℕ
sequentialPriorInformationEnvelope θ p ε R hp hθ hε n :
ℝ
∫ a, sequentialVTPrior R a * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε) ∂parameterMeasure (-R) R
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialPriorInformationEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorInformationEnvelope.lean:96
theorem aestronglyMeasurable_priorWeighted_upperEnvelope

Once the compact path lies in the interior, its selected envelope is continuous on the scalar interval and hence measurable for the prior measure. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the aestrongly Measurable prior Weighted upper Envelope.

Formal statement
p ε R :
ℝ
hθ :
hε :
0 < ε
hR :
0 < R
n :
ℕ
hinterior :
∀ a ∈ Icc (-R) R,
InteriorMeans (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n))
AEStronglyMeasurable (fun a => sequentialVTPrior R a * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) (parameterMeasure (-R) R)
Proof (Lean source)
lemma aestronglyMeasurable_priorWeighted_upperEnvelope (θ : TrialParameter) (p ε R : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hR : 0 < R) (n : ℕ) (hinterior : ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n))) : AEStronglyMeasurable (fun a => sequentialVTPrior R a * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) (parameterMeasure (-R) R) := by let v := direction (selectedDirection θ p ε hp hθ hε) let Θ := {η : TrialParameter // InteriorMeans η} let path : ℝ → TrialParameter := fun a => parameterPath θ v (a / sqrt n) let pathSub : ↥(Icc (-R) R) → Θ := fun a => ⟨path a.1, hinterior a.1 a.2⟩ have hpath : Continuous path := by apply continuous_pi intro k dsimp [path, parameterPath] exact continuous_const.add ((continuous_id.div_const _).mul continuous_const) have hpathSub : Continuous pathSub := by apply Continuous.subtype_mk exact hpath.comp continuous_subtype_val have henv : Continuous fun a : ↥(Icc (-R) R) => upperEnvelope (pathSub a).1 p ε (selectedDirection θ p ε hp hθ hε) := (continuous_upperEnvelope_interior p ε (selectedDirection θ p ε hp hθ hε) hp hε.le).comp hpathSub have henvOn : ContinuousOn (fun a => upperEnvelope (path a) p ε (selectedDirection θ p ε hp hθ hε)) (Icc (-R) R) := by rw [continuousOn_iff_continuous_domRestrict] change Continuous (fun a : ↥(Icc (-R) R) => upperEnvelope (path a.1) p ε (selectedDirection θ p ε hp hθ hε)) simpa only [pathSub] using henv have hprior : Continuous (sequentialVTPrior R) := by unfold sequentialVTPrior exact (smoothPrior_contDiff (by linarith)).continuous unfold parameterMeasure exact (hprior.continuousOn.mul henvOn).aestronglyMeasurable measurableSet_Icc
CausalSmith.Stat.LdpAteEfficiencySurface.aestronglyMeasurable_priorWeighted_upperEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorInformationEnvelope.lean:109
theorem eventually_integrable_priorWeighted_upperEnvelope

For all sufficiently large sample sizes, the prior-weighted stationary information envelope is integrable under the compact parameter measure. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the eventually integrable prior Weighted upper Envelope.

Formal statement
p ε R :
ℝ
hθ :
hε :
0 < ε
hR :
0 < R
∀ᶠ n : ℕ in atTop, Integrable (fun a => sequentialVTPrior R a * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) (parameterMeasure (-R) R)
Proof (Lean source)
lemma eventually_integrable_priorWeighted_upperEnvelope (θ : TrialParameter) (p ε R : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hR : 0 < R) : ∀ᶠ n : ℕ in atTop, Integrable (fun a => sequentialVTPrior R a * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) (parameterMeasure (-R) R) := by let v := direction (selectedDirection θ p ε hp hθ hε) let F : ℕ → ℝ → ℝ := fun n a => sequentialVTPrior R a * upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε) let B : ℝ → ℝ := fun a => (|Jstar θ p ε| + 1) * sequentialVTPrior R a have hpriorInt : Integrable (sequentialVTPrior R) (parameterMeasure (-R) R) := by unfold sequentialVTPrior exact smoothPrior_integrable_parameterMeasure (by linarith) have hBint : Integrable B (parameterMeasure (-R) R) := by exact hpriorInt.const_mul (|Jstar θ p ε| + 1) have hu := tendstoUniformlyOn_upperEnvelope_compactScaled_selectedDirection θ p ε R hp hθ hε rw [Metric.tendstoUniformlyOn_iff] at hu have hclose := hu 1 zero_lt_one have hinterior := eventually_parameterPath_compactScaled_interior θ v R hθ refine (hclose.and hinterior).mono ?_ intro n hn rcases hn with ⟨hnclose, hninterior⟩ have hmeas : AEStronglyMeasurable (F n) (parameterMeasure (-R) R) := by exact aestronglyMeasurable_priorWeighted_upperEnvelope θ p ε R hp hθ hε hR n hninterior apply hBint.mono' hmeas have hmem : ∀ᵐ a ∂parameterMeasure (-R) R, a ∈ Icc (-R) R := by unfold parameterMeasure exact ae_restrict_mem measurableSet_Icc filter_upwards [hmem] with a ha have henv : |upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)| < |Jstar θ p ε| + 1 := by have hd := hnclose a ha rw [Real.dist_eq] at hd calc |upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)| = |Jstar θ p ε + (upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε) - Jstar θ p ε)| := by congr 1 ring _ ≤ |Jstar θ p ε| + |upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε) - Jstar θ p ε| := abs_add_le _ _ _ < |Jstar θ p ε| + 1 := by rw [abs_sub_comm] linarith have hpriorNonneg := (sequentialVTPrior_facts hR).nonneg a dsimp [F, B] rw [abs_mul, abs_of_nonneg hpriorNonneg] simpa [mul_comm] using (mul_le_mul_of_nonneg_left henv.le hpriorNonneg)
CausalSmith.Stat.LdpAteEfficiencySurface.eventually_integrable_priorWeighted_upperEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorInformationEnvelope.lean:161
theorem integral_priorWeighted_le_nat_mul_sequentialPriorInformationEnvelope

A pointwise compact-prior Fisher bound by n times the stationary envelope integrates to n times the per-sample prior information envelope. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integral prior Weighted le nat mul sequential Prior Information Envelope.

Formal statement
p ε R :
ℝ
hθ :
hε :
0 < ε
hR :
0 < R
n :
ℕ
f :
ℝ → ℝ
hfInt :
Integrable (fun a => sequentialVTPrior R a * f a) (parameterMeasure (-R) R)
henvInt :
Integrable (fun a => sequentialVTPrior R a * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) (parameterMeasure (-R) R)
hle :
∀ a ∈ Icc (-R) R,
f a
≤ (n : ℝ) * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)
(∫ a, sequentialVTPrior R a * f a ∂parameterMeasure (-R) R)
≤ (n : ℝ) * sequentialPriorInformationEnvelope θ p ε R hp hθ hε n
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma integral_priorWeighted_le_nat_mul_sequentialPriorInformationEnvelope (θ : TrialParameter) (p ε R : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hR : 0 < R) (n : ℕ) (f : ℝ → ℝ) (hfInt : Integrable (fun a => sequentialVTPrior R a * f a) (parameterMeasure (-R) R)) (henvInt : Integrable (fun a => sequentialVTPrior R a * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) (parameterMeasure (-R) R)) (hle : ∀ a ∈ Icc (-R) R, f a ≤ (n : ℝ) * upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)) : (∫ a, sequentialVTPrior R a * f a ∂parameterMeasure (-R) R) ≤ (n : ℝ) * sequentialPriorInformationEnvelope θ p ε R hp hθ hε n := by let env : ℝ → ℝ := fun a => upperEnvelope (parameterPath θ (direction (selectedDirection θ p ε hp hθ hε)) (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε) have hrightInt : Integrable (fun a => sequentialVTPrior R a * ((n : ℝ) * env a)) (parameterMeasure (-R) R) := by convert henvInt.const_mul (n : ℝ) using 1 funext a ring calc (∫ a, sequentialVTPrior R a * f a ∂parameterMeasure (-R) R) ≤ ∫ a, sequentialVTPrior R a * ((n : ℝ) * env a) ∂parameterMeasure (-R) R := by apply integral_mono_ae hfInt hrightInt have hmem : ∀ᵐ a ∂parameterMeasure (-R) R, a ∈ Icc (-R) R := by unfold parameterMeasure exact ae_restrict_mem measurableSet_Icc filter_upwards [hmem] with a ha exact mul_le_mul_of_nonneg_left (hle a ha) ((sequentialVTPrior_facts hR).nonneg a) _ = (n : ℝ) * sequentialPriorInformationEnvelope θ p ε R hp hθ hε n := by rw [show (fun a => sequentialVTPrior R a * ((n : ℝ) * env a)) = fun a => (n : ℝ) * (sequentialVTPrior R a * env a) by funext a ring] rw [integral_const_mul] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.integral_priorWeighted_le_nat_mul_sequentialPriorInformationEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorInformationEnvelope.lean:232
theorem tendsto_sequentialPriorInformationEnvelope

The normalized compact-prior average of the selected per-sample envelope converges to the least-favorable stationary information Jstar. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the tendsto sequential Prior Information Envelope.

Formal statement
p ε R :
ℝ
hθ :
hε :
0 < ε
hR :
0 < R
Tendsto (sequentialPriorInformationEnvelope θ p ε R hp hθ hε) atTop (nhds (Jstar θ p ε))
Proof (Lean source)
lemma tendsto_sequentialPriorInformationEnvelope (θ : TrialParameter) (p ε R : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) (hR : 0 < R) : Tendsto (sequentialPriorInformationEnvelope θ p ε R hp hθ hε) atTop (nhds (Jstar θ p ε)) := by let v := direction (selectedDirection θ p ε hp hθ hε) let F : ℕ → ℝ → ℝ := fun n a => sequentialVTPrior R a * upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε) let limit : ℝ → ℝ := fun a => sequentialVTPrior R a * Jstar θ p ε let B : ℝ → ℝ := fun a => (|Jstar θ p ε| + 1) * sequentialVTPrior R a have hpriorInt : Integrable (sequentialVTPrior R) (parameterMeasure (-R) R) := by unfold sequentialVTPrior exact smoothPrior_integrable_parameterMeasure (by linarith) have hBint : Integrable B (parameterMeasure (-R) R) := hpriorInt.const_mul (|Jstar θ p ε| + 1) have hu := tendstoUniformlyOn_upperEnvelope_compactScaled_selectedDirection θ p ε R hp hθ hε have huMetric := Metric.tendstoUniformlyOn_iff.mp hu have hclose := huMetric 1 zero_lt_one have hinterior := eventually_parameterPath_compactScaled_interior θ v R hθ have hmeas : ∀ᶠ n : ℕ in atTop, AEStronglyMeasurable (F n) (parameterMeasure (-R) R) := by refine hinterior.mono ?_ intro n hn exact aestronglyMeasurable_priorWeighted_upperEnvelope θ p ε R hp hθ hε hR n hn have hmem : ∀ᵐ a ∂parameterMeasure (-R) R, a ∈ Icc (-R) R := by unfold parameterMeasure exact ae_restrict_mem measurableSet_Icc have hbound : ∀ᶠ n : ℕ in atTop, ∀ᵐ a ∂parameterMeasure (-R) R, ‖F n a‖ ≤ B a := by refine hclose.mono ?_ intro n hn filter_upwards [hmem] with a ha have henv : |upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)| ≤ |Jstar θ p ε| + 1 := by have hd := hn a ha rw [Real.dist_eq] at hd calc |upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε)| = |Jstar θ p ε + (upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε) - Jstar θ p ε)| := by congr 1 ring _ ≤ |Jstar θ p ε| + |upperEnvelope (parameterPath θ v (a / sqrt n)) p ε (selectedDirection θ p ε hp hθ hε) - Jstar θ p ε| := abs_add_le _ _ _ ≤ |Jstar θ p ε| + 1 := by rw [abs_sub_comm] linarith have hpriorNonneg := (sequentialVTPrior_facts hR).nonneg a dsimp [F, B] rw [abs_mul, abs_of_nonneg hpriorNonneg] simpa [mul_comm] using (mul_le_mul_of_nonneg_left henv hpriorNonneg) have hlim : ∀ᵐ a ∂parameterMeasure (-R) R, Tendsto (fun n => F n a) atTop (nhds (limit a)) := by filter_upwards [hmem] with a ha exact (hu.tendsto_at ha).const_mul (sequentialVTPrior R a) have hIntegral := tendsto_integral_filter_of_dominated_convergence B hmeas hbound hBint hlim have hlimitIntegral : ∫ a, limit a ∂parameterMeasure (-R) R = Jstar θ p ε := by dsimp [limit] rw [integral_mul_const, (sequentialVTPrior_facts hR).normalized, one_mul] rw [hlimitIntegral] at hIntegral change Tendsto (fun n => sequentialPriorInformationEnvelope θ p ε R hp hθ hε n) atTop (nhds (Jstar θ p ε)) simpa only [sequentialPriorInformationEnvelope, F, v] using hIntegral
CausalSmith.Stat.LdpAteEfficiencySurface.tendsto_sequentialPriorInformationEnvelope · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorInformationEnvelope.lean:292
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialPriorRadiusLimit 3 declarations This file separates the two limits in a local van Trees argument.

Sequential removal of the van Trees prior-radius penalty

This file separates the two limits in a local van Trees argument. At a fixed prior radius R, the prior Fisher-information term 40 / R ^ 2 remains after the sample-size limit. Only after transferring that fixed-radius bound to the local asymptotic risk may one send R to infinity.

theorem tendsto_inv_info_add_priorRadius

At fixed positive prior radius, convergence of the experiment information gives convergence of the full reciprocal denominator, including the prior information term. For the displayed inputs and conditions, the stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
info :
ℕ → ℝ
I R :
ℝ
hI :
0 < I
hinfo :
Tendsto info atTop (nhds I)
Tendsto (fun n => 1 / (info n + 40 / R ^ 2)) atTop (nhds (1 / (I + 40 / R ^ 2)))
Proof (Lean source)
lemma tendsto_inv_info_add_priorRadius (info : ℕ → ℝ) (I R : ℝ) (hI : 0 < I) (hinfo : Tendsto info atTop (nhds I)) : Tendsto (fun n => 1 / (info n + 40 / R ^ 2)) atTop (nhds (1 / (I + 40 / R ^ 2))) := by have hdenom : Tendsto (fun n => info n + 40 / R ^ 2) atTop (nhds (I + 40 / R ^ 2)) := hinfo.add tendsto_const_nhds have hdenom_ne : I + 40 / R ^ 2 ≠ 0 := by have hprior : 0 ≤ 40 / R ^ 2 := div_nonneg (by norm_num) (sq_nonneg R) exact ne_of_gt (hI.trans_le (le_add_of_nonneg_right hprior)) exact tendsto_const_nhds.div hdenom hdenom_ne
CausalSmith.Stat.LdpAteEfficiencySurface.tendsto_inv_info_add_priorRadius · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorRadiusLimit.lean:20
theorem priorRadius_bound_le_localAsymptoticRisk

A finite-sample lower bound with a fixed prior radius first yields the corresponding penalized reciprocal-information local asymptotic bound. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p H :
ℝ
hH :
0 < H
info :
ℕ → ℝ
I R :
ℝ
hI :
0 < I
hinfo :
Tendsto info atTop (nhds I)
hlower :
∀ᶠ n : ℕ in atTop, ofReal (1 / (info n + 40 / R ^ 2)) ≤ localWorstRisk P θ p H n
ofReal (1 / (I + 40 / R ^ 2)) ≤ localAsymptoticRisk P θ p
Proof (Lean source)
lemma priorRadius_bound_le_localAsymptoticRisk {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p H : ℝ) (hH : 0 < H) (info : ℕ → ℝ) (I R : ℝ) (hI : 0 < I) (hinfo : Tendsto info atTop (nhds I)) (hlower : ∀ᶠ n : ℕ in atTop, ofReal (1 / (info n + 40 / R ^ 2)) ≤ localWorstRisk P θ p H n) : ofReal (1 / (I + 40 / R ^ 2)) ≤ localAsymptoticRisk P θ p := by exact ofReal_le_localAsymptoticRisk_of_bayes_envelope P θ p H hH _ _ (tendsto_inv_info_add_priorRadius info I R hI hinfo) hlower
CausalSmith.Stat.LdpAteEfficiencySurface.priorRadius_bound_le_localAsymptoticRisk · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorRadiusLimit.lean:36
theorem inv_information_le_localAsymptoticRisk_of_priorRadius_family

Correct two-step assembly for a family of finite-sample van Trees bounds. Under the stated assumptions, the inv information le local Asymptotic Risk of prior Radius family.

Formal statement
Z :
ε :
ℝ
p I :
ℝ
H :
ℝ → ℝ
info :
ℝ → ℕ → ℝ
hI :
0 < I
hH :
∀ R
if
0 < R
then
0 < H R
hinfo :
∀ R
if
0 < R
then
Tendsto (info R) atTop (nhds I)
hlower :
∀ R
if
0 < R
then
∀ᶠ n : ℕ in atTop, ofReal (1 / (info R n + 40 / R ^ 2))
≤ localWorstRisk P θ p (H R) n
ofReal (1 / I) ≤ localAsymptoticRisk P θ p
Proof (Lean source)
lemma inv_information_le_localAsymptoticRisk_of_priorRadius_family {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p I : ℝ) (H : ℝ → ℝ) (info : ℝ → ℕ → ℝ) (hI : 0 < I) (hH : ∀ R, 0 < R → 0 < H R) (hinfo : ∀ R, 0 < R → Tendsto (info R) atTop (nhds I)) (hlower : ∀ R, 0 < R → ∀ᶠ n : ℕ in atTop, ofReal (1 / (info R n + 40 / R ^ 2)) ≤ localWorstRisk P θ p (H R) n) : ofReal (1 / I) ≤ localAsymptoticRisk P θ p := by let radius : ℕ → ℝ := fun k => (k : ℝ) + 1 have hradius_pos (k : ℕ) : 0 < radius k := by dsimp [radius] positivity have hfixed (k : ℕ) : ofReal (1 / (I + 40 / (radius k) ^ 2)) ≤ localAsymptoticRisk P θ p := priorRadius_bound_le_localAsymptoticRisk P θ p (H (radius k)) (hH _ (hradius_pos k)) (info (radius k)) I (radius k) hI (hinfo _ (hradius_pos k)) (hlower _ (hradius_pos k)) have hinv_radius : Tendsto (fun k : ℕ => 1 / radius k) atTop (nhds 0) := by simpa only [radius] using (tendsto_one_div_add_atTop_nhds_zero_nat : Tendsto (fun k : ℕ => (1 : ℝ) / ((k : ℝ) + 1)) atTop (nhds 0)) have hinv_radius' : Tendsto (fun k : ℕ => (radius k)⁻¹) atTop (nhds 0) := by simpa only [one_div] using hinv_radius have hprior : Tendsto (fun k : ℕ => 40 / (radius k) ^ 2) atTop (nhds 0) := by simpa [div_eq_mul_inv, inv_pow] using (tendsto_const_nhds.mul (hinv_radius'.pow 2) : Tendsto (fun k : ℕ => (40 : ℝ) * ((radius k)⁻¹) ^ 2) atTop (nhds ((40 : ℝ) * 0 ^ 2))) have hrecip : Tendsto (fun k : ℕ => 1 / (I + 40 / (radius k) ^ 2)) atTop (nhds (1 / I)) := by have hone : Tendsto (fun _ : ℕ => (1 : ℝ)) atTop (nhds 1) := tendsto_const_nhds have hdenom : Tendsto (fun k : ℕ => I + 40 / (radius k) ^ 2) atTop (nhds I) := by simpa only [add_zero] using tendsto_const_nhds.add hprior change Tendsto ((fun _ : ℕ => (1 : ℝ)) / (fun k : ℕ => I + 40 / (radius k) ^ 2)) atTop (nhds (1 / I)) exact hone.div hdenom (ne_of_gt hI) have hofReal : Tendsto (fun k : ℕ => ofReal (1 / (I + 40 / (radius k) ^ 2))) atTop (nhds (ofReal (1 / I))) := ENNReal.continuous_ofReal.continuousAt.tendsto.comp hrecip exact le_of_tendsto' hofReal hfixed
CausalSmith.Stat.LdpAteEfficiencySurface.inv_information_le_localAsymptoticRisk_of_priorRadius_family · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialPriorRadiusLimit.lean:51
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialScore 19 declarations This file differentiates the finite latent-input mixture against the common transcript reference measure.

Directional scores for finite sequential transcript mixtures

This file differentiates the finite latent-input mixture against the common transcript reference measure. It identifies the complete-data input-path score and the induced conditional transcript score pointwise.

def parameterPath

For the supplied quantities and conditions, the parameter path is the mathematical object specified below. The parameter Path is determined by the displayed parameters.

Definition (Lean source)
u :
ℝ
parameterPath θ v u :
fun k ↦ θ k + u * v k
def inputDirectionalDerivative

For the supplied quantities and conditions, the input directional derivative is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
p :
ℝ
j :
Fin 4
inputDirectionalDerivative p v j :
ℝ
∑ k : Fin 2, inputDerivative p j k * v k
CausalSmith.Stat.LdpAteEfficiencySurface.inputDirectionalDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:24
theorem piTheta_by_val_score

Under the supplied quantities and conditions, the pi theta by val score assertion holds.

Formal statement
p :
ℝ
j :
Fin 4
piTheta θ p j
= if j.val = 0 then controlProb p * (1 - θ 0) else if j.val = 1 then controlProb p * θ 0 else if j.val = 2 then p * (1 - θ 1) else p * θ 1
Proof (Lean source)
lemma piTheta_by_val_score (θ : TrialParameter) (p : ℝ) (j : Fin 4) : piTheta θ p j = if j.val = 0 then controlProb p * (1 - θ 0) else if j.val = 1 then controlProb p * θ 0 else if j.val = 2 then p * (1 - θ 1) else p * θ 1 := by rcases j with ⟨j, hj⟩ interval_cases j <;> rfl
CausalSmith.Stat.LdpAteEfficiencySurface.piTheta_by_val_score · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:29
theorem piTheta_pos_of_interior

Under the supplied quantities and conditions, the pi theta pos of interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pi Theta pos of interior.

Formal statement
p :
ℝ
hθ :
j :
Fin 4
0 < piTheta θ p j
Proof (Lean source)
lemma piTheta_pos_of_interior (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (j : Fin 4) : 0 < piTheta θ p j := by rcases hp with ⟨hp0, hp1⟩ rcases hθ with ⟨h00, h01, h10, h11⟩ rw [piTheta_by_val_score] rcases j with ⟨j, hj⟩ interval_cases j <;> simp +decide only [Fin.isValue, ↓reduceIte, controlProb] <;> nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.piTheta_pos_of_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:39
theorem inputPathProbability_pos_of_interior

the input path probability pos of interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the input Path Probability pos of interior.

Formal statement
n :
ℕ
p :
ℝ
hθ :
x :
Fin n → Fin 4
Proof (Lean source)
lemma inputPathProbability_pos_of_interior {n : ℕ} (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (x : Fin n → Fin 4) : 0 < inputPathProbability θ p x := by unfold inputPathProbability exact Finset.prod_pos fun i _ ↦ piTheta_pos_of_interior θ p hp hθ (x i)
CausalSmith.Stat.LdpAteEfficiencySurface.inputPathProbability_pos_of_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:52
theorem hasDerivAt_piTheta_parameterPath

Under the supplied quantities and conditions, the has deriv at pi theta parameter path assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p u :
ℝ
j :
Fin 4
HasDerivAt (fun a ↦ piTheta (parameterPath θ v a) p j) (inputDirectionalDerivative p v j) u
Proof (Lean source)
lemma hasDerivAt_piTheta_parameterPath (θ v : TrialParameter) (p u : ℝ) (j : Fin 4) : HasDerivAt (fun a ↦ piTheta (parameterPath θ v a) p j) (inputDirectionalDerivative p v j) u := by have heq : (fun a ↦ piTheta (parameterPath θ v a) p j) = fun a ↦ piTheta θ p j + a * inputDirectionalDerivative p v j := by funext a rw [piTheta_by_val_score, piTheta_by_val_score] rcases j with ⟨j, hj⟩ interval_cases j <;> simp [parameterPath, inputDirectionalDerivative, inputDerivative, controlProb, Fin.sum_univ_succ] <;> ring have hder : HasDerivAt (fun a ↦ piTheta θ p j + a * inputDirectionalDerivative p v j) (inputDirectionalDerivative p v j) u := by have hi : HasDerivAt (fun a : ℝ ↦ a) 1 u := hasDerivAt_id u have hm : HasDerivAt (fun a : ℝ ↦ a * inputDirectionalDerivative p v j) (inputDirectionalDerivative p v j) u := by simpa using hi.mul_const (inputDirectionalDerivative p v j) exact hm.const_add (piTheta θ p j) exact heq.symm ▸ hder
CausalSmith.Stat.LdpAteEfficiencySurface.hasDerivAt_piTheta_parameterPath · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:62
def inputPathDirectionalDerivative

For the supplied quantities and conditions, the input path directional derivative is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The input Path Directional Derivative is determined by the displayed parameters.

Definition (Lean source)
n :
ℕ
p :
ℝ
x :
Fin n → Fin 4
inputPathDirectionalDerivative θ v p x :
ℝ
∑ i : Fin n, inputDirectionalDerivative p v (x i) * ∏ j ∈ Finset.univ.erase i, piTheta θ p (x j)
CausalSmith.Stat.LdpAteEfficiencySurface.inputPathDirectionalDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:87
theorem hasDerivAt_inputPathProbability_parameterPath

the has deriv at input path probability parameter path assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
p u :
ℝ
x :
Fin n → Fin 4
Proof (Lean source)
lemma hasDerivAt_inputPathProbability_parameterPath {n : ℕ} (θ v : TrialParameter) (p u : ℝ) (x : Fin n → Fin 4) : HasDerivAt (fun a ↦ inputPathProbability (parameterPath θ v a) p x) (inputPathDirectionalDerivative (parameterPath θ v u) v p x) u := by simpa [inputPathProbability, inputPathDirectionalDerivative, mul_comm] using HasDerivAt.fun_finsetProd (u := (Finset.univ : Finset (Fin n))) (fun i _ ↦ hasDerivAt_piTheta_parameterPath θ v p u (x i))
CausalSmith.Stat.LdpAteEfficiencySurface.hasDerivAt_inputPathProbability_parameterPath · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:93
def transcriptComponentRealDensity

The real-valued density of one transcript component is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
n :
ℕ
x :
Fin n → Fin 4
z :
Transcript (Z n)
transcriptComponentRealDensity P n x z :
ℝ
((P.transcript n x).rnDeriv (transcriptReferenceMeasure P n) z).toReal
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptComponentRealDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:102
def transcriptMixtureRealDensity

The real-valued density of the transcript mixture is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
z :
Transcript (Z n)
transcriptMixtureRealDensity P θ p n z :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptMixtureRealDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:109
def transcriptMixtureRealDerivative

The directional derivative of the real-valued transcript-mixture density is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
z :
Transcript (Z n)
transcriptMixtureRealDerivative P θ v p n z :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptMixtureRealDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:117
theorem transcriptDensity_toReal_ae_eq_mixture

On a parameter range where the four-cell path probabilities are nonnegative, the explicit finite-mixture density is the Radon--Nikodym density of the transcript law. This is the paper-side interface between the finite latent-input expansion and score calculus on an arbitrary transcript measurable space. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hprob :
∀ x : Fin n → Fin 4, 0 ≤ inputPathProbability θ p x
Proof (Lean source)
lemma transcriptDensity_toReal_ae_eq_mixture {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) (hprob : ∀ x : Fin n → Fin 4, 0 ≤ inputPathProbability θ p x) : (fun z ↦ (transcriptDensity P θ p n z).toReal) =ᵐ[transcriptReferenceMeasure P n] transcriptMixtureRealDensity P θ p n := by classical let ν := transcriptReferenceMeasure P n let w (x : Fin n → Fin 4) : ℝ≥0∞ := ofReal (inputPathProbability θ p x) letI componentProbability (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 have hw (x : Fin n → Fin 4) : w x ≠ ∞ := by simp [w] haveI (x : Fin n → Fin 4) : IsFiniteMeasure (w x • P.transcript n x) := (P.transcript n x).smul_finite (hw x) have hrn (t : Finset (Fin n → Fin 4)) : (t.sum fun x ↦ w x • P.transcript n x).rnDeriv ν =ᵐ[ν] fun z ↦ t.sum fun x ↦ w x * (P.transcript n x).rnDeriv ν z := by induction t using Finset.induction_on with | empty => filter_upwards [Measure.rnDeriv_zero ν] with z hz simpa using hz | @insert x t hx ih => haveI : IsFiniteMeasure (t.sum fun y ↦ w y • P.transcript n y) := inferInstance have hadd := Measure.rnDeriv_add (w x • P.transcript n x) (t.sum fun y ↦ w y • P.transcript n y) ν have hsmul := Measure.rnDeriv_smul_left_of_ne_top (P.transcript n x) ν (hw x) filter_upwards [hadd, hsmul, ih] with z hz ha hb simpa [Finset.sum_insert hx, Pi.add_apply, Pi.smul_apply, smul_eq_mul, ha, hb] using hz have hfinite : ∀ᵐ z ∂ν, ∀ x : Fin n → Fin 4, (P.transcript n x).rnDeriv ν z ≠ ∞ := by rw [Filter.eventually_all] intro x exact (Measure.rnDeriv_lt_top (P.transcript n x) ν).mono (fun _ hz ↦ ne_of_lt hz) filter_upwards [hrn univ, hfinite] with z hz hfin change ((transcriptLaw P θ p n).rnDeriv ν z).toReal = transcriptMixtureRealDensity P θ p n z rw [show transcriptLaw P θ p n = Finset.univ.sum (fun x ↦ w x • P.transcript n x) by simp [transcriptLaw, w]] rw [hz, ENNReal.toReal_sum (fun x _ ↦ ENNReal.mul_ne_top (hw x) (hfin x))] simp [transcriptMixtureRealDensity, transcriptComponentRealDensity, w, ν, ENNReal.toReal_mul, hprob]
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptDensity_toReal_ae_eq_mixture · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:126
theorem transcriptDensity_toReal_ae_eq_mixture_of_interior

the transcript density to real ae eq mixture of interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Density to Real ae eq mixture of interior.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
Proof (Lean source)
lemma transcriptDensity_toReal_ae_eq_mixture_of_interior {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : (fun z ↦ (transcriptDensity P θ p n z).toReal) =ᵐ[transcriptReferenceMeasure P n] transcriptMixtureRealDensity P θ p n := transcriptDensity_toReal_ae_eq_mixture P θ p n fun x ↦ (inputPathProbability_pos_of_interior θ p hp hθ x).le
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptDensity_toReal_ae_eq_mixture_of_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:178
theorem hasDerivAt_transcriptMixtureRealDensity_parameterPath

the has deriv at transcript mixture real density parameter path assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p u :
ℝ
n :
ℕ
z :
Transcript (Z n)
Proof (Lean source)
lemma hasDerivAt_transcriptMixtureRealDensity_parameterPath {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p u : ℝ) (n : ℕ) (z : Transcript (Z n)) : HasDerivAt (fun a ↦ transcriptMixtureRealDensity P (parameterPath θ v a) p n z) (transcriptMixtureRealDerivative P (parameterPath θ v u) v p n z) u := by simpa [transcriptMixtureRealDensity, transcriptMixtureRealDerivative] using HasDerivAt.fun_sum (u := (Finset.univ : Finset (Fin n → Fin 4))) (fun x _ ↦ (hasDerivAt_inputPathProbability_parameterPath θ v p u x).mul_const (transcriptComponentRealDensity P n x z))
CausalSmith.Stat.LdpAteEfficiencySurface.hasDerivAt_transcriptMixtureRealDensity_parameterPath · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:190
def inputPathDirectionalScore

The complete-data directional score of one latent input path. The input Path Directional Score is determined by the displayed parameters.

Definition (Lean source)
n :
ℕ
p :
ℝ
x :
Fin n → Fin 4
inputPathDirectionalScore θ v p x :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.inputPathDirectionalScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:204
theorem inputPathDerivative_eq_probability_mul_score

the input path derivative eq probability mul score assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
p :
ℝ
x :
Fin n → Fin 4
hx :
Proof (Lean source)
lemma inputPathDerivative_eq_probability_mul_score {n : ℕ} (θ v : TrialParameter) (p : ℝ) (x : Fin n → Fin 4) (hx : inputPathProbability θ p x ≠ 0) : inputPathDirectionalDerivative θ v p x = inputPathProbability θ p x * inputPathDirectionalScore θ v p x := by rw [inputPathDirectionalScore, mul_div_cancel₀ _ hx]
CausalSmith.Stat.LdpAteEfficiencySurface.inputPathDerivative_eq_probability_mul_score · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:209
def conditionalTranscriptDirectionalScore

The conditional transcript score: the derivative of the finite complete-data mixture density divided by that mixture density. The conditional Transcript Directional Score is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
z :
Transcript (Z n)
conditionalTranscriptDirectionalScore P θ v p n z :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptDirectionalScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:217
theorem transcriptDerivative_eq_density_mul_conditionalScore

the transcript derivative eq density mul conditional score assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
z :
Transcript (Z n)
hz :
Proof (Lean source)
lemma transcriptDerivative_eq_density_mul_conditionalScore {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (z : Transcript (Z n)) (hz : transcriptMixtureRealDensity P θ p n z ≠ 0) : transcriptMixtureRealDerivative P θ v p n z = transcriptMixtureRealDensity P θ p n z * conditionalTranscriptDirectionalScore P θ v p n z := by rw [conditionalTranscriptDirectionalScore, mul_div_cancel₀ _ hz]
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptDerivative_eq_density_mul_conditionalScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:225
theorem transcriptDerivative_eq_completeDataScoreMixture

the transcript derivative eq complete data score mixture assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
z :
Transcript (Z n)
hx :
∀ x : Fin n → Fin 4, inputPathProbability θ p x ≠ 0
Proof (Lean source)
lemma transcriptDerivative_eq_completeDataScoreMixture {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (z : Transcript (Z n)) (hx : ∀ x : Fin n → Fin 4, inputPathProbability θ p x ≠ 0) : transcriptMixtureRealDerivative P θ v p n z = ∑ x : Fin n → Fin 4, inputPathProbability θ p x * inputPathDirectionalScore θ v p x * transcriptComponentRealDensity P n x z := by rw [transcriptMixtureRealDerivative] apply Finset.sum_congr rfl intro x _ rw [inputPathDerivative_eq_probability_mul_score θ v p x (hx x)]
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptDerivative_eq_completeDataScoreMixture · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScore.lean:236
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialScoreProjectionInputs 5 declarations Paper inputs for measurable-statistic score projection

Paper inputs for measurable-statistic score projection

theorem transcriptMixtureRealDerivative_eq_zero_of_density_eq_zero

A full transcript mixture derivative vanishes wherever its positive-weight finite-mixture density vanishes. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta v :
p :
ℝ
n :
ℕ
htheta :
z :
Transcript (Z n)
hz :
Proof (Lean source)
lemma transcriptMixtureRealDerivative_eq_zero_of_density_eq_zero {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (htheta : InteriorMeans theta) (z : Transcript (Z n)) (hz : transcriptMixtureRealDensity P theta p n z = 0) : transcriptMixtureRealDerivative P theta v p n z = 0 := by have hterms : ∀ x : Fin n → Fin 4, inputPathProbability theta p x * transcriptComponentRealDensity P n x z = 0 := by have hnonneg : ∀ x ∈ (Finset.univ : Finset (Fin n → Fin 4)), 0 ≤ inputPathProbability theta p x * transcriptComponentRealDensity P n x z := by intro x hx exact mul_nonneg (inputPathProbability_pos_of_interior theta p hp htheta x).le ENNReal.toReal_nonneg exact fun x => (Finset.sum_eq_zero_iff_of_nonneg hnonneg).mp hz x (Finset.mem_univ x) unfold transcriptMixtureRealDerivative apply Finset.sum_eq_zero intro x hx have hcomponent : transcriptComponentRealDensity P n x z = 0 := by have hprob := inputPathProbability_pos_of_interior theta p hp htheta x exact (mul_eq_zero.mp (hterms x)).resolve_left (ne_of_gt hprob) rw [hcomponent, mul_zero]
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptMixtureRealDerivative_eq_zero_of_density_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScoreProjectionInputs.lean:16
theorem conditionalTranscriptDirectionalScore_eq_guarded

The raw quotient defining the full transcript score agrees with the guarded zero convention used by score projection. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta v :
p :
ℝ
n :
ℕ
htheta :
z :
Transcript (Z n)
= if 0 < transcriptMixtureRealDensity P theta p n z then transcriptMixtureRealDerivative P theta v p n z / transcriptMixtureRealDensity P theta p n z else 0
Proof (Lean source)
lemma conditionalTranscriptDirectionalScore_eq_guarded {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta v : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (htheta : InteriorMeans theta) (z : Transcript (Z n)) : conditionalTranscriptDirectionalScore P theta v p n z = if 0 < transcriptMixtureRealDensity P theta p n z then transcriptMixtureRealDerivative P theta v p n z / transcriptMixtureRealDensity P theta p n z else 0 := by unfold conditionalTranscriptDirectionalScore split_ifs with hpos · rfl · have hnonneg := transcriptMixtureRealDensity_nonneg P theta p n hp htheta z have hz : transcriptMixtureRealDensity P theta p n z = 0 := le_antisymm (le_of_not_gt hpos) hnonneg rw [hz, transcriptMixtureRealDerivative_eq_zero_of_density_eq_zero P theta v p n hp htheta z hz, zero_div]
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptDirectionalScore_eq_guarded · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScoreProjectionInputs.lean:41
theorem transcriptPrefixMixtureRealDensity_nonneg

Prefix finite-mixture densities are nonnegative under interior parameters. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta :
p :
ℝ
n k :
ℕ
hk :
k ≤ n
htheta :
h :
History (Z n) k hk
0 ≤ transcriptPrefixMixtureRealDensity P theta p n k hk h
Proof (Lean source)
lemma transcriptPrefixMixtureRealDensity_nonneg {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) (hp : InteriorAssignment p) (htheta : InteriorMeans theta) (h : History (Z n) k hk) : 0 ≤ transcriptPrefixMixtureRealDensity P theta p n k hk h := by unfold transcriptPrefixMixtureRealDensity exact Finset.sum_nonneg fun x _ => mul_nonneg (inputPathProbability_pos_of_interior theta p hp htheta x).le ENNReal.toReal_nonneg
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixMixtureRealDensity_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScoreProjectionInputs.lean:62
theorem transcriptPrefixMixtureRealDerivative_eq_zero_of_density_eq_zero

A prefix mixture derivative vanishes wherever its positive-weight finite-mixture density vanishes. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta v :
p :
ℝ
n k :
ℕ
hk :
k ≤ n
htheta :
h :
History (Z n) k hk
hz :
transcriptPrefixMixtureRealDensity P theta p n k hk h = 0
transcriptPrefixMixtureRealDerivative P theta v p n k hk h = 0
Proof (Lean source)
lemma transcriptPrefixMixtureRealDerivative_eq_zero_of_density_eq_zero {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta v : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) (hp : InteriorAssignment p) (htheta : InteriorMeans theta) (h : History (Z n) k hk) (hz : transcriptPrefixMixtureRealDensity P theta p n k hk h = 0) : transcriptPrefixMixtureRealDerivative P theta v p n k hk h = 0 := by have hterms : ∀ x : Fin n → Fin 4, inputPathProbability theta p x * transcriptPrefixComponentRealDensity P n k hk x h = 0 := by have hnonneg : ∀ x ∈ (Finset.univ : Finset (Fin n → Fin 4)), 0 ≤ inputPathProbability theta p x * transcriptPrefixComponentRealDensity P n k hk x h := by intro x hx exact mul_nonneg (inputPathProbability_pos_of_interior theta p hp htheta x).le ENNReal.toReal_nonneg exact fun x => (Finset.sum_eq_zero_iff_of_nonneg hnonneg).mp hz x (Finset.mem_univ x) unfold transcriptPrefixMixtureRealDerivative apply Finset.sum_eq_zero intro x hx have hcomponent : transcriptPrefixComponentRealDensity P n k hk x h = 0 := by have hprob := inputPathProbability_pos_of_interior theta p hp htheta x exact (mul_eq_zero.mp (hterms x)).resolve_left (ne_of_gt hprob) rw [hcomponent, mul_zero]
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixMixtureRealDerivative_eq_zero_of_density_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScoreProjectionInputs.lean:74
theorem conditionalTranscriptPrefixDirectionalScore_eq_guarded

The raw quotient defining a prefix score agrees with the guarded zero convention used by score projection. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
theta v :
p :
ℝ
n k :
ℕ
hk :
k ≤ n
htheta :
h :
History (Z n) k hk
= if 0 < transcriptPrefixMixtureRealDensity P theta p n k hk h then transcriptPrefixMixtureRealDerivative P theta v p n k hk h / transcriptPrefixMixtureRealDensity P theta p n k hk h else 0
Proof (Lean source)
lemma conditionalTranscriptPrefixDirectionalScore_eq_guarded {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (theta v : TrialParameter) (p : ℝ) (n k : ℕ) (hk : k ≤ n) (hp : InteriorAssignment p) (htheta : InteriorMeans theta) (h : History (Z n) k hk) : conditionalTranscriptPrefixDirectionalScore P theta v p n k hk h = if 0 < transcriptPrefixMixtureRealDensity P theta p n k hk h then transcriptPrefixMixtureRealDerivative P theta v p n k hk h / transcriptPrefixMixtureRealDensity P theta p n k hk h else 0 := by unfold conditionalTranscriptPrefixDirectionalScore split_ifs with hpos · rfl · have hnonneg := transcriptPrefixMixtureRealDensity_nonneg P theta p n k hk hp htheta h have hz : transcriptPrefixMixtureRealDensity P theta p n k hk h = 0 := le_antisymm (le_of_not_gt hpos) hnonneg rw [hz, transcriptPrefixMixtureRealDerivative_eq_zero_of_density_eq_zero P theta v p n k hk hp htheta h hz, zero_div]
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptPrefixDirectionalScore_eq_guarded · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialScoreProjectionInputs.lean:102
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialSuccessor 6 declarations Successor-prefix and finite joint-channel identities

Successor-prefix and finite joint-channel identities

theorem transcriptPrefixLaw_eq_observedPrefixLaw

the transcript prefix law eq observed prefix law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Prefix Law eq observed Prefix Law.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k ≤ n
transcriptPrefixLaw P θ p n k hk
= prefixLaw (fun i => observedStageKernel P θ p n i) (fun _ => ()) k hk
Proof (Lean source)
lemma transcriptPrefixLaw_eq_observedPrefixLaw {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k ≤ n) : transcriptPrefixLaw P θ p n k hk = prefixLaw (fun i => observedStageKernel P θ p n i) (fun _ => ()) k hk := by have hQ (i : Fin n) : IsMarkovKernel (observedStageKernel P θ p n i) := observedStageKernel_isMarkov P θ p hp hθ n i have hpath : parameterPath θ (fun _ => 0) 0 = θ := by funext j simp [parameterPath] have hfull := transcriptLaw_eq_observedKernelLaw P θ (fun _ => 0) p hp n 0 (hpath.symm ▸ hθ) rw [hpath] at hfull have hfamily : observedKernelFamily P θ (fun _ => 0) p n 0 = fun i => observedStageKernel P θ p n i := by funext i simp only [observedKernelFamily] rw [hpath] unfold transcriptPrefixLaw rw [hfull] unfold law rw [hfamily] have hprefix : (transcriptPrefix hk : Transcript (Z n) → _) = take hk := by funext z j rfl rw [hprefix] exact transcriptLaw_map_prefix (fun i => observedStageKernel P θ p n i) hQ (fun _ => ()) k hk
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixLaw_eq_observedPrefixLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessor.lean:17
theorem transcriptSuccessorLaw_eq_jointChannel

the transcript successor law eq joint channel assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Successor Law eq joint Channel.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
(transcriptPrefixLaw P θ p n (k + 1) hk).map (fun u => (init hk u, last hk u))
= outputLaw θ p (sequentialJointChannel P n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))
Proof (Lean source)
lemma transcriptSuccessorLaw_eq_jointChannel {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : (transcriptPrefixLaw P θ p n (k + 1) hk).map (fun u => (init hk u, last hk u)) = outputLaw θ p (sequentialJointChannel P n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) := by let Q := fun i => observedStageKernel P θ p n i let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) have hQ (i : Fin n) : IsMarkovKernel (Q i) := observedStageKernel_isMarkov P θ p hp hθ n i have hμ : μ = prefixLaw Q (fun _ => ()) k (le_of_succ_le hk) := transcriptPrefixLaw_eq_observedPrefixLaw P θ p hp hθ n k (le_of_succ_le hk) letI : IsProbabilityMeasure μ := by rw [hμ] exact isProbabilityMeasure_prefixLaw Q hQ (fun _ => ()) k _ letI : IsProbabilityMeasure (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) := by change IsProbabilityMeasure μ infer_instance have hμprob : IsProbabilityMeasure μ := inferInstance rw [transcriptPrefixLaw_eq_observedPrefixLaw P θ p hp hθ n (k + 1) hk] rw [prefixLaw_succ_map_init_last Q (fun _ => ()) k hk] rw [← hμ] exact (@outputLaw_sequentialJointChannel Z _ ε P θ p hp hθ n (nextIndex hk) μ hμprob).symm
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptSuccessorLaw_eq_jointChannel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessor.lean:52
def sequentialJointEventDerivative

the sequential joint event derivative is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The sequential Joint Event Derivative is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
A :
Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)
sequentialJointEventDerivative P v p n i μ A :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialJointEventDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessor.lean:85
theorem hasDerivAt_sequentialJoint_realMixture

the has deriv at sequential joint real mixture assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
A :
Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)
HasDerivAt (fun u => ∑ a : Fin 4, piTheta (parameterPath θ v u) p a * (sequentialJointChannel P n i μ a A).toReal) (sequentialJointEventDerivative P v p n i μ A) 0
Proof (Lean source)
lemma hasDerivAt_sequentialJoint_realMixture {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) (A : Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)) : HasDerivAt (fun u => ∑ a : Fin 4, piTheta (parameterPath θ v u) p a * (sequentialJointChannel P n i μ a A).toReal) (sequentialJointEventDerivative P v p n i μ A) 0 := by simpa [sequentialJointEventDerivative] using HasDerivAt.fun_sum (u := (Finset.univ : Finset (Fin 4))) (fun a _ ↦ (hasDerivAt_piTheta_parameterPath θ v p 0 a).mul_const (sequentialJointChannel P n i μ a A).toReal)
CausalSmith.Stat.LdpAteEfficiencySurface.hasDerivAt_sequentialJoint_realMixture · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessor.lean:95
theorem sequentialJoint_realMixture_eq_outputLaw_toReal

the sequential joint real mixture eq output law to real assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the sequential Joint real Mixture eq output Law to Real.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
A :
Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)
hA :
∑ a : Fin 4, piTheta θ p a * (sequentialJointChannel P n i μ a A).toReal
= (outputLaw θ p (sequentialJointChannel P n i μ) A).toReal
Proof (Lean source)
lemma sequentialJoint_realMixture_eq_outputLaw_toReal {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) [IsProbabilityMeasure μ] (A : Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)) (hA : MeasurableSet A) : ∑ a : Fin 4, piTheta θ p a * (sequentialJointChannel P n i μ a A).toReal = (outputLaw θ p (sequentialJointChannel P n i μ) A).toReal := by let Q := sequentialJointChannel P n i μ have hQ : IsMarkovKernel Q := sequentialJointChannel_isMarkov P n i μ have hfinite (a : Fin 4) : Q a A ≠ ∞ := by letI : IsProbabilityMeasure (Q a) := hQ.isProbabilityMeasure a exact measure_ne_top (Q a) A unfold outputLaw simp only [Measure.finsetSum_apply, Measure.smul_apply, smul_eq_mul] rw [ENNReal.toReal_sum (fun a _ ↦ ENNReal.mul_ne_top ENNReal.ofReal_ne_top (hfinite a))] simp_rw [ENNReal.toReal_mul, ENNReal.toReal_ofReal (piTheta_pos_of_interior θ p hp hθ _).le] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialJoint_realMixture_eq_outputLaw_toReal · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessor.lean:111
theorem hasDerivAt_sequentialJoint_outputLaw

the has deriv at sequential joint output law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the has Deriv At sequential Joint output Law.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
A :
Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)
hA :
HasDerivAt (fun u => (outputLaw (parameterPath θ v u) p (sequentialJointChannel P n i μ) A).toReal) (sequentialJointEventDerivative P v p n i μ A) 0
Proof (Lean source)
lemma hasDerivAt_sequentialJoint_outputLaw {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) [IsProbabilityMeasure μ] (A : Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)) (hA : MeasurableSet A) : HasDerivAt (fun u => (outputLaw (parameterPath θ v u) p (sequentialJointChannel P n i μ) A).toReal) (sequentialJointEventDerivative P v p n i μ A) 0 := by have hc0 : ContinuousAt (fun u => parameterPath θ v u 0) 0 := by unfold parameterPath fun_prop have hc1 : ContinuousAt (fun u => parameterPath θ v u 1) 0 := by unfold parameterPath fun_prop have h00 : (0 : ℝ) < parameterPath θ v 0 0 := by simpa [parameterPath] using hθ.1 have h01 : parameterPath θ v 0 0 < (1 : ℝ) := by simpa [parameterPath] using hθ.2.1 have h10 : (0 : ℝ) < parameterPath θ v 0 1 := by simpa [parameterPath] using hθ.2.2.1 have h11 : parameterPath θ v 0 1 < (1 : ℝ) := by simpa [parameterPath] using hθ.2.2.2 have hinterior : {u : ℝ | InteriorMeans (parameterPath θ v u)} ∈ nhds 0 := by filter_upwards [continuousAt_const.eventually_lt hc0 h00, hc0.eventually_lt continuousAt_const h01, continuousAt_const.eventually_lt hc1 h10, hc1.eventually_lt continuousAt_const h11] with u hu00 hu01 hu10 hu11 exact ⟨hu00, hu01, hu10, hu11⟩ have heq : EventuallyEq (nhds 0) (fun u => (outputLaw (parameterPath θ v u) p (sequentialJointChannel P n i μ) A).toReal) (fun u => ∑ a : Fin 4, piTheta (parameterPath θ v u) p a * (sequentialJointChannel P n i μ a A).toReal) := by filter_upwards [hinterior] with u hu exact (sequentialJoint_realMixture_eq_outputLaw_toReal P (parameterPath θ v u) p hp hu n i μ A hA).symm exact (hasDerivAt_sequentialJoint_realMixture P θ v p n i μ A).congr_of_eventuallyEq heq
CausalSmith.Stat.LdpAteEfficiencySurface.hasDerivAt_sequentialJoint_outputLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessor.lean:140
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialSuccessorDerivative 12 declarations This file records the exact product rule for the successor-prefix law.

Derivative decomposition for a sequential successor event

This file records the exact product rule for the successor-prefix law. It keeps the derivative caused by the varying predecessor prefix law separate from the derivative of the current four-row mixture.

def varyingPredecessorRowEventMass

The mass of a successor event in one fixed current-input row while the predecessor prefix law varies along the parameter path. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The varying Predecessor Row Event Mass is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
u :
ℝ
a :
Fin 4
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
varyingPredecessorRowEventMass P θ v p n k hk u a A :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.varyingPredecessorRowEventMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:20
def predecessorSuccessorEventDerivative

The derivative contribution from the varying predecessor law, after mixing the four current-input rows at the base parameter. For the displayed inputs and conditions, the stated result follows. The predecessor Successor Event Derivative is determined by the displayed parameters.

Definition (Lean source)
p :
ℝ
pastRowDerivative :
Fin 4 → ℝ
predecessorSuccessorEventDerivative θ p pastRowDerivative :
ℝ
∑ a : Fin 4, piTheta θ p a * pastRowDerivative a
CausalSmith.Stat.LdpAteEfficiencySurface.predecessorSuccessorEventDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:31
def successorPrefixEventMass

The real mass of a successor-prefix event after splitting the successor history into its predecessor and final output coordinates. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The successor Prefix Event Mass is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
u :
ℝ
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
successorPrefixEventMass P θ v p n k hk u A :
ℝ
(((transcriptPrefixLaw P (parameterPath θ v u) p n (k + 1) hk).map (fun w => (init hk w, last hk w))) A).toReal
CausalSmith.Stat.LdpAteEfficiencySurface.successorPrefixEventMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:36
theorem hasDerivAt_integral_transcriptPrefixLaw

Integrating a fixed measurable function against the varying prefix law differentiates by integrating it against the explicit finite-mixture prefix derivative density. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the has Deriv At integral transcript Prefix Law.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k ≤ n
g :
History (Z n) k hk → ℝ
hg :
hgInt :
∀ x : Fin n → Fin 4, Integrable g ((P.transcript n x).map (transcriptPrefix hk))
HasDerivAt (fun u => ∫ h, g h ∂transcriptPrefixLaw P (parameterPath θ v u) p n k hk) (∫ h, transcriptPrefixMixtureRealDerivative P θ v p n k hk h * g h ∂transcriptPrefixReferenceMeasure P n k hk) 0
Proof (Lean source)
lemma hasDerivAt_integral_transcriptPrefixLaw {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k ≤ n) (g : History (Z n) k hk → ℝ) (hg : Measurable g) (hgInt : ∀ x : Fin n → Fin 4, Integrable g ((P.transcript n x).map (transcriptPrefix hk))) : HasDerivAt (fun u => ∫ h, g h ∂transcriptPrefixLaw P (parameterPath θ v u) p n k hk) (∫ h, transcriptPrefixMixtureRealDerivative P θ v p n k hk h * g h ∂transcriptPrefixReferenceMeasure P n k hk) 0 := by let ν := transcriptPrefixReferenceMeasure P n k hk let μ (x : Fin n → Fin 4) := (P.transcript n x).map (transcriptPrefix hk) letI (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 letI (x : Fin n → Fin 4) : IsProbabilityMeasure (μ x) := Measure.isProbabilityMeasure_map (measurable_transcriptPrefix hk).aemeasurable letI : IsFiniteMeasure ν := by dsimp [ν, transcriptPrefixReferenceMeasure] infer_instance have hzero : parameterPath θ v 0 = θ := by funext j simp [parameterPath] have hc0 : ContinuousAt (fun u => parameterPath θ v u 0) 0 := by unfold parameterPath fun_prop have hc1 : ContinuousAt (fun u => parameterPath θ v u 1) 0 := by unfold parameterPath fun_prop have hinterior : {u : ℝ | InteriorMeans (parameterPath θ v u)} ∈ nhds 0 := by filter_upwards [continuousAt_const.eventually_lt hc0 (by simpa [hzero] using hθ.1), hc0.eventually_lt continuousAt_const (by simpa [hzero] using hθ.2.1), continuousAt_const.eventually_lt hc1 (by simpa [hzero] using hθ.2.2.1), hc1.eventually_lt continuousAt_const (by simpa [hzero] using hθ.2.2.2)] with u hu00 hu01 hu10 hu11 exact ⟨hu00, hu01, hu10, hu11⟩ have heq : (fun u => ∫ h, g h ∂transcriptPrefixLaw P (parameterPath θ v u) p n k hk) =ᶠ[nhds 0] fun u => ∑ x : Fin n → Fin 4, inputPathProbability (parameterPath θ v u) p x * ∫ h, g h ∂μ x := by filter_upwards [hinterior] with u hu rw [transcriptPrefixLaw_eq_sum, integral_finset_sum_measure] · apply Finset.sum_congr rfl intro x _ rw [integral_smul_measure, ENNReal.toReal_ofReal (inputPathProbability_pos_of_interior (parameterPath θ v u) p hp hu x).le] rfl · intro x _ exact (hgInt x).smul_measure ENNReal.ofReal_ne_top have hfiniteDerivative : HasDerivAt (fun u => ∑ x : Fin n → Fin 4, inputPathProbability (parameterPath θ v u) p x * ∫ h, g h ∂μ x) (∑ x : Fin n → Fin 4, inputPathDirectionalDerivative θ v p x * ∫ h, g h ∂μ x) 0 := by simpa only [hzero] using HasDerivAt.fun_sum (u := (Finset.univ : Finset (Fin n → Fin 4))) (fun x _ => (hasDerivAt_inputPathProbability_parameterPath θ v p 0 x).mul_const (∫ h, g h ∂μ x)) have hpac (x : Fin n → Fin 4) : μ x ≪ ν := by dsimp [μ, ν, transcriptPrefixReferenceMeasure] exact (transcriptComponent_ac_reference P n x).map (measurable_transcriptPrefix hk) have htermInt (x : Fin n → Fin 4) : Integrable (fun h => inputPathDirectionalDerivative θ v p x * transcriptPrefixComponentRealDensity P n k hk x h * g h) ν := by have hi : Integrable (fun h => transcriptPrefixComponentRealDensity P n k hk x h * g h) ν := by change Integrable (fun h => ((μ x).rnDeriv ν h).toReal * g h) ν exact (integrable_toReal_rnDeriv_mul_iff (hpac x)).2 (hgInt x) convert hi.const_mul (inputPathDirectionalDerivative θ v p x) using 1 <;> ring have hderivative : (∫ h, transcriptPrefixMixtureRealDerivative P θ v p n k hk h * g h ∂ν) = ∑ x : Fin n → Fin 4, inputPathDirectionalDerivative θ v p x * ∫ h, g h ∂μ x := by simp_rw [transcriptPrefixMixtureRealDerivative, Finset.sum_mul] rw [integral_finset_sum _ (fun x _ => htermInt x)] apply Finset.sum_congr rfl intro x _ rw [show (fun h => inputPathDirectionalDerivative θ v p x * transcriptPrefixComponentRealDensity P n k hk x h * g h) = fun h => inputPathDirectionalDerivative θ v p x * (transcriptPrefixComponentRealDensity P n k hk x h * g h) by funext h ring] rw [integral_const_mul] change inputPathDirectionalDerivative θ v p x * (∫ h, ((μ x).rnDeriv ν h).toReal * g h ∂ν) = _ rw [integral_toReal_rnDeriv_mul (hpac x)] rw [hderivative] exact hfiniteDerivative.congr_of_eventuallyEq heq
CausalSmith.Stat.LdpAteEfficiencySurface.hasDerivAt_integral_transcriptPrefixLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:46
def successorRowKernelSection

The real event section of one fixed current-input row as a function of the released predecessor history. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
ε :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
a :
Fin 4
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
h :
History (Z n) k (le_of_succ_le hk)
successorRowKernelSection P n k hk a A h :
ℝ
((P.channel n (nextIndex hk)) (a, fsHistoryToPrivate (nextIndex hk) h) (Prod.mk h ⁻¹' A)).toReal
CausalSmith.Stat.LdpAteEfficiencySurface.successorRowKernelSection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:144
theorem measurable_successorRowKernelSection

A fixed-row successor event section is measurable on the predecessor history space, with no regularity assumption on the output space. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
a :
Fin 4
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
Proof (Lean source)
lemma measurable_successorRowKernelSection {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n k : ℕ) (hk : k + 1 ≤ n) (a : Fin 4) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) : Measurable (successorRowKernelSection P n k hk a A) := by letI : IsMarkovKernel (P.channel n (nextIndex hk)) := (P.privacy n).1 (nextIndex hk) let K : Kernel (History (Z n) k (le_of_succ_le hk)) (Z n (nextIndex hk)) := (P.channel n (nextIndex hk)).comap (fun h => (a, fsHistoryToPrivate (nextIndex hk) h)) (measurable_const.prodMk (measurable_fsHistoryToPrivate (nextIndex hk))) have hm : Measurable (fun h => K h (Prod.mk h ⁻¹' A)) := K.measurable_kernel_prodMk_left hA exact hm.ennreal_toReal
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_successorRowKernelSection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:156
theorem integrable_successorRowKernelSection_component

The row section is integrable under every deterministic-input predecessor prefix component. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
a :
Fin 4
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
x :
Fin n → Fin 4
Integrable (successorRowKernelSection P n k hk a A) ((P.transcript n x).map (transcriptPrefix (le_of_succ_le hk)))
Proof (Lean source)
lemma integrable_successorRowKernelSection_component {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n k : ℕ) (hk : k + 1 ≤ n) (a : Fin 4) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) (x : Fin n → Fin 4) : Integrable (successorRowKernelSection P n k hk a A) ((P.transcript n x).map (transcriptPrefix (le_of_succ_le hk))) := by letI : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 letI : IsProbabilityMeasure ((P.transcript n x).map (transcriptPrefix (le_of_succ_le hk))) := Measure.isProbabilityMeasure_map (measurable_transcriptPrefix (le_of_succ_le hk)).aemeasurable apply Integrable.of_bound (measurable_successorRowKernelSection P n k hk a A hA).aestronglyMeasurable 1 filter_upwards [] with h change |((P.channel n (nextIndex hk)) (a, fsHistoryToPrivate (nextIndex hk) h) (Prod.mk h ⁻¹' A)).toReal| ≤ 1 rw [abs_of_nonneg ENNReal.toReal_nonneg] have hQ : IsMarkovKernel (P.channel n (nextIndex hk)) := (P.privacy n).1 (nextIndex hk) letI : IsProbabilityMeasure ((P.channel n (nextIndex hk)) (a, fsHistoryToPrivate (nextIndex hk) h)) := hQ.isProbabilityMeasure _ have hle : (P.channel n (nextIndex hk)) (a, fsHistoryToPrivate (nextIndex hk) h) (Prod.mk h ⁻¹' A) ≤ 1 := by have hm : (P.channel n (nextIndex hk)) (a, fsHistoryToPrivate (nextIndex hk) h) (Prod.mk h ⁻¹' A) ≤ (P.channel n (nextIndex hk)) (a, fsHistoryToPrivate (nextIndex hk) h) univ := MeasureTheory.measure_mono (Set.subset_univ _) simpa using hm simpa using ENNReal.toReal_mono ENNReal.one_ne_top hle
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_successorRowKernelSection_component · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:177
theorem sequentialJointChannel_apply_toReal_eq_integral

the sequential joint channel apply to real eq integral assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
a :
Fin 4
A :
Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)
hA :
= ∫ h, ((P.channel n i) (a, fsHistoryToPrivate i h) (Prod.mk h ⁻¹' A)).toReal ∂μ
Proof (Lean source)
lemma sequentialJointChannel_apply_toReal_eq_integral {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) [IsFiniteMeasure μ] (a : Fin 4) (A : Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)) (hA : MeasurableSet A) : (sequentialJointChannel P n i μ a A).toReal = ∫ h, ((P.channel n i) (a, fsHistoryToPrivate i h) (Prod.mk h ⁻¹' A)).toReal ∂μ := by letI : IsMarkovKernel (P.channel n i) := (P.privacy n).1 i unfold sequentialJointChannel releasedHistoryRowKernel rw [Kernel.compProd_apply hA, integral_toReal] · rfl · have hm := ((P.channel n i).comap (fun h => (a, fsHistoryToPrivate i h)) (measurable_const.prodMk (measurable_fsHistoryToPrivate i))).measurable_kernel_prodMk_left hA exact hm.aemeasurable · filter_upwards [] with h exact measure_lt_top _ _
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialJointChannel_apply_toReal_eq_integral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:216
def predecessorRowEventDerivative

The predecessor contribution for one current-input row is the prefix derivative density integrated against that row's bounded event section. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The predecessor Row Event Derivative is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
a :
Fin 4
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
predecessorRowEventDerivative P θ v p n k hk a A :
ℝ
∫ h, transcriptPrefixMixtureRealDerivative P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h ∂transcriptPrefixReferenceMeasure P n k (le_of_succ_le hk)
CausalSmith.Stat.LdpAteEfficiencySurface.predecessorRowEventDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:240
theorem hasDerivAt_varyingPredecessorRowEventMass

The derivative of a fixed current-input row is exactly the predecessor prefix derivative contribution; the current row itself is held fixed here. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the has Deriv At varying Predecessor Row Event Mass.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
a :
Fin 4
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
HasDerivAt (fun u => varyingPredecessorRowEventMass P θ v p n k hk u a A) (predecessorRowEventDerivative P θ v p n k hk a A) 0
Proof (Lean source)
lemma hasDerivAt_varyingPredecessorRowEventMass {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (a : Fin 4) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) : HasDerivAt (fun u => varyingPredecessorRowEventMass P θ v p n k hk u a A) (predecessorRowEventDerivative P θ v p n k hk a A) 0 := by let g := successorRowKernelSection P n k hk a A have hbase := hasDerivAt_integral_transcriptPrefixLaw P θ v p hp hθ n k (le_of_succ_le hk) g (measurable_successorRowKernelSection P n k hk a A hA) (fun x => integrable_successorRowKernelSection_component P n k hk a A hA x) have hzero : parameterPath θ v 0 = θ := by funext j simp [parameterPath] have hc0 : ContinuousAt (fun u => parameterPath θ v u 0) 0 := by unfold parameterPath fun_prop have hc1 : ContinuousAt (fun u => parameterPath θ v u 1) 0 := by unfold parameterPath fun_prop have hinterior : {u : ℝ | InteriorMeans (parameterPath θ v u)} ∈ nhds 0 := by filter_upwards [continuousAt_const.eventually_lt hc0 (by simpa [hzero] using hθ.1), hc0.eventually_lt continuousAt_const (by simpa [hzero] using hθ.2.1), continuousAt_const.eventually_lt hc1 (by simpa [hzero] using hθ.2.2.1), hc1.eventually_lt continuousAt_const (by simpa [hzero] using hθ.2.2.2)] with u hu00 hu01 hu10 hu11 exact ⟨hu00, hu01, hu10, hu11⟩ have heq : (fun u => varyingPredecessorRowEventMass P θ v p n k hk u a A) =ᶠ[nhds 0] fun u => ∫ h, g h ∂transcriptPrefixLaw P (parameterPath θ v u) p n k (le_of_succ_le hk) := by filter_upwards [hinterior] with u hu have hprob : IsProbabilityMeasure (transcriptPrefixLaw P (parameterPath θ v u) p n k (le_of_succ_le hk)) := transcriptPrefixLaw_isProbability P (parameterPath θ v u) p hp hu n k (le_of_succ_le hk) let μu : Measure (History (Z n) (nextIndex hk).val (le_of_lt (nextIndex hk).isLt)) := transcriptPrefixLaw P (parameterPath θ v u) p n k (le_of_succ_le hk) letI : IsProbabilityMeasure μu := by constructor change transcriptPrefixLaw P (parameterPath θ v u) p n k (le_of_succ_le hk) univ = 1 exact @IsProbabilityMeasure.measure_univ _ _ _ hprob letI : IsFiniteMeasure μu := ⟨by rw [IsProbabilityMeasure.measure_univ] exact ENNReal.one_lt_top⟩ unfold varyingPredecessorRowEventMass change (sequentialJointChannel P n (nextIndex hk) μu a A).toReal = _ rw [sequentialJointChannel_apply_toReal_eq_integral P n (nextIndex hk) μu a A hA] rfl exact hbase.congr_of_eventuallyEq heq
CausalSmith.Stat.LdpAteEfficiencySurface.hasDerivAt_varyingPredecessorRowEventMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:252
theorem hasDerivAt_successorPrefixEventMass_of_predecessor_rows

The successor-event derivative is the sum of the varying-predecessor contribution and the current joint-channel directional derivative. The row derivative premise concerns only variation of the predecessor prefix law; the current four-cell weights are differentiated explicitly here. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the has Deriv At successor Prefix Event Mass of predecessor rows.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
pastRowDerivative :
Fin 4 → ℝ
hrow :
∀ a,
HasDerivAt (fun u => varyingPredecessorRowEventMass P θ v p n k hk u a A) (pastRowDerivative a) 0
HasDerivAt (fun u => successorPrefixEventMass P θ v p n k hk u A) (predecessorSuccessorEventDerivative θ p pastRowDerivative + sequentialJointEventDerivative P v p n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) A) 0
Proof (Lean source)
lemma hasDerivAt_successorPrefixEventMass_of_predecessor_rows {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) (pastRowDerivative : Fin 4 → ℝ) (hrow : ∀ a, HasDerivAt (fun u => varyingPredecessorRowEventMass P θ v p n k hk u a A) (pastRowDerivative a) 0) : HasDerivAt (fun u => successorPrefixEventMass P θ v p n k hk u A) (predecessorSuccessorEventDerivative θ p pastRowDerivative + sequentialJointEventDerivative P v p n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) A) 0 := by have hzero : parameterPath θ v 0 = θ := by funext j simp [parameterPath] have hc0 : ContinuousAt (fun u => parameterPath θ v u 0) 0 := by unfold parameterPath fun_prop have hc1 : ContinuousAt (fun u => parameterPath θ v u 1) 0 := by unfold parameterPath fun_prop have hinterior : {u : ℝ | InteriorMeans (parameterPath θ v u)} ∈ nhds 0 := by filter_upwards [continuousAt_const.eventually_lt hc0 (by simpa [hzero] using hθ.1), hc0.eventually_lt continuousAt_const (by simpa [hzero] using hθ.2.1), continuousAt_const.eventually_lt hc1 (by simpa [hzero] using hθ.2.2.1), hc1.eventually_lt continuousAt_const (by simpa [hzero] using hθ.2.2.2)] with u hu00 hu01 hu10 hu11 exact ⟨hu00, hu01, hu10, hu11⟩ have heq : (fun u => successorPrefixEventMass P θ v p n k hk u A) =ᶠ[nhds 0] fun u => ∑ a : Fin 4, piTheta (parameterPath θ v u) p a * varyingPredecessorRowEventMass P θ v p n k hk u a A := by filter_upwards [hinterior] with u hu have hμprob : IsProbabilityMeasure (transcriptPrefixLaw P (parameterPath θ v u) p n k (le_of_succ_le hk)) := transcriptPrefixLaw_isProbability P (parameterPath θ v u) p hp hu n k (le_of_succ_le hk) have hlaw := transcriptSuccessorLaw_eq_jointChannel P (parameterPath θ v u) p hp hu n k hk have hmix := @sequentialJoint_realMixture_eq_outputLaw_toReal Z _ ε P (parameterPath θ v u) p hp hu n (nextIndex hk) (transcriptPrefixLaw P (parameterPath θ v u) p n k (le_of_succ_le hk)) hμprob A hA unfold successorPrefixEventMass varyingPredecessorRowEventMass rw [hlaw] exact hmix.symm have hsum : HasDerivAt (fun u => ∑ a : Fin 4, piTheta (parameterPath θ v u) p a * varyingPredecessorRowEventMass P θ v p n k hk u a A) (∑ a : Fin 4, (inputDirectionalDerivative p v a * varyingPredecessorRowEventMass P θ v p n k hk 0 a A + piTheta θ p a * pastRowDerivative a)) 0 := by simpa only [Pi.mul_apply, hzero] using HasDerivAt.fun_sum (u := (Finset.univ : Finset (Fin 4))) (fun a _ => (hasDerivAt_piTheta_parameterPath θ v p 0 a).mul (hrow a)) have hderivative : (∑ a : Fin 4, (inputDirectionalDerivative p v a * varyingPredecessorRowEventMass P θ v p n k hk 0 a A + piTheta θ p a * pastRowDerivative a)) = predecessorSuccessorEventDerivative θ p pastRowDerivative + sequentialJointEventDerivative P v p n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) A := by simp only [predecessorSuccessorEventDerivative, sequentialJointEventDerivative, Finset.sum_add_distrib] rw [add_comm] congr 1 apply Finset.sum_congr rfl intro a _ simp [varyingPredecessorRowEventMass, hzero] rw [hderivative] at hsum exact hsum.congr_of_eventuallyEq heq
CausalSmith.Stat.LdpAteEfficiencySurface.hasDerivAt_successorPrefixEventMass_of_predecessor_rows · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:317
theorem hasDerivAt_successorPrefixEventMass

The exact successor-event derivative obtained by differentiating both the varying predecessor prefix law and the current observation-dependent row. The first summand is the finite-mixture pushforward of the prefix score; the second is the directional derivative of the current joint channel with its predecessor law fixed at the base parameter. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the has Deriv At successor Prefix Event Mass.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
HasDerivAt (fun u => successorPrefixEventMass P θ v p n k hk u A) (predecessorSuccessorEventDerivative θ p (fun a => predecessorRowEventDerivative P θ v p n k hk a A) + sequentialJointEventDerivative P v p n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) A) 0
Proof (Lean source)
lemma hasDerivAt_successorPrefixEventMass {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) : HasDerivAt (fun u => successorPrefixEventMass P θ v p n k hk u A) (predecessorSuccessorEventDerivative θ p (fun a => predecessorRowEventDerivative P θ v p n k hk a A) + sequentialJointEventDerivative P v p n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) A) 0 := by exact hasDerivAt_successorPrefixEventMass_of_predecessor_rows P θ v p hp hθ n k hk A hA (fun a => predecessorRowEventDerivative P θ v p n k hk a A) (fun a => hasDerivAt_varyingPredecessorRowEventMass P θ v p hp hθ n k hk a A hA)
CausalSmith.Stat.LdpAteEfficiencySurface.hasDerivAt_successorPrefixEventMass · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorDerivative.lean:399
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialSuccessorScore 13 declarations This file identifies the directional score of the four-row joint channel which generates a released prefix together with its next output.

Directional scores for successor joint channels

This file identifies the directional score of the four-row joint channel which generates a released prefix together with its next output. The score is expressed against the finite row-sum dominating measure, so the result does not require countable generation of the output spaces.

def channelDirectionalDerivativeDensity

the channel directional derivative density is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
p :
ℝ
Q :
Kernel (Fin 4) Z
z :
Z
channelDirectionalDerivativeDensity p Q v z :
ℝ
∑ k : Fin 2, v k * channelDerivativeDensity p Q k z
CausalSmith.Stat.LdpAteEfficiencySurface.channelDirectionalDerivativeDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:22
def channelDirectionalScore

the channel directional score is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The channel Directional Score is determined by the displayed parameters.

Definition (Lean source)
Z :
p :
ℝ
Q :
Kernel (Fin 4) Z
z :
Z
channelDirectionalScore θ p Q v z :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.channelDirectionalScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:27
theorem channelDirectionalDerivativeDensity_eq_inputSum

the channel directional derivative density eq input sum assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
p :
ℝ
Q :
Kernel (Fin 4) Z
z :
Z
Proof (Lean source)
lemma channelDirectionalDerivativeDensity_eq_inputSum {Z : Type*} [MeasurableSpace Z] (p : ℝ) (Q : Kernel (Fin 4) Z) (v : TrialParameter) (z : Z) : channelDirectionalDerivativeDensity p Q v z = ∑ j : Fin 4, inputDirectionalDerivative p v j * channelDensity Q j z := by unfold channelDirectionalDerivativeDensity channelDerivativeDensity simp_rw [Finset.mul_sum] rw [Finset.sum_comm] apply Finset.sum_congr rfl intro j hj unfold inputDirectionalDerivative simp_rw [Finset.sum_mul] apply Finset.sum_congr rfl intro k hk ring
CausalSmith.Stat.LdpAteEfficiencySurface.channelDirectionalDerivativeDensity_eq_inputSum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:36
theorem channelOutputDensity_nonneg_of_interior

the channel output density nonneg of interior assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the channel Output Density nonneg of interior.

Formal statement
Z :
p :
ℝ
Q :
Kernel (Fin 4) Z
hθ :
z :
Z
0 ≤ channelOutputDensity θ p Q z
Proof (Lean source)
lemma channelOutputDensity_nonneg_of_interior {Z : Type*} [MeasurableSpace Z] (θ : TrialParameter) (p : ℝ) (Q : Kernel (Fin 4) Z) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (z : Z) : 0 ≤ channelOutputDensity θ p Q z := by unfold channelOutputDensity exact Finset.sum_nonneg fun j _ => mul_nonneg (piTheta_pos_of_interior θ p hp hθ j).le ENNReal.toReal_nonneg
CausalSmith.Stat.LdpAteEfficiencySurface.channelOutputDensity_nonneg_of_interior · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:53
theorem channelDirectionalDerivativeDensity_eq_zero_of_outputDensity_eq_zero

the channel directional derivative density eq zero of output density eq zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the channel Directional Derivative Density eq zero of output Density eq zero.

Formal statement
Z :
p :
ℝ
Q :
Kernel (Fin 4) Z
hθ :
z :
Z
hz :
Proof (Lean source)
lemma channelDirectionalDerivativeDensity_eq_zero_of_outputDensity_eq_zero {Z : Type*} [MeasurableSpace Z] (θ v : TrialParameter) (p : ℝ) (Q : Kernel (Fin 4) Z) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (z : Z) (hz : channelOutputDensity θ p Q z = 0) : channelDirectionalDerivativeDensity p Q v z = 0 := by have hterms : ∀ j : Fin 4, piTheta θ p j * channelDensity Q j z = 0 := by have hnonneg : ∀ j ∈ (Finset.univ : Finset (Fin 4)), 0 ≤ piTheta θ p j * channelDensity Q j z := by intro j hj exact mul_nonneg (piTheta_pos_of_interior θ p hp hθ j).le ENNReal.toReal_nonneg exact fun j => (Finset.sum_eq_zero_iff_of_nonneg hnonneg).mp hz j (Finset.mem_univ j) rw [channelDirectionalDerivativeDensity_eq_inputSum] apply Finset.sum_eq_zero intro j hj have hdensity : channelDensity Q j z = 0 := by exact (mul_eq_zero.mp (hterms j)).resolve_left (ne_of_gt (piTheta_pos_of_interior θ p hp hθ j)) rw [hdensity, mul_zero]
CausalSmith.Stat.LdpAteEfficiencySurface.channelDirectionalDerivativeDensity_eq_zero_of_outputDensity_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:65
theorem channelDirectionalScore_mul_outputDensity

the channel directional score mul output density assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the channel Directional Score mul output Density.

Formal statement
Z :
p :
ℝ
Q :
Kernel (Fin 4) Z
hθ :
z :
Z
Proof (Lean source)
lemma channelDirectionalScore_mul_outputDensity {Z : Type*} [MeasurableSpace Z] (θ v : TrialParameter) (p : ℝ) (Q : Kernel (Fin 4) Z) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (z : Z) : channelDirectionalScore θ p Q v z * channelOutputDensity θ p Q z = channelDirectionalDerivativeDensity p Q v z := by unfold channelDirectionalScore split_ifs with hpos · field_simp · have hnonneg := channelOutputDensity_nonneg_of_interior θ p Q hp hθ z have hz : channelOutputDensity θ p Q z = 0 := le_antisymm (le_of_not_gt hpos) hnonneg rw [zero_mul, channelDirectionalDerivativeDensity_eq_zero_of_outputDensity_eq_zero θ v p Q hp hθ z hz]
CausalSmith.Stat.LdpAteEfficiencySurface.channelDirectionalScore_mul_outputDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:91
theorem integrable_channelDensity_dominating

the integrable channel density dominating assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
j :
Fin 4
Proof (Lean source)
lemma integrable_channelDensity_dominating {Z : Type*} [MeasurableSpace Z] (Q : Kernel (Fin 4) Z) [IsMarkovKernel Q] (j : Fin 4) : Integrable (channelDensity Q j) (dominatingMeasure Q) := by letI : IsFiniteMeasure (Q j) := inferInstance letI : IsFiniteMeasure (dominatingMeasure Q) := ⟨by simp [dominatingMeasure]⟩ have h := (integrable_toReal_rnDeriv_mul_iff (channelRow_absolutelyContinuous_dominating Q j) (f := fun _ => (1 : ℝ))).2 (integrable_const (1 : ℝ)) change Integrable (fun z => ((Q j).rnDeriv (dominatingMeasure Q) z).toReal) (dominatingMeasure Q) simpa only [mul_one] using h
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_channelDensity_dominating · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:109
theorem setIntegral_channelDirectionalDerivativeDensity

the set integral channel directional derivative density assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
p :
ℝ
A :
Set Z
∫ z in A, channelDirectionalDerivativeDensity p Q v z ∂dominatingMeasure Q
= ∑ j : Fin 4, inputDirectionalDerivative p v j * (Q j A).toReal
Proof (Lean source)
lemma setIntegral_channelDirectionalDerivativeDensity {Z : Type*} [MeasurableSpace Z] (p : ℝ) (Q : Kernel (Fin 4) Z) [IsMarkovKernel Q] (v : TrialParameter) (A : Set Z) : ∫ z in A, channelDirectionalDerivativeDensity p Q v z ∂dominatingMeasure Q = ∑ j : Fin 4, inputDirectionalDerivative p v j * (Q j A).toReal := by letI : IsFiniteMeasure (dominatingMeasure Q) := ⟨by simp [dominatingMeasure]⟩ calc (∫ z in A, channelDirectionalDerivativeDensity p Q v z ∂dominatingMeasure Q) = ∫ z in A, ∑ j : Fin 4, inputDirectionalDerivative p v j * channelDensity Q j z ∂dominatingMeasure Q := by apply integral_congr_ae filter_upwards [] with z exact channelDirectionalDerivativeDensity_eq_inputSum p Q v z _ = ∑ j : Fin 4, ∫ z in A, inputDirectionalDerivative p v j * channelDensity Q j z ∂dominatingMeasure Q := by rw [integral_finset_sum] intro j hj exact (integrable_channelDensity_dominating Q j).integrableOn.const_mul _ _ = ∑ j : Fin 4, inputDirectionalDerivative p v j * (Q j A).toReal := by apply Finset.sum_congr rfl intro j hj rw [integral_const_mul] rw [show (∫ z in A, channelDensity Q j z ∂dominatingMeasure Q) = (Q j).real A by exact Measure.setIntegral_toReal_rnDeriv (channelRow_absolutelyContinuous_dominating Q j) A] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.setIntegral_channelDirectionalDerivativeDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:125
theorem setIntegral_sequentialJoint_channelDirectionalScore

the set integral sequential joint channel directional score assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the set Integral sequential Joint channel Directional Score.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
A :
Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)
∫ z in A, channelDirectionalScore θ p (sequentialJointChannel P n i μ) v z * channelOutputDensity θ p (sequentialJointChannel P n i μ) z ∂dominatingMeasure (sequentialJointChannel P n i μ)
Proof (Lean source)
lemma setIntegral_sequentialJoint_channelDirectionalScore {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) [IsProbabilityMeasure μ] (A : Set (History (Z n) i.val (le_of_lt i.isLt) × Z n i)) : ∫ z in A, channelDirectionalScore θ p (sequentialJointChannel P n i μ) v z * channelOutputDensity θ p (sequentialJointChannel P n i μ) z ∂dominatingMeasure (sequentialJointChannel P n i μ) = sequentialJointEventDerivative P v p n i μ A := by let Q := sequentialJointChannel P n i μ letI : IsMarkovKernel Q := sequentialJointChannel_isMarkov P n i μ have hpoint (z) : channelDirectionalScore θ p Q v z * channelOutputDensity θ p Q z = channelDirectionalDerivativeDensity p Q v z := channelDirectionalScore_mul_outputDensity θ v p Q hp hθ z change (∫ z in A, channelDirectionalScore θ p Q v z * channelOutputDensity θ p Q z ∂dominatingMeasure Q) = _ simp_rw [hpoint] exact setIntegral_channelDirectionalDerivativeDensity p Q v A
CausalSmith.Stat.LdpAteEfficiencySurface.setIntegral_sequentialJoint_channelDirectionalScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:161
theorem channelDirectionalScore_sq_mul_outputDensity

the channel directional score sq mul output density assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the channel Directional Score sq mul output Density.

Formal statement
Z :
p :
ℝ
Q :
Kernel (Fin 4) Z
hθ :
z :
Z
Proof (Lean source)
lemma channelDirectionalScore_sq_mul_outputDensity {Z : Type*} [MeasurableSpace Z] (θ v : TrialParameter) (p : ℝ) (Q : Kernel (Fin 4) Z) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (z : Z) : channelDirectionalScore θ p Q v z ^ 2 * channelOutputDensity θ p Q z = channelDirectionalDerivativeDensity p Q v z ^ 2 / channelOutputDensity θ p Q z := by unfold channelDirectionalScore split_ifs with hpos · field_simp · have hnonneg := channelOutputDensity_nonneg_of_interior θ p Q hp hθ z have hz : channelOutputDensity θ p Q z = 0 := le_antisymm (le_of_not_gt hpos) hnonneg have hder := channelDirectionalDerivativeDensity_eq_zero_of_outputDensity_eq_zero θ v p Q hp hθ z hz simp [hz, hder]
CausalSmith.Stat.LdpAteEfficiencySurface.channelDirectionalScore_sq_mul_outputDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:188
theorem integral_sequentialJoint_channelDirectionalScore_sq

the integral sequential joint channel directional score sq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integral sequential Joint channel Directional Score sq.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n :
ℕ
i :
Fin n
μ :
Measure (History (Z n) i.val (le_of_lt i.isLt))
Proof (Lean source)
lemma integral_sequentialJoint_channelDirectionalScore_sq {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n : ℕ) (i : Fin n) (μ : Measure (History (Z n) i.val (le_of_lt i.isLt))) [IsProbabilityMeasure μ] : ∫ z, channelDirectionalScore θ p (sequentialJointChannel P n i μ) v z ^ 2 * channelOutputDensity θ p (sequentialJointChannel P n i μ) z ∂dominatingMeasure (sequentialJointChannel P n i μ) = informationQuadratic (channelFisherInfo θ p (sequentialJointChannel P n i μ)) v := by let Q := sequentialJointChannel P n i μ have hQ : StationaryLDP ε Q := sequentialJointChannel_stationaryLDP P n i μ change (∫ z, channelDirectionalScore θ p Q v z ^ 2 * channelOutputDensity θ p Q z ∂dominatingMeasure Q) = _ calc (∫ z, channelDirectionalScore θ p Q v z ^ 2 * channelOutputDensity θ p Q z ∂dominatingMeasure Q) = ∫ z, channelDirectionalDerivativeDensity p Q v z ^ 2 / channelOutputDensity θ p Q z ∂dominatingMeasure Q := by apply integral_congr_ae filter_upwards [] with z exact channelDirectionalScore_sq_mul_outputDensity θ v p Q hp hθ z _ = informationQuadratic (channelFisherInfo θ p Q) v := by rw [informationQuadratic_eq_channelIntegral p θ hp hθ ε Q hQ v] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.integral_sequentialJoint_channelDirectionalScore_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:208
theorem transcriptPrefixLaw_isProbability

the transcript prefix law is probability assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Prefix Law is Probability.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k ≤ n
Proof (Lean source)
lemma transcriptPrefixLaw_isProbability {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k ≤ n) : IsProbabilityMeasure (transcriptPrefixLaw P θ p n k hk) := by rw [transcriptPrefixLaw_eq_observedPrefixLaw P θ p hp hθ n k hk] exact isProbabilityMeasure_prefixLaw (fun i => observedStageKernel P θ p n i) (fun i => observedStageKernel_isMarkov P θ p hp hθ n i) (fun _ => ()) k hk
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptPrefixLaw_isProbability · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:240
theorem transcriptSuccessorLaw_jointScore_characterization

Under the successor coordinates (init,last), the exact joint-channel score identities apply to the pushed-forward prefix law. The derivative here holds the predecessor prefix law fixed; differentiation of the whole successor law additionally contains the predecessor score. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Successor Law joint Score characterization.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
μ :
(transcriptPrefixLaw P θ p n (k + 1) hk).map (fun u => (init hk u, last hk u))
= outputLaw θ p Q
(∫ z in A, channelDirectionalScore θ p Q v z * channelOutputDensity θ p Q z ∂dominatingMeasure Q)
(∫ z, channelDirectionalScore θ p Q v z ^ 2 * channelOutputDensity θ p Q z ∂dominatingMeasure Q)
Proof (Lean source)
lemma transcriptSuccessorLaw_jointScore_characterization {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) : let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let Q := sequentialJointChannel P n (nextIndex hk) μ (transcriptPrefixLaw P θ p n (k + 1) hk).map (fun u => (init hk u, last hk u)) = outputLaw θ p Q ∧ (∫ z in A, channelDirectionalScore θ p Q v z * channelOutputDensity θ p Q z ∂dominatingMeasure Q) = sequentialJointEventDerivative P v p n (nextIndex hk) μ A ∧ (∫ z, channelDirectionalScore θ p Q v z ^ 2 * channelOutputDensity θ p Q z ∂dominatingMeasure Q) = informationQuadratic (channelFisherInfo θ p Q) v := by dsimp only have hμ : IsProbabilityMeasure (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) refine ⟨transcriptSuccessorLaw_eq_jointChannel P θ p hp hθ n k hk, ?_, ?_⟩ · exact @setIntegral_sequentialJoint_channelDirectionalScore Z _ ε P θ v p hp hθ n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) hμ A · exact @integral_sequentialJoint_channelDirectionalScore_sq Z _ ε P θ v p hp hθ n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) hμ
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptSuccessorLaw_jointScore_characterization · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScore.lean:255
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialSuccessorScoreCharacterization 15 declarations Event characterization of the successor score candidate

Event characterization of the successor score candidate

theorem outputLaw_ac_dominatingMeasure

the output law ac dominating measure assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Y :
p :
ℝ
Q :
Kernel (Fin 4) Y
outputLaw θ p Q ≪ dominatingMeasure Q
Proof (Lean source)
lemma outputLaw_ac_dominatingMeasure {Y : Type*} [MeasurableSpace Y] (θ : TrialParameter) (p : ℝ) (Q : Kernel (Fin 4) Y) : outputLaw θ p Q ≪ dominatingMeasure Q := by rw [outputLaw, dominatingMeasure] apply Measure.AbsolutelyContinuous.mk intro A hA href simp only [Measure.coe_finsetSum, Finset.sum_apply] at href ⊢ apply Finset.sum_eq_zero intro a _ rw [Measure.smul_apply, smul_eq_mul] apply mul_eq_zero_of_right exact (Finset.sum_eq_zero_iff_of_nonneg (fun _ _ => zero_le)).mp href a (Finset.mem_univ a)
theorem outputLawDensity_toReal_ae_eq_channelOutputDensity

the output law density to real ae eq channel output density assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the output Law Density to Real ae eq channel Output Density.

Formal statement
Y :
p :
ℝ
hθ :
(fun y => ((outputLaw θ p Q).rnDeriv (dominatingMeasure Q) y).toReal)
Proof (Lean source)
lemma outputLawDensity_toReal_ae_eq_channelOutputDensity {Y : Type*} [MeasurableSpace Y] (θ : TrialParameter) (p : ℝ) (Q : Kernel (Fin 4) Y) [IsMarkovKernel Q] (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : (fun y => ((outputLaw θ p Q).rnDeriv (dominatingMeasure Q) y).toReal) =ᵐ[dominatingMeasure Q] channelOutputDensity θ p Q := by classical let ν := dominatingMeasure Q let μ (a : Fin 4) := Q a let w (a : Fin 4) : ℝ≥0∞ := ofReal (piTheta θ p a) letI : IsFiniteMeasure ν := ⟨by simp [ν, dominatingMeasure]⟩ have hw (a : Fin 4) : w a ≠ ∞ := by simp [w] haveI (a : Fin 4) : IsFiniteMeasure (w a • μ a) := (μ a).smul_finite (hw a) have hrn (s : Finset (Fin 4)) : (s.sum fun a => w a • μ a).rnDeriv ν =ᵐ[ν] fun y => s.sum fun a => w a * (μ a).rnDeriv ν y := by induction s using Finset.induction_on with | empty => filter_upwards [Measure.rnDeriv_zero ν] with y hy simpa using hy | @insert a s ha ih => haveI : IsFiniteMeasure (s.sum fun b => w b • μ b) := inferInstance have hadd := Measure.rnDeriv_add (w a • μ a) (s.sum fun b => w b • μ b) ν have hsmul := Measure.rnDeriv_smul_left_of_ne_top (μ a) ν (hw a) filter_upwards [hadd, hsmul, ih] with y hy hs hi simpa [Finset.sum_insert ha, Pi.add_apply, Pi.smul_apply, smul_eq_mul, hs, hi] using hy have hfinite : ∀ᵐ y ∂ν, ∀ a : Fin 4, (μ a).rnDeriv ν y ≠ ∞ := by rw [Filter.eventually_all] intro a exact (Measure.rnDeriv_lt_top (μ a) ν).mono (fun _ h => ne_of_lt h) filter_upwards [hrn univ, hfinite] with y hy hfin change ((outputLaw θ p Q).rnDeriv ν y).toReal = channelOutputDensity θ p Q y rw [show outputLaw θ p Q = ∑ a : Fin 4, w a • μ a by rfl] rw [hy, ENNReal.toReal_sum (fun a _ => ENNReal.mul_ne_top (hw a) (hfin a))] simp [channelOutputDensity, channelDensity, μ, w, ν, ENNReal.toReal_mul, (piTheta_pos_of_interior θ p hp hθ _).le]
CausalSmith.Stat.LdpAteEfficiencySurface.outputLawDensity_toReal_ae_eq_channelOutputDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:30
theorem channelDirectionalDerivativeDensity_integrable_dominating

the channel directional derivative density integrable dominating assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Y :
p :
ℝ
Proof (Lean source)
lemma channelDirectionalDerivativeDensity_integrable_dominating {Y : Type*} [MeasurableSpace Y] (p : ℝ) (Q : Kernel (Fin 4) Y) [IsMarkovKernel Q] (v : TrialParameter) : Integrable (channelDirectionalDerivativeDensity p Q v) (dominatingMeasure Q) := by have hsum : Integrable (fun y => ∑ a : Fin 4, inputDirectionalDerivative p v a * channelDensity Q a y) (dominatingMeasure Q) := integrable_finsetSum _ fun a _ => (integrable_channelDensity_dominating Q a).const_mul _ exact hsum.congr (ae_of_all _ fun y => (channelDirectionalDerivativeDensity_eq_inputSum p Q v y).symm)
CausalSmith.Stat.LdpAteEfficiencySurface.channelDirectionalDerivativeDensity_integrable_dominating · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:75
theorem channelDirectionalScore_integrable_outputLaw

the channel directional score integrable output law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the channel Directional Score integrable output Law.

Formal statement
Y :
p :
ℝ
hθ :
Integrable (channelDirectionalScore θ p Q v) (outputLaw θ p Q)
Proof (Lean source)
lemma channelDirectionalScore_integrable_outputLaw {Y : Type*} [MeasurableSpace Y] (θ v : TrialParameter) (p : ℝ) (Q : Kernel (Fin 4) Y) [IsMarkovKernel Q] (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : Integrable (channelDirectionalScore θ p Q v) (outputLaw θ p Q) := by let ν := dominatingMeasure Q let μ := outputLaw θ p Q letI : IsFiniteMeasure ν := ⟨by simp [ν, dominatingMeasure]⟩ letI : IsFiniteMeasure μ := by constructor dsimp [μ, outputLaw] simp only [Measure.coe_finsetSum, Finset.sum_apply, Measure.smul_apply, smul_eq_mul, measure_univ, mul_one] exact ENNReal.sum_lt_top.mpr fun _ _ => ENNReal.ofReal_lt_top change Integrable (channelDirectionalScore θ p Q v) μ rw [← Measure.withDensity_rnDeriv_eq μ ν (outputLaw_ac_dominatingMeasure θ p Q)] rw [integrable_withDensity_iff_integrable_smul' (Measure.measurable_rnDeriv μ ν) (Measure.rnDeriv_lt_top μ ν)] have hderiv := channelDirectionalDerivativeDensity_integrable_dominating p Q v refine hderiv.congr ?_ filter_upwards [outputLawDensity_toReal_ae_eq_channelOutputDensity θ p Q hp hθ] with y hdensity rw [smul_eq_mul, hdensity, mul_comm, channelDirectionalScore_mul_outputDensity θ v p Q hp hθ y]
CausalSmith.Stat.LdpAteEfficiencySurface.channelDirectionalScore_integrable_outputLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:90
theorem setIntegral_channelDirectionalScore_outputLaw

the set integral channel directional score output law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the set Integral channel Directional Score output Law.

Formal statement
Y :
p :
ℝ
hθ :
A :
Set Y
hA :
∫ y in A, channelDirectionalScore θ p Q v y ∂outputLaw θ p Q
= ∫ y in A, channelDirectionalScore θ p Q v y * channelOutputDensity θ p Q y ∂dominatingMeasure Q
Proof (Lean source)
lemma setIntegral_channelDirectionalScore_outputLaw {Y : Type*} [MeasurableSpace Y] (θ v : TrialParameter) (p : ℝ) (Q : Kernel (Fin 4) Y) [IsMarkovKernel Q] (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (A : Set Y) (hA : MeasurableSet A) : ∫ y in A, channelDirectionalScore θ p Q v y ∂outputLaw θ p Q = ∫ y in A, channelDirectionalScore θ p Q v y * channelOutputDensity θ p Q y ∂dominatingMeasure Q := by let ν := dominatingMeasure Q let μ := outputLaw θ p Q letI : IsFiniteMeasure ν := ⟨by simp [ν, dominatingMeasure]⟩ letI : IsFiniteMeasure μ := by constructor dsimp [μ, outputLaw] simp only [Measure.coe_finsetSum, Finset.sum_apply, Measure.smul_apply, smul_eq_mul, measure_univ, mul_one] exact ENNReal.sum_lt_top.mpr fun _ _ => ENNReal.ofReal_lt_top change (∫ y in A, channelDirectionalScore θ p Q v y ∂μ) = _ rw [← Measure.withDensity_rnDeriv_eq μ ν (outputLaw_ac_dominatingMeasure θ p Q)] simp_rw [← integral_indicator hA] rw [integral_withDensity_eq_integral_toReal_smul (Measure.measurable_rnDeriv μ ν) (Measure.rnDeriv_lt_top μ ν)] apply integral_congr_ae filter_upwards [outputLawDensity_toReal_ae_eq_channelOutputDensity θ p Q hp hθ] with y hdensity have hdensity' : (μ.rnDeriv ν y).toReal = channelOutputDensity θ p Q y := by simpa [μ, ν] using hdensity by_cases hy : y ∈ A · simp [hy, smul_eq_mul, hdensity'] ring · simp [hy]
CausalSmith.Stat.LdpAteEfficiencySurface.setIntegral_channelDirectionalScore_outputLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:119
def liftedPrefixDirectionalScore

The prefix score lifted to successor coordinates. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The lifted Prefix Directional Score is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
z :
History (Z n) k (le_of_succ_le hk) × Z n (canonicalNextIndex hk)
liftedPrefixDirectionalScore P θ v p n k hk z :
ℝ
theorem measurable_liftedPrefixDirectionalScore

the measurable lifted prefix directional score assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_liftedPrefixDirectionalScore · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:166
theorem conditionalTranscriptPrefixDirectionalScore_integrable

the conditional transcript prefix directional score integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the conditional Transcript Prefix Directional Score integrable.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma conditionalTranscriptPrefixDirectionalScore_integrable {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : Integrable (conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk)) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) := by letI : IsMarkovKernel (P.channel n (nextIndex hk)) := (P.privacy n).1 (nextIndex hk) have h := integrable_conditionalTranscriptPrefixDirectionalScore_mul_successorRowKernelSection P θ v p hp hθ n k hk (0 : Fin 4) univ MeasurableSet.univ simpa [successorRowKernelSection] using h
CausalSmith.Stat.LdpAteEfficiencySurface.conditionalTranscriptPrefixDirectionalScore_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:178
theorem successorEventDerivative_eq_pastRows_add_currentScoreIntegral

Exact event characterization before the final projection step. The past part is in its verified row-disintegrated form, while the current channel score is integrated against the actual joint-channel output law. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the successor Event Derivative eq past Rows add current Score Integral.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))
hA :
= (∑ a : Fin 4, piTheta θ p a * ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk))
+ ∫ z in A, channelDirectionalScore θ p (sequentialJointChannel P n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) v z ∂outputLaw θ p (sequentialJointChannel P n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma successorEventDerivative_eq_pastRows_add_currentScoreIntegral {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (nextIndex hk))) (hA : MeasurableSet A) : predecessorSuccessorEventDerivative θ p (fun a => predecessorRowEventDerivative P θ v p n k hk a A) + sequentialJointEventDerivative P v p n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) A = (∑ a : Fin 4, piTheta θ p a * ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * successorRowKernelSection P n k hk a A h ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) + ∫ z in A, channelDirectionalScore θ p (sequentialJointChannel P n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) v z ∂outputLaw θ p (sequentialJointChannel P n (nextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) := by rw [predecessorSuccessorEventDerivative_eq_sum_integral_pastScore P θ v p hp hθ n k hk A hA] let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let Q := sequentialJointChannel P n (nextIndex hk) μ have hμ : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) have hQ : IsMarkovKernel Q := @sequentialJointChannel_isMarkov Z _ ε P n (nextIndex hk) μ hμ have hcurrent := (transcriptSuccessorLaw_jointScore_characterization P θ v p hp hθ n k hk A).2.1 have hchange := @setIntegral_channelDirectionalScore_outputLaw _ _ θ v p Q hQ hp hθ A hA change _ + sequentialJointEventDerivative P v p n (nextIndex hk) μ A = _ + ∫ z in A, channelDirectionalScore θ p Q v z ∂outputLaw θ p Q rw [hchange, hcurrent]
CausalSmith.Stat.LdpAteEfficiencySurface.successorEventDerivative_eq_pastRows_add_currentScoreIntegral · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:196
theorem liftedPrefixDirectionalScore_integrable_successorLaw

the lifted prefix directional score integrable successor law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the lifted Prefix Directional Score integrable successor Law.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma liftedPrefixDirectionalScore_integrable_successorLaw {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : Integrable (liftedPrefixDirectionalScore P θ v p n k hk) (outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))) := by let i := canonicalNextIndex hk let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let K : Kernel (History (Z n) k (le_of_succ_le hk)) (Z n i) := (observedStageKernel P θ p n i).comap (fun h => ((), h)) (measurable_const.prodMk measurable_id) letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) letI : IsMarkovKernel (observedStageKernel P θ p n i) := observedStageKernel_isMarkov P θ p hp hθ n i letI : IsMarkovKernel (P.channel n i) := (P.privacy n).1 i letI : IsMarkovKernel K := by dsimp [K] infer_instance have hout : outputLaw θ p (sequentialJointChannel P n i μ) = μ ⊗ₘ K := by simpa [K] using outputLaw_sequentialJointChannel P θ p hp hθ n i μ rw [hout] have hscore := conditionalTranscriptPrefixDirectionalScore_integrable P θ v p hp hθ n k hk have hmeas : AEStronglyMeasurable (liftedPrefixDirectionalScore P θ v p n k hk) (μ ⊗ₘ K) := (measurable_liftedPrefixDirectionalScore P θ v p n k hk).aestronglyMeasurable rw [Measure.integrable_compProd_iff hmeas] constructor · filter_upwards with h simpa [liftedPrefixDirectionalScore] using (integrable_const (conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h) : Integrable _ (K h)) · simpa [liftedPrefixDirectionalScore, μ] using hscore.norm
CausalSmith.Stat.LdpAteEfficiencySurface.liftedPrefixDirectionalScore_integrable_successorLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:237
theorem setIntegral_liftedPrefixDirectionalScore_successorLaw

the set integral lifted prefix directional score successor law assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the set Integral lifted Prefix Directional Score successor Law.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (canonicalNextIndex hk))
hA :
∫ z in A, liftedPrefixDirectionalScore P θ v p n k hk z ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))
= ∑ a : Fin 4, piTheta θ p a * ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * ((P.channel n (canonicalNextIndex hk)) (a, fsHistoryToPrivate (canonicalNextIndex hk) h) (Prod.mk h ⁻¹' A)).toReal ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk)
Proof (Lean source)
lemma setIntegral_liftedPrefixDirectionalScore_successorLaw {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (canonicalNextIndex hk))) (hA : MeasurableSet A) : ∫ z in A, liftedPrefixDirectionalScore P θ v p n k hk z ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) = ∑ a : Fin 4, piTheta θ p a * ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * ((P.channel n (canonicalNextIndex hk)) (a, fsHistoryToPrivate (canonicalNextIndex hk) h) (Prod.mk h ⁻¹' A)).toReal ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk) := by let i := canonicalNextIndex hk let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let K : Kernel (History (Z n) k (le_of_succ_le hk)) (Z n i) := (observedStageKernel P θ p n i).comap (fun h => ((), h)) (measurable_const.prodMk measurable_id) letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) letI : IsMarkovKernel (observedStageKernel P θ p n i) := observedStageKernel_isMarkov P θ p hp hθ n i letI : IsMarkovKernel (P.channel n i) := (P.privacy n).1 i letI : IsMarkovKernel K := by dsimp [K] infer_instance have hout : outputLaw θ p (sequentialJointChannel P n i μ) = μ ⊗ₘ K := by simpa [K] using outputLaw_sequentialJointChannel P θ p hp hθ n i μ rw [hout, ← integral_indicator hA] have hint : Integrable (A.indicator (liftedPrefixDirectionalScore P θ v p n k hk)) (μ ⊗ₘ K) := by rw [← hout] simpa only [nextIndex_eq_canonicalNextIndex] using (liftedPrefixDirectionalScore_integrable_successorLaw P θ v p hp hθ n k hk).indicator hA rw [Measure.integral_compProd hint] have hsection (h : History (Z n) k (le_of_succ_le hk)) : MeasurableSet (Prod.mk h ⁻¹' A) := hA.preimage (measurable_const.prodMk measurable_id) have hinner (h : History (Z n) k (le_of_succ_le hk)) : (∫ y, A.indicator (liftedPrefixDirectionalScore P θ v p n k hk) (h, y) ∂K h) = conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * ∑ a : Fin 4, piTheta θ p a * ((P.channel n i) (a, fsHistoryToPrivate i h) (Prod.mk h ⁻¹' A)).toReal := by rw [show (fun y => A.indicator (liftedPrefixDirectionalScore P θ v p n k hk) (h, y)) = (Prod.mk h ⁻¹' A).indicator (fun _ => conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h) by funext y by_cases hy : (h, y) ∈ A <;> simp [hy, liftedPrefixDirectionalScore]] rw [integral_indicator (hsection h), setIntegral_const] dsimp [K] simp only [observedStageKernel_apply, measureReal_def] rw [Measure.finsetSum_apply, ENNReal.toReal_sum] · simp only [Measure.smul_apply, smul_eq_mul, ENNReal.toReal_mul, ENNReal.toReal_ofReal (piTheta_pos_of_interior θ p hp hθ _).le] ring · intro a _ exact ENNReal.mul_ne_top ENNReal.ofReal_ne_top (measure_ne_top _ _) rw [show (fun h => ∫ y, A.indicator (liftedPrefixDirectionalScore P θ v p n k hk) (h, y) ∂K h) = fun h => conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * ∑ a : Fin 4, piTheta θ p a * ((P.channel n i) (a, fsHistoryToPrivate i h) (Prod.mk h ⁻¹' A)).toReal by funext h exact hinner h] simp only [Finset.mul_sum] rw [integral_finset_sum] · apply Finset.sum_congr rfl intro a _ rw [← integral_const_mul] apply integral_congr_ae filter_upwards with h ring · intro a _ let Krow : Kernel (History (Z n) k (le_of_succ_le hk)) (Z n i) := (P.channel n i).comap (fun h => (a, fsHistoryToPrivate i h)) (measurable_const.prodMk (measurable_fsHistoryToPrivate i)) have hmeas : Measurable (fun h : History (Z n) k (le_of_succ_le hk) => ((P.channel n i) (a, fsHistoryToPrivate i h) (Prod.mk h ⁻¹' A)).toReal) := (Krow.measurable_kernel_prodMk_left hA).ennreal_toReal have hbounded : ∀ h, ‖((P.channel n i) (a, fsHistoryToPrivate i h) (Prod.mk h ⁻¹' A)).toReal‖ ≤ 1 := by intro h rw [Real.norm_eq_abs, abs_of_nonneg ENNReal.toReal_nonneg] apply ENNReal.toReal_mono ENNReal.one_ne_top calc _ ≤ (P.channel n i) (a, fsHistoryToPrivate i h) univ := measure_mono (Set.subset_univ _) _ = 1 := measure_univ simpa only [mul_assoc, mul_left_comm, mul_comm] using ((conditionalTranscriptPrefixDirectionalScore_integrable P θ v p hp hθ n k hk).bdd_mul hmeas.aestronglyMeasurable (ae_of_all _ hbounded)).const_mul (piTheta θ p a)
CausalSmith.Stat.LdpAteEfficiencySurface.setIntegral_liftedPrefixDirectionalScore_successorLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:278
def successorDirectionalScoreCandidate

The full successor score candidate: the inherited prefix score plus the directional score of the current privatization channel. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. The successor Directional Score Candidate is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n k :
ℕ
hk :
k + 1 ≤ n
z :
History (Z n) k (le_of_succ_le hk) × Z n (canonicalNextIndex hk)
successorDirectionalScoreCandidate P θ v p n k hk z :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.successorDirectionalScoreCandidate · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:388
theorem successorDirectionalScoreCandidate_integrable

the successor directional score candidate integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the successor Directional Score Candidate integrable.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
Proof (Lean source)
lemma successorDirectionalScoreCandidate_integrable {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) : Integrable (successorDirectionalScoreCandidate P θ v p n k hk) (outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))) := by let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let Q := sequentialJointChannel P n (canonicalNextIndex hk) μ letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) letI : IsMarkovKernel Q := sequentialJointChannel_isMarkov P n (canonicalNextIndex hk) μ exact (liftedPrefixDirectionalScore_integrable_successorLaw P θ v p hp hθ n k hk).add (channelDirectionalScore_integrable_outputLaw θ v p Q hp hθ)
CausalSmith.Stat.LdpAteEfficiencySurface.successorDirectionalScoreCandidate_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:400
theorem setIntegral_successorDirectionalScoreCandidate_successorLaw

Canonical successor-coordinate packaging of the entire event derivative coefficient as one score integral. The first term is the derivative carried by the predecessor law and the second is the current-channel derivative. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the set Integral successor Directional Score Candidate successor Law.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (canonicalNextIndex hk))
hA :
∫ z in A, successorDirectionalScoreCandidate P θ v p n k hk z ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)))
= (∑ a : Fin 4, piTheta θ p a * ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * ((P.channel n (canonicalNextIndex hk)) (a, fsHistoryToPrivate (canonicalNextIndex hk) h) (Prod.mk h ⁻¹' A)).toReal ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk))
Proof (Lean source)
lemma setIntegral_successorDirectionalScoreCandidate_successorLaw {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (canonicalNextIndex hk))) (hA : MeasurableSet A) : ∫ z in A, successorDirectionalScoreCandidate P θ v p n k hk z ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) = (∑ a : Fin 4, piTheta θ p a * ∫ h, conditionalTranscriptPrefixDirectionalScore P θ v p n k (le_of_succ_le hk) h * ((P.channel n (canonicalNextIndex hk)) (a, fsHistoryToPrivate (canonicalNextIndex hk) h) (Prod.mk h ⁻¹' A)).toReal ∂transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) + sequentialJointEventDerivative P v p n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) A := by let μ := transcriptPrefixLaw P θ p n k (le_of_succ_le hk) let Q := sequentialJointChannel P n (canonicalNextIndex hk) μ letI : IsProbabilityMeasure μ := transcriptPrefixLaw_isProbability P θ p hp hθ n k (le_of_succ_le hk) letI : IsMarkovKernel Q := sequentialJointChannel_isMarkov P n (canonicalNextIndex hk) μ have hpast := liftedPrefixDirectionalScore_integrable_successorLaw P θ v p hp hθ n k hk have hcurrent := channelDirectionalScore_integrable_outputLaw θ v p Q hp hθ change (∫ z in A, liftedPrefixDirectionalScore P θ v p n k hk z + channelDirectionalScore θ p Q v z ∂outputLaw θ p Q) = _ rw [integral_add hpast.integrableOn hcurrent.integrableOn] rw [setIntegral_liftedPrefixDirectionalScore_successorLaw P θ v p hp hθ n k hk A hA] rw [setIntegral_channelDirectionalScore_outputLaw θ v p Q hp hθ A hA] exact congrArg (fun x => _ + x) (@setIntegral_sequentialJoint_channelDirectionalScore Z _ ε P θ v p hp hθ n (canonicalNextIndex hk) μ _ A)
CausalSmith.Stat.LdpAteEfficiencySurface.setIntegral_successorDirectionalScoreCandidate_successorLaw · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:421
theorem successorEventDerivative_eq_setIntegral_successorDirectionalScoreCandidate

The actual predecessor-plus-current successor derivative equals the single integral of the full candidate score. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the successor Event Derivative eq set Integral successor Directional Score Candidate.

Formal statement
Z :
ε :
ℝ
p :
ℝ
hθ :
n k :
ℕ
hk :
k + 1 ≤ n
A :
Set (History (Z n) k (le_of_succ_le hk) × Z n (canonicalNextIndex hk))
hA :
Proof (Lean source)
lemma successorEventDerivative_eq_setIntegral_successorDirectionalScoreCandidate {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (n k : ℕ) (hk : k + 1 ≤ n) (A : Set (History (Z n) k (le_of_succ_le hk) × Z n (canonicalNextIndex hk))) (hA : MeasurableSet A) : predecessorSuccessorEventDerivative θ p (fun a => predecessorRowEventDerivative P θ v p n k hk a A) + sequentialJointEventDerivative P v p n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk)) A = ∫ z in A, successorDirectionalScoreCandidate P θ v p n k hk z ∂outputLaw θ p (sequentialJointChannel P n (canonicalNextIndex hk) (transcriptPrefixLaw P θ p n k (le_of_succ_le hk))) := by rw [setIntegral_successorDirectionalScoreCandidate_successorLaw P θ v p hp hθ n k hk A hA] rw [predecessorSuccessorEventDerivative_eq_sum_integral_pastScore P θ v p hp hθ n k hk A hA] unfold successorRowKernelSection cases nextIndex_eq_canonicalNextIndex hk rfl
CausalSmith.Stat.LdpAteEfficiencySurface.successorEventDerivative_eq_setIntegral_successorDirectionalScoreCandidate · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialSuccessorScoreCharacterization.lean:463
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialVanTrees 14 declarations This file packages the finite-mixture transcript density along a scalar parameter path into the globally nonnegative likelihood fields required by the observation-dependent van Trees inequality.

Arbitrary-output van Trees likelihood fields

This file packages the finite-mixture transcript density along a scalar parameter path into the globally nonnegative likelihood fields required by the observation-dependent van Trees inequality. No countability or stagewise Radon--Nikodym selector is used.

theorem transcriptLaw_eq_withDensity_mixture

the transcript law eq with density mixture assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the transcript Law eq with Density mixture.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
(transcriptReferenceMeasure P n).withDensity (fun z ↦ ofReal (transcriptMixtureRealDensity P θ p n z))
= transcriptLaw P θ p n
Proof (Lean source)
lemma transcriptLaw_eq_withDensity_mixture {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : (transcriptReferenceMeasure P n).withDensity (fun z ↦ ofReal (transcriptMixtureRealDensity P θ p n z)) = transcriptLaw P θ p n := by rw [← transcriptLaw_eq_withDensity_reference P θ p n] apply withDensity_congr_ae filter_upwards [transcriptDensity_toReal_ae_eq_mixture_of_interior P θ p n hp hθ, Measure.rnDeriv_lt_top (transcriptLaw P θ p n) (transcriptReferenceMeasure P n)] with z hz htop rw [← hz] exact ENNReal.ofReal_toReal (ne_of_lt htop)
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptLaw_eq_withDensity_mixture · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:20
theorem integral_transcriptMixtureRealDensity_eq_one

the integral transcript mixture real density eq one assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the integral transcript Mixture Real Density eq one.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
hθ :
∫ z, transcriptMixtureRealDensity P θ p n z ∂transcriptReferenceMeasure P n = 1
Proof (Lean source)
lemma integral_transcriptMixtureRealDensity_eq_one {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ : TrialParameter) (p : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) : ∫ z, transcriptMixtureRealDensity P θ p n z ∂transcriptReferenceMeasure P n = 1 := by have hnonneg := transcriptMixtureRealDensity_nonneg P θ p n hp hθ letI (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 have hcomp (x : Fin n → Fin 4) : Integrable (transcriptComponentRealDensity P n x) (transcriptReferenceMeasure P n) := by have h := (integrable_toReal_rnDeriv_mul_iff (transcriptComponent_ac_reference P n x) (f := fun _ ↦ (1 : ℝ))).2 (integrable_const (1 : ℝ)) change Integrable (fun z ↦ ((P.transcript n x).rnDeriv (transcriptReferenceMeasure P n) z).toReal) (transcriptReferenceMeasure P n) simpa only [mul_one] using h have hint : Integrable (transcriptMixtureRealDensity P θ p n) (transcriptReferenceMeasure P n) := by unfold transcriptMixtureRealDensity exact integrable_finsetSum _ fun x _ ↦ (hcomp x).const_mul _ have hlaw := transcriptLaw_eq_withDensity_mixture P θ p n hp hθ have hmass := congrArg (fun μ : Measure (Transcript (Z n)) ↦ μ univ) hlaw rw [withDensity_apply _ MeasurableSet.univ, Measure.restrict_univ, ← ofReal_integral_eq_lintegral_ofReal hint (Filter.Eventually.of_forall hnonneg)] at hmass have hprob : transcriptLaw P θ p n univ = 1 := by letI : IsProbabilityMeasure (transcriptLaw P θ p n) := transcriptLaw_isProbability P θ p hp hθ n exact measure_univ rw [hprob] at hmass exact ENNReal.ofReal_eq_one.mp (by simpa using hmass)
CausalSmith.Stat.LdpAteEfficiencySurface.integral_transcriptMixtureRealDensity_eq_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:39
def vtDensity

the vt density is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The vt Density is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper a :
ℝ
z :
Transcript (Z n)
vtDensity P θ v p n ell upper a z :
ℝ
if a ∈ Icc ell upper then transcriptMixtureRealDensity P (parameterPath θ v a) p n z else 0
def vtDensityDeriv

the vt density deriv is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The vt Density Deriv is determined by the displayed parameters.

Definition (Lean source)
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper a :
ℝ
z :
Transcript (Z n)
vtDensityDeriv P θ v p n ell upper a z :
ℝ
if a ∈ Icc ell upper then transcriptMixtureRealDerivative P (parameterPath θ v a) v p n z else 0
theorem vtDensity_nonneg

the vt density nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper :
ℝ
hinterior :
∀ a ∈ Icc ell upper, InteriorMeans (parameterPath θ v a)
a z :
0 ≤ vtDensity P θ v p n ell upper a z
Proof (Lean source)
lemma vtDensity_nonneg {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (ell upper : ℝ) (hp : InteriorAssignment p) (hinterior : ∀ a ∈ Icc ell upper, InteriorMeans (parameterPath θ v a)) : ∀ a z, 0 ≤ vtDensity P θ v p n ell upper a z := by intro a z rw [vtDensity] split_ifs with ha · exact transcriptMixtureRealDensity_nonneg P _ p n hp (hinterior a ha) z · exact le_rfl
CausalSmith.Stat.LdpAteEfficiencySurface.vtDensity_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:91
theorem vtDensity_hasDerivAt

the vt density has deriv at assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper a :
ℝ
ha :
a ∈ Ioo ell upper
z :
Transcript (Z n)
HasDerivAt (fun b ↦ vtDensity P θ v p n ell upper b z) (vtDensityDeriv P θ v p n ell upper a z) a
Proof (Lean source)
lemma vtDensity_hasDerivAt {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) {ell upper a : ℝ} (ha : a ∈ Ioo ell upper) (z : Transcript (Z n)) : HasDerivAt (fun b ↦ vtDensity P θ v p n ell upper b z) (vtDensityDeriv P θ v p n ell upper a z) a := by have hnhds : Icc ell upper ∈ nhds a := Filter.mem_of_superset (isOpen_Ioo.mem_nhds ha) Set.Ioo_subset_Icc_self have heq : (fun b ↦ vtDensity P θ v p n ell upper b z) =ᶠ[nhds a] fun b ↦ transcriptMixtureRealDensity P (parameterPath θ v b) p n z := by filter_upwards [hnhds] with b hb simp [vtDensity, hb] have hder := hasDerivAt_transcriptMixtureRealDensity_parameterPath P θ v p a n z have haIcc : a ∈ Icc ell upper := ⟨ha.1.le, ha.2.le⟩ rw [vtDensityDeriv, if_pos haIcc] exact hder.congr_of_eventuallyEq heq
CausalSmith.Stat.LdpAteEfficiencySurface.vtDensity_hasDerivAt · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:104
theorem ae_hasDerivAt_vtDensity

The interval-extended likelihood has its declared derivative jointly almost everywhere under parameter measure times the arbitrary-output reference measure. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper :
ℝ
∀ᵐ az ∂((parameterMeasure ell upper).prod (transcriptReferenceMeasure P n)), HasDerivAt (fun b ↦ vtDensity P θ v p n ell upper b az.2) (vtDensityDeriv P θ v p n ell upper az.1 az.2) az.1
Proof (Lean source)
lemma ae_hasDerivAt_vtDensity {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (ell upper : ℝ) : ∀ᵐ az ∂((Causalean.Stat.Minimax.ObservationDependentVanTrees.parameterMeasure ell upper).prod (transcriptReferenceMeasure P n)), HasDerivAt (fun b ↦ vtDensity P θ v p n ell upper b az.2) (vtDensityDeriv P θ v p n ell upper az.1 az.2) az.1 := by let π := Causalean.Stat.Minimax.ObservationDependentVanTrees.parameterMeasure ell upper have hmem : ∀ᵐ a ∂π, a ∈ Ioo ell upper := by unfold π Causalean.Stat.Minimax.ObservationDependentVanTrees.parameterMeasure filter_upwards [ae_restrict_mem measurableSet_Icc, ae_restrict_of_ae (volume.ae_ne ell), ae_restrict_of_ae (volume.ae_ne upper)] with a ha haell haupper exact ⟨lt_of_le_of_ne ha.1 (Ne.symm haell), lt_of_le_of_ne ha.2 haupper⟩ have hlift : ∀ᵐ az ∂(π.prod (transcriptReferenceMeasure P n)), az.1 ∈ Ioo ell upper := Measure.quasiMeasurePreserving_fst.tendsto_ae.eventually hmem filter_upwards [hlift] with az haz exact vtDensity_hasDerivAt P θ v p n haz az.2
CausalSmith.Stat.LdpAteEfficiencySurface.ae_hasDerivAt_vtDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:123
theorem vtDensity_integral_eq_one

the vt density integral eq one assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper :
ℝ
hinterior :
∀ a ∈ Icc ell upper, InteriorMeans (parameterPath θ v a)
a :
ℝ
ha :
a ∈ Icc ell upper
∫ z, vtDensity P θ v p n ell upper a z ∂transcriptReferenceMeasure P n = 1
Proof (Lean source)
lemma vtDensity_integral_eq_one {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (ell upper : ℝ) (hp : InteriorAssignment p) (hinterior : ∀ a ∈ Icc ell upper, InteriorMeans (parameterPath θ v a)) {a : ℝ} (ha : a ∈ Icc ell upper) : ∫ z, vtDensity P θ v p n ell upper a z ∂transcriptReferenceMeasure P n = 1 := by simp only [vtDensity, if_pos ha] exact integral_transcriptMixtureRealDensity_eq_one P _ p n hp (hinterior a ha)
CausalSmith.Stat.LdpAteEfficiencySurface.vtDensity_integral_eq_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:146
theorem vtDensity_integral_hasDerivAt

the vt density integral has deriv at assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper :
ℝ
hinterior :
∀ a ∈ Icc ell upper, InteriorMeans (parameterPath θ v a)
a :
ℝ
ha :
a ∈ Ioo ell upper
HasDerivAt (fun b ↦ ∫ z, vtDensity P θ v p n ell upper b z ∂transcriptReferenceMeasure P n) 0 a
Proof (Lean source)
lemma vtDensity_integral_hasDerivAt {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (ell upper : ℝ) (hp : InteriorAssignment p) (hinterior : ∀ a ∈ Icc ell upper, InteriorMeans (parameterPath θ v a)) {a : ℝ} (ha : a ∈ Ioo ell upper) : HasDerivAt (fun b ↦ ∫ z, vtDensity P θ v p n ell upper b z ∂transcriptReferenceMeasure P n) 0 a := by have hnhds : Icc ell upper ∈ nhds a := Filter.mem_of_superset (isOpen_Ioo.mem_nhds ha) Set.Ioo_subset_Icc_self have heq : (fun b ↦ ∫ z, vtDensity P θ v p n ell upper b z ∂transcriptReferenceMeasure P n) =ᶠ[nhds a] fun _ ↦ (1 : ℝ) := by filter_upwards [hnhds] with b hb exact vtDensity_integral_eq_one P θ v p n ell upper hp hinterior hb exact (hasDerivAt_const (x := a) (c := (1 : ℝ))).congr_of_eventuallyEq heq
CausalSmith.Stat.LdpAteEfficiencySurface.vtDensity_integral_hasDerivAt · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:158
theorem integrable_transcriptMixtureRealDerivative

the integrable transcript mixture real derivative assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
Proof (Lean source)
lemma integrable_transcriptMixtureRealDerivative {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) : Integrable (transcriptMixtureRealDerivative P θ v p n) (transcriptReferenceMeasure P n) := by letI (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 have hcomp (x : Fin n → Fin 4) : Integrable (transcriptComponentRealDensity P n x) (transcriptReferenceMeasure P n) := by have h := (integrable_toReal_rnDeriv_mul_iff (transcriptComponent_ac_reference P n x) (f := fun _ ↦ (1 : ℝ))).2 (integrable_const (1 : ℝ)) change Integrable (fun z ↦ ((P.transcript n x).rnDeriv (transcriptReferenceMeasure P n) z).toReal) (transcriptReferenceMeasure P n) simpa only [mul_one] using h unfold transcriptMixtureRealDerivative exact integrable_finsetSum _ fun x _ ↦ (hcomp x).const_mul _
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_transcriptMixtureRealDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:175
theorem vtDensity_integrable

the vt density integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper :
ℝ
a :
ℝ
ha :
a ∈ Icc ell upper
Integrable (vtDensity P θ v p n ell upper a) (transcriptReferenceMeasure P n)
Proof (Lean source)
lemma vtDensity_integrable {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (ell upper : ℝ) {a : ℝ} (ha : a ∈ Icc ell upper) : Integrable (vtDensity P θ v p n ell upper a) (transcriptReferenceMeasure P n) := by unfold vtDensity letI (x : Fin n → Fin 4) : IsProbabilityMeasure (P.transcript n x) := (P.factorizes n x).1 have hraw : Integrable (transcriptMixtureRealDensity P (parameterPath θ v a) p n) (transcriptReferenceMeasure P n) := by unfold transcriptMixtureRealDensity exact integrable_finsetSum _ fun x _ ↦ (by have h := (integrable_toReal_rnDeriv_mul_iff (transcriptComponent_ac_reference P n x) (f := fun _ ↦ (1 : ℝ))).2 (integrable_const (1 : ℝ)) have hc : Integrable (transcriptComponentRealDensity P n x) (transcriptReferenceMeasure P n) := by change Integrable (fun z ↦ ((P.transcript n x).rnDeriv (transcriptReferenceMeasure P n) z).toReal) (transcriptReferenceMeasure P n) simpa only [mul_one] using h exact hc.const_mul _) simpa only [if_pos ha] using hraw
CausalSmith.Stat.LdpAteEfficiencySurface.vtDensity_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:195
theorem vtDensityDeriv_integrable

the vt density deriv integrable assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper :
ℝ
a :
ℝ
ha :
a ∈ Icc ell upper
Proof (Lean source)
lemma vtDensityDeriv_integrable {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (ell upper : ℝ) {a : ℝ} (ha : a ∈ Icc ell upper) : Integrable (vtDensityDeriv P θ v p n ell upper a) (transcriptReferenceMeasure P n) := by unfold vtDensityDeriv simpa only [if_pos ha] using integrable_transcriptMixtureRealDerivative P (parameterPath θ v a) v p n
CausalSmith.Stat.LdpAteEfficiencySurface.vtDensityDeriv_integrable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:222
theorem transcriptDensityPath_contDiff

the transcript density path cont diff assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
z :
Transcript (Z n)
ContDiff ℝ 1 (fun a ↦ transcriptMixtureRealDensity P (parameterPath θ v a) p n z)
Proof (Lean source)
lemma transcriptDensityPath_contDiff {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (z : Transcript (Z n)) : ContDiff ℝ 1 (fun a ↦ transcriptMixtureRealDensity P (parameterPath θ v a) p n z) := by unfold transcriptMixtureRealDensity apply ContDiff.sum intro x hx apply ContDiff.mul · unfold inputPathProbability apply contDiff_prod intro i hi generalize hxi : x i = j fin_cases j <;> simp [piTheta, parameterPath, hxi] <;> fun_prop · fun_prop
CausalSmith.Stat.LdpAteEfficiencySurface.transcriptDensityPath_contDiff · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:233
theorem vtDensity_absolutelyContinuous

the vt density absolutely continuous assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper :
ℝ
hellu :
ell < upper
z :
Transcript (Z n)
AbsolutelyContinuousOnInterval (fun a ↦ vtDensity P θ v p n ell upper a z) ell upper
Proof (Lean source)
lemma vtDensity_absolutelyContinuous {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (ell upper : ℝ) (hellu : ell < upper) (z : Transcript (Z n)) : AbsolutelyContinuousOnInterval (fun a ↦ vtDensity P θ v p n ell upper a z) ell upper := by have hraw : AbsolutelyContinuousOnInterval (fun a ↦ transcriptMixtureRealDensity P (parameterPath θ v a) p n z) ell upper := (transcriptDensityPath_contDiff P θ v p n z).contDiffOn |>.absolutelyContinuousOnInterval rw [absolutelyContinuousOnInterval_iff] at hraw ⊢ intro δ hδ obtain ⟨η, hη, hraw⟩ := hraw δ hδ refine ⟨η, hη, ?_⟩ rintro ⟨m, I⟩ hI hlen have hbound : ∀ i ∈ range m, (I i).1 ∈ Icc ell upper ∧ (I i).2 ∈ Icc ell upper := by intro i hi have hi' := hI.1 i hi simpa [Set.uIcc_of_le hellu.le] using hi' convert hraw (m, I) hI hlen using 1 apply Finset.sum_congr rfl intro i hi rw [vtDensity, if_pos (hbound i hi).1, vtDensity, if_pos (hbound i hi).2]
CausalSmith.Stat.LdpAteEfficiencySurface.vtDensity_absolutelyContinuous · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTrees.lean:251
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialVanTreesAssembly 2 declarations This file assembles the paper's already verified likelihood, prior, target, and product-integral adapters into a finite-sample Bayes inequality.

Finite-sample sequential van Trees assembly

This file assembles the paper's already verified likelihood, prior, target, and product-integral adapters into a finite-sample Bayes inequality. Transcript Fisher integrability and its numerical upper bound remain explicit premises; they are the score-projection and Doob-information obligations.

theorem integrable_scoreSqField_of_prior_fisher_cross

Prior-score, likelihood-score, and cross-term integrability imply integrability of the guarded joint-score square. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
w dw :
ℝ → ℝ
q dq :
ℝ → X → ℝ
mu :
Measure (ℝ × X)
hw :
∀ a, 0 ≤ w a
hq :
∀ a x, 0 ≤ q a x
hprior :
Integrable (fun z : ℝ × X => w z.1 * q z.1 z.2 * (priorScore w dw z.1) ^ 2) mu
hfisher :
Integrable (fun z : ℝ × X => w z.1 * q z.1 z.2 * (likelihoodScore q dq z.1 z.2) ^ 2) mu
hcross :
Integrable (fun z : ℝ × X => w z.1 * q z.1 z.2 * (priorScore w dw z.1 * likelihoodScore q dq z.1 z.2)) mu
Integrable (scoreSqField w dw q dq) mu
Proof (Lean source)
lemma integrable_scoreSqField_of_prior_fisher_cross {X : Type*} [MeasurableSpace X] (w dw : ℝ → ℝ) (q dq : ℝ → X → ℝ) (mu : Measure (ℝ × X)) (hw : ∀ a, 0 ≤ w a) (hq : ∀ a x, 0 ≤ q a x) (hprior : Integrable (fun z : ℝ × X => w z.1 * q z.1 z.2 * (priorScore w dw z.1) ^ 2) mu) (hfisher : Integrable (fun z : ℝ × X => w z.1 * q z.1 z.2 * (likelihoodScore q dq z.1 z.2) ^ 2) mu) (hcross : Integrable (fun z : ℝ × X => w z.1 * q z.1 z.2 * (priorScore w dw z.1 * likelihoodScore q dq z.1 z.2)) mu) : Integrable (scoreSqField w dw q dq) mu := by have hscore_expand (a : ℝ) (x : X) : scoreSqField w dw q dq (a, x) = w a * q a x * (priorScore w dw a) ^ 2 + (w a * q a x * (likelihoodScore q dq a x) ^ 2 + 2 * (w a * q a x * (priorScore w dw a * likelihoodScore q dq a x))) := by by_cases hwpos : 0 < w a · by_cases hqpos : 0 < q a x · simp only [scoreSqField, jointScore, jointDensity, priorScore, likelihoodScore, hwpos, hqpos, mul_pos, if_true] field_simp ring · have hqzero : q a x = 0 := le_antisymm (le_of_not_gt hqpos) (hq a x) simp [scoreSqField, jointScore, jointDensity, hqzero] · have hwzero : w a = 0 := le_antisymm (le_of_not_gt hwpos) (hw a) simp [scoreSqField, jointScore, jointDensity, hwzero] have hsum := hprior.add (hfisher.add (hcross.const_mul 2)) exact hsum.congr (Filter.Eventually.of_forall fun z => (hscore_expand z.1 z.2).symm)
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_scoreSqField_of_prior_fisher_cross · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesAssembly.lean:21
theorem sequential_vanTrees_bayes_lower_bound_of_fisher_control

For a compact scalar path, finite weighted transcript Fisher information and an explicit bound on its prior average give the finite-sample Bayes risk lower bound. The Fisher premises are precisely the part supplied later by score projection and the sequential Doob bound. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p R I :
ℝ
n :
ℕ
hR :
0 < R
hinterior :
∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ v a)
T :
Transcript (Z n) → ℝ
hT :
herrorSqInt :
hfisherSqInt :
Integrable (fun z : ℝ × Transcript (Z n) => sequentialVTPrior R z.1 * vtDensity P θ v p n (-R) R z.1 z.2 * (likelihoodScore (vtDensity P θ v p n (-R) R) (vtDensityDeriv P θ v p n (-R) R) z.1 z.2) ^ 2) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))
hfisher_le :
(∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ v p n (-R) R) (vtDensityDeriv P θ v p n (-R) R) a ∂parameterMeasure (-R) R)
≤ I
hinfoPos :
+ ∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ v p n (-R) R) (vtDensityDeriv P θ v p n (-R) R) a ∂parameterMeasure (-R) R
contrast v ^ 2 / (I + 40 / R ^ 2)
≤ ∫ z, errorSqField (sequentialVTPrior R) (vtDensity P θ v p n (-R) R) (vtTarget θ v) T z ∂((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))
Proof (Lean source)
lemma sequential_vanTrees_bayes_lower_bound_of_fisher_control {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p R I : ℝ) (n : ℕ) (hR : 0 < R) (hp : InteriorAssignment p) (hinterior : ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ v a)) (T : Transcript (Z n) → ℝ) (hT : Measurable T) (herrorSqInt : Integrable (errorSqField (sequentialVTPrior R) (vtDensity P θ v p n (-R) R) (vtTarget θ v) T) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))) (hfisherSqInt : Integrable (fun z : ℝ × Transcript (Z n) => sequentialVTPrior R z.1 * vtDensity P θ v p n (-R) R z.1 z.2 * (likelihoodScore (vtDensity P θ v p n (-R) R) (vtDensityDeriv P θ v p n (-R) R) z.1 z.2) ^ 2) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))) (hfisher_le : (∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ v p n (-R) R) (vtDensityDeriv P θ v p n (-R) R) a ∂parameterMeasure (-R) R) ≤ I) (hinfoPos : 0 < priorInformation (-R) R (sequentialVTPrior R) (sequentialVTPriorDeriv R) + ∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ v p n (-R) R) (vtDensityDeriv P θ v p n (-R) R) a ∂parameterMeasure (-R) R) : contrast v ^ 2 / (I + 40 / R ^ 2) ≤ ∫ z, errorSqField (sequentialVTPrior R) (vtDensity P θ v p n (-R) R) (vtTarget θ v) T z ∂((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n)) := by let mu := transcriptReferenceMeasure P n let q := vtDensity P θ v p n (-R) R let dq := vtDensityDeriv P θ v p n (-R) R let w := sequentialVTPrior R let dw := sequentialVTPriorDeriv R let g := vtTarget (X := Transcript (Z n)) θ v let dg := vtTargetDeriv (X := Transcript (Z n)) v have hprior := sequentialVTPrior_facts hR have hmeas := sequentialVanTreesProductMeasurable P θ v p R n hR T hT have hmem : ∀ᵐ a ∂parameterMeasure (-R) R, a ∈ Icc (-R) R := by unfold parameterMeasure exact ae_restrict_mem measurableSet_Icc have hnormAE : ∀ᵐ a ∂parameterMeasure (-R) R, ∫ z, q a z ∂mu = 1 := by filter_upwards [hmem] with a ha exact vtDensity_integral_eq_one P θ v p n (-R) R hp hinterior ha have hqintAE : ∀ᵐ a ∂parameterMeasure (-R) R, Integrable (q a) mu := by filter_upwards [hmem] with a ha exact vtDensity_integrable P θ v p n (-R) R ha have hjointInt : Integrable (jointDensity w q) ((parameterMeasure (-R) R).prod mu) := by apply integrable_jointDensity_of_normalization w q · exact hprior.nonneg · exact vtDensity_nonneg P θ v p n (-R) R hp hinterior · exact hqintAE · exact hnormAE · unfold w sequentialVTPrior exact smoothPrior_integrable_parameterMeasure (by linarith) · exact ((hprior.contDiff.continuous.measurable.comp measurable_fst).mul (measurable_vtDensity_joint P θ v p n (-R) R)).aestronglyMeasurable have hsensitivityInt : Integrable (sensitivityField w q dg) ((parameterMeasure (-R) R).prod mu) := integrable_sequentialSensitivity_of_jointDensity w q v _ hjointInt have hpriorJointInt : Integrable (fun z : ℝ × Transcript (Z n) => w z.1 * q z.1 z.2 * (priorScore w dw z.1) ^ 2) ((parameterMeasure (-R) R).prod mu) := by apply integrable_priorJointSq_of_normalization w dw q · exact hprior.nonneg · exact vtDensity_nonneg P θ v p n (-R) R hp hinterior · exact hqintAE · exact hnormAE · exact hprior.scoreSqIntegrable · exact hmeas.priorJointSq.aestronglyMeasurable have hwmeas : Measurable w := hprior.contDiff.continuous.measurable have hdwmeas : Measurable dw := by unfold dw sequentialVTPriorDeriv smoothPriorDeriv apply Measurable.ite · exact measurableSet_lt (continuous_abs.comp (continuous_id.sub continuous_const)).measurable measurable_const · fun_prop · exact measurable_const have hqmeas : Measurable (fun z : ℝ × Transcript (Z n) => q z.1 z.2) := measurable_vtDensity_joint P θ v p n (-R) R have hdqmeas : Measurable (fun z : ℝ × Transcript (Z n) => dq z.1 z.2) := measurable_vtDensityDeriv_joint P θ v p n (-R) R have hcrossInt : Integrable (fun z : ℝ × Transcript (Z n) => w z.1 * q z.1 z.2 * (priorScore w dw z.1 * likelihoodScore q dq z.1 z.2)) ((parameterMeasure (-R) R).prod mu) := by exact integrable_priorLikelihoodCross_of_squares w dw q dq _ hwmeas hdwmeas hqmeas hdqmeas hprior.nonneg (vtDensity_nonneg P θ v p n (-R) R hp hinterior) hpriorJointInt hfisherSqInt have hscoreSqInt : Integrable (scoreSqField w dw q dq) ((parameterMeasure (-R) R).prod mu) := integrable_scoreSqField_of_prior_fisher_cross w dw q dq _ hprior.nonneg (vtDensity_nonneg P θ v p n (-R) R hp hinterior) hpriorJointInt hfisherSqInt hcrossInt have hscoreMeas : Measurable (jointScore w dw q dq) := by unfold jointScore jointDensity exact Measurable.ite (measurableSet_lt measurable_const ((hwmeas.comp measurable_fst).mul hqmeas)) (((hdwmeas.comp measurable_fst).mul hqmeas |>.add ((hwmeas.comp measurable_fst).mul hdqmeas)).div ((hwmeas.comp measurable_fst).mul hqmeas)) measurable_const have herrorScoreInt : Integrable (errorScoreField w dw q dq g T) ((parameterMeasure (-R) R).prod mu) := integrable_errorScoreField_of_squares w dw q dq g T _ hwmeas hqmeas (by unfold g vtTarget; fun_prop) hT hscoreMeas hprior.nonneg (vtDensity_nonneg P θ v p n (-R) R hp hinterior) herrorSqInt hscoreSqInt have hwzero : ∀ a, w a = 0 → dw a = 0 := by intro a ha exact derivative_eq_zero_of_nonnegative_of_eq_zero hprior.nonneg (hprior.hasDeriv a) ha have hqzero : ∀ᵐ z ∂((parameterMeasure (-R) R).prod mu), q z.1 z.2 = 0 → dq z.1 z.2 = 0 := by filter_upwards [ae_hasDerivAt_vtDensity P θ v p n (-R) R] with z hz exact derivative_eq_zero_of_nonnegative_of_eq_zero (fun a => vtDensity_nonneg P θ v p n (-R) R hp hinterior a z.2) hz have hbalanceInt : Integrable (derivativeBalanceField w dw q dq g dg T) ((parameterMeasure (-R) R).prod mu) := by apply (herrorScoreInt.sub hsensitivityInt).congr filter_upwards [hqzero] with z hz have heq : derivativeBalanceField w dw q dq g dg T z = errorScoreField w dw q dq g T z - sensitivityField w q dg z := by rw [errorScoreField_eq_numerator (hprior.nonneg z.1) (vtDensity_nonneg P θ v p n (-R) R hp hinterior z.1 z.2) (hwzero z.1) hz] unfold derivativeBalanceField sensitivityField jointDensity ring exact heq.symm have hboundary : ∀ᵐ z ∂mu, w R * q R z * (T z - g R z) = 0 ∧ w (-R) * q (-R) z * (T z - g (-R) z) = 0 := by have hend := sequentialVTPrior_endpoints hR filter_upwards with z simp [w, hend.1, hend.2] have hvan := observation_dependent_van_trees mu (by linarith : -R < R) w dw q dq g dg T hprior.contDiff hprior.hasDeriv hprior.nonneg (vtDensity_nonneg P θ v p n (-R) R hp hinterior) (fun a ha => vtDensity_integral_eq_one P θ v p n (-R) R hp hinterior ha) (fun a ha => by have hzero : ∫ z, dq a z ∂mu = 0 := by have haIcc : a ∈ Icc (-R) R := ⟨ha.1.le, ha.2.le⟩ simpa [dq, mu, vtDensityDeriv, haIcc] using integral_transcriptMixtureRealDerivative_eq_zero P (parameterPath θ v a) v p n rw [hzero] exact vtDensity_integral_hasDerivAt P θ v p n (-R) R hp hinterior ha) (Filter.Eventually.of_forall (vtDensity_absolutelyContinuous P θ v p n (-R) R (by linarith))) (Filter.Eventually.of_forall (fun z => vtTarget_absolutelyContinuous θ v z (-R) R)) (ae_hasDerivAt_vtDensity P θ v p n (-R) R) (Filter.Eventually.of_forall (fun z => hasDerivAt_vtTarget θ v z.1 z.2)) hboundary hbalanceInt hmeas.errorScore.aestronglyMeasurable herrorScoreInt hsensitivityInt hmeas.errorSq.aestronglyMeasurable herrorSqInt hmeas.scoreSq.aestronglyMeasurable hscoreSqInt hpriorJointInt hfisherSqInt hcrossInt hinfoPos have hsensitivity : (∫ z, sensitivityField w q dg z ∂((parameterMeasure (-R) R).prod mu)) = contrast v := integral_sequentialSensitivity_eq w q v hprior.normalized hnormAE hsensitivityInt have hdenom : priorInformation (-R) R w dw + ∫ a, w a * fisherInformation mu q dq a ∂parameterMeasure (-R) R ≤ I + 40 / R ^ 2 := by rw [hprior.information] linarith have hcompare : contrast v ^ 2 / (I + 40 / R ^ 2) ≤ contrast v ^ 2 / (priorInformation (-R) R w dw + ∫ a, w a * fisherInformation mu q dq a ∂parameterMeasure (-R) R) := div_le_div₀ (sq_nonneg _) le_rfl hinfoPos hdenom apply hcompare.trans simpa [mu, q, dq, w, dw, g, dg, hsensitivity] using hvan
CausalSmith.Stat.LdpAteEfficiencySurface.sequential_vanTrees_bayes_lower_bound_of_fisher_control · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesAssembly.lean:57
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialVanTreesIntegrals 10 declarations Product integral identities for the sequential van Trees adapter

Product integral identities for the sequential van Trees adapter

theorem integrable_jointDensity_of_normalization

Integrable normalized likelihood sections lift an integrable nonnegative prior density to an integrable joint density. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
ell upper :
ℝ
w :
ℝ → ℝ
p :
ℝ → X → ℝ
hw_nonneg :
∀ a, 0 ≤ w a
hp_nonneg :
∀ a x, 0 ≤ p a x
hpint :
∀ᵐ a ∂parameterMeasure ell upper, Integrable (fun x ↦ p a x) mu
hnorm :
∀ᵐ a ∂parameterMeasure ell upper, ∫ x, p a x ∂mu = 1
hwint :
Proof (Lean source)
lemma integrable_jointDensity_of_normalization {X : Type*} [MeasurableSpace X] {mu : Measure X} [SigmaFinite mu] {ell upper : ℝ} (w : ℝ → ℝ) (p : ℝ → X → ℝ) (hw_nonneg : ∀ a, 0 ≤ w a) (hp_nonneg : ∀ a x, 0 ≤ p a x) (hpint : ∀ᵐ a ∂parameterMeasure ell upper, Integrable (fun x ↦ p a x) mu) (hnorm : ∀ᵐ a ∂parameterMeasure ell upper, ∫ x, p a x ∂mu = 1) (hwint : Integrable w (parameterMeasure ell upper)) (hmeas : AEStronglyMeasurable (jointDensity w p) ((parameterMeasure ell upper).prod mu)) : Integrable (jointDensity w p) ((parameterMeasure ell upper).prod mu) := by rw [integrable_prod_iff hmeas] constructor · filter_upwards [hpint] with a ha exact (ha.const_mul (w a)).congr (by filter_upwards with x rfl) · apply hwint.congr filter_upwards [hnorm] with a ha symm unfold jointDensity calc ∫ x, ‖w a * p a x‖ ∂mu = ∫ x, w a * p a x ∂mu := by apply integral_congr_ae filter_upwards with x rw [Real.norm_of_nonneg (mul_nonneg (hw_nonneg a) (hp_nonneg a x))] _ = w a * ∫ x, p a x ∂mu := integral_const_mul (μ := mu) (w a) (fun x ↦ p a x) _ = w a := by rw [ha, mul_one]
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_jointDensity_of_normalization · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesIntegrals.lean:15
theorem integrable_sequentialSensitivity_of_jointDensity

Joint-density integrability gives integrability of the affine target sensitivity field. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
w :
ℝ → ℝ
p :
ℝ → X → ℝ
mu :
Measure (ℝ × X)
hjoint :
Proof (Lean source)
lemma integrable_sequentialSensitivity_of_jointDensity {X : Type*} [MeasurableSpace X] (w : ℝ → ℝ) (p : ℝ → X → ℝ) (v : TrialParameter) (mu : Measure (ℝ × X)) (hjoint : Integrable (jointDensity w p) mu) : Integrable (sensitivityField w p (vtTargetDeriv (X := X) v)) mu := by have h := hjoint.const_mul (contrast v) apply h.congr filter_upwards with z unfold sensitivityField vtTargetDeriv rfl
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_sequentialSensitivity_of_jointDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesIntegrals.lean:46
theorem integrable_priorJointSq_of_normalization

Prior-score integrability and normalized integrable likelihood sections imply integrability of the lifted prior-score square on product space. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
ell upper :
ℝ
w dw :
ℝ → ℝ
p :
ℝ → X → ℝ
hw_nonneg :
∀ a, 0 ≤ w a
hp_nonneg :
∀ a x, 0 ≤ p a x
hpint :
∀ᵐ a ∂parameterMeasure ell upper, Integrable (fun x ↦ p a x) mu
hnorm :
∀ᵐ a ∂parameterMeasure ell upper, ∫ x, p a x ∂mu = 1
hprior :
Integrable (fun a ↦ w a * (priorScore w dw a) ^ 2) (parameterMeasure ell upper)
hmeas :
AEStronglyMeasurable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2) ((parameterMeasure ell upper).prod mu)
Integrable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2) ((parameterMeasure ell upper).prod mu)
Proof (Lean source)
lemma integrable_priorJointSq_of_normalization {X : Type*} [MeasurableSpace X] {mu : Measure X} [SigmaFinite mu] {ell upper : ℝ} (w dw : ℝ → ℝ) (p : ℝ → X → ℝ) (hw_nonneg : ∀ a, 0 ≤ w a) (hp_nonneg : ∀ a x, 0 ≤ p a x) (hpint : ∀ᵐ a ∂parameterMeasure ell upper, Integrable (fun x ↦ p a x) mu) (hnorm : ∀ᵐ a ∂parameterMeasure ell upper, ∫ x, p a x ∂mu = 1) (hprior : Integrable (fun a ↦ w a * (priorScore w dw a) ^ 2) (parameterMeasure ell upper)) (hmeas : AEStronglyMeasurable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2) ((parameterMeasure ell upper).prod mu)) : Integrable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2) ((parameterMeasure ell upper).prod mu) := by rw [integrable_prod_iff hmeas] constructor · filter_upwards [hpint] with a ha have hc := ha.const_mul (w a * (priorScore w dw a) ^ 2) apply hc.congr filter_upwards with x ring · apply hprior.congr filter_upwards [hnorm] with a ha symm calc ∫ x, ‖w a * p a x * (priorScore w dw a) ^ 2‖ ∂mu = ∫ x, w a * p a x * (priorScore w dw a) ^ 2 ∂mu := by apply integral_congr_ae filter_upwards with x rw [Real.norm_of_nonneg (mul_nonneg (mul_nonneg (hw_nonneg a) (hp_nonneg a x)) (sq_nonneg _))] _ = (w a * (priorScore w dw a) ^ 2) * ∫ x, p a x ∂mu := by rw [← integral_const_mul (μ := mu) (w a * (priorScore w dw a) ^ 2) (fun x ↦ p a x)] apply integral_congr_ae filter_upwards with x ring _ = w a * (priorScore w dw a) ^ 2 := by rw [ha, mul_one]
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_priorJointSq_of_normalization · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesIntegrals.lean:59
theorem integral_priorJointSq_eq_priorInformation

A normalized likelihood lifts the prior score square from parameter space to parameter--observation product space without changing its integral. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
ell upper :
ℝ
w dw :
ℝ → ℝ
p :
ℝ → X → ℝ
hnorm :
∀ᵐ a ∂parameterMeasure ell upper, ∫ x, p a x ∂mu = 1
hint :
Integrable (fun z : ℝ × X => w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2) ((parameterMeasure ell upper).prod mu)
∫ z, w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2 ∂((parameterMeasure ell upper).prod mu)
= priorInformation ell upper w dw
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma integral_priorJointSq_eq_priorInformation {X : Type*} [MeasurableSpace X] {mu : Measure X} [SigmaFinite mu] {ell upper : ℝ} (w dw : ℝ → ℝ) (p : ℝ → X → ℝ) (hnorm : ∀ᵐ a ∂parameterMeasure ell upper, ∫ x, p a x ∂mu = 1) (hint : Integrable (fun z : ℝ × X => w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2) ((parameterMeasure ell upper).prod mu)) : ∫ z, w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2 ∂((parameterMeasure ell upper).prod mu) = priorInformation ell upper w dw := by letI : IsFiniteMeasure (parameterMeasure ell upper) := by unfold parameterMeasure infer_instance rw [integral_prod _ hint] unfold priorInformation apply integral_congr_ae filter_upwards [hnorm] with a ha calc ∫ x, w a * p a x * (priorScore w dw a) ^ 2 ∂mu = ∫ x, (w a * (priorScore w dw a) ^ 2) * p a x ∂mu := by apply integral_congr_ae filter_upwards with x ring _ = (w a * (priorScore w dw a) ^ 2) * ∫ x, p a x ∂mu := integral_const_mul (μ := mu) (w a * (priorScore w dw a) ^ 2) (fun x ↦ p a x) _ = w a * (priorScore w dw a) ^ 2 := by rw [ha, mul_one]
CausalSmith.Stat.LdpAteEfficiencySurface.integral_priorJointSq_eq_priorInformation · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesIntegrals.lean:101
theorem integral_fisherJointSq_eq

The product integral of the weighted likelihood-score square is the prior average of conditional Fisher information. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
ell upper :
ℝ
w :
ℝ → ℝ
p dp :
ℝ → X → ℝ
hint :
Integrable (fun z : ℝ × X => w z.1 * p z.1 z.2 * (likelihoodScore p dp z.1 z.2) ^ 2) ((parameterMeasure ell upper).prod mu)
∫ z, w z.1 * p z.1 z.2 * (likelihoodScore p dp z.1 z.2) ^ 2 ∂((parameterMeasure ell upper).prod mu)
= ∫ a, w a * fisherInformation mu p dp a ∂parameterMeasure ell upper
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma integral_fisherJointSq_eq {X : Type*} [MeasurableSpace X] {mu : Measure X} [SigmaFinite mu] {ell upper : ℝ} (w : ℝ → ℝ) (p dp : ℝ → X → ℝ) (hint : Integrable (fun z : ℝ × X => w z.1 * p z.1 z.2 * (likelihoodScore p dp z.1 z.2) ^ 2) ((parameterMeasure ell upper).prod mu)) : ∫ z, w z.1 * p z.1 z.2 * (likelihoodScore p dp z.1 z.2) ^ 2 ∂((parameterMeasure ell upper).prod mu) = ∫ a, w a * fisherInformation mu p dp a ∂parameterMeasure ell upper := by letI : IsFiniteMeasure (parameterMeasure ell upper) := by unfold parameterMeasure infer_instance rw [integral_prod _ hint] apply integral_congr_ae filter_upwards with a unfold fisherInformation calc ∫ x, w a * p a x * (likelihoodScore p dp a x) ^ 2 ∂mu = ∫ x, w a * (p a x * (likelihoodScore p dp a x) ^ 2) ∂mu := by apply integral_congr_ae filter_upwards with x ring _ = w a * ∫ x, p a x * (likelihoodScore p dp a x) ^ 2 ∂mu := integral_const_mul (μ := mu) (w a) (fun x ↦ p a x * (likelihoodScore p dp a x) ^ 2)
CausalSmith.Stat.LdpAteEfficiencySurface.integral_fisherJointSq_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesIntegrals.lean:132
theorem integral_priorLikelihoodCross_eq_zero

Conditional centering of the likelihood score makes the prior--likelihood score cross term integrate to zero. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
ell upper :
ℝ
w dw :
ℝ → ℝ
p dp :
ℝ → X → ℝ
hcenter :
∀ᵐ a ∂parameterMeasure ell upper, ∫ x, likelihoodScore p dp a x * p a x ∂mu = 0
hint :
Integrable (fun z : ℝ × X => w z.1 * p z.1 z.2 * (priorScore w dw z.1 * likelihoodScore p dp z.1 z.2)) ((parameterMeasure ell upper).prod mu)
∫ z, w z.1 * p z.1 z.2 * (priorScore w dw z.1 * likelihoodScore p dp z.1 z.2) ∂((parameterMeasure ell upper).prod mu)
= 0
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma integral_priorLikelihoodCross_eq_zero {X : Type*} [MeasurableSpace X] {mu : Measure X} [SigmaFinite mu] {ell upper : ℝ} (w dw : ℝ → ℝ) (p dp : ℝ → X → ℝ) (hcenter : ∀ᵐ a ∂parameterMeasure ell upper, ∫ x, likelihoodScore p dp a x * p a x ∂mu = 0) (hint : Integrable (fun z : ℝ × X => w z.1 * p z.1 z.2 * (priorScore w dw z.1 * likelihoodScore p dp z.1 z.2)) ((parameterMeasure ell upper).prod mu)) : ∫ z, w z.1 * p z.1 z.2 * (priorScore w dw z.1 * likelihoodScore p dp z.1 z.2) ∂((parameterMeasure ell upper).prod mu) = 0 := by letI : IsFiniteMeasure (parameterMeasure ell upper) := by unfold parameterMeasure infer_instance rw [integral_prod _ hint] calc ∫ a, (∫ x, w a * p a x * (priorScore w dw a * likelihoodScore p dp a x) ∂mu) ∂parameterMeasure ell upper = ∫ a, 0 ∂parameterMeasure ell upper := by apply integral_congr_ae filter_upwards [hcenter] with a ha calc ∫ x, w a * p a x * (priorScore w dw a * likelihoodScore p dp a x) ∂mu = ∫ x, (w a * priorScore w dw a) * (likelihoodScore p dp a x * p a x) ∂mu := by apply integral_congr_ae filter_upwards with x ring _ = (w a * priorScore w dw a) * ∫ x, likelihoodScore p dp a x * p a x ∂mu := integral_const_mul (μ := mu) (w a * priorScore w dw a) (fun x ↦ likelihoodScore p dp a x * p a x) _ = 0 := by rw [ha, mul_zero] _ = 0 := integral_zero ℝ ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.integral_priorLikelihoodCross_eq_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesIntegrals.lean:161
theorem integral_sequentialSensitivity_eq

For the affine contrast target, normalized prior and likelihood make the integrated sensitivity equal the directional contrast. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
ell upper :
ℝ
w :
ℝ → ℝ
p :
ℝ → X → ℝ
hprior :
∫ a, w a ∂parameterMeasure ell upper = 1
hnorm :
∀ᵐ a ∂parameterMeasure ell upper, ∫ x, p a x ∂mu = 1
hint :
∫ z, sensitivityField w p (vtTargetDeriv (X := X) v) z ∂((parameterMeasure ell upper).prod mu)
= contrast v
Proof (Lean source)
lemma integral_sequentialSensitivity_eq {X : Type*} [MeasurableSpace X] {mu : Measure X} [SigmaFinite mu] {ell upper : ℝ} (w : ℝ → ℝ) (p : ℝ → X → ℝ) (v : TrialParameter) (hprior : ∫ a, w a ∂parameterMeasure ell upper = 1) (hnorm : ∀ᵐ a ∂parameterMeasure ell upper, ∫ x, p a x ∂mu = 1) (hint : Integrable (sensitivityField w p (vtTargetDeriv (X := X) v)) ((parameterMeasure ell upper).prod mu)) : ∫ z, sensitivityField w p (vtTargetDeriv (X := X) v) z ∂((parameterMeasure ell upper).prod mu) = contrast v := by letI : IsFiniteMeasure (parameterMeasure ell upper) := by unfold parameterMeasure infer_instance rw [integral_prod _ hint] have hinner : (fun a => ∫ x, sensitivityField w p (vtTargetDeriv (X := X) v) (a,x) ∂mu) =ᵐ[parameterMeasure ell upper] fun a => contrast v * w a := by filter_upwards [hnorm] with a ha unfold sensitivityField vtTargetDeriv jointDensity calc ∫ x, contrast v * (w a * p a x) ∂mu = ∫ x, (contrast v * w a) * p a x ∂mu := by apply integral_congr_ae filter_upwards with x ring _ = (contrast v * w a) * ∫ x, p a x ∂mu := integral_const_mul (μ := mu) (contrast v * w a) (fun x ↦ p a x) _ = contrast v * w a := by rw [ha, mul_one] rw [integral_congr_ae hinner] calc ∫ a, contrast v * w a ∂parameterMeasure ell upper = contrast v * ∫ a, w a ∂parameterMeasure ell upper := integral_const_mul (μ := parameterMeasure ell upper) (contrast v) w _ = contrast v := by rw [hprior, mul_one]
CausalSmith.Stat.LdpAteEfficiencySurface.integral_sequentialSensitivity_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesIntegrals.lean:202
theorem derivativeBalanceField_eq_errorScore_sub_sensitivity

Under the usual zero-density derivative conditions, the derivative-balance field is exactly error-score minus sensitivity. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
Type*
w dw :
ℝ → ℝ
p dp g dg :
ℝ → X → ℝ
T :
X → ℝ
hw :
∀ a, 0 ≤ w a
hp :
∀ a x, 0 ≤ p a x
hwzero :
∀ a
if
w a = 0
then
dw a = 0
hpzero :
∀ a x
if
p a x = 0
then
dp a x = 0
derivativeBalanceField w dw p dp g dg T
= fun z => errorScoreField w dw p dp g T z - sensitivityField w p dg z
Proof (Lean source)
lemma derivativeBalanceField_eq_errorScore_sub_sensitivity {X : Type*} (w dw : ℝ → ℝ) (p dp g dg : ℝ → X → ℝ) (T : X → ℝ) (hw : ∀ a, 0 ≤ w a) (hp : ∀ a x, 0 ≤ p a x) (hwzero : ∀ a, w a = 0 → dw a = 0) (hpzero : ∀ a x, p a x = 0 → dp a x = 0) : derivativeBalanceField w dw p dp g dg T = fun z => errorScoreField w dw p dp g T z - sensitivityField w p dg z := by funext z rw [errorScoreField_eq_numerator (hw z.1) (hp z.1 z.2) (hwzero z.1) (hpzero z.1 z.2)] unfold derivativeBalanceField sensitivityField jointDensity ring
CausalSmith.Stat.LdpAteEfficiencySurface.derivativeBalanceField_eq_errorScore_sub_sensitivity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesIntegrals.lean:237
theorem integrable_priorLikelihoodCross_of_squares

Prior and likelihood weighted square integrability implies integrability of their weighted score cross term. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
w dw :
ℝ → ℝ
p dp :
ℝ → X → ℝ
mu :
Measure (ℝ × X)
hw :
hdw :
hp :
Measurable (fun z : ℝ × X ↦ p z.1 z.2)
hdp :
Measurable (fun z : ℝ × X ↦ dp z.1 z.2)
hw_nonneg :
∀ a, 0 ≤ w a
hp_nonneg :
∀ a x, 0 ≤ p a x
hprior :
Integrable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2) mu
hfisher :
Integrable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (likelihoodScore p dp z.1 z.2) ^ 2) mu
Integrable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (priorScore w dw z.1 * likelihoodScore p dp z.1 z.2)) mu
Proof (Lean source)
lemma integrable_priorLikelihoodCross_of_squares {X : Type*} [MeasurableSpace X] (w dw : ℝ → ℝ) (p dp : ℝ → X → ℝ) (mu : Measure (ℝ × X)) (hw : Measurable w) (hdw : Measurable dw) (hp : Measurable (fun z : ℝ × X ↦ p z.1 z.2)) (hdp : Measurable (fun z : ℝ × X ↦ dp z.1 z.2)) (hw_nonneg : ∀ a, 0 ≤ w a) (hp_nonneg : ∀ a x, 0 ≤ p a x) (hprior : Integrable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2) mu) (hfisher : Integrable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (likelihoodScore p dp z.1 z.2) ^ 2) mu) : Integrable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (priorScore w dw z.1 * likelihoodScore p dp z.1 z.2)) mu := by have hwj : Measurable (fun z : ℝ × X ↦ w z.1) := hw.comp measurable_fst have hdwj : Measurable (fun z : ℝ × X ↦ dw z.1) := hdw.comp measurable_fst have hpriorScore : Measurable (fun z : ℝ × X ↦ priorScore w dw z.1) := by unfold priorScore exact Measurable.ite (measurableSet_lt measurable_const hwj) (hdwj.div hwj) measurable_const have hlikeScore : Measurable (fun z : ℝ × X ↦ likelihoodScore p dp z.1 z.2) := by unfold likelihoodScore exact Measurable.ite (measurableSet_lt measurable_const hp) (hdp.div hp) measurable_const have h := integrable_mul_mul_of_integrable_sq_mul (fun z : ℝ × X ↦ priorScore w dw z.1) (fun z : ℝ × X ↦ likelihoodScore p dp z.1 z.2) (jointDensity w p) mu hpriorScore hlikeScore (hwj.mul hp) (fun z ↦ mul_nonneg (hw_nonneg z.1) (hp_nonneg z.1 z.2)) (by apply hprior.congr filter_upwards with z unfold jointDensity ring) (by apply hfisher.congr filter_upwards with z unfold jointDensity ring) convert h using 1 funext z unfold jointDensity ring
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_priorLikelihoodCross_of_squares · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesIntegrals.lean:252
theorem integrable_derivativeBalance_of_rewrite

Once the error-score and sensitivity fields are integrable, their exact balance identity supplies derivative-balance integrability. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
w dw :
ℝ → ℝ
p dp g dg :
ℝ → X → ℝ
T :
X → ℝ
mu :
Measure (ℝ × X)
hw :
∀ a, 0 ≤ w a
hp :
∀ a x, 0 ≤ p a x
hwzero :
∀ a
if
w a = 0
then
dw a = 0
hpzero :
∀ a x
if
p a x = 0
then
dp a x = 0
herr :
Integrable (errorScoreField w dw p dp g T) mu
hsens :
Integrable (derivativeBalanceField w dw p dp g dg T) mu
Proof (Lean source)
-- keep: reusable sequential-law, Fisher-information, or van-Trees bridge for related adaptive experiments lemma integrable_derivativeBalance_of_rewrite {X : Type*} [MeasurableSpace X] (w dw : ℝ → ℝ) (p dp g dg : ℝ → X → ℝ) (T : X → ℝ) (mu : Measure (ℝ × X)) (hw : ∀ a, 0 ≤ w a) (hp : ∀ a x, 0 ≤ p a x) (hwzero : ∀ a, w a = 0 → dw a = 0) (hpzero : ∀ a x, p a x = 0 → dp a x = 0) (herr : Integrable (errorScoreField w dw p dp g T) mu) (hsens : Integrable (sensitivityField w p dg) mu) : Integrable (derivativeBalanceField w dw p dp g dg T) mu := by rw [derivativeBalanceField_eq_errorScore_sub_sensitivity w dw p dp g dg T hw hp hwzero hpzero] exact herr.sub hsens
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_derivativeBalance_of_rewrite · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesIntegrals.lean:298
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialVanTreesRegularity 19 declarations Remaining measurable fields for the sequential van Trees adapter

Remaining measurable fields for the sequential van Trees adapter

def sequentialVTPrior

The centered quartic prior used on the scalar local interval [-R,R]. The sequential VTPrior is determined by the displayed parameters.

Definition (Lean source)
R :
ℝ
sequentialVTPrior R :
ℝ → ℝ
smoothPrior 0 (R / 2)
def sequentialVTPriorDeriv

The declared derivative of the centered local prior. The sequential VTPrior Deriv is determined by the displayed parameters.

Definition (Lean source)
R :
ℝ
sequentialVTPriorDeriv R :
ℝ → ℝ
structure SequentialVTPriorFacts

All paper-independent smooth-prior fields needed by van Trees on [-R,R]. For the displayed inputs and conditions, this structure records the stated data. The Sequential VTPrior Facts is determined by the displayed parameters.

Definition (Lean source)
R :
ℝ
contDiff :
support :
hasDeriv :
nonneg :
∀ a, 0 ≤ sequentialVTPrior R a
normalized :
∫ a, sequentialVTPrior R a ∂parameterMeasure (-R) R = 1
scoreSqMeasurable :
scoreSqIntegrable :
information :
theorem sequentialVTPrior_facts

Under the supplied quantities and conditions, the sequential vt prior facts assertion holds.

Formal statement
R :
ℝ
hR :
0 < R
Proof (Lean source)
lemma sequentialVTPrior_facts {R : ℝ} (hR : 0 < R) : SequentialVTPriorFacts R := by have ha : 0 < R / 2 := by linarith have hleft : -R ≤ (0 : ℝ) - R / 2 := by linarith have hright : (0 : ℝ) + R / 2 ≤ R := by linarith refine ⟨smoothPrior_contDiff ha, ?_, hasDerivAt_smoothPrior ha, smoothPrior_nonneg ha, integral_smoothPrior_parameterMeasure ha hleft hright, smoothPrior_scoreSq_aestronglyMeasurable ha, smoothPrior_scoreSq_integrable ha, ?_⟩ · exact support_smoothPrior_subset_Icc ha (by linarith) (by linarith) · unfold sequentialVTPrior sequentialVTPriorDeriv rw [priorInformation_smoothPrior ha hleft hright] field_simp [hR.ne'] ring
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialVTPrior_facts · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:42
def vtTarget

For the supplied quantities and conditions, the vt target is the mathematical object specified below. The vt Target is determined by the displayed parameters.

Definition (Lean source)
X :
Type*
a :
ℝ
_x :
X
vtTarget θ v a _x :
ℝ
contrast θ + a * contrast v
def vtTargetDeriv

For the supplied quantities and conditions, the vt target deriv is the mathematical object specified below.

Definition (Lean source)
X :
Type*
_a :
ℝ
_x :
X
vtTargetDeriv v _a _x :
ℝ
contrast v
theorem vtTarget_eq_parameterPath

Under the supplied quantities and conditions, the vt target eq parameter path assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
Type*
a :
ℝ
x :
X
vtTarget θ v a x = contrast (parameterPath θ v a)
Proof (Lean source)
lemma vtTarget_eq_parameterPath {X : Type*} (θ v : TrialParameter) (a : ℝ) (x : X) : vtTarget θ v a x = contrast (parameterPath θ v a) := by simp [vtTarget, contrast, parameterPath] ring
CausalSmith.Stat.LdpAteEfficiencySurface.vtTarget_eq_parameterPath · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:66
theorem hasDerivAt_vtTarget

Under the supplied quantities and conditions, the has deriv at vt target assertion holds.

Formal statement
X :
Type*
a :
ℝ
x :
X
HasDerivAt (fun b ↦ vtTarget θ v b x) (vtTargetDeriv v a x) a
Proof (Lean source)
lemma hasDerivAt_vtTarget {X : Type*} (θ v : TrialParameter) (a : ℝ) (x : X) : HasDerivAt (fun b ↦ vtTarget θ v b x) (vtTargetDeriv v a x) a := by unfold vtTarget vtTargetDeriv simpa only [id_eq, one_mul] using ((hasDerivAt_id a).mul_const (contrast v)).const_add (contrast θ)
theorem vtTarget_absolutelyContinuous

Under the supplied quantities and conditions, the vt target absolutely continuous assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
Type*
x :
X
ell upper :
ℝ
AbsolutelyContinuousOnInterval (fun a ↦ vtTarget θ v a x) ell upper
Proof (Lean source)
lemma vtTarget_absolutelyContinuous {X : Type*} (θ v : TrialParameter) (x : X) (ell upper : ℝ) : AbsolutelyContinuousOnInterval (fun a ↦ vtTarget θ v a x) ell upper := by apply ContDiffOn.absolutelyContinuousOnInterval unfold vtTarget exact (by fun_prop : ContDiff ℝ 1 (fun a ↦ contrast θ + a * contrast v)).contDiffOn
CausalSmith.Stat.LdpAteEfficiencySurface.vtTarget_absolutelyContinuous · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:80
theorem measurable_vtDensity_joint

the measurable vt density joint assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper :
ℝ
Measurable (fun az : ℝ × Transcript (Z n) ↦ vtDensity P θ v p n ell upper az.1 az.2)
Proof (Lean source)
lemma measurable_vtDensity_joint {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (ell upper : ℝ) : Measurable (fun az : ℝ × Transcript (Z n) ↦ vtDensity P θ v p n ell upper az.1 az.2) := by unfold vtDensity transcriptMixtureRealDensity apply Measurable.ite · exact measurableSet_Icc.preimage measurable_fst · apply Finset.measurable_fun_sum intro x hx have hc : Continuous (fun a ↦ inputPathProbability (parameterPath θ v a) p x) := by rw [continuous_iff_continuousAt] intro a exact (hasDerivAt_inputPathProbability_parameterPath θ v p a x).continuousAt exact (hc.measurable.comp measurable_fst).mul ((Measure.measurable_rnDeriv _ _).ennreal_toReal.comp measurable_snd) · exact measurable_const
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_vtDensity_joint · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:88
theorem continuous_transcriptMixtureRealDerivative_path

the continuous transcript mixture real derivative path assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
z :
Transcript (Z n)
Proof (Lean source)
lemma continuous_transcriptMixtureRealDerivative_path {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (z : Transcript (Z n)) : Continuous (fun a ↦ transcriptMixtureRealDerivative P (parameterPath θ v a) v p n z) := by have hcd := (transcriptDensityPath_contDiff P θ v p n z).continuous_deriv (by norm_num) have heq : deriv (fun a ↦ transcriptMixtureRealDensity P (parameterPath θ v a) p n z) = fun a ↦ transcriptMixtureRealDerivative P (parameterPath θ v a) v p n z := by funext a exact (hasDerivAt_transcriptMixtureRealDensity_parameterPath P θ v p a n z).deriv rwa [heq] at hcd
CausalSmith.Stat.LdpAteEfficiencySurface.continuous_transcriptMixtureRealDerivative_path · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:110
theorem measurable_vtDensityDeriv_joint

the measurable vt density deriv joint assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p :
ℝ
n :
ℕ
ell upper :
ℝ
Measurable (fun az : ℝ × Transcript (Z n) ↦ vtDensityDeriv P θ v p n ell upper az.1 az.2)
Proof (Lean source)
lemma measurable_vtDensityDeriv_joint {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p : ℝ) (n : ℕ) (ell upper : ℝ) : Measurable (fun az : ℝ × Transcript (Z n) ↦ vtDensityDeriv P θ v p n ell upper az.1 az.2) := by unfold vtDensityDeriv transcriptMixtureRealDerivative apply Measurable.ite · exact measurableSet_Icc.preimage measurable_fst · apply Finset.measurable_fun_sum intro x hx have hc : Continuous (fun a ↦ inputPathDirectionalDerivative (parameterPath θ v a) v p x) := by unfold inputPathDirectionalDerivative apply continuous_finsetSum intro i hi apply Continuous.mul continuous_const apply continuous_finsetProd intro j hj rw [continuous_iff_continuousAt] intro a exact (hasDerivAt_piTheta_parameterPath θ v p a (x j)).continuousAt exact (hc.measurable.comp measurable_fst).mul ((Measure.measurable_rnDeriv _ _).ennreal_toReal.comp measurable_snd) · exact measurable_const
CausalSmith.Stat.LdpAteEfficiencySurface.measurable_vtDensityDeriv_joint · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:126
theorem integrable_mul_mul_of_integrable_sq_mul

A weighted cross term is integrable whenever both weighted square terms are integrable. This is the Cauchy–Schwarz step used for the van Trees error-score field. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
A :
f s q :
A → ℝ
mu :
hf :
hs :
hq :
hq_nonneg :
∀ x, 0 ≤ q x
hf_sq :
Integrable (fun x ↦ f x ^ 2 * q x) mu
hs_sq :
Integrable (fun x ↦ s x ^ 2 * q x) mu
Integrable (fun x ↦ f x * s x * q x) mu
Proof (Lean source)
lemma integrable_mul_mul_of_integrable_sq_mul {A : Type*} [MeasurableSpace A] (f s q : A → ℝ) (mu : Measure A) (hf : Measurable f) (hs : Measurable s) (hq : Measurable q) (hq_nonneg : ∀ x, 0 ≤ q x) (hf_sq : Integrable (fun x ↦ f x ^ 2 * q x) mu) (hs_sq : Integrable (fun x ↦ s x ^ 2 * q x) mu) : Integrable (fun x ↦ f x * s x * q x) mu := by let qroot : A → ℝ := fun x ↦ sqrt (q x) have hqroot : Measurable qroot := Real.continuous_sqrt.measurable.comp hq have hfroot_sq : Integrable (fun x ↦ (f x * qroot x) ^ 2) mu := by convert hf_sq using 1 funext x dsimp [qroot] rw [mul_pow, Real.sq_sqrt (hq_nonneg x)] have hsroot_sq : Integrable (fun x ↦ (s x * qroot x) ^ 2) mu := by convert hs_sq using 1 funext x dsimp [qroot] rw [mul_pow, Real.sq_sqrt (hq_nonneg x)] have hfroot : MemLp (fun x ↦ f x * qroot x) 2 mu := (memLp_two_iff_integrable_sq (hf.mul hqroot).aestronglyMeasurable).2 hfroot_sq have hsroot : MemLp (fun x ↦ s x * qroot x) 2 mu := (memLp_two_iff_integrable_sq (hs.mul hqroot).aestronglyMeasurable).2 hsroot_sq have hcross := hfroot.integrable_mul hsroot convert hcross using 1 funext x dsimp [qroot] have hroot : sqrt (q x) * sqrt (q x) = q x := Real.mul_self_sqrt (hq_nonneg x) calc f x * s x * q x = f x * s x * (sqrt (q x) * sqrt (q x)) := by rw [hroot] _ = f x * sqrt (q x) * (s x * sqrt (q x)) := by ring
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_mul_mul_of_integrable_sq_mul · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:153
theorem integrable_or_lintegral_ofReal_eq_top

A nonnegative measurable risk is either integrable or has infinite Lebesgue integral. This supplies the harmless infinite-risk branch before applying the finite-risk van Trees argument. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
A :
F :
A → ℝ
mu :
hF :
hF_nonneg :
∀ x, 0 ≤ F x
Integrable F mu ∨ ∫⁻ x, ofReal (F x) ∂mu = ∞
Proof (Lean source)
lemma integrable_or_lintegral_ofReal_eq_top {A : Type*} [MeasurableSpace A] (F : A → ℝ) (mu : Measure A) (hF : Measurable F) (hF_nonneg : ∀ x, 0 ≤ F x) : Integrable F mu ∨ ∫⁻ x, ofReal (F x) ∂mu = ∞ := by by_cases h : Integrable F mu · exact Or.inl h · right have hnotfinite : ¬ HasFiniteIntegral F mu := by intro hfinite exact h ⟨hF.aestronglyMeasurable, hfinite⟩ have hnotlt : ¬ (∫⁻ x, ofReal ‖F x‖ ∂mu) < ∞ := by exact fun hlt ↦ hnotfinite ((hasFiniteIntegral_iff_norm (μ := mu) F).2 hlt) have htop : (∫⁻ x, ofReal ‖F x‖ ∂mu) = ∞ := top_unique (not_lt.mp hnotlt) convert htop using 1 apply lintegral_congr intro x rw [Real.norm_eq_abs, abs_of_nonneg (hF_nonneg x)]
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_or_lintegral_ofReal_eq_top · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:193
structure VanTreesProductMeasurable

The product-measurability fields required by the observation-dependent van Trees theorem. For the displayed quantities and conditions, the stated result follows.

Definition (Lean source)
X :
w dw :
ℝ → ℝ
p dp g dg :
ℝ → X → ℝ
T :
X → ℝ
balance :
errorScore :
Measurable (errorScoreField w dw p dp g T)
sensitivity :
errorSq :
scoreSq :
priorJointSq :
Measurable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (priorScore w dw z.1) ^ 2)
fisherSq :
Measurable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (likelihoodScore p dp z.1 z.2) ^ 2)
cross :
Measurable (fun z : ℝ × X ↦ w z.1 * p z.1 z.2 * (priorScore w dw z.1 * likelihoodScore p dp z.1 z.2))
CausalSmith.Stat.LdpAteEfficiencySurface.VanTreesProductMeasurable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:215
theorem vanTreesProductMeasurable_of_joint

Joint measurability of the primitive density, derivative, target, and estimator functions supplies every product-measurability side condition in van Trees. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
w dw :
ℝ → ℝ
p dp g dg :
ℝ → X → ℝ
T :
X → ℝ
hw :
hdw :
hp :
Measurable (fun z : ℝ × X ↦ p z.1 z.2)
hdp :
Measurable (fun z : ℝ × X ↦ dp z.1 z.2)
hg :
Measurable (fun z : ℝ × X ↦ g z.1 z.2)
hdg :
Measurable (fun z : ℝ × X ↦ dg z.1 z.2)
hT :
VanTreesProductMeasurable w dw p dp g dg T
Proof (Lean source)
lemma vanTreesProductMeasurable_of_joint {X : Type*} [MeasurableSpace X] (w dw : ℝ → ℝ) (p dp g dg : ℝ → X → ℝ) (T : X → ℝ) (hw : Measurable w) (hdw : Measurable dw) (hp : Measurable (fun z : ℝ × X ↦ p z.1 z.2)) (hdp : Measurable (fun z : ℝ × X ↦ dp z.1 z.2)) (hg : Measurable (fun z : ℝ × X ↦ g z.1 z.2)) (hdg : Measurable (fun z : ℝ × X ↦ dg z.1 z.2)) (hT : Measurable T) : VanTreesProductMeasurable w dw p dp g dg T := by have hwj : Measurable (fun z : ℝ × X ↦ w z.1) := hw.comp measurable_fst have hdwj : Measurable (fun z : ℝ × X ↦ dw z.1) := hdw.comp measurable_fst have hTj : Measurable (fun z : ℝ × X ↦ T z.2) := hT.comp measurable_snd have hjoint : Measurable (jointDensity w p) := by exact hwj.mul hp have hprior : Measurable (fun z : ℝ × X ↦ priorScore w dw z.1) := by unfold priorScore exact Measurable.ite (measurableSet_lt measurable_const hwj) (hdwj.div hwj) measurable_const have hlike : Measurable (fun z : ℝ × X ↦ likelihoodScore p dp z.1 z.2) := by unfold likelihoodScore exact Measurable.ite (measurableSet_lt measurable_const hp) (hdp.div hp) measurable_const have hscore : Measurable (jointScore w dw p dp) := by unfold jointScore exact Measurable.ite (measurableSet_lt measurable_const hjoint) ((hdwj.mul hp |>.add (hwj.mul hdp)).div hjoint) measurable_const refine ⟨?_, ?_, ?_, ?_, ?_, ?_, ?_, ?_⟩ · unfold derivativeBalanceField fun_prop · unfold errorScoreField exact (hTj.sub hg).mul hscore |>.mul hjoint · unfold sensitivityField exact hdg.mul hjoint · unfold errorSqField exact ((hTj.sub hg).pow_const 2).mul hjoint · unfold scoreSqField exact (hscore.pow_const 2).mul hjoint · exact (hwj.mul hp).mul (hprior.pow_const 2) · exact (hwj.mul hp).mul (hlike.pow_const 2) · exact (hwj.mul hp).mul (hprior.mul hlike)
CausalSmith.Stat.LdpAteEfficiencySurface.vanTreesProductMeasurable_of_joint · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:232
theorem sequentialVanTreesProductMeasurable

The sequential mixture likelihood, affine contrast target, and smooth prior satisfy all van Trees product-measurability conditions for every measurable transcript estimator. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p R :
ℝ
n :
ℕ
hR :
0 < R
T :
Transcript (Z n) → ℝ
hT :
Proof (Lean source)
lemma sequentialVanTreesProductMeasurable {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p R : ℝ) (n : ℕ) (hR : 0 < R) (T : Transcript (Z n) → ℝ) (hT : Measurable T) : VanTreesProductMeasurable (sequentialVTPrior R) (sequentialVTPriorDeriv R) (vtDensity P θ v p n (-R) R) (vtDensityDeriv P θ v p n (-R) R) (vtTarget θ v) (vtTargetDeriv v) T := by apply vanTreesProductMeasurable_of_joint · exact (smoothPrior_contDiff (a := R / 2) (c := 0) (by linarith)).continuous.measurable · unfold sequentialVTPriorDeriv smoothPriorDeriv apply Measurable.ite · exact measurableSet_lt (continuous_abs.comp (continuous_id.sub continuous_const)).measurable measurable_const · fun_prop · exact measurable_const · exact measurable_vtDensity_joint P θ v p n (-R) R · exact measurable_vtDensityDeriv_joint P θ v p n (-R) R · unfold vtTarget fun_prop · unfold vtTargetDeriv exact measurable_const · exact hT
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialVanTreesProductMeasurable · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:276
theorem integrable_errorScoreField_of_squares

Finite weighted squared error and finite joint-score information imply integrability of the signed error-score field. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
X :
w dw :
ℝ → ℝ
p dp g :
ℝ → X → ℝ
T :
X → ℝ
mu :
Measure (ℝ × X)
hw :
hp :
Measurable (fun z : ℝ × X ↦ p z.1 z.2)
hg :
Measurable (fun z : ℝ × X ↦ g z.1 z.2)
hT :
hscore :
hw_nonneg :
∀ a, 0 ≤ w a
hp_nonneg :
∀ a x, 0 ≤ p a x
herrorSq :
hscoreSq :
Integrable (scoreSqField w dw p dp) mu
Integrable (errorScoreField w dw p dp g T) mu
Proof (Lean source)
lemma integrable_errorScoreField_of_squares {X : Type*} [MeasurableSpace X] (w dw : ℝ → ℝ) (p dp g : ℝ → X → ℝ) (T : X → ℝ) (mu : Measure (ℝ × X)) (hw : Measurable w) (hp : Measurable (fun z : ℝ × X ↦ p z.1 z.2)) (hg : Measurable (fun z : ℝ × X ↦ g z.1 z.2)) (hT : Measurable T) (hscore : Measurable (jointScore w dw p dp)) (hw_nonneg : ∀ a, 0 ≤ w a) (hp_nonneg : ∀ a x, 0 ≤ p a x) (herrorSq : Integrable (errorSqField w p g T) mu) (hscoreSq : Integrable (scoreSqField w dw p dp) mu) : Integrable (errorScoreField w dw p dp g T) mu := by have h := integrable_mul_mul_of_integrable_sq_mul (fun z : ℝ × X ↦ T z.2 - g z.1 z.2) (jointScore w dw p dp) (jointDensity w p) mu ((hT.comp measurable_snd).sub hg) hscore ((hw.comp measurable_fst).mul hp) (fun z ↦ mul_nonneg (hw_nonneg z.1) (hp_nonneg z.1 z.2)) herrorSq hscoreSq change Integrable (fun z : ℝ × X ↦ (T z.2 - g z.1 z.2) * jointScore w dw p dp z * jointDensity w p z) mu exact h
CausalSmith.Stat.LdpAteEfficiencySurface.integrable_errorScoreField_of_squares · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:305
theorem sequentialVTPrior_endpoints

The centered smooth prior vanishes at both endpoints of the wider local parameter interval. For the displayed inputs and conditions, the stated result follows.

Formal statement
R :
ℝ
hR :
0 < R
conclusion 1
conclusion 2
Proof (Lean source)
lemma sequentialVTPrior_endpoints {R : ℝ} (hR : 0 < R) : sequentialVTPrior R R = 0 ∧ sequentialVTPrior R (-R) = 0 := by unfold sequentialVTPrior have h := smoothPrior_ambient_endpoints (ell := -R) (u := R) (c := 0) (a := R / 2) (by linarith) (by linarith) exact ⟨h.2, h.1⟩
CausalSmith.Stat.LdpAteEfficiencySurface.sequentialVTPrior_endpoints · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRegularity.lean:330
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SequentialVanTreesRiskBridge 10 declarations This file converts the native-real product-space Bayes error in the finite van Trees inequality into the weighted ENNReal local risk used by the sequential minimax statement.

Sequential van Trees risk and scaling bridge

This file converts the native-real product-space Bayes error in the finite van Trees inequality into the weighted ENNReal local risk used by the sequential minimax statement.

theorem parameterPath_sampleScaledDirection_eq_localAlternative

Scaling a parameter direction by inverse root sample size makes its scalar path exactly the corresponding local alternative. For the displayed inputs and conditions, the stated result follows.

Formal statement
a :
ℝ
n :
ℕ
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.parameterPath_sampleScaledDirection_eq_localAlternative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRiskBridge.lean:21
theorem scaledError_sq_eq_nat_mul_vtTarget_error_sq

Along the sample-scaled van Trees path, the squared scaled error is sample size times the unscaled target error. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
a :
ℝ
n :
ℕ
z :
Transcript (Z n)
(scaledError P θ (scaledDirection a v) n z) ^ 2
= (n : ℝ) * (P.estimate n z - vtTarget θ (scaledDirection ((sqrt n)⁻¹) v) a z) ^ 2
Proof (Lean source)
lemma scaledError_sq_eq_nat_mul_vtTarget_error_sq {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (a : ℝ) (n : ℕ) (z : Transcript (Z n)) : (scaledError P θ (scaledDirection a v) n z) ^ 2 = (n : ℝ) * (P.estimate n z - vtTarget θ (scaledDirection ((sqrt n)⁻¹) v) a z) ^ 2 := by rw [vtTarget_eq_parameterPath, parameterPath_sampleScaledDirection_eq_localAlternative] unfold scaledError rw [mul_pow, Real.sq_sqrt (Nat.cast_nonneg n)]
CausalSmith.Stat.LdpAteEfficiencySurface.scaledError_sq_eq_nat_mul_vtTarget_error_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRiskBridge.lean:31
theorem contrast_scaledDirection

Contrast is linear along scalar multiples of a trial direction. For the displayed inputs and conditions, the stated result follows.

Formal statement
a :
ℝ
contrast (scaledDirection a v) = a * contrast v
Proof (Lean source)
lemma contrast_scaledDirection (a : ℝ) (v : TrialParameter) : contrast (scaledDirection a v) = a * contrast v := by simp [contrast, scaledDirection] ring
CausalSmith.Stat.LdpAteEfficiencySurface.contrast_scaledDirection · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRiskBridge.lean:45
theorem nat_mul_contrast_sampleScaledDirection_sq

For positive sample size, sample scaling cancels after multiplying the squared contrast sensitivity by the sample size. For the displayed inputs and conditions, the stated result follows.

Formal statement
n :
ℕ
hn :
0 < n
(n : ℝ) * contrast (scaledDirection ((sqrt n)⁻¹) v) ^ 2 = contrast v ^ 2
Proof (Lean source)
lemma nat_mul_contrast_sampleScaledDirection_sq (v : TrialParameter) {n : ℕ} (hn : 0 < n) : (n : ℝ) * contrast (scaledDirection ((sqrt n)⁻¹) v) ^ 2 = contrast v ^ 2 := by rw [contrast_scaledDirection] have hsqrt : sqrt (n : ℝ) ≠ 0 := by positivity have hsqrtSq : (sqrt (n : ℝ)) ^ 2 = n := Real.sq_sqrt (Nat.cast_nonneg n) field_simp nlinarith
CausalSmith.Stat.LdpAteEfficiencySurface.nat_mul_contrast_sampleScaledDirection_sq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRiskBridge.lean:51
theorem localRisk_scaledDirection_eq_lintegral_vtDensity

On the compact scalar interval, the local risk is the reference-measure integral weighted by the interval-extended transcript density. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p R a :
ℝ
n :
ℕ
hinterior :
∀ b ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) b)
ha :
a ∈ Icc (-R) R
localRisk P θ (scaledDirection a v) p n
= ∫⁻ z, ofReal (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R a z) * ofReal ((scaledError P θ (scaledDirection a v) n z) ^ 2) ∂transcriptReferenceMeasure P n
Proof (Lean source)
lemma localRisk_scaledDirection_eq_lintegral_vtDensity {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p R a : ℝ) (n : ℕ) (hp : InteriorAssignment p) (hinterior : ∀ b ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) b)) (ha : a ∈ Icc (-R) R) : localRisk P θ (scaledDirection a v) p n = ∫⁻ z, ofReal (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R a z) * ofReal ((scaledError P θ (scaledDirection a v) n z) ^ 2) ∂transcriptReferenceMeasure P n := by have hpath := parameterPath_sampleScaledDirection_eq_localAlternative θ v a n have hlaw := transcriptLaw_eq_withDensity_mixture P (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a) p n hp (hinterior a ha) have hq : (fun z => ofReal (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R a z)) = fun z => ofReal (transcriptMixtureRealDensity P (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a) p n z) := by funext z simp [vtDensity, ha] have hlawq : (transcriptReferenceMeasure P n).withDensity (fun z => ofReal (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R a z)) = transcriptLaw P (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a) p n := by rw [hq] exact hlaw unfold localRisk rw [← hpath, ← hlawq] rw [lintegral_withDensity_eq_lintegral_mul] · rfl · apply ENNReal.measurable_ofReal.comp have hpair : Measurable (fun z : Transcript (Z n) => (a, z)) := Measurable.prod (f := fun z : Transcript (Z n) => (a, z)) measurable_const measurable_id exact (measurable_vtDensity_joint P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R).comp hpair · apply ENNReal.measurable_ofReal.comp exact (measurable_const.mul ((P.estimate_measurable n).sub measurable_const)).pow_const 2
CausalSmith.Stat.LdpAteEfficiencySurface.localRisk_scaledDirection_eq_lintegral_vtDensity · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRiskBridge.lean:64
theorem lintegral_scaledSequentialBayesError_eq_weighted_localRisk

The scaled nonnegative product-space error integral equals the weighted compact-prior local risk, without any finiteness assumption. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p R :
ℝ
n :
ℕ
hR :
0 < R
hinterior :
∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a)
(∫⁻ z : ℝ × Transcript (Z n), ofReal ((n : ℝ) * errorSqField (sequentialVTPrior R) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtTarget θ (scaledDirection ((sqrt n)⁻¹) v)) (P.estimate n) z) ∂((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n)))
= ∫⁻ a, ofReal (sequentialVTPrior R a) * localRisk P θ (scaledDirection a v) p n ∂parameterMeasure (-R) R
Proof (Lean source)
lemma lintegral_scaledSequentialBayesError_eq_weighted_localRisk {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p R : ℝ) (n : ℕ) (hR : 0 < R) (hp : InteriorAssignment p) (hinterior : ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a)) : (∫⁻ z : ℝ × Transcript (Z n), ofReal ((n : ℝ) * errorSqField (sequentialVTPrior R) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtTarget θ (scaledDirection ((sqrt n)⁻¹) v)) (P.estimate n) z) ∂((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))) = ∫⁻ a, ofReal (sequentialVTPrior R a) * localRisk P θ (scaledDirection a v) p n ∂parameterMeasure (-R) R := by rw [lintegral_prod] · apply lintegral_congr_ae have hmem : ∀ᵐ a ∂parameterMeasure (-R) R, a ∈ Icc (-R) R := by unfold parameterMeasure exact ae_restrict_mem measurableSet_Icc filter_upwards [hmem] with a ha rw [localRisk_scaledDirection_eq_lintegral_vtDensity P θ v p R a n hp hinterior ha] rw [← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] apply lintegral_congr intro z rw [scaledError_sq_eq_nat_mul_vtTarget_error_sq P θ v a n z] unfold errorSqField jointDensity rw [ENNReal.ofReal_mul (Nat.cast_nonneg n), ENNReal.ofReal_mul (sq_nonneg _), ENNReal.ofReal_mul ((sequentialVTPrior_facts hR).nonneg a), ENNReal.ofReal_mul (Nat.cast_nonneg n)] ac_rfl · exact (ENNReal.measurable_ofReal.comp (measurable_const.mul (sequentialVanTreesProductMeasurable P θ (scaledDirection ((sqrt n)⁻¹) v) p R n hR (P.estimate n) (P.estimate_measurable n)).errorSq)).aemeasurable
CausalSmith.Stat.LdpAteEfficiencySurface.lintegral_scaledSequentialBayesError_eq_weighted_localRisk · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRiskBridge.lean:114
theorem weightedLocalRisk_le_localWorstRisk

Compact-prior averaging is bounded by local worst risk whenever the scalar directions fit in the chosen radius and remain interior. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p R H :
ℝ
n :
ℕ
hR :
0 < R
hinterior :
∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a)
hcover :
R * sqrt ((v 0) ^ 2 + (v 1) ^ 2) ≤ H
(∫⁻ a, ofReal (sequentialVTPrior R a) * localRisk P θ (scaledDirection a v) p n ∂parameterMeasure (-R) R)
≤ localWorstRisk P θ p H n
Proof (Lean source)
lemma weightedLocalRisk_le_localWorstRisk {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p R H : ℝ) (n : ℕ) (hR : 0 < R) (hinterior : ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a)) (hcover : R * sqrt ((v 0) ^ 2 + (v 1) ^ 2) ≤ H) : (∫⁻ a, ofReal (sequentialVTPrior R a) * localRisk P θ (scaledDirection a v) p n ∂parameterMeasure (-R) R) ≤ localWorstRisk P θ p H n := by have hprior := sequentialVTPrior_facts hR exact (weighted_lintegral_le_uniform (parameterMeasure (-R) R) (sequentialVTPrior R) (fun a => localRisk P θ (scaledDirection a v) p n) (localWorstRisk P θ p H n) hprior.contDiff.continuous.measurable (measurable_localRisk_scaledDirection P θ v p n).aemeasurable (by unfold sequentialVTPrior exact smoothPrior_integrable_parameterMeasure (by linarith)) (Filter.Eventually.of_forall hprior.nonneg) hprior.normalized (by have hmem : ∀ᵐ a ∂parameterMeasure (-R) R, a ∈ Icc (-R) R := by unfold parameterMeasure exact ae_restrict_mem measurableSet_Icc filter_upwards [hmem] with a ha apply localRisk_le_localWorstRisk refine ⟨(scaledDirection_mem_cover v ha).trans hcover, ?_⟩ rw [← parameterPath_sampleScaledDirection_eq_localAlternative] exact hinterior a ha)).2
CausalSmith.Stat.LdpAteEfficiencySurface.weightedLocalRisk_le_localWorstRisk · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRiskBridge.lean:157
theorem ofReal_nat_mul_sequentialBayesError_eq_weighted_localRisk

In the finite-error branch, multiplying the native-real Bayes error by the sample size gives exactly the compact-prior weighted local risk. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p R :
ℝ
n :
ℕ
hR :
0 < R
hinterior :
∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a)
herrorSqInt :
Integrable (errorSqField (sequentialVTPrior R) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtTarget θ (scaledDirection ((sqrt n)⁻¹) v)) (P.estimate n)) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))
ofReal ((n : ℝ) * ∫ z, errorSqField (sequentialVTPrior R) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtTarget θ (scaledDirection ((sqrt n)⁻¹) v)) (P.estimate n) z ∂((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n)))
= ∫⁻ a, ofReal (sequentialVTPrior R a) * localRisk P θ (scaledDirection a v) p n ∂parameterMeasure (-R) R
Proof (Lean source)
lemma ofReal_nat_mul_sequentialBayesError_eq_weighted_localRisk {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p R : ℝ) (n : ℕ) (hR : 0 < R) (hp : InteriorAssignment p) (hinterior : ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a)) (herrorSqInt : Integrable (errorSqField (sequentialVTPrior R) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtTarget θ (scaledDirection ((sqrt n)⁻¹) v)) (P.estimate n)) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))) : ofReal ((n : ℝ) * ∫ z, errorSqField (sequentialVTPrior R) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtTarget θ (scaledDirection ((sqrt n)⁻¹) v)) (P.estimate n) z ∂((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))) = ∫⁻ a, ofReal (sequentialVTPrior R a) * localRisk P θ (scaledDirection a v) p n ∂parameterMeasure (-R) R := by let d := scaledDirection ((sqrt n)⁻¹) v let q := vtDensity P θ d p n (-R) R let g := vtTarget (X := Transcript (Z n)) θ d let w := sequentialVTPrior R let mu := transcriptReferenceMeasure P n have hscaledInt : Integrable (fun z : ℝ × Transcript (Z n) => (n : ℝ) * errorSqField w q g (P.estimate n) z) ((parameterMeasure (-R) R).prod mu) := herrorSqInt.const_mul n have hscaledNonneg : ∀ z : ℝ × Transcript (Z n), 0 ≤ (n : ℝ) * errorSqField w q g (P.estimate n) z := by intro z unfold errorSqField jointDensity exact mul_nonneg (Nat.cast_nonneg n) (mul_nonneg (sq_nonneg _) (mul_nonneg ((sequentialVTPrior_facts hR).nonneg z.1) (vtDensity_nonneg P θ d p n (-R) R hp hinterior z.1 z.2))) calc ofReal ((n : ℝ) * ∫ z, errorSqField (sequentialVTPrior R) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtTarget θ (scaledDirection ((sqrt n)⁻¹) v)) (P.estimate n) z ∂((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))) = ofReal (∫ z, (n : ℝ) * errorSqField w q g (P.estimate n) z ∂((parameterMeasure (-R) R).prod mu)) := by congr 1 rw [integral_const_mul] _ = ∫⁻ z, ofReal ((n : ℝ) * errorSqField w q g (P.estimate n) z) ∂((parameterMeasure (-R) R).prod mu) := ofReal_integral_eq_lintegral_ofReal hscaledInt (Filter.Eventually.of_forall hscaledNonneg) _ = ∫⁻ a, ofReal (sequentialVTPrior R a) * localRisk P θ (scaledDirection a v) p n ∂parameterMeasure (-R) R := by rw [lintegral_prod] · apply lintegral_congr_ae have hmem : ∀ᵐ a ∂parameterMeasure (-R) R, a ∈ Icc (-R) R := by unfold parameterMeasure exact ae_restrict_mem measurableSet_Icc filter_upwards [hmem] with a ha rw [localRisk_scaledDirection_eq_lintegral_vtDensity P θ v p R a n hp hinterior ha] rw [← lintegral_const_mul' _ _ ENNReal.ofReal_ne_top] apply lintegral_congr intro z rw [scaledError_sq_eq_nat_mul_vtTarget_error_sq P θ v a n z] unfold errorSqField jointDensity dsimp [w, q, g, d, mu] rw [ENNReal.ofReal_mul (Nat.cast_nonneg n), ENNReal.ofReal_mul (sq_nonneg _), ENNReal.ofReal_mul ((sequentialVTPrior_facts hR).nonneg a), ENNReal.ofReal_mul (Nat.cast_nonneg n)] ac_rfl · fun_prop
CausalSmith.Stat.LdpAteEfficiencySurface.ofReal_nat_mul_sequentialBayesError_eq_weighted_localRisk · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRiskBridge.lean:191
theorem ofReal_vanTreesEnvelope_le_localWorstRisk_of_fisher_control

The finite van Trees bound, after sample scaling and compact-prior ordering, yields a finite-sample lower bound on local worst risk. Transcript Fisher control remains explicit. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the of Real van Trees Envelope le local Worst Risk of fisher control.

Formal statement
Z :
ε :
ℝ
p R H I :
ℝ
n :
ℕ
hn :
0 < n
hR :
0 < R
hinterior :
∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a)
hcover :
R * sqrt ((v 0) ^ 2 + (v 1) ^ 2) ≤ H
herrorSqInt :
Integrable (errorSqField (sequentialVTPrior R) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtTarget θ (scaledDirection ((sqrt n)⁻¹) v)) (P.estimate n)) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))
hfisherSqInt :
Integrable (fun z : ℝ × Transcript (Z n) => sequentialVTPrior R z.1 * vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R z.1 z.2 * (likelihoodScore (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) z.1 z.2) ^ 2) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))
hfisher_le :
(∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) a ∂parameterMeasure (-R) R)
≤ I
hinfoPos :
+ ∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) a ∂parameterMeasure (-R) R
ofReal (contrast v ^ 2 / (I + 40 / R ^ 2)) ≤ localWorstRisk P θ p H n
Proof (Lean source)
lemma ofReal_vanTreesEnvelope_le_localWorstRisk_of_fisher_control {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p R H I : ℝ) (n : ℕ) (hn : 0 < n) (hR : 0 < R) (hp : InteriorAssignment p) (hinterior : ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a)) (hcover : R * sqrt ((v 0) ^ 2 + (v 1) ^ 2) ≤ H) (herrorSqInt : Integrable (errorSqField (sequentialVTPrior R) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtTarget θ (scaledDirection ((sqrt n)⁻¹) v)) (P.estimate n)) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))) (hfisherSqInt : Integrable (fun z : ℝ × Transcript (Z n) => sequentialVTPrior R z.1 * vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R z.1 z.2 * (likelihoodScore (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) z.1 z.2) ^ 2) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))) (hfisher_le : (∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) a ∂parameterMeasure (-R) R) ≤ I) (hinfoPos : 0 < priorInformation (-R) R (sequentialVTPrior R) (sequentialVTPriorDeriv R) + ∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) a ∂parameterMeasure (-R) R) : ofReal (contrast v ^ 2 / (I + 40 / R ^ 2)) ≤ localWorstRisk P θ p H n := by let d := scaledDirection ((sqrt n)⁻¹) v let bayesError := ∫ z, errorSqField (sequentialVTPrior R) (vtDensity P θ d p n (-R) R) (vtTarget θ d) (P.estimate n) z ∂((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n)) have hvt := sequential_vanTrees_bayes_lower_bound_of_fisher_control P θ d p R I n hR hp hinterior (P.estimate n) (P.estimate_measurable n) herrorSqInt hfisherSqInt hfisher_le hinfoPos have hreal : contrast v ^ 2 / (I + 40 / R ^ 2) ≤ (n : ℝ) * bayesError := by calc contrast v ^ 2 / (I + 40 / R ^ 2) = ((n : ℝ) * contrast d ^ 2) / (I + 40 / R ^ 2) := by rw [nat_mul_contrast_sampleScaledDirection_sq v hn] _ = (n : ℝ) * (contrast d ^ 2 / (I + 40 / R ^ 2)) := by ring _ ≤ (n : ℝ) * bayesError := mul_le_mul_of_nonneg_left hvt (Nat.cast_nonneg n) have hweighted : ofReal ((n : ℝ) * bayesError) = ∫⁻ a, ofReal (sequentialVTPrior R a) * localRisk P θ (scaledDirection a v) p n ∂parameterMeasure (-R) R := by exact ofReal_nat_mul_sequentialBayesError_eq_weighted_localRisk P θ v p R n hR hp hinterior herrorSqInt have hprior := sequentialVTPrior_facts hR have hbayesLe : (∫⁻ a, ofReal (sequentialVTPrior R a) * localRisk P θ (scaledDirection a v) p n ∂parameterMeasure (-R) R) ≤ localWorstRisk P θ p H n := by exact (weighted_lintegral_le_uniform (parameterMeasure (-R) R) (sequentialVTPrior R) (fun a => localRisk P θ (scaledDirection a v) p n) (localWorstRisk P θ p H n) hprior.contDiff.continuous.measurable (measurable_localRisk_scaledDirection P θ v p n).aemeasurable (by unfold sequentialVTPrior exact smoothPrior_integrable_parameterMeasure (by linarith)) (Filter.Eventually.of_forall hprior.nonneg) hprior.normalized (by have hmem : ∀ᵐ a ∂parameterMeasure (-R) R, a ∈ Icc (-R) R := by unfold parameterMeasure exact ae_restrict_mem measurableSet_Icc filter_upwards [hmem] with a ha apply localRisk_le_localWorstRisk refine ⟨(scaledDirection_mem_cover v ha).trans hcover, ?_⟩ rw [← parameterPath_sampleScaledDirection_eq_localAlternative] exact hinterior a ha)).2 exact (ENNReal.ofReal_le_ofReal hreal).trans (hweighted.le.trans hbayesLe)
CausalSmith.Stat.LdpAteEfficiencySurface.ofReal_vanTreesEnvelope_le_localWorstRisk_of_fisher_control · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRiskBridge.lean:275
theorem ofReal_vanTreesEnvelope_le_localWorstRisk_of_fisher_control_allErrors

The finite-sample local-worst-risk lower bound holds for every estimator: the finite-error branch uses van Trees, while a nonintegrable weighted squared error forces the compact-prior Bayes risk and local worst risk to be infinite. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
ε :
ℝ
p R H I :
ℝ
n :
ℕ
hn :
0 < n
hR :
0 < R
hinterior :
∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a)
hcover :
R * sqrt ((v 0) ^ 2 + (v 1) ^ 2) ≤ H
hfisherSqInt :
Integrable (fun z : ℝ × Transcript (Z n) => sequentialVTPrior R z.1 * vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R z.1 z.2 * (likelihoodScore (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) z.1 z.2) ^ 2) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))
hfisher_le :
(∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) a ∂parameterMeasure (-R) R)
≤ I
hinfoPos :
+ ∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) a ∂parameterMeasure (-R) R
ofReal (contrast v ^ 2 / (I + 40 / R ^ 2)) ≤ localWorstRisk P θ p H n
Proof (Lean source)
lemma ofReal_vanTreesEnvelope_le_localWorstRisk_of_fisher_control_allErrors {Z : OutputFamily} [∀ n i, MeasurableSpace (Z n i)] {ε : ℝ} (P : ProcedureSequence Z ε) (θ v : TrialParameter) (p R H I : ℝ) (n : ℕ) (hn : 0 < n) (hR : 0 < R) (hp : InteriorAssignment p) (hinterior : ∀ a ∈ Icc (-R) R, InteriorMeans (parameterPath θ (scaledDirection ((sqrt n)⁻¹) v) a)) (hcover : R * sqrt ((v 0) ^ 2 + (v 1) ^ 2) ≤ H) (hfisherSqInt : Integrable (fun z : ℝ × Transcript (Z n) => sequentialVTPrior R z.1 * vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R z.1 z.2 * (likelihoodScore (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) z.1 z.2) ^ 2) ((parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n))) (hfisher_le : (∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) a ∂parameterMeasure (-R) R) ≤ I) (hinfoPos : 0 < priorInformation (-R) R (sequentialVTPrior R) (sequentialVTPriorDeriv R) + ∫ a, sequentialVTPrior R a * fisherInformation (transcriptReferenceMeasure P n) (vtDensity P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) (vtDensityDeriv P θ (scaledDirection ((sqrt n)⁻¹) v) p n (-R) R) a ∂parameterMeasure (-R) R) : ofReal (contrast v ^ 2 / (I + 40 / R ^ 2)) ≤ localWorstRisk P θ p H n := by let d := scaledDirection ((sqrt n)⁻¹) v let q := vtDensity P θ d p n (-R) R let g := vtTarget (X := Transcript (Z n)) θ d let w := sequentialVTPrior R let mu := (parameterMeasure (-R) R).prod (transcriptReferenceMeasure P n) let F := errorSqField w q g (P.estimate n) have hFmeas : Measurable F := (sequentialVanTreesProductMeasurable P θ d p R n hR (P.estimate n) (P.estimate_measurable n)).errorSq have hFnonneg : ∀ z, 0 ≤ F z := by intro z unfold F errorSqField jointDensity w q exact mul_nonneg (sq_nonneg _) (mul_nonneg ((sequentialVTPrior_facts hR).nonneg z.1) (vtDensity_nonneg P θ d p n (-R) R hp hinterior z.1 z.2)) rcases integrable_or_lintegral_ofReal_eq_top F mu hFmeas hFnonneg with hfinite | hinfinite · exact ofReal_vanTreesEnvelope_le_localWorstRisk_of_fisher_control P θ v p R H I n hn hR hp hinterior hcover hfinite hfisherSqInt hfisher_le hinfoPos · have hscaledTop : (∫⁻ z, ofReal ((n : ℝ) * F z) ∂mu) = ∞ := by have hnTop : ofReal (n : ℝ) ≠ ∞ := ENNReal.ofReal_ne_top simp_rw [ENNReal.ofReal_mul (Nat.cast_nonneg n)] rw [lintegral_const_mul' _ _ hnTop, hinfinite] simp [hn.ne'] have hweightedTop : (∫⁻ a, ofReal (sequentialVTPrior R a) * localRisk P θ (scaledDirection a v) p n ∂parameterMeasure (-R) R) = ∞ := by rw [← lintegral_scaledSequentialBayesError_eq_weighted_localRisk P θ v p R n hR hp hinterior] simpa [F, mu, w, q, g, d] using hscaledTop have hbayesLe := weightedLocalRisk_le_localWorstRisk P θ v p R H n hR hinterior hcover have hworstTop : localWorstRisk P θ p H n = ∞ := by apply top_unique rw [← hweightedTop] exact hbayesLe rw [hworstTop] exact le_top
CausalSmith.Stat.LdpAteEfficiencySurface.ofReal_vanTreesEnvelope_le_localWorstRisk_of_fisher_control_allErrors · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SequentialVanTreesRiskBridge.lean:371
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.SparseSaddle 1 declarations The finite linear-program support theorem is applied at an attained minimizer of the upper envelope.

Sparse stationary staircase saddles

The finite linear-program support theorem is applied at an attained minimizer of the upper envelope. It preserves the four normalization moments, the stationarity moment, and the information value, leaving at most five active staircase rays.

theorem exists_sparse_staircase_saddle

Under the supplied quantities and conditions, the exists sparse staircase saddle assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the exists sparse staircase saddle.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
∃ α : StaircaseWeight,
conclusion 1
conclusion 2
Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε α t}
conclusion 3
(weightSupport α).card ≤ 5
Proof (Lean source)
lemma exists_sparse_staircase_saddle (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : ∃ α : StaircaseWeight, staircaseFeasible ε α ∧ Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε α t} ∧ (weightSupport α).card ≤ 5 := by obtain ⟨t, ht⟩ := upperEnvelope_exists_minimizer θ p ε hp hθ hε have hleast : sInf {u : ℝ | ∃ v : ℝ, u = upperEnvelope θ p ε v} = upperEnvelope θ p ε t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro _ ⟨u, rfl⟩; exact ht u⟩ have hJ : upperEnvelope θ p ε t = Jstar θ p ε := by rw [← hleast, ← finiteOracle_minimax θ p ε hp hθ hε] obtain ⟨x, hx, hxopt⟩ := Jstar_exists_optimal_weight θ p ε hp hθ hε.le have hxbdd : BddBelow {v : ℝ | ∃ w : ℝ, v = informationObjective θ p ε x w} := by refine ⟨0, ?_⟩ rintro _ ⟨u, rfl⟩ exact informationObjective_nonneg_interior θ p ε hp hθ hε.le x hx u have hxlower (u : ℝ) : Jstar θ p ε ≤ informationObjective θ p ε x u := by rw [hxopt] exact csInf_le hxbdd ⟨u, rfl⟩ obtain ⟨zmax, hzmax, hzmaximal⟩ := informationObjective_exists_maximizer θ p ε t hε.le have hzenvelope : upperEnvelope θ p ε t = informationObjective θ p ε zmax t := by unfold upperEnvelope apply IsGreatest.csSup_eq exact ⟨⟨zmax, hzmax, rfl⟩, by rintro _ ⟨z, hz, rfl⟩ exact hzmaximal z hz⟩ have hxvalue : informationObjective θ p ε x t = Jstar θ p ε := by apply le_antisymm · exact (hzmaximal x hx).trans (by rw [← hzenvelope, hJ]) · exact hxlower t have hxmax : ∀ z : StaircaseWeight, (∀ s, 0 ≤ z s) → (∀ j, moment (patternRay ε · j) z = 1) → moment (patternInformation θ p ε · t) z ≤ moment (patternInformation θ p ε · t) x := by intro z hz hzmom have hzfeas : staircaseFeasible ε z := by refine ⟨hz, ?_⟩ intro j simpa [moment, staircaseMatrix, mul_comm] using hzmom j have hzx := hzmaximal z hzfeas rw [← hzenvelope, hJ, ← hxvalue] at hzx simpa [moment, informationObjective, mul_comm] using hzx have hmoment_slope (a : StaircaseWeight) : moment (patternInformationSlope θ p ε · t) a = ∑ s : Fin 14, 2 * a s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s := by unfold moment patternInformationSlope apply Finset.sum_congr rfl intro s _ ring have hxstationary : moment (patternInformationSlope θ p ε · t) x = 0 := by have hraw := informationObjective_stationary_of_min θ p ε x t (by intro u rw [hxvalue] exact hxlower u) rw [hmoment_slope] exact hraw obtain ⟨y, hy, hymom, hystat, hyvalue, hycard, _⟩ := exists_sparse_maximizer (fun j s => patternRay ε s j) (fun _ => 1) (fun s => patternInformationSlope θ p ε s t) (fun s => patternInformation θ p ε s t) x hx.1 (by intro j simpa [moment, staircaseMatrix, mul_comm] using hx.2 j) hxmax have hyfeas : staircaseFeasible ε y := by refine ⟨hy, ?_⟩ intro j simpa [moment, staircaseMatrix, mul_comm] using hymom j have hystationary : ∑ s : Fin 14, 2 * y s * projectedGradient p ε s t * (patternGradient p ε s 0 + patternGradient p ε s 1) / patternMass θ p ε s = 0 := by calc _ = moment (patternInformationSlope θ p ε · t) y := (hmoment_slope y).symm _ = moment (patternInformationSlope θ p ε · t) x := hystat _ = 0 := hxstationary have hymin := informationObjective_min_of_stationary θ p ε hp hθ hε.le y hyfeas t hystationary have hyat : informationObjective θ p ε y t = Jstar θ p ε := by calc informationObjective θ p ε y t = moment (patternInformation θ p ε · t) y := by simp [informationObjective, moment, mul_comm] _ = moment (patternInformation θ p ε · t) x := hyvalue _ = informationObjective θ p ε x t := by simp [informationObjective, moment, mul_comm] _ = Jstar θ p ε := hxvalue refine ⟨y, hyfeas, ?_, ?_⟩ · rw [← hyat] symm apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro _ ⟨u, rfl⟩; exact hymin u⟩ · norm_num at hycard ⊢ exact hycard
CausalSmith.Stat.LdpAteEfficiencySurface.exists_sparse_staircase_saddle · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/SparseSaddle.lean:23
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.TranscriptUniqueness 3 declarations This file shows that the conditional cylinder factorization determines every finite transcript law uniquely.

Uniqueness of finite transcript factorization

This file shows that the conditional cylinder factorization determines every finite transcript law uniquely.

theorem map_historyPrefix_prod_apply

The cylinder factorization determines the joint law of each private history and its next output. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
R :
(Fin n → Fin 4) → Measure (Transcript Z)
hQ :
∀ i, IsMarkovKernel (Q i)
x :
Fin n → Fin 4
i :
Fin n
(R x).map (fun z ↦ (historyPrefix i z, z i))
= (R x).map (historyPrefix i) ⊗ₘ (Q i).comap (fun h ↦ (x i, h)) (by fun_prop)
Proof (Lean source)
lemma TranscriptFactorizes.map_historyPrefix_prod_apply {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] {Q : SequentialKernel (Z := Z)} {R : (Fin n → Fin 4) → Measure (Transcript Z)} (hQ : ∀ i, IsMarkovKernel (Q i)) (hR : TranscriptFactorizes Q R) (x : Fin n → Fin 4) (i : Fin n) : (R x).map (fun z ↦ (historyPrefix i z, z i)) = (R x).map (historyPrefix i) ⊗ₘ (Q i).comap (fun h ↦ (x i, h)) (by fun_prop) := by letI : IsProbabilityMeasure (R x) := (hR x).1 letI : IsMarkovKernel (Q i) := hQ i have hhist : Measurable (historyPrefix i : Transcript Z → PrivateHistory i) := by apply measurable_pi_iff.mpr intro j exact measurable_pi_apply j.1 have hpair : Measurable (fun z : Transcript Z ↦ (historyPrefix i z, z i)) := hhist.prodMk (measurable_pi_apply i) haveI : IsFiniteMeasure ((R x).map (fun z ↦ (historyPrefix i z, z i))) := Measure.isFiniteMeasure_map (R x) _ refine Measure.ext_prod (fun {B A} hB hA ↦ ?_) rw [Measure.map_apply hpair (hB.prod hA), Measure.compProd_apply_prod hB hA] change R x {z | historyPrefix i z ∈ B ∧ z i ∈ A} = _ exact (hR x).2 i B A hB hA
CausalSmith.Stat.LdpAteEfficiencySurface.TranscriptFactorizes.map_historyPrefix_prod_apply · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TranscriptUniqueness.lean:17
theorem map_transcriptPrefix

Every prefix marginal of a factorizing transcript law is the recursively constructed finite-sequence prefix law. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n k :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
R :
(Fin n → Fin 4) → Measure (Transcript Z)
hQ :
∀ i, IsMarkovKernel (Q i)
x :
Fin n → Fin 4
hk :
k ≤ n
(R x).map (transcriptPrefix (Z := Z) hk) = prefixLaw (finiteSequenceKernel Q) x k hk
Proof (Lean source)
lemma TranscriptFactorizes.map_transcriptPrefix {n k : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] {Q : SequentialKernel (Z := Z)} {R : (Fin n → Fin 4) → Measure (Transcript Z)} (hQ : ∀ i, IsMarkovKernel (Q i)) (hR : TranscriptFactorizes Q R) (x : Fin n → Fin 4) (hk : k ≤ n) : (R x).map (transcriptPrefix (Z := Z) hk) = prefixLaw (finiteSequenceKernel Q) x k hk := by induction k with | zero => letI : IsProbabilityMeasure (R x) := (hR x).1 let emptyHistory : History Z 0 hk := fun j ↦ j.elim0 have hfun : transcriptPrefix (Z := Z) hk = (fun _ ↦ emptyHistory) := by funext z j exact j.elim0 rw [hfun, Measure.map_const, measure_univ, one_smul] rfl | succ k ih => have hprev : k ≤ n := Nat.le_of_succ_le hk let i : Fin n := nextIndex hk let hpriv : PrivateHistory (Z := Z) i ≃ᵐ History Z k hprev := (historyMeasurableEquiv (Z := Z) i).symm have hjoint := hR.map_historyPrefix_prod_apply hQ x i have hjoint_fs := congrArg (Measure.map (map hpriv (id : Z i → Z i))) hjoint have hpair : Measurable (fun z : Transcript Z ↦ (historyPrefix i z, z i)) := by apply Measurable.prodMk · apply measurable_pi_iff.mpr intro j exact measurable_pi_apply j.1 · exact measurable_pi_apply i have hleft : map hpriv (id : Z i → Z i) ∘ (fun z : Transcript Z ↦ (historyPrefix i z, z i)) = (fun z ↦ (transcriptPrefix (Z := Z) hprev z, z i)) := by funext z apply Prod.ext · funext j dsimp only [hpriv, i] rfl · rfl rw [Measure.map_map (by fun_prop) hpair, hleft] at hjoint_fs have hright : Measure.map (map hpriv (id : Z i → Z i)) ((R x).map (historyPrefix i) ⊗ₘ (Q i).comap (fun h ↦ (x i, h)) (by fun_prop)) = (R x).map (transcriptPrefix (Z := Z) hprev) ⊗ₘ (finiteSequenceKernel Q i).comap (fun h ↦ (x i, h)) (by fun_prop) := by let μ := (R x).map (historyPrefix i) let κ := (Q i).comap (fun h ↦ (x i, h)) (by fun_prop) letI : IsProbabilityMeasure (R x) := (hR x).1 letI : IsMarkovKernel (Q i) := hQ i letI : IsMarkovKernel κ := by dsimp [κ]; infer_instance rw [map_compProd_prodMap_left_eq_compProd_comap μ hpriv κ] congr 1 · dsimp only [μ] rw [Measure.map_map hpriv.measurable (by apply measurable_pi_iff.mpr intro j exact measurable_pi_apply j.1)] congr 1 rw [hright] at hjoint_fs calc (R x).map (transcriptPrefix (Z := Z) hk) = ((R x).map (fun z ↦ (transcriptPrefix (Z := Z) hprev z, z i))).map (fun p ↦ snoc hk p.1 p.2) := by rw [Measure.map_map (measurable_snoc hk) ((measurable_transcriptPrefix hprev).prodMk (measurable_pi_apply i))] congr 1 funext z j refine Fin.lastCases ?_ (fun l ↦ ?_) j · exact (Fin.snoc_last (α := fun j : Fin (k + 1) => Z (castLE hk j)) (p := transcriptPrefix hprev z) (x := z i)).symm · exact (Fin.snoc_castSucc (α := fun j : Fin (k + 1) => Z (castLE hk j)) (p := transcriptPrefix hprev z) (x := z i) l).symm _ = ((R x).map (transcriptPrefix (Z := Z) hprev) ⊗ₘ (finiteSequenceKernel Q i).comap (fun h ↦ (x i, h)) (by fun_prop)).map (fun p ↦ snoc hk p.1 p.2) := by rw [hjoint_fs] _ = (prefixLaw (finiteSequenceKernel Q) x k hprev ⊗ₘ (finiteSequenceKernel Q i).comap (fun h ↦ (x i, h)) (by fun_prop)).map (fun p ↦ snoc hk p.1 p.2) := by rw [ih hprev] _ = prefixLaw (finiteSequenceKernel Q) x (k + 1) hk := by exact (prefixLaw_succ (finiteSequenceKernel Q) x k hk).symm
CausalSmith.Stat.LdpAteEfficiencySurface.TranscriptFactorizes.map_transcriptPrefix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TranscriptUniqueness.lean:43
theorem eq_finiteSequenceTranscript

A factorizing deterministic transcript law equals the canonical finite sequence construction. The stated result follows. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
n :
ℕ
Fin n → Type
∀ i, MeasurableSpace (Z i)
Q :
R :
(Fin n → Fin 4) → Measure (Transcript Z)
hQ :
∀ i, IsMarkovKernel (Q i)
x :
Fin n → Fin 4
Proof (Lean source)
theorem TranscriptFactorizes.eq_finiteSequenceTranscript {n : ℕ} {Z : Fin n → Type} [∀ i, MeasurableSpace (Z i)] {Q : SequentialKernel (Z := Z)} {R : (Fin n → Fin 4) → Measure (Transcript Z)} (hQ : ∀ i, IsMarkovKernel (Q i)) (hR : TranscriptFactorizes Q R) (x : Fin n → Fin 4) : R x = finiteSequenceTranscript Q x := by have hprefix := hR.map_transcriptPrefix hQ x (k := n) le_rfl have hcanon := finiteSequenceTranscript_map_prefix Q hQ x le_rfl have hmaps := hprefix.trans hcanon.symm have hid : transcriptPrefix (Z := Z) le_rfl = (id : Transcript Z → Transcript Z) := by funext z i rfl rw [hid] at hmaps change Measure.map (id : Transcript Z → Transcript Z) (R x) = Measure.map (id : Transcript Z → Transcript Z) (finiteSequenceTranscript Q x) at hmaps simpa only [Measure.map_id] using hmaps
CausalSmith.Stat.LdpAteEfficiencySurface.TranscriptFactorizes.eq_finiteSequenceTranscript · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TranscriptUniqueness.lean:135
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.Helpers.TreatmentSwap 47 declarations Treatment-arm swap symmetry for centered staircase designs

Treatment-arm swap symmetry for centered staircase designs

def swapTreatmentPattern

Transpose the two-by-two treatment/outcome membership table of a staircase ray. For the displayed inputs and conditions, the stated result follows.

Definition (Lean source)
s :
Fin 14
swapTreatmentPattern s :
Fin 14
Fin.ofNat 14 (((s.val + 1) % 4 * 4 + (s.val + 1) / 4) - 1)
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentPattern · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:15

the swapped support is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
K :
Finset (Fin 14)
swappedSupport K :
Finset (Fin 14)
CausalSmith.Stat.LdpAteEfficiencySurface.swappedSupport · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:19
def swapTreatmentInput

Exchange the two treatment arms in the four-point input alphabet. The stated result follows.

Definition (Lean source)
swapTreatmentInput :
Fin 4 → Fin 4
clause 1
| 0 => 2
clause 2
| 1 => 3
clause 3
| 2 => 0
clause 4
| _ => 1
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentInput · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:23
def swapTreatmentWeight

the swap treatment weight is the mathematical object specified below. The swap Treatment Weight is determined by the displayed parameters.

Definition (Lean source)
swapTreatmentWeight α :
fun s => α (swapTreatmentPattern s)
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentWeight · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:30
theorem swapTreatmentPattern_involutive

the swap treatment pattern involutive assertion holds.

Formal statement
Proof (Lean source)
lemma swapTreatmentPattern_involutive : Involutive swapTreatmentPattern := by intro s fin_cases s <;> rfl
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentPattern_involutive · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:34
theorem swapTreatmentInput_involutive

the swap treatment input involutive assertion holds.

Formal statement
Proof (Lean source)
lemma swapTreatmentInput_involutive : Involutive swapTreatmentInput := by intro j fin_cases j <;> rfl
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentInput_involutive · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:39
theorem swapTreatmentInput_val

Under the supplied quantities and conditions, the swap treatment input val assertion holds.

Formal statement
j :
Fin 4
(swapTreatmentInput j).val = (j.val + 2) % 4
Proof (Lean source)
lemma swapTreatmentInput_val (j : Fin 4) : (swapTreatmentInput j).val = (j.val + 2) % 4 := by fin_cases j <;> decide
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentInput_val · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:44
def swapTreatmentPatternEquiv

the swap treatment pattern equiv is the mathematical object specified below.

Definition (Lean source)
swapTreatmentPatternEquiv :
Fin 14 ≃ Fin 14
clause 1
clause 2
clause 4
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentPatternEquiv · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:49
def swapTreatmentInputEquiv

the swap treatment input equiv is the mathematical object specified below.

Definition (Lean source)
swapTreatmentInputEquiv :
Fin 4 ≃ Fin 4
clause 1
clause 2
clause 3
clause 4
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentInputEquiv · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:56
theorem patternRay_swapTreatment

Under the supplied quantities and conditions, the pattern ray swap treatment assertion holds.

Formal statement
ε :
ℝ
s :
Fin 14
j :
Fin 4
Proof (Lean source)
lemma patternRay_swapTreatment (ε : ℝ) (s : Fin 14) (j : Fin 4) : patternRay ε (swapTreatmentPattern s) (swapTreatmentInput j) = patternRay ε s j := by fin_cases s <;> fin_cases j <;> simp [swapTreatmentPattern, swapTreatmentInput, patternRay, patternContains, Nat.testBit]
CausalSmith.Stat.LdpAteEfficiencySurface.patternRay_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:63
theorem swapTreatmentWeight_involutive

the swap treatment weight involutive assertion holds.

Formal statement
Proof (Lean source)
lemma swapTreatmentWeight_involutive : Involutive swapTreatmentWeight := by intro α funext s simp [swapTreatmentWeight, swapTreatmentPattern_involutive s]
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentWeight_involutive · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:70
theorem staircaseMatrix_swapTreatment

Under the supplied quantities and conditions, the staircase matrix swap treatment assertion holds.

Formal statement
ε :
ℝ
j :
Fin 4
Proof (Lean source)
lemma staircaseMatrix_swapTreatment (ε : ℝ) (α : StaircaseWeight) (j : Fin 4) : staircaseMatrix ε (swapTreatmentWeight α) j = staircaseMatrix ε α (swapTreatmentInput j) := by unfold staircaseMatrix swapTreatmentWeight rw [← swapTreatmentPatternEquiv.sum_comp (fun s => α s * patternRay ε s (swapTreatmentInput j))] apply Finset.sum_congr rfl intro s _ change α (swapTreatmentPattern s) * patternRay ε s j = α (swapTreatmentPattern s) * patternRay ε (swapTreatmentPattern s) (swapTreatmentInput j) rw [patternRay_swapTreatment]
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseMatrix_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:76
theorem staircaseFeasible_swapTreatment

the staircase feasible swap treatment assertion holds.

Formal statement
ε :
ℝ
Proof (Lean source)
lemma staircaseFeasible_swapTreatment (ε : ℝ) (α : StaircaseWeight) : staircaseFeasible ε (swapTreatmentWeight α) ↔ staircaseFeasible ε α := by constructor <;> intro h · constructor · intro s have := h.1 (swapTreatmentPattern s) simpa [swapTreatmentWeight, swapTreatmentPattern_involutive s] using this · intro j have hm := h.2 (swapTreatmentInput j) rw [staircaseMatrix_swapTreatment, swapTreatmentInput_involutive j] at hm exact hm · constructor · intro s exact h.1 (swapTreatmentPattern s) · intro j rw [staircaseMatrix_swapTreatment] exact h.2 (swapTreatmentInput j)
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseFeasible_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:90
theorem staircaseSupport_swapTreatment

the staircase support swap treatment assertion holds.

Formal statement
Proof (Lean source)
lemma staircaseSupport_swapTreatment (α : StaircaseWeight) : staircaseSupport (swapTreatmentWeight α) = swappedSupport (staircaseSupport α) := by ext s simp only [staircaseSupport, mem_filter, Finset.mem_univ, true_and, swappedSupport, mem_image] constructor · intro hs refine ⟨swapTreatmentPattern s, ?_, swapTreatmentPattern_involutive s⟩ simpa [swapTreatmentWeight, swapTreatmentPattern_involutive s] using hs · rintro ⟨u, hu, rfl⟩ simpa [swapTreatmentWeight, swapTreatmentPattern_involutive u] using hu
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseSupport_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:109
theorem centered_piTheta_swapTreatment

Under the supplied quantities and conditions, the centered pi theta swap treatment assertion holds.

Formal statement
p :
ℝ
j :
Fin 4
piTheta (fun _ => (1 / 2 : ℝ)) p (swapTreatmentInput j)
= piTheta (fun _ => (1 / 2 : ℝ)) (1 - p) j
Proof (Lean source)
lemma centered_piTheta_swapTreatment (p : ℝ) (j : Fin 4) : piTheta (fun _ => (1 / 2 : ℝ)) p (swapTreatmentInput j) = piTheta (fun _ => (1 / 2 : ℝ)) (1 - p) j := by rw [centered_piTheta, centered_piTheta] rw [swapTreatmentInput_val] fin_cases j <;> norm_num <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.centered_piTheta_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:122
theorem centered_patternMass_swapTreatment

Under the supplied quantities and conditions, the centered pattern mass swap treatment assertion holds.

Formal statement
p ε :
ℝ
s :
Fin 14
patternMass (fun _ => (1 / 2 : ℝ)) p ε (swapTreatmentPattern s)
= patternMass (fun _ => (1 / 2 : ℝ)) (1 - p) ε s
Proof (Lean source)
lemma centered_patternMass_swapTreatment (p ε : ℝ) (s : Fin 14) : patternMass (fun _ => (1 / 2 : ℝ)) p ε (swapTreatmentPattern s) = patternMass (fun _ => (1 / 2 : ℝ)) (1 - p) ε s := by unfold patternMass rw [← swapTreatmentInputEquiv.sum_comp (fun j => piTheta (fun _ => (1 / 2 : ℝ)) p j * patternRay ε (swapTreatmentPattern s) j)] apply Finset.sum_congr rfl intro j _ change piTheta (fun _ => (1 / 2 : ℝ)) p (swapTreatmentInput j) * patternRay ε (swapTreatmentPattern s) (swapTreatmentInput j) = _ rw [centered_piTheta_swapTreatment, patternRay_swapTreatment]
CausalSmith.Stat.LdpAteEfficiencySurface.centered_patternMass_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:130
theorem patternGradient_swapTreatment

Under the supplied quantities and conditions, the pattern gradient swap treatment assertion holds.

Formal statement
p ε :
ℝ
s :
Fin 14
conclusion 1
conclusion 2
Proof (Lean source)
lemma patternGradient_swapTreatment (p ε : ℝ) (s : Fin 14) : patternGradient p ε (swapTreatmentPattern s) 0 = patternGradient (1 - p) ε s 1 ∧ patternGradient p ε (swapTreatmentPattern s) 1 = patternGradient (1 - p) ε s 0 := by fin_cases s <;> simp [patternGradient, swapTreatmentPattern, patternContains, Nat.testBit, controlProb] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.patternGradient_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:144
theorem projectedGradient_swapTreatment

Under the supplied quantities and conditions, the projected gradient swap treatment assertion holds.

Formal statement
p ε t :
ℝ
s :
Fin 14
projectedGradient p ε (swapTreatmentPattern s) t = -projectedGradient (1 - p) ε s (-1 - t)
Proof (Lean source)
lemma projectedGradient_swapTreatment (p ε t : ℝ) (s : Fin 14) : projectedGradient p ε (swapTreatmentPattern s) t = -projectedGradient (1 - p) ε s (-1 - t) := by obtain ⟨h0, h1⟩ := patternGradient_swapTreatment p ε s simp [projectedGradient, direction, Fin.sum_univ_two, h0, h1] ring
CausalSmith.Stat.LdpAteEfficiencySurface.projectedGradient_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:154
theorem centered_patternInformation_swapTreatment

Under the supplied quantities and conditions, the centered pattern information swap treatment assertion holds.

Formal statement
p ε t :
ℝ
s :
Fin 14
patternInformation (fun _ => (1 / 2 : ℝ)) p ε (swapTreatmentPattern s) t
= patternInformation (fun _ => (1 / 2 : ℝ)) (1 - p) ε s (-1 - t)
Proof (Lean source)
lemma centered_patternInformation_swapTreatment (p ε t : ℝ) (s : Fin 14) : patternInformation (fun _ => (1 / 2 : ℝ)) p ε (swapTreatmentPattern s) t = patternInformation (fun _ => (1 / 2 : ℝ)) (1 - p) ε s (-1 - t) := by rw [patternInformation, patternInformation, centered_patternMass_swapTreatment, projectedGradient_swapTreatment] ring
CausalSmith.Stat.LdpAteEfficiencySurface.centered_patternInformation_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:162
theorem centered_informationObjective_swapTreatment

Under the supplied quantities and conditions, the centered information objective swap treatment assertion holds.

Formal statement
p ε t :
ℝ
informationObjective (fun _ => (1 / 2 : ℝ)) p ε (swapTreatmentWeight α) t
= informationObjective (fun _ => (1 / 2 : ℝ)) (1 - p) ε α (-1 - t)
Proof (Lean source)
lemma centered_informationObjective_swapTreatment (p ε t : ℝ) (α : StaircaseWeight) : informationObjective (fun _ => (1 / 2 : ℝ)) p ε (swapTreatmentWeight α) t = informationObjective (fun _ => (1 / 2 : ℝ)) (1 - p) ε α (-1 - t) := by unfold informationObjective swapTreatmentWeight rw [← swapTreatmentPatternEquiv.sum_comp (fun s => α s * patternInformation (fun _ => (1 / 2 : ℝ)) (1 - p) ε s (-1 - t))] apply Finset.sum_congr rfl intro s _ change α (swapTreatmentPattern s) * patternInformation (fun _ => (1 / 2 : ℝ)) p ε s t = α (swapTreatmentPattern s) * patternInformation (fun _ => (1 / 2 : ℝ)) (1 - p) ε (swapTreatmentPattern s) (-1 - t) rw [← centered_patternInformation_swapTreatment p ε t (swapTreatmentPattern s), swapTreatmentPattern_involutive]
CausalSmith.Stat.LdpAteEfficiencySurface.centered_informationObjective_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:171
theorem centered_profileSet_swapTreatment

Under the supplied quantities and conditions, the centered profile set swap treatment assertion holds.

Formal statement
p ε :
ℝ
{u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p ε (swapTreatmentWeight α) t}
= {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) (1 - p) ε α t}
Proof (Lean source)
lemma centered_profileSet_swapTreatment (p ε : ℝ) (α : StaircaseWeight) : {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p ε (swapTreatmentWeight α) t} = {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) (1 - p) ε α t} := by ext u constructor · rintro ⟨t, rfl⟩ exact ⟨-1 - t, centered_informationObjective_swapTreatment p ε t α⟩ · rintro ⟨t, rfl⟩ refine ⟨-1 - t, ?_⟩ rw [centered_informationObjective_swapTreatment] congr 2 ring
CausalSmith.Stat.LdpAteEfficiencySurface.centered_profileSet_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:191
theorem centered_Jstar_swapTreatment

Under the supplied quantities and conditions, the centered jstar swap treatment assertion holds.

Formal statement
p ε :
ℝ
Jstar (fun _ => (1 / 2 : ℝ)) p ε = Jstar (fun _ => (1 / 2 : ℝ)) (1 - p) ε
Proof (Lean source)
lemma centered_Jstar_swapTreatment (p ε : ℝ) : Jstar (fun _ => (1 / 2 : ℝ)) p ε = Jstar (fun _ => (1 / 2 : ℝ)) (1 - p) ε := by unfold Jstar congr 1 ext z constructor · rintro ⟨α, hα, rfl⟩ refine ⟨swapTreatmentWeight α, (staircaseFeasible_swapTreatment ε α).2 hα, ?_⟩ have hs := congrArg sInf (centered_profileSet_swapTreatment (1 - p) ε α) convert hs.symm using 1 <;> ring · rintro ⟨α, hα, rfl⟩ refine ⟨swapTreatmentWeight α, (staircaseFeasible_swapTreatment ε α).2 hα, ?_⟩ exact (congrArg sInf (centered_profileSet_swapTreatment p ε α)).symm
CausalSmith.Stat.LdpAteEfficiencySurface.centered_Jstar_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:207
theorem centered_Vstar_swapTreatment

Under the supplied quantities and conditions, the centered vstar swap treatment assertion holds.

Formal statement
p ε :
ℝ
Vstar (fun _ => (1 / 2 : ℝ)) p ε = Vstar (fun _ => (1 / 2 : ℝ)) (1 - p) ε
Proof (Lean source)
lemma centered_Vstar_swapTreatment (p ε : ℝ) : Vstar (fun _ => (1 / 2 : ℝ)) p ε = Vstar (fun _ => (1 / 2 : ℝ)) (1 - p) ε := by rw [Vstar, Vstar, centered_Jstar_swapTreatment]
CausalSmith.Stat.LdpAteEfficiencySurface.centered_Vstar_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:227
def swapTreatmentChannel

the swap treatment channel is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
swapTreatmentChannel Q :
Kernel (Fin 4) Z
Q.comap swapTreatmentInput (measurable_of_finite _)
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentChannel · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:235
theorem swapTreatmentChannel_apply

Under the supplied quantities and conditions, the swap treatment channel apply assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
j :
Fin 4
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentChannel_apply · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:239
theorem stationaryLDP_swapTreatment

the stationary ldp swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
ε :
ℝ
Q :
Kernel (Fin 4) Z
hQ :
Proof (Lean source)
lemma stationaryLDP_swapTreatment (ε : ℝ) (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP ε Q) : StationaryLDP ε (swapTreatmentChannel Q) := by refine ⟨⟨fun j => hQ.1.isProbabilityMeasure (swapTreatmentInput j)⟩, ?_⟩ intro A hA j k exact hQ.2 A hA (swapTreatmentInput j) (swapTreatmentInput k)
CausalSmith.Stat.LdpAteEfficiencySurface.stationaryLDP_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:243
theorem dominatingMeasure_swapTreatment

the dominating measure swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
Proof (Lean source)
lemma dominatingMeasure_swapTreatment (Q : Kernel (Fin 4) Z) : dominatingMeasure (swapTreatmentChannel Q) = dominatingMeasure Q := by unfold dominatingMeasure rw [← swapTreatmentInputEquiv.sum_comp (fun j => Q j)] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.dominatingMeasure_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:250
theorem channelDensity_swapTreatment

Under the supplied quantities and conditions, the channel density swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
Q :
Kernel (Fin 4) Z
j :
Fin 4
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.channelDensity_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:257
theorem centered_channelOutputDensity_swapTreatment

Under the supplied quantities and conditions, the centered channel output density swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
z :
Z
channelOutputDensity (fun _ => (1 / 2 : ℝ)) (1 - p) (swapTreatmentChannel Q) z
= channelOutputDensity (fun _ => (1 / 2 : ℝ)) p Q z
Proof (Lean source)
lemma centered_channelOutputDensity_swapTreatment (p : ℝ) (Q : Kernel (Fin 4) Z) (z : Z) : channelOutputDensity (fun _ => (1 / 2 : ℝ)) (1 - p) (swapTreatmentChannel Q) z = channelOutputDensity (fun _ => (1 / 2 : ℝ)) p Q z := by unfold channelOutputDensity rw [← swapTreatmentInputEquiv.sum_comp (fun j => piTheta (fun _ => (1 / 2 : ℝ)) p j * channelDensity Q j z)] apply Finset.sum_congr rfl intro j _ rw [channelDensity_swapTreatment] change piTheta (fun _ => (1 / 2 : ℝ)) (1 - p) j * channelDensity Q (swapTreatmentInput j) z = _ rw [← centered_piTheta_swapTreatment] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.centered_channelOutputDensity_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:265
theorem centered_channelOutputDensity_swapTreatment_invTwo

Under the supplied quantities and conditions, the centered channel output density swap treatment inv two assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
z :
Z
channelOutputDensity (fun _ => (2 : ℝ)⁻¹) (1 - p) (swapTreatmentChannel Q) z
= channelOutputDensity (fun _ => (2 : ℝ)⁻¹) p Q z
Proof (Lean source)
lemma centered_channelOutputDensity_swapTreatment_invTwo (p : ℝ) (Q : Kernel (Fin 4) Z) (z : Z) : channelOutputDensity (fun _ => (2 : ℝ)⁻¹) (1 - p) (swapTreatmentChannel Q) z = channelOutputDensity (fun _ => (2 : ℝ)⁻¹) p Q z := by convert centered_channelOutputDensity_swapTreatment p Q z <;> norm_num
CausalSmith.Stat.LdpAteEfficiencySurface.centered_channelOutputDensity_swapTreatment_invTwo · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:282
theorem inputDerivative_swapTreatment

Under the supplied quantities and conditions, the input derivative swap treatment assertion holds.

Formal statement
p :
ℝ
j :
Fin 4
conclusion 1
conclusion 2
Proof (Lean source)
lemma inputDerivative_swapTreatment (p : ℝ) (j : Fin 4) : inputDerivative (1 - p) j 0 = inputDerivative p (swapTreatmentInput j) 1 ∧ inputDerivative (1 - p) j 1 = inputDerivative p (swapTreatmentInput j) 0 := by fin_cases j <;> simp [inputDerivative, swapTreatmentInput, controlProb] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.inputDerivative_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:290
theorem channelDerivativeDensity_swapTreatment

Under the supplied quantities and conditions, the channel derivative density swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
z :
Z
Proof (Lean source)
lemma channelDerivativeDensity_swapTreatment (p : ℝ) (Q : Kernel (Fin 4) Z) (z : Z) : channelDerivativeDensity (1 - p) (swapTreatmentChannel Q) 0 z = channelDerivativeDensity p Q 1 z ∧ channelDerivativeDensity (1 - p) (swapTreatmentChannel Q) 1 z = channelDerivativeDensity p Q 0 z := by constructor · unfold channelDerivativeDensity rw [← swapTreatmentInputEquiv.sum_comp (fun j => inputDerivative p j 1 * channelDensity Q j z)] apply Finset.sum_congr rfl intro j _ rw [channelDensity_swapTreatment] change inputDerivative (1 - p) j 0 * channelDensity Q (swapTreatmentInput j) z = inputDerivative p (swapTreatmentInput j) 1 * channelDensity Q (swapTreatmentInput j) z rw [(inputDerivative_swapTreatment p j).1] · unfold channelDerivativeDensity rw [← swapTreatmentInputEquiv.sum_comp (fun j => inputDerivative p j 0 * channelDensity Q j z)] apply Finset.sum_congr rfl intro j _ rw [channelDensity_swapTreatment] change inputDerivative (1 - p) j 1 * channelDensity Q (swapTreatmentInput j) z = inputDerivative p (swapTreatmentInput j) 0 * channelDensity Q (swapTreatmentInput j) z rw [(inputDerivative_swapTreatment p j).2]
CausalSmith.Stat.LdpAteEfficiencySurface.channelDerivativeDensity_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:296
def swapTreatmentParameter

For the supplied quantities and conditions, the swap treatment parameter is the mathematical object specified below.

Definition (Lean source)
k :
Fin 2
swapTreatmentParameter k :
Fin 2
if k = 0 then 1 else 0
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentParameter · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:327
def swapTreatmentMatrix

the swap treatment matrix is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
I :
Matrix (Fin 2) (Fin 2) ℝ
swapTreatmentMatrix I :
Matrix (Fin 2) (Fin 2) ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentMatrix · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:330
theorem channelDerivativeDensity_swapTreatment_zero

Under the supplied quantities and conditions, the channel derivative density swap treatment zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.channelDerivativeDensity_swapTreatment_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:335
theorem channelDerivativeDensity_swapTreatment_one

Under the supplied quantities and conditions, the channel derivative density swap treatment one assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.channelDerivativeDensity_swapTreatment_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:342
theorem channelFisherInfo_swapTreatment

Under the supplied quantities and conditions, the channel fisher info swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
channelFisherInfo (fun _ => (1 / 2 : ℝ)) (1 - p) (swapTreatmentChannel Q)
= swapTreatmentMatrix (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q)
Proof (Lean source)
lemma channelFisherInfo_swapTreatment (p : ℝ) (Q : Kernel (Fin 4) Z) : channelFisherInfo (fun _ => (1 / 2 : ℝ)) (1 - p) (swapTreatmentChannel Q) = swapTreatmentMatrix (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q) := by ext a b fin_cases a <;> fin_cases b <;> simp [channelFisherInfo, swapTreatmentMatrix, swapTreatmentParameter, dominatingMeasure_swapTreatment, channelDerivativeDensity_swapTreatment_zero, channelDerivativeDensity_swapTreatment_one] <;> apply MeasureTheory.integral_congr_ae <;> filter_upwards with z <;> rw [centered_channelOutputDensity_swapTreatment_invTwo]
CausalSmith.Stat.LdpAteEfficiencySurface.channelFisherInfo_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:349
theorem centered_outputLaw_swapTreatment

Under the supplied quantities and conditions, the centered output law swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
outputLaw (fun _ => (1 / 2 : ℝ)) (1 - p) (swapTreatmentChannel Q)
= outputLaw (fun _ => (1 / 2 : ℝ)) p Q
Proof (Lean source)
lemma centered_outputLaw_swapTreatment (p : ℝ) (Q : Kernel (Fin 4) Z) : outputLaw (fun _ => (1 / 2 : ℝ)) (1 - p) (swapTreatmentChannel Q) = outputLaw (fun _ => (1 / 2 : ℝ)) p Q := by unfold outputLaw rw [← swapTreatmentInputEquiv.sum_comp (fun j => ofReal (piTheta (fun _ => (1 / 2 : ℝ)) p j) • Q j)] apply Finset.sum_congr rfl intro j _ change ofReal (piTheta (fun _ => (1 / 2 : ℝ)) (1 - p) j) • Q (swapTreatmentInput j) = _ rw [← centered_piTheta_swapTreatment] rfl
CausalSmith.Stat.LdpAteEfficiencySurface.centered_outputLaw_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:365
theorem centered_outputCardinality_swapTreatment

Under the supplied quantities and conditions, the centered output cardinality swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Type u_1
shared
p :
ℝ
Q :
Kernel (Fin 4) Z
outputCardinality (fun _ => (1 / 2 : ℝ)) (1 - p) (swapTreatmentChannel Q)
= outputCardinality (fun _ => (1 / 2 : ℝ)) p Q
Proof (Lean source)
lemma centered_outputCardinality_swapTreatment (p : ℝ) (Q : Kernel (Fin 4) Z) : outputCardinality (fun _ => (1 / 2 : ℝ)) (1 - p) (swapTreatmentChannel Q) = outputCardinality (fun _ => (1 / 2 : ℝ)) p Q := by classical unfold outputCardinality split <;> simp_all only [centered_outputLaw_swapTreatment]
CausalSmith.Stat.LdpAteEfficiencySurface.centered_outputCardinality_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:379
def reflectTreatmentParameter

For the supplied quantities and conditions, the reflect treatment parameter is the mathematical object specified below.

Definition (Lean source)
reflectTreatmentParameter v :
fun k => -v (swapTreatmentParameter k)
CausalSmith.Stat.LdpAteEfficiencySurface.reflectTreatmentParameter · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:388
theorem reflectTreatmentParameter_involutive

the reflect treatment parameter involutive assertion holds.

Formal statement
Proof (Lean source)
lemma reflectTreatmentParameter_involutive : Involutive reflectTreatmentParameter := by intro v funext k fin_cases k <;> simp [reflectTreatmentParameter, swapTreatmentParameter]
CausalSmith.Stat.LdpAteEfficiencySurface.reflectTreatmentParameter_involutive · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:393
theorem swapTreatmentMatrix_mulVec

the swap treatment matrix mul vec assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
k :
Fin 2
Proof (Lean source)
lemma swapTreatmentMatrix_mulVec (I : Matrix (Fin 2) (Fin 2) ℝ) (v : TrialParameter) (k : Fin 2) : (swapTreatmentMatrix I).mulVec (reflectTreatmentParameter v) k = -(I.mulVec v (swapTreatmentParameter k)) := by fin_cases k <;> simp [swapTreatmentMatrix, reflectTreatmentParameter, swapTreatmentParameter, mulVec, Fin.sum_univ_two] <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.swapTreatmentMatrix_mulVec · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:400
theorem neg_contrastVector_swap

Under the supplied quantities and conditions, the neg contrast vector swap assertion holds.

Formal statement
k :
Fin 2
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.neg_contrastVector_swap · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:409
theorem contrastInRange_swapTreatment

the contrast in range swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
Proof (Lean source)
lemma contrastInRange_swapTreatment (I : Matrix (Fin 2) (Fin 2) ℝ) : contrastInRange (swapTreatmentMatrix I) ↔ contrastInRange I := by constructor · rintro ⟨v, hv⟩ refine ⟨reflectTreatmentParameter v, ?_⟩ funext k have h0 := congrFun hv 0 have h1 := congrFun hv 1 fin_cases k <;> simp [swapTreatmentMatrix, reflectTreatmentParameter, swapTreatmentParameter, mulVec, Fin.sum_univ_two, contrastVector] at h0 h1 ⊢ <;> linarith · rintro ⟨v, hv⟩ refine ⟨reflectTreatmentParameter v, ?_⟩ funext k rw [swapTreatmentMatrix_mulVec, hv, neg_contrastVector_swap]
CausalSmith.Stat.LdpAteEfficiencySurface.contrastInRange_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:414
theorem contrastPairing_reflect

Under the supplied quantities and conditions, the contrast pairing reflect assertion holds.

Formal statement
= ∑ k : Fin 2, contrastVector k * v k
Proof (Lean source)
CausalSmith.Stat.LdpAteEfficiencySurface.contrastPairing_reflect · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:431
theorem contrastSolutionValues_swapTreatment

the contrast solution values swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
{u : ℝ | ∃ v : TrialParameter, (swapTreatmentMatrix I).mulVec v = contrastVector ∧ u = ∑ k : Fin 2, contrastVector k * v k}
= {u : ℝ | ∃ v : TrialParameter, I.mulVec v = contrastVector ∧ u = ∑ k : Fin 2, contrastVector k * v k}
Proof (Lean source)
lemma contrastSolutionValues_swapTreatment (I : Matrix (Fin 2) (Fin 2) ℝ) : {u : ℝ | ∃ v : TrialParameter, (swapTreatmentMatrix I).mulVec v = contrastVector ∧ u = ∑ k : Fin 2, contrastVector k * v k} = {u : ℝ | ∃ v : TrialParameter, I.mulVec v = contrastVector ∧ u = ∑ k : Fin 2, contrastVector k * v k} := by ext u constructor · rintro ⟨v, hv, rfl⟩ refine ⟨reflectTreatmentParameter v, ?_, contrastPairing_reflect v |>.symm⟩ funext k have h0 := congrFun hv 0 have h1 := congrFun hv 1 fin_cases k <;> simp [swapTreatmentMatrix, reflectTreatmentParameter, swapTreatmentParameter, mulVec, Fin.sum_univ_two, contrastVector] at h0 h1 ⊢ <;> linarith · rintro ⟨v, hv, rfl⟩ refine ⟨reflectTreatmentParameter v, ?_, contrastPairing_reflect v |>.symm⟩ funext k rw [swapTreatmentMatrix_mulVec, hv, neg_contrastVector_swap]
CausalSmith.Stat.LdpAteEfficiencySurface.contrastSolutionValues_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:438
theorem contrastVariance_swapTreatment

the contrast variance swap treatment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
I :
Matrix (Fin 2) (Fin 2) ℝ
Proof (Lean source)
lemma contrastVariance_swapTreatment (I : Matrix (Fin 2) (Fin 2) ℝ) : contrastVariance (swapTreatmentMatrix I) = contrastVariance I := by classical unfold contrastVariance by_cases h : contrastInRange I · have hs : contrastInRange (swapTreatmentMatrix I) := (contrastInRange_swapTreatment I).2 h rw [if_pos h, if_pos hs, contrastSolutionValues_swapTreatment] · have hs : ¬ contrastInRange (swapTreatmentMatrix I) := by simpa [contrastInRange_swapTreatment I] using h rw [if_neg h, if_neg hs]
CausalSmith.Stat.LdpAteEfficiencySurface.contrastVariance_swapTreatment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/Helpers/TreatmentSwap.lean:460
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.TBalancedReduction 20 declarations When assignment is balanced and the arm means sum to one, randomized response to the signed treatment–outcome bit attains the information oracle.

Balanced randomized-response reduction

When assignment is balanced and the arm means sum to one, randomized response to the signed treatment–outcome bit attains the information oracle.

def signedBit

the signed bit is the mathematical object specified below.

Definition (Lean source)
signedBit :
Fin 4 → Fin 2
clause 1
| ⟨0, _⟩ => 1
clause 2
| ⟨1, _⟩ => 0
clause 3
| ⟨2, _⟩ => 0
clause 4
| _ => 1

the balanced rr is the mathematical object specified below. The balanced RR is determined by the displayed parameters.

Definition (Lean source)
ε :
ℝ
balancedRR ε :
Kernel (Fin 4) (Fin 2)
Kernel.ofFunOfCountable fun j
=> Measure.count.withDensity (fun z : Fin 2 => ofReal (if z = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1)))
theorem balancedRR_atom

Under the supplied quantities and conditions, the balanced rr atom assertion holds.

Formal statement
ε :
ℝ
j :
Fin 4
z :
Fin 2
((balancedRR ε j) {z}).toReal
= if z = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1)
Proof (Lean source)
lemma balancedRR_atom (ε : ℝ) (j : Fin 4) (z : Fin 2) : ((balancedRR ε j) {z}).toReal = if z = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1) := by have he : 0 < exp ε := Real.exp_pos ε have hd : 0 < exp ε + 1 := by positivity change (Measure.count.withDensity (fun u : Fin 2 => ofReal (if u = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1))) {z}).toReal = _ rw [withDensity_apply _ (measurableSet_singleton z), lintegral_singleton] have hc : Measure.count {z} = 1 := by simp rw [hc, mul_one] split_ifs <;> rw [ENNReal.toReal_ofReal] <;> positivity
CausalSmith.Stat.LdpAteEfficiencySurface.balancedRR_atom · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:35
theorem grouped_balancedRR_atom

Under the supplied quantities and conditions, the grouped balanced rr atom assertion holds.

Formal statement
ε :
ℝ
b :
z :
Fin 2
= if b = (z = 1) then exp ε / (exp ε + 1) else 1 / (exp ε + 1)
Proof (Lean source)
lemma grouped_balancedRR_atom (ε : ℝ) (b : Bool) (z : Fin 2) : ((groupedChannel (balancedRR ε) b) {z}).toReal = if b = (z = 1) then exp ε / (exp ε + 1) else 1 / (exp ε + 1) := by have hfinite (j : Fin 4) : balancedRR ε j {z} ≠ ∞ := by intro hj have h := balancedRR_atom ε j z rw [hj] at h simp only [ENNReal.toReal_top] at h split_ifs at h · have hp : 0 < exp ε / (exp ε + 1) := by positivity linarith · have hq : 0 < 1 / (exp ε + 1) := by positivity linarith have hhalfReal : half.toReal = (1 / 2 : ℝ) := by rfl cases b · change (half * (balancedRR ε 1 {z} + balancedRR ε 2 {z})).toReal = _ rw [ENNReal.toReal_mul, ENNReal.toReal_add (hfinite 1) (hfinite 2)] rw [balancedRR_atom, balancedRR_atom] fin_cases z <;> rw [hhalfReal] <;> simp +decide [signedBit] <;> field_simp <;> ring · change (half * (balancedRR ε 0 {z} + balancedRR ε 3 {z})).toReal = _ rw [ENNReal.toReal_mul, ENNReal.toReal_add (hfinite 0) (hfinite 3)] rw [balancedRR_atom, balancedRR_atom] fin_cases z <;> rw [hhalfReal] <;> simp +decide [signedBit] <;> field_simp <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.grouped_balancedRR_atom · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:50
theorem randomizedResponse_atom

Under the supplied quantities and conditions, the randomized response atom assertion holds.

Formal statement
ε :
ℝ
b z :
= if b = z then exp ε / (exp ε + 1) else 1 / (exp ε + 1)
Proof (Lean source)
lemma randomizedResponse_atom (ε : ℝ) (b z : Bool) : ((randomizedResponse ε b) {z}).toReal = if b = z then exp ε / (exp ε + 1) else 1 / (exp ε + 1) := by let e := exp ε let p := e / (e + 1) let q := 1 / (e + 1) have he : 0 < e := by dsimp [e]; positivity have he1 : 0 < e + 1 := by linarith have hp : 0 < p := div_pos he he1 have hq : 0 < q := div_pos (by norm_num) he1 have hcq : 1 - q = p := by dsimp [p, q] field_simp ring have hcp : 1 - p = q := by dsimp [p, q] field_simp ring have hqi : (exp ε + 1)⁻¹ = q := by dsimp [q, e] rw [one_div] change ((bernoulliBool (responseProbability ε b)) {z}).toReal = _ cases b <;> cases z <;> simp [responseProbability, bernoulliBool, Measure.add_apply, Measure.smul_apply] all_goals try rw [hqi] all_goals try positivity all_goals first | (change (ofReal (1 - q)).toReal = p rw [hcq, ENNReal.toReal_ofReal hp.le]) | (change (ofReal q).toReal = q rw [ENNReal.toReal_ofReal hq.le]) | (change (ofReal (1 - p)).toReal = q rw [hcp, ENNReal.toReal_ofReal hq.le]) | (change (ofReal p).toReal = p rw [ENNReal.toReal_ofReal hp.le])
CausalSmith.Stat.LdpAteEfficiencySurface.randomizedResponse_atom · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:80
theorem piTheta_balanced_by_val Lemma piTheta_balanced_by_val in the paper ↗

Under the supplied quantities and conditions, the pi theta balanced by val assertion holds.

Formal statement
j :
Fin 4
piTheta θ (1 / 2) j
= if j.val = 0 then controlProb (1 / 2) * (1 - θ 0) else if j.val = 1 then controlProb (1 / 2) * θ 0 else if j.val = 2 then (1 / 2) * (1 - θ 1) else (1 / 2) * θ 1
Proof (Lean source)
lemma piTheta_balanced_by_val (θ : TrialParameter) (j : Fin 4) : piTheta θ (1 / 2) j = if j.val = 0 then controlProb (1 / 2) * (1 - θ 0) else if j.val = 1 then controlProb (1 / 2) * θ 0 else if j.val = 2 then (1 / 2) * (1 - θ 1) else (1 / 2) * θ 1 := by rcases j with ⟨j, hj⟩ interval_cases j <;> rfl
CausalSmith.Stat.LdpAteEfficiencySurface.piTheta_balanced_by_val · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:122
theorem signedBit_probability_one

the signed bit probability one assertion holds.

Formal statement
(∑ j : Fin 4, if signedBit j = 1 then piTheta θ (1 / 2) j else 0) = (1 + contrast θ) / 2
Proof (Lean source)
lemma signedBit_probability_one (θ : TrialParameter) : (∑ j : Fin 4, if signedBit j = 1 then piTheta θ (1 / 2) j else 0) = (1 + contrast θ) / 2 := by simp +decide [signedBit, contrast, Fin.sum_univ_succ] rw [← one_div] rw [piTheta_balanced_by_val, piTheta_balanced_by_val] norm_num [controlProb] ring
CausalSmith.Stat.LdpAteEfficiencySurface.signedBit_probability_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:133
theorem signedBit_probability_zero

the signed bit probability zero assertion holds.

Formal statement
(∑ j : Fin 4, if signedBit j = 0 then piTheta θ (1 / 2) j else 0) = (1 - contrast θ) / 2
Proof (Lean source)
lemma signedBit_probability_zero (θ : TrialParameter) : (∑ j : Fin 4, if signedBit j = 0 then piTheta θ (1 / 2) j else 0) = (1 - contrast θ) / 2 := by simp +decide [signedBit, contrast, Fin.sum_univ_succ] rw [← one_div] rw [piTheta_balanced_by_val, piTheta_balanced_by_val] norm_num [controlProb] ring
CausalSmith.Stat.LdpAteEfficiencySurface.signedBit_probability_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:144
theorem balancedRR_output_probability_one

the balanced rr output probability one assertion holds.

Formal statement
ε :
ℝ
(∑ j : Fin 4, piTheta θ (1 / 2) j * (if (1 : Fin 2) = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1)))
= (1 + (exp ε - 1) / (exp ε + 1) * contrast θ) / 2
Proof (Lean source)
lemma balancedRR_output_probability_one (θ : TrialParameter) (ε : ℝ) : (∑ j : Fin 4, piTheta θ (1 / 2) j * (if (1 : Fin 2) = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1))) = (1 + (exp ε - 1) / (exp ε + 1) * contrast θ) / 2 := by have hd : exp ε + 1 ≠ 0 := by positivity simp +decide [signedBit, contrast, Fin.sum_univ_succ] rw [← one_div] rw [piTheta_balanced_by_val, piTheta_balanced_by_val, piTheta_balanced_by_val, piTheta_balanced_by_val] norm_num [controlProb] field_simp ring
CausalSmith.Stat.LdpAteEfficiencySurface.balancedRR_output_probability_one · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:155
theorem balancedRR_output_probability_zero

the balanced rr output probability zero assertion holds.

Formal statement
ε :
ℝ
(∑ j : Fin 4, piTheta θ (1 / 2) j * (if (0 : Fin 2) = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1)))
= (1 - (exp ε - 1) / (exp ε + 1) * contrast θ) / 2
Proof (Lean source)
lemma balancedRR_output_probability_zero (θ : TrialParameter) (ε : ℝ) : (∑ j : Fin 4, piTheta θ (1 / 2) j * (if (0 : Fin 2) = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1))) = (1 - (exp ε - 1) / (exp ε + 1) * contrast θ) / 2 := by have hd : exp ε + 1 ≠ 0 := by positivity simp +decide [signedBit, contrast, Fin.sum_univ_succ] rw [← one_div] rw [piTheta_balanced_by_val, piTheta_balanced_by_val, piTheta_balanced_by_val, piTheta_balanced_by_val] norm_num [controlProb] field_simp ring
CausalSmith.Stat.LdpAteEfficiencySurface.balancedRR_output_probability_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:172
theorem balancedRR_stationary

Under the supplied quantities and conditions, the balanced rr stationary assertion holds. Under the stated assumptions, the balanced RR stationary.

Formal statement
ε :
ℝ
hε :
0 < ε
Proof (Lean source)
lemma balancedRR_stationary (ε : ℝ) (hε : 0 < ε) : StationaryLDP ε (balancedRR ε) := by constructor · constructor intro j constructor have hsum : (∑ z : Fin 2, (if z = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1))) = 1 := by fin_cases j <;> simp +decide [signedBit, Fin.sum_univ_succ] <;> field_simp <;> ring rw [← ENNReal.ofReal_one, ← hsum] change (Measure.count.withDensity (fun z : Fin 2 => ofReal (if z = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1)))) univ = _ simp only [withDensity_apply _ MeasurableSet.univ, setLIntegral_univ, lintegral_count] rw [tsum_fintype, ENNReal.ofReal_sum_of_nonneg] intro z hz split_ifs <;> positivity · intro A hA j j' let r := ofReal (exp ε) have hr : r ≠ ∞ := ENNReal.ofReal_ne_top have hm : Measure.count.withDensity (fun z : Fin 2 => ofReal (if z = signedBit j then exp ε / (exp ε + 1) else 1 / (exp ε + 1))) ≤ r • Measure.count.withDensity (fun z : Fin 2 => ofReal (if z = signedBit j' then exp ε / (exp ε + 1) else 1 / (exp ε + 1))) := by rw [← withDensity_smul' r _ hr] apply withDensity_mono filter_upwards [] with z dsimp [r] rw [← ENNReal.ofReal_mul (le_of_lt (Real.exp_pos ε))] apply ENNReal.ofReal_le_ofReal have he : 1 ≤ exp ε := (Real.one_le_exp_iff).2 (le_of_lt hε) have hd : 0 < exp ε + 1 := by positivity split_ifs <;> rw [← mul_div_assoc] <;> apply (div_le_div_iff_of_pos_right hd).2 <;> nlinarith [sq_nonneg (exp ε - 1)] exact hm A
CausalSmith.Stat.LdpAteEfficiencySurface.balancedRR_stationary · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:188
theorem grouped_balancedRR_information_eq_randomizedResponse

Under the supplied quantities and conditions, the grouped balanced rr information eq randomized response assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the grouped balanced RR information eq randomized Response.

Formal statement
hθ :
hbalance :
θ 0 + θ 1 = 1
ε :
ℝ
hε :
0 < ε
= information (randomizedResponse ε) (contrast θ)
Proof (Lean source)
lemma grouped_balancedRR_information_eq_randomizedResponse (θ : TrialParameter) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) (ε : ℝ) (hε : 0 < ε) : information (groupedChannel (balancedRR ε)) (contrast θ) = information (randomizedResponse ε) (contrast θ) := by letI : IsMarkovKernel (balancedRR ε) := (balancedRR_stationary ε hε).1 letI : IsMarkovKernel (groupedChannel (balancedRR ε)) := groupedChannel_markov _ letI : IsMarkovKernel (randomizedResponse ε) := randomizedResponse_markov ε have hτ := abs_contrast_lt_one θ hθ hbalance rw [information_eq_discrete _ _ hτ, information_eq_discrete _ _ hτ] unfold discreteInformation rw [tsum_fintype, tsum_fintype] simp +decide [grouped_balancedRR_atom, randomizedResponse_atom, Fin.sum_univ_succ] ring
CausalSmith.Stat.LdpAteEfficiencySurface.grouped_balancedRR_information_eq_randomizedResponse · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:236
theorem grouped_balancedRR_information_eq

the grouped balanced rr information eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the grouped balanced RR information eq.

Formal statement
hθ :
hbalance :
θ 0 + θ 1 = 1
ε :
ℝ
hε :
0 < ε
= contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2)
Proof (Lean source)
lemma grouped_balancedRR_information_eq (θ : TrialParameter) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) (ε : ℝ) (hε : 0 < ε) : information (groupedChannel (balancedRR ε)) (contrast θ) = contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2) := by rw [grouped_balancedRR_information_eq_randomizedResponse θ hθ hbalance ε hε] exact randomizedResponse_information_eq ε (contrast θ) hε (abs_contrast_lt_one θ hθ hbalance)
CausalSmith.Stat.LdpAteEfficiencySurface.grouped_balancedRR_information_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:261
theorem balancedRR_directionalDerivative

Under the supplied quantities and conditions, the balanced rr directional derivative assertion holds.

Formal statement
ε t :
ℝ
z :
Fin 2
(∑ k, direction t k * channelDerivativeDensity (1 / 2) (balancedRR ε) k z)
= (∑ k, direction (-1 / 2) k * channelDerivativeDensity (1 / 2) (balancedRR ε) k z)
Proof (Lean source)
lemma balancedRR_directionalDerivative (ε t : ℝ) (z : Fin 2) : (∑ k, direction t k * channelDerivativeDensity (1 / 2) (balancedRR ε) k z) = (∑ k, direction (-1 / 2) k * channelDerivativeDensity (1 / 2) (balancedRR ε) k z) := by have h03 : balancedRR ε 0 = balancedRR ε 3 := by rfl have h12 : balancedRR ε 1 = balancedRR ε 2 := by rfl have hd03 : channelDensity (balancedRR ε) 0 z = channelDensity (balancedRR ε) 3 z := by unfold channelDensity rw [h03] have hd12 : channelDensity (balancedRR ε) 1 z = channelDensity (balancedRR ε) 2 z := by unfold channelDensity rw [h12] simp +decide [channelDerivativeDensity, inputDerivative, direction, controlProb, Fin.sum_univ_succ] rw [hd03, hd12] ring
CausalSmith.Stat.LdpAteEfficiencySurface.balancedRR_directionalDerivative · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:277
theorem balancedRR_quadratic_eq

Under the supplied quantities and conditions, the balanced rr quadratic eq assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the balanced RR quadratic eq.

Formal statement
hθ :
ε :
ℝ
hε :
0 < ε
t :
ℝ
Proof (Lean source)
lemma balancedRR_quadratic_eq (θ : TrialParameter) (hθ : InteriorMeans θ) (ε : ℝ) (hε : 0 < ε) (t : ℝ) : informationQuadratic (channelFisherInfo θ (1 / 2) (balancedRR ε)) (direction t) = informationQuadratic (channelFisherInfo θ (1 / 2) (balancedRR ε)) (direction (-1 / 2)) := by have hRR := balancedRR_stationary ε hε rw [informationQuadratic_eq_channelIntegral (1 / 2) θ (by constructor <;> norm_num) hθ ε (balancedRR ε) hRR (direction t), informationQuadratic_eq_channelIntegral (1 / 2) θ (by constructor <;> norm_num) hθ ε (balancedRR ε) hRR (direction (-1 / 2))] apply integral_congr_ae filter_upwards [] with z rw [balancedRR_directionalDerivative ε t z]
CausalSmith.Stat.LdpAteEfficiencySurface.balancedRR_quadratic_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:298
theorem sharp_information_pos

Under the supplied quantities and conditions, the sharp information pos assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the sharp information pos.

Formal statement
hθ :
hbalance :
θ 0 + θ 1 = 1
ε :
ℝ
hε :
0 < ε
0 < contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2)
Proof (Lean source)
lemma sharp_information_pos (θ : TrialParameter) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) (ε : ℝ) (hε : 0 < ε) : 0 < Causalean.Stat.Privacy.Binary.contraction ε ^ 2 / (1 - Causalean.Stat.Privacy.Binary.contraction ε ^ 2 * contrast θ ^ 2) := by let κ := Causalean.Stat.Privacy.Binary.contraction ε have hκ : 0 < κ := by dsimp [κ, Causalean.Stat.Privacy.Binary.contraction] have he : 1 < exp ε := (Real.one_lt_exp_iff).2 hε positivity have hκ1 : κ < 1 := (contraction_mem ε hε).2 have hκSq : κ ^ 2 < 1 := (sq_lt_one_iff₀ hκ.le).2 hκ1 have hτSq : contrast θ ^ 2 < 1 := (sq_lt_one_iff_abs_lt_one (contrast θ)).2 (abs_contrast_lt_one θ hθ hbalance) have hprod : κ ^ 2 * contrast θ ^ 2 < 1 := mul_lt_one_of_nonneg_of_lt_one_left (sq_nonneg κ) hκSq hτSq.le exact div_pos (sq_pos_of_pos hκ) (sub_pos.2 hprod)
CausalSmith.Stat.LdpAteEfficiencySurface.sharp_information_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:317
theorem balancedRR_variance_eq_sharp

the balanced rr variance eq sharp assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the balanced RR variance eq sharp.

Formal statement
hθ :
hbalance :
θ 0 + θ 1 = 1
ε :
ℝ
hε :
0 < ε
= ofReal (contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2))⁻¹
Proof (Lean source)
lemma balancedRR_variance_eq_sharp (θ : TrialParameter) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) (ε : ℝ) (hε : 0 < ε) : contrastVariance (channelFisherInfo θ (1 / 2) (balancedRR ε)) = ofReal (contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2))⁻¹ := by have hRR := balancedRR_stationary ε hε have hinfo := grouped_balancedRR_information_eq θ hθ hbalance ε hε have hquad : informationQuadratic (channelFisherInfo θ (1 / 2) (balancedRR ε)) (direction (-1 / 2)) = contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2) := by rw [← hinfo] exact grouped_information_eq_channelQuadratic θ hθ hbalance ε (balancedRR ε) hRR |>.symm rw [contrastVariance_eq_reciprocal_of_minimizer (channelFisherInfo θ (1 / 2) (balancedRR ε)) (channelFisherInfo_posSemidef (1 / 2) θ (by constructor <;> norm_num) hθ ε (balancedRR ε) hRR) (-1 / 2) (fun u => by rw [balancedRR_quadratic_eq θ hθ ε hε u]) (hquad.symm ▸ sharp_information_pos θ hθ hbalance ε hε), hquad]
CausalSmith.Stat.LdpAteEfficiencySurface.balancedRR_variance_eq_sharp · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:340
theorem Vstar_balanced_eq_sharp_reciprocal

the vstar balanced eq sharp reciprocal assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Vstar balanced eq sharp reciprocal.

Formal statement
hθ :
hbalance :
θ 0 + θ 1 = 1
ε :
ℝ
hε :
0 < ε
Vstar θ (1 / 2) ε
= (contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2))⁻¹
Proof (Lean source)
lemma Vstar_balanced_eq_sharp_reciprocal (θ : TrialParameter) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) (ε : ℝ) (hε : 0 < ε) : Vstar θ (1 / 2) ε = (contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2))⁻¹ := by let B := contraction ε ^ 2 / (1 - contraction ε ^ 2 * contrast θ ^ 2) have hB : 0 < B := sharp_information_pos θ hθ hbalance ε hε have hJ : 0 < Jstar θ (1 / 2) ε := Jstar_pos_interior θ (1 / 2) ε (by constructor <;> norm_num) hθ hε have hJle : Jstar θ (1 / 2) ε ≤ B := by simpa [B] using Jstar_balanced_le_sharp θ hθ hbalance ε hε have hlower : B⁻¹ ≤ Vstar θ (1 / 2) ε := by rw [Vstar] exact (inv_le_inv₀ hB hJ).2 hJle have huniv := (finite_oracle θ (1 / 2) ε (by constructor <;> norm_num) hθ (fun _ => ε) ⟨hε, fun _ => rfl⟩).1 (Fin 2) (balancedRR ε) (balancedRR_stationary ε hε) rw [balancedRR_variance_eq_sharp θ hθ hbalance ε hε] at huniv have hupper : Vstar θ (1 / 2) ε ≤ B⁻¹ := by rw [ENNReal.ofReal_le_ofReal_iff (inv_nonneg.mpr hB.le)] at huniv simpa [B] using huniv exact le_antisymm hupper hlower
CausalSmith.Stat.LdpAteEfficiencySurface.Vstar_balanced_eq_sharp_reciprocal · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:371
theorem contraction_inv_eq_coth

Under the supplied quantities and conditions, the contraction inv eq coth assertion holds. Under the stated assumptions, the contraction inv eq coth.

Formal statement
ε :
ℝ
hε :
0 < ε
(contraction ε)⁻¹ = cosh (ε / 2) / sinh (ε / 2)
Proof (Lean source)
lemma contraction_inv_eq_coth (ε : ℝ) (hε : 0 < ε) : (contraction ε)⁻¹ = cosh (ε / 2) / sinh (ε / 2) := by have hs : sinh (ε / 2) ≠ 0 := ne_of_gt ((Real.sinh_pos_iff).2 (by linarith)) have he : exp (ε / 2) ≠ 0 := Real.exp_ne_zero _ have hexp : exp ε = exp (ε / 2) * exp (ε / 2) := by rw [← Real.exp_add] congr 1 ring rw [contraction, Real.cosh_eq, Real.sinh_eq, Real.exp_neg, hexp] field_simp
CausalSmith.Stat.LdpAteEfficiencySurface.contraction_inv_eq_coth · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:400
theorem balanced_reduction

the balanced reduction assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the balanced reduction.

Formal statement
Ω :
μ :
Y0 Y1 W Y :
ℕ → Ω → ℝ
ε :
ℝ
hθ :
hbalance :
θ 0 + θ 1 = 1
hε :
0 < ε
conclusion 1
Vstar θ (1 / 2) ε = (cosh (ε / 2) / sinh (ε / 2)) ^ 2 - (contrast θ) ^ 2
conclusion 2
conclusion 3
= ofReal (Vstar θ (1 / 2) ε)
Proof (Lean source)
theorem balanced_reduction {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) (Y0 Y1 W Y : ℕ → Ω → ℝ) (θ : TrialParameter) (ε : ℝ) (hθ : InteriorMeans θ) (hbalance : θ 0 + θ 1 = 1) (hε : 0 < ε) : Vstar θ (1 / 2) ε = (cosh (ε / 2) / sinh (ε / 2)) ^ 2 - (contrast θ) ^ 2 ∧ StationaryLDP ε (balancedRR ε) ∧ contrastVariance (channelFisherInfo θ (1 / 2) (balancedRR ε)) = ofReal (Vstar θ (1 / 2) ε) := by refine ⟨?_, ?_, ?_⟩ · rw [Vstar_balanced_eq_sharp_reciprocal θ hθ hbalance ε hε] let κ := Causalean.Stat.Privacy.Binary.contraction ε have hκ : 0 < κ := by dsimp [κ, Causalean.Stat.Privacy.Binary.contraction] have he : 1 < exp ε := (Real.one_lt_exp_iff).2 hε positivity have hden : 1 - κ ^ 2 * contrast θ ^ 2 ≠ 0 := by have hκ1 : κ < 1 := (contraction_mem ε hε).2 have hκSq : κ ^ 2 < 1 := (sq_lt_one_iff₀ hκ.le).2 hκ1 have hτSq : contrast θ ^ 2 < 1 := (sq_lt_one_iff_abs_lt_one (contrast θ)).2 (abs_contrast_lt_one θ hθ hbalance) exact ne_of_gt (sub_pos.2 (mul_lt_one_of_nonneg_of_lt_one_left (sq_nonneg κ) hκSq hτSq.le)) rw [show (κ ^ 2 / (1 - κ ^ 2 * contrast θ ^ 2))⁻¹ = κ⁻¹ ^ 2 - contrast θ ^ 2 by field_simp [hκ.ne', hden] ] rw [contraction_inv_eq_coth ε hε] · exact balancedRR_stationary ε hε · rw [balancedRR_variance_eq_sharp θ hθ hbalance ε hε, Vstar_balanced_eq_sharp_reciprocal θ hθ hbalance ε hε]
CausalSmith.Stat.LdpAteEfficiencySurface.balanced_reduction · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TBalancedReduction.lean:418
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.TFiniteOracle 2 declarations Exact finite staircase oracle

Exact finite staircase oracle

theorem finiteOracle_minimax

Under the supplied quantities and conditions, the finite oracle minimax assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the finite Oracle minimax.

Formal statement
p ε :
ℝ
hθ :
hε :
0 < ε
Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = upperEnvelope θ p ε t}
Proof (Lean source)
lemma finiteOracle_minimax (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = upperEnvelope θ p ε t} := by let S := feasibleSet ε let f : StaircaseWeight → ℝ → ℝ := fun α t => -informationObjective θ p ε α t have hS : S.Nonempty := staircaseFeasible_nonempty ε have hcS : IsCompact S := staircaseFeasible_compact ε hε.le have hconvS : Convex ℝ S := staircaseFeasible_convex ε have hcontα (t : ℝ) : Continuous (fun α => f α t) := by dsimp [f] exact (informationObjective_continuous_weight θ p ε t).neg have hquasiα (t : ℝ) : QuasiconvexOn ℝ S (fun α => f α t) := by apply ConvexOn.quasiconvexOn refine ⟨hconvS, ?_⟩ intro α hα β hβ a b ha hb hab change -(informationObjective θ p ε (a • α + b • β) t) ≤ a * -informationObjective θ p ε α t + b * -informationObjective θ p ε β t rw [informationObjective_affine_weights] simp have hcontT (α : StaircaseWeight) : Continuous (fun t => f α t) := by dsimp [f] unfold informationObjective patternInformation projectedGradient direction simp +decide only [Fin.sum_univ_succ, Fin.sum_univ_zero, ite_true, ite_false, add_zero] fun_prop have hquasiT (α : StaircaseWeight) (hα : α ∈ S) : QuasiconcaveOn ℝ Set.univ (f α) := by have hc := informationObjective_convexOn_time θ p ε α hα.1 (patternMass_pos_interior θ p ε hp hθ hε.le) apply ConcaveOn.quasiconcaveOn exact hc.neg let M : StaircaseWeight → ℝ := fun α => sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε α t} let H : ℝ → ℝ := upperEnvelope θ p ε have hM (α : StaircaseWeight) (hα : α ∈ S) : ∃ t : ℝ, M α = informationObjective θ p ε α t ∧ ∀ u, informationObjective θ p ε α t ≤ informationObjective θ p ε α u := by obtain ⟨t, ht⟩ := informationObjective_exists_minimizer θ p ε hp hθ hε.le α hα refine ⟨t, ?_, ht⟩ apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro _ ⟨u, rfl⟩; exact ht u⟩ have hH (t : ℝ) : ∃ α ∈ S, H t = informationObjective θ p ε α t ∧ ∀ β ∈ S, informationObjective θ p ε β t ≤ informationObjective θ p ε α t := by obtain ⟨α, hα, hmax⟩ := informationObjective_exists_maximizer θ p ε t hε.le refine ⟨α, hα, ?_, hmax⟩ unfold H upperEnvelope apply IsGreatest.csSup_eq exact ⟨⟨α, hα, rfl⟩, by rintro _ ⟨β, hβ, rfl⟩ exact hmax β hβ⟩ have hsup_y (α : StaircaseWeight) (hα : α ∈ S) : IsLUB {u : ℝ | ∃ t ∈ (Set.univ : Set ℝ), f α t = u} (-M α) := by obtain ⟨t, hMt, hmin⟩ := hM α hα apply IsGreatest.isLUB constructor · exact ⟨t, Set.mem_univ _, by dsimp [f]; rw [hMt]⟩ · rintro u ⟨v, _, rfl⟩ dsimp [f] rw [hMt] exact neg_le_neg (hmin v) have hinf_sup : IsGLB {u : ℝ | ∃ α ∈ S, -M α = u} (-Jstar θ p ε) := by obtain ⟨γ, hγ, hmax⟩ := informationObjective_profile_exists_maximizer θ p ε hp hθ hε.le have hprofile (β : StaircaseWeight) : (⨅ t : ℝ, informationObjective θ p ε β t) = M β := by change (⨅ t : ℝ, informationObjective θ p ε β t) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε β t} rw [show {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε β t} = range (informationObjective θ p ε β) from by ext u; simp [eq_comm]] rfl have hJ : Jstar θ p ε = M γ := by apply IsGreatest.csSup_eq exact ⟨⟨γ, hγ, rfl⟩, by rintro _ ⟨β, hβ, rfl⟩ change M β ≤ M γ rw [← hprofile β, ← hprofile γ] exact hmax β hβ⟩ apply IsLeast.isGLB constructor · exact ⟨γ, hγ, by rw [hJ]⟩ · rintro _ ⟨β, hβ, rfl⟩ rw [hJ, ← hprofile γ, ← hprofile β] exact neg_le_neg (hmax β hβ) have hinf_x (t : ℝ) : IsGLB {u : ℝ | ∃ α ∈ S, f α t = u} (-H t) := by obtain ⟨α, hα, hHt, hmax⟩ := hH t apply IsLeast.isGLB constructor · exact ⟨α, hα, by dsimp [f]; rw [hHt]⟩ · rintro _ ⟨β, hβ, rfl⟩ dsimp [f] rw [hHt] exact neg_le_neg (hmax β hβ) have hsup_inf : IsLUB {u : ℝ | ∃ t ∈ (Set.univ : Set ℝ), -H t = u} (-sInf {u : ℝ | ∃ t : ℝ, u = H t}) := by obtain ⟨t, ht⟩ := upperEnvelope_exists_minimizer θ p ε hp hθ hε have hleast : sInf {u : ℝ | ∃ v : ℝ, u = H v} = H t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro _ ⟨v, rfl⟩; exact ht v⟩ apply IsGreatest.isLUB constructor · exact ⟨t, Set.mem_univ _, by rw [hleast]⟩ · rintro _ ⟨v, _, rfl⟩ rw [hleast] exact neg_le_neg (ht v) have hsion := Sion.minimax (X := S) (Y := Set.univ) (f := f) hS hcS (fun t _ => (hcontα t).continuousOn.lowerSemicontinuousOn) (fun t _ => hquasiα t) convex_univ (fun α hα => (hcontT α).continuousOn.upperSemicontinuousOn) (fun α hα => hquasiT α hα) hconvS (fun α => -M α) hsup_y (-Jstar θ p ε) hinf_sup (fun t => -H t) (fun t _ => hinf_x t) (-sInf {u : ℝ | ∃ t : ℝ, u = H t}) hsup_inf exact neg_injective hsion
CausalSmith.Stat.LdpAteEfficiencySurface.finiteOracle_minimax · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiniteOracle.lean:16
theorem finite_oracle

Under the supplied quantities and conditions, the finite oracle assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
hassignment :
hmeans :
epsSeq :
ℕ → ℝ
hfixed :
FixedPrivacy epsSeq ε
conclusion 1
Z :
Type*
Q :
Kernel (Fin 4) Z
conclusion 3
Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = upperEnvelope θ p ε t}
conclusion 4
Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = vertexEnvelope θ p ε t}
conclusion 5
∃ t : ℝ, upperEnvelope θ p ε t = Jstar θ p ε
Proof (Lean source)
theorem finite_oracle (θ : TrialParameter) (p ε : ℝ) (hassignment : InteriorAssignment p) (hmeans : InteriorMeans θ) (epsSeq : ℕ → ℝ) (hfixed : FixedPrivacy epsSeq ε) : (∀ (Z : Type*) [MeasurableSpace Z] (Q : Kernel (Fin 4) Z), StationaryLDP ε Q → ofReal (Vstar θ p ε) ≤ contrastVariance (channelFisherInfo θ p Q)) ∧ (∃ α : StaircaseWeight, staircaseFeasible ε α ∧ StationaryLDP ε (staircaseChannel ε α) ∧ contrastVariance (channelFisherInfo θ p (staircaseChannel ε α)) = ofReal (Vstar θ p ε) ∧ contrastVariance (informationMatrix θ p ε α) = ofReal (Vstar θ p ε)) ∧ Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = upperEnvelope θ p ε t} ∧ Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = vertexEnvelope θ p ε t} ∧ (∃ t : ℝ, upperEnvelope θ p ε t = Jstar θ p ε) := by have hminimax : Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = upperEnvelope θ p ε t} := finiteOracle_minimax θ p ε hassignment hmeans hfixed.1 have henvelopes : {u : ℝ | ∃ t : ℝ, u = upperEnvelope θ p ε t} = {u : ℝ | ∃ t : ℝ, u = vertexEnvelope θ p ε t} := by ext u constructor · rintro ⟨t, rfl⟩ exact ⟨t, upperEnvelope_eq_vertexEnvelope θ p ε t hfixed.1.le⟩ · rintro ⟨t, rfl⟩ exact ⟨t, (upperEnvelope_eq_vertexEnvelope θ p ε t hfixed.1.le).symm⟩ refine ⟨?_, ?_, hminimax, hminimax.trans (congrArg sInf henvelopes), ?_⟩ · intro Z _ Q hQ obtain ⟨α, K, hα, hK, hfactor, hdiff, hrigid⟩ := staircase_refinement_interior p θ ε hassignment hmeans epsSeq hfixed Q hQ obtain ⟨t, ht⟩ := informationObjective_exists_minimizer θ p ε hassignment hmeans hfixed.1.le α hα have hleast : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} = informationObjective θ p ε α t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro u ⟨v, rfl⟩; exact ht v⟩ have hprofile_le : informationObjective θ p ε α t ≤ Jstar θ p ε := by obtain ⟨γ, hγ, hmax⟩ := informationObjective_profile_exists_maximizer θ p ε hassignment hmeans hfixed.1.le have hprofile (β : StaircaseWeight) : (⨅ v : ℝ, informationObjective θ p ε β v) = sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} := by rw [show {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε β v} = range (informationObjective θ p ε β) from by ext u simp [eq_comm]] rfl rw [Jstar, ← hleast] apply le_csSup · refine ⟨sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε γ v}, ?_⟩ rintro u ⟨β, hβ, rfl⟩ rw [← hprofile β, ← hprofile γ] exact hmax β hβ · exact ⟨α, hα, rfl⟩ have horder : informationQuadratic (channelFisherInfo θ p Q) (direction t) ≤ informationQuadratic (informationMatrix θ p ε α) (direction t) := by have hn := hdiff.dotProduct_mulVec_nonneg (direction t) simp [informationQuadratic, dotProduct, mulVec, Finset.mul_sum, Finset.sum_sub_distrib, star_trivial] at hn ⊢ linarith have htQ : informationQuadratic (channelFisherInfo θ p Q) (direction t) ≤ Jstar θ p ε := by refine horder.trans ?_ have heq : informationObjective θ p ε α t = informationQuadratic (informationMatrix θ p ε α) (direction t) := by rw [informationObjective_eq_informationQuadratic θ p ε α t] rfl rw [← heq] exact hprofile_le have hJ : 0 < Jstar θ p ε := Jstar_pos_interior θ p ε hassignment hmeans hfixed.1 simpa [Vstar] using reciprocal_le_contrastVariance (channelFisherInfo θ p Q) (channelFisherInfo_posSemidef p θ hassignment hmeans ε Q hQ) (Jstar θ p ε) hJ t htQ · obtain ⟨α, hα, hopt⟩ := Jstar_exists_optimal_weight θ p ε hassignment hmeans hfixed.1.le obtain ⟨t, ht⟩ := informationObjective_exists_minimizer θ p ε hassignment hmeans hfixed.1.le α hα have hleast : sInf {u : ℝ | ∃ v : ℝ, u = informationObjective θ p ε α v} = informationObjective θ p ε α t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro u ⟨v, rfl⟩; exact ht v⟩ have hvalue : informationObjective θ p ε α t = Jstar θ p ε := by rw [← hleast, ← hopt] have hqmin : ∀ u : ℝ, informationQuadratic (informationMatrix θ p ε α) (direction t) ≤ informationQuadratic (informationMatrix θ p ε α) (direction u) := by intro u have heqt : informationObjective θ p ε α t = informationQuadratic (informationMatrix θ p ε α) (direction t) := by rw [informationObjective_eq_informationQuadratic θ p ε α t] rfl have hequ : informationObjective θ p ε α u = informationQuadratic (informationMatrix θ p ε α) (direction u) := by rw [informationObjective_eq_informationQuadratic θ p ε α u] rfl rw [← heqt, ← hequ] exact ht u have hqpos : 0 < informationQuadratic (informationMatrix θ p ε α) (direction t) := by have heq : informationObjective θ p ε α t = informationQuadratic (informationMatrix θ p ε α) (direction t) := by rw [informationObjective_eq_informationQuadratic θ p ε α t] rfl rw [← heq, hvalue] exact Jstar_pos_interior θ p ε hassignment hmeans hfixed.1 have hattain : contrastVariance (informationMatrix θ p ε α) = ofReal (Vstar θ p ε) := by rw [contrastVariance_eq_reciprocal_of_minimizer (informationMatrix θ p ε α) (informationMatrix_posSemidef_interior θ p ε hassignment hmeans hfixed.1.le α hα) t hqmin hqpos] congr 1 have heq : informationObjective θ p ε α t = informationQuadratic (informationMatrix θ p ε α) (direction t) := by rw [informationObjective_eq_informationQuadratic θ p ε α t] rfl rw [← heq, hvalue] rfl refine ⟨α, hα, staircaseChannel_stationaryLDP ε hfixed.1 α hα, ?_, hattain⟩ rw [channelFisherInfo_staircase_eq_informationMatrix θ p ε hassignment hmeans hfixed.1 α hα] exact hattain · obtain ⟨t, ht⟩ := upperEnvelope_exists_minimizer θ p ε hassignment hmeans hfixed.1 have hleast : sInf {u : ℝ | ∃ v : ℝ, u = upperEnvelope θ p ε v} = upperEnvelope θ p ε t := by apply IsLeast.csInf_eq exact ⟨⟨t, rfl⟩, by rintro u ⟨v, rfl⟩ exact ht v⟩ exact ⟨t, (hminimax.trans hleast).symm⟩
CausalSmith.Stat.LdpAteEfficiencySurface.finite_oracle · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiniteOracle.lean:151
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.TFiveOutputRegion 6 declarations The centered family has a unique five-ray optimum; distinct projected scores prevent any attaining stationary channel from merging those rays.

Five-output certificate region

The centered family has a unique five-ray optimum; distinct projected scores prevent any attaining stationary channel from merging those rays.

theorem R5_nonempty_centered

the r5 nonempty centered assertion holds.

Formal statement
R5.Nonempty
Proof (Lean source)
lemma R5_nonempty_centered : R5.Nonempty := by refine ⟨((1 / 4 : ℝ), (1 / 2 : ℝ), (1 / 2 : ℝ), log 3), ?_⟩ exact centeredPoint_mem_R5 (1 / 4) (by norm_num) (by norm_num)
CausalSmith.Stat.LdpAteEfficiencySurface.R5_nonempty_centered · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputRegion.lean:25
theorem centered_five_output_region

the centered five output region assertion holds.

Formal statement
p :
ℝ
shared
p :
ℝ
0 < p
p < (1 / 2 : ℝ)
conclusion 1
(p, (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5
conclusion 2
∃ α : StaircaseWeight,
staircaseSupport α = ({2, 3, 5, 7, 8} : Finset (Fin 14))
Jstar (fun _ => (1 / 2 : ℝ)) p (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) α t}
Jstar (fun _ => (1 / 2 : ℝ)) p (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t}
β = α
conclusion 3
Z :
Type*
Q :
Kernel (Fin 4) Z
contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q)
= ofReal (Vstar (fun _ => (1 / 2 : ℝ)) p (log 3))
5 ≤ outputCardinality (fun _ => (1 / 2 : ℝ)) p Q
Proof (Lean source)
lemma centered_five_output_region : ∀ p : ℝ, 0 < p → p < (1 / 2 : ℝ) → (p, (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5 ∧ (∃ α : StaircaseWeight, staircaseFeasible (log 3) α ∧ staircaseSupport α = ({2, 3, 5, 7, 8} : Finset (Fin 14)) ∧ Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) α t} ∧ (∀ β : StaircaseWeight, staircaseFeasible (log 3) β → Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t} → β = α)) ∧ (∀ (Z : Type*) [MeasurableSpace Z] (Q : Kernel (Fin 4) Z), StationaryLDP (log 3) Q → contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q) = ofReal (Vstar (fun _ => (1 / 2 : ℝ)) p (log 3)) → 5 ≤ outputCardinality (fun _ => (1 / 2 : ℝ)) p Q) := by intro p hp0 hp1 refine ⟨centeredPoint_mem_R5 p hp0 hp1, ?_, ?_⟩ · obtain ⟨hfeas, hopt, hunique⟩ := centeredR5_profile_optimal_unique p hp0 hp1 refine ⟨centeredR5Weight p, hfeas, ?_, hopt, hunique⟩ ext s simp only [staircaseSupport, mem_filter, Finset.mem_univ, true_and] simpa only [r5Active] using (centeredR5Weight_active p hp0 hp1).1 s · intro Z _ Q hQ hattain exact centeredR5_outputCardinality_ge_five p hp0 hp1 Z Q hQ hattain
CausalSmith.Stat.LdpAteEfficiencySurface.centered_five_output_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputRegion.lean:30
theorem reflectedPoint_mem_R5

Under the supplied quantities and conditions, the reflected point mem r5 assertion holds.

Formal statement
p :
ℝ
hp0 :
1 / 2 < p
hp1 :
p < 1
(1 - p, (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5
Proof (Lean source)
lemma reflectedPoint_mem_R5 (p : ℝ) (hp0 : 1 / 2 < p) (hp1 : p < 1) : (1 - p, (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5 := by exact centeredPoint_mem_R5 (1 - p) (by linarith) (by linarith)
CausalSmith.Stat.LdpAteEfficiencySurface.reflectedPoint_mem_R5 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputRegion.lean:61
theorem reflected_five_output_region

Under the supplied quantities and conditions, the reflected five output region assertion holds.

Formal statement
p :
ℝ
hp0 :
1 / 2 < p
hp1 :
p < 1
conclusion 1
∃ α : StaircaseWeight,
staircaseSupport α = swappedSupport ({2, 3, 5, 7, 8} : Finset (Fin 14))
Jstar (fun _ => (1 / 2 : ℝ)) p (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) α t}
Jstar (fun _ => (1 / 2 : ℝ)) p (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t}
β = α
conclusion 2
Z :
Type*
Q :
Kernel (Fin 4) Z
contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q)
= ofReal (Vstar (fun _ => (1 / 2 : ℝ)) p (log 3))
5 ≤ outputCardinality (fun _ => (1 / 2 : ℝ)) p Q
Proof (Lean source)
lemma reflected_five_output_region (p : ℝ) (hp0 : 1 / 2 < p) (hp1 : p < 1) : (∃ α : StaircaseWeight, staircaseFeasible (log 3) α ∧ staircaseSupport α = swappedSupport ({2, 3, 5, 7, 8} : Finset (Fin 14)) ∧ Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) α t} ∧ ∀ β : StaircaseWeight, staircaseFeasible (log 3) β → Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t} → β = α) ∧ ∀ (Z : Type*) [MeasurableSpace Z] (Q : Kernel (Fin 4) Z), StationaryLDP (log 3) Q → contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q) = ofReal (Vstar (fun _ => (1 / 2 : ℝ)) p (log 3)) → 5 ≤ outputCardinality (fun _ => (1 / 2 : ℝ)) p Q := by let q := 1 - p have hq0 : 0 < q := by dsimp [q]; linarith have hq1 : q < 1 / 2 := by dsimp [q]; linarith obtain ⟨hfeas, hopt, hunique⟩ := centeredR5_profile_optimal_unique q hq0 hq1 let α0 := centeredR5Weight q let α := swapTreatmentWeight α0 have hα : staircaseFeasible (log 3) α := (staircaseFeasible_swapTreatment _ _).2 hfeas have hsupp0 : staircaseSupport α0 = ({2, 3, 5, 7, 8} : Finset (Fin 14)) := by ext s simp only [staircaseSupport, mem_filter, Finset.mem_univ, true_and] simpa only [α0, r5Active] using (centeredR5Weight_active q hq0 hq1).1 s have hsupp : staircaseSupport α = swappedSupport ({2, 3, 5, 7, 8} : Finset (Fin 14)) := by change staircaseSupport (swapTreatmentWeight α0) = _ rw [staircaseSupport_swapTreatment, hsupp0] have hopt' : Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) α t} := by change Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) (swapTreatmentWeight α0) t} rw [centered_Jstar_swapTreatment p, centered_profileSet_swapTreatment] convert hopt using 1 <;> dsimp [q] <;> ring have hunique' : ∀ β : StaircaseWeight, staircaseFeasible (log 3) β → Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t} → β = α := by intro β hβ hβopt have hswapopt : Jstar (fun _ => (1 / 2 : ℝ)) q (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) q (log 3) (swapTreatmentWeight β) t} := by rw [centered_profileSet_swapTreatment] calc Jstar (fun _ => (1 / 2 : ℝ)) q (log 3) = Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) := by rw [centered_Jstar_swapTreatment] congr 2 <;> dsimp [q] <;> ring _ = _ := by convert hβopt using 1 <;> dsimp [q] <;> ring have heq := hunique (swapTreatmentWeight β) ((staircaseFeasible_swapTreatment _ _).2 hβ) hswapopt apply swapTreatmentWeight_involutive.injective change swapTreatmentWeight β = swapTreatmentWeight α have hσα : swapTreatmentWeight α = α0 := by change swapTreatmentWeight (swapTreatmentWeight α0) = α0 exact swapTreatmentWeight_involutive α0 rw [hσα] exact heq refine ⟨⟨α, hα, hsupp, hopt', hunique'⟩, ?_⟩ intro Z _ Q hQ hattain have hsQ := stationaryLDP_swapTreatment (log 3) Q hQ have hsattain : contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) q (swapTreatmentChannel Q)) = ofReal (Vstar (fun _ => (1 / 2 : ℝ)) q (log 3)) := by rw [show q = 1 - p by rfl, channelFisherInfo_swapTreatment, contrastVariance_swapTreatment] rw [← centered_Vstar_swapTreatment p] exact hattain have hcard := centeredR5_outputCardinality_ge_five q hq0 hq1 Z (swapTreatmentChannel Q) hsQ hsattain rw [show q = 1 - p by rfl, centered_outputCardinality_swapTreatment] at hcard exact hcard
CausalSmith.Stat.LdpAteEfficiencySurface.reflected_five_output_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputRegion.lean:66
theorem isOpen_R5_continuousCertificate

the is open r5 continuous certificate assertion holds.

Formal statement
Proof (Lean source)
lemma isOpen_R5_continuousCertificate : IsOpen R5 := by rw [isOpen_iff_mem_nhds] intro x hx rcases x with ⟨p, μ0, μ1, ε⟩ change 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < ε ∧ _ at hx rcases hx with ⟨hp0,hp1,hm00,hm01,hm10,hm11,hε,α,t,η0, hα,hsupp,hpos,hstat,hactive,hinactive,hdistinct⟩ let x0 : RegionParameter := (p,μ0,μ1,ε) have hxTheta : regionTheta x0 = (fun k => if k = 0 then μ0 else μ1) := by funext k fin_cases k <;> rfl have hm (s : Fin 14) : patternMass (regionTheta x0) x0.1 x0.2.2.2 s ≠ 0 := ne_of_gt (patternMass_pos_of_interior p μ0 μ1 ε hp0 hp1 hm00 hm01 hm10 hm11 s) have hout : ∀ s ∉ r5Active, α s = 0 := by intro s hs by_contra hn exact hs ((hsupp s).mp hn) have hcoeff := r5Coeffs_pos_of_interior x0 hp0 hp1 hm00 hm01 hm10 hm11 hε have hobj := r5_objectives_eq_of_activeDual x0 η0 t hactive have heq : r5BinaryCoeff x0 * (p - (1 - 2 * p) * t) ^ 2 = r5TernaryCoeff x0 * (t + 1) ^ 2 := by rw [← r5BinaryObjective_eq_quadratic x0 t (hm 5) (hm 8), ← r5TernaryObjective_eq_quadratic x0 t (hm 3) (hm 7)] exact hobj obtain ⟨σ, hσ, hbranchden, ht0⟩ := exists_r5DirectionBranch_eq x0 t hp1 hcoeff.1 hcoeff.2.le heq have ht := continuousAt_r5DirectionBranch x0 σ (ne_of_gt hcoeff.1) (hm 3) (hm 5) (hm 7) (hm 8) hbranchden have hR : r5TernaryDerivative x0 t ≠ 0 := r5TernaryDerivative_ne_zero_of_objectives_eq x0 t hp1 hcoeff.1 hcoeff.2 (hm 3) (hm 7) heq have hmix := r5_stationarity_eq_mixture x0 α hε hα hout t hstat obtain ⟨hderivden0, huformula⟩ := mixture_stationarity_solve hR hmix have hderivden : r5BinaryDerivative x0 (r5DirectionBranch σ x0) - r5TernaryDerivative x0 (r5DirectionBranch σ x0) ≠ 0 := by simpa [ht0] using hderivden0 have hu := continuousAt_r5ContinuedMixture x0 σ ht (hm 2) (hm 3) (hm 5) (hm 7) (hm 8) hderivden have hu0 : r5ContinuedMixture σ x0 = r5MixtureCoordinate ε α := r5ContinuedMixture_eq x0 α t σ ht0 hε hα hout hstat hR obtain ⟨η, hη, hη0, hdual4⟩ := exists_local_r5Dual x0 (r5DirectionBranch σ) η0 hε ht hm (by intro s hs rw [hxTheta, ht0] exact hactive s (by simpa [r5Active] using hs)) have hubase := r5MixtureCoordinate_mem_Ioo ε hε α hα hout hpos have huIoo : ∀ᶠ y in nhds x0, r5ContinuedMixture σ y ∈ Ioo 0 1 := by filter_upwards [continuousAt_const.eventually_lt hu (hu0.symm ▸ hubase.1), hu.eventually_lt continuousAt_const (hu0.symm ▸ hubase.2)] with y hy0 hy1 exact ⟨hy0,hy1⟩ have hbranchdenEv : ∀ᶠ y in nhds x0, 1 - 2 * y.1 + σ * r5Scale y ≠ 0 := by have hc : ContinuousAt (fun y : RegionParameter => 1 - 2 * y.1 + σ * r5Scale y) x0 := (continuousAt_const.sub (continuousAt_const.mul continuousAt_fst)).add (continuousAt_const.mul (continuousAt_r5Scale x0 (ne_of_gt hcoeff.1) (hm 3) (hm 5) (hm 7) (hm 8))) exact hc.eventually_ne hbranchden have hbasic : ∀ᶠ y in nhds x0, 0 < y.1 ∧ y.1 < 1 ∧ 0 < y.2.1 ∧ y.2.1 < 1 ∧ 0 < y.2.2.1 ∧ y.2.2.1 < 1 ∧ 0 < y.2.2.2 := by filter_upwards [continuousAt_const.eventually_lt continuousAt_fst hp0, continuousAt_fst.eventually_lt continuousAt_const hp1, continuousAt_const.eventually_lt continuousAt_snd.fst hm00, continuousAt_snd.fst.eventually_lt continuousAt_const hm01, continuousAt_const.eventually_lt continuousAt_snd.snd.fst hm10, continuousAt_snd.snd.fst.eventually_lt continuousAt_const hm11, continuousAt_const.eventually_lt continuousAt_snd.snd.snd hε] with y yp0 yp1 ym00 ym01 ym10 ym11 yε exact ⟨yp0,yp1,ym00,ym01,ym10,ym11,yε⟩ have hinfo (s : Fin 14) : ContinuousAt (fun y : RegionParameter => patternInformation (regionTheta y) y.1 y.2.2.2 s (r5DirectionBranch σ y)) x0 := continuousAt_patternInformation_region s _ x0 ht (hm s) have hscore (s : Fin 14) : ContinuousAt (fun y : RegionParameter => projectedScore (regionTheta y) y.1 y.2.2.2 s (r5DirectionBranch σ y)) x0 := continuousAt_projectedScore_region s _ x0 ht (hm s) have hdualcont (s : Fin 14) : ContinuousAt (fun y : RegionParameter => dualRay y.2.2.2 (η y) s) x0 := by unfold dualRay let f := fun j : Fin 4 => fun y : RegionParameter => patternRay y.2.2.2 s j * η y j have hf (j : Fin 4) : ContinuousAt (f j) x0 := (continuous_patternRay_region s j).continuousAt.mul ((continuousAt_pi.mp hη) j) have hsum : ∀ S : Finset (Fin 4), ContinuousAt (fun y => ∑ j ∈ S, f j y) x0 := by intro S induction S using Finset.induction_on with | empty => simpa using (continuousAt_const : ContinuousAt (fun _ : RegionParameter => (0 : ℝ)) x0) | @insert a S ha ih => simp only [Finset.sum_insert ha] exact (hf a).add ih simpa [f] using hsum Finset.univ have hslack : ∀ᶠ y in nhds x0, ∀ s : Fin 14, s ∉ r5Active → patternInformation (regionTheta y) y.1 y.2.2.2 s (r5DirectionBranch σ y) < dualRay y.2.2.2 (η y) s := by have hall : ∀ᶠ y in nhds x0, ∀ s ∈ (Finset.univ : Finset (Fin 14)), s ∉ r5Active → patternInformation (regionTheta y) y.1 y.2.2.2 s (r5DirectionBranch σ y) < dualRay y.2.2.2 (η y) s := (Filter.eventually_all_finset (Finset.univ : Finset (Fin 14))).2 fun s _ => by by_cases hs : s ∈ r5Active · exact Filter.Eventually.of_forall (fun _ h => False.elim (h hs)) · exact ((hinfo s).eventually_lt (hdualcont s) (by rw [hxTheta, ht0, hη0]; exact hinactive s hs)).mono (fun _ h _ => h) exact hall.mono fun _ h s hs => h s (Finset.mem_univ s) hs have hdistinctEv : ∀ᶠ y in nhds x0, ∀ s ∈ r5Active, ∀ u ∈ r5Active, s ≠ u → projectedScore (regionTheta y) y.1 y.2.2.2 s (r5DirectionBranch σ y) ≠ projectedScore (regionTheta y) y.1 y.2.2.2 u (r5DirectionBranch σ y) := by have hall : ∀ᶠ y in nhds x0, ∀ s ∈ r5Active, ∀ u ∈ r5Active, s ≠ u → projectedScore (regionTheta y) y.1 y.2.2.2 s (r5DirectionBranch σ y) ≠ projectedScore (regionTheta y) y.1 y.2.2.2 u (r5DirectionBranch σ y) := (Filter.eventually_all_finset r5Active).2 fun s hs => (Filter.eventually_all_finset r5Active).2 fun u hu => by by_cases hsu : s = u · exact Filter.Eventually.of_forall (fun _ h => False.elim (h hsu)) · have hne := hdistinct rfl s (by simpa [r5Active] using hs) u (by simpa [r5Active] using hu) hsu have hne' : projectedScore (regionTheta x0) x0.1 x0.2.2.2 s (r5DirectionBranch σ x0) ≠ projectedScore (regionTheta x0) x0.1 x0.2.2.2 u (r5DirectionBranch σ x0) := by change projectedScore (regionTheta x0) p ε s (r5DirectionBranch σ x0) ≠ projectedScore (regionTheta x0) p ε u (r5DirectionBranch σ x0) rw [hxTheta, ht0] exact hne exact ((hscore s).sub (hscore u)).eventually_ne (sub_ne_zero.mpr hne') |>.mono (fun _ h _ => sub_ne_zero.mp h) exact hall have hderivdenEv : ∀ᶠ y in nhds x0, r5BinaryDerivative y (r5DirectionBranch σ y) - r5TernaryDerivative y (r5DirectionBranch σ y) ≠ 0 := by have hP := continuousAt_r5BinaryDerivative_comp x0 (r5DirectionBranch σ) ht (hm 5) (hm 8) have hRcont := continuousAt_r5TernaryDerivative_comp x0 (r5DirectionBranch σ) ht (hm 2) (hm 3) (hm 7) exact (hP.sub hRcont).eventually_ne hderivden filter_upwards [hbasic, huIoo, hbranchdenEv, hderivdenEv, hdual4, hslack, hdistinctEv] with y hybasic hyu hyden hyderivden hydual hyslack hydistinct rcases y with ⟨q,ν0,ν1,δ⟩ rcases hybasic with ⟨hq0,hq1,hν00,hν01,hν10,hν11,hδ⟩ change 0 < q ∧ q < 1 ∧ 0 < ν0 ∧ ν0 < 1 ∧ 0 < ν1 ∧ ν1 < 1 ∧ 0 < δ ∧ _ let y0 : RegionParameter := (q,ν0,ν1,δ) let ty := r5DirectionBranch σ y0 let uy := r5ContinuedMixture σ y0 let αy := r5WeightFromCoordinate δ uy have hyTheta : regionTheta (q,ν0,ν1,δ) = (fun k => if k = 0 then ν0 else ν1) := by funext k fin_cases k <;> rfl rw [hyTheta] at hyslack hydistinct refine ⟨hq0,hq1,hν00,hν01,hν10,hν11,hδ,αy,ty,η y0, ?_⟩ have hmy (s : Fin 14) : patternMass (regionTheta y0) q δ s ≠ 0 := ne_of_gt (patternMass_pos_of_interior q ν0 ν1 δ hq0 hq1 hν00 hν01 hν10 hν11 s) have hcy := r5Coeffs_pos_of_interior y0 hq0 hq1 hν00 hν01 hν10 hν11 hδ have hobjy : r5BinaryObjective y0 ty = r5TernaryObjective y0 ty := by rw [r5BinaryObjective_eq_quadratic y0 ty (hmy 5) (hmy 8), r5TernaryObjective_eq_quadratic y0 ty (hmy 3) (hmy 7)] exact r5DirectionBranch_objectives_eq y0 σ (by rcases hσ with rfl | rfl <;> norm_num) hcy.1 hcy.2.le hyden unfold r5DualTarget at hydual rw [hyTheta] at hydual refine ⟨(r5WeightFromCoordinate_feasible δ uy).2 ⟨hyu.1.le, hyu.2.le⟩, ?_, ?_, ?_, ?_, ?_, ?_⟩ · exact r5WeightFromCoordinate_active δ uy hyu · exact r5WeightFromCoordinate_pos δ uy hyu · exact r5ContinuedWeight_stationary y0 σ (by simpa [y0, ty] using hyderivden) · intro s hs have hcases : s = 2 ∨ s = 3 ∨ s = 5 ∨ s = 7 ∨ s = 8 := by simpa [r5Active] using hs rcases hcases with rfl | rfl | rfl | rfl | rfl · simpa [y0, ty, r5DualMatrix, r5DualTarget, r5DualMask, mulVec, dotProduct, dualRay, mul_comm] using congrFun hydual 0 · simpa [y0, ty, r5DualMatrix, r5DualTarget, r5DualMask, mulVec, dotProduct, dualRay, mul_comm] using congrFun hydual 1 · simpa [y0, ty, r5DualMatrix, r5DualTarget, r5DualMask, mulVec, dotProduct, dualRay, mul_comm] using congrFun hydual 2 · simpa [y0, ty, r5DualMatrix, r5DualTarget, r5DualMask, mulVec, dotProduct, dualRay, mul_comm] using congrFun hydual 3 · apply r5_fifthDual_eq y0 (η y0) ty hobjy · simpa [y0, ty, hyTheta, r5DualMatrix, r5DualTarget, r5DualMask, mulVec, dotProduct, dualRay, mul_comm] using congrFun hydual 0 · simpa [y0, ty, hyTheta, r5DualMatrix, r5DualTarget, r5DualMask, mulVec, dotProduct, dualRay, mul_comm] using congrFun hydual 1 · simpa [y0, ty, hyTheta, r5DualMatrix, r5DualTarget, r5DualMask, mulVec, dotProduct, dualRay, mul_comm] using congrFun hydual 2 · simpa [y0, ty, hyTheta, r5DualMatrix, r5DualTarget, r5DualMask, mulVec, dotProduct, dualRay, mul_comm] using congrFun hydual 3 · simpa [y0, ty, r5Active] using hyslack · intro _ simpa [y0, ty, r5Active] using hydistinct
CausalSmith.Stat.LdpAteEfficiencySurface.isOpen_R5_continuousCertificate · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputRegion.lean:151
theorem five_output_region

Under the supplied quantities and conditions, the five output region assertion holds. The five output region.

Formal statement
conclusion 1
conclusion 2
R5.Nonempty
conclusion 3
p :
ℝ
0 < p
p < (1 / 2 : ℝ)
(p, (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5
∃ α : StaircaseWeight,
staircaseSupport α = ({2, 3, 5, 7, 8} : Finset (Fin 14))
Jstar (fun _ => (1 / 2 : ℝ)) p (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) α t}
Jstar (fun _ => (1 / 2 : ℝ)) p (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t}
β = α
Z :
Type*
Q :
Kernel (Fin 4) Z
contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q)
= ofReal (Vstar (fun _ => (1 / 2 : ℝ)) p (log 3))
5 ≤ outputCardinality (fun _ => (1 / 2 : ℝ)) p Q
conclusion 4
p :
ℝ
(1 / 2 : ℝ) < p
p < 1
(1 - p, (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5
∃ α : StaircaseWeight,
staircaseSupport α = swappedSupport ({2, 3, 5, 7, 8} : Finset (Fin 14))
Jstar (fun _ => (1 / 2 : ℝ)) p (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) α t}
Jstar (fun _ => (1 / 2 : ℝ)) p (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t}
β = α
Z :
Type*
Q :
Kernel (Fin 4) Z
contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q)
= ofReal (Vstar (fun _ => (1 / 2 : ℝ)) p (log 3))
5 ≤ outputCardinality (fun _ => (1 / 2 : ℝ)) p Q
conclusion 5
p μ0 μ1 ε :
ℝ
(p, μ0, μ1, ε) ∈ R5
Z :
Type*
Q :
Kernel (Fin 4) Z
contrastVariance (channelFisherInfo (fun k => if k = 0 then μ0 else μ1) p Q)
= ofReal (Vstar (fun k => if k = 0 then μ0 else μ1) p ε)
5 ≤ outputCardinality (fun k => if k = 0 then μ0 else μ1) p Q
Proof (Lean source)
theorem five_output_region : IsOpen R5 ∧ R5.Nonempty ∧ (∀ p : ℝ, 0 < p → p < (1 / 2 : ℝ) → (p, (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5 ∧ (∃ α : StaircaseWeight, staircaseFeasible (log 3) α ∧ staircaseSupport α = ({2, 3, 5, 7, 8} : Finset (Fin 14)) ∧ Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) α t} ∧ (∀ β : StaircaseWeight, staircaseFeasible (log 3) β → Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t} → β = α)) ∧ (∀ (Z : Type*) [MeasurableSpace Z] (Q : Kernel (Fin 4) Z), StationaryLDP (log 3) Q → contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q) = ofReal (Vstar (fun _ => (1 / 2 : ℝ)) p (log 3)) → 5 ≤ outputCardinality (fun _ => (1 / 2 : ℝ)) p Q)) ∧ (∀ p : ℝ, (1 / 2 : ℝ) < p → p < 1 → (1 - p, (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5 ∧ (∃ α : StaircaseWeight, staircaseFeasible (log 3) α ∧ staircaseSupport α = swappedSupport ({2, 3, 5, 7, 8} : Finset (Fin 14)) ∧ Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) α t} ∧ ∀ β : StaircaseWeight, staircaseFeasible (log 3) β → Jstar (fun _ => (1 / 2 : ℝ)) p (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 2 : ℝ)) p (log 3) β t} → β = α) ∧ ∀ (Z : Type*) [MeasurableSpace Z] (Q : Kernel (Fin 4) Z), StationaryLDP (log 3) Q → contrastVariance (channelFisherInfo (fun _ => (1 / 2 : ℝ)) p Q) = ofReal (Vstar (fun _ => (1 / 2 : ℝ)) p (log 3)) → 5 ≤ outputCardinality (fun _ => (1 / 2 : ℝ)) p Q) ∧ (∀ p μ0 μ1 ε : ℝ, (p, μ0, μ1, ε) ∈ R5 → ∀ (Z : Type*) [MeasurableSpace Z] (Q : Kernel (Fin 4) Z), StationaryLDP ε Q → contrastVariance (channelFisherInfo (fun k => if k = 0 then μ0 else μ1) p Q) = ofReal (Vstar (fun k => if k = 0 then μ0 else μ1) p ε) → 5 ≤ outputCardinality (fun k => if k = 0 then μ0 else μ1) p Q) := by refine ⟨isOpen_R5_continuousCertificate, R5_nonempty_centered, centered_five_output_region, ?_, ?_⟩ · intro p hp0 hp1 exact ⟨reflectedPoint_mem_R5 p hp0 hp1, reflected_five_output_region p hp0 hp1⟩ · intro p μ0 μ1 ε hx Z _ Q hQ hattain exact r5Certificate_outputCardinality_ge_five p μ0 μ1 ε hx Q hQ hattain
CausalSmith.Stat.LdpAteEfficiencySurface.five_output_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputRegion.lean:359
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.TFiveOutputUpperBound 6 declarations An optimal finite staircase design has at most five positive pattern weights, and therefore at most five active released symbols.

Five-output upper bound

An optimal finite staircase design has at most five positive pattern weights, and therefore at most five active released symbols.

the staircase support is the mathematical object specified below. The staircase Support is determined by the displayed parameters.

Definition (Lean source)
staircaseSupport α :
Finset (Fin 14)
Finset.univ.filter (fun s => α s ≠ 0)
CausalSmith.Stat.LdpAteEfficiencySurface.staircaseSupport · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputUpperBound.lean:17
theorem staircase_output_zero_of_weight_zero

Under the supplied quantities and conditions, the staircase output zero of weight zero assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
s :
Fin 14
hs :
α s = 0
outputLaw θ p (staircaseChannel ε α) {s} = 0
Proof (Lean source)
lemma staircase_output_zero_of_weight_zero (θ : TrialParameter) (p ε : ℝ) (α : StaircaseWeight) (s : Fin 14) (hs : α s = 0) : outputLaw θ p (staircaseChannel ε α) {s} = 0 := by simp only [outputLaw] simp only [Measure.coe_finsetSum, Measure.coe_smul, Finset.sum_apply, Pi.smul_apply, smul_eq_mul, Finset.sum_eq_zero_iff, Finset.mem_univ, mul_eq_zero, ENNReal.ofReal_eq_zero, forall_const] intro j have hrow : (staircaseChannel ε α) j {s} = 0 := by change (Measure.count.withDensity (fun u : Fin 14 => ofReal (α u * patternRay ε u j))) {s} = 0 simp [withDensity_apply _ (measurableSet_singleton s), hs] exact inr hrow
CausalSmith.Stat.LdpAteEfficiencySurface.staircase_output_zero_of_weight_zero · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputUpperBound.lean:22
theorem outputCardinality_staircase_le_support_card

the output cardinality staircase le support card assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p ε :
ℝ
Proof (Lean source)
lemma outputCardinality_staircase_le_support_card (θ : TrialParameter) (p ε : ℝ) (α : StaircaseWeight) : outputCardinality θ p (staircaseChannel ε α) ≤ (staircaseSupport α).card := by let A : Set (Fin 14) := {s | outputLaw θ p (staircaseChannel ε α) {s} ≠ 0} have hsubset : A ⊆ (staircaseSupport α : Set (Fin 14)) := by intro s hs simp only [staircaseSupport, Finset.mem_coe, mem_filter, Finset.mem_univ, true_and] by_contra hz exact hs (staircase_output_zero_of_weight_zero θ p ε α s hz) have hbound := Set.encard_le_encard hsubset simp only [Set.encard_coe_eq_coe_finsetCard] at hbound change A.encard ≤ _ at hbound simpa only [outputCardinality, dif_pos (inferInstance : Finite (Fin 14))] using hbound
CausalSmith.Stat.LdpAteEfficiencySurface.outputCardinality_staircase_le_support_card · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputUpperBound.lean:38
theorem staircase_output_pos_of_weight_pos

Under the supplied quantities and conditions, the staircase output pos of weight pos assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the staircase output pos of weight pos.

Formal statement
p ε :
ℝ
hθ :
s :
Fin 14
hs :
0 < α s
outputLaw θ p (staircaseChannel ε α) {s} ≠ 0
Proof (Lean source)
lemma staircase_output_pos_of_weight_pos (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (α : StaircaseWeight) (s : Fin 14) (hs : 0 < α s) : outputLaw θ p (staircaseChannel ε α) {s} ≠ 0 := by have hπ : 0 < piTheta θ p 0 := by rcases hp with ⟨hp0, hp1⟩ rcases hθ with ⟨h0, h0', h1, h1'⟩ simp only [piTheta, controlProb] exact mul_pos (by linarith) (by linarith) have hr : 0 < patternRay ε s 0 := by unfold patternRay privacyIncrement privacyRatio split_ifs <;> simp_all <;> positivity have hrow : (staircaseChannel ε α) 0 {s} ≠ 0 := by change (Measure.count.withDensity (fun u : Fin 14 => ofReal (α u * patternRay ε u 0))) {s} ≠ 0 simp [withDensity_apply _ (measurableSet_singleton s)] exact mul_pos hs hr have hterm : ofReal (piTheta θ p 0) • (staircaseChannel ε α) 0 {s} ≠ 0 := by simp [hrow] exact hπ intro hz have hle : ofReal (piTheta θ p 0) • (staircaseChannel ε α) 0 {s} ≤ outputLaw θ p (staircaseChannel ε α) {s} := by simp only [outputLaw, Measure.coe_finsetSum, Finset.sum_apply] exact Finset.single_le_sum (f := fun j : Fin 4 => (ofReal (piTheta θ p j) • (staircaseChannel ε α) j) {s}) (s := univ) (a := (0 : Fin 4)) (fun j hj => zero_le) (Finset.mem_univ _) exact hterm (le_antisymm (hz ▸ hle) zero_le)
CausalSmith.Stat.LdpAteEfficiencySurface.staircase_output_pos_of_weight_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputUpperBound.lean:57
theorem outputCardinality_staircase_eq_support_card

the output cardinality staircase eq support card assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the output Cardinality staircase eq support card.

Formal statement
p ε :
ℝ
hθ :
hα :
∀ s, 0 ≤ α s
Proof (Lean source)
lemma outputCardinality_staircase_eq_support_card (θ : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (α : StaircaseWeight) (hα : ∀ s, 0 ≤ α s) : outputCardinality θ p (staircaseChannel ε α) = (staircaseSupport α).card := by let A : Set (Fin 14) := {s | outputLaw θ p (staircaseChannel ε α) {s} ≠ 0} have hsets : A = (staircaseSupport α : Set (Fin 14)) := by ext s constructor · intro hs simp only [staircaseSupport, Finset.mem_coe, mem_filter, Finset.mem_univ, true_and] by_contra hz exact hs (staircase_output_zero_of_weight_zero θ p ε α s hz) · intro hs have hne : α s ≠ 0 := by simpa [staircaseSupport] using hs exact staircase_output_pos_of_weight_pos θ p ε hp hθ α s (lt_of_le_of_ne (hα s) (Ne.symm hne)) simp only [outputCardinality, dif_pos (inferInstance : Finite (Fin 14))] change A.encard = ↑(staircaseSupport α).card rw [hsets] exact Set.encard_coe_eq_coe_finsetCard _
CausalSmith.Stat.LdpAteEfficiencySurface.outputCardinality_staircase_eq_support_card · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputUpperBound.lean:94
theorem five_output_upper_bound

Under the supplied quantities and conditions, the five output upper bound assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the five output upper bound.

Formal statement
p ε :
ℝ
hp :
0 < p ∧ p < 1
hθ :
0 < θ 0 ∧ θ 0 < 1 ∧ 0 < θ 1 ∧ θ 1 < 1
hε :
0 < ε
∃ α : StaircaseWeight,
conclusion 1
conclusion 2
Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε α t}
conclusion 3
(staircaseSupport α).card ≤ 5
conclusion 4
Proof (Lean source)
theorem five_output_upper_bound (θ : TrialParameter) (p ε : ℝ) (hp : 0 < p ∧ p < 1) (hθ : 0 < θ 0 ∧ θ 0 < 1 ∧ 0 < θ 1 ∧ θ 1 < 1) (hε : 0 < ε) : ∃ α : StaircaseWeight, staircaseFeasible ε α ∧ Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε α t} ∧ (staircaseSupport α).card ≤ 5 ∧ outputCardinality θ p (staircaseChannel ε α) ≤ 5 := by obtain ⟨α, hfeasible, hoptimal, hsupport'⟩ := exists_sparse_staircase_saddle θ p ε hp hθ hε have hsupport : (staircaseSupport α).card ≤ 5 := by simpa [staircaseSupport, weightSupport] using hsupport' exact ⟨α, hfeasible, hoptimal, hsupport, (outputCardinality_staircase_le_support_card θ p ε α).trans (by exact_mod_cast hsupport)⟩
CausalSmith.Stat.LdpAteEfficiencySurface.five_output_upper_bound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TFiveOutputUpperBound.lean:122
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.TLaplaceComparison 5 declarations The custom known-assignment sample mean has the displayed asymptotic variance.

Comparison with the published custom Laplace release

The custom known-assignment sample mean has the displayed asymptotic variance. Its Wald half-length constant exceeds the private-pilot oracle's at the balanced binary-trial point.

For the supplied quantities and conditions, the asymptotic wald half length is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs.

Definition (Lean source)
γ variance :
ℝ
n :
ℕ
asymptoticWaldHalfLength γ variance n :
ℝ
waldCriticalValue γ * sqrt (variance / n)
CausalSmith.Stat.LdpAteEfficiencySurface.asymptoticWaldHalfLength · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TLaplaceComparison.lean:25
theorem Vstar_nonneg

Under the supplied quantities and conditions, the vstar nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the Vstar nonneg.

Formal statement
select :
p ε :
ℝ
hselect :
hθ :
hε :
0 < ε
0 ≤ Vstar θ p ε
Proof (Lean source)
lemma Vstar_nonneg (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (θ : TrialParameter) (p ε : ℝ) (hselect : StrongSaddleSelection p ε select) (hp : InteriorAssignment p) (hθ : InteriorMeans θ) (hε : 0 < ε) : 0 ≤ Vstar θ p ε := by have hπ (j : Fin 4) : 0 ≤ piTheta θ p j := by rcases hp with ⟨hp0, hp1⟩ rcases hθ with ⟨h0, h0', h1, h1'⟩ fin_cases j <;> simp only [piTheta, controlProb] <;> apply mul_nonneg <;> linarith have hr (s : Fin 14) (j : Fin 4) : 0 ≤ patternRay ε s j := by have he : 1 ≤ exp ε := (Real.one_le_exp_iff).2 (le_of_lt hε) unfold patternRay privacyIncrement privacyRatio split_ifs <;> simp_all <;> linarith [Real.exp_pos ε] have hm (s : Fin 14) : 0 ≤ patternMass θ p ε s := by unfold patternMass exact Finset.sum_nonneg fun j _ => mul_nonneg (hπ j) (hr s j) have hF (α : StaircaseWeight) (hα : staircaseFeasible ε α) (t : ℝ) : 0 ≤ informationObjective θ p ε α t := by unfold informationObjective exact Finset.sum_nonneg fun s _ => mul_nonneg (hα.1 s) (div_nonneg (sq_nonneg _) (hm s)) have hJ : 0 ≤ Jstar θ p ε := by unfold Jstar apply Real.sSup_nonneg intro z hz rcases hz with ⟨α, hα, rfl⟩ apply Real.sInf_nonneg intro y hy rcases hy with ⟨t, rfl⟩ exact hF α hα t exact inv_nonneg.mpr hJ
CausalSmith.Stat.LdpAteEfficiencySurface.Vstar_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TLaplaceComparison.lean:30
theorem VOA_balanced_value

the voa balanced value assertion holds.

Formal statement
VOA (fun _ => (1 / 2 : ℝ)) (1 / 2) 1 = 34
Proof (Lean source)
lemma VOA_balanced_value : VOA (fun _ => (1 / 2 : ℝ)) (1 / 2) 1 = 34 := by norm_num [VOA, sensitivity, contrast, controlProb]
CausalSmith.Stat.LdpAteEfficiencySurface.VOA_balanced_value · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TLaplaceComparison.lean:67

the balanced coth sq lt 34 assertion holds.

Formal statement
(cosh (1 / 2) / sinh (1 / 2)) ^ 2 < (34 : ℝ)
Proof (Lean source)
lemma balanced_coth_sq_lt_34 : (cosh (1 / 2) / sinh (1 / 2)) ^ 2 < (34 : ℝ) := by have hs : (1 / 2 : ℝ) < sinh (1 / 2) := Real.self_lt_sinh_iff.mpr (by norm_num) have hspos : 0 < sinh (1 / 2) := by linarith have hsq := Real.cosh_sq_sub_sinh_sq (1 / 2 : ℝ) rw [div_pow] apply (div_lt_iff₀ (sq_pos_of_pos hspos)).2 nlinarith [sq_nonneg (sinh (1 / 2) - 1 / 2)]
CausalSmith.Stat.LdpAteEfficiencySurface.balanced_coth_sq_lt_34 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TLaplaceComparison.lean:73
theorem laplace_comparison

the laplace comparison assertion holds. For the displayed quantities and conditions, these specify the stated inputs. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the laplace comparison.

Formal statement
Ω :
Y0 Y1 W Y L :
ℕ → Ω → ℝ
p ε γ :
ℝ
hmodel :
P :
hpublic :
P = BinaryTrialModel θ p hmodel.meansInterior hmodel.assignmentInterior
hrep :
∀ n, μ.map (fun ω => fun i : Fin n.val => privateRecord W Y i ω) = P n
hnoise :
ComparatorNoise μ W Y L p ε
hε :
0 < ε
hγ :
0 < γ ∧ γ < 1
hcritical :
select :
hselect :
conclusion 1
P = BinaryTrialModel θ p hmodel.meansInterior hmodel.assignmentInterior
n :
μ.map (fun ω => fun i : Fin n.val => privateRecord W Y i ω) = P n
conclusion 2
Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n ω => sqrt n * (tauOA W Y L p n ω - contrast θ)) atTop (gaussianMeasure 0 (VOA θ p ε))
conclusion 3
Tendsto (fun n => asymptoticWaldHalfLength γ (VOA θ p ε) n / asymptoticWaldHalfLength γ (Vstar θ p ε) n) atTop (nhds (sqrt (VOA θ p ε / Vstar θ p ε)))
conclusion 4
δ :
ℝ
0 < δ
Tendsto (fun n => μ {ω | δ < |VhatOA W Y L p n ω - VOA θ p ε|}) atTop (nhds 0)
conclusion 5
∃ m : ℕ → ℕ,
m = sqrt
δ :
ℝ
0 < δ
ν :
(n : ℕ) → Measure (Ω × Transcript (pilotOutputFamily n))
(∀ n, (ν n).map fst = μ ∧ (ν n).map snd = transcriptLaw (pilotEstimator p ε m select hselect hmodel.assignmentInterior hε) θ p n)
Tendsto (fun n => (ν n) {u | δ < |sqrt (VhatOA W Y L p n u.1 / VhatStar p ε m (select) u.2) - sqrt (VOA θ p ε / Vstar θ p ε)|}) atTop (nhds 0)
conclusion 6
VOA (fun _ => (1 / 2 : ℝ)) (1 / 2) 1 = 34
conclusion 7
Vstar (fun _ => (1 / 2 : ℝ)) (1 / 2) 1 = (cosh (1 / 2) / sinh (1 / 2)) ^ 2
conclusion 8
Vstar (fun _ => (1 / 2 : ℝ)) (1 / 2) 1 < VOA (fun _ => (1 / 2 : ℝ)) (1 / 2) 1
Proof (Lean source)
theorem laplace_comparison {Ω : Type*} [MeasurableSpace Ω] (μ : Measure Ω) [IsProbabilityMeasure μ] (Y0 Y1 W Y L : ℕ → Ω → ℝ) (θ : TrialParameter) (p ε γ : ℝ) (hmodel : LatentBinaryTrialRepresentation μ Y0 Y1 W Y p θ) (P : (n : PositiveSampleSize) → Measure (Fin n.val → PrivateAlphabet)) (hpublic : P = BinaryTrialModel θ p hmodel.meansInterior hmodel.assignmentInterior) (hrep : ∀ n, μ.map (fun ω => fun i : Fin n.val => privateRecord W Y i ω) = P n) (hnoise : ComparatorNoise μ W Y L p ε) (hε : 0 < ε) (hγ : 0 < γ ∧ γ < 1) (hcritical : 0 < waldCriticalValue γ) (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (hselect : StrongSaddleSelection p ε select) : (P = BinaryTrialModel θ p hmodel.meansInterior hmodel.assignmentInterior ∧ ∀ n, μ.map (fun ω => fun i : Fin n.val => privateRecord W Y i ω) = P n) ∧ Modes.TendstoInLaw (fun _ : ℕ => μ) (fun n ω => sqrt n * (tauOA W Y L p n ω - contrast θ)) atTop (gaussianMeasure 0 (VOA θ p ε)) ∧ Tendsto (fun n => asymptoticWaldHalfLength γ (VOA θ p ε) n / asymptoticWaldHalfLength γ (Vstar θ p ε) n) atTop (nhds (sqrt (VOA θ p ε / Vstar θ p ε))) ∧ (∀ δ : ℝ, 0 < δ → Tendsto (fun n => μ {ω | δ < |VhatOA W Y L p n ω - VOA θ p ε|}) atTop (nhds 0)) ∧ (∃ m : ℕ → ℕ, m = Nat.sqrt ∧ PilotDiverges m ∧ PilotSublinear m ∧ ∀ δ : ℝ, 0 < δ → ∀ ν : (n : ℕ) → Measure (Ω × Transcript (pilotOutputFamily n)), (∀ n, (ν n).map fst = μ ∧ (ν n).map snd = transcriptLaw (pilotEstimator p ε m select hselect hmodel.assignmentInterior hε) θ p n) → Tendsto (fun n => (ν n) {u | δ < |sqrt (VhatOA W Y L p n u.1 / VhatStar p ε m (select) u.2) - sqrt (VOA θ p ε / Vstar θ p ε)|}) atTop (nhds 0)) ∧ VOA (fun _ => (1 / 2 : ℝ)) (1 / 2) 1 = 34 ∧ Vstar (fun _ => (1 / 2 : ℝ)) (1 / 2) 1 = (cosh (1 / 2) / sinh (1 / 2)) ^ 2 ∧ Vstar (fun _ => (1 / 2 : ℝ)) (1 / 2) 1 < VOA (fun _ => (1 / 2 : ℝ)) (1 / 2) 1 := by have hbalanced : Vstar (fun _ => (1 / 2 : ℝ)) (1 / 2) 1 = (cosh (1 / 2) / sinh (1 / 2)) ^ 2 := by have h := (balanced_reduction μ Y0 Y1 W Y (fun _ => (1 / 2 : ℝ)) 1 (by norm_num [InteriorMeans]) (by norm_num) (by norm_num)).1 simpa [contrast] using h refine ⟨?_, ?_, ?_, ?_, ?_, VOA_balanced_value, hbalanced, ?_⟩ · exact ⟨hpublic, hrep⟩ · exact oaRelease_clt hmodel hnoise hε · have hV : 0 ≤ Vstar θ p ε := Vstar_nonneg select θ p ε hselect hmodel.assignmentInterior hmodel.meansInterior hε have hpoint (n : ℕ) (hn : 0 < n) : asymptoticWaldHalfLength γ (VOA θ p ε) n / asymptoticWaldHalfLength γ (Vstar θ p ε) n = sqrt (VOA θ p ε / Vstar θ p ε) := by have hnreal : (0 : ℝ) < n := Nat.cast_pos.mpr hn have hsqrt : sqrt (n : ℝ) ≠ 0 := ne_of_gt (Real.sqrt_pos.2 hnreal) rw [asymptoticWaldHalfLength, asymptoticWaldHalfLength, Real.sqrt_div' _ (le_of_lt hnreal), Real.sqrt_div' _ (le_of_lt hnreal), Real.sqrt_div' _ hV] field_simp apply Filter.Tendsto.congr' ?_ tendsto_const_nhds filter_upwards [eventually_gt_atTop 0] with n hn exact (hpoint n hn).symm · exact oaVariance_consistency hmodel hnoise hε · refine ⟨Nat.sqrt, rfl, natSqrt_pilotDiverges, natSqrt_pilotSublinear, ?_⟩ intro δ hδ ν hν have hfixed : FixedPrivacy (fun _ => ε) ε := ⟨hε, fun _ => rfl⟩ have hpilot := pilot_attainment θ p ε γ hmodel.assignmentInterior hmodel.meansInterior (fun _ => ε) hfixed select hselect hγ Nat.sqrt natSqrt_pilotDiverges natSqrt_pilotSublinear have hpilotVar := hpilot.2.2.2.1 have hcoupling (n : ℕ) : IsCoupling (ν n) μ (transcriptLaw (pilotEstimator p ε Nat.sqrt select hselect hmodel.assignmentInterior hε) θ p n) := by letI : IsProbabilityMeasure (ν n) := by letI : IsProbabilityMeasure (Measure.map fst (ν n)) := (hν n).1 ▸ inferInstance exact Measure.isProbabilityMeasure_of_map fst exact ⟨inferInstance, (hν n).1, (hν n).2⟩ have hVpos : 0 < Vstar θ p ε := by unfold Vstar exact inv_pos.mpr (Jstar_pos_interior θ p ε hmodel.assignmentInterior hmodel.meansInterior hε) exact Modes.coupled_sqrtRatio_tendsto_strict_abs (fun _ : ℕ => μ) (fun n => transcriptLaw (pilotEstimator p ε Nat.sqrt select hselect hmodel.assignmentInterior hε) θ p n) ν hcoupling (fun n ω => VhatOA W Y L p n ω) (fun _ z => VhatStar p ε Nat.sqrt (select) z) (VOA θ p ε) (Vstar θ p ε) hVpos atTop (fun _ z => VhatStar_nonneg p ε Nat.sqrt (select) z) (oaVariance_consistency hmodel hnoise hε) hpilotVar δ hδ · rw [hbalanced, VOA_balanced_value] exact balanced_coth_sq_lt_34
CausalSmith.Stat.LdpAteEfficiencySurface.laplace_comparison · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TLaplaceComparison.lean:85
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.TPilotAttainment 7 declarations The complete pilot procedure is private, conditionally unbiased, regular and asymptotically Gaussian.

Attainment by the private-pilot estimator

The complete pilot procedure is private, conditionally unbiased, regular and asymptotically Gaussian. Its main-sample variance gives Wald coverage at every interior parameter, including channel-support boundaries.

def standardNormalCDF

For the supplied quantities and conditions, the standard normal cdf is the mathematical object specified below.

Definition (Lean source)
x :
ℝ
standardNormalCDF x :
ℝ
CausalSmith.Stat.LdpAteEfficiencySurface.standardNormalCDF · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TPilotAttainment.lean:30

the wald critical value is the mathematical object specified below. The wald Critical Value is determined by the displayed parameters.

Definition (Lean source)
γ :
ℝ
waldCriticalValue γ :
ℝ
sInf {z : ℝ | 1 - γ / 2 ≤ standardNormalCDF z}
CausalSmith.Stat.LdpAteEfficiencySurface.waldCriticalValue · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TPilotAttainment.lean:35
theorem standardNormalCDF_eq_stdNormalCDF

Under the supplied quantities and conditions, the standard normal cdf eq std normal cdf assertion holds.

Formal statement
x :
ℝ
Proof (Lean source)
lemma standardNormalCDF_eq_stdNormalCDF (x : ℝ) : standardNormalCDF x = stdNormalCDF x := by simp [standardNormalCDF, stdNormalCDF_def, ProbabilityTheory.cdf_eq_real, MeasureTheory.measureReal_def, gaussianMeasure]
CausalSmith.Stat.LdpAteEfficiencySurface.standardNormalCDF_eq_stdNormalCDF · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TPilotAttainment.lean:40
theorem waldCriticalValue_eq_probit

the wald critical value eq probit assertion holds.

Formal statement
γ :
ℝ
waldCriticalValue γ = probit (1 - γ / 2)
Proof (Lean source)
lemma waldCriticalValue_eq_probit (γ : ℝ) : waldCriticalValue γ = probit (1 - γ / 2) := by unfold waldCriticalValue probit congr 1 ext z simp only [Set.mem_setOf_eq] rw [standardNormalCDF_eq_stdNormalCDF]
CausalSmith.Stat.LdpAteEfficiencySurface.waldCriticalValue_eq_probit · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TPilotAttainment.lean:46
theorem waldCriticalValue_pos

Under the supplied quantities and conditions, the wald critical value pos assertion holds. Under the stated assumptions, the wald Critical Value pos.

Formal statement
γ :
ℝ
hγ :
0 < γ ∧ γ < 1
Proof (Lean source)
lemma waldCriticalValue_pos {γ : ℝ} (hγ : 0 < γ ∧ γ < 1) : 0 < waldCriticalValue γ := by have hq0 : 0 < 1 - γ / 2 := by linarith have hq1 : 1 - γ / 2 < 1 := by linarith have hzero : stdNormalCDF 0 = 1 / 2 := by have hsym := stdNormalCDF_neg 0 norm_num at hsym ⊢ linarith rw [waldCriticalValue_eq_probit] apply Causalean.Mathlib.stdNormalCDF_strictMono.lt_iff_lt.mp rw [stdNormalCDF_probit hq0 hq1, hzero] linarith
CausalSmith.Stat.LdpAteEfficiencySurface.waldCriticalValue_pos · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TPilotAttainment.lean:55
theorem gaussianMeasure_waldCriticalValue_Icc

the gaussian measure wald critical value icc assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the gaussian Measure wald Critical Value Icc.

Formal statement
γ :
ℝ
hγ :
0 < γ ∧ γ < 1
Proof (Lean source)
lemma gaussianMeasure_waldCriticalValue_Icc {γ : ℝ} (hγ : 0 < γ ∧ γ < 1) : (gaussianMeasure 0 1 (Icc (-waldCriticalValue γ) (waldCriticalValue γ))).toReal = 1 - γ := by have hp0 : 0 < γ / 2 := by linarith have hp1 : γ / 2 < 1 := by linarith have hq0 : 0 < 1 - γ / 2 := by linarith have hq1 : 1 - γ / 2 < 1 := by linarith have hsym : probit (γ / 2) = -probit (1 - γ / 2) := by apply Causalean.Mathlib.stdNormalCDF_strictMono.injective rw [stdNormalCDF_probit hp0 hp1, stdNormalCDF_neg, stdNormalCDF_probit hq0 hq1] ring have h := gaussianReal_quantile_Icc_toReal (v := (1 : NNReal)) (by norm_num) hγ.1 hγ.2 simpa [gaussianMeasure, waldCriticalValue_eq_probit, hsym, MeasureTheory.measureReal_def] using h
CausalSmith.Stat.LdpAteEfficiencySurface.gaussianMeasure_waldCriticalValue_Icc · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TPilotAttainment.lean:71
theorem pilot_attainment

Under the supplied quantities and conditions, the pilot attainment assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the pilot attainment.

Formal statement
p ε γ :
ℝ
hassignment :
hmeans :
epsSeq :
ℕ → ℝ
hfixed :
FixedPrivacy epsSeq ε
select :
hselect :
hγ :
0 < γ ∧ γ < 1
@realizes \gamma(Wald error in (0,1))
m :
ℕ → ℕ
hdiverges :
hsublinear :
P :
pilotEstimator p ε m select hselect hassignment hfixed.1
n :
SequentialLDP (Z := pilotOutputFamily n) ε (P.channel n)
n ≥ 2 :
f :
Transcript (pilotOutputFamily n) → ℝ
(∃ C : ℝ, ∀ z, |f z| ≤ C)
(∀ z z', (∀ i : Fin n, i.val < m n → z i = z' i) → f z = f z')
Integrable (fun z => (P.estimate n z - contrast θ) * f z) (transcriptLaw P θ p n)
(∫ z, (P.estimate n z - contrast θ) * f z ∂transcriptLaw P θ p n) = 0
WeakLocalLimit P θ p (gaussianMeasure 0 (Vstar θ p ε))
δ :
ℝ
0 < δ
Tendsto (fun n => (transcriptLaw P θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)
Tendsto (fun n => ((transcriptLaw P θ p n) {z | |P.estimate n z - contrast θ| ≤ waldCriticalValue γ * sqrt (VhatStar p ε m (select) z / n)}).toReal) atTop (nhds (1 - γ))
Proof (Lean source)
theorem pilot_attainment (θ : TrialParameter) (p ε γ : ℝ) (hassignment : InteriorAssignment p) (hmeans : InteriorMeans θ) (epsSeq : ℕ → ℝ) (hfixed : FixedPrivacy epsSeq ε) (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (hselect : StrongSaddleSelection p ε select) (hγ : 0 < γ ∧ γ < 1) -- @realizes \gamma(Wald error in (0,1)) (m : ℕ → ℕ) (hdiverges : PilotDiverges m) (hsublinear : PilotSublinear m) : let P := pilotEstimator p ε m select hselect hassignment hfixed.1 (∀ n, SequentialLDP (Z := pilotOutputFamily n) ε (P.channel n)) ∧ (∀ n ≥ 2, ∀ f : Transcript (pilotOutputFamily n) → ℝ, Measurable f → (∃ C : ℝ, ∀ z, |f z| ≤ C) → (∀ z z', (∀ i : Fin n, i.val < m n → z i = z' i) → f z = f z') → Integrable (fun z => (P.estimate n z - contrast θ) * f z) (transcriptLaw P θ p n) ∧ (∫ z, (P.estimate n z - contrast θ) * f z ∂transcriptLaw P θ p n) = 0) ∧ WeakLocalLimit P θ p (gaussianMeasure 0 (Vstar θ p ε)) ∧ (∀ δ : ℝ, 0 < δ → Tendsto (fun n => (transcriptLaw P θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0)) ∧ RegularProcedure P θ p ∧ Tendsto (fun n => ((transcriptLaw P θ p n) {z | |P.estimate n z - contrast θ| ≤ waldCriticalValue γ * sqrt (VhatStar p ε m (select) z / n)}).toReal) atTop (nhds (1 - γ)) := by let P := pilotEstimator p ε m select hselect hassignment hfixed.1 have hgaussianCDF : ∀ h : TrialParameter, ∀ x : ℝ, Tendsto (fun n => (transcriptLaw P (localAlternative θ h n) p n).real {z | scaledError P θ h n z ≤ x}) atTop (nhds ((gaussianMeasure 0 (Vstar θ p ε)).real (Iic x))) := by exact pilot_scaledError_cdf_tendsto_of_all_conditionalRows select θ p ε m hselect hassignment hmeans hfixed.1 hdiverges hsublinear (fun h x φ hφ η hη hηlim => adaptivePilotRowScaledCDF_subsequence_tendsto_gaussian select θ h p ε m hselect hassignment hmeans hfixed.1 hsublinear x φ hφ η hη hηlim) have hweak : WeakLocalLimit P θ p (gaussianMeasure 0 (Vstar θ p ε)) := weakLocalLimit_of_scaledError_cdf_tendsto select P θ p hselect hassignment hmeans hfixed.1 hgaussianCDF have hvhat : ∀ δ : ℝ, 0 < δ → Tendsto (fun n => (transcriptLaw P θ p n) {z | δ < |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0) := by exact pilot_VhatStar_consistent select θ p ε m hselect hassignment hmeans hfixed.1 hdiverges hsublinear have htails := pilot_scaledError_uniform_squared_tails select θ p ε m hselect hassignment hmeans hfixed.1 hsublinear have hregular : RegularProcedure P θ p := regular_of_weakLocalLimit_and_uniformTails P θ p (Vstar θ p ε) hweak htails have hV : 0 < Vstar θ p ε := inv_pos.mpr (Jstar_pos_interior θ p ε hassignment hmeans hfixed.1) have hsqrtV : 0 < sqrt (Vstar θ p ε) := Real.sqrt_pos.2 hV have hstandardCDF : ∀ x : ℝ, Tendsto (fun n => (transcriptLaw P θ p n).real {z | scaledError P θ 0 n z / sqrt (Vstar θ p ε) ≤ x}) atTop (nhds ((gaussianMeasure 0 1).real (Iic x))) := by intro x have hraw := hgaussianCDF 0 (x * sqrt (Vstar θ p ε)) have hevent (n : ℕ) : {z | scaledError P θ 0 n z / sqrt (Vstar θ p ε) ≤ x} = {z | scaledError P θ 0 n z ≤ x * sqrt (Vstar θ p ε)} := by ext z exact div_le_iff₀ hsqrtV have htarget : (gaussianMeasure 0 (Vstar θ p ε)).real (Iic (x * sqrt (Vstar θ p ε))) = (gaussianMeasure 0 1).real (Iic x) := by rw [← ProbabilityTheory.cdf_eq_real, ← ProbabilityTheory.cdf_eq_real] simp only [gaussianMeasure] rw [cdf_gaussianReal_zero (Real.toNNReal_pos.mpr hV), cdf_gaussianReal_zero (v := toNNReal 1) (by norm_num [Real.toNNReal_pos])] congr 1 rw [Real.coe_toNNReal (Vstar θ p ε) hV.le, Real.coe_toNNReal 1 (by norm_num)] simp only [Real.sqrt_one, div_one] field_simp rw [← htarget] apply hraw.congr' filter_upwards with n rw [hevent n] have hlocal0 : localAlternative θ 0 n = θ := by funext k simp [localAlternative] rw [hlocal0] letI (n : ℕ) : IsProbabilityMeasure (transcriptLaw P θ p n) := transcriptLaw_isProbability P θ p hassignment hmeans n have hvhat_ge : ∀ r : ℝ, 0 < r → Tendsto (fun n => (transcriptLaw P θ p n).real {z | r ≤ |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0) := by intro r hr have hstrict := hvhat (r / 2) (half_pos hr) have hstrictReal : Tendsto (fun n => (transcriptLaw P θ p n).real {z | r / 2 < |VhatStar p ε m (select) z - Vstar θ p ε|}) atTop (nhds 0) := by change Tendsto (fun n => toReal ((transcriptLaw P θ p n) {z | r / 2 < |VhatStar p ε m (select) z - Vstar θ p ε|})) atTop (nhds (toReal 0)) exact (ENNReal.tendsto_toReal (by simp)).comp hstrict apply tendsto_of_tendsto_of_tendsto_of_le_of_le tendsto_const_nhds hstrictReal · intro n exact MeasureTheory.measureReal_nonneg · intro n apply MeasureTheory.measureReal_mono (h₂ := measure_ne_top _ _) intro z hz exact lt_of_lt_of_le (half_lt_self hr) hz have hwald := pilot_wald_coverage_of_standardized_cdf_and_VhatStar_consistent select (waldCriticalValue γ) (waldCriticalValue_pos hγ) θ p ε m hselect hassignment hmeans hfixed.1 hstandardCDF hvhat_ge refine ⟨?_, ?_, hweak, hvhat, hregular, ?_⟩ · intro n exact pilotProtocol_private p ε m select hselect hassignment hfixed.1 n · intro n hn f hf hbound hpref exact pilot_conditional_unbiasedness select θ p ε m hselect hassignment hmeans hfixed.1 hsublinear n hn f hf hbound hpref · have hcoverage : (gaussianMeasure 0 1).real (Icc (-waldCriticalValue γ) (waldCriticalValue γ)) = 1 - γ := by simpa only [MeasureTheory.measureReal_def] using gaussianMeasure_waldCriticalValue_Icc hγ rw [hcoverage] at hwald simpa only [P] using hwald
CausalSmith.Stat.LdpAteEfficiencySurface.pilot_attainment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TPilotAttainment.lean:95
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.TSequentialMinimax 2 declarations The lower bound covers every history-dependent private procedure on arbitrary measurable output spaces, whether regular or not.

Sequential local asymptotic minimax equality

The lower bound covers every history-dependent private procedure on arbitrary measurable output spaces, whether regular or not. A single private-pilot sequence is regular and attains the bound, giving the infimum equality.

For the supplied quantities and conditions, the regular risk set is the mathematical object specified below. The regular Risk Set is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
regularRiskSet θ p ε :
Set ℝ≥0∞
{u | ∃ Z : OutputFamily, ∃ mZ : ∀ n i, MeasurableSpace (Z n i), letI := mZ ∃ P : ProcedureSequence Z ε, RegularProcedure P θ p ∧ u = localAsymptoticRisk P θ p}
CausalSmith.Stat.LdpAteEfficiencySurface.regularRiskSet · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSequentialMinimax.lean:27
theorem sequential_minimax

Under the supplied quantities and conditions, the sequential minimax assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the sequential minimax.

Formal statement
p ε :
ℝ
hθ :
@realizes \theta_0(interior local parameter point)
epsSeq :
ℕ → ℝ
hfixed :
FixedPrivacy epsSeq ε
select :
hselect :
conclusion 1
∀ n i, MeasurableSpace (Z n i)
ofReal (Vstar θ0 p ε) ≤ localAsymptoticRisk P θ0 p
conclusion 2
∃ m : ℕ → ℕ,
m = sqrt
RegularProcedure (pilotEstimator p ε m select hselect hp hfixed.1) θ0 p
localAsymptoticRisk (pilotEstimator p ε m select hselect hp hfixed.1) θ0 p
= ofReal (Vstar θ0 p ε)
conclusion 3
sInf (regularRiskSet θ0 p ε) = ofReal (Vstar θ0 p ε)
Proof (Lean source)
theorem sequential_minimax (θ0 : TrialParameter) (p ε : ℝ) (hp : InteriorAssignment p) (hθ : InteriorMeans θ0) -- @realizes \theta_0(interior local parameter point) (epsSeq : ℕ → ℝ) (hfixed : FixedPrivacy epsSeq ε) (select : TrialParameter → StaircaseWeight × ℝ × ℝ) (hselect : StrongSaddleSelection p ε select) : (∀ (Z : OutputFamily) [∀ n i, MeasurableSpace (Z n i)] (P : ProcedureSequence Z ε), ofReal (Vstar θ0 p ε) ≤ localAsymptoticRisk P θ0 p) ∧ (∃ m : ℕ → ℕ, m = Nat.sqrt ∧ PilotDiverges m ∧ PilotSublinear m ∧ RegularProcedure (pilotEstimator p ε m select hselect hp hfixed.1) θ0 p ∧ localAsymptoticRisk (pilotEstimator p ε m select hselect hp hfixed.1) θ0 p = ofReal (Vstar θ0 p ε)) ∧ sInf (regularRiskSet θ0 p ε) = ofReal (Vstar θ0 p ε) := by have hlower : ∀ (Z : OutputFamily) [∀ n i, MeasurableSpace (Z n i)] (P : ProcedureSequence Z ε), ofReal (Vstar θ0 p ε) ≤ localAsymptoticRisk P θ0 p := by intro Z mZ P exact sequential_localAsymptoticRisk_lower_bound P θ0 p hp hθ hfixed.1 have hrates := natSqrt_pilotRates have hpilot := pilot_attainment θ0 p ε (1 / 2) hp hθ epsSeq hfixed select hselect (by norm_num) Nat.sqrt hrates.1 hrates.2 have hregular : RegularProcedure (pilotEstimator p ε Nat.sqrt select hselect hp hfixed.1) θ0 p := hpilot.2.2.2.2.1 have hrisk : localAsymptoticRisk (pilotEstimator p ε Nat.sqrt select hselect hp hfixed.1) θ0 p = ofReal (Vstar θ0 p ε) := pilot_localAsymptoticRisk_eq select θ0 p ε Nat.sqrt hselect hp hθ hfixed.1 hrates.1 hrates.2 refine ⟨hlower, ?_, ?_⟩ · exact ⟨Nat.sqrt, rfl, hrates.1, hrates.2, hregular, hrisk⟩ · apply le_antisymm · apply sInf_le refine ⟨pilotOutputFamily, (fun _ _ => inferInstance), ?_⟩ let _ : ∀ n i, MeasurableSpace (pilotOutputFamily n i) := fun _ _ => inferInstance exact ⟨pilotEstimator p ε Nat.sqrt select hselect hp hfixed.1, hregular, hrisk.symm⟩ · apply le_sInf rintro u ⟨Z, mZ, P, -, rfl⟩ let _ : ∀ n i, MeasurableSpace (Z n i) := mZ exact hlower Z P
CausalSmith.Stat.LdpAteEfficiencySurface.sequential_minimax · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSequentialMinimax.lean:37
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.TSupportTransition 13 declarations Disjoint neighborhoods of the balanced and low-mean points have unique optimal staircase supports of sizes five and three, respectively.

Transition between optimal support sizes

Disjoint neighborhoods of the balanced and low-mean points have unique optimal staircase supports of sizes five and three, respectively.

For the supplied quantities and conditions, the unique optimal support is the mathematical object specified below. For the displayed quantities and conditions, these specify the stated inputs. The unique Optimal Support is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
K :
Finset (Fin 14)
uniqueOptimalSupport θ p ε K :
Prop
∃ α : StaircaseWeight,
Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε α t}
clause 1
Jstar θ p ε = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ p ε β t}
β = α
CausalSmith.Stat.LdpAteEfficiencySurface.uniqueOptimalSupport · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:21

For the supplied quantities and conditions, the optimal cardinality is the mathematical object specified below. The optimal Cardinality is determined by the displayed parameters.

Definition (Lean source)
p ε :
ℝ
k :
ℕ∞
optimalCardinality θ p ε k :
Prop
clause 2
Z :
Type*
Q :
Kernel (Fin 4) Z
k ≤ outputCardinality θ p Q
CausalSmith.Stat.LdpAteEfficiencySurface.optimalCardinality · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:33
theorem piTheta_by_val_transition Lemma piTheta_by_val_transition in the paper ↗

Under the supplied quantities and conditions, the pi theta by val transition assertion holds.

Formal statement
p :
ℝ
j :
Fin 4
piTheta θ p j
= if j.val = 0 then controlProb p * (1 - θ 0) else if j.val = 1 then controlProb p * θ 0 else if j.val = 2 then p * (1 - θ 1) else p * θ 1
Proof (Lean source)
lemma piTheta_by_val_transition (θ : TrialParameter) (p : ℝ) (j : Fin 4) : piTheta θ p j = if j.val = 0 then controlProb p * (1 - θ 0) else if j.val = 1 then controlProb p * θ 0 else if j.val = 2 then p * (1 - θ 1) else p * θ 1 := by rcases j with ⟨j, hj⟩ interval_cases j <;> rfl
CausalSmith.Stat.LdpAteEfficiencySurface.piTheta_by_val_transition · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:46
theorem lowMean_informationMatrix_value

the low mean information matrix value assertion holds.

Formal statement
informationMatrix (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0)
= !![(1379 / 3390 : ℝ), -(1 / 10 : ℝ); -(1 / 10 : ℝ), (411 / 3710 : ℝ)]
Proof (Lean source)
lemma lowMean_informationMatrix_value : informationMatrix (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0) = !![(1379 / 3390 : ℝ), -(1 / 10 : ℝ); -(1 / 10 : ℝ), (411 / 3710 : ℝ)] := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) ext a b fin_cases a <;> fin_cases b <;> simp +decide [informationMatrix, patternGradient, patternMass, patternRay, patternContains, piTheta_by_val_transition, privacyIncrement, privacyRatio, controlProb, he, Fin.sum_univ_succ] <;> norm_num
CausalSmith.Stat.LdpAteEfficiencySurface.lowMean_informationMatrix_value · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:57
theorem lowMean_informationMatrix_direction

the low mean information matrix direction assertion holds.

Formal statement
(informationMatrix (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0)).mulVec (direction (-(339 / 9985 : ℝ)))
= fun k => (441 / 3994 : ℝ) * contrastVector k
Proof (Lean source)
lemma lowMean_informationMatrix_direction : (informationMatrix (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0)).mulVec (direction (-(339 / 9985 : ℝ))) = fun k => (441 / 3994 : ℝ) * contrastVector k := by rw [lowMean_informationMatrix_value] funext k fin_cases k <;> norm_num [mulVec, dotProduct, direction, contrastVector, Fin.sum_univ_succ]
CausalSmith.Stat.LdpAteEfficiencySurface.lowMean_informationMatrix_direction · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:72
theorem lowMean_projectedScores_distinct Lemma lowMean_projectedScores_distinct in the paper ↗

the low mean projected scores distinct assertion holds.

Formal statement
s :
Fin 14
shared
u :
Fin 14
shared
s ∈ ({0, 5, 7} : Finset (Fin 14)) :
u ∈ ({0, 5, 7} : Finset (Fin 14)) :
s ≠ u
projectedScore (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s (-(339 / 9985 : ℝ))
≠ projectedScore (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) u (-(339 / 9985 : ℝ))
Proof (Lean source)
lemma lowMean_projectedScores_distinct : ∀ s ∈ ({0, 5, 7} : Finset (Fin 14)), ∀ u ∈ ({0, 5, 7} : Finset (Fin 14)), s ≠ u → projectedScore (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s (-(339 / 9985 : ℝ)) ≠ projectedScore (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) u (-(339 / 9985 : ℝ)) := by intro s hs u hu hne have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have hs : s = 0 ∨ s = 5 ∨ s = 7 := by simpa using hs have hu : u = 0 ∨ u = 5 ∨ u = 7 := by simpa using hu rcases hs with rfl | rfl | rfl all_goals rcases hu with rfl | rfl | rfl all_goals first | contradiction | simp +decide [projectedScore, projectedGradient, patternMass, patternGradient, patternRay, patternContains, piTheta_by_val_transition, privacyIncrement, privacyRatio, controlProb, direction, he, Fin.sum_univ_succ] <;> norm_num
CausalSmith.Stat.LdpAteEfficiencySurface.lowMean_projectedScores_distinct · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:85
theorem lowMean_outputCardinality_of_attainment

the low mean output cardinality of attainment assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
Z :
Q :
Kernel (Fin 4) Z
hQ :
hattain :
contrastVariance (channelFisherInfo (fun _ ↦ (1 / 10 : ℝ)) (3 / 10) Q)
= ofReal (Vstar (fun _ ↦ (1 / 10 : ℝ)) (3 / 10) (log 3))
3 ≤ outputCardinality (fun _ ↦ (1 / 10 : ℝ)) (3 / 10) Q
Proof (Lean source)
lemma lowMean_outputCardinality_of_attainment {Z : Type*} [MeasurableSpace Z] (Q : Kernel (Fin 4) Z) (hQ : StationaryLDP (log 3) Q) (hattain : contrastVariance (channelFisherInfo (fun _ ↦ (1 / 10 : ℝ)) (3 / 10) Q) = ofReal (Vstar (fun _ ↦ (1 / 10 : ℝ)) (3 / 10) (log 3))) : 3 ≤ outputCardinality (fun _ ↦ (1 / 10 : ℝ)) (3 / 10) Q := by let θ : TrialParameter := fun _ ↦ (1 / 10 : ℝ) let A : Finset (Fin 14) := {0, 5, 7} have hp : InteriorAssignment (3 / 10 : ℝ) := ⟨by norm_num, by norm_num⟩ have hθ : InteriorMeans θ := by simp only [InteriorMeans, θ] norm_num have hε : 0 < log 3 := Real.log_pos (by norm_num) have hupper : ∀ β : StaircaseWeight, staircaseFeasible (log 3) β → informationObjective θ (3 / 10) (log 3) β (-(339 / 9985 : ℝ)) ≤ Jstar θ (3 / 10) (log 3) := by intro β hβ dsimp only [θ] rw [lowMean_Jstar_value] exact lowMean_dual_upper_bound β hβ have hpositive : ∀ β : StaircaseWeight, staircaseFeasible (log 3) β → informationObjective θ (3 / 10) (log 3) β (-(339 / 9985 : ℝ)) = Jstar θ (3 / 10) (log 3) → ∀ s ∈ A, 0 < β s := by intro β hβ heq have hactive : ∀ s ∈ A, dualRay (log 3) lowMeanDual s = patternInformation θ (3 / 10) (log 3) s (-(339 / 9985 : ℝ)) := by intro s hs simpa only [A, θ, if_pos hs] using lowMeanDual_slack s have hinactive : ∀ s ∉ A, patternInformation θ (3 / 10) (log 3) s (-(339 / 9985 : ℝ)) < dualRay (log 3) lowMeanDual s := by intro s hs simpa only [A, θ, if_neg hs] using lowMeanDual_slack s have hvalue : informationObjective θ (3 / 10) (log 3) β (-(339 / 9985 : ℝ)) = ∑ j : Fin 4, lowMeanDual j := by rw [heq] dsimp only [θ] rw [lowMean_Jstar_value, lowMeanDual_value] have hout : ∀ s ∉ A, β s = 0 := certificate_equality_forces_inactive_zero θ (3 / 10) (log 3) (-(339 / 9985 : ℝ)) A lowMeanDual hactive hinactive β hβ hvalue have hcanonical := r3_feasible_eq_canonical β hβ (by simpa only [A] using hout) intro s hs rw [hcanonical] simp only [A] at hs simp [hs] have hcard := outputCardinality_ge_of_attainment_direction θ (3 / 10) (log 3) (-(339 / 9985 : ℝ)) hp hθ hε A hupper hpositive (by simpa only [θ, A] using lowMean_projectedScores_distinct) Q hQ (by simpa only [θ] using hattain) norm_num [A] at hcard ⊢ exact hcard
CausalSmith.Stat.LdpAteEfficiencySurface.lowMean_outputCardinality_of_attainment · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:105
theorem supportRegion_slices

Under the supplied quantities and conditions, the support region slices assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
hR5 :
h5 :
((3 / 10 : ℝ), (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5
hR3 :
h3 :
((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3) ∈ R3
∃ U5 U3 : Set (ℝ × ℝ),
((1 / 2 : ℝ), (1 / 2 : ℝ)) ∈ U5
((1 / 10 : ℝ), (1 / 10 : ℝ)) ∈ U3
Disjoint U5 U3
conclusion 1
μ ∈ U5 :
((3 / 10 : ℝ), μ.1, μ.2, log 3) ∈ R5
conclusion 2
μ ∈ U3 :
((3 / 10 : ℝ), μ.1, μ.2, log 3) ∈ R3
Proof (Lean source)
lemma supportRegion_slices (hR5 : IsOpen R5) (h5 : ((3 / 10 : ℝ), (1 / 2 : ℝ), (1 / 2 : ℝ), log 3) ∈ R5) (hR3 : IsOpen R3) (h3 : ((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3) ∈ R3) : ∃ U5 U3 : Set (ℝ × ℝ), IsOpen U5 ∧ IsOpen U3 ∧ ((1 / 2 : ℝ), (1 / 2 : ℝ)) ∈ U5 ∧ ((1 / 10 : ℝ), (1 / 10 : ℝ)) ∈ U3 ∧ Disjoint U5 U3 ∧ (∀ μ ∈ U5, ((3 / 10 : ℝ), μ.1, μ.2, log 3) ∈ R5) ∧ ∀ μ ∈ U3, ((3 / 10 : ℝ), μ.1, μ.2, log 3) ∈ R3 := by let slice : ℝ × ℝ → ℝ × ℝ × ℝ × ℝ := fun μ => ((3 / 10 : ℝ), μ.1, μ.2, log 3) let U5 : Set (ℝ × ℝ) := slice ⁻¹' R5 ∩ {μ | (3 / 10 : ℝ) < μ.1} let U3 : Set (ℝ × ℝ) := slice ⁻¹' R3 ∩ {μ | μ.1 < (3 / 10 : ℝ)} have hslice : Continuous slice := by fun_prop refine ⟨U5, U3, ?_, ?_, ?_, ?_, ?_, ?_, ?_⟩ · exact (hR5.preimage hslice).inter (isOpen_lt continuous_const continuous_fst) · exact (hR3.preimage hslice).inter (isOpen_lt continuous_fst continuous_const) · exact ⟨h5, by norm_num⟩ · exact ⟨h3, by norm_num⟩ · rw [Set.disjoint_left] intro μ hμ5 hμ3 have hm5 := hμ5.2 have hm3 := hμ3.2 change (3 / 10 : ℝ) < μ.1 at hm5 change μ.1 < (3 / 10 : ℝ) at hm3 exact (not_lt_of_ge (le_of_lt hm5)) hm3 · intro μ hμ exact hμ.1 · intro μ hμ exact hμ.1
CausalSmith.Stat.LdpAteEfficiencySurface.supportRegion_slices · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:173
theorem optimalCardinality_of_mem_R5

Under the supplied quantities and conditions, the optimal cardinality of mem r5 assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 ε :
ℝ
hx :
(p, μ0, μ1, ε) ∈ R5
optimalCardinality (fun k ↦ if k = 0 then μ0 else μ1) p ε 5
Proof (Lean source)
lemma optimalCardinality_of_mem_R5 (p μ0 μ1 ε : ℝ) (hx : (p, μ0, μ1, ε) ∈ R5) : optimalCardinality (fun k ↦ if k = 0 then μ0 else μ1) p ε 5 := by refine ⟨r5Certificate_staircase_attains_five p μ0 μ1 ε hx, ?_⟩ intro Z _ Q hQ hattain exact r5Certificate_outputCardinality_ge_five p μ0 μ1 ε hx Q hQ hattain
CausalSmith.Stat.LdpAteEfficiencySurface.optimalCardinality_of_mem_R5 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:212
theorem uniqueOptimalSupport_of_mem_R5

Under the supplied quantities and conditions, the unique optimal support of mem r5 assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 ε :
ℝ
hx :
(p, μ0, μ1, ε) ∈ R5
uniqueOptimalSupport (fun k ↦ if k = 0 then μ0 else μ1) p ε r5Active
Proof (Lean source)
lemma uniqueOptimalSupport_of_mem_R5 (p μ0 μ1 ε : ℝ) (hx : (p, μ0, μ1, ε) ∈ R5) : uniqueOptimalSupport (fun k ↦ if k = 0 then μ0 else μ1) p ε r5Active := by obtain ⟨α, hα, hsupp, _, hopt, hunique⟩ := r5Certificate_unique_optimum p μ0 μ1 ε hx refine ⟨α, hα, ?_, hopt, hunique⟩ ext s simp only [staircaseSupport, mem_filter, Finset.mem_univ, true_and] exact hsupp s
CausalSmith.Stat.LdpAteEfficiencySurface.uniqueOptimalSupport_of_mem_R5 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:221
theorem uniqueOptimalSupport_of_mem_R3

Under the supplied quantities and conditions, the unique optimal support of mem r3 assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 :
ℝ
hx :
(p, μ0, μ1, log 3) ∈ R3
uniqueOptimalSupport (fun k ↦ if k = 0 then μ0 else μ1) p (log 3) ({0, 5, 7} : Finset (Fin 14))
Proof (Lean source)
lemma uniqueOptimalSupport_of_mem_R3 (p μ0 μ1 : ℝ) (hx : (p, μ0, μ1, log 3) ∈ R3) : uniqueOptimalSupport (fun k ↦ if k = 0 then μ0 else μ1) p (log 3) ({0, 5, 7} : Finset (Fin 14)) := by obtain ⟨α, hα, hsupp, hopt, hunique⟩ := r3Certificate_unique_optimum_log3 p μ0 μ1 hx refine ⟨α, hα, ?_, hopt, hunique⟩ ext s simp only [staircaseSupport, mem_filter, Finset.mem_univ, true_and] exact hsupp s
CausalSmith.Stat.LdpAteEfficiencySurface.uniqueOptimalSupport_of_mem_R3 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:234
theorem optimalCardinality_of_mem_R3_of_distinct

Under the supplied quantities and conditions, the optimal cardinality of mem r3 of distinct assertion holds. For the displayed quantities and conditions, these specify the stated inputs.

Formal statement
p μ0 μ1 :
ℝ
hx :
(p, μ0, μ1, log 3) ∈ R3
hdistinct :
∀ i k : Fin 3
if
i ≠ k
then
r3ProjectedScoreAt (p, μ0, μ1, log 3) i
≠ r3ProjectedScoreAt (p, μ0, μ1, log 3) k
optimalCardinality (fun k ↦ if k = 0 then μ0 else μ1) p (log 3) 3
Proof (Lean source)
lemma optimalCardinality_of_mem_R3_of_distinct (p μ0 μ1 : ℝ) (hx : (p, μ0, μ1, log 3) ∈ R3) (hdistinct : ∀ i k : Fin 3, i ≠ k → r3ProjectedScoreAt (p, μ0, μ1, log 3) i ≠ r3ProjectedScoreAt (p, μ0, μ1, log 3) k) : optimalCardinality (fun k ↦ if k = 0 then μ0 else μ1) p (log 3) 3 := by refine ⟨r3Certificate_staircase_attains_three p μ0 μ1 hx, ?_⟩ intro Z _ Q hQ hattain exact r3Certificate_outputCardinality_ge_three_of_distinct p μ0 μ1 hx hdistinct Q hQ hattain
CausalSmith.Stat.LdpAteEfficiencySurface.optimalCardinality_of_mem_R3_of_distinct · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:247
theorem support_transition

the support transition assertion holds.

Formal statement
∃ U5 U3 : Set (ℝ × ℝ),
((1 / 2 : ℝ), (1 / 2 : ℝ)) ∈ U5
((1 / 10 : ℝ), (1 / 10 : ℝ)) ∈ U3
Disjoint U5 U3
conclusion 1
μ ∈ U5 :
uniqueOptimalSupport (fun k => if k = 0 then μ.1 else μ.2) (3 / 10) (log 3) ({2, 3, 5, 7, 8} : Finset (Fin 14))
optimalCardinality (fun k => if k = 0 then μ.1 else μ.2) (3 / 10) (log 3) 5
conclusion 2
μ ∈ U3 :
uniqueOptimalSupport (fun k => if k = 0 then μ.1 else μ.2) (3 / 10) (log 3) ({0, 5, 7} : Finset (Fin 14))
optimalCardinality (fun k => if k = 0 then μ.1 else μ.2) (3 / 10) (log 3) 3
Proof (Lean source)
theorem support_transition : ∃ U5 U3 : Set (ℝ × ℝ), IsOpen U5 ∧ IsOpen U3 ∧ ((1 / 2 : ℝ), (1 / 2 : ℝ)) ∈ U5 ∧ ((1 / 10 : ℝ), (1 / 10 : ℝ)) ∈ U3 ∧ Disjoint U5 U3 ∧ (∀ μ ∈ U5, uniqueOptimalSupport (fun k => if k = 0 then μ.1 else μ.2) (3 / 10) (log 3) ({2, 3, 5, 7, 8} : Finset (Fin 14)) ∧ optimalCardinality (fun k => if k = 0 then μ.1 else μ.2) (3 / 10) (log 3) 5) ∧ (∀ μ ∈ U3, uniqueOptimalSupport (fun k => if k = 0 then μ.1 else μ.2) (3 / 10) (log 3) ({0, 5, 7} : Finset (Fin 14)) ∧ optimalCardinality (fun k => if k = 0 then μ.1 else μ.2) (3 / 10) (log 3) 3) := by obtain ⟨V5, V3, hV5open, hV3open, hV5center, hV3center, hVdisjoint, hV5mem, hV3mem⟩ := supportRegion_slices isOpen_R5_continuousCertificate (centeredPoint_mem_R5 (3 / 10) (by norm_num) (by norm_num)) three_output_region.1 three_output_region.2.1 obtain ⟨D3, hD3open, hD3center, hD3distinct⟩ := exists_lowMean_r3_distinctScore_neighborhood let slice : ℝ × ℝ → RegionParameter := fun μ => ((3 / 10 : ℝ), μ.1, μ.2, log 3) let U3 : Set (ℝ × ℝ) := V3 ∩ slice ⁻¹' D3 have hslice : Continuous slice := by fun_prop refine ⟨V5, U3, hV5open, hV3open.inter (hD3open.preimage hslice), hV5center, ⟨hV3center, hD3center⟩, ?_, ?_, ?_⟩ · rw [Set.disjoint_left] intro μ hμ5 hμ3 exact Set.disjoint_left.mp hVdisjoint hμ5 hμ3.1 · intro μ hμ have hx := hV5mem μ hμ refine ⟨?_, optimalCardinality_of_mem_R5 (3 / 10) μ.1 μ.2 (log 3) hx⟩ simpa [r5Active] using uniqueOptimalSupport_of_mem_R5 (3 / 10) μ.1 μ.2 (log 3) hx · intro μ hμ have hx := hV3mem μ hμ.1 have hd := hD3distinct (slice μ) hμ.2 refine ⟨uniqueOptimalSupport_of_mem_R3 (3 / 10) μ.1 μ.2 hx, optimalCardinality_of_mem_R3_of_distinct (3 / 10) μ.1 μ.2 hx ?_⟩ simpa [slice] using hd
CausalSmith.Stat.LdpAteEfficiencySurface.support_transition · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TSupportTransition.lean:261
CausalSmith.Stat.STAT_LdpAteEfficiencySurface_Research.TThreeOutputRegion 27 declarations At the low-mean point, the exact primal and dual values certify a unique three-ray optimum and its open neighborhood.

Three-output rational certificate

At the low-mean point, the exact primal and dual values certify a unique three-ray optimum and its open neighborhood.

theorem threeMaskWeights_feasible

Under the supplied quantities and conditions, the three mask weights feasible assertion holds. Under the stated assumptions, the three Mask Weights feasible.

Formal statement
ε :
ℝ
hε :
0 < ε
staircaseFeasible ε (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (exp ε + 2)⁻¹ else 0)
Proof (Lean source)
lemma threeMaskWeights_feasible (ε : ℝ) (hε : 0 < ε) : staircaseFeasible ε (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (exp ε + 2)⁻¹ else 0) := by constructor · intro s change 0 ≤ (if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (exp ε + 2)⁻¹ else 0) split_ifs <;> positivity · intro j have hd : exp ε + 2 ≠ 0 := by positivity fin_cases j <;> simp +decide [staircaseMatrix, patternRay, patternContains, privacyIncrement, privacyRatio, Fin.sum_univ_succ] <;> field_simp <;> ring
CausalSmith.Stat.LdpAteEfficiencySurface.threeMaskWeights_feasible · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:18
theorem threeMaskWeights_unique

Under the supplied quantities and conditions, the three mask weights unique assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the three Mask Weights unique.

Formal statement
ε :
ℝ
hε :
0 < ε
hα :
hsupp :
staircaseSupport α = ({0, 5, 7} : Finset (Fin 14))
α = fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (exp ε + 2)⁻¹ else 0
Proof (Lean source)
lemma threeMaskWeights_unique (ε : ℝ) (hε : 0 < ε) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (hsupp : staircaseSupport α = ({0, 5, 7} : Finset (Fin 14))) : α = fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (exp ε + 2)⁻¹ else 0 := by have hzero (s : Fin 14) (hs : s ∉ ({0, 5, 7} : Finset (Fin 14))) : α s = 0 := by by_contra hn have hm : s ∈ staircaseSupport α := by simp [staircaseSupport, hn] rw [hsupp] at hm exact hs hm have h0 := hα.2 0 have h1 := hα.2 1 have h3 := hα.2 3 simp +decide [staircaseMatrix, patternRay, patternContains, privacyIncrement, privacyRatio, Fin.sum_univ_succ, hzero] at h0 h1 h3 have hr : exp ε ≠ 1 := ne_of_gt ((Real.one_lt_exp_iff).2 hε) have heq05 : α 0 = α 5 := by have hx : (exp ε - 1) * (α 0 - α 5) = 0 := by linear_combination h0 - h1 exact sub_eq_zero.mp ((mul_eq_zero.mp hx).resolve_left (sub_ne_zero.mpr hr)) have heq57 : α 5 = α 7 := by have hx : (exp ε - 1) * (α 5 - α 7) = 0 := by linear_combination h1 - h3 exact sub_eq_zero.mp ((mul_eq_zero.mp hx).resolve_left (sub_ne_zero.mpr hr)) have he : exp ε + 2 ≠ 0 := by positivity have hα0 : α 0 = (exp ε + 2)⁻¹ := by field_simp rw [← heq05, ← heq57, ← heq05] at h0 nlinarith have hα5 : α 5 = (exp ε + 2)⁻¹ := by exact heq05.symm.trans hα0 have hα7 : α 7 = (exp ε + 2)⁻¹ := by exact heq57.symm.trans hα5 funext s by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · have hcases : s = 0 ∨ s = 5 ∨ s = 7 := by simpa using hs rcases hcases with rfl | rfl | rfl · simpa using hα0 · simpa using hα5 · simpa using hα7 · simp [hs, hzero s hs]
CausalSmith.Stat.LdpAteEfficiencySurface.threeMaskWeights_unique · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:38
theorem threeMaskWeights_support

the three mask weights support assertion holds.

Formal statement
ε :
ℝ
staircaseSupport (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (exp ε + 2)⁻¹ else 0)
= ({0, 5, 7} : Finset (Fin 14))
Proof (Lean source)
lemma threeMaskWeights_support (ε : ℝ) : staircaseSupport (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (exp ε + 2)⁻¹ else 0) = ({0, 5, 7} : Finset (Fin 14)) := by ext s simp only [staircaseSupport, mem_filter, Finset.mem_univ, true_and] by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · simp [hs, ne_of_gt (inv_pos.mpr (by positivity : 0 < exp ε + 2))] · simp [hs]
CausalSmith.Stat.LdpAteEfficiencySurface.threeMaskWeights_support · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:86
theorem threeMaskWeights_continuous Lemma threeMaskWeights_continuous in the paper ↗

the three mask weights continuous assertion holds.

Formal statement
Continuous (fun ε : ℝ => (fun s : Fin 14 => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (exp ε + 2)⁻¹ else (0 : ℝ)))
Proof (Lean source)
lemma threeMaskWeights_continuous : Continuous (fun ε : ℝ => (fun s : Fin 14 => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (exp ε + 2)⁻¹ else (0 : ℝ))) := by apply continuous_pi intro s by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · simp only [hs, ite_true] convert ((Real.continuous_exp.add continuous_const).inv₀ (fun ε => ne_of_gt (by positivity : 0 < exp ε + 2))) using 1 funext ε rfl · simpa [hs] using (continuous_const : Continuous fun _ : ℝ => (0 : ℝ))
CausalSmith.Stat.LdpAteEfficiencySurface.threeMaskWeights_continuous · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:99
theorem lowMeanCandidate_feasible

the low mean candidate feasible assertion holds.

Formal statement
∃ α : StaircaseWeight,
staircaseSupport α = ({0, 5, 7} : Finset (Fin 14))
conclusion 1
s ∈ ({0, 5, 7} : Finset (Fin 14)) :
α s = (1 / 5 : ℝ)
Proof (Lean source)
lemma lowMeanCandidate_feasible : ∃ α : StaircaseWeight, staircaseFeasible (log 3) α ∧ staircaseSupport α = ({0, 5, 7} : Finset (Fin 14)) ∧ ∀ s ∈ ({0, 5, 7} : Finset (Fin 14)), α s = (1 / 5 : ℝ) := by let α : StaircaseWeight := fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0 refine ⟨α, ⟨?_, ?_⟩, ?_, ?_⟩ · have h := (threeMaskWeights_feasible (log 3) (Real.log_pos (by norm_num : (1 : ℝ) < 3))).1 simpa [α, Real.exp_log (by norm_num : (0 : ℝ) < 3), show (3 + 2 : ℝ)⁻¹ = 1 / 5 by norm_num] using h · have h := (threeMaskWeights_feasible (log 3) (Real.log_pos (by norm_num : (1 : ℝ) < 3))).2 simpa [α, Real.exp_log (by norm_num : (0 : ℝ) < 3), show (3 + 2 : ℝ)⁻¹ = 1 / 5 by norm_num] using h · simpa [α, Real.exp_log (by norm_num : (0 : ℝ) < 3), show (3 + 2 : ℝ)⁻¹ = 1 / 5 by norm_num] using threeMaskWeights_support (log 3) · intro s hs simp only [α, if_pos hs]
CausalSmith.Stat.LdpAteEfficiencySurface.lowMeanCandidate_feasible · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:115
theorem lowMeanCandidate_information_value

the low mean candidate information value assertion holds.

Formal statement
informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0) (-(339 / 9985 : ℝ))
= 441 / 3994
Proof (Lean source)
lemma lowMeanCandidate_information_value : informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0) (-(339 / 9985 : ℝ)) = 441 / 3994 := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have hpi (j : Fin 4) : piTheta (fun _ => (1 / 10 : ℝ)) (3 / 10) j = if j.val = 0 then 63 / 100 else if j.val = 1 then 7 / 100 else if j.val = 2 then 27 / 100 else 3 / 100 := by rcases j with ⟨j, hj⟩ interval_cases j <;> norm_num [piTheta, controlProb] <;> rfl have hpi0 := hpi 0 have hpi1 := hpi 1 have hpi2 := hpi 2 have hpi3 := hpi 3 norm_num at hpi0 hpi1 hpi2 hpi3 simp +decide [informationObjective, patternInformation, projectedGradient, patternGradient, patternMass, patternRay, patternContains, privacyIncrement, privacyRatio, controlProb, direction, he, Fin.sum_univ_succ] simp only [show (10⁻¹ : ℝ) = 1 / 10 by norm_num, hpi0, hpi1, hpi2, hpi3] norm_num
CausalSmith.Stat.LdpAteEfficiencySurface.lowMeanCandidate_information_value · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:138
theorem lowMeanCandidate_stationary Lemma lowMeanCandidate_stationary in the paper ↗

the low mean candidate stationary assertion holds.

Formal statement
(∑ s : Fin 14, (if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (1 / 5 : ℝ) else 0) * patternInformationSlope (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s (-(339 / 9985 : ℝ)))
= 0
Proof (Lean source)
lemma lowMeanCandidate_stationary : (∑ s : Fin 14, (if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (1 / 5 : ℝ) else 0) * patternInformationSlope (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s (-(339 / 9985 : ℝ))) = 0 := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have hpi (j : Fin 4) : piTheta (fun _ => (1 / 10 : ℝ)) (3 / 10) j = if j.val = 0 then 63 / 100 else if j.val = 1 then 7 / 100 else if j.val = 2 then 27 / 100 else 3 / 100 := by rcases j with ⟨j, hj⟩ interval_cases j <;> norm_num [piTheta, controlProb] <;> rfl have hpi0 := hpi 0 have hpi1 := hpi 1 have hpi2 := hpi 2 have hpi3 := hpi 3 norm_num at hpi0 hpi1 hpi2 hpi3 simp +decide [patternInformationSlope, projectedGradient, patternGradient, patternMass, patternRay, patternContains, privacyIncrement, privacyRatio, controlProb, direction, he, Fin.sum_univ_succ] simp only [show (10⁻¹ : ℝ) = 1 / 10 by norm_num, hpi0, hpi1, hpi2, hpi3] norm_num
CausalSmith.Stat.LdpAteEfficiencySurface.lowMeanCandidate_stationary · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:165
theorem lowMeanCandidate_global_min

Under the supplied quantities and conditions, the low mean candidate global min assertion holds.

Formal statement
t :
ℝ
(441 / 3994 : ℝ)
≤ informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0) t
Proof (Lean source)
lemma lowMeanCandidate_global_min (t : ℝ) : (441 / 3994 : ℝ) ≤ informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0) t := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have hpi (j : Fin 4) : piTheta (fun _ => (1 / 10 : ℝ)) (3 / 10) j = if j.val = 0 then 63 / 100 else if j.val = 1 then 7 / 100 else if j.val = 2 then 27 / 100 else 3 / 100 := by rcases j with ⟨j, hj⟩ interval_cases j <;> norm_num [piTheta, controlProb] <;> rfl have hpi0 := hpi 0 have hpi1 := hpi 1 have hpi2 := hpi 2 have hpi3 := hpi 3 norm_num at hpi0 hpi1 hpi2 hpi3 simp +decide [informationObjective, patternInformation, projectedGradient, patternGradient, patternMass, patternRay, patternContains, privacyIncrement, privacyRatio, controlProb, direction, he, Fin.sum_univ_succ] simp only [show (10⁻¹ : ℝ) = 1 / 10 by norm_num, hpi0, hpi1, hpi2, hpi3] norm_num at * nlinarith [sq_nonneg (t + 339 / 9985)]
CausalSmith.Stat.LdpAteEfficiencySurface.lowMeanCandidate_global_min · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:192

The fixed dual certificate for the low-mean three-output region is the displayed object.

Definition (Lean source)
lowMeanDual :
Fin 4 → ℝ
![-(21817593 / 398800900 : ℝ), (32820291 / 8773619800 : ℝ), (509870781 / 8773619800 : ℝ), (41183667 / 398800900 : ℝ)]
CausalSmith.Stat.LdpAteEfficiencySurface.lowMeanDual · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:220
theorem lowMeanDual_value

Under the supplied quantities and conditions, the low mean dual value assertion holds. The low Mean Dual value.

Formal statement
(∑ j : Fin 4, lowMeanDual j) = (441 / 3994 : ℝ)
Proof (Lean source)
lemma lowMeanDual_value : (∑ j : Fin 4, lowMeanDual j) = (441 / 3994 : ℝ) := by norm_num [lowMeanDual, Fin.sum_univ_succ]
CausalSmith.Stat.LdpAteEfficiencySurface.lowMeanDual_value · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:229
theorem lowMeanDual_slack

Under the supplied quantities and conditions, the low mean dual slack assertion holds.

Formal statement
s :
Fin 14
if s ∈ ({0, 5, 7} : Finset (Fin 14)) then dualRay (log 3) lowMeanDual s
= patternInformation (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s (-(339 / 9985 : ℝ)) else patternInformation (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s (-(339 / 9985 : ℝ)) < dualRay (log 3) lowMeanDual s
Proof (Lean source)
lemma lowMeanDual_slack (s : Fin 14) : (if s ∈ ({0, 5, 7} : Finset (Fin 14)) then dualRay (log 3) lowMeanDual s = patternInformation (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s (-(339 / 9985 : ℝ)) else patternInformation (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s (-(339 / 9985 : ℝ)) < dualRay (log 3) lowMeanDual s) := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have hpi (j : Fin 4) : piTheta (fun _ => (1 / 10 : ℝ)) (3 / 10) j = if j.val = 0 then 63 / 100 else if j.val = 1 then 7 / 100 else if j.val = 2 then 27 / 100 else 3 / 100 := by rcases j with ⟨j, hj⟩ interval_cases j <;> norm_num [piTheta, controlProb] <;> rfl have hpi0 := hpi 0 have hpi1 := hpi 1 have hpi2 := hpi 2 have hpi3 := hpi 3 norm_num at hpi0 hpi1 hpi2 hpi3 fin_cases s <;> simp +decide [dualRay, lowMeanDual, patternInformation, projectedGradient, patternGradient, patternMass, patternRay, patternContains, controlProb, privacyIncrement, privacyRatio, direction, he, Fin.sum_univ_succ] <;> (try simp only [show (10⁻¹ : ℝ) = 1 / 10 by norm_num, hpi0, hpi1, hpi2, hpi3]) <;> norm_num
CausalSmith.Stat.LdpAteEfficiencySurface.lowMeanDual_slack · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:237
theorem lowMeanPoint_mem_R3

the low mean point mem r3 assertion holds.

Formal statement
((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3) ∈ R3
Proof (Lean source)
lemma lowMeanPoint_mem_R3 : ((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3) ∈ R3 := by simp only [R3, certifiedRegion, Set.mem_ofPred_eq] refine ⟨by norm_num, by norm_num, by norm_num, by norm_num, by norm_num, by norm_num, Real.log_pos (by norm_num), ?_⟩ obtain ⟨α, hfeas, hsupp, hweight⟩ := lowMeanCandidate_feasible refine ⟨α, -(339 / 9985 : ℝ), lowMeanDual, ?_⟩ have hθ : (fun k : Fin 2 => if k = 0 then (1 / 10 : ℝ) else 1 / 10) = (fun _ => (1 / 10 : ℝ)) := by funext k split_ifs <;> rfl rw [hθ] refine ⟨hfeas, ?_, ?_, ?_, ?_, ?_, ?_⟩ · intro s change α s ≠ 0 ↔ s ∈ ({0, 5, 7} : Finset (Fin 14)) have h := congrArg (fun K : Finset (Fin 14) => s ∈ K) hsupp simpa [staircaseSupport] using h · intro s hs rw [hweight s hs] norm_num · have hα : α = (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (1 / 5 : ℝ) else 0) := by funext s by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · simpa [hs] using hweight s hs · have hzero : α s = 0 := by by_contra hn have hm : s ∈ staircaseSupport α := by simp [staircaseSupport, hn] rw [hsupp] at hm exact hs hm simp [hs, hzero] rw [hα] exact lowMeanCandidate_stationary · intro s hs simpa [hs] using lowMeanDual_slack s · intro s hs simpa [hs] using lowMeanDual_slack s · simp
CausalSmith.Stat.LdpAteEfficiencySurface.lowMeanPoint_mem_R3 · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:269
theorem feasible_dualRay_sum

the feasible dual ray sum assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the feasible dual Ray sum.

Formal statement
ε :
ℝ
hα :
η :
Fin 4 → ℝ
(∑ s : Fin 14, α s * dualRay ε η s) = ∑ j : Fin 4, η j
Proof (Lean source)
lemma feasible_dualRay_sum (ε : ℝ) (α : StaircaseWeight) (hα : staircaseFeasible ε α) (η : Fin 4 → ℝ) : (∑ s : Fin 14, α s * dualRay ε η s) = ∑ j : Fin 4, η j := by simp only [dualRay, Finset.mul_sum] rw [Finset.sum_comm] simp_rw [← mul_assoc, ← Finset.sum_mul] change (∑ j : Fin 4, staircaseMatrix ε α j * η j) = ∑ j : Fin 4, η j simp only [hα.2, one_mul]
CausalSmith.Stat.LdpAteEfficiencySurface.feasible_dualRay_sum · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:311
theorem lowMean_dual_upper_bound

the low mean dual upper bound assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the low Mean dual upper bound.

Formal statement
informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) β (-(339 / 9985 : ℝ))
≤ 441 / 3994
Proof (Lean source)
lemma lowMean_dual_upper_bound (β : StaircaseWeight) (hβ : staircaseFeasible (log 3) β) : informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) β (-(339 / 9985 : ℝ)) ≤ 441 / 3994 := by have hpoint (s : Fin 14) : patternInformation (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s (-(339 / 9985 : ℝ)) ≤ dualRay (log 3) lowMeanDual s := by by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · have h := lowMeanDual_slack s simp only [if_pos hs] at h exact le_of_eq h.symm · exact le_of_lt (by simpa [hs] using lowMeanDual_slack s) calc informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) β (-(339 / 9985 : ℝ)) = ∑ s : Fin 14, β s * patternInformation (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s (-(339 / 9985 : ℝ)) := rfl _ ≤ ∑ s : Fin 14, β s * dualRay (log 3) lowMeanDual s := by apply Finset.sum_le_sum intro s _ exact mul_le_mul_of_nonneg_left (hpoint s) (hβ.1 s) _ = 441 / 3994 := by rw [feasible_dualRay_sum _ _ hβ, lowMeanDual_value]
CausalSmith.Stat.LdpAteEfficiencySurface.lowMean_dual_upper_bound · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:324
theorem lowMean_information_nonneg

the low mean information nonneg assertion holds. For the displayed quantities and conditions, these specify the stated inputs. Under the stated assumptions, the low Mean information nonneg.

Formal statement
hβ :
t :
ℝ
0 ≤ informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) β t
Proof (Lean source)
lemma lowMean_information_nonneg (β : StaircaseWeight) (hβ : staircaseFeasible (log 3) β) (t : ℝ) : 0 ≤ informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) β t := by have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have hpi (j : Fin 4) : piTheta (fun _ => (1 / 10 : ℝ)) (3 / 10) j = if j.val = 0 then 63 / 100 else if j.val = 1 then 7 / 100 else if j.val = 2 then 27 / 100 else 3 / 100 := by rcases j with ⟨j, hj⟩ interval_cases j <;> norm_num [piTheta, controlProb] <;> rfl have hm (s : Fin 14) : 0 ≤ patternMass (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s := by unfold patternMass apply Finset.sum_nonneg intro j _ apply mul_nonneg · rw [hpi] split_ifs <;> norm_num · simp only [patternRay, privacyIncrement, privacyRatio, he] split_ifs <;> norm_num unfold informationObjective apply Finset.sum_nonneg intro s _ exact mul_nonneg (hβ.1 s) (div_nonneg (sq_nonneg _) (hm s))
CausalSmith.Stat.LdpAteEfficiencySurface.lowMean_information_nonneg · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:353
theorem lowMeanCandidate_inf_value

the low mean candidate inf value assertion holds.

Formal statement
sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0) t}
= 441 / 3994
Proof (Lean source)
lemma lowMeanCandidate_inf_value : sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0) t} = 441 / 3994 := by let α : StaircaseWeight := fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then 1 / 5 else 0 let S : Set ℝ := {u | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) α t} have hnonempty : S.Nonempty := by refine ⟨informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) α 0, 0, rfl⟩ have hbelow : BddBelow S := by refine ⟨441 / 3994, ?_⟩ rintro u ⟨t, rfl⟩ exact lowMeanCandidate_global_min t change sInf S = 441 / 3994 apply le_antisymm · have hmem : (441 / 3994 : ℝ) ∈ S := by refine ⟨-(339 / 9985 : ℝ), ?_⟩ exact lowMeanCandidate_information_value.symm exact csInf_le hbelow hmem · apply le_csInf hnonempty rintro u ⟨t, rfl⟩ exact lowMeanCandidate_global_min t
CausalSmith.Stat.LdpAteEfficiencySurface.lowMeanCandidate_inf_value · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:385
theorem lowMean_Jstar_value

the low mean jstar value assertion holds.

Formal statement
Jstar (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) = (441 / 3994 : ℝ)
Proof (Lean source)
lemma lowMean_Jstar_value : Jstar (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) = (441 / 3994 : ℝ) := by let θ : TrialParameter := fun _ => (1 / 10 : ℝ) let E : Set ℝ := {z | ∃ β : StaircaseWeight, staircaseFeasible (log 3) β ∧ z = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective θ (3 / 10) (log 3) β t}} have hupper : ∀ z ∈ E, z ≤ (441 / 3994 : ℝ) := by rintro z ⟨β, hβ, rfl⟩ have hbelow : BddBelow {u : ℝ | ∃ t : ℝ, u = informationObjective θ (3 / 10) (log 3) β t} := by refine ⟨0, ?_⟩ rintro u ⟨t, rfl⟩ exact lowMean_information_nonneg β hβ t exact (csInf_le hbelow ⟨-(339 / 9985 : ℝ), rfl⟩).trans (lowMean_dual_upper_bound β hβ) obtain ⟨α, hα, hsupp, hweight⟩ := lowMeanCandidate_feasible have hαeq : α = (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (1 / 5 : ℝ) else 0) := by funext s by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · simpa [hs] using hweight s hs · have hzero : α s = 0 := by by_contra hn have hm : s ∈ staircaseSupport α := by simp [staircaseSupport, hn] rw [hsupp] at hm exact hs hm simp [hs, hzero] have hmem : (441 / 3994 : ℝ) ∈ E := by refine ⟨α, hα, ?_⟩ rw [hαeq] exact lowMeanCandidate_inf_value.symm change sSup E = 441 / 3994 exact le_antisymm (csSup_le ⟨_, hmem⟩ hupper) (le_csSup ⟨_, hupper⟩ hmem)
CausalSmith.Stat.LdpAteEfficiencySurface.lowMean_Jstar_value · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:415
def r3DualTarget

The target vector in the three-output dual system is determined by the displayed parameters.

Definition (Lean source)
r3DualTarget x :
Fin 3 → ℝ
fun i
=> patternInformation (regionTheta x) x.1 x.2.2.2 (r3Mask i) (r3Direction x.1 x.2.1 x.2.2.1 x.2.2.2)
CausalSmith.Stat.LdpAteEfficiencySurface.r3DualTarget · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:457
theorem r3Mask_mem

Under the supplied quantities and conditions, the r3 mask mem assertion holds.

Formal statement
i :
Fin 3
r3Mask i ∈ ({0, 5, 7} : Finset (Fin 14))
Proof (Lean source)
lemma r3Mask_mem (i : Fin 3) : r3Mask i ∈ ({0, 5, 7} : Finset (Fin 14)) := by fin_cases i <;> simp [r3Mask]
theorem exists_local_r3Dual_of_mem

Under the supplied quantities and conditions, the exists local r3 dual of mem assertion holds.

Formal statement
hx :
x ∈ R3
∃ η : RegionParameter → Fin 4 → ℝ,
conclusion 1
s ∉ ({0,5,7} : Finset (Fin 14)) :
patternInformation (regionTheta x) x.1 x.2.2.2 s (r3Direction x.1 x.2.1 x.2.2.1 x.2.2.2) < dualRay x.2.2.2 (η x) s
conclusion 2
∀ᶠ y in nhds x, mulVec (r3DualMatrix y) (η y) = r3DualTarget y
Proof (Lean source)
lemma exists_local_r3Dual_of_mem (x : RegionParameter) (hx : x ∈ R3) : ∃ η : RegionParameter → Fin 4 → ℝ, ContinuousAt η x ∧ (∀ s ∉ ({0,5,7} : Finset (Fin 14)), patternInformation (regionTheta x) x.1 x.2.2.2 s (r3Direction x.1 x.2.1 x.2.2.1 x.2.2.2) < dualRay x.2.2.2 (η x) s) ∧ ∀ᶠ y in nhds x, mulVec (r3DualMatrix y) (η y) = r3DualTarget y := by rcases x with ⟨p, μ0, μ1, ε⟩ change 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < ε ∧ ∃ α, ∃ t, ∃ η, staircaseFeasible ε α ∧ activeSupport α ({0,5,7} : Finset (Fin 14)) ∧ (∀ s ∈ ({0,5,7} : Finset (Fin 14)), 0 < α s) ∧ (∑ s, α s * patternInformationSlope (fun k => if k=0 then μ0 else μ1) p ε s t) = 0 ∧ (∀ s ∈ ({0,5,7} : Finset (Fin 14)), dualRay ε η s = patternInformation (fun k => if k=0 then μ0 else μ1) p ε s t) ∧ (∀ s ∉ ({0,5,7} : Finset (Fin 14)), patternInformation (fun k => if k=0 then μ0 else μ1) p ε s t < dualRay ε η s) ∧ _ at hx rcases hx with ⟨hp0,hp1,hm00,hm01,hm10,hm11,hε,α,t,η,hα,hsupp,_,hstat,hactive,hinactive,_⟩ have hsupp' : staircaseSupport α = ({0,5,7} : Finset (Fin 14)) := by ext s simpa [staircaseSupport] using hsupp s have hαeq := threeMaskWeights_unique ε hε α hα hsupp' have hstat' : r3Stationarity p μ0 μ1 ε t = 0 := by rw [r3Stationarity] rw [← hstat] apply Finset.sum_congr rfl intro s _ rw [hαeq] rfl have hc : r3StationarityCoeff p μ0 μ1 ε ≠ 0 := ne_of_gt (r3StationarityCoeff_pos p μ0 μ1 ε hp0 hp1 hm00 hm01 hm10 hm11 hε) have hdir0 := r3Stationarity_r3Direction_eq_zero p μ0 μ1 ε hc rw [r3Stationarity_affine] at hstat' hdir0 have ht : t = r3Direction p μ0 μ1 ε := by have hm : (t - r3Direction p μ0 μ1 ε) * r3StationarityCoeff p μ0 μ1 ε = 0 := by linarith exact sub_eq_zero.mp ((mul_eq_zero.mp hm).resolve_right hc) let x : RegionParameter := (p,μ0,μ1,ε) have hmass (s : Fin 14) : patternMass (regionTheta x) x.1 x.2.2.2 s ≠ 0 := ne_of_gt (patternMass_pos_of_interior p μ0 μ1 ε hp0 hp1 hm00 hm01 hm10 hm11 s) have htdir := continuousAt_r3Direction_region x hmass hc have hb : ContinuousAt r3DualTarget x := by apply (continuousAt_pi).2 intro i exact continuousAt_patternInformation_region (r3Mask i) (fun y => r3Direction y.1 y.2.1 y.2.2.1 y.2.2.2) x htdir (hmass _) have hy : mulVec (r3DualMatrix x) η = r3DualTarget x := by funext i have ha := hactive (r3Mask i) (r3Mask_mem i) have htheta : regionTheta x = (fun k => if k = 0 then μ0 else μ1) := by funext k fin_cases k <;> rfl change (r3DualMatrix x).mulVec η i = patternInformation (regionTheta x) p ε (r3Mask i) (r3Direction p μ0 μ1 ε) rw [htheta] simpa [x, r3DualTarget, r3DualMatrix, mulVec, dotProduct, dualRay, ht, mul_comm] using ha have hR := r3DualMatrix_mul_rightInverse x hε obtain ⟨hcont, hbase, hev⟩ := exists_eventually_anchoredSolution_of_rightInverse r3DualMatrix r3DualTarget (r3DualRightInverse ε) x η continuous_r3DualMatrix.continuousAt hb hR hy let ηlocal := anchoredSolution r3DualMatrix r3DualTarget (r3DualRightInverse ε) η refine ⟨ηlocal, hcont, ?_, hev⟩ intro s hs have htheta : regionTheta x = (fun k => if k = 0 then μ0 else μ1) := by funext k fin_cases k <;> rfl dsimp only [ηlocal] rw [hbase, htheta] simpa [x, ht] using hinactive s hs
CausalSmith.Stat.LdpAteEfficiencySurface.exists_local_r3Dual_of_mem · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:467
theorem lowMean_r3Direction_eq

the low mean r3 direction eq assertion holds.

Formal statement
r3Direction (3 / 10) (1 / 10) (1 / 10) (log 3) = -(339 / 9985 : ℝ)
Proof (Lean source)
lemma lowMean_r3Direction_eq : r3Direction (3 / 10) (1 / 10) (1 / 10) (log 3) = -(339 / 9985 : ℝ) := by have hc : r3StationarityCoeff (3 / 10) (1 / 10) (1 / 10) (log 3) ≠ 0 := ne_of_gt (r3StationarityCoeff_pos _ _ _ _ (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) (Real.log_pos (by norm_num))) have hnew := r3Stationarity_r3Direction_eq_zero _ _ _ _ hc have hold : r3Stationarity (3 / 10) (1 / 10) (1 / 10) (log 3) (-(339 / 9985 : ℝ)) = 0 := by convert lowMeanCandidate_stationary using 1 <;> norm_num [r3Stationarity, r3Weight, Real.exp_log (by norm_num : (0 : ℝ) < 3)] rw [r3Stationarity_affine] at hnew hold have hm : (r3Direction (3 / 10) (1 / 10) (1 / 10) (log 3) - (-(339 / 9985 : ℝ))) * r3StationarityCoeff (3 / 10) (1 / 10) (1 / 10) (log 3) = 0 := by linarith exact sub_eq_zero.mp ((mul_eq_zero.mp hm).resolve_right hc)
CausalSmith.Stat.LdpAteEfficiencySurface.lowMean_r3Direction_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:542
theorem lowMean_r3_projectedScores_distinct

Under the supplied quantities and conditions, the low mean r3 projected scores distinct assertion holds.

Formal statement
i k :
Fin 3
hik :
i ≠ k
projectedScore (regionTheta ((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3)) (3 / 10) (log 3) (r3Mask i) (r3Direction (3 / 10) (1 / 10) (1 / 10) (log 3))
≠ projectedScore (regionTheta ((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3)) (3 / 10) (log 3) (r3Mask k) (r3Direction (3 / 10) (1 / 10) (1 / 10) (log 3))
Proof (Lean source)
lemma lowMean_r3_projectedScores_distinct (i k : Fin 3) (hik : i ≠ k) : projectedScore (regionTheta ((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3)) (3 / 10) (log 3) (r3Mask i) (r3Direction (3 / 10) (1 / 10) (1 / 10) (log 3)) ≠ projectedScore (regionTheta ((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3)) (3 / 10) (log 3) (r3Mask k) (r3Direction (3 / 10) (1 / 10) (1 / 10) (log 3)) := by have hpi (j : Fin 4) : piTheta (fun _ => (1 / 10 : ℝ)) (3 / 10) j = if j.val = 0 then 63 / 100 else if j.val = 1 then 7 / 100 else if j.val = 2 then 27 / 100 else 3 / 100 := by rcases j with ⟨j, hj⟩ interval_cases j <;> norm_num [piTheta, controlProb] <;> rfl have hpi0 := hpi 0 have hpi1 := hpi 1 have hpi2 := hpi 2 have hpi3 := hpi 3 norm_num at hpi0 hpi1 hpi2 hpi3 have htheta : regionTheta ((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3) = (fun _ => (1 / 10 : ℝ)) := by funext j fin_cases j <;> rfl rw [htheta] rw [lowMean_r3Direction_eq] simp only [projectedScore, patternMass, Fin.sum_univ_succ] simp_rw [hpi] fin_cases i <;> fin_cases k all_goals simp only [Fin.isValue] at hik ⊢ all_goals try contradiction all_goals simp (disch := decide) [regionTheta, r3Mask, projectedScore, projectedGradient, patternGradient, patternMass, patternRay, patternContains, Nat.testBit, privacyIncrement, privacyRatio, controlProb, direction, Real.exp_log (by norm_num : (0 : ℝ) < 3), Fin.sum_univ_succ] <;> norm_num [piTheta, controlProb]
CausalSmith.Stat.LdpAteEfficiencySurface.lowMean_r3_projectedScores_distinct · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:563
def r3ProjectedScoreAt

The projected score coordinate in the three-output region is determined by the displayed parameters.

Definition (Lean source)
i :
Fin 3
r3ProjectedScoreAt x i :
ℝ
projectedScore (regionTheta x) x.1 x.2.2.2 (r3Mask i) (r3Direction x.1 x.2.1 x.2.2.1 x.2.2.2)
CausalSmith.Stat.LdpAteEfficiencySurface.r3ProjectedScoreAt · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:604
theorem r3ProjectedScoreAt_eq

Under the supplied quantities and conditions, the r3 projected score at eq assertion holds.

Formal statement
i :
Fin 3
= projectedScore (regionTheta x) x.1 x.2.2.2 (r3Mask i) (r3Direction x.1 x.2.1 x.2.2.1 x.2.2.2)
Proof (Lean source)
lemma r3ProjectedScoreAt_eq (x : RegionParameter) (i : Fin 3) : r3ProjectedScoreAt x i = projectedScore (regionTheta x) x.1 x.2.2.2 (r3Mask i) (r3Direction x.1 x.2.1 x.2.2.1 x.2.2.2) := rfl
CausalSmith.Stat.LdpAteEfficiencySurface.r3ProjectedScoreAt_eq · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:609
theorem exists_lowMean_r3_distinctScore_neighborhood

the exists low mean r3 distinct score neighborhood assertion holds.

Formal statement
((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3) ∈ U
conclusion 1
x ∈ U :
i k :
Fin 3
i ≠ k
Proof (Lean source)
lemma exists_lowMean_r3_distinctScore_neighborhood : ∃ U : Set RegionParameter, IsOpen U ∧ ((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3) ∈ U ∧ ∀ x ∈ U, ∀ i k : Fin 3, i ≠ k → r3ProjectedScoreAt x i ≠ r3ProjectedScoreAt x k := by let x0 : RegionParameter := ((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3) have hm (s : Fin 14) : patternMass (regionTheta x0) x0.1 x0.2.2.2 s ≠ 0 := ne_of_gt (patternMass_pos_of_interior _ _ _ _ (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) s) have hc : r3StationarityCoeff x0.1 x0.2.1 x0.2.2.1 x0.2.2.2 ≠ 0 := ne_of_gt (r3StationarityCoeff_pos _ _ _ _ (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) (by norm_num) (Real.log_pos (by norm_num))) have ht := continuousAt_r3Direction_region x0 hm hc have hs (i : Fin 3) : ContinuousAt (fun x => r3ProjectedScoreAt x i) x0 := by exact continuousAt_projectedScore_region (r3Mask i) (fun x => r3Direction x.1 x.2.1 x.2.2.1 x.2.2.2) x0 ht (hm (r3Mask i)) have hp (i k : Fin 3) (hik : i ≠ k) : ∀ᶠ x in nhds x0, r3ProjectedScoreAt x i ≠ r3ProjectedScoreAt x k := by have hne : r3ProjectedScoreAt x0 i ≠ r3ProjectedScoreAt x0 k := by exact lowMean_r3_projectedScores_distinct i k hik have hd := (hs i).sub (hs k) have hdiff : r3ProjectedScoreAt x0 i - r3ProjectedScoreAt x0 k ≠ 0 := sub_ne_zero.mpr hne filter_upwards [hd.eventually_ne hdiff] with x hx exact sub_ne_zero.mp hx have hev : ∀ᶠ x in nhds x0, ∀ i k : Fin 3, i ≠ k → r3ProjectedScoreAt x i ≠ r3ProjectedScoreAt x k := by filter_upwards [hp 0 1 (by decide), hp 0 2 (by decide), hp 1 0 (by decide), hp 1 2 (by decide), hp 2 0 (by decide), hp 2 1 (by decide)] with x h01 h02 h10 h12 h20 h21 intro i k hik fin_cases i <;> fin_cases k <;> simp_all rcases mem_nhds_iff.mp hev with ⟨U, hUsub, hUopen, hx0⟩ exact ⟨U, hUopen, hx0, fun x hx => hUsub hx⟩
CausalSmith.Stat.LdpAteEfficiencySurface.exists_lowMean_r3_distinctScore_neighborhood · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:614
theorem isOpen_R3_continuousCertificate

the is open r3 continuous certificate assertion holds.

Formal statement
Proof (Lean source)
lemma isOpen_R3_continuousCertificate : IsOpen R3 := by rw [isOpen_iff_mem_nhds] intro x hx obtain ⟨η, hη, hbaseslack, heq⟩ := exists_local_r3Dual_of_mem x hx rcases x with ⟨p, μ0, μ1, ε⟩ change 0 < p ∧ p < 1 ∧ 0 < μ0 ∧ μ0 < 1 ∧ 0 < μ1 ∧ μ1 < 1 ∧ 0 < ε ∧ _ at hx rcases hx with ⟨hp0,hp1,hm00,hm01,hm10,hm11,hε,α,t,η0,hα,hsupp,hpos,hstat,hactive,hinactive,_⟩ let x0 : RegionParameter := (p,μ0,μ1,ε) have hmass (s : Fin 14) : patternMass (regionTheta x0) x0.1 x0.2.2.2 s ≠ 0 := ne_of_gt (patternMass_pos_of_interior p μ0 μ1 ε hp0 hp1 hm00 hm01 hm10 hm11 s) have hc : r3StationarityCoeff p μ0 μ1 ε ≠ 0 := ne_of_gt (r3StationarityCoeff_pos p μ0 μ1 ε hp0 hp1 hm00 hm01 hm10 hm11 hε) have ht := continuousAt_r3Direction_region x0 hmass hc have hinfo (s : Fin 14) : ContinuousAt (fun y : RegionParameter => patternInformation (regionTheta y) y.1 y.2.2.2 s (r3Direction y.1 y.2.1 y.2.2.1 y.2.2.2)) x0 := continuousAt_patternInformation_region s _ x0 ht (hmass s) have hdual (s : Fin 14) : ContinuousAt (fun y : RegionParameter => dualRay y.2.2.2 (η y) s) x0 := by have hηj (j : Fin 4) : ContinuousAt (fun y => η y j) x0 := (continuousAt_pi.mp hη) j unfold dualRay let f := fun j : Fin 4 => fun y : RegionParameter => patternRay y.2.2.2 s j * η y j have hf (j : Fin 4) : ContinuousAt (f j) x0 := (continuous_patternRay_region s j).continuousAt.mul (hηj j) have hsum : ∀ S : Finset (Fin 4), ContinuousAt (fun y => ∑ j ∈ S, f j y) x0 := by intro S induction S using Finset.induction_on with | empty => simpa using (continuousAt_const : ContinuousAt (fun _ : RegionParameter => (0 : ℝ)) x0) | @insert a S ha ih => simp only [Finset.sum_insert ha] change ContinuousAt (fun y => f a y + ∑ j ∈ S, f j y) x0 exact (hf a).add ih simpa [f] using hsum Finset.univ have hslack : ∀ᶠ y in nhds x0, ∀ s : Fin 14, s ∉ ({0,5,7} : Finset (Fin 14)) → patternInformation (regionTheta y) y.1 y.2.2.2 s (r3Direction y.1 y.2.1 y.2.2.1 y.2.2.2) < dualRay y.2.2.2 (η y) s := by have hall : ∀ᶠ y in nhds x0, ∀ s ∈ (Finset.univ : Finset (Fin 14)), s ∉ ({0,5,7} : Finset (Fin 14)) → patternInformation (regionTheta y) y.1 y.2.2.2 s (r3Direction y.1 y.2.1 y.2.2.1 y.2.2.2) < dualRay y.2.2.2 (η y) s := (eventually_all_finset (Finset.univ : Finset (Fin 14))).2 fun s _ => by by_cases hs : s ∈ ({0,5,7} : Finset (Fin 14)) · exact Filter.Eventually.of_forall (fun _ h => False.elim (h hs)) · have hraw := (hinfo s).eventually_lt (hdual s) (by simpa [x0] using hbaseslack s hs) exact hraw.mono fun _ h _ => h exact hall.mono fun _ hy s hs => hy s (Finset.mem_univ s) hs have hbasic : ∀ᶠ y in nhds x0, 0 < y.1 ∧ y.1 < 1 ∧ 0 < y.2.1 ∧ y.2.1 < 1 ∧ 0 < y.2.2.1 ∧ y.2.2.1 < 1 ∧ 0 < y.2.2.2 := by filter_upwards [continuousAt_const.eventually_lt continuousAt_fst hp0, continuousAt_fst.eventually_lt continuousAt_const hp1, continuousAt_const.eventually_lt continuousAt_snd.fst hm00, continuousAt_snd.fst.eventually_lt continuousAt_const hm01, continuousAt_const.eventually_lt continuousAt_snd.snd.fst hm10, continuousAt_snd.snd.fst.eventually_lt continuousAt_const hm11, continuousAt_const.eventually_lt continuousAt_snd.snd.snd hε] with y yp0 yp1 ym00 ym01 ym10 ym11 yε exact ⟨yp0,yp1,ym00,ym01,ym10,ym11,yε⟩ filter_upwards [heq, hslack, hbasic] with y hyeq hyslack hybasic rcases y with ⟨q,ν0,ν1,δ⟩ rcases hybasic with ⟨hq0,hq1,hν00,hν01,hν10,hν11,hδ⟩ change 0 < q ∧ q < 1 ∧ 0 < ν0 ∧ ν0 < 1 ∧ 0 < ν1 ∧ ν1 < 1 ∧ 0 < δ ∧ _ refine ⟨hq0,hq1,hν00,hν01,hν10,hν11,hδ, r3Weight δ, r3Direction q ν0 ν1 δ, η (q,ν0,ν1,δ), ?_⟩ have hfeas := threeMaskWeights_feasible δ hδ have hsuppw := threeMaskWeights_support δ refine ⟨hfeas, ?_, ?_, ?_, ?_, ?_, by simp⟩ · intro s by_cases hs : s ∈ ({0,5,7} : Finset (Fin 14)) · simp [r3Weight, hs] positivity · simp [r3Weight, hs] · intro s hs simp [r3Weight, hs] positivity · exact r3Stationarity_r3Direction_eq_zero q ν0 ν1 δ (ne_of_gt (r3StationarityCoeff_pos q ν0 ν1 δ hq0 hq1 hν00 hν01 hν10 hν11 hδ)) · intro s hs obtain ⟨i, rfl⟩ : ∃ i : Fin 3, r3Mask i = s := by have hcases : s = 0 ∨ s = 5 ∨ s = 7 := by simpa using hs rcases hcases with rfl | rfl | rfl · exact ⟨0, by simp [r3Mask]⟩ · exact ⟨1, by simp [r3Mask]⟩ · exact ⟨2, by simp [r3Mask]⟩ have hi := congrFun hyeq i have htheta : regionTheta (q,ν0,ν1,δ) = (fun k => if k = 0 then ν0 else ν1) := by funext k fin_cases k <;> rfl change (r3DualMatrix (q,ν0,ν1,δ)).mulVec (η (q,ν0,ν1,δ)) i = patternInformation (regionTheta (q,ν0,ν1,δ)) q δ (r3Mask i) (r3Direction q ν0 ν1 δ) at hi rw [htheta] at hi change dualRay δ (η (q,ν0,ν1,δ)) (r3Mask i) = patternInformation (fun k => if k = 0 then ν0 else ν1) q δ (r3Mask i) (r3Direction q ν0 ν1 δ) simpa [r3DualMatrix, r3DualTarget, mulVec, dotProduct, dualRay, mul_comm] using hi · exact hyslack
CausalSmith.Stat.LdpAteEfficiencySurface.isOpen_R3_continuousCertificate · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:654
theorem three_output_region

the three output region assertion holds.

Formal statement
conclusion 1
conclusion 2
((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3) ∈ R3
conclusion 3
∃ α : StaircaseWeight,
staircaseSupport α = ({0, 5, 7} : Finset (Fin 14))
s ∈ ({0, 5, 7} : Finset (Fin 14)) :
α s = (1 / 5 : ℝ)
Jstar (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) α t}
Jstar (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3)
= sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) β t}
β = α
conclusion 4
Jstar (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) = (441 / 3994 : ℝ)
conclusion 5
Vstar (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) = (3994 / 441 : ℝ)
Proof (Lean source)
theorem three_output_region : IsOpen R3 ∧ ((3 / 10 : ℝ), (1 / 10 : ℝ), (1 / 10 : ℝ), log 3) ∈ R3 ∧ (∃ α : StaircaseWeight, staircaseFeasible (log 3) α ∧ staircaseSupport α = ({0, 5, 7} : Finset (Fin 14)) ∧ (∀ s ∈ ({0, 5, 7} : Finset (Fin 14)), α s = (1 / 5 : ℝ)) ∧ Jstar (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) α t} ∧ (∀ β : StaircaseWeight, staircaseFeasible (log 3) β → Jstar (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) = sInf {u : ℝ | ∃ t : ℝ, u = informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) β t} → β = α)) ∧ Jstar (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) = (441 / 3994 : ℝ) ∧ Vstar (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) = (3994 / 441 : ℝ) := by refine ⟨?_, lowMeanPoint_mem_R3, ?_, lowMean_Jstar_value, ?_⟩ · exact isOpen_R3_continuousCertificate · obtain ⟨α, hα, hsupp, hweight⟩ := lowMeanCandidate_feasible refine ⟨α, hα, hsupp, hweight, ?_, ?_⟩ · have hαeq : α = (fun s => if s ∈ ({0, 5, 7} : Finset (Fin 14)) then (1 / 5 : ℝ) else 0) := by funext s by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · simpa [hs] using hweight s hs · have hzero : α s = 0 := by by_contra hn have hm : s ∈ staircaseSupport α := by simp [staircaseSupport, hn] rw [hsupp] at hm exact hs hm simp [hs, hzero] rw [lowMean_Jstar_value, hαeq] exact lowMeanCandidate_inf_value.symm · intro β hβ hopt let t : ℝ := -(339 / 9985) have hbelow : BddBelow {u : ℝ | ∃ x : ℝ, u = informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) β x} := by refine ⟨0, ?_⟩ rintro u ⟨x, rfl⟩ exact lowMean_information_nonneg β hβ x have hge : (441 / 3994 : ℝ) ≤ informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) β t := by rw [← lowMean_Jstar_value, hopt] exact csInf_le hbelow ⟨t, rfl⟩ have hvalue : informationObjective (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) β t = 441 / 3994 := le_antisymm (lowMean_dual_upper_bound β hβ) hge have hsum : (∑ s : Fin 14, β s * patternInformation (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s t) = ∑ s : Fin 14, β s * dualRay (log 3) lowMeanDual s := by calc _ = 441 / 3994 := hvalue _ = ∑ s : Fin 14, β s * dualRay (log 3) lowMeanDual s := by rw [feasible_dualRay_sum _ _ hβ, lowMeanDual_value] have hterm (s : Fin 14) : β s * patternInformation (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s t ≤ β s * dualRay (log 3) lowMeanDual s := by have h := lowMeanDual_slack s by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · simp only [if_pos hs] at h rw [h] · simp only [if_neg hs] at h exact mul_le_mul_of_nonneg_left (le_of_lt h) (hβ.1 s) have hterm_eq (s : Fin 14) : β s * patternInformation (fun _ => (1 / 10 : ℝ)) (3 / 10) (log 3) s t = β s * dualRay (log 3) lowMeanDual s := (Finset.sum_eq_sum_iff_of_le (fun s _ => hterm s)).mp hsum s (Finset.mem_univ s) have hzero (s : Fin 14) (hs : s ∉ ({0, 5, 7} : Finset (Fin 14))) : β s = 0 := by have h := lowMeanDual_slack s simp only [if_neg hs] at h have hn := hβ.1 s by_contra hz have hp : 0 < β s := lt_of_le_of_ne hn (Ne.symm hz) have hlt := mul_lt_mul_of_pos_left h hp exact (ne_of_lt hlt) (hterm_eq s) have he : exp (log (3 : ℝ)) = 3 := Real.exp_log (by norm_num) have h0 := hβ.2 0 have h1 := hβ.2 1 have h3 := hβ.2 3 simp +decide [staircaseMatrix, patternRay, patternContains, privacyIncrement, privacyRatio, he, Fin.sum_univ_succ, hzero] at h0 h1 h3 have hβ0 : β 0 = 1 / 5 := by linarith have hβ5 : β 5 = 1 / 5 := by linarith have hβ7 : β 7 = 1 / 5 := by linarith funext s by_cases hs : s ∈ ({0, 5, 7} : Finset (Fin 14)) · have hcases : s = 0 ∨ s = 5 ∨ s = 7 := by simpa using hs rcases hcases with rfl | rfl | rfl · exact hβ0.trans (hweight 0 (by simp)).symm · exact hβ5.trans (hweight 5 (by simp)).symm · exact hβ7.trans (hweight 7 (by simp)).symm · rw [hzero s hs] have hαzero : α s = 0 := by by_contra hz have hm : s ∈ staircaseSupport α := by simp [staircaseSupport, hz] rw [hsupp] at hm exact hs hm exact hαzero.symm · norm_num [Vstar, lowMean_Jstar_value]
CausalSmith.Stat.LdpAteEfficiencySurface.three_output_region · CausalSmith/Stat/STAT_LdpAteEfficiencySurface_Research/TThreeOutputRegion.lean:761