Definition weight_typenv (e: typenv) : nat :=
  weight_constraints e.(te_typ) e.(te_sub).Definition typassign := positive -> T.t.

Lemma type_move_complete: forall te e r1 r2, satisf te e -> T.sub (te r1) (te r2) -> exists changed e', type_move e r1 r2 = OK(changed, e') /\ satisf te e'.