Re: Section 4.3.4.1.2 - type attribute on nary-set.class members

On 26/03/2012 21:25, Andrew Miller wrote:
> Section 4.3.4.1.2 includes the following text:
>
> 'The above rule applies to all symbols in the listed classes. In the
>  case of *nary-set.class* the choice of Content Dictionary to use
> depends on the |type| attribute on the symbol, defaulting to set1
> <http://www.openmath.org/cd/set1.xhtml>, but multiset1
> <http://www.openmath.org/cd/multiset1.xhtml> should be used if
> |type|="multiset"'.
>
> However, according to Appendix A...
....
> ... it is not legal for any member of nary-set.class to have a
> type="multiset" attribute.
>
> It therefore is pointless and confusing to include the text about
> what to do if the type="multiset" is present, if it is never legal
> for it to be present.
>
> Best wishes, Andrew
>

Sorry about the delay, I agree this is confusing/confused.


I believe the intention is to treat <union> as a polymorphic operator 
defaulting to set but using multiset union if either of its arguments 
are (explicitly) typed as multiset.

so the following Content MathML is valid

<math xmlns="http://www.w3.org/1998/Math/MathML">
<apply><union/>
<set type="multiset"><cn>1</cn><cn>1</cn><cn>2</cn></set>
<set type="multiset"><cn>2</cn><cn>2</cn><cn>3</cn></set></apply>
</math>


and should use union from the CD multiset1.

the c2s translation currently does not handle this case, the code 
contains a comment.


<!-- TBD special cases
      set/multiset handling for: emptyset, setdiff, card, in, notin, 
notsubset, notprsubset
      data/dist handling for: moment, mean, sdev, variance,
   -->

Thus my (personal) suggestion is that we should change the line in 
4.3.4.1.2 that ends

.....but multiset1 should be used if type="multiset".

to say

.....but multiset1 should be used if type="multiset" is used in the 
constructor of any of the arguments of the operator.


David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs. 
________________________________________________________________________

Received on Wednesday, 18 July 2012 12:33:11 UTC