Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Equation (5), p. 5 — gradient of the ℓq residual outside the set, q ∈ (1, ∞)

Proved
ExactPenGNEP.NonShared.eq_5_gradient

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

constrained-optimizationexact-penaltyp2o-batch-pfp2ap2o-gran-per-chapterp2o-plan-paperp2o-v1residual-function

Let S={x∈Rk∣gi(x)≤0, i∈[m]; hj(x)=0, j∈[p]}S = \{x \in \mathbb R^k \mid g_i(x) \le 0,\ i \in [m];\ h_j(x) = 0,\ j \in [p]\}S={x∈Rk∣gi​(x)≤0, i∈[m]; hj​(x)=0, j∈[p]} be finitely representable with differentiable defining functions gi,hj:Rk→Rg_i, h_j : \mathbb R^k \to \mathbb Rgi​,hj​:Rk→R, and let q∈(1,∞)q \in (1, \infty)q∈(1,∞). The ℓq\ell_qℓq​ residual of SSS is

rq(x)=(∑i∈[m]max⁡(gi(x),0)q+∑j∈[p]∣hj(x)∣q)1/q.r_q(x) = \Big( \sum_{i\in[m]} \max(g_i(x), 0)^q + \sum_{j\in[p]} |h_j(x)|^q \Big)^{1/q}.rq​(x)=(i∈[m]∑​max(gi​(x),0)q+j∈[p]∑​∣hj​(x)∣q)1/q.

At every point x∉Sx \notin Sx∈/S, rqr_qrq​ is differentiable and

∇rq(x)=1rqq−1(x)[∑i∈[m](gi+(x))q−1∇gi(x)+∑j∈[p]∣hj(x)∣q−1(sgn⁡hj(x))∇hj(x)],\nabla r_q(x) = \frac{1}{r_q^{q-1}(x)} \Big[ \sum_{i\in[m]} (g_i^+(x))^{q-1} \nabla g_i(x) + \sum_{j\in[p]} |h_j(x)|^{q-1} (\operatorname{sgn} h_j(x)) \nabla h_j(x) \Big],∇rq​(x)=rqq−1​(x)1​[i∈[m]∑​(gi+​(x))q−1∇gi​(x)+j∈[p]∑​∣hj​(x)∣q−1(sgnhj​(x))∇hj​(x)],

where gi+=max⁡(gi,0)g_i^+ = \max(g_i, 0)gi+​=max(gi​,0) and sgn⁡\operatorname{sgn}sgn is 111 on positive numbers, −1-1−1 on negative numbers and 000 at 000.

The formula is used to compute the directional derivative of a player's penalty term at an infeasible penalized equilibrium.

Formalization Note The statement is on Rk\mathbb R^kRk = EuclideanSpace ℝ (Fin k) and gives the Fréchet derivative (HasFDerivAt); the gradient is its Riesz representative. The "Moreover" sentence of p. 5 assumes only that the defining functions are differentiable, so convexity of gig_igi​ and affinity of hhh are not assumed; the formula holds without them.

Preamble
import Mathlib
import Definitions.Def_LeiBR_Sync_NashGame
import Definitions.Def_ExactPenGNEP_NonShared_Setting

open LeiBR.Sync
Formal statement
namespace ExactPenGNEP.NonShared

theorem eq_5_gradient {k m p : ℕ} (g : Fin m → EuclideanSpace ℝ (Fin k) → ℝ)
    (h : Fin p → EuclideanSpace ℝ (Fin k) → ℝ) (q : ℝ) (x : EuclideanSpace ℝ (Fin k))
    (hg : ∀ i, Differentiable ℝ (g i)) (hh : ∀ j, Differentiable ℝ (h j)) (hq : 1 < q)
    (hx : x ∉ {y | (∀ i, g i y ≤ 0) ∧ ∀ j, h j y = 0}) :
    HasFDerivAt (lqRes g h q)
      ((1 / lqRes g h q x ^ (q - 1)) •
        (∑ i, (max (g i x) 0) ^ (q - 1) • fderiv ℝ (g i) x +
          ∑ j, (|h j x| ^ (q - 1) * Real.sign (h j x)) • fderiv ℝ (h j) x)) x := by sorry

end ExactPenGNEP.NonShared
Source
Ba & Pang, Exact penalization of generalized Nash equilibrium problems, arXiv:1811.10674v2, p. 5, Equations (4)–(5)
Human review
  • Endorsed by Shuze Chen · Oct 23, 2026

    Confirmed by the moderator at approval.

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