Quelle Quasiconvex.lean
Sprache: Lean
|
|
/-
Copyright (c) 2021 Yaël Dillies. All rights reserved.
Released under Apache 2.0 license as described in the file LICENSE.
Authors: Yaël Dillies, Antoine Chambert-Loir, Anatole Dedecker
-/
module
public import Mathlib.Analysis.Convex.Function
public import Mathlib.Analysis.Convex.PathConnected
/-!
# Quasiconvex and quasiconcave functions
This file defines quasiconvexity, quasiconcavity and quasilinearity of functions, which are
generalizations of unimodality and monotonicity. Convexity implies quasiconvexity, concavity implies
quasiconcavity, and monotonicity implies quasilinearity.
## Main declarations
* `QuasiconvexOn s f`: Quasiconvexity of the function `f` on the set `s` with scalars ``. This
means that, for all `r`, `{x ∈ s | f x ≤ r}` is ``-convex.
* `QuasiconcaveOn s f`: Quasiconcavity of the function `f` on the set `s` with scalars ``. This
means that, for all `r`, `{x ∈ s | r ≤ f x}` is ``-convex.
* `QuasilinearOn s f`: Quasilinearity of the function `f` on the set `s` with scalars ``. This
means that `f` is both quasiconvex and quasiconcave.
## References
* https://en.wikipedia.org/wiki/Quasiconvex_function
-/
@[expose] public section
open Function OrderDual Set
variable { E β : Type*}
section OrderedSemiring
variable [Semiring ] [PartialOrder ] [AddCommMonoid E]
section LE_β
variable () [LE β] [SMul E] (s : Set E) (f : E → β)
/-- A function is quasiconvex if all its sublevels are convex.
This means that, for all `r`, `{x ∈ s | f x ≤ r}` is ``-convex. -/
def QuasiconvexOn : Prop :=
∀ r, Convex ({ x ∈ s | f x ≤ r })
/-- A function is quasiconcave if all its superlevels are convex.
This means that, for all `r`, `{x ∈ s | r ≤ f x}` is ``-convex. -/
def QuasiconcaveOn : Prop :=
∀ r, Convex ({ x ∈ s | r ≤ f x })
/-- A function is quasilinear if it is both quasiconvex and quasiconcave.
This means that, for all `r`,
the sets `{x ∈ s | f x ≤ r}` and `{x ∈ s | r ≤ f x}` are ``-convex. -/
def QuasilinearOn : Prop :=
QuasiconvexOn s f ∧ QuasiconcaveOn s f
variable { s f}
theorem QuasiconvexOn.dual : QuasiconvexOn s f → QuasiconcaveOn s (toDual ∘ f) :=
id
theorem QuasiconcaveOn.dual : QuasiconcaveOn s f → QuasiconvexOn s (toDual ∘ f) :=
id
theorem QuasilinearOn.dual : QuasilinearOn s f → QuasilinearOn s (toDual ∘ f) :=
And.symm
theorem Convex.quasiconvexOn_of_convex_le (hs : Convex s) (h : ∀ r, Convex { x | f x ≤ r }) :
QuasiconvexOn s f := fun r => hs.inter (h r)
theorem Convex.quasiconcaveOn_of_convex_ge (hs : Convex s) (h : ∀ r, Convex { x | r ≤ f x }) :
QuasiconcaveOn s f :=
Convex.quasiconvexOn_of_convex_le (β := βᵒᵈ) hs h
theorem QuasiconvexOn.convex [IsDirectedOrder β] (hf : QuasiconvexOn s f) : Convex s :=
fun x hx y hy _ _ ha hb hab =>
let ⟨_, hxz, hyz⟩ := exists_ge_ge (f x) (f y)
(hf _ ⟨hx, hxz⟩ ⟨hy, hyz⟩ ha hb hab).1
theorem QuasiconcaveOn.convex [IsCodirectedOrder β] (hf : QuasiconcaveOn s f) : Convex s :=
hf.dual.convex
end LE_β
section Composition
variable { E : Type*} [Semiring ] [PartialOrder ] [AddCommMonoid E] [SMul E]
variable {β γ : Type*} [LinearOrder β] [Preorder γ]
variable {s : Set E} {f : E → β} {g : β → γ}
theorem QuasiconvexOn.monotone_comp
(hg : Monotone g) (hf : QuasiconvexOn s f) :
QuasiconvexOn s (g ∘ f) := fun c x hx y hy ↦ by
simp only [Function.comp_apply, mem_ofPred_eq] at hx hy
intro a b ha hb hab
simp only [Function.comp_apply, mem_ofPred_eq]
wlog h : f x ≤ f y
· grind
specialize hf (f y) ⟨hx.1, h⟩ ⟨hy.1, le_rfl⟩ ha hb hab
simp only [mem_ofPred_eq] at hf
exact ⟨hf.1, le_trans (hg hf.2) hy.2⟩
theorem QuasiconvexOn.antitone_comp (hg : Antitone g) (hf : QuasiconvexOn s f) :
QuasiconcaveOn s (g ∘ f) :=
hf.monotone_comp (γ := γᵒᵈ) hg
theorem QuasiconcaveOn.monotone_comp (hg : Monotone g) (hf : QuasiconcaveOn s f) :
QuasiconcaveOn s (g ∘ f) :=
QuasiconvexOn.monotone_comp hg.dual hf
theorem QuasiconcaveOn.antitone_comp (hg : Antitone g) (hf : QuasiconcaveOn s f) :
QuasiconvexOn s (g ∘ f) :=
QuasiconvexOn.monotone_comp (β := βᵒᵈ) hg.dual hf
theorem QuasilinearOn.monotone_comp (hg : Monotone g) (hf : QuasilinearOn s f) :
QuasilinearOn s (g ∘ f) :=
⟨hf.1.monotone_comp hg, hf.2.monotone_comp hg⟩
theorem QuasilinearOn.antitone_comp (hg : Antitone g) (hf : QuasilinearOn s f) :
QuasilinearOn s (g ∘ f) :=
⟨hf.2.antitone_comp hg, hf.1.antitone_comp hg⟩
end Composition
section Restriction
variable { E : Type*} [Semiring ] [PartialOrder ]
[AddCommMonoid E] [SMul E]
variable {β : Type*} [Preorder β]
variable {s : Set E} {f : E → β}
theorem Convex.quasiconvexOn_restrict {t : Set E} (hf : QuasiconvexOn s f) (hst : t ⊆ s)
(ht : Convex t) : QuasiconvexOn t f := by
intro b
rw [Set.sep_eq_inter_sep hst]
exact Convex.inter ht (hf b)
theorem Convex.quasiconcaveOn_restrict {t : Set E} (hf : QuasiconcaveOn s f) (hst : t ⊆ s)
(ht : Convex t) : QuasiconcaveOn t f := by
intro b
rw [Set.sep_eq_inter_sep hst]
exact Convex.inter ht (hf b)
end Restriction
section Preconnected
variable {E : Type*} [AddCommGroup E] [Module ℝ E]
[TopologicalSpace E] [IsTopologicalAddGroup E] [ContinuousSMul ℝ E]
variable {β : Type*} [Preorder β] {f : E → β}
open scoped Set.Notation
/-- If `f` is quasiconcave, then its over-levels are connected. -/
theorem QuasiconcaveOn.isPreconnected_preimage_subtype {s : Set E} {t : β}
(hfc : QuasiconcaveOn ℝ s f) :
IsPreconnected (s ↓∩ (f ⁻¹' Ici t)) := by
rw [← Topology.IsInducing.subtypeVal.isPreconnected_image,
image_preimage_eq_inter_range,
Subtype.range_coe, inter_comm]
exact (hfc t).isPreconnected
/-- If `f` is quasiconcave, then its under-levels are connected. -/
theorem QuasiconvexOn.isPreconnected_preimage_subtype {s : Set E} {t : β}
(hfc : QuasiconvexOn ℝ s f) :
IsPreconnected (s ↓∩ (f ⁻¹' Iic t)) :=
QuasiconcaveOn.isPreconnected_preimage_subtype (β := βᵒᵈ) hfc
theorem QuasilinearOn.isPreconnected_preimage_subtype {s : Set E} {t : β}
(hfc : QuasilinearOn ℝ s f) :
IsPreconnected (s ↓∩ f ⁻¹' Iic t) :=
hfc.left.isPreconnected_preimage_subtype
end Preconnected
section Semilattice_β
variable [SMul E] {s : Set E} {f g : E → β}
theorem QuasiconvexOn.sup [SemilatticeSup β] (hf : QuasiconvexOn s f)
(hg : QuasiconvexOn s g) : QuasiconvexOn s (f ⊔ g) := by
intro r
simp_rw [Pi.sup_def, sup_le_iff, Set.sep_and]
exact (hf r).inter (hg r)
theorem QuasiconcaveOn.inf [SemilatticeInf β] (hf : QuasiconcaveOn s f)
(hg : QuasiconcaveOn s g) : QuasiconcaveOn s (f ⊓ g) :=
hf.dual.sup hg
end Semilattice_β
section LinearOrder_β
variable [LinearOrder β] [SMul E] {s : Set E} {f : E → β}
theorem quasiconvexOn_iff_le_max : QuasiconvexOn s f ↔ Convex s ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄,
y ∈ s → ∀ ⦃a b : ⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → f (a • x + b • y) ≤ max (f x) (f y) :=
⟨fun hf =>
⟨hf.convex, fun _ hx _ hy _ _ ha hb hab =>
(hf _ ⟨hx, le_max_left _ _⟩ ⟨hy, le_max_right _ _⟩ ha hb hab).2⟩,
fun hf _ _ hx _ hy _ _ ha hb hab =>
⟨hf.1 hx.1 hy.1 ha hb hab, (hf.2 hx.1 hy.1 ha hb hab).trans <| max_le hx.2 hy.2⟩⟩
theorem quasiconcaveOn_iff_min_le : QuasiconcaveOn s f ↔ Convex s ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄,
y ∈ s → ∀ ⦃a b : ⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → min (f x) (f y) ≤ f (a • x + b • y) :=
quasiconvexOn_iff_le_max (β := βᵒᵈ)
theorem quasilinearOn_iff_mem_uIcc : QuasilinearOn s f ↔ Convex s ∧ ∀ ⦃x⦄, x ∈ s → ∀ ⦃y⦄,
y ∈ s → ∀ ⦃a b : ⦄, 0 ≤ a → 0 ≤ b → a + b = 1 → f (a • x + b • y) ∈ uIcc (f x) (f y) := by
rw [QuasilinearOn, quasiconvexOn_iff_le_max, quasiconcaveOn_iff_min_le, and_and_and_comm,
and_self_iff]
apply and_congr_right'
simp_rw [← forall_and, ← Icc_min_max, mem_Icc, and_comm]
theorem QuasiconvexOn.convex_lt (hf : QuasiconvexOn s f) (r : β) :
Convex ({ x ∈ s | f x < r }) := by
intro x hx y hy a b ha hb hab
have h := hf _ ⟨hx.1, le_max_left _ _⟩ ⟨hy.1, le_max_right _ _⟩ ha hb hab
exact ⟨h.1, h.2.trans_lt <| max_lt hx.2 hy.2⟩
theorem QuasiconcaveOn.convex_gt (hf : QuasiconcaveOn s f) (r : β) :
Convex ({ x ∈ s | r < f x }) :=
hf.dual.convex_lt r
end LinearOrder_β
section PosSMulMono
variable [AddCommMonoid β] [PartialOrder β] [IsOrderedAddMonoid β]
[Module E] [Module β] [PosSMulMono β]
{s : Set E} {f : E → β}
theorem ConvexOn.quasiconvexOn (hf : ConvexOn s f) : QuasiconvexOn s f :=
hf.convex_le
theorem ConcaveOn.quasiconcaveOn (hf : ConcaveOn s f) : QuasiconcaveOn s f :=
hf.convex_ge
end PosSMulMono
section LinearOrder
variable [LinearOrder E] [IsOrderedAddMonoid E] [PartialOrder β] [Module E] [PosSMulMono E]
{s : Set E} {f : E → β}
theorem MonotoneOn.quasiconvexOn (hf : MonotoneOn f s) (hs : Convex s) : QuasiconvexOn s f :=
hf.convex_le hs
theorem MonotoneOn.quasiconcaveOn (hf : MonotoneOn f s) (hs : Convex s) : QuasiconcaveOn s f :=
hf.convex_ge hs
theorem MonotoneOn.quasilinearOn (hf : MonotoneOn f s) (hs : Convex s) : QuasilinearOn s f :=
⟨hf.quasiconvexOn hs, hf.quasiconcaveOn hs⟩
theorem AntitoneOn.quasiconvexOn (hf : AntitoneOn f s) (hs : Convex s) : QuasiconvexOn s f :=
hf.convex_le hs
theorem AntitoneOn.quasiconcaveOn (hf : AntitoneOn f s) (hs : Convex s) : QuasiconcaveOn s f :=
hf.convex_ge hs
theorem AntitoneOn.quasilinearOn (hf : AntitoneOn f s) (hs : Convex s) : QuasilinearOn s f :=
⟨hf.quasiconvexOn hs, hf.quasiconcaveOn hs⟩
theorem Monotone.quasiconvexOn (hf : Monotone f) : QuasiconvexOn univ f :=
(hf.monotoneOn _).quasiconvexOn convex_univ
theorem Monotone.quasiconcaveOn (hf : Monotone f) : QuasiconcaveOn univ f :=
(hf.monotoneOn _).quasiconcaveOn convex_univ
theorem Monotone.quasilinearOn (hf : Monotone f) : QuasilinearOn univ f :=
⟨hf.quasiconvexOn, hf.quasiconcaveOn⟩
theorem Antitone.quasiconvexOn (hf : Antitone f) : QuasiconvexOn univ f :=
(hf.antitoneOn _).quasiconvexOn convex_univ
theorem Antitone.quasiconcaveOn (hf : Antitone f) : QuasiconcaveOn univ f :=
(hf.antitoneOn _).quasiconcaveOn convex_univ
theorem Antitone.quasilinearOn (hf : Antitone f) : QuasilinearOn univ f :=
⟨hf.quasiconvexOn, hf.quasiconcaveOn⟩
end LinearOrder
end OrderedSemiring
section LinearOrderedField
variable [Field ] [LinearOrder ] [IsStrictOrderedRing ] {s : Set } {f : → β}
theorem QuasilinearOn.monotoneOn_or_antitoneOn [LinearOrder β] (hf : QuasilinearOn s f) :
MonotoneOn f s ∨ AntitoneOn f s := by
simp_rw [monotoneOn_or_antitoneOn_iff_uIcc, ← segment_eq_uIcc]
rintro a ha b hb c _ h
refine ⟨((hf.2 _).segment_subset ?_ ?_ h).2, ((hf.1 _).segment_subset ?_ ?_ h).2⟩ <;> simp [*]
theorem quasilinearOn_iff_monotoneOn_or_antitoneOn [LinearOrder β]
(hs : Convex s) : QuasilinearOn s f ↔ MonotoneOn f s ∨ AntitoneOn f s :=
⟨fun h => h.monotoneOn_or_antitoneOn, fun h =>
h.elim (fun h => h.quasilinearOn hs) fun h => h.quasilinearOn hs⟩
end LinearOrderedField
¤ Dauer der Verarbeitung: 0.13 Sekunden
¤
*© Formatika GbR, Deutschland
|
|
2026-11-24
|