(* -------------------------------------------------------------- *)
(*  Interlude: some lemmas about how erasure and typing interact. *)
(* -------------------------------------------------------------- *)

Lemma erase_cpi : forall AB0 A B G S,
erase AB0 = (a_CPi A B) -> AnnTyping G AB0 S ->
exists A1 B0, erase AB0 = erase (a_CPi A1 B0) /\ erase_constraint A1 = A /\ erase B0 = B
/\ AnnTyping G (a_CPi A1 B0) a_Star.