# Abstract Syntax
The following abstract syntax of well-formed PCF terms in Agda uses indexed datatype definitions.
PCF function types $\sigma \to \tau$ are written `σ ⇒ τ`, and variables $\alpha_i^\sigma$ are written `α i σ`
(where the argument `i` merely distinguishes between variables – it is *not* a De Bruin index).
```agda
{-# OPTIONS --rewriting --confluence-check --lossy-unification #-}
module Examples.PCF.Abstract-Syntax where
open import Notation
data Types : Set where
ι : Types
o : Types
_⇒_ : Types → Types → Types
infixr 1 _⇒_
variable σ τ : Types
open import Agda.Builtin.Nat public using (Nat)
data Vars : Types → Set where
α : Nat → (σ : Types) → Vars σ
variable i : Nat
data ℒᴬ : Types → Set where
tt : ℒᴬ o
ff : ℒᴬ o
⊃ : ℒᴬ (o ⇒ σ ⇒ σ ⇒ σ)
Y : ℒᴬ ((σ ⇒ σ) ⇒ σ)
k : Nat → ℒᴬ ι
⦅+1⦆ : ℒᴬ (ι ⇒ ι)
⦅−1⦆ : ℒᴬ (ι ⇒ ι)
Z : ℒᴬ (ι ⇒ o)
variable c : ℒᴬ σ
data Terms : Types → Set where
𝑉_ : Vars σ → Terms σ
𝐿_ : ℒᴬ σ → Terms σ
⦅_␣_⦆ : Terms (σ ⇒ τ) → Terms σ → Terms τ
⦅λ_␣_⦆ : Vars σ → Terms τ → Terms (σ ⇒ τ)
variable M N : Terms σ
```