# Convex cones #

In a π-module E, we define a convex cone as a set s such that a β’ x + b β’ y β s whenever x, y β s and a, b > 0. We prove that convex cones form a CompleteLattice, and define their images (ConvexCone.map) and preimages (ConvexCone.comap) under linear maps.

We define pointed, blunt, flat and salient cones, and prove the correspondence between convex cones and ordered modules.

We define Convex.toCone to be the minimal cone that includes a given convex set.

## Main statements #

In Mathlib/Analysis/Convex/Cone/Extension.lean we prove the M. Riesz extension theorem and a form of the Hahn-Banach theorem.

In Mathlib/Analysis/Convex/Cone/Dual.lean we prove a variant of the hyperplane separation theorem.

## Implementation notes #

While Convex π is a predicate on sets, ConvexCone π E is a bundled convex cone.

## References #

### Definition of ConvexCone and basic properties #

structure ConvexCone (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [] [SMul π E] :
Type u_2

A convex cone is a subset s of a π-module such that a β’ x + b β’ y β s whenever a, b > 0 and x, y β s.

• carrier : Set E

The carrier set underlying this cone: the set of points contained in it

• smul_mem' : β β¦c : πβ¦, 0 < c β β β¦x : Eβ¦, x β self.carrier β c β’ x β self.carrier
• add_mem' : β β¦x : Eβ¦, x β self.carrier β β β¦y : Eβ¦, y β self.carrier β x + y β self.carrier
Instances For
theorem ConvexCone.smul_mem' {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (self : ConvexCone π E) β¦c : πβ¦ :
0 < c β β β¦x : Eβ¦, x β self.carrier β c β’ x β self.carrier
theorem ConvexCone.add_mem' {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (self : ConvexCone π E) β¦x : Eβ¦ :
x β self.carrier β β β¦y : Eβ¦, y β self.carrier β x + y β self.carrier
instance ConvexCone.instSetLike {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] :
SetLike (ConvexCone π E) E
Equations
• ConvexCone.instSetLike = { coe := ConvexCone.carrier, coe_injective' := β― }
@[simp]
theorem ConvexCone.coe_mk {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {s : Set E} {hβ : β β¦c : πβ¦, 0 < c β β β¦x : Eβ¦, x β s β c β’ x β s} {hβ : β β¦x : Eβ¦, x β s β β β¦y : Eβ¦, y β s β x + y β s} :
β{ carrier := s, smul_mem' := hβ, add_mem' := hβ } = s
@[simp]
theorem ConvexCone.mem_mk {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {s : Set E} {hβ : β β¦c : πβ¦, 0 < c β β β¦x : Eβ¦, x β s β c β’ x β s} {hβ : β β¦x : Eβ¦, x β s β β β¦y : Eβ¦, y β s β x + y β s} {x : E} :
x β { carrier := s, smul_mem' := hβ, add_mem' := hβ } β x β s
theorem ConvexCone.ext_iff {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {S : ConvexCone π E} {T : ConvexCone π E} :
S = T β β (x : E), x β S β x β T
theorem ConvexCone.ext {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {S : ConvexCone π E} {T : ConvexCone π E} (h : β (x : E), x β S β x β T) :
S = T

Two ConvexCones are equal if they have the same elements.

theorem ConvexCone.smul_mem {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) {c : π} {x : E} (hc : 0 < c) (hx : x β S) :
theorem ConvexCone.add_mem {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) β¦x : Eβ¦ (hx : x β S) β¦y : Eβ¦ (hy : y β S) :
x + y β S
instance ConvexCone.instAddMemClass {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] :
Equations
• β― = β―
instance ConvexCone.instInf {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] :
Inf (ConvexCone π E)
Equations
• ConvexCone.instInf = { inf := fun (S T : ConvexCone π E) => { carrier := βS β© βT, smul_mem' := β―, add_mem' := β― } }
@[simp]
theorem ConvexCone.coe_inf {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) (T : ConvexCone π E) :
β(S β T) = βS β© βT
theorem ConvexCone.mem_inf {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) (T : ConvexCone π E) {x : E} :
instance ConvexCone.instInfSet {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] :
InfSet (ConvexCone π E)
Equations
• ConvexCone.instInfSet = { sInf := fun (S : Set (ConvexCone π E)) => { carrier := β s β S, βs, smul_mem' := β―, add_mem' := β― } }
@[simp]
theorem ConvexCone.coe_sInf {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : Set (ConvexCone π E)) :
β(sInf S) = β s β S, βs
theorem ConvexCone.mem_sInf {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {x : E} {S : Set (ConvexCone π E)} :
x β sInf S β β s β S, x β s
@[simp]
theorem ConvexCone.coe_iInf {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {ΞΉ : Sort u_5} (f : ΞΉ β ConvexCone π E) :
β(iInf f) = β (i : ΞΉ), β(f i)
theorem ConvexCone.mem_iInf {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {ΞΉ : Sort u_5} {x : E} {f : ΞΉ β ConvexCone π E} :
x β iInf f β β (i : ΞΉ), x β f i
instance ConvexCone.instBot (π : Type u_1) {E : Type u_2} [OrderedSemiring π] [] [SMul π E] :
Bot (ConvexCone π E)
Equations
• = { bot := { carrier := β, smul_mem' := β―, add_mem' := β― } }
theorem ConvexCone.mem_bot (π : Type u_1) {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (x : E) :
@[simp]
theorem ConvexCone.coe_bot (π : Type u_1) {E : Type u_2} [OrderedSemiring π] [] [SMul π E] :
instance ConvexCone.instTop (π : Type u_1) {E : Type u_2} [OrderedSemiring π] [] [SMul π E] :
Top (ConvexCone π E)
Equations
• = { top := { carrier := Set.univ, smul_mem' := β―, add_mem' := β― } }
theorem ConvexCone.mem_top (π : Type u_1) {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (x : E) :
@[simp]
theorem ConvexCone.coe_top (π : Type u_1) {E : Type u_2} [OrderedSemiring π] [] [SMul π E] :
ββ€ = Set.univ
instance ConvexCone.instCompleteLattice (π : Type u_1) {E : Type u_2} [OrderedSemiring π] [] [SMul π E] :
Equations
instance ConvexCone.instInhabited (π : Type u_1) {E : Type u_2} [OrderedSemiring π] [] [SMul π E] :
Inhabited (ConvexCone π E)
Equations
theorem ConvexCone.convex {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] (S : ConvexCone π E) :
Convex π βS
def ConvexCone.map {π : Type u_1} {E : Type u_2} {F : Type u_3} [OrderedSemiring π] [] [] [Module π E] [Module π F] (f : E ββ[π] F) (S : ConvexCone π E) :
ConvexCone π F

The image of a convex cone under a π-linear map is a convex cone.

Equations
• = { carrier := βf '' βS, smul_mem' := β―, add_mem' := β― }
Instances For
@[simp]
theorem ConvexCone.coe_map {π : Type u_1} {E : Type u_2} {F : Type u_3} [OrderedSemiring π] [] [] [Module π E] [Module π F] (S : ConvexCone π E) (f : E ββ[π] F) :
β(ConvexCone.map f S) = βf '' βS
@[simp]
theorem ConvexCone.mem_map {π : Type u_1} {E : Type u_2} {F : Type u_3} [OrderedSemiring π] [] [] [Module π E] [Module π F] {f : E ββ[π] F} {S : ConvexCone π E} {y : F} :
y β β β x β S, f x = y
theorem ConvexCone.map_map {π : Type u_1} {E : Type u_2} {F : Type u_3} {G : Type u_4} [OrderedSemiring π] [] [] [] [Module π E] [Module π F] [Module π G] (g : F ββ[π] G) (f : E ββ[π] F) (S : ConvexCone π E) :
ConvexCone.map g (ConvexCone.map f S) = ConvexCone.map (g ββ f) S
@[simp]
theorem ConvexCone.map_id {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] (S : ConvexCone π E) :
ConvexCone.map LinearMap.id S = S
def ConvexCone.comap {π : Type u_1} {E : Type u_2} {F : Type u_3} [OrderedSemiring π] [] [] [Module π E] [Module π F] (f : E ββ[π] F) (S : ConvexCone π F) :
ConvexCone π E

The preimage of a convex cone under a π-linear map is a convex cone.

Equations
• = { carrier := βf β»ΒΉ' βS, smul_mem' := β―, add_mem' := β― }
Instances For
@[simp]
theorem ConvexCone.coe_comap {π : Type u_1} {E : Type u_2} {F : Type u_3} [OrderedSemiring π] [] [] [Module π E] [Module π F] (f : E ββ[π] F) (S : ConvexCone π F) :
β(ConvexCone.comap f S) = βf β»ΒΉ' βS
@[simp]
theorem ConvexCone.comap_id {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] (S : ConvexCone π E) :
ConvexCone.comap LinearMap.id S = S
theorem ConvexCone.comap_comap {π : Type u_1} {E : Type u_2} {F : Type u_3} {G : Type u_4} [OrderedSemiring π] [] [] [] [Module π E] [Module π F] [Module π G] (g : F ββ[π] G) (f : E ββ[π] F) (S : ConvexCone π G) :
= ConvexCone.comap (g ββ f) S
@[simp]
theorem ConvexCone.mem_comap {π : Type u_1} {E : Type u_2} {F : Type u_3} [OrderedSemiring π] [] [] [Module π E] [Module π F] {f : E ββ[π] F} {S : ConvexCone π F} {x : E} :
theorem ConvexCone.smul_mem_iff {π : Type u_1} {E : Type u_2} [] [] [MulAction π E] (S : ConvexCone π E) {c : π} (hc : 0 < c) {x : E} :
theorem ConvexCone.to_orderedSMul {π : Type u_1} {E : Type u_2} [] [Module π E] (S : ConvexCone π E) (h : β (x y : E), x β€ y β y - x β S) :
OrderedSMul π E

Constructs an ordered module given an OrderedAddCommGroup, a cone, and a proof that the order relation is the one defined by the cone.

### Convex cones with extra properties #

def ConvexCone.Pointed {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) :

A convex cone is pointed if it includes 0.

Equations
Instances For
def ConvexCone.Blunt {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) :

A convex cone is blunt if it doesn't include 0.

Equations
• S.Blunt = (0 β S)
Instances For
theorem ConvexCone.pointed_iff_not_blunt {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) :
S.Pointed β Β¬S.Blunt
theorem ConvexCone.blunt_iff_not_pointed {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) :
S.Blunt β Β¬S.Pointed
theorem ConvexCone.Pointed.mono {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {S : ConvexCone π E} {T : ConvexCone π E} (h : S β€ T) :
S.Pointed β T.Pointed
theorem ConvexCone.Blunt.anti {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {S : ConvexCone π E} {T : ConvexCone π E} (h : T β€ S) :
S.Blunt β T.Blunt
def ConvexCone.Flat {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) :

A convex cone is flat if it contains some nonzero vector x and its opposite -x.

Equations
Instances For
def ConvexCone.Salient {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) :

A convex cone is salient if it doesn't include x and -x for any nonzero x.

Equations
• S.Salient = β x β S, x β  0 β -x β S
Instances For
theorem ConvexCone.salient_iff_not_flat {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) :
S.Salient β Β¬S.Flat
theorem ConvexCone.Flat.mono {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {S : ConvexCone π E} {T : ConvexCone π E} (h : S β€ T) :
S.Flat β T.Flat
theorem ConvexCone.Salient.anti {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {S : ConvexCone π E} {T : ConvexCone π E} (h : T β€ S) :
S.Salient β T.Salient
theorem ConvexCone.Flat.pointed {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {S : ConvexCone π E} (hS : S.Flat) :
S.Pointed

A flat cone is always pointed (contains 0).

theorem ConvexCone.Blunt.salient {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] {S : ConvexCone π E} :
S.Blunt β S.Salient

A blunt cone (one not containing 0) is always salient.

def ConvexCone.toPreorder {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) (hβ : S.Pointed) :

A pointed convex cone defines a preorder.

Equations
Instances For
def ConvexCone.toPartialOrder {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) (hβ : S.Pointed) (hβ : S.Salient) :

A pointed and salient cone defines a partial order.

Equations
• S.toPartialOrder hβ hβ =
Instances For
def ConvexCone.toOrderedAddCommGroup {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [SMul π E] (S : ConvexCone π E) (hβ : S.Pointed) (hβ : S.Salient) :

A pointed and salient cone defines an OrderedAddCommGroup.

Equations
Instances For
instance ConvexCone.instZero {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] :
Zero (ConvexCone π E)
Equations
• ConvexCone.instZero = { zero := { carrier := 0, smul_mem' := β―, add_mem' := β― } }
@[simp]
theorem ConvexCone.mem_zero {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] (x : E) :
x β 0 β x = 0
@[simp]
theorem ConvexCone.coe_zero {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] :
β0 = 0
theorem ConvexCone.pointed_zero {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] :
instance ConvexCone.instAdd {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] :
Equations
• ConvexCone.instAdd = { add := fun (Kβ Kβ : ConvexCone π E) => { carrier := {z : E | β x β Kβ, β y β Kβ, x + y = z}, smul_mem' := β―, add_mem' := β― } }
@[simp]
theorem ConvexCone.mem_add {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] {Kβ : ConvexCone π E} {Kβ : ConvexCone π E} {a : E} :
a β Kβ + Kβ β β x β Kβ, β y β Kβ, x + y = a
instance ConvexCone.instAddZeroClass {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] :
Equations
instance ConvexCone.instAddCommSemigroup {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] :
Equations

### Submodules are cones #

def Submodule.toConvexCone {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] (S : Submodule π E) :
ConvexCone π E

Every submodule is trivially a convex cone.

Equations
• S.toConvexCone = { carrier := βS, smul_mem' := β―, add_mem' := β― }
Instances For
@[simp]
theorem Submodule.coe_toConvexCone {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] (S : Submodule π E) :
βS.toConvexCone = βS
@[simp]
theorem Submodule.mem_toConvexCone {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] {x : E} {S : Submodule π E} :
x β S.toConvexCone β x β S
@[simp]
theorem Submodule.toConvexCone_le_iff {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] {S : Submodule π E} {T : Submodule π E} :
S.toConvexCone β€ T.toConvexCone β S β€ T
@[simp]
theorem Submodule.toConvexCone_bot {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] :
β₯.toConvexCone = 0
@[simp]
theorem Submodule.toConvexCone_top {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] :
β€.toConvexCone = β€
@[simp]
theorem Submodule.toConvexCone_inf {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] (S : Submodule π E) (T : Submodule π E) :
(S β T).toConvexCone = S.toConvexCone β T.toConvexCone
@[simp]
theorem Submodule.pointed_toConvexCone {π : Type u_1} {E : Type u_2} [OrderedSemiring π] [] [Module π E] (S : Submodule π E) :
S.toConvexCone.Pointed

### Positive cone of an ordered module #

def ConvexCone.positive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] :
ConvexCone π E

The positive cone is the convex cone formed by the set of nonnegative elements in an ordered module.

Equations
Instances For
@[simp]
theorem ConvexCone.mem_positive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] {x : E} :
@[simp]
theorem ConvexCone.coe_positive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] :
β(ConvexCone.positive π E) =
theorem ConvexCone.salient_positive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] :
(ConvexCone.positive π E).Salient

The positive cone of an ordered module is always salient.

theorem ConvexCone.pointed_positive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] :
(ConvexCone.positive π E).Pointed

The positive cone of an ordered module is always pointed.

def ConvexCone.strictlyPositive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] :
ConvexCone π E

The cone of strictly positive elements.

Note that this naming diverges from the mathlib convention of pos and nonneg due to "positive cone" (ConvexCone.positive) being established terminology for the non-negative elements.

Equations
• = { carrier := , smul_mem' := β―, add_mem' := β― }
Instances For
@[simp]
theorem ConvexCone.mem_strictlyPositive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] {x : E} :
@[simp]
theorem ConvexCone.coe_strictlyPositive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] :
β(ConvexCone.strictlyPositive π E) =
theorem ConvexCone.positive_le_strictlyPositive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] :
theorem ConvexCone.salient_strictlyPositive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] :
(ConvexCone.strictlyPositive π E).Salient

The strictly positive cone of an ordered module is always salient.

theorem ConvexCone.blunt_strictlyPositive (π : Type u_1) (E : Type u_2) [OrderedSemiring π] [Module π E] [OrderedSMul π E] :
(ConvexCone.strictlyPositive π E).Blunt

The strictly positive cone of an ordered module is always blunt.

### Cone over a convex set #

def Convex.toCone {π : Type u_1} {E : Type u_2} [] [] [Module π E] (s : Set E) (hs : Convex π s) :
ConvexCone π E

The set of vectors proportional to those in a convex set forms a convex cone.

Equations
• = { carrier := β (c : π), β (_ : 0 < c), c β’ s, smul_mem' := β―, add_mem' := β― }
Instances For
theorem Convex.mem_toCone {π : Type u_1} {E : Type u_2} [] [] [Module π E] {s : Set E} (hs : Convex π s) {x : E} :
x β β β (c : π), 0 < c β§ β y β s, c β’ y = x
theorem Convex.mem_toCone' {π : Type u_1} {E : Type u_2} [] [] [Module π E] {s : Set E} (hs : Convex π s) {x : E} :
x β β β (c : π), 0 < c β§ c β’ x β s
theorem Convex.subset_toCone {π : Type u_1} {E : Type u_2} [] [] [Module π E] {s : Set E} (hs : Convex π s) :
s β β(Convex.toCone s hs)
theorem Convex.toCone_isLeast {π : Type u_1} {E : Type u_2} [] [] [Module π E] {s : Set E} (hs : Convex π s) :
IsLeast {t : ConvexCone π E | s β βt} (Convex.toCone s hs)

hs.toCone s is the least cone that includes s.

theorem Convex.toCone_eq_sInf {π : Type u_1} {E : Type u_2} [] [] [Module π E] {s : Set E} (hs : Convex π s) :
= sInf {t : ConvexCone π E | s β βt}
theorem convexHull_toCone_isLeast {π : Type u_1} {E : Type u_2} [] [] [Module π E] (s : Set E) :
IsLeast {t : ConvexCone π E | s β βt} (Convex.toCone ((convexHull π) s) β―)
theorem convexHull_toCone_eq_sInf {π : Type u_1} {E : Type u_2} [] [] [Module π E] (s : Set E) :
Convex.toCone ((convexHull π) s) β― = sInf {t : ConvexCone π E | s β βt}