proofs
Provedlower-boundadaptiveexpected-workheadline-theorem

Expected-probe lower bound: an adaptive sampler with a history-determined stopping time obeys |o₁−o₂|(1 − E[τ₀](k+1)/n) ≤ 2√(E[τ₀](k+1)V/n) against a random plant

For all n,k∈N\htmlData{mx=1}{n, k \in \htmlData{mx=0}{\mathbb{N}}}, Ω∈Type⁡\htmlData{mx=1}{\Omega \in \htmlData{mx=0}{\operatorname{Type}}}, w:Ω→R\htmlData{mx=3}{w : \htmlData{mx=0}{\Omega} \mathrel{\htmlData{mx=2}{\to}} \htmlData{mx=1}{\mathbb{R}}}, g:N→Ω→List⁡ R→Fin⁡ n\htmlData{mx=11}{g : \htmlData{mx=0}{\mathbb{N}} \mathrel{\htmlData{mx=10}{\to}} \htmlData{mx=1}{\Omega} \mathrel{\htmlData{mx=9}{\to}} \htmlData{mx=4}{\htmlData{mx=2}{\operatorname{List}}\,\htmlData{mx=3}{\mathbb{R}}} \mathrel{\htmlData{mx=8}{\to}} \htmlData{mx=7}{\htmlData{mx=5}{\operatorname{Fin}}\,\htmlData{mx=6}{n}}}, out:Ω→List⁡ R→R\htmlData{mx=7}{\mathit{out} : \htmlData{mx=0}{\Omega} \mathrel{\htmlData{mx=6}{\to}} \htmlData{mx=3}{\htmlData{mx=1}{\operatorname{List}}\,\htmlData{mx=2}{\mathbb{R}}} \mathrel{\htmlData{mx=5}{\to}} \htmlData{mx=4}{\mathbb{R}}}, hist:(Fin⁡ n→R)→Ω→N→List⁡ R\htmlData{mx=13}{\mathit{hist} : (\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}) \mathrel{\htmlData{mx=12}{\to}} \htmlData{mx=5}{\Omega} \mathrel{\htmlData{mx=11}{\to}} \htmlData{mx=6}{\mathbb{N}} \mathrel{\htmlData{mx=10}{\to}} \htmlData{mx=9}{\htmlData{mx=7}{\operatorname{List}}\,\htmlData{mx=8}{\mathbb{R}}}}, τ:(Fin⁡ n→R)→Ω→N\htmlData{mx=9}{\tau : (\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}) \mathrel{\htmlData{mx=8}{\to}} \htmlData{mx=5}{\Omega} \mathrel{\htmlData{mx=7}{\to}} \htmlData{mx=6}{\mathbb{N}}}, y1:Fin⁡ n→R\htmlData{mx=5}{y_{1} : \htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fin}}\,\htmlData{mx=1}{n}} \mathrel{\htmlData{mx=4}{\to}} \htmlData{mx=3}{\mathbb{R}}}, y2:Finset⁡ Fin⁡ n→Fin⁡ n→R\htmlData{mx=11}{y_{2} : \htmlData{mx=4}{\htmlData{mx=0}{\operatorname{Finset}}\,\htmlData{mx=3}{\htmlData{mx=1}{\operatorname{Fin}}\,\htmlData{mx=2}{n}}} \mathrel{\htmlData{mx=10}{\to}} \htmlData{mx=7}{\htmlData{mx=5}{\operatorname{Fin}}\,\htmlData{mx=6}{n}} \mathrel{\htmlData{mx=9}{\to}} \htmlData{mx=8}{\mathbb{R}}} and o1,o2,V∈R\htmlData{mx=1}{o_{1}, o_{2}, V \in \htmlData{mx=0}{\mathbb{R}}}, if ∀ω, 0≤w(ω)\htmlData{mx=4}{\forall \omega,\ 0 \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})}}, ∑ωw(ω)=1\htmlData{mx=3}{\sum_{\omega} \htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})}} \mathrel{\htmlData{mx=4}{=}} 1, ∀y,ω, hist(y,ω,0)=[]\htmlData{mx=6}{\forall y, \omega,\ \htmlData{mx=3}{\htmlData{mx=0}{\mathit{hist}}(\htmlData{mx=1}{y}, \htmlData{mx=2}{\omega}, 0)} \mathrel{\htmlData{mx=5}{=}} \htmlData{mx=4}{\left[ \right]}}, ∀y,ω,t, hist(y,ω,t+1)=hist(y,ω,t)++([y(g(t,ω,hist(y,ω,t)))])\htmlData{mx=26}{\forall y, \omega, t,\ \htmlData{mx=5}{\htmlData{mx=0}{\mathit{hist}}(\htmlData{mx=1}{y}, \htmlData{mx=2}{\omega}, \htmlData{mx=4}{\htmlData{mx=3}{t} + 1})} \mathrel{\htmlData{mx=25}{=}} \htmlData{mx=24}{\htmlData{mx=10}{\htmlData{mx=6}{\mathit{hist}}(\htmlData{mx=7}{y}, \htmlData{mx=8}{\omega}, \htmlData{mx=9}{t})} + \htmlData{mx=23}{\mathtt{+}(\htmlData{mx=22}{\left[ \htmlData{mx=21}{\htmlData{mx=11}{y}(\htmlData{mx=20}{\htmlData{mx=12}{g}(\htmlData{mx=13}{t}, \htmlData{mx=14}{\omega}, \htmlData{mx=19}{\htmlData{mx=15}{\mathit{hist}}(\htmlData{mx=16}{y}, \htmlData{mx=17}{\omega}, \htmlData{mx=18}{t})})})} \right]})}}}, ∀y,y′,ω, (∀t, t≤τ(y,ω)  ⟹  hist(y′,ω,t)=hist(y,ω,t))  ⟹  τ(y′,ω)=τ(y,ω)\htmlData{mx=29}{\forall y, y', \omega,\ (\htmlData{mx=18}{\forall t,\ \htmlData{mx=0}{t} \mathrel{\htmlData{mx=5}{\leq}} \htmlData{mx=4}{\htmlData{mx=1}{\tau}(\htmlData{mx=2}{y}, \htmlData{mx=3}{\omega})} \mathrel{\htmlData{mx=17}{\implies}} \htmlData{mx=10}{\htmlData{mx=6}{\mathit{hist}}(\htmlData{mx=7}{y'}, \htmlData{mx=8}{\omega}, \htmlData{mx=9}{t})} \mathrel{\htmlData{mx=16}{=}} \htmlData{mx=15}{\htmlData{mx=11}{\mathit{hist}}(\htmlData{mx=12}{y}, \htmlData{mx=13}{\omega}, \htmlData{mx=14}{t})}}) \mathrel{\htmlData{mx=28}{\implies}} \htmlData{mx=22}{\htmlData{mx=19}{\tau}(\htmlData{mx=20}{y'}, \htmlData{mx=21}{\omega})} \mathrel{\htmlData{mx=27}{=}} \htmlData{mx=26}{\htmlData{mx=23}{\tau}(\htmlData{mx=24}{y}, \htmlData{mx=25}{\omega})}}, ∀S,j, j∉S  ⟹  y2(S,j)=y1(j)\htmlData{mx=12}{\forall S, j,\ \htmlData{mx=0}{j} \mathrel{\htmlData{mx=2}{\notin}} \htmlData{mx=1}{S} \mathrel{\htmlData{mx=11}{\implies}} \htmlData{mx=6}{\htmlData{mx=3}{y_{2}}(\htmlData{mx=4}{S}, \htmlData{mx=5}{j})} \mathrel{\htmlData{mx=10}{=}} \htmlData{mx=9}{\htmlData{mx=7}{y_{1}}(\htmlData{mx=8}{j})}}, ∑ωw(ω)⋅out(ω,hist(y1,ω,τ(y1,ω)))=o1\htmlData{mx=15}{\sum_{\omega} \htmlData{mx=14}{\htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})} \cdot \htmlData{mx=13}{\htmlData{mx=3}{\mathit{out}}(\htmlData{mx=4}{\omega}, \htmlData{mx=12}{\htmlData{mx=5}{\mathit{hist}}(\htmlData{mx=6}{y_{1}}, \htmlData{mx=7}{\omega}, \htmlData{mx=11}{\htmlData{mx=8}{\tau}(\htmlData{mx=9}{y_{1}}, \htmlData{mx=10}{\omega})})})}}} \mathrel{\htmlData{mx=17}{=}} \htmlData{mx=16}{o_{1}}, ∑ωw(ω)⋅(out(ω,hist(y1,ω,τ(y1,ω)))−o1)2≤V\htmlData{mx=18}{\sum_{\omega} \htmlData{mx=17}{\htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})} \cdot \htmlData{mx=16}{(\htmlData{mx=15}{\htmlData{mx=13}{\htmlData{mx=3}{\mathit{out}}(\htmlData{mx=4}{\omega}, \htmlData{mx=12}{\htmlData{mx=5}{\mathit{hist}}(\htmlData{mx=6}{y_{1}}, \htmlData{mx=7}{\omega}, \htmlData{mx=11}{\htmlData{mx=8}{\tau}(\htmlData{mx=9}{y_{1}}, \htmlData{mx=10}{\omega})})})} - \htmlData{mx=14}{o_{1}}})^{2}}}} \mathrel{\htmlData{mx=20}{\leq}} \htmlData{mx=19}{V}, ∀S∈powersetCard⁡(k+1,univ⁡), ∑ωw(ω)⋅out(ω,hist(y2(S),ω,τ(y2(S),ω)))=o2\htmlData{mx=28}{\forall S \in \htmlData{mx=27}{\htmlData{mx=22}{\operatorname{powersetCard}}(\htmlData{mx=24}{\htmlData{mx=23}{k} + 1}, \htmlData{mx=26}{\htmlData{mx=25}{\operatorname{univ}}})},\ \htmlData{mx=19}{\sum_{\omega} \htmlData{mx=18}{\htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})} \cdot \htmlData{mx=17}{\htmlData{mx=3}{\mathit{out}}(\htmlData{mx=4}{\omega}, \htmlData{mx=16}{\htmlData{mx=5}{\mathit{hist}}(\htmlData{mx=8}{\htmlData{mx=6}{y_{2}}(\htmlData{mx=7}{S})}, \htmlData{mx=9}{\omega}, \htmlData{mx=15}{\htmlData{mx=10}{\tau}(\htmlData{mx=13}{\htmlData{mx=11}{y_{2}}(\htmlData{mx=12}{S})}, \htmlData{mx=14}{\omega})})})}}} \mathrel{\htmlData{mx=21}{=}} \htmlData{mx=20}{o_{2}}}, ∀S∈powersetCard⁡(k+1,univ⁡), ∑ωw(ω)⋅(out(ω,hist(y2(S),ω,τ(y2(S),ω)))−o2)2≤V\htmlData{mx=31}{\forall S \in \htmlData{mx=30}{\htmlData{mx=25}{\operatorname{powersetCard}}(\htmlData{mx=27}{\htmlData{mx=26}{k} + 1}, \htmlData{mx=29}{\htmlData{mx=28}{\operatorname{univ}}})},\ \htmlData{mx=22}{\sum_{\omega} \htmlData{mx=21}{\htmlData{mx=2}{\htmlData{mx=0}{w}(\htmlData{mx=1}{\omega})} \cdot \htmlData{mx=20}{(\htmlData{mx=19}{\htmlData{mx=17}{\htmlData{mx=3}{\mathit{out}}(\htmlData{mx=4}{\omega}, \htmlData{mx=16}{\htmlData{mx=5}{\mathit{hist}}(\htmlData{mx=8}{\htmlData{mx=6}{y_{2}}(\htmlData{mx=7}{S})}, \htmlData{mx=9}{\omega}, \htmlData{mx=15}{\htmlData{mx=10}{\tau}(\htmlData{mx=13}{\htmlData{mx=11}{y_{2}}(\htmlData{mx=12}{S})}, \htmlData{mx=14}{\omega})})})} - \htmlData{mx=18}{o_{2}}})^{2}}}} \mathrel{\htmlData{mx=24}{\leq}} \htmlData{mx=23}{V}} and k+1≤n\htmlData{mx=1}{\htmlData{mx=0}{k} + 1} \mathrel{\htmlData{mx=3}{\leq}} \htmlData{mx=2}{n} (given Fintype⁡ Ω\htmlData{mx=2}{\htmlData{mx=0}{\operatorname{Fintype}}\,\htmlData{mx=1}{\Omega}}), then

∣o1−o2∣⋅(1−(∑ωw(ω)⋅τ(y1,ω))⋅(k+1)n)≤2(∑ωw(ω)⋅τ(y1,ω))⋅(k+1)n⋅V\begin{aligned} & \htmlData{mx=21}{\htmlData{mx=4}{\left\lvert \htmlData{mx=3}{\htmlData{mx=1}{o_{1}} - \htmlData{mx=2}{o_{2}}} \right\rvert} \cdot \left(\htmlData{mx=20}{1 - \htmlData{mx=19}{\frac{\htmlData{mx=17}{\left(\htmlData{mx=14}{\sum_{\omega} \htmlData{mx=13}{\htmlData{mx=7}{\htmlData{mx=5}{w}(\htmlData{mx=6}{\omega})} \cdot \htmlData{mx=12}{\htmlData{mx=11}{\htmlData{mx=8}{\tau}(\htmlData{mx=9}{y_{1}}, \htmlData{mx=10}{\omega})}}}}\right) \cdot (\htmlData{mx=16}{\htmlData{mx=15}{k} + 1})}}{\htmlData{mx=18}{n}}}}\right)} \\ & \quad \htmlData{mx=0}{\leq} \htmlData{mx=40}{2\htmlData{mx=39}{\sqrt{\htmlData{mx=38}{\htmlData{mx=36}{\frac{\htmlData{mx=34}{\left(\htmlData{mx=31}{\sum_{\omega} \htmlData{mx=30}{\htmlData{mx=24}{\htmlData{mx=22}{w}(\htmlData{mx=23}{\omega})} \cdot \htmlData{mx=29}{\htmlData{mx=28}{\htmlData{mx=25}{\tau}(\htmlData{mx=26}{y_{1}}, \htmlData{mx=27}{\omega})}}}}\right) \cdot (\htmlData{mx=33}{\htmlData{mx=32}{k} + 1})}}{\htmlData{mx=35}{n}}} \cdot \htmlData{mx=37}{V}}}}} \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
n, k range over natural numbers: the statement must hold for every choice. ((n k : ℕ))
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 Ω. 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.) (Ω → ℝ)
∀For all
The statement after the comma holds for every ω. (∀ ω, 0 ≤ w ω)
∑Summation
Add up w(ω) for every ω. (∑ ω, w ω)
=Equality
∑ ω, w(ω) and 1 are the same. (∑ ω, w ω = 1)
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)
|x|Absolute value
The size of o₁ − o₂ without its sign. (|o₁ - o₂|)
RReal numbers
The real numbers: every point on the number line. (ℝ)
≤At most
0 is less than or equal to w(ω). (0 ≤ w ω)
·Multiplication
w(ω) times out(ω, hist(y₁, ω, τ(y₁, ω))). (w ω * out ω (hist y₁ ω (τ y₁ ω)))
powersetCard
Finset.powersetCard: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Finset.powersetCard)
∉Not an element of
j is not a member of S. (j ∉ S)
List
List: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (List)
aᵇPower
out(ω, hist(y₁, ω, τ(y₁, ω))) − o₁ raised to the power 2. ((out ω (hist y₁ ω (τ y₁ ω)) - o₁) ^ 2)
-Subtraction
out(ω, hist(y₁, ω, τ(y₁, ω))) minus o₁. On ℕ, Lean's subtraction stops at 0: 2 − 5 = 0. (out ω (hist y₁ ω (τ y₁ ω)) - o₁)
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)
a/bDivision
(∑ ω, w(ω) · τ(y₁, ω)) · (k + 1) divided by n. In Lean, dividing by 0 gives 0. (((∑ ω, w ω * (τ y₁ ω : ℝ)) * (k + 1)) /…)
+Addition
t plus 1. (t + 1)
[a, b]List
The list of , in order. ([])
(x : T)As real numbers
τ(y₁, ω) read as an element of real numbers. Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. ((τ y₁ ω : ℝ))
(x : T)Type ascription
univ read as a Finset(Fin(n)). Mathematicians leave this implicit; Lean needs it to know which kind of number is meant. ((Finset.univ : Finset (Fin n)))
univ
Finset.univ: a definition from the library, not special notation. Its name is its meaning; open it in Lean to see how it is defined. (Finset.univ)
√Square root
The non-negative number whose square is (∑ ω, w(ω) · τ(y₁, ω)) · (k + 1)/n · V. (Real.sqrt (((∑ ω, w ω * (τ y₁ ω : ℝ)) *…)

Closes the gap between the fixed-budget probe lower bound and expected-work upper bounds, as proposed by an external reviewer (2026-10-05). The sampler may stop after a random number of probes τ(y, ω) determined by its coins and the history it has seen (hypothesis: if two inputs produce the same history up to τ(y, ω) then they stop at the same time). Coupling: on the unplanted input the probes form a set Q(ω) of size τ(y₁, ω); if the random (k+1)-plant misses Q(ω), the planted run has the identical history, the identical stopping time and the identical output. The hit probability is at most (k+1)/n times the expected probe count, and the centred Cauchy–Schwarz two-point bound gives the stated inequality. Generalises ua-adaptive-sampler-lower-bound (fixed s) to E[τ₀].

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

More proved statements