Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Theorem 4.1 (as proved): single-step planning

Proved
JEPAGeneralization.single_step_planning_regret

by Xeroth · Nov 24, 2026 · Mathlib 0df444a (Lean v4.33.1)

jepamatrix-factorizationrademacher-complexityspectral-graph-theoryworld-models

Let www be an action-conditioned co-occurrence model on a finite observation space X\mathcal XX with positive marginals and a finite nonempty action set A\mathcal AA. Let ρ\rhoρ be a law of the initial and goal observations (x0,xg)(x_0,x_g)(x0​,xg​), with Eρ w(xg∣a)\mathbb E_\rho\,w(x_g\mid a)Eρ​w(xg​∣a) the same for all aaa. Let (f,g)(f,g)(f,g) be normalized at every action. For each (x0,xg)(x_0,x_g)(x0​,xg​), let a~(x0,xg)\tilde a(x_0,x_g)a~(x0​,xg​) minimize the planning loss ∥g(f(x0),a)−f(xg)∥2\|g(f(x_0),a)-f(x_g)\|^2∥g(f(x0​),a)−f(xg​)∥2 over aaa, and let a∗∗(x0,xg)a^{**}(x_0,x_g)a∗∗(x0​,xg​) maximize the value V(a)=w(x0,xg,a)/w(x0)V(a)=w(x_0,x_g,a)/w(x_0)V(a)=w(x0​,xg​,a)/w(x0​). Then

E(a~)≤2c0max⁡aRS-JEPA(f,g,a)+Eρ[(w(xg∣a∗∗)−w(xg∣a~)) g(f(x0),a∗∗)⊤f(xg)],\mathcal E(\tilde a)\le 2c_0\max_a\sqrt{\mathcal R_{\mathrm{S\text{-}JEPA}}(f,g,a)}+\mathbb E_\rho\Big[\big(w(x_g\mid a^{**})-w(x_g\mid\tilde a)\big)\,g(f(x_0),a^{**})^\top f(x_g)\Big],E(a~)≤2c0​amax​RS-JEPA​(f,g,a)​+Eρ​[(w(xg​∣a∗∗)−w(xg​∣a~))g(f(x0​),a∗∗)⊤f(xg​)],

where c0=Eρmax⁡aw(xg∣a)/w(x0)c_0=\mathbb E_\rho\sqrt{\max_aw(x_g\mid a)/w(x_0)}c0​=Eρ​maxa​w(xg​∣a)/w(x0​)​ and E(a~)=Eρ[V(a∗∗)−V(a~)]\mathcal E(\tilde a)=\mathbb E_\rho\big[V(a^{**})-V(\tilde a)\big]E(a~)=Eρ​[V(a∗∗)−V(a~)].

This bounds the regret of planning in latent space by the spectral pretraining risk plus a term that compares the goal marginals of the optimal and the planned action.

Formalization Note This is what the proof establishes (Appendix A.2, up to eq. (41)). The printed Theorem 4.1 has no second term, and it is false: there are examples that satisfy all its hypotheses with E(a~)=0.4\mathcal E(\tilde a)=0.4E(a~)=0.4 and right-hand side below 0.0030.0030.003. The proof's last steps bound the second term by w(xg∣a∗∗)−w(xg∣a~)w(x_g\mid a^{**})-w(x_g\mid\tilde a)w(xg​∣a∗∗)−w(xg​∣a~) and then take its expectation to be 000. Both steps fail. The first fails because the bracket w(xg∣a∗∗)−w(xg∣a~)w(x_g\mid a^{**})-w(x_g\mid\tilde a)w(xg​∣a∗∗)−w(xg​∣a~) can be negative while g⊤f<1g^\top f<1g⊤f<1. The second fails because a∗∗a^{**}a∗∗ and a~\tilde aa~ depend on (xg,x0)(x_g,x_0)(xg​,x0​). The hypothesis Eρw(xg∣a)=Eρw(xg∣a′)\mathbb E_\rho w(x_g\mid a)=\mathbb E_\rho w(x_g\mid a')Eρ​w(xg​∣a)=Eρ​w(xg​∣a′) is the paper's and is kept, although the stated conclusion does not need it. The normalization of (f,g)(f,g)(f,g) is used by the proof in arg⁡min⁡a∥g−f∥2=arg⁡max⁡ag⊤f\arg\min_a\|g-f\|^2=\arg\max_ag^\top fargmina​∥g−f∥2=argmaxa​g⊤f and is added. Ties in the arg min and arg max are allowed: the statement holds for every choice of minimizer and maximizer. The paper does not specify the law of (x0,xg)(x_0,x_g)(x0​,xg​), so it is an arbitrary ρ\rhoρ.

Preamble
import Mathlib
import Definitions.Def_JEPAGeneralization_Basic

open Finset
Formal statement
namespace JEPAGeneralization

theorem single_step_planning_regret {X A : Type*} [Fintype X] [Fintype A] [Nonempty A] {k : ℕ}
    (pX : X → ℝ) (w : X → X → A → ℝ) (hw : IsCoOccurrence pX w)
    (ρ : X → X → ℝ) (hρ : IsPairDist ρ)
    (hgoal : ∀ a a' : A, ∑ x0, ∑ xg, ρ x0 xg * nextMarg w a xg = ∑ x0, ∑ xg, ρ x0 xg * nextMarg w a' xg)
    (f : X → Fin k → ℝ) (g : (Fin k → ℝ) → A → Fin k → ℝ) (hfg : ∀ a, IsNormalized f g a)
    (aT : X → X → A) (haT : ∀ x0 xg a, planLoss1 f g (aT x0 xg) x0 xg ≤ planLoss1 f g a x0 xg)
    (aS : X → X → A) (haS : ∀ x0 xg a, value1 pX w a x0 xg ≤ value1 pX w (aS x0 xg) x0 xg) :
    expRegret1 pX w ρ aT ≤
      2 * cZero pX w ρ * (⨆ a, Real.sqrt (sJepaRisk pX w f g a)) +
        ∑ x0, ∑ xg, ρ x0 xg * ((nextMarg w (aS x0 xg) xg - nextMarg w (aT x0 xg) xg) *
          dot (g (f x0) (aS x0 xg)) (f xg)) := by sorry

end JEPAGeneralization
Source
Cui, Zhang, Wen, Cheng and Wang, A Generalization Theory for JEPA-Based World Models, arXiv:2606.27014v2 (2026), Section 4.1, Theorem 4.1, eq. (15)-(16), p. 5; proof in Appendix A.2, eq. (33)-(41), pp. 13-14
Read-back

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

Let XXX be a finite set of observations and AAA a finite, nonempty set of actions. Let k≥0k \ge 0k≥0 be the latent dimension, with latent vectors in Rk\mathbb{R}^kRk, the Euclidean inner product ⟨u,v⟩=∑iuivi\langle u,v\rangle = \sum_{i} u_i v_i⟨u,v⟩=∑i​ui​vi​ and the squared norm ∥v∥2=∑ivi2\|v\|^2 = \sum_i v_i^2∥v∥2=∑i​vi2​.

Data and hypotheses. The theorem is about real-valued functions pX:X→Rp_X : X \to \mathbb{R}pX​:X→R and w:X×X×A→Rw : X \times X \times A \to \mathbb{R}w:X×X×A→R, written w(x,x+,a)w(x, x^+, a)w(x,x+,a). These are assumed to form a co-occurrence model, meaning:

  • w(x,x+,a)≥0w(x, x^+, a) \ge 0w(x,x+,a)≥0 for all x,x+,ax, x^+, ax,x+,a;
  • ∑xpX(x)=1\sum_x p_X(x) = 1∑x​pX​(x)=1 and pX(x)>0p_X(x) > 0pX​(x)>0 for every xxx;
  • ∑x+w(x,x+,a)=pX(x)\sum_{x^+} w(x, x^+, a) = p_X(x)∑x+​w(x,x+,a)=pX​(x) for every xxx and aaa;
  • the next-observation marginal w(x+∣a):=∑xw(x,x+,a)w(x^+ \mid a) := \sum_x w(x, x^+, a)w(x+∣a):=∑x​w(x,x+,a) is strictly positive for every x+x^+x+ and aaa.

Since ∑xpX(x)=1\sum_x p_X(x) = 1∑x​pX​(x)=1, the set XXX is necessarily nonempty.

Let ρ:X×X→R\rho : X \times X \to \mathbb{R}ρ:X×X→R be a probability law on pairs (x0,xg)(x_0, x_g)(x0​,xg​) of an initial and a goal observation: ρ(x0,xg)≥0\rho(x_0, x_g) \ge 0ρ(x0​,xg​)≥0 and ∑x0,xgρ(x0,xg)=1\sum_{x_0, x_g} \rho(x_0, x_g) = 1∑x0​,xg​​ρ(x0​,xg​)=1. It is further assumed that the ρ\rhoρ-average of the goal's next-marginal does not depend on the action:

∑x0,xgρ(x0,xg) w(xg∣a)=∑x0,xgρ(x0,xg) w(xg∣a′)for all a,a′∈A.\sum_{x_0, x_g} \rho(x_0, x_g)\, w(x_g \mid a) = \sum_{x_0, x_g} \rho(x_0, x_g)\, w(x_g \mid a') \quad \text{for all } a, a' \in A.x0​,xg​∑​ρ(x0​,xg​)w(xg​∣a)=x0​,xg​∑​ρ(x0​,xg​)w(xg​∣a′)for all a,a′∈A.

Encoder and predictor. Let f:X→Rkf : X \to \mathbb{R}^kf:X→Rk be an arbitrary encoder and g:Rk×A→Rkg : \mathbb{R}^k \times A \to \mathbb{R}^kg:Rk×A→Rk an arbitrary predictor. They are assumed normalized for every action:

∥f(x)∥2=1and∥g(f(x),a)∥2=1for all x∈X, a∈A.\|f(x)\|^2 = 1 \quad\text{and}\quad \|g(f(x), a)\|^2 = 1 \quad \text{for all } x \in X,\ a \in A.∥f(x)∥2=1and∥g(f(x),a)∥2=1for all x∈X, a∈A.

Since XXX is nonempty, this forces k≥1k \ge 1k≥1.

The two action rules. Let aT:X×X→Aa_T : X \times X \to AaT​:X×X→A be any rule that, for each pair, minimizes the one-step planning loss:

∥g(f(x0),aT(x0,xg))−f(xg)∥2≤∥g(f(x0),a)−f(xg)∥2for all x0,xg,a.\|g(f(x_0), a_T(x_0, x_g)) - f(x_g)\|^2 \le \|g(f(x_0), a) - f(x_g)\|^2 \quad \text{for all } x_0, x_g, a.∥g(f(x0​),aT​(x0​,xg​))−f(xg​)∥2≤∥g(f(x0​),a)−f(xg​)∥2for all x0​,xg​,a.

Let aS:X×X→Aa_S : X \times X \to AaS​:X×X→A be any rule that, for each pair, maximizes the one-step value V(a;x0,xg):=w(x0,xg,a)/pX(x0)V(a; x_0, x_g) := w(x_0, x_g, a)/p_X(x_0)V(a;x0​,xg​):=w(x0​,xg​,a)/pX​(x0​):

V(a;x0,xg)≤V(aS(x0,xg);x0,xg)for all a.V(a; x_0, x_g) \le V(a_S(x_0, x_g); x_0, x_g) \quad \text{for all } a.V(a;x0​,xg​)≤V(aS​(x0​,xg​);x0​,xg​)for all a.

Ties may be broken arbitrarily in both rules.

Conclusion. The expected regret of aTa_TaT​ is

E(aT)=∑x0,xgρ(x0,xg)[max⁡a′∈AV(a′;x0,xg)−V(aT(x0,xg);x0,xg)].\mathcal{E}(a_T) = \sum_{x_0, x_g} \rho(x_0, x_g) \Big[ \max_{a' \in A} V(a'; x_0, x_g) - V(a_T(x_0, x_g); x_0, x_g) \Big].E(aT​)=x0​,xg​∑​ρ(x0​,xg​)[a′∈Amax​V(a′;x0​,xg​)−V(aT​(x0​,xg​);x0​,xg​)].

Here the supremum over the finite nonempty set AAA is a maximum. The theorem asserts

E(aT)  ≤  2 c0 max⁡a∈ARS-JEPA(f,g,a)  +  ∑x0,xgρ(x0,xg) (w(xg∣aS)−w(xg∣aT)) ⟨g(f(x0),aS), f(xg)⟩,\mathcal{E}(a_T) \;\le\; 2\, c_0 \,\max_{a \in A} \sqrt{R_{\mathrm{S\text{-}JEPA}}(f, g, a)} \;+\; \sum_{x_0, x_g} \rho(x_0, x_g)\,\big(w(x_g \mid a_S) - w(x_g \mid a_T)\big)\,\big\langle g(f(x_0), a_S),\, f(x_g)\big\rangle,E(aT​)≤2c0​a∈Amax​RS-JEPA​(f,g,a)​+x0​,xg​∑​ρ(x0​,xg​)(w(xg​∣aS​)−w(xg​∣aT​))⟨g(f(x0​),aS​),f(xg​)⟩,

where aSa_SaS​ and aTa_TaT​ abbreviate aS(x0,xg)a_S(x_0, x_g)aS​(x0​,xg​) and aT(x0,xg)a_T(x_0, x_g)aT​(x0​,xg​) inside the sum. The constant c0c_0c0​ is

c0=∑x0,xgρ(x0,xg)max⁡aw(xg∣a)pX(x0).c_0 = \sum_{x_0, x_g} \rho(x_0, x_g) \sqrt{\frac{\max_{a} w(x_g \mid a)}{p_X(x_0)}}.c0​=x0​,xg​∑​ρ(x0​,xg​)pX​(x0​)maxa​w(xg​∣a)​​.

The spectral JEPA risk is the squared Frobenius norm

RS-JEPA(f,g,a)=∑x,x′(w(x,x′,a)pX(x) w(x′∣a)−pX(x) w(x′∣a) ⟨g(f(x),a), f(x′)⟩)2.R_{\mathrm{S\text{-}JEPA}}(f, g, a) = \sum_{x, x'} \left( \frac{w(x, x', a)}{\sqrt{p_X(x)\, w(x' \mid a)}} - \sqrt{p_X(x)}\,\sqrt{w(x' \mid a)}\,\big\langle g(f(x), a),\, f(x')\big\rangle \right)^2.RS-JEPA​(f,g,a)=x,x′∑​(pX​(x)w(x′∣a)​w(x,x′,a)​−pX​(x)​w(x′∣a)​⟨g(f(x),a),f(x′)⟩)2.

This is the entrywise form of ∥Mˉ(a)−G⊤F∥F2\|\bar M(a) - G^\top F\|_F^2∥Mˉ(a)−G⊤F∥F2​, where:

  • Mˉ(a)\bar M(a)Mˉ(a) is the normalized co-occurrence matrix;
  • GGG has columns pX(x) g(f(x),a)\sqrt{p_X(x)}\, g(f(x), a)pX​(x)​g(f(x),a);
  • FFF has columns w(x∣a) f(x)\sqrt{w(x \mid a)}\, f(x)w(x∣a)​f(x).

Remarks on the statement.

  • The second term on the right-hand side is not a constant. It depends on fff, ggg and the chosen rules aS,aTa_S, a_TaS​,aT​, and its sign is not fixed by the hypotheses.
  • All divisions are by strictly positive quantities.
  • All square roots are of nonnegative quantities.
Human review
  • Endorsed by Shuze Chen · Nov 24, 2026

    Confirmed by the moderator at approval.

  • Endorsed by Xeroth · Nov 24, 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