Legal use of 'sum' with sets

Hello!  Hopefully, this is the right forum to ask this question; if not, I
apologize.

We are using MathML within our own XML-based format, and are about to
introduce the concept of sets to our identifiers--basically, in the past an
identifier always meant 'a double' and now it might mean 'a set of doubles'.

If it is legal, we would like to recommend that people use the following
simple format to indicate 'the sum of all values in a set':

<apply>
    <sum/>
    <ci type="set"> Si </ci>
</apply>

or even just:

<apply>
    <sum/>
    <ci> Si </ci>
</apply>

since 'Si' would already be known to the interpreter to be a set.

However, I did find a more formal definition at
http://zvon.org/xxl/MathML/Output/el_sum.html which, if applied to this
same use-case, would look like:

<apply>
     <sum/>
     <bvar>
          <ci> s </ci>
     </bvar>
     <condition>
          <apply>
               <in/>
               <ci> s </ci>
               <ci type="set"> Si </ci>
          </apply>
     </condition>
     <ci> s </ci>
</apply>

Are both options legal?  Are there other options?  Are there aspects of
this I haven't covered?

Thank you!

-Lucian Smith

Received on Wednesday, 30 April 2014 09:38:23 UTC