Euclidean spaces #
This file makes some definitions and proves very basic geometrical
results about real inner product spaces and Euclidean affine spaces.
Results about real inner product spaces that involve the norm and
inner product but not angles generally go in
Analysis.NormedSpace.InnerProduct
. Results with longer
proofs or more geometrical content generally go in separate files.
Main definitions #
-
EuclideanGeometry.orthogonalProjection
is the orthogonal projection of a point onto an affine subspace. -
EuclideanGeometry.reflection
is the reflection of a point in an affine subspace.
Implementation notes #
To declare P
as the type of points in a Euclidean affine space with
V
as the type of vectors, use
[NormedAddCommGroup V] [InnerProductSpace ℝ V] [MetricSpace P] [NormedAddTorsor V P]
.
This works better with outParam
to make
V
implicit in most cases than having a separate type alias for
Euclidean affine spaces.
Rather than requiring Euclidean affine spaces to be finite-dimensional (as in the definition on Wikipedia), this is specified only for those theorems that need it.
References #
- https://en.wikipedia.org/wiki/Euclidean_space
Geometrical results on Euclidean affine spaces #
This section develops some geometrical definitions and results on Euclidean affine spaces.
The midpoint of the segment AB is the same distance from A as it is from B.
The inner product of two vectors given with weightedVSub
, in
terms of the pairwise distances.
The distance between two points given with affineCombination
,
in terms of the pairwise distances between the points in that
combination.
The squared distance between points on a line (expressed as a multiple of a fixed vector added to a point) and another point, expressed as a quadratic.
The condition for two points on a line to be equidistant from another point.
Distances r₁
r₂
of p
from two different points c₁
c₂
determine at
most two points p₁
p₂
in a two-dimensional subspace containing those points
(two circles intersect in at most two points).
Distances r₁
r₂
of p
from two different points c₁
c₂
determine at
most two points p₁
p₂
in two-dimensional space (two circles intersect in at
most two points).
The orthogonal projection of a point onto a nonempty affine
subspace, whose direction is complete, as an unbundled function. This
definition is only intended for use in setting up the bundled version
orthogonalProjection
and should not be used once that is
defined.
Equations
- EuclideanGeometry.orthogonalProjectionFn s p = Classical.choose (_ : ∃ (p_1 : P), ↑s ∩ ↑(AffineSubspace.mk' p (AffineSubspace.direction s)ᗮ) = {p_1})
Instances For
The intersection of the subspace and the orthogonal subspace
through the given point is the orthogonalProjectionFn
of that
point onto the subspace. This lemma is only intended for use in
setting up the bundled version and should not be used once that is
defined.
The orthogonalProjectionFn
lies in the given subspace. This
lemma is only intended for use in setting up the bundled version and
should not be used once that is defined.
The orthogonalProjectionFn
lies in the orthogonal
subspace. This lemma is only intended for use in setting up the
bundled version and should not be used once that is defined.
Subtracting p
from its orthogonalProjectionFn
produces a
result in the orthogonal direction. This lemma is only intended for
use in setting up the bundled version and should not be used once that
is defined.
The orthogonal projection of a point onto a nonempty affine
subspace, whose direction is complete. The corresponding linear map
(mapping a vector to the difference between the projections of two
points whose difference is that vector) is the orthogonalProjection
for real inner product spaces, onto the direction of the affine
subspace being projected onto.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The linear map corresponding to orthogonalProjection
.
The intersection of the subspace and the orthogonal subspace
through the given point is the orthogonalProjection
of that point
onto the subspace.
The orthogonalProjection
lies in the given subspace.
The orthogonalProjection
lies in the orthogonal subspace.
Subtracting a point in the given subspace from the
orthogonalProjection
produces a result in the direction of the
given subspace.
Subtracting the orthogonalProjection
from a point in the given
subspace produces a result in the direction of the given subspace.
A point equals its orthogonal projection if and only if it lies in the subspace.
Orthogonal projection is idempotent.
The distance to a point's orthogonal projection is 0 iff it lies in the subspace.
The distance between a point and its orthogonal projection is nonzero if it does not lie in the subspace.
Subtracting p
from its orthogonalProjection
produces a result
in the orthogonal direction.
Subtracting the orthogonalProjection
from p
produces a result
in the orthogonal direction.
Subtracting the orthogonalProjection
from p
produces a result in the kernel of the linear
part of the orthogonal projection.
Adding a vector to a point in the given subspace, then taking the orthogonal projection, produces the original point if the vector was in the orthogonal direction.
Adding a vector to a point in the given subspace, then taking the orthogonal projection, produces the original point if the vector is a multiple of the result of subtracting a point's orthogonal projection from that point.
The square of the distance from a point in s
to p2
equals the
sum of the squares of the distances of the two points to the
orthogonalProjection
.
The square of the distance between two points constructed by adding multiples of the same orthogonal vector to points in the same subspace.
Reflection in an affine subspace, which is expected to be nonempty and complete. The word "reflection" is sometimes understood to mean specifically reflection in a codimension-one subspace, and sometimes more generally to cover operations such as reflection in a point. The definition here, of reflection in an affine subspace, is a more general sense of the word that includes both those common cases.
Equations
- One or more equations did not get rendered due to their size.
Instances For
The result of reflecting.
Reflecting twice in the same subspace.
Reflection is its own inverse.
Reflection is involutive.
A point is its own reflection if and only if it is in the subspace.
Reflecting a point in two subspaces produces the same result if and only if the point has the same orthogonal projection in each of those subspaces.
The distance between p₁
and the reflection of p₂
equals that
between the reflection of p₁
and p₂
.
A point in the subspace is equidistant from another point and its reflection.
The reflection of a point in a subspace is contained in any larger subspace containing both the point and the subspace reflected in.
Reflecting an orthogonal vector plus a point in the subspace produces the negation of that vector plus the point.
Reflecting a vector plus a point in the subspace produces the negation of that vector plus the point if the vector is a multiple of the result of subtracting a point's orthogonal projection from that point.