(*************************************************************************)
(** * Regularity                                                         *)
(*************************************************************************)
(** To be fully confident about the exist-fresh rules, we can show their "regularity" --- that these relations only include locally closed terms. (For the exists-fresh definition of local closure.) *)

(** Take-home exercise.  To prove that ill-formed terms cannot be typechecked, we will need an auxiliary lemma that says that each term only has a single type.  HINT: to prove this lemma you will need to generalize the induction hypothesis for T2 and use the lemma [binds_unique] from [AtomEnv.v]. *)
Lemma typing_c_unique : forall E e T1 T2,
typing_c E e T1 ->
typing_c E e T2 ->
T1 = T2.