Convex hull #
THIS FILE IS SYNCHRONIZED WITH MATHLIB4. Any changes to this file require a corresponding PR to mathlib4.
This file defines the convex hull of a set s
in a module. convex_hull π s
is the smallest convex
set containing s
. In order theory speak, this is a closure operator.
Implementation notes #
convex_hull
is defined as a closure operator. This gives access to the closure_operator
API
while the impact on writing code is minimal as convex_hull π s
is automatically elaborated as
β(convex_hull π) s
.
def
convex_hull
(π : Type u_1)
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E] :
closure_operator (set E)
The convex hull of a set s
is the minimal convex set that includes s
.
Equations
- convex_hull π = closure_operator.mkβ (Ξ» (s : set E), β (t : set E) (hst : s β t) (ht : convex π t), t) (convex π) _ _ _
theorem
subset_convex_hull
(π : Type u_1)
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
(s : set E) :
s β β(convex_hull π) s
theorem
convex_convex_hull
(π : Type u_1)
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
(s : set E) :
convex π (β(convex_hull π) s)
theorem
convex_hull_eq_Inter
(π : Type u_1)
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
(s : set E) :
theorem
mem_convex_hull_iff
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
{s : set E}
{x : E} :
theorem
convex_hull_min
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
{s t : set E}
(hst : s β t)
(ht : convex π t) :
β(convex_hull π) s β t
theorem
convex.convex_hull_subset_iff
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
{s t : set E}
(ht : convex π t) :
β(convex_hull π) s β t β s β t
theorem
convex_hull_mono
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
{s t : set E}
(hst : s β t) :
β(convex_hull π) s β β(convex_hull π) t
theorem
convex.convex_hull_eq
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
{s : set E}
(hs : convex π s) :
β(convex_hull π) s = s
@[simp]
theorem
convex_hull_univ
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E] :
β(convex_hull π) set.univ = set.univ
@[simp]
theorem
convex_hull_empty
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E] :
β(convex_hull π) β
= β
@[simp]
theorem
convex_hull_empty_iff
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
{s : set E} :
@[simp]
theorem
convex_hull_nonempty_iff
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
{s : set E} :
(β(convex_hull π) s).nonempty β s.nonempty
@[protected]
theorem
set.nonempty.convex_hull
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
{s : set E} :
s.nonempty β (β(convex_hull π) s).nonempty
Alias of the reverse direction of convex_hull_nonempty_iff
.
theorem
segment_subset_convex_hull
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
{s : set E}
{x y : E}
(hx : x β s)
(hy : y β s) :
segment π x y β β(convex_hull π) s
@[simp]
theorem
convex_hull_singleton
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
(x : E) :
β(convex_hull π) {x} = {x}
@[simp]
theorem
convex_hull_zero
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E] :
β(convex_hull π) 0 = 0
@[simp]
theorem
convex_hull_pair
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
(x y : E) :
β(convex_hull π) {x, y} = segment π x y
theorem
convex_hull_convex_hull_union_left
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
(s t : set E) :
β(convex_hull π) (β(convex_hull π) s βͺ t) = β(convex_hull π) (s βͺ t)
theorem
convex_hull_convex_hull_union_right
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
(s t : set E) :
β(convex_hull π) (s βͺ β(convex_hull π) t) = β(convex_hull π) (s βͺ t)
theorem
convex.convex_remove_iff_not_mem_convex_hull_remove
{π : Type u_1}
{E : Type u_2}
[ordered_semiring π]
[add_comm_monoid E]
[module π E]
{s : set E}
(hs : convex π s)
(x : E) :
theorem
is_linear_map.convex_hull_image
{π : Type u_1}
{E : Type u_2}
{F : Type u_3}
[ordered_semiring π]
[add_comm_monoid E]
[add_comm_monoid F]
[module π E]
[module π F]
{f : E β F}
(hf : is_linear_map π f)
(s : set E) :
β(convex_hull π) (f '' s) = f '' β(convex_hull π) s
theorem
linear_map.convex_hull_image
{π : Type u_1}
{E : Type u_2}
{F : Type u_3}
[ordered_semiring π]
[add_comm_monoid E]
[add_comm_monoid F]
[module π E]
[module π F]
(f : E ββ[π] F)
(s : set E) :
β(convex_hull π) (βf '' s) = βf '' β(convex_hull π) s
theorem
convex_hull_smul
{π : Type u_1}
{E : Type u_2}
[ordered_comm_semiring π]
[add_comm_monoid E]
[module π E]
(a : π)
(s : set E) :
β(convex_hull π) (a β’ s) = a β’ β(convex_hull π) s
theorem
affine_map.image_convex_hull
{π : Type u_1}
{E : Type u_2}
{F : Type u_3}
[ordered_ring π]
[add_comm_group E]
[add_comm_group F]
[module π E]
[module π F]
(s : set E)
(f : E βα΅[π] F) :
βf '' β(convex_hull π) s = β(convex_hull π) (βf '' s)
theorem
convex_hull_subset_affine_span
{π : Type u_1}
{E : Type u_2}
[ordered_ring π]
[add_comm_group E]
[module π E]
(s : set E) :
β(convex_hull π) s β β(affine_span π s)
@[simp]
theorem
affine_span_convex_hull
{π : Type u_1}
{E : Type u_2}
[ordered_ring π]
[add_comm_group E]
[module π E]
(s : set E) :
affine_span π (β(convex_hull π) s) = affine_span π s
theorem
convex_hull_neg
{π : Type u_1}
{E : Type u_2}
[ordered_ring π]
[add_comm_group E]
[module π E]
(s : set E) :
β(convex_hull π) (-s) = -β(convex_hull π) s