Definition R n := nth n (L (S n)).
Fixpoint beta s :=
match s with
| var n => S n
| app s t => S (beta s + beta t)
| lambda s => S (beta s)
end.

(* Specifications: *)
Lemma L_el s m n : s el L m -> m <= n -> s el L n.
Lemma L_beta s : s el L (beta s).
Lemma R_surjective s : exists n, R n = Some s.
Section Fix_X.