Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A fixed-coordinate first moment factors into marginal mass and free average

Proved
NarrowDNF.ConditionalExpectation.moment_restriction

by chenghua.liu · Nov 13, 2026 · Mathlib 0df444a (Lean v4.33.1)

combinatoricsnarrow-dnf-authors-importprobabilitystoc-2027

Let III be finite, P⊆IP\subseteq IP⊆I, p∈Rp\in\mathbb Rp∈R, F:{0,1}I→RF:\{0,1\}^I\to\mathbb RF:{0,1}I→R, and z∈{0,1}Pz\in\{0,1\}^Pz∈{0,1}P. Write wp,Aw_{p,A}wp,A​ for the product weight on coordinates AAA. The unnormalized first moment over the restriction fiber is

∑x: x∣P=zwp,I(x)F(x)=wp,P(z) Ep,yI∖P[F(z⊔y)].\sum_{x:\,x|_P=z}w_{p,I}(x)F(x)=w_{p,P}(z)\,\mathbb E_{p,y}^{I\setminus P}[F(z\sqcup y)].x:x∣P​=z∑​wp,I​(x)F(x)=wp,P​(z)Ep,yI∖P​[F(z⊔y)].

Here z⊔yz\sqcup yz⊔y merges the fixed and free assignments. Thus the fiber moment is exactly its marginal assignment weight times an average over the complementary cube. The equality is algebraic and requires no restriction on the real parameter ppp.

Preamble
import Mathlib.Algebra.BigOperators.Ring.Finset
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Data.Bool.Basic
import Mathlib.Data.Finset.Lattice.Fold
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Real.Basic
import Mathlib.Logic.Equiv.Prod
import Mathlib.Order.Monotone.Basic
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.Ring
import Definitions.Def_NarrowDNF_Adaptive
import Definitions.Def_NarrowDNF_ConditionalExpectation
import Definitions.Def_NarrowDNF_ProductMeasure

namespace NarrowDNF.ConditionalExpectation
end NarrowDNF.ConditionalExpectation

namespace NarrowDNF.ProductMeasure
end NarrowDNF.ProductMeasure
noncomputable section
open scoped BigOperators
open NarrowDNF
open NarrowDNF.ConditionalExpectation
variable {α β : Type*} [Fintype α] [Fintype β] [DecidableEq β]
section CoordinatePartition
variable {ι : Type*} [Fintype ι] [DecidableEq ι]
Formal statement
theorem NarrowDNF.ConditionalExpectation.moment_restriction (p : ℝ) (P : ι → Prop) [DecidablePred P]
    (F : Cube ι → ℝ) (z : {i // P i} → Bool) :
    moment (fun x : Cube ι => fun i : {i // P i} => x i) (ProductMeasure.weight p) F z =
      ProductMeasure.weight p z * ProductMeasure.expectation p (fun y => F (merge P z y)) := by sorry
Source
https://github.com/liuchliuch/narrow-dnf-lean/blob/eecadd6a5ea0a331d6cf9fd5cb39fc6ec854b372/NarrowDNF/ConditionalExpectation.lean#L352-L370

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