PO.ID.Exact.Multiple­Instrument­IV

Multiple-instrument IV: finite-support centered-score response-type algebra and positive-weight results conditional on abstract sign alignment; the generic endpoints do not establish a projected or saturated 2SLS first stage, and MTW partial monotonicity is not formalized.

Finite­Index 18 core · 5 supporting This file develops finite algebra for an ordered support score. ★ tailCoeff_nonneg★ tailCoeff_eq_cov

Multiple-Instrument IV Finite Index Algebra

This file develops finite algebra for an ordered support score. It defines support masses, ordered scores, centered scores, tail coefficients, and a numeric matrix score adapter. The adapter performs an inverse-Gram transform but does not tie its inputs to observed random variables. Thus this file does not assert the population-projection, saturated-first-stage, or propensity-score conditions used by Mogstad, Torgovitsky, and Walters.

abbrev Adj reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV

Adjacent thresholds are the positive positions in a finite ordered instrument support, each marking the boundary between consecutive support points.

Definition (Lean source)
K :
ℕ
Adj K :
Type
{j : Fin K // 0 < j.val}
Causalean.PO.ID.Exact.MultipleInstrumentIV.Adj · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:54
def lower reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.Adj

The lower endpoint of an adjacent threshold is the support point immediately before that threshold in the finite ordered support.

Definition (Lean source)
K :
ℕ
j :
Adj K
lower j :
Fin K
⟨j.1.val - 1, Nat.lt_of_le_of_lt (sub_le _ _) j.1.isLt⟩
Causalean.PO.ID.Exact.MultipleInstrumentIV.Adj.lower · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:60 · uses Adj
def upper reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.Adj

The upper endpoint of an adjacent threshold is the threshold's own support position in the finite ordered support.

Definition (Lean source)
K :
ℕ
j :
Adj K
upper j :
Fin K
j.1
Causalean.PO.ID.Exact.MultipleInstrumentIV.Adj.upper · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:65 · uses Adj
structure FiniteIndex reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV

A finite ordered-score index on a finite instrument support records instrument support masses that are nonnegative and sum to one, together with a supplied real score that is weakly increasing in the displayed support order.

Definition (Lean source)
K :
ℕ
Instrument support mass `ρ_k`.
rho :
Fin K → ℝ
Supplied ordered score `dhat_k`; no projection condition is part of this structure.
dhat :
Fin K → ℝ
Support masses are nonnegative.
rho_nonneg :
∀ k, 0 ≤ rho k
Support masses sum to one.
rho_sum_one :
∑ k, rho k = 1
The displayed support order is weakly increasing in the supplied score.
dhat_mono :
∀ {k l : Fin K}
if
k.val ≤ l.val
then
dhat k ≤ dhat l
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:72
def supportMass reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV

The probability mass at an instrument support point is the real-valued measure under the population law of units whose finite-valued instrument equals that point, on the measurable sample space and finite support.

Definition (Lean source)
Ω :
K :
ℕ
μ :
Z :
Ω → Fin K
k :
Fin K
supportMass μ Z k :
ℝ
(μ {ω | Z ω = k}).toReal
Causalean.PO.ID.Exact.MultipleInstrumentIV.supportMass · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:88
def fromMeasureScore reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex

The measure-backed ordered score index combines instrument-cell probabilities under a population law with a supplied support score that is weakly increasing in support order, for a measurable instrument on the measurable sample space and finite support.

Definition (Lean source)
Ω :
K :
ℕ
Z :
Ω → Fin K
hZ :
dhat :
Fin K → ℝ
hdhat_mono :
∀ {k l : Fin K}
if
k.val ≤ l.val
then
dhat k ≤ dhat l
fromMeasureScore μ Z hZ dhat hdhat_mono :
clause 1
clause 2
dhat := dhat
clause 3
rho_nonneg := supportMass_nonneg μ Z
clause 4
rho_sum_one := supportMass_sum_eq_one μ Z hZ
clause 5
dhat_mono := hdhat_mono
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex.fromMeasureScore · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:128 · uses FiniteIndex
def meanIndex reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex

The population mean score averages the supplied support score using the instrument masses in an ordered finite score index.

Definition (Lean source)
K :
ℕ
shared
I :
shared
meanIndex I :
ℝ
∑ k, I.rho k * I.dhat k
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex.meanIndex · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:148 · uses FiniteIndex
def centeredIndex reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex

The centered score at a support point subtracts the population mean score from that point's score in an ordered finite score index.

Definition (Lean source)
K :
ℕ
shared
I :
shared
k :
Fin K
centeredIndex I k :
ℝ
I.dhat k - I.meanIndex
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex.centeredIndex · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:153 · uses FiniteIndex
def upperTail reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex

The upper-tail support set contains the points at or above an adjacent threshold in a finite ordered support.

Definition (Lean source)
K :
ℕ
shared
j :
Adj K
upperTail j :
Finset.univ.filter fun k => j.1.val ≤ k.val
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex.upperTail · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:158 · uses Adj
def tailCoeff reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex

The ordered-score tail coefficient is the covariance contribution above an adjacent threshold in an ordered finite score index: upper-tail masses times centered scores. With a projected first-stage score, it is the MTW tail coefficient.

Definition (Lean source)
K :
ℕ
shared
I :
shared
j :
Adj K
tailCoeff I j :
ℝ
∑ k ∈ upperTail j, I.rho k * I.centeredIndex k
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex.tailCoeff · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:163 · uses Adj , FiniteIndex
theorem tailCoeff_nonneg reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex

Every ordered-score tail coefficient is nonnegative in an ordered finite score index at an adjacent threshold, because higher support points have weakly higher scores. For a projected first stage, this is the MTW coefficient sign result.

Formal statement
K :
ℕ
shared
I :
shared
j :
Adj K
0 ≤ I.tailCoeff j
Proof (Lean source)
theorem tailCoeff_nonneg (j : Adj K) : 0 ≤ I.tailCoeff j := by classical let T := upperTail j let L : Finset (Fin K) := Finset.univ.filter fun l => l.val < j.1.val let A : ℝ := ∑ k ∈ T, I.rho k let B : ℝ := ∑ l ∈ L, I.rho l let ST : ℝ := ∑ k ∈ T, I.rho k * I.dhat k let SL : ℝ := ∑ l ∈ L, I.rho l * I.dhat l have hmass : B + A = 1 := by have h := Finset.sum_filter_not_add_sum_filter (s := univ) (p := fun k : Fin K => j.1.val ≤ k.val) (f := I.rho) simpa [A, B, T, L, upperTail, Nat.not_le] using h.trans I.rho_sum_one have hmean : I.meanIndex = SL + ST := by have h := Finset.sum_filter_not_add_sum_filter (s := univ) (p := fun k : Fin K => j.1.val ≤ k.val) (f := fun k => I.rho k * I.dhat k) simpa [ST, SL, T, L, upperTail, meanIndex, Nat.not_le] using h.symm have htail_basic : I.tailCoeff j = ST - A * I.meanIndex := by calc I.tailCoeff j = ∑ k ∈ T, (I.rho k * I.dhat k - I.rho k * I.meanIndex) := by simp [tailCoeff, centeredIndex, T, upperTail, mul_sub] _ = ST - ∑ k ∈ T, I.rho k * I.meanIndex := by rw [Finset.sum_sub_distrib] _ = ST - I.meanIndex * A := by simp [A, ST, Finset.mul_sum, mul_comm] _ = ST - A * I.meanIndex := by rw [mul_comm I.meanIndex A] have htail : I.tailCoeff j = B * ST - A * SL := by rw [htail_basic, hmean] have hB : B = 1 - A := by linarith rw [hB] ring have hfirst : (∑ k ∈ T, ∑ l ∈ L, I.rho k * I.rho l * I.dhat k) = B * ST := by simp [B, ST, Finset.mul_sum, mul_assoc, mul_comm, mul_left_comm] have hsecond : (∑ k ∈ T, ∑ l ∈ L, I.rho k * I.rho l * I.dhat l) = A * SL := by rw [Finset.sum_comm] simp [A, SL, Finset.mul_sum, Finset.sum_mul, mul_assoc, mul_comm, mul_left_comm] have hdouble : (∑ k ∈ T, ∑ l ∈ L, I.rho k * I.rho l * (I.dhat k - I.dhat l)) = B * ST - A * SL := by calc (∑ k ∈ T, ∑ l ∈ L, I.rho k * I.rho l * (I.dhat k - I.dhat l)) = (∑ k ∈ T, ∑ l ∈ L, I.rho k * I.rho l * I.dhat k) - (∑ k ∈ T, ∑ l ∈ L, I.rho k * I.rho l * I.dhat l) := by simp [mul_sub, Finset.sum_sub_distrib] _ = B * ST - A * SL := by rw [hfirst, hsecond] rw [htail, ← hdouble] apply Finset.sum_nonneg intro k hk apply Finset.sum_nonneg intro l hl have hkT : j.1.val ≤ k.val := by simpa [T, upperTail] using hk have hlL : l.val < j.1.val := by simpa [L] using hl have hle : l.val ≤ k.val := by omega have hdhat : 0 ≤ I.dhat k - I.dhat l := sub_nonneg.mpr (I.dhat_mono hle) exact mul_nonneg (mul_nonneg (I.rho_nonneg k) (I.rho_nonneg l)) hdhat
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex.tailCoeff_nonneg · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:187 · uses Adj , FiniteIndex , tailCoeff
theorem tailCoeff_eq_cov reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex

Covariance identity. For an ordered finite score index and an adjacent threshold, the threshold's tail coefficient equals the finite-support covariance between the instrument score and the indicator for assignment at or above that threshold.

Formal statement
K :
ℕ
shared
I :
shared
j :
Adj K
I.tailCoeff j
= ∑ k : Fin K, I.rho k * (I.dhat k - I.meanIndex) * ((if k ∈ upperTail j then (1 : ℝ) else 0) - ∑ l : Fin K, I.rho l * (if l ∈ upperTail j then (1 : ℝ) else 0))
Proof (Lean source)
theorem tailCoeff_eq_cov (j : Adj K) : I.tailCoeff j = ∑ k : Fin K, I.rho k * (I.dhat k - I.meanIndex) * ((if k ∈ upperTail j then (1 : ℝ) else 0) - ∑ l : Fin K, I.rho l * (if l ∈ upperTail j then (1 : ℝ) else 0)) := by -- The subtracted cross-term is (Σ_k ρ_k centeredIndex_k) * (Σ_l ρ_l ind_l) = 0. have hcross : ∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ l : Fin K, I.rho l * (if l ∈ upperTail j then (1 : ℝ) else 0)) = 0 := by have : (∑ k : Fin K, I.rho k * I.centeredIndex k) * (∑ l : Fin K, I.rho l * (if l ∈ upperTail j then (1 : ℝ) else 0)) = 0 := by rw [I.centered_weight_sum_zero]; ring calc ∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ l : Fin K, I.rho l * (if l ∈ upperTail j then (1 : ℝ) else 0)) = (∑ k : Fin K, I.rho k * I.centeredIndex k) * (∑ l : Fin K, I.rho l * (if l ∈ upperTail j then (1 : ℝ) else 0)) := by rw [Finset.sum_mul] _ = 0 := this -- Rewrite the whole RHS directly and cancel cross-term. -- Let C := Σ_l ρ_l * ind_l (a constant w.r.t. k). -- RHS = Σ_k ρ_k*(dhat_k - mean)*(ind_k - C) -- = Σ_k ρ_k*centeredIndex_k*ind_k - C * Σ_k ρ_k*centeredIndex_k -- = Σ_k ρ_k*centeredIndex_k*ind_k - C * 0 -- = Σ_{k∈T_j} ρ_k*centeredIndex_k = tailCoeff j. have key : ∑ k : Fin K, I.rho k * (I.dhat k - I.meanIndex) * ((if k ∈ upperTail j then (1 : ℝ) else 0) - ∑ l : Fin K, I.rho l * (if l ∈ upperTail j then (1 : ℝ) else 0)) = ∑ k : Fin K, I.rho k * I.centeredIndex k * (if k ∈ upperTail j then (1 : ℝ) else 0) := by -- unfold centeredIndex so ring can see everything simp only [centeredIndex] have hcross2 : (∑ k : Fin K, I.rho k * (I.dhat k - I.meanIndex)) * (∑ l : Fin K, I.rho l * (if l ∈ upperTail j then (1 : ℝ) else 0)) = 0 := by have : ∑ k : Fin K, I.rho k * (I.dhat k - I.meanIndex) = 0 := by have := I.centered_weight_sum_zero simp only [centeredIndex] at this; exact this rw [this]; ring calc ∑ k : Fin K, I.rho k * (I.dhat k - I.meanIndex) * ((if k ∈ upperTail j then (1 : ℝ) else 0) - ∑ l, I.rho l * (if l ∈ upperTail j then 1 else 0)) = (∑ k : Fin K, I.rho k * (I.dhat k - I.meanIndex) * (if k ∈ upperTail j then (1 : ℝ) else 0)) - (∑ k : Fin K, I.rho k * (I.dhat k - I.meanIndex)) * (∑ l : Fin K, I.rho l * (if l ∈ upperTail j then (1 : ℝ) else 0)) := by rw [Finset.sum_mul, ← Finset.sum_sub_distrib] congr 1; ext k; ring _ = ∑ k : Fin K, I.rho k * (I.dhat k - I.meanIndex) * (if k ∈ upperTail j then (1 : ℝ) else 0) := by rw [hcross2, sub_zero] rw [key] -- Now: Σ_k ρ_k*centeredIndex_k*indicator(k∈T_j) = Σ_{k∈T_j} ρ_k*centeredIndex_k = tailCoeff j simp only [tailCoeff, upperTail, Finset.sum_filter] apply Finset.sum_congr rfl intro k _hk simp only [mem_filter, Finset.mem_univ, true_and] split_ifs <;> ring
Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex.tailCoeff_eq_cov · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:290 · uses Adj , FiniteIndex , meanIndex , tailCoeff , upperTail
def weightedScoreGram reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV

The weighted score Gram matrix is the mass-weighted second moment of supplied score vectors under supplied weights, for finite support and score dimensions.

Definition (Lean source)
K L :
ℕ
rho :
Fin K → ℝ
score :
Fin K → Fin L → ℝ
weightedScoreGram rho score :
Matrix (Fin L) (Fin L) ℝ
fun a b => ∑ k : Fin K, rho k * score k a * score k b
Causalean.PO.ID.Exact.MultipleInstrumentIV.weightedScoreGram · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:373
structure MatrixScoreAdapter reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV

A finite matrix score adapter, for finite support and score dimensions, stores nonnegative support weights that sum to one, support score vectors, and a numeric moment vector, together with an invertibility certificate and monotonicity of the resulting inverse-Gram score.

Definition (Lean source)
K L :
ℕ
Instrument support mass `ρ_k`.
rho :
Fin K → ℝ
Score vector `q(zᵏ)`.
score :
Fin K → Fin L → ℝ
Supplied numeric moment vector; no observed-moment equality is assumed.
momentVector :
Fin L → ℝ
Support masses are nonnegative.
rho_nonneg :
∀ k, 0 ≤ rho k
Support masses sum to one.
rho_sum_one :
∑ k, rho k = 1
The finite second-moment matrix is invertible.
gram_invertible :
The inverse-Gram transformed score is weakly increasing in the displayed support order.
adaptedScore_mono :
∀ {k l : Fin K}
if
k.val ≤ l.val
then
(∑ a : Fin L, (∑ b : Fin L, (⅟(weightedScoreGram rho score)) a b * momentVector b) * score k a)
≤ (∑ a : Fin L, (∑ b : Fin L, (⅟(weightedScoreGram rho score)) a b * momentVector b) * score l a)
Causalean.PO.ID.Exact.MultipleInstrumentIV.MatrixScoreAdapter · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:381
def scoreGram reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.MatrixScoreAdapter

The weighted score Gram matrix is the mass-weighted second moment specified by a finite matrix score adapter.

Definition (Lean source)
K :
ℕ
shared
L :
ℕ
shared
S :
shared
scoreGram S :
Matrix (Fin L) (Fin L) ℝ
weightedScoreGram S.rho S.score
Causalean.PO.ID.Exact.MultipleInstrumentIV.MatrixScoreAdapter.scoreGram · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:421 · uses MatrixScoreAdapter
def transformedCoeff reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.MatrixScoreAdapter

An inverse-Gram transformed coefficient is the selected coordinate of the numeric transformation specified by a finite matrix score adapter, at the selected score coordinate.

Definition (Lean source)
K :
ℕ
shared
L :
ℕ
shared
S :
shared
a :
Fin L
transformedCoeff S a :
ℝ
∑ b : Fin L, (⅟S.scoreGram) a b * S.momentVector b
Causalean.PO.ID.Exact.MultipleInstrumentIV.MatrixScoreAdapter.transformedCoeff · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:434 · uses MatrixScoreAdapter
def adaptedScore reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.MatrixScoreAdapter

The adapted score at a support point is the score--coefficient inner product in a finite matrix score adapter at that support point.

Definition (Lean source)
K :
ℕ
shared
L :
ℕ
shared
S :
shared
k :
Fin K
adaptedScore S k :
ℝ
∑ a : Fin L, S.transformedCoeff a * S.score k a
Causalean.PO.ID.Exact.MultipleInstrumentIV.MatrixScoreAdapter.adaptedScore · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:440 · uses MatrixScoreAdapter
def toFiniteIndex reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.MatrixScoreAdapter

The adapted ordered-score index retains the weights from a finite matrix score adapter and uses its transformed values as the monotone score. Additional hypotheses are needed to identify the supplied weights and moment vector with population treatment moments.

Definition (Lean source)
K :
ℕ
shared
L :
ℕ
shared
S :
shared
toFiniteIndex S :
clause 1
rho := S.rho
clause 2
dhat := S.adaptedScore
clause 3
rho_nonneg := S.rho_nonneg
clause 4
rho_sum_one := S.rho_sum_one
clause 5
dhat_mono := by intro k l hkl simp only [adaptedScore, transformedCoeff, scoreGram] exact S.adaptedScore_mono hkl
Causalean.PO.ID.Exact.MultipleInstrumentIV.MatrixScoreAdapter.toFiniteIndex · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:445 · uses FiniteIndex , MatrixScoreAdapter
5 supporting declarations (lemmas, instances)
  • supportMass_nonneg theorem — Every instrument support mass is nonnegative for a measurable sample space and finite support, population measure, finite-valued instrument, and support point.
    Ω :
    K :
    ℕ
    μ :
    Z :
    Ω → Fin K
    k :
    Fin K
    0 ≤ supportMass μ Z k
    Proof (Lean source)
    theorem supportMass_nonneg {Ω : Type*} [MeasurableSpace Ω] {K : ℕ} (μ : Measure Ω) (Z : Ω → Fin K) (k : Fin K) : 0 ≤ supportMass μ Z k := by exact ENNReal.toReal_nonneg
    Causalean.PO.ID.Exact.MultipleInstrumentIV.supportMass_nonneg · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:95
  • supportMass_sum_eq_one theorem — Instrument support masses sum to one under a probability measure, for a measurable finite-valued instrument on the measurable sample space and finite support. This makes the masses population weights.
    Ω :
    K :
    ℕ
    Z :
    Ω → Fin K
    hZ :
    ∑ k : Fin K, supportMass μ Z k = 1
    Proof (Lean source)
    theorem supportMass_sum_eq_one {Ω : Type*} [MeasurableSpace Ω] {K : ℕ} (μ : Measure Ω) [IsProbabilityMeasure μ] (Z : Ω → Fin K) (hZ : Measurable Z) : ∑ k : Fin K, supportMass μ Z k = 1 := by have hsum : (Finset.univ).sum (fun k : Fin K => (μ (Z ⁻¹' ({k} : Set (Fin K)))).toReal) = (μ (Z ⁻¹' (Set.univ : Set (Fin K)))).toReal := by simpa [Measure.real] using (MeasureTheory.sum_measureReal_preimage_singleton (μ := μ) (s := (Finset.univ : Finset (Fin K))) (f := Z) (hf := by intro k _hk exact hZ (measurableSet_singleton k)) (h := by intro k _hk exact ne_of_lt <| lt_of_le_of_lt (measure_mono (Set.subset_univ _)) (by simp [IsProbabilityMeasure.measure_univ]))) have hpre : ∀ k : Fin K, ({ω | Z ω = k} : Set Ω) = Z ⁻¹' ({k} : Set (Fin K)) := fun _ => rfl simpa [supportMass, hpre, Set.preimage_univ] using hsum
    Causalean.PO.ID.Exact.MultipleInstrumentIV.supportMass_sum_eq_one · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:103
  • centered_weight_sum_zero theorem — The support-mass-weighted centered score sums to zero for an ordered finite score index, which removes baseline components from centered-score moments.
    K :
    ℕ
    shared
    I :
    shared
    ∑ k, I.rho k * I.centeredIndex k = 0
    Proof (Lean source)
    theorem centered_weight_sum_zero : ∑ k, I.rho k * I.centeredIndex k = 0 := by calc ∑ k, I.rho k * I.centeredIndex k = ∑ k, (I.rho k * I.dhat k - I.rho k * I.meanIndex) := by simp [centeredIndex, sub_eq_add_neg, mul_add] _ = ∑ k, I.rho k * I.dhat k - ∑ k, I.rho k * I.meanIndex := by rw [Finset.sum_sub_distrib] _ = I.meanIndex - I.meanIndex * ∑ k, I.rho k := by simp [meanIndex, Finset.sum_mul, mul_comm] _ = 0 := by simp [I.rho_sum_one]
    Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex.centered_weight_sum_zero · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:169
  • tail_sum_interchange theorem — A support-point sum of cumulative margin contributions equals the tail-coefficient-weighted sum over margins for an ordered finite score index and a margin contribution schedule. This is the interchange that exposes signed causal-response weights.
    K :
    ℕ
    shared
    I :
    shared
    x :
    Adj K → ℝ
    (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ j : Adj K, if j.1.val ≤ k.val then x j else 0))
    = ∑ j : Adj K, I.tailCoeff j * x j
    Proof (Lean source)
    theorem tail_sum_interchange (x : Adj K → ℝ) : (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ j : Adj K, if j.1.val ≤ k.val then x j else 0)) = ∑ j : Adj K, I.tailCoeff j * x j := by simp only [tailCoeff, upperTail] calc (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ j : Adj K, if j.1.val ≤ k.val then x j else 0)) = ∑ k : Fin K, ∑ j : Adj K, if j.1.val ≤ k.val then (I.rho k * I.centeredIndex k) * x j else 0 := by simp [Finset.mul_sum, mul_ite, mul_zero, mul_assoc] _ = ∑ j : Adj K, ∑ k : Fin K, if j.1.val ≤ k.val then (I.rho k * I.centeredIndex k) * x j else 0 := by rw [Finset.sum_comm] _ = ∑ j : Adj K, x j * ∑ k : Fin K, if j.1.val ≤ k.val then I.rho k * I.centeredIndex k else 0 := by apply Finset.sum_congr rfl intro j _hj rw [Finset.mul_sum] apply Finset.sum_congr rfl intro k _hk by_cases h : j.1.val ≤ k.val · simp [h, mul_comm] · simp [h] _ = ∑ j : Adj K, (∑ k ∈ Finset.univ.filter fun k => j.1.val ≤ k.val, I.rho k * I.centeredIndex k) * x j := by simp [Finset.sum_filter, mul_comm]
    Causalean.PO.ID.Exact.MultipleInstrumentIV.FiniteIndex.tail_sum_interchange · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:256
  • instInvertibleScoreGram instance — The weighted score Gram matrix is invertible for a finite matrix score adapter.
    K :
    ℕ
    shared
    L :
    ℕ
    shared
    S :
    shared
    instInvertibleScoreGram S :
    Invertible S.scoreGram
    by change Invertible (weightedScoreGram S.rho S.score) exact S.gram_invertible
    Causalean.PO.ID.Exact.MultipleInstrumentIV.MatrixScoreAdapter.instInvertibleScoreGram · Causalean/PO/ID/Exact/MultipleInstrumentIV/FiniteIndex.lean:426
Response­Types 21 core · 7 supporting This file formalizes finite response-type algebra for a centered-score IV decomposition. ★ centeredScoreIVPopulationBridge_eq_centeredScoreIVFiniteAlgebra★ centeredScoreIVFiniteAlgebra_eq_responseTypeWeightedSum★ centeredScoreIVFiniteAlgebra_eq_positiveResponseTypeAverage_of_signAligned

Multiple-Instrument IV Response Types

This file formalizes finite response-type algebra for a centered-score IV decomposition. The basic objects are ResponseType, typeStep, ResponseTypeStats, the unnormalized and normalized weights unnormTypeWeight and normalizedTypeWeight, and the finite ratio centeredScoreIVFiniteAlgebra.

The nested PopulationBridge structure gives a finite-support bridge from support-point outcome and treatment expansions to the response-type ratio. Theorems firstStageMoment_eq_typeWeightDenom, reducedFormMoment_eq_typeWeightNumerator, and centeredScoreIVPopulationBridge_eq_centeredScoreIVFiniteAlgebra prove the algebraic identification step. The sign-alignment results normalizedTypeWeight_nonneg_of_signAligned, normalizedTypeWeight_sum_eq_one_of_pos, and centeredScoreIVFiniteAlgebra_eq_positiveResponseTypeAverage_of_signAligned explain when the ratio is a convex response-type average under an assumed abstract sign condition, while exists_negativeNormalizedTypeWeight gives a concrete two-support-point counterexample with a negative normalized weight.

The OpaqueAdjacentStepRestriction structure is only an opaque interface. It is not a formalization of MTW partial monotonicity, and no result in this file derives sign alignment from a behavioral monotonicity condition.

abbrev ResponseType reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV

A treatment response type specifies binary uptake at every point of a finite instrument support, capturing all first-stage heterogeneity relevant to the IV design.

Definition (Lean source)
K :
ℕ
ResponseType K :
Type
Fin K → Bool
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseType · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:69
def boolToReal reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV

The real-valued treatment indicator converts binary uptake to one for treatment and zero for no treatment, so it can enter population moments.

Definition (Lean source)
b :
boolToReal b :
ℝ
if b then 1 else 0
Causalean.PO.ID.Exact.MultipleInstrumentIV.boolToReal · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:73
def typeStep reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV

An adjacent treatment-response increment measures how a response type changes across one support threshold in a finite instrument support.

Definition (Lean source)
K :
ℕ
g :
j :
Adj K
typeStep g j :
ℝ
boolToReal (g (Adj.upper j)) - boolToReal (g (Adj.lower j))
Causalean.PO.ID.Exact.MultipleInstrumentIV.typeStep · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:78 · uses Adj , ResponseType
structure ResponseTypeStats reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV

Finite response-type statistics on a finite instrument support record the probability mass of each latent type and its average causal effect, subject to every mass being nonnegative and the masses summing to one, so the masses form a probability vector over response types.

Definition (Lean source)
K :
ℕ
Response-type mass `π_g = P(G = g)`.
mass :
ResponseType K → ℝ
Response-type causal effect `Δ_g`. Zero-mass conventions are handled at the finite-algebra layer by multiplying by `mass`.
effect :
ResponseType K → ℝ
Response-type masses are nonnegative.
mass_nonneg :
∀ g, 0 ≤ mass g
Response-type masses sum to one.
mass_sum_one :
∑ g, mass g = 1
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:83
def unnormTypeWeight reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

The unnormalized weight on a response type is that type's population mass times its tail-coefficient-weighted treatment increments, using an ordered score and finite response-type statistics.

Definition (Lean source)
K :
ℕ
shared
I :
shared
R :
shared
g :
unnormTypeWeight I R g :
ℝ
R.mass g * ∑ j : Adj K, I.tailCoeff j * typeStep g j
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.unnormTypeWeight · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:102 · uses FiniteIndex , ResponseType , ResponseTypeStats
def typeWeightDenom reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

The response-type weight denominator aggregates the signed type weights generated by an ordered score and finite response-type statistics; it is the finite first-stage moment.

Definition (Lean source)
K :
ℕ
shared
I :
shared
R :
shared
typeWeightDenom I R :
ℝ
∑ g : ResponseType K, R.unnormTypeWeight I g
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.typeWeightDenom · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:108 · uses FiniteIndex , ResponseTypeStats
def normalizedTypeWeight reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

The normalized weight on a response type divides that type's signed weight by the total generated from an ordered score and finite response-type statistics.

Definition (Lean source)
K :
ℕ
shared
I :
shared
R :
shared
g :
normalizedTypeWeight I R g :
ℝ
normalizedWeight (R.unnormTypeWeight I) g
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.normalizedTypeWeight · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:114 · uses FiniteIndex , ResponseType , ResponseTypeStats
def responseTypeEstimand reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

The response-type estimand averages type-specific causal effects from finite response-type statistics using the normalized weights induced by an ordered score.

Definition (Lean source)
K :
ℕ
shared
I :
shared
R :
shared
responseTypeEstimand I R :
ℝ
∑ g : ResponseType K, R.normalizedTypeWeight I g * R.effect g
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.responseTypeEstimand · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:119 · uses FiniteIndex , ResponseTypeStats
def centeredScoreIVFiniteAlgebra reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

The finite-algebra centered-score IV ratio divides the signed response-type-weighted effect sum from finite response-type statistics by the corresponding first-stage weight sum induced by an ordered score.

Definition (Lean source)
K :
ℕ
shared
I :
shared
R :
shared
centeredScoreIVFiniteAlgebra I R :
ℝ
(∑ g : ResponseType K, R.unnormTypeWeight I g * R.effect g) / R.typeWeightDenom I
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.centeredScoreIVFiniteAlgebra · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:125 · uses FiniteIndex , ResponseTypeStats
structure PopulationBridge reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

A finite-support response-type bridge on a finite instrument support combines response-type masses and type-specific effects with a baseline outcome mean for each response type. The centered score cancels this baseline, leaving the adjacent treatment increments used by the finite algebra.

Definition (Lean source)
K :
ℕ
Response-type masses and type-specific treatment effects.
stats :
Response-type-specific baseline outcome mean, the term subtracted by the centered-index argument in the signed decomposition proof.
baseOutcome :
ResponseType K → ℝ
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:135
def telescopedTypeStep reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

A response type's cumulative treatment change at a support point sums that type's adjacent uptake changes through the selected point of the finite instrument support.

Definition (Lean source)
K :
ℕ
shared
g :
k :
Fin K
telescopedTypeStep g k :
ℝ
∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.telescopedTypeStep · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:150 · uses ResponseType
def outcomeAtSupport reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The outcome mean at an instrument support point expands into baseline outcomes plus type-mass-weighted causal effects times cumulative treatment changes under the finite-support population bridge, at that point of the support.

Definition (Lean source)
K :
ℕ
shared
k :
Fin K
outcomeAtSupport P k :
ℝ
∑ g : ResponseType K, P.stats.mass g * (P.baseOutcome g + telescopedTypeStep g k * P.stats.effect g)
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.outcomeAtSupport · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:156 · uses PopulationBridge
def treatmentAtSupport reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The treatment-mean change from the reference support point is the type-mass-weighted cumulative uptake change under the finite-support population bridge, at the selected point of the support.

Definition (Lean source)
K :
ℕ
shared
k :
Fin K
treatmentAtSupport P k :
ℝ
∑ g : ResponseType K, P.stats.mass g * telescopedTypeStep g k
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.treatmentAtSupport · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:164 · uses PopulationBridge
def reducedFormMoment reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The population centered-score outcome moment weights support-specific outcome expansions from a finite-support bridge by centered scores from an ordered index across the finite support.

Definition (Lean source)
K :
ℕ
shared
I :
reducedFormMoment P I :
ℝ
∑ k : Fin K, I.rho k * I.centeredIndex k * P.outcomeAtSupport k
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.reducedFormMoment · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:170 · uses FiniteIndex , PopulationBridge
def firstStageMoment reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The population centered-score treatment moment weights support-specific treatment expansions from a finite-support bridge by centered scores from an ordered index across the finite support.

Definition (Lean source)
K :
ℕ
shared
I :
firstStageMoment P I :
ℝ
∑ k : Fin K, I.rho k * I.centeredIndex k * P.treatmentAtSupport k
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.firstStageMoment · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:176 · uses FiniteIndex , PopulationBridge
def centeredScoreIVPopulationBridge reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The population centered-score IV ratio divides the outcome moment by the treatment moment for a finite-support population bridge and ordered score index on the finite support.

Definition (Lean source)
K :
ℕ
shared
I :
centeredScoreIVPopulationBridge P I :
ℝ
P.reducedFormMoment I / P.firstStageMoment I
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.centeredScoreIVPopulationBridge · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:182 · uses FiniteIndex , PopulationBridge
theorem centeredScoreIVPopulationBridge_eq_centeredScoreIVFiniteAlgebra reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The population centered-score IV ratio equals the finite response-type ratio for an ordered finite score index and a finite-support response-type bridge. This is the decomposition algebra; a 2SLS interpretation additionally requires a projected first-stage score.

Formal statement
K :
ℕ
shared
I :
shared
P :
shared
P.centeredScoreIVPopulationBridge I = P.stats.centeredScoreIVFiniteAlgebra I
Proof (Lean source)
theorem centeredScoreIVPopulationBridge_eq_centeredScoreIVFiniteAlgebra : P.centeredScoreIVPopulationBridge I = P.stats.centeredScoreIVFiniteAlgebra I := by unfold centeredScoreIVPopulationBridge ResponseTypeStats.centeredScoreIVFiniteAlgebra rw [P.reducedFormMoment_eq_typeWeightNumerator I, P.firstStageMoment_eq_typeWeightDenom I]
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.centeredScoreIVPopulationBridge_eq_centeredScoreIVFiniteAlgebra · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:316 · uses FiniteIndex , PopulationBridge , centeredScoreIVPopulationBridge , centeredScoreIVFiniteAlgebra
def SignAligned reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

Sign alignment requires every positive-mass response type in finite response-type statistics to have a nonnegative tail-coefficient-weighted treatment response under the ordered score. It is exactly the condition preventing negative type weights.

Definition (Lean source)
K :
ℕ
shared
I :
shared
R :
shared
g :
0 < R.mass g
SignAligned I R :
Prop
0 ≤ ∑ j : Adj K, I.tailCoeff j * typeStep g j
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.SignAligned · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:328 · uses FiniteIndex , ResponseTypeStats
structure OpaqueAdjacentStepRestriction reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

The opaque adjacent-step interface on a finite instrument support stores an arbitrary response-type selection rule together with an assumed nonnegative-step certificate for selected types. It does not itself encode an econometric monotonicity restriction.

Definition (Lean source)
K :
ℕ
shared
Response types admitted by the restriction. This predicate is unconstrained; nothing in Lean forces it to correspond to any geometric or probabilistic monotonicity condition.
allowed :
ResponseType K → Prop
Allowed response types have nonnegative adjacent steps in the displayed support order. This is an axiom field, not a derived fact.
step_nonneg_of_allowed :
∀ g : ResponseType K
if
allowed g
then
∀ j : Adj K, 0 ≤ typeStep g j
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.OpaqueAdjacentStepRestriction · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:335
theorem centeredScoreIVFiniteAlgebra_eq_responseTypeWeightedSum reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

The finite-algebra centered-score IV ratio equals the response-type-weighted sum of within-type causal effects for an ordered score and finite response-type statistics when the score-weight denominator is nonzero. This is the normalization algebra appearing in prop:po-estimand-mtw-response-type-form, whose 2SLS interpretation additionally fixes the score to the fitted first stage.

Formal statement
K :
ℕ
shared
I :
shared
R :
shared
hden :
R.typeWeightDenom I ≠ 0
R.centeredScoreIVFiniteAlgebra I = R.responseTypeEstimand I
Proof (Lean source)
theorem centeredScoreIVFiniteAlgebra_eq_responseTypeWeightedSum (hden : R.typeWeightDenom I ≠ 0) : R.centeredScoreIVFiniteAlgebra I = R.responseTypeEstimand I := by have _ : R.typeWeightDenom I ≠ 0 := hden unfold centeredScoreIVFiniteAlgebra responseTypeEstimand normalizedTypeWeight calc (∑ g : ResponseType K, R.unnormTypeWeight I g * R.effect g) / R.typeWeightDenom I = ∑ g : ResponseType K, (R.unnormTypeWeight I g * R.effect g) / R.typeWeightDenom I := by rw [Finset.sum_div] _ = ∑ g : ResponseType K, R.unnormTypeWeight I g / R.typeWeightDenom I * R.effect g := by apply Finset.sum_congr rfl intro g _hg rw [div_mul_eq_mul_div]
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.centeredScoreIVFiniteAlgebra_eq_responseTypeWeightedSum · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:387 · uses FiniteIndex , ResponseTypeStats , centeredScoreIVFiniteAlgebra , responseTypeEstimand , typeWeightDenom
theorem centeredScoreIVFiniteAlgebra_eq_positiveResponseTypeAverage_of_signAligned reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

The centered-score IV ratio is a convex average of response-type causal effects for an ordered score and finite response-type statistics when response types are sign-aligned and the score-weight denominator is positive: every weight is nonnegative and the weights sum to one.

Formal statement
K :
ℕ
shared
I :
shared
R :
shared
hAlign :
R.SignAligned I
hden :
0 < R.typeWeightDenom I
conclusion 1
R.centeredScoreIVFiniteAlgebra I = R.responseTypeEstimand I
conclusion 2
g :
0 ≤ R.normalizedTypeWeight I g
conclusion 3
∑ g : ResponseType K, R.normalizedTypeWeight I g = 1
Proof (Lean source)
theorem centeredScoreIVFiniteAlgebra_eq_positiveResponseTypeAverage_of_signAligned (hAlign : R.SignAligned I) (hden : 0 < R.typeWeightDenom I) : R.centeredScoreIVFiniteAlgebra I = R.responseTypeEstimand I ∧ (∀ g : ResponseType K, 0 ≤ R.normalizedTypeWeight I g) ∧ (∑ g : ResponseType K, R.normalizedTypeWeight I g = 1) := by constructor · exact R.centeredScoreIVFiniteAlgebra_eq_responseTypeWeightedSum I hden.ne' constructor · intro g exact R.normalizedTypeWeight_nonneg_of_signAligned I hAlign hden g · exact R.normalizedTypeWeight_sum_eq_one_of_pos I hden
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.centeredScoreIVFiniteAlgebra_eq_positiveResponseTypeAverage_of_signAligned · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:407 · uses FiniteIndex , ResponseType , ResponseTypeStats , SignAligned , centeredScoreIVFiniteAlgebra , normalizedTypeWeight , responseTypeEstimand , typeWeightDenom
7 supporting declarations (lemmas, instances)
  • baselineMoment_eq_zero theorem — The centered-score moment of the response-type baseline outcome is zero for an ordered score index and finite-support population bridge, so only causal-response increments remain in the reduced form.
    K :
    ℕ
    shared
    I :
    shared
    P :
    shared
    (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ g : ResponseType K, P.stats.mass g * P.baseOutcome g))
    = 0
    Proof (Lean source)
    theorem baselineMoment_eq_zero : (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ g : ResponseType K, P.stats.mass g * P.baseOutcome g)) = 0 := by calc (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ g : ResponseType K, P.stats.mass g * P.baseOutcome g)) = (∑ k : Fin K, I.rho k * I.centeredIndex k) * (∑ g : ResponseType K, P.stats.mass g * P.baseOutcome g) := by rw [Finset.sum_mul] _ = 0 := by rw [I.centered_weight_sum_zero] simp
    Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.baselineMoment_eq_zero · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:189
  • firstStageMoment_eq_typeWeightDenom theorem — The finite-support first-stage moment equals the aggregate response-type weight for an ordered score index and population bridge. This identifies the denominator of the response-type IV ratio.
    K :
    ℕ
    shared
    I :
    shared
    P :
    shared
    P.firstStageMoment I = P.stats.typeWeightDenom I
    Proof (Lean source)
    theorem firstStageMoment_eq_typeWeightDenom : P.firstStageMoment I = P.stats.typeWeightDenom I := by classical unfold firstStageMoment treatmentAtSupport telescopedTypeStep ResponseTypeStats.typeWeightDenom ResponseTypeStats.unnormTypeWeight calc (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ g : ResponseType K, P.stats.mass g * (∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0))) = ∑ k : Fin K, ∑ g : ResponseType K, I.rho k * I.centeredIndex k * (P.stats.mass g * (∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0)) := by apply Finset.sum_congr rfl intro k _hk rw [Finset.mul_sum] _ = ∑ g : ResponseType K, ∑ k : Fin K, I.rho k * I.centeredIndex k * (P.stats.mass g * (∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0)) := by rw [Finset.sum_comm] _ = ∑ g : ResponseType K, P.stats.mass g * (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0)) := by apply Finset.sum_congr rfl intro g _hg rw [Finset.mul_sum] apply Finset.sum_congr rfl intro k _hk ring _ = ∑ g : ResponseType K, P.stats.mass g * (∑ j : Adj K, I.tailCoeff j * typeStep g j) := by apply Finset.sum_congr rfl intro g _hg rw [I.tail_sum_interchange (fun j => typeStep g j)]
    Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.firstStageMoment_eq_typeWeightDenom · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:207
  • reducedFormMoment_eq_typeWeightNumerator theorem — The finite-support reduced-form moment equals the response-type-weighted causal-effect sum for an ordered score index and population bridge. This identifies the numerator of the response-type IV ratio.
    K :
    ℕ
    shared
    I :
    shared
    P :
    shared
    P.reducedFormMoment I
    = ∑ g : ResponseType K, P.stats.unnormTypeWeight I g * P.stats.effect g
    Proof (Lean source)
    theorem reducedFormMoment_eq_typeWeightNumerator : P.reducedFormMoment I = ∑ g : ResponseType K, P.stats.unnormTypeWeight I g * P.stats.effect g := by classical unfold reducedFormMoment outcomeAtSupport telescopedTypeStep ResponseTypeStats.unnormTypeWeight calc (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ g : ResponseType K, P.stats.mass g * (P.baseOutcome g + (∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0) * P.stats.effect g))) = (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ g : ResponseType K, P.stats.mass g * P.baseOutcome g)) + ∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ g : ResponseType K, P.stats.mass g * ((∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0) * P.stats.effect g)) := by simp only [mul_add, Finset.sum_add_distrib] _ = ∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ g : ResponseType K, P.stats.mass g * ((∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0) * P.stats.effect g)) := by rw [P.baselineMoment_eq_zero I] simp _ = ∑ k : Fin K, ∑ g : ResponseType K, I.rho k * I.centeredIndex k * (P.stats.mass g * ((∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0) * P.stats.effect g)) := by apply Finset.sum_congr rfl intro k _hk rw [Finset.mul_sum] _ = ∑ g : ResponseType K, ∑ k : Fin K, I.rho k * I.centeredIndex k * (P.stats.mass g * ((∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0) * P.stats.effect g)) := by rw [Finset.sum_comm] _ = ∑ g : ResponseType K, P.stats.mass g * (∑ k : Fin K, I.rho k * I.centeredIndex k * (∑ j : Adj K, if j.1.val ≤ k.val then typeStep g j else 0)) * P.stats.effect g := by apply Finset.sum_congr rfl intro g _hg simp [Finset.mul_sum, mul_assoc, mul_comm, mul_left_comm] _ = ∑ g : ResponseType K, (P.stats.mass g * (∑ j : Adj K, I.tailCoeff j * typeStep g j)) * P.stats.effect g := by apply Finset.sum_congr rfl intro g _hg rw [I.tail_sum_interchange (fun j => typeStep g j)]
    Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.reducedFormMoment_eq_typeWeightNumerator · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:250
  • unnormTypeWeight_nonneg_of_signAligned theorem — Every unnormalized response-type weight is nonnegative when an ordered score and finite response-type population satisfy sign alignment, for the selected response type. Nonnegative type masses then preserve the aligned sign.
    K :
    ℕ
    shared
    I :
    shared
    R :
    shared
    hAlign :
    R.SignAligned I
    g :
    0 ≤ R.unnormTypeWeight I g
    Proof (Lean source)
    theorem unnormTypeWeight_nonneg_of_signAligned (hAlign : R.SignAligned I) (g : ResponseType K) : 0 ≤ R.unnormTypeWeight I g := by unfold unnormTypeWeight by_cases hpos : 0 < R.mass g · exact mul_nonneg (R.mass_nonneg g) (hAlign g hpos) · have hle : R.mass g ≤ 0 := le_of_not_gt hpos have hmass : R.mass g = 0 := le_antisymm hle (R.mass_nonneg g) simp [hmass]
    Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.unnormTypeWeight_nonneg_of_signAligned · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:354
  • normalizedTypeWeight_nonneg_of_signAligned theorem — Each normalized response-type weight is nonnegative when an ordered score and finite response-type population satisfy sign alignment and have a positive score-weight denominator, for the selected response type. The paper-facing 2SLS claim needs additional first-stage and behavioral conditions.
    K :
    ℕ
    shared
    I :
    shared
    R :
    shared
    hAlign :
    R.SignAligned I
    hden :
    0 < R.typeWeightDenom I
    g :
    0 ≤ R.normalizedTypeWeight I g
    Proof (Lean source)
    theorem normalizedTypeWeight_nonneg_of_signAligned (hAlign : R.SignAligned I) (hden : 0 < R.typeWeightDenom I) (g : ResponseType K) : 0 ≤ R.normalizedTypeWeight I g := by exact normalizedWeight_nonneg (R.unnormTypeWeight I) (R.unnormTypeWeight_nonneg_of_signAligned I hAlign) hden g
    Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.normalizedTypeWeight_nonneg_of_signAligned · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:367
  • normalizedTypeWeight_sum_eq_one_of_pos theorem — The normalized response-type weights sum to one for an ordered score and finite response-type population when the first-stage weight denominator is positive.
    K :
    ℕ
    shared
    I :
    shared
    R :
    shared
    hden :
    0 < R.typeWeightDenom I
    ∑ g : ResponseType K, R.normalizedTypeWeight I g = 1
    Proof (Lean source)
    theorem normalizedTypeWeight_sum_eq_one_of_pos (hden : 0 < R.typeWeightDenom I) : ∑ g : ResponseType K, R.normalizedTypeWeight I g = 1 := by exact sum_normalizedWeight_eq_one (R.unnormTypeWeight I) hden.ne'
    Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.normalizedTypeWeight_sum_eq_one_of_pos · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:378
  • exists_negativeNormalizedTypeWeight theorem — Negative-weights theorem. There exists a finite-support instrument index, a response-type population, and a response type such that, with two support points and a 3/4-defier population, that type has positive mass yet a negative normalized response-type weight (equal to −1/2).
    ∃ (I : FiniteIndex 2) (R : ResponseTypeStats 2) (g : ResponseType 2),
    conclusion 1
    0 < R.mass g
    conclusion 2
    R.normalizedTypeWeight I g < 0
    Proof (Lean source)
    theorem exists_negativeNormalizedTypeWeight : ∃ (I : FiniteIndex 2) (R : ResponseTypeStats 2) (g : ResponseType 2), 0 < R.mass g ∧ R.normalizedTypeWeight I g < 0 := by refine ⟨exIndex, exStats, gComplier, ?_, ?_⟩ · -- mass of complier type = 1/4 > 0 rw [exStats_mass, exMass_complier]; norm_num · -- normalized weight = (3/64) / (-3/32) = -1/2 < 0 rw [ResponseTypeStats.normalizedTypeWeight, normalizedWeight] change exStats.unnormTypeWeight exIndex gComplier / (∑ k, exStats.unnormTypeWeight exIndex k) < 0 rw [← ResponseTypeStats.typeWeightDenom, exStats_unnorm_complier, exStats_denom] norm_num
    Causalean.PO.ID.Exact.MultipleInstrumentIV.exists_negativeNormalizedTypeWeight · Causalean/PO/ID/Exact/MultipleInstrumentIV/ResponseTypes.lean:608
Population 6 core · 5 supporting This file connects an observed centered-score IV moment ratio for a finite instrument to the response-type finite algebra. ★ observedCenteredScoreIV_eq_centeredScoreIVFiniteAlgebra

Multiple-Instrument IV Population Bridge

This file connects an observed centered-score IV moment ratio for a finite instrument to the response-type finite algebra. It defines the observed moments observedReducedFormMoment, observedFirstStageMoment, and observedCenteredScoreIV; rewrites the first two as finite sums over instrument cells; and packages the assumptions needed for the measure-backed bridge in ObservedBridge.

The main results are ObservedBridge.observedReducedFormMoment_eq_reducedFormMoment, ObservedBridge.observedFirstStageMoment_eq_firstStageMoment, ObservedBridge.observedCenteredScoreIV_eq_centeredScoreIVPopulationBridge, and the end-to-end theorem ObservedBridge.observedCenteredScoreIV_eq_centeredScoreIVFiniteAlgebra. They show that the observable population ratio E[h(Z)Y] / E[h(Z)D] agrees with the finite response-type algebra once the observed conditional means are linked to the bridge. A separate projected-score premise is needed to call this ratio population 2SLS.

def zEvent reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

An instrument cell selects units in a sample space whose finite-valued instrument equals one support point in the finite support.

Definition (Lean source)
Ω :
Type u_1
shared
K :
ℕ
shared
Z :
Ω → Fin K
k :
Fin K
zEvent Z k :
Set Ω
Z ⁻¹' ({k} : Set (Fin K))
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.zEvent · Causalean/PO/ID/Exact/MultipleInstrumentIV/Population.lean:52
def observedReducedFormMoment reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The observed centered-score outcome moment averages outcome times the centered score from an ordered index, evaluated at the instrument under the population measure on the measurable sample space and finite support.

Definition (Lean source)
Ω :
Type u_1
shared
K :
ℕ
shared
μ :
Z :
Ω → Fin K
Y :
Ω → ℝ
I :
observedReducedFormMoment μ Z Y I :
ℝ
∫ ω, I.centeredIndex (Z ω) * Y ω ∂μ
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.observedReducedFormMoment · Causalean/PO/ID/Exact/MultipleInstrumentIV/Population.lean:57 · uses FiniteIndex
def observedFirstStageMoment reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The observed centered-score treatment moment averages binary treatment times the centered score from an ordered index, evaluated at the instrument under the population measure on the measurable sample space and finite support.

Definition (Lean source)
Ω :
Type u_1
shared
K :
ℕ
shared
μ :
Z :
Ω → Fin K
D :
Ω → Bool
I :
observedFirstStageMoment μ Z D I :
ℝ
∫ ω, I.centeredIndex (Z ω) * boolToReal (D ω) ∂μ
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.observedFirstStageMoment · Causalean/PO/ID/Exact/MultipleInstrumentIV/Population.lean:64 · uses FiniteIndex
def observedCenteredScoreIV reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The observed centered-score IV ratio divides the centered-score moment of the outcome by that of binary treatment, using an instrument, ordered score index, and population measure on the measurable sample space and finite support.

Definition (Lean source)
Ω :
Type u_1
shared
K :
ℕ
shared
μ :
Z :
Ω → Fin K
D :
Ω → Bool
Y :
Ω → ℝ
I :
observedCenteredScoreIV μ Z D Y I :
ℝ
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.observedCenteredScoreIV · Causalean/PO/ID/Exact/MultipleInstrumentIV/Population.lean:72 · uses FiniteIndex
structure ObservedBridge reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

An observed-data response-type bridge on a measurable population space with finite instrument support connects a population law, a finite-valued instrument, a binary treatment, and a real-valued outcome to an ordered score index and a response-type population expansion. It requires the law to be a probability measure, index masses to match observed instrument-cell probabilities, conditional outcome means to match the response-type expansion, and conditional treatment means to follow the response-type expansion around a common baseline.

Definition (Lean source)
Ω :
Type u_1
shared
K :
ℕ
shared
μ :
Z :
Ω → Fin K
D :
Ω → Bool
Y :
Ω → ℝ
I :
The observed law is a probability measure, so the integrals below are population expectations.
isProbability :
The finite support masses in `I` are the probabilities of the observed instrument cells.
rho_eq_zMass :
∀ k : Fin K, I.rho k = (μ (zEvent Z k)).toReal
Conditional outcome bridge after consistency, exogeneity, and exclusion: for each instrument cell Z = zᵏ, the observed conditional mean E[Y | Z = zᵏ] equals the response-type expansion `P.outcomeAtSupport k`. This is a field of the algebraic bridge. `MultipleInstrumentIV/POBridge.lean` derives it in `POMultipleIVSystem.toObservedBridge` from consistency and instrument independence, so callers may supply it directly or obtain the whole bridge from that system.
outcome_cell :
∀ k : Fin K, normalizedRestrictedIntegral μ (zEvent Z k) Y = P.outcomeAtSupport k
Baseline treatment mean, common across support cells after exogeneity. The centered score cancels this term in the treatment moment.
baseTreatment :
ℝ
Conditional treatment bridge after consistency and exogeneity, stated in baseline-subtracted form: the adjacent telescoping term is the deviation from the baseline support point, not the raw treatment mean. Like `outcome_cell`, this field is derived from a `POMultipleIVSystem` under consistency and instrument independence by `POMultipleIVSystem.toObservedBridge`.
treatment_cell :
∀ k : Fin K,
normalizedRestrictedIntegral μ (zEvent Z k) (fun ω => boolToReal (D ω))
= baseTreatment + P.treatmentAtSupport k
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.ObservedBridge · Causalean/PO/ID/Exact/MultipleInstrumentIV/Population.lean:154 · uses FiniteIndex , PopulationBridge
theorem observedCenteredScoreIV_eq_centeredScoreIVFiniteAlgebra reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.ObservedBridge

The observed centered-score IV ratio equals the finite response-type algebra ratio under a measure, instrument, treatment, outcome, ordered score, and observed-data bridge, when the instrument is measurable, the weighted outcome and weighted treatment are integrable.

Formal statement
Ω :
Type u_1
shared
K :
ℕ
shared
μ :
shared
Z :
Ω → Fin K
shared
D :
Ω → Bool
shared
Y :
Ω → ℝ
shared
I :
shared
P :
shared
B :
ObservedBridge μ Z D Y I P
hZ :
hYInt :
Integrable (fun ω => I.centeredIndex (Z ω) * Y ω) μ
hDInt :
Integrable (fun ω => I.centeredIndex (Z ω) * boolToReal (D ω)) μ
observedCenteredScoreIV μ Z D Y I = P.stats.centeredScoreIVFiniteAlgebra I
Proof (Lean source)
theorem observedCenteredScoreIV_eq_centeredScoreIVFiniteAlgebra (B : ObservedBridge μ Z D Y I P) [IsFiniteMeasure μ] (hZ : Measurable Z) (hYInt : Integrable (fun ω => I.centeredIndex (Z ω) * Y ω) μ) (hDInt : Integrable (fun ω => I.centeredIndex (Z ω) * boolToReal (D ω)) μ) : observedCenteredScoreIV μ Z D Y I = P.stats.centeredScoreIVFiniteAlgebra I := by rw [B.observedCenteredScoreIV_eq_centeredScoreIVPopulationBridge hZ hYInt hDInt, P.centeredScoreIVPopulationBridge_eq_centeredScoreIVFiniteAlgebra I]
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.ObservedBridge.observedCenteredScoreIV_eq_centeredScoreIVFiniteAlgebra · Causalean/PO/ID/Exact/MultipleInstrumentIV/Population.lean:273 · uses FiniteIndex , centeredIndex , PopulationBridge , ObservedBridge , observedCenteredScoreIV , centeredScoreIVFiniteAlgebra , boolToReal
5 supporting declarations (lemmas, instances)
Main 5 core · 2 supporting This file provides the public finite-support facade for an abstract multiple-instrument response-type algebra. ★ centeredScoreIVPopulationBridge_eq_responseTypeWeightedSum★ centeredScoreIVPopulationBridge_eq_positiveResponseTypeAverage_of_signAligned★ observedCenteredScoreIV_eq_responseTypeWeightedSum

Multiple-Instrument IV Main Facade

This file provides the public finite-support facade for an abstract multiple-instrument response-type algebra. It exposes the signed adjacent ratio, the response-type weighted-sum form, positivity under an assumed sign- alignment condition, and the corresponding population bridge statements. It does not provide the behavioral or empirical conditions in the full MTW multiple-instrument characterization.

def signedAdjacentNumerator reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

The signed adjacent outcome numerator aggregates within-type causal effects from finite response-type statistics using the unnormalized weights induced by an ordered score.

Definition (Lean source)
K :
ℕ
shared
I :
shared
R :
shared
signedAdjacentNumerator I R :
ℝ
∑ g : ResponseType K, R.unnormTypeWeight I g * R.effect g
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.signedAdjacentNumerator · Causalean/PO/ID/Exact/MultipleInstrumentIV/Main.lean:44 · uses FiniteIndex , ResponseTypeStats
def signedAdjacentDenominator reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats

The signed adjacent treatment denominator aggregates all unnormalized type weights induced by an ordered score and finite response-type statistics.

Definition (Lean source)
K :
ℕ
shared
I :
shared
R :
shared
signedAdjacentDenominator I R :
ℝ
R.typeWeightDenom I
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.signedAdjacentDenominator · Causalean/PO/ID/Exact/MultipleInstrumentIV/Main.lean:50 · uses FiniteIndex , ResponseTypeStats
theorem centeredScoreIVPopulationBridge_eq_responseTypeWeightedSum reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The population-bridge centered-score IV ratio equals the response-type-weighted sum of within-type causal effects for an ordered score and finite-support population bridge, provided the score-weight denominator is nonzero.

Formal statement
K :
ℕ
shared
I :
shared
P :
shared
hden :
P.stats.typeWeightDenom I ≠ 0
P.centeredScoreIVPopulationBridge I = P.stats.responseTypeEstimand I
Proof (Lean source)
theorem centeredScoreIVPopulationBridge_eq_responseTypeWeightedSum (hden : P.stats.typeWeightDenom I ≠ 0) : P.centeredScoreIVPopulationBridge I = P.stats.responseTypeEstimand I := by rw [P.centeredScoreIVPopulationBridge_eq_centeredScoreIVFiniteAlgebra I] exact P.stats.centeredScoreIVFiniteAlgebra_eq_responseTypeWeightedSum I hden
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.centeredScoreIVPopulationBridge_eq_responseTypeWeightedSum · Causalean/PO/ID/Exact/MultipleInstrumentIV/Main.lean:84 · uses FiniteIndex , PopulationBridge , centeredScoreIVPopulationBridge , responseTypeEstimand , typeWeightDenom
theorem centeredScoreIVPopulationBridge_eq_positiveResponseTypeAverage_of_signAligned reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge

The population-bridge centered-score IV ratio is a convex response-type average for an ordered score and finite-support population bridge when response types are sign-aligned and the score-weight denominator is positive.

Formal statement
K :
ℕ
shared
I :
shared
P :
shared
hAlign :
P.stats.SignAligned I
hden :
0 < P.stats.typeWeightDenom I
conclusion 1
P.centeredScoreIVPopulationBridge I = P.stats.responseTypeEstimand I
conclusion 2
g :
0 ≤ P.stats.normalizedTypeWeight I g
conclusion 3
∑ g : ResponseType K, P.stats.normalizedTypeWeight I g = 1
Proof (Lean source)
theorem centeredScoreIVPopulationBridge_eq_positiveResponseTypeAverage_of_signAligned (hAlign : P.stats.SignAligned I) (hden : 0 < P.stats.typeWeightDenom I) : P.centeredScoreIVPopulationBridge I = P.stats.responseTypeEstimand I ∧ (∀ g : ResponseType K, 0 ≤ P.stats.normalizedTypeWeight I g) ∧ (∑ g : ResponseType K, P.stats.normalizedTypeWeight I g = 1) := by rw [P.centeredScoreIVPopulationBridge_eq_centeredScoreIVFiniteAlgebra I] exact P.stats.centeredScoreIVFiniteAlgebra_eq_positiveResponseTypeAverage_of_signAligned I hAlign hden
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.centeredScoreIVPopulationBridge_eq_positiveResponseTypeAverage_of_signAligned · Causalean/PO/ID/Exact/MultipleInstrumentIV/Main.lean:93 · uses FiniteIndex , ResponseType , PopulationBridge , centeredScoreIVPopulationBridge , SignAligned , normalizedTypeWeight , responseTypeEstimand , typeWeightDenom
theorem observedCenteredScoreIV_eq_responseTypeWeightedSum reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.ObservedBridge

The observed centered-score IV ratio equals the response-type-weighted sum of within-type causal effects when an observed-data bridge links instrument, treatment, and outcome to the response-type population, the instrument is measurable, the weighted outcome and weighted treatment are integrable, and the observed first stage is nonzero.

Formal statement
Ω :
Type u_1
shared
K :
ℕ
shared
μ :
shared
Z :
Ω → Fin K
shared
D :
Ω → Bool
shared
Y :
Ω → ℝ
shared
I :
shared
P :
shared
B :
ObservedBridge μ Z D Y I P
hZ :
hYInt :
Integrable (fun ω => I.centeredIndex (Z ω) * Y ω) μ
hDInt :
Integrable (fun ω => I.centeredIndex (Z ω) * boolToReal (D ω)) μ
hden :
observedCenteredScoreIV μ Z D Y I = P.stats.responseTypeEstimand I
Proof (Lean source)
theorem observedCenteredScoreIV_eq_responseTypeWeightedSum (B : ObservedBridge μ Z D Y I P) [IsFiniteMeasure μ] (hZ : Measurable Z) (hYInt : Integrable (fun ω => I.centeredIndex (Z ω) * Y ω) μ) (hDInt : Integrable (fun ω => I.centeredIndex (Z ω) * boolToReal (D ω)) μ) (hden : observedFirstStageMoment μ Z D I ≠ 0) : observedCenteredScoreIV μ Z D Y I = P.stats.responseTypeEstimand I := by -- Step 1: observed → finite algebra have h1 : observedCenteredScoreIV μ Z D Y I = P.stats.centeredScoreIVFiniteAlgebra I := B.observedCenteredScoreIV_eq_centeredScoreIVFiniteAlgebra hZ hYInt hDInt -- Step 2: the observed denominator equals typeWeightDenom have hden' : P.stats.typeWeightDenom I ≠ 0 := by rwa [← P.firstStageMoment_eq_typeWeightDenom I, ← B.observedFirstStageMoment_eq_firstStageMoment hZ hDInt] -- Step 3: finite algebra → response-type weighted sum rw [h1] exact P.stats.centeredScoreIVFiniteAlgebra_eq_responseTypeWeightedSum I hden'
Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.ObservedBridge.observedCenteredScoreIV_eq_responseTypeWeightedSum · Causalean/PO/ID/Exact/MultipleInstrumentIV/Main.lean:118 · uses FiniteIndex , centeredIndex , PopulationBridge , ObservedBridge , observedCenteredScoreIV , observedFirstStageMoment , responseTypeEstimand , boolToReal
2 supporting declarations (lemmas, instances)
  • centeredScoreIVFiniteAlgebra_eq_signedAdjacentRatio theorem — The finite-algebra centered-score IV ratio is the signed adjacent outcome numerator divided by the treatment denominator for an ordered score and finite response-type statistics, provided that denominator is nonzero.
    K :
    ℕ
    shared
    I :
    shared
    R :
    shared
    _hden :
    R.signedAdjacentDenominator I ≠ 0
    R.centeredScoreIVFiniteAlgebra I
    = R.signedAdjacentNumerator I / R.signedAdjacentDenominator I
    Proof (Lean source)
    theorem centeredScoreIVFiniteAlgebra_eq_signedAdjacentRatio (_hden : R.signedAdjacentDenominator I ≠ 0) : R.centeredScoreIVFiniteAlgebra I = R.signedAdjacentNumerator I / R.signedAdjacentDenominator I := by rfl
    Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.centeredScoreIVFiniteAlgebra_eq_signedAdjacentRatio · Causalean/PO/ID/Exact/MultipleInstrumentIV/Main.lean:55
  • centeredScoreIVPopulationBridge_eq_signedAdjacentRatio theorem — The population-bridge centered-score IV ratio equals the signed adjacent outcome numerator divided by its treatment denominator for an ordered score and finite-support population bridge, provided the denominator is nonzero.
    K :
    ℕ
    shared
    I :
    shared
    P :
    shared
    hden :
    P.stats.signedAdjacentDenominator I ≠ 0
    P.centeredScoreIVPopulationBridge I
    = P.stats.signedAdjacentNumerator I / P.stats.signedAdjacentDenominator I
    Proof (Lean source)
    theorem centeredScoreIVPopulationBridge_eq_signedAdjacentRatio (hden : P.stats.signedAdjacentDenominator I ≠ 0) : P.centeredScoreIVPopulationBridge I = P.stats.signedAdjacentNumerator I / P.stats.signedAdjacentDenominator I := by rw [P.centeredScoreIVPopulationBridge_eq_centeredScoreIVFiniteAlgebra I] exact P.stats.centeredScoreIVFiniteAlgebra_eq_signedAdjacentRatio I hden
    Causalean.PO.ID.Exact.MultipleInstrumentIV.ResponseTypeStats.PopulationBridge.centeredScoreIVPopulationBridge_eq_signedAdjacentRatio · Causalean/PO/ID/Exact/MultipleInstrumentIV/Main.lean:74
POBridge 27 core · 24 supporting This file grounds a multiple-instrument finite response-type algebra in a potential-outcome system. ★ POMultipleIVSystem★ observedCenteredScoreIV_eq_responseTypeWeightedSum

Multiple-Instrument IV Potential-Outcome Bridge

This file grounds a multiple-instrument finite response-type algebra in a potential-outcome system. The structure POMultipleIVSystem records a finite instrument, binary treatment, and real outcome; responseType, mass, effect, toStats, and toPopulationBridge turn its counterfactual response types into the finite response-type algebra.

The bridge lemmas treatmentDrop and outcomeDrop derive instrument-cell conditional means from consistency and instrument independence. The definitions toObservedBridge and theorem observedCenteredScoreIV_eq_responseTypeWeightedSum assemble those derived cell identities into an observed finite-support centered-score response-type identity. The behavioral and empirical conditions of the full MTW characterization are not formalized here, nor is the supplied score proved to be a first-stage fit.

structure POMultipleIVSystem reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV

A multiple-instrument IV potential-outcome subsystem within a potential-outcome system and finite instrument support records an instrument node with that support, a binary treatment node, and a real-valued outcome node, subject to the three nodes being pairwise distinct.

Definition (Lean source)
P :
K :
ℕ
Instrument node.
Z :
P.V
Treatment node.
D :
P.V
Outcome node.
Y :
P.V
The instrument value space is a `Fin K` support.
hZfin :
P.X Z ≃ᵐ Fin K
The treatment is binary.
hDbool :
P.X D ≃ᵐ Bool
The outcome is real.
hYreal :
P.X Y ≃ᵐ ℝ
The instrument and treatment are distinct nodes.
hZD :
Z ≠ D
The treatment and outcome are distinct nodes.
hDY :
D ≠ Y
The instrument and outcome are distinct nodes.
hZY :
Z ≠ Y
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:74 · uses POSystem
def zVar reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The finite-valued instrument variable exposes the assignment node of a multiple-instrument IV subsystem inside the potential-outcome system on its finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
zVar S :
POVar P (Fin K)
⟨S.Z, S.hZfin⟩
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.zVar · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:102 · uses POMultipleIVSystem , POSystem , POVar
def dVar reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The binary treatment variable exposes uptake from a multiple-instrument IV subsystem inside the potential-outcome system with finite instrument support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
dVar S :
⟨S.D, S.hDbool⟩
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.dVar · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:107 · uses POMultipleIVSystem , POSystem , POVar
def yVar reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The real-valued outcome variable exposes the response from a multiple-instrument IV subsystem inside the potential-outcome system with finite instrument support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
yVar S :
POVar P ℝ
⟨S.Y, S.hYreal⟩
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.yVar · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:112 · uses POMultipleIVSystem , POSystem , POVar
def DofZ reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

Potential treatment records binary uptake in a multiple-instrument IV subsystem of the potential-outcome system under a fixed instrument support point from the finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
k :
Fin K
DofZ S k :
P.Ω → Bool
S.dVar.cfUnder S.zVar k
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.DofZ · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:117 · uses POMultipleIVSystem , POSystem
def YofD reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

Potential outcome records the response in a multiple-instrument IV subsystem of the potential-outcome system under a fixed treatment arm, with exclusion encoded structurally over the finite instrument support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
d :
YofD S d :
P.Ω → ℝ
S.yVar.cfUnder S.dVar d
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.YofD · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:122 · uses POMultipleIVSystem , POSystem
def factualZ reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The observed instrument records realized assignment in a multiple-instrument IV subsystem of the potential-outcome system on the finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
factualZ S :
P.Ω → Fin K
S.zVar.factual
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.factualZ · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:127 · uses POMultipleIVSystem , POSystem
def factualD reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The observed treatment records realized binary uptake in a multiple-instrument IV subsystem of the potential-outcome system with finite instrument support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
factualD S :
P.Ω → Bool
S.dVar.factual
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.factualD · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:131 · uses POMultipleIVSystem , POSystem
def factualY reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The observed outcome records realized response in a multiple-instrument IV subsystem of the potential-outcome system with finite instrument support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
factualY S :
P.Ω → ℝ
S.yVar.factual
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.factualY · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:136 · uses POMultipleIVSystem , POSystem
def responseType reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The treatment response-type map collects each unit's potential uptake at every point of the finite instrument support in a multiple-instrument IV subsystem of the potential-outcome system.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
responseType S :
P.Ω → ResponseType K
fun ω k => S.DofZ k ω
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.responseType · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:141 · uses POMultipleIVSystem , ResponseType , POSystem
def gEvent reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

A response-type subgroup selects units in a multiple-instrument IV subsystem of the potential-outcome system whose treatment-response vector equals the chosen type on the finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
g :
gEvent S g :
Set P.Ω
S.responseType ⁻¹' {g}
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.gEvent · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:146 · uses POMultipleIVSystem , ResponseType , POSystem
def zEvent reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

An observed instrument cell selects units in a multiple-instrument IV subsystem of the potential-outcome system assigned to one support point in the finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
k :
Fin K
zEvent S k :
Set P.Ω
S.zVar.event k
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.zEvent · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:151 · uses POMultipleIVSystem , POSystem
def YofDofZ reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

Outcome under instrument-induced treatment selects the treated or untreated potential outcome in a multiple-instrument IV subsystem of the potential-outcome system according to uptake induced by one support point in the finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
k :
Fin K
YofDofZ S k :
P.Ω → ℝ
fun ω => if S.DofZ k ω then S.YofD true ω else S.YofD false ω
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.YofDofZ · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:156 · uses POMultipleIVSystem , POSystem
def dUnderZ reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The regimed treatment response couples potential uptake in a multiple-instrument IV subsystem of the potential-outcome system with the support point fixed from the finite instrument support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
k :
Fin K
dUnderZ S k :
⟨S.dVar, Regime.single S.Z (S.hZfin.symm k)⟩
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.dUnderZ · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:171 · uses POMultipleIVSystem , POSystem , RegimedVar
def yUnderD reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The regimed outcome response couples potential outcome in a multiple-instrument IV subsystem of the potential-outcome system with the fixed treatment arm, over the finite instrument support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
d :
yUnderD S d :
⟨S.yVar, Regime.single S.D (S.hDbool.symm d)⟩
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.yUnderD · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:177 · uses POMultipleIVSystem , POSystem , RegimedVar
def cfCell reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The support-point counterfactual cell bundles potential treatment under one instrument value with both treatment-arm outcomes in a multiple-instrument IV subsystem of the potential-outcome system on the finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
k :
Fin K
cfCell S k :
POCFBundle.cons (S.dUnderZ k) <| POCFBundle.cons (S.yUnderD true) <| POCFBundle.cons (S.yUnderD false) <| POCFBundle.nil P
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.cfCell · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:183 · uses POMultipleIVSystem , POCFBundle , POSystem
structure Assumptions reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

Local multi-instrument bridge assumptions. A multiple-instrument subsystem in a potential-outcome system with finite instrument support assumes the observed treatment and outcome equal the potential treatment and outcome realized under the actual instrument value, and at each support point the instrument is independent of the potential treatment there and both treatment-arm potential outcomes.

Definition (Lean source)
P :
shared
K :
ℕ
shared
consistency :
P.Consistency

Consistency (SUTVA): observed D/Y equal the realized potential treatment/outcome.

instrumentIndep :
∀ k : Fin K, P.IndepCF (RegimedVar.ofFactual S.zVar) (S.cfCell k) P.μ

Instrument independence (IV exogeneity): for each support point, the instrument is independent of the counterfactual cell (D(zᵏ), Y(1), Y(0)). This is implied by (and weaker than) full joint independence of Z from all potential outcomes; it is exactly what the cell-conditional-mean derivations below consume.

Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.Assumptions · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:256 · uses POMultipleIVSystem , POSystem
def mass reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

A response-type mass is the population probability of the selected treatment-response type in a multiple-instrument IV subsystem of the potential-outcome system on the finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
g :
mass S g :
ℝ
(P.μ (S.gEvent g)).toReal
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.mass · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:448 · uses POMultipleIVSystem , ResponseType , POSystem
def effect reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The within-type causal effect averages the treated-minus-untreated outcome contrast among units of one response type in a multiple-instrument IV subsystem of the potential-outcome system on the finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
g :
effect S g :
ℝ
normalizedRestrictedIntegral P.μ (S.gEvent g) (fun ω => S.YofD true ω - S.YofD false ω)
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.effect · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:453 · uses POMultipleIVSystem , ResponseType , POSystem
def z0 reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The reference instrument value is the first point of a nonempty finite support for a multiple-instrument IV subsystem in the potential-outcome system.

Definition (Lean source)
P :
shared
K :
ℕ
shared
hK :
0 < K
z0 _S hK :
Fin K
⟨0, hK⟩
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.z0 · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:459 · uses POMultipleIVSystem , POSystem
def baseOutcome reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

A response type's baseline outcome is its mean outcome under treatment induced by the first point of a nonempty finite support, for the selected type in a multiple-instrument IV subsystem of the potential-outcome system.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
hK :
0 < K
g :
baseOutcome S hK g :
ℝ
normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofDofZ (S.z0 hK))
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.baseOutcome · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:464 · uses POMultipleIVSystem , ResponseType , POSystem
def baseTreatment reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The baseline treatment mean is average uptake induced by the first point of a nonempty finite support in a multiple-instrument IV subsystem of the potential-outcome system.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
hK :
0 < K
baseTreatment S hK :
ℝ
∫ ω, boolToReal (S.DofZ (S.z0 hK) ω) ∂P.μ
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.baseTreatment · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:470 · uses POMultipleIVSystem , POSystem
def toStats reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

Finite response-type statistics collect type masses and within-type causal effects from a multiple-instrument IV subsystem of the potential-outcome system on the finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
toStats S :
clause 1
mass := S.mass
clause 2
effect := S.effect
clause 3
mass_nonneg := S.mass_nonneg
clause 4
mass_sum_one := S.mass_sum_one
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.toStats · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:501 · uses POMultipleIVSystem , ResponseTypeStats , POSystem
def toPopulationBridge reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The finite-support response-type population bridge combines type statistics and baseline outcomes from a multiple-instrument IV subsystem of the potential-outcome system on a nonempty finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
hK :
0 < K
toPopulationBridge S hK :
ResponseTypeStats.PopulationBridge K
clause 1
stats := S.toStats
clause 2
baseOutcome := S.baseOutcome hK
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.toPopulationBridge · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:510 · uses POMultipleIVSystem , PopulationBridge , POSystem
def toFiniteIndex reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The subsystem's ordered finite score index combines its instrument-cell probabilities with a supplied support score that is weakly increasing, for a multiple-instrument IV subsystem of the potential-outcome system on the finite support.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
dhat :
Fin K → ℝ
hmono :
∀ {k l : Fin K}
if
k.val ≤ l.val
then
dhat k ≤ dhat l
toFiniteIndex S dhat hmono :
FiniteIndex.fromMeasureScore P.μ S.factualZ S.measurable_factualZ dhat hmono
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.toFiniteIndex · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:517 · uses FiniteIndex , POMultipleIVSystem , POSystem
def toObservedBridge reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

The observed population bridge links factual moments to the finite response-type representation for a multiple-instrument IV subsystem of the potential-outcome system on a nonempty support, under the local IV assumptions, a weakly increasing support score, positive instrument-cell mass, and integrable treated and untreated potential outcomes.

Definition (Lean source)
P :
shared
K :
ℕ
shared
S :
shared
hK :
0 < K
hA :
S.Assumptions
dhat :
Fin K → ℝ
hmono :
∀ {k l : Fin K}
if
k.val ≤ l.val
then
dhat k ≤ dhat l
hZpos :
∀ k : Fin K, P.μ (S.zEvent k) ≠ 0
hY1 :
Integrable (S.YofD true) P.μ
hY0 :
Integrable (S.YofD false) P.μ
toObservedBridge S hK hA dhat hmono hZpos hY1 hY0 :
ResponseTypeStats.PopulationBridge.ObservedBridge P.μ S.factualZ S.factualD S.factualY (S.toFiniteIndex dhat hmono) (S.toPopulationBridge hK)
clause 1
isProbability := P.isProb
clause 2
rho_eq_zMass := S.rho_eq_zMass dhat hmono
clause 3
outcome_cell := fun k => S.outcome_cell_eq hK hA k (hZpos k) hY1 hY0
clause 4
baseTreatment := S.baseTreatment hK
clause 5
treatment_cell := fun k => S.treatment_cell_eq hK hA k (hZpos k)
theorem observedCenteredScoreIV_eq_responseTypeWeightedSum reviewed
Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem

Potential-outcome finite-support centered-score IV identity. Consider a nonempty finite instrument support together with a real support score that is weakly increasing in the support order, under the local consistency and pointwise-exogeneity bundle. If every instrument-support cell has positive probability, the potential outcome under treatment and under control are integrable, the centered-instrument-weighted outcome and treatment are integrable, and the observed first-stage moment is nonzero, then the observed centered-score IV estimand equals the response-type-weighted average of within-type causal effects.

Formal statement
P :
shared
K :
ℕ
shared
S :
shared
hK :
0 < K
hA :
S.Assumptions
dhat :
Fin K → ℝ
hmono :
∀ {k l : Fin K}
if
k.val ≤ l.val
then
dhat k ≤ dhat l
hZpos :
∀ k : Fin K, P.μ (S.zEvent k) ≠ 0
hY1 :
Integrable (S.YofD true) P.μ
hY0 :
Integrable (S.YofD false) P.μ
hYInt :
Integrable (fun ω => (S.toFiniteIndex dhat hmono).centeredIndex (S.factualZ ω) * S.factualY ω) P.μ
hDInt :
Integrable (fun ω => (S.toFiniteIndex dhat hmono).centeredIndex (S.factualZ ω) * boolToReal (S.factualD ω)) P.μ
hden :
ResponseTypeStats.PopulationBridge.observedFirstStageMoment P.μ S.factualZ S.factualD (S.toFiniteIndex dhat hmono)
≠ 0
ResponseTypeStats.PopulationBridge.observedCenteredScoreIV P.μ S.factualZ S.factualD S.factualY (S.toFiniteIndex dhat hmono)
= (S.toPopulationBridge hK).stats.responseTypeEstimand (S.toFiniteIndex dhat hmono)
Proof (Lean source)
theorem observedCenteredScoreIV_eq_responseTypeWeightedSum [IsFiniteMeasure P.μ] (hK : 0 < K) (hA : S.Assumptions) (dhat : Fin K → ℝ) (hmono : ∀ {k l : Fin K}, k.val ≤ l.val → dhat k ≤ dhat l) (hZpos : ∀ k : Fin K, P.μ (S.zEvent k) ≠ 0) (hY1 : Integrable (S.YofD true) P.μ) (hY0 : Integrable (S.YofD false) P.μ) (hYInt : Integrable (fun ω => (S.toFiniteIndex dhat hmono).centeredIndex (S.factualZ ω) * S.factualY ω) P.μ) (hDInt : Integrable (fun ω => (S.toFiniteIndex dhat hmono).centeredIndex (S.factualZ ω) * boolToReal (S.factualD ω)) P.μ) (hden : ResponseTypeStats.PopulationBridge.observedFirstStageMoment P.μ S.factualZ S.factualD (S.toFiniteIndex dhat hmono) ≠ 0) : ResponseTypeStats.PopulationBridge.observedCenteredScoreIV P.μ S.factualZ S.factualD S.factualY (S.toFiniteIndex dhat hmono) = (S.toPopulationBridge hK).stats.responseTypeEstimand (S.toFiniteIndex dhat hmono) := (S.toObservedBridge hK hA dhat hmono hZpos hY1 hY0).observedCenteredScoreIV_eq_responseTypeWeightedSum S.measurable_factualZ hYInt hDInt hden
24 supporting declarations (lemmas, instances)
  • YofDofZ_def lemma — Instrument-induced outcome equals the treated potential outcome when uptake occurs and the untreated potential outcome otherwise in a multiple-instrument IV subsystem, at the chosen support point of the finite support.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    k :
    Fin K
    S.YofDofZ k = fun ω => if S.DofZ k ω then S.YofD true ω else S.YofD false ω
    Proof (Lean source)
    @[causal_defs_simps] lemma YofDofZ_def (k : Fin K) : S.YofDofZ k = fun ω => if S.DofZ k ω then S.YofD true ω else S.YofD false ω := rfl
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.YofDofZ_def · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:163
  • measurable_DofZ lemma — Potential treatment at an instrument support point is measurable in a multiple-instrument IV subsystem, for that point of the finite support in the potential-outcome system.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    k :
    Fin K
    Measurable (S.DofZ k)
    Proof (Lean source)
    @[fun_prop] lemma measurable_DofZ (k : Fin K) : Measurable (S.DofZ k) := S.dVar.measurable_cfUnder S.zVar k
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.measurable_DofZ · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:194
  • measurable_YofD lemma — Potential outcome under a treatment arm is measurable in a multiple-instrument IV subsystem, for that arm within the potential-outcome system and finite instrument support.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    d :
    Measurable (S.YofD d)
    Proof (Lean source)
    @[fun_prop] lemma measurable_YofD (d : Bool) : Measurable (S.YofD d) := S.yVar.measurable_cfUnder S.dVar d
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.measurable_YofD · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:201
  • measurable_factualZ lemma — The observed instrument is measurable in a multiple-instrument IV subsystem of the potential-outcome system on the finite support, making instrument cells observable.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    Measurable S.factualZ
    Proof (Lean source)
    @[fun_prop] lemma measurable_factualZ : Measurable S.factualZ := S.zVar.measurable_factual
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.measurable_factualZ · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:208
  • measurable_factualD lemma — The observed treatment is measurable in a multiple-instrument IV subsystem of the potential-outcome system with finite instrument support.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    Measurable S.factualD
    Proof (Lean source)
    @[fun_prop] lemma measurable_factualD : Measurable S.factualD := S.dVar.measurable_factual
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.measurable_factualD · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:214
  • measurable_factualY lemma — The observed outcome is measurable in a multiple-instrument IV subsystem of the potential-outcome system with finite instrument support, so its moments are defined.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    Measurable S.factualY
    Proof (Lean source)
    @[fun_prop] lemma measurable_factualY : Measurable S.factualY := S.yVar.measurable_factual
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.measurable_factualY · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:220
  • measurable_responseType lemma — The full treatment response-type map is measurable in a multiple-instrument IV subsystem of the potential-outcome system on the finite support, making latent type cells measurable.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    Measurable S.responseType
    Proof (Lean source)
    @[fun_prop] lemma measurable_responseType : Measurable S.responseType := measurable_pi_lambda _ (fun k => S.measurable_DofZ k)
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.measurable_responseType · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:226
  • measurableSet_gEvent lemma — Each response-type subgroup is measurable in a multiple-instrument IV subsystem, for the selected type on the finite support within the potential-outcome system.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    g :
    MeasurableSet (S.gEvent g)
    Proof (Lean source)
    lemma measurableSet_gEvent (g : ResponseType K) : MeasurableSet (S.gEvent g) := S.measurable_responseType (measurableSet_singleton g)
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.measurableSet_gEvent · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:233
  • measurableSet_zEvent lemma — Each observed instrument cell is measurable in a multiple-instrument IV subsystem, for the selected point of the finite support within the potential-outcome system.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    k :
    Fin K
    MeasurableSet (S.zEvent k)
    Proof (Lean source)
    lemma measurableSet_zEvent (k : Fin K) : MeasurableSet (S.zEvent k) := S.zVar.measurableSet_event k (measurableSet_singleton k)
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.measurableSet_zEvent · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:239
  • measurable_YofDofZ lemma — Outcome under instrument-induced treatment is measurable in a multiple-instrument IV subsystem, for the selected point of the finite support within the potential-outcome system.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    k :
    Fin K
    Measurable (S.YofDofZ k)
    Proof (Lean source)
    @[fun_prop] lemma measurable_YofDofZ (k : Fin K) : Measurable (S.YofDofZ k) := by unfold YofDofZ exact Measurable.ite (S.measurable_DofZ k (MeasurableSet.singleton true)) (S.measurable_YofD true) (S.measurable_YofD false)
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.measurable_YofDofZ · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:245
  • DofZ_eq_factualD_on_zEvent lemma — Consistency identifies potential treatment with observed treatment inside an instrument cell under the local multi-instrument assumptions, for the support point and a unit observed in its cell.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    hA :
    S.Assumptions
    k :
    Fin K
    ω :
    P.Ω
    hω :
    ω ∈ S.zEvent k
    S.DofZ k ω = S.factualD ω
    Proof (Lean source)
    lemma DofZ_eq_factualD_on_zEvent (hA : S.Assumptions) (k : Fin K) {ω : P.Ω} (hω : ω ∈ S.zEvent k) : S.DofZ k ω = S.factualD ω := POVar.cf_eq_factual_on_event hA.consistency S.dVar S.zVar k S.hZD.symm hω
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.DofZ_eq_factualD_on_zEvent · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:281
  • factualY_eq_YofD_factualD lemma — Consistency identifies observed outcome with potential outcome under realized treatment under the local multi-instrument assumptions, for the unit being evaluated.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    hA :
    S.Assumptions
    ω :
    P.Ω
    S.factualY ω = S.YofD (S.factualD ω) ω
    Proof (Lean source)
    lemma factualY_eq_YofD_factualD (hA : S.Assumptions) (ω : P.Ω) : S.factualY ω = S.YofD (S.factualD ω) ω := POVar.factual_eq_cfUnder_self_selected hA.consistency S.yVar S.dVar S.hDY.symm ω
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.factualY_eq_YofD_factualD · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:289
  • DofZ_eq_on_gEvent lemma — Within a response-type subgroup, potential treatment at a support point equals that type's recorded response for the response type, support point, and unit in the type cell. This makes cell means expandable over latent types.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    g :
    k :
    Fin K
    ω :
    P.Ω
    hω :
    ω ∈ S.gEvent g
    S.DofZ k ω = g k
    Proof (Lean source)
    lemma DofZ_eq_on_gEvent (g : ResponseType K) (k : Fin K) {ω : P.Ω} (hω : ω ∈ S.gEvent g) : S.DofZ k ω = g k := by have : S.responseType ω = g := hω calc S.DofZ k ω = S.responseType ω k := rfl _ = g k := by rw [this]
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.DofZ_eq_on_gEvent · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:296
  • treatmentDrop theorem — The observed treatment mean in an instrument cell equals mean potential treatment under that support value under the local multi-instrument assumptions, for the support point when its observed cell has positive mass.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    hA :
    S.Assumptions
    k :
    Fin K
    hZk :
    P.μ (S.zEvent k) ≠ 0
    normalizedRestrictedIntegral P.μ (S.zEvent k) (fun ω => boolToReal (S.factualD ω))
    = ∫ ω, boolToReal (S.DofZ k ω) ∂P.μ
    Proof (Lean source)
    theorem treatmentDrop [IsFiniteMeasure P.μ] (hA : S.Assumptions) (k : Fin K) (hZk : P.μ (S.zEvent k) ≠ 0) : normalizedRestrictedIntegral P.μ (S.zEvent k) (fun ω => boolToReal (S.factualD ω)) = ∫ ω, boolToReal (S.DofZ k ω) ∂P.μ := by let h_proj : (∀ i : Fin (S.cfCell k).n, (S.cfCell k).type i) → ℝ := fun f => boolToReal ((f (0 : Fin 3)) : Bool) have hh_meas : Measurable h_proj := by -- Instance search no longer unfolds `cfCell` to see `n = 3`, so supply the -- coordinate measurable-space family at index type `Fin 3` directly. let _ : ∀ i : Fin 3, MeasurableSpace ((S.cfCell k).type i) := fun i => (S.cfCell k).inst i change Measurable fun f : ∀ i : Fin (S.cfCell k).n, (S.cfCell k).type i => boolToReal ((f (0 : Fin 3)) : Bool) exact (by fun_prop : Measurable fun b : Bool => boolToReal b).comp (measurable_pi_apply (0 : Fin 3)) have hF_eq : ∀ ω ∈ S.zVar.event k, boolToReal (S.factualD ω) = h_proj ((S.cfCell k).jointValue ω) := by intro ω hω rw [← S.DofZ_eq_factualD_on_zEvent hA k hω] dsimp [h_proj] have hJV0 : ((S.cfCell k).jointValue ω (0 : Fin 3) : Bool) = S.DofZ k ω := rfl rw [hJV0] change normalizedRestrictedIntegral P.μ (S.zVar.event k) (fun ω => boolToReal (S.factualD ω)) = ∫ ω, boolToReal (S.DofZ k ω) ∂P.μ rw [POSystem.eventCondExp_of_ae_eq_IndepCF (hA.instrumentIndep k) (a := S.zVar) hh_meas (measurableSet_singleton k) (ae_restrict_of_forall_mem (μ := P.μ) (S.measurableSet_zEvent k) hF_eq) hZk (measure_ne_top _ _)] refine MeasureTheory.integral_congr_ae (Filter.Eventually.of_forall ?_) intro ω dsimp [h_proj] have hJV0 : ((S.cfCell k).jointValue ω (0 : Fin 3) : Bool) = S.DofZ k ω := rfl rw [hJV0]
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.treatmentDrop · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:313
  • outcomeDrop theorem — The observed outcome mean in an instrument cell equals mean outcome under the treatment induced by that support value under the local multi-instrument assumptions, for the support point, when its cell has positive mass and treated and untreated potential outcomes are integrable.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    hA :
    S.Assumptions
    k :
    Fin K
    hZk :
    P.μ (S.zEvent k) ≠ 0
    hY1 :
    Integrable (S.YofD true) P.μ
    hY0 :
    Integrable (S.YofD false) P.μ
    normalizedRestrictedIntegral P.μ (S.zEvent k) S.factualY = ∫ ω, S.YofDofZ k ω ∂P.μ
    Proof (Lean source)
    theorem outcomeDrop [IsFiniteMeasure P.μ] (hA : S.Assumptions) (k : Fin K) (hZk : P.μ (S.zEvent k) ≠ 0) (hY1 : Integrable (S.YofD true) P.μ) (hY0 : Integrable (S.YofD false) P.μ) : normalizedRestrictedIntegral P.μ (S.zEvent k) S.factualY = ∫ ω, S.YofDofZ k ω ∂P.μ := by have _hY1 : Integrable (S.YofD true) P.μ := hY1 have _hY0 : Integrable (S.YofD false) P.μ := hY0 let getD : (∀ i : Fin (S.cfCell k).n, (S.cfCell k).type i) → Bool := fun f => ((f (0 : Fin 3)) : Bool) let getY1 : (∀ i : Fin (S.cfCell k).n, (S.cfCell k).type i) → ℝ := fun f => ((f (1 : Fin 3)) : ℝ) let getY0 : (∀ i : Fin (S.cfCell k).n, (S.cfCell k).type i) → ℝ := fun f => ((f (2 : Fin 3)) : ℝ) let h_proj : (∀ i : Fin (S.cfCell k).n, (S.cfCell k).type i) → ℝ := fun f => cond (getD f) (getY1 f) (getY0 f) have hh_meas : Measurable h_proj := by -- Instance search no longer unfolds `cfCell` to see `n = 3`, so supply the -- coordinate measurable-space family at index type `Fin 3` directly. let _ : ∀ i : Fin 3, MeasurableSpace ((S.cfCell k).type i) := fun i => (S.cfCell k).inst i have hD_meas : Measurable getD := by dsimp [getD] exact measurable_pi_apply (0 : Fin 3) have hY1_meas : Measurable getY1 := by dsimp [getY1] exact measurable_pi_apply (1 : Fin 3) have hY0_meas : Measurable getY0 := by dsimp [getY0] exact measurable_pi_apply (2 : Fin 3) have hif : Measurable fun f => if getD f = true then getY1 f else getY0 f := by refine Measurable.ite ?_ ?_ ?_ · exact hD_meas (MeasurableSet.singleton true) · exact hY1_meas · exact hY0_meas simpa [h_proj, Bool.cond_eq_ite] using hif have hF_eq : ∀ ω ∈ S.zVar.event k, S.factualY ω = h_proj ((S.cfCell k).jointValue ω) := by intro ω hω rw [S.factualY_eq_YofD_factualD hA ω, ← S.DofZ_eq_factualD_on_zEvent hA k hω] dsimp [h_proj, getD, getY1, getY0] have hJV0 : ((S.cfCell k).jointValue ω (0 : Fin 3) : Bool) = S.DofZ k ω := rfl have hJV1 : ((S.cfCell k).jointValue ω (1 : Fin 3) : ℝ) = S.YofD true ω := rfl have hJV2 : ((S.cfCell k).jointValue ω (2 : Fin 3) : ℝ) = S.YofD false ω := rfl rw [hJV0, hJV1, hJV2] cases S.DofZ k ω <;> simp change normalizedRestrictedIntegral P.μ (S.zVar.event k) S.factualY = ∫ ω, S.YofDofZ k ω ∂P.μ rw [POSystem.eventCondExp_of_ae_eq_IndepCF (hA.instrumentIndep k) (a := S.zVar) hh_meas (measurableSet_singleton k) (ae_restrict_of_forall_mem (μ := P.μ) (S.measurableSet_zEvent k) hF_eq) hZk (measure_ne_top _ _)] refine MeasureTheory.integral_congr_ae (Filter.Eventually.of_forall ?_) intro ω dsimp [h_proj, getD, getY1, getY0] have hJV0 : ((S.cfCell k).jointValue ω (0 : Fin 3) : Bool) = S.DofZ k ω := rfl have hJV1 : ((S.cfCell k).jointValue ω (1 : Fin 3) : ℝ) = S.YofD true ω := rfl have hJV2 : ((S.cfCell k).jointValue ω (2 : Fin 3) : ℝ) = S.YofD false ω := rfl rw [hJV0, hJV1, hJV2] unfold YofDofZ cases S.DofZ k ω <;> simp
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.outcomeDrop · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:351
  • gEvent_pairwise_disjoint lemma — Distinct response-type subgroups are disjoint in a multiple-instrument IV subsystem, so latent types form nonoverlapping population cells.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    Pairwise (onFun Disjoint S.gEvent)
    Proof (Lean source)
    lemma gEvent_pairwise_disjoint : Pairwise (onFun Disjoint S.gEvent) := by intro g h hgh refine Set.disjoint_left.mpr ?_ intro ω hg hh exact hgh ((Set.mem_singleton_iff.mp hg).symm.trans (Set.mem_singleton_iff.mp hh))
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.gEvent_pairwise_disjoint · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:423
  • gEvent_iUnion lemma — The response-type subgroups cover the full population in a multiple-instrument IV subsystem, so every unit belongs to exactly one latent treatment-response type.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    (⋃ g : ResponseType K, S.gEvent g) = univ
    Proof (Lean source)
    lemma gEvent_iUnion : (⋃ g : ResponseType K, S.gEvent g) = univ := by ext ω; simp [gEvent]
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.gEvent_iUnion · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:432
  • integral_partition lemma — A population integral equals the sum of response-type masses times within-type means in a multiple-instrument IV subsystem, for an integrable quantity. This is the finite total law used to expand observed moments.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    f :
    P.Ω → ℝ
    hf :
    Integrable f P.μ
    ∫ ω, f ω ∂P.μ
    = ∑ g : ResponseType K, (P.μ (S.gEvent g)).toReal * normalizedRestrictedIntegral P.μ (S.gEvent g) f
    Proof (Lean source)
    lemma integral_partition [IsFiniteMeasure P.μ] {f : P.Ω → ℝ} (hf : Integrable f P.μ) : ∫ ω, f ω ∂P.μ = ∑ g : ResponseType K, (P.μ (S.gEvent g)).toReal * normalizedRestrictedIntegral P.μ (S.gEvent g) f := integral_eq_sum_measure_mul_eventCondExp P.μ S.gEvent S.measurableSet_gEvent S.gEvent_pairwise_disjoint S.gEvent_iUnion f hf
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.integral_partition · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:437
  • mass_nonneg lemma — Every response-type mass is nonnegative in a multiple-instrument IV subsystem, for the selected response type, because it is a population probability.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    g :
    0 ≤ S.mass g
    Proof (Lean source)
    lemma mass_nonneg (g : ResponseType K) : 0 ≤ S.mass g := ENNReal.toReal_nonneg
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.mass_nonneg · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:476
  • mass_sum_one lemma — Response-type masses sum to one in a multiple-instrument IV subsystem, so they form population weights over the exhaustive latent-type partition.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    ∑ g : ResponseType K, S.mass g = 1
    Proof (Lean source)
    lemma mass_sum_one : ∑ g : ResponseType K, S.mass g = 1 := by have hsum : (Finset.univ).sum (fun g : ResponseType K => (P.μ (S.responseType ⁻¹' ({g} : Set (ResponseType K)))).toReal) = (P.μ (S.responseType ⁻¹' (Set.univ : Set (ResponseType K)))).toReal := by simpa [Measure.real] using (MeasureTheory.sum_measureReal_preimage_singleton (μ := P.μ) (s := (Finset.univ : Finset (ResponseType K))) (f := S.responseType) (hf := by intro g _hg exact S.measurable_responseType (measurableSet_singleton g)) (h := by intro g _hg exact measure_ne_top _ _)) simpa [mass, gEvent, Set.preimage_univ, IsProbabilityMeasure.measure_univ] using hsum
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.mass_sum_one · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:481
  • telescoped_eq lemma — Cumulative adjacent treatment changes equal the response difference between a support point and the reference point in a multiple-instrument IV subsystem, for a nonempty support, response type, and support point.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    hK :
    0 < K
    g :
    k :
    Fin K
    ResponseTypeStats.PopulationBridge.telescopedTypeStep g k
    = boolToReal (g k) - boolToReal (g (S.z0 hK))
    Proof (Lean source)
    lemma telescoped_eq (hK : 0 < K) (g : ResponseType K) (k : Fin K) : ResponseTypeStats.PopulationBridge.telescopedTypeStep g k = boolToReal (g k) - boolToReal (g (S.z0 hK)) := by classical let a : ℕ → ℝ := fun n => if h : n < K then boolToReal (g ⟨n, h⟩) else 0 have htel : ∀ n : ℕ, (∑ r ∈ range n, (a (r + 1) - a r)) = a n - a 0 := by intro n induction n with | zero => simp | succ n ih => rw [Finset.sum_range_succ, ih] ring have hsum : (∑ j ∈ (Finset.univ.filter fun j : Adj K => j.1.val ≤ k.val), typeStep g j) = ∑ r ∈ range k.val, (a (r + 1) - a r) := by refine Finset.sum_nbij (fun j : Adj K => j.1.val - 1) ?_ ?_ ?_ ?_ · intro j hj have hjle : j.1.val ≤ k.val := by simpa using hj rw [Finset.mem_range] have hpos : 0 < j.1.val := j.2 omega · intro j1 hj1 j2 hj2 h apply Subtype.ext apply Fin.ext have hj1le : j1.1.val ≤ k.val := by simpa using hj1 have hj2le : j2.1.val ≤ k.val := by simpa using hj2 have hpos1 : 0 < j1.1.val := j1.2 have hpos2 : 0 < j2.1.val := j2.2 change j1.1.val - 1 = j2.1.val - 1 at h omega · intro r hr have hrlt : r < k.val := by simpa using hr refine ⟨⟨⟨r + 1, ?_⟩, ?_⟩, ?_, ?_⟩ · exact Nat.lt_of_le_of_lt (succ_le_of_lt hrlt) k.isLt · exact Nat.succ_pos r · refine Finset.mem_filter.mpr ⟨Finset.mem_univ _, ?_⟩ show r + 1 ≤ k.val omega · change r + 1 - 1 = r omega · intro j hj have hjle : j.1.val ≤ k.val := by simpa using hj have hsucc : j.1.val - 1 + 1 = j.1.val := Nat.sub_add_cancel (succ_le_of_lt j.2) have hpred_lt : j.1.val - 1 < K := Nat.lt_of_le_of_lt (sub_le _ _) j.1.isLt simp [typeStep, Adj.upper, Adj.lower, a, hpred_lt, hsucc] unfold ResponseTypeStats.PopulationBridge.telescopedTypeStep rw [Finset.sum_ite] simp only [Finset.sum_const_zero, add_zero] rw [hsum, htel] have hak : a k.val = boolToReal (g k) := by simp [a, k.isLt] have ha0 : a 0 = boolToReal (g (S.z0 hK)) := by simp [a, hK, z0] rw [hak, ha0]
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.telescoped_eq · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:528
  • treatment_cell_eq theorem — The observed treatment mean in an instrument cell equals the common baseline treatment mean plus its response-type treatment expansion for a nonempty support, under the local IV assumptions, at a support point whose cell has positive mass.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    hK :
    0 < K
    hA :
    S.Assumptions
    k :
    Fin K
    hZk :
    P.μ (S.zEvent k) ≠ 0
    normalizedRestrictedIntegral P.μ (S.zEvent k) (fun ω => boolToReal (S.factualD ω))
    = S.baseTreatment hK + (S.toPopulationBridge hK).treatmentAtSupport k
    Proof (Lean source)
    theorem treatment_cell_eq [IsFiniteMeasure P.μ] (hK : 0 < K) (hA : S.Assumptions) (k : Fin K) (hZk : P.μ (S.zEvent k) ≠ 0) : normalizedRestrictedIntegral P.μ (S.zEvent k) (fun ω => boolToReal (S.factualD ω)) = S.baseTreatment hK + (S.toPopulationBridge hK).treatmentAtSupport k := by have hDint : ∀ q : Fin K, Integrable (fun ω => boolToReal (S.DofZ q ω)) P.μ := by intro q have hbdd : ∀ ω, |boolToReal (S.DofZ q ω)| ≤ (1 : ℝ) := by intro ω cases S.DofZ q ω <;> simp [boolToReal] exact (MeasureTheory.integrable_const (1 : ℝ)).mono' (((by fun_prop : Measurable fun b : Bool => boolToReal b).comp (S.measurable_DofZ q)).aestronglyMeasurable) (Filter.Eventually.of_forall hbdd) have hCell : ∀ (q : Fin K) (g : ResponseType K), S.mass g * normalizedRestrictedIntegral P.μ (S.gEvent g) (fun ω => boolToReal (S.DofZ q ω)) = S.mass g * boolToReal (g q) := by intro q g calc S.mass g * normalizedRestrictedIntegral P.μ (S.gEvent g) (fun ω => boolToReal (S.DofZ q ω)) = normalizedRestrictedIntegral P.μ (S.gEvent g) (fun ω => boolToReal (S.DofZ q ω)) * S.mass g := by ring _ = ∫ ω in S.gEvent g, boolToReal (S.DofZ q ω) ∂P.μ := by rw [mass, eventCondExp_mul_measure_toReal _ _ (measure_ne_top _ _)] _ = ∫ ω in S.gEvent g, boolToReal (g q) ∂P.μ := by refine MeasureTheory.setIntegral_congr_fun (S.measurableSet_gEvent g) ?_ intro ω hω dsimp rw [S.DofZ_eq_on_gEvent g q hω] _ = boolToReal (g q) * S.mass g := by simp [mass, Measure.real, mul_comm] _ = S.mass g * boolToReal (g q) := by ring have hInt : ∫ ω, boolToReal (S.DofZ k ω) ∂P.μ = ∑ g : ResponseType K, S.mass g * boolToReal (g k) := by rw [S.integral_partition (hDint k)] refine Finset.sum_congr rfl ?_ intro g _ simpa [mass] using hCell k g have hBase : S.baseTreatment hK = ∑ g : ResponseType K, S.mass g * boolToReal (g (S.z0 hK)) := by unfold baseTreatment rw [S.integral_partition (hDint (S.z0 hK))] refine Finset.sum_congr rfl ?_ intro g _ simpa [mass] using hCell (S.z0 hK) g have hTreat : (S.toPopulationBridge hK).treatmentAtSupport k = ∑ g : ResponseType K, S.mass g * (boolToReal (g k) - boolToReal (g (S.z0 hK))) := by unfold ResponseTypeStats.PopulationBridge.treatmentAtSupport toPopulationBridge toStats refine Finset.sum_congr rfl ?_ intro g _ rw [S.telescoped_eq hK g k] rw [S.treatmentDrop hA k hZk, hInt, hBase, hTreat] rw [← Finset.sum_add_distrib] refine Finset.sum_congr rfl ?_ intro g _ ring
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.treatment_cell_eq · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:590
  • outcome_cell_eq theorem — The observed outcome mean in an instrument cell equals its response-type outcome expansion for a nonempty support, under the local IV assumptions, at a support point whose cell has positive mass, with integrable treated and untreated potential outcomes.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    hK :
    0 < K
    hA :
    S.Assumptions
    k :
    Fin K
    hZk :
    P.μ (S.zEvent k) ≠ 0
    hY1 :
    Integrable (S.YofD true) P.μ
    hY0 :
    Integrable (S.YofD false) P.μ
    normalizedRestrictedIntegral P.μ (S.zEvent k) S.factualY
    = (S.toPopulationBridge hK).outcomeAtSupport k
    Proof (Lean source)
    theorem outcome_cell_eq [IsFiniteMeasure P.μ] (hK : 0 < K) (hA : S.Assumptions) (k : Fin K) (hZk : P.μ (S.zEvent k) ≠ 0) (hY1 : Integrable (S.YofD true) P.μ) (hY0 : Integrable (S.YofD false) P.μ) : normalizedRestrictedIntegral P.μ (S.zEvent k) S.factualY = (S.toPopulationBridge hK).outcomeAtSupport k := by have hYDZ_bdd : ∀ q : Fin K, ∀ ω, |S.YofDofZ q ω| ≤ |S.YofD true ω| + |S.YofD false ω| := by intro q ω have h1 := abs_nonneg (S.YofD true ω) have h0 := abs_nonneg (S.YofD false ω) unfold YofDofZ cases S.DofZ q ω <;> simp [h1, h0] have hYDZ_int : ∀ q : Fin K, Integrable (S.YofDofZ q) P.μ := by intro q exact (hY1.norm.add hY0.norm).mono' (S.measurable_YofDofZ q).aestronglyMeasurable (Filter.Eventually.of_forall (hYDZ_bdd q)) have hCE : ∀ (q : Fin K) (g : ResponseType K), normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofDofZ q) = normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofD false) + boolToReal (g q) * S.effect g := by intro q g let c : ℝ := boolToReal (g q) have hcongr : normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofDofZ q) = normalizedRestrictedIntegral P.μ (S.gEvent g) (fun ω => S.YofD false ω + c * (S.YofD true ω - S.YofD false ω)) := by apply eventCondExp_congr_on P.μ (S.measurableSet_gEvent g) intro ω hω unfold YofDofZ rw [S.DofZ_eq_on_gEvent g q hω] dsimp [c] cases g q <;> simp [boolToReal] calc normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofDofZ q) = normalizedRestrictedIntegral P.μ (S.gEvent g) (fun ω => S.YofD false ω + c * (S.YofD true ω - S.YofD false ω)) := hcongr _ = normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofD false) + normalizedRestrictedIntegral P.μ (S.gEvent g) (fun ω => c * (S.YofD true ω - S.YofD false ω)) := by change normalizedRestrictedIntegral P.μ (S.gEvent g) ((S.YofD false) + fun ω => c * (S.YofD true ω - S.YofD false ω)) = normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofD false) + normalizedRestrictedIntegral P.μ (S.gEvent g) (fun ω => c * (S.YofD true ω - S.YofD false ω)) rw [eventCondExp_add] · exact hY0.integrableOn · exact (hY1.integrableOn.sub hY0.integrableOn).const_mul c _ = normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofD false) + c * normalizedRestrictedIntegral P.μ (S.gEvent g) (fun ω => S.YofD true ω - S.YofD false ω) := by rw [eventCondExp_smul] _ = normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofD false) + boolToReal (g q) * S.effect g := by rfl have hTerm : ∀ g : ResponseType K, normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofDofZ k) = S.baseOutcome hK g + ResponseTypeStats.PopulationBridge.telescopedTypeStep g k * S.effect g := by intro g unfold baseOutcome rw [hCE k g, hCE (S.z0 hK) g, S.telescoped_eq hK g k] ring have hInt : ∫ ω, S.YofDofZ k ω ∂P.μ = ∑ g : ResponseType K, S.mass g * normalizedRestrictedIntegral P.μ (S.gEvent g) (S.YofDofZ k) := by rw [S.integral_partition (hYDZ_int k)] refine Finset.sum_congr rfl ?_ intro g _ rfl rw [S.outcomeDrop hA k hZk hY1 hY0, hInt] unfold ResponseTypeStats.PopulationBridge.outcomeAtSupport toPopulationBridge toStats refine Finset.sum_congr rfl ?_ intro g _ rw [hTerm g]
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.outcome_cell_eq · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:653
  • rho_eq_zMass lemma — The ordered index's support masses equal the observed instrument-cell probabilities for the supplied score, its monotonicity certificate, and the selected support point in the multiple-instrument IV subsystem.
    P :
    shared
    K :
    ℕ
    shared
    S :
    shared
    dhat :
    Fin K → ℝ
    hmono :
    ∀ {k l : Fin K}
    if
    k.val ≤ l.val
    then
    dhat k ≤ dhat l
    k :
    Fin K
    (S.toFiniteIndex dhat hmono).rho k
    = (P.μ (ResponseTypeStats.PopulationBridge.zEvent S.factualZ k)).toReal
    Proof (Lean source)
    lemma rho_eq_zMass (dhat : Fin K → ℝ) (hmono : ∀ {k l : Fin K}, k.val ≤ l.val → dhat k ≤ dhat l) (k : Fin K) : (S.toFiniteIndex dhat hmono).rho k = (P.μ (ResponseTypeStats.PopulationBridge.zEvent S.factualZ k)).toReal := by rfl
    Causalean.PO.ID.Exact.MultipleInstrumentIV.POMultipleIVSystem.rho_eq_zMass · Causalean/PO/ID/Exact/MultipleInstrumentIV/POBridge.lean:729