Skip to content

Big Operator and Function Examples

Volker Sorge edited this page Apr 28, 2015 · 1 revision

Example page. Back to Semantic Embedding Examples.

Sums and Products

In Bigop type nodes the content pointer leads to the large operator.

Original MathML:

<math>
  <mrow>
    <munderover>
      <mi></mi>
      <mrow>
        <mi>n</mi>
        <mo>=</mo>
        <mn>0</mn>
      </mrow>
      <mi></mi>
    </munderover>
    <munderover>
      <mi></mi>
      <mrow>
        <mi>m</mi>
        <mo>=</mo>
        <mn>0</mn>
      </mrow>
      <mi></mi>
    </munderover>
    <msup>
      <mi>n</mi>
      <mi>m</mi>
    </msup>
  </mrow>
</math>

Semantically enriched MathML:

<math>
  <mrow type="bigop" role="sum" id="18" children="6,17" content="0">
    <munderover type="limboth" role="sum" id="6" children="0,4,5" parent="18">
      <mi type="largeop" role="sum" id="0" parent="18" operator="bigop"></mi>
      <mrow type="relseq" role="equality" id="4" children="1,3" content="2" parent="6">
        <mi type="identifier" role="latinletter" id="1" parent="4">n</mi>
        <mo type="relation" role="equality" id="2" parent="4" operator="relseq,=">=</mo>
        <mn type="number" role="integer" id="3" parent="4">0</mn>
      </mrow>
      <mi type="identifier" role="unknown" id="5" parent="6"></mi>
    </munderover>
    <mrow type="bigop" role="sum" id="17" children="13,16" content="7" parent="18">
      <munderover type="limboth" role="sum" id="13" children="7,11,12" parent="17">
        <mi type="largeop" role="sum" id="7" parent="17" operator="bigop"></mi>
        <mrow type="relseq" role="equality" id="11" children="8,10" content="9" parent="13">
          <mi type="identifier" role="latinletter" id="8" parent="11">m</mi>
          <mo type="relation" role="equality" id="9" parent="11" operator="relseq,=">=</mo>
          <mn type="number" role="integer" id="10" parent="11">0</mn>
        </mrow>
        <mi type="identifier" role="unknown" id="12" parent="13"></mi>
      </munderover>
      <msup type="superscript" role="latinletter" id="16" children="14,15" parent="17">
        <mi type="identifier" role="latinletter" id="14" parent="16">n</mi>
        <mi type="identifier" role="latinletter" id="15" parent="16">m</mi>
      </msup>
    </mrow>
  </mrow>
</math>

Integrals

Integrals are similar to big op types.

Original MathML:

<math>
  <munder>
    <mi></mi>
    <mi>X</mi>
  </munder>
  <mi>x</mi>
  <mi>dx</mi>
</math>

Semantically enriched MathML:

<math type="integral" role="integral" id="5" children="2,3,4" content="0">
  <munder type="limlower" role="integral" id="2" children="0,1" parent="5">
    <mi type="largeop" role="integral" id="0" parent="5" operator="integral"></mi>
    <mi type="identifier" role="latinletter" id="1" parent="2">X</mi>
  </munder>
  <mi type="identifier" role="latinletter" id="3" parent="5">x</mi>
  <mi type="identifier" role="unknown" id="4" parent="5">dx</mi>
</math>

Functions

Functions have two content pointers: The first pointing to the invisible function application element that is given as an explicit operator. The second points to the function name.

Original MathML:

<math>
  <mrow>
    <mi>sin</mi>
    <mo>(</mo>
    <mi>x</mi>
    <mo>)</mo>
  </mrow>
</math>

Semantically enriched MathML:

<math>
  <mrow type="appl" role="prefix function" id="6" children="0,4" content="5,0">
    <mi type="function" role="prefix function" id="0" parent="6" operator="appl">sin</mi>
    <mo type="punctuation" role="application" id="5" parent="6" added="true" operator="appl"></mo>
    <mrow type="fenced" role="leftright" id="4" children="2" content="1,3" parent="6">
      <mo type="fence" role="open" id="1" parent="4" operator="fenced">(</mo>
      <mi type="identifier" role="latinletter" id="2" parent="4">x</mi>
      <mo type="fence" role="close" id="3" parent="4" operator="fenced">)</mo>
    </mrow>
  </mrow>
</math>

The same holds for "simple" functions. Here's a nested example:

Original MathML:

<math>
  <mrow>
    <mi>g</mi>
    <mo>(</mo>
    <mi>f</mi>
    <mo>(</mo>
    <mi>x</mi>
    <mo>)</mo>
    <mo>)</mo>
  </mrow>
</math>

Semantically enriched MathML:

<math>
  <mrow type="appl" role="simple function" id="12" children="0,10" content="11,0">
    <mi type="identifier" role="simple function" id="0" parent="12" operator="appl">g</mi>
    <mo type="punctuation" role="application" id="11" parent="12" added="true" operator="appl"></mo>
    <mrow type="fenced" role="leftright" id="10" children="9" content="1,6" parent="12">
      <mo type="fence" role="open" id="1" parent="10" operator="fenced">(</mo>
      <mrow type="appl" role="simple function" id="9" children="2,7" content="8,2" parent="10">
        <mi type="identifier" role="simple function" id="2" parent="9" operator="appl">f</mi>
        <mo type="punctuation" role="application" id="8" parent="9" added="true" operator="appl"></mo>
        <mrow type="fenced" role="leftright" id="7" children="4" content="3,5" parent="9">
          <mo type="fence" role="open" id="3" parent="7" operator="fenced">(</mo>
          <mi type="identifier" role="latinletter" id="4" parent="7">x</mi>
          <mo type="fence" role="close" id="5" parent="7" operator="fenced">)</mo>
        </mrow>
      </mrow>
      <mo type="fence" role="close" id="6" parent="10" operator="fenced">)</mo>
    </mrow>
  </mrow>
</math>
Clone this wiki locally