-
Notifications
You must be signed in to change notification settings - Fork 316
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(Order/SuccPred): BddAbove.exists_isGreatest_of_nonempty
#15944
Conversation
when `IsSuccArchimedean`
PR summary 9a9e559fd9Import changes for modified filesNo significant changes to the import graph Import changes for all files
Declarations diff
You can run this locally as follows## summary with just the declaration names:
./scripts/declarations_diff.sh <optional_commit>
## more verbose report:
./scripts/declarations_diff.sh long <optional_commit> The doc-module for |
Mathlib/Order/SuccPred/Basic.lean
Outdated
|
||
lemma BddAbove.exists_isGreatest_of_nonempty {X : Type*} [LinearOrder X] [SuccOrder X] | ||
[IsSuccArchimedean X] {S : Set X} (hS : BddAbove S) (hS' : S.Nonempty) : | ||
∃ x, IsGreatest S x := by |
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.
@YaelDillies Are these the right typeclass assumptions?
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.
I guess the right assumption is something like "locally cowell-founded", meaning "Iic x
is cowell-founded for all x
". We don't have that in mathlib, so the current generality seems okay.
Note however that LinearOrder
shouldn't be necessary since the recent refactor on SuccOrder
∃ x, IsGreatest S x := by | |
lemma BddAbove.exists_isGreatest_of_nonempty {X : Type*} [Preorder X] [SuccOrder X] | |
[IsSuccArchimedean X] {S : Set X} (hS : BddAbove S) (hS' : S.Nonempty) : | |
∃ x, IsGreatest S x := by |
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.
I can't generalize to Preorder
because I use Order.le_succ_iff_eq_or_le
in the inductive step proof of Succ.rec
.
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.
The end result is still true, though (although I've noticed you also need to assume that the set is directed). Can you try using another lemma?
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.
@Command-Master, didn't you prove that the assumptions above imply SemilatticeSup X
?
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.
Yes, I now see the results got split
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.
I've left a TODO to come back to this after that PR.
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.
Sorry, I won't merge this for now because I suspect you don't even need the lemmas in the current PR. Please first coordinate with @Command-Master to get #16272 (or rather the preliminary part) merged.
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.
Can you take a look at https://github.com/leanprover-community/mathlib4/pull/16619/files#diff-e9c6f03b09ef6fa37d4bb4f98167c69a8165fcbbd8f189451b15fafbf798f65cR113 please? It's the point of use.
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.
I tried to bring in the relevant lemmas from that PR, but I still don't have a proof. I also can't assume that my set is OrdConnected
. I need help with this if the blocker is generalization.
LGTM but I'm not sure if it can be generalized to some other |
✌️ YaelDillies can now approve this pull request. To approve and merge a pull request, simply reply with |
Co-authored-by: Yaël Dillies <[email protected]>
I am not super happy with the generality of this PR, but since @Command-Master's PRs that would unlock the greater generality are currently stalled, let's press on. bors merge |
when `IsSuccArchimedean` Co-authored-by: Yakov Pechersky <[email protected]> Co-authored-by: Yakov Pechersky <[email protected]>
Pull request successfully merged into master. Build succeeded: |
BddAbove.exists_isGreatest_of_nonempty
BddAbove.exists_isGreatest_of_nonempty
when
IsSuccArchimedean