PO.ID.Partial.Sensitivity.MSM

Marginal Sensitivity Model bounds: treated/control-arm feasible weights, cutoff construction, observed-data calibrated candidate endpoints, and ATE interval assembly.

Cutoff­Construct 7 core · 18 supporting · 2 submodules In the marginal sensitivity model with parameter Λ, the largest value of E[Y(1)] is reached by a propensity that takes its extreme admissible values above and below a covariate-dependent outcome cutoff.
Setup 11 core · 6 supporting This file sets up an odds-ratio Marginal Sensitivity Model over the potential-outcome backdoor system POBackdoorSystem. ★ candMean_completeProp_eq_Ymean★ Ymean_mem_Icc★ MSMSet_one_eq

Marginal Sensitivity Model (MSM) for an arm mean E[Y(d)]

This file sets up an odds-ratio Marginal Sensitivity Model over the potential-outcome backdoor system POBackdoorSystem.

For either treatment arm d, unconfoundedness identifies E[Y(d)] by inverse-probability weighting against the observed arm propensity e_d(X) = P[D=d | σ(X)]. The MSM relaxes unconfoundedness by allowing the complete propensity e₀,d(X, Y(d)) = P[D=d | σ(X, Y(d))] to differ from e_d(X), with the discrepancy controlled by a sensitivity parameter Λ ≥ 1 through the odds ratio:

1/Λ ≤ OR(e₀,d(X, Y(d)), e_d(X)) ≤ Λ.

The MSM ambiguity set MSMSet d Λ collects all candidate complete propensities satisfying this odds-ratio bound (and a.e. interiority 0 < · < 1). The candidate unnormalized IPW mean candMean d ẽ = E[1{D=d}·Y/ẽ] traced over this odds-ratio box produces the relaxation [msmLower d Λ, msmUpper d Λ]. The interval-validity theorem places E[Y(d)] inside it under the stated bridge and boundedness hypotheses. The calibrated candidate set is formalized separately.

This file states the definitions and the structural theorems (IPW/tower bridge, membership of the truth, the interval bound, monotonicity in Λ, and the Λ = 1 point-identification collapse).

def OR reviewed
Causalean.PO

For a first real number and a second real number, the odds ratio is the first number's odds divided by the second number's odds, (p1/(1−p1))/(p2/(1−p2))(p₁/(1-p₁))/(p₂/(1-p₂)).

Definition (Lean source)
p₁ p₂ :
ℝ
OR p₁ p₂ :
ℝ
(p₁ / (1 - p₁)) / (p₂ / (1 - p₂))
def sigmaXY reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a treatment arm, the complete-information σ-algebra is the σ-algebra on the sample space generated jointly by the factual covariate and the potential outcome under that arm.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
sigmaXY S d :
comap S.factualX inferInstance ⊔ comap (S.YofD d) inferInstance
def completeProp reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a treatment arm, the complete propensity assigns each unit the conditional probability of receiving that arm given the factual covariate and potential outcome under that arm.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
completeProp S d :
P.Ω → ℝ
P.μ[S.dVar.indicator d | S.sigmaXY d]
def candMean reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system, a treatment arm, and a candidate complete-propensity function, the candidate inverse-probability-weighted mean is the population mean of the arm indicator times factual outcome divided by that candidate function.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
etilde :
P.Ω → ℝ
candMean S d etilde :
ℝ
∫ ω, S.dVar.indicator d ω * S.factualY ω / etilde ω ∂P.μ
def Ymean reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a treatment arm, the arm-specific potential-outcome mean is the population mean of the potential outcome under that arm.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
Ymean S d :
ℝ
∫ ω, S.YofD d ω ∂P.μ
def MSMSet reviewed
Causalean.PO.POBackdoorSystem

The MSM ambiguity set for a binary-treatment backdoor system, a treatment arm, and a sensitivity level consists of candidate complete propensities that are almost surely strictly between zero and one and whose odds relative to the observed arm propensity remain within the sensitivity limits.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
Λ :
ℝ
MSMSet S d Λ :
Set (P.Ω → ℝ)
{ etilde | (∀ᵐ ω ∂P.μ, 0 < etilde ω ∧ etilde ω < 1) ∧ (∀ᵐ ω ∂P.μ, 1 / Λ ≤ OR (etilde ω) (S.propScore d ω) ∧ OR (etilde ω) (S.propScore d ω) ≤ Λ) }
def msmUpper reviewed
Causalean.PO.POBackdoorSystem

The MSM upper bound is the largest unnormalized inverse-probability-weighted arm mean allowed by the odds-ratio ambiguity set for a binary-treatment backdoor system, a treatment arm, and a sensitivity level.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
Λ :
ℝ
msmUpper S d Λ :
ℝ
sSup (S.candMean d '' S.MSMSet d Λ)
def msmLower reviewed
Causalean.PO.POBackdoorSystem

The MSM lower bound is the smallest unnormalized inverse-probability-weighted arm mean allowed by the odds-ratio ambiguity set for a binary-treatment backdoor system, a treatment arm, and a sensitivity level.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
Λ :
ℝ
msmLower S d Λ :
ℝ
sInf (S.candMean d '' S.MSMSet d Λ)
theorem candMean_completeProp_eq_Ymean reviewed
Causalean.PO.POBackdoorSystem

Inverse-probability weighting by the complete propensity recovers the mean potential outcome for the selected arm in a binary-treatment backdoor system under consistency, positivity of that arm's complete propensity, and integrability of the corresponding weighted factual outcome, for the selected arm.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
d :
hcons :
P.Consistency
hpos :
∀ᵐ ω ∂P.μ, 0 < S.completeProp d ω
hcand_int :
Integrable (fun ω => S.dVar.indicator d ω * S.factualY ω / S.completeProp d ω) P.μ
S.candMean d (S.completeProp d) = S.Ymean d
Proof (Lean source)
theorem candMean_completeProp_eq_Ymean [StandardBorelSpace P.Ω] [IsFiniteMeasure P.μ] (d : Bool) (hcons : P.Consistency) (hpos : ∀ᵐ ω ∂P.μ, 0 < S.completeProp d ω) (hcand_int : Integrable (fun ω => S.dVar.indicator d ω * S.factualY ω / S.completeProp d ω) P.μ) : S.candMean d (S.completeProp d) = S.Ymean d := by classical -- Abbreviations. set f : P.Ω → ℝ := S.dVar.indicator d with hf_def set e : P.Ω → ℝ := S.completeProp d with he_def set g : P.Ω → ℝ := fun ω => S.YofD d ω / e ω with hg_def -- (1) Consistency: `f ω * factualY ω = f ω * YofD d ω` pointwise. have hcons_fn : (fun ω => S.factualY ω * f ω) = (fun ω => S.YofD d ω * f ω) := by have h := POVar.factual_mul_indicator_eq_cfUnder_mul_indicator_fn hcons S.yVar S.dVar d (Ne.symm S.hDY) funext ω have := congr_fun h ω simpa [POBackdoorSystem.YofD, POBackdoorSystem.factualY, hf_def] using this -- `candMean e = ∫ g ω * f ω`. have hcandMean_eq : S.candMean d e = ∫ ω, g ω * f ω ∂P.μ := by unfold POBackdoorSystem.candMean refine integral_congr_ae (Filter.Eventually.of_forall ?_) intro ω have hcw : S.factualY ω * f ω = S.YofD d ω * f ω := congr_fun hcons_fn ω -- `f ω * factualY ω / e ω = (YofD d ω / e ω) * f ω`. simp only [hg_def, hf_def] at hcw ⊢ rw [div_eq_mul_inv, div_eq_mul_inv] linear_combination (e ω)⁻¹ * hcw -- (2) `g` is `sigmaXY d`-strongly measurable. have hY1_meas : Measurable[S.sigmaXY d] (S.YofD d) := by have hle : comap (S.YofD d) inferInstance ≤ S.sigmaXY d := le_sup_right exact (comap_measurable (S.YofD d)).mono hle le_rfl have he_smeas : StronglyMeasurable[S.sigmaXY d] e := by rw [he_def] exact stronglyMeasurable_condExp have hg_smeas : StronglyMeasurable[S.sigmaXY d] g := by have he_meas : Measurable[S.sigmaXY d] e := he_smeas.measurable exact (hY1_meas.div he_meas).stronglyMeasurable -- Integrability of `f` and `g * f`. have hf_int : Integrable f P.μ := S.dVar.integrable_indicator d (measurableSet_singleton d) have hgf_int : Integrable (fun ω => g ω * f ω) P.μ := by refine hcand_int.congr (Filter.Eventually.of_forall ?_) intro ω have hcw : S.factualY ω * f ω = S.YofD d ω * f ω := congr_fun hcons_fn ω simp only [hg_def, hf_def] at hcw ⊢ rw [div_eq_mul_inv, div_eq_mul_inv] linear_combination (e ω)⁻¹ * hcw -- (3) Pull-out + tower: `∫ g * f = ∫ g * e`. have hpull : P.μ[fun ω => g ω * f ω | S.sigmaXY d] =ᵐ[P.μ] (fun ω => g ω * e ω) := by have h := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaXY d) (μ := P.μ) hg_smeas hgf_int hf_int -- `μ[g * f | m] =ᵐ g * μ[f | m]`, and `μ[f | m] = e`. have he_cond : (P.μ[f | S.sigmaXY d]) = e := by rw [hf_def, he_def]; rfl refine h.trans ?_ rw [he_cond] rfl have htower : ∫ ω, g ω * f ω ∂P.μ = ∫ ω, g ω * e ω ∂P.μ := by have h1 : ∫ ω, P.μ[fun ω => g ω * f ω | S.sigmaXY d] ω ∂P.μ = ∫ ω, g ω * f ω ∂P.μ := MeasureTheory.integral_condExp (S.sigmaXY_le d) rw [← h1] exact integral_congr_ae hpull -- (4) Cancel: `∫ g * e = ∫ YofD d = Ymean d`. have hcancel : ∫ ω, g ω * e ω ∂P.μ = S.Ymean d := by unfold POBackdoorSystem.Ymean refine integral_congr_ae ?_ filter_upwards [hpos] with ω hω rw [hg_def] field_simp rw [hcandMean_eq, htower, hcancel]
theorem Ymean_mem_Icc reviewed
Causalean.PO.POBackdoorSystem

The mean potential outcome for an arm lies between the smallest and largest candidate means in a binary-treatment backdoor system at a sensitivity level when that arm's complete propensity is admissible, its candidate mean equals its potential-outcome mean, and the candidate means are bounded below and above, for the selected arm:

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
d :
Λ :
ℝ
hmem :
S.completeProp d ∈ S.MSMSet d Λ
hbridge :
S.candMean d (S.completeProp d) = S.Ymean d
hbdd :
BddBelow (S.candMean d '' S.MSMSet d Λ)
hbdd' :
BddAbove (S.candMean d '' S.MSMSet d Λ)
S.Ymean d ∈ Icc (S.msmLower d Λ) (S.msmUpper d Λ)
Proof (Lean source)
theorem Ymean_mem_Icc (d : Bool) (Λ : ℝ) (hmem : S.completeProp d ∈ S.MSMSet d Λ) (hbridge : S.candMean d (S.completeProp d) = S.Ymean d) (hbdd : BddBelow (S.candMean d '' S.MSMSet d Λ)) (hbdd' : BddAbove (S.candMean d '' S.MSMSet d Λ)) : S.Ymean d ∈ Icc (S.msmLower d Λ) (S.msmUpper d Λ) := by have hmemImg : S.candMean d (S.completeProp d) ∈ S.candMean d '' S.MSMSet d Λ := Set.mem_image_of_mem _ hmem rw [Set.mem_Icc, ← hbridge] refine ⟨?_, ?_⟩ · exact csInf_le hbdd hmemImg · exact le_csSup hbdd' hmemImg
theorem MSMSet_one_eq reviewed
Causalean.PO.POBackdoorSystem

At sensitivity one, an admissible candidate complete propensity equals the observed arm propensity almost everywhere in a binary-treatment backdoor system, for the selected arm and candidate, provided the observed arm propensity is strictly between zero and one almost surely and the candidate belongs to the arm's ambiguity set.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
d :
etilde :
P.Ω → ℝ
hprop :
∀ᵐ ω ∂P.μ, 0 < S.propScore d ω ∧ S.propScore d ω < 1
hmem :
etilde ∈ S.MSMSet d 1
∀ᵐ ω ∂P.μ, etilde ω = S.propScore d ω
Proof (Lean source)
theorem MSMSet_one_eq (d : Bool) (etilde : P.Ω → ℝ) (hprop : ∀ᵐ ω ∂P.μ, 0 < S.propScore d ω ∧ S.propScore d ω < 1) (hmem : etilde ∈ S.MSMSet d 1) : ∀ᵐ ω ∂P.μ, etilde ω = S.propScore d ω := by obtain ⟨hint, hor⟩ := hmem filter_upwards [hprop, hint, hor] with ω hq hp hOR obtain ⟨hqpos, hqlt⟩ := hq obtain ⟨hppos, hplt⟩ := hp obtain ⟨hlo, hhi⟩ := hOR -- At Λ = 1, the odds-ratio window is {1}. rw [one_div, inv_one] at hlo have hOReq : OR (etilde ω) (S.propScore d ω) = 1 := le_antisymm hhi hlo -- Unfold OR and clear denominators. set p := etilde ω with hpdef set q := S.propScore d ω with hqdef have h1p : (0:ℝ) < 1 - p := by linarith have h1q : (0:ℝ) < 1 - q := by linarith have hqratio : q / (1 - q) ≠ 0 := by apply div_ne_zero · exact ne_of_gt hqpos · exact ne_of_gt h1q rw [OR, div_eq_one_iff_eq hqratio] at hOReq -- hOReq : p/(1-p) = q/(1-q); conclude p = q. field_simp at hOReq nlinarith [hOReq]
6 supporting declarations (lemmas, instances)
  • sigmaXY_le lemma — The joint σ-algebra σ(X, Y(d)) for the chosen arm is coarser than the ambient σ-algebra.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    S.sigmaXY d ≤ (inferInstance : MeasurableSpace P.Ω)
    Proof (Lean source)
    lemma sigmaXY_le (d : Bool) : S.sigmaXY d ≤ (inferInstance : MeasurableSpace P.Ω) := by refine sup_le ?_ ?_ · exact S.measurable_factualX.comap_le · exact (S.measurable_YofD d).comap_le
    Causalean.PO.POBackdoorSystem.sigmaXY_le · Causalean/PO/ID/Partial/Sensitivity/MSM/Setup.lean:63
  • candMean_eq lemma — The candidate inverse-probability-weighted mean for a candidate complete propensity is the population mean of the arm indicator times the factual outcome, divided by that candidate propensity.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    etilde :
    P.Ω → ℝ
    S.candMean d etilde = ∫ ω, S.dVar.indicator d ω * S.factualY ω / etilde ω ∂P.μ
    Proof (Lean source)
    @[causal_defs_simps] lemma candMean_eq (d : Bool) (etilde : P.Ω → ℝ) : S.candMean d etilde = ∫ ω, S.dVar.indicator d ω * S.factualY ω / etilde ω ∂P.μ := rfl
    Causalean.PO.POBackdoorSystem.candMean_eq · Causalean/PO/ID/Partial/Sensitivity/MSM/Setup.lean:87
  • completeProp_mem_MSMSet theorem — The MSM assumption: the truth lies in the ambiguity set. The d complete propensity e₀ belongs to MSMSet Λ, i.e. it is a.e. interior and its odds ratio against the observed arm propensity e_d(X) is a.e. within [1/Λ, Λ]. This is precisely the marginal sensitivity assumption; the membership facts are supplied as hMSM.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    Λ :
    ℝ
    hMSM :
    (∀ᵐ ω ∂P.μ, 0 < S.completeProp d ω ∧ S.completeProp d ω < 1) ∧
    (∀ᵐ ω ∂P.μ, 1 / Λ ≤ OR (S.completeProp d ω) (S.propScore d ω) ∧ OR (S.completeProp d ω) (S.propScore d ω) ≤ Λ)
    S.completeProp d ∈ S.MSMSet d Λ
    Proof (Lean source)
    theorem completeProp_mem_MSMSet (d : Bool) (Λ : ℝ) (hMSM : (∀ᵐ ω ∂P.μ, 0 < S.completeProp d ω ∧ S.completeProp d ω < 1) ∧ (∀ᵐ ω ∂P.μ, 1 / Λ ≤ OR (S.completeProp d ω) (S.propScore d ω) ∧ OR (S.completeProp d ω) (S.propScore d ω) ≤ Λ)) : S.completeProp d ∈ S.MSMSet d Λ := by simp only [MSMSet, Set.mem_setOf_eq] exact hMSM
    Causalean.PO.POBackdoorSystem.completeProp_mem_MSMSet · Causalean/PO/ID/Partial/Sensitivity/MSM/Setup.lean:222
  • MSMSet_mono theorem — Monotonicity of the ambiguity set in the sensitivity parameter. A larger budget Λ ≤ Λ' (with 1 ≤ Λ) contains every candidate allowed by the smaller budget: MSMSet Λ ⊆ MSMSet Λ'. The odds-ratio window [1/Λ, Λ] widens with Λ.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    Λ Λ' :
    ℝ
    hΛ :
    1 ≤ Λ
    hΛΛ' :
    Λ ≤ Λ'
    S.MSMSet d Λ ⊆ S.MSMSet d Λ'
    Proof (Lean source)
    theorem MSMSet_mono (d : Bool) {Λ Λ' : ℝ} (hΛ : 1 ≤ Λ) (hΛΛ' : Λ ≤ Λ') : S.MSMSet d Λ ⊆ S.MSMSet d Λ' := by have hΛpos : 0 < Λ := lt_of_lt_of_le one_pos hΛ intro etilde hetilde obtain ⟨hint, hor⟩ := hetilde refine ⟨hint, ?_⟩ filter_upwards [hor] with ω hω obtain ⟨hlo, hhi⟩ := hω constructor · have h1 : 1 / Λ' ≤ 1 / Λ := one_div_le_one_div_of_le hΛpos hΛΛ' exact le_trans h1 hlo · exact le_trans hhi hΛΛ'
    Causalean.PO.POBackdoorSystem.MSMSet_mono · Causalean/PO/ID/Partial/Sensitivity/MSM/Setup.lean:258
  • msmUpper_mono theorem — The MSM interval widens with Λ (upper endpoint). Since MSMSet Λ ⊆ MSMSet Λ', the supremum of the candidate mean can only increase. Boundedness of the larger image is required for the sSup comparison.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    Λ Λ' :
    ℝ
    hΛ :
    1 ≤ Λ
    hΛΛ' :
    Λ ≤ Λ'
    hne :
    (S.candMean d '' S.MSMSet d Λ).Nonempty
    hbdd' :
    BddAbove (S.candMean d '' S.MSMSet d Λ')
    S.msmUpper d Λ ≤ S.msmUpper d Λ'
    Proof (Lean source)
    theorem msmUpper_mono (d : Bool) {Λ Λ' : ℝ} (hΛ : 1 ≤ Λ) (hΛΛ' : Λ ≤ Λ') (hne : (S.candMean d '' S.MSMSet d Λ).Nonempty) (hbdd' : BddAbove (S.candMean d '' S.MSMSet d Λ')) : S.msmUpper d Λ ≤ S.msmUpper d Λ' := by have hsub : S.MSMSet d Λ ⊆ S.MSMSet d Λ' := S.MSMSet_mono d hΛ hΛΛ' have himg : S.candMean d '' S.MSMSet d Λ ⊆ S.candMean d '' S.MSMSet d Λ' := Set.image_mono hsub exact csSup_le_csSup hbdd' hne himg
    Causalean.PO.POBackdoorSystem.msmUpper_mono · Causalean/PO/ID/Partial/Sensitivity/MSM/Setup.lean:274
  • msmLower_anti theorem — The MSM interval widens with Λ (lower endpoint). Since MSMSet Λ ⊆ MSMSet Λ', the infimum of the candidate mean can only decrease. Boundedness-below of the larger image is required for the sInf comparison.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    Λ Λ' :
    ℝ
    hΛ :
    1 ≤ Λ
    hΛΛ' :
    Λ ≤ Λ'
    hne :
    (S.candMean d '' S.MSMSet d Λ).Nonempty
    hbdd' :
    BddBelow (S.candMean d '' S.MSMSet d Λ')
    S.msmLower d Λ' ≤ S.msmLower d Λ
    Proof (Lean source)
    theorem msmLower_anti (d : Bool) {Λ Λ' : ℝ} (hΛ : 1 ≤ Λ) (hΛΛ' : Λ ≤ Λ') (hne : (S.candMean d '' S.MSMSet d Λ).Nonempty) (hbdd' : BddBelow (S.candMean d '' S.MSMSet d Λ')) : S.msmLower d Λ' ≤ S.msmLower d Λ := by have hsub : S.MSMSet d Λ ⊆ S.MSMSet d Λ' := S.MSMSet_mono d hΛ hΛΛ' have himg : S.candMean d '' S.MSMSet d Λ ⊆ S.candMean d '' S.MSMSet d Λ' := Set.image_mono hsub exact csInf_le_csInf hbdd' hne himg
    Causalean.PO.POBackdoorSystem.msmLower_anti · Causalean/PO/ID/Partial/Sensitivity/MSM/Setup.lean:286
Calibrated 6 core · 5 supporting This file defines the arm-generic calibrated MSM ambiguity set and proves its basic validity properties. ★ Ymean_mem_Icc_calib★ msmUpperCalib_le_msmUpper

Calibrated marginal-sensitivity set

This file defines the arm-generic calibrated MSM ambiguity set and proves its basic validity properties. It introduces Calibrated, MSMSetCalib, msmUpperCalib, and msmLowerCalib; proves that the true complete propensity is calibrated and therefore belongs to the calibrated set when the MSM assumption holds; proves validity via Ymean_mem_Icc_calib; and, under the stated nonemptiness and boundedness hypotheses, shows that the calibrated endpoints tighten the uncalibrated HT relaxation.

def Calibrated reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system, a treatment arm, and a candidate complete-propensity function, the calibration condition holds exactly when the conditional mean, given the covariate σ-algebra, of that arm's indicator divided by that function equals one almost surely.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
etilde :
P.Ω → ℝ
Calibrated S d etilde :
Prop
P.μ[fun ω => S.dVar.indicator d ω / etilde ω | S.sigmaX] =ᵐ[P.μ] (fun _ => 1)
def MSMSetCalib reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system, a treatment arm, and a sensitivity level, the calibrated MSM ambiguity set contains exactly the candidate complete-propensity functions that belong to the MSM ambiguity set at that level and satisfy the calibration condition.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
Λ :
ℝ
MSMSetCalib S d Λ :
Set (P.Ω → ℝ)
{ etilde | etilde ∈ S.MSMSet d Λ ∧ S.Calibrated d etilde }
def msmUpperCalib reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system, a treatment arm, and a sensitivity level, the calibrated MSM upper bound is the supremum of candidate inverse-probability-weighted means over the calibrated MSM ambiguity set.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
Λ :
ℝ
msmUpperCalib S d Λ :
ℝ
sSup (S.candMean d '' S.MSMSetCalib d Λ)
def msmLowerCalib reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system, a treatment arm, and a sensitivity level, the calibrated MSM lower bound is the infimum of candidate inverse-probability-weighted means over the calibrated MSM ambiguity set.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
d :
Λ :
ℝ
msmLowerCalib S d Λ :
ℝ
sInf (S.candMean d '' S.MSMSetCalib d Λ)
theorem Ymean_mem_Icc_calib reviewed
Causalean.PO.POBackdoorSystem

The mean potential outcome for an arm lies in its calibrated sensitivity interval in a binary-treatment backdoor system at a sensitivity level when the arm's complete propensity is calibrated and admissible, its candidate mean equals its potential-outcome mean, and the calibrated candidate means are bounded below and above, for the selected arm.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
d :
Λ :
ℝ
hmem :
S.completeProp d ∈ S.MSMSetCalib d Λ
hbridge :
S.candMean d (S.completeProp d) = S.Ymean d
hbdd :
BddBelow (S.candMean d '' S.MSMSetCalib d Λ)
hbdd' :
BddAbove (S.candMean d '' S.MSMSetCalib d Λ)
S.Ymean d ∈ Icc (S.msmLowerCalib d Λ) (S.msmUpperCalib d Λ)
Proof (Lean source)
theorem Ymean_mem_Icc_calib (d : Bool) (Λ : ℝ) (hmem : S.completeProp d ∈ S.MSMSetCalib d Λ) (hbridge : S.candMean d (S.completeProp d) = S.Ymean d) (hbdd : BddBelow (S.candMean d '' S.MSMSetCalib d Λ)) (hbdd' : BddAbove (S.candMean d '' S.MSMSetCalib d Λ)) : S.Ymean d ∈ Icc (S.msmLowerCalib d Λ) (S.msmUpperCalib d Λ) := by have hmemImg : S.candMean d (S.completeProp d) ∈ S.candMean d '' S.MSMSetCalib d Λ := Set.mem_image_of_mem _ hmem rw [Set.mem_Icc, ← hbridge] refine ⟨?_, ?_⟩ · exact csInf_le hbdd hmemImg · exact le_csSup hbdd' hmemImg
theorem msmUpperCalib_le_msmUpper reviewed
Causalean.PO.POBackdoorSystem

The calibrated upper endpoint does not exceed the uncalibrated HT-relaxation upper endpoint for a binary-treatment backdoor system, the selected arm, and a sensitivity level, provided the calibrated candidate-mean range is nonempty and the uncalibrated range is bounded above.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
d :
Λ :
ℝ
hne :
(S.candMean d '' S.MSMSetCalib d Λ).Nonempty
hbdd :
BddAbove (S.candMean d '' S.MSMSet d Λ)
S.msmUpperCalib d Λ ≤ S.msmUpper d Λ
Proof (Lean source)
theorem msmUpperCalib_le_msmUpper (d : Bool) (Λ : ℝ) (hne : (S.candMean d '' S.MSMSetCalib d Λ).Nonempty) (hbdd : BddAbove (S.candMean d '' S.MSMSet d Λ)) : S.msmUpperCalib d Λ ≤ S.msmUpper d Λ := by have hsub : S.MSMSetCalib d Λ ⊆ S.MSMSet d Λ := S.MSMSetCalib_subset d Λ have himg : S.candMean d '' S.MSMSetCalib d Λ ⊆ S.candMean d '' S.MSMSet d Λ := Set.image_mono hsub exact csSup_le_csSup hbdd hne himg
5 supporting declarations (lemmas, instances)
  • calibrated_weight_integrable theorem — Calibration makes the arm-indicator inverse-weight integrand integrable for a binary-treatment backdoor system, the selected arm, and a candidate complete propensity whenever that candidate is calibrated for the arm.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    etilde :
    P.Ω → ℝ
    hcal :
    S.Calibrated d etilde
    Integrable (fun ω => S.dVar.indicator d ω / etilde ω) P.μ
    Proof (Lean source)
    @[fun_prop] theorem calibrated_weight_integrable (d : Bool) (etilde : P.Ω → ℝ) (hcal : S.Calibrated d etilde) : Integrable (fun ω => S.dVar.indicator d ω / etilde ω) P.μ := by unfold POBackdoorSystem.Calibrated at hcal by_contra hnot rw [MeasureTheory.condExp_of_not_integrable hnot] at hcal have hzero_eq_one := integral_congr_ae hcal simp at hzero_eq_one
    Causalean.PO.POBackdoorSystem.calibrated_weight_integrable · Causalean/PO/ID/Partial/Sensitivity/MSM/Calibrated.lean:63
  • completeProp_calibrated theorem — The complete propensity is calibrated for its arm in a binary-treatment backdoor system when that propensity is positive almost surely and the corresponding inverse-weighted arm indicator is integrable, for the selected arm.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    hpos :
    ∀ᵐ ω ∂P.μ, 0 < S.completeProp d ω
    hint :
    Integrable (fun ω => S.dVar.indicator d ω / S.completeProp d ω) P.μ
    S.Calibrated d (S.completeProp d)
    Proof (Lean source)
    theorem completeProp_calibrated [StandardBorelSpace P.Ω] [IsFiniteMeasure P.μ] (d : Bool) (hpos : ∀ᵐ ω ∂P.μ, 0 < S.completeProp d ω) (hint : Integrable (fun ω => S.dVar.indicator d ω / S.completeProp d ω) P.μ) : S.Calibrated d (S.completeProp d) := by classical set A : P.Ω → ℝ := S.dVar.indicator d with hA_def set e : P.Ω → ℝ := S.completeProp d with he_def -- `σ(X) ≤ σ(X, Y(d))`. have hX_le : S.sigmaX ≤ S.sigmaXY d := by rw [POBackdoorSystem.sigmaX, POBackdoorSystem.sigmaXY] exact le_sup_left -- `1/e` is `σ(X,Y(d))`-strongly measurable (`e = condExp` is). have he_smeas : StronglyMeasurable[S.sigmaXY d] e := by rw [he_def]; exact stronglyMeasurable_condExp have hinv_smeas : StronglyMeasurable[S.sigmaXY d] (fun ω => 1 / e ω) := (measurable_const.div he_smeas.measurable).stronglyMeasurable -- Integrability of `A` and `(1/e)·A` (= `A/e`). have hA_int : Integrable A P.μ := S.dVar.integrable_indicator d (measurableSet_singleton d) have hinvA_int : Integrable (fun ω => (1 / e ω) * A ω) P.μ := by refine hint.congr (Filter.Eventually.of_forall ?_) intro ω simp [hA_def, he_def, div_eq_inv_mul] -- Pull out `1/e` through conditional expectation with respect to `σ(X,Y(d))`. have he_cond : (P.μ[A | S.sigmaXY d]) = e := by rw [hA_def, he_def]; rfl have hpull : P.μ[fun ω => (1 / e ω) * A ω | S.sigmaXY d] =ᵐ[P.μ] (fun ω => (1 / e ω) * e ω) := by have h := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaXY d) (μ := P.μ) hinv_smeas hinvA_int hA_int refine h.trans ?_ rw [he_cond] rfl -- Cancel: `(1/e)·e = 1` a.e. from positivity. have hcancel : (fun ω => (1 / e ω) * e ω) =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by filter_upwards [hpos] with ω hω rw [he_def] at hω rw [he_def] field_simp -- Thus `μ[A/e | σ(X,Y(d))] =ᵐ 1`. have hinner : P.μ[fun ω => A ω / e ω | S.sigmaXY d] =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by have hrw : (fun ω => A ω / e ω) = (fun ω => (1 / e ω) * A ω) := by funext ω; rw [one_div, div_eq_inv_mul] rw [hrw] exact hpull.trans hcancel -- Apply the tower property from `σ(X,Y(d))` down to `σ(X)`. unfold POBackdoorSystem.Calibrated have htower : P.μ[fun ω => A ω / e ω | S.sigmaX] =ᵐ[P.μ] P.μ[P.μ[fun ω => A ω / e ω | S.sigmaXY d] | S.sigmaX] := (MeasureTheory.condExp_condExp_of_le hX_le (S.sigmaXY_le d)).symm refine htower.trans ?_ have hcongr : P.μ[P.μ[fun ω => A ω / e ω | S.sigmaXY d] | S.sigmaX] =ᵐ[P.μ] P.μ[(fun _ => (1 : ℝ)) | S.sigmaX] := condExp_congr_ae hinner refine hcongr.trans ?_ exact Filter.EventuallyEq.of_eq (MeasureTheory.condExp_const S.sigmaX_le (1 : ℝ))
    Causalean.PO.POBackdoorSystem.completeProp_calibrated · Causalean/PO/ID/Partial/Sensitivity/MSM/Calibrated.lean:94
  • completeProp_mem_MSMSetCalib theorem — The d complete propensity lies in the calibrated set when it satisfies MSM membership and calibration.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    Λ :
    ℝ
    hmem :
    S.completeProp d ∈ S.MSMSet d Λ
    hcalib :
    S.Calibrated d (S.completeProp d)
    S.completeProp d ∈ S.MSMSetCalib d Λ
    Proof (Lean source)
    theorem completeProp_mem_MSMSetCalib (d : Bool) (Λ : ℝ) (hmem : S.completeProp d ∈ S.MSMSet d Λ) (hcalib : S.Calibrated d (S.completeProp d)) : S.completeProp d ∈ S.MSMSetCalib d Λ := ⟨hmem, hcalib⟩
    Causalean.PO.POBackdoorSystem.completeProp_mem_MSMSetCalib · Causalean/PO/ID/Partial/Sensitivity/MSM/Calibrated.lean:159
  • MSMSetCalib_subset theorem — The calibrated set is a subset of the odds-ratio box.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    Λ :
    ℝ
    S.MSMSetCalib d Λ ⊆ S.MSMSet d Λ
    Proof (Lean source)
    theorem MSMSetCalib_subset (d : Bool) (Λ : ℝ) : S.MSMSetCalib d Λ ⊆ S.MSMSet d Λ := fun _ h => h.1
    Causalean.PO.POBackdoorSystem.MSMSetCalib_subset · Causalean/PO/ID/Partial/Sensitivity/MSM/Calibrated.lean:184
  • msmLower_le_msmLowerCalib theorem — The uncalibrated HT-relaxation lower endpoint does not exceed the calibrated lower endpoint for a binary-treatment backdoor system, the selected arm, and a sensitivity level, provided the calibrated candidate-mean range is nonempty and the uncalibrated range is bounded below.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    d :
    Λ :
    ℝ
    hne :
    (S.candMean d '' S.MSMSetCalib d Λ).Nonempty
    hbdd :
    BddBelow (S.candMean d '' S.MSMSet d Λ)
    S.msmLower d Λ ≤ S.msmLowerCalib d Λ
    Proof (Lean source)
    theorem msmLower_le_msmLowerCalib (d : Bool) (Λ : ℝ) (hne : (S.candMean d '' S.MSMSetCalib d Λ).Nonempty) (hbdd : BddBelow (S.candMean d '' S.MSMSet d Λ)) : S.msmLower d Λ ≤ S.msmLowerCalib d Λ := by have hsub : S.MSMSetCalib d Λ ⊆ S.MSMSet d Λ := S.MSMSetCalib_subset d Λ have himg : S.candMean d '' S.MSMSetCalib d Λ ⊆ S.candMean d '' S.MSMSet d Λ := Set.image_mono hsub exact csInf_le_csInf hbdd hne himg
    Causalean.PO.POBackdoorSystem.msmLower_le_msmLowerCalib · Causalean/PO/ID/Partial/Sensitivity/MSM/Calibrated.lean:201
Bounds 6 core · 8 supporting This file computes closed forms for an unnormalized IPW functional over an odds-ratio box. ★ msmUpper_eq★ msmLower_eq

Closed-form uncalibrated marginal-sensitivity bounds

This file computes closed forms for an unnormalized IPW functional over an odds-ratio box. Because the box is pointwise separable, the supremum and infimum are attained by boundary inverse-propensity weights selected according to the sign of the observed outcome. These are not the normalized linear-fractional bounds of Zhao–Small–Bhattacharya.

The public surface consists of the endpoint weights wMin and wMax, the integral forms msmUpperForm and msmLowerForm, and the closed-form identities msmUpper_eq and msmLower_eq.

def wMin reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes backdoor system, a real sensitivity level, and a unit in its sample space, the lower endpoint inverse-propensity weight is 1+(1−e)/(Λe)1+(1-e)/(\Lambda e), where ee is that unit's treated propensity score. It is the endpoint corresponding to an odds ratio of 1/Λ1/\Lambda.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
wMin S Λ ω :
ℝ
1 + (1 - S.propScore true ω) / (Λ * S.propScore true ω)
def wMax reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes backdoor system, a real sensitivity level, and a unit in its sample space, the upper endpoint inverse-propensity weight is 1+Λ(1−e)/e1+\Lambda(1-e)/e, where ee is that unit's treated propensity score. It is the endpoint corresponding to an odds ratio of Λ\Lambda.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
wMax S Λ ω :
ℝ
1 + Λ * (1 - S.propScore true ω) / S.propScore true ω
def msmUpperForm reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes backdoor system and a real sensitivity level, the upper marginal-sensitivity functional is the expectation of the factual outcome among treated units, weighted by the upper endpoint weight when that outcome is nonnegative and by the lower endpoint weight otherwise.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
msmUpperForm S Λ :
ℝ
∫ ω, S.dVar.indicator true ω * S.factualY ω * (if 0 ≤ S.factualY ω then S.wMax Λ ω else S.wMin Λ ω) ∂P.μ
def msmLowerForm reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes backdoor system and a real sensitivity level, the lower marginal-sensitivity functional is the expectation of the factual outcome among treated units, weighted by the lower endpoint weight when that outcome is nonnegative and by the upper endpoint weight otherwise.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
msmLowerForm S Λ :
ℝ
∫ ω, S.dVar.indicator true ω * S.factualY ω * (if 0 ≤ S.factualY ω then S.wMin Λ ω else S.wMax Λ ω) ∂P.μ
theorem msmUpper_eq reviewed
Causalean.PO.POBackdoorSystem

The largest unnormalized inverse-probability-weighted mean in the odds box is obtained by using the upper endpoint weight for nonnegative outcomes and the lower endpoint weight for negative outcomes. This holds for a potential-outcomes backdoor system at a sensitivity level of at least one under two-sided propensity overlap, measurability of every candidate propensity up to null sets, and integrability of an envelope that dominates every candidate weighted outcome.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
hmeas :
∀ etilde ∈ S.MSMSet true Λ, AEMeasurable etilde P.μ
henv :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
S.msmUpper true Λ = S.msmUpperForm Λ
Proof (Lean source)
theorem msmUpper_eq (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (hmeas : ∀ etilde ∈ S.MSMSet true Λ, AEMeasurable etilde P.μ) (henv : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) : S.msmUpper true Λ = S.msmUpperForm Λ := by classical have hΛ0 : (0:ℝ) < Λ := lt_of_lt_of_le one_pos hΛ -- Abbreviations. set A : P.Ω → ℝ := S.dVar.indicator true with hA_def set Y : P.Ω → ℝ := S.factualY with hY_def set e : P.Ω → ℝ := S.propScore true with he_def -- Measurability. have hAm : Measurable A := S.dVar.measurable_indicator true (measurableSet_singleton true) have hYm : Measurable Y := S.measurable_factualY have hem : Measurable e := by rw [he_def]; unfold POBackdoorSystem.propScore exact (stronglyMeasurable_condExp.mono S.sigmaX_le).measurable have hwMaxm : Measurable (S.wMax Λ) := by unfold POBackdoorSystem.wMax exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hem)).div hem)) have hwMinm : Measurable (S.wMin Λ) := by unfold POBackdoorSystem.wMin exact (measurable_const.add ((measurable_const.sub hem).div (measurable_const.mul hem))) -- `A` is in `[0,1]`. have hA0 : ∀ ω, 0 ≤ A ω := fun ω => by rcases S.dVar.indicator_eq_one_or_zero true ω with h | h <;> simp [hA_def, h] have hA1 : ∀ ω, A ω ≤ 1 := fun ω => by rcases S.dVar.indicator_eq_one_or_zero true ω with h | h <;> simp [hA_def, h] -- The optimal weight and candidate propensity. set wstar : P.Ω → ℝ := fun ω => if 0 ≤ Y ω then S.wMax Λ ω else S.wMin Λ ω with hwstar_def set estar : P.Ω → ℝ := fun ω => 1 / wstar ω with hestar_def -- a.e. positivity / ordering of the weights from overlap. have hae : ∀ᵐ ω ∂P.μ, (1:ℝ) < S.wMin Λ ω ∧ S.wMin Λ ω ≤ S.wMax Λ ω := by filter_upwards [hoverlap] with ω hω obtain ⟨he0, he1⟩ := hω have h1e : 0 < 1 - e ω := by rw [he_def] at *; linarith have he0' : 0 < e ω := by rw [he_def] at *; exact he0 refine ⟨?_, ?_⟩ · have : 0 < (1 - e ω) / (Λ * e ω) := by positivity simp only [POBackdoorSystem.wMin, ← he_def]; linarith · simp only [POBackdoorSystem.wMin, POBackdoorSystem.wMax, ← he_def] have hd1 : (1 - e ω) / (Λ * e ω) ≤ Λ * (1 - e ω) / e ω := by rw [div_le_div_iff₀ (by positivity) he0'] nlinarith [hΛ, mul_pos h1e he0', mul_pos hΛ0 he0', mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0')) (sub_nonneg.mpr hΛ)] linarith -- Measurability and a.e. bounds of the optimal weight. have hwstar_m : Measurable wstar := by rw [hwstar_def] exact Measurable.ite (measurableSet_le measurable_const hYm) hwMaxm hwMinm have hwstar_ae : ∀ᵐ ω ∂P.μ, S.wMin Λ ω ≤ wstar ω ∧ wstar ω ≤ S.wMax Λ ω ∧ 0 < wstar ω := by filter_upwards [hae] with ω hω obtain ⟨hwm1, hwmle⟩ := hω rw [hwstar_def] by_cases hy : 0 ≤ Y ω · simp only [if_pos hy]; exact ⟨hwmle, le_rfl, by linarith⟩ · simp only [if_neg hy]; exact ⟨le_rfl, hwmle, by linarith⟩ -- `A*Y*wstar` is dominated by the envelope, hence integrable. have hform_int : Integrable (fun ω => A ω * Y ω * wstar ω) P.μ := by refine Integrable.mono' henv ((hAm.mul hYm).mul hwstar_m).aestronglyMeasurable ?_ filter_upwards [hwstar_ae] with ω hω obtain ⟨_, hle, hpos⟩ := hω rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω)] have hwabs : |wstar ω| = wstar ω := abs_of_nonneg (le_of_lt hpos) rw [hwabs, mul_assoc, mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) exact mul_le_mul_of_nonneg_left hle (abs_nonneg _) -- `msmUpperForm = ∫ A*Y*wstar`. have hform_eq : S.msmUpperForm Λ = ∫ ω, A ω * Y ω * wstar ω ∂P.μ := by rfl -- Witness: `estar = 1/wstar ∈ MSMSet Λ` with `candMean estar = msmUpperForm`. have hestar_candMean : S.candMean true estar = S.msmUpperForm Λ := by rw [hform_eq] unfold POBackdoorSystem.candMean refine integral_congr_ae ?_ filter_upwards [hwstar_ae] with ω hω obtain ⟨_, _, hpos⟩ := hω change A ω * Y ω / (1 / wstar ω) = A ω * Y ω * wstar ω rw [div_div_eq_mul_div, div_one] -- a.e. `wstar > 1` (since `wstar ∈ {wMin, wMax}`, `wMin > 1`, `wMax ≥ wMin`). have hwstar_gt1 : ∀ᵐ ω ∂P.μ, 1 < wstar ω := by filter_upwards [hae] with ω hω obtain ⟨hwm1, hwmle⟩ := hω rw [hwstar_def] by_cases hy : 0 ≤ Y ω · simp only [if_pos hy]; linarith · simp only [if_neg hy]; exact hwm1 have hestar_mem : estar ∈ S.MSMSet true Λ := by refine ⟨?_, ?_⟩ · filter_upwards [hwstar_gt1] with ω hω rw [hestar_def] constructor · positivity · rw [div_lt_one (by linarith)]; linarith · filter_upwards [hoverlap, hwstar_ae, hwstar_gt1] with ω hov hw hwgt obtain ⟨he0, he1⟩ := hov obtain ⟨hmin, hmax, hpos⟩ := hw have het0 : 0 < estar ω := by rw [hestar_def]; positivity have het1 : estar ω < 1 := by rw [hestar_def, div_lt_one (by linarith)]; linarith rw [OR_box_iff hΛ0 he0 he1 het0 het1] have hinv : 1 / estar ω = wstar ω := by rw [hestar_def, one_div_one_div] rw [hinv] exact ⟨hmin, hmax⟩ -- Every candidate mean is `≤ msmUpperForm`. have hcand_le : ∀ etilde ∈ S.MSMSet true Λ, S.candMean true etilde ≤ S.msmUpperForm Λ := by intro et hmem obtain ⟨hint, hor⟩ := hmem have hetm : AEMeasurable et P.μ := hmeas et ⟨hint, hor⟩ -- a.e. box bound on `w = 1/et`. have hbox : ∀ᵐ ω ∂P.μ, S.wMin Λ ω ≤ 1 / et ω ∧ 1 / et ω ≤ S.wMax Λ ω := by filter_upwards [hoverlap, hint, hor] with ω hov het hOR obtain ⟨he0, he1⟩ := hov obtain ⟨het0, het1⟩ := het have := (OR_box_iff hΛ0 he0 he1 het0 het1).mp hOR exact this -- `A*Y/et = A*Y*(1/et)` a.e.; integrable by domination. have hcandmean_int : Integrable (fun ω => A ω * Y ω / et ω) P.μ := by refine Integrable.mono' henv (((hAm.mul hYm).aemeasurable.div hetm).aestronglyMeasurable) ?_ filter_upwards [hbox, hoverlap, hint] with ω hb hov het obtain ⟨hmin, hmax⟩ := hb obtain ⟨he0, he1⟩ := hov obtain ⟨het0, het1⟩ := het rw [Real.norm_eq_abs, mul_div_assoc, abs_mul, abs_of_nonneg (hA0 ω), mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) have hYdiv : |Y ω / et ω| = |Y ω| * (1 / et ω) := by rw [abs_div, abs_of_nonneg (le_of_lt het0), mul_one_div] rw [hYdiv] exact mul_le_mul_of_nonneg_left hmax (abs_nonneg _) have heq_w : (fun ω => A ω * Y ω / et ω) =ᵐ[P.μ] (fun ω => A ω * Y ω * (1 / et ω)) := by filter_upwards with ω rw [mul_one_div] -- `candMean et = ∫ A*Y*(1/et) ≤ ∫ A*Y*wstar = form`. rw [show S.candMean true et = ∫ ω, A ω * Y ω / et ω ∂P.μ from rfl, hform_eq] rw [integral_congr_ae heq_w] apply integral_mono_ae (hcandmean_int.congr heq_w) hform_int filter_upwards [hbox] with ω hb obtain ⟨hmin, hmax⟩ := hb exact weight_mul_le_upper (hA0 ω) hmin hmax -- Assemble: `msmUpper = sSup (candMean '' MSMSet) = msmUpperForm`. have hne : (S.candMean true '' S.MSMSet true Λ).Nonempty := ⟨S.candMean true estar, Set.mem_image_of_mem _ hestar_mem⟩ have hbdd : BddAbove (S.candMean true '' S.MSMSet true Λ) := by refine ⟨S.msmUpperForm Λ, ?_⟩ rintro x ⟨et, hmem, rfl⟩ exact hcand_le et hmem refine le_antisymm ?_ ?_ · apply csSup_le hne rintro x ⟨et, hmem, rfl⟩ exact hcand_le et hmem · rw [← hestar_candMean] exact le_csSup hbdd (Set.mem_image_of_mem _ hestar_mem)
theorem msmLower_eq reviewed
Causalean.PO.POBackdoorSystem

The smallest unnormalized inverse-probability-weighted mean in the odds box is obtained by using the lower endpoint weight for nonnegative outcomes and the upper endpoint weight for negative outcomes. This holds for a potential-outcomes backdoor system at a sensitivity level of at least one under two-sided propensity overlap, measurability of every candidate propensity up to null sets, and integrability of an envelope that dominates every candidate weighted outcome.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
hmeas :
∀ etilde ∈ S.MSMSet true Λ, AEMeasurable etilde P.μ
henv :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
S.msmLower true Λ = S.msmLowerForm Λ
Proof (Lean source)
theorem msmLower_eq (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (hmeas : ∀ etilde ∈ S.MSMSet true Λ, AEMeasurable etilde P.μ) (henv : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) : S.msmLower true Λ = S.msmLowerForm Λ := by classical have hΛ0 : (0:ℝ) < Λ := lt_of_lt_of_le one_pos hΛ set A : P.Ω → ℝ := S.dVar.indicator true with hA_def set Y : P.Ω → ℝ := S.factualY with hY_def set e : P.Ω → ℝ := S.propScore true with he_def have hAm : Measurable A := S.dVar.measurable_indicator true (measurableSet_singleton true) have hYm : Measurable Y := S.measurable_factualY have hem : Measurable e := by rw [he_def]; unfold POBackdoorSystem.propScore exact (stronglyMeasurable_condExp.mono S.sigmaX_le).measurable have hwMaxm : Measurable (S.wMax Λ) := by unfold POBackdoorSystem.wMax exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hem)).div hem)) have hwMinm : Measurable (S.wMin Λ) := by unfold POBackdoorSystem.wMin exact (measurable_const.add ((measurable_const.sub hem).div (measurable_const.mul hem))) have hA0 : ∀ ω, 0 ≤ A ω := fun ω => by rcases S.dVar.indicator_eq_one_or_zero true ω with h | h <;> simp [hA_def, h] -- Lower-bound optimal weight: `wMin` where `Y ≥ 0`, `wMax` where `Y < 0`. set wstar : P.Ω → ℝ := fun ω => if 0 ≤ Y ω then S.wMin Λ ω else S.wMax Λ ω with hwstar_def set estar : P.Ω → ℝ := fun ω => 1 / wstar ω with hestar_def have hae : ∀ᵐ ω ∂P.μ, (1:ℝ) < S.wMin Λ ω ∧ S.wMin Λ ω ≤ S.wMax Λ ω := by filter_upwards [hoverlap] with ω hω obtain ⟨he0, he1⟩ := hω have h1e : 0 < 1 - e ω := by rw [he_def] at *; linarith have he0' : 0 < e ω := by rw [he_def] at *; exact he0 refine ⟨?_, ?_⟩ · have : 0 < (1 - e ω) / (Λ * e ω) := by positivity simp only [POBackdoorSystem.wMin, ← he_def]; linarith · simp only [POBackdoorSystem.wMin, POBackdoorSystem.wMax, ← he_def] have hd1 : (1 - e ω) / (Λ * e ω) ≤ Λ * (1 - e ω) / e ω := by rw [div_le_div_iff₀ (by positivity) he0'] nlinarith [hΛ, mul_pos h1e he0', mul_pos hΛ0 he0', mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0')) (sub_nonneg.mpr hΛ)] linarith have hwstar_m : Measurable wstar := by rw [hwstar_def] exact Measurable.ite (measurableSet_le measurable_const hYm) hwMinm hwMaxm have hwstar_ae : ∀ᵐ ω ∂P.μ, S.wMin Λ ω ≤ wstar ω ∧ wstar ω ≤ S.wMax Λ ω ∧ 0 < wstar ω := by filter_upwards [hae] with ω hω obtain ⟨hwm1, hwmle⟩ := hω rw [hwstar_def] by_cases hy : 0 ≤ Y ω · simp only [if_pos hy]; exact ⟨le_rfl, hwmle, by linarith⟩ · simp only [if_neg hy]; exact ⟨hwmle, le_rfl, by linarith⟩ have hwstar_gt1 : ∀ᵐ ω ∂P.μ, 1 < wstar ω := by filter_upwards [hae] with ω hω obtain ⟨hwm1, hwmle⟩ := hω rw [hwstar_def] by_cases hy : 0 ≤ Y ω · simp only [if_pos hy]; exact hwm1 · simp only [if_neg hy]; linarith -- `A*Y*wstar` integrable (dominated by envelope). have hform_int : Integrable (fun ω => A ω * Y ω * wstar ω) P.μ := by refine Integrable.mono' henv ((hAm.mul hYm).mul hwstar_m).aestronglyMeasurable ?_ filter_upwards [hwstar_ae] with ω hω obtain ⟨_, hle, hpos⟩ := hω rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω)] have hwabs : |wstar ω| = wstar ω := abs_of_nonneg (le_of_lt hpos) rw [hwabs, mul_assoc, mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) exact mul_le_mul_of_nonneg_left hle (abs_nonneg _) have hform_eq : S.msmLowerForm Λ = ∫ ω, A ω * Y ω * wstar ω ∂P.μ := by rfl -- Witness `estar = 1/wstar ∈ MSMSet`, `candMean estar = msmLowerForm`. have hestar_candMean : S.candMean true estar = S.msmLowerForm Λ := by rw [hform_eq] unfold POBackdoorSystem.candMean refine integral_congr_ae ?_ filter_upwards [hwstar_ae] with ω hω obtain ⟨_, _, hpos⟩ := hω change A ω * Y ω / (1 / wstar ω) = A ω * Y ω * wstar ω rw [div_div_eq_mul_div, div_one] have hestar_mem : estar ∈ S.MSMSet true Λ := by refine ⟨?_, ?_⟩ · filter_upwards [hwstar_gt1] with ω hω rw [hestar_def] exact ⟨by positivity, by rw [div_lt_one (by linarith)]; linarith⟩ · filter_upwards [hoverlap, hwstar_ae, hwstar_gt1] with ω hov hw hwgt obtain ⟨he0, he1⟩ := hov obtain ⟨hmin, hmax, hpos⟩ := hw have het0 : 0 < estar ω := by rw [hestar_def]; positivity have het1 : estar ω < 1 := by rw [hestar_def, div_lt_one (by linarith)]; linarith rw [OR_box_iff hΛ0 he0 he1 het0 het1] have hinv : 1 / estar ω = wstar ω := by rw [hestar_def, one_div_one_div] rw [hinv]; exact ⟨hmin, hmax⟩ -- Every candidate mean is `≥ msmLowerForm`. have hcand_ge : ∀ etilde ∈ S.MSMSet true Λ, S.msmLowerForm Λ ≤ S.candMean true etilde := by intro et hmem obtain ⟨hint, hor⟩ := hmem have hetm : AEMeasurable et P.μ := hmeas et ⟨hint, hor⟩ have hbox : ∀ᵐ ω ∂P.μ, S.wMin Λ ω ≤ 1 / et ω ∧ 1 / et ω ≤ S.wMax Λ ω := by filter_upwards [hoverlap, hint, hor] with ω hov het hOR obtain ⟨he0, he1⟩ := hov obtain ⟨het0, het1⟩ := het exact (OR_box_iff hΛ0 he0 he1 het0 het1).mp hOR have hcandmean_int : Integrable (fun ω => A ω * Y ω / et ω) P.μ := by refine Integrable.mono' henv (((hAm.mul hYm).aemeasurable.div hetm).aestronglyMeasurable) ?_ filter_upwards [hbox, hoverlap, hint] with ω hb hov het obtain ⟨hmin, hmax⟩ := hb obtain ⟨he0, he1⟩ := hov obtain ⟨het0, het1⟩ := het rw [Real.norm_eq_abs, mul_div_assoc, abs_mul, abs_of_nonneg (hA0 ω), mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) have hYdiv : |Y ω / et ω| = |Y ω| * (1 / et ω) := by rw [abs_div, abs_of_nonneg (le_of_lt het0), mul_one_div] rw [hYdiv] exact mul_le_mul_of_nonneg_left hmax (abs_nonneg _) have heq_w : (fun ω => A ω * Y ω / et ω) =ᵐ[P.μ] (fun ω => A ω * Y ω * (1 / et ω)) := by filter_upwards with ω; rw [mul_one_div] rw [show S.candMean true et = ∫ ω, A ω * Y ω / et ω ∂P.μ from rfl, hform_eq] rw [integral_congr_ae heq_w] apply integral_mono_ae hform_int (hcandmean_int.congr heq_w) filter_upwards [hbox] with ω hb obtain ⟨hmin, hmax⟩ := hb exact weight_mul_ge_lower (hA0 ω) hmin hmax -- Assemble via `sInf`. have hne : (S.candMean true '' S.MSMSet true Λ).Nonempty := ⟨S.candMean true estar, Set.mem_image_of_mem _ hestar_mem⟩ have hbdd : BddBelow (S.candMean true '' S.MSMSet true Λ) := by refine ⟨S.msmLowerForm Λ, ?_⟩ rintro x ⟨et, hmem, rfl⟩ exact hcand_ge et hmem refine le_antisymm ?_ ?_ · rw [← hestar_candMean] exact csInf_le hbdd (Set.mem_image_of_mem _ hestar_mem) · apply le_csInf hne rintro x ⟨et, hmem, rfl⟩ exact hcand_ge et hmem
8 supporting declarations (lemmas, instances)
Quantile­Balance 3 core · 0 supporting This file proves the Neyman-Pearson exchange argument behind the calibrated treated upper bound in the marginal sensitivity model. ★ cutoff_optimal★ msmUpperCalib_eq_cutoff

Quantile balancing for calibrated MSM upper bounds

This file proves the Neyman-Pearson exchange argument behind the calibrated treated upper bound in the marginal sensitivity model. It defines the quantile-cutoff complete propensity cutoffProp, proves the optimality theorem cutoff_optimal, and derives msmUpperCalib_eq_cutoff: once the cutoff candidate is calibrated and feasible, the calibrated upper endpoint is exactly its candidate mean.

def cutoffProp reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcome backdoor system, a sensitivity parameter, a real-valued cutoff function on the sample space, and a sample point, the treated-arm quantile-cutoff complete propensity is the reciprocal of the largest admissible treated inverse-propensity weight when the factual outcome exceeds the cutoff and of the smallest such weight otherwise.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
c :
P.Ω → ℝ
ω :
P.Ω
cutoffProp S Λ c ω :
ℝ
1 / (if c ω < S.factualY ω then S.wMax Λ ω else S.wMin Λ ω)
theorem cutoff_optimal reviewed
Causalean.PO.POBackdoorSystem

Optimality of the quantile-cutoff weight (Neyman–Pearson exchange). Fix a sensitivity parameter Λ at least 1 and assume the propensity score for treatment given the covariates lies strictly between 0 and 1 almost surely (overlap). For a σ(X)-measurable, integrable cutoff function c whose induced cutoff candidate is feasible and calibrated, and under envelope-integrability conditions bounding the treated outcome, the treatment-weighted mass, and the cutoff-weighted mass by the upper marginal-sensitivity-model weight, then for any other calibrated, box-feasible candidate complete propensity ẽ, ẽ's candidate mean is at most the cutoff candidate mean — the cutoff weight maximizes the candidate mean among calibrated candidates.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ
henv :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
etilde :
P.Ω → ℝ
hmem :
etilde ∈ S.MSMSetCalib true Λ
S.candMean true etilde ≤ S.candMean true (S.cutoffProp Λ c)
Proof (Lean source)
theorem cutoff_optimal (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ) (henv : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) {etilde : P.Ω → ℝ} (hmem : etilde ∈ S.MSMSetCalib true Λ) : S.candMean true etilde ≤ S.candMean true (S.cutoffProp Λ c) := by classical have _ : Integrable c P.μ := hc_int have hΛ0 : (0 : ℝ) < Λ := lt_of_lt_of_le one_pos hΛ set A : P.Ω → ℝ := S.dVar.indicator true with hA_def set Y : P.Ω → ℝ := S.factualY with hY_def set e : P.Ω → ℝ := S.propScore true with he_def set wE : P.Ω → ℝ := fun ω => 1 / etilde ω with hwE_def set wC : P.Ω → ℝ := fun ω => if c ω < Y ω then S.wMax Λ ω else S.wMin Λ ω with hwC_def have hOR_box : ∀ {e et : ℝ}, 0 < e → e < 1 → 0 < et → et < 1 → ((1 / Λ ≤ OR et e ∧ OR et e ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et ∧ 1 / et ≤ 1 + Λ * (1 - e) / e)) := by intro e0 et he0 he1 het0 het1 have h1e : 0 < 1 - e0 := by linarith have h1et : 0 < 1 - et := by linarith have hOReq : OR et e0 = et * (1 - e0) / ((1 - et) * e0) := by rw [OR, div_div_eq_mul_div, div_mul_eq_mul_div, mul_comm, mul_div_mul_comm] ring_nf rw [hOReq] have hMax : (1 / Λ ≤ et * (1 - e0) / ((1 - et) * e0)) ↔ (1 / et ≤ 1 + Λ * (1 - e0) / e0) := by rw [div_le_div_iff₀ hΛ0 (by positivity : (0 : ℝ) < (1 - et) * e0), show (1 : ℝ) + Λ * (1 - e0) / e0 = (e0 + Λ * (1 - e0)) / e0 by field_simp, div_le_div_iff₀ het0 he0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] have hMin : (et * (1 - e0) / ((1 - et) * e0) ≤ Λ) ↔ (1 + (1 - e0) / (Λ * e0) ≤ 1 / et) := by rw [div_le_iff₀ (by positivity : (0 : ℝ) < (1 - et) * e0), show (1 : ℝ) + (1 - e0) / (Λ * e0) = (Λ * e0 + (1 - e0)) / (Λ * e0) by field_simp, div_le_div_iff₀ (by positivity : (0 : ℝ) < Λ * e0) het0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] rw [hMax, hMin, and_comm] have hAm : Measurable A := by rw [hA_def] exact S.dVar.measurable_indicator true (MeasurableSet.singleton true) have hYm : Measurable Y := by rw [hY_def] exact S.measurable_factualY have hem : Measurable e := by rw [he_def] unfold POBackdoorSystem.propScore exact (stronglyMeasurable_condExp.mono S.sigmaX_le).measurable have hwMaxm : Measurable (S.wMax Λ) := by unfold POBackdoorSystem.wMax exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hem)).div hem)) have hwMinm : Measurable (S.wMin Λ) := by unfold POBackdoorSystem.wMin exact (measurable_const.add ((measurable_const.sub hem).div (measurable_const.mul hem))) have hwCm : Measurable wC := by rw [hwC_def] exact Measurable.ite (measurableSet_lt (hc_meas.mono S.sigmaX_le le_rfl) hYm) hwMaxm hwMinm have hA0 : ∀ ω, 0 ≤ A ω := fun ω => by rcases S.dVar.indicator_eq_one_or_zero true ω with h | h <;> simp [hA_def, h] have hae : ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin Λ ω ∧ S.wMin Λ ω ≤ S.wMax Λ ω := by filter_upwards [hoverlap] with ω hω obtain ⟨he0ω, he1ω⟩ := hω have h1e : 0 < 1 - e ω := by rw [he_def] at *; linarith have he0' : 0 < e ω := by rw [he_def] at *; exact he0ω refine ⟨?_, ?_⟩ · have : 0 < (1 - e ω) / (Λ * e ω) := by positivity simp only [POBackdoorSystem.wMin, ← he_def] linarith · simp only [POBackdoorSystem.wMin, POBackdoorSystem.wMax, ← he_def] have hd1 : (1 - e ω) / (Λ * e ω) ≤ Λ * (1 - e ω) / e ω := by rw [div_le_div_iff₀ (by positivity) he0'] nlinarith [hΛ, mul_pos h1e he0', mul_pos hΛ0 he0', mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0')) (sub_nonneg.mpr hΛ)] linarith have hboxE : ∀ᵐ ω ∂P.μ, S.wMin Λ ω ≤ wE ω ∧ wE ω ≤ S.wMax Λ ω := by obtain ⟨hinterior, hor⟩ := hmem.1 filter_upwards [hoverlap, hinterior, hor] with ω hov het hOR obtain ⟨he0ω, he1ω⟩ := hov obtain ⟨het0, het1⟩ := het have hbox := (hOR_box he0ω he1ω het0 het1).mp hOR simpa [POBackdoorSystem.wMin, POBackdoorSystem.wMax, he_def, hwE_def] using hbox have hboxC : ∀ᵐ ω ∂P.μ, S.wMin Λ ω ≤ wC ω ∧ wC ω ≤ S.wMax Λ ω ∧ 0 < wC ω := by filter_upwards [hae] with ω hω obtain ⟨hmin1, hminmax⟩ := hω rw [hwC_def] by_cases hcy : c ω < Y ω · simp only [if_pos hcy] exact ⟨hminmax, le_rfl, lt_of_lt_of_le (by linarith) hminmax⟩ · simp only [if_neg hcy] exact ⟨le_rfl, hminmax, by linarith⟩ have hXE_int : Integrable (fun ω => A ω / etilde ω) P.μ := by simpa [hA_def] using S.calibrated_weight_integrable true etilde hmem.2 have hAwE_int : Integrable (fun ω => A ω * wE ω) P.μ := by refine hXE_int.congr (Filter.Eventually.of_forall ?_) intro ω simp [hwE_def, div_eq_mul_inv] have hYE_int : Integrable (fun ω => A ω * Y ω * wE ω) P.μ := by have hmeas : AEStronglyMeasurable (fun ω => A ω * Y ω * wE ω) P.μ := by refine (hYm.aestronglyMeasurable.mul hAwE_int.aestronglyMeasurable).congr ?_ filter_upwards [] with ω simp only [Pi.mul_apply] ring refine Integrable.mono' henv hmeas ?_ filter_upwards [hboxE, hmem.1.1] with ω hbox hint obtain ⟨_, hmax⟩ := hbox obtain ⟨het0, _⟩ := hint rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), hwE_def, abs_of_nonneg (by positivity : 0 ≤ 1 / etilde ω), mul_assoc, mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) exact mul_le_mul_of_nonneg_left hmax (abs_nonneg _) have hYC_int : Integrable (fun ω => A ω * Y ω * wC ω) P.μ := by refine Integrable.mono' henv (((hAm.mul hYm).mul hwCm).aestronglyMeasurable) ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos), mul_assoc, mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) exact mul_le_mul_of_nonneg_left hmax (abs_nonneg _) have hXC_int : Integrable (fun ω => A ω / S.cutoffProp Λ c ω) P.μ := by have hAwC_int : Integrable (fun ω => A ω * wC ω) P.μ := by refine Integrable.mono' hweight_env ((hAm.mul hwCm).aestronglyMeasurable) ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos)] exact mul_le_mul_of_nonneg_left hmax (hA0 ω) refine hAwC_int.congr ?_ filter_upwards [hboxC] with ω hbox change A ω * wC ω = A ω / (1 / (if c ω < S.factualY ω then S.wMax Λ ω else S.wMin Λ ω)) rw [hwC_def, hY_def, div_div_eq_mul_div, div_one] have hcE_int : Integrable (fun ω => c ω * A ω * wE ω) P.μ := by have hmeas : AEStronglyMeasurable (fun ω => c ω * A ω * wE ω) P.μ := by refine ((hc_meas.mono S.sigmaX_le le_rfl).aestronglyMeasurable.mul hAwE_int.aestronglyMeasurable).congr ?_ filter_upwards [] with ω simp only [Pi.mul_apply] ring refine Integrable.mono' hc_env hmeas ?_ filter_upwards [hboxE, hmem.1.1] with ω hbox hint obtain ⟨_, hmax⟩ := hbox obtain ⟨het0, _⟩ := hint rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), hwE_def, abs_of_nonneg (by positivity : 0 ≤ 1 / etilde ω), mul_assoc, mul_assoc] simpa [mul_assoc, hwE_def, one_div] using mul_le_mul_of_nonneg_left hmax (mul_nonneg (abs_nonneg (c ω)) (hA0 ω)) have hcC_int : Integrable (fun ω => c ω * A ω * wC ω) P.μ := by refine Integrable.mono' hc_env (((hc_meas.mono S.sigmaX_le le_rfl).mul hAm).mul hwCm).aestronglyMeasurable ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos), mul_assoc, mul_assoc] simpa [mul_assoc] using mul_le_mul_of_nonneg_left hmax (mul_nonneg (abs_nonneg (c ω)) (hA0 ω)) have hfirstE_int : Integrable (fun ω => A ω * (Y ω - c ω) * wE ω) P.μ := by refine (hYE_int.sub hcE_int).congr (Filter.Eventually.of_forall ?_) intro ω change A ω * Y ω * wE ω - c ω * A ω * wE ω = A ω * (Y ω - c ω) * wE ω ring have hfirstC_int : Integrable (fun ω => A ω * (Y ω - c ω) * wC ω) P.μ := by refine (hYC_int.sub hcC_int).congr (Filter.Eventually.of_forall ?_) intro ω change A ω * Y ω * wC ω - c ω * A ω * wC ω = A ω * (Y ω - c ω) * wC ω ring have hctermE_eq : ∫ ω, c ω * A ω * wE ω ∂P.μ = ∫ ω, c ω ∂P.μ := by have hprod_int : Integrable (fun ω => c ω * (A ω / etilde ω)) P.μ := by refine hcE_int.congr (Filter.Eventually.of_forall ?_) intro ω change c ω * A ω * (1 / etilde ω) = c ω * (A ω / etilde ω) rw [div_eq_mul_inv] ring have hpull : P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => c ω * P.μ[fun ω => A ω / etilde ω | S.sigmaX] ω) := by exact MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hc_meas.stronglyMeasurable hprod_int hXE_int have hcal : P.μ[fun ω => A ω / etilde ω | S.sigmaX] =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by simpa [POBackdoorSystem.Calibrated, hA_def] using hmem.2 have hmain : ∫ ω, c ω * (A ω / etilde ω) ∂P.μ = ∫ ω, c ω ∂P.μ := by have hcond : ∫ ω, P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * (A ω / etilde ω) ∂P.μ := MeasureTheory.integral_condExp S.sigmaX_le rw [← hcond] calc ∫ ω, P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * P.μ[fun ω => A ω / etilde ω | S.sigmaX] ω ∂P.μ := integral_congr_ae hpull _ = ∫ ω, c ω * 1 ∂P.μ := by refine integral_congr_ae ?_ filter_upwards [hcal] with ω hω rw [hω] _ = ∫ ω, c ω ∂P.μ := by simp rw [← hmain] refine integral_congr_ae (Filter.Eventually.of_forall ?_) intro ω change c ω * A ω * (1 / etilde ω) = c ω * (A ω / etilde ω) rw [div_eq_mul_inv] ring have hctermC_eq : ∫ ω, c ω * A ω * wC ω ∂P.μ = ∫ ω, c ω ∂P.μ := by have hprod_int : Integrable (fun ω => c ω * (A ω / S.cutoffProp Λ c ω)) P.μ := by refine hcC_int.congr ?_ filter_upwards [hboxC] with ω hbox change c ω * A ω * wC ω = c ω * (A ω / (1 / (if c ω < S.factualY ω then S.wMax Λ ω else S.wMin Λ ω))) rw [hwC_def, hY_def, div_div_eq_mul_div, div_one] ring have hpull : P.μ[fun ω => c ω * (A ω / S.cutoffProp Λ c ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => c ω * P.μ[fun ω => A ω / S.cutoffProp Λ c ω | S.sigmaX] ω) := by exact MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hc_meas.stronglyMeasurable hprod_int hXC_int have hcal : P.μ[fun ω => A ω / S.cutoffProp Λ c ω | S.sigmaX] =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by simpa [POBackdoorSystem.Calibrated, hA_def] using hcut_mem.2 have hmain : ∫ ω, c ω * (A ω / S.cutoffProp Λ c ω) ∂P.μ = ∫ ω, c ω ∂P.μ := by have hcond : ∫ ω, P.μ[fun ω => c ω * (A ω / S.cutoffProp Λ c ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * (A ω / S.cutoffProp Λ c ω) ∂P.μ := MeasureTheory.integral_condExp S.sigmaX_le rw [← hcond] calc ∫ ω, P.μ[fun ω => c ω * (A ω / S.cutoffProp Λ c ω) | S.sigmaX] ω ∂P.μ -- … truncated; follow the source link for the rest …
theorem msmUpperCalib_eq_cutoff reviewed
Causalean.PO.POBackdoorSystem

The calibrated upper bound has the quantile-balancing closed form. Fix a sensitivity parameter Λ at least 1 and assume the propensity score for treatment given the covariates lies strictly between 0 and 1 almost surely (overlap). For a σ(X)-measurable, integrable cutoff function c whose induced cutoff candidate is feasible and calibrated, under envelope-integrability conditions bounding the treated outcome, the treatment-weighted mass, and the cutoff-weighted mass by the upper marginal-sensitivity-model weight, then the calibrated upper bound on E[Y(1)] equals the candidate mean of the cutoff propensity built from c.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ
henv :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
S.msmUpperCalib true Λ = S.candMean true (S.cutoffProp Λ c)
Proof (Lean source)
theorem msmUpperCalib_eq_cutoff (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ) (henv : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) : S.msmUpperCalib true Λ = S.candMean true (S.cutoffProp Λ c) := by classical have hne : (S.candMean true '' S.MSMSetCalib true Λ).Nonempty := ⟨S.candMean true (S.cutoffProp Λ c), Set.mem_image_of_mem _ hcut_mem⟩ have hle_all : ∀ x ∈ S.candMean true '' S.MSMSetCalib true Λ, x ≤ S.candMean true (S.cutoffProp Λ c) := by rintro x ⟨etilde, hmem, rfl⟩ exact S.cutoff_optimal Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env hmem have hbdd : BddAbove (S.candMean true '' S.MSMSetCalib true Λ) := ⟨S.candMean true (S.cutoffProp Λ c), hle_all⟩ refine le_antisymm ?_ ?_ · unfold POBackdoorSystem.msmUpperCalib exact csSup_le hne hle_all · unfold POBackdoorSystem.msmUpperCalib exact le_csSup hbdd (Set.mem_image_of_mem _ hcut_mem)
Control­Cutoff 8 core · 9 supporting This file is the control-arm mirror of the treated cutoff-selection and calibration-bracket development: the cutoff propensity uses the untreated indicator and the control propensity P[D=0 | X], decomposes its conditiona ★ wMin0_mul_propScore_le_one★ controlCutoffProp_calibrated_of_survival★ cutoffProp0_mem_MSMSetCalib0_of_survival

Marginal Sensitivity Model — control cutoff calibration

This file is the control-arm mirror of the treated cutoff-selection and calibration-bracket development: the cutoff propensity uses the untreated indicator and the control propensity P[D=0 | X], decomposes its conditional calibration value into a minimum-weight term plus a conditional control-survival term, and reduces calibrated membership in the calibrated control MSM set to the corresponding conditional-survival equation.

It defines the control endpoint weights wMin0 and wMax0, the upper-cutoff candidate cutoffProp0, the survival target survTarget0, and the conditional survival functional controlSurv. The main theorems are the calibration bracket lemmas, control_calibValue_eq, controlCutoffProp_calibrated_of_survival, cutoffProp0_mem_MSMSet0, and cutoffProp0_mem_MSMSetCalib0_of_survival. It ends with the integrability facts that follow from integrability of the control indicator times the largest weight: integrable_control_gt_cutoff, integrable_control_wMin0_of_wMax0, and integrable_wDiff0_mul_control_gt_cutoff.

def wMin0 reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcome backdoor system, a sensitivity parameter, and a sample point, the smallest admissible control inverse-propensity weight is 1+(1−e0(ω))/(Λe0(ω))1+(1-e_0(\omega))/(\Lambda e_0(\omega)), where e0(ω)e_0(\omega) is the probability of the control arm conditional on the covariates.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
wMin0 S Λ ω :
ℝ
1 + (1 - S.propScore false ω) / (Λ * S.propScore false ω)
def wMax0 reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcome backdoor system, a sensitivity parameter, and a sample point, the largest admissible control inverse-propensity weight is 1+Λ(1−e0(ω))/e0(ω)1+\Lambda(1-e_0(\omega))/e_0(\omega), where e0(ω)e_0(\omega) is the probability of the control arm conditional on the covariates.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
wMax0 S Λ ω :
ℝ
1 + Λ * (1 - S.propScore false ω) / S.propScore false ω
def cutoffProp0 reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcome backdoor system, a sensitivity parameter, a real-valued cutoff function on the sample space, and a sample point, the control quantile-cutoff complete propensity is the reciprocal of the largest admissible control inverse-propensity weight when the factual outcome exceeds the cutoff and of the smallest such weight otherwise.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
c :
P.Ω → ℝ
ω :
P.Ω
cutoffProp0 S Λ c ω :
ℝ
1 / (if c ω < S.factualY ω then S.wMax0 Λ ω else S.wMin0 Λ ω)
def controlSurv reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcome backdoor system and a real-valued cutoff function on the sample space, the conditional control-survival function assigns to each sample point the conditional expectation, given the covariates, of the control-arm indicator times the indicator that the factual outcome exceeds the cutoff at that point.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
c :
P.Ω → ℝ
controlSurv S c :
P.Ω → ℝ
P.μ[fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0) | S.sigmaX]
def survTarget0 reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcome backdoor system, a sensitivity parameter, and a sample point, the target control-survival probability is (1−wmin⁡,0(Λ,ω)e0(ω))/(wmax⁡,0(Λ,ω)−wmin⁡,0(Λ,ω))(1-w_{\min,0}(\Lambda,\omega)e_0(\omega))/(w_{\max,0}(\Lambda,\omega)-w_{\min,0}(\Lambda,\omega)), where e0(ω)e_0(\omega) is the control propensity score.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
survTarget0 S Λ ω :
ℝ
(1 - S.wMin0 Λ ω * S.propScore false ω) / (S.wMax0 Λ ω - S.wMin0 Λ ω)
theorem wMin0_mul_propScore_le_one reviewed
Causalean.PO.POBackdoorSystem

Lower control calibration bracket is at most one. Fix a sensitivity parameter Λ at least 1. If the control propensity P[D=0∣X] lies strictly between 0 and 1 almost everywhere (overlap), then almost everywhere the lower calibration weight wMin0 Λ times the control propensity is at most 1.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
∀ᵐ ω ∂P.μ, S.wMin0 Λ ω * S.propScore false ω ≤ 1
Proof (Lean source)
theorem wMin0_mul_propScore_le_one (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) : ∀ᵐ ω ∂P.μ, S.wMin0 Λ ω * S.propScore false ω ≤ 1 := by have hΛ0 : 0 < Λ := lt_of_lt_of_le zero_lt_one hΛ filter_upwards [hoverlap] with ω hω set e : ℝ := S.propScore false ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have hw : S.wMin0 Λ ω * S.propScore false ω = e + (1 - e) / Λ := by simp only [POBackdoorSystem.wMin0, ← he_def] field_simp [hΛ0.ne', he0.ne'] have hdiv : (1 - e) / Λ ≤ 1 - e := by rw [div_le_iff₀ hΛ0] nlinarith [hΛ, le_of_lt he1] calc S.wMin0 Λ ω * S.propScore false ω = e + (1 - e) / Λ := hw _ ≤ e + (1 - e) := by linarith _ = 1 := by ring
theorem controlCutoffProp_calibrated_of_survival reviewed
Causalean.PO.POBackdoorSystem

A cutoff solving the target control-survival equation is calibrated. Fix a sensitivity parameter Λ strictly greater than 1. If the control propensity P[D=0∣X] lies strictly between 0 and 1 almost everywhere (overlap), and the product of the control indicator and the survival-cutoff indicator 1{c<Y} is integrable, the product of the control indicator and the lower weight wMin0 Λ is integrable, the product of the weight spread with the control-indicator survival term is integrable, and the conditional control-survival functional at c equals, almost everywhere, the target survival value survTarget0 Λ, then the cutoff-calibration propensity cutoffProp0 Λ c is calibrated: the conditional expectation of the control indicator divided by it, given the covariates, equals 1 almost everywhere.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 < Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
c :
P.Ω → ℝ
hint1 :
Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
hmin_int :
Integrable (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) P.μ
hdiff_int :
Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
hsurv :
S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ
S.Calibrated false (S.cutoffProp0 Λ c)
Proof (Lean source)
theorem controlCutoffProp_calibrated_of_survival (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmin_int : Integrable (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) (hsurv : S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ) : S.Calibrated false (S.cutoffProp0 Λ c) := by have hΛ0 : 0 < Λ := lt_trans zero_lt_one hΛ refine (S.control_calibValue_eq Λ c hint1 hmin_int hdiff_int).trans ?_ filter_upwards [hoverlap, hsurv] with ω hω hsurvω rw [hsurvω] set e : ℝ := S.propScore false ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have hdiff_pos : 0 < S.wMax0 Λ ω - S.wMin0 Λ ω := by simp only [POBackdoorSystem.wMax0, POBackdoorSystem.wMin0, ← he_def] have h1e : 0 < 1 - e := by linarith have hΛsq : 0 < Λ * Λ - 1 := by nlinarith field_simp [hΛ0.ne', he0.ne'] nlinarith [h1e, hΛsq, hΛ0, he0] have hdiff_ne : S.wMax0 Λ ω - S.wMin0 Λ ω ≠ 0 := hdiff_pos.ne' unfold POBackdoorSystem.survTarget0 field_simp [hdiff_ne] ring
theorem cutoffProp0_mem_MSMSetCalib0_of_survival reviewed
Causalean.PO.POBackdoorSystem

The cutoff belongs to the calibrated control MSM set whenever it solves the target control-survival equation. Fix a sensitivity parameter Λ strictly greater than 1. If the control propensity P[D=0∣X] lies strictly between 0 and 1 almost everywhere (overlap), and the product of the control indicator and the survival-cutoff indicator 1{c<Y} is integrable, the product of the control indicator and the lower weight wMin0 Λ is integrable, the product of the weight spread with the control-indicator survival term is integrable, and the conditional control-survival functional at c equals, almost everywhere, the target survival value survTarget0 Λ, then the cutoff-calibration propensity cutoffProp0 Λ c belongs to the calibrated control MSM set MSMSetCalib false Λ.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 < Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
c :
P.Ω → ℝ
hint1 :
Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
hmin_int :
Integrable (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) P.μ
hdiff_int :
Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
hsurv :
S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ
S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
Proof (Lean source)
theorem cutoffProp0_mem_MSMSetCalib0_of_survival (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmin_int : Integrable (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) (hsurv : S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ) : S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ := ⟨S.cutoffProp0_mem_MSMSet0 Λ (le_of_lt hΛ) hoverlap c, S.controlCutoffProp_calibrated_of_survival Λ hΛ hoverlap c hint1 hmin_int hdiff_int hsurv⟩
9 supporting declarations (lemmas, instances)
  • one_le_wMax0_mul_propScore theorem — Upper control calibration bracket is at least one. Fix a sensitivity parameter Λ at least 1. If the control propensity P[D=0∣X] lies strictly between 0 and 1 almost everywhere (overlap), then almost everywhere the upper calibration weight wMax0 Λ times the control propensity is at least 1.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    ∀ᵐ ω ∂P.μ, 1 ≤ S.wMax0 Λ ω * S.propScore false ω
    Proof (Lean source)
    theorem one_le_wMax0_mul_propScore (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) : ∀ᵐ ω ∂P.μ, 1 ≤ S.wMax0 Λ ω * S.propScore false ω := by filter_upwards [hoverlap] with ω hω set e : ℝ := S.propScore false ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have hw : S.wMax0 Λ ω * S.propScore false ω = e + Λ * (1 - e) := by simp only [POBackdoorSystem.wMax0, ← he_def] field_simp [he0.ne'] have hmul : 1 - e ≤ Λ * (1 - e) := by nlinarith [hΛ, le_of_lt he1] calc 1 = e + (1 - e) := by ring _ ≤ e + Λ * (1 - e) := by linarith _ = S.wMax0 Λ ω * S.propScore false ω := hw.symm
    Causalean.PO.POBackdoorSystem.one_le_wMax0_mul_propScore · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoff.lean:94
  • condExp_control_wMin0_eq theorem — All-lower-weight control calibration value. For a sensitivity parameter Λ, if the product of the control indicator 1{D=0} and the lower calibration weight wMin0 Λ is integrable, then the conditional expectation of that product given the covariate σ-algebra equals, almost everywhere, the lower weight times the control propensity P[D=0∣X].
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hint :
    Integrable (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) P.μ
    P.μ[fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω | S.sigmaX]
    =ᵐ[P.μ] (fun ω => S.wMin0 Λ ω * S.propScore false ω)
    Proof (Lean source)
    theorem condExp_control_wMin0_eq (Λ : ℝ) (hint : Integrable (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) P.μ) : P.μ[fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMin0 Λ ω * S.propScore false ω) := by have hprop_meas : Measurable[S.sigmaX] (S.propScore false) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hw_smeas : StronglyMeasurable[S.sigmaX] (S.wMin0 Λ) := by unfold POBackdoorSystem.wMin0 exact (measurable_const.add ((measurable_const.sub hprop_meas).div (measurable_const.mul hprop_meas))).stronglyMeasurable have hind_int : Integrable (S.dVar.indicator false) P.μ := S.dVar.integrable_indicator false (measurableSet_singleton false) have hcomm : (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) = (fun ω => S.wMin0 Λ ω * S.dVar.indicator false ω) := by funext ω exact mul_comm _ _ refine (MeasureTheory.condExp_congr_ae (m := S.sigmaX) (μ := P.μ) (Filter.EventuallyEq.of_eq hcomm)).trans ?_ have hpull : P.μ[fun ω => S.wMin0 Λ ω * S.dVar.indicator false ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMin0 Λ ω * P.μ[S.dVar.indicator false | S.sigmaX] ω) := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hw_smeas (hint.congr (Filter.EventuallyEq.of_eq hcomm)) hind_int exact hpull.trans (Filter.EventuallyEq.of_eq (by funext ω rfl))
    Causalean.PO.POBackdoorSystem.condExp_control_wMin0_eq · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoff.lean:116
  • condExp_control_wMax0_eq theorem — All-upper-weight control calibration value. For a sensitivity parameter Λ, if the product of the control indicator 1{D=0} and the upper calibration weight wMax0 Λ is integrable, then the conditional expectation of that product given the covariate σ-algebra equals, almost everywhere, the upper weight times the control propensity P[D=0∣X].
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hint :
    Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
    P.μ[fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω | S.sigmaX]
    =ᵐ[P.μ] (fun ω => S.wMax0 Λ ω * S.propScore false ω)
    Proof (Lean source)
    theorem condExp_control_wMax0_eq (Λ : ℝ) (hint : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) : P.μ[fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMax0 Λ ω * S.propScore false ω) := by have hprop_meas : Measurable[S.sigmaX] (S.propScore false) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hw_smeas : StronglyMeasurable[S.sigmaX] (S.wMax0 Λ) := by unfold POBackdoorSystem.wMax0 exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hprop_meas)).div hprop_meas)).stronglyMeasurable have hind_int : Integrable (S.dVar.indicator false) P.μ := S.dVar.integrable_indicator false (measurableSet_singleton false) have hcomm : (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) = (fun ω => S.wMax0 Λ ω * S.dVar.indicator false ω) := by funext ω exact mul_comm _ _ refine (MeasureTheory.condExp_congr_ae (m := S.sigmaX) (μ := P.μ) (Filter.EventuallyEq.of_eq hcomm)).trans ?_ have hpull : P.μ[fun ω => S.wMax0 Λ ω * S.dVar.indicator false ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMax0 Λ ω * P.μ[S.dVar.indicator false | S.sigmaX] ω) := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hw_smeas (hint.congr (Filter.EventuallyEq.of_eq hcomm)) hind_int exact hpull.trans (Filter.EventuallyEq.of_eq (by funext ω rfl))
    Causalean.PO.POBackdoorSystem.condExp_control_wMax0_eq · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoff.lean:151
  • control_calibValue_eq theorem — Cutoff control calibration value decomposes into a lower bracket plus a survival term. Fix a sensitivity parameter and cutoff function. If the product of the control indicator and the survival-cutoff indicator 1{c<Y} is integrable, the product of the control indicator and the lower weight wMin0 Λ is integrable, and the product of the weight spread wMax0 Λ - wMin0 Λ with the control-indicator survival term is integrable, then the conditional expectation, given the covariate σ-algebra, of the control indicator divided by the cutoff-calibration weight equals, almost everywhere, the lower weight times the control propensity plus the weight spread times the conditional control-survival functional controlSurv c.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    c :
    P.Ω → ℝ
    hint1 :
    Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    hmin_int :
    Integrable (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) P.μ
    hdiff_int :
    Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    P.μ[fun ω => S.dVar.indicator false ω / S.cutoffProp0 Λ c ω | S.sigmaX]
    =ᵐ[P.μ] (fun ω => S.wMin0 Λ ω * S.propScore false ω + (S.wMax0 Λ ω - S.wMin0 Λ ω) * S.controlSurv c ω)
    Proof (Lean source)
    theorem control_calibValue_eq (Λ : ℝ) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmin_int : Integrable (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) : P.μ[fun ω => S.dVar.indicator false ω / S.cutoffProp0 Λ c ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMin0 Λ ω * S.propScore false ω + (S.wMax0 Λ ω - S.wMin0 Λ ω) * S.controlSurv c ω) := by classical set A : P.Ω → ℝ := S.dVar.indicator false with hA_def set I : P.Ω → ℝ := fun ω => if c ω < S.factualY ω then (1 : ℝ) else 0 with hI_def have hprop_meas : Measurable[S.sigmaX] (S.propScore false) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hwMin_smeas : StronglyMeasurable[S.sigmaX] (S.wMin0 Λ) := by unfold POBackdoorSystem.wMin0 exact (measurable_const.add ((measurable_const.sub hprop_meas).div (measurable_const.mul hprop_meas))).stronglyMeasurable have hwMax_smeas : StronglyMeasurable[S.sigmaX] (S.wMax0 Λ) := by unfold POBackdoorSystem.wMax0 exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hprop_meas)).div hprop_meas)).stronglyMeasurable have hdiff_smeas : StronglyMeasurable[S.sigmaX] (fun ω => S.wMax0 Λ ω - S.wMin0 Λ ω) := (hwMax_smeas.measurable.sub hwMin_smeas.measurable).stronglyMeasurable have hA_int : Integrable A P.μ := by rw [hA_def] exact S.dVar.integrable_indicator false (measurableSet_singleton false) have hI_int : Integrable (fun ω => A ω * I ω) P.μ := by rw [hA_def, hI_def] exact hint1 have hmin_int' : Integrable (fun ω => S.wMin0 Λ ω * A ω) P.μ := by refine hmin_int.congr (Filter.Eventually.of_forall ?_) intro ω rw [hA_def] exact mul_comm _ _ have hpoint : (fun ω => S.dVar.indicator false ω / S.cutoffProp0 Λ c ω) =ᵐ[P.μ] (fun ω => S.wMin0 Λ ω * A ω + (S.wMax0 Λ ω - S.wMin0 Λ ω) * (A ω * I ω)) := by refine Filter.Eventually.of_forall ?_ intro ω rw [hA_def, hI_def] by_cases hcy : c ω < S.factualY ω · simp only [POBackdoorSystem.cutoffProp0, if_pos hcy] rw [div_div_eq_mul_div, div_one] ring · simp only [POBackdoorSystem.cutoffProp0, if_neg hcy] rw [div_div_eq_mul_div, div_one] ring refine (MeasureTheory.condExp_congr_ae (m := S.sigmaX) (μ := P.μ) hpoint).trans ?_ have hsplit : P.μ[fun ω => S.wMin0 Λ ω * A ω + (S.wMax0 Λ ω - S.wMin0 Λ ω) * (A ω * I ω) | S.sigmaX] =ᵐ[P.μ] P.μ[fun ω => S.wMin0 Λ ω * A ω | S.sigmaX] + P.μ[fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (A ω * I ω) | S.sigmaX] := MeasureTheory.condExp_add hmin_int' hdiff_int S.sigmaX have hpullMin : P.μ[fun ω => S.wMin0 Λ ω * A ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMin0 Λ ω * S.propScore false ω) := by have h := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hwMin_smeas hmin_int' hA_int exact h.trans (Filter.EventuallyEq.of_eq (by funext ω rfl)) have hpullDiff : P.μ[fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (A ω * I ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * S.controlSurv c ω) := by have h := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hdiff_smeas hdiff_int hI_int exact h.trans (Filter.EventuallyEq.of_eq (by funext ω rfl)) filter_upwards [hsplit, hpullMin, hpullDiff] with ω hsplitω hminω hdiffω rw [hsplitω] change P.μ[fun ω => S.wMin0 Λ ω * A ω | S.sigmaX] ω + P.μ[fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (A ω * I ω) | S.sigmaX] ω = S.wMin0 Λ ω * S.propScore false ω + (S.wMax0 Λ ω - S.wMin0 Λ ω) * S.controlSurv c ω rw [hminω, hdiffω]
    Causalean.PO.POBackdoorSystem.control_calibValue_eq · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoff.lean:186
  • cutoffProp0_mem_MSMSet0 theorem — The control cutoff propensity always lies inside the control odds-ratio box. Fix a sensitivity parameter Λ at least 1 and a cutoff function c. If the control propensity P[D=0∣X] lies strictly between 0 and 1 almost everywhere (overlap), then the cutoff-calibration candidate propensity cutoffProp0 Λ c always belongs to the control marginal-sensitivity-model ambiguity set MSMSet false Λ.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    c :
    P.Ω → ℝ
    S.cutoffProp0 Λ c ∈ S.MSMSet false Λ
    Proof (Lean source)
    theorem cutoffProp0_mem_MSMSet0 (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) : S.cutoffProp0 Λ c ∈ S.MSMSet false Λ := by classical have hΛ0 : (0 : ℝ) < Λ := lt_of_lt_of_le zero_lt_one hΛ have hOR_box : ∀ {e et : ℝ}, 0 < e → e < 1 → 0 < et → et < 1 → ((1 / Λ ≤ OR et e ∧ OR et e ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et ∧ 1 / et ≤ 1 + Λ * (1 - e) / e)) := by intro e et he0 he1 het0 het1 have h1e : 0 < 1 - e := by linarith have h1et : 0 < 1 - et := by linarith have hOReq : OR et e = et * (1 - e) / ((1 - et) * e) := by rw [OR, div_div_eq_mul_div, div_mul_eq_mul_div, mul_comm, mul_div_mul_comm] ring_nf rw [hOReq] have hMax : (1 / Λ ≤ et * (1 - e) / ((1 - et) * e)) ↔ (1 / et ≤ 1 + Λ * (1 - e) / e) := by rw [div_le_div_iff₀ hΛ0 (by positivity : (0 : ℝ) < (1 - et) * e), show (1 : ℝ) + Λ * (1 - e) / e = (e + Λ * (1 - e)) / e by field_simp, div_le_div_iff₀ het0 he0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] have hMin : (et * (1 - e) / ((1 - et) * e) ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et) := by rw [div_le_iff₀ (by positivity : (0 : ℝ) < (1 - et) * e), show (1 : ℝ) + (1 - e) / (Λ * e) = (Λ * e + (1 - e)) / (Λ * e) by field_simp, div_le_div_iff₀ (by positivity : (0 : ℝ) < Λ * e) het0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] rw [hMax, hMin, and_comm] have hae : ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin0 Λ ω ∧ S.wMin0 Λ ω ≤ S.wMax0 Λ ω := by filter_upwards [hoverlap] with ω hω set e : ℝ := S.propScore false ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have h1e : 0 < 1 - e := by linarith refine ⟨?_, ?_⟩ · have : 0 < (1 - e) / (Λ * e) := by positivity simp only [POBackdoorSystem.wMin0, ← he_def] linarith · simp only [POBackdoorSystem.wMin0, POBackdoorSystem.wMax0, ← he_def] have hd1 : (1 - e) / (Λ * e) ≤ Λ * (1 - e) / e := by rw [div_le_div_iff₀ (by positivity) he0] nlinarith [hΛ, mul_pos h1e he0, mul_pos hΛ0 he0, mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0)) (sub_nonneg.mpr hΛ)] linarith have hboxC : ∀ᵐ ω ∂P.μ, S.wMin0 Λ ω ≤ (if c ω < S.factualY ω then S.wMax0 Λ ω else S.wMin0 Λ ω) ∧ (if c ω < S.factualY ω then S.wMax0 Λ ω else S.wMin0 Λ ω) ≤ S.wMax0 Λ ω ∧ 1 < (if c ω < S.factualY ω then S.wMax0 Λ ω else S.wMin0 Λ ω) := by filter_upwards [hae] with ω hω obtain ⟨hmin1, hminmax⟩ := hω by_cases hcy : c ω < S.factualY ω · simp only [if_pos hcy] exact ⟨hminmax, le_rfl, lt_of_lt_of_le hmin1 hminmax⟩ · simp only [if_neg hcy] exact ⟨le_rfl, hminmax, hmin1⟩ refine ⟨?_, ?_⟩ · filter_upwards [hboxC] with ω hω obtain ⟨_, _, hwgt⟩ := hω unfold POBackdoorSystem.cutoffProp0 constructor · positivity · rw [div_lt_one (by linarith)] linarith · filter_upwards [hoverlap, hboxC] with ω hov hw obtain ⟨he0, he1⟩ := hov obtain ⟨hmin, hmax, hwgt⟩ := hw set wC : ℝ := if c ω < S.factualY ω then S.wMax0 Λ ω else S.wMin0 Λ ω with hwC_def have hcut : S.cutoffProp0 Λ c ω = 1 / wC := by rw [POBackdoorSystem.cutoffProp0, hwC_def] have het0 : 0 < S.cutoffProp0 Λ c ω := by rw [hcut] positivity have het1 : S.cutoffProp0 Λ c ω < 1 := by rw [hcut, div_lt_one (by linarith)] linarith rw [(hOR_box he0 he1 het0 het1)] have hinv : 1 / S.cutoffProp0 Λ c ω = wC := by rw [hcut, one_div_one_div] rw [hinv] simpa [POBackdoorSystem.wMin0, POBackdoorSystem.wMax0, hwC_def] using ⟨hmin, hmax⟩
    Causalean.PO.POBackdoorSystem.cutoffProp0_mem_MSMSet0 · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoff.lean:314
  • ae_one_lt_wMin0_and_le_wMax0 theorem — Fix a sensitivity parameter Λ at least one and assume the control propensity score lies strictly between 0 and 1 almost surely. Then almost surely the smallest admissible control inverse-propensity weight exceeds one and is at most the largest admissible weight.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin0 Λ ω ∧ S.wMin0 Λ ω ≤ S.wMax0 Λ ω
    Proof (Lean source)
    theorem ae_one_lt_wMin0_and_le_wMax0 (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) : ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin0 Λ ω ∧ S.wMin0 Λ ω ≤ S.wMax0 Λ ω := by have hΛ0 : (0 : ℝ) < Λ := lt_of_lt_of_le zero_lt_one hΛ filter_upwards [hoverlap] with ω hω set e : ℝ := S.propScore false ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have h1e : 0 < 1 - e := by linarith refine ⟨?_, ?_⟩ · have : 0 < (1 - e) / (Λ * e) := by positivity simp only [POBackdoorSystem.wMin0, ← he_def] linarith · simp only [POBackdoorSystem.wMin0, POBackdoorSystem.wMax0, ← he_def] have hd1 : (1 - e) / (Λ * e) ≤ Λ * (1 - e) / e := by rw [div_le_div_iff₀ (by positivity) he0] nlinarith [hΛ, mul_pos h1e he0, mul_pos hΛ0 he0, mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0)) (sub_nonneg.mpr hΛ)] linarith
    Causalean.PO.POBackdoorSystem.ae_one_lt_wMin0_and_le_wMax0 · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoff.lean:428
  • integrable_control_gt_cutoff theorem — Write D for the control-arm indicator and Y for the observed outcome. For a measurable cutoff function c, the product D·1{Y > c} is integrable: it is a measurable function bounded by D.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    c :
    P.Ω → ℝ
    hc :
    Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    Proof (Lean source)
    theorem integrable_control_gt_cutoff (c : P.Ω → ℝ) (hc : Measurable c) : Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ := by have hite : Measurable (fun ω => if c ω < S.factualY ω then (1 : ℝ) else 0) := Measurable.ite (measurableSet_lt hc S.measurable_factualY) measurable_const measurable_const have hD : Measurable (S.dVar.indicator false) := S.dVar.measurable_indicator false (MeasurableSet.singleton false) refine (S.dVar.integrable_indicator false (MeasurableSet.singleton false)).mono (hD.mul hite).aestronglyMeasurable (Filter.Eventually.of_forall fun ω => ?_) by_cases h : c ω < S.factualY ω <;> simp [h]
    Causalean.PO.POBackdoorSystem.integrable_control_gt_cutoff · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoff.lean:452
  • integrable_control_wMin0_of_wMax0 theorem — Write D for the control-arm indicator and w_min, w_max for the smallest and largest admissible control inverse-propensity weights at a sensitivity level Λ at least one. If the control propensity score lies strictly between 0 and 1 almost surely and D·w_max is integrable, then D·w_min is integrable, because 0 ≤ D·w_min ≤ D·w_max almost surely.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    hmax :
    Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
    Integrable (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) P.μ
    Proof (Lean source)
    theorem integrable_control_wMin0_of_wMax0 (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (hmax : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) : Integrable (fun ω => S.dVar.indicator false ω * S.wMin0 Λ ω) P.μ := by have hD : Measurable (S.dVar.indicator false) := S.dVar.measurable_indicator false (MeasurableSet.singleton false) have hp : Measurable (S.propScore false) := S.measurable_propScore false have hwmin : Measurable (S.wMin0 Λ) := by unfold POBackdoorSystem.wMin0 fun_prop refine hmax.mono (hD.mul hwmin).aestronglyMeasurable ?_ filter_upwards [S.ae_one_lt_wMin0_and_le_wMax0 Λ hΛ hoverlap] with ω hω have hD0 : 0 ≤ S.dVar.indicator false ω := Set.indicator_nonneg (fun _ _ => zero_le_one) ω have hmin0 : 0 ≤ S.wMin0 Λ ω := by linarith [hω.1] rw [Real.norm_of_nonneg (mul_nonneg hD0 hmin0), Real.norm_of_nonneg (mul_nonneg hD0 (hmin0.trans hω.2))] exact mul_le_mul_of_nonneg_left hω.2 hD0
    Causalean.PO.POBackdoorSystem.integrable_control_wMin0_of_wMax0 · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoff.lean:466
  • integrable_wDiff0_mul_control_gt_cutoff theorem — Write D for the control-arm indicator, Y for the observed outcome, and w_min, w_max for the smallest and largest admissible control inverse-propensity weights at a sensitivity level Λ at least one. If the control propensity score lies strictly between 0 and 1 almost surely, c is a measurable cutoff function, and D·w_max is integrable, then (w_max − w_min)·D·1{Y > c} is integrable, because almost surely it lies between 0 and D·w_max.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    c :
    P.Ω → ℝ
    hc :
    hmax :
    Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
    Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    Proof (Lean source)
    theorem integrable_wDiff0_mul_control_gt_cutoff (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hc : Measurable c) (hmax : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) : Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ := by have hite : Measurable (fun ω => if c ω < S.factualY ω then (1 : ℝ) else 0) := Measurable.ite (measurableSet_lt hc S.measurable_factualY) measurable_const measurable_const have hD : Measurable (S.dVar.indicator false) := S.dVar.measurable_indicator false (MeasurableSet.singleton false) have hp : Measurable (S.propScore false) := S.measurable_propScore false have hwmin : Measurable (S.wMin0 Λ) := by unfold POBackdoorSystem.wMin0 fun_prop have hwmax : Measurable (S.wMax0 Λ) := by unfold POBackdoorSystem.wMax0 fun_prop refine hmax.mono ((hwmax.sub hwmin).mul (hD.mul hite)).aestronglyMeasurable ?_ filter_upwards [S.ae_one_lt_wMin0_and_le_wMax0 Λ hΛ hoverlap] with ω hω have hD0 : 0 ≤ S.dVar.indicator false ω := Set.indicator_nonneg (fun _ _ => zero_le_one) ω have hmin0 : 0 ≤ S.wMin0 Λ ω := by linarith [hω.1] have hmax0 : 0 ≤ S.wMax0 Λ ω := hmin0.trans hω.2 have hdiff0 : 0 ≤ S.wMax0 Λ ω - S.wMin0 Λ ω := sub_nonneg.mpr hω.2 rw [Real.norm_of_nonneg (mul_nonneg hD0 hmax0)] by_cases h : c ω < S.factualY ω · simp only [if_pos h, mul_one] rw [Real.norm_of_nonneg (mul_nonneg hdiff0 hD0), mul_comm] exact mul_le_mul_of_nonneg_left (by linarith) hD0 · simp only [if_neg h, mul_zero, norm_zero] exact mul_nonneg hD0 hmax0
    Causalean.PO.POBackdoorSystem.integrable_wDiff0_mul_control_gt_cutoff · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoff.lean:490
Cutoff­Selection 4 core · 6 supporting This file reduces calibrated feasibility of the upper MSM cutoff to one conditional-survival equation. ★ cutoff_calibValue_eq★ cutoffProp_mem_MSMSet

Calibrated treated-arm upper bound from calibrated cutoffs

This file reduces calibrated feasibility of the upper MSM cutoff to one conditional-survival equation. It defines treatedSurv and survTarget, proves the calibration decomposition cutoff_calibValue_eq, derives cutoffProp_calibrated_of_survival, proves every cutoff propensity lies in the odds-ratio box via cutoffProp_mem_MSMSet, and packages both facts as cutoffProp_mem_MSMSetCalib_of_survival. It ends with the integrability facts that follow from integrability of the treated indicator times the largest weight: integrable_treated_gt_cutoff, integrable_treated_wMin_of_wMax, and integrable_wDiff_mul_treated_gt_cutoff.

def treatedSurv reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes backdoor system and a real-valued cutoff function on its sample space, the conditional treated-survival function assigns each unit the conditional expectation, given its covariates, of the treatment indicator times the indicator that its factual outcome exceeds its cutoff.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
c :
P.Ω → ℝ
treatedSurv S c :
P.Ω → ℝ
P.μ[fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0) | S.sigmaX]
def survTarget reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes backdoor system, a real sensitivity level, and a unit in its sample space, the target survival probability for cutoff calibration is (1−wmin⁡e)/(wmax⁡−wmin⁡)(1-w_{\min}e)/(w_{\max}-w_{\min}), where ee is the unit's treated propensity score and wmin⁡,wmax⁡w_{\min},w_{\max} are its endpoint weights.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
survTarget S Λ ω :
ℝ
(1 - S.wMin Λ ω * S.propScore true ω) / (S.wMax Λ ω - S.wMin Λ ω)
theorem cutoff_calibValue_eq reviewed
Causalean.PO.POBackdoorSystem

Decomposition of the cutoff calibration value. For a sensitivity level and cutoff function, assume the treated-survival indicator, weighted by the treatment indicator, is integrable, the product of the treatment indicator and the lower marginal-sensitivity-model weight wMin is integrable, and the gap between the upper and lower weights, weighted by the treatment-weighted treated-survival indicator, is integrable. Then pulling the σ(X)-measurable weights wMin, wMax out of the conditional expectation decomposes the cutoff calibration value: E[Z/cutoffProp Λ c | σ(X)] = wMin·e + (wMax − wMin)·G(c), where G(c) is the conditional treated-survival at cutoff c.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
c :
P.Ω → ℝ
hint1 :
Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
hmin_int :
Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ
hdiff_int :
Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
P.μ[fun ω => S.dVar.indicator true ω / S.cutoffProp Λ c ω | S.sigmaX]
=ᵐ[P.μ] (fun ω => S.wMin Λ ω * S.propScore true ω + (S.wMax Λ ω - S.wMin Λ ω) * S.treatedSurv c ω)
Proof (Lean source)
theorem cutoff_calibValue_eq (Λ : ℝ) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmin_int : Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) : P.μ[fun ω => S.dVar.indicator true ω / S.cutoffProp Λ c ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMin Λ ω * S.propScore true ω + (S.wMax Λ ω - S.wMin Λ ω) * S.treatedSurv c ω) := by classical set A : P.Ω → ℝ := S.dVar.indicator true with hA_def set I : P.Ω → ℝ := fun ω => if c ω < S.factualY ω then (1 : ℝ) else 0 with hI_def have hprop_meas : Measurable[S.sigmaX] (S.propScore true) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hwMin_smeas : StronglyMeasurable[S.sigmaX] (S.wMin Λ) := by unfold POBackdoorSystem.wMin exact (measurable_const.add ((measurable_const.sub hprop_meas).div (measurable_const.mul hprop_meas))).stronglyMeasurable have hwMax_smeas : StronglyMeasurable[S.sigmaX] (S.wMax Λ) := by unfold POBackdoorSystem.wMax exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hprop_meas)).div hprop_meas)).stronglyMeasurable have hdiff_smeas : StronglyMeasurable[S.sigmaX] (fun ω => S.wMax Λ ω - S.wMin Λ ω) := (hwMax_smeas.measurable.sub hwMin_smeas.measurable).stronglyMeasurable have hA_int : Integrable A P.μ := by rw [hA_def] exact S.dVar.integrable_indicator true (measurableSet_singleton true) have hI_int : Integrable (fun ω => A ω * I ω) P.μ := by rw [hA_def, hI_def] exact hint1 have hmin_int' : Integrable (fun ω => S.wMin Λ ω * A ω) P.μ := by refine hmin_int.congr (Filter.Eventually.of_forall ?_) intro ω rw [hA_def] exact mul_comm _ _ have hpoint : (fun ω => S.dVar.indicator true ω / S.cutoffProp Λ c ω) =ᵐ[P.μ] (fun ω => S.wMin Λ ω * A ω + (S.wMax Λ ω - S.wMin Λ ω) * (A ω * I ω)) := by refine Filter.Eventually.of_forall ?_ intro ω rw [hA_def, hI_def] by_cases hcy : c ω < S.factualY ω · simp only [POBackdoorSystem.cutoffProp, if_pos hcy] rw [div_div_eq_mul_div, div_one] ring · simp only [POBackdoorSystem.cutoffProp, if_neg hcy] rw [div_div_eq_mul_div, div_one] ring refine (MeasureTheory.condExp_congr_ae (m := S.sigmaX) (μ := P.μ) hpoint).trans ?_ have hsplit : P.μ[fun ω => S.wMin Λ ω * A ω + (S.wMax Λ ω - S.wMin Λ ω) * (A ω * I ω) | S.sigmaX] =ᵐ[P.μ] P.μ[fun ω => S.wMin Λ ω * A ω | S.sigmaX] + P.μ[fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (A ω * I ω) | S.sigmaX] := MeasureTheory.condExp_add hmin_int' hdiff_int S.sigmaX have hpullMin : P.μ[fun ω => S.wMin Λ ω * A ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMin Λ ω * S.propScore true ω) := by have h := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hwMin_smeas hmin_int' hA_int exact h.trans (Filter.EventuallyEq.of_eq (by funext ω rfl)) have hpullDiff : P.μ[fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (A ω * I ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * S.treatedSurv c ω) := by have h := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hdiff_smeas hdiff_int hI_int exact h.trans (Filter.EventuallyEq.of_eq (by funext ω rfl)) filter_upwards [hsplit, hpullMin, hpullDiff] with ω hsplitω hminω hdiffω rw [hsplitω] change P.μ[fun ω => S.wMin Λ ω * A ω | S.sigmaX] ω + P.μ[fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (A ω * I ω) | S.sigmaX] ω = S.wMin Λ ω * S.propScore true ω + (S.wMax Λ ω - S.wMin Λ ω) * S.treatedSurv c ω rw [hminω, hdiffω]
theorem cutoffProp_mem_MSMSet reviewed
Causalean.PO.POBackdoorSystem

The cutoff propensity is always in the odds-ratio box. Fix a sensitivity parameter Λ at least 1 and assume the propensity score for treatment given the covariates lies strictly between 0 and 1 almost surely (overlap). Then for any measurable cutoff function c, the induced cutoff propensity always lies in the marginal-sensitivity-model odds-ratio ambiguity set, since at each point it equals either the lower or the upper marginal-sensitivity-model weight.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
c :
P.Ω → ℝ
S.cutoffProp Λ c ∈ S.MSMSet true Λ
Proof (Lean source)
theorem cutoffProp_mem_MSMSet (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) : S.cutoffProp Λ c ∈ S.MSMSet true Λ := by classical have hΛ0 : (0 : ℝ) < Λ := lt_of_lt_of_le zero_lt_one hΛ have hOR_box : ∀ {e et : ℝ}, 0 < e → e < 1 → 0 < et → et < 1 → ((1 / Λ ≤ OR et e ∧ OR et e ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et ∧ 1 / et ≤ 1 + Λ * (1 - e) / e)) := by intro e et he0 he1 het0 het1 have h1e : 0 < 1 - e := by linarith have h1et : 0 < 1 - et := by linarith have hOReq : OR et e = et * (1 - e) / ((1 - et) * e) := by rw [OR, div_div_eq_mul_div, div_mul_eq_mul_div, mul_comm, mul_div_mul_comm] ring_nf rw [hOReq] have hMax : (1 / Λ ≤ et * (1 - e) / ((1 - et) * e)) ↔ (1 / et ≤ 1 + Λ * (1 - e) / e) := by rw [div_le_div_iff₀ hΛ0 (by positivity : (0 : ℝ) < (1 - et) * e), show (1 : ℝ) + Λ * (1 - e) / e = (e + Λ * (1 - e)) / e by field_simp, div_le_div_iff₀ het0 he0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] have hMin : (et * (1 - e) / ((1 - et) * e) ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et) := by rw [div_le_iff₀ (by positivity : (0 : ℝ) < (1 - et) * e), show (1 : ℝ) + (1 - e) / (Λ * e) = (Λ * e + (1 - e)) / (Λ * e) by field_simp, div_le_div_iff₀ (by positivity : (0 : ℝ) < Λ * e) het0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] rw [hMax, hMin, and_comm] have hae : ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin Λ ω ∧ S.wMin Λ ω ≤ S.wMax Λ ω := by filter_upwards [hoverlap] with ω hω set e : ℝ := S.propScore true ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have h1e : 0 < 1 - e := by linarith refine ⟨?_, ?_⟩ · have : 0 < (1 - e) / (Λ * e) := by positivity simp only [POBackdoorSystem.wMin, ← he_def] linarith · simp only [POBackdoorSystem.wMin, POBackdoorSystem.wMax, ← he_def] have hd1 : (1 - e) / (Λ * e) ≤ Λ * (1 - e) / e := by rw [div_le_div_iff₀ (by positivity) he0] nlinarith [hΛ, mul_pos h1e he0, mul_pos hΛ0 he0, mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0)) (sub_nonneg.mpr hΛ)] linarith have hboxC : ∀ᵐ ω ∂P.μ, S.wMin Λ ω ≤ (if c ω < S.factualY ω then S.wMax Λ ω else S.wMin Λ ω) ∧ (if c ω < S.factualY ω then S.wMax Λ ω else S.wMin Λ ω) ≤ S.wMax Λ ω ∧ 1 < (if c ω < S.factualY ω then S.wMax Λ ω else S.wMin Λ ω) := by filter_upwards [hae] with ω hω obtain ⟨hmin1, hminmax⟩ := hω by_cases hcy : c ω < S.factualY ω · simp only [if_pos hcy] exact ⟨hminmax, le_rfl, lt_of_lt_of_le hmin1 hminmax⟩ · simp only [if_neg hcy] exact ⟨le_rfl, hminmax, hmin1⟩ refine ⟨?_, ?_⟩ · filter_upwards [hboxC] with ω hω obtain ⟨_, _, hwgt⟩ := hω unfold POBackdoorSystem.cutoffProp constructor · positivity · rw [div_lt_one (by linarith)] linarith · filter_upwards [hoverlap, hboxC] with ω hov hw obtain ⟨he0, he1⟩ := hov obtain ⟨hmin, hmax, hwgt⟩ := hw set wC : ℝ := if c ω < S.factualY ω then S.wMax Λ ω else S.wMin Λ ω with hwC_def have hcut : S.cutoffProp Λ c ω = 1 / wC := by rw [POBackdoorSystem.cutoffProp, hwC_def] have het0 : 0 < S.cutoffProp Λ c ω := by rw [hcut] positivity have het1 : S.cutoffProp Λ c ω < 1 := by rw [hcut, div_lt_one (by linarith)] linarith rw [(hOR_box he0 he1 het0 het1)] have hinv : 1 / S.cutoffProp Λ c ω = wC := by rw [hcut, one_div_one_div] rw [hinv] simpa [POBackdoorSystem.wMin, POBackdoorSystem.wMax, hwC_def] using ⟨hmin, hmax⟩
6 supporting declarations (lemmas, instances)
  • cutoffProp_calibrated_of_survival theorem — Calibration from the survival equation. If the conditional treated-survival of the cutoff equals the target, the cutoff is calibrated.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    c :
    P.Ω → ℝ
    hint1 :
    Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    hmin_int :
    Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ
    hdiff_int :
    Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    hsurv :
    S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ
    S.Calibrated true (S.cutoffProp Λ c)
    Proof (Lean source)
    theorem cutoffProp_calibrated_of_survival (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmin_int : Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) (hsurv : S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ) : S.Calibrated true (S.cutoffProp Λ c) := by unfold POBackdoorSystem.Calibrated have hΛ0 : 0 < Λ := lt_trans zero_lt_one hΛ refine (S.cutoff_calibValue_eq Λ c hint1 hmin_int hdiff_int).trans ?_ filter_upwards [hoverlap, hsurv] with ω hω hsurvω rw [hsurvω] set e : ℝ := S.propScore true ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have hdiff_pos : 0 < S.wMax Λ ω - S.wMin Λ ω := by simp only [POBackdoorSystem.wMax, POBackdoorSystem.wMin, ← he_def] have h1e : 0 < 1 - e := by linarith have hΛsq : 0 < Λ * Λ - 1 := by nlinarith field_simp [hΛ0.ne', he0.ne'] nlinarith [h1e, hΛsq, hΛ0, he0] have hdiff_ne : S.wMax Λ ω - S.wMin Λ ω ≠ 0 := hdiff_pos.ne' unfold POBackdoorSystem.survTarget field_simp [hdiff_ne] ring
    Causalean.PO.POBackdoorSystem.cutoffProp_calibrated_of_survival · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffSelection.lean:157
  • cutoffProp_mem_MSMSetCalib_of_survival theorem — Calibrated feasibility reduces to the survival equation. If the cutoff c solves the conditional treated-survival equation G(c) = survTarget, then cutoffProp Λ c ∈ MSMSetCalib Λ, discharging the hcut_mem hypothesis of msmUpperCalib_eq_cutoff.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    c :
    P.Ω → ℝ
    hint1 :
    Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    hmin_int :
    Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ
    hdiff_int :
    Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    hsurv :
    S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ
    S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ
    Proof (Lean source)
    theorem cutoffProp_mem_MSMSetCalib_of_survival (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmin_int : Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) (hsurv : S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ) : S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ := ⟨S.cutoffProp_mem_MSMSet Λ (le_of_lt hΛ) hoverlap c, S.cutoffProp_calibrated_of_survival Λ hΛ hoverlap c hint1 hmin_int hdiff_int hsurv⟩
    Causalean.PO.POBackdoorSystem.cutoffProp_mem_MSMSetCalib_of_survival · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffSelection.lean:279
  • ae_one_lt_wMin_and_le_wMax theorem — Fix a sensitivity parameter Λ at least one and assume the treated propensity score lies strictly between 0 and 1 almost surely. Then almost surely the smallest admissible treated inverse-propensity weight exceeds one and is at most the largest admissible weight.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin Λ ω ∧ S.wMin Λ ω ≤ S.wMax Λ ω
    Proof (Lean source)
    theorem ae_one_lt_wMin_and_le_wMax (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) : ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin Λ ω ∧ S.wMin Λ ω ≤ S.wMax Λ ω := by have hΛ0 : (0 : ℝ) < Λ := lt_of_lt_of_le zero_lt_one hΛ filter_upwards [hoverlap] with ω hω set e : ℝ := S.propScore true ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have h1e : 0 < 1 - e := by linarith refine ⟨?_, ?_⟩ · have : 0 < (1 - e) / (Λ * e) := by positivity simp only [POBackdoorSystem.wMin, ← he_def] linarith · simp only [POBackdoorSystem.wMin, POBackdoorSystem.wMax, ← he_def] have hd1 : (1 - e) / (Λ * e) ≤ Λ * (1 - e) / e := by rw [div_le_div_iff₀ (by positivity) he0] nlinarith [hΛ, mul_pos h1e he0, mul_pos hΛ0 he0, mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0)) (sub_nonneg.mpr hΛ)] linarith
    Causalean.PO.POBackdoorSystem.ae_one_lt_wMin_and_le_wMax · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffSelection.lean:297
  • integrable_treated_gt_cutoff theorem — Write D for the treated-arm indicator and Y for the observed outcome. For a measurable cutoff function c, the product D·1{Y > c} is integrable: it is a measurable function bounded by D.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    c :
    P.Ω → ℝ
    hc :
    Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    Proof (Lean source)
    theorem integrable_treated_gt_cutoff (c : P.Ω → ℝ) (hc : Measurable c) : Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ := by have hite : Measurable (fun ω => if c ω < S.factualY ω then (1 : ℝ) else 0) := Measurable.ite (measurableSet_lt hc S.measurable_factualY) measurable_const measurable_const have hD : Measurable (S.dVar.indicator true) := S.dVar.measurable_indicator true (MeasurableSet.singleton true) refine (S.dVar.integrable_indicator true (MeasurableSet.singleton true)).mono (hD.mul hite).aestronglyMeasurable (Filter.Eventually.of_forall fun ω => ?_) by_cases h : c ω < S.factualY ω <;> simp [h]
    Causalean.PO.POBackdoorSystem.integrable_treated_gt_cutoff · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffSelection.lean:321
  • integrable_treated_wMin_of_wMax theorem — Write D for the treated-arm indicator and w_min, w_max for the smallest and largest admissible treated inverse-propensity weights at a sensitivity level Λ at least one. If the treated propensity score lies strictly between 0 and 1 almost surely and D·w_max is integrable, then D·w_min is integrable, because 0 ≤ D·w_min ≤ D·w_max almost surely.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    hmax :
    Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
    Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ
    Proof (Lean source)
    theorem integrable_treated_wMin_of_wMax (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (hmax : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) : Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ := by have hD : Measurable (S.dVar.indicator true) := S.dVar.measurable_indicator true (MeasurableSet.singleton true) have hwmin : Measurable (S.wMin Λ) := S.measurable_wMin Λ refine hmax.mono (hD.mul hwmin).aestronglyMeasurable ?_ filter_upwards [S.ae_one_lt_wMin_and_le_wMax Λ hΛ hoverlap] with ω hω have hD0 : 0 ≤ S.dVar.indicator true ω := Set.indicator_nonneg (fun _ _ => zero_le_one) ω have hmin0 : 0 ≤ S.wMin Λ ω := by linarith [hω.1] rw [Real.norm_of_nonneg (mul_nonneg hD0 hmin0), Real.norm_of_nonneg (mul_nonneg hD0 (hmin0.trans hω.2))] exact mul_le_mul_of_nonneg_left hω.2 hD0
    Causalean.PO.POBackdoorSystem.integrable_treated_wMin_of_wMax · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffSelection.lean:335
  • integrable_wDiff_mul_treated_gt_cutoff theorem — Write D for the treated-arm indicator, Y for the observed outcome, and w_min, w_max for the smallest and largest admissible treated inverse-propensity weights at a sensitivity level Λ at least one. If the treated propensity score lies strictly between 0 and 1 almost surely, c is a measurable cutoff function, and D·w_max is integrable, then (w_max − w_min)·D·1{Y > c} is integrable, because almost surely it lies between 0 and D·w_max.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    c :
    P.Ω → ℝ
    hc :
    hmax :
    Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
    Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    Proof (Lean source)
    theorem integrable_wDiff_mul_treated_gt_cutoff (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hc : Measurable c) (hmax : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) : Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ := by have hite : Measurable (fun ω => if c ω < S.factualY ω then (1 : ℝ) else 0) := Measurable.ite (measurableSet_lt hc S.measurable_factualY) measurable_const measurable_const have hD : Measurable (S.dVar.indicator true) := S.dVar.measurable_indicator true (MeasurableSet.singleton true) have hwmin : Measurable (S.wMin Λ) := S.measurable_wMin Λ have hwmax : Measurable (S.wMax Λ) := S.measurable_wMax Λ refine hmax.mono ((hwmax.sub hwmin).mul (hD.mul hite)).aestronglyMeasurable ?_ filter_upwards [S.ae_one_lt_wMin_and_le_wMax Λ hΛ hoverlap] with ω hω have hD0 : 0 ≤ S.dVar.indicator true ω := Set.indicator_nonneg (fun _ _ => zero_le_one) ω have hmin0 : 0 ≤ S.wMin Λ ω := by linarith [hω.1] have hmax0 : 0 ≤ S.wMax Λ ω := hmin0.trans hω.2 have hdiff0 : 0 ≤ S.wMax Λ ω - S.wMin Λ ω := sub_nonneg.mpr hω.2 rw [Real.norm_of_nonneg (mul_nonneg hD0 hmax0)] by_cases h : c ω < S.factualY ω · simp only [if_pos h, mul_one] rw [Real.norm_of_nonneg (mul_nonneg hdiff0 hD0), mul_comm] exact mul_le_mul_of_nonneg_left (by linarith) hD0 · simp only [if_neg h, mul_zero, norm_zero] exact mul_nonneg hD0 hmax0
    Causalean.PO.POBackdoorSystem.integrable_wDiff_mul_treated_gt_cutoff · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffSelection.lean:356
Compatible 10 core · 12 supporting This file defines the arbitrary full-data models used in the converse half of MSM sharpness. ★ condExp_treatmentIndicator_eq_xyPropensity

Full-data models compatible with an observed marginal sensitivity model

This file defines the arbitrary full-data models used in the converse half of MSM sharpness. A compatible model lives on its own standard-Borel probability space, reproduces the observed (X,Z,Z·Y) law, satisfies latent unconfoundedness given (X,U), and obeys Tan's odds restriction with uniform two-sided complete-propensity overlap.

It also constructs the conditional propensity given (X,Y(1)), proves the conditional-independence bridge identifying it with the corresponding conditional treatment probability, and factors it measurably through the pair (X,Y(1)).

def propensityFactor reviewed
Causalean.PO.POBackdoorSystem

Given an observed backdoor system, the measurable propensity as a function of the covariate value is a Doob--Dynkin factor of the observed conditional treatment probability through the factual covariate.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
propensityFactor S :
γ → ℝ
structure MSMDataCompatible reviewed
Causalean.PO.POBackdoorSystem

For an observed backdoor system and sensitivity level, an MSM-compatible full-data model consists of its own standard-Borel probability space, measurable X,U,Z,Y(1), a complete propensity equal to the conditional treatment probability given (X,U), latent unconfoundedness, uniform complete overlap, Tan's odds bound, equality of the observable record law, and an integrable treated potential outcome.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
UType :
Type uU
X :
Ω → γ
U :
Ω → UType
Z :
Ω → Bool
Y1 :
Ω → ℝ
completePropensity :
Ω → ℝ
measurable_X :
measurable_U :
measurable_Z :
measurable_Y1 :
propensity_eq :
completePropensity
= Q[fun ω => if Z ω then (1 : ℝ) else 0 | comap X inferInstance ⊔ comap U inferInstance]
latentUnconfounded :
CondIndepFun (comap X inferInstance ⊔ comap U inferInstance) (sup_le measurable_X.comap_le measurable_U.comap_le) Z Y1 Q
completeOverlap :
∃ ε : ℝ, 0 < ε ∧ ∀ᵐ ω ∂Q, ε ≤ completePropensity ω ∧ completePropensity ω ≤ 1 - ε
completeOdds :
∀ᵐ ω ∂Q, 1 / Λ
≤ OR (completePropensity ω) (S.propensityFactor (X ω)) ∧
OR (completePropensity ω) (S.propensityFactor (X ω)) ≤ Λ
observedLaw :
Q.map (fun ω => ((X ω, Z ω), if Z ω then Y1 ω else 0)) = P.μ.map S.factualObservedRecord
integrable_Y1 :
Causalean.PO.POBackdoorSystem.MSMDataCompatible · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:67 · uses POBackdoorSystem , POSystem
def sigmaXU reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model, the σ-algebra generated by its covariate and latent variable is σ(X,U).

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
sigmaXU M :
def sigmaXY1 reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model, the σ-algebra generated by its covariate and treated potential outcome is σ(X,Y(1)).

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
sigmaXY1 M :
def treatmentIndicator reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model, the treated-arm indicator is one exactly when the model treatment is true.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
treatmentIndicator M :
M.Ω → ℝ
fun ω => if M.Z ω then 1 else 0
Causalean.PO.POBackdoorSystem.MSMDataCompatible.treatmentIndicator · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:141 · uses POBackdoorSystem , MSMDataCompatible , POSystem
def xyPropensity reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model, the complete propensity conditioned further down to σ(X,Y(1)) is the conditional expectation of e(X,U) given that σ-algebra.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
xyPropensity M :
M.Ω → ℝ
M.Q[M.completePropensity | M.sigmaXY1]
Causalean.PO.POBackdoorSystem.MSMDataCompatible.xyPropensity · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:160 · uses POBackdoorSystem , MSMDataCompatible , POSystem
theorem condExp_treatmentIndicator_eq_xyPropensity reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

Latent-unconfoundedness bridge. In a compatible model, the conditional treatment probability given (X,Y(1)) equals the conditional expectation of the complete propensity e(X,U) given (X,Y(1)).

Formal statement
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
M.Q[M.treatmentIndicator | M.sigmaXY1] =ᵐ[M.Q] M.xyPropensity
Proof (Lean source)
theorem condExp_treatmentIndicator_eq_xyPropensity : M.Q[M.treatmentIndicator | M.sigmaXY1] =ᵐ[M.Q] M.xyPropensity := by let mFull : MeasurableSpace M.Ω := M.sigmaXU ⊔ MeasurableSpace.comap M.Y1 inferInstance have hmFull : mFull ≤ M.measurableSpace := sup_le M.sigmaXU_le M.measurable_Y1.comap_le have hXYFull : M.sigmaXY1 ≤ mFull := by unfold sigmaXY1 mFull sigmaXU exact sup_le (le_trans le_sup_left le_sup_left) le_sup_right have hdrop : M.Q[M.treatmentIndicator | mFull] =ᵐ[M.Q] M.Q[M.treatmentIndicator | M.sigmaXU] := by let mark : Bool → ℝ := fun z => if z then 1 else 0 have hmark : Measurable mark := by fun_prop have htreat : M.treatmentIndicator = mark ∘ M.Z := by rfl rw [htreat] exact condExp_sup_comap_eq_of_condIndep M.sigmaXU_le M.measurable_Y1 M.measurable_Z M.latentUnconfounded hmark M.integrable_treatmentIndicator have htower : M.Q[M.treatmentIndicator | M.sigmaXY1] =ᵐ[M.Q] M.Q[M.Q[M.treatmentIndicator | mFull] | M.sigmaXY1] := (condExp_condExp_of_le (μ := M.Q) (f := M.treatmentIndicator) hXYFull hmFull).symm have hinner : M.Q[M.Q[M.treatmentIndicator | mFull] | M.sigmaXY1] =ᵐ[M.Q] M.Q[M.completePropensity | M.sigmaXY1] := by apply condExp_congr_ae refine hdrop.trans ?_ rw [M.propensity_eq] rfl exact htower.trans hinner
Causalean.PO.POBackdoorSystem.MSMDataCompatible.condExp_treatmentIndicator_eq_xyPropensity · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:171 · uses POBackdoorSystem , MSMDataCompatible , sigmaXY1 , treatmentIndicator , xyPropensity , POSystem
def xyPropensityFactor reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

Given a compatible model, the measurable (X,Y(1))-level propensity factor is a Doob--Dynkin representative of its conditional propensity.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
xyPropensityFactor M :
γ × ℝ → ℝ
Causalean.PO.POBackdoorSystem.MSMDataCompatible.xyPropensityFactor · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:218 · uses POBackdoorSystem , MSMDataCompatible , POSystem
def observedRecord reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model at a full-data unit, the observable record contains its covariate, treatment, and treated observed outcome Z·Y(1).

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
ω :
M.Ω
observedRecord M ω :
(γ × Bool) × ℝ
((M.X ω, M.Z ω), if M.Z ω then M.Y1 ω else 0)
Causalean.PO.POBackdoorSystem.MSMDataCompatible.observedRecord · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:234 · uses POBackdoorSystem , MSMDataCompatible , POSystem
def target reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

The mean of the treated potential outcome is the full-data target.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
target M :
ℝ
∫ ω, M.Y1 ω ∂M.Q
12 supporting declarations (lemmas, instances)
  • exists_propensityFactor theorem — The observed propensity has a measurable factor through the factual covariate.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    ∃ eX : γ → ℝ,
    conclusion 1
    conclusion 2
    S.propScore true = eX ∘ S.factualX
    Proof (Lean source)
    theorem exists_propensityFactor : ∃ eX : γ → ℝ, Measurable eX ∧ S.propScore true = eX ∘ S.factualX := by have hprop := S.measurable_propScore_sigmaX true rw [POBackdoorSystem.sigmaX] at hprop exact hprop.exists_eq_measurable_comp
    Causalean.PO.POBackdoorSystem.exists_propensityFactor · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:42
  • measurable_propensityFactor theorem — The covariate-level propensity factor is measurable.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Measurable S.propensityFactor
    Proof (Lean source)
    @[fun_prop] theorem measurable_propensityFactor : Measurable S.propensityFactor := (Classical.choose_spec (exists_propensityFactor S)).1
    Causalean.PO.POBackdoorSystem.measurable_propensityFactor · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:56
  • propScore_eq_propensityFactor_comp theorem — The observed propensity equals its covariate-level factor composed with the factual covariate.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    S.propScore true = S.propensityFactor ∘ S.factualX
    Proof (Lean source)
    theorem propScore_eq_propensityFactor_comp : S.propScore true = S.propensityFactor ∘ S.factualX := (Classical.choose_spec (exists_propensityFactor S)).2
    Causalean.PO.POBackdoorSystem.propScore_eq_propensityFactor_comp · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:61
  • sigmaXU_le theorem — The latent-information σ-algebra is coarser than the ambient σ-algebra.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    M.sigmaXU ≤ (inferInstance : MeasurableSpace M.Ω)
    Proof (Lean source)
    theorem sigmaXU_le : M.sigmaXU ≤ (inferInstance : MeasurableSpace M.Ω) := sup_le M.measurable_X.comap_le M.measurable_U.comap_le
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.sigmaXU_le · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:126
  • sigmaXY1_le theorem — The covariate--potential-outcome σ-algebra is coarser than the ambient σ-algebra.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    M.sigmaXY1 ≤ (inferInstance : MeasurableSpace M.Ω)
    Proof (Lean source)
    theorem sigmaXY1_le : M.sigmaXY1 ≤ (inferInstance : MeasurableSpace M.Ω) := sup_le M.measurable_X.comap_le M.measurable_Y1.comap_le
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.sigmaXY1_le · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:136
  • measurable_treatmentIndicator theorem — The treated-arm indicator is measurable.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    Measurable M.treatmentIndicator
    Proof (Lean source)
    @[fun_prop] theorem measurable_treatmentIndicator : Measurable M.treatmentIndicator := by unfold treatmentIndicator exact Measurable.ite (M.measurable_Z (measurableSet_singleton true)) measurable_const measurable_const
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.measurable_treatmentIndicator · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:145
  • integrable_treatmentIndicator theorem — The treated-arm indicator is integrable.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    Integrable M.treatmentIndicator M.Q
    Proof (Lean source)
    @[fun_prop] theorem integrable_treatmentIndicator : Integrable M.treatmentIndicator M.Q := by apply Integrable.of_bound M.measurable_treatmentIndicator.aestronglyMeasurable 1 exact ae_of_all _ fun ω => by simp only [treatmentIndicator] split <;> simp
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.integrable_treatmentIndicator · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:152
  • integrable_completePropensity theorem — The complete propensity is integrable.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    Integrable M.completePropensity M.Q
    Proof (Lean source)
    @[fun_prop] theorem integrable_completePropensity : Integrable M.completePropensity M.Q := by rw [M.propensity_eq] exact integrable_condExp
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.integrable_completePropensity · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:165
  • exists_xyPropensityFactor theorem — The conditional propensity given (X,Y(1)) has a measurable factor through the pair (X,Y(1)).
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    ∃ g : γ × ℝ → ℝ,
    conclusion 1
    conclusion 2
    M.xyPropensity = g ∘ fun ω => (M.X ω, M.Y1 ω)
    Proof (Lean source)
    theorem exists_xyPropensityFactor : ∃ g : γ × ℝ → ℝ, Measurable g ∧ M.xyPropensity = g ∘ fun ω => (M.X ω, M.Y1 ω) := by have hstrong : StronglyMeasurable[M.sigmaXY1] M.xyPropensity := stronglyMeasurable_condExp unfold sigmaXY1 at hstrong rw [← MeasurableSpace.comap_prodMk M.X M.Y1] at hstrong exact Mathlib.MeasureTheory.exists_measurable_real_comp_of_stronglyMeasurable_comap hstrong
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.exists_xyPropensityFactor · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:207
  • measurable_xyPropensityFactor theorem — The (X,Y(1))-level propensity factor is measurable.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    Measurable M.xyPropensityFactor
    Proof (Lean source)
    @[fun_prop] theorem measurable_xyPropensityFactor : Measurable M.xyPropensityFactor := (Classical.choose_spec (exists_xyPropensityFactor M)).1
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.measurable_xyPropensityFactor · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:223
  • xyPropensity_eq_factor_comp theorem — The conditional propensity given (X,Y(1)) equals its measurable factor evaluated at (X,Y(1)).
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    M.xyPropensity = M.xyPropensityFactor ∘ fun ω => (M.X ω, M.Y1 ω)
    Proof (Lean source)
    theorem xyPropensity_eq_factor_comp : M.xyPropensity = M.xyPropensityFactor ∘ fun ω => (M.X ω, M.Y1 ω) := (Classical.choose_spec (exists_xyPropensityFactor M)).2
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.xyPropensity_eq_factor_comp · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:228
  • measurable_observedRecord theorem — The observable-record map is measurable.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    Measurable M.observedRecord
    Proof (Lean source)
    @[fun_prop] theorem measurable_observedRecord : Measurable M.observedRecord := by unfold observedRecord exact (M.measurable_X.prodMk M.measurable_Z).prodMk (Measurable.ite (M.measurable_Z (measurableSet_singleton true)) M.measurable_Y1 measurable_const)
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.measurable_observedRecord · Causalean/PO/ID/Partial/Sensitivity/MSM/Compatible.lean:239
Control­Cutoff­Construct 5 core · 11 supporting This file is the control-arm mirror of CutoffConstruct: it constructs a σ(X)-measurable cutoff solving the control conditional-survival calibration equation and uses it to discharge the membership hypothesis in the calib ★ msmUpperCalib0_eq_cutoff_of_calibrating_cutoff_integrability

Marginal Sensitivity Model -- constructing the calibrating control cutoff

This file is the control-arm mirror of CutoffConstruct: it constructs a σ(X)-measurable cutoff solving the control conditional-survival calibration equation and uses it to discharge the membership hypothesis in the calibrated control calibrated upper bound.

The file defines controlSet, controlXYLaw, controlCondCDF, and calibLevel0; proves the constant and functional survival bridges controlSurv_const_eq and controlSurv_eq; constructs a measurable cutoff in exists_calibrating_cutoff0; and packages the calibrated upper endpoint under integrability of the calibrating cutoff as msmUpperCalib0_eq_cutoff_of_calibrating_cutoff_integrability.

def controlSet reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, and a back-door system on them, the control set is the set of all units whose factual treatment status is control.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
controlSet S :
Set P.Ω
S.factualD ⁻¹' {false}
def controlXYLaw reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, and a back-door system on them, the control covariate--outcome law is the image law of the factual covariate and factual outcome under the population measure restricted to control units.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
controlXYLaw S :
Measure (γ × ℝ)
(P.μ.restrict S.controlSet).map (fun ω => (S.factualX ω, S.factualY ω))
def controlCondCDF reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, a back-door system on them, a unit, and a real threshold, the control conditional distribution-function value is the probability that a control unit's factual outcome does not exceed the threshold, conditional on having that unit's factual covariate value.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
ω :
P.Ω
t :
ℝ
controlCondCDF S ω t :
ℝ
condCDF S.controlXYLaw (S.factualX ω) t
def calibLevel0 reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, a back-door system on them, a sensitivity level, and a unit, the control calibration quantile level is one minus the target control-survival probability divided by that unit's propensity for control. It is the control conditional-distribution-function level whose quantile supplies the calibrating cutoff.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
calibLevel0 S Λ ω :
ℝ
1 - S.survTarget0 Λ ω / S.propScore false ω
theorem msmUpperCalib0_eq_cutoff_of_calibrating_cutoff_integrability reviewed
Causalean.PO.POBackdoorSystem

Fix a sensitivity parameter Λ strictly greater than one. Assume the control propensity score, the conditional probability of no treatment given the covariates, lies strictly between 0 and 1 almost surely and the conditional distribution function of the control outcome given each covariate value is continuous. Write D for the control-arm indicator, Y for the observed outcome, and w_min ≤ w_max for the smallest and largest admissible control inverse-propensity weights at level Λ; the upper cutoff propensity at a cutoff c is 1/w_max where Y > c and 1/w_min elsewhere. Suppose every σ(X)-measurable cutoff c (measurable with respect to the covariates) for which the conditional mean of D·1{Y > c} given the covariates equals the control target survival probability almost surely makes two functions integrable: c itself and |c|·D·w_max, and that D·w_max and D·|Y|·w_max are integrable. Then there is a σ(X)-measurable cutoff c whose upper cutoff propensity lies in the calibrated control sensitivity set and whose candidate inverse-probability-weighted mean equals the calibrated upper bound for the mean of the control potential outcome.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 < Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
hatomless :
∀ a : γ, Continuous (condCDF S.controlXYLaw a)
hreg :
∀ c : P.Ω → ℝ
if
Measurable[S.sigmaX] c
and
S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ
then
Integrable c P.μ ∧
Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
henv :
Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
∃ c : P.Ω → ℝ,
conclusion 1
Measurable[S.sigmaX] c
conclusion 2
S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
conclusion 3
S.msmUpperCalib false Λ = S.candMean false (S.cutoffProp0 Λ c)
Proof (Lean source)
theorem msmUpperCalib0_eq_cutoff_of_calibrating_cutoff_integrability (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (hatomless : ∀ a : γ, Continuous (condCDF S.controlXYLaw a)) (hreg : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (henv : Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) : ∃ c : P.Ω → ℝ, Measurable[S.sigmaX] c ∧ S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ ∧ S.msmUpperCalib false Λ = S.candMean false (S.cutoffProp0 Λ c) := by obtain ⟨c, hc_meas, hsurv⟩ := S.exists_calibrating_cutoff0 Λ hoverlap hatomless (S.calibLevel0_mem_Ioo Λ hΛ hoverlap) obtain ⟨hc_int, hc_env⟩ := hreg c hc_meas hsurv have hc_amb : Measurable c := hc_meas.mono S.sigmaX_le le_rfl have hint1 := S.integrable_control_gt_cutoff c hc_amb have hdiff_int := S.integrable_wDiff0_mul_control_gt_cutoff Λ (le_of_lt hΛ) hoverlap c hc_amb hweight_env have hmin_int := S.integrable_control_wMin0_of_wMax0 Λ (le_of_lt hΛ) hoverlap hweight_env have hcut_mem : S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ := S.cutoffProp0_mem_MSMSetCalib0_of_survival Λ hΛ hoverlap c hint1 hmin_int hdiff_int hsurv have heq : S.msmUpperCalib false Λ = S.candMean false (S.cutoffProp0 Λ c) := S.msmUpperCalib0_eq_cutoff Λ (le_of_lt hΛ) hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env exact ⟨c, hc_meas, hcut_mem, heq⟩
11 supporting declarations (lemmas, instances)
  • controlXYLaw_eq lemma — The control push-forward law of the covariate and outcome is the image, under the map recording the factual covariate and factual outcome, of the population measure restricted to the control set.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    S.controlXYLaw = (P.μ.restrict S.controlSet).map (fun ω => (S.factualX ω, S.factualY ω))
    Proof (Lean source)
    @[causal_defs_simps] lemma controlXYLaw_eq : S.controlXYLaw = (P.μ.restrict S.controlSet).map (fun ω => (S.factualX ω, S.factualY ω)) := rfl
    Causalean.PO.POBackdoorSystem.controlXYLaw_eq · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoffConstruct.lean:56
  • measurable_controlCondCDF_const lemma — At a fixed outcome level, the control conditional CDF depends on the unit only through the observed covariate, so it is measurable for the covariate σ-algebra.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    t :
    ℝ
    Measurable[S.sigmaX] (fun ω => S.controlCondCDF ω t)
    Proof (Lean source)
    @[fun_prop] lemma measurable_controlCondCDF_const (t : ℝ) : Measurable[S.sigmaX] (fun ω => S.controlCondCDF ω t) := by rw [POBackdoorSystem.sigmaX] unfold POBackdoorSystem.controlCondCDF exact (ProbabilityTheory.measurable_condCDF S.controlXYLaw t).comp (comap_measurable S.factualX)
    Causalean.PO.POBackdoorSystem.measurable_controlCondCDF_const · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoffConstruct.lean:108
  • stronglyMeasurable_controlCondCDF_const lemma — The strongly-measurable form, for the covariate σ-algebra, of the control conditional CDF at a fixed outcome level.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    t :
    ℝ
    StronglyMeasurable[S.sigmaX] (fun ω => S.controlCondCDF ω t)
    Proof (Lean source)
    @[fun_prop] lemma stronglyMeasurable_controlCondCDF_const (t : ℝ) : StronglyMeasurable[S.sigmaX] (fun ω => S.controlCondCDF ω t) := (S.measurable_controlCondCDF_const t).stronglyMeasurable
    Causalean.PO.POBackdoorSystem.stronglyMeasurable_controlCondCDF_const · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoffConstruct.lean:118
  • measurable_controlCondCDF_const_ambient lemma — The control conditional CDF at a fixed outcome level is measurable for the ambient σ-algebra as well as for the covariate one.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    t :
    ℝ
    Measurable (fun ω => S.controlCondCDF ω t)
    Proof (Lean source)
    @[fun_prop] lemma measurable_controlCondCDF_const_ambient (t : ℝ) : Measurable (fun ω => S.controlCondCDF ω t) := (S.measurable_controlCondCDF_const t).mono S.sigmaX_le le_rfl
    Causalean.PO.POBackdoorSystem.measurable_controlCondCDF_const_ambient · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoffConstruct.lean:125
  • calibLevel0_mem_Ioo theorem — Fix a sensitivity parameter Λ strictly greater than one and assume the control propensity score lies strictly between 0 and 1 almost surely. Then the control calibration quantile level lies strictly between 0 and 1 almost surely: on the overlap event it equals Λ/(Λ+1).
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    ∀ᵐ ω ∂P.μ, 0 < S.calibLevel0 Λ ω ∧ S.calibLevel0 Λ ω < 1
    Proof (Lean source)
    theorem calibLevel0_mem_Ioo (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) : ∀ᵐ ω ∂P.μ, 0 < S.calibLevel0 Λ ω ∧ S.calibLevel0 Λ ω < 1 := by filter_upwards [hoverlap] with ω hω have h : S.calibLevel0 Λ ω = Λ / (Λ + 1) := (calibLevel_formulas hΛ hω.1 hω.2).1 have hΛ0 : 0 < Λ := by linarith have hΛp : 0 < Λ + 1 := by linarith rw [h] exact ⟨div_pos hΛ0 hΛp, (div_lt_one hΛp).mpr (by linarith)⟩
    Causalean.PO.POBackdoorSystem.calibLevel0_mem_Ioo · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoffConstruct.lean:311
  • controlSurv_const_eq theorem — The survival bridge (constant cutoff). The weighted conditional survival equals the control conditional survival scaled by the propensity: E[(1-Z)·1{Y>t} | σ(X)] = e₀(X)·(1 − F₀(t | X)) a.e. The genuine measure-theoretic content relates a conditional expectation under μ to the conditional CDF of the control push-forward law.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    t :
    ℝ
    P.μ[fun ω => S.dVar.indicator false ω * (if t < S.factualY ω then (1 : ℝ) else 0) | S.sigmaX]
    =ᵐ[P.μ] fun ω => S.propScore false ω * (1 - S.controlCondCDF ω t)
    Proof (Lean source)
    theorem controlSurv_const_eq (t : ℝ) : P.μ[fun ω => S.dVar.indicator false ω * (if t < S.factualY ω then (1 : ℝ) else 0) | S.sigmaX] =ᵐ[P.μ] fun ω => S.propScore false ω * (1 - S.controlCondCDF ω t) := by classical have hpoint : (fun ω => S.dVar.indicator false ω * (if t < S.factualY ω then (1 : ℝ) else 0)) =ᵐ[P.μ] (fun ω => S.dVar.indicator false ω - S.dVar.indicator false ω * (if S.factualY ω ≤ t then (1 : ℝ) else 0)) := by exact Filter.Eventually.of_forall fun ω => by by_cases hle : S.factualY ω ≤ t · have hnot : ¬ t < S.factualY ω := not_lt.mpr hle simp [hle, hnot] · have hlt : t < S.factualY ω := lt_of_not_ge hle simp [hle, hlt] refine (MeasureTheory.condExp_congr_ae (m := S.sigmaX) (μ := P.μ) hpoint).trans ?_ have hsub := MeasureTheory.condExp_sub (μ := P.μ) (m := S.sigmaX) (f := S.dVar.indicator false) (g := fun ω => S.dVar.indicator false ω * (if S.factualY ω ≤ t then (1 : ℝ) else 0)) (S.dVar.integrable_indicator false (MeasurableSet.singleton false)) (S.integrable_control_le_indicator t) have hle_bridge := S.controlLe_const_eq t filter_upwards [hsub, hle_bridge] with ω hsubω hleω change P.μ[S.dVar.indicator false - (fun ω => S.dVar.indicator false ω * (if S.factualY ω ≤ t then (1 : ℝ) else 0)) | S.sigmaX] ω = S.propScore false ω * (1 - S.controlCondCDF ω t) rw [hsubω] change S.propScore false ω - P.μ[fun ω => S.dVar.indicator false ω * (if S.factualY ω ≤ t then (1 : ℝ) else 0) | S.sigmaX] ω = S.propScore false ω * (1 - S.controlCondCDF ω t) rw [hleω] ring
    Causalean.PO.POBackdoorSystem.controlSurv_const_eq · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoffConstruct.lean:325
  • measurable_controlCondCDF_variable lemma — Evaluated at a cutoff that itself depends on the unit only through the observed covariate, the control conditional CDF is still measurable for the covariate σ-algebra.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    c :
    P.Ω → ℝ
    hc :
    Measurable[S.sigmaX] c
    Measurable[S.sigmaX] (fun ω => S.controlCondCDF ω (c ω))
    Proof (Lean source)
    @[fun_prop] lemma measurable_controlCondCDF_variable (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) : Measurable[S.sigmaX] (fun ω => S.controlCondCDF ω (c ω)) := by obtain ⟨q, hq, hc_eq⟩ := S.exists_factor_through_factualX hc haveI : IsFiniteMeasure S.controlXYLaw := by unfold POBackdoorSystem.controlXYLaw infer_instance rw [POBackdoorSystem.sigmaX, hc_eq] unfold POBackdoorSystem.controlCondCDF exact (measurable_condCDF_variable S.controlXYLaw hq).comp (comap_measurable S.factualX)
    Causalean.PO.POBackdoorSystem.measurable_controlCondCDF_variable · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoffConstruct.lean:401
  • stronglyMeasurable_controlCondCDF_variable lemma — The strongly-measurable form, for the covariate σ-algebra, of the control conditional CDF at a covariate-measurable cutoff.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    c :
    P.Ω → ℝ
    hc :
    Measurable[S.sigmaX] c
    StronglyMeasurable[S.sigmaX] (fun ω => S.controlCondCDF ω (c ω))
    Proof (Lean source)
    @[fun_prop] lemma stronglyMeasurable_controlCondCDF_variable (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) : StronglyMeasurable[S.sigmaX] (fun ω => S.controlCondCDF ω (c ω)) := (S.measurable_controlCondCDF_variable c hc).stronglyMeasurable
    Causalean.PO.POBackdoorSystem.stronglyMeasurable_controlCondCDF_variable · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoffConstruct.lean:416
  • measurable_controlCondCDF_variable_ambient lemma — The control conditional CDF at a covariate-measurable cutoff is measurable for the ambient σ-algebra as well as for the covariate one.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    c :
    P.Ω → ℝ
    hc :
    Measurable[S.sigmaX] c
    Measurable (fun ω => S.controlCondCDF ω (c ω))
    Proof (Lean source)
    @[fun_prop] lemma measurable_controlCondCDF_variable_ambient (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) : Measurable (fun ω => S.controlCondCDF ω (c ω)) := (S.measurable_controlCondCDF_variable c hc).mono S.sigmaX_le le_rfl
    Causalean.PO.POBackdoorSystem.measurable_controlCondCDF_variable_ambient · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoffConstruct.lean:424
  • controlSurv_eq theorem — The survival bridge (functional cutoff). The version of controlSurv_const_eq evaluated at a σ(X)-measurable cutoff c: E[(1-Z)·1{Y>c(X)} | σ(X)] = e₀(X)·(1 − F₀(c(X) | X)) a.e. Since c is σ(X)-measurable it is frozen inside the conditional expectation, reducing to the constant-cutoff bridge fibrewise. This is the form consumed by exists_calibrating_cutoff0.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    c :
    P.Ω → ℝ
    hc :
    Measurable[S.sigmaX] c
    S.controlSurv c =ᵐ[P.μ] fun ω => S.propScore false ω * (1 - S.controlCondCDF ω (c ω))
    Proof (Lean source)
    theorem controlSurv_eq (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) : S.controlSurv c =ᵐ[P.μ] fun ω => S.propScore false ω * (1 - S.controlCondCDF ω (c ω)) := by classical unfold POBackdoorSystem.controlSurv have hpoint : (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) =ᵐ[P.μ] (fun ω => S.dVar.indicator false ω - S.dVar.indicator false ω * (if S.factualY ω ≤ c ω then (1 : ℝ) else 0)) := by exact Filter.Eventually.of_forall fun ω => by by_cases hle : S.factualY ω ≤ c ω · have hnot : ¬ c ω < S.factualY ω := not_lt.mpr hle simp [hle, hnot] · have hlt : c ω < S.factualY ω := lt_of_not_ge hle simp [hle, hlt] refine (MeasureTheory.condExp_congr_ae (m := S.sigmaX) (μ := P.μ) hpoint).trans ?_ have hsub := MeasureTheory.condExp_sub (μ := P.μ) (m := S.sigmaX) (f := S.dVar.indicator false) (g := fun ω => S.dVar.indicator false ω * (if S.factualY ω ≤ c ω then (1 : ℝ) else 0)) (S.dVar.integrable_indicator false (MeasurableSet.singleton false)) (S.integrable_control_le_indicator_variable c hc) have hle_bridge := S.controlLe_eq c hc filter_upwards [hsub, hle_bridge] with ω hsubω hleω change P.μ[S.dVar.indicator false - (fun ω => S.dVar.indicator false ω * (if S.factualY ω ≤ c ω then (1 : ℝ) else 0)) | S.sigmaX] ω = S.propScore false ω * (1 - S.controlCondCDF ω (c ω)) rw [hsubω] change S.propScore false ω - P.μ[fun ω => S.dVar.indicator false ω * (if S.factualY ω ≤ c ω then (1 : ℝ) else 0) | S.sigmaX] ω = S.propScore false ω * (1 - S.controlCondCDF ω (c ω)) rw [hleω] ring
  • exists_calibrating_cutoff0 theorem — Existence of a calibrating control cutoff. Fix a sensitivity parameter. Under control-arm overlap, continuity of each control conditional CDF, and an interior calibration level, there is a σ(X)-measurable cutoff c solving controlSurv c =ᵐ survTarget0 Λ. The cutoff is the conditional quantile at calibLevel0.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    hatomless :
    ∀ a : γ, Continuous (condCDF S.controlXYLaw a)
    hlevel :
    ∀ᵐ ω ∂P.μ, 0 < S.calibLevel0 Λ ω ∧ S.calibLevel0 Λ ω < 1
    ∃ c : P.Ω → ℝ,
    conclusion 1
    Measurable[S.sigmaX] c
    conclusion 2
    S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ
    Proof (Lean source)
    theorem exists_calibrating_cutoff0 (Λ : ℝ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (hatomless : ∀ a : γ, Continuous (condCDF S.controlXYLaw a)) (hlevel : ∀ᵐ ω ∂P.μ, 0 < S.calibLevel0 Λ ω ∧ S.calibLevel0 Λ ω < 1) : ∃ c : P.Ω → ℝ, Measurable[S.sigmaX] c ∧ S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ := by classical have hprop_meas : Measurable[S.sigmaX] (S.propScore false) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hwMin0_meas : Measurable[S.sigmaX] (S.wMin0 Λ) := by unfold POBackdoorSystem.wMin0 exact measurable_const.add ((measurable_const.sub hprop_meas).div (measurable_const.mul hprop_meas)) have hwMax0_meas : Measurable[S.sigmaX] (S.wMax0 Λ) := by unfold POBackdoorSystem.wMax0 exact measurable_const.add ((measurable_const.mul (measurable_const.sub hprop_meas)).div hprop_meas) have hsurvTarget0_meas : Measurable[S.sigmaX] (S.survTarget0 Λ) := by unfold POBackdoorSystem.survTarget0 exact (measurable_const.sub (hwMin0_meas.mul hprop_meas)).div (hwMax0_meas.sub hwMin0_meas) have hlevel_meas : Measurable[S.sigmaX] (S.calibLevel0 Λ) := by unfold POBackdoorSystem.calibLevel0 exact measurable_const.sub (hsurvTarget0_meas.div hprop_meas) obtain ⟨g, hg, hg_eq⟩ := S.exists_factor_through_factualX hlevel_meas let τ : γ → ℝ := fun a => if 0 < g a ∧ g a < 1 then g a else (1 / 2 : ℝ) have hτ_meas : Measurable τ := by dsimp [τ] refine Measurable.ite ?_ hg measurable_const exact (measurableSet_lt measurable_const hg).inter (measurableSet_lt hg measurable_const) have hτ0 : ∀ a, 0 < τ a := by intro a dsimp [τ] by_cases ha : 0 < g a ∧ g a < 1 · simp [ha] · simp [ha] have hτ1 : ∀ a, τ a < 1 := by intro a dsimp [τ] by_cases ha : 0 < g a ∧ g a < 1 · simp [ha] · simp only [ha, ↓reduceIte] norm_num haveI : IsFiniteMeasure S.controlXYLaw := by unfold POBackdoorSystem.controlXYLaw infer_instance obtain ⟨hq_meas, hq_attain⟩ := measurable_condQuantile_and_attains S.controlXYLaw τ hτ_meas hτ0 hτ1 (fun a => (hatomless a).continuousAt) let c : P.Ω → ℝ := fun ω => condQuantile S.controlXYLaw τ (S.factualX ω) have hc_meas : Measurable[S.sigmaX] c := by rw [POBackdoorSystem.sigmaX] exact hq_meas.comp (comap_measurable S.factualX) refine ⟨c, hc_meas, ?_⟩ have hτ_eq_level : ∀ᵐ ω ∂P.μ, τ (S.factualX ω) = S.calibLevel0 Λ ω := by filter_upwards [hlevel] with ω hω have hgx : g (S.factualX ω) = S.calibLevel0 Λ ω := by exact (congrFun hg_eq ω).symm dsimp [τ] rw [hgx] simp [hω] have hsurv := S.controlSurv_eq c hc_meas filter_upwards [hsurv, hτ_eq_level, hoverlap] with ω hsurvω hτω hoverlapω rw [hsurvω] have hcdf : S.controlCondCDF ω (c ω) = τ (S.factualX ω) := by unfold POBackdoorSystem.controlCondCDF c exact hq_attain (S.factualX ω) rw [hcdf, hτω] unfold POBackdoorSystem.calibLevel0 have hpos : S.propScore false ω ≠ 0 := ne_of_gt hoverlapω.1 field_simp [hpos] ring
    Causalean.PO.POBackdoorSystem.exists_calibrating_cutoff0 · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlCutoffConstruct.lean:674
Lower­Bound 6 core · 8 supporting This file proves the lower-endpoint mirror of the treated-arm quantile-cutoff construction. ★ cutoff_optimal_lower★ exists_calibrating_cutoff_lower★ msmLowerCalib_eq_cutoff_of_calibrating_cutoff_integrability

Calibrated treated-arm lower bound for the marginal sensitivity model

This file proves the lower-endpoint mirror of the treated-arm quantile-cutoff construction. It defines lowerCutoffProp, survTargetLower, and calibLevelLower; proves lower-cutoff optimality and the endpoint identity msmLowerCalib_eq_cutoff; reduces calibrated feasibility to the lower survival equation; constructs a calibrating lower cutoff under continuous conditional treated laws; and packages the calibrated lower-bound theorem under integrability of the calibrating cutoff msmLowerCalib_eq_cutoff_of_calibrating_cutoff_integrability.

def lowerCutoffProp reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, a back-door system on them, a sensitivity level, a cutoff function, and a unit, the lower quantile-cutoff complete propensity is the reciprocal of the lower inverse-probability weight when that unit's factual outcome exceeds its cutoff and of the upper inverse-probability weight otherwise.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
c :
P.Ω → ℝ
ω :
P.Ω
lowerCutoffProp S Λ c ω :
ℝ
1 / (if c ω < S.factualY ω then S.wMin Λ ω else S.wMax Λ ω)
def survTargetLower reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, a back-door system on them, a sensitivity level, and a unit, the lower target survival probability is the upper inverse-probability weight times the treatment propensity minus one, divided by the difference between the upper and lower inverse-probability weights.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
survTargetLower S Λ ω :
ℝ
(S.wMax Λ ω * S.propScore true ω - 1) / (S.wMax Λ ω - S.wMin Λ ω)
def calibLevelLower reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, a back-door system on them, a sensitivity level, and a unit, the lower calibration quantile level is one minus the lower target survival probability divided by that unit's propensity for treatment.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
calibLevelLower S Λ ω :
ℝ
1 - S.survTargetLower Λ ω / S.propScore true ω
theorem cutoff_optimal_lower reviewed
Causalean.PO.POBackdoorSystem

Optimality of the lower quantile-cutoff weight. Fix a sensitivity parameter Λ at least 1 and assume the propensity score for treatment given the covariates lies strictly between 0 and 1 almost surely (overlap). For a σ(X)-measurable, integrable cutoff function c whose induced lower-cutoff candidate is feasible and calibrated, and under envelope-integrability conditions bounding the treated outcome, the treatment-weighted mass, and the cutoff-weighted mass by the upper marginal-sensitivity-model weight, then for any other calibrated, box-feasible candidate complete propensity ẽ, the lower-cutoff candidate mean is at most ẽ's candidate mean — the lower cutoff minimizes the candidate mean among calibrated candidates. The ≥-mirror of cutoff_optimal.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ
henv :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
etilde :
P.Ω → ℝ
hmem :
etilde ∈ S.MSMSetCalib true Λ
S.candMean true (S.lowerCutoffProp Λ c) ≤ S.candMean true etilde
Proof (Lean source)
theorem cutoff_optimal_lower (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ) (henv : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) {etilde : P.Ω → ℝ} (hmem : etilde ∈ S.MSMSetCalib true Λ) : S.candMean true (S.lowerCutoffProp Λ c) ≤ S.candMean true etilde := by classical have _ : Integrable c P.μ := by fun_prop have hΛ0 : (0 : ℝ) < Λ := lt_of_lt_of_le one_pos hΛ set A : P.Ω → ℝ := S.dVar.indicator true with hA_def set Y : P.Ω → ℝ := S.factualY with hY_def set e : P.Ω → ℝ := S.propScore true with he_def set wE : P.Ω → ℝ := fun ω => 1 / etilde ω with hwE_def set wC : P.Ω → ℝ := fun ω => if c ω < Y ω then S.wMin Λ ω else S.wMax Λ ω with hwC_def have hOR_box : ∀ {e et : ℝ}, 0 < e → e < 1 → 0 < et → et < 1 → ((1 / Λ ≤ OR et e ∧ OR et e ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et ∧ 1 / et ≤ 1 + Λ * (1 - e) / e)) := by intro e0 et he0 he1 het0 het1 have h1e : 0 < 1 - e0 := by linarith have h1et : 0 < 1 - et := by linarith have hOReq : OR et e0 = et * (1 - e0) / ((1 - et) * e0) := by rw [OR, div_div_eq_mul_div, div_mul_eq_mul_div, mul_comm, mul_div_mul_comm] ring_nf rw [hOReq] have hMax : (1 / Λ ≤ et * (1 - e0) / ((1 - et) * e0)) ↔ (1 / et ≤ 1 + Λ * (1 - e0) / e0) := by rw [div_le_div_iff₀ hΛ0 (by positivity : (0 : ℝ) < (1 - et) * e0), show (1 : ℝ) + Λ * (1 - e0) / e0 = (e0 + Λ * (1 - e0)) / e0 by field_simp, div_le_div_iff₀ het0 he0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] have hMin : (et * (1 - e0) / ((1 - et) * e0) ≤ Λ) ↔ (1 + (1 - e0) / (Λ * e0) ≤ 1 / et) := by rw [div_le_iff₀ (by positivity : (0 : ℝ) < (1 - et) * e0), show (1 : ℝ) + (1 - e0) / (Λ * e0) = (Λ * e0 + (1 - e0)) / (Λ * e0) by field_simp, div_le_div_iff₀ (by positivity : (0 : ℝ) < Λ * e0) het0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] rw [hMax, hMin, and_comm] have hAm : Measurable A := by fun_prop have hYm : Measurable Y := by rw [hY_def] exact S.measurable_factualY have hem : Measurable e := by rw [he_def] unfold POBackdoorSystem.propScore exact (stronglyMeasurable_condExp.mono S.sigmaX_le).measurable have hwMaxm : Measurable (S.wMax Λ) := by fun_prop have hwMinm : Measurable (S.wMin Λ) := by fun_prop have hwCm : Measurable wC := by rw [hwC_def] exact Measurable.ite (measurableSet_lt (hc_meas.mono S.sigmaX_le le_rfl) hYm) hwMinm hwMaxm have hA0 : ∀ ω, 0 ≤ A ω := fun ω => by rcases S.dVar.indicator_eq_one_or_zero true ω with h | h <;> simp [hA_def, h] have hae : ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin Λ ω ∧ S.wMin Λ ω ≤ S.wMax Λ ω := by filter_upwards [hoverlap] with ω hω obtain ⟨he0ω, he1ω⟩ := hω have h1e : 0 < 1 - e ω := by rw [he_def] at *; linarith have he0' : 0 < e ω := by rw [he_def] at *; exact he0ω refine ⟨?_, ?_⟩ · have : 0 < (1 - e ω) / (Λ * e ω) := by positivity simp only [POBackdoorSystem.wMin, ← he_def] linarith · simp only [POBackdoorSystem.wMin, POBackdoorSystem.wMax, ← he_def] have hd1 : (1 - e ω) / (Λ * e ω) ≤ Λ * (1 - e ω) / e ω := by rw [div_le_div_iff₀ (by positivity) he0'] nlinarith [hΛ, mul_pos h1e he0', mul_pos hΛ0 he0', mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0')) (sub_nonneg.mpr hΛ)] linarith have hboxE : ∀ᵐ ω ∂P.μ, S.wMin Λ ω ≤ wE ω ∧ wE ω ≤ S.wMax Λ ω := by obtain ⟨hinterior, hor⟩ := hmem.1 filter_upwards [hoverlap, hinterior, hor] with ω hov het hOR obtain ⟨he0ω, he1ω⟩ := hov obtain ⟨het0, het1⟩ := het have hbox := (hOR_box he0ω he1ω het0 het1).mp hOR simpa [POBackdoorSystem.wMin, POBackdoorSystem.wMax, he_def, hwE_def] using hbox have hboxC : ∀ᵐ ω ∂P.μ, S.wMin Λ ω ≤ wC ω ∧ wC ω ≤ S.wMax Λ ω ∧ 0 < wC ω := by filter_upwards [hae] with ω hω obtain ⟨hmin1, hminmax⟩ := hω rw [hwC_def] by_cases hcy : c ω < Y ω · simp only [if_pos hcy] exact ⟨le_rfl, hminmax, by linarith⟩ · simp only [if_neg hcy] exact ⟨hminmax, le_rfl, lt_of_lt_of_le (by linarith) hminmax⟩ have hXE_int : Integrable (fun ω => A ω / etilde ω) P.μ := by simpa [hA_def] using S.calibrated_weight_integrable true etilde hmem.2 have hAwE_int : Integrable (fun ω => A ω * wE ω) P.μ := by refine hXE_int.congr (Filter.Eventually.of_forall ?_) intro ω simp [hwE_def, div_eq_mul_inv] have hYE_int : Integrable (fun ω => A ω * Y ω * wE ω) P.μ := by have hmeas : AEStronglyMeasurable (fun ω => A ω * Y ω * wE ω) P.μ := by refine (hYm.aestronglyMeasurable.mul hAwE_int.aestronglyMeasurable).congr ?_ filter_upwards [] with ω simp only [Pi.mul_apply] ring refine Integrable.mono' henv hmeas ?_ filter_upwards [hboxE, hmem.1.1] with ω hbox hint obtain ⟨_, hmax⟩ := hbox obtain ⟨het0, _⟩ := hint rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), hwE_def, abs_of_nonneg (by positivity : 0 ≤ 1 / etilde ω), mul_assoc, mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) exact mul_le_mul_of_nonneg_left hmax (abs_nonneg _) have hYC_int : Integrable (fun ω => A ω * Y ω * wC ω) P.μ := by refine Integrable.mono' henv (((hAm.mul hYm).mul hwCm).aestronglyMeasurable) ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos), mul_assoc, mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) exact mul_le_mul_of_nonneg_left hmax (abs_nonneg _) have hXC_int : Integrable (fun ω => A ω / S.lowerCutoffProp Λ c ω) P.μ := by have hAwC_int : Integrable (fun ω => A ω * wC ω) P.μ := by refine Integrable.mono' hweight_env ((hAm.mul hwCm).aestronglyMeasurable) ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos)] exact mul_le_mul_of_nonneg_left hmax (hA0 ω) refine hAwC_int.congr ?_ filter_upwards [hboxC] with ω hbox change A ω * wC ω = A ω / (1 / (if c ω < S.factualY ω then S.wMin Λ ω else S.wMax Λ ω)) rw [hwC_def, hY_def, div_div_eq_mul_div, div_one] have hcE_int : Integrable (fun ω => c ω * A ω * wE ω) P.μ := by have hmeas : AEStronglyMeasurable (fun ω => c ω * A ω * wE ω) P.μ := by refine ((hc_meas.mono S.sigmaX_le le_rfl).aestronglyMeasurable.mul hAwE_int.aestronglyMeasurable).congr ?_ filter_upwards [] with ω simp only [Pi.mul_apply] ring refine Integrable.mono' hc_env hmeas ?_ filter_upwards [hboxE, hmem.1.1] with ω hbox hint obtain ⟨_, hmax⟩ := hbox obtain ⟨het0, _⟩ := hint rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), hwE_def, abs_of_nonneg (by positivity : 0 ≤ 1 / etilde ω), mul_assoc, mul_assoc] simpa [mul_assoc, hwE_def, one_div] using mul_le_mul_of_nonneg_left hmax (mul_nonneg (abs_nonneg (c ω)) (hA0 ω)) have hcC_int : Integrable (fun ω => c ω * A ω * wC ω) P.μ := by refine Integrable.mono' hc_env (((hc_meas.mono S.sigmaX_le le_rfl).mul hAm).mul hwCm).aestronglyMeasurable ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos), mul_assoc, mul_assoc] simpa [mul_assoc] using mul_le_mul_of_nonneg_left hmax (mul_nonneg (abs_nonneg (c ω)) (hA0 ω)) have hfirstE_int : Integrable (fun ω => A ω * (Y ω - c ω) * wE ω) P.μ := by refine (hYE_int.sub hcE_int).congr (Filter.Eventually.of_forall ?_) intro ω change A ω * Y ω * wE ω - c ω * A ω * wE ω = A ω * (Y ω - c ω) * wE ω ring have hfirstC_int : Integrable (fun ω => A ω * (Y ω - c ω) * wC ω) P.μ := by refine (hYC_int.sub hcC_int).congr (Filter.Eventually.of_forall ?_) intro ω change A ω * Y ω * wC ω - c ω * A ω * wC ω = A ω * (Y ω - c ω) * wC ω ring have hctermE_eq : ∫ ω, c ω * A ω * wE ω ∂P.μ = ∫ ω, c ω ∂P.μ := by have hprod_int : Integrable (fun ω => c ω * (A ω / etilde ω)) P.μ := by refine hcE_int.congr (Filter.Eventually.of_forall ?_) intro ω change c ω * A ω * (1 / etilde ω) = c ω * (A ω / etilde ω) rw [div_eq_mul_inv] ring have hpull : P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => c ω * P.μ[fun ω => A ω / etilde ω | S.sigmaX] ω) := by exact MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hc_meas.stronglyMeasurable hprod_int hXE_int have hcal : P.μ[fun ω => A ω / etilde ω | S.sigmaX] =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by simpa [POBackdoorSystem.Calibrated, hA_def] using hmem.2 have hmain : ∫ ω, c ω * (A ω / etilde ω) ∂P.μ = ∫ ω, c ω ∂P.μ := by have hcond : ∫ ω, P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * (A ω / etilde ω) ∂P.μ := MeasureTheory.integral_condExp S.sigmaX_le rw [← hcond] calc ∫ ω, P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * P.μ[fun ω => A ω / etilde ω | S.sigmaX] ω ∂P.μ := integral_congr_ae hpull _ = ∫ ω, c ω * 1 ∂P.μ := by refine integral_congr_ae ?_ filter_upwards [hcal] with ω hω rw [hω] _ = ∫ ω, c ω ∂P.μ := by simp rw [← hmain] refine integral_congr_ae (Filter.Eventually.of_forall ?_) intro ω change c ω * A ω * (1 / etilde ω) = c ω * (A ω / etilde ω) rw [div_eq_mul_inv] ring have hctermC_eq : ∫ ω, c ω * A ω * wC ω ∂P.μ = ∫ ω, c ω ∂P.μ := by have hprod_int : Integrable (fun ω => c ω * (A ω / S.lowerCutoffProp Λ c ω)) P.μ := by refine hcC_int.congr ?_ filter_upwards [hboxC] with ω hbox change c ω * A ω * wC ω = c ω * (A ω / (1 / (if c ω < S.factualY ω then S.wMin Λ ω else S.wMax Λ ω))) rw [hwC_def, hY_def, div_div_eq_mul_div, div_one] ring have hpull : P.μ[fun ω => c ω * (A ω / S.lowerCutoffProp Λ c ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => c ω * P.μ[fun ω => A ω / S.lowerCutoffProp Λ c ω | S.sigmaX] ω) := by exact MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hc_meas.stronglyMeasurable hprod_int hXC_int have hcal : P.μ[fun ω => A ω / S.lowerCutoffProp Λ c ω | S.sigmaX] =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by simpa [POBackdoorSystem.Calibrated, hA_def] using hcut_mem.2 have hmain : ∫ ω, c ω * (A ω / S.lowerCutoffProp Λ c ω) ∂P.μ = ∫ ω, c ω ∂P.μ := by have hcond : ∫ ω, P.μ[fun ω => c ω * (A ω / S.lowerCutoffProp Λ c ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * (A ω / S.lowerCutoffProp Λ c ω) ∂P.μ := MeasureTheory.integral_condExp S.sigmaX_le rw [← hcond] calc ∫ ω, P.μ[fun ω => c ω * (A ω / S.lowerCutoffProp Λ c ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * P.μ[fun ω => A ω / S.lowerCutoffProp Λ c ω | S.sigmaX] ω ∂P.μ := integral_congr_ae hpull _ = ∫ ω, c ω * 1 ∂P.μ := by refine integral_congr_ae ?_ filter_upwards [hcal] with ω hω rw [hω] _ = ∫ ω, c ω ∂P.μ := by simp rw [← hmain] refine integral_congr_ae ?_ -- … truncated; follow the source link for the rest …
theorem exists_calibrating_cutoff_lower reviewed
Causalean.PO.POBackdoorSystem

Existence of a calibrating lower cutoff. Fix a sensitivity parameter Λ, and assume the propensity score for treatment given the covariates lies strictly between 0 and 1 almost surely (overlap). If the treated outcome's conditional distribution given each covariate value has a continuous cumulative distribution function and the lower calibration quantile level lies strictly between 0 and 1 almost surely, then there exists an ambient-measurable cutoff function whose conditional treated-survival equals the lower target survival almost everywhere. The survTargetLower analogue of exists_calibrating_cutoff.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
hatomless :
∀ a : γ, Continuous (condCDF S.treatedXYLaw a)
hlevel :
∀ᵐ ω ∂P.μ, 0 < S.calibLevelLower Λ ω ∧ S.calibLevelLower Λ ω < 1
∃ c : P.Ω → ℝ,
conclusion 1
Measurable[S.sigmaX] c
conclusion 2
S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ
Proof (Lean source)
theorem exists_calibrating_cutoff_lower (Λ : ℝ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (hatomless : ∀ a : γ, Continuous (condCDF S.treatedXYLaw a)) (hlevel : ∀ᵐ ω ∂P.μ, 0 < S.calibLevelLower Λ ω ∧ S.calibLevelLower Λ ω < 1) : ∃ c : P.Ω → ℝ, Measurable[S.sigmaX] c ∧ S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ := by classical have _hprop_meas : Measurable[S.sigmaX] (S.propScore true) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hwMin_meas : Measurable[S.sigmaX] (S.wMin Λ) := by fun_prop have hwMax_meas : Measurable[S.sigmaX] (S.wMax Λ) := by fun_prop have hsurvTarget_meas : Measurable[S.sigmaX] (S.survTargetLower Λ) := by fun_prop have hlevel_meas : Measurable[S.sigmaX] (S.calibLevelLower Λ) := by fun_prop obtain ⟨g, hg, hg_eq⟩ := S.exists_factor_through_factualX hlevel_meas let τ : γ → ℝ := fun a => if 0 < g a ∧ g a < 1 then g a else (1 / 2 : ℝ) have hτ_meas : Measurable τ := by dsimp [τ] refine Measurable.ite ?_ hg measurable_const exact (measurableSet_lt measurable_const hg).inter (measurableSet_lt hg measurable_const) have hτ0 : ∀ a, 0 < τ a := by intro a dsimp [τ] by_cases ha : 0 < g a ∧ g a < 1 · simp [ha] · simp [ha] have hτ1 : ∀ a, τ a < 1 := by intro a dsimp [τ] by_cases ha : 0 < g a ∧ g a < 1 · simp [ha] · simp only [ha, ↓reduceIte] norm_num haveI : IsFiniteMeasure S.treatedXYLaw := by unfold POBackdoorSystem.treatedXYLaw infer_instance obtain ⟨hq_meas, hq_attain⟩ := measurable_condQuantile_and_attains S.treatedXYLaw τ hτ_meas hτ0 hτ1 (fun a => (hatomless a).continuousAt) let c : P.Ω → ℝ := fun ω => condQuantile S.treatedXYLaw τ (S.factualX ω) have hc_meas : Measurable[S.sigmaX] c := by rw [POBackdoorSystem.sigmaX] exact hq_meas.comp (comap_measurable S.factualX) refine ⟨c, hc_meas, ?_⟩ have hτ_eq_level : ∀ᵐ ω ∂P.μ, τ (S.factualX ω) = S.calibLevelLower Λ ω := by filter_upwards [hlevel] with ω hω have hgx : g (S.factualX ω) = S.calibLevelLower Λ ω := by exact (congrFun hg_eq ω).symm dsimp [τ] rw [hgx] simp [hω] have hsurv := S.treatedSurv_eq c hc_meas filter_upwards [hsurv, hτ_eq_level, hoverlap] with ω hsurvω hτω hoverlapω rw [hsurvω] have hcdf : S.treatedCondCDF ω (c ω) = τ (S.factualX ω) := by unfold POBackdoorSystem.treatedCondCDF c exact hq_attain (S.factualX ω) rw [hcdf, hτω] unfold POBackdoorSystem.calibLevelLower have hpos : S.propScore true ω ≠ 0 := ne_of_gt hoverlapω.1 field_simp [hpos] ring
theorem msmLowerCalib_eq_cutoff_of_calibrating_cutoff_integrability reviewed
Causalean.PO.POBackdoorSystem

Fix a sensitivity parameter Λ strictly greater than one. Assume the treated propensity score lies strictly between 0 and 1 almost surely and the conditional distribution function of the treated outcome given each covariate value is continuous. Write D for the treated-arm indicator, Y for the observed outcome, and w_min ≤ w_max for the smallest and largest admissible inverse-propensity weights at level Λ; the lower cutoff propensity at a cutoff c is 1/w_min where Y > c and 1/w_max elsewhere. Suppose every σ(X)-measurable cutoff c (measurable with respect to the covariates) for which the conditional mean of D·1{Y > c} given the covariates equals the lower target survival probability almost surely makes two functions integrable: c itself and |c|·D·w_max, and that D·w_max and D·|Y|·w_max are integrable. Then there is a σ(X)-measurable cutoff c whose lower cutoff propensity lies in the calibrated sensitivity set and whose candidate inverse-probability-weighted mean equals the calibrated lower bound for the mean of the treated potential outcome.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 < Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
hatomless :
∀ a : γ, Continuous (condCDF S.treatedXYLaw a)
hreg :
∀ c : P.Ω → ℝ
if
Measurable[S.sigmaX] c
and
S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ
then
Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hmax_int :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
henv :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
∃ c : P.Ω → ℝ,
conclusion 1
Measurable[S.sigmaX] c
conclusion 2
S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ
conclusion 3
S.msmLowerCalib true Λ = S.candMean true (S.lowerCutoffProp Λ c)
Proof (Lean source)
theorem msmLowerCalib_eq_cutoff_of_calibrating_cutoff_integrability (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (hatomless : ∀ a : γ, Continuous (condCDF S.treatedXYLaw a)) (hreg : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hmax_int : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (henv : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) : ∃ c : P.Ω → ℝ, Measurable[S.sigmaX] c ∧ S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ ∧ S.msmLowerCalib true Λ = S.candMean true (S.lowerCutoffProp Λ c) := by obtain ⟨c, hc_meas, hsurv⟩ := S.exists_calibrating_cutoff_lower Λ hoverlap hatomless (S.calibLevelLower_mem_Ioo Λ hΛ hoverlap) obtain ⟨hc_int, hc_env⟩ := hreg c hc_meas hsurv have hc_amb : Measurable c := hc_meas.mono S.sigmaX_le le_rfl have hint1 := S.integrable_treated_gt_cutoff c hc_amb have hdiff_int := S.integrable_wDiff_mul_treated_gt_cutoff Λ (le_of_lt hΛ) hoverlap c hc_amb hmax_int have hcut_mem : S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ := S.lowerCutoffProp_mem_MSMSetCalib_of_survival Λ hΛ hoverlap c hint1 hmax_int hdiff_int hsurv have heq : S.msmLowerCalib true Λ = S.candMean true (S.lowerCutoffProp Λ c) := S.msmLowerCalib_eq_cutoff Λ (le_of_lt hΛ) hoverlap c hc_meas hc_int hcut_mem henv hmax_int hc_env exact ⟨c, hc_meas, hcut_mem, heq⟩
8 supporting declarations (lemmas, instances)
  • measurable_survTargetLower_sigmaX lemma — The lower target survival is measurable for the covariate σ-algebra.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    Measurable[S.sigmaX] (S.survTargetLower Λ)
    Proof (Lean source)
    @[fun_prop] lemma measurable_survTargetLower_sigmaX (Λ : ℝ) : Measurable[S.sigmaX] (S.survTargetLower Λ) := by have hp : Measurable[S.sigmaX] (S.propScore true) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable unfold POBackdoorSystem.survTargetLower exact (((S.measurable_wMax_sigmaX Λ).mul hp).sub measurable_const).div ((S.measurable_wMax_sigmaX Λ).sub (S.measurable_wMin_sigmaX Λ))
    Causalean.PO.POBackdoorSystem.measurable_survTargetLower_sigmaX · Causalean/PO/ID/Partial/Sensitivity/MSM/LowerBound.lean:77
  • measurable_calibLevelLower_sigmaX lemma — The lower calibration quantile level is measurable for the covariate σ-algebra.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    Measurable[S.sigmaX] (S.calibLevelLower Λ)
    Proof (Lean source)
    @[fun_prop] lemma measurable_calibLevelLower_sigmaX (Λ : ℝ) : Measurable[S.sigmaX] (S.calibLevelLower Λ) := by have hp : Measurable[S.sigmaX] (S.propScore true) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable unfold POBackdoorSystem.calibLevelLower exact measurable_const.sub ((S.measurable_survTargetLower_sigmaX Λ).div hp)
    Causalean.PO.POBackdoorSystem.measurable_calibLevelLower_sigmaX · Causalean/PO/ID/Partial/Sensitivity/MSM/LowerBound.lean:88
  • calibLevelLower_mem_Ioo theorem — Fix a sensitivity parameter Λ strictly greater than one and assume the treated propensity score lies strictly between 0 and 1 almost surely. Then the lower calibration quantile level lies strictly between 0 and 1 almost surely: on the overlap event it equals 1/(Λ+1).
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    ∀ᵐ ω ∂P.μ, 0 < S.calibLevelLower Λ ω ∧ S.calibLevelLower Λ ω < 1
    Proof (Lean source)
    theorem calibLevelLower_mem_Ioo (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) : ∀ᵐ ω ∂P.μ, 0 < S.calibLevelLower Λ ω ∧ S.calibLevelLower Λ ω < 1 := by filter_upwards [hoverlap] with ω hω have h : S.calibLevelLower Λ ω = 1 / (Λ + 1) := (calibLevel_formulas hΛ hω.1 hω.2).2 have hΛ0 : 0 < Λ := by linarith have hΛp : 0 < Λ + 1 := by linarith rw [h] exact ⟨div_pos one_pos hΛp, (div_lt_one hΛp).mpr (by linarith)⟩
    Causalean.PO.POBackdoorSystem.calibLevelLower_mem_Ioo · Causalean/PO/ID/Partial/Sensitivity/MSM/LowerBound.lean:98
  • msmLowerCalib_eq_cutoff theorem — The calibrated lower bound has the quantile-balancing closed form. Given a calibrating lower cutoff, msmLowerCalib Λ = candMean (lowerCutoffProp Λ c).
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    c :
    P.Ω → ℝ
    hc_meas :
    Measurable[S.sigmaX] c
    hc_int :
    Integrable c P.μ
    hcut_mem :
    S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ
    henv :
    Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
    hweight_env :
    Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
    hc_env :
    Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
    S.msmLowerCalib true Λ = S.candMean true (S.lowerCutoffProp Λ c)
    Proof (Lean source)
    theorem msmLowerCalib_eq_cutoff (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ) (henv : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) : S.msmLowerCalib true Λ = S.candMean true (S.lowerCutoffProp Λ c) := by classical have hne : (S.candMean true '' S.MSMSetCalib true Λ).Nonempty := ⟨S.candMean true (S.lowerCutoffProp Λ c), Set.mem_image_of_mem _ hcut_mem⟩ have hle_all : ∀ x ∈ S.candMean true '' S.MSMSetCalib true Λ, S.candMean true (S.lowerCutoffProp Λ c) ≤ x := by rintro x ⟨etilde, hmem, rfl⟩ exact S.cutoff_optimal_lower Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env hmem have hbdd : BddBelow (S.candMean true '' S.MSMSetCalib true Λ) := ⟨S.candMean true (S.lowerCutoffProp Λ c), hle_all⟩ refine le_antisymm ?_ ?_ · unfold POBackdoorSystem.msmLowerCalib exact csInf_le hbdd (Set.mem_image_of_mem _ hcut_mem) · unfold POBackdoorSystem.msmLowerCalib exact le_csInf hne hle_all
    Causalean.PO.POBackdoorSystem.msmLowerCalib_eq_cutoff · Causalean/PO/ID/Partial/Sensitivity/MSM/LowerBound.lean:413
  • lowerCutoff_calibValue_eq theorem — Decomposition of the lower-cutoff calibration value. For a sensitivity level and cutoff function, assuming integrability of the treatment-weighted survival indicator, integrability of the treatment-weighted upper MSM weight, and integrability of the weighted survival spread, the identity E[Z/lowerCutoffProp Λ c | σ(X)] = wMax·e − (wMax − wMin)·G(c) holds, with G(c) = treatedSurv c.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    c :
    P.Ω → ℝ
    hint1 :
    Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    hmax_int :
    Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
    hdiff_int :
    Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    P.μ[fun ω => S.dVar.indicator true ω / S.lowerCutoffProp Λ c ω | S.sigmaX]
    =ᵐ[P.μ] (fun ω => S.wMax Λ ω * S.propScore true ω - (S.wMax Λ ω - S.wMin Λ ω) * S.treatedSurv c ω)
    Proof (Lean source)
    theorem lowerCutoff_calibValue_eq (Λ : ℝ) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmax_int : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) : P.μ[fun ω => S.dVar.indicator true ω / S.lowerCutoffProp Λ c ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMax Λ ω * S.propScore true ω - (S.wMax Λ ω - S.wMin Λ ω) * S.treatedSurv c ω) := by classical set A : P.Ω → ℝ := S.dVar.indicator true with hA_def set I : P.Ω → ℝ := fun ω => if c ω < S.factualY ω then (1 : ℝ) else 0 with hI_def have _hprop_meas : Measurable[S.sigmaX] (S.propScore true) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hwMin_smeas : StronglyMeasurable[S.sigmaX] (S.wMin Λ) := by fun_prop have hwMax_smeas : StronglyMeasurable[S.sigmaX] (S.wMax Λ) := by fun_prop have hdiff_smeas : StronglyMeasurable[S.sigmaX] (fun ω => S.wMax Λ ω - S.wMin Λ ω) := by fun_prop have hA_int : Integrable A P.μ := by fun_prop have hI_int : Integrable (fun ω => A ω * I ω) P.μ := by fun_prop have hmax_int' : Integrable (fun ω => S.wMax Λ ω * A ω) P.μ := by refine hmax_int.congr (Filter.Eventually.of_forall ?_) intro ω rw [hA_def] exact mul_comm _ _ have hpoint : (fun ω => S.dVar.indicator true ω / S.lowerCutoffProp Λ c ω) =ᵐ[P.μ] (fun ω => S.wMax Λ ω * A ω - (S.wMax Λ ω - S.wMin Λ ω) * (A ω * I ω)) := by refine Filter.Eventually.of_forall ?_ intro ω rw [hA_def, hI_def] by_cases hcy : c ω < S.factualY ω · simp only [POBackdoorSystem.lowerCutoffProp, if_pos hcy] rw [div_div_eq_mul_div, div_one] ring · simp only [POBackdoorSystem.lowerCutoffProp, if_neg hcy] rw [div_div_eq_mul_div, div_one] ring refine (MeasureTheory.condExp_congr_ae (m := S.sigmaX) (μ := P.μ) hpoint).trans ?_ have hsplit : P.μ[fun ω => S.wMax Λ ω * A ω - (S.wMax Λ ω - S.wMin Λ ω) * (A ω * I ω) | S.sigmaX] =ᵐ[P.μ] P.μ[fun ω => S.wMax Λ ω * A ω | S.sigmaX] - P.μ[fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (A ω * I ω) | S.sigmaX] := by condexp_linearity have hpullMax : P.μ[fun ω => S.wMax Λ ω * A ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMax Λ ω * S.propScore true ω) := by have h := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hwMax_smeas hmax_int' hA_int exact h.trans (Filter.EventuallyEq.of_eq (by funext ω rfl)) have hpullDiff : P.μ[fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (A ω * I ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * S.treatedSurv c ω) := by have h := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hdiff_smeas hdiff_int hI_int exact h.trans (Filter.EventuallyEq.of_eq (by funext ω rfl)) filter_upwards [hsplit, hpullMax, hpullDiff] with ω hsplitω hmaxω hdiffω rw [hsplitω] change P.μ[fun ω => S.wMax Λ ω * A ω | S.sigmaX] ω - P.μ[fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (A ω * I ω) | S.sigmaX] ω = S.wMax Λ ω * S.propScore true ω - (S.wMax Λ ω - S.wMin Λ ω) * S.treatedSurv c ω rw [hmaxω, hdiffω]
    Causalean.PO.POBackdoorSystem.lowerCutoff_calibValue_eq · Causalean/PO/ID/Partial/Sensitivity/MSM/LowerBound.lean:440
  • lowerCutoffProp_calibrated_of_survival theorem — A lower cutoff whose treated-survival function equals the target induces a calibrated propensity.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    c :
    P.Ω → ℝ
    hint1 :
    Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    hmax_int :
    Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
    hdiff_int :
    Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    hsurv :
    S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ
    S.Calibrated true (S.lowerCutoffProp Λ c)
    Proof (Lean source)
    theorem lowerCutoffProp_calibrated_of_survival (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmax_int : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) (hsurv : S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ) : S.Calibrated true (S.lowerCutoffProp Λ c) := by unfold POBackdoorSystem.Calibrated have hΛ0 : 0 < Λ := lt_trans zero_lt_one hΛ refine (S.lowerCutoff_calibValue_eq Λ c hint1 hmax_int hdiff_int).trans ?_ filter_upwards [hoverlap, hsurv] with ω hω hsurvω rw [hsurvω] set e : ℝ := S.propScore true ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have hdiff_pos : 0 < S.wMax Λ ω - S.wMin Λ ω := by simp only [POBackdoorSystem.wMax, POBackdoorSystem.wMin, ← he_def] have h1e : 0 < 1 - e := by linarith have hΛsq : 0 < Λ * Λ - 1 := by nlinarith field_simp [hΛ0.ne', he0.ne'] nlinarith [h1e, hΛsq, hΛ0, he0] have hdiff_ne : S.wMax Λ ω - S.wMin Λ ω ≠ 0 := hdiff_pos.ne' unfold POBackdoorSystem.survTargetLower field_simp [hdiff_ne] ring
    Causalean.PO.POBackdoorSystem.lowerCutoffProp_calibrated_of_survival · Causalean/PO/ID/Partial/Sensitivity/MSM/LowerBound.lean:517
  • lowerCutoffProp_mem_MSMSet theorem — Given a backdoor system and sensitivity parameter, if the parameter is at least one and the observed propensity lies strictly between zero and one almost everywhere, then for any cutoff function, the lower cutoff propensity belongs to the treated marginal-sensitivity-model set.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    c :
    P.Ω → ℝ
    S.lowerCutoffProp Λ c ∈ S.MSMSet true Λ
    Proof (Lean source)
    theorem lowerCutoffProp_mem_MSMSet (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) : S.lowerCutoffProp Λ c ∈ S.MSMSet true Λ := by classical have hΛ0 : (0 : ℝ) < Λ := lt_of_lt_of_le zero_lt_one hΛ have hOR_box : ∀ {e et : ℝ}, 0 < e → e < 1 → 0 < et → et < 1 → ((1 / Λ ≤ OR et e ∧ OR et e ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et ∧ 1 / et ≤ 1 + Λ * (1 - e) / e)) := by intro e et he0 he1 het0 het1 have h1e : 0 < 1 - e := by linarith have h1et : 0 < 1 - et := by linarith have hOReq : OR et e = et * (1 - e) / ((1 - et) * e) := by rw [OR, div_div_eq_mul_div, div_mul_eq_mul_div, mul_comm, mul_div_mul_comm] ring_nf rw [hOReq] have hMax : (1 / Λ ≤ et * (1 - e) / ((1 - et) * e)) ↔ (1 / et ≤ 1 + Λ * (1 - e) / e) := by rw [div_le_div_iff₀ hΛ0 (by positivity : (0 : ℝ) < (1 - et) * e), show (1 : ℝ) + Λ * (1 - e) / e = (e + Λ * (1 - e)) / e by field_simp, div_le_div_iff₀ het0 he0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] have hMin : (et * (1 - e) / ((1 - et) * e) ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et) := by rw [div_le_iff₀ (by positivity : (0 : ℝ) < (1 - et) * e), show (1 : ℝ) + (1 - e) / (Λ * e) = (Λ * e + (1 - e)) / (Λ * e) by field_simp, div_le_div_iff₀ (by positivity : (0 : ℝ) < Λ * e) het0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] rw [hMax, hMin, and_comm] have hae : ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin Λ ω ∧ S.wMin Λ ω ≤ S.wMax Λ ω := by filter_upwards [hoverlap] with ω hω set e : ℝ := S.propScore true ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have h1e : 0 < 1 - e := by linarith refine ⟨?_, ?_⟩ · have : 0 < (1 - e) / (Λ * e) := by positivity simp only [POBackdoorSystem.wMin, ← he_def] linarith · simp only [POBackdoorSystem.wMin, POBackdoorSystem.wMax, ← he_def] have hd1 : (1 - e) / (Λ * e) ≤ Λ * (1 - e) / e := by rw [div_le_div_iff₀ (by positivity) he0] nlinarith [hΛ, mul_pos h1e he0, mul_pos hΛ0 he0, mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0)) (sub_nonneg.mpr hΛ)] linarith have hboxC : ∀ᵐ ω ∂P.μ, S.wMin Λ ω ≤ (if c ω < S.factualY ω then S.wMin Λ ω else S.wMax Λ ω) ∧ (if c ω < S.factualY ω then S.wMin Λ ω else S.wMax Λ ω) ≤ S.wMax Λ ω ∧ 1 < (if c ω < S.factualY ω then S.wMin Λ ω else S.wMax Λ ω) := by filter_upwards [hae] with ω hω obtain ⟨hmin1, hminmax⟩ := hω by_cases hcy : c ω < S.factualY ω · simp only [if_pos hcy] exact ⟨le_rfl, hminmax, hmin1⟩ · simp only [if_neg hcy] exact ⟨hminmax, le_rfl, lt_of_lt_of_le hmin1 hminmax⟩ refine ⟨?_, ?_⟩ · filter_upwards [hboxC] with ω hω obtain ⟨_, _, hwgt⟩ := hω unfold POBackdoorSystem.lowerCutoffProp constructor · positivity · rw [div_lt_one (by linarith)] linarith · filter_upwards [hoverlap, hboxC] with ω hov hw obtain ⟨he0, he1⟩ := hov obtain ⟨hmin, hmax, hwgt⟩ := hw set wC : ℝ := if c ω < S.factualY ω then S.wMin Λ ω else S.wMax Λ ω with hwC_def have hcut : S.lowerCutoffProp Λ c ω = 1 / wC := by rw [POBackdoorSystem.lowerCutoffProp, hwC_def] have het0 : 0 < S.lowerCutoffProp Λ c ω := by rw [hcut] positivity have het1 : S.lowerCutoffProp Λ c ω < 1 := by rw [hcut, div_lt_one (by linarith)] linarith rw [(hOR_box he0 he1 het0 het1)] have hinv : 1 / S.lowerCutoffProp Λ c ω = wC := by rw [hcut, one_div_one_div] rw [hinv] simpa [POBackdoorSystem.wMin, POBackdoorSystem.wMax, hwC_def] using ⟨hmin, hmax⟩
    Causalean.PO.POBackdoorSystem.lowerCutoffProp_mem_MSMSet · Causalean/PO/ID/Partial/Sensitivity/MSM/LowerBound.lean:548
  • lowerCutoffProp_mem_MSMSetCalib_of_survival theorem — The lower cutoff is calibrated-feasible given the survival equation.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    c :
    P.Ω → ℝ
    hint1 :
    Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    hmax_int :
    Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
    hdiff_int :
    Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    hsurv :
    S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ
    S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ
    Proof (Lean source)
    theorem lowerCutoffProp_mem_MSMSetCalib_of_survival (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmax_int : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) (hsurv : S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ) : S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ := by exact ⟨S.lowerCutoffProp_mem_MSMSet Λ (le_of_lt hΛ) hoverlap c, S.lowerCutoffProp_calibrated_of_survival Λ hΛ hoverlap c hint1 hmax_int hdiff_int hsurv⟩
    Causalean.PO.POBackdoorSystem.lowerCutoffProp_mem_MSMSetCalib_of_survival · Causalean/PO/ID/Partial/Sensitivity/MSM/LowerBound.lean:638
Control­Lower­Bound 6 core · 6 supporting This file gives the control-arm sInf lower bound for the Marginal Sensitivity Model. ★ cutoff_optimal0_lower★ msmLowerCalib0_eq_cutoff★ msmLowerCalib0_eq_cutoff_of_calibrating_cutoff_integrability

Marginal Sensitivity Model — control calibrated lower bound

This file gives the control-arm sInf lower bound for the Marginal Sensitivity Model. It mirrors the treated lower-bound construction with the control propensity, untreated indicator, and control cutoff-survival equation.

It defines the lower-cutoff candidate lowerCutoffProp0, the lower survival target survTargetLower0, and the quantile level calibLevelLower0. The main results are cutoff_optimal0_lower, msmLowerCalib0_eq_cutoff, lowerControl_calibValue_eq, feasibility lemmas for the lower cutoff, the existence theorem exists_calibrating_cutoff0_lower, and the closed form under integrability of the calibrating cutoff msmLowerCalib0_eq_cutoff_of_calibrating_cutoff_integrability.

def lowerCutoffProp0 reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcome backdoor system, a sensitivity parameter, a real-valued cutoff function on the sample space, and a sample point, the lower quantile-cutoff complete propensity is the reciprocal of the lower admissible control inverse-propensity weight when the factual outcome exceeds the cutoff and of the upper admissible weight otherwise: [wmin⁡,0(Λ,ω)]−1[w_{\min,0}(\Lambda,\omega)]^{-1} if c(ω)<Y(ω)c(\omega)<Y(\omega), and [wmax⁡,0(Λ,ω)]−1[w_{\max,0}(\Lambda,\omega)]^{-1} otherwise.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
c :
P.Ω → ℝ
ω :
P.Ω
lowerCutoffProp0 S Λ c ω :
ℝ
1 / (if c ω < S.factualY ω then S.wMin0 Λ ω else S.wMax0 Λ ω)
def survTargetLower0 reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcome backdoor system, a sensitivity parameter, and a sample point, the lower target control-survival probability is (wmax⁡,0(Λ,ω)e0(ω)−1)/(wmax⁡,0(Λ,ω)−wmin⁡,0(Λ,ω))(w_{\max,0}(\Lambda,\omega)e_0(\omega)-1)/(w_{\max,0}(\Lambda,\omega)-w_{\min,0}(\Lambda,\omega)), where e0(ω)e_0(\omega) is the control propensity score.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
survTargetLower0 S Λ ω :
ℝ
(S.wMax0 Λ ω * S.propScore false ω - 1) / (S.wMax0 Λ ω - S.wMin0 Λ ω)
def calibLevelLower0 reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcome backdoor system, a sensitivity parameter, and a sample point, the lower calibration quantile level is one minus the lower target control-survival probability divided by the control propensity score at that point.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ω :
P.Ω
calibLevelLower0 S Λ ω :
ℝ
1 - S.survTargetLower0 Λ ω / S.propScore false ω
theorem cutoff_optimal0_lower reviewed
Causalean.PO.POBackdoorSystem

Optimality of the lower quantile-cutoff weight. Fix a sensitivity parameter Λ at least one. Assume the control propensity score is almost surely strictly between 0 and 1 (two-sided overlap), and let c be a σ(X)-measurable, integrable cutoff function such that the lower quantile-cutoff propensity it induces lies in the calibrated control ambiguity set. If the envelope 1_{D=0}·|Y|·wMax0(Λ) is integrable, the weighted control indicator 1_{D=0}·wMax0(Λ) is integrable, and the cutoff-weighted envelope |c|·1_{D=0}·wMax0(Λ) is integrable, then for any candidate complete control propensity ẽ in the calibrated ambiguity set, the candidate mean at the lower quantile-cutoff weight is no greater than the candidate mean at ẽ — the lower cutoff attains the minimum over all calibrated candidates.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
henv :
Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
etilde :
P.Ω → ℝ
hmem :
etilde ∈ S.MSMSetCalib false Λ
S.candMean false (S.lowerCutoffProp0 Λ c) ≤ S.candMean false etilde
Proof (Lean source)
theorem cutoff_optimal0_lower (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ) (henv : Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) {etilde : P.Ω → ℝ} (hmem : etilde ∈ S.MSMSetCalib false Λ) : S.candMean false (S.lowerCutoffProp0 Λ c) ≤ S.candMean false etilde := by classical have _ : Integrable c P.μ := hc_int have hΛ0 : (0 : ℝ) < Λ := lt_of_lt_of_le one_pos hΛ set A : P.Ω → ℝ := S.dVar.indicator false with hA_def set Y : P.Ω → ℝ := S.factualY with hY_def set e : P.Ω → ℝ := S.propScore false with he_def set wE : P.Ω → ℝ := fun ω => 1 / etilde ω with hwE_def set wC : P.Ω → ℝ := fun ω => if c ω < Y ω then S.wMin0 Λ ω else S.wMax0 Λ ω with hwC_def have hOR_box : ∀ {e et : ℝ}, 0 < e → e < 1 → 0 < et → et < 1 → ((1 / Λ ≤ OR et e ∧ OR et e ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et ∧ 1 / et ≤ 1 + Λ * (1 - e) / e)) := by intro e0 et he0 he1 het0 het1 have h1e : 0 < 1 - e0 := by linarith have h1et : 0 < 1 - et := by linarith have hOReq : OR et e0 = et * (1 - e0) / ((1 - et) * e0) := by rw [OR, div_div_eq_mul_div, div_mul_eq_mul_div, mul_comm, mul_div_mul_comm] ring_nf rw [hOReq] have hMax : (1 / Λ ≤ et * (1 - e0) / ((1 - et) * e0)) ↔ (1 / et ≤ 1 + Λ * (1 - e0) / e0) := by rw [div_le_div_iff₀ hΛ0 (by positivity : (0 : ℝ) < (1 - et) * e0), show (1 : ℝ) + Λ * (1 - e0) / e0 = (e0 + Λ * (1 - e0)) / e0 by field_simp, div_le_div_iff₀ het0 he0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] have hMin : (et * (1 - e0) / ((1 - et) * e0) ≤ Λ) ↔ (1 + (1 - e0) / (Λ * e0) ≤ 1 / et) := by rw [div_le_iff₀ (by positivity : (0 : ℝ) < (1 - et) * e0), show (1 : ℝ) + (1 - e0) / (Λ * e0) = (Λ * e0 + (1 - e0)) / (Λ * e0) by field_simp, div_le_div_iff₀ (by positivity : (0 : ℝ) < Λ * e0) het0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] rw [hMax, hMin, and_comm] have hAm : Measurable A := by rw [hA_def] exact S.dVar.measurable_indicator false (measurableSet_singleton false) have hYm : Measurable Y := by rw [hY_def] exact S.measurable_factualY have hem : Measurable e := by rw [he_def] unfold POBackdoorSystem.propScore exact (stronglyMeasurable_condExp.mono S.sigmaX_le).measurable have hwMaxm : Measurable (S.wMax0 Λ) := by unfold POBackdoorSystem.wMax0 exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hem)).div hem)) have hwMinm : Measurable (S.wMin0 Λ) := by unfold POBackdoorSystem.wMin0 exact (measurable_const.add ((measurable_const.sub hem).div (measurable_const.mul hem))) have hwCm : Measurable wC := by rw [hwC_def] exact Measurable.ite (measurableSet_lt (hc_meas.mono S.sigmaX_le le_rfl) hYm) hwMinm hwMaxm have hA0 : ∀ ω, 0 ≤ A ω := fun ω => by rcases S.dVar.indicator_eq_one_or_zero false ω with h | h <;> simp [hA_def, h] have hae : ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin0 Λ ω ∧ S.wMin0 Λ ω ≤ S.wMax0 Λ ω := by filter_upwards [hoverlap] with ω hω obtain ⟨he0ω, he1ω⟩ := hω have h1e : 0 < 1 - e ω := by rw [he_def] at *; linarith have he0' : 0 < e ω := by rw [he_def] at *; exact he0ω refine ⟨?_, ?_⟩ · have : 0 < (1 - e ω) / (Λ * e ω) := by positivity simp only [POBackdoorSystem.wMin0, ← he_def] linarith · simp only [POBackdoorSystem.wMin0, POBackdoorSystem.wMax0, ← he_def] have hd1 : (1 - e ω) / (Λ * e ω) ≤ Λ * (1 - e ω) / e ω := by rw [div_le_div_iff₀ (by positivity) he0'] nlinarith [hΛ, mul_pos h1e he0', mul_pos hΛ0 he0', mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0')) (sub_nonneg.mpr hΛ)] linarith have hboxE : ∀ᵐ ω ∂P.μ, S.wMin0 Λ ω ≤ wE ω ∧ wE ω ≤ S.wMax0 Λ ω := by obtain ⟨hinterior, hor⟩ := hmem.1 filter_upwards [hoverlap, hinterior, hor] with ω hov het hOR obtain ⟨he0ω, he1ω⟩ := hov obtain ⟨het0, het1⟩ := het have hbox := (hOR_box he0ω he1ω het0 het1).mp hOR simpa [POBackdoorSystem.wMin0, POBackdoorSystem.wMax0, he_def, hwE_def] using hbox have hboxC : ∀ᵐ ω ∂P.μ, S.wMin0 Λ ω ≤ wC ω ∧ wC ω ≤ S.wMax0 Λ ω ∧ 0 < wC ω := by filter_upwards [hae] with ω hω obtain ⟨hmin1, hminmax⟩ := hω rw [hwC_def] by_cases hcy : c ω < Y ω · simp only [if_pos hcy] exact ⟨le_rfl, hminmax, by linarith⟩ · simp only [if_neg hcy] exact ⟨hminmax, le_rfl, lt_of_lt_of_le (by linarith) hminmax⟩ have hXE_int : Integrable (fun ω => A ω / etilde ω) P.μ := by simpa [hA_def] using S.calibrated_weight_integrable false etilde hmem.2 have hAwE_int : Integrable (fun ω => A ω * wE ω) P.μ := by refine hXE_int.congr (Filter.Eventually.of_forall ?_) intro ω simp [hwE_def, div_eq_mul_inv] have hYE_int : Integrable (fun ω => A ω * Y ω * wE ω) P.μ := by have hmeas : AEStronglyMeasurable (fun ω => A ω * Y ω * wE ω) P.μ := by refine (hYm.aestronglyMeasurable.mul hAwE_int.aestronglyMeasurable).congr ?_ filter_upwards [] with ω simp only [Pi.mul_apply] ring refine Integrable.mono' henv hmeas ?_ filter_upwards [hboxE, hmem.1.1] with ω hbox hint obtain ⟨_, hmax⟩ := hbox obtain ⟨het0, _⟩ := hint rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), hwE_def, abs_of_nonneg (by positivity : 0 ≤ 1 / etilde ω), mul_assoc, mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) exact mul_le_mul_of_nonneg_left hmax (abs_nonneg _) have hYC_int : Integrable (fun ω => A ω * Y ω * wC ω) P.μ := by refine Integrable.mono' henv (((hAm.mul hYm).mul hwCm).aestronglyMeasurable) ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos), mul_assoc, mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) exact mul_le_mul_of_nonneg_left hmax (abs_nonneg _) have hXC_int : Integrable (fun ω => A ω / S.lowerCutoffProp0 Λ c ω) P.μ := by have hAwC_int : Integrable (fun ω => A ω * wC ω) P.μ := by refine Integrable.mono' hweight_env ((hAm.mul hwCm).aestronglyMeasurable) ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos)] exact mul_le_mul_of_nonneg_left hmax (hA0 ω) refine hAwC_int.congr ?_ filter_upwards [hboxC] with ω hbox change A ω * wC ω = A ω / (1 / (if c ω < S.factualY ω then S.wMin0 Λ ω else S.wMax0 Λ ω)) rw [hwC_def, hY_def, div_div_eq_mul_div, div_one] have hcE_int : Integrable (fun ω => c ω * A ω * wE ω) P.μ := by have hmeas : AEStronglyMeasurable (fun ω => c ω * A ω * wE ω) P.μ := by refine ((hc_meas.mono S.sigmaX_le le_rfl).aestronglyMeasurable.mul hAwE_int.aestronglyMeasurable).congr ?_ filter_upwards [] with ω simp only [Pi.mul_apply] ring refine Integrable.mono' hc_env hmeas ?_ filter_upwards [hboxE, hmem.1.1] with ω hbox hint obtain ⟨_, hmax⟩ := hbox obtain ⟨het0, _⟩ := hint rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), hwE_def, abs_of_nonneg (by positivity : 0 ≤ 1 / etilde ω), mul_assoc, mul_assoc] simpa [mul_assoc, hwE_def, one_div] using mul_le_mul_of_nonneg_left hmax (mul_nonneg (abs_nonneg (c ω)) (hA0 ω)) have hcC_int : Integrable (fun ω => c ω * A ω * wC ω) P.μ := by refine Integrable.mono' hc_env (((hc_meas.mono S.sigmaX_le le_rfl).mul hAm).mul hwCm).aestronglyMeasurable ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos), mul_assoc, mul_assoc] simpa [mul_assoc] using mul_le_mul_of_nonneg_left hmax (mul_nonneg (abs_nonneg (c ω)) (hA0 ω)) have hfirstE_int : Integrable (fun ω => A ω * (Y ω - c ω) * wE ω) P.μ := by refine (hYE_int.sub hcE_int).congr (Filter.Eventually.of_forall ?_) intro ω change A ω * Y ω * wE ω - c ω * A ω * wE ω = A ω * (Y ω - c ω) * wE ω ring have hfirstC_int : Integrable (fun ω => A ω * (Y ω - c ω) * wC ω) P.μ := by refine (hYC_int.sub hcC_int).congr (Filter.Eventually.of_forall ?_) intro ω change A ω * Y ω * wC ω - c ω * A ω * wC ω = A ω * (Y ω - c ω) * wC ω ring have hctermE_eq : ∫ ω, c ω * A ω * wE ω ∂P.μ = ∫ ω, c ω ∂P.μ := by have hprod_int : Integrable (fun ω => c ω * (A ω / etilde ω)) P.μ := by refine hcE_int.congr (Filter.Eventually.of_forall ?_) intro ω change c ω * A ω * (1 / etilde ω) = c ω * (A ω / etilde ω) rw [div_eq_mul_inv] ring have hpull : P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => c ω * P.μ[fun ω => A ω / etilde ω | S.sigmaX] ω) := by exact MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hc_meas.stronglyMeasurable hprod_int hXE_int have hcal : P.μ[fun ω => A ω / etilde ω | S.sigmaX] =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by simpa [POBackdoorSystem.Calibrated, hA_def] using hmem.2 have hmain : ∫ ω, c ω * (A ω / etilde ω) ∂P.μ = ∫ ω, c ω ∂P.μ := by have hcond : ∫ ω, P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * (A ω / etilde ω) ∂P.μ := MeasureTheory.integral_condExp S.sigmaX_le rw [← hcond] calc ∫ ω, P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * P.μ[fun ω => A ω / etilde ω | S.sigmaX] ω ∂P.μ := integral_congr_ae hpull _ = ∫ ω, c ω * 1 ∂P.μ := by refine integral_congr_ae ?_ filter_upwards [hcal] with ω hω rw [hω] _ = ∫ ω, c ω ∂P.μ := by simp rw [← hmain] refine integral_congr_ae (Filter.Eventually.of_forall ?_) intro ω change c ω * A ω * (1 / etilde ω) = c ω * (A ω / etilde ω) rw [div_eq_mul_inv] ring have hctermC_eq : ∫ ω, c ω * A ω * wC ω ∂P.μ = ∫ ω, c ω ∂P.μ := by have hprod_int : Integrable (fun ω => c ω * (A ω / S.lowerCutoffProp0 Λ c ω)) P.μ := by refine hcC_int.congr ?_ filter_upwards [hboxC] with ω hbox change c ω * A ω * wC ω = c ω * (A ω / (1 / (if c ω < S.factualY ω then S.wMin0 Λ ω else S.wMax0 Λ ω))) rw [hwC_def, hY_def, div_div_eq_mul_div, div_one] ring have hpull : P.μ[fun ω => c ω * (A ω / S.lowerCutoffProp0 Λ c ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => c ω * P.μ[fun ω => A ω / S.lowerCutoffProp0 Λ c ω | S.sigmaX] ω) := by exact MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hc_meas.stronglyMeasurable hprod_int hXC_int have hcal : P.μ[fun ω => A ω / S.lowerCutoffProp0 Λ c ω | S.sigmaX] =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by simpa [POBackdoorSystem.Calibrated, hA_def] using hcut_mem.2 have hmain : ∫ ω, c ω * (A ω / S.lowerCutoffProp0 Λ c ω) ∂P.μ = ∫ ω, c ω ∂P.μ := by have hcond : ∫ ω, P.μ[fun ω => c ω * (A ω / S.lowerCutoffProp0 Λ c ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * (A ω / S.lowerCutoffProp0 Λ c ω) ∂P.μ := MeasureTheory.integral_condExp S.sigmaX_le rw [← hcond] calc -- … truncated; follow the source link for the rest …
theorem msmLowerCalib0_eq_cutoff reviewed
Causalean.PO.POBackdoorSystem

The calibrated lower bound has the quantile-balancing closed form. Fix a sensitivity parameter Λ at least one. Under two-sided overlap of the control propensity score, given a σ(X)-measurable, integrable cutoff c whose induced lower quantile-cutoff propensity is itself calibrated-feasible, and assuming the envelope, weighted-indicator, and cutoff-weighted envelope integrability conditions bounding the IPW integrands, the calibrated (infimum) lower bound for E[Y(0)] over the calibrated ambiguity set equals the candidate mean evaluated at the lower quantile-cutoff propensity.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
henv :
Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
S.msmLowerCalib false Λ = S.candMean false (S.lowerCutoffProp0 Λ c)
Proof (Lean source)
theorem msmLowerCalib0_eq_cutoff (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ) (henv : Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) : S.msmLowerCalib false Λ = S.candMean false (S.lowerCutoffProp0 Λ c) := by classical have hne : (S.candMean false '' S.MSMSetCalib false Λ).Nonempty := ⟨S.candMean false (S.lowerCutoffProp0 Λ c), Set.mem_image_of_mem _ hcut_mem⟩ have hle_all : ∀ x ∈ S.candMean false '' S.MSMSetCalib false Λ, S.candMean false (S.lowerCutoffProp0 Λ c) ≤ x := by rintro x ⟨etilde, hmem, rfl⟩ exact S.cutoff_optimal0_lower Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env hmem have hbdd : BddBelow (S.candMean false '' S.MSMSetCalib false Λ) := ⟨S.candMean false (S.lowerCutoffProp0 Λ c), hle_all⟩ refine le_antisymm ?_ ?_ · exact csInf_le hbdd (Set.mem_image_of_mem _ hcut_mem) · exact le_csInf hne hle_all
theorem msmLowerCalib0_eq_cutoff_of_calibrating_cutoff_integrability reviewed
Causalean.PO.POBackdoorSystem

Fix a sensitivity parameter Λ strictly greater than one. Assume the control propensity score, the conditional probability of no treatment given the covariates, lies strictly between 0 and 1 almost surely and the conditional distribution function of the control outcome given each covariate value is continuous. Write D for the control-arm indicator, Y for the observed outcome, and w_min ≤ w_max for the smallest and largest admissible control inverse-propensity weights at level Λ; the lower cutoff propensity at a cutoff c is 1/w_min where Y > c and 1/w_max elsewhere. Suppose every σ(X)-measurable cutoff c (measurable with respect to the covariates) for which the conditional mean of D·1{Y > c} given the covariates equals the lower control target survival probability almost surely makes two functions integrable: c itself and |c|·D·w_max, and that D·w_max and D·|Y|·w_max are integrable. Then there is a σ(X)-measurable cutoff c whose lower cutoff propensity lies in the calibrated control sensitivity set and whose candidate inverse-probability-weighted mean equals the calibrated lower bound for the mean of the control potential outcome.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 < Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
hatomless :
∀ a : γ, Continuous (condCDF S.controlXYLaw a)
hreg :
∀ c : P.Ω → ℝ
if
Measurable[S.sigmaX] c
and
S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ
then
Integrable c P.μ ∧
Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
hmax_int :
Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
henv :
Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ
∃ c : P.Ω → ℝ,
conclusion 1
Measurable[S.sigmaX] c
conclusion 2
S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
conclusion 3
S.msmLowerCalib false Λ = S.candMean false (S.lowerCutoffProp0 Λ c)
Proof (Lean source)
theorem msmLowerCalib0_eq_cutoff_of_calibrating_cutoff_integrability (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (hatomless : ∀ a : γ, Continuous (condCDF S.controlXYLaw a)) (hreg : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hmax_int : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (henv : Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ) : ∃ c : P.Ω → ℝ, Measurable[S.sigmaX] c ∧ S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ ∧ S.msmLowerCalib false Λ = S.candMean false (S.lowerCutoffProp0 Λ c) := by obtain ⟨c, hc_meas, hsurv⟩ := S.exists_calibrating_cutoff0_lower Λ hoverlap hatomless (S.calibLevelLower0_mem_Ioo Λ hΛ hoverlap) obtain ⟨hc_int, hc_env⟩ := hreg c hc_meas hsurv have hc_amb : Measurable c := hc_meas.mono S.sigmaX_le le_rfl have hint1 := S.integrable_control_gt_cutoff c hc_amb have hdiff_int := S.integrable_wDiff0_mul_control_gt_cutoff Λ (le_of_lt hΛ) hoverlap c hc_amb hmax_int have hcut_mem : S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ := S.lowerCutoffProp0_mem_MSMSetCalib0_of_survival Λ hΛ hoverlap c hint1 hmax_int hdiff_int hsurv have heq : S.msmLowerCalib false Λ = S.candMean false (S.lowerCutoffProp0 Λ c) := S.msmLowerCalib0_eq_cutoff Λ (le_of_lt hΛ) hoverlap c hc_meas hc_int hcut_mem henv hmax_int hc_env exact ⟨c, hc_meas, hcut_mem, heq⟩
6 supporting declarations (lemmas, instances)
  • calibLevelLower0_mem_Ioo theorem — Fix a sensitivity parameter Λ strictly greater than one and assume the control propensity score lies strictly between 0 and 1 almost surely. Then the lower control calibration quantile level lies strictly between 0 and 1 almost surely: on the overlap event it equals 1/(Λ+1).
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    ∀ᵐ ω ∂P.μ, 0 < S.calibLevelLower0 Λ ω ∧ S.calibLevelLower0 Λ ω < 1
    Proof (Lean source)
    theorem calibLevelLower0_mem_Ioo (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) : ∀ᵐ ω ∂P.μ, 0 < S.calibLevelLower0 Λ ω ∧ S.calibLevelLower0 Λ ω < 1 := by filter_upwards [hoverlap] with ω hω have h : S.calibLevelLower0 Λ ω = 1 / (Λ + 1) := (calibLevel_formulas hΛ hω.1 hω.2).2 have hΛ0 : 0 < Λ := by linarith have hΛp : 0 < Λ + 1 := by linarith rw [h] exact ⟨div_pos one_pos hΛp, (div_lt_one hΛp).mpr (by linarith)⟩
    Causalean.PO.POBackdoorSystem.calibLevelLower0_mem_Ioo · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlLowerBound.lean:55
  • lowerControl_calibValue_eq theorem — Decomposition of the lower-cutoff calibration value. For a sensitivity level and cutoff function, assuming integrability of the control-weighted survival indicator, integrability of the control-weighted upper MSM weight, and integrability of the weighted survival spread, the identity E[(1-Z)/lowerCutoffProp0 Λ c | σ(X)] = wMax0·e₀ − (wMax0 − wMin0)·G(c) holds, with G(c) = controlSurv c.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    c :
    P.Ω → ℝ
    hint1 :
    Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    hmax_int :
    Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
    hdiff_int :
    Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    P.μ[fun ω => S.dVar.indicator false ω / S.lowerCutoffProp0 Λ c ω | S.sigmaX]
    =ᵐ[P.μ] (fun ω => S.wMax0 Λ ω * S.propScore false ω - (S.wMax0 Λ ω - S.wMin0 Λ ω) * S.controlSurv c ω)
    Proof (Lean source)
    theorem lowerControl_calibValue_eq (Λ : ℝ) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmax_int : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) : P.μ[fun ω => S.dVar.indicator false ω / S.lowerCutoffProp0 Λ c ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMax0 Λ ω * S.propScore false ω - (S.wMax0 Λ ω - S.wMin0 Λ ω) * S.controlSurv c ω) := by classical set A : P.Ω → ℝ := S.dVar.indicator false with hA_def set I : P.Ω → ℝ := fun ω => if c ω < S.factualY ω then (1 : ℝ) else 0 with hI_def have hprop_meas : Measurable[S.sigmaX] (S.propScore false) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hwMin_smeas : StronglyMeasurable[S.sigmaX] (S.wMin0 Λ) := by unfold POBackdoorSystem.wMin0 exact (measurable_const.add ((measurable_const.sub hprop_meas).div (measurable_const.mul hprop_meas))).stronglyMeasurable have hwMax_smeas : StronglyMeasurable[S.sigmaX] (S.wMax0 Λ) := by unfold POBackdoorSystem.wMax0 exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hprop_meas)).div hprop_meas)).stronglyMeasurable have hdiff_smeas : StronglyMeasurable[S.sigmaX] (fun ω => S.wMax0 Λ ω - S.wMin0 Λ ω) := (hwMax_smeas.measurable.sub hwMin_smeas.measurable).stronglyMeasurable have hA_int : Integrable A P.μ := by rw [hA_def] exact S.dVar.integrable_indicator (μ := P.μ) false (measurableSet_singleton false) have hI_int : Integrable (fun ω => A ω * I ω) P.μ := by rw [hA_def, hI_def] exact hint1 have hmax_int' : Integrable (fun ω => S.wMax0 Λ ω * A ω) P.μ := by refine hmax_int.congr (Filter.Eventually.of_forall ?_) intro ω rw [hA_def] exact mul_comm _ _ have hpoint : (fun ω => S.dVar.indicator false ω / S.lowerCutoffProp0 Λ c ω) =ᵐ[P.μ] (fun ω => S.wMax0 Λ ω * A ω - (S.wMax0 Λ ω - S.wMin0 Λ ω) * (A ω * I ω)) := by refine Filter.Eventually.of_forall ?_ intro ω rw [hA_def, hI_def] by_cases hcy : c ω < S.factualY ω · simp only [POBackdoorSystem.lowerCutoffProp0, if_pos hcy] rw [div_div_eq_mul_div, div_one] ring · simp only [POBackdoorSystem.lowerCutoffProp0, if_neg hcy] rw [div_div_eq_mul_div, div_one] ring refine (MeasureTheory.condExp_congr_ae (m := S.sigmaX) (μ := P.μ) hpoint).trans ?_ have hsplit : P.μ[fun ω => S.wMax0 Λ ω * A ω - (S.wMax0 Λ ω - S.wMin0 Λ ω) * (A ω * I ω) | S.sigmaX] =ᵐ[P.μ] P.μ[fun ω => S.wMax0 Λ ω * A ω | S.sigmaX] - P.μ[fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (A ω * I ω) | S.sigmaX] := MeasureTheory.condExp_sub hmax_int' hdiff_int S.sigmaX have hpullMax : P.μ[fun ω => S.wMax0 Λ ω * A ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMax0 Λ ω * S.propScore false ω) := by have h := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hwMax_smeas hmax_int' hA_int exact h.trans (Filter.EventuallyEq.of_eq (by funext ω rfl)) have hpullDiff : P.μ[fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (A ω * I ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * S.controlSurv c ω) := by have h := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hdiff_smeas hdiff_int hI_int exact h.trans (Filter.EventuallyEq.of_eq (by funext ω rfl)) filter_upwards [hsplit, hpullMax, hpullDiff] with ω hsplitω hmaxω hdiffω rw [hsplitω] change P.μ[fun ω => S.wMax0 Λ ω * A ω | S.sigmaX] ω - P.μ[fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (A ω * I ω) | S.sigmaX] ω = S.wMax0 Λ ω * S.propScore false ω - (S.wMax0 Λ ω - S.wMin0 Λ ω) * S.controlSurv c ω rw [hmaxω, hdiffω]
    Causalean.PO.POBackdoorSystem.lowerControl_calibValue_eq · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlLowerBound.lean:410
  • lowerCutoffProp0_calibrated_of_survival theorem — A lower cutoff whose control-survival function equals the target induces a calibrated control propensity.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    c :
    P.Ω → ℝ
    hint1 :
    Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    hmax_int :
    Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
    hdiff_int :
    Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    hsurv :
    S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ
    S.Calibrated false (S.lowerCutoffProp0 Λ c)
    Proof (Lean source)
    theorem lowerCutoffProp0_calibrated_of_survival (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmax_int : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) (hsurv : S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ) : S.Calibrated false (S.lowerCutoffProp0 Λ c) := by have hΛ0 : 0 < Λ := lt_trans zero_lt_one hΛ refine (S.lowerControl_calibValue_eq Λ c hint1 hmax_int hdiff_int).trans ?_ filter_upwards [hoverlap, hsurv] with ω hω hsurvω rw [hsurvω] set e : ℝ := S.propScore false ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have hdiff_pos : 0 < S.wMax0 Λ ω - S.wMin0 Λ ω := by simp only [POBackdoorSystem.wMax0, POBackdoorSystem.wMin0, ← he_def] have h1e : 0 < 1 - e := by linarith have hΛsq : 0 < Λ * Λ - 1 := by nlinarith field_simp [hΛ0.ne', he0.ne'] nlinarith [h1e, hΛsq, hΛ0, he0] have hdiff_ne : S.wMax0 Λ ω - S.wMin0 Λ ω ≠ 0 := hdiff_pos.ne' unfold POBackdoorSystem.survTargetLower0 field_simp [hdiff_ne] ring
    Causalean.PO.POBackdoorSystem.lowerCutoffProp0_calibrated_of_survival · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlLowerBound.lean:498
  • lowerCutoffProp0_mem_MSMSet0 theorem — The lower cutoff propensity is always in the odds-ratio box.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    c :
    P.Ω → ℝ
    S.lowerCutoffProp0 Λ c ∈ S.MSMSet false Λ
    Proof (Lean source)
    theorem lowerCutoffProp0_mem_MSMSet0 (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) : S.lowerCutoffProp0 Λ c ∈ S.MSMSet false Λ := by classical have hΛ0 : (0 : ℝ) < Λ := lt_of_lt_of_le zero_lt_one hΛ have hOR_box : ∀ {e et : ℝ}, 0 < e → e < 1 → 0 < et → et < 1 → ((1 / Λ ≤ OR et e ∧ OR et e ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et ∧ 1 / et ≤ 1 + Λ * (1 - e) / e)) := by intro e et he0 he1 het0 het1 have h1e : 0 < 1 - e := by linarith have h1et : 0 < 1 - et := by linarith have hOReq : OR et e = et * (1 - e) / ((1 - et) * e) := by rw [OR, div_div_eq_mul_div, div_mul_eq_mul_div, mul_comm, mul_div_mul_comm] ring_nf rw [hOReq] have hMax : (1 / Λ ≤ et * (1 - e) / ((1 - et) * e)) ↔ (1 / et ≤ 1 + Λ * (1 - e) / e) := by rw [div_le_div_iff₀ hΛ0 (by positivity : (0 : ℝ) < (1 - et) * e), show (1 : ℝ) + Λ * (1 - e) / e = (e + Λ * (1 - e)) / e by field_simp, div_le_div_iff₀ het0 he0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] have hMin : (et * (1 - e) / ((1 - et) * e) ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et) := by rw [div_le_iff₀ (by positivity : (0 : ℝ) < (1 - et) * e), show (1 : ℝ) + (1 - e) / (Λ * e) = (Λ * e + (1 - e)) / (Λ * e) by field_simp, div_le_div_iff₀ (by positivity : (0 : ℝ) < Λ * e) het0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] rw [hMax, hMin, and_comm] have hae : ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin0 Λ ω ∧ S.wMin0 Λ ω ≤ S.wMax0 Λ ω := by filter_upwards [hoverlap] with ω hω set e : ℝ := S.propScore false ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have h1e : 0 < 1 - e := by linarith refine ⟨?_, ?_⟩ · have : 0 < (1 - e) / (Λ * e) := by positivity simp only [POBackdoorSystem.wMin0, ← he_def] linarith · simp only [POBackdoorSystem.wMin0, POBackdoorSystem.wMax0, ← he_def] have hd1 : (1 - e) / (Λ * e) ≤ Λ * (1 - e) / e := by rw [div_le_div_iff₀ (by positivity) he0] nlinarith [hΛ, mul_pos h1e he0, mul_pos hΛ0 he0, mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0)) (sub_nonneg.mpr hΛ)] linarith have hboxC : ∀ᵐ ω ∂P.μ, S.wMin0 Λ ω ≤ (if c ω < S.factualY ω then S.wMin0 Λ ω else S.wMax0 Λ ω) ∧ (if c ω < S.factualY ω then S.wMin0 Λ ω else S.wMax0 Λ ω) ≤ S.wMax0 Λ ω ∧ 1 < (if c ω < S.factualY ω then S.wMin0 Λ ω else S.wMax0 Λ ω) := by filter_upwards [hae] with ω hω obtain ⟨hmin1, hminmax⟩ := hω by_cases hcy : c ω < S.factualY ω · simp only [if_pos hcy] exact ⟨le_rfl, hminmax, hmin1⟩ · simp only [if_neg hcy] exact ⟨hminmax, le_rfl, lt_of_lt_of_le hmin1 hminmax⟩ refine ⟨?_, ?_⟩ · filter_upwards [hboxC] with ω hω obtain ⟨_, _, hwgt⟩ := hω unfold POBackdoorSystem.lowerCutoffProp0 constructor · positivity · rw [div_lt_one (by linarith)] linarith · filter_upwards [hoverlap, hboxC] with ω hov hw obtain ⟨he0, he1⟩ := hov obtain ⟨hmin, hmax, hwgt⟩ := hw set wC : ℝ := if c ω < S.factualY ω then S.wMin0 Λ ω else S.wMax0 Λ ω with hwC_def have hcut : S.lowerCutoffProp0 Λ c ω = 1 / wC := by rw [POBackdoorSystem.lowerCutoffProp0, hwC_def] have het0 : 0 < S.lowerCutoffProp0 Λ c ω := by rw [hcut] positivity have het1 : S.lowerCutoffProp0 Λ c ω < 1 := by rw [hcut, div_lt_one (by linarith)] linarith rw [(hOR_box he0 he1 het0 het1)] have hinv : 1 / S.lowerCutoffProp0 Λ c ω = wC := by rw [hcut, one_div_one_div] rw [hinv] simpa [POBackdoorSystem.wMin0, POBackdoorSystem.wMax0, hwC_def] using ⟨hmin, hmax⟩
    Causalean.PO.POBackdoorSystem.lowerCutoffProp0_mem_MSMSet0 · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlLowerBound.lean:528
  • lowerCutoffProp0_mem_MSMSetCalib0_of_survival theorem — The lower cutoff is calibrated-feasible given the survival equation.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    c :
    P.Ω → ℝ
    hint1 :
    Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ
    hmax_int :
    Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
    hdiff_int :
    Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
    hsurv :
    S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ
    S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
    Proof (Lean source)
    theorem lowerCutoffProp0_mem_MSMSetCalib0_of_survival (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hint1 : Integrable (fun ω => S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) P.μ) (hmax_int : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hdiff_int : Integrable (fun ω => (S.wMax0 Λ ω - S.wMin0 Λ ω) * (S.dVar.indicator false ω * (if c ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) (hsurv : S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ) : S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ := by exact ⟨S.lowerCutoffProp0_mem_MSMSet0 Λ (le_of_lt hΛ) hoverlap c, S.lowerCutoffProp0_calibrated_of_survival Λ hΛ hoverlap c hint1 hmax_int hdiff_int hsurv⟩
    Causalean.PO.POBackdoorSystem.lowerCutoffProp0_mem_MSMSetCalib0_of_survival · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlLowerBound.lean:614
  • exists_calibrating_cutoff0_lower theorem — Existence of a calibrating lower cutoff. Fix a sensitivity parameter. Under control-arm overlap, continuity of each control conditional CDF, and an interior lower calibration level, there is a σ(X)-measurable cutoff c with controlSurv c =ᵐ survTargetLower0 Λ.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    hatomless :
    ∀ a : γ, Continuous (condCDF S.controlXYLaw a)
    hlevel :
    ∀ᵐ ω ∂P.μ, 0 < S.calibLevelLower0 Λ ω ∧ S.calibLevelLower0 Λ ω < 1
    ∃ c : P.Ω → ℝ,
    conclusion 1
    Measurable[S.sigmaX] c
    conclusion 2
    S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ
    Proof (Lean source)
    theorem exists_calibrating_cutoff0_lower (Λ : ℝ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (hatomless : ∀ a : γ, Continuous (condCDF S.controlXYLaw a)) (hlevel : ∀ᵐ ω ∂P.μ, 0 < S.calibLevelLower0 Λ ω ∧ S.calibLevelLower0 Λ ω < 1) : ∃ c : P.Ω → ℝ, Measurable[S.sigmaX] c ∧ S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ := by classical have hprop_meas : Measurable[S.sigmaX] (S.propScore false) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hwMin_meas : Measurable[S.sigmaX] (S.wMin0 Λ) := by unfold POBackdoorSystem.wMin0 exact measurable_const.add ((measurable_const.sub hprop_meas).div (measurable_const.mul hprop_meas)) have hwMax_meas : Measurable[S.sigmaX] (S.wMax0 Λ) := by unfold POBackdoorSystem.wMax0 exact measurable_const.add ((measurable_const.mul (measurable_const.sub hprop_meas)).div hprop_meas) have hsurvTarget_meas : Measurable[S.sigmaX] (S.survTargetLower0 Λ) := by unfold POBackdoorSystem.survTargetLower0 exact ((hwMax_meas.mul hprop_meas).sub measurable_const).div (hwMax_meas.sub hwMin_meas) have hlevel_meas : Measurable[S.sigmaX] (S.calibLevelLower0 Λ) := by unfold POBackdoorSystem.calibLevelLower0 exact measurable_const.sub (hsurvTarget_meas.div hprop_meas) obtain ⟨g, hg, hg_eq⟩ := S.exists_factor_through_factualX hlevel_meas let τ : γ → ℝ := fun a => if 0 < g a ∧ g a < 1 then g a else (1 / 2 : ℝ) have hτ_meas : Measurable τ := by dsimp [τ] refine Measurable.ite ?_ hg measurable_const exact (measurableSet_lt measurable_const hg).inter (measurableSet_lt hg measurable_const) have hτ0 : ∀ a, 0 < τ a := by intro a dsimp [τ] by_cases ha : 0 < g a ∧ g a < 1 · simp [ha] · simp [ha] have hτ1 : ∀ a, τ a < 1 := by intro a dsimp [τ] by_cases ha : 0 < g a ∧ g a < 1 · simp [ha] · simp only [ha, ↓reduceIte] norm_num haveI : IsFiniteMeasure S.controlXYLaw := by unfold POBackdoorSystem.controlXYLaw infer_instance obtain ⟨hq_meas, hq_attain⟩ := measurable_condQuantile_and_attains S.controlXYLaw τ hτ_meas hτ0 hτ1 (fun a => (hatomless a).continuousAt) let c : P.Ω → ℝ := fun ω => condQuantile S.controlXYLaw τ (S.factualX ω) have hc_meas : Measurable[S.sigmaX] c := by rw [POBackdoorSystem.sigmaX] exact hq_meas.comp (comap_measurable S.factualX) refine ⟨c, hc_meas, ?_⟩ have hτ_eq_level : ∀ᵐ ω ∂P.μ, τ (S.factualX ω) = S.calibLevelLower0 Λ ω := by filter_upwards [hlevel] with ω hω have hgx : g (S.factualX ω) = S.calibLevelLower0 Λ ω := by exact (congrFun hg_eq ω).symm dsimp [τ] rw [hgx] simp [hω] have hsurv := S.controlSurv_eq c hc_meas filter_upwards [hsurv, hτ_eq_level, hoverlap] with ω hsurvω hτω hoverlapω rw [hsurvω] have hcdf : S.controlCondCDF ω (c ω) = τ (S.factualX ω) := by unfold POBackdoorSystem.controlCondCDF c exact hq_attain (S.factualX ω) rw [hcdf, hτω] unfold POBackdoorSystem.calibLevelLower0 have hpos : S.propScore false ω ≠ 0 := ne_of_gt hoverlapω.1 field_simp [hpos] ring
    Causalean.PO.POBackdoorSystem.exists_calibrating_cutoff0_lower · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlLowerBound.lean:630
Observed­Candidates 7 core · 3 supporting Dorn--Guo's calibrated variational problem optimizes over candidates that are functions of the observed covariate and outcome on the treated arm. ★ msmUpperCalibObs_eq★ msmLowerCalibObs_eq

Observed candidates for the treated marginal sensitivity model

Dorn--Guo's calibrated variational problem optimizes over candidates that are functions of the observed covariate and outcome on the treated arm. This file formalizes that candidate class and proves that restricting the existing calibrated variational problem to it does not change either endpoint: the explicit upper and lower quantile-cutoff optimizers are observed-data measurable.

The construction of a compatible full-data law realizing every observed candidate is a separate measure-construction problem and is not asserted here.

def sigmaXYObs reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system, the observed covariate--outcome σ-algebra is the least σ-algebra on the population making both the factual covariate and factual outcome measurable.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
sigmaXYObs S :
comap S.factualX inferInstance ⊔ comap S.factualY inferInstance
def ObservedOnTreated reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a candidate propensity, the candidate is observed-data measurable on the treated arm when it has a version that is measurable with respect to the factual covariate--outcome σ-algebra and agrees with the candidate almost surely among treated units.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
etilde :
P.Ω → ℝ
ObservedOnTreated S etilde :
Prop
∃ eObs : P.Ω → ℝ,
clause 1
Measurable[S.sigmaXYObs] eObs
clause 2
etilde =ᵐ[P.μ.restrict S.treatedSet] eObs
def MSMSetCalibObs reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a sensitivity level, the observed calibrated treated candidate set consists of candidates that belong to the calibrated marginal-sensitivity set and are observed-data measurable on the treated arm.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
MSMSetCalibObs S Λ :
Set (P.Ω → ℝ)
{ etilde | etilde ∈ S.MSMSetCalib true Λ ∧ S.ObservedOnTreated etilde }
def msmUpperCalibObs reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a sensitivity level, the observed-candidate calibrated upper endpoint is the supremum of the treated candidate mean over observed calibrated candidates.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
msmUpperCalibObs S Λ :
ℝ
sSup (S.candMean true '' S.MSMSetCalibObs Λ)
def msmLowerCalibObs reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a sensitivity level, the observed-candidate calibrated lower endpoint is the infimum of the treated candidate mean over observed calibrated candidates.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
msmLowerCalibObs S Λ :
ℝ
sInf (S.candMean true '' S.MSMSetCalibObs Λ)
theorem msmUpperCalibObs_eq reviewed
Causalean.PO.POBackdoorSystem

Observed-candidate upper endpoint. Fix a sensitivity level at least one, strict overlap, and a covariate-measurable integrable cutoff whose upper-cutoff candidate is calibrated and box-feasible. Under the three integrable envelopes used by the cutoff exchange argument, the supremum over observed-data calibrated candidates equals the calibrated MSM upper endpoint.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ
henv :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
S.msmUpperCalibObs Λ = S.msmUpperCalib true Λ
Proof (Lean source)
theorem msmUpperCalibObs_eq (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ) (henv : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) : S.msmUpperCalibObs Λ = S.msmUpperCalib true Λ := by let eCut := S.cutoffProp Λ c have hcut_obs : eCut ∈ S.MSMSetCalibObs Λ := S.cutoffProp_mem_MSMSetCalibObs Λ c hc_meas hcut_mem have hne : (S.candMean true '' S.MSMSetCalibObs Λ).Nonempty := ⟨S.candMean true eCut, Set.mem_image_of_mem _ hcut_obs⟩ have hle_all : ∀ x ∈ S.candMean true '' S.MSMSetCalibObs Λ, x ≤ S.candMean true eCut := by rintro x ⟨etilde, hmem, rfl⟩ exact S.cutoff_optimal Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env hmem.1 have hbdd : BddAbove (S.candMean true '' S.MSMSetCalibObs Λ) := ⟨S.candMean true eCut, hle_all⟩ have hobs : S.msmUpperCalibObs Λ = S.candMean true eCut := by unfold POBackdoorSystem.msmUpperCalibObs exact le_antisymm (csSup_le hne hle_all) (le_csSup hbdd (Set.mem_image_of_mem _ hcut_obs)) calc S.msmUpperCalibObs Λ = S.candMean true eCut := hobs _ = S.msmUpperCalib true Λ := (S.msmUpperCalib_eq_cutoff Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env).symm
theorem msmLowerCalibObs_eq reviewed
Causalean.PO.POBackdoorSystem

Observed-candidate lower endpoint. Fix a sensitivity level at least one, strict overlap, and a covariate-measurable integrable cutoff whose lower-cutoff candidate is calibrated and box-feasible. Under the three integrable envelopes used by the lower-cutoff exchange argument, the infimum over observed-data calibrated candidates equals the calibrated MSM lower endpoint.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ
henv :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
S.msmLowerCalibObs Λ = S.msmLowerCalib true Λ
Proof (Lean source)
theorem msmLowerCalibObs_eq (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ) (henv : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) : S.msmLowerCalibObs Λ = S.msmLowerCalib true Λ := by let eCut := S.lowerCutoffProp Λ c have hcut_obs : eCut ∈ S.MSMSetCalibObs Λ := S.lowerCutoffProp_mem_MSMSetCalibObs Λ c hc_meas hcut_mem have hne : (S.candMean true '' S.MSMSetCalibObs Λ).Nonempty := ⟨S.candMean true eCut, Set.mem_image_of_mem _ hcut_obs⟩ have hle_all : ∀ x ∈ S.candMean true '' S.MSMSetCalibObs Λ, S.candMean true eCut ≤ x := by rintro x ⟨etilde, hmem, rfl⟩ exact S.cutoff_optimal_lower Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env hmem.1 have hbdd : BddBelow (S.candMean true '' S.MSMSetCalibObs Λ) := ⟨S.candMean true eCut, hle_all⟩ have hobs : S.msmLowerCalibObs Λ = S.candMean true eCut := by unfold POBackdoorSystem.msmLowerCalibObs exact le_antisymm (csInf_le hbdd (Set.mem_image_of_mem _ hcut_obs)) (le_csInf hne hle_all) calc S.msmLowerCalibObs Λ = S.candMean true eCut := hobs _ = S.msmLowerCalib true Λ := (S.msmLowerCalib_eq_cutoff Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env).symm
3 supporting declarations (lemmas, instances)
  • MSMSetCalibObs_subset theorem — For a binary-treatment backdoor system and a sensitivity level, every observed calibrated treated candidate is a calibrated treated candidate.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    S.MSMSetCalibObs Λ ⊆ S.MSMSetCalib true Λ
    Proof (Lean source)
    theorem MSMSetCalibObs_subset (Λ : ℝ) : S.MSMSetCalibObs Λ ⊆ S.MSMSetCalib true Λ := fun _ h => h.1
    Causalean.PO.POBackdoorSystem.MSMSetCalibObs_subset · Causalean/PO/ID/Partial/Sensitivity/MSM/ObservedCandidates.lean:70
  • cutoffProp_mem_MSMSetCalibObs theorem — For a binary-treatment backdoor system, a sensitivity level, and a covariate-measurable cutoff, if the upper-cutoff candidate is calibrated and box-feasible, then that candidate belongs to the observed calibrated treated class.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    c :
    P.Ω → ℝ
    hc :
    Measurable[S.sigmaX] c
    hmem :
    S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ
    S.cutoffProp Λ c ∈ S.MSMSetCalibObs Λ
    Proof (Lean source)
    theorem cutoffProp_mem_MSMSetCalibObs (Λ : ℝ) (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) (hmem : S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ) : S.cutoffProp Λ c ∈ S.MSMSetCalibObs Λ := by refine ⟨hmem, S.cutoffProp Λ c, S.measurable_cutoffProp_sigmaXYObs Λ c hc, ?_⟩ exact Filter.EventuallyEq.rfl
    Causalean.PO.POBackdoorSystem.cutoffProp_mem_MSMSetCalibObs · Causalean/PO/ID/Partial/Sensitivity/MSM/ObservedCandidates.lean:120
  • lowerCutoffProp_mem_MSMSetCalibObs theorem — For a binary-treatment backdoor system, a sensitivity level, and a covariate-measurable cutoff, if the lower-cutoff candidate is calibrated and box-feasible, then that candidate belongs to the observed calibrated treated class.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    c :
    P.Ω → ℝ
    hc :
    Measurable[S.sigmaX] c
    hmem :
    S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ
    S.lowerCutoffProp Λ c ∈ S.MSMSetCalibObs Λ
    Proof (Lean source)
    theorem lowerCutoffProp_mem_MSMSetCalibObs (Λ : ℝ) (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) (hmem : S.lowerCutoffProp Λ c ∈ S.MSMSetCalib true Λ) : S.lowerCutoffProp Λ c ∈ S.MSMSetCalibObs Λ := by refine ⟨hmem, S.lowerCutoffProp Λ c, S.measurable_lowerCutoffProp_sigmaXYObs Λ c hc, ?_⟩ exact Filter.EventuallyEq.rfl
    Causalean.PO.POBackdoorSystem.lowerCutoffProp_mem_MSMSetCalibObs · Causalean/PO/ID/Partial/Sensitivity/MSM/ObservedCandidates.lean:130
ATE 8 core · 2 supporting This file combines treated-arm and control-arm marginal-sensitivity intervals into an interval for the average treatment effect. ★ ate_mem_Icc_calib_of_arm_bounds★ ate_mem_Icc_of_arm_bounds★ ateCalib_subset

Marginal-sensitivity-model ATE interval

This file combines treated-arm and control-arm marginal-sensitivity intervals into an interval for the average treatment effect. The ATE upper endpoint pairs the treated upper bound with the control lower bound, and the lower endpoint pairs the treated lower bound with the control upper bound.

The main declarations are ate, the calibrated endpoints ateUpperCalib and ateLowerCalib, the uncalibrated endpoints ateUpper and ateLower, validity theorems ate_mem_Icc_calib_of_arm_bounds and ate_mem_Icc_of_arm_bounds, and the nesting theorem ateCalib_subset.

def ate reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, and a back-door system on them, the average treatment effect is the population mean of the potential outcome under treatment minus the population mean of the potential outcome under control.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
ate S :
ℝ
S.Ymean true - S.Ymean false
def ateUpperCalib reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, a back-door system on them, and a sensitivity level, the calibrated upper bound for the average treatment effect is the calibrated treated-arm upper bound minus the calibrated control- arm lower bound.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ateUpperCalib S Λ :
ℝ
S.msmUpperCalib true Λ - S.msmLowerCalib false Λ
Causalean.PO.POBackdoorSystem.ateUpperCalib · Causalean/PO/ID/Partial/Sensitivity/MSM/ATE.lean:56 · uses POBackdoorSystem , POSystem
def ateLowerCalib reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, a back-door system on them, and a sensitivity level, the calibrated lower bound for the average treatment effect is the calibrated treated-arm lower bound minus the calibrated control- arm upper bound.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ateLowerCalib S Λ :
ℝ
S.msmLowerCalib true Λ - S.msmUpperCalib false Λ
Causalean.PO.POBackdoorSystem.ateLowerCalib · Causalean/PO/ID/Partial/Sensitivity/MSM/ATE.lean:62 · uses POBackdoorSystem , POSystem
def ateUpper reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, a back-door system on them, and a sensitivity level, the uncalibrated upper bound for the average treatment effect is the uncalibrated treated-arm upper bound minus the uncalibrated control-arm lower bound.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ateUpper S Λ :
ℝ
S.msmUpper true Λ - S.msmLower false Λ
def ateLower reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcomes system, a measurable covariate space, a back-door system on them, and a sensitivity level, the uncalibrated lower bound for the average treatment effect is the uncalibrated treated-arm lower bound minus the uncalibrated control-arm upper bound.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
ateLower S Λ :
ℝ
S.msmLower true Λ - S.msmUpper false Λ
theorem ate_mem_Icc_calib_of_arm_bounds reviewed
Causalean.PO.POBackdoorSystem

The average treatment effect lies in the calibrated ATE interval for a binary-treatment backdoor system at a sensitivity level whenever the treated mean potential outcome lies in its calibrated interval and the control mean potential outcome lies in its calibrated interval.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hT :
S.Ymean true ∈ Icc (S.msmLowerCalib true Λ) (S.msmUpperCalib true Λ)
hC :
S.Ymean false ∈ Icc (S.msmLowerCalib false Λ) (S.msmUpperCalib false Λ)
S.ate ∈ Icc (S.ateLowerCalib Λ) (S.ateUpperCalib Λ)
Proof (Lean source)
theorem ate_mem_Icc_calib_of_arm_bounds (Λ : ℝ) (hT : S.Ymean true ∈ Icc (S.msmLowerCalib true Λ) (S.msmUpperCalib true Λ)) (hC : S.Ymean false ∈ Icc (S.msmLowerCalib false Λ) (S.msmUpperCalib false Λ)) : S.ate ∈ Icc (S.ateLowerCalib Λ) (S.ateUpperCalib Λ) := by unfold POBackdoorSystem.ate POBackdoorSystem.ateLowerCalib POBackdoorSystem.ateUpperCalib exact sub_mem_Icc_of_mem_Icc hT hC
theorem ate_mem_Icc_of_arm_bounds reviewed
Causalean.PO.POBackdoorSystem

The average treatment effect lies in the uncalibrated HT-relaxation ATE interval for a binary-treatment backdoor system at a sensitivity level whenever the treated mean potential outcome lies in its uncalibrated HT-relaxation interval and the control mean potential outcome lies in its uncalibrated HT-relaxation interval.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hT :
S.Ymean true ∈ Icc (S.msmLower true Λ) (S.msmUpper true Λ)
hC :
S.Ymean false ∈ Icc (S.msmLower false Λ) (S.msmUpper false Λ)
S.ate ∈ Icc (S.ateLower Λ) (S.ateUpper Λ)
Proof (Lean source)
theorem ate_mem_Icc_of_arm_bounds (Λ : ℝ) (hT : S.Ymean true ∈ Icc (S.msmLower true Λ) (S.msmUpper true Λ)) (hC : S.Ymean false ∈ Icc (S.msmLower false Λ) (S.msmUpper false Λ)) : S.ate ∈ Icc (S.ateLower Λ) (S.ateUpper Λ) := by unfold POBackdoorSystem.ate POBackdoorSystem.ateLower POBackdoorSystem.ateUpper exact sub_mem_Icc_of_mem_Icc hT hC
theorem ateCalib_subset reviewed
Causalean.PO.POBackdoorSystem

The calibrated ATE interval is contained in the uncalibrated HT-relaxation ATE interval for a binary-treatment backdoor system at a sensitivity level when the treated calibrated upper endpoint is no larger than its uncalibrated endpoint, the treated uncalibrated lower endpoint is no larger than its calibrated endpoint, the control calibrated upper endpoint is no larger than its uncalibrated endpoint, and the control uncalibrated lower endpoint is no larger than its calibrated endpoint.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hUT :
S.msmUpperCalib true Λ ≤ S.msmUpper true Λ
hLT :
S.msmLower true Λ ≤ S.msmLowerCalib true Λ
hU0 :
S.msmUpperCalib false Λ ≤ S.msmUpper false Λ
hL0 :
S.msmLower false Λ ≤ S.msmLowerCalib false Λ
Icc (S.ateLowerCalib Λ) (S.ateUpperCalib Λ) ⊆ Icc (S.ateLower Λ) (S.ateUpper Λ)
Proof (Lean source)
theorem ateCalib_subset (Λ : ℝ) (hUT : S.msmUpperCalib true Λ ≤ S.msmUpper true Λ) (hLT : S.msmLower true Λ ≤ S.msmLowerCalib true Λ) (hU0 : S.msmUpperCalib false Λ ≤ S.msmUpper false Λ) (hL0 : S.msmLower false Λ ≤ S.msmLowerCalib false Λ) : Icc (S.ateLowerCalib Λ) (S.ateUpperCalib Λ) ⊆ Icc (S.ateLower Λ) (S.ateUpper Λ) := by apply Set.Icc_subset_Icc · unfold POBackdoorSystem.ateLower POBackdoorSystem.ateLowerCalib linarith · unfold POBackdoorSystem.ateUpper POBackdoorSystem.ateUpperCalib linarith
2 supporting declarations (lemmas, instances)
  • sub_mem_Icc_of_mem_Icc theorem — Interval subtraction. If a ∈ [aₗ, aᵤ] and b ∈ [bₗ, bᵤ], then a − b ∈ [aₗ − bᵤ, aᵤ − bₗ]. The arithmetic core of the ATE-interval theorems.
    a aₗ aᵤ b bₗ bᵤ :
    ℝ
    ha :
    a ∈ Icc aₗ aᵤ
    hb :
    b ∈ Icc bₗ bᵤ
    a - b ∈ Icc (aₗ - bᵤ) (aᵤ - bₗ)
    Proof (Lean source)
    theorem sub_mem_Icc_of_mem_Icc {a aₗ aᵤ b bₗ bᵤ : ℝ} (ha : a ∈ Icc aₗ aᵤ) (hb : b ∈ Icc bₗ bᵤ) : a - b ∈ Icc (aₗ - bᵤ) (aᵤ - bₗ) := by obtain ⟨ha₁, ha₂⟩ := ha obtain ⟨hb₁, hb₂⟩ := hb exact ⟨by linarith, by linarith⟩
    Causalean.PO.POBackdoorSystem.sub_mem_Icc_of_mem_Icc · Causalean/PO/ID/Partial/Sensitivity/MSM/ATE.lean:80
  • ate_mem_Icc_calib_of_msm theorem — The calibrated ATE interval is valid under the marginal sensitivity model. For a sensitivity budget, if the true treated-arm propensity lies in the calibrated ambiguity set and its candidate mean is the true treated-arm mean with the treated candidate means bounded below and above, and likewise for the control arm, then the true average treatment effect lies in the calibrated ATE interval.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hmemT :
    S.completeProp true ∈ S.MSMSetCalib true Λ
    hbridgeT :
    S.candMean true (S.completeProp true) = S.Ymean true
    hbddT :
    BddBelow (S.candMean true '' S.MSMSetCalib true Λ)
    hbddT' :
    BddAbove (S.candMean true '' S.MSMSetCalib true Λ)
    hmemC :
    S.completeProp false ∈ S.MSMSetCalib false Λ
    hbridgeC :
    S.candMean false (S.completeProp false) = S.Ymean false
    hbddC :
    BddBelow (S.candMean false '' S.MSMSetCalib false Λ)
    hbddC' :
    BddAbove (S.candMean false '' S.MSMSetCalib false Λ)
    S.ate ∈ Icc (S.ateLowerCalib Λ) (S.ateUpperCalib Λ)
    Proof (Lean source)
    theorem ate_mem_Icc_calib_of_msm (Λ : ℝ) (hmemT : S.completeProp true ∈ S.MSMSetCalib true Λ) (hbridgeT : S.candMean true (S.completeProp true) = S.Ymean true) (hbddT : BddBelow (S.candMean true '' S.MSMSetCalib true Λ)) (hbddT' : BddAbove (S.candMean true '' S.MSMSetCalib true Λ)) (hmemC : S.completeProp false ∈ S.MSMSetCalib false Λ) (hbridgeC : S.candMean false (S.completeProp false) = S.Ymean false) (hbddC : BddBelow (S.candMean false '' S.MSMSetCalib false Λ)) (hbddC' : BddAbove (S.candMean false '' S.MSMSetCalib false Λ)) : S.ate ∈ Icc (S.ateLowerCalib Λ) (S.ateUpperCalib Λ) := S.ate_mem_Icc_calib_of_arm_bounds Λ (S.Ymean_mem_Icc_calib true Λ hmemT hbridgeT hbddT hbddT') (S.Ymean_mem_Icc_calib false Λ hmemC hbridgeC hbddC hbddC')
    Causalean.PO.POBackdoorSystem.ate_mem_Icc_calib_of_msm · Causalean/PO/ID/Partial/Sensitivity/MSM/ATE.lean:137
Converse 3 core · 8 supporting This file derives an observed calibrated propensity candidate from every compatible full-data model. ★ xyPropensity_odds

Converse validity for the marginal sensitivity model

This file derives an observed calibrated propensity candidate from every compatible full-data model. Conditional expectation preserves the Tan odds box after rewriting it as a pointwise propensity interval; the resulting (X,Y(1)) propensity is transported through equality of observable-record laws. Calibration and the inverse-probability-weighted target identity are proved rather than assumed.

theorem xyPropensity_odds reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

Under a sensitivity level at least one and observed strict overlap, the complete propensity conditioned on (X,Y(1)) obeys the same Tan odds-ratio box.

Formal statement
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
∀ᵐ ω ∂M.Q, 1 / Λ
≤ OR (M.xyPropensity ω) (S.propensityFactor (M.X ω)) ∧
OR (M.xyPropensity ω) (S.propensityFactor (M.X ω)) ≤ Λ
Proof (Lean source)
theorem xyPropensity_odds (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) : ∀ᵐ ω ∂M.Q, 1 / Λ ≤ OR (M.xyPropensity ω) (S.propensityFactor (M.X ω)) ∧ OR (M.xyPropensity ω) (S.propensityFactor (M.X ω)) ≤ Λ := by have hΛpos : 0 < Λ := one_pos.trans_le hΛ have hq := M.ae_propensityFactor_mem_Ioo hoverlap have he := M.completeOverlap obtain ⟨ε, hε, he⟩ := he have heIoo : ∀ᵐ ω ∂M.Q, 0 < M.completePropensity ω ∧ M.completePropensity ω < 1 := by filter_upwards [he] with ω hω exact ⟨hε.trans_le hω.1, lt_of_le_of_lt hω.2 (sub_lt_self 1 hε)⟩ have hbox : ∀ᵐ ω ∂M.Q, M.lowerPropensity ω ≤ M.completePropensity ω ∧ M.completePropensity ω ≤ M.upperPropensity ω := by filter_upwards [hq, heIoo, M.completeOdds] with ω hqω heω hodds exact (OR_box_iff_propensity_box hΛpos hqω.1 hqω.2 heω.2).mp hodds have hcond := Mathlib.MeasureTheory.condExp_ae_mem_Icc_of_stronglyMeasurable M.sigmaXY1_le (M.integrable_lowerPropensity hΛpos hoverlap) M.integrable_completePropensity (M.integrable_upperPropensity hΛpos hoverlap) M.measurable_lowerPropensity_sigmaXY1.stronglyMeasurable M.measurable_upperPropensity_sigmaXY1.stronglyMeasurable (hbox.mono fun ω hω => hω.1) (hbox.mono fun ω hω => hω.2) have hg := M.ae_xyPropensity_mem_Ioo filter_upwards [hq, hg, hcond] with ω hqω hgω hcondω exact (OR_box_iff_propensity_box hΛpos hqω.1 hqω.2 hgω.2).mpr hcondω
def inverseWeight reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model, the inverse-propensity treatment weight is 1{Z=1}/g(X,Y(1)).

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
inverseWeight M :
M.Ω → ℝ
fun ω => M.treatmentIndicator ω / M.xyPropensity ω
Causalean.PO.POBackdoorSystem.MSMDataCompatible.inverseWeight · Causalean/PO/ID/Partial/Sensitivity/MSM/Converse.lean:218 · uses POBackdoorSystem , MSMDataCompatible , POSystem
def weightedY1 reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model, the inverse-propensity-weighted treated potential outcome is 1{Z=1}Y(1)/g(X,Y(1)).

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
weightedY1 M :
M.Ω → ℝ
fun ω => M.inverseWeight ω * M.Y1 ω
Causalean.PO.POBackdoorSystem.MSMDataCompatible.weightedY1 · Causalean/PO/ID/Partial/Sensitivity/MSM/Converse.lean:294 · uses POBackdoorSystem , MSMDataCompatible , POSystem
8 supporting declarations (lemmas, instances)
  • OR_box_iff_propensity_box theorem — Given a positive sensitivity level, an interior observed probability and a complete propensity below one, Tan's odds-ratio interval is equivalent to the corresponding interval for the complete propensity itself.
    Λ q p :
    ℝ
    hΛ :
    0 < Λ
    hq0 :
    0 < q
    hq1 :
    q < 1
    hp1 :
    p < 1
    (1 / Λ ≤ OR p q ∧ OR p q ≤ Λ)
    ↔ (q / (Λ * (1 - q) + q) ≤ p ∧ p ≤ Λ * q / ((1 - q) + Λ * q))
    Proof (Lean source)
    theorem OR_box_iff_propensity_box {Λ q p : ℝ} (hΛ : 0 < Λ) (hq0 : 0 < q) (hq1 : q < 1) (hp1 : p < 1) : (1 / Λ ≤ OR p q ∧ OR p q ≤ Λ) ↔ (q / (Λ * (1 - q) + q) ≤ p ∧ p ≤ Λ * q / ((1 - q) + Λ * q)) := by have h1q : 0 < 1 - q := by linarith have h1p : 0 < 1 - p := by linarith have hdlo : 0 < Λ * (1 - q) + q := by positivity have hdhi : 0 < (1 - q) + Λ * q := by positivity have hden : 0 < (1 - p) * q := mul_pos h1p hq0 have hor : OR p q = p * (1 - q) / ((1 - p) * q) := by rw [OR, div_div_eq_mul_div, div_mul_eq_mul_div, mul_comm, mul_div_mul_comm] ring_nf rw [hor] constructor · rintro ⟨hlo, hhi⟩ rw [div_le_div_iff₀ hΛ hden] at hlo rw [div_le_iff₀ hden] at hhi constructor · rw [div_le_iff₀ hdlo] nlinarith · rw [le_div_iff₀ hdhi] nlinarith · rintro ⟨hlo, hhi⟩ rw [div_le_iff₀ hdlo] at hlo rw [le_div_iff₀ hdhi] at hhi constructor · rw [div_le_div_iff₀ hΛ hden] nlinarith · rw [div_le_iff₀ hden] nlinarith
    Causalean.PO.POBackdoorSystem.OR_box_iff_propensity_box · Causalean/PO/ID/Partial/Sensitivity/MSM/Converse.lean:33
  • ae_propensityFactor_mem_Ioo theorem — If the observed propensity has strict overlap, then the observed covariate-level propensity evaluated in a compatible model is also strictly between zero and one almost everywhere.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    ∀ᵐ ω ∂M.Q, 0 < S.propensityFactor (M.X ω) ∧ S.propensityFactor (M.X ω) < 1
    Proof (Lean source)
    theorem ae_propensityFactor_mem_Ioo (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) : ∀ᵐ ω ∂M.Q, 0 < S.propensityFactor (M.X ω) ∧ S.propensityFactor (M.X ω) < 1 := by let pred : ((γ × Bool) × ℝ) → Prop := fun r => 0 < S.propensityFactor r.1.1 ∧ S.propensityFactor r.1.1 < 1 have hpred : MeasurableSet {r | pred r} := by apply (measurableSet_lt measurable_const (S.measurable_propensityFactor.comp (measurable_fst.comp measurable_fst))).inter exact measurableSet_lt (S.measurable_propensityFactor.comp (measurable_fst.comp measurable_fst)) measurable_const have hmap : M.Q.map M.observedRecord = P.μ.map S.factualObservedRecord := by exact M.observedLaw have hfactual : Measurable S.factualObservedRecord := by unfold factualObservedRecord exact (S.measurable_factualX.prodMk S.measurable_factualD).prodMk ((S.dVar.measurable_indicator true (measurableSet_singleton true)).mul S.measurable_factualY) have htransport := (Mathlib.MeasureTheory.ae_comp_iff_of_map_eq M.measurable_observedRecord hfactual pred hpred hmap).mpr apply htransport filter_upwards [hoverlap] with ω hω have hfactor := congrFun S.propScore_eq_propensityFactor_comp ω simpa [pred, MSMDataCompatible.observedRecord, factualObservedRecord, Function.comp_apply, hfactor] using hω
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.ae_propensityFactor_mem_Ioo · Causalean/PO/ID/Partial/Sensitivity/MSM/Converse.lean:73
  • ae_xyPropensity_mem_Ioo theorem — In a compatible model, whose complete propensity is bounded away from zero and one, the (X,Y(1))-conditional propensity is strictly between zero and one almost everywhere.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    ∀ᵐ ω ∂M.Q, 0 < M.xyPropensity ω ∧ M.xyPropensity ω < 1
    Proof (Lean source)
    theorem ae_xyPropensity_mem_Ioo : ∀ᵐ ω ∂M.Q, 0 < M.xyPropensity ω ∧ M.xyPropensity ω < 1 := by obtain ⟨ε, hε, hover⟩ := M.completeOverlap have hbounds := Mathlib.MeasureTheory.condExp_ae_mem_Icc M.sigmaXY1_le M.integrable_completePropensity (hover.mono fun ω hω => hω.1) (hover.mono fun ω hω => hω.2) filter_upwards [hbounds] with ω hω exact ⟨hε.trans_le hω.1, lt_of_le_of_lt hω.2 (sub_lt_self 1 hε)⟩
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.ae_xyPropensity_mem_Ioo · Causalean/PO/ID/Partial/Sensitivity/MSM/Converse.lean:105
  • integrable_inverseWeight theorem — The inverse-propensity treatment weight is integrable.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    Integrable M.inverseWeight M.Q
    Proof (Lean source)
    @[fun_prop] theorem integrable_inverseWeight : Integrable M.inverseWeight M.Q := by obtain ⟨ε, hε, hover⟩ := M.completeOverlap have hbound := Mathlib.MeasureTheory.condExp_ae_mem_Icc M.sigmaXY1_le M.integrable_completePropensity (hover.mono fun ω hω => hω.1) (hover.mono fun ω hω => hω.2) have hxy_meas : Measurable M.xyPropensity := stronglyMeasurable_condExp.measurable.mono M.sigmaXY1_le le_rfl apply Integrable.of_bound (M.measurable_treatmentIndicator.div hxy_meas).aestronglyMeasurable (1 / ε) filter_upwards [hbound] with ω hω by_cases hz : M.Z ω · have hg : 0 < M.xyPropensity ω := hε.trans_le hω.1 have hge : ε ≤ M.xyPropensity ω := by simpa only [xyPropensity] using hω.1 change ‖(if M.Z ω then 1 else 0) / M.xyPropensity ω‖ ≤ 1 / ε rw [if_pos hz, one_div, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr hg)] simpa [one_div] using one_div_le_one_div_of_le hε hge · change ‖(if M.Z ω then 1 else 0) / M.xyPropensity ω‖ ≤ 1 / ε simp [hz, hε.le]
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.integrable_inverseWeight · Causalean/PO/ID/Partial/Sensitivity/MSM/Converse.lean:223
  • condExp_inverseWeight_eq_one theorem — In a compatible model, the inverse treatment weight has conditional mean one given (X,Y(1)).
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    M.Q[M.inverseWeight | M.sigmaXY1] =ᵐ[M.Q] (fun _ => 1)
    Proof (Lean source)
    theorem condExp_inverseWeight_eq_one : M.Q[M.inverseWeight | M.sigmaXY1] =ᵐ[M.Q] (fun _ => 1) := by have hgstrong : StronglyMeasurable[M.sigmaXY1] (fun ω => 1 / M.xyPropensity ω) := (measurable_const.div stronglyMeasurable_condExp.measurable).stronglyMeasurable have hreform : M.inverseWeight = fun ω => (1 / M.xyPropensity ω) * M.treatmentIndicator ω := by funext ω simp [inverseWeight, div_eq_inv_mul] have hpull : M.Q[fun ω => (1 / M.xyPropensity ω) * M.treatmentIndicator ω | M.sigmaXY1] =ᵐ[M.Q] (fun ω => (1 / M.xyPropensity ω) * M.xyPropensity ω) := by have h := condExp_mul_of_stronglyMeasurable_left (m := M.sigmaXY1) (μ := M.Q) hgstrong (M.integrable_inverseWeight.congr (ae_of_all _ fun ω => by simp [inverseWeight, div_eq_inv_mul])) M.integrable_treatmentIndicator exact h.trans (Filter.EventuallyEq.rfl.mul M.condExp_treatmentIndicator_eq_xyPropensity) rw [hreform] refine hpull.trans ?_ obtain ⟨ε, hε, hover⟩ := M.completeOverlap have hbounds := Mathlib.MeasureTheory.condExp_ae_mem_Icc M.sigmaXY1_le M.integrable_completePropensity (hover.mono fun ω hω => hω.1) (hover.mono fun ω hω => hω.2) filter_upwards [hbounds] with ω hω have hpos : 0 < M.xyPropensity ω := hε.trans_le hω.1 field_simp
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.condExp_inverseWeight_eq_one · Causalean/PO/ID/Partial/Sensitivity/MSM/Converse.lean:245
  • condExp_inverseWeight_sigmaX_eq_one theorem — In a compatible model, the inverse treatment weight has conditional mean one given the covariate alone.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    M.Q[M.inverseWeight | comap M.X inferInstance] =ᵐ[M.Q] (fun _ => 1)
    Proof (Lean source)
    theorem condExp_inverseWeight_sigmaX_eq_one : M.Q[M.inverseWeight | comap M.X inferInstance] =ᵐ[M.Q] (fun _ => 1) := by have hXle : comap M.X inferInstance ≤ M.sigmaXY1 := le_sup_left have htower : M.Q[M.inverseWeight | comap M.X inferInstance] =ᵐ[M.Q] M.Q[M.Q[M.inverseWeight | M.sigmaXY1] | comap M.X inferInstance] := (condExp_condExp_of_le (μ := M.Q) (f := M.inverseWeight) hXle M.sigmaXY1_le).symm refine htower.trans ?_ refine (condExp_congr_ae M.condExp_inverseWeight_eq_one).trans ?_ exact Filter.EventuallyEq.of_eq (condExp_const M.measurable_X.comap_le (1 : ℝ))
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.condExp_inverseWeight_sigmaX_eq_one · Causalean/PO/ID/Partial/Sensitivity/MSM/Converse.lean:277
  • integrable_weightedY1 theorem — The inverse-propensity-weighted treated potential outcome is integrable.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    Integrable M.weightedY1 M.Q
    Proof (Lean source)
    @[fun_prop] theorem integrable_weightedY1 : Integrable M.weightedY1 M.Q := by obtain ⟨ε, hε, hover⟩ := M.completeOverlap have hbound := Mathlib.MeasureTheory.condExp_ae_mem_Icc M.sigmaXY1_le M.integrable_completePropensity (hover.mono fun ω hω => hω.1) (hover.mono fun ω hω => hω.2) unfold weightedY1 apply M.integrable_Y1.bdd_mul M.integrable_inverseWeight.aestronglyMeasurable filter_upwards [hbound] with ω hω by_cases hz : M.Z ω · have hg : 0 < M.xyPropensity ω := hε.trans_le hω.1 have hge : ε ≤ M.xyPropensity ω := by simpa only [xyPropensity] using hω.1 change ‖(if M.Z ω then 1 else 0) / M.xyPropensity ω‖ ≤ 1 / ε rw [if_pos hz, one_div, Real.norm_eq_abs, abs_of_pos (inv_pos.mpr hg)] simpa [one_div] using one_div_le_one_div_of_le hε hge · change ‖(if M.Z ω then 1 else 0) / M.xyPropensity ω‖ ≤ 1 / ε simp [hz, hε.le]
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.integrable_weightedY1 · Causalean/PO/ID/Partial/Sensitivity/MSM/Converse.lean:299
  • integral_weightedY1_eq_target theorem — Full-data IPW identity. In a compatible model, the expectation of the inverse-propensity-weighted treated outcome equals the mean of Y(1).
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    ∫ ω, M.weightedY1 ω ∂M.Q = M.target
    Proof (Lean source)
    theorem integral_weightedY1_eq_target : ∫ ω, M.weightedY1 ω ∂M.Q = M.target := by have hYmeas : Measurable[M.sigmaXY1] M.Y1 := by exact (comap_measurable M.Y1).mono le_sup_right le_rfl have hYstrong : StronglyMeasurable[M.sigmaXY1] M.Y1 := hYmeas.stronglyMeasurable have hpull : M.Q[M.weightedY1 | M.sigmaXY1] =ᵐ[M.Q] (fun ω => M.Y1 ω) := by have h := condExp_mul_of_stronglyMeasurable_right (m := M.sigmaXY1) (μ := M.Q) hYstrong M.integrable_weightedY1 M.integrable_inverseWeight refine h.trans ?_ filter_upwards [M.condExp_inverseWeight_eq_one] with ω hω simp [hω] unfold target rw [← integral_condExp M.sigmaXY1_le] exact integral_congr_ae hpull
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.integral_weightedY1_eq_target · Causalean/PO/ID/Partial/Sensitivity/MSM/Converse.lean:321
Gaussian 3 core · 3 supporting This file specializes the treated-arm calibrated MSM upper bound to conditional Gaussian outcome laws. ★ msmUpperCalib_gaussian

Gaussian treated-arm MSM cutoff formula

This file specializes the treated-arm calibrated MSM upper bound to conditional Gaussian outcome laws. It proves the propensity-free calibration level calibLevel_eq, introduces the conditional-Gaussian CDF assumption GaussianTreatedModel, defines the explicit quantile cutoff gaussianCutoff, proves gaussianCutoff_calibrates, and concludes with msmUpperCalib_gaussian: the calibrated upper endpoint is the candidate mean at that explicit Gaussian cutoff. The separate half-width file evaluates that candidate mean in closed form.

structure GaussianTreatedModel reviewed
Causalean.PO.POBackdoorSystem

The conditional-Gaussian treated-outcome model. The treated conditional law of Y given X is N(m(X), σ(X)²): a measurable mean m and positive standard deviation σ with condCDF treatedXYLaw a t = Φ((t − m a)/σ a) for all a, t.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
m σ :
γ → ℝ
measurable_m :
measurable_σ :
σ_pos :
∀ a, 0 < σ a
condCDF_eq :
∀ a t, condCDF S.treatedXYLaw a t = stdNormalCDF ((t - m a) / σ a)
Causalean.PO.POBackdoorSystem.GaussianTreatedModel · Causalean/PO/ID/Partial/Sensitivity/MSM/Gaussian.lean:92 · uses POBackdoorSystem , POSystem
def gaussianCutoff reviewed
Causalean.PO.POBackdoorSystem

For a potential-outcome backdoor system, a covariate-indexed mean function and standard-deviation function, a sensitivity parameter, and a sample point, the explicit Gaussian cutoff is m(X(ω))+σ(X(ω))Φ−1(Λ/(Λ+1))m(X(\omega))+\sigma(X(\omega))\Phi^{-1}(\Lambda/(\Lambda+1)).

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
m σ :
γ → ℝ
Λ :
ℝ
ω :
P.Ω
gaussianCutoff S m σ Λ ω :
ℝ
m (S.factualX ω) + σ (S.factualX ω) * probit (Λ / (Λ + 1))
theorem msmUpperCalib_gaussian reviewed
Causalean.PO.POBackdoorSystem

The calibrated upper bound at the explicit Gaussian cutoff. Fix a sensitivity parameter Λ strictly greater than 1 and assume the propensity score for treatment given the covariates lies strictly between 0 and 1 almost surely (overlap). Under the conditional-Gaussian treated-outcome model, i.e. the treated conditional law of the outcome given the covariates is Gaussian with mean m and standard deviation σ, and assuming the integrability conditions needed to make the candidate means and the survival decomposition well defined, the calibrated (Dorn–Guo) upper bound on E[Y(1)] equals the candidate IPW mean evaluated at the cutoff propensity built from the explicit Gaussian quantile cutoff m(X) + σ(X)·Φ⁻¹(Λ/(Λ+1)).

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 < Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
m σ :
γ → ℝ
hmodel :
S.GaussianTreatedModel m σ
hreg :
Integrable (S.gaussianCutoff m σ Λ) P.μ ∧
Integrable (fun ω => S.dVar.indicator true ω * (if S.gaussianCutoff m σ Λ ω < S.factualY ω then (1 : ℝ) else 0)) P.μ ∧
Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ ∧
Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if S.gaussianCutoff m σ Λ ω < S.factualY ω then (1 : ℝ) else 0))) P.μ ∧
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ ∧
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ ∧
Integrable (fun ω => |S.gaussianCutoff m σ Λ ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
S.msmUpperCalib true Λ = S.candMean true (S.cutoffProp Λ (S.gaussianCutoff m σ Λ))
Proof (Lean source)
theorem msmUpperCalib_gaussian (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) {m σ : γ → ℝ} (hmodel : S.GaussianTreatedModel m σ) (hreg : Integrable (S.gaussianCutoff m σ Λ) P.μ ∧ Integrable (fun ω => S.dVar.indicator true ω * (if S.gaussianCutoff m σ Λ ω < S.factualY ω then (1 : ℝ) else 0)) P.μ ∧ Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ ∧ Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if S.gaussianCutoff m σ Λ ω < S.factualY ω then (1 : ℝ) else 0))) P.μ ∧ Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ ∧ Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ ∧ Integrable (fun ω => |S.gaussianCutoff m σ Λ ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) : S.msmUpperCalib true Λ = S.candMean true (S.cutoffProp Λ (S.gaussianCutoff m σ Λ)) := by let c := S.gaussianCutoff m σ Λ have hc : Measurable[S.sigmaX] c := S.measurable_gaussianCutoff hmodel.measurable_m hmodel.measurable_σ Λ have hsurv : S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ := by simpa [c] using S.gaussianCutoff_calibrates Λ hΛ hoverlap hmodel obtain ⟨hc_int, hint1, hmin_int, hdiff_int, henv, hweight_env, hc_env⟩ := hreg have hcut_mem : S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ := S.cutoffProp_mem_MSMSetCalib_of_survival Λ hΛ hoverlap c hint1 hmin_int hdiff_int hsurv exact S.msmUpperCalib_eq_cutoff Λ (le_of_lt hΛ) hoverlap c hc hc_int hcut_mem henv hweight_env hc_env
3 supporting declarations (lemmas, instances)
  • calibLevel_eq theorem — The calibration level is exactly Λ/(Λ+1). Under overlap and 1 < Λ, the calibrated-upper-bound quantile level calibLevel = 1 − survTarget/e equals Λ/(Λ+1) a.e., independent of the propensity e(X) — because survTarget = e/(Λ+1). Pure algebra from wMin, wMax.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    ∀ᵐ ω ∂P.μ, S.calibLevel Λ ω = Λ / (Λ + 1)
    Proof (Lean source)
    theorem calibLevel_eq (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) : ∀ᵐ ω ∂P.μ, S.calibLevel Λ ω = Λ / (Λ + 1) := by filter_upwards [hoverlap] with ω hω unfold POBackdoorSystem.calibLevel rw [S.survTarget_eq_prop_div Λ hΛ hω] have he0 : S.propScore true ω ≠ 0 := ne_of_gt hω.1 have hΛp : Λ + 1 ≠ 0 := ne_of_gt (by linarith : (0 : ℝ) < Λ + 1) field_simp [he0, hΛp] ring
    Causalean.PO.POBackdoorSystem.calibLevel_eq · Causalean/PO/ID/Partial/Sensitivity/MSM/Gaussian.lean:78
  • measurable_gaussianCutoff theorem — The explicit Gaussian cutoff is σ(X)-measurable.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    m σ :
    γ → ℝ
    hm :
    hσ :
    Λ :
    ℝ
    Measurable[S.sigmaX] (S.gaussianCutoff m σ Λ)
    Proof (Lean source)
    @[fun_prop] theorem measurable_gaussianCutoff {m σ : γ → ℝ} (hm : Measurable m) (hσ : Measurable σ) (Λ : ℝ) : Measurable[S.sigmaX] (S.gaussianCutoff m σ Λ) := by unfold POBackdoorSystem.gaussianCutoff change Measurable[comap S.factualX inferInstance] (fun ω => m (S.factualX ω) + σ (S.factualX ω) * probit (Λ / (Λ + 1))) exact (hm.comp (comap_measurable S.factualX)).add ((hσ.comp (comap_measurable S.factualX)).mul measurable_const)
    Causalean.PO.POBackdoorSystem.measurable_gaussianCutoff · Causalean/PO/ID/Partial/Sensitivity/MSM/Gaussian.lean:108
  • gaussianCutoff_calibrates theorem — The explicit Gaussian cutoff calibrates. Under the conditional-Gaussian model, the cutoff m(X) + σ(X)·Φ⁻¹(Λ/(Λ+1)) solves the survival equation treatedSurv c =ᵐ survTarget Λ.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    m σ :
    γ → ℝ
    hmodel :
    S.GaussianTreatedModel m σ
    S.treatedSurv (S.gaussianCutoff m σ Λ) =ᵐ[P.μ] S.survTarget Λ
    Proof (Lean source)
    theorem gaussianCutoff_calibrates (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) {m σ : γ → ℝ} (hmodel : S.GaussianTreatedModel m σ) : S.treatedSurv (S.gaussianCutoff m σ Λ) =ᵐ[P.μ] S.survTarget Λ := by have hc : Measurable[S.sigmaX] (S.gaussianCutoff m σ Λ) := S.measurable_gaussianCutoff hmodel.measurable_m hmodel.measurable_σ Λ have hsurv := S.treatedSurv_eq (S.gaussianCutoff m σ Λ) hc filter_upwards [hsurv, hoverlap] with ω hsurvω hω rw [hsurvω] have hσpos : 0 < σ (S.factualX ω) := hmodel.σ_pos (S.factualX ω) have hσne : σ (S.factualX ω) ≠ 0 := ne_of_gt hσpos have hp0 : 0 < Λ / (Λ + 1) := by positivity have hp1 : Λ / (Λ + 1) < 1 := by have hΛp : 0 < Λ + 1 := by linarith rw [div_lt_one hΛp] linarith have hcdf : S.treatedCondCDF ω (S.gaussianCutoff m σ Λ ω) = Λ / (Λ + 1) := by unfold POBackdoorSystem.treatedCondCDF rw [hmodel.condCDF_eq] have harg : (S.gaussianCutoff m σ Λ ω - m (S.factualX ω)) / σ (S.factualX ω) = probit (Λ / (Λ + 1)) := by unfold POBackdoorSystem.gaussianCutoff field_simp [hσne] ring rw [harg] exact stdNormalCDF_probit hp0 hp1 rw [hcdf, S.survTarget_eq_prop_div Λ hΛ hω] have hΛp_ne : Λ + 1 ≠ 0 := ne_of_gt (by linarith : (0 : ℝ) < Λ + 1) field_simp [hΛp_ne] ring
    Causalean.PO.POBackdoorSystem.gaussianCutoff_calibrates · Causalean/PO/ID/Partial/Sensitivity/MSM/Gaussian.lean:119
Realization 5 core · 4 supporting This file proves the calibration-to-measure identities needed by the Dorn--Guo reciprocal-tilt construction. ★ reciprocalTilt_map_factualX_eq_of_calibrated★ bernoulliMarkedLaw_observedRecord_eq★ bernoulliMarkedLaw_target_eq_candMean

Calibration identities for MSM full-data realization

This file proves the calibration-to-measure identities needed by the Dorn--Guo reciprocal-tilt construction. Using calibration's integrability of the inverse treated weight, an observed representative of a calibrated candidate produces a reciprocal tilt whose covariate marginal is exactly the observed covariate law and whose total mass is one. The resulting Bernoulli-mark law reproduces the factual observed record and has target mean candMean.

theorem reciprocalTilt_map_factualX_eq_of_calibrated reviewed
Causalean.PO.POBackdoorSystem

Suppose an observed representative agrees on treated units with a calibrated candidate, and the candidate is positive almost surely. Then the covariate marginal of the representative's reciprocal tilt of the treated sublaw equals the observed covariate law.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
etilde h :
P.Ω → ℝ
heq :
etilde =ᵐ[P.μ.restrict S.treatedSet] h
hpos :
∀ᵐ ω ∂P.μ, 0 < etilde ω
hcal :
S.Calibrated true etilde
(reciprocalTilt (P.μ.restrict S.treatedSet) h).map S.factualX
= P.μ.map S.factualX
Proof (Lean source)
theorem reciprocalTilt_map_factualX_eq_of_calibrated (etilde h : P.Ω → ℝ) (heq : etilde =ᵐ[P.μ.restrict S.treatedSet] h) (hpos : ∀ᵐ ω ∂P.μ, 0 < etilde ω) (hcal : S.Calibrated true etilde) : (reciprocalTilt (P.μ.restrict S.treatedSet) h).map S.factualX = P.μ.map S.factualX := by have hint0 : Integrable (fun ω => S.dVar.indicator true ω / etilde ω) P.μ := S.calibrated_weight_integrable true etilde hcal have hint : Integrable (fun ω => 1 / h ω) (P.μ.restrict S.treatedSet) := S.observed_reciprocal_integrable etilde h heq hint0 have hhpos : ∀ᵐ ω ∂P.μ.restrict S.treatedSet, 0 < h ω := by filter_upwards [ae_restrict_of_ae hpos, heq] with ω hω hω' simpa [← hω'] using hω ext B hB rw [Measure.map_apply S.measurable_factualX hB, Measure.map_apply S.measurable_factualX hB] rw [reciprocalTilt] rw [withDensity_apply _ (hB.preimage S.measurable_factualX)] rw [← ofReal_integral_eq_lintegral_ofReal hint.integrableOn] swap · filter_upwards [ae_restrict_of_ae hhpos] with ω hω exact one_div_nonneg.mpr hω.le have hsX : MeasurableSet[S.sigmaX] (S.factualX ⁻¹' B) := by rw [POBackdoorSystem.sigmaX] exact hB.preimage (comap_measurable S.factualX) have hXamb : MeasurableSet (S.factualX ⁻¹' B) := hB.preimage S.measurable_factualX have hreal : ∫ ω in S.factualX ⁻¹' B, 1 / h ω ∂P.μ.restrict S.treatedSet = P.μ.real (S.factualX ⁻¹' B) := by calc ∫ ω in S.factualX ⁻¹' B, 1 / h ω ∂P.μ.restrict S.treatedSet = ∫ ω in S.factualX ⁻¹' B, S.dVar.indicator true ω / etilde ω ∂P.μ := by rw [Measure.restrict_comm (μ := P.μ) (s := S.factualX ⁻¹' B) (t := S.treatedSet) hXamb] rw [← integral_indicator S.measurableSet_treatedSet] apply integral_congr_ae have heq_imp : ∀ᵐ ω ∂P.μ, ω ∈ S.treatedSet → etilde ω = h ω := ae_imp_of_ae_restrict heq filter_upwards [ae_restrict_of_ae heq_imp] with ω hω by_cases hT : ω ∈ S.treatedSet · have hA : S.dVar.indicator true ω = 1 := by rw [S.treated_indicator_eq] simp [hT] simp [Set.indicator_of_mem hT, hA, (hω hT).symm] · have hA : S.dVar.indicator true ω = 0 := by rw [S.treated_indicator_eq] simp [hT] simp [Set.indicator_of_notMem hT, hA] _ = ∫ ω in S.factualX ⁻¹' B, P.μ[fun ω => S.dVar.indicator true ω / etilde ω | S.sigmaX] ω ∂P.μ := by symm exact setIntegral_condExp S.sigmaX_le hint0 hsX _ = ∫ _ω in S.factualX ⁻¹' B, (1 : ℝ) ∂P.μ := setIntegral_congr_ae hXamb (by filter_upwards [hcal] with x hx _ exact hx) _ = P.μ.real (S.factualX ⁻¹' B) := by simp rw [hreal] exact MeasureTheory.ofReal_measureReal (measure_ne_top P.μ _)
def markedObservedRecord reviewed
Causalean.PO.POBackdoorSystem

For a backdoor system, the observable record of a marked full-data point contains its covariate, Boolean treatment mark, and treated observed outcome Z·Y(1).

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
p :
P.Ω × Bool
markedObservedRecord S p :
(γ × Bool) × ℝ
((S.factualX p.1, p.2), if p.2 then S.factualY p.1 else 0)
Causalean.PO.POBackdoorSystem.markedObservedRecord · Causalean/PO/ID/Partial/Sensitivity/MSM/Realization.lean:226 · uses POBackdoorSystem , POSystem
def factualObservedRecord reviewed
Causalean.PO.POBackdoorSystem

For a backdoor system, the factual observable record of an observational unit contains its covariate, factual treatment, and treated observed outcome.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
ω :
P.Ω
factualObservedRecord S ω :
(γ × Bool) × ℝ
((S.factualX ω, S.factualD ω), S.dVar.indicator true ω * S.factualY ω)
Causalean.PO.POBackdoorSystem.factualObservedRecord · Causalean/PO/ID/Partial/Sensitivity/MSM/Realization.lean:232 · uses POBackdoorSystem , POSystem
theorem bernoulliMarkedLaw_observedRecord_eq reviewed
Causalean.PO.POBackdoorSystem

Suppose a measurable observed representative agrees on treated units with a calibrated candidate that lies strictly between zero and one. Then the reciprocal-tilt Bernoulli construction has exactly the factual observed law of (X,Z,Z·Y).

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
etilde h :
P.Ω → ℝ
hh :
heq :
etilde =ᵐ[P.μ.restrict S.treatedSet] h
hpos :
∀ᵐ ω ∂P.μ, 0 < etilde ω
hlt :
∀ᵐ ω ∂P.μ, etilde ω < 1
hcal :
S.Calibrated true etilde
(bernoulliMarkedLaw (P.μ.restrict S.treatedSet) h).map S.markedObservedRecord
= P.μ.map S.factualObservedRecord
Proof (Lean source)
theorem bernoulliMarkedLaw_observedRecord_eq (etilde h : P.Ω → ℝ) (hh : Measurable h) (heq : etilde =ᵐ[P.μ.restrict S.treatedSet] h) (hpos : ∀ᵐ ω ∂P.μ, 0 < etilde ω) (hlt : ∀ᵐ ω ∂P.μ, etilde ω < 1) (hcal : S.Calibrated true etilde) : (Causalean.Mathlib.Probability.bernoulliMarkedLaw (P.μ.restrict S.treatedSet) h).map S.markedObservedRecord = P.μ.map S.factualObservedRecord := by let ν₁ := P.μ.restrict S.treatedSet let Q := Causalean.Mathlib.Probability.bernoulliMarkedLaw ν₁ h let T : Set (P.Ω × Bool) := univ ×ˢ {true} let F : Set (P.Ω × Bool) := univ ×ˢ {false} have hT : MeasurableSet T := MeasurableSet.univ.prod (measurableSet_singleton true) have hF : MeasurableSet F := MeasurableSet.univ.prod (measurableSet_singleton false) have hTF : Tᶜ = F := by ext ⟨ω, z⟩ cases z <;> simp [T, F] have hg : Measurable S.markedObservedRecord := by unfold markedObservedRecord exact ((S.measurable_factualX.comp measurable_fst).prodMk measurable_snd).prodMk (Measurable.ite (measurable_snd (measurableSet_singleton true)) (S.measurable_factualY.comp measurable_fst) measurable_const) have hf : Measurable S.factualObservedRecord := by unfold factualObservedRecord exact (S.measurable_factualX.prodMk S.measurable_factualD).prodMk ((S.dVar.measurable_indicator true (measurableSet_singleton true)).mul S.measurable_factualY) have hhpos : ∀ᵐ ω ∂ν₁, 0 < h ω := by filter_upwards [ae_restrict_of_ae hpos, heq] with ω hω hω' simpa [← hω'] using hω have hhle : ∀ᵐ ω ∂ν₁, h ω ≤ 1 := by filter_upwards [ae_restrict_of_ae hlt, heq] with ω hω hω' exact (hω'.symm ▸ hω).le have hQpart : Q.restrict T + Q.restrict F = Q := by rw [← hTF] exact Measure.restrict_add_restrict_compl (μ := Q) hT have hcompl : S.treatedSetᶜ = S.controlSet := by ext ω simp only [POBackdoorSystem.treatedSet, POBackdoorSystem.controlSet, Set.mem_compl_iff, Set.mem_preimage, Set.mem_singleton_iff] cases S.factualD ω <;> simp have hPpart : P.μ.restrict S.treatedSet + P.μ.restrict S.controlSet = P.μ := by rw [← hcompl] exact Measure.restrict_add_restrict_compl (μ := P.μ) S.measurableSet_treatedSet have htreated : (Q.restrict T).map S.markedObservedRecord = (P.μ.restrict S.treatedSet).map S.factualObservedRecord := by calc (Q.restrict T).map S.markedObservedRecord = ν₁.map (fun ω => S.markedObservedRecord (ω, true)) := by exact bernoulliMarkedLaw_map_restrict_true ν₁ h hh hhpos S.markedObservedRecord hg _ = ν₁.map S.factualObservedRecord := by apply Measure.map_congr filter_upwards [ae_restrict_mem S.measurableSet_treatedSet] with ω hω have hD : S.factualD ω = true := hω have hA : S.dVar.indicator true ω = 1 := by rw [S.treated_indicator_eq] simp [hω] simp [markedObservedRecord, factualObservedRecord, hD, hA] have hcontrol : (Q.restrict F).map S.markedObservedRecord = (P.μ.restrict S.controlSet).map S.factualObservedRecord := by let ν₀ := ν₁.withDensity (fun ω => ofReal ((1 - h ω) / h ω)) let k : P.Ω → (γ × Bool) × ℝ := fun ω => ((S.factualX ω, false), 0) let j : γ → (γ × Bool) × ℝ := fun x => ((x, false), 0) have hk : Measurable k := by dsimp [k]; fun_prop have hj : Measurable j := by dsimp [j]; fun_prop have hrestrict : (Q.restrict F).map S.markedObservedRecord = (Q.restrict F).map (k ∘ fst) := by apply Measure.map_congr filter_upwards [ae_restrict_mem hF] with p hp rcases p with ⟨ω, z⟩ have hz : z = false := hp.2 simp [markedObservedRecord, k, hz] have hfalsefst : (Q.restrict F).map fst = ν₀ := by exact Causalean.Mathlib.Probability.bernoulliMarkedLaw_restrict_false_map_fst ν₁ h hh hhpos hhle have hcov : ν₀.map S.factualX = (P.μ.restrict S.controlSet).map S.factualX := by exact S.failureTilt_map_factualX_eq_control etilde h heq hpos hlt hcal calc (Q.restrict F).map S.markedObservedRecord = (Q.restrict F).map (k ∘ fst) := hrestrict _ = ((Q.restrict F).map fst).map k := by rw [Measure.map_map hk measurable_fst] _ = ν₀.map k := by rw [hfalsefst] _ = ν₀.map (j ∘ S.factualX) := by rfl _ = (ν₀.map S.factualX).map j := by rw [Measure.map_map hj S.measurable_factualX] _ = ((P.μ.restrict S.controlSet).map S.factualX).map j := by rw [hcov] _ = (P.μ.restrict S.controlSet).map (j ∘ S.factualX) := by rw [Measure.map_map hj S.measurable_factualX] _ = (P.μ.restrict S.controlSet).map S.factualObservedRecord := by apply Measure.map_congr have hcontrol_meas : MeasurableSet S.controlSet := by rw [← hcompl] exact S.measurableSet_treatedSet.compl filter_upwards [ae_restrict_mem hcontrol_meas] with ω hω have hD : S.factualD ω = false := hω have hA : S.dVar.indicator true ω = 0 := by rw [S.treated_indicator_eq] have hnT : ω ∉ S.treatedSet := by have hmem : ω ∈ S.treatedSetᶜ := by rwa [hcompl] exact hmem simp [hnT] simp [j, factualObservedRecord, hD, hA] calc Q.map S.markedObservedRecord = (Q.restrict T + Q.restrict F).map S.markedObservedRecord := by rw [hQpart] _ = (Q.restrict T).map S.markedObservedRecord + (Q.restrict F).map S.markedObservedRecord := Measure.map_add _ _ hg _ = (P.μ.restrict S.treatedSet).map S.factualObservedRecord + (P.μ.restrict S.controlSet).map S.factualObservedRecord := by rw [htreated, hcontrol] _ = (P.μ.restrict S.treatedSet + P.μ.restrict S.controlSet).map S.factualObservedRecord := (Measure.map_add _ _ hf).symm _ = P.μ.map S.factualObservedRecord := by rw [hPpart]
theorem bernoulliMarkedLaw_target_eq_candMean reviewed
Causalean.PO.POBackdoorSystem

Suppose a measurable observed representative agrees on treated units with a candidate that lies strictly between zero and one. Then the mean of the treated potential outcome in the reciprocal-tilt Bernoulli construction equals the candidate inverse-probability-weighted mean.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
etilde h :
P.Ω → ℝ
hh :
heq :
etilde =ᵐ[P.μ.restrict S.treatedSet] h
hpos :
∀ᵐ ω ∂P.μ, 0 < etilde ω
hlt :
∀ᵐ ω ∂P.μ, etilde ω < 1
∫ p, S.factualY p.1 ∂Causalean.Mathlib.Probability.bernoulliMarkedLaw (P.μ.restrict S.treatedSet) h
= S.candMean true etilde
Proof (Lean source)
theorem bernoulliMarkedLaw_target_eq_candMean (etilde h : P.Ω → ℝ) (hh : Measurable h) (heq : etilde =ᵐ[P.μ.restrict S.treatedSet] h) (hpos : ∀ᵐ ω ∂P.μ, 0 < etilde ω) (hlt : ∀ᵐ ω ∂P.μ, etilde ω < 1) : ∫ p, S.factualY p.1 ∂Causalean.Mathlib.Probability.bernoulliMarkedLaw (P.μ.restrict S.treatedSet) h = S.candMean true etilde := by let ν₁ := P.μ.restrict S.treatedSet have hhpos : ∀ᵐ ω ∂ν₁, 0 < h ω := by filter_upwards [ae_restrict_of_ae hpos, heq] with ω hω hω' simpa [← hω'] using hω have hhle : ∀ᵐ ω ∂ν₁, h ω ≤ 1 := by filter_upwards [ae_restrict_of_ae hlt, heq] with ω hω hω' exact (hω'.symm ▸ hω).le rw [← integral_map measurable_fst.aemeasurable S.measurable_factualY.aestronglyMeasurable] rw [bernoulliMarkedLaw_map_fst ν₁ h hh hhpos hhle] rw [reciprocalTilt] have hdens : Measurable (fun ω => ofReal (1 / h ω)) := (measurable_const.div hh).ennreal_ofReal rw [integral_withDensity_eq_integral_toReal_smul hdens (by simp) S.factualY] unfold candMean rw [← integral_indicator S.measurableSet_treatedSet] apply integral_congr_ae have hhpos_imp : ∀ᵐ ω ∂P.μ, ω ∈ S.treatedSet → 0 < h ω := ae_imp_of_ae_restrict hhpos have heq_imp : ∀ᵐ ω ∂P.μ, ω ∈ S.treatedSet → etilde ω = h ω := ae_imp_of_ae_restrict heq filter_upwards [hhpos_imp, heq_imp] with ω hω hω' by_cases hT : ω ∈ S.treatedSet · have hA : S.dVar.indicator true ω = 1 := by rw [S.treated_indicator_eq] simp [hT] rw [Set.indicator_of_mem hT, ENNReal.toReal_ofReal (one_div_nonneg.mpr (hω hT).le), hA, hω' hT] simp only [one_mul, div_eq_mul_inv] ring · have hA : S.dVar.indicator true ω = 0 := by rw [S.treated_indicator_eq] simp [hT] simp [Set.indicator_of_notMem hT, hA]
4 supporting declarations (lemmas, instances)
  • observed_reciprocal_integrable theorem — If an observed representative agrees on treated units with a candidate whose inverse treated weight is integrable, then the representative's reciprocal is integrable under the treated sublaw.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    etilde h :
    P.Ω → ℝ
    heq :
    etilde =ᵐ[P.μ.restrict S.treatedSet] h
    hint :
    Integrable (fun ω => S.dVar.indicator true ω / etilde ω) P.μ
    Integrable (fun ω => 1 / h ω) (P.μ.restrict S.treatedSet)
    Proof (Lean source)
    @[fun_prop] theorem observed_reciprocal_integrable (etilde h : P.Ω → ℝ) (heq : etilde =ᵐ[P.μ.restrict S.treatedSet] h) (hint : Integrable (fun ω => S.dVar.indicator true ω / etilde ω) P.μ) : Integrable (fun ω => 1 / h ω) (P.μ.restrict S.treatedSet) := by refine hint.restrict.congr ?_ filter_upwards [heq, ae_restrict_mem S.measurableSet_treatedSet] with ω hω hT have hA : S.dVar.indicator true ω = 1 := by rw [S.treated_indicator_eq] simp [hT] simp [hA, hω]
    Causalean.PO.POBackdoorSystem.observed_reciprocal_integrable · Causalean/PO/ID/Partial/Sensitivity/MSM/Realization.lean:35
  • reciprocalTilt_treated_univ_eq_one theorem — Under the same observed-representative, agreement, positivity, and calibration conditions, the reciprocal tilt of the treated sublaw has total mass one.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    etilde h :
    P.Ω → ℝ
    heq :
    etilde =ᵐ[P.μ.restrict S.treatedSet] h
    hpos :
    ∀ᵐ ω ∂P.μ, 0 < etilde ω
    hcal :
    S.Calibrated true etilde
    reciprocalTilt (P.μ.restrict S.treatedSet) h univ = 1
    Proof (Lean source)
    theorem reciprocalTilt_treated_univ_eq_one (etilde h : P.Ω → ℝ) (heq : etilde =ᵐ[P.μ.restrict S.treatedSet] h) (hpos : ∀ᵐ ω ∂P.μ, 0 < etilde ω) (hcal : S.Calibrated true etilde) : reciprocalTilt (P.μ.restrict S.treatedSet) h univ = 1 := by have hmarg := S.reciprocalTilt_map_factualX_eq_of_calibrated etilde h heq hpos hcal have hu := congrArg (fun μ : Measure γ => μ univ) hmarg rw [Measure.map_apply S.measurable_factualX MeasurableSet.univ, Measure.map_apply S.measurable_factualX MeasurableSet.univ] at hu simpa using hu
    Causalean.PO.POBackdoorSystem.reciprocalTilt_treated_univ_eq_one · Causalean/PO/ID/Partial/Sensitivity/MSM/Realization.lean:116
  • reciprocalTilt_eq_add_failureTilt theorem — For a base measure, a unit-interval weight, the reciprocal tilt decomposes into the base measure plus its failure-odds tilt.
    α :
    ν₁ :
    h :
    α → ℝ
    hpos :
    ∀ᵐ a ∂ν₁, 0 < h a
    hle :
    ∀ᵐ a ∂ν₁, h a ≤ 1
    = ν₁ + ν₁.withDensity (fun a => ofReal ((1 - h a) / h a))
    Proof (Lean source)
    theorem reciprocalTilt_eq_add_failureTilt {α : Type*} [MeasurableSpace α] (ν₁ : Measure α) (h : α → ℝ) (hpos : ∀ᵐ a ∂ν₁, 0 < h a) (hle : ∀ᵐ a ∂ν₁, h a ≤ 1) : reciprocalTilt ν₁ h = ν₁ + ν₁.withDensity (fun a => ofReal ((1 - h a) / h a)) := by unfold reciprocalTilt calc ν₁.withDensity (fun a => ofReal (1 / h a)) = ν₁.withDensity (fun a => 1 + ofReal ((1 - h a) / h a)) := by apply withDensity_congr_ae filter_upwards [hpos, hle] with a ha ha' have hratio : 0 ≤ (1 - h a) / h a := div_nonneg (sub_nonneg.mpr ha') ha.le have hreal : 1 / h a = 1 + (1 - h a) / h a := by field_simp ring calc ofReal (1 / h a) = ofReal (1 + (1 - h a) / h a) := congrArg ofReal hreal _ = ofReal 1 + ofReal ((1 - h a) / h a) := ENNReal.ofReal_add zero_le_one hratio _ = 1 + ofReal ((1 - h a) / h a) := by simp _ = ν₁.withDensity 1 + ν₁.withDensity (fun a => ofReal ((1 - h a) / h a)) := by change ν₁.withDensity ((fun _a : α => (1 : ENNReal)) + (fun a => ofReal ((1 - h a) / h a))) = ν₁.withDensity (fun _a : α => (1 : ENNReal)) + ν₁.withDensity (fun a => ofReal ((1 - h a) / h a)) exact withDensity_add_left measurable_const _ _ = ν₁ + ν₁.withDensity (fun a => ofReal ((1 - h a) / h a)) := by exact congrArg (fun m => m + ν₁.withDensity (fun a => ofReal ((1 - h a) / h a))) withDensity_one
    Causalean.PO.POBackdoorSystem.reciprocalTilt_eq_add_failureTilt · Causalean/PO/ID/Partial/Sensitivity/MSM/Realization.lean:132
  • failureTilt_map_factualX_eq_control theorem — Suppose an observed representative agrees on treated units with a calibrated candidate that lies strictly between zero and one. Then the covariate marginal of the failure-odds tilt is the observed control-arm covariate sublaw.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    etilde h :
    P.Ω → ℝ
    heq :
    etilde =ᵐ[P.μ.restrict S.treatedSet] h
    hpos :
    ∀ᵐ ω ∂P.μ, 0 < etilde ω
    hlt :
    ∀ᵐ ω ∂P.μ, etilde ω < 1
    hcal :
    S.Calibrated true etilde
    ((P.μ.restrict S.treatedSet).withDensity (fun ω => ofReal ((1 - h ω) / h ω))).map S.factualX
    = (P.μ.restrict S.controlSet).map S.factualX
    Proof (Lean source)
    theorem failureTilt_map_factualX_eq_control (etilde h : P.Ω → ℝ) (heq : etilde =ᵐ[P.μ.restrict S.treatedSet] h) (hpos : ∀ᵐ ω ∂P.μ, 0 < etilde ω) (hlt : ∀ᵐ ω ∂P.μ, etilde ω < 1) (hcal : S.Calibrated true etilde) : ((P.μ.restrict S.treatedSet).withDensity (fun ω => ofReal ((1 - h ω) / h ω))).map S.factualX = (P.μ.restrict S.controlSet).map S.factualX := by let ν₁ := P.μ.restrict S.treatedSet let ν₀ := ν₁.withDensity (fun ω => ofReal ((1 - h ω) / h ω)) let ν := Causalean.Mathlib.Probability.reciprocalTilt ν₁ h have hhpos : ∀ᵐ ω ∂ν₁, 0 < h ω := by filter_upwards [ae_restrict_of_ae hpos, heq] with ω hω hω' simpa [← hω'] using hω have hhle : ∀ᵐ ω ∂ν₁, h ω ≤ 1 := by filter_upwards [ae_restrict_of_ae hlt, heq] with ω hω hω' exact (hω'.symm ▸ hω).le have htilt : ν = ν₁ + ν₀ := by exact reciprocalTilt_eq_add_failureTilt ν₁ h hhpos hhle have hmarg : ν.map S.factualX = P.μ.map S.factualX := by exact S.reciprocalTilt_map_factualX_eq_of_calibrated etilde h heq hpos hcal have hcompl : S.treatedSetᶜ = S.controlSet := by ext ω simp only [POBackdoorSystem.treatedSet, POBackdoorSystem.controlSet, Set.mem_compl_iff, Set.mem_preimage, Set.mem_singleton_iff] cases S.factualD ω <;> simp ext B hB rw [Measure.map_apply S.measurable_factualX hB, Measure.map_apply S.measurable_factualX hB] change ν₀ (S.factualX ⁻¹' B) = (P.μ.restrict S.controlSet) (S.factualX ⁻¹' B) have htiltB := congrArg (fun m : Measure P.Ω => m (S.factualX ⁻¹' B)) htilt rw [Measure.add_apply ν₁ ν₀ (S.factualX ⁻¹' B)] at htiltB have hmargB := congrArg (fun m : Measure γ => m B) hmarg rw [Measure.map_apply S.measurable_factualX hB, Measure.map_apply S.measurable_factualX hB] at hmargB have hpart := Measure.restrict_add_restrict_compl (μ := P.μ) S.measurableSet_treatedSet rw [hcompl] at hpart have hpartB := congrArg (fun m : Measure P.Ω => m (S.factualX ⁻¹' B)) hpart rw [Measure.add_apply (P.μ.restrict S.treatedSet) (P.μ.restrict S.controlSet) (S.factualX ⁻¹' B)] at hpartB apply (ENNReal.add_right_inj (measure_ne_top ν₁ (S.factualX ⁻¹' B))).mp calc ν₁ (S.factualX ⁻¹' B) + ν₀ (S.factualX ⁻¹' B) = ν (S.factualX ⁻¹' B) := htiltB.symm _ = P.μ (S.factualX ⁻¹' B) := hmargB _ = (P.μ.restrict S.treatedSet) (S.factualX ⁻¹' B) + (P.μ.restrict S.controlSet) (S.factualX ⁻¹' B) := hpartB.symm _ = ν₁ (S.factualX ⁻¹' B) + (P.μ.restrict S.controlSet) (S.factualX ⁻¹' B) := by rfl
    Causalean.PO.POBackdoorSystem.failureTilt_map_factualX_eq_control · Causalean/PO/ID/Partial/Sensitivity/MSM/Realization.lean:170
ATEClosed­Form 1 core · 1 supporting This file combines the four arm-level quantile-cutoff closed forms into closed-form endpoints for the calibrated ATE interval. ★ ate_endpoints_eq_cutoff_of_calibrating_cutoff_integrability

Marginal-sensitivity-model ATE cutoff forms under calibrating-cutoff integrability

This file combines the four arm-level quantile-cutoff closed forms into closed-form endpoints for the calibrated ATE interval. Under assumed arm-wise validity, the true ATE is then placed between the appropriate differences of the treated and control cutoff candidate means.

The theorem ate_endpoints_eq_cutoff_of_calibrating_cutoff_integrability gives the endpoint representation using treated upper/lower cutoffs and control upper/lower cutoffs. The theorem ate_mem_Icc_cutoff_of_calibrating_cutoff_integrability_and_arm_bounds combines those endpoint equalities with assumed arm-wise interval validity.

theorem ate_endpoints_eq_cutoff_of_calibrating_cutoff_integrability reviewed
Causalean.PO.POBackdoorSystem

For a binary-treatment backdoor system and a sensitivity parameter Λ strictly greater than one, assume for the treated arm that the propensity score lies strictly between 0 and 1 almost surely and the conditional distribution function of the outcome given each covariate value is continuous. Write D for the treated-arm indicator, Y for the observed outcome, and w_min ≤ w_max for the smallest and largest admissible treated inverse-propensity weights at level Λ. Suppose every σ(X)-measurable cutoff c (measurable with respect to the covariates) for which the conditional mean of D·1{Y > c} given the covariates equals the upper target survival probability almost surely makes c and |c|·D·w_max integrable, that the same two functions are integrable for every σ(X)-measurable cutoff matching the lower target survival probability, and that D·w_max and D·|Y|·w_max are integrable. Assume the same for the control arm, with the control-arm indicator, the control propensity score and the control weights: overlap, a continuous conditional outcome distribution function, the two integrability conditions at every σ(X)-measurable cutoff matching the control upper target survival probability and at every one matching the control lower target survival probability, and integrability of the control indicator times the largest control weight and the control indicator times |Y| times the largest control weight. Then there are σ(X)-measurable cutoffs cTU, cTL, cCU, cCL such that the calibrated upper endpoint for the average treatment effect equals the treated upper-cutoff candidate mean at cTU minus the control lower-cutoff candidate mean at cCL, and the calibrated lower endpoint equals the treated lower-cutoff candidate mean at cTL minus the control upper-cutoff candidate mean at cCU.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 < Λ
treated arm regularity
hoverlapT :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
hatomlessT :
∀ a : γ, Continuous (condCDF S.treatedXYLaw a)
hregTU :
∀ c : P.Ω → ℝ
if
Measurable[S.sigmaX] c
and
S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ
then
Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hregTL :
∀ c : P.Ω → ℝ
if
Measurable[S.sigmaX] c
and
S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ
then
Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hmaxT :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
henvT :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
control arm regularity
hoverlapC :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
hatomlessC :
∀ a : γ, Continuous (condCDF S.controlXYLaw a)
hregCU :
∀ c : P.Ω → ℝ
if
Measurable[S.sigmaX] c
and
S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ
then
Integrable c P.μ ∧
Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
hregCL :
∀ c : P.Ω → ℝ
if
Measurable[S.sigmaX] c
and
S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ
then
Integrable c P.μ ∧
Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
hmaxC :
Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
henvC :
Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ
∃ cTU cTL cCU cCL : P.Ω → ℝ,
conclusion 1
Measurable[S.sigmaX] cTU
Measurable[S.sigmaX] cTL
Measurable[S.sigmaX] cCU
Measurable[S.sigmaX] cCL
conclusion 2
S.ateUpperCalib Λ
= S.candMean true (S.cutoffProp Λ cTU) - S.candMean false (S.lowerCutoffProp0 Λ cCL)
conclusion 3
S.ateLowerCalib Λ
= S.candMean true (S.lowerCutoffProp Λ cTL) - S.candMean false (S.cutoffProp0 Λ cCU)
Proof (Lean source)
theorem ate_endpoints_eq_cutoff_of_calibrating_cutoff_integrability (Λ : ℝ) (hΛ : 1 < Λ) -- treated arm regularity (hoverlapT : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (hatomlessT : ∀ a : γ, Continuous (condCDF S.treatedXYLaw a)) (hregTU : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hregTL : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hmaxT : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (henvT : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) -- control arm regularity (hoverlapC : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (hatomlessC : ∀ a : γ, Continuous (condCDF S.controlXYLaw a)) (hregCU : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hregCL : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hmaxC : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (henvC : Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ) : ∃ cTU cTL cCU cCL : P.Ω → ℝ, (Measurable[S.sigmaX] cTU ∧ Measurable[S.sigmaX] cTL ∧ Measurable[S.sigmaX] cCU ∧ Measurable[S.sigmaX] cCL) ∧ S.ateUpperCalib Λ = S.candMean true (S.cutoffProp Λ cTU) - S.candMean false (S.lowerCutoffProp0 Λ cCL) ∧ S.ateLowerCalib Λ = S.candMean true (S.lowerCutoffProp Λ cTL) - S.candMean false (S.cutoffProp0 Λ cCU) := by obtain ⟨cTU, hcTU, _, hTU⟩ := S.msmUpperCalib_eq_cutoff_of_calibrating_cutoff_integrability Λ hΛ hoverlapT hatomlessT hregTU henvT hmaxT obtain ⟨cTL, hcTL, _, hTL⟩ := S.msmLowerCalib_eq_cutoff_of_calibrating_cutoff_integrability Λ hΛ hoverlapT hatomlessT hregTL hmaxT henvT obtain ⟨cCU, hcCU, _, hCU⟩ := S.msmUpperCalib0_eq_cutoff_of_calibrating_cutoff_integrability Λ hΛ hoverlapC hatomlessC hregCU henvC hmaxC obtain ⟨cCL, hcCL, _, hCL⟩ := S.msmLowerCalib0_eq_cutoff_of_calibrating_cutoff_integrability Λ hΛ hoverlapC hatomlessC hregCL hmaxC henvC refine ⟨cTU, cTL, cCU, cCL, ⟨hcTU, hcTL, hcCU, hcCL⟩, ?_, ?_⟩ · unfold POBackdoorSystem.ateUpperCalib rw [hTU, hCL] · unfold POBackdoorSystem.ateLowerCalib rw [hTL, hCU]
1 supporting declaration (lemmas, instances)
  • ate_mem_Icc_cutoff_of_calibrating_cutoff_integrability_and_arm_bounds theorem — For a binary-treatment backdoor system and a sensitivity parameter Λ strictly greater than one, assume for the treated arm that the propensity score lies strictly between 0 and 1 almost surely and the conditional distribution function of the outcome given each covariate value is continuous. Write D for the treated-arm indicator, Y for the observed outcome, and w_min ≤ w_max for the smallest and largest admissible treated inverse-propensity weights at level Λ. Suppose every σ(X)-measurable cutoff c (measurable with respect to the covariates) for which the conditional mean of D·1{Y > c} given the covariates equals the upper target survival probability almost surely makes c and |c|·D·w_max integrable, that the same two functions are integrable for every σ(X)-measurable cutoff matching the lower target survival probability, and that D·w_max and D·|Y|·w_max are integrable. Assume the same for the control arm, with the control-arm indicator, the control propensity score and the control weights: overlap, a continuous conditional outcome distribution function, the two integrability conditions at every σ(X)-measurable cutoff matching the control upper target survival probability and at every one matching the control lower target survival probability, and integrability of the control indicator times the largest control weight and the control indicator times |Y| times the largest control weight. If in addition the mean of the treated potential outcome lies in the treated arm's calibrated interval and the mean of the control potential outcome lies in the control arm's calibrated interval, then there are σ(X)-measurable cutoffs cTU, cTL, cCU, cCL such that the average treatment effect lies between the treated lower-cutoff candidate mean at cTL minus the control upper-cutoff candidate mean at cCU and the treated upper-cutoff candidate mean at cTU minus the control lower-cutoff candidate mean at cCL.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 < Λ
    hoverlapT :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    hatomlessT :
    ∀ a : γ, Continuous (condCDF S.treatedXYLaw a)
    hregTU :
    ∀ c : P.Ω → ℝ
    if
    Measurable[S.sigmaX] c
    and
    S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ
    then
    Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
    hregTL :
    ∀ c : P.Ω → ℝ
    if
    Measurable[S.sigmaX] c
    and
    S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ
    then
    Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
    hmaxT :
    Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
    henvT :
    Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
    hoverlapC :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
    hatomlessC :
    ∀ a : γ, Continuous (condCDF S.controlXYLaw a)
    hregCU :
    ∀ c : P.Ω → ℝ
    if
    Measurable[S.sigmaX] c
    and
    S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ
    then
    Integrable c P.μ ∧
    Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
    hregCL :
    ∀ c : P.Ω → ℝ
    if
    Measurable[S.sigmaX] c
    and
    S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ
    then
    Integrable c P.μ ∧
    Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
    hmaxC :
    Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
    henvC :
    Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ
    hT :
    S.Ymean true ∈ Icc (S.msmLowerCalib true Λ) (S.msmUpperCalib true Λ)
    hC :
    S.Ymean false ∈ Icc (S.msmLowerCalib false Λ) (S.msmUpperCalib false Λ)
    ∃ cTU cTL cCU cCL : P.Ω → ℝ,
    conclusion 1
    Measurable[S.sigmaX] cTU
    Measurable[S.sigmaX] cTL
    Measurable[S.sigmaX] cCU
    Measurable[S.sigmaX] cCL
    conclusion 2
    S.ate ∈ Icc (S.candMean true (S.lowerCutoffProp Λ cTL) - S.candMean false (S.cutoffProp0 Λ cCU)) (S.candMean true (S.cutoffProp Λ cTU) - S.candMean false (S.lowerCutoffProp0 Λ cCL))
    Proof (Lean source)
    theorem ate_mem_Icc_cutoff_of_calibrating_cutoff_integrability_and_arm_bounds (Λ : ℝ) (hΛ : 1 < Λ) (hoverlapT : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (hatomlessT : ∀ a : γ, Continuous (condCDF S.treatedXYLaw a)) (hregTU : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hregTL : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.treatedSurv c =ᵐ[P.μ] S.survTargetLower Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hmaxT : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (henvT : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) (hoverlapC : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (hatomlessC : ∀ a : γ, Continuous (condCDF S.controlXYLaw a)) (hregCU : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.controlSurv c =ᵐ[P.μ] S.survTarget0 Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hregCL : ∀ c : P.Ω → ℝ, Measurable[S.sigmaX] c → S.controlSurv c =ᵐ[P.μ] S.survTargetLower0 Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hmaxC : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (henvC : Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ) (hT : S.Ymean true ∈ Icc (S.msmLowerCalib true Λ) (S.msmUpperCalib true Λ)) (hC : S.Ymean false ∈ Icc (S.msmLowerCalib false Λ) (S.msmUpperCalib false Λ)) : ∃ cTU cTL cCU cCL : P.Ω → ℝ, (Measurable[S.sigmaX] cTU ∧ Measurable[S.sigmaX] cTL ∧ Measurable[S.sigmaX] cCU ∧ Measurable[S.sigmaX] cCL) ∧ S.ate ∈ Icc (S.candMean true (S.lowerCutoffProp Λ cTL) - S.candMean false (S.cutoffProp0 Λ cCU)) (S.candMean true (S.cutoffProp Λ cTU) - S.candMean false (S.lowerCutoffProp0 Λ cCL)) := by obtain ⟨cTU, cTL, cCU, cCL, hmeas, hUp, hLo⟩ := S.ate_endpoints_eq_cutoff_of_calibrating_cutoff_integrability Λ hΛ hoverlapT hatomlessT hregTU hregTL hmaxT henvT hoverlapC hatomlessC hregCU hregCL hmaxC henvC have hval := S.ate_mem_Icc_calib_of_arm_bounds Λ hT hC rw [hUp, hLo] at hval exact ⟨cTU, cTL, cCU, cCL, hmeas, hval⟩
    Causalean.PO.POBackdoorSystem.ate_mem_Icc_cutoff_of_calibrating_cutoff_integrability_and_arm_bounds · Causalean/PO/ID/Partial/Sensitivity/MSM/ATEClosedForm.lean:128
Compatible­Realization 1 core · 0 supporting This file packages the reciprocal-tilt Bernoulli construction as an MSMDataCompatible model. ★ exists_compatible_realization

Compatible full-data realization of an observed MSM candidate

This file packages the reciprocal-tilt Bernoulli construction as an MSMDataCompatible model. The base observational unit is retained as the latent variable, so latent unconfoundedness is immediate; the marked law supplies the complete propensity and reproduces the observable record law.

theorem exists_compatible_realization reviewed
Causalean.PO.POBackdoorSystem

Given a measurable observed candidate representative that agrees on the treated arm with an observed calibrated MSM candidate, has uniform two-sided overlap under the treated law, and yields an integrable potential outcome under the marked law, there exists a compatible full-data model whose target equals the candidate mean.

Formal statement
P :
shared
γ :
Type u
shared
S :
shared
Λ :
ℝ
etilde h :
P.Ω → ℝ
hh :
heq :
etilde =ᵐ[P.μ.restrict S.treatedSet] h
hmem :
etilde ∈ S.MSMSetCalibObs Λ
huniform :
∃ ε : ℝ, 0 < ε ∧ ∀ᵐ ω ∂P.μ.restrict S.treatedSet, ε ≤ h ω ∧ h ω ≤ 1 - ε
hint :
Integrable (fun p : P.Ω × Bool => S.factualY p.1) (bernoulliMarkedLaw (P.μ.restrict S.treatedSet) h)
∃ M : MSMDataCompatible.{u, u} S Λ, M.target = S.candMean true etilde
Proof (Lean source)
theorem exists_compatible_realization [StandardBorelSpace P.Ω] (Λ : ℝ) (etilde h : P.Ω → ℝ) (hh : Measurable h) (heq : etilde =ᵐ[P.μ.restrict S.treatedSet] h) (hmem : etilde ∈ S.MSMSetCalibObs Λ) (huniform : ∃ ε : ℝ, 0 < ε ∧ ∀ᵐ ω ∂P.μ.restrict S.treatedSet, ε ≤ h ω ∧ h ω ≤ 1 - ε) (hint : Integrable (fun p : P.Ω × Bool => S.factualY p.1) (Causalean.Mathlib.Probability.bernoulliMarkedLaw (P.μ.restrict S.treatedSet) h)) : ∃ M : MSMDataCompatible.{u, u} S Λ, M.target = S.candMean true etilde := by let ν₁ := P.μ.restrict S.treatedSet let Q := Causalean.Mathlib.Probability.bernoulliMarkedLaw ν₁ h have hposE : ∀ᵐ ω ∂P.μ, 0 < etilde ω := hmem.1.1.1.mono fun _ hω => hω.1 have hltE : ∀ᵐ ω ∂P.μ, etilde ω < 1 := hmem.1.1.1.mono fun _ hω => hω.2 have hhpos : ∀ᵐ ω ∂ν₁, 0 < h ω := by filter_upwards [ae_restrict_of_ae hposE, heq] with ω hω heqω simpa [← heqω] using hω have hhle : ∀ᵐ ω ∂ν₁, h ω ≤ 1 := by filter_upwards [ae_restrict_of_ae hltE, heq] with ω hω heqω exact (heqω.symm ▸ hω).le have hmass : reciprocalTilt ν₁ h univ = 1 := S.reciprocalTilt_treated_univ_eq_one etilde h heq hposE hmem.1.2 have hprob : IsProbabilityMeasure Q := Causalean.Mathlib.Probability.bernoulliMarkedLaw_isProbabilityMeasure ν₁ h hh hhpos hhle hmass let _ : IsProbabilityMeasure Q := hprob let X : P.Ω × Bool → γ := fun p => S.factualX p.1 let U : P.Ω × Bool → P.Ω := Prod.fst let Z : P.Ω × Bool → Bool := Prod.snd let Y1 : P.Ω × Bool → ℝ := fun p => S.factualY p.1 have hmXU : comap X inferInstance ⊔ comap U inferInstance = comap Prod.fst inferInstance := by apply le_antisymm · apply sup_le · exact MeasurableSpace.comap_le_comap_of_eq_comp S.factualX S.measurable_factualX rfl · exact le_rfl · exact le_sup_right have hcond : Q[(fun p => if p.2 then (1 : ℝ) else 0) | comap Prod.fst inferInstance] =ᵐ[Q] (fun p => h p.1) := Causalean.Mathlib.Probability.bernoulliMarkedLaw_condExp_mark ν₁ h hh hhpos hhle hmass let eFull : P.Ω × Bool → ℝ := Q[(fun p => if p.2 then (1 : ℝ) else 0) | comap X inferInstance ⊔ comap U inferInstance] have heFull : eFull =ᵐ[Q] (fun p => h p.1) := by change Q[(fun p => if p.2 then (1 : ℝ) else 0) | comap X inferInstance ⊔ comap U inferInstance] =ᵐ[Q] (fun p => h p.1) rw [hmXU] exact hcond have hbase : Q.map Prod.fst = reciprocalTilt ν₁ h := Causalean.Mathlib.Probability.bernoulliMarkedLaw_map_fst ν₁ h hh hhpos hhle have hac : reciprocalTilt ν₁ h ≪ ν₁ := withDensity_absolutelyContinuous ν₁ (fun a => ofReal (1 / h a)) obtain ⟨ε, hε, huniform⟩ := huniform have huniformQ : ∀ᵐ p ∂Q, ε ≤ h p.1 ∧ h p.1 ≤ 1 - ε := by have ht := hac.ae_le huniform rw [← hbase] at ht exact (ae_map_iff measurable_fst.aemeasurable ((measurableSet_le measurable_const hh).inter (measurableSet_le hh measurable_const))).mp ht have hoverFull : ∀ᵐ p ∂Q, ε ≤ eFull p ∧ eFull p ≤ 1 - ε := by filter_upwards [heFull, huniformQ] with p hep hp simpa [hep] using hp have hoddsE := hmem.1.1.2 have hoddsH : ∀ᵐ ω ∂ν₁, 1 / Λ ≤ OR (h ω) (S.propensityFactor (S.factualX ω)) ∧ OR (h ω) (S.propensityFactor (S.factualX ω)) ≤ Λ := by filter_upwards [ae_restrict_of_ae hoddsE, heq] with ω hω heqω have hfactor := congrFun S.propScore_eq_propensityFactor_comp ω simpa [← heqω, Function.comp_apply, hfactor] using hω have hoddsQ : ∀ᵐ p ∂Q, 1 / Λ ≤ OR (eFull p) (S.propensityFactor (X p)) ∧ OR (eFull p) (S.propensityFactor (X p)) ≤ Λ := by have ht := hac.ae_le hoddsH rw [← hbase] at ht have htQ := (ae_map_iff measurable_fst.aemeasurable (by have hor : Measurable (fun ω => OR (h ω) (S.propensityFactor (S.factualX ω))) := by unfold OR fun_prop exact (measurableSet_le measurable_const hor).inter (measurableSet_le hor measurable_const))).mp ht filter_upwards [heFull, htQ] with p hep hp simpa [eFull, X, hep] using hp have hlatent : CondIndepFun (comap X inferInstance ⊔ comap U inferInstance) (sup_le (S.measurable_factualX.comp measurable_fst).comap_le measurable_fst.comap_le) Z Y1 Q := by apply condIndepFun_of_measurable_right (measurable_snd) have hY : Measurable[ comap X inferInstance ⊔ comap U inferInstance] Y1 := by rw [hmXU] apply Measurable.of_comap_le exact MeasurableSpace.comap_le_comap_of_eq_comp S.factualY S.measurable_factualY rfl exact hY let M : MSMDataCompatible S Λ := { Ω := P.Ω × Bool UType := P.Ω Q := Q X := X U := U Z := Z Y1 := Y1 completePropensity := eFull measurable_X := S.measurable_factualX.comp measurable_fst measurable_U := measurable_fst measurable_Z := measurable_snd measurable_Y1 := S.measurable_factualY.comp measurable_fst propensity_eq := by rfl latentUnconfounded := hlatent completeOverlap := ⟨ε, hε, hoverFull⟩ completeOdds := hoddsQ observedLaw := S.bernoulliMarkedLaw_observedRecord_eq etilde h hh heq hposE hltE hmem.1.2 integrable_Y1 := hint } refine ⟨M, ?_⟩ exact S.bernoulliMarkedLaw_target_eq_candMean etilde h hh heq hposE hltE
Control­Observed­Candidates 6 core · 3 supporting This file is the control-arm reflection of MSM.ObservedCandidates. ★ msmUpperCalibObs0_eq★ msmLowerCalibObs0_eq

Observed candidates for the control marginal sensitivity model

This file is the control-arm reflection of MSM.ObservedCandidates. It restricts calibrated control candidates to functions with an observed covariate--outcome measurable version on the control arm and proves that the explicit control cutoff optimizers keep both calibrated endpoints unchanged.

def ObservedOnControl reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a candidate control propensity, the candidate is observed-data measurable on the control arm when it has a version that is measurable with respect to the factual covariate--outcome σ-algebra and agrees with the candidate almost surely among control units.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
etilde :
P.Ω → ℝ
ObservedOnControl S etilde :
Prop
∃ eObs : P.Ω → ℝ,
clause 1
Measurable[S.sigmaXYObs] eObs
clause 2
etilde =ᵐ[P.μ.restrict S.controlSet] eObs
def MSMSetCalibObs0 reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a sensitivity level, the observed calibrated control candidate set consists of candidates that belong to the calibrated control marginal-sensitivity set and are observed-data measurable on the control arm.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
MSMSetCalibObs0 S Λ :
Set (P.Ω → ℝ)
{ etilde | etilde ∈ S.MSMSetCalib false Λ ∧ S.ObservedOnControl etilde }
def msmUpperCalibObs0 reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a sensitivity level, the observed-candidate calibrated control upper endpoint is the supremum of the control candidate mean over observed calibrated control candidates.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
msmUpperCalibObs0 S Λ :
ℝ
sSup (S.candMean false '' S.MSMSetCalibObs0 Λ)
def msmLowerCalibObs0 reviewed
Causalean.PO.POBackdoorSystem

Given a binary-treatment backdoor system and a sensitivity level, the observed-candidate calibrated control lower endpoint is the infimum of the control candidate mean over observed calibrated control candidates.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
msmLowerCalibObs0 S Λ :
ℝ
sInf (S.candMean false '' S.MSMSetCalibObs0 Λ)
theorem msmUpperCalibObs0_eq reviewed
Causalean.PO.POBackdoorSystem

Observed-candidate control upper endpoint. Fix a sensitivity level at least one, strict control overlap, and a covariate-measurable integrable cutoff whose upper control-cutoff candidate is calibrated and box-feasible. Under the three integrable envelopes used by the control exchange argument, the supremum over observed-data calibrated control candidates equals the calibrated control upper endpoint.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
henv :
Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
S.msmUpperCalibObs0 Λ = S.msmUpperCalib false Λ
Proof (Lean source)
theorem msmUpperCalibObs0_eq (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ) (henv : Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) : S.msmUpperCalibObs0 Λ = S.msmUpperCalib false Λ := by let eCut := S.cutoffProp0 Λ c have hcut_obs : eCut ∈ S.MSMSetCalibObs0 Λ := S.cutoffProp0_mem_MSMSetCalibObs0 Λ c hc_meas hcut_mem have hne : (S.candMean false '' S.MSMSetCalibObs0 Λ).Nonempty := ⟨S.candMean false eCut, Set.mem_image_of_mem _ hcut_obs⟩ have hle_all : ∀ x ∈ S.candMean false '' S.MSMSetCalibObs0 Λ, x ≤ S.candMean false eCut := by rintro x ⟨etilde, hmem, rfl⟩ exact S.cutoff_optimal0 Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env hmem.1 have hbdd : BddAbove (S.candMean false '' S.MSMSetCalibObs0 Λ) := ⟨S.candMean false eCut, hle_all⟩ have hobs : S.msmUpperCalibObs0 Λ = S.candMean false eCut := by unfold POBackdoorSystem.msmUpperCalibObs0 exact le_antisymm (csSup_le hne hle_all) (le_csSup hbdd (Set.mem_image_of_mem _ hcut_obs)) calc S.msmUpperCalibObs0 Λ = S.candMean false eCut := hobs _ = S.msmUpperCalib false Λ := (S.msmUpperCalib0_eq_cutoff Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env).symm
theorem msmLowerCalibObs0_eq reviewed
Causalean.PO.POBackdoorSystem

Observed-candidate control lower endpoint. Fix a sensitivity level at least one, strict control overlap, and a covariate-measurable integrable cutoff whose lower control-cutoff candidate is calibrated and box-feasible. Under the three integrable envelopes used by the lower control exchange argument, the infimum over observed-data calibrated control candidates equals the calibrated control lower endpoint.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
henv :
Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
S.msmLowerCalibObs0 Λ = S.msmLowerCalib false Λ
Proof (Lean source)
theorem msmLowerCalibObs0_eq (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ) (henv : Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) : S.msmLowerCalibObs0 Λ = S.msmLowerCalib false Λ := by let eCut := S.lowerCutoffProp0 Λ c have hcut_obs : eCut ∈ S.MSMSetCalibObs0 Λ := S.lowerCutoffProp0_mem_MSMSetCalibObs0 Λ c hc_meas hcut_mem have hne : (S.candMean false '' S.MSMSetCalibObs0 Λ).Nonempty := ⟨S.candMean false eCut, Set.mem_image_of_mem _ hcut_obs⟩ have hle_all : ∀ x ∈ S.candMean false '' S.MSMSetCalibObs0 Λ, S.candMean false eCut ≤ x := by rintro x ⟨etilde, hmem, rfl⟩ exact S.cutoff_optimal0_lower Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env hmem.1 have hbdd : BddBelow (S.candMean false '' S.MSMSetCalibObs0 Λ) := ⟨S.candMean false eCut, hle_all⟩ have hobs : S.msmLowerCalibObs0 Λ = S.candMean false eCut := by unfold POBackdoorSystem.msmLowerCalibObs0 exact le_antisymm (csInf_le hbdd (Set.mem_image_of_mem _ hcut_obs)) (le_csInf hne hle_all) calc S.msmLowerCalibObs0 Λ = S.candMean false eCut := hobs _ = S.msmLowerCalib false Λ := (S.msmLowerCalib0_eq_cutoff Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env).symm
3 supporting declarations (lemmas, instances)
  • MSMSetCalibObs0_subset theorem — For a binary-treatment backdoor system and a sensitivity level, every observed calibrated control candidate is a calibrated control candidate.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    S.MSMSetCalibObs0 Λ ⊆ S.MSMSetCalib false Λ
    Proof (Lean source)
    theorem MSMSetCalibObs0_subset (Λ : ℝ) : S.MSMSetCalibObs0 Λ ⊆ S.MSMSetCalib false Λ := fun _ h => h.1
    Causalean.PO.POBackdoorSystem.MSMSetCalibObs0_subset · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlObservedCandidates.lean:61
  • cutoffProp0_mem_MSMSetCalibObs0 theorem — For a binary-treatment backdoor system, a sensitivity level, and a covariate-measurable cutoff, if the upper control-cutoff candidate is calibrated and box-feasible, then that candidate belongs to the observed calibrated control class.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    c :
    P.Ω → ℝ
    hc :
    Measurable[S.sigmaX] c
    hmem :
    S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
    S.cutoffProp0 Λ c ∈ S.MSMSetCalibObs0 Λ
    Proof (Lean source)
    theorem cutoffProp0_mem_MSMSetCalibObs0 (Λ : ℝ) (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) (hmem : S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ) : S.cutoffProp0 Λ c ∈ S.MSMSetCalibObs0 Λ := by refine ⟨hmem, S.cutoffProp0 Λ c, S.measurable_cutoffProp0_sigmaXYObs Λ c hc, ?_⟩ exact Filter.EventuallyEq.rfl
    Causalean.PO.POBackdoorSystem.cutoffProp0_mem_MSMSetCalibObs0 · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlObservedCandidates.lean:111
  • lowerCutoffProp0_mem_MSMSetCalibObs0 theorem — For a binary-treatment backdoor system, a sensitivity level, and a covariate-measurable cutoff, if the lower control-cutoff candidate is calibrated and box-feasible, then that candidate belongs to the observed calibrated control class.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    c :
    P.Ω → ℝ
    hc :
    Measurable[S.sigmaX] c
    hmem :
    S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
    S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalibObs0 Λ
    Proof (Lean source)
    theorem lowerCutoffProp0_mem_MSMSetCalibObs0 (Λ : ℝ) (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) (hmem : S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalib false Λ) : S.lowerCutoffProp0 Λ c ∈ S.MSMSetCalibObs0 Λ := by refine ⟨hmem, S.lowerCutoffProp0 Λ c, S.measurable_lowerCutoffProp0_sigmaXYObs Λ c hc, ?_⟩ exact Filter.EventuallyEq.rfl
    Causalean.PO.POBackdoorSystem.lowerCutoffProp0_mem_MSMSetCalibObs0 · Causalean/PO/ID/Partial/Sensitivity/MSM/ControlObservedCandidates.lean:121
Control­Quantile­Balance 2 core · 0 supporting This file mirrors the treated-arm quantile-balancing closed form for the control arm: calibrated feasible control propensities are dominated by the control cutoff propensity, so the calibrated control upper bound is atta ★ cutoff_optimal0★ msmUpperCalib0_eq_cutoff

Marginal Sensitivity Model — control-arm quantile balancing

This file mirrors the treated-arm quantile-balancing closed form for the control arm: calibrated feasible control propensities are dominated by the control cutoff propensity, so the calibrated control upper bound is attained at that cutoff.

The theorem cutoff_optimal0 proves optimality of a calibrated control cutoff against every member of MSMSetCalib false. The theorem msmUpperCalib0_eq_cutoff then identifies the calibrated control upper bound with the cutoff candidate mean.

theorem cutoff_optimal0 reviewed
Causalean.PO.POBackdoorSystem

Optimality of the control quantile-cutoff weight. Fix a sensitivity parameter Λ at least one. Assume the control propensity score is almost surely strictly between 0 and 1 (two-sided overlap), and let c be a σ(X)-measurable, integrable cutoff function such that the quantile-cutoff propensity it induces lies in the calibrated control ambiguity set. If the envelope, weighted-indicator, and cutoff-weighted envelope integrability conditions bounding the IPW integrands hold, then for any candidate complete control propensity ẽ in the calibrated ambiguity set, the candidate mean at ẽ is no greater than the candidate mean at the quantile-cutoff weight: the control cutoff attains the maximum over all calibrated candidates.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
henv :
Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
etilde :
P.Ω → ℝ
hmem :
etilde ∈ S.MSMSetCalib false Λ
S.candMean false etilde ≤ S.candMean false (S.cutoffProp0 Λ c)
Proof (Lean source)
theorem cutoff_optimal0 (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ) (henv : Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) {etilde : P.Ω → ℝ} (hmem : etilde ∈ S.MSMSetCalib false Λ) : S.candMean false etilde ≤ S.candMean false (S.cutoffProp0 Λ c) := by classical have _ : Integrable c P.μ := hc_int have hΛ0 : (0 : ℝ) < Λ := lt_of_lt_of_le one_pos hΛ set A : P.Ω → ℝ := S.dVar.indicator false with hA_def set Y : P.Ω → ℝ := S.factualY with hY_def set e : P.Ω → ℝ := S.propScore false with he_def set wE : P.Ω → ℝ := fun ω => 1 / etilde ω with hwE_def set wC : P.Ω → ℝ := fun ω => if c ω < Y ω then S.wMax0 Λ ω else S.wMin0 Λ ω with hwC_def have hOR_box : ∀ {e et : ℝ}, 0 < e → e < 1 → 0 < et → et < 1 → ((1 / Λ ≤ OR et e ∧ OR et e ≤ Λ) ↔ (1 + (1 - e) / (Λ * e) ≤ 1 / et ∧ 1 / et ≤ 1 + Λ * (1 - e) / e)) := by intro e0 et he0 he1 het0 het1 have h1e : 0 < 1 - e0 := by linarith have h1et : 0 < 1 - et := by linarith have hOReq : OR et e0 = et * (1 - e0) / ((1 - et) * e0) := by rw [OR, div_div_eq_mul_div, div_mul_eq_mul_div, mul_comm, mul_div_mul_comm] ring_nf rw [hOReq] have hMax : (1 / Λ ≤ et * (1 - e0) / ((1 - et) * e0)) ↔ (1 / et ≤ 1 + Λ * (1 - e0) / e0) := by rw [div_le_div_iff₀ hΛ0 (by positivity : (0 : ℝ) < (1 - et) * e0), show (1 : ℝ) + Λ * (1 - e0) / e0 = (e0 + Λ * (1 - e0)) / e0 by field_simp, div_le_div_iff₀ het0 he0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] have hMin : (et * (1 - e0) / ((1 - et) * e0) ≤ Λ) ↔ (1 + (1 - e0) / (Λ * e0) ≤ 1 / et) := by rw [div_le_iff₀ (by positivity : (0 : ℝ) < (1 - et) * e0), show (1 : ℝ) + (1 - e0) / (Λ * e0) = (Λ * e0 + (1 - e0)) / (Λ * e0) by field_simp, div_le_div_iff₀ (by positivity : (0 : ℝ) < Λ * e0) het0] constructor <;> intro h <;> nlinarith [h, mul_pos hΛ0 he0] rw [hMax, hMin, and_comm] have hAm : Measurable A := by rw [hA_def] exact S.dVar.measurable_indicator false (MeasurableSet.singleton _) have hYm : Measurable Y := by rw [hY_def] exact S.measurable_factualY have hem : Measurable e := by rw [he_def] unfold POBackdoorSystem.propScore exact (stronglyMeasurable_condExp.mono S.sigmaX_le).measurable have hwMax0m : Measurable (S.wMax0 Λ) := by unfold POBackdoorSystem.wMax0 exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hem)).div hem)) have hwMin0m : Measurable (S.wMin0 Λ) := by unfold POBackdoorSystem.wMin0 exact (measurable_const.add ((measurable_const.sub hem).div (measurable_const.mul hem))) have hwCm : Measurable wC := by rw [hwC_def] exact Measurable.ite (measurableSet_lt (hc_meas.mono S.sigmaX_le le_rfl) hYm) hwMax0m hwMin0m have hA0 : ∀ ω, 0 ≤ A ω := fun ω => by rcases S.dVar.indicator_eq_one_or_zero false ω with h | h <;> simp [hA_def, h] have hae : ∀ᵐ ω ∂P.μ, (1 : ℝ) < S.wMin0 Λ ω ∧ S.wMin0 Λ ω ≤ S.wMax0 Λ ω := by filter_upwards [hoverlap] with ω hω obtain ⟨he0ω, he1ω⟩ := hω have h1e : 0 < 1 - e ω := by rw [he_def] at *; linarith have he0' : 0 < e ω := by rw [he_def] at *; exact he0ω refine ⟨?_, ?_⟩ · have : 0 < (1 - e ω) / (Λ * e ω) := by positivity simp only [POBackdoorSystem.wMin0, ← he_def] linarith · simp only [POBackdoorSystem.wMin0, POBackdoorSystem.wMax0, ← he_def] have hd1 : (1 - e ω) / (Λ * e ω) ≤ Λ * (1 - e ω) / e ω := by rw [div_le_div_iff₀ (by positivity) he0'] nlinarith [hΛ, mul_pos h1e he0', mul_pos hΛ0 he0', mul_nonneg (mul_nonneg (le_of_lt h1e) (le_of_lt he0')) (sub_nonneg.mpr hΛ)] linarith have hboxE : ∀ᵐ ω ∂P.μ, S.wMin0 Λ ω ≤ wE ω ∧ wE ω ≤ S.wMax0 Λ ω := by obtain ⟨hinterior, hor⟩ := hmem.1 filter_upwards [hoverlap, hinterior, hor] with ω hov het hOR obtain ⟨he0ω, he1ω⟩ := hov obtain ⟨het0, het1⟩ := het have hbox := (hOR_box he0ω he1ω het0 het1).mp hOR simpa [POBackdoorSystem.wMin0, POBackdoorSystem.wMax0, he_def, hwE_def] using hbox have hboxC : ∀ᵐ ω ∂P.μ, S.wMin0 Λ ω ≤ wC ω ∧ wC ω ≤ S.wMax0 Λ ω ∧ 0 < wC ω := by filter_upwards [hae] with ω hω obtain ⟨hmin1, hminmax⟩ := hω rw [hwC_def] by_cases hcy : c ω < Y ω · simp only [if_pos hcy] exact ⟨hminmax, le_rfl, lt_of_lt_of_le (by linarith) hminmax⟩ · simp only [if_neg hcy] exact ⟨le_rfl, hminmax, by linarith⟩ have hXE_int : Integrable (fun ω => A ω / etilde ω) P.μ := by simpa [hA_def] using S.calibrated_weight_integrable false etilde hmem.2 have hAwE_int : Integrable (fun ω => A ω * wE ω) P.μ := by refine hXE_int.congr (Filter.Eventually.of_forall ?_) intro ω simp [hwE_def, div_eq_mul_inv] have hYE_int : Integrable (fun ω => A ω * Y ω * wE ω) P.μ := by have hmeas : AEStronglyMeasurable (fun ω => A ω * Y ω * wE ω) P.μ := by refine (hYm.aestronglyMeasurable.mul hAwE_int.aestronglyMeasurable).congr ?_ filter_upwards [] with ω simp only [Pi.mul_apply] ring refine Integrable.mono' henv hmeas ?_ filter_upwards [hboxE, hmem.1.1] with ω hbox hint obtain ⟨_, hmax⟩ := hbox obtain ⟨het0, _⟩ := hint rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), hwE_def, abs_of_nonneg (by positivity : 0 ≤ 1 / etilde ω), mul_assoc, mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) exact mul_le_mul_of_nonneg_left hmax (abs_nonneg _) have hYC_int : Integrable (fun ω => A ω * Y ω * wC ω) P.μ := by refine Integrable.mono' henv (((hAm.mul hYm).mul hwCm).aestronglyMeasurable) ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos), mul_assoc, mul_assoc] apply mul_le_mul_of_nonneg_left _ (hA0 ω) exact mul_le_mul_of_nonneg_left hmax (abs_nonneg _) have hXC_int : Integrable (fun ω => A ω / S.cutoffProp0 Λ c ω) P.μ := by have hAwC_int : Integrable (fun ω => A ω * wC ω) P.μ := by refine Integrable.mono' hweight_env ((hAm.mul hwCm).aestronglyMeasurable) ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos)] exact mul_le_mul_of_nonneg_left hmax (hA0 ω) refine hAwC_int.congr ?_ filter_upwards [hboxC] with ω hbox change A ω * wC ω = A ω / (1 / (if c ω < S.factualY ω then S.wMax0 Λ ω else S.wMin0 Λ ω)) rw [hwC_def, hY_def, div_div_eq_mul_div, div_one] have hcE_int : Integrable (fun ω => c ω * A ω * wE ω) P.μ := by have hmeas : AEStronglyMeasurable (fun ω => c ω * A ω * wE ω) P.μ := by refine ((hc_meas.mono S.sigmaX_le le_rfl).aestronglyMeasurable.mul hAwE_int.aestronglyMeasurable).congr ?_ filter_upwards [] with ω simp only [Pi.mul_apply] ring refine Integrable.mono' hc_env hmeas ?_ filter_upwards [hboxE, hmem.1.1] with ω hbox hint obtain ⟨_, hmax⟩ := hbox obtain ⟨het0, _⟩ := hint rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), hwE_def, abs_of_nonneg (by positivity : 0 ≤ 1 / etilde ω), mul_assoc, mul_assoc] simpa [mul_assoc, hwE_def, one_div] using mul_le_mul_of_nonneg_left hmax (mul_nonneg (abs_nonneg (c ω)) (hA0 ω)) have hcC_int : Integrable (fun ω => c ω * A ω * wC ω) P.μ := by refine Integrable.mono' hc_env (((hc_meas.mono S.sigmaX_le le_rfl).mul hAm).mul hwCm).aestronglyMeasurable ?_ filter_upwards [hboxC] with ω hbox obtain ⟨_, hmax, hpos⟩ := hbox rw [Real.norm_eq_abs, abs_mul, abs_mul, abs_of_nonneg (hA0 ω), abs_of_nonneg (le_of_lt hpos), mul_assoc, mul_assoc] simpa [mul_assoc] using mul_le_mul_of_nonneg_left hmax (mul_nonneg (abs_nonneg (c ω)) (hA0 ω)) have hfirstE_int : Integrable (fun ω => A ω * (Y ω - c ω) * wE ω) P.μ := by refine (hYE_int.sub hcE_int).congr (Filter.Eventually.of_forall ?_) intro ω change A ω * Y ω * wE ω - c ω * A ω * wE ω = A ω * (Y ω - c ω) * wE ω ring have hfirstC_int : Integrable (fun ω => A ω * (Y ω - c ω) * wC ω) P.μ := by refine (hYC_int.sub hcC_int).congr (Filter.Eventually.of_forall ?_) intro ω change A ω * Y ω * wC ω - c ω * A ω * wC ω = A ω * (Y ω - c ω) * wC ω ring have hctermE_eq : ∫ ω, c ω * A ω * wE ω ∂P.μ = ∫ ω, c ω ∂P.μ := by have hprod_int : Integrable (fun ω => c ω * (A ω / etilde ω)) P.μ := by refine hcE_int.congr (Filter.Eventually.of_forall ?_) intro ω change c ω * A ω * (1 / etilde ω) = c ω * (A ω / etilde ω) rw [div_eq_mul_inv] ring have hpull : P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => c ω * P.μ[fun ω => A ω / etilde ω | S.sigmaX] ω) := by exact MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hc_meas.stronglyMeasurable hprod_int hXE_int have hcal : P.μ[fun ω => A ω / etilde ω | S.sigmaX] =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by simpa [POBackdoorSystem.Calibrated, hA_def] using hmem.2 have hmain : ∫ ω, c ω * (A ω / etilde ω) ∂P.μ = ∫ ω, c ω ∂P.μ := by have hcond : ∫ ω, P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * (A ω / etilde ω) ∂P.μ := MeasureTheory.integral_condExp S.sigmaX_le rw [← hcond] calc ∫ ω, P.μ[fun ω => c ω * (A ω / etilde ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * P.μ[fun ω => A ω / etilde ω | S.sigmaX] ω ∂P.μ := integral_congr_ae hpull _ = ∫ ω, c ω * 1 ∂P.μ := by refine integral_congr_ae ?_ filter_upwards [hcal] with ω hω rw [hω] _ = ∫ ω, c ω ∂P.μ := by simp rw [← hmain] refine integral_congr_ae (Filter.Eventually.of_forall ?_) intro ω change c ω * A ω * (1 / etilde ω) = c ω * (A ω / etilde ω) rw [div_eq_mul_inv] ring have hctermC_eq : ∫ ω, c ω * A ω * wC ω ∂P.μ = ∫ ω, c ω ∂P.μ := by have hprod_int : Integrable (fun ω => c ω * (A ω / S.cutoffProp0 Λ c ω)) P.μ := by refine hcC_int.congr ?_ filter_upwards [hboxC] with ω hbox change c ω * A ω * wC ω = c ω * (A ω / (1 / (if c ω < S.factualY ω then S.wMax0 Λ ω else S.wMin0 Λ ω))) rw [hwC_def, hY_def, div_div_eq_mul_div, div_one] ring have hpull : P.μ[fun ω => c ω * (A ω / S.cutoffProp0 Λ c ω) | S.sigmaX] =ᵐ[P.μ] (fun ω => c ω * P.μ[fun ω => A ω / S.cutoffProp0 Λ c ω | S.sigmaX] ω) := by exact MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hc_meas.stronglyMeasurable hprod_int hXC_int have hcal : P.μ[fun ω => A ω / S.cutoffProp0 Λ c ω | S.sigmaX] =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by simpa [POBackdoorSystem.Calibrated, hA_def] using hcut_mem.2 have hmain : ∫ ω, c ω * (A ω / S.cutoffProp0 Λ c ω) ∂P.μ = ∫ ω, c ω ∂P.μ := by have hcond : ∫ ω, P.μ[fun ω => c ω * (A ω / S.cutoffProp0 Λ c ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * (A ω / S.cutoffProp0 Λ c ω) ∂P.μ := MeasureTheory.integral_condExp S.sigmaX_le rw [← hcond] calc ∫ ω, P.μ[fun ω => c ω * (A ω / S.cutoffProp0 Λ c ω) | S.sigmaX] ω ∂P.μ = ∫ ω, c ω * P.μ[fun ω => A ω / S.cutoffProp0 Λ c ω | S.sigmaX] ω ∂P.μ := -- … truncated; follow the source link for the rest …
theorem msmUpperCalib0_eq_cutoff reviewed
Causalean.PO.POBackdoorSystem

The calibrated control upper bound has the quantile-balancing closed form. Fix a sensitivity parameter Λ at least one. Under two-sided overlap of the control propensity score, given a σ(X)-measurable, integrable cutoff c whose induced quantile-cutoff propensity is itself calibrated-feasible, and assuming the envelope, weighted-indicator, and cutoff-weighted envelope integrability conditions bounding the IPW integrands, the calibrated (supremum) upper bound for E[Y(0)] over the calibrated ambiguity set equals the candidate mean evaluated at the quantile-cutoff propensity.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1
c :
P.Ω → ℝ
hc_meas :
Measurable[S.sigmaX] c
hc_int :
Integrable c P.μ
hcut_mem :
S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ
henv :
Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
hc_env :
Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ
S.msmUpperCalib false Λ = S.candMean false (S.cutoffProp0 Λ c)
Proof (Lean source)
theorem msmUpperCalib0_eq_cutoff (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore false ω ∧ S.propScore false ω < 1) (c : P.Ω → ℝ) (hc_meas : Measurable[S.sigmaX] c) (hc_int : Integrable c P.μ) (hcut_mem : S.cutoffProp0 Λ c ∈ S.MSMSetCalib false Λ) (henv : Integrable (fun ω => S.dVar.indicator false ω * |S.factualY ω| * S.wMax0 Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) (hc_env : Integrable (fun ω => |c ω| * S.dVar.indicator false ω * S.wMax0 Λ ω) P.μ) : S.msmUpperCalib false Λ = S.candMean false (S.cutoffProp0 Λ c) := by classical have hne : (S.candMean false '' S.MSMSetCalib false Λ).Nonempty := ⟨S.candMean false (S.cutoffProp0 Λ c), Set.mem_image_of_mem _ hcut_mem⟩ have hle_all : ∀ x ∈ S.candMean false '' S.MSMSetCalib false Λ, x ≤ S.candMean false (S.cutoffProp0 Λ c) := by rintro x ⟨etilde, hmem, rfl⟩ exact S.cutoff_optimal0 Λ hΛ hoverlap c hc_meas hc_int hcut_mem henv hweight_env hc_env hmem have hbdd : BddAbove (S.candMean false '' S.MSMSetCalib false Λ) := ⟨S.candMean false (S.cutoffProp0 Λ c), hle_all⟩ refine le_antisymm ?_ ?_ · exact csSup_le hne hle_all · exact le_csSup hbdd (Set.mem_image_of_mem _ hcut_mem)
Converse­Observed 5 core · 14 supporting This file transports the conditional propensity, calibration identity, and inverse-probability-weighted target identity from a compatible full-data model to its common observed-record law. ★ target_mem_Icc_msmCalib

Observed-law transport for the MSM converse

This file transports the conditional propensity, calibration identity, and inverse-probability-weighted target identity from a compatible full-data model to its common observed-record law.

def observedCandidate reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model, the observed candidate induced by its conditional propensity uses the (X,Y) factor on treated records and the observed propensity on control records.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
observedCandidate M :
P.Ω → ℝ
fun ω
=> if S.factualD ω then M.xyPropensityFactor (S.factualX ω, S.factualY ω) else S.propScore true ω
Causalean.PO.POBackdoorSystem.MSMDataCompatible.observedCandidate · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:33 · uses POBackdoorSystem , MSMDataCompatible , POSystem
def recordCandidate reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model, the record-level version of its induced observed candidate is a measurable statistic of (X,Z,Z·Y).

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
recordCandidate M :
((γ × Bool) × ℝ) → ℝ
fun r => if r.1.2 then M.xyPropensityFactor (r.1.1, r.2) else S.propensityFactor r.1.1
Causalean.PO.POBackdoorSystem.MSMDataCompatible.recordCandidate · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:40 · uses POBackdoorSystem , MSMDataCompatible , POSystem
def recordInverseWeight reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model, the record-level inverse treatment weight is zero on controls and the reciprocal induced candidate on treated records.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
recordInverseWeight M :
((γ × Bool) × ℝ) → ℝ
fun r => if r.1.2 then 1 / M.recordCandidate r else 0
Causalean.PO.POBackdoorSystem.MSMDataCompatible.recordInverseWeight · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:173 · uses POBackdoorSystem , MSMDataCompatible , POSystem
def recordWeightedOutcome reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

For a compatible model, the record-level weighted treated outcome is the record's treated outcome multiplied by its inverse treatment weight.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
recordWeightedOutcome M :
((γ × Bool) × ℝ) → ℝ
fun r => M.recordInverseWeight r * r.2
Causalean.PO.POBackdoorSystem.MSMDataCompatible.recordWeightedOutcome · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:253 · uses POBackdoorSystem , MSMDataCompatible , POSystem
theorem target_mem_Icc_msmCalib reviewed
Causalean.PO.POBackdoorSystem.MSMDataCompatible

MSM converse. Under a sensitivity level at least one, observed strict overlap, and boundedness of the calibrated candidate means, the treated-potential-outcome mean of every compatible model lies in the calibrated MSM interval.

Formal statement
P :
shared
γ :
Type u_1
shared
Λ :
ℝ
shared
M :
S.MSMDataCompatible Λ
shared
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
hbdd :
BddBelow (S.candMean true '' S.MSMSetCalib true Λ)
hbdd' :
BddAbove (S.candMean true '' S.MSMSetCalib true Λ)
M.target ∈ Icc (S.msmLowerCalib true Λ) (S.msmUpperCalib true Λ)
Proof (Lean source)
theorem target_mem_Icc_msmCalib (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (hbdd : BddBelow (S.candMean true '' S.MSMSetCalib true Λ)) (hbdd' : BddAbove (S.candMean true '' S.MSMSetCalib true Λ)) : M.target ∈ Icc (S.msmLowerCalib true Λ) (S.msmUpperCalib true Λ) := by have hmem : M.observedCandidate ∈ S.MSMSetCalib true Λ := (M.observedCandidate_mem_MSMSetCalibObs hΛ hoverlap).1 have himage : S.candMean true M.observedCandidate ∈ S.candMean true '' S.MSMSetCalib true Λ := Set.mem_image_of_mem _ hmem rw [Set.mem_Icc, ← M.candMean_observedCandidate_eq_target] exact ⟨csInf_le hbdd himage, le_csSup hbdd' himage⟩
14 supporting declarations (lemmas, instances)
  • measurable_recordCandidate theorem — The record-level induced candidate is measurable.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    Measurable M.recordCandidate
    Proof (Lean source)
    @[fun_prop] theorem measurable_recordCandidate : Measurable M.recordCandidate := by unfold recordCandidate exact Measurable.ite ((measurable_snd.comp measurable_fst) (measurableSet_singleton true)) (M.measurable_xyPropensityFactor.comp ((measurable_fst.comp measurable_fst).prodMk measurable_snd)) (S.measurable_propensityFactor.comp (measurable_fst.comp measurable_fst))
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.measurable_recordCandidate · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:46
  • recordCandidate_factualObservedRecord theorem — The induced candidate evaluated on a factual observable record is the record-level candidate.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    ω :
    P.Ω
    M.recordCandidate (S.factualObservedRecord ω) = M.observedCandidate ω
    Proof (Lean source)
    theorem recordCandidate_factualObservedRecord (ω : P.Ω) : M.recordCandidate (S.factualObservedRecord ω) = M.observedCandidate ω := by by_cases hd : S.factualD ω · have hi : S.dVar.indicator true ω = 1 := by have hmem : ω ∈ S.treatedSet := by simpa [POBackdoorSystem.treatedSet] using hd rw [S.treated_indicator_eq] simp [hmem] simp [recordCandidate, observedCandidate, factualObservedRecord, hd, hi] · have hfactor := congrFun S.propScore_eq_propensityFactor_comp ω simp [recordCandidate, observedCandidate, factualObservedRecord, hd, Function.comp_apply] at hfactor ⊢ exact hfactor.symm
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.recordCandidate_factualObservedRecord · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:56
  • recordCandidate_observedRecord theorem — The induced candidate evaluated on a compatible model's observable record equals its (X,Y(1)) conditional propensity on treated units and the observed propensity on controls.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    ω :
    M.Ω
    M.recordCandidate (M.observedRecord ω)
    = if M.Z ω then M.xyPropensity ω else S.propensityFactor (M.X ω)
    Proof (Lean source)
    theorem recordCandidate_observedRecord (ω : M.Ω) : M.recordCandidate (M.observedRecord ω) = if M.Z ω then M.xyPropensity ω else S.propensityFactor (M.X ω) := by by_cases hz : M.Z ω · have hfactor := congrFun M.xyPropensity_eq_factor_comp ω simpa [recordCandidate, MSMDataCompatible.observedRecord, hz, Function.comp_apply] using hfactor.symm · simp [recordCandidate, MSMDataCompatible.observedRecord, hz]
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.recordCandidate_observedRecord · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:72
  • observedCandidate_observedOnTreated theorem — The induced observed candidate has an observed (X,Y)-measurable version on the treated arm.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    S.ObservedOnTreated M.observedCandidate
    Proof (Lean source)
    theorem observedCandidate_observedOnTreated : S.ObservedOnTreated M.observedCandidate := by let eObs : P.Ω → ℝ := fun ω => M.xyPropensityFactor (S.factualX ω, S.factualY ω) have heObs : Measurable[S.sigmaXYObs] eObs := by apply M.measurable_xyPropensityFactor.comp exact ((comap_measurable S.factualX).mono le_sup_left le_rfl).prodMk ((comap_measurable S.factualY).mono le_sup_right le_rfl) refine ⟨eObs, heObs, ?_⟩ filter_upwards [ae_restrict_mem S.measurableSet_treatedSet] with ω hω have hd : S.factualD ω = true := by simpa [POBackdoorSystem.treatedSet] using hω simp [observedCandidate, eObs, hd]
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.observedCandidate_observedOnTreated · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:84
  • observedCandidate_mem_MSMSet theorem — Under a sensitivity level at least one and observed strict overlap, the candidate induced by any compatible model lies in the observed MSM odds box.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    M.observedCandidate ∈ S.MSMSet true Λ
    Proof (Lean source)
    theorem observedCandidate_mem_MSMSet (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) : M.observedCandidate ∈ S.MSMSet true Λ := by have hΛpos : 0 < Λ := lt_of_lt_of_le zero_lt_one hΛ have hq := M.ae_propensityFactor_mem_Ioo hoverlap have hg := M.ae_xyPropensity_mem_Ioo have hodds := M.xyPropensity_odds hΛ hoverlap have hmodelInterior : ∀ᵐ ω ∂M.Q, 0 < M.recordCandidate (M.observedRecord ω) ∧ M.recordCandidate (M.observedRecord ω) < 1 := by filter_upwards [hq, hg] with ω hqω hgω rw [M.recordCandidate_observedRecord] split <;> assumption have hmodelOdds : ∀ᵐ ω ∂M.Q, 1 / Λ ≤ OR (M.recordCandidate (M.observedRecord ω)) (S.propensityFactor (M.observedRecord ω).1.1) ∧ OR (M.recordCandidate (M.observedRecord ω)) (S.propensityFactor (M.observedRecord ω).1.1) ≤ Λ := by filter_upwards [hq, hodds] with ω hqω hoddsω rw [M.recordCandidate_observedRecord] by_cases hz : M.Z ω · simpa [MSMDataCompatible.observedRecord, hz] using hoddsω · have hor : OR (S.propensityFactor (M.X ω)) (S.propensityFactor (M.X ω)) = 1 := by unfold OR have hp : S.propensityFactor (M.X ω) ≠ 0 := ne_of_gt hqω.1 have hpc : 1 - S.propensityFactor (M.X ω) ≠ 0 := by linarith [hqω.2] field_simp have hlower : 1 / Λ ≤ (1 : ℝ) := by rw [div_le_one hΛpos] exact hΛ simpa [MSMDataCompatible.observedRecord, hz, hor] using And.intro hlower hΛ let interior : ((γ × Bool) × ℝ) → Prop := fun r => 0 < M.recordCandidate r ∧ M.recordCandidate r < 1 have hinteriorMeas : MeasurableSet {r | interior r} := (measurableSet_lt measurable_const M.measurable_recordCandidate).inter (measurableSet_lt M.measurable_recordCandidate measurable_const) let oddsBox : ((γ × Bool) × ℝ) → Prop := fun r => 1 / Λ ≤ OR (M.recordCandidate r) (S.propensityFactor r.1.1) ∧ OR (M.recordCandidate r) (S.propensityFactor r.1.1) ≤ Λ have hoddsMeas : MeasurableSet {r | oddsBox r} := by have hOR : Measurable (fun r => OR (M.recordCandidate r) (S.propensityFactor r.1.1)) := by unfold OR fun_prop exact (measurableSet_le measurable_const hOR).inter (measurableSet_le hOR measurable_const) have hfactual : Measurable S.factualObservedRecord := by unfold factualObservedRecord exact (S.measurable_factualX.prodMk S.measurable_factualD).prodMk ((S.dVar.measurable_indicator true (measurableSet_singleton true)).mul S.measurable_factualY) have hinteriorObs := (Mathlib.MeasureTheory.ae_comp_iff_of_map_eq M.measurable_observedRecord hfactual interior hinteriorMeas M.observedLaw).mp hmodelInterior have hoddsObs := (Mathlib.MeasureTheory.ae_comp_iff_of_map_eq M.measurable_observedRecord hfactual oddsBox hoddsMeas M.observedLaw).mp hmodelOdds constructor · filter_upwards [hinteriorObs] with ω hω simpa [interior, M.recordCandidate_factualObservedRecord] using hω · filter_upwards [hoddsObs] with ω hω have hfactor := congrFun S.propScore_eq_propensityFactor_comp ω change 1 / Λ ≤ OR (M.recordCandidate (S.factualObservedRecord ω)) (S.propensityFactor (S.factualX ω)) ∧ OR (M.recordCandidate (S.factualObservedRecord ω)) (S.propensityFactor (S.factualX ω)) ≤ Λ at hω rw [M.recordCandidate_factualObservedRecord] at hω simpa [Function.comp_apply, hfactor] using hω
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.observedCandidate_mem_MSMSet · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:100
  • measurable_recordInverseWeight theorem — The record-level inverse treatment weight is measurable.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    Measurable M.recordInverseWeight
    Proof (Lean source)
    @[fun_prop] theorem measurable_recordInverseWeight : Measurable M.recordInverseWeight := by unfold recordInverseWeight exact Measurable.ite ((measurable_snd.comp measurable_fst) (measurableSet_singleton true)) (measurable_const.div M.measurable_recordCandidate) measurable_const
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.measurable_recordInverseWeight · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:178
  • recordInverseWeight_observedRecord theorem — The record inverse weight composed with the model record equals the model's inverse treatment weight.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    M.recordInverseWeight ∘ M.observedRecord = M.inverseWeight
    Proof (Lean source)
    theorem recordInverseWeight_observedRecord : M.recordInverseWeight ∘ M.observedRecord = M.inverseWeight := by funext ω by_cases hz : M.Z ω · have hc := M.recordCandidate_observedRecord ω simp [recordInverseWeight, MSMDataCompatible.observedRecord, inverseWeight, treatmentIndicator, hz] at hc ⊢ rw [hc] · simp [recordInverseWeight, MSMDataCompatible.observedRecord, inverseWeight, treatmentIndicator, hz]
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.recordInverseWeight_observedRecord · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:186
  • recordInverseWeight_factualObservedRecord theorem — The record inverse weight composed with the factual record equals treatment divided by the induced observed candidate.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    M.recordInverseWeight ∘ S.factualObservedRecord
    = fun ω => S.dVar.indicator true ω / M.observedCandidate ω
    Proof (Lean source)
    theorem recordInverseWeight_factualObservedRecord : M.recordInverseWeight ∘ S.factualObservedRecord = fun ω => S.dVar.indicator true ω / M.observedCandidate ω := by funext ω change (if S.factualD ω then 1 / M.recordCandidate (S.factualObservedRecord ω) else 0) = S.dVar.indicator true ω / M.observedCandidate ω rw [M.recordCandidate_factualObservedRecord] by_cases hd : S.factualD ω · have hmem : ω ∈ S.treatedSet := by simpa [POBackdoorSystem.treatedSet] using hd have hi : S.dVar.indicator true ω = 1 := by rw [S.treated_indicator_eq] simp [hmem] simp [hd, hi] · have hnmem : ω ∉ S.treatedSet := by simpa [POBackdoorSystem.treatedSet] using hd have hi : S.dVar.indicator true ω = 0 := by rw [S.treated_indicator_eq] simp [hnmem] simp [hd, hi]
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.recordInverseWeight_factualObservedRecord · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:199
  • observedCandidate_calibrated theorem — Transported calibration. The candidate induced by a compatible model has conditional inverse-weight mean one given the observed covariate.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    S.Calibrated true M.observedCandidate
    Proof (Lean source)
    theorem observedCandidate_calibrated : S.Calibrated true M.observedCandidate := by let design : ((γ × Bool) × ℝ) → γ := fun r => r.1.1 have hdesign : Measurable design := measurable_fst.comp measurable_fst have hint : Integrable (M.recordInverseWeight ∘ M.observedRecord) M.Q := by rw [M.recordInverseWeight_observedRecord] exact M.integrable_inverseWeight have hcond : M.Q[M.recordInverseWeight ∘ M.observedRecord | comap (design ∘ M.observedRecord) inferInstance] =ᵐ[M.Q] (fun _ => 1) := by rw [M.recordInverseWeight_observedRecord] simpa [design, MSMDataCompatible.observedRecord, Function.comp_def] using M.condExp_inverseWeight_sigmaX_eq_one have htransport := Mathlib.MeasureTheory.condExp_comp_eq_one_of_map_eq M.measurable_observedRecord (by unfold factualObservedRecord exact (S.measurable_factualX.prodMk S.measurable_factualD).prodMk ((S.dVar.measurable_indicator true (measurableSet_singleton true)).mul S.measurable_factualY)) design hdesign M.recordInverseWeight M.measurable_recordInverseWeight M.observedLaw hint hcond rw [M.recordInverseWeight_factualObservedRecord] at htransport unfold Calibrated sigmaX simpa [design, factualObservedRecord, Function.comp_def] using htransport
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.observedCandidate_calibrated · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:223
  • measurable_recordWeightedOutcome theorem — The record-level weighted treated outcome is measurable.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    Measurable M.recordWeightedOutcome
    Proof (Lean source)
    @[fun_prop] theorem measurable_recordWeightedOutcome : Measurable M.recordWeightedOutcome := by unfold recordWeightedOutcome exact M.measurable_recordInverseWeight.mul measurable_snd
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.measurable_recordWeightedOutcome · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:258
  • recordWeightedOutcome_observedRecord theorem — The record-level weighted outcome composed with the compatible model record equals the full-data weighted potential outcome.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    M.recordWeightedOutcome ∘ M.observedRecord = M.weightedY1
    Proof (Lean source)
    theorem recordWeightedOutcome_observedRecord : M.recordWeightedOutcome ∘ M.observedRecord = M.weightedY1 := by funext ω change M.recordInverseWeight (M.observedRecord ω) * (if M.Z ω then M.Y1 ω else 0) = M.inverseWeight ω * M.Y1 ω have hw : M.recordInverseWeight (M.observedRecord ω) = M.inverseWeight ω := by simpa only [Function.comp_apply] using congrFun M.recordInverseWeight_observedRecord ω rw [hw] by_cases hz : M.Z ω · simp [hz] · simp [hz, inverseWeight, treatmentIndicator]
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.recordWeightedOutcome_observedRecord · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:264
  • recordWeightedOutcome_factualObservedRecord theorem — The record-level weighted outcome composed with the factual record is the candidate-mean integrand.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    M.recordWeightedOutcome ∘ S.factualObservedRecord
    = fun ω => S.dVar.indicator true ω * S.factualY ω / M.observedCandidate ω
    Proof (Lean source)
    theorem recordWeightedOutcome_factualObservedRecord : M.recordWeightedOutcome ∘ S.factualObservedRecord = fun ω => S.dVar.indicator true ω * S.factualY ω / M.observedCandidate ω := by funext ω simp only [Function.comp_apply] unfold recordWeightedOutcome have hw : M.recordInverseWeight (S.factualObservedRecord ω) = S.dVar.indicator true ω / M.observedCandidate ω := by simpa only [Function.comp_apply] using congrFun M.recordInverseWeight_factualObservedRecord ω rw [hw] simp only [factualObservedRecord] by_cases hd : S.factualD ω · have hmem : ω ∈ S.treatedSet := by simpa [POBackdoorSystem.treatedSet] using hd have hi : S.dVar.indicator true ω = 1 := by rw [S.treated_indicator_eq] simp [hmem] simp [hi, div_eq_mul_inv, mul_comm] · have hnmem : ω ∉ S.treatedSet := by simpa [POBackdoorSystem.treatedSet] using hd have hi : S.dVar.indicator true ω = 0 := by rw [S.treated_indicator_eq] simp [hnmem] simp [hi]
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.recordWeightedOutcome_factualObservedRecord · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:279
  • candMean_observedCandidate_eq_target theorem — Transported IPW identity. The candidate mean induced by a compatible model equals that model's full-data treated-potential-outcome mean.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    S.candMean true M.observedCandidate = M.target
    Proof (Lean source)
    theorem candMean_observedCandidate_eq_target : S.candMean true M.observedCandidate = M.target := by have htransport := Mathlib.MeasureTheory.integral_comp_eq_of_map_eq M.measurable_observedRecord (by unfold factualObservedRecord exact (S.measurable_factualX.prodMk S.measurable_factualD).prodMk ((S.dVar.measurable_indicator true (measurableSet_singleton true)).mul S.measurable_factualY)) M.recordWeightedOutcome M.measurable_recordWeightedOutcome M.observedLaw change ∫ ω, (M.recordWeightedOutcome ∘ M.observedRecord) ω ∂M.Q = ∫ ω, (M.recordWeightedOutcome ∘ S.factualObservedRecord) ω ∂P.μ at htransport rw [M.recordWeightedOutcome_observedRecord, M.recordWeightedOutcome_factualObservedRecord] at htransport unfold candMean exact htransport.symm.trans M.integral_weightedY1_eq_target
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.candMean_observedCandidate_eq_target · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:307
  • observedCandidate_mem_MSMSetCalibObs theorem — MSM converse candidate. Under a sensitivity level at least one and observed strict overlap, every compatible model induces an observed, calibrated MSM candidate.
    P :
    shared
    γ :
    Type u_1
    shared
    Λ :
    ℝ
    shared
    M :
    S.MSMDataCompatible Λ
    shared
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    M.observedCandidate ∈ S.MSMSetCalibObs Λ
    Proof (Lean source)
    theorem observedCandidate_mem_MSMSetCalibObs (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) : M.observedCandidate ∈ S.MSMSetCalibObs Λ := ⟨⟨M.observedCandidate_mem_MSMSet hΛ hoverlap, M.observedCandidate_calibrated⟩, M.observedCandidate_observedOnTreated⟩
    Causalean.PO.POBackdoorSystem.MSMDataCompatible.observedCandidate_mem_MSMSetCalibObs · Causalean/PO/ID/Partial/Sensitivity/MSM/ConverseObserved.lean:326
Cutoff­Exists 3 core · 1 supporting This file isolates the existence and regularity assumptions for treated-arm calibrating cutoffs. ★ wMin_mul_propScore_le_one★ condExp_treat_wMin_eq★ condExp_treat_wMax_eq

Existence interface for calibrated MSM cutoffs

This file isolates the existence and regularity assumptions for treated-arm calibrating cutoffs. It packages the facts needed to turn a conditional-quantile cutoff into a calibrated candidate weight for the calibrated MSM upper bound.

The public results are the endpoint bracket inequalities wMin_mul_propScore_le_one and one_le_wMax_mul_propScore, together with the conditional-expectation pullout identities condExp_treat_wMin_eq and condExp_treat_wMax_eq.

theorem wMin_mul_propScore_le_one reviewed
Causalean.PO.POBackdoorSystem

Lower calibration bracket (algebraic). Fix a sensitivity parameter Λ at least 1. Assuming the propensity score for treatment given the covariates lies strictly between 0 and 1 almost surely (overlap), almost surely the lower marginal-sensitivity-model weight satisfies wMin(X)·e(X) = e(X) + (1 − e(X))/Λ ≤ 1, where e(X) denotes the propensity score.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
∀ᵐ ω ∂P.μ, S.wMin Λ ω * S.propScore true ω ≤ 1
Proof (Lean source)
theorem wMin_mul_propScore_le_one (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) : ∀ᵐ ω ∂P.μ, S.wMin Λ ω * S.propScore true ω ≤ 1 := by have hΛ0 : 0 < Λ := lt_of_lt_of_le zero_lt_one hΛ filter_upwards [hoverlap] with ω hω set e : ℝ := S.propScore true ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have hw : S.wMin Λ ω * S.propScore true ω = e + (1 - e) / Λ := by simp only [POBackdoorSystem.wMin, ← he_def] field_simp [hΛ0.ne', he0.ne'] have hdiv : (1 - e) / Λ ≤ 1 - e := by rw [div_le_iff₀ hΛ0] nlinarith [hΛ, le_of_lt he1] calc S.wMin Λ ω * S.propScore true ω = e + (1 - e) / Λ := hw _ ≤ e + (1 - e) := by linarith _ = 1 := by ring
theorem condExp_treat_wMin_eq reviewed
Causalean.PO.POBackdoorSystem

The all-wMin conditional calibration value is wMin·e. Assuming the product of the treatment indicator and the lower marginal-sensitivity-model weight wMin is integrable, the conditional expectation, given the σ-algebra generated by the covariates, of the treatment indicator times wMin equals wMin times the propensity score, almost everywhere.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hint :
Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ
P.μ[fun ω => S.dVar.indicator true ω * S.wMin Λ ω | S.sigmaX]
=ᵐ[P.μ] (fun ω => S.wMin Λ ω * S.propScore true ω)
Proof (Lean source)
theorem condExp_treat_wMin_eq (Λ : ℝ) (hint : Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ) : P.μ[fun ω => S.dVar.indicator true ω * S.wMin Λ ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMin Λ ω * S.propScore true ω) := by have hprop_meas : Measurable[S.sigmaX] (S.propScore true) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hw_smeas : StronglyMeasurable[S.sigmaX] (S.wMin Λ) := by unfold POBackdoorSystem.wMin exact (measurable_const.add ((measurable_const.sub hprop_meas).div (measurable_const.mul hprop_meas))).stronglyMeasurable have hind_int : Integrable (S.dVar.indicator true) P.μ := S.dVar.integrable_indicator true (measurableSet_singleton true) have hcomm : (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) = (fun ω => S.wMin Λ ω * S.dVar.indicator true ω) := by funext ω exact mul_comm _ _ refine (MeasureTheory.condExp_congr_ae (m := S.sigmaX) (μ := P.μ) (Filter.EventuallyEq.of_eq hcomm)).trans ?_ have hpull : P.μ[fun ω => S.wMin Λ ω * S.dVar.indicator true ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMin Λ ω * P.μ[S.dVar.indicator true | S.sigmaX] ω) := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hw_smeas (hint.congr (Filter.EventuallyEq.of_eq hcomm)) hind_int exact hpull.trans (Filter.EventuallyEq.of_eq (by funext ω rfl))
theorem condExp_treat_wMax_eq reviewed
Causalean.PO.POBackdoorSystem

The all-wMax conditional calibration value is wMax·e. Assuming the product of the treatment indicator and the upper marginal-sensitivity-model weight wMax is integrable, the conditional expectation, given the σ-algebra generated by the covariates, of the treatment indicator times wMax equals wMax times the propensity score, almost everywhere.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hint :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
P.μ[fun ω => S.dVar.indicator true ω * S.wMax Λ ω | S.sigmaX]
=ᵐ[P.μ] (fun ω => S.wMax Λ ω * S.propScore true ω)
Proof (Lean source)
theorem condExp_treat_wMax_eq (Λ : ℝ) (hint : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) : P.μ[fun ω => S.dVar.indicator true ω * S.wMax Λ ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMax Λ ω * S.propScore true ω) := by have hprop_meas : Measurable[S.sigmaX] (S.propScore true) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hw_smeas : StronglyMeasurable[S.sigmaX] (S.wMax Λ) := by unfold POBackdoorSystem.wMax exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hprop_meas)).div hprop_meas)).stronglyMeasurable have hind_int : Integrable (S.dVar.indicator true) P.μ := S.dVar.integrable_indicator true (measurableSet_singleton true) have hcomm : (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) = (fun ω => S.wMax Λ ω * S.dVar.indicator true ω) := by funext ω exact mul_comm _ _ refine (MeasureTheory.condExp_congr_ae (m := S.sigmaX) (μ := P.μ) (Filter.EventuallyEq.of_eq hcomm)).trans ?_ have hpull : P.μ[fun ω => S.wMax Λ ω * S.dVar.indicator true ω | S.sigmaX] =ᵐ[P.μ] (fun ω => S.wMax Λ ω * P.μ[S.dVar.indicator true | S.sigmaX] ω) := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hw_smeas (hint.congr (Filter.EventuallyEq.of_eq hcomm)) hind_int exact hpull.trans (Filter.EventuallyEq.of_eq (by funext ω rfl))
1 supporting declaration (lemmas, instances)
  • one_le_wMax_mul_propScore theorem — Upper calibration bracket (algebraic). Fix a sensitivity parameter Λ at least 1. Assuming the propensity score for treatment given the covariates lies strictly between 0 and 1 almost surely (overlap), almost surely the upper marginal-sensitivity-model weight satisfies 1 ≤ wMax(X)·e(X) = e(X) + Λ·(1 − e(X)).
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    Λ :
    ℝ
    hΛ :
    1 ≤ Λ
    hoverlap :
    ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
    ∀ᵐ ω ∂P.μ, 1 ≤ S.wMax Λ ω * S.propScore true ω
    Proof (Lean source)
    theorem one_le_wMax_mul_propScore (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) : ∀ᵐ ω ∂P.μ, 1 ≤ S.wMax Λ ω * S.propScore true ω := by filter_upwards [hoverlap] with ω hω set e : ℝ := S.propScore true ω with he_def have he0 : 0 < e := by simpa [he_def] using hω.1 have he1 : e < 1 := by simpa [he_def] using hω.2 have hw : S.wMax Λ ω * S.propScore true ω = e + Λ * (1 - e) := by simp only [POBackdoorSystem.wMax, ← he_def] field_simp [he0.ne'] have hmul : 1 - e ≤ Λ * (1 - e) := by nlinarith [hΛ, le_of_lt he1] calc 1 = e + (1 - e) := by ring _ ≤ e + Λ * (1 - e) := by linarith _ = S.wMax Λ ω * S.propScore true ω := hw.symm
    Causalean.PO.POBackdoorSystem.one_le_wMax_mul_propScore · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffExists.lean:76
Gaussian­Half­Width 3 core · 0 supporting This file evaluates the calibrated Gaussian MSM upper endpoint in closed form. ★ msmUpperCalib_gaussian_halfWidth

Gaussian MSM half-width formula

This file evaluates the calibrated Gaussian MSM upper endpoint in closed form. It defines the scalar gaussianMSMHalfWidthFactor, strengthens the CDF-only Gaussian cutoff model to GaussianOutcomeModel with conditional mean and truncated-mean identities, and proves msmUpperCalib_gaussian_halfWidth: the calibrated upper bound is the point-identified conditional mean plus the Dorn-Guo half-width contribution.

def gaussianMSMHalfWidthFactor reviewed
Causalean.PO.POBackdoorSystem

For a real sensitivity parameter, the Dorn–Guo Gaussian half-width factor is (Λ2−1)/Λ ϕ(Φ−1(Λ/(Λ+1)))(\Lambda^2-1)/\Lambda\,\phi(\Phi^{-1}(\Lambda/(\Lambda+1))), where Φ\Phi and ϕ\phi are the standard normal distribution and density functions, respectively.

Definition (Lean source)
Λ :
ℝ
gaussianMSMHalfWidthFactor Λ :
ℝ
(Λ ^ 2 - 1) / Λ * stdNormalPDF (probit (Λ / (Λ + 1)))
Causalean.PO.POBackdoorSystem.gaussianMSMHalfWidthFactor · Causalean/PO/ID/Partial/Sensitivity/MSM/GaussianHalfWidth.lean:50
structure GaussianOutcomeModel reviewed
Causalean.PO.POBackdoorSystem

The conditional-Gaussian outcome model. Strengthens GaussianTreatedModel (conditional CDF Φ((·−m)/σ)) with the two conditional moments it implies: the treated conditional mean E[A·Y|σX] = e(X)·m(X) and the truncated mean above any σ(X)-measurable cutoff. This is the faithful "treated outcomes are conditionally Gaussian N(m(X), σ(X)²)" premise of the Dorn–Guo corollary.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
m σ :
γ → ℝ
condMean_eq :
P.μ[fun ω => S.dVar.indicator true ω * S.factualY ω | S.sigmaX]
=ᵐ[P.μ] fun ω => S.propScore true ω * m (S.factualX ω)
condTruncMean_eq :
∀ c : P.Ω → ℝ
if
Measurable[S.sigmaX] c
then
P.μ[fun ω => S.dVar.indicator true ω * S.factualY ω * (if c ω < S.factualY ω then (1 : ℝ) else 0) | S.sigmaX]
=ᵐ[P.μ] fun ω => S.propScore true ω * (m (S.factualX ω) * (1 - stdNormalCDF ((c ω - m (S.factualX ω)) / σ (S.factualX ω))) + σ (S.factualX ω) * stdNormalPDF ((c ω - m (S.factualX ω)) / σ (S.factualX ω)))
theorem msmUpperCalib_gaussian_halfWidth reviewed
Causalean.PO.POBackdoorSystem

The Dorn–Guo Gaussian calibrated upper bound, closed form. Fix a sensitivity parameter Λ strictly greater than 1 and assume the propensity score for treatment given the covariates lies strictly between 0 and 1 almost surely (overlap). Under the conditional-Gaussian treated-outcome model with conditional mean m and conditional standard deviation σ, strengthened with the implied treated conditional mean and truncated-mean identities, assuming the conditional mean m(X) is integrable, (1 − e(X))·σ(X) is integrable, the regularity conditions making the Gaussian-cutoff candidate mean and survival decomposition well defined, and the candidate-mean integrability at the lower weight and at the truncated difference, then the calibrated upper bound on E[Y(1)] equals the point-identified mean ∫ m(X) plus the half-width (Λ²−1)/Λ · φ(Φ⁻¹(Λ/(Λ+1))) · ∫ (1 − e(X))·σ(X).

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
Λ :
ℝ
hΛ :
1 < Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
m σ :
γ → ℝ
hmodel :
S.GaussianOutcomeModel m σ
hint_m :
Integrable (fun ω => m (S.factualX ω)) P.μ
hint_σ :
Integrable (fun ω => (1 - S.propScore true ω) * σ (S.factualX ω)) P.μ
hreg :
Integrable (S.gaussianCutoff m σ Λ) P.μ ∧
Integrable (fun ω => S.dVar.indicator true ω * (if S.gaussianCutoff m σ Λ ω < S.factualY ω then (1 : ℝ) else 0)) P.μ ∧
Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ ∧
Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if S.gaussianCutoff m σ Λ ω < S.factualY ω then (1 : ℝ) else 0))) P.μ ∧
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ ∧
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ ∧
Integrable (fun ω => |S.gaussianCutoff m σ Λ ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hint_candMin :
Integrable (fun ω => S.wMin Λ ω * (S.dVar.indicator true ω * S.factualY ω)) P.μ
hint_candTrunc :
Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * S.factualY ω * (if S.gaussianCutoff m σ Λ ω < S.factualY ω then (1 : ℝ) else 0))) P.μ
S.msmUpperCalib true Λ
= (∫ ω, m (S.factualX ω) ∂P.μ)
+ gaussianMSMHalfWidthFactor Λ * ∫ ω, (1 - S.propScore true ω) * σ (S.factualX ω) ∂P.μ
Proof (Lean source)
theorem msmUpperCalib_gaussian_halfWidth (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) {m σ : γ → ℝ} (hmodel : S.GaussianOutcomeModel m σ) (hint_m : Integrable (fun ω => m (S.factualX ω)) P.μ) (hint_σ : Integrable (fun ω => (1 - S.propScore true ω) * σ (S.factualX ω)) P.μ) (hreg : Integrable (S.gaussianCutoff m σ Λ) P.μ ∧ Integrable (fun ω => S.dVar.indicator true ω * (if S.gaussianCutoff m σ Λ ω < S.factualY ω then (1 : ℝ) else 0)) P.μ ∧ Integrable (fun ω => S.dVar.indicator true ω * S.wMin Λ ω) P.μ ∧ Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * (if S.gaussianCutoff m σ Λ ω < S.factualY ω then (1 : ℝ) else 0))) P.μ ∧ Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ ∧ Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ ∧ Integrable (fun ω => |S.gaussianCutoff m σ Λ ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hint_candMin : Integrable (fun ω => S.wMin Λ ω * (S.dVar.indicator true ω * S.factualY ω)) P.μ) (hint_candTrunc : Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (S.dVar.indicator true ω * S.factualY ω * (if S.gaussianCutoff m σ Λ ω < S.factualY ω then (1 : ℝ) else 0))) P.μ) : S.msmUpperCalib true Λ = (∫ ω, m (S.factualX ω) ∂P.μ) + gaussianMSMHalfWidthFactor Λ * ∫ ω, (1 - S.propScore true ω) * σ (S.factualX ω) ∂P.μ := by classical let c : P.Ω → ℝ := S.gaussianCutoff m σ Λ let A : P.Ω → ℝ := S.dVar.indicator true let Y : P.Ω → ℝ := S.factualY let e : P.Ω → ℝ := S.propScore true let M : P.Ω → ℝ := fun ω => m (S.factualX ω) let sig : P.Ω → ℝ := fun ω => σ (S.factualX ω) let z : ℝ := probit (Λ / (Λ + 1)) let K : ℝ := (Λ ^ 2 - 1) / Λ * Causalean.Mathlib.stdNormalPDF z have hc : Measurable[S.sigmaX] c := by simpa [c] using S.measurable_gaussianCutoff hmodel.measurable_m hmodel.measurable_σ Λ have hreg_all := hreg obtain ⟨_hc_int, _hI_int, _hmin_int, _hdiff_int, henvY, _hweight_env, _hc_env⟩ := hreg have hAY_int : Integrable (fun ω => A ω * Y ω) P.μ := by simpa [A, Y] using S.integrable_treatedY_of_wMax_envelope Λ hΛ hoverlap henvY have hAYI_int : Integrable (fun ω => A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0)) P.μ := by simpa [A, Y, c] using S.integrable_treatedY_trunc_of_wMax_envelope Λ hΛ hoverlap c hc henvY have hprop_meas : Measurable[S.sigmaX] (S.propScore true) := by unfold POBackdoorSystem.propScore exact stronglyMeasurable_condExp.measurable have hwMin_smeas : StronglyMeasurable[S.sigmaX] (S.wMin Λ) := by unfold POBackdoorSystem.wMin exact (measurable_const.add ((measurable_const.sub hprop_meas).div (measurable_const.mul hprop_meas))).stronglyMeasurable have hwMax_smeas : StronglyMeasurable[S.sigmaX] (S.wMax Λ) := by unfold POBackdoorSystem.wMax exact (measurable_const.add ((measurable_const.mul (measurable_const.sub hprop_meas)).div hprop_meas)).stronglyMeasurable have hdiff_smeas : StronglyMeasurable[S.sigmaX] (fun ω => S.wMax Λ ω - S.wMin Λ ω) := (hwMax_smeas.measurable.sub hwMin_smeas.measurable).stronglyMeasurable have hmain : S.msmUpperCalib true Λ = S.candMean true (S.cutoffProp Λ c) := by simpa [c] using S.msmUpperCalib_gaussian Λ hΛ hoverlap hmodel.toGaussianTreatedModel hreg_all have hcand_split : S.candMean true (S.cutoffProp Λ c) = ∫ ω, S.wMin Λ ω * (A ω * Y ω) ∂P.μ + ∫ ω, (S.wMax Λ ω - S.wMin Λ ω) * (A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0)) ∂P.μ := by unfold POBackdoorSystem.candMean rw [← integral_add hint_candMin hint_candTrunc] refine integral_congr_ae (Filter.Eventually.of_forall ?_) intro ω by_cases hcy : c ω < Y ω · have hcy' : S.gaussianCutoff m σ Λ ω < S.factualY ω := by simpa [c, Y] using hcy simp only [c, A, Y, POBackdoorSystem.cutoffProp, if_pos hcy, if_pos hcy'] rw [div_div_eq_mul_div, div_one] ring · have hcy' : ¬S.gaussianCutoff m σ Λ ω < S.factualY ω := by simpa [c, Y] using hcy simp only [c, A, Y, POBackdoorSystem.cutoffProp, if_neg hcy, if_neg hcy'] rw [div_div_eq_mul_div, div_one] ring have hint_candTrunc_prod : Integrable ((fun ω => S.wMax Λ ω - S.wMin Λ ω) * fun ω => A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0)) P.μ := by refine hint_candTrunc.congr (Filter.Eventually.of_forall ?_) intro ω by_cases hcy : c ω < Y ω · simp [A, Y, c, hcy] · simp [A, Y, c, hcy] have hmin_pull : ∫ ω, S.wMin Λ ω * (A ω * Y ω) ∂P.μ = ∫ ω, S.wMin Λ ω * P.μ[fun ω => A ω * Y ω | S.sigmaX] ω ∂P.μ := by simpa [Pi.mul_apply] using integral_mul_condExp_eq (μ := P.μ) (m0 := S.sigmaX) S.sigmaX_le hwMin_smeas hAY_int (by exact hint_candMin) have hmin_ae : (fun ω => S.wMin Λ ω * P.μ[fun ω => A ω * Y ω | S.sigmaX] ω) =ᵐ[P.μ] fun ω => S.wMin Λ ω * (e ω * M ω) := by filter_upwards [hmodel.condMean_eq] with ω hω simpa [A, Y, e, M] using congrArg (fun t => S.wMin Λ ω * t) hω have hmin_int_eval : Integrable (fun ω => S.wMin Λ ω * (e ω * M ω)) P.μ := by have hpull : P.μ[fun ω => S.wMin Λ ω * (A ω * Y ω) | S.sigmaX] =ᵐ[P.μ] fun ω => S.wMin Λ ω * P.μ[fun ω => A ω * Y ω | S.sigmaX] ω := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hwMin_smeas (by exact hint_candMin) hAY_int exact (MeasureTheory.integrable_condExp (μ := P.μ) (m := S.sigmaX) (f := fun ω => S.wMin Λ ω * (A ω * Y ω))).congr (hpull.trans hmin_ae) have hmin_eval : ∫ ω, S.wMin Λ ω * (A ω * Y ω) ∂P.μ = ∫ ω, S.wMin Λ ω * (e ω * M ω) ∂P.μ := by rw [hmin_pull] exact integral_congr_ae hmin_ae have htrunc_pull : ∫ ω, (S.wMax Λ ω - S.wMin Λ ω) * (A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0)) ∂P.μ = ∫ ω, (S.wMax Λ ω - S.wMin Λ ω) * P.μ[fun ω => A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0) | S.sigmaX] ω ∂P.μ := by simpa [Pi.mul_apply] using integral_mul_condExp_eq (μ := P.μ) (m0 := S.sigmaX) S.sigmaX_le hdiff_smeas hAYI_int hint_candTrunc_prod have htrunc_ae : (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * P.μ[fun ω => A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0) | S.sigmaX] ω) =ᵐ[P.μ] fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (e ω * (M ω * (1 - stdNormalCDF ((c ω - M ω) / sig ω)) + sig ω * Causalean.Mathlib.stdNormalPDF ((c ω - M ω) / sig ω))) := by filter_upwards [hmodel.condTruncMean_eq c hc] with ω hω simpa [A, Y, e, M, sig] using congrArg (fun t => (S.wMax Λ ω - S.wMin Λ ω) * t) hω have htrunc_int_eval : Integrable (fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (e ω * (M ω * (1 - stdNormalCDF ((c ω - M ω) / sig ω)) + sig ω * Causalean.Mathlib.stdNormalPDF ((c ω - M ω) / sig ω)))) P.μ := by have hpull : P.μ[fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0)) | S.sigmaX] =ᵐ[P.μ] fun ω => (S.wMax Λ ω - S.wMin Λ ω) * P.μ[fun ω => A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0) | S.sigmaX] ω := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (m := S.sigmaX) (μ := P.μ) hdiff_smeas hint_candTrunc_prod hAYI_int exact (MeasureTheory.integrable_condExp (μ := P.μ) (m := S.sigmaX) (f := fun ω => (S.wMax Λ ω - S.wMin Λ ω) * (A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0)))).congr (hpull.trans htrunc_ae) have htrunc_eval : ∫ ω, (S.wMax Λ ω - S.wMin Λ ω) * (A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0)) ∂P.μ = ∫ ω, (S.wMax Λ ω - S.wMin Λ ω) * (e ω * (M ω * (1 - stdNormalCDF ((c ω - M ω) / sig ω)) + sig ω * Causalean.Mathlib.stdNormalPDF ((c ω - M ω) / sig ω))) ∂P.μ := by rw [htrunc_pull] exact integral_congr_ae htrunc_ae have hp0 : 0 < Λ / (Λ + 1) := by positivity have hp1 : Λ / (Λ + 1) < 1 := by have hΛp : 0 < Λ + 1 := by linarith rw [div_lt_one hΛp] linarith have honeMinus : 1 - Λ / (Λ + 1) = 1 / (Λ + 1) := by have hΛp : Λ + 1 ≠ 0 := by linarith field_simp [hΛp] ring have hscalar_ae : (fun ω => S.wMin Λ ω * (e ω * M ω) + (S.wMax Λ ω - S.wMin Λ ω) * (e ω * (M ω * (1 - stdNormalCDF ((c ω - M ω) / sig ω)) + sig ω * Causalean.Mathlib.stdNormalPDF ((c ω - M ω) / sig ω)))) =ᵐ[P.μ] fun ω => M ω + K * ((1 - e ω) * sig ω) := by filter_upwards [hoverlap] with ω hω have harg : (c ω - M ω) / sig ω = z := by simpa [c, M, sig, z] using S.gaussianCutoff_standardized hmodel.toGaussianTreatedModel Λ ω have hcdf : stdNormalCDF ((c ω - M ω) / sig ω) = Λ / (Λ + 1) := by rw [harg] exact Causalean.Mathlib.stdNormalCDF_probit hp0 hp1 have hpdf : Causalean.Mathlib.stdNormalPDF ((c ω - M ω) / sig ω) = Causalean.Mathlib.stdNormalPDF z := by rw [harg] have hscalar := gaussian_halfWidth_scalar Λ (e ω) (M ω) (sig ω) (Causalean.Mathlib.stdNormalPDF z) hΛ hω.1 hω.2 unfold POBackdoorSystem.wMin POBackdoorSystem.wMax rw [hcdf, hpdf, honeMinus] simpa [e, K, z, mul_assoc, mul_left_comm, mul_comm] using hscalar have hcombined : (∫ ω, S.wMin Λ ω * (e ω * M ω) ∂P.μ) + ∫ ω, (S.wMax Λ ω - S.wMin Λ ω) * (e ω * (M ω * (1 - stdNormalCDF ((c ω - M ω) / sig ω)) + sig ω * Causalean.Mathlib.stdNormalPDF ((c ω - M ω) / sig ω))) ∂P.μ = ∫ ω, M ω + K * ((1 - e ω) * sig ω) ∂P.μ := by rw [← integral_add hmin_int_eval htrunc_int_eval] exact integral_congr_ae hscalar_ae have hsplit_final : ∫ ω, M ω + K * ((1 - e ω) * sig ω) ∂P.μ = (∫ ω, M ω ∂P.μ) + K * ∫ ω, (1 - e ω) * sig ω ∂P.μ := by integral_linearity calc S.msmUpperCalib true Λ = S.candMean true (S.cutoffProp Λ c) := hmain _ = (∫ ω, S.wMin Λ ω * (A ω * Y ω) ∂P.μ) + ∫ ω, (S.wMax Λ ω - S.wMin Λ ω) * (A ω * Y ω * (if c ω < Y ω then (1 : ℝ) else 0)) ∂P.μ := hcand_split _ = (∫ ω, S.wMin Λ ω * (e ω * M ω) ∂P.μ) + ∫ ω, (S.wMax Λ ω - S.wMin Λ ω) * (e ω * (M ω * (1 - stdNormalCDF ((c ω - M ω) / sig ω)) + sig ω * Causalean.Mathlib.stdNormalPDF ((c ω - M ω) / sig ω))) ∂P.μ := by rw [hmin_eval, htrunc_eval] _ = ∫ ω, M ω + K * ((1 - e ω) * sig ω) ∂P.μ := hcombined _ = (∫ ω, M ω ∂P.μ) + K * ∫ ω, (1 - e ω) * sig ω ∂P.μ := hsplit_final -- … truncated; follow the source link for the rest …
Sharp 2 core · 0 supporting This file combines the arbitrary-model converse with reciprocal-tilt realizations of supplied upper and lower cutoff candidates. ★ msmCalib_sharp

Sharpness of the calibrated marginal sensitivity bounds

This file combines the arbitrary-model converse with reciprocal-tilt realizations of supplied upper and lower cutoff candidates. Under the explicit feasibility, overlap, integrability, and boundedness hypotheses below, the calibrated variational endpoints are the supremum and infimum of the compatible full-data treated-potential-outcome means.

def compatibleTargets reviewed
Causalean.PO.POBackdoorSystem

Given an observed backdoor system and a sensitivity level, the compatible treated means are the means of Y(1) across all compatible full-data models in the ambient universe.

Definition (Lean source)
P :
shared
γ :
Type u
shared
S :
shared
Λ :
ℝ
compatibleTargets S Λ :
Set ℝ
{θ | ∃ M : MSMDataCompatible.{u, u} S Λ, M.target = θ}
Causalean.PO.POBackdoorSystem.compatibleTargets · Causalean/PO/ID/Partial/Sensitivity/MSM/Sharp.lean:33 · uses POBackdoorSystem , POSystem
theorem msmCalib_sharp reviewed
Causalean.PO.POBackdoorSystem

Conditional sharpness from supplied cutoff realizations. Fix a sensitivity level at least one, strict observed overlap, upper and lower covariate cutoffs, upper-cutoff measurability and integrability, upper-cutoff feasibility and envelope conditions, lower-cutoff measurability and integrability, lower-cutoff feasibility and envelope conditions. If the two realized cutoff propensities additionally have uniform overlap on the treated law and produce integrable potential outcomes under their marked laws, and the calibrated candidate means are bounded below and above, then the calibrated upper and lower endpoints are respectively the supremum and infimum of the compatible full-data treated means.

Formal statement
P :
shared
γ :
Type u
shared
S :
shared
Λ :
ℝ
hΛ :
1 ≤ Λ
hoverlap :
∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1
cUpper cLower :
P.Ω → ℝ
hcUpper_meas :
Measurable[S.sigmaX] cUpper
hcUpper_int :
Integrable cUpper P.μ
hupper_mem :
S.cutoffProp Λ cUpper ∈ S.MSMSetCalib true Λ
hupper_env :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
hupper_weight_env :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hupper_c_env :
Integrable (fun ω => |cUpper ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hcLower_meas :
Measurable[S.sigmaX] cLower
hcLower_int :
Integrable cLower P.μ
hlower_mem :
S.lowerCutoffProp Λ cLower ∈ S.MSMSetCalib true Λ
hlower_env :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
hlower_weight_env :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hlower_c_env :
Integrable (fun ω => |cLower ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
hupper_uniform :
∃ ε : ℝ,
0 < ε ∧
∀ᵐ ω ∂P.μ.restrict S.treatedSet, ε
≤ S.cutoffProp Λ cUpper ω ∧ S.cutoffProp Λ cUpper ω ≤ 1 - ε
hlower_uniform :
∃ ε : ℝ,
0 < ε ∧
∀ᵐ ω ∂P.μ.restrict S.treatedSet, ε
≤ S.lowerCutoffProp Λ cLower ω ∧ S.lowerCutoffProp Λ cLower ω ≤ 1 - ε
hupper_Y1_int :
Integrable (fun p : P.Ω × Bool => S.factualY p.1) (bernoulliMarkedLaw (P.μ.restrict S.treatedSet) (S.cutoffProp Λ cUpper))
hlower_Y1_int :
Integrable (fun p : P.Ω × Bool => S.factualY p.1) (bernoulliMarkedLaw (P.μ.restrict S.treatedSet) (S.lowerCutoffProp Λ cLower))
hbddBelow :
BddBelow (S.candMean true '' S.MSMSetCalib true Λ)
hbddAbove :
BddAbove (S.candMean true '' S.MSMSetCalib true Λ)
conclusion 1
S.msmUpperCalib true Λ = sSup (S.compatibleTargets Λ)
conclusion 2
S.msmLowerCalib true Λ = sInf (S.compatibleTargets Λ)
Proof (Lean source)
theorem msmCalib_sharp [StandardBorelSpace P.Ω] (Λ : ℝ) (hΛ : 1 ≤ Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (cUpper cLower : P.Ω → ℝ) (hcUpper_meas : Measurable[S.sigmaX] cUpper) (hcUpper_int : Integrable cUpper P.μ) (hupper_mem : S.cutoffProp Λ cUpper ∈ S.MSMSetCalib true Λ) (hupper_env : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) (hupper_weight_env : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hupper_c_env : Integrable (fun ω => |cUpper ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hcLower_meas : Measurable[S.sigmaX] cLower) (hcLower_int : Integrable cLower P.μ) (hlower_mem : S.lowerCutoffProp Λ cLower ∈ S.MSMSetCalib true Λ) (hlower_env : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) (hlower_weight_env : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hlower_c_env : Integrable (fun ω => |cLower ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (hupper_uniform : ∃ ε : ℝ, 0 < ε ∧ ∀ᵐ ω ∂P.μ.restrict S.treatedSet, ε ≤ S.cutoffProp Λ cUpper ω ∧ S.cutoffProp Λ cUpper ω ≤ 1 - ε) (hlower_uniform : ∃ ε : ℝ, 0 < ε ∧ ∀ᵐ ω ∂P.μ.restrict S.treatedSet, ε ≤ S.lowerCutoffProp Λ cLower ω ∧ S.lowerCutoffProp Λ cLower ω ≤ 1 - ε) (hupper_Y1_int : Integrable (fun p : P.Ω × Bool => S.factualY p.1) (bernoulliMarkedLaw (P.μ.restrict S.treatedSet) (S.cutoffProp Λ cUpper))) (hlower_Y1_int : Integrable (fun p : P.Ω × Bool => S.factualY p.1) (bernoulliMarkedLaw (P.μ.restrict S.treatedSet) (S.lowerCutoffProp Λ cLower))) (hbddBelow : BddBelow (S.candMean true '' S.MSMSetCalib true Λ)) (hbddAbove : BddAbove (S.candMean true '' S.MSMSetCalib true Λ)) : S.msmUpperCalib true Λ = sSup (S.compatibleTargets Λ) ∧ S.msmLowerCalib true Λ = sInf (S.compatibleTargets Λ) := by have hupper_obs : S.cutoffProp Λ cUpper ∈ S.MSMSetCalibObs Λ := S.cutoffProp_mem_MSMSetCalibObs Λ cUpper hcUpper_meas hupper_mem have hlower_obs : S.lowerCutoffProp Λ cLower ∈ S.MSMSetCalibObs Λ := S.lowerCutoffProp_mem_MSMSetCalibObs Λ cLower hcLower_meas hlower_mem have hwMin_meas : Measurable (S.wMin Λ) := S.measurable_wMin Λ have hwMax_meas : Measurable (S.wMax Λ) := S.measurable_wMax Λ have hupper_meas : Measurable (S.cutoffProp Λ cUpper) := by unfold POBackdoorSystem.cutoffProp exact measurable_const.div (Measurable.ite (measurableSet_lt (hcUpper_meas.mono S.sigmaX_le le_rfl) S.measurable_factualY) hwMax_meas hwMin_meas) have hlower_meas : Measurable (S.lowerCutoffProp Λ cLower) := by unfold POBackdoorSystem.lowerCutoffProp exact measurable_const.div (Measurable.ite (measurableSet_lt (hcLower_meas.mono S.sigmaX_le le_rfl) S.measurable_factualY) hwMin_meas hwMax_meas) obtain ⟨MUpper, hMUpper⟩ := S.exists_compatible_realization Λ (S.cutoffProp Λ cUpper) (S.cutoffProp Λ cUpper) hupper_meas Filter.EventuallyEq.rfl hupper_obs hupper_uniform hupper_Y1_int obtain ⟨MLower, hMLower⟩ := S.exists_compatible_realization Λ (S.lowerCutoffProp Λ cLower) (S.lowerCutoffProp Λ cLower) hlower_meas Filter.EventuallyEq.rfl hlower_obs hlower_uniform hlower_Y1_int have hupperCut : S.candMean true (S.cutoffProp Λ cUpper) = S.msmUpperCalib true Λ := (S.msmUpperCalib_eq_cutoff Λ hΛ hoverlap cUpper hcUpper_meas hcUpper_int hupper_mem hupper_env hupper_weight_env hupper_c_env).symm have hlowerCut : S.candMean true (S.lowerCutoffProp Λ cLower) = S.msmLowerCalib true Λ := (S.msmLowerCalib_eq_cutoff Λ hΛ hoverlap cLower hcLower_meas hcLower_int hlower_mem hlower_env hlower_weight_env hlower_c_env).symm have hupperTarget : MUpper.target = S.msmUpperCalib true Λ := hMUpper.trans hupperCut have hlowerTarget : MLower.target = S.msmLowerCalib true Λ := hMLower.trans hlowerCut have hUpperMem : MUpper.target ∈ S.compatibleTargets Λ := ⟨MUpper, rfl⟩ have hLowerMem : MLower.target ∈ S.compatibleTargets Λ := ⟨MLower, rfl⟩ have hne : (S.compatibleTargets Λ).Nonempty := ⟨MUpper.target, hUpperMem⟩ have hall : ∀ θ ∈ S.compatibleTargets Λ, S.msmLowerCalib true Λ ≤ θ ∧ θ ≤ S.msmUpperCalib true Λ := by rintro θ ⟨M, rfl⟩ exact M.target_mem_Icc_msmCalib hΛ hoverlap hbddBelow hbddAbove have hTargetsAbove : BddAbove (S.compatibleTargets Λ) := ⟨S.msmUpperCalib true Λ, fun θ hθ => (hall θ hθ).2⟩ have hTargetsBelow : BddBelow (S.compatibleTargets Λ) := ⟨S.msmLowerCalib true Λ, fun θ hθ => (hall θ hθ).1⟩ constructor · apply le_antisymm · rw [← hupperTarget] exact le_csSup hTargetsAbove hUpperMem · exact csSup_le hne fun θ hθ => (hall θ hθ).2 · apply le_antisymm · exact le_csInf hne fun θ hθ => (hall θ hθ).1 · rw [← hlowerTarget] exact csInf_le hTargetsBelow hLowerMem