-
Notifications
You must be signed in to change notification settings - Fork 437
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: getLsb_replicate #4873
feat: getLsb_replicate #4873
Conversation
This allows bitblasting `BitVec.replicate`.
Mathlib CI status (docs):
|
Hey, this looks good to me. Let's see what @alexkeizer says, but you may be able to undraft this PR after @alexkeizer gives feedback. |
awaiting-review |
@@ -203,6 +203,10 @@ theorem mod_add_div (m k : Nat) : m % k + k * (m / k) = m := by | |||
| base x y h => simp [h] | |||
| ind x y h IH => simp [h]; rw [Nat.mul_succ, ← Nat.add_assoc, IH, Nat.sub_add_cancel h.2] | |||
|
|||
theorem mod_def (m k : Nat) : m % k = m - k * (m / k) := by |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically this is not the definition for Nat
, but I like the parallelism with the Int
naming, and will worry about whether this needs to be changed later.
This allows bitblasting
BitVec.replicate
.I changed the definition of
BitVec.replicate
to useBitVec.cast
in order to make the proof smoother, since it's an easier time simplifying away terms withBitVec.cast
.