Modules are convex spaces #
This file shows that every module over ordered coefficients is a convex space.
Main declarations #
ConvexSpace.ofModule: A semimodule space over a semiring is a convex space.convexSpaceSelf: A semiring is a convex space over itself.IsModuleConvexSpace: Predicate for a convex space and module structures to be compatible.
Any semimodule over an ordered semiring is a convex space.
This is not an instance because it creates a diamond with structural instances such as
ConvexSpace R X → ConvexSpace R Y → ConvexSpace R (X × Y) because
(∑ i, f i).fst = ∑ i, (f i).fst isn't defeq, ultimately because Finset.sum isn't a field of
AddCommMonoid but derived from them through recursion.
Equations
- Convexity.ConvexSpace.ofModule = { sConvexComb := fun (w : Convexity.StdSimplex R M) => w.weights.sum fun (m : M) (r : R) => r • m, sConvexComb_single := ⋯, assoc := ⋯ }
Instances For
Typeclass for a convex space structure on a module to be given by weighted sums.
- sConvexComb_eq_sum (w : StdSimplex R M) : sConvexComb w = w.weights.sum fun (m : M) (r : R) => r • m
Instances
iConvexComb in a module can be expressed as a sum.
convexCombPair in a module can be expressed as a sum.
Equations
Eta-expanded form of Convexity.IsAffineMap.add
Eta-expanded form of Convexity.IsAffineMap.neg
Eta-expanded form of Convexity.IsAffineMap.sub