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 haveNonempty
hypotheses. There is aCompleteLattice
structure on affine subspaces.AffineSubspace.direction
gives theSubmodule
spanned by the pairwise differences of points in anAffineSubspace
. There are various lemmas relating to the set of vectors in thedirection
, 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, withvectorSpan
giving its direction. TheaffineSpan
is defined in terms ofspanPoints
, 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, withaffineSpan
being the main definition for other purposes. Two other descriptions of the affine span are proved equivalent: it is thesInf
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.Normed.Affine.AddTorsor
and
Topology.Algebra.Affine
.
References #
The submodule spanning the differences of a (possibly empty) set of points.
Equations
- vectorSpan k s = Submodule.span k (s -ᵥ s)
Instances For
The definition of vectorSpan
, for rewriting.
vectorSpan
is monotone.
The vectorSpan
of the empty set is ⊥
.
The vectorSpan
of a single point is ⊥
.
The s -ᵥ s
lies within the vectorSpan k s
.
Each pairwise difference is in the vectorSpan
.
The points in the affine span of a (possibly empty) set of points. Use affineSpan
instead to
get an AffineSubspace k P
.
Equations
- spanPoints k s = {p : P | ∃ p1 ∈ s, ∃ v ∈ vectorSpan k s, p = v +ᵥ p1}
Instances For
A point in a set is in its affine span.
A set is contained in its spanPoints
.
The spanPoints
of a set is nonempty if and only if that set is.
Adding a point in the affine span and a vector in the spanning submodule produces a point in the affine span.
Subtracting two points in the affine span produces a vector in the spanning submodule.
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.
Instances For
Reinterpret p : Submodule k V
as an AffineSubspace k V
.
Equations
- p.toAffineSubspace = { carrier := ↑p, smul_vsub_vadd_mem := ⋯ }
Instances For
Equations
- AffineSubspace.instSetLike k P = { coe := AffineSubspace.carrier, coe_injective' := ⋯ }
A point is in an affine subspace coerced to a set if and only if it is in that affine subspace.
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
- s.direction = vectorSpan k ↑s
Instances For
The direction equals the vectorSpan
.
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
- AffineSubspace.directionOfNonempty h = { carrier := ↑s -ᵥ ↑s, add_mem' := ⋯, zero_mem' := ⋯, smul_mem' := ⋯ }
Instances For
direction_of_nonempty
gives the same submodule as direction
.
The set of vectors in the direction of a nonempty affine subspace is given by vsub_set
.
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.
Adding a vector in the direction to a point in the subspace produces a point in the subspace.
Subtracting two points in the subspace produces a vector in the direction.
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.
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.
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.
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.
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.
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.
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.
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.
Two affine subspaces are equal if they have the same points.
Two affine subspaces with the same direction and nonempty intersection are equal.
This is not an instance because it loops with AddTorsor.nonempty
.
Equations
- s.toAddTorsor = AddTorsor.mk ⋯ ⋯
Instances For
Embedding of an affine subspace to the ambient space, as an affine map.
Equations
- s.subtype = { toFun := Subtype.val, linear := s.direction.subtype, map_vadd' := ⋯ }
Instances For
Two affine subspaces with nonempty intersection are equal if and only if their directions are equal.
Construct an affine subspace from a point and a direction.
Equations
- AffineSubspace.mk' p direction = { carrier := {q : P | ∃ v ∈ direction, q = v +ᵥ p}, smul_vsub_vadd_mem := ⋯ }
Instances For
An affine subspace constructed from a point and a direction contains that point.
An affine subspace constructed from a point and a direction contains the result of adding a vector in that direction to that point.
An affine subspace constructed from a point and a direction is nonempty.
The direction of an affine subspace constructed from a point and a 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.
Constructing an affine subspace from a point in a subspace and that subspace's direction yields the original subspace.
If an affine subspace contains a set of points, it contains the spanPoints
of that set.
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
- affineSpan k s = { carrier := spanPoints k s, smul_vsub_vadd_mem := ⋯ }
Instances For
The affine span, converted to a set, is spanPoints
.
A set is contained in its affine span.
The direction of the affine span is the vectorSpan
.
A point in a set is in its affine span.
Equations
- AffineSubspace.instCompleteLattice = CompleteLattice.mk ⋯ ⋯ ⋯ ⋯ ⋯ ⋯
The ≤
order on subspaces is the same as that on the corresponding sets.
One subspace is less than or equal to another if and only if all its points are in the second subspace.
The <
order on subspaces is the same as that on the corresponding sets.
One subspace is not less than or equal to another if and only if it has a point not in the second subspace.
If a subspace is less than another, there is a point only in the second.
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.
If an affine subspace is nonempty and contained in another with the same direction, they are equal.
The affine span is the sInf
of subspaces containing the given points.
The Galois insertion formed by affineSpan
and coercion back to a set.
Equations
- AffineSubspace.gi k V P = { choice := fun (s : Set P) (x : ↑(affineSpan k s) ≤ s) => affineSpan k s, gc := ⋯, le_l_u := ⋯, choice_eq := ⋯ }
Instances For
The span of the empty set is ⊥
.
The span of univ
is ⊤
.
The affine span of a single point, coerced to a set, contains just that point.
A point is in the affine span of a single point if and only if they are equal.
The span of a union of sets is the sup of their spans.
The span of a union of an indexed family of sets is the sup of their spans.
Equations
- ⋯ = ⋯
If the affine span of a set is ⊤
, then the vector span of the same set is the ⊤
.
For a nonempty set, the affine span is ⊤
iff its vector span is ⊤
.
For a non-trivial space, the affine span of a set is ⊤
iff its vector span is ⊤
.
The top affine subspace is linearly equivalent to the affine space.
This is the affine version of Submodule.topEquiv
.
Equations
- AffineSubspace.topEquiv k V P = { toEquiv := Equiv.Set.univ P, linear := (LinearEquiv.ofEq ⊤.direction ⊤ ⋯).trans Submodule.topEquiv, map_vadd' := ⋯ }
Instances For
No points are in ⊥
.
A nonempty affine subspace is ⊤
if and only if its direction is ⊤
.
The inf of two affine subspaces, coerced to a set, is the intersection of the two sets of points.
A point is in the inf of two affine subspaces if and only if it is in both of them.
The direction of the inf of two affine subspaces is less than or equal to the inf of their directions.
If two affine subspaces have a point in common, the direction of their inf equals the inf of their directions.
If two affine subspaces have a point in their inf, the direction of their inf equals the inf of their directions.
If one affine subspace is less than or equal to another, the same applies to their directions.
If one nonempty affine subspace is less than another, the same applies to their directions
The sup of the directions of two affine subspaces is less than or equal to the direction of their sup.
The sup of the directions of two nonempty affine subspaces with empty intersection is less than the direction of their sup.
If the directions of two nonempty affine subspaces span the whole module, they have nonempty intersection.
If the directions of two nonempty affine subspaces are complements of each other, they intersect in exactly one point.
Coercing a subspace to a set then taking the affine span produces the original subspace.
The vectorSpan
is the span of the pairwise subtractions with a given point on the left.
The vectorSpan
is the span of the pairwise subtractions with a given point on the right.
The vectorSpan
is the span of the pairwise subtractions with a given point on the left,
excluding the subtraction of that point from itself.
The vectorSpan
is the span of the pairwise subtractions with a given point on the right,
excluding the subtraction of that point from itself.
The vectorSpan
is the span of the pairwise subtractions with a given point on the right,
excluding the subtraction of that point from itself.
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.
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.
The vectorSpan
of an indexed family is the span of the pairwise subtractions with a given
point on the left.
The vectorSpan
of an indexed family is the span of the pairwise subtractions with a given
point on the right.
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.
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.
The affine span of a set is nonempty if and only if that set is.
Alias of the reverse direction of affineSpan_nonempty
.
The affine span of a set is nonempty if and only if that set is.
The affine span of a nonempty set is nonempty.
Equations
- ⋯ = ⋯
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
.
A dependent version of affineSpan_induction
.
A set, considered as a subset of its spanned affine subspace, spans the whole subspace.
Suppose a set of vectors spans V
. Then a point p
, together with those vectors added to p
,
spans P
.
The vectorSpan
of two points is the span of their difference.
The vectorSpan
of two points is the span of their difference (reversed).
The difference between two points lies in their vectorSpan
.
The difference between two points (reversed) lies in their vectorSpan
.
A multiple of the difference between two points lies in their vectorSpan
.
A multiple of the difference between two points (reversed) lies in their vectorSpan
.
A vector lies in the vectorSpan
of two points if and only if it is a multiple of their
difference.
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
The first of two points lies in their affine span.
The second of two points lies in their affine span.
A combination of two points expressed with lineMap
lies in their affine span.
A combination of two points expressed with lineMap
(with the two points reversed) lies in
their affine span.
A multiple of the difference of two points added to the first point lies in their affine span.
A multiple of the difference of two points added to the second point lies in their affine span.
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.
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.
The span of two points that lie in an affine subspace is contained in that subspace.
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.
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.
affineSpan
is monotone.
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.
If a point is in the affine span of a set, adding it to that set does not change the affine span.
If a point is in the affine span of a set, adding it to that set does not change the vector span.
When the affine space is also a vector space, the affine span is contained within the linear span.
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.
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.
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
.
The image of an affine subspace under an affine map as an affine subspace.
Equations
- AffineSubspace.map f s = { carrier := ⇑f '' ↑s, smul_vsub_vadd_mem := ⋯ }
Instances For
Affine map from a smaller to a larger subspace of the same space.
This is the affine version of Submodule.inclusion
.
Instances For
Affine equivalence between two equal affine subspace.
This is the affine version of LinearEquiv.ofEq
.
Instances For
The preimage of an affine subspace under an affine map as an affine subspace.
Equations
- AffineSubspace.comap f s = { carrier := ⇑f ⁻¹' ↑s, smul_vsub_vadd_mem := ⋯ }
Instances For
Two affine subspaces are parallel if one is related to the other by adding the same vector to all points.
Equations
- s₁.Parallel s₂ = ∃ (v : V), s₂ = AffineSubspace.map (↑(AffineEquiv.constVAdd k P v)) s₁
Instances For
Two affine subspaces are parallel if one is related to the other by adding the same vector to all points.
Equations
- Affine.«term_∥_» = Lean.ParserDescr.trailingNode `Affine.term_∥_ 50 50 (Lean.ParserDescr.binary `andthen (Lean.ParserDescr.symbol " ∥ ") (Lean.ParserDescr.cat `term 51))