Documentation

Mathlib.Analysis.Convex.Deriv

Convexity of functions and derivatives #

Here we relate convexity of functions ℝ → ℝ to properties of their derivatives.

Main results #

theorem MonotoneOn.convexOn_of_deriv {D : Set } (hD : Convex D) {f : } (hf : ContinuousOn f D) (hf' : DifferentiableOn f (interior D)) (hf'_mono : MonotoneOn (deriv f) (interior D)) :

If a function f is continuous on a convex set D ⊆ ℝ, is differentiable on its interior, and f' is monotone on the interior, then f is convex on D.

theorem AntitoneOn.concaveOn_of_deriv {D : Set } (hD : Convex D) {f : } (hf : ContinuousOn f D) (hf' : DifferentiableOn f (interior D)) (h_anti : AntitoneOn (deriv f) (interior D)) :

If a function f is continuous on a convex set D ⊆ ℝ, is differentiable on its interior, and f' is antitone on the interior, then f is concave on D.

theorem StrictMonoOn.exists_slope_lt_deriv_aux {x : } {y : } {f : } (hf : ContinuousOn f (Set.Icc x y)) (hxy : x < y) (hf'_mono : StrictMonoOn (deriv f) (Set.Ioo x y)) (h : wSet.Ioo x y, deriv f w 0) :
∃ a ∈ Set.Ioo x y, (f y - f x) / (y - x) < deriv f a
theorem StrictMonoOn.exists_slope_lt_deriv {x : } {y : } {f : } (hf : ContinuousOn f (Set.Icc x y)) (hxy : x < y) (hf'_mono : StrictMonoOn (deriv f) (Set.Ioo x y)) :
∃ a ∈ Set.Ioo x y, (f y - f x) / (y - x) < deriv f a
theorem StrictMonoOn.exists_deriv_lt_slope_aux {x : } {y : } {f : } (hf : ContinuousOn f (Set.Icc x y)) (hxy : x < y) (hf'_mono : StrictMonoOn (deriv f) (Set.Ioo x y)) (h : wSet.Ioo x y, deriv f w 0) :
∃ a ∈ Set.Ioo x y, deriv f a < (f y - f x) / (y - x)
theorem StrictMonoOn.exists_deriv_lt_slope {x : } {y : } {f : } (hf : ContinuousOn f (Set.Icc x y)) (hxy : x < y) (hf'_mono : StrictMonoOn (deriv f) (Set.Ioo x y)) :
∃ a ∈ Set.Ioo x y, deriv f a < (f y - f x) / (y - x)
theorem StrictMonoOn.strictConvexOn_of_deriv {D : Set } (hD : Convex D) {f : } (hf : ContinuousOn f D) (hf' : StrictMonoOn (deriv f) (interior D)) :

If a function f is continuous on a convex set D ⊆ ℝ, and f' is strictly monotone on the interior, then f is strictly convex on D. Note that we don't require differentiability, since it is guaranteed at all but at most one point by the strict monotonicity of f'.

theorem StrictAntiOn.strictConcaveOn_of_deriv {D : Set } (hD : Convex D) {f : } (hf : ContinuousOn f D) (h_anti : StrictAntiOn (deriv f) (interior D)) :

If a function f is continuous on a convex set D ⊆ ℝ and f' is strictly antitone on the interior, then f is strictly concave on D. Note that we don't require differentiability, since it is guaranteed at all but at most one point by the strict antitonicity of f'.

theorem Monotone.convexOn_univ_of_deriv {f : } (hf : Differentiable f) (hf'_mono : Monotone (deriv f)) :
ConvexOn Set.univ f

If a function f is differentiable and f' is monotone on then f is convex.

theorem Antitone.concaveOn_univ_of_deriv {f : } (hf : Differentiable f) (hf'_anti : Antitone (deriv f)) :
ConcaveOn Set.univ f

If a function f is differentiable and f' is antitone on then f is concave.

theorem StrictMono.strictConvexOn_univ_of_deriv {f : } (hf : Continuous f) (hf'_mono : StrictMono (deriv f)) :
StrictConvexOn Set.univ f

If a function f is continuous and f' is strictly monotone on then f is strictly convex. Note that we don't require differentiability, since it is guaranteed at all but at most one point by the strict monotonicity of f'.

theorem StrictAnti.strictConcaveOn_univ_of_deriv {f : } (hf : Continuous f) (hf'_anti : StrictAnti (deriv f)) :
StrictConcaveOn Set.univ f

If a function f is continuous and f' is strictly antitone on then f is strictly concave. Note that we don't require differentiability, since it is guaranteed at all but at most one point by the strict antitonicity of f'.

theorem convexOn_of_deriv2_nonneg {D : Set } (hD : Convex D) {f : } (hf : ContinuousOn f D) (hf' : DifferentiableOn f (interior D)) (hf'' : DifferentiableOn (deriv f) (interior D)) (hf''_nonneg : xinterior D, 0 deriv^[2] f x) :

If a function f is continuous on a convex set D ⊆ ℝ, is twice differentiable on its interior, and f'' is nonnegative on the interior, then f is convex on D.

theorem concaveOn_of_deriv2_nonpos {D : Set } (hD : Convex D) {f : } (hf : ContinuousOn f D) (hf' : DifferentiableOn f (interior D)) (hf'' : DifferentiableOn (deriv f) (interior D)) (hf''_nonpos : xinterior D, deriv^[2] f x 0) :

If a function f is continuous on a convex set D ⊆ ℝ, is twice differentiable on its interior, and f'' is nonpositive on the interior, then f is concave on D.

theorem convexOn_of_hasDerivWithinAt2_nonneg {D : Set } (hD : Convex D) {f : } {f' : } {f'' : } (hf : ContinuousOn f D) (hf' : xinterior D, HasDerivWithinAt f (f' x) (interior D) x) (hf'' : xinterior D, HasDerivWithinAt f' (f'' x) (interior D) x) (hf''₀ : xinterior D, 0 f'' x) :

If a function f is continuous on a convex set D ⊆ ℝ, is twice differentiable on its interior, and f'' is nonnegative on the interior, then f is convex on D.

theorem concaveOn_of_hasDerivWithinAt2_nonpos {D : Set } (hD : Convex D) {f : } {f' : } {f'' : } (hf : ContinuousOn f D) (hf' : xinterior D, HasDerivWithinAt f (f' x) (interior D) x) (hf'' : xinterior D, HasDerivWithinAt f' (f'' x) (interior D) x) (hf''₀ : xinterior D, f'' x 0) :

If a function f is continuous on a convex set D ⊆ ℝ, is twice differentiable on its interior, and f'' is nonpositive on the interior, then f is concave on D.

theorem strictConvexOn_of_deriv2_pos {D : Set } (hD : Convex D) {f : } (hf : ContinuousOn f D) (hf'' : xinterior D, 0 < deriv^[2] f x) :

If a function f is continuous on a convex set D ⊆ ℝ and f'' is strictly positive on the interior, then f is strictly convex on D. Note that we don't require twice differentiability explicitly as it is already implied by the second derivative being strictly positive, except at at most one point.

theorem strictConcaveOn_of_deriv2_neg {D : Set } (hD : Convex D) {f : } (hf : ContinuousOn f D) (hf'' : xinterior D, deriv^[2] f x < 0) :

If a function f is continuous on a convex set D ⊆ ℝ and f'' is strictly negative on the interior, then f is strictly concave on D. Note that we don't require twice differentiability explicitly as it already implied by the second derivative being strictly negative, except at at most one point.

theorem convexOn_of_deriv2_nonneg' {D : Set } (hD : Convex D) {f : } (hf' : DifferentiableOn f D) (hf'' : DifferentiableOn (deriv f) D) (hf''_nonneg : xD, 0 deriv^[2] f x) :

If a function f is twice differentiable on an open convex set D ⊆ ℝ and f'' is nonnegative on D, then f is convex on D.

theorem concaveOn_of_deriv2_nonpos' {D : Set } (hD : Convex D) {f : } (hf' : DifferentiableOn f D) (hf'' : DifferentiableOn (deriv f) D) (hf''_nonpos : xD, deriv^[2] f x 0) :

If a function f is twice differentiable on an open convex set D ⊆ ℝ and f'' is nonpositive on D, then f is concave on D.

theorem strictConvexOn_of_deriv2_pos' {D : Set } (hD : Convex D) {f : } (hf : ContinuousOn f D) (hf'' : xD, 0 < deriv^[2] f x) :

If a function f is continuous on a convex set D ⊆ ℝ and f'' is strictly positive on D, then f is strictly convex on D. Note that we don't require twice differentiability explicitly as it is already implied by the second derivative being strictly positive, except at at most one point.

theorem strictConcaveOn_of_deriv2_neg' {D : Set } (hD : Convex D) {f : } (hf : ContinuousOn f D) (hf'' : xD, deriv^[2] f x < 0) :

If a function f is continuous on a convex set D ⊆ ℝ and f'' is strictly negative on D, then f is strictly concave on D. Note that we don't require twice differentiability explicitly as it is already implied by the second derivative being strictly negative, except at at most one point.

theorem convexOn_univ_of_deriv2_nonneg {f : } (hf' : Differentiable f) (hf'' : Differentiable (deriv f)) (hf''_nonneg : ∀ (x : ), 0 deriv^[2] f x) :
ConvexOn Set.univ f

If a function f is twice differentiable on , and f'' is nonnegative on , then f is convex on .

theorem concaveOn_univ_of_deriv2_nonpos {f : } (hf' : Differentiable f) (hf'' : Differentiable (deriv f)) (hf''_nonpos : ∀ (x : ), deriv^[2] f x 0) :
ConcaveOn Set.univ f

If a function f is twice differentiable on , and f'' is nonpositive on , then f is concave on .

theorem strictConvexOn_univ_of_deriv2_pos {f : } (hf : Continuous f) (hf'' : ∀ (x : ), 0 < deriv^[2] f x) :
StrictConvexOn Set.univ f

If a function f is continuous on , and f'' is strictly positive on , then f is strictly convex on . Note that we don't require twice differentiability explicitly as it is already implied by the second derivative being strictly positive, except at at most one point.

theorem strictConcaveOn_univ_of_deriv2_neg {f : } (hf : Continuous f) (hf'' : ∀ (x : ), deriv^[2] f x < 0) :
StrictConcaveOn Set.univ f

If a function f is continuous on , and f'' is strictly negative on , then f is strictly concave on . Note that we don't require twice differentiability explicitly as it is already implied by the second derivative being strictly negative, except at at most one point.