mathlib documentation

linear_algebra.affine_space.affine_subspace

Affine spaces

This file defines affine subspaces (over modules) and the affine span of a set of points.

Main definitions

Implementation notes

out_param is used in the definiton of add_torsor V P to make V an implicit argument (deduced from P) in most cases; include V is needed in many cases for V, and type classes using it, to be added as implicit arguments to individual lemmas. As for modules, k is an explicit argument rather than implied by P or V.

This file only provides purely algebraic definitions and results. Those depending on analysis or topology are defined elsewhere; see analysis.normed_space.add_torsor and topology.algebra.affine.

TODO

References

def vector_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :

The submodule spanning the differences of a (possibly empty) set of points.

Equations
theorem vector_span_def (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :

The definition of vector_span, for rewriting.

theorem vector_span_mono (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s₁ s₂ : set P} (h : s₁ s₂) :

vector_span is monotone.

@[simp]
theorem vector_span_empty (k : Type u_1) {V : Type u_2} (P : Type u_3) [ring k] [add_comm_group V] [module k V] [affine_space V P] :

The vector_span of the empty set is .

@[simp]
theorem vector_span_singleton (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (p : P) :

The vector_span of a single point is .

theorem vsub_set_subset_vector_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :

The s -ᵥ s lies within the vector_span k s.

theorem vsub_mem_vector_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : set P} {p1 p2 : P} (hp1 : p1 s) (hp2 : p2 s) :
p1 -ᵥ p2 vector_span k s

Each pairwise difference is in the vector_span.

def span_points (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :
set P

The points in the affine span of a (possibly empty) set of points. Use affine_span instead to get an affine_subspace k P.

Equations
theorem mem_span_points (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (p : P) (s : set P) :
p sp span_points k s

A point in a set is in its affine span.

theorem subset_span_points (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :

A set is contained in its span_points.

@[simp]
theorem span_points_nonempty (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :

The span_points of a set is nonempty if and only if that set is.

theorem vadd_mem_span_points_of_mem_span_points_of_mem_vector_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : set P} {p : P} {v : V} (hp : p span_points k s) (hv : v vector_span k s) :

Adding a point in the affine span and a vector in the spanning submodule produces a point in the affine span.

theorem vsub_mem_vector_span_of_mem_span_points_of_mem_span_points (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : set P} {p1 p2 : P} (hp1 : p1 span_points k s) (hp2 : p2 span_points k s) :
p1 -ᵥ p2 vector_span k s

Subtracting two points in the affine span produces a vector in the spanning submodule.

structure affine_subspace (k : Type u_1) {V : Type u_2} (P : Type u_3) [ring k] [add_comm_group V] [module k V] [affine_space V P] :
Type u_3

An affine_subspace k P is a subset of an affine_space V P that, if not empty, has an affine space structure induced by a corresponding subspace of the module k V.

def submodule.to_affine_subspace {k : Type u_1} {V : Type u_2} [ring k] [add_comm_group V] [module k V] (p : submodule k V) :

Reinterpret p : submodule k V as an affine_subspace k V.

Equations
@[instance]
def affine_subspace.set.has_coe (k : Type u_1) {V : Type u_2} (P : Type u_3) [ring k] [add_comm_group V] [module k V] [affine_space V P] :

Equations
@[instance]
def affine_subspace.has_mem (k : Type u_1) {V : Type u_2} (P : Type u_3) [ring k] [add_comm_group V] [module k V] [affine_space V P] :

Equations
@[simp]
theorem affine_subspace.mem_coe (k : Type u_1) {V : Type u_2} (P : Type u_3) [ring k] [add_comm_group V] [module k V] [affine_space V P] (p : P) (s : affine_subspace k P) :
p s p s

A point is in an affine subspace coerced to a set if and only if it is in that affine subspace.

def affine_subspace.direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : affine_subspace k P) :

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.)

Equations
theorem affine_subspace.direction_eq_vector_span {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : affine_subspace k P) :

The direction equals the vector_span.

def affine_subspace.direction_of_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} (h : s.nonempty) :

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.

Equations
theorem affine_subspace.direction_of_nonempty_eq_direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} (h : s.nonempty) :

direction_of_nonempty gives the same submodule as direction.

theorem affine_subspace.coe_direction_eq_vsub_set {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} (h : s.nonempty) :

The set of vectors in the direction of a nonempty affine subspace is given by vsub_set.

theorem affine_subspace.mem_direction_iff_eq_vsub {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} (h : s.nonempty) (v : V) :
v s.direction ∃ (p1 : P) (H : p1 s) (p2 : P) (H : p2 s), v = p1 -ᵥ p2

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 affine_subspace.vadd_mem_of_mem_direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {v : V} (hv : v s.direction) {p : P} (hp : p s) :
v +ᵥ p s

Adding a vector in the direction to a point in the subspace produces a point in the subspace.

theorem affine_subspace.vsub_mem_direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {p1 p2 : P} (hp1 : p1 s) (hp2 : p2 s) :

Subtracting two points in the subspace produces a vector in the direction.

theorem affine_subspace.vadd_mem_iff_mem_direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} (v : V) {p : P} (hp : p s) :

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 affine_subspace.coe_direction_eq_vsub_set_right {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {p : P} (hp : p s) :
(s.direction) = (λ (_x : P), _x -ᵥ p) '' s

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 affine_subspace.coe_direction_eq_vsub_set_left {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {p : P} (hp : p s) :

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 affine_subspace.mem_direction_iff_eq_vsub_right {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {p : P} (hp : p s) (v : V) :
v s.direction ∃ (p2 : P) (H : p2 s), v = p2 -ᵥ p

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 affine_subspace.mem_direction_iff_eq_vsub_left {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {p : P} (hp : p s) (v : V) :
v s.direction ∃ (p2 : P) (H : p2 s), v = p -ᵥ p2

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 affine_subspace.vsub_right_mem_direction_iff_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {p : P} (hp : p s) (p2 : P) :
p2 -ᵥ p s.direction p2 s

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 affine_subspace.vsub_left_mem_direction_iff_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {p : P} (hp : p s) (p2 : P) :
p -ᵥ p2 s.direction p2 s

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.

@[ext]
theorem affine_subspace.ext {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s1 s2 : affine_subspace k P} (h : s1 = s2) :
s1 = s2

Two affine subspaces are equal if they have the same points.

theorem affine_subspace.ext_of_direction_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s1 s2 : affine_subspace k P} (hd : s1.direction = s2.direction) (hn : (s1 s2).nonempty) :
s1 = s2

Two affine subspaces with the same direction and nonempty intersection are equal.

theorem affine_subspace.eq_iff_direction_eq_of_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s₁ s₂ : affine_subspace k P} {p : P} (h₁ : p s₁) (h₂ : p s₂) :
s₁ = s₂ s₁.direction = s₂.direction

Two affine subspaces with nonempty intersection are equal if and only if their directions are equal.

def affine_subspace.mk' {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (p : P) (direction : submodule k V) :

Construct an affine subspace from a point and a direction.

Equations
theorem affine_subspace.self_mem_mk' {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (p : P) (direction : submodule k V) :
p affine_subspace.mk' p direction

An affine subspace constructed from a point and a direction contains that point.

theorem affine_subspace.vadd_mem_mk' {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {v : V} (p : P) {direction : submodule k V} (hv : v direction) :
v +ᵥ p affine_subspace.mk' p direction

An affine subspace constructed from a point and a direction contains the result of adding a vector in that direction to that point.

theorem affine_subspace.mk'_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (p : P) (direction : submodule k V) :

An affine subspace constructed from a point and a direction is nonempty.

@[simp]
theorem affine_subspace.direction_mk' {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (p : P) (direction : submodule k V) :
(affine_subspace.mk' p direction).direction = direction

The direction of an affine subspace constructed from a point and a direction.

@[simp]
theorem affine_subspace.mk'_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {p : P} (hp : p s) :

Constructing an affine subspace from a point in a subspace and that subspace's direction yields the original subspace.

theorem affine_subspace.span_points_subset_coe_of_subset_coe {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : set P} {s1 : affine_subspace k P} (h : s s1) :

If an affine subspace contains a set of points, it contains the span_points of that set.

def affine_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :

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.)

Equations
@[simp]
theorem coe_affine_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :

The affine span, converted to a set, is span_points.

theorem subset_affine_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :

A set is contained in its affine span.

theorem direction_affine_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :

The direction of the affine span is the vector_span.

theorem mem_affine_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {p : P} {s : set P} (hp : p s) :

A point in a set is in its affine span.

@[instance]
def affine_subspace.complete_lattice {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] :

Equations
@[instance]
def affine_subspace.inhabited {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] :

Equations
theorem affine_subspace.le_def {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s1 s2 : affine_subspace k P) :
s1 s2 s1 s2

The order on subspaces is the same as that on the corresponding sets.

theorem affine_subspace.le_def' {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s1 s2 : affine_subspace k P) :
s1 s2 ∀ (p : P), p s1p s2

One subspace is less than or equal to another if and only if all its points are in the second subspace.

theorem affine_subspace.lt_def {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s1 s2 : affine_subspace k P) :
s1 < s2 s1 s2

The < order on subspaces is the same as that on the corresponding sets.

theorem affine_subspace.not_le_iff_exists {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s1 s2 : affine_subspace k P) :
¬s1 s2 ∃ (p : P) (H : p s1), p s2

One subspace is not less than or equal to another if and only if it has a point not in the second subspace.

theorem affine_subspace.exists_of_lt {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {s1 s2 : affine_subspace k P} (h : s1 < s2) :
∃ (p : P) (H : p s2), p s1

If a subspace is less than another, there is a point only in the second.

theorem affine_subspace.lt_iff_le_and_exists {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s1 s2 : affine_subspace k P) :
s1 < s2 s1 s2 ∃ (p : P) (H : p s2), p s1

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 affine_subspace.eq_of_direction_eq_of_nonempty_of_le {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {s₁ s₂ : affine_subspace k P} (hd : s₁.direction = s₂.direction) (hn : s₁.nonempty) (hle : s₁ s₂) :
s₁ = s₂

If an affine subspace is nonempty and contained in another with the same direction, they are equal.

theorem affine_subspace.affine_span_eq_Inf (k : Type u_1) (V : Type u_2) {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s : set P) :
affine_span k s = Inf {s' : affine_subspace k P | s s'}

The affine span is the Inf of subspaces containing the given points.

def affine_subspace.gi (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [add_comm_group V] [module k V] [S : affine_space V P] :

The Galois insertion formed by affine_span and coercion back to a set.

Equations
@[simp]
theorem affine_subspace.span_empty (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [add_comm_group V] [module k V] [S : affine_space V P] :

The span of the empty set is .

@[simp]
theorem affine_subspace.span_univ (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [add_comm_group V] [module k V] [S : affine_space V P] :

The span of univ is .

@[simp]
theorem affine_subspace.coe_affine_span_singleton (k : Type u_1) (V : Type u_2) {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (p : P) :
(affine_span k {p}) = {p}

The affine span of a single point, coerced to a set, contains just that point.

@[simp]
theorem affine_subspace.mem_affine_span_singleton (k : Type u_1) (V : Type u_2) {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (p1 p2 : P) :
p1 affine_span k {p2} p1 = p2

A point is in the affine span of a single point if and only if they are equal.

theorem affine_subspace.span_union (k : Type u_1) (V : Type u_2) {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s t : set P) :

The span of a union of sets is the sup of their spans.

theorem affine_subspace.span_Union (k : Type u_1) (V : Type u_2) {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {ι : Type u_4} (s : ι → set P) :
affine_span k (⋃ (i : ι), s i) = ⨆ (i : ι), affine_span k (s i)

The span of a union of an indexed family of sets is the sup of their spans.

@[simp]
theorem affine_subspace.top_coe (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [add_comm_group V] [module k V] [S : affine_space V P] :

, coerced to a set, is the whole set of points.

theorem affine_subspace.mem_top (k : Type u_1) (V : Type u_2) {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (p : P) :

All points are in .

@[simp]
theorem affine_subspace.direction_top (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [add_comm_group V] [module k V] [S : affine_space V P] :

The direction of is the whole module as a submodule.

@[simp]
theorem affine_subspace.bot_coe (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [add_comm_group V] [module k V] [S : affine_space V P] :

, coerced to a set, is the empty set.

theorem affine_subspace.not_mem_bot (k : Type u_1) (V : Type u_2) {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (p : P) :

No points are in .

@[simp]
theorem affine_subspace.direction_bot (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [add_comm_group V] [module k V] [S : affine_space V P] :

The direction of is the submodule .

@[simp]
theorem affine_subspace.direction_eq_top_iff_of_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {s : affine_subspace k P} (h : s.nonempty) :

A nonempty affine subspace is if and only if its direction is .

@[simp]
theorem affine_subspace.inf_coe {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s1 s2 : affine_subspace k P) :
s1 s2 = s1 s2

The inf of two affine subspaces, coerced to a set, is the intersection of the two sets of points.

theorem affine_subspace.mem_inf_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (p : P) (s1 s2 : affine_subspace k P) :
p s1 s2 p s1 p s2

A point is in the inf of two affine subspaces if and only if it is in both of them.

theorem affine_subspace.direction_inf {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s1 s2 : affine_subspace k P) :

The direction of the inf of two affine subspaces is less than or equal to the inf of their directions.

theorem affine_subspace.direction_inf_of_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {s₁ s₂ : affine_subspace k P} {p : P} (h₁ : p s₁) (h₂ : p s₂) :
(s₁ s₂).direction = s₁.direction s₂.direction

If two affine subspaces have a point in common, the direction of their inf equals the inf of their directions.

theorem affine_subspace.direction_inf_of_mem_inf {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {s₁ s₂ : affine_subspace k P} {p : P} (h : p s₁ s₂) :
(s₁ s₂).direction = s₁.direction s₂.direction

If two affine subspaces have a point in their inf, the direction of their inf equals the inf of their directions.

theorem affine_subspace.direction_le {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {s1 s2 : affine_subspace k P} (h : s1 s2) :

If one affine subspace is less than or equal to another, the same applies to their directions.

theorem affine_subspace.direction_lt_of_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {s1 s2 : affine_subspace k P} (h : s1 < s2) (hn : s1.nonempty) :

If one nonempty affine subspace is less than another, the same applies to their directions

theorem affine_subspace.sup_direction_le {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s1 s2 : affine_subspace k P) :

The sup of the directions of two affine subspaces is less than or equal to the direction of their sup.

theorem affine_subspace.sup_direction_lt_of_nonempty_of_inter_empty {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {s1 s2 : affine_subspace k P} (h1 : s1.nonempty) (h2 : s2.nonempty) (he : s1 s2 = ) :

The sup of the directions of two nonempty affine subspaces with empty intersection is less than the direction of their sup.

theorem affine_subspace.inter_nonempty_of_nonempty_of_sup_direction_eq_top {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {s1 s2 : affine_subspace k P} (h1 : s1.nonempty) (h2 : s2.nonempty) (hd : s1.direction s2.direction = ) :

If the directions of two nonempty affine subspaces span the whole module, they have nonempty intersection.

theorem affine_subspace.inter_eq_singleton_of_nonempty_of_is_compl {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] {s1 s2 : affine_subspace k P} (h1 : s1.nonempty) (h2 : s2.nonempty) (hd : is_compl s1.direction s2.direction) :
∃ (p : P), s1 s2 = {p}

If the directions of two nonempty affine subspaces are complements of each other, they intersect in exactly one point.

@[simp]
theorem affine_subspace.affine_span_coe {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [S : affine_space V P] (s : affine_subspace k P) :

Coercing a subspace to a set then taking the affine span produces the original subspace.

theorem vector_span_eq_span_vsub_set_left (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : set P} {p : P} (hp : p s) :

The vector_span is the span of the pairwise subtractions with a given point on the left.

theorem vector_span_eq_span_vsub_set_right (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : set P} {p : P} (hp : p s) :
vector_span k s = submodule.span k ((λ (_x : P), _x -ᵥ p) '' s)

The vector_span is the span of the pairwise subtractions with a given point on the right.

theorem vector_span_eq_span_vsub_set_left_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : set P} {p : P} (hp : p s) :

The vector_span is the span of the pairwise subtractions with a given point on the left, excluding the subtraction of that point from itself.

theorem vector_span_eq_span_vsub_set_right_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : set P} {p : P} (hp : p s) :
vector_span k s = submodule.span k ((λ (_x : P), _x -ᵥ p) '' (s \ {p}))

The vector_span is the span of the pairwise subtractions with a given point on the right, excluding the subtraction of that point from itself.

theorem vector_span_image_eq_span_vsub_set_left_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {ι : Type u_4} (p : ι → P) {s : set ι} {i : ι} (hi : i s) :
vector_span k (p '' s) = submodule.span k (has_vsub.vsub (p i) '' (p '' (s \ {i})))

The vector_span 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 vector_span_image_eq_span_vsub_set_right_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {ι : Type u_4} (p : ι → P) {s : set ι} {i : ι} (hi : i s) :
vector_span k (p '' s) = submodule.span k ((λ (_x : P), _x -ᵥ p i) '' (p '' (s \ {i})))

The vector_span 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 vector_span_range_eq_span_range_vsub_left (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {ι : Type u_4} (p : ι → P) (i0 : ι) :
vector_span k (set.range p) = submodule.span k (set.range (λ (i : ι), p i0 -ᵥ p i))

The vector_span of an indexed family is the span of the pairwise subtractions with a given point on the left.

theorem vector_span_range_eq_span_range_vsub_right (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {ι : Type u_4} (p : ι → P) (i0 : ι) :
vector_span k (set.range p) = submodule.span k (set.range (λ (i : ι), p i -ᵥ p i0))

The vector_span of an indexed family is the span of the pairwise subtractions with a given point on the right.

theorem vector_span_range_eq_span_range_vsub_left_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {ι : Type u_4} (p : ι → P) (i₀ : ι) :
vector_span k (set.range p) = submodule.span k (set.range (λ (i : {x // x i₀}), p i₀ -ᵥ p i))

The vector_span 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 vector_span_range_eq_span_range_vsub_right_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {ι : Type u_4} (p : ι → P) (i₀ : ι) :
vector_span k (set.range p) = submodule.span k (set.range (λ (i : {x // x i₀}), p i -ᵥ p i₀))

The vector_span 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 affine_span_nonempty (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (s : set P) :

The affine span of a set is nonempty if and only if that set is.

theorem affine_span_singleton_union_vadd_eq_top_of_span_eq_top {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : set V} (p : P) (h : submodule.span k (set.range coe) = ) :
affine_span k ({p} (λ (v : V), v +ᵥ p) '' s) =

Suppose a set of vectors spans V. Then a point p, together with those vectors added to p, spans P.

theorem affine_span_mono (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s₁ s₂ : set P} (h : s₁ s₂) :

affine_span is monotone.

theorem affine_span_insert_affine_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] (p : P) (ps : set P) :

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 affine_span_insert_eq_affine_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {p : P} {ps : set P} (h : p affine_span k ps) :

If a point is in the affine span of a set, adding it to that set does not change the affine span.

theorem affine_subspace.direction_sup {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s1 s2 : affine_subspace k P} {p1 p2 : P} (hp1 : p1 s1) (hp2 : p2 s2) :

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 affine_subspace.direction_affine_span_insert {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {p1 p2 : P} (hp1 : p1 s) :

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 affine_subspace.mem_affine_span_insert_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [add_comm_group V] [module k V] [affine_space V P] {s : affine_subspace k P} {p1 : P} (hp1 : p1 s) (p2 p : P) :
p affine_span k (insert p2 s) ∃ (r : k) (p0 : P) (hp0 : p0 s), p = r (p2 -ᵥ p1) +ᵥ p0

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.