Require Export FcEtt.ett_inf_cs.
Require Export FcEtt.ett_ind.
Set Implicit Arguments.
Set Bullet Behavior "Strict Subproofs".
(* Syntactic properties about the erasure operation. TODO: add these to a hint database? -------------------------------------------------  erase (open t u) = open (erase t) (erase u)  erase (open_co t g) = erase t erase (open_co t g) = open_co (erase t) g  x notin fv t -> x notin fv (erase t)  erase (close x t) = close x (erase t)  erase (subst x u t) = subst x (erase u) (erase t)  lc u -> lc (erase u)  dom G = dom (erase_context G)  *)
(* ----- open ---------- *)
(* In general: erase (open t u) = open (erase t) (erase u) *)

(* Specifications: *)
Lemma open_tm_erase_rec : forall a,
(forall b k, open_tm_wrt_tm_rec k (erase a) (erase b) =
erase (open_tm_wrt_tm_rec k a b)) /\
(forall b k, open_brs_wrt_tm_rec k (erase a) (erase b) =
erase (open_brs_wrt_tm_rec k a b)) /\
(forall g:co, True) /\
(forall b k, open_constraint_wrt_tm_rec k (erase a) (erase b) =
erase (open_constraint_wrt_tm_rec k a b)).
Lemma open_tm_erase_tm : forall a b,
open_tm_wrt_tm (erase a) (erase b) =
erase (open_tm_wrt_tm a b).
Lemma open_co_erase_rec : forall a,
(forall b k, (erase b) =
erase (open_tm_wrt_co_rec k a b)) /\
(forall b k, (erase b) =
erase (open_brs_wrt_co_rec k a b)) /\
(forall g:co, True) /\
(forall b k, (erase b) =
erase (open_constraint_wrt_co_rec k a b)).
Lemma open_co_erase_tm : forall a b,
(erase b) = erase (open_tm_wrt_co b a).
Lemma open_co_erase2_rec : forall a,
(forall b k g, (open_tm_wrt_co_rec k g (erase b)) =
erase (open_tm_wrt_co_rec k a b)) /\
(forall b k g, (open_brs_wrt_co_rec k g (erase b)) =
erase (open_brs_wrt_co_rec k a b)) /\
(forall g:co, True) /\
(forall b k g, (open_constraint_wrt_co_rec k g (erase b)) =
erase (open_constraint_wrt_co_rec k a b)).
Lemma open_co_erase_tm2 : forall a b g,
(open_tm_wrt_co (erase b) g) = erase (open_tm_wrt_co b a).
Corollary no_co_in_erased_tm : forall B g,
open_tm_wrt_co (erase B) g = erase B.