Convex analysis in Lean 4

Roadmap

Status: [ ] open, [~] in progress, [x] done (proved, no sorry). Each item names the main result. The order follows dependencies: later milestones use earlier ones.

M0. Foundations

M1. Subdifferential

M2. Conjugation

Needed first (from the review of M0 and M1): ConvexFun.iSup (the epigraph of a supremum is an intersection, so f* is convex), composition with affine maps, the convexity inequality on dom f. Fenchel–Young is stated as ↑⟪x, u⟫_ℝ - f x ≤ f* u. Mathlib has ConvexOn.sSup_affine_eq and ConvexOn.exists_affine_le_of_lt (Mathlib/Analysis/Convex/Approximation.lean): a lower semicontinuous convex φ : E → ℝ on a closed convex set is the supremum of its continuous affine minorants; FenchelMoreau.lean restates this for EReal values with vectors of H.

M3. Proximal operator and Moreau envelope

Mathlib has the projection onto a complete convex set (exists_norm_eq_iInf_of_complete_convex) and its characterization norm_eq_iInf_iff_real_inner_le_zero, which says x - p ∈ N_K p (Mathlib/Analysis/InnerProductSpace/Projection/Minimal.lean). Needed: ∂f x = {∇f x} for differentiable convex f (also for M7). H × ℝ has no inner product instance; a projection onto an epigraph needs WithLp 2 (H × ℝ).

M4. Monotone operators

M5. Duality and KKT

For Slater-type KKT the interior form of the sum rule suffices: f₀ + ∑ ι_{fᵢ ≤ 0} is continuous at a Slater point, and ι_{Ax = b} is the summand without continuity. The refined Slater condition (affine inequality constraints need only be feasible) needs no relative interior for real valued f₀, gᵢ. PolyhedralDuality.lean ([R, Section 28]) proves it without a primal minimizer: multipliers μ ≥ 0 for the convex and λ ≥ 0 for the affine inequalities with p ≤ L(·, μ, λ) (exists_le_lagrangian_of_le_of_affine), the zero-gap EReal form with dual attainment, a saddle point and the KKT conditions at a minimizer, also with equality constraints A x = b (finite-dimensional K). It needs neither continuity of f₀, gᵢ nor completeness, and holds for linear functionals on any real vector space (the _of_linear versions): Slater for the convex constraints on the polyhedron (no topology); then, for φ = f₀ + ∑ μᵢ gᵢ and L y = (ℓ k y)_k, the partial minimum ψ t = inf {φ y | L y = t} on the finite-dimensional range of L is convex and bounded below (a midpoint argument), hence continuous, and the separation of its strict epigraph from the polyhedron is not vertical; the nonhomogeneous Farkas lemma (from closedness of finitely generated cones, also without completeness and as an iff) gives the multipliers. With no affine inequalities this is Slater duality without continuity. ReasBook proves [R, Theorem 28.2] on Fin n → ℝ via the perturbation function and relative interiors; nothing was adapted.

Strong Fenchel–Rockafellar duality without attainment of the primal infimum comes from the sandwich theorem (exists_affine_sandwich, from which the sum rule is derived); the qualification is the continuity form only. Open, not needed for M6 and M7: the relative-interior qualification of [R, Section 31] and the strong relative interior of [BC]; the exact formulas (f ∘ A)* u = min {f* w | A† w = u} and (f + g)* = f* □ g* under continuity (short corollaries of strong duality).

Useful: for x ∈ C the normal cone is an inner dual cone, N_C x = ProperCone.innerDual ({x} - C) (Mathlib/Analysis/Convex/Cone/InnerDual.lean), which connects it to Mathlib's cone duality and Farkas lemmas.

M6. Linear programming

M7. Algorithms

M8. Further topics

M9. Open items of M1–M8

The open items listed under M1–M8, finished before the paper, in this order:

M10. Newton-type methods and global optimization

Newton-type methods for zeros and minimizers, interval methods and branch and bound from global optimization, with the Kantorovich theorem first.

Further open items: Himmelberg's form of Kakutani–Fan–Glicksberg (done); an equality chain rule for Clarke gradients under regularity (done); Clarke's generalized gradient in Banach spaces (done); the [BC] citations checked against the book (done on 2026-11-30, see DESIGN.md, section 2); the paper.

M11. Interval and ball arithmetic

Interval arithmetic itself and ball (midpoint–radius) arithmetic, which fit the interval methods of M10 and say something about verified global optimization.

M12. Smoothing and lower complexity bounds

From Nesterov's Lectures on Convex Optimization (2nd ed., 2018): the smoothing technique for nonsmooth problems, and lower complexity bounds, which show what no method can do better.

M13. Coverage of the basic theory and operator splitting

The coverage items of the external review of 2026-11-30 (its section 2.2), added on 2026-12-01.

Open: the max rule subdifferential_iSup_eq_convexHull without convexity of inactive functions (re-indexing over the active indices); the prox of γ e_μ f ([BC, Proposition 24.8 (vii)]); cocoercive maps as Yosida approximations ([BC, Proposition 23.21]); the uniformly monotone cases ([BC, Theorem 26.11 (v), (vi), Theorem 26.14 (iii)]); the dual problem of [BC, Corollary 28.3 (i)]; Tseng, Peaceman–Rachford, ADMM.

Paper

A technical paper on the library for the convex analysis and optimization community (paper/paper.tex; a tag paper-vN.M publishes the PDF): design (section 3 of DESIGN.md), what Lean and Mathlib made easy or hard, a comparison with optlib and ReasBook, and the use of AI. A first draft described the library at commit 91b1798; on 2026-11-30 it was brought up to the final state (commit f6cda8f, M0–M12) and revised after an independent review (Claude Fable: no wrong mathematical statement; fixed a table row, overclaims on the proof check and on FISTA's optimality, credit to optlib and to Mathlib PRs, notation, length). The author's decisions (2026-11-30): Claude (Opus 5.5) is named as co-author, as in the short note; the review agents, not the author, check each statement against its docstring and source (README and paper say so); no archive DOI; venue aiXiv. Layout: KOMA-Script report in Fira Sans. Released on 2026-11-30 as tag paper-v1.0 (commit 3005fdb) and published as aiXiv:2611.03751 (math.OC, ai-authored, no sessions). v2 was uploaded by mistake while testing paper/aixiv-new-version.sh (same paper, raw LaTeX abstract); v3 restores the metadata. Every later tag paper-vN.M is also uploaded to aiXiv as a new version, with paper/aixiv-new-version.sh.

Reviews

An independent review agent reads the new code against the references, and its findings are fixed or recorded here. Until 2026-11-30 this happened after each step; from then on once per milestone or substantial part of one.