Definition Lt : term := .\ "m", "n"; !Leb (!Succ "m") "n".

(* Specifications: *)
Lemma Lt_correct n k : Lt (enc n) (enc k) ≡ benc (Nat.ltb n k).
Definition Bound := Eval cbn in
rho (.\ "d", "k", "t";
"t" (.\ "n"; !Lt "n" "k")
(.\ "s", "t"; ("d" "k" "s") ("d" "k" "t") !F)
(.\ "s"; "d" (!Succ "k") "s")).
Lemma Bound_correct k s : Bound (enc k) (tenc s) ≡ benc (bound k s).
Definition Closed := Bound (enc 0).
Lemma decidable_closed : decidable closed.
Definition Lambda := lambda (0 (lambda F) (lambda (lambda F)) (lambda T)).