-
Notifications
You must be signed in to change notification settings - Fork 839
feat(Geometry/Euclidean/Projection): characteristic property #30698
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
feat(Geometry/Euclidean/Projection): characteristic property #30698
Conversation
Add a lemma ```lean lemma orthogonalProjection_eq_iff_mem {s : AffineSubspace ℝ P} [Nonempty s] [s.direction.HasOrthogonalProjection] {p q : P} : orthogonalProjection s p = q ↔ q ∈ s ∧ p -ᵥ q ∈ s.directionᗮ := by ``` that gives the characteristic property of the orthogonal projection in a more convenient form to use than the existing `inter_eq_singleton_orthogonalProjection` (from which it is derived).
PR summary 8aa3ccd118Import changes for modified filesNo significant changes to the import graph Import changes for all files
|
/-- The characteristic property of the orthogonal projection. This form is typically more | ||
convenient to use than `inter_eq_singleton_orthogonalProjection`. -/ | ||
lemma orthogonalProjection_eq_iff_mem {s : AffineSubspace ℝ P} [Nonempty s] | ||
[s.direction.HasOrthogonalProjection] {p q : P} : | ||
orthogonalProjection s p = q ↔ q ∈ s ∧ p -ᵥ q ∈ s.directionᗮ := by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this spelling is the more convenient one, should orthogonalProjection
have been defined somehow in terms of this specification instead? If you think the answer is yes, can you add a TODO?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my view, the right way to redefine orthogonalProjection
is in #27378 (which may have been abandoned by the author). But any definition in terms of orthogonal projection for submodules is unlikely to achieve the nicest form of the characteristic property.
convenient to use than `inter_eq_singleton_orthogonalProjection`. -/ | ||
lemma orthogonalProjection_eq_iff_mem {s : AffineSubspace ℝ P} [Nonempty s] | ||
[s.direction.HasOrthogonalProjection] {p q : P} : | ||
orthogonalProjection s p = q ↔ q ∈ s ∧ p -ᵥ q ∈ s.directionᗮ := by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a version of this without the coercion on the LHS?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what that would look like; if you say q
is in the subtype of s
then you remove q ∈ s
from the RHS but now need a coercion to subtract from p
and then assert membership of s.directionᗮ
, and that's a slightly different lemma statement but it's not obvious there are any particular advantages to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed I'm thinking of orthogonalProjection s p = q ↔ p -ᵥ (q : P) ∈ s.directionᗮ :=
, which seems like it's vaguely useful in that it is simpler. Certainly I'm not saying we should drop your current version.
That would also cause your lemma to gain a coe_
prefix, which is probably a good idea anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added that version and renamed this one.
Co-authored-by: Eric Wieser <wieser.eric@gmail.com>
Add a lemma
that gives the characteristic property of the orthogonal projection in a more convenient form to use than the existing
inter_eq_singleton_orthogonalProjection
(from which it is derived).Deduce a lemma
orthogonalProjection_eq_orthogonalProjection_iff_vsub_mem
about equality of two projections onto the same subspace.