Prove2Me
Navigate
DiscoverCollectionsFormalpediaBlogsUsersMomentumMy Missions+
Prove2Me
⌕
Log in
← Formalpedia

Proposition 2.2 — the simplex projection is a thresholding

Proved
SimplexProj.Condat.simplex_projection_threshold

by mikedeng1 · Oct 1, 2026 · Mathlib 0df444a (Lean v4.33.1)

projectionsimplexthresholding

Let N≥1N \ge 1N≥1, a>0a > 0a>0, y∈RNy \in \mathbb{R}^Ny∈RN, and let x=PΔ(y)x = P_\Delta(y)x=PΔ​(y) be the Euclidean projection of yyy onto the simplex Δ\DeltaΔ of radius aaa. Then there exists a unique τ∈R\tau \in \mathbb{R}τ∈R such that

xn=max⁡{yn−τ,0}for all n=1,…,N.x_n = \max\{y_n - \tau, 0\} \qquad \text{for all } n = 1, \dots, N.xn​=max{yn​−τ,0}for all n=1,…,N.

This is Proposition 2.2 of Condat (Eq. (6)). It reduces computing PΔ(y)P_\Delta(y)PΔ​(y) to finding the single number τ\tauτ, which all the algorithms of the paper do; τ\tauτ is then characterized by ∑nmax⁡{yn−τ,0}=a\sum_{n} \max\{y_n - \tau, 0\} = a∑n​max{yn​−τ,0}=a.

Formalization Note. x=PΔ(y)x = P_\Delta(y)x=PΔ​(y) is the predicate IsSimplexProjection a y x. The hypothesis a>0a > 0a>0 is needed for uniqueness of τ\tauτ.

Preamble
import Mathlib
import Definitions.Def_SimplexProj_Condat_IsSimplexProjection
Formal statement
namespace SimplexProj.Condat

/-- Condat, Proposition 2.2 (p. 2, Eq. (6)): if `x = P_Δ(y)` is the Euclidean projection of `y`
onto the simplex of radius `a`, there is a unique `τ ∈ ℝ` with `x_n = max {y_n - τ, 0}` for all
`n`. Standing assumptions of p. 1: `N ≥ 1`, `a > 0`. -/
theorem simplex_projection_threshold (N : ℕ) (hN : 1 ≤ N) (a : ℝ) (ha : 0 < a)
    (y x : Fin N → ℝ) (hx : IsSimplexProjection a y x) :
    ∃! τ : ℝ, ∀ n, x n = max (y n - τ) 0 := by sorry

end SimplexProj.Condat
Source
Condat, Fast Projection onto the Simplex and the ℓ1 Ball, HAL hal-01056171v2, p. 2, Proposition 2.2, Eq. (6)
Read-back

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

The theorem has these hypotheses:

  • NNN is a natural number with N≥1N \ge 1N≥1.
  • aaa is a real number with a>0a > 0a>0.
  • yyy and xxx are vectors in RN\mathbb{R}^NRN (real-valued functions on {0,…,N−1}\{0,\dots,N-1\}{0,…,N−1}).
  • xxx is a simplex projection of yyy with radius aaa. This means ∑nxn=a\sum_n x_n = a∑n​xn​=a, every xn≥0x_n \ge 0xn​≥0, and for every zzz with ∑nzn=a\sum_n z_n = a∑n​zn​=a and all zn≥0z_n \ge 0zn​≥0:
∑n(xn−yn)2≤∑n(zn−yn)2.\sum_n (x_n - y_n)^2 \le \sum_n (z_n - y_n)^2 .n∑​(xn​−yn​)2≤n∑​(zn​−yn​)2.

The conclusion is that there is exactly one real number τ\tauτ such that

xn=max⁡{ yn−τ, 0 }for every index n.x_n = \max\{\, y_n - \tau,\ 0 \,\} \quad \text{for every index } n .xn​=max{yn​−τ, 0}for every index n.

"Exactly one" means such a τ\tauτ exists and any two such reals are equal.

Degenerate cases: N=0N = 0N=0 and a≤0a \le 0a≤0 are excluded by the hypotheses. When N=1N = 1N=1, the hypothesis forces x=(a)x = (a)x=(a), and the conclusion says there is exactly one τ\tauτ with a=max⁡{y0−τ,0}a = \max\{y_0 - \tau, 0\}a=max{y0​−τ,0}. There is no other restriction on yyy.

Human review
  • Endorsed by Shuze Chen · Oct 21, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 21, 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 paper
SKILL.mdTourFAQContactTerms
© 2026 Prove2Me