File: Mathlib/LinearAlgebra/AffineSpace/AffineSubspace.lean

full_name: vectorSpan
code: /-- The submodule spanning the differences of a (possibly empty) set of points. -/
def vectorSpan (s : Set P) : Submodule k V 
goal: Submodule k V

full_name: vectorSpan_def
code: /-- The definition of `vectorSpan`, for rewriting. -/
theorem vectorSpan_def (s : Set P) : vectorSpan k s = Submodule.span k (s -ᵥ s) 
goal: vectorSpan k s = Submodule.span k (s -ᵥ s)

full_name: vectorSpan_mono
code: /-- `vectorSpan` is monotone. -/
theorem vectorSpan_mono {s₁ s₂ : Set P} (h : s₁ ⊆ s₂) : vectorSpan k s₁ ≤ vectorSpan k s₂ 
goal: vectorSpan k s₁ ≤ vectorSpan k s₂

full_name: vectorSpan_empty
code: /-- The `vectorSpan` of the empty set is `⊥`. -/
@[simp]
theorem vectorSpan_empty : vectorSpan k (∅ : Set P) = (⊥ : Submodule k V) 
goal: vectorSpan k ∅ = ⊥

full_name: vectorSpan_singleton
code: /-- The `vectorSpan` of a single point is `⊥`. -/
@[simp]
theorem vectorSpan_singleton (p : P) : vectorSpan k ({p} : Set P) = ⊥ 
goal: vectorSpan k {p} = ⊥

full_name: vsub_set_subset_vectorSpan
code: /-- The `s -ᵥ s` lies within the `vectorSpan k s`. -/
theorem vsub_set_subset_vectorSpan (s : Set P) : s -ᵥ s ⊆ ↑(vectorSpan k s) 
goal: s -ᵥ s ⊆ ↑(vectorSpan k s)

full_name: vsub_mem_vectorSpan
code: /-- Each pairwise difference is in the `vectorSpan`. -/
theorem vsub_mem_vectorSpan {s : Set P} {p1 p2 : P} (hp1 : p1 ∈ s) (hp2 : p2 ∈ s) :
    p1 -ᵥ p2 ∈ vectorSpan k s 
goal: p1 -ᵥ p2 ∈ vectorSpan k s

full_name: spanPoints
code: /-- The points in the affine span of a (possibly empty) set of points. Use `affineSpan` instead to
get an `AffineSubspace k P`. -/
def spanPoints (s : Set P) : Set P 
goal: Set P

full_name: mem_spanPoints
code: /-- A point in a set is in its affine span. -/
theorem mem_spanPoints (p : P) (s : Set P) : p ∈ s → p ∈ spanPoints k s
  
goal: p ∈ s → p ∈ spanPoints k s

full_name: subset_spanPoints
code: /-- A set is contained in its `spanPoints`. -/
theorem subset_spanPoints (s : Set P) : s ⊆ spanPoints k s 
goal: s ⊆ spanPoints k s

full_name: spanPoints_nonempty
code: /-- The `spanPoints` of a set is nonempty if and only if that set is. -/
@[simp]
theorem spanPoints_nonempty (s : Set P) : (spanPoints k s).Nonempty ↔ s.Nonempty 
goal: (spanPoints k s).Nonempty ↔ s.Nonempty

full_name: vadd_mem_spanPoints_of_mem_spanPoints_of_mem_vectorSpan
code: /-- Adding a point in the affine span and a vector in the spanning submodule produces a point in the
affine span. -/
theorem vadd_mem_spanPoints_of_mem_spanPoints_of_mem_vectorSpan {s : Set P} {p : P} {v : V}
    (hp : p ∈ spanPoints k s) (hv : v ∈ vectorSpan k s) : v +ᵥ p ∈ spanPoints k s 
goal: v +ᵥ p ∈ spanPoints k s

full_name: vsub_mem_vectorSpan_of_mem_spanPoints_of_mem_spanPoints
code: /-- Subtracting two points in the affine span produces a vector in the spanning submodule. -/
theorem vsub_mem_vectorSpan_of_mem_spanPoints_of_mem_spanPoints {s : Set P} {p1 p2 : P}
    (hp1 : p1 ∈ spanPoints k s) (hp2 : p2 ∈ spanPoints k s) : p1 -ᵥ p2 ∈ vectorSpan k s 
goal: p1 -ᵥ p2 ∈ vectorSpan k s

full_name: AffineSubspace.smul_vsub_vadd_mem
code: /-- An `AffineSubspace k P` is a subset of an `AffineSpace V P` that, if not empty, has an affine
space structure induced by a corresponding subspace of the `Module k V`. -/
structure AffineSubspace (k : Type*) {V : Type*} (P : Type*) [Ring k] [AddCommGroup V]
  [Module k V] [AffineSpace V P] where
  /-- The affine subspace seen as a subset. -/
  carrier : Set P
  smul_vsub_vadd_mem :
    ∀ (c : k) {p1 p2 p3 : P},
      p1 ∈ carrier → p2 ∈ carrier → p3 ∈ carrier → c • (p1 -ᵥ p2 : V) +ᵥ p3 ∈ carrier
goal: p1 ∈ self.carrier → p2 ∈ self.carrier → p3 ∈ self.carrier → c • (p1 -ᵥ p2) +ᵥ p3 ∈ self.carrier

full_name: AffineSubspace
code: /-- An `AffineSubspace k P` is a subset of an `AffineSpace V P` that, if not empty, has an affine
space structure induced by a corresponding subspace of the `Module k V`. -/
structure AffineSubspace (k : Type*) {V : Type*} (P : Type*) [Ring k] [AddCommGroup V]
  [Module k V] [AffineSpace V P] where
  /-- The affine subspace seen as a subset. -/
  carrier : Set P
  smul_vsub_vadd_mem :
    ∀ (c : k) {p1 p2 p3 : P},
      p1 ∈ carrier → p2 ∈ carrier → p3 ∈ carrier → c • (p1 -ᵥ p2 : V) +ᵥ p3 ∈ carrier
goal: Type u_3

full_name: AffineSubspace.carrier
code: /-- An `AffineSubspace k P` is a subset of an `AffineSpace V P` that, if not empty, has an affine
space structure induced by a corresponding subspace of the `Module k V`. -/
structure AffineSubspace (k : Type*) {V : Type*} (P : Type*) [Ring k] [AddCommGroup V]
  [Module k V] [AffineSpace V P] where
  /-- The affine subspace seen as a subset. -/
  carrier : Set P
  smul_vsub_vadd_mem :
    ∀ (c : k) {p1 p2 p3 : P},
      p1 ∈ carrier → p2 ∈ carrier → p3 ∈ carrier → c • (p1 -ᵥ p2 : V) +ᵥ p3 ∈ carrier
goal: Set P

full_name: Submodule.toAffineSubspace
code: /-- Reinterpret `p : Submodule k V` as an `AffineSubspace k V`. -/
def toAffineSubspace (p : Submodule k V) : AffineSubspace k V 
goal: AffineSubspace k V

full_name: AffineSubspace.instSetLike
code: instance : SetLike (AffineSubspace k P) P 
goal: SetLike (AffineSubspace k P) P

full_name: AffineSubspace.mem_coe
code: /-- A point is in an affine subspace coerced to a set if and only if it is in that affine
subspace. -/
-- Porting note: removed `simp`, proof is `simp only [SetLike.mem_coe]`
theorem mem_coe (p : P) (s : AffineSubspace k P) : p ∈ (s : Set P) ↔ p ∈ s 
goal: p ∈ ↑s ↔ p ∈ s

full_name: AffineSubspace.direction
code: /-- The direction of an affine subspace is the submodule spanned by
the pairwise differences of points.  (Except in the case of an empty
affine subspace, where the direction is the zero submodule, every
vector in the direction is the difference of two points in the affine
subspace.) -/
def direction (s : AffineSubspace k P) : Submodule k V 
goal: Submodule k V

full_name: AffineSubspace.direction_eq_vectorSpan
code: /-- The direction equals the `vectorSpan`. -/
theorem direction_eq_vectorSpan (s : AffineSubspace k P) : s.direction = vectorSpan k (s : Set P) 
goal: s.direction = vectorSpan k ↑s

full_name: AffineSubspace.directionOfNonempty
code: /-- Alternative definition of the direction when the affine subspace is nonempty. This is defined so
that the order on submodules (as used in the definition of `Submodule.span`) can be used in the
proof of `coe_direction_eq_vsub_set`, and is not intended to be used beyond that proof. -/
def directionOfNonempty {s : AffineSubspace k P} (h : (s : Set P).Nonempty) : Submodule k V 
goal: Submodule k V

full_name: AffineSubspace.directionOfNonempty_eq_direction
code: /-- `direction_of_nonempty` gives the same submodule as `direction`. -/
theorem directionOfNonempty_eq_direction {s : AffineSubspace k P} (h : (s : Set P).Nonempty) :
    directionOfNonempty h = s.direction 
goal: AffineSubspace.directionOfNonempty h = s.direction

full_name: AffineSubspace.coe_direction_eq_vsub_set
code: /-- The set of vectors in the direction of a nonempty affine subspace is given by `vsub_set`. -/
theorem coe_direction_eq_vsub_set {s : AffineSubspace k P} (h : (s : Set P).Nonempty) :
    (s.direction : Set V) = (s : Set P) -ᵥ s 
goal: ↑s.direction = ↑s -ᵥ ↑s

full_name: AffineSubspace.mem_direction_iff_eq_vsub
code: /-- A vector is in the direction of a nonempty affine subspace if and only if it is the subtraction
of two vectors in the subspace. -/
theorem mem_direction_iff_eq_vsub {s : AffineSubspace k P} (h : (s : Set P).Nonempty) (v : V) :
    v ∈ s.direction ↔ ∃ p1 ∈ s, ∃ p2 ∈ s, v = p1 -ᵥ p2 
goal: v ∈ s.direction ↔ ∃ p1 ∈ s, ∃ p2 ∈ s, v = p1 -ᵥ p2

full_name: AffineSubspace.vadd_mem_of_mem_direction
code: /-- Adding a vector in the direction to a point in the subspace produces a point in the
subspace. -/
theorem vadd_mem_of_mem_direction {s : AffineSubspace k P} {v : V} (hv : v ∈ s.direction) {p : P}
    (hp : p ∈ s) : v +ᵥ p ∈ s 
goal: v +ᵥ p ∈ s

full_name: AffineSubspace.vsub_mem_direction
code: /-- Subtracting two points in the subspace produces a vector in the direction. -/
theorem vsub_mem_direction {s : AffineSubspace k P} {p1 p2 : P} (hp1 : p1 ∈ s) (hp2 : p2 ∈ s) :
    p1 -ᵥ p2 ∈ s.direction 
goal: p1 -ᵥ p2 ∈ s.direction

full_name: AffineSubspace.vadd_mem_iff_mem_direction
code: /-- Adding a vector to a point in a subspace produces a point in the subspace if and only if the
vector is in the direction. -/
theorem vadd_mem_iff_mem_direction {s : AffineSubspace k P} (v : V) {p : P} (hp : p ∈ s) :
    v +ᵥ p ∈ s ↔ v ∈ s.direction 
goal: v +ᵥ p ∈ s ↔ v ∈ s.direction

full_name: AffineSubspace.vadd_mem_iff_mem_of_mem_direction
code: /-- Adding a vector in the direction to a point produces a point in the subspace if and only if
the original point is in the subspace. -/
theorem vadd_mem_iff_mem_of_mem_direction {s : AffineSubspace k P} {v : V} (hv : v ∈ s.direction)
    {p : P} : v +ᵥ p ∈ s ↔ p ∈ s 
goal: v +ᵥ p ∈ s ↔ p ∈ s

full_name: AffineSubspace.coe_direction_eq_vsub_set_right
code: /-- Given a point in an affine subspace, the set of vectors in its direction equals the set of
vectors subtracting that point on the right. -/
theorem coe_direction_eq_vsub_set_right {s : AffineSubspace k P} {p : P} (hp : p ∈ s) :
    (s.direction : Set V) = (· -ᵥ p) '' s 
goal: ↑s.direction = (fun x => x -ᵥ p) '' ↑s

full_name: AffineSubspace.coe_direction_eq_vsub_set_left
code: /-- Given a point in an affine subspace, the set of vectors in its direction equals the set of
vectors subtracting that point on the left. -/
theorem coe_direction_eq_vsub_set_left {s : AffineSubspace k P} {p : P} (hp : p ∈ s) :
    (s.direction : Set V) = (p -ᵥ ·) '' s 
goal: ↑s.direction = (fun x => p -ᵥ x) '' ↑s

full_name: AffineSubspace.mem_direction_iff_eq_vsub_right
code: /-- Given a point in an affine subspace, a vector is in its direction if and only if it results from
subtracting that point on the right. -/
theorem mem_direction_iff_eq_vsub_right {s : AffineSubspace k P} {p : P} (hp : p ∈ s) (v : V) :
    v ∈ s.direction ↔ ∃ p2 ∈ s, v = p2 -ᵥ p 
goal: v ∈ s.direction ↔ ∃ p2 ∈ s, v = p2 -ᵥ p

full_name: AffineSubspace.mem_direction_iff_eq_vsub_left
code: /-- Given a point in an affine subspace, a vector is in its direction if and only if it results from
subtracting that point on the left. -/
theorem mem_direction_iff_eq_vsub_left {s : AffineSubspace k P} {p : P} (hp : p ∈ s) (v : V) :
    v ∈ s.direction ↔ ∃ p2 ∈ s, v = p -ᵥ p2 
goal: v ∈ s.direction ↔ ∃ p2 ∈ s, v = p -ᵥ p2

full_name: AffineSubspace.vsub_right_mem_direction_iff_mem
code: /-- Given a point in an affine subspace, a result of subtracting that point on the right is in the
direction if and only if the other point is in the subspace. -/
theorem vsub_right_mem_direction_iff_mem {s : AffineSubspace k P} {p : P} (hp : p ∈ s) (p2 : P) :
    p2 -ᵥ p ∈ s.direction ↔ p2 ∈ s 
goal: p2 -ᵥ p ∈ s.direction ↔ p2 ∈ s

full_name: AffineSubspace.vsub_left_mem_direction_iff_mem
code: /-- Given a point in an affine subspace, a result of subtracting that point on the left is in the
direction if and only if the other point is in the subspace. -/
theorem vsub_left_mem_direction_iff_mem {s : AffineSubspace k P} {p : P} (hp : p ∈ s) (p2 : P) :
    p -ᵥ p2 ∈ s.direction ↔ p2 ∈ s 
goal: p -ᵥ p2 ∈ s.direction ↔ p2 ∈ s

full_name: AffineSubspace.coe_injective
code: /-- Two affine subspaces are equal if they have the same points. -/
theorem coe_injective : Function.Injective ((↑) : AffineSubspace k P → Set P) 
goal: Function.Injective SetLike.coe

full_name: AffineSubspace.ext
code: @[ext]
theorem ext {p q : AffineSubspace k P} (h : ∀ x, x ∈ p ↔ x ∈ q) : p = q 
goal: p = q

full_name: AffineSubspace.ext_iff
code: protected theorem ext_iff (s₁ s₂ : AffineSubspace k P) : s₁ = s₂ ↔ (s₁ : Set P) = s₂ 
goal: s₁ = s₂ ↔ ↑s₁ = ↑s₂

full_name: AffineSubspace.ext_of_direction_eq
code: /-- Two affine subspaces with the same direction and nonempty intersection are equal. -/
theorem ext_of_direction_eq {s1 s2 : AffineSubspace k P} (hd : s1.direction = s2.direction)
    (hn : ((s1 : Set P) ∩ s2).Nonempty) : s1 = s2 
goal: s1 = s2

full_name: AffineSubspace.toAddTorsor
code: /-- This is not an instance because it loops with `AddTorsor.nonempty`. -/
abbrev toAddTorsor (s : AffineSubspace k P) [Nonempty s] : AddTorsor s.direction s 
goal: AffineSpace ↥s.direction ↥s

full_name: AffineSubspace.coe_vsub
code: @[simp, norm_cast]
theorem coe_vsub (s : AffineSubspace k P) [Nonempty s] (a b : s) : ↑(a -ᵥ b) = (a : P) -ᵥ (b : P) 
goal: ↑(a -ᵥ b) = ↑a -ᵥ ↑b

full_name: AffineSubspace.coe_vadd
code: @[simp, norm_cast]
theorem coe_vadd (s : AffineSubspace k P) [Nonempty s] (a : s.direction) (b : s) :
    ↑(a +ᵥ b) = (a : V) +ᵥ (b : P) 
goal: ↑(a +ᵥ b) = ↑a +ᵥ ↑b

full_name: AffineSubspace.subtype
code: /-- Embedding of an affine subspace to the ambient space, as an affine map. -/
protected def subtype (s : AffineSubspace k P) [Nonempty s] : s →ᵃ[k] P 
goal: ↥s →ᵃ[k] P

full_name: AffineSubspace.subtype_linear
code: @[simp]
theorem subtype_linear (s : AffineSubspace k P) [Nonempty s] :
    s.subtype.linear = s.direction.subtype 
goal: s.subtype.linear = s.direction.subtype

full_name: AffineSubspace.subtype_apply
code: theorem subtype_apply (s : AffineSubspace k P) [Nonempty s] (p : s) : s.subtype p = p 
goal: s.subtype p = ↑p

full_name: AffineSubspace.coeSubtype
code: @[simp]
theorem coeSubtype (s : AffineSubspace k P) [Nonempty s] : (s.subtype : s → P) = ((↑) : s → P) 
goal: ⇑s.subtype = Subtype.val

full_name: AffineSubspace.injective_subtype
code: theorem injective_subtype (s : AffineSubspace k P) [Nonempty s] : Function.Injective s.subtype 
goal: Function.Injective ⇑s.subtype

full_name: AffineSubspace.eq_iff_direction_eq_of_mem
code: /-- Two affine subspaces with nonempty intersection are equal if and only if their directions are
equal. -/
theorem eq_iff_direction_eq_of_mem {s₁ s₂ : AffineSubspace k P} {p : P} (h₁ : p ∈ s₁)
    (h₂ : p ∈ s₂) : s₁ = s₂ ↔ s₁.direction = s₂.direction 
goal: s₁ = s₂ ↔ s₁.direction = s₂.direction

full_name: AffineSubspace.mk'
code: /-- Construct an affine subspace from a point and a direction. -/
def mk' (p : P) (direction : Submodule k V) : AffineSubspace k P 
goal: AffineSubspace k P

full_name: AffineSubspace.self_mem_mk'
code: /-- An affine subspace constructed from a point and a direction contains that point. -/
theorem self_mem_mk' (p : P) (direction : Submodule k V) : p ∈ mk' p direction 
goal: p ∈ AffineSubspace.mk' p direction

full_name: AffineSubspace.vadd_mem_mk'
code: /-- An affine subspace constructed from a point and a direction contains the result of adding a
vector in that direction to that point. -/
theorem vadd_mem_mk' {v : V} (p : P) {direction : Submodule k V} (hv : v ∈ direction) :
    v +ᵥ p ∈ mk' p direction 
goal: v +ᵥ p ∈ AffineSubspace.mk' p direction

full_name: AffineSubspace.mk'_nonempty
code: /-- An affine subspace constructed from a point and a direction is nonempty. -/
theorem mk'_nonempty (p : P) (direction : Submodule k V) : (mk' p direction : Set P).Nonempty 
goal: (↑(AffineSubspace.mk' p direction)).Nonempty

full_name: AffineSubspace.direction_mk'
code: /-- The direction of an affine subspace constructed from a point and a direction. -/
@[simp]
theorem direction_mk' (p : P) (direction : Submodule k V) :
    (mk' p direction).direction = direction 
goal: (AffineSubspace.mk' p direction).direction = direction

full_name: AffineSubspace.mem_mk'_iff_vsub_mem
code: /-- A point lies in an affine subspace constructed from another point and a direction if and only
if their difference is in that direction. -/
theorem mem_mk'_iff_vsub_mem {p₁ p₂ : P} {direction : Submodule k V} :
    p₂ ∈ mk' p₁ direction ↔ p₂ -ᵥ p₁ ∈ direction 
goal: p₂ ∈ AffineSubspace.mk' p₁ direction ↔ p₂ -ᵥ p₁ ∈ direction

full_name: AffineSubspace.mk'_eq
code: /-- Constructing an affine subspace from a point in a subspace and that subspace's direction
yields the original subspace. -/
@[simp]
theorem mk'_eq {s : AffineSubspace k P} {p : P} (hp : p ∈ s) : mk' p s.direction = s 
goal: AffineSubspace.mk' p s.direction = s

full_name: AffineSubspace.spanPoints_subset_coe_of_subset_coe
code: /-- If an affine subspace contains a set of points, it contains the `spanPoints` of that set. -/
theorem spanPoints_subset_coe_of_subset_coe {s : Set P} {s1 : AffineSubspace k P} (h : s ⊆ s1) :
    spanPoints k s ⊆ s1 
goal: spanPoints k s ⊆ ↑s1

full_name: Submodule.mem_toAffineSubspace
code: @[simp]
theorem mem_toAffineSubspace {p : Submodule k V} {x : V} :
    x ∈ p.toAffineSubspace ↔ x ∈ p 
goal: x ∈ p.toAffineSubspace ↔ x ∈ p

full_name: Submodule.toAffineSubspace_direction
code: @[simp]
theorem toAffineSubspace_direction (s : Submodule k V) : s.toAffineSubspace.direction = s 
goal: s.toAffineSubspace.direction = s

full_name: AffineMap.lineMap_mem
code: theorem AffineMap.lineMap_mem {k V P : Type*} [Ring k] [AddCommGroup V] [Module k V]
    [AddTorsor V P] {Q : AffineSubspace k P} {p₀ p₁ : P} (c : k) (h₀ : p₀ ∈ Q) (h₁ : p₁ ∈ Q) :
    AffineMap.lineMap p₀ p₁ c ∈ Q 
goal: (AffineMap.lineMap p₀ p₁) c ∈ Q

full_name: affineSpan
code: /-- The affine span of a set of points is the smallest affine subspace containing those points.
(Actually defined here in terms of spans in modules.) -/
def affineSpan (s : Set P) : AffineSubspace k P 
goal: AffineSubspace k P

full_name: coe_affineSpan
code: /-- The affine span, converted to a set, is `spanPoints`. -/
@[simp]
theorem coe_affineSpan (s : Set P) : (affineSpan k s : Set P) = spanPoints k s 
goal: ↑(affineSpan k s) = spanPoints k s

full_name: subset_affineSpan
code: /-- A set is contained in its affine span. -/
theorem subset_affineSpan (s : Set P) : s ⊆ affineSpan k s 
goal: s ⊆ ↑(affineSpan k s)

full_name: direction_affineSpan
code: /-- The direction of the affine span is the `vectorSpan`. -/
theorem direction_affineSpan (s : Set P) : (affineSpan k s).direction = vectorSpan k s 
goal: (affineSpan k s).direction = vectorSpan k s

full_name: mem_affineSpan
code: /-- A point in a set is in its affine span. -/
theorem mem_affineSpan {p : P} {s : Set P} (hp : p ∈ s) : p ∈ affineSpan k s 
goal: p ∈ affineSpan k s

full_name: AffineSubspace.instCompleteLattice
code: instance : CompleteLattice (AffineSubspace k P) 
goal: CompleteLattice (AffineSubspace k P)

full_name: AffineSubspace.instInhabited
code: instance : Inhabited (AffineSubspace k P) 
goal: Inhabited (AffineSubspace k P)

full_name: AffineSubspace.le_def
code: /-- The `≤` order on subspaces is the same as that on the corresponding sets. -/
theorem le_def (s1 s2 : AffineSubspace k P) : s1 ≤ s2 ↔ (s1 : Set P) ⊆ s2 
goal: s1 ≤ s2 ↔ ↑s1 ⊆ ↑s2

full_name: AffineSubspace.le_def'
code: /-- One subspace is less than or equal to another if and only if all its points are in the second
subspace. -/
theorem le_def' (s1 s2 : AffineSubspace k P) : s1 ≤ s2 ↔ ∀ p ∈ s1, p ∈ s2 
goal: s1 ≤ s2 ↔ ∀ p ∈ s1, p ∈ s2

full_name: AffineSubspace.lt_def
code: /-- The `<` order on subspaces is the same as that on the corresponding sets. -/
theorem lt_def (s1 s2 : AffineSubspace k P) : s1 < s2 ↔ (s1 : Set P) ⊂ s2 
goal: s1 < s2 ↔ ↑s1 ⊂ ↑s2

full_name: AffineSubspace.not_le_iff_exists
code: /-- One subspace is not less than or equal to another if and only if it has a point not in the
second subspace. -/
theorem not_le_iff_exists (s1 s2 : AffineSubspace k P) : ¬s1 ≤ s2 ↔ ∃ p ∈ s1, p ∉ s2 
goal: ¬s1 ≤ s2 ↔ ∃ p ∈ s1, p ∉ s2

full_name: AffineSubspace.exists_of_lt
code: /-- If a subspace is less than another, there is a point only in the second. -/
theorem exists_of_lt {s1 s2 : AffineSubspace k P} (h : s1 < s2) : ∃ p ∈ s2, p ∉ s1 
goal: ∃ p ∈ s2, p ∉ s1

full_name: AffineSubspace.lt_iff_le_and_exists
code: /-- A subspace is less than another if and only if it is less than or equal to the second subspace
and there is a point only in the second. -/
theorem lt_iff_le_and_exists (s1 s2 : AffineSubspace k P) :
    s1 < s2 ↔ s1 ≤ s2 ∧ ∃ p ∈ s2, p ∉ s1 
goal: s1 < s2 ↔ s1 ≤ s2 ∧ ∃ p ∈ s2, p ∉ s1

full_name: AffineSubspace.eq_of_direction_eq_of_nonempty_of_le
code: /-- If an affine subspace is nonempty and contained in another with the same direction, they are
equal. -/
theorem eq_of_direction_eq_of_nonempty_of_le {s₁ s₂ : AffineSubspace k P}
    (hd : s₁.direction = s₂.direction) (hn : (s₁ : Set P).Nonempty) (hle : s₁ ≤ s₂) : s₁ = s₂ 
goal: s₁ = s₂

full_name: AffineSubspace.affineSpan_eq_sInf
code: /-- The affine span is the `sInf` of subspaces containing the given points. -/
theorem affineSpan_eq_sInf (s : Set P) :
    affineSpan k s = sInf { s' : AffineSubspace k P | s ⊆ s' } 
goal: affineSpan k s = sInf {s' | s ⊆ ↑s'}

full_name: AffineSubspace.gi
code: /-- The Galois insertion formed by `affineSpan` and coercion back to a set. -/
protected def gi : GaloisInsertion (affineSpan k) ((↑) : AffineSubspace k P → Set P) 
goal: GaloisInsertion (affineSpan k) SetLike.coe

full_name: AffineSubspace.span_empty
code: /-- The span of the empty set is `⊥`. -/
@[simp]
theorem span_empty : affineSpan k (∅ : Set P) = ⊥ 
goal: affineSpan k ∅ = ⊥

full_name: AffineSubspace.span_univ
code: /-- The span of `univ` is `⊤`. -/
@[simp]
theorem span_univ : affineSpan k (Set.univ : Set P) = ⊤ 
goal: affineSpan k Set.univ = ⊤

full_name: affineSpan_le
code: theorem _root_.affineSpan_le {s : Set P} {Q : AffineSubspace k P} :
    affineSpan k s ≤ Q ↔ s ⊆ (Q : Set P) 
goal: affineSpan k s ≤ Q ↔ s ⊆ ↑Q

full_name: AffineSubspace.coe_affineSpan_singleton
code: /-- The affine span of a single point, coerced to a set, contains just that point. -/
@[simp 1001] -- Porting note: this needs to take priority over `coe_affineSpan`
theorem coe_affineSpan_singleton (p : P) : (affineSpan k ({p} : Set P) : Set P) = {p} 
goal: ↑(affineSpan k {p}) = {p}

full_name: AffineSubspace.mem_affineSpan_singleton
code: /-- A point is in the affine span of a single point if and only if they are equal. -/
@[simp]
theorem mem_affineSpan_singleton : p₁ ∈ affineSpan k ({p₂} : Set P) ↔ p₁ = p₂ 
goal: p₁ ∈ affineSpan k {p₂} ↔ p₁ = p₂

full_name: AffineSubspace.preimage_coe_affineSpan_singleton
code: @[simp]
theorem preimage_coe_affineSpan_singleton (x : P) :
    ((↑) : affineSpan k ({x} : Set P) → P) ⁻¹' {x} = univ 
goal: Subtype.val ⁻¹' {x} = Set.univ

full_name: AffineSubspace.span_union
code: /-- The span of a union of sets is the sup of their spans. -/
theorem span_union (s t : Set P) : affineSpan k (s ∪ t) = affineSpan k s ⊔ affineSpan k t 
goal: affineSpan k (s ∪ t) = affineSpan k s ⊔ affineSpan k t

full_name: AffineSubspace.span_iUnion
code: /-- The span of a union of an indexed family of sets is the sup of their spans. -/
theorem span_iUnion {ι : Type*} (s : ι → Set P) :
    affineSpan k (⋃ i, s i) = ⨆ i, affineSpan k (s i) 
goal: affineSpan k (⋃ i, s i) = ⨆ i, affineSpan k (s i)

full_name: AffineSubspace.top_coe
code: /-- `⊤`, coerced to a set, is the whole set of points. -/
@[simp]
theorem top_coe : ((⊤ : AffineSubspace k P) : Set P) = Set.univ 
goal: ↑⊤ = Set.univ

full_name: AffineSubspace.mem_top
code: /-- All points are in `⊤`. -/
@[simp]
theorem mem_top (p : P) : p ∈ (⊤ : AffineSubspace k P) 
goal: p ∈ ⊤

full_name: AffineSubspace.direction_top
code: /-- The direction of `⊤` is the whole module as a submodule. -/
@[simp]
theorem direction_top : (⊤ : AffineSubspace k P).direction = ⊤ 
goal: ⊤.direction = ⊤

full_name: AffineSubspace.bot_coe
code: /-- `⊥`, coerced to a set, is the empty set. -/
@[simp]
theorem bot_coe : ((⊥ : AffineSubspace k P) : Set P) = ∅ 
goal: ↑⊥ = ∅

full_name: AffineSubspace.bot_ne_top
code: theorem bot_ne_top : (⊥ : AffineSubspace k P) ≠ ⊤ 
goal: ⊥ ≠ ⊤

full_name: AffineSubspace.instNontrivial
code: instance : Nontrivial (AffineSubspace k P) 
goal: Nontrivial (AffineSubspace k P)

full_name: AffineSubspace.nonempty_of_affineSpan_eq_top
code: theorem nonempty_of_affineSpan_eq_top {s : Set P} (h : affineSpan k s = ⊤) : s.Nonempty 
goal: s.Nonempty

full_name: AffineSubspace.vectorSpan_eq_top_of_affineSpan_eq_top
code: /-- If the affine span of a set is `⊤`, then the vector span of the same set is the `⊤`. -/
theorem vectorSpan_eq_top_of_affineSpan_eq_top {s : Set P} (h : affineSpan k s = ⊤) :
    vectorSpan k s = ⊤ 
goal: vectorSpan k s = ⊤

full_name: AffineSubspace.affineSpan_eq_top_iff_vectorSpan_eq_top_of_nonempty
code: /-- For a nonempty set, the affine span is `⊤` iff its vector span is `⊤`. -/
theorem affineSpan_eq_top_iff_vectorSpan_eq_top_of_nonempty {s : Set P} (hs : s.Nonempty) :
    affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤ 
goal: affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤

full_name: AffineSubspace.affineSpan_eq_top_iff_vectorSpan_eq_top_of_nontrivial
code: /-- For a non-trivial space, the affine span of a set is `⊤` iff its vector span is `⊤`. -/
theorem affineSpan_eq_top_iff_vectorSpan_eq_top_of_nontrivial {s : Set P} [Nontrivial P] :
    affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤ 
goal: affineSpan k s = ⊤ ↔ vectorSpan k s = ⊤

full_name: AffineSubspace.card_pos_of_affineSpan_eq_top
code: theorem card_pos_of_affineSpan_eq_top {ι : Type*} [Fintype ι] {p : ι → P}
    (h : affineSpan k (range p) = ⊤) : 0 < Fintype.card ι 
goal: 0 < Fintype.card ι

full_name: AffineSubspace.linear_topEquiv
code: /-- The top affine subspace is linearly equivalent to the affine space.

This is the affine version of `Submodule.topEquiv`. -/
@[simps! linear apply symm_apply_coe]
def topEquiv : (⊤ : AffineSubspace k P) ≃ᵃ[k] P 
goal: (AffineSubspace.topEquiv k V P).linear = (LinearEquiv.ofEq ⊤.direction ⊤ ⋯).trans Submodule.topEquiv

full_name: AffineSubspace.topEquiv_symm_apply_coe
code: /-- The top affine subspace is linearly equivalent to the affine space.

This is the affine version of `Submodule.topEquiv`. -/
@[simps! linear apply symm_apply_coe]
def topEquiv : (⊤ : AffineSubspace k P) ≃ᵃ[k] P 
goal: ↑((AffineSubspace.topEquiv k V P).symm a) = a

full_name: AffineSubspace.topEquiv_apply
code: /-- The top affine subspace is linearly equivalent to the affine space.

This is the affine version of `Submodule.topEquiv`. -/
@[simps! linear apply symm_apply_coe]
def topEquiv : (⊤ : AffineSubspace k P) ≃ᵃ[k] P 
goal: (AffineSubspace.topEquiv k V P) self = ↑self

full_name: AffineSubspace.topEquiv
code: /-- The top affine subspace is linearly equivalent to the affine space.

This is the affine version of `Submodule.topEquiv`. -/
@[simps! linear apply symm_apply_coe]
def topEquiv : (⊤ : AffineSubspace k P) ≃ᵃ[k] P 
goal: ↥⊤ ≃ᵃ[k] P

full_name: AffineSubspace.not_mem_bot
code: /-- No points are in `⊥`. -/
theorem not_mem_bot (p : P) : p ∉ (⊥ : AffineSubspace k P) 
goal: p ∉ ⊥

full_name: AffineSubspace.direction_bot
code: /-- The direction of `⊥` is the submodule `⊥`. -/
@[simp]
theorem direction_bot : (⊥ : AffineSubspace k P).direction = ⊥ 
goal: ⊥.direction = ⊥

full_name: AffineSubspace.coe_eq_bot_iff
code: @[simp]
theorem coe_eq_bot_iff (Q : AffineSubspace k P) : (Q : Set P) = ∅ ↔ Q = ⊥ 
goal: ↑Q = ∅ ↔ Q = ⊥

full_name: AffineSubspace.coe_eq_univ_iff
code: @[simp]
theorem coe_eq_univ_iff (Q : AffineSubspace k P) : (Q : Set P) = univ ↔ Q = ⊤ 
goal: ↑Q = Set.univ ↔ Q = ⊤

full_name: AffineSubspace.nonempty_iff_ne_bot
code: theorem nonempty_iff_ne_bot (Q : AffineSubspace k P) : (Q : Set P).Nonempty ↔ Q ≠ ⊥ 
goal: (↑Q).Nonempty ↔ Q ≠ ⊥

full_name: AffineSubspace.eq_bot_or_nonempty
code: theorem eq_bot_or_nonempty (Q : AffineSubspace k P) : Q = ⊥ ∨ (Q : Set P).Nonempty 
goal: Q = ⊥ ∨ (↑Q).Nonempty

full_name: AffineSubspace.subsingleton_of_subsingleton_span_eq_top
code: theorem subsingleton_of_subsingleton_span_eq_top {s : Set P} (h₁ : s.Subsingleton)
    (h₂ : affineSpan k s = ⊤) : Subsingleton P 
goal: Subsingleton P

full_name: AffineSubspace.eq_univ_of_subsingleton_span_eq_top
code: theorem eq_univ_of_subsingleton_span_eq_top {s : Set P} (h₁ : s.Subsingleton)
    (h₂ : affineSpan k s = ⊤) : s = (univ : Set P) 
goal: s = Set.univ

full_name: AffineSubspace.direction_eq_top_iff_of_nonempty
code: /-- A nonempty affine subspace is `⊤` if and only if its direction is `⊤`. -/
@[simp]
theorem direction_eq_top_iff_of_nonempty {s : AffineSubspace k P} (h : (s : Set P).Nonempty) :
    s.direction = ⊤ ↔ s = ⊤ 
goal: s.direction = ⊤ ↔ s = ⊤

full_name: AffineSubspace.inf_coe
code: /-- The inf of two affine subspaces, coerced to a set, is the intersection of the two sets of
points. -/
@[simp]
theorem inf_coe (s1 s2 : AffineSubspace k P) : (s1 ⊓ s2 : Set P) = (s1 : Set P) ∩ s2 
goal: ↑s1 ⊓ ↑s2 = ↑s1 ∩ ↑s2

full_name: AffineSubspace.mem_inf_iff
code: /-- A point is in the inf of two affine subspaces if and only if it is in both of them. -/
theorem mem_inf_iff (p : P) (s1 s2 : AffineSubspace k P) : p ∈ s1 ⊓ s2 ↔ p ∈ s1 ∧ p ∈ s2 
goal: p ∈ s1 ⊓ s2 ↔ p ∈ s1 ∧ p ∈ s2

full_name: AffineSubspace.direction_inf
code: /-- The direction of the inf of two affine subspaces is less than or equal to the inf of their
directions. -/
theorem direction_inf (s1 s2 : AffineSubspace k P) :
    (s1 ⊓ s2).direction ≤ s1.direction ⊓ s2.direction 
goal: (s1 ⊓ s2).direction ≤ s1.direction ⊓ s2.direction

full_name: AffineSubspace.direction_inf_of_mem
code: /-- If two affine subspaces have a point in common, the direction of their inf equals the inf of
their directions. -/
theorem direction_inf_of_mem {s₁ s₂ : AffineSubspace k P} {p : P} (h₁ : p ∈ s₁) (h₂ : p ∈ s₂) :
    (s₁ ⊓ s₂).direction = s₁.direction ⊓ s₂.direction 
goal: (s₁ ⊓ s₂).direction = s₁.direction ⊓ s₂.direction

full_name: AffineSubspace.direction_inf_of_mem_inf
code: /-- If two affine subspaces have a point in their inf, the direction of their inf equals the inf of
their directions. -/
theorem direction_inf_of_mem_inf {s₁ s₂ : AffineSubspace k P} {p : P} (h : p ∈ s₁ ⊓ s₂) :
    (s₁ ⊓ s₂).direction = s₁.direction ⊓ s₂.direction 
goal: (s₁ ⊓ s₂).direction = s₁.direction ⊓ s₂.direction

full_name: AffineSubspace.direction_le
code: /-- If one affine subspace is less than or equal to another, the same applies to their
directions. -/
theorem direction_le {s1 s2 : AffineSubspace k P} (h : s1 ≤ s2) : s1.direction ≤ s2.direction 
goal: s1.direction ≤ s2.direction

full_name: AffineSubspace.direction_lt_of_nonempty
code: /-- If one nonempty affine subspace is less than another, the same applies to their directions -/
theorem direction_lt_of_nonempty {s1 s2 : AffineSubspace k P} (h : s1 < s2)
    (hn : (s1 : Set P).Nonempty) : s1.direction < s2.direction 
goal: s1.direction < s2.direction

full_name: AffineSubspace.sup_direction_le
code: /-- The sup of the directions of two affine subspaces is less than or equal to the direction of
their sup. -/
theorem sup_direction_le (s1 s2 : AffineSubspace k P) :
    s1.direction ⊔ s2.direction ≤ (s1 ⊔ s2).direction 
goal: s1.direction ⊔ s2.direction ≤ (s1 ⊔ s2).direction

full_name: AffineSubspace.sup_direction_lt_of_nonempty_of_inter_empty
code: /-- The sup of the directions of two nonempty affine subspaces with empty intersection is less than
the direction of their sup. -/
theorem sup_direction_lt_of_nonempty_of_inter_empty {s1 s2 : AffineSubspace k P}
    (h1 : (s1 : Set P).Nonempty) (h2 : (s2 : Set P).Nonempty) (he : (s1 ∩ s2 : Set P) = ∅) :
    s1.direction ⊔ s2.direction < (s1 ⊔ s2).direction 
goal: s1.direction ⊔ s2.direction < (s1 ⊔ s2).direction

full_name: AffineSubspace.inter_nonempty_of_nonempty_of_sup_direction_eq_top
code: /-- If the directions of two nonempty affine subspaces span the whole module, they have nonempty
intersection. -/
theorem inter_nonempty_of_nonempty_of_sup_direction_eq_top {s1 s2 : AffineSubspace k P}
    (h1 : (s1 : Set P).Nonempty) (h2 : (s2 : Set P).Nonempty)
    (hd : s1.direction ⊔ s2.direction = ⊤) : ((s1 : Set P) ∩ s2).Nonempty 
goal: (↑s1 ∩ ↑s2).Nonempty

full_name: AffineSubspace.inter_eq_singleton_of_nonempty_of_isCompl
code: /-- If the directions of two nonempty affine subspaces are complements of each other, they intersect
in exactly one point. -/
theorem inter_eq_singleton_of_nonempty_of_isCompl {s1 s2 : AffineSubspace k P}
    (h1 : (s1 : Set P).Nonempty) (h2 : (s2 : Set P).Nonempty)
    (hd : IsCompl s1.direction s2.direction) : ∃ p, (s1 : Set P) ∩ s2 = {p} 
goal: ∃ p, ↑s1 ∩ ↑s2 = {p}

full_name: AffineSubspace.affineSpan_coe
code: /-- Coercing a subspace to a set then taking the affine span produces the original subspace. -/
@[simp]
theorem affineSpan_coe (s : AffineSubspace k P) : affineSpan k (s : Set P) = s 
goal: affineSpan k ↑s = s

full_name: vectorSpan_eq_span_vsub_set_left
code: /-- The `vectorSpan` is the span of the pairwise subtractions with a given point on the left. -/
theorem vectorSpan_eq_span_vsub_set_left {s : Set P} {p : P} (hp : p ∈ s) :
    vectorSpan k s = Submodule.span k ((p -ᵥ ·) '' s) 
goal: vectorSpan k s = Submodule.span k ((fun x => p -ᵥ x) '' s)

full_name: vectorSpan_eq_span_vsub_set_right
code: /-- The `vectorSpan` is the span of the pairwise subtractions with a given point on the right. -/
theorem vectorSpan_eq_span_vsub_set_right {s : Set P} {p : P} (hp : p ∈ s) :
    vectorSpan k s = Submodule.span k ((· -ᵥ p) '' s) 
goal: vectorSpan k s = Submodule.span k ((fun x => x -ᵥ p) '' s)

full_name: vectorSpan_eq_span_vsub_set_left_ne
code: /-- The `vectorSpan` is the span of the pairwise subtractions with a given point on the left,
excluding the subtraction of that point from itself. -/
theorem vectorSpan_eq_span_vsub_set_left_ne {s : Set P} {p : P} (hp : p ∈ s) :
    vectorSpan k s = Submodule.span k ((p -ᵥ ·) '' (s \ {p})) 
goal: vectorSpan k s = Submodule.span k ((fun x => p -ᵥ x) '' (s \ {p}))

full_name: vectorSpan_eq_span_vsub_set_right_ne
code: /-- The `vectorSpan` is the span of the pairwise subtractions with a given point on the right,
excluding the subtraction of that point from itself. -/
theorem vectorSpan_eq_span_vsub_set_right_ne {s : Set P} {p : P} (hp : p ∈ s) :
    vectorSpan k s = Submodule.span k ((· -ᵥ p) '' (s \ {p})) 
goal: vectorSpan k s = Submodule.span k ((fun x => x -ᵥ p) '' (s \ {p}))

full_name: vectorSpan_eq_span_vsub_finset_right_ne
code: /-- The `vectorSpan` is the span of the pairwise subtractions with a given point on the right,
excluding the subtraction of that point from itself. -/
theorem vectorSpan_eq_span_vsub_finset_right_ne [DecidableEq P] [DecidableEq V] {s : Finset P}
    {p : P} (hp : p ∈ s) :
    vectorSpan k (s : Set P) = Submodule.span k ((s.erase p).image (· -ᵥ p)) 
goal: vectorSpan k ↑s = Submodule.span k ↑(Finset.image (fun x => x -ᵥ p) (s.erase p))

full_name: vectorSpan_image_eq_span_vsub_set_left_ne
code: /-- The `vectorSpan` of the image of a function is the span of the pairwise subtractions with a
given point on the left, excluding the subtraction of that point from itself. -/
theorem vectorSpan_image_eq_span_vsub_set_left_ne (p : ι → P) {s : Set ι} {i : ι} (hi : i ∈ s) :
    vectorSpan k (p '' s) = Submodule.span k ((p i -ᵥ ·) '' (p '' (s \ {i}))) 
goal: vectorSpan k (p '' s) = Submodule.span k ((fun x => p i -ᵥ x) '' (p '' (s \ {i})))

full_name: vectorSpan_image_eq_span_vsub_set_right_ne
code: /-- The `vectorSpan` of the image of a function is the span of the pairwise subtractions with a
given point on the right, excluding the subtraction of that point from itself. -/
theorem vectorSpan_image_eq_span_vsub_set_right_ne (p : ι → P) {s : Set ι} {i : ι} (hi : i ∈ s) :
    vectorSpan k (p '' s) = Submodule.span k ((· -ᵥ p i) '' (p '' (s \ {i}))) 
goal: vectorSpan k (p '' s) = Submodule.span k ((fun x => x -ᵥ p i) '' (p '' (s \ {i})))

full_name: vectorSpan_range_eq_span_range_vsub_left
code: /-- The `vectorSpan` of an indexed family is the span of the pairwise subtractions with a given
point on the left. -/
theorem vectorSpan_range_eq_span_range_vsub_left (p : ι → P) (i0 : ι) :
    vectorSpan k (Set.range p) = Submodule.span k (Set.range fun i : ι => p i0 -ᵥ p i) 
goal: vectorSpan k (Set.range p) = Submodule.span k (Set.range fun i => p i0 -ᵥ p i)

full_name: vectorSpan_range_eq_span_range_vsub_right
code: /-- The `vectorSpan` of an indexed family is the span of the pairwise subtractions with a given
point on the right. -/
theorem vectorSpan_range_eq_span_range_vsub_right (p : ι → P) (i0 : ι) :
    vectorSpan k (Set.range p) = Submodule.span k (Set.range fun i : ι => p i -ᵥ p i0) 
goal: vectorSpan k (Set.range p) = Submodule.span k (Set.range fun i => p i -ᵥ p i0)

full_name: vectorSpan_range_eq_span_range_vsub_left_ne
code: /-- The `vectorSpan` of an indexed family is the span of the pairwise subtractions with a given
point on the left, excluding the subtraction of that point from itself. -/
theorem vectorSpan_range_eq_span_range_vsub_left_ne (p : ι → P) (i₀ : ι) :
    vectorSpan k (Set.range p) =
      Submodule.span k (Set.range fun i : { x // x ≠ i₀ } => p i₀ -ᵥ p i) 
goal: vectorSpan k (Set.range p) = Submodule.span k (Set.range fun i => p i₀ -ᵥ p ↑i)

full_name: vectorSpan_range_eq_span_range_vsub_right_ne
code: /-- The `vectorSpan` of an indexed family is the span of the pairwise subtractions with a given
point on the right, excluding the subtraction of that point from itself. -/
theorem vectorSpan_range_eq_span_range_vsub_right_ne (p : ι → P) (i₀ : ι) :
    vectorSpan k (Set.range p) =
      Submodule.span k (Set.range fun i : { x // x ≠ i₀ } => p i -ᵥ p i₀) 
goal: vectorSpan k (Set.range p) = Submodule.span k (Set.range fun i => p ↑i -ᵥ p i₀)

full_name: affineSpan_nonempty
code: /-- The affine span of a set is nonempty if and only if that set is. -/
theorem affineSpan_nonempty : (affineSpan k s : Set P).Nonempty ↔ s.Nonempty 
goal: (↑(affineSpan k s)).Nonempty ↔ s.Nonempty

full_name: instNonemptySubtypeMemAffineSubspaceAffineSpanOfElem
code: /-- The affine span of a nonempty set is nonempty. -/
instance [Nonempty s] : Nonempty (affineSpan k s) 
goal: Nonempty ↥(affineSpan k s)

full_name: affineSpan_eq_bot
code: /-- The affine span of a set is `⊥` if and only if that set is empty. -/
@[simp]
theorem affineSpan_eq_bot : affineSpan k s = ⊥ ↔ s = ∅ 
goal: affineSpan k s = ⊥ ↔ s = ∅

full_name: bot_lt_affineSpan
code: @[simp]
theorem bot_lt_affineSpan : ⊥ < affineSpan k s ↔ s.Nonempty 
goal: ⊥ < affineSpan k s ↔ s.Nonempty

full_name: affineSpan_induction
code: /-- An induction principle for span membership. If `p` holds for all elements of `s` and is
preserved under certain affine combinations, then `p` holds for all elements of the span of `s`. -/
theorem affineSpan_induction {x : P} {s : Set P} {p : P → Prop} (h : x ∈ affineSpan k s)
    (mem : ∀ x : P, x ∈ s → p x)
    (smul_vsub_vadd : ∀ (c : k) (u v w : P), p u → p v → p w → p (c • (u -ᵥ v) +ᵥ w)) : p x 
goal: p x

full_name: affineSpan_induction'
code: /-- A dependent version of `affineSpan_induction`. -/
@[elab_as_elim]
theorem affineSpan_induction' {s : Set P} {p : ∀ x, x ∈ affineSpan k s → Prop}
    (mem : ∀ (y) (hys : y ∈ s), p y (subset_affineSpan k _ hys))
    (smul_vsub_vadd :
      ∀ (c : k) (u hu v hv w hw),
        p u hu →
          p v hv → p w hw → p (c • (u -ᵥ v) +ᵥ w) (AffineSubspace.smul_vsub_vadd_mem _ _ hu hv hw))
    {x : P} (h : x ∈ affineSpan k s) : p x h 
goal: p x h

full_name: affineSpan_coe_preimage_eq_top
code: /-- A set, considered as a subset of its spanned affine subspace, spans the whole subspace. -/
@[simp]
theorem affineSpan_coe_preimage_eq_top (A : Set P) [Nonempty A] :
    affineSpan k (((↑) : affineSpan k A → P) ⁻¹' A) = ⊤ 
goal: affineSpan k (Subtype.val ⁻¹' A) = ⊤

full_name: affineSpan_singleton_union_vadd_eq_top_of_span_eq_top
code: /-- Suppose a set of vectors spans `V`.  Then a point `p`, together with those vectors added to `p`,
spans `P`. -/
theorem affineSpan_singleton_union_vadd_eq_top_of_span_eq_top {s : Set V} (p : P)
    (h : Submodule.span k (Set.range ((↑) : s → V)) = ⊤) :
    affineSpan k ({p} ∪ (fun v => v +ᵥ p) '' s) = ⊤ 
goal: affineSpan k ({p} ∪ (fun v => v +ᵥ p) '' s) = ⊤

full_name: vectorSpan_pair
code: /-- The `vectorSpan` of two points is the span of their difference. -/
theorem vectorSpan_pair (p₁ p₂ : P) : vectorSpan k ({p₁, p₂} : Set P) = k ∙ p₁ -ᵥ p₂ 
goal: vectorSpan k {p₁, p₂} = Submodule.span k {p₁ -ᵥ p₂}

full_name: vectorSpan_pair_rev
code: /-- The `vectorSpan` of two points is the span of their difference (reversed). -/
theorem vectorSpan_pair_rev (p₁ p₂ : P) : vectorSpan k ({p₁, p₂} : Set P) = k ∙ p₂ -ᵥ p₁ 
goal: vectorSpan k {p₁, p₂} = Submodule.span k {p₂ -ᵥ p₁}

full_name: vsub_mem_vectorSpan_pair
code: /-- The difference between two points lies in their `vectorSpan`. -/
theorem vsub_mem_vectorSpan_pair (p₁ p₂ : P) : p₁ -ᵥ p₂ ∈ vectorSpan k ({p₁, p₂} : Set P) 
goal: p₁ -ᵥ p₂ ∈ vectorSpan k {p₁, p₂}

full_name: vsub_rev_mem_vectorSpan_pair
code: /-- The difference between two points (reversed) lies in their `vectorSpan`. -/
theorem vsub_rev_mem_vectorSpan_pair (p₁ p₂ : P) : p₂ -ᵥ p₁ ∈ vectorSpan k ({p₁, p₂} : Set P) 
goal: p₂ -ᵥ p₁ ∈ vectorSpan k {p₁, p₂}

full_name: smul_vsub_mem_vectorSpan_pair
code: /-- A multiple of the difference between two points lies in their `vectorSpan`. -/
theorem smul_vsub_mem_vectorSpan_pair (r : k) (p₁ p₂ : P) :
    r • (p₁ -ᵥ p₂) ∈ vectorSpan k ({p₁, p₂} : Set P) 
goal: r • (p₁ -ᵥ p₂) ∈ vectorSpan k {p₁, p₂}

full_name: smul_vsub_rev_mem_vectorSpan_pair
code: /-- A multiple of the difference between two points (reversed) lies in their `vectorSpan`. -/
theorem smul_vsub_rev_mem_vectorSpan_pair (r : k) (p₁ p₂ : P) :
    r • (p₂ -ᵥ p₁) ∈ vectorSpan k ({p₁, p₂} : Set P) 
goal: r • (p₂ -ᵥ p₁) ∈ vectorSpan k {p₁, p₂}

full_name: mem_vectorSpan_pair
code: /-- A vector lies in the `vectorSpan` of two points if and only if it is a multiple of their
difference. -/
theorem mem_vectorSpan_pair {p₁ p₂ : P} {v : V} :
    v ∈ vectorSpan k ({p₁, p₂} : Set P) ↔ ∃ r : k, r • (p₁ -ᵥ p₂) = v 
goal: v ∈ vectorSpan k {p₁, p₂} ↔ ∃ r, r • (p₁ -ᵥ p₂) = v

full_name: mem_vectorSpan_pair_rev
code: /-- A vector lies in the `vectorSpan` of two points if and only if it is a multiple of their
difference (reversed). -/
theorem mem_vectorSpan_pair_rev {p₁ p₂ : P} {v : V} :
    v ∈ vectorSpan k ({p₁, p₂} : Set P) ↔ ∃ r : k, r • (p₂ -ᵥ p₁) = v 
goal: v ∈ vectorSpan k {p₁, p₂} ↔ ∃ r, r • (p₂ -ᵥ p₁) = v

full_name: _aux_Mathlib_LinearAlgebra_AffineSpace_AffineSubspace___unexpand_affineSpan_1
code: /-- The line between two points, as an affine subspace. -/
notation "line[" k ", " p₁ ", " p₂ "]" =>
  affineSpan k (insert p₁ (@singleton _ _ Set.instSingletonSet p₂))
goal: Lean.PrettyPrinter.Unexpander

full_name: «_aux_Mathlib_LinearAlgebra_AffineSpace_AffineSubspace___macroRules_termLine[_,_,_]_1»
code: /-- The line between two points, as an affine subspace. -/
notation "line[" k ", " p₁ ", " p₂ "]" =>
  affineSpan k (insert p₁ (@singleton _ _ Set.instSingletonSet p₂))
goal: Lean.Macro

full_name: left_mem_affineSpan_pair
code: /-- The first of two points lies in their affine span. -/
theorem left_mem_affineSpan_pair (p₁ p₂ : P) : p₁ ∈ line[k, p₁, p₂] 
goal: p₁ ∈ affineSpan k {p₁, p₂}

full_name: right_mem_affineSpan_pair
code: /-- The second of two points lies in their affine span. -/
theorem right_mem_affineSpan_pair (p₁ p₂ : P) : p₂ ∈ line[k, p₁, p₂] 
goal: p₂ ∈ affineSpan k {p₁, p₂}

full_name: AffineMap.lineMap_mem_affineSpan_pair
code: /-- A combination of two points expressed with `lineMap` lies in their affine span. -/
theorem AffineMap.lineMap_mem_affineSpan_pair (r : k) (p₁ p₂ : P) :
    AffineMap.lineMap p₁ p₂ r ∈ line[k, p₁, p₂] 
goal: (AffineMap.lineMap p₁ p₂) r ∈ affineSpan k {p₁, p₂}

full_name: AffineMap.lineMap_rev_mem_affineSpan_pair
code: /-- A combination of two points expressed with `lineMap` (with the two points reversed) lies in
their affine span. -/
theorem AffineMap.lineMap_rev_mem_affineSpan_pair (r : k) (p₁ p₂ : P) :
    AffineMap.lineMap p₂ p₁ r ∈ line[k, p₁, p₂] 
goal: (AffineMap.lineMap p₂ p₁) r ∈ affineSpan k {p₁, p₂}

full_name: smul_vsub_vadd_mem_affineSpan_pair
code: /-- A multiple of the difference of two points added to the first point lies in their affine
span. -/
theorem smul_vsub_vadd_mem_affineSpan_pair (r : k) (p₁ p₂ : P) :
    r • (p₂ -ᵥ p₁) +ᵥ p₁ ∈ line[k, p₁, p₂] 
goal: r • (p₂ -ᵥ p₁) +ᵥ p₁ ∈ affineSpan k {p₁, p₂}

full_name: smul_vsub_rev_vadd_mem_affineSpan_pair
code: /-- A multiple of the difference of two points added to the second point lies in their affine
span. -/
theorem smul_vsub_rev_vadd_mem_affineSpan_pair (r : k) (p₁ p₂ : P) :
    r • (p₁ -ᵥ p₂) +ᵥ p₂ ∈ line[k, p₁, p₂] 
goal: r • (p₁ -ᵥ p₂) +ᵥ p₂ ∈ affineSpan k {p₁, p₂}

full_name: vadd_left_mem_affineSpan_pair
code: /-- A vector added to the first point lies in the affine span of two points if and only if it is
a multiple of their difference. -/
theorem vadd_left_mem_affineSpan_pair {p₁ p₂ : P} {v : V} :
    v +ᵥ p₁ ∈ line[k, p₁, p₂] ↔ ∃ r : k, r • (p₂ -ᵥ p₁) = v 
goal: v +ᵥ p₁ ∈ affineSpan k {p₁, p₂} ↔ ∃ r, r • (p₂ -ᵥ p₁) = v

full_name: vadd_right_mem_affineSpan_pair
code: /-- A vector added to the second point lies in the affine span of two points if and only if it is
a multiple of their difference. -/
theorem vadd_right_mem_affineSpan_pair {p₁ p₂ : P} {v : V} :
    v +ᵥ p₂ ∈ line[k, p₁, p₂] ↔ ∃ r : k, r • (p₁ -ᵥ p₂) = v 
goal: v +ᵥ p₂ ∈ affineSpan k {p₁, p₂} ↔ ∃ r, r • (p₁ -ᵥ p₂) = v

full_name: affineSpan_pair_le_of_mem_of_mem
code: /-- The span of two points that lie in an affine subspace is contained in that subspace. -/
theorem affineSpan_pair_le_of_mem_of_mem {p₁ p₂ : P} {s : AffineSubspace k P} (hp₁ : p₁ ∈ s)
    (hp₂ : p₂ ∈ s) : line[k, p₁, p₂] ≤ s 
goal: affineSpan k {p₁, p₂} ≤ s

full_name: affineSpan_pair_le_of_left_mem
code: /-- One line is contained in another differing in the first point if the first point of the first
line is contained in the second line. -/
theorem affineSpan_pair_le_of_left_mem {p₁ p₂ p₃ : P} (h : p₁ ∈ line[k, p₂, p₃]) :
    line[k, p₁, p₃] ≤ line[k, p₂, p₃] 
goal: affineSpan k {p₁, p₃} ≤ affineSpan k {p₂, p₃}

full_name: affineSpan_pair_le_of_right_mem
code: /-- One line is contained in another differing in the second point if the second point of the
first line is contained in the second line. -/
theorem affineSpan_pair_le_of_right_mem {p₁ p₂ p₃ : P} (h : p₁ ∈ line[k, p₂, p₃]) :
    line[k, p₂, p₁] ≤ line[k, p₂, p₃] 
goal: affineSpan k {p₂, p₁} ≤ affineSpan k {p₂, p₃}

full_name: affineSpan_mono
code: /-- `affineSpan` is monotone. -/
@[mono]
theorem affineSpan_mono {s₁ s₂ : Set P} (h : s₁ ⊆ s₂) : affineSpan k s₁ ≤ affineSpan k s₂ 
goal: affineSpan k s₁ ≤ affineSpan k s₂

full_name: affineSpan_insert_affineSpan
code: /-- Taking the affine span of a set, adding a point and taking the span again produces the same
results as adding the point to the set and taking the span. -/
theorem affineSpan_insert_affineSpan (p : P) (ps : Set P) :
    affineSpan k (insert p (affineSpan k ps : Set P)) = affineSpan k (insert p ps) 
goal: affineSpan k (insert p ↑(affineSpan k ps)) = affineSpan k (insert p ps)

full_name: affineSpan_insert_eq_affineSpan
code: /-- If a point is in the affine span of a set, adding it to that set does not change the affine
span. -/
theorem affineSpan_insert_eq_affineSpan {p : P} {ps : Set P} (h : p ∈ affineSpan k ps) :
    affineSpan k (insert p ps) = affineSpan k ps 
goal: affineSpan k (insert p ps) = affineSpan k ps

full_name: vectorSpan_insert_eq_vectorSpan
code: /-- If a point is in the affine span of a set, adding it to that set does not change the vector
span. -/
theorem vectorSpan_insert_eq_vectorSpan {p : P} {ps : Set P} (h : p ∈ affineSpan k ps) :
    vectorSpan k (insert p ps) = vectorSpan k ps 
goal: vectorSpan k (insert p ps) = vectorSpan k ps

full_name: affineSpan_le_toAffineSubspace_span
code: /-- When the affine space is also a vector space, the affine span is contained within the linear
span. -/
lemma affineSpan_le_toAffineSubspace_span {s : Set V} :
    affineSpan k s ≤ (Submodule.span k s).toAffineSubspace 
goal: affineSpan k s ≤ (Submodule.span k s).toAffineSubspace

full_name: affineSpan_subset_span
code: lemma affineSpan_subset_span {s : Set V} :
    (affineSpan k s : Set V) ⊆  Submodule.span k s 
goal: ↑(affineSpan k s) ⊆ ↑(Submodule.span k s)

full_name: AffineSubspace.direction_sup
code: /-- The direction of the sup of two nonempty affine subspaces is the sup of the two directions and
of any one difference between points in the two subspaces. -/
theorem direction_sup {s1 s2 : AffineSubspace k P} {p1 p2 : P} (hp1 : p1 ∈ s1) (hp2 : p2 ∈ s2) :
    (s1 ⊔ s2).direction = s1.direction ⊔ s2.direction ⊔ k ∙ p2 -ᵥ p1 
goal: (s1 ⊔ s2).direction = s1.direction ⊔ s2.direction ⊔ Submodule.span k {p2 -ᵥ p1}

full_name: AffineSubspace.direction_affineSpan_insert
code: /-- The direction of the span of the result of adding a point to a nonempty affine subspace is the
sup of the direction of that subspace and of any one difference between that point and a point in
the subspace. -/
theorem direction_affineSpan_insert {s : AffineSubspace k P} {p1 p2 : P} (hp1 : p1 ∈ s) :
    (affineSpan k (insert p2 (s : Set P))).direction =
    Submodule.span k {p2 -ᵥ p1} ⊔ s.direction 
goal: (affineSpan k (insert p2 ↑s)).direction = Submodule.span k {p2 -ᵥ p1} ⊔ s.direction

full_name: AffineSubspace.mem_affineSpan_insert_iff
code: /-- Given a point `p1` in an affine subspace `s`, and a point `p2`, a point `p` is in the span of
`s` with `p2` added if and only if it is a multiple of `p2 -ᵥ p1` added to a point in `s`. -/
theorem mem_affineSpan_insert_iff {s : AffineSubspace k P} {p1 : P} (hp1 : p1 ∈ s) (p2 p : P) :
    p ∈ affineSpan k (insert p2 (s : Set P)) ↔
      ∃ r : k, ∃ p0 ∈ s, p = r • (p2 -ᵥ p1 : V) +ᵥ p0 
goal: p ∈ affineSpan k (insert p2 ↑s) ↔ ∃ r, ∃ p0 ∈ s, p = r • (p2 -ᵥ p1) +ᵥ p0

full_name: AffineMap.vectorSpan_image_eq_submodule_map
code: @[simp]
theorem AffineMap.vectorSpan_image_eq_submodule_map {s : Set P₁} :
    Submodule.map f.linear (vectorSpan k s) = vectorSpan k (f '' s) 
goal: Submodule.map f.linear (vectorSpan k s) = vectorSpan k (⇑f '' s)

full_name: AffineSubspace.map
code: /-- The image of an affine subspace under an affine map as an affine subspace. -/
def map (s : AffineSubspace k P₁) : AffineSubspace k P₂ 
goal: AffineSubspace k P₂

full_name: AffineSubspace.coe_map
code: @[simp]
theorem coe_map (s : AffineSubspace k P₁) : (s.map f : Set P₂) = f '' s 
goal: ↑(AffineSubspace.map f s) = ⇑f '' ↑s

full_name: AffineSubspace.mem_map
code: @[simp]
theorem mem_map {f : P₁ →ᵃ[k] P₂} {x : P₂} {s : AffineSubspace k P₁} :
    x ∈ s.map f ↔ ∃ y ∈ s, f y = x 
goal: x ∈ AffineSubspace.map f s ↔ ∃ y ∈ s, f y = x

full_name: AffineSubspace.mem_map_of_mem
code: theorem mem_map_of_mem {x : P₁} {s : AffineSubspace k P₁} (h : x ∈ s) : f x ∈ s.map f 
goal: f x ∈ AffineSubspace.map f s

full_name: AffineSubspace.mem_map_iff_mem_of_injective
code: @[simp 1100, nolint simpNF]
theorem mem_map_iff_mem_of_injective {f : P₁ →ᵃ[k] P₂} {x : P₁} {s : AffineSubspace k P₁}
    (hf : Function.Injective f) : f x ∈ s.map f ↔ x ∈ s 
goal: f x ∈ AffineSubspace.map f s ↔ x ∈ s

full_name: AffineSubspace.map_bot
code: @[simp]
theorem map_bot : (⊥ : AffineSubspace k P₁).map f = ⊥ 
goal: AffineSubspace.map f ⊥ = ⊥

full_name: AffineSubspace.map_eq_bot_iff
code: @[simp]
theorem map_eq_bot_iff {s : AffineSubspace k P₁} : s.map f = ⊥ ↔ s = ⊥ 
goal: AffineSubspace.map f s = ⊥ ↔ s = ⊥

full_name: AffineSubspace.map_id
code: @[simp]
theorem map_id (s : AffineSubspace k P₁) : s.map (AffineMap.id k P₁) = s 
goal: AffineSubspace.map (AffineMap.id k P₁) s = s

full_name: AffineSubspace.map_map
code: theorem map_map (s : AffineSubspace k P₁) (f : P₁ →ᵃ[k] P₂) (g : P₂ →ᵃ[k] P₃) :
    (s.map f).map g = s.map (g.comp f) 
goal: AffineSubspace.map g (AffineSubspace.map f s) = AffineSubspace.map (g.comp f) s

full_name: AffineSubspace.map_direction
code: @[simp]
theorem map_direction (s : AffineSubspace k P₁) :
    (s.map f).direction = s.direction.map f.linear 
goal: (AffineSubspace.map f s).direction = Submodule.map f.linear s.direction

full_name: AffineSubspace.map_span
code: theorem map_span (s : Set P₁) : (affineSpan k s).map f = affineSpan k (f '' s) 
goal: AffineSubspace.map f (affineSpan k s) = affineSpan k (⇑f '' s)

full_name: AffineSubspace.inclusion_linear
code: /-- Affine map from a smaller to a larger subspace of the same space.

This is the affine version of `Submodule.inclusion`. -/
@[simps linear]
def inclusion (h : S₁ ≤ S₂) : S₁ →ᵃ[k] S₂ 
goal: (AffineSubspace.inclusion h).linear = Submodule.inclusion ⋯

full_name: AffineSubspace.inclusion
code: /-- Affine map from a smaller to a larger subspace of the same space.

This is the affine version of `Submodule.inclusion`. -/
@[simps linear]
def inclusion (h : S₁ ≤ S₂) : S₁ →ᵃ[k] S₂ 
goal: ↥S₁ →ᵃ[k] ↥S₂

full_name: AffineSubspace.coe_inclusion_apply
code: @[simp]
theorem coe_inclusion_apply (h : S₁ ≤ S₂) (x : S₁) : (inclusion h x : P₁) = x 
goal: ↑((AffineSubspace.inclusion h) x) = ↑x

full_name: AffineSubspace.inclusion_rfl
code: @[simp]
theorem inclusion_rfl : inclusion (le_refl S₁) = AffineMap.id k S₁ 
goal: AffineSubspace.inclusion ⋯ = AffineMap.id k ↥S₁

full_name: AffineMap.map_top_of_surjective
code: @[simp]
theorem map_top_of_surjective (hf : Function.Surjective f) : AffineSubspace.map f ⊤ = ⊤ 
goal: AffineSubspace.map f ⊤ = ⊤

full_name: AffineMap.span_eq_top_of_surjective
code: theorem span_eq_top_of_surjective {s : Set P₁} (hf : Function.Surjective f)
    (h : affineSpan k s = ⊤) : affineSpan k (f '' s) = ⊤ 
goal: affineSpan k (⇑f '' s) = ⊤

full_name: AffineEquiv.ofEq
code: /-- Affine equivalence between two equal affine subspace.

This is the affine version of `LinearEquiv.ofEq`. -/
@[simps linear]
def ofEq (h : S₁ = S₂) : S₁ ≃ᵃ[k] S₂ 
goal: ↥S₁ ≃ᵃ[k] ↥S₂

full_name: AffineEquiv.linear_ofEq
code: /-- Affine equivalence between two equal affine subspace.

This is the affine version of `LinearEquiv.ofEq`. -/
@[simps linear]
def ofEq (h : S₁ = S₂) : S₁ ≃ᵃ[k] S₂ 
goal: (AffineEquiv.ofEq S₁ S₂ h).linear = LinearEquiv.ofEq S₁.direction S₂.direction ⋯

full_name: AffineEquiv.coe_ofEq_apply
code: @[simp]
theorem coe_ofEq_apply (h : S₁ = S₂) (x : S₁) : (ofEq S₁ S₂ h x : P₁) = x 
goal: ↑((AffineEquiv.ofEq S₁ S₂ h) x) = ↑x

full_name: AffineEquiv.ofEq_symm
code: @[simp]
theorem ofEq_symm (h : S₁ = S₂) : (ofEq S₁ S₂ h).symm = ofEq S₂ S₁ h.symm 
goal: (AffineEquiv.ofEq S₁ S₂ h).symm = AffineEquiv.ofEq S₂ S₁ ⋯

full_name: AffineEquiv.ofEq_rfl
code: @[simp]
theorem ofEq_rfl : ofEq S₁ S₁ rfl = AffineEquiv.refl k S₁ 
goal: AffineEquiv.ofEq S₁ S₁ ⋯ = AffineEquiv.refl k ↥S₁

full_name: AffineEquiv.span_eq_top_iff
code: theorem span_eq_top_iff {s : Set P₁} (e : P₁ ≃ᵃ[k] P₂) :
    affineSpan k s = ⊤ ↔ affineSpan k (e '' s) = ⊤ 
goal: affineSpan k s = ⊤ ↔ affineSpan k (⇑e '' s) = ⊤

full_name: AffineSubspace.comap
code: /-- The preimage of an affine subspace under an affine map as an affine subspace. -/
def comap (f : P₁ →ᵃ[k] P₂) (s : AffineSubspace k P₂) : AffineSubspace k P₁ 
goal: AffineSubspace k P₁

full_name: AffineSubspace.coe_comap
code: @[simp]
theorem coe_comap (f : P₁ →ᵃ[k] P₂) (s : AffineSubspace k P₂) : (s.comap f : Set P₁) = f ⁻¹' ↑s 
goal: ↑(AffineSubspace.comap f s) = ⇑f ⁻¹' ↑s

full_name: AffineSubspace.mem_comap
code: @[simp]
theorem mem_comap {f : P₁ →ᵃ[k] P₂} {x : P₁} {s : AffineSubspace k P₂} : x ∈ s.comap f ↔ f x ∈ s 
goal: x ∈ AffineSubspace.comap f s ↔ f x ∈ s

full_name: AffineSubspace.comap_mono
code: theorem comap_mono {f : P₁ →ᵃ[k] P₂} {s t : AffineSubspace k P₂} : s ≤ t → s.comap f ≤ t.comap f 
goal: s ≤ t → AffineSubspace.comap f s ≤ AffineSubspace.comap f t

full_name: AffineSubspace.comap_top
code: @[simp]
theorem comap_top {f : P₁ →ᵃ[k] P₂} : (⊤ : AffineSubspace k P₂).comap f = ⊤ 
goal: AffineSubspace.comap f ⊤ = ⊤

full_name: AffineSubspace.comap_bot
code: @[simp] theorem comap_bot (f : P₁ →ᵃ[k] P₂) : comap f ⊥ = ⊥ 
goal: AffineSubspace.comap f ⊥ = ⊥

full_name: AffineSubspace.comap_id
code: @[simp]
theorem comap_id (s : AffineSubspace k P₁) : s.comap (AffineMap.id k P₁) = s 
goal: AffineSubspace.comap (AffineMap.id k P₁) s = s

full_name: AffineSubspace.comap_comap
code: theorem comap_comap (s : AffineSubspace k P₃) (f : P₁ →ᵃ[k] P₂) (g : P₂ →ᵃ[k] P₃) :
    (s.comap g).comap f = s.comap (g.comp f) 
goal: AffineSubspace.comap f (AffineSubspace.comap g s) = AffineSubspace.comap (g.comp f) s

full_name: AffineSubspace.map_le_iff_le_comap
code: theorem map_le_iff_le_comap {f : P₁ →ᵃ[k] P₂} {s : AffineSubspace k P₁} {t : AffineSubspace k P₂} :
    s.map f ≤ t ↔ s ≤ t.comap f 
goal: AffineSubspace.map f s ≤ t ↔ s ≤ AffineSubspace.comap f t

full_name: AffineSubspace.gc_map_comap
code: theorem gc_map_comap (f : P₁ →ᵃ[k] P₂) : GaloisConnection (map f) (comap f) 
goal: GaloisConnection (AffineSubspace.map f) (AffineSubspace.comap f)

full_name: AffineSubspace.map_comap_le
code: theorem map_comap_le (f : P₁ →ᵃ[k] P₂) (s : AffineSubspace k P₂) : (s.comap f).map f ≤ s 
goal: AffineSubspace.map f (AffineSubspace.comap f s) ≤ s

full_name: AffineSubspace.le_comap_map
code: theorem le_comap_map (f : P₁ →ᵃ[k] P₂) (s : AffineSubspace k P₁) : s ≤ (s.map f).comap f 
goal: s ≤ AffineSubspace.comap f (AffineSubspace.map f s)

full_name: AffineSubspace.map_sup
code: theorem map_sup (s t : AffineSubspace k P₁) (f : P₁ →ᵃ[k] P₂) : (s ⊔ t).map f = s.map f ⊔ t.map f 
goal: AffineSubspace.map f (s ⊔ t) = AffineSubspace.map f s ⊔ AffineSubspace.map f t

full_name: AffineSubspace.map_iSup
code: theorem map_iSup {ι : Sort*} (f : P₁ →ᵃ[k] P₂) (s : ι → AffineSubspace k P₁) :
    (iSup s).map f = ⨆ i, (s i).map f 
goal: AffineSubspace.map f (iSup s) = ⨆ i, AffineSubspace.map f (s i)

full_name: AffineSubspace.comap_inf
code: theorem comap_inf (s t : AffineSubspace k P₂) (f : P₁ →ᵃ[k] P₂) :
    (s ⊓ t).comap f = s.comap f ⊓ t.comap f 
goal: AffineSubspace.comap f (s ⊓ t) = AffineSubspace.comap f s ⊓ AffineSubspace.comap f t

full_name: AffineSubspace.comap_supr
code: theorem comap_supr {ι : Sort*} (f : P₁ →ᵃ[k] P₂) (s : ι → AffineSubspace k P₂) :
    (iInf s).comap f = ⨅ i, (s i).comap f 
goal: AffineSubspace.comap f (iInf s) = ⨅ i, AffineSubspace.comap f (s i)

full_name: AffineSubspace.comap_symm
code: @[simp]
theorem comap_symm (e : P₁ ≃ᵃ[k] P₂) (s : AffineSubspace k P₁) :
    s.comap (e.symm : P₂ →ᵃ[k] P₁) = s.map e 
goal: AffineSubspace.comap (↑e.symm) s = AffineSubspace.map (↑e) s

full_name: AffineSubspace.map_symm
code: @[simp]
theorem map_symm (e : P₁ ≃ᵃ[k] P₂) (s : AffineSubspace k P₂) :
    s.map (e.symm : P₂ →ᵃ[k] P₁) = s.comap e 
goal: AffineSubspace.map (↑e.symm) s = AffineSubspace.comap (↑e) s

full_name: AffineSubspace.comap_span
code: theorem comap_span (f : P₁ ≃ᵃ[k] P₂) (s : Set P₂) :
    (affineSpan k s).comap (f : P₁ →ᵃ[k] P₂) = affineSpan k (f ⁻¹' s) 
goal: AffineSubspace.comap (↑f) (affineSpan k s) = affineSpan k (⇑f ⁻¹' s)

full_name: AffineSubspace.Parallel
code: /-- Two affine subspaces are parallel if one is related to the other by adding the same vector
to all points. -/
def Parallel (s₁ s₂ : AffineSubspace k P) : Prop 
goal: Prop

full_name: Affine.«_aux_Mathlib_LinearAlgebra_AffineSpace_AffineSubspace___macroRules_Affine_term_∥__1»
code: @[inherit_doc]
scoped[Affine] infixl:50 " ∥ " => AffineSubspace.Parallel
goal: Lean.Macro

full_name: Affine._aux_Mathlib_LinearAlgebra_AffineSpace_AffineSubspace___unexpand_AffineSubspace_Parallel_1
code: @[inherit_doc]
scoped[Affine] infixl:50 " ∥ " => AffineSubspace.Parallel
goal: Lean.PrettyPrinter.Unexpander

full_name: AffineSubspace.Parallel.symm
code: @[symm]
theorem Parallel.symm {s₁ s₂ : AffineSubspace k P} (h : s₁ ∥ s₂) : s₂ ∥ s₁ 
goal: s₂ ∥ s₁

full_name: AffineSubspace.parallel_comm
code: theorem parallel_comm {s₁ s₂ : AffineSubspace k P} : s₁ ∥ s₂ ↔ s₂ ∥ s₁ 
goal: s₁ ∥ s₂ ↔ s₂ ∥ s₁

full_name: AffineSubspace.Parallel.refl
code: @[refl]
theorem Parallel.refl (s : AffineSubspace k P) : s ∥ s 
goal: s ∥ s

full_name: AffineSubspace.Parallel.trans
code: @[trans]
theorem Parallel.trans {s₁ s₂ s₃ : AffineSubspace k P} (h₁₂ : s₁ ∥ s₂) (h₂₃ : s₂ ∥ s₃) :
    s₁ ∥ s₃ 
goal: s₁ ∥ s₃

full_name: AffineSubspace.Parallel.direction_eq
code: theorem Parallel.direction_eq {s₁ s₂ : AffineSubspace k P} (h : s₁ ∥ s₂) :
    s₁.direction = s₂.direction 
goal: s₁.direction = s₂.direction

full_name: AffineSubspace.parallel_bot_iff_eq_bot
code: @[simp]
theorem parallel_bot_iff_eq_bot {s : AffineSubspace k P} : s ∥ ⊥ ↔ s = ⊥ 
goal: s ∥ ⊥ ↔ s = ⊥

full_name: AffineSubspace.bot_parallel_iff_eq_bot
code: @[simp]
theorem bot_parallel_iff_eq_bot {s : AffineSubspace k P} : ⊥ ∥ s ↔ s = ⊥ 
goal: ⊥ ∥ s ↔ s = ⊥

full_name: AffineSubspace.parallel_iff_direction_eq_and_eq_bot_iff_eq_bot
code: theorem parallel_iff_direction_eq_and_eq_bot_iff_eq_bot {s₁ s₂ : AffineSubspace k P} :
    s₁ ∥ s₂ ↔ s₁.direction = s₂.direction ∧ (s₁ = ⊥ ↔ s₂ = ⊥) 
goal: s₁ ∥ s₂ ↔ s₁.direction = s₂.direction ∧ (s₁ = ⊥ ↔ s₂ = ⊥)

full_name: AffineSubspace.Parallel.vectorSpan_eq
code: theorem Parallel.vectorSpan_eq {s₁ s₂ : Set P} (h : affineSpan k s₁ ∥ affineSpan k s₂) :
    vectorSpan k s₁ = vectorSpan k s₂ 
goal: vectorSpan k s₁ = vectorSpan k s₂

full_name: AffineSubspace.affineSpan_parallel_iff_vectorSpan_eq_and_eq_empty_iff_eq_empty
code: theorem affineSpan_parallel_iff_vectorSpan_eq_and_eq_empty_iff_eq_empty {s₁ s₂ : Set P} :
    affineSpan k s₁ ∥ affineSpan k s₂ ↔ vectorSpan k s₁ = vectorSpan k s₂ ∧ (s₁ = ∅ ↔ s₂ = ∅) 
goal: affineSpan k s₁ ∥ affineSpan k s₂ ↔ vectorSpan k s₁ = vectorSpan k s₂ ∧ (s₁ = ∅ ↔ s₂ = ∅)

full_name: AffineSubspace.affineSpan_pair_parallel_iff_vectorSpan_eq
code: theorem affineSpan_pair_parallel_iff_vectorSpan_eq {p₁ p₂ p₃ p₄ : P} :
    line[k, p₁, p₂] ∥ line[k, p₃, p₄] ↔
      vectorSpan k ({p₁, p₂} : Set P) = vectorSpan k ({p₃, p₄} : Set P) 
goal: affineSpan k {p₁, p₂} ∥ affineSpan k {p₃, p₄} ↔ vectorSpan k {p₁, p₂} = vectorSpan k {p₃, p₄}