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(set_theory/ordinal/*): ordinal.succorder.succ #14243

Closed
wants to merge 12 commits into from

Conversation

vihdzp
Copy link
Collaborator

@vihdzp vihdzp commented May 19, 2022

We inline the definition of ordinal.succ in the succ_order instance. This allows us to comfortably use all of the theorems about order.succ to our advantage.


Open in Gitpod

(edit by @eric-wieser: tagged as easy since I've reviewed the diff, all we need is a "yes, generalization is worth more than dot notation" opinion by a user of ordinal)

@vihdzp vihdzp added the awaiting-review The author would like community review of the PR label May 19, 2022
@vihdzp vihdzp changed the title refactor(set_theory/ordinal/*): Rename succ lemmas refactor(set_theory/ordinal/*): Rename succ lemmas May 19, 2022
@vihdzp vihdzp added the awaiting-CI The author would like to see what CI has to say before doing more work. label May 19, 2022
@vihdzp
Copy link
Collaborator Author

vihdzp commented May 19, 2022

I'm reworking this to completely replace ordinal.succ by order.succ.

@vihdzp vihdzp added the WIP Work in progress label May 19, 2022
@vihdzp vihdzp removed the WIP Work in progress label May 19, 2022
@vihdzp vihdzp changed the title refactor(set_theory/ordinal/*): Rename succ lemmas refactor(set_theory/ordinal/*): ordinal.succorder.succ May 19, 2022
Comment on lines -968 to -969
/-- The ordinal successor is the smallest ordinal larger than `o`.
It is defined as `o + 1`. -/
def succ (o : ordinal) : ordinal := o + 1
Copy link
Member

Choose a reason for hiding this comment

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

You need to update the module docstrnig to reference order.succ.

Copy link
Member

@eric-wieser eric-wieser left a comment

Choose a reason for hiding this comment

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

I won't make the call on whether we actually want to do this (someone who's worked with ordinals should answer that), but assuming we do then this PR looks great.

There's one place where you've forgotten to update a module docstring; can you go through the docstrings looking for succ` and add order. prefixes where appropriate?

@eric-wieser eric-wieser added easy < 20s of review time. See the lifecycle page for guidelines. merge-conflict Please `git merge origin/master` then a bot will remove this label. labels May 27, 2022
@vihdzp
Copy link
Collaborator Author

vihdzp commented May 27, 2022

I think this is a good idea, since it means we can reuse the results from order.succ without having to rewrite back and forth. I don't believe ordinals make this a better or worse idea than it would be elsewhere.

@vihdzp
Copy link
Collaborator Author

vihdzp commented May 27, 2022

I should mention - I had to add a lot of explicit order. annotations, but they should go away once #14273 is merged, when there's no longer ambiguity between cardinal and ordinal lemmas.

@vihdzp vihdzp removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label May 27, 2022
@fpvandoorn
Copy link
Member

bors merge.

This looks great!

@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 May 27, 2022
bors bot pushed a commit that referenced this pull request May 27, 2022
We inline the definition of `ordinal.succ` in the `succ_order` instance. This allows us to comfortably use all of the theorems about `order.succ` to our advantage.
@bors
Copy link

bors bot commented May 28, 2022

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title refactor(set_theory/ordinal/*): ordinal.succorder.succ [Merged by Bors] - refactor(set_theory/ordinal/*): ordinal.succorder.succ May 28, 2022
@bors bors bot closed this May 28, 2022
@bors bors bot deleted the ordinal_succ_order branch May 28, 2022 00:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
easy < 20s of review time. See the lifecycle page for guidelines. 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

3 participants