Skip to content

Commit 715cc30

Browse files
committed
feat(Geometry/Euclidean/Projection): projection onto sup (#30703)
Add a lemma that, if the orthogonal projections of a point onto two subspaces are equal, so is the projection onto their supremum.
1 parent 8f3ecec commit 715cc30

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

Mathlib/Geometry/Euclidean/Projection.lean

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,20 @@ lemma orthogonalProjection_eq_orthogonalProjection_iff_vsub_mem {s : AffineSubsp
310310
(vsub_orthogonalProjection_mem_direction_orthogonal s q)]
311311
simp
312312

313+
/-- If the orthogonal projections of a point onto two subspaces are equal, so is the projection
314+
onto their supremum. -/
315+
lemma orthogonalProjection_sup_of_orthogonalProjection_eq {s₁ s₂ : AffineSubspace ℝ P} [Nonempty s₁]
316+
[Nonempty s₂] [s₁.direction.HasOrthogonalProjection] [s₂.direction.HasOrthogonalProjection]
317+
{p : P} (h : (orthogonalProjection s₁ p : P) = orthogonalProjection s₂ p)
318+
[(s₁ ⊔ s₂).direction.HasOrthogonalProjection] :
319+
(orthogonalProjection (s₁ ⊔ s₂) p : P) = orthogonalProjection s₁ p := by
320+
rw [coe_orthogonalProjection_eq_iff_mem]
321+
refine ⟨SetLike.le_def.1 le_sup_left (orthogonalProjection_mem _), ?_⟩
322+
rw [direction_sup_eq_sup_direction (orthogonalProjection_mem p) (h ▸ orthogonalProjection_mem p),
323+
← Submodule.inf_orthogonal]
324+
exact ⟨vsub_orthogonalProjection_mem_direction_orthogonal _ _,
325+
h ▸ vsub_orthogonalProjection_mem_direction_orthogonal _ _⟩
326+
313327
/-- Adding a vector to a point in the given subspace, then taking the
314328
orthogonal projection, produces the original point if the vector was
315329
in the orthogonal direction. -/

0 commit comments

Comments
 (0)