Prove2Me
Navigate
DiscoverFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in

Get started

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

Linear algebra

50 missions · 32 completed

Missions

Open18Completed32All50
🏆Completed
Convex OptimizationNumerical AnalysisOptimization·Captain: mikedeng1

A Singular Value Thresholding Algorithm for Matrix Completion 2: Convergence of the SVT Iteration under General Convex ConstraintsResearch Paper

Motivation

Singular value thresholding (SVT) is a first-order method introduced by Cai, Candès and Shen (SIAM J. Optim. 20 (2010)) for recovering a low-rank matrix from incomplete or indirect information. Its basic form, for matrix completion, alternates a soft-thresholding of singular values with a gradient step on a dual variable, and needs only one sparse singular value decomposition per iteration. That is what made nuclear-norm heuristics usable on matrices with tens of thousands of rows and columns, where interior-point methods for the equivalent semidefinite program do not fit in memory.

Matrix completion is only one constraint set. In applications the data are noisy linear measurements b=A(M)+zb = \mathcal A(M) + zb=A(M)+z, and the constraint takes the form of componentwise error bounds or norm balls around the data (§3.3 of the paper). Section 3.2 of the paper extends the method to a general finite family of convex constraints, and §4.2 proves that the extended iteration converges. This mission formalizes that extension and its convergence theorem, Theorem 4.4.

Setting

Let n1,n2,mn_1, n_2, mn1​,n2​,m be natural numbers and Rn1×n2\mathbb R^{n_1\times n_2}Rn1​×n2​ the real n1×n2n_1\times n_2n1​×n2​ matrices, with the Frobenius inner product ⟨X,Y⟩=∑i,jXijYij\langle X, Y\rangle = \sum_{i,j} X_{ij}Y_{ij}⟨X,Y⟩=∑i,j​Xij​Yij​ and norm ∥X∥F=⟨X,X⟩\|X\|_F = \sqrt{\langle X, X\rangle}∥X∥F​=⟨X,X⟩​. The nuclear norm ∥X∥∗\|X\|_*∥X∥∗​ is the sum of the singular values of XXX. For a fixed τ>0\tau > 0τ>0 the objective is

fτ(X)=τ∥X∥∗+12∥X∥F2.f_\tau(X) = \tau\|X\|_* + \tfrac12\|X\|_F^2 .fτ​(X)=τ∥X∥∗​+21​∥X∥F2​.

A matrix ZZZ is a subgradient of a function ggg at X0X_0X0​, written Z∈∂g(X0)Z\in\partial g(X_0)Z∈∂g(X0​), if g(X)≥g(X0)+⟨Z,X−X0⟩g(X)\ge g(X_0) + \langle Z, X - X_0\rangleg(X)≥g(X0​)+⟨Z,X−X0​⟩ for all XXX.

Let f1,…,fm:Rn1×n2→Rf_1,\dots,f_m:\mathbb R^{n_1\times n_2}\to\mathbb Rf1​,…,fm​:Rn1​×n2​→R be convex and put F(X)=(f1(X),…,fm(X))∈Rm\mathcal F(X) = (f_1(X),\dots,f_m(X))\in\mathbb R^mF(X)=(f1​(X),…,fm​(X))∈Rm. On Rm\mathbb R^mRm, ⟨u,v⟩=∑iuivi\langle u, v\rangle = \sum_i u_iv_i⟨u,v⟩=∑i​ui​vi​ and ∥v∥\|v\|∥v∥ is the Euclidean norm. The constrained problem is

(3.4)minimize fτ(X)subject to fi(X)≤0, i=1,…,m,\text{(3.4)}\qquad \text{minimize } f_\tau(X)\quad\text{subject to } f_i(X)\le 0,\ i=1,\dots,m,(3.4)minimize fτ​(X)subject to fi​(X)≤0, i=1,…,m,

with Lagrangian L(X,y)=fτ(X)+⟨y,F(X)⟩\mathcal L(X, y) = f_\tau(X) + \langle y, \mathcal F(X)\rangleL(X,y)=fτ​(X)+⟨y,F(X)⟩ for y≥0y\ge 0y≥0. A pair (X⋆,y⋆)(X^\star, y^\star)(X⋆,y⋆) with y⋆≥0y^\star\ge0y⋆≥0 is primal-dual optimal if it is a saddle point:

L(X⋆,y)≤L(X⋆,y⋆)≤L(X,y⋆)for all y≥0, X.\mathcal L(X^\star, y)\le \mathcal L(X^\star, y^\star)\le \mathcal L(X, y^\star)\qquad\text{for all } y\ge 0,\ X .L(X⋆,y)≤L(X⋆,y⋆)≤L(X,y⋆)for all y≥0, X.

The paper's standing assumption "strong duality holds" is the existence of such a pair.

The iteration (3.5) starts from y0=0y^0 = 0y0=0 and, for step sizes δk\delta_kδk​, sets for k=1,2,…k = 1, 2, \dotsk=1,2,…

Xk=arg⁡min⁡X{fτ(X)+⟨yk−1,F(X)⟩},yk=[ yk−1+δkF(Xk) ]+,X^k = \arg\min_X\{f_\tau(X) + \langle y^{k-1}, \mathcal F(X)\rangle\},\qquad y^k = [\,y^{k-1} + \delta_k\mathcal F(X^k)\,]_+ ,Xk=argXmin​{fτ​(X)+⟨yk−1,F(X)⟩},yk=[yk−1+δk​F(Xk)]+​,

where x+x_+x+​ has entries max⁡(xi,0)\max(x_i, 0)max(xi​,0). It is Uzawa's method for (3.4): an exact minimization in the primal variable followed by a projected ascent step on the dual. When F(X)=b−A(X)\mathcal F(X) = b - \mathcal A(X)F(X)=b−A(X) is affine, the minimization is a singular value thresholding step, which gives the algorithm its name.

The analysis of §4.2 assumes F\mathcal FF is Lipschitz in the sense

(4.2)∥F(X)−F(Y)∥≤L ∥X−Y∥Ffor all X,Y,\text{(4.2)}\qquad \|\mathcal F(X) - \mathcal F(Y)\|\le L\,\|X - Y\|_F\quad\text{for all } X, Y,(4.2)∥F(X)−F(Y)∥≤L∥X−Y∥F​for all X,Y,

for a constant L≥0L\ge 0L≥0.

Formalization targets

Goal: Theorem 4.4 (p. 1969)

If 0<inf⁡kδk≤sup⁡kδk<2/L20 < \inf_k\delta_k\le\sup_k\delta_k < 2/L^20<infk​δk​≤supk​δk​<2/L2 and strong duality holds, then the sequence XkX^kXk of (3.5) converges to the unique solution of (3.4):

∃! X⋆ solving (3.4),lim⁡k→∞Xk=X⋆.\exists!\,X^\star\ \text{solving (3.4)},\qquad \lim_{k\to\infty} X^k = X^\star .∃!X⋆ solving (3.4),k→∞lim​Xk=X⋆.

Milestones, in the order the proof uses them

  • Lemma 4.1 (p. 1968): ⟨Z−Z′,X−X′⟩≥∥X−X′∥F2\langle Z - Z', X - X'\rangle\ge\|X - X'\|_F^2⟨Z−Z′,X−X′⟩≥∥X−X′∥F2​ for Z∈∂fτ(X)Z\in\partial f_\tau(X)Z∈∂fτ​(X), Z′∈∂fτ(X′)Z'\in\partial f_\tau(X')Z′∈∂fτ​(X′).
  • Lemma 4.3 (p. 1969): for a primal-dual optimal pair and each δ>0\delta > 0δ>0, y⋆=[y⋆+δF(X⋆)]+y^\star = [y^\star + \delta\mathcal F(X^\star)]_+y⋆=[y⋆+δF(X⋆)]+​.
  • Eq. (4.4) (p. 1969): there are Zk∈∂fτ(Xk)Z^k\in\partial f_\tau(X^k)Zk∈∂fτ​(Xk) and Z⋆∈∂fτ(X⋆)Z^\star\in\partial f_\tau(X^\star)Z⋆∈∂fτ​(X⋆) with ⟨Zk,X−Xk⟩+⟨yk−1,F(X)−F(Xk)⟩≥0\langle Z^k, X - X^k\rangle + \langle y^{k-1}, \mathcal F(X) - \mathcal F(X^k)\rangle\ge 0⟨Zk,X−Xk⟩+⟨yk−1,F(X)−F(Xk)⟩≥0 and ⟨Z⋆,X−X⋆⟩+⟨y⋆,F(X)−F(X⋆)⟩≥0\langle Z^\star, X - X^\star\rangle + \langle y^\star, \mathcal F(X) - \mathcal F(X^\star)\rangle\ge 0⟨Z⋆,X−X⋆⟩+⟨y⋆,F(X)−F(X⋆)⟩≥0 for all XXX.
  • Eq. (4.5) (p. 1969): ⟨yk−1−y⋆,F(Xk)−F(X⋆)⟩≤−∥Xk−X⋆∥F2\langle y^{k-1} - y^\star, \mathcal F(X^k) - \mathcal F(X^\star)\rangle\le -\|X^k - X^\star\|_F^2⟨yk−1−y⋆,F(Xk)−F(X⋆)⟩≤−∥Xk−X⋆∥F2​.
  • Contraction step (p. 1969): ∥yk−y⋆∥≤∥yk−1−y⋆+δk(F(Xk)−F(X⋆))∥\|y^k - y^\star\|\le\|y^{k-1} - y^\star + \delta_k(\mathcal F(X^k) - \mathcal F(X^\star))\|∥yk−y⋆∥≤∥yk−1−y⋆+δk​(F(Xk)−F(X⋆))∥.
  • Eq. (4.6) (p. 1970): if 2δk−δk2L2≥β>02\delta_k - \delta_k^2L^2\ge\beta > 02δk​−δk2​L2≥β>0 for k≥1k\ge1k≥1, then ∥yk−y⋆∥2≤∥yk−1−y⋆∥2−β∥Xk−X⋆∥F2\|y^k - y^\star\|^2\le\|y^{k-1} - y^\star\|^2 - \beta\|X^k - X^\star\|_F^2∥yk−y⋆∥2≤∥yk−1−y⋆∥2−β∥Xk−X⋆∥F2​.

Significance

The result. Theorem 4.4 is the convergence guarantee for SVT beyond matrix completion. The componentwise error bounds of (3.8), whose SVT iteration is (3.9), are finitely many affine constraints and fall under it directly, as does any finite family of Lipschitz convex constraints, for instance a Frobenius-norm ball around the data. The conic variants of §3.3 ((3.11)–(3.13)) project the dual variable onto a cone rather than onto the nonnegative orthant and are not covered by the theorem as stated. Together with Theorem 3.1 of the same paper, which says that the solution of (3.4) tends to the minimum-nuclear-norm solution as τ→∞\tau\to\inftyτ→∞, it justifies using SVT as a solver for nuclear-norm minimization under general convex constraints.

Formalizing it. The theorem is proved in the paper, with two steps delegated to the literature: Lemma 4.3 cites [31], and the concluding step reads "the conclusion is as before". Its proof is short but relies on convex-analytic facts that are standard on paper and missing, in this form, from Mathlib: subgradients of the nuclear norm, the subdifferential sum rule for finite convex functions, and nonexpansiveness of the projection onto the nonnegative orthant. No machine-checked proof of this theorem or of Uzawa-type convergence for nuclear-norm objectives is known to exist. The mission produces a complete, checked version of the argument, including the omitted closing step.

Difficulty

The obvious approach is to view (3.5) as projected gradient ascent on the dual function g(y)=min⁡XL(X,y)g(y) = \min_X\mathcal L(X, y)g(y)=minX​L(X,y) and quote the standard convergence theorem for gradient methods with Lipschitz gradients. That does not apply directly: for general convex fif_ifi​ the dual function need not be differentiable, F(Xk)\mathcal F(X^k)F(Xk) is only a supergradient, and the Lipschitz hypothesis (4.2) is on F\mathcal FF, not on a dual gradient. The proof instead works with the primal-dual pair: it needs first-order optimality conditions (4.4), which require a subdifferential sum rule for fτ+∑iyifif_\tau + \sum_i y_i f_ifτ​+∑i​yi​fi​ with nonsmooth fif_ifi​, and it needs the strong monotonicity of ∂fτ\partial f_\tau∂fτ​ (Lemma 4.1), which depends on the description of subgradients of the nuclear norm. A second subtlety is that the theorem asserts convergence of the whole primal sequence to the unique solution, not to some solution along a subsequence, while nothing is claimed about convergence of the dual sequence.

Formalization scope

Matrices are Matrix (Fin n₁) (Fin n₂) ℝ, vectors in Rm\mathbb R^mRm are Fin m → ℝ, and convergence of matrices is in Mathlib's product topology, which coincides with the Frobenius topology. The nuclear norm is the sum of Mathlib's LinearMap.singularValues of the matrix viewed as a map between Euclidean spaces. Each fif_ifi​ is a real-valued function with ConvexOn ℝ Set.univ. The iteration is a predicate on sequences indexed by ℕ: the paper's step kkk produces X (k+1) and y (k+1) from y k with step size δ (k+1), and y 0 = 0. XkX^kXk is required to minimize L(⋅,yk−1)\mathcal L(\cdot, y^{k-1})L(⋅,yk−1); for τ>0\tau>0τ>0 and convex fif_ifi​ this minimizer exists and is unique, so the predicate is satisfiable and determines the sequence. The step-size condition is stated as a≤δk≤Ca\le\delta_k\le Ca≤δk​≤C for k≥1k\ge1k≥1 with a>0a>0a>0 and CL2<2C L^2 < 2CL2<2, which avoids the division 2/L22/L^22/L2 (evaluated as 000 in Lean when L=0L=0L=0); for L=0L=0L=0 it requires only bounded steps, matching the convention 2/0=∞2/0 = \infty2/0=∞. Strong duality is the hypothesis that a saddle point exists; Slater's condition is not assumed. The paper's standing assumptions (τ>0\tau>0τ>0, convex fif_ifi​, and (4.2) where LLL enters) appear as explicit hypotheses in every statement.

A formalization that assumes convergence or boundedness of the dual iterates, replaces the primal minimization by a closed-form thresholding step (valid only for affine F\mathcal FF), or states only subsequential convergence would not be this theorem; each of these is excluded by the statements above.

A complete development needs: subgradients of the nuclear norm and strong monotonicity of ∂fτ\partial f_\tau∂fτ​; existence and characterization of minimizers of strongly convex continuous functions on a finite-dimensional space; the subdifferential sum rule for finite convex functions; complementary slackness from the saddle-point inequalities; and nonexpansiveness of the entrywise positive part. These are reusable beyond this mission, especially for other Uzawa and augmented Lagrangian analyses. Contributions of any of these pieces as separate lemmas are welcome.

Selected references

  • J.-F. Cai, E. J. Candès, Z. Shen, A Singular Value Thresholding Algorithm for Matrix Completion, SIAM J. Optim. 20(4):1956–1982, 2010. https://doi.org/10.1137/080738970
  • E. J. Candès, B. Recht, Exact Matrix Completion via Convex Optimization, Found. Comput. Math. 9:717–772, 2009. https://doi.org/10.1007/s10208-009-9045-5
  • K. J. Arrow, L. Hurwicz, H. Uzawa, Studies in Linear and Nonlinear Programming, Stanford University Press, 1958.
  • S. Boyd, L. Vandenberghe, Convex Optimization, Cambridge University Press, 2004. https://doi.org/10.1017/CBO9780511804441
9 thms2 active usersReviewed
🏆Completed
Convex OptimizationNumerical AnalysisOptimization·Captain: mikedeng1

A Singular Value Thresholding Algorithm for Matrix Completion 1: The SVT Iteration Converges to the Unique Solution of the Proximal ProblemResearch Paper

Motivation

Matrix completion asks to recover an n1×n2n_1\times n_2n1​×n2​ matrix MMM from a subset Ω\OmegaΩ of its entries. When MMM has low rank, a standard convex surrogate is to minimize the nuclear norm ∥X∥∗\|X\|_*∥X∥∗​ (the sum of the singular values) subject to agreeing with MMM on Ω\OmegaΩ; Candès and Recht showed that this recovers MMM exactly under incoherence and sampling conditions (Candès–Recht 2009). Generic interior-point solvers for this semidefinite program do not scale beyond matrices of a few hundred rows.

Cai, Candès and Shen (SIAM J. Optim. 2010) proposed the singular value thresholding (SVT) algorithm: a first-order iteration whose only nonlinear step is a soft-thresholding of singular values, and whose other iterate is a sparse matrix supported on Ω\OmegaΩ. The algorithm has become a standard baseline in low-rank matrix recovery and a model example of dual (Uzawa-type) methods for nuclear-norm problems. This mission formalizes its convergence theorem.

Setting

All matrices are real. For X,Y∈Rn1×n2X,Y\in\mathbb R^{n_1\times n_2}X,Y∈Rn1​×n2​ write ⟨X,Y⟩=trace⁡(X∗Y)=∑i,jXijYij\langle X,Y\rangle=\operatorname{trace}(X^*Y)=\sum_{i,j}X_{ij}Y_{ij}⟨X,Y⟩=trace(X∗Y)=∑i,j​Xij​Yij​ and ∥X∥F2=⟨X,X⟩\|X\|_F^2=\langle X,X\rangle∥X∥F2​=⟨X,X⟩. The nuclear norm ∥X∥∗\|X\|_*∥X∥∗​ is the sum of the singular values of XXX.

For an index set Ω\OmegaΩ, the sampling projector PΩP_\OmegaPΩ​ keeps the entries with indices in Ω\OmegaΩ and sets the others to zero.

A reduced singular value decomposition of a matrix YYY of rank rrr is Y=UΣV∗Y=U\Sigma V^*Y=UΣV∗ with UUU (n1×rn_1\times rn1​×r) and VVV (n2×rn_2\times rn2​×r) having orthonormal columns and Σ=diag⁡(σ1,…,σr)\Sigma=\operatorname{diag}(\sigma_1,\dots,\sigma_r)Σ=diag(σ1​,…,σr​) with σi>0\sigma_i>0σi​>0. For τ≥0\tau\ge0τ≥0 the singular value shrinkage operator is

Dτ(Y)=Udiag⁡((σi−τ)+)V∗,t+=max⁡(0,t).\mathcal D_\tau(Y)=U\operatorname{diag}\big((\sigma_i-\tau)_+\big)V^*,\qquad t_+=\max(0,t).Dτ​(Y)=Udiag((σi​−τ)+​)V∗,t+​=max(0,t).

Fix τ>0\tau>0τ>0, a sequence of step sizes {δk}k≥1\{\delta_k\}_{k\ge1}{δk​}k≥1​ and data MMM. The SVT iteration (2.7) starts from Y0=0Y^0=0Y0=0 and sets, for k=1,2,…k=1,2,\dotsk=1,2,…,

Xk=Dτ(Yk−1),Yk=Yk−1+δkPΩ(M−Xk).X^k=\mathcal D_\tau(Y^{k-1}),\qquad Y^k=Y^{k-1}+\delta_k P_\Omega(M-X^k).Xk=Dτ​(Yk−1),Yk=Yk−1+δk​PΩ​(M−Xk).

The proximal problem (2.8) is

minimize  fτ(X)=τ∥X∥∗+12∥X∥F2subject to  PΩ(X)=PΩ(M).\text{minimize}\ \ f_\tau(X)=\tau\|X\|_*+\tfrac12\|X\|_F^2\quad\text{subject to}\ \ P_\Omega(X)=P_\Omega(M).minimize  fτ​(X)=τ∥X∥∗​+21​∥X∥F2​subject to  PΩ​(X)=PΩ​(M).

More generally, for a linear map A:Rn1×n2→Rm\mathcal A:\mathbb R^{n_1\times n_2}\to\mathbb R^mA:Rn1​×n2​→Rm with adjoint A∗\mathcal A^*A∗ and spectral norm ∥A∥=sup⁡{∥A(X)∥ℓ2:∥X∥F=1}\|\mathcal A\|=\sup\{\|\mathcal A(X)\|_{\ell_2}:\|X\|_F=1\}∥A∥=sup{∥A(X)∥ℓ2​​:∥X∥F​=1}, and b∈Rmb\in\mathbb R^mb∈Rm, problem (3.1) is to minimize fτ(X)f_\tau(X)fτ​(X) subject to A(X)=b\mathcal A(X)=bA(X)=b, and Uzawa's iteration (3.3) starts from y0=0y^0=0y0=0 and sets Xk=Dτ(A∗(yk−1))X^k=\mathcal D_\tau(\mathcal A^*(y^{k-1}))Xk=Dτ​(A∗(yk−1)), yk=yk−1+δk(b−A(Xk))y^k=y^{k-1}+\delta_k(b-\mathcal A(X^k))yk=yk−1+δk​(b−A(Xk)).

Formalization targets

Goal: Theorem 4.2, second sentence (p. 1968)

If 0<inf⁡kδk≤sup⁡kδk<20<\inf_k\delta_k\le\sup_k\delta_k<20<infk​δk​≤supk​δk​<2, then (2.8) has a unique solution X⋆X^\starX⋆ and the SVT iterates satisfy

lim⁡k→∞Xk=X⋆.\lim_{k\to\infty}X^k=X^\star .k→∞lim​Xk=X⋆.

Theorem 4.2, first sentence (p. 1968)

If (3.1) is feasible and 0<inf⁡kδk≤sup⁡kδk<2/∥A∥20<\inf_k\delta_k\le\sup_k\delta_k<2/\|\mathcal A\|^20<infk​δk​≤supk​δk​<2/∥A∥2, then (3.1) has a unique solution and the iterates XkX^kXk of (3.3) converge to it.

Supporting results (milestones, in attack order)

  1. Well-definedness of Dτ\mathcal D_\tauDτ​ (§2.1, p. 1960): the output does not depend on the chosen SVD.
  2. Theorem 2.1 (p. 1960): Dτ(Y)=arg⁡min⁡X12∥X−Y∥F2+τ∥X∥∗\mathcal D_\tau(Y)=\arg\min_X \tfrac12\|X-Y\|_F^2+\tau\|X\|_*Dτ​(Y)=argminX​21​∥X−Y∥F2​+τ∥X∥∗​.
  3. Sparsity of the iterates (§2.2, p. 1961): since Y0=0Y^0=0Y0=0, every YkY^kYk vanishes outside Ω\OmegaΩ.
  4. Eq. (2.14) (p. 1964): the minimizers of the Lagrangian fτ(X)+⟨Y,PΩ(M−X)⟩f_\tau(X)+\langle Y,P_\Omega(M-X)\ranglefτ​(X)+⟨Y,PΩ​(M−X)⟩ are those of τ∥X∥∗+12∥X−PΩY∥F2\tau\|X\|_*+\tfrac12\|X-P_\Omega Y\|_F^2τ∥X∥∗​+21​∥X−PΩ​Y∥F2​.
  5. Lemma 4.1 (p. 1968): for Z∈∂fτ(X)Z\in\partial f_\tau(X)Z∈∂fτ​(X), Z′∈∂fτ(X′)Z'\in\partial f_\tau(X')Z′∈∂fτ​(X′), ⟨Z−Z′,X−X′⟩≥∥X−X′∥F2\langle Z-Z',X-X'\rangle\ge\|X-X'\|_F^2⟨Z−Z′,X−X′⟩≥∥X−X′∥F2​.
  6. The §3.1 reduction (p. 1964): for a sampling operator, A∗A=PΩ\mathcal A^*\mathcal A=P_\OmegaA∗A=PΩ​ and (3.3) becomes (2.7) under Yk=A∗(yk)Y^k=\mathcal A^*(y^k)Yk=A∗(yk).
  7. Theorem 4.2, first sentence, as above.

Significance

The theorem certifies that SVT, run with any step sizes in a fixed interval (0,2)(0,2)(0,2), computes the unique minimizer of the strongly convex surrogate (2.8). Together with the separate fact that the solution of (2.8) tends to the minimum nuclear norm completion as τ→∞\tau\to\inftyτ→∞ (the paper's Theorem 3.1, a companion mission), this is what justifies using SVT as a solver for nuclear-norm matrix completion. Theorem 2.1, the proximal characterization of singular value soft-thresholding, is used throughout the literature on proximal methods for low-rank problems.

The paper's proof of Theorem 4.2 consists of the reduction to Uzawa's method and a citation of a general convergence theorem for projected gradient methods on the dual. The formalization produces a self-contained, machine-checked chain: the proximal characterization of Dτ\mathcal D_\tauDτ​, the Lagrangian identity, strong monotonicity of ∂fτ\partial f_\tau∂fτ​, and the convergence argument itself. To our knowledge none of these results has a machine-checked proof; Mathlib at the pinned revision has singular values of linear maps but no SVD structure, no nuclear norm and no subgradient calculus.

Difficulty

Nothing in the iteration is a gradient step of a smooth function in XXX: the XXX-update is a nonsmooth proximal map, and the convergence of XkX^kXk is not visible from the recursion itself. The paper's argument cites a general theorem on projected gradient methods ([25, Theorem 2.1]) and takes for granted that "strong duality holds" for (2.8) (p. 1963), so the existence of a Lagrange multiplier is part of what must be formalized. Theorem 2.1 depends on the subdifferential of the nuclear norm, which Mathlib does not provide, and therefore on the singular value decomposition and the duality between the nuclear and spectral norms. Convergence of objective values or of a subsequence would not suffice: the target is convergence of the whole sequence XkX^kXk to the unique solution.

Formalization scope

Matrices are Matrix (Fin n₁) (Fin n₂) ℝ; convergence is Mathlib's topology on matrices, which coincides with the Frobenius-norm topology. ⟨⋅,⋅⟩\langle\cdot,\cdot\rangle⟨⋅,⋅⟩ and ∥⋅∥F\|\cdot\|_F∥⋅∥F​ are defined entrywise; ∥X∥∗\|X\|_*∥X∥∗​ is the sum of Mathlib's LinearMap.singularValues of XXX viewed as a map Rn2→Rn1\mathbb R^{n_2}\to\mathbb R^{n_1}Rn2​→Rn1​. The shrinkage operator is a relation IsShrink τ Y X defined, as in (2.1)–(2.2), through some reduced SVD of YYY; well-definedness is a milestone. It is not defined as the minimizer of (2.3), which would make Theorem 2.1 definitional. Linear maps A\mathcal AA are given by matrices A1,…,AmA_1,\dots,A_mA1​,…,Am​ with A(X)i=⟨Ai,X⟩\mathcal A(X)_i=\langle A_i,X\rangleA(X)i​=⟨Ai​,X⟩, and a sampling operator by an injective enumeration of Ω\OmegaΩ. Subgradients are those of (2.4).

Sequences are indexed by N\mathbb NN: Lean's step k+1k+1k+1 is the paper's step kkk, so X0X^0X0 and δ0\delta_0δ0​ are unused. Committed conventions:

  • Y0=0Y^0=0Y0=0 and y0=0y^0=0y0=0 are hypotheses; with a start that is nonzero outside Ω\OmegaΩ the iterates converge to a different matrix.
  • The standing τ>0\tau>0τ>0 is kept, except in Theorem 2.1 and the well-definedness statement, which are printed for τ≥0\tau\ge0τ≥0.
  • The step-size conditions are explicit bounds a>0a>0a>0, CCC with a≤δk≤Ca\le\delta_k\le Ca≤δk​≤C for k≥1k\ge1k≥1, together with C<2C<2C<2, respectively C∥A∥2<2C\|\mathcal A\|^2<2C∥A∥2<2. The multiplicative form avoids Lean's x/0=0x/0=0x/0=0: for A=0\mathcal A=0A=0 the condition does not become unsatisfiable.
  • Feasibility of (3.1) is an added hypothesis of Theorem 4.2's first sentence, since "the unique solution" presupposes it.
  • "Converges to the unique solution" is stated as existence and uniqueness of the solution together with convergence of the whole sequence to it.

A small unprinted helper, ∥A∥≤1\|\mathcal A\|\le1∥A∥≤1 for sampling operators, is included to pass from the first sentence of Theorem 4.2 to the second; it is not a milestone. The subdifferential formula (2.6) of the nuclear norm and the Fejér-type condition of §5.1.2 are not stated. Reusable infrastructure welcome from solvers: existence and uniqueness properties of the reduced SVD, the nuclear/spectral norm duality, the subdifferential of the nuclear norm, and a general convergence theorem for Uzawa's method with a strongly convex objective.

Selected references

  • J.-F. Cai, E. J. Candès, Z. Shen, A Singular Value Thresholding Algorithm for Matrix Completion, SIAM J. Optim. 20(4):1956–1982, 2010. https://doi.org/10.1137/080738970
  • E. J. Candès, B. Recht, Exact Matrix Completion via Convex Optimization, Found. Comput. Math. 9:717–772, 2009. https://doi.org/10.1007/s10208-009-9045-5
  • K. J. Arrow, L. Hurwicz, H. Uzawa, Studies in Linear and Non-Linear Programming, Stanford University Press, 1958.
12 thms2 active usersReviewed
🏆Completed
Mathematical Physics·Captain: ShapeZero

The passivity-admissible couplings have dimension n² = dim u(n)Textbook

Motivation

The Shape Zero model (Shape Zero LLC, unpublished) aims to obtain all three factors of the Standard Model gauge structure — U(1)U(1)U(1), SU(2)SU(2)SU(2) and SU(3)SU(3)SU(3) — from a single linear-algebra statement applied at three node sizes. A node carrying nnn oscillator pairs has a 2n2n2n-dimensional real state space with a complex structure JJJ. Within the model, the couplings that do no net work (passive couplings) are the symmetric matrices, and those that respect JJJ are the ones commuting with it. The claim is that the couplings satisfying both conditions form a real vector space of dimension exactly n2n^2n2, which is the dimension of the unitary Lie algebra u(n)\mathfrak{u}(n)u(n) (Unitary group):

node size nnnadmissible dimensionLie algebra
11u(1)\mathfrak{u}(1)u(1)
24u(2)=u(1)⊕su(2)\mathfrak{u}(2) = \mathfrak{u}(1) \oplus \mathfrak{su}(2)u(2)=u(1)⊕su(2)
39u(3)=u(1)⊕su(3)\mathfrak{u}(3) = \mathfrak{u}(1) \oplus \mathfrak{su}(3)u(3)=u(1)⊕su(3)

The dimension count has so far been checked numerically for n=1,…,5n = 1, \dots, 5n=1,…,5 only, giving 1,4,9,16,251, 4, 9, 16, 251,4,9,16,25. A machine-checked proof covers every nnn, and it is the claim a physicist examining the model would check first.

What this mission does NOT prove. This mission proves the linear algebra: symmetric matrices commuting with JJJ form a space of dimension n2n^2n2. It does not prove the physics step that passivity forces a coupling to be symmetric. That step is a separate premise of the model, and a completed mission must not be read as establishing it.

Setting

Fix a natural number nnn. Consider real 2n×2n2n \times 2n2n×2n matrices, with rows and columns indexed by two copies of {0,…,n−1}\{0, \dots, n-1\}{0,…,n−1}, so that each matrix is written in 2×22 \times 22×2 block form with n×nn \times nn×n blocks:

W=(ABCD).W = \begin{pmatrix} A & B \\ C & D \end{pmatrix}.W=(AC​BD​).

Let III be the n×nn \times nn×n identity matrix and define the standard complex structure

J=(0−II0),J = \begin{pmatrix} 0 & -I \\ I & 0 \end{pmatrix},J=(0I​−I0​),

which satisfies J2=−1J^2 = -1J2=−1. In the Lean development this matrix is PassivityUn.stdJ n, and the index type is PassivityUn.Blk n, the disjoint union of two copies of Fin n.

Two real linear subspaces of the 4n24n^24n2-dimensional space of such matrices are defined:

  1. symm n: the symmetric matrices, WT=WW^{\mathsf T} = WWT=W;
  2. commJ n: the matrices commuting with JJJ, WJ=JWWJ = JWWJ=JW.

The admissible coupling class admissible n is their intersection:

An={ W∈R2n×2n:WT=W and WJ=JW }.\mathcal{A}_n = \{\, W \in \mathbb{R}^{2n \times 2n} : W^{\mathsf T} = W \ \text{and}\ WJ = JW \,\}.An​={W∈R2n×2n:WT=W and WJ=JW}.

Formalization targets

Goal: the admissible class has dimension n2n^2n2

dim⁡RAn=n2for every n∈N.\dim_{\mathbb{R}} \mathcal{A}_n = n^2 \qquad \text{for every } n \in \mathbb{N}.dimR​An​=n2for every n∈N.

This is PassivityUn.admissible_finrank. It asserts the exact dimension for all nnn at once, not for a particular node size.

Milestones

  1. M1. J⋅J=−1J \cdot J = -1J⋅J=−1, so JJJ is a complex structure.
  2. M2. A block matrix (ABCD)\begin{pmatrix} A & B \\ C & D \end{pmatrix}(AC​BD​) commutes with JJJ exactly when D=AD = AD=A and B=−CB = -CB=−C.
  3. M3. A block matrix (A−BBA)\begin{pmatrix} A & -B \\ B & A \end{pmatrix}(AB​−BA​) is symmetric exactly when AT=AA^{\mathsf T} = AAT=A and BT=−BB^{\mathsf T} = -BBT=−B.
  4. M4. The dimension counts of symmetric and antisymmetric n×nn \times nn×n matrices add to n2n^2n2: n(n+1)2+n(n−1)2=n2\tfrac{n(n+1)}{2} + \tfrac{n(n-1)}{2} = n^22n(n+1)​+2n(n−1)​=n2.

Significance

The result itself. The goal identifies the admissible coupling class with the real form of the n×nn \times nn×n Hermitian matrices, the space whose dimension is that of u(n)\mathfrak{u}(n)u(n) (Hermitian matrix). Applied at n=1,2,3n = 1, 2, 3n=1,2,3 it gives the dimensions 111, 444 and 999, which the Shape Zero model matches with u(1)\mathfrak{u}(1)u(1), u(2)=u(1)⊕su(2)\mathfrak{u}(2) = \mathfrak{u}(1) \oplus \mathfrak{su}(2)u(2)=u(1)⊕su(2) and u(3)=u(1)⊕su(3)\mathfrak{u}(3) = \mathfrak{u}(1) \oplus \mathfrak{su}(3)u(3)=u(1)⊕su(3). Without a proof for general nnn, the model rests on a finite numerical check.

Formalizing it. The underlying fact is standard linear algebra, a special case of the correspondence between real matrices commuting with a complex structure and complex-linear maps (Linear complex structure). No machine-checked statement of this exact dimension count was found in the platform library. The mission produces a verified, general-nnn statement whose hypotheses are fully explicit, and it separates the verified linear algebra from the unverified physical premise.

Difficulty

Every step is standard linear algebra, so the difficulty is in the formal bookkeeping rather than the mathematics. The dimension of a subspace defined by equations is not computed by any Mathlib tactic. It has to be obtained by exhibiting an explicit linear equivalence with spaces of known dimension, and that requires moving between the 2n×2n2n \times 2n2n×2n matrix indexed by a disjoint union and its four n×nn \times nn×n blocks. Checking small cases numerically, as has already been done, does not extend to a statement about every nnn.

Formalization scope

  • Matrices are real (ℝ), not complex. The complex structure enters only through the fixed real matrix JJJ.
  • Matrices are indexed by Fin n ⊕ Fin n (PassivityUn.Blk n) rather than Fin (2n), so that block decomposition via Mathlib's Matrix.fromBlocks is direct. The first copy of Fin n indexes the upper/left blocks.
  • Each condition is defined as the kernel of a linear map: symmetry as the kernel of W↦WT−WW \mapsto W^{\mathsf T} - WW↦WT−W, and commuting with JJJ as the kernel of W↦WJ−JWW \mapsto WJ - JWW↦WJ−JW. Both are therefore subspaces by construction, with no hand-written closure proofs.
  • Dimension is Module.finrank ℝ. The ambient space is finite-dimensional, so the convention that finrank of an infinite-dimensional space is 000 never applies.
  • The case n=0n = 0n=0 is included, and there the statement reads 0=00 = 00=0. This is not a trivialization: the claim is quantified over all nnn, and every n≥1n \ge 1n≥1 is a nontrivial instance.
  • M4 is stated with natural-number division and truncated subtraction. Both are exact here, because n(n±1)n(n \pm 1)n(n±1) is always even and n⋅(n−1)=0n \cdot (n - 1) = 0n⋅(n−1)=0 when n=0n = 0n=0.

The development needs only Mathlib's block matrices, transpose, linear maps and finrank. The block-characterization lemmas (M2, M3) are reusable for any statement relating real matrices commuting with JJJ to complex matrices. Contributions are welcome on the milestones and on the assembling isomorphism.

Selected references

  • B. C. Hall, Lie Groups, Lie Algebras, and Representations: An Elementary Introduction, 2nd ed., Graduate Texts in Mathematics 222, Springer, 2015. https://doi.org/10.1007/978-3-319-13467-3
  • Wikipedia, Unitary group. https://en.wikipedia.org/wiki/Unitary_group
  • Wikipedia, Linear complex structure. https://en.wikipedia.org/wiki/Linear_complex_structure
  • Wikipedia, Hermitian matrix. https://en.wikipedia.org/wiki/Hermitian_matrix
  • Mathlib, Mathlib.Data.Matrix.Block (block matrices, Matrix.fromBlocks). https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Matrix/Block.html
7 thms2 active usersReviewed
🏆Completed
Machine LearningProbability·Captain: Minghui

Fine-Tuning Can Distort Pretrained Features: Perfect-Feature LP-FT SeparationResearch Paper

Why initialization matters for transfer learning

Transfer learning starts with a representation learned on an earlier task and adapts it to a new one. Two common choices are linear probing, which changes only the final linear predictor, and fine-tuning, which changes the representation as well. These procedures optimize related training objectives, but their behavior away from the training data can differ. Kumar and coauthors study this distinction through two-layer linear networks, alongside experiments with nonlinear networks. This mission formalizes their perfect-feature LP-FT result, rather than the empirical claims or the general imperfect-feature comparison. See Section 3.4, Proposition 3.7, PDF p. 10.

LP-FT first learns a head by linear probing and then uses that head to initialize full fine-tuning. The perfect-feature setting isolates the effect of head initialization: the representation already contains exactly the features needed to predict the labels, but the head initially need not use them correctly. The mathematical question is whether joint training preserves or loses the representation's ability to predict outside the observed training subspace.

Linear predictors, training data, and OOD loss

An input is a vector x∈Rdx\in\mathbb R^dx∈Rd. A feature extractor is a matrix B∈Rk×dB\in\mathbb R^{k\times d}B∈Rk×d, and a head is a vector v∈Rkv\in\mathbb R^kv∈Rk. Together they predict v⊤Bxv^\top Bxv⊤Bx, with effective weight vector B⊤vB^\top vB⊤v. The fixed matrix X∈Rn×dX\in\mathbb R^{n\times d}X∈Rn×d contains the nnn training inputs as rows. Their span is S=rowspace⁡(X)S=\operatorname{rowspace}(X)S=rowspace(X), with dimension mmm.

The ground truth has orthonormal-row features B⋆B_\starB⋆​ and a nonzero head v⋆v_\starv⋆​. Write w⋆=B⋆⊤v⋆w_\star=B_\star^\top v_\starw⋆​=B⋆⊤​v⋆​ and Y=Xw⋆Y=Xw_\starY=Xw⋆​. Perfect pretrained features mean B0=UB⋆B_0=UB_\starB0​=UB⋆​ for an orthogonal matrix UUU. The corresponding aligned head is u=Uv⋆u=Uv_\staru=Uv⋆​. The dimensions satisfy 1≤k≤m1\le k\le m1≤k≤m and m+k<dm+k<dm+k<d.

The two geometric assumptions require the orthogonal projections from R0=rowspace⁡(B0)R_0=\operatorname{rowspace}(B_0)R0​=rowspace(B0​) into SSS and into S⊥S^\perpS⊥ to be injective. In this dimension regime these are exactly the positive largest-principal-angle cosine conditions used by the paper. They demand more than two subspaces having some nonorthogonal directions. The Lean definition spells out injectivity of v↦ΠTB0⊤vv\mapsto\Pi_T B_0^\top vv↦ΠT​B0⊤​v for each T∈{S,S⊥}T\in\{S,S^\perp\}T∈{S,S⊥}. See Definition 3.2 and Appendix A.1, PDF pp. 7 and 22-23.

An out-of-distribution law μ\muμ is any probability measure on Rd\mathbb R^dRd with a finite second moment and positive-definite uncentered second-moment matrix Σ=Eμ[xx⊤]\Sigma=\mathbb E_\mu[xx^\top]Σ=Eμ​[xx⊤]. Its mean need not be zero. Define

LOOD(v,B)=Ex∼μ[(v⊤Bx−w⋆⊤x)2].L_{\rm OOD}(v,B)=\mathbb E_{x\sim\mu} [(v^\top Bx-w_\star^\top x)^2].LOOD​(v,B)=Ex∼μ​[(v⊤Bx−w⋆⊤​x)2].

Both training methods use the unnormalized loss L^(v,B)=∥XB⊤v−Y∥22\widehat L(v,B)=\|XB^\top v-Y\|_2^2L(v,B)=∥XB⊤v−Y∥22​. Fine-tuning follows its gradient flow in both parameters; linear probing keeps B=B0B=B_0B=B0​. Time is real and nonnegative. These are the paper's equations (3.2)-(3.3), PDF p. 6.

Formalization targets

The goal is Proposition 3.7 in an explicit nonzero-signal regime. For σ>0\sigma>0σ>0, initialize an FT head with independent Gaussian coordinates, v0∼N(0,σ2Ik)v_0\sim\mathcal N(0,\sigma^2I_k)v0​∼N(0,σ2Ik​). Establish

Pr⁡ ⁣[∀t≥0,LOOD(vFT(t),BFT(t))>0]=1.\Pr\!\left[\forall t\ge0,\quad L_{\rm OOD}(v_{\rm FT}(t),B_{\rm FT}(t))>0\right]=1.Pr[∀t≥0,LOOD​(vFT​(t),BFT​(t))>0]=1.

Linear probing, from any initial head, must converge to uuu. Fine-tuning initialized at its limit must satisfy

vLP(t)⟶u,∀t≥0,LOOD(vLP-FT(t),BLP-FT(t))=0.v_{\rm LP}(t)\longrightarrow u,\qquad \forall t\ge0,\quad L_{\rm OOD}(v_{\rm LP\text{-}FT}(t),B_{\rm LP\text{-}FT}(t))=0.vLP​(t)⟶u,∀t≥0,LOOD​(vLP-FT​(t),BLP-FT​(t))=0.

The probability-one event applies to all times simultaneously. The goal also asserts existence of the relevant global flows; a conditional claim about a possibly nonexistent trajectory would not suffice. The statement does not assert a numerical error lower bound or a positive time-infimum.

Seven milestones supply the supporting results: global flow existence and FT uniqueness; unchanged features orthogonal to the training span; the balancedness invariant; the second-moment identity for OOD risk; almost-sure Gaussian head misalignment; exact LP recovery; and stationarity after LP initialization. The principal source is Appendices A.2 and A.7, PDF pp. 23-31 and 45-47.

What the result establishes

The result distinguishes two initializations of the same joint-training procedure. In this idealized setting, a head obtained by linear probing gives zero OOD loss throughout subsequent fine-tuning, while a Gaussian head almost surely has positive OOD loss at every finite time. The conclusion concerns population squared prediction error, not classification accuracy or a finite test-set estimate.

The paper establishes the mathematical claim; this mission asks for a Lean proof of the stated model and result. The scope is deliberately limited to perfect pretrained features. It does not claim an LP-FT upper bound for imperfect features, which the authors identify as a further challenge in Section 3.4, PDF p. 10. A completed development would also provide reusable components for finite dimensional gradient flows, factorized linear models, and population risk.

Why the proof needs the training dynamics

The training loss alone does not select a unique effective predictor in an overparameterized problem. Knowing that a predictor fits the observed examples therefore does not determine its OOD loss. Formalization must track the head and feature extractor together, and it must distinguish parameter stationarity from a claim that a derivative happens to vanish at one time. The Gaussian conclusion also requires one event controlling an uncountable set of times; separate probability-one statements for individual times would be weaker.

Formalization scope and conventions

Vectors use Mathlib's finite dimensional real Euclidean spaces. Matrices are represented as continuous linear maps, with Euclidean adjoints and operator norms. The feature update is written explicitly as the Frobenius-gradient equation; it is not a gradient with respect to the operator norm. Differentiability is imposed within [0,∞)[0,\infty)[0,∞), including the right derivative at zero.

The dimensions, nonzero target, positive Gaussian scale, finite second moments, and projection injectivity are explicit. The nonzero target restricts the formalization to the regime of the Gaussian alignment argument in Lemma A.12; k≤mk\le mk≤m makes the identifiability condition used in Proposition A.20 precise. The random-head law is the scaled standard Gaussian measure. No randomness of the fixed training matrix or independence from an additional data draw is assumed.

The model contains no assumed convergence, invariant, or desired risk bound. Each of those is a theorem obligation. The well-posedness milestone makes explicit an analytic prerequisite of the source's flow notation. The risk milestone uses the identity in (A.29)-(A.32), avoiding the reversed inequality printed in (A.28). The quantitative constant in Theorem 3.3 is outside this mission. Source-aligned proofs and the supporting analysis infrastructure are welcome; changing the learning rule or assuming a milestone inside the model would change the task.

Selected references

  • Ananya Kumar, Aditi Raghunathan, Robbie Jones, Tengyu Ma, and Percy Liang, Fine-Tuning can Distort Pretrained Features and Underperform Out-of-Distribution, ICLR 2022, arXiv:2202.10054v1. Main target: Section 3.4, Proposition 3.7, PDF p. 10, equations (3.10)-(3.11); proof: Appendix A.7, PDF pp. 45-47, Proposition A.20 and (A.208)-(A.218). Supporting invariants: Appendix A.2, PDF p. 24, Lemmas A.3-A.4, equations (A.15)-(A.20). Gaussian alignment: Appendix A.3, PDF pp. 34-35, Lemmas A.11-A.12.
9 thms1 active userReviewed
🏆Completed
Mathematical Physics·Captain: ShapeZero

The spectrum of the octonionic two-generator flowTextbook

Motivation

This mission is pure mathematics about objects it defines itself: an octonion multiplication built from the Fano plane of the companion mission The role postulates force exactly seven points, and the matrix of the linear map

p  ↦  p a+b pp \;\mapsto\; p\,a + b\,pp↦pa+bp

for two unit imaginary octonions a,ba, ba,b. It is motivated by the two-generator D8 flow ψ˙=ψa+bψ\dot\psi = \psi a + b\psiψ˙​=ψa+bψ in the Shape Zero derivation (00_START_HERE/MODEL_SPEC.md §1b; 02_synthesis/D8_SYNTHESIS.md). The statements below do not depend on that motivation.

Result. For a=e1a = e_1a=e1​ and b=c e1+s e2b = c\,e_1 + s\,e_2b=ce1​+se2​ with c2+s2=1c^2 + s^2 = 1c2+s2=1, the characteristic polynomial of M=Ra+LbM = R_a + L_bM=Ra​+Lb​ is

X2 (X2+4) (X2+(2−2c))2.X^2\,(X^2 + 4)\,\bigl(X^2 + (2 - 2c)\bigr)^2 .X2(X2+4)(X2+(2−2c))2.

With c=cos⁡θc = \cos\thetac=cosθ, 2−2c=4sin⁡2(θ/2)2 - 2c = 4\sin^2(\theta/2)2−2c=4sin2(θ/2), so the eigenvalues are 0,0,±2i0, 0, \pm 2i0,0,±2i and ±2isin⁡(θ/2)\pm 2i\sin(\theta/2)±2isin(θ/2) (each twice), and the ratio of the two nonzero frequencies is 1/sin⁡(θ/2)1/\sin(\theta/2)1/sin(θ/2).

What this mission does NOT prove.

  • Only the canonical pair. It proves the result for a=e1a = e_1a=e1​, b=cos⁡θ e1+sin⁡θ e2b = \cos\theta\, e_1 + \sin\theta\, e_2b=cosθe1​+sinθe2​. That every pair of unit imaginary octonions at angle θ\thetaθ gives the same spectrum follows from the classical fact that G2G_2G2​ acts transitively on such pairs — not formalized here.
  • Nothing about any model. It says nothing about which angle, if any, a physical model selects, or whether the D8 flow plays a role in one.
  • One orientation. The octonion table uses one orientation of the Fano lines; all valid orientations give isomorphic algebras, and the spectrum is basis-independent, but only this table is formalized.

Setting

Write e0=1,e1,…,e7e_0 = 1, e_1, \dots, e_7e0​=1,e1​,…,e7​ for the standard basis of R8\mathbb{R}^8R8. The imaginary unit eue_ueu​ (u=1,…,7u = 1, \dots, 7u=1,…,7) is labelled by the Fano point u−1u - 1u−1. For each line {l,l+1,l+3}\{l, l+1, l+3\}{l,l+1,l+3} (mod 777) of the companion mission's Fano plane RolesForceSeven.fanoLine, the product is oriented cyclically along the ordered triple (l,l+1,l+3)(l, l+1, l+3)(l,l+1,l+3):

el+1 el+2=el+4,el+2 el+4=el+1,el+4 el+1=el+2e_{l+1}\,e_{l+2} = e_{l+4}, \qquad e_{l+2}\,e_{l+4} = e_{l+1}, \qquad e_{l+4}\,e_{l+1} = e_{l+2}el+1​el+2​=el+4​,el+2​el+4​=el+1​,el+4​el+1​=el+2​

(unit indices mod 777, shifted into 1,…,71, \dots, 71,…,7), with the reversed products negative, eu2=−1e_u^2 = -1eu2​=−1, and e0e_0e0​ the identity. This defines OctonionD8.octTable and the bilinear product OctonionD8.omul on R8\mathbb{R}^8R8.

For a,b∈R8a, b \in \mathbb{R}^8a,b∈R8, Rmat a is the matrix of p↦p ap \mapsto p\,ap↦pa and Lmat b the matrix of p↦b pp \mapsto b\,pp↦bp (column jjj is the image of eje_jej​). The flow matrix is

M=flowMat  c  s=Re1+Lce1+se2.M = \texttt{flowMat}\;c\;s = R_{e_1} + L_{c e_1 + s e_2}.M=flowMatcs=Re1​​+Lce1​+se2​​.

The Fano plane is imported from the companion mission, not restated. The reordering blockEquiv and the two blocks blockA c s, blockB c s are defined explicitly for the milestones.

Formalization targets

Goal: the characteristic polynomial

c2+s2=1  ⟹  χM(X)=X2 (X2+4) (X2+(2−2c))2.c^2 + s^2 = 1 \;\Longrightarrow\; \chi_M(X) = X^2\,(X^2 + 4)\,\bigl(X^2 + (2 - 2c)\bigr)^2 .c2+s2=1⟹χM​(X)=X2(X2+4)(X2+(2−2c))2.

This is OctonionD8.flow_charpoly. The hypothesis c2+s2=1c^2 + s^2 = 1c2+s2=1 is the only one, and it is needed: without it the characteristic polynomial differs.

Milestones — the proof outline

The proof goes through an invariant-subspace decomposition. Reorder the basis as (e0,e1,e2,e4∣e3,e5,e6,e7)(e_0, e_1, e_2, e_4 \mid e_3, e_5, e_6, e_7)(e0​,e1​,e2​,e4​∣e3​,e5​,e6​,e7​) (OctonionD8.blockEquiv).

  1. M1 (block-diagonal form). For all real c,sc, sc,s, in the reordered basis MMM is block diagonal: M=(A00B)M = \begin{pmatrix} A & 0 \\ 0 & B \end{pmatrix}M=(A0​0B​), with explicit 4×44\times44×4 blocks AAA on (e0,e1,e2,e4)(e_0, e_1, e_2, e_4)(e0​,e1​,e2​,e4​) and BBB on (e3,e5,e6,e7)(e_3, e_5, e_6, e_7)(e3​,e5​,e6​,e7​) (OctonionD8.blockA, OctonionD8.blockB).
  2. M2 (block AAA). If c2+s2=1c^2 + s^2 = 1c2+s2=1, then χA(X)=X2 (X2+4)\chi_A(X) = X^2\,(X^2 + 4)χA​(X)=X2(X2+4).
  3. M3 (block BBB). If c2+s2=1c^2 + s^2 = 1c2+s2=1, then χB(X)=(X2+(2−2c))2\chi_B(X) = \bigl(X^2 + (2 - 2c)\bigr)^2χB​(X)=(X2+(2−2c))2.

The goal follows: the characteristic polynomial is unchanged by reordering the basis, and that of a block-diagonal matrix is the product of the blocks' characteristic polynomials.

Further results (after the goal)

  • It is the octonions: the norm is multiplicative. For all p,q∈R8p, q \in \mathbb{R}^8p,q∈R8, ∑k(pq)k2=(∑ipi2)(∑jqj2)\sum_k (pq)_k^2 = \bigl(\sum_i p_i^2\bigr)\bigl(\sum_j q_j^2\bigr)∑k​(pq)k2​=(∑i​pi2​)(∑j​qj2​) — the eight-square identity, which certifies that the table defines a normed (composition) algebra, the octonions, rather than some other algebra.
  • The flow conserves the norm. MT=−MM^{\mathsf T} = -MMT=−M.
  • An annihilating polynomial. If c2+s2=1c^2 + s^2 = 1c2+s2=1, then M (M2+4) (M2+(2−2c))=0M\,(M^2 + 4)\,\bigl(M^2 + (2 - 2c)\bigr) = 0M(M2+4)(M2+(2−2c))=0.

Corollary: the frequencies

For 0<θ<π0 < \theta < \pi0<θ<π, with c=cos⁡θc = \cos\thetac=cosθ and s=sin⁡θs = \sin\thetas=sinθ, the roots over C\mathbb{C}C of the characteristic polynomial, with multiplicity, are exactly

0, 0, ±2i, ±2isin⁡(θ/2), ±2isin⁡(θ/2),0,\ 0,\ \pm 2i,\ \pm 2i\sin(\theta/2),\ \pm 2i\sin(\theta/2),0, 0, ±2i, ±2isin(θ/2), ±2isin(θ/2),

and 0<sin⁡(θ/2)<10 < \sin(\theta/2) < 10<sin(θ/2)<1. So the two nonzero frequencies 222 and 2sin⁡(θ/2)2\sin(\theta/2)2sin(θ/2) are distinct, and their ratio is 1/sin⁡(θ/2)1/\sin(\theta/2)1/sin(θ/2). Uses 2−2cos⁡θ=4sin⁡2(θ/2)2 - 2\cos\theta = 4\sin^2(\theta/2)2−2cosθ=4sin2(θ/2).

Significance

The result itself. It gives the spectrum of the two-generator flow for the canonical pair in closed form, for every angle, from an octonion table built on the formalized Fano plane.

Formalizing it. The spectrum had been checked numerically and symbolically only.

Numerical and symbolic cross-check (independent code)

checkresult
table from the companion mission's Fano lines is a normed algebra (200 random pairs)true
eigenvalue magnitudes {0×2, 2sin⁡(θ/2)×4, 2×2}\{0 \times 2,\ 2\sin(\theta/2) \times 4,\ 2 \times 2\}{0×2, 2sin(θ/2)×4, 2×2} at 5°, 30°, 60°, 76.3°, 90°, 120°, 150°max error 1.8×10−151.8\times10^{-15}1.8×10−15
symbolic characteristic polynomial (sympy, s2=1−c2s^2 = 1 - c^2s2=1−c2)X2(X2+4)(X2+2−2c)2X^2(X^2 + 4)(X^2 + 2 - 2c)^2X2(X2+4)(X2+2−2c)2

These agree with the repository's shape_zero_tests/d8_closed_form.py (frequencies {0,2sin⁡(θ/2),2}\{0, 2\sin(\theta/2), 2\}{0,2sin(θ/2),2} to 5×10−115\times10^{-11}5×10−11), which uses a different octonion table.

Difficulty

Moderate. The goal needs the characteristic polynomial of an 8×88\times88×8 matrix with symbolic entries; a direct determinant expansion is expensive. The milestones take the invariant-subspace route: the block-diagonal form (M1) is an entrywise computation from the octonion table, and each 4×44\times44×4 block's characteristic polynomial (M2, M3) is a small determinant, reduced with c2+s2=1c^2 + s^2 = 1c2+s2=1. The further results are large but mechanical polynomial identities (the eight-square identity; the annihilating polynomial), where the risk is performance, not ideas.

Formalization scope

  • Vectors are Fin 8 → ℝ; matrices are Matrix (Fin 8) (Fin 8) ℝ, with column jjj the image of the basis vector eje_jej​.
  • The characteristic polynomial is Mathlib's Matrix.charpoly over R\mathbb{R}R; the corollary maps it to C\mathbb{C}C and uses Polynomial.roots, a multiset, so multiplicities are part of the statement.
  • The table is one fixed orientation of the Fano lines; G2G_2G2​-invariance and other orientations are out of scope.

Selected references

  • Wikipedia, Octonion. https://en.wikipedia.org/wiki/Octonion
  • Wikipedia, Fano plane. https://en.wikipedia.org/wiki/Fano_plane
  • Shape Zero repository (motivation only). https://github.com/ShapeZeroSZ/shape-zero
11 thms1 active userReviewed
🏆Completed
Mathematical Physics·Captain: ShapeZero

Zero net power forces every link coupling to be symmetric, in any dimensionTextbook

Motivation

The Shape Zero model (Shape Zero LLC, unpublished) couples neighbouring nodes through a velocity-dependent force, one coupling matrix per link. The companion mission Zero net power forces every link coupling to be symmetric (rings of ≥ 3 sites) proves that a coupling doing no net work (a passive coupling) must have every link matrix symmetric — but only on a one-dimensional ring. The model's base is three-dimensional. This mission extends the result to a periodic cubic lattice with any number q of spatial axes, so it covers q = 3 directly and reduces exactly to the ring result at q = 1.

What this mission does NOT prove. As with the companion missions, commuting with the complex structure JJJ is not derived here; it remains a modelling premise. This mission shows only that passivity forces symmetry on every link in every direction.

Setting

Fix natural numbers qqq (number of axes), LLL (sites along each axis) and ddd. A site is a point x∈(Z/LZ)qx \in (\mathbb{Z}/L\mathbb{Z})^qx∈(Z/LZ)q of the periodic cubic lattice; x±eax \pm e_ax±ea​ is the site one step forward or back along axis aaa, wrapping around. Each link — a site xxx together with an axis aaa — carries its own real d×dd\times dd×d matrix W(x,a)W(x,a)W(x,a), and each site carries a velocity v(x)∈Rdv(x) \in \mathbb{R}^dv(x)∈Rd. The force on site xxx is

F(x)=∑a(W(x,a) v(x+ea)−W(x−ea,a) v(x−ea)),F(x) = \sum_{a} \Bigl( W(x,a)\, v(x+e_a) - W(x-e_a,a)\, v(x-e_a) \Bigr),F(x)=a∑​(W(x,a)v(x+ea​)−W(x−ea​,a)v(x−ea​)),

where the second term uses the matrix of the link behind xxx. The total power is

PW(v)=∑xv(x)⋅F(x).P_W(v) = \sum_{x} v(x) \cdot F(x).PW​(v)=x∑​v(x)⋅F(x).

In Lean, sites are Site q L = Fin q → Fin L, the step is shift x a s (update coordinate aaa by sss in Fin L), and the power is PassivityTorus.power q L d W v. The coupling is passive when PW(v)=0P_W(v) = 0PW​(v)=0 for every vvv.

Formalization targets

Goal: passive if and only if every link is symmetric (L≥3L \ge 3L≥3)

L≥3  ⟹  (∀v,  PW(v)=0)  ⟺  (∀x,a,  W(x,a)T=W(x,a)).L \ge 3 \;\Longrightarrow\; \Bigl(\forall v,\; P_W(v) = 0\Bigr) \iff \Bigl(\forall x, a,\; W(x,a)^{\mathsf T} = W(x,a)\Bigr).L≥3⟹(∀v,PW​(v)=0)⟺(∀x,a,W(x,a)T=W(x,a)).

This is PassivityTorus.passive_iff_symm, for every qqq and ddd.

Milestones

  1. M1. Stepping back then forward along an axis returns to the start.
  2. M2 (power identity, every qqq, LLL). PW(v)=∑x∑av(x)⋅((W(x,a)−W(x,a)T) v(x+ea))P_W(v) = \sum_x \sum_a v(x) \cdot \bigl((W(x,a) - W(x,a)^{\mathsf T})\, v(x+e_a)\bigr)PW​(v)=∑x​∑a​v(x)⋅((W(x,a)−W(x,a)T)v(x+ea​)).
  3. M3 (symmetric links are passive, every LLL).
  4. M4 (passive forces symmetric, L≥3L \ge 3L≥3).

Significance

The result itself. It is the dimension-independent form of the passivity theorem: whatever the number of spatial axes, a per-link coupling does no net work for every motion exactly when every link matrix is symmetric. It removes the one-dimensional restriction from the step that justifies restricting the model's coupling class to symmetric matrices.

Formalizing it. The ring result has been machine-checked; the lattice extension had been checked numerically only (identity error ≤3.6×10−14\le 3.6\times10^{-14}≤3.6×10−14 at (q,L)=(1,3),(2,3),(3,3),(3,4)(q,L) = (1,3), (2,3), (3,3), (3,4)(q,L)=(1,3),(2,3),(3,3),(3,4)). A proof covers every qqq, L≥3L \ge 3L≥3 and ddd.

Difficulty

The algebra is the ring argument; the difficulty is bookkeeping. The incoming term must be reindexed by the one-step shift, which is a bijection of the torus, and the converse needs a test motion supported on two neighbouring sites xxx and x+eax+e_ax+ea​ together with a proof that no other link joins them.

The hypothesis L≥3L \ge 3L≥3 is necessary. At L=2L = 2L=2 the step forward and the step back along an axis reach the same site. This is proved (in Lean, locally): for every q≥1q \ge 1q≥1, putting the same non-symmetric matrix (0100)\begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}(00​10​) on every link of the L=2L = 2L=2 lattice gives exactly zero power for every velocity field, so passivity does not force symmetry there. Weakening the hypothesis makes the goal false.

Formalization scope

  • The lattice is periodic in every axis, with the same LLL along each; [NeZero L] is needed for the literal 111 in Fin L and is implied by L≥3L \ge 3L≥3 in the goal.
  • There is one matrix per site per axis, with no relation assumed between links.
  • Passivity is quantified over all velocity fields; everything is real.
  • q=0q = 0q=0 (a single site, no links) and d=0d = 0d=0 are included; both sides of the goal hold trivially there, and this is not a trivialization since the statement is quantified over all qqq and ddd.

Selected references

  • Wikipedia, Symmetric matrix. https://en.wikipedia.org/wiki/Symmetric_matrix
  • Wikipedia, Passivity (engineering). https://en.wikipedia.org/wiki/Passivity_(engineering)
  • Mathlib, Mathlib.Data.Matrix.Mul (dot product ⬝ᵥ, matrix–vector product *ᵥ). https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Matrix/Mul.html
6 thms1 active userReviewed
🏆Completed
Mathematical Physics·Captain: ShapeZero

Zero net power forces every link coupling to be symmetric (rings of ≥ 3 sites)Textbook

Motivation

The Shape Zero model (Shape Zero LLC, unpublished) couples neighbouring nodes on a ring through a velocity-dependent force, with one coupling matrix per link. A companion mission, The passivity-admissible couplings have dimension n² = dim u(n), shows that real matrices which are symmetric and commute with a complex structure JJJ form a space of dimension n2=dim⁡u(n)n^2 = \dim \mathfrak{u}(n)n2=dimu(n). That mission deliberately takes symmetry as given. This mission supplies the reason for it: a coupling that never does net work (a passive coupling) must have every link matrix symmetric, provided the ring has at least three sites.

Together the two missions give the chain

passive  ⟹  every Wi symmetric(this mission),\text{passive} \;\Longrightarrow\; \text{every } W_i \text{ symmetric} \qquad\text{(this mission)},passive⟹every Wi​ symmetric(this mission), symmetric+commutes with J  ⟹  dim⁡=n2(companion mission).\text{symmetric} + \text{commutes with } J \;\Longrightarrow\; \dim = n^2 \qquad\text{(companion mission)}.symmetric+commutes with J⟹dim=n2(companion mission).

What these two missions do NOT prove. Commuting with JJJ is not derived here. It is the requirement that the coupling respect each node's complex structure, and in the model it is imposed, not forced by passivity. After both missions the proved content is: passivity forces symmetry, and symmetric JJJ-compatible couplings have the dimension of u(n)\mathfrak{u}(n)u(n). The JJJ-compatibility step remains a modelling premise. In addition, the coupling space consists of the Hermitian matrices, which match u(n)\mathfrak{u}(n)u(n) in dimension; the Lie algebra u(n)\mathfrak{u}(n)u(n) itself appears only after multiplying by iii (Unitary group).

Setting

Let NNN and ddd be natural numbers with N≥1N \ge 1N≥1. A ring has NNN sites labelled by Z/NZ={0,…,N−1}\mathbb{Z}/N\mathbb{Z} = \{0, \dots, N-1\}Z/NZ={0,…,N−1}, so site N−1N-1N−1 is next to site 000; indices i+1i + 1i+1 and i−1i - 1i−1 are taken modulo NNN. Each site carries a velocity vector vi∈Rdv_i \in \mathbb{R}^dvi​∈Rd, and each link i→i+1i \to i+1i→i+1 carries a real d×dd \times dd×d link matrix WiW_iWi​. The force on site iii is

Fi=Wi vi+1−Wi−1 vi−1,F_i = W_i\, v_{i+1} - W_{i-1}\, v_{i-1},Fi​=Wi​vi+1​−Wi−1​vi−1​,

where the second term uses the previous link's matrix Wi−1W_{i-1}Wi−1​. The total power delivered by the coupling is

PW(v)=∑i∈Z/NZvi⋅(Wi vi+1−Wi−1 vi−1).P_W(v) = \sum_{i \in \mathbb{Z}/N\mathbb{Z}} v_i \cdot \bigl( W_i\, v_{i+1} - W_{i-1}\, v_{i-1} \bigr).PW​(v)=i∈Z/NZ∑​vi​⋅(Wi​vi+1​−Wi−1​vi−1​).

In the Lean development this is PassivityRing.power N d W v, with sites indexed by Fin N (whose addition and subtraction wrap around modulo NNN), vectors in Fin d → ℝ, and ⋅\cdot⋅ the dot product ⬝ᵥ. The coupling is passive when PW(v)=0P_W(v) = 0PW​(v)=0 for every choice of velocities vvv.

Formalization targets

Goal: passive if and only if every link is symmetric (rings of at least 3 sites)

N≥3  ⟹  (∀v,  PW(v)=0)  ⟺  (∀i,  WiT=Wi).N \ge 3 \;\Longrightarrow\; \Bigl( \forall v,\; P_W(v) = 0 \Bigr) \iff \Bigl( \forall i,\; W_i^{\mathsf T} = W_i \Bigr).N≥3⟹(∀v,PW​(v)=0)⟺(∀i,WiT​=Wi​).

This is PassivityRing.passive_iff_symm. It holds for every ddd and every family of link matrices, with no assumption relating different links.

Milestones

  1. M1 (power identity, every NNN). PW(v)=∑ivi⋅((Wi−WiT) vi+1)P_W(v) = \sum_i v_i \cdot \bigl((W_i - W_i^{\mathsf T})\, v_{i+1}\bigr)PW​(v)=∑i​vi​⋅((Wi​−WiT​)vi+1​).
  2. M2 (symmetric links are passive, every NNN). If every WiW_iWi​ is symmetric, then PW(v)=0P_W(v) = 0PW​(v)=0 for all vvv.
  3. M3 (passive forces symmetric, N≥3N \ge 3N≥3). If PW(v)=0P_W(v) = 0PW​(v)=0 for all vvv, then every WiW_iWi​ is symmetric.

Significance

The result itself. The goal turns a physical requirement — no net work for any motion — into an exact algebraic condition on each link separately. It is the step that justifies restricting the companion mission's coupling class to symmetric matrices, so that the dimension count n2n^2n2 applies to the passive couplings of the model rather than to an assumed class.

Formalizing it. The model's claim has so far been checked numerically at ring sizes 1,2,3,4,71, 2, 3, 4, 71,2,3,4,7. A machine-checked proof covers every N≥3N \ge 3N≥3 and every ddd, makes the role of the hypothesis N≥3N \ge 3N≥3 explicit, and separates what is proved (passivity forces symmetry) from what remains a modelling premise (JJJ-compatibility).

Difficulty

The forward direction and the power identity are finite-sum bookkeeping. The central difficulty is the converse: the hypothesis constrains a single scalar quantity summed around the ring, and it must be shown to constrain each link matrix individually. On small rings this fails because distinct terms of the sum coincide, so the argument depends on the ring being large enough that neighbouring sites are genuinely distinct, and in Lean that is modular arithmetic on Fin N.

The hypothesis N≥3N \ge 3N≥3 is necessary, not a convenience:

  • N=1N = 1N=1: the site is its own neighbour on both sides, so the force is W0v0−W0v0=0W_0 v_0 - W_0 v_0 = 0W0​v0​−W0​v0​=0 and the power vanishes for every W0W_0W0​, symmetric or not.
  • N=2N = 2N=2: the power reduces to v0⋅(D−DT) v1v_0 \cdot (D - D^{\mathsf T})\, v_1v0​⋅(D−DT)v1​ with D=W0−W1D = W_0 - W_1D=W0​−W1​, so it depends only on the difference of the two link matrices. Taking both links equal to the same non-symmetric matrix, for example (0100)\begin{pmatrix} 0 & 1 \\ 0 & 0 \end{pmatrix}(00​10​), gives zero power for all velocities.

Weakening the hypothesis to 2≤N2 \le N2≤N, or dropping it, makes the goal false.

Formalization scope

  • Sites are Fin N with its wrap-around arithmetic, so i+1i + 1i+1 and i−1i - 1i−1 go around the ring; [NeZero N] is required for the literal 111 in Fin N and is implied by N≥3N \ge 3N≥3 in the goal.
  • There is one matrix per link, W : Fin N → Matrix (Fin d) (Fin d) ℝ, not a single shared matrix, and no relation between different links is assumed.
  • Passivity is quantified over all velocity configurations v : Fin N → (Fin d → ℝ).
  • Everything is real (ℝ); symmetry is (W i)ᵀ = W i.
  • d=0d = 0d=0 is included; there both sides of the goal hold trivially. This is not a trivialization, since the statement is quantified over all ddd.

M1 and M2 hold for every N≥1N \ge 1N≥1 and carry no ring-size hypothesis; M3 and the goal require N≥3N \ge 3N≥3. The development needs only Mathlib's finite sums, dot products, matrix–vector products and Fin arithmetic.

Selected references

  • B. C. Hall, Lie Groups, Lie Algebras, and Representations: An Elementary Introduction, 2nd ed., Graduate Texts in Mathematics 222, Springer, 2015. https://doi.org/10.1007/978-3-319-13467-3
  • Wikipedia, Unitary group. https://en.wikipedia.org/wiki/Unitary_group
  • Wikipedia, Symmetric matrix. https://en.wikipedia.org/wiki/Symmetric_matrix
  • Mathlib, Mathlib.Data.Matrix.Mul (dot product ⬝ᵥ, matrix–vector product *ᵥ). https://leanprover-community.github.io/mathlib4_docs/Mathlib/Data/Matrix/Mul.html
5 thms1 active userReviewed
PreviousPage 2 of 2Next

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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me