proofs
Provedproposal-principleattentionunifiedprinciple

Positive-feature proposals are sampleable mixtures: feature c ∝ φ_c(q)·S_c then key ∝ ψ_c(j) gives P(j) = ⟨φ(q),ψ(j)⟩ / Σ_j' ⟨φ(q),ψ(j')⟩

For all r,n∈N\htmlData{mx=1}{r, n \in \htmlData{mx=0}{\mathbb{N}}}, φ:Fin⁡ r→R\htmlData{mx=5}{\varphi : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{r}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}}, ψ:Fin⁡ r→Fin⁡ n→R\htmlData{mx=9}{\psi : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{r}} \mathrel{\htmlData{mx=8}{\to}} \htmlData{mx=5}{\htmlData{mx=3}{\operatorname{Fin}}\,\htmlData{mx=4}{n}} \mathrel{\htmlData{mx=7}{\to}} \htmlData{mx=6}{\mathbb{R}}} and j∈Fin⁡ n\htmlData{mx=3}{j \in \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}}}, if ∀c, 0<φ(c)\htmlData{mx=4}{\forall c,\ 0 \mathrel{\htmlData{mx=3}{<}} \htmlData{mx=2}{\htmlData{mx=0}{\varphi}(\htmlData{mx=1}{c})}}, ∀c,i, 0<ψ(c,i)\htmlData{mx=5}{\forall c, i,\ 0 \mathrel{\htmlData{mx=4}{<}} \htmlData{mx=3}{\htmlData{mx=0}{\psi}(\htmlData{mx=1}{c}, \htmlData{mx=2}{i})}}, 0<n0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{n} and 0<r0 \mathrel{\htmlData{mx=1}{<}} \htmlData{mx=0}{r}, then

∑cφ(c)⋅(∑iψ(c,i))∑c′φ(c′)⋅(∑iψ(c′,i))⋅(ψ(c,j)∑iψ(c,i))=∑cφ(c)⋅ψ(c,j)∑i∑cφ(c)⋅ψ(c,i)\begin{aligned} & \htmlData{mx=32}{\sum_{c} \htmlData{mx=31}{\htmlData{mx=20}{\frac{\htmlData{mx=9}{\htmlData{mx=3}{\htmlData{mx=1}{\varphi}(\htmlData{mx=2}{c})} \cdot \left(\htmlData{mx=8}{\sum_{i} \htmlData{mx=7}{\htmlData{mx=4}{\psi}(\htmlData{mx=5}{c}, \htmlData{mx=6}{i})}}\right)}}{\htmlData{mx=19}{\sum_{c'} \htmlData{mx=18}{\htmlData{mx=12}{\htmlData{mx=10}{\varphi}(\htmlData{mx=11}{c'})} \cdot \left(\htmlData{mx=17}{\sum_{i} \htmlData{mx=16}{\htmlData{mx=13}{\psi}(\htmlData{mx=14}{c'}, \htmlData{mx=15}{i})}}\right)}}}} \cdot \left(\htmlData{mx=30}{\frac{\htmlData{mx=24}{\htmlData{mx=21}{\psi}(\htmlData{mx=22}{c}, \htmlData{mx=23}{j})}}{\htmlData{mx=29}{\sum_{i} \htmlData{mx=28}{\htmlData{mx=25}{\psi}(\htmlData{mx=26}{c}, \htmlData{mx=27}{i})}}}}\right)}} \\ & \quad \htmlData{mx=0}{=} \htmlData{mx=52}{\frac{\htmlData{mx=41}{\sum_{c} \htmlData{mx=40}{\htmlData{mx=35}{\htmlData{mx=33}{\varphi}(\htmlData{mx=34}{c})} \cdot \htmlData{mx=39}{\htmlData{mx=36}{\psi}(\htmlData{mx=37}{c}, \htmlData{mx=38}{j})}}}}{\htmlData{mx=51}{\sum_{i} \htmlData{mx=50}{\sum_{c} \htmlData{mx=49}{\htmlData{mx=44}{\htmlData{mx=42}{\varphi}(\htmlData{mx=43}{c})} \cdot \htmlData{mx=48}{\htmlData{mx=45}{\psi}(\htmlData{mx=46}{c}, \htmlData{mx=47}{i})}}}}}} \end{aligned}
What the notation means · or point at any symbol
NNatural numbers
The natural numbers 0, 1, 2, …. In Lean they start at 0. (ℕ)
x ∈ TVariables
r, n range over natural numbers: the statement must hold for every choice. ((r n : ℕ))
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 r. Lean writes f x; papers write f(x). (Fin r)
⟹Implies
If Fin(r), then ℝ. (Between types, A → B is the type of functions from A to B.) (Fin r → ℝ)
∀For all
The statement after the comma holds for every c. (∀ c, 0 < φ c)
=Equality
∑ c, φ(c) · (∑ i, ψ(c, i))/(∑ c', φ(c') · (∑ i, ψ(c', i)))… and (∑ c, φ(c) · ψ(c, j))/(∑ i, ∑ c, φ(c) · ψ(c, i)) are the same. (∑ c, (φ c * (∑ i, ψ c i) / ∑ c', φ c' *…)
<Less than
0 is strictly smaller than φ(c). (0 < φ c)
·Multiplication
φ(c) times ∑ i, ψ(c, i). (φ c * (∑ i, ψ c i))
a/bDivision
φ(c) · (∑ i, ψ(c, i)) divided by ∑ c', φ(c') · (∑ i, ψ(c', i)). In Lean, dividing by 0 gives 0. (φ c * (∑ i, ψ c i) / ∑ c', φ c' * (∑ i,…)
RReal numbers
The real numbers: every point on the number line. (ℝ)
∑Summation
Add up ψ(c, i) for every i. (∑ i, ψ c i)

Places positive random-feature (Performer-style) attention inside the Proposal Principle: the feature map defines a proposal that is sampleable in O(r + log n) per draw after O(nr) preprocessing, to which exact rejection or SNIS+MLMC correction applies with cost 1 + χ² — turning a biased kernel approximation into an unbiased estimator of exact softmax attention. Part of 'The Proposal Principle: attention complexity is proposal complexity'.

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
19 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements