Skip to content

Commit

Permalink
Merge pull request #15 from shigoel/main
Browse files Browse the repository at this point in the history
Bump toolchain to nightly-2024-10-07
  • Loading branch information
gleachkr authored Oct 8, 2024
2 parents 74b8b74 + 522f89a commit 18c69c9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
9 changes: 3 additions & 6 deletions ELFSage/Util/ByteArray.lean
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ theorem Array.extract_len_aux {src: Array α} :
intro lt
simp; split
· have : n + l + 1 ≤ size src := by omega
simp only [Array.toList_length] at ih
simp only [length_toList] at ih
rw [ih (l + 1) (push dst src[l]) this]
simp_arith
· omega
Expand All @@ -202,9 +202,6 @@ def NByteArray.extract (bs : ByteArray) (n : Nat) (h : bs.size ≥ n) : NByteArr
unfold Array.extract.loop
split; simp; contradiction
rw [this, this]
have : ∀α, ∀a b : Array α, (a ++ b).size = a.size + b.size := by
simp only [Array.append_toList, Array.size, List.length_append, implies_true]
rw [this, this]
simp
have : bs.data.size = bs.size := by
simp [ByteArray.size]
Expand All @@ -213,7 +210,7 @@ def NByteArray.extract (bs : ByteArray) (n : Nat) (h : bs.size ≥ n) : NByteArr
split <;> omega
rw [Array.extract_loop_len (min n bs.data.size) 0 #[]]
simp only [ByteArray.size, Array.size,
ge_iff_le, Array.append_toList,
ge_iff_le, Array.size_append,
List.length_append, implies_true,
Nat.min_def, Nat.zero_add,
Array.toList_toArray, List.length_nil,
Expand All @@ -223,7 +220,7 @@ def NByteArray.extract (bs : ByteArray) (n : Nat) (h : bs.size ≥ n) : NByteArr
· simp [Nat.min_def]; split
· assumption
· simp only [ByteArray.size, Array.size,
ge_iff_le, Array.append_toList,
ge_iff_le, Array.size_append,
List.length_append, implies_true,
Nat.min_def, Nat.zero_add,
Nat.not_le, Nat.le_refl]
Expand Down
2 changes: 1 addition & 1 deletion lean-toolchain
Original file line number Diff line number Diff line change
@@ -1 +1 @@
leanprover/lean4:nightly-2024-09-10
leanprover/lean4:nightly-2024-10-07

0 comments on commit 18c69c9

Please sign in to comment.