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/ea43625cbff9096595d6 to your computer and use it in GitHub Desktop.
Save mietek/ea43625cbff9096595d6 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 where
infixr 5 _⊃_
infixr 3 ⊢_
data Formula : Set where
_⊃_ : Formula → Formula → Formula
data ⊢_ : Formula → Set where
MP : ∀ {A B} → ⊢ A ⊃ B → ⊢ A
→ ⊢ B
K : ∀ {A B} → ⊢ A ⊃ B ⊃ A
S : ∀ {A B C} → ⊢ (A ⊃ B ⊃ C) ⊃ (A ⊃ B) ⊃ A ⊃ C
I : ∀ {A} → ⊢ A ⊃ A
I {A = A} = MP (MP (S {B = A ⊃ A})
K)
K
I : ∀ {A} → ⊢ A ⊃ A
I = MP (MP f K)
K
where
f : ∀ {A} → ⊢ (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