Skip to content

Commit f7d4f6b

Browse files
kim-emwkrozowski
authored andcommitted
chore: >6 month old deprecations (leanprover#10969)
1 parent 066909d commit f7d4f6b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

76 files changed

+13
-1962
lines changed

src/Init/Control/Basic.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ instance (priority := 500) instForInOfForIn' [ForIn' m ρ α d] : ForIn m ρ α
4545
forIn x b f = forIn' x b (fun x h => binderNameHint x f <| binderNameHint h () <| f x) := by
4646
rfl
4747

48-
@[deprecated forIn_eq_forIn' (since := "2025-04-04")]
49-
abbrev forIn_eq_forin' := @forIn_eq_forIn'
50-
5148
/--
5249
Extracts the value from a `ForInStep`, ignoring whether it is `ForInStep.done` or `ForInStep.yield`.
5350
-/

src/Init/Core.lean

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1084,14 +1084,6 @@ theorem of_toBoolUsing_eq_true {p : Prop} {d : Decidable p} (h : toBoolUsing d =
10841084
theorem of_toBoolUsing_eq_false {p : Prop} {d : Decidable p} (h : toBoolUsing d = false) : ¬p :=
10851085
of_decide_eq_false h
10861086

1087-
set_option linter.missingDocs false in
1088-
@[deprecated of_toBoolUsing_eq_true (since := "2025-04-04")]
1089-
abbrev ofBoolUsing_eq_true := @of_toBoolUsing_eq_true
1090-
1091-
set_option linter.missingDocs false in
1092-
@[deprecated of_toBoolUsing_eq_false (since := "2025-04-04")]
1093-
abbrev ofBoolUsing_eq_false := @of_toBoolUsing_eq_false
1094-
10951087
instance : Decidable True :=
10961088
isTrue trivial
10971089

@@ -1356,10 +1348,6 @@ namespace Subtype
13561348
theorem exists_of_subtype {α : Type u} {p : α → Prop} : { x // p x } → Exists (fun x => p x)
13571349
| ⟨a, h⟩ => ⟨a, h⟩
13581350

1359-
set_option linter.missingDocs false in
1360-
@[deprecated exists_of_subtype (since := "2025-04-04")]
1361-
abbrev existsOfSubtype := @exists_of_subtype
1362-
13631351
variable {α : Type u} {p : α → Prop}
13641352

13651353
protected theorem eq : ∀ {a1 a2 : {x // p x}}, val a1 = val a2 → a1 = a2

src/Init/Data/Array/Lemmas.lean

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,12 +1056,6 @@ theorem mem_or_eq_of_mem_setIfInBounds
10561056
cases xs
10571057
simp
10581058

1059-
@[deprecated beq_empty_eq (since := "2025-04-04")]
1060-
abbrev beq_empty_iff := @beq_empty_eq
1061-
1062-
@[deprecated empty_beq_eq (since := "2025-04-04")]
1063-
abbrev empty_beq_iff := @empty_beq_eq
1064-
10651059
@[simp, grind =] theorem push_beq_push [BEq α] {a b : α} {xs ys : Array α} :
10661060
(xs.push a == ys.push b) = (xs == ys && a == b) := by
10671061
cases xs
@@ -1697,9 +1691,6 @@ theorem forall_none_of_filterMap_eq_empty (h : filterMap f xs = #[]) : ∀ x ∈
16971691
cases xs
16981692
simp
16991693

1700-
@[deprecated filterMap_eq_empty_iff (since := "2025-04-04")]
1701-
abbrev filterMap_eq_nil_iff := @filterMap_eq_empty_iff
1702-
17031694
theorem filterMap_eq_push_iff {f : α → Option β} {xs : Array α} {ys : Array β} {b : β} :
17041695
filterMap f xs = ys.push b ↔ ∃ as a bs,
17051696
xs = as.push a ++ bs ∧ filterMap f as = ys ∧ f a = some b ∧ (∀ x, x ∈ bs → f x = none) := by
@@ -3618,9 +3609,6 @@ theorem size_rightpad {n : Nat} {a : α} {xs : Array α} :
36183609

36193610
theorem elem_push_self [BEq α] [LawfulBEq α] {xs : Array α} {a : α} : (xs.push a).elem a = true := by simp
36203611

3621-
@[deprecated elem_push_self (since := "2025-04-04")]
3622-
abbrev elem_cons_self := @elem_push_self
3623-
36243612
theorem contains_eq_any_beq [BEq α] {xs : Array α} {a : α} : xs.contains a = xs.any (a == ·) := by
36253613
rcases xs with ⟨xs⟩
36263614
simp [List.contains_eq_any_beq]
@@ -4325,12 +4313,6 @@ theorem getElem?_push_eq {xs : Array α} {x : α} : (xs.push x)[xs.size]? = some
43254313
cases xs
43264314
simp
43274315

4328-
/-! ### contains -/
4329-
4330-
@[deprecated contains_iff (since := "2025-04-07")]
4331-
abbrev contains_def [DecidableEq α] {a : α} {xs : Array α} : xs.contains a ↔ a ∈ xs :=
4332-
contains_iff
4333-
43344316
/-! ### isPrefixOf -/
43354317

43364318
@[simp, grind =] theorem isPrefixOf_toList [BEq α] {xs ys : Array α} :

src/Init/Data/Array/Perm.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ theorem Perm.size_eq {xs ys : Array α} (p : xs ~ ys) : xs.size = ys.size := by
8484
simp only [perm_iff_toList_perm] at p
8585
simpa using p.length_eq
8686

87-
@[deprecated Perm.size_eq (since := "2025-04-17")]
88-
abbrev Perm.length_eq := @Perm.size_eq
89-
9087
theorem Perm.mem_iff {a : α} {xs ys : Array α} (p : xs ~ ys) : a ∈ xs ↔ a ∈ ys := by
9188
rcases xs with ⟨xs⟩
9289
rcases ys with ⟨ys⟩

src/Init/Data/BitVec/Lemmas.lean

Lines changed: 0 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
4537
theorem 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-
184170
theorem 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-
218192
theorem 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-
36373605
theorem 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-
36803644
theorem 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`. -/
47634716
theorem 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
49274872
smaller than the bitwidth. -/
49284873
theorem rotateRight_eq_rotateRightAux_of_lt {x : BitVec w} {r : Nat} (hr : r < w) :

src/Init/Data/Bool.lean

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -111,35 +111,11 @@ Needed for confluence of term `(a && b) ↔ a` which reduces to `(a && b) = a` v
111111
@[simp] theorem eq_self_and : ∀ {a b : Bool}, (a = (a && b)) ↔ (a → b) := by decide
112112
@[simp] theorem eq_and_self : ∀ {a b : Bool}, (b = (a && b)) ↔ (b → a) := by decide
113113

114-
@[deprecated and_eq_left_iff_imp (since := "2025-04-04")]
115-
abbrev and_iff_left_iff_imp := @and_eq_left_iff_imp
116-
117-
@[deprecated and_eq_right_iff_imp (since := "2025-04-04")]
118-
abbrev and_iff_right_iff_imp := @and_eq_right_iff_imp
119-
120-
@[deprecated eq_self_and (since := "2025-04-04")]
121-
abbrev iff_self_and := @eq_self_and
122-
123-
@[deprecated eq_and_self (since := "2025-04-04")]
124-
abbrev iff_and_self := @eq_and_self
125-
126114
@[simp] theorem not_and_eq_left_iff_and : ∀ {a b : Bool}, ((!a && b) = a) ↔ !a ∧ !b := by decide
127115
@[simp] theorem and_not_eq_right_iff_and : ∀ {a b : Bool}, ((a && !b) = b) ↔ !a ∧ !b := by decide
128116
@[simp] theorem eq_not_self_and : ∀ {a b : Bool}, (a = (!a && b)) ↔ !a ∧ !b := by decide
129117
@[simp] theorem eq_and_not_self : ∀ {a b : Bool}, (b = (a && !b)) ↔ !a ∧ !b := by decide
130118

131-
@[deprecated not_and_eq_left_iff_and (since := "2025-04-04")]
132-
abbrev not_and_iff_left_iff_imp := @not_and_eq_left_iff_and
133-
134-
@[deprecated and_not_eq_right_iff_and (since := "2025-04-04")]
135-
abbrev and_not_iff_right_iff_imp := @and_not_eq_right_iff_and
136-
137-
@[deprecated eq_not_self_and (since := "2025-04-04")]
138-
abbrev iff_not_self_and := @eq_not_self_and
139-
140-
@[deprecated eq_and_not_self (since := "2025-04-04")]
141-
abbrev iff_and_not_self := @eq_and_not_self
142-
143119
/-! ### or -/
144120

145121
@[simp] theorem or_self_left : ∀ (a b : Bool), (a || (a || b)) = (a || b) := by decide
@@ -169,35 +145,11 @@ Needed for confluence of term `(a || b) ↔ a` which reduces to `(a || b) = a` v
169145
@[simp] theorem eq_self_or : ∀ {a b : Bool}, (a = (a || b)) ↔ (b → a) := by decide
170146
@[simp] theorem eq_or_self : ∀ {a b : Bool}, (b = (a || b)) ↔ (a → b) := by decide
171147

172-
@[deprecated or_eq_left_iff_imp (since := "2025-04-04")]
173-
abbrev or_iff_left_iff_imp := @or_eq_left_iff_imp
174-
175-
@[deprecated or_eq_right_iff_imp (since := "2025-04-04")]
176-
abbrev or_iff_right_iff_imp := @or_eq_right_iff_imp
177-
178-
@[deprecated eq_self_or (since := "2025-04-04")]
179-
abbrev iff_self_or := @eq_self_or
180-
181-
@[deprecated eq_or_self (since := "2025-04-04")]
182-
abbrev iff_or_self := @eq_or_self
183-
184148
@[simp] theorem not_or_eq_left_iff_and : ∀ {a b : Bool}, ((!a || b) = a) ↔ a ∧ b := by decide
185149
@[simp] theorem or_not_eq_right_iff_and : ∀ {a b : Bool}, ((a || !b) = b) ↔ a ∧ b := by decide
186150
@[simp] theorem eq_not_self_or : ∀ {a b : Bool}, (a = (!a || b)) ↔ a ∧ b := by decide
187151
@[simp] theorem eq_or_not_self : ∀ {a b : Bool}, (b = (a || !b)) ↔ a ∧ b := by decide
188152

189-
@[deprecated not_or_eq_left_iff_and (since := "2025-04-04")]
190-
abbrev not_or_iff_left_iff_imp := @not_or_eq_left_iff_and
191-
192-
@[deprecated or_not_eq_right_iff_and (since := "2025-04-04")]
193-
abbrev or_not_iff_right_iff_imp := @or_not_eq_right_iff_and
194-
195-
@[deprecated eq_not_self_or (since := "2025-04-04")]
196-
abbrev iff_not_self_or := @eq_not_self_or
197-
198-
@[deprecated eq_or_not_self (since := "2025-04-04")]
199-
abbrev iff_or_not_self := @eq_or_not_self
200-
201153
theorem or_comm : ∀ (x y : Bool), (x || y) = (y || x) := by decide
202154
instance : Std.Commutative (· || ·) := ⟨or_comm⟩
203155

@@ -621,11 +573,6 @@ protected theorem cond_false {α : Sort u} {a b : α} : cond false a b = b := co
621573
@[simp] theorem cond_then_self : ∀ (c b : Bool), cond c c b = (c || b) := by decide
622574
@[simp] theorem cond_else_self : ∀ (c b : Bool), cond c b c = (c && b) := by decide
623575

624-
@[deprecated cond_then_not_self (since := "2025-04-04")] abbrev cond_true_not_same := @cond_then_not_self
625-
@[deprecated cond_else_not_self (since := "2025-04-04")] abbrev cond_false_not_same := @cond_else_not_self
626-
@[deprecated cond_then_self (since := "2025-04-04")] abbrev cond_true_same := @cond_then_self
627-
@[deprecated cond_else_self (since := "2025-04-04")] abbrev cond_false_same := @cond_else_self
628-
629576
theorem cond_pos {b : Bool} {a a' : α} (h : b = true) : (bif b then a else a') = a := by
630577
rw [h, cond_true]
631578

src/Init/Data/Int/DivMod/Basic.lean

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ instance : Mod Int where
118118

119119
@[simp, norm_cast] theorem natCast_ediv (m n : Nat) : (↑(m / n) : Int) = ↑m / ↑n := rfl
120120

121-
@[deprecated natCast_ediv (since := "2025-04-17")]
122-
theorem ofNat_ediv (m n : Nat) : (↑(m / n) : Int) = ↑m / ↑n := natCast_ediv m n
123-
124121
theorem ofNat_ediv_ofNat {a b : Nat} : (↑a / ↑b : Int) = (a / b : Nat) := rfl
125122
@[norm_cast]
126123
theorem negSucc_ediv_ofNat_succ {a b : Nat} : ((-[a+1]) / ↑(b+1) : Int) = -[a / succ b +1] := rfl

src/Init/Data/Int/DivMod/Bootstrap.lean

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ theorem ofNat_dvd_left {n : Nat} {z : Int} : (↑n : Int) ∣ z ↔ n ∣ z.natA
9292

9393
@[simp, norm_cast] theorem natCast_emod (m n : Nat) : (↑(m % n) : Int) = m % n := rfl
9494

95-
@[deprecated natCast_emod (since := "2025-04-17")]
96-
theorem ofNat_emod (m n : Nat) : (↑(m % n) : Int) = m % n := natCast_emod m n
97-
9895
/-! ### mod definitions -/
9996

10097
theorem emod_add_mul_ediv : ∀ a b : Int, a % b + b * (a / b) = a
@@ -233,10 +230,6 @@ theorem emod_lt_of_pos (a : Int) {b : Int} (H : 0 < b) : a % b < b :=
233230
@[simp] theorem mul_add_emod_self_left (a b c : Int) : (a * b + c) % a = c % a := by
234231
rw [Int.add_comm, add_mul_emod_self_left]
235232

236-
@[deprecated add_mul_emod_self_right (since := "2025-04-11")]
237-
theorem add_mul_emod_self {a b c : Int} : (a + b * c) % c = a % c :=
238-
add_mul_emod_self_right ..
239-
240233
@[simp] theorem emod_add_emod (m n k : Int) : (m % n + k) % n = (m + k) % n := by
241234
have := (add_mul_emod_self_left (m % n + k) n (m / n)).symm
242235
rwa [Int.add_right_comm, emod_add_mul_ediv] at this

0 commit comments

Comments
 (0)