{-# OPTIONS --rewriting #-}
module A201706.ILPSyntaxTerms where
open import A201706.ILP public
Cx : Nat → Nat → Set
Cx d g = BoxTy⋆ d ∧ Ty⋆ g
infix 3 _⊢_∷_
data _⊢_∷_ {d g} : Cx d g → Tm d g → Ty → Set where
var : ∀ {Δ Γ i A} →
Γ ∋⟨ i ⟩ A →
Δ ⁏ Γ ⊢ VAR i ∷ A
mvar : ∀ {Δ Γ i} {Q : Tm d zero} {A} →
Δ ∋⟨ i ⟩ [ Q ] A →
Δ ⁏ Γ ⊢ MVAR i ∷ A
lam : ∀ {Δ Γ M A B} →
Δ ⁏ Γ , A ⊢ M ∷ B →
Δ ⁏ Γ ⊢ LAM M ∷ A ⇒ B
app : ∀ {Δ Γ M N A B} →
Δ ⁏ Γ ⊢ M ∷ A ⇒ B → Δ ⁏ Γ ⊢ N ∷ A →
Δ ⁏ Γ ⊢ APP M N ∷ B
box : ∀ {Δ Γ M A} →
Δ ⁏ ∅ ⊢ M ∷ A →
Δ ⁏ Γ ⊢ BOX M ∷ [ M ] A
unbox : ∀ {Δ Γ M N} {Q : Tm d zero} {A C} →
Δ ⁏ Γ ⊢ M ∷ [ Q ] A → Δ , [ Q ] A ⁏ Γ ⊢ N ∷ C →
Δ ⁏ Γ ⊢ UNBOX M N ∷ C