The areas / V22. Affine, Euclidean and convex geometry
Mathlib.Geometry.Convex.ConvexSpace.AffineSpace
13 declarations and 2 deprecated aliases. Mathlib docs · Source
Affine spaces are convex spaces
This file shows that every affine space is a convex space.
Main results
AddTorsor.toConvexSpace: An affine space over a module is a convex space.AddTorsor.sConvexComb_eq_affineCombination: The convex combination equals the affine combination.AddTorsor.convexCombPair_eq_lineMap: Binary convex combinations are given bylineMap.
def AddTorsor.convexCombination E1 #
{R : Type u_1} →
{V : Type u_2} →
{P : Type u_3} →
[inst : Ring R] →
[inst_1 : PartialOrder R] →
[inst_2 : AddCommGroup V] → [Module R V] → [AddTorsor V P] → Convexity.StdSimplex R P → P
The convex combination of points in an affine space, given a probability distribution.
theorem AddTorsor.convexCombination_single E1 #
∀ {R : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R]
[inst_2 : IsStrictOrderedRing R] [inst_3 : AddCommGroup V] [inst_4 : Module R V] [inst_5 : AddTorsor V P] (x : P),
AddTorsor.convexCombination (Convexity.StdSimplex.single x) = x
theorem AddTorsor.convexCombination_assoc E1 #
∀ {R : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R]
[inst_2 : IsStrictOrderedRing R] [inst_3 : AddCommGroup V] [inst_4 : Module R V] [inst_5 : AddTorsor V P]
(f : Convexity.StdSimplex R (Convexity.StdSimplex R P)),
AddTorsor.convexCombination (Convexity.StdSimplex.map AddTorsor.convexCombination f) =
AddTorsor.convexCombination f.join
def Convexity.ConvexSpace.ofAddTorsor E1 #
{R : Type u_1} →
{V : Type u_2} →
{P : Type u_3} →
[inst : Ring R] →
[inst_1 : PartialOrder R] →
[inst_2 : IsStrictOrderedRing R] →
[inst_3 : AddCommGroup V] → [Module R V] → [AddTorsor V P] → Convexity.ConvexSpace R 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.
class Convexity.IsAffineConvexSpace E1 #
(R : Type u_1) →
(V : Type u_2) →
(P : Type u_3) →
[inst : Ring R] →
[inst_1 : PartialOrder R] →
[inst_2 : IsStrictOrderedRing R] →
[inst_3 : AddCommGroup V] → [Module R V] → [AddTorsor V P] → [Convexity.ConvexSpace R P] → Prop
Typeclass for a convex space structure on an affine space to be given by affine combinations.
ctor Convexity.IsAffineConvexSpace.mk E0 #
∀ {R : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R]
[inst_2 : IsStrictOrderedRing R] [inst_3 : AddCommGroup V] [inst_4 : Module R V] [inst_5 : AddTorsor V P]
[inst_6 : Convexity.ConvexSpace R P],
(∀ (w : Convexity.StdSimplex R P), Convexity.sConvexComb w = AddTorsor.convexCombination w) →
Convexity.IsAffineConvexSpace R V P
theorem Convexity.IsAffineConvexSpace.sConvexComb_eq_convexComb E0 #
∀ {R : Type u_1} {V : Type u_2} {P : Type u_3} {inst : Ring R} {inst_1 : PartialOrder R}
{inst_2 : IsStrictOrderedRing R} {inst_3 : AddCommGroup V} {inst_4 : Module R V} {inst_5 : AddTorsor V P}
{inst_6 : Convexity.ConvexSpace R P} [self : Convexity.IsAffineConvexSpace R V P] (w : Convexity.StdSimplex R P),
Convexity.sConvexComb w = AddTorsor.convexCombination w
ConvexSpace.sConvexComb in an affine space is the affine combination.
instance Convexity.IsAffineConvexSpace.ofAddTorsor E0 #
∀ {R : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R]
[inst_2 : IsStrictOrderedRing R] [inst_3 : AddCommGroup V] [inst_4 : Module R V] [inst_5 : AddTorsor V P],
Convexity.IsAffineConvexSpace R V P
instance Convexity.IsModuleConvexSpace.isAffineConvexSpace E0 #
∀ {R : Type u_1} {V : Type u_2} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R]
[inst_3 : AddCommGroup V] [inst_4 : Module R V] [inst_5 : Convexity.ConvexSpace R V]
[Convexity.IsModuleConvexSpace R V], Convexity.IsAffineConvexSpace R V V
theorem AddTorsor.sConvexComb_eq_affineCombination E3 #
∀ {R : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R]
[inst_2 : IsStrictOrderedRing R] [inst_3 : AddCommGroup V] [inst_4 : Module R V] [inst_5 : AddTorsor V P]
[inst_6 : Convexity.ConvexSpace R P] [Convexity.IsAffineConvexSpace R V P] (s : Convexity.StdSimplex R P),
Convexity.sConvexComb s = (Finset.affineCombination R s.support id) ⇑s.weights
ConvexSpace.sConvexComb in an affine space is the affine combination.
theorem AddTorsor.iConvexComb_eq_affineCombination E1 #
∀ {R : Type u_1} {V : Type u_2} {P : Type u_3} {I : Type u_4} [inst : Ring R] [inst_1 : PartialOrder R]
[inst_2 : IsStrictOrderedRing R] [inst_3 : AddCommGroup V] [inst_4 : Module R V] [inst_5 : AddTorsor V P]
[inst_6 : Convexity.ConvexSpace R P] [Convexity.IsAffineConvexSpace R V P] (s : Convexity.StdSimplex R I) (f : I → P),
Convexity.iConvexComb s f = (Finset.affineCombination R s.support f) ⇑s.weights
theorem AddTorsor.convexCombPair_eq_lineMap E3 #
∀ {R : Type u_1} {V : Type u_2} {P : Type u_3} [inst : Ring R] [inst_1 : PartialOrder R]
[inst_2 : IsStrictOrderedRing R] [inst_3 : AddCommGroup V] [inst_4 : Module R V] [inst_5 : AddTorsor V P]
[inst_6 : Convexity.ConvexSpace R P] [Convexity.IsAffineConvexSpace R V P] (s t : R) (hs : 0 ≤ s) (ht : 0 ≤ t)
(h : s + t = 1) (x y : P), Convexity.convexCombPair s t hs ht h x y = (AffineMap.lineMap y x) s
convexCombPair in an affine space is the affine line map.
theorem AffineMap.isAffineMap E1 #
∀ {R : Type u_1} [inst : Ring R] [inst_1 : PartialOrder R] [inst_2 : IsStrictOrderedRing R] {V₁ : Type u_5}
{V₂ : Type u_6} {P₁ : Type u_7} {P₂ : Type u_8} [inst_3 : AddCommGroup V₁] [inst_4 : Module R V₁]
[inst_5 : AddCommGroup V₂] [inst_6 : Module R V₂] [inst_7 : Convexity.ConvexSpace R P₁] [inst_8 : AddTorsor V₁ P₁]
[Convexity.IsAffineConvexSpace R V₁ P₁] [inst_10 : Convexity.ConvexSpace R P₂] [inst_11 : AddTorsor V₂ P₂]
[Convexity.IsAffineConvexSpace R V₂ P₂] (f : P₁ →ᵃ[R] P₂), Convexity.IsAffineMap R ⇑f
Deprecated aliases
| Name | New name | Since |
|---|---|---|
AddTorsor.convexCombination_eq_affineCombination | AddTorsor.sConvexComb_eq_affineCombination | 2026-05-15 |
AddTorsor.toConvexSpace | Convexity.ConvexSpace.ofAddTorsor | 2026-07-02 |