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_inj o1 o2 : oenc o1 ≡ oenc o2 -> o1 = o2.