Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

(28) — closed form of φγ\varphi_\gammaφγ​ for the square loss and the squared ℓq\ell_qℓq​ cost (corrected at γ=∥βˉ∥p2\gamma = \|\bar\beta\|_p^2γ=∥βˉ​∥p2​)

Proved
RWPI.SqrtLasso.eq_28

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

distributionally-robust-optimizationlinear-regressionp2o-batch-pfp2bp2o-gran-per-chapterp2o-plan-paperp2o-v1

Fix q∈(1,∞]q\in(1,\infty]q∈(1,∞] and let ppp satisfy 1/p+1/q=11/p+1/q = 11/p+1/q=1. Let β∈Rd\beta\in\mathbb R^dβ∈Rd, βˉ=(−β,1)\bar\beta = (-\beta,1)βˉ​=(−β,1), and let xˉ=(x,y)∈Rd+1\bar x = (x,y)\in\mathbb R^{d+1}xˉ=(x,y)∈Rd+1 be a point. For the square loss l(uˉ;β)=(βˉTuˉ)2l(\bar u;\beta) = (\bar\beta^T\bar u)^2l(uˉ;β)=(βˉ​Tuˉ)2 and the cost c(uˉ,xˉ)=∥uˉ−xˉ∥q2c(\bar u,\bar x) = \|\bar u-\bar x\|_q^2c(uˉ,xˉ)=∥uˉ−xˉ∥q2​, define φγ(xˉ;β)=sup⁡uˉ∈Rd+1{(βˉTuˉ)2−γ∥xˉ−uˉ∥q2}\varphi_\gamma(\bar x;\beta) = \sup_{\bar u\in\mathbb R^{d+1}}\{(\bar\beta^T\bar u)^2 - \gamma\|\bar x-\bar u\|_q^2\}φγ​(xˉ;β)=supuˉ∈Rd+1​{(βˉ​Tuˉ)2−γ∥xˉ−uˉ∥q2​}. Then for every γ≥0\gamma\ge0γ≥0

φγ(xˉ;β)={(βˉTxˉ)2 γγ−∥βˉ∥p2,if γ>∥βˉ∥p2,0,if γ=∥βˉ∥p2 and βˉTxˉ=0,+∞,otherwise.\varphi_\gamma(\bar x;\beta) = \begin{cases} \big(\bar\beta^T\bar x\big)^2\,\dfrac{\gamma}{\gamma-\|\bar\beta\|_p^2}, & \text{if } \gamma > \|\bar\beta\|_p^2,\\[2mm] 0, & \text{if } \gamma = \|\bar\beta\|_p^2 \text{ and } \bar\beta^T\bar x = 0,\\[1mm] +\infty, & \text{otherwise.}\end{cases}φγ​(xˉ;β)=⎩⎨⎧​(βˉ​Txˉ)2γ−∥βˉ​∥p2​γ​,0,+∞,​if γ>∥βˉ​∥p2​,if γ=∥βˉ​∥p2​ and βˉ​Txˉ=0,otherwise.​

This is the inner supremum of Proposition 1's dual in the setting of Proposition 2; with it the dual becomes a one-dimensional problem in γ\gammaγ.

Correction of the printed statement. The page gives +∞+\infty+∞ for every γ≤∥βˉ∥p2\gamma\le\|\bar\beta\|_p^2γ≤∥βˉ​∥p2​. At γ=∥βˉ∥p2\gamma = \|\bar\beta\|_p^2γ=∥βˉ​∥p2​ the bracket is at most (βˉTxˉ)2+2(βˉTxˉ)(βˉTΔ)(\bar\beta^T\bar x)^2 + 2(\bar\beta^T\bar x)(\bar\beta^T\Delta)(βˉ​Txˉ)2+2(βˉ​Txˉ)(βˉ​TΔ) with Δ=uˉ−xˉ\Delta = \bar u-\bar xΔ=uˉ−xˉ, which is bounded (by 000) when βˉTxˉ=0\bar\beta^T\bar x = 0βˉ​Txˉ=0. The correction does not affect Proposition 2.

Formalization Note The point is a pair z=(x,y)z = (x,y)z=(x,y) and xˉ\bar xxˉ is stack z; ∥⋅∥p\|\cdot\|_p∥⋅∥p​, ∥⋅∥q\|\cdot\|_q∥⋅∥q​ are the norms of PiLp. The value is in [0,∞][0,\infty][0,∞]; φγ\varphi_\gammaφγ​ is the mission's phi with the cost lqSqCost q.

Preamble
import Mathlib
import Definitions.Def_RWPI_SqrtLasso_phi
import Definitions.Def_RWPI_SqrtLasso_squareLoss
import Definitions.Def_RWPI_SqrtLasso_lqSqCost
Formal statement
namespace RWPI.SqrtLasso

/-- Eq. (28) (App. A.1, proof of Proposition 2, p. 29), corrected at the boundary: the closed form
of `φ_γ` for the square loss and the squared `ℓ_q` cost on `ℝ^{d+1}`. With `x̄ = (x, y)`,
`β̄ = (−β, 1)` and `1/p + 1/q = 1`, for `γ ≥ 0`:
`φ_γ(x̄; β) = (β̄ᵀx̄)² γ / (γ − ‖β̄‖_p²)` if `γ > ‖β̄‖_p²`; `0` if `γ = ‖β̄‖_p²` and `β̄ᵀx̄ = 0`;
`+∞` otherwise. (The page prints `+∞` for all `γ ≤ ‖β̄‖_p²`, which is wrong at the single case
`γ = ‖β̄‖_p²`, `β̄ᵀx̄ = 0`.) -/
theorem eq_28 {d : ℕ} (q p : ENNReal) (hq : 1 < q) (hpq : p.HolderConjugate q)
    (β : Fin d → ℝ) (z : (Fin d → ℝ) × ℝ) (γ : ℝ) (hγ : 0 ≤ γ) :
    phi (lqSqCost q) (squareLoss β) γ z =
      if ‖WithLp.toLp p (betaBar β)‖ ^ 2 < γ then
        ENNReal.ofReal ((∑ j, betaBar β j * stack z j) ^ 2 * γ /
          (γ - ‖WithLp.toLp p (betaBar β)‖ ^ 2))
      else if γ = ‖WithLp.toLp p (betaBar β)‖ ^ 2 ∧ ∑ j, betaBar β j * stack z j = 0 then 0
      else ⊤ := by sorry

end RWPI.SqrtLasso
Source
Blanchet, Kang & Murthy, Robust Wasserstein Profile Inference and Applications to Machine Learning, arXiv:1610.05627v4, p. 29, App. A.1, proof of Proposition 2, Eq. (28) (derivation from p. 28)
Human review
  • Endorsed by Shuze Chen · Oct 5, 2026

    Confirmed by the moderator at approval.

  • Endorsed by mikedeng1 · Oct 5, 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