
23 Apr
2012
23 Apr
'12
5:50 p.m.
On Apr 23, 2012, at 7:04 PM, Stefan Holdermans wrote:
if this is what people have agreed on to be a sensible semantics for hybrid sets, I am fine implementing it like this.
I have a hard time believing you have implemented the semantics that people have agreed on to be a sensible semantics for hybrid sets. I would expect that multiplicity k (m `union` n) == multiplicity k m `max` multiplicity k n. Which means that an element of m with negative multiplicity is not a member of m `union` n if it is not a member of n. So that would mean that union would have to be implemented something like this: SMS m `union` SMS n = SMS $ Map.intersectionWith max m n `Map.union` Map.filter (>= 0) ((m Map.\\ n) `Map.union` (n Map.\\ m)) greetings, Sjoerd