(* -----  inversion lemmas for some typing judgments (with maximal co-finite quantification) ----------- *)

Axiom An_Abs_inversion :
∀ (G:context) rho (a:tm) A A1,
AnnTyping G (a_Abs rho A a) A1 ->
(exists B, A1 = a_Pi rho A B /\
AnnTyping G A a_Star /\
∀ x, x \notin dom G ->
RhoCheck rho x (erase_tm (open_tm_wrt_tm a (a_Var_f x))) /\
AnnTyping (( x ~ Tm  A) ++ G)
(open_tm_wrt_tm a (a_Var_f x))
(open_tm_wrt_tm B (a_Var_f x))).