Formalization: Sharp Ordinal Benefit Bounds for Survivor Compliers under Selection and Noncompliance

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

CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Basic 47 declarations The five-node potential-outcome subsystem, its causal assumptions, and the pointwise and uniform law classes used throughout the paper.

Slate-benefit potential-outcome setup

The five-node potential-outcome subsystem, its causal assumptions, and the pointwise and uniform law classes used throughout the paper.

structure POSlateSystem Definition 1 in the paper ↗

A five-node potential-outcome system for a covariate, binary instrument, received treatment, selection indicator, and finite ordered outcome.

Definition (Lean source)
P :
𝒳 :
Type*
K :
hK :
3 ≤ K
xNode :
P.V
zNode :
P.V
dNode :
P.V
sNode :
P.V
yNode :
P.V
hX :
P.X xNode ≃ᵐ 𝒳
hZ :
P.X zNode ≃ᵐ Bool
hD :
P.X dNode ≃ᵐ Bool
hS :
P.X sNode ≃ᵐ Bool
hY :
P.X yNode ≃ᵐ Fin K
hXZ :
xNode ≠ zNode
hXD :
xNode ≠ dNode
hXS :
xNode ≠ sNode
hXY :
xNode ≠ yNode
hZD :
zNode ≠ dNode
hZS :
zNode ≠ sNode
hZY :
zNode ≠ yNode
hDS :
dNode ≠ sNode
hDY :
dNode ≠ yNode
hSY :
sNode ≠ yNode
borel :
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:25
def xVar

The x var is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
xVar S :
POVar P 𝒳
⟨S.xNode, S.hX⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.xVar · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:55
def zVar

The z var is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
zVar S :
⟨S.zNode, S.hZ⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.zVar · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:57
def dVar

The d var is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
dVar S :
⟨S.dNode, S.hD⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.dVar · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:59
def sVar

The s var is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
sVar S :
⟨S.sNode, S.hS⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.sVar · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:61
def yVar

The y var is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
yVar S :
POVar P (Fin K)
⟨S.yNode, S.hY⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.yVar · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:63
def factualX

The factual x is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
factualX S :
P.Ω → 𝒳
S.xVar.factual
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.factualX · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:66
def factualZ

The factual z is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
factualZ S :
P.Ω → Bool
S.zVar.factual
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.factualZ · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:68
def factualD

The factual d is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
factualD S :
P.Ω → Bool
S.dVar.factual
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.factualD · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:70
def factualS

The factual s is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
factualS S :
P.Ω → Bool
S.sVar.factual
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.factualS · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:72
def factualY

The factual y is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
factualY S :
P.Ω → Fin K
S.yVar.factual
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.factualY · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:74
def DofZ

The dof z is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
z :
DofZ S z :
P.Ω → Bool
S.dVar.cfUnder S.zVar z
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.DofZ · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:77

The d0 is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
D0 S :
P.Ω → Bool
S.DofZ false
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.D0 · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:79

The d1 is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
D1 S :
P.Ω → Bool
S.DofZ true
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.D1 · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:81
def SofD

The sof d is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
d :
SofD S d :
P.Ω → Bool
S.sVar.cfUnder S.dVar d
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.SofD · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:84

The s0 is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
S0 S :
P.Ω → Bool
S.SofD false
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.S0 · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:87

The s1 is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
S1 S :
P.Ω → Bool
S.SofD true
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.S1 · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:90
def YofD

The yof d is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
d :
YofD S d :
P.Ω → Fin K
S.yVar.cfUnder S.dVar d
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.YofD · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:93

The y0 is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
Y0 S :
P.Ω → Fin K
S.YofD false
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.Y0 · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:95

The y1 is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
Y1 S :
P.Ω → Fin K
S.YofD true
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.Y1 · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:97
def xEvent

The x event is the event specified by the stated potential-outcome conditions.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
x :
𝒳
xEvent S x :
Set P.Ω
{ω | S.factualX ω = x}
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.xEvent · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:100

The complier event is the event specified by the stated potential-outcome conditions.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
complierEvent S :
Set P.Ω
{ω | S.DofZ false ω = false ∧ S.DofZ true ω = true}
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.complierEvent · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:103

The p is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
x :
𝒳
p S x :
P.μ.real (S.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.p · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:108

The propensity is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
x :
𝒳
propensity S x :
conditionalReal P.μ {ω | S.factualZ ω = true} (S.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.propensity · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:112
def observedDatum

The observed datum is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
ω :
P.Ω
observedDatum S ω :
clause 1
cell := S.factualX ω
clause 2
instrument := S.factualZ ω
clause 3
treatment := S.factualD ω
clause 4
selected := S.factualS ω
clause 5
outcome := if S.factualS ω then some (S.factualY ω) else none
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.observedDatum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:117

The observed law is the measure produced by the stated finite slate-benefit construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
observedLaw S :
P.μ.map S.observedDatum
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.observedLaw · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:126
def dUnderZ

The d under z is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
z :
dUnderZ S z :
⟨S.dVar, Regime.single S.zNode (S.hZ.symm z)⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.dUnderZ · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:131
def sUnderD

The s under d is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
d :
sUnderD S d :
⟨S.sVar, Regime.single S.dNode (S.hD.symm d)⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.sUnderD · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:135
def yUnderD

The y under d is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
d :
yUnderD S d :
⟨S.yVar, Regime.single S.dNode (S.hD.symm d)⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.yUnderD · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:139
def cfBundle

The cf bundle is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
shared
cfBundle S :
POCFBundle.cons (S.dUnderZ false) <| POCFBundle.cons (S.dUnderZ true) <| POCFBundle.cons (S.sUnderD false) <| POCFBundle.cons (S.sUnderD true) <| POCFBundle.cons (S.yUnderD false) <| POCFBundle.cons (S.yUnderD true) <| POCFBundle.nil P
CausalSmith.PartialID.SlateBenefitPartialTransport.POSlateSystem.cfBundle · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:143
def IVIndependence

The iv independence condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
IVIndependence S :
Prop
P.CondIndepCF (RegimedVar.ofFactual S.zVar) S.cfBundle (RegimedVar.ofFactual S.xVar) P.μ
CausalSmith.PartialID.SlateBenefitPartialTransport.IVIndependence · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:156
def TreatmentConsistency

The treatment consistency condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
TreatmentConsistency S :
Prop
∀ᵐ ω ∂P.μ, S.factualD ω = S.DofZ (S.factualZ ω) ω
CausalSmith.PartialID.SlateBenefitPartialTransport.TreatmentConsistency · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:163
def SelectionExclusion

The selection exclusion condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
SelectionExclusion S :
Prop
∀ᵐ ω ∂P.μ, S.factualS ω = S.SofD (S.factualD ω) ω
CausalSmith.PartialID.SlateBenefitPartialTransport.SelectionExclusion · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:168
def OutcomeExclusion

The outcome exclusion condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
OutcomeExclusion S :
Prop
∀ᵐ ω ∂P.μ, S.factualS ω = true → S.factualY ω = S.YofD (S.factualD ω) ω
CausalSmith.PartialID.SlateBenefitPartialTransport.OutcomeExclusion · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:173
def InstrumentOverlap

The instrument overlap condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
εZ :
InstrumentOverlap S εZ :
Prop
clause 1
0 < εZ
clause 2
εZ < (1 : ℝ) / 2
clause 3
x :
0 < S.p x
εZ ≤ S.propensity x
S.propensity x ≤ 1 - εZ
CausalSmith.PartialID.SlateBenefitPartialTransport.InstrumentOverlap · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:178
def NoDefiers

The no defiers condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
NoDefiers S :
Prop
∀ᵐ ω ∂P.μ, S.DofZ false ω = true → S.DofZ true ω = true
CausalSmith.PartialID.SlateBenefitPartialTransport.NoDefiers · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:185
def WeakSelectionMonotonicity

The weak selection monotonicity condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
d :
𝒳 → Bool
x :
0 < P.μ (S.complierEvent ∩ S.xEvent x)
WeakSelectionMonotonicity S d :
Prop
∀ᵐ ω ∂(P.μ.restrict (S.complierEvent ∩ S.xEvent x)), (d x = true → S.SofD false ω ≤ S.SofD true ω) ∧ (d x = false → S.SofD true ω ≤ S.SofD false ω)
CausalSmith.PartialID.SlateBenefitPartialTransport.WeakSelectionMonotonicity · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:190
def DirectionMargin

The direction margin condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
c :
Capacities 𝒳 K
p :
𝒳 → ℝ
κσ :
x :
0 < p x
0 < c.mass x
DirectionMargin c p κσ :
Prop
κσ ≤ |c.gap x|
CausalSmith.PartialID.SlateBenefitPartialTransport.DirectionMargin · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:200
def PositiveAggregateSurvivors

The positive aggregate survivors condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
c :
Capacities 𝒳 K
p :
𝒳 → ℝ
PositiveAggregateSurvivors c p :
Prop
0 < c.aggregateMass p
CausalSmith.PartialID.SlateBenefitPartialTransport.PositiveAggregateSurvivors · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:206
def UniformAggregateSurvivorBound

The uniform aggregate survivor bound condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
c :
Capacities 𝒳 K
p :
𝒳 → ℝ
mstar :
UniformAggregateSurvivorBound c p mstar :
Prop
clause 1
0 < mstar
clause 2
mstar ≤ c.aggregateMass p
CausalSmith.PartialID.SlateBenefitPartialTransport.UniformAggregateSurvivorBound · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:211

The first n observations are measurable, mutually independent draws from the common observed-data law on the sampling probability space.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
Ω :
Type u_1
shared
n :
μ :
Pobs :
O :
ℕ → Ω → ObservedDatum 𝒳 K
isProbabilityMeasure :
measurable :
∀ i
if
i < n
then
indep :
iIndepFun (fun i : Fin n => O i) μ
law :
∀ i
if
i < n
then
μ.map (O i) = Pobs
CausalSmith.PartialID.SlateBenefitPartialTransport.FiniteIidSampling · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:219
def IidSampling

The first n observations themselves are measurable, mutually independent, and have common law Pobs on the stated probability space. No infinite continuation on the same carrier is part of this assumption.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
Ω :
Type u_1
shared
n :
μ :
Pobs :
O :
ℕ → Ω → ObservedDatum 𝒳 K
IidSampling n μ Pobs O :
Prop
FiniteIidSampling n μ Pobs O
CausalSmith.PartialID.SlateBenefitPartialTransport.IidSampling · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:233
structure TieSafeSurvivorModel

The maintained structural model class on the paper's finite-discrete covariate domain.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
εZ :
d :
𝒳 → Bool
ivIndependence :
treatmentConsistency :
selectionExclusion :
outcomeExclusion :
instrumentOverlap :
noDefiers :
weakSelectionMonotonicity :
positiveAggregateSurvivors :
CausalSmith.PartialID.SlateBenefitPartialTransport.TieSafeSurvivorModel · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:240

The reusable finite-sample triangular-array law record, with no direction-margin field.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
Ω :
Type u_1
shared
μ :
shared
P :
Sys :
POSlateSystem P 𝒳 K
εZ mstar :
d :
𝒳 → Bool
n :
O :
ℕ → Ω → ObservedDatum 𝒳 K
ivIndependence :
treatmentConsistency :
selectionExclusion :
outcomeExclusion :
instrumentOverlap :
noDefiers :
weakSelectionMonotonicity :
uniformAggregateSurvivorBound :
iidSampling :
IidSampling n μ Sys.observedLaw O
CausalSmith.PartialID.SlateBenefitPartialTransport.UniformInferenceLawClass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:257
def PositiveUniformInferenceLawClass

The paper-facing triangular-array class is indexed only by positive sample sizes and uses the frozen finite-discrete covariate domain.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
Ω :
Type u_1
shared
P :
Sys :
POSlateSystem P 𝒳 K
εZ mstar :
d :
𝒳 → Bool
n :
_hn :
1 ≤ n
O :
ℕ → Ω → ObservedDatum 𝒳 K
PositiveUniformInferenceLawClass Sys εZ mstar d n _hn O :
Prop
UniformInferenceLawClass (μ := μ) Sys εZ mstar d n O
CausalSmith.PartialID.SlateBenefitPartialTransport.PositiveUniformInferenceLawClass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:274

A genuine full potential-outcome law and its five-node slate subsystem. The parameter P₀ fixes universe levels only; system ranges over compatible full laws rather than over records on a preselected law.

Definition (Lean source)
P₀ :
POSystem.{uV, uVal, uOmega}
𝒳 :
Type uCell
K :
system :
POSystem.{uV, uVal, uOmega}
slate :
POSlateSystem system 𝒳 K
CausalSmith.PartialID.SlateBenefitPartialTransport.FullLawCandidate · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:283

Membership of a full law in the maintained class together with exact agreement with the supplied observed law.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
Pobs :
W :
FullLawFeasible Pobs W :
Prop
_ :
W.slate.borel (: StandardBorelSpace W.system.Ω)
∃ (εZ : ℝ) (d : 𝒳 → Bool),
clause 1
TieSafeSurvivorModel W.slate εZ d
clause 2
W.slate.observedLaw = Pobs
CausalSmith.PartialID.SlateBenefitPartialTransport.FullLawFeasible · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Basic.lean:291
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Helpers.Capacities 31 declarations Finite-cell observed data, selected-complier capacity contrasts, their prefix and tail aggregates, and the branch-free threshold endpoint formulas.

Observable capacities and threshold cuts

Finite-cell observed data, selected-complier capacity contrasts, their prefix and tail aggregates, and the branch-free threshold endpoint formulas.

def OutcomeLevel

The ordered outcome support.

Definition (Lean source)
K :
OutcomeLevel K :
Type
Fin K
CausalSmith.PartialID.SlateBenefitPartialTransport.OutcomeLevel · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:20

One finite observed-data cell, with none recording an unobserved outcome.

Definition (Lean source)
structure ObservedDatum (𝒳 : Type*) (K : ℕ) where cell : 𝒳 -- @realizes X(carrier \mathcal X) @realizes \mathcal X(finite covariate support) instrument : Bool -- @realizes Z(binary instrument) treatment : Bool -- @realizes D(binary received treatment) selected : Bool -- @realizes S(binary selection indicator) outcome : Option (Fin K) -- @realizes Y(Fin K when selected; none when unobserved) @realizes O(observed tuple X,Z,D,S,SY) deriving DecidableEq, Fintype
CausalSmith.PartialID.SlateBenefitPartialTransport.ObservedDatum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:23
instance instDecidableEqObservedDatum

Observed-data cells have decidable equality.

Definition (Lean source)
deriving DecidableEq, Fintype
CausalSmith.PartialID.SlateBenefitPartialTransport.instDecidableEqObservedDatum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:30
instance instFintypeObservedDatum

The finite observed-data type has a canonical finite enumeration.

Definition (Lean source)
deriving DecidableEq, Fintype
CausalSmith.PartialID.SlateBenefitPartialTransport.instFintypeObservedDatum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:30
instance instMeasurableSpaceObservedDatum

This declaration supplies the canonical canonical measurable space observed datum typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
instance : MeasurableSpace (ObservedDatum 𝒳 K) := ⊤
CausalSmith.PartialID.SlateBenefitPartialTransport.instMeasurableSpaceObservedDatum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:38
def conditionalReal

A conditional probability represented as a real-valued ratio, with zero at a zero denominator.

Definition (Lean source)
α :
P :
A B :
Set α
conditionalReal P A B :
if 0 < P.real B then P.real (A ∩ B) / P.real B else 0
CausalSmith.PartialID.SlateBenefitPartialTransport.conditionalReal · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:41

Real-valued capacity arrays. Their nonnegativity is a consequence of the causal assumptions for observable contrasts, rather than data contained in an arbitrary input law.

Definition (Lean source)
𝒳 :
Type*
K :
lower :
𝒳 → Fin K → ℝ
upper :
𝒳 → Fin K → ℝ
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:46

The valid capacities condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
ValidCapacities c :
Prop
clause 1
x i :
0 ≤ c.lower x i
clause 2
x j :
0 ≤ c.upper x j
CausalSmith.PartialID.SlateBenefitPartialTransport.ValidCapacities · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:52
def q0

The q0 is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
q0 c x :
∑ i, c.lower x i
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.q0 · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:58
def q1

The q1 is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
q1 c x :
∑ j, c.upper x j
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.q1 · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:62

The gap is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
gap c x :
c.q1 x - c.q0 x
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.gap · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:66

The mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
mass c x :
min (c.q0 x) (c.q1 x)
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.mass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:70

The lower le is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
t :
Fin K
lowerLe c x t :
∑ i with i ≤ t, c.lower x i
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.lowerLe · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:74

The lower lt is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
t :
Fin K
lowerLt c x t :
∑ i with i < t, c.lower x i
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.lowerLt · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:78
def lowerGt

The lower gt is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
t :
Fin K
lowerGt c x t :
∑ i with t < i, c.lower x i
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.lowerGt · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:82

The upper le is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
t :
Fin K
upperLe c x t :
∑ j with j ≤ t, c.upper x j
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.upperLe · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:86

The upper gt is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
t :
Fin K
upperGt c x t :
∑ j with t < j, c.upper x j
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.upperGt · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:90

The raw signed instrument contrasts associated with an arbitrary finite measure.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
Pobs :
observableCapacityContrasts Pobs :
Capacities 𝒳 K
clause 1
lower x i := conditionalReal Pobs (selectedOutcomeEvent x false i) (armEvent x false)
- conditionalReal Pobs (selectedOutcomeEvent x false i) (armEvent x true)
clause 2
upper x j := conditionalReal Pobs (selectedOutcomeEvent x true j) (armEvent x true)
- conditionalReal Pobs (selectedOutcomeEvent x true j) (armEvent x false)
CausalSmith.PartialID.SlateBenefitPartialTransport.observableCapacityContrasts · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:103
def CompatibleObservedLaw

An observed law is compatible with the maintained domain when it is a probability measure and its law-derived instrument contrasts are nonnegative.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
Pobs :
CompatibleObservedLaw Pobs :
Prop
CausalSmith.PartialID.SlateBenefitPartialTransport.CompatibleObservedLaw · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:115

The intrinsic domain of an observed law used by the paper: at least three ordered outcome levels, total mass one, and no recorded outcome off selection or missing outcome on selection.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
Pobs :
ObservedLawDomain Pobs :
Prop
clause 1
3 ≤ K
clause 3
∀ᵐ o ∂Pobs, o.outcome.isSome = o.selected
CausalSmith.PartialID.SlateBenefitPartialTransport.ObservedLawDomain · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:120

The raw observable capacity contrasts formed for any observed-data law.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
Pobs :
observableCapacities Pobs :
Capacities 𝒳 K
CausalSmith.PartialID.SlateBenefitPartialTransport.observableCapacities · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:127
def paperObservableCapacities

@realizes P_{\mathrm{obs}}(probability law of O) The observable capacities on the paper domain. Compatibility is supplied only after identification has established validity of the raw contrasts.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
Pobs :
_hK :
3 ≤ K
_hDomain :
c :
Capacities 𝒳 K
_hc :
_hCompatible :
paperObservableCapacities Pobs _hK _hDomain c _hc _hCompatible :
Capacities 𝒳 K
c
CausalSmith.PartialID.SlateBenefitPartialTransport.paperObservableCapacities · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:132

The benefit lower is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
benefitLower c x :
Finset.univ.sup' univ_nonempty (lowerCandidate c x)
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.benefitLower · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:153

The benefit upper is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
benefitUpper c x :
Finset.univ.inf' univ_nonempty (upperCandidate c x)
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.benefitUpper · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:158
def thresholdCuts

The reusable branch-free lower and upper threshold cuts.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
_hValid :
x :
𝒳
thresholdCuts c _hValid x :
ℝ × ℝ
(c.benefitLower x, c.benefitUpper x)
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.thresholdCuts · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:163
def paperThresholdCuts

The branch-free threshold cuts on the paper's observed-law domain.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
Pobs :
_hK :
3 ≤ K
_hDomain :
c :
Capacities 𝒳 K
_hc :
_hCompatible :
hValid :
x :
𝒳
paperThresholdCuts Pobs _hK _hDomain c _hc _hCompatible hValid x :
ℝ × ℝ
thresholdCuts c hValid x
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.paperThresholdCuts · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:167

The aggregate mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
p :
𝒳 → ℝ
aggregateMass c p :
∑ x, p x * c.mass x
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.aggregateMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:176
def observedCellWeights

The covariate-cell probabilities determined by an observed-data law.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
Pobs :
observedCellWeights Pobs :
𝒳 → ℝ
fun x => Pobs.real {o | o.cell = x}
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.observedCellWeights · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:180

The two aggregate ratio endpoints together with the closed interval they determine.

Definition (Lean source)
endpoints :
ℝ × ℝ
identifiedSet :
Set
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.EndpointMapResult · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:186
def endpointMap

The observable endpoint functional and its identified closed interval. The capacity array and cell weights are explicitly pinned to Pobs; the remaining arguments record the paper's observed-law domain, validity, nonnegativity, and positive target mass.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
p :
𝒳 → ℝ
Pobs :
_hc :
_hpobs :
_hValid :
@realizes \theta_L(valid capacities) @realizes \theta_U(valid capacities) @realizes \Theta_I(P_{\mathrm{obs}})(valid capacities)
_hp :
∀ x, 0 ≤ p x
@realizes \theta_L(nonnegative cell weights) @realizes \theta_U(nonnegative cell weights) @realizes \Theta_I(P_{\mathrm{obs}})(nonnegative cell weights)
_hMass :
@realizes \theta_L(positive aggregate mass) @realizes \theta_U(positive aggregate mass) @realizes \Theta_I(P_{\mathrm{obs}})(positive aggregate mass)
_hDomain :
endpointMap c p Pobs _hc _hpobs _hValid _hp _hMass _hDomain :
endpoints :
((∑ x, p x * c.benefitLower x) / aggregateMass c p, (∑ x, p x * c.benefitUpper x) / aggregateMass c p)
{ endpoints := endpoints identifiedSet := Icc endpoints.1 endpoints.2 }
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.endpointMap · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:192

The identified icc is the measure produced by the stated finite slate-benefit construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
p :
𝒳 → ℝ
Pobs :
hc :
hpobs :
hValid :
hp :
∀ x, 0 ≤ p x
hMass :
hDomain :
identifiedIcc c p Pobs hc hpobs hValid hp hMass hDomain :
Set
(endpointMap c p Pobs hc hpobs hValid hp hMass hDomain).identifiedSet
CausalSmith.PartialID.SlateBenefitPartialTransport.Capacities.identifiedIcc · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Capacities.lean:215
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Helpers.CitedGates 8 declarations These named propositions are explicit external inputs.

Cited logical gates

These named propositions are explicit external inputs. This paper neither proves them nor hides them behind axioms.

Weak convergence expressed by convergence of integrals against bounded continuous real-valued test functions.

Definition (Lean source)
Xn :
ℕ → Ω → E
Q :
μ :
f :
E → ℝ
(∃ C, ∀ x, |f x| ≤ C)
WeakConverges Xn Q μ :
Prop
Tendsto (fun n => ∫ ω, f (Xn n ω) ∂μ) atTop (𝓝 (∫ x, f x ∂Q))
CausalSmith.PartialID.SlateBenefitPartialTransport.WeakConverges · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CitedGates.lean:20

The tight probability law condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
Q :
ε :
ℝ≥0∞
0 < ε
TightProbabilityLaw Q :
Prop
∃ C : Set E,
clause 1
clause 2
Q Cᶜ ≤ ε
CausalSmith.PartialID.SlateBenefitPartialTransport.TightProbabilityLaw · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CitedGates.lean:27

The supported in condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
E :
Q :
tangent :
Set E
SupportedIn Q tangent :
Prop
Q tangentᶜ = 0
CausalSmith.PartialID.SlateBenefitPartialTransport.SupportedIn · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CitedGates.lean:32
def empiricalAtomVector

The empirical atom vector is the measure produced by the stated finite slate-benefit construction.

Definition (Lean source)
Ω 𝒪 :
O :
ℕ → Ω → 𝒪
Pobs :
Measure 𝒪
n :
ω :
Ω
empiricalAtomVector O Pobs n ω :
𝒪 → ℝ
fun o
=> sqrt n * ((n : ℝ)⁻¹ * (∑ r ∈ range n, if O r ω = o then 1 else 0) - Pobs.real {o})
CausalSmith.PartialID.SlateBenefitPartialTransport.empiricalAtomVector · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CitedGates.lean:37

van der Vaart (1998), Chapter 2, Example 2.18 and the Cramér--Wold device, DOI 10.1017/CBO9780511802256.

Definition (Lean source)
FiniteMultinomialCLT :
Sort 0
∀ {Ω 𝒳 : Type*} [Fintype 𝒳] [DecidableEq 𝒳] [MeasurableSpace Ω] {K : ℕ} (μ : Measure Ω) (Pobs : Measure (ObservedDatum 𝒳 K)) (O : ℕ → Ω → ObservedDatum 𝒳 K)
and
(∀ n, IidSampling n μ Pobs O)
then
∃ Q : Measure (ObservedDatum 𝒳 K → ℝ),
(∫ z, z ∂Q = 0) ∧
(∀ a b, ∫ z, z a * z b ∂Q = if a = b then Pobs.real {a} * (1 - Pobs.real {a}) else -(Pobs.real {a} * Pobs.real {b})) ∧
CausalSmith.PartialID.SlateBenefitPartialTransport.FiniteMultinomialCLT · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CitedGates.lean:45

Lu, Ding, and Dasgupta (2018), Proposition 2, equation (6), page 546, Treatment effects on ordinal outcomes: Causal estimands and sharp bounds.

Definition (Lean source)
OrdinalFixedMarginalStrictBenefit :
Sort 0
∀ {𝒳 : Type*} [Fintype 𝒳] [DecidableEq 𝒳] {K : ℕ} (c : Capacities 𝒳 K) (x : 𝒳),
∀ hValid : ValidCapacities c,
0 < c.mass x → c.q0 x
= c.mass x → c.q1 x = c.mass x → sInf {v : ℝ | ∃ γ ∈ tiePolytope c hValid x, v = benefitMass γ / c.mass x} = max 0 (Finset.univ.sup' univ_nonempty (fun t : Option (Fin K) => match t with | none => 0 | some k => (c.lowerLe x k - c.upperLe x k) / c.mass x)) ∧
sSup {v : ℝ | ∃ γ ∈ tiePolytope c hValid x, v = benefitMass γ / c.mass x}
= Finset.univ.inf' univ_nonempty (fun t : Option (Fin K) => match t with | none => 1 | some k => (c.lowerLt x k + c.upperGt x k) / c.mass x)
CausalSmith.PartialID.SlateBenefitPartialTransport.OrdinalFixedMarginalStrictBenefit · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CitedGates.lean:69

Tangential sequential Hadamard directional differentiability, including the domain constraint on every perturbation.

Definition (Lean source)
domain tangent :
Set E
φ φ' :
E → F
θ :
E
HasTangentialHadamardDirDerivAt domain tangent φ φ' θ :
Prop
clause 1
θ ∈ domain
clause 2
ContinuousOn φ' tangent
clause 3
h ∈ tangent :
hn :
ℕ → E
tn :
ℕ → ℝ
Tendsto hn atTop (𝓝 h)
Tendsto tn atTop (𝓝 0)
(∀ n, 0 < tn n)
(∀ n, θ + tn n • hn n ∈ domain)
Tendsto (fun n => (tn n)⁻¹ • (φ (θ + tn n • hn n) - φ θ)) atTop (𝓝 (φ' h))
CausalSmith.PartialID.SlateBenefitPartialTransport.HasTangentialHadamardDirDerivAt · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CitedGates.lean:91

Fang and Santos (2019), Section 2.3, Assumptions 1--2, Theorem 2.1, equation (10), and Remark 2.1, DOI 10.1093/restud/rdy049.

Definition (Lean source)
HadamardDirectionalDeltaMethod :
Sort 0
∀ {Ω E F : Type*} [MeasurableSpace Ω] [NormedAddCommGroup E] [NormedSpace ℝ E] [MeasurableSpace E] [CompleteSpace E] [BorelSpace E] [NormedAddCommGroup F] [NormedSpace ℝ F] [MeasurableSpace F] [CompleteSpace F] [BorelSpace F] (μ : Measure Ω) (domain tangent : Set E) (φ φ' extension : E → F) (θ0 : E) (θhat : ℕ → Ω → E) (rn : ℕ → ℝ) (Q : Measure E)
and
HasTangentialHadamardDirDerivAt domain tangent φ φ' θ0
and
Continuous extension
and
(∀ h ∈ tangent, extension h = φ' h)
and
(∀ n, Measurable (θhat n))
and
(∀ n ω, θhat n ω ∈ domain)
and
WeakConverges (fun n ω => rn n • (θhat n ω - θ0)) Q μ
and
SupportedIn Q tangent
then
IsLittleOp (fun n ω => ‖rn n • (φ (θhat n ω) - φ θ0) - extension (rn n • (θhat n ω - θ0))‖) (fun _ => 1) μ ∧
WeakConverges (fun n ω => rn n • (φ (θhat n ω) - φ θ0)) (Q.map extension) μ
CausalSmith.PartialID.SlateBenefitPartialTransport.HadamardDirectionalDeltaMethod · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CitedGates.lean:103
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Helpers.CondIndepBridge 9 declarations This local bridge transports conditional independence given the covariate variable to the equivalent singleton conditioning bundle.

Singleton conditioning-bundle bridge

This local bridge transports conditional independence given the covariate variable to the equivalent singleton conditioning bundle.

theorem conditionalReal_map

Given the stated hypotheses, the conditional real map property holds.

Formal statement
Ω α :
μ :
f :
Ω → α
hf :
A B :
Set α
hA :
hB :
conditionalReal (μ.map f) A B = conditionalReal μ (f ⁻¹' A) (f ⁻¹' B)
Proof (Lean source)
lemma conditionalReal_map {Ω α : Type*} [MeasurableSpace Ω] [MeasurableSpace α] (μ : Measure Ω) (f : Ω → α) (hf : Measurable f) (A B : Set α) (hA : MeasurableSet A) (hB : MeasurableSet B) : conditionalReal (μ.map f) A B = conditionalReal μ (f ⁻¹' A) (f ⁻¹' B) := by unfold conditionalReal simp only [Measure.real, Measure.map_apply hf hB, Measure.map_apply hf (hA.inter hB), Set.preimage_inter] rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.conditionalReal_map · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CondIndepBridge.lean:18
def xBundle

The x bundle is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
xBundle S :
{ n := 1 type := fun _ => 𝒳 inst := fun _ => inferInstance vars := fun _ => RegimedVar.ofFactual S.xVar }
theorem sigma_xBundle

the sigma x bundle property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
(xBundle S).sigma = comap S.xVar.factual inferInstance
Proof (Lean source)
lemma sigma_xBundle (S : POSlateSystem P 𝒳 K) : (xBundle S).sigma = MeasurableSpace.comap S.xVar.factual inferInstance := by change MeasurableSpace.comap (fun ω (_ : Fin 1) => S.xVar.factual ω) inferInstance = MeasurableSpace.comap S.xVar.factual inferInstance apply le_antisymm · have hf : Measurable[MeasurableSpace.comap S.xVar.factual inferInstance] S.xVar.factual := Measurable.of_comap_le le_rfl have hg : Measurable (fun x : 𝒳 => fun _ : Fin 1 => x) := measurable_pi_lambda _ (fun _ => measurable_id) exact (hg.comp hf).comap_le · let tuple : P.Ω → Fin 1 → 𝒳 := fun ω _ => S.xVar.factual ω have ht : Measurable[MeasurableSpace.comap tuple inferInstance] tuple := Measurable.of_comap_le le_rfl have heval : Measurable (fun f : Fin 1 → 𝒳 => f 0) := measurable_pi_apply 0 have hc := (heval.comp ht).comap_le simpa only [tuple, Function.comp_def] using hc
CausalSmith.PartialID.SlateBenefitPartialTransport.sigma_xBundle · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CondIndepBridge.lean:39
theorem condIndepCFBundle_of_condIndepCF

the cond indep cf bundle whenever cond indep cf property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
α :
S :
POSlateSystem P 𝒳 K
a :
B :
h :
P.CondIndepCF a B (RegimedVar.ofFactual S.xVar) P.μ
P.CondIndepCFBundle a B (xBundle S) P.μ
Proof (Lean source)
lemma condIndepCFBundle_of_condIndepCF {α : Type*} [MeasurableSpace α] (S : POSlateSystem P 𝒳 K) (a : RegimedVar P α) (B : POCFBundle P) (h : P.CondIndepCF a B (RegimedVar.ofFactual S.xVar) P.μ) : P.CondIndepCFBundle a B (xBundle S) P.μ := by unfold POSystem.CondIndepCFBundle unfold POSystem.CondIndepCF at h have transport : ∀ (m₁ m₂ : MeasurableSpace P.Ω) (hm₁ : m₁ ≤ P.measΩ) (hm₂ : m₂ ≤ P.measΩ), m₁ = m₂ → CondIndepFun (mΩ := P.measΩ) m₁ hm₁ a.value B.jointValue (μ := P.μ) → CondIndepFun (mΩ := P.measΩ) m₂ hm₂ a.value B.jointValue (μ := P.μ) := by intro m₁ m₂ hm₁ hm₂ hm hci subst m₂ exact hci apply transport (comap S.xVar.factual inferInstance) (xBundle S).sigma S.xVar.measurable_factual.comap_le (xBundle S).sigma_le (sigma_xBundle S).symm simpa only [RegimedVar.value, RegimedVar.ofFactual, POVar.factual] using h
CausalSmith.PartialID.SlateBenefitPartialTransport.condIndepCFBundle_of_condIndepCF · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CondIndepBridge.lean:58
theorem measurable_DofZ_cfBundle

the dof z cf bundle map is measurable.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
z :
Measurable[S.cfBundle.sigma] (S.DofZ z)
Proof (Lean source)
@[fun_prop] lemma measurable_DofZ_cfBundle (S : POSlateSystem P 𝒳 K) (z : Bool) : Measurable[S.cfBundle.sigma] (S.DofZ z) := by cases z · have h := measurable_cfBundle_coordinate S ⟨0, by norm_num [POSlateSystem.cfBundle, POCFBundle.cons, POCFBundle.nil]⟩ change Measurable[S.cfBundle.sigma] (S.DofZ false) at h exact h · have h := measurable_cfBundle_coordinate S ⟨1, by norm_num [POSlateSystem.cfBundle, POCFBundle.cons, POCFBundle.nil]⟩ change Measurable[S.cfBundle.sigma] (S.DofZ true) at h exact h
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_DofZ_cfBundle · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CondIndepBridge.lean:85
theorem measurable_SofD_cfBundle

the sof d cf bundle map is measurable.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
d :
Measurable[S.cfBundle.sigma] (S.SofD d)
Proof (Lean source)
@[fun_prop] lemma measurable_SofD_cfBundle (S : POSlateSystem P 𝒳 K) (d : Bool) : Measurable[S.cfBundle.sigma] (S.SofD d) := by cases d · have h := measurable_cfBundle_coordinate S ⟨2, by norm_num [POSlateSystem.cfBundle, POCFBundle.cons, POCFBundle.nil]⟩ change Measurable[S.cfBundle.sigma] (S.SofD false) at h exact h · have h := measurable_cfBundle_coordinate S ⟨3, by norm_num [POSlateSystem.cfBundle, POCFBundle.cons, POCFBundle.nil]⟩ change Measurable[S.cfBundle.sigma] (S.SofD true) at h exact h
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_SofD_cfBundle · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CondIndepBridge.lean:98
theorem measurable_YofD_cfBundle

the yof d cf bundle map is measurable.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
d :
Measurable[S.cfBundle.sigma] (S.YofD d)
Proof (Lean source)
@[fun_prop] lemma measurable_YofD_cfBundle (S : POSlateSystem P 𝒳 K) (d : Bool) : Measurable[S.cfBundle.sigma] (S.YofD d) := by cases d · have h := measurable_cfBundle_coordinate S ⟨4, by norm_num [POSlateSystem.cfBundle, POCFBundle.cons, POCFBundle.nil]⟩ change Measurable[S.cfBundle.sigma] (S.YofD false) at h exact h · have h := measurable_cfBundle_coordinate S ⟨5, by norm_num [POSlateSystem.cfBundle, POCFBundle.cons, POCFBundle.nil]⟩ change Measurable[S.cfBundle.sigma] (S.YofD true) at h exact h
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_YofD_cfBundle · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CondIndepBridge.lean:111
theorem measureReal_inter_atom_mul_of_condExp_inter_eq_mul

Extract the ordinary probability product identity on a positive finite atom from an a.e. conditional-probability product identity given a finite covariate. Given the stated hypotheses, the stated conclusion follows.

Formal statement
X :
Ω → α
hX :
A B :
Set Ω
hA :
hB :
x :
α
hx :
0 < μ.real (X ⁻¹' {x})
hprod :
μ⟦A ∩ B | comap X mα⟧
=ᵐ[μ] μ⟦A | comap X mα⟧ * μ⟦B | comap X mα⟧
μ.real ((A ∩ B) ∩ X ⁻¹' {x}) * μ.real (X ⁻¹' {x})
= μ.real (A ∩ X ⁻¹' {x}) * μ.real (B ∩ X ⁻¹' {x})
Proof (Lean source)
lemma measureReal_inter_atom_mul_of_condExp_inter_eq_mul {Ω α : Type*} [mΩ : MeasurableSpace Ω] [mα : MeasurableSpace α] [MeasurableSingletonClass α] (μ : Measure Ω) [IsFiniteMeasure μ] (X : Ω → α) (hX : Measurable X) (A B : Set Ω) (hA : MeasurableSet A) (hB : MeasurableSet B) (x : α) (hx : 0 < μ.real (X ⁻¹' {x})) (hprod : μ⟦A ∩ B | MeasurableSpace.comap X mα⟧ =ᵐ[μ] μ⟦A | MeasurableSpace.comap X mα⟧ * μ⟦B | MeasurableSpace.comap X mα⟧) : μ.real ((A ∩ B) ∩ X ⁻¹' {x}) * μ.real (X ⁻¹' {x}) = μ.real (A ∩ X ⁻¹' {x}) * μ.real (B ∩ X ⁻¹' {x}) := by let m := MeasurableSpace.comap X mα let C : Set Ω := X ⁻¹' {x} have hm : m ≤ mΩ := by dsimp [m] exact hX.comap_le have hC : MeasurableSet[m] C := ⟨{x}, measurableSet_singleton x, rfl⟩ have hC' : @MeasurableSet Ω mΩ C := hm C hC let eA : Ω → ℝ := μ⟦A | m⟧ let eB : Ω → ℝ := μ⟦B | m⟧ let eAB : Ω → ℝ := μ⟦A ∩ B | m⟧ have heA : StronglyMeasurable[m] eA := stronglyMeasurable_condExp (m := m) (μ := μ) have heB : StronglyMeasurable[m] eB := stronglyMeasurable_condExp (m := m) (μ := μ) have heAB : StronglyMeasurable[m] eAB := stronglyMeasurable_condExp (m := m) (μ := μ) have hne : C.Nonempty := by by_contra h dsimp [C] at h rw [Set.not_nonempty_iff_eq_empty.mp h] at hx simp at hx obtain ⟨ω₀, hω₀⟩ := hne have hconstA : ∀ ω ∈ C, eA ω = eA ω₀ := by intro ω hω exact heA.factorsThrough (by simpa [C] using hω.trans hω₀.symm) have hconstB : ∀ ω ∈ C, eB ω = eB ω₀ := by intro ω hω exact heB.factorsThrough (by simpa [C] using hω.trans hω₀.symm) have hconstAB : ∀ ω ∈ C, eAB ω = eAB ω₀ := by intro ω hω exact heAB.factorsThrough (by simpa [C] using hω.trans hω₀.symm) have hmul : eAB ω₀ = eA ω₀ * eB ω₀ := by have hp : eAB =ᵐ[μ.restrict C] eA * eB := ae_mono Measure.restrict_le_self hprod have hi : ∫ ω in C, eAB ω ∂μ = ∫ ω in C, (eA * eB) ω ∂μ := integral_congr_ae hp have hl : ∫ ω in C, eAB ω ∂μ = eAB ω₀ * μ.real C := by calc _ = ∫ _ in C, eAB ω₀ ∂μ := setIntegral_congr_fun hC' hconstAB _ = _ := by simp [Measure.real, mul_comm] have hr : ∫ ω in C, (eA * eB) ω ∂μ = (eA ω₀ * eB ω₀) * μ.real C := by calc _ = ∫ _ in C, (eA ω₀ * eB ω₀) ∂μ := by apply setIntegral_congr_fun hC' intro ω hω change eA ω * eB ω = eA ω₀ * eB ω₀ rw [hconstA ω hω, hconstB ω hω] _ = _ := by simp [Measure.real, mul_comm] have hmass : μ.real C ≠ 0 := ne_of_gt hx rw [hl, hr] at hi exact (mul_right_cancel₀ hmass hi) have hInt (D : Set Ω) (hD : @MeasurableSet Ω mΩ D) : (∫ ω in C, (μ⟦D | m⟧) ω ∂μ) = μ.real (D ∩ C) := by rw [MeasureTheory.setIntegral_condExp (m := m) (m₀ := mΩ) (μ := μ) hm ((integrable_const (1 : ℝ)).indicator hD) hC] rw [integral_indicator hD, Measure.restrict_restrict hD] simp [Measure.real, Set.inter_comm] have hAeq : eA ω₀ * μ.real C = μ.real (A ∩ C) := by rw [← hInt A hA] calc _ = ∫ _ in C, eA ω₀ ∂μ := by simp [Measure.real, mul_comm] _ = _ := (setIntegral_congr_fun hC' hconstA).symm have hBeq : eB ω₀ * μ.real C = μ.real (B ∩ C) := by rw [← hInt B hB] calc _ = ∫ _ in C, eB ω₀ ∂μ := by simp [Measure.real, mul_comm] _ = _ := (setIntegral_congr_fun hC' hconstB).symm have hABeq : eAB ω₀ * μ.real C = μ.real ((A ∩ B) ∩ C) := by rw [← hInt (A ∩ B) (hA.inter hB)] calc _ = ∫ _ in C, eAB ω₀ ∂μ := by simp [Measure.real, mul_comm] _ = _ := (setIntegral_congr_fun hC' hconstAB).symm rw [← hABeq, hmul, ← hAeq, ← hBeq] ring
CausalSmith.PartialID.SlateBenefitPartialTransport.measureReal_inter_atom_mul_of_condExp_inter_eq_mul · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CondIndepBridge.lean:124
theorem conditionalReal_eq_of_condIndepCFBundle

On a positive finite covariate atom, conditional independence converts an observed event under one instrument arm into the corresponding event of the counterfactual bundle. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
Fintype 𝒳
S :
POSlateSystem P 𝒳 K
B :
hCI :
P.CondIndepCFBundle (RegimedVar.ofFactual S.zVar) B (xBundle S) P.μ
z :
E L :
Set P.Ω
hE :
hL :
hcons :
∀ᵐ ω ∂P.μ, (ω ∈ E ∧ S.factualZ ω = z) ↔ (ω ∈ L ∧ S.factualZ ω = z)
x :
𝒳
hx :
0 < P.μ.real (S.xEvent x)
harm :
0 < P.μ.real (S.xEvent x ∩ S.zVar.event z)
conditionalReal P.μ E (S.xEvent x ∩ S.zVar.event z) = conditionalReal P.μ L (S.xEvent x)
Proof (Lean source)
lemma conditionalReal_eq_of_condIndepCFBundle [Fintype 𝒳] [DecidableEq 𝒳] [MeasurableSingletonClass 𝒳] (S : POSlateSystem P 𝒳 K) (B : POCFBundle P) (hCI : P.CondIndepCFBundle (RegimedVar.ofFactual S.zVar) B (xBundle S) P.μ) (z : Bool) (E L : Set P.Ω) (hE : MeasurableSet E) (hL : MeasurableSet[comap B.jointValue inferInstance] L) (hcons : ∀ᵐ ω ∂P.μ, (ω ∈ E ∧ S.factualZ ω = z) ↔ (ω ∈ L ∧ S.factualZ ω = z)) (x : 𝒳) (hx : 0 < P.μ.real (S.xEvent x)) (harm : 0 < P.μ.real (S.xEvent x ∩ S.zVar.event z)) : conditionalReal P.μ E (S.xEvent x ∩ S.zVar.event z) = conditionalReal P.μ L (S.xEvent x) := by let Z : Set P.Ω := S.zVar.event z let X : Set P.Ω := S.xEvent x have hZ : MeasurableSet Z := S.zVar.measurable_factual (measurableSet_singleton z) have hL' : MeasurableSet L := B.measurable_jointValue.comap_le L hL have hprod : P.μ⟦Z ∩ L | comap S.factualX inferInstance⟧ =ᵐ[P.μ] P.μ⟦Z | comap S.factualX inferInstance⟧ * P.μ⟦L | comap S.factualX inferInstance⟧ := by have h := (ProbabilityTheory.condIndepFun_iff (m' := (xBundle S).sigma) (hm' := (xBundle S).sigma_le) (f := (RegimedVar.ofFactual S.zVar).value) (g := B.jointValue) (μ := P.μ) (RegimedVar.measurable_value _) B.measurable_jointValue).mp hCI.toCondIndepFun Z L (by change MeasurableSet[comap S.factualZ inferInstance] Z exact ⟨{z}, measurableSet_singleton z, rfl⟩) hL simpa [sigma_xBundle, POSlateSystem.factualX, Z, RegimedVar.value, RegimedVar.ofFactual, POVar.factual] using h have hfactor := measureReal_inter_atom_mul_of_condExp_inter_eq_mul P.μ S.factualX S.xVar.measurable_factual Z L hZ hL' x hx hprod have hobs : P.μ.real (E ∩ (X ∩ Z)) = P.μ.real ((Z ∩ L) ∩ X) := by apply congrArg toReal apply measure_congr filter_upwards [hcons] with ω hω apply propext change (ω ∈ E ∩ (X ∩ Z)) ↔ (ω ∈ (Z ∩ L) ∩ X) dsimp [X, Z, POSlateSystem.xEvent, POVar.event] simp only [Set.mem_inter_iff, Set.mem_setOf_eq, Set.mem_preimage, Set.mem_singleton_iff] dsimp [POSlateSystem.factualZ] at hω tauto unfold conditionalReal rw [if_pos harm, if_pos hx] have hfactor' : P.μ.real ((Z ∩ L) ∩ X) * P.μ.real X = P.μ.real (X ∩ Z) * P.μ.real (L ∩ X) := by change P.μ.real ((Z ∩ L) ∩ S.factualX ⁻¹' {x}) * P.μ.real (S.factualX ⁻¹' {x}) = P.μ.real (S.factualX ⁻¹' {x} ∩ Z) * P.μ.real (L ∩ S.factualX ⁻¹' {x}) simpa [Set.inter_comm, Set.inter_left_comm, Set.inter_assoc] using hfactor rw [hobs] field_simp [ne_of_gt harm, ne_of_gt hx] simpa [X, Z, Set.inter_comm, Set.inter_left_comm, Set.inter_assoc] using hfactor'
CausalSmith.PartialID.SlateBenefitPartialTransport.conditionalReal_eq_of_condIndepCFBundle · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/CondIndepBridge.lean:212
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Helpers.EndpointDirectional 13 declarations Directional calculus for the fixed-support endpoint

Directional calculus for the fixed-support endpoint

def projectedMassCapacity

Coordinatewise positive-part projection of raw mass-vector capacities.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
v :
ObservedDatum 𝒳 K → ℝ
projectedMassCapacity v :
Capacities 𝒳 K
clause 1
clause 2
CausalSmith.PartialID.SlateBenefitPartialTransport.projectedMassCapacity · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:16
def survivorMassFromMassVector

Cell survivor mass as a functional of the finite atom vector.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
v :
ObservedDatum 𝒳 K → ℝ
x :
𝒳
survivorMassFromMassVector v x :
massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).mass x
CausalSmith.PartialID.SlateBenefitPartialTransport.survivorMassFromMassVector · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:22
theorem measurable_survivorMassFromMassVector

The finite-coordinate survivor score is Borel measurable. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
x :
𝒳
Measurable (fun v : ObservedDatum 𝒳 K → ℝ => survivorMassFromMassVector v x)
Proof (Lean source)
theorem measurable_survivorMassFromMassVector {K : ℕ} [MeasurableSpace 𝒳] [MeasurableSingletonClass 𝒳] (x : 𝒳) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => survivorMassFromMassVector v x) := by have hsum (E : ObservedDatum 𝒳 K → Bool) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => massVectorSum v E) := by unfold massVectorSum fun_prop have hcond (A B : ObservedDatum 𝒳 K → Bool) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => empiricalConditional (massVectorSum v A) (massVectorSum v B)) := by unfold empiricalConditional apply Measurable.ite · exact measurableSet_lt measurable_const (hsum B) · exact (hsum A).div (hsum B) · exact measurable_const have hlower (i : Fin K) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).lower x i) := by unfold projectedMassCapacity capacitiesFromMassVector exact ((hcond _ _).sub (hcond _ _)).max measurable_const have hupper (i : Fin K) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).upper x i) := by unfold projectedMassCapacity capacitiesFromMassVector exact ((hcond _ _).sub (hcond _ _)).max measurable_const unfold survivorMassFromMassVector Capacities.mass Capacities.q0 Capacities.q1 exact (hsum _).mul ((measurable_sum _ fun i _ => hlower i).min (measurable_sum _ fun i _ => hupper i))
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_survivorMassFromMassVector · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:28
theorem benefitLower_nonneg

the benefit lower nonneg property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
0 ≤ c.benefitLower x
Proof (Lean source)
theorem benefitLower_nonneg (c : Capacities 𝒳 K) (x : 𝒳) : 0 ≤ c.benefitLower x := by unfold Capacities.benefitLower exact Finset.le_sup' (f := fun t : Option (Fin K) => match t with | none => 0 | some k => c.lowerLe x k - c.upperLe x k + min (c.gap x) 0) (by simp : none ∈ (Finset.univ : Finset (Option (Fin K))))
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitLower_nonneg · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:60
theorem benefitUpper_nonneg

Given the stated hypotheses, the benefit upper nonneg property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
0 ≤ c.benefitUpper x
Proof (Lean source)
theorem benefitUpper_nonneg (c : Capacities 𝒳 K) (hc : ValidCapacities c) (x : 𝒳) : 0 ≤ c.benefitUpper x := by unfold Capacities.benefitUpper rw [Finset.le_inf'_iff] intro t ht cases t with | none => exact le_min (sum_nonneg fun i _ => hc.1 x i) (sum_nonneg fun i _ => hc.2 x i) | some k => exact add_nonneg (sum_nonneg fun i _ => hc.1 x i) (sum_nonneg fun i _ => hc.2 x i)
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitUpper_nonneg · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:69
theorem benefitUpper_le_mass

the benefit upper is at most mass property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
c.benefitUpper x ≤ c.mass x
Proof (Lean source)
theorem benefitUpper_le_mass (c : Capacities 𝒳 K) (x : 𝒳) : c.benefitUpper x ≤ c.mass x := by unfold Capacities.benefitUpper exact Finset.inf'_le (f := fun t : Option (Fin K) => match t with | none => c.mass x | some k => c.lowerLt x k + c.upperGt x k) (by simp : none ∈ (Finset.univ : Finset (Option (Fin K))))
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitUpper_le_mass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:83
theorem benefitLower_le_mass

Given the stated hypotheses, the benefit lower is at most mass property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
c.benefitLower x ≤ c.mass x
Proof (Lean source)
theorem benefitLower_le_mass (c : Capacities 𝒳 K) (hc : ValidCapacities c) (x : 𝒳) : c.benefitLower x ≤ c.mass x := by unfold Capacities.benefitLower rw [Finset.sup'_le_iff] intro t ht cases t with | none => exact le_min (sum_nonneg fun i _ => hc.1 x i) (sum_nonneg fun i _ => hc.2 x i) | some k => change c.lowerLe x k - c.upperLe x k + min (c.gap x) 0 ≤ c.mass x have hprefix : c.lowerLe x k ≤ c.q0 x := by unfold Capacities.lowerLe Capacities.q0 exact Finset.sum_le_sum_of_subset_of_nonneg (by simp) (fun i hi hj => hc.1 x i) have hu : 0 ≤ c.upperLe x k := sum_nonneg fun i _ => hc.2 x i by_cases hq : c.q0 x ≤ c.q1 x · rw [Capacities.mass, min_eq_left hq] nlinarith [min_le_right (c.gap x) 0] · have hq' : c.q1 x ≤ c.q0 x := le_of_not_ge hq rw [Capacities.mass, min_eq_right hq'] have hgap : c.gap x ≤ 0 := by unfold Capacities.gap linarith rw [min_eq_left hgap] unfold Capacities.gap linarith
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitLower_le_mass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:92
theorem measurable_projected_components

the projected components map is measurable.

Formal statement
𝒳 :
Type u_1
shared
K :
conclusion 1
x :
Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).mass x)
conclusion 2
x :
conclusion 3
x :
Proof (Lean source)
theorem measurable_projected_components {K : ℕ} [MeasurableSpace 𝒳] [MeasurableSingletonClass 𝒳] : (∀ x, Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).mass x)) ∧ (∀ x, Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).benefitLower x)) ∧ (∀ x, Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).benefitUpper x)) := by have hsum (E : ObservedDatum 𝒳 K → Bool) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => massVectorSum v E) := by unfold massVectorSum fun_prop have hcond (A B : ObservedDatum 𝒳 K → Bool) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => empiricalConditional (massVectorSum v A) (massVectorSum v B)) := by unfold empiricalConditional exact Measurable.ite (measurableSet_lt measurable_const (hsum B)) ((hsum A).div (hsum B)) measurable_const have hl (x : 𝒳) (i : Fin K) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).lower x i) := by unfold projectedMassCapacity capacitiesFromMassVector exact ((hcond _ _).sub (hcond _ _)).max measurable_const have hu (x : 𝒳) (i : Fin K) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).upper x i) := by unfold projectedMassCapacity capacitiesFromMassVector exact ((hcond _ _).sub (hcond _ _)).max measurable_const have hq0 (x : 𝒳) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).q0 x) := by unfold Capacities.q0 exact measurable_sum _ fun i _ => hl x i have hq1 (x : 𝒳) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).q1 x) := by unfold Capacities.q1 exact measurable_sum _ fun i _ => hu x i have hm (x : 𝒳) : Measurable (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).mass x) := by unfold Capacities.mass exact (hq0 x).min (hq1 x) refine ⟨hm, ?_, ?_⟩ · intro x let fL : Option (Fin K) → (ObservedDatum 𝒳 K → ℝ) → ℝ := fun t v => match t with | none => 0 | some k => (projectedMassCapacity v).lowerLe x k - (projectedMassCapacity v).upperLe x k + min ((projectedMassCapacity v).gap x) 0 rw [show (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).benefitLower x) = fun v => Finset.univ.sup' univ_nonempty (fun t => fL t v) by funext v; exact benefitLower_eq_sup_explicit _ _] have hh : Measurable (Finset.univ.sup' univ_nonempty fL) := by apply Finset.measurable_sup' univ_nonempty intro t ht cases t with | none => exact measurable_const | some k => dsimp [fL] unfold Capacities.lowerLe Capacities.upperLe Capacities.gap fun_prop convert hh using 1 funext v exact (Finset.sup'_apply (s := (Finset.univ : Finset (Option (Fin K)))) (C := fun _ : (ObservedDatum 𝒳 K → ℝ) => ℝ) univ_nonempty fL v).symm · intro x let fU : Option (Fin K) → (ObservedDatum 𝒳 K → ℝ) → ℝ := fun t v => match t with | none => (projectedMassCapacity v).mass x | some k => (projectedMassCapacity v).lowerLt x k + (projectedMassCapacity v).upperGt x k rw [show (fun v : ObservedDatum 𝒳 K → ℝ => (projectedMassCapacity v).benefitUpper x) = fun v => Finset.univ.inf' univ_nonempty (fun t => fU t v) by funext v; exact benefitUpper_eq_inf_explicit _ _] have hh : Measurable (Finset.univ.inf' univ_nonempty fU) := by apply Finset.inf'_induction · intro f hf g hg exact hf.min hg · intro t ht cases t with | none => simpa [fU] using hm x | some k => dsimp [fU] unfold Capacities.lowerLt Capacities.upperGt fun_prop convert hh using 1 funext v exact (Finset.inf'_apply (s := (Finset.univ : Finset (Option (Fin K)))) (C := fun _ : (ObservedDatum 𝒳 K → ℝ) => ℝ) univ_nonempty fU v).symm
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_projected_components · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:122
theorem survivorMassFromMassVector_chd

Directional differentiability of one screened cell score. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
θ :
ObservedDatum 𝒳 K → ℝ
x :
𝒳
hArm :
∀ z, 0 < massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = z))
Proof (Lean source)
theorem survivorMassFromMassVector_chd (θ : ObservedDatum 𝒳 K → ℝ) (x : 𝒳) (hArm : ∀ z, 0 < massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = z))) : HasContinuousHadamardDirDerivAt (fun v => survivorMassFromMassVector v x) θ := by exact (massSum_chd θ _).mul (projected_mass_chd θ x hArm)
CausalSmith.PartialID.SlateBenefitPartialTransport.survivorMassFromMassVector_chd · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:292
theorem projectedMassCapacity_empiricalProbabilityVector

the projected mass capacity empirical probability vector property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
Ω :
Type*
O :
ℕ → Ω → ObservedDatum 𝒳 K
n :
ω :
Ω
Proof (Lean source)
theorem projectedMassCapacity_empiricalProbabilityVector {Ω : Type*} (O : ℕ → Ω → ObservedDatum 𝒳 K) (n : ℕ) (ω : Ω) : projectedMassCapacity (empiricalProbabilityVector O n ω) = projectedCapacities O n ω := by unfold projectedMassCapacity projectedCapacities rw [Capacities.mk.injEq] constructor <;> funext x i <;> simp only [rawCapacities, capacitiesFromMassVector, massVectorSum_empiricalProbabilityVector] <;> rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.projectedMassCapacity_empiricalProbabilityVector · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:300
theorem survivorMassFromMassVector_empiricalProbabilityVector

the survivor mass from mass vector empirical probability vector property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
Ω :
Type*
O :
ℕ → Ω → ObservedDatum 𝒳 K
n :
ω :
Ω
x :
𝒳
Proof (Lean source)
CausalSmith.PartialID.SlateBenefitPartialTransport.survivorMassFromMassVector_empiricalProbabilityVector · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:311
theorem plugInEndpoints_eq_endpointFromMassVectorOn_of_screenedSupport_eq

On a nonempty recovered support, the guarded implementation agrees with the fixed-support mass-vector functional. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
Ω :
Type*
O :
ℕ → Ω → ObservedDatum 𝒳 K
η :
ℕ → ℝ
n :
ω :
Ω
support :
Finset 𝒳
:
0 < η n
hsupport :
support.Nonempty
hs :
screenedSupport O η n ω = support
Proof (Lean source)
theorem plugInEndpoints_eq_endpointFromMassVectorOn_of_screenedSupport_eq {Ω : Type*} (O : ℕ → Ω → ObservedDatum 𝒳 K) (η : ℕ → ℝ) (n : ℕ) (ω : Ω) (support : Finset 𝒳) (hη : 0 < η n) (hsupport : support.Nonempty) (hs : screenedSupport O η n ω = support) : plugInEndpoints O η n ω = endpointFromMassVectorOn support (empiricalProbabilityVector O n ω) := by classical have hscreenNonempty : (screenedSupport O η n ω).Nonempty := by rw [hs] exact hsupport have hscore : ∀ x ∈ screenedSupport O η n ω, 0 < empiricalCellMass O n ω x * (projectedCapacities O n ω).mass x := by intro x hx have hx' : screenedCell O η n ω x := by simpa [screenedSupport] using hx exact hη.trans hx' have hM : 0 < ∑ x ∈ screenedSupport O η n ω, empiricalCellMass O n ω x * (projectedCapacities O n ω).mass x := Finset.sum_pos hscore hscreenNonempty have hsum (f : 𝒳 → ℝ) : (∑ x, (if screenedCell O η n ω x then (1 : ℝ) else 0) * f x) = ∑ x ∈ screenedSupport O η n ω, f x := by simp only [screenedSupport, Finset.sum_filter] apply Finset.sum_congr rfl intro x hx by_cases h : screenedCell O η n ω x <;> simp [h] have hsum3 (f g : 𝒳 → ℝ) : (∑ x, (if screenedCell O η n ω x then (1 : ℝ) else 0) * f x * g x) = ∑ x ∈ screenedSupport O η n ω, f x * g x := by calc _ = ∑ x, (if screenedCell O η n ω x then (1 : ℝ) else 0) * (f x * g x) := by apply Finset.sum_congr rfl intro x hx ring _ = _ := hsum (fun x => f x * g x) rw [← hs] unfold plugInEndpoints endpointFromMassVectorOn dsimp only rw [hsum3, hsum3, hsum3, if_pos hM] rw [← projectedMassCapacity_empiricalProbabilityVector] simp_rw [massVectorSum_empiricalProbabilityVector] rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.plugInEndpoints_eq_endpointFromMassVectorOn_of_screenedSupport_eq · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:320
theorem endpointFromMassVectorOn_chd

Directional differentiability of the reduced-support endpoint, including all projection, mass-minimum, and finite threshold-tie faces. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
θ :
ObservedDatum 𝒳 K → ℝ
support :
Finset 𝒳
hArm :
∀ x ∈ support, ∀ z, 0 < massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = z))
hMass :
0 < ∑ x ∈ support, massVectorSum θ (fun o => decide (o.cell = x)) * (projectedMassCapacity θ).mass x
Proof (Lean source)
theorem endpointFromMassVectorOn_chd (θ : ObservedDatum 𝒳 K → ℝ) (support : Finset 𝒳) (hArm : ∀ x ∈ support, ∀ z, 0 < massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = z))) (hMass : 0 < ∑ x ∈ support, massVectorSum θ (fun o => decide (o.cell = x)) * (projectedMassCapacity θ).mass x) : HasContinuousHadamardDirDerivAt (endpointFromMassVectorOn support) θ := by have hp (x : 𝒳) := massSum_chd θ (fun o => decide (o.cell = x)) have hd : HasContinuousHadamardDirDerivAt (fun v => ∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).mass x) θ := HasContinuousHadamardDirDerivAt.finset_sum support fun x hx => (hp x).mul (projected_mass_chd θ x (hArm x hx)) have hnL : HasContinuousHadamardDirDerivAt (fun v => ∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).benefitLower x) θ := HasContinuousHadamardDirDerivAt.finset_sum support fun x hx => (hp x).mul (projected_benefitLower_chd θ x (hArm x hx)) have hnU : HasContinuousHadamardDirDerivAt (fun v => ∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).benefitUpper x) θ := HasContinuousHadamardDirDerivAt.finset_sum support fun x hx => (hp x).mul (projected_benefitUpper_chd θ x (hArm x hx)) change HasContinuousHadamardDirDerivAt (fun v => ((∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).benefitLower x) / (∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).mass x), (∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).benefitUpper x) / (∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).mass x))) θ have hratioL := HasContinuousHadamardDirDerivAt.div (f := fun v => ∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).benefitLower x) (g := fun v => ∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).mass x) (x := θ) hMass.ne' hnL hd have hratioU := HasContinuousHadamardDirDerivAt.div (f := fun v => ∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).benefitUpper x) (g := fun v => ∑ x ∈ support, massVectorSum v (fun o => decide (o.cell = x)) * (projectedMassCapacity v).mass x) (x := θ) hMass.ne' hnU hd exact hratioL.prod hratioU
CausalSmith.PartialID.SlateBenefitPartialTransport.endpointFromMassVectorOn_chd · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/EndpointDirectional.lean:438
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Helpers.Estimator 33 declarations All empirical probabilities are finite averages of event indicators.

Finite-cell plug-in endpoints and guarded confidence set

All empirical probabilities are finite averages of event indicators. Conditional ratios use zero when their empirical denominator is zero.

The empirical freq is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
E :
ObservedDatum 𝒳 K → Bool
n :
ω :
Ω
empiricalFreq O E n ω :
(n : ℝ)⁻¹ * ∑ r ∈ range n, if E (O r ω) then 1 else 0
CausalSmith.PartialID.SlateBenefitPartialTransport.empiricalFreq · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:20
def empiricalProbabilityVector

The empirical probability vector is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
n :
ω :
Ω
empiricalProbabilityVector O n ω :
ObservedDatum 𝒳 K → ℝ
fun o => empiricalFreq O (fun u => decide (u = o)) n ω
CausalSmith.PartialID.SlateBenefitPartialTransport.empiricalProbabilityVector · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:26
def empiricalConditional

The empirical conditional is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
num den :
empiricalConditional num den :
if 0 < den then num / den else 0
CausalSmith.PartialID.SlateBenefitPartialTransport.empiricalConditional · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:41
def empiricalCellMass Definition 24 in the paper ↗

The empirical cell mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
n :
ω :
Ω
x :
𝒳
empiricalCellMass O n ω x :
empiricalFreq O (fun o => decide (o.cell = x)) n ω
CausalSmith.PartialID.SlateBenefitPartialTransport.empiricalCellMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:45
def rawCapacities

The raw capacities is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
n :
ω :
Ω
rawCapacities O n ω :
Capacities 𝒳 K
clause 1
lower x i := empiricalConditional (empiricalSelectedOutcome O n ω x false false i) (empiricalArm O n ω x false)
- empiricalConditional (empiricalSelectedOutcome O n ω x false true i) (empiricalArm O n ω x true)
clause 2
upper x j := empiricalConditional (empiricalSelectedOutcome O n ω x true true j) (empiricalArm O n ω x true)
- empiricalConditional (empiricalSelectedOutcome O n ω x true false j) (empiricalArm O n ω x false)
CausalSmith.PartialID.SlateBenefitPartialTransport.rawCapacities · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:51
def projectedCapacities

The projected capacities is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
n :
ω :
Ω
projectedCapacities O n ω :
Capacities 𝒳 K
clause 1
lower x i := max ((rawCapacities O n ω).lower x i) 0
clause 2
upper x j := max ((rawCapacities O n ω).upper x j) 0
CausalSmith.PartialID.SlateBenefitPartialTransport.projectedCapacities · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:68

The screened cell condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
η :
ℕ → ℝ
n :
ω :
Ω
x :
𝒳
screenedCell O η n ω x :
Prop
η n < empiricalCellMass O n ω x * (projectedCapacities O n ω).mass x
CausalSmith.PartialID.SlateBenefitPartialTransport.screenedCell · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:77
def plugInEndpoints

The plug in endpoints is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
η :
ℕ → ℝ
n :
ω :
Ω
plugInEndpoints O η n ω :
ℝ × ℝ
by classical let ĉ := projectedCapacities O n ω let px := empiricalCellMass O n ω let keep := fun x
=> if screenedCell O η n ω x then (1 : ℝ) else 0 let Mhat := ∑ x, keep x * px x * ĉ.mass x let NLhat := ∑ x, keep x * px x * ĉ.benefitLower x let NUhat := ∑ x, keep x * px x * ĉ.benefitUpper x exact if 0 < Mhat then (NLhat / Mhat, NUhat / Mhat) else (0, 1)
CausalSmith.PartialID.SlateBenefitPartialTransport.plugInEndpoints · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:84

The positive support is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
p :
𝒳 → ℝ
positiveSupport c p :
Finset 𝒳
by classical exact Finset.univ.filter fun x => 0 < p x * c.mass x
CausalSmith.PartialID.SlateBenefitPartialTransport.positiveSupport · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:106

The screened support is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
η :
ℕ → ℝ
n :
ω :
Ω
screenedSupport O η n ω :
Finset 𝒳
by classical exact Finset.univ.filter fun x => screenedCell O η n ω x
CausalSmith.PartialID.SlateBenefitPartialTransport.screenedSupport · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:112
def massVectorSum

The mass vector sum is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
v :
ObservedDatum 𝒳 K → ℝ
E :
ObservedDatum 𝒳 K → Bool
massVectorSum v E :
∑ o with E o, v o
CausalSmith.PartialID.SlateBenefitPartialTransport.massVectorSum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:118
theorem massVectorSum_empiricalProbabilityVector

the mass vector sum empirical probability vector property holds.

Formal statement
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
E :
ObservedDatum 𝒳 K → Bool
n :
ω :
Ω
Proof (Lean source)
theorem massVectorSum_empiricalProbabilityVector (O : ℕ → Ω → ObservedDatum 𝒳 K) (E : ObservedDatum 𝒳 K → Bool) (n : ℕ) (ω : Ω) : massVectorSum (empiricalProbabilityVector O n ω) E = empiricalFreq O E n ω := by classical unfold massVectorSum empiricalProbabilityVector empiricalFreq simp only [Finset.mul_sum] rw [Finset.sum_comm] apply Finset.sum_congr rfl intro r hr by_cases hE : E (O r ω) = true · simp only [hE, Bool.true_eq, ↓reduceIte] rw [Finset.sum_eq_single (O r ω)] · simp · intro b hb hne simp [hne.symm] · intro hnot exact (hnot (by simp [hE])).elim · have hEf : E (O r ω) = false := Bool.eq_false_of_not_eq_true hE simp only [hEf, Bool.false_eq] rw [if_neg (by decide), mul_zero] apply Finset.sum_eq_zero intro o ho by_cases hor : O r ω = o · subst o exfalso exact hE (by simpa using ho) · simp [hor]
CausalSmith.PartialID.SlateBenefitPartialTransport.massVectorSum_empiricalProbabilityVector · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:123
theorem massVectorSum_measureReal

Summing the atom vector of a finite law over a Boolean event recovers the real measure of that event. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
Pobs :
E :
ObservedDatum 𝒳 K → Bool
massVectorSum (fun o => Pobs.real {o}) E = Pobs.real {o | E o = true}
Proof (Lean source)
theorem massVectorSum_measureReal [MeasurableSpace 𝒳] [MeasurableSingletonClass 𝒳] (Pobs : Measure (ObservedDatum 𝒳 K)) [IsFiniteMeasure Pobs] (E : ObservedDatum 𝒳 K → Bool) : massVectorSum (fun o => Pobs.real {o}) E = Pobs.real {o | E o = true} := by classical unfold massVectorSum rw [MeasureTheory.sum_measureReal_singleton] congr 1 ext o simp
CausalSmith.PartialID.SlateBenefitPartialTransport.massVectorSum_measureReal · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:153
def capacitiesFromMassVector

The capacities from mass vector is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
v :
ObservedDatum 𝒳 K → ℝ
capacitiesFromMassVector v :
Capacities 𝒳 K
clause 1
lower x i := empiricalConditional (massVectorSum v (fun o => decide (o.cell = x ∧ o.instrument = false ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some i))) (massVectorSum v (fun o => decide (o.cell = x ∧ o.instrument = false)))
- empiricalConditional (massVectorSum v (fun o => decide (o.cell = x ∧ o.instrument = true ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some i))) (massVectorSum v (fun o => decide (o.cell = x ∧ o.instrument = true)))
clause 2
upper x j := empiricalConditional (massVectorSum v (fun o => decide (o.cell = x ∧ o.instrument = true ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some j))) (massVectorSum v (fun o => decide (o.cell = x ∧ o.instrument = true)))
- empiricalConditional (massVectorSum v (fun o => decide (o.cell = x ∧ o.instrument = false ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some j))) (massVectorSum v (fun o => decide (o.cell = x ∧ o.instrument = false)))
CausalSmith.PartialID.SlateBenefitPartialTransport.capacitiesFromMassVector · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:165

The endpoint from mass vector on is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
support :
Finset 𝒳
v :
ObservedDatum 𝒳 K → ℝ
endpointFromMassVectorOn support v :
ℝ × ℝ
c :
{ lower := fun x i => max (raw.lower x i) 0 upper := fun x j => max (raw.upper x j) 0 } (: Capacities 𝒳 K)
p :
fun x => massVectorSum v (fun o => decide (o.cell = x))
M :
∑ x ∈ support, p x * c.mass x
((∑ x ∈ support, p x * c.benefitLower x) / M, (∑ x ∈ support, p x * c.benefitUpper x) / M)
CausalSmith.PartialID.SlateBenefitPartialTransport.endpointFromMassVectorOn · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:187
theorem benefitLower_eq_sup_explicit

Definitional expansion of the lower finite threshold envelope. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
c.benefitLower x
= Finset.univ.sup' univ_nonempty (fun t : Option (Fin K) => match t with | none => 0 | some k => c.lowerLe x k - c.upperLe x k + min (c.gap x) 0)
Proof (Lean source)
theorem benefitLower_eq_sup_explicit (c : Capacities 𝒳 K) (x : 𝒳) : c.benefitLower x = Finset.univ.sup' univ_nonempty (fun t : Option (Fin K) => match t with | none => 0 | some k => c.lowerLe x k - c.upperLe x k + min (c.gap x) 0) := rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitLower_eq_sup_explicit · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:199
theorem benefitUpper_eq_inf_explicit

Definitional expansion of the upper finite threshold envelope. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
c.benefitUpper x
= Finset.univ.inf' univ_nonempty (fun t : Option (Fin K) => match t with | none => c.mass x | some k => c.lowerLt x k + c.upperGt x k)
Proof (Lean source)
theorem benefitUpper_eq_inf_explicit (c : Capacities 𝒳 K) (x : 𝒳) : c.benefitUpper x = Finset.univ.inf' univ_nonempty (fun t : Option (Fin K) => match t with | none => c.mass x | some k => c.lowerLt x k + c.upperGt x k) := rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitUpper_eq_inf_explicit · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:208
def localizationTol

The localization tol is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
n :
η :
ℕ → ℝ
localizationTol n η :
((n : ℝ) * η n) ^ (-(1 : ℝ) / 4)
CausalSmith.PartialID.SlateBenefitPartialTransport.localizationTol · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:217
def estimatedActiveLower

The estimated active lower is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
a :
estimatedActiveLower c x a :
by classical exact Finset.univ.filter fun t
=> match t with | none => c.benefitLower x ≤ a | some k => c.benefitLower x
- (c.lowerLe x k - c.upperLe x k + min (c.gap x) 0) ≤ a
CausalSmith.PartialID.SlateBenefitPartialTransport.estimatedActiveLower · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:222
def estimatedActiveUpper

The estimated active upper is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
a :
estimatedActiveUpper c x a :
by classical exact Finset.univ.filter fun t
=> match t with | none => c.mass x
- c.benefitUpper x ≤ a | some k => c.lowerLt x k
+ c.upperGt x k
- c.benefitUpper x ≤ a
CausalSmith.PartialID.SlateBenefitPartialTransport.estimatedActiveUpper · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:233
def multiplierProcess Definition 27 in the paper ↗

The multiplier process is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
ξ :
ℕ → Ω → ℝ
n :
ω :
Ω
o :
multiplierProcess O ξ n ω o :
(n : ℝ) ^ (-(1 : ℝ) / 2) * ∑ r ∈ range n, ξ r ω * ((if O r ω = o then 1 else 0) - empiricalFreq O (fun u => decide (u = o)) n ω)
CausalSmith.PartialID.SlateBenefitPartialTransport.multiplierProcess · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:243
inductive GuardEventIndex

Indices for the three finite families of observable events used by the guard.

Definition (Lean source)
inductive GuardEventIndex (𝒳 : Type*) (K : ℕ) | cell (x : 𝒳) | arm (x : 𝒳) (z : Bool) | selectedOutcome (x : 𝒳) (z d : Bool) (k : Fin K) deriving DecidableEq, Fintype
CausalSmith.PartialID.SlateBenefitPartialTransport.GuardEventIndex · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:252
instance instDecidableEqGuardEventIndex

Guard-event indices have decidable equality.

Definition (Lean source)
deriving DecidableEq, Fintype
CausalSmith.PartialID.SlateBenefitPartialTransport.instDecidableEqGuardEventIndex · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:257
instance instFintypeGuardEventIndex

The guard-event index type has a canonical finite enumeration.

Definition (Lean source)
deriving DecidableEq, Fintype
CausalSmith.PartialID.SlateBenefitPartialTransport.instFintypeGuardEventIndex · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:257
def guardEvent

The guard event is the event specified by the stated potential-outcome conditions.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
e :
o :
guardEvent e o :
match e with | .cell x
=> decide (o.cell = x) | .arm x z => decide (o.cell = x ∧ o.instrument = z) | .selectedOutcome x z d k => decide (o.cell = x ∧ o.instrument = z ∧ o.treatment = d ∧ o.selected = true ∧ o.outcome = some k)
CausalSmith.PartialID.SlateBenefitPartialTransport.guardEvent · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:265

The guard events is the event specified by the stated potential-outcome conditions.

Definition (Lean source)
𝒳 :
Type*
Fintype 𝒳
K :
guardEvents 𝒳 K :
CausalSmith.PartialID.SlateBenefitPartialTransport.guardEvents · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:273
def maxDeviation

The max deviation is the measure produced by the stated finite slate-benefit construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
n :
ω :
Ω
maxDeviation O Pobs n ω :
by classical exact if h : (guardEvents 𝒳 K).Nonempty then (guardEvents 𝒳 K).sup' h fun E
=> |empiricalFreq O (guardEvent E) n ω - Pobs.real {o | guardEvent E o = true}| else 0
CausalSmith.PartialID.SlateBenefitPartialTransport.maxDeviation · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:279
def unionThreshold

The union threshold is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type*
Fintype 𝒳
K n :
α :
unionThreshold 𝒳 K n α :
sqrt ((guardEvents 𝒳 K).card / (4 * (n : ℝ) * α))
CausalSmith.PartialID.SlateBenefitPartialTransport.unionThreshold · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:290
def errorEnvelope

The error envelope is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type*
Fintype 𝒳
K n :
η :
ℕ → ℝ
εZ α :
errorEnvelope 𝒳 K n η εZ α :
(64 * (K : ℝ) * (Fintype.card 𝒳 : ℝ) / εZ ^ 2) * unionThreshold 𝒳 K n α
+ (Fintype.card 𝒳 : ℝ) * η n
CausalSmith.PartialID.SlateBenefitPartialTransport.errorEnvelope · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:296

The guard radius is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type*
Fintype 𝒳
Nonempty 𝒳
K n :
η :
ℕ → ℝ
mstar εZ α :
_hK :
3 ≤ K
_hn :
1 ≤ n
_hEta :
0 < η n
_hmstar :
0 < mstar
_hEpsilon :
0 < εZ ∧ εZ < (1 : ℝ) / 2
_hAlpha :
0 < α ∧ α < 1
guardRadius 𝒳 K n η mstar εZ α _hK _hn _hEta _hmstar _hEpsilon _hAlpha :
min 1 (4 * errorEnvelope 𝒳 K n η εZ α / mstar)
CausalSmith.PartialID.SlateBenefitPartialTransport.guardRadius · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:303

The finite near-active diagnostic retained alongside the conservative set.

Definition (Lean source)
𝒳 :
Type*
K :
confidenceSet :
Set
lowerThresholdFaces :
𝒳 → Finset (Option (Fin K))
upperThresholdFaces :
𝒳 → Finset (Option (Fin K))
zeroGapFaces :
Finset 𝒳
massMinimumFaces :
Finset 𝒳
projectionFaces :
Finset (𝒳 × Bool × Fin K)
multiplierEnvelope :
ObservedDatum 𝒳 K → ℝ
CausalSmith.PartialID.SlateBenefitPartialTransport.GuardedInferenceHandle · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:312
def guardedConfidenceSet

The guarded confidence set is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
Nonempty 𝒳
O :
ℕ → Ω → ObservedDatum 𝒳 K
ξ :
ℕ → Ω → ℝ
η :
ℕ → ℝ
mstar εZ α :
:
0 < α ∧ α < 1
hmstar :
0 < mstar
hεZ :
0 < εZ ∧ εZ < (1 : ℝ) / 2
n :
hK :
3 ≤ K
hn :
1 ≤ n
:
0 < η n
ω :
Ω
guardedConfidenceSet O ξ η mstar εZ α hα hmstar hεZ n hK hn hη ω :
by classical let c := projectedCapacities O n ω let a := localizationTol n η let ψ := plugInEndpoints O η n ω let g := guardRadius 𝒳 K n η mstar εZ α hK hn hη hmstar hεZ hα exact { confidenceSet := Icc (max 0 (ψ.1 - g)) (min 1 (ψ.2 + g)) lowerThresholdFaces := fun x => if screenedCell O η n ω x then estimatedActiveLower c x a else ∅ upperThresholdFaces := fun x => if screenedCell O η n ω x then estimatedActiveUpper c x a else ∅ zeroGapFaces := Finset.univ.filter fun x => screenedCell O η n ω x ∧ c.gap x = 0 massMinimumFaces := Finset.univ.filter fun x => screenedCell O η n ω x ∧ c.q0 x = c.q1 x projectionFaces := (Finset.univ.product (Finset.univ.product univ)).filter fun xbi => screenedCell O η n ω xbi.1 ∧ if xbi.2.1 then (rawCapacities O n ω).upper xbi.1 xbi.2.2 ≤ 0 else (rawCapacities O n ω).lower xbi.1 xbi.2.2 ≤ 0 multiplierEnvelope := fun o => if screenedCell O η n ω o.cell then multiplierProcess O ξ n ω o else 0 }
CausalSmith.PartialID.SlateBenefitPartialTransport.guardedConfidenceSet · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:323

The guarded confidence interval is the event specified by the stated potential-outcome conditions.

Definition (Lean source)
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
Nonempty 𝒳
O :
ℕ → Ω → ObservedDatum 𝒳 K
ξ :
ℕ → Ω → ℝ
η :
ℕ → ℝ
mstar εZ α :
:
0 < α ∧ α < 1
hmstar :
0 < mstar
hεZ :
0 < εZ ∧ εZ < (1 : ℝ) / 2
n :
hK :
3 ≤ K
hn :
1 ≤ n
:
0 < η n
ω :
Ω
guardedConfidenceInterval O ξ η mstar εZ α hα hmstar hεZ n hK hn hη ω :
Set
(guardedConfidenceSet O ξ η mstar εZ α hα hmstar hεZ n hK hn hη ω).confidenceSet
CausalSmith.PartialID.SlateBenefitPartialTransport.guardedConfidenceInterval · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Estimator.lean:355
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Helpers.FullLawPasting 63 declarations This module supplies a universe-polymorphic finite atom space and reuses the original slate's native node value spaces for the canonical structural law.

Finite full-law pasting substrate

This module supplies a universe-polymorphic finite atom space and reuses the original slate's native node value spaces for the canonical structural law.

structure ThresholdAtom

One atom stores the covariate, instrument, and the six latent arms.

Definition (Lean source)
structure ThresholdAtom (𝒳 : Type uCell) (K : ℕ) where x : 𝒳 z : Bool d0 : Bool d1 : Bool s0 : Bool s1 : Bool y0 : Fin K y1 : Fin K deriving DecidableEq
CausalSmith.PartialID.SlateBenefitPartialTransport.ThresholdAtom · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:25
instance instDecidableEqThresholdAtom

Threshold atoms have decidable equality.

Definition (Lean source)
deriving DecidableEq
CausalSmith.PartialID.SlateBenefitPartialTransport.instDecidableEqThresholdAtom · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:35
instance instFintypeThresholdAtom

This declaration supplies the canonical canonical fintype threshold atom typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
instance : Fintype (ThresholdAtom 𝒳 K) := Fintype.ofEquiv (ThresholdAtomTuple 𝒳 K) thresholdAtomEquiv.symm
CausalSmith.PartialID.SlateBenefitPartialTransport.instFintypeThresholdAtom · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:55
def ThresholdIndex

The threshold index is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type uCell
Fintype 𝒳
K :
ThresholdIndex 𝒳 K :
Type
CausalSmith.PartialID.SlateBenefitPartialTransport.ThresholdIndex · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:59
structure ThresholdOmega

A threshold omega records the data and compatibility conditions used by the slate-benefit partial-transport construction.

Definition (Lean source)
w, u :
𝒳 :
Type u
Fintype 𝒳
K :
down :
CausalSmith.PartialID.SlateBenefitPartialTransport.ThresholdOmega · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:63
instance instMeasurableSpaceThresholdOmega

This declaration supplies the canonical canonical measurable space threshold omega typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
instance : MeasurableSpace (ThresholdOmega.{uOmega} 𝒳 K) := ⊤
CausalSmith.PartialID.SlateBenefitPartialTransport.instMeasurableSpaceThresholdOmega · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:68
instance instDiscreteMeasurableSpaceThresholdOmega

This declaration supplies the canonical canonical discrete measurable space threshold omega typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
instance : DiscreteMeasurableSpace (ThresholdOmega.{uOmega} 𝒳 K) := ⟨fun _ => MeasurableSet.of_discrete⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.instDiscreteMeasurableSpaceThresholdOmega · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:71
instance instFintypeThresholdOmega

This declaration supplies the canonical canonical fintype threshold omega typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
instance : Fintype (ThresholdOmega.{uOmega} 𝒳 K) := Fintype.ofEquiv (ThresholdIndex 𝒳 K) { toFun := ThresholdOmega.mk invFun := ThresholdOmega.down left_inv := fun _ => rfl right_inv := fun a => by cases a; rfl }
CausalSmith.PartialID.SlateBenefitPartialTransport.instFintypeThresholdOmega · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:75
def thresholdAtomAt

The threshold atom at is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
ω :
ThresholdOmega.{uOmega} 𝒳 K
thresholdAtomAt ω :
(Fintype.equivFin (ThresholdAtom 𝒳 K)).symm ω.down
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdAtomAt · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:83
def thresholdEval

Structural evaluator on finite atom indices. The original node carrier and native value family are retained, avoiding any universe-lowering assumption.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
r :
Regime P.V P.X
ω :
ThresholdOmega.{uOmega} 𝒳 K
v :
thresholdEval S r ω v :
P.X v
by classical intro v let a := thresholdAtomAt ω if hv : v ∈ r.target then exact r.assign v hv else if hx : v
= S.xNode then exact hx ▸ S.hX.symm a.x else if hz : v = S.zNode then exact hz ▸ S.hZ.symm a.z else if hd : v = S.dNode then exact hd ▸ S.hD.symm (atomDArm (effectiveZ S r a) a) else if hs : v = S.sNode then exact hs ▸ S.hS.symm (atomSArm (effectiveD S r a) a) else if hy : v = S.yNode then exact hy ▸ S.hY.symm (atomYArm (effectiveD S r a) a) else exact P.eval Regime.empty (choice (nonempty_of_isProbabilityMeasure P.μ)) v
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdEval · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:106
theorem measurable_thresholdEval

the threshold eval map is measurable.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
r :
Regime P.V P.X
Measurable (thresholdEval S r : ThresholdOmega.{uOmega} 𝒳 K → ∀ v, P.X v)
Proof (Lean source)
@[fun_prop] theorem measurable_thresholdEval {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (r : Regime P.V P.X) : Measurable (thresholdEval S r : ThresholdOmega.{uOmega} 𝒳 K → ∀ v, P.X v) := by exact measurable_from_top
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_thresholdEval · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:130
theorem thresholdEval_x_empty

the threshold eval x empty property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
ω :
ThresholdOmega.{uOmega} 𝒳 K
S.hX (thresholdEval S Regime.empty ω S.xNode) = (thresholdAtomAt ω).x
Proof (Lean source)
@[simp] theorem thresholdEval_x_empty {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (ω : ThresholdOmega.{uOmega} 𝒳 K) : S.hX (thresholdEval S Regime.empty ω S.xNode) = (thresholdAtomAt ω).x := by simp [thresholdEval, Regime.empty]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdEval_x_empty · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:137
theorem thresholdEval_z_empty

the threshold eval z empty property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
ω :
ThresholdOmega.{uOmega} 𝒳 K
S.hZ (thresholdEval S Regime.empty ω S.zNode) = (thresholdAtomAt ω).z
Proof (Lean source)
@[simp] theorem thresholdEval_z_empty {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (ω : ThresholdOmega.{uOmega} 𝒳 K) : S.hZ (thresholdEval S Regime.empty ω S.zNode) = (thresholdAtomAt ω).z := by simp only [thresholdEval, Regime.empty, Set.mem_empty_iff_false, ↓reduceDIte] rw [dif_neg S.hXZ.symm] simp
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdEval_z_empty · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:143
theorem thresholdEval_d_empty

the threshold eval d empty property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
ω :
ThresholdOmega.{uOmega} 𝒳 K
S.hD (thresholdEval S Regime.empty ω S.dNode)
= atomDArm (thresholdAtomAt ω).z (thresholdAtomAt ω)
Proof (Lean source)
@[simp] theorem thresholdEval_d_empty {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (ω : ThresholdOmega.{uOmega} 𝒳 K) : S.hD (thresholdEval S Regime.empty ω S.dNode) = atomDArm (thresholdAtomAt ω).z (thresholdAtomAt ω) := by simp only [thresholdEval, Regime.empty, Set.mem_empty_iff_false, ↓reduceDIte] rw [dif_neg S.hXD.symm, dif_neg S.hZD.symm] simp [effectiveZ]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdEval_d_empty · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:151
theorem thresholdEval_s_empty

the threshold eval s empty property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
ω :
ThresholdOmega.{uOmega} 𝒳 K
S.hS (thresholdEval S Regime.empty ω S.sNode)
= atomSArm (atomDArm (thresholdAtomAt ω).z (thresholdAtomAt ω)) (thresholdAtomAt ω)
Proof (Lean source)
@[simp] theorem thresholdEval_s_empty {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (ω : ThresholdOmega.{uOmega} 𝒳 K) : S.hS (thresholdEval S Regime.empty ω S.sNode) = atomSArm (atomDArm (thresholdAtomAt ω).z (thresholdAtomAt ω)) (thresholdAtomAt ω) := by simp only [thresholdEval, Regime.empty, Set.mem_empty_iff_false, ↓reduceDIte] rw [dif_neg S.hXS.symm, dif_neg S.hZS.symm, dif_neg S.hDS.symm] simp [effectiveD, effectiveZ]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdEval_s_empty · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:160
theorem thresholdEval_y_empty

the threshold eval y empty property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
ω :
ThresholdOmega.{uOmega} 𝒳 K
S.hY (thresholdEval S Regime.empty ω S.yNode)
= atomYArm (atomDArm (thresholdAtomAt ω).z (thresholdAtomAt ω)) (thresholdAtomAt ω)
Proof (Lean source)
@[simp] theorem thresholdEval_y_empty {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (ω : ThresholdOmega.{uOmega} 𝒳 K) : S.hY (thresholdEval S Regime.empty ω S.yNode) = atomYArm (atomDArm (thresholdAtomAt ω).z (thresholdAtomAt ω)) (thresholdAtomAt ω) := by simp only [thresholdEval, Regime.empty, Set.mem_empty_iff_false, ↓reduceDIte] rw [dif_neg S.hXY.symm, dif_neg S.hZY.symm, dif_neg S.hDY.symm, dif_neg S.hSY.symm] simp [effectiveD, effectiveZ]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdEval_y_empty · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:170
def thresholdAtomicMeasure

The atomic measure associated with real weights on the high-universe atom description, represented on a small finite index type.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
weight :
ThresholdAtom 𝒳 K → ℝ
thresholdAtomicMeasure weight :
Measure (ThresholdOmega.{uOmega} 𝒳 K)
∑ i : ThresholdIndex 𝒳 K, ofReal (weight ((Fintype.equivFin (ThresholdAtom 𝒳 K)).symm i)) • Measure.dirac (ThresholdOmega.mk i)
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdAtomicMeasure · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:180
theorem thresholdAtomicMeasure_univ

Given the stated hypotheses, the threshold atomic measure univ property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
hsum :
∑ a, weight a = 1
(thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) univ = 1
Proof (Lean source)
theorem thresholdAtomicMeasure_univ (weight : ThresholdAtom 𝒳 K → ℝ) (hweight : ∀ a, 0 ≤ weight a) (hsum : ∑ a, weight a = 1) : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) univ = 1 := by unfold thresholdAtomicMeasure simp only [Measure.coe_finset_sum, Finset.sum_apply, Measure.coe_smul, Pi.smul_apply, smul_eq_mul, Measure.dirac_apply' _ MeasurableSet.univ, Set.indicator_univ, Pi.one_apply, mul_one] rw [← ENNReal.ofReal_sum_of_nonneg (fun i _ => hweight _)] have hindex : (∑ i : ThresholdIndex 𝒳 K, weight ((Fintype.equivFin (ThresholdAtom 𝒳 K)).symm i)) = ∑ a : ThresholdAtom 𝒳 K, weight a := by symm exact Fintype.sum_equiv (Fintype.equivFin (ThresholdAtom 𝒳 K)) weight (fun i => weight ((Fintype.equivFin (ThresholdAtom 𝒳 K)).symm i)) (fun a => by simp) rw [hindex, hsum] simp
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdAtomicMeasure_univ · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:188
theorem thresholdAtomicMeasure_atom

The canonical atomic measure assigns each decoded atom its specified real weight. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
a :
(thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | thresholdAtomAt ω = a}
= weight a
Proof (Lean source)
theorem thresholdAtomicMeasure_atom (weight : ThresholdAtom 𝒳 K → ℝ) (hweight : ∀ a, 0 ≤ weight a) (a : ThresholdAtom 𝒳 K) : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | thresholdAtomAt ω = a} = weight a := by unfold thresholdAtomicMeasure Measure.real simp only [Measure.coe_finset_sum, Finset.sum_apply, Measure.coe_smul, Pi.smul_apply, smul_eq_mul] rw [Finset.sum_eq_single ((Fintype.equivFin (ThresholdAtom 𝒳 K)) a)] · simp [Measure.dirac_apply', thresholdAtomAt, hweight] · intro i _ hi have hdecode : (Fintype.equivFin (ThresholdAtom 𝒳 K)).symm i ≠ a := by intro h apply hi simpa using congrArg (Fintype.equivFin (ThresholdAtom 𝒳 K)) h simp [Measure.dirac_apply', thresholdAtomAt, hdecode] · simp
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdAtomicMeasure_atom · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:209
theorem thresholdAtomicMeasure_event

Every finite event on decoded atoms has mass equal to the sum of its atom weights. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
hsum :
∑ a, weight a = 1
q :
ThresholdAtom 𝒳 K → Prop
(thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | q (thresholdAtomAt ω)}
= ∑ a, if q a then weight a else 0
Proof (Lean source)
theorem thresholdAtomicMeasure_event (weight : ThresholdAtom 𝒳 K → ℝ) (hweight : ∀ a, 0 ≤ weight a) (hsum : ∑ a, weight a = 1) (q : ThresholdAtom 𝒳 K → Prop) [DecidablePred q] : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | q (thresholdAtomAt ω)} = ∑ a, if q a then weight a else 0 := by letI : IsProbabilityMeasure (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) := ⟨thresholdAtomicMeasure_univ weight hweight hsum⟩ let I := {a : ThresholdAtom 𝒳 K // q a} let E : I → Set (ThresholdOmega.{uOmega} 𝒳 K) := fun a => {ω | thresholdAtomAt ω = a.1} have hdisj : Pairwise (fun a b => Disjoint (E a) (E b)) := by intro a b hab apply Set.disjoint_left.2 intro ω ha hb apply hab exact Subtype.ext (ha.symm.trans hb) have hmeas : ∀ a, MeasurableSet (E a) := fun _ => MeasurableSet.of_discrete rw [show {ω | q (thresholdAtomAt ω)} = ⋃ a : I, E a by ext ω simp only [Set.mem_setOf_eq, Set.mem_iUnion, E] constructor · intro hq exact ⟨⟨thresholdAtomAt ω, hq⟩, rfl⟩ · rintro ⟨a, ha⟩ simpa [ha] using a.2] rw [measureReal_iUnion_fintype hdisj hmeas] change (∑ a : I, (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | thresholdAtomAt ω = a.1}) = _ simp_rw [thresholdAtomicMeasure_atom weight hweight] classical rw [← Finset.sum_filter] symm exact Finset.sum_subtype (Finset.univ.filter q) (by simp) weight
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdAtomicMeasure_event · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:228
def canonicalThresholdPOSystem

A normalized nonnegative atom table gives a PO system in exactly the universe parameters of the supplied system.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
hsum :
∑ a, weight a = 1
canonicalThresholdPOSystem S weight hweight hsum :
POSystem.{uV, uVal, uOmega}
by letI : IsProbabilityMeasure (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) := ⟨thresholdAtomicMeasure_univ weight hweight hsum⟩ exact { V := P.V X := P.X Ω := ThresholdOmega.{uOmega} 𝒳 K μ := thresholdAtomicMeasure weight eval := thresholdEval S measurable_eval := measurable_thresholdEval S }
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdPOSystem · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:266
def canonicalThresholdSlate

The canonical slate reuses all five original nodes and measurable equivalences on the finite atomic PO system.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
hsum :
∑ a, weight a = 1
canonicalThresholdSlate S weight hweight hsum :
POSlateSystem (canonicalThresholdPOSystem S weight hweight hsum) 𝒳 K
clause 1
hK := S.hK
clause 2
xNode := S.xNode
clause 3
zNode := S.zNode
clause 4
dNode := S.dNode
clause 5
sNode := S.sNode
clause 6
yNode := S.yNode
clause 7
hX := S.hX
clause 8
hZ := S.hZ
clause 9
hD := S.hD
clause 10
hS := S.hS
clause 11
hY := S.hY
clause 12
hXZ := S.hXZ
clause 13
hXD := S.hXD
clause 14
hXS := S.hXS
clause 15
hXY := S.hXY
clause 16
hZD := S.hZD
clause 17
hZS := S.hZS
clause 18
hZY := S.hZY
clause 19
hDS := S.hDS
clause 20
hDY := S.hDY
clause 21
hSY := S.hSY
clause 22
borel := by change StandardBorelSpace (ThresholdOmega.{uOmega} 𝒳 K) infer_instance
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdSlate · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:283
theorem canonicalThresholdSlate_factualX

Given the stated hypotheses, the canonical threshold slate factual x property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
hsum :
∑ a, weight a = 1
ω :
ThresholdOmega.{uOmega} 𝒳 K
(canonicalThresholdSlate S weight hweight hsum).factualX ω = (thresholdAtomAt ω).x
Proof (Lean source)
@[simp] theorem canonicalThresholdSlate_factualX {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (weight : ThresholdAtom 𝒳 K → ℝ) (hweight : ∀ a, 0 ≤ weight a) (hsum : ∑ a, weight a = 1) (ω : ThresholdOmega.{uOmega} 𝒳 K) : (canonicalThresholdSlate S weight hweight hsum).factualX ω = (thresholdAtomAt ω).x := by change S.hX (thresholdEval S Regime.empty ω S.xNode) = _ exact thresholdEval_x_empty S ω
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdSlate_factualX · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:314
theorem canonicalThresholdSlate_factualZ

Given the stated hypotheses, the canonical threshold slate factual z property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
hsum :
∑ a, weight a = 1
ω :
ThresholdOmega.{uOmega} 𝒳 K
(canonicalThresholdSlate S weight hweight hsum).factualZ ω = (thresholdAtomAt ω).z
Proof (Lean source)
@[simp] theorem canonicalThresholdSlate_factualZ {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (weight : ThresholdAtom 𝒳 K → ℝ) (hweight : ∀ a, 0 ≤ weight a) (hsum : ∑ a, weight a = 1) (ω : ThresholdOmega.{uOmega} 𝒳 K) : (canonicalThresholdSlate S weight hweight hsum).factualZ ω = (thresholdAtomAt ω).z := by change S.hZ (thresholdEval S Regime.empty ω S.zNode) = _ exact thresholdEval_z_empty S ω
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdSlate_factualZ · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:324
theorem canonicalThresholdSlate_DofZ

Given the stated hypotheses, the canonical threshold slate dof z property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
hsum :
∑ a, weight a = 1
z :
ω :
ThresholdOmega.{uOmega} 𝒳 K
(canonicalThresholdSlate S weight hweight hsum).DofZ z ω
= if z then (thresholdAtomAt ω).d1 else (thresholdAtomAt ω).d0
Proof (Lean source)
@[simp] theorem canonicalThresholdSlate_DofZ {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (weight : ThresholdAtom 𝒳 K → ℝ) (hweight : ∀ a, 0 ≤ weight a) (hsum : ∑ a, weight a = 1) (z : Bool) (ω : ThresholdOmega.{uOmega} 𝒳 K) : (canonicalThresholdSlate S weight hweight hsum).DofZ z ω = if z then (thresholdAtomAt ω).d1 else (thresholdAtomAt ω).d0 := by change S.hD (thresholdEval S (Regime.single S.zNode (S.hZ.symm z)) ω S.dNode) = _ have hdZ : S.dNode ≠ S.zNode := S.hZD.symm have hdX : S.dNode ≠ S.xNode := S.hXD.symm simp [thresholdEval, Regime.single, effectiveZ, atomDArm, hdZ, hdX]
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdSlate_DofZ · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:334
theorem canonicalThresholdSlate_SofD

Given the stated hypotheses, the canonical threshold slate sof d property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
hsum :
∑ a, weight a = 1
d :
ω :
ThresholdOmega.{uOmega} 𝒳 K
(canonicalThresholdSlate S weight hweight hsum).SofD d ω
= if d then (thresholdAtomAt ω).s1 else (thresholdAtomAt ω).s0
Proof (Lean source)
@[simp] theorem canonicalThresholdSlate_SofD {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (weight : ThresholdAtom 𝒳 K → ℝ) (hweight : ∀ a, 0 ≤ weight a) (hsum : ∑ a, weight a = 1) (d : Bool) (ω : ThresholdOmega.{uOmega} 𝒳 K) : (canonicalThresholdSlate S weight hweight hsum).SofD d ω = if d then (thresholdAtomAt ω).s1 else (thresholdAtomAt ω).s0 := by change S.hS (thresholdEval S (Regime.single S.dNode (S.hD.symm d)) ω S.sNode) = _ have hsD : S.sNode ≠ S.dNode := S.hDS.symm have hsX : S.sNode ≠ S.xNode := S.hXS.symm have hsZ : S.sNode ≠ S.zNode := S.hZS.symm simp [thresholdEval, Regime.single, effectiveD, atomSArm, hsD, hsX, hsZ]
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdSlate_SofD · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:346
theorem canonicalThresholdSlate_YofD

Given the stated hypotheses, the canonical threshold slate yof d property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
hsum :
∑ a, weight a = 1
d :
ω :
ThresholdOmega.{uOmega} 𝒳 K
(canonicalThresholdSlate S weight hweight hsum).YofD d ω
= if d then (thresholdAtomAt ω).y1 else (thresholdAtomAt ω).y0
Proof (Lean source)
@[simp] theorem canonicalThresholdSlate_YofD {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (weight : ThresholdAtom 𝒳 K → ℝ) (hweight : ∀ a, 0 ≤ weight a) (hsum : ∑ a, weight a = 1) (d : Bool) (ω : ThresholdOmega.{uOmega} 𝒳 K) : (canonicalThresholdSlate S weight hweight hsum).YofD d ω = if d then (thresholdAtomAt ω).y1 else (thresholdAtomAt ω).y0 := by change S.hY (thresholdEval S (Regime.single S.dNode (S.hD.symm d)) ω S.yNode) = _ have hyD : S.yNode ≠ S.dNode := S.hDY.symm have hyX : S.yNode ≠ S.xNode := S.hXY.symm have hyZ : S.yNode ≠ S.zNode := S.hZY.symm have hyS : S.yNode ≠ S.sNode := S.hSY.symm simp [thresholdEval, Regime.single, effectiveD, atomYArm, hyD, hyX, hyZ, hyS]
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdSlate_YofD · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:359
def ThresholdCellTable

A conditional latent table in each covariate cell.

Definition (Lean source)
𝒳 :
Type uCell
K :
ThresholdCellTable 𝒳 K :
Type uCell
𝒳 → BoolBoolBoolBoolFin K → Fin K → ℝ
CausalSmith.PartialID.SlateBenefitPartialTransport.ThresholdCellTable · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:373
def Nonnegative

A conditional latent cell table is nonnegative when every entry is at least zero, that is, when the weight it assigns to each joint value of the two potential treatments, the two potential selection indicators, and the two potential ordered outcomes is nonnegative in every covariate cell.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
T :
x d0 d1 s0 s1 y0 y1 :
Nonnegative T :
Prop
0 ≤ T x d0 d1 s0 s1 y0 y1
CausalSmith.PartialID.SlateBenefitPartialTransport.ThresholdCellTable.Nonnegative · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:377
def Normalized

A conditional latent cell table is normalized when, within each covariate cell, its weights sum to one over all joint values of the two potential treatments, the two potential selection indicators, and the two potential ordered outcomes, so that every cell carries a conditional probability distribution over latent types.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
T :
x :
Normalized T :
Prop
∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, T x d0 d1 s0 s1 y0 y1 = 1
CausalSmith.PartialID.SlateBenefitPartialTransport.ThresholdCellTable.Normalized · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:381
def atomInstrumentMass

The atom instrument mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
x :
𝒳
z :
atomInstrumentMass S x z :
if z then S.propensity x else 1 - S.propensity x
CausalSmith.PartialID.SlateBenefitPartialTransport.atomInstrumentMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:386
def thresholdPastedWeight

Joint atom weights obtained from the observed covariate mass, conditional instrument propensity, and a normalized conditional latent table.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
T :
a :
thresholdPastedWeight S T a :
S.p a.x * atomInstrumentMass S a.x a.z * T a.x a.d0 a.d1 a.s0 a.s1 a.y0 a.y1
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdPastedWeight · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:391
theorem thresholdPastedWeight_nonnegative

Given the stated hypotheses, threshold pasted weight is nonnegative.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hT :
T.Nonnegative
a :
Proof (Lean source)
theorem thresholdPastedWeight_nonnegative {P : POSystem} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hT : T.Nonnegative) : ∀ a, 0 ≤ thresholdPastedWeight S T a := by intro a apply mul_nonneg · apply mul_nonneg (hp a.x) unfold atomInstrumentMass cases a.z · simpa using sub_nonneg.mpr (hprop a.x).2 · exact (hprop a.x).1 · exact hT _ _ _ _ _ _ _
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdPastedWeight_nonnegative · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:399
theorem thresholdPastedWeight_sum_one

Given the stated hypotheses, the threshold pasted weight sum one property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
T :
hT :
T.Normalized
∑ a, thresholdPastedWeight S T a = 1
Proof (Lean source)
theorem thresholdPastedWeight_sum_one {P : POSystem} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hT : T.Normalized) : ∑ a, thresholdPastedWeight S T a = 1 := by unfold ThresholdCellTable.Normalized at hT let tupleWeight : ThresholdAtomTuple 𝒳 K → ℝ := fun a => S.p a.1 * atomInstrumentMass S a.1 a.2.1 * T a.1 a.2.2.1 a.2.2.2.1 a.2.2.2.2.1 a.2.2.2.2.2.1 a.2.2.2.2.2.2.1 a.2.2.2.2.2.2.2 calc (∑ a, thresholdPastedWeight S T a) = ∑ a : ThresholdAtomTuple 𝒳 K, tupleWeight a := Fintype.sum_equiv thresholdAtomEquiv _ _ (fun a => rfl) _ = 1 := by dsimp [tupleWeight] simp only [Fintype.sum_prod_type] simp_rw [← Finset.mul_sum] simp_rw [hT] simp only [mul_one] simp only [atomInstrumentMass, Fintype.sum_bool, Bool.false_eq_true, ↓reduceIte, Bool.true_eq_false] rw [show (∑ x, (S.p x * S.propensity x + S.p x * (1 - S.propensity x))) = ∑ x, S.p x by apply Finset.sum_congr rfl intro x _ ring] exact sum_cellProbability S
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdPastedWeight_sum_one · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:434
def canonicalThresholdCandidate

Canonical full-law candidate generated by a normalized nonnegative cell table.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized :
weight :
hweight :
thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative
hsum :
{ system := canonicalThresholdPOSystem S weight hweight hsum slate := canonicalThresholdSlate S weight hweight hsum }
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:463
theorem canonicalThresholdCandidate_fullAtom

Given the stated hypotheses, the canonical threshold candidate full atom property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
a :
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
W.system.μ.real {ω | W.slate.factualX ω = a.x ∧ W.slate.factualZ ω = a.z ∧ W.slate.D0 ω = a.d0 ∧ W.slate.D1 ω = a.d1 ∧ W.slate.S0 ω = a.s0 ∧ W.slate.S1 ω = a.s1 ∧ W.slate.Y0 ω = a.y0 ∧ W.slate.Y1 ω = a.y1}
Proof (Lean source)
theorem canonicalThresholdCandidate_fullAtom {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) (a : ThresholdAtom 𝒳 K) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized W.system.μ.real {ω | W.slate.factualX ω = a.x ∧ W.slate.factualZ ω = a.z ∧ W.slate.D0 ω = a.d0 ∧ W.slate.D1 ω = a.d1 ∧ W.slate.S0 ω = a.s0 ∧ W.slate.S1 ω = a.s1 ∧ W.slate.Y0 ω = a.y0 ∧ W.slate.Y1 ω = a.y1} = thresholdPastedWeight S T a := by dsimp only let weight := thresholdPastedWeight S T let hweight := thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative let hsum := thresholdPastedWeight_sum_one S T hTnormalized change (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | (canonicalThresholdSlate S weight hweight hsum).factualX ω = a.x ∧ (canonicalThresholdSlate S weight hweight hsum).factualZ ω = a.z ∧ (canonicalThresholdSlate S weight hweight hsum).D0 ω = a.d0 ∧ (canonicalThresholdSlate S weight hweight hsum).D1 ω = a.d1 ∧ (canonicalThresholdSlate S weight hweight hsum).S0 ω = a.s0 ∧ (canonicalThresholdSlate S weight hweight hsum).S1 ω = a.s1 ∧ (canonicalThresholdSlate S weight hweight hsum).Y0 ω = a.y0 ∧ (canonicalThresholdSlate S weight hweight hsum).Y1 ω = a.y1} = weight a rw [show ({ω | (canonicalThresholdSlate S weight hweight hsum).factualX ω = a.x ∧ (canonicalThresholdSlate S weight hweight hsum).factualZ ω = a.z ∧ (canonicalThresholdSlate S weight hweight hsum).D0 ω = a.d0 ∧ (canonicalThresholdSlate S weight hweight hsum).D1 ω = a.d1 ∧ (canonicalThresholdSlate S weight hweight hsum).S0 ω = a.s0 ∧ (canonicalThresholdSlate S weight hweight hsum).S1 ω = a.s1 ∧ (canonicalThresholdSlate S weight hweight hsum).Y0 ω = a.y0 ∧ (canonicalThresholdSlate S weight hweight hsum).Y1 ω = a.y1} : Set (ThresholdOmega.{uOmega} 𝒳 K)) = {ω | thresholdAtomAt ω = a} by ext ω simp only [Set.mem_setOf_eq, canonicalThresholdSlate_factualX, canonicalThresholdSlate_factualZ, POSlateSystem.D0, POSlateSystem.D1, POSlateSystem.S0, POSlateSystem.S1, POSlateSystem.Y0, POSlateSystem.Y1, canonicalThresholdSlate_DofZ, canonicalThresholdSlate_SofD, canonicalThresholdSlate_YofD] rcases thresholdAtomAt ω with ⟨x, z, d0, d1, s0, s1, y0, y1⟩ rcases a with ⟨x', z', d0', d1', s0', s1', y0', y1'⟩ cases z <;> simp [ThresholdAtom.mk.injEq] ] exact thresholdAtomicMeasure_atom weight hweight a
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_fullAtom · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:476
theorem canonicalThresholdCandidate_latentTuple

Given the stated hypotheses, the canonical threshold candidate latent tuple property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
x :
𝒳
d0 d1 s0 s1 :
y0 y1 :
Fin K
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
W.system.μ.real {ω | W.slate.factualX ω = x ∧ W.slate.D0 ω = d0 ∧ W.slate.D1 ω = d1 ∧ W.slate.S0 ω = s0 ∧ W.slate.S1 ω = s1 ∧ W.slate.Y0 ω = y0 ∧ W.slate.Y1 ω = y1}
= S.p x * T x d0 d1 s0 s1 y0 y1
Proof (Lean source)
theorem canonicalThresholdCandidate_latentTuple {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) (x : 𝒳) (d0 d1 s0 s1 : Bool) (y0 y1 : Fin K) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized W.system.μ.real {ω | W.slate.factualX ω = x ∧ W.slate.D0 ω = d0 ∧ W.slate.D1 ω = d1 ∧ W.slate.S0 ω = s0 ∧ W.slate.S1 ω = s1 ∧ W.slate.Y0 ω = y0 ∧ W.slate.Y1 ω = y1} = S.p x * T x d0 d1 s0 s1 y0 y1 := by dsimp only let weight := thresholdPastedWeight S T let hweight := thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative let hsum := thresholdPastedWeight_sum_one S T hTnormalized letI : IsProbabilityMeasure (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) := ⟨thresholdAtomicMeasure_univ weight hweight hsum⟩ let CS := canonicalThresholdSlate S weight hweight hsum change (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | CS.factualX ω = x ∧ CS.D0 ω = d0 ∧ CS.D1 ω = d1 ∧ CS.S0 ω = s0 ∧ CS.S1 ω = s1 ∧ CS.Y0 ω = y0 ∧ CS.Y1 ω = y1} = S.p x * T x d0 d1 s0 s1 y0 y1 let E : BoolSet (ThresholdOmega.{uOmega} 𝒳 K) := fun z => {ω | CS.factualX ω = x ∧ CS.factualZ ω = z ∧ CS.D0 ω = d0 ∧ CS.D1 ω = d1 ∧ CS.S0 ω = s0 ∧ CS.S1 ω = s1 ∧ CS.Y0 ω = y0 ∧ CS.Y1 ω = y1} have hdisj : Pairwise (fun z z' => Disjoint (E z) (E z')) := by intro z z' hne apply Set.disjoint_left.2 intro ω hz hz' exact hne (hz.2.1.symm.trans hz'.2.1) have hmeas : ∀ z, MeasurableSet (E z) := fun _ => MeasurableSet.of_discrete dsimp only [CS] at E ⊢ rw [show ({ω | (canonicalThresholdSlate S weight hweight hsum).factualX ω = x ∧ (canonicalThresholdSlate S weight hweight hsum).D0 ω = d0 ∧ (canonicalThresholdSlate S weight hweight hsum).D1 ω = d1 ∧ (canonicalThresholdSlate S weight hweight hsum).S0 ω = s0 ∧ (canonicalThresholdSlate S weight hweight hsum).S1 ω = s1 ∧ (canonicalThresholdSlate S weight hweight hsum).Y0 ω = y0 ∧ (canonicalThresholdSlate S weight hweight hsum).Y1 ω = y1} : Set (ThresholdOmega.{uOmega} 𝒳 K)) = ⋃ z, E z by ext ω simp only [Set.mem_setOf_eq, Set.mem_iUnion, E] constructor · intro h exact ⟨(canonicalThresholdSlate S weight hweight hsum).factualZ ω, h.1, rfl, h.2⟩ · rintro ⟨z, hx, -, hrest⟩ exact ⟨hx, hrest⟩] rw [measureReal_iUnion_fintype hdisj hmeas] change (∑ z : Bool, (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real (E z)) = _ simp_rw [show ∀ z : Bool, (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real (E z) = thresholdPastedWeight S T ⟨x, z, d0, d1, s0, s1, y0, y1⟩ by intro z rw [show E z = {ω | thresholdAtomAt ω = (⟨x, z, d0, d1, s0, s1, y0, y1⟩ : ThresholdAtom 𝒳 K)} by ext ω simp only [E, CS, Set.mem_setOf_eq, canonicalThresholdSlate_factualX, canonicalThresholdSlate_factualZ, POSlateSystem.D0, POSlateSystem.D1, POSlateSystem.S0, POSlateSystem.S1, POSlateSystem.Y0, POSlateSystem.Y1, canonicalThresholdSlate_DofZ, canonicalThresholdSlate_SofD, canonicalThresholdSlate_YofD] rcases thresholdAtomAt ω with ⟨x', z', d0', d1', s0', s1', y0', y1'⟩ cases z' <;> cases z <;> simp [ThresholdAtom.mk.injEq]] exact thresholdAtomicMeasure_atom weight hweight _] simp [thresholdPastedWeight, atomInstrumentMass, Fintype.sum_bool] ring
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_latentTuple · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:523
theorem canonicalThresholdCandidate_cellMass

Given the stated hypotheses, the canonical threshold candidate cell mass property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
x :
𝒳
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
W.system.μ.real (W.slate.xEvent x) = S.p x
Proof (Lean source)
theorem canonicalThresholdCandidate_cellMass {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) (x : 𝒳) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized W.system.μ.real (W.slate.xEvent x) = S.p x := by dsimp only let weight := thresholdPastedWeight S T let hweight := thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative let hsum := thresholdPastedWeight_sum_one S T hTnormalized change (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | (canonicalThresholdSlate S weight hweight hsum).factualX ω = x} = S.p x rw [show ({ω | (canonicalThresholdSlate S weight hweight hsum).factualX ω = x} : Set (ThresholdOmega.{uOmega} 𝒳 K)) = {ω | (thresholdAtomAt ω).x = x} by ext ω simp] rw [thresholdAtomicMeasure_event weight hweight hsum (fun a => a.x = x)] let tupleWeight : ThresholdAtomTuple 𝒳 K → ℝ := fun a => if a.1 = x then S.p a.1 * atomInstrumentMass S a.1 a.2.1 * T a.1 a.2.2.1 a.2.2.2.1 a.2.2.2.2.1 a.2.2.2.2.2.1 a.2.2.2.2.2.2.1 a.2.2.2.2.2.2.2 else 0 rw [show (∑ a : ThresholdAtom 𝒳 K, if a.x = x then weight a else 0) = ∑ a : ThresholdAtomTuple 𝒳 K, tupleWeight a by exact Fintype.sum_equiv thresholdAtomEquiv _ _ (fun a => rfl)] dsimp [tupleWeight] conv_lhs => simp only [Fintype.sum_prod_type] rw [Fintype.sum_eq_single x] · simp only [if_true] simp_rw [← Finset.mul_sum] rw [hTnormalized] simp [atomInstrumentMass, Fintype.sum_bool] ring · intro x' hne simp [hne]
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_cellMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:595
theorem canonicalThresholdCandidate_separatedEventMass

Under the pasted law, any event that separately constrains the instrument and the six latent arms factors inside a fixed covariate cell. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
x :
𝒳
qz :
Bool → Prop
qL :
BoolBoolBoolBoolFin K → Fin K → Prop
∀ d0 d1 s0 s1 y0 y1, Decidable (qL d0 d1 s0 s1 y0 y1)
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
W.system.μ.real { ω | W.slate.factualX ω = x ∧ qz (W.slate.factualZ ω) ∧ qL (W.slate.D0 ω) (W.slate.D1 ω) (W.slate.S0 ω) (W.slate.S1 ω) (W.slate.Y0 ω) (W.slate.Y1 ω) }
= S.p x * (∑ z, if qz z then atomInstrumentMass S x z else 0) * (∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, if qL d0 d1 s0 s1 y0 y1 then T x d0 d1 s0 s1 y0 y1 else 0)
Proof (Lean source)
theorem canonicalThresholdCandidate_separatedEventMass {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) (x : 𝒳) (qz : Bool → Prop) [DecidablePred qz] (qL : BoolBoolBoolBoolFin K → Fin K → Prop) [∀ d0 d1 s0 s1 y0 y1, Decidable (qL d0 d1 s0 s1 y0 y1)] : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized W.system.μ.real { ω | W.slate.factualX ω = x ∧ qz (W.slate.factualZ ω) ∧ qL (W.slate.D0 ω) (W.slate.D1 ω) (W.slate.S0 ω) (W.slate.S1 ω) (W.slate.Y0 ω) (W.slate.Y1 ω) } = S.p x * (∑ z, if qz z then atomInstrumentMass S x z else 0) * (∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, if qL d0 d1 s0 s1 y0 y1 then T x d0 d1 s0 s1 y0 y1 else 0) := by dsimp only let weight := thresholdPastedWeight S T let hweight := thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative let hsum := thresholdPastedWeight_sum_one S T hTnormalized change (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real { ω | (canonicalThresholdSlate S weight hweight hsum).factualX ω = x ∧ qz ((canonicalThresholdSlate S weight hweight hsum).factualZ ω) ∧ qL ((canonicalThresholdSlate S weight hweight hsum).D0 ω) ((canonicalThresholdSlate S weight hweight hsum).D1 ω) ((canonicalThresholdSlate S weight hweight hsum).S0 ω) ((canonicalThresholdSlate S weight hweight hsum).S1 ω) ((canonicalThresholdSlate S weight hweight hsum).Y0 ω) ((canonicalThresholdSlate S weight hweight hsum).Y1 ω) } = _ rw [show ({ ω | (canonicalThresholdSlate S weight hweight hsum).factualX ω = x ∧ qz ((canonicalThresholdSlate S weight hweight hsum).factualZ ω) ∧ qL ((canonicalThresholdSlate S weight hweight hsum).D0 ω) ((canonicalThresholdSlate S weight hweight hsum).D1 ω) ((canonicalThresholdSlate S weight hweight hsum).S0 ω) ((canonicalThresholdSlate S weight hweight hsum).S1 ω) ((canonicalThresholdSlate S weight hweight hsum).Y0 ω) ((canonicalThresholdSlate S weight hweight hsum).Y1 ω) } : Set (ThresholdOmega.{uOmega} 𝒳 K)) = { ω | (thresholdAtomAt ω).x = x ∧ qz (thresholdAtomAt ω).z ∧ qL (thresholdAtomAt ω).d0 (thresholdAtomAt ω).d1 (thresholdAtomAt ω).s0 (thresholdAtomAt ω).s1 (thresholdAtomAt ω).y0 (thresholdAtomAt ω).y1 } by ext ω simp only [Set.mem_setOf_eq, canonicalThresholdSlate_factualX, canonicalThresholdSlate_factualZ, POSlateSystem.D0, POSlateSystem.D1, POSlateSystem.S0, POSlateSystem.S1, POSlateSystem.Y0, POSlateSystem.Y1, canonicalThresholdSlate_DofZ, canonicalThresholdSlate_SofD, canonicalThresholdSlate_YofD] rcases thresholdAtomAt ω with ⟨x', z, d0, d1, s0, s1, y0, y1⟩ cases z <;> simp] change (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real { ω | (fun a : ThresholdAtom 𝒳 K => a.x = x ∧ qz a.z ∧ qL a.d0 a.d1 a.s0 a.s1 a.y0 a.y1) (thresholdAtomAt ω) } = _ rw [thresholdAtomicMeasure_event weight hweight hsum (fun a : ThresholdAtom 𝒳 K => a.x = x ∧ qz a.z ∧ qL a.d0 a.d1 a.s0 a.s1 a.y0 a.y1)] rw [show (∑ a : ThresholdAtom 𝒳 K, if a.x = x ∧ qz a.z ∧ qL a.d0 a.d1 a.s0 a.s1 a.y0 a.y1 then weight a else 0) = ∑ a : ThresholdAtomTuple 𝒳 K, if a.1 = x ∧ qz a.2.1 ∧ qL a.2.2.1 a.2.2.2.1 a.2.2.2.2.1 a.2.2.2.2.2.1 a.2.2.2.2.2.2.1 a.2.2.2.2.2.2.2 then weight (thresholdAtomEquiv.symm a) else 0 by exact Fintype.sum_equiv thresholdAtomEquiv _ _ (fun _ => rfl)] dsimp [weight, thresholdPastedWeight] simp only [Fintype.sum_prod_type] rw [Fintype.sum_eq_single x] · simp only [thresholdAtomEquiv_symm_apply, true_and] simp_rw [show ∀ z d0 d1 s0 s1 y0 y1, (if qz z ∧ qL d0 d1 s0 s1 y0 y1 then S.p x * atomInstrumentMass S x z * T x d0 d1 s0 s1 y0 y1 else 0) = S.p x * (if qz z then atomInstrumentMass S x z else 0) * (if qL d0 d1 s0 s1 y0 y1 then T x d0 d1 s0 s1 y0 y1 else 0) by intro z d0 d1 s0 s1 y0 y1 by_cases hz : qz z <;> by_cases hL : qL d0 d1 s0 s1 y0 y1 <;> simp [hz, hL]] simp_rw [← Finset.mul_sum] rw [← Finset.sum_mul, ← Finset.mul_sum] rw [show ({true, false} : Finset Bool) = univ by ext b cases b <;> simp] · intro x' hne simp [hne]
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_separatedEventMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:632
theorem canonicalThresholdCandidate_ivIndependence

Every normalized pasted table satisfies conditional instrument independence: given the covariate, its weight is the product of the instrument mass and a latent-table mass. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
@IVIndependence 𝒳 _ K W.system W.slate.borel W.slate
Proof (Lean source)
theorem canonicalThresholdCandidate_ivIndependence {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized @IVIndependence 𝒳 _ K W.system W.slate.borel W.slate := by classical dsimp only let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized letI : StandardBorelSpace W.system.Ω := W.slate.borel obtain ⟨g, hgmeas, hg⟩ := canonicalThresholdCandidate_cfBundle_factors_through_latent S T hp hprop hTnonnegative hTnormalized let latentW : W.system.Ω → ThresholdLatentTuple K := fun ω => (W.slate.D0 ω, W.slate.D1 ω, W.slate.S0 ω, W.slate.S1 ω, W.slate.Y0 ω, W.slate.Y1 ω) have hgW : W.slate.cfBundle.jointValue = g ∘ latentW := by rw [hg] funext ω apply congrArg g dsimp [latentW, W, canonicalThresholdCandidate] at ω ⊢ apply Prod.ext · exact (canonicalThresholdSlate_DofZ S _ _ _ false ω).symm apply Prod.ext · exact (canonicalThresholdSlate_DofZ S _ _ _ true ω).symm apply Prod.ext · exact (canonicalThresholdSlate_SofD S _ _ _ false ω).symm apply Prod.ext · exact (canonicalThresholdSlate_SofD S _ _ _ true ω).symm apply Prod.ext · exact (canonicalThresholdSlate_YofD S _ _ _ false ω).symm · exact (canonicalThresholdSlate_YofD S _ _ _ true ω).symm unfold IVIndependence POSystem.CondIndepCF rw [hgW] change CondIndepFun (comap W.slate.factualX inferInstance) W.slate.xVar.measurable_factual.comap_le W.slate.factualZ (g ∘ latentW) W.system.μ apply condIndepFun_finite_of_measureReal_fibers W.system.μ W.slate.factualX W.slate.xVar.measurable_factual W.slate.factualZ W.slate.zVar.measurable_factual (g ∘ latentW) · exact hgmeas.comp measurable_from_top · intro x s t _hs _ht let qz : Bool → Prop := fun z => z ∈ s let qL : BoolBoolBoolBoolFin K → Fin K → Prop := fun d0 d1 s0 s1 y0 y1 => g (d0, d1, s0, s1, y0, y1) ∈ t let zMass := ∑ z, if qz z then atomInstrumentMass S x z else 0 let latentMass := ∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, if qL d0 d1 s0 s1 y0 y1 then T x d0 d1 s0 s1 y0 y1 else 0 have hjRaw := canonicalThresholdCandidate_separatedEventMass S T hp hprop hTnonnegative hTnormalized x qz qL have hzRaw := canonicalThresholdCandidate_separatedEventMass S T hp hprop hTnonnegative hTnormalized x qz (fun _ _ _ _ _ _ => True) have hLRaw := canonicalThresholdCandidate_separatedEventMass S T hp hprop hTnonnegative hTnormalized x (fun _ => True) qL have hjoint : W.system.μ.real (((W.slate.factualZ ⁻¹' s) ∩ ((g ∘ latentW) ⁻¹' t)) ∩ W.slate.factualX ⁻¹' {x}) = S.p x * zMass * latentMass := by rw [show (((W.slate.factualZ ⁻¹' s) ∩ ((g ∘ latentW) ⁻¹' t)) ∩ W.slate.factualX ⁻¹' {x}) = { ω | W.slate.factualX ω = x ∧ qz (W.slate.factualZ ω) ∧ qL (W.slate.D0 ω) (W.slate.D1 ω) (W.slate.S0 ω) (W.slate.S1 ω) (W.slate.Y0 ω) (W.slate.Y1 ω) } by ext ω simp only [Set.mem_inter_iff, Set.mem_preimage, Set.mem_singleton_iff, Set.mem_setOf_eq, Function.comp_apply, qz, qL] change ((W.slate.factualZ ω ∈ s ∧ g (latentW ω) ∈ t) ∧ W.slate.factualX ω = x) ↔ _ simp only [latentW] tauto] simpa [W, zMass, latentMass] using hjRaw have hz : W.system.μ.real ((W.slate.factualZ ⁻¹' s) ∩ W.slate.factualX ⁻¹' {x}) = S.p x * zMass := by rw [show ((W.slate.factualZ ⁻¹' s) ∩ W.slate.factualX ⁻¹' {x}) = { ω | W.slate.factualX ω = x ∧ qz (W.slate.factualZ ω) ∧ True } by ext ω simp [qz, W] tauto] calc _ = S.p x * zMass * (∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, T x d0 d1 s0 s1 y0 y1) := by simpa [W, zMass] using hzRaw _ = S.p x * zMass := by rw [hTnormalized x]; ring have hlatent : W.system.μ.real (((g ∘ latentW) ⁻¹' t) ∩ W.slate.factualX ⁻¹' {x}) = S.p x * latentMass := by rw [show (((g ∘ latentW) ⁻¹' t) ∩ W.slate.factualX ⁻¹' {x}) = { ω | W.slate.factualX ω = x ∧ True ∧ qL (W.slate.D0 ω) (W.slate.D1 ω) (W.slate.S0 ω) (W.slate.S1 ω) (W.slate.Y0 ω) (W.slate.Y1 ω) } by ext ω simp only [Set.mem_inter_iff, Set.mem_preimage, Set.mem_singleton_iff, Set.mem_setOf_eq, Function.comp_apply, qL] simp only [latentW] tauto] have hinst : (∑ z, atomInstrumentMass S x z) = 1 := by simp [atomInstrumentMass, Fintype.sum_bool] calc _ = S.p x * (∑ z, atomInstrumentMass S x z) * latentMass := by simpa [W, latentMass] using hLRaw _ = S.p x * latentMass := by rw [hinst]; ring have hxmass : W.system.μ.real (W.slate.factualX ⁻¹' {x}) = S.p x := by rw [show W.slate.factualX ⁻¹' {x} = W.slate.xEvent x by ext ω rfl] exact canonicalThresholdCandidate_cellMass S T hp hprop hTnonnegative hTnormalized x rw [hjoint, hxmass, hz, hlatent] ring
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_ivIndependence · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:780
theorem canonicalThresholdCandidate_conditionalTuple

Given the stated hypotheses, the canonical threshold candidate conditional tuple property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
x :
𝒳
hx :
0 < S.p x
d0 d1 s0 s1 :
y0 y1 :
Fin K
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
conditionalReal W.system.μ {ω | W.slate.D0 ω = d0 ∧ W.slate.D1 ω = d1 ∧ W.slate.S0 ω = s0 ∧ W.slate.S1 ω = s1 ∧ W.slate.Y0 ω = y0 ∧ W.slate.Y1 ω = y1} (W.slate.xEvent x)
= T x d0 d1 s0 s1 y0 y1
Proof (Lean source)
theorem canonicalThresholdCandidate_conditionalTuple {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) (x : 𝒳) (hx : 0 < S.p x) (d0 d1 s0 s1 : Bool) (y0 y1 : Fin K) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized conditionalReal W.system.μ {ω | W.slate.D0 ω = d0 ∧ W.slate.D1 ω = d1 ∧ W.slate.S0 ω = s0 ∧ W.slate.S1 ω = s1 ∧ W.slate.Y0 ω = y0 ∧ W.slate.Y1 ω = y1} (W.slate.xEvent x) = T x d0 d1 s0 s1 y0 y1 := by dsimp only unfold conditionalReal have hcell := canonicalThresholdCandidate_cellMass S T hp hprop hTnonnegative hTnormalized x rw [if_pos (by simpa [hcell] using hx)] rw [show (canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized).system.μ.real ({ω | (canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized).slate.D0 ω = d0 ∧ (canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized).slate.D1 ω = d1 ∧ (canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized).slate.S0 ω = s0 ∧ (canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized).slate.S1 ω = s1 ∧ (canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized).slate.Y0 ω = y0 ∧ (canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized).slate.Y1 ω = y1} ∩ (canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized).slate.xEvent x) = S.p x * T x d0 d1 s0 s1 y0 y1 by rw [← canonicalThresholdCandidate_latentTuple S T hp hprop hTnonnegative hTnormalized x d0 d1 s0 s1 y0 y1] congr 1 ext ω simp only [POSlateSystem.xEvent, POSlateSystem.factualX, Set.mem_inter_iff, Set.mem_setOf_eq] tauto] rw [hcell] field_simp
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_conditionalTuple · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:901
theorem canonicalThresholdCandidate_consistency

Given the stated hypotheses, the canonical threshold candidate consistency property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
Proof (Lean source)
theorem canonicalThresholdCandidate_consistency {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized TreatmentConsistency W.slate ∧ SelectionExclusion W.slate ∧ OutcomeExclusion W.slate := by dsimp only dsimp [canonicalThresholdCandidate] refine ⟨?_, ?_, ?_⟩ · unfold TreatmentConsistency apply Filter.Eventually.of_forall intro ω change ThresholdOmega.{uOmega} 𝒳 K at ω change S.hD (thresholdEval S Regime.empty ω S.dNode) = (canonicalThresholdSlate S (thresholdPastedWeight S T) (thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative) (thresholdPastedWeight_sum_one S T hTnormalized)).DofZ (S.hZ (thresholdEval S Regime.empty ω S.zNode)) ω simp [thresholdEval_d_empty, thresholdEval_z_empty, atomDArm] · unfold SelectionExclusion apply Filter.Eventually.of_forall intro ω change ThresholdOmega.{uOmega} 𝒳 K at ω change S.hS (thresholdEval S Regime.empty ω S.sNode) = (canonicalThresholdSlate S (thresholdPastedWeight S T) (thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative) (thresholdPastedWeight_sum_one S T hTnormalized)).SofD (S.hD (thresholdEval S Regime.empty ω S.dNode)) ω simp [thresholdEval_s_empty, thresholdEval_d_empty, atomDArm, atomSArm] · unfold OutcomeExclusion apply Filter.Eventually.of_forall intro ω _ change ThresholdOmega.{uOmega} 𝒳 K at ω change S.hY (thresholdEval S Regime.empty ω S.yNode) = (canonicalThresholdSlate S (thresholdPastedWeight S T) (thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative) (thresholdPastedWeight_sum_one S T hTnormalized)).YofD (S.hD (thresholdEval S Regime.empty ω S.dNode)) ω simp [thresholdEval_y_empty, thresholdEval_d_empty, atomDArm, atomYArm]
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_consistency · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:939
theorem canonicalThresholdCandidate_noDefiers

Given the stated hypotheses, the canonical threshold candidate no defiers property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
hdefier :
∀ x s0 s1 y0 y1, T x true false s0 s1 y0 y1 = 0
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
NoDefiers W.slate
Proof (Lean source)
theorem canonicalThresholdCandidate_noDefiers {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) (hdefier : ∀ x s0 s1 y0 y1, T x true false s0 s1 y0 y1 = 0) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized NoDefiers W.slate := by dsimp only dsimp [canonicalThresholdCandidate] let weight := thresholdPastedWeight S T let hweight := thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative let hsum := thresholdPastedWeight_sum_one S T hTnormalized have hzreal : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | (thresholdAtomAt ω).d0 = true ∧ (thresholdAtomAt ω).d1 = false} = 0 := by rw [thresholdAtomicMeasure_event weight hweight hsum (fun a ↦ a.d0 = true ∧ a.d1 = false)] apply Finset.sum_eq_zero intro a _ by_cases ha : a.d0 = true ∧ a.d1 = false · simp [ha, weight, thresholdPastedWeight, hdefier] · simp [ha] have hfinite : ((thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) {ω | (thresholdAtomAt ω).d0 = true ∧ (thresholdAtomAt ω).d1 = false}) ≠ ⊤ := by apply ne_of_lt calc _ ≤ (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) univ := measure_mono (Set.subset_univ _) _ = 1 := thresholdAtomicMeasure_univ weight hweight hsum _ < ⊤ := ENNReal.one_lt_top have hz : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) {ω | (thresholdAtomAt ω).d0 = true ∧ (thresholdAtomAt ω).d1 = false} = 0 := (measureReal_eq_zero_iff hfinite).mp hzreal rw [measure_eq_zero_iff_ae_notMem] at hz unfold NoDefiers filter_upwards [hz] with ω hω change ThresholdOmega.{uOmega} 𝒳 K at ω have hnot : ¬((thresholdAtomAt ω).d0 = true ∧ (thresholdAtomAt ω).d1 = false) := hω simp only [canonicalThresholdSlate_DofZ, Bool.false_eq_true, Bool.true_eq_false, if_false, if_true] intro hd0 cases h1 : (thresholdAtomAt ω).d1 · exact elim (hnot ⟨hd0, h1⟩) · rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_noDefiers · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:982
def thresholdObservedDatum

The observed tuple decoded from a threshold atom.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
a :
thresholdObservedDatum a :
d :
if a.z then a.d1 else a.d0
s :
if d then a.s1 else a.s0
y :
if d then a.y1 else a.y0
⟨a.x, a.z, d, s, if s then some y else none⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedDatum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1029
def thresholdObservedTableMargin

The conditional-table mass of all latent tuples decoding to one observed instrument, treatment, selection, and reported-outcome tuple.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
T :
x :
𝒳
z d s :
y :
thresholdObservedTableMargin T x z d s y :
∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, if thresholdObservedDatum (⟨x, z, d0, d1, s0, s1, y0, y1⟩ : ThresholdAtom 𝒳 K)
= ⟨x, z, d, s, y⟩ then T x d0 d1 s0 s1 y0 y1 else 0
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedTableMargin · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1036
theorem thresholdPastedWeight_observedSum

The decoded atom sum factors into the observed cell mass, the appropriate instrument propensity factor, and the corresponding conditional-table margin. the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
o :
(∑ a, if thresholdObservedDatum a = o then thresholdPastedWeight S T a else 0)
= S.p o.cell * atomInstrumentMass S o.cell o.instrument * thresholdObservedTableMargin T o.cell o.instrument o.treatment o.selected o.outcome
Proof (Lean source)
theorem thresholdPastedWeight_observedSum {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (o : ObservedDatum 𝒳 K) : (∑ a, if thresholdObservedDatum a = o then thresholdPastedWeight S T a else 0) = S.p o.cell * atomInstrumentMass S o.cell o.instrument * thresholdObservedTableMargin T o.cell o.instrument o.treatment o.selected o.outcome := by rcases o with ⟨x, z, d, s, y⟩ let tupleSummand : ThresholdAtomTuple 𝒳 K → ℝ := fun a => if thresholdObservedDatum ⟨a.1, a.2.1, a.2.2.1, a.2.2.2.1, a.2.2.2.2.1, a.2.2.2.2.2.1, a.2.2.2.2.2.2.1, a.2.2.2.2.2.2.2⟩ = ⟨x, z, d, s, y⟩ then thresholdPastedWeight S T ⟨a.1, a.2.1, a.2.2.1, a.2.2.2.1, a.2.2.2.2.1, a.2.2.2.2.2.1, a.2.2.2.2.2.2.1, a.2.2.2.2.2.2.2⟩ else 0 rw [show (∑ a : ThresholdAtom 𝒳 K, if thresholdObservedDatum a = ⟨x, z, d, s, y⟩ then thresholdPastedWeight S T a else 0) = ∑ a : ThresholdAtomTuple 𝒳 K, tupleSummand a by exact Fintype.sum_equiv thresholdAtomEquiv _ _ (fun a => rfl)] simp only [Fintype.sum_prod_type] rw [Fintype.sum_eq_single x] · rw [Fintype.sum_eq_single z] · dsimp [tupleSummand, thresholdObservedTableMargin] simp only [thresholdPastedWeight] simp_rw [show ∀ d0 d1 s0 s1 y0 y1, (if thresholdObservedDatum (⟨x, z, d0, d1, s0, s1, y0, y1⟩ : ThresholdAtom 𝒳 K) = ⟨x, z, d, s, y⟩ then S.p x * atomInstrumentMass S x z * T x d0 d1 s0 s1 y0 y1 else 0) = S.p x * atomInstrumentMass S x z * (if thresholdObservedDatum (⟨x, z, d0, d1, s0, s1, y0, y1⟩ : ThresholdAtom 𝒳 K) = ⟨x, z, d, s, y⟩ then T x d0 d1 s0 s1 y0 y1 else 0) by intro d0 d1 s0 s1 y0 y1 split <;> ring] simp only [Finset.mul_sum] · intro z' hz simp [tupleSummand, thresholdObservedDatum, hz] · intro x' hx simp [tupleSummand, thresholdObservedDatum, hx]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdPastedWeight_observedSum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1045
theorem thresholdObservedTableMargin_false_false_selected

the threshold observed table margin false false selected property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
T :
x :
𝒳
i :
Fin K
= ∑ d1, ∑ s1, ∑ y1, T x false d1 true s1 i y1
Proof (Lean source)
theorem thresholdObservedTableMargin_false_false_selected (T : ThresholdCellTable 𝒳 K) (x : 𝒳) (i : Fin K) : thresholdObservedTableMargin T x false false true (some i) = ∑ d1, ∑ s1, ∑ y1, T x false d1 true s1 i y1 := by simp [thresholdObservedTableMargin, thresholdObservedDatum, Fintype.sum_bool]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedTableMargin_false_false_selected · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1091
theorem thresholdObservedTableMargin_false_true_selected

the threshold observed table margin false true selected property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
T :
x :
𝒳
j :
Fin K
= ∑ d1, ∑ s0, ∑ y0, T x true d1 s0 true y0 j
Proof (Lean source)
theorem thresholdObservedTableMargin_false_true_selected (T : ThresholdCellTable 𝒳 K) (x : 𝒳) (j : Fin K) : thresholdObservedTableMargin T x false true true (some j) = ∑ d1, ∑ s0, ∑ y0, T x true d1 s0 true y0 j := by simp [thresholdObservedTableMargin, thresholdObservedDatum, Fintype.sum_bool]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedTableMargin_false_true_selected · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1098
theorem thresholdObservedTableMargin_true_false_selected

the threshold observed table margin true false selected property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
T :
x :
𝒳
i :
Fin K
= ∑ d0, ∑ s1, ∑ y1, T x d0 false true s1 i y1
Proof (Lean source)
theorem thresholdObservedTableMargin_true_false_selected (T : ThresholdCellTable 𝒳 K) (x : 𝒳) (i : Fin K) : thresholdObservedTableMargin T x true false true (some i) = ∑ d0, ∑ s1, ∑ y1, T x d0 false true s1 i y1 := by simp [thresholdObservedTableMargin, thresholdObservedDatum, Fintype.sum_bool]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedTableMargin_true_false_selected · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1105
theorem thresholdObservedTableMargin_true_true_selected

the threshold observed table margin true true selected property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
T :
x :
𝒳
j :
Fin K
= ∑ d0, ∑ s0, ∑ y0, T x d0 true s0 true y0 j
Proof (Lean source)
theorem thresholdObservedTableMargin_true_true_selected (T : ThresholdCellTable 𝒳 K) (x : 𝒳) (j : Fin K) : thresholdObservedTableMargin T x true true true (some j) = ∑ d0, ∑ s0, ∑ y0, T x d0 true s0 true y0 j := by simp [thresholdObservedTableMargin, thresholdObservedDatum, Fintype.sum_bool]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedTableMargin_true_true_selected · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1112
theorem thresholdObservedTableMargin_false_false_unselected

the threshold observed table margin false false unselected property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
T :
x :
𝒳
= ∑ d1, ∑ s1, ∑ y0, ∑ y1, T x false d1 false s1 y0 y1
Proof (Lean source)
theorem thresholdObservedTableMargin_false_false_unselected (T : ThresholdCellTable 𝒳 K) (x : 𝒳) : thresholdObservedTableMargin T x false false false none = ∑ d1, ∑ s1, ∑ y0, ∑ y1, T x false d1 false s1 y0 y1 := by simp [thresholdObservedTableMargin, thresholdObservedDatum, Fintype.sum_bool]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedTableMargin_false_false_unselected · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1119
theorem thresholdObservedTableMargin_false_true_unselected

the threshold observed table margin false true unselected property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
T :
x :
𝒳
= ∑ d1, ∑ s0, ∑ y0, ∑ y1, T x true d1 s0 false y0 y1
Proof (Lean source)
theorem thresholdObservedTableMargin_false_true_unselected (T : ThresholdCellTable 𝒳 K) (x : 𝒳) : thresholdObservedTableMargin T x false true false none = ∑ d1, ∑ s0, ∑ y0, ∑ y1, T x true d1 s0 false y0 y1 := by simp [thresholdObservedTableMargin, thresholdObservedDatum, Fintype.sum_bool]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedTableMargin_false_true_unselected · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1126
theorem thresholdObservedTableMargin_true_false_unselected

the threshold observed table margin true false unselected property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
T :
x :
𝒳
= ∑ d0, ∑ s1, ∑ y0, ∑ y1, T x d0 false false s1 y0 y1
Proof (Lean source)
theorem thresholdObservedTableMargin_true_false_unselected (T : ThresholdCellTable 𝒳 K) (x : 𝒳) : thresholdObservedTableMargin T x true false false none = ∑ d0, ∑ s1, ∑ y0, ∑ y1, T x d0 false false s1 y0 y1 := by simp [thresholdObservedTableMargin, thresholdObservedDatum, Fintype.sum_bool]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedTableMargin_true_false_unselected · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1133
theorem thresholdObservedTableMargin_true_true_unselected

the threshold observed table margin true true unselected property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
T :
x :
𝒳
= ∑ d0, ∑ s0, ∑ y0, ∑ y1, T x d0 true s0 false y0 y1
Proof (Lean source)
theorem thresholdObservedTableMargin_true_true_unselected (T : ThresholdCellTable 𝒳 K) (x : 𝒳) : thresholdObservedTableMargin T x true true false none = ∑ d0, ∑ s0, ∑ y0, ∑ y1, T x d0 true s0 false y0 y1 := by simp [thresholdObservedTableMargin, thresholdObservedDatum, Fintype.sum_bool]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedTableMargin_true_true_unselected · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1140
theorem thresholdObservedTableMargin_invalid

the threshold observed table margin invalid property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
T :
x :
𝒳
z d :
conclusion 1
conclusion 2
i :
thresholdObservedTableMargin T x z d false (some i) = 0
Proof (Lean source)
theorem thresholdObservedTableMargin_invalid (T : ThresholdCellTable 𝒳 K) (x : 𝒳) (z d : Bool) : thresholdObservedTableMargin T x z d true none = 0 ∧ ∀ i, thresholdObservedTableMargin T x z d false (some i) = 0 := by constructor · cases z <;> cases d <;> simp [thresholdObservedTableMargin, thresholdObservedDatum] · intro i cases z <;> cases d <;> simp [thresholdObservedTableMargin, thresholdObservedDatum]
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdObservedTableMargin_invalid · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1147
theorem canonicalThresholdSlate_observedDatum

Given the stated hypotheses, the canonical threshold slate observed datum property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
weight :
ThresholdAtom 𝒳 K → ℝ
hweight :
∀ a, 0 ≤ weight a
hsum :
∑ a, weight a = 1
ω :
ThresholdOmega.{uOmega} 𝒳 K
Proof (Lean source)
@[simp] theorem canonicalThresholdSlate_observedDatum {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (weight : ThresholdAtom 𝒳 K → ℝ) (hweight : ∀ a, 0 ≤ weight a) (hsum : ∑ a, weight a = 1) (ω : ThresholdOmega.{uOmega} 𝒳 K) : (canonicalThresholdSlate S weight hweight hsum).observedDatum ω = thresholdObservedDatum (thresholdAtomAt ω) := by let CS := canonicalThresholdSlate S weight hweight hsum have hd : CS.factualD ω = atomDArm (thresholdAtomAt ω).z (thresholdAtomAt ω) := by change S.hD (thresholdEval S Regime.empty ω S.dNode) = _ exact thresholdEval_d_empty S ω have hs : CS.factualS ω = atomSArm (atomDArm (thresholdAtomAt ω).z (thresholdAtomAt ω)) (thresholdAtomAt ω) := by change S.hS (thresholdEval S Regime.empty ω S.sNode) = _ exact thresholdEval_s_empty S ω have hy : CS.factualY ω = atomYArm (atomDArm (thresholdAtomAt ω).z (thresholdAtomAt ω)) (thresholdAtomAt ω) := by change S.hY (thresholdEval S Regime.empty ω S.yNode) = _ exact thresholdEval_y_empty S ω change CS.observedDatum ω = _ unfold POSlateSystem.observedDatum thresholdObservedDatum simp only [CS, canonicalThresholdSlate_factualX, canonicalThresholdSlate_factualZ, hd, hs, hy] simp [atomDArm, atomSArm, atomYArm]
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdSlate_observedDatum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1159
theorem measurable_observedDatum

The observed-data map of any finite slate system is measurable. the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
Measurable S.observedDatum
Proof (Lean source)
theorem measurable_observedDatum {P : POSystem} (S : POSlateSystem P 𝒳 K) : Measurable S.observedDatum := by intro t _ rw [show S.observedDatum ⁻¹' t = ⋃ o : t, S.observedDatum ⁻¹' {o.1} by ext; simp] apply MeasurableSet.iUnion rintro ⟨⟨x, z, d, s, y⟩, -⟩ have hout : MeasurableSet {ω | (if S.factualS ω then some (S.factualY ω) else none) = y} := by cases y with | none => convert S.sVar.measurable_factual (measurableSet_singleton false) using 1 <;> ext ω <;> cases h : S.sVar.factual ω <;> simp [POSlateSystem.factualS, h] | some k => convert (S.sVar.measurable_factual (measurableSet_singleton true)).inter (S.yVar.measurable_factual (measurableSet_singleton k)) using 1 <;> ext ω <;> cases h : S.sVar.factual ω <;> simp [POSlateSystem.factualS, POSlateSystem.factualY, h] have hm : MeasurableSet {ω | S.factualX ω = x ∧ S.factualZ ω = z ∧ S.factualD ω = d ∧ S.factualS ω = s ∧ (if S.factualS ω then some (S.factualY ω) else none) = y} := by have h := ((((S.xVar.measurable_factual (measurableSet_singleton x)).inter (S.zVar.measurable_factual (measurableSet_singleton z))).inter (S.dVar.measurable_factual (measurableSet_singleton d))).inter (S.sVar.measurable_factual (measurableSet_singleton s))).inter hout convert h using 1 <;> ext ω <;> simp [POSlateSystem.factualX, POSlateSystem.factualZ, POSlateSystem.factualD, POSlateSystem.factualS, and_assoc] convert hm using 1 <;> ext ω <;> simp [POSlateSystem.observedDatum, ObservedDatum.mk.injEq, and_assoc]
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_observedDatum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1188
theorem canonicalThresholdCandidate_observedSingleton

On every observed singleton, the canonical candidate has the mass obtained by summing the pasted weights of precisely the atoms decoding to that tuple. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
o :
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
W.slate.observedLaw.real {o}
= ∑ a, if thresholdObservedDatum a = o then thresholdPastedWeight S T a else 0
Proof (Lean source)
theorem canonicalThresholdCandidate_observedSingleton {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) (o : ObservedDatum 𝒳 K) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized W.slate.observedLaw.real {o} = ∑ a, if thresholdObservedDatum a = o then thresholdPastedWeight S T a else 0 := by dsimp only let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized change W.slate.observedLaw.real {o} = _ rw [show W.slate.observedLaw.real {o} = W.system.μ.real (W.slate.observedDatum ⁻¹' {o}) by unfold POSlateSystem.observedLaw Measure.real rw [Measure.map_apply (measurable_observedDatum W.slate) MeasurableSet.of_discrete]] change (thresholdAtomicMeasure (thresholdPastedWeight S T) : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real ((canonicalThresholdSlate S (thresholdPastedWeight S T) (thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative) (thresholdPastedWeight_sum_one S T hTnormalized)).observedDatum ⁻¹' {o}) = _ rw [show ((canonicalThresholdSlate S (thresholdPastedWeight S T) (thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative) (thresholdPastedWeight_sum_one S T hTnormalized)).observedDatum ⁻¹' {o} : Set (ThresholdOmega.{uOmega} 𝒳 K)) = {ω | thresholdObservedDatum (thresholdAtomAt ω) = o} by ext ω change (canonicalThresholdSlate S (thresholdPastedWeight S T) (thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative) (thresholdPastedWeight_sum_one S T hTnormalized)).observedDatum ω = o ↔ _ rw [canonicalThresholdSlate_observedDatum] rfl] exact thresholdAtomicMeasure_event (thresholdPastedWeight S T) (thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative) (thresholdPastedWeight_sum_one S T hTnormalized) (fun a ↦ thresholdObservedDatum a = o)
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_observedSingleton · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1231
theorem canonicalThresholdCandidate_observedLaw_eq_of_singletons

Equality of the finite observed laws follows once the pasted atom table matches the original mass on every decoded observed singleton. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
hmatch :
∀ o : ObservedDatum 𝒳 K,
S.observedLaw.real {o}
= ∑ a, if thresholdObservedDatum a = o then thresholdPastedWeight S T a else 0
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
W.slate.observedLaw = S.observedLaw
Proof (Lean source)
theorem canonicalThresholdCandidate_observedLaw_eq_of_singletons {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) (hmatch : ∀ o : ObservedDatum 𝒳 K, S.observedLaw.real {o} = ∑ a, if thresholdObservedDatum a = o then thresholdPastedWeight S T a else 0) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized W.slate.observedLaw = S.observedLaw := by dsimp only letI : IsProbabilityMeasure S.observedLaw := Measure.isProbabilityMeasure_map (measurable_observedDatum S).aemeasurable letI : IsProbabilityMeasure (canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized).slate.observedLaw := Measure.isProbabilityMeasure_map (measurable_observedDatum (canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized).slate).aemeasurable apply MeasureTheory.ext_iff_measureReal_singleton.mpr intro o rw [canonicalThresholdCandidate_observedSingleton] exact (hmatch o).symm
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_observedLaw_eq_of_singletons · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1271
theorem thresholdPastedWeight_survivorBenefit_sum

the threshold pasted weight survivor benefit sum property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
(∑ a : ThresholdAtom 𝒳 K, if a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = true ∧ a.y0 < a.y1 then thresholdPastedWeight S T a else 0)
= ∑ x, S.p x * benefitMass (tableSurvivorCoupling (T x))
Proof (Lean source)
theorem thresholdPastedWeight_survivorBenefit_sum {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) : (∑ a : ThresholdAtom 𝒳 K, if a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = true ∧ a.y0 < a.y1 then thresholdPastedWeight S T a else 0) = ∑ x, S.p x * benefitMass (tableSurvivorCoupling (T x)) := by rw [show (∑ a : ThresholdAtom 𝒳 K, if a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = true ∧ a.y0 < a.y1 then thresholdPastedWeight S T a else 0) = ∑ a : ThresholdAtomTuple 𝒳 K, if a.2.2.1 = false ∧ a.2.2.2.1 = true ∧ a.2.2.2.2.1 = true ∧ a.2.2.2.2.2.1 = true ∧ a.2.2.2.2.2.2.1 < a.2.2.2.2.2.2.2 then thresholdPastedWeight S T (thresholdAtomEquiv.symm a) else 0 by exact Fintype.sum_equiv thresholdAtomEquiv _ _ (fun a ↦ rfl)] simp only [Fintype.sum_prod_type] simp [thresholdAtomEquiv, thresholdPastedWeight, atomInstrumentMass, Fintype.sum_bool, benefitMass, tableSurvivorCoupling] apply Finset.sum_congr rfl intro x _ rw [Finset.mul_sum, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro i _ rw [Finset.sum_filter] rw [Finset.mul_sum, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro j _ by_cases hij : i < j <;> simp [hij] <;> ring
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdPastedWeight_survivorBenefit_sum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1296
theorem thresholdPastedWeight_survivorMass_sum

the threshold pasted weight survivor mass sum property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
(∑ a : ThresholdAtom 𝒳 K, if a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = true then thresholdPastedWeight S T a else 0)
= ∑ x, S.p x * totalMass (tableSurvivorCoupling (T x))
Proof (Lean source)
theorem thresholdPastedWeight_survivorMass_sum {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) : (∑ a : ThresholdAtom 𝒳 K, if a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = true then thresholdPastedWeight S T a else 0) = ∑ x, S.p x * totalMass (tableSurvivorCoupling (T x)) := by rw [show (∑ a : ThresholdAtom 𝒳 K, if a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = true then thresholdPastedWeight S T a else 0) = ∑ a : ThresholdAtomTuple 𝒳 K, if a.2.2.1 = false ∧ a.2.2.2.1 = true ∧ a.2.2.2.2.1 = true ∧ a.2.2.2.2.2.1 = true then thresholdPastedWeight S T (thresholdAtomEquiv.symm a) else 0 by exact Fintype.sum_equiv thresholdAtomEquiv _ _ (fun a ↦ rfl)] simp only [Fintype.sum_prod_type] simp [thresholdAtomEquiv, thresholdPastedWeight, atomInstrumentMass, Fintype.sum_bool, totalMass, tableSurvivorCoupling] apply Finset.sum_congr rfl intro x _ rw [Finset.mul_sum, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro i _ rw [Finset.mul_sum, ← Finset.sum_add_distrib] apply Finset.sum_congr rfl intro j _ ring
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdPastedWeight_survivorMass_sum · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1325
theorem canonicalThresholdCandidate_benefitProbabilityOf

The aggregate strict-benefit probability of the canonical pasted law is the ratio of the corresponding survivor-table masses. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
hpositive :
0 < ∑ x, S.p x * totalMass (tableSurvivorCoupling (T x))
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
= (∑ x, S.p x * benefitMass (tableSurvivorCoupling (T x))) / (∑ x, S.p x * totalMass (tableSurvivorCoupling (T x)))
Proof (Lean source)
theorem canonicalThresholdCandidate_benefitProbabilityOf {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) (hpositive : 0 < ∑ x, S.p x * totalMass (tableSurvivorCoupling (T x))) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized benefitProbabilityOf W = (∑ x, S.p x * benefitMass (tableSurvivorCoupling (T x))) / (∑ x, S.p x * totalMass (tableSurvivorCoupling (T x))) := by dsimp only let weight := thresholdPastedWeight S T let hweight := thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative let hsum := thresholdPastedWeight_sum_one S T hTnormalized let CS := canonicalThresholdSlate S weight hweight hsum have hden : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real { ω | (thresholdAtomAt ω).d0 = false ∧ (thresholdAtomAt ω).d1 = true ∧ (thresholdAtomAt ω).s0 = true ∧ (thresholdAtomAt ω).s1 = true } = ∑ x, S.p x * totalMass (tableSurvivorCoupling (T x)) := by calc _ = ∑ a : ThresholdAtom 𝒳 K, if a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = true then weight a else 0 := thresholdAtomicMeasure_event weight hweight hsum (fun a ↦ a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = true) _ = _ := by simpa [weight] using thresholdPastedWeight_survivorMass_sum S T have hnum : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real { ω | (thresholdAtomAt ω).d0 = false ∧ (thresholdAtomAt ω).d1 = true ∧ (thresholdAtomAt ω).s0 = true ∧ (thresholdAtomAt ω).s1 = true ∧ (thresholdAtomAt ω).y0 < (thresholdAtomAt ω).y1 } = ∑ x, S.p x * benefitMass (tableSurvivorCoupling (T x)) := by calc _ = ∑ a : ThresholdAtom 𝒳 K, if a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = true ∧ a.y0 < a.y1 then weight a else 0 := thresholdAtomicMeasure_event weight hweight hsum (fun a ↦ a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = true ∧ a.y0 < a.y1) _ = _ := by simpa [weight] using thresholdPastedWeight_survivorBenefit_sum S T change benefitProbabilityOf ({ system := canonicalThresholdPOSystem S weight hweight hsum slate := CS } : FullLawCandidate P 𝒳 K) = _ unfold benefitProbabilityOf conditionalReal dsimp only [FullLawCandidate.system, FullLawCandidate.slate] change (if 0 < (thresholdAtomicMeasure weight).real {ω | CS.S0 ω = true ∧ CS.S1 ω = true ∧ ω ∈ CS.complierEvent} then (thresholdAtomicMeasure weight).real ({ω | CS.Y0 ω < CS.Y1 ω ∧ CS.S0 ω = true ∧ CS.S1 ω = true ∧ ω ∈ CS.complierEvent} ∩ {ω | CS.S0 ω = true ∧ CS.S1 ω = true ∧ ω ∈ CS.complierEvent}) / (thresholdAtomicMeasure weight).real {ω | CS.S0 ω = true ∧ CS.S1 ω = true ∧ ω ∈ CS.complierEvent} else 0) = _ have hsetden : ({ω | CS.S0 ω = true ∧ CS.S1 ω = true ∧ ω ∈ CS.complierEvent} : Set (ThresholdOmega.{uOmega} 𝒳 K)) = {ω | (thresholdAtomAt ω).d0 = false ∧ (thresholdAtomAt ω).d1 = true ∧ (thresholdAtomAt ω).s0 = true ∧ (thresholdAtomAt ω).s1 = true} := by ext ω change ThresholdOmega.{uOmega} 𝒳 K at ω change (CS.S0 ω = true ∧ CS.S1 ω = true ∧ CS.D0 ω = false ∧ CS.D1 ω = true) ↔ _ have hd0 : CS.D0 ω = (thresholdAtomAt ω).d0 := by simp [CS, POSlateSystem.D0, canonicalThresholdSlate_DofZ] have hd1 : CS.D1 ω = (thresholdAtomAt ω).d1 := by simp [CS, POSlateSystem.D1, canonicalThresholdSlate_DofZ] have hs0 : CS.S0 ω = (thresholdAtomAt ω).s0 := by simp [CS, POSlateSystem.S0, canonicalThresholdSlate_SofD] have hs1 : CS.S1 ω = (thresholdAtomAt ω).s1 := by simp [CS, POSlateSystem.S1, canonicalThresholdSlate_SofD] simp [hd0, hd1, hs0, hs1, and_assoc, and_left_comm, and_comm] have hsetnum : ({ω | CS.Y0 ω < CS.Y1 ω ∧ CS.S0 ω = true ∧ CS.S1 ω = true ∧ ω ∈ CS.complierEvent} ∩ {ω | CS.S0 ω = true ∧ CS.S1 ω = true ∧ ω ∈ CS.complierEvent} : Set (ThresholdOmega.{uOmega} 𝒳 K)) = {ω | (thresholdAtomAt ω).d0 = false ∧ (thresholdAtomAt ω).d1 = true ∧ (thresholdAtomAt ω).s0 = true ∧ (thresholdAtomAt ω).s1 = true ∧ (thresholdAtomAt ω).y0 < (thresholdAtomAt ω).y1} := by ext ω change ThresholdOmega.{uOmega} 𝒳 K at ω change ((CS.Y0 ω < CS.Y1 ω ∧ CS.S0 ω = true ∧ CS.S1 ω = true ∧ CS.D0 ω = false ∧ CS.D1 ω = true) ∧ (CS.S0 ω = true ∧ CS.S1 ω = true ∧ CS.D0 ω = false ∧ CS.D1 ω = true)) ↔ _ have hd0 : CS.D0 ω = (thresholdAtomAt ω).d0 := by simp [CS, POSlateSystem.D0, canonicalThresholdSlate_DofZ] have hd1 : CS.D1 ω = (thresholdAtomAt ω).d1 := by simp [CS, POSlateSystem.D1, canonicalThresholdSlate_DofZ] have hs0 : CS.S0 ω = (thresholdAtomAt ω).s0 := by simp [CS, POSlateSystem.S0, canonicalThresholdSlate_SofD] have hs1 : CS.S1 ω = (thresholdAtomAt ω).s1 := by simp [CS, POSlateSystem.S1, canonicalThresholdSlate_SofD] have hy0 : CS.Y0 ω = (thresholdAtomAt ω).y0 := by simp [CS, POSlateSystem.Y0, canonicalThresholdSlate_YofD] have hy1 : CS.Y1 ω = (thresholdAtomAt ω).y1 := by simp [CS, POSlateSystem.Y1, canonicalThresholdSlate_YofD] simp [hd0, hd1, hs0, hs1, hy0, hy1, and_assoc, and_left_comm, and_comm] rw [hsetnum, hsetden, hden, hnum, if_pos hpositive]
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_benefitProbabilityOf · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1351
theorem canonicalThresholdCandidate_weakSelectionMonotonicity

Cell-table support restrictions imply weak selection monotonicity for the canonical pasted law. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
POSystem.{uV, uVal, uOmega}
S :
POSlateSystem P 𝒳 K
T :
hp :
∀ x, 0 ≤ S.p x
hprop :
∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1
hTnonnegative :
T.Nonnegative
hTnormalized :
T.Normalized
d :
𝒳 → Bool
hinc :
∀ x y0 y1
if
d x = true
then
T x false true true false y0 y1 = 0
hdec :
∀ x y0 y1
if
d x = false
then
T x false true false true y0 y1 = 0
W :
canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized
Proof (Lean source)
theorem canonicalThresholdCandidate_weakSelectionMonotonicity {P : POSystem.{uV, uVal, uOmega}} (S : POSlateSystem P 𝒳 K) (T : ThresholdCellTable 𝒳 K) (hp : ∀ x, 0 ≤ S.p x) (hprop : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1) (hTnonnegative : T.Nonnegative) (hTnormalized : T.Normalized) (d : 𝒳 → Bool) (hinc : ∀ x y0 y1, d x = true → T x false true true false y0 y1 = 0) (hdec : ∀ x y0 y1, d x = false → T x false true false true y0 y1 = 0) : let W := canonicalThresholdCandidate S T hp hprop hTnonnegative hTnormalized WeakSelectionMonotonicity W.slate d := by dsimp only dsimp [canonicalThresholdCandidate] let weight := thresholdPastedWeight S T let hweight := thresholdPastedWeight_nonnegative S T hp hprop hTnonnegative let hsum := thresholdPastedWeight_sum_one S T hTnormalized let CS := canonicalThresholdSlate S weight hweight hsum unfold WeakSelectionMonotonicity intro x _ cases hd : d x · have hreal : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | (thresholdAtomAt ω).x = x ∧ (thresholdAtomAt ω).d0 = false ∧ (thresholdAtomAt ω).d1 = true ∧ (thresholdAtomAt ω).s0 = false ∧ (thresholdAtomAt ω).s1 = true} = 0 := by calc _ = ∑ a : ThresholdAtom 𝒳 K, if a.x = x ∧ a.d0 = false ∧ a.d1 = true ∧ a.s0 = false ∧ a.s1 = true then weight a else 0 := thresholdAtomicMeasure_event weight hweight hsum _ _ = 0 := by apply Finset.sum_eq_zero intro a _ by_cases ha : a.x = x ∧ a.d0 = false ∧ a.d1 = true ∧ a.s0 = false ∧ a.s1 = true · have hda : d a.x = false := by simpa [ha.1] using hd simp [ha, weight, thresholdPastedWeight, hdec a.x a.y0 a.y1 hda] exact inr (hdec x a.y0 a.y1 hd) · simp [ha] have hfinite : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) {ω | (thresholdAtomAt ω).x = x ∧ (thresholdAtomAt ω).d0 = false ∧ (thresholdAtomAt ω).d1 = true ∧ (thresholdAtomAt ω).s0 = false ∧ (thresholdAtomAt ω).s1 = true} ≠ ⊤ := by apply ne_of_lt calc _ ≤ (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) univ := measure_mono (Set.subset_univ _) _ = 1 := thresholdAtomicMeasure_univ weight hweight hsum _ < ⊤ := ENNReal.one_lt_top have hzero := (measureReal_eq_zero_iff hfinite).mp hreal rw [measure_eq_zero_iff_ae_notMem] at hzero have hrestrictMeas : MeasurableSet (CS.complierEvent ∩ CS.xEvent x) := by change @MeasurableSet (ThresholdOmega.{uOmega} 𝒳 K) ⊤ _ exact MeasurableSet.of_discrete filter_upwards [ae_restrict_of_ae hzero, ae_restrict_mem hrestrictMeas] with ω hω hmem change ThresholdOmega.{uOmega} 𝒳 K at ω have hxatom : (thresholdAtomAt ω).x = x := by have hxmem := hmem.2 change CS.factualX ω = x at hxmem simpa [CS, canonicalThresholdSlate_factualX] using hxmem have hd0 : CS.D0 ω = (thresholdAtomAt ω).d0 := by simp [CS, POSlateSystem.D0, canonicalThresholdSlate_DofZ] have hd1 : CS.D1 ω = (thresholdAtomAt ω).d1 := by simp [CS, POSlateSystem.D1, canonicalThresholdSlate_DofZ] have hs0 : CS.S0 ω = (thresholdAtomAt ω).s0 := by simp [CS, POSlateSystem.S0, canonicalThresholdSlate_SofD] have hs1 : CS.S1 ω = (thresholdAtomAt ω).s1 := by simp [CS, POSlateSystem.S1, canonicalThresholdSlate_SofD] have hc : CS.D0 ω = false ∧ CS.D1 ω = true := hmem.1 constructor · simp [hd] · intro _ cases h0 : (thresholdAtomAt ω).s0 <;> cases h1 : (thresholdAtomAt ω).s1 <;> simp [hs0, hs1, h0, h1] exact elim (hω ⟨hxatom, hd0.symm.trans hc.1, hd1.symm.trans hc.2, h0, h1⟩) · have hreal : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)).real {ω | (thresholdAtomAt ω).x = x ∧ (thresholdAtomAt ω).d0 = false ∧ (thresholdAtomAt ω).d1 = true ∧ (thresholdAtomAt ω).s0 = true ∧ (thresholdAtomAt ω).s1 = false} = 0 := by calc _ = ∑ a : ThresholdAtom 𝒳 K, if a.x = x ∧ a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = false then weight a else 0 := thresholdAtomicMeasure_event weight hweight hsum _ _ = 0 := by apply Finset.sum_eq_zero intro a _ by_cases ha : a.x = x ∧ a.d0 = false ∧ a.d1 = true ∧ a.s0 = true ∧ a.s1 = false · have hda : d a.x = true := by simpa [ha.1] using hd simp [ha, weight, thresholdPastedWeight, hinc a.x a.y0 a.y1 hda] exact inr (hinc x a.y0 a.y1 hd) · simp [ha] have hfinite : (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) {ω | (thresholdAtomAt ω).x = x ∧ (thresholdAtomAt ω).d0 = false ∧ (thresholdAtomAt ω).d1 = true ∧ (thresholdAtomAt ω).s0 = true ∧ (thresholdAtomAt ω).s1 = false} ≠ ⊤ := by apply ne_of_lt calc _ ≤ (thresholdAtomicMeasure weight : Measure (ThresholdOmega.{uOmega} 𝒳 K)) univ := measure_mono (Set.subset_univ _) _ = 1 := thresholdAtomicMeasure_univ weight hweight hsum _ < ⊤ := ENNReal.one_lt_top have hzero := (measureReal_eq_zero_iff hfinite).mp hreal rw [measure_eq_zero_iff_ae_notMem] at hzero have hrestrictMeas : MeasurableSet (CS.complierEvent ∩ CS.xEvent x) := by change @MeasurableSet (ThresholdOmega.{uOmega} 𝒳 K) ⊤ _ exact MeasurableSet.of_discrete filter_upwards [ae_restrict_of_ae hzero, ae_restrict_mem hrestrictMeas] with ω hω hmem change ThresholdOmega.{uOmega} 𝒳 K at ω have hxatom : (thresholdAtomAt ω).x = x := by have hxmem := hmem.2 change CS.factualX ω = x at hxmem simpa [CS, canonicalThresholdSlate_factualX] using hxmem have hd0 : CS.D0 ω = (thresholdAtomAt ω).d0 := by simp [CS, POSlateSystem.D0, canonicalThresholdSlate_DofZ] have hd1 : CS.D1 ω = (thresholdAtomAt ω).d1 := by simp [CS, POSlateSystem.D1, canonicalThresholdSlate_DofZ] have hs0 : CS.S0 ω = (thresholdAtomAt ω).s0 := by simp [CS, POSlateSystem.S0, canonicalThresholdSlate_SofD] have hs1 : CS.S1 ω = (thresholdAtomAt ω).s1 := by simp [CS, POSlateSystem.S1, canonicalThresholdSlate_SofD] have hc : CS.D0 ω = false ∧ CS.D1 ω = true := hmem.1 constructor · intro _ cases h0 : (thresholdAtomAt ω).s0 <;> cases h1 : (thresholdAtomAt ω).s1 <;> simp [hs0, hs1, h0, h1] exact elim (hω ⟨hxatom, hd0.symm.trans hc.1, hd1.symm.trans hc.2, h0, h1⟩) · simp [hd]
CausalSmith.PartialID.SlateBenefitPartialTransport.canonicalThresholdCandidate_weakSelectionMonotonicity · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/FullLawPasting.lean:1450
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Helpers.SharpDefinitions 12 declarations
def LatentCellTable

The latent cell table is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
K :
LatentCellTable K :
Type
BoolBoolBoolBoolFin K → Fin K → ℝ
CausalSmith.PartialID.SlateBenefitPartialTransport.LatentCellTable · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:16

The latent table nonnegative condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
K :
shared
d0 d1 s0 s1 y0 y1 :
latentTableNonnegative T :
Prop
0 ≤ T d0 d1 s0 s1 y0 y1
CausalSmith.PartialID.SlateBenefitPartialTransport.latentTableNonnegative · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:20

The table survivor coupling is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
K :
shared
tableSurvivorCoupling T :
fun i j => T false true true true i j
CausalSmith.PartialID.SlateBenefitPartialTransport.tableSurvivorCoupling · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:24

The compatible latent cell table condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
dir :
CompatibleLatentCellTable c x dir T :
Prop
clause 2
d0 d1 s0 s1 y0 y1 :
d0 = true
d1 = false
T d0 d1 s0 s1 y0 y1 = 0
clause 3
dir = true
y0 y1 :
T false true true false y0 y1 = 0
clause 4
dir = false
y0 y1 :
T false true false true y0 y1 = 0
clause 5
i :
∑ j, tableSurvivorCoupling T i j ≤ c.lower x i
clause 6
j :
∑ i, tableSurvivorCoupling T i j ≤ c.upper x j
clause 7
∑ i, ∑ j, tableSurvivorCoupling T i j = c.mass x
CausalSmith.PartialID.SlateBenefitPartialTransport.CompatibleLatentCellTable · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:28

The full law survivor coupling is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
W :
x :
𝒳
fullLawSurvivorCoupling W x :
fun i j
=> conditionalReal W.system.μ {ω | W.slate.Y0 ω = i ∧ W.slate.Y1 ω = j ∧ W.slate.S0 ω = true ∧ W.slate.S1 ω = true ∧ ω ∈ W.slate.complierEvent} (W.slate.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.fullLawSurvivorCoupling · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:39

The benefit probability of is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type uCell
shared
K :
shared
P :
shared
W :
benefitProbabilityOf W :
conditionalReal W.system.μ {ω | W.slate.Y0 ω < W.slate.Y1 ω ∧ W.slate.S0 ω = true ∧ W.slate.S1 ω = true ∧ ω ∈ W.slate.complierEvent} {ω | W.slate.S0 ω = true ∧ W.slate.S1 ω = true ∧ ω ∈ W.slate.complierEvent}
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitProbabilityOf · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:47
theorem branchFreePolytope_eq_singleton_zero_of_mass_eq_zero

Given the stated hypotheses, the branch free polytope equals singleton zero whenever mass equals zero property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
hmass :
c.mass x = 0
branchFreePolytope c hValid x = {0}
Proof (Lean source)
theorem branchFreePolytope_eq_singleton_zero_of_mass_eq_zero (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) (hmass : c.mass x = 0) : branchFreePolytope c hValid x = {0} := by ext γ simp only [Set.mem_singleton_iff] constructor · intro hγ change matrixNonnegative γ ∧ (∀ i, rowMass γ i ≤ c.lower x i) ∧ (∀ j, columnMass γ j ≤ c.upper x j) ∧ totalMass γ = c.mass x at hγ funext i j have hrowNonneg : ∀ i, 0 ≤ ∑ j, γ i j := fun i => sum_nonneg fun j _ => hγ.1 i j have hrows : ∀ i, (∑ j, γ i j) = 0 := by have hsum : (∑ i, ∑ j, γ i j) = 0 := by simpa [totalMass, hmass] using hγ.2.2.2 exact fun i => congrFun ((Fintype.sum_eq_zero_iff_of_nonneg hrowNonneg).mp hsum) i have hij := congrFun ((Fintype.sum_eq_zero_iff_of_nonneg (fun j => hγ.1 i j)).mp (hrows i)) j simpa using hij · rintro rfl change matrixNonnegative (0 : Coupling K) ∧ (∀ i, rowMass 0 i ≤ c.lower x i) ∧ (∀ j, columnMass 0 j ≤ c.upper x j) ∧ totalMass 0 = c.mass x simp [matrixNonnegative, rowMass, columnMass, totalMass, hValid.1, hValid.2, hmass]
CausalSmith.PartialID.SlateBenefitPartialTransport.branchFreePolytope_eq_singleton_zero_of_mass_eq_zero · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:55
theorem branchFree_benefitMass_le_upper

Given the stated hypotheses, the branch free benefit mass is at most upper property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
γ :
:
γ ∈ branchFreePolytope c hValid x
benefitMass γ ≤ c.benefitUpper x
Proof (Lean source)
theorem branchFree_benefitMass_le_upper (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) {γ : Coupling K} (hγ : γ ∈ branchFreePolytope c hValid x) : benefitMass γ ≤ c.benefitUpper x := by unfold Capacities.benefitUpper apply Finset.le_inf' univ_nonempty intro o _ cases o with | none => change benefitMass γ ≤ c.mass x exact (benefitMass_le_totalMass γ hγ.1).trans_eq hγ.2.2.2 | some t => change benefitMass γ ≤ c.lowerLt x t + c.upperGt x t apply (benefitMass_le_strictRow_add_strictColumn γ hγ.1 t).trans apply add_le_add · unfold Capacities.lowerLt exact Finset.sum_le_sum fun i _ => hγ.2.1 i · unfold Capacities.upperGt exact Finset.sum_le_sum fun j _ => hγ.2.2.1 j
CausalSmith.PartialID.SlateBenefitPartialTransport.branchFree_benefitMass_le_upper · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:187
theorem branchFree_lower_le_benefitMass

Given the stated hypotheses, the branch free lower is at most benefit mass property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
γ :
:
γ ∈ branchFreePolytope c hValid x
c.benefitLower x ≤ benefitMass γ
Proof (Lean source)
theorem branchFree_lower_le_benefitMass (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) {γ : Coupling K} (hγ : γ ∈ branchFreePolytope c hValid x) : c.benefitLower x ≤ benefitMass γ := by unfold Capacities.benefitLower apply Finset.sup'_le univ_nonempty intro o _ cases o with | none => change 0 ≤ benefitMass γ exact benefitMass_nonneg γ hγ.1 | some t => change c.lowerLe x t - c.upperLe x t + min (c.gap x) 0 ≤ benefitMass γ have hcut := prefixRow_sub_prefixColumn_le_benefitMass γ hγ.1 t by_cases hg : c.gap x < 0 · have hq : c.q1 x ≤ c.q0 x := by unfold Capacities.gap at hg linarith have hcols := branchFree_exact_columns_of_q1_le_q0 c hValid x hq hγ have hcolPrefix : (∑ j with j ≤ t, columnMass γ j) = c.upperLe x t := by unfold Capacities.upperLe exact Finset.sum_congr rfl fun j _ => hcols j have hdefnonneg : ∀ i, 0 ≤ c.lower x i - rowMass γ i := fun i => sub_nonneg.mpr (hγ.2.1 i) have hpref : (∑ i with i ≤ t, (c.lower x i - rowMass γ i)) ≤ ∑ i, (c.lower x i - rowMass γ i) := Finset.sum_le_sum_of_subset_of_nonneg (filter_subset _ _) (fun _ _ _ => hdefnonneg _) have hprefEq : (∑ i with i ≤ t, (c.lower x i - rowMass γ i)) = c.lowerLe x t - ∑ i with i ≤ t, rowMass γ i := by unfold Capacities.lowerLe rw [Finset.sum_sub_distrib] have htotalEq : (∑ i, (c.lower x i - rowMass γ i)) = -c.gap x := by rw [Finset.sum_sub_distrib, ← Capacities.q0, sum_rowMass_eq_totalMass, hγ.2.2.2] rw [Capacities.mass, min_eq_right hq] unfold Capacities.gap ring rw [hprefEq, htotalEq] at hpref rw [hcolPrefix] at hcut rw [min_eq_left hg.le] linarith · have hq : c.q0 x ≤ c.q1 x := by unfold Capacities.gap at hg linarith have hrows := branchFree_exact_rows_of_q0_le_q1 c hValid x hq hγ have hrowPrefix : (∑ i with i ≤ t, rowMass γ i) = c.lowerLe x t := by unfold Capacities.lowerLe exact Finset.sum_congr rfl fun i _ => hrows i have hcolPrefix : (∑ j with j ≤ t, columnMass γ j) ≤ c.upperLe x t := by unfold Capacities.upperLe exact Finset.sum_le_sum fun j _ => hγ.2.2.1 j rw [hrowPrefix] at hcut rw [min_eq_right (le_of_not_gt hg)] linarith
CausalSmith.PartialID.SlateBenefitPartialTransport.branchFree_lower_le_benefitMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:208
def couplingSegment

The pointwise affine segment between two finite couplings.

Definition (Lean source)
K :
shared
t :
γ₀ γ₁ :
couplingSegment t γ₀ γ₁ :
fun i j => (1 - t) * γ₀ i j + t * γ₁ i j
CausalSmith.PartialID.SlateBenefitPartialTransport.couplingSegment · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:265
theorem couplingSegment_mem_branchFree

Given the stated hypotheses, the coupling segment belongs to branch free property holds.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
γ₀ γ₁ :
h₀ :
γ₀ ∈ branchFreePolytope c hValid x
h₁ :
γ₁ ∈ branchFreePolytope c hValid x
t :
ht0 :
0 ≤ t
ht1 :
t ≤ 1
couplingSegment t γ₀ γ₁ ∈ branchFreePolytope c hValid x
Proof (Lean source)
theorem couplingSegment_mem_branchFree (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) {γ₀ γ₁ : Coupling K} (h₀ : γ₀ ∈ branchFreePolytope c hValid x) (h₁ : γ₁ ∈ branchFreePolytope c hValid x) {t : ℝ} (ht0 : 0 ≤ t) (ht1 : t ≤ 1) : couplingSegment t γ₀ γ₁ ∈ branchFreePolytope c hValid x := by change matrixNonnegative _ ∧ (∀ i, rowMass _ i ≤ c.lower x i) ∧ (∀ j, columnMass _ j ≤ c.upper x j) ∧ totalMass _ = c.mass x have hcoef : 0 ≤ 1 - t := sub_nonneg.mpr ht1 refine ⟨fun i j => add_nonneg (mul_nonneg hcoef (h₀.1 i j)) (mul_nonneg ht0 (h₁.1 i j)), ?_, ?_, ?_⟩ · intro i simp only [rowMass, couplingSegment, Finset.sum_add_distrib, ← Finset.mul_sum] calc (1 - t) * (∑ j, γ₀ i j) + t * (∑ j, γ₁ i j) ≤ (1 - t) * c.lower x i + t * c.lower x i := add_le_add (mul_le_mul_of_nonneg_left (h₀.2.1 i) hcoef) (mul_le_mul_of_nonneg_left (h₁.2.1 i) ht0) _ = c.lower x i := by ring · intro j simp only [columnMass, couplingSegment, Finset.sum_add_distrib, ← Finset.mul_sum] calc (1 - t) * (∑ i, γ₀ i j) + t * (∑ i, γ₁ i j) ≤ (1 - t) * c.upper x j + t * c.upper x j := add_le_add (mul_le_mul_of_nonneg_left (h₀.2.2.1 j) hcoef) (mul_le_mul_of_nonneg_left (h₁.2.2.1 j) ht0) _ = c.upper x j := by ring · simp only [totalMass, couplingSegment, Finset.sum_add_distrib, ← Finset.mul_sum] change (1 - t) * totalMass γ₀ + t * totalMass γ₁ = c.mass x rw [h₀.2.2.2, h₁.2.2.2] ring
CausalSmith.PartialID.SlateBenefitPartialTransport.couplingSegment_mem_branchFree · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:269
theorem benefitMass_couplingSegment

the benefit mass coupling segment property holds.

Formal statement
K :
shared
t :
γ₀ γ₁ :
benefitMass (couplingSegment t γ₀ γ₁) = (1 - t) * benefitMass γ₀ + t * benefitMass γ₁
Proof (Lean source)
theorem benefitMass_couplingSegment (t : ℝ) (γ₀ γ₁ : Coupling K) : benefitMass (couplingSegment t γ₀ γ₁) = (1 - t) * benefitMass γ₀ + t * benefitMass γ₁ := by simp only [benefitMass, couplingSegment, Finset.sum_add_distrib, ← Finset.mul_sum]
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitMass_couplingSegment · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/SharpDefinitions.lean:305
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Helpers.Transport 45 declarations The finite capacity polytopes, strict-benefit objective, and total endpoint-flow selectors used by the sharpness and complexity statements.

Exact-mass partial transport

The finite capacity polytopes, strict-benefit objective, and total endpoint-flow selectors used by the sharpness and complexity statements.

def Coupling

The coupling is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
K :
Coupling K :
Type
Matrix (Fin K) (Fin K) ℝ
CausalSmith.PartialID.SlateBenefitPartialTransport.Coupling · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:25

The matrix nonnegative condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
K :
shared
γ :
i j :
matrixNonnegative γ :
Prop
0 ≤ γ i j
CausalSmith.PartialID.SlateBenefitPartialTransport.matrixNonnegative · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:29
def rowMass

The row mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
K :
shared
γ :
i :
Fin K
rowMass γ i :
∑ j, γ i j
CausalSmith.PartialID.SlateBenefitPartialTransport.rowMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:32
def columnMass

The column mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
K :
shared
γ :
j :
Fin K
columnMass γ j :
∑ i, γ i j
CausalSmith.PartialID.SlateBenefitPartialTransport.columnMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:34
def totalMass

The total mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
K :
shared
γ :
totalMass γ :
∑ i, ∑ j, γ i j
CausalSmith.PartialID.SlateBenefitPartialTransport.totalMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:36

A partial transport polytopes records the data and compatibility conditions used by the slate-benefit partial-transport construction.

Definition (Lean source)
K :
gammaStar :
gammaPlus :
gammaMinus :
gammaZero :
CausalSmith.PartialID.SlateBenefitPartialTransport.PartialTransportPolytopes · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:39
def exactMassPolytope

The reusable four-polytope family: branch-free exact mass, exact rows, exact columns, and the doubly-exact tie face.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
_hValid :
x :
𝒳
exactMassPolytope c _hValid x :
clause 1
gammaStar := {γ | matrixNonnegative γ ∧ (∀ i, rowMass γ i ≤ c.lower x i) ∧ (∀ j, columnMass γ j ≤ c.upper x j) ∧ totalMass γ = c.mass x}
clause 2
gammaPlus := {γ | matrixNonnegative γ ∧ (∀ i, rowMass γ i = c.lower x i) ∧ (∀ j, columnMass γ j ≤ c.upper x j)}
clause 3
gammaMinus := {γ | matrixNonnegative γ ∧ (∀ i, rowMass γ i ≤ c.lower x i) ∧ (∀ j, columnMass γ j = c.upper x j)}
clause 4
gammaZero := {γ | matrixNonnegative γ ∧ (∀ i, rowMass γ i = c.lower x i) ∧ (∀ j, columnMass γ j = c.upper x j)}
CausalSmith.PartialID.SlateBenefitPartialTransport.exactMassPolytope · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:46
def paperExactMassPolytope

The complete four-polytope family on the paper's observed-law domain.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
Pobs :
_hK :
3 ≤ K
_hDomain :
c :
Capacities 𝒳 K
_hc :
_hCompatible :
hValid :
x :
𝒳
paperExactMassPolytope Pobs _hK _hDomain c _hc _hCompatible hValid x :
CausalSmith.PartialID.SlateBenefitPartialTransport.paperExactMassPolytope · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:68

The branch free polytope is the event specified by the stated potential-outcome conditions.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
branchFreePolytope c hValid x :
(exactMassPolytope c hValid x).gammaStar
CausalSmith.PartialID.SlateBenefitPartialTransport.branchFreePolytope · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:77

The inc polytope is the event specified by the stated potential-outcome conditions.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
incPolytope c hValid x :
(exactMassPolytope c hValid x).gammaPlus
CausalSmith.PartialID.SlateBenefitPartialTransport.incPolytope · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:84

The dec polytope is the event specified by the stated potential-outcome conditions.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
decPolytope c hValid x :
(exactMassPolytope c hValid x).gammaMinus
CausalSmith.PartialID.SlateBenefitPartialTransport.decPolytope · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:90

The tie polytope is the event specified by the stated potential-outcome conditions.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
tiePolytope c hValid x :
(exactMassPolytope c hValid x).gammaZero
CausalSmith.PartialID.SlateBenefitPartialTransport.tiePolytope · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:96

The benefit mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
K :
shared
γ :
benefitMass γ :
∑ i, ∑ j with i < j, γ i j
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:102

The positive support card is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
K :
shared
γ :
positiveSupportCard γ :
((Finset.univ.product univ).filter fun ij => 0 < γ ij.1 ij.2).card
CausalSmith.PartialID.SlateBenefitPartialTransport.positiveSupportCard · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:107
def Allocation

One positive sparse allocation, represented by its row, column, and mass.

Definition (Lean source)
K :
Allocation K :
Type
Fin K × Fin K × ℝ
CausalSmith.PartialID.SlateBenefitPartialTransport.Allocation · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:111

The threshold flow lower sparse is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
_hValid :
x :
𝒳
thresholdFlowLowerSparse c _hValid x :
completePrimary <| maxNonBenefitPass (indexedMasses (c.lower x)) (indexedMasses (c.upper x))
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlowLowerSparse · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2003

The threshold flow upper sparse is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
_hValid :
x :
𝒳
thresholdFlowUpperSparse c _hValid x :
completePrimary <| maxBenefitPass (indexedMasses (c.lower x)).reverse (indexedMasses (c.upper x)).reverse
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlowUpperSparse · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2009

The threshold flow lower is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
thresholdFlowLower c hValid x :
sparseMatrix (thresholdFlowLowerSparse c hValid x)
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlowLower · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2044

The threshold flow upper is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
thresholdFlowUpper c hValid x :
sparseMatrix (thresholdFlowUpperSparse c hValid x)
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlowUpper · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2049
theorem thresholdFlow_endpoint_spec

Both threshold matrices are feasible and attain their respective benefit endpoints, without requiring a compatible-baseline witness. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
conclusion 1
thresholdFlowLower c hValid x ∈ branchFreePolytope c hValid x
conclusion 2
benefitMass (thresholdFlowLower c hValid x) = c.benefitLower x
conclusion 3
thresholdFlowUpper c hValid x ∈ branchFreePolytope c hValid x
conclusion 4
benefitMass (thresholdFlowUpper c hValid x) = c.benefitUpper x
Proof (Lean source)
theorem thresholdFlow_endpoint_spec (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) : thresholdFlowLower c hValid x ∈ branchFreePolytope c hValid x ∧ benefitMass (thresholdFlowLower c hValid x) = c.benefitLower x ∧ thresholdFlowUpper c hValid x ∈ branchFreePolytope c hValid x ∧ benefitMass (thresholdFlowUpper c hValid x) = c.benefitUpper x := by have hnonnegative := thresholdFlow_matrices_nonnegative c hValid x have hmargins := thresholdFlow_margin_spec c hValid x have hbenefit := thresholdFlow_benefit_spec c hValid x constructor · exact ⟨hnonnegative.1, hmargins.1⟩ exact ⟨hbenefit.1, ⟨hnonnegative.2, hmargins.2⟩, hbenefit.2⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlow_endpoint_spec · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2192
def PrincipalStratumComponent

The selection/outcome table within one treatment principal stratum.

Definition (Lean source)
K :
PrincipalStratumComponent K :
Type
BoolBoolFin K → Fin K → ℝ
CausalSmith.PartialID.SlateBenefitPartialTransport.PrincipalStratumComponent · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2206
def baselineComplierMass

Conditional complier mass in a baseline full law.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
POSystem.{uV, uVal, uOmega}
W :
FullLawCandidate P₀ 𝒳 K
x :
𝒳
baselineComplierMass W x :
conditionalReal W.system.μ W.slate.complierEvent (W.slate.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.baselineComplierMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2210
def baselineNeverTakerComponent

The baseline never-taker selection/outcome component in a cell.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
POSystem.{uV, uVal, uOmega}
W :
FullLawCandidate P₀ 𝒳 K
x :
𝒳
baselineNeverTakerComponent W x :
fun s0 s1 y0 y1
=> conditionalReal W.system.μ {ω | W.slate.D0 ω = false ∧ W.slate.D1 ω = false ∧ W.slate.S0 ω = s0 ∧ W.slate.S1 ω = s1 ∧ W.slate.Y0 ω = y0 ∧ W.slate.Y1 ω = y1} (W.slate.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.baselineNeverTakerComponent · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2215
def baselineAlwaysTakerComponent

The baseline always-taker selection/outcome component in a cell.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
POSystem.{uV, uVal, uOmega}
W :
FullLawCandidate P₀ 𝒳 K
x :
𝒳
baselineAlwaysTakerComponent W x :
fun s0 s1 y0 y1
=> conditionalReal W.system.μ {ω | W.slate.D0 ω = true ∧ W.slate.D1 ω = true ∧ W.slate.S0 ω = s0 ∧ W.slate.S1 ω = s1 ∧ W.slate.Y0 ω = y0 ∧ W.slate.Y1 ω = y1} (W.slate.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.baselineAlwaysTakerComponent · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2224

A baseline law compatible with the supplied observed law and capacities. It exposes the conditional complier mass and the two noncomplier components that the latent completion must preserve.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
POSystem.{uV, uVal, uOmega}
Pobs :
c :
Capacities 𝒳 K
law :
FullLawCandidate P₀ 𝒳 K
feasible :
capacities_eq :
complierMass :
𝒳 → ℝ
complierMass_eq :
∀ x, complierMass x = baselineComplierMass law x
qMax_le_complierMass :
∀ x, max (c.q0 x) (c.q1 x) ≤ complierMass x
neverTakerComponent :
neverTaker_eq :
∀ x, neverTakerComponent x = baselineNeverTakerComponent law x
alwaysTakerComponent :
alwaysTaker_eq :
∀ x, alwaysTakerComponent x = baselineAlwaysTakerComponent law x
CausalSmith.PartialID.SlateBenefitPartialTransport.CompatibleBaseline · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2233

Residual selected-complier strata together with the baseline law and its definitionally unchanged never-taker and always-taker components.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
POSystem.{uV, uVal, uOmega}
Pobs :
c :
Capacities 𝒳 K
survivor :
selectedOnlyUnderZero :
Fin K → ℝ
selectedOnlyUnderOne :
Fin K → ℝ
neverSelectedMass :
neverTakerComponent :
alwaysTakerComponent :
baselineLaw :
FullLawCandidate P₀ 𝒳 K
baselineCompatible :
FullLawFeasible Pobs baselineLaw
CausalSmith.PartialID.SlateBenefitPartialTransport.ThresholdLatentCompletion · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2249
def thresholdLatentCompletion

The threshold latent completion is the measure produced by the stated finite slate-benefit construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
POSystem.{uV, uVal, uOmega}
Pobs :
c :
Capacities 𝒳 K
baseline :
CompatibleBaseline P₀ Pobs c
_hValid :
x :
𝒳
γ :
thresholdLatentCompletion baseline _hValid x γ :
clause 1
survivor := γ
clause 2
selectedOnlyUnderZero := fun i => if c.gap x < 0 then c.lower x i - rowMass γ i else 0
clause 3
selectedOnlyUnderOne := fun j => if 0 < c.gap x then c.upper x j - columnMass γ j else 0
clause 4
neverSelectedMass := baseline.complierMass x - max (c.q0 x) (c.q1 x)
clause 5
neverTakerComponent := baseline.neverTakerComponent x
clause 6
alwaysTakerComponent := baseline.alwaysTakerComponent x
clause 7
baselineLaw := baseline.law
clause 8
baselineCompatible := baseline.feasible
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdLatentCompletion · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2262

A threshold flow result records the data and compatibility conditions used by the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
POSystem.{uV, uVal, uOmega}
Pobs :
c :
Capacities 𝒳 K
lower :
upper :
CausalSmith.PartialID.SlateBenefitPartialTransport.ThresholdFlowResult · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2276
def thresholdFlow

Total lower- and upper-endpoint flows, including the one-sided residual selection strata, never-selected mass, and unchanged baseline-law component.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
POSystem.{uV, uVal, uOmega}
Pobs :
c :
Capacities 𝒳 K
baseline :
CompatibleBaseline P₀ Pobs c
hValid :
x :
𝒳
thresholdFlow baseline hValid x :
clause 1
lower := thresholdLatentCompletion baseline hValid x (thresholdFlowLower c hValid x)
clause 2
upper := thresholdLatentCompletion baseline hValid x (thresholdFlowUpper c hValid x)
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlow · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2282
theorem thresholdFlow_spec

The threshold construction returns feasible endpoint-attaining survivor couplings while preserving the compatible baseline's noncomplier components. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
POSystem.{uV, uVal, uOmega}
Pobs :
c :
Capacities 𝒳 K
baseline :
CompatibleBaseline P₀ Pobs c
hValid :
x :
𝒳
out :
thresholdFlow baseline hValid x
out.lower.survivor ∈ branchFreePolytope c hValid x
benefitMass out.lower.survivor = c.benefitLower x
out.upper.survivor ∈ branchFreePolytope c hValid x
benefitMass out.upper.survivor = c.benefitUpper x
out.lower.neverSelectedMass = baseline.complierMass x - max (c.q0 x) (c.q1 x)
out.upper.neverSelectedMass = baseline.complierMass x - max (c.q0 x) (c.q1 x)
out.lower.neverTakerComponent = baseline.neverTakerComponent x
out.upper.neverTakerComponent = baseline.neverTakerComponent x
out.lower.alwaysTakerComponent = baseline.alwaysTakerComponent x
out.upper.alwaysTakerComponent = baseline.alwaysTakerComponent x
Proof (Lean source)
theorem thresholdFlow_spec {P₀ : POSystem.{uV, uVal, uOmega}} {Pobs : Measure (ObservedDatum 𝒳 K)} {c : Capacities 𝒳 K} (baseline : CompatibleBaseline P₀ Pobs c) (hValid : ValidCapacities c) (x : 𝒳) : let out := thresholdFlow baseline hValid x out.lower.survivor ∈ branchFreePolytope c hValid x ∧ benefitMass out.lower.survivor = c.benefitLower x ∧ out.upper.survivor ∈ branchFreePolytope c hValid x ∧ benefitMass out.upper.survivor = c.benefitUpper x ∧ out.lower.neverSelectedMass = baseline.complierMass x - max (c.q0 x) (c.q1 x) ∧ out.upper.neverSelectedMass = baseline.complierMass x - max (c.q0 x) (c.q1 x) ∧ out.lower.neverTakerComponent = baseline.neverTakerComponent x ∧ out.upper.neverTakerComponent = baseline.neverTakerComponent x ∧ out.lower.alwaysTakerComponent = baseline.alwaysTakerComponent x ∧ out.upper.alwaysTakerComponent = baseline.alwaysTakerComponent x := by have hnonnegative := thresholdFlow_matrices_nonnegative c hValid x have hmargins := thresholdFlow_margin_spec c hValid x have hbenefit := thresholdFlow_benefit_spec c hValid x have hlower : thresholdFlowLower c hValid x ∈ branchFreePolytope c hValid x := by change matrixNonnegative (thresholdFlowLower c hValid x) ∧ (∀ i, rowMass (thresholdFlowLower c hValid x) i ≤ c.lower x i) ∧ (∀ j, columnMass (thresholdFlowLower c hValid x) j ≤ c.upper x j) ∧ totalMass (thresholdFlowLower c hValid x) = c.mass x exact ⟨hnonnegative.1, hmargins.1⟩ have hupper : thresholdFlowUpper c hValid x ∈ branchFreePolytope c hValid x := by change matrixNonnegative (thresholdFlowUpper c hValid x) ∧ (∀ i, rowMass (thresholdFlowUpper c hValid x) i ≤ c.lower x i) ∧ (∀ j, columnMass (thresholdFlowUpper c hValid x) j ≤ c.upper x j) ∧ totalMass (thresholdFlowUpper c hValid x) = c.mass x exact ⟨hnonnegative.2, hmargins.2⟩ exact ⟨hlower, hbenefit.1, hupper, hbenefit.2, rfl, rfl, rfl, rfl, rfl, rfl⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlow_spec · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2292

An output bundled with the number of arithmetic operations and comparisons performed by its costed implementation.

Definition (Lean source)
α :
Type*
value :
α
operations :
def costedThresholdCuts

The costed threshold scan uses linear prefix/tail scans and then folds the candidate lists by maximum and minimum.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
costedThresholdCuts c x :
Costed (ℝ × ℝ)
lowerValues :
lowerThresholdValues c x
upperValues :
upperThresholdValues c x
{ value := (lowerValues.foldl max 0, upperValues.foldl min (c.mass x)) operations := 12 * K + 8 }
CausalSmith.PartialID.SlateBenefitPartialTransport.costedThresholdCuts · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2641
theorem costedThresholdCuts_value

The costed scan computes exactly the two public threshold endpoint functionals. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
(costedThresholdCuts c x).value = (c.benefitLower x, c.benefitUpper x)
Proof (Lean source)
theorem costedThresholdCuts_value (c : Capacities 𝒳 K) (x : 𝒳) : (costedThresholdCuts c x).value = (c.benefitLower x, c.benefitUpper x) := by rw [show (costedThresholdCuts c x).value = ((lowerThresholdValues c x).foldl max 0, (upperThresholdValues c x).foldl min (c.mass x)) by rfl] rw [lowerThresholdValues_eq_candidates, upperThresholdValues_eq_candidates] rw [foldl_max_finRange_eq_sup', foldl_min_finRange_eq_inf'] rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.costedThresholdCuts_value · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2649
theorem thresholdFlowLower_positiveSupportCard_le

The lower threshold coupling has at most 2 * K - 1 positive cells. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
hK :
3 ≤ K
c :
Capacities 𝒳 K
hValid :
x :
𝒳
positiveSupportCard (thresholdFlowLower c hValid x) ≤ 2 * K - 1
Proof (Lean source)
theorem thresholdFlowLower_positiveSupportCard_le (hK : 3 ≤ K) (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) : positiveSupportCard (thresholdFlowLower c hValid x) ≤ 2 * K - 1 := by rw [thresholdFlowLower] calc positiveSupportCard (sparseMatrix (thresholdFlowLowerSparse c hValid x)) ≤ (thresholdFlowLowerSparse c hValid x).length := positiveSupportCard_sparseMatrix_le_length _ _ ≤ 2 * K - 1 := by have hlt := completePrimary_maxNonBenefitPass_length_lt (indexedMasses (c.lower x)) (indexedMasses (c.upper x)) (by simp [indexedMasses] omega) have hlt' : (thresholdFlowLowerSparse c hValid x).length < 2 * K := by simpa [thresholdFlowLowerSparse, indexedMasses, two_mul] using hlt exact Nat.le_sub_one_of_lt hlt'
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlowLower_positiveSupportCard_le · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2821
theorem thresholdFlowUpper_positiveSupportCard_le

The upper threshold coupling has at most 2 * K - 1 positive cells. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
hK :
3 ≤ K
c :
Capacities 𝒳 K
hValid :
x :
𝒳
positiveSupportCard (thresholdFlowUpper c hValid x) ≤ 2 * K - 1
Proof (Lean source)
theorem thresholdFlowUpper_positiveSupportCard_le (hK : 3 ≤ K) (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) : positiveSupportCard (thresholdFlowUpper c hValid x) ≤ 2 * K - 1 := by rw [thresholdFlowUpper] calc positiveSupportCard (sparseMatrix (thresholdFlowUpperSparse c hValid x)) ≤ (thresholdFlowUpperSparse c hValid x).length := positiveSupportCard_sparseMatrix_le_length _ _ ≤ 2 * K - 1 := by have hlt := completePrimary_maxBenefitPass_length_lt (indexedMasses (c.lower x)).reverse (indexedMasses (c.upper x)).reverse (by simp [indexedMasses] omega) have hlt' : (thresholdFlowUpperSparse c hValid x).length < 2 * K := by simpa [thresholdFlowUpperSparse, indexedMasses, two_mul] using hlt exact Nat.le_sub_one_of_lt hlt'
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlowUpper_positiveSupportCard_le · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2839
def sparseCellOperationBudget

A capacity-magnitude-independent operation budget for the fixed-schedule sparse implementation. It covers the prefix/tail scans, both nested-graph passes, residual propagation within those passes, both complete transports, and final folds. Unused slots are padding, so the charged count is independent of comparison outcomes.

Definition (Lean source)
K :
sparseCellOperationBudget K :
64 * K + 32
CausalSmith.PartialID.SlateBenefitPartialTransport.sparseCellOperationBudget · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2857
def sparseCellActualOperations

The unpadded work counter mirrors every arithmetic operation and comparison in the residual-carrying implementation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
sparseCellActualOperations c x :
rows :
indexedMasses (c.lower x)
columns :
indexedMasses (c.upper x)
lowerPrimary :
maxNonBenefitPass rows columns
upperPrimary :
maxBenefitPass rows.reverse columns.reverse
(costedThresholdCuts c x).operations
+ maxNonBenefitSparseOperations rows columns
+ maxBenefitSparseOperations rows.reverse columns.reverse
+ completeSparseOperations lowerPrimary.rowResiduals lowerPrimary.columnResiduals
+ completeSparseOperations upperPrimary.rowResiduals upperPrimary.columnResiduals
CausalSmith.PartialID.SlateBenefitPartialTransport.sparseCellActualOperations · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2864
theorem sparseCellActualOperations_le_budget

The fixed schedule covers every operation in the residual-carrying sparse implementation. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
hK :
3 ≤ K
c :
Capacities 𝒳 K
x :
𝒳
Proof (Lean source)
-- @node: sparseCellActualOperations_le_budget theorem sparseCellActualOperations_le_budget (hK : 3 ≤ K) (c : Capacities 𝒳 K) (x : 𝒳) : sparseCellActualOperations c x ≤ sparseCellOperationBudget K := by let rows := indexedMasses (c.lower x) let columns := indexedMasses (c.upper x) let lowerPrimary := maxNonBenefitPass rows columns let upperPrimary := maxBenefitPass rows.reverse columns.reverse have hRows : rows.length = K := by simp [rows, indexedMasses] have hColumns : columns.length = K := by simp [columns, indexedMasses] have hLowerResidual : lowerPrimary.rowResiduals.length + lowerPrimary.columnResiduals.length ≤ 2 * K := by change (maxNonBenefitPass rows columns).rowResiduals.length + (maxNonBenefitPass rows columns).columnResiduals.length ≤ 2 * K have h := maxNonBenefitPass_residual_length_le rows columns omega have hUpperResidual : upperPrimary.rowResiduals.length + upperPrimary.columnResiduals.length ≤ 2 * K := by change (maxBenefitPass rows.reverse columns.reverse).rowResiduals.length + (maxBenefitPass rows.reverse columns.reverse).columnResiduals.length ≤ 2 * K have h := maxBenefitPass_residual_length_le rows.reverse columns.reverse simp only [List.length_reverse] at h omega have hLowerPass := maxNonBenefitSparseOperations_le rows columns have hUpperPass := maxBenefitSparseOperations_le rows.reverse columns.reverse have hLowerComplete := completeSparseOperations_le lowerPrimary.rowResiduals lowerPrimary.columnResiduals have hUpperComplete := completeSparseOperations_le upperPrimary.rowResiduals upperPrimary.columnResiduals simp only [List.length_reverse] at hUpperPass simp only [sparseCellActualOperations, costedThresholdCuts, Costed.operations, sparseCellOperationBudget] dsimp [rows, columns, lowerPrimary, upperPrimary] at * simp only [indexedMasses, length_map, List.length_finRange, List.length_reverse] at * omega
CausalSmith.PartialID.SlateBenefitPartialTransport.sparseCellActualOperations_le_budget · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2877

A costed cell implementation. Its value contains the evaluated threshold formulas and the actual sparse allocation traces. The charged fixed schedule dominates the fully enumerated unpadded work and depends only on K.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
costedSparseThresholdFlow c hValid x :
Costed ((ℝ × ℝ) × (List (Allocation K) × List (Allocation K)))
lower :
upper :
cuts :
{ value := (cuts.value, (lower, upper)) operations := sparseCellOperationBudget K }
CausalSmith.PartialID.SlateBenefitPartialTransport.costedSparseThresholdFlow · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2914

The threshold flow cost for is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
thresholdFlowCostFor c hValid :
∑ x, (costedSparseThresholdFlow c hValid x).operations
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlowCostFor · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2925

The threshold flow actual cost for is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
thresholdFlowActualCostFor c :
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlowActualCostFor · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2929
def materializeDense

Explicit row-major materialization of every matrix entry.

Definition (Lean source)
K :
shared
γ :
materializeDense γ :
(List.finRange K).flatMap fun i => (List.finRange K).map fun j => (i, j, γ i j)
CausalSmith.PartialID.SlateBenefitPartialTransport.materializeDense · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2933
def costedDenseThresholdFlow

The dense implementation materializes every entry of both matrices after running the costed threshold and sparse-flow implementation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
costedDenseThresholdFlow c hValid :
Costed (𝒳 → List (Allocation K) × List (Allocation K))
{ value := fun x => (materializeDense (thresholdFlowLower c hValid x), materializeDense (thresholdFlowUpper c hValid x)) operations := thresholdFlowCostFor c hValid + 2 * card 𝒳 * K ^ 2 }
CausalSmith.PartialID.SlateBenefitPartialTransport.costedDenseThresholdFlow · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2938

The dense threshold flow cost for is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
denseThresholdFlowCostFor c hValid :
(costedDenseThresholdFlow c hValid).operations
CausalSmith.PartialID.SlateBenefitPartialTransport.denseThresholdFlowCostFor · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2947

The dense threshold flow actual cost for is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
denseThresholdFlowActualCostFor c :
thresholdFlowActualCostFor c + 2 * card 𝒳 * K ^ 2
CausalSmith.PartialID.SlateBenefitPartialTransport.denseThresholdFlowActualCostFor · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/Transport.lean:2952
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Helpers.UniformGuardBounds 24 declarations Paper-local analytic lemmas used by the alpha-indexed deterministic guard.

Deterministic and concentration bounds for the uniform guard

Paper-local analytic lemmas used by the alpha-indexed deterministic guard.

theorem maxDeviation_tail_le

The centered-indicator second-moment route gives the sharp finite-union probability bound for the maximal guard-event deviation. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
μ :
shared
n :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
Pobs :
GuardMeasure 𝒳 K
hsamp :
FiniteIidSampling n μ Pobs O
hn :
0 < n
t :
ht :
0 < t
μ.real {ω | t < maxDeviation O Pobs n ω} ≤ (guardEvents 𝒳 K).card / (4 * (n : ℝ) * t ^ 2)
Proof (Lean source)
theorem maxDeviation_tail_le (O : ℕ → Ω → ObservedDatum 𝒳 K) (Pobs : GuardMeasure 𝒳 K) [DiscreteMeasurableSpace (ObservedDatum 𝒳 K)] [IsProbabilityMeasure μ] [IsProbabilityMeasure Pobs] (hsamp : FiniteIidSampling n μ Pobs O) (hn : 0 < n) (t : ℝ) (ht : 0 < t) : μ.real {ω | t < maxDeviation O Pobs n ω} ≤ (guardEvents 𝒳 K).card / (4 * (n : ℝ) * t ^ 2) := by classical have heTail (e : GuardEventIndex 𝒳 K) : μ.real {ω | t ≤ |empiricalFreq O (guardEvent e) n ω - Pobs.real {o | guardEvent e o = true}|} ≤ 1 / (4 * (n : ℝ) * t ^ 2) := by let X : Fin n → Ω → ℝ := fun i ω => centeredGuardIndicator Pobs e (O i ω) let D : Ω → ℝ := fun ω => (n : ℝ)⁻¹ * ∑ i : Fin n, X i ω have hXLp : ∀ i, MemLp (X i) 2 μ := by intro i exact centeredGuardIndicator_comp_memLp O (hsamp.measurable i i.isLt) (hsamp.law i i.isLt) e have hXindep : iIndepFun X μ := by exact hsamp.indep.comp (fun _ => centeredGuardIndicator Pobs e) (fun _ => by unfold centeredGuardIndicator; fun_prop) have hDLp : MemLp D 2 μ := by exact (memLp_finsetSum Finset.univ fun i _ => hXLp i).const_mul _ have hDmean : ∫ ω, D ω ∂μ = 0 := by dsimp [D, X] rw [integral_const_mul, integral_finset_sum _ (fun i _ => (hXLp i).integrable (by norm_num))] apply mul_eq_zero_of_right apply Finset.sum_eq_zero intro i _ exact integral_centeredGuardIndicator_comp O (hsamp.measurable i i.isLt) (hsamp.law i i.isLt) e have hvarX : ∀ i, variance (X i) μ ≤ 1 / 4 := by intro i have hvar := ProbabilityTheory.variance_le_expectation_sq (hXLp i).aestronglyMeasurable have hsq : ∫ ω, (X i ω) ^ 2 ∂μ = Pobs.real {o | guardEvent e o = true} * (1 - Pobs.real {o | guardEvent e o = true}) := by change ∫ ω, centeredGuardIndicator Pobs e (O i ω) ^ 2 ∂μ = _ rw [← integral_map (μ := μ) (φ := O i) (f := fun o => centeredGuardIndicator Pobs e o ^ 2) (hsamp.measurable i i.isLt).aemeasurable (by fun_prop), hsamp.law i i.isLt, integral_centeredGuardIndicator_sq] have hp := measureReal_le_one (μ := Pobs) (s := {o | guardEvent e o = true}) have hp0 : 0 ≤ Pobs.real {o | guardEvent e o = true} := measureReal_nonneg calc variance (X i) μ ≤ ∫ ω, (X i ω) ^ 2 ∂μ := by simpa only [Pi.pow_apply] using hvar _ = _ := hsq _ ≤ 1 / 4 := by nlinarith [sq_nonneg (Pobs.real {o | guardEvent e o = true} - 1 / 2)] have hvarD : variance D μ ≤ 1 / (4 * (n : ℝ)) := by have hpair : Pairwise (↑(Finset.univ : Finset (Fin n)) : Set (Fin n)) (fun i j => IndepFun (X i) (X j) μ) := by intro i _ j _ hij exact hXindep.indepFun hij have hsum := ProbabilityTheory.IndepFun.variance_sum (s := (Finset.univ : Finset (Fin n))) (fun i _ => hXLp i) hpair have hsum' : variance (fun ω => ∑ i : Fin n, X i ω) μ = ∑ i : Fin n, variance (X i) μ := by calc variance (fun ω => ∑ i : Fin n, X i ω) μ = variance (∑ i : Fin n, X i) μ := by congr 2 funext ω simp _ = _ := hsum dsimp [D] rw [ProbabilityTheory.variance_const_mul, hsum'] have hsumle : ∑ i : Fin n, variance (X i) μ ≤ (n : ℝ) / 4 := by calc _ ≤ ∑ _i : Fin n, (1 / 4 : ℝ) := Finset.sum_le_sum fun i _ => hvarX i _ = (n : ℝ) / 4 := by simp [nsmul_eq_mul]; ring have hnR : 0 < (n : ℝ) := by exact_mod_cast hn calc (n : ℝ)⁻¹ ^ 2 * ∑ i : Fin n, variance (X i) μ ≤ (n : ℝ)⁻¹ ^ 2 * ((n : ℝ) / 4) := mul_le_mul_of_nonneg_left hsumle (sq_nonneg _) _ = 1 / (4 * (n : ℝ)) := by field_simp have htail := ProbabilityTheory.meas_ge_le_variance_div_sq hDLp ht have hp := measureReal_le_one (μ := Pobs) (s := {o | guardEvent e o = true}) have hp0 : 0 ≤ Pobs.real {o | guardEvent e o = true} := measureReal_nonneg have hvar : Pobs.real {o | guardEvent e o = true} * (1 - Pobs.real {o | guardEvent e o = true}) ≤ 1 / 4 := by nlinarith [sq_nonneg (Pobs.real {o | guardEvent e o = true} - 1 / 2)] have hset : {ω | t ≤ |empiricalFreq O (guardEvent e) n ω - Pobs.real {o | guardEvent e o = true}|} = {ω | t ≤ |D ω - ∫ ω, D ω ∂μ|} := by ext ω simp only [Set.mem_setOf_eq] rw [hDmean, sub_zero, empiricalFreq_sub_eq_centered_sum O e hn] rw [hset, Measure.real] have hden : 0 < (n : ℝ) * t ^ 2 := mul_pos (by exact_mod_cast hn) (sq_pos_of_pos ht) calc (μ {ω | t ≤ |D ω - ∫ ω, D ω ∂μ|}).toReal ≤ (ofReal (variance D μ / t ^ 2)).toReal := (ENNReal.toReal_le_toReal (measure_ne_top _ _) ENNReal.ofReal_ne_top).2 htail _ = variance D μ / t ^ 2 := ENNReal.toReal_ofReal (div_nonneg (ProbabilityTheory.variance_nonneg _ _) (sq_nonneg _)) _ ≤ 1 / (4 * (n : ℝ) * t ^ 2) := by calc variance D μ / t ^ 2 ≤ (1 / (4 * (n : ℝ))) / t ^ 2 := div_le_div_of_nonneg_right hvarD (sq_nonneg _) _ = _ := by field_simp have hnonempty : (guardEvents 𝒳 K).Nonempty := by refine ⟨GuardEventIndex.cell (choice inferInstance), ?_⟩ simp [guardEvents] have hsubset : {ω | t < maxDeviation O Pobs n ω} ⊆ ⋃ e : GuardEventIndex 𝒳 K, {ω | t ≤ |empiricalFreq O (guardEvent e) n ω - Pobs.real {o | guardEvent e o = true}|} := by intro ω hω change t < maxDeviation O Pobs n ω at hω unfold maxDeviation at hω simp only [dif_pos hnonempty] at hω obtain ⟨e, he, heval⟩ := (Finset.lt_sup'_iff hnonempty).mp hω exact Set.mem_iUnion.2 ⟨e, le_of_lt heval⟩ calc μ.real {ω | t < maxDeviation O Pobs n ω} ≤ μ.real (⋃ e : GuardEventIndex 𝒳 K, {ω | t ≤ |empiricalFreq O (guardEvent e) n ω - Pobs.real {o | guardEvent e o = true}|}) := measureReal_mono hsubset _ ≤ ∑ e : GuardEventIndex 𝒳 K, μ.real {ω | t ≤ |empiricalFreq O (guardEvent e) n ω - Pobs.real {o | guardEvent e o = true}|} := measureReal_iUnion_fintype_le _ _ ≤ ∑ _e : GuardEventIndex 𝒳 K, 1 / (4 * (n : ℝ) * t ^ 2) := Finset.sum_le_sum fun e he => heTail e _ = (guardEvents 𝒳 K).card / (4 * (n : ℝ) * t ^ 2) := by simp [guardEvents, nsmul_eq_mul] ring
CausalSmith.PartialID.SlateBenefitPartialTransport.maxDeviation_tail_le · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:136
theorem maxDeviation_unionThreshold_tail_le

Given the stated hypotheses, the max deviation union threshold tail le property holds.

Formal statement
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
μ :
shared
n :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
Pobs :
GuardMeasure 𝒳 K
hsamp :
FiniteIidSampling n μ Pobs O
hn :
1 ≤ n
α :
:
0 < α
μ.real {ω | unionThreshold 𝒳 K n α < maxDeviation O Pobs n ω} ≤ α
Proof (Lean source)
theorem maxDeviation_unionThreshold_tail_le (O : ℕ → Ω → ObservedDatum 𝒳 K) (Pobs : GuardMeasure 𝒳 K) [IsProbabilityMeasure Pobs] (hsamp : FiniteIidSampling n μ Pobs O) (hn : 1 ≤ n) {α : ℝ} (hα : 0 < α) : μ.real {ω | unionThreshold 𝒳 K n α < maxDeviation O Pobs n ω} ≤ α := by letI : IsProbabilityMeasure μ := hsamp.isProbabilityMeasure have hcard : 0 < (guardEvents 𝒳 K).card := by rw [Finset.card_pos] exact ⟨.cell (choice inferInstance), by simp [guardEvents]⟩ have hnreal : 0 < (n : ℝ) := by exact_mod_cast (lt_of_lt_of_le zero_lt_one hn) have hfrac : 0 < (guardEvents 𝒳 K).card / (4 * (n : ℝ) * α) := by positivity have hb : 0 < unionThreshold 𝒳 K n α := Real.sqrt_pos.2 hfrac have ht := maxDeviation_tail_le O Pobs hsamp (lt_of_lt_of_le zero_lt_one hn) (unionThreshold 𝒳 K n α) hb calc _ ≤ (guardEvents 𝒳 K).card / (4 * (n : ℝ) * (unionThreshold 𝒳 K n α) ^ 2) := ht _ = α := by unfold unionThreshold rw [Real.sq_sqrt hfrac.le] field_simp
CausalSmith.PartialID.SlateBenefitPartialTransport.maxDeviation_unionThreshold_tail_le · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:274
theorem guardEvent_deviation_le_maxDeviation

Every event coordinate is bounded by the finite guard maximum. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
Pobs :
GuardMeasure 𝒳 K
n :
ω :
Ω
e :
|empiricalFreq O (guardEvent e) n ω - Pobs.real {o | guardEvent e o = true}|
maxDeviation O Pobs n ω
Proof (Lean source)
theorem guardEvent_deviation_le_maxDeviation (O : ℕ → Ω → ObservedDatum 𝒳 K) (Pobs : GuardMeasure 𝒳 K) [IsProbabilityMeasure Pobs] (n : ℕ) (ω : Ω) (e : GuardEventIndex 𝒳 K) : |empiricalFreq O (guardEvent e) n ω - Pobs.real {o | guardEvent e o = true}| ≤ maxDeviation O Pobs n ω := by classical have hnon : (guardEvents 𝒳 K).Nonempty := by exact ⟨.cell (choice inferInstance), by simp [guardEvents]⟩ unfold maxDeviation rw [dif_pos hnon] exact Finset.le_sup' (fun E : GuardEventIndex 𝒳 K => |empiricalFreq O (guardEvent E) n ω - Pobs.real {o | guardEvent E o = true}|) (show e ∈ (guardEvents 𝒳 K) by exact Finset.mem_univ e)
CausalSmith.PartialID.SlateBenefitPartialTransport.guardEvent_deviation_le_maxDeviation · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:299
theorem empiricalFreq_nonneg

the empirical freq nonneg property holds.

Formal statement
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
E :
ObservedDatum 𝒳 K → Bool
n :
ω :
Ω
0 ≤ empiricalFreq O E n ω
Proof (Lean source)
theorem empiricalFreq_nonneg (O : ℕ → Ω → ObservedDatum 𝒳 K) (E : ObservedDatum 𝒳 K → Bool) (n : ℕ) (ω : Ω) : 0 ≤ empiricalFreq O E n ω := by unfold empiricalFreq positivity
CausalSmith.PartialID.SlateBenefitPartialTransport.empiricalFreq_nonneg · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:316
theorem empiricalFreq_mono

Given the stated hypotheses, the empirical freq mono property holds.

Formal statement
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
E F :
ObservedDatum 𝒳 K → Bool
hEF :
∀ o
if
E o = true
then
F o = true
n :
ω :
Ω
empiricalFreq O E n ω ≤ empiricalFreq O F n ω
Proof (Lean source)
theorem empiricalFreq_mono (O : ℕ → Ω → ObservedDatum 𝒳 K) (E F : ObservedDatum 𝒳 K → Bool) (hEF : ∀ o, E o = true → F o = true) (n : ℕ) (ω : Ω) : empiricalFreq O E n ω ≤ empiricalFreq O F n ω := by unfold empiricalFreq gcongr with r hr by_cases hE : E (O r ω) = true · simp [hE, hEF _ hE] · rw [if_neg hE] split <;> norm_num
CausalSmith.PartialID.SlateBenefitPartialTransport.empiricalFreq_mono · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:323
theorem measurable_empiricalFreq_of_prefix

Given the stated hypotheses, the empirical freq whenever prefix map is measurable.

Formal statement
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
n :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
hO :
∀ i
if
i < n
then
E :
ObservedDatum 𝒳 K → Bool
Proof (Lean source)
theorem measurable_empiricalFreq_of_prefix (O : ℕ → Ω → ObservedDatum 𝒳 K) (hO : ∀ i, i < n → Measurable (O i)) (E : ObservedDatum 𝒳 K → Bool) : Measurable (empiricalFreq O E n) := by unfold empiricalFreq apply measurable_const.mul apply measurable_sum intro i hi apply Measurable.ite · exact ((MeasurableSet.of_discrete : MeasurableSet {o | E o = true}).preimage (hO i (by simpa using hi))) · exact measurable_const · exact measurable_const
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_empiricalFreq_of_prefix · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:335
theorem measurable_maxDeviation_of_prefix

Given the stated hypotheses, the max deviation whenever prefix map is measurable.

Formal statement
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
n :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
Pobs :
GuardMeasure 𝒳 K
hO :
∀ i
if
i < n
then
Proof (Lean source)
theorem measurable_maxDeviation_of_prefix (O : ℕ → Ω → ObservedDatum 𝒳 K) (Pobs : GuardMeasure 𝒳 K) [IsProbabilityMeasure Pobs] (hO : ∀ i, i < n → Measurable (O i)) : Measurable (maxDeviation O Pobs n) := by classical unfold maxDeviation split_ifs with hnon · let f : GuardEventIndex 𝒳 K → (Ω → ℝ) := fun e ω => |empiricalFreq O (guardEvent e) n ω - Pobs.real {o | guardEvent e o = true}| rw [show (fun ω => (guardEvents 𝒳 K).sup' hnon (fun e => |empiricalFreq O (guardEvent e) n ω - Pobs.real {o | guardEvent e o = true}|)) = (guardEvents 𝒳 K).sup' hnon f by funext ω exact (Finset.sup'_apply hnon f ω).symm] apply Finset.measurable_sup' hnon intro e he have hs : Measurable (fun ω => empiricalFreq O (guardEvent e) n ω - Pobs.real {o | guardEvent e o = true}) := (measurable_empiricalFreq_of_prefix O hO (guardEvent e)).sub measurable_const simpa only [Real.norm_eq_abs] using hs.norm · exact measurable_const
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_maxDeviation_of_prefix · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:351
theorem weightedConditional_stable

Stability of one cell-probability-weighted conditional probability. The small-cell branch avoids division by a nearly zero arm probability. Given the stated hypotheses, the stated conclusion follows.

Formal statement
p ph a ah b bh δ ε :
:
0 ≤ δ
:
0 < ε
hεhalf :
ε < 1 / 2
hp :
0 ≤ p
hph :
0 ≤ ph
ha :
0 ≤ a
hap :
a ≤ p
hoverlap :
ε * p ≤ a
hb :
0 ≤ b
hba :
b ≤ a
hah :
0 ≤ ah
hbh :
0 ≤ bh
hbhah :
bh ≤ ah
hpdev :
|ph - p| ≤ δ
hadev :
|ah - a| ≤ δ
hbdev :
|bh - b| ≤ δ
|ph * empiricalConditional bh ah - p * empiricalConditional b a| ≤ 8 * δ / ε ^ 2
Proof (Lean source)
lemma weightedConditional_stable {p ph a ah b bh δ ε : ℝ} (hδ : 0 ≤ δ) (hε : 0 < ε) (hεhalf : ε < 1 / 2) (hp : 0 ≤ p) (hph : 0 ≤ ph) (ha : 0 ≤ a) (hap : a ≤ p) (hoverlap : ε * p ≤ a) (hb : 0 ≤ b) (hba : b ≤ a) (hah : 0 ≤ ah) (hbh : 0 ≤ bh) (hbhah : bh ≤ ah) (hpdev : |ph - p| ≤ δ) (hadev : |ah - a| ≤ δ) (hbdev : |bh - b| ≤ δ) : |ph * empiricalConditional bh ah - p * empiricalConditional b a| ≤ 8 * δ / ε ^ 2 := by have hph_le : ph ≤ p + δ := by have := (le_abs_self (ph - p)).trans hpdev linarith have hεle : ε ≤ 1 := by linarith have hεsq : 0 < ε ^ 2 := sq_pos_of_pos hε by_cases hδzero : δ = 0 · subst δ have hphEq : ph = p := sub_eq_zero.mp (abs_eq_zero.mp (le_antisymm hpdev (abs_nonneg _))) have hahEq : ah = a := sub_eq_zero.mp (abs_eq_zero.mp (le_antisymm hadev (abs_nonneg _))) have hbhEq : bh = b := sub_eq_zero.mp (abs_eq_zero.mp (le_antisymm hbdev (abs_nonneg _))) subst ph; subst ah; subst bh simp by_cases hsmall : p < 4 * δ / ε · obtain ⟨hh0, hh1⟩ := empiricalConditional_nonneg_le_one hbh hbhah obtain ⟨hc0, hc1⟩ := empiricalConditional_nonneg_le_one hb hba have hleft0 : 0 ≤ ph * empiricalConditional bh ah := mul_nonneg hph hh0 have hright0 : 0 ≤ p * empiricalConditional b a := mul_nonneg hp hc0 have hleft : ph * empiricalConditional bh ah ≤ ph := by simpa using mul_le_of_le_one_right hph hh1 have hright : p * empiricalConditional b a ≤ p := by simpa using mul_le_of_le_one_right hp hc1 rw [abs_le] constructor · have hbound : ε ^ 2 * (p + ph) ≤ 8 * δ := by have hpε : ε * p < 4 * δ := by simpa [mul_comm] using (lt_div_iff₀ hε).mp hsmall have hεsq_le : ε ^ 2 ≤ ε := by nlinarith nlinarith [mul_nonneg hεsq.le hp, mul_nonneg hεsq.le hph] have : p + ph ≤ 8 * δ / ε ^ 2 := (le_div_iff₀ hεsq).2 (by simpa [mul_comm] using hbound) linarith · have hbound : ε ^ 2 * (p + ph) ≤ 8 * δ := by have hpε : ε * p < 4 * δ := by simpa [mul_comm] using (lt_div_iff₀ hε).mp hsmall have hεsq_le : ε ^ 2 ≤ ε := by nlinarith nlinarith [mul_nonneg hεsq.le hp, mul_nonneg hεsq.le hph] have : p + ph ≤ 8 * δ / ε ^ 2 := (le_div_iff₀ hεsq).2 (by simpa [mul_comm] using hbound) linarith · have hlarge : 4 * δ / ε ≤ p := le_of_not_gt hsmall have hpε : 4 * δ ≤ ε * p := by simpa [mul_comm] using (div_le_iff₀ hε).mp hlarge have ha4 : 4 * δ ≤ a := hpε.trans hoverlap have haPos : 0 < a := by have hdpos : 0 < δ := lt_of_le_of_ne hδ (Ne.symm hδzero) linarith have hahLower : a - δ ≤ ah := by have := (neg_le_of_abs_le hadev) linarith have hahPos : 0 < ah := by linarith rw [empiricalConditional, if_pos hahPos, empiricalConditional, if_pos haPos] have hratio0 : 0 ≤ bh / ah := div_nonneg hbh hahPos.le have hratio1 : bh / ah ≤ 1 := (div_le_one hahPos).2 hbhah have hpDiff : |ph - p| * (bh / ah) ≤ δ := by exact (mul_le_mul_of_nonneg_right hpdev hratio0).trans (by simpa [mul_comm] using mul_le_of_le_one_left hδ hratio1) have hcross : |bh * a - b * ah| ≤ 2 * δ * a := by calc |bh * a - b * ah| = |(bh - b) * a + b * (a - ah)| := by ring_nf _ ≤ |bh - b| * a + b * |a - ah| := by calc _ ≤ |(bh - b) * a| + |b * (a - ah)| := abs_add_le _ _ _ = _ := by rw [abs_mul, abs_mul, abs_of_nonneg ha, abs_of_nonneg hb] _ ≤ δ * a + a * δ := add_le_add (mul_le_mul_of_nonneg_right hbdev ha) (mul_le_mul (hba) (by simpa [abs_sub_comm] using hadev) (abs_nonneg _) ha) _ = 2 * δ * a := by ring have hratioDiff : |bh / ah - b / a| ≤ 8 * δ / (3 * a) := by rw [show bh / ah - b / a = (bh * a - b * ah) / (ah * a) by field_simp, abs_div, abs_mul, abs_of_pos hahPos, abs_of_pos haPos] have hdenLower : 3 * a ^ 2 ≤ 4 * (ah * a) := by have hm := mul_le_mul_of_nonneg_right hahLower ha nlinarith have hcross' : 3 * a * |bh * a - b * ah| ≤ 8 * δ * (ah * a) := by have hc := mul_le_mul_of_nonneg_left hcross (mul_nonneg (show (0 : ℝ) ≤ 3 by norm_num) ha) have hd := mul_le_mul_of_nonneg_left hdenLower (mul_nonneg (show (0 : ℝ) ≤ 2 by norm_num) hδ) nlinarith apply (div_le_div_iff₀ (mul_pos hahPos haPos) (mul_pos (by norm_num) haPos)).2 nlinarith have hpOverA : p / a ≤ 1 / ε := by apply (div_le_div_iff₀ haPos hε).2 simpa [mul_comm] using hoverlap calc |ph * (bh / ah) - p * (b / a)| = |(ph - p) * (bh / ah) + p * (bh / ah - b / a)| := by ring_nf _ ≤ |ph - p| * (bh / ah) + p * |bh / ah - b / a| := by calc _ ≤ |(ph - p) * (bh / ah)| + |p * (bh / ah - b / a)| := abs_add_le _ _ _ = _ := by rw [abs_mul, abs_mul, abs_of_nonneg hp, abs_of_nonneg hratio0] _ ≤ δ + p * (8 * δ / (3 * a)) := by gcongr _ ≤ 8 * δ / ε ^ 2 := by have hpa : p * (8 * δ / (3 * a)) ≤ 8 * δ / (3 * ε) := by calc p * (8 * δ / (3 * a)) = (8 * δ / 3) * (p / a) := by field_simp _ ≤ (8 * δ / 3) * (1 / ε) := by gcongr _ = 8 * δ / (3 * ε) := by ring have hcoarse : δ + 8 * δ / (3 * ε) ≤ 8 * δ / ε ^ 2 := by field_simp [hε.ne'] nlinarith [mul_nonneg hδ (sq_nonneg ε)] exact (by linarith : δ + p * (8 * δ / (3 * a)) ≤ δ + 8 * δ / (3 * ε)) |>.trans hcoarse
CausalSmith.PartialID.SlateBenefitPartialTransport.weightedConditional_stable · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:387
theorem weighted_positivePart_stable

Multiplication by nonnegative cell masses commutes with positive-part projection, which is one-Lipschitz against a nonnegative population target. Given the stated hypotheses, the stated conclusion follows.

Formal statement
p ph a ah R :
hp :
0 ≤ p
hph :
0 ≤ ph
ha :
0 ≤ a
hR :
|ph * ah - p * a| ≤ R
|ph * max ah 0 - p * a| ≤ R
Proof (Lean source)
theorem weighted_positivePart_stable {p ph a ah R : ℝ} (hp : 0 ≤ p) (hph : 0 ≤ ph) (ha : 0 ≤ a) (hR : |ph * ah - p * a| ≤ R) : |ph * max ah 0 - p * a| ≤ R := by rw [mul_max_of_nonneg _ _ hph, mul_zero] by_cases hah : 0 ≤ ph * ah · rw [max_eq_left hah] exact hR · rw [max_eq_right (le_of_not_ge hah)] have hpa : 0 ≤ p * a := mul_nonneg hp ha rw [abs_of_nonpos (by linarith : ph * ah - p * a ≤ 0)] at hR rw [zero_sub, abs_neg, abs_of_nonneg hpa] linarith
CausalSmith.PartialID.SlateBenefitPartialTransport.weighted_positivePart_stable · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:511
theorem ratio_error_le_three

Elementary denominator-safe quotient perturbation bound used by both endpoints after screening. Given the stated hypotheses, the stated conclusion follows.

Formal statement
M Mh N Nh A m :
hm :
0 < m
hM :
m ≤ M
hN0 :
0 ≤ N
hNM :
N ≤ M
hA :
0 ≤ A
hAsmall :
4 * A < m
hMerr :
|Mh - M| ≤ A
hNerr :
|Nh - N| ≤ A
conclusion 1
0 < Mh
conclusion 2
|Nh / Mh - N / M| ≤ 3 * A / m
Proof (Lean source)
theorem ratio_error_le_three {M Mh N Nh A m : ℝ} (hm : 0 < m) (hM : m ≤ M) (hN0 : 0 ≤ N) (hNM : N ≤ M) (hA : 0 ≤ A) (hAsmall : 4 * A < m) (hMerr : |Mh - M| ≤ A) (hNerr : |Nh - N| ≤ A) : 0 < Mh ∧ |Nh / Mh - N / M| ≤ 3 * A / m := by have hMpos : 0 < M := lt_of_lt_of_le hm hM have hMhLower : M - A ≤ Mh := by have := (abs_le.mp hMerr).1 linarith have hMh : 0 < Mh := by nlinarith refine ⟨hMh, ?_⟩ rw [show Nh / Mh - N / M = (Nh - N) / Mh + N * (M - Mh) / (M * Mh) by field_simp; ring] calc |(Nh - N) / Mh + N * (M - Mh) / (M * Mh)| ≤ |(Nh - N) / Mh| + |N * (M - Mh) / (M * Mh)| := abs_add_le _ _ _ = |Nh - N| / Mh + N * |M - Mh| / (M * Mh) := by rw [abs_div, abs_of_pos hMh, abs_div, abs_mul, abs_of_nonneg hN0, abs_mul, abs_of_pos hMpos, abs_of_pos hMh] _ ≤ A / Mh + M * A / (M * Mh) := by gcongr · simpa [abs_sub_comm] using hMerr _ = 2 * A / Mh := by field_simp; ring _ ≤ 3 * A / m := by have hhalf : m / 2 < Mh := by nlinarith exact (div_le_div_iff₀ hMh hm).2 (by nlinarith)
CausalSmith.PartialID.SlateBenefitPartialTransport.ratio_error_le_three · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:526
theorem capacity_functionals_lipschitz

Coordinatewise perturbations of nonnegative capacities control every branch-free mass and threshold-cut functional without choosing an active face. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c c' :
Capacities 𝒳 K
e :
he :
0 ≤ e
hcoord :
∀ x i, |c'.lower x i - c.lower x i| ≤ e ∧ |c'.upper x i - c.upper x i| ≤ e
x :
conclusion 1
|c'.mass x - c.mass x| ≤ K * e
conclusion 2
|c'.benefitLower x - c.benefitLower x| ≤ 4 * K * e
conclusion 3
|c'.benefitUpper x - c.benefitUpper x| ≤ 4 * K * e
Proof (Lean source)
theorem capacity_functionals_lipschitz (c c' : Capacities 𝒳 K) (e : ℝ) (he : 0 ≤ e) (hcoord : ∀ x i, |c'.lower x i - c.lower x i| ≤ e ∧ |c'.upper x i - c.upper x i| ≤ e) : ∀ x, |c'.mass x - c.mass x| ≤ K * e ∧ |c'.benefitLower x - c.benefitLower x| ≤ 4 * K * e ∧ |c'.benefitUpper x - c.benefitUpper x| ≤ 4 * K * e := by classical intro x have hq0 : |c'.q0 x - c.q0 x| ≤ K * e := by unfold Capacities.q0 simpa using abs_finset_sum_sub_le (c'.lower x) (c.lower x) e (fun i => (hcoord x i).1) have hq1 : |c'.q1 x - c.q1 x| ≤ K * e := by unfold Capacities.q1 simpa using abs_finset_sum_sub_le (c'.upper x) (c.upper x) e (fun i => (hcoord x i).2) have hKe : 0 ≤ (K : ℝ) * e := mul_nonneg (Nat.cast_nonneg _) he have hm : |c'.mass x - c.mass x| ≤ K * e := by unfold Capacities.mass exact abs_min_sub_min_le hKe hq0 hq1 have hprefLower (k : Fin K) : |c'.lowerLe x k - c.lowerLe x k| ≤ K * e := by unfold Capacities.lowerLe rw [← Finset.sum_sub_distrib] calc |∑ i with i ≤ k, (c'.lower x i - c.lower x i)| ≤ ∑ i with i ≤ k, |c'.lower x i - c.lower x i| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ i with i ≤ k, e := Finset.sum_le_sum fun i hi => (hcoord x i).1 _ ≤ ∑ _i : Fin K, e := by apply Finset.sum_le_sum_of_subset_of_nonneg (by intro i hi; simp) intro i hi hnot; exact he _ = K * e := by simp [nsmul_eq_mul] have hprefUpper (k : Fin K) : |c'.upperLe x k - c.upperLe x k| ≤ K * e := by unfold Capacities.upperLe rw [← Finset.sum_sub_distrib] calc |∑ i with i ≤ k, (c'.upper x i - c.upper x i)| ≤ ∑ i with i ≤ k, |c'.upper x i - c.upper x i| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ i with i ≤ k, e := Finset.sum_le_sum fun i hi => (hcoord x i).2 _ ≤ ∑ _i : Fin K, e := by apply Finset.sum_le_sum_of_subset_of_nonneg (by intro i hi; simp) intro i hi hnot; exact he _ = K * e := by simp [nsmul_eq_mul] have hstrictLower (k : Fin K) : |c'.lowerLt x k - c.lowerLt x k| ≤ K * e := by unfold Capacities.lowerLt rw [← Finset.sum_sub_distrib] calc |∑ i with i < k, (c'.lower x i - c.lower x i)| ≤ ∑ i with i < k, |c'.lower x i - c.lower x i| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ i with i < k, e := Finset.sum_le_sum fun i hi => (hcoord x i).1 _ ≤ ∑ _i : Fin K, e := by apply Finset.sum_le_sum_of_subset_of_nonneg (by intro i hi; simp) intro i hi hnot; exact he _ = K * e := by simp [nsmul_eq_mul] have htailUpper (k : Fin K) : |c'.upperGt x k - c.upperGt x k| ≤ K * e := by unfold Capacities.upperGt rw [← Finset.sum_sub_distrib] calc |∑ i with k < i, (c'.upper x i - c.upper x i)| ≤ ∑ i with k < i, |c'.upper x i - c.upper x i| := Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ i with k < i, e := Finset.sum_le_sum fun i hi => (hcoord x i).2 _ ≤ ∑ _i : Fin K, e := by apply Finset.sum_le_sum_of_subset_of_nonneg (by intro i hi; simp) intro i hi hnot; exact he _ = K * e := by simp [nsmul_eq_mul] have hgap : |c'.gap x - c.gap x| ≤ 2 * K * e := by unfold Capacities.gap rw [show c'.q1 x - c'.q0 x - (c.q1 x - c.q0 x) = (c'.q1 x - c.q1 x) - (c'.q0 x - c.q0 x) by ring] calc |(c'.q1 x - c.q1 x) - (c'.q0 x - c.q0 x)| ≤ |c'.q1 x - c.q1 x| + |c'.q0 x - c.q0 x| := abs_sub _ _ _ ≤ K * e + K * e := add_le_add hq1 hq0 _ = 2 * K * e := by ring have h2Ke : (0 : ℝ) ≤ 2 * (K : ℝ) * e := mul_nonneg (mul_nonneg (by norm_num) (Nat.cast_nonneg _)) he have hgapMin : |min (c'.gap x) 0 - min (c.gap x) 0| ≤ 2 * K * e := abs_min_sub_min_le h2Ke hgap (by simpa using h2Ke) have hLowerCand : ∀ t : Option (Fin K), |(match t with | none => 0 | some k => c'.lowerLe x k - c'.upperLe x k + min (c'.gap x) 0) - (match t with | none => 0 | some k => c.lowerLe x k - c.upperLe x k + min (c.gap x) 0)| ≤ 4 * K * e := by intro t cases t with | none => have hz : (0 : ℝ) ≤ 4 * (K : ℝ) * e := mul_nonneg (mul_nonneg (show (0 : ℝ) ≤ 4 by norm_num) (Nat.cast_nonneg _)) he simpa using hz | some k => change |(c'.lowerLe x k - c'.upperLe x k + min (c'.gap x) 0) - (c.lowerLe x k - c.upperLe x k + min (c.gap x) 0)| ≤ 4 * K * e rw [show (c'.lowerLe x k - c'.upperLe x k + min (c'.gap x) 0) - (c.lowerLe x k - c.upperLe x k + min (c.gap x) 0) = ((c'.lowerLe x k - c.lowerLe x k) - (c'.upperLe x k - c.upperLe x k)) + (min (c'.gap x) 0 - min (c.gap x) 0) by ring] let A : ℝ := c'.lowerLe x k - c.lowerLe x k let B : ℝ := c'.upperLe x k - c.upperLe x k let C : ℝ := min (c'.gap x) 0 - min (c.gap x) 0 have hab : |A - B| ≤ |A| + |B| := abs_sub A B have habc : |(A - B) + C| ≤ |A - B| + |C| := abs_add_le _ _ calc |(c'.lowerLe x k - c.lowerLe x k) - (c'.upperLe x k - c.upperLe x k) + (min (c'.gap x) 0 - min (c.gap x) 0)| ≤ |c'.lowerLe x k - c.lowerLe x k| + |c'.upperLe x k - c.upperLe x k| + |min (c'.gap x) 0 - min (c.gap x) 0| := by change |(A - B) + C| ≤ |A| + |B| + |C| nlinarith [habc, hab, abs_nonneg C] _ ≤ K * e + K * e + 2 * K * e := add_le_add (add_le_add (hprefLower k) (hprefUpper k)) hgapMin _ = 4 * K * e := by ring have hBL : |c'.benefitLower x - c.benefitLower x| ≤ 4 * K * e := by rw [benefitLower_eq_sup_explicit, benefitLower_eq_sup_explicit] exact abs_sup'_sub_sup'_le _ _ _ (by positivity) hLowerCand have hUpperCand : ∀ t : Option (Fin K), |(match t with | none => c'.mass x | some k => c'.lowerLt x k + c'.upperGt x k) - (match t with | none => c.mass x | some k => c.lowerLt x k + c.upperGt x k)| ≤ 4 * K * e := by intro t cases t with | none => exact hm.trans (by nlinarith [hKe]) | some k => change |(c'.lowerLt x k + c'.upperGt x k) - (c.lowerLt x k + c.upperGt x k)| ≤ 4 * K * e rw [show (c'.lowerLt x k + c'.upperGt x k) - (c.lowerLt x k + c.upperGt x k) = (c'.lowerLt x k - c.lowerLt x k) + (c'.upperGt x k - c.upperGt x k) by ring] calc |(c'.lowerLt x k - c.lowerLt x k) + (c'.upperGt x k - c.upperGt x k)| ≤ |c'.lowerLt x k - c.lowerLt x k| + |c'.upperGt x k - c.upperGt x k| := abs_add_le _ _ _ ≤ K * e + K * e := add_le_add (hstrictLower k) (htailUpper k) _ ≤ 4 * K * e := by nlinarith [hKe] have hBU : |c'.benefitUpper x - c.benefitUpper x| ≤ 4 * K * e := by rw [benefitUpper_eq_inf_explicit, benefitUpper_eq_inf_explicit] exact abs_inf'_sub_inf'_le _ _ _ (by positivity) hUpperCand exact ⟨hm, hBL, hBU⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.capacity_functionals_lipschitz · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:624
def weightedCapacities

Multiply all capacity coordinates in a cell by its nonnegative cell mass.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
p :
𝒳 → ℝ
c :
Capacities 𝒳 K
weightedCapacities p c :
Capacities 𝒳 K
clause 1
lower x i := p x * c.lower x i
clause 2
upper x i := p x * c.upper x i
CausalSmith.PartialID.SlateBenefitPartialTransport.weightedCapacities · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:782
theorem weightedCapacities_mass Lemma 1 in the paper ↗

Given the stated hypotheses, the weighted capacities mass property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
p :
𝒳 → ℝ
c :
Capacities 𝒳 K
hp :
∀ x, 0 ≤ p x
x :
𝒳
(weightedCapacities p c).mass x = p x * c.mass x
Proof (Lean source)
theorem weightedCapacities_mass (p : 𝒳 → ℝ) (c : Capacities 𝒳 K) (hp : ∀ x, 0 ≤ p x) (x : 𝒳) : (weightedCapacities p c).mass x = p x * c.mass x := by unfold Capacities.mass Capacities.q0 Capacities.q1 weightedCapacities rw [← Finset.mul_sum, ← Finset.mul_sum, mul_min_of_nonneg _ _ (hp x)]
CausalSmith.PartialID.SlateBenefitPartialTransport.weightedCapacities_mass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:788
theorem weightedCapacities_benefitLower Lemma 2 in the paper ↗

Given the stated hypotheses, the weighted capacities benefit lower property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
p :
𝒳 → ℝ
c :
Capacities 𝒳 K
hp :
∀ x, 0 ≤ p x
x :
𝒳
(weightedCapacities p c).benefitLower x = p x * c.benefitLower x
Proof (Lean source)
theorem weightedCapacities_benefitLower (p : 𝒳 → ℝ) (c : Capacities 𝒳 K) (hp : ∀ x, 0 ≤ p x) (x : 𝒳) : (weightedCapacities p c).benefitLower x = p x * c.benefitLower x := by rw [benefitLower_eq_sup_explicit, benefitLower_eq_sup_explicit, ← sup'_mul_of_nonneg (p x) (hp x)] congr 1 funext t cases t with | none => simp | some k => unfold Capacities.lowerLe Capacities.upperLe Capacities.gap Capacities.q0 Capacities.q1 weightedCapacities simp only rw [← Finset.mul_sum, ← Finset.mul_sum] rw [← Finset.mul_sum, ← Finset.mul_sum] rw [show p x * ∑ i, c.upper x i - p x * ∑ i, c.lower x i = p x * (∑ i, c.upper x i - ∑ i, c.lower x i) by ring] have hmin : min (p x * (∑ i, c.upper x i - ∑ i, c.lower x i)) 0 = p x * min (∑ i, c.upper x i - ∑ i, c.lower x i) 0 := by calc _ = min (p x * (∑ i, c.upper x i - ∑ i, c.lower x i)) (p x * 0) := by simp _ = _ := (mul_min_of_nonneg _ _ (hp x)).symm rw [hmin] ring
CausalSmith.PartialID.SlateBenefitPartialTransport.weightedCapacities_benefitLower · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:821
theorem weightedCapacities_benefitUpper Lemma 3 in the paper ↗

Given the stated hypotheses, the weighted capacities benefit upper property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
p :
𝒳 → ℝ
c :
Capacities 𝒳 K
hp :
∀ x, 0 ≤ p x
x :
𝒳
(weightedCapacities p c).benefitUpper x = p x * c.benefitUpper x
Proof (Lean source)
theorem weightedCapacities_benefitUpper (p : 𝒳 → ℝ) (c : Capacities 𝒳 K) (hp : ∀ x, 0 ≤ p x) (x : 𝒳) : (weightedCapacities p c).benefitUpper x = p x * c.benefitUpper x := by rw [benefitUpper_eq_inf_explicit, benefitUpper_eq_inf_explicit, ← inf'_mul_of_nonneg (p x) (hp x)] congr 1 funext t cases t with | none => exact weightedCapacities_mass p c hp x | some k => unfold Capacities.lowerLt Capacities.upperGt weightedCapacities simp only rw [← Finset.mul_sum, ← Finset.mul_sum] ring
CausalSmith.PartialID.SlateBenefitPartialTransport.weightedCapacities_benefitUpper · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:848
theorem weightedCapacity_aggregate_close

Coordinatewise weighted-capacity control implies simultaneous aggregate mass and endpoint-numerator control. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
p ph :
𝒳 → ℝ
c ch :
Capacities 𝒳 K
e :
he :
0 ≤ e
hp :
∀ x, 0 ≤ p x
hph :
∀ x, 0 ≤ ph x
hcoord :
∀ x i,
|ph x * ch.lower x i - p x * c.lower x i| ≤ e ∧
|ph x * ch.upper x i - p x * c.upper x i| ≤ e
conclusion 1
|(∑ x, ph x * ch.mass x) - ∑ x, p x * c.mass x| ≤ 4 * K * card 𝒳 * e
conclusion 2
|(∑ x, ph x * ch.benefitLower x) - ∑ x, p x * c.benefitLower x|
≤ 4 * K * card 𝒳 * e
conclusion 3
|(∑ x, ph x * ch.benefitUpper x) - ∑ x, p x * c.benefitUpper x|
≤ 4 * K * card 𝒳 * e
Proof (Lean source)
theorem weightedCapacity_aggregate_close (p ph : 𝒳 → ℝ) (c ch : Capacities 𝒳 K) (e : ℝ) (he : 0 ≤ e) (hp : ∀ x, 0 ≤ p x) (hph : ∀ x, 0 ≤ ph x) (hcoord : ∀ x i, |ph x * ch.lower x i - p x * c.lower x i| ≤ e ∧ |ph x * ch.upper x i - p x * c.upper x i| ≤ e) : |(∑ x, ph x * ch.mass x) - ∑ x, p x * c.mass x| ≤ 4 * K * card 𝒳 * e ∧ |(∑ x, ph x * ch.benefitLower x) - ∑ x, p x * c.benefitLower x| ≤ 4 * K * card 𝒳 * e ∧ |(∑ x, ph x * ch.benefitUpper x) - ∑ x, p x * c.benefitUpper x| ≤ 4 * K * card 𝒳 * e := by let cw := weightedCapacities p c let chw := weightedCapacities ph ch have hlip (x) := capacity_functionals_lipschitz cw chw e he (fun x i => by simpa [chw, cw, weightedCapacities] using hcoord x i) x have hR : 0 ≤ 4 * (K : ℝ) * card 𝒳 * e := by positivity have hm := abs_finset_sum_sub_le (fun x => chw.mass x) (fun x => cw.mass x) (4 * K * e) (fun x => (hlip x).1.trans (by have : 0 ≤ (K : ℝ) * e := mul_nonneg (Nat.cast_nonneg _) he nlinarith)) have hL := abs_finset_sum_sub_le (fun x => chw.benefitLower x) (fun x => cw.benefitLower x) (4 * K * e) (fun x => (hlip x).2.1) have hU := abs_finset_sum_sub_le (fun x => chw.benefitUpper x) (fun x => cw.benefitUpper x) (4 * K * e) (fun x => (hlip x).2.2) dsimp [chw, cw] at hm hL hU simp_rw [weightedCapacities_mass ph ch hph, weightedCapacities_mass p c hp] at hm simp_rw [weightedCapacities_benefitLower ph ch hph, weightedCapacities_benefitLower p c hp] at hL simp_rw [weightedCapacities_benefitUpper ph ch hph, weightedCapacities_benefitUpper p c hp] at hU constructor · exact hm.trans (by convert le_rfl using 1 <;> ring) constructor · exact hL.trans (by convert le_rfl using 1 <;> ring) · exact hU.trans (by convert le_rfl using 1 <;> ring)
CausalSmith.PartialID.SlateBenefitPartialTransport.weightedCapacity_aggregate_close · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:864
theorem screenedCapacity_aggregate_close

Screening at a positive threshold changes each nonnegative empirical total by at most one threshold unit per cell. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
p ph :
𝒳 → ℝ
c ch :
Capacities 𝒳 K
η R :
:
0 < η
hph :
∀ x, 0 ≤ ph x
hch :
hfullM :
|(∑ x, ph x * ch.mass x) - ∑ x, p x * c.mass x| ≤ R
hfullL :
|(∑ x, ph x * ch.benefitLower x) - ∑ x, p x * c.benefitLower x| ≤ R
hfullU :
|(∑ x, ph x * ch.benefitUpper x) - ∑ x, p x * c.benefitUpper x| ≤ R
keep :
fun x => if η < ph x * ch.mass x then (1 : ℝ) else 0
|(∑ x, keep x * ph x * ch.mass x) - ∑ x, p x * c.mass x| ≤ R + card 𝒳 * η
|(∑ x, keep x * ph x * ch.benefitLower x) - ∑ x, p x * c.benefitLower x|
≤ R + card 𝒳 * η
|(∑ x, keep x * ph x * ch.benefitUpper x) - ∑ x, p x * c.benefitUpper x|
≤ R + card 𝒳 * η
Proof (Lean source)
theorem screenedCapacity_aggregate_close (p ph : 𝒳 → ℝ) (c ch : Capacities 𝒳 K) (η R : ℝ) (hη : 0 < η) (hph : ∀ x, 0 ≤ ph x) (hch : ValidCapacities ch) (hfullM : |(∑ x, ph x * ch.mass x) - ∑ x, p x * c.mass x| ≤ R) (hfullL : |(∑ x, ph x * ch.benefitLower x) - ∑ x, p x * c.benefitLower x| ≤ R) (hfullU : |(∑ x, ph x * ch.benefitUpper x) - ∑ x, p x * c.benefitUpper x| ≤ R) : let keep := fun x => if η < ph x * ch.mass x then (1 : ℝ) else 0 |(∑ x, keep x * ph x * ch.mass x) - ∑ x, p x * c.mass x| ≤ R + card 𝒳 * η ∧ |(∑ x, keep x * ph x * ch.benefitLower x) - ∑ x, p x * c.benefitLower x| ≤ R + card 𝒳 * η ∧ |(∑ x, keep x * ph x * ch.benefitUpper x) - ∑ x, p x * c.benefitUpper x| ≤ R + card 𝒳 * η := by dsimp have hmass0 (x) : 0 ≤ ch.mass x := by unfold Capacities.mass Capacities.q0 Capacities.q1 exact le_min (sum_nonneg fun i _ => hch.1 x i) (sum_nonneg fun i _ => hch.2 x i) have htermM (x) : |(if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.mass x - ph x * ch.mass x| ≤ η := by by_cases hs : η < ph x * ch.mass x · simp [hs, hη.le] · rw [if_neg hs, zero_mul, zero_mul, zero_sub, abs_neg, abs_of_nonneg (mul_nonneg (hph x) (hmass0 x))] exact le_of_not_gt hs have htermL (x) : |(if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.benefitLower x - ph x * ch.benefitLower x| ≤ η := by by_cases hs : η < ph x * ch.mass x · simp [hs, hη.le] · rw [if_neg hs, zero_mul, zero_mul, zero_sub, abs_neg, abs_of_nonneg (mul_nonneg (hph x) (benefitLower_nonneg ch x))] exact (mul_le_mul_of_nonneg_left (benefitLower_le_mass ch hch x) (hph x)).trans (le_of_not_gt hs) have htermU (x) : |(if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.benefitUpper x - ph x * ch.benefitUpper x| ≤ η := by by_cases hs : η < ph x * ch.mass x · simp [hs, hη.le] · rw [if_neg hs, zero_mul, zero_mul, zero_sub, abs_neg, abs_of_nonneg (mul_nonneg (hph x) (benefitUpper_nonneg ch hch x))] exact (mul_le_mul_of_nonneg_left (benefitUpper_le_mass ch x) (hph x)).trans (le_of_not_gt hs) have hsM := abs_finset_sum_sub_le (fun x => (if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.mass x) (fun x => ph x * ch.mass x) η htermM have hsL := abs_finset_sum_sub_le (fun x => (if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.benefitLower x) (fun x => ph x * ch.benefitLower x) η htermL have hsU := abs_finset_sum_sub_le (fun x => (if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.benefitUpper x) (fun x => ph x * ch.benefitUpper x) η htermU constructor · rw [show (∑ x, (if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.mass x) - ∑ x, p x * c.mass x = ((∑ x, (if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.mass x) - ∑ x, ph x * ch.mass x) + ((∑ x, ph x * ch.mass x) - ∑ x, p x * c.mass x) by ring] exact (abs_add_le _ _).trans ((add_le_add hsM hfullM).trans (by rw [add_comm])) constructor · rw [show (∑ x, (if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.benefitLower x) - ∑ x, p x * c.benefitLower x = ((∑ x, (if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.benefitLower x) - ∑ x, ph x * ch.benefitLower x) + ((∑ x, ph x * ch.benefitLower x) - ∑ x, p x * c.benefitLower x) by ring] exact (abs_add_le _ _).trans ((add_le_add hsL hfullL).trans (by rw [add_comm])) · rw [show (∑ x, (if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.benefitUpper x) - ∑ x, p x * c.benefitUpper x = ((∑ x, (if η < ph x * ch.mass x then (1 : ℝ) else 0) * ph x * ch.benefitUpper x) - ∑ x, ph x * ch.benefitUpper x) + ((∑ x, ph x * ch.benefitUpper x) - ∑ x, p x * c.benefitUpper x) by ring] exact (abs_add_le _ _).trans ((add_le_add hsU hfullU).trans (by rw [add_comm]))
CausalSmith.PartialID.SlateBenefitPartialTransport.screenedCapacity_aggregate_close · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:907
theorem capacitiesFromMassVector_measureReal

The atom-mass-vector construction exactly recovers the observable conditional-probability capacities of a finite observed law. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
Pobs :
capacitiesFromMassVector (fun o => Pobs.real {o}) = observableCapacities Pobs
Proof (Lean source)
theorem capacitiesFromMassVector_measureReal (Pobs : Measure (ObservedDatum 𝒳 K)) [IsFiniteMeasure Pobs] : capacitiesFromMassVector (fun o => Pobs.real {o}) = observableCapacities Pobs := by classical unfold observableCapacities observableCapacityContrasts rw [Capacities.mk.injEq] constructor · funext x i have hden (z : Bool) : {o : ObservedDatum 𝒳 K | decide (o.cell = x ∧ o.instrument = z) = true} = {o | o.cell = x ∧ o.instrument = z} := by ext o; simp have hnum (z treatment : Bool) : {o : ObservedDatum 𝒳 K | decide (o.cell = x ∧ o.instrument = z ∧ o.treatment = treatment ∧ o.selected = true ∧ o.outcome = some i) = true} = {o | o.cell = x ∧ o.treatment = treatment ∧ o.selected = true ∧ o.outcome = some i} ∩ {o | o.cell = x ∧ o.instrument = z} := by ext o simp [and_assoc, and_left_comm, and_comm] change empiricalConditional (massVectorSum (fun o => Pobs.real {o}) (fun o => decide (o.cell = x ∧ o.instrument = false ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some i))) (massVectorSum (fun o => Pobs.real {o}) (fun o => decide (o.cell = x ∧ o.instrument = false))) - empiricalConditional (massVectorSum (fun o => Pobs.real {o}) (fun o => decide (o.cell = x ∧ o.instrument = true ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some i))) (massVectorSum (fun o => Pobs.real {o}) (fun o => decide (o.cell = x ∧ o.instrument = true))) = conditionalReal Pobs {o | o.cell = x ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some i} {o | o.cell = x ∧ o.instrument = false} - conditionalReal Pobs {o | o.cell = x ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some i} {o | o.cell = x ∧ o.instrument = true} unfold empiricalConditional conditionalReal simp_rw [massVectorSum_measureReal] rw [hden false, hden true, hnum false false, hnum true false] · funext x i have hden (z : Bool) : {o : ObservedDatum 𝒳 K | decide (o.cell = x ∧ o.instrument = z) = true} = {o | o.cell = x ∧ o.instrument = z} := by ext o; simp have hnum (z treatment : Bool) : {o : ObservedDatum 𝒳 K | decide (o.cell = x ∧ o.instrument = z ∧ o.treatment = treatment ∧ o.selected = true ∧ o.outcome = some i) = true} = {o | o.cell = x ∧ o.treatment = treatment ∧ o.selected = true ∧ o.outcome = some i} ∩ {o | o.cell = x ∧ o.instrument = z} := by ext o simp [and_assoc, and_left_comm, and_comm] change empiricalConditional (massVectorSum (fun o => Pobs.real {o}) (fun o => decide (o.cell = x ∧ o.instrument = true ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some i))) (massVectorSum (fun o => Pobs.real {o}) (fun o => decide (o.cell = x ∧ o.instrument = true))) - empiricalConditional (massVectorSum (fun o => Pobs.real {o}) (fun o => decide (o.cell = x ∧ o.instrument = false ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some i))) (massVectorSum (fun o => Pobs.real {o}) (fun o => decide (o.cell = x ∧ o.instrument = false))) = conditionalReal Pobs {o | o.cell = x ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some i} {o | o.cell = x ∧ o.instrument = true} - conditionalReal Pobs {o | o.cell = x ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some i} {o | o.cell = x ∧ o.instrument = false} unfold empiricalConditional conditionalReal simp_rw [massVectorSum_measureReal] rw [hden true, hden false, hnum true true, hnum false true]
CausalSmith.PartialID.SlateBenefitPartialTransport.capacitiesFromMassVector_measureReal · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:989
theorem observedLaw_cell_real

The observed-law probability of a covariate cell is the system cell mass. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
Sys :
POSlateSystem P 𝒳 K
x :
𝒳
Sys.observedLaw.real {o | o.cell = x} = Sys.p x
Proof (Lean source)
theorem observedLaw_cell_real {P : POSystem} [StandardBorelSpace P.Ω] (Sys : POSlateSystem P 𝒳 K) (x : 𝒳) : Sys.observedLaw.real {o | o.cell = x} = Sys.p x := by unfold POSlateSystem.observedLaw POSlateSystem.p rw [Measure.real, Measure.map_apply (observedDatum_measurable_for_identification Sys) ((Set.toFinite _).measurableSet)] congr 1
CausalSmith.PartialID.SlateBenefitPartialTransport.observedLaw_cell_real · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:1065
theorem observedLaw_arm_ge_overlap

Quantitative observed-law arm overlap, including zero-mass cells. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
Sys :
POSlateSystem P 𝒳 K
ε :
hOverlap :
x :
𝒳
z :
ε * Sys.p x ≤ Sys.observedLaw.real {o | o.cell = x ∧ o.instrument = z}
Proof (Lean source)
theorem observedLaw_arm_ge_overlap {P : POSystem} [StandardBorelSpace P.Ω] (Sys : POSlateSystem P 𝒳 K) {ε : ℝ} (hOverlap : InstrumentOverlap Sys ε) (x : 𝒳) (z : Bool) : ε * Sys.p x ≤ Sys.observedLaw.real {o | o.cell = x ∧ o.instrument = z} := by have hp : 0 ≤ Sys.p x := by unfold POSlateSystem.p positivity by_cases hpx : Sys.p x = 0 · rw [hpx, mul_zero] positivity have hpxpos : 0 < Sys.p x := lt_of_le_of_ne hp (Ne.symm hpx) have hov := hOverlap.2.2 x hpxpos have hxmeas : MeasurableSet (Sys.xEvent x) := Sys.xVar.measurable_factual (measurableSet_singleton x) have hzmeas : Measurable (Sys.factualZ) := Sys.zVar.measurable_factual have harmLaw (b : Bool) : Sys.observedLaw.real {o | o.cell = x ∧ o.instrument = b} = P.μ.real (Sys.xEvent x ∩ Sys.zVar.event b) := by unfold POSlateSystem.observedLaw rw [Measure.real, Measure.map_apply (observedDatum_measurable_for_identification Sys) ((Set.toFinite _).measurableSet)] congr 1 have hprop : Sys.propensity x = P.μ.real (Sys.xEvent x ∩ Sys.zVar.event true) / Sys.p x := by unfold POSlateSystem.propensity conditionalReal rw [if_pos (by simpa [POSlateSystem.p] using hpxpos)] change P.μ.real ({w | Sys.factualZ w = true} ∩ Sys.xEvent x) / P.μ.real (Sys.xEvent x) = _ rw [show P.μ.real (Sys.xEvent x) = Sys.p x by rfl] congr 2 ext w simp [POSlateSystem.xEvent, POVar.event, POSlateSystem.factualZ, and_comm] cases z with | true => rw [harmLaw] rw [hprop] at hov have := hov.1 apply (le_div_iff₀ hpxpos).mp at this simpa [mul_comm] using this | false => rw [harmLaw] have htrueMeas : MeasurableSet {w | Sys.factualZ w = true} := hzmeas (measurableSet_singleton true) have hfalseMeas : MeasurableSet {w | Sys.factualZ w = false} := hzmeas (measurableSet_singleton false) have hu : Sys.xEvent x = (Sys.xEvent x ∩ {w | Sys.factualZ w = false}) ∪ (Sys.xEvent x ∩ {w | Sys.factualZ w = true}) := by ext w cases h : Sys.factualZ w <;> simp [h] have hd : Disjoint (Sys.xEvent x ∩ {w | Sys.factualZ w = false}) (Sys.xEvent x ∩ {w | Sys.factualZ w = true}) := by apply Set.disjoint_left.2 intro w hw0 hw1 exact Bool.false_ne_true (hw0.2.symm.trans hw1.2) have hpart : Sys.p x = P.μ.real (Sys.xEvent x ∩ Sys.zVar.event false) + P.μ.real (Sys.xEvent x ∩ Sys.zVar.event true) := by unfold POSlateSystem.p change P.μ.real (Sys.xEvent x) = P.μ.real (Sys.xEvent x ∩ {w | Sys.factualZ w = false}) + P.μ.real (Sys.xEvent x ∩ {w | Sys.factualZ w = true}) calc _ = P.μ.real ((Sys.xEvent x ∩ {w | Sys.factualZ w = false}) ∪ (Sys.xEvent x ∩ {w | Sys.factualZ w = true})) := congrArg _ hu _ = _ := measureReal_union hd (hxmeas.inter htrueMeas) have htrue : P.μ.real (Sys.xEvent x ∩ Sys.zVar.event true) = Sys.propensity x * Sys.p x := by rw [hprop] field_simp rw [htrue] at hpart nlinarith [hov.2]
CausalSmith.PartialID.SlateBenefitPartialTransport.observedLaw_arm_ge_overlap · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:1075
theorem projectedCapacity_weighted_close

On a guard event, every cell-mass-weighted projected capacity coordinate is uniformly close to its population counterpart. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
Pobs :
GuardMeasure 𝒳 K
n :
ω :
Ω
δ ε :
:
0 ≤ δ
:
0 < ε
hεhalf :
ε < 1 / 2
hoverlap :
∀ x z, ε * Pobs.real {o | o.cell = x} ≤ Pobs.real {o | o.cell = x ∧ o.instrument = z}
hdev :
maxDeviation O Pobs n ω ≤ δ
x i :
conclusion 1
- Pobs.real {o | o.cell = x} * (observableCapacities Pobs).lower x i|
≤ 16 * δ / ε ^ 2
conclusion 2
- Pobs.real {o | o.cell = x} * (observableCapacities Pobs).upper x i|
≤ 16 * δ / ε ^ 2
Proof (Lean source)
theorem projectedCapacity_weighted_close (O : ℕ → Ω → ObservedDatum 𝒳 K) (Pobs : GuardMeasure 𝒳 K) [IsProbabilityMeasure Pobs] (n : ℕ) (ω : Ω) {δ ε : ℝ} (hδ : 0 ≤ δ) (hε : 0 < ε) (hεhalf : ε < 1 / 2) (hoverlap : ∀ x z, ε * Pobs.real {o | o.cell = x} ≤ Pobs.real {o | o.cell = x ∧ o.instrument = z}) (hvalid : ValidCapacities (observableCapacities Pobs)) (hdev : maxDeviation O Pobs n ω ≤ δ) : ∀ x i, |empiricalCellMass O n ω x * (projectedCapacities O n ω).lower x i - Pobs.real {o | o.cell = x} * (observableCapacities Pobs).lower x i| ≤ 16 * δ / ε ^ 2 ∧ |empiricalCellMass O n ω x * (projectedCapacities O n ω).upper x i - Pobs.real {o | o.cell = x} * (observableCapacities Pobs).upper x i| ≤ 16 * δ / ε ^ 2 := by classical intro x i let p := Pobs.real {o | o.cell = x} let ph := empiricalCellMass O n ω x let a := fun z : Bool => Pobs.real {o | o.cell = x ∧ o.instrument = z} let ah := fun z : Bool => empiricalFreq O (fun o => decide (o.cell = x ∧ o.instrument = z)) n ω let b := fun z d : Bool => Pobs.real {o | o.cell = x ∧ o.instrument = z ∧ o.treatment = d ∧ o.selected = true ∧ o.outcome = some i} let bh := fun z d : Bool => empiricalFreq O (fun o => decide (o.cell = x ∧ o.instrument = z ∧ o.treatment = d ∧ o.selected = true ∧ o.outcome = some i)) n ω have hp : 0 ≤ p := by dsimp [p]; positivity have hph : 0 ≤ ph := empiricalFreq_nonneg _ _ _ _ have hap (z) : a z ≤ p := by apply measureReal_mono · intro o ho exact ho.1 · exact measure_ne_top _ _ have hba (z d) : b z d ≤ a z := by apply measureReal_mono · intro o ho exact ⟨ho.1, ho.2.1⟩ · exact measure_ne_top _ _ have hbhah (z d) : bh z d ≤ ah z := empiricalFreq_mono _ _ _ (fun o ho => by simp only [decide_eq_true_eq] at ho ⊢ exact ⟨ho.1, ho.2.1⟩) _ _ have hpdev : |ph - p| ≤ δ := by have h := guardEvent_deviation_le_maxDeviation O Pobs n ω (.cell x) change |empiricalFreq O (fun o => decide (o.cell = x)) n ω - Pobs.real {o | decide (o.cell = x) = true}| ≤ maxDeviation O Pobs n ω at h have h' : |empiricalFreq O (fun o => decide (o.cell = x)) n ω - Pobs.real {o | o.cell = x}| ≤ maxDeviation O Pobs n ω := by simpa only [decide_eq_true_eq] using h dsimp [ph, p, empiricalCellMass] exact h'.trans hdev have hadev (z) : |ah z - a z| ≤ δ := by have h := guardEvent_deviation_le_maxDeviation O Pobs n ω (.arm x z) change |empiricalFreq O (fun o => decide (o.cell = x ∧ o.instrument = z)) n ω - Pobs.real {o | decide (o.cell = x ∧ o.instrument = z) = true}| ≤ maxDeviation O Pobs n ω at h have h' : |empiricalFreq O (fun o => decide (o.cell = x ∧ o.instrument = z)) n ω - Pobs.real {o | o.cell = x ∧ o.instrument = z}| ≤ maxDeviation O Pobs n ω := by simpa only [decide_eq_true_eq] using h dsimp [ah, a] exact h'.trans hdev have hbdev (z d) : |bh z d - b z d| ≤ δ := by have h := guardEvent_deviation_le_maxDeviation O Pobs n ω (.selectedOutcome x z d i) change |empiricalFreq O (fun o => decide (o.cell = x ∧ o.instrument = z ∧ o.treatment = d ∧ o.selected = true ∧ o.outcome = some i)) n ω - Pobs.real {o | decide (o.cell = x ∧ o.instrument = z ∧ o.treatment = d ∧ o.selected = true ∧ o.outcome = some i) = true}| ≤ maxDeviation O Pobs n ω at h have h' : |empiricalFreq O (fun o => decide (o.cell = x ∧ o.instrument = z ∧ o.treatment = d ∧ o.selected = true ∧ o.outcome = some i)) n ω - Pobs.real {o | o.cell = x ∧ o.instrument = z ∧ o.treatment = d ∧ o.selected = true ∧ o.outcome = some i}| ≤ maxDeviation O Pobs n ω := by simpa only [decide_eq_true_eq] using h dsimp [bh, b] exact h'.trans hdev have hcond (z d) : |ph * empiricalConditional (bh z d) (ah z) - p * empiricalConditional (b z d) (a z)| ≤ 8 * δ / ε ^ 2 := by exact weightedConditional_stable hδ hε hεhalf hp hph (by dsimp [a]; positivity) (hap z) (by simpa [a, p] using hoverlap x z) (by dsimp [b]; positivity) (hba z d) (by dsimp [ah]; exact empiricalFreq_nonneg _ _ _ _) (by dsimp [bh]; exact empiricalFreq_nonneg _ _ _ _) (hbhah z d) hpdev (hadev z) (hbdev z d) have hrawLower : |ph * (capacitiesFromMassVector (empiricalProbabilityVector O n ω)).lower x i - p * (capacitiesFromMassVector (fun o => Pobs.real {o})).lower x i| ≤ 16 * δ / ε ^ 2 := by unfold capacitiesFromMassVector simp_rw [massVectorSum_empiricalProbabilityVector, massVectorSum_measureReal] simp only [decide_eq_true_eq] change |ph * (empiricalConditional (bh false false) (ah false) - empiricalConditional (bh true false) (ah true)) - p * (empiricalConditional (b false false) (a false) - empiricalConditional (b true false) (a true))| ≤ _ rw [show ph * (_ - _) - p * (_ - _) = (ph * empiricalConditional (bh false false) (ah false) - p * empiricalConditional (b false false) (a false)) - (ph * empiricalConditional (bh true false) (ah true) - p * empiricalConditional (b true false) (a true)) by ring] exact (abs_sub _ _).trans (by calc _ ≤ 8 * δ / ε ^ 2 + 8 * δ / ε ^ 2 := add_le_add (hcond false false) (hcond true false) _ = _ := by ring) have hrawUpper : |ph * (capacitiesFromMassVector (empiricalProbabilityVector O n ω)).upper x i - p * (capacitiesFromMassVector (fun o => Pobs.real {o})).upper x i| ≤ 16 * δ / ε ^ 2 := by unfold capacitiesFromMassVector simp_rw [massVectorSum_empiricalProbabilityVector, massVectorSum_measureReal] simp only [decide_eq_true_eq] change |ph * (empiricalConditional (bh true true) (ah true) - empiricalConditional (bh false true) (ah false)) - p * (empiricalConditional (b true true) (a true) - empiricalConditional (b false true) (a false))| ≤ _ rw [show ph * (_ - _) - p * (_ - _) = (ph * empiricalConditional (bh true true) (ah true) - p * empiricalConditional (b true true) (a true)) - (ph * empiricalConditional (bh false true) (ah false) - p * empiricalConditional (b false true) (a false)) by ring] exact (abs_sub _ _).trans (by calc _ ≤ 8 * δ / ε ^ 2 + 8 * δ / ε ^ 2 := add_le_add (hcond true true) (hcond false true) _ = _ := by ring) constructor · rw [← projectedMassCapacity_empiricalProbabilityVector O n ω] change |ph * max ((capacitiesFromMassVector (empiricalProbabilityVector O n ω)).lower x i) 0 - p * (observableCapacities Pobs).lower x i| ≤ _ have hr := hrawLower rw [capacitiesFromMassVector_measureReal Pobs] at hr exact weighted_positivePart_stable hp hph (hvalid.1 x i) hr · rw [← projectedMassCapacity_empiricalProbabilityVector O n ω] change |ph * max ((capacitiesFromMassVector (empiricalProbabilityVector O n ω)).upper x i) 0 - p * (observableCapacities Pobs).upper x i| ≤ _ have hr := hrawUpper rw [capacitiesFromMassVector_measureReal Pobs] at hr exact weighted_positivePart_stable hp hph (hvalid.2 x i) hr
CausalSmith.PartialID.SlateBenefitPartialTransport.projectedCapacity_weighted_close · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:1153
theorem plugInEndpoints_error_le_of_maxDeviation

Complete deterministic guard inequality on a fixed observed law. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
Ω :
Type u_2
shared
K :
shared
O :
ℕ → Ω → ObservedDatum 𝒳 K
Pobs :
GuardMeasure 𝒳 K
hDomain :
n :
ω :
Ω
η mstar ε δ :
:
0 < η
hmstar :
0 < mstar
:
0 < ε
hεhalf :
ε < 1 / 2
hoverlap :
∀ x z, ε * Pobs.real {o | o.cell = x} ≤ Pobs.real {o | o.cell = x ∧ o.instrument = z}
hmass :
mstar ≤ (observableCapacities Pobs).aggregateMass (fun x => Pobs.real {o | o.cell = x})
:
0 ≤ δ
hdev :
maxDeviation O Pobs n ω ≤ δ
A :
64 * (K : ℝ) * card 𝒳 / ε ^ 2 * δ + card 𝒳 * η
max |(plugInEndpoints O (fun _ => η) n ω).1
- ((observableCapacities Pobs).endpointMap (fun x => Pobs.real {o | o.cell = x}) Pobs rfl rfl hvalid (fun _ => measureReal_nonneg) (lt_of_lt_of_le hmstar hmass) hDomain).endpoints.1| |(plugInEndpoints O (fun _ => η) n ω).2
- ((observableCapacities Pobs).endpointMap (fun x => Pobs.real {o | o.cell = x}) Pobs rfl rfl hvalid (fun _ => measureReal_nonneg) (lt_of_lt_of_le hmstar hmass) hDomain).endpoints.2|
min 1 (4 * A / mstar)
4 * A < mstar
max |(plugInEndpoints O (fun _ => η) n ω).1
- ((observableCapacities Pobs).endpointMap (fun x => Pobs.real {o | o.cell = x}) Pobs rfl rfl hvalid (fun _ => measureReal_nonneg) (lt_of_lt_of_le hmstar hmass) hDomain).endpoints.1| |(plugInEndpoints O (fun _ => η) n ω).2
- ((observableCapacities Pobs).endpointMap (fun x => Pobs.real {o | o.cell = x}) Pobs rfl rfl hvalid (fun _ => measureReal_nonneg) (lt_of_lt_of_le hmstar hmass) hDomain).endpoints.2|
≤ 3 * A / mstar
Proof (Lean source)
theorem plugInEndpoints_error_le_of_maxDeviation (O : ℕ → Ω → ObservedDatum 𝒳 K) (Pobs : GuardMeasure 𝒳 K) [IsProbabilityMeasure Pobs] (hDomain : ObservedLawDomain Pobs) (n : ℕ) (ω : Ω) (η mstar ε δ : ℝ) (hη : 0 < η) (hmstar : 0 < mstar) (hε : 0 < ε) (hεhalf : ε < 1 / 2) (hoverlap : ∀ x z, ε * Pobs.real {o | o.cell = x} ≤ Pobs.real {o | o.cell = x ∧ o.instrument = z}) (hvalid : ValidCapacities (observableCapacities Pobs)) (hmass : mstar ≤ (observableCapacities Pobs).aggregateMass (fun x => Pobs.real {o | o.cell = x})) (hδ : 0 ≤ δ) (hdev : maxDeviation O Pobs n ω ≤ δ) : let A := 64 * (K : ℝ) * card 𝒳 / ε ^ 2 * δ + card 𝒳 * η (max |(plugInEndpoints O (fun _ => η) n ω).1 - ((observableCapacities Pobs).endpointMap (fun x => Pobs.real {o | o.cell = x}) Pobs rfl rfl hvalid (fun _ => measureReal_nonneg) (lt_of_lt_of_le hmstar hmass) hDomain).endpoints.1| |(plugInEndpoints O (fun _ => η) n ω).2 - ((observableCapacities Pobs).endpointMap (fun x => Pobs.real {o | o.cell = x}) Pobs rfl rfl hvalid (fun _ => measureReal_nonneg) (lt_of_lt_of_le hmstar hmass) hDomain).endpoints.2| ≤ min 1 (4 * A / mstar)) ∧ (4 * A < mstar → max |(plugInEndpoints O (fun _ => η) n ω).1 - ((observableCapacities Pobs).endpointMap (fun x => Pobs.real {o | o.cell = x}) Pobs rfl rfl hvalid (fun _ => measureReal_nonneg) (lt_of_lt_of_le hmstar hmass) hDomain).endpoints.1| |(plugInEndpoints O (fun _ => η) n ω).2 - ((observableCapacities Pobs).endpointMap (fun x => Pobs.real {o | o.cell = x}) Pobs rfl rfl hvalid (fun _ => measureReal_nonneg) (lt_of_lt_of_le hmstar hmass) hDomain).endpoints.2| ≤ 3 * A / mstar) := by classical dsimp let c := observableCapacities Pobs let ch := projectedCapacities O n ω let p := fun x => Pobs.real {o | o.cell = x} let ph := empiricalCellMass O n ω let keep := fun x => if η < ph x * ch.mass x then (1 : ℝ) else 0 let M := ∑ x, p x * c.mass x let NL := ∑ x, p x * c.benefitLower x let NU := ∑ x, p x * c.benefitUpper x let Mh := ∑ x, keep x * ph x * ch.mass x let NLh := ∑ x, keep x * ph x * ch.benefitLower x let NUh := ∑ x, keep x * ph x * ch.benefitUpper x let A := 64 * (K : ℝ) * card 𝒳 / ε ^ 2 * δ + card 𝒳 * η have hp : ∀ x, 0 ≤ p x := fun x => by dsimp [p]; positivity have hph : ∀ x, 0 ≤ ph x := fun x => empiricalFreq_nonneg _ _ _ _ have hch : ValidCapacities ch := by constructor <;> intro x i <;> dsimp [ch, projectedCapacities] <;> exact le_max_right _ _ have hcoord := projectedCapacity_weighted_close O Pobs n ω hδ hε hεhalf hoverlap hvalid hdev have hfull := weightedCapacity_aggregate_close p ph c ch (16 * δ / ε ^ 2) (by positivity) hp hph (by intro x i simpa [p, ph, c, ch] using hcoord x i) have hR : 4 * (K : ℝ) * card 𝒳 * (16 * δ / ε ^ 2) = 64 * (K : ℝ) * card 𝒳 / ε ^ 2 * δ := by ring rw [hR] at hfull have hscreen := screenedCapacity_aggregate_close p ph c ch η (64 * (K : ℝ) * card 𝒳 / ε ^ 2 * δ) hη hph hch hfull.1 hfull.2.1 hfull.2.2 have herrM : |Mh - M| ≤ A := by simpa [Mh, M, keep, A] using hscreen.1 have herrL : |NLh - NL| ≤ A := by simpa [NLh, NL, keep, A] using hscreen.2.1 have herrU : |NUh - NU| ≤ A := by simpa [NUh, NU, keep, A] using hscreen.2.2 have hM : mstar ≤ M := by simpa [M, c, p, Capacities.aggregateMass] using hmass have hmass0 (x) : 0 ≤ c.mass x := by unfold Capacities.mass Capacities.q0 Capacities.q1 exact le_min (sum_nonneg fun i _ => hvalid.1 x i) (sum_nonneg fun i _ => hvalid.2 x i) have hNL0 : 0 ≤ NL := sum_nonneg fun x _ => mul_nonneg (hp x) (benefitLower_nonneg c x) have hNU0 : 0 ≤ NU := sum_nonneg fun x _ => mul_nonneg (hp x) (benefitUpper_nonneg c hvalid x) have hNLM : NL ≤ M := by apply Finset.sum_le_sum intro x hx exact mul_le_mul_of_nonneg_left (benefitLower_le_mass c hvalid x) (hp x) have hNUM : NU ≤ M := by apply Finset.sum_le_sum intro x hx exact mul_le_mul_of_nonneg_left (benefitUpper_le_mass c x) (hp x) have hA : 0 ≤ A := by dsimp [A]; positivity have hMh0 : 0 ≤ Mh := sum_nonneg fun x _ => by dsimp [keep] exact mul_nonneg (mul_nonneg (by split <;> positivity) (hph x)) (by unfold Capacities.mass Capacities.q0 Capacities.q1 exact le_min (sum_nonneg fun i _ => hch.1 x i) (sum_nonneg fun i _ => hch.2 x i)) have hNLh0 : 0 ≤ NLh := sum_nonneg fun x _ => by dsimp [keep] exact mul_nonneg (mul_nonneg (by split <;> positivity) (hph x)) (benefitLower_nonneg ch x) have hNUh0 : 0 ≤ NUh := sum_nonneg fun x _ => by dsimp [keep] exact mul_nonneg (mul_nonneg (by split <;> positivity) (hph x)) (benefitUpper_nonneg ch hch x) have hNLhM : NLh ≤ Mh := by apply Finset.sum_le_sum intro x hx dsimp [NLh, Mh, keep] exact mul_le_mul_of_nonneg_left (benefitLower_le_mass ch hch x) (mul_nonneg (by split <;> positivity) (hph x)) have hNUhM : NUh ≤ Mh := by apply Finset.sum_le_sum intro x hx dsimp [NUh, Mh, keep] exact mul_le_mul_of_nonneg_left (benefitUpper_le_mass ch x) (mul_nonneg (by split <;> positivity) (hph x)) constructor · by_cases hsmall : 4 * A < mstar · have hL := ratio_error_le_three hmstar hM hNL0 hNLM hA hsmall herrM herrL have hU := ratio_error_le_three hmstar hM hNU0 hNUM hA hsmall herrM herrU have hplug : plugInEndpoints O (fun _ => η) n ω = (NLh / Mh, NUh / Mh) := by unfold plugInEndpoints screenedCell dsimp [ch, ph, keep, Mh, NLh, NUh] rw [if_pos hL.1] rw [hplug] change max |NLh / Mh - NL / M| |NUh / Mh - NU / M| ≤ _ rw [min_eq_right (le_of_lt ((div_lt_one hmstar).2 hsmall))] have h34 : 3 * A / mstar ≤ 4 * A / mstar := by gcongr nlinarith exact max_le (hL.2.trans h34) (hU.2.trans h34) · have hguard : 1 ≤ 4 * A / mstar := by rw [le_div_iff₀ hmstar] simpa using le_of_not_gt hsmall rw [min_eq_left hguard] have htargetL0 : 0 ≤ NL / M := div_nonneg hNL0 (le_trans hmstar.le hM) have htargetU0 : 0 ≤ NU / M := div_nonneg hNU0 (le_trans hmstar.le hM) have htargetL1 : NL / M ≤ 1 := (div_le_one (lt_of_lt_of_le hmstar hM)).2 hNLM have htargetU1 : NU / M ≤ 1 := (div_le_one (lt_of_lt_of_le hmstar hM)).2 hNUM have hplugBounds : 0 ≤ (plugInEndpoints O (fun _ => η) n ω).1 ∧ (plugInEndpoints O (fun _ => η) n ω).1 ≤ 1 ∧ 0 ≤ (plugInEndpoints O (fun _ => η) n ω).2 ∧ (plugInEndpoints O (fun _ => η) n ω).2 ≤ 1 := by unfold plugInEndpoints screenedCell dsimp [ch, ph, keep, Mh, NLh, NUh] split_ifs with hpos · exact ⟨div_nonneg hNLh0 hpos.le, (div_le_one hpos).2 hNLhM, div_nonneg hNUh0 hpos.le, (div_le_one hpos).2 hNUhM⟩ · simp change max |(plugInEndpoints O (fun _ => η) n ω).1 - NL / M| |(plugInEndpoints O (fun _ => η) n ω).2 - NU / M| ≤ 1 apply max_le <;> rw [abs_le] <;> constructor <;> linarith [hplugBounds.1, hplugBounds.2.1, hplugBounds.2.2.1, hplugBounds.2.2.2] · intro hsmall have hL := ratio_error_le_three hmstar hM hNL0 hNLM hA hsmall herrM herrL have hU := ratio_error_le_three hmstar hM hNU0 hNUM hA hsmall herrM herrU have hplug : plugInEndpoints O (fun _ => η) n ω = (NLh / Mh, NUh / Mh) := by unfold plugInEndpoints screenedCell dsimp [ch, ph, keep, Mh, NLh, NUh] rw [if_pos hL.1] rw [hplug] exact max_le hL.2 hU.2
CausalSmith.PartialID.SlateBenefitPartialTransport.plugInEndpoints_error_le_of_maxDeviation · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:1298
theorem endpointMap_bounds

Given the stated hypotheses, the endpoint map bounds property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
Pobs :
p :
𝒳 → ℝ
c :
Capacities 𝒳 K
hcObs :
hpObs :
p = Capacities.observedCellWeights Pobs
hp :
∀ x, 0 ≤ p x
hM :
0 < c.aggregateMass p
hDomain :
conclusion 1
0 ≤ (c.endpointMap p Pobs hcObs hpObs hc hp hM hDomain).endpoints.1
conclusion 2
(c.endpointMap p Pobs hcObs hpObs hc hp hM hDomain).endpoints.1 ≤ 1
conclusion 3
0 ≤ (c.endpointMap p Pobs hcObs hpObs hc hp hM hDomain).endpoints.2
conclusion 4
(c.endpointMap p Pobs hcObs hpObs hc hp hM hDomain).endpoints.2 ≤ 1
Proof (Lean source)
theorem endpointMap_bounds (Pobs : Measure (ObservedDatum 𝒳 K)) (p : 𝒳 → ℝ) (c : Capacities 𝒳 K) (hcObs : c = observableCapacities Pobs) (hpObs : p = Capacities.observedCellWeights Pobs) (hp : ∀ x, 0 ≤ p x) (hc : ValidCapacities c) (hM : 0 < c.aggregateMass p) (hDomain : ObservedLawDomain Pobs) : 0 ≤ (c.endpointMap p Pobs hcObs hpObs hc hp hM hDomain).endpoints.1 ∧ (c.endpointMap p Pobs hcObs hpObs hc hp hM hDomain).endpoints.1 ≤ 1 ∧ 0 ≤ (c.endpointMap p Pobs hcObs hpObs hc hp hM hDomain).endpoints.2 ∧ (c.endpointMap p Pobs hcObs hpObs hc hp hM hDomain).endpoints.2 ≤ 1 := by have hL0 : 0 ≤ ∑ x, p x * c.benefitLower x := sum_nonneg fun x _ => mul_nonneg (hp x) (benefitLower_nonneg c x) have hU0 : 0 ≤ ∑ x, p x * c.benefitUpper x := sum_nonneg fun x _ => mul_nonneg (hp x) (benefitUpper_nonneg c hc x) have hLM : (∑ x, p x * c.benefitLower x) ≤ c.aggregateMass p := by unfold Capacities.aggregateMass exact Finset.sum_le_sum fun x _ => mul_le_mul_of_nonneg_left (benefitLower_le_mass c hc x) (hp x) have hUM : (∑ x, p x * c.benefitUpper x) ≤ c.aggregateMass p := by unfold Capacities.aggregateMass exact Finset.sum_le_sum fun x _ => mul_le_mul_of_nonneg_left (benefitUpper_le_mass c x) (hp x) unfold Capacities.endpointMap exact ⟨div_nonneg hL0 hM.le, (div_le_one hM).2 hLM, div_nonneg hU0 hM.le, (div_le_one hM).2 hUM⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.endpointMap_bounds · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:1466
theorem inverse_sqrtEta_tail_tendsto_zero

Given the stated hypotheses, the inverse sqrt eta tail tendsto zero property holds.

Formal statement
η :
ℕ → ℝ
c C :
hc :
0 < c
h :
Tendsto (fun n : ℕ => sqrt n * η n) atTop atTop
Tendsto (fun n : ℕ => C / (4 * (n : ℝ) * (c * η n) ^ 2)) atTop (𝓝 0)
Proof (Lean source)
theorem inverse_sqrtEta_tail_tendsto_zero (η : ℕ → ℝ) {c C : ℝ} (hc : 0 < c) (h : Tendsto (fun n : ℕ => sqrt n * η n) atTop atTop) : Tendsto (fun n : ℕ => C / (4 * (n : ℝ) * (c * η n) ^ 2)) atTop (𝓝 0) := by have hi : Tendsto (fun n : ℕ => (sqrt n * η n)⁻¹) atTop (𝓝 0) := tendsto_inv_atTop_zero.comp h have hcst : Tendsto (fun _ : ℕ => C / (4 * c ^ 2)) atTop (𝓝 (C / (4 * c ^ 2))) := tendsto_const_nhds have hs0 := hcst.mul (hi.mul hi) have hs : Tendsto (fun n : ℕ => (C / (4 * c ^ 2)) * ((sqrt n * η n)⁻¹ * (sqrt n * η n)⁻¹)) atTop (𝓝 0) := by simpa using hs0 apply hs.congr' have hpos : ∀ᶠ n : ℕ in atTop, 0 < sqrt n * η n := (tendsto_atTop.1 h 1).mono fun n hn => lt_of_lt_of_le zero_lt_one hn filter_upwards [eventually_ge_atTop 1, hpos] with n hn hnη have hnpos : 0 < (n : ℝ) := by exact_mod_cast (lt_of_lt_of_le zero_lt_one hn) have hsqrt : (sqrt n) ^ 2 = (n : ℝ) := Real.sq_sqrt hnpos.le have hηne : η n ≠ 0 := by intro hz simp [hz] at hnη field_simp [hc.ne', hnpos.ne', Real.sqrt_ne_zero'.2 hnpos, hηne] rw [hsqrt]
CausalSmith.PartialID.SlateBenefitPartialTransport.inverse_sqrtEta_tail_tendsto_zero · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/UniformGuardBounds.lean:1493
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.Helpers.WeakConvergenceTools 10 declarations Small measure-theoretic bridges used by the pointwise limit theorem.

Small measure-theoretic bridges used by the pointwise limit theorem.

theorem isProbabilityMeasure_of_normed

A Gaussian measure in Mathlib's sense has total mass one. The definition does not expose this as a typeclass instance, so we recover it from the pushforward by the zero continuous linear functional. Given the stated hypotheses, the stated conclusion follows.

Formal statement
Proof (Lean source)
theorem IsGaussian.isProbabilityMeasure_of_normed {E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] [MeasurableSpace E] [BorelSpace E] (Q : Measure E) (hQ : IsGaussian Q) : IsProbabilityMeasure Q := by rw [isProbabilityMeasure_iff] have hz := hQ.map_eq_gaussianReal (0 : StrongDual ℝ E) have hm : (Measure.map (fun _ : E => (0 : ℝ)) Q) univ = Q univ := by rw [Measure.map_apply (measurable_const) MeasurableSet.univ] simp have hz' : Measure.map (fun _ : E => (0 : ℝ)) Q = gaussianReal 0 0 := by simpa using hz rw [← hm, hz'] exact measure_univ
CausalSmith.PartialID.SlateBenefitPartialTransport.IsGaussian.isProbabilityMeasure_of_normed · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/WeakConvergenceTools.lean:12
theorem tightProbabilityLaw_of_probability

Probability laws on the finite-dimensional spaces used here are tight. the stated conclusion follows.

Formal statement
Proof (Lean source)
theorem tightProbabilityLaw_of_probability {E : Type*} [MeasurableSpace E] [TopologicalSpace E] [IsCompletelyPseudoMetrizableSpace E] [SecondCountableTopology E] [BorelSpace E] (Q : Measure E) [IsProbabilityMeasure Q] : TightProbabilityLaw Q := by intro ε hε have ht : IsTightMeasureSet ({Q} : Set (Measure E)) := isTightMeasureSet_singleton rw [isTightMeasureSet_iff_exists_isCompact_measure_compl_le] at ht obtain ⟨C, hC, hbound⟩ := ht ε hε exact ⟨C, hC, hbound Q (by simp)⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.tightProbabilityLaw_of_probability · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/WeakConvergenceTools.lean:27
theorem empiricalAtomVector_eq_smul_sub

The centered vector used by the multinomial CLT is definitionally the scaled empirical probability vector. the stated conclusion follows.

Formal statement
Ω 𝒳 :
Type*
Fintype 𝒳
K :
O :
ℕ → Ω → ObservedDatum 𝒳 K
Pobs :
n :
ω :
Ω
= sqrt n • (empiricalProbabilityVector O n ω - fun o => Pobs.real {o})
Proof (Lean source)
theorem empiricalAtomVector_eq_smul_sub {Ω 𝒳 : Type*} [Fintype 𝒳] [DecidableEq 𝒳] {K : ℕ} [MeasurableSpace Ω] [MeasurableSpace 𝒳] (O : ℕ → Ω → ObservedDatum 𝒳 K) (Pobs : Measure (ObservedDatum 𝒳 K)) (n : ℕ) (ω : Ω) : empiricalAtomVector O Pobs n ω = sqrt n • (empiricalProbabilityVector O n ω - fun o => Pobs.real {o}) := by funext o simp only [empiricalAtomVector, empiricalProbabilityVector, empiricalFreq, Pi.smul_apply, Pi.sub_apply, smul_eq_mul] have hs : (∑ r ∈ range n, if O r ω = o then (1 : ℝ) else 0) = ∑ r ∈ range n, if decide (O r ω = o) = true then 1 else 0 := by apply Finset.sum_congr rfl intro r hr by_cases h : O r ω = o <;> simp [h] rw [hs]
CausalSmith.PartialID.SlateBenefitPartialTransport.empiricalAtomVector_eq_smul_sub · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/WeakConvergenceTools.lean:40
theorem measurable_empiricalProbabilityVector

Measurability of the finite empirical atom vector. Given the stated hypotheses, the stated conclusion follows.

Formal statement
Ω 𝒳 :
Type*
Fintype 𝒳
K :
O :
ℕ → Ω → ObservedDatum 𝒳 K
hO :
∀ i, Measurable (O i)
n :
Proof (Lean source)
theorem measurable_empiricalProbabilityVector {Ω 𝒳 : Type*} [Fintype 𝒳] [DecidableEq 𝒳] {K : ℕ} [MeasurableSpace Ω] [MeasurableSpace 𝒳] [MeasurableSingletonClass 𝒳] (O : ℕ → Ω → ObservedDatum 𝒳 K) (hO : ∀ i, Measurable (O i)) (n : ℕ) : Measurable (empiricalProbabilityVector O n) := by rw [measurable_pi_iff] intro o unfold empiricalProbabilityVector empiricalFreq apply measurable_const.mul apply Finset.measurable_sum intro r hr apply Measurable.ite · have heq : {a | decide (O r a = o) = true} = O r ⁻¹' {o} := by ext a simp rw [heq] exact hO r (measurableSet_singleton o) · exact measurable_const · exact measurable_const
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_empiricalProbabilityVector · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/WeakConvergenceTools.lean:58
theorem measurable_observations_of_iidSampling_all

Given the stated hypotheses, the observations whenever iid sampling all map is measurable.

Formal statement
Ω 𝒳 :
Type*
Fintype 𝒳
K :
μ :
Pobs :
O :
ℕ → Ω → ObservedDatum 𝒳 K
h :
∀ n, IidSampling n μ Pobs O
i :
Proof (Lean source)
theorem measurable_observations_of_iidSampling_all {Ω 𝒳 : Type*} [Fintype 𝒳] [DecidableEq 𝒳] {K : ℕ} [MeasurableSpace Ω] [MeasurableSpace 𝒳] {μ : Measure Ω} {Pobs : Measure (ObservedDatum 𝒳 K)} (O : ℕ → Ω → ObservedDatum 𝒳 K) (h : ∀ n, IidSampling n μ Pobs O) : ∀ i, Measurable (O i) := by intro i exact (h (i + 1)).measurable i (by omega)
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_observations_of_iidSampling_all · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/WeakConvergenceTools.lean:79
theorem tendsto_probabilityMeasure

Repackage the paper's test-integral definition as Mathlib weak convergence of probability measures. Given the stated hypotheses, the stated conclusion follows.

Formal statement
Qn :
fun n
=> ⟨μ.map (Xn n), Measure.isProbabilityMeasure_map (hX n).aemeasurable⟩ (: ℕ → ProbabilityMeasure E)
Qlim :
⟨Q, inferInstance⟩ (: ProbabilityMeasure E)
Tendsto Qn atTop (𝓝 Qlim)
Proof (Lean source)
theorem WeakConverges.tendsto_probabilityMeasure {Ω E : Type*} [MeasurableSpace Ω] [PseudoEMetricSpace E] [MeasurableSpace E] [OpensMeasurableSpace E] [IsCompletelyPseudoMetrizableSpace E] [SecondCountableTopology E] [BorelSpace E] {μ : Measure Ω} [IsProbabilityMeasure μ] {Q : Measure E} [IsProbabilityMeasure Q] {Xn : ℕ → Ω → E} (hX : ∀ n, Measurable (Xn n)) (h : WeakConverges Xn Q μ) : let Qn : ℕ → ProbabilityMeasure E := fun n => ⟨μ.map (Xn n), Measure.isProbabilityMeasure_map (hX n).aemeasurable⟩ let Qlim : ProbabilityMeasure E := ⟨Q, inferInstance⟩ Tendsto Qn atTop (𝓝 Qlim) := by let Qn : ℕ → ProbabilityMeasure E := fun n => ⟨μ.map (Xn n), Measure.isProbabilityMeasure_map (hX n).aemeasurable⟩ let Qlim : ProbabilityMeasure E := ⟨Q, inferInstance⟩ change Tendsto Qn atTop (𝓝 Qlim) rw [ProbabilityMeasure.tendsto_iff_forall_integral_tendsto] intro f have hf := h f f.continuous ⟨‖f‖, fun x => by simpa only [Real.norm_eq_abs] using f.norm_coe_le_norm x⟩ simpa only [Qn, Qlim, ProbabilityMeasure.coe_mk, MeasureTheory.integral_map (hX _).aemeasurable f.continuous.aestronglyMeasurable] using hf
CausalSmith.PartialID.SlateBenefitPartialTransport.WeakConverges.tendsto_probabilityMeasure · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/WeakConvergenceTools.lean:89
theorem isTightMeasureSet_range_map

A weakly convergent sequence of random vectors has uniformly tight laws. Given the stated hypotheses, the stated conclusion follows.

Formal statement
IsTightMeasureSet (range fun n => μ.map (Xn n))
Proof (Lean source)
theorem WeakConverges.isTightMeasureSet_range_map {Ω E : Type*} [MeasurableSpace Ω] [PseudoMetricSpace E] [MeasurableSpace E] [BorelSpace E] [CompleteSpace E] [SecondCountableTopology E] {μ : Measure Ω} [IsProbabilityMeasure μ] {Q : Measure E} [IsProbabilityMeasure Q] {Xn : ℕ → Ω → E} (hX : ∀ n, Measurable (Xn n)) (h : WeakConverges Xn Q μ) : IsTightMeasureSet (range fun n => μ.map (Xn n)) := by let Qn : ℕ → ProbabilityMeasure E := fun n => ⟨μ.map (Xn n), Measure.isProbabilityMeasure_map (hX n).aemeasurable⟩ let Qlim : ProbabilityMeasure E := ⟨Q, inferInstance⟩ have ht : Tendsto Qn atTop (𝓝 Qlim) := h.tendsto_probabilityMeasure hX have hc : IsCompact (insert Qlim (range Qn)) := ht.isCompact_insert_range have htc : IsTightMeasureSet {((q : ProbabilityMeasure E) : Measure E) | q ∈ insert Qlim (range Qn)} := by apply isTightMeasureSet_of_isCompact_closure simpa only [hc.isClosed.closure_eq] using hc rw [isTightMeasureSet_iff_exists_isCompact_measure_compl_le] at htc ⊢ intro ε hε obtain ⟨C, hC, hbound⟩ := htc ε hε exact ⟨C, hC, fun q hq => by obtain ⟨n, rfl⟩ := hq apply hbound exact ⟨Qn n, inr ⟨n, rfl⟩, by simp [Qn]⟩⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.WeakConverges.isTightMeasureSet_range_map · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/WeakConvergenceTools.lean:114
theorem eventually_norm_le

Uniform stochastic boundedness in the real-probability form used by the screening argument. Given the stated hypotheses, the stated conclusion follows.

Formal statement
∃ R : ℝ, ∀ n, μ.real {ω | R < ‖Xn n ω‖} ≤ ε
Proof (Lean source)
theorem WeakConverges.eventually_norm_le {Ω E : Type*} [MeasurableSpace Ω] [NormedAddCommGroup E] [MeasurableSpace E] [BorelSpace E] [CompleteSpace E] [SecondCountableTopology E] [ProperSpace E] {μ : Measure Ω} [IsProbabilityMeasure μ] {Q : Measure E} [IsProbabilityMeasure Q] {Xn : ℕ → Ω → E} (hX : ∀ n, Measurable (Xn n)) (h : WeakConverges Xn Q μ) : ∀ ε > 0, ∃ R : ℝ, ∀ n, μ.real {ω | R < ‖Xn n ω‖} ≤ ε := by intro ε hε have ht := h.isTightMeasureSet_range_map hX rw [isTightMeasureSet_iff_exists_isCompact_measure_compl_le] at ht obtain ⟨C, hC, hbound⟩ := ht (ofReal ε) (ENNReal.ofReal_pos.mpr hε) obtain ⟨R, hCR⟩ := hC.isBounded.subset_closedBall (0 : E) refine ⟨R, fun n => ?_⟩ have hset : {ω | R < ‖Xn n ω‖} ⊆ Xn n ⁻¹' Cᶜ := by intro ω hω hmem have := hCR hmem simp only [Metric.mem_closedBall, dist_zero_right] at this exact (not_le_of_gt hω) this have hmeasC : MeasurableSet Cᶜ := hC.isClosed.measurableSet.compl have hμle : μ {ω | R < ‖Xn n ω‖} ≤ ofReal ε := by calc μ {ω | R < ‖Xn n ω‖} ≤ μ (Xn n ⁻¹' Cᶜ) := measure_mono hset _ = (μ.map (Xn n)) Cᶜ := (Measure.map_apply (hX n) hmeasC).symm _ ≤ ofReal ε := hbound _ ⟨n, rfl⟩ unfold Measure.real calc (μ {ω | R < ‖Xn n ω‖}).toReal ≤ (ofReal ε).toReal := ENNReal.toReal_mono (by simp) hμle _ = ε := ENNReal.toReal_ofReal hε.le
CausalSmith.PartialID.SlateBenefitPartialTransport.WeakConverges.eventually_norm_le · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/WeakConvergenceTools.lean:141
theorem congr_of_tendstoInMeasure_sub

Weak convergence is unchanged by a perturbation converging to zero in probability. Given the stated hypotheses, the stated conclusion follows.

Formal statement
X Y :
ℕ → Ω → E
hX :
∀ n, Measurable (X n)
hY :
∀ n, Measurable (Y n)
hweak :
hsub :
TendstoInMeasure μ (Y - X) atTop 0
Proof (Lean source)
theorem WeakConverges.congr_of_tendstoInMeasure_sub {Ω E : Type*} [MeasurableSpace Ω] [NormedAddCommGroup E] [MeasurableSpace E] [BorelSpace E] [CompleteSpace E] [SecondCountableTopology E] {μ : Measure Ω} [IsProbabilityMeasure μ] {Q : Measure E} [IsProbabilityMeasure Q] {X Y : ℕ → Ω → E} (hX : ∀ n, Measurable (X n)) (hY : ∀ n, Measurable (Y n)) (hweak : WeakConverges X Q μ) (hsub : TendstoInMeasure μ (Y - X) atTop 0) : WeakConverges Y Q μ := by let Qn : ℕ → ProbabilityMeasure E := fun n => ⟨μ.map (X n), Measure.isProbabilityMeasure_map (hX n).aemeasurable⟩ let Qlim : ProbabilityMeasure E := ⟨Q, inferInstance⟩ have ht : Tendsto Qn atTop (𝓝 Qlim) := hweak.tendsto_probabilityMeasure hX have hdistX : TendstoInDistribution X atTop (id : E → E) (fun _ => μ) Q := by refine ⟨fun n => (hX n).aemeasurable, measurable_id.aemeasurable, ?_⟩ simpa only [Qn, Qlim, Measure.map_id, ProbabilityMeasure.coe_mk] using ht have hdistY := tendstoInDistribution_of_tendstoInMeasure_sub Y (id : E → E) hdistX hsub (fun n => (hY n).aemeasurable) intro f hf hfb let fb : BoundedContinuousFunction E ℝ := { toFun := f continuous_toFun := hf map_bounded' := by obtain ⟨C, hC⟩ := hfb exact ⟨2 * C, fun x y => by rw [Real.dist_eq] calc |f x - f y| ≤ |f x| + |f y| := abs_sub _ _ _ ≤ C + C := add_le_add (hC x) (hC y) _ = 2 * C := by ring⟩ } let Rn : ℕ → ProbabilityMeasure E := fun n => ⟨μ.map (Y n), Measure.isProbabilityMeasure_map (hY n).aemeasurable⟩ let Rlim : ProbabilityMeasure E := ⟨Q, inferInstance⟩ have ht' : Tendsto Rn atTop (𝓝 Rlim) := by simpa only [Rn, Rlim, Measure.map_id] using hdistY.tendsto rw [ProbabilityMeasure.tendsto_iff_forall_integral_tendsto] at ht' have hf' := ht' fb simp only [Rn, Rlim, ProbabilityMeasure.coe_mk] at hf' convert hf' using 1 · funext n symm change (∫ y, f y ∂μ.map (Y n)) = _ rw [MeasureTheory.integral_map (hY n).aemeasurable hf.aestronglyMeasurable] · rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.WeakConverges.congr_of_tendstoInMeasure_sub · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/WeakConvergenceTools.lean:174
theorem tendstoInMeasure_sub_of_probability_eq_one

Equality with probability tending to one makes the difference converge to zero in probability. Given the stated hypotheses, the stated conclusion follows.

Formal statement
X Y :
ℕ → Ω → E
hX :
∀ n, Measurable (X n)
hY :
∀ n, Measurable (Y n)
heq :
Tendsto (fun n => μ.real {ω | X n ω = Y n ω}) atTop (𝓝 1)
TendstoInMeasure μ (Y - X) atTop 0
Proof (Lean source)
theorem tendstoInMeasure_sub_of_probability_eq_one {Ω E : Type*} [MeasurableSpace Ω] [NormedAddCommGroup E] [MeasurableSpace E] [BorelSpace E] [MeasurableEq E] {μ : Measure Ω} [IsProbabilityMeasure μ] {X Y : ℕ → Ω → E} (hX : ∀ n, Measurable (X n)) (hY : ∀ n, Measurable (Y n)) (heq : Tendsto (fun n => μ.real {ω | X n ω = Y n ω}) atTop (𝓝 1)) : TendstoInMeasure μ (Y - X) atTop 0 := by rw [tendstoInMeasure_iff_measureReal_norm] intro ε hε have hcomp : Tendsto (fun n => μ.real {ω | X n ω = Y n ω}ᶜ) atTop (𝓝 0) := by have hsub := (tendsto_const_nhds : Tendsto (fun _ : ℕ => (1 : ℝ)) atTop (𝓝 1)).sub heq convert hsub using 1 · funext n rw [measureReal_compl (measurableSet_eq_fun (hX n) (hY n))] simp · norm_num apply tendsto_of_tendsto_of_tendsto_of_le_of_le' tendsto_const_nhds hcomp · exact Filter.Eventually.of_forall fun n => measureReal_nonneg · exact Filter.Eventually.of_forall fun n => measureReal_mono fun ω hω hxy => by have hzero : (Y - X) n ω - (0 : Ω → E) ω = 0 := by simp only [Pi.sub_apply, Pi.zero_apply, sub_zero] exact sub_eq_zero.mpr hxy.symm change ε ≤ ‖(Y - X) n ω - (0 : Ω → E) ω‖ at hω rw [hzero, norm_zero] at hω exact (not_le_of_gt hε) hω
CausalSmith.PartialID.SlateBenefitPartialTransport.tendstoInMeasure_sub_of_probability_eq_one · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/Helpers/WeakConvergenceTools.lean:220
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.OpenQuestions 1 declarations This file records the unresolved inferential question as descriptive metadata.

Open calibration question

This file records the unresolved inferential question as descriptive metadata. It intentionally makes no mathematical assertion and supplies no witness for a calibration procedure.

def openQuestion_uniformFaceMultiplierCalibration Remark 1 in the paper ↗

Can the near-active-face directional-multiplier handle be calibrated so that liminf n, inf P in 𝒫ₙ, P{Θ_I(P_obs) ⊆ C_(1-α,n)} ≥ 1-α uniformly over direction-separated triangular arrays? The regime includes the first n observations sampled independently from P_obs, instrument overlap ε_Z, aggregate survivor mass at least m_★, and selection-gap separation |Δq(x)| ≥ κ_σ on positive survivor cells. It must allow arbitrary simultaneous threshold-cut ties and cells whose survivor mass approaches zero and is omitted at the unnormalized threshold η_n.

Definition (Lean source)
openQuestion_uniformFaceMultiplierCalibration :
_root_.String
"Can the near-active-face directional-multiplier handle be calibrated to achieve liminf_n inf_{P in P_n} P{Theta_I(P_obs) subset C_(1-alpha,n)} >
= 1-alpha uniformly over direction-separated triangular arrays whose first n observations are independent draws from P_obs, under instrument overlap epsilon_Z, aggregate survivor mass M >= m_star, and |Delta q(x)| >= kappa_sigma on positive survivor cells, while allowing arbitrary simultaneous threshold-cut ties and cells whose survivor mass approaches zero and is omitted at the unnormalized threshold eta_n? Fang
CausalSmith.PartialID.SlateBenefitPartialTransport.openQuestion_uniformFaceMultiplierCalibration · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/OpenQuestions.lean:11
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.TBranchFreePointwiseDirectionalLimit 2 declarations At each fixed finite-support law, screening recovers the positive-survivor support, the endpoint estimator is consistent, and its scaled error has the directional delta-method limit, including all tie faces.

Branch-free pointwise directional limit

At each fixed finite-support law, screening recovers the positive-survivor support, the endpoint estimator is consistent, and its scaled error has the directional delta-method limit, including all tie faces.

The endpoint converges in probability condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
Ω :
Type uΩ
shared
Xn :
ℕ → Ω → ℝ × ℝ
target :
ℝ × ℝ
μ :
ε > 0 :
EndpointConvergesInProbability Xn target μ :
Prop
Tendsto (fun n => μ.real {ω | ε < max |(Xn n ω).1 - target.1| |(Xn n ω).2 - target.2|}) atTop (𝓝 0)
CausalSmith.PartialID.SlateBenefitPartialTransport.EndpointConvergesInProbability · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TBranchFreePointwiseDirectionalLimit.lean:27
theorem branch_free_pointwise_directional_limit Theorem 8 in the paper ↗

Conditional on the disclosed finite-multinomial CLT and general directional delta-method gates, the branch-free plug-in estimator recovers the fixed support, is consistent, and has the Gaussian directional limit without a direction-separation premise. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u𝒳
shared
Ω :
Type uΩ
shared
K :
shared
P :
shared
μ :
shared
Sys :
POSlateSystem P 𝒳 K
O :
ℕ → Ω → ObservedDatum 𝒳 K
η :
ℕ → ℝ
εZ :
d :
𝒳 → Bool
_hIid :
∀ n, IidSampling n μ Sys.observedLaw O
_hOverlap :
model :
_hEtaPositive :
∀ n, 0 < η n
_hEtaZero :
Tendsto η atTop (𝓝 0)
_hSqrtEta :
Tendsto (fun n : ℕ => sqrt n * η n) atTop atTop
hFiniteMultinomialCLT_of_gate :
FiniteMultinomialCLT.{uΩ, u𝒳}
hHadamardDirectionalDeltaMethod_of_gate :
HadamardDirectionalDeltaMethod.{uΩ, u𝒳, 0}
c :
observableCapacities Sys.observedLaw
hIdentification :
capacity_identification Sys εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity
hValid :
hIdentification.1.2 (: ValidCapacities c)
hp :
hIdentification.2.1 (: ∀ x, 0 ≤ Sys.p x)
hMass :
model.positiveAggregateSurvivors (: 0 < c.aggregateMass Sys.p)
support :
Tendsto (fun n => μ.real {ω | screenedSupport O η n ω = support}) atTop (𝓝 1)
EndpointConvergesInProbability (fun n => plugInEndpoints O η n) (c.endpointMap Sys.p Sys.observedLaw rfl (p_eq_observedCellWeights Sys) hValid hp hMass (observedLawDomain Sys)).endpoints μ
∃ (Q : Measure (ObservedDatum 𝒳 K → ℝ)) (Dψ : (ObservedDatum 𝒳 K → ℝ) → ℝ × ℝ),
∫ z, z ∂Q = 0
a b :
∫ z, z a * z b ∂Q
= if a = b then Sys.observedLaw.real {a} * (1 - Sys.observedLaw.real {a}) else -(Sys.observedLaw.real {a} * Sys.observedLaw.real {b})
HasHadamardDirDerivAt (endpointFromMassVectorOn support) Dψ (fun o => Sys.observedLaw.real {o})
WeakConverges (fun n ω => sqrt n • (plugInEndpoints O η n ω - (c.endpointMap Sys.p Sys.observedLaw rfl (p_eq_observedCellWeights Sys) hValid hp hMass (observedLawDomain Sys)).endpoints)) (Q.map Dψ) μ
Proof (Lean source)
-- @node: thm:branch-free-pointwise-directional-limit theorem branch_free_pointwise_directional_limit (Sys : POSlateSystem P 𝒳 K) (O : ℕ → Ω → ObservedDatum 𝒳 K) (η : ℕ → ℝ) (εZ : ℝ) (d : 𝒳 → Bool) (_hIid : ∀ n, IidSampling n μ Sys.observedLaw O) (_hOverlap : InstrumentOverlap Sys εZ) (model : TieSafeSurvivorModel Sys εZ d) (_hEtaPositive : ∀ n, 0 < η n) (_hEtaZero : Tendsto η atTop (𝓝 0)) (_hSqrtEta : Tendsto (fun n : ℕ => sqrt n * η n) atTop atTop) (hFiniteMultinomialCLT_of_gate : FiniteMultinomialCLT.{uΩ, u𝒳}) (hHadamardDirectionalDeltaMethod_of_gate : HadamardDirectionalDeltaMethod.{uΩ, u𝒳, 0}) : let c := observableCapacities Sys.observedLaw let hIdentification := capacity_identification Sys εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity let hValid : ValidCapacities c := hIdentification.1.2 let hp : ∀ x, 0 ≤ Sys.p x := hIdentification.2.1 let hMass : 0 < c.aggregateMass Sys.p := model.positiveAggregateSurvivors let support := positiveSupport c Sys.p Tendsto (fun n => μ.real {ω | screenedSupport O η n ω = support}) atTop (𝓝 1) ∧ EndpointConvergesInProbability (fun n => plugInEndpoints O η n) (c.endpointMap Sys.p Sys.observedLaw rfl (p_eq_observedCellWeights Sys) hValid hp hMass (observedLawDomain Sys)).endpoints μ ∧ ∃ (Q : Measure (ObservedDatum 𝒳 K → ℝ)) (Dψ : (ObservedDatum 𝒳 K → ℝ) → ℝ × ℝ), IsGaussian Q ∧ (∫ z, z ∂Q = 0) ∧ (∀ a b, ∫ z, z a * z b ∂Q = if a = b then Sys.observedLaw.real {a} * (1 - Sys.observedLaw.real {a}) else -(Sys.observedLaw.real {a} * Sys.observedLaw.real {b})) ∧ HasHadamardDirDerivAt (endpointFromMassVectorOn support) Dψ (fun o => Sys.observedLaw.real {o}) ∧ WeakConverges (fun n ω => sqrt n • (plugInEndpoints O η n ω - (c.endpointMap Sys.p Sys.observedLaw rfl (p_eq_observedCellWeights Sys) hValid hp hMass (observedLawDomain Sys)).endpoints)) (Q.map Dψ) μ := by dsimp classical let c := observableCapacities Sys.observedLaw let support := positiveSupport c Sys.p let θ : ObservedDatum 𝒳 K → ℝ := fun o => Sys.observedLaw.real {o} have hIdentification := capacity_identification Sys εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity have hValid : ValidCapacities c := hIdentification.1.2 have hp : ∀ x, 0 ≤ Sys.p x := hIdentification.2.1 have hMass : 0 < c.aggregateMass Sys.p := model.positiveAggregateSurvivors letI : IsProbabilityMeasure Sys.observedLaw := hIdentification.1.1 letI : IsProbabilityMeasure μ := (_hIid 1).isProbabilityMeasure obtain ⟨Q, hQ, hQmean, hQcov, hweak⟩ := hFiniteMultinomialCLT_of_gate μ Sys.observedLaw O inferInstance inferInstance _hIid have hArm : ∀ x ∈ support, ∀ z, 0 < massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = z)) := by intro x hx z have hprod : 0 < Sys.p x * c.mass x := by simpa [support, positiveSupport] using hx have hpxne : Sys.p x ≠ 0 := by intro hpzero simp [hpzero] at hprod have hpx : 0 < Sys.p x := lt_of_le_of_ne (hIdentification.2.1 x) hpxne.symm rw [massVectorSum_measureReal] unfold POSlateSystem.observedLaw rw [Measure.real, Measure.map_apply (observedDatum_measurable_for_identification Sys) ((Set.toFinite _).measurableSet)] have hevent : Sys.observedDatum ⁻¹' {o | decide (o.cell = x ∧ o.instrument = z) = true} = Sys.xEvent x ∩ Sys.zVar.event z := by ext w simp [POSlateSystem.observedDatum, POSlateSystem.xEvent, POVar.event, POSlateSystem.factualX, POSlateSystem.factualZ] rw [hevent] exact arm_cell_positive_of_overlap Sys _hOverlap x hpx z have hcapRaw : capacitiesFromMassVector θ = c := by unfold c observableCapacities observableCapacityContrasts rw [Capacities.mk.injEq] constructor · funext x i have hden (z : Bool) : {o : ObservedDatum 𝒳 K | decide (o.cell = x ∧ o.instrument = z) = true} = {o | o.cell = x ∧ o.instrument = z} := by ext o simp have hnum (z treatment : Bool) : {o : ObservedDatum 𝒳 K | decide (o.cell = x ∧ o.instrument = z ∧ o.treatment = treatment ∧ o.selected = true ∧ o.outcome = some i) = true} = {o | o.cell = x ∧ o.treatment = treatment ∧ o.selected = true ∧ o.outcome = some i} ∩ {o | o.cell = x ∧ o.instrument = z} := by ext o simp [and_assoc, and_left_comm, and_comm] change empiricalConditional (massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = false ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some i))) (massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = false))) - empiricalConditional (massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = true ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some i))) (massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = true))) = conditionalReal Sys.observedLaw {o | o.cell = x ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some i} {o | o.cell = x ∧ o.instrument = false} - conditionalReal Sys.observedLaw {o | o.cell = x ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some i} {o | o.cell = x ∧ o.instrument = true} unfold empiricalConditional conditionalReal unfold θ simp_rw [massVectorSum_measureReal] rw [hden false, hden true, hnum false false, hnum true false] · funext x i have hden (z : Bool) : {o : ObservedDatum 𝒳 K | decide (o.cell = x ∧ o.instrument = z) = true} = {o | o.cell = x ∧ o.instrument = z} := by ext o simp have hnum (z treatment : Bool) : {o : ObservedDatum 𝒳 K | decide (o.cell = x ∧ o.instrument = z ∧ o.treatment = treatment ∧ o.selected = true ∧ o.outcome = some i) = true} = {o | o.cell = x ∧ o.treatment = treatment ∧ o.selected = true ∧ o.outcome = some i} ∩ {o | o.cell = x ∧ o.instrument = z} := by ext o simp [and_assoc, and_left_comm, and_comm] change empiricalConditional (massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = true ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some i))) (massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = true))) - empiricalConditional (massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = false ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some i))) (massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = false))) = conditionalReal Sys.observedLaw {o | o.cell = x ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some i} {o | o.cell = x ∧ o.instrument = true} - conditionalReal Sys.observedLaw {o | o.cell = x ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some i} {o | o.cell = x ∧ o.instrument = false} unfold empiricalConditional conditionalReal unfold θ simp_rw [massVectorSum_measureReal] rw [hden true, hden false, hnum true true, hnum false true] have hcap : projectedMassCapacity θ = c := by unfold projectedMassCapacity rw [hcapRaw, Capacities.mk.injEq] constructor · funext x i exact max_eq_left (hIdentification.1.2.1 x i) · funext x i exact max_eq_left (hIdentification.1.2.2 x i) have hcell : ∀ x, massVectorSum θ (fun o => decide (o.cell = x)) = Sys.p x := by intro x rw [massVectorSum_measureReal] unfold POSlateSystem.observedLaw rw [Measure.real, Measure.map_apply (observedDatum_measurable_for_identification Sys) ((Set.toFinite _).measurableSet)] have hevent : Sys.observedDatum ⁻¹' {o | decide (o.cell = x) = true} = Sys.xEvent x := by ext w simp [POSlateSystem.observedDatum, POSlateSystem.xEvent, POSlateSystem.factualX] rw [hevent] rfl have hmassNonneg : ∀ x, 0 ≤ c.mass x := by intro x unfold Capacities.mass apply le_min · exact sum_nonneg fun i _ => hIdentification.1.2.1 x i · exact sum_nonneg fun i _ => hIdentification.1.2.2 x i have hsupportMass : 0 < ∑ x ∈ support, massVectorSum θ (fun o => decide (o.cell = x)) * (projectedMassCapacity θ).mass x := by simp_rw [hcell, hcap] have hsum : (∑ x ∈ support, Sys.p x * c.mass x) = c.aggregateMass Sys.p := by unfold support positiveSupport Capacities.aggregateMass rw [Finset.sum_filter] apply Finset.sum_congr rfl intro x hx have hnonneg : 0 ≤ Sys.p x * c.mass x := mul_nonneg (hIdentification.2.1 x) (hmassNonneg x) by_cases hpos : 0 < Sys.p x * c.mass x · simp [hpos] · have hz : Sys.p x * c.mass x = 0 := le_antisymm (le_of_not_gt hpos) hnonneg simp [hpos, hz] rw [hsum] exact model.positiveAggregateSurvivors obtain ⟨Dψ, hDψcont, hDψ⟩ := endpointFromMassVectorOn_chd θ support hArm hsupportMass let θhat : ℕ → Ω → (ObservedDatum 𝒳 K → ℝ) := fun n => empiricalProbabilityVector O n have hOmeas : ∀ i, Measurable (O i) := measurable_observations_of_iidSampling_all O _hIid have hθhatMeas : ∀ n, Measurable (θhat n) := by intro n exact measurable_empiricalProbabilityVector O hOmeas n have hsqrt : Tendsto (fun n : ℕ => sqrt n) atTop atTop := by change Tendsto ((fun x : ℝ => sqrt x) ∘ fun n : ℕ => (n : ℝ)) atTop atTop exact Real.tendsto_sqrt_atTop.comp (tendsto_natCast_atTop_atTop (R := ℝ)) have hweakScaled : WeakConverges (fun n ω => sqrt n • (θhat n ω - θ)) Q μ := by intro f hf hfb simpa only [θhat, θ, empiricalAtomVector_eq_smul_sub] using hweak f hf hfb letI : IsProbabilityMeasure Q := CausalSmith.PartialID.SlateBenefitPartialTransport.IsGaussian.isProbabilityMeasure_of_normed Q hQ have hTangential : HasTangentialHadamardDirDerivAt Set.univ Set.univ (endpointFromMassVectorOn support) Dψ θ := by refine ⟨Set.mem_univ _, hDψcont.continuousOn, ?_⟩ intro h hh hn tn hhn htn htnpos hdomain exact hDψ h hn tn hhn htn htnpos have hSupported : SupportedIn Q (Set.univ : Set (ObservedDatum 𝒳 K → ℝ)) := by simp [SupportedIn] obtain ⟨hEndpointExpansion, hFixedWeak⟩ := hHadamardDirectionalDeltaMethod_of_gate μ Set.univ Set.univ (endpointFromMassVectorOn support) Dψ Dψ θ θhat (fun n : ℕ => sqrt n) Q inferInstance inferInstance hTangential hDψcont (fun h hh => rfl) hθhatMeas (fun n ω => Set.mem_univ _) hsqrt hweakScaled (tightProbabilityLaw_of_probability Q) hSupported have hArmPos (x : 𝒳) (hpx : 0 < Sys.p x) : ∀ z, 0 < massVectorSum θ (fun o => decide (o.cell = x ∧ o.instrument = z)) := by intro z rw [massVectorSum_measureReal] unfold POSlateSystem.observedLaw rw [Measure.real, Measure.map_apply (observedDatum_measurable_for_identification Sys) ((Set.toFinite _).measurableSet)] have hevent : Sys.observedDatum ⁻¹' {o | decide (o.cell = x ∧ o.instrument = z) = true} = Sys.xEvent x ∩ Sys.zVar.event z := by ext w simp [POSlateSystem.observedDatum, POSlateSystem.xEvent, POVar.event, POSlateSystem.factualX, POSlateSystem.factualZ] rw [hevent] exact arm_cell_positive_of_overlap Sys _hOverlap x hpx z have hScoreWeak (x : 𝒳) (hpx : 0 < Sys.p x) : ∃ Dx : (ObservedDatum 𝒳 K → ℝ) → ℝ, Continuous Dx ∧ HasHadamardDirDerivAt (fun v => survivorMassFromMassVector v x) Dx θ ∧ -- … truncated; follow the source link for the rest …
CausalSmith.PartialID.SlateBenefitPartialTransport.branch_free_pointwise_directional_limit · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TBranchFreePointwiseDirectionalLimit.lean:33
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.TCapacityIdentification 11 declarations The observable IV contrasts identify the two selected-complier marginal subdistributions and hence the survivor mass and observable selection gap.

Identification of observable capacities

The observable IV contrasts identify the two selected-complier marginal subdistributions and hence the survivor mass and observable selection gap.

theorem observedDatum_measurable_for_identification

Public measurability bridge used by downstream estimator limit proofs. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
Measurable S.observedDatum
Proof (Lean source)
CausalSmith.PartialID.SlateBenefitPartialTransport.observedDatum_measurable_for_identification · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:100
theorem observedLawDomain

Every slate-system pushforward is a probability law on the paper's valid observed-data domain, with an outcome present exactly on selected records. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
ObservedLawDomain S.observedLaw
Proof (Lean source)
theorem observedLawDomain (S : POSlateSystem P 𝒳 K) : ObservedLawDomain S.observedLaw := by letI : StandardBorelSpace P.Ω := S.borel refine ⟨S.hK, Measure.isProbabilityMeasure_map (measurable_observedDatum S).aemeasurable, ?_⟩ unfold POSlateSystem.observedLaw apply (ae_map_iff (measurable_observedDatum S).aemeasurable MeasurableSet.of_discrete).2 filter_upwards with ω cases h : S.factualS ω <;> simp [POSlateSystem.observedDatum, h]
CausalSmith.PartialID.SlateBenefitPartialTransport.observedLawDomain · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:106
theorem p_eq_observedCellWeights

The system cell-mass function is exactly the cell-probability vector of its observed pushforward law. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
S.p = Capacities.observedCellWeights S.observedLaw
Proof (Lean source)
theorem p_eq_observedCellWeights (S : POSlateSystem P 𝒳 K) : S.p = Capacities.observedCellWeights S.observedLaw := by funext x symm unfold POSlateSystem.observedLaw POSlateSystem.p Capacities.observedCellWeights rw [Measure.real, Measure.map_apply (observedDatum_measurable_for_identification S) ((Set.toFinite _).measurableSet)] rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.p_eq_observedCellWeights · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:118
def lowerLatentMass

The lower latent mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
x :
𝒳
i :
Fin K
lowerLatentMass S x i :
conditionalReal P.μ {ω | S.YofD false ω = i ∧ S.SofD false ω = true ∧ ω ∈ S.complierEvent} (S.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.lowerLatentMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:193
def upperLatentMass

The upper latent mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
x :
𝒳
j :
Fin K
upperLatentMass S x j :
conditionalReal P.μ {ω | S.YofD true ω = j ∧ S.SofD true ω = true ∧ ω ∈ S.complierEvent} (S.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.upperLatentMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:199
def selectedComplierMass

The selected complier mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
d :
x :
𝒳
selectedComplierMass S d x :
conditionalReal P.μ {ω | S.SofD d ω = true ∧ ω ∈ S.complierEvent} (S.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.selectedComplierMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:205
def survivorComplierMass

The survivor complier mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
x :
𝒳
survivorComplierMass S x :
conditionalReal P.μ {ω | S.SofD false ω = true ∧ S.SofD true ω = true ∧ ω ∈ S.complierEvent} (S.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.survivorComplierMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:210
def equalSelectionComplierMass

The equal selection complier mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
x :
𝒳
equalSelectionComplierMass S x :
conditionalReal P.μ {ω | S.SofD false ω = S.SofD true ω ∧ ω ∈ S.complierEvent} (S.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.equalSelectionComplierMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:216
theorem arm_cell_positive_of_overlap

Public overlap bridge for positive cell-by-instrument probabilities. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
εZ :
S :
POSlateSystem P 𝒳 K
hOverlap :
x :
𝒳
hx :
0 < S.p x
z :
0 < P.μ.real (S.xEvent x ∩ S.zVar.event z)
Proof (Lean source)
theorem arm_cell_positive_of_overlap {εZ : ℝ} (S : POSlateSystem P 𝒳 K) (hOverlap : InstrumentOverlap S εZ) (x : 𝒳) (hx : 0 < S.p x) (z : Bool) : 0 < P.μ.real (S.xEvent x ∩ S.zVar.event z) := arm_cell_positive S hOverlap x hx z
CausalSmith.PartialID.SlateBenefitPartialTransport.arm_cell_positive_of_overlap · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:293
def DirectionObservationallyAdmissible

A direction label is observationally admissible in a cell when some full law satisfying the seven identification assumptions induces the same observed law and carries that label in the cell. Aggregate survivor positivity is not part of cellwise direction admissibility.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
x :
𝒳
dir :
DirectionObservationallyAdmissible P₀ Pobs x dir :
Prop
∃ W : FullLawCandidate P₀ 𝒳 K,
let _ : StandardBorelSpace W.system.Ω := W.slate.borel ∃ (εZ : ℝ) (d : 𝒳 → Bool), IVIndependence W.slate ∧ TreatmentConsistency W.slate ∧ SelectionExclusion W.slate ∧ OutcomeExclusion W.slate ∧ InstrumentOverlap W.slate εZ ∧ NoDefiers W.slate ∧ WeakSelectionMonotonicity W.slate d ∧ W.slate.observedLaw
= Pobs ∧ d x = dir
CausalSmith.PartialID.SlateBenefitPartialTransport.DirectionObservationallyAdmissible · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:640
theorem capacity_identification Theorem 1 in the paper ↗

The conditional IV contrasts equal the two selected-complier marginals; their totals identify the selection gap and, under cellwise weak monotonicity, the survivor-complier mass and every strictly identified direction. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
εZ :
d :
𝒳 → Bool
_hIV :
_hTreatment :
_hSelection :
_hOutcome :
_hOverlap :
_hNoDefiers :
_hMonotone :
c :
observableCapacities S.observedLaw
CompatibleObservedLaw S.observedLaw
x :
0 ≤ S.p x
x :
0 < S.p x
i :
c.lower x i = lowerLatentMass S x i
x :
0 < S.p x
j :
c.upper x j = upperLatentMass S x j
x :
0 < S.p x
x :
0 < S.p x
c.mass x = survivorComplierMass S x
x :
0 < S.p x
0 < c.gap x
d x = true
x :
0 < S.p x
c.gap x < 0
d x = false
x :
0 < S.p x
c.gap x = 0
Proof (Lean source)
-- @node: prop:capacity-identification theorem capacity_identification (S : POSlateSystem P 𝒳 K) (εZ : ℝ) (d : 𝒳 → Bool) (_hIV : IVIndependence S) (_hTreatment : TreatmentConsistency S) (_hSelection : SelectionExclusion S) (_hOutcome : OutcomeExclusion S) (_hOverlap : InstrumentOverlap S εZ) (_hNoDefiers : NoDefiers S) (_hMonotone : WeakSelectionMonotonicity S d) : let c := observableCapacities S.observedLaw CompatibleObservedLaw S.observedLaw ∧ (∀ x, 0 ≤ S.p x) ∧ (∀ x, 0 < S.p x → ∀ i, c.lower x i = lowerLatentMass S x i) ∧ (∀ x, 0 < S.p x → ∀ j, c.upper x j = upperLatentMass S x j) ∧ (∀ x, 0 < S.p x → c.gap x = selectedComplierMass S true x - selectedComplierMass S false x) ∧ (∀ x, 0 < S.p x → c.mass x = survivorComplierMass S x) ∧ (∀ x, 0 < S.p x → 0 < c.gap x → d x = true) ∧ (∀ x, 0 < S.p x → c.gap x < 0 → d x = false) ∧ (∀ x, 0 < S.p x → c.gap x = 0 → DirectionObservationallyAdmissible P S.observedLaw x trueDirectionObservationallyAdmissible P S.observedLaw x false) := by dsimp have hpnonneg : ∀ x, 0 ≤ S.p x := by intro x exact measureReal_nonneg have hlower : ∀ x, 0 < S.p x → ∀ i, (observableCapacities S.observedLaw).lower x i = lowerLatentMass S x i := by intro x hx i have hx' : 0 < P.μ.real (S.xEvent x) := by simpa [POSlateSystem.p] using hx rw [observable_lower_pullback] rw [selectedOutcome_arm_identified S _hIV _hTreatment _hSelection _hOutcome false false i x hx' (arm_cell_positive S _hOverlap x hx false)] rw [selectedOutcome_arm_identified S _hIV _hTreatment _hSelection _hOutcome false true i x hx' (arm_cell_positive S _hOverlap x hx true)] exact lower_noDefier_contrast S _hNoDefiers x i hx' have hupper : ∀ x, 0 < S.p x → ∀ j, (observableCapacities S.observedLaw).upper x j = upperLatentMass S x j := by intro x hx j have hx' : 0 < P.μ.real (S.xEvent x) := by simpa [POSlateSystem.p] using hx rw [observable_upper_pullback] rw [selectedOutcome_arm_identified S _hIV _hTreatment _hSelection _hOutcome true true j x hx' (arm_cell_positive S _hOverlap x hx true)] rw [selectedOutcome_arm_identified S _hIV _hTreatment _hSelection _hOutcome true false j x hx' (arm_cell_positive S _hOverlap x hx false)] exact upper_noDefier_contrast S _hNoDefiers x j hx' have hvalid : ValidCapacities (observableCapacities S.observedLaw) := by constructor · intro x i by_cases hx : 0 < S.p x · rw [hlower x hx i] unfold lowerLatentMass conditionalReal split_ifs <;> positivity · have hp0 : S.p x = 0 := le_antisymm (not_lt.mp hx) (hpnonneg x) have hxzero : P.μ.real (S.xEvent x) = 0 := by simpa [POSlateSystem.p] using hp0 have harm (z : Bool) : P.μ.real (S.xEvent x ∩ S.zVar.event z) = 0 := by apply le_antisymm · exact (measureReal_mono inter_subset_left).trans_eq hxzero · exact measureReal_nonneg rw [observable_lower_pullback] simp [conditionalReal, harm] · intro x j by_cases hx : 0 < S.p x · rw [hupper x hx j] unfold upperLatentMass conditionalReal split_ifs <;> positivity · have hp0 : S.p x = 0 := le_antisymm (not_lt.mp hx) (hpnonneg x) have hxzero : P.μ.real (S.xEvent x) = 0 := by simpa [POSlateSystem.p] using hp0 have harm (z : Bool) : P.μ.real (S.xEvent x ∩ S.zVar.event z) = 0 := by apply le_antisymm · exact (measureReal_mono inter_subset_left).trans_eq hxzero · exact measureReal_nonneg rw [observable_upper_pullback] simp [conditionalReal, harm] have hcompat : CompatibleObservedLaw S.observedLaw := by refine ⟨?_, hvalid⟩ exact Measure.isProbabilityMeasure_map (measurable_observedDatum S).aemeasurable have hq0 : ∀ x, 0 < S.p x → (observableCapacities S.observedLaw).q0 x = selectedComplierMass S false x := by intro x hx have hx' : 0 < P.μ.real (S.xEvent x) := by simpa [POSlateSystem.p] using hx rw [Capacities.q0, Finset.sum_congr rfl (fun i _ => hlower x hx i)] exact sum_lowerLatentMass S x hx' have hq1 : ∀ x, 0 < S.p x → (observableCapacities S.observedLaw).q1 x = selectedComplierMass S true x := by intro x hx have hx' : 0 < P.μ.real (S.xEvent x) := by simpa [POSlateSystem.p] using hx rw [Capacities.q1, Finset.sum_congr rfl (fun j _ => hupper x hx j)] exact sum_upperLatentMass S x hx' have hgap : ∀ x, 0 < S.p x → (observableCapacities S.observedLaw).gap x = selectedComplierMass S true x - selectedComplierMass S false x := by intro x hx simp [Capacities.gap, hq0 x hx, hq1 x hx] have hmass : ∀ x, 0 < S.p x → (observableCapacities S.observedLaw).mass x = survivorComplierMass S x := by intro x hx have hx' : 0 < P.μ.real (S.xEvent x) := by simpa [POSlateSystem.p] using hx rcases selection_monotone_cell S d _hMonotone x hx' with h | h · rw [Capacities.mass, hq0 x hx, hq1 x hx, min_eq_left h.2.2, h.2.1] · rw [Capacities.mass, hq0 x hx, hq1 x hx, min_eq_right h.2.2, h.2.1] have hposdir : ∀ x, 0 < S.p x → 0 < (observableCapacities S.observedLaw).gap x → d x = true := by intro x hx hpos have hx' : 0 < P.μ.real (S.xEvent x) := by simpa [POSlateSystem.p] using hx rcases selection_monotone_cell S d _hMonotone x hx' with h | h · exact h.1 · exfalso rw [hgap x hx] at hpos linarith [h.2.2] have hnegdir : ∀ x, 0 < S.p x → (observableCapacities S.observedLaw).gap x < 0 → d x = false := by intro x hx hneg have hx' : 0 < P.μ.real (S.xEvent x) := by simpa [POSlateSystem.p] using hx rcases selection_monotone_cell S d _hMonotone x hx' with h | h · exfalso rw [hgap x hx] at hneg linarith [h.2.2] · exact h.1 refine ⟨hcompat, hpnonneg, hlower, hupper, hgap, hmass, hposdir, hnegdir, ?_⟩ intro x hx hzero have hx' : 0 < P.μ.real (S.xEvent x) := by simpa [POSlateSystem.p] using hx have hselEq : selectedComplierMass S true x = selectedComplierMass S false x := by have := hgap x hx rw [hzero] at this linarith let W : FullLawCandidate P 𝒳 K := ⟨P, S⟩ constructor · refine ⟨W, εZ, update d x true, _hIV, _hTreatment, _hSelection, _hOutcome, _hOverlap, _hNoDefiers, ?_, rfl, ?_⟩ · exact weakMonotone_update_of_equal S d _hMonotone x hx' hselEq true · exact Function.update_self x true d · refine ⟨W, εZ, update d x false, _hIV, _hTreatment, _hSelection, _hOutcome, _hOverlap, _hNoDefiers, ?_, rfl, ?_⟩ · exact weakMonotone_update_of_equal S d _hMonotone x hx' hselEq false · exact Function.update_self x false d
CausalSmith.PartialID.SlateBenefitPartialTransport.capacity_identification · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TCapacityIdentification.lean:658
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.TFullLawEndpointAttainment 23 declarations The cellwise threshold flows are completed into genuine potential-outcome laws that preserve the observed distribution and attain both aggregate endpoints.

Full-law endpoint attainment

The cellwise threshold flows are completed into genuine potential-outcome laws that preserve the observed distribution and attain both aggregate endpoints.

def benefitProbability

The benefit probability is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
benefitProbability S :
benefitProbabilityOf ({ system := P, slate := S } : FullLawCandidate P 𝒳 K)
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitProbability · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:19

The is endpoint witness condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
Pobs :
εZ :
d :
𝒳 → Bool
target :
P' :
S' :
POSlateSystem P' 𝒳 K
IsEndpointWitness Pobs εZ d target P' S' :
Prop
_ :
S'.borel (: StandardBorelSpace P'.Ω)
S'.observedLaw = Pobs
benefitProbability S' = target
CausalSmith.PartialID.SlateBenefitPartialTransport.IsEndpointWitness · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:24
def fullLawSelectedOnlyUnderZero

The full law selected only under zero is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
W :
FullLawCandidate P₀ 𝒳 K
x :
𝒳
i :
Fin K
fullLawSelectedOnlyUnderZero W x i :
conditionalReal W.system.μ {ω | W.slate.Y0 ω = i ∧ W.slate.S0 ω = true ∧ W.slate.S1 ω = false ∧ ω ∈ W.slate.complierEvent} (W.slate.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.fullLawSelectedOnlyUnderZero · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:32
def fullLawSelectedOnlyUnderOne

The full law selected only under one is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
W :
FullLawCandidate P₀ 𝒳 K
x :
𝒳
j :
Fin K
fullLawSelectedOnlyUnderOne W x j :
conditionalReal W.system.μ {ω | W.slate.Y1 ω = j ∧ W.slate.S0 ω = false ∧ W.slate.S1 ω = true ∧ ω ∈ W.slate.complierEvent} (W.slate.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.fullLawSelectedOnlyUnderOne · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:39
def fullLawNeverSelectedMass

The full law never selected mass is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
W :
FullLawCandidate P₀ 𝒳 K
x :
𝒳
fullLawNeverSelectedMass W x :
conditionalReal W.system.μ {ω | W.slate.S0 ω = false ∧ W.slate.S1 ω = false ∧ ω ∈ W.slate.complierEvent} (W.slate.xEvent x)
CausalSmith.PartialID.SlateBenefitPartialTransport.fullLawNeverSelectedMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:46

A full law realizes every component of a threshold latent completion, not only its survivor coupling.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
W :
FullLawCandidate P₀ 𝒳 K
x :
𝒳
completion :
RealizesThresholdLatentCompletion W x completion :
Prop
clause 1
fullLawSurvivorCoupling W x = completion.survivor
clause 2
i :
fullLawSelectedOnlyUnderZero W x i = completion.selectedOnlyUnderZero i
clause 3
j :
fullLawSelectedOnlyUnderOne W x j = completion.selectedOnlyUnderOne j
clause 4
fullLawNeverSelectedMass W x = completion.neverSelectedMass
clause 5
baselineNeverTakerComponent W x = completion.neverTakerComponent
clause 6
baselineAlwaysTakerComponent W x = completion.alwaysTakerComponent
CausalSmith.PartialID.SlateBenefitPartialTransport.RealizesThresholdLatentCompletion · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:385
def thresholdCompletionCellTable

Assemble the six components of each threshold completion into a complete latent table. Unobserved outcomes in one-sided and never-selected strata are pinned to an arbitrary reference level.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
reference :
Fin K
completion :
∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c
thresholdCompletionCellTable reference completion :
fun x d0 d1 s0 s1 y0 y1
=> if d0 then if d1 then completion x |>.alwaysTakerComponent s0 s1 y0 y1 else 0 else if d1 then if s0 then if s1 then completion x |>.survivor y0 y1 else if y1 = reference then completion x |>.selectedOnlyUnderZero y0 else 0 else if s1 then if y0 = reference then completion x |>.selectedOnlyUnderOne y1 else 0 else if y0 = reference ∧
y1
= reference then completion x |>.neverSelectedMass else 0 else completion x |>.neverTakerComponent s0 s1 y0 y1
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdCompletionCellTable · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:398
theorem thresholdCompletionCellTable_nonnegative

Given the stated hypotheses, threshold completion cell table is nonnegative.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
reference :
Fin K
completion :
∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c
hsurvivor :
∀ x i j, 0 ≤ (completion x).survivor i j
hzero :
∀ x i, 0 ≤ (completion x).selectedOnlyUnderZero i
hone :
∀ x j, 0 ≤ (completion x).selectedOnlyUnderOne j
hnever :
∀ x, 0 ≤ (completion x).neverSelectedMass
hNT :
∀ x s0 s1 y0 y1, 0 ≤ (completion x).neverTakerComponent s0 s1 y0 y1
hAT :
∀ x s0 s1 y0 y1, 0 ≤ (completion x).alwaysTakerComponent s0 s1 y0 y1
Proof (Lean source)
theorem thresholdCompletionCellTable_nonnegative {P₀ : POSystem} {Pobs : Measure (ObservedDatum 𝒳 K)} {c : Capacities 𝒳 K} (reference : Fin K) (completion : ∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c) (hsurvivor : ∀ x i j, 0 ≤ (completion x).survivor i j) (hzero : ∀ x i, 0 ≤ (completion x).selectedOnlyUnderZero i) (hone : ∀ x j, 0 ≤ (completion x).selectedOnlyUnderOne j) (hnever : ∀ x, 0 ≤ (completion x).neverSelectedMass) (hNT : ∀ x s0 s1 y0 y1, 0 ≤ (completion x).neverTakerComponent s0 s1 y0 y1) (hAT : ∀ x s0 s1 y0 y1, 0 ≤ (completion x).alwaysTakerComponent s0 s1 y0 y1) : (thresholdCompletionCellTable reference completion).Nonnegative := by intro x d0 d1 s0 s1 y0 y1 unfold thresholdCompletionCellTable repeat first | split | exact hsurvivor _ _ _ | exact hzero _ _ | exact hone _ _ | exact hnever _ | exact hNT _ _ _ _ _ | exact hAT _ _ _ _ _ | positivity
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdCompletionCellTable_nonnegative · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:417
theorem thresholdCompletionCellTable_total

Given the stated hypotheses, the threshold completion cell table total property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
reference :
Fin K
completion :
∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c
x :
𝒳
(∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, thresholdCompletionCellTable reference completion x d0 d1 s0 s1 y0 y1)
= (∑ s0, ∑ s1, ∑ y0, ∑ y1, (completion x).neverTakerComponent s0 s1 y0 y1)
+ (∑ i, ∑ j, (completion x).survivor i j)
+ (∑ i, (completion x).selectedOnlyUnderZero i)
+ (∑ j, (completion x).selectedOnlyUnderOne j)
+ (completion x).neverSelectedMass
+ (∑ s0, ∑ s1, ∑ y0, ∑ y1, (completion x).alwaysTakerComponent s0 s1 y0 y1)
Proof (Lean source)
theorem thresholdCompletionCellTable_total {P₀ : POSystem} {Pobs : Measure (ObservedDatum 𝒳 K)} {c : Capacities 𝒳 K} (reference : Fin K) (completion : ∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c) (x : 𝒳) : (∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, thresholdCompletionCellTable reference completion x d0 d1 s0 s1 y0 y1) = (∑ s0, ∑ s1, ∑ y0, ∑ y1, (completion x).neverTakerComponent s0 s1 y0 y1) + (∑ i, ∑ j, (completion x).survivor i j) + (∑ i, (completion x).selectedOnlyUnderZero i) + (∑ j, (completion x).selectedOnlyUnderOne j) + (completion x).neverSelectedMass + (∑ s0, ∑ s1, ∑ y0, ∑ y1, (completion x).alwaysTakerComponent s0 s1 y0 y1) := by have hsingle : (∑ y0 : Fin K, ∑ y1 : Fin K, if y0 = reference ∧ y1 = reference then (completion x).neverSelectedMass else 0) = (completion x).neverSelectedMass := by calc _ = ∑ y0 : Fin K, if y0 = reference then (completion x).neverSelectedMass else 0 := by apply Fintype.sum_congr intro y0 by_cases hy0 : y0 = reference <;> simp [hy0] _ = (completion x).neverSelectedMass := by simp simp [thresholdCompletionCellTable, Fintype.sum_bool, hsingle] ring
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdCompletionCellTable_total · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:441
def normalizedCompletionCellTable

Replace an irrelevant zero-probability cell by a point mass, so the conditional table is normalized in every cell.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
P :
S :
POSlateSystem P 𝒳 K
reference :
Fin K
completion :
∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c
normalizedCompletionCellTable S reference completion :
fun x d0 d1 s0 s1 y0 y1
=> if 0 < S.p x then thresholdCompletionCellTable reference completion x d0 d1 s0 s1 y0 y1 else if d0 = false
d1 = false
s0 = false
s1 = false
y0 = reference ∧
y1 = reference then 1 else 0
CausalSmith.PartialID.SlateBenefitPartialTransport.normalizedCompletionCellTable · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:576
theorem normalizedCompletionCellTable_nonnegative

Given the stated hypotheses, normalized completion cell table is nonnegative.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
P :
S :
POSlateSystem P 𝒳 K
reference :
Fin K
completion :
∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c
hraw :
Proof (Lean source)
theorem normalizedCompletionCellTable_nonnegative {P₀ : POSystem} {Pobs : Measure (ObservedDatum 𝒳 K)} {c : Capacities 𝒳 K} {P : POSystem} (S : POSlateSystem P 𝒳 K) (reference : Fin K) (completion : ∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c) (hraw : (thresholdCompletionCellTable reference completion).Nonnegative) : (normalizedCompletionCellTable S reference completion).Nonnegative := by intro x d0 d1 s0 s1 y0 y1 by_cases hx : 0 < S.p x · simpa [normalizedCompletionCellTable, hx] using hraw x d0 d1 s0 s1 y0 y1 · by_cases htuple : d0 = false ∧ d1 = false ∧ s0 = false ∧ s1 = false ∧ y0 = reference ∧ y1 = reference <;> simp [normalizedCompletionCellTable, hx, htuple]
CausalSmith.PartialID.SlateBenefitPartialTransport.normalizedCompletionCellTable_nonnegative · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:589
theorem normalizedCompletionCellTable_normalized

Given the stated hypotheses, the normalized completion cell table normalized property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
P :
S :
POSlateSystem P 𝒳 K
reference :
Fin K
completion :
∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c
hraw :
∀ x
if
0 < S.p x
then
(∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, thresholdCompletionCellTable reference completion x d0 d1 s0 s1 y0 y1)
= 1
(normalizedCompletionCellTable S reference completion).Normalized
Proof (Lean source)
theorem normalizedCompletionCellTable_normalized {P₀ : POSystem} {Pobs : Measure (ObservedDatum 𝒳 K)} {c : Capacities 𝒳 K} {P : POSystem} (S : POSlateSystem P 𝒳 K) (reference : Fin K) (completion : ∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c) (hraw : ∀ x, 0 < S.p x → (∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, thresholdCompletionCellTable reference completion x d0 d1 s0 s1 y0 y1) = 1) : (normalizedCompletionCellTable S reference completion).Normalized := by intro x by_cases hx : 0 < S.p x · simp only [normalizedCompletionCellTable, hx, if_pos] exact hraw x hx · have hfin : (∑ y0 : Fin K, ∑ y1 : Fin K, if y0 = reference ∧ y1 = reference then (1 : ℝ) else 0) = 1 := by calc _ = ∑ y0 : Fin K, if y0 = reference then (1 : ℝ) else 0 := by apply Fintype.sum_congr intro y0 by_cases hy0 : y0 = reference <;> simp [hy0] _ = 1 := by simp simpa [normalizedCompletionCellTable, hx, Fintype.sum_bool] using hfin
CausalSmith.PartialID.SlateBenefitPartialTransport.normalizedCompletionCellTable_normalized · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:603
theorem normalizedCompletionCellTable_noDefiers

Given the stated hypotheses, the normalized completion cell table no defiers property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
P :
S :
POSlateSystem P 𝒳 K
reference :
Fin K
completion :
∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c
x s0 s1 y0 y1 :
normalizedCompletionCellTable S reference completion x true false s0 s1 y0 y1 = 0
Proof (Lean source)
theorem normalizedCompletionCellTable_noDefiers {P₀ : POSystem} {Pobs : Measure (ObservedDatum 𝒳 K)} {c : Capacities 𝒳 K} {P : POSystem} (S : POSlateSystem P 𝒳 K) (reference : Fin K) (completion : ∀ x : 𝒳, ThresholdLatentCompletion P₀ Pobs c) : ∀ x s0 s1 y0 y1, normalizedCompletionCellTable S reference completion x true false s0 s1 y0 y1 = 0 := by intro x s0 s1 y0 y1 by_cases hx : 0 < S.p x <;> simp [normalizedCompletionCellTable, hx, thresholdCompletionCellTable]
CausalSmith.PartialID.SlateBenefitPartialTransport.normalizedCompletionCellTable_noDefiers · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:626
theorem thresholdFlow_completionCellTables_total

Given the stated hypotheses, the threshold flow completion cell tables total property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
baseline :
CompatibleBaseline P₀ Pobs c
hValid :
reference :
Fin K
x :
𝒳
hpartition :
(∑ s0, ∑ s1, ∑ y0, ∑ y1, baseline.neverTakerComponent x s0 s1 y0 y1)
+ baseline.complierMass x
+ (∑ s0, ∑ s1, ∑ y0, ∑ y1, baseline.alwaysTakerComponent x s0 s1 y0 y1)
= 1
flows :
thresholdFlow baseline hValid x
(∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, thresholdCompletionCellTable reference (fun _ => flows.lower) x d0 d1 s0 s1 y0 y1)
= 1
(∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, thresholdCompletionCellTable reference (fun _ => flows.upper) x d0 d1 s0 s1 y0 y1)
= 1
Proof (Lean source)
theorem thresholdFlow_completionCellTables_total {P₀ : POSystem} {Pobs : Measure (ObservedDatum 𝒳 K)} {c : Capacities 𝒳 K} (baseline : CompatibleBaseline P₀ Pobs c) (hValid : ValidCapacities c) (reference : Fin K) (x : 𝒳) (hpartition : (∑ s0, ∑ s1, ∑ y0, ∑ y1, baseline.neverTakerComponent x s0 s1 y0 y1) + baseline.complierMass x + (∑ s0, ∑ s1, ∑ y0, ∑ y1, baseline.alwaysTakerComponent x s0 s1 y0 y1) = 1) : let flows := thresholdFlow baseline hValid x (∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, thresholdCompletionCellTable reference (fun _ => flows.lower) x d0 d1 s0 s1 y0 y1) = 1 ∧ (∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, thresholdCompletionCellTable reference (fun _ => flows.upper) x d0 d1 s0 s1 y0 y1) = 1 := by dsimp only constructor · rw [thresholdCompletionCellTable_total] have hc := thresholdLatentCompletion_complier_total baseline hValid x (thresholdFlowLower c hValid x) (thresholdFlow_spec baseline hValid x).1 simp only [thresholdFlow, thresholdLatentCompletion] at hc ⊢ linarith · rw [thresholdCompletionCellTable_total] have hc := thresholdLatentCompletion_complier_total baseline hValid x (thresholdFlowUpper c hValid x) (thresholdFlow_spec baseline hValid x).2.2.1 simp only [thresholdFlow, thresholdLatentCompletion] at hc ⊢ linarith
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlow_completionCellTables_total · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:756
theorem thresholdFlow_completionCellTables_nonnegative

Given the stated hypotheses, threshold flow completion cell tables is nonnegative.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
baseline :
CompatibleBaseline P₀ Pobs c
hValid :
reference :
Fin K
flows :
fun x => thresholdFlow baseline hValid x
(thresholdCompletionCellTable reference (fun x => (flows x).lower)).Nonnegative
(thresholdCompletionCellTable reference (fun x => (flows x).upper)).Nonnegative
Proof (Lean source)
theorem thresholdFlow_completionCellTables_nonnegative {P₀ : POSystem} {Pobs : Measure (ObservedDatum 𝒳 K)} {c : Capacities 𝒳 K} (baseline : CompatibleBaseline P₀ Pobs c) (hValid : ValidCapacities c) (reference : Fin K) : let flows := fun x => thresholdFlow baseline hValid x (thresholdCompletionCellTable reference (fun x => (flows x).lower)).Nonnegative ∧ (thresholdCompletionCellTable reference (fun x => (flows x).upper)).Nonnegative := by dsimp only constructor · apply thresholdCompletionCellTable_nonnegative · intro x i j exact (thresholdFlow_spec baseline hValid x).1.1 i j · intro x i change 0 ≤ if c.gap x < 0 then c.lower x i - rowMass (thresholdFlowLower c hValid x) i else 0 split_ifs · exact sub_nonneg.mpr ((thresholdFlow_spec baseline hValid x).1.2.1 i) · positivity · intro x j change 0 ≤ if 0 < c.gap x then c.upper x j - columnMass (thresholdFlowLower c hValid x) j else 0 split_ifs · exact sub_nonneg.mpr ((thresholdFlow_spec baseline hValid x).1.2.2.1 j) · positivity · intro x exact sub_nonneg.mpr (baseline.qMax_le_complierMass x) · intro x s0 s1 y0 y1 change 0 ≤ baseline.neverTakerComponent x s0 s1 y0 y1 rw [baseline.neverTaker_eq] unfold baselineNeverTakerComponent conditionalReal split_ifs <;> positivity · intro x s0 s1 y0 y1 change 0 ≤ baseline.alwaysTakerComponent x s0 s1 y0 y1 rw [baseline.alwaysTaker_eq] unfold baselineAlwaysTakerComponent conditionalReal split_ifs <;> positivity · apply thresholdCompletionCellTable_nonnegative · intro x i j exact (thresholdFlow_spec baseline hValid x).2.2.1.1 i j · intro x i change 0 ≤ if c.gap x < 0 then c.lower x i - rowMass (thresholdFlowUpper c hValid x) i else 0 split_ifs · exact sub_nonneg.mpr ((thresholdFlow_spec baseline hValid x).2.2.1.2.1 i) · positivity · intro x j change 0 ≤ if 0 < c.gap x then c.upper x j - columnMass (thresholdFlowUpper c hValid x) j else 0 split_ifs · exact sub_nonneg.mpr ((thresholdFlow_spec baseline hValid x).2.2.1.2.2.1 j) · positivity · intro x exact sub_nonneg.mpr (baseline.qMax_le_complierMass x) · intro x s0 s1 y0 y1 change 0 ≤ baseline.neverTakerComponent x s0 s1 y0 y1 rw [baseline.neverTaker_eq] unfold baselineNeverTakerComponent conditionalReal split_ifs <;> positivity · intro x s0 s1 y0 y1 change 0 ≤ baseline.alwaysTakerComponent x s0 s1 y0 y1 rw [baseline.alwaysTaker_eq] unfold baselineAlwaysTakerComponent conditionalReal split_ifs <;> positivity
CausalSmith.PartialID.SlateBenefitPartialTransport.thresholdFlow_completionCellTables_nonnegative · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:788
theorem branchFree_completionCellTable_nonnegative

A whole family of arbitrary exact-mass couplings has a nonnegative latent completion table. This is the generic form used by the sharpness lift. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
baseline :
CompatibleBaseline P₀ Pobs c
hValid :
reference :
Fin K
gamma :
∀ x : 𝒳, Coupling K
hgamma :
∀ x, gamma x ∈ branchFreePolytope c hValid x
(thresholdCompletionCellTable reference (fun x => thresholdLatentCompletion baseline hValid x (gamma x))).Nonnegative
Proof (Lean source)
theorem branchFree_completionCellTable_nonnegative {P₀ : POSystem} {Pobs : Measure (ObservedDatum 𝒳 K)} {c : Capacities 𝒳 K} (baseline : CompatibleBaseline P₀ Pobs c) (hValid : ValidCapacities c) (reference : Fin K) (gamma : ∀ x : 𝒳, Coupling K) (hgamma : ∀ x, gamma x ∈ branchFreePolytope c hValid x) : (thresholdCompletionCellTable reference (fun x => thresholdLatentCompletion baseline hValid x (gamma x))).Nonnegative := by apply thresholdCompletionCellTable_nonnegative · exact fun x i j => (hgamma x).1 i j · intro x i change 0 ≤ if c.gap x < 0 then c.lower x i - rowMass (gamma x) i else 0 split_ifs · exact sub_nonneg.mpr ((hgamma x).2.1 i) · positivity · intro x j change 0 ≤ if 0 < c.gap x then c.upper x j - columnMass (gamma x) j else 0 split_ifs · exact sub_nonneg.mpr ((hgamma x).2.2.1 j) · positivity · intro x exact sub_nonneg.mpr (baseline.qMax_le_complierMass x) · intro x s0 s1 y0 y1 change 0 ≤ baseline.neverTakerComponent x s0 s1 y0 y1 rw [baseline.neverTaker_eq] unfold baselineNeverTakerComponent conditionalReal split_ifs <;> positivity · intro x s0 s1 y0 y1 change 0 ≤ baseline.alwaysTakerComponent x s0 s1 y0 y1 rw [baseline.alwaysTaker_eq] unfold baselineAlwaysTakerComponent conditionalReal split_ifs <;> positivity
CausalSmith.PartialID.SlateBenefitPartialTransport.branchFree_completionCellTable_nonnegative · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:853
theorem branchFree_completionCellTable_total

The arbitrary exact-mass completion preserves the baseline cell total. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
Pobs :
c :
Capacities 𝒳 K
baseline :
CompatibleBaseline P₀ Pobs c
hValid :
reference :
Fin K
gamma :
∀ x : 𝒳, Coupling K
hgamma :
∀ x, gamma x ∈ branchFreePolytope c hValid x
x :
𝒳
hpartition :
(∑ s0, ∑ s1, ∑ y0, ∑ y1, baseline.neverTakerComponent x s0 s1 y0 y1)
+ baseline.complierMass x
+ (∑ s0, ∑ s1, ∑ y0, ∑ y1, baseline.alwaysTakerComponent x s0 s1 y0 y1)
= 1
(∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, thresholdCompletionCellTable reference (fun x => thresholdLatentCompletion baseline hValid x (gamma x)) x d0 d1 s0 s1 y0 y1)
= 1
Proof (Lean source)
theorem branchFree_completionCellTable_total {P₀ : POSystem} {Pobs : Measure (ObservedDatum 𝒳 K)} {c : Capacities 𝒳 K} (baseline : CompatibleBaseline P₀ Pobs c) (hValid : ValidCapacities c) (reference : Fin K) (gamma : ∀ x : 𝒳, Coupling K) (hgamma : ∀ x, gamma x ∈ branchFreePolytope c hValid x) (x : 𝒳) (hpartition : (∑ s0, ∑ s1, ∑ y0, ∑ y1, baseline.neverTakerComponent x s0 s1 y0 y1) + baseline.complierMass x + (∑ s0, ∑ s1, ∑ y0, ∑ y1, baseline.alwaysTakerComponent x s0 s1 y0 y1) = 1) : (∑ d0, ∑ d1, ∑ s0, ∑ s1, ∑ y0, ∑ y1, thresholdCompletionCellTable reference (fun x => thresholdLatentCompletion baseline hValid x (gamma x)) x d0 d1 s0 s1 y0 y1) = 1 := by rw [thresholdCompletionCellTable_total] have hc := thresholdLatentCompletion_complier_total baseline hValid x (gamma x) (hgamma x) simp only [thresholdLatentCompletion] at hc ⊢ linarith
CausalSmith.PartialID.SlateBenefitPartialTransport.branchFree_completionCellTable_total · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:886
theorem observedLaw_eq_transfers_p_propensity

Given the stated hypotheses, the observed law equals transfers p propensity property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P Q :
S :
POSlateSystem P 𝒳 K
R :
POSlateSystem Q 𝒳 K
hlaw :
R.observedLaw = S.observedLaw
conclusion 1
x :
R.p x = S.p x
conclusion 2
x :
R.propensity x = S.propensity x
Proof (Lean source)
theorem observedLaw_eq_transfers_p_propensity {P Q : POSystem} (S : POSlateSystem P 𝒳 K) (R : POSlateSystem Q 𝒳 K) (hlaw : R.observedLaw = S.observedLaw) : (∀ x, R.p x = S.p x) ∧ (∀ x, R.propensity x = S.propensity x) := by constructor · intro x rw [← observedLaw_cellProbability R x, hlaw, observedLaw_cellProbability S x] · intro x rw [← observedLaw_propensity R x, hlaw, observedLaw_propensity S x]
CausalSmith.PartialID.SlateBenefitPartialTransport.observedLaw_eq_transfers_p_propensity · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:2614
theorem full_law_endpoint_attainment Theorem 3 in the paper ↗

Every compatible observed law has lower- and upper-attaining full latent laws in the maintained model class, including tie and zero-survivor cells. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
εZ :
d :
𝒳 → Bool
_hIV :
_hNoDefiers :
_hMonotone :
compatible :
c :
observableCapacities S.observedLaw
hIdentification :
capacity_identification S εZ d compatible.ivIndependence compatible.treatmentConsistency compatible.selectionExclusion compatible.outcomeExclusion compatible.instrumentOverlap compatible.noDefiers compatible.weakSelectionMonotonicity
hValid :
hIdentification.1.2 (: ValidCapacities c)
hp :
hIdentification.2.1 (: ∀ x, 0 ≤ S.p x)
hMass :
compatible.positiveAggregateSurvivors (: 0 < c.aggregateMass S.p)
∃ baseline : CompatibleBaseline P S.observedLaw c,
let flows := fun x
=> thresholdFlow baseline hValid x ∃ (PL : POSystem) (SL : POSlateSystem PL 𝒳 K) (PU : POSystem) (SU : POSlateSystem PU 𝒳 K), IsEndpointWitness S.observedLaw εZ d (c.endpointMap S.p S.observedLaw rfl (p_eq_observedCellWeights S) hValid hp hMass (observedLawDomain S)).endpoints.1 PL SL ∧ IsEndpointWitness S.observedLaw εZ d (c.endpointMap S.p S.observedLaw rfl (p_eq_observedCellWeights S) hValid hp hMass (observedLawDomain S)).endpoints.2 PU SU ∧ (∀ x, RealizesThresholdLatentCompletion ({ system := PL, slate := SL } : FullLawCandidate P 𝒳 K) x (flows x).lower) ∧ (∀ x, RealizesThresholdLatentCompletion ({ system := PU, slate := SU } : FullLawCandidate P 𝒳 K) x (flows x).upper)
Proof (Lean source)
-- @node: thm:full-law-endpoint-attainment theorem full_law_endpoint_attainment {P : POSystem} [StandardBorelSpace P.Ω] (S : POSlateSystem P 𝒳 K) (εZ : ℝ) (d : 𝒳 → Bool) (_hIV : IVIndependence S) (_hNoDefiers : NoDefiers S) (_hMonotone : WeakSelectionMonotonicity S d) (compatible : TieSafeSurvivorModel S εZ d) : let c := observableCapacities S.observedLaw let hIdentification := capacity_identification S εZ d compatible.ivIndependence compatible.treatmentConsistency compatible.selectionExclusion compatible.outcomeExclusion compatible.instrumentOverlap compatible.noDefiers compatible.weakSelectionMonotonicity let hValid : ValidCapacities c := hIdentification.1.2 let hp : ∀ x, 0 ≤ S.p x := hIdentification.2.1 let hMass : 0 < c.aggregateMass S.p := compatible.positiveAggregateSurvivors ∃ baseline : CompatibleBaseline P S.observedLaw c, let flows := fun x => thresholdFlow baseline hValid x ∃ (PL : POSystem) (SL : POSlateSystem PL 𝒳 K) (PU : POSystem) (SU : POSlateSystem PU 𝒳 K), IsEndpointWitness S.observedLaw εZ d (c.endpointMap S.p S.observedLaw rfl (p_eq_observedCellWeights S) hValid hp hMass (observedLawDomain S)).endpoints.1 PL SL ∧ IsEndpointWitness S.observedLaw εZ d (c.endpointMap S.p S.observedLaw rfl (p_eq_observedCellWeights S) hValid hp hMass (observedLawDomain S)).endpoints.2 PU SU ∧ (∀ x, RealizesThresholdLatentCompletion ({ system := PL, slate := SL } : FullLawCandidate P 𝒳 K) x (flows x).lower) ∧ (∀ x, RealizesThresholdLatentCompletion ({ system := PU, slate := SU } : FullLawCandidate P 𝒳 K) x (flows x).upper) := by dsimp only have hIdentification := capacity_identification S εZ d compatible.ivIndependence compatible.treatmentConsistency compatible.selectionExclusion compatible.outcomeExclusion compatible.instrumentOverlap compatible.noDefiers compatible.weakSelectionMonotonicity let baseline := originalCompatibleBaseline S εZ d compatible refine ⟨baseline, ?_⟩ let reference : Fin K := ⟨0, lt_of_lt_of_le (by decide : 0 < 3) S.hK⟩ let lowerCompletion := (fun x => (thresholdFlow baseline hIdentification.1.2 x).lower) let upperCompletion := (fun x => (thresholdFlow baseline hIdentification.1.2 x).upper) have hselectedMarginsLower : ∀ x, (∀ i, rowMass (lowerCompletion x).survivor i + (lowerCompletion x).selectedOnlyUnderZero i = (observableCapacities S.observedLaw).lower x i) ∧ (∀ j, columnMass (lowerCompletion x).survivor j + (lowerCompletion x).selectedOnlyUnderOne j = (observableCapacities S.observedLaw).upper x j) := by intro x simpa [lowerCompletion, thresholdFlow, thresholdLatentCompletion] using thresholdLatentCompletion_selected_margins baseline hIdentification.1.2 x (thresholdFlowLower (observableCapacities S.observedLaw) hIdentification.1.2 x) (thresholdFlow_spec baseline hIdentification.1.2 x).1 have hselectedMarginsUpper : ∀ x, (∀ i, rowMass (upperCompletion x).survivor i + (upperCompletion x).selectedOnlyUnderZero i = (observableCapacities S.observedLaw).lower x i) ∧ (∀ j, columnMass (upperCompletion x).survivor j + (upperCompletion x).selectedOnlyUnderOne j = (observableCapacities S.observedLaw).upper x j) := by intro x simpa [upperCompletion, thresholdFlow, thresholdLatentCompletion] using thresholdLatentCompletion_selected_margins baseline hIdentification.1.2 x (thresholdFlowUpper (observableCapacities S.observedLaw) hIdentification.1.2 x) (thresholdFlow_spec baseline hIdentification.1.2 x).2.2.1 let lowerTable := normalizedCompletionCellTable S reference lowerCompletion let upperTable := normalizedCompletionCellTable S reference upperCompletion have hrawNonnegative : (thresholdCompletionCellTable reference lowerCompletion).Nonnegative ∧ (thresholdCompletionCellTable reference upperCompletion).Nonnegative := by exact thresholdFlow_completionCellTables_nonnegative baseline hIdentification.1.2 reference have htablesNonnegative : lowerTable.Nonnegative ∧ upperTable.Nonnegative := by exact ⟨normalizedCompletionCellTable_nonnegative S reference lowerCompletion hrawNonnegative.1, normalizedCompletionCellTable_nonnegative S reference upperCompletion hrawNonnegative.2⟩ have htablesNormalized : lowerTable.Normalized ∧ upperTable.Normalized := by constructor · apply normalizedCompletionCellTable_normalized intro x hx apply (thresholdFlow_completionCellTables_total baseline hIdentification.1.2 reference x ?_).1 simpa [baseline, originalCompatibleBaseline] using baseline_principal_partition S x compatible.noDefiers hx · apply normalizedCompletionCellTable_normalized intro x hx apply (thresholdFlow_completionCellTables_total baseline hIdentification.1.2 reference x ?_).2 simpa [baseline, originalCompatibleBaseline] using baseline_principal_partition S x compatible.noDefiers hx have hpropensity : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1 := propensity_mem_unitInterval S let WL := canonicalThresholdCandidate S lowerTable hIdentification.2.1 hpropensity htablesNonnegative.1 htablesNormalized.1 let WU := canonicalThresholdCandidate S upperTable hIdentification.2.1 hpropensity htablesNonnegative.2 htablesNormalized.2 have hObservedLawLower : WL.slate.observedLaw = S.observedLaw := by apply canonicalThresholdCandidate_completion_observedLaw_eq S compatible.ivIndependence compatible.treatmentConsistency compatible.selectionExclusion compatible.outcomeExclusion compatible.instrumentOverlap compatible.noDefiers reference lowerCompletion hIdentification.2.1 hpropensity · exact hselectedMarginsLower · intro x s0 s1 y0 y1 simp [lowerCompletion, thresholdFlow, thresholdLatentCompletion, baseline, originalCompatibleBaseline] · intro x s0 s1 y0 y1 simp [lowerCompletion, thresholdFlow, thresholdLatentCompletion, baseline, originalCompatibleBaseline] · intro x hx have hc := thresholdLatentCompletion_complier_total baseline hIdentification.1.2 x (thresholdFlowLower (observableCapacities S.observedLaw) hIdentification.1.2 x) (thresholdFlow_spec baseline hIdentification.1.2 x).1 simpa [lowerCompletion, thresholdFlow, thresholdLatentCompletion, baseline, originalCompatibleBaseline] using hc · exact hIdentification.2.2.1 · exact hIdentification.2.2.2.1 have hObservedLawUpper : WU.slate.observedLaw = S.observedLaw := by apply canonicalThresholdCandidate_completion_observedLaw_eq S compatible.ivIndependence compatible.treatmentConsistency compatible.selectionExclusion compatible.outcomeExclusion compatible.instrumentOverlap compatible.noDefiers reference upperCompletion hIdentification.2.1 hpropensity · exact hselectedMarginsUpper · intro x s0 s1 y0 y1 simp [upperCompletion, thresholdFlow, thresholdLatentCompletion, baseline, originalCompatibleBaseline] · intro x s0 s1 y0 y1 simp [upperCompletion, thresholdFlow, thresholdLatentCompletion, baseline, originalCompatibleBaseline] · intro x hx have hc := thresholdLatentCompletion_complier_total baseline hIdentification.1.2 x (thresholdFlowUpper (observableCapacities S.observedLaw) hIdentification.1.2 x) (thresholdFlow_spec baseline hIdentification.1.2 x).2.2.1 simpa [upperCompletion, thresholdFlow, thresholdLatentCompletion, baseline, originalCompatibleBaseline] using hc · exact hIdentification.2.2.1 · exact hIdentification.2.2.2.1 have hOverlapLower : InstrumentOverlap WL.slate εZ := instrumentOverlap_of_observedLaw_eq S WL.slate εZ compatible.instrumentOverlap hObservedLawLower have hOverlapUpper : InstrumentOverlap WU.slate εZ := instrumentOverlap_of_observedLaw_eq S WU.slate εZ compatible.instrumentOverlap hObservedLawUpper have hPositiveLower : PositiveAggregateSurvivors (observableCapacities WL.slate.observedLaw) WL.slate.p := positiveAggregateSurvivors_of_observedLaw_eq S WL.slate compatible.positiveAggregateSurvivors hObservedLawLower have hPositiveUpper : PositiveAggregateSurvivors (observableCapacities WU.slate.observedLaw) WU.slate.p := positiveAggregateSurvivors_of_observedLaw_eq S WU.slate compatible.positiveAggregateSurvivors hObservedLawUpper have hconsistencyLower : TreatmentConsistency WL.slate ∧ SelectionExclusion WL.slate ∧ OutcomeExclusion WL.slate := by simpa [WL, lowerTable] using canonicalThresholdCandidate_consistency S lowerTable hIdentification.2.1 hpropensity htablesNonnegative.1 htablesNormalized.1 have hconsistencyUpper : TreatmentConsistency WU.slate ∧ SelectionExclusion WU.slate ∧ OutcomeExclusion WU.slate := by simpa [WU, upperTable] using canonicalThresholdCandidate_consistency S upperTable hIdentification.2.1 hpropensity htablesNonnegative.2 htablesNormalized.2 have hnoDefiersLower : NoDefiers WL.slate := by apply canonicalThresholdCandidate_noDefiers S lowerTable hIdentification.2.1 hpropensity htablesNonnegative.1 htablesNormalized.1 simpa [lowerTable] using normalizedCompletionCellTable_noDefiers S reference lowerCompletion have hnoDefiersUpper : NoDefiers WU.slate := by apply canonicalThresholdCandidate_noDefiers S upperTable hIdentification.2.1 hpropensity htablesNonnegative.2 htablesNormalized.2 simpa [upperTable] using normalizedCompletionCellTable_noDefiers S reference upperCompletion have htableDirections (completion : ∀ x, ThresholdLatentCompletion P S.observedLaw (observableCapacities S.observedLaw)) (hzero : ∀ x, 0 < S.p x → ∀ i, d x = true → (completion x).selectedOnlyUnderZero i = 0) (hone : ∀ x, 0 < S.p x → ∀ j, d x = false → (completion x).selectedOnlyUnderOne j = 0) : (∀ x y0 y1, d x = true → normalizedCompletionCellTable S reference completion x false true true false y0 y1 = 0) ∧ (∀ x y0 y1, d x = false → normalizedCompletionCellTable S reference completion x false true false true y0 y1 = 0) := by constructor · intro x y0 y1 hd by_cases hx : 0 < S.p x · simp [normalizedCompletionCellTable, hx, thresholdCompletionCellTable, hzero x hx y0 hd] · simp [normalizedCompletionCellTable, hx] · intro x y0 y1 hd by_cases hx : 0 < S.p x · simp [normalizedCompletionCellTable, hx, thresholdCompletionCellTable, hone x hx y1 hd] · simp [normalizedCompletionCellTable, hx] have hmonotoneLower : WeakSelectionMonotonicity WL.slate d := by apply canonicalThresholdCandidate_weakSelectionMonotonicity S lowerTable hIdentification.2.1 hpropensity htablesNonnegative.1 htablesNormalized.1 d · simpa [lowerTable] using (htableDirections lowerCompletion (by intro x hx i hd have hn : ¬ (observableCapacities S.observedLaw).gap x < 0 := by intro hg have := hIdentification.2.2.2.2.2.2.2.1 x hx hg simp [hd] at this simp [lowerCompletion, thresholdFlow, thresholdLatentCompletion, hn]) (by intro x hx j hd have hn : ¬ 0 < (observableCapacities S.observedLaw).gap x := by intro hg have := hIdentification.2.2.2.2.2.2.1 x hx hg simp [hd] at this simp [lowerCompletion, thresholdFlow, thresholdLatentCompletion, hn])).1 · simpa [lowerTable] using (htableDirections lowerCompletion (by intro x hx i hd have hn : ¬ (observableCapacities S.observedLaw).gap x < 0 := by intro hg have := hIdentification.2.2.2.2.2.2.2.1 x hx hg simp [hd] at this simp [lowerCompletion, thresholdFlow, thresholdLatentCompletion, hn] ) (by intro x hx j hd have hn : ¬ 0 < (observableCapacities S.observedLaw).gap x := by intro hg have := hIdentification.2.2.2.2.2.2.1 x hx hg simp [hd] at this simp [lowerCompletion, thresholdFlow, thresholdLatentCompletion, hn] )).2 have hmonotoneUpper : WeakSelectionMonotonicity WU.slate d := by apply canonicalThresholdCandidate_weakSelectionMonotonicity S upperTable hIdentification.2.1 hpropensity htablesNonnegative.2 htablesNormalized.2 d · simpa [upperTable] using (htableDirections upperCompletion (by intro x hx i hd have hn : ¬ (observableCapacities S.observedLaw).gap x < 0 := by intro hg have := hIdentification.2.2.2.2.2.2.2.1 x hx hg simp [hd] at this simp [upperCompletion, thresholdFlow, thresholdLatentCompletion, hn]) (by intro x hx j hd have hn : ¬ 0 < (observableCapacities S.observedLaw).gap x := by intro hg have := hIdentification.2.2.2.2.2.2.1 x hx hg simp [hd] at this simp [upperCompletion, thresholdFlow, thresholdLatentCompletion, hn])).1 -- … truncated; follow the source link for the rest …
CausalSmith.PartialID.SlateBenefitPartialTransport.full_law_endpoint_attainment · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:2646
theorem benefitProbabilityOf_eq_aggregate

The full-law objective is the cell-probability-weighted benefit mass of its projected survivor couplings, divided by their aggregate survivor mass. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
W :
FullLawCandidate P₀ 𝒳 K
hpositive :
0 < ∑ x, W.slate.p x * totalMass (fullLawSurvivorCoupling W x)
= (∑ x, W.slate.p x * benefitMass (fullLawSurvivorCoupling W x)) / (∑ x, W.slate.p x * totalMass (fullLawSurvivorCoupling W x))
Proof (Lean source)
theorem benefitProbabilityOf_eq_aggregate {P₀ : POSystem} (W : FullLawCandidate P₀ 𝒳 K) (hpositive : 0 < ∑ x, W.slate.p x * totalMass (fullLawSurvivorCoupling W x)) : benefitProbabilityOf W = (∑ x, W.slate.p x * benefitMass (fullLawSurvivorCoupling W x)) / (∑ x, W.slate.p x * totalMass (fullLawSurvivorCoupling W x)) := by letI : StandardBorelSpace W.system.Ω := W.slate.borel let A : Set W.system.Ω := {ω | W.slate.Y0 ω < W.slate.Y1 ω ∧ W.slate.S0 ω = true ∧ W.slate.S1 ω = true ∧ ω ∈ W.slate.complierEvent} let B : Set W.system.Ω := {ω | W.slate.S0 ω = true ∧ W.slate.S1 ω = true ∧ ω ∈ W.slate.complierEvent} have hA : MeasurableSet A := by dsimp [A] convert (((((W.slate.yVar.measurable_cfUnder W.slate.dVar false).prodMk (W.slate.yVar.measurable_cfUnder W.slate.dVar true)) (MeasurableSet.of_discrete : MeasurableSet {p : Fin K × Fin K | p.1 < p.2})).inter ((W.slate.sVar.measurable_cfUnder W.slate.dVar false) (measurableSet_singleton true))).inter ((W.slate.sVar.measurable_cfUnder W.slate.dVar true) (measurableSet_singleton true))).inter (measurableSet_complierEvent_local W) using 1 <;> ext ω <;> simp [POSlateSystem.Y0, POSlateSystem.Y1, POSlateSystem.S0, POSlateSystem.S1, POSlateSystem.YofD, POSlateSystem.SofD, and_assoc] have hB : MeasurableSet B := by dsimp [B] convert (((W.slate.sVar.measurable_cfUnder W.slate.dVar false) (measurableSet_singleton true)).inter ((W.slate.sVar.measurable_cfUnder W.slate.dVar true) (measurableSet_singleton true))).inter (measurableSet_complierEvent_local W) using 1 <;> ext ω <;> simp [POSlateSystem.S0, POSlateSystem.S1, POSlateSystem.SofD, and_assoc] have hnum : (∑ x, W.slate.p x * benefitMass (fullLawSurvivorCoupling W x)) = W.system.μ.real A := by simp_rw [fullLawSurvivorCoupling_benefit] exact sum_cellMass_mul_conditionalReal W A hA have hden : (∑ x, W.slate.p x * totalMass (fullLawSurvivorCoupling W x)) = W.system.μ.real B := by simp_rw [fullLawSurvivorCoupling_total] unfold survivorComplierMass exact sum_cellMass_mul_conditionalReal W B hB unfold benefitProbabilityOf conditionalReal change (if 0 < W.system.μ.real B then W.system.μ.real (A ∩ B) / W.system.μ.real B else 0) = _ rw [if_pos (hden ▸ hpositive)] have hAB : A ∩ B = A := by ext ω simp [A, B, and_assoc] rw [hAB, hnum, hden]
CausalSmith.PartialID.SlateBenefitPartialTransport.benefitProbabilityOf_eq_aggregate · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:3325
theorem fullLawSurvivorCoupling_mem_branchFree

Any compatible full law projects into the branch-free exact-mass polytope determined by its observed distribution. Given the stated hypotheses, the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P₀ :
W :
FullLawCandidate P₀ 𝒳 K
StandardBorelSpace W.system.Ω
εZ :
d :
𝒳 → Bool
model :
TieSafeSurvivorModel W.slate εZ d
x :
𝒳
hx :
0 < W.slate.p x
fullLawSurvivorCoupling W x ∈ branchFreePolytope (observableCapacities W.slate.observedLaw) (capacity_identification W.slate εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity).1.2 x
Proof (Lean source)
theorem fullLawSurvivorCoupling_mem_branchFree {P₀ : POSystem} (W : FullLawCandidate P₀ 𝒳 K) [StandardBorelSpace W.system.Ω] (εZ : ℝ) (d : 𝒳 → Bool) (model : TieSafeSurvivorModel W.slate εZ d) (x : 𝒳) (hx : 0 < W.slate.p x) : fullLawSurvivorCoupling W x ∈ branchFreePolytope (observableCapacities W.slate.observedLaw) (capacity_identification W.slate εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity).1.2 x := by let ident := capacity_identification W.slate εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity change matrixNonnegative (fullLawSurvivorCoupling W x) ∧ (∀ i, rowMass (fullLawSurvivorCoupling W x) i ≤ (observableCapacities W.slate.observedLaw).lower x i) ∧ (∀ j, columnMass (fullLawSurvivorCoupling W x) j ≤ (observableCapacities W.slate.observedLaw).upper x j) ∧ totalMass (fullLawSurvivorCoupling W x) = (observableCapacities W.slate.observedLaw).mass x refine ⟨?_, ?_, ?_, ?_⟩ · intro i j unfold fullLawSurvivorCoupling conditionalReal split_ifs <;> positivity · intro i rw [fullLawSurvivorCoupling_row_sum, ident.2.2.1 x hx i] unfold lowerLatentMass apply conditionalReal_mono_left_local intro ω hω exact ⟨hω.1, hω.2.1, hω.2.2.2⟩ · intro j rw [fullLawSurvivorCoupling_column_sum, ident.2.2.2.1 x hx j] unfold upperLatentMass apply conditionalReal_mono_left_local intro ω hω exact ⟨hω.1, hω.2.2.1, hω.2.2.2⟩ · rw [fullLawSurvivorCoupling_total, ident.2.2.2.2.2.1 x hx]
CausalSmith.PartialID.SlateBenefitPartialTransport.fullLawSurvivorCoupling_mem_branchFree · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:3379
theorem fullLawSurvivorCoupling_mem_branchFree_of_observedLaw_eq

Given the stated hypotheses, the full law survivor coupling belongs to branch free whenever observed law eq property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P Q :
S :
POSlateSystem P 𝒳 K
W :
StandardBorelSpace W.system.Ω
εZ :
d :
𝒳 → Bool
model :
TieSafeSurvivorModel W.slate εZ d
hlaw :
W.slate.observedLaw = S.observedLaw
hValid :
x :
𝒳
hx :
0 < S.p x
Proof (Lean source)
theorem fullLawSurvivorCoupling_mem_branchFree_of_observedLaw_eq {P Q : POSystem} (S : POSlateSystem P 𝒳 K) (W : FullLawCandidate Q 𝒳 K) [StandardBorelSpace W.system.Ω] (εZ : ℝ) (d : 𝒳 → Bool) (model : TieSafeSurvivorModel W.slate εZ d) (hlaw : W.slate.observedLaw = S.observedLaw) (hValid : ValidCapacities (observableCapacities S.observedLaw)) (x : 𝒳) (hx : 0 < S.p x) : fullLawSurvivorCoupling W x ∈ branchFreePolytope (observableCapacities S.observedLaw) hValid x := by have hp := (observedLaw_eq_transfers_p_propensity S W.slate hlaw).1 have hmem := fullLawSurvivorCoupling_mem_branchFree W εZ d model x (by rw [hp x] exact hx) change matrixNonnegative (fullLawSurvivorCoupling W x) ∧ (∀ i, rowMass (fullLawSurvivorCoupling W x) i ≤ (observableCapacities W.slate.observedLaw).lower x i) ∧ (∀ j, columnMass (fullLawSurvivorCoupling W x) j ≤ (observableCapacities W.slate.observedLaw).upper x j) ∧ totalMass (fullLawSurvivorCoupling W x) = (observableCapacities W.slate.observedLaw).mass x at hmem change matrixNonnegative (fullLawSurvivorCoupling W x) ∧ (∀ i, rowMass (fullLawSurvivorCoupling W x) i ≤ (observableCapacities S.observedLaw).lower x i) ∧ (∀ j, columnMass (fullLawSurvivorCoupling W x) j ≤ (observableCapacities S.observedLaw).upper x j) ∧ totalMass (fullLawSurvivorCoupling W x) = (observableCapacities S.observedLaw).mass x rw [hlaw] at hmem exact hmem
CausalSmith.PartialID.SlateBenefitPartialTransport.fullLawSurvivorCoupling_mem_branchFree_of_observedLaw_eq · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:3418
theorem full_law_branchFree_family_attainment

Given the stated hypotheses, the full law branch free family attainment property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
S :
POSlateSystem P 𝒳 K
εZ :
d :
𝒳 → Bool
compatible :
gamma :
∀ x : 𝒳, Coupling K
hgamma :
∀ x,
gamma x ∈ branchFreePolytope (observableCapacities S.observedLaw) (capacity_identification S εZ d compatible.ivIndependence compatible.treatmentConsistency compatible.selectionExclusion compatible.outcomeExclusion compatible.instrumentOverlap compatible.noDefiers compatible.weakSelectionMonotonicity).1.2 x
∃ W : FullLawCandidate P 𝒳 K,
FullLawFeasible S.observedLaw W
conclusion 1
x :
0 < S.p x
conclusion 2
= (∑ x, S.p x * benefitMass (gamma x)) / (observableCapacities S.observedLaw).aggregateMass S.p
Proof (Lean source)
theorem full_law_branchFree_family_attainment {P : POSystem} [StandardBorelSpace P.Ω] (S : POSlateSystem P 𝒳 K) (εZ : ℝ) (d : 𝒳 → Bool) (compatible : TieSafeSurvivorModel S εZ d) (gamma : ∀ x : 𝒳, Coupling K) (hgamma : ∀ x, gamma x ∈ branchFreePolytope (observableCapacities S.observedLaw) (capacity_identification S εZ d compatible.ivIndependence compatible.treatmentConsistency compatible.selectionExclusion compatible.outcomeExclusion compatible.instrumentOverlap compatible.noDefiers compatible.weakSelectionMonotonicity).1.2 x) : ∃ W : FullLawCandidate P 𝒳 K, FullLawFeasible S.observedLaw W ∧ (∀ x, 0 < S.p x → fullLawSurvivorCoupling W x = gamma x) ∧ benefitProbabilityOf W = (∑ x, S.p x * benefitMass (gamma x)) / (observableCapacities S.observedLaw).aggregateMass S.p := by let ident := capacity_identification S εZ d compatible.ivIndependence compatible.treatmentConsistency compatible.selectionExclusion compatible.outcomeExclusion compatible.instrumentOverlap compatible.noDefiers compatible.weakSelectionMonotonicity let c := observableCapacities S.observedLaw let baseline := originalCompatibleBaseline S εZ d compatible let reference : Fin K := ⟨0, lt_of_lt_of_le (by decide : 0 < 3) S.hK⟩ let completion := fun x => thresholdLatentCompletion baseline ident.1.2 x (gamma x) have hmargins : ∀ x, (∀ i, rowMass (completion x).survivor i + (completion x).selectedOnlyUnderZero i = c.lower x i) ∧ (∀ j, columnMass (completion x).survivor j + (completion x).selectedOnlyUnderOne j = c.upper x j) := by intro x change (∀ i, rowMass (gamma x) i + (thresholdLatentCompletion baseline ident.1.2 x (gamma x)).selectedOnlyUnderZero i = (observableCapacities S.observedLaw).lower x i) ∧ (∀ j, columnMass (gamma x) j + (thresholdLatentCompletion baseline ident.1.2 x (gamma x)).selectedOnlyUnderOne j = (observableCapacities S.observedLaw).upper x j) exact thresholdLatentCompletion_selected_margins baseline ident.1.2 x (gamma x) (hgamma x) have hraw : (thresholdCompletionCellTable reference completion).Nonnegative := by simpa [completion] using branchFree_completionCellTable_nonnegative baseline ident.1.2 reference gamma hgamma let table := normalizedCompletionCellTable S reference completion have htableNonnegative : table.Nonnegative := normalizedCompletionCellTable_nonnegative S reference completion hraw have htableNormalized : table.Normalized := by apply normalizedCompletionCellTable_normalized intro x hx apply branchFree_completionCellTable_total baseline ident.1.2 reference gamma hgamma simpa [baseline, originalCompatibleBaseline] using baseline_principal_partition S x compatible.noDefiers hx have hpropensity : ∀ x, 0 ≤ S.propensity x ∧ S.propensity x ≤ 1 := propensity_mem_unitInterval S let W := canonicalThresholdCandidate S table ident.2.1 hpropensity htableNonnegative htableNormalized have hobserved : W.slate.observedLaw = S.observedLaw := by apply canonicalThresholdCandidate_completion_observedLaw_eq S compatible.ivIndependence compatible.treatmentConsistency compatible.selectionExclusion compatible.outcomeExclusion compatible.instrumentOverlap compatible.noDefiers reference completion ident.2.1 hpropensity · exact hmargins · intro x s0 s1 y0 y1 simp [completion, baseline, originalCompatibleBaseline, thresholdLatentCompletion] · intro x s0 s1 y0 y1 simp [completion, baseline, originalCompatibleBaseline, thresholdLatentCompletion] · intro x hx have hc := thresholdLatentCompletion_complier_total baseline ident.1.2 x (gamma x) (hgamma x) change (∑ i, ∑ j, (completion x).survivor i j) + (∑ i, (completion x).selectedOnlyUnderZero i) + (∑ j, (completion x).selectedOnlyUnderOne j) + (completion x).neverSelectedMass = baseline.complierMass x simpa only [completion] using hc · exact ident.2.2.1 · exact ident.2.2.2.1 have hconsistency : TreatmentConsistency W.slate ∧ SelectionExclusion W.slate ∧ OutcomeExclusion W.slate := by simpa [W, table] using canonicalThresholdCandidate_consistency S table ident.2.1 hpropensity htableNonnegative htableNormalized have hnoDefiers : NoDefiers W.slate := by apply canonicalThresholdCandidate_noDefiers S table ident.2.1 hpropensity htableNonnegative htableNormalized simpa [table] using normalizedCompletionCellTable_noDefiers S reference completion have hdirections : (∀ x y0 y1, d x = true → table x false true true false y0 y1 = 0) ∧ (∀ x y0 y1, d x = false → table x false true false true y0 y1 = 0) := by constructor · intro x y0 y1 hd by_cases hx : 0 < S.p x · have hn : ¬ (observableCapacities S.observedLaw).gap x < 0 := by intro hg have := ident.2.2.2.2.2.2.2.1 x hx hg simp [hd] at this simp [table, normalizedCompletionCellTable, hx, completion, thresholdCompletionCellTable, thresholdLatentCompletion, hn] · simp [table, normalizedCompletionCellTable, hx] · intro x y0 y1 hd by_cases hx : 0 < S.p x · have hn : ¬ 0 < (observableCapacities S.observedLaw).gap x := by intro hg have := ident.2.2.2.2.2.2.1 x hx hg simp [hd] at this simp [table, normalizedCompletionCellTable, hx, completion, thresholdCompletionCellTable, thresholdLatentCompletion, hn] · simp [table, normalizedCompletionCellTable, hx] have hmonotone : WeakSelectionMonotonicity W.slate d := by apply canonicalThresholdCandidate_weakSelectionMonotonicity S table ident.2.1 hpropensity htableNonnegative htableNormalized d · exact hdirections.1 · exact hdirections.2 have hoverlap : InstrumentOverlap W.slate εZ := instrumentOverlap_of_observedLaw_eq S W.slate εZ compatible.instrumentOverlap hobserved have hpositive : PositiveAggregateSurvivors (observableCapacities W.slate.observedLaw) W.slate.p := positiveAggregateSurvivors_of_observedLaw_eq S W.slate compatible.positiveAggregateSurvivors hobserved letI : StandardBorelSpace W.system.Ω := W.slate.borel have hmodel : TieSafeSurvivorModel W.slate εZ d := by refine { ivIndependence := ?_ treatmentConsistency := hconsistency.1 selectionExclusion := hconsistency.2.1 outcomeExclusion := hconsistency.2.2 instrumentOverlap := hoverlap noDefiers := hnoDefiers weakSelectionMonotonicity := hmonotone positiveAggregateSurvivors := hpositive } simpa [W, table] using canonicalThresholdCandidate_ivIndependence S table ident.2.1 hpropensity htableNonnegative htableNormalized have hrealizes : ∀ x, 0 < S.p x → fullLawSurvivorCoupling W x = gamma x := by intro x hx have hr := canonicalThresholdCandidate_realizes_of_pos S reference completion ident.2.1 hpropensity htableNonnegative htableNormalized x hx change fullLawSurvivorCoupling W x = gamma x exact hr.1.trans (by rfl) have htableSurvivor : ∀ x, 0 < S.p x → tableSurvivorCoupling (table x) = gamma x := by intro x hx funext i j simp [table, normalizedCompletionCellTable, hx, completion, tableSurvivorCoupling, thresholdCompletionCellTable, thresholdLatentCompletion] have hmassTable : (∑ x, S.p x * totalMass (tableSurvivorCoupling (table x))) = c.aggregateMass S.p := by unfold Capacities.aggregateMass apply Finset.sum_congr rfl intro x _ by_cases hx : 0 < S.p x · rw [htableSurvivor x hx, (hgamma x).2.2.2] · have hx0 : S.p x = 0 := le_antisymm (not_lt.mp hx) (ident.2.1 x) simp [hx0] have hbenefitTable : (∑ x, S.p x * benefitMass (tableSurvivorCoupling (table x))) = ∑ x, S.p x * benefitMass (gamma x) := by apply Finset.sum_congr rfl intro x _ by_cases hx : 0 < S.p x · rw [htableSurvivor x hx] · have hx0 : S.p x = 0 := le_antisymm (not_lt.mp hx) (ident.2.1 x) simp [hx0] have hbenefit := canonicalThresholdCandidate_benefitProbabilityOf S table ident.2.1 hpropensity htableNonnegative htableNormalized (hmassTable.symm ▸ compatible.positiveAggregateSurvivors) refine ⟨W, ?_, hrealizes, ?_⟩ · exact ⟨εZ, d, hmodel, hobserved⟩ · simpa [W, c, hmassTable, hbenefitTable] using hbenefit
CausalSmith.PartialID.SlateBenefitPartialTransport.full_law_branchFree_family_attainment · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TFullLawEndpointAttainment.lean:3450
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.TLinearSparseThresholdFlow 1 declarations The implicit sparse endpoint couplings use linearly many arithmetic/comparison steps and positive entries; dense materialization is quadratic.

Linear sparse threshold-flow complexity

The implicit sparse endpoint couplings use linearly many arithmetic/comparison steps and positive entries; dense materialization is quadratic.

theorem linear_sparse_threshold_flow Theorem 7 in the paper ↗

The costed implementation evaluates the threshold formulas and constructs sparse endpoint flows in linear time. Materializing both dense matrices is quadratic. The absolute bounds are uniform over all capacity magnitudes. the stated conclusion follows.

Formal statement
∃ sparseConstant denseConstant : ℕ,
0 < sparseConstant
0 < denseConstant
conclusion 1
𝒳 :
Type*
Fintype 𝒳
K :
3 ≤ K
c :
Capacities 𝒳 K
hValid :
thresholdFlowActualCostFor c ≤ sparseConstant * card 𝒳 * K
thresholdFlowCostFor c hValid ≤ sparseConstant * card 𝒳 * K
denseThresholdFlowActualCostFor c ≤ denseConstant * card 𝒳 * K ^ 2
denseThresholdFlowCostFor c hValid ≤ denseConstant * card 𝒳 * K ^ 2
x :
run :
run.value.1 = (c.benefitLower x, c.benefitUpper x)
run.value.2.1 = thresholdFlowLowerSparse c hValid x
run.value.2.2 = thresholdFlowUpperSparse c hValid x
positiveSupportCard (thresholdFlowLower c hValid x) ≤ 2 * K - 1
positiveSupportCard (thresholdFlowUpper c hValid x) ≤ 2 * K - 1
thresholdFlowLower c hValid x ∈ branchFreePolytope c hValid x
benefitMass (thresholdFlowLower c hValid x) = c.benefitLower x
thresholdFlowUpper c hValid x ∈ branchFreePolytope c hValid x
benefitMass (thresholdFlowUpper c hValid x) = c.benefitUpper x
Proof (Lean source)
-- @node: thm:linear-sparse-threshold-flow theorem linear_sparse_threshold_flow : ∃ sparseConstant denseConstant : ℕ, 0 < sparseConstant ∧ 0 < denseConstant ∧ ∀ {𝒳 : Type*} [Fintype 𝒳] [DecidableEq 𝒳] {K : ℕ}, 3 ≤ K → ∀ c : Capacities 𝒳 K, ∀ hValid : ValidCapacities c, thresholdFlowActualCostFor c ≤ sparseConstant * card 𝒳 * K ∧ thresholdFlowCostFor c hValid ≤ sparseConstant * card 𝒳 * K ∧ denseThresholdFlowActualCostFor c ≤ denseConstant * card 𝒳 * K ^ 2 ∧ denseThresholdFlowCostFor c hValid ≤ denseConstant * card 𝒳 * K ^ 2 ∧ (∀ (c' : Capacities 𝒳 K) (hValid' : ValidCapacities c'), thresholdFlowCostFor c hValid = thresholdFlowCostFor c' hValid' ∧ denseThresholdFlowCostFor c hValid = denseThresholdFlowCostFor c' hValid') ∧ (∀ x, let run := costedSparseThresholdFlow c hValid x run.value.1 = (c.benefitLower x, c.benefitUpper x) ∧ run.value.2.1 = thresholdFlowLowerSparse c hValid x ∧ run.value.2.2 = thresholdFlowUpperSparse c hValid x ∧ positiveSupportCard (thresholdFlowLower c hValid x) ≤ 2 * K - 1 ∧ positiveSupportCard (thresholdFlowUpper c hValid x) ≤ 2 * K - 1 ∧ thresholdFlowLower c hValid x ∈ branchFreePolytope c hValid x ∧ benefitMass (thresholdFlowLower c hValid x) = c.benefitLower x ∧ thresholdFlowUpper c hValid x ∈ branchFreePolytope c hValid x ∧ benefitMass (thresholdFlowUpper c hValid x) = c.benefitUpper x) := by refine ⟨75, 77, by omega, by omega, ?_⟩ intro 𝒳 _ _ K hK c hValid letI : MeasurableSpace 𝒳 := ⊤ have hCell : sparseCellOperationBudget K ≤ 75 * K := by simp [sparseCellOperationBudget] omega have hActual : thresholdFlowActualCostFor c ≤ 75 * card 𝒳 * K := by rw [thresholdFlowActualCostFor] calc (∑ x, sparseCellActualOperations c x) ≤ ∑ _x : 𝒳, sparseCellOperationBudget K := Finset.sum_le_sum fun x _ => sparseCellActualOperations_le_budget hK c x _ ≤ ∑ _x : 𝒳, 75 * K := Finset.sum_le_sum fun _ _ => hCell _ = 75 * card 𝒳 * K := by simp [mul_assoc, mul_left_comm, mul_comm] have hFixed : thresholdFlowCostFor c hValid ≤ 75 * card 𝒳 * K := by rw [thresholdFlowCostFor] calc (∑ x, (costedSparseThresholdFlow c hValid x).operations) = ∑ _x : 𝒳, sparseCellOperationBudget K := by apply Finset.sum_congr rfl intro x hx rfl _ ≤ ∑ _x : 𝒳, 75 * K := Finset.sum_le_sum fun _ _ => hCell _ = 75 * card 𝒳 * K := by simp [mul_assoc, mul_left_comm, mul_comm] have hKsq : K ≤ K ^ 2 := by rw [pow_two] have hOne : 1 ≤ K := by omega simpa using Nat.mul_le_mul_left K hOne have hActualQuad : thresholdFlowActualCostFor c ≤ 75 * card 𝒳 * K ^ 2 := hActual.trans (Nat.mul_le_mul_left (75 * card 𝒳) hKsq) have hFixedQuad : thresholdFlowCostFor c hValid ≤ 75 * card 𝒳 * K ^ 2 := hFixed.trans (Nat.mul_le_mul_left (75 * card 𝒳) hKsq) refine ⟨hActual, hFixed, ?_, ?_, ?_, ?_⟩ · unfold denseThresholdFlowActualCostFor calc thresholdFlowActualCostFor c + 2 * card 𝒳 * K ^ 2 ≤ 75 * card 𝒳 * K ^ 2 + 2 * card 𝒳 * K ^ 2 := Nat.add_le_add_right hActualQuad _ _ = 77 * card 𝒳 * K ^ 2 := by ring · unfold denseThresholdFlowCostFor costedDenseThresholdFlow dsimp only [Costed.operations] calc thresholdFlowCostFor c hValid + 2 * card 𝒳 * K ^ 2 ≤ 75 * card 𝒳 * K ^ 2 + 2 * card 𝒳 * K ^ 2 := Nat.add_le_add_right hFixedQuad _ _ = 77 * card 𝒳 * K ^ 2 := by ring · intro c' hValid' constructor <;> simp [thresholdFlowCostFor, costedSparseThresholdFlow, denseThresholdFlowCostFor, costedDenseThresholdFlow] · intro x have hendpoint := thresholdFlow_endpoint_spec c hValid x dsimp only [costedSparseThresholdFlow, Costed.value] exact ⟨costedThresholdCuts_value c x, rfl, rfl, thresholdFlowLower_positiveSupportCard_le hK c hValid x, thresholdFlowUpper_positiveSupportCard_le hK c hValid x, hendpoint.1, hendpoint.2.1, hendpoint.2.2.1, hendpoint.2.2.2⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.linear_sparse_threshold_flow · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TLinearSparseThresholdFlow.lean:12
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.TNoSelectionReduction 5 declarations On the no-selection submodel, survivor-complier capacities are complete marginals and the threshold formulas reduce to the cited ordinal formulas.

Reduction to fixed-marginal ordinal benefit bounds

On the no-selection submodel, survivor-complier capacities are complete marginals and the threshold formulas reduce to the cited ordinal formulas.

def NoSelectionSubmodel

The no selection submodel condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
x :
0 < conditionalReal P.μ S.complierEvent (S.xEvent x)
NoSelectionSubmodel S :
Prop
conditionalReal P.μ {ω | S.SofD false ω = true ∧ S.SofD true ω = true ∧ ω ∈ S.complierEvent} (S.complierEvent ∩ S.xEvent x)
= 1
CausalSmith.PartialID.SlateBenefitPartialTransport.NoSelectionSubmodel · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TNoSelectionReduction.lean:19
theorem selectedComplierMass_eq_complierMass_of_noSelection

Given the stated hypotheses, the selected complier mass equals complier mass whenever no selection property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
hNoSelection :
x :
𝒳
conclusion 1
selectedComplierMass S false x = conditionalReal P.μ S.complierEvent (S.xEvent x)
conclusion 2
selectedComplierMass S true x = conditionalReal P.μ S.complierEvent (S.xEvent x)
Proof (Lean source)
theorem selectedComplierMass_eq_complierMass_of_noSelection (S : POSlateSystem P 𝒳 K) (hNoSelection : NoSelectionSubmodel S) (x : 𝒳) : selectedComplierMass S false x = conditionalReal P.μ S.complierEvent (S.xEvent x) ∧ selectedComplierMass S true x = conditionalReal P.μ S.complierEvent (S.xEvent x) := by let B : Set P.Ω := S.xEvent x let C : Set P.Ω := S.complierEvent let A0 : Set P.Ω := {w | S.SofD false w = true} let A1 : Set P.Ω := {w | S.SofD true w = true} change conditionalReal P.μ (A0 ∩ C) B = conditionalReal P.μ C B ∧ conditionalReal P.μ (A1 ∩ C) B = conditionalReal P.μ C B by_cases hB : 0 < P.μ.real B · have hcond : conditionalReal P.μ C B = P.μ.real (C ∩ B) / P.μ.real B := by simp [conditionalReal, hB] by_cases hC : 0 < conditionalReal P.μ C B · have hCB : 0 < P.μ.real (C ∩ B) := by rw [hcond] at hC rcases div_pos_iff.mp hC with hpos | hneg · exact hpos.1 · linarith [hneg.2, hB] have hsurv := hNoSelection x hC have hsurv' : P.μ.real ((A0 ∩ A1 ∩ C) ∩ (C ∩ B)) = P.μ.real (C ∩ B) := by unfold conditionalReal at hsurv rw [if_pos hCB] at hsurv apply (div_eq_one_iff_eq (ne_of_gt hCB)).mp have hset : {w | S.SofD false w = true ∧ S.SofD true w = true ∧ w ∈ S.complierEvent} ∩ (S.complierEvent ∩ S.xEvent x) = (A0 ∩ A1 ∩ C) ∩ (C ∩ B) := by ext w simp [A0, A1, C, B, and_assoc, and_left_comm, and_comm] rw [hset] at hsurv exact hsurv have hsurv0 : (A0 ∩ A1 ∩ C) ∩ (C ∩ B) ⊆ (A0 ∩ C) ∩ B := by intro w hw exact ⟨⟨hw.1.1.1, hw.1.2⟩, hw.2.2⟩ have hsurv1 : (A0 ∩ A1 ∩ C) ∩ (C ∩ B) ⊆ (A1 ∩ C) ∩ B := by intro w hw exact ⟨⟨hw.1.1.2, hw.1.2⟩, hw.2.2⟩ have hsel0 : P.μ.real ((A0 ∩ C) ∩ B) = P.μ.real (C ∩ B) := le_antisymm (measureReal_mono (by intro w hw; exact ⟨hw.1.2, hw.2⟩)) (hsurv' ▸ measureReal_mono hsurv0) have hsel1 : P.μ.real ((A1 ∩ C) ∩ B) = P.μ.real (C ∩ B) := le_antisymm (measureReal_mono (by intro w hw; exact ⟨hw.1.2, hw.2⟩)) (hsurv' ▸ measureReal_mono hsurv1) unfold conditionalReal simp only [hB, if_pos] exact ⟨congrArg (fun z => z / P.μ.real B) hsel0, congrArg (fun z => z / P.μ.real B) hsel1⟩ · have hC0 : conditionalReal P.μ C B = 0 := le_antisymm (not_lt.mp hC) (by rw [hcond]; positivity) have hCB0 : P.μ.real (C ∩ B) = 0 := by rw [hcond] at hC0 exact (div_eq_zero_iff.mp hC0).resolve_right (ne_of_gt hB) have hsel0 : P.μ.real ((A0 ∩ C) ∩ B) = 0 := le_antisymm (hCB0 ▸ measureReal_mono (by intro w hw; exact ⟨hw.1.2, hw.2⟩)) (by positivity) have hsel1 : P.μ.real ((A1 ∩ C) ∩ B) = 0 := le_antisymm (hCB0 ▸ measureReal_mono (by intro w hw; exact ⟨hw.1.2, hw.2⟩)) (by positivity) rw [hC0] unfold conditionalReal rw [if_pos hB, if_pos hB] exact ⟨by rw [hsel0, zero_div], by rw [hsel1, zero_div]⟩ · simp [conditionalReal, hB]
CausalSmith.PartialID.SlateBenefitPartialTransport.selectedComplierMass_eq_complierMass_of_noSelection · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TNoSelectionReduction.lean:27
theorem finset_sup'_div_pos

Given the stated hypotheses, the finset sup' div pos property holds.

Formal statement
I :
s :
hs :
s.Nonempty
f :
I → ℝ
m :
hm :
0 < m
s.sup' hs f / m = s.sup' hs (fun i => f i / m)
Proof (Lean source)
theorem finset_sup'_div_pos {I : Type*} [DecidableEq I] (s : Finset I) (hs : s.Nonempty) (f : I → ℝ) {m : ℝ} (hm : 0 < m) : s.sup' hs f / m = s.sup' hs (fun i => f i / m) := by apply le_antisymm · apply (div_le_iff₀ hm).2 apply Finset.sup'_le hs intro i hi have h := Finset.le_sup' (fun i => f i / m) hi have hi' : f i ≤ s.sup' hs (fun i => f i / m) * m := (div_le_iff₀ hm).1 h simpa [mul_comm] using hi' · apply Finset.sup'_le hs intro i hi exact (div_le_div_iff_of_pos_right hm).2 (Finset.le_sup' f hi)
CausalSmith.PartialID.SlateBenefitPartialTransport.finset_sup'_div_pos · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TNoSelectionReduction.lean:97
theorem finset_inf'_div_pos

Given the stated hypotheses, the finset inf' div pos property holds.

Formal statement
I :
s :
hs :
s.Nonempty
f :
I → ℝ
m :
hm :
0 < m
s.inf' hs f / m = s.inf' hs (fun i => f i / m)
Proof (Lean source)
theorem finset_inf'_div_pos {I : Type*} [DecidableEq I] (s : Finset I) (hs : s.Nonempty) (f : I → ℝ) {m : ℝ} (hm : 0 < m) : s.inf' hs f / m = s.inf' hs (fun i => f i / m) := by apply le_antisymm · apply Finset.le_inf' hs intro i hi exact (div_le_div_iff_of_pos_right hm).2 (Finset.inf'_le f hi) · apply (le_div_iff₀ hm).2 apply Finset.le_inf' hs intro i hi have h := Finset.inf'_le (fun i => f i / m) hi exact (le_div_iff₀ hm).1 h
CausalSmith.PartialID.SlateBenefitPartialTransport.finset_inf'_div_pos · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TNoSelectionReduction.lean:113
theorem no_selection_reduction Theorem 4 in the paper ↗

Conditional on the cited fixed-marginal theorem, the no-selection submodel has zero capacity gap and the full coupling polytope in every supported cell, including zero-complier-mass cells. The normalized strict-benefit formulas are asserted when the cell mass is positive. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
εZ :
d :
𝒳 → Bool
_hIV :
_hNoDefiers :
model :
_hNoSelection :
_hOrdinalFixedMarginalStrictBenefit_of_gate :
c :
observableCapacities S.observedLaw
hIdentification :
capacity_identification S εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity
hValid :
hIdentification.1.2 (: ValidCapacities c)
x :
0 < S.p x
c.gap x = 0
branchFreePolytope c hValid x = tiePolytope c hValid x
0 < c.mass x
c.benefitLower x / c.mass x
= max 0 (Finset.univ.sup' univ_nonempty (fun t : Option (Fin K) => match t with | none => 0 | some k => (c.lowerLe x k - c.upperLe x k) / c.mass x))
c.benefitUpper x / c.mass x
= Finset.univ.inf' univ_nonempty (fun t : Option (Fin K) => match t with | none => 1 | some k => (c.lowerLt x k + c.upperGt x k) / c.mass x)
Proof (Lean source)
-- @node: thm:no-selection-reduction theorem no_selection_reduction (S : POSlateSystem P 𝒳 K) (εZ : ℝ) (d : 𝒳 → Bool) (_hIV : IVIndependence S) (_hNoDefiers : NoDefiers S) (model : TieSafeSurvivorModel S εZ d) (_hNoSelection : NoSelectionSubmodel S) (_hOrdinalFixedMarginalStrictBenefit_of_gate : OrdinalFixedMarginalStrictBenefit) : let c := observableCapacities S.observedLaw let hIdentification := capacity_identification S εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity let hValid : ValidCapacities c := hIdentification.1.2 ∀ x, 0 < S.p x → c.gap x = 0 ∧ branchFreePolytope c hValid x = tiePolytope c hValid x ∧ (0 < c.mass x → c.benefitLower x / c.mass x = max 0 (Finset.univ.sup' univ_nonempty (fun t : Option (Fin K) => match t with | none => 0 | some k => (c.lowerLe x k - c.upperLe x k) / c.mass x)) ∧ c.benefitUpper x / c.mass x = Finset.univ.inf' univ_nonempty (fun t : Option (Fin K) => match t with | none => 1 | some k => (c.lowerLt x k + c.upperGt x k) / c.mass x)) := by dsimp let ident := capacity_identification S εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity intro x hp have hmasses := selectedComplierMass_eq_complierMass_of_noSelection S _hNoSelection x have hgapIdent := ident.2.2.2.2.1 x hp have hgap : (observableCapacities S.observedLaw).gap x = 0 := by rw [hmasses.2, hmasses.1] at hgapIdent linarith have hValid : ValidCapacities (observableCapacities S.observedLaw) := ident.1.2 refine ⟨hgap, branchFree_eq_tie_of_gap_zero _ hValid x hgap, ?_⟩ intro hm constructor · rw [Capacities.benefitLower, finset_sup'_div_pos _ _ _ hm] change Finset.univ.sup' univ_nonempty (fun t : Option (Fin K) => (match t with | none => 0 | some k => (observableCapacities S.observedLaw).lowerLe x k - (observableCapacities S.observedLaw).upperLe x k + min ((observableCapacities S.observedLaw).gap x) 0) / (observableCapacities S.observedLaw).mass x) = _ simp only [hgap, min_eq_left (le_refl 0), add_zero] have hzero : (0 : ℝ) ≤ Finset.univ.sup' univ_nonempty (fun t : Option (Fin K) => match t with | none => 0 | some k => ((observableCapacities S.observedLaw).lowerLe x k - (observableCapacities S.observedLaw).upperLe x k) / (observableCapacities S.observedLaw).mass x) := by exact Finset.le_sup' (fun t : Option (Fin K) => match t with | none => 0 | some k => ((observableCapacities S.observedLaw).lowerLe x k - (observableCapacities S.observedLaw).upperLe x k) / (observableCapacities S.observedLaw).mass x) (Finset.mem_univ (none : Option (Fin K))) rw [max_eq_right hzero] apply congrArg (Finset.univ.sup' univ_nonempty) funext t cases t <;> simp [add_zero, zero_div] · rw [Capacities.benefitUpper, finset_inf'_div_pos _ _ _ hm] apply congrArg (Finset.univ.inf' univ_nonempty) funext t cases t with | none => change (observableCapacities S.observedLaw).mass x / (observableCapacities S.observedLaw).mass x = 1 exact div_self (ne_of_gt hm) | some k => rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.no_selection_reduction · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TNoSelectionReduction.lean:127
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.TSharpExactMassThresholdInterval 1 declarations The cellwise exact-mass projection, sharp threshold cut values, and aggregate identified interval are stated together.

Sharp exact-mass threshold interval

The cellwise exact-mass projection, sharp threshold cut values, and aggregate identified interval are stated together.

theorem sharp_exact_mass_threshold_interval Theorem 5 in the paper ↗

Every compatible law projects exactly onto the exact-mass capacity polytope; the sharp cellwise extrema are the threshold cuts, and aggregation gives the closed endpoint interval with zero contribution from zero-survivor cells. the stated conclusion follows.

Formal statement
𝒳 :
Type uCell
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
εZ :
d :
𝒳 → Bool
model :
c :
observableCapacities S.observedLaw
hIdentification :
capacity_identification S εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity
hValid :
hIdentification.1.2 (: ValidCapacities c)
hp :
hIdentification.2.1 (: ∀ x, 0 ≤ S.p x)
hMass :
model.positiveAggregateSurvivors (: 0 < c.aggregateMass S.p)
x :
0 < S.p x
{γ | ∃ W : FullLawCandidate P 𝒳 K, FullLawFeasible S.observedLaw W ∧ γ = fullLawSurvivorCoupling W x}
= branchFreePolytope c hValid x
x :
0 < S.p x
0 < c.gap x
branchFreePolytope c hValid x = incPolytope c hValid x
c.gap x < 0
branchFreePolytope c hValid x = decPolytope c hValid x
c.gap x = 0
branchFreePolytope c hValid x = tiePolytope c hValid x
x :
0 < S.p x
sInf (benefitMass '' branchFreePolytope c hValid x) = c.benefitLower x
sSup (benefitMass '' branchFreePolytope c hValid x) = c.benefitUpper x
x :
c.mass x = 0
branchFreePolytope c hValid x = {0}
IdentifiedInterval (fun W : FullLawCandidate P 𝒳 K => benefitProbabilityOf W) (fun W : FullLawCandidate P 𝒳 K => FullLawFeasible S.observedLaw W)
= c.identifiedIcc S.p S.observedLaw rfl (p_eq_observedCellWeights S) hValid hp hMass (observedLawDomain S)
x :
0 < S.p x
thresholdFlowLower c hValid x ∈ branchFreePolytope c hValid x
benefitMass (thresholdFlowLower c hValid x) = c.benefitLower x
thresholdFlowUpper c hValid x ∈ branchFreePolytope c hValid x
benefitMass (thresholdFlowUpper c hValid x) = c.benefitUpper x
Proof (Lean source)
-- @node: thm:sharp-exact-mass-threshold-interval theorem sharp_exact_mass_threshold_interval (S : POSlateSystem P 𝒳 K) (εZ : ℝ) (d : 𝒳 → Bool) (model : TieSafeSurvivorModel S εZ d) : let c := observableCapacities S.observedLaw let hIdentification := capacity_identification S εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity let hValid : ValidCapacities c := hIdentification.1.2 let hp : ∀ x, 0 ≤ S.p x := hIdentification.2.1 let hMass : 0 < c.aggregateMass S.p := model.positiveAggregateSurvivors (∀ x, 0 < S.p x → {γ | ∃ W : FullLawCandidate P 𝒳 K, FullLawFeasible S.observedLaw W ∧ γ = fullLawSurvivorCoupling W x} = branchFreePolytope c hValid x) ∧ (∀ x, 0 < S.p x → (0 < c.gap x → branchFreePolytope c hValid x = incPolytope c hValid x) ∧ (c.gap x < 0 → branchFreePolytope c hValid x = decPolytope c hValid x) ∧ (c.gap x = 0 → branchFreePolytope c hValid x = tiePolytope c hValid x)) ∧ (∀ x, 0 < S.p x → sInf (benefitMass '' branchFreePolytope c hValid x) = c.benefitLower x ∧ sSup (benefitMass '' branchFreePolytope c hValid x) = c.benefitUpper x) ∧ (∀ x, c.mass x = 0 → branchFreePolytope c hValid x = {0}) ∧ IdentifiedInterval (fun W : FullLawCandidate P 𝒳 K => benefitProbabilityOf W) (fun W : FullLawCandidate P 𝒳 K => FullLawFeasible S.observedLaw W) = c.identifiedIcc S.p S.observedLaw rfl (p_eq_observedCellWeights S) hValid hp hMass (observedLawDomain S) ∧ (∀ x, 0 < S.p x → thresholdFlowLower c hValid x ∈ branchFreePolytope c hValid x ∧ benefitMass (thresholdFlowLower c hValid x) = c.benefitLower x ∧ thresholdFlowUpper c hValid x ∈ branchFreePolytope c hValid x ∧ benefitMass (thresholdFlowUpper c hValid x) = c.benefitUpper x) := by dsimp only let ident := capacity_identification S εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity let c := observableCapacities S.observedLaw have hValid : ValidCapacities c := ident.1.2 have hp : ∀ x, 0 ≤ S.p x := ident.2.1 refine ⟨?_, ?_, ?_, ?_, ?_, ?_⟩ · intro x hx ext γ constructor · rintro ⟨W, hW, rfl⟩ rcases hW with ⟨εW, dW, modelW, hlaw⟩ letI : StandardBorelSpace W.system.Ω := W.slate.borel exact fullLawSurvivorCoupling_mem_branchFree_of_observedLaw_eq S W εW dW modelW hlaw hValid x hx · intro hγ let gammaFamily : ∀ y : 𝒳, Coupling K := fun y => if y = x then γ else thresholdFlowLower c hValid y have hgammaFamily : ∀ y, gammaFamily y ∈ branchFreePolytope c hValid y := by intro y by_cases hy : y = x · subst y simpa [gammaFamily] using hγ · simpa [gammaFamily, hy] using (thresholdFlow_endpoint_spec c hValid y).1 obtain ⟨W, hfeas, hrealizes, _hbenefit⟩ := full_law_branchFree_family_attainment S εZ d model gammaFamily hgammaFamily refine ⟨W, hfeas, ?_⟩ have hr := hrealizes x hx simpa [gammaFamily] using hr.symm · intro x _hx constructor · intro hgap have hq : c.q0 x ≤ c.q1 x := by unfold Capacities.gap at hgap linarith ext γ constructor · intro hγ exact ⟨hγ.1, branchFree_exact_rows_of_q0_le_q1 c hValid x hq hγ, hγ.2.2.1⟩ · intro hγ change matrixNonnegative γ ∧ (∀ i, rowMass γ i ≤ c.lower x i) ∧ (∀ j, columnMass γ j ≤ c.upper x j) ∧ totalMass γ = c.mass x refine ⟨hγ.1, fun i => (hγ.2.1 i).le, hγ.2.2, ?_⟩ rw [← sum_rowMass_eq_totalMass] calc (∑ i, rowMass γ i) = c.q0 x := by exact Finset.sum_congr rfl fun i _ => hγ.2.1 i _ = c.mass x := by simp [Capacities.mass, min_eq_left hq] constructor · intro hgap have hq : c.q1 x ≤ c.q0 x := by unfold Capacities.gap at hgap linarith ext γ constructor · intro hγ exact ⟨hγ.1, hγ.2.1, branchFree_exact_columns_of_q1_le_q0 c hValid x hq hγ⟩ · intro hγ change matrixNonnegative γ ∧ (∀ i, rowMass γ i ≤ c.lower x i) ∧ (∀ j, columnMass γ j ≤ c.upper x j) ∧ totalMass γ = c.mass x refine ⟨hγ.1, hγ.2.1, fun j => (hγ.2.2 j).le, ?_⟩ rw [← sum_columnMass_eq_totalMass] calc (∑ j, columnMass γ j) = c.q1 x := by exact Finset.sum_congr rfl fun j _ => hγ.2.2 j _ = c.mass x := by simp [Capacities.mass, min_eq_right hq] · exact branchFree_eq_tie_of_gap_zero c hValid x · intro x _hx have hflow := thresholdFlow_endpoint_spec c hValid x constructor · apply le_antisymm · apply csInf_le · refine ⟨c.benefitLower x, ?_⟩ intro y hy rcases hy with ⟨γ, hγ, rfl⟩ exact branchFree_lower_le_benefitMass c hValid x hγ · exact ⟨thresholdFlowLower c hValid x, hflow.1, hflow.2.1⟩ · apply le_csInf · exact ⟨c.benefitLower x, thresholdFlowLower c hValid x, hflow.1, hflow.2.1⟩ · intro y hy rcases hy with ⟨γ, hγ, rfl⟩ exact branchFree_lower_le_benefitMass c hValid x hγ · apply le_antisymm · apply csSup_le · exact ⟨c.benefitUpper x, thresholdFlowUpper c hValid x, hflow.2.2.1, hflow.2.2.2⟩ · intro y hy rcases hy with ⟨γ, hγ, rfl⟩ exact branchFree_benefitMass_le_upper c hValid x hγ · apply le_csSup · refine ⟨c.benefitUpper x, ?_⟩ intro y hy rcases hy with ⟨γ, hγ, rfl⟩ exact branchFree_benefitMass_le_upper c hValid x hγ · exact ⟨thresholdFlowUpper c hValid x, hflow.2.2.1, hflow.2.2.2⟩ · intro x hmass exact branchFreePolytope_eq_singleton_zero_of_mass_eq_zero c hValid x hmass · let L := (c.endpointMap S.p S.observedLaw rfl (p_eq_observedCellWeights S) hValid hp model.positiveAggregateSurvivors (observedLawDomain S)).endpoints.1 let U := (c.endpointMap S.p S.observedLaw rfl (p_eq_observedCellWeights S) hValid hp model.positiveAggregateSurvivors (observedLawDomain S)).endpoints.2 have hcellLU : ∀ x, c.benefitLower x ≤ c.benefitUpper x := by intro x have hflow := thresholdFlow_endpoint_spec c hValid x rw [← hflow.2.1] exact branchFree_benefitMass_le_upper c hValid x hflow.1 have hsumLU : (∑ x, S.p x * c.benefitLower x) ≤ ∑ x, S.p x * c.benefitUpper x := by exact Finset.sum_le_sum fun x _ => mul_le_mul_of_nonneg_left (hcellLU x) (hp x) have hLU : L ≤ U := by dsimp [L, U, Capacities.endpointMap] exact (div_le_div_iff_of_pos_right model.positiveAggregateSurvivors).2 hsumLU have houter : IdentifiedInterval (fun W : FullLawCandidate P 𝒳 K => benefitProbabilityOf W) (fun W : FullLawCandidate P 𝒳 K => FullLawFeasible S.observedLaw W) ⊆ Icc L U := by rintro _ ⟨Wsub, rfl⟩ let W := Wsub.1 have hW : FullLawFeasible S.observedLaw W := Wsub.2 rcases hW with ⟨εW, dW, modelW, hlaw⟩ letI : StandardBorelSpace W.system.Ω := W.slate.borel have hpW : ∀ x, W.slate.p x = S.p x := (observedLaw_eq_transfers_p_propensity S W.slate hlaw).1 have hproj : ∀ x, 0 < S.p x → fullLawSurvivorCoupling W x ∈ branchFreePolytope c hValid x := by intro x hx exact fullLawSurvivorCoupling_mem_branchFree_of_observedLaw_eq S W εW dW modelW hlaw hValid x hx have hden : (∑ x, W.slate.p x * totalMass (fullLawSurvivorCoupling W x)) = c.aggregateMass S.p := by unfold Capacities.aggregateMass apply Finset.sum_congr rfl intro x _ rw [hpW x] by_cases hx : 0 < S.p x · rw [(hproj x hx).2.2.2] · have hx0 : S.p x = 0 := le_antisymm (not_lt.mp hx) (hp x) simp [hx0] have hobj := benefitProbabilityOf_eq_aggregate W (hden.symm ▸ model.positiveAggregateSurvivors) rw [hden] at hobj have hnumLower : (∑ x, S.p x * c.benefitLower x) ≤ ∑ x, W.slate.p x * benefitMass (fullLawSurvivorCoupling W x) := by apply Finset.sum_le_sum intro x _ rw [hpW x] by_cases hx : 0 < S.p x · exact mul_le_mul_of_nonneg_left (branchFree_lower_le_benefitMass c hValid x (hproj x hx)) (hp x) · have hx0 : S.p x = 0 := le_antisymm (not_lt.mp hx) (hp x) simp [hx0] have hnumUpper : (∑ x, W.slate.p x * benefitMass (fullLawSurvivorCoupling W x)) ≤ ∑ x, S.p x * c.benefitUpper x := by apply Finset.sum_le_sum intro x _ rw [hpW x] by_cases hx : 0 < S.p x · exact mul_le_mul_of_nonneg_left (branchFree_benefitMass_le_upper c hValid x (hproj x hx)) (hp x) · have hx0 : S.p x = 0 := le_antisymm (not_lt.mp hx) (hp x) simp [hx0] change benefitProbabilityOf W ∈ Icc L U rw [hobj] constructor · dsimp [L, Capacities.endpointMap] exact (div_le_div_iff_of_pos_right model.positiveAggregateSurvivors).2 hnumLower · dsimp [U, Capacities.endpointMap] exact (div_le_div_iff_of_pos_right model.positiveAggregateSurvivors).2 hnumUpper apply Set.Subset.antisymm · simpa [L, U, Capacities.identifiedIcc, Capacities.endpointMap] using houter · intro y hy change L ≤ y ∧ y ≤ U at hy by_cases hEq : L = U · have hyL : y = L := by linarith let gamma : ∀ x : 𝒳, Coupling K := fun x => thresholdFlowLower c hValid x have hgamma : ∀ x, gamma x ∈ branchFreePolytope c hValid x := by intro x exact (thresholdFlow_endpoint_spec c hValid x).1 obtain ⟨W, hfeas, _hrealizes, hbenefit⟩ := full_law_branchFree_family_attainment S εZ d model gamma hgamma refine ⟨⟨W, hfeas⟩, ?_⟩ rw [hyL] change benefitProbabilityOf W = L rw [hbenefit] dsimp [L, Capacities.endpointMap] apply congrArg (fun z => z / c.aggregateMass S.p) apply Finset.sum_congr rfl intro x _ rw [(thresholdFlow_endpoint_spec c hValid x).2.1] · have hlt : L < U := lt_of_le_of_ne hLU hEq let t : ℝ := (y - L) / (U - L) have ht0 : 0 ≤ t := by dsimp [t] exact div_nonneg (sub_nonneg.mpr hy.1) (sub_nonneg.mpr hLU) have ht1 : t ≤ 1 := by dsimp [t] apply (div_le_one (sub_pos.mpr hlt)).2 linarith let gamma : ∀ x : 𝒳, Coupling K := fun x => couplingSegment t (thresholdFlowLower c hValid x) (thresholdFlowUpper c hValid x) have hgamma : ∀ x, gamma x ∈ branchFreePolytope c hValid x := by intro x exact couplingSegment_mem_branchFree c hValid x (thresholdFlow_endpoint_spec c hValid x).1 (thresholdFlow_endpoint_spec c hValid x).2.2.1 ht0 ht1 obtain ⟨W, hfeas, _hrealizes, hbenefit⟩ := full_law_branchFree_family_attainment S εZ d model gamma hgamma refine ⟨⟨W, hfeas⟩, ?_⟩ change benefitProbabilityOf W = y rw [hbenefit] -- … truncated; follow the source link for the rest …
CausalSmith.PartialID.SlateBenefitPartialTransport.sharp_exact_mass_threshold_interval · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TSharpExactMassThresholdInterval.lean:21
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.TThreeLevelWitness 72 declarations An exact rational one-cell observed table and latent allocation demonstrate a nontrivial interval with upper endpoint seven tenths.

Explicit three-level witness

An exact rational one-cell observed table and latent allocation demonstrate a nontrivial interval with upper endpoint seven tenths.

def witnessObservedWeight

The witness observed weight is the corresponding numerical quantity in the slate-benefit partial-transport calculation.

Definition (Lean source)
witnessObservedWeight o :
if o.cell = () ∧
o.instrument = false
o.treatment = false
o.selected = true
o.outcome = some 0 then (3 : ℝ) / 80 else if o.cell = () ∧
o.instrument = false
o.treatment = false
o.selected = true
o.outcome = some 1 then (1 : ℝ) / 20 else if o.cell = () ∧
o.instrument = false
o.treatment = false
o.selected = true
o.outcome = some 2 then (3 : ℝ) / 80 else if o.cell = () ∧
o.instrument = false
o.treatment = false
o.selected = false
o.outcome = none then (3 : ℝ) / 8 else if o.cell = () ∧
o.instrument = true
o.treatment = true
o.selected = true
o.outcome = some 0 then (1 : ℝ) / 20 else if o.cell = () ∧
o.instrument = true
o.treatment = true
o.selected = true
o.outcome = some 1 then (1 : ℝ) / 8 else if o.cell = () ∧
o.instrument = true
o.treatment = true
o.selected = true
o.outcome = some 2 then (3 : ℝ) / 40 else if o.cell = () ∧
o.instrument = true
o.treatment = true
o.selected = false
o.outcome = none then (1 : ℝ) / 4 else 0
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessObservedWeight · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:19
def witnessObservedMeasure

The witness observed measure is the measure produced by the stated finite slate-benefit construction.

Definition (Lean source)
witnessObservedMeasure :
((3 : ENNReal) / 80) • Measure.dirac ⟨(), false, false, true, some 0⟩
+ ((1 : ENNReal) / 20) • Measure.dirac ⟨(), false, false, true, some 1⟩
+ ((3 : ENNReal) / 80) • Measure.dirac ⟨(), false, false, true, some 2⟩
+ ((3 : ENNReal) / 8) • Measure.dirac ⟨(), false, false, false, none⟩
+ ((1 : ENNReal) / 20) • Measure.dirac ⟨(), true, true, true, some 0⟩
+ ((1 : ENNReal) / 8) • Measure.dirac ⟨(), true, true, true, some 1⟩
+ ((3 : ENNReal) / 40) • Measure.dirac ⟨(), true, true, true, some 2⟩
+ ((1 : ENNReal) / 4) • Measure.dirac ⟨(), true, true, false, none⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessObservedMeasure · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:39
def witnessLatentTable

The witness latent table is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
witnessLatentTable :
fun d0 d1 s0 s1 y0 y1 => if d0 = false
d1 = true
s0 = true
s1 = true
y0 = 0 ∧
y1 = 0 then (3 : ℝ) / 40 else if d0 = false
d1 = true
s0 = true
s1 = true
y0 = 1 ∧
y1 = 1 then (1 : ℝ) / 10 else if d0 = false
d1 = true
s0 = true
s1 = true
y0 = 2 ∧
y1 = 2 then (3 : ℝ) / 40 else if d0 = false
d1 = true
s0 = false
s1 = true
y0 = 0 ∧
y1 = 0 then (1 : ℝ) / 40 else if d0 = false
d1 = true
s0 = false
s1 = true
y0 = 0 ∧
y1 = 1 then (3 : ℝ) / 20 else if d0 = false
d1 = true
s0 = false
s1 = true
y0 = 0 ∧
y1 = 2 then (3 : ℝ) / 40 else if d0 = false
d1 = true
s0 = false
s1 = false
y0 = 0 ∧
y1 = 0 then (1 : ℝ) / 2 else 0
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessLatentTable · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:51
def WitnessLatentState

The witness latent state is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
WitnessLatentState :
Type
Bool × Bool × Bool × Bool × Fin 3 × Fin 3
CausalSmith.PartialID.SlateBenefitPartialTransport.WitnessLatentState · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:71
def witnessLatentMeasure

The witness latent measure is the measure produced by the stated finite slate-benefit construction.

Definition (Lean source)
witnessLatentMeasure :
∑ u, ofReal (witnessLatentTable u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2.1 u.2.2.2.2.2) • Measure.dirac u
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessLatentMeasure · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:74
def witnessInstrumentMeasure

The witness instrument measure is the measure produced by the stated finite slate-benefit construction.

Definition (Lean source)
witnessInstrumentMeasure :
((1 : ENNReal) / 2) • Measure.dirac false + ((1 : ENNReal) / 2) • Measure.dirac true
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessInstrumentMeasure · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:79
def witnessFullMeasure

The witness full measure is the measure produced by the stated finite slate-benefit construction.

Definition (Lean source)
witnessFullMeasure :
witnessInstrumentMeasure.prod witnessLatentMeasure
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessFullMeasure · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:84
structure WitnessVisibleLatentState

Latent coordinates after outcomes hidden by selection have been erased.

Definition (Lean source)
structure WitnessVisibleLatentState where d0 : Bool d1 : Bool s0 : Bool s1 : Bool y0 : Option (Fin 3) y1 : Option (Fin 3) deriving DecidableEq
CausalSmith.PartialID.SlateBenefitPartialTransport.WitnessVisibleLatentState · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:88
instance instDecidableEqWitnessVisibleLatentState

Visible latent states have decidable equality.

Definition (Lean source)
deriving DecidableEq
CausalSmith.PartialID.SlateBenefitPartialTransport.instDecidableEqWitnessVisibleLatentState · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:96
instance instMeasurableSpaceWitnessVisibleLatentState

This declaration supplies the canonical canonical measurable space witness visible latent state typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
CausalSmith.PartialID.SlateBenefitPartialTransport.instMeasurableSpaceWitnessVisibleLatentState · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:101
def witnessVisibleLatent

The witness visible latent is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
witnessVisibleLatent u :
clause 1
d0 := u.1
clause 2
d1 := u.2.1
clause 3
s0 := u.2.2.1
clause 4
s1 := u.2.2.2.1
clause 5
y0 := if u.2.2.1 then some u.2.2.2.2.1 else none
clause 6
y1 := if u.2.2.2.1 then some u.2.2.2.2.2 else none
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessVisibleLatent · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:104
def witnessLatentMeasureFamily

All latent laws with the displayed masses on visible coordinates. Within each fibre of witnessVisibleLatent, outcomes hidden by selection are free.

Definition (Lean source)
witnessLatentMeasureFamily :
{ν | IsProbabilityMeasure ν ∧ ν.map witnessVisibleLatent = witnessLatentMeasure.map witnessVisibleLatent}
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessLatentMeasureFamily · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:113
def witnessFullMeasureFamily

Fair independent instrument assignments joined to any admissible hidden- outcome completion of the displayed latent masses.

Definition (Lean source)
witnessFullMeasureFamily :
{Q | ∃ ν ∈ witnessLatentMeasureFamily, Q = witnessInstrumentMeasure.prod ν}
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessFullMeasureFamily · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:119
def witnessEncoding

The witness encoding is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
witnessEncoding S :
fun ω => (S.factualZ ω, S.D0 ω, S.D1 ω, S.S0 ω, S.S1 ω, S.Y0 ω, S.Y1 ω)
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessEncoding · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:126
def WitnessFullLawRealization

The witness full law realization condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
WitnessFullLawRealization :
Prop
∃ (Pstar : POSystem.{0, 0, 0}) (Sstar : POSlateSystem Pstar Unit 3),
let _ : StandardBorelSpace Pstar.Ω := Sstar.borel TieSafeSurvivorModel Sstar (1 / 4) (fun _ => true) ∧
Sstar.observedLaw = witnessObservedMeasure
Pstar.μ.map (witnessEncoding Sstar) = witnessFullMeasure
(∀ᵐ ω ∂Pstar.μ, Sstar.D0 ω = false ∧ Sstar.D1 ω = true) ∧
(∀ᵐ ω ∂Pstar.μ, Sstar.S0 ω ≤ Sstar.S1 ω)
CausalSmith.PartialID.SlateBenefitPartialTransport.WitnessFullLawRealization · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:131
def threeLevelWitness

The fully specified observed and latent witness tables.

Definition (Lean source)
CausalSmith.PartialID.SlateBenefitPartialTransport.threeLevelWitness · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:141

The w node type enumerates the alternatives used by the slate-benefit partial-transport construction.

Definition (Lean source)
inductive WNode | x | z | d | s | y

This declaration supplies the canonical canonical decidable eq w node typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
instance instDecidableEqWNode : DecidableEq WNode | .x, .x | .z, .z | .d, .d | .s, .s | .y, .y => isTrue rfl | .x, .z | .x, .d | .x, .s | .x, .y | .z, .x | .z, .d | .z, .s | .z, .y | .d, .x | .d, .z | .d, .s | .d, .y | .s, .x | .s, .z | .s, .d | .s, .y | .y, .x | .y, .z | .y, .d | .y, .s => isFalse (by intro h; cases h)
CausalSmith.PartialID.SlateBenefitPartialTransport.instDecidableEqWNode · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:150

This declaration supplies the canonical canonical fintype w node typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
instance instFintypeWNode : Fintype WNode := ⟨{.x, .z, .d, .s, .y}, by intro a; cases a <;> simp⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.instFintypeWNode · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:159

The w value is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
WValue :
WNode → Type
clause 1
| .x => Unit
clause 2
| .z | .d | .s => Bool
clause 3
| .y => Fin 3

The witness measurable space is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
v :
WNode
wMeasurableSpace v :
by cases v <;> exact ⊤
CausalSmith.PartialID.SlateBenefitPartialTransport.wMeasurableSpace · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:169

This declaration supplies the canonical canonical measurable space w value typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
CausalSmith.PartialID.SlateBenefitPartialTransport.instMeasurableSpaceWValue · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:173

The witness eval is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
r :
z :
v :
wEval r z v :
by intro v if h : v ∈ r.target then exact r.assign v h else cases v with | x
=> exact () | z => exact z | d => exact false | s => exact false | y => exact ⟨0, by omega⟩

The witness seed p is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
wSeedP :
by let p : Icc (0 : ℝ) 1 := ⟨1 / 2, by norm_num⟩ let μ : Measure Bool := ProbabilityTheory.bernoulliMeasure true false p letI : IsProbabilityMeasure μ := by infer_instance exact { V := WNode X := WValue Ω := Bool μ := μ eval := wEval measurable_eval := fun _ => measurable_from_top }

The witness seed s is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
clause 1
hK := by omega
clause 2
xNode := .x
clause 3
zNode := .z
clause 4
dNode := .d
clause 5
sNode := .s
clause 6
yNode := .y
clause 7
hX := MeasurableEquiv.refl Unit
clause 8
hZ := MeasurableEquiv.refl Bool
clause 9
hD := MeasurableEquiv.refl Bool
clause 10
hS := MeasurableEquiv.refl Bool
clause 11
hY := MeasurableEquiv.refl (Fin 3)
clause 12
hXZ := by intro h; cases h
clause 13
hXD := by intro h; cases h
clause 14
hXS := by intro h; cases h
clause 15
hXY := by intro h; cases h
clause 16
hZD := by intro h; cases h
clause 17
hZS := by intro h; cases h
clause 18
hZY := by intro h; cases h
clause 19
hDS := by intro h; cases h
clause 20
hDY := by intro h; cases h
clause 21
hSY := by intro h; cases h
clause 22
borel := by change StandardBorelSpace Bool; infer_instance

the witness seed p property holds.

Formal statement
wSeedS.p () = 1
Proof (Lean source)
theorem wSeed_p : wSeedS.p () = 1 := by unfold POSlateSystem.p rw [show wSeedS.xEvent () = univ by ext z simp [POSlateSystem.xEvent, POSlateSystem.factualX, POSlateSystem.xVar, POVar.factual, POVar.cf, wSeedS, wSeedP, wEval]] simp [Measure.real]
CausalSmith.PartialID.SlateBenefitPartialTransport.wSeed_p · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:226

the witness seed propensity property holds.

Formal statement
wSeedS.propensity () = (1 : ℝ) / 2
Proof (Lean source)
theorem wSeed_propensity : wSeedS.propensity () = (1 : ℝ) / 2 := by unfold POSlateSystem.propensity rw [show wSeedS.xEvent () = univ by ext z simp [POSlateSystem.xEvent, POSlateSystem.factualX, POSlateSystem.xVar, POVar.factual, POVar.cf, wSeedS, wSeedP, wEval]] have hz : {z | wSeedS.factualZ z = true} = ({true} : Set Bool) := by change ({z : Bool | wEval Regime.empty z WNode.z = true} : Set Bool) = {true} ext z change wEval Regime.empty z WNode.z = true ↔ z = true simp only [wEval] rw [dif_neg] intro h simpa [Regime.empty] using h rw [hz] unfold conditionalReal dsimp [wSeedP] rw [Set.inter_univ] norm_num [POSlateSystem.propensity, conditionalReal, POSlateSystem.factualZ, POSlateSystem.zVar, POVar.factual, POVar.cf, wSeedS, wSeedP, wEval, ProbabilityTheory.bernoulliMeasure_real_apply]
CausalSmith.PartialID.SlateBenefitPartialTransport.wSeed_propensity · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:235

The witness table is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)

every witness latent weight is nonnegative.

Formal statement
wTable.Nonnegative
Proof (Lean source)
theorem wNN : wTable.Nonnegative := by intro x d0 d1 s0 s1 y0 y1 fin_cases d0 <;> fin_cases d1 <;> fin_cases s0 <;> fin_cases s1 <;> fin_cases y0 <;> fin_cases y1 <;> simp [wTable, witnessLatentTable] <;> norm_num
theorem witnessLatentTable_complier_support Lemma witnessLatentTable_complier_support in the paper ↗

Given the stated hypotheses, the witness latent table complier support property holds.

Formal statement
d0 d1 s0 s1 :
y0 y1 :
Fin 3
h :
witnessLatentTable d0 d1 s0 s1 y0 y1 ≠ 0
conclusion 1
d0 = false
conclusion 2
d1 = true
Proof (Lean source)
theorem witnessLatentTable_complier_support (d0 d1 s0 s1 : Bool) (y0 y1 : Fin 3) (h : witnessLatentTable d0 d1 s0 s1 y0 y1 ≠ 0) : d0 = false ∧ d1 = true := by fin_cases d0 <;> fin_cases d1 <;> fin_cases s0 <;> fin_cases s1 <;> simp [witnessLatentTable] at h ⊢
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessLatentTable_complier_support · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:268
theorem witnessLatentTable_selection_support Lemma witnessLatentTable_selection_support in the paper ↗

Given the stated hypotheses, the witness latent table selection support property holds.

Formal statement
d0 d1 s0 s1 :
y0 y1 :
Fin 3
h :
witnessLatentTable d0 d1 s0 s1 y0 y1 ≠ 0
s0 ≤ s1
Proof (Lean source)
theorem witnessLatentTable_selection_support (d0 d1 s0 s1 : Bool) (y0 y1 : Fin 3) (h : witnessLatentTable d0 d1 s0 s1 y0 y1 ≠ 0) : s0 ≤ s1 := by fin_cases d0 <;> fin_cases d1 <;> fin_cases s0 <;> fin_cases s1 <;> simp [witnessLatentTable] at h ⊢
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessLatentTable_selection_support · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:276

the witness latent weights sum to one.

Formal statement
wTable.Normalized
Proof (Lean source)
theorem wNorm : wTable.Normalized := by intro x simp [wTable, witnessLatentTable, Fin.sum_univ_succ] <;> norm_num

the witness model has the claimed covariate-cell probabilities.

Formal statement
x :
shared
x :
0 ≤ wSeedS.p x
Proof (Lean source)
theorem wHp : ∀ x, 0 ≤ wSeedS.p x := by intro x rw [show x = () by cases x; rfl, wSeed_p] norm_num

the witness model has the claimed instrument propensity.

Formal statement
x :
shared
x :
conclusion 1
0 ≤ wSeedS.propensity x
conclusion 2
wSeedS.propensity x ≤ 1
Proof (Lean source)
theorem wHprop : ∀ x, 0 ≤ wSeedS.propensity x ∧ wSeedS.propensity x ≤ 1 := by intro x rw [show x = () by cases x; rfl, wSeed_propensity] norm_num
theorem witnessInstrumentMeasure_atom Lemma witnessInstrumentMeasure_atom in the paper ↗

the witness instrument measure atom property holds.

Formal statement
z :
witnessInstrumentMeasure.real {z} = (1 : ℝ) / 2
Proof (Lean source)
theorem witnessInstrumentMeasure_atom (z : Bool) : witnessInstrumentMeasure.real {z} = (1 : ℝ) / 2 := by fin_cases z <;> norm_num [witnessInstrumentMeasure, Measure.real, Measure.add_apply, Measure.smul_apply, indicator, ENNReal.toReal_add]
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessInstrumentMeasure_atom · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:300
theorem witnessLatentMeasure_atom Lemma witnessLatentMeasure_atom in the paper ↗

the witness latent measure atom property holds.

Formal statement
witnessLatentMeasure.real {u}
= witnessLatentTable u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2.1 u.2.2.2.2.2
Proof (Lean source)
theorem witnessLatentMeasure_atom (u : WitnessLatentState) : witnessLatentMeasure.real {u} = witnessLatentTable u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2.1 u.2.2.2.2.2 := by unfold witnessLatentMeasure Measure.real simp only [Measure.coe_finset_sum, Finset.sum_apply, Measure.coe_smul, Pi.smul_apply, smul_eq_mul] rw [Finset.sum_eq_single u] · simp [Measure.dirac_apply'] exact wNN () u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2.1 u.2.2.2.2.2 · intro v _ hv simp [Measure.dirac_apply', hv] · simp
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessLatentMeasure_atom · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:307
theorem witnessLatentMeasure_univ Lemma witnessLatentMeasure_univ in the paper ↗

the witness latent measure univ property holds.

Formal statement
Proof (Lean source)
theorem witnessLatentMeasure_univ : witnessLatentMeasure univ = 1 := by unfold witnessLatentMeasure simp only [Measure.coe_finset_sum, Finset.sum_apply, Measure.coe_smul, Pi.smul_apply, smul_eq_mul] simp only [Measure.dirac_apply' _ MeasurableSet.univ, Set.mem_univ, if_true, mul_one] simp only [Set.indicator_of_mem (Set.mem_univ _), Pi.one_apply, mul_one] change (∑ x : WitnessLatentState, ofReal (witnessLatentTable x.1 x.2.1 x.2.2.1 x.2.2.2.1 x.2.2.2.2.1 x.2.2.2.2.2)) = 1 rw [← ENNReal.ofReal_sum_of_nonneg] · rw [show (∑ u : WitnessLatentState, witnessLatentTable u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2.1 u.2.2.2.2.2) = 1 by simpa [Fintype.sum_prod_type] using wNorm ()] norm_num · intro u _ exact wNN () u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2.1 u.2.2.2.2.2
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessLatentMeasure_univ · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:322
instance instIsProbabilityMeasureWitnessLatent Definition instIsProbabilityMeasureWitnessLatent in the paper ↗

This declaration supplies the canonical canonical is probability measure witness latent typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
noncomputable instance instIsProbabilityMeasureWitnessLatent : IsProbabilityMeasure witnessLatentMeasure := ⟨witnessLatentMeasure_univ⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.instIsProbabilityMeasureWitnessLatent · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:342
theorem witnessLatentMeasure_ae_compliers Lemma witnessLatentMeasure_ae_compliers in the paper ↗

the witness latent measure ae compliers property holds.

Formal statement
∀ᵐ u ∂witnessLatentMeasure, u.1 = false ∧ u.2.1 = true
Proof (Lean source)
theorem witnessLatentMeasure_ae_compliers : ∀ᵐ u ∂witnessLatentMeasure, u.1 = false ∧ u.2.1 = true := by unfold witnessLatentMeasure rw [← Measure.sum_fintype, Measure.ae_sum_iff] intro u by_cases h : witnessLatentTable u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2.1 u.2.2.2.2.2 = 0 · simp [h] · have hs := witnessLatentTable_complier_support u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2.1 u.2.2.2.2.2 h apply Measure.ae_smul_measure rw [MeasureTheory.ae_dirac_iff MeasurableSet.of_discrete] exact hs
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessLatentMeasure_ae_compliers · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:346
theorem witnessLatentMeasure_ae_selection Lemma witnessLatentMeasure_ae_selection in the paper ↗

the witness latent measure ae selection property holds.

Formal statement
∀ᵐ u ∂witnessLatentMeasure, u.2.2.1 ≤ u.2.2.2.1
Proof (Lean source)
theorem witnessLatentMeasure_ae_selection : ∀ᵐ u ∂witnessLatentMeasure, u.2.2.1 ≤ u.2.2.2.1 := by unfold witnessLatentMeasure rw [← Measure.sum_fintype, Measure.ae_sum_iff] intro u by_cases h : witnessLatentTable u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2.1 u.2.2.2.2.2 = 0 · simp [h] · have hs := witnessLatentTable_selection_support u.1 u.2.1 u.2.2.1 u.2.2.2.1 u.2.2.2.2.1 u.2.2.2.2.2 h apply Measure.ae_smul_measure rw [MeasureTheory.ae_dirac_iff MeasurableSet.of_discrete] exact hs
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessLatentMeasure_ae_selection · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:361
theorem witnessInstrumentMeasure_univ Lemma witnessInstrumentMeasure_univ in the paper ↗

the witness instrument measure univ property holds.

Formal statement
Proof (Lean source)
theorem witnessInstrumentMeasure_univ : witnessInstrumentMeasure univ = 1 := by norm_num [witnessInstrumentMeasure, Measure.add_apply, Measure.smul_apply, indicator] apply (ENNReal.toReal_eq_toReal_iff' (by finiteness) (by finiteness)).mp rw [ENNReal.toReal_add (by finiteness) (by finiteness)] norm_num
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessInstrumentMeasure_univ · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:376
instance instIsProbabilityMeasureWitnessInstrument Definition instIsProbabilityMeasureWitnessInstrument in the paper ↗

This declaration supplies the canonical canonical is probability measure witness instrument typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
noncomputable instance instIsProbabilityMeasureWitnessInstrument : IsProbabilityMeasure witnessInstrumentMeasure := ⟨witnessInstrumentMeasure_univ⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.instIsProbabilityMeasureWitnessInstrument · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:384
instance instIsProbabilityMeasureWitnessFull Definition instIsProbabilityMeasureWitnessFull in the paper ↗

This declaration supplies the canonical canonical is probability measure witness full typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
noncomputable instance instIsProbabilityMeasureWitnessFull : IsProbabilityMeasure witnessFullMeasure := by unfold witnessFullMeasure infer_instance
CausalSmith.PartialID.SlateBenefitPartialTransport.instIsProbabilityMeasureWitnessFull · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:388
instance instIsFiniteMeasureWitnessFull Definition instIsFiniteMeasureWitnessFull in the paper ↗

This declaration supplies the canonical canonical is finite measure witness full typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
noncomputable instance instIsFiniteMeasureWitnessFull : IsFiniteMeasure witnessFullMeasure := by unfold witnessFullMeasure infer_instance
CausalSmith.PartialID.SlateBenefitPartialTransport.instIsFiniteMeasureWitnessFull · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:394
theorem witnessObservedMeasure_univ Lemma witnessObservedMeasure_univ in the paper ↗

the witness observed measure univ property holds.

Formal statement
Proof (Lean source)
theorem witnessObservedMeasure_univ : witnessObservedMeasure univ = 1 := by norm_num [witnessObservedMeasure, Measure.add_apply, Measure.smul_apply, indicator, ENNReal.toReal_add] apply (ENNReal.toReal_eq_toReal_iff' (by finiteness) (by finiteness)).mp rw [ENNReal.toReal_add (by finiteness) (by finiteness), ENNReal.toReal_add (by finiteness) (by finiteness), ENNReal.toReal_add (by finiteness) (by finiteness), ENNReal.toReal_add (by finiteness) (by finiteness), ENNReal.toReal_add (by finiteness) (by finiteness), ENNReal.toReal_add (by finiteness) (by finiteness), ENNReal.toReal_add (by finiteness) (by finiteness)] norm_num
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessObservedMeasure_univ · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:400
instance instIsProbabilityMeasureWitnessObserved Definition instIsProbabilityMeasureWitnessObserved in the paper ↗

This declaration supplies the canonical canonical is probability measure witness observed typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
noncomputable instance instIsProbabilityMeasureWitnessObserved : IsProbabilityMeasure witnessObservedMeasure := ⟨witnessObservedMeasure_univ⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.instIsProbabilityMeasureWitnessObserved · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:414
theorem witnessObservedMeasure_atom Lemma witnessObservedMeasure_atom in the paper ↗

the witness observed measure atom property holds.

Formal statement
witnessObservedMeasure.real {o} = witnessObservedWeight o
Proof (Lean source)
theorem witnessObservedMeasure_atom (o : ObservedDatum Unit 3) : witnessObservedMeasure.real {o} = witnessObservedWeight o := by rcases o with ⟨x, z, d, s, y⟩ cases x fin_cases z <;> fin_cases d <;> fin_cases s <;> cases y with | none => norm_num [witnessObservedMeasure, witnessObservedWeight, Measure.real, Measure.add_apply, Measure.smul_apply, indicator, Fin.ext_iff, ENNReal.toReal_add] <;> simp | some y => fin_cases y <;> norm_num [witnessObservedMeasure, witnessObservedWeight, Measure.real, Measure.add_apply, Measure.smul_apply, indicator, Fin.ext_iff, ENNReal.toReal_add] <;> simp
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessObservedMeasure_atom · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:418

The witness candidate is the object specified here for the slate-benefit partial-transport construction.

Definition (Lean source)
CausalSmith.PartialID.SlateBenefitPartialTransport.wCandidate · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:434

the witness observed law equals the displayed finite law.

Formal statement
wCandidate.slate.observedLaw = witnessObservedMeasure
Proof (Lean source)
theorem wObservedLaw : wCandidate.slate.observedLaw = witnessObservedMeasure := by letI : IsProbabilityMeasure wCandidate.slate.observedLaw := Measure.isProbabilityMeasure_map (measurable_observedDatum wCandidate.slate).aemeasurable apply MeasureTheory.ext_iff_measureReal_singleton.mpr intro o have hc := canonicalThresholdCandidate_observedSingleton wSeedS wTable wHp wHprop wNN wNorm o rw [show wCandidate.slate.observedLaw.real {o} = ∑ a, if thresholdObservedDatum a = o then thresholdPastedWeight wSeedS wTable a else 0 by simpa [wCandidate] using hc] rw [thresholdPastedWeight_observedSum, witnessObservedMeasure_atom] rcases o with ⟨x, z, d, s, y⟩ cases x fin_cases z <;> fin_cases d <;> fin_cases s <;> cases y with | none => simp [wSeed_p, wSeed_propensity, atomInstrumentMass, thresholdObservedTableMargin_false_false_unselected, thresholdObservedTableMargin_false_true_unselected, thresholdObservedTableMargin_true_false_unselected, thresholdObservedTableMargin_true_true_unselected, thresholdObservedTableMargin_invalid, wTable, witnessLatentTable, witnessObservedWeight, Fintype.sum_bool, Fin.sum_univ_succ] <;> norm_num | some y => fin_cases y <;> simp [wSeed_p, wSeed_propensity, atomInstrumentMass, thresholdObservedTableMargin_false_false_selected, thresholdObservedTableMargin_false_true_selected, thresholdObservedTableMargin_true_false_selected, thresholdObservedTableMargin_true_true_selected, thresholdObservedTableMargin_invalid, wTable, witnessLatentTable, witnessObservedWeight, Fintype.sum_bool, Fin.sum_univ_succ] <;> norm_num
CausalSmith.PartialID.SlateBenefitPartialTransport.wObservedLaw · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:438

the witness lower endpoint has the claimed value.

Formal statement
i :
Fin 3
= ![(3 : ℝ) / 40, (1 : ℝ) / 10, (3 : ℝ) / 40] i
Proof (Lean source)
theorem wLower (i : Fin 3) : (observableCapacities witnessObservedMeasure).lower () i = ![(3 : ℝ) / 40, (1 : ℝ) / 10, (3 : ℝ) / 40] i := by fin_cases i all_goals unfold observableCapacities observableCapacityContrasts change conditionalReal witnessObservedMeasure {o | o.cell = () ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some _} {o | o.cell = () ∧ o.instrument = false} - conditionalReal witnessObservedMeasure {o | o.cell = () ∧ o.treatment = false ∧ o.selected = true ∧ o.outcome = some _} {o | o.cell = () ∧ o.instrument = true} = _ norm_num [conditionalReal, witnessObservedMeasure, Measure.real, Measure.add_apply, Measure.smul_apply, indicator] <;> simp [Fin.ext_iff] all_goals have hden : ((3 / 80 + 20⁻¹ + 3 / 80 + 3 / 8 : ENNReal)).toReal = (1 : ℝ) / 2 := by rw [ENNReal.toReal_add (by finiteness) (by finiteness), ENNReal.toReal_add (by finiteness) (by finiteness), ENNReal.toReal_add (by finiteness) (by finiteness)] norm_num rw [hden] norm_num

the witness upper endpoint has the claimed value.

Formal statement
i :
Fin 3
= ![(1 : ℝ) / 10, (1 : ℝ) / 4, (3 : ℝ) / 20] i
Proof (Lean source)
theorem wUpper (i : Fin 3) : (observableCapacities witnessObservedMeasure).upper () i = ![(1 : ℝ) / 10, (1 : ℝ) / 4, (3 : ℝ) / 20] i := by fin_cases i all_goals unfold observableCapacities observableCapacityContrasts change conditionalReal witnessObservedMeasure {o | o.cell = () ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some _} {o | o.cell = () ∧ o.instrument = true} - conditionalReal witnessObservedMeasure {o | o.cell = () ∧ o.treatment = true ∧ o.selected = true ∧ o.outcome = some _} {o | o.cell = () ∧ o.instrument = false} = _ norm_num [conditionalReal, witnessObservedMeasure, Measure.real, Measure.add_apply, Measure.smul_apply, indicator] <;> simp [Fin.ext_iff] all_goals have hden : ((20⁻¹ + 8⁻¹ + 3 / 40 + 4⁻¹ : ENNReal)).toReal = (1 : ℝ) / 2 := by rw [ENNReal.toReal_add (by finiteness) (by finiteness), ENNReal.toReal_add (by finiteness) (by finiteness), ENNReal.toReal_add (by finiteness) (by finiteness)] norm_num rw [hden] norm_num

the witness benefit lower property holds.

Formal statement
Proof (Lean source)
theorem wBenefitLower : (observableCapacities witnessObservedMeasure).benefitLower () = 0 := by unfold Capacities.benefitLower change Finset.univ.sup' univ_nonempty (fun t : Option (Fin 3) => match t with | none => 0 | some k => (observableCapacities witnessObservedMeasure).lowerLe () k - (observableCapacities witnessObservedMeasure).upperLe () k + min ((observableCapacities witnessObservedMeasure).gap ()) 0) = 0 apply le_antisymm · apply Finset.sup'_le intro t _ cases t with | none => norm_num | some k => fin_cases k <;> simp [Capacities.lowerLe, Capacities.upperLe, Capacities.gap, Capacities.q0, Capacities.q1, wLower, wUpper, Finset.sum_filter, Fin.sum_univ_three] <;> norm_num · exact Finset.le_sup' (fun t : Option (Fin 3) => match t with | none => 0 | some k => (observableCapacities witnessObservedMeasure).lowerLe () k - (observableCapacities witnessObservedMeasure).upperLe () k + min ((observableCapacities witnessObservedMeasure).gap ()) 0) (show none ∈ (Finset.univ : Finset (Option (Fin 3))) by simp)
CausalSmith.PartialID.SlateBenefitPartialTransport.wBenefitLower · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:524

the witness benefit upper property holds.

Formal statement
Proof (Lean source)
theorem wBenefitUpper : (observableCapacities witnessObservedMeasure).benefitUpper () = (7 : ℝ) / 40 := by unfold Capacities.benefitUpper change Finset.univ.inf' univ_nonempty (fun t : Option (Fin 3) => match t with | none => (observableCapacities witnessObservedMeasure).mass () | some k => (observableCapacities witnessObservedMeasure).lowerLt () k + (observableCapacities witnessObservedMeasure).upperGt () k) = (7 : ℝ) / 40 apply le_antisymm · have hle := Finset.inf'_le (s := (Finset.univ : Finset (Option (Fin 3)))) (f := fun t : Option (Fin 3) => match t with | none => (observableCapacities witnessObservedMeasure).mass () | some k => (observableCapacities witnessObservedMeasure).lowerLt () k + (observableCapacities witnessObservedMeasure).upperGt () k) (b := some (2 : Fin 3)) (by simp) have heval : (observableCapacities witnessObservedMeasure).lowerLt () (2 : Fin 3) + (observableCapacities witnessObservedMeasure).upperGt () (2 : Fin 3) = (7 : ℝ) / 40 := by simp [Capacities.lowerLt, Capacities.upperGt, wLower, wUpper, Finset.sum_filter, Fin.sum_univ_three] norm_num exact hle.trans_eq heval · apply Finset.le_inf' intro t _ cases t with | none => simp [Capacities.mass, Capacities.q0, Capacities.q1, wLower, wUpper, Finset.sum_filter, Fin.sum_univ_three] <;> norm_num | some k => fin_cases k <;> simp [Capacities.lowerLt, Capacities.upperGt, wLower, wUpper, Finset.sum_filter, Fin.sum_univ_three] <;> norm_num
CausalSmith.PartialID.SlateBenefitPartialTransport.wBenefitUpper · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:554

the witness capacities have the displayed masses and endpoints.

Formal statement
c.q0 () = (1 : ℝ) / 4
c.mass () = (1 : ℝ) / 4
c.q1 () = (1 : ℝ) / 2
c.gap () = (1 : ℝ) / 4
c.benefitLower () = 0
c.benefitUpper () = (7 : ℝ) / 40
Proof (Lean source)
theorem wCapacityFacts : let c := observableCapacities witnessObservedMeasure c.q0 () = (1 : ℝ) / 4 ∧ c.mass () = (1 : ℝ) / 4 ∧ c.q1 () = (1 : ℝ) / 2 ∧ c.gap () = (1 : ℝ) / 4 ∧ c.benefitLower () = 0 ∧ c.benefitUpper () = (7 : ℝ) / 40 := by dsimp only exact ⟨by simp [Capacities.q0, wLower, Fin.sum_univ_succ] <;> norm_num, by simp [Capacities.mass, Capacities.q0, Capacities.q1, wLower, wUpper, Fin.sum_univ_succ] <;> norm_num, by simp [Capacities.q1, wUpper, Fin.sum_univ_succ] <;> norm_num, by simp [Capacities.gap, Capacities.q0, Capacities.q1, wLower, wUpper, Fin.sum_univ_succ] <;> norm_num, wBenefitLower, wBenefitUpper⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.wCapacityFacts · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:591

the witness construction defines the stated full-data probability law.

Formal statement
wCandidate.system.μ.map (witnessEncoding wCandidate.slate) = witnessFullMeasure
Proof (Lean source)
theorem wFullLaw : wCandidate.system.μ.map (witnessEncoding wCandidate.slate) = witnessFullMeasure := by apply Measure.ext_of_singleton intro u have hm : Measurable (witnessEncoding wCandidate.slate) := measurable_from_top rw [Measure.map_apply hm (MeasurableSet.singleton _)] apply (ENNReal.toReal_eq_toReal_iff' (measure_ne_top _ _) (measure_ne_top _ _)).mp rcases u with ⟨z, d0, d1, s0, s1, y0, y1⟩ let a : ThresholdAtom Unit 3 := ⟨(), z, d0, d1, s0, s1, y0, y1⟩ have hc := canonicalThresholdCandidate_fullAtom wSeedS wTable wHp wHprop wNN wNorm a change wCandidate.system.μ.real ((witnessEncoding wCandidate.slate) ⁻¹' {(z, d0, d1, s0, s1, y0, y1)}) = _ rw [show wCandidate.system.μ.real ((witnessEncoding wCandidate.slate) ⁻¹' {(z, d0, d1, s0, s1, y0, y1)}) = thresholdPastedWeight wSeedS wTable a by rw [← hc] congr 1 ext ω simp [witnessEncoding, a]] change thresholdPastedWeight wSeedS wTable a = witnessFullMeasure.real {(z, d0, d1, s0, s1, y0, y1)} rw [show witnessFullMeasure.real {(z, d0, d1, s0, s1, y0, y1)} = (1 / 2 : ℝ) * witnessLatentTable d0 d1 s0 s1 y0 y1 by unfold witnessFullMeasure Measure.real rw [show ({(z, d0, d1, s0, s1, y0, y1)} : Set (Bool × WitnessLatentState)) = ({z} : Set Bool) ×ˢ ({(d0, d1, s0, s1, y0, y1)} : Set WitnessLatentState) by ext v; simp] rw [Measure.prod_prod, ENNReal.toReal_mul, show (witnessInstrumentMeasure {z}).toReal = (1 : ℝ) / 2 by exact witnessInstrumentMeasure_atom z, show (witnessLatentMeasure {(d0, d1, s0, s1, y0, y1)}).toReal = witnessLatentTable d0 d1 s0 s1 y0 y1 by exact witnessLatentMeasure_atom _]] cases z <;> simp [a, wTable, thresholdPastedWeight, atomInstrumentMass, wSeed_p, wSeed_propensity] <;> norm_num
CausalSmith.PartialID.SlateBenefitPartialTransport.wFullLaw · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:606

the witness candidate cell probability equals the stated value.

Formal statement
wCandidate.slate.p () = 1
Proof (Lean source)
theorem wCandidate_p : wCandidate.slate.p () = 1 := by rw [← wSeed_p] exact canonicalThresholdCandidate_cellMass wSeedS wTable wHp wHprop wNN wNorm ()
CausalSmith.PartialID.SlateBenefitPartialTransport.wCandidate_p · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:645
instance instStandardBorelSpaceWCandidate Definition instStandardBorelSpaceWCandidate in the paper ↗

This declaration supplies the canonical canonical standard borel space w candidate typeclass instance for the finite slate-benefit construction.

Definition (Lean source)
noncomputable instance instStandardBorelSpaceWCandidate : StandardBorelSpace wCandidate.system.Ω := wCandidate.slate.borel
CausalSmith.PartialID.SlateBenefitPartialTransport.instStandardBorelSpaceWCandidate · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:650

the witness candidate propensity equals the stated value.

Formal statement
wCandidate.slate.propensity () = (1 : ℝ) / 2
Proof (Lean source)
theorem wCandidate_propensity : wCandidate.slate.propensity () = (1 : ℝ) / 2 := by unfold POSlateSystem.propensity conditionalReal rw [show wCandidate.slate.xEvent () = univ by ext ω simp [POSlateSystem.xEvent]] rw [if_pos (by simp [Measure.real])] rw [Set.inter_univ] have hm : Measurable (witnessEncoding wCandidate.slate) := measurable_from_top have hz : wCandidate.system.μ.real {w | wCandidate.slate.factualZ w = true} = witnessFullMeasure.real {u : Bool × WitnessLatentState | u.1 = true} := by rw [← wFullLaw] unfold Measure.real rw [Measure.map_apply hm MeasurableSet.of_discrete] congr 1 rw [hz] unfold witnessFullMeasure Measure.real rw [show ({u : Bool × WitnessLatentState | u.1 = true} : Set (Bool × WitnessLatentState)) = ({true} : Set Bool) ×ˢ univ by ext u; simp] rw [Measure.prod_prod, witnessLatentMeasure_univ] norm_num [witnessInstrumentMeasure, Measure.add_apply, Measure.smul_apply, indicator, ENNReal.toReal_add]
CausalSmith.PartialID.SlateBenefitPartialTransport.wCandidate_propensity · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:654

the witness model has no defiers.

Formal statement
∀ᵐ w ∂wCandidate.system.μ, wCandidate.slate.D0 w = false ∧ wCandidate.slate.D1 w = true
Proof (Lean source)
theorem wCompliers : ∀ᵐ w ∂wCandidate.system.μ, wCandidate.slate.D0 w = false ∧ wCandidate.slate.D1 w = true := by have h : ∀ᵐ u ∂wCandidate.system.μ.map (witnessEncoding wCandidate.slate), u.2.1 = false ∧ u.2.2.1 = true := by rw [wFullLaw] unfold witnessFullMeasure rw [Measure.ae_prod_iff_ae_ae MeasurableSet.of_discrete] exact Filter.Eventually.of_forall (fun _ => witnessLatentMeasure_ae_compliers) change ∀ᵐ w ∂wCandidate.system.μ, (witnessEncoding wCandidate.slate w).2.1 = false ∧ (witnessEncoding wCandidate.slate w).2.2.1 = true exact ae_of_ae_map ((measurable_from_top : Measurable (witnessEncoding wCandidate.slate)).aemeasurable) h
CausalSmith.PartialID.SlateBenefitPartialTransport.wCompliers · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:678

the witness selection response is weakly increasing.

Formal statement
∀ᵐ w ∂wCandidate.system.μ, wCandidate.slate.S0 w ≤ wCandidate.slate.S1 w
Proof (Lean source)
theorem wSelectionIncreasing : ∀ᵐ w ∂wCandidate.system.μ, wCandidate.slate.S0 w ≤ wCandidate.slate.S1 w := by have h : ∀ᵐ u ∂wCandidate.system.μ.map (witnessEncoding wCandidate.slate), u.2.2.2.1 ≤ u.2.2.2.2.1 := by rw [wFullLaw] unfold witnessFullMeasure rw [Measure.ae_prod_iff_ae_ae MeasurableSet.of_discrete] exact Filter.Eventually.of_forall (fun _ => witnessLatentMeasure_ae_selection) change ∀ᵐ w ∂wCandidate.system.μ, (witnessEncoding wCandidate.slate w).2.2.2.1 ≤ (witnessEncoding wCandidate.slate w).2.2.2.2.1 exact ae_of_ae_map ((measurable_from_top : Measurable (witnessEncoding wCandidate.slate)).aemeasurable) h
CausalSmith.PartialID.SlateBenefitPartialTransport.wSelectionIncreasing · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:693

the witness capacity table is valid.

Formal statement
Proof (Lean source)
theorem wValid : ValidCapacities (observableCapacities witnessObservedMeasure) := by constructor · intro x i cases x rw [wLower i] fin_cases i <;> norm_num · intro x i cases x rw [wUpper i] fin_cases i <;> norm_num

the witness construction satisfies the maintained structural model.

Formal statement
TieSafeSurvivorModel wCandidate.slate (1 / 4) (fun _ => true)
Proof (Lean source)
theorem wModel : TieSafeSurvivorModel wCandidate.slate (1 / 4) (fun _ => true) := by have hcons := canonicalThresholdCandidate_consistency wSeedS wTable wHp wHprop wNN wNorm refine { ivIndependence := canonicalThresholdCandidate_ivIndependence wSeedS wTable wHp wHprop wNN wNorm treatmentConsistency := hcons.1 selectionExclusion := hcons.2.1 outcomeExclusion := hcons.2.2 instrumentOverlap := ?_ noDefiers := ?_ weakSelectionMonotonicity := ?_ positiveAggregateSurvivors := ?_ } · refine ⟨by norm_num, by norm_num, ?_⟩ intro x hx cases x rw [wCandidate_propensity] norm_num · filter_upwards [wCompliers] with w hw intro _ exact hw.2 · apply canonicalThresholdCandidate_weakSelectionMonotonicity wSeedS wTable wHp wHprop wNN wNorm (fun _ => true) · intro x y0 y1 hd simp [wTable, witnessLatentTable] · intro x y0 y1 hd simp at hd · unfold PositiveAggregateSurvivors Capacities.aggregateMass rw [wObservedLaw] simp [wCandidate_p] rw [wCapacityFacts.2.1] norm_num

the witness candidate realizes its own observed law.

Formal statement
Proof (Lean source)
theorem wRealization : WitnessFullLawRealization := by exact ⟨wCandidate.system, wCandidate.slate, wModel, wObservedLaw, wFullLaw, wCompliers, wSelectionIncreasing⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.wRealization · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:754
theorem wCandidateValid

the witness candidate has valid capacities.

Formal statement
ValidCapacities (observableCapacities wCandidate.slate.observedLaw)
Proof (Lean source)
theorem wCandidateValid : ValidCapacities (observableCapacities wCandidate.slate.observedLaw) := by rw [wObservedLaw] exact wValid
CausalSmith.PartialID.SlateBenefitPartialTransport.wCandidateValid · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:759
theorem wCandidatePNonnegative

every witness candidate cell probability is nonnegative.

Formal statement
x :
shared
x :
0 ≤ wCandidate.slate.p x
Proof (Lean source)
theorem wCandidatePNonnegative : ∀ x, 0 ≤ wCandidate.slate.p x := by intro x rw [wCandidate_p] norm_num
CausalSmith.PartialID.SlateBenefitPartialTransport.wCandidatePNonnegative · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:765
theorem witnessObservedCellWeights

the witness observed cell weights property holds.

Formal statement
(fun _ : Unit => (1 : ℝ)) = Capacities.observedCellWeights witnessObservedMeasure
Proof (Lean source)
theorem witnessObservedCellWeights : (fun _ : Unit => (1 : ℝ)) = Capacities.observedCellWeights witnessObservedMeasure := by funext x cases x rw [← wObservedLaw] rw [← congrFun (p_eq_observedCellWeights wCandidate.slate) ()] exact wCandidate_p.symm
CausalSmith.PartialID.SlateBenefitPartialTransport.witnessObservedCellWeights · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:771
theorem wCandidateMassPositive

the witness candidate has positive aggregate survivor mass.

Formal statement
0 < (observableCapacities wCandidate.slate.observedLaw).aggregateMass wCandidate.slate.p
Proof (Lean source)
theorem wCandidateMassPositive : 0 < (observableCapacities wCandidate.slate.observedLaw).aggregateMass wCandidate.slate.p := wModel.positiveAggregateSurvivors
CausalSmith.PartialID.SlateBenefitPartialTransport.wCandidateMassPositive · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:781
theorem wObservedLawDomain

the witness observed law belongs to the admissible observed-law domain.

Formal statement
Proof (Lean source)
theorem wObservedLawDomain : ObservedLawDomain witnessObservedMeasure := by rw [← wObservedLaw] exact observedLawDomain wCandidate.slate
CausalSmith.PartialID.SlateBenefitPartialTransport.wObservedLawDomain · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:787

the witness endpoint lies at the claimed boundary.

Formal statement
((observableCapacities wCandidate.slate.observedLaw).endpointMap wCandidate.slate.p wCandidate.slate.observedLaw rfl (p_eq_observedCellWeights wCandidate.slate) wCandidateValid wCandidatePNonnegative wCandidateMassPositive (observedLawDomain wCandidate.slate)).endpoints
= (0, (7 : ℝ) / 10)
Proof (Lean source)
theorem wEndpoint : ((observableCapacities wCandidate.slate.observedLaw).endpointMap wCandidate.slate.p wCandidate.slate.observedLaw rfl (p_eq_observedCellWeights wCandidate.slate) wCandidateValid wCandidatePNonnegative wCandidateMassPositive (observedLawDomain wCandidate.slate)).endpoints = (0, (7 : ℝ) / 10) := by unfold Capacities.endpointMap dsimp only rw [wObservedLaw] simp [Capacities.endpointMap, Capacities.aggregateMass, wCandidate_p, wCapacityFacts.2.1, wCapacityFacts.2.2.2.2.1, wCapacityFacts.2.2.2.2.2] <;> norm_num
CausalSmith.PartialID.SlateBenefitPartialTransport.wEndpoint · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:792

the witness identified interval has the claimed endpoints.

Formal statement
∃ (hValid : ValidCapacities c) (hp : ∀ x, 0 ≤ (fun _ : Unit => (1 : ℝ)) x) (hMass : 0 < c.aggregateMass (fun _ => 1)),
c.identifiedIcc (fun _ => 1) witnessObservedMeasure rfl witnessObservedCellWeights hValid hp hMass wObservedLawDomain
= Icc 0 ((7 : ℝ) / 10)
Proof (Lean source)
theorem wInterval : let c := observableCapacities witnessObservedMeasure ∃ (hValid : ValidCapacities c) (hp : ∀ x, 0 ≤ (fun _ : Unit => (1 : ℝ)) x) (hMass : 0 < c.aggregateMass (fun _ => 1)), c.identifiedIcc (fun _ => 1) witnessObservedMeasure rfl witnessObservedCellWeights hValid hp hMass wObservedLawDomain = Icc 0 ((7 : ℝ) / 10) := by dsimp only refine ⟨wValid, by intro x; norm_num, ?_, ?_⟩ · simp [Capacities.aggregateMass] rw [wCapacityFacts.2.1] norm_num · simp [Capacities.identifiedIcc, Capacities.endpointMap, Capacities.aggregateMass, wCapacityFacts.1, wCapacityFacts.2.1, wCapacityFacts.2.2.1, wCapacityFacts.2.2.2.1, wCapacityFacts.2.2.2.2.1, wCapacityFacts.2.2.2.2.2] norm_num
CausalSmith.PartialID.SlateBenefitPartialTransport.wInterval · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:806

the two witness laws attain the lower and upper endpoints.

Formal statement
∃ (PL : POSystem.{0, 0, 0}) (SL : POSlateSystem PL Unit 3) (PU : POSystem.{0, 0, 0}) (SU : POSlateSystem PU Unit 3),
conclusion 1
IsEndpointWitness witnessObservedMeasure (1 / 4) (fun _ => true) 0 PL SL
conclusion 2
IsEndpointWitness witnessObservedMeasure (1 / 4) (fun _ => true) ((7 : ℝ) / 10) PU SU
Proof (Lean source)
theorem wEndpointWitnesses : ∃ (PL : POSystem.{0, 0, 0}) (SL : POSlateSystem PL Unit 3) (PU : POSystem.{0, 0, 0}) (SU : POSlateSystem PU Unit 3), IsEndpointWitness witnessObservedMeasure (1 / 4) (fun _ => true) 0 PL SL ∧ IsEndpointWitness witnessObservedMeasure (1 / 4) (fun _ => true) ((7 : ℝ) / 10) PU SU := by obtain ⟨baseline, PL, SL, PU, SU, hL, hU, hRL, hRU⟩ := full_law_endpoint_attainment wCandidate.slate (1 / 4) (fun _ => true) wModel.ivIndependence wModel.noDefiers wModel.weakSelectionMonotonicity wModel refine ⟨PL, SL, PU, SU, ?_, ?_⟩ · rw [wEndpoint] at hL rw [wObservedLaw] at hL exact hL · rw [wEndpoint] at hU rw [wObservedLaw] at hU exact hU
CausalSmith.PartialID.SlateBenefitPartialTransport.wEndpointWitnesses · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:825
theorem three_level_witness_sharp Theorem 6 in the paper ↗

The explicit witness belongs to the model class, gives capacities (3/40,1/10,3/40) and (1/10,1/4,3/20), and has sharp interval [0,7/10] with both endpoints attained by full laws. the stated conclusion follows.

Formal statement
i :
c.lower () i = ![(3 : ℝ) / 40, (1 : ℝ) / 10, (3 : ℝ) / 40] i
j :
c.upper () j = ![(1 : ℝ) / 10, (1 : ℝ) / 4, (3 : ℝ) / 20] j
c.q0 () = (1 : ℝ) / 4
c.mass () = (1 : ℝ) / 4
c.q1 () = (1 : ℝ) / 2
c.gap () = (1 : ℝ) / 4
c.benefitLower () = 0
c.benefitUpper () = (7 : ℝ) / 40
∃ (hValid : ValidCapacities c) (hp : ∀ x, 0 ≤ (fun _ : Unit => (1 : ℝ)) x) (hMass : 0 < c.aggregateMass (fun _ => 1)),
c.identifiedIcc (fun _ => 1) witnessObservedMeasure rfl witnessObservedCellWeights hValid hp hMass wObservedLawDomain
= Icc 0 ((7 : ℝ) / 10)
∃ (PL : POSystem.{0, 0, 0}) (SL : POSlateSystem PL Unit 3) (PU : POSystem.{0, 0, 0}) (SU : POSlateSystem PU Unit 3),
IsEndpointWitness witnessObservedMeasure (1 / 4) (fun _ => true) 0 PL SL
IsEndpointWitness witnessObservedMeasure (1 / 4) (fun _ => true) ((7 : ℝ) / 10) PU SU
Proof (Lean source)
-- @node: prop:three-level-witness theorem three_level_witness_sharp : let c := observableCapacities witnessObservedMeasure WitnessFullLawRealization ∧ (∀ i, c.lower () i = ![(3 : ℝ) / 40, (1 : ℝ) / 10, (3 : ℝ) / 40] i) ∧ (∀ j, c.upper () j = ![(1 : ℝ) / 10, (1 : ℝ) / 4, (3 : ℝ) / 20] j) ∧ c.q0 () = (1 : ℝ) / 4 ∧ c.mass () = (1 : ℝ) / 4 ∧ c.q1 () = (1 : ℝ) / 2 ∧ c.gap () = (1 : ℝ) / 4 ∧ c.benefitLower () = 0 ∧ c.benefitUpper () = (7 : ℝ) / 40 ∧ (∃ (hValid : ValidCapacities c) (hp : ∀ x, 0 ≤ (fun _ : Unit => (1 : ℝ)) x) (hMass : 0 < c.aggregateMass (fun _ => 1)), c.identifiedIcc (fun _ => 1) witnessObservedMeasure rfl witnessObservedCellWeights hValid hp hMass wObservedLawDomain = Icc 0 ((7 : ℝ) / 10)) ∧ (∃ (PL : POSystem.{0, 0, 0}) (SL : POSlateSystem PL Unit 3) (PU : POSystem.{0, 0, 0}) (SU : POSlateSystem PU Unit 3), IsEndpointWitness witnessObservedMeasure (1 / 4) (fun _ => true) 0 PL SL ∧ IsEndpointWitness witnessObservedMeasure (1 / 4) (fun _ => true) ((7 : ℝ) / 10) PU SU) := by dsimp only exact ⟨wRealization, wLower, wUpper, wCapacityFacts.1, wCapacityFacts.2.1, wCapacityFacts.2.2.1, wCapacityFacts.2.2.2.1, wCapacityFacts.2.2.2.2.1, wCapacityFacts.2.2.2.2.2, wInterval, wEndpointWitnesses⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.three_level_witness_sharp · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TThreeLevelWitness.lean:843
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.TTieFaceCollapse 11 declarations At zero selected-complier selection gap, the exact-row, exact-column, and fixed-marginal transport faces coincide, together with all cut formulas.

Observable tie-face collapse

At zero selected-complier selection gap, the exact-row, exact-column, and fixed-marginal transport faces coincide, together with all cut formulas.

theorem measurable_POSlate_SofD

the po slate sof d map is measurable.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
d :
Measurable (S.SofD d)
Proof (Lean source)
theorem measurable_POSlate_SofD (S : POSlateSystem P 𝒳 K) (d : Bool) : Measurable (S.SofD d) := S.sVar.measurable_cfUnder S.dVar d
CausalSmith.PartialID.SlateBenefitPartialTransport.measurable_POSlate_SofD · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:20
theorem sum_rowMass_eq_totalMass Lemma sum_rowMass_eq_totalMass in the paper ↗

the sum row mass equals total mass property holds.

Formal statement
K :
shared
γ :
(∑ i, rowMass γ i) = totalMass γ
Proof (Lean source)
theorem sum_rowMass_eq_totalMass (γ : Coupling K) : (∑ i, rowMass γ i) = totalMass γ := by rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.sum_rowMass_eq_totalMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:25
theorem sum_columnMass_eq_totalMass Lemma sum_columnMass_eq_totalMass in the paper ↗

the sum column mass equals total mass property holds.

Formal statement
K :
shared
γ :
(∑ j, columnMass γ j) = totalMass γ
Proof (Lean source)
theorem sum_columnMass_eq_totalMass (γ : Coupling K) : (∑ j, columnMass γ j) = totalMass γ := by simp only [columnMass, totalMass, Finset.sum_comm]
CausalSmith.PartialID.SlateBenefitPartialTransport.sum_columnMass_eq_totalMass · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:31
theorem pointwise_eq_of_le_of_sum_eq Lemma pointwise_eq_of_le_of_sum_eq in the paper ↗

Given the stated hypotheses, the pointwise equals of is at most of sum eq property holds.

Formal statement
K :
Fin K → ℝ
shared
hab :
∀ i, a i ≤ b i
hsum :
(∑ i, a i) = ∑ i, b i
i :
a i = b i
Proof (Lean source)
theorem pointwise_eq_of_le_of_sum_eq {a b : Fin K → ℝ} (hab : ∀ i, a i ≤ b i) (hsum : (∑ i, a i) = ∑ i, b i) : ∀ i, a i = b i := by intro i by_contra hne have hlt : a i < b i := lt_of_le_of_ne (hab i) hne have : (∑ j, a j) < ∑ j, b j := Finset.sum_lt_sum (fun j _ => hab j) ⟨i, Finset.mem_univ i, hlt⟩ linarith
CausalSmith.PartialID.SlateBenefitPartialTransport.pointwise_eq_of_le_of_sum_eq · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:37
theorem branchFree_exact_rows_of_q0_le_q1

Given the stated hypotheses, the branch free exact rows whenever q0 is at most q1 property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
hq :
c.q0 x ≤ c.q1 x
γ :
:
γ ∈ branchFreePolytope c hValid x
i :
rowMass γ i = c.lower x i
Proof (Lean source)
theorem branchFree_exact_rows_of_q0_le_q1 (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) (hq : c.q0 x ≤ c.q1 x) {γ : Coupling K} (hγ : γ ∈ branchFreePolytope c hValid x) : ∀ i, rowMass γ i = c.lower x i := by apply pointwise_eq_of_le_of_sum_eq hγ.2.1 rw [sum_rowMass_eq_totalMass, hγ.2.2.2, Capacities.mass, min_eq_left hq] rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.branchFree_exact_rows_of_q0_le_q1 · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:49
theorem branchFree_exact_columns_of_q1_le_q0

Given the stated hypotheses, the branch free exact columns whenever q1 is at most q0 property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
hq :
c.q1 x ≤ c.q0 x
γ :
:
γ ∈ branchFreePolytope c hValid x
j :
columnMass γ j = c.upper x j
Proof (Lean source)
theorem branchFree_exact_columns_of_q1_le_q0 (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) (hq : c.q1 x ≤ c.q0 x) {γ : Coupling K} (hγ : γ ∈ branchFreePolytope c hValid x) : ∀ j, columnMass γ j = c.upper x j := by apply pointwise_eq_of_le_of_sum_eq hγ.2.2.1 rw [sum_columnMass_eq_totalMass, hγ.2.2.2, Capacities.mass, min_eq_right hq] rfl
CausalSmith.PartialID.SlateBenefitPartialTransport.branchFree_exact_columns_of_q1_le_q0 · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:59
theorem polytope_tie_iff_gap_zero

Given the stated hypotheses, the polytope tie exactly when gap zero property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
(incPolytope c hValid x = decPolytope c hValid x ∧ decPolytope c hValid x = tiePolytope c hValid x)
↔ c.gap x = 0
Proof (Lean source)
theorem polytope_tie_iff_gap_zero (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) : ((incPolytope c hValid x = decPolytope c hValid x ∧ decPolytope c hValid x = tiePolytope c hValid x) ↔ c.gap x = 0) := by have hflow := (thresholdFlow_endpoint_spec c hValid x).1 constructor · rintro ⟨hincdec, hdectie⟩ rcases le_total (c.q0 x) (c.q1 x) with hq | hq · have hinc : thresholdFlowLower c hValid x ∈ incPolytope c hValid x := ⟨hflow.1, branchFree_exact_rows_of_q0_le_q1 c hValid x hq hflow, hflow.2.2.1⟩ have htie : thresholdFlowLower c hValid x ∈ tiePolytope c hValid x := by rw [← hdectie, ← hincdec] exact hinc have htot0 : c.q0 x = totalMass (thresholdFlowLower c hValid x) := by rw [← sum_rowMass_eq_totalMass] exact Finset.sum_congr rfl (fun i _ => (hinc.2.1 i).symm) have htot1 : c.q1 x = totalMass (thresholdFlowLower c hValid x) := by rw [← sum_columnMass_eq_totalMass] exact Finset.sum_congr rfl (fun j _ => (htie.2.2 j).symm) simp only [Capacities.gap] linarith · have hdec : thresholdFlowLower c hValid x ∈ decPolytope c hValid x := ⟨hflow.1, hflow.2.1, branchFree_exact_columns_of_q1_le_q0 c hValid x hq hflow⟩ have htie : thresholdFlowLower c hValid x ∈ tiePolytope c hValid x := by rw [← hdectie] exact hdec have htot0 : c.q0 x = totalMass (thresholdFlowLower c hValid x) := by rw [← sum_rowMass_eq_totalMass] exact Finset.sum_congr rfl (fun i _ => (htie.2.1 i).symm) have htot1 : c.q1 x = totalMass (thresholdFlowLower c hValid x) := by rw [← sum_columnMass_eq_totalMass] exact Finset.sum_congr rfl (fun j _ => (hdec.2.2 j).symm) simp only [Capacities.gap] linarith · intro hgap have hq : c.q0 x = c.q1 x := by exact (sub_eq_zero.mp (by simpa [Capacities.gap] using hgap)).symm have hle01 : c.q0 x ≤ c.q1 x := hq.le have hle10 : c.q1 x ≤ c.q0 x := hq.ge apply intro <;> ext γ · constructor · intro hγ have hstar : γ ∈ branchFreePolytope c hValid x := by exact ⟨hγ.1, fun i => (hγ.2.1 i).le, hγ.2.2, by rw [← sum_rowMass_eq_totalMass, Finset.sum_congr rfl (fun i _ => hγ.2.1 i), Capacities.mass, min_eq_left hle01, Capacities.q0]⟩ exact ⟨hγ.1, hstar.2.1, branchFree_exact_columns_of_q1_le_q0 c hValid x hle10 hstar⟩ · intro hγ have hstar : γ ∈ branchFreePolytope c hValid x := by exact ⟨hγ.1, hγ.2.1, fun j => (hγ.2.2 j).le, by rw [← sum_columnMass_eq_totalMass, Finset.sum_congr rfl (fun j _ => hγ.2.2 j), Capacities.mass, min_eq_right hle10, Capacities.q1]⟩ exact ⟨hγ.1, branchFree_exact_rows_of_q0_le_q1 c hValid x hle01 hstar, fun j => (hγ.2.2 j).le⟩ · constructor · exact fun hγ => ⟨hγ.1, branchFree_exact_rows_of_q0_le_q1 c hValid x hle01 ⟨hγ.1, hγ.2.1, fun j => (hγ.2.2 j).le, by rw [← sum_columnMass_eq_totalMass, Finset.sum_congr rfl (fun j _ => hγ.2.2 j), Capacities.mass, min_eq_right hle10, Capacities.q1]⟩, hγ.2.2⟩ · exact fun hγ => ⟨hγ.1, fun i => (hγ.2.1 i).le, hγ.2.2⟩
CausalSmith.PartialID.SlateBenefitPartialTransport.polytope_tie_iff_gap_zero · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:69
theorem branchFree_eq_tie_of_gap_zero

Given the stated hypotheses, the branch free equals tie whenever gap zero property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
hValid :
x :
𝒳
hgap :
c.gap x = 0
branchFreePolytope c hValid x = tiePolytope c hValid x
Proof (Lean source)
theorem branchFree_eq_tie_of_gap_zero (c : Capacities 𝒳 K) (hValid : ValidCapacities c) (x : 𝒳) (hgap : c.gap x = 0) : branchFreePolytope c hValid x = tiePolytope c hValid x := by have hq : c.q0 x = c.q1 x := (sub_eq_zero.mp (by simpa [Capacities.gap] using hgap)).symm have hle01 : c.q0 x ≤ c.q1 x := hq.le have hle10 : c.q1 x ≤ c.q0 x := hq.ge ext γ constructor · intro hγ exact ⟨hγ.1, branchFree_exact_rows_of_q0_le_q1 c hValid x hle01 hγ, branchFree_exact_columns_of_q1_le_q0 c hValid x hle10 hγ⟩ · intro hγ refine ⟨hγ.1, fun i => (hγ.2.1 i).le, fun j => (hγ.2.2 j).le, ?_⟩ rw [← sum_rowMass_eq_totalMass, Finset.sum_congr rfl (fun i _ => hγ.2.1 i), Capacities.mass, min_eq_left hle01, Capacities.q0]
CausalSmith.PartialID.SlateBenefitPartialTransport.branchFree_eq_tie_of_gap_zero · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:141
theorem prefix_difference_eq_tail_difference_of_gap_zero

Given the stated hypotheses, the prefix difference equals tail difference whenever gap zero property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
c :
Capacities 𝒳 K
x :
𝒳
hgap :
c.gap x = 0
t :
Fin K
c.lowerLe x t - c.upperLe x t = c.upperGt x t - c.lowerGt x t
Proof (Lean source)
theorem prefix_difference_eq_tail_difference_of_gap_zero (c : Capacities 𝒳 K) (x : 𝒳) (hgap : c.gap x = 0) (t : Fin K) : c.lowerLe x t - c.upperLe x t = c.upperGt x t - c.lowerGt x t := by have hq : c.q0 x = c.q1 x := (sub_eq_zero.mp (by simpa [Capacities.gap] using hgap)).symm have hlower : c.lowerLe x t + c.lowerGt x t = c.q0 x := by simpa [Capacities.lowerLe, Capacities.lowerGt, Capacities.q0, not_le] using (Finset.sum_filter_add_sum_filter_not univ (fun i : Fin K => i ≤ t) (c.lower x)) have hupper : c.upperLe x t + c.upperGt x t = c.q1 x := by simpa [Capacities.upperLe, Capacities.upperGt, Capacities.q1, not_le] using (Finset.sum_filter_add_sum_filter_not univ (fun j : Fin K => j ≤ t) (c.upper x)) linarith
CausalSmith.PartialID.SlateBenefitPartialTransport.prefix_difference_eq_tail_difference_of_gap_zero · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:161
theorem equalSelectionComplierMass_of_zero_gap

Given the stated hypotheses, the equal selection complier mass whenever zero gap property holds.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
d :
𝒳 → Bool
hMonotone :
x :
𝒳
hgapIdent :
hgap :
(observableCapacities S.observedLaw).gap x = 0
equalSelectionComplierMass S x = conditionalReal P.μ S.complierEvent (S.xEvent x)
Proof (Lean source)
theorem equalSelectionComplierMass_of_zero_gap (S : POSlateSystem P 𝒳 K) (d : 𝒳 → Bool) (hMonotone : WeakSelectionMonotonicity S d) (x : 𝒳) (hgapIdent : (observableCapacities S.observedLaw).gap x = selectedComplierMass S true x - selectedComplierMass S false x) (hgap : (observableCapacities S.observedLaw).gap x = 0) : equalSelectionComplierMass S x = conditionalReal P.μ S.complierEvent (S.xEvent x) := by have hselected : selectedComplierMass S true x = selectedComplierMass S false x := by rw [hgap] at hgapIdent linarith by_cases hB : 0 < P.μ.real (S.xEvent x) · have hBne : P.μ.real (S.xEvent x) ≠ 0 := ne_of_gt hB have hnumReal : P.μ.real ({ω | S.SofD true ω = true ∧ ω ∈ S.complierEvent} ∩ S.xEvent x) = P.μ.real ({ω | S.SofD false ω = true ∧ ω ∈ S.complierEvent} ∩ S.xEvent x) := by apply (div_left_inj' hBne).mp simpa [selectedComplierMass, conditionalReal, hB] using hselected let CB : Set P.Ω := S.complierEvent ∩ S.xEvent x let A0 : Set P.Ω := {ω | S.SofD false ω = true} let A1 : Set P.Ω := {ω | S.SofD true ω = true} let ν : Measure P.Ω := P.μ.restrict CB have hA0 : MeasurableSet A0 := by dsimp [A0] exact (measurable_POSlate_SofD S false) (measurableSet_singleton true) have hA1 : MeasurableSet A1 := by dsimp [A1] exact (measurable_POSlate_SofD S true) (measurableSet_singleton true) have hνmass : ν A0 = ν A1 := by apply (measureReal_eq_measureReal_iff).mp have hset0 : A0 ∩ CB = {ω | S.SofD false ω = true ∧ ω ∈ S.complierEvent} ∩ S.xEvent x := by ext ω simp [A0, CB, and_assoc, and_left_comm, and_comm] have hset1 : A1 ∩ CB = {ω | S.SofD true ω = true ∧ ω ∈ S.complierEvent} ∩ S.xEvent x := by ext ω simp [A1, CB, and_assoc, and_left_comm, and_comm] simpa [ν, Measure.restrict_apply, hA0, hA1, hset0, hset1] using hnumReal.symm have hmono : (fun ω => A0.indicator (fun _ => (1 : ENNReal)) ω) =ᵐ[ν] (fun ω => A1.indicator (fun _ => (1 : ENNReal)) ω) := by have horder : (fun ω => A0.indicator (fun _ => (1 : ENNReal)) ω) ≤ᵐ[ν] (fun ω => A1.indicator (fun _ => (1 : ENNReal)) ω) ∨ (fun ω => A1.indicator (fun _ => (1 : ENNReal)) ω) ≤ᵐ[ν] (fun ω => A0.indicator (fun _ => (1 : ENNReal)) ω) := by by_cases hpos : 0 < P.μ CB · have hm := hMonotone x hpos by_cases hd : d x = true · left filter_upwards [hm] with ω hω simp only [A0, A1, indicator] split_ifs <;> simp_all <;> first | contradiction | decide · right have hd' : d x = false := Bool.eq_false_of_not_eq_true hd filter_upwards [hm] with ω hω simp only [A0, A1, indicator] split_ifs <;> simp_all <;> first | contradiction | decide · have hzero : P.μ CB = 0 := bot_unique (not_lt.mp hpos) have hνzero : ν = 0 := Measure.restrict_eq_zero.mpr hzero rw [hνzero] left rw [MeasureTheory.ae_zero] trivial rcases horder with hle | hle · exact ae_eq_of_ae_le_of_lintegral_le hle (by simp [MeasureTheory.lintegral_indicator, hA0]) (Measurable.indicator measurable_const hA1).aemeasurable (by simpa [MeasureTheory.lintegral_indicator, hA0, hA1] using hνmass.ge) · exact (ae_eq_of_ae_le_of_lintegral_le hle (by simp [MeasureTheory.lintegral_indicator, hA1]) (Measurable.indicator measurable_const hA0).aemeasurable (by simpa [MeasureTheory.lintegral_indicator, hA0, hA1] using hνmass.le)).symm have heq : ∀ᵐ ω ∂ν, S.SofD false ω = S.SofD true ω := by filter_upwards [hmono] with ω hω simp only [A0, A1, indicator] at hω split_ifs at hω <;> simp_all have hmeasure : P.μ ({ω | S.SofD false ω = S.SofD true ω ∧ ω ∈ S.complierEvent} ∩ S.xEvent x) = P.μ (S.complierEvent ∩ S.xEvent x) := by let E : Set P.Ω := {ω | S.SofD false ω = S.SofD true ω} have hE : MeasurableSet E := by dsimp [E] exact measurableSet_eq_fun (measurable_POSlate_SofD S false) (measurable_POSlate_SofD S true) have hν : ν E = ν univ := by apply measure_congr filter_upwards [heq] with ω hω change (ω ∈ E) = (ω ∈ univ) simp [E, hω] rw [show ν E = P.μ (E ∩ CB) from Measure.restrict_apply hE, show ν univ = P.μ (univ ∩ CB) from Measure.restrict_apply MeasurableSet.univ] at hν have hset : E ∩ CB = {ω | S.SofD false ω = S.SofD true ω ∧ ω ∈ S.complierEvent} ∩ S.xEvent x := by ext ω simp [E, CB, and_assoc, and_left_comm, and_comm] simpa [hset] using hν unfold equalSelectionComplierMass conditionalReal rw [if_pos hB, if_pos hB] congr 1 exact (measureReal_eq_measureReal_iff).2 hmeasure · simp [equalSelectionComplierMass, conditionalReal, hB]
CausalSmith.PartialID.SlateBenefitPartialTransport.equalSelectionComplierMass_of_zero_gap · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:178
theorem tie_face_collapse Theorem 2 in the paper ↗

On every supported observable tie cell, weak selection monotonicity collapses selection strata and all three partial-transport faces and cut expressions agree. the stated conclusion follows.

Formal statement
𝒳 :
Type u_1
shared
K :
shared
P :
shared
S :
POSlateSystem P 𝒳 K
εZ :
d :
𝒳 → Bool
model :
c :
observableCapacities S.observedLaw
hIdentification :
capacity_identification S εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity
hValid :
hIdentification.1.2 (: ValidCapacities c)
x :
0 < S.p x
(incPolytope c hValid x = decPolytope c hValid x ∧ decPolytope c hValid x = tiePolytope c hValid x)
↔ c.gap x = 0
c.gap x = 0
equalSelectionComplierMass S x = conditionalReal P.μ S.complierEvent (S.xEvent x)
c.gap x = 0
branchFreePolytope c hValid x = incPolytope c hValid x
branchFreePolytope c hValid x = decPolytope c hValid x
branchFreePolytope c hValid x = tiePolytope c hValid x
c.gap x = 0
t :
c.lowerLe x t - c.upperLe x t = c.upperGt x t - c.lowerGt x t
Proof (Lean source)
-- @node: prop:tie-face-collapse theorem tie_face_collapse (S : POSlateSystem P 𝒳 K) (εZ : ℝ) (d : 𝒳 → Bool) (model : TieSafeSurvivorModel S εZ d) : let c := observableCapacities S.observedLaw let hIdentification := capacity_identification S εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity let hValid : ValidCapacities c := hIdentification.1.2 ∀ x, 0 < S.p x → ((incPolytope c hValid x = decPolytope c hValid x ∧ decPolytope c hValid x = tiePolytope c hValid x) ↔ c.gap x = 0) ∧ (c.gap x = 0 → equalSelectionComplierMass S x = conditionalReal P.μ S.complierEvent (S.xEvent x)) ∧ (c.gap x = 0 → branchFreePolytope c hValid x = incPolytope c hValid x ∧ branchFreePolytope c hValid x = decPolytope c hValid x ∧ branchFreePolytope c hValid x = tiePolytope c hValid x) ∧ (c.gap x = 0 → ∀ t, c.lowerLe x t - c.upperLe x t = c.upperGt x t - c.lowerGt x t) := by dsimp let ident := capacity_identification S εZ d model.ivIndependence model.treatmentConsistency model.selectionExclusion model.outcomeExclusion model.instrumentOverlap model.noDefiers model.weakSelectionMonotonicity intro x hp have hValid : ValidCapacities (observableCapacities S.observedLaw) := ident.1.2 refine ⟨polytope_tie_iff_gap_zero _ hValid x, ?_, ?_, ?_⟩ · exact fun hgap => equalSelectionComplierMass_of_zero_gap S d model.weakSelectionMonotonicity x (ident.2.2.2.2.1 x hp) hgap · intro hgap have hstar := branchFree_eq_tie_of_gap_zero _ hValid x hgap have hfaces := (polytope_tie_iff_gap_zero _ hValid x).2 hgap exact ⟨hstar.trans (hfaces.1.trans hfaces.2).symm, hstar.trans hfaces.2.symm, hstar⟩ · exact fun hgap t => prefix_difference_eq_tail_difference_of_gap_zero _ x hgap t
CausalSmith.PartialID.SlateBenefitPartialTransport.tie_face_collapse · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TTieFaceCollapse.lean:285
CausalSmith.PartialID.PID_SlateBenefitPartialtransport_Research.TUniformDeterministicGuard 2 declarations Finite-support concentration and deterministic Lipschitz bounds yield uniform endpoint consistency and conservative containment of the entire identified interval, without a direction-separation condition or any cited gat

Uniform deterministic guard

Finite-support concentration and deterministic Lipschitz bounds yield uniform endpoint consistency and conservative containment of the entire identified interval, without a direction-separation condition or any cited gate.

def UniformSlateFamily

The uniform slate family condition is the stated property of the slate-benefit partial-transport model.

Definition (Lean source)
Λ :
Type u_1
shared
𝒳 :
Type u_2
shared
Ω :
Type u_3
shared
K :
shared
Psys :
Λ → POSystem
Sys :
∀ law, POSlateSystem (Psys law) 𝒳 K
μ :
Λ → Measure Ω
O :
Λ → ℕ → Ω → ObservedDatum 𝒳 K
εZ mstar :
d :
Λ → 𝒳 → Bool
law n :
hn :
1 ≤ n
UniformSlateFamily Psys Sys μ O εZ mstar d :
Prop
_ :
(Sys law).borel (: StandardBorelSpace (Psys law).Ω)
PositiveUniformInferenceLawClass (μ := μ law) (Sys law) εZ mstar (d law) n hn (O law)
CausalSmith.PartialID.SlateBenefitPartialTransport.UniformSlateFamily · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TUniformDeterministicGuard.lean:24
theorem uniform_deterministic_guard Theorem 9 in the paper ↗

The alpha-indexed capped guard gives every-sample uniform coverage, fixed-alpha uniform endpoint consistency, its deterministic rate, and the stated slowly diverging screening specialization. Given the stated hypotheses, the stated conclusion follows.

Formal statement
Λ :
Type u_1
shared
𝒳 :
Type u_2
shared
Ω :
Type u_3
shared
K :
shared
Psys :
Λ → POSystem
Sys :
∀ law, POSlateSystem (Psys law) 𝒳 K
μ :
Λ → Measure Ω
O :
Λ → ℕ → Ω → ObservedDatum 𝒳 K
ξ :
Λ → ℕ → Ω → ℝ
η :
ℕ → ℝ
εZ mstar α :
d :
Λ → 𝒳 → Bool
hAlpha :
0 < α ∧ α < 1
_hOverlapDomain :
0 < εZ ∧ εZ < (1 : ℝ) / 2
_hmstar :
0 < mstar
_hEtaPositive :
∀ n, 0 < η n
_hEtaZero :
Tendsto η atTop (𝓝 0)
_hSqrtEta :
Tendsto (fun n : ℕ => sqrt n * η n) atTop atTop
_hUniformClass :
UniformSlateFamily Psys Sys μ O εZ mstar d
hK :
(Sys (choice inferInstance)).hK (: 3 ≤ K)
n :
(hn : 1 ≤ n)
1 - α
sInf {q : ℝ | ∃ law, let _ : StandardBorelSpace (Psys law).Ω := (Sys law).borel let cls := _hUniformClass law n hn let c := observableCapacities (Sys law).observedLaw let ident := capacity_identification (Sys law) εZ (d law) cls.ivIndependence cls.treatmentConsistency cls.selectionExclusion cls.outcomeExclusion cls.instrumentOverlap cls.noDefiers cls.weakSelectionMonotonicity let hValid : ValidCapacities c := ident.1.2 let hp : ∀ x, 0 ≤ (Sys law).p x := ident.2.1 let hMass : 0 < c.aggregateMass (Sys law).p := lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2 q = (μ law).real {ω | c.identifiedIcc (Sys law).p (Sys law).observedLaw rfl (p_eq_observedCellWeights (Sys law)) hValid hp hMass (observedLawDomain (Sys law)) ⊆ guardedConfidenceInterval (O law) (ξ law) η mstar εZ α hAlpha _hmstar _hOverlapDomain n hK hn (_hEtaPositive n) ω}}
Tendsto (fun n => if hn : 1 ≤ n then sSup {q : ℝ | ∃ law, let _ : StandardBorelSpace (Psys law).Ω := (Sys law).borel let cls := _hUniformClass law n hn let c := observableCapacities (Sys law).observedLaw let ident := capacity_identification (Sys law) εZ (d law) cls.ivIndependence cls.treatmentConsistency cls.selectionExclusion cls.outcomeExclusion cls.instrumentOverlap cls.noDefiers cls.weakSelectionMonotonicity let hValid : ValidCapacities c := ident.1.2 let hp : ∀ x, 0 ≤ (Sys law).p x := ident.2.1 let hMass : 0 < c.aggregateMass (Sys law).p := lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2 q = (μ law).real {ω | guardRadius 𝒳 K n η mstar εZ α hK hn (_hEtaPositive n) _hmstar _hOverlapDomain hAlpha < endpointError (c.endpointMap (Sys law).p (Sys law).observedLaw rfl (p_eq_observedCellWeights (Sys law)) hValid hp hMass (observedLawDomain (Sys law))).endpoints (O law) η n ω}} else 0) atTop (𝓝 0)
(fun n : ℕ => if hn : 1 ≤ n then guardRadius 𝒳 K n η mstar εZ α hK hn (_hEtaPositive n) _hmstar _hOverlapDomain hAlpha else 1)
=O[atTop] (fun n : ℕ => (n : ℝ) ^ (-(1 : ℝ) / 2) + η n)
L :
ℕ → ℝ
(hLPositive : ∀ n, 0 < L n)
L =o[atTop] (fun n : ℕ => sqrt n)
ηL :
fun n : ℕ => (n : ℝ) ^ (-(1 : ℝ) / 2) * L n
n :
1 ≤ n
0 < ηL n
Tendsto ηL atTop (𝓝 0)
Tendsto (fun n : ℕ => sqrt n * ηL n) atTop atTop
(fun n : ℕ => if hn : 1 ≤ n then guardRadius 𝒳 K n ηL mstar εZ α hK hn (by dsimp [ηL] have hnNat : 0 < n := lt_of_lt_of_le Nat.zero_lt_one hn have hnReal : 0 < (n : ℝ) := by exact_mod_cast hnNat exact mul_pos (rpow_pos_of_pos hnReal _) (hLPositive n)) _hmstar _hOverlapDomain hAlpha else 1)
=O[atTop] (fun n : ℕ => (n : ℝ) ^ (-(1 : ℝ) / 2) * L n)
Proof (Lean source)
-- @node: thm:uniform-deterministic-guard theorem uniform_deterministic_guard (Psys : Λ → POSystem) (Sys : ∀ law, POSlateSystem (Psys law) 𝒳 K) (μ : Λ → Measure Ω) (O : Λ → ℕ → Ω → ObservedDatum 𝒳 K) (ξ : Λ → ℕ → Ω → ℝ) (η : ℕ → ℝ) (εZ mstar α : ℝ) (d : Λ → 𝒳 → Bool) (hAlpha : 0 < α ∧ α < 1) (_hOverlapDomain : 0 < εZ ∧ εZ < (1 : ℝ) / 2) (_hmstar : 0 < mstar) (_hEtaPositive : ∀ n, 0 < η n) (_hEtaZero : Tendsto η atTop (𝓝 0)) (_hSqrtEta : Tendsto (fun n : ℕ => sqrt n * η n) atTop atTop) (_hUniformClass : UniformSlateFamily Psys Sys μ O εZ mstar d) : let hK : 3 ≤ K := (Sys (Classical.choice inferInstance)).hK (∀ n, (hn : 1 ≤ n) → 1 - α ≤ sInf {q : ℝ | ∃ law, let _ : StandardBorelSpace (Psys law).Ω := (Sys law).borel let cls := _hUniformClass law n hn let c := observableCapacities (Sys law).observedLaw let ident := capacity_identification (Sys law) εZ (d law) cls.ivIndependence cls.treatmentConsistency cls.selectionExclusion cls.outcomeExclusion cls.instrumentOverlap cls.noDefiers cls.weakSelectionMonotonicity let hValid : ValidCapacities c := ident.1.2 let hp : ∀ x, 0 ≤ (Sys law).p x := ident.2.1 let hMass : 0 < c.aggregateMass (Sys law).p := lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2 q = (μ law).real {ω | c.identifiedIcc (Sys law).p (Sys law).observedLaw rfl (p_eq_observedCellWeights (Sys law)) hValid hp hMass (observedLawDomain (Sys law)) ⊆ guardedConfidenceInterval (O law) (ξ law) η mstar εZ α hAlpha _hmstar _hOverlapDomain n hK hn (_hEtaPositive n) ω}}) ∧ Tendsto (fun n => if hn : 1 ≤ n then sSup {q : ℝ | ∃ law, let _ : StandardBorelSpace (Psys law).Ω := (Sys law).borel let cls := _hUniformClass law n hn let c := observableCapacities (Sys law).observedLaw let ident := capacity_identification (Sys law) εZ (d law) cls.ivIndependence cls.treatmentConsistency cls.selectionExclusion cls.outcomeExclusion cls.instrumentOverlap cls.noDefiers cls.weakSelectionMonotonicity let hValid : ValidCapacities c := ident.1.2 let hp : ∀ x, 0 ≤ (Sys law).p x := ident.2.1 let hMass : 0 < c.aggregateMass (Sys law).p := lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2 q = (μ law).real {ω | guardRadius 𝒳 K n η mstar εZ α hK hn (_hEtaPositive n) _hmstar _hOverlapDomain hAlpha < endpointError (c.endpointMap (Sys law).p (Sys law).observedLaw rfl (p_eq_observedCellWeights (Sys law)) hValid hp hMass (observedLawDomain (Sys law))).endpoints (O law) η n ω}} else 0) atTop (𝓝 0) ∧ (fun n : ℕ => if hn : 1 ≤ n then guardRadius 𝒳 K n η mstar εZ α hK hn (_hEtaPositive n) _hmstar _hOverlapDomain hAlpha else 1) =O[atTop] (fun n : ℕ => (n : ℝ) ^ (-(1 : ℝ) / 2) + η n) ∧ (∀ L : ℕ → ℝ, (hLPositive : ∀ n, 0 < L n) → Tendsto L atTop atTop → L =o[atTop] (fun n : ℕ => sqrt n) → let ηL := fun n : ℕ => (n : ℝ) ^ (-(1 : ℝ) / 2) * L n (∀ n, 1 ≤ n → 0 < ηL n) ∧ Tendsto ηL atTop (𝓝 0) ∧ Tendsto (fun n : ℕ => sqrt n * ηL n) atTop atTop ∧ (fun n : ℕ => if hn : 1 ≤ n then guardRadius 𝒳 K n ηL mstar εZ α hK hn (by dsimp [ηL] have hnNat : 0 < n := lt_of_lt_of_le Nat.zero_lt_one hn have hnReal : 0 < (n : ℝ) := by exact_mod_cast hnNat exact mul_pos (rpow_pos_of_pos hnReal _) (hLPositive n)) _hmstar _hOverlapDomain hAlpha else 1) =O[atTop] (fun n : ℕ => (n : ℝ) ^ (-(1 : ℝ) / 2) * L n)) := by dsimp only have hdet (law : Λ) (n : ℕ) (hn : 1 ≤ n) (hprob : IsProbabilityMeasure (Sys law).observedLaw) (hvalidE : ValidCapacities (observableCapacities (Sys law).observedLaw)) (hpE : ∀ x, 0 ≤ (Sys law).p x) (hpObsE : (Sys law).p = Capacities.observedCellWeights (Sys law).observedLaw) (hmassE : 0 < (observableCapacities (Sys law).observedLaw).aggregateMass (Sys law).p) (ω : Ω) (δ : ℝ) (hδ : 0 ≤ δ) (hdev : maxDeviation (O law) (Sys law).observedLaw n ω ≤ δ) : (endpointError ((observableCapacities (Sys law).observedLaw).endpointMap (Sys law).p (Sys law).observedLaw rfl hpObsE hvalidE hpE hmassE (observedLawDomain (Sys law))).endpoints (O law) η n ω ≤ min 1 (4 * (64 * (K : ℝ) * card 𝒳 / εZ ^ 2 * δ + card 𝒳 * η n) / mstar)) ∧ (4 * (64 * (K : ℝ) * card 𝒳 / εZ ^ 2 * δ + card 𝒳 * η n) < mstar → endpointError ((observableCapacities (Sys law).observedLaw).endpointMap (Sys law).p (Sys law).observedLaw rfl hpObsE hvalidE hpE hmassE (observedLawDomain (Sys law))).endpoints (O law) η n ω ≤ 3 * (64 * (K : ℝ) * card 𝒳 / εZ ^ 2 * δ + card 𝒳 * η n) / mstar) := by letI : StandardBorelSpace (Psys law).Ω := (Sys law).borel letI : IsProbabilityMeasure (Sys law).observedLaw := hprob let cls := _hUniformClass law n hn have ident := capacity_identification (Sys law) εZ (d law) cls.ivIndependence cls.treatmentConsistency cls.selectionExclusion cls.outcomeExclusion cls.instrumentOverlap cls.noDefiers cls.weakSelectionMonotonicity have hpEq : (Sys law).p = fun x => (Sys law).observedLaw.real {o | o.cell = x} := by funext x exact (observedLaw_cell_real (Sys law) x).symm have hover : ∀ x z, εZ * (Sys law).observedLaw.real {o | o.cell = x} ≤ (Sys law).observedLaw.real {o | o.cell = x ∧ o.instrument = z} := by intro x z rw [observedLaw_cell_real (Sys law) x] exact observedLaw_arm_ge_overlap (Sys law) cls.instrumentOverlap x z have hcore := plugInEndpoints_error_le_of_maxDeviation (O law) (Sys law).observedLaw (observedLawDomain (Sys law)) n ω (η n) mstar εZ δ (_hEtaPositive n) _hmstar _hOverlapDomain.1 _hOverlapDomain.2 hover ident.1.2 (by simpa [hpEq] using cls.uniformAggregateSurvivorBound.2) hδ hdev have hplug : plugInEndpoints (O law) η n ω = plugInEndpoints (O law) (fun _ => η n) n ω := by unfold plugInEndpoints screenedCell rfl unfold endpointError Capacities.endpointMap rw [hplug, hpEq] exact hcore let targetEndpoint (law : Λ) (n : ℕ) (hn : 1 ≤ n) : ℝ × ℝ := let _ : StandardBorelSpace (Psys law).Ω := (Sys law).borel let cls := _hUniformClass law n hn let ident := capacity_identification (Sys law) εZ (d law) cls.ivIndependence cls.treatmentConsistency cls.selectionExclusion cls.outcomeExclusion cls.instrumentOverlap cls.noDefiers cls.weakSelectionMonotonicity ((observableCapacities (Sys law).observedLaw).endpointMap (Sys law).p (Sys law).observedLaw rfl (p_eq_observedCellWeights (Sys law)) ident.1.2 ident.2.1 (lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2) (observedLawDomain (Sys law))).endpoints refine ⟨?_, ?_⟩ · intro n hn apply le_csInf · let law : Λ := Classical.choice inferInstance letI : StandardBorelSpace (Psys law).Ω := (Sys law).borel refine ⟨(μ law).real {ω | let cls := _hUniformClass law n hn let c := observableCapacities (Sys law).observedLaw let ident := capacity_identification (Sys law) εZ (d law) cls.ivIndependence cls.treatmentConsistency cls.selectionExclusion cls.outcomeExclusion cls.instrumentOverlap cls.noDefiers cls.weakSelectionMonotonicity let hValid : ValidCapacities c := ident.1.2 let hp : ∀ x, 0 ≤ (Sys law).p x := ident.2.1 let hMass : 0 < c.aggregateMass (Sys law).p := lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2 c.identifiedIcc (Sys law).p (Sys law).observedLaw rfl (p_eq_observedCellWeights (Sys law)) hValid hp hMass (observedLawDomain (Sys law)) ⊆ guardedConfidenceInterval (O law) (ξ law) η mstar εZ α hAlpha _hmstar _hOverlapDomain n (Sys (Classical.choice inferInstance)).hK hn (_hEtaPositive n) ω}, law, rfl⟩ · intro q hq rcases hq with ⟨law, rfl⟩ letI : StandardBorelSpace (Psys law).Ω := (Sys law).borel let cls := _hUniformClass law n hn have ident := capacity_identification (Sys law) εZ (d law) cls.ivIndependence cls.treatmentConsistency cls.selectionExclusion cls.outcomeExclusion cls.instrumentOverlap cls.noDefiers cls.weakSelectionMonotonicity letI : IsProbabilityMeasure (Sys law).observedLaw := ident.1.1 letI : IsProbabilityMeasure (μ law) := cls.iidSampling.isProbabilityMeasure let b := unionThreshold 𝒳 K n α have hb0 : 0 ≤ b := Real.sqrt_nonneg _ have htail : (μ law).real {ω | b < maxDeviation (O law) (Sys law).observedLaw n ω} ≤ α := by exact maxDeviation_unionThreshold_tail_le (O law) (Sys law).observedLaw cls.iidSampling hn hAlpha.1 have hO : ∀ i, i < n → Measurable (O law i) := by intro i hi exact cls.iidSampling.measurable i hi have hmaxmeas := measurable_maxDeviation_of_prefix (O law) (Sys law).observedLaw hO have hsubset : {ω | maxDeviation (O law) (Sys law).observedLaw n ω ≤ b} ⊆ {ω | let c := observableCapacities (Sys law).observedLaw let hValid : ValidCapacities c := ident.1.2 let hp : ∀ x, 0 ≤ (Sys law).p x := ident.2.1 let hMass : 0 < c.aggregateMass (Sys law).p := lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2 c.identifiedIcc (Sys law).p (Sys law).observedLaw rfl (p_eq_observedCellWeights (Sys law)) hValid hp hMass (observedLawDomain (Sys law)) ⊆ guardedConfidenceInterval (O law) (ξ law) η mstar εZ α hAlpha _hmstar _hOverlapDomain n (Sys (Classical.choice inferInstance)).hK hn (_hEtaPositive n) ω} := by intro ω hgood dsimp only have herr := (hdet law n hn ident.1.1 ident.1.2 ident.2.1 (p_eq_observedCellWeights (Sys law)) (lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2) ω b hb0 hgood).1 have hguard : min 1 (4 * (64 * (K : ℝ) * card 𝒳 / εZ ^ 2 * b + card 𝒳 * η n) / mstar) = guardRadius 𝒳 K n η mstar εZ α (Sys (Classical.choice inferInstance)).hK hn (_hEtaPositive n) _hmstar _hOverlapDomain hAlpha := by rfl rw [hguard] at herr have hbds := endpointMap_bounds (Sys law).observedLaw (Sys law).p (observableCapacities (Sys law).observedLaw) rfl (p_eq_observedCellWeights (Sys law)) ident.2.1 ident.1.2 (lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2) (observedLawDomain (Sys law)) intro y hy unfold Capacities.identifiedIcc Capacities.endpointMap at hy unfold guardedConfidenceInterval guardedConfidenceSet dsimp only [GuardedInferenceHandle.confidenceSet] let ψ := plugInEndpoints (O law) η n ω let θ := ((observableCapacities (Sys law).observedLaw).endpointMap (Sys law).p (Sys law).observedLaw rfl (p_eq_observedCellWeights (Sys law)) ident.1.2 ident.2.1 (lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2) (observedLawDomain (Sys law))).endpoints let g := guardRadius 𝒳 K n η mstar εZ α (Sys (Classical.choice inferInstance)).hK hn (_hEtaPositive n) _hmstar _hOverlapDomain hAlpha have hL : |ψ.1 - θ.1| ≤ g := (le_max_left _ _).trans herr have hU : |ψ.2 - θ.2| ≤ g := (le_max_right _ _).trans herr change max 0 (ψ.1 - g) ≤ y ∧ y ≤ min 1 (ψ.2 + g) change θ.1 ≤ y ∧ y ≤ θ.2 at hy change 0 ≤ θ.1 ∧ θ.1 ≤ 1 ∧ 0 ≤ θ.2 ∧ θ.2 ≤ 1 at hbds constructor · apply max_le · exact hbds.1.trans hy.1 · rw [abs_le] at hL linarith · apply le_min · exact hy.2.trans hbds.2.2.2 · rw [abs_le] at hU linarith have hmeasure : (μ law).real {ω | maxDeviation (O law) (Sys law).observedLaw n ω ≤ b} ≤ (μ law).real {ω | let c := observableCapacities (Sys law).observedLaw let hValid : ValidCapacities c := ident.1.2 let hp : ∀ x, 0 ≤ (Sys law).p x := ident.2.1 let hMass : 0 < c.aggregateMass (Sys law).p := lt_of_lt_of_le _hmstar cls.uniformAggregateSurvivorBound.2 c.identifiedIcc (Sys law).p (Sys law).observedLaw rfl (p_eq_observedCellWeights (Sys law)) hValid hp hMass (observedLawDomain (Sys law)) ⊆ guardedConfidenceInterval (O law) (ξ law) η mstar εZ α hAlpha _hmstar _hOverlapDomain n (Sys (Classical.choice inferInstance)).hK hn (_hEtaPositive n) ω} := by apply measureReal_mono · exact hsubset · exact measure_ne_top _ _ -- … truncated; follow the source link for the rest …
CausalSmith.PartialID.SlateBenefitPartialTransport.uniform_deterministic_guard · CausalSmith/PartialID/PID_SlateBenefitPartialtransport_Research/TUniformDeterministicGuard.lean:41