Documentation

Mathlib.LinearAlgebra.AffineSpace.Combination

Affine combinations of points #

This file defines affine combinations of points.

Main definitions #

These definitions are for sums over a Finset; versions for a Fintype may be obtained using Finset.univ, while versions for a Finsupp may be obtained using Finsupp.support.

References #

theorem Finset.univ_fin2 :
Finset.univ = {0, 1}
def Finset.weightedVSubOfPoint {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (p : ιP) (b : P) :
(ιk) →ₗ[k] V

A weighted sum of the results of subtracting a base point from the given points, as a linear map on the weights. The main cases of interest are where the sum of the weights is 0, in which case the sum is independent of the choice of base point, and where the sum of the weights is 1, in which case the sum added to the base point is independent of the choice of base point.

Equations
Instances For
    @[simp]
    theorem Finset.weightedVSubOfPoint_apply {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (b : P) :
    (s.weightedVSubOfPoint p b) w = is, w i (p i -ᵥ b)
    @[simp]
    theorem Finset.weightedVSubOfPoint_apply_const {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : P) (b : P) :
    (s.weightedVSubOfPoint (fun (x : ι) => p) b) w = (is, w i) (p -ᵥ b)

    The value of weightedVSubOfPoint, where the given points are equal.

    theorem Finset.weightedVSubOfPoint_congr {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) {w₁ : ιk} {w₂ : ιk} (hw : is, w₁ i = w₂ i) {p₁ : ιP} {p₂ : ιP} (hp : is, p₁ i = p₂ i) (b : P) :
    (s.weightedVSubOfPoint p₁ b) w₁ = (s.weightedVSubOfPoint p₂ b) w₂

    weightedVSubOfPoint gives equal results for two families of weights and two families of points that are equal on s.

    theorem Finset.weightedVSubOfPoint_eq_of_weights_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (p : ιP) (j : ι) (w₁ : ιk) (w₂ : ιk) (hw : ∀ (i : ι), i jw₁ i = w₂ i) :
    (s.weightedVSubOfPoint p (p j)) w₁ = (s.weightedVSubOfPoint p (p j)) w₂

    Given a family of points, if we use a member of the family as a base point, the weightedVSubOfPoint does not depend on the value of the weights at this point.

    theorem Finset.weightedVSubOfPoint_eq_of_sum_eq_zero {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (h : is, w i = 0) (b₁ : P) (b₂ : P) :
    (s.weightedVSubOfPoint p b₁) w = (s.weightedVSubOfPoint p b₂) w

    The weighted sum is independent of the base point when the sum of the weights is 0.

    theorem Finset.weightedVSubOfPoint_vadd_eq_of_sum_eq_one {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (h : is, w i = 1) (b₁ : P) (b₂ : P) :
    (s.weightedVSubOfPoint p b₁) w +ᵥ b₁ = (s.weightedVSubOfPoint p b₂) w +ᵥ b₂

    The weighted sum, added to the base point, is independent of the base point when the sum of the weights is 1.

    @[simp]
    theorem Finset.weightedVSubOfPoint_erase {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] (w : ιk) (p : ιP) (i : ι) :
    ((s.erase i).weightedVSubOfPoint p (p i)) w = (s.weightedVSubOfPoint p (p i)) w

    The weighted sum is unaffected by removing the base point, if present, from the set of points.

    @[simp]
    theorem Finset.weightedVSubOfPoint_insert {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] (w : ιk) (p : ιP) (i : ι) :
    ((insert i s).weightedVSubOfPoint p (p i)) w = (s.weightedVSubOfPoint p (p i)) w

    The weighted sum is unaffected by adding the base point, whether or not present, to the set of points.

    theorem Finset.weightedVSubOfPoint_indicator_subset {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (w : ιk) (p : ιP) (b : P) {s₁ : Finset ι} {s₂ : Finset ι} (h : s₁ s₂) :
    (s₁.weightedVSubOfPoint p b) w = (s₂.weightedVSubOfPoint p b) ((s₁).indicator w)

    The weighted sum is unaffected by changing the weights to the corresponding indicator function and adding points to the set.

    theorem Finset.weightedVSubOfPoint_map {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} {ι₂ : Type u_5} (s₂ : Finset ι₂) (e : ι₂ ι) (w : ιk) (p : ιP) (b : P) :
    ((Finset.map e s₂).weightedVSubOfPoint p b) w = (s₂.weightedVSubOfPoint (p e) b) (w e)

    A weighted sum, over the image of an embedding, equals a weighted sum with the same points and weights over the original Finset.

    theorem Finset.sum_smul_vsub_eq_weightedVSubOfPoint_sub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p₁ : ιP) (p₂ : ιP) (b : P) :
    is, w i (p₁ i -ᵥ p₂ i) = (s.weightedVSubOfPoint p₁ b) w - (s.weightedVSubOfPoint p₂ b) w

    A weighted sum of pairwise subtractions, expressed as a subtraction of two weightedVSubOfPoint expressions.

    theorem Finset.sum_smul_vsub_const_eq_weightedVSubOfPoint_sub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p₁ : ιP) (p₂ : P) (b : P) :
    is, w i (p₁ i -ᵥ p₂) = (s.weightedVSubOfPoint p₁ b) w - (is, w i) (p₂ -ᵥ b)

    A weighted sum of pairwise subtractions, where the point on the right is constant, expressed as a subtraction involving a weightedVSubOfPoint expression.

    theorem Finset.sum_smul_const_vsub_eq_sub_weightedVSubOfPoint {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p₂ : ιP) (p₁ : P) (b : P) :
    is, w i (p₁ -ᵥ p₂ i) = (is, w i) (p₁ -ᵥ b) - (s.weightedVSubOfPoint p₂ b) w

    A weighted sum of pairwise subtractions, where the point on the left is constant, expressed as a subtraction involving a weightedVSubOfPoint expression.

    theorem Finset.weightedVSubOfPoint_sdiff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] {s₂ : Finset ι} (h : s₂ s) (w : ιk) (p : ιP) (b : P) :
    ((s \ s₂).weightedVSubOfPoint p b) w + (s₂.weightedVSubOfPoint p b) w = (s.weightedVSubOfPoint p b) w

    A weighted sum may be split into such sums over two subsets.

    theorem Finset.weightedVSubOfPoint_sdiff_sub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] {s₂ : Finset ι} (h : s₂ s) (w : ιk) (p : ιP) (b : P) :
    ((s \ s₂).weightedVSubOfPoint p b) w - (s₂.weightedVSubOfPoint p b) (-w) = (s.weightedVSubOfPoint p b) w

    A weighted sum may be split into a subtraction of such sums over two subsets.

    theorem Finset.weightedVSubOfPoint_subtype_eq_filter {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (b : P) (pred : ιProp) [DecidablePred pred] :
    (((Finset.subtype pred s).weightedVSubOfPoint (fun (i : Subtype pred) => p i) b) fun (i : Subtype pred) => w i) = ((Finset.filter pred s).weightedVSubOfPoint p b) w

    A weighted sum over s.subtype pred equals one over s.filter pred.

    theorem Finset.weightedVSubOfPoint_filter_of_ne {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (b : P) {pred : ιProp} [DecidablePred pred] (h : is, w i 0pred i) :
    ((Finset.filter pred s).weightedVSubOfPoint p b) w = (s.weightedVSubOfPoint p b) w

    A weighted sum over s.filter pred equals one over s if all the weights at indices in s not satisfying pred are zero.

    theorem Finset.weightedVSubOfPoint_const_smul {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (b : P) (c : k) :
    (s.weightedVSubOfPoint p b) (c w) = c (s.weightedVSubOfPoint p b) w

    A constant multiplier of the weights in weightedVSubOfPoint may be moved outside the sum.

    def Finset.weightedVSub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (p : ιP) :
    (ιk) →ₗ[k] V

    A weighted sum of the results of subtracting a default base point from the given points, as a linear map on the weights. This is intended to be used when the sum of the weights is 0; that condition is specified as a hypothesis on those lemmas that require it.

    Equations
    Instances For
      theorem Finset.weightedVSub_apply {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) :
      (s.weightedVSub p) w = is, w i (p i -ᵥ Classical.choice )

      Applying weightedVSub with given weights. This is for the case where a result involving a default base point is OK (for example, when that base point will cancel out later); a more typical use case for weightedVSub would involve selecting a preferred base point with weightedVSub_eq_weightedVSubOfPoint_of_sum_eq_zero and then using weightedVSubOfPoint_apply.

      theorem Finset.weightedVSub_eq_weightedVSubOfPoint_of_sum_eq_zero {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (h : is, w i = 0) (b : P) :
      (s.weightedVSub p) w = (s.weightedVSubOfPoint p b) w

      weightedVSub gives the sum of the results of subtracting any base point, when the sum of the weights is 0.

      @[simp]
      theorem Finset.weightedVSub_apply_const {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : P) (h : is, w i = 0) :
      (s.weightedVSub fun (x : ι) => p) w = 0

      The value of weightedVSub, where the given points are equal and the sum of the weights is 0.

      @[simp]
      theorem Finset.weightedVSub_empty {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (w : ιk) (p : ιP) :
      (.weightedVSub p) w = 0

      The weightedVSub for an empty set is 0.

      theorem Finset.weightedVSub_congr {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) {w₁ : ιk} {w₂ : ιk} (hw : is, w₁ i = w₂ i) {p₁ : ιP} {p₂ : ιP} (hp : is, p₁ i = p₂ i) :
      (s.weightedVSub p₁) w₁ = (s.weightedVSub p₂) w₂

      weightedVSub gives equal results for two families of weights and two families of points that are equal on s.

      theorem Finset.weightedVSub_indicator_subset {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (w : ιk) (p : ιP) {s₁ : Finset ι} {s₂ : Finset ι} (h : s₁ s₂) :
      (s₁.weightedVSub p) w = (s₂.weightedVSub p) ((s₁).indicator w)

      The weighted sum is unaffected by changing the weights to the corresponding indicator function and adding points to the set.

      theorem Finset.weightedVSub_map {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} {ι₂ : Type u_5} (s₂ : Finset ι₂) (e : ι₂ ι) (w : ιk) (p : ιP) :
      ((Finset.map e s₂).weightedVSub p) w = (s₂.weightedVSub (p e)) (w e)

      A weighted subtraction, over the image of an embedding, equals a weighted subtraction with the same points and weights over the original Finset.

      theorem Finset.sum_smul_vsub_eq_weightedVSub_sub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p₁ : ιP) (p₂ : ιP) :
      is, w i (p₁ i -ᵥ p₂ i) = (s.weightedVSub p₁) w - (s.weightedVSub p₂) w

      A weighted sum of pairwise subtractions, expressed as a subtraction of two weightedVSub expressions.

      theorem Finset.sum_smul_vsub_const_eq_weightedVSub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p₁ : ιP) (p₂ : P) (h : is, w i = 0) :
      is, w i (p₁ i -ᵥ p₂) = (s.weightedVSub p₁) w

      A weighted sum of pairwise subtractions, where the point on the right is constant and the sum of the weights is 0.

      theorem Finset.sum_smul_const_vsub_eq_neg_weightedVSub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p₂ : ιP) (p₁ : P) (h : is, w i = 0) :
      is, w i (p₁ -ᵥ p₂ i) = -(s.weightedVSub p₂) w

      A weighted sum of pairwise subtractions, where the point on the left is constant and the sum of the weights is 0.

      theorem Finset.weightedVSub_sdiff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] {s₂ : Finset ι} (h : s₂ s) (w : ιk) (p : ιP) :
      ((s \ s₂).weightedVSub p) w + (s₂.weightedVSub p) w = (s.weightedVSub p) w

      A weighted sum may be split into such sums over two subsets.

      theorem Finset.weightedVSub_sdiff_sub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] {s₂ : Finset ι} (h : s₂ s) (w : ιk) (p : ιP) :
      ((s \ s₂).weightedVSub p) w - (s₂.weightedVSub p) (-w) = (s.weightedVSub p) w

      A weighted sum may be split into a subtraction of such sums over two subsets.

      theorem Finset.weightedVSub_subtype_eq_filter {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (pred : ιProp) [DecidablePred pred] :
      (((Finset.subtype pred s).weightedVSub fun (i : Subtype pred) => p i) fun (i : Subtype pred) => w i) = ((Finset.filter pred s).weightedVSub p) w

      A weighted sum over s.subtype pred equals one over s.filter pred.

      theorem Finset.weightedVSub_filter_of_ne {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) {pred : ιProp} [DecidablePred pred] (h : is, w i 0pred i) :
      ((Finset.filter pred s).weightedVSub p) w = (s.weightedVSub p) w

      A weighted sum over s.filter pred equals one over s if all the weights at indices in s not satisfying pred are zero.

      theorem Finset.weightedVSub_const_smul {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (c : k) :
      (s.weightedVSub p) (c w) = c (s.weightedVSub p) w

      A constant multiplier of the weights in weightedVSub_of may be moved outside the sum.

      instance Finset.instAddTorsorForall {k : Type u_1} [Ring k] {ι : Type u_4} :
      AddTorsor (ιk) (ιk)
      Equations
      • Finset.instAddTorsorForall = Pi.instAddTorsor
      def Finset.affineCombination (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (p : ιP) :
      (ιk) →ᵃ[k] P

      A weighted sum of the results of subtracting a default base point from the given points, added to that base point, as an affine map on the weights. This is intended to be used when the sum of the weights is 1, in which case it is an affine combination (barycenter) of the points with the given weights; that condition is specified as a hypothesis on those lemmas that require it.

      Equations
      Instances For
        @[simp]
        theorem Finset.affineCombination_linear (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (p : ιP) :
        (Finset.affineCombination k s p).linear = s.weightedVSub p

        The linear map corresponding to affineCombination is weightedVSub.

        theorem Finset.affineCombination_apply {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) :
        (Finset.affineCombination k s p) w = (s.weightedVSubOfPoint p (Classical.choice )) w +ᵥ Classical.choice

        Applying affineCombination with given weights. This is for the case where a result involving a default base point is OK (for example, when that base point will cancel out later); a more typical use case for affineCombination would involve selecting a preferred base point with affineCombination_eq_weightedVSubOfPoint_vadd_of_sum_eq_one and then using weightedVSubOfPoint_apply.

        @[simp]
        theorem Finset.affineCombination_apply_const {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : P) (h : is, w i = 1) :
        (Finset.affineCombination k s fun (x : ι) => p) w = p

        The value of affineCombination, where the given points are equal.

        theorem Finset.affineCombination_congr {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) {w₁ : ιk} {w₂ : ιk} (hw : is, w₁ i = w₂ i) {p₁ : ιP} {p₂ : ιP} (hp : is, p₁ i = p₂ i) :
        (Finset.affineCombination k s p₁) w₁ = (Finset.affineCombination k s p₂) w₂

        affineCombination gives equal results for two families of weights and two families of points that are equal on s.

        theorem Finset.affineCombination_eq_weightedVSubOfPoint_vadd_of_sum_eq_one {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (h : is, w i = 1) (b : P) :
        (Finset.affineCombination k s p) w = (s.weightedVSubOfPoint p b) w +ᵥ b

        affineCombination gives the sum with any base point, when the sum of the weights is 1.

        theorem Finset.weightedVSub_vadd_affineCombination {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w₁ : ιk) (w₂ : ιk) (p : ιP) :
        (s.weightedVSub p) w₁ +ᵥ (Finset.affineCombination k s p) w₂ = (Finset.affineCombination k s p) (w₁ + w₂)

        Adding a weightedVSub to an affineCombination.

        theorem Finset.affineCombination_vsub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w₁ : ιk) (w₂ : ιk) (p : ιP) :
        (Finset.affineCombination k s p) w₁ -ᵥ (Finset.affineCombination k s p) w₂ = (s.weightedVSub p) (w₁ - w₂)

        Subtracting two affineCombinations.

        theorem Finset.attach_affineCombination_of_injective {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] [DecidableEq P] (s : Finset P) (w : Pk) (f : { x : P // x s }P) (hf : Function.Injective f) :
        (Finset.affineCombination k s.attach f) (w f) = (Finset.affineCombination k (Finset.image f Finset.univ) id) w
        theorem Finset.attach_affineCombination_coe {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] (s : Finset P) (w : Pk) :
        (Finset.affineCombination k s.attach Subtype.val) (w Subtype.val) = (Finset.affineCombination k s id) w
        @[simp]
        theorem Finset.weightedVSub_eq_linear_combination {k : Type u_1} {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {ι : Type u_6} (s : Finset ι) {w : ιk} {p : ιV} (hw : s.sum w = 0) :
        (s.weightedVSub p) w = is, w i p i

        Viewing a module as an affine space modelled on itself, a weightedVSub is just a linear combination.

        @[simp]
        theorem Finset.affineCombination_eq_linear_combination {k : Type u_1} {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {ι : Type u_4} (s : Finset ι) (p : ιV) (w : ιk) (hw : is, w i = 1) :
        (Finset.affineCombination k s p) w = is, w i p i

        Viewing a module as an affine space modelled on itself, affine combinations are just linear combinations.

        @[simp]
        theorem Finset.affineCombination_of_eq_one_of_eq_zero {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) {i : ι} (his : i s) (hwi : w i = 1) (hw0 : i2s, i2 iw i2 = 0) :

        An affineCombination equals a point if that point is in the set and has weight 1 and the other points in the set have weight 0.

        theorem Finset.affineCombination_indicator_subset {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (w : ιk) (p : ιP) {s₁ : Finset ι} {s₂ : Finset ι} (h : s₁ s₂) :
        (Finset.affineCombination k s₁ p) w = (Finset.affineCombination k s₂ p) ((s₁).indicator w)

        An affine combination is unaffected by changing the weights to the corresponding indicator function and adding points to the set.

        theorem Finset.affineCombination_map {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} {ι₂ : Type u_5} (s₂ : Finset ι₂) (e : ι₂ ι) (w : ιk) (p : ιP) :
        (Finset.affineCombination k (Finset.map e s₂) p) w = (Finset.affineCombination k s₂ (p e)) (w e)

        An affine combination, over the image of an embedding, equals an affine combination with the same points and weights over the original Finset.

        theorem Finset.sum_smul_vsub_eq_affineCombination_vsub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p₁ : ιP) (p₂ : ιP) :
        is, w i (p₁ i -ᵥ p₂ i) = (Finset.affineCombination k s p₁) w -ᵥ (Finset.affineCombination k s p₂) w

        A weighted sum of pairwise subtractions, expressed as a subtraction of two affineCombination expressions.

        theorem Finset.sum_smul_vsub_const_eq_affineCombination_vsub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p₁ : ιP) (p₂ : P) (h : is, w i = 1) :
        is, w i (p₁ i -ᵥ p₂) = (Finset.affineCombination k s p₁) w -ᵥ p₂

        A weighted sum of pairwise subtractions, where the point on the right is constant and the sum of the weights is 1.

        theorem Finset.sum_smul_const_vsub_eq_vsub_affineCombination {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p₂ : ιP) (p₁ : P) (h : is, w i = 1) :
        is, w i (p₁ -ᵥ p₂ i) = p₁ -ᵥ (Finset.affineCombination k s p₂) w

        A weighted sum of pairwise subtractions, where the point on the left is constant and the sum of the weights is 1.

        theorem Finset.affineCombination_sdiff_sub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] {s₂ : Finset ι} (h : s₂ s) (w : ιk) (p : ιP) :
        (Finset.affineCombination k (s \ s₂) p) w -ᵥ (Finset.affineCombination k s₂ p) (-w) = (s.weightedVSub p) w

        A weighted sum may be split into a subtraction of affine combinations over two subsets.

        theorem Finset.affineCombination_eq_of_weightedVSub_eq_zero_of_eq_neg_one {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) {w : ιk} {p : ιP} (hw : (s.weightedVSub p) w = 0) {i : ι} [DecidablePred fun (x : ι) => x i] (his : i s) (hwi : w i = -1) :
        (Finset.affineCombination k (Finset.filter (fun (x : ι) => x i) s) p) w = p i

        If a weighted sum is zero and one of the weights is -1, the corresponding point is the affine combination of the other points with the given weights.

        theorem Finset.affineCombination_subtype_eq_filter {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) (pred : ιProp) [DecidablePred pred] :
        ((Finset.affineCombination k (Finset.subtype pred s) fun (i : Subtype pred) => p i) fun (i : Subtype pred) => w i) = (Finset.affineCombination k (Finset.filter pred s) p) w

        An affine combination over s.subtype pred equals one over s.filter pred.

        theorem Finset.affineCombination_filter_of_ne {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) (p : ιP) {pred : ιProp} [DecidablePred pred] (h : is, w i 0pred i) :

        An affine combination over s.filter pred equals one over s if all the weights at indices in s not satisfying pred are zero.

        theorem Finset.eq_weightedVSubOfPoint_subset_iff_eq_weightedVSubOfPoint_subtype {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} {v : V} {x : k} {s : Set ι} {p : ιP} {b : P} :
        (∃ (fs : Finset ι), fs s ∃ (w : ιk), ifs, w i = x v = (fs.weightedVSubOfPoint p b) w) ∃ (fs : Finset s) (w : sk), ifs, w i = x v = (fs.weightedVSubOfPoint (fun (i : s) => p i) b) w

        Suppose an indexed family of points is given, along with a subset of the index type. A vector can be expressed as weightedVSubOfPoint using a Finset lying within that subset and with a given sum of weights if and only if it can be expressed as weightedVSubOfPoint with that sum of weights for the corresponding indexed family whose index type is the subtype corresponding to that subset.

        theorem Finset.eq_weightedVSub_subset_iff_eq_weightedVSub_subtype (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} {v : V} {s : Set ι} {p : ιP} :
        (∃ (fs : Finset ι), fs s ∃ (w : ιk), ifs, w i = 0 v = (fs.weightedVSub p) w) ∃ (fs : Finset s) (w : sk), ifs, w i = 0 v = (fs.weightedVSub fun (i : s) => p i) w

        Suppose an indexed family of points is given, along with a subset of the index type. A vector can be expressed as weightedVSub using a Finset lying within that subset and with sum of weights 0 if and only if it can be expressed as weightedVSub with sum of weights 0 for the corresponding indexed family whose index type is the subtype corresponding to that subset.

        theorem Finset.eq_affineCombination_subset_iff_eq_affineCombination_subtype (k : Type u_1) (V : Type u_2) {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} {p0 : P} {s : Set ι} {p : ιP} :
        (∃ (fs : Finset ι), fs s ∃ (w : ιk), ifs, w i = 1 p0 = (Finset.affineCombination k fs p) w) ∃ (fs : Finset s) (w : sk), ifs, w i = 1 p0 = (Finset.affineCombination k fs fun (i : s) => p i) w

        Suppose an indexed family of points is given, along with a subset of the index type. A point can be expressed as an affineCombination using a Finset lying within that subset and with sum of weights 1 if and only if it can be expressed an affineCombination with sum of weights 1 for the corresponding indexed family whose index type is the subtype corresponding to that subset.

        theorem Finset.map_affineCombination {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) {V₂ : Type u_6} {P₂ : Type u_7} [AddCommGroup V₂] [Module k V₂] [AddTorsor V₂ P₂] (p : ιP) (w : ιk) (hw : s.sum w = 1) (f : P →ᵃ[k] P₂) :

        Affine maps commute with affine combinations.

        def Finset.affineCombinationSingleWeights (k : Type u_1) [Ring k] {ι : Type u_4} [DecidableEq ι] (i : ι) :
        ιk

        Weights for expressing a single point as an affine combination.

        Equations
        Instances For
          @[simp]
          theorem Finset.affineCombinationSingleWeights_apply_of_ne (k : Type u_1) [Ring k] {ι : Type u_4} [DecidableEq ι] {i : ι} {j : ι} (h : j i) :
          @[simp]
          theorem Finset.sum_affineCombinationSingleWeights (k : Type u_1) [Ring k] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] {i : ι} (h : i s) :
          def Finset.weightedVSubVSubWeights (k : Type u_1) [Ring k] {ι : Type u_4} [DecidableEq ι] (i : ι) (j : ι) :
          ιk

          Weights for expressing the subtraction of two points as a weightedVSub.

          Equations
          Instances For
            @[simp]
            theorem Finset.weightedVSubVSubWeights_self (k : Type u_1) [Ring k] {ι : Type u_4} [DecidableEq ι] (i : ι) :
            @[simp]
            theorem Finset.weightedVSubVSubWeights_apply_left (k : Type u_1) [Ring k] {ι : Type u_4} [DecidableEq ι] {i : ι} {j : ι} (h : i j) :
            @[simp]
            theorem Finset.weightedVSubVSubWeights_apply_right (k : Type u_1) [Ring k] {ι : Type u_4} [DecidableEq ι] {i : ι} {j : ι} (h : i j) :
            @[simp]
            theorem Finset.weightedVSubVSubWeights_apply_of_ne (k : Type u_1) [Ring k] {ι : Type u_4} [DecidableEq ι] {i : ι} {j : ι} {t : ι} (hi : t i) (hj : t j) :
            @[simp]
            theorem Finset.sum_weightedVSubVSubWeights (k : Type u_1) [Ring k] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] {i : ι} {j : ι} (hi : i s) (hj : j s) :
            ts, Finset.weightedVSubVSubWeights k i j t = 0
            def Finset.affineCombinationLineMapWeights {k : Type u_1} [Ring k] {ι : Type u_4} [DecidableEq ι] (i : ι) (j : ι) (c : k) :
            ιk

            Weights for expressing lineMap as an affine combination.

            Equations
            Instances For
              @[simp]
              theorem Finset.affineCombinationLineMapWeights_apply_left {k : Type u_1} [Ring k] {ι : Type u_4} [DecidableEq ι] {i : ι} {j : ι} (h : i j) (c : k) :
              @[simp]
              theorem Finset.affineCombinationLineMapWeights_apply_right {k : Type u_1} [Ring k] {ι : Type u_4} [DecidableEq ι] {i : ι} {j : ι} (h : i j) (c : k) :
              @[simp]
              theorem Finset.affineCombinationLineMapWeights_apply_of_ne {k : Type u_1} [Ring k] {ι : Type u_4} [DecidableEq ι] {i : ι} {j : ι} {t : ι} (hi : t i) (hj : t j) (c : k) :
              @[simp]
              theorem Finset.sum_affineCombinationLineMapWeights {k : Type u_1} [Ring k] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] {i : ι} {j : ι} (hi : i s) (hj : j s) (c : k) :
              @[simp]
              theorem Finset.affineCombination_affineCombinationSingleWeights (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] (p : ιP) {i : ι} (hi : i s) :

              An affine combination with affineCombinationSingleWeights gives the specified point.

              @[simp]
              theorem Finset.weightedVSub_weightedVSubVSubWeights (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] (p : ιP) {i : ι} {j : ι} (hi : i s) (hj : j s) :
              (s.weightedVSub p) (Finset.weightedVSubVSubWeights k i j) = p i -ᵥ p j

              A weighted subtraction with weightedVSubVSubWeights gives the result of subtracting the specified points.

              @[simp]
              theorem Finset.affineCombination_affineCombinationLineMapWeights {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [S : AddTorsor V P] {ι : Type u_4} (s : Finset ι) [DecidableEq ι] (p : ιP) {i : ι} {j : ι} (hi : i s) (hj : j s) (c : k) :

              An affine combination with affineCombinationLineMapWeights gives the result of line_map.

              def Finset.centroidWeights (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) :
              ιk

              The weights for the centroid of some points.

              Equations
              Instances For
                @[simp]
                theorem Finset.centroidWeights_apply (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) (i : ι) :
                Finset.centroidWeights k s i = (s.card)⁻¹

                centroidWeights at any point.

                theorem Finset.centroidWeights_eq_const (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) :

                centroidWeights equals a constant function.

                theorem Finset.sum_centroidWeights_eq_one_of_cast_card_ne_zero {k : Type u_1} [DivisionRing k] {ι : Type u_4} (s : Finset ι) (h : s.card 0) :
                is, Finset.centroidWeights k s i = 1

                The weights in the centroid sum to 1, if the number of points, converted to k, is not zero.

                theorem Finset.sum_centroidWeights_eq_one_of_card_ne_zero (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) [CharZero k] (h : s.card 0) :
                is, Finset.centroidWeights k s i = 1

                In the characteristic zero case, the weights in the centroid sum to 1 if the number of points is not zero.

                theorem Finset.sum_centroidWeights_eq_one_of_nonempty (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) [CharZero k] (h : s.Nonempty) :
                is, Finset.centroidWeights k s i = 1

                In the characteristic zero case, the weights in the centroid sum to 1 if the set is nonempty.

                theorem Finset.sum_centroidWeights_eq_one_of_card_eq_add_one (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) [CharZero k] {n : } (h : s.card = n + 1) :
                is, Finset.centroidWeights k s i = 1

                In the characteristic zero case, the weights in the centroid sum to 1 if the number of points is n + 1.

                def Finset.centroid (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} (s : Finset ι) (p : ιP) :
                P

                The centroid of some points. Although defined for any s, this is intended to be used in the case where the number of points, converted to k, is not zero.

                Equations
                Instances For
                  theorem Finset.centroid_def (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} (s : Finset ι) (p : ιP) :

                  The definition of the centroid.

                  theorem Finset.centroid_univ (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] (s : Finset P) :
                  Finset.centroid k Finset.univ Subtype.val = Finset.centroid k s id
                  @[simp]
                  theorem Finset.centroid_singleton (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} (p : ιP) (i : ι) :
                  Finset.centroid k {i} p = p i

                  The centroid of a single point.

                  theorem Finset.centroid_pair (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} [DecidableEq ι] [Invertible 2] (p : ιP) (i₁ : ι) (i₂ : ι) :
                  Finset.centroid k {i₁, i₂} p = 2⁻¹ (p i₂ -ᵥ p i₁) +ᵥ p i₁

                  The centroid of two points, expressed directly as adding a vector to a point.

                  theorem Finset.centroid_pair_fin (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] [Invertible 2] (p : Fin 2P) :
                  Finset.centroid k Finset.univ p = 2⁻¹ (p 1 -ᵥ p 0) +ᵥ p 0

                  The centroid of two points indexed by Fin 2, expressed directly as adding a vector to the first point.

                  theorem Finset.centroid_map (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} {ι₂ : Type u_5} (s₂ : Finset ι₂) (e : ι₂ ι) (p : ιP) :
                  Finset.centroid k (Finset.map e s₂) p = Finset.centroid k s₂ (p e)

                  A centroid, over the image of an embedding, equals a centroid with the same points and weights over the original Finset.

                  def Finset.centroidWeightsIndicator (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) :
                  ιk

                  centroidWeights gives the weights for the centroid as a constant function, which is suitable when summing over the points whose centroid is being taken. This function gives the weights in a form suitable for summing over a larger set of points, as an indicator function that is zero outside the set whose centroid is being taken. In the case of a Fintype, the sum may be over univ.

                  Equations
                  Instances For
                    theorem Finset.sum_centroidWeightsIndicator (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) [Fintype ι] :
                    i : ι, Finset.centroidWeightsIndicator k s i = is, Finset.centroidWeights k s i

                    The sum of the weights for the centroid indexed by a Fintype.

                    theorem Finset.sum_centroidWeightsIndicator_eq_one_of_card_ne_zero (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) [CharZero k] [Fintype ι] (h : s.card 0) :

                    In the characteristic zero case, the weights in the centroid indexed by a Fintype sum to 1 if the number of points is not zero.

                    theorem Finset.sum_centroidWeightsIndicator_eq_one_of_nonempty (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) [CharZero k] [Fintype ι] (h : s.Nonempty) :

                    In the characteristic zero case, the weights in the centroid indexed by a Fintype sum to 1 if the set is nonempty.

                    theorem Finset.sum_centroidWeightsIndicator_eq_one_of_card_eq_add_one (k : Type u_1) [DivisionRing k] {ι : Type u_4} (s : Finset ι) [CharZero k] [Fintype ι] {n : } (h : s.card = n + 1) :

                    In the characteristic zero case, the weights in the centroid indexed by a Fintype sum to 1 if the number of points is n + 1.

                    theorem Finset.centroid_eq_affineCombination_fintype (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} (s : Finset ι) [Fintype ι] (p : ιP) :

                    The centroid as an affine combination over a Fintype.

                    theorem Finset.centroid_eq_centroid_image_of_inj_on (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} (s : Finset ι) {p : ιP} (hi : is, js, p i = p ji = j) {ps : Set P} [Fintype ps] (hps : ps = p '' s) :
                    Finset.centroid k s p = Finset.centroid k Finset.univ fun (x : ps) => x

                    An indexed family of points that is injective on the given Finset has the same centroid as the image of that Finset. This is stated in terms of a set equal to the image to provide control of definitional equality for the index type used for the centroid of the image.

                    theorem Finset.centroid_eq_of_inj_on_of_image_eq (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} (s : Finset ι) {ι₂ : Type u_5} (s₂ : Finset ι₂) {p : ιP} (hi : is, js, p i = p ji = j) {p₂ : ι₂P} (hi₂ : is₂, js₂, p₂ i = p₂ ji = j) (he : p '' s = p₂ '' s₂) :

                    Two indexed families of points that are injective on the given Finsets and with the same points in the image of those Finsets have the same centroid.

                    theorem weightedVSub_mem_vectorSpan {ι : Type u_1} {k : Type u_2} {V : Type u_3} {P : Type u_4} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {s : Finset ι} {w : ιk} (h : is, w i = 0) (p : ιP) :
                    (s.weightedVSub p) w vectorSpan k (Set.range p)

                    A weightedVSub with sum of weights 0 is in the vectorSpan of an indexed family.

                    theorem affineCombination_mem_affineSpan {ι : Type u_1} {k : Type u_2} {V : Type u_3} {P : Type u_4} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] [Nontrivial k] {s : Finset ι} {w : ιk} (h : is, w i = 1) (p : ιP) :

                    An affineCombination with sum of weights 1 is in the affineSpan of an indexed family, if the underlying ring is nontrivial.

                    theorem mem_vectorSpan_iff_eq_weightedVSub {ι : Type u_1} (k : Type u_2) {V : Type u_3} {P : Type u_4} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {v : V} {p : ιP} :
                    v vectorSpan k (Set.range p) ∃ (s : Finset ι) (w : ιk), is, w i = 0 v = (s.weightedVSub p) w

                    A vector is in the vectorSpan of an indexed family if and only if it is a weightedVSub with sum of weights 0.

                    theorem eq_affineCombination_of_mem_affineSpan {ι : Type u_1} {k : Type u_2} {V : Type u_3} {P : Type u_4} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {p1 : P} {p : ιP} (h : p1 affineSpan k (Set.range p)) :
                    ∃ (s : Finset ι) (w : ιk), is, w i = 1 p1 = (Finset.affineCombination k s p) w

                    A point in the affineSpan of an indexed family is an affineCombination with sum of weights 1. See also eq_affineCombination_of_mem_affineSpan_of_fintype.

                    theorem eq_affineCombination_of_mem_affineSpan_of_fintype {ι : Type u_1} {k : Type u_2} {V : Type u_3} {P : Type u_4} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] [Fintype ι] {p1 : P} {p : ιP} (h : p1 affineSpan k (Set.range p)) :
                    ∃ (w : ιk), i : ι, w i = 1 p1 = (Finset.affineCombination k Finset.univ p) w
                    theorem mem_affineSpan_iff_eq_affineCombination {ι : Type u_1} (k : Type u_2) (V : Type u_3) {P : Type u_4} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] [Nontrivial k] {p1 : P} {p : ιP} :
                    p1 affineSpan k (Set.range p) ∃ (s : Finset ι) (w : ιk), is, w i = 1 p1 = (Finset.affineCombination k s p) w

                    A point is in the affineSpan of an indexed family if and only if it is an affineCombination with sum of weights 1, provided the underlying ring is nontrivial.

                    theorem mem_affineSpan_iff_eq_weightedVSubOfPoint_vadd {ι : Type u_1} (k : Type u_2) (V : Type u_3) {P : Type u_4} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] [Nontrivial k] (p : ιP) (j : ι) (q : P) :
                    q affineSpan k (Set.range p) ∃ (s : Finset ι) (w : ιk), q = (s.weightedVSubOfPoint p (p j)) w +ᵥ p j

                    Given a family of points together with a chosen base point in that family, membership of the affine span of this family corresponds to an identity in terms of weightedVSubOfPoint, with weights that are not required to sum to 1.

                    theorem affineSpan_eq_affineSpan_lineMap_units {k : Type u_2} {V : Type u_3} {P : Type u_4} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] [Nontrivial k] {s : Set P} {p : P} (hp : p s) (w : skˣ) :
                    affineSpan k (Set.range fun (q : s) => (AffineMap.lineMap p q) (w q)) = affineSpan k s

                    Given a set of points, together with a chosen base point in this set, if we affinely transport all other members of the set along the line joining them to this base point, the affine span is unchanged.

                    theorem centroid_mem_affineSpan_of_cast_card_ne_zero {k : Type u_1} {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} {s : Finset ι} (p : ιP) (h : s.card 0) :

                    The centroid lies in the affine span if the number of points, converted to k, is not zero.

                    theorem centroid_mem_affineSpan_of_card_ne_zero (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} [CharZero k] {s : Finset ι} (p : ιP) (h : s.card 0) :

                    In the characteristic zero case, the centroid lies in the affine span if the number of points is not zero.

                    theorem centroid_mem_affineSpan_of_nonempty (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} [CharZero k] {s : Finset ι} (p : ιP) (h : s.Nonempty) :

                    In the characteristic zero case, the centroid lies in the affine span if the set is nonempty.

                    theorem centroid_mem_affineSpan_of_card_eq_add_one (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} [CharZero k] {s : Finset ι} (p : ιP) {n : } (h : s.card = n + 1) :

                    In the characteristic zero case, the centroid lies in the affine span if the number of points is n + 1.

                    def AffineMap.weightedVSubOfPoint {k : Type u_1} {V : Type u_2} (P : Type u_3) [CommRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} (s : Finset ι) (w : ιk) :
                    (ιP) × P →ᵃ[k] V

                    A weighted sum, as an affine map on the points involved.

                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For