Skip to content

Instantly share code, notes, and snippets.

@mietek
Last active August 29, 2015 08:00
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 mietek/630ea60b0f2dedaeec2e to your computer and use it in GitHub Desktop.
Save mietek/630ea60b0f2dedaeec2e to your computer and use it in GitHub Desktop.
{-
A Hilbert presentation of minimal implication logic (⊃Hm), or simply-typed λ-calculus (λ⊃).
Basic proof theory
A.S. Troelstra, H. Schwichtenberg, 2000
-}
module IHm
infixr 5 >>
syntax "!-" [a] = Theorem a
data Formula : Type where
(>>) : Formula -> Formula -> Formula
data Theorem : Formula -> Type where
MP : Theorem (a >> b) -> Theorem a
-> Theorem b
K : Theorem (a >> b >> a)
S : Theorem ((a >> b >> c) >> (a >> b) >> a >> c)
I : !- a >> a
I {a} = MP (MP (S {b = a >> a})
K)
K
I' : !- a >> a
I' = MP (MP f K)
K
where
f : Theorem ((a >> (a >> a) >> a) >> (a >> a >> a) >> a >> a)
f = S
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment