# Documentation

Mathlib.Analysis.Convex.Cone.Proper

# Proper cones #

We define a proper cone as a nonempty, closed, convex cone. Proper cones are used in defining conic programs which generalize linear programs. A linear program is a conic program for the positive cone. We then prove Farkas' lemma for conic programs following the proof in the reference below. Farkas' lemma is equivalent to strong duality. So, once have the definitions of conic programs and linear programs, the results from this file can be used to prove duality theorems.

## TODO #

The next steps are:

• Add convex_cone_class that extends set_like and replace the below instance
• Define primal and dual cone programs and prove weak duality.
• Prove regular and strong duality for cone programs using Farkas' lemma (see reference).
• Define linear programs and prove LP duality as a special case of cone duality.
• Find a better reference (textbook instead of lecture notes).
• Show submodules are (proper) cones.

## References #

• [B. Gartner and J. Matousek, Cone Programming][gartnerMatousek]
def ConvexCone.closure {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [] [SMul ๐ E] [ContinuousConstSMul ๐ E] (K : ConvexCone ๐ E) :
ConvexCone ๐ E

The closure of a convex cone inside a topological space as a convex cone. This construction is mainly used for defining maps between proper cones.

Instances For
@[simp]
theorem ConvexCone.coe_closure {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [] [SMul ๐ E] [ContinuousConstSMul ๐ E] (K : ConvexCone ๐ E) :
โ() = closure โK
@[simp]
theorem ConvexCone.mem_closure {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [] [SMul ๐ E] [ContinuousConstSMul ๐ E] {K : ConvexCone ๐ E} {a : E} :
โ a โ closure โK
@[simp]
theorem ConvexCone.closure_eq {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [] [SMul ๐ E] [ContinuousConstSMul ๐ E] {K : ConvexCone ๐ E} {L : ConvexCone ๐ E} :
โ closure โK = โL
structure ProperCone (๐ : Type u_1) (E : Type u_2) [OrderedSemiring ๐] [] [] [SMul ๐ E] extends :
Type u_2
• carrier : Set E
• smul_mem' : โ โฆc : ๐โฆ, 0 < c โ โ โฆx : Eโฆ, x โ s.carrier โ c โข x โ s.carrier
• add_mem' : โ โฆx : Eโฆ, x โ s.carrier โ โ โฆy : Eโฆ, y โ s.carrier โ x + y โ s.carrier
• nonempty' : Set.Nonempty s.carrier
• is_closed' : IsClosed s.carrier

A proper cone is a convex cone K that is nonempty and closed. Proper cones have the nice property that the dual of the dual of a proper cone is itself. This makes them useful for defining cone programs and proving duality theorems.

Instances For
instance ProperCone.instCoeProperConeConvexCone {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [SMul ๐ E] :
Coe (ProperCone ๐ E) (ConvexCone ๐ E)
theorem ProperCone.ext' {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [SMul ๐ E] :
Function.Injective ProperCone.toConvexCone
instance ProperCone.instSetLikeProperCone {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [SMul ๐ E] :
SetLike (ProperCone ๐ E) E
theorem ProperCone.ext {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [SMul ๐ E] {S : ProperCone ๐ E} {T : ProperCone ๐ E} (h : โ (x : E), x โ S โ x โ T) :
S = T
@[simp]
theorem ProperCone.mem_coe {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [SMul ๐ E] {x : E} {K : ProperCone ๐ E} :
x โ K.toConvexCone โ x โ K
theorem ProperCone.nonempty {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [SMul ๐ E] (K : ProperCone ๐ E) :
Set.Nonempty โK
theorem ProperCone.isClosed {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [SMul ๐ E] (K : ProperCone ๐ E) :
IsClosed โK
def ProperCone.positive (๐ : Type u_1) (E : Type u_2) [OrderedSemiring ๐] [Module ๐ E] [OrderedSMul ๐ E] [] :
ProperCone ๐ E

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

Instances For
@[simp]
theorem ProperCone.mem_positive (๐ : Type u_2) (E : Type u_1) [OrderedSemiring ๐] [Module ๐ E] [OrderedSMul ๐ E] [] {x : E} :
@[simp]
theorem ProperCone.coe_positive (๐ : Type u_2) (E : Type u_1) [OrderedSemiring ๐] [Module ๐ E] [OrderedSMul ๐ E] [] :
(ProperCone.positive ๐ E).toConvexCone = ConvexCone.positive ๐ E
@[simp]
theorem ProperCone.mem_zero {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [] [Module ๐ E] (x : E) :
x โ 0 โ x = 0
@[simp]
theorem ProperCone.coe_zero {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [] [Module ๐ E] :
0.toConvexCone = 0
theorem ProperCone.pointed_zero {๐ : Type u_1} [OrderedSemiring ๐] {E : Type u_2} [] [] [] [Module ๐ E] :
ConvexCone.Pointed 0.toConvexCone
theorem ProperCone.pointed {E : Type u_1} [] (K : ) :
ConvexCone.Pointed K.toConvexCone
noncomputable def ProperCone.map {E : Type u_1} [] {F : Type u_2} [] (f : ) (K : ) :

The closure of image of a proper cone under a continuous โ-linear map is a proper cone. We use continuous maps here so that the comap of f is also a map between proper cones.

Instances For
@[simp]
theorem ProperCone.coe_map {E : Type u_1} [] {F : Type u_2} [] (f : ) (K : ) :
().toConvexCone = ConvexCone.closure (ConvexCone.map (โf) K.toConvexCone)
@[simp]
theorem ProperCone.mem_map {E : Type u_1} [] {F : Type u_2} [] {f : } {K : } {y : F} :
y โ โ y โ ConvexCone.closure (ConvexCone.map (โf) K.toConvexCone)
@[simp]
theorem ProperCone.map_id {E : Type u_1} [] (K : ) :
def ProperCone.dual {E : Type u_1} [] (K : ) :

The inner dual cone of a proper cone is a proper cone.

Instances For
@[simp]
theorem ProperCone.coe_dual {E : Type u_1} [] (K : ) :
().toConvexCone =
@[simp]
theorem ProperCone.mem_dual {E : Type u_1} [] {K : } {y : E} :
โ โ โฆx : Eโฆ, x โ K โ 0 โค inner x y
noncomputable def ProperCone.comap {E : Type u_1} [] {F : Type u_2} [] (f : ) (S : ) :

The preimage of a proper cone under a continuous โ-linear map is a proper cone.

Instances For
@[simp]
theorem ProperCone.coe_comap {E : Type u_1} [] {F : Type u_2} [] (f : ) (S : ) :
โ() = โf โปยน' โS
@[simp]
theorem ProperCone.comap_id {E : Type u_1} [] (S : ) :
ConvexCone.comap LinearMap.id S = S
theorem ProperCone.comap_comap {E : Type u_1} [] {F : Type u_2} [] {G : Type u_3} [] (g : ) (f : ) (S : ) :
@[simp]
theorem ProperCone.mem_comap {E : Type u_1} [] {F : Type u_2} [] {f : } {S : } {x : E} :
x โ โ โf x โ S
@[simp]
theorem ProperCone.dual_dual {E : Type u_1} [] [] (K : ) :

The dual of the dual of a proper cone is itself.

theorem ProperCone.hyperplane_separation {E : Type u_1} [] [] {F : Type u_2} [] [] (K : ) {f : } {b : F} :
b โ โ โ (y : F), โ(โContinuousLinearMap.adjoint f) y โ โ 0 โค inner y b

This is a relative version of ConvexCone.hyperplane_separation_of_nonempty_of_isClosed_of_nmem, which we recover by setting f to be the identity map. This is a geometric interpretation of the Farkas' lemma stated using proper cones.

theorem ProperCone.hyperplane_separation_of_nmem {E : Type u_1} [] [] {F : Type u_2} [] [] (K : ) {f : } {b : F} (disj : ยฌb โ ) :
โ y, โ(โContinuousLinearMap.adjoint f) y โ โง inner y b < 0