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), (Finset.sum s fun (i : ι) => w i) = 0(Finset.weightedVSub s p) w = 0is, 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), (Finset.sum Finset.univ fun (i : ι) => w i) = 0(Finset.weightedVSub Finset.univ 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.

    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 : vs, 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), (Finset.sum s1 fun (i : ι) => w1 i) = 1(Finset.sum s2 fun (i : ι) => w2 i) = 1(Finset.affineCombination k s1 p) w1 = (Finset.affineCombination k s2 p) w2Set.indicator (s1) w1 = Set.indicator (s2) 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), (Finset.sum Finset.univ fun (i : ι) => w1 i) = 1(Finset.sum Finset.univ fun (i : ι) => w2 i) = 1(Finset.affineCombination k Finset.univ p) w1 = (Finset.affineCombination k Finset.univ p) w2w1 = 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₁ : Finset ι) (s₂ : Finset ι) (w₁ : ιk) (w₂ : ιk) (hw₁ : (Finset.sum s₁ fun (i : ι) => w₁ i) = 1) (hw₂ : (Finset.sum s₂ fun (i : ι) => w₂ i) = 1) (h : (Finset.affineCombination k s₁ p) w₁ = (Finset.affineCombination k s₂ p) w₂) :
    Set.indicator (s₁) w₁ = Set.indicator (s₂) w₂
    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) :

    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.mono {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} {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.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) :

    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₂) :
    AffineIndependent k Subtype.val AffineIndependent k Subtype.val

    Affine equivalences preserve affine independence of subsets.

    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 : Set ι} {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 : Set ι} {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 ι) :
    p i affineSpan k (p '' s) i s

    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.not_mem_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 iaffineSpan 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 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 : Vk), (Finset.sum t fun (e : V) => f e e) = 0 (Finset.sum t fun (e : V) => 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), Finset.sum s w = 0(Finset.sum s fun (e : ι) => w e p e) = 0es, 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₀ : (Finset.sum s fun (i : ι) => w i) = 0) (hw₁ : (Finset.sum s fun (i : ι) => w i p i) = 0) (i : ι) :
    i sw 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₁ : ιk} {w₂ : ιk} {p : ιV} (hp : AffineIndependent k p) (hw : (Finset.sum s fun (i : ι) => w₁ i) = Finset.sum s fun (i : ι) => w₂ i) (hwp : (Finset.sum s fun (i : ι) => w₁ i p i) = Finset.sum s fun (i : ι) => w₂ i p i) (i : ι) :
    i sw₁ 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 : Vk} (hw₀ : (Finset.sum s fun (x : V) => w x) = 0) (hw₁ : (Finset.sum s fun (x : V) => w x x) = 0) (x : V) :
    x sw 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₁ : Vk} {w₂ : Vk} (hw : (Finset.sum s fun (i : V) => w₁ i) = Finset.sum s fun (i : V) => w₂ i) (hwp : (Finset.sum s fun (i : V) => w₁ i i) = Finset.sum s fun (i : V) => w₂ i i) (i : V) :
    i sw₁ 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 : ιk} {w₁ : ιk} {w₂ : ιk} {s : Finset ι} (hw : (Finset.sum s fun (i : ι) => w i) = 0) (hw₁ : (Finset.sum s fun (i : ι) => w₁ i) = 1) (hw₂ : (Finset.sum s fun (i : ι) => w₂ i) = 1) :
    (Finset.weightedVSub s p) w vectorSpan k {(Finset.affineCombination k s p) w₁, (Finset.affineCombination k s p) w₂} ∃ (r : k), is, 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 : ιk} {w₁ : ιk} {w₂ : ιk} {s : Finset ι} :
    (Finset.sum s fun (i : ι) => w i) = 1(Finset.sum s fun (i : ι) => w₁ i) = 1(Finset.sum s fun (i : ι) => 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), is, 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 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) :
    ∃ t ⊆ s, affineSpan k t = affineSpan k s AffineIndependent k Subtype.val
    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₂ : P} (h : p₁ p₂) :
    AffineIndependent k ![p₁, p₂]

    Two different points are affinely independent.

    theorem AffineIndependent.affineIndependent_of_not_mem_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 iaffineSpan 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_not_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} {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_not_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} {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_not_mem_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} {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 sign_eq_of_affineCombination_mem_affineSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [LinearOrderedRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} {p : ιP} (h : AffineIndependent k p) {w : ιk} {w₁ : ιk} {w₂ : ιk} {s : Finset ι} (hw : (Finset.sum s fun (i : ι) => w i) = 1) (hw₁ : (Finset.sum s fun (i : ι) => w₁ i) = 1) (hw₂ : (Finset.sum s fun (i : ι) => 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)) :
    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} [LinearOrderedRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {ι : Type u_4} {p : ιP} (h : AffineIndependent k p) {w : ιk} {s : Finset ι} (hw : (Finset.sum s fun (i : ι) => 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.

    structure Affine.Simplex (k : Type u_1) {V : Type u_2} (P : Type u_3) [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] (n : ) :
    Type u_3

    A Simplex k P n is a collection of n + 1 affinely independent points.

    Instances For
      @[inline, reducible]
      abbrev Affine.Triangle (k : Type u_1) {V : Type u_2} (P : Type u_3) [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] :
      Type u_3

      A Triangle k P is a collection of three affinely independent points.

      Equations
      Instances For
        def Affine.Simplex.mkOfPoint (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] (p : P) :

        Construct a 0-simplex from a point.

        Equations
        Instances For
          @[simp]
          theorem Affine.Simplex.mkOfPoint_points (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] (p : P) (i : Fin 1) :
          (Affine.Simplex.mkOfPoint k p).points i = p

          The point in a simplex constructed with mkOfPoint.

          instance Affine.Simplex.nonempty (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] :
          Equations
          • =
          theorem Affine.Simplex.ext {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n : } {s1 : Affine.Simplex k P n} {s2 : Affine.Simplex k P n} (h : ∀ (i : Fin (n + 1)), s1.points i = s2.points i) :
          s1 = s2

          Two simplices are equal if they have the same points.

          theorem Affine.Simplex.ext_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n : } (s1 : Affine.Simplex k P n) (s2 : Affine.Simplex k P n) :
          s1 = s2 ∀ (i : Fin (n + 1)), s1.points i = s2.points i

          Two simplices are equal if and only if they have the same points.

          def Affine.Simplex.face {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n : } (s : Affine.Simplex k P n) {fs : Finset (Fin (n + 1))} {m : } (h : fs.card = m + 1) :

          A face of a simplex is a simplex with the given subset of points.

          Equations
          Instances For
            theorem Affine.Simplex.face_points {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n : } (s : Affine.Simplex k P n) {fs : Finset (Fin (n + 1))} {m : } (h : fs.card = m + 1) (i : Fin (m + 1)) :
            (Affine.Simplex.face s h).points i = s.points ((Finset.orderEmbOfFin fs h) i)

            The points of a face of a simplex are given by mono_of_fin.

            theorem Affine.Simplex.face_points' {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n : } (s : Affine.Simplex k P n) {fs : Finset (Fin (n + 1))} {m : } (h : fs.card = m + 1) :
            (Affine.Simplex.face s h).points = s.points (Finset.orderEmbOfFin fs h)

            The points of a face of a simplex are given by mono_of_fin.

            @[simp]
            theorem Affine.Simplex.face_eq_mkOfPoint {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n : } (s : Affine.Simplex k P n) (i : Fin (n + 1)) :

            A single-point face equals the 0-simplex constructed with mkOfPoint.

            @[simp]
            theorem Affine.Simplex.range_face_points {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n : } (s : Affine.Simplex k P n) {fs : Finset (Fin (n + 1))} {m : } (h : fs.card = m + 1) :
            Set.range (Affine.Simplex.face s h).points = s.points '' fs

            The set of points of a face.

            @[simp]
            theorem Affine.Simplex.reindex_points {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {m : } {n : } (s : Affine.Simplex k P m) (e : Fin (m + 1) Fin (n + 1)) :
            ∀ (a : Fin (n + 1)), (Affine.Simplex.reindex s e).points a = (s.points e.symm) a
            def Affine.Simplex.reindex {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {m : } {n : } (s : Affine.Simplex k P m) (e : Fin (m + 1) Fin (n + 1)) :

            Remap a simplex along an Equiv of index types.

            Equations
            Instances For
              @[simp]
              theorem Affine.Simplex.reindex_refl {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n : } (s : Affine.Simplex k P n) :

              Reindexing by Equiv.refl yields the original simplex.

              @[simp]
              theorem Affine.Simplex.reindex_trans {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n₁ : } {n₂ : } {n₃ : } (e₁₂ : Fin (n₁ + 1) Fin (n₂ + 1)) (e₂₃ : Fin (n₂ + 1) Fin (n₃ + 1)) (s : Affine.Simplex k P n₁) :
              Affine.Simplex.reindex s (e₁₂.trans e₂₃) = Affine.Simplex.reindex (Affine.Simplex.reindex s e₁₂) e₂₃

              Reindexing by the composition of two equivalences is the same as reindexing twice.

              @[simp]
              theorem Affine.Simplex.reindex_reindex_symm {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {m : } {n : } (s : Affine.Simplex k P m) (e : Fin (m + 1) Fin (n + 1)) :

              Reindexing by an equivalence and its inverse yields the original simplex.

              @[simp]
              theorem Affine.Simplex.reindex_symm_reindex {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {m : } {n : } (s : Affine.Simplex k P m) (e : Fin (n + 1) Fin (m + 1)) :

              Reindexing by the inverse of an equivalence and that equivalence yields the original simplex.

              @[simp]
              theorem Affine.Simplex.reindex_range_points {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [AddCommGroup V] [Module k V] [AddTorsor V P] {m : } {n : } (s : Affine.Simplex k P m) (e : Fin (m + 1) Fin (n + 1)) :

              Reindexing a simplex produces one with the same set of points.

              @[simp]
              theorem Affine.Simplex.face_centroid_eq_centroid {k : Type u_1} {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n : } (s : Affine.Simplex k P n) {fs : Finset (Fin (n + 1))} {m : } (h : fs.card = m + 1) :
              Finset.centroid k Finset.univ (Affine.Simplex.face s h).points = Finset.centroid k fs s.points

              The centroid of a face of a simplex as the centroid of a subset of the points.

              @[simp]
              theorem Affine.Simplex.centroid_eq_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] [CharZero k] {n : } (s : Affine.Simplex k P n) {fs₁ : Finset (Fin (n + 1))} {fs₂ : Finset (Fin (n + 1))} {m₁ : } {m₂ : } (h₁ : fs₁.card = m₁ + 1) (h₂ : fs₂.card = m₂ + 1) :
              Finset.centroid k fs₁ s.points = Finset.centroid k fs₂ s.points fs₁ = fs₂

              Over a characteristic-zero division ring, the centroids given by two subsets of the points of a simplex are equal if and only if those faces are given by the same subset of points.

              theorem Affine.Simplex.face_centroid_eq_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] [CharZero k] {n : } (s : Affine.Simplex k P n) {fs₁ : Finset (Fin (n + 1))} {fs₂ : Finset (Fin (n + 1))} {m₁ : } {m₂ : } (h₁ : fs₁.card = m₁ + 1) (h₂ : fs₂.card = m₂ + 1) :
              Finset.centroid k Finset.univ (Affine.Simplex.face s h₁).points = Finset.centroid k Finset.univ (Affine.Simplex.face s h₂).points fs₁ = fs₂

              Over a characteristic-zero division ring, the centroids of two faces of a simplex are equal if and only if those faces are given by the same subset of points.

              theorem Affine.Simplex.centroid_eq_of_range_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [DivisionRing k] [AddCommGroup V] [Module k V] [AddTorsor V P] {n : } {s₁ : Affine.Simplex k P n} {s₂ : Affine.Simplex k P n} (h : Set.range s₁.points = Set.range s₂.points) :
              Finset.centroid k Finset.univ s₁.points = Finset.centroid k Finset.univ s₂.points

              Two simplices with the same points have the same centroid.