lean4-htt/tests/lean/run/grind_ExtTreeSet.lean
Kim Morrison d8335bd661
feat: add @[grind ext] attributes for extensional maps (#10993)
This PR allows `grind` to work extensionally on extensional maps/sets.
2025-10-28 05:20:45 +00:00

17 lines
504 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

import Std
open Std
example {cmp : αα → Ordering} [TransCmp cmp] (m : ExtTreeSet α cmp) (x : α) :
(m.insert x).erase x = m.erase x := by
grind
example (m : ExtTreeSet Nat compare) (x : Nat) : (m.insert x).erase x = m.erase x := by
grind
example [BEq α] [EquivBEq α] [Hashable α] [LawfulHashable α] (m : ExtHashSet α) (x : α) :
(m.insert x).erase x = m.erase x := by
grind
example (m : ExtHashMap Int Int) (x y : Int) : (m.insert x y).erase x = m.erase x := by
grind