We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3b1c8f4 commit a2eb0a4Copy full SHA for a2eb0a4
src/Init/Data/BitVec/Lemmas.lean
@@ -3866,6 +3866,10 @@ theorem toInt_mul_of_not_smulOverflow {x y : BitVec w} (h : ¬ smulOverflow x y)
3866
_root_.not_or, Int.not_le, Int.not_lt] at h
3867
rw [toInt_mul, Int.bmod_eq_of_le (by push_cast; omega) (by push_cast; omega)]
3868
3869
+/--
3870
+Signed multiplication overflow reassociation.
3871
+If `(x * y)` and `(y * z)` do not overflow, then `(x * y) * z` overflows iff `x * (y * z)` overflows.
3872
+-/
3873
theorem smulOverflow_assoc {x y z : BitVec w} (h : ¬ x.smulOverflow y) (h' : ¬ y.smulOverflow z) :
3874
(x * y).smulOverflow z = x.smulOverflow (y * z) := by
3875
rcases w with _|w
0 commit comments