PO.ID.Partial.Sensitivity.MSM.Cutoff­Construct

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.

Constant­Cutoff 5 core · 10 supporting This part defines the treated push-forward law, its conditional distribution function, the calibration level, and proves the constant-cutoff conditional-survival identity. ★ treatedSurv_const_eq

Treated-law definitions and the constant-cutoff survival bridge

This part defines the treated push-forward law, its conditional distribution function, the calibration level, and proves the constant-cutoff conditional-survival identity.

def treatedSet reviewed
Causalean.PO.POBackdoorSystem

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

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

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

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
S :
shared
treatedXYLaw S :
Measure (γ × ℝ)
(P.μ.restrict S.treatedSet).map (fun ω => (S.factualX ω, S.factualY ω))
def treatedCondCDF 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 treated conditional distribution-function value is the probability that a treated 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 :
ℝ
treatedCondCDF S ω t :
ℝ
condCDF S.treatedXYLaw (S.factualX ω) t
def calibLevel 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 calibration quantile level is one minus the target treated-survival probability divided by that unit's propensity for treatment. It is the treated conditional-distribution-function level whose quantile supplies the calibrating cutoff.

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

For a potential-outcome system and measurable covariate space, a back-door system, and a fixed outcome cutoff, the conditional mean of treatment times the indicator that the outcome exceeds the cutoff equals the propensity times one minus the treated conditional distribution at that cutoff, almost surely.

Formal statement
P :
shared
γ :
Type u_1
shared
S :
shared
t :
ℝ
P.μ[fun ω => S.dVar.indicator true ω * (if t < S.factualY ω then (1 : ℝ) else 0) | S.sigmaX]
=ᵐ[P.μ] fun ω => S.propScore true ω * (1 - S.treatedCondCDF ω t)
Proof (Lean source)
theorem treatedSurv_const_eq (t : ℝ) : P.μ[fun ω => S.dVar.indicator true ω * (if t < S.factualY ω then (1 : ℝ) else 0) | S.sigmaX] =ᵐ[P.μ] fun ω => S.propScore true ω * (1 - S.treatedCondCDF ω t) := by classical have hpoint : (fun ω => S.dVar.indicator true ω * (if t < S.factualY ω then (1 : ℝ) else 0)) =ᵐ[P.μ] (fun ω => S.dVar.indicator true ω - S.dVar.indicator true ω * (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 true) (g := fun ω => S.dVar.indicator true ω * (if S.factualY ω ≤ t then (1 : ℝ) else 0)) (S.dVar.integrable_indicator true (MeasurableSet.singleton true)) (S.integrable_treated_le_indicator t) have hle_bridge := S.treatedLe_const_eq t filter_upwards [hsub, hle_bridge] with ω hsubω hleω change P.μ[S.dVar.indicator true - (fun ω => S.dVar.indicator true ω * (if S.factualY ω ≤ t then (1 : ℝ) else 0)) | S.sigmaX] ω = S.propScore true ω * (1 - S.treatedCondCDF ω t) rw [hsubω] change S.propScore true ω - P.μ[fun ω => S.dVar.indicator true ω * (if S.factualY ω ≤ t then (1 : ℝ) else 0) | S.sigmaX] ω = S.propScore true ω * (1 - S.treatedCondCDF ω t) rw [hleω] ring
10 supporting declarations (lemmas, instances)
  • exists_measurableSet_through_factualX lemma — Given a backdoor system and an event in its sample space, if the event is measurable with respect to the σ-algebra generated by the factual covariate, then it is the preimage under that covariate of some measurable covariate set.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    s :
    Set P.Ω
    hs :
    MeasurableSet[S.sigmaX] s
    ∃ B : Set γ,
    conclusion 1
    conclusion 2
    S.factualX ⁻¹' B = s
    Proof (Lean source)
    lemma exists_measurableSet_through_factualX {s : Set P.Ω} (hs : MeasurableSet[S.sigmaX] s) : ∃ B : Set γ, MeasurableSet B ∧ S.factualX ⁻¹' B = s := by rw [POBackdoorSystem.sigmaX] at hs exact MeasurableSpace.measurableSet_comap.mp hs
    Causalean.PO.POBackdoorSystem.exists_measurableSet_through_factualX · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/ConstantCutoff.lean:50
  • treatedXYLaw_eq lemma — The treated 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 treated set.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    S.treatedXYLaw = (P.μ.restrict S.treatedSet).map (fun ω => (S.factualX ω, S.factualY ω))
    Proof (Lean source)
    @[causal_defs_simps] lemma treatedXYLaw_eq : S.treatedXYLaw = (P.μ.restrict S.treatedSet).map (fun ω => (S.factualX ω, S.factualY ω)) := rfl
  • measurableSet_treatedSet lemma — For a backdoor system, the event of receiving treatment is measurable.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    MeasurableSet S.treatedSet
    Proof (Lean source)
    lemma measurableSet_treatedSet : MeasurableSet S.treatedSet := by unfold POBackdoorSystem.treatedSet exact MeasurableSet.singleton true |>.preimage S.measurable_factualD
    Causalean.PO.POBackdoorSystem.measurableSet_treatedSet · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/ConstantCutoff.lean:87
  • treated_indicator_eq lemma — For a backdoor system, the indicator of factual treatment being true equals the indicator of the treated event.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    S.dVar.indicator true = S.treatedSet.indicator (fun _ : P.Ω => (1 : ℝ))
    Proof (Lean source)
    lemma treated_indicator_eq : S.dVar.indicator true = S.treatedSet.indicator (fun _ : P.Ω => (1 : ℝ)) := by funext ω unfold POBackdoorSystem.treatedSet POVar.indicator POVar.event POBackdoorSystem.factualD rfl
    Causalean.PO.POBackdoorSystem.treated_indicator_eq · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/ConstantCutoff.lean:92
  • treatedXYLaw_fst lemma — For a backdoor system, the covariate marginal of the unnormalized treated covariate-outcome law is the factual-covariate law restricted to the treated event.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    S.treatedXYLaw.fst = (P.μ.restrict S.treatedSet).map S.factualX
    Proof (Lean source)
    lemma treatedXYLaw_fst : S.treatedXYLaw.fst = (P.μ.restrict S.treatedSet).map S.factualX := by unfold POBackdoorSystem.treatedXYLaw fst rw [MeasureTheory.Measure.map_map measurable_fst (S.measurable_factualX.prodMk S.measurable_factualY)] rfl
  • measurable_treatedCondCDF_const lemma — At a fixed outcome level, the treated 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.treatedCondCDF ω t)
    Proof (Lean source)
    @[fun_prop] lemma measurable_treatedCondCDF_const (t : ℝ) : Measurable[S.sigmaX] (fun ω => S.treatedCondCDF ω t) := by rw [POBackdoorSystem.sigmaX] unfold POBackdoorSystem.treatedCondCDF exact (ProbabilityTheory.measurable_condCDF S.treatedXYLaw t).comp (comap_measurable S.factualX)
    Causalean.PO.POBackdoorSystem.measurable_treatedCondCDF_const · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/ConstantCutoff.lean:128
  • stronglyMeasurable_treatedCondCDF_const lemma — The strongly-measurable form, for the covariate σ-algebra, of the treated conditional CDF at a fixed outcome level.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    t :
    ℝ
    StronglyMeasurable[S.sigmaX] (fun ω => S.treatedCondCDF ω t)
    Proof (Lean source)
    @[fun_prop] lemma stronglyMeasurable_treatedCondCDF_const (t : ℝ) : StronglyMeasurable[S.sigmaX] (fun ω => S.treatedCondCDF ω t) := (S.measurable_treatedCondCDF_const t).stronglyMeasurable
    Causalean.PO.POBackdoorSystem.stronglyMeasurable_treatedCondCDF_const · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/ConstantCutoff.lean:138
  • measurable_treatedCondCDF_const_ambient lemma — The treated 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.treatedCondCDF ω t)
    Proof (Lean source)
    @[fun_prop] lemma measurable_treatedCondCDF_const_ambient (t : ℝ) : Measurable (fun ω => S.treatedCondCDF ω t) := (S.measurable_treatedCondCDF_const t).mono S.sigmaX_le le_rfl
    Causalean.PO.POBackdoorSystem.measurable_treatedCondCDF_const_ambient · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/ConstantCutoff.lean:145
  • calibLevel_formulas theorem — Let e be a propensity value and write w_min = 1 + (1 − e)/(Λe) and w_max = 1 + Λ(1 − e)/e for the smallest and largest admissible inverse-propensity weights. For a sensitivity parameter Λ strictly greater than one and a propensity value strictly between 0 and 1, the upper calibration quantile level 1 − ((1 − w_min·e)/(w_max − w_min))/e equals Λ/(Λ+1), and the lower calibration quantile level 1 − ((w_max·e − 1)/(w_max − w_min))/e equals 1/(Λ+1). Neither level depends on the propensity.
    Λ e :
    ℝ
    hΛ :
    1 < Λ
    he0 :
    0 < e
    he1 :
    e < 1
    conclusion 1
    1
    - (1 - (1 + (1 - e) / (Λ * e)) * e) / (1 + Λ * (1 - e) / e - (1 + (1 - e) / (Λ * e))) / e
    = Λ / (Λ + 1)
    conclusion 2
    1 - ((1 + Λ * (1 - e) / e) * e - 1) / (1 + Λ * (1 - e) / e - (1 + (1 - e) / (Λ * e))) / e
    = 1 / (Λ + 1)
    Proof (Lean source)
    theorem calibLevel_formulas {Λ e : ℝ} (hΛ : 1 < Λ) (he0 : 0 < e) (he1 : e < 1) : 1 - (1 - (1 + (1 - e) / (Λ * e)) * e) / (1 + Λ * (1 - e) / e - (1 + (1 - e) / (Λ * e))) / e = Λ / (Λ + 1) ∧ 1 - ((1 + Λ * (1 - e) / e) * e - 1) / (1 + Λ * (1 - e) / e - (1 + (1 - e) / (Λ * e))) / e = 1 / (Λ + 1) := by have h1e : (1 - e) ≠ 0 := ne_of_gt (by linarith) have he : e ≠ 0 := ne_of_gt he0 have hΛ0 : Λ ≠ 0 := ne_of_gt (by linarith) have hΛm : Λ - 1 ≠ 0 := ne_of_gt (by linarith) have hΛp : Λ + 1 ≠ 0 := ne_of_gt (by linarith) have hden : 1 + Λ * (1 - e) / e - (1 + (1 - e) / (Λ * e)) = (1 - e) * (Λ - 1) * (Λ + 1) / (Λ * e) := by field_simp ring have hup : 1 - (1 + (1 - e) / (Λ * e)) * e = (1 - e) * (Λ - 1) / Λ := by field_simp ring have hlo : (1 + Λ * (1 - e) / e) * e - 1 = (1 - e) * (Λ - 1) := by field_simp ring rw [hden, hup, hlo] constructor · field_simp ring · field_simp ring
  • calibLevel_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 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 true ω ∧ S.propScore true ω < 1
    ∀ᵐ ω ∂P.μ, 0 < S.calibLevel Λ ω ∧ S.calibLevel Λ ω < 1
    Proof (Lean source)
    theorem calibLevel_mem_Ioo (Λ : ℝ) (hΛ : 1 < Λ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) : ∀ᵐ ω ∂P.μ, 0 < S.calibLevel Λ ω ∧ S.calibLevel Λ ω < 1 := by filter_upwards [hoverlap] with ω hω have h : S.calibLevel Λ ω = Λ / (Λ + 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)⟩
Variable­Cutoff 2 core · 8 supporting This part extends the survival bridge to covariate-measurable cutoffs, constructs a measurable calibrating conditional quantile, and obtains the calibrated upper endpoint under integrability of the calibrating cutoff. ★ exists_calibrating_cutoff★ msmUpperCalib_eq_cutoff_of_calibrating_cutoff_integrability

Variable cutoffs and calibrated MSM construction

This part extends the survival bridge to covariate-measurable cutoffs, constructs a measurable calibrating conditional quantile, and obtains the calibrated upper endpoint under integrability of the calibrating cutoff.

theorem exists_calibrating_cutoff reviewed
Causalean.PO.POBackdoorSystem

Existence of a calibrating cutoff (treated arm). Fix a sensitivity parameter Λ. Assume the treated propensity score is almost surely strictly between zero and one (two-sided overlap), that the treated-arm conditional law of the outcome given covariates is atomless, i.e. its conditional CDF is continuous, and that the calibration quantile level lies strictly between 0 and 1 almost everywhere. Then there exists an ambient-measurable cutoff function c such that the treatment-weighted conditional survival function at c agrees almost everywhere with the target survival function survTarget Λ; the cutoff is realized as the conditional quantile of the treated outcome law at the calibration level.

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.calibLevel Λ ω ∧ S.calibLevel Λ ω < 1
∃ c : P.Ω → ℝ,
conclusion 1
Measurable[S.sigmaX] c
conclusion 2
S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ
Proof (Lean source)
theorem exists_calibrating_cutoff (Λ : ℝ) (hoverlap : ∀ᵐ ω ∂P.μ, 0 < S.propScore true ω ∧ S.propScore true ω < 1) (hatomless : ∀ a : γ, Continuous (condCDF S.treatedXYLaw a)) (hlevel : ∀ᵐ ω ∂P.μ, 0 < S.calibLevel Λ ω ∧ S.calibLevel Λ ω < 1) : ∃ c : P.Ω → ℝ, Measurable[S.sigmaX] c ∧ S.treatedSurv c =ᵐ[P.μ] S.survTarget Λ := 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 unfold POBackdoorSystem.wMin exact measurable_const.add ((measurable_const.sub hprop_meas).div (measurable_const.mul hprop_meas)) have hwMax_meas : Measurable[S.sigmaX] (S.wMax Λ) := by unfold POBackdoorSystem.wMax exact measurable_const.add ((measurable_const.mul (measurable_const.sub hprop_meas)).div hprop_meas) have hsurvTarget_meas : Measurable[S.sigmaX] (S.survTarget Λ) := by unfold POBackdoorSystem.survTarget exact (measurable_const.sub (hwMin_meas.mul hprop_meas)).div (hwMax_meas.sub hwMin_meas) have hlevel_meas : Measurable[S.sigmaX] (S.calibLevel Λ) := by unfold POBackdoorSystem.calibLevel 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 · simpa [ha] using ha.1 · simp [ha] have hτ1 : ∀ a, τ a < 1 := by intro a dsimp [τ] by_cases ha : 0 < g a ∧ g a < 1 · simpa [ha] using ha.2 · 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.calibLevel Λ ω := by filter_upwards [hlevel] with ω hω have hgx : g (S.factualX ω) = S.calibLevel Λ ω := 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.calibLevel have hpos : S.propScore true ω ≠ 0 := ne_of_gt hoverlapω.1 field_simp [hpos] ring
theorem msmUpperCalib_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 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 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 sensitivity set and whose candidate inverse-probability-weighted mean equals the calibrated upper 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.survTarget Λ
then
Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ
henv :
Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ
hweight_env :
Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ
∃ c : P.Ω → ℝ,
conclusion 1
Measurable[S.sigmaX] c
conclusion 2
S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ
conclusion 3
S.msmUpperCalib true Λ = S.candMean true (S.cutoffProp Λ c)
Proof (Lean source)
theorem msmUpperCalib_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.survTarget Λ → Integrable c P.μ ∧ Integrable (fun ω => |c ω| * S.dVar.indicator true ω * S.wMax Λ ω) P.μ) (henv : Integrable (fun ω => S.dVar.indicator true ω * |S.factualY ω| * S.wMax Λ ω) P.μ) (hweight_env : Integrable (fun ω => S.dVar.indicator true ω * S.wMax Λ ω) P.μ) : ∃ c : P.Ω → ℝ, Measurable[S.sigmaX] c ∧ S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ ∧ S.msmUpperCalib true Λ = S.candMean true (S.cutoffProp Λ c) := by obtain ⟨c, hc_meas, hsurv⟩ := S.exists_calibrating_cutoff Λ hoverlap hatomless (S.calibLevel_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 hweight_env have hmin_int := S.integrable_treated_wMin_of_wMax Λ (le_of_lt hΛ) hoverlap hweight_env have hcut_mem : S.cutoffProp Λ c ∈ S.MSMSetCalib true Λ := S.cutoffProp_mem_MSMSetCalib_of_survival Λ hΛ hoverlap c hint1 hmin_int hdiff_int hsurv have heq : S.msmUpperCalib true Λ = S.candMean true (S.cutoffProp Λ c) := S.msmUpperCalib_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⟩
8 supporting declarations (lemmas, instances)
  • measurable_condCDF_variable lemma — The conditional CDF remains measurable when evaluated at a measurable cutoff.
    γ :
    Type u_1
    shared
    ρ :
    Measure (γ × ℝ)
    q :
    γ → ℝ
    hq :
    Measurable (fun a => condCDF ρ a (q a))
    Proof (Lean source)
    @[fun_prop] lemma measurable_condCDF_variable (ρ : Measure (γ × ℝ)) [IsFiniteMeasure ρ] {q : γ → ℝ} (hq : Measurable q) : Measurable (fun a => condCDF ρ a (q a)) := by classical let V : Set (γ × ℝ) := {p : γ × ℝ | p.2 ≤ q p.1} have hV : MeasurableSet V := by dsimp [V] exact measurableSet_le measurable_snd (hq.comp measurable_fst) let hf := ProbabilityTheory.isCondKernelCDF_condCDF ρ have hkern : Measurable fun a : γ => hf.toKernel (fun p : Unit × γ => condCDF ρ p.2) ((), a) (Prod.mk a ⁻¹' V) := by exact Kernel.measurable_kernel_prodMk_left' (η := hf.toKernel (fun p : Unit × γ => condCDF ρ p.2)) hV () have hfun : (fun a : γ => condCDF ρ a (q a)) = fun a => (hf.toKernel (fun p : Unit × γ => condCDF ρ p.2) ((), a) (Prod.mk a ⁻¹' V)).toReal := by funext a have hpre : Prod.mk a ⁻¹' V = Iic (q a) := by ext y simp [V] rw [hpre, ProbabilityTheory.IsCondKernelCDF.toKernel_Iic] exact (ENNReal.toReal_ofReal (ProbabilityTheory.condCDF_nonneg ρ a (q a))).symm rw [hfun] exact ENNReal.measurable_toReal.comp hkern
    Causalean.PO.POBackdoorSystem.measurable_condCDF_variable · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/VariableCutoff.lean:55
  • integrable_condCDF_variable lemma — The conditional CDF evaluated at a measurable cutoff is integrable under the first marginal.
    γ :
    Type u_1
    shared
    ρ :
    Measure (γ × ℝ)
    q :
    γ → ℝ
    hq :
    Integrable (fun a => condCDF ρ a (q a)) ρ.fst
    Proof (Lean source)
    @[fun_prop] lemma integrable_condCDF_variable (ρ : Measure (γ × ℝ)) [IsFiniteMeasure ρ] {q : γ → ℝ} (hq : Measurable q) : Integrable (fun a => condCDF ρ a (q a)) ρ.fst := by refine (integrable_const (μ := ρ.fst) (c := (1 : ℝ))).mono' (measurable_condCDF_variable ρ hq).aestronglyMeasurable ?_ exact Filter.Eventually.of_forall fun a => by rw [Real.norm_of_nonneg (ProbabilityTheory.condCDF_nonneg ρ a (q a))] exact ProbabilityTheory.condCDF_le_one ρ a (q a)
    Causalean.PO.POBackdoorSystem.integrable_condCDF_variable · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/VariableCutoff.lean:82
  • setLIntegral_condCDF_variable lemma — Set-lintegral form of the conditional CDF identity at a measurable variable cutoff.
    γ :
    Type u_1
    shared
    ρ :
    Measure (γ × ℝ)
    B :
    Set γ
    hB :
    q :
    γ → ℝ
    hq :
    ∫⁻ a in B, ofReal (condCDF ρ a (q a)) ∂ρ.fst
    = ρ {p : γ × ℝ | p.1 ∈ B ∧ p.2 ≤ q p.1}
    Proof (Lean source)
    lemma setLIntegral_condCDF_variable (ρ : Measure (γ × ℝ)) [IsFiniteMeasure ρ] {B : Set γ} (hB : MeasurableSet B) {q : γ → ℝ} (hq : Measurable q) : ∫⁻ a in B, ofReal (condCDF ρ a (q a)) ∂ρ.fst = ρ {p : γ × ℝ | p.1 ∈ B ∧ p.2 ≤ q p.1} := by classical let V : Set (γ × ℝ) := {p : γ × ℝ | p.1 ∈ B ∧ p.2 ≤ q p.1} have hV : MeasurableSet V := by dsimp [V] exact (hB.preimage measurable_fst).inter (measurableSet_le measurable_snd (hq.comp measurable_fst)) let hf := ProbabilityTheory.isCondKernelCDF_condCDF ρ have hmem := ProbabilityTheory.lintegral_toKernel_mem (κ := Kernel.const Unit ρ) (ν := Kernel.const Unit ρ.fst) (f := fun p : Unit × γ => condCDF ρ p.2) hf () hV have hpoint : ∀ a : γ, hf.toKernel (fun p : Unit × γ => condCDF ρ p.2) ((), a) (Prod.mk a ⁻¹' V) = B.indicator (fun a => ofReal (condCDF ρ a (q a))) a := by intro a by_cases ha : a ∈ B · have hpre : Prod.mk a ⁻¹' V = Iic (q a) := by ext y simp [V, ha] rw [hpre, ProbabilityTheory.IsCondKernelCDF.toKernel_Iic] simp [Set.indicator_of_mem ha] · have hpre : Prod.mk a ⁻¹' V = ∅ := by ext y simp [V, ha] rw [hpre] simp [Set.indicator_of_notMem ha] calc ∫⁻ a in B, ofReal (condCDF ρ a (q a)) ∂ρ.fst = ∫⁻ a, B.indicator (fun a => ofReal (condCDF ρ a (q a))) a ∂ρ.fst := by exact (MeasureTheory.lintegral_indicator hB _).symm _ = ∫⁻ a, hf.toKernel (fun p : Unit × γ => condCDF ρ p.2) ((), a) (Prod.mk a ⁻¹' V) ∂(Kernel.const Unit ρ.fst ()) := by simp only [Kernel.const_apply] exact lintegral_congr_ae (Filter.Eventually.of_forall fun a => (hpoint a).symm) _ = Kernel.const Unit ρ () V := hmem _ = ρ V := by simp
    Causalean.PO.POBackdoorSystem.setLIntegral_condCDF_variable · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/VariableCutoff.lean:94
  • measurable_treatedCondCDF_variable lemma — Evaluated at a cutoff that itself depends on the unit only through the observed covariate, the treated 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.treatedCondCDF ω (c ω))
    Proof (Lean source)
    @[fun_prop] lemma measurable_treatedCondCDF_variable (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) : Measurable[S.sigmaX] (fun ω => S.treatedCondCDF ω (c ω)) := by obtain ⟨q, hq, hc_eq⟩ := S.exists_factor_through_factualX_private hc haveI : IsFiniteMeasure S.treatedXYLaw := by unfold POBackdoorSystem.treatedXYLaw infer_instance rw [POBackdoorSystem.sigmaX, hc_eq] unfold POBackdoorSystem.treatedCondCDF exact (measurable_condCDF_variable S.treatedXYLaw hq).comp (comap_measurable S.factualX)
    Causalean.PO.POBackdoorSystem.measurable_treatedCondCDF_variable · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/VariableCutoff.lean:172
  • stronglyMeasurable_treatedCondCDF_variable lemma — The strongly-measurable form, for the covariate σ-algebra, of the treated 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.treatedCondCDF ω (c ω))
    Proof (Lean source)
    @[fun_prop] lemma stronglyMeasurable_treatedCondCDF_variable (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) : StronglyMeasurable[S.sigmaX] (fun ω => S.treatedCondCDF ω (c ω)) := (S.measurable_treatedCondCDF_variable c hc).stronglyMeasurable
    Causalean.PO.POBackdoorSystem.stronglyMeasurable_treatedCondCDF_variable · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/VariableCutoff.lean:187
  • measurable_treatedCondCDF_variable_ambient lemma — The treated 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.treatedCondCDF ω (c ω))
    Proof (Lean source)
    @[fun_prop] lemma measurable_treatedCondCDF_variable_ambient (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) : Measurable (fun ω => S.treatedCondCDF ω (c ω)) := (S.measurable_treatedCondCDF_variable c hc).mono S.sigmaX_le le_rfl
    Causalean.PO.POBackdoorSystem.measurable_treatedCondCDF_variable_ambient · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/VariableCutoff.lean:195
  • treatedSurv_eq theorem — The survival bridge (functional cutoff). The version of treatedSurv_const_eq evaluated at a σ(X)-measurable cutoff c: E[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_cutoff.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    c :
    P.Ω → ℝ
    hc :
    Measurable[S.sigmaX] c
    S.treatedSurv c =ᵐ[P.μ] fun ω => S.propScore true ω * (1 - S.treatedCondCDF ω (c ω))
    Proof (Lean source)
    theorem treatedSurv_eq (c : P.Ω → ℝ) (hc : Measurable[S.sigmaX] c) : S.treatedSurv c =ᵐ[P.μ] fun ω => S.propScore true ω * (1 - S.treatedCondCDF ω (c ω)) := by classical unfold POBackdoorSystem.treatedSurv have hpoint : (fun ω => S.dVar.indicator true ω * (if c ω < S.factualY ω then (1 : ℝ) else 0)) =ᵐ[P.μ] (fun ω => S.dVar.indicator true ω - S.dVar.indicator true ω * (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 true) (g := fun ω => S.dVar.indicator true ω * (if S.factualY ω ≤ c ω then (1 : ℝ) else 0)) (S.dVar.integrable_indicator true (MeasurableSet.singleton true)) (S.integrable_treated_le_indicator_variable c hc) have hle_bridge := S.treatedLe_eq c hc filter_upwards [hsub, hle_bridge] with ω hsubω hleω change P.μ[S.dVar.indicator true - (fun ω => S.dVar.indicator true ω * (if S.factualY ω ≤ c ω then (1 : ℝ) else 0)) | S.sigmaX] ω = S.propScore true ω * (1 - S.treatedCondCDF ω (c ω)) rw [hsubω] change S.propScore true ω - P.μ[fun ω => S.dVar.indicator true ω * (if S.factualY ω ≤ c ω then (1 : ℝ) else 0) | S.sigmaX] ω = S.propScore true ω * (1 - S.treatedCondCDF ω (c ω)) rw [hleω] ring
  • exists_factor_through_factualX theorem — σ(X)-measurable functions factor through X. If f is σ(X)-measurable then f = g ∘ X for a measurable g : γ → ℝ. This is standard comap factorization: the conditioning is on the value of X.
    P :
    shared
    γ :
    Type u_1
    shared
    S :
    shared
    f :
    P.Ω → ℝ
    hf :
    Measurable[S.sigmaX] f
    ∃ g : γ → ℝ,
    conclusion 1
    conclusion 2
    f = fun ω => g (S.factualX ω)
    Proof (Lean source)
    theorem exists_factor_through_factualX {f : P.Ω → ℝ} (hf : Measurable[S.sigmaX] f) : ∃ g : γ → ℝ, Measurable g ∧ f = fun ω => g (S.factualX ω) := by rw [POBackdoorSystem.sigmaX] at hf obtain ⟨g, hg, hfg⟩ := hf.exists_eq_measurable_comp (f := S.factualX) exact ⟨g, hg, by simpa [Function.comp_def] using hfg⟩
    Causalean.PO.POBackdoorSystem.exists_factor_through_factualX · Causalean/PO/ID/Partial/Sensitivity/MSM/CutoffConstruct/VariableCutoff.lean:445