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(order/succ_pred/limit): redefine successor/predecessor limits #15655

Closed
wants to merge 11 commits into from

Conversation

vihdzp
Copy link
Collaborator

@vihdzp vihdzp commented Jul 24, 2022

I realized too late that there is a much simpler definition for a successor/predecessor limit (defined in #15001) in terms of the covering relation. We redefine these predicates and port over the existing API. Note that this new definition is only equivalent to the old one in partial orders.

The API has remained exactly the same with two caveats:

  • A few theorems need their assumptions strengthened from preorders to partial orders.
  • Since is_succ_limit is now defined outside of the order namespace, all its theorems are moved outside of it too.

Open in Gitpod

@vihdzp vihdzp added the awaiting-review The author would like community review of the PR label Jul 24, 2022
@vihdzp vihdzp requested a review from YaelDillies July 24, 2022 01:46
@urkud urkud added the t-order Order hierarchy label Jul 24, 2022
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.

I'm not sure it's worth moving to order.cover.

src/order/cover.lean Outdated Show resolved Hide resolved
src/order/cover.lean Outdated Show resolved Hide resolved
src/order/cover.lean Outdated Show resolved Hide resolved
src/order/cover.lean Outdated Show resolved Hide resolved
@vihdzp
Copy link
Collaborator Author

vihdzp commented Aug 3, 2022

If order/cover.lean isn't the right file for this, we can make a new file order/is_succ_limit.lean and move this new definition there.

Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@YaelDillies
Copy link
Collaborator

Please leave them in the current file for now. That will make for a much more informative diff. You can always rename the file later.

@vihdzp
Copy link
Collaborator Author

vihdzp commented Aug 3, 2022

I'll leave these results in the file for now. Do note that the file will either be deleted or substantially changed if the planned succ_order refactor goes through, as these lemmas will in large part supersede existing lemmas on successor orders with no maximums.

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.

I just fixed the lint.

LGTM

@YaelDillies
Copy link
Collaborator

maintainer merge

@github-actions
Copy link

github-actions bot commented Oct 4, 2022

🚀 Pull request has been placed on the maintainer queue by YaelDillies.

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 Oct 4, 2022
bors bot pushed a commit that referenced this pull request Oct 4, 2022
#15655)

I realized too late that there is a much simpler definition for a successor/predecessor limit (defined in #15001) in terms of the covering relation. We redefine these predicates and port over the existing API. Note that this new definition is only equivalent to the old one in partial orders.

The API has remained exactly the same with two caveats:
- A few theorems need their assumptions strengthened from preorders to partial orders. 
- Since `is_succ_limit` is now defined outside of the `order` namespace, all its theorems are moved outside of it too.



Co-authored-by: Yaël Dillies <yael.dillies@gmail.com>
@bors
Copy link

bors bot commented Oct 4, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(order/succ_pred/limit): redefine successor/predecessor limits [Merged by Bors] - refactor(order/succ_pred/limit): redefine successor/predecessor limits Oct 4, 2022
@bors bors bot closed this Oct 4, 2022
@bors bors bot deleted the succ_pred_refactor_attempt branch October 4, 2022 10:22
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+`.) t-order Order hierarchy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants