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
open import Data.Nat using (ℕ; zero; suc) | |
open import Data.Bool using (Bool; true; false) | |
open import Relation.Binary.PropositionalEquality using (_≡_; refl) | |
_=ℕ_ : ℕ → ℕ → Bool | |
0 =ℕ 0 = true | |
suc x =ℕ suc y = x =ℕ y | |
_ =ℕ _ = false | |
=ℕ-to-≡ : ∀ {x y : ℕ} → x =ℕ y ≡ true → x ≡ y |
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
data _⊢_ : Cx → Form → Set where | |
ID : ∀ {Γ A} → A ∈ Γ | |
→ Γ ⊢ A | |
MP : ∀ {Γ A B} → Γ ⊢ A ⇒ B → Γ ⊢ A | |
→ Γ ⊢ B | |
AB : ∀ {Γ A B C} → Γ ⊢ (B ⇒ C) ⇒ (A ⇒ B) ⇒ (A ⇒ C) | |
AC : ∀ {Γ A B C} → Γ ⊢ (A ⇒ (B ⇒ C)) ⇒ B ⇒ (A ⇒ C) | |
AI : ∀ {Γ A} → Γ ⊢ A ⇒ A |
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
record Valuation : Set₁ where | |
field | |
_⊩ᵃ_ : Cx → Atom → Set | |
mono⊩ᵃ : ∀ {Γ Γ' a} → Γ ⊆ Γ' → Γ ⊩ᵃ a → Γ' ⊩ᵃ a | |
open Valuation {{…}} public | |
module _ {{V : Valuation}} where | |
_⊩_ : Cx → Form → Set | |
Γ ⊩ var x = Γ ⊩ᵃ x | |
Γ ⊩ (f₁ ⇒ f₂) = ∀ {Γ'} → Γ ⊆ Γ' → (Γ' ⊩ f₁) → (Γ' ⊩ f₂) |
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
data _⊢_ : Cx → Form → Set where | |
ID : ∀ {Γ A} → A ∈ Γ | |
→ Γ ⊢ A | |
MP : ∀ {Γ A B} → Γ ⊢ A ⇒ B → Γ ⊢ A | |
→ Γ ⊢ B | |
DT : ∀ {Γ A B} → Γ , A ⊢ B | |
→ Γ ⊢ A ⇒ B | |
AB : ∀ {Γ A B C} → Γ ⊢ (B ⇒ C) ⇒ (A ⇒ B) ⇒ (A ⇒ C) | |
AC : ∀ {Γ A B C} → Γ ⊢ (A ⇒ (B ⇒ C)) ⇒ B ⇒ (A ⇒ C) | |
AI : ∀ {Γ A} → Γ ⊢ A ⇒ A |
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
data ★ : Set where | |
ι : ★ | |
_⊳_ : ★ → ★ → ★ | |
infixr 15 _⊳_ | |
data Term : Set where | |
var : Atom → Term | |
ƛ_↦_ : Atom → Term → Term | |
_⋅_ : Term → Term → Term | |
infix 7 ƛ_↦_ |
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 STLC where | |
open import Data.Empty using (⊥) public | |
open import Data.Unit using (⊤) renaming (tt to •) public | |
open import Function using () renaming (_∘′_ to _∘_) public | |
open import Data.Product using (_×_) renaming (_,_ to ⟨_,_⟩; proj₁ to π₁; proj₂ to π₂) public | |
open import Data.Nat using (ℕ) renaming (_≟_ to _≟ₙ_) | |
open import Data.Bool using (Bool; true; false; if_then_else_; not) renaming (_∧_ to _and_; _∨_ to _or_) public | |
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; cong₂) public | |
open import Relation.Nullary using (Dec; yes; no; ¬_) public |
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
-- BCI "linear" typed combinator calculus. | |
data ★ : Set where | |
ι : ★ | |
_⊳_ : ★ → ★ → ★ | |
infixr 10 _⊳_ | |
data List (A : Set) : Set where | |
∅ : List A | |
_,_ : List A → A → List A |
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 IPC.ToSTLC where | |
open import Common | |
open import IPC | |
open import STLC | |
-- Translation from structural IPC to STLC for open terms. | |
transl : ∀ {Γ α} → Γ ⊢ⁱ α → Γ ⊢ˢ α | |
transl assumpⁱ = var zero |
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 test1 where | |
open import Relation.Binary.PropositionalEquality using (_≡_; refl; sym; trans; cong₂) public | |
data List (A : Set) : Set where | |
∅ : List A | |
_,_ : List A → A → List A | |
infixl 10 _,_ | |
data _⊆_ {A} : List A → List A → Set where |
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 BCI.Hilbert.Definition where | |
open import Common | |
-- A tree variant of a Hilbert-style proof system with "BCI" as axioms. | |
data Form : Set where | |
var : Atom → Form | |
_⇒_ : Form → Form → Form | |
infixr 10 _⇒_ |