mathlib3 documentation

analysis.convex.function

Convex and concave functions #

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

This file defines convex and concave functions in vector spaces and proves the finite Jensen inequality. The integral version can be found in analysis.convex.integral.

A function f : E → β is convex_on a set s if s is itself a convex set, and for any two points x y ∈ s, the segment joining (x, f x) to (y, f y) is above the graph of f. Equivalently, convex_on š•œ f s means that the epigraph {p : E Ɨ β | p.1 ∈ s ∧ f p.1 ≤ p.2} is a convex set.

Main declarations #

def convex_on (š•œ : Type u_1) {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] (s : set E) (f : E → β) :
Prop

Convexity of functions

Equations
def concave_on (š•œ : Type u_1) {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] (s : set E) (f : E → β) :
Prop

Concavity of functions

Equations
def strict_convex_on (š•œ : Type u_1) {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] (s : set E) (f : E → β) :
Prop

Strict convexity of functions

Equations
def strict_concave_on (š•œ : Type u_1) {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] (s : set E) (f : E → β) :
Prop

Strict concavity of functions

Equations
theorem convex_on.dual {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) :
theorem concave_on.dual {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) :
theorem strict_convex_on.dual {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : strict_convex_on š•œ s f) :
theorem strict_concave_on.dual {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : strict_concave_on š•œ s f) :
theorem convex_on_id {š•œ : Type u_1} {β : Type u_5} [ordered_semiring š•œ] [ordered_add_comm_monoid β] [has_smul š•œ β] {s : set β} (hs : convex š•œ s) :
convex_on š•œ s id
theorem concave_on_id {š•œ : Type u_1} {β : Type u_5} [ordered_semiring š•œ] [ordered_add_comm_monoid β] [has_smul š•œ β] {s : set β} (hs : convex š•œ s) :
concave_on š•œ s id
theorem convex_on.subset {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} {t : set E} (hf : convex_on š•œ t f) (hst : s āŠ† t) (hs : convex š•œ s) :
convex_on š•œ s f
theorem concave_on.subset {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} {t : set E} (hf : concave_on š•œ t f) (hst : s āŠ† t) (hs : convex š•œ s) :
concave_on š•œ s f
theorem strict_convex_on.subset {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} {t : set E} (hf : strict_convex_on š•œ t f) (hst : s āŠ† t) (hs : convex š•œ s) :
strict_convex_on š•œ s f
theorem strict_concave_on.subset {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} {t : set E} (hf : strict_concave_on š•œ t f) (hst : s āŠ† t) (hs : convex š•œ s) :
strict_concave_on š•œ s f
theorem convex_on.comp {š•œ : Type u_1} {E : Type u_2} {α : Type u_4} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid α] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ α] [has_smul š•œ β] {s : set E} {f : E → β} {g : β → α} (hg : convex_on š•œ (f '' s) g) (hf : convex_on š•œ s f) (hg' : monotone_on g (f '' s)) :
convex_on š•œ s (g ∘ f)
theorem concave_on.comp {š•œ : Type u_1} {E : Type u_2} {α : Type u_4} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid α] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ α] [has_smul š•œ β] {s : set E} {f : E → β} {g : β → α} (hg : concave_on š•œ (f '' s) g) (hf : concave_on š•œ s f) (hg' : monotone_on g (f '' s)) :
concave_on š•œ s (g ∘ f)
theorem convex_on.comp_concave_on {š•œ : Type u_1} {E : Type u_2} {α : Type u_4} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid α] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ α] [has_smul š•œ β] {s : set E} {f : E → β} {g : β → α} (hg : convex_on š•œ (f '' s) g) (hf : concave_on š•œ s f) (hg' : antitone_on g (f '' s)) :
convex_on š•œ s (g ∘ f)
theorem concave_on.comp_convex_on {š•œ : Type u_1} {E : Type u_2} {α : Type u_4} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid α] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ α] [has_smul š•œ β] {s : set E} {f : E → β} {g : β → α} (hg : concave_on š•œ (f '' s) g) (hf : convex_on š•œ s f) (hg' : antitone_on g (f '' s)) :
concave_on š•œ s (g ∘ f)
theorem strict_convex_on.comp {š•œ : Type u_1} {E : Type u_2} {α : Type u_4} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid α] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ α] [has_smul š•œ β] {s : set E} {f : E → β} {g : β → α} (hg : strict_convex_on š•œ (f '' s) g) (hf : strict_convex_on š•œ s f) (hg' : strict_mono_on g (f '' s)) (hf' : set.inj_on f s) :
strict_convex_on š•œ s (g ∘ f)
theorem strict_concave_on.comp {š•œ : Type u_1} {E : Type u_2} {α : Type u_4} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid α] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ α] [has_smul š•œ β] {s : set E} {f : E → β} {g : β → α} (hg : strict_concave_on š•œ (f '' s) g) (hf : strict_concave_on š•œ s f) (hg' : strict_mono_on g (f '' s)) (hf' : set.inj_on f s) :
strict_concave_on š•œ s (g ∘ f)
theorem strict_convex_on.comp_strict_concave_on {š•œ : Type u_1} {E : Type u_2} {α : Type u_4} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid α] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ α] [has_smul š•œ β] {s : set E} {f : E → β} {g : β → α} (hg : strict_convex_on š•œ (f '' s) g) (hf : strict_concave_on š•œ s f) (hg' : strict_anti_on g (f '' s)) (hf' : set.inj_on f s) :
strict_convex_on š•œ s (g ∘ f)
theorem strict_concave_on.comp_strict_convex_on {š•œ : Type u_1} {E : Type u_2} {α : Type u_4} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid α] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ α] [has_smul š•œ β] {s : set E} {f : E → β} {g : β → α} (hg : strict_concave_on š•œ (f '' s) g) (hf : strict_convex_on š•œ s f) (hg' : strict_anti_on g (f '' s)) (hf' : set.inj_on f s) :
strict_concave_on š•œ s (g ∘ f)
theorem convex_on.add {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [distrib_mul_action š•œ β] {s : set E} {f g : E → β} (hf : convex_on š•œ s f) (hg : convex_on š•œ s g) :
convex_on š•œ s (f + g)
theorem concave_on.add {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [distrib_mul_action š•œ β] {s : set E} {f g : E → β} (hf : concave_on š•œ s f) (hg : concave_on š•œ s g) :
concave_on š•œ s (f + g)
theorem convex_on_const {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] {s : set E} (c : β) (hs : convex š•œ s) :
convex_on š•œ s (Ī» (x : E), c)
theorem concave_on_const {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] {s : set E} (c : β) (hs : convex š•œ s) :
concave_on š•œ s (Ī» (x : E), c)
theorem convex_on_of_convex_epigraph {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] {s : set E} {f : E → β} (h : convex š•œ {p : E Ɨ β | p.fst ∈ s ∧ f p.fst ≤ p.snd}) :
convex_on š•œ s f
theorem concave_on_of_convex_hypograph {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] {s : set E} {f : E → β} (h : convex š•œ {p : E Ɨ β | p.fst ∈ s ∧ p.snd ≤ f p.fst}) :
concave_on š•œ s f
theorem convex_on.convex_le {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) (r : β) :
convex š•œ {x ∈ s | f x ≤ r}
theorem concave_on.convex_ge {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) (r : β) :
convex š•œ {x ∈ s | r ≤ f x}
theorem convex_on.convex_epigraph {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) :
convex š•œ {p : E Ɨ β | p.fst ∈ s ∧ f p.fst ≤ p.snd}
theorem concave_on.convex_hypograph {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) :
convex š•œ {p : E Ɨ β | p.fst ∈ s ∧ p.snd ≤ f p.fst}
theorem convex_on_iff_convex_epigraph {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} :
convex_on š•œ s f ↔ convex š•œ {p : E Ɨ β | p.fst ∈ s ∧ f p.fst ≤ p.snd}
theorem concave_on_iff_convex_hypograph {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} :
concave_on š•œ s f ↔ convex š•œ {p : E Ɨ β | p.fst ∈ s ∧ p.snd ≤ f p.fst}
theorem convex_on.translate_right {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) (c : E) :
convex_on š•œ ((Ī» (z : E), c + z) ⁻¹' s) (f ∘ Ī» (z : E), c + z)

Right translation preserves convexity.

theorem concave_on.translate_right {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) (c : E) :
concave_on š•œ ((Ī» (z : E), c + z) ⁻¹' s) (f ∘ Ī» (z : E), c + z)

Right translation preserves concavity.

theorem convex_on.translate_left {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) (c : E) :
convex_on š•œ ((Ī» (z : E), c + z) ⁻¹' s) (f ∘ Ī» (z : E), z + c)

Left translation preserves convexity.

theorem concave_on.translate_left {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) (c : E) :
concave_on š•œ ((Ī» (z : E), c + z) ⁻¹' s) (f ∘ Ī» (z : E), z + c)

Left translation preserves concavity.

theorem convex_on_iff_forall_pos {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] {s : set E} {f : E → β} :
convex_on š•œ s f ↔ convex š•œ s ∧ āˆ€ ⦃x : E⦄, x ∈ s → āˆ€ ⦃y : E⦄, y ∈ s → āˆ€ ⦃a b : š•œā¦„, 0 < a → 0 < b → a + b = 1 → f (a • x + b • y) ≤ a • f x + b • f y
theorem concave_on_iff_forall_pos {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] {s : set E} {f : E → β} :
concave_on š•œ s f ↔ convex š•œ s ∧ āˆ€ ⦃x : E⦄, x ∈ s → āˆ€ ⦃y : E⦄, y ∈ s → āˆ€ ⦃a b : š•œā¦„, 0 < a → 0 < b → a + b = 1 → a • f x + b • f y ≤ f (a • x + b • y)
theorem convex_on_iff_pairwise_pos {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] {s : set E} {f : E → β} :
convex_on š•œ s f ↔ convex š•œ s ∧ s.pairwise (Ī» (x y : E), āˆ€ ⦃a b : š•œā¦„, 0 < a → 0 < b → a + b = 1 → f (a • x + b • y) ≤ a • f x + b • f y)
theorem concave_on_iff_pairwise_pos {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] {s : set E} {f : E → β} :
concave_on š•œ s f ↔ convex š•œ s ∧ s.pairwise (Ī» (x y : E), āˆ€ ⦃a b : š•œā¦„, 0 < a → 0 < b → a + b = 1 → a • f x + b • f y ≤ f (a • x + b • y))
theorem linear_map.convex_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] (f : E →ₗ[š•œ] β) {s : set E} (hs : convex š•œ s) :
convex_on š•œ s ⇑f

A linear map is convex.

theorem linear_map.concave_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] (f : E →ₗ[š•œ] β) {s : set E} (hs : convex š•œ s) :
concave_on š•œ s ⇑f

A linear map is concave.

theorem strict_convex_on.convex_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] {s : set E} {f : E → β} (hf : strict_convex_on š•œ s f) :
convex_on š•œ s f
theorem strict_concave_on.concave_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] {s : set E} {f : E → β} (hf : strict_concave_on š•œ s f) :
concave_on š•œ s f
theorem strict_convex_on.convex_lt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : strict_convex_on š•œ s f) (r : β) :
convex š•œ {x ∈ s | f x < r}
theorem strict_concave_on.convex_gt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : strict_concave_on š•œ s f) (r : β) :
convex š•œ {x ∈ s | r < f x}
theorem linear_order.convex_on_of_lt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] [linear_order E] {s : set E} {f : E → β} (hs : convex š•œ s) (hf : āˆ€ ⦃x : E⦄, x ∈ s → āˆ€ ⦃y : E⦄, y ∈ s → x < y → āˆ€ ⦃a b : š•œā¦„, 0 < a → 0 < b → a + b = 1 → f (a • x + b • y) ≤ a • f x + b • f y) :
convex_on š•œ s f

For a function on a convex set in a linearly ordered space (where the order and the algebraic structures aren't necessarily compatible), in order to prove that it is convex, it suffices to verify the inequality f (a • x + b • y) ≤ a • f x + b • f y only for x < y and positive a, b. The main use case is E = š•œ however one can apply it, e.g., to š•œ^n with lexicographic order.

theorem linear_order.concave_on_of_lt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] [linear_order E] {s : set E} {f : E → β} (hs : convex š•œ s) (hf : āˆ€ ⦃x : E⦄, x ∈ s → āˆ€ ⦃y : E⦄, y ∈ s → x < y → āˆ€ ⦃a b : š•œā¦„, 0 < a → 0 < b → a + b = 1 → a • f x + b • f y ≤ f (a • x + b • y)) :
concave_on š•œ s f

For a function on a convex set in a linearly ordered space (where the order and the algebraic structures aren't necessarily compatible), in order to prove that it is concave it suffices to verify the inequality a • f x + b • f y ≤ f (a • x + b • y) for x < y and positive a, b. The main use case is E = ā„ however one can apply it, e.g., to ā„^n with lexicographic order.

theorem linear_order.strict_convex_on_of_lt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] [linear_order E] {s : set E} {f : E → β} (hs : convex š•œ s) (hf : āˆ€ ⦃x : E⦄, x ∈ s → āˆ€ ⦃y : E⦄, y ∈ s → x < y → āˆ€ ⦃a b : š•œā¦„, 0 < a → 0 < b → a + b = 1 → f (a • x + b • y) < a • f x + b • f y) :
strict_convex_on š•œ s f

For a function on a convex set in a linearly ordered space (where the order and the algebraic structures aren't necessarily compatible), in order to prove that it is strictly convex, it suffices to verify the inequality f (a • x + b • y) < a • f x + b • f y for x < y and positive a, b. The main use case is E = š•œ however one can apply it, e.g., to š•œ^n with lexicographic order.

theorem linear_order.strict_concave_on_of_lt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ β] [linear_order E] {s : set E} {f : E → β} (hs : convex š•œ s) (hf : āˆ€ ⦃x : E⦄, x ∈ s → āˆ€ ⦃y : E⦄, y ∈ s → x < y → āˆ€ ⦃a b : š•œā¦„, 0 < a → 0 < b → a + b = 1 → a • f x + b • f y < f (a • x + b • y)) :
strict_concave_on š•œ s f

For a function on a convex set in a linearly ordered space (where the order and the algebraic structures aren't necessarily compatible), in order to prove that it is strictly concave it suffices to verify the inequality a • f x + b • f y < f (a • x + b • y) for x < y and positive a, b. The main use case is E = š•œ however one can apply it, e.g., to š•œ^n with lexicographic order.

theorem convex_on.comp_linear_map {š•œ : Type u_1} {E : Type u_2} {F : Type u_3} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [add_comm_monoid F] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ F] [has_smul š•œ β] {f : F → β} {s : set F} (hf : convex_on š•œ s f) (g : E →ₗ[š•œ] F) :

If g is convex on s, so is (f ∘ g) on f ⁻¹' s for a linear f.

theorem concave_on.comp_linear_map {š•œ : Type u_1} {E : Type u_2} {F : Type u_3} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [add_comm_monoid F] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ F] [has_smul š•œ β] {f : F → β} {s : set F} (hf : concave_on š•œ s f) (g : E →ₗ[š•œ] F) :

If g is concave on s, so is (g ∘ f) on f ⁻¹' s for a linear f.

theorem strict_convex_on.add_convex_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [distrib_mul_action š•œ β] {s : set E} {f g : E → β} (hf : strict_convex_on š•œ s f) (hg : convex_on š•œ s g) :
strict_convex_on š•œ s (f + g)
theorem convex_on.add_strict_convex_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [distrib_mul_action š•œ β] {s : set E} {f g : E → β} (hf : convex_on š•œ s f) (hg : strict_convex_on š•œ s g) :
strict_convex_on š•œ s (f + g)
theorem strict_convex_on.add {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [distrib_mul_action š•œ β] {s : set E} {f g : E → β} (hf : strict_convex_on š•œ s f) (hg : strict_convex_on š•œ s g) :
strict_convex_on š•œ s (f + g)
theorem strict_concave_on.add_concave_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [distrib_mul_action š•œ β] {s : set E} {f g : E → β} (hf : strict_concave_on š•œ s f) (hg : concave_on š•œ s g) :
strict_concave_on š•œ s (f + g)
theorem concave_on.add_strict_concave_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [distrib_mul_action š•œ β] {s : set E} {f g : E → β} (hf : concave_on š•œ s f) (hg : strict_concave_on š•œ s g) :
strict_concave_on š•œ s (f + g)
theorem strict_concave_on.add {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [distrib_mul_action š•œ β] {s : set E} {f g : E → β} (hf : strict_concave_on š•œ s f) (hg : strict_concave_on š•œ s g) :
strict_concave_on š•œ s (f + g)
theorem convex_on.convex_lt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) (r : β) :
convex š•œ {x ∈ s | f x < r}
theorem concave_on.convex_gt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) (r : β) :
convex š•œ {x ∈ s | r < f x}
theorem convex_on.open_segment_subset_strict_epigraph {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) (p q : E Ɨ β) (hp : p.fst ∈ s ∧ f p.fst < p.snd) (hq : q.fst ∈ s ∧ f q.fst ≤ q.snd) :
open_segment š•œ p q āŠ† {p : E Ɨ β | p.fst ∈ s ∧ f p.fst < p.snd}
theorem concave_on.open_segment_subset_strict_hypograph {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) (p q : E Ɨ β) (hp : p.fst ∈ s ∧ p.snd < f p.fst) (hq : q.fst ∈ s ∧ q.snd ≤ f q.fst) :
open_segment š•œ p q āŠ† {p : E Ɨ β | p.fst ∈ s ∧ p.snd < f p.fst}
theorem convex_on.convex_strict_epigraph {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) :
convex š•œ {p : E Ɨ β | p.fst ∈ s ∧ f p.fst < p.snd}
theorem concave_on.convex_strict_hypograph {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) :
convex š•œ {p : E Ɨ β | p.fst ∈ s ∧ p.snd < f p.fst}
theorem convex_on.sup {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f g : E → β} (hf : convex_on š•œ s f) (hg : convex_on š•œ s g) :
convex_on š•œ s (f āŠ” g)

The pointwise maximum of convex functions is convex.

theorem concave_on.inf {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f g : E → β} (hf : concave_on š•œ s f) (hg : concave_on š•œ s g) :
concave_on š•œ s (f āŠ“ g)

The pointwise minimum of concave functions is concave.

theorem strict_convex_on.sup {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f g : E → β} (hf : strict_convex_on š•œ s f) (hg : strict_convex_on š•œ s g) :
strict_convex_on š•œ s (f āŠ” g)

The pointwise maximum of strictly convex functions is strictly convex.

theorem strict_concave_on.inf {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f g : E → β} (hf : strict_concave_on š•œ s f) (hg : strict_concave_on š•œ s g) :
strict_concave_on š•œ s (f āŠ“ g)

The pointwise minimum of strictly concave functions is strictly concave.

theorem convex_on.le_on_segment' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s) {a b : š•œ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) :
f (a • x + b • y) ≤ linear_order.max (f x) (f y)

A convex function on a segment is upper-bounded by the max of its endpoints.

theorem concave_on.ge_on_segment' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s) {a b : š•œ} (ha : 0 ≤ a) (hb : 0 ≤ b) (hab : a + b = 1) :
linear_order.min (f x) (f y) ≤ f (a • x + b • y)

A concave function on a segment is lower-bounded by the min of its endpoints.

theorem convex_on.le_on_segment {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ segment š•œ x y) :
f z ≤ linear_order.max (f x) (f y)

A convex function on a segment is upper-bounded by the max of its endpoints.

theorem concave_on.ge_on_segment {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ segment š•œ x y) :
linear_order.min (f x) (f y) ≤ f z

A concave function on a segment is lower-bounded by the min of its endpoints.

theorem strict_convex_on.lt_on_open_segment' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : strict_convex_on š•œ s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s) (hxy : x ≠ y) {a b : š•œ} (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) :
f (a • x + b • y) < linear_order.max (f x) (f y)

A strictly convex function on an open segment is strictly upper-bounded by the max of its endpoints.

theorem strict_concave_on.lt_on_open_segment' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : strict_concave_on š•œ s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s) (hxy : x ≠ y) {a b : š•œ} (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) :
linear_order.min (f x) (f y) < f (a • x + b • y)

A strictly concave function on an open segment is strictly lower-bounded by the min of its endpoints.

theorem strict_convex_on.lt_on_open_segment {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : strict_convex_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hxy : x ≠ y) (hz : z ∈ open_segment š•œ x y) :
f z < linear_order.max (f x) (f y)

A strictly convex function on an open segment is strictly upper-bounded by the max of its endpoints.

theorem strict_concave_on.lt_on_open_segment {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : strict_concave_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hxy : x ≠ y) (hz : z ∈ open_segment š•œ x y) :
linear_order.min (f x) (f y) < f z

A strictly concave function on an open segment is strictly lower-bounded by the min of its endpoints.

theorem convex_on.le_left_of_right_le' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s) {a b : š•œ} (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) (hfy : f y ≤ f (a • x + b • y)) :
f (a • x + b • y) ≤ f x
theorem concave_on.left_le_of_le_right' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s) {a b : š•œ} (ha : 0 < a) (hb : 0 ≤ b) (hab : a + b = 1) (hfy : f (a • x + b • y) ≤ f y) :
f x ≤ f (a • x + b • y)
theorem convex_on.le_right_of_left_le' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) {x y : E} {a b : š•œ} (hx : x ∈ s) (hy : y ∈ s) (ha : 0 ≤ a) (hb : 0 < b) (hab : a + b = 1) (hfx : f x ≤ f (a • x + b • y)) :
f (a • x + b • y) ≤ f y
theorem concave_on.right_le_of_le_left' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) {x y : E} {a b : š•œ} (hx : x ∈ s) (hy : y ∈ s) (ha : 0 ≤ a) (hb : 0 < b) (hab : a + b = 1) (hfx : f (a • x + b • y) ≤ f x) :
f y ≤ f (a • x + b • y)
theorem convex_on.le_left_of_right_le {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ open_segment š•œ x y) (hyz : f y ≤ f z) :
f z ≤ f x
theorem concave_on.left_le_of_le_right {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ open_segment š•œ x y) (hyz : f z ≤ f y) :
f x ≤ f z
theorem convex_on.le_right_of_left_le {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ open_segment š•œ x y) (hxz : f x ≤ f z) :
f z ≤ f y
theorem concave_on.right_le_of_le_left {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ open_segment š•œ x y) (hxz : f z ≤ f x) :
f y ≤ f z
theorem convex_on.lt_left_of_right_lt' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s) {a b : š•œ} (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) (hfy : f y < f (a • x + b • y)) :
f (a • x + b • y) < f x
theorem concave_on.left_lt_of_lt_right' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) {x y : E} (hx : x ∈ s) (hy : y ∈ s) {a b : š•œ} (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) (hfy : f (a • x + b • y) < f y) :
f x < f (a • x + b • y)
theorem convex_on.lt_right_of_left_lt' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) {x y : E} {a b : š•œ} (hx : x ∈ s) (hy : y ∈ s) (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) (hfx : f x < f (a • x + b • y)) :
f (a • x + b • y) < f y
theorem concave_on.lt_right_of_left_lt' {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) {x y : E} {a b : š•œ} (hx : x ∈ s) (hy : y ∈ s) (ha : 0 < a) (hb : 0 < b) (hab : a + b = 1) (hfx : f (a • x + b • y) < f x) :
f y < f (a • x + b • y)
theorem convex_on.lt_left_of_right_lt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ open_segment š•œ x y) (hyz : f y < f z) :
f z < f x
theorem concave_on.left_lt_of_lt_right {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ open_segment š•œ x y) (hyz : f z < f y) :
f x < f z
theorem convex_on.lt_right_of_left_lt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : convex_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ open_segment š•œ x y) (hxz : f x < f z) :
f z < f y
theorem concave_on.lt_right_of_left_lt {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [linear_ordered_cancel_add_comm_monoid β] [module š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} (hf : concave_on š•œ s f) {x y z : E} (hx : x ∈ s) (hy : y ∈ s) (hz : z ∈ open_segment š•œ x y) (hxz : f z < f x) :
f y < f z
@[simp]
theorem neg_convex_on_iff {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f : E → β} :
convex_on š•œ s (-f) ↔ concave_on š•œ s f

A function -f is convex iff f is concave.

@[simp]
theorem neg_concave_on_iff {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f : E → β} :
concave_on š•œ s (-f) ↔ convex_on š•œ s f

A function -f is concave iff f is convex.

@[simp]
theorem neg_strict_convex_on_iff {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f : E → β} :
strict_convex_on š•œ s (-f) ↔ strict_concave_on š•œ s f

A function -f is strictly convex iff f is strictly concave.

@[simp]
theorem neg_strict_concave_on_iff {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f : E → β} :
strict_concave_on š•œ s (-f) ↔ strict_convex_on š•œ s f

A function -f is strictly concave iff f is strictly convex.

theorem concave_on.neg {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f : E → β} :
concave_on š•œ s f → convex_on š•œ s (-f)

Alias of the reverse direction of neg_convex_on_iff.

theorem convex_on.neg {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f : E → β} :
convex_on š•œ s f → concave_on š•œ s (-f)

Alias of the reverse direction of neg_concave_on_iff.

theorem strict_concave_on.neg {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f : E → β} :
strict_concave_on š•œ s f → strict_convex_on š•œ s (-f)

Alias of the reverse direction of neg_strict_convex_on_iff.

theorem strict_convex_on.neg {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f : E → β} :
strict_convex_on š•œ s f → strict_concave_on š•œ s (-f)

Alias of the reverse direction of neg_strict_concave_on_iff.

theorem convex_on.sub {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f g : E → β} (hf : convex_on š•œ s f) (hg : concave_on š•œ s g) :
convex_on š•œ s (f - g)
theorem concave_on.sub {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f g : E → β} (hf : concave_on š•œ s f) (hg : convex_on š•œ s g) :
concave_on š•œ s (f - g)
theorem strict_convex_on.sub {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f g : E → β} (hf : strict_convex_on š•œ s f) (hg : strict_concave_on š•œ s g) :
strict_convex_on š•œ s (f - g)
theorem strict_concave_on.sub {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f g : E → β} (hf : strict_concave_on š•œ s f) (hg : strict_convex_on š•œ s g) :
strict_concave_on š•œ s (f - g)
theorem convex_on.sub_strict_concave_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f g : E → β} (hf : convex_on š•œ s f) (hg : strict_concave_on š•œ s g) :
strict_convex_on š•œ s (f - g)
theorem concave_on.sub_strict_convex_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f g : E → β} (hf : concave_on š•œ s f) (hg : strict_convex_on š•œ s g) :
strict_concave_on š•œ s (f - g)
theorem strict_convex_on.sub_concave_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f g : E → β} (hf : strict_convex_on š•œ s f) (hg : concave_on š•œ s g) :
strict_convex_on š•œ s (f - g)
theorem strict_concave_on.sub_convex_on {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_group β] [has_smul š•œ E] [module š•œ β] {s : set E} {f g : E → β} (hf : strict_concave_on š•œ s f) (hg : convex_on š•œ s g) :
strict_concave_on š•œ s (f - g)
theorem strict_convex_on.translate_right {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_cancel_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : strict_convex_on š•œ s f) (c : E) :
strict_convex_on š•œ ((Ī» (z : E), c + z) ⁻¹' s) (f ∘ Ī» (z : E), c + z)

Right translation preserves strict convexity.

theorem strict_concave_on.translate_right {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_cancel_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : strict_concave_on š•œ s f) (c : E) :
strict_concave_on š•œ ((Ī» (z : E), c + z) ⁻¹' s) (f ∘ Ī» (z : E), c + z)

Right translation preserves strict concavity.

theorem strict_convex_on.translate_left {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_cancel_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : strict_convex_on š•œ s f) (c : E) :
strict_convex_on š•œ ((Ī» (z : E), c + z) ⁻¹' s) (f ∘ Ī» (z : E), z + c)

Left translation preserves strict convexity.

theorem strict_concave_on.translate_left {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_semiring š•œ] [add_cancel_comm_monoid E] [ordered_add_comm_monoid β] [module š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} (hf : strict_concave_on š•œ s f) (c : E) :
strict_concave_on š•œ ((Ī» (z : E), c + z) ⁻¹' s) (f ∘ Ī» (z : E), z + c)

Left translation preserves strict concavity.

theorem convex_on.smul {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_comm_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} {c : š•œ} (hc : 0 ≤ c) (hf : convex_on š•œ s f) :
convex_on š•œ s (Ī» (x : E), c • f x)
theorem concave_on.smul {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [ordered_comm_semiring š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [module š•œ β] [ordered_smul š•œ β] {s : set E} {f : E → β} {c : š•œ} (hc : 0 ≤ c) (hf : concave_on š•œ s f) :
concave_on š•œ s (Ī» (x : E), c • f x)
theorem convex_on.comp_affine_map {š•œ : Type u_1} {E : Type u_2} {F : Type u_3} {β : Type u_5} [linear_ordered_field š•œ] [add_comm_group E] [add_comm_group F] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ F] [has_smul š•œ β] {f : F → β} (g : E ā†’įµƒ[š•œ] F) {s : set F} (hf : convex_on š•œ s f) :

If a function is convex on s, it remains convex when precomposed by an affine map.

theorem concave_on.comp_affine_map {š•œ : Type u_1} {E : Type u_2} {F : Type u_3} {β : Type u_5} [linear_ordered_field š•œ] [add_comm_group E] [add_comm_group F] [ordered_add_comm_monoid β] [module š•œ E] [module š•œ F] [has_smul š•œ β] {f : F → β} (g : E ā†’įµƒ[š•œ] F) {s : set F} (hf : concave_on š•œ s f) :

If a function is concave on s, it remains concave when precomposed by an affine map.

theorem convex_on_iff_div {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [linear_ordered_field š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} :
convex_on š•œ s f ↔ convex š•œ s ∧ āˆ€ ⦃x : E⦄, x ∈ s → āˆ€ ⦃y : E⦄, y ∈ s → āˆ€ ⦃a b : š•œā¦„, 0 ≤ a → 0 ≤ b → 0 < a + b → f ((a / (a + b)) • x + (b / (a + b)) • y) ≤ (a / (a + b)) • f x + (b / (a + b)) • f y
theorem concave_on_iff_div {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [linear_ordered_field š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} :
concave_on š•œ s f ↔ convex š•œ s ∧ āˆ€ ⦃x : E⦄, x ∈ s → āˆ€ ⦃y : E⦄, y ∈ s → āˆ€ ⦃a b : š•œā¦„, 0 ≤ a → 0 ≤ b → 0 < a + b → (a / (a + b)) • f x + (b / (a + b)) • f y ≤ f ((a / (a + b)) • x + (b / (a + b)) • y)
theorem strict_convex_on_iff_div {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [linear_ordered_field š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} :
strict_convex_on š•œ s f ↔ convex š•œ s ∧ āˆ€ ⦃x : E⦄, x ∈ s → āˆ€ ⦃y : E⦄, y ∈ s → x ≠ y → āˆ€ ⦃a b : š•œā¦„, 0 < a → 0 < b → f ((a / (a + b)) • x + (b / (a + b)) • y) < (a / (a + b)) • f x + (b / (a + b)) • f y
theorem strict_concave_on_iff_div {š•œ : Type u_1} {E : Type u_2} {β : Type u_5} [linear_ordered_field š•œ] [add_comm_monoid E] [ordered_add_comm_monoid β] [has_smul š•œ E] [has_smul š•œ β] {s : set E} {f : E → β} :
strict_concave_on š•œ s f ↔ convex š•œ s ∧ āˆ€ ⦃x : E⦄, x ∈ s → āˆ€ ⦃y : E⦄, y ∈ s → x ≠ y → āˆ€ ⦃a b : š•œā¦„, 0 < a → 0 < b → (a / (a + b)) • f x + (b / (a + b)) • f y < f ((a / (a + b)) • x + (b / (a + b)) • y)
theorem convex_on.le_right_of_left_le'' {š•œ : Type u_1} {β : Type u_5} [linear_ordered_field š•œ] [linear_ordered_cancel_add_comm_monoid β] [module š•œ β] [ordered_smul š•œ β] {x y z : š•œ} {s : set š•œ} {f : š•œ → β} (hf : convex_on š•œ s f) (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y ≤ z) (h : f x ≤ f y) :
f y ≤ f z
theorem convex_on.le_left_of_right_le'' {š•œ : Type u_1} {β : Type u_5} [linear_ordered_field š•œ] [linear_ordered_cancel_add_comm_monoid β] [module š•œ β] [ordered_smul š•œ β] {x y z : š•œ} {s : set š•œ} {f : š•œ → β} (hf : convex_on š•œ s f) (hx : x ∈ s) (hz : z ∈ s) (hxy : x ≤ y) (hyz : y < z) (h : f z ≤ f y) :
f y ≤ f x
theorem concave_on.right_le_of_le_left'' {š•œ : Type u_1} {β : Type u_5} [linear_ordered_field š•œ] [linear_ordered_cancel_add_comm_monoid β] [module š•œ β] [ordered_smul š•œ β] {x y z : š•œ} {s : set š•œ} {f : š•œ → β} (hf : concave_on š•œ s f) (hx : x ∈ s) (hz : z ∈ s) (hxy : x < y) (hyz : y ≤ z) (h : f y ≤ f x) :
f z ≤ f y
theorem concave_on.left_le_of_le_right'' {š•œ : Type u_1} {β : Type u_5} [linear_ordered_field š•œ] [linear_ordered_cancel_add_comm_monoid β] [module š•œ β] [ordered_smul š•œ β] {x y z : š•œ} {s : set š•œ} {f : š•œ → β} (hf : concave_on š•œ s f) (hx : x ∈ s) (hz : z ∈ s) (hxy : x ≤ y) (hyz : y < z) (h : f y ≤ f z) :
f x ≤ f y