Provedcertified-residual-attentionsharp-boundsecond-moment
Sharp finite positive-weight moment ratio: E[X²]/E[X]² ≤ (a+b)²/(4ab)
For all , and , if , , , and (given ), then
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)
theorem cra-sharp-positive-moment-bound {J : Type} [Fintype J] (w x : J → ℝ) (a b : ℝ) (hw : ∀ j, 0 ≤ w j) (hws : ∑ j, w j = 1) (ha : 0 < a) (hab : a ≤ b) (hx : ∀ j, a ≤ x j ∧ x j ≤ b) :
(∑ j, w j * x j ^ 2) / (∑ j, w j * x j) ^ 2 ≤ (a + b) ^ 2 / (4 * 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.