Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Lemma 7: complete scene Gram matrix

Proved
GoodViewsNotEnough.complete_scene_gram_matrix

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

characteristic-functionepps-pulleyjepanonuniquenessself-supervised-learning

In the 512-dimensional model, let r:{1,…,513}→R512r:\{1,\dots,513\}\to\mathbb{R}^{512}r:{1,…,513}→R512 be a complete centred orthonormal basis of scene functions in L2(p)L^2(p)L2(p), that is, Epr=0\mathbb{E}_p r=0Ep​r=0 and Eprr⊤=I512\mathbb{E}_p rr^\top=I_{512}Ep​rr⊤=I512​. Then:

  1. every scene-only encoder h(S,U)=y(S)h(S,U)=y(S)h(S,U)=y(S) with Eh=0\mathbb{E}h=0Eh=0 and Ehh⊤=I512\mathbb{E}hh^\top=I_{512}Ehh⊤=I512​ has the form h=Qr(S)h=Qr(S)h=Qr(S) for some Q∈O(512)Q\in O(512)Q∈O(512);
  2. the Gram matrix of rrr is
r(s)⊤r(s′)=1s=s′ps−1;r(s)^\top r(s')=\frac{\mathbf 1_{s=s'}}{p_s}-1;r(s)⊤r(s′)=ps​1s=s′​​−1;
  1. ∥r(s)∥2=3\|r(s)\|^2=3∥r(s)∥2=3 on the two common scenes and ∥r(s)∥2=1021\|r(s)\|^2=1021∥r(s)∥2=1021 on the other scenes;
  2. for distinct scenes, ∥r(s)−r(s′)∥2\|r(s)-r(s')\|^2∥r(s)−r(s′)∥2 is 888 (common/common), 102610261026 (common/other) and 204420442044 (other/other).

So the whole scene-only whitened class is one rotation orbit, and the direction-averaged Epps–Pulley value is the same throughout it.

Preamble
import Mathlib
import Definitions.Def_GoodViewsNotEnough_Basic

open MeasureTheory Complex
Formal statement
namespace GoodViewsNotEnough

theorem complete_scene_gram_matrix (r : Fin 513 → Fin 512 → ℝ) (hr : IsCenteredOrthonormalBasis r) :
    (∀ h : Fin 513 → (Fin 512 → Bool) → Fin 512 → ℝ, (∀ s U U', h s U = h s U') → IsWhitenedHD h →
      ∃ Q ∈ Matrix.orthogonalGroup (Fin 512) ℝ, ∀ s U, h s U = Q.mulVec (r s)) ∧
    (∀ s s', ∑ a, r s a * r s' a = (if s = s' then 1 / hdSceneProb s else 0) - 1) ∧
    (∀ s : Fin 513, (s : ℕ) < 2 → ∑ a, r s a ^ 2 = 3) ∧
    (∀ s : Fin 513, 2 ≤ (s : ℕ) → ∑ a, r s a ^ 2 = 1021) ∧
    (∀ s s' : Fin 513, s ≠ s' → (s : ℕ) < 2 → (s' : ℕ) < 2 → ∑ a, (r s a - r s' a) ^ 2 = 8) ∧
    (∀ s s' : Fin 513, (s : ℕ) < 2 → 2 ≤ (s' : ℕ) → ∑ a, (r s a - r s' a) ^ 2 = 1026) ∧
    (∀ s s' : Fin 513, s ≠ s' → 2 ≤ (s : ℕ) → 2 ≤ (s' : ℕ) → ∑ a, (r s a - r s' a) ^ 2 = 2044) := by sorry

end GoodViewsNotEnough
Source
Anran Xu, Good Views Are Not Enough: Global Counterexamples for Gaussian-Regularized JEPAs, arXiv:2611.12137v1 (2026), Appendix D.3, Lemma 7, eqs. (16)-(17), p. 18
Read-back

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

Let the scene set be S={0,1,…,512}\mathcal S = \{0, 1, \dots, 512\}S={0,1,…,512} (513 scenes), carrying the probability weights

ps={14,s∈{0,1},11022,2≤s≤512,p_s = \begin{cases} \tfrac14, & s \in \{0, 1\}, \\[2pt] \tfrac{1}{1022}, & 2 \le s \le 512, \end{cases}ps​={41​,10221​,​s∈{0,1},2≤s≤512,​

which sum to 111. Let the nuisance set be the cube U={−1,1}512\mathcal U = \{-1, 1\}^{512}U={−1,1}512, encoded as Boolean vectors of length 512. Each U∈UU \in \mathcal UU∈U has weight 2−5122^{-512}2−512.

The theorem takes an arbitrary map r:S→R512r : \mathcal S \to \mathbb R^{512}r:S→R512, written s↦r(s)=(r1(s),…,r512(s))s \mapsto r(s) = (r_1(s), \dots, r_{512}(s))s↦r(s)=(r1​(s),…,r512​(s)). Its only hypothesis is that rrr is a centred orthonormal system in L2(p)L^2(p)L2(p):

∑s∈Sps ra(s)=0and∑s∈Sps ra(s) rb(s)=δabfor all a,b∈{1,…,512}.\sum_{s \in \mathcal S} p_s\, r_a(s) = 0 \quad \text{and} \quad \sum_{s \in \mathcal S} p_s\, r_a(s)\, r_b(s) = \delta_{ab} \qquad \text{for all } a, b \in \{1, \dots, 512\}.s∈S∑​ps​ra​(s)=0ands∈S∑​ps​ra​(s)rb​(s)=δab​for all a,b∈{1,…,512}.

This hypothesis involves 512 functions in the 512-dimensional space of ppp-centred functions on 513 points.

Under this hypothesis, the theorem asserts that all seven of the following statements hold simultaneously. Here ⟨⋅,⋅⟩\langle \cdot, \cdot \rangle⟨⋅,⋅⟩ and ∥⋅∥\|\cdot\|∥⋅∥ denote the ordinary unweighted Euclidean inner product and norm on R512\mathbb R^{512}R512.

  1. Nuisance-free whitened encoders are rotations of rrr. Let h:S×U→R512h : \mathcal S \times \mathcal U \to \mathbb R^{512}h:S×U→R512 be any map satisfying:
    • hhh does not depend on the nuisance, i.e. h(s,U)=h(s,U′)h(s, U) = h(s, U')h(s,U)=h(s,U′) for all sss, UUU, U′U'U′;
    • hhh is exactly whitened, i.e. for all coordinates a,ba, ba,b,
∑s∑Ups 2−512 ha(s,U)=0,∑s∑Ups 2−512 ha(s,U) hb(s,U)=δab.\sum_{s} \sum_{U} p_s\, 2^{-512}\, h_a(s, U) = 0, \qquad \sum_{s} \sum_{U} p_s\, 2^{-512}\, h_a(s, U)\, h_b(s, U) = \delta_{ab}.s∑​U∑​ps​2−512ha​(s,U)=0,s∑​U∑​ps​2−512ha​(s,U)hb​(s,U)=δab​.

Then there exists a real 512×512512 \times 512512×512 orthogonal matrix QQQ (that is, Q⊤Q=QQ⊤=IQ^\top Q = Q Q^\top = IQ⊤Q=QQ⊤=I) such that h(s,U)=Q r(s)h(s, U) = Q\, r(s)h(s,U)=Qr(s) for every s∈Ss \in \mathcal Ss∈S and every U∈UU \in \mathcal UU∈U.

  1. Gram matrix. For all scenes s,s′s, s's,s′:
⟨r(s),r(s′)⟩=1[s=s′]ps−1.\langle r(s), r(s') \rangle = \frac{\mathbf 1[s = s']}{p_s} - 1.⟨r(s),r(s′)⟩=ps​1[s=s′]​−1.
  1. For s∈{0,1}s \in \{0, 1\}s∈{0,1}: ∥r(s)∥2=3\|r(s)\|^2 = 3∥r(s)∥2=3.

  2. For 2≤s≤5122 \le s \le 5122≤s≤512: ∥r(s)∥2=1021\|r(s)\|^2 = 1021∥r(s)∥2=1021.

  3. For distinct s,s′∈{0,1}s, s' \in \{0, 1\}s,s′∈{0,1}: ∥r(s)−r(s′)∥2=8\|r(s) - r(s')\|^2 = 8∥r(s)−r(s′)∥2=8.

  4. For s∈{0,1}s \in \{0, 1\}s∈{0,1} and 2≤s′≤5122 \le s' \le 5122≤s′≤512: ∥r(s)−r(s′)∥2=1026\|r(s) - r(s')\|^2 = 1026∥r(s)−r(s′)∥2=1026. Distinctness is automatic here and is not stated separately.

  5. For distinct s,s′s, s's,s′ with 2≤s,s′≤5122 \le s, s' \le 5122≤s,s′≤512: ∥r(s)−r(s′)∥2=2044\|r(s) - r(s')\|^2 = 2044∥r(s)−r(s′)∥2=2044.

Human review
  • Endorsed by Shuze Chen · Nov 23, 2026

    Confirmed by the moderator at approval.

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