(** ** Properties of [Z_one_bits] and [is_power2]. *)
Fixpoint powerserie (l: list Z): Z :=
match l with
| nil => 0
| x :: xs => two_p x + powerserie xs
end.

Lemma Z_one_bits_range:
forall x i, In i (Z_one_bits wordsize x 0) -> 0 <= i < zwordsize.