proofs
Provedcertified-residual-attentionsharp-boundsecond-moment

Sharp finite positive-weight moment ratio: E[X²]/E[X]² ≤ (a+b)²/(4ab)

For all J∈Type⁡\htmlData{mx=1}{J \in \htmlData{mx=0}{\operatorname{Type}}}, w,x:J→R\htmlData{mx=3}{w, x : \htmlData{mx=0}{J} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}} and a,b∈R\htmlData{mx=1}{a, b \in \htmlData{mx=0}{\mathbb{R}}}, if ∀j, 0≤w(j)\htmlData{mx=4}{\forall j,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{j})}}, ∑jw(j)=1\htmlData{mx=3}{\sum_{j} \htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{j})}} \mathrel{\htmlData{mx=4}{=}} 1, 0<a0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{a}, a≤b\htmlData{mx=0}{a} \mathrel{\htmlData{mx=2}{\leq}} \htmlData{mx=1}{b} and ∀j, a≤x(j)∧x(j)≤b\htmlData{mx=11}{\forall j,\ \htmlData{mx=0}{a} \mathrel{\htmlData{mx=4}{\leq}} \htmlData{mx=3}{\htmlData{mx=1}{x}(\htmlData{mx=2}{j})} \mathbin{\htmlData{mx=10}{\land}} \htmlData{mx=7}{\htmlData{mx=5}{x}(\htmlData{mx=6}{j})} \mathrel{\htmlData{mx=9}{\leq}} \htmlData{mx=8}{b}} (given Fintype⁡ J\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fintype}}\,\htmlData{mx=1}{J}}), then

∑jw(j)⋅x(j)2(∑jw(j)⋅x(j))2≤(a+b)24a⋅b\begin{aligned} & \htmlData{mx=19}{\frac{\htmlData{mx=9}{\sum_{j} \htmlData{mx=8}{\htmlData{mx=3}{\htmlData{mx=1}{w}(\htmlData{mx=2}{j})} \cdot \htmlData{mx=7}{\htmlData{mx=6}{\htmlData{mx=4}{x}(\htmlData{mx=5}{j})}^{2}}}}}{\htmlData{mx=18}{\left(\htmlData{mx=17}{\sum_{j} \htmlData{mx=16}{\htmlData{mx=12}{\htmlData{mx=10}{w}(\htmlData{mx=11}{j})} \cdot \htmlData{mx=15}{\htmlData{mx=13}{x}(\htmlData{mx=14}{j})}}}\right)^{2}}}} \\ & \quad \htmlData{mx=0}{\leq} \htmlData{mx=28}{\frac{\htmlData{mx=23}{(\htmlData{mx=22}{\htmlData{mx=20}{a} + \htmlData{mx=21}{b}})^{2}}}{\htmlData{mx=27}{\htmlData{mx=25}{4\htmlData{mx=24}{a}} \cdot \htmlData{mx=26}{b}}}} \end{aligned}
What the notation means · or point at any symbol
Type
Type: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Type)
Fintype
Fintype: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Fintype)
f(x)Function application
Fintype applied to J. Lean writes f x; papers write f(x). (Fintype J)
⟹Implies
If J, then ℝ. (Between types, A → B is the type of functions from A to B.) (J → ℝ)
x : TVariables
w, x range over J → ℝ: the statement must hold for every choice. ((w x : J → ℝ))
x ∈ TVariables
a, b range over real numbers: the statement must hold for every choice. ((a b : ℝ))
∀For all
The statement after the comma holds for every j. (∀ j, 0 ≤ w j)
∑Summation
Add up w(j) for every j. (∑ j, w j)
=Equality
∑ j, w(j) and 1 are the same. (∑ j, w j = 1)
<Less than
0 is strictly smaller than a. (0 < a)
a/bDivision
∑ j, w(j) · x(j)^2 divided by (∑ j, w(j) · x(j))^2. In Lean, dividing by 0 gives 0. ((∑ j, w j * x j ^ 2) / (∑ j, w j * x j)…)
RReal numbers
The real numbers: every point on the number line. (ℝ)
≤At most
0 is less than or equal to w(j). (0 ≤ w j)
∧And
Both hold: a ≤ x(j), and x(j) ≤ b. (a ≤ x j ∧ x j ≤ b)
·Multiplication
w(j) times x(j)^2. (w j * x j ^ 2)
aᵇPower
x(j) raised to the power 2. (x j ^ 2)
+Addition
a plus b. (a + b)

For a finite probability space w and a positive variable a≤x≤b, prove the sharp bounded-moment ratio. This classical-type inequality sharpens the proposal variance factor under bounded score oscillation; it is not claimed as a new general inequality. The exponential/softmax instantiation is a separate result.

How it was proved

Proved
5 October 2026
By
Ajax
Checked by
Lean's kernel (Lean 4.33.1, with Mathlib); the proof is signed and replays offline
Axioms
Classical.choice, Quot.sound, propext
Proof
48 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements