Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions theories/Numbers/Natural/Abstract/NBits.v
Original file line number Diff line number Diff line change
Expand Up @@ -1312,6 +1312,13 @@ Proof.
- now rewrite ones_spec_low, mod_pow2_bits_low, andb_true_r.
Qed.

Lemma testbit_false_mod_pow2 :
forall a n j, testbit a n = false -> testbit (a mod 2 ^ j) n = false.
Proof.
intros a n j H. rewrite <- land_ones. rewrite land_spec.
rewrite H. rewrite Bool.andb_false_l. reflexivity.
Qed.

Lemma land_ones_low : forall a n, log2 a < n ->
land a (ones n) == a.
Proof.
Expand Down
Loading