Module erasem := erase wf weak subst ext_invert.
Set Bullet Behavior "Strict Subproofs".
Set Implicit Arguments.
(* ------------------------------------------------------------- *)

Lemma an_congruence :
forall G a A, AnnTyping G a A ->
forall G1 x A1 g a1 a2 D,
G = [(x, Tm A1)] ++ G1 ->
AnnTyping G1 a1 A1 ->
AnnTyping G1 a2 A1 ->
AnnDefEq G1 D g a1 a2 ->
exists g', AnnDefEq G1 D g'
(tm_subst_tm_tm a1 x a) (tm_subst_tm_tm a2 x a).