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(data/fintype/order): complete order instances for fintype #7123
Conversation
276ce6a
to
3f737c7
Compare
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.
silly tweaks :)
Co-authored-by: hrmacbeth <25316162+hrmacbeth@users.noreply.github.com>
Co-authored-by: hrmacbeth <25316162+hrmacbeth@users.noreply.github.com>
Co-authored-by: hrmacbeth <25316162+hrmacbeth@users.noreply.github.com>
Co-authored-by: hrmacbeth <25316162+hrmacbeth@users.noreply.github.com>
added explicit instance for fin n+1
lattice -> bounded_lattice -> complete_lattice instead of going through complete_semilattice_Sup
@apnelson1 What's the status of this PR? Do you intend to return to it in the near future? Or would you like someone else to adopt it? |
The status is 'parental leave'. I will return to work next month - I am happy to have someone else adopt the PR in the meantime if that makes sense, though. |
Ok, thanks for the update! Enjoy your time with your family! |
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.
Don't all the lemmas here hold generally for any complete lattice on a fintype, not just these ones?
equality for `⊥` and `⊤`. -/ | ||
noncomputable def fintype.to_complete_linear_order [h : linear_order α] : complete_linear_order α := | ||
{ .. fintype.to_complete_lattice_of_lattice α, | ||
.. 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.
Could you please create two versions of this def (one with [bounded_order α]
and one without)? Otherwise API for complete_lattice
is inconsistent with API for complete_order
.
Otherwise LGTM. Thanks!
bors d+
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.
You might want to delegate me instead. I'm not sure Peter is checking much on mathlib these days.
✌️ apnelson1 can now approve this pull request. To approve and merge a pull request, simply reply with |
UPD: Probably, all these |
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.
Thanks 🎉
bors merge
This PR adds several instances (as defs) for fintypes: * `order_bot` from `semilattice_inf`, `order_top` from `semilattice_sup`, `bounded_order` from `lattice`. * `complete_lattice` from `lattice`. * `complete_linear_order` from `linear_order`. We use this last one to give a `complete_linear_order` instance for `fin (n + 1)` . Co-authored-by: Peter Nelson <apnelson@uwaterloo.ca> Co-authored-by: Peter Nelson <71660771+apnelson1@users.noreply.github.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: YaelDillies <yael.dillies@gmail.com>
Pull request successfully merged into master. Build succeeded: |
This PR adds several instances (as defs) for fintypes: * `order_bot` from `semilattice_inf`, `order_top` from `semilattice_sup`, `bounded_order` from `lattice`. * `complete_lattice` from `lattice`. * `complete_linear_order` from `linear_order`. We use this last one to give a `complete_linear_order` instance for `fin (n + 1)` . Co-authored-by: Peter Nelson <apnelson@uwaterloo.ca> Co-authored-by: Peter Nelson <71660771+apnelson1@users.noreply.github.com> Co-authored-by: Eric Wieser <wieser.eric@gmail.com> Co-authored-by: YaelDillies <yael.dillies@gmail.com>
This PR adds several instances (as defs) for fintypes:
order_bot
fromsemilattice_inf
,order_top
fromsemilattice_sup
,bounded_order
fromlattice
.complete_lattice
fromlattice
.complete_linear_order
fromlinear_order
.We use this last one to give a
complete_linear_order
instance forfin (n + 1)
.