-
Notifications
You must be signed in to change notification settings - Fork 299
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/monoid): Co/contravariant classes for with_bot
/with_top
#13369
Conversation
I think that this looks very nice! Why did you do the |
|
Ah, I see! Thanks for the explanation! |
There starts being quite a bit of code-repetition floating around |
Anyway, in case this is relevant, it would be for a separate PR! LGTM! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bors merge
…with_top` (#13369) Add the `covariant_class (with_bot α) (with_bot α) (+) (≤)` and `contravariant_class (with_bot α) (with_bot α) (+) (<)` instances, as well as the lemmas that `covariant_class (with_bot α) (with_bot α) (+) (<)` and `contravariant_class (with_bot α) (with_bot α) (+) (≤)` almost hold. On the way, match the APIs for `with_bot`/`with_top` by adding missing lemmas. Co-authored-by: Wrenna Robson <wren.robson@gmail.com>
Pull request successfully merged into master. Build succeeded: |
with_bot
/with_top
with_bot
/with_top
Add the
covariant_class (with_bot α) (with_bot α) (+) (≤)
andcontravariant_class (with_bot α) (with_bot α) (+) (<)
instances, as well as the lemmas thatcovariant_class (with_bot α) (with_bot α) (+) (<)
andcontravariant_class (with_bot α) (with_bot α) (+) (≤)
almost hold.On the way, match the APIs for
with_bot
/with_top
by adding missing lemmas.Co-authored-by: Wrenna Robson wren.robson@gmail.com
Sorry, the diff is a bit mangled because I had to move
with_top
/with_bot
down the file to useorder_dual
. Note that I am not addingwith_top.add_lt_add
on purpose. We are currently unsure what the correct typeclass assumptions and whether we are not requiring a new one.