Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma EC.1.2, p. ec12 (corrected: b_{ℓ,t} = (T_ℓ+1−2t)/T_ℓ; X-term weighted by the projector onto col X) — separable quadratic representation of tr Prec(τ̂)

Proved
StaggeredRollout.TOpt.lemma_EC_1_2

by mikedeng1 · Oct 23, 2026 · Mathlib 0df444a (Lean v4.33.1)

experimental-designgeneralized-least-squaresp2o-batch-pfp2ap2o-correctedp2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1quadratic-formstaggered-rollout

Separable quadratic representation (Lemma EC.1.2, corrected).

Work in the setting of the definitions file: NNN units, TTT periods, ℓ\ellℓ lags, a staggered design AAA with treatment path zit∈{−1,+1}z_{it}\in\{-1,+1\}zit​∈{−1,+1}, observed covariates X∈RN×dxX\in\mathbb R^{N\times d_x}X∈RN×dx​, latent covariates U∈RN×duU\in\mathbb R^{N\times d_u}U∈RN×du​, and the infeasible GLS with per-period error covariance Ψ=UΣvU⊤+σε2IN\Psi=U\Sigma_vU^\top+\sigma_\varepsilon^2I_NΨ=UΣv​U⊤+σε2​IN​. Assume σε2>0\sigma_\varepsilon^2>0σε2​>0, Σv=σε2Idu\Sigma_v=\sigma_\varepsilon^2I_{d_u}Σv​=σε2​Idu​​, the rows of XXX and of UUU are centred (∑iXi=0\sum_iX_i=0∑i​Xi​=0, ∑iui=0\sum_iu_i=0∑i​ui​=0), and ∑iXiui⊤=0\sum_iX_iu_i^\top=0∑i​Xi​ui⊤​=0. Let Tℓ=T−ℓT_\ell=T-\ellTℓ​=T−ℓ and ωt=1N∑izit\omega_t=\frac1N\sum_iz_{it}ωt​=N1​∑i​zit​. Then for every design AAA

tr⁡Prec⁡(τ^;A)=−Nσε2∑j=1ℓ+1(ωj:jℓ⊤P1Tℓωj:jℓ+2bℓ⊤ωj:jℓ⏟fj,1+1Nzj:jℓ⊤(P1Tℓ⊗HX)zj:jℓ⏟fj,X+1Nzj:jℓ⊤MUzj:jℓ⏟fj,U),\operatorname{tr}\operatorname{Prec}(\hat\tau;A)=-\frac{N}{\sigma_\varepsilon^2}\sum_{j=1}^{\ell+1}\Big(\underbrace{\omega_{j:j_\ell}^\top P_{1_{T_\ell}}\omega_{j:j_\ell}+2b_\ell^\top\omega_{j:j_\ell}}_{f_{j,1}}+\underbrace{\tfrac1N z_{j:j_\ell}^\top(P_{1_{T_\ell}}\otimes H_X)z_{j:j_\ell}}_{f_{j,X}}+\underbrace{\tfrac1N z_{j:j_\ell}^\top M_U z_{j:j_\ell}}_{f_{j,U}}\Big),trPrec(τ^;A)=−σε2​N​j=1∑ℓ+1​(fj,1​ωj:jℓ​⊤​P1Tℓ​​​ωj:jℓ​​+2bℓ⊤​ωj:jℓ​​​​+fj,X​N1​zj:jℓ​⊤​(P1Tℓ​​​⊗HX​)zj:jℓ​​​​+fj,U​N1​zj:jℓ​⊤​MU​zj:jℓ​​​​),

where bℓ,t=(Tℓ+1−2t)/Tℓb_{\ell,t}=(T_\ell+1-2t)/T_\ellbℓ,t​=(Tℓ​+1−2t)/Tℓ​, HXH_XHX​ is the orthogonal projector onto the column space of XXX, and MU=P1Tℓ⊗U(Idu+U⊤U)−1U⊤M_U=P_{1_{T_\ell}}\otimes U(I_{d_u}+U^\top U)^{-1}U^\topMU​=P1Tℓ​​​⊗U(Idu​​+U⊤U)−1U⊤.

The representation splits the design objective into a term that depends only on the treated fractions ωt\omega_tωt​, a term that depends only on how treatment correlates with XXX, and one for UUU. A design that minimizes all three simultaneously maximizes tr⁡Prec⁡(τ^)\operatorname{tr}\operatorname{Prec}(\hat\tau)trPrec(τ^), which is how Theorem 3.1 is proved.

Formalization Note The identity is stated for every design AAA, with zitz_{it}zit​, the windows and the three terms as in the definitions files (0-based windows j : Fin (ℓ+1)). If T≤ℓT\le\ellT≤ℓ there are no observed periods and both sides are 000.

Differences from the source:

  • correction: b_{ℓ,t} = (T_ℓ + 2 − 2t)/T_ℓ → b_{ℓ,t} = (T_ℓ + 1 − 2t)/T_ℓ (bl); reason: the printed value is false: d_x = d_u = 0, σ²_ε = 1, ℓ = 0, N = 2, T = 2, A = (1, 2) satisfies every hypothesis, the true trace is 1 and the printed formula gives −1; the corrected value is the one of the display closing the proof on p. ec20 and of Example 3.2
  • correction: f_{j,X}(Z) = Σ_k (ω^{x_k}{j:j_ℓ})⊤ P{1_{T_ℓ}} ω^{x_k}{j:j_ℓ} with ω^{x_k}t = (1/N) Σ_i X_ik z_it → f{j,X}(Z) = (1/N) z{j:j_ℓ}⊤ (P_{1_{T_ℓ}} ⊗ H_X) z_{j:j_ℓ}, H_X the orthogonal projector onto col X (fXj); reason: the printed term is false unless X⊤X = N·I: ℓ = 0, d_u = 0, σ²_ε = 1, N = 4, T = 2, X = (2, −2, 1, −1)⊤ (centred), A = (1, 2, ∞, 2) gives true trace 0.2 and printed −2.5; the corrected term is the analogue of the printed U-term and reduces to the printed one when X⊤X = N·I
  • encoding: H_X (no formula on the page) → (1/N) Σ_s (‖ẑ_s‖² − min_c ‖ẑ_s − Xc‖²) with ẑ_s the window-centred cross-section; reason: equals z⊤(P ⊗ H_X)z without a pseudo-inverse and without a rank condition on X
  • encoding: M_U = P_{1_{T_ℓ}} ⊗ U(I + U⊤U)⁻¹U⊤ as a Kronecker product → the blockwise double sum Σ_{s,s'} (P_{1_{T_ℓ}}){ss'} z{j+s}⊤ U(I + U⊤U)⁻¹U⊤ z_{j+s'}; reason: the same quadratic form written block by block
  • generalization: Prec(τ̂; A) from (EC.2.2), with nuisance matrix Γ normalized by α_{N−p+1:N} = 0 → Σ_j min_γ of the Σ_e⁻¹-weighted residual sum of squares of the lag-j column on all N unit dummies and the per-period columns [1, X] (traceT); reason: same column span as Γ, so the same value whenever (EC.2.2) is defined; also defined (as the trace of the Fisher information of τ) when Γ⊤Σ_e⁻¹Γ is singular or the design makes Var(τ̂) singular
  • encoding: Assumptions 2.1, 2.2, 3.1 and the random model (3.1) with infeasible GLS weight W ∝ (UΣ_vU⊤ + σ²_ε I_N)⁻¹ → a design A : Fin N → WithTop (Fin T) with z_it = ±1 by A_i ≤ t (irreversible adoption, known ℓ) and the precision computed with Σ_e = I ⊗ Ψ, Ψ = UΣ_vU⊤ + σ²_ε I_N; reason: these are the only ways the assumptions enter tr Prec(τ̂) ((EC.2.1), Remark 3.2); the Gauss–Markov/Aitken theorem (VectorSpaceOpt.gauss_markov) gives Var of GLS = (W⊤Σ⁻¹W)⁻¹, and the proportionality constant of W does not change the estimator
  • encoding: periods 1, …, T and adoption time ∞ → Fin T (0-based: period t is index t − 1) and ⊤ of WithTop (Fin T); reason: Lean convention; same instances, and ⊤ keeps 'larger = later' (footnote 6)
  • encoding: σ²_ε a variance, Ψ⁻¹ used as GLS weight → hypothesis 0 < σ²_ε; reason: excludes only the case where Ψ need not be invertible and the infeasible GLS weight is undefined
  • encoding: Σ_v = σ²_ε · I_{d_u} → a matrix parameter Sv with hypothesis Sv = σ²_ε • 1; reason: same instances
  • encoding: Σ_i X_i = 0_{d_x}, Σ_i u_i = 0_{d_u}, Σ_i X_i u_i⊤ = 0_{d_x×d_u} → ∀ k, Σ_i X i k = 0; ∀ k, Σ_i U i k = 0; Xᵀ * U = 0; reason: same conditions, coordinatewise
  • generalization: T_ℓ = T − ℓ ≥ 1 implicit → any T; for T ≤ ℓ both sides are empty sums equal to 0; reason: specializes to the page's claim for T > ℓ
Preamble
import Mathlib
import Definitions.Def_StaggeredRollout_TOpt_Setting
import Definitions.Def_StaggeredRollout_TOpt_Quadratic
Formal statement
namespace StaggeredRollout.TOpt
open Matrix

theorem lemma_EC_1_2 (N T ℓ dx du : ℕ) (sig2 : ℝ) (hsig : 0 < sig2)
    (X : Matrix (Fin N) (Fin dx) ℝ) (U : Matrix (Fin N) (Fin du) ℝ)
    (Sv : Matrix (Fin du) (Fin du) ℝ)
    (hXc : ∀ k, ∑ i, X i k = 0) (hUc : ∀ k, ∑ i, U i k = 0) (hXU : Xᵀ * U = 0)
    (hSv : Sv = sig2 • (1 : Matrix (Fin du) (Fin du) ℝ))
    (A : Fin N → WithTop (Fin T)) :
    traceT ℓ sig2 X U Sv A
      = -((N : ℝ) / sig2) * ∑ j : Fin (ℓ + 1),
          (f1j ℓ T (omegaBar (z A)) j + fXj ℓ X (z A) j + fUj ℓ U (z A) j) := by sorry

end StaggeredRollout.TOpt
Source
Xiong, Athey, Bayati, Imbens, Optimal Experimental Design for Staggered Rollouts, arXiv:1911.03764v6, p. ec12 (PDF 48), Lemma EC.1.2, (EC.1.7); corrected b_ℓ from p. ec20 (closing display of the proof) and Example 3.2
Human review
  • Endorsed by Shuze Chen · Oct 23, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 23, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me