-
Notifications
You must be signed in to change notification settings - Fork 453
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add Bitvec reverse
definition, getLsbD_reverse, getMsbD_reverse, reverse_append, reverse_replicate
and Nat.mod_sub_eq_sub_mod
#6476
Conversation
Mathlib CI status (docs):
|
Co-authored-by: Alex Keizer <[email protected]>
Co-authored-by: Alex Keizer <[email protected]>
@luisacicolini, please add the |
Had to add an extra |
awaiting-review |
…eft_and_distrib`, `testBit_mul_two_pow`, `bitwise_mul_two_pow`, `shiftLeft_bitwise_distrib]` (#6630) This PR adds theorems `Nat.[shiftLeft_or_distrib`, shiftLeft_xor_distrib`, shiftLeft_and_distrib`, `testBit_mul_two_pow`, `bitwise_mul_two_pow`, `shiftLeft_bitwise_distrib]`, to prove `Nat.shiftLeft_or_distrib` by emulating the proof strategy of `shiftRight_and_distrib`. In particular, `Nat.shiftLeft_or_distrib` is necessary to simplify the proofs in #6476. --------- Co-authored-by: Alex Keizer <[email protected]>
awaiting-review |
Could you update the PR description, which is out of date now? Ping me when that's done and I'll merge! |
Thanks @kim-em, done now! |
…eft_and_distrib`, `testBit_mul_two_pow`, `bitwise_mul_two_pow`, `shiftLeft_bitwise_distrib]` (leanprover#6630) This PR adds theorems `Nat.[shiftLeft_or_distrib`, shiftLeft_xor_distrib`, shiftLeft_and_distrib`, `testBit_mul_two_pow`, `bitwise_mul_two_pow`, `shiftLeft_bitwise_distrib]`, to prove `Nat.shiftLeft_or_distrib` by emulating the proof strategy of `shiftRight_and_distrib`. In particular, `Nat.shiftLeft_or_distrib` is necessary to simplify the proofs in leanprover#6476. --------- Co-authored-by: Alex Keizer <[email protected]>
…rse, reverse_append, reverse_replicate` and `Nat.mod_sub_eq_sub_mod` (leanprover#6476) This PR defines `reverse` for bitvectors and implements a first subset of theorems (`getLsbD_reverse, getMsbD_reverse, reverse_append, reverse_replicate, reverse_cast, msb_reverse`). We also include some necessary related theorems (`cons_append, cons_append_append, append_assoc, replicate_append_self, replicate_succ'`) and deprecate theorems`replicate_zero_eq` and `replicate_succ_eq`. --------- Co-authored-by: Alex Keizer <[email protected]> Co-authored-by: Kim Morrison <[email protected]>
…eft_and_distrib`, `testBit_mul_two_pow`, `bitwise_mul_two_pow`, `shiftLeft_bitwise_distrib]` (leanprover#6630) This PR adds theorems `Nat.[shiftLeft_or_distrib`, shiftLeft_xor_distrib`, shiftLeft_and_distrib`, `testBit_mul_two_pow`, `bitwise_mul_two_pow`, `shiftLeft_bitwise_distrib]`, to prove `Nat.shiftLeft_or_distrib` by emulating the proof strategy of `shiftRight_and_distrib`. In particular, `Nat.shiftLeft_or_distrib` is necessary to simplify the proofs in leanprover#6476. --------- Co-authored-by: Alex Keizer <[email protected]>
This PR defines
reverse
for bitvectors and implements a first subset of theorems (getLsbD_reverse, getMsbD_reverse, reverse_append, reverse_replicate, reverse_cast, msb_reverse
). We also include some necessary related theorems (cons_append, cons_append_append, append_assoc, replicate_append_self, replicate_succ'
) and deprecate theoremsreplicate_zero_eq
andreplicate_succ_eq
.