Skip to content
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

[Merged by Bors] - feat(geometry/euclidean/monge_point): lemmas on altitudes and orthocenter #4179

Closed
wants to merge 4 commits into from

Conversation

jsm28
Copy link
Collaborator

@jsm28 jsm28 commented Sep 18, 2020

Add more lemmas about altitudes of a simplex and the orthocenter of a
triangle. Some of these are just building out basic API that's
mathematically trivial (e.g. showing that the altitude as defined is a
one-dimensional affine subspace and providing an explicit form of its
direction), while the results on the orthocenter have some geometrical
content that's part of the preparation for defining and proving basic
properties of orthocentric systems.


…nter

Add more lemmas about altitudes of a simplex and the orthocenter of a
triangle.  Some of these are just building out basic API that's
mathemtically trivial (e.g. showing that the altitude as defined is a
one-dimensional affine subspace and providing an explicit form of its
direction), while the results on the orthocenter have some geometrical
content that's part of the preparation for defining and proving basic
properties of orthocentric systems.
@jsm28 jsm28 added the awaiting-review The author would like community review of the PR label Sep 18, 2020
necessarily listed in the same order). Then the orthocenter of `t₂`
is the vertex of `t₁` that was replaced. -/
lemma orthocenter_replace_orthocenter_eq_point {t₁ t₂ : triangle ℝ P} {i₁ i₂ i₃ j₁ j₂ j₃ : fin 3}
(hi₁₂ : i₁ ≠ i₂) (hi₁₃ : i₁ ≠ i₃) (hi₂₃ : i₂ ≠ i₃) (hj₁₂ : j₁ ≠ j₂) (hj₁₃ : j₁ ≠ j₃)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there's a bundled way to state (hi₁₂ : i₁ ≠ i₂) (hi₁₃ : i₁ ≠ i₃) (hi₂₃ : i₂ ≠ i₃)...

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, it's possible to write things such as (hi : function.injective ![i₁, i₂, i₃]), but I think for most cases of concrete choices of indices it will be more convenient to produce the three hypotheses. (The general principle that can be seen at work in these lemmas is that the manipulations involved in proving something for general n tend to be more convenient than those involved in proving something specific to the case of 3.)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using list.pairwise you can say [i₁, i₂, i₃].pairwise (≠)

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If what you have when using this sort of result is a list or a function from fin 3 or anything like that, in which all three indices play exactly the same role, the bundled forms make sense. But I don't think that's the main use case for such lemmas (indeed, in this lemma, the indices don't all play the same role; one is the vertex being replaced, the other two are the vertices not being replaced). When the indices don't all play the same role, that's liable to mean that inequality of different indices may be derived in different ways (possibly from norm_num, when the indices are 0, 1 and 2, possibly from dec_trivial, when some of them are arbitrary fin 3 values different from one or two such values passed into a lemma using this one, for example), making three separate hypotheses more convenient to pass to this lemma than one bundled hypothesis.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that @shingtaklam1324's version is straightforward to produce with

import data.list.pairwise

example {α : Type} {i₁ i₂ i₃ : α} (hi₁₂ : i₁ ≠ i₂) (hi₁₃ : i₁ ≠ i₃) (hi₂₃ : i₂ ≠ i₃) : [i₁, i₂, i₃].pairwise (≠) := by tidy; exact list.pairwise.nil

It looks to me like pairwise.nil is missing a simp lemma (edit: #4254)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

With #4281, the proof above is just by simp - so in principle a caller of orthocenter_replace_orthocenter_eq_point could just use refine orthocenter_replace_orthocenter_eq_point _ h₁ h₂ h₃, simp, and they'd end up at the three hypotheses you list here. Up to you whether you want to explore this further.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tend to think that alternative options for how to express that these indices are distinct would best be explored once we have users of orthocenter_replace_orthocenter_eq_point. (I have a definition and some basic properties of orthocentric systems, but as well as this PR those properties depend on some definitions / lemmas about collinearity that I want to rework before PRing them.)

Copy link
Member

@jcommelin jcommelin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bors merge

Furthermore, I propose that several definition names be shortened.

@github-actions github-actions bot added ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) and removed awaiting-review The author would like community review of the PR labels Sep 28, 2020
bors bot pushed a commit that referenced this pull request Sep 28, 2020
…nter (#4179)

Add more lemmas about altitudes of a simplex and the orthocenter of a
triangle.  Some of these are just building out basic API that's
mathematically trivial (e.g. showing that the altitude as defined is a
one-dimensional affine subspace and providing an explicit form of its
direction), while the results on the orthocenter have some geometrical
content that's part of the preparation for defining and proving basic
properties of orthocentric systems.
@bors
Copy link

bors bot commented Sep 28, 2020

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Sep 28, 2020
…nter (#4179)

Add more lemmas about altitudes of a simplex and the orthocenter of a
triangle.  Some of these are just building out basic API that's
mathematically trivial (e.g. showing that the altitude as defined is a
one-dimensional affine subspace and providing an explicit form of its
direction), while the results on the orthocenter have some geometrical
content that's part of the preparation for defining and proving basic
properties of orthocentric systems.
@bors
Copy link

bors bot commented Sep 28, 2020

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title feat(geometry/euclidean/monge_point): lemmas on altitudes and orthocenter [Merged by Bors] - feat(geometry/euclidean/monge_point): lemmas on altitudes and orthocenter Sep 28, 2020
@bors bors bot closed this Sep 28, 2020
@bors bors bot deleted the altitude-orthocenter-lemmas branch September 28, 2020 14:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants