-
Notifications
You must be signed in to change notification settings - Fork 298
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(data/nat/basic): remove sub lemmas #9544
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fpvandoorn
added
the
awaiting-author
A reviewer has asked the author a question or requested changes
label
Oct 4, 2021
fpvandoorn
added
awaiting-review
The author would like community review of the PR
and removed
awaiting-author
A reviewer has asked the author a question or requested changes
labels
Oct 5, 2021
bors r+ |
bors bot
pushed a commit
that referenced
this pull request
Oct 5, 2021
* Remove the nat sub lemmas that are special cases of lemmas in `algebra/order/sub` * This PR does 90% of the work, some lemmas require a bit more work (which will be done in a future PR) * Protect `ordinal.add_sub_cancel_of_le` * Most fixes in other files were abuses of the definitional equality of `n < m` and `nat.succ n \le m`. * [This](https://github.com/leanprover-community/mathlib/blob/7a5d15a955a92a90e1d398b2281916b9c41270b2/src/data/nat/basic.lean#L498-L611) gives the list of renamings. * The regex to find 90+% of the occurrences of removed lemmas. Some lemmas were not protected, so might not be found this way. ``` nat.(le_sub_add|add_sub_cancel'|sub_add_sub_cancel|sub_cancel|sub_sub_sub_cancel_right|sub_add_eq_add_sub|sub_sub_assoc|lt_of_sub_pos|lt_of_sub_lt_sub_right|lt_of_sub_lt_sub_left|sub_lt_self|le_sub_right_of_add_le|le_sub_left_of_add_le|lt_sub_right_of_add_lt|lt_sub_left_of_add_lt|add_lt_of_lt_sub_right|add_lt_of_lt_sub_left|le_add_of_sub_le_right|le_add_of_sub_le_left|lt_add_of_sub_lt_right|lt_add_of_sub_lt_left|sub_le_left_of_le_add|sub_le_right_of_le_add|sub_lt_left_iff_lt_add|le_sub_left_iff_add_le|le_sub_right_iff_add_le|lt_sub_left_iff_add_lt|lt_sub_right_iff_add_lt|sub_lt_right_iff_lt_add|sub_le_sub_left_iff|sub_lt_sub_right_iff|sub_lt_sub_left_iff|sub_le_iff|sub_lt_iff)[^_] ``` Co-authored-by: Floris van Doorn <fpv@andrew.cmu.edu>
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
Oct 5, 2021
Build failed: |
I cannot reproduce this failure locally, though there are some really slow proofs in that file. |
it looks like this PR builds again |
fpvandoorn
added
awaiting-review
The author would like community review of the PR
and removed
ready-to-merge
All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
labels
Oct 6, 2021
bors r+ |
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
Oct 6, 2021
1 task
bors bot
pushed a commit
that referenced
this pull request
Oct 6, 2021
* Remove the nat sub lemmas that are special cases of lemmas in `algebra/order/sub` * This PR does 90% of the work, some lemmas require a bit more work (which will be done in a future PR) * Protect `ordinal.add_sub_cancel_of_le` * Most fixes in other files were abuses of the definitional equality of `n < m` and `nat.succ n \le m`. * [This](https://github.com/leanprover-community/mathlib/blob/7a5d15a955a92a90e1d398b2281916b9c41270b2/src/data/nat/basic.lean#L498-L611) gives the list of renamings. * The regex to find 90+% of the occurrences of removed lemmas. Some lemmas were not protected, so might not be found this way. ``` nat.(le_sub_add|add_sub_cancel'|sub_add_sub_cancel|sub_cancel|sub_sub_sub_cancel_right|sub_add_eq_add_sub|sub_sub_assoc|lt_of_sub_pos|lt_of_sub_lt_sub_right|lt_of_sub_lt_sub_left|sub_lt_self|le_sub_right_of_add_le|le_sub_left_of_add_le|lt_sub_right_of_add_lt|lt_sub_left_of_add_lt|add_lt_of_lt_sub_right|add_lt_of_lt_sub_left|le_add_of_sub_le_right|le_add_of_sub_le_left|lt_add_of_sub_lt_right|lt_add_of_sub_lt_left|sub_le_left_of_le_add|sub_le_right_of_le_add|sub_lt_left_iff_lt_add|le_sub_left_iff_add_le|le_sub_right_iff_add_le|lt_sub_left_iff_add_lt|lt_sub_right_iff_add_lt|sub_lt_right_iff_lt_add|sub_le_sub_left_iff|sub_lt_sub_right_iff|sub_lt_sub_left_iff|sub_le_iff|sub_lt_iff)[^_] ``` Co-authored-by: Floris van Doorn <fpv@andrew.cmu.edu>
Pull request successfully merged into master. Build succeeded: |
bors
bot
changed the title
refactor(data/nat/basic): remove sub lemmas
[Merged by Bors] - refactor(data/nat/basic): remove sub lemmas
Oct 6, 2021
bors bot
pushed a commit
that referenced
this pull request
Oct 9, 2021
* Follow-up of #9544 to remove the remaining sub lemmas on `nat` that can be generalized to `has_ordered_sub`. * The renamings of the lemmas in mathlib that occurred at least once: ``` nat.sub_eq_of_eq_add -> sub_eq_of_eq_add_rev nat.add_sub_sub_cancel -> add_sub_sub_cancel' nat.sub_le_self -> sub_le_self' ```
eric-wieser
added
the
hacktoberfest-accepted
Without this label hacktoberfest is scared off by bors
label
Oct 12, 2021
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
hacktoberfest-accepted
Without this label hacktoberfest is scared off by bors
ready-to-merge
All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
algebra/order/sub
ordinal.add_sub_cancel_of_le
n < m
andnat.succ n \le m
.