The standard simplex #
In this file, given an ordered semiring ๐ and a finite type ฮน,
we define stdSimplex : Set (ฮน โ ๐) as the set of vectors with non-negative
coordinates with total sum 1.
When f : X โ Y is a map between finite types, we define the map
stdSimplex.map f : stdSimplex ๐ X โ stdSimplex ๐ Y.
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.
Instances For
The standard simplex in the zero-dimensional space is empty.
All values of a function f โ stdSimplex ๐ ฮน belong to [0, 1].
The edges are contained in the simplex.
The standard one-dimensional simplex in Fin 2 โ ๐ is equivalent to the unit interval.
This bijection sends the zeroth vertex Pi.single 0 1 to 0 and
the first vertex Pi.single 1 1 to 1.
Equations
Instances For
stdSimplex ๐ ฮน is the convex hull of the canonical basis in ฮน โ ๐.
stdSimplex ๐ ฮน is the convex hull of the points Pi.single i 1 for i : ฮน.
The convex hull of a finite set is the image of the standard simplex in s โ โ
under the linear map sending each function w to โ x โ s, w x โข x.
Since we have no sums over finite sets, we use sum over @Finset.univ _ hs.fintype.
The map is defined in terms of operations on (s โ โ) โโ[โ] โ so that later we will not need
to prove that this map is linear.
Every vector in stdSimplex ๐ ฮน has max-norm at most 1.
stdSimplex โ ฮน is bounded.
stdSimplex โ ฮน is closed.
stdSimplex โ ฮน is compact.
stdSimplex โ ฮน is path connected.
The standard one-dimensional simplex in โยฒ = Fin 2 โ โ
is homeomorphic to the unit interval.
Equations
- One or more equations did not get rendered due to their size.
Instances For
Diameter of a Standard Simplex (sup metric) #
The (sup metric) diameter of a standard simplex is less than or equal to 1.
The (sup metric) diameter of a standard simplex indexed by a subsingleton is 0.
The (sup metric) diameter of a standard simplex indexed by a nontrivial index is 1.
Equations
- stdSimplex.instFunLikeElemForall = { coe := fun (s : โ(stdSimplex S X)) => โs, coe_injective' := โฏ }
The map stdSimplex S X โ stdSimplex S Y that is induced by a map f : X โ Y.
Equations
- stdSimplex.map f s = โจ(FunOnFinite.linearMap S S f) โs, โฏโฉ
Instances For
The vertex corresponding to x : X in stdSimplex S X.
Equations
- stdSimplex.vertex x = โจPi.single x 1, โฏโฉ
Instances For
Barycenter of a Standard Simplex #
The barycenter of a standard simplex is the center of mass of the set of vertices (equally weighted).
Equations
- stdSimplex.barycenter = โจfun (i : X) => (โ(Fintype.card X))โปยน, โฏโฉ
Instances For
The barycenter of a standard simplex has coordinates (Fintype.card X)โปยน at each index.
The barycenter equals the (equal weight) center of mass of vertices (Finset.centerMass).