simplified-comb.agda 613 B

12345678910111213141516171819202122
  1. module simplified-comb where
  2. infixr 50 _⟶_
  3. data Ty : Set where
  4. ι : Ty
  5. _⟶_ : Ty -> Ty -> Ty
  6. data Tm : Ty -> Set where
  7. _$_ : {σ τ : Ty} -> Tm (σ ⟶ τ) -> Tm σ -> Tm τ
  8. data Nf : Ty -> Set where
  9. data _↓_ : {σ : Ty} -> Tm σ -> Nf σ -> Set where
  10. r$ : {σ τ : Ty} -> {t : Tm (σ ⟶ τ)} -> {f : Nf (σ ⟶ τ)} -> t ↓ f ->
  11. {u : Tm σ} -> {a : Nf σ} -> u ↓ a -> {v : Nf τ} ->
  12. (t $ u ) ↓ v
  13. nf* : {σ : Ty} -> (t : Tm σ) -> {n : Nf σ} -> t ↓ n -> Set
  14. nf* .{τ} (_$_ {σ} {τ} t u) {v} (r$ {f = f} p q) with nf* {σ ⟶ τ} t {f} p
  15. nf* (t $ u) (r$ p q) | _ = Ty