The finite weighted bilinear form for residual Gram estimates
DefinitionNarrowDNF_ResidualGramFor a finite index set and real-valued functions , define
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, is the corresponding weighted squared energy; with strictly positive weights it is positive definite on functions. Probability weights yield the familiar 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.
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