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

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