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(algebra/order/to_interval_mod): symmetric variants of lemmas #18942

Closed
wants to merge 8 commits into from

Conversation

eric-wieser
Copy link
Member

@eric-wieser eric-wieser commented May 4, 2023

These lemmas are about expressions in the second instead of third arguments of the I{co,oc}_{mod,div} functions.

Some existing lemmas clashed with these new lemmas; they have been renamed as follows:

  • to_Ico_div_sub'to_Ico_div_sub_eq_to_Ico_div_add
  • to_Ioc_div_sub'to_Ioc_div_sub_eq_to_Ioc_div_add
  • to_Ico_div_add_right'to_Ico_div_sub_eq_to_Ico_div_add' (and reversed)
  • to_Ioc_div_add_right'to_Ioc_div_sub_eq_to_Ioc_div_add' (and reversed)
  • to_Ico_mod_sub'to_Ico_mod_sub_eq_sub
  • to_Ioc_mod_sub'to_Ioc_mod_sub_eq_sub
  • to_Ico_mod_add_right'to_Ico_mod_add_right_eq_add
  • to_Ioc_mod_add_right'to_Ioc_mod_add_right_eq_add

The statement of to_Ioc_div_zsmul_add is commuted to be consistent with the lemmas around it; presumably it was a copy-and-paste error.


Open in Gitpod

@eric-wieser eric-wieser added awaiting-review The author would like community review of the PR awaiting-CI The author would like to see what CI has to say before doing more work. labels May 4, 2023
@github-actions github-actions bot removed the awaiting-CI The author would like to see what CI has to say before doing more work. label May 4, 2023
@[simp] lemma to_Ioc_div_sub' (a b : α) : to_Ioc_div hp (a - p) b = to_Ioc_div hp a b + 1 :=
by simpa only [one_zsmul] using to_Ioc_div_sub_zsmul' hp a b 1

lemma to_Ico_div_sub_eq (a b c : α) : to_Ico_div hp a (b - c) = to_Ico_div hp (a + c) b :=
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not super happy with this new name (previously to_Ico_div_sub'). Some other options are:

  • to_Ico_div_sub'' (if in doubt, add more primes)
  • to_Ico_div_sub_eq_to_Ico_div_add (perhaps too long?)

Copy link
Collaborator

Choose a reason for hiding this comment

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

I think to_Ico_div_sub_eq_to_Ico_div_add because it's not so clear which should be the LHS and which should be the RHS, so having both to_Ico_div_sub and to_Ico_div_add with the name will with the search. But yeah I agree it's annoyingly long (but gets better with CamelCase).

Copy link
Member Author

Choose a reason for hiding this comment

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

Done, this scheme seems to work nicely for the other clashes too

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 🎉

If CI passes, please remove the label awaiting-CI and merge this yourself, by adding a comment bors r+.

bors d+

@bors
Copy link

bors bot commented May 6, 2023

✌️ eric-wieser can now approve this pull request. To approve and merge a pull request, simply reply with bors r+. More detailed instructions are available here.

@leanprover-community-bot-assistant leanprover-community-bot-assistant added delegated The PR author may merge after reviewing final suggestions. and removed awaiting-review The author would like community review of the PR labels May 6, 2023
@eric-wieser
Copy link
Member Author

bors merge

@YaelDillies, I can address any remaining missing lemmas in a follow-up if you add further comments here.

@github-actions github-actions bot added the ready-to-merge All that is left is for bors to build and merge this PR. (Remember you need to say `bors r+`.) label May 6, 2023
bors bot pushed a commit that referenced this pull request May 6, 2023
…8942)

These lemmas are about expressions in the second instead of third arguments of the `I{co,oc}_{mod,div}` functions.

Some existing lemmas clashed with these new lemmas; they have been renamed as follows:
* `to_Ico_div_sub'` → `to_Ico_div_sub_eq_to_Ico_div_add`
* `to_Ioc_div_sub'` → `to_Ioc_div_sub_eq_to_Ioc_div_add`
* `to_Ico_div_add_right'` → `to_Ico_div_sub_eq_to_Ico_div_add'` (and reversed)
* `to_Ioc_div_add_right'` → `to_Ioc_div_sub_eq_to_Ioc_div_add'` (and reversed)
* `to_Ico_mod_sub'` → `to_Ico_mod_sub_eq_sub`
* `to_Ioc_mod_sub'` → `to_Ioc_mod_sub_eq_sub`
* `to_Ico_mod_add_right'` → `to_Ico_mod_add_right_eq_add`
* `to_Ioc_mod_add_right'` → `to_Ioc_mod_add_right_eq_add`

The statement of `to_Ioc_div_zsmul_add` is commuted to be consistent with the lemmas around it; presumably it was a copy-and-paste error.
@bors
Copy link

bors bot commented May 6, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title feat(algebra/order/to_interval_mod): symmetric variants of lemmas [Merged by Bors] - feat(algebra/order/to_interval_mod): symmetric variants of lemmas May 6, 2023
@bors bors bot closed this May 6, 2023
@bors bors bot deleted the eric-wieser/boring-interval-lemmas branch May 6, 2023 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
delegated The PR author may merge after reviewing final suggestions. 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