Estimation.ATT.Score

AIPW score infrastructure for ATT DML: treated-effect moments, influence functions, finite variance, mean-zero facts, L2 continuity, and arm-specific pull-out lemmas.

AIPWMoment 7 core · 12 supporting Defines the value-space ingredients for ATT augmented inverse-probability weighting. ★ H_ε_overlap_P_Z

Defines the value-space ingredients for ATT augmented inverse-probability weighting. The file introduces the un-normalized moment aipwMomentATT, the truth influence function ψ_ATT, the nuisance vector TreatedNuisanceVec with componentwise vector-space structure, the true nuisance η₀, and the one-sided overlap class H_ε.

It also provides measurability and law-transport helpers, including H_ε_overlap_factualX, H_ε_overlap_P_Z, aipwMomentATTFunctional, and measurable_aipwMomentATTFunctional, used by the mean-zero, finite-variance, remainder, and score-continuity modules.

def aipwMomentATT reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

Given a measurable covariate space, an observed covariate, treatment, and outcome triple, a control-arm outcome-regression function, a propensity-score function, and a real candidate effect on the treated, the unnormalized augmented inverse-probability-weighting moment for the average treatment effect on the treated is the treated residual minus the odds-weighted control residual minus the treated indicator times the candidate effect.

Definition (Lean source)
γ :
Type u_1
shared
z :
γ × Bool × ℝ
μ₀_fn :
γ → ℝ
e_fn :
γ → ℝ
θ :
aipwMomentATT z μ₀_fn e_fn θ :
indA z * (projY z - μ₀_fn (projX z))
- (1 - indA z) * (e_fn (projX z) / (1 - e_fn (projX z))) * (projY z - μ₀_fn (projX z))
- indA z * θ
Causalean.Estimation.ATT.TreatedEstimationSystem.aipwMomentATT · Causalean/Estimation/ATT/Score/AIPWMoment.lean:53
def ψ_ATT reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

For a potential-outcome system with a measurable covariate space, a treated estimation system, and an observed covariate, treatment, and outcome triple, the ATT AIPW influence-function value is the unnormalized true-nuisance moment at zero, divided by the population treatment probability and centered at the true average treatment effect on the treated.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
z :
γ × Bool × ℝ
ψ_ATT S z :
(1 / S.π_val) * aipwMomentATT z S.μ₀_val S.e_val 0 - S.θ₀
Causalean.Estimation.ATT.TreatedEstimationSystem.ψ_ATT · Causalean/Estimation/ATT/Score/AIPWMoment.lean:90 · uses TreatedEstimationSystem , POSystem
structure TreatedNuisanceVec reviewed
Causalean.Estimation.ATT

A pair of value-space ATT nuisance functions, used as the abstract nuisance space for the ATT AIPW moment functional: the control-arm outcome regression and a propensity score, together with their measurability.

Definition (Lean source)
γ :
μ₀_fn :
γ → ℝ
e_fn :
γ → ℝ
μ₀_meas :
Measurable μ₀_fn
e_meas :
Causalean.Estimation.ATT.TreatedNuisanceVec · Causalean/Estimation/ATT/Score/AIPWMoment.lean:114
def η₀ reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

For a potential-outcome system with a measurable covariate space and a treated estimation system, the true ATT nuisance pair consists of that system's control-arm outcome regression and propensity-score functions.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
η₀ S :
⟨S.μ₀_val, S.e_val, S.μ₀_meas, S.e_meas⟩
def H_ε reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

For a potential-outcome system with a measurable covariate space, a treated estimation system, and a real overlap margin, the ATT nuisance class consists exactly of nuisance pairs for which the propensity score is at most 1ε1-ε for almost every covariate, the control-arm outcome regression is square-integrable under the covariate distribution, and the propensity score is essentially bounded under that distribution.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
ε :
H_ε S ε :
{ η | (∀ᵐ x ∂S.P_X, η.e_fn x ≤ 1 - ε) ∧ MemLp η.μ₀_fn 2 S.P_X ∧ MemLp η.e_fn ⊤ S.P_X }
lemma H_ε_overlap_P_Z reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

Overlap transports to the joint data law. For a candidate nuisance pair lying in the ATT overlap-bounded realization set H_ε, in particular satisfying the one-sided upper overlap bound η.e_fn ≤ 1 − ε almost everywhere on the covariates, the same bound holds almost everywhere under the joint law of the covariates, treatment, and outcome, once the candidate propensity is evaluated at the covariate projection of the data triple.

Formal statement
P :
shared
γ :
Type u_1
shared
ε :
:
η ∈ H_ε S ε
∀ᵐ z ∂S.P_Z, η.e_fn (projX z) ≤ 1 - ε
Proof (Lean source)
lemma H_ε_overlap_P_Z (S : TreatedEstimationSystem P γ) {ε : ℝ} {η : TreatedNuisanceVec γ} (hη : η ∈ H_ε S ε) : ∀ᵐ z ∂S.P_Z, η.e_fn (projX z) ≤ 1 - ε := by open Causalean.Estimation.ATE.BackdoorEstimationSystem in have hset : MeasurableSet {x : γ | η.e_fn x ≤ 1 - ε} := by exact measurableSet_Iic.preimage η.e_meas have hx : ∀ᵐ x ∂S.P_X, η.e_fn x ≤ 1 - ε := hη.1 rw [← TreatedEstimationSystem.P_Z_map_projX_eq_P_X S] at hx have hproj : Measurable (fun z : γ × Bool × ℝ => projX z) := by simpa [projX] using (measurable_fst : Measurable (fun z : γ × Bool × ℝ => z.1)) exact (MeasureTheory.ae_map_iff hproj.aemeasurable hset).mp hx
def aipwMomentATTFunctional reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

Given a measurable covariate space, the ATT AIPW moment functional maps a nuisance pair, an observed covariate-treatment-outcome triple, and a candidate effect on the treated to the corresponding unnormalized ATT AIPW moment.

Definition (Lean source)
γ :
Type u_1
shared
aipwMomentATTFunctional :
TreatedNuisanceVec γ → (γ × Bool × ℝ) → ℝ → ℝ
fun η z θ => aipwMomentATT z η.μ₀_fn η.e_fn θ
Causalean.Estimation.ATT.TreatedEstimationSystem.aipwMomentATTFunctional · Causalean/Estimation/ATT/Score/AIPWMoment.lean:339 · uses TreatedNuisanceVec
12 supporting declarations (lemmas, instances)
  • aipwMomentATT_eq lemma — The augmented inverse-probability-weighting moment for the effect on the treated, at a data point, a nuisance pair, and a parameter value, is the treated outcome residual against the control regression, minus the odds-weighted control outcome residual, minus the parameter value on the treated.
    γ :
    Type u_1
    shared
    z :
    γ × Bool × ℝ
    μ₀_fn :
    γ → ℝ
    e_fn :
    γ → ℝ
    θ :
    aipwMomentATT z μ₀_fn e_fn θ
    = indA z * (projY z - μ₀_fn (projX z))
    - (1 - indA z) * (e_fn (projX z) / (1 - e_fn (projX z))) * (projY z - μ₀_fn (projX z))
    - indA z * θ
    Proof (Lean source)
    @[causal_defs_simps] lemma aipwMomentATT_eq (z : γ × Bool × ℝ) (μ₀_fn : γ → ℝ) (e_fn : γ → ℝ) (θ : ℝ) : aipwMomentATT z μ₀_fn e_fn θ = indA z * (projY z - μ₀_fn (projX z)) - (1 - indA z) * (e_fn (projX z) / (1 - e_fn (projX z))) * (projY z - μ₀_fn (projX z)) - indA z * θ := rfl
    Causalean.Estimation.ATT.TreatedEstimationSystem.aipwMomentATT_eq · Causalean/Estimation/ATT/Score/AIPWMoment.lean:76
  • instZero instance — For a measurable covariate space, the zero operation on ATT nuisance vectors sets the control-arm outcome regression and the propensity score to zero.
    γ :
    Type u_1
    shared
    instZero :
    zero := ⟨fun _ => 0, fun _ => 0, measurable_const, measurable_const⟩
    Causalean.Estimation.ATT.TreatedNuisanceVec.instZero · Causalean/Estimation/ATT/Score/AIPWMoment.lean:129
  • instAdd instance — For a measurable covariate space, the addition operation on ATT nuisance vectors is componentwise addition of the control-arm outcome regression and propensity score.
    γ :
    Type u_1
    shared
    instAdd :
    add η η' := ⟨fun x
    => η.μ₀_fn x
    + η'.μ₀_fn x, fun x => η.e_fn x
    + η'.e_fn x, η.μ₀_meas.add η'.μ₀_meas, η.e_meas.add η'.e_meas⟩
    Causalean.Estimation.ATT.TreatedNuisanceVec.instAdd · Causalean/Estimation/ATT/Score/AIPWMoment.lean:134
  • instNeg instance — For a measurable covariate space, the negation operation on ATT nuisance vectors negates the control-arm outcome regression and propensity score.
    γ :
    Type u_1
    shared
    instNeg :
    neg η := ⟨fun x => -η.μ₀_fn x, fun x => -η.e_fn x, η.μ₀_meas.neg, η.e_meas.neg⟩
    Causalean.Estimation.ATT.TreatedNuisanceVec.instNeg · Causalean/Estimation/ATT/Score/AIPWMoment.lean:143
  • instSub instance — For a measurable covariate space, the subtraction operation on ATT nuisance vectors is componentwise subtraction of the control-arm outcome regression and propensity score.
    γ :
    Type u_1
    shared
    instSub :
    sub η η' := ⟨fun x
    => η.μ₀_fn x
    - η'.μ₀_fn x, fun x => η.e_fn x
    - η'.e_fn x, η.μ₀_meas.sub η'.μ₀_meas, η.e_meas.sub η'.e_meas⟩
    Causalean.Estimation.ATT.TreatedNuisanceVec.instSub · Causalean/Estimation/ATT/Score/AIPWMoment.lean:150
  • instSMulReal instance — For a measurable covariate space, the real scalar-multiplication operation on ATT nuisance vectors scales the control-arm outcome regression and propensity score.
    γ :
    Type u_1
    shared
    instSMulReal :
    smul t η := ⟨fun x
    => t * η.μ₀_fn x, fun x => t * η.e_fn x, measurable_const.mul η.μ₀_meas, measurable_const.mul η.e_meas⟩
    Causalean.Estimation.ATT.TreatedNuisanceVec.instSMulReal · Causalean/Estimation/ATT/Score/AIPWMoment.lean:159
  • ext theorem — Two treated-nuisance vectors are equal when their control regressions and propensity functions agree everywhere.
    γ :
    shared
    :
    ∀ x, η.μ₀_fn x = η'.μ₀_fn x
    he :
    ∀ x, η.e_fn x = η'.e_fn x
    η = η'
    Proof (Lean source)
    @[ext] theorem ext {η η' : TreatedNuisanceVec γ} (hμ : ∀ x, η.μ₀_fn x = η'.μ₀_fn x) (he : ∀ x, η.e_fn x = η'.e_fn x) : η = η' := by cases η cases η' simp only at hμ he congr · funext x exact hμ x · funext x exact he x
    Causalean.Estimation.ATT.TreatedNuisanceVec.ext · Causalean/Estimation/ATT/Score/AIPWMoment.lean:167
  • ext_iff theorem
    ∀ {γ : Type u_1} [inst : MeasurableSpace γ] {η η' : TreatedNuisanceVec γ}, η = η' ↔ (∀ (x : γ), η.μ₀_fn x = η'.μ₀_fn x) ∧ ∀ (x : γ), η.e_fn x = η'.e_fn x
    Proof (Lean source)
    @[ext]
    Causalean.Estimation.ATT.TreatedNuisanceVec.ext_iff · Causalean/Estimation/ATT/Score/AIPWMoment.lean:168
  • instAddCommGroup instance — For a measurable covariate space, the additive commutative group structure on ATT nuisance vectors uses the zero vector, componentwise addition, componentwise negation, componentwise subtraction, natural-number scalar multiplication, and integer scalar multiplication, and satisfies the natural-zero rule, the natural-successor rule, the integer-zero rule, the positive-integer-successor rule, the negative-integer-successor rule, subtraction as addition of an inverse, associativity, the left-zero law, the right-zero law, inverse cancellation, and commutativity.
    γ :
    Type u_1
    shared
    instAddCommGroup :
    clause 1
    zero := 0
    clause 2
    add := (· + ·)
    clause 3
    neg := neg
    clause 4
    sub := Sub.sub
    clause 5
    nsmul := nsmulRec
    clause 6
    zsmul := zsmulRec
    clause 7
    nsmul_zero η := by rfl
    clause 8
    nsmul_succ n η := by rfl
    clause 9
    zsmul_zero' η := by rfl
    clause 10
    zsmul_succ' n η := by rfl
    clause 11
    zsmul_neg' n η := by rfl
    clause 12
    sub_eq_add_neg η η' := by apply ext · intro x; exact sub_eq_add_neg (η.μ₀_fn x) (η'.μ₀_fn x) · intro x; exact sub_eq_add_neg (η.e_fn x) (η'.e_fn x)
    clause 13
    add_assoc η η' η'' := by apply ext · intro x; exact add_assoc (η.μ₀_fn x) (η'.μ₀_fn x) (η''.μ₀_fn x) · intro x; exact add_assoc (η.e_fn x) (η'.e_fn x) (η''.e_fn x)
    clause 14
    zero_add η := by apply ext · intro x; exact zero_add (η.μ₀_fn x) · intro x; exact zero_add (η.e_fn x)
    clause 15
    add_zero η := by apply ext · intro x; exact add_zero (η.μ₀_fn x) · intro x; exact add_zero (η.e_fn x)
    clause 16
    neg_add_cancel η := by apply ext · intro x; exact neg_add_cancel (η.μ₀_fn x) · intro x; exact neg_add_cancel (η.e_fn x)
    clause 17
    add_comm η η' := by apply ext · intro x; exact add_comm (η.μ₀_fn x) (η'.μ₀_fn x) · intro x; exact add_comm (η.e_fn x) (η'.e_fn x)
    Causalean.Estimation.ATT.TreatedNuisanceVec.instAddCommGroup · Causalean/Estimation/ATT/Score/AIPWMoment.lean:181
  • instModuleReal instance — For a measurable covariate space, the real vector-space structure on ATT nuisance vectors uses componentwise scalar multiplication and satisfies multiplication by one, compatibility of successive scalar multiplications, multiplication of zero vectors, distribution over vector addition, distribution over scalar addition, and multiplication by the zero scalar.
    γ :
    Type u_1
    shared
    instModuleReal :
    clause 1
    smul := (· • ·)
    clause 2
    one_smul η := by apply ext · intro x change (1 : ℝ) * η.μ₀_fn x
    = η.μ₀_fn x exact one_mul _ · intro x change (1 : ℝ) * η.e_fn x = η.e_fn x exact one_mul _
    clause 3
    mul_smul t u η := by apply ext · intro x change (t * u) * η.μ₀_fn x
    = t * (u * η.μ₀_fn x) ring · intro x change (t * u) * η.e_fn x = t * (u * η.e_fn x) ring
    clause 4
    smul_zero t := by apply ext · intro x change t * (0 : ℝ)
    = 0 exact mul_zero t · intro x change t * (0 : ℝ) = 0 exact mul_zero t
    clause 5
    smul_add t η η' := by apply ext · intro x change t * (η.μ₀_fn x + η'.μ₀_fn x)
    = t * η.μ₀_fn x
    + t * η'.μ₀_fn x ring · intro x change t * (η.e_fn x + η'.e_fn x) = t * η.e_fn x
    + t * η'.e_fn x ring
    clause 6
    add_smul t u η := by apply ext · intro x change (t + u) * η.μ₀_fn x
    = t * η.μ₀_fn x
    + u * η.μ₀_fn x ring · intro x change (t + u) * η.e_fn x = t * η.e_fn x
    + u * η.e_fn x ring
    clause 7
    zero_smul η := by apply ext · intro x change (0 : ℝ) * η.μ₀_fn x
    = 0 exact zero_mul _ · intro x change (0 : ℝ) * η.e_fn x = 0 exact zero_mul _
    Causalean.Estimation.ATT.TreatedNuisanceVec.instModuleReal · Causalean/Estimation/ATT/Score/AIPWMoment.lean:221
  • H_ε_overlap_factualX lemma — Membership in the ATT H_ε transports the one-sided a.e. overlap bound to the original probability space along the observed covariate.
    P :
    shared
    γ :
    Type u_1
    shared
    ε :
    :
    η ∈ H_ε S ε
    ∀ᵐ ω ∂P.μ, η.e_fn (S.toPOBackdoorSystem.factualX ω) ≤ 1 - ε
    Proof (Lean source)
    lemma H_ε_overlap_factualX (S : TreatedEstimationSystem P γ) {ε : ℝ} {η : TreatedNuisanceVec γ} (hη : η ∈ H_ε S ε) : ∀ᵐ ω ∂P.μ, η.e_fn (S.toPOBackdoorSystem.factualX ω) ≤ 1 - ε := by have hset : MeasurableSet {x : γ | η.e_fn x ≤ 1 - ε} := by exact measurableSet_Iic.preimage η.e_meas have hx : ∀ᵐ x ∂S.P_X, η.e_fn x ≤ 1 - ε := hη.1 unfold TreatedEstimationSystem.P_X at hx exact (MeasureTheory.ae_map_iff S.toPOBackdoorSystem.measurable_factualX.aemeasurable hset).mp hx
    Causalean.Estimation.ATT.TreatedEstimationSystem.H_ε_overlap_factualX · Causalean/Estimation/ATT/Score/AIPWMoment.lean:306
  • measurable_aipwMomentATTFunctional lemma — Measurability of the ATT AIPW moment functional in the data variable z.
    γ :
    Type u_1
    shared
    θ :
    Proof (Lean source)
    @[fun_prop] lemma measurable_aipwMomentATTFunctional (η : TreatedNuisanceVec γ) (θ : ℝ) : Measurable (fun z => aipwMomentATTFunctional η z θ) := by unfold aipwMomentATTFunctional aipwMomentATT have hX : Measurable (projX : γ × Bool × ℝ → γ) := by unfold projX; fun_prop have hA : Measurable (projA : γ × Bool × ℝ → Bool) := by unfold projA; fun_prop have hY : Measurable (projY : γ × Bool × ℝ → ℝ) := by unfold projY; fun_prop have hindA : Measurable (indA : γ × Bool × ℝ → ℝ) := by unfold indA refine Measurable.ite ?_ measurable_const measurable_const exact hA (MeasurableSet.singleton true) have hμ₀X : Measurable (fun z : γ × Bool × ℝ => η.μ₀_fn (projX z)) := η.μ₀_meas.comp hX have heX : Measurable (fun z : γ × Bool × ℝ => η.e_fn (projX z)) := η.e_meas.comp hX refine Measurable.sub ?_ (hindA.mul measurable_const) refine Measurable.sub ?_ ?_ · exact hindA.mul (hY.sub hμ₀X) · refine mul (mul ?_ ?_) (hY.sub hμ₀X) · exact (measurable_const.sub hindA) · exact heX.div (measurable_const.sub heX)
    Causalean.Estimation.ATT.TreatedEstimationSystem.measurable_aipwMomentATTFunctional · Causalean/Estimation/ATT/Score/AIPWMoment.lean:349
AIPWScore­L2 3 core · 1 supporting Proves L²(P_Z) continuity bounds for the ATT AIPW score as the nuisance functions vary. ★ aipw_score_diff_isLittleOp_one_ATT

Proves L²(P_Z) continuity bounds for the ATT AIPW score as the nuisance functions vary. The pointwise constant K_AIPW_ATT controls the Lipschitz bound aipw_score_lipschitz_ATT on the a.e. one-sided-overlap class H_ε.

The file also defines the residual square YMuVal_residual_sq_ATT and proves the headline stochastic-continuity theorem aipw_score_diff_isLittleOp_one_ATT: if the control-regression and propensity errors are individually o_p(1) in L²(P_X), then the AIPW score difference is o_p(1) in L²(P_Z). This is the empirical-process input for ATT double machine learning.

def K_AIPW_ATT reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

For every real overlap margin, the ATT AIPW Lipschitz constant is 1+2/ε+2/ε21 + 2/ε + 2/ε^2.

Definition (Lean source)
ε :
K_AIPW_ATT ε :
1 + 2 / ε + 2 / ε ^ 2
Causalean.Estimation.ATT.TreatedEstimationSystem.K_AIPW_ATT · Causalean/Estimation/ATT/Score/AIPWScoreL2.lean:76
def YMuVal_residual_sq_ATT reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

For a potential-outcome system with a measurable covariate space, a treated estimation system, and an observed covariate, treatment, and outcome triple, the squared ATT control-regression residual is the square of the observed outcome minus the true control-arm outcome regression evaluated at the observed covariate.

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
YMuVal_residual_sq_ATT S :
(γ × Bool × ℝ) → ℝ
fun z => (projY z - S.μ₀_val (projX z)) ^ 2
Causalean.Estimation.ATT.TreatedEstimationSystem.YMuVal_residual_sq_ATT · Causalean/Estimation/ATT/Score/AIPWScoreL2.lean:284 · uses TreatedEstimationSystem , POSystem
theorem aipw_score_diff_isLittleOp_one_ATT reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

Headline L²(P_Z) o_p(1) continuity bound for the ATT AIPW score. Fix a sequence of random candidate nuisance pairs indexed by sample size. Under one-sided overlap ε on the true propensity, membership of the truth nuisance in the overlap-bounded realization set H_ε, nonnegativity of the true propensity, the one-sided back-door ATT assumptions, square-integrability of the factual outcome and of the untreated potential outcome Y(0): if every draw of the candidate lies in the overlap-bounded realization set H_ε, every candidate propensity is nonnegative, each candidate control-regression error admits an L²(P_X) witness, each candidate propensity error admits an L²(P_X) witness, the control-regression error rate is o_p(1) in L²(P_X), and the propensity error rate is o_p(1) in L²(P_X), then the L²(P_Z) distance between the ATT AIPW score evaluated at the random candidate nuisance and at the truth nuisance is o_p(1).

Formal statement
P :
shared
γ :
Type u_1
shared
ε :
h_overlap :
S.OneSidedOverlap ε
hη₀_mem :
S.η₀ ∈ H_ε S ε
h_e_lb :
∀ x, 0 ≤ S.e_val x
hA :
S.toPOBackdoorSystem.ATTAssumptions
h_y2 :
Integrable (fun ω => (S.toPOBackdoorSystem.factualY ω) ^ 2) P.μ
h_y0_2 :
Integrable (fun ω => (S.toPOBackdoorSystem.YofD false ω) ^ 2) P.μ
η_hat :
ℕ → P.Ω → TreatedNuisanceVec γ
h_in_Hε :
∀ n ω, η_hat n ω ∈ H_ε S ε
h_e_lb_hat :
∀ n ω x, 0 ≤ (η_hat n ω).e_fn x
h_mu_memLp :
∀ n ω, MemLp (fun x => (η_hat n ω).μ₀_fn x - S.μ₀_val x) 2 S.P_X
h_e_memLp :
∀ n ω, MemLp (fun x => (η_hat n ω).e_fn x - S.e_val x) 2 S.P_X
h_mu_diff :
IsLittleOp (fun n ω => (eLpNorm (fun x => (η_hat n ω).μ₀_fn x - S.μ₀_val x) 2 S.P_X).toReal) (fun _ => (1 : ℝ)) P.μ
h_e_diff :
IsLittleOp (fun n ω => (eLpNorm (fun x => (η_hat n ω).e_fn x - S.e_val x) 2 S.P_X).toReal) (fun _ => (1 : ℝ)) P.μ
IsLittleOp (fun n ω => (eLpNorm (fun z => aipwMomentATTFunctional (η_hat n ω) z S.θ₀ - aipwMomentATTFunctional S.η₀ z S.θ₀) 2 S.P_Z).toReal) (fun _ => (1 : ℝ)) P.μ
Proof (Lean source)
theorem aipw_score_diff_isLittleOp_one_ATT (S : TreatedEstimationSystem P γ) {ε : ℝ} (h_overlap : S.OneSidedOverlap ε) (hη₀_mem : S.η₀ ∈ H_ε S ε) (h_e_lb : ∀ x, 0 ≤ S.e_val x) (hA : S.toPOBackdoorSystem.ATTAssumptions) (h_y2 : Integrable (fun ω => (S.toPOBackdoorSystem.factualY ω) ^ 2) P.μ) (h_y0_2 : Integrable (fun ω => (S.toPOBackdoorSystem.YofD false ω) ^ 2) P.μ) (η_hat : ℕ → P.Ω → TreatedNuisanceVec γ) (h_in_Hε : ∀ n ω, η_hat n ω ∈ H_ε S ε) (h_e_lb_hat : ∀ n ω x, 0 ≤ (η_hat n ω).e_fn x) (h_mu_memLp : ∀ n ω, MemLp (fun x => (η_hat n ω).μ₀_fn x - S.μ₀_val x) 2 S.P_X) (h_e_memLp : ∀ n ω, MemLp (fun x => (η_hat n ω).e_fn x - S.e_val x) 2 S.P_X) (h_mu_diff : IsLittleOp (fun n ω => (eLpNorm (fun x => (η_hat n ω).μ₀_fn x - S.μ₀_val x) 2 S.P_X).toReal) (fun _ => (1 : ℝ)) P.μ) (h_e_diff : IsLittleOp (fun n ω => (eLpNorm (fun x => (η_hat n ω).e_fn x - S.e_val x) 2 S.P_X).toReal) (fun _ => (1 : ℝ)) P.μ) : IsLittleOp (fun n ω => (eLpNorm (fun z => aipwMomentATTFunctional (η_hat n ω) z S.θ₀ - aipwMomentATTFunctional S.η₀ z S.θ₀) 2 S.P_Z).toReal) (fun _ => (1 : ℝ)) P.μ := by classical rcases h_overlap with ⟨hε_pos, hε_half, hprop⟩ let R : (γ × Bool × ℝ) → ℝ := fun z => |projY z - S.μ₀_val (projX z)| let dμZ : ℕ → P.Ω → (γ × Bool × ℝ) → ℝ := fun n ω z => (η_hat n ω).μ₀_fn (projX z) - S.μ₀_val (projX z) let deZ : ℕ → P.Ω → (γ × Bool × ℝ) → ℝ := fun n ω z => (η_hat n ω).e_fn (projX z) - S.e_val (projX z) let cross : ℕ → P.Ω → (γ × Bool × ℝ) → ℝ := fun n ω z => R z * |deZ n ω z| let score : ℕ → P.Ω → (γ × Bool × ℝ) → ℝ := fun n ω z => aipwMomentATTFunctional (η_hat n ω) z S.θ₀ - aipwMomentATTFunctional S.η₀ z S.θ₀ have hR_meas : Measurable R := by simpa [R] using yMuVal_residual_meas_ATT S have hR_nonneg : ∀ z, 0 ≤ R z := by intro z dsimp [R] positivity have hR_memLp : MemLp R 2 S.P_Z := by simpa [R] using yMuVal_residual_memLp_ATT S hA h_y2 h_y0_2 have hdμZ_memLp : ∀ n ω, MemLp (dμZ n ω) 2 S.P_Z := by intro n ω have hmap : MemLp (fun x => (η_hat n ω).μ₀_fn x - S.μ₀_val x) 2 (S.P_Z.map (fun z : γ × Bool × ℝ => z.1)) := by simpa [TreatedEstimationSystem.P_Z_map_projX_eq_P_X S] using h_mu_memLp n ω have hproj_ae : AEMeasurable (fun z : γ × Bool × ℝ => z.1) S.P_Z := measurable_fst.aemeasurable exact (memLp_map_measure_iff hmap.aestronglyMeasurable hproj_ae).1 hmap have hdeZ_memLp : ∀ n ω, MemLp (deZ n ω) 2 S.P_Z := by intro n ω have hmap : MemLp (fun x => (η_hat n ω).e_fn x - S.e_val x) 2 (S.P_Z.map (fun z : γ × Bool × ℝ => z.1)) := by simpa [TreatedEstimationSystem.P_Z_map_projX_eq_P_X S] using h_e_memLp n ω have hproj_ae : AEMeasurable (fun z : γ × Bool × ℝ => z.1) S.P_Z := measurable_fst.aemeasurable exact (memLp_map_measure_iff hmap.aestronglyMeasurable hproj_ae).1 hmap have hdeZ_bdd : ∀ n ω, ∀ᵐ z ∂S.P_Z, |deZ n ω z| ≤ 1 := by intro n ω filter_upwards [H_ε_overlap_P_Z S (h_in_Hε n ω), H_ε_overlap_P_Z S hη₀_mem] with z hη_le_M hS_le_M_raw have hη_nonneg : 0 ≤ (η_hat n ω).e_fn (projX z) := h_e_lb_hat n ω (projX z) have hS_nonneg : 0 ≤ S.e_val (projX z) := h_e_lb (projX z) have hS_le_M : S.e_val (projX z) ≤ 1 - ε := by simpa [TreatedEstimationSystem.η₀] using hS_le_M_raw have hM_le_one : 1 - ε ≤ 1 := by linarith dsimp [deZ] rw [abs_le] constructor · linarith · linarith have hcross_rate : IsLittleOp (fun n ω => (eLpNorm (cross n ω) 2 S.P_Z).toReal) (fun _ => (1 : ℝ)) P.μ := by simpa [cross, R, deZ] using residual_mul_e_error_isLittleOp_one_ATT S ⟨hε_pos, hε_half, hprop⟩ hη₀_mem h_e_lb hA h_y2 h_y0_2 η_hat h_in_Hε h_e_lb_hat h_e_memLp h_e_diff have hμZ_rate : IsLittleOp (fun n ω => (eLpNorm (dμZ n ω) 2 S.P_Z).toReal) (fun _ => (1 : ℝ)) P.μ := by have heq : (fun n ω => (eLpNorm (dμZ n ω) 2 S.P_Z).toReal) = (fun n ω => (eLpNorm (fun x => (η_hat n ω).μ₀_fn x - S.μ₀_val x) 2 S.P_X).toReal) := by funext n funext ω dsimp [dμZ] exact congrArg toReal (eLpNorm_comp_projX_eq_ATT (S := S) (f := fun x => (η_hat n ω).μ₀_fn x - S.μ₀_val x) (h_mu_memLp n ω).aestronglyMeasurable) rw [heq] exact h_mu_diff have hsum_rate : IsLittleOp (fun n ω => (eLpNorm (dμZ n ω) 2 S.P_Z).toReal + (eLpNorm (cross n ω) 2 S.P_Z).toReal) (fun _ => (1 : ℝ)) P.μ := by exact IsLittleOp.add_one hμZ_rate hcross_rate have hK_pos : 0 < K_AIPW_ATT ε := lt_of_lt_of_le zero_lt_one (K_AIPW_ATT_one_le hε_pos) refine IsLittleOp.of_abs_le_const_mul_one (C := K_AIPW_ATT ε) hK_pos hsum_rate ?_ intro n ω have hpointwise : ∀ᵐ z ∂S.P_Z, |score n ω z| ≤ K_AIPW_ATT ε * (|dμZ n ω z| + cross n ω z) := by simpa [score, dμZ, cross, R, deZ, mul_add, mul_assoc, add_comm, add_left_comm, add_assoc] using aipw_score_lipschitz_ATT S ⟨hε_pos, hε_half, hprop⟩ hη₀_mem (η_hat n ω) (h_in_Hε n ω) let upper : (γ × Bool × ℝ) → ℝ := fun z => K_AIPW_ATT ε * (|dμZ n ω z| + cross n ω z) have hcross_memLp : MemLp (cross n ω) 2 S.P_Z := by have hcross_meas : Measurable (cross n ω) := by have hde_meas : Measurable (deZ n ω) := by have hx : Measurable (fun z : γ × Bool × ℝ => projX z) := by simpa [projX] using (measurable_fst : Measurable (fun z : γ × Bool × ℝ => z.1)) exact ((η_hat n ω).e_meas.comp hx).sub (S.e_meas.comp hx) exact hR_meas.mul hde_meas.norm refine hR_memLp.mono' hcross_meas.aestronglyMeasurable ?_ filter_upwards [hdeZ_bdd n ω] with z hdez_le have hRz : 0 ≤ R z := hR_nonneg z dsimp [cross] rw [abs_mul, abs_of_nonneg hRz, abs_of_nonneg (abs_nonneg _)] exact mul_le_of_le_one_right hRz hdez_le have hupper_memLp : MemLp upper 2 S.P_Z := by have hsum : MemLp (fun z => |dμZ n ω z| + cross n ω z) 2 S.P_Z := by have hμ : MemLp (fun z => |dμZ n ω z|) 2 S.P_Z := by simpa [Real.norm_eq_abs] using (hdμZ_memLp n ω).norm exact hμ.add hcross_memLp exact hsum.const_smul (K_AIPW_ATT ε) have hmono : (eLpNorm (score n ω) 2 S.P_Z).toReal ≤ (eLpNorm upper 2 S.P_Z).toReal := by have hle_enn : eLpNorm (score n ω) 2 S.P_Z ≤ eLpNorm upper 2 S.P_Z := eLpNorm_mono_ae_real (by filter_upwards [hpointwise] with z hz simpa [Real.norm_eq_abs, upper] using hz) exact ENNReal.toReal_mono hupper_memLp.eLpNorm_ne_top hle_enn have hupper_bound : (eLpNorm upper 2 S.P_Z).toRealK_AIPW_ATT ε * ((eLpNorm (dμZ n ω) 2 S.P_Z).toReal + (eLpNorm (cross n ω) 2 S.P_Z).toReal) := by let total : (γ × Bool × ℝ) → ℝ := fun z => |dμZ n ω z| + cross n ω z have htotal_memLp : MemLp total 2 S.P_Z := by have hμ : MemLp (fun z => |dμZ n ω z|) 2 S.P_Z := by simpa [Real.norm_eq_abs] using (hdμZ_memLp n ω).norm exact hμ.add hcross_memLp have hupper_eq : upper = K_AIPW_ATT ε • total := by funext z simp [upper, total, smul_eq_mul] rw [hupper_eq] rw [toReal_eLpNorm (htotal_memLp.const_smul (K_AIPW_ATT ε)).aestronglyMeasurable] rw [lpNorm_const_smul] have hcoef : (↑‖K_AIPW_ATT ε‖₊ : ℝ) = K_AIPW_ATT ε := by simp [Real.norm_eq_abs, abs_of_pos hK_pos] rw [hcoef] gcongr have htri : lpNorm total 2 S.P_Z ≤ lpNorm (fun z => |dμZ n ω z|) 2 S.P_Z + lpNorm (cross n ω) 2 S.P_Z := by have htotal_eq : total = (fun z => |dμZ n ω z|) + cross n ω := by funext z simp [total, Pi.add_apply] rw [htotal_eq] have hμ : MemLp (fun z => |dμZ n ω z|) 2 S.P_Z := by simpa [Real.norm_eq_abs] using (hdμZ_memLp n ω).norm exact lpNorm_add_le (f := fun z => |dμZ n ω z|) (g := cross n ω) (μ := S.P_Z) hμ (by norm_num : (1 : ENNReal) ≤ 2) have hnormμ : lpNorm (fun z => |dμZ n ω z|) 2 S.P_Z = (eLpNorm (dμZ n ω) 2 S.P_Z).toReal := by rw [lpNorm_fun_abs (hdμZ_memLp n ω).aestronglyMeasurable] rw [← toReal_eLpNorm (hdμZ_memLp n ω).aestronglyMeasurable] have hnormC : lpNorm (cross n ω) 2 S.P_Z = (eLpNorm (cross n ω) 2 S.P_Z).toReal := by rw [← toReal_eLpNorm hcross_memLp.aestronglyMeasurable] linarith calc |(eLpNorm (score n ω) 2 S.P_Z).toReal| = (eLpNorm (score n ω) 2 S.P_Z).toReal := by rw [abs_of_nonneg ENNReal.toReal_nonneg] _ ≤ (eLpNorm upper 2 S.P_Z).toReal := hmono _ ≤ K_AIPW_ATT ε * ((eLpNorm (dμZ n ω) 2 S.P_Z).toReal + (eLpNorm (cross n ω) 2 S.P_Z).toReal) := hupper_bound _ = K_AIPW_ATT ε * |(eLpNorm (dμZ n ω) 2 S.P_Z).toReal + (eLpNorm (cross n ω) 2 S.P_Z).toReal| := by rw [abs_of_nonneg] positivity
1 supporting declaration (lemmas, instances)
Finite­Var 1 core · 2 supporting Proves finite variance for the ATT AIPW moment under back-door assumptions, one-sided overlap, and square-integrable outcomes. ★ aipw_finite_var_ATT

Proves finite variance for the ATT AIPW moment under back-door assumptions, one-sided overlap, and square-integrable outcomes. The result supplies the L2 input required by the ATT asymptotic-linear and CLT arguments.

theorem aipw_finite_var_ATT reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

Finite variance of the ATT AIPW moment. Under one-sided overlap: the true treatment propensity is bounded above by 1 − ε for some ε ∈ (0, 1/2] almost surely, the one-sided back-door ATT assumptions, and square-integrability of the factual outcome together with square-integrability of the untreated potential outcome Y(0), the ATT AIPW moment evaluated at the truth nuisance is square-integrable under the joint law of the covariates, treatment, and outcome.

Formal statement
P :
shared
γ :
Type u_1
shared
ε :
h_overlap :
S.OneSidedOverlap ε
hA :
S.toPOBackdoorSystem.ATTAssumptions
h_y2 :
Integrable (fun ω => (S.toPOBackdoorSystem.factualY ω) ^ 2) P.μ
h_y0_2 :
Integrable (fun ω => (S.toPOBackdoorSystem.YofD false ω) ^ 2) P.μ
Integrable (fun z => (aipwMomentATT z S.μ₀_val S.e_val S.θ₀) ^ 2) S.P_Z
Proof (Lean source)
-- Outline: mirror `aipw_finite_var` from `Estimation/ATE/Score/FiniteVar.lean`. -- Steps: (i) measurability of the moment; (ii) `Y, μ₀ ∈ L²` via -- `memLp_two_iff_integrable_sq` and `MemLp.condExp` on `μ[Y(0)|σX]`; -- (iii) `(1−A)·e/(1−e)` is `L^∞` from `e_val ≤ 1−ε`; (iv) `A` is `L^∞`; -- (v) `MemLp.mul`-products; (vi) sum to get the moment in `L²`; (vii) -- transfer from `P.μ` to `P_Z` via `memLp_map_measure_iff`. theorem aipw_finite_var_ATT (S : TreatedEstimationSystem P γ) {ε : ℝ} (h_overlap : S.OneSidedOverlap ε) (hA : S.toPOBackdoorSystem.ATTAssumptions) (h_y2 : Integrable (fun ω => (S.toPOBackdoorSystem.factualY ω) ^ 2) P.μ) (h_y0_2 : Integrable (fun ω => (S.toPOBackdoorSystem.YofD false ω) ^ 2) P.μ) : Integrable (fun z => (aipwMomentATT z S.μ₀_val S.e_val S.θ₀) ^ 2) S.P_Z := by have hmoment_meas : Measurable (fun z => aipwMomentATT z S.μ₀_val S.e_val S.θ₀) := by simpa [aipwMomentATTFunctional, η₀] using (measurable_aipwMomentATTFunctional (η := S.η₀) (θ := S.θ₀)) have hY_L2 : MemLp S.toPOBackdoorSystem.factualY 2 P.μ := by exact (memLp_two_iff_integrable_sq S.toPOBackdoorSystem.measurable_factualY.aestronglyMeasurable).2 h_y2 have hμ₀_L2 : MemLp (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) 2 P.μ := by have hY0_L2 : MemLp (S.toPOBackdoorSystem.YofD false) 2 P.μ := by exact (memLp_two_iff_integrable_sq (S.toPOBackdoorSystem.measurable_YofD false).aestronglyMeasurable).2 h_y0_2 have hcond_L2 : MemLp (P.μ[S.toPOBackdoorSystem.YofD false | S.toPOBackdoorSystem.sigmaX]) 2 P.μ := hY0_L2.condExp one_le_two exact hcond_L2.ae_eq (S.μ₀_compat hA) have hindA_meas : Measurable (fun ω => indA (S.factualZ ω)) := by simp only [indA, ATE.BackdoorEstimationSystem.projA, TreatedEstimationSystem.factualZ] exact (Measurable.of_discrete (f := fun b : Bool => if b = true then (1 : ℝ) else 0)).comp S.toPOBackdoorSystem.measurable_factualD have hA_bound : ∀ᵐ ω ∂P.μ, ‖indA (S.factualZ ω)‖ ≤ (1 : ℝ) := by filter_upwards with ω by_cases hD : S.toPOBackdoorSystem.factualD ω = true · simp [TreatedEstimationSystem.factualZ, indA, ATE.BackdoorEstimationSystem.projA, hD] · simp [TreatedEstimationSystem.factualZ, indA, ATE.BackdoorEstimationSystem.projA, hD] have hA_Linf : MemLp (fun ω => indA (S.factualZ ω)) ⊤ P.μ := by exact MemLp.of_bound hindA_meas.aestronglyMeasurable (1 : ℝ) hA_bound have he_nonneg : ∀ᵐ ω ∂P.μ, 0 ≤ S.e_val (S.toPOBackdoorSystem.factualX ω) := by filter_upwards [S.propScore_true_nonneg_ae, S.e_compat] with ω hnonneg hcomp simpa [hcomp] using hnonneg have he_upper : ∀ᵐ ω ∂P.μ, S.e_val (S.toPOBackdoorSystem.factualX ω) ≤ 1 - ε := by filter_upwards [h_overlap.2.2, S.e_compat] with ω hover hcomp simpa [hcomp] using hover have hw_false_bound : ∀ᵐ ω ∂P.μ, ‖(1 - indA (S.factualZ ω)) * (S.e_val (S.toPOBackdoorSystem.factualX ω) / (1 - S.e_val (S.toPOBackdoorSystem.factualX ω)))‖ ≤ ε⁻¹ := by filter_upwards [he_nonneg, he_upper] with ω hnonneg hupper by_cases hD : S.toPOBackdoorSystem.factualD ω = true · have hεinv_nonneg : 0 ≤ ε⁻¹ := inv_nonneg.mpr h_overlap.1.le simpa [TreatedEstimationSystem.factualZ, indA, ATE.BackdoorEstimationSystem.projA, hD] using hεinv_nonneg · have hden : ε ≤ 1 - S.e_val (S.toPOBackdoorSystem.factualX ω) := by linarith have hdenpos : 0 < 1 - S.e_val (S.toPOBackdoorSystem.factualX ω) := lt_of_lt_of_le h_overlap.1 hden have hle_inv : (1 - S.e_val (S.toPOBackdoorSystem.factualX ω))⁻¹ ≤ ε⁻¹ := (inv_le_inv₀ hdenpos h_overlap.1).2 hden have he_le_one : S.e_val (S.toPOBackdoorSystem.factualX ω) ≤ 1 := by linarith have hratio_nonneg : 0 ≤ S.e_val (S.toPOBackdoorSystem.factualX ω) / (1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) := div_nonneg hnonneg hdenpos.le have hratio_le : S.e_val (S.toPOBackdoorSystem.factualX ω) / (1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) ≤ ε⁻¹ := by calc S.e_val (S.toPOBackdoorSystem.factualX ω) / (1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) = S.e_val (S.toPOBackdoorSystem.factualX ω) * (1 - S.e_val (S.toPOBackdoorSystem.factualX ω))⁻¹ := by rw [div_eq_mul_inv] _ ≤ 1 * ε⁻¹ := by exact mul_le_mul he_le_one hle_inv (inv_nonneg.mpr hdenpos.le) zero_le_one _ = ε⁻¹ := one_mul _ have hnorm_eq : ‖(1 - indA (S.factualZ ω)) * (S.e_val (S.toPOBackdoorSystem.factualX ω) / (1 - S.e_val (S.toPOBackdoorSystem.factualX ω)))‖ = S.e_val (S.toPOBackdoorSystem.factualX ω) / (1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) := by have hind_eq : indA (S.factualZ ω) = 0 := by simp only [TreatedEstimationSystem.factualZ, indA, ATE.BackdoorEstimationSystem.projA, hD] rfl rw [hind_eq] change ‖(1 - 0) * (S.e_val (S.toPOBackdoorSystem.factualX ω) / (1 - S.e_val (S.toPOBackdoorSystem.factualX ω)))‖ = S.e_val (S.toPOBackdoorSystem.factualX ω) / (1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) rw [sub_zero, one_mul, Real.norm_eq_abs, abs_of_nonneg hratio_nonneg] rw [hnorm_eq] exact hratio_le have hw_false_Linf : MemLp (fun ω => (1 - indA (S.factualZ ω)) * (S.e_val (S.toPOBackdoorSystem.factualX ω) / (1 - S.e_val (S.toPOBackdoorSystem.factualX ω)))) ⊤ P.μ := by refine MemLp.of_bound ?_ ε⁻¹ hw_false_bound apply Measurable.aestronglyMeasurable exact (measurable_const.sub hindA_meas).mul ((S.e_meas.comp S.toPOBackdoorSystem.measurable_factualX).div (measurable_const.sub (S.e_meas.comp S.toPOBackdoorSystem.measurable_factualX))) have hterm_true_L2 : MemLp (fun ω => indA (S.factualZ ω) * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω))) 2 P.μ := by exact MemLp.mul' (p := ⊤) (q := 2) (r := 2) (hY_L2.sub hμ₀_L2) hA_Linf have hterm_false_L2 : MemLp (fun ω => ((1 - indA (S.factualZ ω)) * (S.e_val (S.toPOBackdoorSystem.factualX ω) / (1 - S.e_val (S.toPOBackdoorSystem.factualX ω)))) * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω))) 2 P.μ := by exact MemLp.mul' (p := ⊤) (q := 2) (r := 2) (hY_L2.sub hμ₀_L2) hw_false_Linf have htheta_L2 : MemLp (fun ω => indA (S.factualZ ω) * S.θ₀) 2 P.μ := by exact MemLp.mul' (p := ⊤) (q := 2) (r := 2) (memLp_const (α := P.Ω) S.θ₀) hA_Linf have hmoment_comp_L2 : MemLp (fun ω => aipwMomentATT (S.factualZ ω) S.μ₀_val S.e_val S.θ₀) 2 P.μ := by have hsum_L2 := (hterm_true_L2.sub hterm_false_L2).sub htheta_L2 simp only [aipwMomentATT, TreatedEstimationSystem.factualZ, ATE.BackdoorEstimationSystem.projX, ATE.BackdoorEstimationSystem.projY] exact hsum_L2 have hmoment_L2 : MemLp (fun z => aipwMomentATT z S.μ₀_val S.e_val S.θ₀) 2 S.P_Z := by rw [TreatedEstimationSystem.P_Z] exact (memLp_map_measure_iff hmoment_meas.aestronglyMeasurable S.measurable_factualZ.aemeasurable).2 hmoment_comp_L2 exact hmoment_L2.integrable_sq
2 supporting declarations (lemmas, instances)
  • ipw_estimated_integrable theorem — Integrability of an estimated-nuisance ATT IPW correction (over P_Z).
    P :
    shared
    γ :
    Type u_1
    shared
    ε :
    :
    0 < ε
    he_lb :
    ∀ᵐ x ∂S.P_X, 0 ≤ η.e_fn x
    he_ub :
    ∀ᵐ x ∂S.P_X, η.e_fn x ≤ 1 - ε
    hμ₀_memLp :
    MemLp η.μ₀_fn 2 S.P_X
    h_y2 :
    Integrable (fun ω => (S.toPOBackdoorSystem.factualY ω) ^ 2) P.μ
    Integrable (fun z => (1 - indA z) * (η.e_fn (projX z) / (1 - η.e_fn (projX z))) * (projY z - η.μ₀_fn (projX z))) S.P_Z
    Proof (Lean source)
    theorem ipw_estimated_integrable (S : TreatedEstimationSystem P γ) {ε : ℝ} (hε : 0 < ε) (η : TreatedNuisanceVec γ) (he_lb : ∀ᵐ x ∂S.P_X, 0 ≤ η.e_fn x) (he_ub : ∀ᵐ x ∂S.P_X, η.e_fn x ≤ 1 - ε) (hμ₀_memLp : MemLp η.μ₀_fn 2 S.P_X) (h_y2 : Integrable (fun ω => (S.toPOBackdoorSystem.factualY ω) ^ 2) P.μ) : Integrable (fun z => (1 - indA z) * (η.e_fn (projX z) / (1 - η.e_fn (projX z))) * (projY z - η.μ₀_fn (projX z))) S.P_Z := by haveI : IsProbabilityMeasure S.P_Z := by unfold TreatedEstimationSystem.P_Z exact Measure.isProbabilityMeasure_map S.measurable_factualZ.aemeasurable have hX : Measurable (projX : γ × Bool × ℝ → γ) := by unfold projX; fun_prop have hYm : Measurable (projY : γ × Bool × ℝ → ℝ) := by unfold projY; fun_prop have hAm : Measurable (projA : γ × Bool × ℝ → Bool) := by unfold projA; fun_prop have hindA : Measurable (indA : γ × Bool × ℝ → ℝ) := by unfold indA refine Measurable.ite ?_ measurable_const measurable_const exact hAm (MeasurableSet.singleton true) have heX : Measurable (fun z : γ × Bool × ℝ => η.e_fn (projX z)) := η.e_meas.comp hX -- transfer the `P_X`-a.e. propensity bounds to `P_Z`-a.e. along `projX` have hmap : S.P_Z.map (fun z : γ × Bool × ℝ => z.1) = S.P_X := S.P_Z_map_projX_eq_P_X have he_lb_Z : ∀ᵐ z ∂S.P_Z, 0 ≤ η.e_fn (projX z) := by rw [← hmap] at he_lb exact (ae_map_iff hX.aemeasurable (measurableSet_le measurable_const η.e_meas)).mp he_lb have he_ub_Z : ∀ᵐ z ∂S.P_Z, η.e_fn (projX z) ≤ 1 - ε := by rw [← hmap] at he_ub exact (ae_map_iff hX.aemeasurable (measurableSet_le η.e_meas measurable_const)).mp he_ub -- the IPW weight is bounded by `ε⁻¹`, hence in `L^∞` have hw_bound : ∀ᵐ z ∂S.P_Z, ‖(1 - indA z) * (η.e_fn (projX z) / (1 - η.e_fn (projX z)))‖ ≤ ε⁻¹ := by filter_upwards [he_lb_Z, he_ub_Z] with z hlb hub by_cases hAz : projA z = true · have h1 : indA z = 1 := by simp [indA, hAz] rw [h1]; simp only [sub_self, zero_mul, norm_zero]; exact inv_nonneg.mpr hε.le · have h0 : indA z = 0 := by simp [indA, hAz] have hden : ε ≤ 1 - η.e_fn (projX z) := by linarith have hdenpos : 0 < 1 - η.e_fn (projX z) := lt_of_lt_of_le hε hden have hle_inv : (1 - η.e_fn (projX z))⁻¹ ≤ ε⁻¹ := (inv_le_inv₀ hdenpos hε).2 hden have he_le_one : η.e_fn (projX z) ≤ 1 := by linarith have hratio_nonneg : 0 ≤ η.e_fn (projX z) / (1 - η.e_fn (projX z)) := div_nonneg hlb hdenpos.le have hratio_le : η.e_fn (projX z) / (1 - η.e_fn (projX z)) ≤ ε⁻¹ := by rw [div_eq_mul_inv] calc η.e_fn (projX z) * (1 - η.e_fn (projX z))⁻¹ ≤ 1 * ε⁻¹ := mul_le_mul he_le_one hle_inv (inv_nonneg.mpr hdenpos.le) zero_le_one _ = ε⁻¹ := one_mul _ rw [h0] simp only [sub_zero, one_mul, Real.norm_eq_abs, abs_of_nonneg hratio_nonneg] exact hratio_le have hw_Linf : MemLp (fun z => (1 - indA z) * (η.e_fn (projX z) / (1 - η.e_fn (projX z)))) ⊤ S.P_Z := by refine MemLp.of_bound ?_ ε⁻¹ hw_bound exact ((measurable_const.sub hindA).mul (heX.div (measurable_const.sub heX))).aestronglyMeasurable -- the residual `Y − μ₀` is in `L²(P_Z)` have hprojY_L2 : MemLp (projY : γ × Bool × ℝ → ℝ) 2 S.P_Z := by rw [TreatedEstimationSystem.P_Z] refine (memLp_map_measure_iff hYm.aestronglyMeasurable S.measurable_factualZ.aemeasurable).2 ?_ exact (memLp_two_iff_integrable_sq S.toPOBackdoorSystem.measurable_factualY.aestronglyMeasurable).2 h_y2 have hμX_L2 : MemLp (fun z : γ × Bool × ℝ => η.μ₀_fn (projX z)) 2 S.P_Z := by have h1 : MemLp η.μ₀_fn 2 (S.P_Z.map (fun z : γ × Bool × ℝ => z.1)) := by rw [hmap]; exact hμ₀_memLp exact (memLp_map_measure_iff η.μ₀_meas.aestronglyMeasurable hX.aemeasurable).1 h1 have hresid_L2 : MemLp (fun z => projY z - η.μ₀_fn (projX z)) 2 S.P_Z := hprojY_L2.sub hμX_L2 exact (MemLp.mul' (p := ⊤) (q := 2) (r := 2) hresid_L2 hw_Linf).integrable (by norm_num)
    Causalean.Estimation.ATT.TreatedEstimationSystem.ipw_estimated_integrable · Causalean/Estimation/ATT/Score/FiniteVar.lean:229
  • ipw_truth_integrable theorem — Integrability of the truth-nuisance ATT IPW correction (over P.μ).
    P :
    shared
    γ :
    Type u_1
    shared
    ε :
    h_overlap :
    S.OneSidedOverlap ε
    hA :
    S.toPOBackdoorSystem.ATTAssumptions
    h_y2 :
    Integrable (fun ω => (S.toPOBackdoorSystem.factualY ω) ^ 2) P.μ
    h_y0_2 :
    Integrable (fun ω => (S.toPOBackdoorSystem.YofD false ω) ^ 2) P.μ
    Integrable (fun ω => (1 - S.toPOBackdoorSystem.dVar.indicator true ω) * (S.toPOBackdoorSystem.propScore true ω / (1 - S.toPOBackdoorSystem.propScore true ω)) * (S.toPOBackdoorSystem.factualY ω - S.toPOBackdoorSystem.adjustedCE false ω)) P.μ
    Proof (Lean source)
    theorem ipw_truth_integrable (S : TreatedEstimationSystem P γ) {ε : ℝ} (h_overlap : S.OneSidedOverlap ε) (hA : S.toPOBackdoorSystem.ATTAssumptions) (h_y2 : Integrable (fun ω => (S.toPOBackdoorSystem.factualY ω) ^ 2) P.μ) (h_y0_2 : Integrable (fun ω => (S.toPOBackdoorSystem.YofD false ω) ^ 2) P.μ) : Integrable (fun ω => (1 - S.toPOBackdoorSystem.dVar.indicator true ω) * (S.toPOBackdoorSystem.propScore true ω / (1 - S.toPOBackdoorSystem.propScore true ω)) * (S.toPOBackdoorSystem.factualY ω - S.toPOBackdoorSystem.adjustedCE false ω)) P.μ := by haveI : IsProbabilityMeasure S.P_X := by unfold TreatedEstimationSystem.P_X exact Measure.isProbabilityMeasure_map S.toPOBackdoorSystem.measurable_factualX.aemeasurable -- `μ₀_val ∈ L²(P_X)` from `μ₀_val ∘ factualX =ᵐ μ[Y(0)|σX]` and conditional Jensen have hμ₀_val_memLp : MemLp S.μ₀_val 2 S.P_X := by have hY0_L2 : MemLp (S.toPOBackdoorSystem.YofD false) 2 P.μ := (memLp_two_iff_integrable_sq (S.toPOBackdoorSystem.measurable_YofD false).aestronglyMeasurable).2 h_y0_2 have hcomp_L2 : MemLp (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) 2 P.μ := (hY0_L2.condExp one_le_two).ae_eq (S.μ₀_compat hA) rw [TreatedEstimationSystem.P_X] exact (memLp_map_measure_iff S.μ₀_meas.aestronglyMeasurable S.toPOBackdoorSystem.measurable_factualX.aemeasurable).2 hcomp_L2 -- transfer the `P.μ`-a.e. propensity bounds (via `e_compat`) to `P_X`-a.e. have he_lb_PX : ∀ᵐ x ∂S.P_X, 0 ≤ S.e_val x := by rw [TreatedEstimationSystem.P_X] refine (ae_map_iff S.toPOBackdoorSystem.measurable_factualX.aemeasurable (measurableSet_le measurable_const S.e_meas)).mpr ?_ filter_upwards [S.propScore_true_nonneg_ae, S.e_compat] with ω hov hc rw [← hc]; exact hov have he_ub_PX : ∀ᵐ x ∂S.P_X, S.e_val x ≤ 1 - ε := by rw [TreatedEstimationSystem.P_X] refine (ae_map_iff S.toPOBackdoorSystem.measurable_factualX.aemeasurable (measurableSet_le S.e_meas measurable_const)).mpr ?_ filter_upwards [h_overlap.2.2, S.e_compat] with ω hov hc rw [← hc]; exact hov -- value-space integrability at the truth, then transfer `P_Z → P.μ` have hval := ipw_estimated_integrable S h_overlap.1 S.η₀ he_lb_PX he_ub_PX hμ₀_val_memLp h_y2 have hmeas_g : AEStronglyMeasurable (fun z => (1 - indA z) * (S.η₀.e_fn (projX z) / (1 - S.η₀.e_fn (projX z))) * (projY z - S.η₀.μ₀_fn (projX z))) S.P_Z := hval.aestronglyMeasurable have htransfer := ((integrable_map_measure hmeas_g S.measurable_factualZ.aemeasurable).mp (by rw [← TreatedEstimationSystem.P_Z]; exact hval)) refine htransfer.congr ?_ filter_upwards [S.e_compat, S.μ₀_reg_compat] with ω he hμ have hindA_eq : indA (S.factualZ ω) = S.toPOBackdoorSystem.dVar.indicator true ω := by by_cases hD : S.toPOBackdoorSystem.factualD ω = true · simp [TreatedEstimationSystem.factualZ, indA, projA, hD, S.toPOBackdoorSystem.dVar.indicator_apply_eq_one hD] · simp [TreatedEstimationSystem.factualZ, indA, projA, hD, S.toPOBackdoorSystem.dVar.indicator_apply_eq_zero (x := true) hD] change (1 - indA (S.factualZ ω)) * (S.η₀.e_fn (projX (S.factualZ ω)) / (1 - S.η₀.e_fn (projX (S.factualZ ω)))) * (projY (S.factualZ ω) - S.η₀.μ₀_fn (projX (S.factualZ ω))) = (1 - S.toPOBackdoorSystem.dVar.indicator true ω) * (S.toPOBackdoorSystem.propScore true ω / (1 - S.toPOBackdoorSystem.propScore true ω)) * (S.toPOBackdoorSystem.factualY ω - S.toPOBackdoorSystem.adjustedCE false ω) rw [hindA_eq] simp only [TreatedEstimationSystem.factualZ, projX, projY, TreatedEstimationSystem.η₀, ← he, hμ]
    Causalean.Estimation.ATT.TreatedEstimationSystem.ipw_truth_integrable · Causalean/Estimation/ATT/Score/FiniteVar.lean:311
Mean­Zero 1 core · 2 supporting Proves the population centering facts for the ATT AIPW score. ★ aipw_mean_zero_ATT

Proves the population centering facts for the ATT AIPW score. The measurable helpers measurable_ψ_ATT and measurable_aipwMomentATT_at_θ₀ support integration against the observed data law, and the headline theorem aipw_mean_zero_ATT shows that the truth moment has expectation zero under P_Z.

The proof combines the PO-level adjusted-ATT identity, the control-arm weighted residual pull-out lemma, and the constant term π_T * θ₀, giving the centering input for ATT influence-function and DML results.

theorem aipw_mean_zero_ATT reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

Mean zero of the ATT AIPW moment. Under the one-sided back-door ATT assumptions, a strictly positive marginal treatment probability, and integrability of the control-arm inverse-propensity-weighted residual correction (1 − 1{D=1}) · (e(X)/(1 − e(X))) · (Y − μ₀(X)), the ATT AIPW moment evaluated at the truth has mean zero under the joint law of the covariates, treatment, and outcome.

Formal statement
P :
shared
γ :
Type u_1
shared
hA :
S.toPOBackdoorSystem.ATTAssumptions
hπ_pos :
0 < S.π_val
hIPW :
Integrable (fun ω => (1 - S.toPOBackdoorSystem.dVar.indicator true ω) * (S.toPOBackdoorSystem.propScore true ω / (1 - S.toPOBackdoorSystem.propScore true ω)) * (S.toPOBackdoorSystem.factualY ω - S.toPOBackdoorSystem.adjustedCE false ω)) P.μ
∫ z, aipwMomentATT z S.μ₀_val S.e_val S.θ₀ ∂(S.P_Z) = 0
Proof (Lean source)
theorem aipw_mean_zero_ATT (S : TreatedEstimationSystem P γ) (hA : S.toPOBackdoorSystem.ATTAssumptions) (hπ_pos : 0 < S.π_val) (hIPW : Integrable (fun ω => (1 - S.toPOBackdoorSystem.dVar.indicator true ω) * (S.toPOBackdoorSystem.propScore true ω / (1 - S.toPOBackdoorSystem.propScore true ω)) * (S.toPOBackdoorSystem.factualY ω - S.toPOBackdoorSystem.adjustedCE false ω)) P.μ) : ∫ z, aipwMomentATT z S.μ₀_val S.e_val S.θ₀ ∂(S.P_Z) = 0 := by let A : P.Ω → ℝ := fun ω => S.toPOBackdoorSystem.dVar.indicator true ω let R : P.Ω → ℝ := fun ω => S.toPOBackdoorSystem.factualY ω - S.toPOBackdoorSystem.adjustedCE false ω let W : P.Ω → ℝ := fun ω => S.toPOBackdoorSystem.propScore true ω / (1 - S.toPOBackdoorSystem.propScore true ω) let N : ℝ := ∫ ω, A ω * R ω - (1 - A ω) * W ω * R ω ∂P.μ have hadj : S.θ₀ = N / S.π_val := by have h := S.toPOBackdoorSystem.adjustedATT_eq_aipwForm hA hIPW simpa [TreatedEstimationSystem.θ₀, TreatedEstimationSystem.π_val, N, A, R, W] using h have hπ_ne : S.π_val ≠ 0 := ne_of_gt hπ_pos have hN_eq : N = S.π_val * S.θ₀ := by calc N = S.π_val * (N / S.π_val) := by field_simp [hπ_ne] _ = S.π_val * S.θ₀ := by rw [← hadj] have htreated_int : Integrable (fun ω => A ω * R ω) P.μ := by have hY_int : Integrable S.toPOBackdoorSystem.factualY P.μ := S.toPOBackdoorSystem.integrable_factualY_of_consistency hA.consistency hA.integrable_Y1 hA.integrable_Y0 have hYind_int : Integrable (fun ω => S.toPOBackdoorSystem.dVar.indicator true ω * S.toPOBackdoorSystem.factualY ω) P.μ := by have h := S.toPOBackdoorSystem.dVar.integrable_mul_indicator true (measurableSet_singleton true) hY_int exact h.congr (Filter.Eventually.of_forall (fun ω => by ring)) have hAdjind_int : Integrable (fun ω => S.toPOBackdoorSystem.dVar.indicator true ω * S.toPOBackdoorSystem.adjustedCE false ω) P.μ := by have h := S.toPOBackdoorSystem.dVar.integrable_mul_indicator true (measurableSet_singleton true) (integrable_adjustedCE S hA) exact h.congr (Filter.Eventually.of_forall (fun ω => by ring)) have hsub := hYind_int.sub hAdjind_int refine hsub.congr ?_ refine Filter.Eventually.of_forall (fun ω => ?_) unfold A R rw [Pi.sub_apply] ring have hN_int : Integrable (fun ω => A ω * R ω - (1 - A ω) * W ω * R ω) P.μ := by exact htreated_int.sub (by simpa [A, R, W] using hIPW) have hAθ_int : Integrable (fun ω => A ω * S.θ₀) P.μ := by have hA_int : Integrable A P.μ := by simpa [A] using S.toPOBackdoorSystem.dVar.integrable_indicator true have h := hA_int.const_mul S.θ₀ exact h.congr (Filter.Eventually.of_forall (fun ω => by unfold A ring)) have hmap : ∫ z, aipwMomentATT z S.μ₀_val S.e_val S.θ₀ ∂(S.P_Z) = ∫ ω, aipwMomentATT (S.factualZ ω) S.μ₀_val S.e_val S.θ₀ ∂P.μ := by rw [TreatedEstimationSystem.P_Z] exact MeasureTheory.integral_map S.measurable_factualZ.aemeasurable (measurable_aipwMomentATT_at_θ₀ S).aestronglyMeasurable rw [hmap] have hrewrite : (fun ω => aipwMomentATT (S.factualZ ω) S.μ₀_val S.e_val S.θ₀) =ᵐ[P.μ] (fun ω => A ω * R ω - (1 - A ω) * W ω * R ω - A ω * S.θ₀) := by filter_upwards [S.μ₀_compat hA, S.e_compat, S.control_cate_backdoor hA] with ω hμ he hcat have hμ_eq : S.μ₀_val (S.toPOBackdoorSystem.factualX ω) = S.toPOBackdoorSystem.adjustedCE false ω := by have hcate_eq : S.toPOBackdoorSystem.CATE false ω = S.μ₀_val (S.toPOBackdoorSystem.factualX ω) := by simpa [POBackdoorSystem.CATE] using hμ rw [← hcate_eq, hcat] have he_eq : S.e_val (S.toPOBackdoorSystem.factualX ω) = S.toPOBackdoorSystem.propScore true ω := he.symm have hindA_true : indA (S.factualZ ω) = A ω := by by_cases hD : S.toPOBackdoorSystem.factualD ω = true · have hInd : S.toPOBackdoorSystem.dVar.indicator true ω = 1 := S.toPOBackdoorSystem.dVar.indicator_apply_eq_one hD simp [TreatedEstimationSystem.factualZ, A, indA, projA, hD, hInd] · have hF : S.toPOBackdoorSystem.factualD ω = false := by cases h' : S.toPOBackdoorSystem.factualD ω <;> simp [h'] at hD ⊢ have hInd : S.toPOBackdoorSystem.dVar.indicator true ω = 0 := S.toPOBackdoorSystem.dVar.indicator_apply_eq_zero (x := true) hD simp [TreatedEstimationSystem.factualZ, A, indA, projA, hD, hInd] unfold aipwMomentATT R W rw [hindA_true] simp [TreatedEstimationSystem.factualZ, projX, projY, hμ_eq, he_eq] calc ∫ ω, aipwMomentATT (S.factualZ ω) S.μ₀_val S.e_val S.θ₀ ∂P.μ = ∫ ω, A ω * R ω - (1 - A ω) * W ω * R ω - A ω * S.θ₀ ∂P.μ := MeasureTheory.integral_congr_ae hrewrite _ = N - ∫ ω, A ω * S.θ₀ ∂P.μ := by exact MeasureTheory.integral_sub hN_int hAθ_int _ = N - S.θ₀ * S.π_val := by have hAconst : ∫ ω, A ω * S.θ₀ ∂P.μ = S.θ₀ * ∫ ω, A ω ∂P.μ := by integral_linearity ring rw [hAconst] simp [TreatedEstimationSystem.π_val, POBackdoorSystem.propTreated, A] _ = 0 := by rw [hN_eq] ring
2 supporting declarations (lemmas, instances)
Score­Pullout 3 core · 5 supporting Provides conditioning and reweighting identities for ATT AIPW scores. ★ weighted_residual_false_integral_zero★ indicator_to_propScore_integral

Provides conditioning and reweighting identities for ATT AIPW scores. The lemmas pull treatment indicators and propensity weights through conditional expectations to isolate treated and control contributions.

def ipwWeight_false reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

For a potential-outcomes system with a standard Borel sample space and finite probability measure, a measurable covariate space, a treated estimation system based on that system and covariate space, and a covariate value, the control-arm inverse-probability weight used in the ATT correction is the propensity score at that covariate value divided by one minus that propensity score. Equivalently, it is e(x)/(1e(x))e(x)/(1-e(x)).

Definition (Lean source)
P :
shared
γ :
Type u_1
shared
x :
γ
ipwWeight_false S x :
S.e_val x / (1 - S.e_val x)
Causalean.Estimation.ATT.TreatedEstimationSystem.ipwWeight_false · Causalean/Estimation/ATT/Score/ScorePullout.lean:45 · uses TreatedEstimationSystem , POSystem
lemma weighted_residual_false_integral_zero reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

Weighted-residual mean-zero identity, control arm (ATT). Under the one-sided back-door ATT assumptions, if g : γ → ℝ is measurable and the product g(X) · 1{D=false} · (Y − μ₀(X)) is integrable, then the integral of the weighted control-arm residual against the observed-data law vanishes: ∫ g(X) · 1{D=false} · (Y − μ₀(X)) dμ = 0.

Formal statement
P :
shared
γ :
Type u_1
shared
hA :
S.toPOBackdoorSystem.ATTAssumptions
g :
γ → ℝ
hg_meas :
h_int :
Integrable (fun ω => g (S.toPOBackdoorSystem.factualX ω) * (S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω)))) P.μ
∫ ω, g (S.toPOBackdoorSystem.factualX ω) * (S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω))) ∂P.μ
= 0
Proof (Lean source)
-- Outline: pull `g(X)` out of `μ[·|σ(X)]` via -- `condExp_mul_of_stronglyMeasurable_left`, then apply -- `residual_false_condExp_zero` and `integral_condExp`. lemma weighted_residual_false_integral_zero (S : TreatedEstimationSystem P γ) (hA : S.toPOBackdoorSystem.ATTAssumptions) (g : γ → ℝ) (hg_meas : Measurable g) (h_int : Integrable (fun ω => g (S.toPOBackdoorSystem.factualX ω) * (S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω)))) P.μ) : ∫ ω, g (S.toPOBackdoorSystem.factualX ω) * (S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω))) ∂P.μ = 0 := by have hg_sm : StronglyMeasurable[S.toPOBackdoorSystem.sigmaX] (fun ω => g (S.toPOBackdoorSystem.factualX ω)) := by change StronglyMeasurable[ comap S.toPOBackdoorSystem.factualX inferInstance] (fun ω => g (S.toPOBackdoorSystem.factualX ω)) exact (hg_meas.comp (comap_measurable S.toPOBackdoorSystem.factualX)).stronglyMeasurable have hY_int : Integrable S.toPOBackdoorSystem.factualY P.μ := S.toPOBackdoorSystem.integrable_factualY_of_consistency hA.consistency hA.integrable_Y1 hA.integrable_Y0 have hYind_int : Integrable (fun ω => S.toPOBackdoorSystem.factualY ω * S.toPOBackdoorSystem.dVar.indicator false ω) P.μ := S.toPOBackdoorSystem.dVar.integrable_mul_indicator false (measurableSet_singleton false) hY_int have hμ₀x_int : Integrable (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) P.μ := by have hcate_int : Integrable (S.toPOBackdoorSystem.CATE false) P.μ := by unfold POBackdoorSystem.CATE exact MeasureTheory.integrable_condExp exact hcate_int.congr (S.μ₀_compat hA) have hμ₀x_meas : Measurable (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) := S.μ₀_meas.comp S.toPOBackdoorSystem.measurable_factualX have hμ₀ind_int : Integrable (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator false ω) P.μ := S.toPOBackdoorSystem.dVar.integrable_mul_indicator false (measurableSet_singleton false) hμ₀x_int have hresid_int : Integrable (fun ω => S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω))) P.μ := by have hYind_int' : Integrable (fun ω => S.toPOBackdoorSystem.dVar.indicator false ω * S.toPOBackdoorSystem.factualY ω) P.μ := by simpa [mul_comm] using hYind_int have hμ₀ind_int' : Integrable (fun ω => S.toPOBackdoorSystem.dVar.indicator false ω * S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) P.μ := by simpa [mul_comm] using hμ₀ind_int have hsub := hYind_int'.sub hμ₀ind_int' refine hsub.congr ?_ refine Filter.Eventually.of_forall (fun ω => ?_) change S.toPOBackdoorSystem.dVar.indicator false ω * S.toPOBackdoorSystem.factualY ω - S.toPOBackdoorSystem.dVar.indicator false ω * S.μ₀_val (S.toPOBackdoorSystem.factualX ω) = S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) ring have hcondexp_pull := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (μ := P.μ) (m := S.toPOBackdoorSystem.sigmaX) hg_sm h_int hresid_int have hgresid_ce_zero : P.μ[fun ω => g (S.toPOBackdoorSystem.factualX ω) * (S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω))) | S.toPOBackdoorSystem.sigmaX] =ᵐ[P.μ] (fun _ => (0 : ℝ)) := by refine hcondexp_pull.trans ?_ filter_upwards [residual_false_condExp_zero S hA] with ω hω have : ((fun ω' => g (S.toPOBackdoorSystem.factualX ω')) * P.μ[fun ω' => S.toPOBackdoorSystem.dVar.indicator false ω' * (S.toPOBackdoorSystem.factualY ω' - S.μ₀_val (S.toPOBackdoorSystem.factualX ω')) | S.toPOBackdoorSystem.sigmaX]) ω = 0 := by rw [Pi.mul_apply, hω, mul_zero] exact this calc ∫ ω, g (S.toPOBackdoorSystem.factualX ω) * (S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω))) ∂P.μ = ∫ ω, P.μ[fun ω => g (S.toPOBackdoorSystem.factualX ω) * (S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω))) | S.toPOBackdoorSystem.sigmaX] ω ∂P.μ := by rw [MeasureTheory.integral_condExp S.toPOBackdoorSystem.sigmaX_le] _ = ∫ _, (0 : ℝ) ∂P.μ := MeasureTheory.integral_congr_ae hgresid_ce_zero _ = 0 := MeasureTheory.integral_zero _ _
Causalean.Estimation.ATT.TreatedEstimationSystem.weighted_residual_false_integral_zero · Causalean/Estimation/ATT/Score/ScorePullout.lean:231 · uses TreatedEstimationSystem , ATTAssumptions , dVar , factualX , factualY , POSystem , indicator
lemma indicator_to_propScore_integral reviewed
Causalean.Estimation.ATT.TreatedEstimationSystem

Propensity-score pull-out for the treatment indicator (ATT). Fix a treatment label d, under the one-sided back-door ATT assumptions. If f : γ → ℝ is measurable and the product f(X) · 1{D=d} is integrable, then replacing the treatment indicator 1{D=d} by the value-space propensity — e_val when d is true, 1 − e_val when d is false — inside the integral leaves the integral unchanged.

Formal statement
P :
shared
γ :
Type u_1
shared
hA :
S.toPOBackdoorSystem.ATTAssumptions
d :
f :
γ → ℝ
hf_meas :
hf_ind_int :
Integrable (fun ω => f (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator d ω) P.μ
∫ ω, f (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator d ω ∂P.μ
= ∫ ω, f (S.toPOBackdoorSystem.factualX ω) * (if d = true then S.e_val (S.toPOBackdoorSystem.factualX ω) else 1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) ∂P.μ
Proof (Lean source)
-- Outline: same proof recipe as the ATE counterpart. Pull `f(X)` out of -- `μ[·|σ(X)]`, apply the appropriate `propScore_eq_e_val_ae` / -- `propScore_false_eq_one_minus_e_val_ae` substitution, and re-integrate. lemma indicator_to_propScore_integral (S : TreatedEstimationSystem P γ) (hA : S.toPOBackdoorSystem.ATTAssumptions) (d : Bool) (f : γ → ℝ) (hf_meas : Measurable f) (hf_ind_int : Integrable (fun ω => f (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator d ω) P.μ) : ∫ ω, f (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator d ω ∂P.μ = ∫ ω, f (S.toPOBackdoorSystem.factualX ω) * (if d = true then S.e_val (S.toPOBackdoorSystem.factualX ω) else 1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) ∂P.μ := by have hf_sm : StronglyMeasurable[S.toPOBackdoorSystem.sigmaX] (fun ω => f (S.toPOBackdoorSystem.factualX ω)) := by change StronglyMeasurable[ comap S.toPOBackdoorSystem.factualX inferInstance] (fun ω => f (S.toPOBackdoorSystem.factualX ω)) exact (hf_meas.comp (comap_measurable S.toPOBackdoorSystem.factualX)).stronglyMeasurable have hind_int : Integrable (S.toPOBackdoorSystem.dVar.indicator d) P.μ := S.toPOBackdoorSystem.dVar.integrable_indicator d (measurableSet_singleton d) have hCE_pull := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (μ := P.μ) (m := S.toPOBackdoorSystem.sigmaX) hf_sm hf_ind_int hind_int have hprop : S.toPOBackdoorSystem.propScore d =ᵐ[P.μ] (fun ω => if d = true then S.e_val (S.toPOBackdoorSystem.factualX ω) else 1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) := by cases d · simpa using propScore_false_eq_one_minus_e_val_ae S hA · simpa using propScore_eq_e_val_ae S hA have hCE_replace : P.μ[fun ω => f (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator d ω | S.toPOBackdoorSystem.sigmaX] =ᵐ[P.μ] (fun ω => f (S.toPOBackdoorSystem.factualX ω) * (if d = true then S.e_val (S.toPOBackdoorSystem.factualX ω) else 1 - S.e_val (S.toPOBackdoorSystem.factualX ω))) := by refine hCE_pull.trans ?_ filter_upwards [hprop] with ω hω have hω' : P.μ[S.toPOBackdoorSystem.dVar.indicator d | S.toPOBackdoorSystem.sigmaX] ω = (if d = true then S.e_val (S.toPOBackdoorSystem.factualX ω) else 1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) := hω rw [Pi.mul_apply, hω'] calc ∫ ω, f (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator d ω ∂P.μ = ∫ ω, P.μ[fun ω => f (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator d ω | S.toPOBackdoorSystem.sigmaX] ω ∂P.μ := (MeasureTheory.integral_condExp S.toPOBackdoorSystem.sigmaX_le).symm _ = ∫ ω, f (S.toPOBackdoorSystem.factualX ω) * (if d = true then S.e_val (S.toPOBackdoorSystem.factualX ω) else 1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) ∂P.μ := MeasureTheory.integral_congr_ae hCE_replace
Causalean.Estimation.ATT.TreatedEstimationSystem.indicator_to_propScore_integral · Causalean/Estimation/ATT/Score/ScorePullout.lean:341 · uses TreatedEstimationSystem , ATTAssumptions , dVar , factualX , POSystem , indicator
5 supporting declarations (lemmas, instances)
  • measurable_ipwWeight_false lemma — Measurability of the value-space IPW weight e/(1−e).
    P :
    shared
    γ :
    Type u_1
    shared
    Measurable S.ipwWeight_false
    Proof (Lean source)
    @[fun_prop] lemma measurable_ipwWeight_false (S : TreatedEstimationSystem P γ) : Measurable S.ipwWeight_false := S.e_meas.div (measurable_const.sub S.e_meas)
    Causalean.Estimation.ATT.TreatedEstimationSystem.measurable_ipwWeight_false · Causalean/Estimation/ATT/Score/ScorePullout.lean:50
  • propScore_false_ae lemma — propScore false =ᵐ 1 − propScore true. The indicator pair sums to one pointwise, conditional expectation is linear and preserves constants.
    P :
    shared
    γ :
    Type u_1
    shared
    _hA :
    S.toPOBackdoorSystem.ATTAssumptions
    S.toPOBackdoorSystem.propScore false
    =ᵐ[P.μ] (fun ω => 1 - S.toPOBackdoorSystem.propScore true ω)
    Proof (Lean source)
    -- Outline: mirror `BackdoorEstimationSystem.propScore_false_ae` from -- `Estimation/ATE/Score/ScorePullout.lean`. Uses `dVar.indicator_add_indicator_not` -- + `condExp_const` + `condExp_add` + `linarith` on the pointwise sum. lemma propScore_false_ae (S : TreatedEstimationSystem P γ) (_hA : S.toPOBackdoorSystem.ATTAssumptions) : S.toPOBackdoorSystem.propScore false =ᵐ[P.μ] (fun ω => 1 - S.toPOBackdoorSystem.propScore true ω) := by have hindD_integrable : ∀ e : Bool, Integrable (S.toPOBackdoorSystem.dVar.indicator e) P.μ := fun e => S.toPOBackdoorSystem.dVar.integrable_indicator e (measurableSet_singleton e) have hsum_ptwise : (fun ω => S.toPOBackdoorSystem.dVar.indicator true ω + S.toPOBackdoorSystem.dVar.indicator false ω) = (fun _ : P.Ω => (1 : ℝ)) := by funext ω exact S.toPOBackdoorSystem.dVar.indicator_add_indicator_not ω have hsum : P.μ[fun ω => S.toPOBackdoorSystem.dVar.indicator true ω + S.toPOBackdoorSystem.dVar.indicator false ω | S.toPOBackdoorSystem.sigmaX] =ᵐ[P.μ] (fun _ => (1 : ℝ)) := by rw [hsum_ptwise] exact Filter.EventuallyEq.of_eq (MeasureTheory.condExp_const S.toPOBackdoorSystem.sigmaX_le (1 : ℝ)) have hadd : P.μ[fun ω => S.toPOBackdoorSystem.dVar.indicator true ω + S.toPOBackdoorSystem.dVar.indicator false ω | S.toPOBackdoorSystem.sigmaX] =ᵐ[P.μ] P.μ[S.toPOBackdoorSystem.dVar.indicator true | S.toPOBackdoorSystem.sigmaX] + P.μ[S.toPOBackdoorSystem.dVar.indicator false | S.toPOBackdoorSystem.sigmaX] := MeasureTheory.condExp_add (hindD_integrable true) (hindD_integrable false) S.toPOBackdoorSystem.sigmaX filter_upwards [hsum, hadd] with ω h1 h2 have hsum_ω : P.μ[S.toPOBackdoorSystem.dVar.indicator true | S.toPOBackdoorSystem.sigmaX] ω + P.μ[S.toPOBackdoorSystem.dVar.indicator false | S.toPOBackdoorSystem.sigmaX] ω = 1 := by rw [← Pi.add_apply, ← h2, h1] unfold POBackdoorSystem.propScore linarith
    Causalean.Estimation.ATT.TreatedEstimationSystem.propScore_false_ae · Causalean/Estimation/ATT/Score/ScorePullout.lean:56
  • propScore_eq_e_val_ae lemma — The treated-arm propensity propScore true factors through factualX via the value-space e_val. Direct restatement of S.e_compat.
    P :
    shared
    γ :
    Type u_1
    shared
    _hA :
    S.toPOBackdoorSystem.ATTAssumptions
    S.toPOBackdoorSystem.propScore true
    =ᵐ[P.μ] (fun ω => S.e_val (S.toPOBackdoorSystem.factualX ω))
    Proof (Lean source)
    lemma propScore_eq_e_val_ae (S : TreatedEstimationSystem P γ) (_hA : S.toPOBackdoorSystem.ATTAssumptions) : S.toPOBackdoorSystem.propScore true =ᵐ[P.μ] (fun ω => S.e_val (S.toPOBackdoorSystem.factualX ω)) := S.e_compat
    Causalean.Estimation.ATT.TreatedEstimationSystem.propScore_eq_e_val_ae · Causalean/Estimation/ATT/Score/ScorePullout.lean:104
  • propScore_false_eq_one_minus_e_val_ae lemma — Control-arm propensity factors through factualX as 1 − e_val.
    P :
    shared
    γ :
    Type u_1
    shared
    hA :
    S.toPOBackdoorSystem.ATTAssumptions
    S.toPOBackdoorSystem.propScore false
    =ᵐ[P.μ] (fun ω => 1 - S.e_val (S.toPOBackdoorSystem.factualX ω))
    Proof (Lean source)
    -- Outline: combine `propScore_false_ae` with `S.e_compat`; pointwise rewrite -- `1 − propScore true ω = 1 − e_val (factualX ω)`. lemma propScore_false_eq_one_minus_e_val_ae (S : TreatedEstimationSystem P γ) (hA : S.toPOBackdoorSystem.ATTAssumptions) : S.toPOBackdoorSystem.propScore false =ᵐ[P.μ] (fun ω => 1 - S.e_val (S.toPOBackdoorSystem.factualX ω)) := by filter_upwards [propScore_false_ae S hA, S.e_compat] with ω hf hc simp [hf, hc]
    Causalean.Estimation.ATT.TreatedEstimationSystem.propScore_false_eq_one_minus_e_val_ae · Causalean/Estimation/ATT/Score/ScorePullout.lean:113
  • residual_false_condExp_zero lemma — The σ(X)-conditional expectation of 1_{D=false}·(Y − μ₀(X)) vanishes a.s. The witness Y(false) =ᵐ μ₀_val ∘ factualX comes from μ₀_compat together with consistency on {D = false}.
    P :
    shared
    γ :
    Type u_1
    shared
    hA :
    S.toPOBackdoorSystem.ATTAssumptions
    P.μ[fun ω => S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) | S.toPOBackdoorSystem.sigmaX]
    =ᵐ[P.μ] (fun _ => (0 : ℝ))
    Proof (Lean source)
    -- Outline: mirror `cond_exp_residual_zero` (ATE/MeanZero) for `d = false`. -- Use consistency to replace `factualY` by `YofD false` on `{D=false}`, -- factor σ(X)-measurables out of conditional expectation, and apply -- `μ₀_compat`. lemma residual_false_condExp_zero (S : TreatedEstimationSystem P γ) (hA : S.toPOBackdoorSystem.ATTAssumptions) : P.μ[fun ω => S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) | S.toPOBackdoorSystem.sigmaX] =ᵐ[P.μ] (fun _ => (0 : ℝ)) := by have hY_int : Integrable S.toPOBackdoorSystem.factualY P.μ := S.toPOBackdoorSystem.integrable_factualY_of_consistency hA.consistency hA.integrable_Y1 hA.integrable_Y0 have hYind_int : Integrable (fun ω => S.toPOBackdoorSystem.factualY ω * S.toPOBackdoorSystem.dVar.indicator false ω) P.μ := S.toPOBackdoorSystem.dVar.integrable_mul_indicator false (measurableSet_singleton false) hY_int have hμ₀x_int : Integrable (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) P.μ := by have hcate_int : Integrable (S.toPOBackdoorSystem.CATE false) P.μ := by unfold POBackdoorSystem.CATE exact MeasureTheory.integrable_condExp exact hcate_int.congr (S.μ₀_compat hA) have hμ₀x_meas : Measurable (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) := S.μ₀_meas.comp S.toPOBackdoorSystem.measurable_factualX have hμ₀ind_int : Integrable (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator false ω) P.μ := S.toPOBackdoorSystem.dVar.integrable_mul_indicator false (measurableSet_singleton false) hμ₀x_int have hres_eq : (fun ω => S.toPOBackdoorSystem.dVar.indicator false ω * (S.toPOBackdoorSystem.factualY ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω))) = (fun ω => S.toPOBackdoorSystem.factualY ω * S.toPOBackdoorSystem.dVar.indicator false ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator false ω) := by funext ω ring have hsub : P.μ[fun ω => S.toPOBackdoorSystem.factualY ω * S.toPOBackdoorSystem.dVar.indicator false ω - S.μ₀_val (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator false ω | S.toPOBackdoorSystem.sigmaX] =ᵐ[P.μ] P.μ[fun ω => S.toPOBackdoorSystem.factualY ω * S.toPOBackdoorSystem.dVar.indicator false ω | S.toPOBackdoorSystem.sigmaX] - P.μ[fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator false ω | S.toPOBackdoorSystem.sigmaX] := MeasureTheory.condExp_sub hYind_int hμ₀ind_int S.toPOBackdoorSystem.sigmaX have hYce : P.μ[fun ω => S.toPOBackdoorSystem.factualY ω * S.toPOBackdoorSystem.dVar.indicator false ω | S.toPOBackdoorSystem.sigmaX] =ᵐ[P.μ] S.toPOBackdoorSystem.propScore false * S.toPOBackdoorSystem.CATE false := by have hcate := S.control_cate_backdoor hA filter_upwards [hcate, propScore_false_ne_zero S hA] with ω hcat hneω unfold POBackdoorSystem.adjustedCE at hcat rw [Pi.mul_apply, hcat] field_simp [hneω] have hμ₀x_sm : StronglyMeasurable[S.toPOBackdoorSystem.sigmaX] (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) := by change StronglyMeasurable[ comap S.toPOBackdoorSystem.factualX inferInstance] (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) exact (S.μ₀_meas.comp (comap_measurable S.toPOBackdoorSystem.factualX)).stronglyMeasurable have hind_int : Integrable (S.toPOBackdoorSystem.dVar.indicator false) P.μ := S.toPOBackdoorSystem.dVar.integrable_indicator false (measurableSet_singleton false) have hμce : P.μ[fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω) * S.toPOBackdoorSystem.dVar.indicator false ω | S.toPOBackdoorSystem.sigmaX] =ᵐ[P.μ] (fun ω => S.μ₀_val (S.toPOBackdoorSystem.factualX ω)) * S.toPOBackdoorSystem.propScore false := by have hpull := MeasureTheory.condExp_mul_of_stronglyMeasurable_left (μ := P.μ) (m := S.toPOBackdoorSystem.sigmaX) hμ₀x_sm hμ₀ind_int hind_int simp only [POBackdoorSystem.propScore] exact hpull rw [hres_eq] refine hsub.trans ?_ filter_upwards [hYce, hμce, S.μ₀_compat hA] with ω hy hmu hcompat have hcate_comp : S.toPOBackdoorSystem.CATE false ω = S.μ₀_val (S.toPOBackdoorSystem.factualX ω) := by simpa [POBackdoorSystem.CATE] using hcompat rw [Pi.sub_apply, hy, hmu, Pi.mul_apply, Pi.mul_apply, hcate_comp] ring
    Causalean.Estimation.ATT.TreatedEstimationSystem.residual_false_condExp_zero · Causalean/Estimation/ATT/Score/ScorePullout.lean:130