@@ -175,7 +175,7 @@ theorem Array.extract_len_aux {src: Array α} :
175
175
intro lt
176
176
simp; split
177
177
· have : n + l + 1 ≤ size src := by omega
178
- simp only [Array.toList_length ] at ih
178
+ simp only [length_toList ] at ih
179
179
rw [ih (l + 1 ) (push dst src[l]) this]
180
180
simp_arith
181
181
· omega
@@ -202,9 +202,6 @@ def NByteArray.extract (bs : ByteArray) (n : Nat) (h : bs.size ≥ n) : NByteArr
202
202
unfold Array.extract.loop
203
203
split; simp; contradiction
204
204
rw [this, this]
205
- have : ∀α, ∀a b : Array α, (a ++ b).size = a.size + b.size := by
206
- simp only [Array.append_toList, Array.size, List.length_append, implies_true]
207
- rw [this, this]
208
205
simp
209
206
have : bs.data.size = bs.size := by
210
207
simp [ByteArray.size]
@@ -213,7 +210,7 @@ def NByteArray.extract (bs : ByteArray) (n : Nat) (h : bs.size ≥ n) : NByteArr
213
210
split <;> omega
214
211
rw [Array.extract_loop_len (min n bs.data.size) 0 #[]]
215
212
simp only [ByteArray.size, Array.size,
216
- ge_iff_le, Array.append_toList ,
213
+ ge_iff_le, Array.size_append ,
217
214
List.length_append, implies_true,
218
215
Nat.min_def, Nat.zero_add,
219
216
Array.toList_toArray, List.length_nil,
@@ -223,7 +220,7 @@ def NByteArray.extract (bs : ByteArray) (n : Nat) (h : bs.size ≥ n) : NByteArr
223
220
· simp [Nat.min_def]; split
224
221
· assumption
225
222
· simp only [ByteArray.size, Array.size,
226
- ge_iff_le, Array.append_toList ,
223
+ ge_iff_le, Array.size_append ,
227
224
List.length_append, implies_true,
228
225
Nat.min_def, Nat.zero_add,
229
226
Nat.not_le, Nat.le_refl]
0 commit comments