Provedsampleability-lawself-certifying-proposalimportance-samplingattention-compute-law
Sampleability loop 3: the certificate's variance is Σπ⁴/r³ − (Σπ²/r)² (variance of (π/r)² under a proposal r)
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
- π, r range over J → ℝ: the statement must hold for every choice. (
(π r : J → ℝ)) - ∀For all
- The statement after the comma holds for every j. (
∀ j, 0 < r j) - ∑Summation
- Add up r(j) for every j. (
∑ j, r j) - =Equality
- ∑ j, r(j) and 1 are the same. (
∑ j, r j = 1) - RReal numbers
- The real numbers: every point on the number line. (
ℝ) - <Less than
- 0 is strictly smaller than r(j). (
0 < r j) - ·Multiplication
- r(j) times ((π(j)/r(j))^2 − (∑ k, π(k)^2/r(k)))^2. (
r j * ((π j / r j) ^ 2 - ∑ k, π k ^ 2 /…) - aᵇPower
- π(j)/r(j) raised to the power 2. (
(π j / r j) ^ 2) - -Subtraction
- (π(j)/r(j))^2 minus ∑ k, π(k)^2/r(k). On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (
(π j / r j) ^ 2 - ∑ k, π k ^ 2 / r k) - πPi
- The ratio of a circle's circumference to its diameter, ≈ 3.14159. (
π) - a/bDivision
- π(j) divided by r(j). In Lean, dividing by 0 gives 0. (
π j / r j)
theorem sl-certificate-variance-identity {J : Type} [Fintype J] (π r : J → ℝ) (hr : ∀ j, 0 < r j) (hrs : ∑ j, r j = 1) :
∑ j, r j * ((π j / r j) ^ 2 - ∑ k, π k ^ 2 / r k) ^ 2 = ∑ j, π j ^ 4 / r j ^ 3 - (∑ j, π j ^ 2 / r j) ^ 2The self-certificate is a sample mean of (π/r)² under r; its variance is the centred fourth-moment expression. Reliability of the certificate reduces to controlling Σπ⁴/r³. Part of 'The Sampleability Law: a transformer can be trained to make its own attention cheap to sample, and the samples certify the saving' (self-certifying learned proposals inside the Attention Compute Law).
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
- 16 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.