@@ -22,17 +22,14 @@ theorem getElem_eq_data_getElem (a : ByteArray) (h : i < a.size) : a[i] = a.data
22
22
/-! ### empty -/
23
23
24
24
@[simp] theorem data_mkEmpty (cap) : (mkEmpty cap).data = #[] := rfl
25
- @[deprecated (since := "2024-08-13")] alias mkEmpty_data := data_mkEmpty
26
25
27
26
@[simp] theorem data_empty : empty.data = #[] := rfl
28
- @[deprecated (since := "2024-08-13")] alias empty_data := data_empty
29
27
30
28
@[simp] theorem size_empty : empty.size = 0 := rfl
31
29
32
30
/-! ### push -/
33
31
34
32
@[simp] theorem data_push (a : ByteArray) (b : UInt8) : (a.push b).data = a.data.push b := rfl
35
- @[deprecated (since := "2024-08-13")] alias push_data := data_push
36
33
37
34
@[simp] theorem size_push (a : ByteArray) (b : UInt8) : (a.push b).size = a.size + 1 :=
38
35
Array.size_push ..
@@ -48,7 +45,6 @@ theorem get_push_lt (a : ByteArray) (x : UInt8) (i : Nat) (h : i < a.size) :
48
45
49
46
@[simp] theorem data_set (a : ByteArray) (i : Fin a.size) (v : UInt8) :
50
47
(a.set i v).data = a.data.set i v i.isLt := rfl
51
- @[deprecated (since := "2024-08-13")] alias set_data := data_set
52
48
53
49
@[simp] theorem size_set (a : ByteArray) (i : Fin a.size) (v : UInt8) :
54
50
(a.set i v).size = a.size :=
@@ -70,7 +66,6 @@ theorem set_set (a : ByteArray) (i : Fin a.size) (v v' : UInt8) :
70
66
@[simp] theorem data_copySlice (a i b j len exact) :
71
67
(copySlice a i b j len exact).data = b.data.extract 0 j ++ a.data.extract i (i + len)
72
68
++ b.data.extract (j + min len (a.data.size - i)) b.data.size := rfl
73
- @[deprecated (since := "2024-08-13")] alias copySlice_data := data_copySlice
74
69
75
70
/-! ### append -/
76
71
@@ -79,7 +74,6 @@ theorem set_set (a : ByteArray) (i : Fin a.size) (v v' : UInt8) :
79
74
@[simp] theorem data_append (a b : ByteArray) : (a ++ b).data = a.data ++ b.data := by
80
75
rw [←append_eq]; simp [ByteArray.append, size]
81
76
rw [Array.extract_empty_of_stop_le_start (h:=Nat.le_add_right ..), Array.append_empty]
82
- @[deprecated (since := "2024-08-13")] alias append_data := data_append
83
77
84
78
theorem size_append (a b : ByteArray) : (a ++ b).size = a.size + b.size := by
85
79
simp only [size, append_eq, data_append]; exact Array.size_append ..
@@ -102,7 +96,6 @@ theorem get_append_right {a b : ByteArray} (hle : a.size ≤ i) (h : i < (a ++ b
102
96
match Nat.le_total start stop with
103
97
| .inl h => simp [h, Nat.add_sub_cancel']
104
98
| .inr h => simp [h, Nat.sub_eq_zero_of_le, Array.extract_empty_of_stop_le_start]
105
- @[deprecated (since := "2024-08-13")] alias extract_data := data_extract
106
99
107
100
@[simp] theorem size_extract (a : ByteArray) (start stop ) :
108
101
(a.extract start stop ).size = min stop a.size - start := by
@@ -134,8 +127,6 @@ theorem ofFn_succ (f : Fin (n+1) → UInt8) :
134
127
| zero => rfl
135
128
| succ n ih => simp [ofFn_succ, Array.ofFn_succ, ih, Fin.last]
136
129
137
- @[deprecated (since := "2024-08-13")] alias ofFn_data := data_ofFn
138
-
139
130
@[simp] theorem size_ofFn (f : Fin n → UInt8) : (ofFn f).size = n := by
140
131
simp [size]
141
132
0 commit comments