Documentation

Mathlib.Geometry.Convex.ConvexSpace.Module

Modules are convex spaces #

This file shows that every module over ordered coefficients is a convex space.

Main declarations #

@[implicit_reducible]

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
Instances For

    Typeclass for a convex space structure on a module to be given by weighted sums.

    Instances
      @[deprecated Convexity.IsModuleConvexSpace.sConvexComb_eq_sum (since := "2026-04-03")]
      theorem convexCombination_eq_sum {R : Type u_2} {M : Type u_3} {inst✝ : Semiring R} {inst✝¹ : PartialOrder R} {inst✝² : IsStrictOrderedRing R} {inst✝³ : AddCommMonoid M} {inst✝⁴ : Module R M} {inst✝⁵ : Convexity.ConvexSpace R M} [self : Convexity.IsModuleConvexSpace R M] (w : Convexity.StdSimplex R M) :
      Convexity.sConvexComb w = w.weights.sum fun (m : M) (r : R) => r m

      Alias of Convexity.IsModuleConvexSpace.sConvexComb_eq_sum.

      @[simp]
      theorem Convexity.iConvexComb_eq_sum {R : Type u_2} {M : Type u_3} {I : Type u_5} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommMonoid M] [Module R M] [ConvexSpace R M] [IsModuleConvexSpace R M] (w : StdSimplex R I) (f : IM) :
      iConvexComb w f = w.weights.sum fun (i : I) (r : R) => r f i

      iConvexComb in a module can be expressed as a sum.

      @[simp]
      theorem Convexity.convexCombPair_eq_sum {R : Type u_2} {M : Type u_3} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommMonoid M] [Module R M] [ConvexSpace R M] [IsModuleConvexSpace R M] (a b : R) (ha : 0 a) (hb : 0 b) (hab : a + b = 1) (x y : M) :
      convexCombPair a b ha hb hab x y = a x + b y

      convexCombPair in a module can be expressed as a sum.

      @[simp]
      theorem Convexity.isConvexSet_coe {F : Type u_1} {R : Type u_2} {M : Type u_3} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommMonoid M] [Module R M] [SetLike F M] [AddSubmonoidClass F M] [SMulMemClass F R M] [ConvexSpace R M] [IsModuleConvexSpace R M] (S : F) :
      @[implicit_reducible]
      noncomputable instance Convexity.instConvexSpaceSubtypeMem {F : Type u_1} {R : Type u_2} {M : Type u_3} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommMonoid M] [Module R M] [SetLike F M] [AddSubmonoidClass F M] [SMulMemClass F R M] [ConvexSpace R M] [IsModuleConvexSpace R M] (S : F) :
      Equations
      theorem Convexity.subtypeVal_submodule_iConvexComb {F : Type u_1} {R : Type u_2} {M : Type u_3} {I : Type u_5} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommMonoid M] [Module R M] [SetLike F M] [AddSubmonoidClass F M] [SMulMemClass F R M] [ConvexSpace R M] [IsModuleConvexSpace R M] (S : F) (w : StdSimplex R I) (f : IS) :
      (iConvexComb w f) = iConvexComb w fun (i : I) => (f i)
      theorem Convexity.subtypeVal_submodule_convexCombPair {F : Type u_1} {R : Type u_2} {M : Type u_3} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommMonoid M] [Module R M] [SetLike F M] [AddSubmonoidClass F M] [SMulMemClass F R M] [ConvexSpace R M] [IsModuleConvexSpace R M] (S : F) (a b : R) (ha : 0 a) (hb : 0 b) (hab : a + b = 1) (x y : S) :
      (convexCombPair a b ha hb hab x y) = convexCombPair a b ha hb hab x y
      instance Convexity.instIsModuleConvexSpaceForall {R : Type u_2} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] {ι : Type u_6} {M : ιType u_7} [(i : ι) → AddCommMonoid (M i)] [(i : ι) → Module R (M i)] [(i : ι) → ConvexSpace R (M i)] [∀ (i : ι), IsModuleConvexSpace R (M i)] :
      IsModuleConvexSpace R ((i : ι) → M i)