Hint Rewrite bits_zero bits_mone : ints.
Ltac bit_solve :=
intros; apply same_bits_eq; intros; autorewrite with ints; auto with bool.

(* Specifications: *)
Lemma sign_bit_of_unsigned:
forall x, testbit x (zwordsize - 1) = if zlt (unsigned x) half_modulus then false else true.
Lemma bits_signed:
forall x i, 0 <= i ->
Z.testbit (signed x) i = testbit x (if zlt i zwordsize then i else zwordsize - 1).
Lemma bits_le:
forall x y,
(forall i, 0 <= i < zwordsize -> testbit x i = true -> testbit y i = true) ->
unsigned x <= unsigned y.
Lemma sign_bit_of_unsigned:
forall x, testbit x (zwordsize - 1) = if zlt (unsigned x) half_modulus then false else true.
Lemma bits_signed:
forall x i, 0 <= i ->
Z.testbit (signed x) i = testbit x (if zlt i zwordsize then i else zwordsize - 1).
Lemma bits_le:
forall x y,
(forall i, 0 <= i < zwordsize -> testbit x i = true -> testbit y i = true) ->
unsigned x <= unsigned y.