Repository navigation
feat: Lagrange duality for finitely many convex constraints under Slater's condition - #388
Merged
lmlexplore-automation[bot] merged 2 commits intoNov 14, 2026
Conversation
…ter's condition Co-Authored-By: Claude Code <noreply@github.com>
RemyDegenne
commented
Nov 14, 2026
RemyDegenne
commented
Nov 14, 2026
Contributor
Author
AI review — approvedEach rubric is judged independently by multiple review agents; the PR merges only once every rubric is green — any rubric that is not green (changes requested, blocked, errored, stale, or not yet run) blocks the merge. See the rubrics.
♻️ = approved on an earlier commit, re-run before merge. Reviewing this diff at head |
… public Move the private StrongDual coordinate lemma to the general public LinearMap.prod_pi_apply_eq_sum_univ in LMLExplore/LinearAlgebra/Pi.lean, over any semiring and module, and apply it to the separating functional. Replace a non-terminal bare simp feeding linarith by simp only. Co-Authored-By: Claude Code <noreply@github.com>
Merged
via the queue into
LeanMachineLearning:main
with commit Nov 14, 2026
85118f1
20 of 25 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR adds Lagrange duality for convex programs with finitely many convex inequality constraints under Slater's condition, in
LMLExplore/Analysis/Convex/LagrangeDuality.lean(new file, 254 lines). The setting is a convex setCin any real vector space (no topology needed),Fconvex onC, and constraintsh : ι → V → ℝwith[Fintype ι], each convex onC. It targets the Lagrange duality bullet of EValues Layer 1.4 ("Nulls generated by constraints and the dual formula for KL_inf"):⨅ x ∈ C, (∀ i, h i x ≤ 0) → F x = max_{π ≥ 0} ⨅ x ∈ C, F x + ∑ i, π i * h i x, with the maximum attained [Lue69, Chapter 8], proved by separating inι → ℝwith one extra coordinate via Mathlib'sgeometric_hahn_banach_open.Main declarations:
LMLExplore.exists_forall_le_add_sum_mul_of_slater: for every lower boundpofFon the feasible set, some multiplierπ : ι → ℝ≥0hasp ≤ F x + ∑ i, π i * h i xfor allx ∈ C. This is the core result; the others follow from it.LMLExplore.exists_iInf_eq_iInf_add_of_slater: strong duality with an attained dual optimum, for a primal value that is bounded below. This is the interface ofSuggested.lean'siInf_eq_iSup_iInf_add_of_slater, renamed to say what it states: it is an∃ πstatement. Its redundantConvex ℝ Chypothesis is dropped becauseConvexOnimplies it.LMLExplore.iSup_iInf_add_le_iInf: weak duality inEReal, with no hypotheses.LMLExplore.iInf_eq_iSup_iInf_add_of_slater: the README'smaxform inEReal, with no boundedness hypothesis (the primal value may be⊥). The⨆form is stated inERealbecause inℝit is false: an unbounded Lagrangian has junk infimum0, which can exceed a negative primal value.IsMinOn.exists_mul_eq_zero_and_isMinOn_add_sum_mul_of_slater: complementary slackness. A minimizer of the program minimizes the Lagrangian of some multiplier overC, andπ i * h i x = 0for everyi.Consumer and dependency edge: the Layer 1.4 dual formula
iInf_klDiv_constraintNull_eq(KL_inf = max_{π ∈ Π_g} E_Q log(1 + ∑ π_i g_i)). The README proves its≤direction by "apply[ing] Lagrange duality on the probability measuresPwithklDiv Q P < ∞and theg iintegrable". This PR depends on neither open EValues PR (#384 Layer 0.1, #385 Layer 2.1) and touches onlyLMLExplore/.What remains of Layer 1.4 after this PR:
constraintNulland the betsΠ g, the complete class [LRR26, Theorem 3.1], the optimal bets, and theKL_infdual formula itself, which consumes this file.The proof follows the proof of strong duality under Slater's condition in Boyd–Vandenberghe, Convex Optimization (2004), §5.3.2. It separates the open convex set
{(t, u) | ∃ x ∈ C, F x < t ∧ ∀ i, h i x < u i}from(p, 0); upward closedness makes the coefficients nonpositive, and Slater's point makes the first coefficient negative. The file cites [BV04, §5.3.2, §5.5.2] and [Lue69, Chapter 8]. No Mathlib infrastructure is vendored. Searches of the pinned Mathlib, Tau Ceti, Statlib, LML andLMLExplore/for Slater, Lagrangian and strong duality found nothing; the only related material is the planned, unimplemented cone-program duality mentioned in the docstring of Mathlib'sAnalysis/Convex/Cone/Basic.lean.Roadmap: EValues
🤖 Prepared with Claude Code