]> MathML Documentation
  1. Virtual Laboratories
  2. Object Library
  3. MathML Documentation

MathML Documentation

Contents

  1. Introduction
  2. Probability and Expected Value
  3. Functions
  4. Relations
  5. Operations
  6. Infimum and Related Constructions
  7. Special Sets of Numbers
  8. Hypothesis Testing
  9. Playing Cards
  10. Miscellaneous Additions

1. Introduction

The version of Content MathML used in this project extends and customizes the standard version of Content MathML. The Content MathML markup is translated into standard Presentation MathML via the XSL Transformation file stat.xsl which in turn is based on the standard XSL Transformation file ctop.xsl written by David Carlisle. This page documents the extensions and modifications of Content MathML that we have implemented, and thus should be considered a companion to the standard MathML documentation. A basic understanding of XML markup in general, and MathML and XSL in particular, are necessary prerequisite for this section.

2. Probability and Expected Value

Probability

The markup <prob /> denotes probability measure, and is rendered by the stylesheet with the special symbol . This markup is ordinarily used with the standard <apply></apply> construction, with one or more arguments. For example, the markup

<apply><prob />
    <apply><intersect />
        <ci>A</ci>
        <ci>B</ci>
    </apply>
</apply>
is rendered by the stylesheet as A B .

Expected Value

Similarly, the markup <expect /> denotes the expected value operator, and is rendered by the stylesheet with the special symbol . This markup is ordinarily used with the standard <apply></apply> construction, with one or more arguments. For example, the markup

<apply><expect />
    <ci>X</ci>
    <apply><geq />
        <ci>Y</ci>
        <cn>0</cn>
    </apply>
</apply>
is rendered by the stylesheet as X Y 0

Conditioning

The markup <given></given> is used for conditional probability and conditional expected value. This markup should be used inside the <apply></apply> construction, and can have any number of arguments. For example, the markup

<apply><prob />
    <ci>A</ci>
    <given>
        <ci>B</ci>
        <ci>C</ci>
    </given>
</apply>
is rendered by the stylesheet as A B C . Similarly, the markup
<apply><expect />
    <ci>X</ci>
    <given>
       <apply><geq />
            <ci>Y</ci>
            <cn>0</cn>
       </apply>
    </given>
</apply>
is rendered by the stylesheet as X Y 0

3. Functions

Trignometric and Related Functions

The stylesheet uses the standard <apply></apply> construction with all of the trigonometric, logarithmic, hyperbolic functions and the inverses of these functions, that are in standard Content MathML. Thus, the stylesheet renders these functions in consistent notation, with arguments enclosed in parentheses after the function name. For example,

<apply><sin />
    <ci>&theta;</ci>
</apply>

is rendered by the stylesheet as θ rather than sinθ .

Cardinality

We use function notation for cardinality. The markup <card /> in standard Content MathML is rendered with our stylesheet by . This markup works in the usual way with the standard <apply></apply> construction. For example,

<apply><card />
    <ci>A</ci>
</apply>
is rendered by the stylesheet as A rather than |A| .

Determinant

Similarly, we use function notation for determinants. The markup <determinant /> in standard Content MathML is rendered by our stylesheet as . This markup works in the usual way with the standard <apply></apply> construction. For example

<apply><determinant />
    <ci>A</ci>
</apply>

is rendered by the stylesheet as A rather than |A| .

New Special Functions

Markup has been added for a number of special functions, particularly those related to probability and statistics.

Variance
The markup <variance /> denotes variance and is rendered by the stylesheet as .
Covariance
The markup <covariance /> denotes covariance and is rendered by the stylesheet as .
Correlation
The markup <correlation /> denotes correlation and is rendered by the stylesheet as .
Beta
The markup <Beta /> denotes the beta function and is rendered by the stylesheet as .
Gamma
The markup <Gamma /> denotes the gamma function and is rendered by the stylesheet as .
Zeta
The markup <zeta /> denotes the zeta function and is rendered by the stylesheet as .
Lebesgue measure
The markup <lebesgue /> denotes Lebesgue measure and is rendered by the stylesheet as .
Closure
The markup <closure /> denotes closure and is rendered by the stylesheet as .

Each of these works in the usual with the standard <apply></apply> construction. With this construction, <covariance /> and <correlation /> ordinarily have two arguments; the other functions in the list ordinarily have one argument. For example,

<apply><covariance />
    <ci>X</ci>
    <ci>Y</ci>
</apply>

is rendered by the stylesheet as X Y while

<apply><Gamma />
    <ci>x</ci>
</apply>

is rendered by the stylesheet as x .

Chi-Square Quantiles

The markup <chisquare /> has been added for the chi-square quantile function with a specified degrees of freedom. This markup shoud be used in the standard <apply></apply> construction, with two arguments. For example, the markup

<apply><chisquare />
    <ci>k</ci>
    <ci>p</ci>
</apply>
is rendered by the stylesheet as k p .

Indicator Functions

The markup <indicate /> denotes an indicator function, and is rendered by the stylesheet as . This markup is used with the <apply></apply> construction. For example, the markup

<apply>
    <apply><indicate />
        <ci>A</ci>
    </apply>
    <ci>x</ci>
</apply>
is rendered by the stylesheet as A x .

Positive and Negative Parts

The markup <positivepart> and <negativepart> denote the positive and negative parts of a real number, respectivley. These should be used with the standard <apply></apply> construction, with one argument.. For example, the markup

<apply><positivepart />
    <ci>x</ci>
</apply>
is rendered by the stylesheet as x , while the markup
<apply><negativepart />
    <ci>x</ci>
</apply>
is rendered by the stylesheet as x .

Norm and Inner Product

The markup <norm /> denotes the norm of a vector. The markup should be used with the <apply></apply> construction, with one argument. For example, the markup

<apply><norm />
    <ci>x</ci>
</apply>
is rendered by the stylesheet as x .

The markup <innerproduct /> denotes inner product. The markup should be used with the <apply></apply> construction, with two arguments. For example, the markup

<apply><innerproduct />
    <ci>x</ci>
    <ci>y</ci>
</apply>
is rendered by the stylesheet as x y .

Factorial

The markup <factorial /> for factorials has been extended to denote the falling power formula used for counting permutations and an even more general permutation formula. (For the definitions of these, see the section on Combinatorial Structures.) This markup should be used in the standard <apply></apply> construction, with one, two, or three arguments. With one argument, the markup denotes the standard factorial, so that

<apply><factorial />
    <ci>n</ci>
</apply>

is rendered by the stylesheet as n . With two arguments, the markup denotes the falling power factorial formula, so that

<apply><factorial />
    <ci>n</ci>
    <ci>k</ci>
</apply>

is rendered by the stylesheet as n k . With three arguments, the markup denotes the general factorial formula, so that

<apply><factorial />
    <ci>n</ci>
    <ci>k</ci>
    <ci>c</ci>
</apply>

is rendered by the stylesheet as n k c

Binomial and Multinomial Coefficients

The markup <binomial /> is used for binomial and multinomial coefficients. This markup should be used with the standard <apply></apply> construction; with two arguments it represents a binomial coefficient, and with more than two arguments it represents a multinomial coefficient. For example,

<apply><binomial />
    <ci>n</ci>
    <ci>k</ci>
</apply>

is rendered by the stylesheet as n k , and

<apply><binomial />
    <ci>n</ci>
    <ci>j</ci>
    <ci>k</ci>
</apply>

is rendered by the stylesheet as n j k .

4. Relations

General Relations

The standard <apply></apply> construction has been extended with the addition of a type attribute. The type="relation" setting uses standard notation associated with a relation. For example,

<apply type="relation">
    <ci>R</ci>
    <ci>x</ci>
    <ci>y</ci>
</apply>
is rendered by the stylesheet as R x y , as opposed to
<apply>
    <ci>R</ci>
    <ci>x</ci>
    <ci>y</ci>
</apply>
which is rendered by the stylesheet in the usual way as R x y .

Special Relations

Markup has been added for a number of special relation symbols, beyond the ones in standard Content MathML. For the most part, these relations are associated with partial orders, equivalence relations, and other transitive relations.

Weak precedes
<preceq /> which is rendered by the stylesheet as .
Weak succeeds
<succeq /> which is rendered by the stylesheet as .
Strong precedes
<prec /> which is rendered by the stylesheet as .
Strong succeeds
<succ /> which is rendered by the stylesheet as .
Parallel
<parallel /> which is rendered by the stylesheet as .
Perpendicular
<perp /> which is rendered by the stylesheet as .
Weak approximation
<approxeq /> which is rendered by the stylesheet as .
Congruent
<congruent /> which is rendered by the stylesheet as .
Left arrow
<left /> which is rendered by the stylesheet as .
Right arrow
<right /> which is rendered by the stylesheet as .
Left-right arrow
<leftright /> which is rendered by the stylesheet as .
Up arrow
<up /> which is rendered by the stylesheet as .
Down arrow
<down /> which is rendered by the stylesheet as .
Up-down arrow
<updown /> which is rendered by the stylesheet as .
Of course, each of these should be used with the <apply type="relation"></apply> construction, with two arguments. For example,
<apply type="relation"><preeq />
    <ci>x</ci>
    <ci>y</ci>
</apply>
is rendered by the stylesheet as x y .

Equivalence Class

The markup <equivalenceclass /> denotes an equivalence class. This markup should be used with the standard <apply></apply> construction, with one argument. For example, the markup

<apply><equivalenceclass />
    <ci>x</ci>
</apply>
is rendered by the stylesheet as x .

Mapping

The <mapsto /> markup has been added for the description of functions. This markup should be used with the standard <apply></apply> construction, with either two are three arguments. For example, the markup

<apply><mapsto />
    <ci>x</ci>
    <apply><power />
        <ci>x</ci>
        <cn>2</cn>
    </apply>
</apply>
is rendered by the stylesheet as x x 2 , while the markup
<apply><mapsto />
    <ci>f</ci>
    <ci>A</ci>
    <ci>B</ci>
</apply>
is rendered by the stylesheet as f A B ,

5. Operations

We have added several new operations, beyond the ones in standard Content MathML.

Convolution

The markup <convolve /> denotes convolution, and is rendered by the stylesheet as . This markup is ordinarily used with the <apply></apply> construction, with two or more arguments. For example, the markup

<apply><convolve />
    <ci>f</ci>
    <ci>g</ci>
    <ci>g</ci>
</apply>
is rendered by the stylesheet as f g h .

Convolution Power

The markup <convolutionpower /> denotes convolution power (repeated covolution of a function with itself). It should be used with the <apply></apply> construction, with two arguments. For example, the markup

<apply><convolutionpower />
    <ci>f</ci>
    <ci>n</ci>
</apply>
is rendered by the stylesheet as f n .

Composition Power

The composition operation <compose /> is present in standard Content MathML. We have added <compositionpower /> to denote repeated composition of a function with itself. This markup should be used with the standard <apply></apply> construction, with two arguments. For example, the markup

<apply><compositionpower />
    <ci>f</ci>
    <ci>n</ci>
</apply>
is rendered by the stylesheet as f n .

Plus-Minus

The markup <plusminus /> denotes the plus-minus operator, rendered by the stylesheet as . The plus-minus operator is both unary and binary, so the markup should used with the <apply></apply> construction, with either one or two arguments. For example, the markup

<apply><plusminus />
    <ci>a</ci>
</apply>
is rendered by the stylesheet as a , while the markup
<apply><plusminus />
    <ci>a</ci>
    <ci>b</ci>
</apply>
is rendered by the stylesheet as a b .

Power Set

The markup <powerset /> denotes the power set operator, rendered by the stylesheet as . This markup is ordinarily used with the <apply></apply> construction, with one argeument. For example, the markup

<apply><powerset />
    <ci>A</ci>
</apply>
is rendered by the stylesheet as A .

Symmetric Difference

The markup <symmdiff /> denotes the symmetric difference operator, rendered by the stylesheet as . This markup is ordinarily used with the <apply></apply> construction, with two arguments. For example, the markup

<apply><symmdiff />
    <ci>A</ci>
    <ci>B</ci>
</apply>
is rendered by the stylesheet as A B .

Union and Intersection

New markup expressions <Union /> and <Intersect /> have been added for unions and intersections, respectively, over collections. The distinction between the standard markup <union /> and the new markup <Union /> is analogous to the distinction between <plus /> and <sum /> in standard markup. For example, the markup

<apply><Union />
    <condition>
        <apply><in />
            <ci>i</ci>
            <ci>I</ci>
        </apply>
    </condition>
    <apply><selector />
        <ci>A</ci>
        <ci>i</ci>
    </apply>
</apply>
is rendered by the stylesheet as i I A i , while the markup
<apply><Union />
    <bvar><ci>i</ci></bvar>
    <lowlimit><cn>1</cn></lowlimit>
    <uplimit><ci>n</ci></uplimit>
    <apply><selector />
        <ci>A</ci>
        <ci>i</ci>
    </apply>
</apply>
is rendered by the stylesheet as i 1 n A i . The markup for intersection works in exactly the same way, with <Intersect /> replacing <Union />.

6. Infimum and Related Markup

Infimum and Supremum

Standard Content MathML has markup for minimums and maximums. We have added analogous markup for infima and suprema. The markup <inf /> and <sup /> are used with the standard <apply></apply> construction. Thus for example, the markup

<apply><inf />
    <ci>a</ci>
    <ci>b</ci>
    <ci>c</ci>
</apply>
is rendered by the stylesheet as a b c , and the markup
<apply><inf />
    <bvar>
        <apply><selector />
            <ci>a</ci>
            <ci>n</ci>
        </apply>
    </bvar>
    <condition>
        <apply><in />
            <ci>n</ci>
            <naturalnumbers />
        </apply>
    </condition>
</apply>
is rendered by the stylesheet as a n n . Of course, the markup for suprema is entirely analogous, with <sup /> replacing <inf />.

Limit Inferior and Limit Superior

Standard Content MathML has markup for limits. We have added analogous markup for limit inferior and limit superior. The markup <limitinf /> and <limitsup /> are used with the standard <apply></apply> construction. Thus, for example, the markup

<apply><limitsup />
        <condition>
            <apply><tendsto />
                <ci>t</ci>
                <ci>x</ci>
            </apply>
        </condition>
        <apply>
            <ci>F</ci>
            <ci>t</ci>
        </apply>
    </apply>
is rendered by the stylesheet as t x F t . Of course, the markup for limit inferior is entirely analogous, with <limitinf /> replacing <limitsup />.

7. Special Sets of Numbers

Standard Content MathML has markup for several special sets of numbers. We extend this to include

Positive integers
The markup <positiveintegers /> denotes the set of positive integers, rendered by the stylesheet as .
Positive rationals
The markup <positiverationals /> denotes the set of positive rational numbers, rendered by the stylesheet as .
Algebraic numbers
The markup <algebraicnumbers /> denotes the set of algebraic numbers, rendered by the stylesheet as .

8. Hypothesis Testing

We have added special markup for hypothesis testing, with a type attribute to distinguish between the null and alternative hypotheses. Thus, <hypothesis type="null" /> is rendered by the stylesheet as , while <hypothesis type="alt" /> is rendered by the stylesheet as . This markup is ordinarily used with the <apply></apply> construction, with one argument (representing the hypothesis). For example, the markup

<apply><hypothesis type="null" />
    <apply><eq />
        <ci>&mu;</ci>
        <cn>0</cn>
    </apply>
</apply>
is rendered by the stylesheet as μ 0 .

9. Playing Cards

Special Denominations

The markup <ace />, <jack />, <queen />, and <king /> denote the denominations of ace, jack, queen, and king, respectively. The stylesheet renders these as , , , and , respectively. These should be considered as special constants. Indeed, the other denominations are ordinarily denoted by the standard numbers 2, 3, 4, 5, 6, 7, 8, 9, and 10.

Suits

The markup <spades />, <hearts />, <diamonds />, and <clubs /> denote the suits, and are rendered by the stylesheet as , , , and , respectively.. The markup for a suit is ordinarily used with the <apply></apply> construction, with one or more arguments, to represent a sequence of cards in that suit. For example, the markup

<apply> <hearts />
    <cn>2</cn>
    <cn>3</cn>
    <cn>4</cn>
    <cn>5</cn>
</apply>

would be rendered by the stylesheet as 2 3 4 5

10. Miscellaneous Additions

Et Cetera

The markup <etc /> denotes the ubiquitous concept of and so forth. The stylesheet renders this with three dots, in either a lower position or a middle position, depending on a type attribute. For example, the markup

<vector>
    <apply><selector />
        <ci>x</ci>
        <cn>1</cn>
    </apply>
    <apply><selector />
        <ci>x</ci>
        <cn>2</cn>
    </apply>
    <etc />
    <apply><selector />
        <ci>x</ci>
        <ci>n</ci>
    </apply>
</vector>
is rendered by the stylesheet as x 1 x 2 x n , while the markup
<apply><plus />
    <apply><selector />
        <ci>x</ci>
        <cn>1</cn>
    </apply>
    <apply><selector />
        <ci>x</ci>
        <cn>2</cn>
    </apply>
    <etc type="middle" />
    <apply><selector />
        <ci>x</ci>
        <ci>n</ci>
    </apply>
</apply>
is rendered by the stylesheet as x 1 x 2 x n .

Odds

The markup <odds /> denotes odds in gambling and probability. This markup should be used with the standard <apply></apply> construction, with two arguments. For example, the markup

<apply><odds />
    <ci>a</ci>
    <ci>b</ci>
</apply>
is rendered by the stylesheet as a b .

Ordinals

The markup <ordinal /> is used for ordinal numbers. Thie markup should be used with the standard <apply></apply> construction, with one argument. The type of suffix is controlled by a type attribute, with th as the default. For example

<apply><ordinal />
    <ci>n</ci>
</apply>
is rendered by the stylesheet as n ;
<apply><ordinal type="st"/>
    <cn>1</cn>
</apply>
is rendered by the stylesheet as 1 ;
<apply><ordinal type="nd"/>
    <cn>2</cn>
</apply>
is rendered by the stylesheet as 2 ; and
<apply><ordinal type="rd"/>
    <cn>3</cn>
</apply>
is rendered by the stylesheet as 3 .