Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: canonicalize BitVec to arithmetic before running ring_nf (#437)
There are 2 main kinds of operations on BitVecs 1. Boolean operations (^^^, &&&, |||) which are solved by extensionality 2. Arithmetic operations (+, -) which are solved by `ring_nf` The purpose of this commit is to convert boolean operations to arithmetic operations and then solve the arithmetic with the `ring_nf` tactic. See `bitvec_AddSub_1202` in `SSA/Projects/InstCombine/AliveStatements.lean` for an example of this. `bitvec_AddSub_1202` was not solved by the `alive_auto` tactic before this commit, and now it is solved by the `alive_auto` after this commit. I added the line ```lean try solve | (simp only [← BitVec.allOnes_sub_eq_xor, BitVec.negOne_eq_allOnes']; ring_nf) ``` to the `alive_auto` tactic. --------- Co-authored-by: Atticus Kuhn <[email protected]>
- Loading branch information