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.

      theorem Convexity.IsAffineMap.map_sum_weights {R : Type u_2} {M : Type u_3} {N : Type u_4} {I : Type u_5} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N] {f : MN} [ConvexSpace R M] [IsModuleConvexSpace R M] [ConvexSpace R N] [IsModuleConvexSpace R N] (hf : IsAffineMap R f) (w : StdSimplex R I) (g : IM) :
      f (w.weights.sum fun (i : I) (r : R) => r g i) = w.weights.sum fun (i : I) (r : R) => r f (g i)
      theorem Convexity.IsAffineMap.map_smul_add_smul {R : Type u_2} {M : Type u_3} {N : Type u_4} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N] {f : MN} [ConvexSpace R M] [IsModuleConvexSpace R M] [ConvexSpace R N] [IsModuleConvexSpace R N] {a b : R} (hf : IsAffineMap R f) (ha : 0 a) (hb : 0 b) (hab : a + b = 1) (x y : M) :
      f (a x + b y) = a f x + b f y
      @[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)
      theorem Convexity.IsAffineMap.add {R : Type u_2} {M : Type u_3} {N : Type u_4} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N] {f g : MN} [ConvexSpace R M] [IsModuleConvexSpace R M] [ConvexSpace R N] [IsModuleConvexSpace R N] (hf : IsAffineMap R f) (hg : IsAffineMap R g) :
      IsAffineMap R (f + g)
      theorem Convexity.IsAffineMap.fun_add {R : Type u_2} {M : Type u_3} {N : Type u_4} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommMonoid M] [Module R M] [AddCommMonoid N] [Module R N] {f g : MN} [ConvexSpace R M] [IsModuleConvexSpace R M] [ConvexSpace R N] [IsModuleConvexSpace R N] (hf : IsAffineMap R f) (hg : IsAffineMap R g) :
      IsAffineMap R fun (i : M) => f i + g i

      Eta-expanded form of Convexity.IsAffineMap.add

      theorem Convexity.IsStarConvexSet.add {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] {x y : M} {s t : Set M} (hs : IsStarConvexSet R x s) (ht : IsStarConvexSet R y t) :
      IsStarConvexSet R (x + y) (s + t)
      theorem Convexity.IsAffineMap.neg {R : Type u_2} {M : Type u_3} {N : Type u_4} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N] [ConvexSpace R M] [IsModuleConvexSpace R M] [ConvexSpace R N] [IsModuleConvexSpace R N] {f : MN} (hf : IsAffineMap R f) :
      theorem Convexity.IsAffineMap.fun_neg {R : Type u_2} {M : Type u_3} {N : Type u_4} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N] [ConvexSpace R M] [IsModuleConvexSpace R M] [ConvexSpace R N] [IsModuleConvexSpace R N] {f : MN} (hf : IsAffineMap R f) :
      IsAffineMap R fun (i : M) => -f i

      Eta-expanded form of Convexity.IsAffineMap.neg

      theorem Convexity.IsAffineMap.sub {R : Type u_2} {M : Type u_3} {N : Type u_4} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N] [ConvexSpace R M] [IsModuleConvexSpace R M] [ConvexSpace R N] [IsModuleConvexSpace R N] {f g : MN} (hf : IsAffineMap R f) (hg : IsAffineMap R g) :
      IsAffineMap R (f - g)
      theorem Convexity.IsAffineMap.fun_sub {R : Type u_2} {M : Type u_3} {N : Type u_4} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup M] [Module R M] [AddCommGroup N] [Module R N] [ConvexSpace R M] [IsModuleConvexSpace R M] [ConvexSpace R N] [IsModuleConvexSpace R N] {f g : MN} (hf : IsAffineMap R f) (hg : IsAffineMap R g) :
      IsAffineMap R fun (i : M) => f i - g i

      Eta-expanded form of Convexity.IsAffineMap.sub

      theorem Convexity.IsStarConvexSet.neg {R : Type u_2} {M : Type u_3} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup M] [Module R M] [ConvexSpace R M] [IsModuleConvexSpace R M] {x : M} {s : Set M} (hs : IsStarConvexSet R x s) :
      theorem Convexity.IsStarConvexSet.sub {R : Type u_2} {M : Type u_3} [Semiring R] [PartialOrder R] [IsStrictOrderedRing R] [AddCommGroup M] [Module R M] [ConvexSpace R M] [IsModuleConvexSpace R M] {x y : M} {s t : Set M} (hs : IsStarConvexSet R x s) (ht : IsStarConvexSet R y t) :
      IsStarConvexSet R (x - y) (s - t)