(* --------------------------------------------------------------------- *)
(* This is the place for "smart constructors" and "smart inversion" lemmas. They are especialy useful for constructing derivations from a particular variable and avoiding the co-finite quantification stuff.  *)
(* In a locally nameless development, these should be stated and immediately proven after substitution. *)

Lemma An_CAbs_exists :  ∀ c (G : context) (phi : constraint) (a B : tm),
c \notin dom G \u fv_co_co_tm a \u fv_co_co_tm B
->  AnnPropWff G phi
→ AnnTyping ([(c, Co phi)] ++ G) (open_tm_wrt_co a (g_Var_f c))
(open_tm_wrt_co B (g_Var_f c))
→ AnnTyping G (a_CAbs phi a) (a_CPi phi B).