(** [sign_ext n x] is the unique integer congruent to [x] modulo [2^n] in the range [-2^(n-1)...2^(n-1) - 1]. *)

(* Specifications: *)
Lemma sign_ext_range:
forall n x, 0 < n < zwordsize -> -two_p (n-1) <= signed (sign_ext n x) < two_p (n-1).
Lemma eqmod_sign_ext':
forall n x, 0 < n < zwordsize ->
eqmod (two_p n) (unsigned (sign_ext n x)) (unsigned x).
Lemma eqmod_sign_ext:
forall n x, 0 < n < zwordsize ->
eqmod (two_p n) (signed (sign_ext n x)) (unsigned x).