mathlib3 documentation

analysis.convex.slope

Slopes of convex functions #

THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.

This file relates convexity/concavity of functions in a linearly ordered field and the monotonicity of their slopes.

The main use is to show convexity/concavity from monotonicity of the derivative.

theorem convex_on.slope_mono_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : convex_on 𝕜 s f) {x y z : 𝕜} (hx : x s) (hz : z s) (hxy : x < y) (hyz : y < z) :
(f y - f x) / (y - x) (f z - f y) / (z - y)

If f : 𝕜 → 𝕜 is convex, then for any three points x < y < z the slope of the secant line of f on [x, y] is less than the slope of the secant line of f on [x, z].

theorem concave_on.slope_anti_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : concave_on 𝕜 s f) {x y z : 𝕜} (hx : x s) (hz : z s) (hxy : x < y) (hyz : y < z) :
(f z - f y) / (z - y) (f y - f x) / (y - x)

If f : 𝕜 → 𝕜 is concave, then for any three points x < y < z the slope of the secant line of f on [x, y] is greater than the slope of the secant line of f on [x, z].

theorem strict_convex_on.slope_strict_mono_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : strict_convex_on 𝕜 s f) {x y z : 𝕜} (hx : x s) (hz : z s) (hxy : x < y) (hyz : y < z) :
(f y - f x) / (y - x) < (f z - f y) / (z - y)

If f : 𝕜 → 𝕜 is strictly convex, then for any three points x < y < z the slope of the secant line of f on [x, y] is strictly less than the slope of the secant line of f on [x, z].

theorem strict_concave_on.slope_anti_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : strict_concave_on 𝕜 s f) {x y z : 𝕜} (hx : x s) (hz : z s) (hxy : x < y) (hyz : y < z) :
(f z - f y) / (z - y) < (f y - f x) / (y - x)

If f : 𝕜 → 𝕜 is strictly concave, then for any three points x < y < z the slope of the secant line of f on [x, y] is strictly greater than the slope of the secant line of f on [x, z].

theorem convex_on_of_slope_mono_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hs : convex 𝕜 s) (hf : {x y z : 𝕜}, x s z s x < y y < z (f y - f x) / (y - x) (f z - f y) / (z - y)) :
convex_on 𝕜 s f

If for any three points x < y < z, the slope of the secant line of f : 𝕜 → 𝕜 on [x, y] is less than the slope of the secant line of f on [x, z], then f is convex.

theorem concave_on_of_slope_anti_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hs : convex 𝕜 s) (hf : {x y z : 𝕜}, x s z s x < y y < z (f z - f y) / (z - y) (f y - f x) / (y - x)) :
concave_on 𝕜 s f

If for any three points x < y < z, the slope of the secant line of f : 𝕜 → 𝕜 on [x, y] is greater than the slope of the secant line of f on [x, z], then f is concave.

theorem strict_convex_on_of_slope_strict_mono_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hs : convex 𝕜 s) (hf : {x y z : 𝕜}, x s z s x < y y < z (f y - f x) / (y - x) < (f z - f y) / (z - y)) :

If for any three points x < y < z, the slope of the secant line of f : 𝕜 → 𝕜 on [x, y] is strictly less than the slope of the secant line of f on [x, z], then f is strictly convex.

theorem strict_concave_on_of_slope_strict_anti_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hs : convex 𝕜 s) (hf : {x y z : 𝕜}, x s z s x < y y < z (f z - f y) / (z - y) < (f y - f x) / (y - x)) :

If for any three points x < y < z, the slope of the secant line of f : 𝕜 → 𝕜 on [x, y] is strictly greater than the slope of the secant line of f on [x, z], then f is strictly concave.

theorem convex_on_iff_slope_mono_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} :
convex_on 𝕜 s f convex 𝕜 s ⦃x y z : 𝕜⦄, x s z s x < y y < z (f y - f x) / (y - x) (f z - f y) / (z - y)

A function f : 𝕜 → 𝕜 is convex iff for any three points x < y < z the slope of the secant line of f on [x, y] is less than the slope of the secant line of f on [x, z].

theorem concave_on_iff_slope_anti_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} :
concave_on 𝕜 s f convex 𝕜 s ⦃x y z : 𝕜⦄, x s z s x < y y < z (f z - f y) / (z - y) (f y - f x) / (y - x)

A function f : 𝕜 → 𝕜 is concave iff for any three points x < y < z the slope of the secant line of f on [x, y] is greater than the slope of the secant line of f on [x, z].

theorem strict_convex_on_iff_slope_strict_mono_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} :
strict_convex_on 𝕜 s f convex 𝕜 s ⦃x y z : 𝕜⦄, x s z s x < y y < z (f y - f x) / (y - x) < (f z - f y) / (z - y)

A function f : 𝕜 → 𝕜 is strictly convex iff for any three points x < y < z the slope of the secant line of f on [x, y] is strictly less than the slope of the secant line of f on [x, z].

theorem strict_concave_on_iff_slope_strict_anti_adjacent {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} :
strict_concave_on 𝕜 s f convex 𝕜 s ⦃x y z : 𝕜⦄, x s z s x < y y < z (f z - f y) / (z - y) < (f y - f x) / (y - x)

A function f : 𝕜 → 𝕜 is strictly concave iff for any three points x < y < z the slope of the secant line of f on [x, y] is strictly greater than the slope of the secant line of f on [x, z].

theorem convex_on.secant_mono_aux1 {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : convex_on 𝕜 s f) {x y z : 𝕜} (hx : x s) (hz : z s) (hxy : x < y) (hyz : y < z) :
(z - x) * f y (z - y) * f x + (y - x) * f z
theorem convex_on.secant_mono_aux2 {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : convex_on 𝕜 s f) {x y z : 𝕜} (hx : x s) (hz : z s) (hxy : x < y) (hyz : y < z) :
(f y - f x) / (y - x) (f z - f x) / (z - x)
theorem convex_on.secant_mono_aux3 {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : convex_on 𝕜 s f) {x y z : 𝕜} (hx : x s) (hz : z s) (hxy : x < y) (hyz : y < z) :
(f z - f x) / (z - x) (f z - f y) / (z - y)
theorem convex_on.secant_mono {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : convex_on 𝕜 s f) {a x y : 𝕜} (ha : a s) (hx : x s) (hy : y s) (hxa : x a) (hya : y a) (hxy : x y) :
(f x - f a) / (x - a) (f y - f a) / (y - a)
theorem strict_convex_on.secant_strict_mono_aux1 {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : strict_convex_on 𝕜 s f) {x y z : 𝕜} (hx : x s) (hz : z s) (hxy : x < y) (hyz : y < z) :
(z - x) * f y < (z - y) * f x + (y - x) * f z
theorem strict_convex_on.secant_strict_mono_aux2 {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : strict_convex_on 𝕜 s f) {x y z : 𝕜} (hx : x s) (hz : z s) (hxy : x < y) (hyz : y < z) :
(f y - f x) / (y - x) < (f z - f x) / (z - x)
theorem strict_convex_on.secant_strict_mono_aux3 {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : strict_convex_on 𝕜 s f) {x y z : 𝕜} (hx : x s) (hz : z s) (hxy : x < y) (hyz : y < z) :
(f z - f x) / (z - x) < (f z - f y) / (z - y)
theorem strict_convex_on.secant_strict_mono {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : strict_convex_on 𝕜 s f) {a x y : 𝕜} (ha : a s) (hx : x s) (hy : y s) (hxa : x a) (hya : y a) (hxy : x < y) :
(f x - f a) / (x - a) < (f y - f a) / (y - a)
theorem strict_concave_on.secant_strict_mono {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : strict_concave_on 𝕜 s f) {a x y : 𝕜} (ha : a s) (hx : x s) (hy : y s) (hxa : x a) (hya : y a) (hxy : x < y) :
(f y - f a) / (y - a) < (f x - f a) / (x - a)
theorem convex_on.strict_mono_of_lt {𝕜 : Type u_1} [linear_ordered_field 𝕜] {s : set 𝕜} {f : 𝕜 𝕜} (hf : convex_on 𝕜 s f) {x y : 𝕜} (hx : x s) (hxy : x < y) (hxy' : f x < f y) :

If f is convex on a set s in a linearly ordered field, and f x < f y for two points x < y in s, then f is strictly monotone on s ∩ [y, ∞).