Definition close_tm_rec_erase_tm := fun x => proj1 (close_tm_erase_all x).
Definition close_co_rec_erase_tm := fun x => proj1 (close_co_erase_all x).

(* Specifications: *)
Lemma close_tm_erase_tm
: ∀ (x : tmvar) (a : tm), close_tm x (erase a) = erase (close_tm x a).
Lemma close_co_erase_tm
: ∀ (x : covar) (a : tm), close_co x (erase a) = erase (close_co x a).
(* This proof method is cool, but it is hard to extract the result in a way we can use  (* TODO: with an approriate mutual induction tactic, could be proved only with a : tm + brs + co + constraint *)
Lemma close_tmco_erase_all : ∀ (x : tmvar + covar),
(∀ (a : tm)         k, close_wrt k x (erase a) = erase (close_wrt k x a)) /\
(∀ (b : brs)        k, close_wrt k x (erase b) = erase (close_wrt k x b)) /\
(∀ _ : co, True) /\
(∀ (c : constraint) k, close_wrt k x (erase c) = erase (close_wrt k x c)).