Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Restricting Bernoulli coordinates gives the corresponding product marginal

Proved
NarrowDNF.ProductMeasure.expectation_restrict

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

combinatoricsnarrow-dnf-authors-importprobabilitystoc-2027

Let III be finite and A⊆IA\subseteq IA⊆I. For any real ppp, use the finite product weights wp(x)=∏i(p if xi=1 else 1−p)w_p(x)=\prod_i(p\text{ if }x_i=1\text{ else }1-p)wp​(x)=∏i​(p if xi​=1 else 1−p). If F:{0,1}A→RF:\{0,1\}^A\to\mathbb RF:{0,1}A→R, then

∑x∈{0,1}Iwp(x)F(x∣A)=∑y∈{0,1}Awp(y)F(y).\sum_{x\in\{0,1\}^I}w_p(x)F(x|_A) =\sum_{y\in\{0,1\}^A}w_p(y)F(y).x∈{0,1}I∑​wp​(x)F(x∣A​)=y∈{0,1}A∑​wp​(y)F(y).

Thus an observable depending only on AAA may be averaged on that coordinate set alone. Both empty coordinate sets and arbitrary real ppp are allowed; in the probability range this is the product marginal law.

Preamble
import Mathlib.Algebra.BigOperators.Ring.Finset
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Real.Basic
import Mathlib.Logic.Equiv.Prod
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.Ring
import Definitions.Def_NarrowDNF_ProductMeasure

namespace NarrowDNF.ProductMeasure
end NarrowDNF.ProductMeasure
noncomputable section
open scoped BigOperators
open NarrowDNF
open NarrowDNF.ProductMeasure
variable {ι : Type*} [Fintype ι] [DecidableEq ι]
Formal statement
theorem NarrowDNF.ProductMeasure.expectation_restrict (p : ℝ) (P : ι → Prop) [DecidablePred P]
    (F : ({i // P i} → Bool) → ℝ) :
    expectation p (fun x : ι → Bool => F (fun i => x i)) = expectation p F := by sorry
Source
https://github.com/liuchliuch/narrow-dnf-lean/blob/eecadd6a5ea0a331d6cf9fd5cb39fc6ec854b372/NarrowDNF/ProductMeasure.lean#L276-L297

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