Theorem (2.1) — generalized gradient and directional derivative of a max function
ProvedClarkeGradients.MaxFunctions.max_function_generalized_gradientLet be a nonempty sequentially compact topological space, and let have the following properties:
- (a) is upper semicontinuous in ;
- (b) is locally Lipschitz in , uniformly for in : for each bounded there is one with for all , ;
- (c) , the derivatives being with respect to : for all the one-sided directional derivative of at in direction exists and equals the generalized directional derivative;
- (d) is upper semicontinuous in : if , and for all , then .
Let and . Then
- is locally Lipschitz;
- for all the one-sided directional derivative exists;
- ;
- for all ,
This is the paper's first main theorem. It computes the generalized gradient and the directional derivatives of a pointwise maximum of a family of nonsmooth functions. When exists and is continuous in , it reduces to Danskin's theorem.
Formalization Note is made explicit ([Nonempty U]); the paper uses it implicitly in "max". The max is ⨆ u, g x u, and "max" in (3) is IsGreatest, which asserts attainment. Conclusions (2) and (3) together are "f has one-sided directional derivative at in direction " plus the IsGreatest clause. Upper semicontinuity in (a) is Mathlib's UpperSemicontinuous on the product topology; in (d) it is the paper's sequential closed-graph property.
import Mathlib import Definitions.Def_ClarkeGradients_Shared_LipschitzOnBounded import Definitions.Def_ClarkeGradients_Shared_generalizedGradient import Definitions.Def_ClarkeGradients_Shared_genDirDeriv import Definitions.Def_ClarkeGradients_MaxFunctions_HasOneSidedDirDeriv import Definitions.Def_ClarkeGradients_MaxFunctions_SeqUpperSemicontinuous import Definitions.Def_ClarkeGradients_MaxFunctions_maxFunction
namespace ClarkeGradients.MaxFunctions
/-- Clarke (1975), Theorem (2.1). Let `U` be a (nonempty) sequentially compact space and
`g : ℝⁿ × U → ℝ` satisfy
(a) `g` is upper semicontinuous in `(x, u)`;
(b) `g` is locally Lipschitz in `x`, uniformly for `u ∈ U`;
(c) `g°ₓ(x, u; ·) = g'ₓ(x, u; ·)` (the one-sided derivative in `x` exists and equals the
generalized directional derivative in `x`), for all `x, u`;
(d) `(x, u) ↦ ∂ₓg(x, u)` is upper semicontinuous (sequential closed graph).
Then, with `f(x) = max_u g(x, u)` and `M(x) = {u : g(x, u) = f(x)}`:
(1) `f` is locally Lipschitz; (2) `f'(x; v)` exists; (3)
`f'(x; v) = f°(x; v) = max {ζ · v : ζ ∈ ∂ₓg(x, u), u ∈ M(x)}`; (4) `∂f(x)` is the convex
hull of `{∂ₓg(x, u) : u ∈ M(x)}`. -/
theorem max_function_generalized_gradient
{n : ℕ} {U : Type*} [TopologicalSpace U] [SeqCompactSpace U] [Nonempty U]
(g : EuclideanSpace ℝ (Fin n) → U → ℝ)
(ha : UpperSemicontinuous (fun p : EuclideanSpace ℝ (Fin n) × U => g p.1 p.2))
(hb : ∀ B : Set (EuclideanSpace ℝ (Fin n)), Bornology.IsBounded B →
∃ K : NNReal, ∀ u : U, LipschitzOnWith K (fun y => g y u) B)
(hc : ∀ (x : EuclideanSpace ℝ (Fin n)) (u : U) (v : EuclideanSpace ℝ (Fin n)),
HasOneSidedDirDeriv (fun y => g y u) x v (Shared.genDirDeriv (fun y => g y u) x v))
(hd : SeqUpperSemicontinuous
(fun p : EuclideanSpace ℝ (Fin n) × U => Shared.generalizedGradient (fun y => g y p.2) p.1)) :
Shared.LipschitzOnBounded (maxFunction g) ∧
(∀ x v : EuclideanSpace ℝ (Fin n),
HasOneSidedDirDeriv (maxFunction g) x v (Shared.genDirDeriv (maxFunction g) x v) ∧
IsGreatest {r : ℝ | ∃ u ∈ maximizers g x, ∃ ζ ∈ Shared.generalizedGradient (fun y => g y u) x,
r = inner ℝ ζ v}
(Shared.genDirDeriv (maxFunction g) x v)) ∧
(∀ x : EuclideanSpace ℝ (Fin n),
Shared.generalizedGradient (maxFunction g) x =
convexHull ℝ (⋃ u ∈ maximizers g x, Shared.generalizedGradient (fun y => g y u) x)) := by sorry
end ClarkeGradients.MaxFunctions
Read-back
What the Lean code literally says, in plain math · claude-opus-5-5
Setting. Fix a natural number , which may be . Let be Euclidean space, with the standard inner product and the Euclidean norm. Let be any type with a topology, subject to two conditions:
- is sequentially compact: every sequence in has a subsequence that converges in .
- is nonempty.
No Hausdorff, metrizability or other separation condition is imposed on . Let be any real-valued function, written . For each , write .
Definitions from the bundle. The statement uses six notions whose definitions come from the bundle and are not shown here. Their exact content is fixed by that code, not by their names. They are:
- , a property of a function .
- , a subset of .
- , a real number. It is real-valued, so it is always some real number, even where a supremum or limsup behind it would be infinite.
- , a relation between a function, a point, a direction and a real number .
- , a property of a set-valued map .
- , and .
The statement itself never ties to a maximum or supremum of , and never ties to the points where such a maximum is attained. Any such link lives only in the unseen bundle definitions.
Hypotheses. Assume all of the following:
- (a) Upper semicontinuity. The map is upper semicontinuous on with the product topology. That is, for every point and every real , the inequality holds on a neighbourhood of .
- (b) Uniform Lipschitz bounds on bounded sets. For every bounded set there is a constant such that
The same works for every .
- (c) One-sided derivative equals the generalized one. For every , every and every direction :
- (d) Semicontinuity of the gradient map. The set-valued map satisfies .
Conclusions. Under these hypotheses, all three of the following hold together:
- holds.
- For every , both parts below hold:
- .
- is the greatest element (a maximum that is attained, not merely a supremum) of the set
Concretely, there exist $u \in M(x)$ and $\zeta \in \partial g_u(x)$ with $\langle \zeta, v\rangle = f^\circ(x;v)$, and $\langle \zeta', v\rangle \le f^\circ(x;v)$ for every $u' \in M(x)$ and every $\zeta' \in \partial g_{u'}(x)$.
In particular, this asserts that $M(x)$ is nonempty, and that $\partial g_u(x)$ is nonempty for at least one $u \in M(x)$.
3. For every :
Here is the plain convex hull: all finite convex combinations. It is not the closed convex hull.
Degenerate cases.
- Empty . cannot be empty; nonemptiness is an explicit assumption.
- One-point . Hypothesis (b) reduces to being Lipschitz on each bounded set. The conclusions then concern and exactly as the bundle defines them. Whether and depends on those unseen definitions.
- . is a single point, and only is available. Every set is bounded, and (b) holds for any . Conclusion 2 then asserts that is the greatest element of , a set that can only be or empty. So conclusion 2 forces , forces , and forces some with to be nonempty.
- Default values of total functions. , and are all real-valued. If the bundle builds any of them from a real supremum, infimum or limsup, then an unbounded or empty set yields a default real value, not . The statement's claims about and apply to whatever real numbers those definitions produce, default values included.
- Other edge cases. No hypothesis excludes or any particular ; every claim is made for all and . Nothing in the statement guarantees that is nonempty, bounded or closed, except through the unseen definitions and hypothesis (d).
Confirmed by the mission captain (proposal self-audit).
Confirmed by the moderator at approval.