Panel.Estimand­Characterization.Event­Study­Contamination

Sun-Abraham: contamination of event-study coefficients under heterogeneous cohort effects and the interaction-weighted fix.

Setup 24 core · 3 supporting This file provides the finite staggered-adoption event-study system used by the Sun-Abraham characterization modules. ★ CATT_eq_zero_of_noAnticipation★ observedCellMean_eq_fixedEffects_add_CATT

Sun-Abraham Event-Study Setup

This file provides the finite staggered-adoption event-study system used by the Sun-Abraham characterization modules. It defines the cohort, period, relative-time, potential-outcome, and comparison-path primitives on which the conventional and interaction-weighted estimands are built.

structure EventStudySystem reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination

A finite-cell record of a staggered-adoption event-study design over T periods, where adoption paths are finite periods or the never-treated path. It bundles a numeric encoding of each period used to form relative event time, the finite set of adoption cohorts in the event-study support, each adoption path's population share, and the cohort-period cell mass, together with, by cohort or by comparison adoption path, the factual observed outcome mean, the mean potential outcome under the cohort's own treatment path, and the mean never-treated potential outcome.

Definition (Lean source)
T :
Integer-valued period map used to form relative event times.
time :
Fin T → ℤ
Finite adoption cohorts included in the event-study support.
cohorts :
Population share of each adoption path, including `⊤` for never treated.
cohortShare :
WithTop (Fin T) → ℝ
Balanced cohort-period cell mass.
cellMass :
Fin T → Fin T → ℝ
Factual observed outcome mean by adoption path and period.
observedPathMean :
WithTop (Fin T) → Fin T → ℝ
Factual observed outcome mean by finite cohort and period.
observedMean :
Fin T → Fin T → ℝ
Mean potential outcome under the cohort's own treatment path.
treatedMean :
Fin T → Fin T → ℝ
Mean never-treated potential outcome for each finite cohort.
untreatedMean :
Fin T → Fin T → ℝ
Mean never-treated potential outcome for any comparison adoption path.
untreatedPathMean :
WithTop (Fin T) → Fin T → ℝ
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:37
def finitePath reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event study with TT periods and a finite adoption cohort gg, the finite adoption path is the path with adoption date gg.

Definition (Lean source)
T :
shared
g :
Fin T
finitePath g :
AdoptionPath.finite g
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.finitePath · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:69
def isNeverTreated reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event study with TT periods and an adoption path hh, the never-treated predicate holds exactly when hh is the never-treated path.

Definition (Lean source)
T :
shared
h :
isNeverTreated h :
Prop
AdoptionPath.isNeverTreated h
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.isNeverTreated · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:72
def isEventuallyTreated reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event study with TT periods and an adoption path hh, the eventually-treated predicate holds exactly when hh has a finite adoption date.

Definition (Lean source)
T :
shared
h :
isEventuallyTreated h :
Prop
AdoptionPath.isEventuallyTreated h
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.isEventuallyTreated · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:75
def relTime reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, an adoption cohort gg, and a period tt, relative event time is the integer calendar time of tt minus the integer calendar time of gg.

Definition (Lean source)
T :
shared
g t :
Fin T
relTime P g t :
P.time t - P.time g
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.relTime · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:78 · uses EventStudySystem
def absorbingTreatment reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event study with TT periods, an adoption path hh, and a period tt, the absorbing treatment indicator equals one exactly when hh has adopted by tt, and equals zero otherwise.

Definition (Lean source)
T :
shared
h :
t :
Fin T
absorbingTreatment h t :
AdoptionPath.absorbingTreatment h t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.absorbingTreatment · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:83
def targetPeriods reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, a finite cohort gg, and an integer relative time ee, the target-period set consists of exactly the finite periods whose relative event time for cohort gg is ee.

Definition (Lean source)
T :
shared
g :
Fin T
e :
targetPeriods P g e :
Finset.univ.filter (fun t => P.relTime g t = e)
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.targetPeriods · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:90 · uses EventStudySystem
def baselinePeriods reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP and a finite cohort gg, the baseline-period set consists of exactly the target periods at relative event time minus one.

Definition (Lean source)
T :
shared
g :
Fin T
baselinePeriods P g :
P.targetPeriods g (-1)
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.baselinePeriods · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:96 · uses EventStudySystem
def AdmissibleCell reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, a finite cohort gg, and an integer relative time ee, the admissible-cell predicate holds exactly when the cohort belongs to the system's event-study support and at least one finite period has relative event time ee for that cohort.

Definition (Lean source)
T :
shared
g :
Fin T
e :
AdmissibleCell P g e :
Prop
clause 1
g ∈ P.cohorts
clause 2
(P.targetPeriods g e).Nonempty
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.AdmissibleCell · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:101 · uses EventStudySystem
def admissibleCells reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP and a finite set EE of relative times, the admissible-cell support is the finite set of cohort-relative-time pairs that use a supported cohort and a relative time in EE and satisfy the admissible-cell predicate.

Definition (Lean source)
T :
shared
E :
Finset
admissibleCells P E :
Finset (Fin T × ℤ)
(P.cohorts.product E).filter (fun ge => P.AdmissibleCell ge.1 ge.2)
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.admissibleCells · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:106 · uses EventStudySystem
def cohortsAtEvent reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, a finite set EE of relative times, and a relative time ee, the cohorts at event time ee are exactly the supported cohorts for which ee belongs to EE and the cohort-relative-time cell is admissible.

Definition (Lean source)
T :
shared
E :
Finset
e :
cohortsAtEvent P E e :
P.cohorts.filter (fun g => e ∈ E ∧ P.AdmissibleCell g e)
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cohortsAtEvent · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:112 · uses EventStudySystem
def cellMassAtEvent reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, a cohort gg, and a relative time ee, the cohort-relative-time cell mass is the sum of the cohort-period cell masses over all target periods for (g,e)(g,e).

Definition (Lean source)
T :
shared
g :
Fin T
e :
cellMassAtEvent P g e :
∑ t ∈ P.targetPeriods g e, P.cellMass g t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cellMassAtEvent · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:117 · uses EventStudySystem
def observedCellMean reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, a cohort gg, and a relative time ee, the observed cell mean is the arithmetic average of that cohort's factual observed outcome means over all target periods for (g,e)(g,e); it is zero when there are no such periods.

Definition (Lean source)
T :
shared
g :
Fin T
e :
observedCellMean P g e :
((P.targetPeriods g e).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g e, P.observedMean g t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.observedCellMean · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:122 · uses EventStudySystem
def meanCellContrast reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, a cohort gg, and a relative time ee, the mean cell contrast is the arithmetic average, over all target periods for (g,e)(g,e), of the treated-path mean potential outcome minus the never-treated mean potential outcome; it is zero when there are no such periods.

Definition (Lean source)
T :
shared
g :
Fin T
e :
meanCellContrast P g e :
((P.targetPeriods g e).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g e, (P.treatedMean g t - P.untreatedMean g t)
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.meanCellContrast · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:128 · uses EventStudySystem
def CATT reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, a cohort gg, and a relative time ee, the cohort average treatment effect on the treated is the mean cell contrast for (g,e)(g,e).

Definition (Lean source)
T :
shared
g :
Fin T
e :
CATT P g e :
P.meanCellContrast g e
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.CATT · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:134 · uses EventStudySystem
def pathTargetMean reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, an adoption path hh, a treated cohort gg, and a relative time ee, the path target mean is the arithmetic average of hh's factual observed outcome mean over the target periods for (g,e)(g,e); it is zero when that set is empty.

Definition (Lean source)
T :
shared
h :
g :
Fin T
e :
pathTargetMean P h g e :
((P.targetPeriods g e).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g e, P.observedPathMean h t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.pathTargetMean · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:143 · uses EventStudySystem
def pathBaselineMean reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, an adoption path hh, and a treated cohort gg, the path baseline mean is the arithmetic average of hh's factual observed outcome mean over cohort gg's baseline periods; it is zero when that set is empty.

Definition (Lean source)
T :
shared
h :
g :
Fin T
pathBaselineMean P h g :
((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.observedPathMean h t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.pathBaselineMean · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:149 · uses EventStudySystem
def Consistency reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, the consistency condition states that every cohort in the event-study support has its factual observed outcome mean equal to its own-treatment-path mean potential outcome in every finite period.

Definition (Lean source)
T :
shared
g ∈ P.cohorts :
t :
Consistency P :
Prop
P.observedMean g t = P.treatedMean g t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.Consistency · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:155 · uses EventStudySystem
def PathConsistency reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, the path-consistency condition states that, for every adoption path and every finite period in which that path is untreated, the factual observed path mean equals the never-treated potential-outcome path mean.

Definition (Lean source)
T :
shared
h :
t :
Fin T
absorbingTreatment h t = 0
PathConsistency P :
Prop
P.observedPathMean h t = P.untreatedPathMean h t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.PathConsistency · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:159 · uses EventStudySystem
def NoAnticipation reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, the no-anticipation condition states that, for every supported cohort and every finite period strictly before that cohort's adoption date in calendar time, the own-treatment-path and never-treated mean potential outcomes are equal.

Definition (Lean source)
T :
shared
g ∈ P.cohorts :
t :
P.time t < P.time g
NoAnticipation P :
Prop
P.treatedMean g t = P.untreatedMean g t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.NoAnticipation · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:180 · uses EventStudySystem
def MeanParallelUntreated reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system PP, the mean-parallel-untreated condition states that there exist cohort and period components such that their sum gives an additive cohort-period function and every supported cohort's never-treated mean potential outcome equals that function in every finite period.

Definition (Lean source)
T :
shared
MeanParallelUntreated P :
Prop
∃ h : Fin T → Fin T → ℝ,
clause 1
g ∈ P.cohorts :
t :
P.untreatedMean g t = h g t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.MeanParallelUntreated · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:185 · uses EventStudySystem
structure EventStudyCausalRestrictions reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Sun-Abraham event-study causal restrictions. Field names mirror the NL artifact's assumption names.

Definition (Lean source)
T :
shared
hConsistency :
P.Consistency
hNoAnticipation :
P.NoAnticipation
hMeanParallelUntreated :
P.MeanParallelUntreated
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.EventStudyCausalRestrictions · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:190 · uses EventStudySystem
theorem CATT_eq_zero_of_noAnticipation reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

No anticipation implies zero pre-treatment CATT. If the mean treated and never-treated potential outcomes for every adopting cohort coincide in every period strictly preceding that cohort's own adoption period (no anticipation), then for a cohort g in the finite adoption-cohort support and a relative event time e strictly before adoption (e<0e < 0), the cohort-average treatment effect on the treated at cell (g, e) is zero.

Formal statement
T :
shared
hNoAnticipation :
P.NoAnticipation
g :
Fin T
e :
hg :
g ∈ P.cohorts
he :
e < 0
P.CATT g e = 0
Proof (Lean source)
theorem CATT_eq_zero_of_noAnticipation (P : EventStudySystem T) (hNoAnticipation : P.NoAnticipation) {g : Fin T} {e : ℤ} (hg : g ∈ P.cohorts) (he : e < 0) : P.CATT g e = 0 := by unfold CATT meanCellContrast rw [Finset.sum_eq_zero] · simp · intro t ht have hrel : P.relTime g t = e := by simpa [targetPeriods] using ht have hpre : P.time t < P.time g := by have hneg : P.relTime g t < 0 := by simpa [hrel] using he simpa [relTime] using (sub_neg.mp hneg) have hmean := hNoAnticipation g hg t hpre simp [hmean]
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.CATT_eq_zero_of_noAnticipation · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:197 · uses EventStudySystem , CATT , NoAnticipation
theorem observedCellMean_eq_fixedEffects_add_CATT reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Cell-mean decomposition into additive untreated fixed effects and CATT. If the factual observed outcome mean on a cohort's own periods equals its mean treated potential outcome (consistency) and the mean never-treated potential outcome admits an additive cohort/period fixed-effects representation (mean-parallel untreated paths), then for any cohort g in the finite adoption-cohort support, the average observed outcome mean over the target periods of cell (g, e) decomposes as the average, over those periods, of the additive fixed effects alpha g + lambda t plus the cohort-average treatment effect on the treated CATT g e.

Formal statement
T :
shared
hConsistency :
P.Consistency
hMeanParallelUntreated :
P.MeanParallelUntreated
g :
Fin T
e :
hg :
g ∈ P.cohorts
∃ alpha : Fin T → ℝ,
∃ lambda : Fin T → ℝ,
P.observedCellMean g e
= ((P.targetPeriods g e).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g e, (alpha g + lambda t)
+ P.CATT g e
Proof (Lean source)
theorem observedCellMean_eq_fixedEffects_add_CATT (P : EventStudySystem T) (hConsistency : P.Consistency) (hMeanParallelUntreated : P.MeanParallelUntreated) {g : Fin T} {e : ℤ} (hg : g ∈ P.cohorts) : ∃ alpha : Fin T → ℝ, ∃ lambda : Fin T → ℝ, P.observedCellMean g e = ((P.targetPeriods g e).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g e, (alpha g + lambda t) + P.CATT g e := by rcases hMeanParallelUntreated with ⟨hFE, ⟨alpha, lambda, hFE_add⟩, hUntreated⟩ refine ⟨alpha, lambda, ?_⟩ unfold observedCellMean CATT meanCellContrast have hsum : (∑ t ∈ P.targetPeriods g e, P.observedMean g t) = (∑ t ∈ P.targetPeriods g e, (alpha g + lambda t)) + ∑ t ∈ P.targetPeriods g e, (P.treatedMean g t - P.untreatedMean g t) := by calc (∑ t ∈ P.targetPeriods g e, P.observedMean g t) = ∑ t ∈ P.targetPeriods g e, ((alpha g + lambda t) + (P.treatedMean g t - P.untreatedMean g t)) := by apply Finset.sum_congr rfl intro t ht rw [hConsistency g hg t, hUntreated g hg t, hFE_add g t] calc P.treatedMean g t = P.treatedMean g t - (alpha g + lambda t) + (alpha g + lambda t) := by exact (sub_add_cancel (P.treatedMean g t) (alpha g + lambda t)).symm _ = alpha g + lambda t + (P.treatedMean g t - (alpha g + lambda t)) := by rw [add_comm] _ = (∑ t ∈ P.targetPeriods g e, (alpha g + lambda t)) + ∑ t ∈ P.targetPeriods g e, (P.treatedMean g t - P.untreatedMean g t) := by rw [Finset.sum_add_distrib] rw [hsum, mul_add]
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.observedCellMean_eq_fixedEffects_add_CATT · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:220 · uses EventStudySystem , CATT , Consistency , MeanParallelUntreated , observedCellMean , targetPeriods
3 supporting declarations (lemmas, instances)
  • pathConsistency_observed_eq_untreated theorem — Path-consistency, applied to an untreated comparison period, yields the observed-equals-untreated path-mean bridge used by the IW comparison-group argument.
    T :
    shared
    hPathConsistency :
    P.PathConsistency
    h :
    t :
    Fin T
    hUntreated :
    absorbingTreatment h t = 0
    P.observedPathMean h t = P.untreatedPathMean h t
    Proof (Lean source)
    theorem pathConsistency_observed_eq_untreated (P : EventStudySystem T) (hPathConsistency : P.PathConsistency) {h : WithTop (Fin T)} {t : Fin T} (hUntreated : absorbingTreatment h t = 0) : P.observedPathMean h t = P.untreatedPathMean h t := hPathConsistency h t hUntreated
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.pathConsistency_observed_eq_untreated · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:171
  • targetPeriods_subsingleton_of_injective theorem — Under an injective calendar-time encoding, at most one finite period can realize a given relative time, so the target-period set of any cell is a subsingleton.
    T :
    shared
    hInj :
    Injective P.time
    g :
    Fin T
    e :
    (P.targetPeriods g e : Set (Fin T)).Subsingleton
    Proof (Lean source)
    theorem targetPeriods_subsingleton_of_injective (P : EventStudySystem T) (hInj : Injective P.time) (g : Fin T) (e : ℤ) : (P.targetPeriods g e : Set (Fin T)).Subsingleton := by intro a ha b hb simp only [Finset.mem_coe, targetPeriods, mem_filter, Finset.mem_univ, true_and] at ha hb simp only [relTime] at ha hb have hab : P.time a = P.time b := by have := ha.trans hb.symm linarith [this] exact hInj hab
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.targetPeriods_subsingleton_of_injective · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:263
  • CATT_eq_sourceCATT_of_injective theorem — G1 faithfulness corollary. When the calendar-time map time is injective (the usual one-period-per-relative-time encoding), the cell-averaged CATT g e collapses to the source's *point* CATT_{g,e} at the unique period t realizing relative time e, i.e. treatedMean g t - untreatedMean g t.
    T :
    shared
    hInj :
    Injective P.time
    g :
    Fin T
    e :
    t :
    Fin T
    ht :
    t ∈ P.targetPeriods g e
    P.CATT g e = P.treatedMean g t - P.untreatedMean g t
    Proof (Lean source)
    theorem CATT_eq_sourceCATT_of_injective (P : EventStudySystem T) (hInj : Injective P.time) {g : Fin T} {e : ℤ} {t : Fin T} (ht : t ∈ P.targetPeriods g e) : P.CATT g e = P.treatedMean g t - P.untreatedMean g t := by have hsub := P.targetPeriods_subsingleton_of_injective hInj g e have hsingleton : P.targetPeriods g e = {t} := by apply Finset.eq_singleton_iff_unique_mem.mpr refine ⟨ht, ?_⟩ intro x hx exact hsub (by simpa using hx) (by simpa using ht) unfold CATT meanCellContrast rw [hsingleton] simp
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.CATT_eq_sourceCATT_of_injective · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Setup.lean:278
Conventional 13 core · 2 supporting This file formalizes the finite-cell algebra for the conventional two-way fixed effects event-study coefficient in the Sun-Abraham setting. ★ contamination_representation★ contamination_representation_split★ apparent_pretrends_from_post_treatment

Sun-Abraham Conventional Event Study

This file formalizes the finite-cell algebra for the conventional two-way fixed effects event-study coefficient in the Sun-Abraham setting. It expresses the coefficient as a weighted average of cohort-relative-time treatment effects under supplied residualization, support, and integrability conditions.

def eventIndicator reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For two relative times, the event-time indicator equals one when they are equal and zero otherwise.

Definition (Lean source)
k e :
eventIndicator k e :
if e = k then 1 else 0
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.eventIndicator · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:34
structure ConventionalDesign reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Conventional event-study finite design for the coefficient on displayedEvent.

Definition (Lean source)
T :
shared
Finite support of relative times used in the cell expansion.
eventSupport :
Finset
Included relative-time indicators in the conventional TWFE regression.
includedEvents :
Finset
Omitted reference relative time.
omittedEvent :
Displayed event time `l` whose coefficient is characterized.
displayedEvent :
Residualized relative-time indicator `Rdot^l`, constant on cells.
Rdot :
Fin T → ℤ → ℝ
Conventional population TWFE event-study coefficient `mu_l`.
mu :
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.ConventionalDesign · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:39 · uses EventStudySystem
def IsEventStudyNuisance reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, a conventional design, and a cohort-period function, the event-study nuisance condition holds exactly when the function is the sum of a cohort-and-period additive component and a linear combination of the included relative-time indicators other than the displayed indicator, for every cohort in the system and every period.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
h :
Fin T → Fin T → ℝ
IsEventStudyNuisance P D h :
Prop
∃ hAdd : Fin T → Fin T → ℝ,
clause 1
clause 2
∃ gamma : ℤ → ℝ,
∀ g ∈ P.cohorts,
∀ t,
h g t
= hAdd g t
+ ∑ k ∈ D.includedEvents.filter (fun k => k ≠ D.displayedEvent), gamma k * eventIndicator k (P.relTime g t)
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.IsEventStudyNuisance · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:55 · uses EventStudySystem , ConventionalDesign
def cellAverage reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, a cohort-period function, a cohort, and a relative time, the cell average is the average of that function over the periods in which the cohort has the given relative time.

Definition (Lean source)
T :
shared
h :
Fin T → Fin T → ℝ
g :
Fin T
e :
cellAverage P h g e :
((P.targetPeriods g e).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g e, h g t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cellAverage · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:70 · uses EventStudySystem
structure ConventionalResidualization reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Finite-cell residualization record for the conventional coefficient.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
hResidualization :
∀ h : Fin T → Fin T → ℝ
if
P.IsEventStudyNuisance D h
then
ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.cellAverage h ge.1 ge.2
= 0
hDisplayedExpansion :
ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * eventIndicator D.displayedEvent ge.2
= ∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.cellMassAtEvent g D.displayedEvent * D.Rdot g D.displayedEvent
hOtherIncludedOrthogonal :
∀ e ∈ D.includedEvents
if
e ≠ D.displayedEvent
then
∑ g ∈ P.cohortsAtEvent D.eventSupport e, P.cellMassAtEvent g e * D.Rdot g e = 0
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.ConventionalResidualization · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:79 · uses EventStudySystem , ConventionalDesign
def residualDenom reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a conventional design, the residualized denominator is the sum over admissible cells of cell mass times the design residual times the indicator for the displayed event time.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
residualDenom P D :
ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * eventIndicator D.displayedEvent ge.2
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.residualDenom · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:106 · uses EventStudySystem , ConventionalDesign
def residualNumerator reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a conventional design, the residualized numerator is the sum over admissible cells of cell mass times the design residual times the observed cell mean.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
residualNumerator P D :
ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.observedCellMean ge.1 ge.2
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.residualNumerator · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:116 · uses EventStudySystem , ConventionalDesign
def conventionalMuRatio reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a conventional design, the conventional coefficient ratio is the residualized numerator divided by the residualized denominator.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
conventionalMuRatio P D :
P.residualNumerator D / P.residualDenom D
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.conventionalMuRatio · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:126 · uses EventStudySystem , ConventionalDesign
structure ConventionalFiniteSupport reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Transparent finite support bookkeeping for the conventional cell expansion. It records that the explicit event-time support is the finite universe over which the displayed theorem is expanded, without asserting the headline contamination formula itself.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
hIncludedInSupport :
∀ e ∈ D.includedEvents, e ∈ D.eventSupport
hDisplayedInSupport :
D.displayedEvent ∈ D.eventSupport
hCellsSupported :
ge ∈ P.admissibleCells D.eventSupport, ge.1 ∈ P.cohorts ∧ ge.2 ∈ D.eventSupport
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.ConventionalFiniteSupport · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:133 · uses EventStudySystem , ConventionalDesign
def omega reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, a conventional design, a cohort, and a relative time, the Sun--Abraham contamination weight is that cell's mass times its design residual, divided by the residualized denominator.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
g :
Fin T
e :
omega P D g e :
(P.cellMassAtEvent g e * D.Rdot g e) / P.residualDenom D
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.omega · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:144 · uses EventStudySystem , ConventionalDesign
theorem contamination_representation reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Conventional Sun-Abraham contamination representation. For an event-study system P and conventional design D, if observed outcomes equal the potential outcome under the realized treatment path (consistency), the never-treated potential outcome follows an additive parallel-trends restriction, the residualized displayed-event indicator Rdot is orthogonal in expectation to every function in the event-study nuisance class, the residualized denominator is strictly positive, the coefficient D.mu equals its FWL residualized-ratio form, and the included, displayed, and admissible event times all lie within the declared finite support, then D.mu equals the Sun-Abraham contamination-weighted sum of cohort-relative-time CATTs over every admissible cell.

Formal statement
T :
shared
D :
P.ConventionalDesign
hConsistency :
P.Consistency
hMeanParallelUntreated :
P.MeanParallelUntreated
hNuisanceOrthogonal :
∀ h : Fin T → Fin T → ℝ
if
P.IsEventStudyNuisance D h
then
ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.cellAverage h ge.1 ge.2
= 0
hDenomPos :
0 < P.residualDenom D
hMuRatio :
D.mu = P.conventionalMuRatio D
hSupport :
P.ConventionalFiniteSupport D
D.mu = ∑ ge ∈ P.admissibleCells D.eventSupport, P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2
Proof (Lean source)
theorem contamination_representation (P : EventStudySystem T) (D : P.ConventionalDesign) (hConsistency : P.Consistency) (hMeanParallelUntreated : P.MeanParallelUntreated) (hNuisanceOrthogonal : ∀ h : Fin T → Fin T → ℝ, P.IsEventStudyNuisance D h → ∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.cellAverage h ge.1 ge.2 = 0) (hDenomPos : 0 < P.residualDenom D) (hMuRatio : D.mu = P.conventionalMuRatio D) (hSupport : P.ConventionalFiniteSupport D) : D.mu = ∑ ge ∈ P.admissibleCells D.eventSupport, P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2 := by have _ : P.residualDenom D ≠ 0 := ne_of_gt hDenomPos rcases hMeanParallelUntreated with ⟨hAdd, ⟨alpha, lambda, hAdd_eq⟩, hUntreated⟩ let hFE : Fin T → Fin T → ℝ := fun g t => alpha g + lambda t have hNuisance : P.IsEventStudyNuisance D hFE := by refine ⟨hFE, ⟨alpha, lambda, ?_⟩, fun _ => 0, ?_⟩ · intro g t rfl intro g hg t simp [hFE] have hFE_zero : ∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.cellAverage hFE ge.1 ge.2 = 0 := hNuisanceOrthogonal hFE hNuisance have hObs : ∀ ge ∈ P.admissibleCells D.eventSupport, P.observedCellMean ge.1 ge.2 = P.cellAverage hFE ge.1 ge.2 + P.CATT ge.1 ge.2 := by intro ge hge have hg : ge.1 ∈ P.cohorts := (hSupport.hCellsSupported ge hge).1 unfold observedCellMean cellAverage hFE change ((P.targetPeriods ge.1 ge.2).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods ge.1 ge.2, P.observedMean ge.1 t = ((P.targetPeriods ge.1 ge.2).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods ge.1 ge.2, (alpha ge.1 + lambda t) + ((P.targetPeriods ge.1 ge.2).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods ge.1 ge.2, (P.treatedMean ge.1 t - P.untreatedMean ge.1 t) have hsum : (∑ t ∈ P.targetPeriods ge.1 ge.2, P.observedMean ge.1 t) = (∑ t ∈ P.targetPeriods ge.1 ge.2, (alpha ge.1 + lambda t)) + ∑ t ∈ P.targetPeriods ge.1 ge.2, (P.treatedMean ge.1 t - P.untreatedMean ge.1 t) := by calc (∑ t ∈ P.targetPeriods ge.1 ge.2, P.observedMean ge.1 t) = ∑ t ∈ P.targetPeriods ge.1 ge.2, ((alpha ge.1 + lambda t) + (P.treatedMean ge.1 t - P.untreatedMean ge.1 t)) := by apply Finset.sum_congr rfl intro t ht rw [hConsistency ge.1 hg t, hUntreated ge.1 hg t, hAdd_eq ge.1 t] ring _ = (∑ t ∈ P.targetPeriods ge.1 ge.2, (alpha ge.1 + lambda t)) + ∑ t ∈ P.targetPeriods ge.1 ge.2, (P.treatedMean ge.1 t - P.untreatedMean ge.1 t) := by rw [Finset.sum_add_distrib] rw [hsum, mul_add] have hNumerator : P.residualNumerator D = ∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.CATT ge.1 ge.2 := by unfold residualNumerator calc ∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.observedCellMean ge.1 ge.2 = ∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * (P.cellAverage hFE ge.1 ge.2 + P.CATT ge.1 ge.2) := by apply Finset.sum_congr rfl intro ge hge rw [hObs ge hge] _ = (∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.cellAverage hFE ge.1 ge.2) + ∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.CATT ge.1 ge.2 := by simp_rw [mul_add] rw [Finset.sum_add_distrib] _ = ∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.CATT ge.1 ge.2 := by rw [hFE_zero, zero_add] calc D.mu = P.residualNumerator D / P.residualDenom D := hMuRatio _ = (∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.CATT ge.1 ge.2) / P.residualDenom D := by rw [hNumerator] _ = ∑ ge ∈ P.admissibleCells D.eventSupport, P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2 := by rw [Finset.sum_div] apply Finset.sum_congr rfl intro ge hge simp [omega] ring
theorem contamination_representation_split reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system P and conventional design D, if observed outcomes equal the potential outcome under the realized treatment path (consistency), the never-treated outcome satisfies additive parallel trends, the design satisfies the finite-cell orthogonality conditions ConventionalResidualization, the residualized denominator is strictly positive, the coefficient D.mu equals its FWL residualized-ratio form, and the included, displayed, and admissible event times all lie within the declared finite support, then D.mu splits as the displayed-event-time contamination term plus the contamination-weighted sum over every other admissible cohort-relative-time cell.

Formal statement
T :
shared
D :
P.ConventionalDesign
hConsistency :
P.Consistency
hMeanParallelUntreated :
P.MeanParallelUntreated
hResidualization :
P.ConventionalResidualization D
hDenomPos :
0 < P.residualDenom D
hMuRatio :
D.mu = P.conventionalMuRatio D
hSupport :
P.ConventionalFiniteSupport D
D.mu
= (∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.omega D g D.displayedEvent * P.CATT g D.displayedEvent)
+ (∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => ge.2 ≠ D.displayedEvent), P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2)
Proof (Lean source)
theorem contamination_representation_split (P : EventStudySystem T) (D : P.ConventionalDesign) (hConsistency : P.Consistency) (hMeanParallelUntreated : P.MeanParallelUntreated) (hResidualization : P.ConventionalResidualization D) (hDenomPos : 0 < P.residualDenom D) (hMuRatio : D.mu = P.conventionalMuRatio D) (hSupport : P.ConventionalFiniteSupport D) : D.mu = (∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.omega D g D.displayedEvent * P.CATT g D.displayedEvent) + (∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => ge.2 ≠ D.displayedEvent), P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2) := by let F : Fin T × ℤ → ℝ := fun ge => P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2 have hMain : D.mu = ∑ ge ∈ P.admissibleCells D.eventSupport, F ge := by simpa [F] using contamination_representation P D hConsistency hMeanParallelUntreated hResidualization.hResidualization hDenomPos hMuRatio hSupport have hDisplayedCells : (P.admissibleCells D.eventSupport).filter (fun ge => ge.2 = D.displayedEvent) = (P.cohortsAtEvent D.eventSupport D.displayedEvent).map ⟨fun g => (g, D.displayedEvent), by intro a b h exact congrArg Prod.fst h⟩ := by ext ge rcases ge with ⟨g, e⟩ simp [admissibleCells, cohortsAtEvent] constructor · rintro ⟨⟨⟨hg, heSupport⟩, hAdm⟩, rfl⟩ exact ⟨g, ⟨hg, heSupport, hAdm⟩, rfl⟩ · rintro ⟨a, ⟨hg, hDisplayedSupport, hAdm⟩, hEq⟩ -- `simp` no longer reduces the `Embedding` structure-literal application, -- so restate the pair equation in reduced form (definitionally equal). have hEq' : (a, D.displayedEvent) = (g, e) := hEq have ha : a = g := congrArg Prod.fst hEq' have he : D.displayedEvent = e := congrArg snd hEq' subst ha subst he exact ⟨⟨⟨hg, hDisplayedSupport⟩, hAdm⟩, rfl⟩ calc D.mu = ∑ ge ∈ P.admissibleCells D.eventSupport, F ge := hMain _ = (∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => ge.2 = D.displayedEvent), F ge) + (∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => ge.2 ≠ D.displayedEvent), F ge) := by exact (Finset.sum_filter_add_sum_filter_not (P.admissibleCells D.eventSupport) (fun ge : Fin T × ℤ => ge.2 = D.displayedEvent) F).symm _ = (∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.omega D g D.displayedEvent * P.CATT g D.displayedEvent) + (∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => ge.2 ≠ D.displayedEvent), P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2) := by rw [hDisplayedCells, Finset.sum_map] rfl
theorem apparent_pretrends_from_post_treatment reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system P and conventional design D, if the consistency, mean-parallel-trends, and no-anticipation causal restrictions hold, the residualized displayed-event indicator Rdot is orthogonal in expectation to every function in the event-study nuisance class, the residualized denominator is strictly positive, the coefficient D.mu equals its FWL residualized-ratio form, and the included, displayed, and admissible event times all lie within the declared finite support, then D.mu equals the contamination-weighted sum of cohort-relative-time CATTs restricted to nonnegative relative times, i.e. once every negative-relative-time CATT vanishes under no-anticipation, the displayed lead's coefficient is a weighted sum of post-treatment effects.

Formal statement
T :
shared
D :
P.ConventionalDesign
hCausal :
P.EventStudyCausalRestrictions
hNuisanceOrthogonal :
∀ h : Fin T → Fin T → ℝ
if
P.IsEventStudyNuisance D h
then
ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.cellAverage h ge.1 ge.2
= 0
hDenomPos :
0 < P.residualDenom D
hMuRatio :
D.mu = P.conventionalMuRatio D
hSupport :
P.ConventionalFiniteSupport D
D.mu
= ∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => 0 ≤ ge.2), P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2
Proof (Lean source)
theorem apparent_pretrends_from_post_treatment (P : EventStudySystem T) (D : P.ConventionalDesign) (hCausal : P.EventStudyCausalRestrictions) (hNuisanceOrthogonal : ∀ h : Fin T → Fin T → ℝ, P.IsEventStudyNuisance D h → ∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.cellAverage h ge.1 ge.2 = 0) (hDenomPos : 0 < P.residualDenom D) (hMuRatio : D.mu = P.conventionalMuRatio D) (hSupport : P.ConventionalFiniteSupport D) : D.mu = ∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => 0 ≤ ge.2), P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2 := by let F : Fin T × ℤ → ℝ := fun ge => P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2 have hMain : D.mu = ∑ ge ∈ P.admissibleCells D.eventSupport, F ge := by simpa [F] using contamination_representation P D hCausal.hConsistency hCausal.hMeanParallelUntreated hNuisanceOrthogonal hDenomPos hMuRatio hSupport have hNegZero : ∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => ¬ 0 ≤ ge.2), F ge = 0 := by apply Finset.sum_eq_zero intro ge hge have hmem : ge ∈ P.admissibleCells D.eventSupport := (Finset.mem_filter.mp hge).1 have hneg : ¬ 0 ≤ ge.2 := (Finset.mem_filter.mp hge).2 have hlt : ge.2 < 0 := not_le.mp hneg have hg : ge.1 ∈ P.cohorts := (hSupport.hCellsSupported ge hmem).1 simp [F, P.CATT_eq_zero_of_noAnticipation hCausal.hNoAnticipation hg hlt] calc D.mu = ∑ ge ∈ P.admissibleCells D.eventSupport, F ge := hMain _ = (∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => 0 ≤ ge.2), F ge) + (∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => ¬ 0 ≤ ge.2), F ge) := by exact (Finset.sum_filter_add_sum_filter_not (P.admissibleCells D.eventSupport) (fun ge : Fin T × ℤ => 0 ≤ ge.2) F).symm _ = ∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => 0 ≤ ge.2), F ge := by rw [hNegZero, add_zero]
2 supporting declarations (lemmas, instances)
  • desired_event_weights_sum_one theorem — Desired-event-time weights sum to one.
    T :
    shared
    D :
    P.ConventionalDesign
    hDisplayedExpansion :
    ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * eventIndicator D.displayedEvent ge.2
    = ∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.cellMassAtEvent g D.displayedEvent * D.Rdot g D.displayedEvent
    hDenomPos :
    0 < P.residualDenom D
    ∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.omega D g D.displayedEvent = 1
    Proof (Lean source)
    theorem desired_event_weights_sum_one (P : EventStudySystem T) (D : P.ConventionalDesign) (hDisplayedExpansion : ∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * eventIndicator D.displayedEvent ge.2 = ∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.cellMassAtEvent g D.displayedEvent * D.Rdot g D.displayedEvent) (hDenomPos : 0 < P.residualDenom D) : ∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.omega D g D.displayedEvent = 1 := by have hDenom_ne : P.residualDenom D ≠ 0 := ne_of_gt hDenomPos calc ∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.omega D g D.displayedEvent = (∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.cellMassAtEvent g D.displayedEvent * D.Rdot g D.displayedEvent) / P.residualDenom D := by simp [omega, Finset.sum_div] _ = P.residualDenom D / P.residualDenom D := by rw [← hDisplayedExpansion] rfl _ = 1 := div_self hDenom_ne
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.desired_event_weights_sum_one · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:152
  • other_included_event_weights_sum_zero theorem — Other included-event-time weights sum to zero.
    T :
    shared
    D :
    P.ConventionalDesign
    e :
    hOtherZero :
    ∑ g ∈ P.cohortsAtEvent D.eventSupport e, P.cellMassAtEvent g e * D.Rdot g e = 0
    hDenomPos :
    0 < P.residualDenom D
    ∑ g ∈ P.cohortsAtEvent D.eventSupport e, P.omega D g e = 0
    Proof (Lean source)
    theorem other_included_event_weights_sum_zero (P : EventStudySystem T) (D : P.ConventionalDesign) {e : ℤ} (hOtherZero : ∑ g ∈ P.cohortsAtEvent D.eventSupport e, P.cellMassAtEvent g e * D.Rdot g e = 0) (hDenomPos : 0 < P.residualDenom D) : ∑ g ∈ P.cohortsAtEvent D.eventSupport e, P.omega D g e = 0 := by have _ : P.residualDenom D ≠ 0 := ne_of_gt hDenomPos calc ∑ g ∈ P.cohortsAtEvent D.eventSupport e, P.omega D g e = (∑ g ∈ P.cohortsAtEvent D.eventSupport e, P.cellMassAtEvent g e * D.Rdot g e) / P.residualDenom D := by simp [omega, Finset.sum_div] _ = 0 / P.residualDenom D := by rw [hOtherZero] _ = 0 := zero_div _
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.other_included_event_weights_sum_zero · Causalean/Panel/EstimandCharacterization/EventStudyContamination/Conventional.lean:177
Cell­Grid 10 core · 6 supporting This file derives the finite-cell residualization and ratio identities for the conventional Sun-Abraham event-study coefficient from a genuine weighted projection on the cohort-by-relative-time cell grid. ★ cellGrid_mu_eq_conventionalMuRatio★ cellGrid_provides_residualization

Sun-Abraham Cell-Grid Projection

This file derives the finite-cell residualization and ratio identities for the conventional Sun-Abraham event-study coefficient from a genuine weighted projection on the cohort-by-relative-time cell grid. The resulting bridge supplies the orthogonality and normal-equation inputs used by the contamination representation.

abbrev CellIndex reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a conventional design, the cell index is the collection of admissible cohort--relative-time cells in that design.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
CellIndex P D :
Type
{ge : Fin T × ℤ // ge ∈ P.admissibleCells D.eventSupport}
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.CellIndex · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:50 · uses EventStudySystem , ConventionalDesign
def cellTotalMass reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a conventional design, the total admissible cell mass is the sum of the population masses of all admissible cohort--relative-time cells.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
cellTotalMass P D :
ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cellTotalMass · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:56 · uses EventStudySystem , ConventionalDesign
def cellSupport reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a conventional design, if every admissible cohort--relative-time cell has strictly positive population mass and at least one admissible cell exists, the cell-grid weighted support is the finite population of admissible cells, weighted by each cell's mass divided by total admissible cell mass.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
hpos :
ge ∈ P.admissibleCells D.eventSupport, 0 < P.cellMassAtEvent ge.1 ge.2
hne :
(P.admissibleCells D.eventSupport).Nonempty
cellSupport P D hpos hne :
WeightedSupport (P.CellIndex D)
clause 1
observed := Finset.univ
clause 2
observed_nonempty := by classical rw [Finset.univ_nonempty_iff] obtain ⟨ge, hge⟩ := hne exact ⟨⟨ge, hge⟩⟩
clause 3
weight := fun cell => P.cellMassAtEvent cell.val.1 cell.val.2 / P.cellTotalMass D
clause 4
weight_pos := by intro cell _ have hZ : 0 < P.cellTotalMass D := Finset.sum_pos (fun ge hge => hpos ge hge) hne exact div_pos (hpos cell.val cell.property) hZ
clause 5
weight_zero_off := by intro cell hcell exact absurd (Finset.mem_univ cell) hcell
clause 6
weight_sum_one := by classical have hZ : 0 < P.cellTotalMass D := Finset.sum_pos (fun ge hge => hpos ge hge) hne have hsum : ∑ cell : P.CellIndex D, P.cellMassAtEvent cell.val.1 cell.val.2 / P.cellTotalMass D
= (∑ cell : P.CellIndex D, P.cellMassAtEvent cell.val.1 cell.val.2) / P.cellTotalMass D := by rw [← Finset.sum_div] rw [show (Finset.univ : Finset (P.CellIndex D)) = Finset.univ from rfl, hsum] rw [Finset.sum_coe_sort (P.admissibleCells D.eventSupport) (fun ge => P.cellMassAtEvent ge.1 ge.2)] rw [← cellTotalMass] exact div_self hZ.ne'
def cellNuisanceGen reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a conventional design, the generators of the cell-nuisance space are precisely the functions on admissible cells obtained by averaging an event-study nuisance function within each cohort--relative-time cell.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
cellNuisanceGen P D :
Set (P.CellIndex D → ℝ)
{f | ∃ hCell : Fin T → Fin T → ℝ, P.IsEventStudyNuisance D hCell ∧ f = fun cell => P.cellAverage hCell cell.val.1 cell.val.2}
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cellNuisanceGen · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:136 · uses EventStudySystem , CellIndex , ConventionalDesign
def cellNuisance reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a conventional design, the cell-nuisance space is the linear span of all cell-level averages of event-study nuisance functions.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
cellNuisance P D :
Submodule ℝ (P.CellIndex D → ℝ)
span ℝ (P.cellNuisanceGen D)
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cellNuisance · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:145 · uses EventStudySystem , CellIndex , ConventionalDesign
def cellRegressor reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a conventional design, the cell-grid regressor assigns one to an admissible cell exactly when its relative time is the displayed event time, and zero otherwise.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
cellRegressor P D :
P.CellIndex D → ℝ
fun cell => eventIndicator D.displayedEvent cell.val.2
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cellRegressor · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:251 · uses EventStudySystem , CellIndex , ConventionalDesign
def cellOutcome reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a conventional design, the cell-grid outcome assigns to each admissible cohort--relative-time cell its observed mean outcome.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
cellOutcome P D :
P.CellIndex D → ℝ
fun cell => P.observedCellMean cell.val.1 cell.val.2
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cellOutcome · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:259 · uses EventStudySystem , CellIndex , ConventionalDesign
structure CellGridResidualization reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Cell-grid residualization input.

Definition (Lean source)
T :
shared
D :
P.ConventionalDesign
hCellMassPos :
ge ∈ P.admissibleCells D.eventSupport, 0 < P.cellMassAtEvent ge.1 ge.2
hCellNonempty :
(P.admissibleCells D.eventSupport).Nonempty
hDenomPos :
0 < P.residualDenom D
hRdotResidual :
∀ cell : P.CellIndex D,
D.Rdot cell.val.1 cell.val.2
= (P.cellSupport D hCellMassPos hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D) cell
hMuNormalEqs :
∃ α : P.CellIndex D → ℝ,
α ∈ P.cellNuisance D ∧
(P.cellSupport D hCellMassPos hCellNonempty).ip (P.cellOutcome D - D.mu • P.cellRegressor D - α) (P.cellRegressor D)
= 0 ∧
(∀ h ∈ P.cellNuisance D, (P.cellSupport D hCellMassPos hCellNonempty).ip (P.cellOutcome D - D.mu • P.cellRegressor D - α) h = 0)
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.CellGridResidualization · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:266 · uses EventStudySystem , ConventionalDesign
theorem cellGrid_mu_eq_conventionalMuRatio reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Cell-grid FWL bridge. Under cell-grid residualization of the event-study design, the conventional event-study coefficient equals the Frisch–Waugh–Lovell residualized ratio computed directly on the cohort × relative-time cell grid.

Formal statement
T :
shared
D :
P.ConventionalDesign
shared
h :
P.CellGridResidualization D
D.mu = P.conventionalMuRatio D
Proof (Lean source)
theorem cellGrid_mu_eq_conventionalMuRatio (h : P.CellGridResidualization D) : D.mu = P.conventionalMuRatio D := by classical have hZpos : 0 < P.cellTotalMass D := Finset.sum_pos (fun ge hge => h.hCellMassPos ge hge) h.hCellNonempty have hZ : P.cellTotalMass D ≠ 0 := hZpos.ne' have hRdot := tildeX_eq_Rdot h have hnum : (P.cellSupport D h.hCellMassPos h.hCellNonempty).ip ((P.cellSupport D h.hCellMassPos h.hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D)) (P.cellOutcome D) = P.residualNumerator D / P.cellTotalMass D := by rw [hRdot] exact P.ip_cellSupport D h.hCellMassPos h.hCellNonempty (fun ge => D.Rdot ge.1 ge.2) (fun ge => P.observedCellMean ge.1 ge.2) have hden : (P.cellSupport D h.hCellMassPos h.hCellNonempty).ip ((P.cellSupport D h.hCellMassPos h.hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D)) ((P.cellSupport D h.hCellMassPos h.hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D)) = P.residualDenom D / P.cellTotalMass D := by rw [← (P.cellSupport D h.hCellMassPos h.hCellNonempty).ip_tildeX_self (P.cellNuisance D) (P.cellRegressor D), hRdot] exact P.ip_cellSupport D h.hCellMassPos h.hCellNonempty (fun ge => D.Rdot ge.1 ge.2) (fun ge => eventIndicator D.displayedEvent ge.2) have hpos_ip : 0 < (P.cellSupport D h.hCellMassPos h.hCellNonempty).ip ((P.cellSupport D h.hCellMassPos h.hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D)) ((P.cellSupport D h.hCellMassPos h.hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D)) := by rw [hden]; exact div_pos h.hDenomPos hZpos obtain ⟨α, hα_mem, hNR, hNH⟩ := h.hMuNormalEqs have hmu := (P.cellSupport D h.hCellMassPos h.hCellNonempty).scalar_fwl_of_normalEqs (P.cellNuisance D) (P.cellRegressor D) (P.cellOutcome D) D.mu α hα_mem hpos_ip.ne' hNR hNH rw [hmu, hnum, hden, EventStudySystem.conventionalMuRatio] have hDen : P.residualDenom D ≠ 0 := h.hDenomPos.ne' field_simp
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cellGrid_mu_eq_conventionalMuRatio · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:310 · uses EventStudySystem , CellGridResidualization , ConventionalDesign , conventionalMuRatio
theorem cellGrid_provides_residualization reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a conventional event-study design D over an event-study system P, if every admissible cohort-relative-time cell has strictly positive population mass, the collection of admissible cells is nonempty, and the design's residualized displayed-event indicator Rdot agrees, cell by cell, with the weighted projection residual on the cell grid, then the three finite-cell orthogonality conditions packaged as ConventionalResidualization — derived here from a genuine weighted projection rather than assumed — hold for D.

Formal statement
T :
shared
D :
P.ConventionalDesign
shared
hCellMassPos :
ge ∈ P.admissibleCells D.eventSupport, 0 < P.cellMassAtEvent ge.1 ge.2
hCellNonempty :
(P.admissibleCells D.eventSupport).Nonempty
hRdotResidual :
∀ cell : P.CellIndex D,
D.Rdot cell.val.1 cell.val.2
= (P.cellSupport D hCellMassPos hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D) cell
P.ConventionalResidualization D
Proof (Lean source)
theorem cellGrid_provides_residualization (hCellMassPos : ∀ ge ∈ P.admissibleCells D.eventSupport, 0 < P.cellMassAtEvent ge.1 ge.2) (hCellNonempty : (P.admissibleCells D.eventSupport).Nonempty) (hRdotResidual : ∀ cell : P.CellIndex D, D.Rdot cell.val.1 cell.val.2 = (P.cellSupport D hCellMassPos hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D) cell) : P.ConventionalResidualization D := by classical have hZpos : 0 < P.cellTotalMass D := Finset.sum_pos (fun ge hge => hCellMassPos ge hge) hCellNonempty have hZ : P.cellTotalMass D ≠ 0 := hZpos.ne' have hRdot : (P.cellSupport D hCellMassPos hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D) = fun cell => D.Rdot cell.val.1 cell.val.2 := by funext cell exact (hRdotResidual cell).symm refine ⟨?_, ?_, ?_⟩ · -- hResidualization intro hCell hN have hmem := P.cellAverage_mem_cellNuisance D hN have hortho := (P.cellSupport D hCellMassPos hCellNonempty).residualize_in_orthogonal (P.cellNuisance D) (P.cellRegressor D) hmem rw [hRdot] at hortho have hip : (P.cellSupport D hCellMassPos hCellNonempty).ip (fun cell => D.Rdot cell.val.1 cell.val.2) (fun cell => P.cellAverage hCell cell.val.1 cell.val.2) = (∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * P.cellAverage hCell ge.1 ge.2) / P.cellTotalMass D := P.ip_cellSupport D hCellMassPos hCellNonempty (fun ge => D.Rdot ge.1 ge.2) (fun ge => P.cellAverage hCell ge.1 ge.2) rw [hip] at hortho exact (div_eq_zero_iff.mp hortho).resolve_right hZ · -- hDisplayedExpansion exact P.sum_admissible_mul_eventIndicator D D.displayedEvent (fun g e => P.cellMassAtEvent g e * D.Rdot g e) · -- hOtherIncludedOrthogonal intro e he_inc he_ne have hmem := P.eventIndicator_mem_cellNuisance D he_inc he_ne have hortho := (P.cellSupport D hCellMassPos hCellNonempty).residualize_in_orthogonal (P.cellNuisance D) (P.cellRegressor D) hmem rw [hRdot] at hortho have hip : (P.cellSupport D hCellMassPos hCellNonempty).ip (fun cell => D.Rdot cell.val.1 cell.val.2) (fun cell => eventIndicator e cell.val.2) = (∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * eventIndicator e ge.2) / P.cellTotalMass D := P.ip_cellSupport D hCellMassPos hCellNonempty (fun ge => D.Rdot ge.1 ge.2) (fun ge => eventIndicator e ge.2) rw [hip] at hortho have hsum0 : ∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * D.Rdot ge.1 ge.2 * eventIndicator e ge.2 = 0 := (div_eq_zero_iff.mp hortho).resolve_right hZ rw [← P.sum_admissible_mul_eventIndicator D e (fun g e0 => P.cellMassAtEvent g e0 * D.Rdot g e0)] exact hsum0
6 supporting declarations (lemmas, instances)
  • ip_cellSupport lemma — ip → cell-sum. The cell-grid weighted inner product of two cell functions reproduces the finite-cell sum (divided by the total mass Z). This is the bridge that turns weighted-projection facts into the finite-cell orthogonality conditions.
    T :
    shared
    D :
    P.ConventionalDesign
    hpos :
    ge ∈ P.admissibleCells D.eventSupport, 0 < P.cellMassAtEvent ge.1 ge.2
    hne :
    (P.admissibleCells D.eventSupport).Nonempty
    A B :
    Fin T × ℤ → ℝ
    (P.cellSupport D hpos hne).ip (fun cell => A cell.val) (fun cell => B cell.val)
    = (∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * A ge * B ge) / P.cellTotalMass D
    Proof (Lean source)
    lemma ip_cellSupport (P : EventStudySystem T) (D : P.ConventionalDesign) (hpos : ∀ ge ∈ P.admissibleCells D.eventSupport, 0 < P.cellMassAtEvent ge.1 ge.2) (hne : (P.admissibleCells D.eventSupport).Nonempty) (A B : Fin T × ℤ → ℝ) : (P.cellSupport D hpos hne).ip (fun cell => A cell.val) (fun cell => B cell.val) = (∑ ge ∈ P.admissibleCells D.eventSupport, P.cellMassAtEvent ge.1 ge.2 * A ge * B ge) / P.cellTotalMass D := by classical rw [WeightedSupport.ip_def] have hobs : (P.cellSupport D hpos hne).observed = (Finset.univ : Finset (P.CellIndex D)) := rfl rw [hobs] rw [show (∑ cell : P.CellIndex D, (P.cellSupport D hpos hne).weight cell * A cell.val * B cell.val) = ∑ cell : P.CellIndex D, (fun ge : Fin T × ℤ => P.cellMassAtEvent ge.1 ge.2 / P.cellTotalMass D * A ge * B ge) cell.val from rfl] rw [Finset.sum_coe_sort (P.admissibleCells D.eventSupport) (fun ge => P.cellMassAtEvent ge.1 ge.2 / P.cellTotalMass D * A ge * B ge)] rw [Finset.sum_div] refine Finset.sum_congr rfl (fun ge _ => ?_) ring
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.ip_cellSupport · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:106
  • cellAverage_mem_cellNuisance lemma — Every cell-evaluated nuisance function lies in the cell-nuisance subspace.
    T :
    shared
    D :
    P.ConventionalDesign
    hCell :
    Fin T → Fin T → ℝ
    hN :
    P.IsEventStudyNuisance D hCell
    (fun cell : P.CellIndex D => P.cellAverage hCell cell.val.1 cell.val.2) ∈ P.cellNuisance D
    Proof (Lean source)
    lemma cellAverage_mem_cellNuisance (P : EventStudySystem T) (D : P.ConventionalDesign) {hCell : Fin T → Fin T → ℝ} (hN : P.IsEventStudyNuisance D hCell) : (fun cell : P.CellIndex D => P.cellAverage hCell cell.val.1 cell.val.2) ∈ P.cellNuisance D := Submodule.subset_span ⟨hCell, hN, rfl⟩
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cellAverage_mem_cellNuisance · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:152
  • cellAverage_eventIndicator lemma — The cell average of the relative-time indicator 1{relTime = e}, evaluated on a nonempty cell (g, e'), is the cell-level indicator 1{e' = e}.
    T :
    shared
    e :
    g :
    Fin T
    e' :
    hne :
    (P.targetPeriods g e').Nonempty
    P.cellAverage (fun g t => eventIndicator e (P.relTime g t)) g e' = eventIndicator e e'
    Proof (Lean source)
    lemma cellAverage_eventIndicator (P : EventStudySystem T) {e : ℤ} {g : Fin T} {e' : ℤ} (hne : (P.targetPeriods g e').Nonempty) : P.cellAverage (fun g t => eventIndicator e (P.relTime g t)) g e' = eventIndicator e e' := by classical have hcard : ((P.targetPeriods g e').card : ℝ) ≠ 0 := by have : 0 < (P.targetPeriods g e').card := Finset.card_pos.mpr hne exact_mod_cast this.ne' unfold EventStudySystem.cellAverage have hconst : ∀ t ∈ P.targetPeriods g e', eventIndicator e (P.relTime g t) = eventIndicator e e' := by intro t ht have hrel : P.relTime g t = e' := by simpa [EventStudySystem.targetPeriods] using ht rw [hrel] rw [Finset.sum_congr rfl hconst, Finset.sum_const, nsmul_eq_mul, ← mul_assoc, inv_mul_cancel₀ hcard, one_mul]
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.cellAverage_eventIndicator · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:159
  • eventIndicator_mem_cellNuisance lemma — A non-displayed included relative-time indicator lies in the cell-nuisance subspace (it is the cell average of the corresponding event-study nuisance).
    T :
    shared
    D :
    P.ConventionalDesign
    e :
    he_inc :
    e ∈ D.includedEvents
    he_ne :
    e ≠ D.displayedEvent
    (fun cell : P.CellIndex D => eventIndicator e cell.val.2) ∈ P.cellNuisance D
    Proof (Lean source)
    lemma eventIndicator_mem_cellNuisance (P : EventStudySystem T) (D : P.ConventionalDesign) {e : ℤ} (he_inc : e ∈ D.includedEvents) (he_ne : e ≠ D.displayedEvent) : (fun cell : P.CellIndex D => eventIndicator e cell.val.2) ∈ P.cellNuisance D := by classical have hN : P.IsEventStudyNuisance D (fun g t => eventIndicator e (P.relTime g t)) := by refine ⟨fun _ _ => 0, ⟨fun _ => 0, fun _ => 0, fun g t => by simp⟩, fun k => if k = e then 1 else 0, ?_⟩ intro g _ t simp only [zero_add] rw [Finset.sum_eq_single e] · simp · intro k _ hkne; simp [hkne] · intro hnot exact absurd (Finset.mem_filter.mpr ⟨he_inc, he_ne⟩) hnot have heq : (fun cell : P.CellIndex D => P.cellAverage (fun g t => eventIndicator e (P.relTime g t)) cell.val.1 cell.val.2) = fun cell : P.CellIndex D => eventIndicator e cell.val.2 := by funext cell have hmem : cell.val ∈ (P.cohorts.product D.eventSupport).filter (fun ge => P.AdmissibleCell ge.1 ge.2) := cell.property obtain ⟨_, hnonempty⟩ := (Finset.mem_filter.mp hmem).2 exact P.cellAverage_eventIndicator (e := e) hnonempty rw [← heq] exact P.cellAverage_mem_cellNuisance D hN
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.eventIndicator_mem_cellNuisance · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:178
  • sum_admissible_mul_eventIndicator lemma — Cell-grid filtering identity. Weighting an admissible-cell sum by the relative-time indicator 1{e = e'} collapses it to a sum over the cohorts observed at relative time e'. Pure finite algebra; no residualization needed. This is the engine behind hDisplayedExpansion and hOtherIncludedOrthogonal.
    T :
    shared
    D :
    P.ConventionalDesign
    e' :
    f :
    Fin T → ℤ → ℝ
    ge ∈ P.admissibleCells D.eventSupport, f ge.1 ge.2 * eventIndicator e' ge.2
    = ∑ g ∈ P.cohortsAtEvent D.eventSupport e', f g e'
    Proof (Lean source)
    lemma sum_admissible_mul_eventIndicator (P : EventStudySystem T) (D : P.ConventionalDesign) (e' : ℤ) (f : Fin T → ℤ → ℝ) : ∑ ge ∈ P.admissibleCells D.eventSupport, f ge.1 ge.2 * eventIndicator e' ge.2 = ∑ g ∈ P.cohortsAtEvent D.eventSupport e', f g e' := by classical have hfilter : (P.admissibleCells D.eventSupport).filter (fun ge => ge.2 = e') = (P.cohortsAtEvent D.eventSupport e').map ⟨fun g => (g, e'), fun a b h => congrArg fst h⟩ := by ext ge rcases ge with ⟨g, e⟩ simp only [admissibleCells, product_eq_sprod, mem_filter, mem_product, cohortsAtEvent, mem_map] constructor · rintro ⟨⟨⟨hg, heSupport⟩, hAdm⟩, rfl⟩ exact ⟨g, ⟨hg, heSupport, hAdm⟩, rfl⟩ · rintro ⟨a, ⟨ha, hSupport, hAdm⟩, hEq⟩ have hEq' : (a, e') = (g, e) := hEq injection hEq' with h1 h2 subst h1 subst h2 exact ⟨⟨⟨ha, hSupport⟩, hAdm⟩, rfl⟩ calc ∑ ge ∈ P.admissibleCells D.eventSupport, f ge.1 ge.2 * eventIndicator e' ge.2 = ∑ ge ∈ P.admissibleCells D.eventSupport, if ge.2 = e' then f ge.1 e' else 0 := by refine Finset.sum_congr rfl (fun ge _ => ?_) unfold EventStudySystem.eventIndicator by_cases h : ge.2 = e' · rw [h]; simp · simp [h] _ = ∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => ge.2 = e'), f ge.1 e' := by rw [Finset.sum_filter] _ = ∑ g ∈ P.cohortsAtEvent D.eventSupport e', f g e' := by rw [hfilter, Finset.sum_map] rfl
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.sum_admissible_mul_eventIndicator · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:207
  • tildeX_eq_Rdot lemma — Under cell-grid residualization, the residualized displayed-event regressor equals the design residual at every admissible cohort--relative-time cell.
    T :
    shared
    D :
    P.ConventionalDesign
    shared
    h :
    P.CellGridResidualization D
    (P.cellSupport D h.hCellMassPos h.hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D)
    = fun cell => D.Rdot cell.val.1 cell.val.2
    Proof (Lean source)
    lemma tildeX_eq_Rdot (h : P.CellGridResidualization D) : (P.cellSupport D h.hCellMassPos h.hCellNonempty).tildeX (P.cellNuisance D) (P.cellRegressor D) = fun cell => D.Rdot cell.val.1 cell.val.2 := by funext cell; exact (h.hRdotResidual cell).symm
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.tildeX_eq_Rdot · Causalean/Panel/EstimandCharacterization/EventStudyContamination/CellGrid.lean:302
Interaction­Weighted 12 core · 1 supporting This file develops the finite-cell interaction-weighted event-study estimand for the Sun-Abraham framework. ★ IW_Delta_eq_CATT★ IW_convex_characterization

Sun-Abraham Interaction-Weighted Event Study

This file develops the finite-cell interaction-weighted event-study estimand for the Sun-Abraham framework. It records the comparison-group contrasts and aggregation weights that make the interaction-weighted coefficient a convex average of target cohort-specific effects, proving IW_Delta_eq_CATT and IW_convex_characterization.

structure IWDesign reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Interaction-weighted finite DID design for a fixed event time.

Definition (Lean source)
T :
shared
Fixed event time `l`, intended to be nonnegative in the theorem.
eventTime :
Eligible IW cohorts `G_l^IW`.
cohortsIW :
Comparison group `C^0_{g,l}` for each eligible cohort.
comparisonGroup :
Fin T → Finset (WithTop (Fin T))
Aggregation weights `rho(g,l)`.
rho :
Fin T → ℝ
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.IWDesign · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:52 · uses EventStudySystem
def observedTargetMean reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, an interaction-weighted design, and a cohort, the observed target mean is the average observed outcome of that cohort over the periods at the design's specified relative time.

Definition (Lean source)
T :
shared
I :
P.IWDesign
g :
Fin T
observedTargetMean P I g :
((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.observedMean g t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.observedTargetMean · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:63 · uses EventStudySystem , IWDesign
def observedBaselineMean reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and a cohort, the observed baseline mean is the average observed outcome of that cohort over its baseline periods, defined at relative time 1-1.

Definition (Lean source)
T :
shared
g :
Fin T
observedBaselineMean P g :
((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.observedMean g t
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.observedBaselineMean · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:72 · uses EventStudySystem
def comparisonMass reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, an interaction-weighted design, and a cohort, the comparison mass is the total population share of the cohorts in that cohort's comparison group.

Definition (Lean source)
T :
shared
I :
P.IWDesign
g :
Fin T
comparisonMass P I g :
∑ h ∈ I.comparisonGroup g, P.cohortShare h
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.comparisonMass · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:81 · uses EventStudySystem , IWDesign
def comparisonMeanChange reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, an interaction-weighted design, and a cohort, the comparison mean change is the comparison-group population-share-weighted average of each comparison path's change from the cohort's baseline periods to its target periods.

Definition (Lean source)
T :
shared
I :
P.IWDesign
g :
Fin T
comparisonMeanChange P I g :
(P.comparisonMass I g)⁻¹ * ∑ h ∈ I.comparisonGroup g, P.cohortShare h * (P.pathTargetMean h g I.eventTime - P.pathBaselineMean h g)
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.comparisonMeanChange · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:89 · uses EventStudySystem , IWDesign
def DIDContrast reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, an interaction-weighted design, and a cohort, the difference-in- differences contrast is the treated cohort's observed target-minus- baseline mean change minus the corresponding comparison-group mean change.

Definition (Lean source)
T :
shared
I :
P.IWDesign
g :
Fin T
DIDContrast P I g :
(P.observedTargetMean I g - P.observedBaselineMean g) - P.comparisonMeanChange I g
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.DIDContrast · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:100 · uses EventStudySystem , IWDesign
def Delta reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, an interaction-weighted design, and a cohort, the interaction- weighted cohort contrast is that cohort's difference-in-differences contrast.

Definition (Lean source)
T :
shared
I :
P.IWDesign
g :
Fin T
Delta P I g :
P.DIDContrast I g
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.Delta · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:109 · uses EventStudySystem , IWDesign
def nuIW reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For a finite time horizon, an event-study system, and an interaction-weighted design, the interaction-weighted event-study estimand is the sum, over all eligible cohorts, of each aggregation weight times that cohort's interaction-weighted contrast.

Definition (Lean source)
T :
shared
I :
P.IWDesign
nuIW P I :
∑ g ∈ I.cohortsIW, I.rho g * P.Delta I g
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.nuIW · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:117 · uses EventStudySystem , IWDesign
structure IWSupport reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

IW support restrictions for eligible cohorts and their comparison groups.

Definition (Lean source)
T :
shared
I :
P.IWDesign
hBaselineValid :
∀ g ∈ I.cohortsIW, (P.baselinePeriods g).Nonempty
hTargetValid :
∀ g ∈ I.cohortsIW, g ∈ P.cohorts ∧ (P.targetPeriods g I.eventTime).Nonempty
hCohortSharePos :
∀ g ∈ I.cohortsIW, 0 < P.cohortShare (finitePath g)
hComparisonNonempty :
∀ g ∈ I.cohortsIW, (I.comparisonGroup g).Nonempty
hComparisonPositive :
∀ g ∈ I.cohortsIW, 0 < P.comparisonMass I g
hComparisonUntreatedBaseline :
∀ g ∈ I.cohortsIW,
∀ h ∈ I.comparisonGroup g, ∀ t ∈ P.baselinePeriods g, absorbingTreatment h t = 0
hComparisonUntreatedTarget :
∀ g ∈ I.cohortsIW,
∀ h ∈ I.comparisonGroup g, ∀ t ∈ P.targetPeriods g I.eventTime, absorbingTreatment h t = 0
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.IWSupport · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:124 · uses EventStudySystem , IWDesign
structure IWComparisonParallelTrends reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Comparison-group parallel trends for the IW DID contrast.

Definition (Lean source)
T :
shared
I :
P.IWDesign
hComparisonPositive :
∀ g ∈ I.cohortsIW, 0 < P.comparisonMass I g
hComparisonUntreated :
∀ g ∈ I.cohortsIW,
∀ h ∈ I.comparisonGroup g,
(∀ t ∈ P.baselinePeriods g, absorbingTreatment h t = 0) ∧
(∀ t ∈ P.targetPeriods g I.eventTime, absorbingTreatment h t = 0)
hComparisonParallelTrends :
∀ g ∈ I.cohortsIW,
((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, (P.untreatedMean g t)
- ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, (P.untreatedMean g t)
= (P.comparisonMass I g)⁻¹ * ∑ h ∈ I.comparisonGroup g, P.cohortShare h * (((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedPathMean h t - ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedPathMean h t)
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem.IWComparisonParallelTrends · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:149 · uses EventStudySystem , IWDesign
theorem IW_Delta_eq_CATT reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system P and interaction-weighted design I, if consistency, no-anticipation, and path-consistency hold, every eligible cohort's comparison-group mean change from baseline to target period matches its own untreated-mean change, every eligible cohort is a genuine cohort of the system, and every comparison unit is untreated throughout the baseline and target periods, then for any eligible cohort g, its interaction-weighted DID contrast Delta I g equals the cohort-relative-time average treatment effect CATT g I.eventTime.

Formal statement
T :
shared
I :
P.IWDesign
hConsistency :
P.Consistency
hNoAnticipation :
P.NoAnticipation
hPathConsistency :
P.PathConsistency
hComparisonParallelTrends :
∀ g ∈ I.cohortsIW,
((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, (P.untreatedMean g t)
- ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, (P.untreatedMean g t)
= (P.comparisonMass I g)⁻¹ * ∑ h ∈ I.comparisonGroup g, P.cohortShare h * (((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedPathMean h t - ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedPathMean h t)
hCohort :
∀ g ∈ I.cohortsIW, g ∈ P.cohorts
hComparisonUntreatedBaseline :
∀ g ∈ I.cohortsIW,
∀ h ∈ I.comparisonGroup g, ∀ t ∈ P.baselinePeriods g, absorbingTreatment h t = 0
hComparisonUntreatedTarget :
∀ g ∈ I.cohortsIW,
∀ h ∈ I.comparisonGroup g, ∀ t ∈ P.targetPeriods g I.eventTime, absorbingTreatment h t = 0
g :
Fin T
hg :
g ∈ I.cohortsIW
P.Delta I g = P.CATT g I.eventTime
Proof (Lean source)
theorem IW_Delta_eq_CATT (P : EventStudySystem T) (I : P.IWDesign) (hConsistency : P.Consistency) (hNoAnticipation : P.NoAnticipation) (hPathConsistency : P.PathConsistency) (hComparisonParallelTrends : ∀ g ∈ I.cohortsIW, ((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, (P.untreatedMean g t) - ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, (P.untreatedMean g t) = (P.comparisonMass I g)⁻¹ * ∑ h ∈ I.comparisonGroup g, P.cohortShare h * (((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedPathMean h t - ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedPathMean h t)) (hCohort : ∀ g ∈ I.cohortsIW, g ∈ P.cohorts) (hComparisonUntreatedBaseline : ∀ g ∈ I.cohortsIW, ∀ h ∈ I.comparisonGroup g, ∀ t ∈ P.baselinePeriods g, absorbingTreatment h t = 0) (hComparisonUntreatedTarget : ∀ g ∈ I.cohortsIW, ∀ h ∈ I.comparisonGroup g, ∀ t ∈ P.targetPeriods g I.eventTime, absorbingTreatment h t = 0) {g : Fin T} (hg : g ∈ I.cohortsIW) : P.Delta I g = P.CATT g I.eventTime := by have hgCohort : g ∈ P.cohorts := hCohort g hg have hObsTarget : P.observedTargetMean I g = ((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.treatedMean g t := by unfold observedTargetMean have hsum : (∑ t ∈ P.targetPeriods g I.eventTime, P.observedMean g t) = ∑ t ∈ P.targetPeriods g I.eventTime, P.treatedMean g t := by apply Finset.sum_congr rfl intro t ht exact hConsistency g hgCohort t rw [hsum] have hObsBaseline : P.observedBaselineMean g = ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedMean g t := by unfold observedBaselineMean have hsum : (∑ t ∈ P.baselinePeriods g, P.observedMean g t) = ∑ t ∈ P.baselinePeriods g, P.untreatedMean g t := by apply Finset.sum_congr rfl intro t ht have hrel : P.relTime g t = -1 := by simpa [baselinePeriods, targetPeriods] using ht have hpre : P.time t < P.time g := by have hneg : P.relTime g t < 0 := by rw [hrel] norm_num simpa [relTime] using (sub_neg.mp hneg) rw [hConsistency g hgCohort t, hNoAnticipation g hgCohort t hpre] rw [hsum] have hPathTarget : ∀ h ∈ I.comparisonGroup g, P.pathTargetMean h g I.eventTime = ((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedPathMean h t := by intro h hh unfold pathTargetMean have hsum : (∑ t ∈ P.targetPeriods g I.eventTime, P.observedPathMean h t) = ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedPathMean h t := by apply Finset.sum_congr rfl intro t ht exact P.pathConsistency_observed_eq_untreated hPathConsistency (hComparisonUntreatedTarget g hg h hh t ht) rw [hsum] have hPathBaseline : ∀ h ∈ I.comparisonGroup g, P.pathBaselineMean h g = ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedPathMean h t := by intro h hh unfold pathBaselineMean have hsum : (∑ t ∈ P.baselinePeriods g, P.observedPathMean h t) = ∑ t ∈ P.baselinePeriods g, P.untreatedPathMean h t := by apply Finset.sum_congr rfl intro t ht exact P.pathConsistency_observed_eq_untreated hPathConsistency (hComparisonUntreatedBaseline g hg h hh t ht) rw [hsum] have hComparison : P.comparisonMeanChange I g = (P.comparisonMass I g)⁻¹ * ∑ h ∈ I.comparisonGroup g, P.cohortShare h * (((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedPathMean h t - ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedPathMean h t) := by unfold comparisonMeanChange have hsum : (∑ h ∈ I.comparisonGroup g, P.cohortShare h * (P.pathTargetMean h g I.eventTime - P.pathBaselineMean h g)) = ∑ h ∈ I.comparisonGroup g, P.cohortShare h * (((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedPathMean h t - ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedPathMean h t) := by apply Finset.sum_congr rfl intro h hh rw [hPathTarget h hh, hPathBaseline h hh] rw [hsum] have hParallel := hComparisonParallelTrends g hg unfold Delta DIDContrast CATT meanCellContrast rw [hObsTarget, hObsBaseline, hComparison, ← hParallel] rw [Finset.sum_sub_distrib] rw [mul_sub] rw [sub_sub_sub_cancel_right]
theorem IW_convex_characterization reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

For an event-study system P and interaction-weighted design I, if consistency, no-anticipation, and path-consistency hold, every eligible cohort's comparison-group mean change from baseline to target period matches its own untreated-mean change, the eligibility, baseline, target, and comparison-group support conditions of IWSupport hold, the aggregation weights rho are nonnegative and sum to one over the eligible cohorts, and every eligible cohort's CATT at the fixed event time lies between bounds lo and hi, then each cohort's DID contrast equals its CATT, the interaction-weighted estimand nuIW I equals the rho-weighted average of those CATTs, and nuIW I itself lies between lo and hi — a genuine convex average with no contamination from other relative times.

Formal statement
T :
shared
I :
P.IWDesign
hConsistency :
P.Consistency
hNoAnticipation :
P.NoAnticipation
hPathConsistency :
P.PathConsistency
hComparisonParallelTrends :
∀ g ∈ I.cohortsIW,
((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedMean g t
- ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedMean g t
= (P.comparisonMass I g)⁻¹ * ∑ h ∈ I.comparisonGroup g, P.cohortShare h * (((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedPathMean h t - ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedPathMean h t)
hSupport :
P.IWSupport I
hRhoNonneg :
∀ g ∈ I.cohortsIW, 0 ≤ I.rho g
hRhoSumOne :
∑ g ∈ I.cohortsIW, I.rho g = 1
lo hi :
hLo :
∀ g ∈ I.cohortsIW, lo ≤ P.CATT g I.eventTime
hHi :
∀ g ∈ I.cohortsIW, P.CATT g I.eventTime ≤ hi
conclusion 1
g ∈ I.cohortsIW :
P.Delta I g = P.CATT g I.eventTime
conclusion 2
P.nuIW I = ∑ g ∈ I.cohortsIW, I.rho g * P.CATT g I.eventTime
conclusion 3
lo ≤ P.nuIW I
conclusion 4
P.nuIW I ≤ hi
Proof (Lean source)
theorem IW_convex_characterization (P : EventStudySystem T) (I : P.IWDesign) (hConsistency : P.Consistency) (hNoAnticipation : P.NoAnticipation) (hPathConsistency : P.PathConsistency) (hComparisonParallelTrends : ∀ g ∈ I.cohortsIW, ((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedMean g t - ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedMean g t = (P.comparisonMass I g)⁻¹ * ∑ h ∈ I.comparisonGroup g, P.cohortShare h * (((P.targetPeriods g I.eventTime).card : ℝ)⁻¹ * ∑ t ∈ P.targetPeriods g I.eventTime, P.untreatedPathMean h t - ((P.baselinePeriods g).card : ℝ)⁻¹ * ∑ t ∈ P.baselinePeriods g, P.untreatedPathMean h t)) (hSupport : P.IWSupport I) (hRhoNonneg : ∀ g ∈ I.cohortsIW, 0 ≤ I.rho g) (hRhoSumOne : ∑ g ∈ I.cohortsIW, I.rho g = 1) {lo hi : ℝ} (hLo : ∀ g ∈ I.cohortsIW, lo ≤ P.CATT g I.eventTime) (hHi : ∀ g ∈ I.cohortsIW, P.CATT g I.eventTime ≤ hi) : (∀ g ∈ I.cohortsIW, P.Delta I g = P.CATT g I.eventTime) ∧ P.nuIW I = ∑ g ∈ I.cohortsIW, I.rho g * P.CATT g I.eventTime ∧ lo ≤ P.nuIW I ∧ P.nuIW I ≤ hi := by have hDelta : ∀ g ∈ I.cohortsIW, P.Delta I g = P.CATT g I.eventTime := by intro g hg exact P.IW_Delta_eq_CATT I hConsistency hNoAnticipation hPathConsistency hComparisonParallelTrends (fun g hg => (hSupport.hTargetValid g hg).1) hSupport.hComparisonUntreatedBaseline hSupport.hComparisonUntreatedTarget hg have hAgg : P.nuIW I = ∑ g ∈ I.cohortsIW, I.rho g * P.CATT g I.eventTime := by unfold nuIW apply Finset.sum_congr rfl intro g hg rw [hDelta g hg] refine ⟨hDelta, hAgg, ?_, ?_⟩ <;> rw [hAgg] · exact (sum_convex_mem_Icc I.cohortsIW I.rho (fun g => P.CATT g I.eventTime) hRhoNonneg hRhoSumOne hLo hHi).1 · exact (sum_convex_mem_Icc I.cohortsIW I.rho (fun g => P.CATT g I.eventTime) hRhoNonneg hRhoSumOne hLo hHi).2
1 supporting declaration (lemmas, instances)
  • sum_convex_mem_Icc theorem — Finite convex-combination bound. If the weights w are nonnegative and sum to one, then any nonnegative-weighted average of values lying in [lo, hi] again lies in [lo, hi]. This is the algebraic content of "convex combination" used to certify that the IW estimand is a genuine convex average of the target CATTs (no contamination).
    ι :
    Type*
    s :
    w f :
    ι → ℝ
    lo hi :
    hw :
    ∀ i ∈ s, 0 ≤ w i
    hsum :
    ∑ i ∈ s, w i = 1
    hlo :
    ∀ i ∈ s, lo ≤ f i
    hhi :
    ∀ i ∈ s, f i ≤ hi
    conclusion 1
    lo ≤ ∑ i ∈ s, w i * f i
    conclusion 2
    ∑ i ∈ s, w i * f i ≤ hi
    Proof (Lean source)
    theorem sum_convex_mem_Icc {ι : Type*} (s : Finset ι) (w f : ι → ℝ) {lo hi : ℝ} (hw : ∀ i ∈ s, 0 ≤ w i) (hsum : ∑ i ∈ s, w i = 1) (hlo : ∀ i ∈ s, lo ≤ f i) (hhi : ∀ i ∈ s, f i ≤ hi) : lo ≤ ∑ i ∈ s, w i * f i ∧ ∑ i ∈ s, w i * f i ≤ hi := by constructor · calc lo = ∑ i ∈ s, w i * lo := by rw [← Finset.sum_mul, hsum, one_mul] _ ≤ ∑ i ∈ s, w i * f i := by apply Finset.sum_le_sum intro i hi' exact mul_le_mul_of_nonneg_left (hlo i hi') (hw i hi') · calc ∑ i ∈ s, w i * f i ≤ ∑ i ∈ s, w i * hi := by apply Finset.sum_le_sum intro i hi' exact mul_le_mul_of_nonneg_left (hhi i hi') (hw i hi') _ = hi := by rw [← Finset.sum_mul, hsum, one_mul]
    Causalean.Panel.EstimandCharacterization.EventStudyContamination.sum_convex_mem_Icc · Causalean/Panel/EstimandCharacterization/EventStudyContamination/InteractionWeighted.lean:25
Contamination 3 core · 0 supporting This file provides the public contamination theorems for the conventional Sun-Abraham event-study coefficient. ★ contamination_representation_of_cellGrid★ contamination_representation_split_of_cellGrid★ apparent_pretrends_from_post_treatment_of_cellGrid

Sun-Abraham Contamination Representation

This file provides the public contamination theorems for the conventional Sun-Abraham event-study coefficient. It starts from the cell-grid weighted projection, derives the needed residualization identities, and applies the finite-cell algebra to obtain the displayed contamination formulas.

theorem contamination_representation_of_cellGrid reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Contamination representation (genuine). For the conventional event-study coefficient D.mu of a design D on system P, if observed outcomes equal the potential outcome under the realized treatment path (consistency), the never-treated potential outcome follows an additive parallel-trends restriction, the included, displayed, and admissible event times all lie within the declared finite support, and the cell-grid weighted-projection residualization input is supplied, then D.mu equals the Sun-Abraham contamination-weighted sum of cohort-relative-time CATTs over every admissible cell.

Formal statement
T :
shared
D :
P.ConventionalDesign
shared
hConsistency :
P.Consistency
hMeanParallelUntreated :
P.MeanParallelUntreated
hSupport :
P.ConventionalFiniteSupport D
hCell :
P.CellGridResidualization D
D.mu = ∑ ge ∈ P.admissibleCells D.eventSupport, P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2
Proof (Lean source)
theorem contamination_representation_of_cellGrid (hConsistency : P.Consistency) (hMeanParallelUntreated : P.MeanParallelUntreated) (hSupport : P.ConventionalFiniteSupport D) (hCell : P.CellGridResidualization D) : D.mu = ∑ ge ∈ P.admissibleCells D.eventSupport, P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2 := P.contamination_representation D hConsistency hMeanParallelUntreated (cellGrid_provides_residualization hCell.hCellMassPos hCell.hCellNonempty hCell.hRdotResidual).hResidualization hCell.hDenomPos (cellGrid_mu_eq_conventionalMuRatio hCell) hSupport
theorem contamination_representation_split_of_cellGrid reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Contamination split (genuine). For the conventional event-study coefficient D.mu of a design D on system P, if the consistency, mean-parallel-trends, and no-anticipation causal restrictions hold, the included, displayed, and admissible event times all lie within the declared finite support, and the cell-grid weighted-projection residualization input is supplied, then D.mu splits as the displayed-event-time contamination term plus the contamination-weighted sum over every other admissible cohort-relative-time cell.

Formal statement
T :
shared
D :
P.ConventionalDesign
shared
hCausal :
P.EventStudyCausalRestrictions
hSupport :
P.ConventionalFiniteSupport D
hCell :
P.CellGridResidualization D
D.mu
= (∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.omega D g D.displayedEvent * P.CATT g D.displayedEvent)
+ (∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => ge.2 ≠ D.displayedEvent), P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2)
Proof (Lean source)
theorem contamination_representation_split_of_cellGrid (hCausal : P.EventStudyCausalRestrictions) (hSupport : P.ConventionalFiniteSupport D) (hCell : P.CellGridResidualization D) : D.mu = (∑ g ∈ P.cohortsAtEvent D.eventSupport D.displayedEvent, P.omega D g D.displayedEvent * P.CATT g D.displayedEvent) + (∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => ge.2 ≠ D.displayedEvent), P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2) := P.contamination_representation_split D hCausal.hConsistency hCausal.hMeanParallelUntreated (cellGrid_provides_residualization hCell.hCellMassPos hCell.hCellNonempty hCell.hRdotResidual) hCell.hDenomPos (cellGrid_mu_eq_conventionalMuRatio hCell) hSupport
theorem apparent_pretrends_from_post_treatment_of_cellGrid reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudySystem

Apparent pretrends (genuine). For the conventional event-study coefficient D.mu of a design D on system P, if the consistency, mean-parallel-trends, and no-anticipation causal restrictions hold, the included, displayed, and admissible event times all lie within the declared finite event-time support, and the cell-grid weighted-projection residualization input is supplied, then D.mu equals the contamination-weighted sum of cohort-relative-time CATTs restricted to nonnegative relative times — since no-anticipation forces every negative-relative-time CATT to vanish, this exhibits D.mu as a weighted average of post-treatment effects.

Formal statement
T :
shared
D :
P.ConventionalDesign
shared
hCausal :
P.EventStudyCausalRestrictions
hSupport :
P.ConventionalFiniteSupport D
hCell :
P.CellGridResidualization D
D.mu
= ∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => 0 ≤ ge.2), P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2
Proof (Lean source)
theorem apparent_pretrends_from_post_treatment_of_cellGrid (hCausal : P.EventStudyCausalRestrictions) (hSupport : P.ConventionalFiniteSupport D) (hCell : P.CellGridResidualization D) : D.mu = ∑ ge ∈ (P.admissibleCells D.eventSupport).filter (fun ge => 0 ≤ ge.2), P.omega D ge.1 ge.2 * P.CATT ge.1 ge.2 := P.apparent_pretrends_from_post_treatment D hCausal (cellGrid_provides_residualization hCell.hCellMassPos hCell.hCellNonempty hCell.hRdotResidual).hResidualization hCell.hDenomPos (cellGrid_mu_eq_conventionalMuRatio hCell) hSupport
Population­Bridge 10 core · 8 supporting This file constructs a finite EventStudySystem from a probability space with adoption-path potential outcomes, defining its mean fields as cohort-cell conditional means and deriving the Sun-Abraham causal restrictions fr ★ toSystem_CATT_eq_po_contrast★ contamination_representation_population★ IW_convex_characterization_population

Sun-Abraham event-study population bridge

This file constructs a finite EventStudySystem from a probability space with adoption-path potential outcomes, defining its mean fields as cohort-cell conditional means and deriving the Sun-Abraham causal restrictions from the underlying potential-outcome structure.

structure EventStudyPopulation reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination

A staggered-adoption event-study population: a probability space carrying a realized adoption cohort G — with every cohort cell measurablea calendar-time map time that is strictly increasing in the period index, a finite set cohorts of adoption cohorts in the event-study support, and adoption-path–indexed potential outcomes Ypath t h ω = Y_{ωt}(h) satisfying structural no-anticipation: in any period where a path is untreated, its outcome equals the never-treated outcome, for every unit.

Definition (Lean source)
T :
Unit sample space.
Ω :
Type*
Measurable-space structure on `Ω`.
measΩ :
Population measure.
μ :
`μ` is a probability measure.
probμ :
Realized adoption cohort of each unit (`⊤` = never treated).
G :
Ω → WithTop (Fin T)
Each cohort cell `{G = h}` is measurable.
Gcell_meas :
∀ h, MeasurableSet (G ⁻¹' {h})
Calendar-time map on periods.
time :
Fin T → ℤ
Calendar time is strictly increasing in the period index, so the calendar order matches the adoption-date order.
time_strictMono :
Finite adoption cohorts included in the event-study support.
cohorts :
Potential-outcome family: `Ypath t h ω` is the outcome of unit `ω` at period `t` under adoption path `h`.
Ypath :
Fin T → WithTop (Fin T) → Ω → ℝ
**Structural no-anticipation.** In any period where path `h` is untreated (`absorbingTreatment h t = 0`, i.e. `h = ⊤` or the period precedes adoption), the outcome under `h` equals the never-treated outcome, for every unit.
hNoAnt :
∀ (h : WithTop (Fin T)) (t : Fin T) (ω : Ω)
if
EventStudySystem.absorbingTreatment (T := T) h t = 0
then
Ypath t h ω = Ypath t ⊤ ω
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation · Causalean/Panel/EstimandCharacterization/EventStudyContamination/PopulationBridge.lean:50
def cell reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation

For an event-study population EE and an adoption path hh, the adoption-path cell is the event consisting exactly of units whose realized adoption path is hh.

Definition (Lean source)
T :
shared
h :
cell E h :
Set E.Ω
E.G ⁻¹' {h}
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation.cell · Causalean/Panel/EstimandCharacterization/EventStudyContamination/PopulationBridge.lean:102 · uses EventStudyPopulation
def cellMass reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation

For an event-study population EE and an adoption path hh, the adoption-path cell mass is the real-valued probability mass of the units whose realized adoption path is hh.

Definition (Lean source)
T :
shared
h :
cellMass E h :
(E.μ (E.cell h)).toReal
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation.cellMass · Causalean/Panel/EstimandCharacterization/EventStudyContamination/PopulationBridge.lean:106 · uses EventStudyPopulation
def cellMean reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation

For an event-study population EE, a real-valued unit-level function ff, and an adoption path hh, the adoption-path cell mean is the conditional mean of ff on the event that the realized adoption path equals hh, with value zero when that event has zero probability.

Definition (Lean source)
T :
shared
f :
E.Ω → ℝ
h :
cellMean E f h :
eventCondExp E.μ (E.cell h) f
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation.cellMean · Causalean/Panel/EstimandCharacterization/EventStudyContamination/PopulationBridge.lean:110 · uses EventStudyPopulation
def observed reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation

For an event-study population EE, a finite period tt, and a unit ωω, the observed outcome is that unit's potential outcome at tt under its realized adoption path.

Definition (Lean source)
T :
shared
t :
Fin T
ω :
E.Ω
observed E t ω :
E.Ypath t (E.G ω) ω
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation.observed · Causalean/Panel/EstimandCharacterization/EventStudyContamination/PopulationBridge.lean:131 · uses EventStudyPopulation
def toSystem reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation

For an event-study population EE, the induced event-study system has the population's calendar-time map and supported cohorts, and defines every cohort share, cell mass, and outcome-mean field as the corresponding adoption-path cell probability or conditional mean.

Definition (Lean source)
T :
shared
toSystem E :
clause 1
time := E.time
clause 2
cohorts := E.cohorts
clause 3
cohortShare h := E.cellMass h
clause 4
cellMass g _t := E.cellMass (EventStudySystem.finitePath g)
clause 5
observedPathMean h t := E.cellMean (E.observed t) h
clause 6
observedMean g t := E.cellMean (E.observed t) (EventStudySystem.finitePath g)
clause 7
treatedMean g t := E.cellMean (E.Ypath t (EventStudySystem.finitePath g)) (EventStudySystem.finitePath g)
clause 8
untreatedMean g t := E.cellMean (E.Ypath t ⊤) (EventStudySystem.finitePath g)
clause 9
untreatedPathMean h t := E.cellMean (E.Ypath t ⊤) h
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation.toSystem · Causalean/Panel/EstimandCharacterization/EventStudyContamination/PopulationBridge.lean:137 · uses EventStudyPopulation , EventStudySystem
def OutcomesIntegrable reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation

For an event-study population EE, the outcome-integrability condition states that the potential outcome under every finite period and every adoption path is integrable with respect to the population measure.

Definition (Lean source)
T :
shared
t :
Fin T
h :
OutcomesIntegrable E :
Prop
Integrable (E.Ypath t h) E.μ
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation.OutcomesIntegrable · Causalean/Panel/EstimandCharacterization/EventStudyContamination/PopulationBridge.lean:213 · uses EventStudyPopulation
theorem toSystem_CATT_eq_po_contrast reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation

Causal-meaning certificate. For a population satisfying the event-study setup, in the system it induces, the treatment-effect estimand at cohort g and relative time e equals the cohort-cell average of the population potential-outcome contrast E[Y_{·t}(g) ∣ G = g] − E[Y_{·t}(∞) ∣ G = g] over the relevant periods, so the estimand carries genuine causal content rather than a free-standing definition on reals.

Formal statement
T :
shared
g :
Fin T
e :
(E.toSystem).CATT g e
= (((E.toSystem).targetPeriods g e).card : ℝ)⁻¹ * ∑ t ∈ (E.toSystem).targetPeriods g e, (E.cellMean (E.Ypath t (EventStudySystem.finitePath g)) (EventStudySystem.finitePath g) - E.cellMean (E.Ypath t ⊤) (EventStudySystem.finitePath g))
Proof (Lean source)
theorem toSystem_CATT_eq_po_contrast (E : EventStudyPopulation T) (g : Fin T) (e : ℤ) : (E.toSystem).CATT g e = (((E.toSystem).targetPeriods g e).card : ℝ)⁻¹ * ∑ t ∈ (E.toSystem).targetPeriods g e, (E.cellMean (E.Ypath t (EventStudySystem.finitePath g)) (EventStudySystem.finitePath g) - E.cellMean (E.Ypath t ⊤) (EventStudySystem.finitePath g)) := by rfl
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation.toSystem_CATT_eq_po_contrast · Causalean/Panel/EstimandCharacterization/EventStudyContamination/PopulationBridge.lean:234 · uses EventStudyPopulation , cellMean , toSystem , CATT , finitePath , targetPeriods
theorem contamination_representation_population reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation

Population contamination representation (headline). For a staggered-adoption event-study population E and a conventional design D on the system it induces, if the never-treated potential outcome follows the additive parallel-trends restriction, the included, displayed, and admissible event times all lie within the declared finite support, and the cell-grid weighted-projection residualization input is supplied, then the conventional TWFE event-study coefficient D.mu equals the contamination-weighted sum of genuine population cohort-relative-time effects CATT g e = E[Y_{·t}(g) − Y_{·t}(∞) ∣ G = g]. Consistency and no-anticipation are derived from the potential-outcome structure rather than assumed; this is the Sun-Abraham contamination theorem stated over a genuinely potential-outcome-anchored system.

Formal statement
T :
shared
D :
(E.toSystem).ConventionalDesign
hPar :
hSupport :
hCell :
D.mu
= ∑ ge ∈ (E.toSystem).admissibleCells D.eventSupport, (E.toSystem).omega D ge.1 ge.2 * (E.toSystem).CATT ge.1 ge.2
Proof (Lean source)
theorem contamination_representation_population (E : EventStudyPopulation T) (D : (E.toSystem).ConventionalDesign) (hPar : (E.toSystem).MeanParallelUntreated) (hSupport : (E.toSystem).ConventionalFiniteSupport D) (hCell : (E.toSystem).CellGridResidualization D) : D.mu = ∑ ge ∈ (E.toSystem).admissibleCells D.eventSupport, (E.toSystem).omega D ge.1 ge.2 * (E.toSystem).CATT ge.1 ge.2 := by exact (E.toSystem).contamination_representation_of_cellGrid E.toSystem_consistency hPar hSupport hCell
theorem IW_convex_characterization_population reviewed
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation

Population interaction-weighted characterization (headline). For a staggered-adoption event-study population E and an interaction-weighted design I on the system it induces, if the induced system satisfies comparison-group parallel trends, the eligibility, baseline, target, and comparison-group support conditions of IWSupport hold, the aggregation weights rho are nonnegative and sum to one over the eligible cohorts, and every eligible cohort's population CATT at the fixed event time lies between bounds lo and hi, then the interaction-weighted estimand nuIW is the rho-weighted convex average of the genuine population effects CATT g ℓ, and in particular lies between lo and hi — with no contamination from other event times.

Formal statement
T :
shared
I :
(E.toSystem).IWDesign
hIWParallelTrends :
hSupport :
(E.toSystem).IWSupport I
hRhoNonneg :
∀ g ∈ I.cohortsIW, 0 ≤ I.rho g
hRhoSumOne :
∑ g ∈ I.cohortsIW, I.rho g = 1
lo hi :
hLo :
∀ g ∈ I.cohortsIW, lo ≤ (E.toSystem).CATT g I.eventTime
hHi :
∀ g ∈ I.cohortsIW, (E.toSystem).CATT g I.eventTime ≤ hi
conclusion 1
g ∈ I.cohortsIW :
(E.toSystem).Delta I g = (E.toSystem).CATT g I.eventTime
conclusion 2
(E.toSystem).nuIW I = ∑ g ∈ I.cohortsIW, I.rho g * (E.toSystem).CATT g I.eventTime
conclusion 3
lo ≤ (E.toSystem).nuIW I
conclusion 4
(E.toSystem).nuIW I ≤ hi
Proof (Lean source)
theorem IW_convex_characterization_population (E : EventStudyPopulation T) (I : (E.toSystem).IWDesign) (hIWParallelTrends : (E.toSystem).IWComparisonParallelTrends I) (hSupport : (E.toSystem).IWSupport I) (hRhoNonneg : ∀ g ∈ I.cohortsIW, 0 ≤ I.rho g) (hRhoSumOne : ∑ g ∈ I.cohortsIW, I.rho g = 1) {lo hi : ℝ} (hLo : ∀ g ∈ I.cohortsIW, lo ≤ (E.toSystem).CATT g I.eventTime) (hHi : ∀ g ∈ I.cohortsIW, (E.toSystem).CATT g I.eventTime ≤ hi) : (∀ g ∈ I.cohortsIW, (E.toSystem).Delta I g = (E.toSystem).CATT g I.eventTime) ∧ (E.toSystem).nuIW I = ∑ g ∈ I.cohortsIW, I.rho g * (E.toSystem).CATT g I.eventTime ∧ lo ≤ (E.toSystem).nuIW I ∧ (E.toSystem).nuIW I ≤ hi := by exact (E.toSystem).IW_convex_characterization I E.toSystem_consistency E.toSystem_noAnticipation E.toSystem_pathConsistency hIWParallelTrends.hComparisonParallelTrends hSupport hRhoNonneg hRhoSumOne hLo hHi
Causalean.Panel.EstimandCharacterization.EventStudyContamination.EventStudyPopulation.IW_convex_characterization_population · Causalean/Panel/EstimandCharacterization/EventStudyContamination/PopulationBridge.lean:297 · uses EventStudyPopulation , toSystem , CATT , Delta , IWComparisonParallelTrends , IWDesign , IWSupport , nuIW
8 supporting declarations (lemmas, instances)