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
.
@[simp]
theorem
convexHull_isClosed
(๐ : Type u_1)
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
(s : Set E)
:
(convexHull ๐).IsClosed s = Convex ๐ s
def
convexHull
(๐ : Type u_1)
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
:
ClosureOperator (Set E)
The convex hull of a set s
is the minimal convex set that includes s
.
Equations
- convexHull ๐ = ClosureOperator.ofCompletePred (Convex ๐) โฏ
Instances For
theorem
subset_convexHull
(๐ : Type u_1)
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
(s : Set E)
:
s โ (convexHull ๐) s
theorem
convex_convexHull
(๐ : Type u_1)
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
(s : Set E)
:
Convex ๐ ((convexHull ๐) s)
theorem
convexHull_eq_iInter
(๐ : Type u_1)
{E : Type u_2}
[OrderedSemiring ๐]
[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}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
{s : Set E}
{x : E}
:
theorem
convexHull_min
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
{s : Set E}
{t : Set E}
:
s โ t โ Convex ๐ t โ (convexHull ๐) s โ t
theorem
Convex.convexHull_subset_iff
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
{s : Set E}
{t : Set E}
(ht : Convex ๐ t)
:
(convexHull ๐) s โ t โ s โ t
theorem
convexHull_mono
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
{s : Set E}
{t : Set E}
(hst : s โ t)
:
(convexHull ๐) s โ (convexHull ๐) t
theorem
convexHull_eq_self
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
{s : Set E}
:
(convexHull ๐) s = s โ Convex ๐ s
theorem
Convex.convexHull_eq
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[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}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
:
(convexHull ๐) Set.univ = Set.univ
@[simp]
theorem
convexHull_empty
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
:
(convexHull ๐) โ
= โ
@[simp]
theorem
convexHull_empty_iff
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
{s : Set E}
:
@[simp]
theorem
convexHull_nonempty_iff
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
{s : Set E}
:
Set.Nonempty ((convexHull ๐) s) โ Set.Nonempty s
theorem
Set.Nonempty.convexHull
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
{s : Set E}
:
Set.Nonempty s โ Set.Nonempty ((convexHull ๐) s)
Alias of the reverse direction of convexHull_nonempty_iff
.
theorem
segment_subset_convexHull
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
{s : Set E}
{x : E}
{y : E}
(hx : x โ s)
(hy : y โ s)
:
segment ๐ x y โ (convexHull ๐) s
@[simp]
theorem
convexHull_singleton
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
(x : E)
:
(convexHull ๐) {x} = {x}
@[simp]
theorem
convexHull_zero
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
:
(convexHull ๐) 0 = 0
@[simp]
theorem
convexHull_pair
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
(x : E)
(y : E)
:
(convexHull ๐) {x, y} = segment ๐ x y
theorem
convexHull_convexHull_union_left
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
(s : Set E)
(t : Set E)
:
(convexHull ๐) ((convexHull ๐) s โช t) = (convexHull ๐) (s โช t)
theorem
convexHull_convexHull_union_right
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
(s : Set E)
(t : Set E)
:
(convexHull ๐) (s โช (convexHull ๐) t) = (convexHull ๐) (s โช t)
theorem
Convex.convex_remove_iff_not_mem_convexHull_remove
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[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}
[OrderedSemiring ๐]
[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}
[OrderedSemiring ๐]
[AddCommMonoid E]
[AddCommMonoid F]
[Module ๐ E]
[Module ๐ F]
(f : E โโ[๐] F)
(s : Set E)
:
โf '' (convexHull ๐) s = (convexHull ๐) (โf '' s)
theorem
convexHull_smul
{๐ : Type u_1}
{E : Type u_2}
[OrderedCommSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
(a : ๐)
(s : Set E)
:
a โข (convexHull ๐) s = (convexHull ๐) (a โข s)
theorem
AffineMap.image_convexHull
{๐ : Type u_1}
{E : Type u_2}
{F : Type u_3}
[OrderedRing ๐]
[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}
[OrderedRing ๐]
[AddCommGroup E]
[Module ๐ E]
(s : Set E)
:
(convexHull ๐) s โ โ(affineSpan ๐ s)
@[simp]
theorem
affineSpan_convexHull
{๐ : Type u_1}
{E : Type u_2}
[OrderedRing ๐]
[AddCommGroup E]
[Module ๐ E]
(s : Set E)
:
affineSpan ๐ ((convexHull ๐) s) = affineSpan ๐ s
theorem
convexHull_neg
{๐ : Type u_1}
{E : Type u_2}
[OrderedRing ๐]
[AddCommGroup E]
[Module ๐ E]
(s : Set E)
:
-(convexHull ๐) s = (convexHull ๐) (-s)