proofs
Provedunbiased-attentionchi-squarereview-response

Range bound for second moments: if every x_j lies in [a,b] with a > 0, then 4ab·(Σw)(Σw x²) ≤ (a+b)²(Σw x)² for nonnegative weights w

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 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}, ∀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})}} 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

4a⋅b⋅((∑jw(j))⋅∑jw(j)⋅x(j)2)≤(a+b)2⋅(∑jw(j)⋅x(j))2\begin{aligned} & \htmlData{mx=19}{\htmlData{mx=4}{\htmlData{mx=2}{4\htmlData{mx=1}{a}} \cdot \htmlData{mx=3}{b}} \cdot \left(\htmlData{mx=18}{\left(\htmlData{mx=8}{\sum_{j} \htmlData{mx=7}{\htmlData{mx=5}{w}(\htmlData{mx=6}{j})}}\right) \cdot \htmlData{mx=17}{\sum_{j} \htmlData{mx=16}{\htmlData{mx=11}{\htmlData{mx=9}{w}(\htmlData{mx=10}{j})} \cdot \htmlData{mx=15}{\htmlData{mx=14}{\htmlData{mx=12}{x}(\htmlData{mx=13}{j})}^{2}}}}}\right)} \\ & \quad \htmlData{mx=0}{\leq} \htmlData{mx=33}{\htmlData{mx=23}{(\htmlData{mx=22}{\htmlData{mx=20}{a} + \htmlData{mx=21}{b}})^{2}} \cdot \htmlData{mx=32}{\left(\htmlData{mx=31}{\sum_{j} \htmlData{mx=30}{\htmlData{mx=26}{\htmlData{mx=24}{w}(\htmlData{mx=25}{j})} \cdot \htmlData{mx=29}{\htmlData{mx=27}{x}(\htmlData{mx=28}{j})}}}\right)^{2}}} \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 : ℝ))
<Less than
0 is strictly smaller than a. (0 < a)
≤At most
a is less than or equal to b. (a ≤ b)
∀For all
The statement after the comma holds for every j. (∀ j, 0 ≤ w j)
·Multiplication
4 times a. (4 * a)
RReal numbers
The real numbers: every point on the number line. (ℝ)
∧And
Both hold: a ≤ x(j), and x(j) ≤ b. (a ≤ x j ∧ x j ≤ b)
∑Summation
Add up w(j) for every j. (∑ j, w j)
aᵇPower
x(j) raised to the power 2. (x j ^ 2)
+Addition
a plus b. (a + b)

A Kantorovich-type bounded-ratio inequality: Σw(x−a)(x−b) ≤ 0 gives Σwx² ≤ (a+b)Σwx − abΣw, and the square ((a+b)μ − 2abW)² ≥ 0 finishes. It is the engine of the cosh² bounds for uniform proposals and for drift. Classical-type; added after an external review (2026-10-05) pointed out that the e^R bound can be sharpened.

How it was proved

Proved
5 October 2026
By
Ajax, with the agent “Baguette math & proofs (Claude Code, 2026-10-03)”
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
24 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements