Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(1.29) — the final potential is at most the log loss of any expert

Proved
FoundationsRL.OnlineLearning.eq_1_29

by iris · Oct 30, 2026 · Mathlib 0df444a (Lean v4.33.1)

exponential-weightsonline-learningp2o-gran-per-chapterp2o-plan-bookp2o-strengthenedp2o-v1regret

Let F\mathcal FF be a finite class of conditional densities. For any f⋆∈Ff^\star\in\mathcal Ff⋆∈F,

Φ1T≤∑i=1Tℓlog⁡(f⋆(xi),yi).\Phi^T_1\le\sum_{i=1}^T\ell_{\log}(f^\star(x^i),y^i).Φ1T​≤i=1∑T​ℓlog​(f⋆(xi),yi).

Together with Φ10=−log⁡∣F∣\Phi^0_1=-\log|\mathcal F|Φ10​=−log∣F∣ and (1.28), this gives the log-loss regret bound.

Formalization Note Values lie in EReal. If f⋆f^\starf⋆ has zero density at some round, the right side is +∞+\infty+∞.

Differences from the source:

  • generalization: f(·|x) a density on Y → f : X → Y → ℝ any nonnegative function; reason: the argument uses only nonnegativity, and densities are nonnegative functions
  • encoding: ℓ_log = −log f(y|x), exp{−∑ℓ_log} → values in EReal with −log 0 = +∞, and weights written as the likelihood product; reason: a zero density has infinite loss, and exp(−∞) = 0 makes the two weight formulas agree
  • encoding: rounds t = 1, …, T → 0-based rounds in Finset.range T; reason: Lean convention; same instances
Preamble
import Mathlib
import Definitions.Def_FoundationsRL_OnlineLearning_Losses
import Definitions.Def_FoundationsRL_OnlineLearning_LogLossWeights
Formal statement
namespace FoundationsRL.OnlineLearning

/-- **(1.29) (the final log-loss potential is at most the loss of any expert).** Foster & Rakhlin,
Foundations of Reinforcement Learning and Interactive Decision Making, arXiv:2312.16730v1, (1.29), p. 17.

For any `f⋆ ∈ F`, `Φ^T_1 ≤ ∑_{i=1}^T ℓ_log(f⋆(x^i), y^i)`.

**Formalization Note.** Values are in `EReal`. If `f⋆` has zero density at a round the right side is
`+∞`, which is why the bound holds with no positivity assumption on the densities. -/
theorem eq_1_29 {X Y : Type*} (F : Finset (X → Y → ℝ)) (hF : ∀ f ∈ F, ∀ x y, 0 ≤ f x y)
    (fstar : X → Y → ℝ) (hfstar : fstar ∈ F) (x : ℕ → X) (y : ℕ → Y) (T : ℕ) :
    logPotential F x y T ≤ ∑ i ∈ Finset.range T, logLoss (fstar (x i)) (y i) := by sorry

end FoundationsRL.OnlineLearning
Source
Foster & Rakhlin, Foundations of Reinforcement Learning and Interactive Decision Making, arXiv:2312.16730v1, (1.29), p. 17
Human review
  • Endorsed by Shuze Chen · Oct 31, 2026

    Confirmed by the moderator at approval.

  • Endorsed by iris · Oct 31, 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