equal
deleted
inserted
replaced
1409 done |
1409 done |
1410 |
1410 |
1411 lemma push_bit_minus_numeral [simp]: |
1411 lemma push_bit_minus_numeral [simp]: |
1412 \<open>push_bit (numeral l) (- numeral k) = push_bit (pred_numeral l) (- numeral (Num.Bit0 k))\<close> |
1412 \<open>push_bit (numeral l) (- numeral k) = push_bit (pred_numeral l) (- numeral (Num.Bit0 k))\<close> |
1413 by (simp only: numeral_eq_Suc push_bit_Suc_minus_numeral) |
1413 by (simp only: numeral_eq_Suc push_bit_Suc_minus_numeral) |
|
1414 |
|
1415 lemma take_bit_Suc_1: |
|
1416 \<open>take_bit (Suc n) (- 1) = 2 ^ Suc n - 1\<close> |
|
1417 by (simp add: take_bit_minus_one_eq_mask mask_eq_exp_minus_1) |
|
1418 |
|
1419 lemma take_bit_numeral_1 [simp]: |
|
1420 \<open>take_bit (numeral k) (- 1) = 2 ^ numeral k - 1\<close> |
|
1421 by (simp add: take_bit_minus_one_eq_mask mask_eq_exp_minus_1) |
1414 |
1422 |
1415 end |
1423 end |
1416 |
1424 |
1417 |
1425 |
1418 subsection \<open>Instance \<^typ>\<open>int\<close>\<close> |
1426 subsection \<open>Instance \<^typ>\<open>int\<close>\<close> |