Hint Rewrite bits_zero_ext bits_sign_ext: ints.

(* Specifications: *)
Theorem zero_ext_above:
forall n x, n >= zwordsize -> zero_ext n x = x.
Theorem sign_ext_above:
forall n x, n >= zwordsize -> sign_ext n x = x.
Theorem zero_ext_and:
forall n x, 0 <= n -> zero_ext n x = and x (repr (two_p n - 1)).
Theorem zero_ext_mod:
forall n x, 0 <= n < zwordsize ->
unsigned (zero_ext n x) = Z.modulo (unsigned x) (two_p n).
Theorem zero_ext_widen:
forall x n n', 0 <= n <= n' ->
zero_ext n' (zero_ext n x) = zero_ext n x.
Theorem sign_ext_widen:
forall x n n', 0 < n  <= n' ->
sign_ext n' (sign_ext n x) = sign_ext n x.
Theorem sign_zero_ext_widen:
forall x n n', 0 <= n < n' ->
sign_ext n' (zero_ext n x) = zero_ext n x.
Theorem zero_ext_narrow:
forall x n n', 0 <= n <= n' ->
zero_ext n (zero_ext n' x) = zero_ext n x.
Theorem sign_ext_narrow:
forall x n n', 0 < n <= n' ->
sign_ext n (sign_ext n' x) = sign_ext n x.
Theorem zero_sign_ext_narrow:
forall x n n', 0 < n <= n' ->
zero_ext n (sign_ext n' x) = zero_ext n x.
Theorem zero_ext_idem:
forall n x, 0 <= n -> zero_ext n (zero_ext n x) = zero_ext n x.
Theorem sign_ext_idem:
forall n x, 0 < n -> sign_ext n (sign_ext n x) = sign_ext n x.
Theorem sign_ext_zero_ext:
forall n x, 0 < n -> sign_ext n (zero_ext n x) = sign_ext n x.
Theorem zero_ext_sign_ext:
forall n x, 0 < n -> zero_ext n (sign_ext n x) = zero_ext n x.
Theorem sign_ext_equal_if_zero_equal:
forall n x y, 0 < n ->
zero_ext n x = zero_ext n y ->
sign_ext n x = sign_ext n y.
Theorem zero_ext_shru_shl:
forall n x,
0 < n < zwordsize ->
let y := repr (zwordsize - n) in
zero_ext n x = shru (shl x y) y.
Theorem sign_ext_shr_shl:
forall n x,
0 < n < zwordsize ->
let y := repr (zwordsize - n) in
sign_ext n x = shr (shl x y) y.