# Affine spaces #

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

## Main definitions #

• AffineSubspace 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 CompleteLattice structure on affine subspaces.
• AffineSubspace.direction gives the Submodule spanned by the pairwise differences of points in an AffineSubspace. 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.
• AffineSubspace.parallel, notation ∥, gives the property of two affine subspaces being parallel (one being a translate of the other).
• affineSpan gives the affine subspace spanned by a set of points, with vectorSpan giving its direction. The affineSpan is defined in terms of spanPoints, which gives an explicit description of the points contained in the affine span; spanPoints itself should generally only be used when that description is required, with affineSpan being the main definition for other purposes. Two other descriptions of the affine span are proved equivalent: it is the sInf 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 #

outParam is used in the definition of AddTorsor V P to make V an implicit argument (deduced from P) in most cases. 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.NormedSpace.AddTorsor and Topology.Algebra.Affine.

## References #

• https://en.wikipedia.org/wiki/Affine_space
• https://en.wikipedia.org/wiki/Principal_homogeneous_space
def vectorSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : Set P) :

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

Equations
Instances For
theorem vectorSpan_def (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : Set P) :

The definition of vectorSpan, for rewriting.

theorem vectorSpan_mono (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s₁ : Set P} {s₂ : Set P} (h : s₁ s₂) :
vectorSpan k s₁ vectorSpan k s₂

vectorSpan is monotone.

@[simp]
theorem vectorSpan_empty (k : Type u_1) {V : Type u_2} (P : Type u_3) [Ring k] [] [Module k V] [] :

The vectorSpan of the empty set is ⊥.

@[simp]
theorem vectorSpan_singleton (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p : P) :

The vectorSpan of a single point is ⊥.

theorem vsub_set_subset_vectorSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : Set P) :
s -ᵥ s ()

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

theorem vsub_mem_vectorSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} {p1 : P} {p2 : P} (hp1 : p1 s) (hp2 : p2 s) :
p1 -ᵥ p2

Each pairwise difference is in the vectorSpan.

def spanPoints (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : Set P) :
Set P

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

Equations
• = {p : P | ∃ p1 ∈ s, ∃ v ∈ , p = v +ᵥ p1}
Instances For
theorem mem_spanPoints (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p : P) (s : Set P) :
p sp

A point in a set is in its affine span.

theorem subset_spanPoints (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : Set P) :
s

A set is contained in its spanPoints.

@[simp]
theorem spanPoints_nonempty (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : Set P) :

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

theorem vadd_mem_spanPoints_of_mem_spanPoints_of_mem_vectorSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} {p : P} {v : V} (hp : p ) (hv : v ) :
v +ᵥ p

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

theorem vsub_mem_vectorSpan_of_mem_spanPoints_of_mem_spanPoints (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} {p1 : P} {p2 : P} (hp1 : p1 ) (hp2 : p2 ) :
p1 -ᵥ p2

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

structure AffineSubspace (k : Type u_1) {V : Type u_2} (P : Type u_3) [Ring k] [] [Module k V] [] :
Type u_3

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.

• carrier : Set P

The affine subspace seen as a subset.

• smul_vsub_vadd_mem : ∀ (c : k) {p1 p2 p3 : P}, p1 self.carrierp2 self.carrierp3 self.carrierc (p1 -ᵥ p2) +ᵥ p3 self.carrier
Instances For
def Submodule.toAffineSubspace {k : Type u_1} {V : Type u_2} [Ring k] [] [Module k V] (p : ) :

Reinterpret p : Submodule k V as an AffineSubspace k V.

Equations
• = { carrier := p, smul_vsub_vadd_mem := }
Instances For
instance AffineSubspace.instSetLikeAffineSubspace (k : Type u_1) {V : Type u_2} (P : Type u_3) [Ring k] [] [Module k V] [] :
SetLike () P
Equations
• = { coe := AffineSubspace.carrier, coe_injective' := }
theorem AffineSubspace.mem_coe (k : Type u_1) {V : Type u_2} (P : Type u_3) [Ring k] [] [Module k V] [] (p : P) (s : ) :
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 AffineSubspace.direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) :

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
theorem AffineSubspace.direction_eq_vectorSpan {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) :

The direction equals the vectorSpan.

def AffineSubspace.directionOfNonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } (h : ) :

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
• = { toAddSubmonoid := { toAddSubsemigroup := { carrier := s -ᵥ s, add_mem' := }, zero_mem' := }, smul_mem' := }
Instances For
theorem AffineSubspace.directionOfNonempty_eq_direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } (h : ) :

direction_of_nonempty gives the same submodule as direction.

theorem AffineSubspace.coe_direction_eq_vsub_set {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } (h : ) :
= s -ᵥ s

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

theorem AffineSubspace.mem_direction_iff_eq_vsub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } (h : ) (v : V) :
∃ p1 ∈ s, ∃ 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 AffineSubspace.vadd_mem_of_mem_direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {v : V} (hv : ) {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 AffineSubspace.vsub_mem_direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {p1 : P} {p2 : P} (hp1 : p1 s) (hp2 : p2 s) :
p1 -ᵥ p2

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

theorem AffineSubspace.vadd_mem_iff_mem_direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } (v : V) {p : P} (hp : p s) :
v +ᵥ 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 AffineSubspace.vadd_mem_iff_mem_of_mem_direction {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {v : V} (hv : ) {p : P} :
v +ᵥ p s p s

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 AffineSubspace.coe_direction_eq_vsub_set_right {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {p : P} (hp : p s) :
= (fun (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 AffineSubspace.coe_direction_eq_vsub_set_left {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {p : P} (hp : p s) :
= (fun (x : P) => p -ᵥ x) '' 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 AffineSubspace.mem_direction_iff_eq_vsub_right {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {p : P} (hp : p s) (v : V) :
∃ 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 AffineSubspace.mem_direction_iff_eq_vsub_left {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {p : P} (hp : p s) (v : V) :
∃ 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 AffineSubspace.vsub_right_mem_direction_iff_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {p : P} (hp : p s) (p2 : P) :
p2 -ᵥ p 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 AffineSubspace.vsub_left_mem_direction_iff_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {p : P} (hp : p s) (p2 : P) :
p -ᵥ p2 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.

theorem AffineSubspace.coe_injective {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] :
Function.Injective SetLike.coe

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

theorem AffineSubspace.ext {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p : } {q : } (h : ∀ (x : P), x p x q) :
p = q
theorem AffineSubspace.ext_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s₁ : ) (s₂ : ) :
s₁ = s₂ s₁ = s₂
theorem AffineSubspace.ext_of_direction_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s1 : } {s2 : } (hd : ) (hn : Set.Nonempty (s1 s2)) :
s1 = s2

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

@[reducible]
def AffineSubspace.toAddTorsor {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) [Nonempty s] :

This is not an instance because it loops with AddTorsor.nonempty.

Equations
Instances For
@[simp]
theorem AffineSubspace.coe_vsub {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) [Nonempty s] (a : s) (b : s) :
(a -ᵥ b) = a -ᵥ b
@[simp]
theorem AffineSubspace.coe_vadd {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) [Nonempty s] (a : ) (b : s) :
(a +ᵥ b) = a +ᵥ b
def AffineSubspace.subtype {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) [Nonempty s] :
s →ᵃ[k] P

Embedding of an affine subspace to the ambient space, as an affine map.

Equations
• = { toFun := Subtype.val, linear := , map_vadd' := }
Instances For
@[simp]
theorem AffineSubspace.subtype_linear {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) [Nonempty s] :
.linear =
theorem AffineSubspace.subtype_apply {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) [Nonempty s] (p : s) :
= p
@[simp]
theorem AffineSubspace.coeSubtype {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) [Nonempty s] :
= Subtype.val
theorem AffineSubspace.injective_subtype {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) [Nonempty s] :
theorem AffineSubspace.eq_iff_direction_eq_of_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s₁ : } {s₂ : } {p : P} (h₁ : p s₁) (h₂ : p s₂) :
s₁ = s₂

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

def AffineSubspace.mk' {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p : P) (direction : ) :

Construct an affine subspace from a point and a direction.

Equations
Instances For
theorem AffineSubspace.self_mem_mk' {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p : P) (direction : ) :
p AffineSubspace.mk' p direction

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

theorem AffineSubspace.vadd_mem_mk' {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {v : V} (p : P) {direction : } (hv : v direction) :
v +ᵥ p AffineSubspace.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 AffineSubspace.mk'_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p : P) (direction : ) :

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

@[simp]
theorem AffineSubspace.direction_mk' {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p : P) (direction : ) :

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

theorem AffineSubspace.mem_mk'_iff_vsub_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p₁ : P} {p₂ : P} {direction : } :
p₂ AffineSubspace.mk' p₁ direction p₂ -ᵥ p₁ direction

A point lies in an affine subspace constructed from another point and a direction if and only if their difference is in that direction.

@[simp]
theorem AffineSubspace.mk'_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {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 AffineSubspace.spanPoints_subset_coe_of_subset_coe {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} {s1 : } (h : s s1) :
s1

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

@[simp]
theorem Submodule.mem_toAffineSubspace {k : Type u_1} {V : Type u_2} [Ring k] [] [Module k V] {p : } {x : V} :
x p
@[simp]
theorem Submodule.toAffineSubspace_direction {k : Type u_1} {V : Type u_2} [Ring k] [] [Module k V] (s : ) :
theorem AffineMap.lineMap_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {Q : } {p₀ : P} {p₁ : P} (c : k) (h₀ : p₀ Q) (h₁ : p₁ Q) :
() c Q
def affineSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (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
• = { carrier := , smul_vsub_vadd_mem := }
Instances For
@[simp]
theorem coe_affineSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : Set P) :
() =

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

theorem subset_affineSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : Set P) :
s ()

A set is contained in its affine span.

theorem direction_affineSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : Set P) :

The direction of the affine span is the vectorSpan.

theorem mem_affineSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p : P} {s : Set P} (hp : p s) :
p

A point in a set is in its affine span.

instance AffineSubspace.instCompleteLatticeAffineSubspace {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] :
Equations
instance AffineSubspace.instInhabitedAffineSubspace {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] :
Equations
• AffineSubspace.instInhabitedAffineSubspace = { default := }
theorem AffineSubspace.le_def {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s1 : ) (s2 : ) :
s1 s2 s1 s2

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

theorem AffineSubspace.le_def' {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s1 : ) (s2 : ) :
s1 s2 ps1, p s2

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

theorem AffineSubspace.lt_def {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s1 : ) (s2 : ) :
s1 < s2 s1 s2

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

theorem AffineSubspace.not_le_iff_exists {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s1 : ) (s2 : ) :
¬s1 s2 ∃ p ∈ s1, ps2

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

theorem AffineSubspace.exists_of_lt {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s1 : } {s2 : } (h : s1 < s2) :
∃ p ∈ s2, ps1

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

theorem AffineSubspace.lt_iff_le_and_exists {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s1 : ) (s2 : ) :
s1 < s2 s1 s2 ∃ p ∈ s2, ps1

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 AffineSubspace.eq_of_direction_eq_of_nonempty_of_le {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s₁ : } {s₂ : } (hd : ) (hn : Set.Nonempty s₁) (hle : s₁ s₂) :
s₁ = s₂

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

theorem AffineSubspace.affineSpan_eq_sInf (k : Type u_1) (V : Type u_2) {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s : Set P) :
= sInf {s' : | s s'}

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

def AffineSubspace.gi (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :
GaloisInsertion () SetLike.coe

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

Equations
• = { choice := fun (s : Set P) (x : () s) => , gc := , le_l_u := , choice_eq := }
Instances For
@[simp]
theorem AffineSubspace.span_empty (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :

The span of the empty set is ⊥.

@[simp]
theorem AffineSubspace.span_univ (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :
affineSpan k Set.univ =

The span of univ is ⊤.

theorem affineSpan_le {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s : Set P} {Q : } :
Q s Q
@[simp]
theorem AffineSubspace.coe_affineSpan_singleton (k : Type u_1) (V : Type u_2) {P : Type u_3} [Ring k] [] [Module k V] [S : ] (p : P) :
(affineSpan k {p}) = {p}

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

@[simp]
theorem AffineSubspace.mem_affineSpan_singleton (k : Type u_1) (V : Type u_2) {P : Type u_3} [Ring k] [] [Module k V] [S : ] {p₁ : P} {p₂ : P} :
p₁ affineSpan k {p₂} p₁ = p₂

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

@[simp]
theorem AffineSubspace.preimage_coe_affineSpan_singleton (k : Type u_1) (V : Type u_2) {P : Type u_3} [Ring k] [] [Module k V] [S : ] (x : P) :
Subtype.val ⁻¹' {x} = Set.univ
theorem AffineSubspace.span_union (k : Type u_1) (V : Type u_2) {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s : Set P) (t : Set P) :
affineSpan k (s t) =

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

theorem AffineSubspace.span_iUnion (k : Type u_1) (V : Type u_2) {P : Type u_3} [Ring k] [] [Module k V] [S : ] {ι : Type u_4} (s : ιSet P) :
affineSpan k (⋃ (i : ι), s i) = ⨆ (i : ι), affineSpan k (s i)

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

@[simp]
theorem AffineSubspace.top_coe (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :
= Set.univ

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

@[simp]
theorem AffineSubspace.mem_top (k : Type u_1) (V : Type u_2) {P : Type u_3} [Ring k] [] [Module k V] [S : ] (p : P) :

All points are in ⊤.

@[simp]
theorem AffineSubspace.direction_top (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :

The direction of ⊤ is the whole module as a submodule.

@[simp]
theorem AffineSubspace.bot_coe (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :
=

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

theorem AffineSubspace.bot_ne_top (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :
instance AffineSubspace.instNontrivialAffineSubspace (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :
Equations
• =
theorem AffineSubspace.nonempty_of_affineSpan_eq_top (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] {s : Set P} (h : = ) :
theorem AffineSubspace.vectorSpan_eq_top_of_affineSpan_eq_top (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] {s : Set P} (h : = ) :

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

theorem AffineSubspace.affineSpan_eq_top_iff_vectorSpan_eq_top_of_nonempty (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] {s : Set P} (hs : ) :

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

theorem AffineSubspace.affineSpan_eq_top_iff_vectorSpan_eq_top_of_nontrivial (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] {s : Set P} [] :

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

theorem AffineSubspace.card_pos_of_affineSpan_eq_top (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] {ι : Type u_4} [] {p : ιP} (h : affineSpan k () = ) :
@[simp]
theorem AffineSubspace.topEquiv_apply (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] (self : { x : P // x Set.univ }) :
() self = self
@[simp]
theorem AffineSubspace.topEquiv_symm_apply_coe (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] (a : P) :
(() a) = a
@[simp]
theorem AffineSubspace.linear_topEquiv (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :
().linear = LinearEquiv.trans Submodule.topEquiv
def AffineSubspace.topEquiv (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :

The top affine subspace is linearly equivalent to the affine space.

This is the affine version of Submodule.topEquiv.

Equations
Instances For
theorem AffineSubspace.not_mem_bot (k : Type u_1) (V : Type u_2) {P : Type u_3} [Ring k] [] [Module k V] [S : ] (p : P) :
p

No points are in ⊥.

@[simp]
theorem AffineSubspace.direction_bot (k : Type u_1) (V : Type u_2) (P : Type u_3) [Ring k] [] [Module k V] [S : ] :

The direction of ⊥ is the submodule ⊥.

@[simp]
theorem AffineSubspace.coe_eq_bot_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (Q : ) :
Q = Q =
@[simp]
theorem AffineSubspace.coe_eq_univ_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (Q : ) :
Q = Set.univ Q =
theorem AffineSubspace.nonempty_iff_ne_bot {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (Q : ) :
theorem AffineSubspace.eq_bot_or_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (Q : ) :
Q =
theorem AffineSubspace.subsingleton_of_subsingleton_span_eq_top {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s : Set P} (h₁ : ) (h₂ : = ) :
theorem AffineSubspace.eq_univ_of_subsingleton_span_eq_top {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s : Set P} (h₁ : ) (h₂ : = ) :
s = Set.univ
@[simp]
theorem AffineSubspace.direction_eq_top_iff_of_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s : } (h : ) :

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

@[simp]
theorem AffineSubspace.inf_coe {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s1 : ) (s2 : ) :
s1 s2 = s1 s2

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

theorem AffineSubspace.mem_inf_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (p : P) (s1 : ) (s2 : ) :
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 AffineSubspace.direction_inf {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s1 : ) (s2 : ) :

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

theorem AffineSubspace.direction_inf_of_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s₁ : } {s₂ : } {p : P} (h₁ : p s₁) (h₂ : p s₂) :

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

theorem AffineSubspace.direction_inf_of_mem_inf {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s₁ : } {s₂ : } {p : P} (h : p s₁ s₂) :

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

theorem AffineSubspace.direction_le {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s1 : } {s2 : } (h : s1 s2) :

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

theorem AffineSubspace.direction_lt_of_nonempty {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s1 : } {s2 : } (h : s1 < s2) (hn : Set.Nonempty s1) :

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

theorem AffineSubspace.sup_direction_le {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s1 : ) (s2 : ) :

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

theorem AffineSubspace.sup_direction_lt_of_nonempty_of_inter_empty {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s1 : } {s2 : } (h1 : Set.Nonempty s1) (h2 : Set.Nonempty s2) (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 AffineSubspace.inter_nonempty_of_nonempty_of_sup_direction_eq_top {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s1 : } {s2 : } (h1 : Set.Nonempty s1) (h2 : Set.Nonempty s2) (hd : ) :
Set.Nonempty (s1 s2)

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

theorem AffineSubspace.inter_eq_singleton_of_nonempty_of_isCompl {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] {s1 : } {s2 : } (h1 : Set.Nonempty s1) (h2 : Set.Nonempty s2) (hd : ) :
∃ (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 AffineSubspace.affineSpan_coe {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [S : ] (s : ) :
affineSpan k s = s

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

theorem vectorSpan_eq_span_vsub_set_left (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} {p : P} (hp : p s) :
= Submodule.span k ((fun (x : P) => p -ᵥ x) '' s)

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

theorem vectorSpan_eq_span_vsub_set_right (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} {p : P} (hp : p s) :
= Submodule.span k ((fun (x : P) => x -ᵥ p) '' s)

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

theorem vectorSpan_eq_span_vsub_set_left_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} {p : P} (hp : p s) :
= Submodule.span k ((fun (x : P) => p -ᵥ x) '' (s \ {p}))

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_right_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} {p : P} (hp : p s) :
= Submodule.span k ((fun (x : P) => x -ᵥ p) '' (s \ {p}))

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 (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] [] [] {s : } {p : P} (hp : p s) :
vectorSpan k s = Submodule.span k (Finset.image (fun (x : P) => x -ᵥ p) ())

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_image_eq_span_vsub_set_left_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {ι : Type u_4} (p : ιP) {s : Set ι} {i : ι} (hi : i s) :
vectorSpan k (p '' s) = Submodule.span k ((fun (x : P) => p i -ᵥ x) '' (p '' (s \ {i})))

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_right_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {ι : Type u_4} (p : ιP) {s : Set ι} {i : ι} (hi : i s) :
vectorSpan k (p '' s) = Submodule.span k ((fun (x : P) => x -ᵥ p i) '' (p '' (s \ {i})))

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_range_eq_span_range_vsub_left (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {ι : Type u_4} (p : ιP) (i0 : ι) :
vectorSpan k () = Submodule.span k (Set.range fun (i : ι) => p i0 -ᵥ p i)

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_right (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {ι : Type u_4} (p : ιP) (i0 : ι) :
vectorSpan k () = Submodule.span k (Set.range fun (i : ι) => p i -ᵥ p i0)

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_left_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {ι : Type u_4} (p : ιP) (i₀ : ι) :
vectorSpan k () = Submodule.span k (Set.range fun (i : { x : ι // x i₀ }) => p i₀ -ᵥ p i)

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_right_ne (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {ι : Type u_4} (p : ιP) (i₀ : ι) :
vectorSpan k () = Submodule.span k (Set.range fun (i : { x : ι // x i₀ }) => p i -ᵥ p i₀)

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 affineSpan_nonempty (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} :

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

theorem Set.Nonempty.affineSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} :
Set.Nonempty ()

Alias of the reverse direction of affineSpan_nonempty.

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

instance instNonemptySubtypeMemAffineSubspaceInstMembershipInstSetLikeAffineSubspaceAffineSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} [Nonempty s] :
Nonempty ()

The affine span of a nonempty set is nonempty.

Equations
• =
@[simp]
theorem affineSpan_eq_bot (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} :

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

@[simp]
theorem bot_lt_affineSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} :
theorem affineSpan_induction {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {x : P} {s : Set P} {p : PProp} (h : x ) (mem : xs, p x) (smul_vsub_vadd : ∀ (c : k) (u v w : P), p up vp wp (c (u -ᵥ v) +ᵥ w)) :
p x

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' {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set P} {p : (x : P) → x Prop} (mem : ∀ (y : P) (hys : y s), p y ) (smul_vsub_vadd : ∀ (c : k) (u : P) (hu : u ) (v : P) (hv : v ) (w : P) (hw : w ), p u hup v hvp w hwp (c (u -ᵥ v) +ᵥ w) ) {x : P} (h : x ) :
p x h

A dependent version of affineSpan_induction.

@[simp]
theorem affineSpan_coe_preimage_eq_top {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (A : Set P) [Nonempty A] :
affineSpan k (Subtype.val ⁻¹' A) =

A set, considered as a subset of its spanned affine subspace, spans the whole subspace.

theorem affineSpan_singleton_union_vadd_eq_top_of_span_eq_top {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : Set V} (p : P) (h : Submodule.span k (Set.range Subtype.val) = ) :
affineSpan k ({p} (fun (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 vectorSpan_pair (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p₁ : P) (p₂ : P) :
vectorSpan k {p₁, p₂} = Submodule.span k {p₁ -ᵥ p₂}

The vectorSpan of two points is the span of their difference.

theorem vectorSpan_pair_rev (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p₁ : P) (p₂ : P) :
vectorSpan k {p₁, p₂} = Submodule.span k {p₂ -ᵥ p₁}

The vectorSpan of two points is the span of their difference (reversed).

theorem vsub_mem_vectorSpan_pair (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p₁ : P) (p₂ : P) :
p₁ -ᵥ p₂ vectorSpan k {p₁, p₂}

The difference between two points lies in their vectorSpan.

theorem vsub_rev_mem_vectorSpan_pair (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p₁ : P) (p₂ : P) :
p₂ -ᵥ p₁ vectorSpan k {p₁, p₂}

The difference between two points (reversed) lies in their vectorSpan.

theorem smul_vsub_mem_vectorSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (r : k) (p₁ : P) (p₂ : P) :
r (p₁ -ᵥ p₂) vectorSpan k {p₁, p₂}

A multiple of the difference between two points lies in their vectorSpan.

theorem smul_vsub_rev_mem_vectorSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (r : k) (p₁ : P) (p₂ : P) :
r (p₂ -ᵥ p₁) vectorSpan k {p₁, p₂}

A multiple of the difference between two points (reversed) lies in their vectorSpan.

theorem mem_vectorSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p₁ : P} {p₂ : P} {v : V} :
v vectorSpan k {p₁, p₂} ∃ (r : k), r (p₁ -ᵥ p₂) = v

A vector lies in the vectorSpan of two points if and only if it is a multiple of their difference.

theorem mem_vectorSpan_pair_rev {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p₁ : P} {p₂ : P} {v : V} :
v vectorSpan k {p₁, p₂} ∃ (r : k), r (p₂ -ᵥ p₁) = v

A vector lies in the vectorSpan of two points if and only if it is a multiple of their difference (reversed).

The line between two points, as an affine subspace.

Equations
• One or more equations did not get rendered due to their size.
Instances For
theorem left_mem_affineSpan_pair (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p₁ : P) (p₂ : P) :
p₁ affineSpan k {p₁, p₂}

The first of two points lies in their affine span.

theorem right_mem_affineSpan_pair (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p₁ : P) (p₂ : P) :
p₂ affineSpan k {p₁, p₂}

The second of two points lies in their affine span.

theorem AffineMap.lineMap_mem_affineSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (r : k) (p₁ : P) (p₂ : P) :
() r affineSpan k {p₁, p₂}

A combination of two points expressed with lineMap lies in their affine span.

theorem AffineMap.lineMap_rev_mem_affineSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (r : k) (p₁ : P) (p₂ : P) :
() r affineSpan k {p₁, p₂}

A combination of two points expressed with lineMap (with the two points reversed) lies in their affine span.

theorem smul_vsub_vadd_mem_affineSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (r : k) (p₁ : P) (p₂ : P) :
r (p₂ -ᵥ p₁) +ᵥ p₁ affineSpan k {p₁, p₂}

A multiple of the difference of two points added to the first point lies in their affine span.

theorem smul_vsub_rev_vadd_mem_affineSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (r : k) (p₁ : P) (p₂ : P) :
r (p₁ -ᵥ p₂) +ᵥ p₂ affineSpan k {p₁, p₂}

A multiple of the difference of two points added to the second point lies in their affine span.

theorem vadd_left_mem_affineSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p₁ : P} {p₂ : P} {v : V} :
v +ᵥ p₁ affineSpan k {p₁, p₂} ∃ (r : k), r (p₂ -ᵥ p₁) = v

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_right_mem_affineSpan_pair {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p₁ : P} {p₂ : P} {v : V} :
v +ᵥ p₂ affineSpan k {p₁, p₂} ∃ (r : k), r (p₁ -ᵥ p₂) = v

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 affineSpan_pair_le_of_mem_of_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p₁ : P} {p₂ : P} {s : } (hp₁ : p₁ s) (hp₂ : p₂ s) :
affineSpan k {p₁, p₂} s

The span of two points that lie in an affine subspace is contained in that subspace.

theorem affineSpan_pair_le_of_left_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p₁ : P} {p₂ : P} {p₃ : P} (h : p₁ affineSpan k {p₂, p₃}) :
affineSpan k {p₁, p₃} affineSpan k {p₂, p₃}

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_right_mem {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p₁ : P} {p₂ : P} {p₃ : P} (h : p₁ affineSpan k {p₂, p₃}) :
affineSpan k {p₂, p₁} affineSpan k {p₂, p₃}

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_mono (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s₁ : Set P} {s₂ : Set P} (h : s₁ s₂) :
affineSpan k s₁ affineSpan k s₂

affineSpan is monotone.

theorem affineSpan_insert_affineSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (p : P) (ps : Set P) :
affineSpan k (insert p (affineSpan k ps)) = affineSpan k (insert p 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 affineSpan_insert_eq_affineSpan (k : Type u_1) {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p : P} {ps : Set P} (h : p affineSpan 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 vectorSpan_insert_eq_vectorSpan {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p : P} {ps : Set P} (h : p affineSpan k ps) :

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

theorem affineSpan_le_toAffineSubspace_span {k : Type u_1} {V : Type u_2} [Ring k] [] [Module k V] {s : Set V} :

When the affine space is also a vector space, the affine span is contained within the linear span.

theorem affineSpan_subset_span {k : Type u_1} {V : Type u_2} [Ring k] [] [Module k V] {s : Set V} :
() ()
theorem AffineSubspace.direction_sup {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s1 : } {s2 : } {p1 : P} {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 AffineSubspace.direction_affineSpan_insert {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {p1 : P} {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 AffineSubspace.mem_affineSpan_insert_iff {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } {p1 : P} (hp1 : p1 s) (p2 : P) (p : P) :
p affineSpan k (insert p2 s) ∃ (r : k), ∃ 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 AffineMap.vectorSpan_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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) {s : Set P₁} :
Submodule.map f.linear () = vectorSpan k (f '' s)
def AffineSubspace.map {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) (s : ) :

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

Equations
• = { carrier := f '' s, smul_vsub_vadd_mem := }
Instances For
@[simp]
theorem AffineSubspace.coe_map {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) (s : ) :
() = f '' s
@[simp]
theorem AffineSubspace.mem_map {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] {f : P₁ →ᵃ[k] P₂} {x : P₂} {s : } :
x ∃ y ∈ s, f y = x
theorem AffineSubspace.mem_map_of_mem {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) {x : P₁} {s : } (h : x s) :
f x
@[simp]
theorem AffineSubspace.mem_map_iff_mem_of_injective {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] {f : P₁ →ᵃ[k] P₂} {x : P₁} {s : } (hf : ) :
f x x s
@[simp]
theorem AffineSubspace.map_bot {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) :
@[simp]
theorem AffineSubspace.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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) {s : } :
s =
@[simp]
theorem AffineSubspace.map_id {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] (s : ) :
theorem AffineSubspace.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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] [] [Module k V₃] [AddTorsor V₃ P₃] (s : ) (f : P₁ →ᵃ[k] P₂) (g : P₂ →ᵃ[k] P₃) :
=
@[simp]
theorem AffineSubspace.map_direction {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) (s : ) :
= Submodule.map f.linear
theorem AffineSubspace.map_span {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) (s : Set P₁) :
@[simp]
theorem AffineSubspace.inclusion_linear {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] {S₁ : } {S₂ : } [Nonempty S₁] [Nonempty S₂] (h : S₁ S₂) :
.linear =
def AffineSubspace.inclusion {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] {S₁ : } {S₂ : } [Nonempty S₁] [Nonempty S₂] (h : S₁ S₂) :
S₁ →ᵃ[k] S₂

Affine map from a smaller to a larger subspace of the same space.

This is the affine version of Submodule.inclusion.

Equations
• = { toFun := , linear := , map_vadd' := }
Instances For
@[simp]
theorem AffineSubspace.coe_inclusion_apply {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] {S₁ : } {S₂ : } [Nonempty S₁] [Nonempty S₂] (h : S₁ S₂) (x : S₁) :
() = x
@[simp]
theorem AffineSubspace.inclusion_rfl {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] {S₁ : } [Nonempty S₁] :
@[simp]
theorem AffineMap.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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) (hf : ) :
theorem AffineMap.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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) {s : Set P₁} (hf : ) (h : = ) :
affineSpan k (f '' s) =
@[simp]
theorem AffineEquiv.linear_ofEq {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] (S₁ : ) (S₂ : ) [Nonempty S₁] [Nonempty S₂] (h : S₁ = S₂) :
(AffineEquiv.ofEq S₁ S₂ h).linear =
def AffineEquiv.ofEq {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] (S₁ : ) (S₂ : ) [Nonempty S₁] [Nonempty S₂] (h : S₁ = S₂) :
S₁ ≃ᵃ[k] S₂

Affine equivalence between two equal affine subspace.

This is the affine version of LinearEquiv.ofEq.

Equations
Instances For
@[simp]
theorem AffineEquiv.coe_ofEq_apply {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] (S₁ : ) (S₂ : ) [Nonempty S₁] [Nonempty S₂] (h : S₁ = S₂) (x : S₁) :
((AffineEquiv.ofEq S₁ S₂ h) x) = x
@[simp]
theorem AffineEquiv.ofEq_symm {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] (S₁ : ) (S₂ : ) [Nonempty S₁] [Nonempty S₂] (h : S₁ = S₂) :
@[simp]
theorem AffineEquiv.ofEq_rfl {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] (S₁ : ) [Nonempty S₁] :
AffineEquiv.ofEq S₁ S₁ = AffineEquiv.refl k S₁
theorem AffineEquiv.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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] {s : Set P₁} (e : P₁ ≃ᵃ[k] P₂) :
= affineSpan k (e '' s) =
def AffineSubspace.comap {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) (s : ) :

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

Equations
• = { carrier := f ⁻¹' s, smul_vsub_vadd_mem := }
Instances For
@[simp]
theorem AffineSubspace.coe_comap {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) (s : ) :
() = f ⁻¹' s
@[simp]
theorem AffineSubspace.mem_comap {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] {f : P₁ →ᵃ[k] P₂} {x : P₁} {s : } :
f x s
theorem AffineSubspace.comap_mono {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] {f : P₁ →ᵃ[k] P₂} {s : } {t : } :
s t
@[simp]
theorem AffineSubspace.comap_top {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] {f : P₁ →ᵃ[k] P₂} :
@[simp]
theorem AffineSubspace.comap_bot {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) :
@[simp]
theorem AffineSubspace.comap_id {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] (s : ) :
theorem AffineSubspace.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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] [] [Module k V₃] [AddTorsor V₃ P₃] (s : ) (f : P₁ →ᵃ[k] P₂) (g : P₂ →ᵃ[k] P₃) :
theorem AffineSubspace.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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] {f : P₁ →ᵃ[k] P₂} {s : } {t : } :
t
theorem AffineSubspace.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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) :
theorem AffineSubspace.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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) (s : ) :
s
theorem AffineSubspace.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] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ →ᵃ[k] P₂) (s : ) :
s
theorem AffineSubspace.map_sup {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (s : ) (t : ) (f : P₁ →ᵃ[k] P₂) :
theorem AffineSubspace.map_iSup {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] {ι : Sort u_8} (f : P₁ →ᵃ[k] P₂) (s : ι) :
= ⨆ (i : ι), AffineSubspace.map f (s i)
theorem AffineSubspace.comap_inf {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (s : ) (t : ) (f : P₁ →ᵃ[k] P₂) :
theorem AffineSubspace.comap_supr {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] {ι : Sort u_8} (f : P₁ →ᵃ[k] P₂) (s : ι) :
= ⨅ (i : ι), AffineSubspace.comap f (s i)
@[simp]
theorem AffineSubspace.comap_symm {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (e : P₁ ≃ᵃ[k] P₂) (s : ) :
@[simp]
theorem AffineSubspace.map_symm {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (e : P₁ ≃ᵃ[k] P₂) (s : ) :
theorem AffineSubspace.comap_span {k : Type u_1} {V₁ : Type u_2} {P₁ : Type u_3} {V₂ : Type u_4} {P₂ : Type u_5} [Ring k] [] [Module k V₁] [AddTorsor V₁ P₁] [] [Module k V₂] [AddTorsor V₂ P₂] (f : P₁ ≃ᵃ[k] P₂) (s : Set P₂) :
def AffineSubspace.Parallel {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s₁ : ) (s₂ : ) :

Two affine subspaces are parallel if one is related to the other by adding the same vector to all points.

Equations
Instances For

Two affine subspaces are parallel if one is related to the other by adding the same vector to all points.

Equations
Instances For
theorem AffineSubspace.Parallel.symm {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s₁ : } {s₂ : } (h : ) :
theorem AffineSubspace.parallel_comm {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s₁ : } {s₂ : } :
theorem AffineSubspace.Parallel.refl {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] (s : ) :
theorem AffineSubspace.Parallel.trans {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s₁ : } {s₂ : } {s₃ : } (h₁₂ : ) (h₂₃ : ) :
theorem AffineSubspace.Parallel.direction_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s₁ : } {s₂ : } (h : ) :
@[simp]
theorem AffineSubspace.parallel_bot_iff_eq_bot {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } :
@[simp]
theorem AffineSubspace.bot_parallel_iff_eq_bot {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s : } :
theorem AffineSubspace.parallel_iff_direction_eq_and_eq_bot_iff_eq_bot {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s₁ : } {s₂ : } :
(s₁ = s₂ = )
theorem AffineSubspace.Parallel.vectorSpan_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s₁ : Set P} {s₂ : Set P} (h : AffineSubspace.Parallel (affineSpan k s₁) (affineSpan k s₂)) :
vectorSpan k s₁ = vectorSpan k s₂
theorem AffineSubspace.affineSpan_parallel_iff_vectorSpan_eq_and_eq_empty_iff_eq_empty {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {s₁ : Set P} {s₂ : Set P} :
AffineSubspace.Parallel (affineSpan k s₁) (affineSpan k s₂) vectorSpan k s₁ = vectorSpan k s₂ (s₁ = s₂ = )
theorem AffineSubspace.affineSpan_pair_parallel_iff_vectorSpan_eq {k : Type u_1} {V : Type u_2} {P : Type u_3} [Ring k] [] [Module k V] [] {p₁ : P} {p₂ : P} {p₃ : P} {p₄ : P} :
AffineSubspace.Parallel (affineSpan k {p₁, p₂}) (affineSpan k {p₃, p₄}) vectorSpan k {p₁, p₂} = vectorSpan k {p₃, p₄}