@@ -34,14 +34,6 @@ namespace BitVec
3434 simp only [Bool.and_eq_false_imp, decide_eq_true_eq]
3535 omega
3636
37- set_option linter.missingDocs false in
38- @[deprecated getLsbD_of_ge (since := " 2025-04-04" )]
39- abbrev getLsbD_ge := @getLsbD_of_ge
40-
41- set_option linter.missingDocs false in
42- @[deprecated getMsbD_of_ge (since := " 2025-04-04" )]
43- abbrev getMsbD_ge := @getMsbD_of_ge
44-
4537theorem lt_of_getLsbD {x : BitVec w} {i : Nat} : getLsbD x i = true → i < w := by
4638 if h : i < w then
4739 simp [h]
@@ -175,12 +167,6 @@ theorem getLsbD_eq_getMsbD (x : BitVec w) (i : Nat) : x.getLsbD i = (decide (i <
175167@[simp] theorem getMsb ?_of_ge (x : BitVec w) (i : Nat) (ge : w ≤ i) : getMsb? x i = none := by
176168 simp [getMsb?_eq_getLsb?]; omega
177169
178- set_option linter.missingDocs false in
179- @[deprecated getElem?_of_ge (since := " 2025-04-04" )] abbrev getLsb?_ge := @getElem?_of_ge
180-
181- set_option linter.missingDocs false in
182- @[deprecated getMsb?_of_ge (since := " 2025-04-04" )] abbrev getMsb?_ge := @getMsb?_of_ge
183-
184170theorem lt_of_getElem ?_eq_some (x : BitVec w) (i : Nat) : x[i]? = some b → i < w := by
185171 cases h : x[i]? with
186172 | none => simp
@@ -203,18 +189,6 @@ theorem lt_of_isSome_getMsb? (x : BitVec w) (i : Nat) : (getMsb? x i).isSome →
203189 else
204190 simp [Nat.ge_of_not_lt h]
205191
206- set_option linter.missingDocs false in
207- @[deprecated lt_of_getElem?_eq_some (since := " 2025-04-04" )]
208- abbrev lt_of_getLsb?_eq_some := @lt_of_getElem?_eq_some
209-
210- set_option linter.missingDocs false in
211- @[deprecated lt_of_isSome_getElem? (since := " 2025-04-04" )]
212- abbrev lt_of_getLsb?_isSome := @lt_of_isSome_getElem?
213-
214- set_option linter.missingDocs false in
215- @[deprecated lt_of_isSome_getMsb? (since := " 2025-04-04" )]
216- abbrev lt_of_getMsb?_isSome := @lt_of_isSome_getMsb?
217-
218192theorem getMsbD_eq_getMsb ?_getD (x : BitVec w) (i : Nat) :
219193 x.getMsbD i = (x.getMsb? i).getD false := by
220194 rw [getMsbD_eq_getLsbD]
@@ -1750,9 +1724,6 @@ theorem not_eq_comm {x y : BitVec w} : ~~~ x = y ↔ x = ~~~ y := by
17501724 rw [h]
17511725 simp
17521726
1753- set_option linter.missingDocs false in
1754- @[deprecated getMsbD_not (since := " 2025-04-04" )] abbrev getMsb_not := @getMsbD_not
1755-
17561727@[simp] theorem msb_not {x : BitVec w} : (~~~x).msb = (decide (0 < w) && !x.msb) := by
17571728 simp [BitVec.msb]
17581729
@@ -3631,9 +3602,6 @@ theorem sub_eq_add_neg {n} (x y : BitVec n) : x - y = x + - y := by
36313602 simp only [toNat_sub, toNat_add, toNat_neg, Nat.add_mod_mod]
36323603 rw [Nat.add_comm]
36333604
3634- set_option linter.missingDocs false in
3635- @[deprecated sub_eq_add_neg (since := " 2025-04-04" )] abbrev sub_toAdd := @sub_eq_add_neg
3636-
36373605theorem add_left_neg (x : BitVec w) : -x + x = 0 #w := by
36383606 apply toInt_inj.mp
36393607 simp [toInt_neg, Int.add_left_neg]
@@ -3673,10 +3641,6 @@ theorem neg_one_eq_allOnes : -1#w = allOnes w := by
36733641 have r : (2 ^w - 1 ) < 2 ^w := by omega
36743642 simp [Nat.mod_eq_of_lt q, Nat.mod_eq_of_lt r]
36753643
3676- set_option linter.missingDocs false in
3677- @[deprecated neg_one_eq_allOnes (since := " 2025-04-04" )]
3678- abbrev negOne_eq_allOnes := @neg_one_eq_allOnes
3679-
36803644theorem neg_eq_not_add (x : BitVec w) : -x = ~~~x + 1 #w := by
36813645 apply eq_of_toNat_eq
36823646 simp only [toNat_neg, toNat_add, toNat_not, toNat_ofNat, Nat.add_mod_mod]
@@ -4678,9 +4642,6 @@ theorem zero_smod {x : BitVec w} : (0#w).smod x = 0#w := by
46784642@[simp, grind =] theorem getLsbD_ofBoolListLE : (ofBoolListLE bs).getLsbD i = bs.getD i false := by
46794643 induction bs generalizing i <;> cases i <;> simp_all [ofBoolListLE]
46804644
4681- set_option linter.missingDocs false in
4682- @[deprecated getLsbD_ofBoolListLE (since := " 2025-04-04" )] abbrev getLsb_ofBoolListLE := @getLsbD_ofBoolListLE
4683-
46844645@[simp, grind =] theorem getMsbD_ofBoolListLE :
46854646 (ofBoolListLE bs).getMsbD i = (decide (i < bs.length) && bs.getD (bs.length - 1 - i) false) := by
46864647 simp [getMsbD_eq_getLsbD]
@@ -4751,14 +4712,6 @@ theorem getLsbD_rotateLeftAux_of_ge {x : BitVec w} {r : Nat} {i : Nat} (hi : i
47514712 apply getLsbD_of_ge
47524713 omega
47534714
4754- set_option linter.missingDocs false in
4755- @[deprecated getLsbD_rotateLeftAux_of_lt (since := " 2025-04-04" )]
4756- abbrev getLsbD_rotateLeftAux_of_le := @getLsbD_rotateLeftAux_of_lt
4757-
4758- set_option linter.missingDocs false in
4759- @[deprecated getLsbD_rotateLeftAux_of_ge (since := " 2025-04-04" )]
4760- abbrev getLsbD_rotateLeftAux_of_geq := @getLsbD_rotateLeftAux_of_ge
4761-
47624715/-- When `r < w`, we give a formula for `(x.rotateLeft r).getLsbD i`. -/
47634716theorem getLsbD_rotateLeft_of_le {x : BitVec w} {r i : Nat} (hr: r < w) :
47644717 (x.rotateLeft r).getLsbD i =
@@ -4915,14 +4868,6 @@ theorem getLsbD_rotateRightAux_of_ge {x : BitVec w} {r : Nat} {i : Nat} (hi : i
49154868 apply getLsbD_of_ge
49164869 omega
49174870
4918- set_option linter.missingDocs false in
4919- @[deprecated getLsbD_rotateRightAux_of_lt (since := " 2025-04-04" )]
4920- abbrev getLsbD_rotateRightAux_of_le := @getLsbD_rotateRightAux_of_lt
4921-
4922- set_option linter.missingDocs false in
4923- @[deprecated getLsbD_rotateRightAux_of_ge (since := " 2025-04-04" )]
4924- abbrev getLsbD_rotateRightAux_of_geq := @getLsbD_rotateRightAux_of_ge
4925-
49264871/-- `rotateRight` equals the bit fiddling definition of `rotateRightAux` when the rotation amount is
49274872smaller than the bitwidth. -/
49284873theorem rotateRight_eq_rotateRightAux_of_lt {x : BitVec w} {r : Nat} (hr : r < w) :
0 commit comments