Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 1 (No-Regret) — pairwise regret at most 2kT\sqrt{2kT}2kT​

Proved
CalibratedCE.Forecast.no_regret

by mikedeng1 · Sep 27, 2026 · Mathlib 0df444a (Lean v4.33.1)

online-learningp2o-batch-p100bp2o-gran-per-chapterp2o-plan-paperp2o-v1regret

Consider kkk forecasts with losses 0≤Lti≤10\le L_t^i\le 10≤Lti​≤1, and a combined forecast that uses forecast iii in round ttt with probability wtiw_t^iwti​, where each wtw_twt​ is a probability vector satisfying the flow conservation equations for the regrets of the previous rounds:

wti∑j=1kRt−1i→j=∑j=1kwtjRt−1j→ifor every i.w_t^i \sum_{j=1}^k R_{t-1}^{i\to j} = \sum_{j=1}^k w_t^j R_{t-1}^{j\to i} \qquad\text{for every } i .wti​j=1∑k​Rt−1i→j​=j=1∑k​wtj​Rt−1j→i​for every i.

Here RTi→j=max⁡{0,∑t=1Twti(Lti−Ltj)}R_T^{i\to j} = \max\{0,\sum_{t=1}^T w_t^i(L_t^i - L_t^j)\}RTi→j​=max{0,∑t=1T​wti​(Lti​−Ltj​)} is the regret of changing all iii forecasts to jjj forecasts. Then for all i∗,j∗i^*, j^*i∗,j∗ and every TTT,

RTi∗→j∗  ≤  2kT.R_T^{i^*\to j^*} \;\le\; \sqrt{2kT}.RTi∗→j∗​≤2kT​.

This is the "no-regret" property on which the Appendix builds the calibrated forecast of Theorem 3.

Formalization Note Rounds are indexed from 000; the hypothesis at 000-based round ttt uses the regrets over rounds 0,…,t−10,\dots,t-10,…,t−1 (the paper's Rt−1R_{t-1}Rt−1​). At round 000 every regret is 000, so the condition holds for every w0w_0w0​, as on the page. The weights wtw_twt​ may depend on anything, including LtL_tLt​; the inequality is deterministic. The losses and weights are real sequences; nothing is assumed about how they were generated.

Preamble
import Mathlib
import Definitions.Def_CalibratedCE_Forecast_IsDist
import Definitions.Def_CalibratedCE_Forecast_Regret
Formal statement
namespace CalibratedCE.Forecast

theorem no_regret (k : ℕ) (L w : ℕ → Fin k → ℝ)
    (hL : ∀ t i, 0 ≤ L t i ∧ L t i ≤ 1)
    (hw : ∀ t, IsDist (w t))
    (hflow : ∀ t i, w t i * ∑ j, Rg L w t i j = ∑ j, w t j * Rg L w t j i)
    (T : ℕ) (i j : Fin k) :
    Rg L w T i j ≤ Real.sqrt (2 * k * T) := by sorry

end CalibratedCE.Forecast
Source
Foster and Vohra, Calibrated learning and correlated equilibrium, Games Econ. Behav. 21 (1997), p. 52, Lemma 1 (No-Regret)
Read-back

What the Lean code literally says, in plain math · claude-opus-5-5

Let k∈Nk \in \mathbb{N}k∈N. Let LtiL_t^iLti​ and wtiw_t^iwti​ be real arrays indexed by rounds t∈Nt \in \mathbb{N}t∈N and indices i∈{0,…,k−1}i \in \{0,\dots,k-1\}i∈{0,…,k−1}. For T∈NT \in \mathbb{N}T∈N and indices i,ji, ji,j, write

RTi→j=max⁡{0, ∑s=0T−1wsi(Lsi−Lsj)}R_T^{i\to j} = \max\Big\{0,\ \sum_{s=0}^{T-1} w_s^i\big(L_s^i - L_s^j\big)\Big\}RTi→j​=max{0, s=0∑T−1​wsi​(Lsi​−Lsj​)}

for the regret accumulated over rounds 0,…,T−10,\dots,T-10,…,T−1.

The hypotheses are:

  1. Bounded losses: 0≤Lti≤10 \le L_t^i \le 10≤Lti​≤1 for every ttt and iii.
  2. Weights are probability vectors: for every ttt, wti≥0w_t^i \ge 0wti​≥0 for all iii and ∑iwti=1\sum_i w_t^i = 1∑i​wti​=1.
  3. Flow conservation: for every round t∈Nt \in \mathbb{N}t∈N and every iii,
wti∑j=0k−1Rti→j  =  ∑j=0k−1wtj Rtj→i.w_t^i \sum_{j=0}^{k-1} R_t^{i\to j} \;=\; \sum_{j=0}^{k-1} w_t^j\, R_t^{j\to i}.wti​j=0∑k−1​Rti→j​=j=0∑k−1​wtj​Rtj→i​.

Here RtR_tRt​ is the regret over rounds 0,…,t−10,\dots,t-10,…,t−1, that is, before round ttt. The condition is imposed on the entire infinite sequence of rounds, not only on the rounds up to TTT.

The conclusion: for every T∈NT \in \mathbb{N}T∈N and every pair of indices i,ji, ji,j,

RTi→j≤2kT.R_T^{i\to j} \le \sqrt{2kT}.RTi→j​≤2kT​.

Degenerate cases:

  • k=0k = 0k=0: hypothesis 2 cannot hold (an empty sum is 0≠10 \neq 10=1), so the statement is vacuous.
  • T=0T = 0T=0: it reads 0≤00 \le 00≤0.
  • t=0t = 0t=0 in hypothesis 3: all regrets R0R_0R0​ are 000, so the condition is automatic at t=0t = 0t=0.
  • i=ji = ji=j: RTi→i=0R_T^{i \to i} = 0RTi→i​=0, and the bound is trivial.
Human review
  • Endorsed by Shuze Chen · Sep 27, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Sep 27, 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