Repository navigation
feat: smooth functions on a convex set and the descent lemma - #301
Merged
Conversation
Define `LMLExplore.SmoothOn V s f` (differentiable on an open set containing `V`, with `fderiv ℝ f` `s`-Lipschitz on `V`) and prove the two-sided quadratic bound on the first-order Taylor remainder, `‖D_f(y, x)‖ ≤ s / 2 * ‖y - x‖ ^ 2`, and the descent lemma, both for a Lipschitz family of derivatives within a convex set and for `SmoothOn` with `fderiv`. Co-Authored-By: Claude Code <noreply@github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0196ftMV379vy48QfzHBVNvo
RemyDegenne
commented
Nov 13, 2026
RemyDegenne
commented
Nov 13, 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 |
Add SmoothOn.differentiableOn and IsOpen.smoothOn_iff, and credit the Schlisselberg2026Hidden formalization in the module docstring. Co-Authored-By: Claude Code <noreply@github.com>
Merged
via the queue into
LeanMachineLearning:main
with commit Nov 13, 2026
b268666
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
s-smoothness on a set and the descent lemma, the first bullet of OnlineLearning Layer 1.3 (Smoothness and self-bounded functions, [Ora, Definition 4.22]). The new file isLMLExplore/Analysis/Convex/Smooth.lean(189 lines).LMLExplore.SmoothOn V s fis the roadmap's definition exactly:fis differentiable on an open set containingV, andfderiv ℝ fiss-Lipschitz onVfor the operator norm (LipschitzOnWith s (fderiv ℝ f) V,s : ℝ≥0). Its API isSmoothOn.differentiableAt,SmoothOn.mono,SmoothOn.weaken, and the@[simp]characterisationsmoothOn_univ : SmoothOn univ s f ↔ Differentiable ℝ f ∧ LipschitzWith s (fderiv ℝ f), which is the form the "smooth onE" items of 1.3 and 1.4 use.Convex.norm_bregDiv_le_mul_norm_sub_sq: on a convexK, for any familyf'of derivatives offwithinKthat iss-Lipschitz onK,‖bregDiv f y x (f' x)‖ ≤ s / 2 * ‖y - x‖ ^ 2forx, y ∈ K[Nes18, Lemma 1.2.3]. It is stated forF-valuedf, as Mathlib's mean value inequalities are. Asking only for derivatives withinKcovers sets with empty interior, such as the simplex inα → ℝ. The proof restricts the remainder to the segment and applies Mathlib'simage_norm_le_of_norm_deriv_right_le_deriv_boundary.Convex.bregDiv_le_mul_norm_sub_sqis the one-sided descent lemma for realfin the same setting.SmoothOn.norm_bregDiv_le_mul_norm_sub_sqandSmoothOn.bregDiv_le_mul_norm_sub_sqgive the roadmap's statement fors-smoothfon a convexV, withfderiv. WithF = ℝthe norm form is the roadmap's|f y - f x - f'(x)(y - x)| ≤ s/2 ‖y - x‖², sincebregDiv f y x J = f y - f x - J (y - x)by definition.Layer 1.3's other bullets remain after this PR: the gradient bound
‖f'(x)‖² ≤ 2s(f(x) - inf f), self-bounded functions, and their two implications. ReinforcementLearning 5.2 also consumes the descent lemma ("The descent lemma for L-smooth functions is the OnlineLearning roadmap's Layer 1.3").On naming: Mathlib has open PRs leanprover-community/mathlib4#39574 and #43429 (neither is in the pinned Mathlib). There,
LipschitzSmoothOnWithis a different predicate, the quadratic Taylor-remainder bound itself, and the descent lemma is the implication from a LipschitzfderivWithinto it. The roadmap definess-smoothness through a Lipschitz derivative, so this PR gives that predicate its own name,SmoothOn. ReusingLipschitzSmoothOnWithfor a different meaning would make a later upstream adoption a rewrite instead of a deletion. The docstrings say that this is optimisation smoothness, notContDiff. The conclusions use LMLExplore'sbregDiv, as the neighbouringStrongConvexOn.mul_norm_sub_sq_le_bregDivdoes.The descent-lemma proof and its within-
Kform are adapted from the paper project RemyDegenne/Schlisselberg2026Hidden, fileSchlisselberg2026Hidden/ForLMLExplore/Analysis/Convex/Smooth.lean, commit b08c8189133af6a5a8578c04ff6ae061acbdec60, Apache-2.0. The adaptation adds the roadmap's definition and its API, usesLipschitzOnWith, generalises toF-valued functions, and usesAffineMap.lineMap. The file credits [Nes18], [Ora] and [SSKM26] (Schlisselberg, Sherman, Koren and Mansour, arXiv:2511.22283v2, whose Lemma 22 and Theorem 2 use the within-set form).This PR removes or renames no public declaration.
Roadmap: OnlineLearning
Paper: RemyDegenne/Schlisselberg2026Hidden
Item: R8
🤖 Prepared with Claude Code