-
Notifications
You must be signed in to change notification settings - Fork 297
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/*): Algebraic instances on lex
/order_dual
#16122
Conversation
I can already hear Eric talking about |
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.
Besides the lemmas about to/of_lex 1
and the left/right_cancel_semigroup
s, this looks geat!
Thanks!
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.
Is it worth adding division_ring
/field
and rat_cast
too?
bors d+
✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with |
lex
lex
/order_dual
I moved the instances closer to the definitions of the corresponding typeclasses because the pattern of putting instances that are defined in |
src/algebra/group/basic.lean
Outdated
|
||
open order_dual | ||
|
||
@[to_additive] instance : Π [has_one α], has_one αᵒᵈ := id |
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.
@urkud said that using id
was a bad idea since it's one more thing to unfold
@[to_additive] instance : Π [has_one α], has_one αᵒᵈ := id | |
@[to_additive] instance [has_one α] : has_one αᵒᵈ := ‹has_one α› |
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.
For future reference, here's a regex that works to turn one into the other: : Π \[(.*)\],(.*)id
, [h : $1] :$2h
|
||
open order_dual | ||
|
||
@[to_additive] instance [h : has_one α] : has_one αᵒᵈ := h |
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.
Note that
@[to_additive] instance [h : has_one α] : has_one αᵒᵈ := h | |
@[to_additive] instance [has_one α] : has_one αᵒᵈ := ‹has_one α› |
avoids h :
appearing in the docs; but perhaps this is too minor to care about.
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.
Yeah, it's mostly harder to industrialise because of the line-wrapping 😦
bors merge |
Merge conflict. |
Let's try again bors merge |
Copy over algebraic instances for `lex` and `order_dual`.
Pull request successfully merged into master. Build succeeded: |
lex
/order_dual
lex
/order_dual
#16847 copied over the copyright from `algebra.group.basic` without actually attributing things properly. All the material in `algebra.group.commutator` is from #12309 and the material is mostly from #16122 with some dating back from #8564 Also fix `order_dual.has_pow` being additivized as `order_dual.has_nsmul` rather than `order_dual.has_smul`.
…e names (#16967) #16847 copied over the copyright from `algebra.group.basic` without actually attributing things properly. All the material in `algebra.group.commutator` is from #12309 and the material is mostly from #16122 with some dating back from #8564 Also fix `order_dual.has_pow` being additivized as `order_dual.has_nsmul` rather than `order_dual.has_smul`.
Copy over algebraic instances for
lex
andorder_dual
.