Mathlib.Optimization
Optimization helpers staged for Mathlib: weighted-simplex KKT certificates, active-set minimizers, truncation reductions, and boundary-slice selectors.
SimplexActiveSetDefs 5 core · 0 supporting This file contains the shared definitions for the linear-plus-weighted-norm second-order cone program min_{t ∈ Δ_M} Σ αᵢ tᵢ + κ √(Σ βᵢ tᵢ²) over the three-point simplex.
Weighted-simplex active-set SOCP: shared definitions
This file contains the shared definitions for the linear-plus-weighted-norm
second-order cone program
min_{t ∈ Δ_M} Σ αᵢ tᵢ + κ √(Σ βᵢ tᵢ²) over the three-point simplex. It defines
the objective wsObj, simplex membership InSimplex, KKT support data
IsAdmissibleSupport, the induced active-set point activeSetPoint, and the
κ = 0 exposed minimizer face exposedMinFace.
The weighted-simplex objective Σ αᵢ tᵢ + κ √(Σ βᵢ tᵢ²) in three coordinates (t x, t y, t z) indexed by Fin 3.
Membership in the scaled 3-point simplex Δ_M = {t ≥ 0 : Σ tᵢ = M}.
KKT-admissible support/multiplier data for the SOCP: a nonempty support S ⊆ {x,y,z} and multiplier λ with Σ_{i∈S} (λ−αᵢ)²/βᵢ = κ², the strict activity λ > αᵢ on S, and the inactivity λ ≤ αⱼ off S.
Definition (Lean source)
The active-set coordinate formula tᵢ = M ((λ−αᵢ)/βᵢ) / Σ_{h∈S} ((λ−αₕ)/βₕ) on S, and tᵢ = 0 off S.
Definition (Lean source)
The κ = 0 exposed face conv{M eᵢ : αᵢ = minⱼ αⱼ} of Δ_M: the simplex points supported only on the α-minimizing coordinates.
Definition (Lean source)
SimplexTruncationDefs 3 core · 0 supporting The parity-truncated simplex K_d, its boundary segment H_d (truncSegPoint), and the endpoint/interior selector s⋆ (truncSelector).
Weighted-simplex truncation: shared definitions
The parity-truncated simplex K_d, its boundary segment H_d (truncSegPoint),
and the endpoint/interior selector s⋆ (truncSelector). Split out of the main
truncation file so both the convexity/reduction helper and the 1-D slice helper can
reference them.
Membership in the parity-truncated simplex K_d = {t ∈ Δ_M : t_y + t_z ≥ d}.
Definition (Lean source)
The boundary segment H_d: the point with t_x = M − d, t_y = s, t_z = d − s.
Definition (Lean source)
The endpoint/interior selector s⋆ on H_d, with δ = α_y − α_z and A = β_x (M − d)²: s⋆ = 0 if δ ≥ κ d / √(A + d²), s⋆ = d if δ ≤ − κ d / √(A + d²), and otherwise the interior root s⋆ = (d − δ √((A + d²/2)/(κ² − δ²/2)))/2. At κ = 0 the two guards collapse to 0 ≤ δ and δ ≤ 0, recovering the κ = 0 endpoint rule s⋆ = 0 if δ ≥ 0, s⋆ = d if δ ≤ 0.
Definition (Lean source)
SimplexActiveSet 1 core · 0 supporting This file packages the active-set/KKT solution of the linear-plus-weighted-norm second-order cone program min_{t ∈ Δ_M} Σ αᵢ tᵢ + κ √(Σ βᵢ tᵢ²) over the three-point simplex. ★ weighted_simplex_active_set
Weighted-simplex active-set SOCP
This file packages the active-set/KKT solution of the linear-plus-weighted-norm
second-order cone program
min_{t ∈ Δ_M} Σ αᵢ tᵢ + κ √(Σ βᵢ tᵢ²) over the three-point simplex. Strict
convexity for κ > 0 gives a unique minimizer, realized by the admissible
support/multiplier pair; for κ = 0, the minimizer set is the exposed
α-minimizing face. The headline theorem is weighted_simplex_active_set.
The shared definitions live in SimplexActiveSetDefs; the analytic content lives
in WeightedSimplexKKT (κ > 0 optimality), WeightedSimplexExists (admissible
support existence), and WeightedSimplexFace (κ = 0 face).
Weighted-simplex active-set solution. Fix a positive total simplex mass M, linear weights α, coordinate weights β that are all strictly positive, and a nonnegative regularization parameter κ, and consider minimizing the second-order-cone objective Σ αᵢtᵢ + κ·√(Σβᵢtᵢ²) over the three-point simplex Δ_M of total mass M. Then the following two facts hold: whenever κ is strictly positive, there is a unique admissible support/multiplier pair (S, λ), its induced active-set point lies in Δ_M and is the unique global minimizer of the objective, with optimal value the closed form M · λ; and whenever κ equals zero, a point of Δ_M minimizes the objective exactly when it lies on the exposed α-minimizing face. This encodes the displayed KKT coordinate formula, the uniqueness of the admissible support, the value formula, and the κ = 0 face clause.
Formal statement
Proof (Lean source)
SimplexTruncation 2 core · 0 supporting This file packages the constrained minimizer of the weighted-simplex SOCP over the parity-truncated simplex K_d = {t ∈ Δ_M : t_y + t_z ≥ d}. ★ trunc_from_minimizer★ weighted_simplex_truncation
Weighted-simplex truncation
This file packages the constrained minimizer of the weighted-simplex SOCP over
the parity-truncated simplex K_d = {t ∈ Δ_M : t_y + t_z ≥ d}. If the relaxed
optimum over Δ_M is feasible, it is also optimal over K_d; otherwise an
optimum lies on the boundary segment H_d with the explicit endpoint/interior
selector sStar from the 1-D convex slice. The headline theorem is
weighted_simplex_truncation, with trunc_from_minimizer as the reusable
relaxed-minimizer dichotomy.
The definitions (InTruncSimplex, truncSegPoint, truncSelector) live in
SimplexTruncationDefs; the convexity/boundary-reduction step in
SimplexTruncationConvex; the 1-D slice minimization in SimplexTruncationSlice;
and the relaxed-optimum global-minimizer certificates in
SimplexTruncationMinimizers. This file glues them into a single dichotomy
(trunc_from_minimizer) and the headline lemma.
Truncation dichotomy from a relaxed minimizer. Fix a truncation threshold d at most the total simplex mass M, a linear weighting α, coordinate weights β with its zeroth entry nonnegative and its remaining two entries fixed equal to 1, and a nonnegative regularization parameter κ. Given a point t_rel of the simplex Δ_M that globally minimizes the weighted objective wsObj over Δ_M, then the constrained problem over the truncated simplex K_d = {t ∈ Δ_M : t₁ + t₂ ≥ d} splits into two cases: if t_rel already satisfies the truncation constraint, it remains a global minimizer over K_d; otherwise, the face selector point truncSegPoint M d sStar is feasible for K_d and is a global minimizer over K_d. This is the κ-agnostic core shared by the κ > 0 and κ = 0 branches of the headline lemma.
Formal statement
Proof (Lean source)
Weighted-simplex truncation. In the notation of weighted_simplex_active_set, fix a positive total simplex mass M, a truncation threshold d at most M, a linear weighting α, coordinate weights β that are everywhere strictly positive with its last two entries fixed equal to 1, and a nonnegative regularization parameter κ. Then the global minimizer of the weighted-simplex objective over the truncated simplex K_d = {t ∈ Δ_M : t₁ + t₂ ≥ d} is given, case by case on the sign of κ, by the active-set/face-selector construction below.
Formal statement
Proof (Lean source)
SimplexTruncationConvex 2 core · 2 supporting Two-point convexity of the SOCP objective wsObj (linear term plus a nonnegative multiple of the weighted ℓ² norm), and the geometric consequence that on the truncated simplex K_d any feasible point is dominated in object ★ wsObj_segment_le★ truncSeg_reduction
Weighted-simplex truncation: convexity and boundary reduction
Two-point convexity of the SOCP objective wsObj (linear term plus a nonnegative
multiple of the weighted ℓ² norm), and the geometric consequence that on the
truncated simplex K_d any feasible point is dominated in objective value by a
point of the truncation face H_d, once the relaxed global minimizer is known to
be infeasible (t_rel_y + t_rel_z < d).
Two-point convexity of the weighted-simplex objective. For nonnegative coordinate weights β and a nonnegative SOCP scale κ, if θ lies between 0 and 1 then the objective evaluated at the convex combination of two points is at most the same convex combination of the objective values at and at .
Formal statement
Proof (Lean source)
Boundary reduction onto the truncation face. Fix nonnegative coordinate weights β and a nonnegative SOCP scale κ. If t_rel lies in the three-coordinate simplex and globally minimizes the objective over that simplex, while t_rel fails the parity cut defining the truncated sub-simplex, since its last two coordinates sum to strictly less than , then for every point t of the truncated sub-simplex , there is some between and such that the boundary point of the truncation face attains an objective value no larger than the objective at t.
Formal statement
Proof (Lean source)
2 supporting declarations (lemmas, instances)
-
weighted_sqrt_segment_lelemma — The weighted Euclidean root-mean-square of a convex combination is no larger than the same convex combination of the two weighted root-mean-squares.hypothesesProof (Lean source)
lemma weighted_sqrt_segment_le (β : Fin 3 → ℝ) (hβ : ∀ i, 0 ≤ β i) (u v : Fin 3 → ℝ) (θ : ℝ) (hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) : sqrt (∑ i, β i * ((1 - θ) * u i + θ * v i) ^ 2) ≤ (1 - θ) * sqrt (∑ i, β i * u i ^ 2) + θ * sqrt (∑ i, β i * v i ^ 2) := by have hθc : 0 ≤ 1 - θ := by linarith have hvec : weightedVec β (fun i => (1 - θ) * u i + θ * v i) = (1 - θ) • weightedVec β u + θ • weightedVec β v := by ext i simp [weightedVec] ring calc sqrt (∑ i, β i * ((1 - θ) * u i + θ * v i) ^ 2) = ‖weightedVec β (fun i => (1 - θ) * u i + θ * v i)‖ := by rw [weightedVec_norm β (fun i => (1 - θ) * u i + θ * v i) hβ] _ = ‖(1 - θ) • weightedVec β u + θ • weightedVec β v‖ := by rw [hvec] _ ≤ ‖(1 - θ) • weightedVec β u‖ + ‖θ • weightedVec β v‖ := norm_add_le _ _ _ = (1 - θ) * sqrt (∑ i, β i * u i ^ 2) + θ * sqrt (∑ i, β i * v i ^ 2) := by rw [norm_smul, norm_smul, weightedVec_norm β u hβ, weightedVec_norm β v hβ] simp [Real.norm_eq_abs, abs_of_nonneg hθc, abs_of_nonneg hθ0] -
eq_truncSegPoint_of_simplex_facelemma — A three-coordinate vector with total mass M whose last two coordinates sum to d is the corresponding point on the truncation segment, indexed by its second coordinate.hypothesesconclusionx = truncSegPoint M d (x 1)Proof (Lean source)
lemma eq_truncSegPoint_of_simplex_face (M d : ℝ) (x : Fin 3 → ℝ) (hx : InSimplex M x) (hxd : x 1 + x 2 = d) : x = truncSegPoint M d (x 1) := by funext i fin_cases i · have hsum := hx.2 rw [Fin.sum_univ_three] at hsum simp [truncSegPoint] linarith · simp [truncSegPoint] · simp [truncSegPoint] linarith
SimplexTruncationMinimizers 2 core · 0 supporting Self-contained proofs that the two relaxed-optimum descriptions used by the truncation lemma really are global minimizers of wsObj over the full simplex Δ_M, so the truncation argument does not depend on weighted_simplex ★ activeSetPoint_isMinimizer★ exposedMinFace_isMinimizer
Weighted-simplex truncation: relaxed global minimizers
Self-contained proofs that the two relaxed-optimum descriptions used by the
truncation lemma really are global minimizers of wsObj over the full simplex
Δ_M, so the truncation argument does not depend on weighted_simplex_active_set:
* activeSetPoint_isMinimizer (κ > 0): any KKT-admissible support/multiplier pair
induces a simplex point that globally minimizes wsObj. The optimality is a
Cauchy–Schwarz (weighted ℓ²) certificate: κ β_i t*_i / ‖t*‖_β = λ − α_i on the
support and α_j ≥ λ off it, so the first-order (subgradient) inequality collapses
to λ·(Σ s − M) = 0.
* exposedMinFace_isMinimizer (κ = 0): a point of the exposed α-minimizing face
minimizes the (now purely linear) objective, since its mass sits on argmin α.
KKT admissible ⟹ global minimizer (κ > 0). For a positive total mass M, positive coordinate weights β, a positive SOCP scale κ, and a KKT-admissible support/multiplier pair (S, λ): a nonempty index set S with , strict activity on S, and inactivity off S, the induced active-set point lies in the simplex and globally minimizes the objective over that simplex.
Formal statement
Proof (Lean source)
Exposed face ⟹ global minimizer (κ = 0). If t_rel lies in the simplex and every coordinate at which it is nonzero attains the minimum value of α, then t_rel globally minimizes the purely linear objective — wsObj at — over the whole simplex.
Formal statement
Proof (Lean source)
SimplexTruncationSlice 2 core · 4 supporting On the truncation face H_d the objective restricts to the 1-D convex function g_d(σ) = α_x(M−d) + α_y σ + α_z(d−σ) + κ √(A + σ² + (d−σ)²), with A = β_x(M−d)². ★ wsObj_truncSeg_eq★ truncSeg_selector_le
Weighted-simplex truncation: the 1-D boundary slice
On the truncation face H_d the objective restricts to the 1-D convex function
g_d(σ) = α_x(M−d) + α_y σ + α_z(d−σ) + κ √(A + σ² + (d−σ)²), with A = β_x(M−d)².
This file computes that restriction (wsObj_truncSeg_eq), shows the selector s⋆
lands in [0,d] (truncSelector_mem), and proves g_d is minimized at s⋆
(truncSeg_selector_le) via the tangent-line inequality of the convex slice.
Objective on the truncation face. For a total budget M and a truncation level d, a linear weight vector α and a quadratic weight vector β, and a curvature coefficient kappa and a face coordinate σ, evaluating the weighted-simplex objective at the truncation-face point (M−d, σ, d−σ) gives the explicit one-dimensional form α₀(M−d) + α₁σ + α₂(d−σ) + κ√(β₀(M−d)² + β₁σ² + β₂(d−σ)²).
Formal statement
Proof (Lean source)
The selector minimizes the boundary slice. Suppose the truncation width is positive, the first-coordinate weight is nonnegative while the other two weights both equal 1, and the SOCP scale is nonnegative. Then for every offset between and , the objective wsObj evaluated at the boundary point truncSegPoint M d applied to the selector truncSelector M d α β κ is at most its value at the boundary point for .
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
truncSeg_cs_sqrtlemma — For a nonnegative baseline component, the inner product of two three-dimensional boundary vectors is no greater than the product of their Euclidean norms.hypothesesA d s σ :ℝhA :0 ≤ AProof (Lean source)
lemma truncSeg_cs_sqrt {A d s σ : ℝ} (hA : 0 ≤ A) : A + s * σ + (d - s) * (d - σ) ≤ Real.sqrt (A + s ^ 2 + (d - s) ^ 2) * Real.sqrt (A + σ ^ 2 + (d - σ) ^ 2) := by set a := Real.sqrt A have ha2 : a ^ 2 = A := by simp [a, Real.sq_sqrt hA] have hsq : (A + s * σ + (d - s) * (d - σ)) ^ 2 ≤ (A + s ^ 2 + (d - s) ^ 2) * (A + σ ^ 2 + (d - σ) ^ 2) := by have hid : (A + s ^ 2 + (d - s) ^ 2) * (A + σ ^ 2 + (d - σ) ^ 2) - (A + s * σ + (d - s) * (d - σ)) ^ 2 = (a * σ - s * a) ^ 2 + (a * (d - σ) - (d - s) * a) ^ 2 + (s * (d - σ) - (d - s) * σ) ^ 2 := by rw [← ha2] ring nlinarith [hid, sq_nonneg (a * σ - s * a), sq_nonneg (a * (d - σ) - (d - s) * a), sq_nonneg (s * (d - σ) - (d - s) * σ)] have hX : 0 ≤ A + s ^ 2 + (d - s) ^ 2 := truncSeg_radicand_nonneg hA have hY : 0 ≤ A + σ ^ 2 + (d - σ) ^ 2 := truncSeg_radicand_nonneg hA calc A + s * σ + (d - s) * (d - σ) ≤ |A + s * σ + (d - s) * (d - σ)| := le_abs_self _ _ ≤ Real.sqrt ((A + s ^ 2 + (d - s) ^ 2) * (A + σ ^ 2 + (d - σ) ^ 2)) := by exact Real.le_sqrt_of_sq_le (by simpa [sq_abs] using hsq) _ = Real.sqrt (A + s ^ 2 + (d - s) ^ 2) * Real.sqrt (A + σ ^ 2 + (d - σ) ^ 2) := by rw [Real.sqrt_mul hX] -
truncSelector_interior_sq_boundlemma — If the truncation offset lies strictly between the two interior guard bounds, then its squared size times the radicand is strictly smaller than the squared truncation scale times the squared interval width.hypothesesA d kappa δ :ℝhd :0 < dhA :0 ≤ Ahk :0 ≤ kappahlo :¬ kappa * d / sqrt (A + d ^ 2) ≤ δhhi :¬ δ ≤ -(kappa * d / sqrt (A + d ^ 2))conclusionδ ^ 2 * (A + d ^ 2) < kappa ^ 2 * d ^ 2Proof (Lean source)
lemma truncSelector_interior_sq_bound {A d kappa δ : ℝ} (hd : 0 < d) (hA : 0 ≤ A) (hk : 0 ≤ kappa) (hlo : ¬ kappa * d / sqrt (A + d ^ 2) ≤ δ) (hhi : ¬ δ ≤ -(kappa * d / sqrt (A + d ^ 2))) : δ ^ 2 * (A + d ^ 2) < kappa ^ 2 * d ^ 2 := by have hrad_pos : 0 < A + d ^ 2 := by nlinarith [hA, sq_pos_of_pos hd] have hBpos : 0 < sqrt (A + d ^ 2) := Real.sqrt_pos.2 hrad_pos have hBsq : sqrt (A + d ^ 2) ^ 2 = A + d ^ 2 := Real.sq_sqrt (le_of_lt hrad_pos) have hlt : δ < kappa * d / sqrt (A + d ^ 2) := lt_of_not_ge hlo have hgt : -(kappa * d / sqrt (A + d ^ 2)) < δ := lt_of_not_ge hhi have h_abs : |δ| < kappa * d / sqrt (A + d ^ 2) := by rw [abs_lt] exact ⟨hgt, hlt⟩ have hright_nonneg : 0 ≤ kappa * d / sqrt (A + d ^ 2) := by positivity have h_abs_abs : |δ| < |kappa * d / sqrt (A + d ^ 2)| := by rwa [abs_of_nonneg hright_nonneg] have hsquare := sq_lt_sq.mpr h_abs_abs field_simp [ne_of_gt hBpos] at hsquare nlinarith [hBsq, hsquare] -
truncSelector_interior_den_poslemma — Under the selector's strict interior guard inequalities, a positive interval width, and nonnegative baseline and scale, the squared-scale denominator minus half the squared offset is positive.hypothesesA d kappa δ :ℝhd :0 < dhA :0 ≤ Ahk :0 ≤ kappahlo :¬ kappa * d / sqrt (A + d ^ 2) ≤ δhhi :¬ δ ≤ -(kappa * d / sqrt (A + d ^ 2))conclusion0 < kappa ^ 2 - δ ^ 2 / 2Proof (Lean source)
lemma truncSelector_interior_den_pos {A d kappa δ : ℝ} (hd : 0 < d) (hA : 0 ≤ A) (hk : 0 ≤ kappa) (hlo : ¬ kappa * d / sqrt (A + d ^ 2) ≤ δ) (hhi : ¬ δ ≤ -(kappa * d / sqrt (A + d ^ 2))) : 0 < kappa ^ 2 - δ ^ 2 / 2 := by have hsq_lt : δ ^ 2 * (A + d ^ 2) < kappa ^ 2 * d ^ 2 := truncSelector_interior_sq_bound hd hA hk hlo hhi have hd2pos : 0 < d ^ 2 := sq_pos_of_pos hd have hratio_le : d ^ 2 ≤ A + d ^ 2 := by nlinarith [hA] have hden_half : δ ^ 2 / 2 < kappa ^ 2 := by nlinarith [hsq_lt, hratio_le, hd2pos] nlinarith -
truncSelector_memlemma — The selector lands in [0,d]. The endpoint/interior selector truncSelector satisfies 0 ≤ s⋆ ≤ d: the two endpoint branches give 0 and d directly, and in the interior branch the guard failures |δ| < κ d / √(A + d²) force δ²(A + d²) < κ² d², whence |s⋆ − d/2| < d/2.hypothesesconclusion0 ≤ truncSelector M d α β kappa ∧ truncSelector M d α β kappa ≤ dProof (Lean source)
lemma truncSelector_mem (M d : ℝ) (α β : Fin 3 → ℝ) (kappa : ℝ) (hd : 0 < d) (hβ0 : 0 ≤ β 0) (hk : 0 ≤ kappa) : 0 ≤ truncSelector M d α β kappa ∧ truncSelector M d α β kappa ≤ d := by unfold truncSelector let δ := α 1 - α 2 let A := β 0 * (M - d) ^ 2 have hA : 0 ≤ A := by dsimp [A] exact mul_nonneg hβ0 (sq_nonneg _) dsimp only split_ifs with hlo hhi · exact ⟨le_rfl, le_of_lt hd⟩ · exact ⟨le_of_lt hd, le_rfl⟩ · exact truncSelector_interior_mem hd hA hk hlo hhi
WeightedSimplexCS 2 core · 0 supporting Cauchy–Schwarz for the weighted inner product ⟨s,t⟩_β = Σ βᵢ sᵢ tᵢ on a finite index type, in the squared form weighted_cs_sq and the strict simplex-slice form weighted_cs_simplex_strict. ★ weighted_cs_sq★ weighted_cs_simplex_strict
Weighted Cauchy–Schwarz on the three-point simplex
Cauchy–Schwarz for the weighted inner product ⟨s,t⟩_β = Σ βᵢ sᵢ tᵢ on a finite index type,
in the squared form weighted_cs_sq and the strict simplex-slice form
weighted_cs_simplex_strict. The strict version is used to prove uniqueness for
the weighted-simplex SOCP: on the affine slice Σ sᵢ = Σ tᵢ = M > 0, distinct
points are not positive scalar multiples of each other, so equality in
Cauchy–Schwarz cannot occur.
The squared form is the arbitrary-finite-index
Causalean.Mathlib.Analysis.weighted_inner_sq_le; only the strict version is genuinely
three-dimensional (its proof uses the explicit Lagrange identity).
Weighted Cauchy–Schwarz (squared form). For finitely many coordinates weighted by nonnegative masses β, the square of the weighted inner product of two vectors and is at most the product of their weighted sums of squares .
Formal statement
Proof (Lean source)
Strict weighted Cauchy–Schwarz on the simplex slice. For a nonzero total mass M and positive coordinate weights β, if the coordinates of sum to , the coordinates of sum to , and and are distinct vectors, then the weighted inner product is strictly less than the product of the weighted Euclidean norms .
Formal statement
Proof (Lean source)
WeightedSimplexExists 2 core · 4 supporting For κ > 0 there is an admissible support/multiplier pair (S, λ). ★ exists_admissible
Existence of an admissible support (κ > 0)
For κ > 0 there is an admissible support/multiplier pair (S, λ). Constructed by the
intermediate value theorem applied to the continuous threshold function
G(λ) = Σᵢ (max(λ − αᵢ, 0))² / βᵢ: G is continuous with G(min α) = 0 < κ² and
G large for λ large, so some λ has G(λ) = κ²; then S = {i : αᵢ < λ} is
admissible (the truncation makes the sum over S agree with G(λ), and off S,
αⱼ ≥ λ).
The threshold function G(λ) = Σᵢ (max(λ − αᵢ, 0))² / βᵢ whose level set G(λ) = κ² selects the active support.
Definition (Lean source)
Existence of an admissible support/multiplier pair (κ > 0). For positive coordinate weights β and a positive SOCP scale κ, there exists a nonempty index set S and a multiplier λ such that , with on S and off S.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
continuous_kktThresholdlemma — The active-set threshold function varies continuously with the multiplier because the weights are fixed real coefficients.Proof (Lean source)
lemma continuous_kktThreshold (α β : Fin 3 → ℝ) : Continuous (kktThreshold α β) := by unfold kktThreshold continuity -
kktThreshold_nonneglemma — The active-set threshold is nonnegative when every coordinate has a nonnegative weight, because it sums squared multiplier gaps divided by those weights.Proof (Lean source)
lemma kktThreshold_nonneg (α β : Fin 3 → ℝ) (hβ : ∀ i, 0 ≤ β i) (lam : ℝ) : 0 ≤ kktThreshold α β lam := by unfold kktThreshold exact sum_nonneg fun i _ => div_nonneg (sq_nonneg _) (hβ i) -
kktThreshold_eq_zero_of_lelemma — The active-set threshold is zero when the multiplier is no larger than every coefficient.Proof (Lean source)
lemma kktThreshold_eq_zero_of_le (α β : Fin 3 → ℝ) (lam : ℝ) (hle : ∀ i, lam ≤ α i) : kktThreshold α β lam = 0 := by unfold kktThreshold apply Finset.sum_eq_zero intro i _ have hdiff : lam - α i ≤ 0 := by linarith [hle i] simp [max_eq_right hdiff] -
support_sum_eq_kktThresholdlemma — Summing squared multiplier gaps only over coordinates whose coefficients lie below the multiplier gives exactly the active-set threshold.hypothesesα β :Fin 3 → ℝlam :ℝconclusion(∑ i ∈ Finset.univ.filter (fun i : Fin 3 => α i < lam), (lam - α i) ^ 2 / β i)= kktThreshold α β lamProof (Lean source)
lemma support_sum_eq_kktThreshold (α β : Fin 3 → ℝ) (lam : ℝ) : (∑ i ∈ Finset.univ.filter (fun i : Fin 3 => α i < lam), (lam - α i) ^ 2 / β i) = kktThreshold α β lam := by classical calc (∑ i ∈ Finset.univ.filter (fun i : Fin 3 => α i < lam), (lam - α i) ^ 2 / β i) = ∑ i, if α i < lam then (lam - α i) ^ 2 / β i else 0 := by simpa using (Finset.sum_filter (s := univ) (p := fun i : Fin 3 => α i < lam) (f := fun i => (lam - α i) ^ 2 / β i)) _ = kktThreshold α β lam := by unfold kktThreshold apply Finset.sum_congr rfl intro i _ by_cases hi : α i < lam · have hdiff : 0 ≤ lam - α i := by linarith simp [hi, max_eq_left hdiff] · have hdiff : lam - α i ≤ 0 := by linarith [not_lt.mp hi] simp [hi, max_eq_right hdiff]
WeightedSimplexFace 1 core · 1 supporting At κ = 0 the objective wsObj α β 0 is the linear functional Σ αᵢ tᵢ, whose minimizers over Δ_M are exactly the exposed α-minimizing face exposedMinFace. ★ kappa_zero_face
The κ = 0 exposed face
At κ = 0 the objective wsObj α β 0 is the linear functional Σ αᵢ tᵢ, whose
minimizers over Δ_M are exactly the exposed α-minimizing face exposedMinFace.
The κ = 0 minimizer set is the exposed α-minimizing face. For a simplex budget M, a linear weight vector α, and a candidate point t, t lies in the simplex of budget M and minimizes the linear objective Σᵢ αᵢtᵢ over that simplex if and only if t belongs to the exposed α-minimizing face of the simplex.
Formal statement
Proof (Lean source)
1 supporting declaration (lemmas, instances)
-
wsObj_kappa_zerolemma — At κ = 0 the weighted-simplex objective collapses to the linear form Σ αᵢ tᵢ.Proof (Lean source)
@[simp] lemma wsObj_kappa_zero (α β : Fin 3 → ℝ) (t : Fin 3 → ℝ) : wsObj α β 0 t = ∑ i, α i * t i := by simp [wsObj]
WeightedSimplexKKT 2 core · 4 supporting Given admissible support/multiplier data (S, λ) for the weighted-simplex SOCP with κ > 0, the induced activeSetPoint lies in Δ_M, has support exactly S, weighted squared norm (Mκ / D)² with D = Σ_{h∈S}(λ−αₕ)/βₕ, objectiv ★ activeSetPoint_value★ activeSetPoint_strict_min
Active-set KKT lemmas (κ > 0)
Given admissible support/multiplier data (S, λ) for the weighted-simplex SOCP with
κ > 0, the induced activeSetPoint lies in Δ_M, has support exactly S, weighted
squared norm (Mκ / D)² with D = Σ_{h∈S}(λ−αₕ)/βₕ, objective value M·λ, and is the
strict minimizer of the SOCP over Δ_M.
Objective value of the active-set point. For a nonnegative total mass M, positive weights on the support S, a positive SOCP scale κ, a nonempty support S, strict activity on S, and the admissibility identity , the objective wsObj evaluated at the induced active-set point equals the closed form .
Formal statement
Proof (Lean source)
Strict minimality of the active-set point (κ > 0). For a positive total mass M, positive coordinate weights β, a positive SOCP scale κ, and a KKT-admissible support/multiplier pair (S, λ), every other point of the simplex has strictly larger objective value than the induced active-set point.
Formal statement
Proof (Lean source)
4 supporting declarations (lemmas, instances)
-
activeSet_denom_poslemma — The active-set denominator D = Σ_{h∈S} (λ−αₕ)/βₕ is strictly positive: S is nonempty and each summand is positive (λ > αₕ on S, βₕ > 0).hypotheseshβ :∀ i ∈ S, 0 < β ihS :S.Nonemptyhactive :∀ i ∈ S, α i < lamconclusion0 < ∑ h ∈ S, (lam - α h) / β hProof (Lean source)
lemma activeSet_denom_pos (hβ : ∀ i ∈ S, 0 < β i) (hS : S.Nonempty) (hactive : ∀ i ∈ S, α i < lam) : 0 < ∑ h ∈ S, (lam - α h) / β h := by exact Finset.sum_pos (fun h hh => div_pos (sub_pos.mpr (hactive h hh)) (hβ h hh)) hS -
activeSetPoint_pos_ifflemma — The active-set point has support exactly S: on S its coordinate is positive, off S it is 0.hypothesesconclusion0 < activeSetPoint M α β S lam i ↔ i ∈ SProof (Lean source)
lemma activeSetPoint_pos_iff (hM : 0 < M) (hβ : ∀ i ∈ S, 0 < β i) (hS : S.Nonempty) (hactive : ∀ i ∈ S, α i < lam) (i : Fin 3) : 0 < activeSetPoint M α β S lam i ↔ i ∈ S := by constructor · intro hpos by_contra hi simp [activeSetPoint, hi] at hpos · intro hi rw [activeSetPoint, if_pos hi] exact div_pos (mul_pos hM (div_pos (sub_pos.mpr (hactive i hi)) (hβ i hi))) (activeSet_denom_pos α β S lam hβ hS hactive) -
activeSetPoint_memlemma — The active-set point lies in the simplex Δ_M.hypotheseshM :0 ≤ Mhβ :∀ i ∈ S, 0 < β ihS :S.Nonemptyhactive :∀ i ∈ S, α i < lamconclusionInSimplex M (activeSetPoint M α β S lam)Proof (Lean source)
lemma activeSetPoint_mem (hM : 0 ≤ M) (hβ : ∀ i ∈ S, 0 < β i) (hS : S.Nonempty) (hactive : ∀ i ∈ S, α i < lam) : InSimplex M (activeSetPoint M α β S lam) := by constructor · intro i by_cases hi : i ∈ S · rw [activeSetPoint, if_pos hi] exact div_nonneg (mul_nonneg hM (le_of_lt (div_pos (sub_pos.mpr (hactive i hi)) (hβ i hi)))) (le_of_lt (activeSet_denom_pos α β S lam hβ hS hactive)) · simp [activeSetPoint, hi] · let D := ∑ h ∈ S, (lam - α h) / β h have hD : D ≠ 0 := ne_of_gt (activeSet_denom_pos α β S lam hβ hS hactive) calc (∑ i, activeSetPoint M α β S lam i) = ∑ i ∈ S, M * ((lam - α i) / β i) / D := by simp [activeSetPoint, D] _ = M / D * (∑ i ∈ S, (lam - α i) / β i) := by rw [Finset.mul_sum] simp [D, mul_assoc, mul_comm, mul_left_comm, div_eq_mul_inv] _ = M := by rw [show (∑ i ∈ S, (lam - α i) / β i) = D by rfl] field_simp [hD] -
activeSetPoint_normSqlemma — Weighted squared norm of the active-set point: Σ βᵢ tᵢ² = (Mκ)² / D², using the admissibility identity Σ_{i∈S}(λ−αᵢ)²/βᵢ = κ².hypotheseshβ :∀ i ∈ S, 0 < β ihS :S.Nonemptyhactive :∀ i ∈ S, α i < lamhsq :(∑ i ∈ S, (lam - α i) ^ 2 / β i) = kappa ^ 2conclusion(∑ i, β i * activeSetPoint M α β S lam i ^ 2)= (M * kappa) ^ 2 / (∑ h ∈ S, (lam - α h) / β h) ^ 2Proof (Lean source)
lemma activeSetPoint_normSq (hβ : ∀ i ∈ S, 0 < β i) (hS : S.Nonempty) (hactive : ∀ i ∈ S, α i < lam) (hsq : (∑ i ∈ S, (lam - α i) ^ 2 / β i) = kappa ^ 2) : (∑ i, β i * activeSetPoint M α β S lam i ^ 2) = (M * kappa) ^ 2 / (∑ h ∈ S, (lam - α h) / β h) ^ 2 := by let D := ∑ h ∈ S, (lam - α h) / β h have hD : D ≠ 0 := ne_of_gt (activeSet_denom_pos α β S lam hβ hS hactive) calc (∑ i, β i * activeSetPoint M α β S lam i ^ 2) = ∑ i ∈ S, β i * (M * ((lam - α i) / β i) / D) ^ 2 := by simp [activeSetPoint, D] _ = ∑ i ∈ S, (M ^ 2 / D ^ 2) * ((lam - α i) ^ 2 / β i) := by apply Finset.sum_congr rfl intro i hi have hb : β i ≠ 0 := ne_of_gt (hβ i hi) field_simp [hb, hD] _ = (M ^ 2 / D ^ 2) * (∑ i ∈ S, (lam - α i) ^ 2 / β i) := by rw [Finset.mul_sum] _ = (M * kappa) ^ 2 / D ^ 2 := by rw [hsq] ring