PO.ID.Partial.Lee

Lee bounds: trimming bounds on treatment effects under sample selection with monotone response.

Setup 14 core · 8 supporting This file defines the potential-outcome data layer for Lee sample-selection bounds. ★ POLeeSystem★ measurable_YofA

Lee Bounds Setup

This file defines the potential-outcome data layer for Lee sample-selection bounds. It provides the treatment, selection, and outcome variables, their factual and counterfactual versions, the observed selected cells, and basic measurability facts.

structure POLeeSystem reviewed
Causalean.PO

The data layer for Lee (2009) bounds: a treatment-selection model in which a binary treatment A affects whether an outcome Y is observed at all, through a binary sample-selection indicator Sel. The outcome Y is only meaningful when Sel = true (e.g. a wage observed only for the employed), so the treatment effect on Y among the always-selected subpopulation is only partially identified — the object the Lee bounds bracket. Formally this packages, inside an ambient PO system P, the three nodes A, Sel, Y, the measurable identifications of their value spaces with Bool/Bool/, and the fact that the three nodes are distinct (def:po-lee-system).

Definition (Lean source)
P :
The binary treatment node (an index into the ambient system's variables).
A :
P.V
The binary sample-selection / observability indicator node: `Y` is observed iff `Sel = true`.
Sel :
P.V
The real-valued outcome node (only meaningful where `Sel = true`).
Y :
P.V
The treatment's value space is measurably equivalent to `Bool`.
hAbool :
P.X A ≃ᵐ Bool
The selection indicator's value space is measurably equivalent to `Bool`.
hSelbool :
P.X Sel ≃ᵐ Bool
The outcome's value space is measurably equivalent to `ℝ`.
hYreal :
P.X Y ≃ᵐ ℝ
Treatment and selection are distinct nodes.
hASel :
A ≠ Sel
Treatment and outcome are distinct nodes.
hAY :
A ≠ Y
Selection and outcome are distinct nodes.
hSelY :
Sel ≠ Y
def aVar reviewed
Causalean.PO.POLeeSystem

Treatment packaged as a POVar valued in Bool.

Definition (Lean source)
def aVar : POVar P Bool := ⟨S.A, S.hAbool⟩
def selVar reviewed
Causalean.PO.POLeeSystem

Selection indicator packaged as a POVar valued in Bool.

Definition (Lean source)
def selVar : POVar P Bool := ⟨S.Sel, S.hSelbool⟩
def yVar reviewed
Causalean.PO.POLeeSystem

Outcome packaged as a POVar valued in .

Definition (Lean source)
def yVar : POVar P ℝ := ⟨S.Y, S.hYreal⟩
def SelOfA reviewed
Causalean.PO.POLeeSystem

Counterfactual selection under treatment arm a.

Definition (Lean source)
noncomputable def SelOfA (a : Bool) : P.Ω → Bool := S.selVar.cfUnder S.aVar a
def YofA reviewed
Causalean.PO.POLeeSystem

Counterfactual outcome under treatment arm a.

Definition (Lean source)
noncomputable def YofA (a : Bool) : P.Ω → ℝ := S.yVar.cfUnder S.aVar a
def factualA reviewed
Causalean.PO.POLeeSystem

Factual treatment.

Definition (Lean source)
noncomputable def factualA : P.Ω → Bool := S.aVar.factual
Causalean.PO.POLeeSystem.factualA · Causalean/PO/ID/Partial/Lee/Setup.lean:92 · uses POLeeSystem , POSystem
def factualSel reviewed
Causalean.PO.POLeeSystem

Factual selection indicator.

Definition (Lean source)
noncomputable def factualSel : P.Ω → Bool := S.selVar.factual
Causalean.PO.POLeeSystem.factualSel · Causalean/PO/ID/Partial/Lee/Setup.lean:95 · uses POLeeSystem , POSystem
def factualY reviewed
Causalean.PO.POLeeSystem

Factual outcome.

Definition (Lean source)
noncomputable def factualY : P.Ω → ℝ := S.yVar.factual
Causalean.PO.POLeeSystem.factualY · Causalean/PO/ID/Partial/Lee/Setup.lean:98 · uses POLeeSystem , POSystem
def aEvent reviewed
Causalean.PO.POLeeSystem

The event {A = a}.

Definition (Lean source)
def aEvent (a : Bool) : Set P.Ω := S.aVar.event a
def selEvent reviewed
Causalean.PO.POLeeSystem

The event {Sel = s}.

Definition (Lean source)
def selEvent (s : Bool) : Set P.Ω := S.selVar.event s
Causalean.PO.POLeeSystem.selEvent · Causalean/PO/ID/Partial/Lee/Setup.lean:104 · uses POLeeSystem , POSystem
def selectedTreated reviewed
Causalean.PO.POLeeSystem

The selected-treated cell {A = true, Sel = true}.

Definition (Lean source)
def selectedTreated : Set P.Ω := S.aEvent true ∩ S.selEvent true
Causalean.PO.POLeeSystem.selectedTreated · Causalean/PO/ID/Partial/Lee/Setup.lean:107 · uses POLeeSystem , POSystem
def selectedControl reviewed
Causalean.PO.POLeeSystem

The selected-control cell {A = false, Sel = true}.

Definition (Lean source)
def selectedControl : Set P.Ω := S.aEvent false ∩ S.selEvent true
Causalean.PO.POLeeSystem.selectedControl · Causalean/PO/ID/Partial/Lee/Setup.lean:110 · uses POLeeSystem , POSystem
lemma measurable_YofA reviewed
Causalean.PO.POLeeSystem

For a fixed treatment arm a, the counterfactual outcome Y(a) is measurable.

Formal statement
a :
Measurable (S.YofA a)
Proof (Lean source)
lemma measurable_YofA (a : Bool) : Measurable (S.YofA a) := S.yVar.measurable_cfUnder S.aVar a
Causalean.PO.POLeeSystem.measurable_YofA · Causalean/PO/ID/Partial/Lee/Setup.lean:119 · uses POLeeSystem , YofA , POSystem
8 supporting declarations (lemmas, instances)
Assumptions 3 core · 1 supporting This file defines the assumptions used for Lee sample-selection bounds. ★ integrableY

Lee Bounds Assumptions

This file defines the assumptions used for Lee sample-selection bounds. The baseline bundle contains consistency, pair-level random assignment, positivity, finiteness, and integrability conditions, while monotone selection is kept as a separate shape restriction.

The structure BaseAssumptions stores the consistency axiom, distributional random-assignment condition for (Y(a), Sel(a)), positive selected cells and treatment arms, finiteness of selected-cell measures, and integrability of the two potential outcomes. Its helper lemmas integrable_YofA and integrableY recover binary-indexed arm integrability and factual-outcome integrability. The structure MonotoneSelection records the Lee monotonicity condition Sel(0) <= Sel(1) almost surely.

structure BaseAssumptions reviewed
Causalean.PO.POLeeSystem

Lee sample-selection baseline assumptions -- def:po-lee-assumptions.

Definition (Lean source)
S :
The PO system satisfies the consistency axiom.
consistency :
P.Consistency
Pair-level random assignment: for each `a : Bool`, the factual treatment `A` is independent of the pair `(Y(a), Sel(a))`. This is weaker than the doc's 4-tuple joint indep but strictly stronger than mean independence; it carries the full conditional distribution of `(Y(a), Sel(a))` given `A`, which Lee trimming requires.
randAssign :
∀ a : Bool, IndepFun S.factualA (fun ω => (S.YofA a ω, S.SelOfA a ω)) P.μ
Selected-treated cell `{A = true, Sel = true}` has positive measure.
posSelectedTreated :
P.μ S.selectedTreated ≠ 0
Selected-control cell `{A = false, Sel = true}` has positive measure.
posSelectedControl :
P.μ S.selectedControl ≠ 0
The treated arm `{A = true}` has positive measure (denominator of `p₁`).
posATrue :
P.μ (S.aEvent true) ≠ 0
The control arm `{A = false}` has positive measure (denominator of `p₀`).
posAFalse :
P.μ (S.aEvent false) ≠ 0
Selected-treated cell has finite measure.
posSelTrFinite :
P.μ S.selectedTreated ≠ ⊤
Selected-control cell has finite measure.
posSelCtFinite :
P.μ S.selectedControl ≠ ⊤
`Y(1)` is integrable.
integrableY1 :
Integrable (S.YofA true) P.μ
`Y(0)` is integrable.
integrableY0 :
Integrable (S.YofA false) P.μ
Causalean.PO.POLeeSystem.BaseAssumptions · Causalean/PO/ID/Partial/Lee/Assumptions.lean:53 · uses POLeeSystem , POSystem
lemma integrableY reviewed
Causalean.PO.POLeeSystem.BaseAssumptions

Under the baseline Lee sample-selection assumptions — consistency, pair-level random assignment, positive and finite selected cells, and integrability of both potential outcomes Y(0), Y(1), the factual outcome Y is integrable, obtained from the arm integrability of Y(0), Y(1) via consistency (factualY = Σ_a Y(a)·1{A=a} a.e.), so it need not be assumed separately.

Formal statement
hA :
S.BaseAssumptions
Integrable S.factualY P.μ
Proof (Lean source)
lemma integrableY (hA : S.BaseAssumptions) : Integrable S.factualY P.μ := by have hY1_ind : Integrable (fun ω => S.YofA true ω * S.aVar.indicator true ω) P.μ := S.aVar.integrable_mul_indicator true (measurableSet_singleton _) hA.integrableY1 have hY0_ind : Integrable (fun ω => S.YofA false ω * S.aVar.indicator false ω) P.μ := S.aVar.integrable_mul_indicator false (measurableSet_singleton _) hA.integrableY0 refine (hY1_ind.add hY0_ind).congr ?_ filter_upwards with ω have htrue := congr_fun (POVar.factual_mul_indicator_eq_cfUnder_mul_indicator_fn hA.consistency S.yVar S.aVar true (Ne.symm S.hAY)) ω have hfalse := congr_fun (POVar.factual_mul_indicator_eq_cfUnder_mul_indicator_fn hA.consistency S.yVar S.aVar false (Ne.symm S.hAY)) ω have htrue' : S.YofA true ω * S.aVar.indicator true ω = S.factualY ω * S.aVar.indicator true ω := by simpa [POLeeSystem.YofA, POLeeSystem.factualY] using htrue.symm have hfalse' : S.YofA false ω * S.aVar.indicator false ω = S.factualY ω * S.aVar.indicator false ω := by simpa [POLeeSystem.YofA, POLeeSystem.factualY] using hfalse.symm have hsum := S.aVar.indicator_add_indicator_not ω calc S.YofA true ω * S.aVar.indicator true ω + S.YofA false ω * S.aVar.indicator false ω = S.factualY ω * S.aVar.indicator true ω + S.factualY ω * S.aVar.indicator false ω := by rw [htrue', hfalse'] _ = S.factualY ω * (S.aVar.indicator true ω + S.aVar.indicator false ω) := by ring _ = S.factualY ω := by rw [hsum, mul_one]
Causalean.PO.POLeeSystem.BaseAssumptions.integrableY · Causalean/PO/ID/Partial/Lee/Assumptions.lean:92 · uses POLeeSystem , BaseAssumptions , factualY , POSystem
structure MonotoneSelection reviewed
Causalean.PO.POLeeSystem

Monotone sample selection -- def:po-lee-assumptions, item 3. Sel(0) ≤ Sel(1) almost surely (with interpreted on Bool via the canonical false ≤ true order).

Definition (Lean source)
S :
monotone :
∀ᵐ ω ∂P.μ, S.SelOfA false ω ≤ S.SelOfA true ω
Causalean.PO.POLeeSystem.MonotoneSelection · Causalean/PO/ID/Partial/Lee/Assumptions.lean:130 · uses POLeeSystem , POSystem
1 supporting declaration (lemmas, instances)
Principal­Strata 6 core · 8 supporting This file defines the latent principal strata for Lee sample-selection bounds. ★ harmedSelected_ae_empty

Lee Principal Strata

This file defines the latent principal strata for Lee sample-selection bounds. It proves measurability and the monotone-selection event identities that relate the always-selected and treatment-induced-selected strata to observed and counterfactual selected sets.

def alwaysSelected reviewed
Causalean.PO.POLeeSystem

The always-selected stratum contains units who would be selected under both control and treatment.

Definition (Lean source)
def alwaysSelected : Set P.Ω := {ω | S.SelOfA false ω = true ∧ S.SelOfA true ω = true}
Causalean.PO.POLeeSystem.alwaysSelected · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:37 · uses POLeeSystem , POSystem
def helpedSelected reviewed
Causalean.PO.POLeeSystem

The helped-selected stratum contains units selected under treatment but not under control.

Definition (Lean source)
def helpedSelected : Set P.Ω := {ω | S.SelOfA false ω = false ∧ S.SelOfA true ω = true}
Causalean.PO.POLeeSystem.helpedSelected · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:44 · uses POLeeSystem , POSystem
def harmedSelected reviewed
Causalean.PO.POLeeSystem

The harmed-selected stratum contains units selected under control but not under treatment.

Definition (Lean source)
def harmedSelected : Set P.Ω := {ω | S.SelOfA false ω = true ∧ S.SelOfA true ω = false}
Causalean.PO.POLeeSystem.harmedSelected · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:51 · uses POLeeSystem , POSystem
def selOfATrueSet reviewed
Causalean.PO.POLeeSystem

The latent selected-under-treatment set contains units who would be selected if treated.

Definition (Lean source)
def selOfATrueSet : Set P.Ω := {ω | S.SelOfA true ω = true}
def selOfAFalseSet reviewed
Causalean.PO.POLeeSystem

The latent selected-under-control set contains units who would be selected if untreated.

Definition (Lean source)
def selOfAFalseSet : Set P.Ω := {ω | S.SelOfA false ω = true}
Causalean.PO.POLeeSystem.selOfAFalseSet · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:88 · uses POLeeSystem , POSystem
lemma harmedSelected_ae_empty reviewed
Causalean.PO.POLeeSystem

If sample selection is monotone, i.e. selection under control implies selection under treatment almost surely (Sel(0) ≤ Sel(1)), then the harmed-selected stratum — units who would be selected under control but not under treatment — has probability zero.

Formal statement
hMono :
∀ᵐ ω ∂P.μ, S.SelOfA false ω ≤ S.SelOfA true ω
P.μ S.harmedSelected = 0
Proof (Lean source)
lemma harmedSelected_ae_empty (hMono : ∀ᵐ ω ∂P.μ, S.SelOfA false ω ≤ S.SelOfA true ω) : P.μ S.harmedSelected = 0 := by -- Monotonicity says that on a co-null set, SelOfA false ω ≤ SelOfA true ω -- (with ≤ on Bool meaning falsetrue and falsefalse and truetrue, -- but NOT truefalse). On harmedSelected, SelOfA false = true and -- SelOfA true = false, contradicting the inequality. So -- harmedSelected ⊆ {ω | ¬(SelOfA false ω ≤ SelOfA true ω)} which is null. -- Use `measure_mono_null` against the complement of the a.s. set, plus -- `Bool.not_le` (or a direct case split) to discharge the implication. have hNull : P.μ {ω | ¬ S.SelOfA false ω ≤ S.SelOfA true ω} = 0 := by rwa [ae_iff] at hMono exact MeasureTheory.measure_mono_null (by intro ω hω rcases hω with ⟨h0, h1⟩ simp [h0, h1]) hNull
8 supporting declarations (lemmas, instances)
  • measurableSet_alwaysSelected lemma — The always-selected stratum is measurable.
    MeasurableSet S.alwaysSelected
    Proof (Lean source)
    lemma measurableSet_alwaysSelected : MeasurableSet S.alwaysSelected := by refine MeasurableSet.inter ?_ ?_ · exact (S.measurable_SelOfA false) (measurableSet_singleton true) · exact (S.measurable_SelOfA true) (measurableSet_singleton true)
    Causalean.PO.POLeeSystem.measurableSet_alwaysSelected · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:60
  • measurableSet_helpedSelected lemma — The helped-selected stratum is measurable.
    MeasurableSet S.helpedSelected
    Proof (Lean source)
    lemma measurableSet_helpedSelected : MeasurableSet S.helpedSelected := by refine MeasurableSet.inter ?_ ?_ · exact (S.measurable_SelOfA false) (measurableSet_singleton false) · exact (S.measurable_SelOfA true) (measurableSet_singleton true)
    Causalean.PO.POLeeSystem.measurableSet_helpedSelected · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:66
  • measurableSet_harmedSelected lemma — The harmed-selected stratum is measurable.
    MeasurableSet S.harmedSelected
    Proof (Lean source)
    lemma measurableSet_harmedSelected : MeasurableSet S.harmedSelected := by refine MeasurableSet.inter ?_ ?_ · exact (S.measurable_SelOfA false) (measurableSet_singleton true) · exact (S.measurable_SelOfA true) (measurableSet_singleton false)
    Causalean.PO.POLeeSystem.measurableSet_harmedSelected · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:72
  • measurableSet_selOfATrueSet lemma — The selected-under-treatment latent set is measurable.
    MeasurableSet S.selOfATrueSet
    Proof (Lean source)
    lemma measurableSet_selOfATrueSet : MeasurableSet S.selOfATrueSet := (S.measurable_SelOfA true) (measurableSet_singleton true)
    Causalean.PO.POLeeSystem.measurableSet_selOfATrueSet · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:84
  • measurableSet_selOfAFalseSet lemma — The selected-under-control latent set is measurable.
    MeasurableSet S.selOfAFalseSet
    Proof (Lean source)
    lemma measurableSet_selOfAFalseSet : MeasurableSet S.selOfAFalseSet := (S.measurable_SelOfA false) (measurableSet_singleton true)
    Causalean.PO.POLeeSystem.measurableSet_selOfAFalseSet · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:94
  • selOfATrueSet_eq_alwaysSelected_union_helpedSelected lemma — selOfATrueSet = alwaysSelected ∪ helpedSelected as a pure set equality (no a.s. needed -- the two RHS sets are disjoint and cover the LHS by case analysis on SelOfA false ω : Bool).
    S.selOfATrueSet = S.alwaysSelected ∪ S.helpedSelected
    Proof (Lean source)
    lemma selOfATrueSet_eq_alwaysSelected_union_helpedSelected : S.selOfATrueSet = S.alwaysSelected ∪ S.helpedSelected := by ext ω simp only [selOfATrueSet, alwaysSelected, helpedSelected, Set.mem_setOf_eq, Set.mem_union] constructor · intro h rcases (S.SelOfA false ω).eq_false_or_eq_true with h0 | h0 · exact inl ⟨h0, h⟩ · exact inr ⟨h0, h⟩ · rintro (⟨_, h⟩ | ⟨_, h⟩) <;> exact h
    Causalean.PO.POLeeSystem.selOfATrueSet_eq_alwaysSelected_union_helpedSelected · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:98
  • disjoint_alwaysSelected_helpedSelected lemma — alwaysSelected and helpedSelected are disjoint.
    Disjoint S.alwaysSelected S.helpedSelected
    Proof (Lean source)
    lemma disjoint_alwaysSelected_helpedSelected : Disjoint S.alwaysSelected S.helpedSelected := by rw [Set.disjoint_iff_inter_eq_empty] ext ω refine ⟨?_, fun h => absurd h (Set.notMem_empty _)⟩ rintro ⟨⟨h1, _⟩, ⟨h2, _⟩⟩ exact absurd (h1.symm.trans h2) (by decide)
    Causalean.PO.POLeeSystem.disjoint_alwaysSelected_helpedSelected · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:113
  • selOfAFalseSet_ae_eq_alwaysSelected lemma — Under monotone sample selection, {Sel(0)=true} =ᵐ alwaysSelected.
    hMono :
    ∀ᵐ ω ∂P.μ, S.SelOfA false ω ≤ S.SelOfA true ω
    S.selOfAFalseSet =ᵐ[P.μ] S.alwaysSelected
    Proof (Lean source)
    lemma selOfAFalseSet_ae_eq_alwaysSelected (hMono : ∀ᵐ ω ∂P.μ, S.SelOfA false ω ≤ S.SelOfA true ω) : S.selOfAFalseSet =ᵐ[P.μ] S.alwaysSelected := by -- The target equality is `{ω | SelOfA false ω = true} =ᵐ alwaysSelected`. -- alwaysSelected ⊆ {Sel(0)=true} is purely set-level (the first -- conjunct of alwaysSelected is exactly Sel(0)=true). -- For the reverse direction, on the co-null set where Sel(0) ≤ Sel(1), -- Sel(0)=true ⇒ Sel(1)=true (since true ≤ Sel(1) forces Sel(1)=true on Bool), -- so {Sel(0)=true} ⊆ alwaysSelected on that co-null set. -- Proof recipe: use `EventuallyEq` (i.e. `=ᵐ[μ]`) in the form -- `Set.eventuallyEq_iff_indicator` or just the symmetric-difference null -- characterisation, then bound the offending sym-diff by a subset of the -- complement of the a.s. set from `hMono`. filter_upwards [hMono] with ω hω apply propext simp only [selOfAFalseSet, alwaysSelected] constructor · intro hsel exact ⟨hsel, by have hsel' : S.SelOfA false ω = true := hsel cases htrue : S.SelOfA true ω · have hle : true ≤ false := by simpa [hsel', htrue] using hω exact elim ((by decide : ¬ (true ≤ false)) hle) · rfl⟩ · intro h exact h.1
    Causalean.PO.POLeeSystem.selOfAFalseSet_ae_eq_alwaysSelected · Causalean/PO/ID/Partial/Lee/PrincipalStrata.lean:154
Trim 10 core · 0 supporting This file defines the observable finite-support functionals used in Lee sample selection bounds.

Lee Finite-Support Trim Functionals

This file defines the observable finite-support functionals used in Lee sample selection bounds. It introduces the selected-cell probabilities p0 and p1, the trimming ratio rho, the selected-treated outcome mass function f1, feasible LeeTrimWeights, their mean functional Mw, the lower and upper trimmed means lowerTrimMean and upperTrimMean, and the selected-control mean m0.

The constructed always-selected trim weight and its identification theorem live in TrimWeight.lean and TrimMean.lean.

def pSelGivenA reviewed
Causalean.PO.POLeeSystem

Conditional selection probability p_a := P(Sel = true | A = a) expressed via the event-conditional expectation of the selection indicator.

Definition (Lean source)
noncomputable def pSelGivenA (a : Bool) : ℝ := eventCondExp P.μ (S.aEvent a) (S.selVar.indicator true)
Causalean.PO.POLeeSystem.pSelGivenA · Causalean/PO/ID/Partial/Lee/Trim.lean:45 · uses POLeeSystem , POSystem
def p0 reviewed
Causalean.PO.POLeeSystem

p₀ = P(Sel = true | A = false).

Definition (Lean source)
noncomputable def p0 : ℝ := S.pSelGivenA false
def p1 reviewed
Causalean.PO.POLeeSystem

p₁ = P(Sel = true | A = true).

Definition (Lean source)
noncomputable def p1 : ℝ := S.pSelGivenA true
def rho reviewed
Causalean.PO.POLeeSystem

The trimming ratio ρ := p₀ / p₁.

Definition (Lean source)
noncomputable def rho : ℝ := S.p0 / S.p1
def f1 reviewed
Causalean.PO.POLeeSystem

Observable conditional density of the outcome at y among selected treated units: f₁(y) := P(Y = y | A = true, Sel = true).

Definition (Lean source)
noncomputable def f1 (y : ℝ) : ℝ := eventCondExp P.μ S.selectedTreated (fun ω => if S.factualY ω = y then (1 : ℝ) else 0)
structure LeeTrimWeight reviewed
Causalean.PO.POLeeSystem

A Lee trim weight on a finite outcome support 𝒴 -- def:po-lee-trim.

Definition (Lean source)
𝒴 :
Finset
w :
ℝ → ℝ
nonneg :
∀ y, 0 ≤ w y
le_one :
∀ y, w y ≤ 1
zero_off :
∀ y
if
y ∉ 𝒴
then
w y = 0
sum_eq :
∑ y ∈ 𝒴, w y * S.f1 y = S.rho
Causalean.PO.POLeeSystem.LeeTrimWeight · Causalean/PO/ID/Partial/Lee/Trim.lean:66 · uses POLeeSystem , POSystem
def Mw reviewed
Causalean.PO.POLeeSystem

The trimmed mean associated with a Lee trim weight: M(w) := ρ⁻¹ · ∑_{y ∈ 𝒴} y · w(y) · f₁(y).

Definition (Lean source)
noncomputable def Mw {𝒴 : Finset ℝ} (wt : S.LeeTrimWeight 𝒴) : ℝ := (S.rho)⁻¹ * ∑ y ∈ 𝒴, y * wt.w y * S.f1 y
def lowerTrimMean reviewed
Causalean.PO.POLeeSystem

Lower trimmed mean underline_m₁ := inf_{w} M(w) ranging over Lee trim weights on 𝒴.

Definition (Lean source)
noncomputable def lowerTrimMean (𝒴 : Finset ℝ) : ℝ := sInf (range (fun wt : S.LeeTrimWeight 𝒴 => S.Mw wt))
Causalean.PO.POLeeSystem.lowerTrimMean · Causalean/PO/ID/Partial/Lee/Trim.lean:83 · uses POLeeSystem , POSystem
def upperTrimMean reviewed
Causalean.PO.POLeeSystem

Upper trimmed mean overline_m₁ := sup_{w} M(w) ranging over Lee trim weights on 𝒴.

Definition (Lean source)
noncomputable def upperTrimMean (𝒴 : Finset ℝ) : ℝ := sSup (range (fun wt : S.LeeTrimWeight 𝒴 => S.Mw wt))
Causalean.PO.POLeeSystem.upperTrimMean · Causalean/PO/ID/Partial/Lee/Trim.lean:88 · uses POLeeSystem , POSystem
def m0 reviewed
Causalean.PO.POLeeSystem

Observable selected-control outcome mean m₀ := E[Y | A = false, Sel = true].

Definition (Lean source)
noncomputable def m0 : ℝ := eventCondExp P.μ S.selectedControl S.factualY
Trim­Weight 2 core · 0 supporting This file constructs the outcome weights that represent the always-selected treated subpopulation in Lee's sample-selection bounds.

Lee Trim Weights

This file constructs the outcome weights that represent the always-selected treated subpopulation in Lee's sample-selection bounds. It defines the always-selected conditional mass function f1AS and constructs alwaysSelectedTrimWeight, the feasible Lee trim weight w(y) = rho * f1AS y / f1 y on the finite selected-treated support.

The construction uses the selected-treated mixture identity and the finite support transfer for the latent always-selected stratum. The mean identity and trimmed-mean sandwich are proved in TrimMean.lean and TrimBound.lean.

def f1AS reviewed
Causalean.PO.POLeeSystem

Conditional density of Y(1) on alwaysSelected evaluated at y, expressed as an eventCondExp of an indicator of Y(1) = y.

Definition (Lean source)
noncomputable def f1AS (y : ℝ) : ℝ := eventCondExp P.μ S.alwaysSelected (fun ω => if S.YofA true ω = y then (1 : ℝ) else 0)
def alwaysSelectedTrimWeight reviewed
Causalean.PO.POLeeSystem

The conditional sub-distribution of mass ρ of Y(1) | AS, viewed as a Lee trim weight on 𝒴. The construction yields a LeeTrimWeight whose mean Mw equals E[Y(1) | alwaysSelected].

Definition (Lean source)
noncomputable def alwaysSelectedTrimWeight (hA : S.BaseAssumptions) (hMono : S.MonotoneSelection) (𝒴 : Finset ℝ) (hSupp : ∀ᵐ ω ∂(P.μ.restrict S.selectedTreated), S.factualY ω ∈ 𝒴) : S.LeeTrimWeight 𝒴 := by classical have h_f1_nonneg : ∀ y, 0 ≤ S.f1 y := by intro y unfold f1 eventCondExp exact div_nonneg (MeasureTheory.setIntegral_nonneg S.measurableSet_selectedTreated (fun ω _ => by by_cases h : S.factualY ω = y <;> simp [h])) ENNReal.toReal_nonneg have h_f1AS_nonneg : ∀ y, 0 ≤ S.f1AS y := by intro y unfold f1AS eventCondExp exact div_nonneg (MeasureTheory.setIntegral_nonneg S.measurableSet_alwaysSelected (fun ω _ => by by_cases h : S.YofA true ω = y <;> simp [h])) ENNReal.toReal_nonneg have h_rho_nonneg : 0 ≤ S.rho := by have hp0 : 0 ≤ S.p0 := by unfold p0 pSelGivenA eventCondExp refine div_nonneg ?_ ENNReal.toReal_nonneg exact MeasureTheory.setIntegral_nonneg (S.measurableSet_aEvent false) (fun ω _ => by unfold POVar.indicator by_cases h : ω ∈ S.selVar.event true <;> simp [Set.indicator_of_mem, Set.indicator_of_notMem, h]) have hp1 : 0 ≤ S.p1 := by unfold p1 pSelGivenA eventCondExp refine div_nonneg ?_ ENNReal.toReal_nonneg exact MeasureTheory.setIntegral_nonneg (S.measurableSet_aEvent true) (fun ω _ => by unfold POVar.indicator by_cases h : ω ∈ S.selVar.event true <;> simp [Set.indicator_of_mem, Set.indicator_of_notMem, h]) exact div_nonneg hp0 hp1 have hSelectedControl : S.selectedControl = S.aEvent false ∩ S.selOfAFalseSet := by ext ω constructor · intro hω have hsel_cf : S.SelOfA false ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar false S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfAFalseSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ · intro hω have hsel_cf : S.SelOfA false ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar false S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfAFalseSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ have hSelFalseMass : (P.μ S.selectedControl).toReal = (P.μ (S.aEvent false)).toReal * (P.μ S.alwaysSelected).toReal := by have hselSet_pair : MeasurableSet {p : ℝ × Bool | p.2 = true} := measurable_snd (measurableSet_singleton true) have hden_enn : P.μ (S.aEvent false ∩ S.selOfAFalseSet) = P.μ (S.aEvent false) * P.μ S.selOfAFalseSet := by have hraw := (hA.randAssign false).measure_inter_preimage_eq_mul {false} {p : ℝ × Bool | p.2 = true} (measurableSet_singleton false) hselSet_pair simpa [aEvent, factualA, selOfAFalseSet, POVar.event] using hraw have hAS : (P.μ S.selOfAFalseSet).toReal = (P.μ S.alwaysSelected).toReal := by exact congrArg toReal (measure_congr (S.selOfAFalseSet_ae_eq_alwaysSelected hMono.monotone)) rw [hSelectedControl, hden_enn, ENNReal.toReal_mul, hAS] have hIntControl : ∫ ω in S.aEvent false, S.selVar.indicator true ω ∂P.μ = (P.μ S.selectedControl).toReal := by rw [show S.selectedControl = S.aEvent false ∩ S.selEvent true by rfl] unfold POVar.indicator selEvent rw [MeasureTheory.setIntegral_indicator (show MeasurableSet (S.selVar.event true) from S.selVar.measurableSet_event true (measurableSet_singleton _))] simp rfl have hAfalse_ne : (P.μ (S.aEvent false)).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posAFalse, measure_ne_top _ _⟩ have hAS_ne : (P.μ S.alwaysSelected).toReal ≠ 0 := by intro hzero have hsel_zero : (P.μ S.selectedControl).toReal = 0 := by rw [hSelFalseMass, hzero, mul_zero] have hsel_ne : (P.μ S.selectedControl).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posSelectedControl, hA.posSelCtFinite⟩ exact hsel_ne hsel_zero have hp0_eq : S.p0 = (P.μ S.alwaysSelected).toReal := by unfold p0 pSelGivenA eventCondExp rw [hIntControl, hSelFalseMass] field_simp [hAfalse_ne] have hp1_eq : S.p1 = (P.μ S.alwaysSelected).toReal + (P.μ S.helpedSelected).toReal := by have hInt : ∫ ω in S.aEvent true, S.selVar.indicator true ω ∂P.μ = (P.μ S.selectedTreated).toReal := by rw [show S.selectedTreated = S.aEvent true ∩ S.selEvent true by rfl] unfold POVar.indicator selEvent rw [MeasureTheory.setIntegral_indicator (show MeasurableSet (S.selVar.event true) from S.selVar.measurableSet_event true (measurableSet_singleton _))] simp rfl have hsplit := S.selectedTreated_measure_split hA have hAtrue_ne : (P.μ (S.aEvent true)).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posATrue, measure_ne_top _ _⟩ unfold p1 pSelGivenA eventCondExp rw [hInt, hsplit] field_simp [hAtrue_ne] have hdom : ∀ y, S.rho * S.f1AS y ≤ S.f1 y := by intro y let a := (P.μ (S.aEvent true)).toReal let b := (P.μ S.alwaysSelected).toReal let c := (P.μ S.helpedSelected).toReal let iH := ∫ ω in S.helpedSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ have hF1Split : S.f1 y * (P.μ S.selectedTreated).toReal = a * (S.f1AS y * b + iH) := by have hraw : S.f1 y * (P.μ S.selectedTreated).toReal = a * (∫ ω in S.alwaysSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ + iH) := by have hden_ne : (P.μ S.selectedTreated).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posSelectedTreated, hA.posSelTrFinite⟩ unfold f1 eventCondExp rw [S.selectedTreated_integral_split_indicator hA y] field_simp [hden_ne] simp [a, iH] have hASrel : S.f1AS y * b = ∫ ω in S.alwaysSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ := by subst b unfold f1AS eventCondExp field_simp [hAS_ne] rw [← hASrel] at hraw exact hraw have hMeasureSplit : (P.μ S.selectedTreated).toReal = a * (b + c) := by simpa [a, b, c] using S.selectedTreated_measure_split hA have ha_ne : a ≠ 0 := by subst a rw [ENNReal.toReal_ne_zero] exact ⟨hA.posATrue, measure_ne_top _ _⟩ have hbc_ne : b + c ≠ 0 := by intro hzero have hst_zero : (P.μ S.selectedTreated).toReal = 0 := by rw [hMeasureSplit, hzero, mul_zero] have hst_ne : (P.μ S.selectedTreated).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posSelectedTreated, hA.posSelTrFinite⟩ exact hst_ne hst_zero have hbc_pos : 0 < b + c := by have hb : 0 ≤ b := ENNReal.toReal_nonneg have hc : 0 ≤ c := ENNReal.toReal_nonneg exact lt_of_le_of_ne' (add_nonneg hb hc) hbc_ne have hiH_nonneg : 0 ≤ iH := MeasureTheory.setIntegral_nonneg S.measurableSet_helpedSelected (fun ω _ => by by_cases h : S.YofA true ω = y <;> simp [h]) have heq : S.f1 y * (b + c) = S.f1AS y * b + iH := by have h : a * (S.f1 y * (b + c)) = a * (S.f1AS y * b + iH) := by have h' := hF1Split rw [hMeasureSplit] at h' nlinarith [h'] exact mul_left_cancel₀ ha_ne h have hrho_eq : S.rho = b / (b + c) := by unfold rho rw [hp0_eq, hp1_eq] rw [hrho_eq] have hmul_le : b * S.f1AS y ≤ S.f1 y * (b + c) := by rw [heq] nlinarith [hiH_nonneg] rw [div_mul_eq_mul_div] exact (div_le_iff₀ hbc_pos).mpr hmul_le have hsum_f1AS : ∑ y ∈ 𝒴, S.f1AS y = 1 := by have hASrel : ∀ y, S.f1AS y * (P.μ S.alwaysSelected).toReal = ∫ ω in S.alwaysSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ := by intro y unfold f1AS eventCondExp field_simp [hAS_ne] have hsum_mul : (∑ y ∈ 𝒴, S.f1AS y) * (P.μ S.alwaysSelected).toReal = ∫ ω in S.alwaysSelected, (∑ y ∈ 𝒴, (if S.YofA true ω = y then (1 : ℝ) else 0)) ∂P.μ := by have hInd_int : ∀ y, Integrable (fun ω => if S.YofA true ω = y then (1 : ℝ) else 0) (P.μ.restrict S.alwaysSelected) := by intro y refine MeasureTheory.Integrable.of_bound ((Measurable.ite ((S.measurable_YofA true) (measurableSet_singleton y)) measurable_const measurable_const).aestronglyMeasurable) 1 (Filter.Eventually.of_forall ?_) intro ω by_cases hω : S.YofA true ω = y · simp [hω] · simp [hω] rw [Finset.sum_mul] rw [MeasureTheory.integral_finset_sum 𝒴 (fun y _ => hInd_int y)] refine Finset.sum_congr rfl ?_ intro y hy exact hASrel y have hIntOne : ∫ ω in S.alwaysSelected, (∑ y ∈ 𝒴, (if S.YofA true ω = y then (1 : ℝ) else 0)) ∂P.μ = (P.μ S.alwaysSelected).toReal := by have hASsupp := (S.YofA_true_in_finset_ae_alwaysSelected hA 𝒴 hSupp).1 have hfun : (fun ω => ∑ y ∈ 𝒴, (if S.YofA true ω = y then (1 : ℝ) else 0)) =ᵐ[P.μ.restrict S.alwaysSelected] fun _ => (1 : ℝ) := by filter_upwards [hASsupp] with ω hω have hsingle : ∑ y ∈ 𝒴, (if S.YofA true ω = y then (1 : ℝ) else 0) = 1 := by rw [Finset.sum_eq_single (S.YofA true ω)] · simp · intro b hb hbne simp [hbne.symm] · intro hnot exact elim (hnot hω) exact hsingle have hIntCongr : -- … truncated; follow the source link for the rest …
Control­Mean 1 core · 0 supporting This file proves the Lee-bounds control-arm identification step. ★ m0_eq_eventCondExp_Y0_alwaysSelected

Lee bounds control-arm mean identity

This file proves the Lee-bounds control-arm identification step. Under consistency, random assignment, and monotone selection, the observable selected control mean equals the latent mean of Y(0) among always-selected units.

The public lemma m0_eq_eventCondExp_Y0_alwaysSelected rewrites the observable selected-control mean m0 as eventCondExp P.μ alwaysSelected (YofA false). The proof first uses consistency to replace factual outcomes and selection on the selected-control cell, then uses pair-level random assignment to drop the conditioning on treatment assignment, and finally uses monotone selection to identify control selection with the always-selected stratum.

lemma m0_eq_eventCondExp_Y0_alwaysSelected reviewed
Causalean.PO.POLeeSystem

Under the baseline Lee assumptions (consistency and pair-level random assignment of the factual treatment to each (Y(a), Sel(a))) together with monotone sample selection, Sel(0) ≤ Sel(1) almost surely, the observable selected-control mean m₀ = E[Y | A = false, Sel = true] equals the latent conditional mean E[Y(0) | alwaysSelected] of the control potential outcome among units who would be selected under either treatment arm.

Formal statement
hA :
S.BaseAssumptions
hMono :
S.MonotoneSelection
S.m0 = eventCondExp P.μ S.alwaysSelected (S.YofA false)
Proof (Lean source)
lemma m0_eq_eventCondExp_Y0_alwaysSelected (hA : S.BaseAssumptions) (hMono : S.MonotoneSelection) : S.m0 = eventCondExp P.μ S.alwaysSelected (S.YofA false) := by have hy_on_selectedControl : ∀ ω ∈ S.selectedControl, S.factualY ω = S.YofA false ω := by intro ω hω have hcf : S.YofA false ω = S.factualY ω := POVar.cf_eq_factual_on_event hA.consistency S.yVar S.aVar false S.hAY.symm hω.1 exact hcf.symm have hY : eventCondExp P.μ S.selectedControl S.factualY = eventCondExp P.μ S.selectedControl (S.YofA false) := eventCondExp_congr_on P.μ S.measurableSet_selectedControl hy_on_selectedControl have hSelectedControl : S.selectedControl = S.aEvent false ∩ S.selOfAFalseSet := by ext ω constructor · intro hω have hsel_cf : S.SelOfA false ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar false S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfAFalseSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ · intro hω have hsel_cf : S.SelOfA false ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar false S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfAFalseSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ have hdrop : eventCondExp P.μ (S.aEvent false ∩ S.selOfAFalseSet) (S.YofA false) = eventCondExp P.μ S.selOfAFalseSet (S.YofA false) := by have hpair_meas : Measurable (fun ω => (S.YofA false ω, S.SelOfA false ω)) := prodMk (S.measurable_YofA false) (S.measurable_SelOfA false) have hselSet_pair : MeasurableSet {p : ℝ × Bool | p.2 = true} := measurable_snd (measurableSet_singleton true) have hφ_meas : Measurable (fun p : ℝ × Bool => if p.2 = true then p.1 else (0 : ℝ)) := by exact Measurable.ite hselSet_pair measurable_fst measurable_const have hφ_indicator : (fun ω => if S.SelOfA false ω = true then S.YofA false ω else (0 : ℝ)) = S.selOfAFalseSet.indicator (S.YofA false) := by funext ω by_cases hω : S.SelOfA false ω = true · simp [selOfAFalseSet, hω] · simp [selOfAFalseSet, hω] have hraw_num : ∫ ω in S.aEvent false, S.selOfAFalseSet.indicator (S.YofA false) ω ∂P.μ = (P.μ (S.aEvent false)).toReal * ∫ ω, S.selOfAFalseSet.indicator (S.YofA false) ω ∂P.μ := by have hraw := (hA.randAssign false).integral_restrict_preimage_eq_mul S.measurable_factualA.aemeasurable hpair_meas.aemeasurable (measurableSet_singleton false) (S.measurable_factualA (measurableSet_singleton false)) hφ_meas.aestronglyMeasurable simpa [aEvent, factualA, POVar.event, hφ_indicator] using hraw have hnum : ∫ ω in S.aEvent false ∩ S.selOfAFalseSet, S.YofA false ω ∂P.μ = (P.μ (S.aEvent false)).toReal * ∫ ω in S.selOfAFalseSet, S.YofA false ω ∂P.μ := by rw [← MeasureTheory.setIntegral_indicator S.measurableSet_selOfAFalseSet, ← MeasureTheory.integral_indicator S.measurableSet_selOfAFalseSet] exact hraw_num have hden_enn : P.μ (S.aEvent false ∩ S.selOfAFalseSet) = P.μ (S.aEvent false) * P.μ S.selOfAFalseSet := by have hraw := (hA.randAssign false).measure_inter_preimage_eq_mul {false} {p : ℝ × Bool | p.2 = true} (measurableSet_singleton false) hselSet_pair simpa [aEvent, factualA, selOfAFalseSet, POVar.event] using hraw have hden : (P.μ (S.aEvent false ∩ S.selOfAFalseSet)).toReal = (P.μ (S.aEvent false)).toReal * (P.μ S.selOfAFalseSet).toReal := by rw [hden_enn, ENNReal.toReal_mul] have hAfalse_ne_zero : (P.μ (S.aEvent false)).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posAFalse, measure_ne_top _ _⟩ unfold eventCondExp rw [hnum, hden] exact mul_div_mul_left _ _ hAfalse_ne_zero have hAS : eventCondExp P.μ S.selOfAFalseSet (S.YofA false) = eventCondExp P.μ S.alwaysSelected (S.YofA false) := by unfold eventCondExp have hset := S.selOfAFalseSet_ae_eq_alwaysSelected hMono.monotone rw [MeasureTheory.setIntegral_congr_set hset, measure_congr hset] unfold m0 rw [hY, hSelectedControl, hdrop, hAS]
Latent­Support 1 core · 0 supporting This file proves that finite support observed among selected treated units transfers to the treated potential outcome on the always-selected and treatment-induced-selected latent strata. ★ YofA_true_in_finset_ae_alwaysSelected

Lee Latent Support Transfer

This file proves that finite support observed among selected treated units transfers to the treated potential outcome on the always-selected and treatment-induced-selected latent strata. The support transfer supplies the finite normalisation needed by the trim-weight construction.

The public lemma YofA_true_in_finset_ae_alwaysSelected starts from an almost-sure finite-support hypothesis for the factual outcome restricted to the observable selected-treated cell. Using consistency and pair-level random assignment, it proves that YofA true lies in the same finite support almost surely on both alwaysSelected and helpedSelected.

lemma YofA_true_in_finset_ae_alwaysSelected reviewed
Causalean.PO.POLeeSystem

Support transfer. Under the baseline Lee assumptions, if the factual outcome lies a.e. in a finite support set 𝒴, when restricted to the observable selected-treated cell, then the latent treated potential outcome Y(1) lies a.e. in the same support 𝒴, both on the always-selected stratum and on the helped-selected stratum. This feeds the sum_eq field of alwaysSelectedTrimWeight, which needs ∑ y ∈ 𝒴, f1AS y = 1.

Formal statement
hA :
S.BaseAssumptions
𝒴 :
Finset
hSupp :
∀ᵐ ω ∂(P.μ.restrict S.selectedTreated), S.factualY ω ∈ 𝒴
(∀ᵐ ω ∂(P.μ.restrict S.alwaysSelected), S.YofA true ω ∈ 𝒴) ∧
(∀ᵐ ω ∂(P.μ.restrict S.helpedSelected), S.YofA true ω ∈ 𝒴)
Proof (Lean source)
lemma YofA_true_in_finset_ae_alwaysSelected (hA : S.BaseAssumptions) (𝒴 : Finset ℝ) (hSupp : ∀ᵐ ω ∂(P.μ.restrict S.selectedTreated), S.factualY ω ∈ 𝒴) : (∀ᵐ ω ∂(P.μ.restrict S.alwaysSelected), S.YofA true ω ∈ 𝒴) ∧ (∀ᵐ ω ∂(P.μ.restrict S.helpedSelected), S.YofA true ω ∈ 𝒴) := by classical have hSelectedTreated : S.selectedTreated = S.aEvent true ∩ S.selOfATrueSet := by ext ω constructor · intro hω have hsel_cf : S.SelOfA true ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar true S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfATrueSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ · intro hω have hsel_cf : S.SelOfA true ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar true S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfATrueSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ have hFactBad_meas : MeasurableSet {ω | S.factualY ω ∉ 𝒴} := ((S.measurable_factualY) ((𝒴.finite_toSet).measurableSet)).compl have hSupp_null_restrict : (P.μ.restrict S.selectedTreated) {ω | S.factualY ω ∉ 𝒴} = 0 := by simpa using (MeasureTheory.ae_iff.mp hSupp) have hFactBad_selected : P.μ ({ω | S.factualY ω ∉ 𝒴} ∩ S.selectedTreated) = 0 := by rw [← MeasureTheory.Measure.restrict_apply hFactBad_meas] exact hSupp_null_restrict have hBad_selected : P.μ ({ω | S.YofA true ω ∉ 𝒴} ∩ S.selectedTreated) = 0 := by refine MeasureTheory.measure_mono_null ?_ hFactBad_selected intro ω hω rcases hω with ⟨hbad, hst⟩ have hcf : S.YofA true ω = S.factualY ω := POVar.cf_eq_factual_on_event hA.consistency S.yVar S.aVar true S.hAY.symm hst.1 exact ⟨by simpa [← hcf] using hbad, hst⟩ have hBad_selected' : P.μ (S.aEvent true ∩ ({ω | S.YofA true ω ∉ 𝒴} ∩ S.selOfATrueSet)) = 0 := by rw [hSelectedTreated] at hBad_selected simpa [Set.inter_assoc, Set.inter_left_comm, Set.inter_comm] using hBad_selected have hpair_meas : Measurable (fun ω => (S.YofA true ω, S.SelOfA true ω)) := prodMk (S.measurable_YofA true) (S.measurable_SelOfA true) have hbadPair_meas : MeasurableSet {p : ℝ × Bool | p.1 ∉ 𝒴 ∧ p.2 = true} := (((measurable_fst) ((𝒴.finite_toSet).measurableSet)).compl).inter (measurable_snd (measurableSet_singleton true)) have hprod : P.μ (S.aEvent true ∩ ({ω | S.YofA true ω ∉ 𝒴} ∩ S.selOfATrueSet)) = P.μ (S.aEvent true) * P.μ ({ω | S.YofA true ω ∉ 𝒴} ∩ S.selOfATrueSet) := by have hraw := (hA.randAssign true).measure_inter_preimage_eq_mul {true} {p : ℝ × Bool | p.1 ∉ 𝒴 ∧ p.2 = true} (measurableSet_singleton true) hbadPair_meas exact hraw have hBad_selOfATrue : P.μ ({ω | S.YofA true ω ∉ 𝒴} ∩ S.selOfATrueSet) = 0 := by have hmul_zero : P.μ (S.aEvent true) * P.μ ({ω | S.YofA true ω ∉ 𝒴} ∩ S.selOfATrueSet) = 0 := by rw [← hprod] exact hBad_selected' rcases mul_eq_zero.mp hmul_zero with hA_zero | hbad_zero · exact elim (hA.posATrue hA_zero) · exact hbad_zero have hBad_alwaysSelected : P.μ ({ω | S.YofA true ω ∉ 𝒴} ∩ S.alwaysSelected) = 0 := by refine MeasureTheory.measure_mono_null ?_ hBad_selOfATrue intro ω hω exact ⟨hω.1, hω.2.2⟩ have hBad_helpedSelected : P.μ ({ω | S.YofA true ω ∉ 𝒴} ∩ S.helpedSelected) = 0 := by refine MeasureTheory.measure_mono_null ?_ hBad_selOfATrue intro ω hω exact ⟨hω.1, hω.2.2⟩ constructor · apply (MeasureTheory.ae_restrict_iff' S.measurableSet_alwaysSelected).mpr rw [MeasureTheory.ae_iff] refine MeasureTheory.measure_mono_null (fun ω hω => ?_) hBad_alwaysSelected have hω' : ¬ (ω ∈ S.alwaysSelected → S.YofA true ω ∈ 𝒴) := hω obtain ⟨hmem, hbad⟩ := Classical.not_imp.mp hω' exact ⟨hbad, hmem⟩ · apply (MeasureTheory.ae_restrict_iff' S.measurableSet_helpedSelected).mpr rw [MeasureTheory.ae_iff] refine MeasureTheory.measure_mono_null (fun ω hω => ?_) hBad_helpedSelected have hω' : ¬ (ω ∈ S.helpedSelected → S.YofA true ω ∈ 𝒴) := hω obtain ⟨hmem, hbad⟩ := Classical.not_imp.mp hω' exact ⟨hbad, hmem⟩
Main 1 core · 0 supporting This file proves the final Lee bound for the average treatment effect among always-selected units. ★ lee_bounds_ATT_AS

Lee Bounds

This file proves the final Lee bound for the average treatment effect among always-selected units. Under the Lee sample-selection assumptions, it combines the selected-control mean identity with the treated trimmed-mean bounds to sandwich the always-selected treatment effect.

The public theorem lee_bounds_ATT_AS states the finite-support Lee sandwich: lowerTrimMean 𝒴 - m0 is a lower bound and upperTrimMean 𝒴 - m0 is an upper bound for the conditional mean of Y(1) - Y(0) on alwaysSelected. The proof assembles the control mean identity, selected-treated decomposition, latent finite-support transfer, and trim-weight sandwich developed in the preceding Lee modules.

theorem lee_bounds_ATT_AS reviewed
Causalean.PO.POLeeSystem

Finite-support Lee bounds -- prop:po-lee-bounds. Under the baseline Lee sample-selection assumptions, monotone sample selection, and almost-sure finite support 𝒴 for the factual outcome on the selected-treated cell, the average treatment effect among always-selected units — those who would be selected for observation whether treated or not — is sandwiched between the lower Lee trimmed mean minus the observable selected-control mean m₀, and the upper Lee trimmed mean minus m₀.

Formal statement
hA :
S.BaseAssumptions
hMono :
S.MonotoneSelection
𝒴 :
Finset
hSupp :
∀ᵐ ω ∂(P.μ.restrict S.selectedTreated), S.factualY ω ∈ 𝒴
S.lowerTrimMean 𝒴 - S.m0
eventCondExp P.μ S.alwaysSelected (fun ω => S.YofA true ω - S.YofA false ω) ∧
eventCondExp P.μ S.alwaysSelected (fun ω => S.YofA true ω - S.YofA false ω)
≤ S.upperTrimMean 𝒴 - S.m0
Proof (Lean source)
theorem lee_bounds_ATT_AS [IsFiniteMeasure P.μ] (hA : S.BaseAssumptions) (hMono : S.MonotoneSelection) (𝒴 : Finset ℝ) (hSupp : ∀ᵐ ω ∂(P.μ.restrict S.selectedTreated), S.factualY ω ∈ 𝒴) : S.lowerTrimMean 𝒴 - S.m0 ≤ eventCondExp P.μ S.alwaysSelected (fun ω => S.YofA true ω - S.YofA false ω) ∧ eventCondExp P.μ S.alwaysSelected (fun ω => S.YofA true ω - S.YofA false ω) ≤ S.upperTrimMean 𝒴 - S.m0 := by have hStepA := S.m0_eq_eventCondExp_Y0_alwaysSelected hA hMono have hStepC := S.trimmed_bounds_condExp_Y1_AS hA hMono 𝒴 hSupp have hSub : eventCondExp P.μ S.alwaysSelected (fun ω => S.YofA true ω - S.YofA false ω) = eventCondExp P.μ S.alwaysSelected (S.YofA true) - eventCondExp P.μ S.alwaysSelected (S.YofA false) := by exact (eventCondExp_sub P.μ S.alwaysSelected (g₁ := S.YofA true) (g₂ := S.YofA false) hA.integrableY1.integrableOn hA.integrableY0.integrableOn) constructor · rw [hSub, hStepA] exact sub_le_sub_right hStepC.1 _ · rw [hSub, hStepA] exact sub_le_sub_right hStepC.2 _
Mixture­Identity 1 core · 2 supporting This file decomposes the observable selected-treated cell into always-selected and helped-selected latent strata. ★ selectedTreated_measure_split

Lee bounds selected-treated mixture identities

This file decomposes the observable selected-treated cell into always-selected and helped-selected latent strata. The integral, mass, and indicator versions combine consistency, random assignment, and monotone selection to prepare the trim-weight construction.

The lemma selectedTreated_integral_split expresses the selected-treated factual-outcome integral as the treatment-arm probability times the sum of Y(1) integrals over alwaysSelected and helpedSelected. The lemma selectedTreated_measure_split is the corresponding mass identity and feeds the Lee trimming ratio. The lemma selectedTreated_integral_split_indicator repeats the same decomposition for outcome indicators, which is needed to build and normalize the always-selected trim-weight witness.

lemma selectedTreated_measure_split reviewed
Causalean.PO.POLeeSystem

Under the baseline Lee sample-selection assumptions, the probability mass of the observable selected-treated cell equals the probability of being treated times the sum of the probability masses of the two latent strata always-selected and helped-selected. This is the analog of selectedTreated_integral_split for the constant function 1, and it is what gives ρ = μ(AS) / μ({Sel(1)=true}).

Formal statement
hA :
S.BaseAssumptions
(P.μ S.selectedTreated).toReal
= (P.μ (S.aEvent true)).toReal * ((P.μ S.alwaysSelected).toReal + (P.μ S.helpedSelected).toReal)
Proof (Lean source)
lemma selectedTreated_measure_split (hA : S.BaseAssumptions) : (P.μ S.selectedTreated).toReal = (P.μ (S.aEvent true)).toReal * ((P.μ S.alwaysSelected).toReal + (P.μ S.helpedSelected).toReal) := by have hSelectedTreated : S.selectedTreated = S.aEvent true ∩ S.selOfATrueSet := by ext ω constructor · intro hω have hsel_cf : S.SelOfA true ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar true S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfATrueSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ · intro hω have hsel_cf : S.SelOfA true ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar true S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfATrueSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ have hpair_meas : Measurable (fun ω => (S.YofA true ω, S.SelOfA true ω)) := prodMk (S.measurable_YofA true) (S.measurable_SelOfA true) have hselSet_pair : MeasurableSet {p : ℝ × Bool | p.2 = true} := measurable_snd (measurableSet_singleton true) have hden_enn : P.μ (S.aEvent true ∩ S.selOfATrueSet) = P.μ (S.aEvent true) * P.μ S.selOfATrueSet := by have hraw := (hA.randAssign true).measure_inter_preimage_eq_mul {true} {p : ℝ × Bool | p.2 = true} (measurableSet_singleton true) hselSet_pair simpa [aEvent, factualA, selOfATrueSet, POVar.event] using hraw have hsplit_enn : P.μ S.selOfATrueSet = P.μ S.alwaysSelected + P.μ S.helpedSelected := by rw [S.selOfATrueSet_eq_alwaysSelected_union_helpedSelected] exact MeasureTheory.measure_union S.disjoint_alwaysSelected_helpedSelected S.measurableSet_helpedSelected calc (P.μ S.selectedTreated).toReal = (P.μ (S.aEvent true ∩ S.selOfATrueSet)).toReal := by rw [hSelectedTreated] _ = (P.μ (S.aEvent true)).toReal * (P.μ S.selOfATrueSet).toReal := by rw [hden_enn, ENNReal.toReal_mul] _ = (P.μ (S.aEvent true)).toReal * ((P.μ S.alwaysSelected).toReal + (P.μ S.helpedSelected).toReal) := by rw [hsplit_enn, ENNReal.toReal_add (measure_ne_top P.μ S.alwaysSelected) (measure_ne_top P.μ S.helpedSelected)]
2 supporting declarations (lemmas, instances)
  • selectedTreated_integral_split lemma — Selected-treated integral split — the f = factualY analogue of selectedTreated_measure_split (Step B'). Consistency on {A=true, Sel=true} rewrites factualY to YofA true; pair random assignment A ⫫ (Y(1), Sel(1)) then drops the {A=true} conditioning and introduces the scalar factor (P.μ (S.aEvent true)).toReal; the latent {Sel(1)=true} set then splits as the disjoint union of alwaysSelected and helpedSelected.
    hA :
    S.BaseAssumptions
    ∫ ω in S.selectedTreated, S.factualY ω ∂P.μ
    = (P.μ (S.aEvent true)).toReal * (∫ ω in S.alwaysSelected, S.YofA true ω ∂P.μ + ∫ ω in S.helpedSelected, S.YofA true ω ∂P.μ)
    Proof (Lean source)
    lemma selectedTreated_integral_split (hA : S.BaseAssumptions) : ∫ ω in S.selectedTreated, S.factualY ω ∂P.μ = (P.μ (S.aEvent true)).toReal * (∫ ω in S.alwaysSelected, S.YofA true ω ∂P.μ + ∫ ω in S.helpedSelected, S.YofA true ω ∂P.μ) := by have hSelectedTreated : S.selectedTreated = S.aEvent true ∩ S.selOfATrueSet := by ext ω constructor · intro hω have hsel_cf : S.SelOfA true ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar true S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfATrueSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ · intro hω have hsel_cf : S.SelOfA true ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar true S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfATrueSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ have hfac : ∀ ω ∈ S.selectedTreated, S.factualY ω = S.YofA true ω := by intro ω hω have hcf : S.YofA true ω = S.factualY ω := POVar.cf_eq_factual_on_event hA.consistency S.yVar S.aVar true S.hAY.symm hω.1 exact hcf.symm have hIntFac : ∫ ω in S.selectedTreated, S.factualY ω ∂P.μ = ∫ ω in S.selectedTreated, S.YofA true ω ∂P.μ := by apply MeasureTheory.setIntegral_congr_fun S.measurableSet_selectedTreated intro ω hω exact hfac ω hω have hpair_meas : Measurable (fun ω => (S.YofA true ω, S.SelOfA true ω)) := prodMk (S.measurable_YofA true) (S.measurable_SelOfA true) have hselSet_pair : MeasurableSet {p : ℝ × Bool | p.2 = true} := measurable_snd (measurableSet_singleton true) have hφ_meas : Measurable (fun p : ℝ × Bool => if p.2 = true then p.1 else (0 : ℝ)) := by exact Measurable.ite hselSet_pair measurable_fst measurable_const have hφ_indicator : (fun ω => if S.SelOfA true ω = true then S.YofA true ω else (0 : ℝ)) = S.selOfATrueSet.indicator (S.YofA true) := by funext ω by_cases hω : S.SelOfA true ω = true · simp [selOfATrueSet, hω] · simp [selOfATrueSet, hω] have hdrop : ∫ ω in S.aEvent true ∩ S.selOfATrueSet, S.YofA true ω ∂P.μ = (P.μ (S.aEvent true)).toReal * ∫ ω in S.selOfATrueSet, S.YofA true ω ∂P.μ := by have hraw_num : ∫ ω in S.aEvent true, S.selOfATrueSet.indicator (S.YofA true) ω ∂P.μ = (P.μ (S.aEvent true)).toReal * ∫ ω, S.selOfATrueSet.indicator (S.YofA true) ω ∂P.μ := by have hraw := (hA.randAssign true).integral_restrict_preimage_eq_mul S.measurable_factualA.aemeasurable hpair_meas.aemeasurable (measurableSet_singleton true) (S.measurable_factualA (measurableSet_singleton true)) hφ_meas.aestronglyMeasurable simpa [aEvent, factualA, POVar.event, hφ_indicator] using hraw rw [← MeasureTheory.setIntegral_indicator S.measurableSet_selOfATrueSet, ← MeasureTheory.integral_indicator S.measurableSet_selOfATrueSet] exact hraw_num have hsplit : ∫ ω in S.selOfATrueSet, S.YofA true ω ∂P.μ = ∫ ω in S.alwaysSelected, S.YofA true ω ∂P.μ + ∫ ω in S.helpedSelected, S.YofA true ω ∂P.μ := by rw [S.selOfATrueSet_eq_alwaysSelected_union_helpedSelected] exact MeasureTheory.setIntegral_union S.disjoint_alwaysSelected_helpedSelected S.measurableSet_helpedSelected hA.integrableY1.integrableOn hA.integrableY1.integrableOn calc ∫ ω in S.selectedTreated, S.factualY ω ∂P.μ = ∫ ω in S.selectedTreated, S.YofA true ω ∂P.μ := hIntFac _ = ∫ ω in S.aEvent true ∩ S.selOfATrueSet, S.YofA true ω ∂P.μ := by rw [hSelectedTreated] _ = (P.μ (S.aEvent true)).toReal * ∫ ω in S.selOfATrueSet, S.YofA true ω ∂P.μ := hdrop _ = (P.μ (S.aEvent true)).toReal * (∫ ω in S.alwaysSelected, S.YofA true ω ∂P.μ + ∫ ω in S.helpedSelected, S.YofA true ω ∂P.μ) := by rw [hsplit]
    Causalean.PO.POLeeSystem.selectedTreated_integral_split · Causalean/PO/ID/Partial/Lee/MixtureIdentity.lean:60
  • selectedTreated_integral_split_indicator lemma — Step B for the indicator integrand 1_{factualY = y} — same shape as selectedTreated_integral_split but with the indicator integrand. Used by the le_one and sum_eq fields of alwaysSelectedTrimWeight. Proof mirrors Step B; the only change is the integrand.
    hA :
    S.BaseAssumptions
    y :
    ∫ ω in S.selectedTreated, (if S.factualY ω = y then (1 : ℝ) else 0) ∂P.μ
    = (P.μ (S.aEvent true)).toReal * (∫ ω in S.alwaysSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ + ∫ ω in S.helpedSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ)
    Proof (Lean source)
    lemma selectedTreated_integral_split_indicator (hA : S.BaseAssumptions) (y : ℝ) : ∫ ω in S.selectedTreated, (if S.factualY ω = y then (1 : ℝ) else 0) ∂P.μ = (P.μ (S.aEvent true)).toReal * (∫ ω in S.alwaysSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ + ∫ ω in S.helpedSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ) := by have hSelectedTreated : S.selectedTreated = S.aEvent true ∩ S.selOfATrueSet := by ext ω constructor · intro hω have hsel_cf : S.SelOfA true ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar true S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfATrueSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ · intro hω have hsel_cf : S.SelOfA true ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar true S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfATrueSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ have hfac : ∀ ω ∈ S.selectedTreated, S.factualY ω = S.YofA true ω := by intro ω hω have hcf : S.YofA true ω = S.factualY ω := POVar.cf_eq_factual_on_event hA.consistency S.yVar S.aVar true S.hAY.symm hω.1 exact hcf.symm have hIntFac : ∫ ω in S.selectedTreated, (if S.factualY ω = y then (1 : ℝ) else 0) ∂P.μ = ∫ ω in S.selectedTreated, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ := by apply MeasureTheory.setIntegral_congr_fun S.measurableSet_selectedTreated intro ω hω simp [hfac ω hω] have hInd_meas : Measurable (fun ω => if S.YofA true ω = y then (1 : ℝ) else 0) := by exact Measurable.ite ((S.measurable_YofA true) (measurableSet_singleton y)) measurable_const measurable_const have hInd_int : Integrable (fun ω => if S.YofA true ω = y then (1 : ℝ) else 0) P.μ := by refine MeasureTheory.Integrable.of_bound hInd_meas.aestronglyMeasurable 1 (Filter.Eventually.of_forall ?_) intro ω by_cases hω : S.YofA true ω = y · simp [hω] · simp [hω] have hpair_meas : Measurable (fun ω => (S.YofA true ω, S.SelOfA true ω)) := prodMk (S.measurable_YofA true) (S.measurable_SelOfA true) have hselSet_pair : MeasurableSet {p : ℝ × Bool | p.2 = true} := measurable_snd (measurableSet_singleton true) have hySet_pair : MeasurableSet {p : ℝ × Bool | p.1 = y} := measurable_fst (measurableSet_singleton y) have hφ_meas : Measurable (fun p : ℝ × Bool => if p.2 = true then (if p.1 = y then (1 : ℝ) else 0) else 0) := by exact Measurable.ite hselSet_pair (Measurable.ite hySet_pair measurable_const measurable_const) measurable_const have hφ_indicator : (fun ω => if S.SelOfA true ω = true then (if S.YofA true ω = y then (1 : ℝ) else 0) else 0) = S.selOfATrueSet.indicator (fun ω => if S.YofA true ω = y then (1 : ℝ) else 0) := by funext ω by_cases hω : S.SelOfA true ω = true · simp [selOfATrueSet, hω] · simp [selOfATrueSet, hω] have hdrop : ∫ ω in S.aEvent true ∩ S.selOfATrueSet, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ = (P.μ (S.aEvent true)).toReal * ∫ ω in S.selOfATrueSet, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ := by have hraw_num : ∫ ω in S.aEvent true, S.selOfATrueSet.indicator (fun ω => if S.YofA true ω = y then (1 : ℝ) else 0) ω ∂P.μ = (P.μ (S.aEvent true)).toReal * ∫ ω, S.selOfATrueSet.indicator (fun ω => if S.YofA true ω = y then (1 : ℝ) else 0) ω ∂P.μ := by have hraw := (hA.randAssign true).integral_restrict_preimage_eq_mul S.measurable_factualA.aemeasurable hpair_meas.aemeasurable (measurableSet_singleton true) (S.measurable_factualA (measurableSet_singleton true)) hφ_meas.aestronglyMeasurable simpa [aEvent, factualA, POVar.event, hφ_indicator] using hraw rw [← MeasureTheory.setIntegral_indicator S.measurableSet_selOfATrueSet, ← MeasureTheory.integral_indicator S.measurableSet_selOfATrueSet] exact hraw_num have hsplit : ∫ ω in S.selOfATrueSet, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ = ∫ ω in S.alwaysSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ + ∫ ω in S.helpedSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ := by rw [S.selOfATrueSet_eq_alwaysSelected_union_helpedSelected] exact MeasureTheory.setIntegral_union S.disjoint_alwaysSelected_helpedSelected S.measurableSet_helpedSelected hInd_int.integrableOn hInd_int.integrableOn calc ∫ ω in S.selectedTreated, (if S.factualY ω = y then (1 : ℝ) else 0) ∂P.μ = ∫ ω in S.selectedTreated, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ := hIntFac _ = ∫ ω in S.aEvent true ∩ S.selOfATrueSet, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ := by rw [hSelectedTreated] _ = (P.μ (S.aEvent true)).toReal * ∫ ω in S.selOfATrueSet, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ := hdrop _ = (P.μ (S.aEvent true)).toReal * (∫ ω in S.alwaysSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ + ∫ ω in S.helpedSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ) := by rw [hsplit]
    Causalean.PO.POLeeSystem.selectedTreated_integral_split_indicator · Causalean/PO/ID/Partial/Lee/MixtureIdentity.lean:216
Trim­Bound 1 core · 0 supporting This file proves that the conditional mean of the treated potential outcome among always-selected units is bounded by the lower and upper Lee trimmed means. ★ trimmed_bounds_condExp_Y1_AS

Lee Trimmed-Mean Bound

This file proves that the conditional mean of the treated potential outcome among always-selected units is bounded by the lower and upper Lee trimmed means. The result turns the constructed always-selected trim weight into the scalar sandwich used by the final Lee bound.

The argument is an order-theoretic consequence of the trimmed-mean range and the identity between the trim-weight mean and the always-selected conditional mean.

lemma trimmed_bounds_condExp_Y1_AS reviewed
Causalean.PO.POLeeSystem

The Lee trimmed-mean sandwich for the always-selected treated mean. Given the baseline Lee assumptions, monotone sample selection, and almost-sure finite support 𝒴 for the factual outcome on the selected-treated cell, the conditional mean E[Y(1) | alwaysSelected] of the treated potential outcome among always-selected units lies between the lower and upper Lee trimmed means computed over all feasible Lee trim weights on that support.

Formal statement
hA :
S.BaseAssumptions
hMono :
S.MonotoneSelection
𝒴 :
Finset
hSupp :
∀ᵐ ω ∂(P.μ.restrict S.selectedTreated), S.factualY ω ∈ 𝒴
S.lowerTrimMean 𝒴 ≤ eventCondExp P.μ S.alwaysSelected (S.YofA true) ∧
eventCondExp P.μ S.alwaysSelected (S.YofA true) ≤ S.upperTrimMean 𝒴
Proof (Lean source)
lemma trimmed_bounds_condExp_Y1_AS (hA : S.BaseAssumptions) (hMono : S.MonotoneSelection) (𝒴 : Finset ℝ) (hSupp : ∀ᵐ ω ∂(P.μ.restrict S.selectedTreated), S.factualY ω ∈ 𝒴) : S.lowerTrimMean 𝒴 ≤ eventCondExp P.μ S.alwaysSelected (S.YofA true) ∧ eventCondExp P.μ S.alwaysSelected (S.YofA true) ≤ S.upperTrimMean 𝒴 := by classical have hMw := S.Mw_alwaysSelectedTrimWeight_eq_condExp_Y1_AS hA hMono 𝒴 hSupp have hmem : S.Mw (S.alwaysSelectedTrimWeight hA hMono 𝒴 hSupp) ∈ range (fun wt : S.LeeTrimWeight 𝒴 => S.Mw wt) := by exact ⟨S.alwaysSelectedTrimWeight hA hMono 𝒴 hSupp, rfl⟩ have hf1_nonneg : ∀ y, 0 ≤ S.f1 y := by intro y unfold f1 eventCondExp exact div_nonneg (MeasureTheory.setIntegral_nonneg S.measurableSet_selectedTreated (fun ω _ => by by_cases h : S.factualY ω = y <;> simp [h])) ENNReal.toReal_nonneg let K := |(S.rho)⁻¹| * ∑ y ∈ 𝒴, |y| * S.f1 y have hBddBelow : BddBelow (range (fun wt : S.LeeTrimWeight 𝒴 => S.Mw wt)) := by refine ⟨-K, ?_⟩ rintro z ⟨wt, rfl⟩ unfold Mw have hsum_abs : |∑ y ∈ 𝒴, y * wt.w y * S.f1 y| ≤ ∑ y ∈ 𝒴, |y| * S.f1 y := by calc |∑ y ∈ 𝒴, y * wt.w y * S.f1 y| ≤ ∑ y ∈ 𝒴, |y * wt.w y * S.f1 y| := by exact Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ y ∈ 𝒴, |y| * S.f1 y := by refine Finset.sum_le_sum ?_ intro y hy have hw0 := wt.nonneg y have hw1 := wt.le_one y have hf0 := hf1_nonneg y rw [abs_mul, abs_mul] have habsw : |wt.w y| = wt.w y := abs_of_nonneg hw0 have habsf : |S.f1 y| = S.f1 y := abs_of_nonneg hf0 rw [habsw, habsf] have hinner : wt.w y * S.f1 y ≤ S.f1 y := by nlinarith [mul_le_mul_of_nonneg_right hw1 hf0] simpa [mul_assoc] using mul_le_mul_of_nonneg_left hinner (abs_nonneg y) have habs : |(S.rho)⁻¹ * ∑ y ∈ 𝒴, y * wt.w y * S.f1 y| ≤ K := by rw [abs_mul] exact mul_le_mul_of_nonneg_left hsum_abs (abs_nonneg _) nlinarith [neg_le_abs ((S.rho)⁻¹ * ∑ y ∈ 𝒴, y * wt.w y * S.f1 y)] have hBddAbove : BddAbove (range (fun wt : S.LeeTrimWeight 𝒴 => S.Mw wt)) := by refine ⟨K, ?_⟩ rintro z ⟨wt, rfl⟩ unfold Mw have hsum_abs : |∑ y ∈ 𝒴, y * wt.w y * S.f1 y| ≤ ∑ y ∈ 𝒴, |y| * S.f1 y := by calc |∑ y ∈ 𝒴, y * wt.w y * S.f1 y| ≤ ∑ y ∈ 𝒴, |y * wt.w y * S.f1 y| := by exact Finset.abs_sum_le_sum_abs _ _ _ ≤ ∑ y ∈ 𝒴, |y| * S.f1 y := by refine Finset.sum_le_sum ?_ intro y hy have hw0 := wt.nonneg y have hw1 := wt.le_one y have hf0 := hf1_nonneg y rw [abs_mul, abs_mul] have habsw : |wt.w y| = wt.w y := abs_of_nonneg hw0 have habsf : |S.f1 y| = S.f1 y := abs_of_nonneg hf0 rw [habsw, habsf] have hinner : wt.w y * S.f1 y ≤ S.f1 y := by nlinarith [mul_le_mul_of_nonneg_right hw1 hf0] simpa [mul_assoc] using mul_le_mul_of_nonneg_left hinner (abs_nonneg y) have habs : |(S.rho)⁻¹ * ∑ y ∈ 𝒴, y * wt.w y * S.f1 y| ≤ K := by rw [abs_mul] exact mul_le_mul_of_nonneg_left hsum_abs (abs_nonneg _) exact le_trans (le_abs_self _) habs -- The trimmed-mean endpoints are the inf/sup of `Mw` over the unidentified -- trim-weight nuisance, and the always-selected witness is one feasible value; -- the sandwich is then the engine bridge `mem_Icc_csInf_csSup`. have hbridge := mem_Icc_csInf_csSup hBddBelow hBddAbove hmem constructor · rw [← hMw, lowerTrimMean] exact hbridge.1 · rw [← hMw, upperTrimMean] exact hbridge.2
Trim­Mean 1 core · 0 supporting This file proves that the trimmed mean associated with the always-selected trim weight equals the conditional mean of the treated potential outcome on the always-selected latent stratum. ★ Mw_alwaysSelectedTrimWeight_eq_condExp_Y1_AS

Lee Trimmed Mean Identity

This file proves that the trimmed mean associated with the always-selected trim weight equals the conditional mean of the treated potential outcome on the always-selected latent stratum. The result connects the finite-support trim weight construction to the target latent mean used in Lee bounds.

lemma Mw_alwaysSelectedTrimWeight_eq_condExp_Y1_AS reviewed
Causalean.PO.POLeeSystem

The constructed always-selected trim weight has the target latent mean. Given the baseline Lee assumptions, monotone sample selection, and almost-sure finite support 𝒴 for the factual outcome on the selected-treated cell, evaluating the trim-weight mean functional Mw at the constructed always-selected trim weight recovers exactly the conditional mean E[Y(1) | alwaysSelected] of the treated potential outcome among always-selected units.

Formal statement
hA :
S.BaseAssumptions
hMono :
S.MonotoneSelection
𝒴 :
Finset
hSupp :
∀ᵐ ω ∂(P.μ.restrict S.selectedTreated), S.factualY ω ∈ 𝒴
S.Mw (S.alwaysSelectedTrimWeight hA hMono 𝒴 hSupp)
= eventCondExp P.μ S.alwaysSelected (S.YofA true)
Proof (Lean source)
lemma Mw_alwaysSelectedTrimWeight_eq_condExp_Y1_AS (hA : S.BaseAssumptions) (hMono : S.MonotoneSelection) (𝒴 : Finset ℝ) (hSupp : ∀ᵐ ω ∂(P.μ.restrict S.selectedTreated), S.factualY ω ∈ 𝒴) : S.Mw (S.alwaysSelectedTrimWeight hA hMono 𝒴 hSupp) = eventCondExp P.μ S.alwaysSelected (S.YofA true) := by classical have h_f1AS_nonneg : ∀ y, 0 ≤ S.f1AS y := by intro y unfold f1AS eventCondExp exact div_nonneg (MeasureTheory.setIntegral_nonneg S.measurableSet_alwaysSelected (fun ω _ => by by_cases h : S.YofA true ω = y <;> simp [h])) ENNReal.toReal_nonneg have h_rho_nonneg : 0 ≤ S.rho := by have hp0 : 0 ≤ S.p0 := by unfold p0 pSelGivenA eventCondExp refine div_nonneg ?_ ENNReal.toReal_nonneg exact MeasureTheory.setIntegral_nonneg (S.measurableSet_aEvent false) (fun ω _ => by unfold POVar.indicator by_cases h : ω ∈ S.selVar.event true <;> simp [Set.indicator_of_mem, Set.indicator_of_notMem, h]) have hp1 : 0 ≤ S.p1 := by unfold p1 pSelGivenA eventCondExp refine div_nonneg ?_ ENNReal.toReal_nonneg exact MeasureTheory.setIntegral_nonneg (S.measurableSet_aEvent true) (fun ω _ => by unfold POVar.indicator by_cases h : ω ∈ S.selVar.event true <;> simp [Set.indicator_of_mem, Set.indicator_of_notMem, h]) exact div_nonneg hp0 hp1 have hSelectedControl : S.selectedControl = S.aEvent false ∩ S.selOfAFalseSet := by ext ω constructor · intro hω have hsel_cf : S.SelOfA false ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar false S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfAFalseSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ · intro hω have hsel_cf : S.SelOfA false ω = S.factualSel ω := POVar.cf_eq_factual_on_event hA.consistency S.selVar S.aVar false S.hASel.symm hω.1 exact ⟨hω.1, by simpa [selOfAFalseSet, selEvent, POVar.event, factualSel, hsel_cf] using hω.2⟩ have hSelFalseMass : (P.μ S.selectedControl).toReal = (P.μ (S.aEvent false)).toReal * (P.μ S.alwaysSelected).toReal := by have hselSet_pair : MeasurableSet {p : ℝ × Bool | p.2 = true} := measurable_snd (measurableSet_singleton true) have hden_enn : P.μ (S.aEvent false ∩ S.selOfAFalseSet) = P.μ (S.aEvent false) * P.μ S.selOfAFalseSet := by have hraw := (hA.randAssign false).measure_inter_preimage_eq_mul {false} {p : ℝ × Bool | p.2 = true} (measurableSet_singleton false) hselSet_pair simpa [aEvent, factualA, selOfAFalseSet, POVar.event] using hraw have hAS : (P.μ S.selOfAFalseSet).toReal = (P.μ S.alwaysSelected).toReal := by exact congrArg toReal (measure_congr (S.selOfAFalseSet_ae_eq_alwaysSelected hMono.monotone)) rw [hSelectedControl, hden_enn, ENNReal.toReal_mul, hAS] have hIntControl : ∫ ω in S.aEvent false, S.selVar.indicator true ω ∂P.μ = (P.μ S.selectedControl).toReal := by rw [show S.selectedControl = S.aEvent false ∩ S.selEvent true by rfl] unfold POVar.indicator selEvent rw [MeasureTheory.setIntegral_indicator (show MeasurableSet (S.selVar.event true) from S.selVar.measurableSet_event true (measurableSet_singleton _))] simp rfl have hAfalse_ne : (P.μ (S.aEvent false)).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posAFalse, measure_ne_top _ _⟩ have hAS_ne : (P.μ S.alwaysSelected).toReal ≠ 0 := by intro hzero have hsel_zero : (P.μ S.selectedControl).toReal = 0 := by rw [hSelFalseMass, hzero, mul_zero] have hsel_ne : (P.μ S.selectedControl).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posSelectedControl, hA.posSelCtFinite⟩ exact hsel_ne hsel_zero have hp0_eq : S.p0 = (P.μ S.alwaysSelected).toReal := by unfold p0 pSelGivenA eventCondExp rw [hIntControl, hSelFalseMass] field_simp [hAfalse_ne] have hp1_eq : S.p1 = (P.μ S.alwaysSelected).toReal + (P.μ S.helpedSelected).toReal := by have hInt : ∫ ω in S.aEvent true, S.selVar.indicator true ω ∂P.μ = (P.μ S.selectedTreated).toReal := by rw [show S.selectedTreated = S.aEvent true ∩ S.selEvent true by rfl] unfold POVar.indicator selEvent rw [MeasureTheory.setIntegral_indicator (show MeasurableSet (S.selVar.event true) from S.selVar.measurableSet_event true (measurableSet_singleton _))] simp rfl have hsplit := S.selectedTreated_measure_split hA have hAtrue_ne : (P.μ (S.aEvent true)).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posATrue, measure_ne_top _ _⟩ unfold p1 pSelGivenA eventCondExp rw [hInt, hsplit] field_simp [hAtrue_ne] have hdom : ∀ y, S.rho * S.f1AS y ≤ S.f1 y := by intro y let a := (P.μ (S.aEvent true)).toReal let b := (P.μ S.alwaysSelected).toReal let c := (P.μ S.helpedSelected).toReal let iH := ∫ ω in S.helpedSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ have hF1Split : S.f1 y * (P.μ S.selectedTreated).toReal = a * (S.f1AS y * b + iH) := by have hraw : S.f1 y * (P.μ S.selectedTreated).toReal = a * (∫ ω in S.alwaysSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ + iH) := by have hden_ne : (P.μ S.selectedTreated).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posSelectedTreated, hA.posSelTrFinite⟩ unfold f1 eventCondExp rw [S.selectedTreated_integral_split_indicator hA y] field_simp [hden_ne] simp [a, iH] have hASrel : S.f1AS y * b = ∫ ω in S.alwaysSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ := by subst b unfold f1AS eventCondExp field_simp [hAS_ne] rw [← hASrel] at hraw exact hraw have hMeasureSplit : (P.μ S.selectedTreated).toReal = a * (b + c) := by simpa [a, b, c] using S.selectedTreated_measure_split hA have ha_ne : a ≠ 0 := by subst a rw [ENNReal.toReal_ne_zero] exact ⟨hA.posATrue, measure_ne_top _ _⟩ have hbc_ne : b + c ≠ 0 := by intro hzero have hst_zero : (P.μ S.selectedTreated).toReal = 0 := by rw [hMeasureSplit, hzero, mul_zero] have hst_ne : (P.μ S.selectedTreated).toReal ≠ 0 := by rw [ENNReal.toReal_ne_zero] exact ⟨hA.posSelectedTreated, hA.posSelTrFinite⟩ exact hst_ne hst_zero have hbc_pos : 0 < b + c := by have hb : 0 ≤ b := ENNReal.toReal_nonneg have hc : 0 ≤ c := ENNReal.toReal_nonneg exact lt_of_le_of_ne' (add_nonneg hb hc) hbc_ne have hiH_nonneg : 0 ≤ iH := MeasureTheory.setIntegral_nonneg S.measurableSet_helpedSelected (fun ω _ => by by_cases h : S.YofA true ω = y <;> simp [h]) have heq : S.f1 y * (b + c) = S.f1AS y * b + iH := by have h : a * (S.f1 y * (b + c)) = a * (S.f1AS y * b + iH) := by have h' := hF1Split rw [hMeasureSplit] at h' nlinarith [h'] exact mul_left_cancel₀ ha_ne h have hrho_eq : S.rho = b / (b + c) := by unfold rho rw [hp0_eq, hp1_eq] rw [hrho_eq] have hmul_le : b * S.f1AS y ≤ S.f1 y * (b + c) := by rw [heq] nlinarith [hiH_nonneg] rw [div_mul_eq_mul_div] exact (div_le_iff₀ hbc_pos).mpr hmul_le have hrho_ne : S.rho ≠ 0 := by let b := (P.μ S.alwaysSelected).toReal let c := (P.μ S.helpedSelected).toReal have hb_pos : 0 < b := by have hb_nonneg : 0 ≤ b := ENNReal.toReal_nonneg exact lt_of_le_of_ne' hb_nonneg (by simpa [b] using hAS_ne) have hbc_pos : 0 < b + c := by have hc : 0 ≤ c := ENNReal.toReal_nonneg nlinarith have hrho_eq : S.rho = b / (b + c) := by unfold rho rw [hp0_eq, hp1_eq] rw [hrho_eq] exact div_ne_zero (ne_of_gt hb_pos) (ne_of_gt hbc_pos) have hweighted_f1AS : ∑ y ∈ 𝒴, y * S.f1AS y = eventCondExp P.μ S.alwaysSelected (S.YofA true) := by have hASrel : ∀ y, S.f1AS y * (P.μ S.alwaysSelected).toReal = ∫ ω in S.alwaysSelected, (if S.YofA true ω = y then (1 : ℝ) else 0) ∂P.μ := by intro y unfold f1AS eventCondExp field_simp [hAS_ne] have hweighted_mul : (∑ y ∈ 𝒴, y * S.f1AS y) * (P.μ S.alwaysSelected).toReal = ∫ ω in S.alwaysSelected, (∑ y ∈ 𝒴, y * (if S.YofA true ω = y then (1 : ℝ) else 0)) ∂P.μ := by have hInd_int : ∀ y, Integrable (fun ω => y * (if S.YofA true ω = y then (1 : ℝ) else 0)) (P.μ.restrict S.alwaysSelected) := by intro y have hbase : Integrable (fun ω => if S.YofA true ω = y then (1 : ℝ) else 0) (P.μ.restrict S.alwaysSelected) := by refine MeasureTheory.Integrable.of_bound ((Measurable.ite ((S.measurable_YofA true) (measurableSet_singleton y)) measurable_const measurable_const).aestronglyMeasurable) 1 (Filter.Eventually.of_forall ?_) intro ω by_cases hω : S.YofA true ω = y · simp [hω] · simp [hω] simpa only [Pi.smul_apply, smul_eq_mul] using hbase.const_mul y rw [Finset.sum_mul] rw [MeasureTheory.integral_finset_sum 𝒴 (fun y _ => hInd_int y)] refine Finset.sum_congr rfl ?_ intro y hy rw [MeasureTheory.integral_const_mul] rw [← hASrel y] ring have hIntY : ∫ ω in S.alwaysSelected, (∑ y ∈ 𝒴, y * (if S.YofA true ω = y then (1 : ℝ) else 0)) ∂P.μ = ∫ ω in S.alwaysSelected, S.YofA true ω ∂P.μ := by have hASsupp := (S.YofA_true_in_finset_ae_alwaysSelected hA 𝒴 hSupp).1 have hfun : -- … truncated; follow the source link for the rest …