Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

§3.3, p. 10 — the partial derivative ∂F/∂w_j of the multilinear extension is E[h(Z)|Z_j = 1] − E[h(Z)|Z_j = 0]

Proved
DiffNeighbors.Bias.first_partial

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

differences-in-neighborsmultilinear-extensionp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-strengthenedp2o-v1partial-derivative

Let h:{0,1}N→Rh : \{0,1\}^N \to \mathbb Rh:{0,1}N→R and let

F(w)=∑z∈{0,1}N(∏l(zlwl+(1−zl)(1−wl)))h(z),w∈RN,F(w) = \sum_{z \in \{0,1\}^N} \Bigl(\prod_{l} \bigl(z_l w_l + (1 - z_l)(1 - w_l)\bigr)\Bigr) h(z), \qquad w \in \mathbb R^N,F(w)=z∈{0,1}N∑​(l∏​(zl​wl​+(1−zl​)(1−wl​)))h(z),w∈RN,

be its multilinear extension, which for w∈[0,1]Nw \in [0,1]^Nw∈[0,1]N is Ew[h(Z)]\mathbb E_w[h(Z)]Ew​[h(Z)] with independent Zl∼Bernoulli(wl)Z_l \sim \mathrm{Bernoulli}(w_l)Zl​∼Bernoulli(wl​). For every coordinate jjj and every www,

∂F∂wj(w)=Ew[h(Z)∣Zj=1]−Ew[h(Z)∣Zj=0],\frac{\partial F}{\partial w_j}(w) = \mathbb E_w[h(Z) \mid Z_j = 1] - \mathbb E_w[h(Z) \mid Z_j = 0],∂wj​∂F​(w)=Ew​[h(Z)∣Zj​=1]−Ew​[h(Z)∣Zj​=0],

where Ew[h(Z)∣Zj=b]\mathbb E_w[h(Z) \mid Z_j = b]Ew​[h(Z)∣Zj​=b] is the multilinear extension, at www, of z↦h(z with zj:=b)z \mapsto h(z \text{ with } z_j := b)z↦h(z with zj​:=b).

In the proof of Theorem 1 this is applied to h=fi1h = f^1_ih=fi1​ (and fi0f^0_ifi0​): it identifies the gradient term of the first-order Taylor approximation of F1(1)F^1(1)F1(1) around F1(p)F^1(p)F1(p).

Formalization Note The partial derivative is stated as HasDerivAt of t↦F(w with wj:=t)t \mapsto F(w \text{ with } w_j := t)t↦F(w with wj​:=t) at t=wjt = w_jt=wj​.

Differences from the source:

  • generalization: F¹ of node i, a function of the |N_i| neighbour treatments → the multilinear extension of any h : {0,1}^ι → ℝ, at any w ∈ ℝ^ι, for any coordinate j; reason: specializes with h = condOutcome f i true, which under Assumption 1 depends only on z_{N_i}, so its extension is the paper's F¹
  • encoding: ∂F/∂w_j and E[f¹(Z)|Z_j = b] → HasDerivAt of t ↦ mlExt h (update w j t) at w j, with value mlExt (h ∘ update · j true) w − mlExt (h ∘ update · j false) w; reason: the partial derivative of F in its j-th coordinate; conditioning on Z_j = b sets z_j := b by independence
  • encoding: units [N] = {1,…,N}, treatment vectors z ∈ {0,1}^N, an undirected graph without self-loops, d = max_i |N_i| → a finite type ι with N = card ι, z : ι → Bool with 1/0 read through ind, G : SimpleGraph ι, N_i = G.neighborFinset i, d = G.maxDegree; reason: a simple graph is exactly an undirected graph without self-loops; same instances
Preamble
import Mathlib
import Definitions.Def_DiffNeighbors_Bias_Model
Formal statement
namespace DiffNeighbors.Bias

open Finset

/-- **First partial derivative of the multilinear extension**, §3.3, p. 10:
`∂F/∂w_j (w) = E_w[h(Z) | Z_j = 1] − E_w[h(Z) | Z_j = 0]`, where `E_w` is the expectation under
independent Bernoulli(`w_l`) coordinates. -/
theorem first_partial {ι : Type*} [Fintype ι] [DecidableEq ι] (h : (ι → Bool) → ℝ) (w : ι → ℝ)
    (j : ι) :
    HasDerivAt (fun t => mlExt h (Function.update w j t))
      (mlExt (fun z => h (Function.update z j true)) w
        - mlExt (fun z => h (Function.update z j false)) w) (w j) := by sorry

end DiffNeighbors.Bias
Source
Peng, Ye, Zheng, Differences-in-Neighbors for Network Interference in Experiments, arXiv:2503.02271v1, p. 10, §3.3 (proof of Theorem 1), display '∂F¹/∂w_j = … = E[f¹(Z)|Z_j = 1] − E[f¹(Z)|Z_j = 0]'
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