lean4-htt/tests/lean/grind/experiments/map.lean
2025-06-12 04:42:25 +00:00

13 lines
459 B
Text

import Std.Data.HashMap
import Std.Data.DHashMap
import Std.Data.ExtHashMap
open Std
-- Do we want this?
example (m : HashMap Nat Nat) (h : m.isEmpty) : m[3]? = none := by grind [HashMap.getElem?_of_isEmpty]
-- Do this for List etc?
-- attribute [grind] HashMap.getElem?_eq_some_getElem -- Do we do this for list?
-- Don't just use `@[grind]`, instead add two patterns!
-- Seems unnecessary?
grind_pattern HashMap.getElem?_eq_some_getElem => a ∈ m, m[a]?