Module unique := fc_unique wf subst.
Set Bullet Behavior "Strict Subproofs".
Set Implicit Arguments.
(* ------------------------------------------------------------- *)
(* -------------------------------------------------------------- *)
(*  Interlude: some lemmas about how erasure and typing interact. *)
(* -------------------------------------------------------------- *)

Lemma erase_pi : forall G AB0 rho A B S, erase AB0 = (a_Pi rho A B) -> AnnTyping G AB0 S ->
exists A1 B0, erase AB0 = erase (a_Pi rho A1 B0) /\ erase A1 = A /\ erase B0 = B /\ AnnTyping G (a_Pi rho A1 B0) a_Star.