Provedunbiased-attentiongradient-hardnesssampler-lower-bound
Planted gradient gap: with u = k = 1_P and plant mass p, the query-gradient covariance Σπ u k − (Σπu)(Σπk) equals p(1 − p)
For all , , and , if , then
What the notation means · or point at any symbol
- NNatural numbers
- The natural numbers 0, 1, 2, …. In Lean they start at 0. (
ℕ) - Fin
- Fin: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Fin) - f(x)Function application
- Fin applied to n. Lean writes f x; papers write f(x). (
Fin n) - ⟹Implies
- If Fin(n), then ℝ. (Between types, A → B is the type of functions from A to B.) (
Fin n → ℝ) - Finset
- Finset: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (
Finset) - ∑Summation
- Add up π(j) for each j in P. (
∑ j ∈ P, π j) - =Equality
- ∑ j, π(j) and p are the same. (
∑ j ∈ P, π j = p) - -Subtraction
- ∑ j, π(j) · (1 if j ∈ P, else 0 · 1 if j ∈ P, else 0) minus (∑ j, π(j) · 1 if j ∈ P, else 0) · (∑ j, π(j) · 1 if j ∈ P…. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
∑ j, π j * ((if j ∈ P then (1 : ℝ) else…) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - πPi
- The ratio of a circle's circumference to its diameter, ≈ 3.14159. (
π) - ·Multiplication
- 1 if j ∈ P, else 0 times 1 if j ∈ P, else 0. (
(if j ∈ P then (1 : ℝ) else 0) * (if j …) - { a if c; b otherwiseCases (if … then … else)
- 1 when j ∈ P, and 0 otherwise. (
if j ∈ P then (1 : ℝ) else 0) - ∈Element of
- j is a member of P. (
j ∈ P) - (x : T)As real numbers
- 1 read as an element of real numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. (
(1 : ℝ))
theorem ug-planted-gradient-gap {n : ℕ} (π : Fin n → ℝ) (P : Finset (Fin n)) (p : ℝ) (hp : ∑ j ∈ P, π j = p) :
∑ j, π j * ((if j ∈ P then (1 : ℝ) else 0) * (if j ∈ P then (1 : ℝ) else 0)) - (∑ j, π j * (if j ∈ P then (1 : ℝ) else 0)) * (∑ j, π j * (if j ∈ P then (1 : ℝ) else 0)) = p * (1 - p)In the planted world the gradient coordinate is the covariance p(1−p); in the unplanted world (u ≡ 0) it is 0. The planted/unplanted gap of the GRADIENT functional is therefore p(1−p), and ua-end-to-end-unbiased-sampler applies verbatim: an exactly unbiased gradient sampler needs Ω(min(n, e^R)) probes per row. Part of 'Unbiased randomized attention: cost x variance thresholds', gradient-hardness round: the unconditional sampler lower bound transferred to the query gradient.
How it was proved
- Proved
- 4 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
- 23 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.