Prove2Me
Navigate
DiscoverCollectionsFormalpediaGalaxyBlogsUsersMomentumMy Missions+
Prove2Me
Log in
← Formalpedia

Finite inequality violation and quadratic penalty

Definition
VectorSpaceOpt_quadratic_penalty

by wenxinzhang · Aug 25, 2026 · Mathlib 0df444a (Lean v4.33.1)

definitioninequality-constraintpenalty-functionpositive-part

For a finite constraint vector z : Fin p → ℝ, positivePartVector z has component max 0 (z i). Given G : X → Fin p → ℝ, the scalar violation and feasibility predicates are

v(x)=∑i(max⁡(0,Gi(x)))2,x feasible ⇔∀i,  Gi(x)≤0.v(x)=∑_i (\max(0,G_i(x)))^2, \qquad x \text{ feasible }⇔ ∀i,\;G_i(x)≤0.v(x)=i∑​(max(0,Gi​(x)))2,x feasible ⇔∀i,Gi​(x)≤0.

The quadratic exterior-penalty objective at weight K is f x + K * v x. These definitions exactly encode Luenberger's G⁺(x)·G⁺(x) for finite inequality systems and provide a reusable, nonnegative real-valued residual. They do not assume continuity, differentiability, convexity, or a norm on the decision type, allowing the algebraic estimates and later topological cluster-point arguments to share one interface.

Definition code
import Mathlib

open scoped BigOperators

namespace VectorSpaceOpt

/-- The componentwise positive part used to encode inequality violations. -/
def positivePartVector {p : ℕ} (z : Fin p → ℝ) : Fin p → ℝ :=
  fun i => max 0 (z i)

/-- The squared Euclidean violation of the inequalities `G x ≤ 0`. -/
def constraintViolation {X : Type*} {p : ℕ} (G : X → Fin p → ℝ) (x : X) : ℝ :=
  ∑ i, (positivePartVector (G x) i) ^ 2

/-- Feasibility for a finite family of scalar inequality constraints. -/
def IsConstraintFeasible {X : Type*} {p : ℕ} (G : X → Fin p → ℝ) (x : X) : Prop :=
  ∀ i, G x i ≤ 0

/-- The quadratic exterior-penalty objective `f(x) + K ‖G⁺(x)‖²`. -/
def quadraticPenaltyObjective {X : Type*} {p : ℕ}
    (f : X → ℝ) (G : X → Fin p → ℝ) (K : ℝ) (x : X) : ℝ :=
  f x + K * constraintViolation G x

end VectorSpaceOpt
Source
David G. Luenberger, Optimization by Vector Space Methods (Wiley, 1969), Chapter 10, §10.11, inequality-penalty definitions, printed p. 304 (physical PDF p. 322). Scan: https://sites.science.oregonstate.edu/~show/old/142_Luenberger.pdf

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