Skip to content

Commit 3452ccc

Browse files
fgdoraisleanprover-community-mathlib4-bot
andcommitted
chore: adaptations for batteries#1489 (leanprover-community#31220)
After [batteries#1489](leanprover-community/batteries#1489) is merged: - [x] Edit the lakefile to point to leanprover-community/batteries:main - [x] Run lake update batteries - [x] Merge leanprover-community/mathlib4:master - [ ] Wait for CI and merge Co-authored-by: leanprover-community-mathlib4-bot <leanprover-community-mathlib4-bot@users.noreply.github.com> Co-authored-by: F. G. Dorais <fgdorais@gmail.com>
1 parent a7e757e commit 3452ccc

2 files changed

Lines changed: 10 additions & 23 deletions

File tree

Mathlib/Data/Array/Extract.lean

Lines changed: 9 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ Authors: Jiecheng Zhao
66
module
77

88
public import Mathlib.Init
9+
public import Batteries.Data.Array.Lemmas
910
/-!
1011
# Lemmas about `Array.extract`
1112
@@ -19,30 +20,16 @@ variable {α : Type u} {i : Nat}
1920

2021
namespace Array
2122

22-
@[simp]
23-
theorem extract_eq_nil_of_start_eq_end {a : Array α} :
24-
a.extract i i = #[] := by
25-
refine extract_empty_of_stop_le_start ?h
26-
exact Nat.le_refl i
23+
@[deprecated (since := "2025-11-03")]
24+
alias extract_eq_nil_of_start_eq_end := extract_empty_of_start_eq_stop
2725

28-
/--
29-
This is a stronger version of `Array.extract_append_left`,
30-
and should be upstreamed to replace that.
31-
-/
32-
theorem extract_append_left' {a b : Array α} {i j : Nat} (h : j ≤ a.size) :
33-
(a ++ b).extract i j = a.extract i j := by
34-
simp [h]
26+
@[deprecated (since := "2025-11-03")]
27+
alias extract_append_left' := extract_append_of_stop_le_size_left
3528

36-
/--
37-
This is a stronger version of `Array.extract_append_right`,
38-
and should be upstreamed to replace that.
39-
-/
40-
theorem extract_append_right' {a b : Array α} {i j : Nat} (h : a.size ≤ i) :
41-
(a ++ b).extract i j = b.extract (i - a.size) (j - a.size) := by
42-
grind
29+
@[deprecated (since := "2025-11-03")]
30+
alias extract_append_right' := extract_append_of_size_left_le_start
4331

44-
theorem extract_eq_of_size_le_end {l p : Nat} {a : Array α} (h : a.size ≤ l) :
45-
a.extract p l = a.extract p a.size := by
46-
simp only [extract, Nat.min_eq_right h, Nat.sub_eq, Nat.min_self]
32+
@[deprecated (since := "2025-11-03")]
33+
alias extract_eq_of_size_le_end := extract_eq_of_size_le_stop
4734

4835
end Array

lake-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565
"type": "git",
6666
"subDir": null,
6767
"scope": "leanprover-community",
68-
"rev": "2e16f91af2a97975e5d2fac906494cd6c17ba255",
68+
"rev": "d320358435ce77f0be1d91d493e797876112beba",
6969
"name": "batteries",
7070
"manifestFile": "lake-manifest.json",
7171
"inputRev": "main",

0 commit comments

Comments
 (0)