File: Mathlib/LinearAlgebra/AffineSpace/FiniteDimensional.lean

full_name: finiteDimensional_vectorSpan_of_finite
code: /-- The `vectorSpan` of a finite set is finite-dimensional. -/
theorem finiteDimensional_vectorSpan_of_finite {s : Set P} (h : Set.Finite s) :
    FiniteDimensional k (vectorSpan k s) 
goal: FiniteDimensional k ↥(vectorSpan k s)

full_name: finiteDimensional_vectorSpan_range
code: /-- The `vectorSpan` of a family indexed by a `Fintype` is
finite-dimensional. -/
instance finiteDimensional_vectorSpan_range [Finite ι] (p : ι → P) :
    FiniteDimensional k (vectorSpan k (Set.range p)) 
goal: FiniteDimensional k ↥(vectorSpan k (Set.range p))

full_name: finiteDimensional_vectorSpan_image_of_finite
code: /-- The `vectorSpan` of a subset of a family indexed by a `Fintype`
is finite-dimensional. -/
instance finiteDimensional_vectorSpan_image_of_finite [Finite ι] (p : ι → P) (s : Set ι) :
    FiniteDimensional k (vectorSpan k (p '' s)) 
goal: FiniteDimensional k ↥(vectorSpan k (p '' s))

full_name: finiteDimensional_direction_affineSpan_of_finite
code: /-- The direction of the affine span of a finite set is
finite-dimensional. -/
theorem finiteDimensional_direction_affineSpan_of_finite {s : Set P} (h : Set.Finite s) :
    FiniteDimensional k (affineSpan k s).direction 
goal: FiniteDimensional k ↥(affineSpan k s).direction

full_name: finiteDimensional_direction_affineSpan_range
code: /-- The direction of the affine span of a family indexed by a
`Fintype` is finite-dimensional. -/
instance finiteDimensional_direction_affineSpan_range [Finite ι] (p : ι → P) :
    FiniteDimensional k (affineSpan k (Set.range p)).direction 
goal: FiniteDimensional k ↥(affineSpan k (Set.range p)).direction

full_name: finiteDimensional_direction_affineSpan_image_of_finite
code: /-- The direction of the affine span of a subset of a family indexed
by a `Fintype` is finite-dimensional. -/
instance finiteDimensional_direction_affineSpan_image_of_finite [Finite ι] (p : ι → P) (s : Set ι) :
    FiniteDimensional k (affineSpan k (p '' s)).direction 
goal: FiniteDimensional k ↥(affineSpan k (p '' s)).direction

full_name: finite_of_fin_dim_affineIndependent
code: /-- An affine-independent family of points in a finite-dimensional affine space is finite. -/
theorem finite_of_fin_dim_affineIndependent [FiniteDimensional k V] {p : ι → P}
    (hi : AffineIndependent k p) : Finite ι 
goal: Finite ι

full_name: finite_set_of_fin_dim_affineIndependent
code: /-- An affine-independent subset of a finite-dimensional affine space is finite. -/
theorem finite_set_of_fin_dim_affineIndependent [FiniteDimensional k V] {s : Set ι} {f : s → P}
    (hi : AffineIndependent k f) : s.Finite 
goal: s.Finite

full_name: AffineIndependent.finrank_vectorSpan_image_finset
code: /-- The `vectorSpan` of a finite subset of an affinely independent
family has dimension one less than its cardinality. -/
theorem AffineIndependent.finrank_vectorSpan_image_finset [DecidableEq P]
    {p : ι → P} (hi : AffineIndependent k p) {s : Finset ι} {n : ℕ} (hc : Finset.card s = n + 1) :
    finrank k (vectorSpan k (s.image p : Set P)) = n 
goal: FiniteDimensional.finrank k ↥(vectorSpan k ↑(Finset.image p s)) = n

full_name: AffineIndependent.finrank_vectorSpan
code: /-- The `vectorSpan` of a finite affinely independent family has
dimension one less than its cardinality. -/
theorem AffineIndependent.finrank_vectorSpan [Fintype ι] {p : ι → P} (hi : AffineIndependent k p)
    {n : ℕ} (hc : Fintype.card ι = n + 1) : finrank k (vectorSpan k (Set.range p)) = n 
goal: FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) = n

full_name: AffineIndependent.finrank_vectorSpan_add_one
code: /-- The `vectorSpan` of a finite affinely independent family has dimension one less than its
cardinality. -/
lemma AffineIndependent.finrank_vectorSpan_add_one [Fintype ι] [Nonempty ι] {p : ι → P}
    (hi : AffineIndependent k p) : finrank k (vectorSpan k (Set.range p)) + 1 = Fintype.card ι 
goal: FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) + 1 = Fintype.card ι

full_name: AffineIndependent.vectorSpan_eq_top_of_card_eq_finrank_add_one
code: /-- The `vectorSpan` of a finite affinely independent family whose
cardinality is one more than that of the finite-dimensional space is
`⊤`. -/
theorem AffineIndependent.vectorSpan_eq_top_of_card_eq_finrank_add_one [FiniteDimensional k V]
    [Fintype ι] {p : ι → P} (hi : AffineIndependent k p) (hc : Fintype.card ι = finrank k V + 1) :
    vectorSpan k (Set.range p) = ⊤ 
goal: vectorSpan k (Set.range p) = ⊤

full_name: finrank_vectorSpan_image_finset_le
code: /-- The `vectorSpan` of `n + 1` points in an indexed family has
dimension at most `n`. -/
theorem finrank_vectorSpan_image_finset_le [DecidableEq P] (p : ι → P) (s : Finset ι) {n : ℕ}
    (hc : Finset.card s = n + 1) : finrank k (vectorSpan k (s.image p : Set P)) ≤ n 
goal: FiniteDimensional.finrank k ↥(vectorSpan k ↑(Finset.image p s)) ≤ n

full_name: finrank_vectorSpan_range_le
code: /-- The `vectorSpan` of an indexed family of `n + 1` points has
dimension at most `n`. -/
theorem finrank_vectorSpan_range_le [Fintype ι] (p : ι → P) {n : ℕ} (hc : Fintype.card ι = n + 1) :
    finrank k (vectorSpan k (Set.range p)) ≤ n 
goal: FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) ≤ n

full_name: finrank_vectorSpan_range_add_one_le
code: /-- The `vectorSpan` of an indexed family of `n + 1` points has dimension at most `n`. -/
lemma finrank_vectorSpan_range_add_one_le [Fintype ι] [Nonempty ι] (p : ι → P) :
    finrank k (vectorSpan k (Set.range p)) + 1 ≤ Fintype.card ι 
goal: FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) + 1 ≤ Fintype.card ι

full_name: affineIndependent_iff_finrank_vectorSpan_eq
code: /-- `n + 1` points are affinely independent if and only if their
`vectorSpan` has dimension `n`. -/
theorem affineIndependent_iff_finrank_vectorSpan_eq [Fintype ι] (p : ι → P) {n : ℕ}
    (hc : Fintype.card ι = n + 1) :
    AffineIndependent k p ↔ finrank k (vectorSpan k (Set.range p)) = n 
goal: AffineIndependent k p ↔ FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) = n

full_name: affineIndependent_iff_le_finrank_vectorSpan
code: /-- `n + 1` points are affinely independent if and only if their
`vectorSpan` has dimension at least `n`. -/
theorem affineIndependent_iff_le_finrank_vectorSpan [Fintype ι] (p : ι → P) {n : ℕ}
    (hc : Fintype.card ι = n + 1) :
    AffineIndependent k p ↔ n ≤ finrank k (vectorSpan k (Set.range p)) 
goal: AffineIndependent k p ↔ n ≤ FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p))

full_name: affineIndependent_iff_not_finrank_vectorSpan_le
code: /-- `n + 2` points are affinely independent if and only if their
`vectorSpan` does not have dimension at most `n`. -/
theorem affineIndependent_iff_not_finrank_vectorSpan_le [Fintype ι] (p : ι → P) {n : ℕ}
    (hc : Fintype.card ι = n + 2) :
    AffineIndependent k p ↔ ¬finrank k (vectorSpan k (Set.range p)) ≤ n 
goal: AffineIndependent k p ↔ ¬FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) ≤ n

full_name: finrank_vectorSpan_le_iff_not_affineIndependent
code: /-- `n + 2` points have a `vectorSpan` with dimension at most `n` if
and only if they are not affinely independent. -/
theorem finrank_vectorSpan_le_iff_not_affineIndependent [Fintype ι] (p : ι → P) {n : ℕ}
    (hc : Fintype.card ι = n + 2) :
    finrank k (vectorSpan k (Set.range p)) ≤ n ↔ ¬AffineIndependent k p 
goal: FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) ≤ n ↔ ¬AffineIndependent k p

full_name: AffineIndependent.card_le_finrank_succ
code: lemma AffineIndependent.card_le_finrank_succ [Fintype ι] {p : ι → P} (hp : AffineIndependent k p) :
    Fintype.card ι ≤ FiniteDimensional.finrank k (vectorSpan k (Set.range p)) + 1 
goal: Fintype.card ι ≤ FiniteDimensional.finrank k ↥(vectorSpan k (Set.range p)) + 1

full_name: AffineIndependent.card_le_card_of_subset_affineSpan
code: /-- If an affine independent finset is contained in the affine span of another finset, then its
cardinality is at most the cardinality of that finset. -/
lemma AffineIndependent.card_le_card_of_subset_affineSpan {s t : Finset V}
    (hs : AffineIndependent k ((↑) : s → V)) (hst : (s : Set V) ⊆ affineSpan k (t : Set V)) :
    s.card ≤ t.card 
goal: s.card ≤ t.card

full_name: AffineIndependent.card_lt_card_of_affineSpan_lt_affineSpan
code: /-- If the affine span of an affine independent finset is strictly contained in the affine span of
another finset, then its cardinality is strictly less than the cardinality of that finset. -/
lemma AffineIndependent.card_lt_card_of_affineSpan_lt_affineSpan {s t : Finset V}
    (hs : AffineIndependent k ((↑) : s → V))
    (hst : affineSpan k (s : Set V) < affineSpan k (t : Set V)) : s.card < t.card 
goal: s.card < t.card

full_name: AffineIndependent.vectorSpan_image_finset_eq_of_le_of_card_eq_finrank_add_one
code: /-- If the `vectorSpan` of a finite subset of an affinely independent
family lies in a submodule with dimension one less than its
cardinality, it equals that submodule. -/
theorem AffineIndependent.vectorSpan_image_finset_eq_of_le_of_card_eq_finrank_add_one
    [DecidableEq P] {p : ι → P}
    (hi : AffineIndependent k p) {s : Finset ι} {sm : Submodule k V} [FiniteDimensional k sm]
    (hle : vectorSpan k (s.image p : Set P) ≤ sm) (hc : Finset.card s = finrank k sm + 1) :
    vectorSpan k (s.image p : Set P) = sm 
goal: vectorSpan k ↑(Finset.image p s) = sm

full_name: AffineIndependent.vectorSpan_eq_of_le_of_card_eq_finrank_add_one
code: /-- If the `vectorSpan` of a finite affinely independent
family lies in a submodule with dimension one less than its
cardinality, it equals that submodule. -/
theorem AffineIndependent.vectorSpan_eq_of_le_of_card_eq_finrank_add_one [Fintype ι] {p : ι → P}
    (hi : AffineIndependent k p) {sm : Submodule k V} [FiniteDimensional k sm]
    (hle : vectorSpan k (Set.range p) ≤ sm) (hc : Fintype.card ι = finrank k sm + 1) :
    vectorSpan k (Set.range p) = sm 
goal: vectorSpan k (Set.range p) = sm

full_name: AffineIndependent.affineSpan_image_finset_eq_of_le_of_card_eq_finrank_add_one
code: /-- If the `affineSpan` of a finite subset of an affinely independent
family lies in an affine subspace whose direction has dimension one
less than its cardinality, it equals that subspace. -/
theorem AffineIndependent.affineSpan_image_finset_eq_of_le_of_card_eq_finrank_add_one
    [DecidableEq P] {p : ι → P}
    (hi : AffineIndependent k p) {s : Finset ι} {sp : AffineSubspace k P}
    [FiniteDimensional k sp.direction] (hle : affineSpan k (s.image p : Set P) ≤ sp)
    (hc : Finset.card s = finrank k sp.direction + 1) : affineSpan k (s.image p : Set P) = sp 
goal: affineSpan k ↑(Finset.image p s) = sp

full_name: AffineIndependent.affineSpan_eq_of_le_of_card_eq_finrank_add_one
code: /-- If the `affineSpan` of a finite affinely independent family lies
in an affine subspace whose direction has dimension one less than its
cardinality, it equals that subspace. -/
theorem AffineIndependent.affineSpan_eq_of_le_of_card_eq_finrank_add_one [Fintype ι] {p : ι → P}
    (hi : AffineIndependent k p) {sp : AffineSubspace k P} [FiniteDimensional k sp.direction]
    (hle : affineSpan k (Set.range p) ≤ sp) (hc : Fintype.card ι = finrank k sp.direction + 1) :
    affineSpan k (Set.range p) = sp 
goal: affineSpan k (Set.range p) = sp

full_name: AffineIndependent.affineSpan_eq_top_iff_card_eq_finrank_add_one
code: /-- The `affineSpan` of a finite affinely independent family is `⊤` iff the
family's cardinality is one more than that of the finite-dimensional space. -/
theorem AffineIndependent.affineSpan_eq_top_iff_card_eq_finrank_add_one [FiniteDimensional k V]
    [Fintype ι] {p : ι → P} (hi : AffineIndependent k p) :
    affineSpan k (Set.range p) = ⊤ ↔ Fintype.card ι = finrank k V + 1 
goal: affineSpan k (Set.range p) = ⊤ ↔ Fintype.card ι = FiniteDimensional.finrank k V + 1

full_name: Affine.Simplex.span_eq_top
code: theorem Affine.Simplex.span_eq_top [FiniteDimensional k V] {n : ℕ} (T : Affine.Simplex k V n)
    (hrank : finrank k V = n) : affineSpan k (Set.range T.points) = ⊤ 
goal: affineSpan k (Set.range T.points) = ⊤

full_name: finiteDimensional_vectorSpan_insert
code: /-- The `vectorSpan` of adding a point to a finite-dimensional subspace is finite-dimensional. -/
instance finiteDimensional_vectorSpan_insert (s : AffineSubspace k P)
    [FiniteDimensional k s.direction] (p : P) :
    FiniteDimensional k (vectorSpan k (insert p (s : Set P))) 
goal: FiniteDimensional k ↥(vectorSpan k (insert p ↑s))

full_name: finiteDimensional_direction_affineSpan_insert
code: /-- The direction of the affine span of adding a point to a finite-dimensional subspace is
finite-dimensional. -/
instance finiteDimensional_direction_affineSpan_insert (s : AffineSubspace k P)
    [FiniteDimensional k s.direction] (p : P) :
    FiniteDimensional k (affineSpan k (insert p (s : Set P))).direction 
goal: FiniteDimensional k ↥(affineSpan k (insert p ↑s)).direction

full_name: finiteDimensional_vectorSpan_insert_set
code: /-- The `vectorSpan` of adding a point to a set with a finite-dimensional `vectorSpan` is
finite-dimensional. -/
instance finiteDimensional_vectorSpan_insert_set (s : Set P) [FiniteDimensional k (vectorSpan k s)]
    (p : P) : FiniteDimensional k (vectorSpan k (insert p s)) 
goal: FiniteDimensional k ↥(vectorSpan k (insert p s))

full_name: Collinear
code: /-- A set of points is collinear if their `vectorSpan` has dimension
at most `1`. -/
def Collinear (s : Set P) : Prop 
goal: Prop

full_name: collinear_iff_rank_le_one
code: /-- The definition of `Collinear`. -/
theorem collinear_iff_rank_le_one (s : Set P) :
    Collinear k s ↔ Module.rank k (vectorSpan k s) ≤ 1 
goal: Collinear k s ↔ Module.rank k ↥(vectorSpan k s) ≤ 1

full_name: collinear_iff_finrank_le_one
code: /-- A set of points, whose `vectorSpan` is finite-dimensional, is
collinear if and only if their `vectorSpan` has dimension at most
`1`. -/
theorem collinear_iff_finrank_le_one {s : Set P} [FiniteDimensional k (vectorSpan k s)] :
    Collinear k s ↔ finrank k (vectorSpan k s) ≤ 1 
goal: Collinear k s ↔ FiniteDimensional.finrank k ↥(vectorSpan k s) ≤ 1

full_name: Collinear.subset
code: /-- A subset of a collinear set is collinear. -/
theorem Collinear.subset {s₁ s₂ : Set P} (hs : s₁ ⊆ s₂) (h : Collinear k s₂) : Collinear k s₁ 
goal: Collinear k s₁

full_name: Collinear.finiteDimensional_vectorSpan
code: /-- The `vectorSpan` of collinear points is finite-dimensional. -/
theorem Collinear.finiteDimensional_vectorSpan {s : Set P} (h : Collinear k s) :
    FiniteDimensional k (vectorSpan k s) 
goal: FiniteDimensional k ↥(vectorSpan k s)

full_name: Collinear.finiteDimensional_direction_affineSpan
code: /-- The direction of the affine span of collinear points is finite-dimensional. -/
theorem Collinear.finiteDimensional_direction_affineSpan {s : Set P} (h : Collinear k s) :
    FiniteDimensional k (affineSpan k s).direction 
goal: FiniteDimensional k ↥(affineSpan k s).direction

full_name: collinear_empty
code: /-- The empty set is collinear. -/
theorem collinear_empty : Collinear k (∅ : Set P) 
goal: Collinear k ∅

full_name: collinear_singleton
code: /-- A single point is collinear. -/
theorem collinear_singleton (p : P) : Collinear k ({p} : Set P) 
goal: Collinear k {p}

full_name: collinear_iff_of_mem
code: /-- Given a point `p₀` in a set of points, that set is collinear if and
only if the points can all be expressed as multiples of the same
vector, added to `p₀`. -/
theorem collinear_iff_of_mem {s : Set P} {p₀ : P} (h : p₀ ∈ s) :
    Collinear k s ↔ ∃ v : V, ∀ p ∈ s, ∃ r : k, p = r • v +ᵥ p₀ 
goal: Collinear k s ↔ ∃ v, ∀ p ∈ s, ∃ r, p = r • v +ᵥ p₀

full_name: collinear_iff_exists_forall_eq_smul_vadd
code: /-- A set of points is collinear if and only if they can all be
expressed as multiples of the same vector, added to the same base
point. -/
theorem collinear_iff_exists_forall_eq_smul_vadd (s : Set P) :
    Collinear k s ↔ ∃ (p₀ : P) (v : V), ∀ p ∈ s, ∃ r : k, p = r • v +ᵥ p₀ 
goal: Collinear k s ↔ ∃ p₀ v, ∀ p ∈ s, ∃ r, p = r • v +ᵥ p₀

full_name: collinear_pair
code: /-- Two points are collinear. -/
theorem collinear_pair (p₁ p₂ : P) : Collinear k ({p₁, p₂} : Set P) 
goal: Collinear k {p₁, p₂}

full_name: affineIndependent_iff_not_collinear
code: /-- Three points are affinely independent if and only if they are not
collinear. -/
theorem affineIndependent_iff_not_collinear {p : Fin 3 → P} :
    AffineIndependent k p ↔ ¬Collinear k (Set.range p) 
goal: AffineIndependent k p ↔ ¬Collinear k (Set.range p)

full_name: collinear_iff_not_affineIndependent
code: /-- Three points are collinear if and only if they are not affinely
independent. -/
theorem collinear_iff_not_affineIndependent {p : Fin 3 → P} :
    Collinear k (Set.range p) ↔ ¬AffineIndependent k p 
goal: Collinear k (Set.range p) ↔ ¬AffineIndependent k p

full_name: affineIndependent_iff_not_collinear_set
code: /-- Three points are affinely independent if and only if they are not collinear. -/
theorem affineIndependent_iff_not_collinear_set {p₁ p₂ p₃ : P} :
    AffineIndependent k ![p₁, p₂, p₃] ↔ ¬Collinear k ({p₁, p₂, p₃} : Set P) 
goal: AffineIndependent k ![p₁, p₂, p₃] ↔ ¬Collinear k {p₁, p₂, p₃}

full_name: collinear_iff_not_affineIndependent_set
code: /-- Three points are collinear if and only if they are not affinely independent. -/
theorem collinear_iff_not_affineIndependent_set {p₁ p₂ p₃ : P} :
    Collinear k ({p₁, p₂, p₃} : Set P) ↔ ¬AffineIndependent k ![p₁, p₂, p₃] 
goal: Collinear k {p₁, p₂, p₃} ↔ ¬AffineIndependent k ![p₁, p₂, p₃]

full_name: affineIndependent_iff_not_collinear_of_ne
code: /-- Three points are affinely independent if and only if they are not collinear. -/
theorem affineIndependent_iff_not_collinear_of_ne {p : Fin 3 → P} {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂)
    (h₁₃ : i₁ ≠ i₃) (h₂₃ : i₂ ≠ i₃) :
    AffineIndependent k p ↔ ¬Collinear k ({p i₁, p i₂, p i₃} : Set P) 
goal: AffineIndependent k p ↔ ¬Collinear k {p i₁, p i₂, p i₃}

full_name: collinear_iff_not_affineIndependent_of_ne
code: /-- Three points are collinear if and only if they are not affinely independent. -/
theorem collinear_iff_not_affineIndependent_of_ne {p : Fin 3 → P} {i₁ i₂ i₃ : Fin 3} (h₁₂ : i₁ ≠ i₂)
    (h₁₃ : i₁ ≠ i₃) (h₂₃ : i₂ ≠ i₃) :
    Collinear k ({p i₁, p i₂, p i₃} : Set P) ↔ ¬AffineIndependent k p 
goal: Collinear k {p i₁, p i₂, p i₃} ↔ ¬AffineIndependent k p

full_name: ne₁₂_of_not_collinear
code: /-- If three points are not collinear, the first and second are different. -/
theorem ne₁₂_of_not_collinear {p₁ p₂ p₃ : P} (h : ¬Collinear k ({p₁, p₂, p₃} : Set P)) :
    p₁ ≠ p₂ 
goal: p₁ ≠ p₂

full_name: ne₁₃_of_not_collinear
code: /-- If three points are not collinear, the first and third are different. -/
theorem ne₁₃_of_not_collinear {p₁ p₂ p₃ : P} (h : ¬Collinear k ({p₁, p₂, p₃} : Set P)) :
    p₁ ≠ p₃ 
goal: p₁ ≠ p₃

full_name: ne₂₃_of_not_collinear
code: /-- If three points are not collinear, the second and third are different. -/
theorem ne₂₃_of_not_collinear {p₁ p₂ p₃ : P} (h : ¬Collinear k ({p₁, p₂, p₃} : Set P)) :
    p₂ ≠ p₃ 
goal: p₂ ≠ p₃

full_name: Collinear.mem_affineSpan_of_mem_of_ne
code: /-- A point in a collinear set of points lies in the affine span of any two distinct points of
that set. -/
theorem Collinear.mem_affineSpan_of_mem_of_ne {s : Set P} (h : Collinear k s) {p₁ p₂ p₃ : P}
    (hp₁ : p₁ ∈ s) (hp₂ : p₂ ∈ s) (hp₃ : p₃ ∈ s) (hp₁p₂ : p₁ ≠ p₂) : p₃ ∈ line[k, p₁, p₂] 
goal: p₃ ∈ affineSpan k {p₁, p₂}

full_name: Collinear.affineSpan_eq_of_ne
code: /-- The affine span of any two distinct points of a collinear set of points equals the affine
span of the whole set. -/
theorem Collinear.affineSpan_eq_of_ne {s : Set P} (h : Collinear k s) {p₁ p₂ : P} (hp₁ : p₁ ∈ s)
    (hp₂ : p₂ ∈ s) (hp₁p₂ : p₁ ≠ p₂) : line[k, p₁, p₂] = affineSpan k s 
goal: affineSpan k {p₁, p₂} = affineSpan k s

full_name: Collinear.collinear_insert_iff_of_ne
code: /-- Given a collinear set of points, and two distinct points `p₂` and `p₃` in it, a point `p₁` is
collinear with the set if and only if it is collinear with `p₂` and `p₃`. -/
theorem Collinear.collinear_insert_iff_of_ne {s : Set P} (h : Collinear k s) {p₁ p₂ p₃ : P}
    (hp₂ : p₂ ∈ s) (hp₃ : p₃ ∈ s) (hp₂p₃ : p₂ ≠ p₃) :
    Collinear k (insert p₁ s) ↔ Collinear k ({p₁, p₂, p₃} : Set P) 
goal: Collinear k (insert p₁ s) ↔ Collinear k {p₁, p₂, p₃}

full_name: collinear_insert_iff_of_mem_affineSpan
code: /-- Adding a point in the affine span of a set does not change whether that set is collinear. -/
theorem collinear_insert_iff_of_mem_affineSpan {s : Set P} {p : P} (h : p ∈ affineSpan k s) :
    Collinear k (insert p s) ↔ Collinear k s 
goal: Collinear k (insert p s) ↔ Collinear k s

full_name: collinear_insert_of_mem_affineSpan_pair
code: /-- If a point lies in the affine span of two points, those three points are collinear. -/
theorem collinear_insert_of_mem_affineSpan_pair {p₁ p₂ p₃ : P} (h : p₁ ∈ line[k, p₂, p₃]) :
    Collinear k ({p₁, p₂, p₃} : Set P) 
goal: Collinear k {p₁, p₂, p₃}

full_name: collinear_insert_insert_of_mem_affineSpan_pair
code: /-- If two points lie in the affine span of two points, those four points are collinear. -/
theorem collinear_insert_insert_of_mem_affineSpan_pair {p₁ p₂ p₃ p₄ : P} (h₁ : p₁ ∈ line[k, p₃, p₄])
    (h₂ : p₂ ∈ line[k, p₃, p₄]) : Collinear k ({p₁, p₂, p₃, p₄} : Set P) 
goal: Collinear k {p₁, p₂, p₃, p₄}

full_name: collinear_insert_insert_insert_of_mem_affineSpan_pair
code: /-- If three points lie in the affine span of two points, those five points are collinear. -/
theorem collinear_insert_insert_insert_of_mem_affineSpan_pair {p₁ p₂ p₃ p₄ p₅ : P}
    (h₁ : p₁ ∈ line[k, p₄, p₅]) (h₂ : p₂ ∈ line[k, p₄, p₅]) (h₃ : p₃ ∈ line[k, p₄, p₅]) :
    Collinear k ({p₁, p₂, p₃, p₄, p₅} : Set P) 
goal: Collinear k {p₁, p₂, p₃, p₄, p₅}

full_name: collinear_insert_insert_insert_left_of_mem_affineSpan_pair
code: /-- If three points lie in the affine span of two points, the first four points are collinear. -/
theorem collinear_insert_insert_insert_left_of_mem_affineSpan_pair {p₁ p₂ p₃ p₄ p₅ : P}
    (h₁ : p₁ ∈ line[k, p₄, p₅]) (h₂ : p₂ ∈ line[k, p₄, p₅]) (h₃ : p₃ ∈ line[k, p₄, p₅]) :
    Collinear k ({p₁, p₂, p₃, p₄} : Set P) 
goal: Collinear k {p₁, p₂, p₃, p₄}

full_name: collinear_triple_of_mem_affineSpan_pair
code: /-- If three points lie in the affine span of two points, the first three points are collinear. -/
theorem collinear_triple_of_mem_affineSpan_pair {p₁ p₂ p₃ p₄ p₅ : P} (h₁ : p₁ ∈ line[k, p₄, p₅])
    (h₂ : p₂ ∈ line[k, p₄, p₅]) (h₃ : p₃ ∈ line[k, p₄, p₅]) :
    Collinear k ({p₁, p₂, p₃} : Set P) 
goal: Collinear k {p₁, p₂, p₃}

full_name: Coplanar
code: /-- A set of points is coplanar if their `vectorSpan` has dimension at most `2`. -/
def Coplanar (s : Set P) : Prop 
goal: Prop

full_name: Coplanar.finiteDimensional_vectorSpan
code: /-- The `vectorSpan` of coplanar points is finite-dimensional. -/
theorem Coplanar.finiteDimensional_vectorSpan {s : Set P} (h : Coplanar k s) :
    FiniteDimensional k (vectorSpan k s) 
goal: FiniteDimensional k ↥(vectorSpan k s)

full_name: Coplanar.finiteDimensional_direction_affineSpan
code: /-- The direction of the affine span of coplanar points is finite-dimensional. -/
theorem Coplanar.finiteDimensional_direction_affineSpan {s : Set P} (h : Coplanar k s) :
    FiniteDimensional k (affineSpan k s).direction 
goal: FiniteDimensional k ↥(affineSpan k s).direction

full_name: coplanar_iff_finrank_le_two
code: /-- A set of points, whose `vectorSpan` is finite-dimensional, is coplanar if and only if their
`vectorSpan` has dimension at most `2`. -/
theorem coplanar_iff_finrank_le_two {s : Set P} [FiniteDimensional k (vectorSpan k s)] :
    Coplanar k s ↔ finrank k (vectorSpan k s) ≤ 2 
goal: Coplanar k s ↔ FiniteDimensional.finrank k ↥(vectorSpan k s) ≤ 2

full_name: Coplanar.subset
code: /-- A subset of a coplanar set is coplanar. -/
theorem Coplanar.subset {s₁ s₂ : Set P} (hs : s₁ ⊆ s₂) (h : Coplanar k s₂) : Coplanar k s₁ 
goal: Coplanar k s₁

full_name: Collinear.coplanar
code: /-- Collinear points are coplanar. -/
theorem Collinear.coplanar {s : Set P} (h : Collinear k s) : Coplanar k s 
goal: Coplanar k s

full_name: coplanar_empty
code: /-- The empty set is coplanar. -/
theorem coplanar_empty : Coplanar k (∅ : Set P) 
goal: Coplanar k ∅

full_name: coplanar_singleton
code: /-- A single point is coplanar. -/
theorem coplanar_singleton (p : P) : Coplanar k ({p} : Set P) 
goal: Coplanar k {p}

full_name: coplanar_pair
code: /-- Two points are coplanar. -/
theorem coplanar_pair (p₁ p₂ : P) : Coplanar k ({p₁, p₂} : Set P) 
goal: Coplanar k {p₁, p₂}

full_name: coplanar_insert_iff_of_mem_affineSpan
code: /-- Adding a point in the affine span of a set does not change whether that set is coplanar. -/
theorem coplanar_insert_iff_of_mem_affineSpan {s : Set P} {p : P} (h : p ∈ affineSpan k s) :
    Coplanar k (insert p s) ↔ Coplanar k s 
goal: Coplanar k (insert p s) ↔ Coplanar k s

full_name: finrank_vectorSpan_insert_le
code: /-- Adding a point to a finite-dimensional subspace increases the dimension by at most one. -/
theorem finrank_vectorSpan_insert_le (s : AffineSubspace k P) (p : P) :
    finrank k (vectorSpan k (insert p (s : Set P))) ≤ finrank k s.direction + 1 
goal: FiniteDimensional.finrank k ↥(vectorSpan k (insert p ↑s)) ≤ FiniteDimensional.finrank k ↥s.direction + 1

full_name: finrank_vectorSpan_insert_le_set
code: /-- Adding a point to a set with a finite-dimensional span increases the dimension by at most
one. -/
theorem finrank_vectorSpan_insert_le_set (s : Set P) (p : P) :
    finrank k (vectorSpan k (insert p s)) ≤ finrank k (vectorSpan k s) + 1 
goal: FiniteDimensional.finrank k ↥(vectorSpan k (insert p s)) ≤ FiniteDimensional.finrank k ↥(vectorSpan k s) + 1

full_name: Collinear.coplanar_insert
code: /-- Adding a point to a collinear set produces a coplanar set. -/
theorem Collinear.coplanar_insert {s : Set P} (h : Collinear k s) (p : P) :
    Coplanar k (insert p s) 
goal: Coplanar k (insert p s)

full_name: coplanar_of_finrank_eq_two
code: /-- A set of points in a two-dimensional space is coplanar. -/
theorem coplanar_of_finrank_eq_two (s : Set P) (h : finrank k V = 2) : Coplanar k s 
goal: Coplanar k s

full_name: coplanar_of_fact_finrank_eq_two
code: /-- A set of points in a two-dimensional space is coplanar. -/
theorem coplanar_of_fact_finrank_eq_two (s : Set P) [h : Fact (finrank k V = 2)] : Coplanar k s 
goal: Coplanar k s

full_name: coplanar_triple
code: /-- Three points are coplanar. -/
theorem coplanar_triple (p₁ p₂ p₃ : P) : Coplanar k ({p₁, p₂, p₃} : Set P) 
goal: Coplanar k {p₁, p₂, p₃}

full_name: AffineBasis.finiteDimensional
code: protected theorem finiteDimensional [Finite ι] (b : AffineBasis ι k P) : FiniteDimensional k V 
goal: FiniteDimensional k V

full_name: AffineBasis.finite
code: protected theorem finite [FiniteDimensional k V] (b : AffineBasis ι k P) : Finite ι 
goal: Finite ι

full_name: AffineBasis.finite_set
code: protected theorem finite_set [FiniteDimensional k V] {s : Set ι} (b : AffineBasis s k P) :
    s.Finite 
goal: s.Finite

full_name: AffineBasis.card_eq_finrank_add_one
code: theorem card_eq_finrank_add_one [Fintype ι] (b : AffineBasis ι k P) :
    Fintype.card ι = FiniteDimensional.finrank k V + 1 
goal: Fintype.card ι = FiniteDimensional.finrank k V + 1

full_name: AffineBasis.exists_affineBasis_of_finiteDimensional
code: theorem exists_affineBasis_of_finiteDimensional [Fintype ι] [FiniteDimensional k V]
    (h : Fintype.card ι = FiniteDimensional.finrank k V + 1) : Nonempty (AffineBasis ι k P) 
goal: Nonempty (AffineBasis ι k P)