Module pres := fc_preservation wf weak subst e_subst.
(* Why does this cause so many messages? *)
Hint Resolve erased_tm_erase : erased.
Definition AnnGood G D := Good (erase_context G) D.
unfold AnnGood. simpl. unfold Good. unfold erased_context.
split. auto.
intros.
unfold binds in H. inversion H.
Qed.
(* --------- Paths infect the cannonical forms lemmas for functions --------- *)
Definition irrelevant G D (a : tm) :=
(forall x A, binds x (Tm A) G -> x `notin` fv_tm (erase a)) /\ AnnGood G D.
(* ------------------------------------- *)
(* This is proved in the preservation file. Lemma reduction_erasure : forall G a a', head_reduction G a a' -> reduction_in_one (erase a) (erase a') \/ erase a = erase a'. *)
(* ------------------------------------- *)
Inductive multi (rel : tm -> tm -> Prop) : tm -> tm -> Prop :=
| multi_refl : forall a, lc_tm a -> multi rel a a
| multi_step : forall a b c, rel a b -> multi rel b c -> multi rel a c.
(* ------------------------------------- *)

Lemma multi_An_AbsTerm_exists : ∀ (G : list (atom * sort)) (x : atom) (A a a' : tm),
x `notin` union (fv_tm a) (union (fv_tm a') (dom G))
→ AnnTyping G A a_Star
→ multi (head_reduction ([(x, Tm A)] ++ G)) (open_tm_wrt_tm a (a_Var_f x))
(open_tm_wrt_tm a' (a_Var_f x))
→ multi (head_reduction G) (a_Abs Irrel A a) (a_Abs Irrel A a').