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] - fix(algebra/ordered_monoid): Ensure that ordered_cancel_comm_monoid can provide a cancel_comm_monoid instance #5713

Closed
wants to merge 3 commits into from

Conversation

eric-wieser
Copy link
Member

… can provide a `cancel_comm_monoid` instance
@@ -285,7 +285,7 @@ class add_cancel_comm_monoid (M : Type u)
extends add_left_cancel_comm_monoid M, add_right_cancel_comm_monoid M

/-- Commutative version of cancel_monoid. -/
@[protect_proj, ancestor right_cancel_comm_monoid left_cancel_comm_monoid, to_additive add_cancel_comm_monoid]
@[protect_proj, ancestor left_cancel_comm_monoid right_cancel_comm_monoid, to_additive add_cancel_comm_monoid]
Copy link
Member Author

Choose a reason for hiding this comment

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

Turns out that by getting this backwards, to_additive would map to_left_cancel_comm_monoid to to_add_right_cancel_comm_monoid! The order matters.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Perhaps we should add a warning about this to the to_additive doc entry?

Copy link
Member Author

Choose a reason for hiding this comment

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

Sounds like a job for #5338

Copy link
Collaborator

Choose a reason for hiding this comment

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

Yes, fair enough.

Thanks!
bors r+

@eric-wieser eric-wieser added the awaiting-review The author would like community review of the PR label Jan 12, 2021
@github-actions github-actions bot added the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Jan 14, 2021
@github-actions github-actions bot removed the merge-conflict Please `git merge origin/master` then a bot will remove this label. label Jan 15, 2021
bors bot pushed a commit that referenced this pull request Jan 15, 2021
… can provide a `cancel_comm_monoid` instance (#5713)
@bors
Copy link

bors bot commented Jan 15, 2021

Pull request successfully merged into master.

Build succeeded:

@bors bors bot changed the title fix(algebra/ordered_monoid): Ensure that ordered_cancel_comm_monoid can provide a cancel_comm_monoid instance [Merged by Bors] - fix(algebra/ordered_monoid): Ensure that ordered_cancel_comm_monoid can provide a cancel_comm_monoid instance Jan 15, 2021
@bors bors bot closed this Jan 15, 2021
@bors bors bot deleted the eric-wieser/fix-instance-inheritance branch January 15, 2021 21:05
b-mehta pushed a commit that referenced this pull request Jan 16, 2021
… can provide a `cancel_comm_monoid` instance (#5713)
@YaelDillies YaelDillies removed the awaiting-review The author would like community review of the PR label Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants