On 2017-07-21 1:33 PM, Elizabeth Mattijsen wrote:
On 21 Jul 2017, at 21:30, Darren Duncan <dar...@darrenduncan.net> wrote:
Firstly, I believe ∆ (U+2206) is the standard symbol for symmetric difference, 
and not circled minus as the above url currently gives.


https://en.wikipedia.org/wiki/Symmetric_difference seems to agree, showing it 
as the first choice.  However, ⊖ appears to be the second choice.  FWIW, I 
think ∆ better matches the Texas variant (^) .

The circled plus is also overloaded for XOR (which itself has at least 2 more-preferred alternatives) and other things, while ∆ (U+2206) isn't AFAIK overloaded for anything and in any event ∆ (U+2206) is much more consistent with all the other standard set/bag operators in format and it is what the literature prefers to use.

What you say about (^) Texas version isn't a similarity I thought about, but then that gives my proposal extra support if anything.

The circled plus should be dropped from use for this meaning.

Secondly, I see there's an operator for multiplying 2 bags (which I hadn't 
heard of before, but okay), but there should also be an operator for 
multiplying 1 bag by a natural number, that is a scalar multiply of a bag.  
Unless it is assumed the standard hyper-operator syntax is best for this.

If I get this right, you’d want:

  <a b b>.Bag * 3 give (:3a,:6b).Bag ?

I guess that with * being commutative, 3 * <a b b>.Bag would be the same result.

You are correct in all points above.

But then, what would <a b b>.Bag * <a a b>.Bag be?

I would suggest that this option is either undefined or it has the same meaning as the bag multiplication operator, eg, (:2a,:2b).Bag.

Another way of looking at this is, say if we're starting with the existing bag circled-times bag operator, replacing one bag operand with a number N is like replacing it with what is conceptually an infinite-cardinality bag having :Ne for "e" in turn being every possible value in the type system; the infinite bag reduces to one having only matching unique members and replicates those matches by a cardinality of N.

-- Darren Duncan

Reply via email to