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].
stdSimplex π ΞΉ is a subset of the unit cube
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.
stdSimplex π ΞΉ is closed.
stdSimplex π ΞΉ is compact.
Every vector in stdSimplex π ΞΉ has max-norm at most 1.
stdSimplex β ΞΉ is bounded.
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).