Skip to content

Instantly share code, notes, and snippets.

@k-bx
Last active January 13, 2019 09:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save k-bx/12b11086b8441682caac983b7fff2934 to your computer and use it in GitHub Desktop.
Save k-bx/12b11086b8441682caac983b7fff2934 to your computer and use it in GitHub Desktop.
module curryhoward where
-- https://queuea9.wordpress.com/2018/10/17/why-i-no-longer-believe-in-computational-classical-type-theory/
data Absurd =
data Either (A : U) (B : U) = Left (a : A)
| Right (b : B)
-- law of excluded middle
lem (A : U) : U
= Either A (A -> Absurd)
data bool = true | false
usefulFunc (A : U) : (l : lem A) -> bool = split
Left a -> true
Right aToAbsurd -> false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment