Part V — Differential Theory
Proofs omitted. Hover over highlighted terms to see their Lean types.
Reading sections
§23 — Directional Derivatives and Subgradients — Part 1
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Definition 23.0.5 (Subgradient Inequality): A dual vector xStar is a subgradient of f at x if for every z one has f z ≥ f x + ⟪xStar, z - x⟫, i.e. if it satisfies the subgradient inequality.
open scoped Topology
def IsSubgradientAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) (xStar : Module.Dual ℝ (Fin n → ℝ)) : Prop :=
∀ z, f z ≥ f x + ((xStar (z - x) : ℝ) : EReal)
Definition 23.0.6 (Subdifferential): The subdifferential of f at the point x is the set of all subgradients of f at x; equivalently, x ↦ subdifferentialAt f x is the set-valued subdifferential mapping of f.
open scoped Topology
def subdifferentialAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) : Set (Module.Dual ℝ (Fin n → ℝ)) :=
{g | IsSubgradientAt f x g}
open scoped Topology
open scoped ConvexAnalysis
@[simp] theorem mem_subdifferentialAt_iff {n : ℕ}
{f : (Fin n → ℝ) → EReal} {x : Fin n → ℝ} {xStar : Module.Dual ℝ (Fin n → ℝ)} :
xStar ∈ ∂ f x ↔ IsSubgradientAt f x xStar
A dual vector xStar is an ε-subgradient of f at x when f is convex, f is finite at x, and xStar satisfies the approximate subgradient inequality f z ≥ (f x - ε) + ⟪xStar, z - x⟫ for every z, with ε ≥ 0.
open scoped Topology
open scoped ConvexAnalysis
def IsApproximateSubgradientAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) (ε : NNReal)
(xStar : Module.Dual ℝ (Fin n → ℝ)) : Prop :=
ConvexFunction f ∧
(f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) ∧
∀ z, f z ≥ (f x - ((ε : ℝ) : EReal)) + ((xStar (z - x) : ℝ) : EReal)
Definition 23.6 (Approximate Subgradient): For a convex function f finite at x, the approximate subdifferential ∂_ε f(x) is the set of all dual vectors xStar such that ε ≥ 0, f is convex, f x is finite, and f z ≥ (f x - ε) + ⟪xStar, z - x⟫ for every z; equivalently, its elements are the ε-subgradients of f at x.
open scoped Topology
open scoped ConvexAnalysis
def approximateSubdifferentialAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) (ε : NNReal) :
Set (Module.Dual ℝ (Fin n → ℝ)) :=
{xStar | IsApproximateSubgradientAt f x ε xStar}
open scoped Topology
open scoped ConvexAnalysis
@[simp] theorem mem_approximateSubdifferentialAt_iff {n : ℕ}
{f : (Fin n → ℝ) → EReal} {x : Fin n → ℝ} {ε : NNReal}
{xStar : Module.Dual ℝ (Fin n → ℝ)} :
xStar ∈ ∂[ε] f x ↔ IsApproximateSubgradientAt f x ε xStar
The normal cone of a set C at x, expressed by the supporting-inequality condition.
open scoped Topology
open scoped ConvexAnalysis
def normalConeAt {n : ℕ} (C : Set (Fin n → ℝ)) (x : Fin n → ℝ) :
Set (Module.Dual ℝ (Fin n → ℝ)) :=
{xStar | x ∈ C ∧ ∀ z ∈ C, xStar (z - x) ≤ 0}
open scoped Topology
open scoped ConvexAnalysis
@[simp] theorem mem_normalConeAt_iff {n : ℕ}
{C : Set (Fin n → ℝ)} {x : Fin n → ℝ} {xStar : Module.Dual ℝ (Fin n → ℝ)} :
xStar ∈ normalConeAt C x ↔ x ∈ C ∧ ∀ z ∈ C, xStar (z - x) ≤ 0
The translated difference function y ↦ f (x + y) - f x associated to f at x.
open scoped Topology
open scoped ConvexAnalysis
def translatedDifferenceFunctionAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) : (Fin n → ℝ) → EReal
Proposition 23.6.1: Let f be convex and finite at x, and define h(y) = f (x + y) - f x. Then h^*(xStar) = f^*(xStar) + f x - ⟪x, xStar⟫. Under the Euclidean identification of vectors with dual vectors, one has xStar ∈ ∂_ε f(x) if and only if h^*(xStar) ≤ ε. In particular, ∂_ε f(x) is a closed convex set, it decreases as ε decreases, and ⋂_{ε > 0} ∂_ε f(x) = ∂f(x).
open scoped Topology
open scoped ConvexAnalysis
theorem approximateSubdifferential_iff_translatedDifferenceConjugate_le_and_basic_properties
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
(∀ xStar : Fin n → ℝ,
fenchelConjugate n (translatedDifferenceFunctionAt f x) xStar =
fenchelConjugate n f xStar + f x - ((dotProduct x xStar : ℝ) : EReal)) ∧
(∀ (ε : NNReal) (xStar : Fin n → ℝ),
dotProductEquiv ℝ (Fin n) xStar ∈ approximateSubdifferentialAt f x ε ↔
fenchelConjugate n (translatedDifferenceFunctionAt f x) xStar ≤ ((ε : ℝ) : EReal)) ∧
(∀ ε : NNReal,
IsClosed ((dotProductEquiv ℝ (Fin n)) ⁻¹' approximateSubdifferentialAt f x ε)) ∧
(∀ ε : NNReal,
Convex ℝ ((dotProductEquiv ℝ (Fin n)) ⁻¹' approximateSubdifferentialAt f x ε)) ∧
(∀ eps1 eps2 : NNReal,
eps1 ≤ eps2 → approximateSubdifferentialAt f x eps1 ⊆ approximateSubdifferentialAt f x eps2) ∧
(⋂ ε : {ε : NNReal // 0 < ε}, approximateSubdifferentialAt f x ε.1) = subdifferentialAt f x
The upper one-sided directional derivative of f at x along d, written as the infimum over right neighborhoods of the supremum of the difference quotients.
open scoped Topology
open scoped ConvexAnalysis
noncomputable def upperDirectionalDerivativeAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x d : Fin n → ℝ) : EReal :=
sInf ((Set.Ioi (0 : ℝ)).image fun a : ℝ =>
sSup {q : EReal | ∃ t : ℝ, 0 < t ∧ t < a ∧ q = (f (x + t • d) - f x) / (t : EReal)})
The support of the subdifferential of f at x evaluated on the direction d.
open scoped Topology
open scoped ConvexAnalysis
noncomputable def subdifferentialSupportAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x d : Fin n → ℝ) : EReal :=
sSup ((fun g : Module.Dual ℝ (Fin n → ℝ) => ((g d : ℝ) : EReal)) '' subdifferentialAt f x)
The support function of the approximate subdifferential ∂_ε f(x) evaluated on the direction y, using the Euclidean identification of ℝⁿ with its dual.
open scoped Topology
open scoped ConvexAnalysis
noncomputable def approximateSubdifferentialSupportAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) (ε : NNReal) (y : Fin n → ℝ) : EReal :=
supportFunctionEReal ((dotProductEquiv ℝ (Fin n)) ⁻¹' approximateSubdifferentialAt f x ε) y
-- Proof sketch: evaluate the subgradient inequality at the displaced point `x + t • d`; after
-- dividing by the positive scalar `t`, every positive-step difference quotient is bounded below by
-- the pairing `⟨g, d⟩`. Taking the supremum over short steps and then the infimum over step
-- radii preserves this lower bound.
Any actual subgradient yields a global linear lower bound on the upper directional derivative: if g ∈ ∂f(x), then ⟪g, d⟫ ≤ f'(x; d) for every direction d.
open scoped Topology
open scoped ConvexAnalysis
theorem le_upperDirectionalDerivative_of_mem_subdifferential {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hf : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x : Fin n → ℝ} (g : Module.Dual ℝ (Fin n → ℝ))
(hg : g ∈ subdifferentialAt f x) (d : Fin n → ℝ) :
((g d : ℝ) : EReal) ≤ upperDirectionalDerivativeAt f x d
The support of the subdifferential is always bounded above by the upper directional derivative: δ^*(d | ∂f(x)) ≤ f'(x; d).
open scoped Topology
open scoped ConvexAnalysis
theorem subdifferentialSupportAt_le_upperDirectionalDerivative {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hf : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x : Fin n → ℝ} (d : Fin n → ℝ) :
subdifferentialSupportAt f x d ≤ upperDirectionalDerivativeAt f x d
The directional difference quotient of f at x in the direction y.
open scoped Topology
open scoped ConvexAnalysis
noncomputable def directionalDifferenceQuotientAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x y : Fin n → ℝ) (t : ℝ) : EReal :=
(f (x + t • y) - f x) / (t : EReal)
The one-sided directional derivative of f at x along y is bilateral if the right and left directional difference quotients converge to the same extended real value.
open scoped Topology
open scoped ConvexAnalysis
def HasBilateralDirectionalDerivativeAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x y : Fin n → ℝ) : Prop :=
∃ L : EReal,
Filter.Tendsto (directionalDifferenceQuotientAt f x y) (𝓝[>] (0 : ℝ)) (𝓝 L) ∧
Filter.Tendsto (directionalDifferenceQuotientAt f x y) (𝓝[<] (0 : ℝ)) (𝓝 L)
-- Proof sketch: rewrite the left-sided quotient along `y` by substituting `t = -λ` with
-- `λ > 0`, which identifies it with the negative of the right-sided quotient along `-y`; then
-- compare the existence of matching one-sided limits.
Lemma 23.0.3: For a function f : ℝⁿ → [-∞, +∞] finite-valued at x, the left directional difference quotient along y is the negative of the right directional difference quotient along -y. Consequently, the right directional derivative along y is bilateral if and only if the right directional derivative along -y exists and is the negative of the one along y.
open scoped Topology
open scoped ConvexAnalysis
theorem bilateralDirectionalDerivative_iff_exists_neg_direction {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x y : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
(∀ L : EReal,
Filter.Tendsto (directionalDifferenceQuotientAt f x (-y)) (𝓝[>] (0 : ℝ)) (𝓝 L) →
Filter.Tendsto (directionalDifferenceQuotientAt f x y) (𝓝[<] (0 : ℝ)) (𝓝 (-L))) ∧
(HasBilateralDirectionalDerivativeAt f x y ↔
∃ L : EReal,
Filter.Tendsto (directionalDifferenceQuotientAt f x y) (𝓝[>] (0 : ℝ)) (𝓝 L) ∧
Filter.Tendsto (directionalDifferenceQuotientAt f x (-y)) (𝓝[>] (0 : ℝ)) (𝓝 (-L)))
The Euclidean gradient vector of a scalar field on ℝⁿ, given by the coordinates of its Fréchet derivative on the standard basis.
open scoped Topology
open scoped ConvexAnalysis
noncomputable def euclideanGradientAt {n : ℕ}
(f : (Fin n → ℝ) → ℝ) (x : Fin n → ℝ) : Fin n → ℝ :=
fun i => (fderiv ℝ f x) (Pi.single i (1 : ℝ))
-- Proof sketch: compose the differentiability of `f` at `x` with the affine line
-- `t ↦ x + t • y`; the resulting one-variable derivative at `0` is the Fréchet derivative applied
-- to `y`, and for `ℝⁿ` this is the dot product of `y` with the coordinate gradient vector.
Lemma 23.0.4: If f : ℝⁿ → ℝ is differentiable at x, then for every direction y the directional derivative along the line t ↦ x + t • y exists as a finite bilateral derivative, and its value is the Euclidean pairing euclideanGradientAt f x ⬝ᵥ y, i.e. ⟨∇ f(x), y⟩.
open scoped Topology
open scoped ConvexAnalysis
theorem directionalDerivative_eq_dot_euclideanGradient_of_differentiableAt {n : ℕ}
(f : (Fin n → ℝ) → ℝ) {x y : Fin n → ℝ}
(hfdiff : DifferentiableAt ℝ f x) :
HasDerivAt (fun t : ℝ => f (x + t • y)) (euclideanGradientAt f x ⬝ᵥ y) 0
Helper for Proposition 23.6.1: the Fenchel conjugate of the translated-difference function is the original conjugate with the expected affine correction term.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForProposition_23_6_1_translatedDifference_fenchelConjugate
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (xStar : Fin n → ℝ) :
fenchelConjugate n (translatedDifferenceFunctionAt f x) xStar =
fenchelConjugate n f xStar + f x - ((dotProduct x xStar : ℝ) : EReal)
Helper for Proposition 23.6.1: vector membership in the approximate subdifferential is the translated affine-minorant inequality.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForProposition_23_6_1_mem_approximateSubdifferential_iff_affine_minorant
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : NNReal) (xStar : Fin n → ℝ) :
dotProductEquiv ℝ (Fin n) xStar ∈ approximateSubdifferentialAt f x ε ↔
∀ y : Fin n → ℝ,
(((dotProduct y xStar - ε : ℝ) : EReal) ≤ translatedDifferenceFunctionAt f x y)
Helper for Proposition 23.6.1: the translated conjugate sublevel condition is equivalent to approximate-subgradient membership.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForProposition_23_6_1_mem_approximateSubdifferential_iff_conjugate_le
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : NNReal) (xStar : Fin n → ℝ) :
dotProductEquiv ℝ (Fin n) xStar ∈ approximateSubdifferentialAt f x ε ↔
fenchelConjugate n (translatedDifferenceFunctionAt f x) xStar ≤ ((ε : ℝ) : EReal)
Helper for Proposition 23.6.1: after identifying vectors with dual vectors, the approximate subdifferential is exactly the corresponding translated-conjugate sublevel set.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForProposition_23_6_1_preimage_eq_conjugateSublevel
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : NNReal) :
((dotProductEquiv ℝ (Fin n)) ⁻¹' approximateSubdifferentialAt f x ε) =
(fenchelConjugate n (translatedDifferenceFunctionAt f x)) ⁻¹' Set.Iic (((ε : ℝ) : EReal))
Helper for Proposition 23.6.1: the translated-difference conjugate is always nonnegative.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForProposition_23_6_1_nonneg_translatedDifferenceConjugate
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (xStar : Fin n → ℝ) :
0 ≤ fenchelConjugate n (translatedDifferenceFunctionAt f x) xStar
Helper for Proposition 23.6.1: at ε = 0, approximate subgradients are exactly ordinary subgradients.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForProposition_23_6_1_approximateSubdifferential_zero_eq_subdifferential
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (xStar : Fin n → ℝ) :
dotProductEquiv ℝ (Fin n) xStar ∈ approximateSubdifferentialAt f x 0 ↔
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x
Helper for Proposition 23.6.1: a nonnegative extended real that is bounded by every positive real must already be at most zero.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForProposition_23_6_1_le_zero_of_le_all_positive
{a : EReal}
(ha_nonneg : 0 ≤ a)
(ha_le : ∀ ε : {ε : NNReal // 0 < ε}, a ≤ ((ε.1 : ℝ) : EReal)) :
a ≤ 0
Helper for Theorem 23.1: the right directional difference quotient is monotone in the step length.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForTheorem_23_1_differenceQuotient_monotone {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x y : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
MonotoneOn (directionalDifferenceQuotientAt f x y) (Set.Ioi (0 : ℝ))
Helper for Theorem 23.1: the upper directional derivative equals the infimum of the positive difference quotients.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForTheorem_23_1_upperDerivative_eq_sInf_differenceQuotients {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x y : Fin n → ℝ)
(hmono : MonotoneOn (directionalDifferenceQuotientAt f x y) (Set.Ioi (0 : ℝ))) :
upperDirectionalDerivativeAt f x y =
sInf ((Set.Ioi (0 : ℝ)).image fun t : ℝ => directionalDifferenceQuotientAt f x y t)
Helper for Theorem 23.1: monotone right quotients converge to the upper directional derivative.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForTheorem_23_1_tendsto_upperDerivative {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x y : Fin n → ℝ)
(hmono : MonotoneOn (directionalDifferenceQuotientAt f x y) (Set.Ioi (0 : ℝ))) :
Filter.Tendsto (directionalDifferenceQuotientAt f x y) (𝓝[>] (0 : ℝ))
(𝓝 (upperDirectionalDerivativeAt f x y))
Helper for Theorem 23.1: the upper directional derivative vanishes in the zero direction.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForTheorem_23_1_upperDerivative_zero {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
upperDirectionalDerivativeAt f x 0 = 0
Helper for Theorem 23.1: rescaling the direction rescales the positive-step quotient.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForTheorem_23_1_scaledDifferenceQuotient_rescale {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x y : Fin n → ℝ) (a t : ℝ)
(ha : 0 < a) (ht : 0 < t) :
directionalDifferenceQuotientAt f x (a • y) t =
((a : ℝ) : EReal) * directionalDifferenceQuotientAt f x y (a * t)
Helper for Theorem 23.1: strict real upper bounds for two directional derivatives can be realized at one common positive step.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForTheorem_23_1_commonPositiveStep_below_real_bounds {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x y₁ y₂ : Fin n → ℝ)
(hmono₁ : MonotoneOn (directionalDifferenceQuotientAt f x y₁) (Set.Ioi (0 : ℝ)))
(hmono₂ : MonotoneOn (directionalDifferenceQuotientAt f x y₂) (Set.Ioi (0 : ℝ)))
{μ ν : ℝ}
(hμ : upperDirectionalDerivativeAt f x y₁ < (μ : EReal))
(hν : upperDirectionalDerivativeAt f x y₂ < (ν : EReal)) :
∃ t : ℝ, 0 < t ∧ directionalDifferenceQuotientAt f x y₁ t < (μ : EReal) ∧
directionalDifferenceQuotientAt f x y₂ t < (ν : EReal)
Helper for Theorem 23.1: the upper directional derivative is positively homogeneous in the direction argument.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForTheorem_23_1_upperDerivative_posHom_direct {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
PositivelyHomogeneous (upperDirectionalDerivativeAt f x)
Helper for Theorem 23.1: a real upper bound on one positive-step quotient gives a real upper bound on the corresponding function value.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForTheorem_23_1_valueBound_of_differenceQuotient_le_real {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x y : Fin n → ℝ) (t : ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ht : 0 < t) {μ : ℝ}
(hq : directionalDifferenceQuotientAt f x y t ≤ (μ : EReal)) :
f (x + t • y) ≤ (((f x).toReal + t * μ : ℝ) : EReal)
Helper for Theorem 23.1: a real upper bound on the function value at one positive step gives the same real upper bound on the corresponding difference quotient.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForTheorem_23_1_differenceQuotient_le_real_of_valueBound {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x y : Fin n → ℝ) (t : ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ht : 0 < t) {μ : ℝ}
(hvalue : f (x + t • y) ≤ (((f x).toReal + t * μ : ℝ) : EReal)) :
directionalDifferenceQuotientAt f x y t ≤ (μ : EReal)
Helper for Theorem 23.1: one common positive-step real bound on the endpoint quotients yields the corresponding convex-combination real bound on the mixed quotient.
open scoped Topology
open scoped ConvexAnalysis
lemma helperForTheorem_23_1_pointwiseDifferenceQuotient_convexCombination_realBound {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x y₁ y₂ : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
{s t μ ν : ℝ} (hs0 : 0 ≤ s) (hs1 : s ≤ 1) (ht : 0 < t)
(hq₁ : directionalDifferenceQuotientAt f x y₁ t ≤ (μ : EReal))
(hq₂ : directionalDifferenceQuotientAt f x y₂ t ≤ (ν : EReal)) :
directionalDifferenceQuotientAt f x ((1 - s) • y₁ + s • y₂) t ≤
((((1 - s) * μ + s * ν : ℝ)) : EReal)§23 — Directional Derivatives and Subgradients — Part 2
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 23.1: If f is convex and finite-valued at x, then for every direction y the right directional difference quotient λ ↦ (f (x + λ • y) - f x) / λ is nondecreasing on (0, ∞), hence the directional derivative exists as the limit of these quotients and equals their infimum over λ > 0. Moreover, the map y ↦ f'(x;y) is a positively homogeneous convex function, it satisfies f'(x;0) = 0, and -f'(x;-y) ≤ f'(x;y) for every y.
open scoped Topology
theorem convex_directionalDerivative_monotone_exists_and_sublinear {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
(∀ y : Fin n → ℝ,
MonotoneOn (directionalDifferenceQuotientAt f x y) (Set.Ioi (0 : ℝ)) ∧
Filter.Tendsto (directionalDifferenceQuotientAt f x y) (𝓝[>] (0 : ℝ))
(𝓝 (upperDirectionalDerivativeAt f x y)) ∧
upperDirectionalDerivativeAt f x y =
sInf ((Set.Ioi (0 : ℝ)).image fun t : ℝ => directionalDifferenceQuotientAt f x y t)) ∧
PositivelyHomogeneous (upperDirectionalDerivativeAt f x) ∧
ConvexFunction (upperDirectionalDerivativeAt f x) ∧
upperDirectionalDerivativeAt f x 0 = 0 ∧
∀ y : Fin n → ℝ, -(upperDirectionalDerivativeAt f x (-y)) ≤ upperDirectionalDerivativeAt f x y
Helper for Theorem 23.1: real epigraph heights for the upper directional derivative are stable under convex combinations of directions.
open scoped Topology
lemma helperForTheorem_23_1_upperDerivative_epigraph_convex {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(y₁ y₂ : Fin n → ℝ) {s μ ν : ℝ} (hs0 : 0 ≤ s) (hs1 : s ≤ 1)
(hμ : upperDirectionalDerivativeAt f x y₁ ≤ (μ : EReal))
(hν : upperDirectionalDerivativeAt f x y₂ ≤ (ν : EReal)) :
upperDirectionalDerivativeAt f x ((1 - s) • y₁ + s • y₂) ≤
((((1 - s) * μ + s * ν : ℝ)) : EReal)
Helper for Theorem 23.1: strict real upper bounds on the derivative in opposite directions must have nonnegative midpoint.
open scoped Topology
lemma helperForTheorem_23_1_midpoint_real_bound {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(y : Fin n → ℝ) {μ ν : ℝ}
(hμ : upperDirectionalDerivativeAt f x y < (μ : EReal))
(hν : upperDirectionalDerivativeAt f x (-y) < (ν : EReal)) :
0 ≤ (μ + ν) / 2§23 — Directional Derivatives and Subgradients — Part 3
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 23.2: Let f be convex and finite-valued at x. Then a dual vector xStar is a subgradient of f at x if and only if f'(x; y) ≥ ⟪xStar, y⟫ for every direction y. Moreover, under the Euclidean identification of vectors with dual vectors, the subdifferential ∂f(x) is represented by a closed convex set, and the closure of the directional derivative y ↦ f'(x; y) is its support function.
open scoped Topology
open scoped Pointwise
theorem subgradient_iff_directionalDerivative_ge_and_closure_eq_subdifferentialSupport {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(xStar : Module.Dual ℝ (Fin n → ℝ)) :
(IsSubgradientAt f x xStar ↔
∀ y : Fin n → ℝ, ((xStar y : ℝ) : EReal) ≤ upperDirectionalDerivativeAt f x y) ∧
IsClosed ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ∧
Convex ℝ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ∧
convexFunctionClosure (upperDirectionalDerivativeAt f x) = subdifferentialSupportAt f x
Theorem 23.3: Let f be convex and finite-valued at x. If f is subdifferentiable at x, then f is proper. If f is not subdifferentiable at x, then there exists a direction y such that f'(x; y) = -∞ and f'(x; -y) = +∞. Moreover, for every z ∈ ri (dom f), the same conclusion holds for y = z - x.
open scoped Topology
open scoped Pointwise
theorem proper_of_subdifferentiableAt_or_infiniteDirectionalDerivative_to_relativeInterior {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
(Set.Nonempty (subdifferentialAt f x) →
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) ∧
(¬ Set.Nonempty (subdifferentialAt f x) →
(∃ y : Fin n → ℝ,
upperDirectionalDerivativeAt f x y = (⊥ : EReal) ∧
upperDirectionalDerivativeAt f x (-y) = (⊤ : EReal)) ∧
∀ z : Fin n → ℝ,
z ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) →
upperDirectionalDerivativeAt f x (z - x) = (⊥ : EReal) ∧
upperDirectionalDerivativeAt f x (x - z) = (⊤ : EReal))
Helper for Theorem 23.2: a subgradient gives a lower bound on every positive directional difference quotient.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_23_2_differenceQuotient_lowerBound_of_subgradient {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(xStar : Module.Dual ℝ (Fin n → ℝ))
(hg : IsSubgradientAt f x xStar)
(y : Fin n → ℝ) {t : ℝ} (ht : 0 < t) :
((xStar y : ℝ) : EReal) ≤ directionalDifferenceQuotientAt f x y t
Helper for Theorem 23.2: subgradients are exactly the dual linear minorants of the upper directional derivative.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_23_2_subgradient_iff_dual_linear_minorant {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(xStar : Module.Dual ℝ (Fin n → ℝ)) :
IsSubgradientAt f x xStar ↔
∀ y : Fin n → ℝ, ((xStar y : ℝ) : EReal) ≤ upperDirectionalDerivativeAt f x y
Helper for Theorem 23.2: under the Euclidean identification, vectors whose dot products lie below the upper directional derivative are exactly the subgradients.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_23_2_subgradient_iff_vector_linear_minorant {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(v : Fin n → ℝ) :
dotProductEquiv ℝ (Fin n) v ∈ subdifferentialAt f x ↔
∀ y : Fin n → ℝ, ((dotProduct y v : ℝ) : EReal) ≤ upperDirectionalDerivativeAt f x y
Helper for Theorem 23.2: the support function of the vectorized subdifferential agrees with the support of the dual subdifferential.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_23_2_supportFunctionEReal_preimage_subdifferential_eq {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) (y : Fin n → ℝ) :
supportFunctionEReal ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) y =
subdifferentialSupportAt f x y
Helper for Theorem 23.2: the closure of the upper directional derivative is the support function of its linear-minorant set.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_23_2_closure_eq_support_of_minorant_set {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
convexFunctionClosure (upperDirectionalDerivativeAt f x) =
supportFunctionEReal {v : Fin n → ℝ |
∀ y : Fin n → ℝ, ((dotProduct y v : ℝ) : EReal) ≤ upperDirectionalDerivativeAt f x y}
Helper for Theorem 23.3: any actual subgradient at a finite point rules out the value ⊥ everywhere, so convexity plus the witness x ∈ dom f make f proper.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_23_3_proper_of_mem_subdifferential {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(g : Module.Dual ℝ (Fin n → ℝ)) (hg : g ∈ subdifferentialAt f x) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f
Helper for Theorem 23.3: if f has no subgradient at x, then the upper directional derivative y ↦ f'(x; y) cannot be proper.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_23_3_directionalDerivative_improper_of_empty_subdifferential {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hEmpty : ¬ Set.Nonempty (subdifferentialAt f x)) :
ImproperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (upperDirectionalDerivativeAt f x)
Helper for Theorem 23.3: if a convex directional-derivative function satisfies the symmetry inequality and is ⊥ at y, then it is ⊤ at the opposite direction.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_23_3_opposite_upperDerivative_eq_top_of_eq_bot {n : ℕ}
(D : (Fin n → ℝ) → EReal)
(hsymm : ∀ y : Fin n → ℝ, -(D (-y)) ≤ D y)
(y : Fin n → ℝ) (hybot : D y = (⊥ : EReal)) :
D (-y) = (⊤ : EReal)
Helper for Theorem 23.3: every direction from x to a point of ri (dom f) lies in ri (dom (y ↦ f'(x; y))).
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_23_3_directionToRi_mem_ri_effectiveDomain_directionalDerivative {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x z : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hzri : z ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
z - x ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (upperDirectionalDerivativeAt f x))§23 — Directional Derivatives and Subgradients — Part 4
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 23.4: Let f be a proper convex function. If x ∉ dom f, then the subdifferential ∂f(x) is empty. If x ∈ ri (dom f), then ∂f(x) is nonempty, the directional derivative function y ↦ f'(x; y) is a closed proper convex function, and for every direction y it equals the support function δ^*(y | ∂f(x)). Finally, ∂f(x) is nonempty and bounded if and only if x ∈ interior (dom f); in that case f'(x; y) is finite for every y.
open scoped Topology
theorem subdifferential_empty_off_effectiveDomain_nonempty_on_relativeInterior_and_bounded_iff_mem_interior
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) (x : Fin n → ℝ) :
(x ∉ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f →
subdifferentialAt f x = ∅) ∧
(x ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) →
Set.Nonempty (subdifferentialAt f x) ∧
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (upperDirectionalDerivativeAt f x) ∧
convexFunctionClosure (upperDirectionalDerivativeAt f x) = upperDirectionalDerivativeAt f x ∧
∀ y : Fin n → ℝ,
upperDirectionalDerivativeAt f x y = subdifferentialSupportAt f x y) ∧
(((Set.Nonempty (subdifferentialAt f x) ∧
Bornology.IsBounded ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)) ↔
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) ∧
(x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) →
∀ y : Fin n → ℝ,
upperDirectionalDerivativeAt f x y ≠ (⊤ : EReal) ∧
upperDirectionalDerivativeAt f x y ≠ (⊥ : EReal)))
Helper for Theorem 23.4: the Euclidean-space coercion preimage of a set in Fin n → ℝ matches the image under the inverse Euclidean equivalence.
open scoped Topology
lemma helperForTheorem_23_4_preimage_eq_symmImage {n : ℕ} (C : Set (Fin n → ℝ)) :
((fun z : EuclideanSpace ℝ (Fin n) => (z : Fin n → ℝ)) ⁻¹' C) =
(EuclideanSpace.equiv (Fin n) ℝ).symm '' C
Helper for Theorem 23.4: off the effective domain, a proper convex function has no subgradients.
open scoped Topology
lemma helperForTheorem_23_4_subdifferential_empty_of_not_mem_effectiveDomain
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) (x : Fin n → ℝ)
(hx : x ∉ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) :
subdifferentialAt f x = ∅
Helper for Theorem 23.4: Corollary 6.4.1 transported from EuclideanSpace ℝ (Fin n) back to Fin n → ℝ.
open scoped Topology
lemma helperForTheorem_23_4_mem_interior_iff_forall_exists_add_smul_mem
{n : ℕ} (C : Set (Fin n → ℝ)) (hC : Convex ℝ C) (x : Fin n → ℝ) :
x ∈ interior C ↔
∀ y : Fin n → ℝ, ∃ ε > (0 : ℝ), x + ε • y ∈ C
Helper for Theorem 23.4: relative-interior points admit subgradients.
open scoped Topology
lemma helperForTheorem_23_4_nonempty_subdifferential_of_mem_relativeInterior
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) (x : Fin n → ℝ)
(hxri : x ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
Set.Nonempty (subdifferentialAt f x)
Helper for Theorem 23.4: interior points have finite directional derivatives from above.
open scoped Topology
lemma helperForTheorem_23_4_directionalDerivative_ne_top_of_mem_interior
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) (x : Fin n → ℝ)
(hxInt : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
∀ y : Fin n → ℝ, upperDirectionalDerivativeAt f x y ≠ (⊤ : EReal)
Helper for Theorem 23.4: if all directional derivatives avoid ⊤, then the base point lies in the interior of the effective domain.
open scoped Topology
lemma helperForTheorem_23_4_mem_interior_of_directionalDerivative_ne_top
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hfiniteTop : ∀ y : Fin n → ℝ, upperDirectionalDerivativeAt f x y ≠ (⊤ : EReal)) :
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
Helper for Theorem 23.4: a nonempty subdifferential forces f x to be finite.
open scoped Topology
lemma helperForTheorem_23_4_finiteAt_of_subdifferentiable
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) :
f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)
Helper for Theorem 23.4: a nonempty subdifferential makes the directional derivative proper.
open scoped Topology
lemma helperForTheorem_23_4_upperDirectionalDerivative_proper_of_subdifferentiable
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (upperDirectionalDerivativeAt f x)
Helper for Theorem 23.4: interior points lie in the relative interior.
open scoped Topology
lemma helperForTheorem_23_4_mem_relativeInterior_of_mem_interior
{n : ℕ} {C : Set (Fin n → ℝ)} {x : Fin n → ℝ} (hxInt : x ∈ interior C) :
x ∈ euclideanRelativeInterior_fin n C
Helper for Theorem 23.4: if the subdifferential is nonempty and bounded, then every directional derivative is finite from above.
open scoped Topology
lemma helperForTheorem_23_4_directionalDerivative_ne_top_of_nonempty_bounded_subdifferential
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x))
(hCbd : Bornology.IsBounded ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)) :
∀ y : Fin n → ℝ, upperDirectionalDerivativeAt f x y ≠ (⊤ : EReal)
Helper for Theorem 23.4: on ri (dom f), the directional derivative is closed proper and agrees with the support function of the subdifferential.
open scoped Topology
lemma helperForTheorem_23_4_directionalDerivative_regularity_of_mem_relativeInterior
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) (x : Fin n → ℝ)
(hxri : x ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
Set.Nonempty (subdifferentialAt f x) ∧
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (upperDirectionalDerivativeAt f x) ∧
ClosedConvexFunction (upperDirectionalDerivativeAt f x) ∧
convexFunctionClosure (upperDirectionalDerivativeAt f x) =
upperDirectionalDerivativeAt f x ∧
∀ y : Fin n → ℝ,
upperDirectionalDerivativeAt f x y = subdifferentialSupportAt f x y§23 — Directional Derivatives and Subgradients — Part 5
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Membership of xStar in the Euclidean subdifferential of f at x, via the dot-product identification of ℝⁿ with its dual.
open scoped Topology
def IsEuclideanSubgradientAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x xStar : Fin n → ℝ) : Prop :=
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x
The primal Fenchel expression z ↦ ⟪z, xStar⟫ - f z attains its supremum at z = x.
open scoped Topology
def PrimalFenchelSupremumAttainedAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x xStar : Fin n → ℝ) : Prop :=
∀ z : Fin n → ℝ,
((dotProduct z xStar : ℝ) : EReal) - f z ≤
((dotProduct x xStar : ℝ) : EReal) - f x
The dual Fenchel expression zStar ↦ ⟪x, zStar⟫ - f^*(zStar) attains its supremum at zStar = xStar.
open scoped Topology
def DualFenchelSupremumAttainedAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x xStar : Fin n → ℝ) : Prop :=
∀ zStar : Fin n → ℝ,
((dotProduct x zStar : ℝ) : EReal) - fenchelConjugate n f zStar ≤
((dotProduct x xStar : ℝ) : EReal) - fenchelConjugate n f xStar
The Fenchel-Young inequality at (x, xStar) written as a weak inequality.
open scoped Topology
def FenchelYoungInequalityAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x xStar : Fin n → ℝ) : Prop :=
f x + fenchelConjugate n f xStar ≤ ((dotProduct x xStar : ℝ) : EReal)
The Fenchel-Young equality at (x, xStar).
open scoped Topology
def FenchelYoungEqualityAt {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x xStar : Fin n → ℝ) : Prop :=
f x + fenchelConjugate n f xStar = ((dotProduct x xStar : ℝ) : EReal)
Theorem 23.5: For a proper convex function f and points x and xStar in ℝⁿ, the following four conditions are equivalent in the List.TFAE sense: (a) xStar ∈ ∂f(x) under the Euclidean identification, (b) z ↦ ⟪z, xStar⟫ - f z attains its supremum at z = x, (c) the Fenchel-Young inequality f x + f^*(xStar) ≤ ⟪x, xStar⟫, and (d) the Fenchel-Young equality f x + f^*(xStar) = ⟪x, xStar⟫. Furthermore, if (cl f)(x) = f(x), then the enlarged list consisting of these conditions together with (a*) x ∈ ∂f^*(xStar), (b*) `zStar ↦ ⟪x, zStar⟫ - f^*(zStar)attains its supremum atzStar = xStar, and (a**) xStar ∈ ∂(cl f)(x)` is again a List.TFAE.
open scoped Topology
theorem euclidean_subgradient_iff_fenchel_supremum_attainment_and_fenchelYoung
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x xStar : Fin n → ℝ) :
List.TFAE
[ IsEuclideanSubgradientAt f x xStar
, PrimalFenchelSupremumAttainedAt f x xStar
, FenchelYoungInequalityAt f x xStar
, FenchelYoungEqualityAt f x xStar
] ∧
(convexFunctionClosure f x = f x →
List.TFAE
[ IsEuclideanSubgradientAt f x xStar
, PrimalFenchelSupremumAttainedAt f x xStar
, FenchelYoungInequalityAt f x xStar
, FenchelYoungEqualityAt f x xStar
, IsEuclideanSubgradientAt (fenchelConjugate n f) xStar x
, DualFenchelSupremumAttainedAt f x xStar
, IsEuclideanSubgradientAt (convexFunctionClosure f) x xStar
])
Corollary 23.5.1: If f is a closed proper convex function, then the subdifferential of the Fenchel conjugate is the inverse of the subdifferential of f in the sense of set-valued mapping, i.e. x ∈ ∂f^*(xStar) if and only if xStar ∈ ∂f(x).
open scoped Topology
theorem euclidean_subgradient_fenchelConjugate_iff
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x xStar : Fin n → ℝ) :
IsEuclideanSubgradientAt (fenchelConjugate n f) xStar x ↔
IsEuclideanSubgradientAt f x xStar
Corollary 23.5.2: If f is a proper convex function and subdifferentiable at x, then the closure of f agrees with f at x, and the subdifferential of the closure agrees with the subdifferential of f at x.
open scoped Topology
theorem convexFunctionClosure_eq_at_subdifferentiable_point_and_subdifferential_eq
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hsub : Set.Nonempty (subdifferentialAt f x)) :
convexFunctionClosure f x = f x ∧
subdifferentialAt (convexFunctionClosure f) x = subdifferentialAt f x
Corollary 23.5.3: Let C be a nonempty closed convex set. Then for each vector xStar, the subdifferential of the support function δ^*(· | C) at xStar consists exactly of the points x ∈ C where the linear function z ↦ ⟪z, xStar⟫ attains its maximum over C.
open scoped Topology
theorem euclidean_subgradient_supportFunctionEReal_iff_mem_and_maximizes_on_closed_convex_set
{n : ℕ} (C : Set (Fin n → ℝ)) (hCne : C.Nonempty) (hCclosed : IsClosed C)
(hCconv : Convex ℝ C) (xStar x : Fin n → ℝ) :
IsEuclideanSubgradientAt (supportFunctionEReal C) xStar x ↔
x ∈ C ∧ ∀ z ∈ C, dotProduct z xStar ≤ dotProduct x xStar
The Euclidean polar cone of K, namely the vectors whose dot product with every point of K is nonpositive.
open scoped Topology
def euclideanPolarCone {n : ℕ} (K : Set (Fin n → ℝ)) : Set (Fin n → ℝ) :=
{xStar | ∀ x ∈ K, dotProduct x xStar ≤ 0}
Corollary 23.5.4: Let K be a nonempty closed convex cone. Then xStar ∈ ∂δ(x | K) if and only if x ∈ ∂δ(xStar | Kᵒ). These conditions are equivalent to x ∈ K, xStar ∈ Kᵒ, and ⟪x, xStar⟫ = 0.
open scoped Topology
theorem euclidean_subgradient_indicatorConvexCone_iff_polar_subgradient_and_orthogonality
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ))
(hKne : (K : Set (Fin n → ℝ)).Nonempty)
(hKclosed : IsClosed (K : Set (Fin n → ℝ))) (x xStar : Fin n → ℝ) :
(IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
IsEuclideanSubgradientAt (indicatorFunction (euclideanPolarCone (K : Set (Fin n → ℝ)))) xStar x) ∧
(IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
x ∈ (K : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (K : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0)
Helper for Theorem 23.5: a Euclidean subgradient at x forces f x to be finite.
open scoped Topology
lemma helperForTheorem_23_5_finiteAt_of_euclideanSubgradient {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hf : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x xStar : Fin n → ℝ) (ha : IsEuclideanSubgradientAt f x xStar) :
f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)
Helper for Theorem 23.5: Fenchel-Young inequality at x also forces f x to be finite.
open scoped Topology
lemma helperForTheorem_23_5_finiteAt_of_fenchelYoungInequality {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hf : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x xStar : Fin n → ℝ) (hc : FenchelYoungInequalityAt f x xStar) :
f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)
Helper for Theorem 23.5: subgradient membership is equivalent to the Fenchel-Young inequality at the same point.
open scoped Topology
lemma helperForTheorem_23_5_euclideanSubgradient_iff_fenchelYoungInequality {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hf : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x xStar : Fin n → ℝ) :
IsEuclideanSubgradientAt f x xStar ↔ FenchelYoungInequalityAt f x xStar
Helper for Theorem 23.5: primal supremum attainment is equivalent to the Fenchel-Young weak inequality.
open scoped Topology
lemma helperForTheorem_23_5_primalSupremumAttainedAt_iff_fenchelYoungInequality {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x xStar : Fin n → ℝ) :
PrimalFenchelSupremumAttainedAt f x xStar ↔ FenchelYoungInequalityAt f x xStar
Helper for Theorem 23.5: the four basic conditions are equivalent.
open scoped Topology
theorem helperForTheorem_23_5_fourWayTFAE {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hf : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x xStar : Fin n → ℝ) :
List.TFAE
[ IsEuclideanSubgradientAt f x xStar
, PrimalFenchelSupremumAttainedAt f x xStar
, FenchelYoungInequalityAt f x xStar
, FenchelYoungEqualityAt f x xStar
]
Helper for Theorem 23.5: primal attainment for f* is the same statement as dual attainment for f.
open scoped Topology
lemma helperForTheorem_23_5_primalSupremumAttainedAt_conjugate_iff_dualSupremumAttainedAt
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x xStar : Fin n → ℝ) :
PrimalFenchelSupremumAttainedAt (fenchelConjugate n f) xStar x ↔
DualFenchelSupremumAttainedAt f x xStar
Helper for Theorem 23.5: under (cl f)(x) = f(x), Fenchel-Young equality for f* is the same as for f.
open scoped Topology
lemma helperForTheorem_23_5_fenchelYoungEqualityAt_conjugate_iff_original {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hfConv : ConvexFunction f)
(x xStar : Fin n → ℝ) (hclx : convexFunctionClosure f x = f x) :
FenchelYoungEqualityAt (fenchelConjugate n f) xStar x ↔ FenchelYoungEqualityAt f x xStar
Helper for Theorem 23.5: under (cl f)(x) = f(x), Fenchel-Young equality for cl f is the same as for f.
open scoped Topology
lemma helperForTheorem_23_5_fenchelYoungEqualityAt_closure_iff_original {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x xStar : Fin n → ℝ)
(hclx : convexFunctionClosure f x = f x) :
FenchelYoungEqualityAt (convexFunctionClosure f) x xStar ↔ FenchelYoungEqualityAt f x xStar
Helper for Corollary 23.5.1: a closed proper convex function agrees pointwise with its closure.
open scoped Topology
lemma helperForCorollary_23_5_1_closure_eq_at_point
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) :
convexFunctionClosure f x = f x
Helper for Corollary 23.5.1: Theorem 23.5 identifies the original and conjugate Euclidean subgradient conditions once closure agrees with the function at the base point.
open scoped Topology
lemma helperForCorollary_23_5_1_extract_tfae_equivalence
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x xStar : Fin n → ℝ) :
IsEuclideanSubgradientAt (fenchelConjugate n f) xStar x ↔
IsEuclideanSubgradientAt f x xStar
Helper for Corollary 23.5.2: one Euclidean subgradient witness already forces the closure to agree with f at the base point.
open scoped Topology
lemma helperForCorollary_23_5_2_closure_eq_at_point_of_euclideanSubgradient
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x xStar : Fin n → ℝ) (hsubE : IsEuclideanSubgradientAt f x xStar) :
convexFunctionClosure f x = f x
Helper for Corollary 23.5.2: once cl f agrees with f at x, Theorem 23.5 identifies their Euclidean subgradient conditions at that point.
open scoped Topology
lemma helperForCorollary_23_5_2_euclideanSubgradient_closure_iff_original
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x xStar : Fin n → ℝ) (hclx : convexFunctionClosure f x = f x) :
IsEuclideanSubgradientAt (convexFunctionClosure f) x xStar ↔
IsEuclideanSubgradientAt f x xStar
Helper for Corollary 23.5.2: pointwise equivalence of Euclidean subgradient predicates gives equality of the corresponding dual-valued subdifferentials.
open scoped Topology
lemma helperForCorollary_23_5_2_subdifferential_eq_of_euclidean_equiv
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(hEq : ∀ xStar : Fin n → ℝ, IsEuclideanSubgradientAt f x xStar ↔ IsEuclideanSubgradientAt g x xStar) :
subdifferentialAt f x = subdifferentialAt g x
Helper for Corollary 23.5.3: the support-function subgradient condition transports through the indicator/support conjugacy of a closed convex set.
open scoped Topology
lemma helperForCorollary_23_5_3_supportSubgradient_iff_indicatorSubgradient
{n : ℕ} (C : Set (Fin n → ℝ)) (hCne : C.Nonempty) (hCclosed : IsClosed C)
(hCconv : Convex ℝ C) (xStar x : Fin n → ℝ) :
IsEuclideanSubgradientAt (supportFunctionEReal C) xStar x ↔
IsEuclideanSubgradientAt (indicatorFunction C) x xStar
Helper for Corollary 23.5.3: for an indicator function, Theorem 23.5 identifies Euclidean subgradients with primal Fenchel supremum attainment.
open scoped Topology
lemma helperForCorollary_23_5_3_indicatorSubgradient_iff_primalSupremumAttained
{n : ℕ} (C : Set (Fin n → ℝ)) (hCne : C.Nonempty) (hCconv : Convex ℝ C)
(x xStar : Fin n → ℝ) :
IsEuclideanSubgradientAt (indicatorFunction C) x xStar ↔
PrimalFenchelSupremumAttainedAt (indicatorFunction C) x xStar
Helper for Corollary 23.5.3: primal attainment for the indicator function says exactly that x lies in C and maximizes z ↦ ⟪z, xStar⟫ over C.
open scoped Topology
lemma helperForCorollary_23_5_3_indicatorPrimalSupremumAttained_iff_mem_and_maximizes
{n : ℕ} (C : Set (Fin n → ℝ)) (hCne : C.Nonempty) (x xStar : Fin n → ℝ) :
PrimalFenchelSupremumAttainedAt (indicatorFunction C) x xStar ↔
x ∈ C ∧ ∀ z ∈ C, dotProduct z xStar ≤ dotProduct x xStar
Helper for Corollary 23.5.4: a maximizer of z ↦ ⟪z, xStar⟫ on a convex cone is orthogonal to xStar.
open scoped Topology
lemma helperForCorollary_23_5_4_dotProduct_eq_zero_of_mem_and_maximizes_on_cone
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ)) {x xStar : Fin n → ℝ}
(hxK : x ∈ (K : Set (Fin n → ℝ)))
(hMax : ∀ z ∈ (K : Set (Fin n → ℝ)), dotProduct z xStar ≤ dotProduct x xStar) :
dotProduct x xStar = 0
Helper for Corollary 23.5.4: once the maximizing point is orthogonal to xStar, the same maximality inequality forces xStar into the Euclidean polar cone.
open scoped Topology
lemma helperForCorollary_23_5_4_mem_polar_of_mem_and_maximizes_on_cone
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ)) {x xStar : Fin n → ℝ}
(hxK : x ∈ (K : Set (Fin n → ℝ)))
(hMax : ∀ z ∈ (K : Set (Fin n → ℝ)), dotProduct z xStar ≤ dotProduct x xStar)
(horth : dotProduct x xStar = 0) :
xStar ∈ euclideanPolarCone (K : Set (Fin n → ℝ))
Helper for Corollary 23.5.4: maximality of z ↦ ⟪z, xStar⟫ on a convex cone is equivalent to polar membership together with orthogonality at the maximizing point.
open scoped Topology
lemma helperForCorollary_23_5_4_mem_and_maximizes_on_cone_iff_polar_and_orthogonality
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ)) (x xStar : Fin n → ℝ) :
x ∈ (K : Set (Fin n → ℝ)) ∧
(∀ z ∈ (K : Set (Fin n → ℝ)), dotProduct z xStar ≤ dotProduct x xStar) ↔
x ∈ (K : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (K : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0
Helper for Corollary 23.5.4: the indicator-function subgradient condition for a closed convex cone is equivalent to primal membership, polar membership, and orthogonality.
open scoped Topology
lemma helperForCorollary_23_5_4_indicatorSubgradient_iff_mem_polar_orthogonal
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ))
(hKne : (K : Set (Fin n → ℝ)).Nonempty)
(x xStar : Fin n → ℝ) :
IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
x ∈ (K : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (K : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0
Helper for Corollary 23.5.4: the indicator-function subgradient condition on the Euclidean polar cone is equivalent to the same primal/polar orthogonality condition.
open scoped Topology
lemma helperForCorollary_23_5_4_polarIndicatorSubgradient_iff_mem_polar_orthogonal
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ))
(hKne : (K : Set (Fin n → ℝ)).Nonempty)
(hKclosed : IsClosed (K : Set (Fin n → ℝ))) (x xStar : Fin n → ℝ) :
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (K : Set (Fin n → ℝ)))) xStar x ↔
x ∈ (K : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (K : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0
Helper for Corollary 23.5.4: with the textbook nonemptiness hypothesis restored, the primal and polar indicator-subgradient conditions are equivalent and both reduce to orthogonality.
open scoped Topology
lemma helperForCorollary_23_5_4_indicatorConvexCone_iff_polar_subgradient_and_orthogonality_of_nonempty
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ))
(hKne : (K : Set (Fin n → ℝ)).Nonempty)
(hKclosed : IsClosed (K : Set (Fin n → ℝ))) (x xStar : Fin n → ℝ) :
(IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (K : Set (Fin n → ℝ)))) xStar x) ∧
(IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
x ∈ (K : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (K : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0)
Helper for Corollary 23.5.4: the indicator of the empty carrier has every Euclidean vector as a subgradient at every base point.
open scoped Topology
lemma helperForCorollary_23_5_4_empty_indicator_has_universal_subgradient
{n : ℕ} (x xStar : Fin n → ℝ) :
IsEuclideanSubgradientAt (indicatorFunction (∅ : Set (Fin n → ℝ))) x xStar
Helper for Corollary 23.5.4: on the polar of the empty cone, the indicator is the zero function, so the Euclidean subgradient condition is equivalent to the candidate subgradient vector vanishing.
open scoped Topology
lemma helperForCorollary_23_5_4_empty_polar_indicator_subgradient_iff_eq_zero
{n : ℕ} (x xStar : Fin n → ℝ) :
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (∅ : Set (Fin n → ℝ)))) xStar x ↔
x = 0
Helper for Corollary 23.5.4: on the empty carrier, the first equivalence in the current theorem header collapses to the condition x = 0.
open scoped Topology
lemma helperForCorollary_23_5_4_empty_subgradient_equivalence_iff_eq_zero
{n : ℕ} (x xStar : Fin n → ℝ) :
(IsEuclideanSubgradientAt (indicatorFunction (∅ : Set (Fin n → ℝ))) x xStar ↔
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (∅ : Set (Fin n → ℝ)))) xStar x) ↔
x = 0
Helper for Corollary 23.5.4: the orthogonality characterization is impossible on the empty carrier because it already requires x ∈ ∅.
open scoped Topology
lemma helperForCorollary_23_5_4_empty_mem_polar_orthogonal_iff_false
{n : ℕ} (x xStar : Fin n → ℝ) :
(x ∈ (∅ : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (∅ : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0) ↔ False
Helper for Corollary 23.5.4: the current orthogonality equivalence fails on the empty carrier, which is the concrete obstruction behind the missing nonemptiness hypothesis.
open scoped Topology
lemma helperForCorollary_23_5_4_empty_indicatorSubgradient_not_iff_mem_polar_orthogonal
{n : ℕ} (x xStar : Fin n → ℝ) :
¬ (IsEuclideanSubgradientAt (indicatorFunction (∅ : Set (Fin n → ℝ))) x xStar ↔
x ∈ (∅ : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (∅ : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0)
Helper for Corollary 23.5.4: on the empty carrier, the full conjunction asserted by the current theorem header is impossible because its orthogonality component already fails.
open scoped Topology
lemma helperForCorollary_23_5_4_empty_full_conclusion_false
{n : ℕ} (x xStar : Fin n → ℝ) :
¬ ((IsEuclideanSubgradientAt (indicatorFunction (∅ : Set (Fin n → ℝ))) x xStar ↔
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (∅ : Set (Fin n → ℝ)))) xStar x) ∧
(IsEuclideanSubgradientAt (indicatorFunction (∅ : Set (Fin n → ℝ))) x xStar ↔
x ∈ (∅ : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (∅ : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0))
Helper for Corollary 23.5.4: the empty carrier already gives an explicit zero-vector counterexample to the current theorem header, since the first equivalence holds at x = 0 while the full conjunction is still false.
open scoped Topology
lemma helperForCorollary_23_5_4_empty_counterexample_at_zero
{n : ℕ} (xStar : Fin n → ℝ) :
(IsEuclideanSubgradientAt (indicatorFunction (∅ : Set (Fin n → ℝ))) (0 : Fin n → ℝ) xStar ↔
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (∅ : Set (Fin n → ℝ)))) xStar (0 : Fin n → ℝ)) ∧
¬ ((IsEuclideanSubgradientAt (indicatorFunction (∅ : Set (Fin n → ℝ))) (0 : Fin n → ℝ) xStar ↔
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (∅ : Set (Fin n → ℝ)))) xStar
(0 : Fin n → ℝ)) ∧
(IsEuclideanSubgradientAt (indicatorFunction (∅ : Set (Fin n → ℝ))) (0 : Fin n → ℝ)
xStar ↔
(0 : Fin n → ℝ) ∈ (∅ : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (∅ : Set (Fin n → ℝ)) ∧
dotProduct (0 : Fin n → ℝ) xStar = 0))
Helper for Corollary 23.5.4: if a convex cone has empty carrier, then the full conclusion appearing in the current theorem header is false.
open scoped Topology
lemma helperForCorollary_23_5_4_full_conclusion_false_of_not_nonempty
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ))
(hKne : ¬ (K : Set (Fin n → ℝ)).Nonempty) (x xStar : Fin n → ℝ) :
¬ ((IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (K : Set (Fin n → ℝ)))) xStar x) ∧
(IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
x ∈ (K : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (K : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0))
Helper for Corollary 23.5.4: any proof of the full conclusion in the current theorem header already forces the cone carrier to be nonempty.
open scoped Topology
lemma helperForCorollary_23_5_4_nonempty_of_full_conclusion
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ)) (x xStar : Fin n → ℝ) :
((IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (K : Set (Fin n → ℝ)))) xStar x) ∧
(IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
x ∈ (K : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (K : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0)) →
(K : Set (Fin n → ℝ)).Nonempty
Helper for Corollary 23.5.4: if K has empty carrier, then the explicit zero-vector counterexample for ∅ transports directly to K.
open scoped Topology
lemma helperForCorollary_23_5_4_counterexample_at_zero_of_not_nonempty
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ))
(hKne : ¬ (K : Set (Fin n → ℝ)).Nonempty) (xStar : Fin n → ℝ) :
(IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) (0 : Fin n → ℝ) xStar ↔
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (K : Set (Fin n → ℝ)))) xStar (0 : Fin n → ℝ)) ∧
¬ ((IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) (0 : Fin n → ℝ)
xStar ↔
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (K : Set (Fin n → ℝ)))) xStar
(0 : Fin n → ℝ)) ∧
(IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) (0 : Fin n → ℝ)
xStar ↔
(0 : Fin n → ℝ) ∈ (K : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (K : Set (Fin n → ℝ)) ∧
dotProduct (0 : Fin n → ℝ) xStar = 0))
Helper for Corollary 23.5.4: a theorem of the current universal shape would already force the cone carrier to be nonempty.
open scoped Topology
lemma helperForCorollary_23_5_4_nonempty_of_universal_header
{n : ℕ} (K : ConvexCone ℝ (Fin n → ℝ))
(hAll : ∀ x xStar : Fin n → ℝ,
(IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
IsEuclideanSubgradientAt
(indicatorFunction (euclideanPolarCone (K : Set (Fin n → ℝ)))) xStar x) ∧
(IsEuclideanSubgradientAt (indicatorFunction (K : Set (Fin n → ℝ))) x xStar ↔
x ∈ (K : Set (Fin n → ℝ)) ∧
xStar ∈ euclideanPolarCone (K : Set (Fin n → ℝ)) ∧
dotProduct x xStar = 0)) :
(K : Set (Fin n → ℝ)).Nonempty§23 — Directional Derivatives and Subgradients — Part 6
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Corollary 23.4.1: If f is a finite convex function on ℝⁿ, then at every point x the subdifferential ∂f(x) is a nonempty bounded closed convex set, the directional derivative function y ↦ f'(x; y) is finite, positively homogeneous, and convex, and for each direction y the value f'(x; y) is attained as the maximum pairing ⟨x⋆, y⟩ over x⋆ ∈ ∂f(x).
theorem finite_convex_subdifferential_nonempty_bounded_closed_convex_and_directionalDerivative_max
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f)
(hfinite : ∀ z : Fin n → ℝ, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal)) (x : Fin n → ℝ) :
Set.Nonempty (subdifferentialAt f x) ∧
Bornology.IsBounded ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ∧
IsClosed ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ∧
Convex ℝ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ∧
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (upperDirectionalDerivativeAt f x) ∧
PositivelyHomogeneous (upperDirectionalDerivativeAt f x) ∧
(∀ y : Fin n → ℝ,
upperDirectionalDerivativeAt f x y ≠ (⊤ : EReal) ∧
upperDirectionalDerivativeAt f x y ≠ (⊥ : EReal)) ∧
∀ y : Fin n → ℝ,
∃ xStar ∈ subdifferentialAt f x,
upperDirectionalDerivativeAt f x y = ((xStar y : ℝ) : EReal) ∧
∀ zStar ∈ subdifferentialAt f x, zStar y ≤ xStar y
Theorem 23.6: If f is a closed proper convex function and x is a point where f is finite, then for every direction y the directional derivative f'(x; y) is the right-hand limit, as ε ↓ 0, of the support values δ^*(y | ∂_ε f(x)) of the approximate subdifferentials.
theorem directionalDerivative_eq_tendsto_approximateSubdifferentialSupport {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
Filter.Tendsto
(fun ε : ℝ => approximateSubdifferentialSupportAt f x ε.toNNReal y)
(nhdsWithin (0 : ℝ) (Set.Ioi (0 : ℝ)))
(nhds (upperDirectionalDerivativeAt f x y))
Helper for Theorem 23.6: identify the vectorized approximate subdifferential with the Fenchel-conjugate sublevel set from Proposition 23.6.1.
lemma helperForTheorem_23_6_approximateSubdifferential_preimage_eq_conjugateSublevel
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : NNReal) :
((dotProductEquiv ℝ (Fin n)) ⁻¹' approximateSubdifferentialAt f x ε) =
{v : Fin n → ℝ | fenchelConjugate n (translatedDifferenceFunctionAt f x) v ≤
((ε : ℝ) : EReal)}
Helper for Theorem 23.6: rewrite the approximate-support value as the support function of the corresponding Fenchel-conjugate sublevel set.
lemma helperForTheorem_23_6_approximateSupport_eq_supportFunction_conjugateSublevel
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) (x y : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : NNReal) :
approximateSubdifferentialSupportAt f x ε y =
supportFunctionEReal
{v : Fin n → ℝ | fenchelConjugate n (translatedDifferenceFunctionAt f x) v ≤
((ε : ℝ) : EReal)} y
Helper for Theorem 23.6: shifting the closed translated-difference function by a real constant subtracts that constant from its Fenchel conjugate.
lemma helperForTheorem_23_6_shiftedTranslatedClosure_fenchelConjugate
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) (ε : ℝ) :
fenchelConjugate n
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z + ((ε : ℝ) : EReal)) =
fun v =>
fenchelConjugate n (translatedDifferenceFunctionAt f x) v - ((ε : ℝ) : EReal)
Helper for Theorem 23.6: the translated-difference function vanishes at the origin whenever f x is finite.
lemma helperForTheorem_23_6_translatedDifference_zero
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
translatedDifferenceFunctionAt f x 0 = 0
Helper for Theorem 23.6: properness of f rules out the value ⊥ for every translated difference.
lemma helperForTheorem_23_6_translatedDifference_ne_bot
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(z : Fin n → ℝ) :
translatedDifferenceFunctionAt f x z ≠ (⊥ : EReal)
Helper for Theorem 23.6: the translated-difference function inherits proper convexity from f by combining input translation with subtraction of the finite value f x.
lemma helperForTheorem_23_6_translatedDifference_properConvex
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (translatedDifferenceFunctionAt f x)
Helper for Theorem 23.6: if f is closed, then the translated-difference function is also closed.
lemma helperForTheorem_23_6_translatedDifference_closed
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
ClosedConvexFunction (translatedDifferenceFunctionAt f x)
Helper for Theorem 23.6: the shifted closed translated-difference function is the proper closed convex input needed for the dual half of Theorem 13.5.
lemma helperForTheorem_23_6_shiftedTranslatedClosure_closedProper
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : ℝ) (hε : 0 < ε) :
ClosedConvexFunction
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z + ((ε : ℝ) : EReal)) ∧
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ))
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z + ((ε : ℝ) : EReal))
Helper for Theorem 23.6: the shifted closed translated-difference function is bounded above by ε at the origin, because the original translated difference vanishes there and convex closure can only decrease values.
lemma helperForTheorem_23_6_shiftedTranslatedClosure_value_at_zero_le
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : ℝ) :
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z + ((ε : ℝ) : EReal))
0 ≤ ((ε : ℝ) : EReal)
Helper for Theorem 23.6: for every positive ε, the origin stays in the effective domain of the shifted closed translated-difference function.
lemma helperForTheorem_23_6_shiftedTranslatedClosure_zero_mem_effectiveDomain
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(ε : ℝ) (hε : 0 < ε) :
(0 : Fin n → ℝ) ∈
effectiveDomain (Set.univ : Set (Fin n → ℝ))
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z + ((ε : ℝ) : EReal))
Helper for Theorem 23.6: for positive ε, the approximate-support value is the closed positively homogeneous hull of the shifted translated-difference closure.
lemma helperForTheorem_23_6_support_eq_clConv_posHom_shiftedTranslatedClosure
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : ℝ) (hε : 0 < ε) :
approximateSubdifferentialSupportAt f x ε.toNNReal y =
clConv n
(positivelyHomogeneousConvexFunctionGenerated
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z + ((ε : ℝ) : EReal))) y
Helper for Theorem 23.6: the recession cone of the shifted translated-closure epigraph is the epigraph of its recession function.
lemma helperForTheorem_23_6_shiftedTranslatedClosure_recession_eq_recessionFunction
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : ℝ) (hε : 0 < ε) :
Set.recessionCone
(epigraph (Set.univ : Set (Fin n → ℝ))
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z +
((ε : ℝ) : EReal))) =
epigraph (Set.univ : Set (Fin n → ℝ))
(recessionFunction
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z +
((ε : ℝ) : EReal)))
Helper for Theorem 23.6: once the shifted translated-closure input comes with a recession description and a strictly positive value at the origin, Theorem 9.7 rewrites the approximate support value as the infimum of the corresponding right-scalar multiples together with the recession branch.
lemma helperForTheorem_23_6_approximateSupport_eq_infimum_rightScalarMultiple_of_origin_pos
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : ℝ) (hε : 0 < ε)
(g0_plus : (Fin n → ℝ) → EReal)
(hrec :
Set.recessionCone
(epigraph (Set.univ : Set (Fin n → ℝ))
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z +
((ε : ℝ) : EReal))) =
epigraph (Set.univ : Set (Fin n → ℝ)) g0_plus)
(hOriginPos :
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z +
((ε : ℝ) : EReal)) 0 > (0 : EReal)) :
approximateSubdifferentialSupportAt f x ε.toNNReal y =
sInf
(Set.insert (g0_plus y)
{z : EReal | ∃ lam : ℝ, 0 < lam ∧
z =
rightScalarMultiple
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z +
((ε : ℝ) : EReal))
lam y})
Helper for Theorem 23.6: when the shifted translated-closure is positive at the origin, the approximate-support value is the Chapter 9 infimum formula with the recession branch specialized to the recession function of that shifted input.
lemma helperForTheorem_23_6_approximateSupport_eq_infimum_rightScalarMultiple_recessionFunction_of_origin_pos
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : ℝ) (hε : 0 < ε)
(hOriginPos :
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z +
((ε : ℝ) : EReal)) 0 > (0 : EReal)) :
approximateSubdifferentialSupportAt f x ε.toNNReal y =
sInf
(Set.insert
(recessionFunction
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z +
((ε : ℝ) : EReal)) y)
{z : EReal | ∃ lam : ℝ, 0 < lam ∧
z =
rightScalarMultiple
(fun z => convexFunctionClosure (translatedDifferenceFunctionAt f x) z +
((ε : ℝ) : EReal))
lam y})
Helper for Theorem 23.6: if f is closed, then the approximate-support value is exactly the positive-scaling infimum from the textbook proof.
lemma helperForTheorem_23_6_approximateSupport_eq_infimum_rightScalarMultiple_of_closed
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : ℝ) (hε : 0 < ε) :
approximateSubdifferentialSupportAt f x ε.toNNReal y =
sInf
{z : EReal | ∃ lam : ℝ, 0 < lam ∧
z =
rightScalarMultiple
(fun z => translatedDifferenceFunctionAt f x z + ((ε : ℝ) : EReal))
lam y}
Helper for Theorem 23.6: in the closed case, every approximate-support value already dominates the directional derivative itself.
lemma helperForTheorem_23_6_upperDirectionalDerivative_le_approximateSupport_of_closed
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : ℝ) (hε : 0 < ε) :
upperDirectionalDerivativeAt f x y ≤
approximateSubdifferentialSupportAt f x ε.toNNReal y
Helper for Theorem 23.6: support functions are monotone under inclusion of the underlying sets.
lemma helperForTheorem_23_6_supportFunctionEReal_mono_of_subset
{n : ℕ} {A B : Set (Fin n → ℝ)} (hAB : A ⊆ B) (y : Fin n → ℝ) :
supportFunctionEReal A y ≤ supportFunctionEReal B y
Helper for Theorem 23.6: every approximate-support value dominates the closed directional derivative because ∂f(x) = ∂₀ f(x) ⊆ ∂_ε f(x).
lemma helperForTheorem_23_6_closureDirectionalDerivative_le_approximateSupport
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) (ε : NNReal) :
convexFunctionClosure (upperDirectionalDerivativeAt f x) y ≤
approximateSubdifferentialSupportAt f x ε y
Helper for Theorem 23.6: any strict real lower bound below the closed directional derivative already lies below every approximate-support value, so it automatically yields the eventual lower neighborhood statement on ε ↓ 0.
lemma helperForTheorem_23_6_eventually_gt_of_real_lt_closureDirectionalDerivative
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) {μ : ℝ}
(hμ : ((μ : ℝ) : EReal) < convexFunctionClosure (upperDirectionalDerivativeAt f x) y) :
∀ᶠ ε : ℝ in nhdsWithin (0 : ℝ) (Set.Ioi (0 : ℝ)),
((μ : ℝ) : EReal) < approximateSubdifferentialSupportAt f x ε.toNNReal y
Helper for Theorem 23.6: Fenchel's inequality gives the local one-sided upper bound δ^*(y | ∂_ε f(x)) ≤ ([f(x + ty) - f(x)] + ε) / t for every t > 0.
lemma helperForTheorem_23_6_approximateSupport_le_regularizedDifferenceQuotient
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(ε : NNReal) {t : ℝ} (ht : 0 < t) :
approximateSubdifferentialSupportAt f x ε y ≤
(translatedDifferenceFunctionAt f x (t • y) + ((ε : ℝ) : EReal)) / (t : EReal)
Helper for Theorem 23.6: every strict real upper bound on the directional derivative eventually dominates the approximate-support values.
lemma helperForTheorem_23_6_eventually_lt_of_upperDirectionalDerivative_lt_real
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) {μ : ℝ}
(hμ : upperDirectionalDerivativeAt f x y < ((μ : ℝ) : EReal)) :
∀ᶠ ε : ℝ in nhdsWithin (0 : ℝ) (Set.Ioi (0 : ℝ)),
approximateSubdifferentialSupportAt f x ε.toNNReal y < ((μ : ℝ) : EReal)
Helper for Theorem 23.6: every strict real lower bound below the directional derivative is eventually dominated by all approximate-support values in the closed case.
lemma helperForTheorem_23_6_eventually_gt_of_real_lt_upperDirectionalDerivative_of_closed
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x y : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) {μ : ℝ}
(hμ : ((μ : ℝ) : EReal) < upperDirectionalDerivativeAt f x y) :
∀ᶠ ε : ℝ in nhdsWithin (0 : ℝ) (Set.Ioi (0 : ℝ)),
((μ : ℝ) : EReal) < approximateSubdifferentialSupportAt f x ε.toNNReal y§23 — Directional Derivatives and Subgradients — Part 7
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The one-variable function g(ξ₁) = 1 - √ξ₁ on the nonnegative half-line and +∞ on the negative half-line.
open scoped ConvexAnalysis Pointwise
noncomputable def rightHalfLineSquareRootGap (ξ₁ : ℝ) : EReal :=
if 0 ≤ ξ₁ then ((1 - Real.sqrt ξ₁ : ℝ) : EReal) else ⊤
The ℝ² example f(ξ₁, ξ₂) = max {g(ξ₁), |ξ₂|} used to show that the set of subdifferentiability points of a proper convex function need not be convex.
open scoped ConvexAnalysis Pointwise
noncomputable def nonconvexSubdifferentiabilityExampleFunction (ξ : Fin 2 → ℝ) : EReal :=
max (rightHalfLineSquareRootGap (ξ 0)) (((|ξ 1| : ℝ)) : EReal)
The closed right half-plane in ℝ².
open scoped ConvexAnalysis Pointwise
def closedRightHalfPlane : Set (Fin 2 → ℝ) :=
{ξ | 0 ≤ ξ 0}
The relative interior of the vertical line segment joining (0, 1) and (0, -1).
open scoped ConvexAnalysis Pointwise
def openVerticalUnitSegment : Set (Fin 2 → ℝ) :=
{ξ | ξ 0 = 0 ∧ |ξ 1| < 1}
The g-branch is convex on the nonnegative half-line.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_23_4_2_rightHalfLineSquareRootGap_branch_convex :
ConvexOn ℝ (Set.Ici (0 : ℝ)) (fun t : ℝ => 1 - Real.sqrt t)
The epigraph of the right-half-line square-root gap function is convex.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_23_4_2_rightHalfLineSquareRootGap_convex :
ConvexFunctionOn (Set.univ : Set (Fin 2 → ℝ))
(fun ξ : Fin 2 → ℝ => rightHalfLineSquareRootGap (ξ 0))
The epigraph of the absolute-value branch is convex.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_23_4_2_absBranch_convex :
ConvexFunctionOn (Set.univ : Set (Fin 2 → ℝ))
(fun ξ : Fin 2 → ℝ => (((|ξ 1| : ℝ)) : EReal))
The full max example is a proper convex function.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_23_4_2_properConvex :
ProperConvexFunctionOn (Set.univ : Set (Fin 2 → ℝ))
nonconvexSubdifferentiabilityExampleFunction
The effective domain of the example is exactly the closed right half-plane.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_23_4_2_effectiveDomain :
effectiveDomain (Set.univ : Set (Fin 2 → ℝ)) nonconvexSubdifferentiabilityExampleFunction =
closedRightHalfPlane
Points with positive first coordinate lie in the interior of the closed right half-plane.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_23_4_2_mem_interior_closedRightHalfPlane {ξ : Fin 2 → ℝ}
(hξ : 0 < ξ 0) :
ξ ∈ interior closedRightHalfPlane
Boundary points (0,t) with |t| < 1 have empty subdifferential.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_23_4_2_subdifferential_empty_on_openVerticalUnitSegment
{ξ : Fin 2 → ℝ} (hξ0 : ξ 0 = 0) (hξ1 : |ξ 1| < 1) :
subdifferentialAt nonconvexSubdifferentiabilityExampleFunction ξ = ∅
Boundary points (0,t) with t ≥ 1 admit the upward vertical subgradient.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_23_4_2_subgradient_of_boundary_ge_one
{ξ : Fin 2 → ℝ} (hξ0 : ξ 0 = 0) (hξ1 : 1 ≤ ξ 1) :
dotProductEquiv ℝ (Fin 2) (Pi.single 1 (1 : ℝ)) ∈
subdifferentialAt nonconvexSubdifferentiabilityExampleFunction ξ
Boundary points (0,t) with t ≤ -1 admit the downward vertical subgradient.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_23_4_2_subgradient_of_boundary_le_neg_one
{ξ : Fin 2 → ℝ} (hξ0 : ξ 0 = 0) (hξ1 : ξ 1 ≤ -1) :
dotProductEquiv ℝ (Fin 2) (Pi.single 1 (-1 : ℝ)) ∈
subdifferentialAt nonconvexSubdifferentiabilityExampleFunction ξ
Example 23.4.2 (Nonconvexity of Subdifferentiability Set): For the function f(ξ₁, ξ₂) = max {g(ξ₁), |ξ₂|} with g(ξ₁) = 1 - √ξ₁ for ξ₁ ≥ 0 and g(ξ₁) = +∞ for ξ₁ < 0, the effective domain is the closed right half-plane, the set of points where f is subdifferentiable is the closed right half-plane with the open vertical segment {(0, t) | |t| < 1} removed, and hence this subdifferentiability set is not convex.
open scoped ConvexAnalysis Pointwise
theorem subdifferentiableSet_nonconvex_for_halfPlaneSquareRootMaxExample :
ProperConvexFunctionOn (Set.univ : Set (Fin 2 → ℝ)) nonconvexSubdifferentiabilityExampleFunction ∧
effectiveDomain (Set.univ : Set (Fin 2 → ℝ)) nonconvexSubdifferentiabilityExampleFunction =
closedRightHalfPlane ∧
{ξ | Set.Nonempty (subdifferentialAt nonconvexSubdifferentiabilityExampleFunction ξ)} =
closedRightHalfPlane \ openVerticalUnitSegment ∧
¬ Convex ℝ {ξ | Set.Nonempty (subdifferentialAt nonconvexSubdifferentiabilityExampleFunction ξ)}
Qualification by an intersection of the range of A with the relative interior of the effective domain of h.
open scoped ConvexAnalysis Pointwise
def RangeMeetsRelativeInteriorEffectiveDomain {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)) (h : (Fin m → ℝ) → EReal) : Prop :=
∃ z : Fin m → ℝ,
z ∈ Set.range A ∧ z ∈ euclideanRelativeInterior_fin m (effectiveDomain Set.univ h)
Qualification by a singleton intersection of the range of A with the effective domain of h.
open scoped ConvexAnalysis Pointwise
def RangeMeetsEffectiveDomainInOnePoint {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)) (h : (Fin m → ℝ) → EReal) : Prop :=
∃ z : Fin m → ℝ,
Set.range A ∩ effectiveDomain Set.univ h = {z}
A dual vector xStar decomposes at x as a sum of subgradients of f₁, …, fₘ when there is a family parts i ∈ ∂ fᵢ(x) whose sum is xStar.
open scoped ConvexAnalysis Pointwise
def IsSubdifferentialSumDecompositionAt {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(xStar : Module.Dual ℝ (Fin n → ℝ)) : Prop :=
∃ parts : Fin m → Module.Dual ℝ (Fin n → ℝ),
(∀ i : Fin m, parts i ∈ subdifferentialAt (f i) x) ∧ xStar = ∑ i, parts i
The qualification condition for the subdifferential sum rule: either all relative interiors of the effective domains meet, or a distinguished polyhedral subfamily has a common point in its effective domains while the remaining summands still meet in relative interior.
open scoped ConvexAnalysis Pointwise
def SubdifferentialSumQualification {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal) (Ipoly : Set (Fin m)) : Prop :=
(∃ z : Fin n → ℝ, ∀ i : Fin m, z ∈ euclideanRelativeInterior_fin n (effectiveDomain Set.univ (f i))) ∨
∃ z : Fin n → ℝ, (∀ i ∈ Ipoly, z ∈ effectiveDomain Set.univ (f i)) ∧
∀ i ∉ Ipoly, z ∈ euclideanRelativeInterior_fin n (effectiveDomain Set.univ (f i))
Theorem 23.8(1), inclusion direction in notation form: every finite sum of summand subgradients belongs to the subdifferential of the summed function.
open scoped ConvexAnalysis Pointwise
lemma subgradient_sum_mem_subdifferential_sum {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(parts : Fin m → Module.Dual ℝ (Fin n → ℝ))
(hparts : ∀ i : Fin m, parts i ∈ ∂ (f i) (x)) :
(∑ i, parts i) ∈ ∂ (fun y => ∑ i, f i y) (x)
Theorem 23.8(1), inclusion direction in set form: the Minkowski sum of the summand subdifferentials is contained in the subdifferential of the summed function.
open scoped ConvexAnalysis Pointwise
lemma subdifferential_sum_subset_subdifferential_sum {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal) (x : Fin n → ℝ) :
(∑ i, (∂ (f i) (x) : Set (Module.Dual ℝ (Fin n → ℝ)))) ⊆
∂ (fun y => ∑ i, f i y) (x)
Helper for Theorem 23.8: evaluating the sum of a family of dual vectors on z - x is the same as summing the individual evaluations.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_sum_dual_apply_sub_eq_ereal_sum {m n : ℕ}
(parts : Fin m → Module.Dual ℝ (Fin n → ℝ)) (x z : Fin n → ℝ) :
∑ i, ((((parts i) (z - x) : ℝ) : EReal)) =
((((∑ i, parts i) (z - x) : ℝ) : EReal))
Helper for Theorem 23.8: every explicit decomposition of xStar into summand subgradients produces a subgradient of the pointwise sum.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_subgradient_of_sum_of_decomposition {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(xStar : Module.Dual ℝ (Fin n → ℝ)) :
IsSubdifferentialSumDecompositionAt f x xStar →
xStar ∈ subdifferentialAt (fun y => ∑ i, f i y) x
Helper for Theorem 23.8: the qualification hypothesis supplies a point where the full sum is finite, so the summed function is again proper convex.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_sum_proper_of_qualification {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal)
(hproper : ∀ i : Fin m, ProperConvexFunctionOn Set.univ (f i)) (Ipoly : Set (Fin m))
(hqual : SubdifferentialSumQualification f Ipoly) :
ProperConvexFunctionOn Set.univ (fun y => ∑ i, f i y)
Helper for Theorem 23.8: a subgradient of the full sum yields the corresponding Fenchel-Young equality for that full sum.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_fullFenchelYoung_of_sumSubgradient {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal)
(hsumProper : ProperConvexFunctionOn Set.univ (fun y => ∑ i, f i y))
(x : Fin n → ℝ) (xStar : Module.Dual ℝ (Fin n → ℝ))
(hxStar : xStar ∈ subdifferentialAt (fun y => ∑ i, f i y) x) :
FenchelYoungEqualityAt (fun y => ∑ i, f i y) x ((dotProductEquiv ℝ (Fin n)).symm xStar)
Helper for Theorem 23.8: once each Euclidean summand satisfies Fenchel-Young equality and the summands add up to xStar, the corresponding dual vectors give the required decomposition.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_dualDecomposition_of_summandFenchelYoung {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal)
(hproper : ∀ i : Fin m, ProperConvexFunctionOn Set.univ (f i))
(x : Fin n → ℝ) (xStar : Fin n → ℝ) (parts : Fin m → Fin n → ℝ)
(hsum : ∑ i, parts i = xStar)
(hfy : ∀ i : Fin m, FenchelYoungEqualityAt (f i) x (parts i)) :
IsSubdifferentialSumDecompositionAt f x (dotProductEquiv ℝ (Fin n) xStar)
Helper for Theorem 23.8: a full Fenchel-Young equality for the summed function forces the full conjugate value to be finite.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_fullConjugate_ne_top_of_fullFenchelYoung {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal)
(hsumProper : ProperConvexFunctionOn Set.univ (fun y => ∑ i, f i y))
(x xStarE : Fin n → ℝ)
(hfullFY : FenchelYoungEqualityAt (fun y => ∑ i, f i y) x xStarE) :
fenchelConjugate n (fun y => ∑ i, f i y) xStarE ≠ (⊤ : EReal)
Helper for Theorem 23.8: an all-relative-interior qualification gives an attained Fenchel-conjugate split for the full family.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_attainedFenchelSplit_of_allRiQualification {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal)
(hmPos : 0 < m)
(hproper : ∀ i : Fin m, ProperConvexFunctionOn Set.univ (f i))
(hsumProper : ProperConvexFunctionOn Set.univ (fun y => ∑ i, f i y))
(x xStarE : Fin n → ℝ)
(hallri : ∃ z : Fin n → ℝ,
∀ i : Fin m, z ∈ euclideanRelativeInterior_fin n (effectiveDomain Set.univ (f i)))
(hfullFY : FenchelYoungEqualityAt (fun y => ∑ i, f i y) x xStarE) :
∃ parts : Fin m → Fin n → ℝ,
(∑ i, parts i) = xStarE ∧
fenchelConjugate n (fun y => ∑ i, f i y) xStarE =
∑ i, fenchelConjugate n (f i) (parts i)
Helper for Theorem 23.8: the polyhedral filtered block over Ipoly attains its conjugate value by a decomposition over the corresponding subtype.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_polyFilter_conjugate_attained_by_subtypeFamily {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal) (Ipoly : Set (Fin m))
[DecidablePred (fun i : Fin m => i ∈ Ipoly)]
(hIpolyNonempty : Ipoly ≠ ∅)
(hpoly : ∀ i : Fin m, i ∈ Ipoly ↔ IsPolyhedralConvexFunction n (f i))
(hproper : ∀ i : Fin m, ProperConvexFunctionOn Set.univ (f i))
(hdomPoly : ∃ z : Fin n → ℝ,
∀ i : Fin m, i ∈ Ipoly → z ∈ effectiveDomain Set.univ (f i))
(xHead : Fin n → ℝ) :
∃ headFamily : {i : Fin m // i ∈ Ipoly} → Fin n → ℝ,
(∑ i, headFamily i) = xHead ∧
fenchelConjugate n
(fun y => ∑ i ∈ Finset.univ.filter (fun i : Fin m => i ∈ Ipoly), f i y) xHead =
∑ i : {i : Fin m // i ∈ Ipoly}, fenchelConjugate n (f i.1) (headFamily i)
Helper for Theorem 23.8: the nonpolyhedral filtered block over Ipolyᶜ attains its conjugate value by a decomposition over the complement subtype, provided that block is nonempty.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_nonpolyFilter_conjugate_attained_by_subtypeFamily {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal) (Ipoly : Set (Fin m))
[DecidablePred (fun i : Fin m => i ∈ Ipoly)]
(hnonpolyNonempty : {i : Fin m | i ∉ Ipoly} ≠ ∅)
(hproper : ∀ i : Fin m, ProperConvexFunctionOn Set.univ (f i))
(hriNonpoly : ∃ z : Fin n → ℝ,
∀ i : Fin m, i ∉ Ipoly →
z ∈ euclideanRelativeInterior_fin n (effectiveDomain Set.univ (f i)))
(xTail : Fin n → ℝ) :
∃ tailFamily : {i : Fin m // i ∉ Ipoly} → Fin n → ℝ,
(∑ i, tailFamily i) = xTail ∧
fenchelConjugate n
(fun y => ∑ i ∈ Finset.univ.filter (fun i : Fin m => i ∉ Ipoly), f i y) xTail =
∑ i : {i : Fin m // i ∉ Ipoly}, fenchelConjugate n (f i.1) (tailFamily i)
Helper for Theorem 23.8: summing a piecewise family over Ipoly and its complement splits into the corresponding subtype sums.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_sum_piecewise_membership
{m : ℕ} {α : Type*} [AddCommMonoid α]
(Ipoly : Set (Fin m)) [DecidablePred (fun i : Fin m => i ∈ Ipoly)]
(headVal : {i : Fin m // i ∈ Ipoly} → α)
(tailVal : {i : Fin m // i ∉ Ipoly} → α) :
(∑ i : Fin m,
if hi : i ∈ Ipoly then headVal ⟨i, hi⟩ else tailVal ⟨i, hi⟩) =
(∑ i : {i : Fin m // i ∈ Ipoly}, headVal i) +
(∑ i : {i : Fin m // i ∉ Ipoly}, tailVal i)
Helper for Theorem 23.8: the mixed qualification yields an attained conjugate split after first separating the polyhedral and nonpolyhedral filtered blocks.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_attainedFenchelSplit_of_mixedQualification_via_filteredBinaryBridge
{m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal)
(hmPos : 0 < m)
(hproper : ∀ i : Fin m, ProperConvexFunctionOn Set.univ (f i))
(hsumProper : ProperConvexFunctionOn Set.univ (fun y => ∑ i, f i y))
(Ipoly : Set (Fin m))
[DecidablePred (fun i : Fin m => i ∈ Ipoly)]
(hpoly : ∀ i : Fin m, i ∈ Ipoly ↔ IsPolyhedralConvexFunction n (f i))
(hmixed : ∃ z : Fin n → ℝ,
(∀ i ∈ Ipoly, z ∈ effectiveDomain Set.univ (f i)) ∧
∀ i ∉ Ipoly, z ∈ euclideanRelativeInterior_fin n (effectiveDomain Set.univ (f i)))
(x xStarE : Fin n → ℝ)
(hfullFY : FenchelYoungEqualityAt (fun y => ∑ i, f i y) x xStarE) :
∃ parts : Fin m → Fin n → ℝ,
(∑ i, parts i) = xStarE ∧
fenchelConjugate n (fun y => ∑ i, f i y) xStarE =
∑ i, fenchelConjugate n (f i) (parts i)§23 — Directional Derivatives and Subgradients — Part 8
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 23.8: Let f₁, …, fₘ be proper convex functions on ℝⁿ, and let f = f₁ + ··· + fₘ. Then every finite sum of subgradients x₁⋆ + ··· + xₘ⋆ with xᵢ⋆ ∈ ∂ fᵢ(x) belongs to ∂ f(x). If the relative interiors ri (dom fᵢ) have a common point, then every x⋆ ∈ ∂ f(x) decomposes in this way. More generally, if a distinguished subfamily consists of polyhedral convex functions, the same equality holds under the weaker qualification that requires a common point of dom fᵢ for the polyhedral indices and ri (dom fᵢ) for the remaining indices.
open scoped ConvexAnalysis Pointwise
theorem subdifferential_sum_contains_sum_and_eq_under_qualification {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal)
(hproper : ∀ i : Fin m, ProperConvexFunctionOn Set.univ (f i)) (Ipoly : Set (Fin m))
(hpoly : ∀ i : Fin m, i ∈ Ipoly ↔ IsPolyhedralConvexFunction n (f i)) :
(∀ (x : Fin n → ℝ) (xStar : Module.Dual ℝ (Fin n → ℝ)),
IsSubdifferentialSumDecompositionAt f x xStar →
xStar ∈ subdifferentialAt (fun y => ∑ i, f i y) x) ∧
(SubdifferentialSumQualification f Ipoly →
∀ (x : Fin n → ℝ) (xStar : Module.Dual ℝ (Fin n → ℝ)),
xStar ∈ subdifferentialAt (fun y => ∑ i, f i y) x ↔
IsSubdifferentialSumDecompositionAt f x xStar)
Theorem 23.8(2), common-relative-interior form: if the relative interiors ri (dom fᵢ) have a common point, then the subdifferential of the sum is exactly the Minkowski sum of the summand subdifferentials.
open scoped ConvexAnalysis Pointwise
lemma subdifferential_sum_eq_sum_of_commonRelativeInteriorEffectiveDomain {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal)
(hproper : ∀ i : Fin m, ProperConvexFunctionOn Set.univ (f i))
(hri :
∃ z : Fin n → ℝ,
∀ i : Fin m, z ∈ euclideanRelativeInterior_fin n (effectiveDomain Set.univ (f i)))
(x : Fin n → ℝ) :
∂ (fun y => ∑ i, f i y) (x) =
∑ i, (∂ (f i) (x) : Set (Module.Dual ℝ (Fin n → ℝ)))
Theorem 23.8(2), mathlib intrinsicInterior form: if the intrinsic interiors of the effective domains have a common point, then the subdifferential of the sum is exactly the Minkowski sum of the summand subdifferentials.
open scoped ConvexAnalysis Pointwise
lemma subdifferential_sum_eq_sum_of_commonIntrinsicInteriorEffectiveDomain {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal) (hproper : ∀ i, ProperConvexFunctionOn Set.univ (f i))
(hii : ∃ z, ∀ i, z ∈ intrinsicInterior ℝ (effectiveDomain Set.univ (f i)))
(x : Fin n → ℝ) : ∂ (∑ i, f i ·) (x) = ∑ i, ∂ (f i) (x)
Corollary 23.8.1: Let C₁, …, Cₘ be convex sets in ℝⁿ. If their relative interiors have a common point, then the normal cone of C₁ ∩ ··· ∩ Cₘ at x consists exactly of sums x₁⋆ + ··· + xₘ⋆ with xᵢ⋆ ∈ N_{Cᵢ}(x). If a distinguished subfamily is polyhedral, the same equality holds under the weaker qualification that uses Cᵢ itself for the polyhedral indices and ri Cᵢ for the remaining ones.
open scoped ConvexAnalysis Pointwise
theorem normalCone_intersection_eq_sum_under_qualification {m n : ℕ}
(C : Fin m → Set (Fin n → ℝ)) (hconv : ∀ i : Fin m, Convex ℝ (C i)) (Ipoly : Set (Fin m))
(hpoly : ∀ i : Fin m, i ∈ Ipoly ↔ IsPolyhedralConvexFunction n (indicatorFunction (C i))) :
((∃ z : Fin n → ℝ, ∀ i : Fin m, z ∈ euclideanRelativeInterior_fin n (C i)) ∨
∃ z : Fin n → ℝ, (∀ i ∈ Ipoly, z ∈ C i) ∧
∀ i ∉ Ipoly, z ∈ euclideanRelativeInterior_fin n (C i)) →
∀ x : Fin n → ℝ,
normalConeAt (⋂ i, C i) x =
{xStar | ∃ parts : Fin m → Module.Dual ℝ (Fin n → ℝ),
(∀ i : Fin m, parts i ∈ normalConeAt (C i) x) ∧ xStar = ∑ i, parts i}
Helper for Theorem 23.8: an attained conjugate split at a full Fenchel-Young equality forces Fenchel-Young equality for each summand.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_summandFenchelYoung_of_fullEquality_and_attainedSplit
{m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal)
(hproper : ∀ i : Fin m, ProperConvexFunctionOn Set.univ (f i))
(hsumProper : ProperConvexFunctionOn Set.univ (fun y => ∑ i, f i y))
(x xStarE : Fin n → ℝ) (parts : Fin m → Fin n → ℝ)
(hfullFY : FenchelYoungEqualityAt (fun y => ∑ i, f i y) x xStarE)
(hsum : ∑ i, parts i = xStarE)
(hatt : fenchelConjugate n (fun y => ∑ i, f i y) xStarE =
∑ i, fenchelConjugate n (f i) (parts i)) :
∀ i : Fin m, FenchelYoungEqualityAt (f i) x (parts i)
Helper for Theorem 23.8: under the qualification hypothesis, a subgradient of the full sum should decompose into summand subgradients. The remaining work is the Chapter 4 exact-conjugate argument that splits a Fenchel-Young equality into summand equalities.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_8_reverse_decomposition_under_qualification {m n : ℕ}
(f : Fin m → (Fin n → ℝ) → EReal)
(hproper : ∀ i : Fin m, ProperConvexFunctionOn Set.univ (f i)) (Ipoly : Set (Fin m))
(hpoly : ∀ i : Fin m, i ∈ Ipoly ↔ IsPolyhedralConvexFunction n (f i))
(hqual : SubdifferentialSumQualification f Ipoly) :
∀ (x : Fin n → ℝ) (xStar : Module.Dual ℝ (Fin n → ℝ)),
xStar ∈ subdifferentialAt (fun y => ∑ i, f i y) x →
IsSubdifferentialSumDecompositionAt f x xStar
Helper for Corollary 23.8.1: the set-qualification hypothesis yields a single point lying in every set of the family.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_23_8_1_commonPoint_of_setQualification
{m n : ℕ} (C : Fin m → Set (Fin n → ℝ)) (Ipoly : Set (Fin m)) :
((∃ z : Fin n → ℝ, ∀ i : Fin m, z ∈ euclideanRelativeInterior_fin n (C i)) ∨
∃ z : Fin n → ℝ, (∀ i ∈ Ipoly, z ∈ C i) ∧
∀ i ∉ Ipoly, z ∈ euclideanRelativeInterior_fin n (C i)) →
∃ z : Fin n → ℝ, ∀ i : Fin m, z ∈ C i
Helper for Corollary 23.8.1: after rewriting indicator effective domains back to the underlying sets, the corollary hypothesis is exactly the qualification needed in Theorem 23.8.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_23_8_1_indicatorQualification
{m n : ℕ} (C : Fin m → Set (Fin n → ℝ)) (Ipoly : Set (Fin m))
(hqual :
(∃ z : Fin n → ℝ, ∀ i : Fin m, z ∈ euclideanRelativeInterior_fin n (C i)) ∨
∃ z : Fin n → ℝ, (∀ i ∈ Ipoly, z ∈ C i) ∧
∀ i ∉ Ipoly, z ∈ euclideanRelativeInterior_fin n (C i)) :
SubdifferentialSumQualification (fun i => indicatorFunction (C i)) Ipoly
Helper for Corollary 23.8.1: a common point makes every indicator in the family proper convex, so the sum rule from Theorem 23.8 is applicable.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_23_8_1_indicatorFamilyProper
{m n : ℕ} (C : Fin m → Set (Fin n → ℝ)) (hconv : ∀ i : Fin m, Convex ℝ (C i))
{z : Fin n → ℝ} (hz : ∀ i : Fin m, z ∈ C i) :
∀ i : Fin m, ProperConvexFunctionOn Set.univ (indicatorFunction (C i))
Helper for Corollary 23.8.1: for a nonempty set, the subdifferential of its indicator is exactly the normal cone at every point.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_23_8_1_subdifferential_indicator_eq_normalCone_of_nonempty
{n : ℕ} {C : Set (Fin n → ℝ)} (hCne : C.Nonempty) :
∀ x : Fin n → ℝ, subdifferentialAt (indicatorFunction C) x = normalConeAt C x
Helper for Theorem 23.9: lift a linear map on coordinate spaces to the Euclidean-space presentation used by the Chapter 3 adjoint-image theorems.
open scoped ConvexAnalysis Pointwise
noncomputable def helperForTheorem_23_9_euclideanLinearLift {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)) :
EuclideanSpace ℝ (Fin n) →ₗ[ℝ] EuclideanSpace ℝ (Fin m) :=
((WithLp.linearEquiv (2 : ENNReal) ℝ (Fin m → ℝ)).symm.toLinearMap).comp
(A.comp (WithLp.linearEquiv (2 : ENNReal) ℝ (Fin n → ℝ)).toLinearMap)
Helper for Theorem 23.9: an adjoint-fiber equality in Euclidean coordinates becomes the expected A.dualMap equality on subgradients.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_9_dualMap_eq_of_adjoint_eq {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(xStarE : Fin n → ℝ) (yStarE : Fin m → ℝ)
(hAadj :
(LinearMap.adjoint (helperForTheorem_23_9_euclideanLinearLift A)) (WithLp.toLp 2 yStarE) =
WithLp.toLp 2 xStarE) :
A.dualMap (dotProductEquiv ℝ (Fin m) yStarE) = dotProductEquiv ℝ (Fin n) xStarE
Helper for Theorem 23.9: a finite point of h lying in the range of A makes the precomposition h ∘ A proper convex.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_9_precomp_proper_of_range_meets_effectiveDomain {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(h : (Fin m → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ h)
(hw : ∃ z : Fin m → ℝ, z ∈ Set.range A ∧ z ∈ effectiveDomain Set.univ h) :
ProperConvexFunctionOn Set.univ (fun y => h (A y))
Helper for Theorem 23.9: every subgradient of h at A x pushes forward to a subgradient of h ∘ A at x.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_9_dualMapImage_mem_subdifferential_precomp {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(h : (Fin m → ℝ) → EReal)
(x : Fin n → ℝ)
(yStar : Module.Dual ℝ (Fin m → ℝ))
(hyStar : yStar ∈ subdifferentialAt h (A x)) :
A.dualMap yStar ∈ subdifferentialAt (fun y => h (A y)) x
Helper for Theorem 23.9: once a codomain dual vector lies over xStar and attains the same Fenchel-conjugate value, it is a genuine subgradient of h at A x.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_9_subgradient_of_h_of_attained_dualFiber {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(h : (Fin m → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ h)
(hAproper : ProperConvexFunctionOn Set.univ (fun y => h (A y)))
(x : Fin n → ℝ) (xStar : Module.Dual ℝ (Fin n → ℝ))
(yStar : Module.Dual ℝ (Fin m → ℝ))
(hxStar : xStar ∈ subdifferentialAt (fun y => h (A y)) x)
(hdual : A.dualMap yStar = xStar)
(hconj : fenchelConjugate m h ((dotProductEquiv ℝ (Fin m)).symm yStar) =
fenchelConjugate n (fun y => h (A y)) ((dotProductEquiv ℝ (Fin n)).symm xStar)) :
yStar ∈ subdifferentialAt h (A x)
Helper for Theorem 23.9: under the relative-interior qualification, every subgradient of h ∘ A comes from a subgradient of h lying over the same dual fiber.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_9_mem_image_subdifferential_of_relativeInteriorQualification {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(h : (Fin m → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ h)
(hri : RangeMeetsRelativeInteriorEffectiveDomain A h)
(x : Fin n → ℝ) (xStar : Module.Dual ℝ (Fin n → ℝ))
(hxStar : xStar ∈ subdifferentialAt (fun y => h (A y)) x) :
xStar ∈ A.dualMap '' subdifferentialAt h (A x)
Helper for Theorem 23.9: convert the Euclidean adjoint of the lifted map back to a linear map between coordinate spaces.
open scoped ConvexAnalysis Pointwise
noncomputable def helperForTheorem_23_9_coordinateAdjointMap {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)) :
(Fin m → ℝ) →ₗ[ℝ] (Fin n → ℝ) :=
(WithLp.linearEquiv (2 : ENNReal) ℝ (Fin n → ℝ)).toLinearMap.comp
((LinearMap.adjoint (helperForTheorem_23_9_euclideanLinearLift A)).comp
((WithLp.linearEquiv (2 : ENNReal) ℝ (Fin m → ℝ)).symm.toLinearMap))
Helper for Theorem 23.9: the Section 16 adjoint-fiber infimum is exactly the imageUnderLinearMap of h* under the coordinate adjoint map.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_9_rawAdjointImage_eq_imageUnderCoordinateAdjoint {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(h : (Fin m → ℝ) → EReal) :
(fun xStar : Fin n → ℝ =>
sInf
((fun yStar : EuclideanSpace ℝ (Fin m) =>
fenchelConjugate m h (yStar : Fin m → ℝ)) ''
{yStar |
(LinearMap.adjoint (helperForTheorem_23_9_euclideanLinearLift A)) yStar =
WithLp.toLp 2 xStar})) =
imageUnderLinearMap
(helperForTheorem_23_9_coordinateAdjointMap A) (fenchelConjugate m h)
Helper for Theorem 23.9: once the range of A meets dom h, the coordinate adjoint image of h* is proper convex in the target coordinates.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_9_coordinateAdjointImage_proper_of_polyhedral {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(h : (Fin m → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ h)
(hpoly : IsPolyhedralConvexFunction m h)
(hw : ∃ z : Fin m → ℝ, z ∈ Set.range A ∧ z ∈ effectiveDomain Set.univ h) :
ProperConvexFunctionOn Set.univ
(imageUnderLinearMap
(helperForTheorem_23_9_coordinateAdjointMap A) (fenchelConjugate m h))§23 — Directional Derivatives and Subgradients — Part 9
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 23.9: If f(x) = h (A x) with h a proper convex function on ℝ^m, then for every x the subdifferential of f contains the image of ∂ h (A x) under A*; if the range of A meets ri (dom h), or if h is polyhedral and the range of A meets dom h in exactly one point, then this inclusion is an equality for every x.
open scoped ConvexAnalysis Pointwise
theorem subdifferential_precomp_linearMap_contains_dualMapImage_and_eq_under_qualification {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)) (h : (Fin m → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ h) :
(∀ x : Fin n → ℝ,
A.dualMap '' subdifferentialAt h (A x) ⊆ subdifferentialAt (fun y => h (A y)) x) ∧
((RangeMeetsRelativeInteriorEffectiveDomain A h) ∨
(IsPolyhedralConvexFunction m h ∧ RangeMeetsEffectiveDomainInOnePoint A h) →
∀ x : Fin n → ℝ, subdifferentialAt (fun y => h (A y)) x = A.dualMap '' subdifferentialAt h (A x))
Helper for Theorem 23.9: in the polyhedral branch, the Section 16 closure identity collapses to an exact coordinate-space imageUnderLinearMap formula for (h ∘ A)*.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_9_fenchelConjugate_precomp_eq_imageUnderCoordinateAdjoint_of_polyhedral
{n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(h : (Fin m → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ h)
(hpoly : IsPolyhedralConvexFunction m h)
(hone : RangeMeetsEffectiveDomainInOnePoint A h) :
fenchelConjugate n (fun y => h (A y)) =
imageUnderLinearMap
(helperForTheorem_23_9_coordinateAdjointMap A) (fenchelConjugate m h)
Helper for Theorem 23.9: the polyhedral branch should identify the closure-side adjoint image with the exact adjoint image and supply an attained fiber witness.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_9_mem_image_subdifferential_of_polyhedralQualification {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(h : (Fin m → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ h)
(hpoly : IsPolyhedralConvexFunction m h)
(hone : RangeMeetsEffectiveDomainInOnePoint A h)
(x : Fin n → ℝ) (xStar : Module.Dual ℝ (Fin n → ℝ))
(hxStar : xStar ∈ subdifferentialAt (fun y => h (A y)) x) :
xStar ∈ A.dualMap '' subdifferentialAt h (A x)
Helper for Theorem 23.10: a polyhedral convex function that is finite at one point cannot take the value ⊥ anywhere.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_pointwise_ne_bot_of_polyhedral_finitePoint {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hpoly : IsPolyhedralConvexFunction n f)
{x : Fin n → ℝ} (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
∀ z : Fin n → ℝ, f z ≠ (⊥ : EReal)
Helper for Theorem 23.10: a finite point of a max-affine-plus-indicator representation lies in the represented indicator domain.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_finitePoint_mem_domain_of_representation {n k m : ℕ}
{f : (Fin n → ℝ) → EReal} {x : Fin n → ℝ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧ r = (∑ j, y j * b i j) - β i} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i})
y)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
x ∈ {y : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) → (∑ j, y j * b i j) ≤ β i}
Helper for Theorem 23.10: evaluating a represented affine constraint along the ray x + t • d separates into the base value and the directional slope.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_constraint_eval_add_smul {n m : ℕ}
(b : Fin m → Fin n → ℝ) (x d : Fin n → ℝ) (i : Fin m) (t : ℝ) :
(∑ j, (x + t • d) j * b i j) =
(∑ j, x j * b i j) + t * (∑ j, d j * b i j)
Helper for Theorem 23.10: if a ray x + t • d stays in the represented domain for all sufficiently small positive t, then every constraint active at x has nonpositive directional slope.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_activeDirectionCone_eventually_domain_only_if {n k m : ℕ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
{x d : Fin n → ℝ}
(heventually :
∃ ε : ℝ, 0 < ε ∧
∀ t : ℝ, 0 < t → t < ε →
x + t • d ∈ {y : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i}) :
d ∈ {d : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, x j * b i j) = β i → (∑ j, d j * b i j) ≤ 0}
Helper for Theorem 23.10: if a direction violates one active domain constraint at x, then every sufficiently small positive step immediately leaves the represented domain.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_not_mem_activeDirectionCone_eventually_not_domain {n k m : ℕ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
{x d : Fin n → ℝ}
(hdTx :
d ∉ {d : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, x j * b i j) = β i → (∑ j, d j * b i j) ≤ 0}) :
∃ ε : ℝ, 0 < ε ∧
∀ t : ℝ, 0 < t → t < ε →
x + t • d ∉ {y : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i}
Helper for Theorem 23.10: a represented domain constraint that is strict at x stays feasible along every sufficiently small positive step from x.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_strictConstraint_stays_feasible_for_small_steps {n k m : ℕ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
{x d : Fin n → ℝ} {i : Fin m}
(hki : k ≤ (i : ℕ)) (hstrict : (∑ j, x j * b i j) < β i) :
∃ ε : ℝ, 0 < ε ∧
∀ t : ℝ, 0 < t → t < ε →
(∑ j, (x + t • d) j * b i j) ≤ β i
Helper for Theorem 23.10: every direction in the active-constraint cone keeps the represented domain feasible for all sufficiently small positive steps.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_activeDirectionCone_smallStep_radius {n k m : ℕ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
{x d : Fin n → ℝ}
(hxC :
x ∈ {y : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i})
(hdTx :
d ∈ {d : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, x j * b i j) = β i → (∑ j, d j * b i j) ≤ 0}) :
∃ ε : ℝ, 0 < ε ∧
∀ t : ℝ, 0 < t → t < ε →
x + t • d ∈ {y : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i}
Helper for Theorem 23.10: the active-constraint feasible-direction cone is polyhedral, and it contains the zero direction.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_activeDirectionCone_polyhedral_of_representation {n k m : ℕ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ} {x : Fin n → ℝ} :
IsPolyhedralConvexSet n
{d : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, x j * b i j) = β i → (∑ j, d j * b i j) ≤ 0} ∧
(0 : Fin n → ℝ) ∈
{d : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, x j * b i j) = β i → (∑ j, d j * b i j) ≤ 0}
Helper for Theorem 23.10: outside the active-constraint cone, the represented domain exits immediately, so every positive directional-difference quotient is ⊤ and the upper directional derivative is ⊤.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_upperDirectionalDerivative_eq_top_of_not_mem_activeDirectionCone
{n k m : ℕ} {f : (Fin n → ℝ) → EReal}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
(hf : ConvexFunction f) {x d : Fin n → ℝ}
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧ r = (∑ j, y j * b i j) - β i} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i})
y)
(hdTx :
d ∉ {d : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, x j * b i j) = β i → (∑ j, d j * b i j) ≤ 0}) :
upperDirectionalDerivativeAt f x d = (⊤ : EReal)
Helper for Theorem 23.10: at a finite represented point, the affine supremum in the max-affine-plus-indicator formula is exactly the finite real value of f x.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_representationSup_eq_toReal {n k m : ℕ}
{f : (Fin n → ℝ) → EReal} {x : Fin n → ℝ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧ r = (∑ j, y j * b i j) - β i} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i})
y)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
(sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧ r = (∑ j, x j * b i j) - β i} : ℝ) = (f x).toReal
Helper for Theorem 23.10: every represented affine piece at a finite point lies below the finite value f x.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_affinePiece_le_finiteValue_of_representation {n k m : ℕ}
{f : (Fin n → ℝ) → EReal} {x : Fin n → ℝ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ} {i : Fin m}
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ j : Fin m, (j : ℕ) < k ∧ r = (∑ ℓ, y ℓ * b j ℓ) - β j} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ j : Fin m, k ≤ (j : ℕ) →
(∑ ℓ, y ℓ * b j ℓ) ≤ β j})
y)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hi : (i : ℕ) < k) :
(∑ j, x j * b i j) - β i ≤ (f x).toReal
Helper for Theorem 23.10: when k > 0, some affine piece is active at the finite point x.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_exists_activeAffine_piece {n k m : ℕ}
{f : (Fin n → ℝ) → EReal} {x : Fin n → ℝ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
(hkpos : 0 < k) (hkm : k ≤ m)
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧ r = (∑ j, y j * b i j) - β i} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i})
y)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
∃ i : Fin m,
(i : ℕ) < k ∧ ((∑ j, x j * b i j) - β i) = (f x).toReal
Helper for Theorem 23.10: among the affine pieces active at x, one has maximal directional slope in any fixed direction d.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_exists_activeSlopeMaximizer {n k m : ℕ}
{f : (Fin n → ℝ) → EReal} {x d : Fin n → ℝ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
(hkpos : 0 < k) (hkm : k ≤ m)
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧ r = (∑ j, y j * b i j) - β i} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i})
y)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
∃ imax : Fin m,
(imax : ℕ) < k ∧
((∑ j, x j * b imax j) - β imax) = (f x).toReal ∧
∀ i : Fin m,
(i : ℕ) < k →
((∑ j, x j * b i j) - β i) = (f x).toReal →
(∑ j, d j * b i j) ≤ (∑ j, d j * b imax j)
Helper for Theorem 23.10: an inactive affine piece stays strictly below a chosen active piece for all sufficiently small positive steps along the ray x + t • d.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_inactiveAffine_piece_stays_below_activeSlopeMaximizer {n k m : ℕ}
{f : (Fin n → ℝ) → EReal} {x d : Fin n → ℝ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ} {i imax : Fin m}
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ j : Fin m, (j : ℕ) < k ∧ r = (∑ ℓ, y ℓ * b j ℓ) - β j} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ j : Fin m, k ≤ (j : ℕ) →
(∑ ℓ, y ℓ * b j ℓ) ≤ β j})
y)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hi : (i : ℕ) < k)
(himax : (imax : ℕ) < k ∧ ((∑ j, x j * b imax j) - β imax) = (f x).toReal)
(hi_not_active : ((∑ j, x j * b i j) - β i) ≠ (f x).toReal) :
∃ ε : ℝ, 0 < ε ∧
∀ t : ℝ, 0 < t → t < ε →
((∑ j, (x + t • d) j * b i j) - β i) <
((∑ j, (x + t • d) j * b imax j) - β imax)§23 — Directional Derivatives and Subgradients — Part 10
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 23.10: If f is a polyhedral convex function and f x is finite, then f is subdifferentiable at x, the subdifferential ∂ f(x) is a polyhedral convex set, and the directional-derivative function y ↦ f'(x; y) is a proper polyhedral convex function equal to the support function of ∂ f(x).
open scoped ConvexAnalysis Pointwise
theorem polyhedralConvex_subdifferentiable_and_subdifferential_polyhedral {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hpoly : IsPolyhedralConvexFunction n f)
{x : Fin n → ℝ} (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
Set.Nonempty (subdifferentialAt f x) ∧
IsPolyhedralConvexFunction n (indicatorFunction ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)) ∧
ProperConvexFunctionOn Set.univ (upperDirectionalDerivativeAt f x) ∧
IsPolyhedralConvexFunction n (upperDirectionalDerivativeAt f x) ∧
upperDirectionalDerivativeAt f x = subdifferentialSupportAt f x
Helper for Theorem 23.10: once a direction stays in the active-constraint cone, a chosen active affine piece with maximal slope controls every represented difference quotient on a common small-step interval.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_directionalDifferenceQuotient_eq_activeSlopeMax_of_mem_activeDirectionCone
{n k m : ℕ} {f : (Fin n → ℝ) → EReal} {x d : Fin n → ℝ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧ r = (∑ j, y j * b i j) - β i} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i})
y)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hdTx :
d ∈ {d : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, x j * b i j) = β i → (∑ j, d j * b i j) ≤ 0})
{imax : Fin m}
(himax :
(imax : ℕ) < k ∧ ((∑ j, x j * b imax j) - β imax) = (f x).toReal)
(hmax :
∀ i : Fin m,
(i : ℕ) < k →
((∑ j, x j * b i j) - β i) = (f x).toReal →
(∑ j, d j * b i j) ≤ (∑ j, d j * b imax j)) :
∃ ε : ℝ, 0 < ε ∧
∀ t : ℝ, 0 < t → t < ε →
directionalDifferenceQuotientAt f x d t =
(((∑ j, d j * b imax j) : ℝ) : EReal)
Helper for Theorem 23.10: a monotone quotient family on (0, ∞) whose values stabilize to a constant on some punctured interval has infimum equal to that constant.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_sInf_eq_eventualConstant_on_Ioi
(q : ℝ → EReal)
(hmono : MonotoneOn q (Set.Ioi (0 : ℝ)))
{c : EReal}
(hevent : ∃ ε : ℝ, 0 < ε ∧ ∀ t : ℝ, 0 < t → t < ε → q t = c) :
sInf ((Set.Ioi (0 : ℝ)).image q) = c
Helper for Theorem 23.10: on the active-direction cone, the upper directional derivative is the supremum of the slopes of the affine pieces active at x.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_upperDirectionalDerivative_eq_activeSlopeSup_of_mem_activeDirectionCone
{n k m : ℕ} {f : (Fin n → ℝ) → EReal} {x d : Fin n → ℝ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
(hf : ConvexFunction f)
(hkm : k ≤ m)
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧ r = (∑ j, y j * b i j) - β i} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i})
y)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hdTx :
d ∈ {d : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, x j * b i j) = β i → (∑ j, d j * b i j) ≤ 0}) :
upperDirectionalDerivativeAt f x d =
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧
((∑ j, x j * b i j) - β i) = (f x).toReal ∧
r = ∑ j, d j * b i j} : ℝ) : EReal)
Helper for Theorem 23.10: the upper directional derivative is the active-slope supremum on the active cone and ⊤ outside it, so globally it is that supremum plus the cone indicator.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_upperDirectionalDerivative_eq_supActiveSlopes_add_indicator
{n k m : ℕ} {f : (Fin n → ℝ) → EReal} {x : Fin n → ℝ}
{b : Fin m → Fin n → ℝ} {β : Fin m → ℝ}
(hf : ConvexFunction f)
(hkm : k ≤ m)
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧ r = (∑ j, y j * b i j) - β i} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i})
y)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
∀ d : Fin n → ℝ,
upperDirectionalDerivativeAt f x d =
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧
((∑ j, x j * b i j) - β i) = (f x).toReal ∧
r = ∑ j, d j * b i j} : ℝ) : EReal) +
indicatorFunction
(C := {d : Fin n → ℝ | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, x j * b i j) = β i → (∑ j, d j * b i j) ≤ 0})
d
Helper for Theorem 23.10: the active affine slopes at x can be reindexed by the finite subtype of active pieces, isolating the max-affine block from the domain block.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_activeSlopeSup_reindexed {n k m : ℕ}
(f : (Fin n → ℝ) → EReal) (x d : Fin n → ℝ)
(b : Fin m → Fin n → ℝ) (β : Fin m → ℝ) :
let Iact : Type := {i : Fin m //
(i : ℕ) < k ∧ ((∑ j, x j * b i j) - β i) = (f x).toReal}
let p : ℕ := Fintype.card Iact
let eAct : Iact ≃ Fin p := Fintype.equivFin Iact
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧
((∑ j, x j * b i j) - β i) = (f x).toReal ∧
r = ∑ j, d j * b i j} : ℝ) : EReal) =
((sSup {r : ℝ |
∃ a : Fin p, r = (∑ j, d j * b (eAct.symm a).1 j) - 0} : ℝ) : EReal)
Helper for Theorem 23.10: the active-direction cone is exactly the intersection of the guard-free half-spaces obtained by zeroing out inactive constraints.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_activeDirectionCone_halfspace_representation {n k m : ℕ}
(x : Fin n → ℝ) (b : Fin m → Fin n → ℝ) (β : Fin m → ℝ) :
let Tx : Set (Fin n → ℝ) :=
{d | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, x j * b i j) = β i → (∑ j, d j * b i j) ≤ 0}
let bTx : Fin m → Fin n → ℝ := fun i =>
if k ≤ (i : ℕ) ∧ (∑ j, x j * b i j) = β i then b i else 0
Tx = {d : Fin n → ℝ | ∀ i : Fin m, (∑ j, d j * bTx i j) ≤ 0}
Helper for Theorem 23.10: after separating the active slopes from the cone normals, the concatenated sum-index family already reproduces the active-slope supremum plus the active-cone indicator.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_concatRepresentation_on_finSum {n p m : ℕ}
(d : Fin n → ℝ) (bAct : Fin p → Fin n → ℝ)
(Tx : Set (Fin n → ℝ)) (bTx : Fin m → Fin n → ℝ)
(hTxEq : Tx = {y : Fin n → ℝ | ∀ i : Fin m, (∑ j, y j * bTx i j) ≤ 0}) :
((sSup {r : ℝ |
∃ s : Fin p ⊕ Fin m,
((finSumFinEquiv s : Fin (p + m))).1 < p ∧
r = (∑ j, d j * (Sum.elim bAct bTx s) j) - 0} : ℝ) : EReal) +
indicatorFunction
(C := {d | ∀ s : Fin p ⊕ Fin m, p ≤ ((finSumFinEquiv s : Fin (p + m))).1 →
(∑ j, d j * (Sum.elim bAct bTx s) j) ≤ 0})
d =
((sSup {r : ℝ |
∃ a : Fin p, r = (∑ j, d j * bAct a j) - 0} : ℝ) : EReal) +
indicatorFunction (C := Tx) d
Helper for Theorem 23.10: transporting the concatenated sum-index representation along finSumFinEquiv yields the exact Chapter 19 Fin (p + m) witness.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_concatRepresentation_transport_to_fin {n p m : ℕ}
(d : Fin n → ℝ) (bSum : Fin p ⊕ Fin m → Fin n → ℝ) :
((sSup {r : ℝ |
∃ i : Fin (p + m), (i : ℕ) < p ∧
r = (∑ j, d j * bSum (finSumFinEquiv.symm i) j) - 0} : ℝ) : EReal) +
indicatorFunction
(C := {d | ∀ i : Fin (p + m), p ≤ (i : ℕ) →
(∑ j, d j * bSum (finSumFinEquiv.symm i) j) ≤ 0})
d =
((sSup {r : ℝ |
∃ s : Fin p ⊕ Fin m,
((finSumFinEquiv s : Fin (p + m))).1 < p ∧
r = (∑ j, d j * bSum s j) - 0} : ℝ) : EReal) +
indicatorFunction
(C := {d | ∀ s : Fin p ⊕ Fin m, p ≤ ((finSumFinEquiv s : Fin (p + m))).1 →
(∑ j, d j * bSum s j) ≤ 0})
d
Helper for Theorem 23.10: once the active slopes are reindexed and the active cone is exposed as explicit half-spaces, the derivative should admit one Chapter 19 max-affine-plus-indicator representation.
open scoped ConvexAnalysis Pointwise
lemma helperForTheorem_23_10_upperDirectionalDerivative_representation {n k m : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(b : Fin m → Fin n → ℝ) (β : Fin m → ℝ)
(hf : ConvexFunction f) (hkm : k ≤ m)
(hrepr :
f =
fun y =>
((sSup {r : ℝ |
∃ i : Fin m, (i : ℕ) < k ∧ r = (∑ j, y j * b i j) - β i} : ℝ) : EReal) +
indicatorFunction
(C := {y | ∀ i : Fin m, k ≤ (i : ℕ) →
(∑ j, y j * b i j) ≤ β i})
y)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
∃ (kD mD : ℕ) (bD : Fin mD → Fin n → ℝ) (βD : Fin mD → ℝ),
kD ≤ mD ∧
upperDirectionalDerivativeAt f x =
fun d =>
((sSup {r : ℝ |
∃ i : Fin mD, (i : ℕ) < kD ∧
r = (∑ j, d j * bD i j) - βD i} : ℝ) : EReal) +
indicatorFunction
(C := {d | ∀ i : Fin mD, kD ≤ (i : ℕ) →
(∑ j, d j * bD i j) ≤ βD i})
d§23 — Directional Derivatives and Subgradients — Part 11
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The Euclidean norm on ℝⁿ, written using the standard dot product.
noncomputable def euclideanNorm {n : ℕ} (x : Fin n → ℝ) : ℝ :=
Real.sqrt (dotProduct x x)
The Euclidean identification of a vector in ℝⁿ with the corresponding dual vector.
def euclideanDualVector {n : ℕ} (x : Fin n → ℝ) : Module.Dual ℝ (Fin n → ℝ) :=
dotProductEquiv ℝ (Fin n) x
The Euclidean norm viewed as an extended-real-valued function.
noncomputable def euclideanNormFunction {n : ℕ} (x : Fin n → ℝ) : EReal :=
(euclideanNorm x : EReal)
Membership in the class of indicator functions of a set.
def IsIndicatorFunctionOfSet {n : ℕ} (C : Set (Fin n → ℝ)) (f : (Fin n → ℝ) → EReal) : Prop :=
f = indicatorFunction C
The Chebyshev norm on ℝⁿ, viewed as an extended-real-valued function.
noncomputable def chebyshevNormFunction {n : ℕ} (x : Fin n → ℝ) : EReal :=
((sSup (Set.range fun i : Fin n => |x i|) : ℝ) : EReal)
The active coordinate set for the Chebyshev norm at x.
def chebyshevActiveIndices {n : ℕ} (x : Fin n → ℝ) : Set (Fin n) :=
{i | |x i| = sSup (Set.range fun j : Fin n => |x j|)}
The convex example x ↦ -sqrt (1 - |x|^2) on the Euclidean unit ball and +∞ outside.
noncomputable def unitBallBarrierFunction {n : ℕ} (x : Fin n → ℝ) : EReal :=
if euclideanNorm (n := n) x < 1 then
((-Real.sqrt (1 - (euclideanNorm (n := n) x) ^ 2) : ℝ) : EReal)
else ⊤
theorem subdifferential_indicatorFunction_eq_normalConeAt_of_mem {n : ℕ}
{C : Set (Fin n → ℝ)} {x : Fin n → ℝ} (hx : x ∈ C) :
subdifferentialAt (indicatorFunction C) x = normalConeAt C x
theorem subdifferential_indicatorFunction_eq_empty_of_not_mem {n : ℕ}
{C : Set (Fin n → ℝ)} (hC : C.Nonempty) {x : Fin n → ℝ} (hx : x ∉ C) :
subdifferentialAt (indicatorFunction C) x = ∅
Theorem 23.7: Let f be a proper convex function, assume f is subdifferentiable at x, and x is not a minimizer of f in the sense that ∃ z, f z < f x. Then, under the Euclidean identification of vectors with dual vectors, the normal cone of the sublevel set C = {z | f z ≤ f x} at x is the closure of the convex cone generated by ∂f(x).
theorem normalCone_sublevelSet_eq_closure_convexConeHull_subdifferential {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) (hnotmin : ∃ z, f z < f x) :
((dotProductEquiv ℝ (Fin n)) ⁻¹' normalConeAt {z | f z ≤ f x} x) =
closure ↑(ConvexCone.hull ℝ (((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)))
Helper for Theorem 23.7: after identifying vectors with dual vectors, the normal cone of the sublevel set is the polar of the translated ≤ 0 sublevel directions.
lemma helperForTheorem_23_7_euclideanNormalCone_preimage_eq_polar_translatedSublevel
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) :
((dotProductEquiv ℝ (Fin n)) ⁻¹' normalConeAt {z : Fin n → ℝ | f z ≤ f x} x) =
((dotProductEquiv ℝ (Fin n)) ⁻¹'
polarCone {y : Fin n → ℝ | translatedDifferenceFunctionAt f x y ≤ 0})
Helper for Theorem 23.7: the vectorized polar of the closed cone generated by the subdifferential is exactly the nonpositive sublevel set of the subdifferential support function.
lemma helperForTheorem_23_7_vectorizedPolar_subdifferentialCone_eq_support_nonpos
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) :
((dotProductEquiv ℝ (Fin n)) ⁻¹'
polarCone
(closure
(((ConvexCone.hull ℝ
(((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x))) :
ConvexCone ℝ (Fin n → ℝ)) : Set (Fin n → ℝ)))) =
{y : Fin n → ℝ | subdifferentialSupportAt f x y ≤ 0}
Helper for Theorem 23.7: a nonempty subdifferential forces f x to be finite.
lemma helperForTheorem_23_7_finiteAt_of_subdifferentiable
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) :
f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)
Helper for Theorem 23.7: every strictly negative directional derivative comes from scaling an actual translated descent direction, so it already lies in the cone generated by the translated ≤ 0 sublevel set.
lemma helperForTheorem_23_7_strictDirectionalSublevel_subset_coneHull_translatedDirections
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x y : Fin n → ℝ)
(hf : ConvexFunction f) (hxFinite : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hy : upperDirectionalDerivativeAt f x y < (0 : EReal)) :
y ∈ ↑(ConvexCone.hull ℝ
{z : Fin n → ℝ | translatedDifferenceFunctionAt f x z ≤ 0})
Helper for Theorem 23.7: transfer the ≤ 0 closure formula from Theorem 7.6 back to Fin n → ℝ.
lemma helperForTheorem_23_7_closure_nonposSublevel_eq_sublevel_convexFunctionClosure
{n : ℕ} {h : (Fin n → ℝ) → EReal}
(hh : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) h)
(hInf : iInf (fun x => h x) < (0 : EReal)) :
closure {x : Fin n → ℝ | h x ≤ (0 : EReal)} =
{x : Fin n → ℝ | convexFunctionClosure h x ≤ (0 : EReal)}
Helper for Theorem 23.7: transfer the strict < 0 closure formula from Theorem 7.6 back to Fin n → ℝ.
lemma helperForTheorem_23_7_closure_strictSublevel_eq_sublevel_convexFunctionClosure
{n : ℕ} {h : (Fin n → ℝ) → EReal}
(hh : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) h)
(hInf : iInf (fun x => h x) < (0 : EReal)) :
closure {x : Fin n → ℝ | h x < (0 : EReal)} =
{x : Fin n → ℝ | convexFunctionClosure h x ≤ (0 : EReal)}
Helper for Theorem 23.7: every translated ≤ 0 direction already lies in the nonpositive sublevel set of the support function of ∂f(x).
lemma helperForTheorem_23_7_translatedDirections_subset_supportNonpos
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) :
{y : Fin n → ℝ | translatedDifferenceFunctionAt f x y ≤ 0} ⊆
{y : Fin n → ℝ | subdifferentialSupportAt f x y ≤ 0}
Helper for Theorem 23.7: subdifferentialSupportAt f x is a closed proper positively homogeneous support function whenever ∂f(x) is nonempty.
lemma helperForTheorem_23_7_supportFunction_closedProper_posHom
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) :
ClosedConvexFunction (subdifferentialSupportAt f x) ∧
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (subdifferentialSupportAt f x) ∧
PositivelyHomogeneous (subdifferentialSupportAt f x)
Helper for Theorem 23.7: the nonpositive support sublevel is closed.
lemma helperForTheorem_23_7_supportNonpos_isClosed
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) :
IsClosed {y : Fin n → ℝ | subdifferentialSupportAt f x y ≤ 0}
Helper for Theorem 23.7: a nonempty subdifferential makes the directional derivative a proper convex function on ℝⁿ.
lemma helperForTheorem_23_7_upperDirectionalDerivative_properConvex_of_subdifferentiable
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (upperDirectionalDerivativeAt f x)
Helper for Theorem 23.7: if x is not a minimizer, then the directional derivative itself has infimum below 0.
lemma helperForTheorem_23_7_upperDirectionalDerivative_infimum_neg
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) (hnotmin : ∃ z, f z < f x) :
iInf (fun y : Fin n → ℝ => upperDirectionalDerivativeAt f x y) < (0 : EReal)
Helper for Theorem 23.7: the nonpositive support sublevel already lies in the closure of the cone generated by translated ≤ 0 directions.
lemma helperForTheorem_23_7_supportNonpos_subset_closure_coneHull_translatedDirections
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) (hnotmin : ∃ z, f z < f x) :
{y : Fin n → ℝ | subdifferentialSupportAt f x y ≤ 0} ⊆
closure ((((ConvexCone.hull ℝ
{z : Fin n → ℝ | translatedDifferenceFunctionAt f x z ≤ 0}) :
ConvexCone ℝ (Fin n → ℝ)) : Set (Fin n → ℝ)))
Helper for Theorem 23.7: the nonpositive support sublevel is already a convex cone, so taking its convex-cone hull does not enlarge it.
lemma helperForTheorem_23_7_supportNonpos_is_convexCone
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) :
((ConvexCone.hull ℝ {y : Fin n → ℝ | subdifferentialSupportAt f x y ≤ 0}) :
Set (Fin n → ℝ)) =
{y : Fin n → ℝ | subdifferentialSupportAt f x y ≤ 0}
Helper for Theorem 23.7: the support function of ∂f(x) takes a strictly negative value when x is not a minimizer, hence its infimum is below 0.
lemma helperForTheorem_23_7_supportFunction_infimum_neg
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) (hnotmin : ∃ z, f z < f x) :
iInf (fun y : Fin n → ℝ => subdifferentialSupportAt f x y) < (0 : EReal)
Helper for Theorem 23.7: the closed cone generated by the translated ≤ 0 directions is the nonpositive sublevel set of the subdifferential support function.
lemma helperForTheorem_23_7_translatedDirectionCone_closure_eq_support_nonpos
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) (hnotmin : ∃ z, f z < f x) :
closure
((((ConvexCone.hull ℝ
{y : Fin n → ℝ | translatedDifferenceFunctionAt f x y ≤ 0}) :
ConvexCone ℝ (Fin n → ℝ)) : Set (Fin n → ℝ))) =
{y : Fin n → ℝ | subdifferentialSupportAt f x y ≤ 0}
Helper for Theorem 23.7: after the translated-direction cone is identified with the support side, it becomes the vectorized polar of the closed cone generated by the subdifferential.
lemma helperForTheorem_23_7_closure_translatedDirectionCone_eq_vectorizedPolar_subdifferentialCone
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn Set.univ f) (x : Fin n → ℝ)
(hsub : Set.Nonempty (subdifferentialAt f x)) (hnotmin : ∃ z, f z < f x) :
closure
((((ConvexCone.hull ℝ
{y : Fin n → ℝ | translatedDifferenceFunctionAt f x y ≤ 0}) :
ConvexCone ℝ (Fin n → ℝ)) : Set (Fin n → ℝ))) =
((dotProductEquiv ℝ (Fin n)) ⁻¹'
polarCone
(closure
(((ConvexCone.hull ℝ
(((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x))) :
ConvexCone ℝ (Fin n → ℝ)) : Set (Fin n → ℝ))))
Helper for Theorem 23.7: vectorized polar cones can be rewritten as raw dot-product inequalities on vectors.
lemma helperForTheorem_23_7_vectorizedPolar_preimage_eq_dotProductPolarHull
{n : ℕ} (K : Set (Fin n → ℝ)) :
((dotProductEquiv ℝ (Fin n)) ⁻¹' polarCone K) =
{z : Fin n → ℝ | ∀ x ∈ K, dotProduct x z ≤ 0}
Helper for Theorem 23.7: vectorizing the double polar of a convex cone recovers its closure.
lemma helperForTheorem_23_7_vectorizedBipolar_eq_closure_convexCone
{n : ℕ} (K : Set (Fin n → ℝ)) (hK : K.Nonempty) :
((dotProductEquiv ℝ (Fin n)) ⁻¹'
polarCone (((dotProductEquiv ℝ (Fin n)) ⁻¹' polarCone K))) =
closure ↑(ConvexCone.hull ℝ K)
Helper for Corollary 23.7.1: if x is not a minimizer, then the zero vector cannot be a Euclidean subgradient at x.
lemma helperForCorollary_23_7_1_zero_not_mem_vectorizedSubdifferential {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) (hnotmin : ∃ z, f z < f x) :
(0 : Fin n → ℝ) ∉ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)§23 — Directional Derivatives and Subgradients — Part 12
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Corollary 23.7.1: Let f be a proper convex function, and let x be an interior point of dom f such that f x is not the minimum value of f. If C = {z | f z ≤ f x}, then a vector xStar belongs to the Euclidean realization of the normal cone of C at x if and only if there exists λ ≥ 0 and a Euclidean subgradient y ∈ ∂f(x) such that xStar = λ • y.
theorem mem_euclideanNormalCone_sublevelSet_iff_exists_nonneg_smul_mem_subdifferential {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x xStar : Fin n → ℝ) (hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hnotmin : ∃ z, f z < f x) :
xStar ∈ ((dotProductEquiv ℝ (Fin n)) ⁻¹' normalConeAt {z : Fin n → ℝ | f z ≤ f x} x) ↔
∃ a : ℝ, 0 ≤ a ∧
∃ y ∈ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x), xStar = a • y
Helper for Corollary 23.7.1: for a bounded closed convex set away from the origin, the closure of its cone hull is already the generated convex cone.
lemma helperForCorollary_23_7_1_closure_convexConeHull_eq_convexConeGenerated {n : ℕ}
{S : Set (Fin n → ℝ)} (hSne : Set.Nonempty S) (hSclosed : IsClosed S)
(hSbdd : Bornology.IsBounded S) (hSconv : Convex ℝ S) (h0 : (0 : Fin n → ℝ) ∉ S) :
closure ↑(ConvexCone.hull ℝ S) = convexConeGenerated n S
Helper for Corollary 23.7.1: membership in the generated cone of a nonempty convex set is equivalent to being a nonnegative scalar multiple of some point of the set.
lemma helperForCorollary_23_7_1_mem_convexConeGenerated_iff_exists_nonneg_smul {n : ℕ}
{S : Set (Fin n → ℝ)} (hSconv : Convex ℝ S) (hSne : Set.Nonempty S) {v : Fin n → ℝ} :
v ∈ convexConeGenerated n S ↔ ∃ a : ℝ, 0 ≤ a ∧ ∃ y ∈ S, v = a • y§24 — Differential Continuity and Monotonicity — Part 1
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Definition 5.24.1: The effective domain of the subdifferential mapping ∂ f is the set of points x for which ∂ f (x) is nonempty.
open scoped ConvexAnalysis
def subdifferentialEffectiveDomain {n : ℕ} (f : (Fin n → ℝ) → EReal) : Set (Fin n → ℝ) :=
{x | ∂ f (x) ≠ ∅}
Remark 5.24.1: For a proper convex function, the effective domain of the subdifferential mapping is squeezed between the relative interior and the effective domain of f: ri (dom f) ⊆ dom ∂ f ⊆ dom f.
open scoped ConvexAnalysis
theorem relativeInterior_subset_subdifferentialEffectiveDomain_subset_effectiveDomain {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) :
euclideanRelativeInterior_fin n (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ⊆
subdifferentialEffectiveDomain f ∧
subdifferentialEffectiveDomain f ⊆ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f
A counterexample showing that the effective domain of the subdifferential need not be convex.
open scoped ConvexAnalysis
lemma exists_nonconvex_subdifferentialEffectiveDomain :
∃ (n : ℕ) (f : (Fin n → ℝ) → EReal),
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f ∧
¬ Convex ℝ (subdifferentialEffectiveDomain f)
Definition 5.24.2: The range of the subdifferential mapping ∂ f is the union of all subdifferentials ∂ f (x) as x ranges over ℝ^n.
open scoped ConvexAnalysis
def subdifferentialRange {n : ℕ} (f : (Fin n → ℝ) → EReal) :
Set (Module.Dual ℝ (Fin n → ℝ)) :=
⋃ x, ∂ f x
Remark 5.24.2: Under the Euclidean identification of vectors with dual vectors, if f is a closed proper convex function, then the range of ∂ f is squeezed between the relative interior and the effective domain of f*: ri (dom f^*) ⊆ range ∂ f ⊆ dom f^*, where f* = fenchelConjugate n f.
open scoped ConvexAnalysis
theorem relativeInterior_subset_preimage_subdifferentialRange_subset_effectiveDomain_fenchelConjugate
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) :
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f)) ⊆
(dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialRange f ∧
(dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialRange f ⊆
effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f)
Definition 5.24.3: The graph of the subdifferential mapping ∂ f is the set of pairs (x, xStar) such that xStar ∈ ∂ f (x).
open scoped ConvexAnalysis
def subdifferentialGraph {n : ℕ} (f : (Fin n → ℝ) → EReal) :
Set ((Fin n → ℝ) × Module.Dual ℝ (Fin n → ℝ)) :=
{p | p.2 ∈ ∂ f (p.1)}
-- Proof sketch: rewrite subgradient membership by Theorem 23.5 as the Fenchel-Young equality
-- `f x + f*(xStar) = ⟪xStar, x⟫`, then pass to the limit along the convergent sequences using
-- closedness of `f` and of `f*`. This shows the limit pair still satisfies the equality, hence
-- lies in the graph of `∂ f`; the closed-graph formulation is the equivalent topological
-- restatement after identifying covectors with vectors by `dotProductEquiv`.
Closed-graph property of the subdifferential: if f is a closed proper convex function on ℝ^n, and sequences xᵢ → x and xᵢ* → x* satisfy dotProductEquiv ℝ (Fin n) xᵢ* ∈ ∂ f (xᵢ) for every i, then dotProductEquiv ℝ (Fin n) x* ∈ ∂ f (x). Equivalently, under the Euclidean identification of covectors with vectors, the graph of ∂ f is a closed subset of ℝ^n × ℝ^n.
open scoped ConvexAnalysis
theorem subdifferential_limit_mem_and_isClosed_graph {n : ℕ} (f : (Fin n → ℝ) → EReal)
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) :
(∀ ⦃x xStar : Fin n → ℝ⦄ (xSeq xStarSeq : ℕ → Fin n → ℝ),
(∀ i : ℕ, dotProductEquiv ℝ (Fin n) (xStarSeq i) ∈ ∂ f (xSeq i)) →
Filter.Tendsto xSeq Filter.atTop (nhds x) →
Filter.Tendsto xStarSeq Filter.atTop (nhds xStar) →
dotProductEquiv ℝ (Fin n) xStar ∈ ∂ f x) ∧
IsClosed {p : (Fin n → ℝ) × (Fin n → ℝ) |
dotProductEquiv ℝ (Fin n) p.2 ∈ ∂ f p.1}
Helper for Remark 5.24.1: membership in the effective domain of ∂ f is equivalent to the subdifferential being nonempty.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_1_mem_subdifferentialEffectiveDomain_iff_nonempty {n : ℕ}
(f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ) :
x ∈ subdifferentialEffectiveDomain f ↔ Set.Nonempty (∂ f x)
Helper for Remark 5.24.1: points in the relative interior of dom f have a nonempty subdifferential.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_1_subdifferentiable_of_mem_relativeInterior {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) {x : Fin n → ℝ}
(hx :
x ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
x ∈ subdifferentialEffectiveDomain f
Helper for Remark 5.24.1: a point with nonempty subdifferential lies in dom f.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_1_mem_effectiveDomain_of_subdifferentiable {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) {x : Fin n → ℝ}
(hx : x ∈ subdifferentialEffectiveDomain f) :
x ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f
Helper for Remark 5.24.2: membership in the range of ∂ f is equivalent to membership in one concrete subdifferential.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_2_mem_subdifferentialRange_iff_exists {n : ℕ}
(f : (Fin n → ℝ) → EReal) (xDual : Module.Dual ℝ (Fin n → ℝ)) :
xDual ∈ subdifferentialRange f ↔ ∃ x : Fin n → ℝ, xDual ∈ ∂ f x
Helper for Remark 5.24.2: points in dom ∂(f*) correspond to covectors in range ∂ f under the Euclidean identification.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_2_preimage_subdifferentialRange_of_mem_subdifferentialEffectiveDomain_fenchelConjugate
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{xStar : Fin n → ℝ}
(hxStar : xStar ∈ subdifferentialEffectiveDomain (fenchelConjugate n f)) :
xStar ∈ (dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialRange f
Helper for Remark 5.24.2: a covector in range ∂ f yields a point of dom ∂(f*) after transporting it back through Corollary 23.5.1.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_2_mem_subdifferentialEffectiveDomain_fenchelConjugate_of_preimage_subdifferentialRange
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{xStar : Fin n → ℝ}
(hxStar : xStar ∈ (dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialRange f) :
xStar ∈ subdifferentialEffectiveDomain (fenchelConjugate n f)
Helper for Theorem 5.24.8: finiteness on a nonempty open set forces a globally convex function to be proper.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_proper_of_finite_on_open
{n : ℕ} {C : Set (Fin n → ℝ)} (hCopen : IsOpen C) {f : (Fin n → ℝ) → EReal}
(hf : ConvexFunction f) {x : Fin n → ℝ} (hx : x ∈ C)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal)) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f
Helper for Theorem 5.24.8: on the finite open set C, the functions can be converted to real-valued convex functions and the pointwise convergence survives taking toReal.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_toRealConvexOn_and_pointwiseTendsto
{n : ℕ} {C : Set (Fin n → ℝ)} (hCconv : Convex ℝ C)
{f : (Fin n → ℝ) → EReal} (hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
(hpoint : ∀ z ∈ C, Filter.Tendsto (fun i => fSeq i z) Filter.atTop (nhds (f z))) :
C ⊆ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f ∧
(∀ i, C ⊆ effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fSeq i)) ∧
ConvexOn ℝ C (fun z => (f z).toReal) ∧
(∀ i, ConvexOn ℝ C (fun z => (fSeq i z).toReal)) ∧
(∀ z ∈ C, Filter.Tendsto (fun i => (fSeq i z).toReal) Filter.atTop
(nhds ((f z).toReal)))
Helper for Theorem 5.24.8: the open set C lies inside the effective domains of the limit and approximating functions, so x and each xᵢ are interior-domain points.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_mem_interior_effectiveDomain_at_limit_and_sequence
{n : ℕ} {C : Set (Fin n → ℝ)} (hCopen : IsOpen C) (_hCconv : Convex ℝ C)
{f : (Fin n → ℝ) → EReal} (_hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (_hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
{x : Fin n → ℝ} (hx : x ∈ C) (xSeq : ℕ → Fin n → ℝ) (hxSeq : ∀ i, xSeq i ∈ C) :
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ∧
∀ i, xSeq i ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fSeq i))
Helper for Theorem 5.24.8: at the limit point and along the approximating sequence, all upper directional derivatives are finite because those points lie in the interior of the effective domains of proper convex functions.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_directionalDerivative_finite_at_limit_and_sequence
{n : ℕ} {C : Set (Fin n → ℝ)} (hCopen : IsOpen C) (hCconv : Convex ℝ C)
{f : (Fin n → ℝ) → EReal} (hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
{x : Fin n → ℝ} (hx : x ∈ C) (xSeq : ℕ → Fin n → ℝ) (hxSeq : ∀ i, xSeq i ∈ C) :
(∀ y : Fin n → ℝ,
upperDirectionalDerivativeAt f x y ≠ (⊤ : EReal) ∧
upperDirectionalDerivativeAt f x y ≠ (⊥ : EReal)) ∧
∀ i : ℕ, ∀ y : Fin n → ℝ,
upperDirectionalDerivativeAt (fSeq i) (xSeq i) y ≠ (⊤ : EReal) ∧
upperDirectionalDerivativeAt (fSeq i) (xSeq i) y ≠ (⊥ : EReal)
Helper for Theorem 5.24.8: coercing a convergent real sequence into EReal preserves its limit.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_tendsto_coe_of_tendsto
{u : ℕ → ℝ} {l : ℝ}
(hu : Filter.Tendsto u Filter.atTop (nhds l)) :
Filter.Tendsto (fun i => ((u i : ℝ) : EReal)) Filter.atTop (nhds (l : EReal))
Helper for Theorem 5.24.8: once the stepped values are finite, the EReal directional-difference quotient is exactly the coerced real secant quotient.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_eventually_fixedStepQuotient_eq_toReal
{n : ℕ} (fSeq : ℕ → (Fin n → ℝ) → EReal)
(xSeq ySeq : ℕ → Fin n → ℝ)
{t : ℝ}
(hxSeqFinite : ∀ i, fSeq i (xSeq i) ≠ (⊤ : EReal) ∧ fSeq i (xSeq i) ≠ (⊥ : EReal))
(hstepFinite :
∀ᶠ i in Filter.atTop,
fSeq i (xSeq i + t • ySeq i) ≠ (⊤ : EReal) ∧
fSeq i (xSeq i + t • ySeq i) ≠ (⊥ : EReal)) :
(fun i => directionalDifferenceQuotientAt (fSeq i) (xSeq i) (ySeq i) t) =ᶠ[Filter.atTop]
(fun i =>
((((fSeq i (xSeq i + t • ySeq i)).toReal - (fSeq i (xSeq i)).toReal) / t : ℝ) : EReal))
Helper for Theorem 5.24.8: if the positive-step quotients converge in EReal, then the limsup of the upper directional derivatives is bounded by that same fixed-step limit.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_limsup_le_fixedStepQuotient
{n : ℕ} (fSeq : ℕ → (Fin n → ℝ) → EReal)
(hfSeq : ∀ i, ConvexFunction (fSeq i))
(xSeq ySeq : ℕ → Fin n → ℝ)
(hxSeqFinite : ∀ i, fSeq i (xSeq i) ≠ (⊤ : EReal) ∧ fSeq i (xSeq i) ≠ (⊥ : EReal))
{t q : ℝ} (ht : 0 < t)
(hquot :
Filter.Tendsto
(fun i => directionalDifferenceQuotientAt (fSeq i) (xSeq i) (ySeq i) t)
Filter.atTop (nhds ((q : ℝ) : EReal))) :
Filter.limsup (fun i => upperDirectionalDerivativeAt (fSeq i) (xSeq i) (ySeq i))
Filter.atTop ≤ ((q : ℝ) : EReal)
Helper for Theorem 5.24.8: the real fixed-step secant convergence already suffices for the fixed-step limsup inequality once the stepped values are eventually finite.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_limsup_le_fixedStepRealQuotient
{n : ℕ} (fSeq : ℕ → (Fin n → ℝ) → EReal)
(hfSeq : ∀ i, ConvexFunction (fSeq i))
(xSeq ySeq : ℕ → Fin n → ℝ)
(hxSeqFinite : ∀ i, fSeq i (xSeq i) ≠ (⊤ : EReal) ∧ fSeq i (xSeq i) ≠ (⊥ : EReal))
{t q : ℝ} (ht : 0 < t)
(hstepFinite :
∀ᶠ i in Filter.atTop,
fSeq i (xSeq i + t • ySeq i) ≠ (⊤ : EReal) ∧
fSeq i (xSeq i + t • ySeq i) ≠ (⊥ : EReal))
(hquot :
Filter.Tendsto
(fun i =>
(((fSeq i (xSeq i + t • ySeq i)).toReal - (fSeq i (xSeq i)).toReal) / t : ℝ))
Filter.atTop (nhds q)) :
Filter.limsup (fun i => upperDirectionalDerivativeAt (fSeq i) (xSeq i) (ySeq i))
Filter.atTop ≤ ((q : ℝ) : EReal)
Helper for Theorem 5.24.8: a convergent real sequence has bounded range.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_boundedRange_of_tendsto_real
{u : ℕ → ℝ} {l : ℝ}
(hu : Filter.Tendsto u Filter.atTop (nhds l)) :
Bornology.IsBounded (Set.range u)
Helper for Theorem 5.24.8: on every closed bounded subset of C, the realified family (fᵢ ·).toReal admits one common Lipschitz constant.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_realifiedFamily_equiLipschitz_on_closedBoundedSubset
{n : ℕ} {C S : Set (Fin n → ℝ)} (hCopen : IsOpen C) (hCconv : Convex ℝ C)
{f : (Fin n → ℝ) → EReal} (hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
(hpoint : ∀ z ∈ C, Filter.Tendsto (fun i => fSeq i z) Filter.atTop (nhds (f z)))
(hSclosed : IsClosed S) (hSbdd : Bornology.IsBounded S) (hSsubset : S ⊆ C) :
∃ K : NNReal, ∀ i {u v : Fin n → ℝ}, u ∈ S → v ∈ S →
Helper for Theorem 5.24.8: equi-Lipschitz control on a closed bounded set upgrades pointwise convergence at a fixed point to convergence along any sequence staying in that set.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_toReal_tendsto_at_movingPoints_of_equiLipschitz
{n : ℕ} {C S : Set (Fin n → ℝ)} (hCopen : IsOpen C) (hCconv : Convex ℝ C)
{f : (Fin n → ℝ) → EReal} (hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
(hpoint : ∀ z ∈ C, Filter.Tendsto (fun i => fSeq i z) Filter.atTop (nhds (f z)))
(hSclosed : IsClosed S) (hSbdd : Bornology.IsBounded S) (hSsubset : S ⊆ C)
{z : Fin n → ℝ} (hz : z ∈ S)
(zSeq : ℕ → Fin n → ℝ)
(hz_tendsto : Filter.Tendsto zSeq Filter.atTop (nhds z))
(hzSeq_mem : ∀ᶠ i in Filter.atTop, zSeq i ∈ S) :
Filter.Tendsto (fun i => (fSeq i (zSeq i)).toReal) Filter.atTop (nhds ((f z).toReal))
Helper for Theorem 5.24.8: the analytic heart of the proof is to show that every admissible fixed positive step produces convergent real secant quotients along the moving points.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_fixedStepQuotient_tendsto
{n : ℕ} {C : Set (Fin n → ℝ)} (hCopen : IsOpen C) (hCconv : Convex ℝ C)
{f : (Fin n → ℝ) → EReal} (hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
{x : Fin n → ℝ} (hx : x ∈ C) (xSeq : ℕ → Fin n → ℝ) (_hxSeq : ∀ i, xSeq i ∈ C)
(hx_tendsto : Filter.Tendsto xSeq Filter.atTop (nhds x))
(hpoint : ∀ z ∈ C, Filter.Tendsto (fun i => fSeq i z) Filter.atTop (nhds (f z)))
{y : Fin n → ℝ} (ySeq : ℕ → Fin n → ℝ)
(hy_tendsto : Filter.Tendsto ySeq Filter.atTop (nhds y))
{t : ℝ} (_ht : 0 < t)
(ht_mem : x + t • y ∈ C)
(_hstep_mem : ∀ᶠ i in Filter.atTop, xSeq i + t • ySeq i ∈ C) :
Filter.Tendsto
(fun i =>
(((fSeq i (xSeq i + t • ySeq i)).toReal - (fSeq i (xSeq i)).toReal) / t : ℝ))
Filter.atTop (nhds (((f (x + t • y)).toReal - (f x).toReal) / t))
Helper for Theorem 5.24.8: every positive scale contains a smaller admissible step that keeps the translated point inside the open set C.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_exists_small_step_mem_open
{n : ℕ} {C : Set (Fin n → ℝ)} (hCopen : IsOpen C)
{x y : Fin n → ℝ} (hx : x ∈ C) {s : ℝ} (hs : 0 < s) :
∃ t : ℝ, 0 < t ∧ t ≤ s ∧ x + t • y ∈ C§24 — Differential Continuity and Monotonicity — Part 2
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 5.24.8: let f be a convex function on ℝ^n that is finite on an open convex set C ⊆ ℝ^n, and let fᵢ be convex functions on ℝ^n that are finite on C, converging pointwise to f on C. If x ∈ C, xᵢ ∈ C with xᵢ → x, and yᵢ → y, then limsup fᵢ'(xᵢ; yᵢ) ≤ f'(x; y). Moreover, for every ε > 0, the subdifferentials ∂ fᵢ(xᵢ) are eventually contained in ∂ f(x) + ε B; in Lean this inclusion is written after identifying covectors with vectors via dotProductEquiv ℝ (Fin n).
open scoped ConvexAnalysis
theorem convexOn_pointwiseLimit_limsup_upperDirectionalDerivative_le_and_eventual_subdifferential_subset
{n : ℕ} {C : Set (Fin n → ℝ)} (hCopen : IsOpen C) (hCconv : Convex ℝ C)
{f : (Fin n → ℝ) → EReal} (hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
{x : Fin n → ℝ} (hx : x ∈ C) (xSeq : ℕ → Fin n → ℝ) (hxSeq : ∀ i, xSeq i ∈ C)
(hx_tendsto : Filter.Tendsto xSeq Filter.atTop (nhds x))
(hpoint : ∀ z ∈ C, Filter.Tendsto (fun i => fSeq i z) Filter.atTop (nhds (f z))) :
(∀ y : Fin n → ℝ, ∀ ySeq : ℕ → Fin n → ℝ,
Filter.Tendsto ySeq Filter.atTop (nhds y) →
Filter.limsup (fun i => upperDirectionalDerivativeAt (fSeq i) (xSeq i) (ySeq i))
Filter.atTop ≤ upperDirectionalDerivativeAt f x y) ∧
∀ ε : ℝ, 0 < ε → ∃ i0 : ℕ, ∀ i ≥ i0,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt (fSeq i) (xSeq i)) ⊆
Set.image2 (fun u v => u + v)
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)
{v : Fin n → ℝ | ‖v‖ ≤ ε}
Helper for Theorem 5.24.8: once the admissible fixed-step quotient convergence is available, the monotonicity/sInf description of directional derivatives yields the limsup inequality.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_limsup_le_upperDirectionalDerivative_via_sInf
{n : ℕ} {C : Set (Fin n → ℝ)} (hCopen : IsOpen C) (hCconv : Convex ℝ C)
{f : (Fin n → ℝ) → EReal} (hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
{x : Fin n → ℝ} (hx : x ∈ C) (xSeq : ℕ → Fin n → ℝ) (hxSeq : ∀ i, xSeq i ∈ C)
(hx_tendsto : Filter.Tendsto xSeq Filter.atTop (nhds x))
(hpoint : ∀ z ∈ C, Filter.Tendsto (fun i => fSeq i z) Filter.atTop (nhds (f z)))
(y : Fin n → ℝ) (ySeq : ℕ → Fin n → ℝ)
(hy_tendsto : Filter.Tendsto ySeq Filter.atTop (nhds y)) :
Filter.limsup (fun i => upperDirectionalDerivativeAt (fSeq i) (xSeq i) (ySeq i))
Filter.atTop ≤ upperDirectionalDerivativeAt f x y
Helper for Theorem 5.24.8: a subgradient inequality tested on the signed standard basis controls the corresponding coordinates of the representing vector.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_subgradient_coordinate_bounds_in_signed_basis
{n : ℕ} {g : (Fin n → ℝ) → EReal} (hg : ConvexFunction g)
{z : Fin n → ℝ} (hzFinite : g z ≠ (⊤ : EReal) ∧ g z ≠ (⊥ : EReal))
{v : Fin n → ℝ} (hv : dotProductEquiv ℝ (Fin n) v ∈ subdifferentialAt g z)
(j : Fin n) :
(((v j : ℝ) : EReal) ≤ upperDirectionalDerivativeAt g z (Pi.single j 1)) ∧
(((-(v j) : ℝ) : EReal) ≤
upperDirectionalDerivativeAt g z (-(Pi.single j 1 : Fin n → ℝ)))
Helper for Theorem 5.24.8: a bad subgradient sequence along a strict-mono bad index sequence admits a convergent further subsequence, because the signed basis limsup bounds force one common closed ball.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_badSubgradient_convergent_subseq_of_basis_limsup
{n : ℕ} {C : Set (Fin n → ℝ)} (hCopen : IsOpen C) (hCconv : Convex ℝ C)
{f : (Fin n → ℝ) → EReal} (hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
{x : Fin n → ℝ} (hx : x ∈ C) (xSeq : ℕ → Fin n → ℝ) (hxSeq : ∀ i, xSeq i ∈ C)
(hlimsup :
∀ y : Fin n → ℝ, ∀ ySeq : ℕ → Fin n → ℝ,
Filter.Tendsto ySeq Filter.atTop (nhds y) →
Filter.limsup (fun i => upperDirectionalDerivativeAt (fSeq i) (xSeq i) (ySeq i))
Filter.atTop ≤ upperDirectionalDerivativeAt f x y)
(Aε : Set (Fin n → ℝ))
(ι : ℕ → ℕ) (hι : StrictMono ι)
(vBad : ℕ → Fin n → ℝ)
(hvBadSub :
∀ k, dotProductEquiv ℝ (Fin n) (vBad k) ∈ subdifferentialAt (fSeq (ι k)) (xSeq (ι k)))
(hvBadOut : ∀ k, vBad k ∉ Aε) :
∃ N : ℕ, ∃ φ : ℕ → ℕ, ∃ v : Fin n → ℝ,
StrictMono φ ∧
Filter.Tendsto (fun k => vBad (N + φ k)) Filter.atTop (nhds v) ∧
(∀ k,
dotProductEquiv ℝ (Fin n) (vBad (N + φ k)) ∈
subdifferentialAt (fSeq (ι (N + φ k))) (xSeq (ι (N + φ k)))) ∧
(∀ k, vBad (N + φ k) ∉ Aε)
Helper for Theorem 5.24.8: a convergent subsequence of subgradients whose directional minorants are controlled by the limsup bound has its limit in ∂ f(x).
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_clusterPoint_mem_subdifferential_of_directional_bounds
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → EReal} (hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
{x : Fin n → ℝ} (hx : x ∈ C) (xSeq : ℕ → Fin n → ℝ) (hxSeq : ∀ i, xSeq i ∈ C)
(hlimsup :
∀ y : Fin n → ℝ, ∀ ySeq : ℕ → Fin n → ℝ,
Filter.Tendsto ySeq Filter.atTop (nhds y) →
Filter.limsup (fun i => upperDirectionalDerivativeAt (fSeq i) (xSeq i) (ySeq i))
Filter.atTop ≤ upperDirectionalDerivativeAt f x y)
(ι : ℕ → ℕ) (hι : StrictMono ι)
(vSeq : ℕ → Fin n → ℝ) {v : Fin n → ℝ}
(hv_tendsto : Filter.Tendsto vSeq Filter.atTop (nhds v))
(hvSub :
∀ k, dotProductEquiv ℝ (Fin n) (vSeq k) ∈
subdifferentialAt (fSeq (ι k)) (xSeq (ι k))) :
dotProductEquiv ℝ (Fin n) v ∈ subdifferentialAt f x
Helper for Theorem 5.24.8: after the directional-derivative limsup inequality is known in every direction, a bad subgradient subsequence contradicts the closedness of ∂ f (x).
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_8_eventual_subdifferential_subset_of_limsup
{n : ℕ} {C : Set (Fin n → ℝ)} (hCopen : IsOpen C) (hCconv : Convex ℝ C)
{f : (Fin n → ℝ) → EReal} (hf : ConvexFunction f)
(hf_finite : ∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
(fSeq : ℕ → (Fin n → ℝ) → EReal) (hfSeq : ∀ i, ConvexFunction (fSeq i))
(hfSeq_finite : ∀ i, ∀ z ∈ C, fSeq i z ≠ (⊤ : EReal) ∧ fSeq i z ≠ (⊥ : EReal))
{x : Fin n → ℝ} (hx : x ∈ C) (xSeq : ℕ → Fin n → ℝ) (hxSeq : ∀ i, xSeq i ∈ C)
(hx_tendsto : Filter.Tendsto xSeq Filter.atTop (nhds x))
(hpoint : ∀ z ∈ C, Filter.Tendsto (fun i => fSeq i z) Filter.atTop (nhds (f z)))
(hlimsup :
∀ y : Fin n → ℝ, ∀ ySeq : ℕ → Fin n → ℝ,
Filter.Tendsto ySeq Filter.atTop (nhds y) →
Filter.limsup (fun i => upperDirectionalDerivativeAt (fSeq i) (xSeq i) (ySeq i))
Filter.atTop ≤ upperDirectionalDerivativeAt f x y)
(ε : ℝ) (hε : 0 < ε) :
∃ i0 : ℕ, ∀ i ≥ i0,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt (fSeq i) (xSeq i)) ⊆
Set.image2 (fun u v => u + v)
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)
{v : Fin n → ℝ | ‖v‖ ≤ ε}§24 — Differential Continuity and Monotonicity — Part 3
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The scalar x : ℝ viewed as a point of Fin 1 → ℝ.
open scoped ConvexAnalysis
def scalarPoint (x : ℝ) : Fin 1 → ℝ :=
fun _ => x
The effective domain of a one-dimensional extended-real function, viewed as a subset of ℝ.
open scoped ConvexAnalysis
def scalarEffectiveDomain (f : (Fin 1 → ℝ) → EReal) : Set ℝ :=
{x | scalarPoint x ∈ effectiveDomain (Set.univ : Set (Fin 1 → ℝ)) f}
A scalar lies strictly to the right of the effective domain when it exceeds every domain point.
open scoped ConvexAnalysis
def IsRightOfScalarEffectiveDomain (f : (Fin 1 → ℝ) → EReal) (x : ℝ) : Prop :=
∀ y ∈ scalarEffectiveDomain f, y < x
A scalar lies strictly to the left of the effective domain when it is smaller than every domain point.
open scoped ConvexAnalysis
def IsLeftOfScalarEffectiveDomain (f : (Fin 1 → ℝ) → EReal) (x : ℝ) : Prop :=
∀ y ∈ scalarEffectiveDomain f, x < y
The extended right derivative of a one-dimensional closed proper convex function: it agrees with the upper directional derivative in direction 1 on and between domain points, is ⊤ to the right of the effective domain, and is ⊥ to the left.
open scoped ConvexAnalysis
noncomputable def rightDerivativeExtension (f : (Fin 1 → ℝ) → EReal) (x : ℝ) : EReal :=
if IsRightOfScalarEffectiveDomain f x then
(⊤ : EReal)
else if IsLeftOfScalarEffectiveDomain f x then
(⊥ : EReal)
else
upperDirectionalDerivativeAt f (scalarPoint x) (scalarPoint 1)
The extended left derivative of a one-dimensional closed proper convex function: it agrees with the negative of the upper directional derivative in direction -1 on and between domain points, is ⊤ to the right of the effective domain, and is ⊥ to the left.
open scoped ConvexAnalysis
noncomputable def leftDerivativeExtension (f : (Fin 1 → ℝ) → EReal) (x : ℝ) : EReal :=
if IsRightOfScalarEffectiveDomain f x then
(⊤ : EReal)
else if IsLeftOfScalarEffectiveDomain f x then
(⊥ : EReal)
else
-upperDirectionalDerivativeAt f (scalarPoint x) (scalarPoint (-1))
Helper for Theorem 5.24.1: the scalar effective domain is convex because it is the one-dimensional trace of the convex effective domain of f.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_scalarEffectiveDomain_convex
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) :
Convex ℝ (scalarEffectiveDomain f)
Helper for Theorem 5.24.1: a point strictly left of the scalar effective domain cannot also be strictly right of it, because properness gives a domain point.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_not_right_of_left
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x : ℝ} (hxLeft : IsLeftOfScalarEffectiveDomain f x) :
¬ IsRightOfScalarEffectiveDomain f x
Helper for Theorem 5.24.1: a point strictly right of the scalar effective domain cannot also be strictly left of it, again because properness gives a domain point.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_not_left_of_right
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x : ℝ} (hxRight : IsRightOfScalarEffectiveDomain f x) :
¬ IsLeftOfScalarEffectiveDomain f x
Helper for Theorem 5.24.1: if a scalar is neither strictly left nor strictly right of the effective domain, convexity forces it to lie in the effective domain.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_mem_scalarEffectiveDomain_of_not_left_not_right
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x : ℝ}
(hxNotLeft : ¬ IsLeftOfScalarEffectiveDomain f x)
(hxNotRight : ¬ IsRightOfScalarEffectiveDomain f x) :
x ∈ scalarEffectiveDomain f
Helper for Theorem 5.24.1: a domain point is neither strictly left nor strictly right of the scalar effective domain.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_not_left_not_right_of_mem_scalarEffectiveDomain
(f : (Fin 1 → ℝ) → EReal) {x : ℝ}
(hx : x ∈ scalarEffectiveDomain f) :
¬ IsLeftOfScalarEffectiveDomain f x ∧ ¬ IsRightOfScalarEffectiveDomain f x
Helper for Theorem 5.24.1: the right-of-domain predicate is monotone in the scalar variable.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_rightOfScalarEffectiveDomain_mono
(f : (Fin 1 → ℝ) → EReal) {x y : ℝ} (hxy : x ≤ y)
(hx : IsRightOfScalarEffectiveDomain f x) :
IsRightOfScalarEffectiveDomain f y
Helper for Theorem 5.24.1: the left-of-domain predicate is antitone in the scalar variable.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_leftOfScalarEffectiveDomain_antitone
(f : (Fin 1 → ℝ) → EReal) {x y : ℝ} (hxy : x ≤ y)
(hy : IsLeftOfScalarEffectiveDomain f y) :
IsLeftOfScalarEffectiveDomain f x
Helper for Theorem 5.24.1: interior points of the scalar effective domain have finite right and left derivative extensions.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_scalarInterior_finiteDirectionalDerivatives
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x : ℝ} (hx : x ∈ interior (scalarEffectiveDomain f)) :
rightDerivativeExtension f x ≠ (⊤ : EReal) ∧
rightDerivativeExtension f x ≠ (⊥ : EReal) ∧
leftDerivativeExtension f x ≠ (⊤ : EReal) ∧
leftDerivativeExtension f x ≠ (⊥ : EReal)
Helper for Theorem 5.24.1: at a domain point, the left derivative extension does not exceed the right derivative extension.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_leftDerivativeExtension_le_rightDerivativeExtension_at_domain
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x : ℝ} (hx : x ∈ scalarEffectiveDomain f) :
leftDerivativeExtension f x ≤ rightDerivativeExtension f x
Helper for Theorem 5.24.1: for domain points x < y, the secant slope from x to y sits between the right derivative at x and the left derivative at y.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_secantSlope_between_rightAndLeftDerivatives
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x y : ℝ} (hxy : x < y)
(hx : x ∈ scalarEffectiveDomain f) (hy : y ∈ scalarEffectiveDomain f) :
rightDerivativeExtension f x ≤
(f (scalarPoint y) - f (scalarPoint x)) / (((y - x : ℝ)) : EReal) ∧
(f (scalarPoint y) - f (scalarPoint x)) / (((y - x : ℝ)) : EReal) ≤
leftDerivativeExtension f y
Helper for Theorem 5.24.1: whenever x < y, the extended right derivative at x is bounded above by the extended left derivative at y.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_rightDerivativeExtension_le_leftDerivativeExtension_of_lt
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x y : ℝ} (hxy : x < y) :
rightDerivativeExtension f x ≤ leftDerivativeExtension f y
Helper for Theorem 5.24.1: the extended left derivative never exceeds the extended right derivative at the same point.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_leftDerivativeExtension_le_rightDerivativeExtension
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(x : ℝ) :
leftDerivativeExtension f x ≤ rightDerivativeExtension f x
Helper for Theorem 5.24.1: the three-term order chain f'_+(z₁) ≤ f'_-(x) ≤ f'_+(x) ≤ f'_-(z₂) holds whenever z₁ < x < z₂.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_derivativeExtensions_orderChain
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{z1 x z2 : ℝ} (hz1x : z1 < x) (hxz2 : x < z2) :
rightDerivativeExtension f z1 ≤ leftDerivativeExtension f x ∧
leftDerivativeExtension f x ≤ rightDerivativeExtension f x ∧
rightDerivativeExtension f x ≤ leftDerivativeExtension f z2
Helper for Theorem 5.24.1: the derivative extensions are monotone once the strict-order comparison and same-point inequality are known.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_monotoneDerivativeExtensions
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) :
Monotone (rightDerivativeExtension f) ∧ Monotone (leftDerivativeExtension f)
Helper for Theorem 5.24.1: reflecting the scalar variable sends the scalar effective domain of f to its negated preimage.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_reflectedFunction_mem_scalarEffectiveDomain_iff
(f : (Fin 1 → ℝ) → EReal) (x : ℝ) :
x ∈ scalarEffectiveDomain (fun u => f (-u)) ↔ -x ∈ scalarEffectiveDomain f
Helper for Theorem 5.24.1: after reflection, being strictly right of the effective domain is equivalent to the original point being strictly left of it.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_reflectedFunction_rightOf_iff
(f : (Fin 1 → ℝ) → EReal) (x : ℝ) :
IsRightOfScalarEffectiveDomain (fun u => f (-u)) (-x) ↔ IsLeftOfScalarEffectiveDomain f x
Helper for Theorem 5.24.1: after reflection, being strictly left of the effective domain is equivalent to the original point being strictly right of it.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_reflectedFunction_leftOf_iff
(f : (Fin 1 → ℝ) → EReal) (x : ℝ) :
IsLeftOfScalarEffectiveDomain (fun u => f (-u)) (-x) ↔ IsRightOfScalarEffectiveDomain f x
Helper for Theorem 5.24.1: reflecting a closed convex function preserves closed convexity.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_reflectedFunction_closed
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f) :
ClosedConvexFunction (fun u => f (-u))
Helper for Theorem 5.24.1: reflecting a proper convex function preserves properness.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_reflectedFunction_proper
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) :
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) (fun u => f (-u))
Helper for Theorem 5.24.1: the reflected positive-step quotient in direction 1 is the original positive-step quotient in direction -1.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_reflectedDifferenceQuotient_dirOne
(f : (Fin 1 → ℝ) → EReal) (x t : ℝ) :
(f (scalarPoint x + t • scalarPoint (-1)) - f (scalarPoint x)) / (t : EReal) =
((fun u => f (-u)) (scalarPoint (-x) + t • scalarPoint 1) -
(fun u => f (-u)) (scalarPoint (-x))) / (t : EReal)
Helper for Theorem 5.24.1: the reflected positive-step quotient in direction -1 is the original positive-step quotient in direction 1.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_reflectedDifferenceQuotient_dirNegOne
(f : (Fin 1 → ℝ) → EReal) (x t : ℝ) :
(f (scalarPoint x + t • scalarPoint 1) - f (scalarPoint x)) / (t : EReal) =
((fun u => f (-u)) (scalarPoint (-x) + t • scalarPoint (-1)) -
(fun u => f (-u)) (scalarPoint (-x))) / (t : EReal)
Helper for Theorem 5.24.1: reflection swaps the two derivative extensions up to sign.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_reflectedFunction_derivativeIdentities
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) (x : ℝ) :
rightDerivativeExtension (fun u => f (-u)) (-x) = - leftDerivativeExtension f x ∧
leftDerivativeExtension (fun u => f (-u)) (-x) = - rightDerivativeExtension f x
Helper for Theorem 5.24.1: the affine parameter sending z ∈ Ioo x y to the segment coefficient approaching 1 is well behaved on the right-neighborhood filter.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_affineParameter_tendsto_one
{x y : ℝ} (hxy : x < y) :
Filter.Tendsto (fun z : ℝ => (y - z) / (y - x))
(nhdsWithin x (Set.Ioo x y))
(nhdsWithin (1 : ℝ) (Set.Iio 1))
Helper for Theorem 5.24.1: the affine segment parametrization used near x really lands on the scalar point z.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_segmentParameterization_eq_scalarPoint
{x y z : ℝ} (hxy : x < y) :
(1 - (y - z) / (y - x)) • scalarPoint y + ((y - z) / (y - x)) • scalarPoint x =
scalarPoint z§24 — Differential Continuity and Monotonicity — Part 4
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 5.24.1: for a closed proper convex function on ℝ, the right and left derivative extensions are nondecreasing, finite on the interior of the effective domain, satisfy f'_+(z₁) ≤ f'_-(x) ≤ f'_+(x) ≤ f'_-(z₂) whenever z₁ < x < z₂, and have the one-sided limit relations lim_{z ↓ x} f'_+(z) = f'_+(x), lim_{z ↑ x} f'_+(z) = f'_-(x), lim_{z ↓ x} f'_-(z) = f'_+(x), and lim_{z ↑ x} f'_-(z) = f'_-(x).
open scoped ConvexAnalysis
theorem oneDimensional_derivativeExtensions_monotone_ordered_and_oneSidedContinuous
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) :
Monotone (rightDerivativeExtension f) ∧
Monotone (leftDerivativeExtension f) ∧
(∀ x ∈ interior (scalarEffectiveDomain f),
rightDerivativeExtension f x ≠ (⊤ : EReal) ∧
rightDerivativeExtension f x ≠ (⊥ : EReal) ∧
leftDerivativeExtension f x ≠ (⊤ : EReal) ∧
leftDerivativeExtension f x ≠ (⊥ : EReal)) ∧
(∀ ⦃z1 x z2 : ℝ⦄, z1 < x → x < z2 →
rightDerivativeExtension f z1 ≤ leftDerivativeExtension f x ∧
leftDerivativeExtension f x ≤ rightDerivativeExtension f x ∧
rightDerivativeExtension f x ≤ leftDerivativeExtension f z2) ∧
(∀ x : ℝ,
Filter.Tendsto (rightDerivativeExtension f) (nhdsWithin x (Set.Ioi x))
(nhds (rightDerivativeExtension f x))) ∧
(∀ x : ℝ,
Filter.Tendsto (rightDerivativeExtension f) (nhdsWithin x (Set.Iio x))
(nhds (leftDerivativeExtension f x))) ∧
(∀ x : ℝ,
Filter.Tendsto (leftDerivativeExtension f) (nhdsWithin x (Set.Ioi x))
(nhds (rightDerivativeExtension f x))) ∧
(∀ x : ℝ,
Filter.Tendsto (leftDerivativeExtension f) (nhdsWithin x (Set.Iio x))
(nhds (leftDerivativeExtension f x)))
Theorem 5.24.2: under the hypotheses of Theorem 5.24.1, the one-dimensional subdifferential at x is exactly the set of scalars xStar such that f'_-(x) ≤ xStar ≤ f'_+(x).
open scoped ConvexAnalysis
theorem oneDimensional_subdifferential_preimage_eq_setOf_leftDerivativeExtension_le_and_le_rightDerivativeExtension
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) (x : ℝ) :
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x)} =
{xStar : ℝ |
leftDerivativeExtension f x ≤ ((xStar : ℝ) : EReal) ∧
(((xStar : ℝ) : EReal) ≤ rightDerivativeExtension f x)}
Helper for Theorem 5.24.1: Corollary 7.5.1 transports directly to the punctured interval Set.Ioo x y by reparameterizing points there with the affine segment coefficient.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_segmentLimit_transport_to_Ioo
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x y : ℝ} (hy : y ∈ scalarEffectiveDomain f) (hxy : x < y) :
Filter.Tendsto (fun z : ℝ => f (scalarPoint z))
(nhdsWithin x (Set.Ioo x y))
(nhds (f (scalarPoint x)))
Helper for Theorem 5.24.1: on a finite domain segment, the EReal secant slope is exactly the coercion of the ordinary real secant quotient.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_finiteSecant_eq_coeReal_on_Ioo
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x y z : ℝ} (hx : x ∈ scalarEffectiveDomain f)
(hy : y ∈ scalarEffectiveDomain f) (_hxy : x < y) (hz : z ∈ Set.Ioo x y) :
(f (scalarPoint y) - f (scalarPoint z)) / (((y - z : ℝ)) : EReal) =
((((f (scalarPoint y)).toReal - (f (scalarPoint z)).toReal) / (y - z) : ℝ) : EReal)
Helper for Theorem 5.24.1: in the left-exterior regime, the fixed-endpoint secant slope from z to a domain point y tends to ⊥ as z ↓ x.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_secantSlope_tendsto_bot_on_Ioo
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x y : ℝ} (hxLeft : IsLeftOfScalarEffectiveDomain f x)
(hy : y ∈ scalarEffectiveDomain f) (hxy : x < y) :
Filter.Tendsto
(fun z : ℝ => (f (scalarPoint y) - f (scalarPoint z)) / (((y - z : ℝ)) : EReal))
(nhdsWithin x (Set.Ioo x y))
(nhds (⊥ : EReal))
Helper for Theorem 5.24.1: the positive-step directional quotient in direction 1 is exactly the scalar secant from x to x + t.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_directionalDifferenceQuotient_dirOne_eq_scalarSecant
(f : (Fin 1 → ℝ) → EReal) (x t : ℝ) :
directionalDifferenceQuotientAt f (scalarPoint x) (scalarPoint 1) t =
(f (scalarPoint (x + t)) - f (scalarPoint x)) / (t : EReal)
Helper for Theorem 5.24.1: at a domain point x, the fixed-endpoint secant slope to a domain point y > x tends to the secant value at x as z ↓ x.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_secantSlope_tendsto_value_on_Ioo
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x y : ℝ} (hx : x ∈ scalarEffectiveDomain f)
(hy : y ∈ scalarEffectiveDomain f) (hxy : x < y) :
Filter.Tendsto
(fun z : ℝ => (f (scalarPoint y) - f (scalarPoint z)) / (((y - z : ℝ)) : EReal))
(nhdsWithin x (Set.Ioo x y))
(nhds ((f (scalarPoint y) - f (scalarPoint x)) / (((y - x : ℝ)) : EReal)))
Helper for Theorem 5.24.1: at a domain point, any lower bound for all strict-right derivative values is already a lower bound for the derivative value at the base point.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_domain_tailLowerBound_le_rightDerivativeAt
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x : ℝ} {u : EReal} (hx : x ∈ scalarEffectiveDomain f)
(hu : ∀ z > x, u ≤ rightDerivativeExtension f z) :
u ≤ rightDerivativeExtension f x
Helper for Theorem 5.24.1: outside the trivial right-exterior case, the value at x is the greatest lower bound of the right tail of rightDerivativeExtension.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_rightDerivativeExtension_Ioi_isGLB
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x : ℝ} (hxNotRight : ¬ IsRightOfScalarEffectiveDomain f x) :
IsGLB ((rightDerivativeExtension f) '' Set.Ioi x) (rightDerivativeExtension f x)
Helper for Theorem 5.24.1: the remaining hard part is the right continuity of the extended right derivative.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_rightDerivativeExtension_rightContinuous
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) (x : ℝ) :
Filter.Tendsto (rightDerivativeExtension f) (nhdsWithin x (Set.Ioi x))
(nhds (rightDerivativeExtension f x))
Helper for Theorem 5.24.1: left continuity of the extended left derivative is obtained by applying right continuity to the reflected function and transporting along t ↦ -t.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_leftDerivativeExtension_leftContinuous
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hReflectedRightCont :
∀ x : ℝ,
Filter.Tendsto (rightDerivativeExtension (fun u => f (-u)))
(nhdsWithin x (Set.Ioi x))
(nhds (rightDerivativeExtension (fun u => f (-u)) x))) :
∀ x : ℝ,
Filter.Tendsto (leftDerivativeExtension f) (nhdsWithin x (Set.Iio x))
(nhds (leftDerivativeExtension f x))
Helper for Theorem 5.24.1: once the two self-continuity statements are known, the remaining cross-limits follow by squeezing with the derivative-order inequalities.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_1_crossLimits_from_selfContinuity
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hRightSelf : ∀ x : ℝ,
Filter.Tendsto (rightDerivativeExtension f) (nhdsWithin x (Set.Ioi x))
(nhds (rightDerivativeExtension f x)))
(hLeftSelf : ∀ x : ℝ,
Filter.Tendsto (leftDerivativeExtension f) (nhdsWithin x (Set.Iio x))
(nhds (leftDerivativeExtension f x)))
(x : ℝ) :
Filter.Tendsto (rightDerivativeExtension f) (nhdsWithin x (Set.Iio x))
(nhds (leftDerivativeExtension f x)) ∧
Filter.Tendsto (leftDerivativeExtension f) (nhdsWithin x (Set.Ioi x))
(nhds (rightDerivativeExtension f x))
Helper for Theorem 5.24.2: evaluating the Euclidean dual vector attached to a on the scalar point b recovers the scalar product a * b.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_2_dotProductEquiv_apply_scalarPoint
(a b : ℝ) :
(((dotProductEquiv ℝ (Fin 1) (scalarPoint a)) (scalarPoint b) : ℝ)) = a * b
Helper for Theorem 5.24.2: every direction in Fin 1 → ℝ is determined by its 0th coordinate, hence equals the corresponding scalar point.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_2_direction_eq_scalarPoint_apply_zero
(y : Fin 1 → ℝ) :
y = scalarPoint (y 0)
Helper for Theorem 5.24.2: every scalar direction is a positive multiple of either 1 or -1, according to the sign choice used later in the proof.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_2_scalarDirection_rewrite
(a : ℝ) :
scalarPoint a = a • scalarPoint 1 ∧ scalarPoint a = (-a) • scalarPoint (-1)
Helper for Theorem 5.24.2: a scalar subgradient at a domain point forces the scalar slope to lie between the left and right derivative extensions.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_2_subgradient_implies_intervalBounds
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x xStar : ℝ} (hx : x ∈ scalarEffectiveDomain f)
(hxStar : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x)) :
leftDerivativeExtension f x ≤ ((xStar : ℝ) : EReal) ∧
(((xStar : ℝ) : EReal) ≤ rightDerivativeExtension f x)
Helper for Theorem 5.24.2: scalar interval bounds imply the directional-derivative minorant required by Theorem 23.2.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_2_intervalBounds_imply_directional_minorant
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x xStar : ℝ} (hx : x ∈ scalarEffectiveDomain f)
(hxStar :
leftDerivativeExtension f x ≤ ((xStar : ℝ) : EReal) ∧
(((xStar : ℝ) : EReal) ≤ rightDerivativeExtension f x)) :
∀ y : Fin 1 → ℝ,
(((dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) y : ℝ) : EReal) ≤
upperDirectionalDerivativeAt f (scalarPoint x) y)§24 — Differential Continuity and Monotonicity — Part 5
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The right-hand profile of an extended-real-valued function on ℝ, computed as the infimum of its values strictly to the right of the base point. For a monotone function, this is the right-hand limit profile.
open scoped ConvexAnalysis
noncomputable def rightLimitProfile (φ : ℝ → EReal) : ℝ → EReal :=
fun x => sInf (φ '' Set.Ioi x)
The left-hand profile of an extended-real-valued function on ℝ, computed as the supremum of its values strictly to the left of the base point. For a monotone function, this is the left-hand limit profile.
open scoped ConvexAnalysis
noncomputable def leftLimitProfile (φ : ℝ → EReal) : ℝ → EReal
Theorem 5.24.3: if f is a closed proper convex function on ℝ and φ satisfies f'_-(x) ≤ φ(x) ≤ f'_+(x) for every x, then φ is nondecreasing, its right and left one-sided profiles agree with f'_+ and f'_-, and consequently ∂ f(x) = {xStar | φ_-(x) ≤ xStar ≤ φ_+(x)} for every x.
open scoped ConvexAnalysis
theorem oneDimensional_selection_between_derivativeExtensions_monotone_profiles_and_subdifferential
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) (φ : ℝ → EReal)
(hφ : ∀ x : ℝ,
leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x) :
Monotone φ ∧
rightLimitProfile φ = rightDerivativeExtension f ∧
leftLimitProfile φ = leftDerivativeExtension f ∧
(∀ x : ℝ,
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x)} =
{xStar : ℝ |
leftLimitProfile φ x ≤ ((xStar : ℝ) : EReal) ∧
(((xStar : ℝ) : EReal) ≤ rightLimitProfile φ x)})
Definition 5.24.4: A complete non-decreasing curve is a subset Γ ⊆ ℝ² of the form Γ = {(x, xStar) | φ_-(x) ≤ xStar ≤ φ_+(x)} for some nondecreasing extended-real function φ : ℝ → EReal, provided the resulting band is nonempty.
open scoped ConvexAnalysis
def IsCompleteNondecreasingCurve (Γ : Set (ℝ × ℝ)) : Prop :=
∃ φ : ℝ → EReal,
Monotone φ ∧
Γ.Nonempty ∧
Γ = {p | leftLimitProfile φ p.1 ≤ (p.2 : EReal) ∧ (p.2 : EReal) ≤ rightLimitProfile φ p.1}
The cyclic successor index on a finite cycle of length m + 1.
open scoped ConvexAnalysis
def cyclicSuccessor {m : ℕ} : Fin (m + 1) → Fin (m + 1) :=
fun i => ⟨(i.1 + 1) % (m + 1), Nat.mod_lt _ (Nat.succ_pos _)⟩
Definition 5.24.5: A multivalued mapping ρ from R^n to R^n is cyclically monotone if, for every finite family of pairs (x_i, x_i*) with x_i* ∈ ρ(x_i), the cyclic sum Σ_i ⟨x_{i+1} - x_i, x_i*⟩, where x_{m+1} = x_0, is nonpositive.
open scoped ConvexAnalysis
def IsCyclicallyMonotone {n : ℕ} (ρ : (Fin n → ℝ) → Set (Fin n → ℝ)) : Prop :=
∀ m : ℕ,
∀ x xStar : Fin (m + 1) → Fin n → ℝ,
(∀ i : Fin (m + 1), xStar i ∈ ρ (x i)) →
Finset.univ.sum (fun i : Fin (m + 1) =>
dotProduct (x (cyclicSuccessor i) - x i) (xStar i)) ≤ 0
-- Proof sketch: for a cyclic family `(x_i, x_i*)` with `x_i* ∈ ∂ f(x_i)`, apply the subgradient
-- inequality at each consecutive pair `(x_i, x_{i+1})`. Summing these inequalities over the cycle
-- telescopes the function values and yields the required nonpositivity of the cyclic sum.
Proposition 5.24.3: If f is a proper convex function on ℝ^n, then, after identifying subgradients with vectors in ℝ^n via dotProductEquiv, its subdifferential mapping is cyclically monotone.
open scoped ConvexAnalysis
theorem properConvexFunctionOn_isCyclicallyMonotone_subdifferential {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) :
IsCyclicallyMonotone
(fun x => ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x))
The graph of a multivalued mapping ρ : ℝ^n ⇉ ℝ^n.
open scoped ConvexAnalysis
def multivaluedMappingGraph {n : ℕ} (ρ : (Fin n → ℝ) → Set (Fin n → ℝ)) :
Set ((Fin n → ℝ) × (Fin n → ℝ)) :=
{p | p.2 ∈ ρ p.1}
Definition 5.24.6: A maximal cyclically monotone mapping is a cyclically monotone mapping whose graph is not properly contained in the graph of any other cyclically monotone mapping.
open scoped ConvexAnalysis
def IsMaximalCyclicallyMonotone {n : ℕ} (ρ : (Fin n → ℝ) → Set (Fin n → ℝ)) : Prop :=
IsCyclicallyMonotone ρ ∧
∀ ⦃σ : (Fin n → ℝ) → Set (Fin n → ℝ)⦄,
IsCyclicallyMonotone σ →
multivaluedMappingGraph ρ ⊆ multivaluedMappingGraph σ →
multivaluedMappingGraph σ = multivaluedMappingGraph ρ
Definition 5.24.7: A multivalued mapping ρ from R^n to R^n is monotone if ⟪x₁ - x₀, x₁* - x₀*⟫ ≥ 0 for every two points (x₀, x₀*) and (x₁, x₁*) in its graph.
open scoped ConvexAnalysis
def IsMonotoneMultivaluedMapping {n : ℕ} (ρ : (Fin n → ℝ) → Set (Fin n → ℝ)) : Prop :=
∀ ⦃x0 x1 x0Star x1Star : Fin n → ℝ⦄,
x0Star ∈ ρ x0 →
x1Star ∈ ρ x1 →
0 ≤ dotProduct (x1 - x0) (x1Star - x0Star)
A maximal monotone multivalued mapping is a monotone mapping whose graph is not properly contained in the graph of any other monotone mapping.
open scoped ConvexAnalysis
def IsMaximalMonotoneMultivaluedMapping {n : ℕ}
(ρ : (Fin n → ℝ) → Set (Fin n → ℝ)) : Prop :=
IsMonotoneMultivaluedMapping ρ ∧
∀ ⦃σ : (Fin n → ℝ) → Set (Fin n → ℝ)⦄,
IsMonotoneMultivaluedMapping σ →
multivaluedMappingGraph ρ ⊆ multivaluedMappingGraph σ →
multivaluedMappingGraph σ = multivaluedMappingGraph ρ
Helper for Theorem 5.24.3: any selector squeezed between the one-sided derivative extensions inherits their monotonicity.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_3_selection_monotone
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(φ : ℝ → EReal)
(hφ : ∀ x : ℝ,
leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x) :
Monotone φ
Helper for Theorem 5.24.3: on the strict right neighborhood of x, the selector converges to f'_+(x) because it is squeezed between f'_- and f'_+.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_3_selector_right_tendsto
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(φ : ℝ → EReal)
(hφ : ∀ x : ℝ,
leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x)
(x : ℝ) :
Filter.Tendsto φ (nhdsWithin x (Set.Ioi x)) (nhds (rightDerivativeExtension f x))
Helper for Theorem 5.24.3: the strict-right profile of the selector is exactly f'_+.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_3_rightLimitProfile_eq_rightDerivativeExtension
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(φ : ℝ → EReal)
(hφ : ∀ x : ℝ,
leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x)
(x : ℝ) :
rightLimitProfile φ x = rightDerivativeExtension f x
Helper for Theorem 5.24.3: on the strict left neighborhood of x, the selector converges to f'_-(x) because it is squeezed between f'_- and f'_+.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_3_selector_left_tendsto
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(φ : ℝ → EReal)
(hφ : ∀ x : ℝ,
leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x)
(x : ℝ) :
Filter.Tendsto φ (nhdsWithin x (Set.Iio x)) (nhds (leftDerivativeExtension f x))
Helper for Theorem 5.24.3: the strict-left profile of the selector is exactly f'_-.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_3_leftLimitProfile_eq_leftDerivativeExtension
(f : (Fin 1 → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(φ : ℝ → EReal)
(hφ : ∀ x : ℝ,
leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x)
(x : ℝ) :
leftLimitProfile φ x = leftDerivativeExtension f x
Helper for Proposition 5.24.3: a vector in the Euclidean preimage of the subdifferential forces the function value at the base point to be finite.
open scoped ConvexAnalysis
lemma helperForProposition_5_24_3_finiteAt_of_mem_preimageSubdifferential {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x v : Fin n → ℝ}
(hv : v ∈ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)) :
f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)
Helper for Proposition 5.24.3: subgradient membership bounds each cycle edge by the corresponding difference of function values.
open scoped ConvexAnalysis
lemma helperForProposition_5_24_3_edgeBound_of_mem_preimageSubdifferential {n : ℕ}
(f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x y v : Fin n → ℝ}
(hv : v ∈ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)) :
(((dotProduct (y - x) v : ℝ) : EReal)) ≤ f y - f x
Helper for Proposition 5.24.3: composing a finite sum with the cyclic successor does not change the sum.
open scoped ConvexAnalysis
lemma helperForProposition_5_24_3_sum_comp_cyclicSuccessor
{m : ℕ} {α : Type*} [AddCommMonoid α] (ψ : Fin (m + 1) → α) :
(∑ i, ψ (cyclicSuccessor i)) = ∑ i, ψ i
Helper for Proposition 5.24.3: the sum of finite cyclic function-value differences telescopes to zero.
open scoped ConvexAnalysis
lemma helperForProposition_5_24_3_sum_finiteDifferences_eq_zero
{n m : ℕ} (f : (Fin n → ℝ) → EReal)
(x : Fin (m + 1) → Fin n → ℝ)
(_hfinite : ∀ i, f (x i) ≠ (⊤ : EReal) ∧ f (x i) ≠ (⊥ : EReal)) :
(∑ i, (((f (x (cyclicSuccessor i))).toReal - (f (x i)).toReal : ℝ))) = 0§24 — Differential Continuity and Monotonicity — Part 6
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Proposition 5.24.4: Every cyclically monotone mapping is in particular a monotone mapping.
open scoped ConvexAnalysis
theorem IsCyclicallyMonotone.isMonotoneMultivaluedMapping {n : ℕ}
{ρ : (Fin n → ℝ) → Set (Fin n → ℝ)} (hρ : IsCyclicallyMonotone ρ) :
IsMonotoneMultivaluedMapping ρ
A subset of ℝ² is coordinatewise totally ordered when any two distinct points in it are comparable for the product partial order.
open scoped ConvexAnalysis
def IsCoordinatewiseTotallyOrdered (Γ : Set (ℝ × ℝ)) : Prop :=
Γ.Pairwise (fun p q => p ≤ q ∨ q ≤ p)
A subset of ℝ² is maximal coordinatewise totally ordered when it is coordinatewise totally ordered and admits no strictly larger coordinatewise totally ordered superset.
open scoped ConvexAnalysis
def IsMaximalCoordinatewiseTotallyOrdered (Γ : Set (ℝ × ℝ)) : Prop :=
IsCoordinatewiseTotallyOrdered Γ ∧
∀ ⦃Δ : Set (ℝ × ℝ)⦄, Γ ⊆ Δ → IsCoordinatewiseTotallyOrdered Δ → Δ = Γ
The lower boundary profile attached to a coordinatewise totally ordered subset Γ ⊆ ℝ², obtained as the supremum of the second coordinates strictly to the left of the base point.
open scoped ConvexAnalysis
noncomputable def maximalCoordinatewiseLowerProfile (Γ : Set (ℝ × ℝ)) : ℝ → EReal :=
fun x =>
sSup {y : EReal | ∃ p ∈ Γ, p.1 < x ∧ y = ((p.2 : ℝ) : EReal)}
The upper boundary profile attached to a coordinatewise totally ordered subset Γ ⊆ ℝ², obtained as the infimum of the second coordinates strictly to the right of the base point.
open scoped ConvexAnalysis
noncomputable def maximalCoordinatewiseUpperProfile (Γ : Set (ℝ × ℝ)) : ℝ → EReal :=
fun x =>
sInf {y : EReal | ∃ p ∈ Γ, x < p.1 ∧ y = ((p.2 : ℝ) : EReal)}
The lower boundary profile of a coordinatewise chain is monotone.
open scoped ConvexAnalysis
lemma maximalCoordinatewiseLowerProfile_monotone
{Γ : Set (ℝ × ℝ)} :
Monotone (maximalCoordinatewiseLowerProfile Γ)
If a monotone profile never takes finite values, then every value is either ⊤ or ⊥.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_allValues_top_or_bot_of_no_finiteWitness
(φ : ℝ → EReal)
(hNoFinite : ¬ ∃ x : ℝ, φ x ≠ (⊤ : EReal) ∧ φ x ≠ (⊥ : EReal)) :
∀ x : ℝ, φ x = (⊤ : EReal) ∨ φ x = (⊥ : EReal)
A nonempty complete-curve band coming from a monotone profile with no finite values is a single vertical line.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_band_eq_verticalLine_of_no_finiteWitness
(Γ : Set (ℝ × ℝ)) (φ : ℝ → EReal) (hmono : Monotone φ)
(hNoFinite : ¬ ∃ x : ℝ, φ x ≠ (⊤ : EReal) ∧ φ x ≠ (⊥ : EReal))
(hΓnonempty : Γ.Nonempty)
(hΓdef :
Γ = {p : ℝ × ℝ |
leftLimitProfile φ p.1 ≤ (p.2 : EReal) ∧
(p.2 : EReal) ≤ rightLimitProfile φ p.1}) :
∃ a : ℝ, Γ = {p : ℝ × ℝ | p.1 = a}
For a monotone profile, the value at x always lies between the left and right limit profiles.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_leftLimitProfile_le_value_le_rightLimitProfile
(φ : ℝ → EReal) (hmono : Monotone φ) (x : ℝ) :
leftLimitProfile φ x ≤ φ x ∧ φ x ≤ rightLimitProfile φ x
A finite value of a monotone profile gives a real graph point on the associated band.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_mem_band_of_finite_value
(φ : ℝ → EReal) (hmono : Monotone φ) {x : ℝ}
(hxTop : φ x ≠ (⊤ : EReal)) (hxBot : φ x ≠ (⊥ : EReal)) :
(x, (φ x).toReal) ∈ {p : ℝ × ℝ |
leftLimitProfile φ p.1 ≤ (p.2 : EReal) ∧
(p.2 : EReal) ≤ rightLimitProfile φ p.1}
A vertical line is a maximal coordinatewise totally ordered subset of ℝ².
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_verticalLine_isMaximalCoordinatewiseTotallyOrdered
(a : ℝ) :
IsMaximalCoordinatewiseTotallyOrdered {p : ℝ × ℝ | p.1 = a}
If β is the left boundary of the ⊤-region of a monotone profile, then every point to the right of β already has value ⊤.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_eq_top_of_lt_sInf_topRegion
(φ : ℝ → EReal) (hmono : Monotone φ) {β z : ℝ}
(hz : β < z)
(hβ :
β = sInf {t : ℝ | φ t = (⊤ : EReal)})
(hTopBddBelow : BddBelow ({t : ℝ | φ t = (⊤ : EReal)} : Set ℝ))
(hTopNonempty : ({t : ℝ | φ t = (⊤ : EReal)} : Set ℝ).Nonempty) :
φ z = (⊤ : EReal)
If α is the right boundary of the ⊥-region of a monotone profile, then every point to the left of α already has value ⊥.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_eq_bot_of_lt_sSup_botRegion
(φ : ℝ → EReal) (hmono : Monotone φ) {α z : ℝ}
(hz : z < α)
(hα :
α = sSup {t : ℝ | φ t = (⊥ : EReal)})
(hBotBddAbove : BddAbove ({t : ℝ | φ t = (⊥ : EReal)} : Set ℝ))
(hBotNonempty : ({t : ℝ | φ t = (⊥ : EReal)} : Set ℝ).Nonempty) :
φ z = (⊥ : EReal)
The band between the left and right limit profiles of a monotone scalar function is coordinatewise totally ordered.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_band_isCoordinatewiseTotallyOrdered
(φ : ℝ → EReal) (hmono : Monotone φ) :
IsCoordinatewiseTotallyOrdered
{p : ℝ × ℝ |
leftLimitProfile φ p.1 ≤ (p.2 : EReal) ∧
(p.2 : EReal) ≤ rightLimitProfile φ p.1}
A maximal coordinatewise totally ordered subset of ℝ² is a complete non-decreasing curve.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_completeCurve_of_maximalCoordinatewiseTotallyOrdered
(Γ : Set (ℝ × ℝ))
(hΓMax : IsMaximalCoordinatewiseTotallyOrdered Γ) :
IsCompleteNondecreasingCurve Γ
Remark 5.24.3: a subset Γ ⊆ ℝ² is a complete non-decreasing curve if and only if it is a maximal totally ordered subset of ℝ² with respect to the coordinatewise partial ordering.
open scoped ConvexAnalysis
theorem isCompleteNondecreasingCurve_iff_isMaximalCoordinatewiseTotallyOrdered
(Γ : Set (ℝ × ℝ)) :
IsCompleteNondecreasingCurve Γ ↔ IsMaximalCoordinatewiseTotallyOrdered Γ
The sum-coordinate parameter map T(x, xStar) = x + xStar on a subset of ℝ².
open scoped ConvexAnalysis
def completeNondecreasingCurveSumMap (Γ : Set (ℝ × ℝ)) : Γ → ℝ :=
fun p => p.1.1 + p.1.2
On a coordinatewise ordered pair, equality of the sum coordinate forces equality of the point.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_eq_of_le_and_sumEq
{p q : ℝ × ℝ} (hpq : p ≤ q) (hsum : p.1 + p.2 = q.1 + q.2) :
p = q
The sum map is injective on any coordinatewise totally ordered subset of ℝ².
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_sumMap_injective
{Γ : Set (ℝ × ℝ)} (hordered : IsCoordinatewiseTotallyOrdered Γ) :
Function.Injective (completeNondecreasingCurveSumMap Γ)
The sum map on a subtype of ℝ² is continuous.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_sumMap_continuous
(Γ : Set (ℝ × ℝ)) :
Continuous (completeNondecreasingCurveSumMap Γ)
Along a coordinatewise chain, if two points have nearly equal sums, then both coordinates are nearly equal as well. This is the local rigidity behind continuity of the inverse sum map.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_abs_coordDiff_lt_of_abs_sumDiff_lt
{Γ : Set (ℝ × ℝ)} (hordered : IsCoordinatewiseTotallyOrdered Γ)
{p q : Γ} {ε : ℝ}
(hε : |completeNondecreasingCurveSumMap Γ q - completeNondecreasingCurveSumMap Γ p| < ε) :
The first-coordinate projection I = {x | ∃ xStar, (x, xStar) ∈ Γ} of a curve Γ ⊆ ℝ².
open scoped ConvexAnalysis
def completeNondecreasingCurveProjection (Γ : Set (ℝ × ℝ)) : Set ℝ :=
{x | ∃ xStar : ℝ, (x, xStar) ∈ Γ}
A graph-like description of a subset Γ ⊆ ℝ² over its first-coordinate projection, allowing vertical segments through the gap between monotone one-sided boundary profiles and horizontal segments coming from flat portions of those profiles.
open scoped ConvexAnalysis
def GraphLikeWithVerticalHorizontalSegments (Γ : Set (ℝ × ℝ)) : Prop :=
∃ I : Set ℝ,
I = completeNondecreasingCurveProjection Γ ∧
∃ φ : ℝ → EReal,
Monotone φ ∧
Γ.Nonempty ∧
Γ = {p : ℝ × ℝ |
p.1 ∈ I ∧
leftLimitProfile φ p.1 ≤ (p.2 : EReal) ∧
(p.2 : EReal) ≤ rightLimitProfile φ p.1}
On a vertical line over a, the sum map is the obvious affine homeomorphism to ℝ.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_3_verticalLine_sumMap_homeomorph
(a : ℝ) :
∃ e : {p : ℝ × ℝ | p.1 = a} ≃ₜ ℝ,
∀ p : {p : ℝ × ℝ | p.1 = a},
e p = completeNondecreasingCurveSumMap {p : ℝ × ℝ | p.1 = a} p
Proposition 5.24.1: if Γ is a complete non-decreasing curve in ℝ², then it is graph-like with possible horizontal and vertical segments, and the map T(x, xStar) = x + xStar identifies Γ homeomorphically with ℝ.
open scoped ConvexAnalysis
theorem completeNondecreasingCurve_sumMap_homeomorph
{Γ : Set (ℝ × ℝ)} (hΓ : IsCompleteNondecreasingCurve Γ) :
GraphLikeWithVerticalHorizontalSegments Γ ∧
∃ e : Γ ≃ₜ ℝ,
∀ p : Γ, e p = completeNondecreasingCurveSumMap Γ p
The scalar interval-integral primitive x ↦ ∫_a^x φ(t) dt, recorded as an EReal-valued function on ℝ.
open scoped ConvexAnalysis
noncomputable def oneDimensionalIntervalIntegralPrimitiveValue (φ : ℝ → EReal) (a : ℝ) :
ℝ → EReal :=
fun x =>
if _hFiniteOpen : ∀ t ∈ Set.uIoo a x, φ t ≠ (⊤ : EReal) ∧ φ t ≠ (⊥ : EReal) then
if _hInt : IntervalIntegrable (fun t : ℝ => (φ t).toReal) MeasureTheory.volume a x then
(((∫ t in a..x, (φ t).toReal) : ℝ) : EReal)
else
(⊤ : EReal)
else
(⊤ : EReal)
The interval-integral primitive on ℝ, viewed as a function on Fin 1 → ℝ via the unique coordinate.
open scoped ConvexAnalysis
noncomputable def oneDimensionalIntervalIntegralPrimitive (φ : ℝ → EReal) (a : ℝ) :
(Fin 1 → ℝ) → EReal :=
fun x => oneDimensionalIntervalIntegralPrimitiveValue φ a (x 0)
The scalar base point always belongs to the effective domain of the interval-integral primitive because the primitive is normalized there.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_scalarBasePoint_mem_scalarEffectiveDomain
(φ : ℝ → EReal) (a : ℝ) :
a ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)
The scalar points where the monotone profile φ takes a genuine real value.
open scoped ConvexAnalysis
def oneDimensionalPrimitiveFiniteValueSet (φ : ℝ → EReal) : Set ℝ :=
{x : ℝ | φ x ≠ (⊤ : EReal) ∧ φ x ≠ (⊥ : EReal)}
For a monotone profile, every point between two finite-valued points is again finite-valued.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_finiteValueSet_mem_between
(φ : ℝ → EReal) (hmono : Monotone φ) {x y z : ℝ}
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hy : y ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hz : z ∈ Set.uIcc x y) :
z ∈ oneDimensionalPrimitiveFiniteValueSet φ
The finite-valued interval of a monotone profile is convex.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_finiteValueSet_convex
(φ : ℝ → EReal) (hmono : Monotone φ) :
Convex ℝ (oneDimensionalPrimitiveFiniteValueSet φ)
If two endpoints are finite-valued, then every strict intermediate point is finite-valued.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_finite_on_open_interval_of_finite_endpoints
(φ : ℝ → EReal) (hmono : Monotone φ) {x y : ℝ}
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hy : y ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
∀ t ∈ Set.uIoo x y, t ∈ oneDimensionalPrimitiveFiniteValueSet φ
On a finite-valued unordered interval, φ.toReal is monotone.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_toReal_monotoneOn_uIcc_of_finite_endpoints
(φ : ℝ → EReal) (hmono : Monotone φ) {x y : ℝ}
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hy : y ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
MonotoneOn (fun t : ℝ => (φ t).toReal) (Set.uIcc x y)
If the endpoints are finite-valued, the primitive is the genuine real interval integral.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_eq_integral_of_finite_endpoints
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
oneDimensionalIntervalIntegralPrimitiveValue φ a x =
(((∫ t in a..x, (φ t).toReal) : ℝ) : EReal)
On any scalar interval whose endpoints are finite for the monotone profile, the interval integral primitive is continuous.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_continuousOn_uIcc_of_finite_endpoints
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
ContinuousOn (oneDimensionalIntervalIntegralPrimitiveValue φ a) (Set.uIcc a x)
A scalar effective-domain point of the interval-integral primitive automatically carries the two hidden ingredients in the definition: finiteness of the open interval profile and interval integrability of φ.toReal.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_openFinite_and_intervalIntegrable_of_mem_scalarEffectiveDomain
(φ : ℝ → EReal) (a x : ℝ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)) :
(∀ t ∈ Set.uIoo a x, φ t ≠ (⊤ : EReal) ∧ φ t ≠ (⊥ : EReal)) ∧
IntervalIntegrable (fun t : ℝ => (φ t).toReal) MeasureTheory.volume a x
On any scalar effective-domain point, the interval-integral primitive is exactly the real interval integral encoded into EReal.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_eq_integral_of_mem_scalarEffectiveDomain
(φ : ℝ → EReal) (a x : ℝ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)) :
oneDimensionalIntervalIntegralPrimitiveValue φ a x =
(((∫ t in a..x, (φ t).toReal) : ℝ) : EReal)
Any strict point between two scalar effective-domain points of the primitive carries a finite profile value. This is the interval J from the proof of Theorem 5.24.4.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_finite_profile_on_open_interval_of_domain_points
(φ : ℝ → EReal) (a x y t : ℝ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyDom : y ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(ht : t ∈ Set.uIoo x y) :
t ∈ oneDimensionalPrimitiveFiniteValueSet φ
Two scalar effective-domain points of the primitive bound an interval on which φ.toReal is interval-integrable.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_intervalIntegrable_toReal_of_domain_points
(φ : ℝ → EReal) (a x y : ℝ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyDom : y ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)) :
IntervalIntegrable (fun t : ℝ => (φ t).toReal) MeasureTheory.volume x y
Between two scalar effective-domain points, the primitive increment is exactly the interval integral of φ.toReal, even if one of the endpoints lies on the boundary of the finite interval J.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_sub_eq_integral_of_domain_points
(φ : ℝ → EReal) (a x y : ℝ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyDom : y ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)) :
oneDimensionalIntervalIntegralPrimitiveValue φ a y -
oneDimensionalIntervalIntegralPrimitiveValue φ a x =
(((∫ t in x..y, (φ t).toReal) : ℝ) : EReal)
On a domain segment (x, z) whose interior points are finite and whose right endpoint carries a finite profile value, the interval integral is bounded above by the right endpoint profile.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_integral_le_profile_mul_sub_of_domain_lt
(φ : ℝ → EReal) (a x z : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hzDom : z ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hzFinite : z ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxz : x < z) :
(((∫ t in x..z, (φ t).toReal) : ℝ) : EReal) ≤
((((z - x) * (φ z).toReal : ℝ) : EReal))
On a domain segment (z, y) whose interior points are finite and whose left endpoint carries a finite profile value, the interval integral dominates the left endpoint profile.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_profile_mul_sub_le_integral_of_domain_lt
(φ : ℝ → EReal) (a z y : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hzDom : z ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyDom : y ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hzFinite : z ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hzy : z < y) :
((((y - z) * (φ z).toReal : ℝ) : EReal)) ≤
(((∫ t in z..y, (φ t).toReal) : ℝ) : EReal)
Helper for Proposition 5.24.4: the m = 1 case of cyclic monotonicity is exactly the two-point cross-term inequality used in the monotonicity proof.
open scoped ConvexAnalysis
lemma helperForProposition_5_24_4_twoPointCycle_rawInequality {n : ℕ}
{ρ : (Fin n → ℝ) → Set (Fin n → ℝ)} (hρ : IsCyclicallyMonotone ρ)
{x0 x1 x0Star x1Star : Fin n → ℝ}
(hx0Star : x0Star ∈ ρ x0) (hx1Star : x1Star ∈ ρ x1) :
dotProduct x1 x0Star + dotProduct x0 x1Star ≤ dotProduct x0 x0Star + dotProduct x1 x1Star
Helper for Proposition 5.24.4: the raw two-point cycle inequality rearranges to the standard monotonicity inequality.
open scoped ConvexAnalysis
lemma helperForProposition_5_24_4_rearrange_rawCycle_to_monotone {n : ℕ}
{x0 x1 x0Star x1Star : Fin n → ℝ}
(hraw :
dotProduct x1 x0Star + dotProduct x0 x1Star ≤
dotProduct x0 x0Star + dotProduct x1 x1Star) :
0 ≤ dotProduct (x1 - x0) (x1Star - x0Star)
Helper for Theorem 5.24.4: evaluating the lifted primitive at a scalar point simply unwraps the unique Fin 1 coordinate.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_scalarPoint_primitive_eval
(φ : ℝ → EReal) (a x : ℝ) :
oneDimensionalIntervalIntegralPrimitive φ a (scalarPoint x) =
oneDimensionalIntervalIntegralPrimitiveValue φ a x
Helper for Theorem 5.24.4: the scalar interval-integral primitive is normalized at its base point.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_at_base
(φ : ℝ → EReal) (a : ℝ) :
oneDimensionalIntervalIntegralPrimitiveValue φ a a = 0
Helper for Theorem 5.24.4: the lifted primitive also vanishes at the scalar base point.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitive_at_scalarBasePoint
(φ : ℝ → EReal) (a : ℝ) :
oneDimensionalIntervalIntegralPrimitive φ a (scalarPoint a) = 0
Helper for Theorem 5.24.4: the scalar interval-integral primitive never takes the value -∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_ne_bot
(φ : ℝ → EReal) (a x : ℝ) :
oneDimensionalIntervalIntegralPrimitiveValue φ a x ≠ (⊥ : EReal)
Helper for Theorem 5.24.4: the lifted interval-integral primitive also never takes the value -∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitive_ne_bot
(φ : ℝ → EReal) (a : ℝ) (x : Fin 1 → ℝ) :
oneDimensionalIntervalIntegralPrimitive φ a x ≠ (⊥ : EReal)
Helper for Theorem 5.24.4: once convexity of the interval-integral primitive is established, properness is automatic because the base point lies in the epigraph and the primitive never attains -∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_intervalIntegralPrimitive_proper_of_convex
(φ : ℝ → EReal) (a : ℝ)
(hconv : ConvexFunction (oneDimensionalIntervalIntegralPrimitive φ a)) :
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ))
(oneDimensionalIntervalIntegralPrimitive φ a)
Helper for Theorem 5.24.4: closedness of the interval-integral primitive already gives the properness package needed later.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_intervalIntegralPrimitive_proper_of_closed
(φ : ℝ → EReal) (a : ℝ)
(hclosed : ClosedConvexFunction (oneDimensionalIntervalIntegralPrimitive φ a)) :
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ))
(oneDimensionalIntervalIntegralPrimitive φ a)§24 — Differential Continuity and Monotonicity — Part 7
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
If both scalar endpoints are finite-valued, the primitive increment between them is the interval integral of the profile.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_sub_eq_integral_of_finite_endpoints
(φ : ℝ → EReal) (a x y : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hy : y ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
oneDimensionalIntervalIntegralPrimitiveValue φ a y -
oneDimensionalIntervalIntegralPrimitiveValue φ a x =
(((∫ t in x..y, (φ t).toReal) : ℝ) : EReal)
On a finite-valued interval, the primitive increment dominates the left endpoint profile.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_profile_mul_sub_le_primitiveIncrement_of_finite_lt
(φ : ℝ → EReal) (x y : ℝ) (hmono : Monotone φ)
(hxy : x < y)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hy : y ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
((((y - x) * (φ x).toReal : ℝ) : EReal)) ≤
oneDimensionalIntervalIntegralPrimitiveValue φ x y
On a finite-valued interval, the primitive increment is bounded above by the right endpoint profile times the interval length.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveIncrement_le_profile_mul_sub_of_finite_lt
(φ : ℝ → EReal) (x y : ℝ) (hmono : Monotone φ)
(hxy : x < y)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hy : y ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
oneDimensionalIntervalIntegralPrimitiveValue φ x y ≤
((((y - x) * (φ y).toReal : ℝ) : EReal))
At a finite-valued base point, every positive finite step produces a right difference quotient bounded below by the left endpoint profile.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_profile_le_rightDifferenceQuotient_of_positive_finite_step
(φ : ℝ → EReal) (a x t : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(ht : 0 < t)
(hxt : x + t ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
(((φ x).toReal : ℝ) : EReal) ≤
directionalDifferenceQuotientAt (oneDimensionalIntervalIntegralPrimitive φ a)
(scalarPoint x) (scalarPoint 1) t
At a finite-valued base point, every positive finite step produces a right difference quotient bounded above by the right endpoint profile.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_rightDifferenceQuotient_le_profile_of_positive_finite_step
(φ : ℝ → EReal) (a x t : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(ht : 0 < t)
(hxt : x + t ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
directionalDifferenceQuotientAt (oneDimensionalIntervalIntegralPrimitive φ a)
(scalarPoint x) (scalarPoint 1) t ≤
(((φ (x + t)).toReal : ℝ) : EReal)
On the finite-valued interval of a monotone profile, the interval-integral primitive satisfies the convex-combination inequality from the proof of Theorem 5.24.4.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_convexCombo_of_finite_lt
(φ : ℝ → EReal) (a x y θ : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxy : x < y)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hy : y ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) :
let z := (1 - θ) * x + θ * y
oneDimensionalIntervalIntegralPrimitiveValue φ a z ≤
((1 - θ : ℝ) : EReal) * oneDimensionalIntervalIntegralPrimitiveValue φ a x +
((θ : ℝ) : EReal) * oneDimensionalIntervalIntegralPrimitiveValue φ a y
The same convex-combination inequality also covers the degenerate endpoint case x = y.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_convexCombo_of_finite_le
(φ : ℝ → EReal) (a x y θ : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxy : x ≤ y)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hy : y ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) :
let z := (1 - θ) * x + θ * y
oneDimensionalIntervalIntegralPrimitiveValue φ a z ≤
((1 - θ : ℝ) : EReal) * oneDimensionalIntervalIntegralPrimitiveValue φ a x +
((θ : ℝ) : EReal) * oneDimensionalIntervalIntegralPrimitiveValue φ a y§24 — Differential Continuity and Monotonicity — Part 8
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
A finite profile value gives a domain point of the interval-integral primitive.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_mem_scalarEffectiveDomain_of_finite_profile
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)
The scalar effective domain of the interval-integral primitive is a convex interval. This is the formal replacement for the interval J in the textbook proof of Theorem 5.24.4.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_scalarEffectiveDomain_convex_intervalIntegralPrimitive
(φ : ℝ → EReal) (a : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
Convex ℝ (scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
On any scalar domain segment joining the base point a to another effective-domain point, the interval-integral primitive is continuous. This is the anchored continuity statement needed for the remaining closedness argument.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_continuousOn_uIcc_of_mem_scalarEffectiveDomain
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)) :
ContinuousOn (oneDimensionalIntervalIntegralPrimitiveValue φ a) (Set.uIcc a x)
More generally, between any two scalar effective-domain points of the primitive, the primitive is continuous on the whole unordered closed interval joining them.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_continuousOn_uIcc_of_domain_points
(φ : ℝ → EReal) (a x y : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyDom : y ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)) :
ContinuousOn (oneDimensionalIntervalIntegralPrimitiveValue φ a) (Set.uIcc x y)
If a scalar domain point is bracketed by domain points on both sides, the primitive is continuous there. This packages the interior continuity needed later for the closedness proof.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_continuousAt_of_domain_points_straddling
(φ : ℝ → EReal) (a x y z : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hyDom : y ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hzDom : z ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyx : y < x) (hxz : x < z) :
ContinuousAt (oneDimensionalIntervalIntegralPrimitiveValue φ a) x
At a scalar domain point with no domain points strictly to the right, continuity on a left domain segment gives lower semicontinuity from the left.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_lowerSemicontinuousWithinAt_left_of_rightEndpoint
(φ : ℝ → EReal) (a x y : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hyDom : y ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyx : y < x) :
LowerSemicontinuousWithinAt (oneDimensionalIntervalIntegralPrimitiveValue φ a) (Set.Iic x) x
The right-sided analogue of the previous lemma.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_lowerSemicontinuousWithinAt_right_of_leftEndpoint
(φ : ℝ → EReal) (a x y : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyDom : y ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hxy : x < y) :
LowerSemicontinuousWithinAt (oneDimensionalIntervalIntegralPrimitiveValue φ a) (Set.Ici x) x
Any point outside the scalar effective domain of the primitive must already lie strictly to one side of the whole interval J; there are no interior gaps because the domain is convex and contains the base point a.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_off_scalarEffectiveDomain_is_exterior
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxOff : x ∉ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)) :
IsRightOfScalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a) x ∨
IsLeftOfScalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a) x
Outside the scalar effective domain, the primitive can only take the value +∞, since it never takes the value -∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitive_eq_top_of_not_mem_scalarEffectiveDomain
(φ : ℝ → EReal) (a x : ℝ)
(hxOff : x ∉ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)) :
oneDimensionalIntervalIntegralPrimitive φ a (scalarPoint x) = (⊤ : EReal)
Every scalar effective-domain point of the primitive is a lower-semicontinuity point. The only input beyond the interval-integral formulas is that outside the scalar domain the primitive equals ⊤, so missing one-sided domain points cause no lower-semicontinuity loss.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_lowerSemicontinuousAt_of_mem_scalarEffectiveDomain
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)) :
LowerSemicontinuousAt (oneDimensionalIntervalIntegralPrimitiveValue φ a) x
If the monotone profile takes the value +∞ at a scalar domain point, then no larger scalar point can remain in the primitive's effective domain.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_no_domain_point_to_right_of_top_profile
(φ : ℝ → EReal) (a x y : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hxy : x < y) (hxTop : φ x = (⊤ : EReal)) :
y ∉ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)
If the monotone profile takes the value -∞ at a scalar domain point, then no smaller scalar point can remain in the primitive's effective domain.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_no_domain_point_to_left_of_bot_profile
(φ : ℝ → EReal) (a x y : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyx : y < x) (hxBot : φ x = (⊥ : EReal)) :
y ∉ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)
On the scalar effective-domain interval J, the primitive satisfies the same convex combination inequality as in the textbook proof, even when the endpoints lie on the boundary of J.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_convexCombo_of_domain_lt
(φ : ℝ → EReal) (a x y θ : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxy : x < y)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyDom : y ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) :
let z := (1 - θ) * x + θ * y
oneDimensionalIntervalIntegralPrimitiveValue φ a z ≤
((1 - θ : ℝ) : EReal) * oneDimensionalIntervalIntegralPrimitiveValue φ a x +
((θ : ℝ) : EReal) * oneDimensionalIntervalIntegralPrimitiveValue φ a y
The domain-endpoint convex-combination inequality also covers the degenerate case x = y.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_convexCombo_of_domain_le
(φ : ℝ → EReal) (a x y θ : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxy : x ≤ y)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hyDom : y ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hθ0 : 0 ≤ θ) (hθ1 : θ ≤ 1) :
let z := (1 - θ) * x + θ * y
oneDimensionalIntervalIntegralPrimitiveValue φ a z ≤
((1 - θ : ℝ) : EReal) * oneDimensionalIntervalIntegralPrimitiveValue φ a x +
((θ : ℝ) : EReal) * oneDimensionalIntervalIntegralPrimitiveValue φ a y
To the strict right of the primitive's domain, the monotone profile has already jumped to +∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_profile_eq_top_of_rightOfPrimitiveDomain
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxRight : IsRightOfScalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a) x) :
φ x = (⊤ : EReal)
To the strict left of the primitive's domain, the monotone profile has already fallen to -∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_profile_eq_bot_of_leftOfPrimitiveDomain
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxLeft : IsLeftOfScalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a) x) :
φ x = (⊥ : EReal)
On the two scalar exterior regions, the derivative-band statement is already forced by the definition of the derivative extensions together with the monotone profile's jump to ±∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_scalarBand_on_primitive_exterior
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
let f : (Fin 1 → ℝ) → EReal := oneDimensionalIntervalIntegralPrimitive φ a
(IsRightOfScalarEffectiveDomain f x ∨ IsLeftOfScalarEffectiveDomain f x) →
(leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x)
To prove the scalar derivative-band statement for the interval-integral primitive, it is enough to prove it on the scalar effective domain J; the exterior cases are already handled by the profile jumping to ±∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_scalarBand_of_domain_band
(φ : ℝ → EReal) (a : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
let f : (Fin 1 → ℝ) → EReal := oneDimensionalIntervalIntegralPrimitive φ a
(∀ x ∈ scalarEffectiveDomain f,
leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x) →
∀ x : ℝ, leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x
Helper for Theorem 5.24.4: a monotone profile always lies between its left and right one-sided limit profiles.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_monotone_profile_between_its_one_sided_limits
(φ : ℝ → EReal) (hmono : Monotone φ) :
∀ x : ℝ, leftLimitProfile φ x ≤ φ x ∧ φ x ≤ rightLimitProfile φ x§24 — Differential Continuity and Monotonicity — Part 9
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
On the scalar effective-domain interval J, a finite profile value is a lower bound for the extended right derivative of the primitive. This is the right-hand half of the textbook band argument.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_profile_le_rightDerivative_on_domain_of_finite_profile
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
(((φ x).toReal : ℝ) : EReal) ≤
rightDerivativeExtension (oneDimensionalIntervalIntegralPrimitive φ a) x
On the scalar effective-domain interval J, a finite profile value also dominates the extended left derivative of the primitive. This is the left-hand half of the textbook band argument.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_leftDerivative_le_profile_on_domain_of_finite_profile
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hx : x ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
leftDerivativeExtension (oneDimensionalIntervalIntegralPrimitive φ a) x ≤
(((φ x).toReal : ℝ) : EReal)
At a scalar domain point where the profile already equals +∞, the primitive has no domain points to the right, so every positive-step secant slope is +∞ and hence the extended right derivative is also +∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_rightDerivative_eq_top_on_domain_of_top_profile
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hxTop : φ x = (⊤ : EReal)) :
rightDerivativeExtension (oneDimensionalIntervalIntegralPrimitive φ a) x = (⊤ : EReal)
At a scalar domain point where the profile already equals -∞, the primitive has no domain points to the left, so every positive-step quotient in direction -1 is +∞; negating gives an extended left derivative equal to -∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_leftDerivative_eq_bot_on_domain_of_bot_profile
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a))
(hxBot : φ x = (⊥ : EReal)) :
leftDerivativeExtension (oneDimensionalIntervalIntegralPrimitive φ a) x = (⊥ : EReal)
The full derivative band on the scalar effective domain J: finite profile values are handled by the integral secant estimates, while ±∞ profile values force the corresponding endpoint derivatives to be ±∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_scalarBand_on_scalarEffectiveDomain
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxDom : x ∈ scalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a)) :
leftDerivativeExtension (oneDimensionalIntervalIntegralPrimitive φ a) x ≤ φ x ∧
φ x ≤ rightDerivativeExtension (oneDimensionalIntervalIntegralPrimitive φ a) x
A point strictly to the right of the scalar effective domain is still a lower-semicontinuity point of the primitive. Away from the actual right endpoint this is immediate because a whole left neighborhood already lies outside the domain. At the endpoint itself, failure of lower semicontinuity would produce bounded primitive values along a sequence approaching from the left; shifting by the finite anchor value φ(a) turns the integrand nonnegative, and the bounded improper integrals then force integrability up to x, contradicting that x lies strictly right of the domain.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_lowerSemicontinuousAt_of_rightOfScalarEffectiveDomain
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxRight : IsRightOfScalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a) x) :
LowerSemicontinuousAt (oneDimensionalIntervalIntegralPrimitiveValue φ a) x
The left-exterior case is the mirror image of the previous lemma: if a point lies strictly to the left of the scalar effective domain, then bounded primitive values approaching from the right would force the primitive-defining integral to extend up to that point, contradicting exteriority.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_primitiveValue_lowerSemicontinuousAt_of_leftOfScalarEffectiveDomain
(φ : ℝ → EReal) (a x : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ)
(hxLeft : IsLeftOfScalarEffectiveDomain (oneDimensionalIntervalIntegralPrimitive φ a) x) :
LowerSemicontinuousAt (oneDimensionalIntervalIntegralPrimitiveValue φ a) x
Helper for Theorem 5.24.4: the interval-integral primitive is convex. This is the formal version of the textbook argument on the finite interval J, extended trivially to exterior points where the primitive equals +∞.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_intervalIntegralPrimitive_convex
(φ : ℝ → EReal) (a : ℝ) (hmono : Monotone φ)
(ha : a ∈ oneDimensionalPrimitiveFiniteValueSet φ) :
ConvexFunction (oneDimensionalIntervalIntegralPrimitive φ a)§24 — Differential Continuity and Monotonicity — Part 10
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Remark 5.24.5: When n > 1, there exist monotone mappings that are not cyclically monotone. A linear example illustrates the distinction.
open scoped ConvexAnalysis
theorem exists_monotone_not_cyclicallyMonotone_of_one_lt
{n : ℕ} (hn : 1 < n) :
∃ ρ : (Fin n → ℝ) → Set (Fin n → ℝ),
IsMonotoneMultivaluedMapping ρ ∧ ¬ IsCyclicallyMonotone ρ
Helper for Theorem 5.24.4: once the scalar interval-integral primitive is genuinely constructed, it should first produce a normalized closed proper convex function whose scalar derivative band contains φ.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_4_intervalIntegralPrimitive_closed_normalized_scalarBand
(φ : ℝ → EReal) (a : ℝ) (hmono : Monotone φ)
(ha_finite : φ a ≠ (⊤ : EReal) ∧ φ a ≠ (⊥ : EReal)) :
let f : (Fin 1 → ℝ) → EReal := oneDimensionalIntervalIntegralPrimitive φ a
ClosedConvexFunction f ∧
f (scalarPoint a) = 0 ∧
(∀ x : ℝ, leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x)
Helper for Remark 5.24.5: the quarter-turn on R^2 used for the linear counterexample.
open scoped ConvexAnalysis
def helperForRemark_5_24_5_quarterTurn : (Fin 2 → ℝ) → (Fin 2 → ℝ) :=
fun x => ![-x 1, x 0]
Helper for Remark 5.24.5: the singleton-valued mapping generated by the quarter-turn.
open scoped ConvexAnalysis
def helperForRemark_5_24_5_quarterTurnMapping : (Fin 2 → ℝ) → Set (Fin 2 → ℝ) :=
fun x => {helperForRemark_5_24_5_quarterTurn x}
Helper for Remark 5.24.5: the planar quarter-turn is additive. This records the linear structure behind the textbook counterexample.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_quarterTurn_add
(x y : Fin 2 → ℝ) :
helperForRemark_5_24_5_quarterTurn (x + y) =
helperForRemark_5_24_5_quarterTurn x + helperForRemark_5_24_5_quarterTurn y
Helper for Remark 5.24.5: the planar quarter-turn commutes with scalar multiplication.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_quarterTurn_smul
(c : ℝ) (x : Fin 2 → ℝ) :
helperForRemark_5_24_5_quarterTurn (c • x) =
c • helperForRemark_5_24_5_quarterTurn x
Helper for Remark 5.24.5: the quarter-turn packaged as a linear map on R^2.
open scoped ConvexAnalysis
def helperForRemark_5_24_5_quarterTurnLinearMap : (Fin 2 → ℝ) →ₗ[ℝ] (Fin 2 → ℝ) :=
{ toFun := helperForRemark_5_24_5_quarterTurn
map_add' := helperForRemark_5_24_5_quarterTurn_add
map_smul' := helperForRemark_5_24_5_quarterTurn_smul }
Helper for Remark 5.24.5: the quarter-turn is skew with respect to the Euclidean dot product, so every vector is orthogonal to its image.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_dotProduct_self_quarterTurn
(x : Fin 2 → ℝ) :
dotProduct x (helperForRemark_5_24_5_quarterTurn x) = 0
Helper for Remark 5.24.5: the singleton-valued quarter-turn mapping is monotone, because the dot product of any increment with its rotated increment vanishes.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_quarterTurnMapping_monotone :
IsMonotoneMultivaluedMapping helperForRemark_5_24_5_quarterTurnMapping
Helper for Remark 5.24.5: the quarter-turn mapping fails cyclic monotonicity on the triangle with vertices (1,0), (0,1), and (0,0).
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_quarterTurnMapping_not_cyclicallyMonotone :
¬ IsCyclicallyMonotone helperForRemark_5_24_5_quarterTurnMapping
Helper for Remark 5.24.5: dimension two already supplies a monotone mapping that is not cyclically monotone, namely the singleton-valued quarter-turn.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_exists_monotone_not_cyclicallyMonotone_in_dimension_two :
∃ ρ : (Fin 2 → ℝ) → Set (Fin 2 → ℝ),
IsMonotoneMultivaluedMapping ρ ∧ ¬ IsCyclicallyMonotone ρ
Helper for Remark 5.24.5: project a vector in R^(2+m) onto its first two coordinates.
open scoped ConvexAnalysis
def helperForRemark_5_24_5_frontCoordinates (m : ℕ) :
(Fin (2 + m) → ℝ) → (Fin 2 → ℝ) :=
fun x i => x (Fin.castAdd m i)
Helper for Remark 5.24.5: embed a vector in R^2 into R^(2+m) by zero-extension.
open scoped ConvexAnalysis
def helperForRemark_5_24_5_extendByZero (m : ℕ) :
(Fin 2 → ℝ) → (Fin (2 + m) → ℝ) :=
fun x => Fin.append x 0
Helper for Remark 5.24.5: projecting after zero-extension recovers the original planar vector.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_frontCoordinates_extendByZero
(m : ℕ) (x : Fin 2 → ℝ) :
helperForRemark_5_24_5_frontCoordinates m
(helperForRemark_5_24_5_extendByZero m x) = x
Helper for Remark 5.24.5: zero-extension commutes with subtraction.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_extendByZero_sub
(m : ℕ) (x y : Fin 2 → ℝ) :
helperForRemark_5_24_5_extendByZero m (x - y) =
helperForRemark_5_24_5_extendByZero m x - helperForRemark_5_24_5_extendByZero m y
Helper for Remark 5.24.5: zero-extension preserves the Euclidean dot product.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_dotProduct_extendByZero
(m : ℕ) (u v : Fin 2 → ℝ) :
dotProduct (helperForRemark_5_24_5_extendByZero m u)
(helperForRemark_5_24_5_extendByZero m v) =
dotProduct u v
Helper for Remark 5.24.5: rotate the first two coordinates and kill the remaining ones.
open scoped ConvexAnalysis
def helperForRemark_5_24_5_stabilizedQuarterTurn (m : ℕ) :
(Fin (2 + m) → ℝ) → (Fin (2 + m) → ℝ) :=
fun x =>
helperForRemark_5_24_5_extendByZero m
(helperForRemark_5_24_5_quarterTurn
(helperForRemark_5_24_5_frontCoordinates m x))
Helper for Remark 5.24.5: the singleton-valued mapping generated by the stabilized quarter-turn on R^(2+m).
open scoped ConvexAnalysis
def helperForRemark_5_24_5_stabilizedQuarterTurnMapping (m : ℕ) :
(Fin (2 + m) → ℝ) → Set (Fin (2 + m) → ℝ) :=
fun x => {helperForRemark_5_24_5_stabilizedQuarterTurn m x}
Helper for Remark 5.24.5: the stabilized quarter-turn agrees with zero-extension of the planar quarter-turn on vectors supported in the first two coordinates.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_stabilizedQuarterTurn_extendByZero
(m : ℕ) (x : Fin 2 → ℝ) :
helperForRemark_5_24_5_stabilizedQuarterTurn m
(helperForRemark_5_24_5_extendByZero m x) =
helperForRemark_5_24_5_extendByZero m
(helperForRemark_5_24_5_quarterTurn x)
Helper for Remark 5.24.5: the stabilized quarter-turn remains additive with respect to subtraction.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_stabilizedQuarterTurn_sub
(m : ℕ) (x y : Fin (2 + m) → ℝ) :
helperForRemark_5_24_5_stabilizedQuarterTurn m (x - y) =
helperForRemark_5_24_5_stabilizedQuarterTurn m x -
helperForRemark_5_24_5_stabilizedQuarterTurn m y
Helper for Remark 5.24.5: the stabilized quarter-turn is additive in every ambient dimension.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_stabilizedQuarterTurn_add
(m : ℕ) (x y : Fin (2 + m) → ℝ) :
helperForRemark_5_24_5_stabilizedQuarterTurn m (x + y) =
helperForRemark_5_24_5_stabilizedQuarterTurn m x +
helperForRemark_5_24_5_stabilizedQuarterTurn m y
Helper for Remark 5.24.5: the stabilized quarter-turn commutes with scalar multiplication.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_stabilizedQuarterTurn_smul
(m : ℕ) (c : ℝ) (x : Fin (2 + m) → ℝ) :
helperForRemark_5_24_5_stabilizedQuarterTurn m (c • x) =
c • helperForRemark_5_24_5_stabilizedQuarterTurn m x
Helper for Remark 5.24.5: the stabilized quarter-turn packaged as a linear map on R^(2+m).
open scoped ConvexAnalysis
def helperForRemark_5_24_5_stabilizedQuarterTurnLinearMap (m : ℕ) :
(Fin (2 + m) → ℝ) →ₗ[ℝ] (Fin (2 + m) → ℝ) :=
{ toFun := helperForRemark_5_24_5_stabilizedQuarterTurn m
map_add' := helperForRemark_5_24_5_stabilizedQuarterTurn_add m
map_smul' := helperForRemark_5_24_5_stabilizedQuarterTurn_smul m }
Helper for Remark 5.24.5: every vector is orthogonal to its stabilized quarter-turn image in R^(2+m).
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_dotProduct_self_stabilizedQuarterTurn
(m : ℕ) (x : Fin (2 + m) → ℝ) :
dotProduct x (helperForRemark_5_24_5_stabilizedQuarterTurn m x) = 0
Helper for Remark 5.24.5: the stabilized singleton-valued quarter-turn remains monotone in every dimension 2 + m.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_stabilizedQuarterTurnMapping_monotone
(m : ℕ) :
IsMonotoneMultivaluedMapping (helperForRemark_5_24_5_stabilizedQuarterTurnMapping m)
Helper for Remark 5.24.5: if the stabilized quarter-turn were cyclically monotone in R^(2+m), then its restriction to the first two coordinates would make the planar quarter-turn cyclically monotone as well.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_quarterTurnMapping_cyclicallyMonotone_of_stabilized
(m : ℕ)
(hcyclic :
IsCyclicallyMonotone (helperForRemark_5_24_5_stabilizedQuarterTurnMapping m)) :
IsCyclicallyMonotone helperForRemark_5_24_5_quarterTurnMapping
Helper for Remark 5.24.5: the stabilized quarter-turn still fails cyclic monotonicity in every dimension 2 + m.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_stabilizedQuarterTurnMapping_not_cyclicallyMonotone
(m : ℕ) :
¬ IsCyclicallyMonotone (helperForRemark_5_24_5_stabilizedQuarterTurnMapping m)
Helper for Remark 5.24.5: every dimension 2 + m already contains a monotone mapping that is not cyclically monotone.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_exists_monotone_not_cyclicallyMonotone_in_dimension_two_add
(m : ℕ) :
∃ ρ : (Fin (2 + m) → ℝ) → Set (Fin (2 + m) → ℝ),
IsMonotoneMultivaluedMapping ρ ∧ ¬ IsCyclicallyMonotone ρ
Helper for Remark 5.24.5: any natural number strictly larger than one can be reindexed as 2 + m. This isolates the arithmetic step needed to match the textbook statement n > 1 with the explicit higher-dimensional construction above.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_eq_two_add_of_one_lt
{n : ℕ} (hn : 1 < n) :
∃ m : ℕ, n = 2 + m
Helper for Remark 5.24.5: once a dimension has been identified with 2 + m, the stabilized quarter-turn witness transfers verbatim to that ambient space.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_exists_monotone_not_cyclicallyMonotone_of_eq_two_add
{n m : ℕ} (hdim : n = 2 + m) :
∃ ρ : (Fin n → ℝ) → Set (Fin n → ℝ),
IsMonotoneMultivaluedMapping ρ ∧ ¬ IsCyclicallyMonotone ρ
Helper for Remark 5.24.5: once n = 2 + m, the counterexample can be chosen to come from the explicit linear stabilized quarter-turn itself, viewed as a singleton-valued mapping.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_exists_linearMapCounterexample_of_eq_two_add
{n m : ℕ} (hdim : n = 2 + m) :
∃ T : (Fin n → ℝ) →ₗ[ℝ] (Fin n → ℝ),
IsMonotoneMultivaluedMapping (fun x => ({T x} : Set (Fin n → ℝ))) ∧
¬ IsCyclicallyMonotone (fun x => ({T x} : Set (Fin n → ℝ)))
Helper for Remark 5.24.5: once n = 2 + m, the counterexample can be chosen to come from the explicit linear stabilized quarter-turn itself, viewed as a singleton-valued mapping.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_exists_linearCounterexample_of_eq_two_add
{n m : ℕ} (hdim : n = 2 + m) :
∃ T : (Fin n → ℝ) → (Fin n → ℝ),
IsMonotoneMultivaluedMapping (fun x => ({T x} : Set (Fin n → ℝ))) ∧
¬ IsCyclicallyMonotone (fun x => ({T x} : Set (Fin n → ℝ)))
Helper for Remark 5.24.5: from the hypothesis 1 < n, one can choose both the decomposition n = 2 + m and the corresponding stabilized quarter-turn counterexample in dimension n.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_counterexample_data_of_one_lt
{n : ℕ} (hn : 1 < n) :
∃ m : ℕ, ∃ _ : n = 2 + m,
∃ ρ : (Fin n → ℝ) → Set (Fin n → ℝ),
IsMonotoneMultivaluedMapping ρ ∧ ¬ IsCyclicallyMonotone ρ
Helper for Remark 5.24.5: when n > 1, the counterexample can be packaged simultaneously as a multivalued mapping and as the singleton graph of a linear map. This is the exact bridge between the bare existential statement of the remark and its explicit linear example.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_exists_singletonLinearMapCounterexample_of_one_lt
{n : ℕ} (hn : 1 < n) :
∃ (ρ : (Fin n → ℝ) → Set (Fin n → ℝ)) (T : (Fin n → ℝ) →ₗ[ℝ] (Fin n → ℝ)),
ρ = (fun x => ({T x} : Set (Fin n → ℝ))) ∧
IsMonotoneMultivaluedMapping ρ ∧ ¬ IsCyclicallyMonotone ρ
Helper for Remark 5.24.5: the hypothesis n > 1 already yields the final existential counterexample promised by the remark, after forgetting the auxiliary decomposition n = 2 + m.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_exists_monotone_not_cyclicallyMonotone_of_one_lt
{n : ℕ} (hn : 1 < n) :
∃ ρ : (Fin n → ℝ) → Set (Fin n → ℝ),
IsMonotoneMultivaluedMapping ρ ∧ ¬ IsCyclicallyMonotone ρ
Helper for Remark 5.24.5: the hypothesis n > 1 allows the counterexample to be chosen as a linear map whose singleton graph is monotone but not cyclically monotone.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_exists_linearMapCounterexample_of_one_lt
{n : ℕ} (hn : 1 < n) :
∃ T : (Fin n → ℝ) →ₗ[ℝ] (Fin n → ℝ),
IsMonotoneMultivaluedMapping (fun x => ({T x} : Set (Fin n → ℝ))) ∧
¬ IsCyclicallyMonotone (fun x => ({T x} : Set (Fin n → ℝ)))
Helper for Remark 5.24.5: the linear counterexample can be chosen so that every vector is orthogonal to its image. This makes the quarter-turn nature of the textbook example explicit in every dimension n > 1.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_exists_orthogonalLinearMapCounterexample_of_one_lt
{n : ℕ} (hn : 1 < n) :
∃ T : (Fin n → ℝ) →ₗ[ℝ] (Fin n → ℝ),
(∀ x, dotProduct x (T x) = 0) ∧
IsMonotoneMultivaluedMapping (fun x => ({T x} : Set (Fin n → ℝ))) ∧
¬ IsCyclicallyMonotone (fun x => ({T x} : Set (Fin n → ℝ)))
Helper for Remark 5.24.5: the hypothesis n > 1 allows the counterexample to be chosen as a linear map whose singleton graph is monotone but not cyclically monotone.
open scoped ConvexAnalysis
lemma helperForRemark_5_24_5_exists_linearCounterexample_of_one_lt
{n : ℕ} (hn : 1 < n) :
∃ T : (Fin n → ℝ) → (Fin n → ℝ),
IsMonotoneMultivaluedMapping (fun x => ({T x} : Set (Fin n → ℝ))) ∧
¬ IsCyclicallyMonotone (fun x => ({T x} : Set (Fin n → ℝ)))§24 — Differential Continuity and Monotonicity — Part 11
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_scalarDerivativeBands_eq_of_commonScalarFibers_at_interior
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{t : ℝ}
(htF : t ∈ interior (scalarEffectiveDomain F))
(htG : t ∈ interior (scalarEffectiveDomain G))
(hFiberEq :
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ F (scalarPoint t)} =
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ G (scalarPoint t)}) :
leftDerivativeExtension F t = leftDerivativeExtension G t ∧
rightDerivativeExtension F t = rightDerivativeExtension G t
Helper for Theorem 5.24.4: once the scalar interval-integral primitive is genuinely constructed, it should first produce a normalized closed proper convex function whose scalar derivative band contains φ.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_intervalIntegralPrimitive_closedProper_normalized_scalarBand
(φ : ℝ → EReal) (a : ℝ) (hmono : Monotone φ)
(ha_finite : φ a ≠ (⊤ : EReal) ∧ φ a ≠ (⊥ : EReal)) :
let f : (Fin 1 → ℝ) → EReal := oneDimensionalIntervalIntegralPrimitive φ a
ClosedConvexFunction f ∧
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f ∧
f (scalarPoint a) = 0 ∧
(∀ x : ℝ, leftDerivativeExtension f x ≤ φ x ∧ φ x ≤ rightDerivativeExtension f x)
Helper for Theorem 5.24.4: once the scalar interval-integral primitive is genuinely constructed, it should yield the normalized closed proper convex primitive with the expected one-sided derivative profiles.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_intervalIntegralPrimitive_closedProper_normalized_derivativeProfiles
(φ : ℝ → EReal) (a : ℝ) (hmono : Monotone φ)
(ha_finite : φ a ≠ (⊤ : EReal) ∧ φ a ≠ (⊥ : EReal)) :
let f : (Fin 1 → ℝ) → EReal := oneDimensionalIntervalIntegralPrimitive φ a
ClosedConvexFunction f ∧
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f ∧
f (scalarPoint a) = 0 ∧
leftDerivativeExtension f = leftLimitProfile φ ∧
rightDerivativeExtension f = rightLimitProfile φ
Helper for Theorem 5.24.4: a competing closed proper convex function whose scalar derivative band contains φ must share the primitive's one-sided derivative extensions.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_band_forces_same_derivativeExtensions
(φ : ℝ → EReal) (f : (Fin 1 → ℝ) → EReal)
(hleft : leftDerivativeExtension f = leftLimitProfile φ)
(hright : rightDerivativeExtension f = rightLimitProfile φ) :
∀ g : (Fin 1 → ℝ) → EReal,
ClosedConvexFunction g →
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g →
(∀ x : ℝ, leftDerivativeExtension g x ≤ φ x ∧ φ x ≤ rightDerivativeExtension g x) →
leftDerivativeExtension g = leftDerivativeExtension f ∧
rightDerivativeExtension g = rightDerivativeExtension f
Helper for Theorem 5.24.4: equal one-sided derivative extensions force equality of the scalar subdifferential fibers at every base point.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_derivativeExtensions_force_same_scalarSubdifferentialFibers
(f g : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hleft : leftDerivativeExtension g = leftDerivativeExtension f)
(hright : rightDerivativeExtension g = rightDerivativeExtension f) :
∀ x : ℝ,
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ g (scalarPoint x)} =
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x)}
Helper for Theorem 5.24.4: equal one-sided derivative extensions force equality of the full scalar subdifferential graph sets.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_derivativeExtensions_force_same_scalarSubdifferentialGraph
(f g : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hleft : leftDerivativeExtension g = leftDerivativeExtension f)
(hright : rightDerivativeExtension g = rightDerivativeExtension f) :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)}
Helper for Theorem 5.24.4: equality of the full scalar subdifferential graphs specializes to equality of the scalar fibers over each base point.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_scalarSubdifferentialGraph_force_same_scalarSubdifferentialFibers
(f g : (Fin 1 → ℝ) → EReal)
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)}) :
∀ x : ℝ,
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ g (scalarPoint x)} =
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x)}
Helper for Theorem 5.24.4: at an interior scalar point, equality of the scalar subdifferential fibers forces equality of the left and right derivative extensions. This is the one-dimensional interval-endpoint extraction used later in the uniqueness proof.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_intervalSetEq_implies_derivativeEndpointsEq
{a1 b1 a2 b2 : EReal}
(ha1_top : a1 ≠ (⊤ : EReal)) (ha1_bot : a1 ≠ (⊥ : EReal))
(hb1_top : b1 ≠ (⊤ : EReal)) (hb1_bot : b1 ≠ (⊥ : EReal))
(ha2_top : a2 ≠ (⊤ : EReal)) (ha2_bot : a2 ≠ (⊥ : EReal))
(hb2_top : b2 ≠ (⊤ : EReal)) (hb2_bot : b2 ≠ (⊥ : EReal))
(hNonempty :
Set.Nonempty {x : ℝ | a1 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b1)})
(hEq :
{x : ℝ | a1 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b1)} =
{x : ℝ | a2 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b2)}) :
a1 = a2 ∧ b1 = b2
Helper for Theorem 5.24.4: at an interior scalar point, equality of the full scalar graph already forces equality of the left and right derivative extensions there.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_scalarDerivativeBands_eq_of_commonScalarGraph_at_interior
(f g : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)})
{t : ℝ}
(htF : t ∈ interior (scalarEffectiveDomain f))
(htG : t ∈ interior (scalarEffectiveDomain g)) :
leftDerivativeExtension f t = leftDerivativeExtension g t ∧
rightDerivativeExtension f t = rightDerivativeExtension g t
Helper for Theorem 5.24.4: if two closed proper convex functions have the same scalar subdifferential graph, then their one-sided derivative extensions agree on every point belonging to the common open scalar effective domain.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_scalarGraph_force_same_derivativeExtensions_on_commonInterior
(f g : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)}) :
Set.EqOn (leftDerivativeExtension f) (leftDerivativeExtension g)
(interior (scalarEffectiveDomain f) ∩ interior (scalarEffectiveDomain g)) ∧
Set.EqOn (rightDerivativeExtension f) (rightDerivativeExtension g)
(interior (scalarEffectiveDomain f) ∩ interior (scalarEffectiveDomain g))
Helper for Theorem 5.24.4: once two normalized translated scalar restrictions agree on the open segment Set.Ioo (0 : ℝ) 1, closedness forces equality at the endpoint t = 1. This is the endpoint-closing step in the original one-dimensional uniqueness proof.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_eq_on_Ioo_imply_endpoint_equality
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hEqIoo : ∀ t ∈ Set.Ioo (0 : ℝ) 1, F (scalarPoint t) = G (scalarPoint t)) :
F (scalarPoint 1) = G (scalarPoint 1)
Helper for Theorem 5.24.4: the translated-difference function vanishes at the origin whenever the base value is finite.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedDifference_zero
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
translatedDifferenceFunctionAt f x 0 = 0
Helper for Theorem 5.24.4: translated differences inherit proper convexity from the original proper convex function.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedDifference_properConvex
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (translatedDifferenceFunctionAt f x)
Helper for Theorem 5.24.4: translated differences of closed proper convex functions remain closed.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedDifference_closed
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
ClosedConvexFunction (translatedDifferenceFunctionAt f x)
Helper for Theorem 5.24.4: translating by a fixed primal base point rewrites the Euclideanized subdifferential fiber of the translated-difference function as the original fiber at the shifted point.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedDifference_subdifferential_eq_shifted
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x z : Fin n → ℝ)
(hxFinite : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt (translatedDifferenceFunctionAt f x) z) =
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f (x + z))
Helper for Theorem 5.24.4: pointwise Euclideanized primal-fiber inclusion is preserved after translating both functions by the same base point and subtracting the corresponding base value.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedDifferenceFiberSubset_of_primalFiberSubset
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x0 : Fin n → ℝ)
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hx0FiniteG : g x0 ≠ (⊤ : EReal) ∧ g x0 ≠ (⊥ : EReal))
(hsubset : ∀ x : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x)) :
∀ z : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt (translatedDifferenceFunctionAt f x0) z) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt (translatedDifferenceFunctionAt g x0) z)
Helper for Theorem 5.24.4: on the scalar common-graph hypothesis, translating at a common anchor point preserves equality of Euclideanized fibers.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedDifferenceFiberEq_of_common_scalarSubdifferentialGraph
(f g : (Fin 1 → ℝ) → EReal) (x0 : ℝ)
(hx0FiniteF : f (scalarPoint x0) ≠ (⊤ : EReal) ∧ f (scalarPoint x0) ≠ (⊥ : EReal))
(hx0FiniteG : g (scalarPoint x0) ≠ (⊤ : EReal) ∧ g (scalarPoint x0) ≠ (⊥ : EReal))
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)}) :
∀ z : Fin 1 → ℝ,
((dotProductEquiv ℝ (Fin 1)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt f (scalarPoint x0)) z) =
((dotProductEquiv ℝ (Fin 1)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt g (scalarPoint x0)) z)
Helper for Theorem 5.24.4: translating a proper convex function by a relative-interior anchor places the origin in the relative interior of the translated effective domain.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_zero_mem_ri_effectiveDomain_translatedDifferenceAt_anchor
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x0 : Fin n → ℝ}
(hx0ri : x0 ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
(0 : Fin n → ℝ) ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (translatedDifferenceFunctionAt f x0))
Helper for Theorem 5.24.4: after translating at the anchor, Theorem 23.9 pulls every scalar subgradient of a line restriction back to an ambient translated subgradient, so ambient fiber inclusion descends to the scalar restriction.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_lineRestrictionFiberSubset_of_translatedDifferenceFiberSubset
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x0 : Fin n → ℝ)
(A : (Fin 1 → ℝ) →ₗ[ℝ] (Fin n → ℝ))
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hx0FiniteG : g x0 ≠ (⊤ : EReal) ∧ g x0 ≠ (⊥ : EReal))
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hx0ri : x0 ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hTranslatedSubset : ∀ z : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt f x0) z) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt g x0) z)) :
∀ t : ℝ,
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈
subdifferentialAt
(fun s => translatedDifferenceFunctionAt f x0 (A s)) (scalarPoint t)} ⊆
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈
subdifferentialAt
(fun s => translatedDifferenceFunctionAt g x0 (A s)) (scalarPoint t)}
Helper for Theorem 5.24.4: scalar line restrictions of translated differences stay closed proper convex, and the translation normalization makes them vanish at the scalar origin.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_lineRestriction_closedProper_data
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x0 : Fin n → ℝ)
(A : (Fin 1 → ℝ) →ₗ[ℝ] (Fin n → ℝ))
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hx0Finite : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal)) :
ClosedConvexFunction (fun s => translatedDifferenceFunctionAt f x0 (A s)) ∧
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ))
(fun s => translatedDifferenceFunctionAt f x0 (A s)) ∧
(fun s => translatedDifferenceFunctionAt f x0 (A s)) (scalarPoint 0) = 0
Helper for Theorem 5.24.4: the translated scalar line restriction has a nonempty scalar subdifferential at 0 because the ambient translated difference has nonempty subdifferential at the relative-interior anchor and linear precomposition pushes that witness to the line.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_subdifferentialNonempty_at_zero
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x0 : Fin n → ℝ)
(A : (Fin 1 → ℝ) →ₗ[ℝ] (Fin n → ℝ))
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hx0ri : x0 ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
Set.Nonempty
(subdifferentialAt
(fun s => translatedDifferenceFunctionAt f x0 (A s)) (scalarPoint 0))
Helper for Theorem 5.24.4: in the genuine cutoff case τ = 0, a finite endpoint value of G would force an upper bound on the scalar fiber of G at 0, while the translated scalar fiber of F at 0 contains arbitrarily large slopes once rightDerivativeExtension F 0 = ⊤.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_tauZero_contradiction_of_offDomainEndpointAssumption
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hLineSubset :
∀ t : ℝ,
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt F (scalarPoint t)} ⊆
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt G (scalarPoint t)})
(hSub0F : Set.Nonempty (subdifferentialAt F (scalarPoint 0)))
(hRightF0 : rightDerivativeExtension F 0 = (⊤ : EReal))
(h1DomG : (1 : ℝ) ∈ scalarEffectiveDomain G) :
False
Helper for Theorem 5.24.4: if the endpoint 1 is off the scalar effective domain of a normalized translated scalar restriction, then 1 lies strictly to the right of that domain.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_endpoint_rightExterior_of_offDomainTarget
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hF0 : F (scalarPoint 0) = 0)
(h1Off : (1 : ℝ) ∉ scalarEffectiveDomain F) :
IsRightOfScalarEffectiveDomain F 1
Helper for Theorem 5.24.4: if τ is the supremum of the scalar effective domain of F cut back to [0,1], then every point of (0,τ) still lies in the scalar effective domain.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_mem_scalarEffectiveDomain_of_lt_cutoff
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hF0 : F (scalarPoint 0) = 0)
{u : ℝ}
(hu : u ∈ Set.Ioo (0 : ℝ) (sSup (scalarEffectiveDomain F ∩ Set.Icc (0 : ℝ) 1))) :
u ∈ scalarEffectiveDomain F
Helper for Theorem 5.24.4: if τ is the cutoff supremum of the scalar effective domain of F inside [0,1] and G stays finite at 1, then τ lies in the scalar effective domain of G, every point of (0,τ) lies in the scalar effective domain of F, and every point of (τ,1) is strictly to the right of the scalar effective domain of F.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_cutoffData_of_offDomainEndpointAssumption
(F G : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(h1OffF : (1 : ℝ) ∉ scalarEffectiveDomain F)
(hG0 : G (scalarPoint 0) = 0)
(h1DomG : (1 : ℝ) ∈ scalarEffectiveDomain G) :
let τ := sSup (scalarEffectiveDomain F ∩ Set.Icc (0 : ℝ) 1)
0 ≤ τ ∧ τ ≤ 1 ∧
(∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F) ∧
τ ∈ scalarEffectiveDomain G ∧
(∀ z ∈ Set.Ioo τ 1, IsRightOfScalarEffectiveDomain F z)
Helper for Theorem 5.24.4: if the scalar effective domain of F already fills the open unit segment and the scalar fibers of F are pointwise contained in those of G, then closedness forces the endpoint values at t = 1 to agree.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_rightDerivativeExtension_eq_top_at_cutoff_of_rightExteriorTail
(F : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
{τ : ℝ} (hTauLtOne : τ < 1)
(hRightOfCutoff : ∀ z ∈ Set.Ioo τ 1, IsRightOfScalarEffectiveDomain F z) :
rightDerivativeExtension F τ = (⊤ : EReal)
Helper for Theorem 5.24.4: if f is a finite convex function on the nonempty open interval (a, b), then for any x, y ∈ (a, b) the increment f y - f x is the interval integral of the right derivative, and also of the left derivative. This is the scalar interval-integral step in the original uniqueness argument.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
theorem helperForTheorem_5_24_4_convexOn_Ioo_sub_eq_intervalIntegral_rightDerivWithin_and_leftDerivWithin
{a b : ℝ} (hab : a < b) {f : ℝ → ℝ} (hf : ConvexOn ℝ (Set.Ioo a b) f)
{x y : ℝ} (hx : x ∈ Set.Ioo a b) (hy : y ∈ Set.Ioo a b) :
f y - f x = ∫ t in x..y, derivWithin f (Set.Ioi t) t ∧
f y - f x = ∫ t in x..y, derivWithin f (Set.Iio t) t
Helper for Theorem 5.24.4: scalar toReal profiles are convex on Set.Ioo (0 : ℝ) 1 as soon as every point of that open segment is known to be finite.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_scalarToReal_convexOn_Ioo
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F) :
ConvexOn ℝ (Set.Ioo (0 : ℝ) 1) (fun u : ℝ => (F (scalarPoint u)).toReal)
Helper for Theorem 5.24.4: at an interior scalar point, the right derivative of the real toReal profile agrees with the toReal image of the extended right derivative.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_derivWithin_scalarToReal_eq_rightDerivativeExtension_toReal
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F)
{u : ℝ} (huIoo : u ∈ Set.Ioo (0 : ℝ) 1) :
derivWithin (fun v : ℝ => (F (scalarPoint v)).toReal) (Set.Ioi u) u =
(rightDerivativeExtension F u).toReal
Helper for Theorem 5.24.4: equal right derivative extensions on Set.Ioo (0 : ℝ) 1 already force equal value increments between any two interior points.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_incrementEq_on_Ioo_of_rightDerivativeExtensionEq
(F G : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F)
(hDomG : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain G)
(hRightEq : ∀ u ∈ Set.Ioo (0 : ℝ) 1,
rightDerivativeExtension F u = rightDerivativeExtension G u)
{s t : ℝ} (hs : s ∈ Set.Ioo (0 : ℝ) 1) (ht : t ∈ Set.Ioo (0 : ℝ) 1) :
(F (scalarPoint t)).toReal - (F (scalarPoint s)).toReal =
(G (scalarPoint t)).toReal - (G (scalarPoint s)).toReal
Helper for Theorem 5.24.4: once two normalized scalar restrictions have the same right derivative extension on Set.Ioo (0 : ℝ) 1, they agree at every interior point of that segment.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_rightDerivativeExtensionEq_on_Ioo_and_zero_imply_eq_on_Ioo
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F)
(hDomG : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain G)
(hRightEq : ∀ u ∈ Set.Ioo (0 : ℝ) 1,
rightDerivativeExtension F u = rightDerivativeExtension G u) :
∀ t ∈ Set.Ioo (0 : ℝ) 1, F (scalarPoint t) = G (scalarPoint t)
Helper for Theorem 5.24.4: if two normalized translated scalar restrictions have the same right derivative extension on Set.Ioo (0 : ℝ) 1, then they agree at the endpoint t = 1.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_rightDerivativeExtensionEq_and_zero_imply_endpointEquality
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F)
(hDomG : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain G)
(hRightEq : ∀ u ∈ Set.Ioo (0 : ℝ) 1,
rightDerivativeExtension F u = rightDerivativeExtension G u) :
F (scalarPoint 1) = G (scalarPoint 1)
Helper for Theorem 5.24.4: if one scalar interval is nonempty and contained in another, then the second lower endpoint is below the first lower endpoint and the first upper endpoint is below the second upper endpoint.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_intervalSubset_implies_derivativeBandBounds
{a1 b1 a2 b2 : EReal}
(ha1_top : a1 ≠ (⊤ : EReal)) (ha1_bot : a1 ≠ (⊥ : EReal))
(hb1_top : b1 ≠ (⊤ : EReal)) (hb1_bot : b1 ≠ (⊥ : EReal))
(_ha2_top : a2 ≠ (⊤ : EReal)) (_ha2_bot : a2 ≠ (⊥ : EReal))
(_hb2_top : b2 ≠ (⊤ : EReal)) (_hb2_bot : b2 ≠ (⊥ : EReal))
(hNonempty :
Set.Nonempty {x : ℝ | a1 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b1)})
(hSubset :
{x : ℝ | a1 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b1)} ⊆
{x : ℝ | a2 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b2)}) :
a2 ≤ a1 ∧ b1 ≤ b2
Helper for Theorem 5.24.4: scalar fiber inclusion at an interior point yields the corresponding one-sided derivative-band bounds.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_scalarRestrictionDerivativeBandBounds_of_primalFiberSubset
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{t : ℝ}
(htF : t ∈ interior (scalarEffectiveDomain F))
(htG : t ∈ interior (scalarEffectiveDomain G))
(hFiberSubset :
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ F (scalarPoint t)} ⊆
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ G (scalarPoint t)}) :
leftDerivativeExtension G t ≤ leftDerivativeExtension F t ∧
rightDerivativeExtension F t ≤ rightDerivativeExtension G t
Helper for Theorem 5.24.4: once scalar derivative-band inequalities hold throughout an open interval, one-sided continuity upgrades them to pointwise equality of the derivative extensions on that interval.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_derivativeBandBounds_on_Ioo_imply_scalarDerivativeExtensionsEq
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{a b : ℝ} (_hab : a < b)
(hband : ∀ t ∈ Set.Ioo a b,
leftDerivativeExtension G t ≤ leftDerivativeExtension F t ∧
rightDerivativeExtension F t ≤ rightDerivativeExtension G t) :
∀ x ∈ Set.Ioo a b,
leftDerivativeExtension G x = leftDerivativeExtension F x ∧
rightDerivativeExtension F x = rightDerivativeExtension G x
Helper for Theorem 5.24.4: if every scalar fiber of F along the unit segment is contained in the corresponding scalar fiber of G, then the two normalized scalar restrictions agree at the endpoint t = 1.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_endpointEquality_of_scalarFiberSubset_on_unitInterval
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F)
(hLineSubset :
∀ t : ℝ,
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt F (scalarPoint t)} ⊆
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt G (scalarPoint t)}) :
F (scalarPoint 1) = G (scalarPoint 1)
Helper for Theorem 5.24.4: if the target point lies in dom f, the translated scalar line restriction from the anchor x0 to that point has the same endpoint value for f and g.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_endpointEquality_of_primalFiberSubset
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x0 y : Fin n → ℝ)
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hx0FiniteG : g x0 ≠ (⊤ : EReal) ∧ g x0 ≠ (⊥ : EReal))
(hyDomF : y ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hx0ri : x0 ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hTranslatedSubset : ∀ z : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt f x0) z) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt g x0) z)) :
translatedDifferenceFunctionAt f x0 (y - x0) =
translatedDifferenceFunctionAt g x0 (y - x0)
Helper for Theorem 5.24.4: once the translated endpoint values agree, the common anchor relation g x0 = f x0 + α unfolds that equality into g y = f y + α.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedEndpointEquality_implies_valueEqualityAtTarget
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x0 y : Fin n → ℝ) (α : ℝ)
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hEndpoint :
translatedDifferenceFunctionAt f x0 (y - x0) =
translatedDifferenceFunctionAt g x0 (y - x0))
(hα0 : g x0 = f x0 + ((α : ℝ) : EReal)) :
g y = f y + ((α : ℝ) : EReal)
Helper for Theorem 5.24.4: scalar toReal profiles are convex on a cutoff interval Set.Ioo (0 : ℝ) τ as soon as every point of that open segment is known to be finite.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_scalarToReal_convexOn_Ioo_cutoff
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
{τ : ℝ} (_hTauPos : 0 < τ)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F) :
ConvexOn ℝ (Set.Ioo (0 : ℝ) τ) (fun u : ℝ => (F (scalarPoint u)).toReal)
Helper for Theorem 5.24.4: at an interior cutoff-segment point, the right derivative of the real toReal profile agrees with the toReal image of the extended right derivative.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_derivWithin_scalarToReal_eq_rightDerivativeExtension_toReal_cutoff
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
{τ : ℝ} (_hTauPos : 0 < τ)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F)
{u : ℝ} (huIoo : u ∈ Set.Ioo (0 : ℝ) τ) :
derivWithin (fun v : ℝ => (F (scalarPoint v)).toReal) (Set.Ioi u) u =
(rightDerivativeExtension F u).toReal
Helper for Theorem 5.24.4: equal right derivative extensions on a cutoff interval Set.Ioo (0 : ℝ) τ already force equal value increments between any two points of that segment.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_incrementEq_on_Ioo_of_rightDerivativeExtensionEq_cutoff
(F G : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{τ : ℝ} (hTauPos : 0 < τ)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F)
(hDomG : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain G)
(hRightEq : ∀ u ∈ Set.Ioo (0 : ℝ) τ,
rightDerivativeExtension F u = rightDerivativeExtension G u)
{s t : ℝ} (hs : s ∈ Set.Ioo (0 : ℝ) τ) (ht : t ∈ Set.Ioo (0 : ℝ) τ) :
(F (scalarPoint t)).toReal - (F (scalarPoint s)).toReal =
(G (scalarPoint t)).toReal - (G (scalarPoint s)).toReal
Helper for Theorem 5.24.4: once two normalized scalar restrictions have the same right derivative extension on Set.Ioo (0 : ℝ) τ, they agree at every interior point of that cutoff segment.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_rightDerivativeExtensionEq_on_Ioo_and_zero_imply_eq_on_Ioo_cutoff
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{τ : ℝ} (hTauPos : 0 < τ)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F)
(hDomG : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain G)
(hRightEq : ∀ u ∈ Set.Ioo (0 : ℝ) τ,
rightDerivativeExtension F u = rightDerivativeExtension G u) :
∀ t ∈ Set.Ioo (0 : ℝ) τ, F (scalarPoint t) = G (scalarPoint t)
Helper for Theorem 5.24.4: the scalar fiber inclusion on a cutoff interval (0,τ) already forces equality of the two translated scalar restrictions on that whole initial segment; the case τ = 0 is vacuous.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_eq_on_initialSegment_of_primalFiberSubset_allowingZeroCutoff
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{τ : ℝ} (hTauNonneg : 0 ≤ τ) (_hTauLeOne : τ ≤ 1)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F)
(hTauDomG : τ ∈ scalarEffectiveDomain G)
(hLineSubset :
∀ t : ℝ,
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt F (scalarPoint t)} ⊆
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt G (scalarPoint t)}) :
∀ u ∈ Set.Ioo (0 : ℝ) τ, F (scalarPoint u) = G (scalarPoint u)
Helper for Theorem 5.24.4: equality of two translated scalar restrictions on the open cutoff segment (0,τ) propagates to equality at the cutoff endpoint itself.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_translatedLine_cutoffEndpointEquality_of_primalFiberSubset
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{τ : ℝ} (hTauPos : 0 < τ)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hEqIoo : ∀ u ∈ Set.Ioo (0 : ℝ) τ, F (scalarPoint u) = G (scalarPoint u)) :
F (scalarPoint τ) = G (scalarPoint τ)
Helper for Theorem 5.24.4: outside the scalar effective domain of a proper one-dimensional restriction, the value must already be ⊤ because properness forbids ⊥.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_scalarValue_eq_top_of_not_mem_scalarEffectiveDomain
(H : (Fin 1 → ℝ) → EReal)
{t : ℝ} (htOff : t ∉ scalarEffectiveDomain H) :
H (scalarPoint t) = (⊤ : EReal)
Helper for Theorem 5.24.4: in the off-domain branch of the globalization argument, it remains to prove that the translated scalar restriction for g also blows up at the endpoint t = 1.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_offDomainTarget_valueEqTop_of_primalFiberSubset
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x0 y : Fin n → ℝ)
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hx0FiniteG : g x0 ≠ (⊤ : EReal) ∧ g x0 ≠ (⊥ : EReal))
(hyOffF : y ∉ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hx0ri : x0 ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hTranslatedSubset : ∀ z : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt f x0) z) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt g x0) z)) :
g y = (⊤ : EReal)
Helper for Theorem 5.24.4: if the same scalar slope is a subgradient at two scalar points of the same function, then it determines the exact increment between those points.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_increment_eq_of_common_scalarSubgradient
(f : (Fin 1 → ℝ) → EReal)
{x y xStar : ℝ}
(hxStarX : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x))
(hxStarY : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint y)) :
f (scalarPoint y) = f (scalarPoint x) + (((xStar * (y - x) : ℝ) : EReal))
Helper for Theorem 5.24.4: once an additive constant matches at one scalar point, any scalar slope common to both functions at that point and another point propagates the same constant to the other point.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_additive_constant_propagates_along_common_scalarSubgradient
(f g : (Fin 1 → ℝ) → EReal)
{x y xStar α : ℝ}
(hAtX : g (scalarPoint x) = f (scalarPoint x) + ((α : ℝ) : EReal))
(hxStarFX : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x))
(hxStarFY : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint y))
(hxStarGX : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ g (scalarPoint x))
(hxStarGY : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ g (scalarPoint y)) :
g (scalarPoint y) = f (scalarPoint y) + ((α : ℝ) : EReal)
Helper for Theorem 5.24.4: a common scalar subdifferential graph lets the additive-constant propagation lemma read its g-side subgradient hypotheses directly from the f-graph.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_additive_constant_propagates_along_common_scalarGraph
(f g : (Fin 1 → ℝ) → EReal)
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)})
{x y xStar α : ℝ}
(hAtX : g (scalarPoint x) = f (scalarPoint x) + ((α : ℝ) : EReal))
(hxStarFX : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x))
(hxStarFY : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint y)) :
g (scalarPoint y) = f (scalarPoint y) + ((α : ℝ) : EReal)
Helper for Theorem 5.24.4: at a scalar point where f and g share the same subgradient, the primal gap g - f equals the dual gap f* - g*.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_fenchelYoung_gap_on_common_scalarGraph
(f g : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
{x xStar : ℝ}
(hxStarF : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x))
(hxStarG : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ g (scalarPoint x)) :
g (scalarPoint x) - f (scalarPoint x) =
fenchelConjugate 1 f (scalarPoint xStar) -
fenchelConjugate 1 g (scalarPoint xStar)
Helper for Theorem 5.24.4: scalar subgradient membership for a closed proper convex function is equivalent to the swapped scalar subgradient membership for its Fenchel conjugate.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_scalarSubgradient_mem_fenchelConjugate_iff
(f : (Fin 1 → ℝ) → EReal)
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
{x xStar : ℝ} :
dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x) ↔
dotProductEquiv ℝ (Fin 1) (scalarPoint x) ∈ ∂ (fenchelConjugate 1 f) (scalarPoint xStar)
Helper for Theorem 5.24.4: equality of the scalar subdifferential graphs of f and g transfers to equality of the swapped scalar subdifferential graphs of their Fenchel conjugates.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_scalarSubdifferentialGraph_implies_common_conjugateScalarGraph
(f g : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)}) :
{p : ℝ × ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈
∂ (fenchelConjugate 1 g) (scalarPoint p.1)} =
{p : ℝ × ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈
∂ (fenchelConjugate 1 f) (scalarPoint p.1)}
Helper for Theorem 5.24.4: on a common scalar fiber over a fixed primal point, the dual gap f* - g* is independent of which scalar subgradient in that fiber is chosen.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_scalarGap_constant_on_primal_verticalFibers
(f g : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)})
{x xStar₁ xStar₂ : ℝ}
(hxStar₁F : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar₁) ∈ ∂ f (scalarPoint x))
(hxStar₂F : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar₂) ∈ ∂ f (scalarPoint x)) :
fenchelConjugate 1 f (scalarPoint xStar₁) -
fenchelConjugate 1 g (scalarPoint xStar₁) =
fenchelConjugate 1 f (scalarPoint xStar₂) -
fenchelConjugate 1 g (scalarPoint xStar₂)
Helper for Theorem 5.24.4: on a common scalar fiber over a fixed dual slope, the primal gap g - f is independent of which scalar base point in that fiber is chosen.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_scalarGap_constant_on_primal_horizontalFibers
(f g : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)})
{x₁ x₂ xStar : ℝ}
(hx₁F : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x₁))
(hx₂F : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x₂)) :
g (scalarPoint x₁) - f (scalarPoint x₁) =
g (scalarPoint x₂) - f (scalarPoint x₂)
Helper for Theorem 5.24.4: every one-dimensional closed proper convex function admits at least one scalar point carrying a scalar subgradient.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_exists_scalarSubgradientPoint
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) :
∃ x xStar : ℝ, dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x)
Helper for Theorem 5.24.4: a common scalar graph point always determines a real additive constant relating the two primal values at that point.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_additive_constant_exists_at_common_scalarGraph_point
(f g : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
{x xStar : ℝ}
(hxStarF : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ f (scalarPoint x))
(hxStarG : dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ g (scalarPoint x)) :
∃ α : ℝ, g (scalarPoint x) = f (scalarPoint x) + ((α : ℝ) : EReal)
Helper for Theorem 5.24.4: a common scalar subdifferential graph provides an anchor point where the additive constant between f and g is already realized.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_exists_additive_constant_anchor_on_common_scalarSubdifferentialGraph
(f g : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)}) :
∃ x0 α : ℝ, g (scalarPoint x0) = f (scalarPoint x0) + ((α : ℝ) : EReal)
Helper for Theorem 5.24.4: equality of scalar subdifferential graphs globalizes to a single additive constant once reformulated as pointwise primal-fiber inclusion.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_primalFiberSubset_implies_eq_up_to_constant
(f g : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hsubset : ∀ x : Fin 1 → ℝ,
((dotProductEquiv ℝ (Fin 1)) ⁻¹' subdifferentialAt f x) ⊆
((dotProductEquiv ℝ (Fin 1)) ⁻¹' subdifferentialAt g x)) :
∃ α : ℝ, ∀ x : Fin 1 → ℝ,
g x = f x + ((α : ℝ) : EReal)
Helper for Theorem 5.24.4: the scalar subdifferential graph of a one-dimensional closed proper convex function is a complete non-decreasing curve.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_scalarSubdifferentialGraph_isCompleteNondecreasingCurve
(f : (Fin 1 → ℝ) → EReal)
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) :
IsCompleteNondecreasingCurve
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)}
Helper for Theorem 5.24.4: Fenchel conjugation preserves the complete-curve structure of the one-dimensional scalar subdifferential graph.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_fenchelConjugate_scalarSubdifferentialGraph_isCompleteNondecreasingCurve
(f : (Fin 1 → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f) :
IsCompleteNondecreasingCurve
{p : ℝ × ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈
∂ (fenchelConjugate 1 f) (scalarPoint p.1)}
Helper for Theorem 5.24.4: equality of the scalar subdifferential graphs is the right uniqueness interface. The general translated-line globalization theorem from the later section already upgrades the corresponding primal-fiber inclusion to a single additive constant.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_scalarSubdifferentialGraph_gap_constant_of_graphLike_primal_and_conjugate_models
(f g : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)}) :
∃ α : ℝ, ∀ x : ℝ,
g (scalarPoint x) = f (scalarPoint x) + ((α : ℝ) : EReal)
Helper for Theorem 5.24.4: if two one-dimensional closed proper convex functions have the same scalar subdifferential graph, then they differ by an additive real constant on scalar points.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
theorem oneDimensional_closedProperConvex_eq_up_to_constant_of_common_scalarSubdifferentialGraph
(f g : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hGraph :
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ g (scalarPoint p.1)} =
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)}) :
∃ α : ℝ, ∀ x : ℝ,
g (scalarPoint x) = f (scalarPoint x) + ((α : ℝ) : EReal)
Helper for Theorem 5.24.4: once two closed proper convex functions on ℝ have the same left and right derivative extensions, they should differ by an additive constant.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_derivativeExtensions_imply_eq_up_to_constant_via_difference_on_commonScalarDomain
(f g : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hleft : leftDerivativeExtension g = leftDerivativeExtension f)
(hright : rightDerivativeExtension g = rightDerivativeExtension f) :
∃ α : ℝ, ∀ x : ℝ,
g (scalarPoint x) = f (scalarPoint x) + ((α : ℝ) : EReal)
Helper for Theorem 5.24.4: once two closed proper convex functions on ℝ have the same left and right derivative extensions, they should differ by an additive constant.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_common_derivativeExtensions_imply_eq_up_to_constant
(f g : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g)
(hleft : leftDerivativeExtension g = leftDerivativeExtension f)
(hright : rightDerivativeExtension g = rightDerivativeExtension f) :
∃ α : ℝ, ∀ x : ℝ,
g (scalarPoint x) = f (scalarPoint x) + ((α : ℝ) : EReal)
Helper for Theorem 5.24.4: once the normalized primitive exists, any other closed proper convex function with the same scalar derivative band should differ from it by an additive constant.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_4_unique_up_to_constant_from_common_scalar_band
(φ : ℝ → EReal) (f : (Fin 1 → ℝ) → EReal)
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f)
(hleft : leftDerivativeExtension f = leftLimitProfile φ)
(hright : rightDerivativeExtension f = rightLimitProfile φ) :
∀ g : (Fin 1 → ℝ) → EReal,
ClosedConvexFunction g →
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g →
(∀ x : ℝ, leftDerivativeExtension g x ≤ φ x ∧ φ x ≤ rightDerivativeExtension g x) →
∃ α : ℝ, ∀ x : ℝ,
g (scalarPoint x) = f (scalarPoint x) + ((α : ℝ) : EReal)§24 — Differential Continuity and Monotonicity — Part 12
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 5.24.4: if φ : ℝ → EReal is nondecreasing and φ(a) is finite, then the specific interval-integral primitive f(x) = ∫_a^x φ(t) dt, normalized by f(a) = 0, is a closed proper convex function such that f'_-(x) = φ_-(x) ≤ φ(x) ≤ φ_+(x) = f'_+(x) for every x, where φ_- and φ_+ are modeled by leftLimitProfile φ and rightLimitProfile φ. Moreover, any other closed proper convex function g with g'_-(x) ≤ φ(x) ≤ g'_+(x) for every x differs from f by an additive real constant.
open scoped ConvexAnalysis
theorem oneDimensional_monotoneFunction_has_normalized_closedProperConvex_primitive_unique_up_to_constant
(φ : ℝ → EReal) (a : ℝ) (hmono : Monotone φ)
(ha_finite : φ a ≠ (⊤ : EReal) ∧ φ a ≠ (⊥ : EReal)) :
let f : (Fin 1 → ℝ) → EReal := oneDimensionalIntervalIntegralPrimitive φ a
ClosedConvexFunction f ∧
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f ∧
(∀ x : ℝ, f (scalarPoint x) = oneDimensionalIntervalIntegralPrimitiveValue φ a x) ∧
f (scalarPoint a) = 0 ∧
leftDerivativeExtension f = leftLimitProfile φ ∧
rightDerivativeExtension f = rightLimitProfile φ ∧
(∀ x : ℝ, leftLimitProfile φ x ≤ φ x ∧ φ x ≤ rightLimitProfile φ x) ∧
(∀ g : (Fin 1 → ℝ) → EReal,
ClosedConvexFunction g →
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g →
(∀ x : ℝ, leftDerivativeExtension g x ≤ φ x ∧ φ x ≤ rightDerivativeExtension g x) →
∃ α : ℝ, ∀ x : ℝ,
g (scalarPoint x) = f (scalarPoint x) + ((α : ℝ) : EReal))
The scalar graph of the one-dimensional subdifferential, obtained by identifying both the domain and codomain with ℝ.
open scoped ConvexAnalysis
def oneDimensionalSubdifferentialScalarGraph (f : (Fin 1 → ℝ) → EReal) : Set (ℝ × ℝ) :=
{p : ℝ × ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint p.2) ∈ ∂ f (scalarPoint p.1)}
If a monotone profile never takes finite values, then every value is either ⊤ or ⊥.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_5_allValues_top_or_bot_of_no_finiteWitness
(φ : ℝ → EReal)
(hNoFinite : ¬ ∃ x : ℝ, φ x ≠ (⊤ : EReal) ∧ φ x ≠ (⊥ : EReal)) :
∀ x : ℝ, φ x = (⊤ : EReal) ∨ φ x = (⊥ : EReal)
A nonempty complete-curve band coming from a monotone profile with no finite values is a single vertical line.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_5_band_eq_verticalLine_of_no_finiteWitness
(Γ : Set (ℝ × ℝ)) (φ : ℝ → EReal) (hmono : Monotone φ)
(hNoFinite : ¬ ∃ x : ℝ, φ x ≠ (⊤ : EReal) ∧ φ x ≠ (⊥ : EReal))
(hΓnonempty : Γ.Nonempty)
(hΓdef :
Γ = {p : ℝ × ℝ |
leftLimitProfile φ p.1 ≤ (p.2 : EReal) ∧
(p.2 : EReal) ≤ rightLimitProfile φ p.1}) :
∃ a : ℝ, Γ = {p : ℝ × ℝ | p.1 = a}
The vertical line over a is the scalar subdifferential graph of the singleton indicator function at a.
open scoped ConvexAnalysis
lemma helperForTheorem_5_24_5_verticalLine_is_subdifferentialScalarGraph_indicatorSingleton
(a : ℝ) :
∃ f : (Fin 1 → ℝ) → EReal,
ClosedConvexFunction f ∧
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f ∧
oneDimensionalSubdifferentialScalarGraph f = {p : ℝ × ℝ | p.1 = a}
Theorem 5.24.5: the scalar graphs of the subdifferential mappings of closed proper convex functions on ℝ are exactly the complete non-decreasing curves in ℝ². Moreover, a closed proper convex function with scalar subdifferential graph Γ is uniquely determined by Γ up to an additive real constant.
open scoped ConvexAnalysis
theorem oneDimensional_subdifferentialGraphs_iff_completeNondecreasingCurves_unique_up_to_constant
(Γ : Set (ℝ × ℝ)) :
(IsCompleteNondecreasingCurve Γ ↔
∃ f : (Fin 1 → ℝ) → EReal,
ClosedConvexFunction f ∧
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f ∧
oneDimensionalSubdifferentialScalarGraph f = Γ) ∧
∀ f g : (Fin 1 → ℝ) → EReal,
ClosedConvexFunction f →
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) f →
ClosedConvexFunction g →
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) g →
oneDimensionalSubdifferentialScalarGraph f = Γ →
oneDimensionalSubdifferentialScalarGraph g = Γ →
∃ α : ℝ, ∀ x : ℝ,
g (scalarPoint x) = f (scalarPoint x) + ((α : ℝ) : EReal)
Swapping the coordinates of a complete non-decreasing curve again yields a complete non-decreasing curve; in Lean this swapped set is Prod.swap '' Γ.
open scoped ConvexAnalysis
theorem isCompleteNondecreasingCurve_swap_image {Γ : Set (ℝ × ℝ)}
(hΓ : IsCompleteNondecreasingCurve Γ) :
IsCompleteNondecreasingCurve (Prod.swap '' Γ)
The finite branch |x| - 2 * sqrt (1 - x) from the standard one-dimensional convex example.
open scoped ConvexAnalysis
noncomputable def absMinusTwoSqrtFiniteBranch (x : ℝ) : ℝ :=
|x| - 2 * Real.sqrt (1 - x)
The one-dimensional convex example that equals |x| - 2 * sqrt (1 - x) on [-3, 1] and +∞ outside that interval, viewed as a function on Fin 1 → ℝ.
open scoped ConvexAnalysis
noncomputable def absMinusTwoSqrtExampleFunction (x : Fin 1 → ℝ) : EReal :=
if -3 ≤ x 0 ∧ x 0 ≤ 1 then
(absMinusTwoSqrtFiniteBranch (x 0) : EReal)
else
(⊤ : EReal)
The piecewise right-derivative profile for absMinusTwoSqrtExampleFunction.
open scoped ConvexAnalysis
noncomputable def absMinusTwoSqrtExampleRightDerivative (x : ℝ) : EReal :=
if 1 ≤ x then
(⊤ : EReal)
else if 0 ≤ x then
((1 + (Real.sqrt (1 - x))⁻¹ : ℝ) : EReal)
else if -3 ≤ x then
((-1 + (Real.sqrt (1 - x))⁻¹ : ℝ) : EReal)
else
(⊥ : EReal)
The piecewise left-derivative profile for absMinusTwoSqrtExampleFunction.
open scoped ConvexAnalysis
noncomputable def absMinusTwoSqrtExampleLeftDerivative (x : ℝ) : EReal :=
if 1 ≤ x then
(⊤ : EReal)
else if 0 < x then
((1 + (Real.sqrt (1 - x))⁻¹ : ℝ) : EReal)
else if -3 < x then
((-1 + (Real.sqrt (1 - x))⁻¹ : ℝ) : EReal)
else
(⊥ : EReal)
The piecewise scalar subdifferential profile for absMinusTwoSqrtExampleFunction.
open scoped ConvexAnalysis
noncomputable def absMinusTwoSqrtExampleSubdifferential (x : ℝ) : Set ℝ :=
if 1 ≤ x then
∅
else if 0 < x then
{1 + (Real.sqrt (1 - x))⁻¹}
else if x = 0 then
Set.Icc 0 2
else if -3 < x then
{-1 + (Real.sqrt (1 - x))⁻¹}
else if x = -3 then
Set.Iic (-(1 / 2 : ℝ))
else
∅
The Example 5.24.1 function is a closed proper convex function on ℝ.
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_closedProperConvex :
ClosedConvexFunction absMinusTwoSqrtExampleFunction ∧
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) absMinusTwoSqrtExampleFunction
Example 5.24.1: the function f(x) = |x| - 2 * sqrt (1 - x) on [-3, 1] and f(x) = +∞ otherwise is a closed proper convex function on ℝ; its right and left derivative extensions are given by the stated piecewise formulas, and its scalar subdifferential is ∅ for x ≥ 1 and x < -3, {1 + (1 - x)^(-1/2)} for 0 < x < 1, [0, 2] at x = 0, {-1 + (1 - x)^(-1/2)} for -3 < x < 0, and (-∞, -1 / 2] at x = -3.
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_subdifferential_of_derivative_profiles
(hclosed : ClosedConvexFunction absMinusTwoSqrtExampleFunction)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) absMinusTwoSqrtExampleFunction)
(hRight : ∀ x : ℝ,
rightDerivativeExtension absMinusTwoSqrtExampleFunction x =
absMinusTwoSqrtExampleRightDerivative x)
(hLeft : ∀ x : ℝ,
leftDerivativeExtension absMinusTwoSqrtExampleFunction x =
absMinusTwoSqrtExampleLeftDerivative x) :
∀ x : ℝ,
{xStar : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈
∂ absMinusTwoSqrtExampleFunction (scalarPoint x)} =
absMinusTwoSqrtExampleSubdifferential x
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_rightDerivative_on_Ioo_zero_one
{x : ℝ} (hx : x ∈ Set.Ioo (0 : ℝ) 1) :
rightDerivativeExtension absMinusTwoSqrtExampleFunction x =
((1 + (Real.sqrt (1 - x))⁻¹ : ℝ) : EReal)
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_rightDerivative_on_Ioo_negThree_zero
{x : ℝ} (hx : x ∈ Set.Ioo (-3 : ℝ) 0) :
rightDerivativeExtension absMinusTwoSqrtExampleFunction x =
((-1 + (Real.sqrt (1 - x))⁻¹ : ℝ) : EReal)
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_scalarEffectiveDomain_subset_Icc :
scalarEffectiveDomain absMinusTwoSqrtExampleFunction ⊆ Set.Icc (-3 : ℝ) 1
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_rightOfDomain_of_one_lt
{x : ℝ} (hx : 1 < x) :
IsRightOfScalarEffectiveDomain absMinusTwoSqrtExampleFunction x
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_leftOfDomain_of_lt_negThree
{x : ℝ} (hx : x < -3) :
IsLeftOfScalarEffectiveDomain absMinusTwoSqrtExampleFunction x
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_rightDerivative_eq_top_of_one_lt
{x : ℝ} (hx : 1 < x) :
rightDerivativeExtension absMinusTwoSqrtExampleFunction x = (⊤ : EReal)
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_rightDerivative_eq_bot_of_lt_negThree
{x : ℝ} (hx : x < -3) :
rightDerivativeExtension absMinusTwoSqrtExampleFunction x = (⊥ : EReal)
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_negBranch_continuousAt {x : ℝ} (hx : x < 1) :
ContinuousAt
(fun z : ℝ => (((-1 + (Real.sqrt (1 - z))⁻¹ : ℝ)) : EReal)) x
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_posBranch_continuousAt {x : ℝ} (hx : x < 1) :
ContinuousAt
(fun z : ℝ => (((1 + (Real.sqrt (1 - z))⁻¹ : ℝ)) : EReal)) x
open scoped ConvexAnalysis
lemma helperForExample_5_24_1_posBranch_tendsto_top_at_one :
Filter.Tendsto
(fun z : ℝ => (((1 + (Real.sqrt (1 - z))⁻¹ : ℝ)) : EReal))
(nhdsWithin (1 : ℝ) (Set.Iio 1)) (nhds (⊤ : EReal))
open scoped ConvexAnalysis
theorem absMinusTwoSqrtExample_closedProperConvex_derivatives_and_subdifferential :
ClosedConvexFunction absMinusTwoSqrtExampleFunction ∧
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) absMinusTwoSqrtExampleFunction ∧
(∀ x : ℝ,
rightDerivativeExtension absMinusTwoSqrtExampleFunction x =
absMinusTwoSqrtExampleRightDerivative x) ∧
(∀ x : ℝ,
leftDerivativeExtension absMinusTwoSqrtExampleFunction x =
absMinusTwoSqrtExampleLeftDerivative x) ∧
(∀ x : ℝ,
{xStar : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈
∂ absMinusTwoSqrtExampleFunction (scalarPoint x)} =
absMinusTwoSqrtExampleSubdifferential x)
The one-dimensional nonclosed counterexample with value 0 on (-∞, 0), value 1 at 0, and value +∞ on (0, ∞), viewed as a function on Fin 1 → ℝ.
open scoped ConvexAnalysis
noncomputable def zeroJumpCounterexampleFunction (x : Fin 1 → ℝ) : EReal :=
if x 0 < 0 then
(0 : EReal)
else if x 0 = 0 then
(1 : EReal)
else
(⊤ : EReal)
The right-derivative profile for zeroJumpCounterexampleFunction: it is 0 on (-∞, 0) and +∞ on [0, ∞).
open scoped ConvexAnalysis
noncomputable def zeroJumpCounterexampleRightDerivative (x : ℝ) : EReal
Example 5.24.2: for the function f(x) = 0 if x < 0, f(0) = 1, and f(x) = +∞ if x > 0, the right derivative extension satisfies f'_+(x) = 0 for x < 0 and f'_+(x) = +∞ for x ≥ 0; in this proper convex but nonclosed example, the left-limit identity lim_{z ↑ 0} f'_+(z) = f'_-(0) from Theorem 5.24.1 fails.
open scoped ConvexAnalysis
theorem zeroJumpCounterexample_properConvex_notClosed_rightDerivative_and_limitFailure :
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) zeroJumpCounterexampleFunction ∧
¬ ClosedConvexFunction zeroJumpCounterexampleFunction ∧
(∀ x : ℝ,
rightDerivativeExtension zeroJumpCounterexampleFunction x =
zeroJumpCounterexampleRightDerivative x) ∧
¬ Filter.Tendsto (rightDerivativeExtension zeroJumpCounterexampleFunction)
(nhdsWithin 0 (Set.Iio 0))
(nhds (leftDerivativeExtension zeroJumpCounterexampleFunction 0))§24 — Differential Continuity and Monotonicity — Part 13
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Corollary 5.24.1: if f is a finite convex function on the nonempty open interval (a, b), then for any x, y ∈ (a, b), f y - f x = ∫ t in x..y, derivWithin f (Set.Ioi t) t and f y - f x = ∫ t in x..y, derivWithin f (Set.Iio t) t.
open scoped ConvexAnalysis
theorem convexOn_Ioo_sub_eq_intervalIntegral_rightDerivWithin_and_leftDerivWithin
{a b : ℝ} (hab : a < b) {f : ℝ → ℝ} (hf : ConvexOn ℝ (Set.Ioo a b) f)
{x y : ℝ} (hx : x ∈ Set.Ioo a b) (hy : y ∈ Set.Ioo a b) :
f y - f x = ∫ t in x..y, derivWithin f (Set.Ioi t) t ∧
f y - f x = ∫ t in x..y, derivWithin f (Set.Iio t) t
Proposition 5.24.2: if f is convex, f is finite at x, and f'(x; y) is finite, then the directional derivative of the convex function u ↦ f'(x; u) at y in direction z is the right-hand limit lim_{λ ↓ 0} (f'(x; y + λ z) - f'(x; y)) / λ, and it is bounded above by f'(x; z) for every z.
open scoped ConvexAnalysis
theorem upperDirectionalDerivativeAt_iterated_tendsto_and_le {n : ℕ}
(f : (Fin n → ℝ) → EReal) (hf : ConvexFunction f) {x y : Fin n → ℝ}
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hy : upperDirectionalDerivativeAt f x y ≠ (⊤ : EReal) ∧
upperDirectionalDerivativeAt f x y ≠ (⊥ : EReal)) :
(∀ z : Fin n → ℝ,
Filter.Tendsto
(directionalDifferenceQuotientAt (upperDirectionalDerivativeAt f x) y z)
(nhdsWithin (0 : ℝ) (Set.Ioi (0 : ℝ)))
(nhds (upperDirectionalDerivativeAt (upperDirectionalDerivativeAt f x) y z))) ∧
∀ z : Fin n → ℝ,
upperDirectionalDerivativeAt (upperDirectionalDerivativeAt f x) y z ≤
upperDirectionalDerivativeAt f x z
Helper for Proposition 5.24.2: convexity plus positive homogeneity carries real epigraph upper bounds through vector addition.
open scoped ConvexAnalysis
lemma helperForProposition_5_24_2_midpoint_subadditivity_of_convex_posHom
{n : ℕ} {D : (Fin n → ℝ) → EReal}
(hpos : PositivelyHomogeneous D) (hconv : ConvexFunction D)
{u v : Fin n → ℝ} {μ ν : ℝ}
(hu : D u ≤ (μ : EReal)) (hv : D v ≤ (ν : EReal)) :
D (u + v) ≤ ((μ + ν : ℝ) : EReal)
Helper for Proposition 5.24.2: an EReal lying below every real number must be ⊥.
open scoped ConvexAnalysis
lemma helperForProposition_5_24_2_eq_bot_of_le_all_reals (q : EReal)
(hq : ∀ r : ℝ, q ≤ (r : EReal)) :
q = (⊥ : EReal)
Helper for Proposition 5.24.2: the positive-step quotient at t = 1 is controlled by the original directional derivative.
open scoped ConvexAnalysis
lemma helperForProposition_5_24_2_differenceQuotientAt_one_le
{n : ℕ} {D : (Fin n → ℝ) → EReal}
(hpos : PositivelyHomogeneous D) (hconv : ConvexFunction D)
{y z : Fin n → ℝ}
(hy : D y ≠ (⊤ : EReal) ∧ D y ≠ (⊥ : EReal)) :
directionalDifferenceQuotientAt D y z 1 ≤ D z
Helper for Proposition 5.24.2: the infimum formula from Theorem 23.1 is bounded above by the t = 1 positive-step quotient.
open scoped ConvexAnalysis
lemma helperForProposition_5_24_2_iterated_upperDerivative_le_of_quotientAt_one
{n : ℕ} {D : (Fin n → ℝ) → EReal} {y z : Fin n → ℝ}
(hsInfEq :
upperDirectionalDerivativeAt D y z =
sInf ((Set.Ioi (0 : ℝ)).image fun t : ℝ => directionalDifferenceQuotientAt D y z t)) :
upperDirectionalDerivativeAt D y z ≤ directionalDifferenceQuotientAt D y z 1
Helper for Corollary 5.24.2: proper convexity packages the interior of the effective domain as an open convex set on which f is finite.
open scoped ConvexAnalysis
lemma helperForCorollary_5_24_2_constantSequenceSetup
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) :
let C := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
ConvexFunction f ∧
IsOpen C ∧
Convex ℝ C ∧
(∀ z ∈ C, f z ≠ (⊤ : EReal) ∧ f z ≠ (⊥ : EReal))
Helper for Corollary 5.24.2: specialize Theorem 5.24.8 to the constant sequence fᵢ = f and a convergent sequence of pairs (xᵢ, yᵢ).
open scoped ConvexAnalysis
lemma helperForCorollary_5_24_2_pairSequence_limsup_upperDirectionalDerivative
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{p : (Fin n → ℝ) × (Fin n → ℝ)}
{pSeq : ℕ → (Fin n → ℝ) × (Fin n → ℝ)}
(hp :
p ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ×ˢ
(Set.univ : Set (Fin n → ℝ)))
(hpSeq :
∀ i,
pSeq i ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ×ˢ
(Set.univ : Set (Fin n → ℝ)))
(hp_tendsto : Filter.Tendsto pSeq Filter.atTop (nhds p)) :
Filter.limsup (fun i => upperDirectionalDerivativeAt f (pSeq i).1 (pSeq i).2) Filter.atTop ≤
upperDirectionalDerivativeAt f p.1 p.2
Helper for Corollary 5.24.2: the pairwise limsup inequality from the constant-sequence specialization yields upper semicontinuity on int (dom f) × ℝ^n.
open scoped ConvexAnalysis
lemma helperForCorollary_5_24_2_upperSemicontinuousOn_upperDirectionalDerivative
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) :
UpperSemicontinuousOn
(fun p : (Fin n → ℝ) × (Fin n → ℝ) => upperDirectionalDerivativeAt f p.1 p.2)
(interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ×ˢ
(Set.univ : Set (Fin n → ℝ)))§24 — Differential Continuity and Monotonicity — Part 14
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Corollary 5.24.2: if f is a proper convex function on ℝ^n, then the upper directional derivative map (x, y) ↦ f'(x; y) is upper semicontinuous on int (dom f) × ℝ^n. Moreover, for every x ∈ int (dom f) and every ε > 0, there exists δ > 0 such that for every z ∈ Metric.closedBall x δ, the subdifferential ∂ f (z) is contained in ∂ f (x) + ε B, written in Lean after identifying covectors with vectors via dotProductEquiv ℝ (Fin n).
open scoped ConvexAnalysis
open scoped Topology
theorem properConvex_upperSemicontinuousOn_upperDirectionalDerivative_and_subdifferential_subset
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) :
UpperSemicontinuousOn
(fun p : (Fin n → ℝ) × (Fin n → ℝ) => upperDirectionalDerivativeAt f p.1 p.2)
(interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ×ˢ
(Set.univ : Set (Fin n → ℝ))) ∧
∀ ⦃x : Fin n → ℝ⦄,
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) →
∀ ε : ℝ, 0 < ε → ∃ δ : ℝ, 0 < δ ∧
∀ ⦃z : Fin n → ℝ⦄, z ∈ Metric.closedBall x δ →
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f z) ⊆
Set.image2 (fun u v : Fin n → ℝ => u + v)
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)
(Metric.closedBall (0 : Fin n → ℝ) ε)
The Euclidean face of ∂ f (x) selected by the normal direction y: it consists of the Euclidean representatives xStar of subgradients at x for which y lies in the normal cone of the Euclideanized subdifferential at xStar.
open scoped ConvexAnalysis
open scoped Topology
def subdifferentialNormalFaceAt {n : ℕ} (f : (Fin n → ℝ) → EReal) (x y : Fin n → ℝ) :
Set (Fin n → ℝ) :=
{xStar |
dotProductEquiv ℝ (Fin n) xStar ∈ ∂ f x ∧
∀ zStar : Fin n → ℝ,
dotProductEquiv ℝ (Fin n) zStar ∈ ∂ f x →
dotProduct y (zStar - xStar) ≤ 0}
Helper for Corollary 5.24.2: the eventual subdifferential inclusion from Theorem 5.24.8 can be upgraded to a uniform closed-ball neighborhood around any interior-domain point.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForCorollary_5_24_2_local_subdifferential_subset
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x : Fin n → ℝ}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(ε : ℝ) (hε : 0 < ε) :
∃ δ : ℝ, 0 < δ ∧
∀ ⦃z : Fin n → ℝ⦄, z ∈ Metric.closedBall x δ →
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f z) ⊆
Set.image2 (fun u v : Fin n → ℝ => u + v)
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)
(Metric.closedBall (0 : Fin n → ℝ) ε)
Helper for Theorem 5.24.9: the ray hypothesis can always be strengthened to a strictly positive parameter.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_positiveRayScale
{n : ℕ} {f : (Fin n → ℝ) → EReal} {x y : Fin n → ℝ}
(hray :
∃ t : ℝ, 0 ≤ t ∧ x + t • y ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
∃ s : ℝ, 0 < s ∧ x + s • y ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
Helper for Theorem 5.24.9: the secant lengths tend to 0, remain positive, reconstruct the original sequence, and carry the given normalized-direction convergence.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_normalizedSecantData
{n : ℕ} {x y : Fin n → ℝ} (xSeq : ℕ → Fin n → ℝ)
(hxSeq_tendsto : Filter.Tendsto xSeq Filter.atTop (nhds x))
(hxSeq_ne : ∀ i : ℕ, xSeq i ≠ x)
(hdir :
Filter.Tendsto (fun i : ℕ => ‖xSeq i - x‖⁻¹ • (xSeq i - x)) Filter.atTop (nhds y)) :
Filter.Tendsto (fun i : ℕ => ‖xSeq i - x‖) Filter.atTop (nhds 0) ∧
(∀ i : ℕ, 0 < ‖xSeq i - x‖) ∧
(∀ i : ℕ, xSeq i = x + ‖xSeq i - x‖ • (‖xSeq i - x‖⁻¹ • (xSeq i - x))) ∧
Filter.Tendsto (fun i : ℕ => ‖xSeq i - x‖⁻¹ • (xSeq i - x)) Filter.atTop (nhds y)
Helper for Theorem 5.24.9: the fixed ray-neighborhood {u | x + s • u ∈ int (dom f)} is open and convex, contains y, and every shorter positive secant from x to a point on that neighborhood stays inside int (dom f) with finite f value.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_rayNeighborhood_geometry
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x y : Fin n → ℝ}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
{s : ℝ} (hs_pos : 0 < s)
(hsy_mem :
x + s • y ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
let C : Set (Fin n → ℝ) :=
{u : Fin n → ℝ | x + s • u ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)}
IsOpen C ∧
Convex ℝ C ∧
y ∈ C ∧
∀ {u : Fin n → ℝ} {t : ℝ}, u ∈ C → 0 < t → t ≤ s →
x + t • u ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ∧
f (x + t • u) ≠ (⊤ : EReal) ∧
f (x + t • u) ≠ (⊥ : EReal)
Helper for Theorem 5.24.9: after passing to a tail, the normalized secant directions stay in the fixed ray-neighborhood and the secant lengths are bounded above by the chosen scale.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_eventually_mem_rayNeighborhood_and_le_scale
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x y : Fin n → ℝ}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
{s : ℝ} (hs_pos : 0 < s)
(hsy_mem :
x + s • y ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(tSeq : ℕ → ℝ) (uSeq : ℕ → Fin n → ℝ)
(ht_tendsto : Filter.Tendsto tSeq Filter.atTop (nhds 0))
(hu_tendsto : Filter.Tendsto uSeq Filter.atTop (nhds y)) :
let C : Set (Fin n → ℝ) :=
{u : Fin n → ℝ | x + s • u ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)}
∃ i0 : ℕ, ∀ i ≥ i0, uSeq i ∈ C ∧ tSeq i ≤ s
Helper for Theorem 5.24.9: a subgradient at the interior ray point x + s • u bounds the full-step secant quotient from x along u from above.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_shortRayDifferenceQuotient_lowerBound_of_subgradient
{n : ℕ} {f : (Fin n → ℝ) → EReal}
{x u : Fin n → ℝ} {s : ℝ}
{g : Module.Dual ℝ (Fin n → ℝ)}
(hxFinite : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hsFinite : f (x + s • u) ≠ (⊤ : EReal) ∧ f (x + s • u) ≠ (⊥ : EReal))
(hg : IsSubgradientAt f (x + s • u) g)
(hs : 0 < s) :
directionalDifferenceQuotientAt f x u s ≤ ((g u : ℝ) : EReal)
Helper for Theorem 5.24.9: for a positive step, the secant quotient is convex as a function of the direction variable.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_secantQuotient_convex
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hf : ConvexFunction f) {x : Fin n → ℝ}
(hxFinite : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
{t : ℝ} (ht : 0 < t) :
ConvexFunction (fun u => directionalDifferenceQuotientAt f x u t)
Helper for Theorem 5.24.9: finite endpoint values imply the fixed-step secant quotient is finite.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_secantQuotient_finite
{n : ℕ} {f : (Fin n → ℝ) → EReal} {x u : Fin n → ℝ} {t : ℝ}
(hxFinite : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(huFinite : f (x + t • u) ≠ (⊤ : EReal) ∧ f (x + t • u) ≠ (⊥ : EReal))
(ht : 0 < t) :
directionalDifferenceQuotientAt f x u t ≠ (⊤ : EReal) ∧
directionalDifferenceQuotientAt f x u t ≠ (⊥ : EReal)
Helper for Theorem 5.24.9: on the ray-neighborhood C, the limit function u ↦ f'(x; u) is finite.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_limitFunction_finite_on_rayNeighborhood
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x : Fin n → ℝ} (hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
{s : ℝ} (hs_pos : 0 < s)
{C : Set (Fin n → ℝ)}
{y : Fin n → ℝ} (hy_mem : y ∈ C)
(hyFinite : upperDirectionalDerivativeAt f x y ≠ (⊥ : EReal))
(hshort_mem :
∀ {u : Fin n → ℝ} {t : ℝ}, u ∈ C → 0 < t → t ≤ s →
x + t • u ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ∧
f (x + t • u) ≠ (⊤ : EReal) ∧
f (x + t • u) ≠ (⊥ : EReal)) :
∀ u ∈ C, upperDirectionalDerivativeAt f x u ≠ (⊤ : EReal) ∧
upperDirectionalDerivativeAt f x u ≠ (⊥ : EReal)
Helper for Theorem 5.24.9: the shifted secant-quotient family gTail i u = directionalDifferenceQuotientAt f x u (tSeq (i + i0)) satisfies the hypotheses needed to apply Theorem 5.24.8 on the fixed ray-neighborhood C.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_secantQuotient_tailHypotheses
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x : Fin n → ℝ} (hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
{s : ℝ} (hs_pos : 0 < s)
{C : Set (Fin n → ℝ)}
(hshort_mem :
∀ {u : Fin n → ℝ} {t : ℝ}, u ∈ C → 0 < t → t ≤ s →
x + t • u ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ∧
f (x + t • u) ≠ (⊤ : EReal) ∧
f (x + t • u) ≠ (⊥ : EReal))
{tSeq : ℕ → ℝ} {uSeq : ℕ → Fin n → ℝ} {i0 : ℕ}
(ht_pos : ∀ i : ℕ, 0 < tSeq i)
(ht_tail : ∀ i ≥ i0, tSeq i ≤ s)
(hu_tail : ∀ i ≥ i0, uSeq i ∈ C)
(ht_tendsto : Filter.Tendsto tSeq Filter.atTop (nhds 0))
{gTail : ℕ → (Fin n → ℝ) → EReal}
(hgTail :
gTail = fun i u => directionalDifferenceQuotientAt f x u (tSeq (i + i0))) :
(∀ i, ConvexFunction (gTail i)) ∧
(∀ i u, u ∈ C → gTail i u ≠ (⊤ : EReal) ∧ gTail i u ≠ (⊥ : EReal)) ∧
(∀ u ∈ C,
Filter.Tendsto (fun i => gTail i u) Filter.atTop
(nhds (upperDirectionalDerivativeAt f x u)))
Helper for Theorem 5.24.9: translating the secant endpoint along u + λ z is the same as first stepping to x + t • u and then moving by (t * λ) • z.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_translatedSecantEndpoint
{n : ℕ} {x u z : Fin n → ℝ} {t lam : ℝ} :
x + t • (u + lam • z) = (x + t • u) + (t * lam) • z
Helper for Theorem 5.24.9: after subtracting the same finite real base value, the nested positive-step secant quotient collapses to the single quotient with denominator t * λ.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_positiveDenominator_ereal_sub_div_cancel_of_finiteBase
(A C : EReal) (β t lam : ℝ) (ht : 0 < t) (hlam : 0 < lam) :
((((A - ((β : ℝ) : EReal)) / (t : EReal)) - ((C - ((β : ℝ) : EReal)) / (t : EReal))) /
(lam : EReal)) =
((A - C) / (((t * lam : ℝ)) : EReal))
Helper for Theorem 5.24.9: the positive-step quotient of the fixed-step secant quotient is the corresponding positive-step quotient of f at the translated base point.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_secantQuotient_pointwiseDifferenceQuotient_transport
{n : ℕ} {f : (Fin n → ℝ) → EReal}
{x u z : Fin n → ℝ} {t lam : ℝ}
(hxFinite : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(ht : 0 < t) (hlam : 0 < lam) :
directionalDifferenceQuotientAt (fun v => directionalDifferenceQuotientAt f x v t) u z lam =
directionalDifferenceQuotientAt f (x + t • u) z (t * lam)
Helper for Theorem 5.24.9: differentiating the fixed-step secant quotient at u recovers the directional derivative of f at the translated point x + t • u.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_secantQuotient_derivative_transport
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hf : ConvexFunction f)
{x u z : Fin n → ℝ} {t : ℝ}
(hxFinite : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(huFinite : f (x + t • u) ≠ (⊤ : EReal) ∧ f (x + t • u) ≠ (⊥ : EReal))
(ht : 0 < t) :
upperDirectionalDerivativeAt (fun v => directionalDifferenceQuotientAt f x v t) u z =
upperDirectionalDerivativeAt f (x + t • u) z
Helper for Theorem 5.24.9: the Euclideanized subdifferential of the fixed-step secant quotient at u is exactly the Euclideanized subdifferential of f at x + t • u.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_secantQuotient_subdifferential_transport
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hf : ConvexFunction f)
{x u : Fin n → ℝ} {t : ℝ}
(hxFinite : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(huFinite : f (x + t • u) ≠ (⊤ : EReal) ∧ f (x + t • u) ≠ (⊥ : EReal))
(ht : 0 < t) :
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt
(fun v => directionalDifferenceQuotientAt f x v t) u) =
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f (x + t • u))
Helper for Theorem 5.24.9: every subgradient of the iterated upper directional derivative at y is already a subgradient of f at x, and it realizes the support value at y.
open scoped ConvexAnalysis
open scoped Topology
lemma helperForTheorem_5_24_9_iteratedSubgradient_mem_subdifferential_and_supportEq
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x y v : Fin n → ℝ}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
(hfiniteDir : upperDirectionalDerivativeAt f x y ≠ (⊥ : EReal))
(hv :
v ∈ ((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (upperDirectionalDerivativeAt f x) y)) :
dotProductEquiv ℝ (Fin n) v ∈ subdifferentialAt f x ∧
(((dotProduct v y : ℝ) : EReal) = upperDirectionalDerivativeAt f x y)§24 — Differential Continuity and Monotonicity — Part 15
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 5.24.9: let f be a closed proper convex function, let x ∈ dom f, and let xᵢ ∈ dom f be a sequence converging to x with xᵢ ≠ x and normalized directions ‖xᵢ - x‖⁻¹ • (xᵢ - x) → y. If f'(x; y) > -∞ and the half-line {x + λ y | λ ≥ 0} meets int (dom f), then limsup f'(xᵢ; z) ≤ f'(x; y; z) for every z. Moreover, for every ε > 0, the Euclideanized subdifferentials ∂ f (xᵢ) are eventually contained in subdifferentialNormalFaceAt f x y + ε B, where B is the Euclidean unit ball.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
theorem closedProperConvex_limsup_upperDirectionalDerivative_le_iterated_and_eventual_subdifferential_subset_normalFace
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x y : Fin n → ℝ}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
(xSeq : ℕ → Fin n → ℝ)
(hxSeq : ∀ i : ℕ, xSeq i ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
(hxSeq_tendsto : Filter.Tendsto xSeq Filter.atTop (nhds x))
(hxSeq_ne : ∀ i : ℕ, xSeq i ≠ x)
(hdir :
Filter.Tendsto (fun i : ℕ => ‖xSeq i - x‖⁻¹ • (xSeq i - x)) Filter.atTop (nhds y))
(hfiniteDir : upperDirectionalDerivativeAt f x y ≠ (⊥ : EReal))
(hray :
∃ t : ℝ, 0 ≤ t ∧ x + t • y ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
(∀ z : Fin n → ℝ,
Filter.limsup (fun i => upperDirectionalDerivativeAt f (xSeq i) z) Filter.atTop ≤
upperDirectionalDerivativeAt (upperDirectionalDerivativeAt f x) y z) ∧
∀ ε : ℝ, 0 < ε → ∃ i0 : ℕ, ∀ i ≥ i0,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f (xSeq i)) ⊆
Set.image2 (fun u v : Fin n → ℝ => u + v)
(subdifferentialNormalFaceAt f x y)
(Metric.closedBall (0 : Fin n → ℝ) ε)
The Euclideanized union of the subdifferentials ∂ f (x) over points x ∈ S.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
def subdifferentialImageOn {n : ℕ} (f : (Fin n → ℝ) → EReal) (S : Set (Fin n → ℝ)) :
Set (Fin n → ℝ) :=
⋃ x ∈ S, ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)
Theorem 5.24.10: if f is a closed proper convex function and S is a nonempty closed bounded subset of int (dom f), then the Euclideanized union subdifferentialImageOn f S of the subdifferentials ∂ f (x) for x ∈ S is nonempty, closed, and bounded. Writing α = sup {euclideanNorm xStar | xStar ∈ subdifferentialImageOn f S}, one has f'(x; z) ≤ α * euclideanNorm z for every x ∈ S and every direction z, and |f(y) - f(x)| ≤ α * euclideanNorm (y - x) for all x, y ∈ S, where f x and f y are read as real values on int (dom f). This is the book's Euclidean-norm statement; later uses can convert back to the ambient sup norm by finite-dimensional norm equivalence.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
theorem closedProperConvex_subdifferentialImageOn_nonempty_closed_bounded_and_lipschitzOn
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{S : Set (Fin n → ℝ)} (hSne : S.Nonempty) (hSclosed : IsClosed S)
(hSbdd : Bornology.IsBounded S)
(hSint : S ⊆ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
Set.Nonempty (subdifferentialImageOn f S) ∧
IsClosed (subdifferentialImageOn f S) ∧
Bornology.IsBounded (subdifferentialImageOn f S) ∧
let α : ℝ := sSup ((fun xStar : Fin n → ℝ => euclideanNorm xStar) '' subdifferentialImageOn f S)
(∀ x ∈ S, ∀ z : Fin n → ℝ,
upperDirectionalDerivativeAt f x z ≤ ((α * euclideanNorm z : ℝ) : EReal)) ∧
∀ x ∈ S, ∀ y ∈ S, |(f y).toReal - (f x).toReal| ≤ α * euclideanNorm (y - x)
Helper for Theorem 5.24.9: the Euclideanized subdifferential of the iterated upper directional derivative at y lies in the normal face of ∂ f (x) selected by y.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_9_iteratedSubdifferential_subset_normalFace
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x y : Fin n → ℝ}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
(hfiniteDir : upperDirectionalDerivativeAt f x y ≠ (⊥ : EReal)) :
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (upperDirectionalDerivativeAt f x) y) ⊆
subdifferentialNormalFaceAt f x y
Helper for Theorem 5.24.10: the second-coordinate projection of the subdifferential graph over S is exactly the Euclideanized union ∂ f (S).
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_10_subdifferentialGraphOn_projection_eq_imageOn
{n : ℕ} {f : (Fin n → ℝ) → EReal} {S : Set (Fin n → ℝ)} :
Prod.snd ''
{p : (Fin n → ℝ) × (Fin n → ℝ) |
p.1 ∈ S ∧
p.2 ∈ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f p.1)} =
subdifferentialImageOn f S
Helper for Theorem 5.24.10: compactness of S and Corollary 5.24.2 give a uniform bound on the Euclideanized subdifferentials over S.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_10_subdifferentialImageOn_isBounded
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{S : Set (Fin n → ℝ)} (hSclosed : IsClosed S) (hSbdd : Bornology.IsBounded S)
(hSint : S ⊆ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
Bornology.IsBounded (subdifferentialImageOn f S)
Helper for Theorem 5.24.10: the Euclideanized union ∂ f (S) is compact because it is the continuous image of the closed subdifferential graph over the compact base set S.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_10_subdifferentialImageOn_isCompact
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{S : Set (Fin n → ℝ)} (hSclosed : IsClosed S) (hSbdd : Bornology.IsBounded S)
(hSint : S ⊆ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
IsCompact (subdifferentialImageOn f S)
Helper for Theorem 5.24.11: cyclic monotonicity descends along a pointwise graph inclusion.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_pointwiseSubset_preserves_isCyclicallyMonotone
{n : ℕ} {ρ σ : (Fin n → ℝ) → Set (Fin n → ℝ)}
(hσ : IsCyclicallyMonotone σ) (hsubset : ∀ x : Fin n → ℝ, ρ x ⊆ σ x) :
IsCyclicallyMonotone ρ
Helper for Theorem 5.24.11: if the graph of ρ is empty, the zero function already provides the required closed proper convex potential.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_emptyGraph_exists_closedProperConvex_subdifferential_superset
{n : ℕ} {ρ : (Fin n → ℝ) → Set (Fin n → ℝ)}
(hempty : ∀ x : Fin n → ℝ, ρ x = ∅) :
∃ f : (Fin n → ℝ) → EReal,
ClosedConvexFunction f ∧
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f ∧
∀ x : Fin n → ℝ,
ρ x ⊆ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)
Helper for Theorem 5.24.11: the affine-tail value contributed by a finite graph chain based at the anchor a.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
def helperForTheorem_5_24_11_rockafellarCandidateValue
{n m : ℕ} (x xStar : Fin (m + 1) → Fin n → ℝ) (y : Fin n → ℝ) : EReal :=
(∑ i : Fin m,
(((dotProduct (x i.succ - x i.castSucc) (xStar i.castSucc) : ℝ)) : EReal)) +
(((dotProduct (y - x (Fin.last m)) (xStar (Fin.last m)) : ℝ)) : EReal)
Helper for Theorem 5.24.11: the admissible affine-tail chain values used in Rockafellar's path-supremum construction from the anchor a.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
def helperForTheorem_5_24_11_rockafellarCandidateSet
{n : ℕ} (ρ : (Fin n → ℝ) → Set (Fin n → ℝ)) (a y : Fin n → ℝ) : Set EReal :=
{q : EReal | ∃ m : ℕ, ∃ x xStar : Fin (m + 1) → Fin n → ℝ,
x 0 = a ∧
(∀ i : Fin (m + 1), xStar i ∈ ρ (x i)) ∧
q = helperForTheorem_5_24_11_rockafellarCandidateValue x xStar y}
Helper for Theorem 5.24.11: Rockafellar's raw potential is the supremum of all admissible affine-tail chain values based at the anchor a.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
noncomputable def helperForTheorem_5_24_11_rockafellarPotential
{n : ℕ} (ρ : (Fin n → ℝ) → Set (Fin n → ℝ)) (a : Fin n → ℝ) : (Fin n → ℝ) → EReal :=
fun y => sSup (helperForTheorem_5_24_11_rockafellarCandidateSet ρ a y)
Helper for Theorem 5.24.11: appending one more graph point adds exactly the expected affine tail term to the chain value.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_rockafellarCandidateValue_append
{n m : ℕ} (x xStar : Fin (m + 1) → Fin n → ℝ)
(xNew v y : Fin n → ℝ) :
helperForTheorem_5_24_11_rockafellarCandidateValue (Fin.snoc x xNew) (Fin.snoc xStar v) y =
helperForTheorem_5_24_11_rockafellarCandidateValue x xStar xNew +
(((dotProduct (y - xNew) v : ℝ)) : EReal)
Helper for Theorem 5.24.11: once a chain contributes a value at x, appending a graph point (x, v) produces the shifted affine-tail value at any y.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_appendCandidate_mem_rockafellarCandidateSet
{n : ℕ} {ρ : (Fin n → ℝ) → Set (Fin n → ℝ)} {a x y v : Fin n → ℝ}
(hv : v ∈ ρ x) {q : EReal}
(hq : q ∈ helperForTheorem_5_24_11_rockafellarCandidateSet ρ a x) :
q + (((dotProduct (y - x) v : ℝ)) : EReal) ∈
helperForTheorem_5_24_11_rockafellarCandidateSet ρ a y
Helper for Theorem 5.24.11: the length-zero chain at the anchor gives the basic affine lower bound for Rockafellar's raw potential.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_seedCandidate_le_rockafellarPotential
{n : ℕ} {ρ : (Fin n → ℝ) → Set (Fin n → ℝ)} {a aStar : Fin n → ℝ}
(ha : aStar ∈ ρ a) (y : Fin n → ℝ) :
(((dotProduct (y - a) aStar : ℝ)) : EReal) ≤
helperForTheorem_5_24_11_rockafellarPotential ρ a y
Helper for Theorem 5.24.11: coercing a finite real sum into EReal commutes with the sum.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_eReal_coe_finsetSum
{α : Type*} (s : Finset α) (f : α → ℝ) :
(((Finset.sum s f : ℝ)) : EReal) = Finset.sum s (fun a => (((f a : ℝ)) : EReal))
Helper for Theorem 5.24.11: evaluating a candidate chain at its anchor point reproduces the cyclic sum of its graph edges.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_cyclicSum_eq_candidateValue_at_anchor
{n m : ℕ} (x xStar : Fin (m + 1) → Fin n → ℝ) {a : Fin n → ℝ}
(hx0 : x 0 = a) :
(∑ i : Fin (m + 1),
dotProduct (x (cyclicSuccessor i) - x i) (xStar i) : ℝ) =
(∑ i : Fin m, dotProduct (x i.succ - x i.castSucc) (xStar i.castSucc)) +
dotProduct (a - x (Fin.last m)) (xStar (Fin.last m))
Helper for Theorem 5.24.11: the cyclic sum of the snoc-extended chain is the old candidate value plus the closing anchor tail.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_cyclicSum_snoc_eq_candidateValue_add_anchorTail
{n m : ℕ} (x xStar : Fin (m + 1) → Fin n → ℝ)
{a : Fin n → ℝ} (hx0 : x 0 = a) (xNew v : Fin n → ℝ) :
helperForTheorem_5_24_11_rockafellarCandidateValue (Fin.snoc x xNew) (Fin.snoc xStar v) a =
helperForTheorem_5_24_11_rockafellarCandidateValue x xStar xNew +
(((dotProduct (a - xNew) v : ℝ)) : EReal)
Helper for Theorem 5.24.11: cyclic monotonicity bounds every Rockafellar candidate at x by the affine functional determined by any graph point (x, v).
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_candidateUpperBound_of_cyclicMonotone
{n : ℕ} {ρ : (Fin n → ℝ) → Set (Fin n → ℝ)}
(hρ : IsCyclicallyMonotone ρ) {a x v : Fin n → ℝ} (hv : v ∈ ρ x) {q : EReal}
(hq : q ∈ helperForTheorem_5_24_11_rockafellarCandidateSet ρ a x) :
q ≤ (((dotProduct (x - a) v : ℝ)) : EReal)
Helper for Theorem 5.24.11: pointwise membership after adding a finite affine tail transports to the corresponding sSup inequality.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_sSup_add_realTail_le_of_pointwise_mem
(S T : Set EReal) (r : ℝ)
(hmem : ∀ q : EReal, q ∈ S → q + ((r : ℝ) : EReal) ∈ T) :
sSup S + ((r : ℝ) : EReal) ≤ sSup T
Helper for Theorem 5.24.11: appending one graph point yields the raw subgradient inequality for Rockafellar's path-supremum potential.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_graphPoint_isSubgradient_rawPotential
{n : ℕ} {ρ : (Fin n → ℝ) → Set (Fin n → ℝ)} {a x v : Fin n → ℝ}
(hv : v ∈ ρ x) :
let g : (Fin n → ℝ) → EReal := helperForTheorem_5_24_11_rockafellarPotential ρ a
dotProductEquiv ℝ (Fin n) v ∈ subdifferentialAt g x
Helper for Theorem 5.24.11: every graph point of ρ gives a finite value and a genuine raw subgradient of Rockafellar's supremum potential.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_graphPoint_mem_subdifferential_rawPotential
{n : ℕ} {ρ : (Fin n → ℝ) → Set (Fin n → ℝ)}
{a aStar x v : Fin n → ℝ} (hρ : IsCyclicallyMonotone ρ) (ha : aStar ∈ ρ a)
(hv : v ∈ ρ x) :
let g : (Fin n → ℝ) → EReal := helperForTheorem_5_24_11_rockafellarPotential ρ a
g x ≤ (((dotProduct (x - a) v : ℝ)) : EReal) ∧
g x ≠ (⊤ : EReal) ∧
g x ≠ (⊥ : EReal) ∧
dotProductEquiv ℝ (Fin n) v ∈ subdifferentialAt g x
Helper for Theorem 5.24.11: each fixed admissible chain contributes an affine function of the endpoint, so its value at a convex combination is bounded by the matching convex combination of endpoint upper bounds.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_candidateValue_convexCombination_realBound
{n m : ℕ} (x xStar : Fin (m + 1) → Fin n → ℝ)
{b μ0 μ1 : ℝ} {y0 y1 : Fin n → ℝ}
(hb : 0 ≤ b) (hb1 : b ≤ 1)
(h0 : helperForTheorem_5_24_11_rockafellarCandidateValue x xStar y0 ≤ ((μ0 : ℝ) : EReal))
(h1 : helperForTheorem_5_24_11_rockafellarCandidateValue x xStar y1 ≤ ((μ1 : ℝ) : EReal)) :
helperForTheorem_5_24_11_rockafellarCandidateValue x xStar ((1 - b) • y0 + b • y1) ≤
((((1 - b) * μ0 + b * μ1 : ℝ)) : EReal)
Helper for Theorem 5.24.11: Rockafellar's raw path-supremum potential is convex because it is the pointwise supremum of the affine-tail functions attached to admissible chains.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_rockafellarPotential_convex
{n : ℕ} {ρ : (Fin n → ℝ) → Set (Fin n → ℝ)} {a : Fin n → ℝ} :
ConvexFunction (helperForTheorem_5_24_11_rockafellarPotential ρ a)
Helper for Theorem 5.24.11: once the raw potential is known to be proper, every raw subgradient at a graph point survives passage to the closure potential.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_graphPoint_mem_subdifferential_closurePotential
{n : ℕ} {ρ : (Fin n → ℝ) → Set (Fin n → ℝ)}
{a aStar x v : Fin n → ℝ} (hρ : IsCyclicallyMonotone ρ) (ha : aStar ∈ ρ a)
(hgproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ))
(helperForTheorem_5_24_11_rockafellarPotential ρ a))
(hv : v ∈ ρ x) :
dotProductEquiv ℝ (Fin n) v ∈
subdifferentialAt
(convexFunctionClosure (helperForTheorem_5_24_11_rockafellarPotential ρ a)) x
Helper for Theorem 5.24.11: in the nonempty-graph branch, Rockafellar's chain-supremum construction should produce a closed proper convex potential whose Euclideanized subdifferential contains ρ pointwise.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_11_nonemptyGraph_exists_closedProperConvex_subdifferential_superset
{n : ℕ} {ρ : (Fin n → ℝ) → Set (Fin n → ℝ)}
(hρ : IsCyclicallyMonotone ρ) (hnonempty : ¬ ∀ x : Fin n → ℝ, ρ x = ∅) :
∃ f : (Fin n → ℝ) → EReal,
ClosedConvexFunction f ∧
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f ∧
∀ x : Fin n → ℝ,
ρ x ⊆ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)§24 — Differential Continuity and Monotonicity — Part 16
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 5.24.11: a multivalued mapping ρ : ℝ^n ⇉ ℝ^n is cyclically monotone if and only if there exists a closed proper convex function f on ℝ^n whose Euclideanized subdifferential contains ρ pointwise; in Lean this containment is ρ x ⊆ (dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x for every x.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
theorem exists_closedProperConvex_subdifferential_superset_iff_isCyclicallyMonotone {n : ℕ}
(ρ : (Fin n → ℝ) → Set (Fin n → ℝ)) :
(∃ f : (Fin n → ℝ) → EReal,
ClosedConvexFunction f ∧
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f ∧
∀ x : Fin n → ℝ,
ρ x ⊆ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)) ↔
IsCyclicallyMonotone ρ
Helper for Theorem 5.24.12: a common Euclideanized subgradient point already determines the additive gap between two proper convex functions.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_additive_constant_exists_at_common_graph_point
{n : ℕ} (f g : (Fin n → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
{x xStar : Fin n → ℝ}
(hxStarF : xStar ∈ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x))
(hxStarG : xStar ∈ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x)) :
∃ α : ℝ, g x = f x + ((α : ℝ) : EReal)
Helper for Theorem 5.24.12: primal Euclideanized fiber inclusion transports to the Fenchel conjugates by swapping the two Euclidean subgradient coordinates.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_conjugateFiberSubset_of_primalFiberSubset
{n : ℕ} (f g : (Fin n → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hsubset : ∀ x : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x)) :
∀ xStar : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt (fenchelConjugate n f) xStar) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt (fenchelConjugate n g) xStar)
Helper for Theorem 5.24.12: adding a finite real constant does not change Euclideanized subdifferential fibers.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_subdifferential_eq_of_eq_add_constant
{n : ℕ} {f g : (Fin n → ℝ) → EReal} {α : ℝ}
(hEq : ∀ x : Fin n → ℝ, g x = f x + ((α : ℝ) : EReal)) :
∀ x : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) =
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x)
Helper for Theorem 5.24.12: primal Euclideanized fiber inclusion persists after passing to a fixed-step secant quotient based at a finite anchor point.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_secantQuotientFiberSubset_of_primalFiberSubset
{n : ℕ} (f g : (Fin n → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hsubset : ∀ x : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x))
{x u : Fin n → ℝ} {t : ℝ}
(hxFiniteF : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(hxFiniteG : g x ≠ (⊤ : EReal) ∧ g x ≠ (⊥ : EReal))
(huFiniteF : f (x + t • u) ≠ (⊤ : EReal) ∧ f (x + t • u) ≠ (⊥ : EReal))
(huFiniteG : g (x + t • u) ≠ (⊤ : EReal) ∧ g (x + t • u) ≠ (⊥ : EReal))
(ht : 0 < t) :
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt
(fun v => directionalDifferenceQuotientAt f x v t) u) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt
(fun v => directionalDifferenceQuotientAt g x v t) u)
Helper for Theorem 5.24.12: once two nonempty scalar interval fibers are written with finite endpoints, equality of the interval sets forces equality of the two endpoint pairs.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_intervalSetEq_implies_derivativeEndpointsEq
{a1 b1 a2 b2 : EReal}
(ha1_top : a1 ≠ (⊤ : EReal)) (ha1_bot : a1 ≠ (⊥ : EReal))
(hb1_top : b1 ≠ (⊤ : EReal)) (hb1_bot : b1 ≠ (⊥ : EReal))
(ha2_top : a2 ≠ (⊤ : EReal)) (ha2_bot : a2 ≠ (⊥ : EReal))
(hb2_top : b2 ≠ (⊤ : EReal)) (hb2_bot : b2 ≠ (⊥ : EReal))
(hNonempty :
Set.Nonempty {x : ℝ | a1 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b1)})
(hEq :
{x : ℝ | a1 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b1)} =
{x : ℝ | a2 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b2)}) :
a1 = a2 ∧ b1 = b2
Helper for Theorem 5.24.12: inclusion of two finite nonempty scalar interval fibers already forces the corresponding derivative-band bounds in the only direction available from the inclusion.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_intervalSubset_implies_derivativeBandBounds
{a1 b1 a2 b2 : EReal}
(ha1_top : a1 ≠ (⊤ : EReal)) (ha1_bot : a1 ≠ (⊥ : EReal))
(hb1_top : b1 ≠ (⊤ : EReal)) (hb1_bot : b1 ≠ (⊥ : EReal))
(_ha2_top : a2 ≠ (⊤ : EReal)) (_ha2_bot : a2 ≠ (⊥ : EReal))
(_hb2_top : b2 ≠ (⊤ : EReal)) (_hb2_bot : b2 ≠ (⊥ : EReal))
(hNonempty :
Set.Nonempty {x : ℝ | a1 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b1)})
(hSubset :
{x : ℝ | a1 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b1)} ⊆
{x : ℝ | a2 ≤ ((x : ℝ) : EReal) ∧ (((x : ℝ) : EReal) ≤ b2)}) :
a2 ≤ a1 ∧ b1 ≤ b2
Helper for Theorem 5.24.12: once scalar fiber inclusion is rewritten through Theorem 5.24.2, the only remaining information is the corresponding one-sided derivative-band bounds.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_scalarRestrictionDerivativeBandBounds_of_primalFiberSubset
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{t : ℝ}
(htF : t ∈ interior (scalarEffectiveDomain F))
(htG : t ∈ interior (scalarEffectiveDomain G))
(hFiberSubset :
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ F (scalarPoint t)} ⊆
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ G (scalarPoint t)}) :
leftDerivativeExtension G t ≤ leftDerivativeExtension F t ∧
rightDerivativeExtension F t ≤ rightDerivativeExtension G t
Helper for Theorem 5.24.12: once the scalar derivative-band inequalities hold on every point of an open interval, the one-sided continuity of the derivative extensions upgrades them to pointwise equality of the left and right derivative extensions on that interval.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_derivativeBandBounds_on_Ioo_imply_scalarDerivativeExtensionsEq
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{a b : ℝ} (_hab : a < b)
(hband : ∀ t ∈ Set.Ioo a b,
leftDerivativeExtension G t ≤ leftDerivativeExtension F t ∧
rightDerivativeExtension F t ≤ rightDerivativeExtension G t) :
∀ x ∈ Set.Ioo a b,
leftDerivativeExtension G x = leftDerivativeExtension F x ∧
rightDerivativeExtension F x = rightDerivativeExtension G x
Helper for Theorem 5.24.12: if two one-dimensional scalar restrictions have the same scalar subdifferential fiber at an interior point, then their left and right derivative bands agree at that point.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_scalarRestrictionDerivativeBands_eq_of_commonScalarFibers
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{t : ℝ}
(htF : t ∈ interior (scalarEffectiveDomain F))
(htG : t ∈ interior (scalarEffectiveDomain G))
(hFiberEq :
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ F (scalarPoint t)} =
{xStar : ℝ | dotProductEquiv ℝ (Fin 1) (scalarPoint xStar) ∈ ∂ G (scalarPoint t)}) :
leftDerivativeExtension F t = leftDerivativeExtension G t ∧
rightDerivativeExtension F t = rightDerivativeExtension G t
Helper for Theorem 5.24.12: translating by a fixed primal base point rewrites the Euclideanized subdifferential fiber of the translated-difference function as the original fiber at the shifted point.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedDifference_subdifferential_eq_shifted
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x z : Fin n → ℝ)
(hxFinite : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt (translatedDifferenceFunctionAt f x) z) =
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f (x + z))
Helper for Theorem 5.24.12: pointwise Euclideanized primal-fiber inclusion is preserved after translating both functions by the same base point and subtracting the corresponding base value.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedDifferenceFiberSubset_of_primalFiberSubset
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x0 : Fin n → ℝ)
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hx0FiniteG : g x0 ≠ (⊤ : EReal) ∧ g x0 ≠ (⊥ : EReal))
(hsubset : ∀ x : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x)) :
∀ z : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt (translatedDifferenceFunctionAt f x0) z) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt (translatedDifferenceFunctionAt g x0) z)
Helper for Theorem 5.24.12: the translated-difference function vanishes at the origin when the base value is finite.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedDifference_zero
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x : Fin n → ℝ)
(hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
translatedDifferenceFunctionAt f x 0 = 0
Helper for Theorem 5.24.12: translated differences inherit proper convexity from the original proper convex function.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedDifference_properConvex
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (translatedDifferenceFunctionAt f x)
Helper for Theorem 5.24.12: translated differences of closed proper convex functions remain closed.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedDifference_closed
{n : ℕ} (f : (Fin n → ℝ) → EReal) (hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(x : Fin n → ℝ) (hx : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal)) :
ClosedConvexFunction (translatedDifferenceFunctionAt f x)§24 — Differential Continuity and Monotonicity — Part 17
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Theorem 5.24.12: translating a proper convex function by a relative-interior anchor places the origin in the relative interior of the translated effective domain.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_zero_mem_ri_effectiveDomain_translatedDifferenceAt_anchor
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x0 : Fin n → ℝ}
(hx0ri : x0 ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
(0 : Fin n → ℝ) ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (translatedDifferenceFunctionAt f x0))
Helper for Theorem 5.24.12: after translating at the anchor, Theorem 23.9 pulls every scalar subgradient of a line restriction back to an ambient translated subgradient, so ambient fiber inclusion descends to the scalar restriction.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_lineRestrictionFiberSubset_of_translatedDifferenceFiberSubset
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x0 : Fin n → ℝ)
(A : (Fin 1 → ℝ) →ₗ[ℝ] (Fin n → ℝ))
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hx0FiniteG : g x0 ≠ (⊤ : EReal) ∧ g x0 ≠ (⊥ : EReal))
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hx0ri : x0 ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hTranslatedSubset : ∀ z : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt f x0) z) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt g x0) z)) :
∀ t : ℝ,
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈
subdifferentialAt
(fun s => translatedDifferenceFunctionAt f x0 (A s)) (scalarPoint t)} ⊆
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈
subdifferentialAt
(fun s => translatedDifferenceFunctionAt g x0 (A s)) (scalarPoint t)}
Helper for Theorem 5.24.12: scalar line restrictions of translated differences stay closed proper convex, and the translation normalization makes them vanish at the scalar origin.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_lineRestriction_closedProper_data
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x0 : Fin n → ℝ)
(A : (Fin 1 → ℝ) →ₗ[ℝ] (Fin n → ℝ))
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hx0Finite : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal)) :
ClosedConvexFunction (fun s => translatedDifferenceFunctionAt f x0 (A s)) ∧
ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ))
(fun s => translatedDifferenceFunctionAt f x0 (A s)) ∧
(fun s => translatedDifferenceFunctionAt f x0 (A s)) (scalarPoint 0) = 0
Helper for Theorem 5.24.12: once two normalized scalar restrictions agree on the open segment Set.Ioo (0 : ℝ) 1, closedness identifies their endpoint values at t = 1.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_eq_on_Ioo_imply_endpoint_equality
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hEqIoo : ∀ t ∈ Set.Ioo (0 : ℝ) 1, F (scalarPoint t) = G (scalarPoint t)) :
F (scalarPoint 1) = G (scalarPoint 1)
Helper for Theorem 5.24.12: scalar toReal profiles are convex on Set.Ioo (0 : ℝ) 1 as soon as every point of that open segment is known to be finite.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_scalarToReal_convexOn_Ioo
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F) :
ConvexOn ℝ (Set.Ioo (0 : ℝ) 1) (fun u : ℝ => (F (scalarPoint u)).toReal)
Helper for Theorem 5.24.12: at an interior scalar point, the right derivative of the real toReal profile agrees with the toReal image of the extended right derivative.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_derivWithin_scalarToReal_eq_rightDerivativeExtension_toReal
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F)
{u : ℝ} (huIoo : u ∈ Set.Ioo (0 : ℝ) 1) :
derivWithin (fun v : ℝ => (F (scalarPoint v)).toReal) (Set.Ioi u) u =
(rightDerivativeExtension F u).toReal
Helper for Theorem 5.24.12: equal right derivative extensions on Set.Ioo (0 : ℝ) 1 already force equal value increments between any two interior points.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_incrementEq_on_Ioo_of_rightDerivativeExtensionEq
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F)
(hDomG : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain G)
(hRightEq : ∀ u ∈ Set.Ioo (0 : ℝ) 1,
rightDerivativeExtension F u = rightDerivativeExtension G u)
{s t : ℝ} (hs : s ∈ Set.Ioo (0 : ℝ) 1) (ht : t ∈ Set.Ioo (0 : ℝ) 1) :
(F (scalarPoint t)).toReal - (F (scalarPoint s)).toReal =
(G (scalarPoint t)).toReal - (G (scalarPoint s)).toReal
Helper for Theorem 5.24.12: once two normalized scalar restrictions have the same right derivative extension on Set.Ioo (0 : ℝ) 1, they agree at every interior point of that segment.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_rightDerivativeExtensionEq_on_Ioo_and_zero_imply_eq_on_Ioo
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F)
(hDomG : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain G)
(hRightEq : ∀ u ∈ Set.Ioo (0 : ℝ) 1,
rightDerivativeExtension F u = rightDerivativeExtension G u) :
∀ t ∈ Set.Ioo (0 : ℝ) 1, F (scalarPoint t) = G (scalarPoint t)
Helper for Theorem 5.24.12: scalar toReal profiles are convex on an arbitrary cutoff segment Set.Ioo (0 : ℝ) τ once every point of that segment is finite.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_scalarToReal_convexOn_Ioo_cutoff
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
{τ : ℝ} (_hTauPos : 0 < τ)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F) :
ConvexOn ℝ (Set.Ioo (0 : ℝ) τ) (fun u : ℝ => (F (scalarPoint u)).toReal)
Helper for Theorem 5.24.12: at an interior cutoff-segment point, the right derivative of the real toReal profile agrees with the toReal image of the extended right derivative.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_derivWithin_scalarToReal_eq_rightDerivativeExtension_toReal_cutoff
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
{τ : ℝ} (_hTauPos : 0 < τ)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F)
{u : ℝ} (huIoo : u ∈ Set.Ioo (0 : ℝ) τ) :
derivWithin (fun v : ℝ => (F (scalarPoint v)).toReal) (Set.Ioi u) u =
(rightDerivativeExtension F u).toReal§24 — Differential Continuity and Monotonicity — Part 18
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Theorem 5.24.12: equal right derivative extensions on a cutoff interval Set.Ioo (0 : ℝ) τ already force equal value increments between any two points of that segment.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_incrementEq_on_Ioo_of_rightDerivativeExtensionEq_cutoff
(F G : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{τ : ℝ} (hTauPos : 0 < τ)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F)
(hDomG : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain G)
(hRightEq : ∀ u ∈ Set.Ioo (0 : ℝ) τ,
rightDerivativeExtension F u = rightDerivativeExtension G u)
{s t : ℝ} (hs : s ∈ Set.Ioo (0 : ℝ) τ) (ht : t ∈ Set.Ioo (0 : ℝ) τ) :
(F (scalarPoint t)).toReal - (F (scalarPoint s)).toReal =
(G (scalarPoint t)).toReal - (G (scalarPoint s)).toReal
Helper for Theorem 5.24.12: once two normalized scalar restrictions have the same right derivative extension on Set.Ioo (0 : ℝ) τ, they agree at every interior point of that cutoff segment.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_rightDerivativeExtensionEq_on_Ioo_and_zero_imply_eq_on_Ioo_cutoff
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{τ : ℝ} (hTauPos : 0 < τ)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F)
(hDomG : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain G)
(hRightEq : ∀ u ∈ Set.Ioo (0 : ℝ) τ,
rightDerivativeExtension F u = rightDerivativeExtension G u) :
∀ t ∈ Set.Ioo (0 : ℝ) τ, F (scalarPoint t) = G (scalarPoint t)
Helper for Theorem 5.24.12: the scalar fiber inclusion on a cutoff interval (0,τ) already forces equality of the two translated scalar restrictions on that whole initial segment; the case τ = 0 is vacuous.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_eq_on_initialSegment_of_primalFiberSubset_allowingZeroCutoff
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{τ : ℝ} (hTauNonneg : 0 ≤ τ) (_hTauLeOne : τ ≤ 1)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F)
(hTauDomG : τ ∈ scalarEffectiveDomain G)
(hLineSubset :
∀ t : ℝ,
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt F (scalarPoint t)} ⊆
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt G (scalarPoint t)}) :
∀ u ∈ Set.Ioo (0 : ℝ) τ, F (scalarPoint u) = G (scalarPoint u)
Helper for Theorem 5.24.12: equality of two translated scalar restrictions on the open cutoff segment (0,τ) propagates to equality at the cutoff endpoint itself.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_cutoffEndpointEquality_of_primalFiberSubset
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
{τ : ℝ} (hTauPos : 0 < τ)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hEqIoo : ∀ u ∈ Set.Ioo (0 : ℝ) τ, F (scalarPoint u) = G (scalarPoint u)) :
F (scalarPoint τ) = G (scalarPoint τ)
Helper for Theorem 5.24.12: if the target point lies in dom f, the translated scalar line restriction from the anchor x0 to that point has the same endpoint value for f and g.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_endpointEquality_of_primalFiberSubset
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x0 y : Fin n → ℝ)
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hx0FiniteG : g x0 ≠ (⊤ : EReal) ∧ g x0 ≠ (⊥ : EReal))
(hyDomF : y ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hx0ri : x0 ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hTranslatedSubset : ∀ z : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt f x0) z) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt g x0) z)) :
translatedDifferenceFunctionAt f x0 (y - x0) =
translatedDifferenceFunctionAt g x0 (y - x0)
Helper for Theorem 5.24.12: once the translated endpoint values agree, the common anchor relation g x0 = f x0 + α unfolds that equality into g y = f y + α.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedEndpointEquality_implies_valueEqualityAtTarget
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x0 y : Fin n → ℝ) (α : ℝ)
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hEndpoint :
translatedDifferenceFunctionAt f x0 (y - x0) =
translatedDifferenceFunctionAt g x0 (y - x0))
(hα0 : g x0 = f x0 + ((α : ℝ) : EReal)) :
g y = f y + ((α : ℝ) : EReal)
Helper for Theorem 5.24.12: outside the scalar effective domain of a proper one-dimensional restriction, the value must already be ⊤ because properness forbids ⊥.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_scalarValue_eq_top_of_not_mem_scalarEffectiveDomain
(H : (Fin 1 → ℝ) → EReal)
{t : ℝ} (htOff : t ∉ scalarEffectiveDomain H) :
H (scalarPoint t) = (⊤ : EReal)
Helper for Theorem 5.24.12: once the translated scalar restriction is finite at 0 but not at 1, convexity forces the endpoint 1 to lie strictly to the right of the scalar effective domain.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_endpoint_rightExterior_of_offDomainTarget
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hF0 : F (scalarPoint 0) = 0)
(h1Off : (1 : ℝ) ∉ scalarEffectiveDomain F) :
IsRightOfScalarEffectiveDomain F 1
Helper for Theorem 5.24.12: if τ is the supremum of the scalar effective domain of F cut back to [0,1], then every point of (0,τ) still lies in the scalar effective domain.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_mem_scalarEffectiveDomain_of_lt_cutoff
(F : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hF0 : F (scalarPoint 0) = 0)
{u : ℝ}
(hu : u ∈ Set.Ioo (0 : ℝ) (sSup (scalarEffectiveDomain F ∩ Set.Icc (0 : ℝ) 1))) :
u ∈ scalarEffectiveDomain F
Helper for Theorem 5.24.12: if τ is the cutoff supremum of the scalar effective domain of F inside [0,1] and G stays finite at 1, then τ lies in the scalar effective domain of G, every point of (0,τ) lies in the scalar effective domain of F, and every point of (τ,1) is strictly to the right of the scalar effective domain of F.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_cutoffData_of_offDomainEndpointAssumption
(F G : (Fin 1 → ℝ) → EReal)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(h1OffF : (1 : ℝ) ∉ scalarEffectiveDomain F)
(hG0 : G (scalarPoint 0) = 0)
(h1DomG : (1 : ℝ) ∈ scalarEffectiveDomain G) :
let τ := sSup (scalarEffectiveDomain F ∩ Set.Icc (0 : ℝ) 1)
0 ≤ τ ∧ τ ≤ 1 ∧
(∀ u ∈ Set.Ioo (0 : ℝ) τ, u ∈ scalarEffectiveDomain F) ∧
τ ∈ scalarEffectiveDomain G ∧
(∀ z ∈ Set.Ioo τ 1, IsRightOfScalarEffectiveDomain F z)
Helper for Theorem 5.24.12: if the scalar effective domain of F already fills the open unit segment and the scalar fibers of F are pointwise contained in those of G, then closedness forces the endpoint values at t = 1 to agree.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_endpointEquality_of_scalarFiberSubset_on_unitInterval
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hDomF : ∀ u ∈ Set.Ioo (0 : ℝ) 1, u ∈ scalarEffectiveDomain F)
(hLineSubset :
∀ t : ℝ,
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt F (scalarPoint t)} ⊆
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt G (scalarPoint t)}) :
F (scalarPoint 1) = G (scalarPoint 1)
Helper for Theorem 5.24.12: if every point strictly to the right of a cutoff τ < 1 already lies to the right of the scalar effective domain, then the extended right derivative at τ is forced to be ⊤ by right continuity.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_rightDerivativeExtension_eq_top_at_cutoff_of_rightExteriorTail
(F : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
{τ : ℝ} (hTauLtOne : τ < 1)
(hRightOfCutoff : ∀ z ∈ Set.Ioo τ 1, IsRightOfScalarEffectiveDomain F z) :
rightDerivativeExtension F τ = (⊤ : EReal)§24 — Differential Continuity and Monotonicity — Part 19
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 5.24.12: the Euclideanized subdifferential mappings of closed proper convex functions on ℝ^n are exactly the maximal cyclically monotone mappings ρ : ℝ^n ⇉ ℝ^n. Moreover, a closed proper convex function is uniquely determined by its Euclideanized subdifferential mapping up to an additive real constant.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
theorem isMaximalCyclicallyMonotone_iff_exists_closedProperConvex_subdifferential_eq_and_unique_up_to_constant
{n : ℕ} (ρ : (Fin n → ℝ) → Set (Fin n → ℝ)) :
(IsMaximalCyclicallyMonotone ρ ↔
∃ f : (Fin n → ℝ) → EReal,
ClosedConvexFunction f ∧
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f ∧
∀ x : Fin n → ℝ,
ρ x = ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x)) ∧
(∀ f g : (Fin n → ℝ) → EReal,
ClosedConvexFunction f →
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f →
ClosedConvexFunction g →
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g →
(∀ x : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) =
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x)) →
∃ α : ℝ, ∀ x : Fin n → ℝ,
g x = f x + ((α : ℝ) : EReal))
Helper for Theorem 5.24.12: the translated scalar line restriction has a nonempty scalar subdifferential at 0 because the ambient translated difference has nonempty subdifferential at the relative-interior anchor and linear precomposition pushes that witness to the line.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_translatedLine_subdifferentialNonempty_at_zero
{n : ℕ} (f : (Fin n → ℝ) → EReal) (x0 : Fin n → ℝ)
(A : (Fin 1 → ℝ) →ₗ[ℝ] (Fin n → ℝ))
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hx0ri : x0 ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
Set.Nonempty
(subdifferentialAt
(fun s => translatedDifferenceFunctionAt f x0 (A s)) (scalarPoint 0))
Helper for Theorem 5.24.12: in the genuine cutoff case τ = 0, a finite endpoint value of G would force an upper bound on the scalar fiber of G at 0, while the translated scalar fiber of F at 0 contains arbitrarily large slopes once rightDerivativeExtension F 0 = ⊤.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_tauZero_contradiction_of_offDomainEndpointAssumption
(F G : (Fin 1 → ℝ) → EReal)
(hclosedF : ClosedConvexFunction F)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) F)
(hclosedG : ClosedConvexFunction G)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin 1 → ℝ)) G)
(hF0 : F (scalarPoint 0) = 0)
(hG0 : G (scalarPoint 0) = 0)
(hLineSubset :
∀ t : ℝ,
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt F (scalarPoint t)} ⊆
{ξ : ℝ |
dotProductEquiv ℝ (Fin 1) (scalarPoint ξ) ∈ subdifferentialAt G (scalarPoint t)})
(hSub0F : Set.Nonempty (subdifferentialAt F (scalarPoint 0)))
(hRightF0 : rightDerivativeExtension F 0 = (⊤ : EReal))
(h1DomG : (1 : ℝ) ∈ scalarEffectiveDomain G) :
False
Helper for Theorem 5.24.12: in the off-domain branch of the globalization argument, it remains to prove that the translated scalar restriction for g also blows up at the endpoint t = 1.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_offDomainTarget_valueEqTop_of_primalFiberSubset
{n : ℕ} (f g : (Fin n → ℝ) → EReal) (x0 y : Fin n → ℝ)
(hx0FiniteF : f x0 ≠ (⊤ : EReal) ∧ f x0 ≠ (⊥ : EReal))
(hx0FiniteG : g x0 ≠ (⊤ : EReal) ∧ g x0 ≠ (⊥ : EReal))
(hyOffF : y ∉ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hx0ri : x0 ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hTranslatedSubset : ∀ z : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt f x0) z) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹'
subdifferentialAt (translatedDifferenceFunctionAt g x0) z)) :
g y = (⊤ : EReal)
Helper for Theorem 5.24.12: the missing globalization step should upgrade pointwise Euclideanized primal-fiber inclusion between closed proper convex functions to a single additive constant.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_primalFiberSubset_implies_eq_up_to_constant
{n : ℕ} (f g : (Fin n → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hsubset : ∀ x : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x)) :
∃ α : ℝ, ∀ x : Fin n → ℝ,
g x = f x + ((α : ℝ) : EReal)
Helper for Theorem 5.24.12: once the stronger inclusion-to-constant engine is available, pointwise Euclideanized subdifferential inclusion collapses to equality.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_subdifferentialSubset_between_closedProperConvex_isEquality
{n : ℕ} (f g : (Fin n → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hsubset : ∀ x : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) ⊆
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x)) :
∀ x : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) =
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x)
Helper for Theorem 5.24.12: the Euclideanized subdifferential of a closed proper convex function is maximal cyclically monotone.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_realizedSubdifferential_isMaximal
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hclosed : ClosedConvexFunction f)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) :
IsMaximalCyclicallyMonotone
(fun x : Fin n → ℝ =>
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x))
Helper for Theorem 5.24.12: equal Euclideanized subdifferential mappings force closed proper convex functions to differ by an additive real constant.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_5_24_12_equalSubdifferentials_imply_eq_up_to_constant
{n : ℕ} (f g : (Fin n → ℝ) → EReal)
(hclosedF : ClosedConvexFunction f)
(hproperF : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hclosedG : ClosedConvexFunction g)
(hproperG : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) g)
(hEq : ∀ x : Fin n → ℝ,
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x) =
((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt g x)) :
∃ α : ℝ, ∀ x : Fin n → ℝ,
g x = f x + ((α : ℝ) : EReal)§24 — Differential Continuity and Monotonicity — Part 20
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The scalar graph of a one-dimensional multivalued mapping ρ : ℝ ⇉ ℝ, obtained by identifying both the domain and codomain with ℝ.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
def oneDimensionalMultivaluedMappingScalarGraph
(ρ : (Fin 1 → ℝ) → Set (Fin 1 → ℝ)) : Set (ℝ × ℝ) :=
{p : ℝ × ℝ | scalarPoint p.2 ∈ ρ (scalarPoint p.1)}
Remark 5.24.4: when n = 1, monotone mappings are exactly the mappings whose scalar graphs are totally ordered in ℝ² by the coordinatewise partial order. Consequently, maximal monotone mappings are exactly those whose scalar graphs are complete non-decreasing curves. Moreover, in one dimension the notions of monotone and cyclically monotone mappings coincide.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
theorem oneDimensional_monotoneMultivaluedMapping_graph_order_maximality_and_cyclicMonotonicity
(ρ : (Fin 1 → ℝ) → Set (Fin 1 → ℝ)) :
(IsMonotoneMultivaluedMapping ρ ↔
IsCoordinatewiseTotallyOrdered (oneDimensionalMultivaluedMappingScalarGraph ρ)) ∧
(IsMaximalMonotoneMultivaluedMapping ρ ↔
IsCompleteNondecreasingCurve (oneDimensionalMultivaluedMappingScalarGraph ρ)) ∧
(IsMonotoneMultivaluedMapping ρ ↔ IsCyclicallyMonotone ρ)
Helper for Remark 5.24.4: every vector in Fin 1 → ℝ is the scalar point determined by its unique coordinate.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForRemark_5_24_4_eq_scalarPoint (x : Fin 1 → ℝ) :
scalarPoint (x 0) = x
Helper for Remark 5.24.4: in dimension one, the monotonicity dot product is just the product of the scalar coordinate differences.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForRemark_5_24_4_dotProduct_eq_scalarMul
(x0 x1 x0Star x1Star : Fin 1 → ℝ) :
dotProduct (x1 - x0) (x1Star - x0Star) =
(x1 0 - x0 0) * (x1Star 0 - x0Star 0)
Helper for Remark 5.24.4: inclusion of scalar graphs is the same as fiberwise inclusion along the scalar identification ℝ ≃ Fin 1 → ℝ.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForRemark_5_24_4_scalarGraph_subset_iff_pointwiseSubset
{ρ σ : (Fin 1 → ℝ) → Set (Fin 1 → ℝ)} :
oneDimensionalMultivaluedMappingScalarGraph ρ ⊆
oneDimensionalMultivaluedMappingScalarGraph σ ↔
∀ x : ℝ, ρ (scalarPoint x) ⊆ σ (scalarPoint x)
Helper for Remark 5.24.4: inclusion of multivalued graphs is equivalent to pointwise fiber inclusion.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForRemark_5_24_4_multivaluedMappingGraph_subset_iff_pointwiseSubset
{ρ σ : (Fin 1 → ℝ) → Set (Fin 1 → ℝ)} :
multivaluedMappingGraph ρ ⊆ multivaluedMappingGraph σ ↔
∀ x : Fin 1 → ℝ, ρ x ⊆ σ x
Helper for Remark 5.24.4: equality of scalar graphs recovers equality of the underlying one-dimensional fibers.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForRemark_5_24_4_fiberEq_of_scalarGraphEq
{ρ σ : (Fin 1 → ℝ) → Set (Fin 1 → ℝ)}
(hEq :
oneDimensionalMultivaluedMappingScalarGraph ρ =
oneDimensionalMultivaluedMappingScalarGraph σ) :
∀ x : Fin 1 → ℝ, ρ x = σ x
Helper for Remark 5.24.4: equality of multivalued graphs is equivalent to equality of the underlying one-dimensional fibers.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForRemark_5_24_4_fiberEq_of_multivaluedMappingGraphEq
{ρ σ : (Fin 1 → ℝ) → Set (Fin 1 → ℝ)}
(hEq : multivaluedMappingGraph ρ = multivaluedMappingGraph σ) :
∀ x : Fin 1 → ℝ, ρ x = σ x
Helper for Remark 5.24.4: a one-dimensional multivalued mapping is monotone exactly when its scalar graph is totally ordered by the coordinatewise order on ℝ².
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForRemark_5_24_4_monotone_iff_scalarGraph_coordinatewiseOrdered
(ρ : (Fin 1 → ℝ) → Set (Fin 1 → ℝ)) :
IsMonotoneMultivaluedMapping ρ ↔
IsCoordinatewiseTotallyOrdered (oneDimensionalMultivaluedMappingScalarGraph ρ)
Helper for Remark 5.24.4: any coordinatewise totally ordered subset of ℝ² extends to a maximal one.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForRemark_5_24_4_exists_maximalCoordinatewiseExtension
(Γ : Set (ℝ × ℝ)) (hΓ : IsCoordinatewiseTotallyOrdered Γ) :
∃ Δ : Set (ℝ × ℝ), Γ ⊆ Δ ∧ IsMaximalCoordinatewiseTotallyOrdered Δ
Helper for Remark 5.24.4: maximal monotonicity of a one-dimensional multivalued mapping is equivalent to maximal coordinatewise total ordering of its scalar graph.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForRemark_5_24_4_maximalMonotone_iff_scalarGraph_maximalCoordinatewise
(ρ : (Fin 1 → ℝ) → Set (Fin 1 → ℝ)) :
IsMaximalMonotoneMultivaluedMapping ρ ↔
IsMaximalCoordinatewiseTotallyOrdered (oneDimensionalMultivaluedMappingScalarGraph ρ)
Helper for Remark 5.24.4: in one dimension, every monotone multivalued mapping is already cyclically monotone.
open scoped ConvexAnalysis
open scoped Topology
open scoped Pointwise
lemma helperForRemark_5_24_4_monotone_implies_cyclicallyMonotone
(ρ : (Fin 1 → ℝ) → Set (Fin 1 → ℝ))
(hmonotone : IsMonotoneMultivaluedMapping ρ) :
IsCyclicallyMonotone ρ§25 — Differentiability of Convex Functions — Part 1
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The first-order error quotient for an EReal-valued function along finite-valued points.
open scoped Topology
open scoped Pointwise
noncomputable def erealGradientErrorQuotient {n : Nat} (f : (Fin n → Real) → EReal)
(x g : Fin n → Real) : (Fin n → Real) → Real :=
fun z => (((f z - f x).toReal) - g ⬝ᵥ (z - x)) / ‖z - x‖
An EReal-valued function has gradient g at x when f x is finite and the normalized first-order error tends to 0 as z → x through finite-valued points of the punctured neighborhood of x.
open scoped Topology
open scoped Pointwise
noncomputable def HasERealGradientAt {n : Nat} (f : (Fin n → Real) → EReal)
(x g : Fin n → Real) : Prop :=
f x ≠ ⊤ ∧ f x ≠ ⊥ ∧
Filter.Tendsto (erealGradientErrorQuotient f x g)
(nhdsWithin x
({z | z ≠ x} ∩ effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(nhds 0)
Definition 25.1: an EReal-valued function on ℝ^n is differentiable at x when there exists a vector g such that f x is finite and (f z - f x - g ⬝ᵥ (z - x)) / ‖z - x‖ → 0 as z → x through punctured nearby points where f is finite. In addition, nearby punctured points are eventually finite-valued, so the first-order expansion can be evaluated along every sufficiently short ray.
open scoped Topology
open scoped Pointwise
noncomputable def ERealDifferentiableAt {n : Nat} (f : (Fin n → Real) → EReal)
(x : Fin n → Real) : Prop :=
∃ g : Fin n → Real,
HasERealGradientAt f x g ∧
(∀ᶠ z in nhdsWithin x ({z | z ≠ x}),
z ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f ∧ f z ≠ ⊥)
A chosen gradient witness for an EReal-differentiable function at x.
open scoped Topology
open scoped Pointwise
noncomputable def erealGradientAt {n : Nat} {f : (Fin n → Real) → EReal}
{x : Fin n → Real} (hf : ERealDifferentiableAt f x) : Fin n → Real :=
Classical.choose hf
The chosen differentiability witness satisfies the first-order expansion predicate.
open scoped Topology
open scoped Pointwise
theorem ERealDifferentiableAt.hasERealGradientAt {n : Nat} {f : (Fin n → Real) → EReal}
{x : Fin n → Real} (hf : ERealDifferentiableAt f x) :
HasERealGradientAt f x (erealGradientAt hf)
Differentiability at x forces f x to be finite.
open scoped Topology
open scoped Pointwise
theorem ERealDifferentiableAt.finiteAt {n : Nat} {f : (Fin n → Real) → EReal}
{x : Fin n → Real} (hf : ERealDifferentiableAt f x) :
f x ≠ ⊤ ∧ f x ≠ ⊥
Differentiability at x includes eventual finite-valued control on the punctured neighborhood of x.
open scoped Topology
open scoped Pointwise
theorem ERealDifferentiableAt.eventually_finiteValuedWithin_punctured
{n : Nat} {f : (Fin n → Real) → EReal} {x : Fin n → Real}
(hf : ERealDifferentiableAt f x) :
∀ᶠ z in nhdsWithin x ({z | z ≠ x}),
z ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f ∧ f z ≠ ⊥
Two gradients satisfying the first-order expansion at the same point coincide once nearby punctured points are eventually finite-valued.
open scoped Topology
open scoped Pointwise
theorem erealGradient_unique {n : Nat} {f : (Fin n → Real) → EReal} {x g₁ g₂ : Fin n → Real}
(hfinite :
∀ᶠ z in nhdsWithin x ({z | z ≠ x}),
z ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f ∧ f z ≠ ⊥)
(hg₁ : HasERealGradientAt f x g₁) (hg₂ : HasERealGradientAt f x g₂) : g₁ = g₂
Helper for Theorem 25.1: a gradient witness together with eventual finite-valued control identifies every nonzero directional difference quotient limit.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_directionalDifferenceQuotient_tendsto_dotGradient_of_hasERealGradientAt
{n : Nat} {f : (Fin n → Real) → EReal} {x g y : Fin n → Real}
(hg : HasERealGradientAt f x g)
(hfinite :
∀ᶠ z in nhdsWithin x ({z | z ≠ x}),
z ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f ∧ f z ≠ ⊥)
(hy : y ≠ 0) :
Filter.Tendsto (directionalDifferenceQuotientAt f x y)
(nhdsWithin (0 : Real) (Set.Ioi 0))
(nhds (((g ⬝ᵥ y : Real) : EReal)))
Helper for Theorem 25.1: a positive step in a nonzero direction never returns to the base point.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_nonzero_ray_ne {n : Nat} {x y : Fin n → Real}
(hy : y ≠ 0) {t : Real} (ht : 0 < t) :
x + t • y ≠ x
Helper for Theorem 25.1: the positive ray t ↦ x + t • y tends to x through the punctured neighborhood whenever y ≠ 0.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_tendsto_ray_to_puncturedNeighborhood
{n : Nat} {x y : Fin n → Real} (hy : y ≠ 0) :
Filter.Tendsto (fun t : Real => x + t • y)
(nhdsWithin (0 : Real) (Set.Ioi 0))
(nhdsWithin x {z | z ≠ x})
Helper for Theorem 25.1: eventual effective-domain membership along a positive ray upgrades to eventual membership in the punctured effective-domain filter used by HasERealGradientAt.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_eventually_mem_puncturedEffectiveDomain_of_eventually_mem_effectiveDomain_ray
{n : Nat} {f : (Fin n → Real) → EReal} {x y : Fin n → Real}
(hy : y ≠ 0)
(hray : ∀ᶠ t in nhdsWithin (0 : Real) (Set.Ioi 0),
x + t • y ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f) :
∀ᶠ t in nhdsWithin (0 : Real) (Set.Ioi 0),
x + t • y ∈
({z | z ≠ x} ∩ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
Helper for Theorem 25.1: under eventual finite-valued control on the ray, the ray map tends into the punctured effective-domain neighborhood of x.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_tendsto_ray_to_puncturedEffectiveDomain
{n : Nat} {f : (Fin n → Real) → EReal} {x y : Fin n → Real}
(hy : y ≠ 0)
(hray : ∀ᶠ t in nhdsWithin (0 : Real) (Set.Ioi 0),
x + t • y ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f) :
Filter.Tendsto (fun t : Real => x + t • y)
(nhdsWithin (0 : Real) (Set.Ioi 0))
(nhdsWithin x
({z | z ≠ x} ∩ effectiveDomain (Set.univ : Set (Fin n → Real)) f))
Helper for Theorem 25.1: differentiability identifies each nonzero directional difference quotient limit with the dot product against the chosen gradient witness.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_directionalDifferenceQuotient_tendsto_dotGradient {n : Nat}
{f : (Fin n → Real) → EReal} {x y : Fin n → Real}
(hf : ERealDifferentiableAt f x) (hy : y ≠ 0) :
Filter.Tendsto (directionalDifferenceQuotientAt f x y)
(nhdsWithin (0 : Real) (Set.Ioi 0))
(nhds ((((erealGradientAt hf) ⬝ᵥ y : Real) : EReal)))
Helper for Theorem 25.1: equality of all Euclidean pairings forces equality of the underlying vectors.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_eq_of_dotProduct_eq {n : Nat} {g₁ g₂ : Fin n → Real}
(hdot : ∀ y : Fin n → Real, g₁ ⬝ᵥ y = g₂ ⬝ᵥ y) :
g₁ = g₂
Helper for Theorem 25.1: differentiability identifies the upper directional derivative with the gradient pairing, and therefore the chosen gradient is a Euclidean subgradient.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_gradient_gives_subgradient_and_directionalDerivative {n : Nat}
{f : (Fin n → Real) → EReal} (hf : ConvexFunction f) {x : Fin n → Real}
(hdiff : ERealDifferentiableAt f x) :
(∀ y : Fin n → Real,
upperDirectionalDerivativeAt f x y =
((((erealGradientAt hdiff) ⬝ᵥ y : Real) : Real) : EReal)) ∧
IsSubgradientAt f x (dotProductEquiv Real (Fin n) (erealGradientAt hdiff))
Helper for Theorem 25.1: a unique Euclidean subgradient already forces properness, interiority of the effective domain, and a linear directional derivative formula.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_uniqueSubgradient_implies_linearDirectionalDerivative {n : Nat}
{f : (Fin n → Real) → EReal} (hf : ConvexFunction f) {x : Fin n → Real}
(hx : f x ≠ ⊤ ∧ f x ≠ ⊥)
(huniq : ∃! g : Fin n → Real, IsSubgradientAt f x (dotProductEquiv Real (Fin n) g)) :
∃ g : Fin n → Real,
ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f ∧
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f) ∧
∀ y : Fin n → Real,
upperDirectionalDerivativeAt f x y = (((g ⬝ᵥ y : Real) : Real) : EReal)
Helper for Theorem 25.1: an open set containing x contains a smaller closed ball around x.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_exists_closedBall_subset_of_isOpen {n : Nat}
{C : Set (Fin n → Real)} (hCopen : IsOpen C) {x : Fin n → Real} (hx : x ∈ C) :
∃ r : Real, 0 < r ∧ Metric.closedBall x r ⊆ C
Helper for Theorem 25.1: linearity of the upper directional derivative identifies g as the Euclidean subgradient at x.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_subgradient_of_linearDirectionalDerivative {n : Nat}
{f : (Fin n → Real) → EReal} {x g : Fin n → Real}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(hxInt : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hdir :
∀ y : Fin n → Real,
upperDirectionalDerivativeAt f x y = (((g ⬝ᵥ y : Real) : Real) : EReal)) :
IsSubgradientAt f x (dotProductEquiv Real (Fin n) g)
Helper for Theorem 25.1: interior-domain membership provides a closed ball that stays inside the effective domain.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_exists_closedBall_subset_effectiveDomain {n : Nat}
{f : (Fin n → Real) → EReal} {x : Fin n → Real}
(hxInt : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
∃ ρ : Real, 0 < ρ ∧
Metric.closedBall x ρ ⊆ effectiveDomain (Set.univ : Set (Fin n → Real)) f
Helper for Theorem 25.1: interior-domain membership provides a closed ball that stays inside the interior of the effective domain.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_exists_closedBall_subset_interior_effectiveDomain {n : Nat}
{f : (Fin n → Real) → EReal} {x : Fin n → Real}
(hxInt : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
∃ ρ : Real, 0 < ρ ∧
Metric.closedBall x ρ ⊆ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
Helper for Theorem 25.1: on the closed ball supplied by interiority, all values of f are finite.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_exists_closedBall_finiteValues {n : Nat}
{f : (Fin n → Real) → EReal} {x : Fin n → Real}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(hxInt : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
∃ ρ : Real, 0 < ρ ∧
∀ z : Fin n → Real, z ∈ Metric.closedBall x ρ → f z ≠ ⊤ ∧ f z ≠ ⊥
Helper for Theorem 25.1: the dyadic scales used to compare arbitrary small secants with one fixed remainder function.
open scoped Topology
open scoped Pointwise
noncomputable def helperForTheorem_25_1_dyadicScale (ρ : Real) : Nat → Real :=
fun i => ρ / (2 : Real) ^ (i + 2)
Helper for Theorem 25.1: the dyadic real-valued remainder family whose uniform convergence to zero would imply differentiability.
open scoped Topology
open scoped Pointwise
noncomputable def helperForTheorem_25_1_dyadicRemainder {n : Nat}
(f : (Fin n → Real) → EReal) (x g : Fin n → Real) (ρ : Real) :
Nat → (Fin n → Real) → Real :=
fun i u =>
let τ := helperForTheorem_25_1_dyadicScale ρ i
((((f (x + τ • u)).toReal - (f x).toReal) - τ * (g ⬝ᵥ u)) / τ)
Helper for Theorem 25.1: every dyadic comparison scale is positive.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_dyadicScale_pos {ρ : Real} (hρpos : 0 < ρ) (i : Nat) :
0 < helperForTheorem_25_1_dyadicScale ρ i
Helper for Theorem 25.1: every dyadic comparison scale stays below the ambient finite-valued radius.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_dyadicScale_le_radius {ρ : Real} (hρpos : 0 < ρ) (i : Nat) :
helperForTheorem_25_1_dyadicScale ρ i ≤ ρ
Helper for Theorem 25.1: the dyadic scales approach zero along atTop.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_dyadicScale_tendsto_zero {ρ : Real} :
Filter.Tendsto (helperForTheorem_25_1_dyadicScale ρ) Filter.atTop (nhds 0)
Helper for Theorem 25.1: directions in the closed unit ball stay inside the closed finite ball after one dyadic step.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_step_mem_closedBall_of_mem_closedUnitBall {n : Nat}
{x u : Fin n → Real} {ρ : Real} (hρpos : 0 < ρ) (i : Nat)
(hu : u ∈ Metric.closedBall (0 : Fin n → Real) 1) :
x + helperForTheorem_25_1_dyadicScale ρ i • u ∈ Metric.closedBall x ρ
Helper for Theorem 25.1: each dyadic remainder function is continuous on the closed unit ball once the comparison ball stays inside the interior of the effective domain.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_remainderSequence_continuousOn_closedUnitBall {n : Nat}
{f : (Fin n → Real) → EReal} {x g : Fin n → Real} {ρ : Real}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(hxInt : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hρpos : 0 < ρ)
(hρsub :
Metric.closedBall x ρ ⊆ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
∀ i, ContinuousOn (helperForTheorem_25_1_dyadicRemainder f x g ρ i)
(Metric.closedBall (0 : Fin n → Real) 1)
Helper for Theorem 25.1: for a fixed direction in the closed unit ball, the dyadic remainder sequence is antitone, nonnegative, and tends to 0.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_remainderSequence_antitone_nonneg_tendsto_zero {n : Nat}
{f : (Fin n → Real) → EReal} {x g u : Fin n → Real} {ρ : Real}
(hf : ConvexFunction f)
(hxFinite : f x ≠ ⊤ ∧ f x ≠ ⊥)
(hρpos : 0 < ρ)
(hfiniteStep :
∀ i,
f (x + helperForTheorem_25_1_dyadicScale ρ i • u) ≠ ⊤ ∧
f (x + helperForTheorem_25_1_dyadicScale ρ i • u) ≠ ⊥)
(hdiru :
upperDirectionalDerivativeAt f x u = (((g ⬝ᵥ u : Real) : Real) : EReal))
(hsub : IsSubgradientAt f x (dotProductEquiv Real (Fin n) g)) :
Antitone (fun i => helperForTheorem_25_1_dyadicRemainder f x g ρ i u) ∧
(∀ i, 0 ≤ helperForTheorem_25_1_dyadicRemainder f x g ρ i u) ∧
Filter.Tendsto (fun i => helperForTheorem_25_1_dyadicRemainder f x g ρ i u)
Filter.atTop (nhds 0)
Helper for Theorem 25.1: Dini's theorem upgrades the dyadic remainder sequence to uniform convergence on the closed unit ball.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_1_remainderSequence_tendstoUniformlyOn_closedUnitBall {n : Nat}
{f : (Fin n → Real) → EReal} {x g : Fin n → Real} {ρ : Real}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(hxInt : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hρpos : 0 < ρ)
(hρsub :
Metric.closedBall x ρ ⊆ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hdir :
∀ y : Fin n → Real,
upperDirectionalDerivativeAt f x y = (((g ⬝ᵥ y : Real) : Real) : EReal))
(hsub : IsSubgradientAt f x (dotProductEquiv Real (Fin n) g)) :
TendstoUniformlyOn (helperForTheorem_25_1_dyadicRemainder f x g ρ) (fun _ => 0)
Filter.atTop (Metric.closedBall (0 : Fin n → Real) 1)§25 — Differentiability of Convex Functions — Part 2
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 25.1: let f be convex and finite at x. Then differentiability at x makes the chosen gradient witness ∇ f(x) the unique Euclidean subgradient of f at x, so in particular f z ≥ f x + ⟨∇ f(x), z - x⟩ for every z. Conversely, if f has a unique Euclidean subgradient at x, then f is differentiable at x.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
theorem convexFunction_differentiableAt_iff_gradient_is_unique_subgradient {n : Nat}
(f : (Fin n → Real) → EReal) (hf : ConvexFunction f) (x : Fin n → Real)
(hx : f x ≠ ⊤ ∧ f x ≠ ⊥) :
(∀ hdiff : ERealDifferentiableAt f x,
IsSubgradientAt f x (dotProductEquiv Real (Fin n) (erealGradientAt hdiff)) ∧
(∀ z : Fin n → Real,
f z ≥ f x + ((((erealGradientAt hdiff) ⬝ᵥ (z - x)) : Real) : EReal)) ∧
∀ g : Fin n → Real,
IsSubgradientAt f x (dotProductEquiv Real (Fin n) g) → g = erealGradientAt hdiff) ∧
((∃! g : Fin n → Real, IsSubgradientAt f x (dotProductEquiv Real (Fin n) g)) →
ERealDifferentiableAt f x)
Variant of Theorem 25.1: for a convex function finite at x, differentiability at x is equivalent to the subtype of Euclidean subgradients g with dotProductEquiv ℝ (Fin n) g ∈ ∂ f x being a Unique type.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
theorem convexFunction_differentiableAt_iff_unique_subgradient_subtype {n : Nat}
(f : (Fin n → Real) → EReal) (hf : ConvexFunction f) (x : Fin n → Real)
(hx : f x ≠ ⊤ ∧ f x ≠ ⊥) :
ERealDifferentiableAt f x ↔
Nonempty (Unique {g : Fin n → Real // dotProductEquiv ℝ (Fin n) g ∈ ∂ f x})
Corollary 25.1.1: if f is convex and differentiable at x, then f is proper on ℝ^n and x lies in the interior of the effective domain dom f.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
theorem convexFunction_proper_and_mem_interior_of_differentiableAt {n : Nat}
(f : (Fin n → Real) → EReal) (hf : ConvexFunction f) (x : Fin n → Real)
(hdiff : ERealDifferentiableAt f x) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f ∧
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
Theorem 25.1.1: if f is differentiable at x, then for every nonzero direction y, the right directional difference quotient converges to ⟨∇ f(x), y⟩.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
theorem ERealDifferentiableAt.tendsto_directionalDifferenceQuotient {n : Nat}
{f : (Fin n → Real) → EReal} {x y : Fin n → Real}
(hf : ERealDifferentiableAt f x) (hy : y ≠ 0) :
Filter.Tendsto (directionalDifferenceQuotientAt f x y)
(nhdsWithin (0 : Real) (Set.Ioi 0))
(nhds ((((erealGradientAt hf) ⬝ᵥ y : Real) : EReal)))
A function has jth coordinate partial derivative L at x when the difference quotient along the jth standard basis vector Pi.single j 1 tends to L as the scalar parameter tends to 0 from both sides.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
def HasCoordinatePartialDerivativeAt {n : Nat} (f : (Fin n → Real) → EReal)
(x : Fin n → Real) (j : Fin n) (L : EReal) : Prop :=
Filter.Tendsto (directionalDifferenceQuotientAt f x (Pi.single j (1 : Real)))
(𝓝[>] (0 : Real))
(𝓝 L) ∧
Filter.Tendsto (directionalDifferenceQuotientAt f x (Pi.single j (1 : Real)))
(𝓝[<] (0 : Real))
(𝓝 L)
Theorem 25.1.2: if f is differentiable at x, then for each coordinate index j, the partial derivative with respect to ξ_j, viewed as the bilateral directional derivative along the standard basis vector e_j = Pi.single j 1, exists and equals ⟨∇ f(x), e_j⟩.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
theorem ERealDifferentiableAt.hasCoordinatePartialDerivativeAt {n : Nat}
{f : (Fin n → Real) → EReal} {x : Fin n → Real}
(hf : ERealDifferentiableAt f x) (j : Fin n) :
HasCoordinatePartialDerivativeAt f x j
(((((erealGradientAt hf) ⬝ᵥ Pi.single j (1 : Real)) : Real) : EReal))
Helper for Theorem 25.1: normalizing the displacement from x to a punctured point produces a direction in the closed unit ball and a radial decomposition of that point.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
lemma helperForTheorem_25_1_normalizedDirection_mem_closedUnitBall {n : Nat}
{x z : Fin n → Real} (hzx : z ≠ x) :
0 < ‖z - x‖ ∧
((1 / ‖z - x‖) • (z - x)) ∈ Metric.closedBall (0 : Fin n → Real) 1 ∧
z = x + ‖z - x‖ • ((1 / ‖z - x‖) • (z - x))
Helper for Theorem 25.1: after rewriting a punctured nearby point in normalized radial form, its error quotient lies between 0 and the dyadic remainder at any larger fixed scale.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
lemma helperForTheorem_25_1_errorQuotient_le_remainderAt_fixedScale {n : Nat}
{f : (Fin n → Real) → EReal} {x g : Fin n → Real} {ρ : Real}
(hf : ConvexFunction f)
(hxFinite : f x ≠ ⊤ ∧ f x ≠ ⊥)
(hsub : IsSubgradientAt f x (dotProductEquiv Real (Fin n) g))
(hρpos : 0 < ρ) (N : Nat) {z : Fin n → Real} (hzx : z ≠ x)
(hzFinite : f z ≠ ⊤ ∧ f z ≠ ⊥)
(hstepFinite :
f (x + helperForTheorem_25_1_dyadicScale ρ N • ((1 / ‖z - x‖) • (z - x))) ≠ ⊤ ∧
f (x + helperForTheorem_25_1_dyadicScale ρ N • ((1 / ‖z - x‖) • (z - x))) ≠ ⊥)
(hzle : ‖z - x‖ ≤ helperForTheorem_25_1_dyadicScale ρ N) :
((1 / ‖z - x‖) • (z - x)) ∈ Metric.closedBall (0 : Fin n → Real) 1 ∧
0 ≤ erealGradientErrorQuotient f x g z ∧
erealGradientErrorQuotient f x g z ≤
helperForTheorem_25_1_dyadicRemainder f x g ρ N
((1 / ‖z - x‖) • (z - x))
Helper for Theorem 25.1: a uniform dyadic remainder bound makes the punctured error quotient eventually ε-small in the metric neighborhood filter.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
lemma helperForTheorem_25_1_uniformBound_implies_errorQuotient_eventually_small {n : Nat}
{f : (Fin n → Real) → EReal} {x g : Fin n → Real} {ρ ρ' eps : Real}
(hf : ConvexFunction f)
(hxFinite : f x ≠ ⊤ ∧ f x ≠ ⊥)
(hsub : IsSubgradientAt f x (dotProductEquiv Real (Fin n) g))
(hρpos : 0 < ρ) (hρ'pos : 0 < ρ')
(hρ'finite :
∀ z : Fin n → Real, z ∈ Metric.closedBall x ρ' → f z ≠ ⊤ ∧ f z ≠ ⊥)
(hRuniform :
TendstoUniformlyOn (helperForTheorem_25_1_dyadicRemainder f x g ρ) (fun _ => 0)
Filter.atTop (Metric.closedBall (0 : Fin n → Real) 1))
(heps : 0 < eps) :
∀ᶠ z in
nhdsWithin x ({z | z ≠ x} ∩ effectiveDomain (Set.univ : Set (Fin n → Real)) f),
dist (erealGradientErrorQuotient f x g z) 0 < eps
Helper for Theorem 25.1: if the upper directional derivative is already linear on the interior of the effective domain of a proper convex function, then the first-order error quotient vanishes and f is differentiable at x.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
lemma helperForTheorem_25_1_linearDirectionalDerivative_implies_ERealDifferentiableAt {n : Nat}
{f : (Fin n → Real) → EReal} {x g : Fin n → Real}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(hxInt : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hdir :
∀ y : Fin n → Real,
upperDirectionalDerivativeAt f x y = (((g ⬝ᵥ y : Real) : Real) : EReal)) :
ERealDifferentiableAt f x
Helper for Theorem 25.1.1: a positive step in a nonzero direction cannot stay at the base point.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
lemma helperForTheorem_25_1_1_nonzero_ray_ne {n : Nat} {x y : Fin n → Real}
(hy : y ≠ 0) {t : Real} (ht : 0 < t) :
x + t • y ≠ x
Helper for Theorem 25.1.1: the positive ray t ↦ x + t • y tends to x through the punctured neighborhood when y ≠ 0.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
lemma helperForTheorem_25_1_1_tendsto_ray_to_puncturedNeighborhood
{n : Nat} {x y : Fin n → Real} (hy : y ≠ 0) :
Filter.Tendsto (fun t : Real => x + t • y)
(nhdsWithin (0 : Real) (Set.Ioi 0))
(nhdsWithin x {z | z ≠ x})
Helper for Theorem 25.1.1: an eventual positive-ray effective-domain hypothesis upgrades to eventual membership in the punctured effective-domain set used by HasERealGradientAt.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
lemma helperForTheorem_25_1_1_eventually_mem_puncturedEffectiveDomain_of_eventually_mem_effectiveDomain_ray
{n : Nat} {f : (Fin n → Real) → EReal} {x y : Fin n → Real}
(hy : y ≠ 0)
(hray : ∀ᶠ t in nhdsWithin (0 : Real) (Set.Ioi 0),
x + t • y ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f) :
∀ᶠ t in nhdsWithin (0 : Real) (Set.Ioi 0),
x + t • y ∈
({z | z ≠ x} ∩ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
Helper for Theorem 25.1.1: under the eventual positive-ray effective-domain hypothesis, the ray parameterization tends to the punctured effective-domain neighborhood of x.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
lemma helperForTheorem_25_1_1_tendsto_ray_to_puncturedEffectiveDomain
{n : Nat} {f : (Fin n → Real) → EReal} {x y : Fin n → Real}
(hy : y ≠ 0)
(hray : ∀ᶠ t in nhdsWithin (0 : Real) (Set.Ioi 0),
x + t • y ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f) :
Filter.Tendsto (fun t : Real => x + t • y)
(nhdsWithin (0 : Real) (Set.Ioi 0))
(nhdsWithin x
({z | z ≠ x} ∩ effectiveDomain (Set.univ : Set (Fin n → Real)) f))
Helper for Theorem 25.1.2: the jth standard basis vector in ℝⁿ is nonzero.
open scoped Topology
open scoped Pointwise
open scoped ConvexAnalysis
lemma helperForTheorem_25_1_2_basisVector_ne_zero {n : Nat} (j : Fin n) :
(Pi.single j (1 : Real) : Fin n → Real) ≠ 0§25 — Differentiability of Convex Functions — Part 3
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 25.1.3: if f is differentiable at x, then the jth coordinate of ∇ f(x) is the jth partial derivative of f at x; consequently, for every nonzero direction y = (η_1, …, η_n), the directional derivative is ∑ j, (∂f / ∂ξ_j)(x) * η_j.
open scoped Topology
open scoped Pointwise
theorem ERealDifferentiableAt.coordinatePartials_and_directionalDerivative_formula {n : Nat}
{f : (Fin n → Real) → EReal} {x : Fin n → Real}
(hf : ERealDifferentiableAt f x) :
(∀ j : Fin n,
HasCoordinatePartialDerivativeAt f x j
((((erealGradientAt hf) j : Real) : EReal))) ∧
∀ y : Fin n → Real, y ≠ 0 →
Filter.Tendsto (directionalDifferenceQuotientAt f x y)
(nhdsWithin (0 : Real) (Set.Ioi 0))
(nhds (((∑ j : Fin n, (erealGradientAt hf) j * y j : Real) : EReal)))
Corollary 25.1.1.1: if f is convex and x ∈ interior (dom f), then (1) f is differentiable at x if and only if (2) cl f is differentiable at x. In this case ∇ (cl f) (x) = ∇ f (x).
open scoped Topology
open scoped Pointwise
theorem convexFunction_differentiableAt_iff_convexFunctionClosure_differentiableAt_and_gradient_eq
{n : Nat} (f : (Fin n → Real) → EReal) (hf : ConvexFunction f) (x : Fin n → Real)
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
(ERealDifferentiableAt f x ↔ ERealDifferentiableAt (convexFunctionClosure f) x) ∧
∀ (hdiff : ERealDifferentiableAt f x)
(hcldiff : ERealDifferentiableAt (convexFunctionClosure f) x),
erealGradientAt hcldiff = erealGradientAt hdiff
Helper for Corollary 25.1.1.1: an interior effective-domain point lies in the relative interior of the Euclidean preimage of that domain.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_1_1_mem_preimageRi_of_mem_interior_effectiveDomain
{n : Nat} {f : (Fin n → Real) → EReal} {x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
(EuclideanSpace.equiv (ι := Fin n) (𝕜 := Real)).symm x ∈
euclideanRelativeInterior n
((fun z : EuclideanSpace Real (Fin n) => (z : Fin n → Real)) ⁻¹'
effectiveDomain (Set.univ : Set (Fin n → Real)) f)
Helper for Corollary 25.1.1.1: an interior effective-domain point with finite value forces properness.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_1_1_proper_of_mem_interior_effectiveDomain_and_ne_bot
{n : Nat} {f : (Fin n → Real) → EReal} (hf : ConvexFunction f) {x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hxbot : f x ≠ (⊥ : EReal)) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f
Helper for Corollary 25.1.1.1: the convex closure agrees with the original function at every interior effective-domain point of a proper convex function.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_1_1_closure_eq_at_interior_point
{n : Nat} {f : (Fin n → Real) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
convexFunctionClosure f x = f x
Helper for Corollary 25.1.1.1: pointwise closure agreement transports vector subgradients between f and cl f.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_1_1_subgradient_iff_closure_subgradient_at_interior_point
{n : Nat} {f : (Fin n → Real) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{x g : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
IsSubgradientAt (convexFunctionClosure f) x (dotProductEquiv Real (Fin n) g) ↔
IsSubgradientAt f x (dotProductEquiv Real (Fin n) g)
Helper for Corollary 25.1.1.1: uniqueness of the vector subgradient is unchanged by passing to the convex closure at an interior point.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_1_1_uniqueSubgradient_iff_closure_uniqueSubgradient
{n : Nat} {f : (Fin n → Real) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
(∃! g : Fin n → Real, IsSubgradientAt f x (dotProductEquiv Real (Fin n) g)) ↔
(∃! g : Fin n → Real,
IsSubgradientAt (convexFunctionClosure f) x (dotProductEquiv Real (Fin n) g))
Helper for Corollary 25.1.2: a linear functional on ℝⁿ × ℝ splits into its horizontal and vertical parts.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_2_linearMap_apply_prod {n : Nat}
(l : ((Fin n → Real) × Real) →ₗ[Real] Real) (x : Fin n → Real) (μ : Real) :
l (x, μ) = l (x, (0 : Real)) + μ * l ((0 : Fin n → Real), (1 : Real))
Helper for Corollary 25.1.2: an exposed point of epi f* determines a point of unique primal Fenchel attainment for f*.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_2_exposedPoint_yields_unique_primalAttainment
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(p : (Fin n → Real) × Real)
(hp : IsExposedPoint (epigraph (Set.univ : Set (Fin n → Real)) (fenchelConjugate n f)) p) :
∃ x : Fin n → Real,
p.2 = (fenchelConjugate n f p.1).toReal ∧
PrimalFenchelSupremumAttainedAt (fenchelConjugate n f) p.1 x ∧
(∀ y : Fin n → Real,
PrimalFenchelSupremumAttainedAt (fenchelConjugate n f) y x → y = p.1)
Helper for Corollary 25.1.2: a convex set in ℝ^n has the same interior as its closure.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_2_interior_closure_eq_interior_of_convex
{n : Nat} (S : Set (EuclideanSpace Real (Fin n))) (hS : Convex Real S) :
interior (closure S) = interior S
Helper for Corollary 25.1.2: unique attainment for f* gives the unique Euclidean subgradient of cl f at the primal point.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_2_uniqueClosureSubgradient_of_uniqueConjugateAttainment
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{xStar x : Fin n → Real}
(hatt : PrimalFenchelSupremumAttainedAt (fenchelConjugate n f) xStar x)
(huniq : ∀ y : Fin n → Real,
PrimalFenchelSupremumAttainedAt (fenchelConjugate n f) y x → y = xStar) :
IsSubgradientAt (convexFunctionClosure f) x (dotProductEquiv Real (Fin n) xStar) ∧
∀ g : Fin n → Real,
IsSubgradientAt (convexFunctionClosure f) x (dotProductEquiv Real (Fin n) g) →
g = xStar
Helper for Corollary 25.1.2: interior points of dom (cl f) are already interior points of dom f.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_2_mem_interior_effectiveDomain_of_closure_mem_interior
{n : Nat} {f : (Fin n → Real) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{x : Fin n → Real}
(hxcl :
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) (convexFunctionClosure f))) :
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
Helper for Corollary 25.1.2: unique primal attainment for f* forces differentiability of f at the corresponding primal point and identifies the gradient.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_2_differentiablePoint_of_unique_conjugateAttainment
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{xStar x : Fin n → Real}
(hatt : PrimalFenchelSupremumAttainedAt (fenchelConjugate n f) xStar x)
(huniq : ∀ y : Fin n → Real,
PrimalFenchelSupremumAttainedAt (fenchelConjugate n f) y x → y = xStar) :
∃ hdiff : ERealDifferentiableAt f x, erealGradientAt hdiff = xStar
Helper for Corollary 25.1.2: equality of the canonical exposing functional on epi f* forces the epigraph point to lie on the graph of f*.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_2_epigraphEquality_forces_graphHeight
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{x g : Fin n → Real}
(hatt : PrimalFenchelSupremumAttainedAt (fenchelConjugate n f) g x)
{q : (Fin n → Real) × Real}
(hq : q ∈ epigraph (Set.univ : Set (Fin n → Real)) (fenchelConjugate n f))
(hEq : dotProduct x q.1 - q.2 =
dotProduct x g - (fenchelConjugate n f g).toReal) :
q.2 = (fenchelConjugate n f q.1).toReal§25 — Differentiability of Convex Functions — Part 4
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Corollary 25.1.2: for a proper convex function f on ℝ^n, a point of epi f* is an exposed point exactly when it is the graph point (xStar, f*(xStar)) above a vector xStar that occurs as the gradient of f at some differentiability point x.
open scoped Topology
open scoped Pointwise
theorem isExposedPoint_epigraph_fenchelConjugate_iff_exists_differentiable_point
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(p : (Fin n → Real) × Real) :
IsExposedPoint (epigraph (Set.univ : Set (Fin n → Real)) (fenchelConjugate n f)) p ↔
∃ (x : Fin n → Real) (hdiff : ERealDifferentiableAt f x),
p = (erealGradientAt hdiff,
(fenchelConjugate n f (erealGradientAt hdiff)).toReal)
Corollary 25.1.3: let C be a nonempty closed convex set, and let g be a positively homogeneous proper convex function such that C = {z | ∀ y, ⟨y, z⟩ ≤ g(y)}. Then z is an exposed point of C if and only if there exists y such that g is differentiable at y and ∇ g(y) = z. In particular, g may be taken to be the support function of C.
open scoped Topology
open scoped Pointwise
theorem isExposedPoint_iff_exists_gradient_of_differentiable_positivelyHomogeneous_properConvex
{n : Nat} (C : Set (Fin n → Real)) (g : (Fin n → Real) → EReal) (z : Fin n → Real)
(hCne : C.Nonempty) (hCclosed : IsClosed C) (hCconv : Convex ℝ C)
(hgproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) g)
(hgpos : PositivelyHomogeneous g)
(hCeq :
C =
{z : Fin n → Real |
∀ y : Fin n → Real, ((dotProduct y z : Real) : EReal) ≤ g y}) :
IsExposedPoint C z ↔
∃ y : Fin n → Real, ∃ hdiff : ERealDifferentiableAt g y, erealGradientAt hdiff = z
Theorem 25.2: let f be convex on ℝ^n, and let x be a point where f is finite. Then f is differentiable at x if and only if there exists a vector g such that for every direction y, the directional derivative f'(x; y) equals ⟨g, y⟩. Moreover, if the n two-sided coordinate partial derivatives of f at x all exist and are finite, then this linearity condition holds.
open scoped Topology
open scoped Pointwise
theorem convexFunction_differentiableAt_iff_directionalDerivativeHasGradient_and_coordinatePartials_imply_linearity
{n : Nat}
(f : (Fin n → Real) → EReal) (hf : ConvexFunction f) (x : Fin n → Real)
(hx : f x ≠ ⊤ ∧ f x ≠ ⊥) :
(ERealDifferentiableAt f x ↔
∃ g : Fin n → Real,
∀ y : Fin n → Real,
upperDirectionalDerivativeAt f x y = (((g ⬝ᵥ y : Real) : Real) : EReal)) ∧
((∀ j : Fin n, ∃ L : Real, HasCoordinatePartialDerivativeAt f x j (L : EReal)) →
∃ g : Fin n → Real,
∀ y : Fin n → Real,
upperDirectionalDerivativeAt f x y = (((g ⬝ᵥ y : Real) : Real) : EReal))
Helper for Corollary 25.1.2: a differentiability point of f exposes the corresponding graph point of f*.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_2_exposedPoint_of_differentiablePoint
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(x : Fin n → Real) (hdiff : ERealDifferentiableAt f x) :
IsExposedPoint
(epigraph (Set.univ : Set (Fin n → Real)) (fenchelConjugate n f))
(erealGradientAt hdiff, (fenchelConjugate n f (erealGradientAt hdiff)).toReal)
Helper for Corollary 25.1.3: the convex closure of g is the support function of the set cut out by its linear minorants.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_3_closure_eq_supportFunction
{n : Nat} (C : Set (Fin n → Real)) (g : (Fin n → Real) → EReal)
(hgproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) g)
(hgpos : PositivelyHomogeneous g)
(hCeq :
C =
{z : Fin n → Real |
∀ y : Fin n → Real, ((dotProduct y z : Real) : EReal) ≤ g y}) :
convexFunctionClosure g = supportFunctionEReal C
Helper for Corollary 25.1.3: after representing a linear functional by a dot product, its maximizers on C are exactly the Euclidean support-function subgradients at the representing vector.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_3_mem_maximizers_iff_supportFunctionSubgradient
{n : Nat} (C : Set (Fin n → Real))
(hCne : C.Nonempty) (hCclosed : IsClosed C) (hCconv : Convex ℝ C)
{l : (Fin n → Real) →ₗ[ℝ] Real} {y x : Fin n → Real}
(hy : ∀ w : Fin n → Real, l w = w ⬝ᵥ y) :
x ∈ maximizers C l ↔ IsEuclideanSubgradientAt (supportFunctionEReal C) y x
Helper for Corollary 25.1.3: exposed points of a closed convex set are exactly gradients of differentiability points of its support function.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_3_isExposedPoint_iff_exists_gradient_supportFunction
{n : Nat} (C : Set (Fin n → Real)) (z : Fin n → Real)
(hCne : C.Nonempty) (hCclosed : IsClosed C) (hCconv : Convex ℝ C) :
IsExposedPoint C z ↔
∃ y : Fin n → Real,
∃ hdiff : ERealDifferentiableAt (supportFunctionEReal C) y,
erealGradientAt hdiff = z
Helper for Corollary 25.1.3: differentiability points of convexFunctionClosure g are exactly the differentiability points of g, with the same gradient.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_1_3_exists_gradient_closure_iff_exists_gradient_original
{n : Nat} (g : (Fin n → Real) → EReal) (z : Fin n → Real)
(hgproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) g) :
(∃ y : Fin n → Real,
∃ hdiff : ERealDifferentiableAt (convexFunctionClosure g) y,
erealGradientAt hdiff = z) ↔
(∃ y : Fin n → Real, ∃ hdiff : ERealDifferentiableAt g y, erealGradientAt hdiff = z)
Helper for Theorem 25.2: coercing a finite real sum into EReal equals summing the coerced terms.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_2_coe_finset_sum_real_toEReal {ι : Type} (s : Finset ι)
(f : ι → Real) :
(((Finset.sum s f : Real)) : EReal) =
Finset.sum s (fun i => ((f i : Real) : EReal))
Helper for Theorem 25.2: a linear directional-derivative formula forces a unique vector subgradient at the base point.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_2_uniqueSubgradient_of_linearDirectionalDerivative
{n : Nat} {f : (Fin n → Real) → EReal} (hf : ConvexFunction f) {x : Fin n → Real}
(hx : f x ≠ ⊤ ∧ f x ≠ ⊥) {g : Fin n → Real}
(hdir :
∀ y : Fin n → Real,
upperDirectionalDerivativeAt f x y = (((g ⬝ᵥ y : Real) : Real) : EReal)) :
∃! v : Fin n → Real, IsSubgradientAt f x (dotProductEquiv Real (Fin n) v)
Helper for Theorem 25.2: a bilateral coordinate partial derivative pins down the upper directional derivative on the corresponding signed basis directions.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_2_basisValues_of_coordinatePartials
{n : Nat} {f : (Fin n → Real) → EReal} {x : Fin n → Real}
(hf : ConvexFunction f) (hx : f x ≠ ⊤ ∧ f x ≠ ⊥)
(j : Fin n) (L : Real)
(hpartial : HasCoordinatePartialDerivativeAt f x j (L : EReal)) :
let e : Fin n → Real := Pi.single j (1 : Real)
upperDirectionalDerivativeAt f x e = (L : EReal) ∧
upperDirectionalDerivativeAt f x (-e) = ((-L : Real) : EReal)
Helper for Theorem 25.2: convexity plus positive homogeneity propagates real upper bounds through vector addition.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_2_add_upper_bound_of_convex_posHom
{n : Nat} {D : (Fin n → Real) → EReal}
(hpos : PositivelyHomogeneous D) (hconv : ConvexFunction D)
{u v : Fin n → Real} {μ ν : Real}
(hu : D u ≤ (μ : EReal)) (hv : D v ≤ (ν : EReal)) :
D (u + v) ≤ ((μ + ν : Real) : EReal)
Helper for Theorem 25.2: once the signed basis values are known, positive homogeneity fixes the directional derivative on every coordinate ray.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_2_scaled_basis_value_of_signed_basis_values
{n : Nat} {D : (Fin n → Real) → EReal}
(hpos : PositivelyHomogeneous D) (hzero : D 0 = 0)
{e : Fin n → Real} {L a : Real}
(he : D e = (L : EReal))
(hneg : D (-e) = ((-L : Real) : EReal)) :
D (a • e) = ((a * L : Real) : EReal)
Helper for Theorem 25.2: the signed-basis values determine a global upper bound for the directional derivative.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_2_upper_bound_from_signed_basis_values
{n : Nat} {D : (Fin n → Real) → EReal}
(hpos : PositivelyHomogeneous D) (hconv : ConvexFunction D) (hzero : D 0 = 0)
(g : Fin n → Real)
(hbasis : ∀ j : Fin n,
D (Pi.single j (1 : Real)) = (g j : EReal) ∧
D (-(Pi.single j (1 : Real) : Fin n → Real)) = ((-g j : Real) : EReal)) :
∀ y : Fin n → Real, D y ≤ (((g ⬝ᵥ y : Real) : Real) : EReal)
Helper for Theorem 25.2: finite bilateral coordinate partials force the full directional derivative map to be linear.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_2_coordinatePartials_imply_linearDirectionalDerivative
{n : Nat} {f : (Fin n → Real) → EReal} (hf : ConvexFunction f) (x : Fin n → Real)
(hx : f x ≠ ⊤ ∧ f x ≠ ⊥)
(hpartials : ∀ j : Fin n, ∃ L : Real, HasCoordinatePartialDerivativeAt f x j (L : EReal)) :
∃ g : Fin n → Real,
∀ y : Fin n → Real,
upperDirectionalDerivativeAt f x y = (((g ⬝ᵥ y : Real) : Real) : EReal)
Helper for Theorem 25.3: at an interior point of the open interval, ordinary differentiability is equivalent to equality of the left and right one-sided derivatives.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_3_hasDerivAt_iff_eq_left_right_derivWithin
{I : Set ℝ} (hIopen : IsOpen I) {f : ℝ → ℝ} (hf : ConvexOn ℝ I f) {x : ℝ} (hx : x ∈ I) :
HasDerivAt f (deriv f x) x ↔
derivWithin f (Set.Iio x) x = derivWithin f (Set.Ioi x) x
Helper for Theorem 25.3: a right derivative taken at a point to the left of y is bounded above by the left derivative at y.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_3_rightDeriv_le_leftDeriv_of_lt
{I : Set ℝ} (hIopen : IsOpen I) {f : ℝ → ℝ} (hf : ConvexOn ℝ I f)
{x y : ℝ} (hx : x ∈ I) (hy : y ∈ I) (hxy : x < y) :
derivWithin f (Set.Ioi x) x ≤ derivWithin f (Set.Iio y) y
Helper for Theorem 25.3: on the differentiability set D, the ordinary derivative agrees with either one-sided derivative selector.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_3_deriv_eq_oneSidedDerivWithin_on_D
{I : Set ℝ} {f : ℝ → ℝ} :
let D : Set ℝ := {x | x ∈ I ∧ HasDerivAt f (deriv f x) x}
Set.EqOn (deriv f) (fun x => derivWithin f (Set.Ioi x) x) D ∧
Set.EqOn (deriv f) (fun x => derivWithin f (Set.Iio x) x) D
Helper for Theorem 25.3: every nondifferentiability point in I is a discontinuity point of the right-derivative selector restricted to I.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_3_nondiff_subset_rightDeriv_discontinuitySet
{I : Set ℝ} (hIopen : IsOpen I) {f : ℝ → ℝ} (hf : ConvexOn ℝ I f) :
let D : Set ℝ := {x | x ∈ I ∧ HasDerivAt f (deriv f x) x}
I \ D ⊆ {x ∈ I | ¬ ContinuousWithinAt (fun x => derivWithin f (Set.Ioi x) x) I x}§25 — Differentiability of Convex Functions — Part 5
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 25.3: if f is a finite convex function on an open interval I ⊆ ℝ, and D = {x ∈ I | f' x exists}, then I \ D is countable, D is dense in I, and the derivative function f', represented in Lean by deriv f, is continuous and nondecreasing on D.
open scoped Topology
open scoped Pointwise
theorem convexOn_openInterval_countable_nondifferentiabilitySet_dense_and_deriv_continuousOn_monotoneOn
{I : Set ℝ} (hIopen : IsOpen I) (hIconv : Convex ℝ I) {f : ℝ → ℝ} (hf : ConvexOn ℝ I f) :
let D : Set ℝ := {x | x ∈ I ∧ HasDerivAt f (deriv f x) x}
Set.Countable (I \ D) ∧
I ⊆ closure D ∧
ContinuousOn (deriv f) D ∧
MonotoneOn (deriv f) D
Theorem 25.4: let f be a proper convex function on ℝ^n, fix a nonzero direction y, and let D = {x ∈ int (dom f) | lim_{λ → 0} (f (x + λ y) - f x) / λ exists}. Equivalently, by the bilateral directional-derivative criterion from Section 23, D is the set of interior points where f'(x; y) = -f'(x; -y).
open scoped Topology
open scoped Pointwise
theorem properConvex_fixedDirection_mem_bilateralDirectionalDerivativeSet_iff
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(y : Fin n → Real) (hy : y ≠ 0) :
let D : Set (Fin n → Real) :=
{x |
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f) ∧
upperDirectionalDerivativeAt f x y = -upperDirectionalDerivativeAt f x (-y)}
∀ x : Fin n → Real,
x ∈ D ↔
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f) ∧
HasBilateralDirectionalDerivativeAt f x y
Helper for Theorem 25.3: on a small interval (x, b) ⊆ I, the right-derivative selector at x is the greatest lower bound of its strict-right tail.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_3_rightDerivWithin_isGLB_on_Ioo
{I : Set ℝ} (hIopen : IsOpen I) {f : ℝ → ℝ} (hf : ConvexOn ℝ I f)
{x b : ℝ} (hx : x ∈ I) (hxb : x < b) (hIoo : Set.Ioo x b ⊆ I) :
IsGLB ((fun t => derivWithin f (Set.Ioi t) t) '' Set.Ioo x b)
(derivWithin f (Set.Ioi x) x)
Helper for Theorem 25.3: on a small interval (a, x) ⊆ I, the left-derivative selector at x is the least upper bound of its strict-left tail.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_3_leftDerivWithin_isLUB_on_Ioo
{I : Set ℝ} (hIopen : IsOpen I) {f : ℝ → ℝ} (hf : ConvexOn ℝ I f)
{a x : ℝ} (hx : x ∈ I) (hax : a < x) (hIoo : Set.Ioo a x ⊆ I) :
IsLUB ((fun t => derivWithin f (Set.Iio t) t) '' Set.Ioo a x)
(derivWithin f (Set.Iio x) x)
Helper for Theorem 25.3: the right-derivative selector is right-continuous at every point of the open interval I.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_3_rightDerivWithin_rightContinuousOn_openInterval
{I : Set ℝ} (hIopen : IsOpen I) {f : ℝ → ℝ} (hf : ConvexOn ℝ I f)
{x : ℝ} (hx : x ∈ I) :
Filter.Tendsto (fun t => derivWithin f (Set.Ioi t) t) (𝓝[>] x)
(𝓝 (derivWithin f (Set.Ioi x) x))
Helper for Theorem 25.3: the left-derivative selector is left-continuous at every point of the open interval I.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_3_leftDerivWithin_leftContinuousOn_openInterval
{I : Set ℝ} (hIopen : IsOpen I) {f : ℝ → ℝ} (hf : ConvexOn ℝ I f)
{x : ℝ} (hx : x ∈ I) :
Filter.Tendsto (fun t => derivWithin f (Set.Iio t) t) (𝓝[<] x)
(𝓝 (derivWithin f (Set.Iio x) x))
Helper for Theorem 25.3: on the differentiability set D, the derivative is continuous within D at each point because its left and right restrictions agree with the corresponding one-sided derivative selectors.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_3_deriv_continuousWithinAt_on_D
{I : Set ℝ} (hIopen : IsOpen I) {f : ℝ → ℝ} (hf : ConvexOn ℝ I f) :
let D : Set ℝ := {x | x ∈ I ∧ HasDerivAt f (deriv f x) x}
∀ {x : ℝ}, x ∈ D → ContinuousWithinAt (deriv f) D x
Helper for Theorem 25.3: if the exceptional set I \ D is countable, then D is dense in the open interval I.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_3_subset_closure_of_countable_diff
{I D : Set ℝ} (hIopen : IsOpen I) (hcount : Set.Countable (I \ D)) :
I ⊆ closure D
Helper for Theorem 25.4: an interior point of the effective domain is a finite-value point of f.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_4_finiteAt_of_mem_interior_effectiveDomain
{n : Nat} {f : (Fin n → Real) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
f x ≠ ⊤ ∧ f x ≠ ⊥
Helper for Theorem 25.4: equality of the opposite one-sided directional derivatives upgrades to existence of the ordinary bilateral directional derivative.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_4_bilateral_of_eq_neg_upperDirectionalDerivative
{n : Nat} {f : (Fin n → Real) → EReal} (hf : ConvexFunction f)
{x y : Fin n → Real} (hx : f x ≠ ⊤ ∧ f x ≠ ⊥)
(hEq : upperDirectionalDerivativeAt f x y = -upperDirectionalDerivativeAt f x (-y)) :
HasBilateralDirectionalDerivativeAt f x y
Helper for Theorem 25.4: a bilateral directional derivative forces the opposite one-sided directional derivatives to be negatives of each other.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_4_eq_neg_upperDirectionalDerivative_of_bilateral
{n : Nat} {f : (Fin n → Real) → EReal} (hf : ConvexFunction f)
{x y : Fin n → Real} (hx : f x ≠ ⊤ ∧ f x ≠ ⊥)
(hbilat : HasBilateralDirectionalDerivativeAt f x y) :
upperDirectionalDerivativeAt f x y = -upperDirectionalDerivativeAt f x (-y)
Helper for Theorem 25.4: at an interior point of the effective domain, the symmetry of the opposite upper directional derivatives is equivalent to existence of the ordinary bilateral directional derivative.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_4_pointwiseCriterion
{n : Nat} {f : (Fin n → Real) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{x y : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
upperDirectionalDerivativeAt f x y = -upperDirectionalDerivativeAt f x (-y) ↔
HasBilateralDirectionalDerivativeAt f x y
Helper for Theorem 25.5: the differentiability set is exactly the intersection of the coordinate-partial sets from the textbook proof.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_5_differentiabilitySet_eq_iInter_coordinatePartialSets
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f) :
let U : Set (Fin n → Real) := interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
let D : Set (Fin n → Real) := {x | x ∈ U ∧ ERealDifferentiableAt f x}
let Dj : Fin n → Set (Fin n → Real) :=
fun j => {x | x ∈ U ∧ ∃ L : Real, HasCoordinatePartialDerivativeAt f x j (L : EReal)}
D = ⋂ j, Dj j
Helper for Theorem 25.5: the dense/null part reduces to the one-dimensional slice analysis from the textbook route.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_5_mem_coordinatePartialSet_of_lineDifferentiableClosure
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{V : Set (Fin n → Real)} (hVopen : IsOpen V)
(hVsub : V ⊆ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
{x : Fin n → Real} (hxV : x ∈ V) (j : Fin n)
(hline :
LineDifferentiableAt ℝ (fun z : Fin n → Real => (convexFunctionClosure f z).toReal) x
(Pi.single j (1 : Real))) :
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f) ∧
∃ L : Real, HasCoordinatePartialDerivativeAt f x j (L : EReal)
Helper for Theorem 25.5: on a small ball contained in int (dom f), the failure of the jth coordinate partial derivative is a null set because the real-valued closure is locally Lipschitz and hence almost everywhere line-differentiable in the e_j direction.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_5_coordinatePartialSet_null_on_ball
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(j : Fin n) {c : Fin n → Real} {r : Real} (hr : 0 < r)
(hclosedSub :
Metric.closedBall c (2 * r) ⊆
interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
let U : Set (Fin n → Real) := interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
let Dj : Fin n → Set (Fin n → Real) :=
fun j => {x | x ∈ U ∧ ∃ L : Real, HasCoordinatePartialDerivativeAt f x j (L : EReal)}
MeasureTheory.volume (Metric.ball c r \ Dj j) = 0
Helper for Theorem 25.5: each coordinate-partial exceptional set in U has measure zero by covering U with countably many small balls whose doubled closed balls stay inside U, and then applying the local nullity lemma on each ball.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_5_coordinatePartialSet_nullComplement
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
(j : Fin n) :
let U : Set (Fin n → Real) := interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
let Dj : Fin n → Set (Fin n → Real) :=
fun j => {x | x ∈ U ∧ ∃ L : Real, HasCoordinatePartialDerivativeAt f x j (L : EReal)}
MeasureTheory.volume (U \ Dj j) = 0
Helper for Theorem 25.5: the dense/null part reduces to the one-dimensional slice analysis from the textbook route.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_5_dense_of_null_complement_in_open
{n : Nat} {U A : Set (Fin n → Real)} (hUopen : IsOpen U) (hAU : A ⊆ U)
(hnull : MeasureTheory.volume (U \ A) = 0) :
U ⊆ closure A
Helper for Theorem 25.5: the dense/null part reduces to the one-dimensional slice analysis from the textbook route.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_5_differentiabilitySet_dense_and_null
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f) :
let U : Set (Fin n → Real) := interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
let D : Set (Fin n → Real) := {x | x ∈ U ∧ ERealDifferentiableAt f x}
U ⊆ closure D ∧
MeasureTheory.volume (U \ D) = 0§25 — Differentiability of Convex Functions — Part 6
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 25.5: if f is a proper convex function on ℝ^n and D = {x | f is differentiable at x}, then D is dense in int (dom f), the complement int (dom f) \ D has Lebesgue measure zero, and the gradient mapping is continuous on D.
open scoped Topology
open scoped Pointwise
theorem properConvexFunction_differentiabilitySet_dense_null_complement_and_gradient_continuous
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f) :
let U : Set (Fin n → Real) := interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
let D : Set (Fin n → Real) := {x | x ∈ U ∧ ERealDifferentiableAt f x}
U ⊆ closure D ∧
MeasureTheory.volume (U \ D) = 0 ∧
Continuous (fun x : {x // x ∈ D} => erealGradientAt x.2.2)
Corollary 25.5.1: a finite convex function on an open convex set C that is differentiable on all of C is continuously differentiable on C.
open scoped Topology
open scoped Pointwise
theorem convexOn_contDiffOn_one_of_differentiableOn_open
{n : Nat} {C : Set (Fin n → Real)} {f : (Fin n → Real) → Real}
(hCopen : IsOpen C) (hCconv : Convex ℝ C) (hf : ConvexOn ℝ C f)
(hdiff : DifferentiableOn ℝ f C) :
ContDiffOn ℝ 1 f C
Corollary 25.5.2: for a proper convex function f on ℝ^n, the set D = {x ∈ int (dom f) | f is differentiable at x} is a G_δ set. Moreover, if D_j = {x ∈ int (dom f) | the ordinary two-sided partial derivative ∂f(x) / ∂ξ_j exists}, then D = ⋂ j, D_j, and each D_j is a G_δ set.
open scoped Topology
open scoped Pointwise
theorem properConvexFunction_differentiabilitySet_isGδ_and_coordinatePartialSet_isGδ
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f) :
let U : Set (Fin n → Real) := interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
let D : Set (Fin n → Real) := {x | x ∈ U ∧ ERealDifferentiableAt f x}
let Dj : Fin n → Set (Fin n → Real) :=
fun j => {x | x ∈ U ∧ ∃ L : Real, HasCoordinatePartialDerivativeAt f x j (L : EReal)}
IsGδ D ∧
(D = ⋂ j, Dj j) ∧
(∀ j, IsGδ (Dj j))
The set of all Euclidean gradient vectors that arise as limits of gradients at nearby differentiability points of f.
open scoped Topology
open scoped Pointwise
noncomputable def gradientLimitVectorsAt {n : Nat} (f : (Fin n → Real) → EReal)
(x : Fin n → Real) : Set (Fin n → Real) :=
{g | ∃ xSeq : ℕ → Fin n → Real,
∃ hdiff : ∀ i, ERealDifferentiableAt f (xSeq i),
Filter.Tendsto xSeq Filter.atTop (nhds x) ∧
Filter.Tendsto (fun i => erealGradientAt (hdiff i)) Filter.atTop (nhds g)}
Helper for Theorem 25.5: differentiability makes the chosen Euclidean gradient a point of the vectorized subdifferential.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_5_gradient_mem_subdifferentialPreimage
{n : Nat} {f : (Fin n → Real) → EReal} (hf : ConvexFunction f)
{x : Fin n → Real} (hdiff : ERealDifferentiableAt f x) :
erealGradientAt hdiff ∈
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)
Helper for Theorem 25.5: at a differentiability point, every vectorized subgradient agrees with the chosen Euclidean gradient.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_5_subgradientPreimage_eq_gradient
{n : Nat} {f : (Fin n → Real) → EReal} (hf : ConvexFunction f)
{x : Fin n → Real} (hdiff : ERealDifferentiableAt f x)
{u : Fin n → Real}
(hu : u ∈ ((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)) :
u = erealGradientAt hdiff
Helper for Theorem 25.5: continuity of the gradient on the differentiability set follows from the closed-graph/local-boundedness argument for the subdifferential.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_5_gradient_continuousOn_differentiabilitySet
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f) :
let U : Set (Fin n → Real) := interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
let D : Set (Fin n → Real) := {x | x ∈ U ∧ ERealDifferentiableAt f x}
Continuous (fun x : {x // x ∈ D} => erealGradientAt x.2.2)
Helper for Corollary 25.5.1: the +∞ extension of a real-valued convex function on a nonempty open convex set is proper convex on all of ℝⁿ, and its effective-domain interior is exactly the original open set.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_1_properConvexExtension
{n : Nat} {C : Set (Fin n → Real)} {f : (Fin n → Real) → Real}
(hCopen : IsOpen C) (_hCconv : Convex ℝ C) (hCne : C.Nonempty) (hf : ConvexOn ℝ C f) :
let fExt : (Fin n → Real) → EReal := fun x => (f x : EReal) + indicatorFunction C x
ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) fExt ∧
interior (effectiveDomain (Set.univ : Set (Fin n → Real)) fExt) = C
Helper for Corollary 25.5.1: turn a Euclidean vector into the corresponding continuous linear functional given by the dot product.
open scoped Topology
open scoped Pointwise
noncomputable def helperForCorollary_25_5_1_dotProductContinuousLinearMap
{n : Nat} (v : Fin n → Real) : (Fin n → Real) →L[ℝ] Real :=
⟨dotProductEquiv ℝ (Fin n) v, (dotProductEquiv ℝ (Fin n) v).continuous_of_finiteDimensional⟩
Helper for Corollary 25.5.1: the dot-product functional depends continuously on its vector parameter.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_1_dotProductContinuousLinearMap_continuous
{n : Nat} :
Continuous
(fun v : Fin n → Real =>
helperForCorollary_25_5_1_dotProductContinuousLinearMap v)
Helper for Corollary 25.5.1: differentiability at a point identifies the Fréchet derivative with the dot-product functional of the Euclidean gradient.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_1_hasFDerivAt_dotProductContinuousLinearMap
{n : Nat} {f : (Fin n → Real) → Real} {x : Fin n → Real}
(hdiffAt : DifferentiableAt ℝ f x) :
HasFDerivAt f
(helperForCorollary_25_5_1_dotProductContinuousLinearMap (euclideanGradientAt f x)) x
Helper for Corollary 25.5.1: on the open set C, the Fréchet derivative is the dot-product functional associated to the Euclidean gradient vector.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_1_fderivWithin_eq_dotProductContinuousLinearMap
{n : Nat} {C : Set (Fin n → Real)} {f : (Fin n → Real) → Real}
(hCopen : IsOpen C) (hdiff : DifferentiableOn ℝ f C) :
∀ x ∈ C,
fderivWithin ℝ f C x =
helperForCorollary_25_5_1_dotProductContinuousLinearMap (euclideanGradientAt f x)
Helper for Corollary 25.5.1: once the Euclidean gradient is known to be continuous on C, the usual ContDiffOn ℝ 1 criterion on an open set applies.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_1_contDiffOn_one_of_gradient_continuousOn
{n : Nat} {C : Set (Fin n → Real)} {f : (Fin n → Real) → Real}
(hCopen : IsOpen C) (hdiff : DifferentiableOn ℝ f C)
(hgrad : ContinuousOn (fun x => euclideanGradientAt f x) C) :
ContDiffOn ℝ 1 f C
Helper for Corollary 25.5.1: on an open neighborhood where the extension is finite-valued, the +∞ extension has the same first-order error quotient as the original real-valued function.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_1_extension_hasERealGradientAt
{n : Nat} {C : Set (Fin n → Real)} {f : (Fin n → Real) → Real}
(hCopen : IsOpen C) {x : Fin n → Real} (hx : x ∈ C)
(hdiffAt : DifferentiableAt ℝ f x) :
let fExt : (Fin n → Real) → EReal := fun y => (f y : EReal) + indicatorFunction C y
HasERealGradientAt fExt x (euclideanGradientAt f x) ∧
(∀ᶠ z in nhdsWithin x ({z | z ≠ x}),
z ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) fExt ∧ fExt z ≠ ⊥)
Helper for Corollary 25.5.1: the local EReal differentiability witness for the extension has the same gradient as the original real-valued function.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_1_extension_differentiableAt_and_gradient_eq
{n : Nat} {C : Set (Fin n → Real)} {f : (Fin n → Real) → Real}
(hCopen : IsOpen C) {x : Fin n → Real} (hx : x ∈ C)
(hdiffAt : DifferentiableAt ℝ f x) :
let fExt : (Fin n → Real) → EReal := fun y => (f y : EReal) + indicatorFunction C y
∃ hExt : ERealDifferentiableAt fExt x, erealGradientAt hExt = euclideanGradientAt f x
Helper for Corollary 25.5.1: the differentiability set of the +∞ extension inside its effective-domain interior is exactly the original open set C.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_1_extension_differentiabilitySet_eq
{n : Nat} {C : Set (Fin n → Real)} {f : (Fin n → Real) → Real}
(hCopen : IsOpen C) (hCconv : Convex ℝ C) (hf : ConvexOn ℝ C f)
(hdiff : DifferentiableOn ℝ f C) (hCne : C.Nonempty) :
let fExt : (Fin n → Real) → EReal := fun y => (f y : EReal) + indicatorFunction C y
let U : Set (Fin n → Real) :=
interior (effectiveDomain (Set.univ : Set (Fin n → Real)) fExt)
let D : Set (Fin n → Real) := {x | x ∈ U ∧ ERealDifferentiableAt fExt x}
D = C
Helper for Corollary 25.5.1: Theorem 25.5 applied to the +∞ extension shows that the Euclidean gradient of f varies continuously on C.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_1_gradient_continuousOn
{n : Nat} {C : Set (Fin n → Real)} {f : (Fin n → Real) → Real}
(hCopen : IsOpen C) (hCconv : Convex ℝ C) (hf : ConvexOn ℝ C f)
(hdiff : DifferentiableOn ℝ f C) :
ContinuousOn (fun x => euclideanGradientAt f x) C
Helper for Corollary 25.5.2: fixing the direction variable in the upper-semicontinuous directional-derivative map preserves upper semicontinuity on int (dom f).
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_2_upperSemicontinuousOn_upperDirectionalDerivative_fixedDirection
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f) :
let U : Set (Fin n → Real) := interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
∀ y : Fin n → Real,
UpperSemicontinuousOn (fun x => upperDirectionalDerivativeAt f x y) U
Helper for Corollary 25.5.2: at interior-domain points, every fixed-direction upper directional derivative avoids ⊥ as well as ⊤.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_2_upperDirectionalDerivative_ne_bot_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f)
{x : Fin n → Real}
(hxU : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
∀ y : Fin n → Real, upperDirectionalDerivativeAt f x y ≠ (⊥ : EReal)
Helper for Corollary 25.5.2: the coordinate-partial existence set is exactly the zero set of the sum of the two opposite-direction upper directional derivatives.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_2_coordinatePartialSet_eq_directionalZeroSet
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f) :
let U : Set (Fin n → Real) := interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
let Dj : Fin n → Set (Fin n → Real) :=
fun j => {x | x ∈ U ∧ ∃ L : Real, HasCoordinatePartialDerivativeAt f x j (L : EReal)}
∀ j : Fin n,
Dj j =
{x |
x ∈ U ∧
upperDirectionalDerivativeAt f x (Pi.single j (1 : Real)) +
upperDirectionalDerivativeAt f x (-Pi.single j (1 : Real)) = 0}
Helper for Corollary 25.5.2: the zero set of a nonnegative upper-semicontinuous EReal-valued function on an open set is Gδ.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_2_zeroSet_isGδ_of_nonneg_upperSemicontinuousOn
{n : Nat} {U : Set (Fin n → Real)} {k : (Fin n → Real) → EReal}
(hUopen : IsOpen U) (husc : UpperSemicontinuousOn k U)
(hnonneg : ∀ x ∈ U, (0 : EReal) ≤ k x) :
IsGδ {x | x ∈ U ∧ k x = 0}
Helper for Corollary 25.5.2: each coordinate-partial existence set is Gδ.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_5_2_coordinatePartialSet_isGδ
{n : Nat} (f : (Fin n → Real) → EReal)
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f) :
let U : Set (Fin n → Real) := interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
let Dj : Fin n → Set (Fin n → Real) :=
fun j => {x | x ∈ U ∧ ∃ L : Real, HasCoordinatePartialDerivativeAt f x j (L : EReal)}
∀ j : Fin n, IsGδ (Dj j)
Helper for Theorem 25.6: outside the effective domain, both the Euclideanized subdifferential and the normal-cone term are empty, so the theorem is immediate there.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_preimage_eq_empty_of_not_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x : Fin n → Real}
(hx : x ∉ effectiveDomain (Set.univ : Set (Fin n → Real)) f) :
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x) =
closure (convexHull Real (gradientLimitVectorsAt f x)) +
((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x)§25 — Differentiability of Convex Functions — Part 7
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Theorem 25.6: a closed proper convex EReal-valued function gives the usual ProperConvexFunctionOn univ package needed by the Chapter 23 and 24 lemmas.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_properConvexFunctionOn
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → Real)) f
Helper for Theorem 25.6: every gradient-limit vector is a genuine Euclidean subgradient at the limit point, by the closed graph of the subdifferential.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_gradientLimitVectors_subset_preimageSubdifferential
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x : Fin n → Real} :
gradientLimitVectorsAt f x ⊆
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)
Helper for Theorem 25.6: every gradient-limit vector at an interior-domain point is already a genuine Euclidean subgradient there.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_gradientLimitVectors_subset_preimageSubdifferential_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
gradientLimitVectorsAt f x ⊆
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)
Helper for Theorem 25.6: at an interior-domain point, the closed convex hull generated by the gradient-limit vectors already sits inside the Euclideanized subdifferential.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_closureConvexHull_gradientLimitVectors_subset_preimageSubdifferential_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
closure (convexHull Real (gradientLimitVectorsAt f x)) ⊆
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)
Helper for Theorem 25.6: at any domain point, the closed convex hull of the gradient-limit vectors already lies in the Euclideanized subdifferential.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_closureConvexHull_gradientLimitVectors_subset_preimageSubdifferential_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f) :
closure (convexHull Real (gradientLimitVectorsAt f x)) ⊆
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)
Helper for Theorem 25.6: any point in the closure of gradientLimitVectorsAt f x is already an actual Euclidean subgradient when x is interior to dom f.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_closureGradientLimitVectors_subset_preimageSubdifferential_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x q : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hq : q ∈ closure (gradientLimitVectorsAt f x)) :
dotProductEquiv Real (Fin n) q ∈ subdifferentialAt f x
Helper for Theorem 25.6: the same closure-to-subgradient upgrade remains valid at arbitrary domain points, using the domain-level hull inclusion.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_closureGradientLimitVectors_subset_preimageSubdifferential_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x q : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hq : q ∈ closure (gradientLimitVectorsAt f x)) :
dotProductEquiv Real (Fin n) q ∈ subdifferentialAt f x
Helper for Theorem 25.6: at an interior-domain point, the Euclideanized subdifferential is nonempty and bounded, exactly as in Theorem 23.4.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_preimageSubdifferential_nonempty_bounded_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
Set.Nonempty (((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)) ∧
Bornology.IsBounded
(((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x))
Helper for Theorem 25.6: at an interior-domain point, exposed points of the Euclideanized subdifferential are exactly gradients of the directional-derivative support function.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_isExposedPoint_preimageSubdifferential_iff_exists_gradient_upperDirectionalDerivative_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x p : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
IsExposedPoint (((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)) p ↔
∃ y : Fin n → Real,
∃ hdiff : ERealDifferentiableAt (upperDirectionalDerivativeAt f x) y,
erealGradientAt hdiff = p
Helper for Theorem 25.6: when an exposed subgradient is realized as the gradient of the directional derivative in direction y, the corresponding normal face of the Euclideanized subdifferential collapses to the singleton {p}.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_subdifferentialNormalFace_singleton_of_gradient_upperDirectionalDerivative
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x y p : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hdiff : ERealDifferentiableAt (upperDirectionalDerivativeAt f x) y)
(hgrad : erealGradientAt hdiff = p) :
subdifferentialNormalFaceAt f x y = ({p} : Set (Fin n → Real))
Helper for Theorem 25.6: scaling an exposing direction by a positive real leaves the corresponding Euclidean normal face unchanged.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_subdifferentialNormalFace_eq_of_pos_smul_direction
{n : Nat} (f : (Fin n → Real) → EReal)
{x y : Fin n → Real} {a : Real} (ha : 0 < a) :
subdifferentialNormalFaceAt f x (a • y) = subdifferentialNormalFaceAt f x y
Helper for Theorem 25.6: an interior sequence whose Euclideanized subdifferentials shrink into arbitrarily small balls around p yields p as a genuine gradient-limit vector.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_gradientLimitVector_of_eventuallySmallSubdifferentials
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x p : Fin n → Real}
(q : ℕ → Fin n → Real)
(hqInt : ∀ i : ℕ,
q i ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hqTendsto : Filter.Tendsto q Filter.atTop (nhds x))
(hqSmall :
∀ ε : Real, 0 < ε → ∃ i0 : ℕ, ∀ i ≥ i0,
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f (q i)) ⊆
Set.image2 (fun u v : Fin n → Real => u + v)
({p} : Set (Fin n → Real))
(Metric.closedBall (0 : Fin n → Real) ε)) :
p ∈ gradientLimitVectorsAt f x
Helper for Theorem 25.6: a singleton normal face along a nonzero direction yields an interior ray approaching x whose Euclideanized subdifferentials are eventually trapped in arbitrarily small balls around the exposed point p.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_normalizedRay_eventual_preimageSubdifferential_subset_singletonBall
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x y p : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hy : y ≠ 0)
(hFace : subdifferentialNormalFaceAt f x y = ({p} : Set (Fin n → Real))) :
∃ s : Real, 0 < s ∧
(∀ i : ℕ,
x + (s / ((i : Real) + 1)) • (‖y‖⁻¹ • y) ∈
interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) ∧
(∀ ε : Real, 0 < ε → ∃ i0 : ℕ, ∀ i ≥ i0,
((dotProductEquiv Real (Fin n)) ⁻¹'
subdifferentialAt f (x + (s / ((i : Real) + 1)) • (‖y‖⁻¹ • y))) ⊆
Set.image2 (fun u v : Fin n → Real => u + v)
({p} : Set (Fin n → Real))
(Metric.closedBall (0 : Fin n → Real) ε))
Helper for Theorem 25.6: a singleton normal face at an interior-domain point already gives a genuine gradient-limit vector.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_gradientLimitVector_of_singletonNormalFace
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x y p : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hFace : subdifferentialNormalFaceAt f x y = ({p} : Set (Fin n → Real))) :
p ∈ gradientLimitVectorsAt f x§25 — Differentiability of Convex Functions — Part 8
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Theorem 25.6: the textbook boundary step. If a singleton normal face at x is exposed by a direction whose positive ray enters interior (dom f), then the exposed point is already a genuine gradient-limit vector at x.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_gradientLimitVector_of_singletonNormalFace_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x y p : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hray : ∃ t : Real, 0 < t ∧
x + t • y ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hFace : subdifferentialNormalFaceAt f x y = ({p} : Set (Fin n → Real))) :
p ∈ gradientLimitVectorsAt f x
Helper for Theorem 25.6: differentiating a fixed-step secant quotient at w gives the same Euclidean gradient as differentiating f at the translated point x + t • w.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_erealGradient_secantQuotient_eq_erealGradient_translatedPoint
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x w : Fin n → Real} {t : Real}
(hxFinite : f x ≠ (⊤ : EReal) ∧ f x ≠ (⊥ : EReal))
(ht : 0 < t)
(hw : ERealDifferentiableAt (fun v => directionalDifferenceQuotientAt f x v t) w)
(htrans : ERealDifferentiableAt f (x + t • w)) :
erealGradientAt hw = erealGradientAt htrans
Helper for Theorem 25.6: the normal cone to dom f is trivial at an interior point, so the boundary term disappears there.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_preimage_normalCone_eq_singleton_zero_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x) =
({0} : Set (Fin n → Real))
Helper for Theorem 25.6: at a domain point, adding a normal-cone vector preserves Euclideanized subgradient membership because f + indicator(dom f) = f and Chapter 23 applies.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_add_mem_preimageSubdifferential_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x u v : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hu : u ∈ ((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x))
(hv :
v ∈ ((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x)) :
u + v ∈ ((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)
Helper for Theorem 25.6: every vectorized normal-cone element is a recession direction of the Euclideanized subdifferential fiber at the same domain point.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_preimageNormalCone_subset_recessionCone_preimageSubdifferential_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x v : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hv :
v ∈ ((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x)) :
v ∈ Set.recessionCone (((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x) : Set
(Fin n → Real))
Helper for Theorem 25.6: the representation cl (conv S(x)) + K(x) ⊆ ∂ f (x) already holds at every domain point.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_forwardInclusion_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f) :
closure (convexHull Real (gradientLimitVectorsAt f x)) +
((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x) ⊆
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)
Helper for Theorem 25.6: for an interior-domain fiber, Chapter 18 reduces the full equality to the single missing fact that every exposed point of the Euclideanized subdifferential is already a limit of nearby gradients.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_interior_preimageSubdifferential_eq_closureConvexHull_gradientLimitVectors_of_exposedPoints
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hExposed :
∀ p : Fin n → Real,
p ∈ ((((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x).exposedPoints ℝ)) →
p ∈ closure (gradientLimitVectorsAt f x)) :
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x) =
closure (convexHull Real (gradientLimitVectorsAt f x))
Helper for Theorem 25.6: the only missing interior step is to realize every exposed point of the bounded Euclideanized subdifferential as a genuine gradient-limit vector.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_exposedPoints_preimageSubdifferential_subset_closure_gradientLimitVectors_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
(((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x).exposedPoints ℝ) ⊆
closure (gradientLimitVectorsAt f x)
Helper for Theorem 25.6: at an interior-domain point, the Euclideanized subdifferential is exactly the closed convex hull of the gradient-limit vectors.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_interior_preimageSubdifferential_eq_closureConvexHull_gradientLimitVectors
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x) =
closure (convexHull Real (gradientLimitVectorsAt f x))
Helper for Theorem 25.6: any exposed point of the Euclideanized fiber is cut out by a singleton normal face.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_exists_exposingDirection_singletonNormalFace_of_mem_exposedPoints
{n : Nat} (f : (Fin n → Real) → EReal)
{x p : Fin n → Real}
(hp :
p ∈ (((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x).exposedPoints ℝ)) :
∃ y : Fin n → Real, subdifferentialNormalFaceAt f x y = ({p} : Set (Fin n → Real))
Helper for Theorem 25.6: an exposing direction for an exposed point of the Euclideanized fiber lies in the raw polar of the vectorized normal cone.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_exists_exposingDirection_singletonNormalFace_polar_preimageNormalCone_of_mem_exposedPoints
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x p : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hp :
p ∈ (((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x).exposedPoints ℝ)) :
∃ y : Fin n → Real,
subdifferentialNormalFaceAt f x y = ({p} : Set (Fin n → Real)) ∧
∀ v ∈ ((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x),
dotProduct v y ≤ 0
Helper for Theorem 25.6: the exposing direction of an exposed point of the Euclideanized fiber is strictly negative on every nonzero vector of the vectorized normal cone. This is the precise textbook condition used to show that the positive ray through the exposing direction cannot be properly separated from dom f.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_exists_exposingDirection_singletonNormalFace_strict_polar_preimageNormalCone_of_mem_exposedPoints
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x p : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hp :
p ∈ (((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x).exposedPoints ℝ)) :
∃ y : Fin n → Real,
subdifferentialNormalFaceAt f x y = ({p} : Set (Fin n → Real)) ∧
∀ v ∈ ((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x),
v ≠ 0 → dotProduct v y < 0
Helper for Theorem 25.6: the textbook Theorem 11.3 step. If an exposing direction is strictly negative on every nonzero vector of the vectorized normal cone, then the positive ray through that direction must meet interior (dom f).
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_exists_admissibleRay_of_strict_polar_preimageNormalCone
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x y : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hyStrict :
∀ v ∈ ((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x),
v ≠ 0 → dotProduct v y < 0) :
∃ t : Real, 0 < t ∧
x + t • y ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)§25 — Differentiability of Convex Functions — Part 9
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Theorem 25.6: if a normal face is exposed by a direction that is strictly negative on every nonzero vector of the vectorized normal cone, then that face is bounded (hence compact, since it is closed). This is the compact-face input behind the unbounded/no-lines Chapter 18 route.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_subdifferentialNormalFace_bounded_of_strict_polar_preimageNormalCone
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x y p : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hpFace : p ∈ subdifferentialNormalFaceAt f x y)
(hyStrict :
∀ v ∈ ((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x),
v ≠ 0 → dotProduct v y < 0) :
Bornology.IsBounded (subdifferentialNormalFaceAt f x y)
Helper for Theorem 25.6: at an interior-domain point, the support of the closed convex hull of the gradient-limit vectors is exactly the subdifferential support.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_support_closureConvexHull_gradientLimitVectors_eq_subdifferentialSupport_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
∀ y : Fin n → Real,
supportFunctionEReal (closure (convexHull Real (gradientLimitVectorsAt f x))) y =
subdifferentialSupportAt f x y
Helper for Theorem 25.6: at an interior-domain point, a support-maximizing exposed point of the Euclideanized subdifferential already lies in closure (gradientLimitVectorsAt f x), so it realizes the directional derivative.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_exists_closureGradientLimitVector_attaining_directionalDerivative_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
∀ u : Fin n → Real, ∃ q : Fin n → Real,
q ∈ closure (gradientLimitVectorsAt f x) ∧
(((dotProduct q u : Real) : EReal) = upperDirectionalDerivativeAt f x u)
Helper for Theorem 25.6: on interior fibers, the closed convex hull of the gradient-limit vectors is bounded because it coincides with the bounded Euclideanized subdifferential.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_bounded_closureConvexHull_gradientLimitVectors_of_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x : Fin n → Real}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
Bornology.IsBounded (closure (convexHull Real (gradientLimitVectorsAt f x)))
Helper for Theorem 25.6: if a positive ray from x in the direction u enters interior (dom f), then Chapter 23 already identifies the support of ∂ f(x) with the upper directional derivative at u.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_subdifferentialSupport_eq_upperDirectionalDerivative_of_mem_admissibleDirection
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x u : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hu : ∃ t : Real, 0 < t ∧
x + t • u ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
subdifferentialSupportAt f x u = upperDirectionalDerivativeAt f x u
Helper for Theorem 25.6: if x is merely in dom f and z is interior to dom f, then every strict convex combination a • z + b • x with a > 0, b ≥ 0, and a + b = 1 still lies in interior (dom f).
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_strictConvexCombo_mem_interior_of_mem_effectiveDomain_and_mem_interior
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x z : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hz : z ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
{a b : Real} (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) :
a • z + b • x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)
Helper for Theorem 25.6: after identifying covectors with Euclidean vectors, the subdifferential mapping is monotone in the usual dot-product sense.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_preimageSubdifferential_monotone
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x0 x1 v0 v1 : Fin n → Real}
(hv0 : v0 ∈ ((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x0))
(hv1 : v1 ∈ ((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x1)) :
0 ≤ dotProduct (x1 - x0) (v1 - v0)
Helper for Theorem 25.6: if nearby points xᵢ carry closure-gradient witnesses qᵢ that converge to q, then a diagonal selection through the defining sequences already realizes q as a limit point of the boundary fiber gradientLimitVectorsAt f x.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_limit_of_closureGradientLimitVectors_mem_closureGradientLimitVectors
{n : Nat} (f : (Fin n → Real) → EReal)
{x q : Fin n → Real}
(xSeq qSeq : ℕ → Fin n → Real)
(hxSeq_tendsto : Filter.Tendsto xSeq Filter.atTop (nhds x))
(hqSeq_tendsto : Filter.Tendsto qSeq Filter.atTop (nhds q))
(hqClosure :
∀ i : ℕ, qSeq i ∈ closure (gradientLimitVectorsAt f (xSeq i))) :
q ∈ closure (gradientLimitVectorsAt f x)
Helper for Theorem 25.6: an interior base point admits one common symmetric coordinate box of interior comparison points, together with chosen Euclidean subgradients at those points.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_exists_symmetricInteriorComparisonSubgradients
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{z : Fin n → Real}
(hz : z ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
∃ ρ : Real, 0 < ρ ∧
∃ vPlus vMinus : Fin n → Fin n → Real,
(∀ j : Fin n,
let e : Fin n → Real := Pi.single j (1 : Real)
z + (ρ / 2) • e ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f) ∧
vPlus j ∈
((dotProductEquiv Real (Fin n)) ⁻¹'
subdifferentialAt f (z + (ρ / 2) • e))) ∧
(∀ j : Fin n,
let e : Fin n → Real := Pi.single j (1 : Real)
z - (ρ / 2) • e ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f) ∧
vMinus j ∈
((dotProductEquiv Real (Fin n)) ⁻¹'
subdifferentialAt f (z - (ρ / 2) • e)))
Helper for Theorem 25.6: the fixed interior center secants provide one common coordinate box for all support realizers chosen along the admissible ray.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_upperDirectionalDerivative_le_pairing_of_preimageSubgradient_on_positive_rayStep
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x u q : Fin n → Real} {s : Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hs : 0 < s)
(hqSub :
q ∈ ((dotProductEquiv Real (Fin n)) ⁻¹'
subdifferentialAt f (x + s • u))) :
upperDirectionalDerivativeAt f x u ≤ (((dotProduct q u : Real) : EReal))
Helper for Theorem 25.6: once the boundary directional derivative in the admissible direction is not ⊥, the fixed interior comparison points at x + t • u ± (ρ/2)eⱼ give a common coordinate box for every support realizer chosen along the ray.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_coordinate_bound_from_monotoneComparison_with_endpoint_and_symmetricInteriorPoints
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x u : Fin n → Real} {t s ρ d : Real}
{q vPlus vMinus : Fin n → Real} {j : Fin n}
(hρpos : 0 < ρ) (hsPos : 0 < s) (hsLe : s ≤ t)
(hqPairLower : d ≤ dotProduct q u)
(hqSub :
q ∈ ((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f (x + s • u)))
(hvPlus :
let e : Fin n → Real := Pi.single j (1 : Real)
vPlus ∈
((dotProductEquiv Real (Fin n)) ⁻¹'
subdifferentialAt f (x + t • u + (ρ / 2) • e)))
(hvMinus :
let e : Fin n → Real := Pi.single j (1 : Real)
vMinus ∈
((dotProductEquiv Real (Fin n)) ⁻¹'
subdifferentialAt f (x + t • u - (ρ / 2) • e))) :
let BPlus := (2 / ρ) * t * (|dotProduct u vPlus| + |d|)
let BMinus := (2 / ρ) * t * (|dotProduct u vMinus| + |d|)
vMinus j - BMinus ≤ q j ∧ q j ≤ vPlus j + BPlus§25 — Differentiability of Convex Functions — Part 10
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Theorem 25.6: once the boundary directional derivative in the admissible direction is not ⊥, the fixed interior comparison points at x + t • u ± (ρ/2)eⱼ give a common coordinate box for every support realizer chosen along the ray.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_uniform_coordinate_bound_on_admissibleRay_from_center_secants
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x u : Fin n → Real} {t ρ : Real}
(_hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(_ht : 0 < t)
(hxtuInt : x + t • u ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hdirNeBot : upperDirectionalDerivativeAt f x u ≠ ⊥)
(hρpos : 0 < ρ)
(hplusInt :
∀ j : Fin n,
let e : Fin n → Real := Pi.single j (1 : Real)
x + t • u + (ρ / 2) • e ∈
interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
(hminusInt :
∀ j : Fin n,
let e : Fin n → Real := Pi.single j (1 : Real)
x + t • u - (ρ / 2) • e ∈
interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f))
{qSeq : ℕ → Fin n → Real}
(hqSeqSub :
∀ i : ℕ,
let xi := x + (t / ((i : Real) + 1)) • u
qSeq i ∈ ((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f xi))
(hqSeqPair :
∀ i : ℕ,
upperDirectionalDerivativeAt f (x + (t / ((i : Real) + 1)) • u) u =
(((dotProduct (qSeq i) u : Real) : EReal))) :
∃ M : Fin n → Real, ∀ i : ℕ, ∀ j : Fin n, |qSeq i j| ≤ M j
Helper for Theorem 25.6: once every coordinate of a sequence in ℝⁿ stays inside one fixed box, the whole sequence lies in a common closed ball and therefore has a convergent subsequence.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_convergent_subseq_of_uniform_coordinate_bounds
{n : Nat} (qSeq : ℕ → Fin n → Real) {M : Fin n → Real}
(hMnonneg : ∀ j : Fin n, 0 ≤ M j)
(hbound : ∀ i : ℕ, ∀ j : Fin n, |qSeq i j| ≤ M j) :
∃ φ : ℕ → ℕ, ∃ q : Fin n → Real,
StrictMono φ ∧
Filter.Tendsto (fun k : ℕ => qSeq (φ k)) Filter.atTop (nhds q)
Helper for Theorem 25.6: along a nonzero admissible ray, the interior support-realizers can be chosen so that a subsequence converges in Fin n → Real.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_convergent_supportRealizer_subseq_on_admissibleRay
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x u : Fin n → Real} {t : Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hdirNeBot : upperDirectionalDerivativeAt f x u ≠ ⊥)
(hu0 : u ≠ 0) (ht : 0 < t)
(hxtuInt : x + t • u ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
∃ qSeq : ℕ → Fin n → Real, ∃ φ : ℕ → ℕ, ∃ q : Fin n → Real,
(∀ i : ℕ,
let xi := x + (t / ((i : Real) + 1)) • u
qSeq i ∈ closure (gradientLimitVectorsAt f xi) ∧
(((dotProduct (qSeq i) u : Real) : EReal) = upperDirectionalDerivativeAt f xi u)) ∧
StrictMono φ ∧
Filter.Tendsto (fun k : ℕ => qSeq (φ k)) Filter.atTop (nhds q)
Helper for Theorem 25.6: once the admissible-ray selector converges, every limit pairing still dominates the boundary directional derivative because each point of the ray gives a positive secant quotient from x that is bounded above by the chosen subgradient pairing.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_pairing_limit_eq_upperDirectionalDerivative_on_admissibleRay
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x u : Fin n → Real} {t : Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(ht : 0 < t)
(qSeq : ℕ → Fin n → Real) (φ : ℕ → ℕ) (q : Fin n → Real)
(_hφ : StrictMono φ)
(hqSub :
∀ i : ℕ,
let xi := x + (t / ((i : Real) + 1)) • u
dotProductEquiv Real (Fin n) (qSeq i) ∈ subdifferentialAt f xi)
(hqTendsto : Filter.Tendsto (fun k : ℕ => qSeq (φ k)) Filter.atTop (nhds q)) :
upperDirectionalDerivativeAt f x u ≤ (((dotProduct q u : Real) : EReal))
Helper for Theorem 25.6: along an admissible direction, either the upper directional derivative is ⊥, or it is realized by a point of closure (gradientLimitVectorsAt f x).
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_admissibleDirectionalDerivative_eq_bot_or_exists_closureGradientLimitVector
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x u : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hu : ∃ t : Real, 0 < t ∧
x + t • u ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
upperDirectionalDerivativeAt f x u = ⊥ ∨
∃ q : Fin n → Real,
q ∈ closure (gradientLimitVectorsAt f x) ∧
(((dotProduct q u : Real) : EReal) = upperDirectionalDerivativeAt f x u)
Helper for Theorem 25.6: once an admissible direction is realized by a point of closure (gradientLimitVectorsAt f x), the support of cl (conv S(x)) dominates the directional derivative in that direction.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_upperDirectionalDerivative_le_support_closureConvexHull_gradientLimitVectors_of_mem_admissibleDirection
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x u : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hu : ∃ t : Real, 0 < t ∧
x + t • u ∈ interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)) :
upperDirectionalDerivativeAt f x u ≤
supportFunctionEReal (closure (convexHull Real (gradientLimitVectorsAt f x))) u
Helper for Theorem 25.6: if a set has support function never equal to ⊤, then it is bounded; the empty-set case is harmless and the nonempty case reduces to Chapter 13.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_isBounded_of_supportFunctionEReal_ne_top
{n : Nat} {C : Set (Fin n → Real)}
(hTop : ∀ y : Fin n → Real, supportFunctionEReal C y ≠ (⊤ : EReal)) :
Bornology.IsBounded C
Helper for Theorem 25.6: if closure (S(x)) is bounded, then closure (conv S(x)) is still bounded, so its support function is finite in every direction.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_supportFunctionEReal_ne_top_of_bounded_closureGradientLimitVectors
{n : Nat} (f : (Fin n → Real) → EReal)
{x : Fin n → Real}
(hBdd : Bornology.IsBounded (closure (gradientLimitVectorsAt f x))) :
∀ y : Fin n → Real,
supportFunctionEReal (closure (convexHull Real (gradientLimitVectorsAt f x))) y ≠ ⊤
Helper for Theorem 25.6: a coordinate box cut out by finitely many inequalities |q j| ≤ M j is closed in ℝⁿ.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_isClosed_coordinateBox
{n : Nat} (M : Fin n → Real) :
IsClosed {q : Fin n → Real | ∀ j : Fin n, |q j| ≤ M j}
Helper for Theorem 25.6: every finite coordinate box in ℝⁿ is bounded.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_isBounded_coordinateBox
{n : Nat} (M : Fin n → Real) :
Bornology.IsBounded {q : Fin n → Real | ∀ j : Fin n, |q j| ≤ M j}
Helper for Theorem 25.6: eventual membership in a closed coordinate box survives passage to the limit.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_mem_coordinateBox_of_tendsto_eventually
{n : Nat} {q : Fin n → Real} {qSeq : ℕ → Fin n → Real} {M : Fin n → Real}
(hq : Filter.Tendsto qSeq Filter.atTop (nhds q))
(hEventually :
∀ᶠ i in Filter.atTop, qSeq i ∈ {p : Fin n → Real | ∀ j : Fin n, |p j| ≤ M j}) :
∀ j : Fin n, |q j| ≤ M j
Helper for Theorem 25.6: once a boundary subgradient has one absolute longitudinal pairing bound against a fixed interior center, the symmetric comparison subgradients around that center bound each coordinate.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_coordinate_bound_from_abs_longitudinalPairing_at_boundary_and_symmetricInteriorPoints
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x z q vPlus vMinus : Fin n → Real} {ρ B : Real} {j : Fin n}
(hρpos : 0 < ρ)
(hqPairAbs : |dotProduct (z - x) q| ≤ B)
(hqSub :
q ∈ ((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x))
(hvPlus :
let e : Fin n → Real := Pi.single j (1 : Real)
vPlus ∈
((dotProductEquiv Real (Fin n)) ⁻¹'
subdifferentialAt f (z + (ρ / 2) • e)))
(hvMinus :
let e : Fin n → Real := Pi.single j (1 : Real)
vMinus ∈
((dotProductEquiv Real (Fin n)) ⁻¹'
subdifferentialAt f (z - (ρ / 2) • e))) :
let BPlus := (2 / ρ) * (|dotProduct (z - x) vPlus| + B)
let BMinus := (2 / ρ) * (|dotProduct (z - x) vMinus| + B)
vMinus j - BMinus ≤ q j ∧ q j ≤ vPlus j + BPlus
Helper for Theorem 25.6: transporting a boundary gradient-limit vector into the subdifferential at x and comparing it with a fixed interior subgradient at z yields only a one-sided longitudinal pairing bound.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_monotonicity_gives_only_upper_longitudinal_bound
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
{x z g v : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hg : g ∈ gradientLimitVectorsAt f x)
(hv :
v ∈ ((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f z)) :
dotProduct (z - x) g ≤ dotProduct (z - x) v
Helper for Theorem 25.6: after vectorizing the normal cone to dom f, its support function is the indicator of the raw polar inequality set.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_support_preimageNormalCone_eq_indicatorPolar
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
{x : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f) :
let K : Set (Fin n → Real) :=
((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x)
supportFunctionEReal K =
indicatorFunction {y : Fin n → Real | ∀ v ∈ K, dotProduct v y ≤ 0}§25 — Differentiability of Convex Functions — Part 11
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Theorem 25.6: in Rockafellar's Chapter 18 decomposition, every extreme direction of the Euclideanized subdifferential fiber at x must already lie in the vectorized normal cone to dom f at x.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_extremeDirections_preimageSubdifferential_subset_preimageNormalCone_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x d : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hd :
d ∈ {d : Fin n → Real | IsExtremeDirection (𝕜 := ℝ)
(((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x)) d}) :
d ∈ ((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x)
Helper for Theorem 25.6: Rockafellar's boundary argument reduces the extreme-point part of the Euclideanized fiber to showing that every exposed point of cl (conv S(x)) already lies in closure S(x).
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_exposedPoints_closureConvexHull_subset_closure
{n : Nat} {S : Set (Fin n → Real)}
(hAbdd : Bornology.IsBounded (closure (convexHull Real S))) :
(closure (convexHull Real S)).exposedPoints ℝ ⊆ closure S
Helper for Theorem 25.6: Rockafellar's boundary argument reduces the exposed-point part of the Euclideanized subdifferential to nearby gradient limits.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_exposedPoints_preimageSubdifferential_subset_closureGradientLimitVectors_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x p : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hp :
p ∈ (((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x).exposedPoints ℝ)) :
p ∈ closure (gradientLimitVectorsAt f x)§25 — Differentiability of Convex Functions — Part 12
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 25.6: let f be a closed proper convex function such that dom f has nonempty interior. Identifying dual vectors with Euclidean vectors via dotProductEquiv, the vector form of the subdifferential at x is cl (conv S(x)) + K(x), where K(x) is the normal cone to dom f at x and S(x) is the set of limits of gradients ∇ f(x_i) along differentiability points x_i → x.
open scoped Topology
open scoped Pointwise
theorem closedProperConvex_subdifferential_preimage_eq_closure_convexHull_gradientLimitVectors_add_normalCone_preimage
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
(x : Fin n → Real) :
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x) =
closure (convexHull Real (gradientLimitVectorsAt f x)) +
((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x)
Theorem 25.7: let C be an open convex subset of ℝⁿ, let f be a convex function on C that is finite and differentiable on C, and let f₁, f₂, ... be convex functions on C that are finite and differentiable on C and converge pointwise to f on C. Then for every x ∈ C, the gradients ∇ fᵢ(x) converge to ∇ f(x).
open scoped Topology
open scoped Pointwise
theorem convexOn_tendsto_euclideanGradientAt_of_pointwise_convergent
{n : Nat} {C : Set (Fin n → Real)} (f : (Fin n → Real) → Real)
(fSeq : ℕ → (Fin n → Real) → Real)
(hCopen : IsOpen C) (hCconv : Convex ℝ C) (hf : ConvexOn ℝ C f)
(hfdiff : DifferentiableOn ℝ f C)
(hSeqConvex : ∀ i : ℕ, ConvexOn ℝ C (fSeq i))
(hSeqDiff : ∀ i : ℕ, DifferentiableOn ℝ (fSeq i) C)
(hpointwise :
∀ x : Fin n → Real, x ∈ C →
Filter.Tendsto (fun i : ℕ => fSeq i x) Filter.atTop (nhds (f x))) :
∀ x : Fin n → Real, x ∈ C →
Filter.Tendsto (fun i : ℕ => euclideanGradientAt (fSeq i) x) Filter.atTop
(nhds (euclideanGradientAt f x))
Helper for Theorem 25.6: because int (dom f) is nonempty, the Euclideanized subdifferential fiber at any domain point contains no lines. This is the local hypothesis needed to invoke the no-lines form of Theorem 18.6 exactly as in Rockafellar's proof.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_preimageSubdifferential_contains_no_lines_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hCne :
(((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x) : Set
(Fin n → Real)).Nonempty) :
¬ ∃ y : Fin n → Real, y ≠ 0 ∧
y ∈ (-Set.recessionCone
(((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x) : Set (Fin n → Real))) ∩
Set.recessionCone
(((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x) : Set (Fin n → Real))
Helper for Theorem 25.6: Rockafellar's Chapter 18 decomposition treats the extreme-point part first, so the geometric input needed here is that every extreme point of the Euclideanized fiber lies in the closure of its exposed points. The interior case uses the bounded form of Theorem 18.6; the boundary case uses the no-lines form.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_extremePoints_preimageSubdifferential_subset_closureExposedPoints_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x p : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hp :
p ∈ (((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x).extremePoints ℝ)) :
p ∈ closure ((((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x).exposedPoints ℝ))
Helper for Theorem 25.6: Rockafellar's boundary argument reduces the extreme-point part of the Euclideanized subdifferential to nearby gradient limits.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_extremePoints_preimageSubdifferential_subset_closureGradientLimitVectors_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x p : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f)
(hp :
p ∈ (((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x).extremePoints ℝ)) :
p ∈ closure (gradientLimitVectorsAt f x)
Helper for Theorem 25.6: the reverse inclusion follows Rockafellar's Chapter 18 decomposition: split the Euclideanized subdifferential into extreme points and extreme directions, send the points into closure S(x), and send the directions into the normal cone.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_reverseInclusion_chapter18_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f) :
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x) ⊆
closure (convexHull Real (gradientLimitVectorsAt f x)) +
((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x)
Helper for Theorem 25.6: the reverse inclusion is Rockafellar's Chapter 18 extreme-point / extreme-direction decomposition.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_6_reverseInclusion_of_mem_effectiveDomain
{n : Nat} (f : (Fin n → Real) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → Real)) f)
(hf_closed : LowerSemicontinuous f)
(hdom : (interior (effectiveDomain (Set.univ : Set (Fin n → Real)) f)).Nonempty)
{x : Fin n → Real}
(hx : x ∈ effectiveDomain (Set.univ : Set (Fin n → Real)) f) :
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt f x) ⊆
closure (convexHull Real (gradientLimitVectorsAt f x)) +
((dotProductEquiv Real (Fin n)) ⁻¹'
normalConeAt (effectiveDomain (Set.univ : Set (Fin n → Real)) f) x)
Helper for Theorem 25.7: at an EReal differentiability point of a convex function, the Euclideanized subdifferential fiber collapses to the singleton containing the gradient vector.
open scoped Topology
open scoped Pointwise
lemma helperForTheorem_25_7_subdifferentialPreimage_eq_singleton_gradient
{n : Nat} {g : (Fin n → Real) → EReal} (hgConv : ConvexFunction g)
{x : Fin n → Real} (hgDiff : ERealDifferentiableAt g x) :
((dotProductEquiv Real (Fin n)) ⁻¹' subdifferentialAt g x) =
({erealGradientAt hgDiff} : Set (Fin n → Real))
Helper for Corollary 25.7.1: the Fin 1 gradient of a scalar lift is exactly the scalar derivative written as a constant Fin 1 vector.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_7_1_euclideanGradientAt_scalarLift_eq_scalarPoint_deriv
{g : ℝ → ℝ} {t : ℝ} (hg : DifferentiableAt ℝ g t) :
euclideanGradientAt (fun u : Fin 1 → ℝ => g (u 0)) (scalarPoint t) =
scalarPoint (deriv g t)
Helper for Corollary 25.7.1: specializing Theorem 25.7 to Fin 1 transports pointwise gradient convergence into pointwise convergence of the scalar derivatives.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_7_1_pointwise_deriv_tendsto_of_theorem_25_7
{I : Set ℝ} {f : ℝ → ℝ} (fSeq : ℕ → ℝ → ℝ)
(hIopen : IsOpen I) (hIconv : Convex ℝ I) (hf : ConvexOn ℝ I f)
(hfdiff : DifferentiableOn ℝ f I)
(hSeqConvex : ∀ i : ℕ, ConvexOn ℝ I (fSeq i))
(hSeqDiff : ∀ i : ℕ, DifferentiableOn ℝ (fSeq i) I)
(hpointwise :
∀ t : ℝ, t ∈ I →
Filter.Tendsto (fun i : ℕ => fSeq i t) Filter.atTop (nhds (f t))) :
∀ t : ℝ, t ∈ I →
Filter.Tendsto (fun i : ℕ => deriv (fSeq i) t) Filter.atTop (nhds (deriv f t))§25 — Differentiability of Convex Functions — Part 13
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Corollary 25.7.1: Theorem 25.3 gives continuity and monotonicity of the derivative on every compact subinterval once differentiability is known on the whole open interval.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_7_1_deriv_continuousOn_Icc_and_monotoneOn
{I : Set ℝ} (hIopen : IsOpen I) (hIconv : Convex ℝ I) {g : ℝ → ℝ}
(hgconv : ConvexOn ℝ I g) (hgdiff : DifferentiableOn ℝ g I)
{a b : ℝ} (_hab : a ≤ b) (hIcc : Set.Icc a b ⊆ I) :
ContinuousOn (deriv g) (Set.Icc a b) ∧ MonotoneOn (deriv g) (Set.Icc a b)§25 — Differentiability of Convex Functions — Part 14
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Corollary 25.7.1: let I ⊆ ℝ be an open interval, encoded here as an open convex set. If f and the sequence f_i are finite convex functions on I, each differentiable on I, and f_i t → f t for every t ∈ I, then deriv (f_i) t → deriv f t for every t ∈ I. Moreover, for every closed bounded subinterval Set.Icc a b ⊆ I, the convergence of the derivatives is uniform on Set.Icc a b.
open scoped Topology
open scoped Pointwise
theorem convexOn_openInterval_tendsto_deriv_and_tendstoUniformlyOn_Icc_of_pointwise_convergent
{I : Set ℝ} {f : ℝ → ℝ} (fSeq : ℕ → ℝ → ℝ)
(hIopen : IsOpen I) (hIconv : Convex ℝ I) (hf : ConvexOn ℝ I f)
(hfdiff : DifferentiableOn ℝ f I)
(hSeqConvex : ∀ i : ℕ, ConvexOn ℝ I (fSeq i))
(hSeqDiff : ∀ i : ℕ, DifferentiableOn ℝ (fSeq i) I)
(hpointwise :
∀ t : ℝ, t ∈ I →
Filter.Tendsto (fun i : ℕ => fSeq i t) Filter.atTop (nhds (f t))) :
(∀ t : ℝ, t ∈ I →
Filter.Tendsto (fun i : ℕ => deriv (fSeq i) t) Filter.atTop (nhds (deriv f t))) ∧
∀ ⦃a b : ℝ⦄, a ≤ b → Set.Icc a b ⊆ I →
TendstoUniformlyOn (fun i t => deriv (fSeq i) t) (deriv f) Filter.atTop (Set.Icc a b)
Helper for Corollary 25.7.1: pointwise convergence on a finite set is eventually uniform on that finite set.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_7_1_eventually_uniformOn_finite
{α : Type*} {gSeq : ℕ → α → ℝ} {g : α → ℝ} {s : Finset α} {ε : ℝ} (hε : 0 < ε)
(hpointwise :
∀ x ∈ s, Filter.Tendsto (fun i : ℕ => gSeq i x) Filter.atTop (nhds (g x))) :
∀ᶠ n : ℕ in Filter.atTop, ∀ x ∈ s, |gSeq n x - g x| < ε
Helper for Corollary 25.7.1: on a compact interval, pointwise convergence of monotone scalar functions to a continuous limit is automatically uniform.
open scoped Topology
open scoped Pointwise
lemma helperForCorollary_25_7_1_tendstoUniformlyOn_Icc_of_pointwise_tendsto_monotoneOn
{gSeq : ℕ → ℝ → ℝ} {g : ℝ → ℝ} {a b : ℝ} (hab : a ≤ b)
(hmonoSeq : ∀ i : ℕ, MonotoneOn (gSeq i) (Set.Icc a b))
(hgcont : ContinuousOn g (Set.Icc a b))
(hpointwise :
∀ x ∈ Set.Icc a b,
Filter.Tendsto (fun i : ℕ => gSeq i x) Filter.atTop (nhds (g x))) :
TendstoUniformlyOn gSeq g Filter.atTop (Set.Icc a b)§26 — The Legendre Transformation — Part 1
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Definition 26.0.1: a multivalued mapping ρ is single-valued if for every x, the value ρ x contains at most one point.
def IsSingleValuedMultivaluedMap {X Y : Type*} (ρ : X → Set Y) : Prop :=
∀ x, Set.Subsingleton (ρ x)
Definition 26.0.2: the inverse multivalued mapping of ρ sends x* to the set of all x such that x* ∈ ρ(x).
def inverseMultivaluedMap {X Y : Type*} (ρ : X → Set Y) : Y → Set X :=
fun xStar => {x | xStar ∈ ρ x}
Definition 26.0.3: a multivalued mapping ρ is one-to-one precisely when both ρ and its inverse multivalued mapping ρ⁻¹ are single-valued.
def IsOneToOneMultivaluedMap {X Y : Type*} (ρ : X → Set Y) : Prop :=
IsSingleValuedMultivaluedMap ρ ∧
IsSingleValuedMultivaluedMap (inverseMultivaluedMap ρ)
The graph of a multivalued mapping ρ consists of the pairs (x, y) with y ∈ ρ x.
def multivaluedMapGraph {X Y : Type*} (ρ : X → Set Y) : Set (X × Y) :=
{p | p.2 ∈ ρ p.1}
Lemma 26.1: a multivalued mapping ρ is one-to-one exactly when its graph contains neither two distinct pairs with the same first coordinate nor two distinct pairs with the same second coordinate.
theorem isOneToOneMultivaluedMap_iff_graph_coordinate_uniqueness {X Y : Type*} (ρ : X → Set Y) :
IsOneToOneMultivaluedMap ρ ↔
((∀ ⦃x y₁ y₂⦄,
(x, y₁) ∈ multivaluedMapGraph ρ →
(x, y₂) ∈ multivaluedMapGraph ρ →
y₁ = y₂) ∧
∀ ⦃x₁ x₂ y⦄,
(x₁, y) ∈ multivaluedMapGraph ρ →
(x₂, y) ∈ multivaluedMapGraph ρ →
x₁ = x₂)
The convex-analytic condition that the subdifferential of f is single-valued on its effective domain and injective there.
def HasSingleValuedInjectiveSubdifferential {n : ℕ} (f : (Fin n → ℝ) → EReal) : Prop :=
ConvexFunction f ∧
(∀ x ∈ subdifferentialEffectiveDomain f, Set.Subsingleton (subdifferentialAt f x)) ∧
∀ ⦃x y g⦄,
x ∈ subdifferentialEffectiveDomain f →
y ∈ subdifferentialEffectiveDomain f →
g ∈ subdifferentialAt f x →
g ∈ subdifferentialAt f y →
x = y
The gradient image of C under f, which is the dual domain used in the Legendre conjugate construction.
def legendreGradientImage {n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n)))
(f : EuclideanSpace ℝ (Fin n) → ℝ) :
Set (EuclideanSpace ℝ (Fin n)) :=
gradient f '' C
-- Proof sketch: unfold the image set and use the original point `x` as the witness.
Every gradient value of a point of C lies in the gradient image of C.
lemma mem_legendreGradientImage {n : ℕ} {C : Set (EuclideanSpace ℝ (Fin n))}
{f : EuclideanSpace ℝ (Fin n) → ℝ} {x : EuclideanSpace ℝ (Fin n)} (hx : x ∈ C) :
gradient f x ∈ legendreGradientImage C f
Definition 26.4.0.1: the Legendre conjugate of a differentiable real-valued function f on an open set C ⊆ ℝ^n is the pair (D, g) where D is the image of C under the gradient map ∇ f, and g is the real-valued function on D given by g (xStar) = ⟪(∇ f)⁻¹ xStar, xStar⟫ - f ((∇ f)⁻¹ xStar). The field fiber_well_defined records the weaker hypothesis from the text ensuring that this formula is independent of the chosen preimage in a gradient fiber, so injectivity of ∇ f is not assumed in the definition.
structure LegendreConjugateOn {n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n)))
(f : EuclideanSpace ℝ (Fin n) → ℝ) where
isOpen_source : IsOpen C
differentiableOn_source : DifferentiableOn ℝ f C
conjFun : legendreGradientImage C f → ℝ
fiber_well_defined : ∀ ⦃x₁ x₂ xStar : EuclideanSpace ℝ (Fin n)⦄,
x₁ ∈ C →
x₂ ∈ C →
gradient f x₁ = xStar →
gradient f x₂ = xStar →
dotProduct x₁ xStar - f x₁ = dotProduct x₂ xStar - f x₂
value_eq : ∀ ⦃x : EuclideanSpace ℝ (Fin n)⦄, (hx : x ∈ C) →
conjFun ⟨gradient f x, mem_legendreGradientImage (C := C) (f := f) (x := x) hx⟩ =
(dotProduct (fun i => x i) (fun i => gradient f x i) - f x)
Definition 26.4.0.2: passing from (C, f) to its well-defined Legendre conjugate (D, g) is called the Legendre transformation. In the Euclidean differentiable setting fixed in Definition 26.4.0.1, this is exactly the same data as a LegendreConjugateOn C f.
abbrev LegendreTransformationOn {n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n)))
(f : EuclideanSpace ℝ (Fin n) → ℝ) :=
LegendreConjugateOn C f
The chosen gradient on int (dom f) for an EReal-valued function that is differentiable at every interior effective-domain point, extended by 0 outside that interior.
noncomputable def interiorGradientMap {n : ℕ} (f : (Fin n → ℝ) → EReal)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x) :
(Fin n → ℝ) → (Fin n → ℝ) :=
fun x =>
if hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) then
erealGradientAt (hdiff x hx)
else
0
Helper for Lemma 26.1: membership in the graph of ρ is exactly membership in the fiber ρ x.
lemma helperForLemma_26_1_graphMembership_iff {X Y : Type*} (ρ : X → Set Y) (x : X) (y : Y) :
(x, y) ∈ multivaluedMapGraph ρ ↔ y ∈ ρ x
Helper for Lemma 26.1: single-valuedness of ρ is equivalent to uniqueness of the second coordinate inside each graph fiber over a fixed x.
lemma helperForLemma_26_1_graphFiberUniqueness_iff_singleValued {X Y : Type*} (ρ : X → Set Y) :
IsSingleValuedMultivaluedMap ρ ↔
∀ ⦃x y₁ y₂⦄,
(x, y₁) ∈ multivaluedMapGraph ρ →
(x, y₂) ∈ multivaluedMapGraph ρ →
y₁ = y₂
Helper for Lemma 26.1: single-valuedness of ρ⁻¹ is equivalent to uniqueness of the first coordinate inside each graph fiber over a fixed x*.
lemma helperForLemma_26_1_swappedGraphFiberUniqueness_iff_inverseSingleValued
{X Y : Type*} (ρ : X → Set Y) :
IsSingleValuedMultivaluedMap (inverseMultivaluedMap ρ) ↔
∀ ⦃x₁ x₂ y⦄,
(x₁, y) ∈ multivaluedMapGraph ρ →
(x₂, y) ∈ multivaluedMapGraph ρ →
x₁ = x₂
Auxiliary package recording a Legendre-conjugate construction relative to a chosen pairing and a chosen map on the source set.
structure LegendreConjugatePackageOn {X Y : Type*} (pair : X → Y → ℝ) (C : Set X) (f : X → EReal) where
target : Set Y
conjFun : Y → EReal
toFun : X → Y
image_eq : target = toFun '' C
fiber_well_defined : ∀ ⦃x₁ x₂ xStar⦄,
x₁ ∈ C →
x₂ ∈ C →
toFun x₁ = xStar →
toFun x₂ = xStar →
(((pair x₁ xStar : ℝ) : EReal) - f x₁) =
(((pair x₂ xStar : ℝ) : EReal) - f x₂)
value_eq : ∀ ⦃x⦄, x ∈ C → conjFun (toFun x) = (((pair x (toFun x) : ℝ) : EReal) - f x)
Helper for Text 26.4.0.2: on the singleton space Fin 0 → ℝ, properness forces the effective domain on univ to be all of space.
lemma helperForText_26_4_0_2_effectiveDomain_univ_finZero
{F : (Fin 0 → ℝ) → EReal} (hF : ProperERealFunction F) :
effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F = Set.univ
Helper for Text 26.4.0.2: any proper convex extension on Fin 0 → ℝ has full interior effective domain, so it cannot realize C = ∅.
lemma helperForText_26_4_0_2_interior_effectiveDomain_univ_finZero
{F : (Fin 0 → ℝ) → EReal} (hF : ProperConvexERealFunction (F := (Fin 0 → ℝ)) F) :
interior (effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F) = Set.univ
Helper for Text 26.4.0.2: on Fin 0 → ℝ, the interior effective domain of a proper convex extension is nonempty.
lemma helperForText_26_4_0_2_interior_effectiveDomain_nonempty_finZero
{F : (Fin 0 → ℝ) → EReal} (hF : ProperConvexERealFunction (F := (Fin 0 → ℝ)) F) :
(interior (effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F)).Nonempty
Helper for Text 26.4.0.2: for a fixed proper convex function on Fin 0 → ℝ, the interior effective domain cannot be empty.
lemma helperForText_26_4_0_2_interior_effectiveDomain_ne_empty_finZero
{F : (Fin 0 → ℝ) → EReal} (hF : ProperConvexERealFunction (F := (Fin 0 → ℝ)) F) :
interior (effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F) ≠ (∅ : Set (Fin 0 → ℝ))
Helper for Text 26.4.0.2: on Fin 0 → ℝ, the conclusion interior (effectiveDomain F) = ∅ cannot hold for a proper convex extension.
lemma helperForText_26_4_0_2_no_emptyInteriorExtension_finZero :
¬ ∃ F : (Fin 0 → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin 0 → ℝ)) F ∧
interior (effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F) = (∅ : Set (Fin 0 → ℝ))
Helper for Text 26.4.0.2: the gradient image of the empty source set is empty.
lemma helperForText_26_4_0_2_legendreGradientImage_empty {n : ℕ}
{f : EuclideanSpace ℝ (Fin n) → ℝ} :
legendreGradientImage (∅ : Set (EuclideanSpace ℝ (Fin n))) f = ∅
Helper for Text 26.4.0.2: no point lies in the gradient image of the empty source set.
lemma helperForText_26_4_0_2_false_of_mem_emptyGradientImage {n : ℕ}
{f : EuclideanSpace ℝ (Fin n) → ℝ} {xStar : EuclideanSpace ℝ (Fin n)}
(hxStar : xStar ∈ legendreGradientImage (∅ : Set (EuclideanSpace ℝ (Fin n))) f) :
False
Helper for Text 26.4.0.2: every function is differentiable on the empty zero-dimensional source set.
lemma helperForText_26_4_0_2_differentiableOn_empty_finZero
{f : EuclideanSpace ℝ (Fin 0) → ℝ} :
DifferentiableOn ℝ f (∅ : Set (EuclideanSpace ℝ (Fin 0)))
Helper for Text 26.4.0.2: the conjugate function on the empty gradient image is the unique function out of that empty target type.
def helperForText_26_4_0_2_emptyGradientImageConjFun_finZero
{f : EuclideanSpace ℝ (Fin 0) → ℝ} :
legendreGradientImage (∅ : Set (EuclideanSpace ℝ (Fin 0))) f → ℝ :=
fun xStar =>
False.elim
(helperForText_26_4_0_2_false_of_mem_emptyGradientImage (f := f)
(xStar := xStar.1) xStar.2)
Helper for Text 26.4.0.2: fiber well-definedness is vacuous on the empty zero-dimensional source set.
lemma helperForText_26_4_0_2_emptyFiberWellDefined_finZero
{f : EuclideanSpace ℝ (Fin 0) → ℝ} :
∀ ⦃x₁ x₂ xStar : EuclideanSpace ℝ (Fin 0)⦄,
x₁ ∈ (∅ : Set (EuclideanSpace ℝ (Fin 0))) →
x₂ ∈ (∅ : Set (EuclideanSpace ℝ (Fin 0))) →
gradient f x₁ = xStar →
gradient f x₂ = xStar →
dotProduct x₁ xStar - f x₁ = dotProduct x₂ xStar - f x₂
Helper for Text 26.4.0.2: the Legendre value formula is vacuous on the empty zero-dimensional source set.
lemma helperForText_26_4_0_2_emptyValueEq_finZero
{f : EuclideanSpace ℝ (Fin 0) → ℝ} :
∀ ⦃x : EuclideanSpace ℝ (Fin 0)⦄, (hx : x ∈ (∅ : Set (EuclideanSpace ℝ (Fin 0)))) →
helperForText_26_4_0_2_emptyGradientImageConjFun_finZero (f := f)
⟨gradient f x,
mem_legendreGradientImage (C := (∅ : Set (EuclideanSpace ℝ (Fin 0))))
(f := f) (x := x) hx⟩ =
(dotProduct (fun i => x i) (fun i => gradient f x i) - f x)
Helper for Text 26.4.0.2: in the zero-dimensional empty-source case, there is an explicit vacuous Legendre-transformation package on the empty source set.
def helperForText_26_4_0_2_emptyLegendreTransformationSource_finZero
{f : EuclideanSpace ℝ (Fin 0) → ℝ} :
LegendreTransformationOn (∅ : Set (EuclideanSpace ℝ (Fin 0))) f :=
{ isOpen_source := isOpen_empty
differentiableOn_source := helperForText_26_4_0_2_differentiableOn_empty_finZero (f := f)
conjFun := helperForText_26_4_0_2_emptyGradientImageConjFun_finZero (f := f)
fiber_well_defined := helperForText_26_4_0_2_emptyFiberWellDefined_finZero (f := f)
value_eq := helperForText_26_4_0_2_emptyValueEq_finZero (f := f) }
Helper for Text 26.4.0.2: after simplifying the image of ∅, the zero-dimensional Legendre-transformation hypothesis is inhabited.
lemma helperForText_26_4_0_2_nonemptyLegendreTransformation_finZero
{f : EuclideanSpace ℝ (Fin 0) → ℝ} :
Nonempty
(LegendreTransformationOn
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
f)
Helper for Text 26.4.0.2: the specialization n = 0, C = ∅ really satisfies every hypothesis of the target theorem before the contradiction in the conclusion appears.
lemma helperForText_26_4_0_2_counterexampleHypotheses_finZero
{f : (Fin 0 → ℝ) → ℝ} :
Convex ℝ (∅ : Set (Fin 0 → ℝ)) ∧
ConvexOn ℝ (∅ : Set (Fin 0 → ℝ)) f ∧
Nonempty
(LegendreTransformationOn
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) => f ((EuclideanSpace.equiv (Fin 0) ℝ) x)))
Helper for Text 26.4.0.2: once specialized to n = 0 and C = ∅, the theorem's conclusion contradicts proper convexity before the Fenchel-conjugate clause is used.
lemma helperForText_26_4_0_2_emptyConclusionImpossible_finZero
{f : (Fin 0 → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) => f ((EuclideanSpace.equiv (Fin 0) ℝ) x))) :
¬ ∃ F : (Fin 0 → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin 0 → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ (∅ : Set (Fin 0 → ℝ)), F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F) = (∅ : Set (Fin 0 → ℝ)) ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) => f ((EuclideanSpace.equiv (Fin 0) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate 0 F (xStar.1 : Fin 0 → ℝ)
Helper for Text 26.4.0.2: for a fixed zero-dimensional empty-source Legendre datum, the specialized conclusion type is empty.
lemma helperForText_26_4_0_2_emptyConclusionTypeIsEmpty_finZero
{f : (Fin 0 → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) => f ((EuclideanSpace.equiv (Fin 0) ℝ) x))) :
IsEmpty
(∃ F : (Fin 0 → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin 0 → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ (∅ : Set (Fin 0 → ℝ)), F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F) = (∅ : Set (Fin 0 → ℝ)) ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) => f ((EuclideanSpace.equiv (Fin 0) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate 0 F (xStar.1 : Fin 0 → ℝ))
Helper for Text 26.4.0.2: the theorem shape already fails in the specialization n = 0, C = ∅, before any universal quantification over dimensions is considered.
lemma helperForText_26_4_0_2_emptyCaseTheoremShapeFalse
{f : (Fin 0 → ℝ) → ℝ}
(hEmptyCase :
∀ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) => f ((EuclideanSpace.equiv (Fin 0) ℝ) x)),
∃ F : (Fin 0 → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin 0 → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ (∅ : Set (Fin 0 → ℝ)), F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F) = (∅ : Set (Fin 0 → ℝ)) ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) => f ((EuclideanSpace.equiv (Fin 0) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate 0 F (xStar.1 : Fin 0 → ℝ)) :
False
Helper for Text 26.4.0.2: the concrete specialization n = 0, C = ∅, f = 0 already refutes the theorem's local conclusion shape.
lemma helperForText_26_4_0_2_zeroFunctionCounterexampleWitness_finZero :
∃ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) =>
(fun _ : Fin 0 → ℝ => (0 : ℝ)) ((EuclideanSpace.equiv (Fin 0) ℝ) x)),
¬ ∃ F : (Fin 0 → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin 0 → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ (∅ : Set (Fin 0 → ℝ)),
F x = (((fun _ : Fin 0 → ℝ => (0 : ℝ)) x) : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F) = (∅ : Set (Fin 0 → ℝ)) ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) =>
(fun _ : Fin 0 → ℝ => (0 : ℝ)) ((EuclideanSpace.equiv (Fin 0) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate 0 F (xStar.1 : Fin 0 → ℝ)
Helper for Text 26.4.0.2: the concrete specialization n = 0, C = ∅, f = 0 already refutes the theorem's local conclusion shape.
lemma helperForText_26_4_0_2_zeroFunctionEmptyCaseFalse :
¬ (∀ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) =>
(fun _ : Fin 0 → ℝ => (0 : ℝ)) ((EuclideanSpace.equiv (Fin 0) ℝ) x)),
∃ F : (Fin 0 → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin 0 → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ (∅ : Set (Fin 0 → ℝ)),
F x = (((fun _ : Fin 0 → ℝ => (0 : ℝ)) x) : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F) = (∅ : Set (Fin 0 → ℝ)) ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) =>
(fun _ : Fin 0 → ℝ => (0 : ℝ)) ((EuclideanSpace.equiv (Fin 0) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate 0 F (xStar.1 : Fin 0 → ℝ))
Helper for Text 26.4.0.2: any proof of the theorem's universal statement yields the forbidden zero-dimensional extension data after specializing to n = 0 and C = ∅.
lemma helperForText_26_4_0_2_specializedWitness_finZero
(hTarget :
∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ},
Convex ℝ C →
ConvexOn ℝ C f →
∀ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) :
∃ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) =>
(fun _ : Fin 0 → ℝ => (0 : ℝ)) ((EuclideanSpace.equiv (Fin 0) ℝ) x)),
∃ F : (Fin 0 → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin 0 → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ (∅ : Set (Fin 0 → ℝ)),
F x = (((fun _ : Fin 0 → ℝ => (0 : ℝ)) x) : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin 0 → ℝ)) F) = (∅ : Set (Fin 0 → ℝ)) ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin 0) ℝ).symm '' (∅ : Set (Fin 0 → ℝ)))
(fun x : EuclideanSpace ℝ (Fin 0) =>
(fun _ : Fin 0 → ℝ => (0 : ℝ)) ((EuclideanSpace.equiv (Fin 0) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate 0 F (xStar.1 : Fin 0 → ℝ)
Helper for Text 26.4.0.2: the specialized zero-dimensional witness extracted from any putative universal proof is already impossible, because its conclusion forces empty interior effective domain on a singleton space.
lemma helperForText_26_4_0_2_specializedWitnessImpossible_finZero
(hTarget :
∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ},
Convex ℝ C →
ConvexOn ℝ C f →
∀ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) :
False
Helper for Text 26.4.0.2: the theorem's full universal shape is refuted by the zero-dimensional empty-set specialization.
lemma helperForText_26_4_0_2_universalStatementContradiction
(hTarget :
∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ},
Convex ℝ C →
ConvexOn ℝ C f →
∀ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) :
False
Helper for Text 26.4.0.2: the curried universal theorem shape and the declaration-form signature are equivalent presentations of the same statement.
lemma helperForText_26_4_0_2_targetStatement_iff_declarationSignature :
(∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ},
Convex ℝ C →
ConvexOn ℝ C f →
∀ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) ↔
(∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: the curried universal theorem statement is empty for the same zero-dimensional empty-set reason as the declaration-form signature.
lemma helperForText_26_4_0_2_targetStatementIsEmpty :
IsEmpty
(∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ},
Convex ℝ C →
ConvexOn ℝ C f →
∀ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: the full universally quantified theorem statement is false, because the specialization n = 0, C = ∅ satisfies the hypotheses but violates the conclusion.
lemma helperForText_26_4_0_2_targetStatementFalse :
¬ (∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ},
Convex ℝ C →
ConvexOn ℝ C f →
∀ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: any declaration-form proof specializes to the impossible zero-dimensional empty-set case, for every f : (Fin 0 → ℝ) → ℝ.
lemma helperForText_26_4_0_2_false_of_declarationSignature_finZero
(hDecl : ∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
(f : (Fin 0 → ℝ) → ℝ) :
False
Helper for Text 26.4.0.2: the theorem's declaration-form signature is already refuted by the same zero-dimensional empty-set specialization.
lemma helperForText_26_4_0_2_declarationSignatureFalse :
¬ (∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: the exact declaration type of the target theorem is empty, because the zero-dimensional empty-set specialization already contradicts it.
lemma helperForText_26_4_0_2_declarationSignatureIsEmpty :
IsEmpty
(∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: any inhabitant of the declaration-form universal statement would specialize immediately to the current local theorem goal.
lemma helperForText_26_4_0_2_localGoal_of_declarationSignature
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)))
(hDecl :
∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(_hC_convex : Convex ℝ C) (_hf_convex : ConvexOn ℝ C f)
(L' : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L'.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) :
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)
Helper for Text 26.4.0.2: for the current local parameters, the remaining declaration-based proof skeleton is completely explicit. The exact declaration signature is empty, but any repaired inhabitant of that signature would specialize to the present local goal.
lemma helperForText_26_4_0_2_localReductionRouteData
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))) :
IsEmpty
(∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(_hC_convex : Convex ℝ C) (_hf_convex : ConvexOn ℝ C f)
(L' : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L'.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) ∧
((∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(_hC_convex : Convex ℝ C) (_hf_convex : ConvexOn ℝ C f)
(L' : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L'.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) →
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: in the current local theorem context, the exact declaration-form source type is still uninhabited, so no proof can be obtained merely by specializing the current false universal header.
lemma helperForText_26_4_0_2_noLocalDeclarationSignature
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))) :
¬ (∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(_hC_convex : Convex ℝ C) (_hf_convex : ConvexOn ℝ C f)
(L' : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L'.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: in the current local theorem context, there cannot simultaneously be a declaration-form universal proof term and a witness for the present goal, because the declaration-form source type is already empty.
lemma helperForText_26_4_0_2_noLocalDeclarationSpecializationPair
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))) :
IsEmpty
((∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(_hC_convex : Convex ℝ C) (_hf_convex : ConvexOn ℝ C f)
(L' : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L'.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) ∧
(∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)))
Helper for Text 26.4.0.2: once a local witness for the present goal is fixed, the declaration-form universal route is still unavailable, because combining the two would inhabit the already-empty specialization pair type.
lemma helperForText_26_4_0_2_localWitness_blocks_declarationRoute
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))) :
(∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) →
¬ (∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(_hC_convex : Convex ℝ C) (_hf_convex : ConvexOn ℝ C f)
(L' : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L'.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: in the current local theorem context, the exact local goal is what any repaired declaration-form proof would specialize to, but the declaration-form source type is already empty. This isolates the remaining blocker to an upstream repair of the theorem statement rather than to any further local decomposition.
lemma helperForText_26_4_0_2_localGoalRouteSummary
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))) :
((∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(_hC_convex : Convex ℝ C) (_hf_convex : ConvexOn ℝ C f)
(L' : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L'.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) →
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) ∧
¬ (∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(_hC_convex : Convex ℝ C) (_hf_convex : ConvexOn ℝ C f)
(L' : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L'.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))§26 — The Legendre Transformation — Part 2
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Text 26.4.0.2: in the Legendre setting of Definition 26.4.0.1, if C is convex and f is convex on C, and if we exclude the formal degenerate specialization n = 0, C = ∅, then f admits a closed proper convex EReal-valued extension F on ℝ^n whose effective-domain interior is exactly C, and the Legendre conjugate g agrees on D with the ordinary Fenchel conjugate F* of that extension.
theorem legendreTransformation_has_closedProperConvexExtension_with_fenchelConjugate_restriction
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)))
(hRepair : n ≠ 0 ∨ C.Nonempty) :
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)
Helper for Text 26.4.0.2: any actual witness of the target conclusion already rules out the degenerate specialization n = 0 and C = ∅, because that specialization is exactly where the singleton-space interior-domain contradiction applies.
lemma helperForText_26_4_0_2_localWitness_excludes_finZero_empty
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)))
(hWitness :
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) :
¬ (n = 0 ∧ C = (∅ : Set (Fin n → ℝ)))
Helper for Text 26.4.0.2: once the local parameters are specialized to n = 0 and C = ∅, the exact local existential conclusion of the target theorem is impossible. This packages the bad case as a direct obstruction for the eventual theorem-level case split.
lemma helperForText_26_4_0_2_localGoalFalse_of_finZero_empty
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)))
(hBadSpecialization : n = 0 ∧ C = (∅ : Set (Fin n → ℝ))) :
¬ (∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: in zero dimension, any actual witness for the target conclusion forces the source set to be nonempty, so the repaired theorem statement must exclude the empty source specialization when n = 0.
lemma helperForText_26_4_0_2_localWitness_forces_nonemptySource_finZero
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)))
(hn : n = 0)
(hWitness :
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) :
C ≠ (∅ : Set (Fin n → ℝ))
Helper for Text 26.4.0.2: in dimension zero, any actual witness of the target conclusion forces the source set to contain a point. This isolates the concrete side condition missing from the current false theorem header.
lemma helperForText_26_4_0_2_localWitness_nonempty_of_finZero
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)))
(hWitness :
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) :
n = 0 → C.Nonempty
Helper for Text 26.4.0.2: any actual witness of the target conclusion forces the concrete zero-dimensional side condition n ≠ 0 ∨ C.Nonempty. This packages the exact local repair that the obstruction chain isolates.
lemma helperForText_26_4_0_2_localWitness_forces_repairedSideCondition
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)))
(hWitness :
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) :
n ≠ 0 ∨ C.Nonempty
Helper for Text 26.4.0.2: failing the repaired side condition n ≠ 0 ∨ C.Nonempty is exactly the bad specialization n = 0 and C = ∅ isolated by the obstruction chain.
lemma helperForText_26_4_0_2_not_repairedSideCondition_iff_badSpecialization
{n : ℕ} {C : Set (Fin n → ℝ)} :
¬ (n ≠ 0 ∨ C.Nonempty) ↔ n = 0 ∧ C = (∅ : Set (Fin n → ℝ))
Helper for Text 26.4.0.2: if the repaired side condition n ≠ 0 ∨ C.Nonempty fails, then the exact local existential conclusion of the target theorem is impossible.
lemma helperForText_26_4_0_2_localGoalFalse_of_not_repairedSideCondition
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)))
(hNoRepair : ¬ (n ≠ 0 ∨ C.Nonempty)) :
¬ (∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: if the repaired side condition n ≠ 0 ∨ C.Nonempty fails, then the exact local existential goal type is empty.
lemma helperForText_26_4_0_2_localGoalIsEmpty_of_not_repairedSideCondition
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)))
(hNoRepair : ¬ (n ≠ 0 ∨ C.Nonempty)) :
IsEmpty
(∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))
Helper for Text 26.4.0.2: the local obstruction splits into a reusable summary. The declaration-form universal source type is already empty, any actual local witness forces the repaired side condition n ≠ 0 ∨ C.Nonempty, and failing that side condition empties the exact local existential goal.
lemma helperForText_26_4_0_2_localObstructionSummary
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))) :
IsEmpty
(∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(_hC_convex : Convex ℝ C) (_hf_convex : ConvexOn ℝ C f)
(L' : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))),
∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L'.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) ∧
(((∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) →
n ≠ 0 ∨ C.Nonempty) ∧
(¬ (n ≠ 0 ∨ C.Nonempty) →
IsEmpty
(∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) =>
f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ))))
Helper for Text 26.4.0.2: the current theorem hypotheses do not by themselves force the repaired side condition n ≠ 0 ∨ C.Nonempty; the bad specialization n = 0, C = ∅, f = 0 still satisfies them.
lemma helperForText_26_4_0_2_hypotheses_doNotForce_repairedSideCondition :
¬ (∀ {n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ},
Convex ℝ C →
ConvexOn ℝ C f →
∀ L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
n ≠ 0 ∨ C.Nonempty)
Helper for Text 26.4.0.2: under the current unrepaired theorem header, the exact local existential goal has only one formal alternative. Either the repaired side condition n ≠ 0 ∨ C.Nonempty holds, or the obstruction chain already packages the local goal type as empty.
lemma helperForText_26_4_0_2_localGoalIsEmpty_or_repairedSideCondition
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_convex : Convex ℝ C) (hf_convex : ConvexOn ℝ C f)
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))) :
IsEmpty
(∃ F : (Fin n → ℝ) → EReal,
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
(∀ x ∈ C, F x = (f x : EReal)) ∧
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F) = C ∧
∀ xStar : legendreGradientImage
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x)),
(L.conjFun xStar : EReal) =
fenchelConjugate n F (xStar.1 : Fin n → ℝ)) ∨
(n ≠ 0 ∨ C.Nonempty)
Helper for Text 26.4.0.2: transport the openness and differentiability data carried by the Legendre package from the Euclidean-space coordinates back to the textbook coordinates Fin n → ℝ.
lemma helperForText_26_4_0_2_openAndDifferentiableOn_of_legendreDatum
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun x : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) x))) :
IsOpen C ∧ DifferentiableOn ℝ f C
Helper for Text 26.4.0.2: a proper convex function on all of ℝⁿ can be repackaged as a proper convex EReal-valued function in the Jensen-style sense used locally in Section 26.
lemma helperForText_26_4_0_2_properConvexERealFunction_of_properConvexFunctionOn
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) :
ProperConvexERealFunction (F := (Fin n → ℝ)) f
Helper for Text 26.4.0.2: in positive dimension, the singleton {0} has empty interior.
lemma helperForText_26_4_0_2_singletonInterior_empty_of_ne_zero
{n : ℕ} (hn : n ≠ 0) :
interior ({0} : Set (Fin n → ℝ)) = (∅ : Set (Fin n → ℝ))
Helper for Text 26.4.0.2: when C = ∅ but n ≠ 0, the indicator of {0} gives an explicit closed proper convex witness whose effective-domain interior is empty.
lemma helperForText_26_4_0_2_indicatorSingletonPackage_of_emptySource
{n : ℕ} (hn : n ≠ 0) :
ProperConvexERealFunction (F := (Fin n → ℝ))
(indicatorFunction ({0} : Set (Fin n → ℝ))) ∧
LowerSemicontinuous (indicatorFunction ({0} : Set (Fin n → ℝ))) ∧
interior
(effectiveDomain (Set.univ : Set (Fin n → ℝ))
(indicatorFunction ({0} : Set (Fin n → ℝ)))) = ∅
Helper for Text 26.4.0.2: transporting the Euclidean-space source function z ↦ f ((EuclideanSpace.equiv (Fin n) ℝ) z) back to textbook coordinates sends its gradient at (EuclideanSpace.equiv (Fin n) ℝ).symm x to the Fréchet derivative determined by the transported coordinate gradient.
lemma helperForText_26_4_0_2_sourceGradient_transport_fderiv_form
{n : ℕ} {f : (Fin n → ℝ) → ℝ} {x : Fin n → ℝ}
(hdiffAt : DifferentiableAt ℝ f x) :
HasFDerivAt
(fun z : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) z))
((InnerProductSpace.toDual ℝ (EuclideanSpace ℝ (Fin n)))
((EuclideanSpace.equiv (Fin n) ℝ).symm (euclideanGradientAt f x)))
((EuclideanSpace.equiv (Fin n) ℝ).symm x)
Helper for Text 26.4.0.2: transporting the Euclidean-space source function z ↦ f ((EuclideanSpace.equiv (Fin n) ℝ) z) back to textbook coordinates sends its gradient at (EuclideanSpace.equiv (Fin n) ℝ).symm x to the coordinate gradient euclideanGradientAt f x.
lemma helperForText_26_4_0_2_sourceGradient_transport
{n : ℕ} {f : (Fin n → ℝ) → ℝ} {x : Fin n → ℝ}
(hdiffAt : DifferentiableAt ℝ f x) :
((gradient
(fun z : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) z))
((EuclideanSpace.equiv (Fin n) ℝ).symm x) : EuclideanSpace ℝ (Fin n)) : Fin n → ℝ) =
euclideanGradientAt f x
Helper for Text 26.4.0.2: the closed extension F = convexFunctionClosure (fun x => (f x : EReal) + indicatorFunction C x) has euclideanGradientAt f x as a Euclidean subgradient at every x ∈ C.
lemma helperForText_26_4_0_2_closedExtension_subgradient_at_coordinateGradient
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_open : IsOpen C) (hf_diff : DifferentiableOn ℝ f C)
{fExt : (Fin n → ℝ) → EReal} (hfExt : fExt = fun y => (f y : EReal) + indicatorFunction C y)
{F : (Fin n → ℝ) → EReal} (hF : F = convexFunctionClosure fExt)
(hproperExtOn : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) fExt)
{x : Fin n → ℝ} (hx : x ∈ C) :
IsEuclideanSubgradientAt F x (euclideanGradientAt f x)
Helper for Text 26.4.0.2: at each x ∈ C, the closed extension F = convexFunctionClosure (fun x => (f x : EReal) + indicatorFunction C x) satisfies the Fenchel-Young equality in the subtraction form used later in the theorem.
lemma helperForText_26_4_0_2_fenchelYoung_subtractionForm
{n : ℕ} {F : (Fin n → ℝ) → EReal} {x xStar : Fin n → ℝ}
(hproperFOn : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) F)
(hFY : FenchelYoungEqualityAt F x xStar) :
fenchelConjugate n F xStar = (((dotProduct x xStar : ℝ) : EReal) - F x)
Helper for Text 26.4.0.2: at each x ∈ C, the closed extension F = convexFunctionClosure (fun x => (f x : EReal) + indicatorFunction C x) satisfies the Fenchel-Young equality at the coordinate gradient euclideanGradientAt f x.
lemma helperForText_26_4_0_2_fenchelEquality_for_closedExtension_at_coordinateGradient
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(hC_open : IsOpen C) (hf_diff : DifferentiableOn ℝ f C)
{fExt : (Fin n → ℝ) → EReal} (hfExt : fExt = fun y => (f y : EReal) + indicatorFunction C y)
{F : (Fin n → ℝ) → EReal} (hF : F = convexFunctionClosure fExt)
(hproperExtOn : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) fExt)
(hproperFOn : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) F)
{x : Fin n → ℝ} (hx : x ∈ C) :
fenchelConjugate n F (euclideanGradientAt f x) =
(((dotProduct x (euclideanGradientAt f x) : ℝ) : EReal) - F x)
Helper for Text 26.4.0.2: rewriting L.value_eq in textbook coordinates expresses the Legendre value at a source point as the same subtraction formula that appears in Fenchel-Young.
lemma helperForText_26_4_0_2_legendreValueEq_coordinate_form
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → ℝ}
(L : LegendreTransformationOn
((EuclideanSpace.equiv (Fin n) ℝ).symm '' C)
(fun z : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) z)))
{xE : EuclideanSpace ℝ (Fin n)}
(hxE : xE ∈ (EuclideanSpace.equiv (Fin n) ℝ).symm '' C) :
(L.conjFun
⟨gradient (fun z : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) z)) xE,
mem_legendreGradientImage
(C := ((EuclideanSpace.equiv (Fin n) ℝ).symm '' C))
(f := fun z : EuclideanSpace ℝ (Fin n) => f ((EuclideanSpace.equiv (Fin n) ℝ) z))
(x := xE) hxE⟩ : EReal) =
(((dotProduct ((EuclideanSpace.equiv (Fin n) ℝ) xE)
(euclideanGradientAt f ((EuclideanSpace.equiv (Fin n) ℝ) xE)) : ℝ) : EReal) -
(f ((EuclideanSpace.equiv (Fin n) ℝ) xE) : EReal))§26 — The Legendre Transformation — Part 3
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 26.4: if f is a closed proper convex function, C = int (dom f) is nonempty, and f is differentiable on C, then the Legendre conjugate of (C, f) is well-defined. More precisely, with D the image of C under the interior gradient map of f, there exists a Legendre-conjugate package on C whose target is D; moreover D ⊆ dom f*, and the package's conjugate function agrees with f* on D.
theorem closedProperConvex_has_legendreConjugatePackageOn_interior_eq_fenchelConjugate
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hC_nonempty :
(interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)).Nonempty)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x) :
let C : Set (Fin n → ℝ) := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
∃ L : LegendreConjugatePackageOn (fun x xStar : Fin n → ℝ => dotProduct x xStar) C f,
L.toFun = interiorGradientMap f hdiff ∧
L.target = interiorGradientMap f hdiff '' C ∧
Set.EqOn L.conjFun (fenchelConjugate n f) L.target ∧
L.target ⊆ effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f)
An involutive Legendre-transform package is a bundled conjugacy package equipped with an inverse map on the target set.
structure InvolutiveLegendreTransformationOn {X Y : Type*}
(pair : X → Y → ℝ) (C : Set X) (f : X → EReal)
extends LegendreConjugatePackageOn pair C f where
invFun : Y → X
left_inv : ∀ ⦃x⦄, x ∈ C → invFun (toFun x) = x
inv_mem : ∀ ⦃xStar⦄, xStar ∈ target → invFun xStar ∈ C
right_inv : ∀ ⦃xStar⦄, xStar ∈ target → toFun (invFun xStar) = xStar
The standard Euclidean pairing on ℝ^n, used to specialize the generic Legendre data.
def euclideanPairing {n : ℕ} (x xStar : Fin n → ℝ) : ℝ :=
dotProduct x xStar
The Legendre-transform-type package associated to f is well-defined and involutory when the effective domain of ∂ f carries a bundled conjugacy package whose induced map T is exactly the unique Euclidean representative of the subgradient at each point.
structure RealizesSubgradientOn {n : ℕ} (f : (Fin n → ℝ) → EReal)
(L : InvolutiveLegendreTransformationOn (euclideanPairing (n := n))
(subdifferentialEffectiveDomain f) f) : Prop where
convex : ConvexFunction f
subgradient_mem :
∀ x ∈ subdifferentialEffectiveDomain f,
dotProductEquiv ℝ (Fin n) (L.toFun x) ∈ subdifferentialAt f x
subgradient_unique :
∀ ⦃x xStar⦄, x ∈ subdifferentialEffectiveDomain f →
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x →
xStar = L.toFun x
The Legendre-transform-type package associated to f is well-defined and involutory when there exists a bundled conjugacy package on dom ∂ f whose chosen dual points are exactly the unique Euclidean subgradients of f.
def LegendreWellDefinedInvolutory {n : ℕ} (f : (Fin n → ℝ) → EReal) : Prop :=
∃ L : InvolutiveLegendreTransformationOn (euclideanPairing (n := n))
(subdifferentialEffectiveDomain f) f,
RealizesSubgradientOn f L
Text 26.0.1: for convex functions, the Legendre transformation is essentially well-defined and involutory exactly in the regime where the subdifferential mapping is single-valued on its effective domain and one-to-one there.
theorem legendreWellDefinedInvolutory_iff_hasSingleValuedInjectiveSubdifferential
{n : ℕ} (f : (Fin n → ℝ) → EReal) :
LegendreWellDefinedInvolutory f ↔ HasSingleValuedInjectiveSubdifferential f
Definition 26.1.1: a proper convex function f on ℝ^n is essentially smooth when, with C = int (dom f), one has (a) C nonempty, (b) f admits a unique Euclidean subgradient at every point of C, encoded by a gradient map grad, and (c) for every sequence in C converging to a boundary point of C, the norms ‖grad (xᵢ)‖ tend to +∞. For a smooth convex function on all of ℝ^n, condition (c) is vacuous because then C = univ.
def IsEssentiallySmooth {n : ℕ} (f : (Fin n → ℝ) → EReal) : Prop
Theorem 26.1: for a closed proper convex function, the subdifferential mapping is single-valued exactly when the function is essentially smooth. In that case there is a gradient map grad on int (dom f) such that ∂ f(x) is the singleton {grad x} on the interior of the effective domain and ∂ f(x) = ∅ outside that interior.
theorem subdifferential_singleValued_iff_essentiallySmooth
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f) :
(IsSingleValuedMultivaluedMap (subdifferentialAt f) ↔ IsEssentiallySmooth f) ∧
(IsEssentiallySmooth f →
∃ grad : (Fin n → ℝ) → (Fin n → ℝ),
(∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
subdifferentialAt f x = {dotProductEquiv ℝ (Fin n) (grad x)}) ∧
∀ x ∉ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
subdifferentialAt f x = ∅)
Helper for Theorem 26.4: at each interior effective-domain point, the chosen interior gradient is a genuine Euclidean subgradient of f.
lemma helperForTheorem_26_4_interiorGradientMap_mem_subdifferentialAt
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x)
{x : Fin n → ℝ}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
dotProductEquiv ℝ (Fin n) (interiorGradientMap f hdiff x) ∈ subdifferentialAt f x
Helper for Theorem 26.4: Fenchel-Young equality rewrites the value of f* at an interior gradient as the standard subtraction formula.
lemma helperForTheorem_26_4_fenchelConjugate_eq_dotSub_at_interiorGradient
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x)
{x : Fin n → ℝ}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
fenchelConjugate n f (interiorGradientMap f hdiff x) =
(((dotProduct x (interiorGradientMap f hdiff x) : ℝ) : EReal) - f x)
Helper for Theorem 26.4: the subtraction formula is constant on each fiber of the interior gradient map.
lemma helperForTheorem_26_4_interiorGradient_fiber_well_defined
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x)
{x₁ x₂ xStar : Fin n → ℝ}
(hx₁ : x₁ ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hx₂ : x₂ ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hx₁Star : interiorGradientMap f hdiff x₁ = xStar)
(hx₂Star : interiorGradientMap f hdiff x₂ = xStar) :
(((dotProduct x₁ xStar : ℝ) : EReal) - f x₁) =
(((dotProduct x₂ xStar : ℝ) : EReal) - f x₂)
Helper for Theorem 26.4: the image of the interior gradient map lies in the effective domain of the Fenchel conjugate.
lemma helperForTheorem_26_4_gradientImage_subset_effectiveDomain_fenchelConjugate
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x) :
interiorGradientMap f hdiff ''
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ⊆
effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f)
Helper for Text 26.0.1: choose the unique Euclidean representative of the subgradient at each point of dom ∂ f, and return 0 off that domain.
noncomputable def helperForText_26_0_1_selectedSubgradientVector {n : ℕ}
{f : (Fin n → ℝ) → EReal}
(_hSVI : HasSingleValuedInjectiveSubdifferential f) :
(Fin n → ℝ) → (Fin n → ℝ) :=
fun x =>
if hx : x ∈ subdifferentialEffectiveDomain f then
(dotProductEquiv ℝ (Fin n)).symm
(Classical.choose
((helperForRemark_5_24_1_mem_subdifferentialEffectiveDomain_iff_nonempty f x).1 hx))
else
0
Helper for Text 26.0.1: on dom ∂ f, the selected Euclidean vector is a genuine subgradient.
lemma helperForText_26_0_1_selectedSubgradient_mem {n : ℕ}
{f : (Fin n → ℝ) → EReal}
(hSVI : HasSingleValuedInjectiveSubdifferential f)
{x : Fin n → ℝ} (hx : x ∈ subdifferentialEffectiveDomain f) :
dotProductEquiv ℝ (Fin n)
(helperForText_26_0_1_selectedSubgradientVector hSVI x) ∈
subdifferentialAt f x
Helper for Text 26.0.1: single-valuedness of ∂ f identifies every Euclidean subgradient with the selected one.
lemma helperForText_26_0_1_selectedSubgradient_unique {n : ℕ}
{f : (Fin n → ℝ) → EReal}
(hSVI : HasSingleValuedInjectiveSubdifferential f)
{x xStar : Fin n → ℝ} (hx : x ∈ subdifferentialEffectiveDomain f)
(hxStar :
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x) :
xStar = helperForText_26_0_1_selectedSubgradientVector hSVI x
Helper for Text 26.0.1: injectivity of the subdifferential on dom ∂ f makes the selected Euclidean subgradient map injective there as well.
lemma helperForText_26_0_1_selectedSubgradient_injectiveOnDomain {n : ℕ}
{f : (Fin n → ℝ) → EReal}
(hSVI : HasSingleValuedInjectiveSubdifferential f)
{x y : Fin n → ℝ}
(hx : x ∈ subdifferentialEffectiveDomain f)
(hy : y ∈ subdifferentialEffectiveDomain f)
(hxy :
helperForText_26_0_1_selectedSubgradientVector hSVI x =
helperForText_26_0_1_selectedSubgradientVector hSVI y) :
x = y
Helper for Theorem 26.1: under global single-valuedness of ∂ f, every interior point has a canonically chosen Euclidean gradient vector, namely the gradient supplied by Theorem 25.1.
lemma helperForTheorem_26_1_interiorGradientData_of_singleValued
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hSV : IsSingleValuedMultivaluedMap (subdifferentialAt f)) :
∃ grad : (Fin n → ℝ) → (Fin n → ℝ),
(∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
dotProductEquiv ℝ (Fin n) (grad x) ∈ subdifferentialAt f x) ∧
(∀ {x xStar}, x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) →
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x →
xStar = grad x)
Helper for Theorem 26.1: if ∂ f is globally single-valued, then every point outside int (dom f) has empty subdifferential.
lemma helperForTheorem_26_1_subdifferential_eq_empty_of_not_mem_interior_under_singleValued
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hSV : IsSingleValuedMultivaluedMap (subdifferentialAt f)) :
∀ x ∉ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
subdifferentialAt f x = ∅
Helper for Theorem 26.1: essential smoothness already packages the interior singleton fibers of ∂ f once one unpacks the chosen gradient field.
lemma helperForTheorem_26_1_singletonFiber_of_essentiallySmooth_on_interior
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hES : IsEssentiallySmooth f) :
∃ grad : (Fin n → ℝ) → (Fin n → ℝ),
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
subdifferentialAt f x = {dotProductEquiv ℝ (Fin n) (grad x)}
Helper for Theorem 26.1: a nonnegative real sequence that does not tend to +∞ admits a strictly monotone bounded subsequence.
lemma helperForTheorem_26_1_exists_strictMono_boundedSubsequence_of_not_tendsto_atTop
(a : ℕ → ℝ) (ha_nonneg : ∀ i : ℕ, 0 ≤ a i)
(ha_not_tendsto : ¬ Filter.Tendsto a Filter.atTop Filter.atTop) :
∃ R ≥ 0, ∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ k : ℕ, a (φ k) ≤ R
Helper for Theorem 26.1: essential smoothness forbids finite gradient-limit vectors at a frontier point of int (dom f).
lemma helperForTheorem_26_1_gradientLimitVectors_eq_empty_of_essentiallySmooth_frontier
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hES : IsEssentiallySmooth f)
{x : Fin n → ℝ}
(hxFrontier :
x ∈ frontier (interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))) :
gradientLimitVectorsAt f x = ∅
Helper for Theorem 26.1: on a frontier domain point, Theorem 25.6 collapses the vectorized subdifferential to ∅ once the boundary gradient-limit set is empty.
lemma helperForTheorem_26_1_boundarySubdifferential_eq_empty_of_essentiallySmooth_via_theorem25_6
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hES : IsEssentiallySmooth f)
{x : Fin n → ℝ}
(hxFrontier :
x ∈ frontier (interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)))
(_hxDom : x ∈ effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) :
subdifferentialAt f x = ∅
Helper for Theorem 26.1: the forward implication reduces to the boundary blow-up statement once the interior gradient field and the exterior emptiness are known.
lemma helperForTheorem_26_1_boundaryGradientNormBlowup_of_singleValued
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hSV : IsSingleValuedMultivaluedMap (subdifferentialAt f))
{grad : (Fin n → ℝ) → (Fin n → ℝ)}
(hgradMem :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
dotProductEquiv ℝ (Fin n) (grad x) ∈ subdifferentialAt f x)
(_hgradUnique :
∀ {x xStar}, x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) →
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x →
xStar = grad x) :
∀ (xSeq : ℕ → Fin n → ℝ) (x : Fin n → ℝ),
(∀ i : ℕ, xSeq i ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) →
Filter.Tendsto xSeq Filter.atTop (nhds x) →
x ∈ frontier (interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) →
Filter.Tendsto (fun i : ℕ => ‖grad (xSeq i)‖) Filter.atTop Filter.atTop
Helper for Theorem 26.1: essential smoothness gives the exterior-empty formula for ∂ f; the only nontrivial case is a boundary point of int (dom f).
lemma helperForTheorem_26_1_subdifferential_eq_empty_of_not_mem_interior_of_essentiallySmooth
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hES : IsEssentiallySmooth f) :
∀ x ∉ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
subdifferentialAt f x = ∅§26 — The Legendre Transformation — Part 4
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The sequence formulation of the boundary blow-up clause in essential smoothness for a chosen gradient map grad on int (dom f).
def HasBoundaryGradientNormBlowup {n : ℕ} (f : (Fin n → ℝ) → EReal)
(grad : (Fin n → ℝ) → (Fin n → ℝ)) : Prop :=
let C := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
∀ (xSeq : ℕ → Fin n → ℝ) (x : Fin n → ℝ),
(∀ i : ℕ, xSeq i ∈ C) →
Filter.Tendsto xSeq Filter.atTop (nhds x) →
x ∈ frontier C →
Filter.Tendsto (fun i : ℕ => ‖grad (xSeq i)‖) Filter.atTop Filter.atTop
The boundary-ray formulation of essential smoothness requiring the directional derivative along the segment from a boundary point x toward any interior point a to tend to -∞ as the segment parameter tends to 0 from the right.
def HasBoundaryRayDirectionalDerivativeNegInfinity {n : ℕ}
(f : (Fin n → ℝ) → EReal) : Prop :=
let C := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
∀ ⦃a x : Fin n → ℝ⦄, a ∈ C → x ∈ frontier C →
Filter.Tendsto
(fun t : ℝ => upperDirectionalDerivativeAt f (x + t • (a - x)) (a - x))
(nhdsWithin (0 : ℝ) (Set.Ioi (0 : ℝ)))
(nhds (⊥ : EReal))
Lemma 26.2: assuming conditions (a) and (b) from the definition of essentially smooth, the boundary norm blow-up condition (c) is equivalent to the raywise directional-derivative condition (c'): f'(x + λ (a - x); a - x) → -∞ as λ ↓ 0 for every a ∈ int (dom f) and every boundary point x of int (dom f).
theorem boundaryGradientNormBlowup_iff_boundaryRayDirectionalDerivativeNegInfinity
{n : ℕ} (f : (Fin n → ℝ) → EReal) (grad : (Fin n → ℝ) → (Fin n → ℝ)) :
let C := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
(ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f ∧
C.Nonempty ∧
(∀ x ∈ C, dotProductEquiv ℝ (Fin n) (grad x) ∈ subdifferentialAt f x) ∧
(∀ ⦃x xStar⦄, x ∈ C →
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x →
xStar = grad x)) →
(HasBoundaryGradientNormBlowup f grad ↔
HasBoundaryRayDirectionalDerivativeNegInfinity f)
Definition 26.2.1: using mathlib's predicate StrictConvexOn for the first sentence, a proper convex function f on ℝ^n is essentially strictly convex when, on every convex subset of dom ∂f = {x | ∂f(x) ≠ ∅}, the real-valued restriction x ↦ (f x).toReal is strictly convex.
def IsEssentiallyStrictlyConvex {n : ℕ} (f : (Fin n → ℝ) → EReal) : Prop :=
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f ∧
∀ ⦃C : Set (Fin n → ℝ)⦄, C ⊆ subdifferentialEffectiveDomain f →
Convex ℝ C →
StrictConvexOn ℝ C (fun x => (f x).toReal)
-- Proof sketch: apply the defining strict-convexity clause to the convex set `ri (dom f)`,
-- using the inclusion `ri (dom f) ⊆ dom ∂ f` from Theorem 23.4; the warning about nonconvexity
-- of `dom ∂ f` is recorded as an existential counterexample.
Text 26.2.1: Since ri (dom f) ⊆ dom ∂ f ⊆ dom f, an essentially strictly convex function is strictly convex on ri (dom f); moreover, the effective domain dom ∂ f of the subdifferential need not be convex.
theorem essentiallyStrictlyConvex_strictConvexOn_relativeInterior_and_exists_nonconvex_subdifferentialEffectiveDomain :
(∀ {n : ℕ} (f : (Fin n → ℝ) → EReal),
IsEssentiallyStrictlyConvex f →
StrictConvexOn ℝ
(euclideanRelativeInterior_fin n (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(fun x => (f x).toReal)) ∧
∃ (n : ℕ) (f : (Fin n → ℝ) → EReal),
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f ∧
¬ Convex ℝ (subdifferentialEffectiveDomain f)
Helper for Lemma 26.2: after vectorizing the covectors in ∂ f, cyclic monotonicity of the subdifferential becomes the usual Euclidean monotonicity inequality.
lemma helperForLemma_26_2_preimageSubdifferential_monotone
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x₀ x₁ v₀ v₁ : Fin n → ℝ}
(hv₀ : v₀ ∈ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x₀))
(hv₁ : v₁ ∈ ((dotProductEquiv ℝ (Fin n)) ⁻¹' subdifferentialAt f x₁)) :
0 ≤ dotProduct (x₁ - x₀) (v₁ - v₀)
Helper for Lemma 26.2: every strict point on the segment from a boundary point of int (dom f) to an interior point stays in int (dom f).
lemma helperForLemma_26_2_segmentPoint_mem_interior
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hC_nonempty :
(interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)).Nonempty)
{a x : Fin n → ℝ}
(ha : a ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hx : x ∈ frontier (interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)))
{t : ℝ} (ht₀ : 0 < t) (ht₁ : t < 1) :
x + t • (a - x) ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
Helper for Lemma 26.2: at an interior point with a unique Euclidean subgradient, the upper directional derivative is exactly the dot product with that gradient.
lemma helperForLemma_26_2_directionalDerivative_eq_dot_grad
{n : ℕ} {f : (Fin n → ℝ) → EReal} {grad : (Fin n → ℝ) → (Fin n → ℝ)}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hgradMem :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
dotProductEquiv ℝ (Fin n) (grad x) ∈ subdifferentialAt f x)
(hgradUnique :
∀ ⦃x xStar⦄,
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) →
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x →
xStar = grad x)
{z : Fin n → ℝ}
(hz : z ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(u : Fin n → ℝ) :
upperDirectionalDerivativeAt f z u = (((dotProduct (grad z) u : ℝ) : ℝ) : EReal)
Helper for Lemma 26.2: a proper convex function on all of ℝⁿ is, equivalently for the Chapter 25 comparison lemmas, a proper convex EReal-valued function.
lemma helperForLemma_26_2_properConvexERealFunction
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f) :
ProperConvexERealFunction (F := (Fin n → ℝ)) f
Helper for Lemma 26.2: a uniform lower bound on the longitudinal pairing ⟪grad (x + s (a - x)), a - x⟫ forces a uniform norm bound on the same gradients.
lemma helperForLemma_26_2_coordinate_bounds_from_longitudinal_lower_bound
{n : ℕ} {f : (Fin n → ℝ) → EReal} {grad : (Fin n → ℝ) → (Fin n → ℝ)}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hC_nonempty :
(interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)).Nonempty)
(hgradMem :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
dotProductEquiv ℝ (Fin n) (grad x) ∈ subdifferentialAt f x)
(_hgradUnique :
∀ ⦃x xStar⦄,
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) →
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x →
xStar = grad x)
{a x : Fin n → ℝ}
(ha : a ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hx : x ∈ frontier (interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))) :
∀ d : ℝ, ∃ B : ℝ, ∀ {s : ℝ},
0 < s →
s < 1 →
d ≤ dotProduct (grad (x + s • (a - x))) (a - x) →
‖grad (x + s • (a - x))‖ ≤ B
Helper for Lemma 26.2: monotone dot-product inequalities survive passage to the limit because subtraction, multiplication, and finite summation are continuous in ℝⁿ.
lemma helperForLemma_26_2_limit_of_monotone_pairings
{n : ℕ} {x z q g : Fin n → ℝ} {xSeq qSeq : ℕ → Fin n → ℝ}
(hxTendsto : Filter.Tendsto xSeq Filter.atTop (nhds x))
(hqTendsto : Filter.Tendsto qSeq Filter.atTop (nhds q))
(hmono :
∀ i : ℕ, 0 ≤ dotProduct (z - xSeq i) (g - qSeq i)) :
0 ≤ dotProduct (z - x) (g - q)
Helper for Lemma 26.2: if a boundary-approaching sequence has gradients converging to q, then every inward ray pairing is bounded below by ⟪q, a - x⟫.
lemma helperForLemma_26_2_cluster_limit_lower_bounds_ray_pairing
{n : ℕ} {f : (Fin n → ℝ) → EReal} {grad : (Fin n → ℝ) → (Fin n → ℝ)}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
(hC_nonempty :
(interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)).Nonempty)
(hgradMem :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
dotProductEquiv ℝ (Fin n) (grad x) ∈ subdifferentialAt f x)
(_hgradUnique :
∀ ⦃x xStar⦄,
x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) →
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x →
xStar = grad x)
{a x q : Fin n → ℝ}
(ha : a ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hx : x ∈ frontier (interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)))
{xSeq : ℕ → Fin n → ℝ}
(hxSeqMem :
∀ i : ℕ, xSeq i ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hxSeqTendsto : Filter.Tendsto xSeq Filter.atTop (nhds x))
(hqTendsto : Filter.Tendsto (fun i : ℕ => grad (xSeq i)) Filter.atTop (nhds q)) :
∀ {t : ℝ}, 0 < t → t < 1 →
dotProduct q (a - x) ≤ dotProduct (grad (x + t • (a - x))) (a - x)
Helper for Lemma 26.2: any positive sequence dominated by 1 / (k + 1) converges to 0 from the right.
lemma helperForLemma_26_2_smallPositiveSequence_tendsto_zeroWithin
(tSeq : ℕ → ℝ)
(htSeq : ∀ k : ℕ, 0 < tSeq k ∧ tSeq k < 1 / ((k : ℝ) + 1)) :
Filter.Tendsto tSeq Filter.atTop (nhdsWithin (0 : ℝ) (Set.Ioi (0 : ℝ)))
Helper for Lemma 26.2: if the raywise directional derivatives do not converge to -∞, one can extract a positive sequence t_k ↓ 0 and a finite level d that the derivatives keep revisiting from above.
lemma helperForLemma_26_2_exists_raySequence_of_not_tendsto_bot
(φ : ℝ → EReal)
(hφ :
¬ Filter.Tendsto φ (nhdsWithin (0 : ℝ) (Set.Ioi (0 : ℝ))) (nhds (⊥ : EReal))) :
∃ d : ℝ, ∃ tSeq : ℕ → ℝ,
(∀ k : ℕ, 0 < tSeq k ∧ tSeq k < 1 / ((k : ℝ) + 1)) ∧
Filter.Tendsto tSeq Filter.atTop (nhdsWithin (0 : ℝ) (Set.Ioi (0 : ℝ))) ∧
∀ k : ℕ, ((d : ℝ) : EReal) ≤ φ (tSeq k)§26 — The Legendre Transformation — Part 5
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 26.3: a closed proper convex function is essentially strictly convex if and only if its Fenchel conjugate is essentially smooth.
theorem essentiallyStrictlyConvex_iff_conjugate_essentiallySmooth
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f) :
IsEssentiallyStrictlyConvex f ↔ IsEssentiallySmooth (fenchelConjugate n f)
Helper for Theorem 26.3: a Euclidean subgradient inequality converts to a real lower bound once the comparison point is finite.
lemma helperForTheorem_26_3_realLowerBound_of_euclideanSubgradient
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x w xStar : Fin n → ℝ}
(hxSub : IsEuclideanSubgradientAt f x xStar)
(hwTop : f w ≠ ⊤) :
(f w).toReal ≥ (f x).toReal + dotProduct xStar (w - x)
Helper for Theorem 26.3: convexity bounds the real-valued restriction of f above every convex combination of two finite points.
lemma helperForTheorem_26_3_convexCombination_toReal_le
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x y : Fin n → ℝ} {a b : ℝ}
(ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1)
(hfxTop : f x ≠ ⊤) (hfyTop : f y ≠ ⊤) :
f (a • x + b • y) ≠ ⊤ ∧
(f (a • x + b • y)).toReal ≤ a * (f x).toReal + b * (f y).toReal
Helper for Theorem 26.3: if the same Euclidean dual vector supports f at two points, then it supports f at every convex combination of those points, and f is affine there.
lemma helperForTheorem_26_3_segment_subgradient_and_affine_of_commonSubgradient
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x y xStar : Fin n → ℝ}
(hxSub : IsEuclideanSubgradientAt f x xStar)
(hySub : IsEuclideanSubgradientAt f y xStar)
{a b : ℝ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) :
let z : Fin n → ℝ := a • x + b • y
IsEuclideanSubgradientAt f z xStar ∧
(f z).toReal = a * (f x).toReal + b * (f y).toReal
Helper for Theorem 26.3: on the set where a fixed Euclidean subgradient is present, essential strict convexity forces the supporting point to be unique.
lemma helperForTheorem_26_3_primalSubdifferential_injective_of_essentiallyStrictlyConvex
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hEss : IsEssentiallyStrictlyConvex f) :
∀ ⦃x y xStar : Fin n → ℝ⦄,
IsEuclideanSubgradientAt f x xStar →
IsEuclideanSubgradientAt f y xStar →
x = y
Helper for Theorem 26.3: if convexity is attained with equality at a strict convex combination, then every subgradient at the middle point is also a subgradient at the endpoints.
lemma helperForTheorem_26_3_endpoint_subgradients_of_convexCombinationEquality
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x y : Fin n → ℝ} {a b : ℝ}
(ha : 0 < a) (hb : 0 < b) (hab : a + b = 1)
(hxDom : x ∈ subdifferentialEffectiveDomain f)
(hyDom : y ∈ subdifferentialEffectiveDomain f)
{xStar : Fin n → ℝ}
(hzSub : IsEuclideanSubgradientAt f (a • x + b • y) xStar)
(hEq :
(f (a • x + b • y)).toReal = a * (f x).toReal + b * (f y).toReal) :
IsEuclideanSubgradientAt f x xStar ∧ IsEuclideanSubgradientAt f y xStar§26 — The Legendre Transformation — Part 6
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Corollary 26.4.1: if f is an essentially smooth closed proper convex function and C = int (dom f), then its Legendre conjugate (D, g) is well-defined with D = {x* | ∂(f*)(x*) ≠ ∅}; moreover ri (dom f*) ⊆ D ⊆ dom f*, the function g is the restriction of f* to D, and g is strictly convex on every convex subset of D.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
theorem essentiallySmooth_has_legendreConjugatePackageOn_subdifferentialEffectiveDomain_conjugate
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hf_smooth : IsEssentiallySmooth f) :
let C := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
let fStar := fenchelConjugate n f
let D := subdifferentialEffectiveDomain fStar
∃ L : LegendreConjugatePackageOn (fun x xStar : Fin n → ℝ => dotProduct x xStar) C f,
L.target = D ∧
Set.EqOn L.conjFun fStar D ∧
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) fStar) ⊆ D ∧
D ⊆ effectiveDomain (Set.univ : Set (Fin n → ℝ)) fStar ∧
∀ ⦃S : Set (Fin n → ℝ)⦄, S ⊆ D → Convex ℝ S →
StrictConvexOn ℝ S (fun x => (fStar x).toReal)
Text 26.4.1.1: if f is an essentially smooth closed proper convex function and fStar = f*, then the Legendre conjugate (D, g) from Corollary 26.4.1 satisfies g = fStar on D; moreover fStar is a closed proper convex extension of that Legendre conjugate, boundary values of fStar are obtained as limits of g along segments from points of ri D, and fStar xStar = +∞ for xStar ∉ closure D.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
theorem essentiallySmooth_conjugate_extends_legendreConjugate_with_boundary_limits_and_exterior_top
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hf_smooth : IsEssentiallySmooth f) :
let C := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
let fStar := fenchelConjugate n f
∃ L : LegendreConjugatePackageOn (fun x xStar : Fin n → ℝ => dotProduct x xStar) C f,
L.target = subdifferentialEffectiveDomain fStar ∧
ProperConvexERealFunction (F := (Fin n → ℝ)) fStar ∧
LowerSemicontinuous fStar ∧
Set.EqOn L.conjFun fStar L.target ∧
(∀ ⦃xStar₀ xStar : Fin n → ℝ⦄,
xStar₀ ∈ euclideanRelativeInterior_fin n L.target →
xStar ∈ frontier L.target →
(∀ t : ℝ, t ∈ Set.Iio (1 : ℝ) →
(1 - t) • xStar₀ + t • xStar ∈ L.target) →
Filter.Tendsto
(fun t : ℝ => L.conjFun ((1 - t) • xStar₀ + t • xStar))
(nhdsWithin (1 : ℝ) (Set.Iio (1 : ℝ)))
(nhds (fStar xStar))) ∧
∀ ⦃xStar : Fin n → ℝ⦄, xStar ∉ closure L.target → fStar xStar = ⊤
Text 26.4.1.2: for an essentially smooth closed proper convex function, if C = int (dom f), fStar = f*, and D = {x* | ∂(fStar)(x*) ≠ ∅}, then there exists a gradient map grad on C such that grad is a continuous map from C onto D and fStar (grad x) = ⟪x, grad x⟫ - f x for every x ∈ C. Thus the Legendre conjugate may be viewed as a generally nonconvex function on C via the parameterization x* = grad x.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
theorem essentiallySmooth_gradient_parameterizes_conjugateDomain_and_conjugateValue_identity
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hf_smooth : IsEssentiallySmooth f) :
let C := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
let fStar := fenchelConjugate n f
let D := subdifferentialEffectiveDomain fStar
∃ grad : (Fin n → ℝ) → (Fin n → ℝ),
(∀ x ∈ C, dotProductEquiv ℝ (Fin n) (grad x) ∈ subdifferentialAt f x) ∧
(∀ {x xStar}, x ∈ C →
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x →
xStar = grad x) ∧
D = grad '' C ∧
Continuous (fun x : {x // x ∈ C} => grad x) ∧
∀ x ∈ C, fStar (grad x) = (((dotProduct x (grad x) : ℝ) : EReal) - f x)
Corollary 26.3.1: for a closed proper convex function, the subdifferential mapping ∂ f is one-to-one if and only if f is strictly convex on int (dom f) and essentially smooth.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
theorem subdifferential_oneToOne_iff_strictConvexOn_interior_and_essentiallySmooth
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f) :
IsOneToOneMultivaluedMap (subdifferentialAt f) ↔
StrictConvexOn ℝ
(interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(fun x => (f x).toReal) ∧
IsEssentiallySmooth f
Helper for Text 26.4.1.1: points of ri D already lie in D.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForText_26_4_1_1_mem_target_of_mem_riTarget
{n : ℕ} {D : Set (Fin n → ℝ)} {x : Fin n → ℝ}
(hx : x ∈ euclideanRelativeInterior_fin n D) :
x ∈ D
Helper for Text 26.4.1.1: along a segment staying in D, the Legendre conjugate package and the Fenchel conjugate agree eventually near the boundary endpoint.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForText_26_4_1_1_segment_conjFun_eq_fenchel_along_Iio
{n : ℕ} {C : Set (Fin n → ℝ)} {f : (Fin n → ℝ) → EReal}
{L : LegendreConjugatePackageOn (fun x xStar : Fin n → ℝ => dotProduct x xStar) C f}
{fStar : (Fin n → ℝ) → EReal}
(hEqOn : Set.EqOn L.conjFun fStar L.target)
{xStar₀ xStar : Fin n → ℝ}
(hSeg : ∀ t : ℝ, t ∈ Set.Iio (1 : ℝ) →
(1 - t) • xStar₀ + t • xStar ∈ L.target) :
(fun t : ℝ => L.conjFun ((1 - t) • xStar₀ + t • xStar)) =ᶠ[nhdsWithin (1 : ℝ) (Set.Iio (1 : ℝ))]
(fun t : ℝ => fStar ((1 - t) • xStar₀ + t • xStar))
Helper for Text 26.4.1.1: every finite point of f* lies in the closure of the Legendre target once ri (dom f*) ⊆ D.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForText_26_4_1_1_effectiveDomain_subset_closure_target
{n : ℕ} {fStar : (Fin n → ℝ) → EReal} {D : Set (Fin n → ℝ)}
(hproperStar : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) fStar)
(hriDomSubset :
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) fStar) ⊆ D) :
effectiveDomain (Set.univ : Set (Fin n → ℝ)) fStar ⊆ closure D
Helper for Text 26.4.1.2: differentiability on int (dom f) makes every subgradient agree with the chosen interior gradient.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForText_26_4_1_2_interiorGradient_mem_subdifferentialAt
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x)
{x : Fin n → ℝ}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
dotProductEquiv ℝ (Fin n) (interiorGradientMap f hdiff x) ∈ subdifferentialAt f x
Helper for Text 26.4.1.2: the Fenchel-Young identity rewrites the conjugate value at the interior gradient into the standard subtraction formula.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForText_26_4_1_2_fenchelConjugate_eq_dotSub_at_interiorGradient
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x)
{x : Fin n → ℝ}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)) :
fenchelConjugate n f (interiorGradientMap f hdiff x) =
(((dotProduct x (interiorGradientMap f hdiff x) : ℝ) : EReal) - f x)
Helper for Text 26.4.1.2: differentiability on int (dom f) makes every subgradient agree with the chosen interior gradient.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForText_26_4_1_2_subgradient_eq_interiorGradient
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x)
{x xStar : Fin n → ℝ}
(hx : x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(hxSub : dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x) :
xStar = interiorGradientMap f hdiff x
Helper for Text 26.4.1.2: on the interior effective domain, the differentiability set from Theorem 25.5 is exactly the interior itself.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForText_26_4_1_2_differentiabilitySet_eq_interior
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x) :
{x | x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f) ∧
ERealDifferentiableAt f x} =
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
Helper for Text 26.4.1.2: the conjugate subdifferential domain is the image of the interior gradient map.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForText_26_4_1_2_subdifferentialEffectiveDomain_eq_interiorGradientImage
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hf_smooth : IsEssentiallySmooth f)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x) :
let C := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
let fStar := fenchelConjugate n f
subdifferentialEffectiveDomain fStar = interiorGradientMap f hdiff '' C
Helper for Text 26.4.1.2: the interior gradient is continuous on int (dom f).
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForText_26_4_1_2_interiorGradient_continuousOn_interior
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hdiff :
∀ x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f),
ERealDifferentiableAt f x) :
Continuous
(fun x : {x // x ∈ interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)} =>
interiorGradientMap f hdiff x)
Helper for Corollary 26.3.1: inverse single-valuedness of ∂ f is equivalent to ordinary single-valuedness of ∂(f*).
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForCorollary_26_3_1_inverseSubdifferential_singleValued_iff_conjugateSingleValued
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f) :
IsSingleValuedMultivaluedMap (inverseMultivaluedMap (subdifferentialAt f)) ↔
IsSingleValuedMultivaluedMap (subdifferentialAt (fenchelConjugate n f))
Helper for Corollary 26.3.1: essential smoothness identifies dom ∂ f with int (dom f).
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForCorollary_26_3_1_subdifferentialEffectiveDomain_eq_interior_of_essentiallySmooth
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hf_smooth : IsEssentiallySmooth f) :
subdifferentialEffectiveDomain f =
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
Helper for Corollary 26.3.1: essential strict convexity already yields strict convexity on int (dom f) by restricting Text 26.2.1 from ri (dom f).
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForCorollary_26_3_1_strictConvexOn_interior_of_essentiallyStrictlyConvex
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf_essStrict : IsEssentiallyStrictlyConvex f) :
StrictConvexOn ℝ
(interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(fun x => (f x).toReal)
Helper for Corollary 26.3.1: strict convexity on int (dom f) becomes essential strict convexity once essential smoothness identifies dom ∂ f with that interior.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForCorollary_26_3_1_essentiallyStrictlyConvex_of_strictConvexOn_interior_and_essentiallySmooth
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hStrictInterior :
StrictConvexOn ℝ
(interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f))
(fun x => (f x).toReal))
(hf_smooth : IsEssentiallySmooth f) :
IsEssentiallyStrictlyConvex f
Helper for Corollary 26.3.2: the binary relative-interior hypothesis packages into the Fin 2 family witness needed by the finite-family Chapter 23 and Chapter 16 lemmas.
open scoped ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.4 to obtain a Legendre-conjugate package on
-- `C = int (dom f)`, use Theorem 26.3 to see that `f*` is essentially strictly convex because
-- `f` is essentially smooth, identify `D` with `dom ∂(f*)`, and then combine the defining
-- strict-convexity clause with the relative-interior inclusion from Text 26.2.1.
lemma helperForCorollary_26_3_2_commonRelativeInterior_twoConjugates
{n : ℕ} (f₁ f₂ : (Fin n → ℝ) → EReal)
(hri :
Set.Nonempty
(euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₁)) ∩
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₂)))) :
∃ z : Fin n → ℝ,
∀ i : Fin 2,
z ∈ euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ))
(Fin.cases (fenchelConjugate n f₁) (fun _ => fenchelConjugate n f₂) i))§26 — The Legendre Transformation — Part 7
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Corollary 26.3.2: every point of dom ∂(f₁* + f₂*) lies in dom ∂(f₁*).
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_2_subdifferentialEffectiveDomain_sum_subset_left
{n : ℕ} (f₁ f₂ : (Fin n → ℝ) → EReal)
(hf₁ : ProperConvexERealFunction (F := (Fin n → ℝ)) f₁)
(hf₂ : ProperConvexERealFunction (F := (Fin n → ℝ)) f₂)
(hri :
Set.Nonempty
(euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₁)) ∩
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₂)))) :
subdifferentialEffectiveDomain
(fun x => fenchelConjugate n f₁ x + fenchelConjugate n f₂ x) ⊆
subdifferentialEffectiveDomain (fenchelConjugate n f₁)
Helper for Corollary 26.3.2: every point of dom ∂(f₁* + f₂*) lies in dom ∂(f₂*).
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_2_subdifferentialEffectiveDomain_sum_subset_right
{n : ℕ} (f₁ f₂ : (Fin n → ℝ) → EReal)
(hf₁ : ProperConvexERealFunction (F := (Fin n → ℝ)) f₁)
(hf₂ : ProperConvexERealFunction (F := (Fin n → ℝ)) f₂)
(hri :
Set.Nonempty
(euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₁)) ∩
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₂)))) :
subdifferentialEffectiveDomain
(fun x => fenchelConjugate n f₁ x + fenchelConjugate n f₂ x) ⊆
subdifferentialEffectiveDomain (fenchelConjugate n f₂)
Helper for Corollary 26.3.2: subdifferentiability forces finiteness at the same point.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_2_finite_of_mem_subdifferentialEffectiveDomain
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hproper : ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) f)
{x : Fin n → ℝ} (hx : x ∈ subdifferentialEffectiveDomain f) :
f x ≠ (⊤ : EReal)
Helper for Corollary 26.3.2: on every convex subset of dom ∂(f₁* + f₂*), the real-valued restriction of f₁* + f₂* is strictly convex.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_2_strictConvexOn_conjugateSum_subdifferentialEffectiveDomain
{n : ℕ} (f₁ f₂ : (Fin n → ℝ) → EReal)
(hf₁ : ProperConvexERealFunction (F := (Fin n → ℝ)) f₁)
(hf₁_closed : LowerSemicontinuous f₁)
(hf₂ : ProperConvexERealFunction (F := (Fin n → ℝ)) f₂)
(hf₁_smooth : IsEssentiallySmooth f₁)
(hri :
Set.Nonempty
(euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₁)) ∩
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₂))))
{C : Set (Fin n → ℝ)}
(hCSubset :
C ⊆ subdifferentialEffectiveDomain
(fun x => fenchelConjugate n f₁ x + fenchelConjugate n f₂ x))
(hCConv : Convex ℝ C) :
StrictConvexOn ℝ C
(fun x => ((fenchelConjugate n f₁ x + fenchelConjugate n f₂ x)).toReal)
Helper for Corollary 26.3.2: the pointwise sum f₁* + f₂* is essentially strictly convex.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_2_essentiallyStrictlyConvex_conjugateSum
{n : ℕ} (f₁ f₂ : (Fin n → ℝ) → EReal)
(hf₁ : ProperConvexERealFunction (F := (Fin n → ℝ)) f₁)
(hf₁_closed : LowerSemicontinuous f₁)
(hf₂ : ProperConvexERealFunction (F := (Fin n → ℝ)) f₂)
(hf₁_smooth : IsEssentiallySmooth f₁)
(hri :
Set.Nonempty
(euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₁)) ∩
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₂)))) :
IsEssentiallyStrictlyConvex
(fun x => fenchelConjugate n f₁ x + fenchelConjugate n f₂ x)§26 — The Legendre Transformation — Part 8
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Corollary 26.3.2: if f₁ and f₂ are closed proper convex functions on ℝ^n, f₁ is essentially smooth, and ri (dom f₁*) ∩ ri (dom f₂*) is nonempty, then the infimal convolution f₁ □ f₂ is essentially smooth.
open scoped ConvexAnalysis Pointwise
theorem essentiallySmooth_infimalConvolution_of_essentiallySmooth_left_and_commonRelativeInterior_conjugateEffectiveDomain
{n : ℕ} (f₁ f₂ : (Fin n → ℝ) → EReal)
(hf₁ : ProperConvexERealFunction (F := (Fin n → ℝ)) f₁)
(hf₁_closed : LowerSemicontinuous f₁)
(hf₂ : ProperConvexERealFunction (F := (Fin n → ℝ)) f₂)
(hf₂_closed : LowerSemicontinuous f₂)
(hf₁_smooth : IsEssentiallySmooth f₁)
(hri :
Set.Nonempty
(euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₁)) ∩
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f₂)))) :
IsEssentiallySmooth (infimalConvolution f₁ f₂)§26 — The Legendre Transformation — Part 9
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The coordinate-space realization of the Euclidean adjoint of a linear map.
open scoped ConvexAnalysis Pointwise
noncomputable def coordinateAdjointLinearMap {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)) : (Fin m → ℝ) →ₗ[ℝ] (Fin n → ℝ) :=
helperForTheorem_23_9_coordinateAdjointMap A
Helper for Corollary 26.3.3: the coordinate adjoint realizes the usual dot-product adjoint identity.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_3_dotProduct_coordinateAdjoint {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)) (x : Fin n → ℝ) (y : Fin m → ℝ) :
dotProduct (A x) y = dotProduct x (coordinateAdjointLinearMap A y)
Helper for Corollary 26.3.3: surjectivity of A forces injectivity of the coordinate adjoint A*.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_3_coordinateAdjoint_injective_of_surjective {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)) (hA : Function.Surjective A) :
Function.Injective (coordinateAdjointLinearMap A)
Helper for Corollary 26.3.3: subgradients of the precomposition f* ∘ A* project to subgradients of f* under the relative-interior qualification.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_3_mem_conjugateSubdiffDomain_of_mem_precompSubdiffDomain
{n m : ℕ} (f : (Fin n → ℝ) → EReal) (A : (Fin m → ℝ) →ₗ[ℝ] (Fin n → ℝ))
(hproper : ProperConvexFunctionOn Set.univ (fenchelConjugate n f))
(hri : RangeMeetsRelativeInteriorEffectiveDomain A (fenchelConjugate n f))
{yStar : Fin m → ℝ}
(hyStar :
yStar ∈ subdifferentialEffectiveDomain (fun z => fenchelConjugate n f (A z))) :
A yStar ∈ subdifferentialEffectiveDomain (fenchelConjugate n f)
Helper for Corollary 26.3.3: the conjugate precomposition y* ↦ f*(A* y*) is essentially strictly convex under the adjoint-range qualification.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_3_essentiallyStrictlyConvex_conjugatePrecomp
{n m : ℕ} (f : (Fin n → ℝ) → EReal) (A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hf_smooth : IsEssentiallySmooth f)
(hA : Function.Surjective A)
(hri :
∃ yStar : Fin m → ℝ,
coordinateAdjointLinearMap A yStar ∈
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f))) :
IsEssentiallyStrictlyConvex (fun yStar => fenchelConjugate n f (coordinateAdjointLinearMap A yStar))
Helper for Corollary 26.3.3: taking the coordinate adjoint twice recovers the original linear map.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_3_coordinateAdjoint_involutive {n m : ℕ}
(A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)) :
coordinateAdjointLinearMap (coordinateAdjointLinearMap A) = A
Helper for Corollary 26.3.3: under the relative-interior qualification, the conjugate of the precomposition h ∘ A is the image of h* under the coordinate adjoint of A.
open scoped ConvexAnalysis Pointwise
lemma helperForCorollary_26_3_3_fenchelConjugate_coordinateAdjointPrecomp_eq_imageUnderLinearMap
{n m : ℕ} (h : (Fin n → ℝ) → EReal) (A : (Fin m → ℝ) →ₗ[ℝ] (Fin n → ℝ))
(hconv : ConvexFunction h)
(hri : RangeMeetsRelativeInteriorEffectiveDomain A h) :
fenchelConjugate m (fun y => h (A y)) =
imageUnderLinearMap (coordinateAdjointLinearMap A) (fenchelConjugate n h)§26 — The Legendre Transformation — Part 10
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Corollary 26.3.3: if f is a closed proper convex function on ℝ^n that is essentially smooth, A : ℝ^n → ℝ^m is onto, and there exists y* ∈ ℝ^m with A* y* ∈ ri (dom f*), then the image function A f is essentially smooth.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
theorem essentiallySmooth_imageUnderLinearMap_of_surjective_and_adjoint_mem_relativeInterior_conjugateEffectiveDomain
{n m : ℕ} (f : (Fin n → ℝ) → EReal) (A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f)
(hf_smooth : IsEssentiallySmooth f)
(hA : Function.Surjective A)
(hri :
∃ yStar : Fin m → ℝ,
coordinateAdjointLinearMap A yStar ∈
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f))) :
IsEssentiallySmooth (imageUnderLinearMap A f)
Helper for Text 26.3.3.1: translating the Euclidean p-power kernel preserves the convexity and C¹ regularity of x ↦ ‖x‖^p.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_translatedDistRpow_convex_contDiff
{n : ℕ} (y : EuclideanSpace ℝ (Fin n)) {p : ℝ} (hp : 1 < p) :
ConvexOn ℝ Set.univ (fun x : EuclideanSpace ℝ (Fin n) => Real.rpow (dist x y) p) ∧
ContDiff ℝ 1 (fun x : EuclideanSpace ℝ (Fin n) => Real.rpow (dist x y) p)
Helper for Text 26.3.3.1: once the textbook envelope is known to be convex and differentiable on ℝⁿ, Corollary 25.5.1 upgrades it to C¹ after transporting along the standard coordinate equivalence.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_contDiffOne_of_convex_differentiable
{n : ℕ} {f : EuclideanSpace ℝ (Fin n) → ℝ}
(hf_convex : ConvexOn ℝ Set.univ f) (hf_differentiable : Differentiable ℝ f) :
ContDiff ℝ 1 f
Helper for Text 26.3.3.1: the distance-power envelope is convex by taking near-minimizers in C, convex-combining those points, and applying convexity of the kernel x ↦ ‖x‖^p.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_convex_infDist_rpow
{n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n)))
(hC_nonempty : C.Nonempty) (hC_convex : Convex ℝ C)
{p : ℝ} (hp : 1 < p) :
let f : EuclideanSpace ℝ (Fin n) → ℝ :=
fun x => sInf ((fun y : EuclideanSpace ℝ (Fin n) => Real.rpow (dist x y) p) '' C)
ConvexOn ℝ Set.univ f
Helper for Text 26.3.3.1: an everywhere-finite EReal envelope that is differentiable in Rockafellar's sense at x has an ordinary real Fréchet derivative after taking .toReal.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_realDifferentiableAt_of_ERealDifferentiableAt_everywhereFinite
{n : ℕ} {F : (Fin n → ℝ) → EReal}
(hfinite : ∀ x : Fin n → ℝ, F x ≠ ⊤ ∧ F x ≠ ⊥)
{x : Fin n → ℝ} (hdiff : ERealDifferentiableAt F x) :
DifferentiableAt ℝ (fun y => (F y).toReal) x
Helper for Text 26.3.3.1: global everywhere-finite EReal differentiability yields ordinary real differentiability after taking .toReal.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_realDifferentiable_of_ERealDifferentiable_everywhere
{n : ℕ} {F : (Fin n → ℝ) → EReal}
(hfinite : ∀ x : Fin n → ℝ, F x ≠ ⊤ ∧ F x ≠ ⊥)
(hdiff : ∀ x : Fin n → ℝ, ERealDifferentiableAt F x) :
Differentiable ℝ (fun x => (F x).toReal)
Helper for Text 26.3.3.1: transporting a nonempty closed convex Euclidean set through WithLp.toLp preserves the nonemptiness, closedness, and convexity needed for the coordinate model of Corollary 26.3.2.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_withLpPreimage_nonempty_closed_convex
{n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n)))
(hC_nonempty : C.Nonempty) (hC_closed : IsClosed C) (hC_convex : Convex ℝ C) :
let Cfin : Set (Fin n → ℝ) := (WithLp.toLp (p := 2)) ⁻¹' C
Cfin.Nonempty ∧ IsClosed Cfin ∧ Convex ℝ Cfin
Helper for Text 26.3.3.1: the indicator of the transported set already satisfies the right-hand properness, closedness, and relative-interior qualification required by Corollary 26.3.2.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_preimageIndicator_qualification
{n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n)))
(hC_nonempty : C.Nonempty) (hC_closed : IsClosed C) (hC_convex : Convex ℝ C) :
let Cfin : Set (Fin n → ℝ) := (WithLp.toLp (p := 2)) ⁻¹' C
ProperConvexERealFunction (F := (Fin n → ℝ)) (indicatorFunction Cfin) ∧
LowerSemicontinuous (indicatorFunction Cfin) ∧
Set.Nonempty
(euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ))
(fenchelConjugate n (indicatorFunction Cfin))))
Helper for Text 26.3.3.1: the scaled Euclidean p-power kernel on Fin n → ℝ is a closed proper convex EReal function and is differentiable everywhere in Rockafellar's EReal sense.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_scaledEuclideanNormRpow_closedProper_and_eRealDifferentiable
{n : ℕ} {p : ℝ} (hp : 1 < p) :
let g : (Fin n → ℝ) → EReal :=
fun x => (((((1 / p) * Real.rpow (dist (WithLp.toLp (p := 2) x) 0) p) : ℝ)) : EReal)
ProperConvexERealFunction (F := (Fin n → ℝ)) g ∧
LowerSemicontinuous g ∧
∀ x : Fin n → ℝ, ERealDifferentiableAt g x
Helper for Text 26.3.3.1: the scaled Euclidean p-power kernel is essentially smooth, and its Fenchel conjugate is finite on all of ℝⁿ.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_scaledEuclideanNormRpow_essentiallySmooth_and_conjugateDomain_univ
{n : ℕ} {p : ℝ} (hp : 1 < p) :
let q : ℝ := p / (p - 1)
let g : (Fin n → ℝ) → EReal :=
fun x => (((((1 / p) * Real.rpow (dist (WithLp.toLp (p := 2) x) 0) p) : ℝ)) : EReal)
IsEssentiallySmooth g ∧
effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n g) = Set.univ
Helper for Text 26.3.3.1: the shifted Euclidean p-power kernel in the WithLp coordinate model is exactly the scaled real distance-power expression from the textbook.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_scaledEuclideanNormRpow_kernel_eq
{n : ℕ} {p : ℝ} (hp : 1 < p) :
let g : (Fin n → ℝ) → EReal :=
fun x => (((((1 / p) * Real.rpow (dist (WithLp.toLp (p := 2) x) 0) p) : ℝ)) : EReal)
∀ x z : Fin n → ℝ,
g (x - z) =
(((((1 / p) * Real.rpow (dist (WithLp.toLp (p := 2) x) (WithLp.toLp (p := 2) z)) p) :
ℝ)) : EReal)
Helper for Text 26.3.3.1: the WithLp infimal convolution with the indicator of the transported set is exactly the scaled textbook envelope.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_withLpEnvelope_eq_scaledInfimalConvolution
{n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n))) (hC_nonempty : C.Nonempty)
{p : ℝ} (hp : 1 < p) :
let Cfin : Set (Fin n → ℝ) := (WithLp.toLp (p := 2)) ⁻¹' C
let g : (Fin n → ℝ) → EReal :=
fun x => (((((1 / p) * Real.rpow (dist (WithLp.toLp (p := 2) x) 0) p) : ℝ)) : EReal)
∀ x : Fin n → ℝ,
infimalConvolution g (indicatorFunction Cfin) x =
(((((1 / p) *
sInf
((fun y : EuclideanSpace ℝ (Fin n) =>
Real.rpow (dist (WithLp.toLp (p := 2) x) y) p) '' C)) :
ℝ)) : EReal)
Helper for Text 26.3.3.1: Corollary 26.3.2 makes the WithLp-coordinate envelope differentiable, and converting back from EReal gives an ordinary real derivative everywhere.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_withLpEnvelope_differentiable
{n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n)))
(hC_nonempty : C.Nonempty) (hC_closed : IsClosed C) (hC_convex : Convex ℝ C)
{p : ℝ} (hp : 1 < p) :
let fFin : (Fin n → ℝ) → ℝ :=
fun x =>
sInf
((fun y : EuclideanSpace ℝ (Fin n) =>
Real.rpow (dist (WithLp.toLp (p := 2) x) y) p) '' C)
Differentiable ℝ fFin
Helper for Text 26.3.3.1: the differentiability step should come from Corollary 26.3.2 after transporting the Euclidean set C to the coordinate model Fin n → ℝ and rewriting the infimal convolution back to the textbook envelope.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_differentiable_infDist_rpow
{n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n)))
(hC_nonempty : C.Nonempty) (hC_closed : IsClosed C) (hC_convex : Convex ℝ C)
{p : ℝ} (hp : 1 < p) :
let f : EuclideanSpace ℝ (Fin n) → ℝ :=
fun x => sInf ((fun y : EuclideanSpace ℝ (Fin n) => Real.rpow (dist x y) p) '' C)
Differentiable ℝ f
Helper for Text 26.3.3.1: the convexity and differentiability of the distance-power envelope should follow from Corollary 26.3.2 applied in the coordinate model and then transported back to the Euclidean textbook function.
open scoped Topology ConvexAnalysis Pointwise
-- Proof sketch: apply Theorem 26.3 to convert essential smoothness of `f` into essential strict
-- convexity of `f*`, use Theorem 16.3 to identify `(A f)*` with `f* ∘ A*`, then invoke Theorem
-- 23.9 with the adjoint-range qualification to transfer essential strict convexity to that
-- precomposition, and dualize back with Theorem 26.3.
lemma helperForText_26_3_3_1_convex_differentiable_core
{n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n)))
(hC_nonempty : C.Nonempty) (hC_closed : IsClosed C) (hC_convex : Convex ℝ C)
{p : ℝ} (hp : 1 < p) :
let f : EuclideanSpace ℝ (Fin n) → ℝ :=
fun x => sInf ((fun y : EuclideanSpace ℝ (Fin n) => Real.rpow (dist x y) p) '' C)
ConvexOn ℝ Set.univ f ∧ Differentiable ℝ f§26 — The Legendre Transformation — Part 11
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Text 26.3.3.1: if C is a nonempty closed convex subset of ℝ^n and f(x) = inf { |x - y|^p | y ∈ C } with p > 1, then f is a differentiable convex function on ℝ^n, hence continuously differentiable.
open scoped Topology ConvexAnalysis Pointwise
theorem convexOn_differentiable_contDiffOne_infDist_rpow_of_nonempty_closed_convex
{n : ℕ} (C : Set (EuclideanSpace ℝ (Fin n)))
(hC_nonempty : C.Nonempty) (hC_closed : IsClosed C) (hC_convex : Convex ℝ C)
{p : ℝ} (hp : 1 < p) :
let f : EuclideanSpace ℝ (Fin n) → ℝ :=
fun x => sInf ((fun y : EuclideanSpace ℝ (Fin n) => Real.rpow (dist x y) p) '' C)
ConvexOn ℝ Set.univ f ∧ Differentiable ℝ f ∧ ContDiff ℝ 1 f
Text 26.3.3.2: if f is a differentiable convex function on ℝ^n and A : ℝ^n → ℝ^m is onto such that A x = 0 and x ≠ 0 imply (f₀⁺)(x) > 0, then the image function A f is a differentiable convex function on ℝ^m.
open scoped Topology ConvexAnalysis Pointwise
theorem imageUnderLinearMap_convex_and_differentiable_of_positive_recession_on_kernel
{n m : ℕ} (f : (Fin n → ℝ) → EReal) (A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ))
(hconv : ConvexFunction f)
(hdiff : ∀ x : Fin n → ℝ, ERealDifferentiableAt f x)
(hA : Function.Surjective A)
(hker :
∀ x : Fin n → ℝ, A x = 0 → x ≠ 0 → recessionFunction f x > (0 : EReal)) :
ConvexFunction (imageUnderLinearMap A f) ∧
∀ y : Fin m → ℝ, ERealDifferentiableAt (imageUnderLinearMap A f) y
The open positive quadrant in ℝ², written in coordinates (ξ₁, ξ₂).
open scoped Topology ConvexAnalysis Pointwise
def openPositiveQuadrantR2 : Set (Fin 2 → ℝ) :=
{x | 0 < x 0 ∧ 0 < x 1}
The non-negative ξ₁-axis in ℝ², i.e. the points with ξ₂ = 0 and ξ₁ ≥ 0.
open scoped Topology ConvexAnalysis Pointwise
def nonnegativeXi1AxisR2 : Set (Fin 2 → ℝ) :=
{x | 0 ≤ x 0 ∧ x 1 = 0}
The convex function f(ξ₁, ξ₂) = ξ₂^2 / (2 ξ₁) - 2 √ξ₂ on ξ₁ > 0, ξ₂ ≥ 0, extended by 0 at the origin and by +∞ elsewhere.
open scoped Topology ConvexAnalysis Pointwise
noncomputable def quadraticOverLinearMinusSqrtFunction : (Fin 2 → ℝ) → EReal :=
fun x =>
if 0 < x 0 ∧ 0 ≤ x 1 then
(((x 1) ^ 2 / (2 * x 0) - 2 * Real.sqrt (x 1) : ℝ) : EReal)
else if x = 0 then
(0 : EReal)
else
⊤
Helper for Text 26.3.3.2: package global differentiability into the proper, closed, and essentially smooth hypotheses needed before invoking Corollary 26.3.3.
open scoped Topology ConvexAnalysis Pointwise
lemma helperForText_26_3_3_2_closedProper_and_essentiallySmooth_of_convex_and_everywhereDifferentiable
{n : ℕ} {f : (Fin n → ℝ) → EReal}
(hconv : ConvexFunction f)
(hdiff : ∀ x : Fin n → ℝ, ERealDifferentiableAt f x) :
ProperConvexERealFunction (F := (Fin n → ℝ)) f ∧
LowerSemicontinuous f ∧
IsEssentiallySmooth f
Helper for Text 26.3.3.2: the kernel-positivity hypothesis removes the Corollary 16.2.1 obstruction, so the range of A* meets ri (dom f*).
open scoped Topology ConvexAnalysis Pointwise
lemma helperForText_26_3_3_2_coordinateAdjoint_meets_relativeInterior_conjugateDomain
{n m : ℕ} {f : (Fin n → ℝ) → EReal} {A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)}
(hconv : ConvexFunction f)
(hdiff : ∀ x : Fin n → ℝ, ERealDifferentiableAt f x)
(hker :
∀ x : Fin n → ℝ, A x = 0 → x ≠ 0 → recessionFunction f x > (0 : EReal)) :
∃ yStar : Fin m → ℝ,
coordinateAdjointLinearMap A yStar ∈
euclideanRelativeInterior_fin n
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n f))
Helper for Text 26.3.3.2: essential smoothness of the image plus surjectivity gives a finite value on every fiber, so A f is finite everywhere.
open scoped Topology ConvexAnalysis Pointwise
lemma helperForText_26_3_3_2_finiteEverywhere_of_essentiallySmooth_imageUnderLinearMap
{n m : ℕ} {f : (Fin n → ℝ) → EReal} {A : (Fin n → ℝ) →ₗ[ℝ] (Fin m → ℝ)}
(hA : Function.Surjective A)
(hdiff : ∀ x : Fin n → ℝ, ERealDifferentiableAt f x)
(hSmooth : IsEssentiallySmooth (imageUnderLinearMap A f)) :
∀ y, imageUnderLinearMap A f y ≠ ⊤ ∧ imageUnderLinearMap A f y ≠ ⊥
Helper for Text 26.3.3.2: once the effective domain is all of ℝ^m, essential smoothness is exactly global convexity plus differentiability at every point.
open scoped Topology ConvexAnalysis Pointwise
lemma helperForText_26_3_3_2_convex_and_everywhereDifferentiable_of_essentiallySmooth_and_finiteEverywhere
{m : ℕ} {g : (Fin m → ℝ) → EReal}
(hsmooth : IsEssentiallySmooth g)
(hfinite : ∀ y, g y ≠ ⊤ ∧ g y ≠ ⊥) :
ConvexFunction g ∧ ∀ y, ERealDifferentiableAt g y
Helper for Example 26.2.1: the effective domain is the open-right/nonnegative-upper region plus the origin, and the function vanishes on the nonnegative ξ₁-axis.
open scoped Topology ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_effectiveDomain_and_axisValues :
effectiveDomain (Set.univ : Set (Fin 2 → ℝ)) quadraticOverLinearMinusSqrtFunction =
{x | 0 < x 0 ∧ 0 ≤ x 1} ∪ ({0} : Set (Fin 2 → ℝ)) ∧
Set.EqOn (fun x => (quadraticOverLinearMinusSqrtFunction x).toReal)
(fun _ : Fin 2 → ℝ => (0 : ℝ)) nonnegativeXi1AxisR2
Helper for Example 26.2.1: the constant zero restriction on the nonnegative ξ₁-axis gives a direct witness that the function is not strictly convex on its whole effective domain.
open scoped Topology ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_not_strictConvexOn_effectiveDomain :
¬ StrictConvexOn ℝ
(effectiveDomain (Set.univ : Set (Fin 2 → ℝ)) quadraticOverLinearMinusSqrtFunction)
(fun x => (quadraticOverLinearMinusSqrtFunction x).toReal)
Helper for Example 26.2.1: on the open positive quadrant, the function is given by its explicit real-valued branch.
open scoped Topology ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_value_on_openQuadrant
{x : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) :
quadraticOverLinearMinusSqrtFunction x =
(((x 1 ^ 2 / (2 * x 0) - 2 * Real.sqrt (x 1) : ℝ)) : EReal)
Helper for Example 26.2.1: the textbook perturbation x + (t^3, t^2) of an axis point lands in the open positive quadrant whenever t > 0.
open scoped Topology ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_axisPerturbation_mem_openQuadrant
{x : Fin 2 → ℝ} (hx : x ∈ nonnegativeXi1AxisR2) {t : ℝ} (ht : 0 < t) :
x + ![t ^ 3, t ^ 2] ∈ openPositiveQuadrantR2
Helper for Example 26.2.1: along the axis perturbation x + (t^3, t^2), the function takes the explicit textbook value t^4 / (2 (ξ₁ + t^3)) - 2 t.
open scoped Topology ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_axisPerturbation_value
{x : Fin 2 → ℝ} (hx : x ∈ nonnegativeXi1AxisR2) {t : ℝ} (ht : 0 < t) :
quadraticOverLinearMinusSqrtFunction (x + ![t ^ 3, t ^ 2]) =
(((t ^ 4 / (2 * (x 0 + t ^ 3)) - 2 * t : ℝ)) : EReal)
Helper for Example 26.2.1: on the nonnegative ξ₁-axis, the original EReal-valued function itself is identically zero.
open scoped Topology ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_value_on_nonnegativeXi1Axis
{x : Fin 2 → ℝ} (hx : x ∈ nonnegativeXi1AxisR2) :
quadraticOverLinearMinusSqrtFunction x = (0 : EReal)§26 — The Legendre Transformation — Part 12
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Example 26.2.1: outside the effective domain, the piecewise formula has no subgradients because the base value is +∞ while the origin still has finite value.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_subgradient_empty_off_effectiveDomain
{x : Fin 2 → ℝ}
(hx : x ∉ effectiveDomain (Set.univ : Set (Fin 2 → ℝ)) quadraticOverLinearMinusSqrtFunction) :
subdifferentialAt quadraticOverLinearMinusSqrtFunction x = ∅
Helper for Example 26.2.1: the small perturbation x + (t^3, t^2) forces the subgradient inequality to fail at every point of the nonnegative ξ₁-axis, so the boundary fiber is empty.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_axis_subgradient_empty_smallT
{x : Fin 2 → ℝ} (hx : x ∈ nonnegativeXi1AxisR2) :
subdifferentialAt quadraticOverLinearMinusSqrtFunction x = ∅
Helper for Example 26.2.1: the already-proved exterior and axis exclusions show that every point with nonempty subdifferential must lie in the open positive quadrant.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_subdifferentialEffectiveDomain_subset_openQuadrant :
subdifferentialEffectiveDomain quadraticOverLinearMinusSqrtFunction ⊆
openPositiveQuadrantR2
Helper for Example 26.2.1: positive convex combinations of open-quadrant points stay in the open positive quadrant.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_openQuadrant_combo_mem
{x y : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) (hy : y ∈ openPositiveQuadrantR2)
{a b : ℝ} (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) :
a • x + b • y ∈ openPositiveQuadrantR2
Helper for Example 26.2.1: the quadratic-over-linear part satisfies its convexity inequality on positive convex combinations inside the open quadrant.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_quadraticOverLinear_real_convex_combo
{x y : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) (hy : y ∈ openPositiveQuadrantR2)
{a b : ℝ} (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) :
(((a • x + b • y) 1) ^ 2 / (2 * ((a • x + b • y) 0)) : ℝ) ≤
a * (x 1 ^ 2 / (2 * x 0)) + b * (y 1 ^ 2 / (2 * y 0))
Helper for Example 26.2.1: for fixed positive ξ₂ = c, the map ξ₁ ↦ c^2 / (2 ξ₁) is strictly convex on (0, ∞).
open scoped ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_fixedSecondCoordinate_strictConvex_firstCoordinate
{u v c a b : ℝ} (hu : 0 < u) (hv : 0 < v) (hc : 0 < c) (huv : u ≠ v)
(ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) :
c ^ 2 / (2 * (a * u + b * v)) <
a * (c ^ 2 / (2 * u)) + b * (c ^ 2 / (2 * v))
Helper for Example 26.2.1: the textbook two-case argument yields strict convexity of the real branch on the open positive quadrant.
open scoped ConvexAnalysis Pointwise
lemma helperForExample_26_2_1_strictConvexOn_openQuadrant :
StrictConvexOn ℝ openPositiveQuadrantR2
(fun x => (quadraticOverLinearMinusSqrtFunction x).toReal)§26 — The Legendre Transformation — Part 13
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Helper for Example 26.2.1: extend the real core ξ₂^2 / (2 ξ₁) - 2 √ξ₂ by +∞ outside the open positive quadrant.
noncomputable def helperForExample_26_2_1_openQuadrantExtension : (Fin 2 → ℝ) → EReal :=
fun x =>
(((x 1 ^ 2 / (2 * x 0) - 2 * Real.sqrt (x 1) : ℝ)) : EReal) +
indicatorFunction openPositiveQuadrantR2 x
Helper for Example 26.2.1: the open positive quadrant is an open subset of ℝ².
lemma helperForExample_26_2_1_openQuadrant_isOpen :
IsOpen openPositiveQuadrantR2
Helper for Example 26.2.1: the open positive quadrant is convex.
lemma helperForExample_26_2_1_openQuadrant_isConvex :
Convex ℝ openPositiveQuadrantR2§26 — The Legendre Transformation — Part 14
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Example 26.2.1: the function f(ξ₁, ξ₂) = ξ₂^2 / (2 ξ₁) - 2 √ξ₂ for ξ₁ > 0, ξ₂ ≥ 0, with f(0, 0) = 0 and f = +∞ otherwise, has dom ∂ f equal to the open positive quadrant, is strictly convex there, is constant on the non-negative ξ₁-axis and therefore not strictly convex on all of dom f, yet is essentially strictly convex and essentially smooth.
theorem quadraticOverLinearMinusSqrtFunction_has_positiveQuadrantSubdifferentialDomain_and_essential_properties :
subdifferentialEffectiveDomain quadraticOverLinearMinusSqrtFunction = openPositiveQuadrantR2 ∧
StrictConvexOn ℝ openPositiveQuadrantR2
(fun x => (quadraticOverLinearMinusSqrtFunction x).toReal) ∧
Set.EqOn (fun x => (quadraticOverLinearMinusSqrtFunction x).toReal)
(fun _ : Fin 2 → ℝ => (0 : ℝ)) nonnegativeXi1AxisR2 ∧
¬ StrictConvexOn ℝ
(effectiveDomain (Set.univ : Set (Fin 2 → ℝ)) quadraticOverLinearMinusSqrtFunction)
(fun x => (quadraticOverLinearMinusSqrtFunction x).toReal) ∧
IsEssentiallyStrictlyConvex quadraticOverLinearMinusSqrtFunction ∧
IsEssentiallySmooth quadraticOverLinearMinusSqrtFunction
Helper for Example 26.2.1: the open-quadrant +∞ extension of the real core is proper convex, and its effective-domain interior is exactly the open positive quadrant.
lemma helperForExample_26_2_1_openQuadrantExtension_package :
ProperConvexFunctionOn (Set.univ : Set (Fin 2 → ℝ))
helperForExample_26_2_1_openQuadrantExtension ∧
interior (effectiveDomain (Set.univ : Set (Fin 2 → ℝ))
helperForExample_26_2_1_openQuadrantExtension) = openPositiveQuadrantR2
Helper for Example 26.2.1: the open-quadrant extension is finite exactly on the open positive quadrant.
lemma helperForExample_26_2_1_openQuadrantExtension_effectiveDomain_eq :
effectiveDomain (Set.univ : Set (Fin 2 → ℝ))
helperForExample_26_2_1_openQuadrantExtension = openPositiveQuadrantR2
Helper for Example 26.2.1: every open-quadrant point is a theorem-side relative-interior basepoint for the closure-limit formula.
lemma helperForExample_26_2_1_openQuadrantExtension_basepoint_mem_relativeInterior
{x : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) :
(EuclideanSpace.equiv (ι := Fin 2) (𝕜 := ℝ)).symm x ∈
euclideanRelativeInterior 2
(((fun z : EuclideanSpace ℝ (Fin 2) => (z : Fin 2 → ℝ)) ⁻¹'
effectiveDomain (Set.univ : Set (Fin 2 → ℝ))
helperForExample_26_2_1_openQuadrantExtension))
Helper for Example 26.2.1: the Euclidean-space segment expressions produced by the closure theorem simplify to the expected coordinate formulas for the three basepoints used below.
lemma helperForExample_26_2_1_segmentCoordinateRewrite_euclideanClosureBasepoints
(x : Fin 2 → ℝ) (t : ℝ) :
((((1 - t) • (EuclideanSpace.equiv (ι := Fin 2) (𝕜 := ℝ)).symm (![1, 1] : Fin 2 → ℝ) +
t • (EuclideanSpace.equiv (ι := Fin 2) (𝕜 := ℝ)).symm x :
EuclideanSpace ℝ (Fin 2)) : Fin 2 → ℝ) =
![1 - t + t * x 0, 1 - t + t * x 1]) ∧
((((1 - t) • (EuclideanSpace.equiv (ι := Fin 2) (𝕜 := ℝ)).symm (x + ![1, 1]) +
t • (EuclideanSpace.equiv (ι := Fin 2) (𝕜 := ℝ)).symm x :
EuclideanSpace ℝ (Fin 2)) : Fin 2 → ℝ) =
![x 0 + (1 - t), x 1 + (1 - t)]) ∧
((((1 - t) • (EuclideanSpace.equiv (ι := Fin 2) (𝕜 := ℝ)).symm (x + ![1, 0]) +
t • (EuclideanSpace.equiv (ι := Fin 2) (𝕜 := ℝ)).symm x :
EuclideanSpace ℝ (Fin 2)) : Fin 2 → ℝ) =
![x 0 + (1 - t), x 1])
Helper for Example 26.2.1: along the segment approaching a nonnegative ξ₁-axis point from the open quadrant, the closure limit of the core branch is 0.
lemma helperForExample_26_2_1_axisClosureLimit {a : ℝ} (ha : 0 ≤ a) :
Filter.Tendsto
(fun t : ℝ =>
(((((1 - t) ^ 2 / (2 * (a + (1 - t))) - 2 * Real.sqrt (1 - t) : ℝ))) : EReal))
(nhdsWithin (1 : ℝ) (Set.Iio (1 : ℝ))) (nhds (0 : EReal))
Helper for Example 26.2.1: the translated interior basepoints used in the closure argument produce the expected coordinatewise segment formulas.
lemma helperForExample_26_2_1_segmentCoordinateRewrite_translatedInteriorBasepoints
(x : Fin 2 → ℝ) (t : ℝ) :
(((1 - t) • (x + ![1, 1]) + t • x : Fin 2 → ℝ) = ![x 0 + (1 - t), x 1 + (1 - t)]) ∧
(((1 - t) • (x + ![1, 0]) + t • x : Fin 2 → ℝ) = ![x 0 + (1 - t), x 1])
Helper for Example 26.2.1: on the positive ξ₂-axis, the quadratic-over-linear core tends to +∞ along the translated interior segment.
lemma helperForExample_26_2_1_verticalAxis_coreBlowup {b : ℝ} (hb : 0 < b) :
Filter.Tendsto
(fun t : ℝ => (((b ^ 2 / (2 * (1 - t)) - 2 * Real.sqrt b : ℝ)) : EReal))
(nhdsWithin 1 (Set.Iio 1)) (nhds (⊤ : EReal))
Helper for Example 26.2.1: the convex closure of the open-quadrant extension takes the value 0 on the nonnegative ξ₁-axis.
lemma helperForExample_26_2_1_openQuadrantExtension_closure_eq_zero_on_axis
{x : Fin 2 → ℝ} (hx : x ∈ nonnegativeXi1AxisR2) :
convexFunctionClosure helperForExample_26_2_1_openQuadrantExtension x = (0 : EReal)
Helper for Example 26.2.1: if a point has a negative coordinate, then the segment from an interior point eventually leaves the open quadrant, so the closure value is +∞.
lemma helperForExample_26_2_1_openQuadrantExtension_closure_eq_top_outsideQuadrantClosure
{x : Fin 2 → ℝ} (hx : x 0 < 0 ∨ x 1 < 0) :
convexFunctionClosure helperForExample_26_2_1_openQuadrantExtension x = (⊤ : EReal)
Helper for Example 26.2.1: approaching a point of the positive ξ₂-axis from the interior forces the core term ξ₂^2 / (2 ξ₁) to blow up, so the closure value is +∞.
lemma helperForExample_26_2_1_openQuadrantExtension_closure_eq_top_on_verticalAxis
{x : Fin 2 → ℝ} (hx : x 0 = 0 ∧ 0 < x 1) :
convexFunctionClosure helperForExample_26_2_1_openQuadrantExtension x = (⊤ : EReal)
Helper for Example 26.2.1: the textbook piecewise function is exactly the closed convex closure of the open-quadrant +∞ extension of its real core.
lemma helperForExample_26_2_1_openQuadrantExtension_closure_eq_target :
convexFunctionClosure helperForExample_26_2_1_openQuadrantExtension =
quadraticOverLinearMinusSqrtFunction
Helper for Example 26.2.1: the real core is differentiable at every point of the open positive quadrant.
lemma helperForExample_26_2_1_coreDifferentiableAt_openQuadrant
{x : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) :
DifferentiableAt ℝ (fun y : Fin 2 → ℝ => y 1 ^ 2 / (2 * y 0) - 2 * Real.sqrt (y 1)) x
Helper for Example 26.2.1: on the open positive quadrant, differentiability of the open-quadrant extension transfers through the convex closure, so the subdifferential is a singleton there.
lemma helperForExample_26_2_1_openQuadrant_subdifferential_singleton
{x : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) :
∃ g : Fin 2 → ℝ,
subdifferentialAt quadraticOverLinearMinusSqrtFunction x =
{dotProductEquiv ℝ (Fin 2) g}
Helper for Example 26.2.1: the interior singleton fibers together with the already-proved axis/exterior emptiness identify the whole effective domain of ∂ f and show that ∂ f is globally single-valued.
lemma helperForExample_26_2_1_subdifferentialDomain_eq_openQuadrant_and_singleValued :
subdifferentialEffectiveDomain quadraticOverLinearMinusSqrtFunction =
openPositiveQuadrantR2 ∧
IsSingleValuedMultivaluedMap (subdifferentialAt quadraticOverLinearMinusSqrtFunction)§26 — The Legendre Transformation — Part 15
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The convex function f(ξ₁, ξ₂) = ξ₂^2 / (2 ξ₁) + ξ₂^2 on ξ₁ > 0, ξ₂ ≥ 0, extended by 0 at the origin and by +∞ elsewhere.
noncomputable def quadraticOverLinearPlusSquareFunction : (Fin 2 → ℝ) → EReal :=
fun x =>
if 0 < x 0 ∧ 0 ≤ x 1 then
(((x 1) ^ 2 / (2 * x 0) + (x 1) ^ 2 : ℝ) : EReal)
else if x = 0 then
(0 : EReal)
else
⊤
Example 26.2.2: the function f(ξ₁, ξ₂) = ξ₂^2 / (2 ξ₁) + ξ₂^2 for ξ₁ > 0, ξ₂ ≥ 0, with f(0, 0) = 0 and f = +∞ otherwise, is strictly convex on ri (dom f), and this relative interior is the open positive quadrant of ℝ²; moreover, the nonnegative ξ₁-axis lies in dom ∂ f, f is constant there, and therefore f is not essentially strictly convex.
theorem quadraticOverLinearPlusSquareFunction_strictConvexOn_relativeInterior_but_not_essentiallyStrictlyConvex :
euclideanRelativeInterior_fin 2
(effectiveDomain (Set.univ : Set (Fin 2 → ℝ)) quadraticOverLinearPlusSquareFunction) =
openPositiveQuadrantR2 ∧
StrictConvexOn ℝ openPositiveQuadrantR2
(fun x => (quadraticOverLinearPlusSquareFunction x).toReal) ∧
nonnegativeXi1AxisR2 ⊆ subdifferentialEffectiveDomain quadraticOverLinearPlusSquareFunction ∧
Set.EqOn (fun x => (quadraticOverLinearPlusSquareFunction x).toReal)
(fun _ : Fin 2 → ℝ => (0 : ℝ)) nonnegativeXi1AxisR2 ∧
¬ IsEssentiallyStrictlyConvex quadraticOverLinearPlusSquareFunction
The open upper half-plane in ℝ², written in coordinates (ξ₁, ξ₂).
def openUpperHalfPlaneR2 : Set (EuclideanSpace ℝ (Fin 2)) :=
{x | 0 < x 1}
The parabola ξ₂* = - (ξ₁*)² in ℝ².
def negativeParabolaR2 : Set (EuclideanSpace ℝ (Fin 2)) :=
{xStar | xStar 1 = - (xStar 0) ^ 2}
The differentiable convex function f(ξ₁, ξ₂) = ξ₁² / (4 ξ₂) on the open upper half-plane.
noncomputable def upperHalfPlaneQuadraticOverLinearFunction (x : EuclideanSpace ℝ (Fin 2)) : ℝ :=
x 0 ^ 2 / (4 * x 1)
Example 26.4.1.3: for the differentiable convex function f(ξ₁, ξ₂) = ξ₁² / (4 ξ₂) on the open upper half-plane C ⊆ ℝ², the Legendre conjugate domain D = ∇ f(C) is the parabola P = {(ξ₁*, ξ₂*) | ξ₂* = - (ξ₁*)²}; this parabola is not convex, and condition (c) of essential smoothness fails at the origin.
theorem upperHalfPlaneQuadraticOverLinear_has_parabolic_gradientImage_and_boundaryBlowupFails :
IsOpen openUpperHalfPlaneR2 ∧
Convex ℝ openUpperHalfPlaneR2 ∧
ConvexOn ℝ openUpperHalfPlaneR2 upperHalfPlaneQuadraticOverLinearFunction ∧
DifferentiableOn ℝ upperHalfPlaneQuadraticOverLinearFunction openUpperHalfPlaneR2 ∧
legendreGradientImage openUpperHalfPlaneR2 upperHalfPlaneQuadraticOverLinearFunction =
negativeParabolaR2 ∧
¬ Convex ℝ negativeParabolaR2 ∧
∃ xSeq : ℕ → EuclideanSpace ℝ (Fin 2),
(∀ i : ℕ, xSeq i ∈ openUpperHalfPlaneR2) ∧
Filter.Tendsto xSeq Filter.atTop (nhds (0 : EuclideanSpace ℝ (Fin 2))) ∧
(0 : EuclideanSpace ℝ (Fin 2)) ∈ frontier openUpperHalfPlaneR2 ∧
¬ Filter.Tendsto
(fun i : ℕ =>
‖gradient upperHalfPlaneQuadraticOverLinearFunction (xSeq i)‖)
Filter.atTop Filter.atTop
A function is essentially smooth on C when it is proper and convex on C, has a unique Euclidean subgradient at each point of C, and the norms of these subgradients blow up along sequences in C converging to boundary points of C.
def IsEssentiallySmoothOn {n : ℕ} (C : Set (Fin n → ℝ)) (f : (Fin n → ℝ) → EReal) : Prop :=
ProperConvexFunctionOn C f ∧
∃ grad : (Fin n → ℝ) → (Fin n → ℝ),
(∀ x ∈ C, dotProductEquiv ℝ (Fin n) (grad x) ∈ subdifferentialAt f x) ∧
(∀ ⦃x xStar⦄, x ∈ C →
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x →
xStar = grad x) ∧
∀ (xSeq : ℕ → Fin n → ℝ) (x : Fin n → ℝ),
(∀ i : ℕ, xSeq i ∈ C) →
Filter.Tendsto xSeq Filter.atTop (nhds x) →
x ∈ frontier C →
Filter.Tendsto (fun i : ℕ => ‖grad (xSeq i)‖) Filter.atTop Filter.atTop
Definition 26.4.1.4: a convex function is of Legendre type on the pair (C, f) when C is a nonempty open convex set, f is finite on C, the restriction of f to C is strictly convex, and f is essentially smooth on C. Thus, by Corollary 26.3.1, a closed proper convex function has one-to-one subdifferential exactly when its restriction to int (dom f) is of Legendre type.
def IsLegendreTypeOn {n : ℕ} (C : Set (Fin n → ℝ)) (f : (Fin n → ℝ) → EReal) : Prop :=
C.Nonempty ∧
IsOpen C ∧
Convex ℝ C ∧
(∀ x ∈ C, f x ≠ (⊤ : EReal)) ∧
StrictConvexOn ℝ C (fun x => (f x).toReal) ∧
IsEssentiallySmoothOn C f
Helper for Example 26.2.2: the effective domain is the open-right/nonnegative-upper region plus the origin, and the function vanishes on the nonnegative ξ₁-axis.
lemma helperForExample_26_2_2_effectiveDomain_eq_and_axisValues :
effectiveDomain (Set.univ : Set (Fin 2 → ℝ)) quadraticOverLinearPlusSquareFunction =
{x | 0 < x 0 ∧ 0 ≤ x 1} ∪ ({0} : Set (Fin 2 → ℝ)) ∧
Set.EqOn (fun x => (quadraticOverLinearPlusSquareFunction x).toReal)
(fun _ : Fin 2 → ℝ => (0 : ℝ)) nonnegativeXi1AxisR2
Helper for Example 26.2.2: on the open positive quadrant, the piecewise function agrees with its explicit real-valued branch.
lemma helperForExample_26_2_2_value_on_openQuadrant
{x : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) :
quadraticOverLinearPlusSquareFunction x =
(((x 1 ^ 2 / (2 * x 0) + x 1 ^ 2 : ℝ)) : EReal)
Helper for Example 26.2.2: the original EReal-valued function is identically zero on the nonnegative ξ₁-axis.
lemma helperForExample_26_2_2_value_on_nonnegativeXi1Axis
{x : Fin 2 → ℝ} (hx : x ∈ nonnegativeXi1AxisR2) :
quadraticOverLinearPlusSquareFunction x = (0 : EReal)
Helper for Example 26.2.2: the function is globally nonnegative, so the zero covector can support it at every axis point where the value is zero.
lemma helperForExample_26_2_2_nonnegative
(x : Fin 2 → ℝ) :
(0 : EReal) ≤ quadraticOverLinearPlusSquareFunction x
Helper for Example 26.2.2: the ordinary interior of the explicit domain {ξ₁ > 0, ξ₂ ≥ 0} ∪ {0} is the open positive quadrant.
lemma helperForExample_26_2_2_explicitDomain_interior_eq_openQuadrant :
interior ({x : Fin 2 → ℝ | 0 < x 0 ∧ 0 ≤ x 1} ∪ ({0} : Set (Fin 2 → ℝ))) =
openPositiveQuadrantR2
Helper for Example 26.2.2: the explicit domain {ξ₁ > 0, ξ₂ ≥ 0} ∪ {0} has relative interior equal to the open positive quadrant.
lemma helperForExample_26_2_2_explicitDomain_relativeInterior_eq_openQuadrant :
euclideanRelativeInterior_fin 2
({x : Fin 2 → ℝ | 0 < x 0 ∧ 0 ≤ x 1} ∪ ({0} : Set (Fin 2 → ℝ))) =
openPositiveQuadrantR2
Helper for Example 26.2.2: the relative interior of the effective domain is exactly the open positive quadrant.
lemma helperForExample_26_2_2_relativeInterior_eq_openQuadrant :
euclideanRelativeInterior_fin 2
(effectiveDomain (Set.univ : Set (Fin 2 → ℝ)) quadraticOverLinearPlusSquareFunction) =
openPositiveQuadrantR2
Helper for Example 26.2.2: positive weights strictly contract the square unless the coordinates agree.
lemma helperForExample_26_2_2_weightedSquare_strict
{u v a b : ℝ} (huv : u ≠ v) (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) :
(a * u + b * v) ^ 2 < a * u ^ 2 + b * v ^ 2
Helper for Example 26.2.2: the same two-case argument as in Example 26.2.1 yields strict convexity of the real branch on the open positive quadrant.
lemma helperForExample_26_2_2_strictConvexOn_openQuadrant :
StrictConvexOn ℝ openPositiveQuadrantR2
(fun x => (quadraticOverLinearPlusSquareFunction x).toReal)
Helper for Example 26.2.2: every point on the nonnegative ξ₁-axis has the zero covector as a subgradient, so the whole axis lies in dom ∂ f.
lemma helperForExample_26_2_2_axis_subset_subdifferentialEffectiveDomain :
nonnegativeXi1AxisR2 ⊆ subdifferentialEffectiveDomain quadraticOverLinearPlusSquareFunction
Helper for Example 26.2.2: the nonnegative ξ₁-axis is a convex set.
lemma helperForExample_26_2_2_nonnegativeXi1Axis_isConvex :
Convex ℝ nonnegativeXi1AxisR2
Helper for Example 26.2.2: the axis lies in dom ∂ f but the function is constant there, so it cannot be essentially strictly convex.
lemma helperForExample_26_2_2_not_essentiallyStrictlyConvex :
¬ IsEssentiallyStrictlyConvex quadraticOverLinearPlusSquareFunction
Helper for Example 26.4.1.3: the open upper half-plane is an open convex subset of ℝ².
lemma helperForExample_26_4_1_3_openUpperHalfPlane_isOpen_isConvex :
IsOpen openUpperHalfPlaneR2 ∧ Convex ℝ openUpperHalfPlaneR2
Helper for Example 26.4.1.3: the quadratic-over-linear function is convex on the open upper half-plane after the coordinate change (ξ₁, ξ₂) ↦ (ξ₂, ξ₁ / √2).
lemma helperForExample_26_4_1_3_convexOn_openUpperHalfPlane :
ConvexOn ℝ openUpperHalfPlaneR2 upperHalfPlaneQuadraticOverLinearFunction
Helper for Example 26.4.1.3: the coordinate gradient of ξ ↦ ξ₁² / (4 ξ₂) is explicit.
lemma helperForExample_26_4_1_3_coordinateGradient_formula
(x : EuclideanSpace ℝ (Fin 2)) (hx : x ∈ openUpperHalfPlaneR2) :
euclideanGradientAt (fun ξ : Fin 2 → ℝ => ξ 0 ^ 2 / (4 * ξ 1))
((EuclideanSpace.equiv (Fin 2) ℝ) x) =
![x 0 / (2 * x 1), -(x 0 ^ 2 / (4 * x 1 ^ 2))]
Helper for Example 26.4.1.3: on the open upper half-plane, the gradient is (ξ₁ / (2 ξ₂), - ξ₁² / (4 ξ₂²)).
lemma helperForExample_26_4_1_3_hasGradientAt_formula
{x : EuclideanSpace ℝ (Fin 2)} (hx : x ∈ openUpperHalfPlaneR2) :
HasGradientAt upperHalfPlaneQuadraticOverLinearFunction
((EuclideanSpace.equiv (ι := Fin 2) (𝕜 := ℝ)).symm
![x 0 / (2 * x 1), -(x 0 ^ 2 / (4 * x 1 ^ 2))]) x
Helper for Example 26.4.1.3: the gradient image of the open upper half-plane is exactly the negative parabola ξ₂* = - (ξ₁*)².
lemma helperForExample_26_4_1_3_gradientImage_eq_negativeParabola :
legendreGradientImage openUpperHalfPlaneR2 upperHalfPlaneQuadraticOverLinearFunction =
negativeParabolaR2
Helper for Example 26.4.1.3: the vertical sequence (0, 1/(i+1)) stays in the upper half-plane, converges to the boundary point 0, and its gradient norm is constantly zero.
lemma helperForExample_26_4_1_3_boundarySequence_witness :
∃ xSeq : ℕ → EuclideanSpace ℝ (Fin 2),
(∀ i : ℕ, xSeq i ∈ openUpperHalfPlaneR2) ∧
Filter.Tendsto xSeq Filter.atTop (nhds (0 : EuclideanSpace ℝ (Fin 2))) ∧
(0 : EuclideanSpace ℝ (Fin 2)) ∈ frontier openUpperHalfPlaneR2 ∧
¬ Filter.Tendsto
(fun i : ℕ =>
‖gradient upperHalfPlaneQuadraticOverLinearFunction (xSeq i)‖)
Filter.atTop Filter.atTop
Helper for Proposition 26.4.1.5: if C = int (dom f) is nonempty, then it is open, convex, and f is finite on C.
lemma helperForProposition_26_4_1_5_interiorDomain_openConvex_and_finite
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f) :
let C : Set (Fin n → ℝ) := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
C.Nonempty → IsOpen C ∧ Convex ℝ C ∧ ∀ x ∈ C, f x ≠ (⊤ : EReal)
Helper for Proposition 26.4.1.5: on C = int (dom f), the ambient proper-convex package restricts to a local ProperConvexFunctionOn C f package.
lemma helperForProposition_26_4_1_5_properConvexFunctionOn_interior
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f) :
let C : Set (Fin n → ℝ) := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
C.Nonempty → ProperConvexFunctionOn C f
Helper for Proposition 26.4.1.5: on C = int (dom f), the local and global versions of essential smoothness have the same gradient and boundary-blowup data.
lemma helperForProposition_26_4_1_5_essentiallySmoothOn_interior_iff_essentiallySmooth
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f) :
let C : Set (Fin n → ℝ) := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
IsEssentiallySmoothOn C f ↔ IsEssentiallySmooth f
Helper for Proposition 26.4.1.5: on C = int (dom f), Legendre type is exactly strict convexity on C together with global essential smoothness.
lemma helperForProposition_26_4_1_5_isLegendreTypeOn_interior_iff_strictConvexOn_and_essentiallySmooth
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f) :
let C : Set (Fin n → ℝ) := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
IsLegendreTypeOn C f ↔
StrictConvexOn ℝ C (fun x => (f x).toReal) ∧ IsEssentiallySmooth f§26 — The Legendre Transformation — Part 16
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Proposition 26.4.1.5: if f is a closed proper convex function on ℝ^n and C = int (dom f), then ∂ f is one-to-one if and only if the restriction (C, f|_C) is of Legendre type.
theorem subdifferential_oneToOne_iff_restriction_isLegendreTypeOn_interior
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f) :
let C : Set (Fin n → ℝ) := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
IsOneToOneMultivaluedMap (subdifferentialAt f) ↔ IsLegendreTypeOn C f
Theorem 26.5: let f be a closed convex function with C = int (dom f) and C* = int (dom f*). Then (C, f) is of Legendre type if and only if (C*, f*) is of Legendre type. When this holds, (C*, f*) is the Legendre conjugate of (C, f) and conversely; moreover there are unique-subgradient maps grad on C and gradStar on C* whose restrictions define inverse homeomorphisms between C and C*.
theorem legendreTypeOn_interior_iff_conjugate_legendreTypeOn_interior_with_mutualLegendreConjugacy
{n : ℕ} (f : (Fin n → ℝ) → EReal)
(hf : ProperConvexERealFunction (F := (Fin n → ℝ)) f)
(hf_closed : LowerSemicontinuous f) :
let C : Set (Fin n → ℝ) := interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) f)
let fStar : (Fin n → ℝ) → EReal := fenchelConjugate n f
let CStar : Set (Fin n → ℝ) :=
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) fStar)
(IsLegendreTypeOn C f ↔ IsLegendreTypeOn CStar fStar) ∧
(IsLegendreTypeOn C f →
∃ L : LegendreConjugatePackageOn (fun x xStar : Fin n → ℝ => dotProduct x xStar) C f,
L.target = CStar ∧
Set.EqOn L.conjFun fStar CStar ∧
∃ LStar :
LegendreConjugatePackageOn
(fun xStar x : Fin n → ℝ => dotProduct x xStar) CStar fStar,
LStar.target = C ∧
Set.EqOn LStar.conjFun f C ∧
∃ grad gradStar : (Fin n → ℝ) → (Fin n → ℝ),
L.toFun = grad ∧
LStar.toFun = gradStar ∧
(∀ x ∈ C, dotProductEquiv ℝ (Fin n) (grad x) ∈ subdifferentialAt f x) ∧
(∀ ⦃x xStar⦄, x ∈ C →
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt f x →
xStar = grad x) ∧
(∀ xStar ∈ CStar,
dotProductEquiv ℝ (Fin n) (gradStar xStar) ∈ subdifferentialAt fStar xStar) ∧
(∀ ⦃xStar x⦄, xStar ∈ CStar →
dotProductEquiv ℝ (Fin n) x ∈ subdifferentialAt fStar xStar →
x = gradStar xStar) ∧
∃ h : {x // x ∈ C} ≃ₜ {xStar // xStar ∈ CStar},
(∀ x : {x // x ∈ C}, ((h x : {xStar // xStar ∈ CStar}) : Fin n → ℝ) = grad x.1) ∧
∀ xStar : {xStar // xStar ∈ CStar},
((h.symm xStar : {x // x ∈ C}) : Fin n → ℝ) = gradStar xStar.1)§26 — The Legendre Transformation — Part 17
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The real-valued branch of f(ξ₁, ξ₂) = ξ₂^2 / (2 ξ₁) - 2 √ξ₂ used on the open positive quadrant.
noncomputable def quadraticOverLinearMinusSqrtCore (x : Fin 2 → ℝ) : ℝ :=
x 1 ^ 2 / (2 * x 0) - 2 * Real.sqrt (x 1)
The explicit gradient map of quadraticOverLinearMinusSqrtCore on the open positive quadrant, written in the coordinates (ξ₁*, ξ₂*).
noncomputable def quadraticOverLinearMinusSqrtGradientMap : (Fin 2 → ℝ) → (Fin 2 → ℝ) :=
fun x => ![
-((x 1) ^ 2 / (2 * (x 0) ^ 2)),
x 1 / x 0 - 1 / Real.sqrt (x 1)
]
The dual domain C* for the quadratic-over-linear-minus-square-root example.
def quadraticOverLinearMinusSqrtDualDomain : Set (Fin 2 → ℝ) :=
{xStar | xStar 0 < 0 ∧ xStar 1 < Real.sqrt (-2 * xStar 0)}
The explicit inverse of the gradient map on the dual domain C*, obtained by writing s = (-2 ξ₁*)^{1/2}, solving ξ₂ / ξ₁ = s and ξ₂* = s - ξ₂^{-1/2}, and hence ξ₂ = 1 / (s - ξ₂*)^2 and ξ₁ = 1 / (s * (s - ξ₂*)^2).
noncomputable def quadraticOverLinearMinusSqrtGradientInverse : (Fin 2 → ℝ) → (Fin 2 → ℝ) :=
fun xStar =>
let s := Real.sqrt (-2 * xStar 0)
![
1 / (s * (s - xStar 1) ^ 2),
1 / ((s - xStar 1) ^ 2)
]
The explicit Fenchel conjugate formula on the dual domain of the quadratic-over-linear-minus-square-root example, extended by +∞ outside that domain.
noncomputable def quadraticOverLinearMinusSqrtDualConjugateFunction : (Fin 2 → ℝ) → EReal :=
fun xStar =>
if xStar ∈ quadraticOverLinearMinusSqrtDualDomain then
((1 / (Real.sqrt (-2 * xStar 0) - xStar 1) : ℝ) : EReal)
else
⊤
Example 26.5.0.1: for f(ξ₁, ξ₂) = ξ₂^2 / (2 ξ₁) - 2 √ξ₂ on C = {(ξ₁, ξ₂) | ξ₁ > 0, ξ₂ > 0}, extended by f(0, 0) = 0 and f = +∞ elsewhere, the pair (C, f) is of Legendre type. Its gradient on C is given by ξ₁* = - ξ₂^2 / (2 ξ₁^2) and ξ₂* = ξ₂ / ξ₁ - ξ₂^{-1/2}, the image of this gradient is C* = {(ξ₁*, ξ₂*) | ξ₁* < 0, ξ₂* < (-2 ξ₁*)^{1/2}} = int (dom f*), and writing s := (-2 ξ₁*)^{1/2}, one has ξ₂^{-1/2} = s - ξ₂*, hence ξ₂ = 1 / (s - ξ₂*)^2 and ξ₁ = 1 / (s * (s - ξ₂*)^2) for (∇ f)⁻¹(x*). Moreover, f*(x*) = 1 / ((-2 ξ₁*)^{1/2} - ξ₂*) on C*, this agrees there with the Fenchel conjugate of f, and (C*, f*) is also of Legendre type and is the Legendre conjugate of (C, f).
theorem quadraticOverLinearMinusSqrtFunction_has_explicit_legendre_dual_data :
IsLegendreTypeOn openPositiveQuadrantR2 quadraticOverLinearMinusSqrtFunction ∧
(∀ x ∈ openPositiveQuadrantR2,
(quadraticOverLinearMinusSqrtGradientMap x) 0 =
-((x 1) ^ 2 / (2 * (x 0) ^ 2)) ∧
(quadraticOverLinearMinusSqrtGradientMap x) 1 =
x 1 / x 0 - 1 / Real.sqrt (x 1)) ∧
quadraticOverLinearMinusSqrtGradientMap '' openPositiveQuadrantR2 =
quadraticOverLinearMinusSqrtDualDomain ∧
quadraticOverLinearMinusSqrtDualDomain =
interior
(effectiveDomain (Set.univ : Set (Fin 2 → ℝ))
(fenchelConjugate 2 quadraticOverLinearMinusSqrtFunction)) ∧
(∀ xStar ∈ quadraticOverLinearMinusSqrtDualDomain,
let s := Real.sqrt (-2 * xStar 0)
quadraticOverLinearMinusSqrtGradientInverse xStar ∈ openPositiveQuadrantR2 ∧
quadraticOverLinearMinusSqrtGradientMap
(quadraticOverLinearMinusSqrtGradientInverse xStar) = xStar ∧
(quadraticOverLinearMinusSqrtGradientInverse xStar) 0 =
1 / (s * (s - xStar 1) ^ 2) ∧
(quadraticOverLinearMinusSqrtGradientInverse xStar) 1 =
1 / ((s - xStar 1) ^ 2)) ∧
Set.EqOn
(fenchelConjugate 2 quadraticOverLinearMinusSqrtFunction)
quadraticOverLinearMinusSqrtDualConjugateFunction
quadraticOverLinearMinusSqrtDualDomain ∧
(∀ xStar ∈ quadraticOverLinearMinusSqrtDualDomain,
quadraticOverLinearMinusSqrtDualConjugateFunction xStar =
((1 / (Real.sqrt (-2 * xStar 0) - xStar 1) : ℝ) : EReal)) ∧
IsLegendreTypeOn quadraticOverLinearMinusSqrtDualDomain
quadraticOverLinearMinusSqrtDualConjugateFunction ∧
∃ L : InvolutiveLegendreTransformationOn (euclideanPairing (n := 2))
openPositiveQuadrantR2 quadraticOverLinearMinusSqrtFunction,
L.target = quadraticOverLinearMinusSqrtDualDomain ∧
L.toFun = quadraticOverLinearMinusSqrtGradientMap ∧
L.invFun = quadraticOverLinearMinusSqrtGradientInverse ∧
Set.EqOn L.conjFun quadraticOverLinearMinusSqrtDualConjugateFunction
quadraticOverLinearMinusSqrtDualDomain
Helper for Example 26.5.0.1: the Chapter 26.2 closure package already shows that quadraticOverLinearMinusSqrtFunction is proper convex and lower semicontinuous, and the explicit domain computation reduces its interior effective domain to the open positive quadrant.
lemma helperForExample_26_5_0_1_closedProper_lsc_and_interiorDomain :
ProperConvexERealFunction (F := (Fin 2 → ℝ)) quadraticOverLinearMinusSqrtFunction ∧
LowerSemicontinuous quadraticOverLinearMinusSqrtFunction ∧
interior (effectiveDomain (Set.univ : Set (Fin 2 → ℝ))
quadraticOverLinearMinusSqrtFunction) = openPositiveQuadrantR2
Helper for Example 26.5.0.1: on the dual domain C*, the displayed inverse formula lands in the open positive quadrant and evaluates the explicit gradient back to the original dual point.
lemma helperForExample_26_5_0_1_explicitInverse_mem_and_rightInv
{xStar : Fin 2 → ℝ} (hxStar : xStar ∈ quadraticOverLinearMinusSqrtDualDomain) :
quadraticOverLinearMinusSqrtGradientInverse xStar ∈ openPositiveQuadrantR2 ∧
quadraticOverLinearMinusSqrtGradientMap
(quadraticOverLinearMinusSqrtGradientInverse xStar) = xStar
Helper for Example 26.5.0.1: the coordinate gradient of the real core is the displayed map on the open positive quadrant.
lemma helperForExample_26_5_0_1_coordinateGradient_formula
{x : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) :
euclideanGradientAt quadraticOverLinearMinusSqrtCore x =
quadraticOverLinearMinusSqrtGradientMap x
Helper for Example 26.5.0.1: the Euclidean gradient of the real core is the displayed map on the open positive quadrant.
lemma helperForExample_26_5_0_1_core_hasGradientAt_formula
{x : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) :
euclideanGradientAt quadraticOverLinearMinusSqrtCore x =
quadraticOverLinearMinusSqrtGradientMap x
Helper for Example 26.5.0.1: the displayed gradient vector is an actual Euclidean subgradient of the closed extension at every interior point.
lemma helperForExample_26_5_0_1_explicitGradient_mem_subdifferential
{x : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) :
dotProductEquiv ℝ (Fin 2) (quadraticOverLinearMinusSqrtGradientMap x) ∈
subdifferentialAt quadraticOverLinearMinusSqrtFunction x
Helper for Example 26.5.0.1: on the open positive quadrant the closed extension has the explicit singleton subdifferential fiber.
lemma helperForExample_26_5_0_1_openQuadrant_subdifferential_eq_explicitSingleton
{x : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) :
subdifferentialAt quadraticOverLinearMinusSqrtFunction x =
{dotProductEquiv ℝ (Fin 2) (quadraticOverLinearMinusSqrtGradientMap x)}
Helper for Example 26.5.0.1: any subgradient selector on the open positive quadrant must coincide with the displayed explicit gradient map.
lemma helperForExample_26_5_0_1_subgradient_selector_eq_explicitGradient
{grad : (Fin 2 → ℝ) → (Fin 2 → ℝ)}
(hgrad :
∀ x ∈ openPositiveQuadrantR2,
dotProductEquiv ℝ (Fin 2) (grad x) ∈
subdifferentialAt quadraticOverLinearMinusSqrtFunction x) :
∀ x ∈ openPositiveQuadrantR2, grad x = quadraticOverLinearMinusSqrtGradientMap x
Helper for Example 26.5.0.1: the displayed gradient map lands in the explicit dual domain C*.
lemma helperForExample_26_5_0_1_gradient_mem_dualDomain
{x : Fin 2 → ℝ} (hx : x ∈ openPositiveQuadrantR2) :
quadraticOverLinearMinusSqrtGradientMap x ∈ quadraticOverLinearMinusSqrtDualDomain
Helper for Example 26.5.0.1: evaluating the Fenchel-Young expression at the explicit inverse point reduces to the displayed reciprocal formula on the dual domain C*.
lemma helperForExample_26_5_0_1_conjugate_value_at_explicitInverse
{xStar : Fin 2 → ℝ} (hxStar : xStar ∈ quadraticOverLinearMinusSqrtDualDomain) :
(((euclideanPairing (n := 2)
(quadraticOverLinearMinusSqrtGradientInverse xStar) xStar : ℝ) : EReal) -
quadraticOverLinearMinusSqrtFunction
(quadraticOverLinearMinusSqrtGradientInverse xStar)) =
((1 / (Real.sqrt (-2 * xStar 0) - xStar 1) : ℝ) : EReal)§26 — The Legendre Transformation — Part 18
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
The Chapter 13 co-finiteness predicate for the standard EReal lift of a real-valued convex function on ℝ^n.
abbrev IsCofiniteFiniteConvexFunction {n : ℕ} (f : (Fin n → ℝ) → ℝ) : Prop :=
CoFiniteConvexFunction (fun x => (f x : EReal))
Text 26.5.0.2: a finite convex function f on ℝ^n is co-finite exactly when its epigraph contains no non-vertical half-lines, equivalently when its recession function takes the value +∞ on every nonzero direction; by Corollary 13.3.1, this occurs precisely when the Fenchel conjugate of the standard EReal lift of f is finite everywhere, i.e. dom f* = ℝ^n.
theorem isCofiniteFiniteConvexFunction_iff_fenchelConjugate_finiteEverywhere {n : ℕ}
(f : (Fin n → ℝ) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (Fin n → ℝ)) f) :
IsCofiniteFiniteConvexFunction f ↔
(effectiveDomain (Set.univ : Set (Fin n → ℝ))
(fenchelConjugate n (fun x => (f x : EReal))) = Set.univ ∧
∀ xStar : Fin n → ℝ,
fenchelConjugate n (fun x => (f x : EReal)) xStar ≠ (⊥ : EReal))
The inverse-gradient Legendre conjugate candidate attached to a differentiable convex function on ℝ^n.
noncomputable def gradientLegendreConjugate {n : ℕ}
(f : EuclideanSpace ℝ (Fin n) → ℝ) :
EuclideanSpace ℝ (Fin n) → ℝ :=
fun xStar =>
let x := Function.invFun (gradient f) xStar
dotProduct (fun i => x i) (fun i => xStar i) - f x
Helper for Text 26.5.0.2: transporting a finite convex function on ℝ^n through the WithLp identification yields a proper convex EReal-valued lift on the whole space.
lemma helperForText_26_5_0_2_properLift {n : ℕ}
(f : (Fin n → ℝ) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (Fin n → ℝ)) f) :
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ))
(fun x => (f x : EReal))
Helper for Text 26.5.0.2: the standard EReal lift of a finite convex function on ℝ^n is closed convex.
lemma helperForText_26_5_0_2_closedLift {n : ℕ}
(f : (Fin n → ℝ) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (Fin n → ℝ)) f) :
ClosedConvexFunction (fun x => (f x : EReal))
Helper for Theorem 26.6: the standard coordinate lift of a differentiable convex function on ℝ^n is proper, closed, everywhere differentiable, and essentially smooth on the whole space.
lemma helperForTheorem_26_6_coordinateLiftPackage
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
let F : (Fin n → ℝ) → EReal := fun x => (fFin x : EReal)
ProperConvexERealFunction (F := (Fin n → ℝ)) F ∧
LowerSemicontinuous F ∧
effectiveDomain (Set.univ : Set (Fin n → ℝ)) F = Set.univ ∧
(∀ x : Fin n → ℝ, ∃ hDiff : ERealDifferentiableAt F x,
erealGradientAt hDiff = euclideanGradientAt fFin x) ∧
IsEssentiallySmooth F
Helper for Theorem 26.6: after lifting to coordinates, injectivity of the Euclidean gradient is exactly one-to-one-ness of the subdifferential multivalued map.
lemma helperForTheorem_26_6_gradientInjective_iff_subdifferentialOneToOne
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
let F : (Fin n → ℝ) → EReal := fun x => (fFin x : EReal)
Function.Injective (gradient f) ↔ IsOneToOneMultivaluedMap (subdifferentialAt F)
Helper for Theorem 26.6: strict convexity is invariant under the standard coordinate identification between EuclideanSpace ℝ (Fin n) and Fin n → ℝ.
lemma helperForTheorem_26_6_strictConvex_transport_univ
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
StrictConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f ↔
StrictConvexOn ℝ (Set.univ : Set (Fin n → ℝ)) fFin
Helper for Theorem 26.6: once the gradient is injective, Theorem 26.5 identifies the whole-space gradient image with the interior effective domain of the Fenchel conjugate.
lemma helperForTheorem_26_6_gradientImage_eq_interior_conjugateDomain_univ
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(hInjective : Function.Injective (gradient f)) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
let F : (Fin n → ℝ) → EReal := fun x => (fFin x : EReal)
euclideanGradientAt fFin '' (Set.univ : Set (Fin n → ℝ)) =
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n F))
Helper for Theorem 26.6: the remaining primal equivalence asks for the gradient-image to be identified with the interior of the dual effective domain, so that surjectivity becomes co-finiteness via Chapter 13.
lemma helperForTheorem_26_6_bijective_iff_strictConvex_and_cofinite
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
Function.Bijective (gradient f) ↔
StrictConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f ∧
IsCofiniteFiniteConvexFunction fFin
Helper for Theorem 26.6: specializing Theorem 26.5 to the whole-space lift of f packages the primal and dual Legendre data on Set.univ, together with a two-sided inverse between the primal coordinate gradient and the dual selector.
lemma helperForTheorem_26_6_wholeSpaceLegendrePackage_from_bijectiveGradient
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(hbij : Function.Bijective (gradient f)) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
let F : (Fin n → ℝ) → EReal := fun x => (fFin x : EReal)
∃ L :
LegendreConjugatePackageOn (fun x xStar : Fin n → ℝ => dotProduct x xStar)
(interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) F)) F,
L.target = Set.univ ∧
Set.EqOn L.conjFun (fenchelConjugate n F) Set.univ ∧
∃ LStar :
LegendreConjugatePackageOn (fun xStar x : Fin n → ℝ => dotProduct x xStar)
(interior
(effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n F)))
(fenchelConjugate n F),
LStar.target = Set.univ ∧
Set.EqOn LStar.conjFun F Set.univ ∧
∃ gradStar : (Fin n → ℝ) → (Fin n → ℝ),
L.toFun = euclideanGradientAt fFin ∧
LStar.toFun = gradStar ∧
(∀ xStar : Fin n → ℝ, euclideanGradientAt fFin (gradStar xStar) = xStar) ∧
(∀ x : Fin n → ℝ, gradStar (euclideanGradientAt fFin x) = x)
Helper for Theorem 26.6: any selector whose image under the lifted coordinate gradient is the identity must coincide with the transported inverse of gradient f.
lemma helperForTheorem_26_6_dualSelector_eq_transport_invFun
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_differentiable : Differentiable ℝ f)
(hbij : Function.Bijective (gradient f))
(g : (Fin n → ℝ) → (Fin n → ℝ))
(hselector : ∀ xStar : Fin n → ℝ,
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
euclideanGradientAt fFin (g xStar) = xStar) :
∀ xStar : Fin n → ℝ,
g xStar =
(EuclideanSpace.equiv (Fin n) ℝ)
(Function.invFun (gradient f) ((EuclideanSpace.equiv (Fin n) ℝ).symm xStar))
Helper for Theorem 26.6: if the Fenchel conjugate is finite everywhere, coercing its toReal branch back to EReal recovers the conjugate itself pointwise.
lemma helperForTheorem_26_6_fenchelConjugate_toReal_coe_eq_of_finiteEverywhere
{n : ℕ} (F : (Fin n → ℝ) → EReal)
(hdomStar : effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n F) = Set.univ)
(hproperStar :
ProperConvexFunctionOn (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n F)) :
(fun xStar : Fin n → ℝ => (((fenchelConjugate n F xStar).toReal : ℝ) : EReal)) =
fenchelConjugate n F§26 — The Legendre Transformation — Part 19
Lean contributors (project-level attribution): Changyu Zou, Chenyi Li, Guangxuan Pan, Pengfei Hao, Qiming Dai, Shu Miao, Siyuan Shao, Suwu Wu, Wanli Ma, Weiran Shi, Xinyi Guo, Xuran Sun, Yifan Bai, Yijie Wang, Yunfei Zhang, Yunxi Duan, Yuhao Jiang, Zebo Liu, Zhiyan Wang, Zichen Wang, xdedlhqhw.
Theorem 26.6: let f be a differentiable convex function on ℝ^n. Then the gradient map ∇ f is one-to-one from ℝ^n onto itself if and only if f is strictly convex and co-finite. In that case there exists a differentiable strictly convex co-finite function fStar on ℝ^n such that fStar coincides with the inverse-gradient Legendre conjugate formula fStar x* = ⟪(∇ f)⁻¹ x*, x*⟫ - f ((∇ f)⁻¹ x*), the standard EReal lift of fStar is the Fenchel conjugate of the standard lift of f, and the Legendre conjugate of fStar is f.
theorem gradient_bijective_iff_strictConvex_and_cofinite_with_legendre_conjugate_properties
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
(Function.Bijective (gradient f) ↔
StrictConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f ∧
IsCofiniteFiniteConvexFunction fFin) ∧
(Function.Bijective (gradient f) →
∃ fStar : (Fin n → ℝ) → ℝ,
Differentiable ℝ fStar ∧
StrictConvexOn ℝ (Set.univ : Set (Fin n → ℝ)) fStar ∧
IsCofiniteFiniteConvexFunction fStar ∧
(∀ xStar : Fin n → ℝ,
fStar xStar =
gradientLegendreConjugate f ((EuclideanSpace.equiv (Fin n) ℝ).symm xStar)) ∧
((fun xStar : Fin n → ℝ => (fStar xStar : EReal)) =
fenchelConjugate n (fun x => (fFin x : EReal))) ∧
gradientLegendreConjugate
(fun xStar : EuclideanSpace ℝ (Fin n) =>
fStar ((EuclideanSpace.equiv (Fin n) ℝ) xStar)) =
f)
Lemma 26.7: let f be a differentiable convex function on ℝ^n. Then f is co-finite if and only if, for every sequence xᵢ with ‖xᵢ‖ → +∞, one has ‖∇ f (xᵢ)‖ → +∞.
lemma isCofiniteFiniteConvexFunction_iff_gradientNorm_tendsto_atTop_along_sequences
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
IsCofiniteFiniteConvexFunction fFin ↔
∀ xSeq : ℕ → EuclideanSpace ℝ (Fin n),
Filter.Tendsto (fun i : ℕ => ‖xSeq i‖) Filter.atTop Filter.atTop →
Filter.Tendsto (fun i : ℕ => ‖gradient f (xSeq i)‖) Filter.atTop Filter.atTop
Helper for Theorem 26.6: the dual whole-space Legendre package transfers to the real-valued branch x* ↦ (f*(x*)).toReal, keeping strict convexity, differentiability, co-finiteness, and a pointwise EReal gradient witness for the prescribed selector.
lemma helperForTheorem_26_6_dualRealBranch_properties_from_wholeSpacePackage
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(hbij : Function.Bijective (gradient f))
(gradStar : (Fin n → ℝ) → (Fin n → ℝ))
(hRightInv :
∀ xStar : Fin n → ℝ,
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
euclideanGradientAt fFin (gradStar xStar) = xStar) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
let F : (Fin n → ℝ) → EReal := fun x => (fFin x : EReal)
let fStar : (Fin n → ℝ) → ℝ := fun xStar => (fenchelConjugate n F xStar).toReal
Differentiable ℝ fStar ∧
StrictConvexOn ℝ (Set.univ : Set (Fin n → ℝ)) fStar ∧
IsCofiniteFiniteConvexFunction fStar ∧
((fun xStar : Fin n → ℝ => (fStar xStar : EReal)) = fenchelConjugate n F) ∧
(∀ xStar : Fin n → ℝ,
∃ hDiff : ERealDifferentiableAt (fenchelConjugate n F) xStar,
erealGradientAt hDiff = gradStar xStar)
Helper for Theorem 26.6: after passing to the real-valued dual branch, the ordinary Euclidean gradient is exactly the selector already identified with the transported inverse of ∇ f.
lemma helperForTheorem_26_6_dualRealGradient_eq_selector
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(hbij : Function.Bijective (gradient f))
(gradStar : (Fin n → ℝ) → (Fin n → ℝ))
(hRightInv :
∀ xStar : Fin n → ℝ,
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
euclideanGradientAt fFin (gradStar xStar) = xStar) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
let F : (Fin n → ℝ) → EReal := fun x => (fFin x : EReal)
let fStar : (Fin n → ℝ) → ℝ := fun xStar => (fenchelConjugate n F xStar).toReal
∀ xStar : Fin n → ℝ, euclideanGradientAt fStar xStar = gradStar xStar
Helper for Theorem 26.6: under gradient bijectivity, the Fenchel conjugate of the lifted function is real-valued everywhere and matches the inverse-gradient formula, with biconjugacy recovering the original function.
lemma helperForTheorem_26_6_dualWitness
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(hbij : Function.Bijective (gradient f)) :
let fFin : (Fin n → ℝ) → ℝ := fun x => f ((EuclideanSpace.equiv (Fin n) ℝ).symm x)
∃ fStar : (Fin n → ℝ) → ℝ,
Differentiable ℝ fStar ∧
StrictConvexOn ℝ (Set.univ : Set (Fin n → ℝ)) fStar ∧
IsCofiniteFiniteConvexFunction fStar ∧
(∀ xStar : Fin n → ℝ,
fStar xStar =
gradientLegendreConjugate f ((EuclideanSpace.equiv (Fin n) ℝ).symm xStar)) ∧
((fun xStar : Fin n → ℝ => (fStar xStar : EReal)) =
fenchelConjugate n (fun x => (fFin x : EReal))) ∧
gradientLegendreConjugate
(fun xStar : EuclideanSpace ℝ (Fin n) =>
fStar ((EuclideanSpace.equiv (Fin n) ℝ) xStar)) =
f
Helper for Lemma 26.7: on the coordinate lift of a differentiable convex function, every subgradient agrees with the Euclidean gradient.
lemma helperForLemma_26_7_primalSubgradient_eq_coordinateGradient
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
{x xStar : Fin n → ℝ} :
let fFin : (Fin n → ℝ) → ℝ := fun y => f ((EuclideanSpace.equiv (Fin n) ℝ).symm y)
let F : (Fin n → ℝ) → EReal := fun y => (fFin y : EReal)
dotProductEquiv ℝ (Fin n) xStar ∈ subdifferentialAt F x →
xStar = euclideanGradientAt fFin x
Helper for Lemma 26.7: a primal gradient value becomes a Euclidean subgradient of the Fenchel conjugate at the corresponding dual point.
lemma helperForLemma_26_7_dualSubgradient_of_gradientValue
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(x : EuclideanSpace ℝ (Fin n)) :
let e : EuclideanSpace ℝ (Fin n) ≃L[ℝ] (Fin n → ℝ) := EuclideanSpace.equiv (Fin n) ℝ
let fFin : (Fin n → ℝ) → ℝ := fun y => f (e.symm y)
let F : (Fin n → ℝ) → EReal := fun y => (fFin y : EReal)
IsEuclideanSubgradientAt (fenchelConjugate n F) (e (gradient f x)) (e x)
Helper for Lemma 26.7: a bounded set stays bounded under a continuous linear map.
lemma helperForLemma_26_7_boundedImage_of_boundedSet_underContinuousLinearMap
{E F : Type*}
[NormedAddCommGroup E] [NormedSpace ℝ E]
[NormedAddCommGroup F] [NormedSpace ℝ F]
(L : E →L[ℝ] F) {s : Set E} (hs : Bornology.IsBounded s) :
Bornology.IsBounded (L '' s)
Helper for Lemma 26.7: a convergent sequence in a metric space has bounded range.
lemma helperForLemma_26_7_boundedRange_of_tendsto
{X : Type*} [PseudoMetricSpace X] {u : ℕ → X} {x : X}
(hu : Filter.Tendsto u Filter.atTop (nhds x)) :
Bornology.IsBounded (Set.range u)
Helper for Lemma 26.7: if the range of a sequence in a normed space is unbounded, then one can extract a subsequence whose norms dominate the index.
lemma helperForLemma_26_7_extraction_of_unboundedRange
{E : Type*} [NormedAddCommGroup E] [NormedSpace ℝ E] {u : ℕ → E}
(hu : ¬ Bornology.IsBounded (Set.range u)) :
∃ φ : ℕ → ℕ, StrictMono φ ∧ ∀ k : ℕ, (k : ℝ) ≤ ‖u (φ k)‖
Helper for Lemma 26.7: bounded dual values force bounded primal witness ranges for Fenchel subgradients.
lemma helperForLemma_26_7_boundedPrimalWitnessRange_of_boundedDualValues
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(hSeq :
∀ xSeq : ℕ → EuclideanSpace ℝ (Fin n),
Filter.Tendsto (fun i : ℕ => ‖xSeq i‖) Filter.atTop Filter.atTop →
Filter.Tendsto (fun i : ℕ => ‖gradient f (xSeq i)‖) Filter.atTop Filter.atTop)
(xStarSeq xSeq : ℕ → Fin n → ℝ) :
let e : EuclideanSpace ℝ (Fin n) ≃L[ℝ] (Fin n → ℝ) := EuclideanSpace.equiv (Fin n) ℝ
let fFin : (Fin n → ℝ) → ℝ := fun y => f (e.symm y)
let F : (Fin n → ℝ) → EReal := fun y => (fFin y : EReal)
Bornology.IsBounded (Set.range xStarSeq) →
(∀ i : ℕ, IsEuclideanSubgradientAt (fenchelConjugate n F) (xStarSeq i) (xSeq i)) →
Bornology.IsBounded (Set.range xSeq)
Helper for Lemma 26.7: co-finiteness makes the dual effective domain equal to all of ℝⁿ, so bounded dual values force bounded primal witness ranges for Fenchel subgradients.
lemma helperForLemma_26_7_boundedPrimalWitnessRange_of_boundedDualValues_of_cofinite
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(xStarSeq xSeq : ℕ → Fin n → ℝ) :
let e : EuclideanSpace ℝ (Fin n) ≃L[ℝ] (Fin n → ℝ) := EuclideanSpace.equiv (Fin n) ℝ
let fFin : (Fin n → ℝ) → ℝ := fun y => f (e.symm y)
let F : (Fin n → ℝ) → EReal := fun y => (fFin y : EReal)
IsCofiniteFiniteConvexFunction fFin →
Bornology.IsBounded (Set.range xStarSeq) →
(∀ i : ℕ, IsEuclideanSubgradientAt (fenchelConjugate n F) (xStarSeq i) (xSeq i)) →
Bornology.IsBounded (Set.range xSeq)
Helper for Lemma 26.7: if gradient norms blow up along every escaping primal sequence, then the effective domain of the dual subdifferential is closed.
lemma helperForLemma_26_7_dualSubdifferentialEffectiveDomain_isClosed_of_gradientNormBlowup
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(hSeq :
∀ xSeq : ℕ → EuclideanSpace ℝ (Fin n),
Filter.Tendsto (fun i : ℕ => ‖xSeq i‖) Filter.atTop Filter.atTop →
Filter.Tendsto (fun i : ℕ => ‖gradient f (xSeq i)‖) Filter.atTop Filter.atTop) :
let e : EuclideanSpace ℝ (Fin n) ≃L[ℝ] (Fin n → ℝ) := EuclideanSpace.equiv (Fin n) ℝ
let fFin : (Fin n → ℝ) → ℝ := fun y => f (e.symm y)
let F : (Fin n → ℝ) → EReal := fun y => (fFin y : EReal)
IsClosed (subdifferentialEffectiveDomain (fenchelConjugate n F))
Helper for Lemma 26.7: under the sequencewise gradient blow-up hypothesis, the effective domain of the dual subdifferential is exactly the interior of the effective domain of the Fenchel conjugate.
lemma helperForLemma_26_7_dualSubdifferentialEffectiveDomain_eq_interior_of_gradientNormBlowup
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(hSeq :
∀ xSeq : ℕ → EuclideanSpace ℝ (Fin n),
Filter.Tendsto (fun i : ℕ => ‖xSeq i‖) Filter.atTop Filter.atTop →
Filter.Tendsto (fun i : ℕ => ‖gradient f (xSeq i)‖) Filter.atTop Filter.atTop) :
let e : EuclideanSpace ℝ (Fin n) ≃L[ℝ] (Fin n → ℝ) := EuclideanSpace.equiv (Fin n) ℝ
let fFin : (Fin n → ℝ) → ℝ := fun y => f (e.symm y)
let F : (Fin n → ℝ) → EReal := fun y => (fFin y : EReal)
subdifferentialEffectiveDomain (fenchelConjugate n F) =
interior (effectiveDomain (Set.univ : Set (Fin n → ℝ)) (fenchelConjugate n F))
Helper for Lemma 26.7: the sequencewise gradient blow-up hypothesis forces the Fenchel conjugate of the coordinate lift to be finite everywhere, hence the coordinate lift is co-finite.
lemma helperForLemma_26_7_cofinite_of_gradientNormBlowup
{n : ℕ} (f : EuclideanSpace ℝ (Fin n) → ℝ)
(hf_convex : ConvexOn ℝ (Set.univ : Set (EuclideanSpace ℝ (Fin n))) f)
(hf_differentiable : Differentiable ℝ f)
(hSeq :
∀ xSeq : ℕ → EuclideanSpace ℝ (Fin n),
Filter.Tendsto (fun i : ℕ => ‖xSeq i‖) Filter.atTop Filter.atTop →
Filter.Tendsto (fun i : ℕ => ‖gradient f (xSeq i)‖) Filter.atTop Filter.atTop) :
let e : EuclideanSpace ℝ (Fin n) ≃L[ℝ] (Fin n → ℝ) := EuclideanSpace.equiv (Fin n) ℝ
let fFin : (Fin n → ℝ) → ℝ := fun x => f (e.symm x)
let F : (Fin n → ℝ) → EReal := fun x => (fFin x : EReal)
IsCofiniteFiniteConvexFunction fFin