Documentation

Mathlib.LinearAlgebra.ConvexSpace

Convex spaces #

This file defines convex spaces as an algebraic structure supporting finite convex combinations.

Main definitions #

Design #

The design follows a monadic structure where StdSimplex R forms a monad and convexCombination is a monadic algebra. This eliminates the need for explicit extensionality axioms and resolves universe issues with indexed families.

TODO #

structure StdSimplex (R : Type u) [LE R] [AddCommMonoid R] [One R] (M : Type v) extends M →₀ R :
Type (max u v)

A finitely supported probability distribution over elements of M with coefficients in R. The weights are non-negative and sum to 1.

Instances For
    def StdSimplex.single {R : Type u} [PartialOrder R] [Semiring R] [IsStrictOrderedRing R] {M : Type v} (x : M) :

    The point mass distribution concentrated at x.

    Equations
    Instances For
      def StdSimplex.duple {R : Type u} [PartialOrder R] [Semiring R] [IsStrictOrderedRing R] {M : Type v} (x y : M) {s t : R} (hs : 0 s) (ht : 0 t) (h : s + t = 1) :

      A probability distribution with weight s on x and weight t on y.

      Equations
      Instances For
        def StdSimplex.map {R : Type u} [PartialOrder R] [Semiring R] [IsStrictOrderedRing R] {M : Type v} {N : Type w} (g : MN) (f : StdSimplex R M) :

        Map a function over the support of a standard simplex. For each n : N, the weight is the sum of weights of all m : M with g m = n.

        Equations
        Instances For

          Join operation for standard simplices (monadic join). Given a distribution over distributions, flattens it to a single distribution.

          Equations
          Instances For
            class ConvexSpace (R : Type u) (M : Type v) [PartialOrder R] [Semiring R] [IsStrictOrderedRing R] :
            Type (max u v)

            A set equipped with an operation of finite convex combinations, where the coefficients must be non-negative and sum to 1.

            Instances
              def convexComboPair {R : Type u_1} {M : Type u_2} [PartialOrder R] [Semiring R] [IsStrictOrderedRing R] [ConvexSpace R M] (s t : R) (hs : 0 s) (ht : 0 t) (h : s + t = 1) (x y : M) :
              M

              Take a convex combination of two points.

              Equations
              Instances For