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] - refactor(analysis/convex/basic): rewrite a few proofs #13658

Closed
wants to merge 3 commits into from

Conversation

urkud
Copy link
Member

@urkud urkud commented Apr 24, 2022

  • prove that a closed segment is the union of the corresponding open segment and the endpoints;
  • use this lemma to golf some proofs;
  • make the "field" argument of mem_open_segment_of_ne_left_right implicit.
  • use section variables.

Open in Gitpod

@urkud urkud added the awaiting-review The author would like community review of the PR label Apr 24, 2022
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.

Thanks 🎉

bors merge

@leanprover-community-bot-assistant leanprover-community-bot-assistant 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 Apr 25, 2022
bors bot pushed a commit that referenced this pull request Apr 25, 2022
* prove that a closed segment is the union of the corresponding open segment and the endpoints;
* use this lemma to golf some proofs;
* make the "field" argument of `mem_open_segment_of_ne_left_right` implicit.
* use section variables.
Copy link
Collaborator

@YaelDillies YaelDillies left a comment

Choose a reason for hiding this comment

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

Thanks a lot! This looks nice.

Comment on lines +197 to 198
refine and_congr_right (λ hxA, forall₄_congr $ λ x₁ h₁ x₂ h₂, _),
split,
Copy link
Collaborator

Choose a reason for hiding this comment

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

You can even save another two lines like this.

Suggested change
refine and_congr_right (λ hxA, forall₄_congr $ λ x₁ h₁ x₂ h₂, _),
split,
refine and_congr_right (λ hxA, forall₄_congr $ λ x₁ h₁ x₂ h₂, ⟨_, λ H hx, _⟩),

lemma mem_open_segment_of_ne_left_right {x y z : E} (hx : x ≠ z) (hy : y ≠ z)
(hz : z ∈ [x -[𝕜] y]) :
z ∈ open_segment 𝕜 x y :=
lemma insert_endpoints_open_segment (x y : E) :
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not sure about the name of that one. I think it's okay, but I would have expected some thing like _left_right instead of _endpoints.

@bors
Copy link

bors bot commented Apr 25, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(analysis/convex/basic): rewrite a few proofs [Merged by Bors] - refactor(analysis/convex/basic): rewrite a few proofs Apr 25, 2022
@bors bors bot closed this Apr 25, 2022
@bors bors bot deleted the YK-segment-insert branch April 25, 2022 08:03
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