Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

A finite conditional-average bound for constant weighted magnitude

Proved
NarrowDNF.HatamiResidual.conditional_abs_le_card_mul

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

combinatoricsnarrow-dnf-authors-importprobabilitystoc-2027

Let AAA be finite, BBB any type with decidable equality, and φ:A→B\varphi:A\to Bφ:A→B a label map. Let w:A→Rw:A\to\mathbb Rw:A→R be strictly positive and F:A→RF:A\to\mathbb RF:A→R. Suppose there is a constant C∈RC\in\mathbb RC∈R such that w(a)∣F(a)∣=Cw(a)|F(a)|=Cw(a)∣F(a)∣=C for every aaa. Then for every x∈Ax\in Ax∈A,

∣∑φ(a)=φ(x)w(a)F(a)∑φ(a)=φ(x)w(a)∣≤∣A∣ ∣F(x)∣.\left|\frac{\sum_{\varphi(a)=\varphi(x)}w(a)F(a)}{\sum_{\varphi(a)=\varphi(x)}w(a)}\right|\le|A|\,|F(x)|.​∑φ(a)=φ(x)​w(a)∑φ(a)=φ(x)​w(a)F(a)​​≤∣A∣∣F(x)∣.

This controls conditional magnitudes without assuming a uniform underlying distribution or a finite label space.

Preamble
import Mathlib.Algebra.BigOperators.Group.Finset.Basic
import Mathlib.Algebra.BigOperators.GroupWithZero.Finset
import Mathlib.Algebra.BigOperators.Ring.Finset
import Mathlib.Algebra.Order.BigOperators.Group.Finset
import Mathlib.Algebra.Order.BigOperators.Ring.Finset
import Mathlib.Analysis.SpecialFunctions.Log.Basic
import Mathlib.Analysis.SpecialFunctions.Pow.Real
import Mathlib.Analysis.SpecialFunctions.Sqrt
import Mathlib.Data.Bool.Basic
import Mathlib.Data.Finset.Card
import Mathlib.Data.Finset.Image
import Mathlib.Data.Finset.Insert
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
import Mathlib.Tactic.FieldSimp
import Mathlib.Tactic.GCongr
import Mathlib.Tactic.Linarith
import Mathlib.Tactic.Positivity
import Mathlib.Tactic.Ring
import Definitions.Def_NarrowDNF_Adaptive
import Definitions.Def_NarrowDNF_Certificates
import Definitions.Def_NarrowDNF_ConditionalExpectation
import Definitions.Def_NarrowDNF_CoordinateShift
import Definitions.Def_NarrowDNF_Fourier
import Definitions.Def_NarrowDNF_HatamiActivation
import Definitions.Def_NarrowDNF_Influence
import Definitions.Def_NarrowDNF_LoadTransport
import Definitions.Def_NarrowDNF_ProductMeasure

namespace NarrowDNF
end NarrowDNF

namespace NarrowDNF.Activation
end NarrowDNF.Activation

namespace NarrowDNF.ConditionalExpectation
end NarrowDNF.ConditionalExpectation

namespace NarrowDNF.FiberShift
end NarrowDNF.FiberShift

namespace NarrowDNF.Fourier
end NarrowDNF.Fourier

namespace NarrowDNF.HatamiActivation
end NarrowDNF.HatamiActivation

namespace NarrowDNF.HatamiResidual
end NarrowDNF.HatamiResidual

namespace NarrowDNF.Influence
end NarrowDNF.Influence

namespace NarrowDNF.ProductMeasure
end NarrowDNF.ProductMeasure
noncomputable section
open scoped BigOperators
open NarrowDNF
open NarrowDNF.HatamiResidual
open ProductMeasure
attribute [local instance] Classical.propDecidable
variable {ι : Type*} [Fintype ι] [DecidableEq ι]
section GenericBound
variable {α β : Type*} [Fintype α] [Fintype β] [DecidableEq β]
omit [Fintype β]
Formal statement
theorem NarrowDNF.HatamiResidual.conditional_abs_le_card_mul (φ : α → β) (w F : α → ℝ)
    (hw : ∀ a, 0 < w a) (C : ℝ) (hC : ∀ a, w a * |F a| = C) (x : α) :
    |ConditionalExpectation.conditional φ w F x| ≤ (Fintype.card α : ℝ) * |F x| := by sorry
Source
https://github.com/liuchliuch/narrow-dnf-lean/blob/eecadd6a5ea0a331d6cf9fd5cb39fc6ec854b372/NarrowDNF/HatamiResidual.lean#L269-L300

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