On Feb 2, 9:17 am, Paul Rubin <http://[EMAIL PROTECTED]> wrote:
> Arnaud Delobelle <[EMAIL PROTECTED]> writes:
> > * For sets {x, y} union {y, z} = {x, y, z}.  The natural way of
> >   extending this to multisets is having the union operator take the
> >   max of the multiplicities of each element, i.e.
>
> That certainly doesn't fit the intuition of a bag of objects.  I'd
> think of the union of two bags as the result of dumping the contents
> of both bags onto the table, i.e. you'd add the two vectors.
>
I could see uses for both types of union. You could have both A + B
which adds the multiplicities (the smallest bag which contains both
the bags) and A | B which takes the max of the multiplicities (the
smallest bag which contains either of the bags).

> > * Similarly, for intersection one would take the min of
> > multiplicities, i.e.
>
> This is a reasonable interpretation I guess.
>
> > A difference B = A - (A intersection B)
>
> I think difference would mean subtraction.
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to