proposition: Lemma testbit_ones n i (H : 0 <= n) : testbit (ones n) i = ((0 <=? i) && (i <? n))%bool.
proof: Proof. destruct (leb_spec 0 i), (ltb_spec i n); cbn; rewrite ?testbit_neg_r, ?ones_spec_low, ?ones_spec_high by auto; trivial. Qed.
imports: BinNums BinPos Pnat BinNat Bool Equalities GenericMinMax OrdersFacts ZAxioms ZProperties DecidableClass