From Undecidability.L Require Export L Encodings Interpreter Choose.
(** * Results obtained with self-interpreters *)
(** ** Step-indexed self-interpreter *)
(** *** Encoding of options *)
Definition none : term := .\"s", "n"; "n".
Definition some : term := .\"t", "s", "n"; "s" "t".
Hint Unfold some none : cbv.
Definition oenc t :=
match t with
| Some t => lambda(lambda (1 (tenc t)))
| None => none
end.

Lemma oenc_lambda s: lam (oenc s).
Hint Resolve oenc_cls oenc_lambda: cbv.