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.

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) :
    βˆ….centerMass w z = 0
    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) :
    t.centerMass (c β€’ w) z = t.centerMass w z
    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) :
    t.centerMass w z ∈ (convexHull R) 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) :
    t.centerMass w z ∈ (convexHull R) 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 Finset.centroid_mem_convexHull {R : Type u_1} {E : Type u_3} [Field R] [AddCommGroup E] [Module R E] [LinearOrder R] [IsStrictOrderedRing R] (s : Finset E) (hs : s.Nonempty) :
    centroid R s id ∈ (convexHull R) ↑s
    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) :
    x ∈ (convexHull R) s

    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) :
    (x, y) ∈ (convexHull R) (s Γ—Λ’ 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.

    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)
      @[simp]
      theorem Affine.Simplex.convexHull_eq_closedInterior {π•œ : Type u_1} {V : Type u_2} [Field π•œ] [LinearOrder π•œ] [IsOrderedRing π•œ] [AddCommGroup V] [Module π•œ V] {n : β„•} (s : Simplex π•œ V n) :

      The closed interior of a simplex is the convex hull of all vertices.