proofs
Provedsampleability-lawadaptive-exactnessunbiasedpitfall

Selection bias when the decision reuses the estimate's own samples: for X uniform on {0,1} (E[X] = 1/2), the output 'θ if X > θ else X' has mean 1/4

(∑b∈Bool⁡12⋅({1if b0otherwise)=12)∧(∑b∈Bool⁡12⋅({12if ({1if b0otherwise)>12{1if b0otherwiseotherwise)=14)\begin{aligned} & \left(\htmlData{mx=8}{\sum_{b \in \htmlData{mx=1}{\operatorname{Bool}}} \htmlData{mx=7}{\htmlData{mx=3}{\htmlData{mx=2}{\frac{1}{2}}} \cdot \left(\htmlData{mx=6}{\begin{cases} \htmlData{mx=4}{1} & \text{if } \htmlData{mx=5}{b} \\ 0 & \text{otherwise} \end{cases}}\right)}} \mathrel{\htmlData{mx=10}{=}} \htmlData{mx=9}{\frac{1}{2}}\right) \\ & \htmlData{mx=0}{\land} \left(\right. \htmlData{mx=26}{\sum_{b \in \htmlData{mx=12}{\operatorname{Bool}}} \htmlData{mx=25}{\htmlData{mx=14}{\htmlData{mx=13}{\frac{1}{2}}} \cdot \left(\htmlData{mx=24}{\begin{cases} \htmlData{mx=15}{\frac{1}{2}} & \text{if } \left(\htmlData{mx=18}{\begin{cases} \htmlData{mx=16}{1} & \text{if } \htmlData{mx=17}{b} \\ 0 & \text{otherwise} \end{cases}}\right) \mathrel{\htmlData{mx=20}{>}} \htmlData{mx=19}{\frac{1}{2}} \\ \htmlData{mx=23}{\begin{cases} \htmlData{mx=21}{1} & \text{if } \htmlData{mx=22}{b} \\ 0 & \text{otherwise} \end{cases}} & \text{otherwise} \end{cases}}\right)}} \\ & \quad \htmlData{mx=11}{=} \htmlData{mx=27}{\frac{1}{4}} \left.\right) \end{aligned}
What the notation means · or point at any symbol
∧And
Both hold: (∑ b, 1/2 · 1 if b, else 0) = 1/2, and (∑ b, 1/2 · 1/2 if 1 if b, else 0 > 1/2, else 1 if b, else…. ((∑ b : Bool, (1 / 2 : ℝ) * (if b then (…)
∑Summation
Add up 1/2 · 1 if b, else 0 for every b in Bool. (∑ b : Bool, (1 / 2 : ℝ) * (if b then (1…)
=Equality
∑ b, 1/2 · 1 if b, else 0 and 1/2 are the same. (∑ b : Bool, (1 / 2 : ℝ) * (if b then (1…)
Bool
Bool: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Bool)
(x : T)As real numbers
1/2 read as an element of real numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. ((1 / 2 : ℝ))
·Multiplication
1/2 times 1 if b, else 0. ((1 / 2 : ℝ) * (if b then (1 : ℝ) else 0))
a/bDivision
1 divided by 2. In Lean, dividing by 0 gives 0. (1 / 2)
{ a if c; b otherwiseCases (if … then … else)
1 when b, and 0 otherwise. (if b then (1 : ℝ) else 0)
>Greater than
1 if b, else 0 is strictly larger than 1/2. ((if b then (1 : ℝ) else 0) > 1 / 2)

Counterexample to reusing the same draws for the exact-or-sampled decision and for the estimate: the switched output is biased even though both branches are unbiased on their own. Adaptive exactness must use an independent pilot (or sample splitting). 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
13 lines of Lean
Sign in to see the proofThe proof, its signed report and its history.

More proved statements