Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite Fubini across a coordinate partition

Proved
NarrowDNF.ConditionalExpectation.expectation_merge

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, and F:{0,1}I→RF:\{0,1\}^I\to\mathbb RF:{0,1}I→R. For any coordinate set AAA, write EpA\mathbb E_p^AEpA​ for the finite sum weighted by ∏i∈Apxi(1−p)1−xi\prod_{i\in A}p^{x_i}(1-p)^{1-x_i}∏i∈A​pxi​(1−p)1−xi​. If zzz and yyy are assignments on PPP and I∖PI\setminus PI∖P, let z⊔yz\sqcup yz⊔y be their merged assignment. Then

EpIF=Ep,zP Ep,yI∖P[F(z⊔y)].\mathbb E_p^I F=\mathbb E_{p,z}^P\,\mathbb E_{p,y}^{I\setminus P}[F(z\sqcup y)].EpI​F=Ep,zP​Ep,yI∖P​[F(z⊔y)].

This is the finite product decomposition of expectation. As an identity of weighted sums, it holds for every real ppp, including outside the probability range.

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
open ProductMeasure
variable {ι : Type*} [Fintype ι] [DecidableEq ι]
Formal statement
theorem NarrowDNF.ConditionalExpectation.expectation_merge (p : ℝ) (P : ι → Prop) [DecidablePred P] (F : Cube ι → ℝ) :
    expectation p F = expectation p (fun z => expectation p (fun y => F (merge P z y))) := by sorry
Source
https://github.com/liuchliuch/narrow-dnf-lean/blob/eecadd6a5ea0a331d6cf9fd5cb39fc6ec854b372/NarrowDNF/ConditionalIndependence.lean#L13-L30

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