Commit 2025-12-19 22:50 97c2b335
View on Github →feat: definition of ConvexSpace (#31984)
This PR introduces ConvexSpace, an algebraic structure for spaces equipped with finite convex combinations.
The main definitions are:
StdSimplex R M: A finitely supported probability distribution overMwith non-negative coefficients inRthat sum to 1.StdSimplex.single,StdSimplex.duple: Constructors for point mass and two-point distributions.StdSimplex.map,StdSimplex.join: Monadic operations on standard simplices.ConvexSpace R M: A typeclass withconvexCombination : StdSimplex R M → Msatisfying monadic laws (assocandsingle).convexCombo₂: Binary convex combinations of two points. The design follows a monadic structure whereStdSimplex Rforms a monad andconvexCombinationis a monadic algebra. This eliminates the need for explicit extensionality axioms and avoids universe issues with indexed families. 🤖 Prepared with Claude Code