(* ---------------------------------------------- *)

Lemma An_Pi_exists2
: ∀ (x : atom) (G : list (atom * sort)) (rho : relflag) (A B : tm),
x `notin` union (dom G) (fv_tm_tm_tm B)
→ AnnTyping ([(x, Tm A)] ++ G) (open_tm_wrt_tm B (a_Var_f x)) a_Star
→ AnnTyping G (a_Pi rho A B) a_Star.