Convex sets and functions in vector spaces #
In a π-vector space, we define the following objects and properties.
Convex π s
: A sets
is convex if for any two pointsx y β s
it includessegment π x y
.stdSimplex π ΞΉ
: The standard simplex inΞΉ β π
(currently requiresFintype ΞΉ
). It is the intersection of the positive quadrant with the hyperplanes.sum = 1
.
We also provide various equivalent versions of the definitions above, prove that some specific sets are convex.
TODO #
Generalize all this file to affine spaces.
Convexity of sets #
Convexity of sets.
Equations
- Convex π s = β β¦x : Eβ¦, x β s β StarConvex π x s
Instances For
Alternative definition of set convexity, in terms of pointwise set operations.
Alias of the forward direction of convex_iff_pointwise_add_subset
.
Alternative definition of set convexity, in terms of pointwise set operations.
The convex sets form an additive submonoid under pointwise addition.
Equations
- convexAddSubmonoid π E = { carrier := {s : Set E | Convex π s}, add_mem' := β―, zero_mem' := β― }
Instances For
The translation of a convex set is also convex.
The translation of a convex set is also convex.
Alias of convex_halfSpace_le
.
Alias of convex_halfSpace_ge
.
Alias of convex_halfSpace_lt
.
Alias of convex_halfSpace_gt
.
Affine subspaces are convex.
The preimage of a convex set under an affine map is convex.
The image of a convex set under an affine map is convex.
Alternative definition of set convexity, using division.
Alias of the forward direction of convex_iff_ordConnected
.
Convexity of submodules/subspaces #
Simplex #
The standard simplex in the space of functions ΞΉ β π
is the set of vectors with non-negative
coordinates with total sum 1
. This is the free object in the category of convex spaces.
Equations
- stdSimplex π ΞΉ = {f : ΞΉ β π | (β (x : ΞΉ), 0 β€ f x) β§ β x : ΞΉ, f x = 1}
Instances For
The standard simplex in the zero-dimensional space is empty.
The edges are contained in the simplex.
The standard one-dimensional simplex in Fin 2 β π
is equivalent to the unit interval.
Equations
- stdSimplexEquivIcc π = { toFun := fun (f : β(stdSimplex π (Fin 2))) => β¨βf 0, β―β©, invFun := fun (x : β(Set.Icc 0 1)) => β¨![βx, 1 - βx], β―β©, left_inv := β―, right_inv := β― }