Definition L_term := rho (.\ "L", "n";
"n" !Nil (.\ "n"; !Append ("L" "n") (!Cons (!Var "n") (!Append (!Map_pro !App ("L" "n") ("L" "n")) (!Map !Lam ("L" "n")))))).

(* Specifications: *)
Lemma L_term_correct n : L_term (enc n) ≡ lenc tenc (L n).
Definition OfNat : term := .\ "n" ; !Nth "n" (!L_term (!Succ ("n"))).
Lemma OfNat_correct n : OfNat (enc n) ≡ oenc (R n).
Lemma enumerable_all : enumerable (fun s => True).
(** ** Recognisable classes are enumerable *)
Theorem recognisable_enumerable p : recognisable p -> enumerable p.
Lemma recognisable_range_total f u : proc u -> (forall n, u (enc n) ▷ tenc (f n)) -> recognisable (fun t => exists n, f n = t).