proofs
Provedsampleability-lawadaptive-exactnessunbiasedpitfall

Adaptive exactness is unbiased with an independent pilot: if the exact-or-sampled decision uses samples independent of the estimate, E[output] = θ whenever every branch is unbiased

For all Ω1,Ω2,D∈Type⁡\htmlData{mx=1}{\Omega_{1}, \Omega_{2}, D \in \htmlData{mx=0}{\operatorname{Type}}}, w1:Ω1→R\htmlData{mx=3}{w_{1} : \htmlData{mx=0}{\Omega_{1}} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}}, w2:Ω2→R\htmlData{mx=3}{w_{2} : \htmlData{mx=0}{\Omega_{2}} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}}, dec:Ω1→D\htmlData{mx=3}{\mathit{dec} : \htmlData{mx=0}{\Omega_{1}} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{D}}, X:D→Ω2→R\htmlData{mx=5}{X : \htmlData{mx=0}{D} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=1}{\Omega_{2}} \mathrel{\htmlData{mx=3}{\to}} \htmlData{mx=2}{\mathbb{R}}} and θ∈R\htmlData{mx=1}{\theta \in \htmlData{mx=0}{\mathbb{R}}}, if ∑xw1(x)=1\htmlData{mx=3}{\sum_{x} \htmlData{mx=2}{\htmlData{mx=0}{w_{1}}(\htmlData{mx=1}{x})}} \mathrel{\htmlData{mx=4}{=}} 1 and ∀d, ∑yw2(y)⋅X(d,y)=θ\htmlData{mx=11}{\forall d,\ \htmlData{mx=8}{\sum_{y} \htmlData{mx=7}{\htmlData{mx=2}{\htmlData{mx=0}{w_{2}}(\htmlData{mx=1}{y})} \cdot \htmlData{mx=6}{\htmlData{mx=3}{X}(\htmlData{mx=4}{d}, \htmlData{mx=5}{y})}}} \mathrel{\htmlData{mx=10}{=}} \htmlData{mx=9}{\theta}} (given Fintype⁡ Ω1\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fintype}}\,\htmlData{mx=1}{\Omega_{1}}} and Fintype⁡ Ω2\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fintype}}\,\htmlData{mx=1}{\Omega_{2}}}), then

∑x∑yw1(x)⋅w2(y)⋅X(dec(x),y)=θ\htmlData{mx=15}{\sum_{x} \htmlData{mx=14}{\sum_{y} \htmlData{mx=13}{\htmlData{mx=6}{\htmlData{mx=2}{\htmlData{mx=0}{w_{1}}(\htmlData{mx=1}{x})} \cdot \htmlData{mx=5}{\htmlData{mx=3}{w_{2}}(\htmlData{mx=4}{y})}} \cdot \htmlData{mx=12}{\htmlData{mx=7}{X}(\htmlData{mx=10}{\htmlData{mx=8}{\mathit{dec}}(\htmlData{mx=9}{x})}, \htmlData{mx=11}{y})}}}} \mathrel{\htmlData{mx=17}{=}} \htmlData{mx=16}{\theta}
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)
x ∈ TVariables
Ω₁, Ω₂, D range over Type: the statement must hold for every choice. ((Ω₁ Ω₂ D : 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 Ω₁. Lean writes f x; papers write f(x). (Fintype Ω₁)
⟹Implies
If Ω₁, then ℝ. (Between types, A → B is the type of functions from A to B.) (Ω₁ → ℝ)
∑Summation
Add up w₁(x) for every x. (∑ x, w₁ x)
=Equality
∑ x, w₁(x) and 1 are the same. (∑ x, w₁ x = 1)
∀For all
The statement after the comma holds for every d. (∀ d, ∑ y, w₂ y * X d y = θ)
RReal numbers
The real numbers: every point on the number line. (ℝ)
·Multiplication
w₂(y) times X(d, y). (w₂ y * X d y)

On the product of a pilot space and an estimate space, any decision rule computed from the pilot leaves the output unbiased provided each branch (exact, or sampled and debiased) is unbiased. This licenses per-(head, step) exactness driven by the self-certificate, as long as the certificate is computed from pilot draws separate from the estimate's draws. Part of 'The Sampleability Law' (adaptive exactness: deciding per (head, step) between exact and sampled attention without bias).

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

More proved statements