(* The "backpatching" fixpoint combinator, AKA Landin's knot. *)
Definition refY :=
Lam (e_let (New (Lam diverge))
(Update (Var 0) (Lam (App (App (Var 2) (Deref (Var 1))) (Var 0))) (Deref (Var 0)) )).

Lemma refY_typ : forall A B,
Typ nil refY (ty_lam (ty_lam (ty_lam A B) (ty_lam A B)) (ty_lam A B)).