PCF.Terms
\begin{code}
module PCF.Terms where
open import PCF.Types
using (Types; _⇒_; σ; 𝒟)
open import PCF.Constants
using (ℒ; 𝒜⟦_⟧; c)
open import PCF.Variables
using (𝒱; Env; _⟦_⟧)
open import PCF.Environments
using (_[_/_])
data Terms : Types → Set where
𝑉 : {σ : Types} → 𝒱 σ → Terms σ
𝐿 : {σ : Types} → ℒ σ → Terms σ
_␣_ : {σ τ : Types} → Terms (σ ⇒ τ) → Terms σ → Terms τ
ƛ_␣_ : {σ τ : Types} → 𝒱 σ → Terms τ → Terms (σ ⇒ τ)
variable M N : Terms σ
infixl 20 _␣_
𝒜′⟦_⟧ : Terms σ → Env → 𝒟 σ
𝒜′⟦ 𝑉 α ⟧ ρ = ρ ⟦ α ⟧
𝒜′⟦ 𝐿 c ⟧ ρ = 𝒜⟦ c ⟧
𝒜′⟦ M ␣ N ⟧ ρ = 𝒜′⟦ M ⟧ ρ (𝒜′⟦ N ⟧ ρ)
𝒜′⟦ ƛ α ␣ M ⟧ ρ = λ x → 𝒜′⟦ M ⟧ (ρ [ x / α ])
\end{code}