(* ----- preservation of erasure under substitution ---------- *)

Theorem erase_subst_mutual a x :
(∀ A B,       erase_tm A = erase_tm B ->
erase_tm (tm_subst_tm_tm a x A) = erase_tm (tm_subst_tm_tm a x B))
∧
(∀ Bs1 Bs2,   erase_brs Bs1 = erase_brs Bs2 ->
erase_brs (tm_subst_tm_brs a x Bs1) =
erase_brs (tm_subst_tm_brs a x Bs2))
∧
(∀ g1 g2 : co, True)
∧
(∀ phi1 phi2, erase_constraint phi1 = erase_constraint phi2 ->
erase_constraint (tm_subst_tm_constraint a x phi1) =
erase_constraint (tm_subst_tm_constraint a x phi2)).