Start working on exercise sheet 4

amethyst
Shad Amethyst 8 months ago
parent d477a0e565
commit 3be5b55cae

@ -14,17 +14,26 @@ Module dbterm.
.
(** Formalize substitutions and renamings as functions. *)
Definition subt := nat expr.
Definition rent := nat nat.
Definition sub_t := nat expr.
Definition ren_t := nat nat.
Implicit Types
(σ : subt)
(δ : rent)
(σ : sub_t)
(δ : ren_t)
(n x : nat)
(e : expr).
Fixpoint subst σ e :=
(* FIXME *) e.
match e with
| Lit l => Lit l
| Var i => σ i
| Lam e => Lam (subst (λ n, match n with
| 0 => Var 0
| S n => σ n
))
| Plus e1 e2 => Plus (subst σ a) (subst σ b)
| App e_fn e_arg =>
end.

Loading…
Cancel
Save