(** ** Extra properties about [testbit] *)

(* Specifications: *)
Lemma testbit_of_N a n :
testbit (of_N a) (of_N n) = N.testbit a n.
Lemma testbit_of_N' a n : 0<=n ->
testbit (of_N a) n = N.testbit a (to_N n).
Lemma testbit_Zpos a n : 0<=n ->
testbit (pos a) n = N.testbit (N.pos a) (to_N n).
Lemma testbit_Zneg a n : 0<=n ->
testbit (neg a) n = negb (N.testbit (Pos.pred_N a) (to_N n)).