Library Nat
Fixpoint enc (n : nat) :=
lam(lam
match n with
| 0 ⇒ # 1
| S n ⇒ # 0 (enc n)
end).
Lemma enc_lam m :
lambda (enc m).
Lemma enc_cls m :
closed (enc m).
Lemma enc_proc m :
proc (enc m).
*Procedures representing zero and the successor-function
Definition Zero : term := .\"z","s"; "z".
Definition Succ : term := .\"n","z","s"; "s" "n".
Lemma Succ_correct n : Succ (enc n) == enc (S n).
Definition Pred : term := .\"n"; "n" !Zero (.\"n"; "n").
Lemma Pred_correct n : Pred (enc n) == enc (pred n).