op_U : ('a -> 'a -> bool) -> 'a list list -> 'a list
- op_U (fn x => fn y => x mod 2 = y mod 2) [[1,2,3], [4,5,6], [2,4,6,8,10]]; > val it = [5, 2, 4, 6, 8, 10] : int list
A high-performance implementation of finite sets may be found in structure HOLset.
There is no requirement that eq be recognizable as a kind of equality (it could be implemented by an order relation, for example).