Definition weight_typenv (e: typenv) : nat := length e.(te_equ).Definition typassign := positive -> T.t.

Lemma solve_rec_complete: forall te q e changed, satisf te e -> (forall r1 r2, In (r1, r2) q -> te r1 = te r2) -> exists e' changed', solve_rec e changed q = OK(e', changed') /\ satisf te e'.