Skip to content

Commit 18c69c9

Browse files
authored
Merge pull request #15 from shigoel/main
Bump toolchain to nightly-2024-10-07
2 parents 74b8b74 + 522f89a commit 18c69c9

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

ELFSage/Util/ByteArray.lean

+3-6
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ theorem Array.extract_len_aux {src: Array α} :
175175
intro lt
176176
simp; split
177177
· have : n + l + 1 ≤ size src := by omega
178-
simp only [Array.toList_length] at ih
178+
simp only [length_toList] at ih
179179
rw [ih (l + 1) (push dst src[l]) this]
180180
simp_arith
181181
· omega
@@ -202,9 +202,6 @@ def NByteArray.extract (bs : ByteArray) (n : Nat) (h : bs.size ≥ n) : NByteArr
202202
unfold Array.extract.loop
203203
split; simp; contradiction
204204
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]
208205
simp
209206
have : bs.data.size = bs.size := by
210207
simp [ByteArray.size]
@@ -213,7 +210,7 @@ def NByteArray.extract (bs : ByteArray) (n : Nat) (h : bs.size ≥ n) : NByteArr
213210
split <;> omega
214211
rw [Array.extract_loop_len (min n bs.data.size) 0 #[]]
215212
simp only [ByteArray.size, Array.size,
216-
ge_iff_le, Array.append_toList,
213+
ge_iff_le, Array.size_append,
217214
List.length_append, implies_true,
218215
Nat.min_def, Nat.zero_add,
219216
Array.toList_toArray, List.length_nil,
@@ -223,7 +220,7 @@ def NByteArray.extract (bs : ByteArray) (n : Nat) (h : bs.size ≥ n) : NByteArr
223220
· simp [Nat.min_def]; split
224221
· assumption
225222
· simp only [ByteArray.size, Array.size,
226-
ge_iff_le, Array.append_toList,
223+
ge_iff_le, Array.size_append,
227224
List.length_append, implies_true,
228225
Nat.min_def, Nat.zero_add,
229226
Nat.not_le, Nat.le_refl]

lean-toolchain

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
leanprover/lean4:nightly-2024-09-10
1+
leanprover/lean4:nightly-2024-10-07

0 commit comments

Comments
 (0)