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}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
:
ClosureOperator (Set E)
The convex hull of a set s
is the minimal convex set that includes s
.
Equations
- One or more equations did not get rendered due to their size.
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}
(hst : s โ t)
(ht : 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
Convex.convexHull_eq
{๐ : Type u_1}
{E : Type u_2}
[OrderedSemiring ๐]
[AddCommMonoid E]
[Module ๐ E]
{s : Set E}
:
Convex ๐ s โ โ(convexHull ๐) s = s
@[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)
:
theorem
IsLinearMap.convexHull_image
{๐ : 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)
:
โ(convexHull ๐) (f '' s) = f '' โ(convexHull ๐) s
theorem
LinearMap.convexHull_image
{๐ : 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)
:
โ(convexHull ๐) (โf '' s) = โf '' โ(convexHull ๐) s
theorem
convexHull_smul
{๐ : Type u_1}
{E : Type u_2}
[OrderedCommSemiring ๐]
[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}
[OrderedRing ๐]
[AddCommGroup E]
[AddCommGroup F]
[Module ๐ E]
[Module ๐ F]
(s : Set E)
(f : E โแต[๐] F)
:
โ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