-
Notifications
You must be signed in to change notification settings - Fork 644
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
Add not LTE implies GT, and LTE implies maximum. #4428
base: master
Are you sure you want to change the base?
Conversation
isLTE (S k) (S j) with (isLTE k j) | ||
isLTE (S k) (S j) | (Yes prf) = Yes (LTESucc prf) | ||
isLTE (S k) (S j) | (No contra) = No (contra . fromLteSucc) | ||
isLTE (S k) (S j) = case isLTE k j of |
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 there any reason for the change here? 😄
@@ -840,3 +846,9 @@ sucMinL (S l) = cong (sucMinL l) | |||
total sucMinR : (l : Nat) -> minimum l (S l) = l | |||
sucMinR Z = Refl | |||
sucMinR (S l) = cong (sucMinR l) | |||
|
|||
||| If one number is biggre than another, you know what the maximum is. |
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.
There is a small typo biggre
-> bigger
@@ -840,3 +846,9 @@ sucMinL (S l) = cong (sucMinL l) | |||
total sucMinR : (l : Nat) -> minimum l (S l) = l | |||
sucMinR Z = Refl | |||
sucMinR (S l) = cong (sucMinR l) | |||
|
|||
||| If one number is biggre than another, you know what the maximum is. | |||
total lteImpliesMax : i `LTE` j -> maximum i j = j |
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.
Maybe this should be added to contrib
instead of prelude?
On the existing
notLTImpliesGTE
- wasn't sure if there was a way I could use it (besides cribbing from its implementation), so I just implementednotLTEImpliesGT
, so I could apply it to the disproof returned byisLTE
, as in:As for
lteImpliesMax
, I figure knowing which number is greater should enable you to say something about the maximum, or at least they should be related, somehow. I needed it for something I was working on.