feat(Analysis/Convex): first-order convexity inequalities#41494
feat(Analysis/Convex): first-order convexity inequalities#41494FordUniver wants to merge 5 commits into
Conversation
Adds first-order characterizations of convexity for differentiable functions: `f` is convex on `s` iff `f y ≥ f x + lineDeriv f x (y - x)` (and Fréchet / gradient analogues), plus the strict variant, the iff converse, and a few corollaries. * `Mathlib/Analysis/Convex/LineDeriv.lean` (new): the proof-content layer. `ConvexOn.lineRestriction`, `ConvexOn.add_lineDeriv_le`, `ConvexOn.lineDeriv_sub_apply_nonneg`, `ConcaveOn.le_add_lineDeriv`, `StrictConvexOn.add_lineDeriv_lt`, `convexOn_iff_add_lineDeriv_le`. * `Mathlib/Analysis/Convex/FDeriv.lean` (new): Fréchet-form lifts via `lineDeriv_eq_fderiv`. `ConvexOn.add_fderiv_le`, `ConvexOn.fderiv_sub_apply_nonneg`, `ConcaveOn.le_add_fderiv`, `StrictConvexOn.add_fderiv_lt`, `convexOn_iff_add_fderiv_le`. * `Mathlib/Analysis/Convex/Gradient.lean` (new): gradient-form lifts via Riesz (`inner_gradient_left`). `ConvexOn.add_inner_gradient_le`, `ConvexOn.inner_gradient_sub_nonneg`, `ConvexOn.isMinOn_of_gradient_eq_zero`, `ConcaveOn.le_add_inner_gradient`, `StrictConvexOn.add_inner_gradient_lt`, `convexOn_iff_add_inner_gradient_le`. * `Mathlib/Analysis/Convex/Deriv.lean` (additions): 1D additive form + line-restriction helper.
Must-fixes (1)–(3): - Add strict 1D additive forms `StrictConvexOn.add_hasDerivAt_mul_lt` and `StrictConcaveOn.lt_add_hasDerivAt_mul` (plus `deriv`-form variants) to `Convex/Deriv.lean`. - Refactor `StrictConvexOn.add_lineDeriv_lt` to use the new strict 1D additive form via `StrictConvexOn.lineRestriction` (drops the brittle midpoint `calc`). - Add `StrictConcaveOn.lt_add_lineDeriv`, `.lt_add_fderiv`, `.lt_add_inner_gradient` (missing concave strict duals across all three layers). - Add `ConvexOn.isMinOn_of_fderiv_eq_zero` (FDeriv-form sibling of the gradient one; needs only `NormedSpace ℝ E`, not Hilbert). - Add `HasLineDerivAt`- and `HasFDerivAt`-flavoured primitive forms for all inequality lemmas; the `lineDeriv` / `fderiv` versions become one-line corollaries via `LineDifferentiableAt.hasLineDerivAt` / `DifferentiableAt.hasFDerivAt`. Should-fixes (4)–(7): - Rename `_sub_apply_nonneg` → `_sub_nonneg` in both LineDeriv and FDeriv; `_apply` was vestigial for the scalar `lineDeriv` and added noise for `fderiv` where the application is visible in the statement. - Drop the LineDeriv-layer iff converse (`convexOn_iff_add_lineDeriv_le`); the FDeriv-layer iff is the canonical statement users want, and its premise `∀ x ∈ s, DifferentiableAt ℝ f x` is easier to instantiate than the pair-quantified line-differentiability of the dropped version. - Reprove `convexOn_iff_add_fderiv_le` directly using `fderiv`-arithmetic (no longer delegating through the dropped LineDeriv iff). - Rewrite Gradient module docstring to lead with "Hilbert space" framing. - Refactor the `▸` chain in `ConvexOn.lineDeriv_sub_nonneg` to a `have` + `rw` block. Bonus: factor out `private lineMap_eq_add_smul_sub` helper.
Concave duals and strict variants are systematic companions, not main results; fold them into one prose line per module docstring.
- replace have/rwa-at chains with simpa only ... using - drop a no-op change + simp only [smul_eq_mul] pair in convexOn_iff_add_fderiv_le (the calc closes the smul goal by defeq) - derive ConcaveOn.lineRestriction by neg-duality, matching the StrictConcaveOn version; factor the duplicated membership argument in StrictConvexOn.lineRestriction - simp_rw [inner_gradient_left] instead of a forall_congr'/imp_congr_right chain in convexOn_iff_add_inner_gradient_le
PR summary a9a383ff18Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
This PR/issue depends on: |
Adds first-order characterizations of convexity for differentiable functions in three forms — directional, Fréchet, and gradient — together with concave duals, strict variants, iff converses, and the first-order optimality corollaries
ConvexOn.isMinOn_of_fderiv_eq_zero/ConvexOn.isMinOn_of_gradient_eq_zero.Analysis.Convex.Derivpicks up the 1D additive forms of the slope inequalities.The motivation is the Baillon–Haddad theorem in the Lipschitz-smooth stack (#39574 and follow-ups), whose proof plays the gradient form of the first-order convexity inequality against the descent bound of a
K-smooth function.LineDerivcarries the proof content via 1D line restriction (ConvexOn.lineRestriction);FDerivandGradientare restatements vialineDeriv_eq_fderivand Riesz (inner_gradient_left) respectively. This inverts mathlib's usual FDeriv-as-foundation default because convex first-order inequalities are naturally 1D — they only need directional differentiability, and the FDeriv/gradient forms are strictly stronger restatements.inner_gradientlemmas #39203