The Mathlib Handbook

The volumes of the handbook are not written yet. This site shows the map of Mathlib that they will follow, at Mathlib 4472534b60.

The areas / V22. Affine, Euclidean and convex geometry

Mathlib.Geometry.Euclidean.Projection

73 declarations and 1 deprecated aliases. Mathlib docs ยท Source

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

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

theorem EuclideanGeometry.orthogonalProjection.congr_simp E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection],
  EuclideanGeometry.orthogonalProjection s = EuclideanGeometry.orthogonalProjection s

theorem EuclideanGeometry.reflection.congr_simp E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s s_1 : AffineSubspace ๐•œ P)
  (e_s : s = s_1) [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection],
  EuclideanGeometry.reflection s = EuclideanGeometry.reflection s_1

def EuclideanGeometry.orthogonalProjection E3 #

{๐•œ : Type u_1} โ†’
  {V : Type u_2} โ†’
    {P : Type u_3} โ†’
      [inst : RCLike ๐•œ] โ†’
        [inst_1 : NormedAddCommGroup V] โ†’
          [inst_2 : InnerProductSpace ๐•œ V] โ†’
            [inst_3 : MetricSpace P] โ†’
              [inst_4 : NormedAddTorsor V P] โ†’
                (s : AffineSubspace ๐•œ P) โ†’ [inst_5 : Nonempty โ†ฅs] โ†’ [s.direction.HasOrthogonalProjection] โ†’ P โ†’แดฌ[๐•œ] โ†ฅs

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

theorem EuclideanGeometry.orthogonalProjection_apply E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p : P},
  (EuclideanGeometry.orthogonalProjection s) p =
    s.direction.orthogonalProjectionOnto (p -แตฅ โ†‘(Classical.arbitrary โ†ฅs)) +แตฅ Classical.arbitrary โ†ฅs

theorem EuclideanGeometry.orthogonalProjection_apply' E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p : P},
  โ†‘((EuclideanGeometry.orthogonalProjection s) p) =
    โ†‘(s.direction.orthogonalProjectionOnto (p -แตฅ โ†‘(Classical.arbitrary โ†ฅs))) +แตฅ โ†‘(Classical.arbitrary โ†ฅs)

theorem EuclideanGeometry.orthogonalProjection_apply_mem E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p x : P},
  x โˆˆ s โ†’ โ†‘((EuclideanGeometry.orthogonalProjection s) p) = โ†‘(s.direction.orthogonalProjectionOnto (p -แตฅ x)) +แตฅ x

theorem EuclideanGeometry.orthogonalProjection_congr E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {sโ‚ sโ‚‚ : AffineSubspace ๐•œ P}
  {pโ‚ pโ‚‚ : P} [inst_5 : Nonempty โ†ฅsโ‚] [inst_6 : sโ‚.direction.HasOrthogonalProjection] (h : sโ‚ = sโ‚‚),
  pโ‚ = pโ‚‚ โ†’ โ†‘((EuclideanGeometry.orthogonalProjection sโ‚) pโ‚) = โ†‘((EuclideanGeometry.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.

theorem EuclideanGeometry.orthogonalProjection_linear E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection],
  (โ†‘(EuclideanGeometry.orthogonalProjection s)).linear = โ†‘s.direction.orthogonalProjectionOnto

The linear map corresponding to orthogonalProjection.

theorem EuclideanGeometry.orthogonalProjection_contLinear E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection],
  (EuclideanGeometry.orthogonalProjection s).contLinear = s.direction.orthogonalProjectionOnto

The continuous linear map corresponding to orthogonalProjection.

theorem EuclideanGeometry.orthogonalProjection_mem E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  โ†‘((EuclideanGeometry.orthogonalProjection s) p) โˆˆ s

The orthogonalProjection lies in the given subspace.

theorem EuclideanGeometry.orthogonalProjection_mem_orthogonal E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  โ†‘((EuclideanGeometry.orthogonalProjection s) p) โˆˆ AffineSubspace.mk' p s.directionแ—ฎ

The orthogonalProjection lies in the orthogonal subspace.

theorem EuclideanGeometry.inter_eq_singleton_orthogonalProjection E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  โ†‘s โˆฉ โ†‘(AffineSubspace.mk' p s.directionแ—ฎ) = {โ†‘((EuclideanGeometry.orthogonalProjection s) 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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {pโ‚ : P} (pโ‚‚ : P) (hpโ‚ : pโ‚ โˆˆ s),
  โ†‘((EuclideanGeometry.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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {pโ‚ : P} (pโ‚‚ : P) (hpโ‚ : pโ‚ โˆˆ s),
  โ†‘(โŸจpโ‚, hpโ‚โŸฉ -แตฅ (EuclideanGeometry.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 E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p : P},
  โ†‘((EuclideanGeometry.orthogonalProjection s) p) = p โ†” p โˆˆ s

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

theorem EuclideanGeometry.orthogonalProjection_mem_subspace_eq_self E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : โ†ฅs),
  (EuclideanGeometry.orthogonalProjection s) โ†‘p = p

theorem EuclideanGeometry.orthogonalProjection_orthogonalProjection E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  (EuclideanGeometry.orthogonalProjection s) โ†‘((EuclideanGeometry.orthogonalProjection s) p) =
    (EuclideanGeometry.orthogonalProjection s) p

Orthogonal projection is idempotent.

theorem EuclideanGeometry.orthogonalProjection_singleton E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (pโ‚ pโ‚‚ : P),
  โ†‘((EuclideanGeometry.orthogonalProjection {pโ‚}) pโ‚‚) = pโ‚

theorem EuclideanGeometry.dist_orthogonalProjection_eq_zero_iff E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p : P},
  dist p โ†‘((EuclideanGeometry.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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p : P},
  p โˆ‰ s โ†’ dist p โ†‘((EuclideanGeometry.orthogonalProjection s) p) โ‰  0

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

theorem EuclideanGeometry.orthogonalProjection_vsub_mem_direction_orthogonal E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  โ†‘((EuclideanGeometry.orthogonalProjection s) p) -แตฅ p โˆˆ s.directionแ—ฎ

Subtracting p from its orthogonalProjection produces a result in the orthogonal direction.

theorem EuclideanGeometry.vsub_orthogonalProjection_mem_direction_orthogonal E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  p -แตฅ โ†‘((EuclideanGeometry.orthogonalProjection s) p) โˆˆ s.directionแ—ฎ

Subtracting the orthogonalProjection from p produces a result in the orthogonal direction.

theorem EuclideanGeometry.orthogonalProjection_vsub_orthogonalProjection E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  s.direction.orthogonalProjectionOnto (p -แตฅ โ†‘((EuclideanGeometry.orthogonalProjection s) p)) = 0

Subtracting the orthogonalProjection from p produces a result in the kernel of the linear part of the orthogonal projection.

theorem EuclideanGeometry.coe_orthogonalProjection_eq_iff_mem E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p q : P},
  โ†‘((EuclideanGeometry.orthogonalProjection s) p) = q โ†” q โˆˆ s โˆง p -แตฅ q โˆˆ s.directionแ—ฎ

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

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p : P} {q : โ†ฅs},
  (EuclideanGeometry.orthogonalProjection s) p = q โ†” p -แตฅ โ†‘q โˆˆ s.directionแ—ฎ

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.

theorem EuclideanGeometry.orthogonalProjection_vadd E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (w : โ†ฅs.direction) (p : P),
  (EuclideanGeometry.orthogonalProjection s) (โ†‘w +แตฅ p) = w +แตฅ (EuclideanGeometry.orthogonalProjection s) p

The orthogonal projection of w +แตฅ p, for w in the direction of the subspace, is w +แตฅ the orthogonal projection of p.

theorem EuclideanGeometry.orthogonalProjection_eq_orthogonalProjection_iff_vsub_mem E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p q : P},
  (EuclideanGeometry.orthogonalProjection s) p = (EuclideanGeometry.orthogonalProjection s) q โ†” p -แตฅ q โˆˆ s.directionแ—ฎ

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

theorem EuclideanGeometry.orthogonalProjection_sup_of_orthogonalProjection_eq E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {sโ‚ sโ‚‚ : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅsโ‚] [inst_6 : Nonempty โ†ฅsโ‚‚] [inst_7 : sโ‚.direction.HasOrthogonalProjection]
  [inst_8 : sโ‚‚.direction.HasOrthogonalProjection] {p : P},
  โ†‘((EuclideanGeometry.orthogonalProjection sโ‚) p) = โ†‘((EuclideanGeometry.orthogonalProjection sโ‚‚) p) โ†’
    โˆ€ [inst_9 : (sโ‚ โŠ” sโ‚‚).direction.HasOrthogonalProjection],
      โ†‘((EuclideanGeometry.orthogonalProjection (sโ‚ โŠ” sโ‚‚)) p) = โ†‘((EuclideanGeometry.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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p : P} (hp : p โˆˆ s) {v : V},
  v โˆˆ s.directionแ—ฎ โ†’ (EuclideanGeometry.orthogonalProjection s) (v +แตฅ 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 was in the orthogonal direction.

theorem EuclideanGeometry.orthogonalProjection_vadd_smul_vsub_orthogonalProjection E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {pโ‚ : P} (pโ‚‚ : P) (r : ๐•œ) (hp : pโ‚ โˆˆ s),
  (EuclideanGeometry.orthogonalProjection s) (r โ€ข (pโ‚‚ -แตฅ โ†‘((EuclideanGeometry.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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {sโ‚ sโ‚‚ : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅsโ‚] [inst_6 : Nonempty โ†ฅsโ‚‚] [inst_7 : sโ‚.direction.HasOrthogonalProjection]
  [inst_8 : sโ‚‚.direction.HasOrthogonalProjection],
  sโ‚ โ‰ค sโ‚‚ โ†’
    โˆ€ (p : P),
      (EuclideanGeometry.orthogonalProjection sโ‚) โ†‘((EuclideanGeometry.orthogonalProjection sโ‚‚) p) =
        (EuclideanGeometry.orthogonalProjection sโ‚) p

theorem EuclideanGeometry.dist_sq_eq_dist_orthogonalProjection_sq_add_dist_orthogonalProjection_sq E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {pโ‚ : P} (pโ‚‚ : P),
  pโ‚ โˆˆ s โ†’
    dist pโ‚ pโ‚‚ * dist pโ‚ pโ‚‚ =
      dist pโ‚ โ†‘((EuclideanGeometry.orthogonalProjection s) pโ‚‚) *
          dist pโ‚ โ†‘((EuclideanGeometry.orthogonalProjection s) pโ‚‚) +
        dist pโ‚‚ โ†‘((EuclideanGeometry.orthogonalProjection s) pโ‚‚) *
          dist pโ‚‚ โ†‘((EuclideanGeometry.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_dist_iff_eq_of_mem E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : s.direction.HasOrthogonalProjection] {pโ‚ pโ‚‚ : P} (hpโ‚‚ : pโ‚‚ โˆˆ s),
  dist pโ‚ โ†‘((EuclideanGeometry.orthogonalProjection s) pโ‚) = dist pโ‚ pโ‚‚ โ†”
    โ†‘((EuclideanGeometry.orthogonalProjection s) pโ‚) = pโ‚‚

If the distance from pโ‚ to its orthogonal projection equals its distance to a point in s, the orthogonal projection is that point.

theorem EuclideanGeometry.dist_orthogonalProjection_eq_infDist E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  dist p โ†‘((EuclideanGeometry.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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  nnDist p โ†‘((EuclideanGeometry.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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  {pโ‚ pโ‚‚ : P},
  pโ‚ โˆˆ s โ†’
    pโ‚‚ โˆˆ s โ†’
      โˆ€ (rโ‚ rโ‚‚ : ๐•œ) {v : V},
        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 E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {pโ‚ pโ‚‚ : P} (pโ‚ƒ : P),
  pโ‚ โˆˆ s โ†’
    pโ‚‚ โˆˆ s โ†’
      (dist pโ‚ pโ‚ƒ = dist pโ‚‚ pโ‚ƒ โ†”
        dist pโ‚ โ†‘((EuclideanGeometry.orthogonalProjection s) pโ‚ƒ) =
          dist pโ‚‚ โ†‘((EuclideanGeometry.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 E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {ps : Set P},
  ps โІ โ†‘s โ†’
    โˆ€ (p : P),
      (ps.Pairwise fun pโ‚ pโ‚‚ โ†ฆ dist pโ‚ p = dist pโ‚‚ p) โ†”
        ps.Pairwise fun pโ‚ pโ‚‚ โ†ฆ
          dist pโ‚ โ†‘((EuclideanGeometry.orthogonalProjection s) p) =
            dist pโ‚‚ โ†‘((EuclideanGeometry.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 E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {ps : Set P},
  ps โІ โ†‘s โ†’
    โˆ€ (p : P),
      (โˆƒ r, โˆ€ pโ‚ โˆˆ ps, dist pโ‚ p = r) โ†” โˆƒ r, โˆ€ pโ‚ โˆˆ ps, dist pโ‚ โ†‘((EuclideanGeometry.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 E3 #

{๐•œ : Type u_1} โ†’
  {V : Type u_2} โ†’
    {P : Type u_3} โ†’
      [inst : RCLike ๐•œ] โ†’
        [inst_1 : NormedAddCommGroup V] โ†’
          [inst_2 : InnerProductSpace ๐•œ V] โ†’
            [inst_3 : MetricSpace P] โ†’
              [inst_4 : NormedAddTorsor V P] โ†’
                (s : AffineSubspace ๐•œ P) โ†’ [Nonempty โ†ฅs] โ†’ [s.direction.HasOrthogonalProjection] โ†’ P โ‰ƒแตƒโฑ[๐•œ] P

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.

theorem EuclideanGeometry.reflection_apply E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  (EuclideanGeometry.reflection s) p =
    s.direction.reflection (p -แตฅ โ†‘(Classical.arbitrary โ†ฅs)) +แตฅ โ†‘(Classical.arbitrary โ†ฅs)

theorem EuclideanGeometry.reflection_apply_of_mem E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P) {x : P},
  x โˆˆ s โ†’ (EuclideanGeometry.reflection s) p = s.direction.reflection (p -แตฅ x) +แตฅ x

theorem EuclideanGeometry.reflection_apply' E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  (EuclideanGeometry.reflection s) p =
    (โ†‘((EuclideanGeometry.orthogonalProjection s) p) -แตฅ p) +แตฅ โ†‘((EuclideanGeometry.orthogonalProjection s) p)

theorem EuclideanGeometry.reflection_reflection E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  (EuclideanGeometry.reflection s) ((EuclideanGeometry.reflection s) p) = p

Reflecting twice in the same subspace.

theorem EuclideanGeometry.reflection_symm E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection],
  (EuclideanGeometry.reflection s).symm = EuclideanGeometry.reflection s

Reflection is its own inverse.

theorem EuclideanGeometry.reflection_involutive E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection],
  Function.Involutive โ‡‘(EuclideanGeometry.reflection s)

Reflection is involutive.

theorem EuclideanGeometry.reflection_eq_self_iff E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P),
  (EuclideanGeometry.reflection s) p = p โ†” p โˆˆ s

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

theorem EuclideanGeometry.reflection_eq_iff_orthogonalProjection_eq E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (sโ‚ sโ‚‚ : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅsโ‚] [inst_6 : Nonempty โ†ฅsโ‚‚] [inst_7 : sโ‚.direction.HasOrthogonalProjection]
  [inst_8 : sโ‚‚.direction.HasOrthogonalProjection] (p : P),
  (EuclideanGeometry.reflection sโ‚) p = (EuclideanGeometry.reflection sโ‚‚) p โ†”
    โ†‘((EuclideanGeometry.orthogonalProjection sโ‚) p) = โ†‘((EuclideanGeometry.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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (pโ‚ pโ‚‚ : P),
  dist pโ‚ ((EuclideanGeometry.reflection s) pโ‚‚) = dist ((EuclideanGeometry.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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {pโ‚ : P},
  pโ‚ โˆˆ s โ†’ โˆ€ (pโ‚‚ : P), dist pโ‚ ((EuclideanGeometry.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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {sโ‚ sโ‚‚ : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅsโ‚] [inst_6 : sโ‚.direction.HasOrthogonalProjection],
  sโ‚ โ‰ค sโ‚‚ โ†’ โˆ€ {p : P}, p โˆˆ sโ‚‚ โ†’ (EuclideanGeometry.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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {p : P},
  p โˆˆ s โ†’ โˆ€ {v : V}, v โˆˆ s.directionแ—ฎ โ†’ (EuclideanGeometry.reflection s) (v +แตฅ p) = -v +แตฅ p

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

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {s : AffineSubspace ๐•œ P}
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] {pโ‚ : P} (pโ‚‚ : P) (r : ๐•œ),
  pโ‚ โˆˆ s โ†’
    (EuclideanGeometry.reflection s) (r โ€ข (pโ‚‚ -แตฅ โ†‘((EuclideanGeometry.orthogonalProjection s) pโ‚‚)) +แตฅ pโ‚) =
      -(r โ€ข (pโ‚‚ -แตฅ โ†‘((EuclideanGeometry.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.orthogonalProjection_map E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] {Vโ‚‚ : Type u_4} {Pโ‚‚ : Type u_5} [inst_3 : NormedAddCommGroup Vโ‚‚]
  [inst_4 : InnerProductSpace ๐•œ Vโ‚‚] [inst_5 : MetricSpace P] [inst_6 : NormedAddTorsor V P] [inst_7 : MetricSpace Pโ‚‚]
  [inst_8 : NormedAddTorsor Vโ‚‚ Pโ‚‚] (s : AffineSubspace ๐•œ P) [inst_9 : Nonempty โ†ฅs]
  [inst_10 : s.direction.HasOrthogonalProjection] (f : P โ†’แตƒโฑ[๐•œ] Pโ‚‚)
  [inst_11 : (AffineSubspace.map f.toAffineMap s).direction.HasOrthogonalProjection] (p : P),
  โ†‘((EuclideanGeometry.orthogonalProjection (AffineSubspace.map f.toAffineMap s)) (f p)) =
    f โ†‘((EuclideanGeometry.orthogonalProjection s) p)

theorem EuclideanGeometry.orthogonalProjection_subtype E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] (s' : AffineSubspace ๐•œ โ†ฅs) [inst_6 : Nonempty โ†ฅs']
  [inst_7 : s'.direction.HasOrthogonalProjection]
  [inst_8 : (AffineSubspace.map s.subtype s').direction.HasOrthogonalProjection] (p : โ†ฅs),
  โ†‘โ†‘((EuclideanGeometry.orthogonalProjection s') p) =
    โ†‘((EuclideanGeometry.orthogonalProjection (AffineSubspace.map s.subtype s')) โ†‘p)

theorem EuclideanGeometry.reflection_map E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] {Vโ‚‚ : Type u_4} {Pโ‚‚ : Type u_5} [inst_3 : NormedAddCommGroup Vโ‚‚]
  [inst_4 : InnerProductSpace ๐•œ Vโ‚‚] [inst_5 : MetricSpace P] [inst_6 : NormedAddTorsor V P] [inst_7 : MetricSpace Pโ‚‚]
  [inst_8 : NormedAddTorsor Vโ‚‚ Pโ‚‚] (s : AffineSubspace ๐•œ P) [inst_9 : Nonempty โ†ฅs]
  [inst_10 : s.direction.HasOrthogonalProjection] (f : P โ†’แตƒโฑ[๐•œ] Pโ‚‚)
  [inst_11 : (AffineSubspace.map f.toAffineMap s).direction.HasOrthogonalProjection] (p : P),
  (EuclideanGeometry.reflection (AffineSubspace.map f.toAffineMap s)) (f p) = f ((EuclideanGeometry.reflection s) p)

theorem EuclideanGeometry.reflection_subtype E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] (s' : AffineSubspace ๐•œ โ†ฅs) [inst_6 : Nonempty โ†ฅs']
  [inst_7 : s'.direction.HasOrthogonalProjection]
  [inst_8 : (AffineSubspace.map s.subtype s').direction.HasOrthogonalProjection] (p : โ†ฅs),
  โ†‘((EuclideanGeometry.reflection s') p) = (EuclideanGeometry.reflection (AffineSubspace.map s.subtype s')) โ†‘p

theorem EuclideanGeometry.le_perpBisector_self_reflection E1 #

โˆ€ {V : Type u_6} {P : Type u_7} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace โ„ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (s : AffineSubspace โ„ P) [inst_4 : Nonempty โ†ฅs]
  [inst_5 : s.direction.HasOrthogonalProjection] (a : P),
  s โ‰ค AffineSubspace.perpBisector a ((EuclideanGeometry.reflection s) a)

theorem EuclideanGeometry.le_perpBisector_reflection_self E1 #

โˆ€ {V : Type u_6} {P : Type u_7} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace โ„ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (s : AffineSubspace โ„ P) [inst_4 : Nonempty โ†ฅs]
  [inst_5 : s.direction.HasOrthogonalProjection] (a : P),
  s โ‰ค AffineSubspace.perpBisector ((EuclideanGeometry.reflection s) a) a

instance EuclideanGeometry.instHasOrthogonalProjectionRealDirectionPerpBisector E0 #

โˆ€ {V : Type u_6} {P : Type u_7} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace โ„ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (a b : P), (AffineSubspace.perpBisector a b).direction.HasOrthogonalProjection

theorem EuclideanGeometry.reflection_perpBisector_left E0 #

โˆ€ {V : Type u_6} {P : Type u_7} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace โ„ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (a b : P), (EuclideanGeometry.reflection (AffineSubspace.perpBisector a b)) a = b

theorem EuclideanGeometry.reflection_perpBisector_right E0 #

โˆ€ {V : Type u_6} {P : Type u_7} [inst : NormedAddCommGroup V] [inst_1 : InnerProductSpace โ„ V] [inst_2 : MetricSpace P]
  [inst_3 : NormedAddTorsor V P] (a b : P), (EuclideanGeometry.reflection (AffineSubspace.perpBisector b a)) a = b

def Affine.Simplex.orthogonalProjectionSpan E1 #

{๐•œ : Type u_1} โ†’
  {V : Type u_2} โ†’
    {P : Type u_3} โ†’
      [inst : RCLike ๐•œ] โ†’
        [inst_1 : NormedAddCommGroup V] โ†’
          [inst_2 : InnerProductSpace ๐•œ V] โ†’
            [inst_3 : MetricSpace P] โ†’
              [inst_4 : NormedAddTorsor V P] โ†’
                {n : โ„•} โ†’ (s : Affine.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.

theorem Affine.Simplex.orthogonalProjectionSpan_congr E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {m n : โ„•}
  {sโ‚ : Affine.Simplex ๐•œ P m} {sโ‚‚ : Affine.Simplex ๐•œ P n} {pโ‚ pโ‚‚ : P},
  Set.range sโ‚.points = Set.range sโ‚‚.points โ†’
    pโ‚ = pโ‚‚ โ†’ โ†‘(sโ‚.orthogonalProjectionSpan pโ‚) = โ†‘(sโ‚‚.orthogonalProjectionSpan pโ‚‚)

theorem Affine.Simplex.orthogonalProjectionSpan_reindex E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {m n : โ„•}
  (s : Affine.Simplex ๐•œ P m) (e : Fin (m + 1) โ‰ƒ Fin (n + 1)) (p : P),
  โ†‘((s.reindex e).orthogonalProjectionSpan p) = โ†‘(s.orthogonalProjectionSpan p)

theorem Affine.Simplex.orthogonalProjection_vadd_smul_vsub_orthogonalProjection E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {n : โ„•}
  (s : Affine.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 E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {n : โ„•} {rโ‚ : ๐•œ}
  (s : Affine.Simplex ๐•œ P n) {p pโ‚o : P},
  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 E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {n : โ„•}
  (s : Affine.Simplex ๐•œ P n) {pโ‚ : P} (pโ‚‚ : P),
  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โ‚‚)

theorem Affine.Simplex.orthogonalProjectionSpan_eq_point E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : Affine.Simplex ๐•œ P 0)
  (p : P), โ†‘(s.orthogonalProjectionSpan p) = s.points 0

theorem Affine.Simplex.orthogonalProjectionSpan_faceOpposite_eq_point_rev E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : Affine.Simplex ๐•œ P 1)
  (i : Fin 2) (p : P), โ†‘((s.faceOpposite i).orthogonalProjectionSpan p) = s.points i.rev

theorem Affine.Simplex.orthogonalProjectionSpan_map E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] {Vโ‚‚ : Type u_4} {Pโ‚‚ : Type u_5} [inst_3 : NormedAddCommGroup Vโ‚‚]
  [inst_4 : InnerProductSpace ๐•œ Vโ‚‚] [inst_5 : MetricSpace P] [inst_6 : NormedAddTorsor V P] [inst_7 : MetricSpace Pโ‚‚]
  [inst_8 : NormedAddTorsor Vโ‚‚ Pโ‚‚] {n : โ„•} (s : Affine.Simplex ๐•œ P n) (f : P โ†’แตƒโฑ[๐•œ] Pโ‚‚) (p : P),
  โ†‘((s.map f.toAffineMap โ‹ฏ).orthogonalProjectionSpan (f p)) = f โ†‘(s.orthogonalProjectionSpan p)

theorem Affine.Simplex.orthogonalProjectionSpan_restrict E0 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] {n : โ„•}
  (s : Affine.Simplex ๐•œ P n) (S : AffineSubspace ๐•œ P) (hS : affineSpan ๐•œ (Set.range s.points) โ‰ค S) (p : โ†ฅS),
  โ†‘โ†‘((s.restrict S hS).orthogonalProjectionSpan p) = โ†‘(s.orthogonalProjectionSpan โ†‘p)

theorem AffineSubspace.comap_subtype_mk' E1 #

โˆ€ {๐•œ : Type u_1} {V : Type u_2} {P : Type u_3} [inst : RCLike ๐•œ] [inst_1 : NormedAddCommGroup V]
  [inst_2 : InnerProductSpace ๐•œ V] [inst_3 : MetricSpace P] [inst_4 : NormedAddTorsor V P] (s : AffineSubspace ๐•œ P)
  [inst_5 : Nonempty โ†ฅs] [inst_6 : s.direction.HasOrthogonalProjection] (p : P) {K : Submodule ๐•œ V},
  s.directionแ—ฎ โ‰ค K โ†’
    AffineSubspace.comap s.subtype (AffineSubspace.mk' p K) =
      AffineSubspace.mk' ((EuclideanGeometry.orthogonalProjection s) p) (Submodule.comap s.direction.subtype K)

The preimage of mk' p K under the inclusion of an affine subspace s, for a submodule K containing s.directionแ—ฎ, is mk' of the orthogonal projection of p and the preimage of K.

Deprecated aliases

NameNew nameSince
EuclideanGeometry.orthogonalProjection_affineSpan_singletonEuclideanGeometry.orthogonalProjection_singleton2026-09-01