Documentation

Mathlib.Analysis.Convex.Hull

Convex hull #

This file defines the convex hull of a set s in a module. convexHull π•œ s is the smallest convex set containing s. In order theory speak, this is a closure operator.

Implementation notes #

convexHull is defined as a closure operator. This gives access to the ClosureOperator API while the impact on writing code is minimal as convexHull π•œ s is automatically elaborated as (convexHull π•œ) s.

def convexHull (π•œ : Type u_1) {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] :

The convex hull of a set s is the minimal convex set that includes s.

Equations
Instances For
    @[simp]
    theorem convexHull_isClosed (π•œ : Type u_1) {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] (s : Set E) :
    (convexHull π•œ).IsClosed s = Convex π•œ s
    theorem subset_convexHull (π•œ : Type u_1) {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] (s : Set E) :
    s βŠ† (convexHull π•œ) s
    theorem convex_convexHull (π•œ : Type u_1) {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] (s : Set E) :
    Convex π•œ ((convexHull π•œ) s)
    theorem convexHull_eq_iInter (π•œ : Type u_1) {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] (s : Set E) :
    (convexHull π•œ) s = β‹‚ (t : Set E), β‹‚ (_ : s βŠ† t), β‹‚ (_ : Convex π•œ t), t
    theorem mem_convexHull_iff {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s : Set E} {x : E} :
    x ∈ (convexHull π•œ) s ↔ βˆ€ (t : Set E), s βŠ† t β†’ Convex π•œ t β†’ x ∈ t
    theorem convexHull_min {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s t : Set E} :
    s βŠ† t β†’ Convex π•œ t β†’ (convexHull π•œ) s βŠ† t
    theorem Convex.convexHull_subset_iff {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s t : Set E} (ht : Convex π•œ t) :
    (convexHull π•œ) s βŠ† t ↔ s βŠ† t
    theorem convexHull_mono {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s t : Set E} (hst : s βŠ† t) :
    (convexHull π•œ) s βŠ† (convexHull π•œ) t
    theorem convexHull_eq_self {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s : Set E} :
    (convexHull π•œ) s = s ↔ Convex π•œ s
    theorem Convex.convexHull_eq {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s : Set E} :
    Convex π•œ s β†’ (convexHull π•œ) s = s

    Alias of the reverse direction of convexHull_eq_self.

    @[simp]
    theorem convexHull_univ {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] :
    @[simp]
    theorem convexHull_empty {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] :
    @[simp]
    theorem convexHull_eq_empty {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s : Set E} :
    (convexHull π•œ) s = βˆ… ↔ s = βˆ…
    @[simp]
    theorem convexHull_nonempty_iff {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s : Set E} :
    theorem Set.Nonempty.convexHull {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s : Set E} :
    s.Nonempty β†’ ((convexHull π•œ) s).Nonempty

    Alias of the reverse direction of convexHull_nonempty_iff.

    theorem segment_subset_convexHull {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s : Set E} {x y : E} (hx : x ∈ s) (hy : y ∈ s) :
    segment π•œ x y βŠ† (convexHull π•œ) s
    @[simp]
    theorem convexHull_singleton {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] (x : E) :
    (convexHull π•œ) {x} = {x}
    @[simp]
    theorem convexHull_eq_singleton {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s : Set E} {x : E} :
    (convexHull π•œ) s = {x} ↔ s = {x}
    @[simp]
    theorem convexHull_zero {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] :
    (convexHull π•œ) 0 = 0
    @[simp]
    theorem convexHull_eq_zero {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s : Set E} :
    (convexHull π•œ) s = 0 ↔ s = 0
    @[simp]
    theorem convexHull_pair {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] [IsOrderedRing π•œ] (x y : E) :
    (convexHull π•œ) {x, y} = segment π•œ x y
    theorem convexHull_convexHull_union_left {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] (s t : Set E) :
    (convexHull π•œ) ((convexHull π•œ) s βˆͺ t) = (convexHull π•œ) (s βˆͺ t)
    theorem convexHull_convexHull_union_right {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] (s t : Set E) :
    (convexHull π•œ) (s βˆͺ (convexHull π•œ) t) = (convexHull π•œ) (s βˆͺ t)
    theorem Convex.convex_remove_iff_notMem_convexHull_remove {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s : Set E} (hs : Convex π•œ s) (x : E) :
    Convex π•œ (s \ {x}) ↔ x βˆ‰ (convexHull π•œ) (s \ {x})
    theorem IsLinearMap.image_convexHull {π•œ : Type u_1} {E : Type u_2} {F : Type u_3} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [AddCommMonoid F] [Module π•œ E] [Module π•œ F] {f : E β†’ F} (hf : IsLinearMap π•œ f) (s : Set E) :
    f '' (convexHull π•œ) s = (convexHull π•œ) (f '' s)
    theorem LinearMap.image_convexHull {π•œ : Type u_1} {E : Type u_2} {F : Type u_3} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [AddCommMonoid F] [Module π•œ E] [Module π•œ F] (f : E β†’β‚—[π•œ] F) (s : Set E) :
    ⇑f '' (convexHull π•œ) s = (convexHull π•œ) (⇑f '' s)
    theorem convexHull_add_subset {π•œ : Type u_1} {E : Type u_2} [Semiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] {s t : Set E} :
    (convexHull π•œ) (s + t) βŠ† (convexHull π•œ) s + (convexHull π•œ) t
    theorem convexHull_smul {π•œ : Type u_1} {E : Type u_2} [CommSemiring π•œ] [PartialOrder π•œ] [AddCommMonoid E] [Module π•œ E] (a : π•œ) (s : Set E) :
    (convexHull π•œ) (a β€’ s) = a β€’ (convexHull π•œ) s
    theorem AffineMap.image_convexHull {π•œ : Type u_1} {E : Type u_2} {F : Type u_3} [Ring π•œ] [PartialOrder π•œ] [AddCommGroup E] [AddCommGroup F] [Module π•œ E] [Module π•œ F] (f : E →ᡃ[π•œ] F) (s : Set E) :
    ⇑f '' (convexHull π•œ) s = (convexHull π•œ) (⇑f '' s)
    theorem convexHull_subset_affineSpan {π•œ : Type u_1} {E : Type u_2} [Ring π•œ] [PartialOrder π•œ] [AddCommGroup E] [Module π•œ E] (s : Set E) :
    (convexHull π•œ) s βŠ† ↑(affineSpan π•œ s)
    @[simp]
    theorem affineSpan_convexHull {π•œ : Type u_1} {E : Type u_2} [Ring π•œ] [PartialOrder π•œ] [AddCommGroup E] [Module π•œ E] (s : Set E) :
    affineSpan π•œ ((convexHull π•œ) s) = affineSpan π•œ s
    theorem convexHull_neg {π•œ : Type u_1} {E : Type u_2} [Ring π•œ] [PartialOrder π•œ] [AddCommGroup E] [Module π•œ E] (s : Set E) :
    (convexHull π•œ) (-s) = -(convexHull π•œ) s
    theorem convexHull_vadd {π•œ : Type u_1} {E : Type u_2} [Ring π•œ] [PartialOrder π•œ] [AddCommGroup E] [Module π•œ E] (x : E) (s : Set E) :
    (convexHull π•œ) (x +α΅₯ s) = x +α΅₯ (convexHull π•œ) s