(** ** Procedural realisation of enumeration *)
(** ** Some list procedures *)
Variable X : Type.
Variable enc : X -> term.
Hypothesis enc_proc : (forall x, proc (enc x)).
Fixpoint lenc (A : list X) :=
match A with
| nil => lambda (lambda 1)
| a::A => lambda(lambda (0 (enc a) (lenc A)))
end.
Definition Nil : term := .\ "n", "c"; "n".
Definition Cons: term := .\ "a", "A", "n", "c"; "c" "a" "A".

Lemma lenc_proc A : proc (lenc A).
Hint Resolve lenc_proc : cbv.