Documentation

Mathlib.Analysis.Convex.Combination

Convex combinations #

This file defines convex combinations of points in a vector space.

Main declarations #

Implementation notes #

We divide by the sum of the weights in the definition of Finset.centerMass because of the way mathematical arguments go: one doesn't change weights, but merely adds some. This also makes a few lemmas unconditional on the sum of the weights being 1.

def Finset.centerMass {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] (t : Finset ฮน) (w : ฮน โ†’ R) (z : ฮน โ†’ E) :
E

Center of mass of a finite collection of points with prescribed weights. Note that we require neither 0 โ‰ค w i nor โˆ‘ w = 1.

Equations
    Instances For
      theorem Finset.centerMass_empty {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] (w : ฮน โ†’ R) (z : ฮน โ†’ E) :
      theorem Finset.centerMass_pair {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] (i j : ฮน) (w : ฮน โ†’ R) (z : ฮน โ†’ E) [DecidableEq ฮน] (hne : i โ‰  j) :
      {i, j}.centerMass w z = (w i / (w i + w j)) โ€ข z i + (w j / (w i + w j)) โ€ข z j
      theorem Finset.centerMass_insert {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] (i : ฮน) (t : Finset ฮน) {w : ฮน โ†’ R} (z : ฮน โ†’ E) [DecidableEq ฮน] (ha : i โˆ‰ t) (hw : โˆ‘ j โˆˆ t, w j โ‰  0) :
      (insert i t).centerMass w z = (w i / (w i + โˆ‘ j โˆˆ t, w j)) โ€ข z i + ((โˆ‘ j โˆˆ t, w j) / (w i + โˆ‘ j โˆˆ t, w j)) โ€ข t.centerMass w z
      theorem Finset.centerMass_singleton {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] (i : ฮน) {w : ฮน โ†’ R} (z : ฮน โ†’ E) (hw : w i โ‰  0) :
      {i}.centerMass w z = z i
      @[simp]
      theorem Finset.centerMass_neg_left {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] (t : Finset ฮน) {w : ฮน โ†’ R} (z : ฮน โ†’ E) :
      t.centerMass (-w) z = t.centerMass w z
      theorem Finset.centerMass_smul_left {R : Type u_1} {R' : Type u_2} {E : Type u_3} {ฮน : Type u_5} [Field R] [Field R'] [AddCommGroup E] [Module R E] (t : Finset ฮน) {w : ฮน โ†’ R} (z : ฮน โ†’ E) {c : R'} [Module R' R] [Module R' E] [SMulCommClass R' R R] [IsScalarTower R' R R] [SMulCommClass R R' E] [IsScalarTower R' R E] (hc : c โ‰  0) :
      theorem Finset.centerMass_eq_of_sum_1 {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] (t : Finset ฮน) {w : ฮน โ†’ R} (z : ฮน โ†’ E) (hw : โˆ‘ i โˆˆ t, w i = 1) :
      t.centerMass w z = โˆ‘ i โˆˆ t, w i โ€ข z i
      theorem Finset.centerMass_smul {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] (c : R) (t : Finset ฮน) {w : ฮน โ†’ R} (z : ฮน โ†’ E) :
      (t.centerMass w fun (i : ฮน) => c โ€ข z i) = c โ€ข t.centerMass w z
      theorem Finset.centerMass_segment' {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} {ฮน' : Type u_6} [Field R] [AddCommGroup E] [Module R E] (s : Finset ฮน) (t : Finset ฮน') (ws : ฮน โ†’ R) (zs : ฮน โ†’ E) (wt : ฮน' โ†’ R) (zt : ฮน' โ†’ E) (hws : โˆ‘ i โˆˆ s, ws i = 1) (hwt : โˆ‘ i โˆˆ t, wt i = 1) (a b : R) (hab : a + b = 1) :
      a โ€ข s.centerMass ws zs + b โ€ข t.centerMass wt zt = (s.disjSum t).centerMass (Sum.elim (fun (i : ฮน) => a * ws i) fun (j : ฮน') => b * wt j) (Sum.elim zs zt)

      A convex combination of two centers of mass is a center of mass as well. This version deals with two different index types.

      theorem Finset.centerMass_segment {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] (s : Finset ฮน) (wโ‚ wโ‚‚ : ฮน โ†’ R) (z : ฮน โ†’ E) (hwโ‚ : โˆ‘ i โˆˆ s, wโ‚ i = 1) (hwโ‚‚ : โˆ‘ i โˆˆ s, wโ‚‚ i = 1) (a b : R) (hab : a + b = 1) :
      a โ€ข s.centerMass wโ‚ z + b โ€ข s.centerMass wโ‚‚ z = s.centerMass (fun (i : ฮน) => a * wโ‚ i + b * wโ‚‚ i) z

      A convex combination of two centers of mass is a center of mass as well. This version works if two centers of mass share the set of original points.

      theorem Finset.centerMass_ite_eq {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] (i : ฮน) (t : Finset ฮน) (z : ฮน โ†’ E) [DecidableEq ฮน] (hi : i โˆˆ t) :
      t.centerMass (fun (j : ฮน) => if i = j then 1 else 0) z = z i
      theorem Finset.centerMass_subset {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {t : Finset ฮน} {w : ฮน โ†’ R} (z : ฮน โ†’ E) {t' : Finset ฮน} (ht : t โІ t') (h : โˆ€ i โˆˆ t', i โˆ‰ t โ†’ w i = 0) :
      t.centerMass w z = t'.centerMass w z
      theorem Finset.centerMass_filter_ne_zero {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {t : Finset ฮน} {w : ฮน โ†’ R} (z : ฮน โ†’ E) [(i : ฮน) โ†’ Decidable (w i โ‰  0)] :
      {i โˆˆ t | w i โ‰  0}.centerMass w z = t.centerMass w z
      theorem Finset.centerMass_le_sup {R : Type u_1} {ฮน : Type u_5} {ฮฑ : Type u_7} [Field R] [AddCommGroup ฮฑ] [LinearOrder ฮฑ] [Module R ฮฑ] [LinearOrder R] [IsOrderedAddMonoid ฮฑ] [PosSMulMono R ฮฑ] {s : Finset ฮน} {f : ฮน โ†’ ฮฑ} {w : ฮน โ†’ R} (hwโ‚€ : โˆ€ i โˆˆ s, 0 โ‰ค w i) (hwโ‚ : 0 < โˆ‘ i โˆˆ s, w i) :
      s.centerMass w f โ‰ค s.sup' โ‹ฏ f
      theorem Finset.inf_le_centerMass {R : Type u_1} {ฮน : Type u_5} {ฮฑ : Type u_7} [Field R] [AddCommGroup ฮฑ] [LinearOrder ฮฑ] [Module R ฮฑ] [LinearOrder R] [IsOrderedAddMonoid ฮฑ] [PosSMulMono R ฮฑ] {s : Finset ฮน} {f : ฮน โ†’ ฮฑ} {w : ฮน โ†’ R} (hwโ‚€ : โˆ€ i โˆˆ s, 0 โ‰ค w i) (hwโ‚ : 0 < โˆ‘ i โˆˆ s, w i) :
      s.inf' โ‹ฏ f โ‰ค s.centerMass w f
      theorem Finset.centerMass_const {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {t : Finset ฮน} {w : ฮน โ†’ R} (hw : โˆ‘ j โˆˆ t, w j โ‰  0) (c : E) :
      t.centerMass w (Function.const ฮน c) = c
      theorem Finset.centerMass_congr {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {t : Finset ฮน} {w : ฮน โ†’ R} {z : ฮน โ†’ E} [DecidableEq ฮน] {t' : Finset ฮน} {w' : ฮน โ†’ R} {z' : ฮน โ†’ E} (h : โˆ€ (i : ฮน), i โˆˆ t โˆง w i โ‰  0 โˆจ i โˆˆ t' โˆง w' i โ‰  0 โ†’ i โˆˆ t โˆฉ t' โˆง w i = w' i โˆง z i = z' i) :
      t.centerMass w z = t'.centerMass w' z'
      theorem Finset.centerMass_congr_finset {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {t : Finset ฮน} {w : ฮน โ†’ R} {z : ฮน โ†’ E} [DecidableEq ฮน] {t' : Finset ฮน} (h : โˆ€ i โˆˆ t โˆช t', w i โ‰  0 โ†’ i โˆˆ t โˆฉ t') :
      t.centerMass w z = t'.centerMass w z
      theorem Finset.centerMass_congr_weights {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {t : Finset ฮน} {w : ฮน โ†’ R} {z : ฮน โ†’ E} {w' : ฮน โ†’ R} (h : โˆ€ i โˆˆ t, w i = w' i) :
      t.centerMass w z = t.centerMass w' z
      theorem Finset.centerMass_congr_fun {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {t : Finset ฮน} {w : ฮน โ†’ R} {z z' : ฮน โ†’ E} (h : โˆ€ i โˆˆ t, w i โ‰  0 โ†’ z i = z' i) :
      t.centerMass w z = t.centerMass w z'
      theorem Finset.centerMass_of_sum_add_sum_eq_zero {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {w : ฮน โ†’ R} {z : ฮน โ†’ E} {s t : Finset ฮน} (hw : โˆ‘ i โˆˆ s, w i + โˆ‘ i โˆˆ t, w i = 0) (hz : โˆ‘ i โˆˆ s, w i โ€ข z i + โˆ‘ i โˆˆ t, w i โ€ข z i = 0) :
      s.centerMass w z = t.centerMass w z
      theorem Convex.centerMass_mem {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {s : Set E} {t : Finset ฮน} {w : ฮน โ†’ R} {z : ฮน โ†’ E} [LinearOrder R] [IsStrictOrderedRing R] (hs : Convex R s) :
      (โˆ€ i โˆˆ t, 0 โ‰ค w i) โ†’ 0 < โˆ‘ i โˆˆ t, w i โ†’ (โˆ€ i โˆˆ t, z i โˆˆ s) โ†’ t.centerMass w z โˆˆ s

      The center of mass of a finite subset of a convex set belongs to the set provided that all weights are non-negative, and the total weight is positive.

      theorem Convex.sum_mem {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {s : Set E} {t : Finset ฮน} {w : ฮน โ†’ R} {z : ฮน โ†’ E} [LinearOrder R] [IsStrictOrderedRing R] (hs : Convex R s) (hโ‚€ : โˆ€ i โˆˆ t, 0 โ‰ค w i) (hโ‚ : โˆ‘ i โˆˆ t, w i = 1) (hz : โˆ€ i โˆˆ t, z i โˆˆ s) :
      โˆ‘ i โˆˆ t, w i โ€ข z i โˆˆ s
      theorem Convex.finsum_mem {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {ฮน : Sort u_8} {w : ฮน โ†’ R} {z : ฮน โ†’ E} {s : Set E} (hs : Convex R s) (hโ‚€ : โˆ€ (i : ฮน), 0 โ‰ค w i) (hโ‚ : โˆ‘แถ  (i : ฮน), w i = 1) (hz : โˆ€ (i : ฮน), w i โ‰  0 โ†’ z i โˆˆ s) :
      โˆ‘แถ  (i : ฮน), w i โ€ข z i โˆˆ s

      A version of Convex.sum_mem for finsums. If s is a convex set, w : ฮน โ†’ R is a family of nonnegative weights with sum one and z : ฮน โ†’ E is a family of elements of a module over R such that z i โˆˆ s whenever w i โ‰  0, then the sum โˆ‘แถ  i, w i โ€ข z i belongs to s. See also PartitionOfUnity.finsum_smul_mem_convex.

      theorem convex_iff_sum_mem {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] {s : Set E} [LinearOrder R] [IsStrictOrderedRing R] :
      Convex R s โ†” โˆ€ (t : Finset E) (w : E โ†’ R), (โˆ€ i โˆˆ t, 0 โ‰ค w i) โ†’ โˆ‘ i โˆˆ t, w i = 1 โ†’ (โˆ€ x โˆˆ t, x โˆˆ s) โ†’ โˆ‘ x โˆˆ t, w x โ€ข x โˆˆ s
      theorem Finset.centerMass_mem_convexHull {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {s : Set E} [LinearOrder R] [IsStrictOrderedRing R] (t : Finset ฮน) {w : ฮน โ†’ R} (hwโ‚€ : โˆ€ i โˆˆ t, 0 โ‰ค w i) (hws : 0 < โˆ‘ i โˆˆ t, w i) {z : ฮน โ†’ E} (hz : โˆ€ i โˆˆ t, z i โˆˆ s) :
      theorem Finset.centerMass_mem_convexHull_of_nonpos {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] {s : Set E} {w : ฮน โ†’ R} {z : ฮน โ†’ E} [LinearOrder R] [IsStrictOrderedRing R] (t : Finset ฮน) (hwโ‚€ : โˆ€ i โˆˆ t, w i โ‰ค 0) (hws : โˆ‘ i โˆˆ t, w i < 0) (hz : โˆ€ i โˆˆ t, z i โˆˆ s) :

      A version of Finset.centerMass_mem_convexHull for when the weights are nonpositive.

      theorem Finset.centerMass_id_mem_convexHull {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (t : Finset E) {w : E โ†’ R} (hwโ‚€ : โˆ€ i โˆˆ t, 0 โ‰ค w i) (hws : 0 < โˆ‘ i โˆˆ t, w i) :
      t.centerMass w id โˆˆ (convexHull R) โ†‘t

      A refinement of Finset.centerMass_mem_convexHull when the indexed family is a Finset of the space.

      theorem Finset.centerMass_id_mem_convexHull_of_nonpos {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (t : Finset E) {w : E โ†’ R} (hwโ‚€ : โˆ€ i โˆˆ t, w i โ‰ค 0) (hws : โˆ‘ i โˆˆ t, w i < 0) :
      t.centerMass w id โˆˆ (convexHull R) โ†‘t

      A version of Finset.centerMass_mem_convexHull for when the weights are nonpositive.

      theorem affineCombination_eq_centerMass {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] {ฮน : Type u_8} {t : Finset ฮน} {p : ฮน โ†’ E} {w : ฮน โ†’ R} (hwโ‚‚ : โˆ‘ i โˆˆ t, w i = 1) :
      theorem affineCombination_mem_convexHull {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {s : Finset ฮน} {v : ฮน โ†’ E} {w : ฮน โ†’ R} (hwโ‚€ : โˆ€ i โˆˆ s, 0 โ‰ค w i) (hwโ‚ : s.sum w = 1) :
      @[simp]
      theorem Finset.centroid_eq_centerMass {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (s : Finset ฮน) (hs : s.Nonempty) (p : ฮน โ†’ E) :

      The centroid can be regarded as a center of mass.

      theorem convexHull_range_eq_exists_affineCombination {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (v : ฮน โ†’ E) :
      (convexHull R) (Set.range v) = {x : E | โˆƒ (s : Finset ฮน) (w : ฮน โ†’ R), (โˆ€ i โˆˆ s, 0 โ‰ค w i) โˆง s.sum w = 1 โˆง (Finset.affineCombination R s v) w = x}
      theorem convexHull_eq {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (s : Set E) :
      (convexHull R) s = {x : E | โˆƒ (ฮน : Type) (t : Finset ฮน) (w : ฮน โ†’ R) (z : ฮน โ†’ E), (โˆ€ i โˆˆ t, 0 โ‰ค w i) โˆง โˆ‘ i โˆˆ t, w i = 1 โˆง (โˆ€ i โˆˆ t, z i โˆˆ s) โˆง t.centerMass w z = x}

      Convex hull of s is equal to the set of all centers of masses of Finsets t, z '' t โІ s. For universe reasons, you shouldn't use this lemma to prove that a given center of mass belongs to the convex hull. Use convexity of the convex hull instead.

      theorem mem_convexHull_of_exists_fintype {R : Type u_1} {E : Type u_3} {ฮน : Type u_5} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {s : Set E} {x : E} [Fintype ฮน] (w : ฮน โ†’ R) (z : ฮน โ†’ E) (hwโ‚€ : โˆ€ (i : ฮน), 0 โ‰ค w i) (hwโ‚ : โˆ‘ i : ฮน, w i = 1) (hz : โˆ€ (i : ฮน), z i โˆˆ s) (hx : โˆ‘ i : ฮน, w i โ€ข z i = x) :

      Universe polymorphic version of the reverse implication of mem_convexHull_iff_exists_fintype.

      theorem mem_convexHull_iff_exists_fintype {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {s : Set E} {x : E} :
      x โˆˆ (convexHull R) s โ†” โˆƒ (ฮน : Type) (x_1 : Fintype ฮน) (w : ฮน โ†’ R) (z : ฮน โ†’ E), (โˆ€ (i : ฮน), 0 โ‰ค w i) โˆง โˆ‘ i : ฮน, w i = 1 โˆง (โˆ€ (i : ฮน), z i โˆˆ s) โˆง โˆ‘ i : ฮน, w i โ€ข z i = x

      The convex hull of s is equal to the set of centers of masses of finite families of points in s.

      For universe reasons, you shouldn't use this lemma to prove that a given center of mass belongs to the convex hull. Use mem_convexHull_of_exists_fintype of the convex hull instead.

      theorem Finset.convexHull_eq {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (s : Finset E) :
      (convexHull R) โ†‘s = {x : E | โˆƒ (w : E โ†’ R), (โˆ€ y โˆˆ s, 0 โ‰ค w y) โˆง โˆ‘ y โˆˆ s, w y = 1 โˆง s.centerMass w id = x}
      theorem Finset.mem_convexHull {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {s : Finset E} {x : E} :
      x โˆˆ (convexHull R) โ†‘s โ†” โˆƒ (w : E โ†’ R), (โˆ€ y โˆˆ s, 0 โ‰ค w y) โˆง โˆ‘ y โˆˆ s, w y = 1 โˆง s.centerMass w id = x
      theorem Finset.mem_convexHull' {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {s : Finset E} {x : E} :
      x โˆˆ (convexHull R) โ†‘s โ†” โˆƒ (w : E โ†’ R), (โˆ€ y โˆˆ s, 0 โ‰ค w y) โˆง โˆ‘ y โˆˆ s, w y = 1 โˆง โˆ‘ y โˆˆ s, w y โ€ข y = x

      This is a version of Finset.mem_convexHull stated without Finset.centerMass.

      theorem Set.Finite.convexHull_eq {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {s : Set E} (hs : s.Finite) :
      (convexHull R) s = {x : E | โˆƒ (w : E โ†’ R), (โˆ€ y โˆˆ s, 0 โ‰ค w y) โˆง โˆ‘ y โˆˆ hs.toFinset, w y = 1 โˆง hs.toFinset.centerMass w id = x}
      theorem convexHull_eq_union_convexHull_finite_subsets {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (s : Set E) :
      (convexHull R) s = โ‹ƒ (t : Finset E), โ‹ƒ (_ : โ†‘t โІ s), (convexHull R) โ†‘t

      A weak version of Carathรฉodory's theorem.

      theorem vectorSpan_segment {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {pโ‚ pโ‚‚ : E} :
      vectorSpan R (segment R pโ‚ pโ‚‚) = R โˆ™ (pโ‚‚ -แตฅ pโ‚)

      The vectorSpan of a segment is the span of the difference of its endpoints.

      theorem mk_mem_convexHull_prod {R : Type u_1} {E : Type u_3} {F : Type u_4} [Field R] [AddCommGroup E] [AddCommGroup F] [Module R E] [Module R F] {s : Set E} [LinearOrder R] [IsStrictOrderedRing R] {t : Set F} {x : E} {y : F} (hx : x โˆˆ (convexHull R) s) (hy : y โˆˆ (convexHull R) t) :
      @[simp]
      theorem convexHull_prod {R : Type u_1} {E : Type u_3} {F : Type u_4} [Field R] [AddCommGroup E] [AddCommGroup F] [Module R E] [Module R F] [LinearOrder R] [IsStrictOrderedRing R] (s : Set E) (t : Set F) :
      theorem convexHull_add {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (s t : Set E) :
      (convexHull R) (s + t) = (convexHull R) s + (convexHull R) t
      noncomputable def convexHullAddMonoidHom (R : Type u_1) (E : Type u_3) [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] :

      convexHull is an additive monoid morphism under pointwise addition.

      Equations
        Instances For
          theorem convexHull_sub {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (s t : Set E) :
          (convexHull R) (s - t) = (convexHull R) s - (convexHull R) t
          theorem convexHull_list_sum {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (l : List (Set E)) :
          (convexHull R) l.sum = (List.map (โ‡‘(convexHull R)) l).sum
          theorem convexHull_sum {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {ฮน : Type u_8} (s : Finset ฮน) (t : ฮน โ†’ Set E) :
          (convexHull R) (โˆ‘ i โˆˆ s, t i) = โˆ‘ i โˆˆ s, (convexHull R) (t i)
          theorem AffineBasis.convexHull_eq_nonneg_coord {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {ฮน : Type u_8} (b : AffineBasis ฮน R E) :
          (convexHull R) (Set.range โ‡‘b) = {x : E | โˆ€ (i : ฮน), 0 โ‰ค (b.coord i) x}

          The convex hull of an affine basis is the intersection of the half-spaces defined by the corresponding barycentric coordinates.

          theorem AffineIndependent.convexHull_inter {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {s tโ‚ tโ‚‚ : Finset E} (hs : AffineIndependent R Subtype.val) (htโ‚ : tโ‚ โІ s) (htโ‚‚ : tโ‚‚ โІ s) :
          (convexHull R) (โ†‘tโ‚ โˆฉ โ†‘tโ‚‚) = (convexHull R) โ†‘tโ‚ โˆฉ (convexHull R) โ†‘tโ‚‚

          Two simplices glue nicely if the union of their vertices is affine independent.

          theorem AffineIndependent.convexHull_inter' {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] {tโ‚ tโ‚‚ : Finset E} [DecidableEq E] (hs : AffineIndependent R Subtype.val) :
          (convexHull R) (โ†‘tโ‚ โˆฉ โ†‘tโ‚‚) = (convexHull R) โ†‘tโ‚ โˆฉ (convexHull R) โ†‘tโ‚‚

          Two simplices glue nicely if the union of their vertices is affine independent.

          Note that AffineIndependent.convexHull_inter should be more versatile in most use cases.

          theorem mem_convexHull_pi {๐•œ : Type u_1} {ฮน : Type u_2} {E : ฮน โ†’ Type u_3} [Finite ฮน] [Field ๐•œ] [LinearOrder ๐•œ] [IsStrictOrderedRing ๐•œ] [(i : ฮน) โ†’ AddCommGroup (E i)] [(i : ฮน) โ†’ Module ๐•œ (E i)] {s : Set ฮน} {t : (i : ฮน) โ†’ Set (E i)} {x : (i : ฮน) โ†’ E i} (h : โˆ€ i โˆˆ s, x i โˆˆ (convexHull ๐•œ) (t i)) :
          x โˆˆ (convexHull ๐•œ) (s.pi t)
          @[simp]
          theorem convexHull_pi {๐•œ : Type u_1} {ฮน : Type u_2} {E : ฮน โ†’ Type u_3} [Finite ฮน] [Field ๐•œ] [LinearOrder ๐•œ] [IsStrictOrderedRing ๐•œ] [(i : ฮน) โ†’ AddCommGroup (E i)] [(i : ฮน) โ†’ Module ๐•œ (E i)] (s : Set ฮน) (t : (i : ฮน) โ†’ Set (E i)) :
          (convexHull ๐•œ) (s.pi t) = s.pi fun (i : ฮน) => (convexHull ๐•œ) (t i)