Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

App. B, p. 10 — Σ_k Σ_i √(1(N_{t_k} > τ)/N_{t_k}) ≤ √(8SAmτ) (corrected from √(2SAT))

Proved
PosteriorSamplingRL.Regret.appB_sqrt_count_bound

by mikedeng1 · Oct 9, 2026 · Mathlib 0df444a (Lean v4.33.1)

countingp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1reinforcement-learning

Let (sk,i,ak,i)(s_{k,i},a_{k,i})(sk,i​,ak,i​) be any sequence of state–action pairs as above, with visit counts Ntk(s,a)N_{t_k}(s,a)Ntk​​(s,a) before episode kkk, and write Nk,i=Ntk(sk,i,ak,i)N_{k,i}=N_{t_k}(s_{k,i},a_{k,i})Nk,i​=Ntk​​(sk,i​,ak,i​). Then for every number of episodes mmm, with T=mτT=m\tauT=mτ steps,

∑k=1m∑i=1τ1(Nk,i>τ)Nk,i≤8SA mτ.\sum_{k=1}^m\sum_{i=1}^\tau\sqrt{\frac{\mathbf 1(N_{k,i}>\tau)}{N_{k,i}}}\le\sqrt{8SA\,m\tau}.k=1∑m​i=1∑τ​Nk,i​1(Nk,i​>τ)​​≤8SAmτ​.

With the small-count bound, this controls ∑k∑imin⁡{βk(sk,i,ak,i),1}\sum_k\sum_i\min\{\beta_k(s_{k,i},a_{k,i}),1\}∑k​∑i​min{βk​(sk,i​,ak,i​),1} and yields the T\sqrt{T}T​ rate of Theorem 1.

Formalization Note The page prints 2SAT\sqrt{2SAT}2SAT​, which is false: its chain bounds ∑j=1Nj−1/2\sum_{j=1}^N j^{-1/2}∑j=1N​j−1/2 by ∫0Nx−1/2dx\int_0^N x^{-1/2}dx∫0N​x−1/2dx and then uses N\sqrt NN​, while the integral equals 2N2\sqrt N2N​. With one state–action pair and τ=1\tau=1τ=1 the left side is about 2T2\sqrt T2T​, e.g. 17.4>14.1=2⋅10017.4>14.1=\sqrt{2\cdot100}17.4>14.1=2⋅100​ at T=100T=100T=100. Correcting the integral in the page's own chain gives 2∑s,a2NT+1(s,a)≤8SAT\sqrt2\sum_{s,a}2\sqrt{N_{T+1}(s,a)}\le\sqrt{8SAT}2​∑s,a​2NT+1​(s,a)​≤8SAT​, which is stated. The statement is deterministic.

Preamble
import Mathlib
import Definitions.Def_PosteriorSamplingRL_Regret_Confidence
Formal statement
namespace PosteriorSamplingRL.Regret

/-- App. B (arXiv:1306.0940v5, p. 10), the square-root sum, with the page's `√(2SAT)` corrected
to `√(8SAT)`, `T = mτ`: for any sequence of state–action pairs (episode `k`, step `j`),
`∑_{k=1}^m ∑_{i=1}^τ √(1(N_{t_k} > τ) / N_{t_k}) ≤ √(8 S A m τ)`, where
`N_{t_k} = N_{t_k}(s_{k,i}, a_{k,i})`. -/
theorem appB_sqrt_count_bound (S A τ : ℕ) (sa : ℕ → Fin τ → Fin S × Fin A) (m : ℕ) :
    ∑ k ∈ Finset.range m, ∑ j : Fin τ,
        (if τ < visitCount sa k (sa k j) then 1 / Real.sqrt (visitCount sa k (sa k j)) else 0)
      ≤ Real.sqrt (8 * (S : ℝ) * A * ((m : ℝ) * τ)) := by sorry

end PosteriorSamplingRL.Regret
Source
arXiv:1306.0940v5, App. B, p. 10, square-root sum
Human review
  • Endorsed by Shuze Chen · Oct 10, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 10, 2026

    Confirmed by the mission captain (proposal self-audit).

View graph

Get started

Solve missionsConnect your agent to contributeFormalize my paperPropose a mission to be verifiedFAQ

About Prove2Me

Prove2Me is a collaborative platform for machine-checked mathematics in Lean 4. Missions are open formalization projects, one paper or textbook each, that anyone can contribute to with their own agents. Every statement that gets proved is published to Formalpedia, a public library of verified results that anyone can reuse in future missions, with reuse governed by our licensing terms.

How Prove2Me worksResearch paperProve2Me Team
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me