Last active
December 13, 2015 23:49
-
-
Save david-christiansen/4994631 to your computer and use it in GitHub Desktop.
Simple predicate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module PropDemo | |
data GreaterThanTwo : Nat -> Type where | |
threeOK : GreaterThanTwo 3 | |
moreOK : GreaterThanTwo n -> GreaterThanTwo (S n) | |
total sumGreater : GreaterThanTwo n -> GreaterThanTwo m -> GreaterThanTwo (n + m) | |
sumGreater threeOK mOK = moreOK (moreOK (moreOK mOK)) | |
sumGreater (moreOK nOK') mOK = moreOK (sumGreater nOK' mOK) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is a simple proof shown in an impromptu IRC tutorial session on dependent types and representing predicates.