Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A uniform average of a function of one factor is the uniform average over that factor

Proved
MIPRE.avg_comp_equiv_fst

by thomasvidick · Oct 17, 2026 · Mathlib 0df444a (Lean v4.33.1)

mip-remipre-formalizationverifiers

A statement of the module MIPRE.Foundations.Blocks of the MIP* = RE formalization (commit 70cbf1c of vidick/MIPRE-formalization). Summing over assignments to a block-decomposed index type. A construction that reads only some coordinates of a uniformly random point needs to know that those coordinates are themselves uniform, and independent of the rest. In the form a sum identity takes, that is: when the index type is a sum, summing a function of the blocks' assignments over all assignments to the whole gives the iterated sum over the blocks --- once per assignment of whatever block the function ignores. * sum_arrow_pair --- both blocks, which is the product measure written as an iterated sum; * sum_arrow_inl --- the…

A uniform average of a function of one factor is the uniform average over that factor.

Formal statement. In Lean, with the scope shown:

open MIPRE
open Finset
variable {α β F M : Type*} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] [Fintype F]
variable {α β γ : Type*} [Fintype α] [Fintype β] [Fintype γ] [Nonempty α] [Nonempty γ]

theorem MIPRE.avg_comp_equiv_fst (e : α ≃ β × γ) (f : β → ℝ) :
    ∑ a : α, (Fintype.card α : ℝ)⁻¹ * f (e a).1 = ∑ b : β, (Fintype.card β : ℝ)⁻¹ * f b

Formalization Note MIPRE.avg_comp_equiv_fst is declared in MIPRE/Foundations/Blocks.lean, lines 170–185. The binders, hypotheses and conclusion are exactly those of the Lean statement above; the uploaded statement elaborates to the same type as the declaration in the repository. The definitions it mentions are those of the published definition bundles of the module's import closure.

Preamble
import Mathlib.Algebra.BigOperators.Group.Finset.Basic
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Fintype.Pi
import Mathlib.Data.Fintype.Prod
import Mathlib.Data.Fintype.Sum
import Mathlib.Data.Real.Basic
import Mathlib.Logic.Equiv.Basic
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.Ring
import Definitions.Def_MIPRE_Foundations_Blocks

open MIPRE
open Finset
variable {α β F M : Type*} [Fintype α] [DecidableEq α] [Fintype β] [DecidableEq β] [Fintype F]
  [AddCommMonoid M]
variable {α β γ : Type*} [Fintype α] [Fintype β] [Fintype γ] [Nonempty α] [Nonempty γ]
Formal statement
theorem MIPRE.avg_comp_equiv_fst (e : α ≃ β × γ) (f : β → ℝ) :
    ∑ a : α, (Fintype.card α : ℝ)⁻¹ * f (e a).1 = ∑ b : β, (Fintype.card β : ℝ)⁻¹ * f b := by sorry
Source
https://github.com/vidick/MIPRE-formalization/blob/70cbf1c52e3d5e1dff1162fdf952c9a9f4bd99ed/MIPRE/Foundations/Blocks.lean#L170-L185; blueprint lem:qld-padded-lines

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