# mathlibdocumentation

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 #

• affine_subspace k P is the type of affine subspaces. Unlike affine spaces, affine subspaces are allowed to be empty, and lemmas that do not apply to empty affine subspaces have nonempty hypotheses. There is a complete_lattice structure on affine subspaces.
• affine_subspace.direction gives the submodule spanned by the pairwise differences of points in an affine_subspace. There are various lemmas relating to the set of vectors in the direction, and relating the lattice structure on affine subspaces to that on their directions.
• affine_span gives the affine subspace spanned by a set of points, with vector_span giving its direction. affine_span is defined in terms of span_points, which gives an explicit description of the points contained in the affine span; span_points itself should generally only be used when that description is required, with affine_span being the main definition for other purposes. Two other descriptions of the affine span are proved equivalent: it is the Inf of affine subspaces containing the points, and (if [nontrivial k]) it contains exactly those points that are affine combinations of points in the given set.

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

## References #

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

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

Equations
Instances for ↥vector_span
theorem vector_span_def (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] (s : set P) :
s = (s -ᵥ s)

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] [ V] [ P] {s₁ s₂ : set P} (h : s₁ s₂) :
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] [ 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] [ V] [ P] (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] [ V] [ P] (s : set P) :
s -ᵥ s s)

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] [ V] [ P] {s : set P} {p1 p2 : P} (hp1 : p1 s) (hp2 : p2 s) :
p1 -ᵥ p2 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] [ 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
• s = {p : P | ∃ (p1 : P) (H : p1 s) (v : V) (H : v s), p = v +ᵥ p1}
theorem mem_span_points (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] (p : P) (s : set P) :
p sp 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] [ V] [ P] (s : set P) :
s s

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] [ 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] [ V] [ P] {s : set P} {p : P} {v : V} (hp : p s) (hv : v s) :
v +ᵥ p 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] [ V] [ P] {s : set P} {p1 p2 : P} (hp1 : p1 s) (hp2 : p2 s) :
p1 -ᵥ p2 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] [ 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.

Instances for affine_subspace
def submodule.to_affine_subspace {k : Type u_1} {V : Type u_2} [ring k] [ V] (p : V) :

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

Equations
@[protected, instance]
def affine_subspace.set.has_coe (k : Type u_1) {V : Type u_2} (P : Type u_3) [ring k] [ V] [ P] :
has_coe P) (set P)
Equations
@[protected, instance]
def affine_subspace.has_mem (k : Type u_1) {V : Type u_2} (P : Type u_3) [ring k] [ V] [ P] :
P)
Equations
@[simp]
theorem affine_subspace.mem_coe (k : Type u_1) {V : Type u_2} (P : Type u_3) [ring k] [ V] [ P] (p : P) (s : 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] [ V] [ P] (s : P) :
V

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
Instances for ↥affine_subspace.direction
theorem affine_subspace.direction_eq_vector_span {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] (s : 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] [ V] [ P] {s : P} (h : s.nonempty) :
V

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] [ V] [ P] {s : 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] [ V] [ P] {s : 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] [ V] [ P] {s : 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] [ V] [ P] {s : 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] [ V] [ P] {s : 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] [ V] [ P] {s : 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] [ V] [ P] {s : 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] [ V] [ P] {s : 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] [ V] [ P] {s : 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] [ V] [ P] {s : 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] [ V] [ P] {s : 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] [ V] [ P] {s : 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.coe_injective {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] :

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

@[simp]
theorem affine_subspace.ext_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] (s₁ s₂ : P) :
s₁ = s₂ s₁ = s₂
theorem affine_subspace.ext_of_direction_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] {s1 s2 : P} (hd : s1.direction = s2.direction) (hn : (s1 s2).nonempty) :
s1 = s2

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

@[protected, instance]
def affine_subspace.to_add_torsor {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] (s : P) [nonempty s] :
s
Equations
@[simp, norm_cast]
theorem affine_subspace.coe_vsub {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] (s : P) [nonempty s] (a b : s) :
(a -ᵥ b) = a -ᵥ b
@[simp, norm_cast]
theorem affine_subspace.coe_vadd {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] (s : P) [nonempty s] (a : (s.direction)) (b : s) :
(a +ᵥ b) = a +ᵥ b
theorem affine_subspace.eq_iff_direction_eq_of_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] {s₁ s₂ : 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] [ V] [ P] (p : P) (direction : 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] [ V] [ P] (p : P) (direction : V) :
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] [ V] [ P] {v : V} (p : P) {direction : V} (hv : v direction) :
v +ᵥ 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] [ V] [ P] (p : P) (direction : V) :
direction).nonempty

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] [ V] [ P] (p : P) (direction : V) :
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] [ V] [ P] {s : 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] [ V] [ P] {s : set P} {s1 : P} (h : s s1) :
s s1

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

theorem affine_map.line_map_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] {Q : P} {p₀ p₁ : P} (c : k) (h₀ : p₀ Q) (h₁ : p₁ Q) :
p₁) c Q
def affine_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [ 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
Instances for ↥affine_span
@[simp]
theorem coe_affine_span (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] (s : set P) :
s) = s

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] [ V] [ P] (s : set P) :
s s)

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] [ V] [ P] (s : set P) :
s).direction = s

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] [ V] [ P] {p : P} {s : set P} (hp : p s) :
p s

A point in a set is in its affine span.

@[protected, instance]
def affine_subspace.complete_lattice {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] :
Equations
@[protected, instance]
def affine_subspace.inhabited {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] :
Equations
theorem affine_subspace.le_def {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] (s1 s2 : 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] [ V] [S : P] (s1 s2 : 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] [ V] [S : P] (s1 s2 : 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] [ V] [S : P] (s1 s2 : 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] [ V] [S : P] {s1 s2 : 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] [ V] [S : P] (s1 s2 : 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] [ V] [S : P] {s₁ s₂ : 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] [ V] [S : P] (s : set P) :
s = has_Inf.Inf {s' : | s s'}

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

@[protected]
def affine_subspace.gi (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [ V] [S : 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] [ V] [S : 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] [ V] [S : P] :

The span of univ is ⊤.

theorem affine_span_le {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] {s : set P} {Q : P} :
s Q s Q
@[simp]
theorem affine_subspace.coe_affine_span_singleton (k : Type u_1) (V : Type u_2) {P : Type u_3} [ring k] [ V] [S : P] (p : P) :
{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] [ V] [S : P] (p1 p2 : P) :
p1 {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] [ V] [S : P] (s t : set P) :
(s t) = s t

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] [ V] [S : P] {ι : Type u_4} (s : ι → set P) :
(⋃ (i : ι), s i) = ⨆ (i : ι), (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] [ V] [S : 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] [ V] [S : 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] [ V] [S : 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] [ V] [S : P] :

⊥, coerced to a set, is the empty set.

theorem affine_subspace.bot_ne_top (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [ V] [S : P] :
@[protected, instance]
def affine_subspace.nontrivial (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [ V] [S : P] :
theorem affine_subspace.nonempty_of_affine_span_eq_top (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [ V] [S : P] {s : set P} (h : s = ) :
theorem affine_subspace.vector_span_eq_top_of_affine_span_eq_top (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [ V] [S : P] {s : set P} (h : s = ) :
s =

If the affine span of a set is ⊤, then the vector span of the same set is the ⊤.

theorem affine_subspace.affine_span_eq_top_iff_vector_span_eq_top_of_nonempty (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [ V] [S : P] {s : set P} (hs : s.nonempty) :
s = s =

For a nonempty set, the affine span is ⊤ iff its vector span is ⊤.

theorem affine_subspace.affine_span_eq_top_iff_vector_span_eq_top_of_nontrivial (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [ V] [S : P] {s : set P} [nontrivial P] :
s = s =

For a non-trivial space, the affine span of a set is ⊤ iff its vector span is ⊤.

theorem affine_subspace.card_pos_of_affine_span_eq_top (k : Type u_1) (V : Type u_2) (P : Type u_3) [ring k] [ V] [S : P] {ι : Type u_4} [fintype ι] {p : ι → P} (h : (set.range p) = ) :
theorem affine_subspace.not_mem_bot (k : Type u_1) (V : Type u_2) {P : Type u_3} [ring k] [ V] [S : 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] [ V] [S : P] :

The direction of ⊥ is the submodule ⊥.

@[simp]
theorem affine_subspace.coe_eq_bot_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] (Q : P) :
@[simp]
theorem affine_subspace.coe_eq_univ_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] (Q : P) :
Q =
theorem affine_subspace.nonempty_iff_ne_bot {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] (Q : P) :
theorem affine_subspace.eq_bot_or_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] (Q : P) :
theorem affine_subspace.subsingleton_of_subsingleton_span_eq_top {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] {s : set P} (h₁ : s.subsingleton) (h₂ : s = ) :
theorem affine_subspace.eq_univ_of_subsingleton_span_eq_top {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] {s : set P} (h₁ : s.subsingleton) (h₂ : s = ) :
@[simp]
theorem affine_subspace.direction_eq_top_iff_of_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [ring k] [ V] [S : P] {s : P} (h : s.nonempty) :
s =

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] [ V] [S : P] (s1 s2 : 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] [ V] [S : P] (p : P) (s1 s2 : 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] [ V] [S : P] (s1 s2 : 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] [ V] [S : P] {s₁ s₂ : 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] [ V] [S : P] {s₁ s₂ : 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] [ V] [S : P] {s1 s2 : 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] [ V] [S : P] {s1 s2 : 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] [ V] [S : P] (s1 s2 : 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] [ V] [S : P] {s1 s2 : 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] [ V] [S : P] {s1 s2 : 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] [ V] [S : P] {s1 s2 : P} (h1 : s1.nonempty) (h2 : s2.nonempty) (hd : 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] [ V] [S : P] (s : P) :
s = s

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] [ V] [ P] {s : set P} {p : P} (hp : p s) :
s = '' 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] [ V] [ P] {s : set P} {p : P} (hp : p s) :
s = ((λ (_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] [ V] [ P] {s : set P} {p : P} (hp : p s) :
s = '' (s \ {p}))

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] [ V] [ P] {s : set P} {p : P} (hp : p s) :
s = ((λ (_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_eq_span_vsub_finset_right_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] {s : finset P} {p : P} (hp : p s) :
s = (finset.image (λ (_x : P), _x -ᵥ p) (s.erase 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] [ V] [ P] {ι : Type u_4} (p : ι → P) {s : set ι} {i : ι} (hi : i s) :
(p '' s) = (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] [ V] [ P] {ι : Type u_4} (p : ι → P) {s : set ι} {i : ι} (hi : i s) :
(p '' s) = ((λ (_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] [ V] [ P] {ι : Type u_4} (p : ι → P) (i0 : ι) :
(set.range p) = (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] [ V] [ P] {ι : Type u_4} (p : ι → P) (i0 : ι) :
(set.range p) = (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] [ V] [ P] {ι : Type u_4} (p : ι → P) (i₀ : ι) :
(set.range p) = (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] [ V] [ P] {ι : Type u_4} (p : ι → P) (i₀ : ι) :
(set.range p) = (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] [ V] [ P] (s : set P) :

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

@[protected, instance]
def affine_span.nonempty (k : Type u_1) {V : Type u_2} {P : Type u_3} [ring k] [ V] [ P] {s : set P} [nonempty s] :

The affine span of a nonempty set is nonempty.

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] [ V] [ P] {s : set V} (p : P) (h : = ) :
({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] [ V] [ P] {s₁ s₂ : set P} (h : s₁ s₂) :
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] [ V] [ P] (p : P) (ps : set P) :
ps)) = ps)

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] [ V] [ P] {p : P} {ps : set P} (h : p ps) :
ps) = 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] [ V] [ P] {s1 s2 : P} {p1 p2 : P} (hp1 : p1 s1) (hp2 : p2 s2) :
(s1 s2).direction = s1.direction s2.direction {p2 -ᵥ p1}

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] [ V] [ P] {s : 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] [ V] [ P] {s : P} {p1 : P} (hp1 : p1 s) (p2 p : P) :
p 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.

@[simp]
theorem affine_map.vector_span_image_eq_submodule_map {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) {s : set P₁} :
s) = (f '' s)
def affine_subspace.map {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) (s : P₁) :
P₂

The image of an affine subspace under an affine map as an affine subspace.

Equations
@[simp]
theorem affine_subspace.coe_map {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) (s : P₁) :
s) = f '' s
@[simp]
theorem affine_subspace.mem_map {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] {f : P₁ →ᵃ[k] P₂} {x : P₂} {s : P₁} :
x ∃ (y : P₁) (H : y s), f y = x
@[simp]
theorem affine_subspace.map_bot {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) :
@[simp]
theorem affine_subspace.map_eq_bot_iff {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) {s : P₁} :
s =
@[simp]
theorem affine_subspace.map_id {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [ring k] [add_comm_group V₁] [ V₁] [ P₁] (s : P₁) :
s = s
theorem affine_subspace.map_map {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} {V₃ : Type u_6} {P₃ : Type u_7} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] [add_comm_group V₃] [ V₃] [ P₃] (s : P₁) (f : P₁ →ᵃ[k] P₂) (g : P₂ →ᵃ[k] P₃) :
@[simp]
theorem affine_subspace.map_direction {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) (s : P₁) :
theorem affine_subspace.map_span {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) (s : set P₁) :
s) = (f '' s)
@[simp]
theorem affine_map.map_top_of_surjective {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) (hf : function.surjective f) :
theorem affine_map.span_eq_top_of_surjective {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) {s : set P₁} (hf : function.surjective f) (h : s = ) :
(f '' s) =
theorem affine_equiv.span_eq_top_iff {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] {s : set P₁} (e : P₁ ≃ᵃ[k] P₂) :
s = (e '' s) =
def affine_subspace.comap {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) (s : P₂) :
P₁

The preimage of an affine subspace under an affine map as an affine subspace.

Equations
@[simp]
theorem affine_subspace.coe_comap {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) (s : P₂) :
@[simp]
theorem affine_subspace.mem_comap {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] {f : P₁ →ᵃ[k] P₂} {x : P₁} {s : P₂} :
f x s
theorem affine_subspace.comap_mono {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] {f : P₁ →ᵃ[k] P₂} {s t : P₂} :
s t
@[simp]
theorem affine_subspace.comap_top {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] {f : P₁ →ᵃ[k] P₂} :
@[simp]
theorem affine_subspace.comap_id {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [ring k] [add_comm_group V₁] [ V₁] [ P₁] (s : P₁) :
s = s
theorem affine_subspace.comap_comap {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} {V₃ : Type u_6} {P₃ : Type u_7} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] [add_comm_group V₃] [ V₃] [ P₃] (s : P₃) (f : P₁ →ᵃ[k] P₂) (g : P₂ →ᵃ[k] P₃) :
= s
theorem affine_subspace.map_le_iff_le_comap {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] {f : P₁ →ᵃ[k] P₂} {s : P₁} {t : P₂} :
t
theorem affine_subspace.gc_map_comap {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) :
theorem affine_subspace.map_comap_le {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) (s : P₂) :
theorem affine_subspace.le_comap_map {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (f : P₁ →ᵃ[k] P₂) (s : P₁) :
theorem affine_subspace.map_sup {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (s t : P₁) (f : P₁ →ᵃ[k] P₂) :
(s t) =
theorem affine_subspace.map_supr {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] {ι : Sort u_6} (f : P₁ →ᵃ[k] P₂) (s : ι → P₁) :
(supr s) = ⨆ (i : ι), (s i)
theorem affine_subspace.comap_inf {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] (s t : P₂) (f : P₁ →ᵃ[k] P₂) :
(s t) =
theorem affine_subspace.comap_supr {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [ring k] [add_comm_group V₁] [ V₁] [ P₁] [add_comm_group V₂] [ V₂] [ P₂] {ι : Sort u_6} (f : P₁ →ᵃ[k] P₂) (s : ι → P₂) :
= ⨅ (i : ι), (s i)