Skip to content

Commit

Permalink
Bump Lean to nightly-2024-05-16
Browse files Browse the repository at this point in the history
  • Loading branch information
pennyannn committed May 16, 2024
1 parent bdfadd5 commit f22e4dd
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 17 deletions.
4 changes: 2 additions & 2 deletions Arm/BitVec.lean
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ protected theorem zero_le_sub (x y : BitVec n) :

@[simp]
protected theorem zero_or (x : BitVec n) : 0#n ||| x = x := by
unfold HOr.hOr instHOr OrOp.or instOrOpBitVec BitVec.or
simp only [toNat_ofNat, Nat.or_zero]
unfold HOr.hOr instHOrOfOrOp OrOp.or instOrOp BitVec.or
simp only [toNat_ofNat, Nat.zero_mod, Nat.zero_or]
congr

theorem BitVec.toNat_or (x y : BitVec n):
Expand Down
4 changes: 2 additions & 2 deletions Arm/Insts/Common.lean
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,8 @@ def rev_elems (n esize : Nat) (x : BitVec n) (h₀ : esize ∣ n) (h₁ : 0 < es
h3 ▸ (element ++ rest_ans)
termination_by n

example : rev_elems 4 4 0xA#4 (by decide) (by decide) = 0xA#4 := rfl
example : rev_elems 8 4 0xAB#8 (by decide) (by decide) = 0xBA#8 := rfl
example : rev_elems 4 4 0xA#4 (by decide) (by decide) = 0xA#4 := by rfl
example : rev_elems 8 4 0xAB#8 (by decide) (by decide) = 0xBA#8 := by rfl
example : rev_elems 8 4 (rev_elems 8 4 0xAB#8 (by decide) (by decide))
(by decide) (by decide) = 0xAB#8 := by native_decide

Expand Down
13 changes: 2 additions & 11 deletions Arm/Map.lean
Original file line number Diff line number Diff line change
Expand Up @@ -118,17 +118,8 @@ def Map.size (m : Map α β) : Nat :=
@[simp] theorem Map.size_erase_le [DecidableEq α] (m : Map α β) (a : α) : (m.erase a).size ≤ m.size := by
induction m <;> simp [erase, size] at *
split
next =>
-- (FIXME) This could be discharged by omega in
-- leanprover/lean4:nightly-2024-02-24, but not in
-- leanprover/lean4:nightly-2024-03-01.
exact Nat.le_succ_of_le (by assumption)
next =>
simp;
-- (FIXME) This could be discharged by omega in
-- leanprover/lean4:nightly-2024-02-24, but not in
-- leanprover/lean4:nightly-2024-03-01.
exact Nat.succ_le_succ (by assumption)
next => omega
next => simp; omega

@[simp] theorem Map.size_erase_eq [DecidableEq α] (m : Map α β) (a : α) : m.contains a = false → (m.erase a).size = m.size := by
induction m <;> simp [erase, size] at *
Expand Down
2 changes: 1 addition & 1 deletion Arm/SeparateProofs.lean
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ open BitVec
---- Some helpful bitvector lemmas ----

theorem n_minus_1_lt_2_64_1 (n : Nat)
(h1 : Nat.succ 0 ≤ n) (h2 : n + 1 2 ^ 64) :
(h1 : Nat.succ 0 ≤ n) (h2 : n < 2 ^ 64) :
(n - 1)#64 < (2 ^ 64 - 1)#64 := by
refine BitVec.val_bitvec_lt.mp ?a
simp [BitVec.bitvec_to_nat_of_nat]
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-03-28
leanprover/lean4:nightly-2024-05-16

0 comments on commit f22e4dd

Please sign in to comment.