summaryrefslogtreecommitdiff
path: root/tests/lean/Hashmap
diff options
context:
space:
mode:
authorSon Ho2023-09-14 08:17:15 +0200
committerSon Ho2023-09-14 08:17:15 +0200
commit743e8cb9d5366b879f53d7d0ba8adeb2f83ef72f (patch)
tree4a105b1284821a89ca344188fdddb727de2deea3 /tests/lean/Hashmap
parentc9f4a412763ef46ed20c72a9d7fe2cca817d3817 (diff)
Fix the hashmap proofs in Lean
Diffstat (limited to 'tests/lean/Hashmap')
-rw-r--r--tests/lean/Hashmap/Properties.lean9
1 files changed, 2 insertions, 7 deletions
diff --git a/tests/lean/Hashmap/Properties.lean b/tests/lean/Hashmap/Properties.lean
index ab95b854..fe00ab14 100644
--- a/tests/lean/Hashmap/Properties.lean
+++ b/tests/lean/Hashmap/Properties.lean
@@ -332,12 +332,7 @@ theorem insert_no_resize_spec {α : Type} (hm : HashMap α) (key : Usize) (value
simp_all
simp [inv] at hinv
int_tac
- -- TODO: progress fails in command line mode with "index out of bounds"
- -- and I have no idea how to fix this. The error happens after progress
- -- introduced the new goals. It must be when we exit the "withApp", etc.
- -- helpers.
- -- progress as ⟨ z, hp ⟩
- have ⟨ z, hp ⟩ := Usize.add_spec hbounds
+ progress as ⟨ z, hp ⟩
simp [hp]
else
simp [*, Pure.pure]
@@ -408,7 +403,7 @@ theorem insert_no_resize_spec {α : Type} (hm : HashMap α) (key : Usize) (value
-- TODO: canonize addition by default? We need a tactic to simplify arithmetic equalities
-- with addition and substractions ((ℤ, +) is a group or something - there should exist a tactic
-- somewhere in mathlib?)
- simp [Int.add_assoc, Int.add_comm, Int.add_left_comm] <;>
+ (try simp [Int.add_assoc, Int.add_comm, Int.add_left_comm]) <;>
int_tac
have hinv : inv nhm := by
simp [inv] at *