Design decisions
This file records the choices that shape every statement in the library, with the reason for each. Change a decision only on purpose, and record the change here.
1. Setting: real Hilbert spaces
Most results are stated for a real inner product space H
([NormedAddCommGroup H] [InnerProductSpace ℝ H]), with [CompleteSpace H] where it is needed, for example for proximal
points and projections. Subgradients and dual variables are vectors of H, paired by the inner product, written
⟪x, y⟫_ℝ (open scoped InnerProductSpace), as in most of Mathlib.
Reason: this is the setting of the reference text (section 2), and it covers ℝⁿ as EuclideanSpace ℝ (Fin n).
Optimization texts state their results for ℝⁿ or Hilbert spaces. A general dual pair (E, E*) would make every
statement carry a pairing, for little gain in the applications we target. Results that need no inner product, such as
convexity of the epigraph, are stated for real vector spaces.
Status: confirmed by the author on 2026-11-29, after the first slice (M0, M1) was written.
Linear programming (LinearProgramming.lean) is an exception: it is stated with matrices A : Matrix m n ℝ on
m → ℝ with Mathlib's ⬝ᵥ, *ᵥ and ᵥ*, the form in which LP duality is usually read; the KKT theorem on ℝⁿ
(exists_kkt_euclidean) uses EuclideanSpace and toEuclideanLin instead.
Linear maps are bounded linear maps A : H →L[ℝ] K between Hilbert spaces, and their adjoint is Mathlib's
ContinuousLinearMap.adjoint, written A† (open scoped InnerProduct); it needs CompleteSpace on both spaces.
Rules with a linear map follow [BC] in the roles of the functions: in f + g ∘ A, f lives on H, and g on K
carries the continuity condition.
2. Reference text
H. H. Bauschke, P. L. Combettes, Convex Analysis and Monotone Operator Theory in Hilbert Spaces, 2nd ed., Springer
2017 (cited as [BC]). Docstrings cite results by number, [BC, Theorem 5.5][BC], and by chapter,
[BC, Chapter n][BC], where no single result fits; the second bracket is the key in docs/references.bib, through
which doc-gen4 links the citation (AGENTS.md, "Documentation"). A theorem number is added only after it has been
checked against the source; on 2026-11-30 all citations of [BC], [R], Beck, Nesterov, Horst–Tuy, Neumaier,
Moore–Kearfott–Cloud, Granas–Dugundji, Ortega–Rheinboldt and of the cited papers were checked against the texts
(Clarke's 1983 book was not available, so Clarke is cited by chapter). Where the library's statement is more general
than the cited one or a special case of it, the docstring says so. Numbers recalled from memory need this check:
the optimality condition 0 ∈ ∂f x + N_C x is [R, Theorem 27.4], which was doubted because the ReasBook
transcription of the book numbers it 27.5; Section 27 of the book has no Theorem 27.5. For finite-dimensional
results (KKT, linear programming) we also cite Rockafellar, Convex Analysis (1970) [R], Rockafellar–Wets,
Variational Analysis (1998) [RW], and Boyd–Vandenberghe, Convex Optimization (2004) [BV]. ε-subdifferentials are
not treated in [BC] and are cited to [R, Section 23]. Every cited work has an entry in docs/references.bib.
The check of 2026-11-30 compared all 201 citations of [BC] in the library, this file and ROADMAP.md with the 2nd
edition; the main results now cite theorem numbers. Chapter assignments it corrected: minimizing sequences
(ConvexFun.isMinOn_of_tendsto_toWeakSpace) are [BC, Proposition 11.21] in Chapter 11, not Chapter 9;
Fix prox = Argmin (fixedPoints_prox_const_mul) is [BC, Proposition 12.29], not Chapter 28; the averaged
forward–backward step (norm_proxGradStep_sub_proxGradStep_sq_le and its gradient form) is [BC, Proposition 26.1],
with the ingredients [BC, Propositions 4.39 and 4.44]; the supremum of affine minorants
(ConvexFun.exists_affine_minorant_of_lt) is [BC, Corollary 13.42], not Chapter 9; the one-step inequality of averaged
maps is [BC, Proposition 4.35] in Chapter 4, not Chapter 5. Only the Brøndsted–Rockafellar theorem
([BC, Theorem 16.58]) and the density of dom ∂f ([BC, Corollary 16.39]) are cited to [BC] among the
ε-subdifferential results. The max rule is the Dubovitskii–Milyutin theorem [BC, Theorem 18.5], which assumes
continuity at x where the library assumes upper semicontinuity; the max formula is [BC, Theorem 17.18]. Farkas'
lemmas are [R, Theorem 22.3] (nonhomogeneous), [R, Corollary 22.3.1] and Gale's inequality form [R, Theorem 22.1].
3. Extended real values: EReal
Functions of convex analysis take values in EReal = [-∞, +∞] (Mathlib's EReal, which is WithBot (WithTop ℝ)).
- Conjugates and infimal convolutions are suprema and infima, and
ERealis a complete linear order, so⨆and⨅always exist. +∞encodes constraints: the indicator functionι_Cis0onCand⊤outside.- Mathlib's
ERealhas⊥ + ⊤ = ⊥. [R, Section 4] leaves∞ - ∞undefined and avoids it; [RW, Chapter 1] uses inf-addition,∞ - ∞ = +∞, the convention suited to minimization. Most results assume properness (never⊥, somewhere finite), and then the convention does not matter.
Results that depend on the convention:
- Sums.
ConvexFunis not closed under+when the summands take the value⊥. Letfbe⊥at0and⊤elsewhere, andgbe⊥at1and⊤elsewhere. Both are convex, butf + gis⊥exactly on{0, 1}, so it is not convex. SoConvexFun.addassumes that one offandgnever takes the value⊥; that suffices, since whereg = ⊥, convexity spreads⊥along every segment towardsdom g. - Fenchel–Young. It is stated as
↑⟪x, u⟫_ℝ - f x ≤ f* u, which holds for everyf. The form⟪x, u⟫ ≤ f x + f* ufails exactly whenf x = ⊥(thenf* ≡ ⊤) orf ≡ ⊤(thenf* ≡ ⊥), since⊥ + ⊤ = ⊥; it holds otherwise (inner_le_add_fenchelConjugate). - Multiples.
ERealhas no scalar multiplication by reals, so the multiplec fis writtenfun x ↦ (c : EReal) * f x. Mathlib'sERealhas0 * ⊤ = 0 * ⊥ = 0, so forc = 0this is the zero function, the convention0 · ∞ = 0of [R, Section 4], not the indicator ofdom f. Hence scaling∂(c f) x = c • ∂f xholds forc > 0only: forf ≡ ⊤,∂(0 f) x = {0}but0 • ∂f x = ∅. The inclusionc • ∂f x ⊆ ∂(c f) xholds forc ≥ 0, which covers Lagrange multipliersλᵢ = 0. - Lower semicontinuity of sums. Addition on
ERealis not continuous at(⊥, ⊤)and(⊤, ⊥), andERealhas noContinuousAddinstance. Use Mathlib'sLowerSemicontinuous.add'withEReal.continuousAt_add.
Real valued functions f : H → ℝ enter by composition with the coercion (↑) : ℝ → EReal. Bridge lemmas connect our
notions with Mathlib's ConvexOn ℝ s f, so Mathlib's library for real valued convex functions stays usable:
convexFun_coe_iff for s = univ, and convexFun_coe_add_convexIndicator_iff (f + ι_s is convex iff
ConvexOn ℝ s f) for any s.
4. Convexity of extended valued functions: via the epigraph
ConvexAnalysis.ConvexFun f means that the epigraph {(x, t) : H × ℝ | f x ≤ t} is convex, as in [BC, Definition 8.1]
and [R, Section 4]. Mathlib's ConvexOn 𝕜 s f needs SMul 𝕜 β on the codomain β, and there is no SMul ℝ EReal, so
ConvexOn does not apply to EReal valued functions.
5. Names
- All declarations live in the namespace
ConvexAnalysis. We track Mathlib master, and a later Mathlib declaration with the same name must not break the build. A lemma whose name equals a Mathlib root lemma isprotected(ConvexAnalysis.lowerSemicontinuous_iff_isClosed_epigraph). - Names follow Mathlib's naming convention (https://leanprover-community.github.io/contribute/naming.html).
- Where an open Mathlib PR already proposes a name, we use the same name and the same shape of statement, so that a
later move to Mathlib needs few changes. Mathlib PR #45868 (open at the time of writing) defines subgradients along
a bilinear pairing, in the namespace
Convexityand the filesMathlib/Geometry/Convex/Fun/. Its structure isHasSubgradientWithinAt, andHasSubgradientAtis its cases = univ; it also useseffectiveDomain,IsProper,subdifferential, and Fermat's ruleIsProper.zero_mem_subdifferential_iff : 0 ∈ ∂f x ↔ IsMinOn f univ x. We pair with the inner product and have noWithinvariant. Composition with a linear map therefore differs: the PR'sHasSubgradientAt.comp_linearMapchanges the pairing and keeps the subgradient, while ourHasSubgradientAt.comp_continuousLinearMapkeeps the inner product and maps the subgradientwtoA† w(the name follows Mathlib'sHasFDerivAt.comp_continuousLinearMap). Mathlib'sERealagrees with the PR'sWithBot (WithTop ℝ)byrflfor+,≤, the coercion and⊤.
6. Proof standards
- No
sorry, noaxiom, nonative_decide. CI builds with--wfail, so any warning fails. --wfailalone misses anaxiomdeclaration and asorryunderset_option warn.sorry false. So CI also runsverify/Axioms.lean, which checks every declaration of everyConvexAnalysismodule, private ones included: onlypropext,Classical.choiceandQuot.soundare allowed.verify/check_sources.shchecks that every file is imported byConvexAnalysis.lean(otherwise neither the build nor the scan sees it) and that nodebug.option,#exit,native_decide,implemented_byorexternappears.- Before a new notion is defined, Mathlib master and its open PRs are searched for it. On 2026-11-29 (Mathlib
d747d52) there was no Fenchel conjugate, Legendre transform or support function in Mathlib, and no open PR for "Fenchel", "convex conjugate", "Legendre transform" or "conjugate EReal"; Mathlib'sLinearMap.polaris the absolute polar. - The same search on 2026-11-30 for linear programming: Mathlib has no closedness of finitely generated cones and no
LP. It has
PointedCone.FGandPointedCone.DualFG(Geometry/Convex/Cone/DualFinite.lean, Minkowski–Weyl mentioned but not proved) and Farkas for closed cones (ProperCone.hyperplane_separation,ProperCone.relative_hyperplane_separation). LP PRs #7386, #9693, #10026, #10159 and conic Carathéodory #9251 were closed unmerged; #37951 (rework ofPointedCone.dual) and #42647 (polytopes) were open. - The same search on 2026-11-30 for monotone operators and first-order methods: Mathlib has no monotone or maximal
monotone set-valued operators, resolvents or firmly nonexpansive maps, and no open PR for them. Open PRs that
matter for the algorithms: #39574 (
LipschitzSmoothWith K f, a structure withK : ℝ≥0), #43429 (the descent lemma asDifferentiable.lipschitzSmoothWith_of_lipschitzWith_gradientfromLipschitzWith K (∇ f), andfderiv_descent_le), #41501 (Baillon–Haddad and cocoercivity). We stateL-smoothness as∀ x y, ‖f' x - f' y‖ ≤ L * ‖x - y‖withL : ℝ; once one of these PRs is merged, a bridge from its form is a one-line lemma. - The same search on 2026-11-30 for fixed points and games: Mathlib has Brouwer's theorem in dimension one only
(
exists_mem_Icc_isFixedPt_of_mapsTo), no Kakutani or Caristi theorem, no Sperner lemma (Sperner's theorem on antichains is unrelated), no Ekeland principle, no Clarke gradient and no Nash equilibria. PRs: #34310 and #31755 (Sperner's lemma) and #42507 (Caristi) were closed unmerged; #42788 (facet incidence for a future Sperner lemma), #38897 (one-dimensional Sperner parity), #36770 (invariance of domain, with Brouwer for the ball as a hypothesis), #45968 (convex bodies are homeomorphic to balls) and #39393 (von Neumann's minimax theorem for matrix games,Matrix.exists_mixedNash) were open. Mathlib has upper hemicontinuity of correspondences with the sequential closed-graph criterionUpperHemicontinuousAt.of_sequences;Hemicontinuity.lean(formerlyKakutani.lean) builds ongeneralized_tube_lemmainstead; Mathlib's Sion minimax theorem is not used. - The same search on 2026-11-30 for the open items of M1–M8 (Mathlib
d747d52): Mathlib has no Opial lemma, Fejér monotonicity, demiclosedness, Krasnosel'skiĭ–Mann iteration, ε-subdifferential, Brøndsted–Rockafellar theorem, Minty theorem, Schauder or KKM theorem, Poincaré–Miranda, hairy ball theorem, Kantorovich theorem or interval Newton method, and no open PR for them. Mathlib has sequential Banach–Alaoglu for separable spaces (WeakDual.isSeqCompact_of_isBounded_of_isClosed) and weak closures of convex sets (Convex.toWeakSpace_closure), from whichWeakConvergence.leanbuilds weak sequential compactness in Hilbert spaces. PR #41501 (open) definesCocoerciveWith K ffor∇ fwithK : ℝ≥0;Cocoercive.leankeeps our form with a separate gradientf'andL : ℝ, defines no predicate, and states the PR's inequality asnorm_sub_sq_le_mul_inner(its proofs are our own). - On 2026-11-30 also: no open Mathlib PR for "Farkas", "Slater" or "Lagrangian duality"; ReasBook proves
[R, Theorem 28.2] (
Chap06/section28_part8.lean) and defines approximate subgradients onFin n → ℝ(Chap05/section23_part1.lean), with no Brøndsted–Rockafellar theorem; optlib has no ε-subgradients. Nothing was adapted from either. - Also on 2026-11-30: Mathlib's replacement for the deprecated
stdSimplexis the structureConvexity.StdSimplex(a type), so the library keeps the setprobabilitySimplex ι(Simplex.lean) with a bridge lemma; Mathlib has no one-sided directional derivative (only the two-sidedlineDeriv), soClarkeRegularAtis defined asTendstoof theERealdifference quotients along𝓝[>] 0, which needs no hypothesis onfand avoids the junk value0ofderivWithinwhere the derivative does not exist;derivWithinonIci 0appears only in the equivalent forms forfLipschitz nearx(clarkeRegularAt_iff_hasDerivWithinAt,ClarkeRegularAt.derivWithin_eq); Mathlib has no topological weak compactness in Hilbert or reflexive spaces (NormedSpace. isCompact_closure_of_isBounded, PR #35559, needs the closure in the range of the bidual embedding), no compactness of convex joins and no compact convex hull of finitely many compact convex sets; no open PR for "weakly compact", "reflexive Banach", "convexJoin compact" (PR #35473, Eberlein–Šmulian, was closed). - Also on 2026-11-30: no Mathlib PR (any state) for the Tychonoff, Schauder, Fan–Glicksberg or Himmelberg fixed point
theorems, or for the hairy ball theorem (Mathlib's
docs/1000.yamllists it without a proof); optlib has rates for Nesterov's method and FISTA but no convergence of the iterates. - Searches on 2026-11-30 for M12 (smoothing and lower bounds): no Mathlib PR for "Huber loss", "Nesterov smoothing",
"Moreau envelope", "FISTA", "accelerated gradient", "infimal convolution", "lower complexity bound", "oracle
complexity" or "first-order method", and no Huber function in Mathlib. ReasBook formalizes Nesterov's 2005 paper
(
Papers/SmoothMinimization_Nesterov_2004: finite dimension, general norms, Nesterov's optimal scheme) and Theorem 2.1.7 of Nesterov's book (Chap02/Theorem_2_8.lean, with methods as maps that satisfy the span condition for every objective); optlib has Nesterov's accelerated method (NesterovSmooth.lean) but no smoothing technique and no lower bound. Nothing was adapted. - A theorem that later work proves under weaker hypotheses keeps its name and moves to the file that can prove it
(the Slater theorems moved from
KKT.leantoPolyhedralDuality.lean; on 2026-12-01 the KKT theorems forA x = bfollowed, andnormalCone_polyhedronfrom the removedPolyhedral.lean). The suffix_of_linearmarks versions for linear functionals on a real vector space,_of_affinethose for affine inequalities⟪a k, x⟫ ≤ β k, and_of_eq_of_affinethose that also haveA x = b(since 2026-12-01; before, some were named_add_…_of_affine). - Exception to section 1:
ClarkeDeriv.lean,ClarkeRegular.leanandClarkeBanach.leanwork on a real normed space, with subgradients inStrongDual ℝ E;Clarke.leanderives the Hilbert-space results from them through the Riesz map (clarkeSubdifferential_eq_preimage_toDualMap,clarkeSubdifferential_eq_image_toDual_symm,toDual_symm_comp), so each result has one proof (since 2026-12-01). - Step sizes (2026-12-01):
proxGradStep f' g γ x = prox_{γ g} (x - γ f' x)takes the stepγ, like the gradient-descent and proximal-point theorems, [BC, Chapter 28] and [Beck, Chapter 10]; the basic rates hold for0 < γ,γ L ≤ 1(soL = 0is allowed), while FISTA and S-FISTA use the stepL⁻¹, as Beck and Bauschke–Moursi do. Names:ista_for the proximal gradient method with0 < γ ≤ 1/L,forwardBackward_for steps up to2/L. - Minimizers of
f + g(2026-12-01) are writtenIsMinOn (fun w ↦ (f w : EReal) + g w) univ z; rate statements whose conclusion is a real differencef x + r - (f z + s)keepg z = sas an extra hypothesis. - Averaged and firmly nonexpansive maps (2026-12-01,
Averaged.lean):IsAveraged α Twith [BC]'sα ∈ (0, 1)([BC, Proposition 4.35 (iii)], equivalent to Definition 4.33) andIsFirmlyNonexpansive Tin the form‖T u - T v‖² ≤ ⟪T u - T v, u - v⟫([BC, Proposition 4.4 (iv)], equivalent to Definition 4.1) are predicates whose definitions are the inequalities (isAveraged_iff,isFirmlyNonexpansive_iff), so results stated with the bare inequality still apply. Mathlib has neither, and no open PR (searched 2026-12-01). Smoothness and cocoercivity stay explicit inequalities because of the open Mathlib PRs above. - Branch and bound (2026-12-01): exhaustiveness uses the extended diameter
Metric.ediam, so subdivisions need no bounded root and the non-exhaustive (Horst–Tuy) convergence theorems need no metric on the space;IsConsistentandIsConsistentOnPathsuseediamtoo (withdiam, which is0on unbounded sets, an unbounded root would forcefto be constant onD, as a review found). - Re-checked on 2026-12-01 against Mathlib
5a27f5e(themathlib-syncrun, seeROADMAP.md): the claims above still hold; Mathlib still has no Farkas lemma beyond proper cones, no closedness of finitely generated cones or conic Carathéodory, no Ekeland, Caristi, Schauder, Tychonoff or Brouwer theorem in general dimension, no Kantorovich theorem and no weak sequential compactness in Hilbert spaces. - Searches on 2026-12-01 for M13 (Mathlib
5a27f5e): Mathlib has no subdifferential calculus, normal cone, conjugate, support function, infimal convolution, prox calculus, Yosida approximation, maximal monotone operator, operator splitting, FISTA or accelerated gradient method, and its convexity-and-derivative results are one-dimensional (ConvexOn.le_slope_of_hasDerivWithinAt). Open PR #41494 (first-order convexity inequalities) provesConvexOn.add_hasLineDerivAt_le,ConvexOn.add_hasFDerivAt_le,ConvexOn.add_fderiv_le,ConvexOn.fderiv_sub_nonneg,ConvexOn.isMinOn_of_fderiv_eq_zeroandconvexOn_iff_add_fderiv_leon real normed spaces;ConvexAnalysis.ConvexOn.add_hasLineDerivAt_lehas its name and statement, and our gradient inequalities follow its pattern of names (add_hasLineDerivWithinAt_le,add_hasGradientWithinAt_le,add_hasGradientAt_le). No open PR for Yosida, Moreau envelopes, proximal operators, maximal monotone operators, Douglas–Rachford, forward–backward or operator splitting. optlib (commit5da27c5) has ADMM in finite dimension and Nesterov's rates, but no monotone operators, resolvents or Douglas–Rachford; nothing was adapted. Mathlib's global notation□(SimpleGraph.boxProd) is why the infimal convolution has no notation. - Names of M13: the suffix
_of_descentmarks the descent inequality as hypothesis (Baillon–Haddad from it); splitting theorems state the iteration withforwardBackwardStepordouglasRachfordStepin Krasnosel'skiĭ–Mann formx (k + 1) = x k + ρ k • (T (x k) - x k), with bridges toproxGradStepandprox. - Searches on 2026-12-01 for interval differentiation (Mathlib
5a27f5e): Mathlib has no symbolic or automatic differentiation of expressions and no derivative or slope enclosures (MvPolynomial.pderivis algebraic; theinclusiontactic bounds values only); no PR (any state) for "automatic differentiation", "interval derivative", "derivative enclosure" or "symbolic derivative".ArithExpr.pderivis symbolic, not dual-number AD, so that the derivative is again anArithExprand Moore's theorem, rounding and convergence apply unchanged. - Searches on 2026-12-01 for the
inclusionbridge and a computable evaluator (Mathlib5a27f5e): theinterval_dyadic_realfamily of theinclusiontactic has+,-,*,|·|, natural powers,exp,log,√, rational constants androundOutonInclusion.Interval Dyadic, no inverse or division (open PR #46311), norpow(open #45432), no cosine (open #46628); open #45720 replacesDyadic.toRealby the coercion. No PR (any state) for "Krawczyk", "interval Newton", "interval evaluation" or "arithmetic expression interval".IntervalDyadic.leanbridges each operation (outward rounding of the exact operation, for results with finite endpoints), adds a dyadic inverse, and evaluatesRatArithExpr(rational constants;ArithExpr's real constants are not computable), mapped toArithExprbytoArithExpr, which commutes withpderiv. Kernel checks usedecide +kernel, which adds no axiom (unlikenative_decide). intervalKrawczyktakes an interval enclosureFx₀off x₀(the exact value is the point-interval case), so the dyadic Krawczyk test is an instance of the real-interval statement and the Krawczyk argument is proved once (2026-12-01).RatArithExprstays a separate type fromArithExpr. The suffix_realmarks the form stated onℝinstead ofι → ℝ(existsUnique_eq_zero_of_krawczykTest_real, asexists_mem_Icc_eq_zero_real).- Hansen–Sengupta (2026-12-01; Mathlib
5a27f5e; no PR for interval Newton, Gauss–Seidel, Hansen(-Sengupta), Krawczyk or interval linear systems):hansenSengupta G b x₀ l Xtakes any enclosuresG ∋ Y A,b ∋ Y f(x₀)and a row orderl, and returns anOption(none= empty). A row with0 ∈ Gᵢᵢleaves its side unchanged (no extended division), so inclusion and exclusion hold for every interval matrix and the existence test fails by itself on such a row. Intersections use Mathlib's latticeInterval ℝ = WithBot (NonemptyInterval ℝ)(⊓,Interval.coe_inf); the real operator is never computed, so the kernel is not affected. The existence test needsl.Nodupand gets regularity from the affine point sweep (no H-matrix theory); Moore–Kearfott–Cloud, Theorem 8.4, assumes an enclosure of the whole solution set, which the intersected sweep does not give. Continuity is not a hypothesis of the tests with slopes between all points (IsSlopeEnclosure.continuousOnfrom a compact enclosure); only the existence form with slopes atx₀(exists_eq_zero_of_hansenSengupta, Neumaier, Corollary 5.4.3 (iii)) assumes it. The dyadic sweep intersects with Mathlib'sInclusion.Interval.inter(DyadicInterval.interadds the emptiness check) and skips rows whose diagonal entry does not exclude0;RatArithExpr.hansenSenguptaBoxworks on a dyadic box and gives exclusion (none), enclosure of the zeros and, inside the rational box, the existence test, which goes through the real theorem like the Krawczyk test. Its exclusion form fitsDyadicInterval.allPiecesof branch and bound as a pruning predicate (fun X ↦ (hansenSenguptaBox prec F x₀ Y X).isNone, withx₀a point of the piece and a fixedY; soundness fromexists_ne_zero_of_hansenSenguptaBox_eq_none); it is not wired in, since a goodYper piece needs an approximate inverse computed in the kernel. - Bridges keyed on the conclusion (2026-12-01): the complex, eigenpair, matrix square root and one-variable forms take
RatArithExpr.HasUniqueZero F lo hi(anabbrevfor the conclusion∃! x ∈ [lo, hi], F x = 0of the dyadic tests), notkrawczykTest … = true, so they serve the Krawczyk test, the Hansen–Sengupta test and future tests; an example passes the test theorem to them. The_realforms of both tests are one-liners throughexistsUnique_eq_zero_real_of_hasUniqueZero. - Dyadic branch and bound (
IntervalBranchAndBound.lean, 2026-12-01; Mathlib5a27f5e, no PR for "branch and bound", "global optimization", "interval bisection", "verified minimum"; Mathlib'sdyadic_interval [binSplit := n]splits uniformly and takes the hull). Design: depth-first bisection along a widest side at the dyadic midpoint (no rounding of the pieces), defined by structural recursion on a depth bound (fuel), so the kernel evaluates it and||/&&stop early; soundness uses only that the halves cover the box. On each piece the natural interval extension is tried first, then the mean value form with the symbolic derivatives (O(w)againstO(w²)overestimation; near a minimum the mean value form cuts the number of boxes by orders of magnitude, from about 25000 to 700 for the camel function within10⁻⁴). The mean value form costs about three evaluations and almost always fails on wide boxes, so it is computed only on pieces of width at mostmvfWidth. The incumbentUof the minimum test is a point found outside Lean; the test proves only the lower bound on every piece, so no list of boxes is kept in the kernel. Kernel cost (measured 2026-12-01): one dyadic interval operation takes about0.5ms in the kernel (Intarithmetic, unlikeNat, is not accelerated;Dyadic.blealone about0.2ms), so a box costs10–50ms for a degree-six polynomial in two variables, and the kernel's caches grow by about0.2GB per second of evaluation (they live until the declaration is checked, so a long check can exhaust the memory). The depth costs nothing by itself: a piece at depthdis a nestedbisectterm, and its evaluation is as fast as that of the same box written directly. What matters is the number of boxes, hence the expression form (the camel function in completed-square form needs201boxes where the expanded form needs3229), symmetry (half the box) and a moderate tolerance. Examples are kept under about3.5s and1GB above the imports each. - Searches on 2026-11-30 for M10: no Mathlib PR (any state) for the Kantorovich theorem, Newton's method,
Krawczyk or interval Newton methods, cubic regularization, branch and bound, Lipschitz or global optimization,
Clarke's generalized gradient or "nonsmooth"; open PR #26803 proves a second derivative test (
C², finite dimension), PR #43069 second-derivative signs in dimension one; merged #38739 addedModule.Dual.exists_continuous_extension_of_le_seminorm, for seminorms only (Clarke'sf°(x; ·)is not symmetric). optlib has no Newton methods or branch and bound. - Interval arithmetic (2026-11-30): Mathlib's
NonemptyInterval ℝhas+,-, the order by inclusion and the coercion toIcc, but its*and⁻¹need monotone multiplication and do not exist forℝ(PR #20636 for interval multiplication in rings was closed);IntervalArithmetic.leandefines the real operations as functions inConvexAnalysis.IntervalArith, so a later Mathlib instance cannot clash. Mathlib'sinclusiontactic (PRs #42850, #45638 and #46487 merged; #45720 and #46628 open) computes enclosures with dyadic intervals and has the inclusion property only.IntervalArithmetic.leanconverts the tactic's finite intervals, with endpoints in any type mapped intoℝ(for the tactic,Dyadic.toReal), toNonemptyInterval ℝ(IntervalArith.ofInclusion) and proves that the tactic's+and-are exact and its*contains the exact product, so its results for these operations are outward roundings (ArithExpr.IsRoundedEval); itsexp,log,√and powers are not bridged. - Ball arithmetic (2026-11-30): no Mathlib PR for "ball arithmetic" except the
inclusiontactic (#42850), none for "radii polynomial", "midpoint radius", "computer-assisted proof", "rigorous numerics" or "validated numerics".BallArithmetic.leanregisters balls asInclusion.ToSet(withRefineandCoarsen) but no tactic extension, since the tactic computes in the kernel with dyadic centers andBall ℝis the mathematical model; balls inℝandNonemptyInterval ℝare related by an order isomorphism (Ball.orderIsoInterval). The examples (ComputerAssistedProofs.lean) usedyadic_interval, whose proofs check in the kernel, and one ball computation checked bynorm_num; the axiom check confirms that no extra axiom enters. - Radii polynomial theorem (2026-11-30): stated over
𝕜with[RCLike 𝕜](real and complex Banach spaces), with a separate[NormedSpace ℝ E]for convexity of balls, as Mathlib's mean value inequality; the forms with a Lipschitz derivative use the real Taylor estimate ofKantorovich.leanand assume[IsScalarTower ℝ 𝕜 E]. - Weak convergence
x ⇀ zis written with Mathlib's weak topology,Tendsto (fun k ↦ toWeakSpace ℝ H (x k)) l (𝓝 (toWeakSpace ℝ H z)), so that Mathlib's filter API applies;tendsto_toWeakSpace_iff_forall_inner_tendstois the form with inner products. Weak sequential cluster points are written out in hypotheses (∀ z φ, StrictMono φ → x ∘ φ ⇀ z → z ∈ C), with no new definition. - Code follows Mathlib's style guide (https://leanprover-community.github.io/contribute/style.html) and documentation
guidelines (https://leanprover-community.github.io/contribute/doc.html): lines of at most 100 characters, a module
docstring in every file with the sections in Mathlib's order and
## Tags, and a docstring on every public declaration (Batteries'docBlameanddocBlameThmlinters report none missing). - File headers name the authors as
Authors: Harald Schilly, Claude Opus 5.5, the AI model that drafts the statements and proofs (seeREADME.md, "Use of AI"). - Code taken or adapted from another library (for example optlib or ReasBook, both Apache-2.0) names its source and authors in the file header.