Documentation

Mathlib.Geometry.Convex.ConvexSpace.AffineSpace

Affine spaces are convex spaces #

This file shows that every affine space is a convex space.

Main results #

noncomputable def AddTorsor.convexCombination {R : Type u_1} {V : Type u_2} {P : Type u_3} [Ring R] [PartialOrder R] [AddCommGroup V] [Module R V] [AddTorsor V P] (s : Convexity.StdSimplex R P) :
P

The convex combination of points in an affine space, given a probability distribution.

Equations
Instances For
    @[implicit_reducible]
    noncomputable def AddTorsor.toConvexSpace {R : Type u_1} {V : Type u_2} {P : Type u_3} [Ring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup V] [Module R V] [AddTorsor V P] :

    Any affine space is a convex space.

    This is not an instance because its convex combination operation is defined through the choice of an arbitrary basepoint, which makes it very diamond-prone.

    Equations
    Instances For

      ConvexSpace.sConvexComb in an affine space is the affine combination.

      @[deprecated AddTorsor.sConvexComb_eq_affineCombination (since := "2026-05-15")]

      Alias of AddTorsor.sConvexComb_eq_affineCombination.


      ConvexSpace.sConvexComb in an affine space is the affine combination.

      theorem AddTorsor.convexCombPair_eq_lineMap {R : Type u_1} {V : Type u_2} {P : Type u_3} [Ring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup V] [Module R V] [AddTorsor V P] (s t : R) (hs : 0 s) (ht : 0 t) (h : s + t = 1) (x y : P) :

      convexCombPair in an affine space is the affine line map.

      theorem Convexity.sConvexComb_eq_sum {R : Type u_1} {V : Type u_2} [Ring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup V] [Module R V] (f : StdSimplex R V) :
      sConvexComb f = f.weights.sum fun (i : V) (r : R) => r i
      @[deprecated Convexity.sConvexComb_eq_sum (since := "2026-04-03")]
      theorem convexCombination_eq_sum {R : Type u_1} {V : Type u_2} [Ring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup V] [Module R V] (f : Convexity.StdSimplex R V) :
      Convexity.sConvexComb f = f.weights.sum fun (i : V) (r : R) => r i

      Alias of Convexity.sConvexComb_eq_sum.

      theorem Convexity.iConvexComb_eq_sum {R : Type u_1} {V : Type u_2} {I : Type u_4} [Ring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup V] [Module R V] (f : StdSimplex R I) (g : IV) :
      iConvexComb f g = f.weights.sum fun (i : I) (r : R) => r g i
      theorem Convexity.convexCombPair_eq_add {R : Type u_1} {V : Type u_2} [Ring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup V] [Module R V] {s t : R} (hs : 0 s) (ht : 0 t) (h : s + t = 1) (x y : V) :
      convexCombPair s t hs ht h x y = s x + t y