Last active
May 2, 2017 06:08
-
-
Save hatashiro/699b4947694961a78a49836196f87e09 to your computer and use it in GitHub Desktop.
A proof of '∀ k ∈ Z: 1 + k > k' in Idris
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 | |
%hide (>) | |
data (>) : (a : Nat) -> (b : Nat) -> Type where | |
ZeroCase : 1 + a > 0 | |
OtherCase : a > b -> 1 + a > 1 + b | |
s_k_lt_k_proof : {k : Nat} -> 1 + k > k | |
s_k_lt_k_proof {k=Z} = ZeroCase | |
s_k_lt_k_proof {k=S _} = OtherCase s_k_lt_k_proof |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Reference (actually quite the same code): https://github.com/idris-lang/Idris-dev/blob/master/libs/prelude/Prelude/Nat.idr