Module congruence
(ext_weak : ext_weak_sig)
(wf : fc_wf_sig)
(weak : fc_weak_sig)
(subst : fc_subst_sig)
(ext_invert : ext_invert_sig).
Module unique := fc_unique wf subst.
Module invert := fc_invert wf weak subst.
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).