Repository navigation
refactor(Order): generalise the CompleteLattice instance on WithTop - #45250
YaelDillies wants to merge 3 commits into
Conversation
PR summary 0f6278743bImport changes for modified filesNo significant changes to the import graph Import changes for all files
|
|
This pull request has conflicts, please merge |
c622eeb to
5d6e224
Compare
|
This pull request has conflicts, please merge |
5d6e224 to
c29ff9f
Compare
c29ff9f to
0c4a05d
Compare
|
Thank you! I'm reviewing... |
Komyyy
left a comment
There was a problem hiding this comment.
I'm thinking about how to remove s.Nonempty assumptions elegantly, but I've run into Mathlib's structural issues about conditionally complete lattices, and sorting them out is taking time.
In the meantime, I've left minor style reviews.
|
Re structural issues, are you aware of #35674? |
|
Oh, thank you to tell me about it! After #35674 is merged, |
Komyyy
left a comment
There was a problem hiding this comment.
Could you make #35674 dependend PR of this PR?
After it was marged, s.Nonempty assumptions can be dropped like this:
@[to_dual]
theorem sSup_eq_coe_iff {α} [PartialOrder α] [OrderSupSet α] {s : Set (WithTop α)} {a : α} :
sSup s = a ↔ ⊤ ∉ s ∧ BddAbove ((↑) ⁻¹' s : Set α) ∧ sSup ((↑) ⁻¹' s) = a := by
obtain rfl | hs := eq_empty_or_nonempty s
· obtain _ | _ := botOrderOrNoBotOrder α
· simp
· simp [sSup_def]
· exact sSup_eq_coe_iff_of_nonempty hs|
Do we still need to change the definition of |
|
The current definition is simply wrong when |
|
This PR/issue depends on: |
7d68576 to
0f62787
Compare
|
|
||
| attribute [to_dual existing] LinearOrder.toMax | ||
|
|
||
| to_dual_for LinearOrder.le_total := self.le_total b a |
There was a problem hiding this comment.
The idea behind not dualizing LinearOrder.le_total was that you're supposed to always use _root_.le_total. What do you think?
There was a problem hiding this comment.
I don't think anything. I've added this to_dual_for solely because it is necessary to dualise the CompleteLinearOrder instances in #45250.
Replace the
CompleteLattice/CompleteLinearOrderinstances onWithTop (WithBot α)/WithBot (WithTop α)by (the composition of)CompleteLattice/CompleteLinearOrderinstances onWithTop α/WithBot αassumingOrderBot α/OrderTop α.Also create some sections to organise the file and generalise and dualise some lemmas.
OrderSupSetinstances onWithTop#45406OrderSupSetinConditionallyCompleteLattice#35674@[to_dual]more #45253