Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

The finite weighted bilinear form for residual Gram estimates

Definition
NarrowDNF_ResidualGram

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

combinatoricsnarrow-dnf-authors-importprobabilitystoc-2027

For a finite index set Ω\OmegaΩ and real-valued functions w,f,g:Ω→Rw,f,g:\Omega\to\mathbb Rw,f,g:Ω→R, define

⟨f,g⟩w=∑x∈Ωw(x)f(x)g(x).\langle f,g\rangle_w=\sum_{x\in\Omega}w(x)f(x)g(x).⟨f,g⟩w​=x∈Ω∑​w(x)f(x)g(x).

The weights are explicit inputs, so this is a finite weighted bilinear form without a normalization or sign assumption built into its definition. With nonnegative weights, ⟨f,f⟩w\langle f,f\rangle_w⟨f,f⟩w​ is the corresponding weighted squared energy; with strictly positive weights it is positive definite on functions. Probability weights yield the familiar L2L^2L2 pairing.

The residual argument uses this pairing to organize diagonal energies and correlations between distinct approximating components. It provides the algebraic vocabulary for Gram-style expansions and comparisons. Orthogonality, positivity hypotheses, and inequalities involving a particular family of residuals remain separate mathematical claims rather than consequences included in the definition itself.

Definition code
import Mathlib.Algebra.BigOperators.Ring.Finset
import Mathlib.Data.Fintype.BigOperators
import Mathlib.Data.Real.Basic
import Mathlib.Tactic.Ring

namespace NarrowDNF.ResidualGram
end NarrowDNF.ResidualGram


namespace NarrowDNF.ResidualGram
open scoped BigOperators
variable {Ω α : Type*} [Fintype Ω] [DecidableEq α]

def inner (w f g : Ω → ℝ) : ℝ := ∑ x, w x * f x * g x









end NarrowDNF.ResidualGram
Source
https://github.com/liuchliuch/narrow-dnf-lean/blob/eecadd6a5ea0a331d6cf9fd5cb39fc6ec854b372/NarrowDNF/ResidualGram.lean#L10-L10

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