Documentation

Mathlib.Geometry.Euclidean.Projection

Orthogonal projection in affine spaces #

This file defines orthogonal projection onto an affine subspace, and reflection of a point in an affine subspace.

Main definitions #

def EuclideanGeometry.orthogonalProjection {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] :
P โ†’แดฌ[๐•œ] โ†ฅs

The orthogonal projection of a point onto a nonempty affine subspace.

Equations
  • One or more equations did not get rendered due to their size.
Instances For
    theorem EuclideanGeometry.orthogonalProjection_apply' {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {p : P} :
    โ†‘((orthogonalProjection s) p) = โ†‘(s.direction.orthogonalProjection (p -แตฅ โ†‘(Classical.arbitrary โ†ฅs))) +แตฅ โ†‘(Classical.arbitrary โ†ฅs)
    theorem EuclideanGeometry.orthogonalProjection_apply_mem {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {p x : P} (hx : x โˆˆ s) :
    theorem EuclideanGeometry.orthogonalProjection_congr {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {sโ‚ sโ‚‚ : AffineSubspace ๐•œ P} {pโ‚ pโ‚‚ : P} [Nonempty โ†ฅsโ‚] [sโ‚.direction.HasOrthogonalProjection] (h : sโ‚ = sโ‚‚) (hp : pโ‚ = pโ‚‚) :
    โ†‘((orthogonalProjection sโ‚) pโ‚) = โ†‘((orthogonalProjection sโ‚‚) pโ‚‚)

    Since both instance arguments are propositions, allow simp to rewrite them alongside the s argument.

    Note that without the coercion to P, the LHS and RHS would have different types.

    @[simp]
    theorem EuclideanGeometry.orthogonalProjection_linear {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] :

    The linear map corresponding to orthogonalProjection.

    @[simp]

    The continuous linear map corresponding to orthogonalProjection.

    theorem EuclideanGeometry.orthogonalProjection_mem {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (p : P) :
    โ†‘((orthogonalProjection s) p) โˆˆ s

    The orthogonalProjection lies in the given subspace.

    The orthogonalProjection lies in the orthogonal subspace.

    theorem EuclideanGeometry.inter_eq_singleton_orthogonalProjection {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (p : P) :

    The intersection of the subspace and the orthogonal subspace through the given point is the orthogonalProjection of that point onto the subspace.

    theorem EuclideanGeometry.orthogonalProjection_vsub_mem_direction {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {pโ‚ : P} (pโ‚‚ : P) (hpโ‚ : pโ‚ โˆˆ s) :
    โ†‘((orthogonalProjection s) pโ‚‚ -แตฅ โŸจpโ‚, hpโ‚โŸฉ) โˆˆ s.direction

    Subtracting a point in the given subspace from the orthogonalProjection produces a result in the direction of the given subspace.

    theorem EuclideanGeometry.vsub_orthogonalProjection_mem_direction {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {pโ‚ : P} (pโ‚‚ : P) (hpโ‚ : pโ‚ โˆˆ s) :
    โ†‘(โŸจpโ‚, hpโ‚โŸฉ -แตฅ (orthogonalProjection s) pโ‚‚) โˆˆ s.direction

    Subtracting the orthogonalProjection from a point in the given subspace produces a result in the direction of the given subspace.

    theorem EuclideanGeometry.orthogonalProjection_eq_self_iff {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {p : P} :
    โ†‘((orthogonalProjection s) p) = p โ†” p โˆˆ s

    A point equals its orthogonal projection if and only if it lies in the subspace.

    @[simp]
    theorem EuclideanGeometry.orthogonalProjection_mem_subspace_eq_self {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (p : โ†ฅs) :
    (orthogonalProjection s) โ†‘p = p

    Orthogonal projection is idempotent.

    theorem EuclideanGeometry.eq_orthogonalProjection_of_eq_subspace {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s s' : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [Nonempty โ†ฅs'] [s.direction.HasOrthogonalProjection] [s'.direction.HasOrthogonalProjection] (h : s = s') (p : P) :
    โ†‘((orthogonalProjection s) p) = โ†‘((orthogonalProjection s') p)
    @[simp]
    theorem EuclideanGeometry.orthogonalProjection_affineSpan_singleton {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (pโ‚ pโ‚‚ : P) :
    โ†‘((orthogonalProjection (affineSpan ๐•œ {pโ‚})) pโ‚‚) = pโ‚

    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.

    The characteristic property of the orthogonal projection, for a point given in the underlying space. This form is typically more convenient to use than inter_eq_singleton_orthogonalProjection.

    theorem EuclideanGeometry.orthogonalProjection_eq_iff_mem {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {p : P} {q : โ†ฅs} :

    The characteristic property of the orthogonal projection, for a point given in the relevant subspace. This form is typically more convenient to use than inter_eq_singleton_orthogonalProjection.

    A condition for two points to have the same orthogonal projection onto a given subspace.

    theorem EuclideanGeometry.orthogonalProjection_sup_of_orthogonalProjection_eq {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {sโ‚ sโ‚‚ : AffineSubspace ๐•œ P} [Nonempty โ†ฅsโ‚] [Nonempty โ†ฅsโ‚‚] [sโ‚.direction.HasOrthogonalProjection] [sโ‚‚.direction.HasOrthogonalProjection] {p : P} (h : โ†‘((orthogonalProjection sโ‚) p) = โ†‘((orthogonalProjection sโ‚‚) p)) [(sโ‚ โŠ” sโ‚‚).direction.HasOrthogonalProjection] :
    โ†‘((orthogonalProjection (sโ‚ โŠ” sโ‚‚)) p) = โ†‘((orthogonalProjection sโ‚) p)

    If the orthogonal projections of a point onto two subspaces are equal, so is the projection onto their supremum.

    theorem EuclideanGeometry.orthogonalProjection_vadd_eq_self {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {p : P} (hp : p โˆˆ s) {v : V} (hv : v โˆˆ s.directionแ—ฎ) :

    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.

    theorem EuclideanGeometry.orthogonalProjection_vadd_smul_vsub_orthogonalProjection {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {pโ‚ : P} (pโ‚‚ : P) (r : ๐•œ) (hp : pโ‚ โˆˆ s) :
    (orthogonalProjection s) (r โ€ข (pโ‚‚ -แตฅ โ†‘((orthogonalProjection s) pโ‚‚)) +แตฅ pโ‚) = โŸจpโ‚, hpโŸฉ

    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.

    theorem EuclideanGeometry.orthogonalProjection_orthogonalProjection_of_le {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {sโ‚ sโ‚‚ : AffineSubspace ๐•œ P} [Nonempty โ†ฅsโ‚] [Nonempty โ†ฅsโ‚‚] [sโ‚.direction.HasOrthogonalProjection] [sโ‚‚.direction.HasOrthogonalProjection] (h : sโ‚ โ‰ค sโ‚‚) (p : P) :
    (orthogonalProjection sโ‚) โ†‘((orthogonalProjection sโ‚‚) p) = (orthogonalProjection sโ‚) p
    theorem EuclideanGeometry.dist_sq_eq_dist_orthogonalProjection_sq_add_dist_orthogonalProjection_sq {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {pโ‚ : P} (pโ‚‚ : P) (hpโ‚ : pโ‚ โˆˆ s) :
    dist pโ‚ pโ‚‚ * dist pโ‚ pโ‚‚ = dist pโ‚ โ†‘((orthogonalProjection s) pโ‚‚) * dist pโ‚ โ†‘((orthogonalProjection s) pโ‚‚) + dist pโ‚‚ โ†‘((orthogonalProjection s) pโ‚‚) * dist pโ‚‚ โ†‘((orthogonalProjection s) pโ‚‚)

    The square of the distance from a point in s to pโ‚‚ equals the sum of the squares of the distances of the two points to the orthogonalProjection.

    theorem EuclideanGeometry.dist_orthogonalProjection_eq_infDist {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (p : P) :
    dist p โ†‘((orthogonalProjection s) p) = Metric.infDist p โ†‘s

    The distance between a point and its orthogonal projection to a subspace equals the distance to that subspace as given by Metric.infDist. This is not a simp lemma since the simplest form depends on the context (if any calculations are to be done with the distance, the version with the orthogonal projection gives access to more lemmas about orthogonal projections that may be useful).

    theorem EuclideanGeometry.dist_orthogonalProjection_eq_infNndist {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (p : P) :
    nndist p โ†‘((orthogonalProjection s) p) = Metric.infNndist p โ†‘s

    The nonnegative distance between a point and its orthogonal projection to a subspace equals the distance to that subspace as given by Metric.infNndist. This is not a simp lemma since the simplest form depends on the context (if any calculations are to be done with the distance, the version with the orthogonal projection gives access to more lemmas about orthogonal projections that may be useful).

    theorem EuclideanGeometry.dist_sq_smul_orthogonal_vadd_smul_orthogonal_vadd {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} {pโ‚ pโ‚‚ : P} (hpโ‚ : pโ‚ โˆˆ s) (hpโ‚‚ : pโ‚‚ โˆˆ s) (rโ‚ rโ‚‚ : ๐•œ) {v : V} (hv : v โˆˆ s.directionแ—ฎ) :
    dist (rโ‚ โ€ข v +แตฅ pโ‚) (rโ‚‚ โ€ข v +แตฅ pโ‚‚) * dist (rโ‚ โ€ข v +แตฅ pโ‚) (rโ‚‚ โ€ข v +แตฅ pโ‚‚) = dist pโ‚ pโ‚‚ * dist pโ‚ pโ‚‚ + โ€–rโ‚ - rโ‚‚โ€– * โ€–rโ‚ - rโ‚‚โ€– * (โ€–vโ€– * โ€–vโ€–)

    The square of the distance between two points constructed by adding multiples of the same orthogonal vector to points in the same subspace.

    theorem EuclideanGeometry.dist_eq_iff_dist_orthogonalProjection_eq {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {pโ‚ pโ‚‚ : P} (pโ‚ƒ : P) (hpโ‚ : pโ‚ โˆˆ s) (hpโ‚‚ : pโ‚‚ โˆˆ s) :
    dist pโ‚ pโ‚ƒ = dist pโ‚‚ pโ‚ƒ โ†” dist pโ‚ โ†‘((orthogonalProjection s) pโ‚ƒ) = dist pโ‚‚ โ†‘((orthogonalProjection s) pโ‚ƒ)

    p is equidistant from two points in s if and only if its orthogonalProjection is.

    theorem EuclideanGeometry.dist_set_eq_iff_dist_orthogonalProjection_eq {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {ps : Set P} (hps : ps โІ โ†‘s) (p : P) :
    (ps.Pairwise fun (pโ‚ pโ‚‚ : P) => dist pโ‚ p = dist pโ‚‚ p) โ†” ps.Pairwise fun (pโ‚ pโ‚‚ : P) => dist pโ‚ โ†‘((orthogonalProjection s) p) = dist pโ‚‚ โ†‘((orthogonalProjection s) p)

    p is equidistant from a set of points in s if and only if its orthogonalProjection is.

    theorem EuclideanGeometry.exists_dist_eq_iff_exists_dist_orthogonalProjection_eq {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {ps : Set P} (hps : ps โІ โ†‘s) (p : P) :
    (โˆƒ (r : โ„), โˆ€ pโ‚ โˆˆ ps, dist pโ‚ p = r) โ†” โˆƒ (r : โ„), โˆ€ pโ‚ โˆˆ ps, dist pโ‚ โ†‘((orthogonalProjection s) p) = r

    There exists r such that p has distance r from all the points of a set of points in s if and only if there exists (possibly different) r such that its orthogonalProjection has that distance from all the points in that set.

    def EuclideanGeometry.reflection {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] :

    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
      theorem EuclideanGeometry.reflection_apply {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (p : P) :
      theorem EuclideanGeometry.reflection_apply_of_mem {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (p : P) {x : P} (hx : x โˆˆ s) :
      theorem EuclideanGeometry.reflection_apply' {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (p : P) :
      theorem EuclideanGeometry.eq_reflection_of_eq_subspace {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s s' : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [Nonempty โ†ฅs'] [s.direction.HasOrthogonalProjection] [s'.direction.HasOrthogonalProjection] (h : s = s') (p : P) :
      (reflection s) p = (reflection s') p
      @[simp]
      theorem EuclideanGeometry.reflection_reflection {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (p : P) :
      (reflection s) ((reflection s) p) = p

      Reflecting twice in the same subspace.

      @[simp]
      theorem EuclideanGeometry.reflection_symm {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] :

      Reflection is its own inverse.

      theorem EuclideanGeometry.reflection_involutive {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] :

      Reflection is involutive.

      theorem EuclideanGeometry.reflection_eq_self_iff {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (p : P) :

      A point is its own reflection if and only if it is in the subspace.

      theorem EuclideanGeometry.reflection_eq_iff_orthogonalProjection_eq {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (sโ‚ sโ‚‚ : AffineSubspace ๐•œ P) [Nonempty โ†ฅsโ‚] [Nonempty โ†ฅsโ‚‚] [sโ‚.direction.HasOrthogonalProjection] [sโ‚‚.direction.HasOrthogonalProjection] (p : P) :
      (reflection sโ‚) p = (reflection sโ‚‚) p โ†” โ†‘((orthogonalProjection sโ‚) p) = โ†‘((orthogonalProjection sโ‚‚) p)

      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.

      theorem EuclideanGeometry.dist_reflection {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] (pโ‚ pโ‚‚ : P) :
      dist pโ‚ ((reflection s) pโ‚‚) = dist ((reflection s) pโ‚) pโ‚‚

      The distance between pโ‚ and the reflection of pโ‚‚ equals that between the reflection of pโ‚ and pโ‚‚.

      theorem EuclideanGeometry.dist_reflection_eq_of_mem {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : AffineSubspace ๐•œ P) [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {pโ‚ : P} (hpโ‚ : pโ‚ โˆˆ s) (pโ‚‚ : P) :
      dist pโ‚ ((reflection s) pโ‚‚) = dist pโ‚ pโ‚‚

      A point in the subspace is equidistant from another point and its reflection.

      theorem EuclideanGeometry.reflection_mem_of_le_of_mem {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {sโ‚ sโ‚‚ : AffineSubspace ๐•œ P} [Nonempty โ†ฅsโ‚] [sโ‚.direction.HasOrthogonalProjection] (hle : sโ‚ โ‰ค sโ‚‚) {p : P} (hp : p โˆˆ sโ‚‚) :
      (reflection sโ‚) p โˆˆ sโ‚‚

      The reflection of a point in a subspace is contained in any larger subspace containing both the point and the subspace reflected in.

      theorem EuclideanGeometry.reflection_orthogonal_vadd {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {p : P} (hp : p โˆˆ s) {v : V} (hv : v โˆˆ s.directionแ—ฎ) :

      Reflecting an orthogonal vector plus a point in the subspace produces the negation of that vector plus the point.

      theorem EuclideanGeometry.reflection_vadd_smul_vsub_orthogonalProjection {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {pโ‚ : P} (pโ‚‚ : P) (r : ๐•œ) (hpโ‚ : pโ‚ โˆˆ s) :
      (reflection s) (r โ€ข (pโ‚‚ -แตฅ โ†‘((orthogonalProjection s) pโ‚‚)) +แตฅ pโ‚) = -(r โ€ข (pโ‚‚ -แตฅ โ†‘((orthogonalProjection s) pโ‚‚))) +แตฅ pโ‚

      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.

      theorem EuclideanGeometry.dist_orthogonalProjection_eq_zero_iff {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [MetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {p : P} :
      dist p โ†‘((orthogonalProjection s) p) = 0 โ†” p โˆˆ s

      The distance to a point's orthogonal projection is 0 iff it lies in the subspace.

      theorem EuclideanGeometry.dist_orthogonalProjection_ne_zero_of_notMem {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [MetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {p : P} (hp : p โˆ‰ s) :
      dist p โ†‘((orthogonalProjection s) p) โ‰  0

      The distance between a point and its orthogonal projection is nonzero if it does not lie in the subspace.

      @[deprecated EuclideanGeometry.dist_orthogonalProjection_ne_zero_of_notMem (since := "2025-05-23")]
      theorem EuclideanGeometry.dist_orthogonalProjection_ne_zero_of_not_mem {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [MetricSpace P] [NormedAddTorsor V P] {s : AffineSubspace ๐•œ P} [Nonempty โ†ฅs] [s.direction.HasOrthogonalProjection] {p : P} (hp : p โˆ‰ s) :
      dist p โ†‘((orthogonalProjection s) p) โ‰  0

      Alias of EuclideanGeometry.dist_orthogonalProjection_ne_zero_of_notMem.


      The distance between a point and its orthogonal projection is nonzero if it does not lie in the subspace.

      def Affine.Simplex.orthogonalProjectionSpan {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {n : โ„•} (s : Simplex ๐•œ P n) :
      P โ†’แดฌ[๐•œ] โ†ฅ(affineSpan ๐•œ (Set.range s.points))

      The orthogonal projection of a point p onto the hyperplane spanned by the simplex's points.

      Equations
      Instances For
        theorem Affine.Simplex.orthogonalProjectionSpan_congr {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {m n : โ„•} {sโ‚ : Simplex ๐•œ P m} {sโ‚‚ : Simplex ๐•œ P n} {pโ‚ pโ‚‚ : P} (h : Set.range sโ‚.points = Set.range sโ‚‚.points) (hp : pโ‚ = pโ‚‚) :
        โ†‘(sโ‚.orthogonalProjectionSpan pโ‚) = โ†‘(sโ‚‚.orthogonalProjectionSpan pโ‚‚)
        @[simp]
        theorem Affine.Simplex.orthogonalProjectionSpan_reindex {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {m n : โ„•} (s : Simplex ๐•œ P m) (e : Fin (m + 1) โ‰ƒ Fin (n + 1)) (p : P) :
        theorem Affine.Simplex.orthogonalProjection_vadd_smul_vsub_orthogonalProjection {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {n : โ„•} (s : Simplex ๐•œ P n) {pโ‚ : P} (pโ‚‚ : P) (r : ๐•œ) (hp : pโ‚ โˆˆ affineSpan ๐•œ (Set.range s.points)) :
        s.orthogonalProjectionSpan (r โ€ข (pโ‚‚ -แตฅ โ†‘(s.orthogonalProjectionSpan pโ‚‚)) +แตฅ pโ‚) = โŸจpโ‚, hpโŸฉ

        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.

        theorem Affine.Simplex.coe_orthogonalProjection_vadd_smul_vsub_orthogonalProjection {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {n : โ„•} {rโ‚ : ๐•œ} (s : Simplex ๐•œ P n) {p pโ‚o : P} (hpโ‚o : pโ‚o โˆˆ affineSpan ๐•œ (Set.range s.points)) :
        โ†‘(s.orthogonalProjectionSpan (rโ‚ โ€ข (p -แตฅ โ†‘(s.orthogonalProjectionSpan p)) +แตฅ pโ‚o)) = pโ‚o
        theorem Affine.Simplex.dist_sq_eq_dist_orthogonalProjection_sq_add_dist_orthogonalProjection_sq {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] {n : โ„•} (s : Simplex ๐•œ P n) {pโ‚ : P} (pโ‚‚ : P) (hpโ‚ : pโ‚ โˆˆ affineSpan ๐•œ (Set.range s.points)) :
        dist pโ‚ pโ‚‚ * dist pโ‚ pโ‚‚ = dist pโ‚ โ†‘(s.orthogonalProjectionSpan pโ‚‚) * dist pโ‚ โ†‘(s.orthogonalProjectionSpan pโ‚‚) + dist pโ‚‚ โ†‘(s.orthogonalProjectionSpan pโ‚‚) * dist pโ‚‚ โ†‘(s.orthogonalProjectionSpan pโ‚‚)
        @[simp]
        theorem Affine.Simplex.orthogonalProjectionSpan_eq_point {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : Simplex ๐•œ P 0) (p : P) :
        theorem Affine.Simplex.orthogonalProjectionSpan_faceOpposite_eq_point_rev {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [RCLike ๐•œ] [NormedAddCommGroup V] [InnerProductSpace ๐•œ V] [PseudoMetricSpace P] [NormedAddTorsor V P] (s : Simplex ๐•œ P 1) (i : Fin 2) (p : P) :