Documentation

Mathlib.LinearAlgebra.AffineSpace.Independent

Affine independence #

This file defines affinely independent families of points.

Main definitions #

References #

def AffineIndependent (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} (p : ฮน โ†’ P) :

An indexed family is said to be affinely independent if no nontrivial weighted subtractions (where the sum of weights is 0) are 0.

Equations
    Instances For
      theorem affineIndependent_def (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} (p : ฮน โ†’ P) :
      AffineIndependent k p โ†” โˆ€ (s : Finset ฮน) (w : ฮน โ†’ k), โˆ‘ i โˆˆ s, w i = 0 โ†’ (s.weightedVSub p) w = 0 โ†’ โˆ€ i โˆˆ s, w i = 0

      The definition of AffineIndependent.

      theorem affineIndependent_of_subsingleton (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Subsingleton ฮน] (p : ฮน โ†’ P) :

      A family with at most one point is affinely independent.

      theorem affineIndependent_iff_of_fintype (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Fintype ฮน] (p : ฮน โ†’ P) :
      AffineIndependent k p โ†” โˆ€ (w : ฮน โ†’ k), โˆ‘ i : ฮน, w i = 0 โ†’ (Finset.univ.weightedVSub p) w = 0 โ†’ โˆ€ (i : ฮน), w i = 0

      A family indexed by a Fintype is affinely independent if and only if no nontrivial weighted subtractions over Finset.univ (where the sum of the weights is 0) are 0.

      @[simp]
      theorem affineIndependent_vadd (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} {v : V} :
      theorem AffineIndependent.of_vadd (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} {v : V} :

      Alias of the forward direction of affineIndependent_vadd.

      theorem AffineIndependent.vadd (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} {v : V} :

      Alias of the reverse direction of affineIndependent_vadd.

      @[simp]
      theorem affineIndependent_smul (k : Type u_1) {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {ฮน : Type u_4} {G : Type u_5} [Group G] [DistribMulAction G V] [SMulCommClass G k V] {p : ฮน โ†’ V} {a : G} :
      theorem AffineIndependent.smul (k : Type u_1) {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {ฮน : Type u_4} {G : Type u_5} [Group G] [DistribMulAction G V] [SMulCommClass G k V] {p : ฮน โ†’ V} {a : G} :

      Alias of the reverse direction of affineIndependent_smul.

      theorem AffineIndependent.of_smul (k : Type u_1) {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {ฮน : Type u_4} {G : Type u_5} [Group G] [DistribMulAction G V] [SMulCommClass G k V] {p : ฮน โ†’ V} {a : G} :

      Alias of the forward direction of affineIndependent_smul.

      theorem affineIndependent_iff_linearIndependent_vsub (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} (p : ฮน โ†’ P) (i1 : ฮน) :
      AffineIndependent k p โ†” LinearIndependent k fun (i : { x : ฮน // x โ‰  i1 }) => p โ†‘i -แตฅ p i1

      A family is affinely independent if and only if the differences from a base point in that family are linearly independent.

      theorem affineIndependent_set_iff_linearIndependent_vsub (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {s : Set P} {pโ‚ : P} (hpโ‚ : pโ‚ โˆˆ s) :
      (AffineIndependent k fun (p : โ†‘s) => โ†‘p) โ†” LinearIndependent k fun (v : โ†‘((fun (p : P) => p -แตฅ pโ‚) '' (s \ {pโ‚}))) => โ†‘v

      A set is affinely independent if and only if the differences from a base point in that set are linearly independent.

      theorem linearIndependent_set_iff_affineIndependent_vadd_union_singleton (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {s : Set V} (hs : โˆ€ v โˆˆ s, v โ‰  0) (pโ‚ : P) :
      (LinearIndependent k fun (v : โ†‘s) => โ†‘v) โ†” AffineIndependent k fun (p : โ†‘({pโ‚} โˆช (fun (v : V) => v +แตฅ pโ‚) '' s)) => โ†‘p

      A set of nonzero vectors is linearly independent if and only if, given a point pโ‚, the vectors added to pโ‚ and pโ‚ itself are affinely independent.

      theorem affineIndependent_iff_indicator_eq_of_affineCombination_eq (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} (p : ฮน โ†’ P) :
      AffineIndependent k p โ†” โˆ€ (s1 s2 : Finset ฮน) (w1 w2 : ฮน โ†’ k), โˆ‘ i โˆˆ s1, w1 i = 1 โ†’ โˆ‘ i โˆˆ s2, w2 i = 1 โ†’ (Finset.affineCombination k s1 p) w1 = (Finset.affineCombination k s2 p) w2 โ†’ (โ†‘s1).indicator w1 = (โ†‘s2).indicator w2

      A family is affinely independent if and only if any affine combinations (with sum of weights 1) that evaluate to the same point have equal Set.indicator.

      theorem affineIndependent_iff_eq_of_fintype_affineCombination_eq (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Fintype ฮน] (p : ฮน โ†’ P) :
      AffineIndependent k p โ†” โˆ€ (w1 w2 : ฮน โ†’ k), โˆ‘ i : ฮน, w1 i = 1 โ†’ โˆ‘ i : ฮน, w2 i = 1 โ†’ (Finset.affineCombination k Finset.univ p) w1 = (Finset.affineCombination k Finset.univ p) w2 โ†’ w1 = w2

      A finite family is affinely independent if and only if any affine combinations (with sum of weights 1) that evaluate to the same point are equal.

      theorem AffineIndependent.units_lineMap {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (hp : AffineIndependent k p) (j : ฮน) (w : ฮน โ†’ kหฃ) :
      AffineIndependent k fun (i : ฮน) => (AffineMap.lineMap (p j) (p i)) โ†‘(w i)

      If we single out one member of an affine-independent family of points and affinely transport all others along the line joining them to this member, the resulting new family of points is affine- independent.

      This is the affine version of LinearIndependent.units_smul.

      theorem AffineIndependent.indicator_eq_of_affineCombination_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (ha : AffineIndependent k p) (sโ‚ sโ‚‚ : Finset ฮน) (wโ‚ wโ‚‚ : ฮน โ†’ k) (hwโ‚ : โˆ‘ i โˆˆ sโ‚, wโ‚ i = 1) (hwโ‚‚ : โˆ‘ i โˆˆ sโ‚‚, wโ‚‚ i = 1) (h : (Finset.affineCombination k sโ‚ p) wโ‚ = (Finset.affineCombination k sโ‚‚ p) wโ‚‚) :
      (โ†‘sโ‚).indicator wโ‚ = (โ†‘sโ‚‚).indicator wโ‚‚
      theorem AffineIndependent.affineCombination_eq_iff_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (ha : AffineIndependent k p) {wโ‚ wโ‚‚ : ฮน โ†’ k} {s : Finset ฮน} (hwโ‚ : โˆ‘ i โˆˆ s, wโ‚ i = 1) (hwโ‚‚ : โˆ‘ i โˆˆ s, wโ‚‚ i = 1) :
      (Finset.affineCombination k s p) wโ‚ = (Finset.affineCombination k s p) wโ‚‚ โ†” โˆ€ i โˆˆ s, wโ‚ i = wโ‚‚ i

      Given an affinely independent family of points, two affine combinations (with sum of weights 1) are equal if and only if their weights are pointwise equal.

      theorem AffineIndependent.injective {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Nontrivial k] {p : ฮน โ†’ P} (ha : AffineIndependent k p) :

      An affinely independent family is injective, if the underlying ring is nontrivial.

      theorem AffineIndependent.comp_embedding {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {ฮน2 : Type u_5} (f : ฮน2 โ†ช ฮน) {p : ฮน โ†’ P} (ha : AffineIndependent k p) :
      AffineIndependent k (p โˆ˜ โ‡‘f)

      If a family is affinely independent, so is any subfamily given by composition of an embedding into index type with the original family.

      theorem AffineIndependent.subtype {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (ha : AffineIndependent k p) (s : Set ฮน) :
      AffineIndependent k fun (i : โ†‘s) => p โ†‘i

      If a family is affinely independent, so is any subfamily indexed by a subtype of the index type.

      theorem AffineIndependent.range {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (ha : AffineIndependent k p) :
      AffineIndependent k fun (x : โ†‘(Set.range p)) => โ†‘x

      If an indexed family of points is affinely independent, so is the corresponding set of points.

      theorem affineIndependent_equiv {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {ฮน' : Type u_5} (e : ฮน โ‰ƒ ฮน') {p : ฮน' โ†’ P} :
      theorem AffineIndependent.comm_left {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {pโ‚ pโ‚‚ pโ‚ƒ : P} (h : AffineIndependent k ![pโ‚, pโ‚‚, pโ‚ƒ]) :
      AffineIndependent k ![pโ‚‚, pโ‚, pโ‚ƒ]

      Swapping the first two points preserves affine independence.

      theorem AffineIndependent.comm_right {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {pโ‚ pโ‚‚ pโ‚ƒ : P} (h : AffineIndependent k ![pโ‚, pโ‚‚, pโ‚ƒ]) :
      AffineIndependent k ![pโ‚, pโ‚ƒ, pโ‚‚]

      Swapping the last two points preserves affine independence.

      theorem AffineIndependent.reverse_of_three {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {pโ‚ pโ‚‚ pโ‚ƒ : P} (h : AffineIndependent k ![pโ‚, pโ‚‚, pโ‚ƒ]) :
      AffineIndependent k ![pโ‚ƒ, pโ‚‚, pโ‚]

      Reversing the order of three points preserves affine independence.

      theorem AffineIndependent.mono {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {s t : Set P} (ha : AffineIndependent k fun (x : โ†‘t) => โ†‘x) (hs : s โІ t) :
      AffineIndependent k fun (x : โ†‘s) => โ†‘x

      If a set of points is affinely independent, so is any subset.

      theorem AffineIndependent.of_set_of_injective {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (ha : AffineIndependent k fun (x : โ†‘(Set.range p)) => โ†‘x) (hi : Function.Injective p) :

      If the range of an injective indexed family of points is affinely independent, so is that family.

      theorem AffineIndependent.eq_zero_of_affineCombination_mem_affineSpan {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (ha : AffineIndependent k p) {fs : Finset ฮน} {w : ฮน โ†’ k} (hw : โˆ‘ i โˆˆ fs, w i = 1) {s : Set ฮน} (hm : (Finset.affineCombination k fs p) w โˆˆ affineSpan k (p '' s)) {i : ฮน} (hifs : i โˆˆ fs) (his : i โˆ‰ s) :
      w i = 0

      If an affine combination of affinely independent points lies in the affine span of a subset of those points, all weights outside that subset are zero.

      theorem AffineIndependent.indicator_extend_eq_of_affineCombination_comp_embedding_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {ฮนโ‚‚ : Type u_5} {p : ฮน โ†’ P} (ha : AffineIndependent k p) {sโ‚ : Finset ฮน} {sโ‚‚ : Finset ฮนโ‚‚} {wโ‚ : ฮน โ†’ k} {wโ‚‚ : ฮนโ‚‚ โ†’ k} (hwโ‚ : โˆ‘ i โˆˆ sโ‚, wโ‚ i = 1) (hwโ‚‚ : โˆ‘ i โˆˆ sโ‚‚, wโ‚‚ i = 1) (e : ฮนโ‚‚ โ†ช ฮน) (h : (Finset.affineCombination k sโ‚‚ (p โˆ˜ โ‡‘e)) wโ‚‚ = (Finset.affineCombination k sโ‚ p) wโ‚) :
      (โ†‘(Finset.map e sโ‚‚)).indicator (Function.extend (โ‡‘e) wโ‚‚ 0) = (โ†‘sโ‚).indicator wโ‚
      theorem AffineIndependent.indicator_extend_eq_of_affineCombination_comp_embedding_eq_of_fintype {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Fintype ฮน] {ฮนโ‚‚ : Type u_5} [Fintype ฮนโ‚‚] {p : ฮน โ†’ P} (ha : AffineIndependent k p) {wโ‚ : ฮน โ†’ k} {wโ‚‚ : ฮนโ‚‚ โ†’ k} (hwโ‚ : โˆ‘ i : ฮน, wโ‚ i = 1) (hwโ‚‚ : โˆ‘ i : ฮนโ‚‚, wโ‚‚ i = 1) (e : ฮนโ‚‚ โ†ช ฮน) (h : (Finset.affineCombination k Finset.univ (p โˆ˜ โ‡‘e)) wโ‚‚ = (Finset.affineCombination k Finset.univ p) wโ‚) :
      (Set.range โ‡‘e).indicator (Function.extend (โ‡‘e) wโ‚‚ 0) = wโ‚
      theorem AffineIndependent.of_comp {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {Vโ‚‚ : Type u_5} {Pโ‚‚ : Type u_6} [AddCommGroup Vโ‚‚] [Module k Vโ‚‚] [AddTorsor Vโ‚‚ Pโ‚‚] {p : ฮน โ†’ P} (f : P โ†’แตƒ[k] Pโ‚‚) (hai : AffineIndependent k (โ‡‘f โˆ˜ p)) :

      If the image of a family of points in affine space under an affine transformation is affine- independent, then the original family of points is also affine-independent.

      theorem AffineIndependent.map' {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {Vโ‚‚ : Type u_5} {Pโ‚‚ : Type u_6} [AddCommGroup Vโ‚‚] [Module k Vโ‚‚] [AddTorsor Vโ‚‚ Pโ‚‚] {p : ฮน โ†’ P} (hai : AffineIndependent k p) (f : P โ†’แตƒ[k] Pโ‚‚) (hf : Function.Injective โ‡‘f) :
      AffineIndependent k (โ‡‘f โˆ˜ p)

      The image of a family of points in affine space, under an injective affine transformation, is affine-independent.

      theorem AffineMap.affineIndependent_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {Vโ‚‚ : Type u_5} {Pโ‚‚ : Type u_6} [AddCommGroup Vโ‚‚] [Module k Vโ‚‚] [AddTorsor Vโ‚‚ Pโ‚‚] {p : ฮน โ†’ P} (f : P โ†’แตƒ[k] Pโ‚‚) (hf : Function.Injective โ‡‘f) :

      Injective affine maps preserve affine independence.

      theorem AffineEquiv.affineIndependent_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {Vโ‚‚ : Type u_5} {Pโ‚‚ : Type u_6} [AddCommGroup Vโ‚‚] [Module k Vโ‚‚] [AddTorsor Vโ‚‚ Pโ‚‚] {p : ฮน โ†’ P} (e : P โ‰ƒแตƒ[k] Pโ‚‚) :

      Affine equivalences preserve affine independence of families of points.

      theorem AffineEquiv.affineIndependent_set_of_eq_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {Vโ‚‚ : Type u_5} {Pโ‚‚ : Type u_6} [AddCommGroup Vโ‚‚] [Module k Vโ‚‚] [AddTorsor Vโ‚‚ Pโ‚‚] {s : Set P} (e : P โ‰ƒแตƒ[k] Pโ‚‚) :

      Affine equivalences preserve affine independence of subsets.

      theorem AffineIndependent.inf_affineSpan_eq_affineSpan_inter {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Nontrivial k] {p : ฮน โ†’ P} (ha : AffineIndependent k p) (sโ‚ sโ‚‚ : Set ฮน) :
      affineSpan k (p '' sโ‚) โŠ“ affineSpan k (p '' sโ‚‚) = affineSpan k (p '' (sโ‚ โˆฉ sโ‚‚))

      If a family is affinely independent, the infimum of the affine spans of points indexed by two subsets equals the affine span of points indexed by the intersection of those subsets, if the underlying ring is nontrivial.

      theorem AffineIndependent.exists_mem_inter_of_exists_mem_inter_affineSpan {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Nontrivial k] {p : ฮน โ†’ P} (ha : AffineIndependent k p) {s1 s2 : Set ฮน} {p0 : P} (hp0s1 : p0 โˆˆ affineSpan k (p '' s1)) (hp0s2 : p0 โˆˆ affineSpan k (p '' s2)) :
      โˆƒ (i : ฮน), i โˆˆ s1 โˆฉ s2

      If a family is affinely independent, and the spans of points indexed by two subsets of the index type have a point in common, those subsets of the index type have an element in common, if the underlying ring is nontrivial.

      theorem AffineIndependent.affineSpan_disjoint_of_disjoint {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Nontrivial k] {p : ฮน โ†’ P} (ha : AffineIndependent k p) {s1 s2 : Set ฮน} (hd : Disjoint s1 s2) :
      Disjoint โ†‘(affineSpan k (p '' s1)) โ†‘(affineSpan k (p '' s2))

      If a family is affinely independent, the spans of points indexed by disjoint subsets of the index type are disjoint, if the underlying ring is nontrivial.

      @[simp]
      theorem AffineIndependent.mem_affineSpan_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Nontrivial k] {p : ฮน โ†’ P} (ha : AffineIndependent k p) (i : ฮน) (s : Set ฮน) :

      If a family is affinely independent, a point in the family is in the span of some of the points given by a subset of the index type if and only if that point's index is in the subset, if the underlying ring is nontrivial.

      theorem AffineIndependent.notMem_affineSpan_diff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Nontrivial k] {p : ฮน โ†’ P} (ha : AffineIndependent k p) (i : ฮน) (s : Set ฮน) :
      p i โˆ‰ affineSpan k (p '' (s \ {i}))

      If a family is affinely independent, a point in the family is not in the affine span of the other points, if the underlying ring is nontrivial.

      theorem AffineIndependent.injective_affineSpan_image {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Nontrivial k] {p : ฮน โ†’ P} (ha : AffineIndependent k p) :
      Function.Injective fun (s : Set ฮน) => affineSpan k (p '' s)
      theorem AffineIndependent.vectorSpan_image_eq_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} [Nontrivial k] {p : ฮน โ†’ P} (ha : AffineIndependent k p) {sโ‚ sโ‚‚ : Set ฮน} :
      vectorSpan k (p '' sโ‚) = vectorSpan k (p '' sโ‚‚) โ†” sโ‚ = sโ‚‚ โˆจ sโ‚.Subsingleton โˆง sโ‚‚.Subsingleton
      theorem exists_nontrivial_relation_sum_zero_of_not_affine_ind {k : Type u_1} {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {t : Finset V} (h : ยฌAffineIndependent k Subtype.val) :
      โˆƒ (f : V โ†’ k), โˆ‘ e โˆˆ t, f e โ€ข e = 0 โˆง โˆ‘ e โˆˆ t, f e = 0 โˆง โˆƒ x โˆˆ t, f x โ‰  0
      theorem affineIndependent_iff {k : Type u_1} {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {ฮน : Type u_5} {p : ฮน โ†’ V} :
      AffineIndependent k p โ†” โˆ€ (s : Finset ฮน) (w : ฮน โ†’ k), s.sum w = 0 โ†’ โˆ‘ e โˆˆ s, w e โ€ข p e = 0 โ†’ โˆ€ e โˆˆ s, w e = 0

      Viewing a module as an affine space modelled on itself, we can characterise affine independence in terms of linear combinations.

      theorem AffineIndependent.eq_zero_of_sum_eq_zero {k : Type u_1} {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {ฮน : Type u_4} {s : Finset ฮน} {w : ฮน โ†’ k} {p : ฮน โ†’ V} (hp : AffineIndependent k p) (hwโ‚€ : โˆ‘ i โˆˆ s, w i = 0) (hwโ‚ : โˆ‘ i โˆˆ s, w i โ€ข p i = 0) (i : ฮน) :
      i โˆˆ s โ†’ w i = 0
      theorem AffineIndependent.eq_of_sum_eq_sum {k : Type u_1} {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {ฮน : Type u_4} {s : Finset ฮน} {wโ‚ wโ‚‚ : ฮน โ†’ k} {p : ฮน โ†’ V} (hp : AffineIndependent k p) (hw : โˆ‘ i โˆˆ s, wโ‚ i = โˆ‘ i โˆˆ s, wโ‚‚ i) (hwp : โˆ‘ i โˆˆ s, wโ‚ i โ€ข p i = โˆ‘ i โˆˆ s, wโ‚‚ i โ€ข p i) (i : ฮน) :
      i โˆˆ s โ†’ wโ‚ i = wโ‚‚ i
      theorem AffineIndependent.eq_zero_of_sum_eq_zero_subtype {k : Type u_1} {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {s : Finset V} (hp : AffineIndependent k Subtype.val) {w : V โ†’ k} (hwโ‚€ : โˆ‘ x โˆˆ s, w x = 0) (hwโ‚ : โˆ‘ x โˆˆ s, w x โ€ข x = 0) (x : V) :
      x โˆˆ s โ†’ w x = 0
      theorem AffineIndependent.eq_of_sum_eq_sum_subtype {k : Type u_1} {V : Type u_2} [Ring k] [AddCommGroup V] [Module k V] {s : Finset V} (hp : AffineIndependent k Subtype.val) {wโ‚ wโ‚‚ : V โ†’ k} (hw : โˆ‘ i โˆˆ s, wโ‚ i = โˆ‘ i โˆˆ s, wโ‚‚ i) (hwp : โˆ‘ i โˆˆ s, wโ‚ i โ€ข i = โˆ‘ i โˆˆ s, wโ‚‚ i โ€ข i) (i : V) :
      i โˆˆ s โ†’ wโ‚ i = wโ‚‚ i
      theorem weightedVSub_mem_vectorSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (h : AffineIndependent k p) {w wโ‚ wโ‚‚ : ฮน โ†’ k} {s : Finset ฮน} (hw : โˆ‘ i โˆˆ s, w i = 0) (hwโ‚ : โˆ‘ i โˆˆ s, wโ‚ i = 1) (hwโ‚‚ : โˆ‘ i โˆˆ s, wโ‚‚ i = 1) :
      (s.weightedVSub p) w โˆˆ vectorSpan k {(Finset.affineCombination k s p) wโ‚, (Finset.affineCombination k s p) wโ‚‚} โ†” โˆƒ (r : k), โˆ€ i โˆˆ s, w i = r * (wโ‚ i - wโ‚‚ i)

      Given an affinely independent family of points, a weighted subtraction lies in the vectorSpan of two points given as affine combinations if and only if it is a weighted subtraction with weights a multiple of the difference between the weights of the two points.

      theorem affineCombination_mem_affineSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (h : AffineIndependent k p) {w wโ‚ wโ‚‚ : ฮน โ†’ k} {s : Finset ฮน} :
      โˆ‘ i โˆˆ s, w i = 1 โ†’ โˆ€ (hwโ‚ : โˆ‘ i โˆˆ s, wโ‚ i = 1) (hwโ‚‚ : โˆ‘ i โˆˆ s, wโ‚‚ i = 1), (Finset.affineCombination k s p) w โˆˆ affineSpan k {(Finset.affineCombination k s p) wโ‚, (Finset.affineCombination k s p) wโ‚‚} โ†” โˆƒ (r : k), โˆ€ i โˆˆ s, w i = r * (wโ‚‚ i - wโ‚ i) + wโ‚ i

      Given an affinely independent family of points, an affine combination lies in the span of two points given as affine combinations if and only if it is an affine combination with weights those of one point plus a multiple of the difference between the weights of the two points.

      theorem AffineIndependent.affineCombination_eq_lineMap_iff_weight_lineMap {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (ha : AffineIndependent k p) {w wโ‚ wโ‚‚ : ฮน โ†’ k} {s : Finset ฮน} (hw : โˆ‘ i โˆˆ s, w i = 1) (hwโ‚ : โˆ‘ i โˆˆ s, wโ‚ i = 1) (hwโ‚‚ : โˆ‘ i โˆˆ s, wโ‚‚ i = 1) (c : k) :
      (Finset.affineCombination k s p) w = (AffineMap.lineMap ((Finset.affineCombination k s p) wโ‚) ((Finset.affineCombination k s p) wโ‚‚)) c โ†” โˆ€ i โˆˆ s, w i = (AffineMap.lineMap (wโ‚ i) (wโ‚‚ i)) c

      Given an affinely independent family of points, an affine combination (with sum of weights 1) equals the line map of two affine combination points if and only if its weights are given pointwise by the line map of the corresponding weights.

      theorem exists_subset_affineIndependent_affineSpan_eq_top {k : Type u_1} {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {s : Set P} (h : AffineIndependent k fun (p : โ†‘s) => โ†‘p) :
      โˆƒ (t : Set P), s โІ t โˆง (AffineIndependent k fun (p : โ†‘t) => โ†‘p) โˆง affineSpan k t = โŠค

      An affinely independent set of points can be extended to such a set that spans the whole space.

      theorem exists_affineIndependent (k : Type u_1) (V : Type u_2) {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] (s : Set P) :
      theorem affineIndependent_of_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {pโ‚ pโ‚‚ : P} (h : pโ‚ โ‰  pโ‚‚) :
      AffineIndependent k ![pโ‚, pโ‚‚]

      Two different points are affinely independent.

      theorem AffineIndependent.affineIndependent_of_notMem_span {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 : ฮน} (ha : AffineIndependent k fun (x : { y : ฮน // y โ‰  i }) => p โ†‘x) (hi : p i โˆ‰ affineSpan k (p '' {x : ฮน | x โ‰  i})) :

      If all but one point of a family are affinely independent, and that point does not lie in the affine span of that family, the family is affinely independent.

      theorem affineIndependent_of_ne_of_mem_of_mem_of_notMem {k : Type u_1} {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {s : AffineSubspace k P} {pโ‚ pโ‚‚ pโ‚ƒ : P} (hpโ‚pโ‚‚ : pโ‚ โ‰  pโ‚‚) (hpโ‚ : pโ‚ โˆˆ s) (hpโ‚‚ : pโ‚‚ โˆˆ s) (hpโ‚ƒ : pโ‚ƒ โˆ‰ s) :
      AffineIndependent k ![pโ‚, pโ‚‚, pโ‚ƒ]

      If distinct points pโ‚ and pโ‚‚ lie in s but pโ‚ƒ does not, the three points are affinely independent.

      theorem affineIndependent_of_ne_of_mem_of_notMem_of_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {s : AffineSubspace k P} {pโ‚ pโ‚‚ pโ‚ƒ : P} (hpโ‚pโ‚ƒ : pโ‚ โ‰  pโ‚ƒ) (hpโ‚ : pโ‚ โˆˆ s) (hpโ‚‚ : pโ‚‚ โˆ‰ s) (hpโ‚ƒ : pโ‚ƒ โˆˆ s) :
      AffineIndependent k ![pโ‚, pโ‚‚, pโ‚ƒ]

      If distinct points pโ‚ and pโ‚ƒ lie in s but pโ‚‚ does not, the three points are affinely independent.

      theorem affineIndependent_of_ne_of_notMem_of_mem_of_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {s : AffineSubspace k P} {pโ‚ pโ‚‚ pโ‚ƒ : P} (hpโ‚‚pโ‚ƒ : pโ‚‚ โ‰  pโ‚ƒ) (hpโ‚ : pโ‚ โˆ‰ s) (hpโ‚‚ : pโ‚‚ โˆˆ s) (hpโ‚ƒ : pโ‚ƒ โˆˆ s) :
      AffineIndependent k ![pโ‚, pโ‚‚, pโ‚ƒ]

      If distinct points pโ‚‚ and pโ‚ƒ lie in s but pโ‚ does not, the three points are affinely independent.

      theorem AffineIndependent.affineIndependent_update_of_notMem_affineSpan {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 ฮน] {p : ฮน โ†’ P} (ha : AffineIndependent k p) {i : ฮน} {pโ‚€ : P} (hpโ‚€ : pโ‚€ โˆ‰ affineSpan k (p '' {x : ฮน | x โ‰  i})) :

      If a family is affinely independent, we update any one point with a new point does not lie in the affine span of that family, the new family is affinely independent.

      theorem sign_eq_of_affineCombination_mem_affineSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [LinearOrder k] [IsStrictOrderedRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (h : AffineIndependent k p) {w wโ‚ wโ‚‚ : ฮน โ†’ k} {s : Finset ฮน} (hw : โˆ‘ i โˆˆ s, w i = 1) (hwโ‚ : โˆ‘ i โˆˆ s, wโ‚ i = 1) (hwโ‚‚ : โˆ‘ i โˆˆ s, wโ‚‚ i = 1) (hs : (Finset.affineCombination k s p) w โˆˆ affineSpan k {(Finset.affineCombination k s p) wโ‚, (Finset.affineCombination k s p) wโ‚‚}) {i j : ฮน} (hi : i โˆˆ s) (hj : j โˆˆ s) (hi0 : wโ‚ i = 0) (hj0 : wโ‚ j = 0) (hij : SignType.sign (wโ‚‚ i) = SignType.sign (wโ‚‚ j)) :

      Given an affinely independent family of points, suppose that an affine combination lies in the span of two points given as affine combinations, and suppose that, for two indices, the coefficients in the first point in the span are zero and those in the second point in the span have the same sign. Then the coefficients in the combination lying in the span have the same sign.

      theorem sign_eq_of_affineCombination_mem_affineSpan_single_lineMap {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [LinearOrder k] [IsStrictOrderedRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ฮน : Type u_4} {p : ฮน โ†’ P} (h : AffineIndependent k p) {w : ฮน โ†’ k} {s : Finset ฮน} (hw : โˆ‘ i โˆˆ s, w i = 1) {iโ‚ iโ‚‚ iโ‚ƒ : ฮน} (hโ‚ : iโ‚ โˆˆ s) (hโ‚‚ : iโ‚‚ โˆˆ s) (hโ‚ƒ : iโ‚ƒ โˆˆ s) (hโ‚โ‚‚ : iโ‚ โ‰  iโ‚‚) (hโ‚โ‚ƒ : iโ‚ โ‰  iโ‚ƒ) (hโ‚‚โ‚ƒ : iโ‚‚ โ‰  iโ‚ƒ) {c : k} (hc0 : 0 < c) (hc1 : c < 1) (hs : (Finset.affineCombination k s p) w โˆˆ affineSpan k {p iโ‚, (AffineMap.lineMap (p iโ‚‚) (p iโ‚ƒ)) c}) :
      SignType.sign (w iโ‚‚) = SignType.sign (w iโ‚ƒ)

      Given an affinely independent family of points, suppose that an affine combination lies in the span of one point of that family and a combination of another two points of that family given by lineMap with coefficient between 0 and 1. Then the coefficients of those two points in the combination lying in the span have the same sign.