[Haskell-cafe] ANN: signed-multiset-0.1

Sjoerd Visscher sjoerd at w3future.com
Mon Apr 23 13:40:36 CEST 2012


I don't think max would be a good choice, as that would mean that the default multiplicity would have to be negative infinity (the identity element of max) instead of 0, and then using Int as the type for multiplicity would not cut it.

greetings,

Sjoerd

On Apr 20, 2012, at 11:02 AM, Stefan Holdermans wrote:

> Wren,
> 
>>> For a specific example, I haven't the faintest intuition about
>>> what 'map' should do.  Suppose we have
>>> 	{(k1)x1, (k2)x2}
>>> and f x1 == f x2 = y.  Should the value of map f {...} be
>>> {(k1+k2)y} or {(k1`max`k2)y} or what?
>> 
>> Good question. I'd suppose that they should be parametrized by any (Abelian?) group on the weights/multiplicities, where (+) is the canonical one since we're talking about "negative" membership.
> 
> Any groupoid on the multiplicities would do, I guess.
> 
> As I wrote in my answer to Richard, max seems a better choise, as it nicely generalises mapping on sets.
> 
> Cheers,
> 
>  Stefan
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
> 

--
Sjoerd Visscher
sjoerd at w3future.com






More information about the Haskell-Cafe mailing list