Created
August 9, 2015 21:11
-
-
Save hnsl/2ec70a739cadb2af9583 to your computer and use it in GitHub Desktop.
hello world with proofs
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 Main | |
total | |
minusS : (n : Nat) -> (m : Nat) -> LTE m n -> Nat | |
minusS n m x = n - m | |
total | |
decNat : Nat -> Nat | |
decNat k with (isLTE 1 k) | |
decNat k | (Yes prf) = minusS k 1 prf | |
decNat k | (No contra) = 0 | |
main : IO () | |
main = putStrLn $ "Hello world " ++ (show . decNat $ 4) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment