-
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
feat(order/succ_pred/limit): predecessor from a succ_order
#15614
base: master
Are you sure you want to change the base?
Conversation
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 please inline pred'
into succ_order.to_pred_order
and get rid of the unnecessary lemmas (that is, all the ones that are not used to construct succ_order.to_pred_order
)?
I would rather not inline I can separate the theorems not needed to prove |
Actually, I'd rather not even separate the "extra" lemmas. There's just three of them: |
Yes, so you can do
|
I proved that |
This to me suggests that |
I think the current definition for a If Further, any partial succ-order would also be a pred-order. At that point, given that we quote "don't care about preorders", we would have to consider merging If you need the weaker notion of a predecessor that |
... except that "a typeclass for orders without successor limits" is |
I think I can sum this issue up like this: do we expect that any Unless we feel really strongly about this issue, I'd rather take the path of least effort 😅 |
There's been some Zulip discussion regarding this PR. I'll draft it until we figure out what to do. |
We define
order.pred'
such thatorder.pred' a = a
for a successor limita
, andorder.pred' (succ a) = a
for a non-maximal elementa
. We prove that in an archimedean partial successor order,order.pred'
satisfies the properties of an archimedean predecessor order. We then use this to golf the instances fornat
andint
.This opens up the possibility for two future refactors:
ordinal.pred
by the equivalent but more generalorder.pred'
.is_succ_archimedean
andis_pred_archimedean
into a single typeclass, with constructors from either the successor or predecessor.