# 4 Content Markup

Overview: Mathematical Markup Language (MathML) Version 3.0
Previous: 3 Presentation Markup
Next: 5 Mixing Several Markups

4 Content Markup
4.1 Introduction
4.2 Strict Content MathML
4.2.1 The structure of MathML Content Expressions
4.2.2 Encoding OpenMath Objects
4.2.3 Numbers (cn)
4.2.4 Symbols and Identifiers
4.2.4.1 Content Identifiers (ci)
4.2.4.2 Content Symbols (csymbol)
4.2.5 Function Application (apply)
4.2.6 Bindings and Bound Variables (bind)
4.2.6.1 Bindings
4.2.6.2 Bound Variables
4.2.6.3 Examples
4.2.7 Structure Sharing (share)
4.2.7.1 The share element
4.2.7.2 An Acyclicity Constraint
4.2.7.3 Structure Sharing and Binding
4.2.7.4 Structure Sharing and cdbase
4.2.9 In Situ Error Markup
4.3 Pragmatic Content MathML
4.3.1 Pragmatic Numbers (cn)
4.3.2 Operator Elements
4.3.3 Pragmatic Elements with Attributes
4.3.4 Bindings with apply
4.3.5 Container Markup
4.3.5.1 Container Markup for Constructor Symbols
4.3.5.2 Container Markup for Binding Constructors
4.3.5.3 Container Markup for Applicative Constructors
4.3.6 Symbols and Identifiers With Presentation MathML
4.3.7 Elementary MathML Types on Operator and Container Elements
4.3.8 Qualifiers for Bound Variables
4.3.8.1 Domain of Application
4.3.8.2 Domain of Application in Bindings
4.3.8.3 degree
4.3.8.4 Upper and Lower Limits (uplimit and lowlimit)
4.3.8.5 Conditions (condition)
4.3.9 Lifted Associative Commutative Operators
4.3.10 basic elements
4.3.10.1 Interval (interval)
4.3.10.2 Inverse (inverse)
4.3.10.3 Lambda (lambda)
4.3.10.4 Function composition (compose)
4.3.10.5 Identity function (ident)
4.3.10.6 Domain (domain)
4.3.10.7 codomain (codomain)
4.3.10.8 Image (image)
4.3.10.9 Piecewise declaration (piecewise, piece, otherwise)
4.3.11 Arithmetic, Algebra and Logic
4.3.11.1 Quotient (quotient)
4.3.11.2 Factorial (factorial)
4.3.11.3 Division (divide)
4.3.11.4 Maximum (max)
4.3.11.5 Minimum (min)
4.3.11.6 Subtraction (minus)
4.3.11.8 Exponentiation (power)
4.3.11.9 Remainder (rem)
4.3.11.10 Multiplication (times)
4.3.11.11 Root (root)
4.3.11.12 Greatest common divisor (gcd)
4.3.11.13 And (and)
4.3.11.14 Or (or)
4.3.11.15 Exclusive Or (xor)
4.3.11.16 Not (not)
4.3.11.17 Implies (implies)
4.3.11.18 Universal quantifier (forall)
4.3.11.19 Existential quantifier (exists)
4.3.11.20 Absolute Value (abs)
4.3.11.21 Complex conjugate (conjugate)
4.3.11.22 Argument (arg)
4.3.11.23 Real part (real)
4.3.11.24 Imaginary part (imaginary)
4.3.11.25 Lowest common multiple (lcm)
4.3.11.26 Floor (floor)
4.3.11.27 Ceiling (ceiling)
4.3.12 Relations
4.3.12.1 Equals (eq)
4.3.12.2 Not Equals (neq)
4.3.12.3 Greater than (gt)
4.3.12.4 Less Than (lt)
4.3.12.5 Greater Than or Equal (geq)
4.3.12.6 Less Than or Equal (leq)
4.3.12.7 Equivalent (equivalent)
4.3.12.8 Approximately (approx)
4.3.12.9 Factor Of (factorof)
4.3.13 Calculus and Vector Calculus
4.3.13.1 Integral (int)
4.3.13.2 Differentiation (diff)
4.3.13.3 Partial Differentiation (partialdiff)
4.3.13.4 Divergence (divergence)
4.3.13.6 Curl (curl)
4.3.13.7 Laplacian (laplacian)
4.3.14 Theory of Sets
4.3.14.1 Set (set)
4.3.14.2 List (list)
4.3.14.3 Union (union)
4.3.14.4 Intersect (intersect)
4.3.14.5 Set inclusion (in)
4.3.14.6 Set exclusion (notin)
4.3.14.7 Subset (subset)
4.3.14.8 Proper Subset (prsubset)
4.3.14.9 Not Subset (notsubset)
4.3.14.10 Not Proper Subset (notprsubset)
4.3.14.11 Set Difference (setdiff)
4.3.14.12 Cardinality (card)
4.3.14.13 Cartesian product (cartesianproduct)
4.3.15 Sequences and Series
4.3.15.1 Sum (sum)
4.3.15.2 Product (product)
4.3.15.3 Limits (limit)
4.3.15.4 Tends To (tendsto)
4.3.16 Elementary classical functions
4.3.16.1 common trigonometric functions
4.3.16.2 Exponential (exp)
4.3.16.3 Natural Logarithm (ln)
4.3.16.4 Logarithm (log)
4.3.17 Statistics
4.3.17.1 Mean (mean)
4.3.17.2 Standard Deviation (sdev)
4.3.17.3 Variance (variance)
4.3.17.4 Median (median)
4.3.17.5 Mode (mode)
4.3.18 Linear Algebra
4.3.18.1 Vector (vector)
4.3.18.2 Matrix (matrix)
4.3.18.3 Matrix row (matrixrow)
4.3.18.4 Determinant (determinant)
4.3.18.5 Transpose (transpose)
4.3.18.6 Selector (selector)
4.3.18.7 Vector product (vectorproduct)
4.3.18.8 Scalar product (scalarproduct)
4.3.18.9 Outer product (outerproduct)
4.3.19 Constant and Symbol Elements
4.3.19.1 integers (integers)
4.3.19.2 reals (reals)
4.3.19.3 Rational Numbers (rationals)
4.3.19.4 Natural Numbers (naturalnumbers)
4.3.19.5 complexes (complexes)
4.3.19.6 primes (primes)
4.3.19.7 Exponential e (exponentiale)
4.3.19.8 Imaginary i (imaginaryi)
4.3.19.9 Not A Number (notanumber)
4.3.19.10 True (true)
4.3.19.11 False (false)
4.3.19.12 Empty Set (emptyset)
4.3.19.13 pi (pi)
4.3.19.14 Euler gamma (eulergamma)
4.3.19.15 infinity (infinity)
4.4 Deprecated content Elements
4.4.1 Declare (declare)
4.5 Rendering of Content Elements
4.5.1 Numbers
4.5.2 Symbols and Identifiers
4.5.3 Applications
4.5.4 Binders
4.5.6 Structure Sharing
4.5.7 Rest

## 4.1 Introduction

In MathML 3, content markup is divided into two subsets "Strict"- and "Pragmatic" Content MathML. The first subset uses a minimal set of elements representing the meaning of a mathematical expression in a uniform structure, while the second one tries to strike a pragmatic balance between verbosity and formality. Both forms of content expressions are legitimate and have their role in representing mathematics. Strict Content MathML is canonical in a sense and simplifies the implementation of content MathML processors and the comparison of content expressions and Pragmatic Content MathML is much simpler and more intuitive for humans to understand, read, and write.

Strict content MathML expressions can directly be given a formal semantics in terms of "OpenMath Objects" [OpenMath2004], and we interpret pragmatic content MathML expressions by specifying equivalent Strict variants, so that they inherit their semantics.

## 4.2 Strict Content MathML

### 4.2.1 The structure of MathML Content Expressions

MathML content encoding is based on the concept of an expression tree built up from

As a general rule, the terminal nodes in the tree represent basic mathematical objects such as numbers, variables, arithmetic operations and so on. The internal nodes in the tree generally represent some kind of function application or other mathematical construction that builds up a compound object. Function application provides the most important example; an internal node might represent the application of a function to several arguments, which are themselves represented by the terminal nodes underneath the internal node.

This section provides the basic XML Encoding of content MathML expression trees. General usage and the mechanism used to associate mathematical meaning with symbols are provided here. [mathml3cds] provides a complete listing of the specific Content MathML symbols defined by this specification along with full reference information including attributes, syntax, and examples. It also describes the intended semantics of those symbols and suggests default renderings. The rules for using presentation markup within content markup are explained in Section 5.3.1 Presentation Markup in Content Markup.

### 4.2.2 Encoding OpenMath Objects

Strict Content MathML is designed to be and XML encoding of OpenMath Objects (see [OpenMath2004]), which constitute the semantics of strict content MathML expressions. The table below gives an element-by-element correspondence between the OpenMath XML encoding of OpenMath objects and strict content MathML.

strict Content MathML OpenMath
cn OMI, OMF
csymbol OMS
ci OMV
apply OMA
bind OMBIND
bvar OMBVAR
share OMR
semantics OMATTR, OMATP
annotation, annotation-xml OMFOREIGN
error OME

### 4.2.3 Numbers (cn)

 Editorial note: MiKo Some of the original parts of this section has been moved to the section as pragmatic MathML, it is rather new and might change at any moment as the discussion in the Math WG progresses.

The cn element is the MathML element used to represent numbers. Strict content MathML supports integers, real numbers, double precision floating point numbers.Pragmatic content MathML also supports representation of real numbers by e-notation, rational numbers and complex numbers.

Where it makes sense, the base in which the number is written can be specified. The content of a cn element is PCDATA. The permissible attributes on the cn are:

Name Values Default
type "integer" | "real" | "double" real
base number 10
hex hex

The type attribute specifies which kind of number is represented in the cn element. Unless otherwise specified, the default "real" is used. The attribute base is used to specify how the content is to be parsed. The attribute value is a base 10 positive integer giving the value of base in which the PCDATA is to be interpreted. The base attribute should only be used on elements with type "integer" or "real". Its use on cn elements of other type is deprecated. The default value for base is "10".

Each data type implies that the content be of a certain form, as detailed below.

integer

An integer is represented by an optional sign followed by a string of one or more "digits". How a "digit" is interpreted depends on the base attribute. If base is present, it specifies the base for the digit encoding, and it specifies it base 10. Thus base='16' specifies a hexadecimal encoding.

When base > 10, letters are used in alphabetical order as digits. For example,

 7FE0 $7FE0$

encodes the number written as 32736 in base ten.

When base > 36, some integers cannot be represented using numbers and letters alone and it is up to the application what additional characters (if any) may be used for digits. For example,

 10F $10F$

represents the number written in base 10 as 1,000,015. However, the number written in base 10 as 1,000,037 cannot be represented using letters and numbers alone when base is 1000.

real

A real number is presented in radix notation. Radix notation consists of an optional sign ("+" or "-") followed by a string of digits possibly separated into an integer and a fractional part by a "decimal point". Some examples are 0.3, 1, and -31.56. If a different base is specified, then the digits are interpreted as being digits computed to that base (in the same was as described for type "integer").

double

This type is used to mark up those double-precision floating point numbers that can be represented in the IEEE 754 standard. This includes a subset of the (mathematical) real numbers, negative zero, positive and negative real infinity and a set of "not a number" values.

The content of a cn element may be PCDATA (representing numeric values as described below), a infinity symbol (representing positive real infinity), a minfinity symbol (representing negative real infinity) or a notanumber element.

 Editorial note: Miko Stephen is postulating an mininfinity symbol here, but we do not have one yet.
 Editorial note: MiKo We have decided in the F2F that we are adding a hex attribute to allow the encoding of IEEE NaNs. David will write something about this here. Furthermore, we should not forget to add the hex attribute on the notanumber and infinity elements in pragmatic content MathML.

If the content is PCDATA, it is interpreted as a real number in scientific notation. The number then has one or two parts, a significand and possibly an exponent. The significand has the format of a base 10 real number, as described above. The exponent (if present) has the format of a base 10 integer as described above. If the exponent is not present, it is taken to have the value 0. The value of the number is then that of the significand times ten to the power of the exponent.

A special case of PCDATA content is recognized. If a number of the above form has a negative sign and all digits of the significand are zero, then it is taken to be a negative zero in the sense of the IEEE 754 standard.

### 4.2.4 Symbols and Identifiers

The notion of constructing a general expression tree is essentially that of applying an operator to sub-objects. For example, the sum "x+y" can be thought of as an application of the addition operator to two arguments x and y. And the expression "cos(π)" as the application of the cosine function to the number π.

In Content MathML, elements are used for operators and functions to capture the crucial semantic distinction between the function itself and the expression resulting from applying that function to zero or more arguments. This is addressed by making the functions self-contained objects with their own properties and providing an explicit apply construct corresponding to function application. We will consider the apply construct in the next section.

In a sum expression "x+y" above, x and y typically taken to be "variables", since they have properties, but no fixed value, whereas the addition function is a "constant" or "symbol" as it denotes a specific function, which is defined somewhere externally. (Note that "symbol" is used here in the abstract sense and has no connection with any presentation of the construct on screen or paper).

#### 4.2.4.1 Content Identifiers (ci)

Strict content MathML uses the ci element (for "content identifier") to construct a variable, or an identifier that is not a symbol. Its PCDATA content is interpreted as a name that identifies it. Two variables are considered equal, iff their names are in the respective scope (see Section 4.2.6 Bindings and Bound Variables (bind) for a discussion). A type attribute indicates the type of object the symbol represents. Typically, ci represents a real scalar, but no default is specified.

Name values default
type string unspecified
name string unspecified
name string unspecified

#### 4.2.4.2 Content Symbols (csymbol)

Due to the nature of mathematics the meaning of the mathematical expressions must be extensible. The key to extensibility is the ability of the user to define new functions and other symbols to expand the terrain of mathematical discourse. The csymbol element is used represent a "symbol" in much the same way that ci is used to construct a variable. The difference is that csymbol should refer to some mathematically defined concept with an external definition referenced via the content dictionary attributes, whereas ci is used for identifiers that are essentially "local" to the MathML expression.

In MathML 3, external definitions are grouped in Content Dictionaries (structured documents for the definition of mathematical concepts; see [OpenMath2004] and [mathml3cds]).

We need three bits of information to fully identify a symbol: a symbol name, a Content Dictionary name, and (optionally) a Content Dictionary base URI, which we encode in the textual content (which is the symbol name) and two attributes of the csymbol element: cd and cdbase. The Content Dictionary is the location of the declaration of the symbol, consisting of a name and, optionally, a unique prefix called a cdbase which is used to disambiguate multiple Content Dictionaries of the same name. There are multiple encodings for content dictionaries, this referencing scheme does not distinguish between them. If a symbol does not have an explicit cdbase attribute, then it inherits its cdbase from the first ancestor in the XML tree with one, should such an element exist. In this document we have tended to omit the cdbase for brevity.

Name values default
cdbase URI inherited
cd NCName required
 Editorial note: MiKo need to fix the default URI here
Issue default_cd wiki (member only) We might make the cd attribute optional? Then that would refer to the current CD if we are in one, or we could make cd inherit like cdbase. That would save bandwidth None recorded

There are other properties of the symbol that are not explicit in these fields but whose values may be obtained by inspecting the Content Dictionary specified. These include the symbol definition, formal properties and examples and, optionally, a Role which is a restriction on where the symbol may appear in a MathML expression tree. The possible roles are described in Chapter 8 MathML3 Content Dictionaries.

 Christoffel $\mathrm{Christoffel}$

For backwards compatibility with MathML2 and to facilitate the use of MathML within a URI-based framework (such as RDF [rdf] or the Semantic Web), the csymbol content together with the values of the cd and cdbase attributes can be combined in the definitionURL attribute: we provide the following scheme for constructing a canonical URI for an MathML Symbol, which can be given in the definitionURL attribute.

URI = cdbase-value + '/' + cd-value + '#' + content

In the case of the Christoffel symbol above this would be the URI

http://www.example.com/VectorCalculus#Christoffel

For backwards compatibility with MathML2, we do not require that the definitionURL point to a content dictionary. But if the URL in this attribute is of the form above, it will be interpreted as the canonical URL of a MathML symbol. So the representation above would be equivalent to the one below:

 Christoffel $\mathrm{Christoffel}$
Issue MathML_CDs_URI wiki (member only) We still have to fix this. Maybe it should correspond to the final resting place for CDs. None recorded
Issue definitionURL_encoding wiki (member only)   ISSUE-17 (member only) The URI encoding of the triplet we propose here does not work (not yet for MathMLCDs and not at all for OpenMath2 CDs). The URI reference proposed uses a bare name pointer #Christoffel at the end, which points to the element that has and ID-type attribute with value Christoffel, which is not present in either of these formats. Moreover, it does not scale well with extended CD formats like the OMDoc 1.8 format currently under development None recorded
Issue cdbase-default wiki (member only)   ISSUE-13 (member only) For the inheritance mechanism to be complete, it would make sense to define a default cdbase attribute value, e.g. at the math element. We'd support expressions ignorant of cdbase as they all are thus far. Something such as http://www.w3.org/Math/CDs/official ? Moreover the MathML content dictionaries should contain such. None recorded

### 4.2.5 Function Application (apply)

The most fundamental way of building a compound object in mathematics is by applying a function or an operator to some arguments. MathML supplies an infrastructure to represent this in expression trees, which we will present in this section.

An apply element is used to build an expression tree that represents the result of applying a function or operator to its arguments. The tree corresponds to a complete mathematical expression. Roughly speaking, this means a piece of mathematics that could be surrounded by parentheses or "logical brackets" without changing its meaning.

Name values default
cdbase URI inherited

For example, (x + y) might be encoded as

 plusxy $\mathrm{plus}(x, y)$

The opening and closing tags of apply specify exactly the scope of any operator or function. The most typical way of using apply is simple and recursive. Symbolically, the content model can be described as:

<apply> op a b </apply>

where the operands a and b are MathML expression trees themselves, and op is a MathML expression tree that represents an operator or function. Note that apply constructs can be nested to arbitrary depth.

An apply may in principle have any number of operands:

<apply> op a b [c...] </apply>

For example, (x + y + z) can be encoded as

  plus x y z  $\mathrm{plus}(x, y, z)$

Mathematical expressions involving a mixture of operations result in nested occurrences of apply. For example, a x + b would be encoded as

 plus times a x b  $\mathrm{plus}(\mathrm{times}(a, x), b)$

There is no need to introduce parentheses or to resort to operator precedence in order to parse the expression correctly. The apply tags provide the proper grouping for the re-use of the expressions within other constructs. Any expression enclosed by an apply element is viewed as a single coherent object.

An expression such as (F+G)(x) might be a product, as in

 times plus F G x  $\mathrm{times}(\mathrm{plus}(F, G), x)$

or it might indicate the application of the function F + G to the argument x. This is indicated by constructing the sum

 plusFG $\mathrm{plus}(F, G)$

and applying it to the argument x as in

  plus F G x  $\mathrm{plus}(F, G)(x)$

Both the function and the arguments may be simple identifiers or more complicated expressions.

The apply element is conceptually necessary in order to distinguish between a function or operator, and an instance of its use. The expression constructed by applying a function to 0 or more arguments is always an element from the codomain of the function. Proper usage depends on the operator that is being applied. For example, the plus operator may have zero or more arguments, while the minus operator requires one or two arguments to be properly formed.

If the object being applied as a function is not already one of the elements known to be a function (such as sin or plus) then it is treated as if it were a function.

### 4.2.6 Bindings and Bound Variables (bind)

Some complex mathematical objects are constructed by the use of bound variables. For instance the integration variables in an integral expression is one.

#### 4.2.6.1 Bindings

Such expressions are represented as MathML expression trees using the bind element. Its first child is a MathML expression that represents a binding operator (the integral operator in our example). This can be followed by a non-empty list of bvar elements for the bound variables, and the body of the binding, it is another content MathML expression.

Name values default
cdbase URI inherited

#### 4.2.6.2 Bound Variables

The bvar element is a special qualifier element that is used to denote the bound variable of a binding expression, e.g. in sums, products, and quantifiers or user defined functions.

Name values default
cdbase URI inherited

Bound variables are identified by comparing the XML information sets of the ci content after first carrying out XML space normalization. Such identification can be made explicit by placing an id on the ci element in the bvar element and referring to it using the name attribute on all other instances. An example of this approach is

  forall x lt x 1  $\mathrm{forall}x\mathrm{lt}(x, 1)$

This id based approach is especially helpful when constructions involving bound variables are nested.

It can be necessary to associate additional information with a bound variable one or more instances of it. The information might be something like a detailed mathematical type, an alternative presentation or encoding or a domain of application. Such associations are accomplished in the standard way by replacing a ci element (even inside the bvar element) by a semantics element containing both it and the additional information. Recognition of and instance of the bound variable is still based on the actual ci elements and not the semantics elements or anything else they may contain. The id based approach outlined above may still be used.

#### 4.2.6.3 Examples

  forall x eq minusxx 0  $\mathrm{forall}x\mathrm{eq}(\mathrm{minus}(x, x), 0)$
  int x power x 7  $\mathrm{int}x\mathrm{power}(x, 7)$
 Editorial note: MiKo We need to say something about alpha-conversion here for OpenMath compatibility.

### 4.2.7 Structure Sharing (share)

To conserve space, MathML expression trees can make use of structure sharing

#### 4.2.7.1 The share element

This element has an href attribute whose value is the value of a URI referencing an id attribute of a MathML expression tree. When building the MathML expression tree, the share element is replaced by a copy of the MathML expression tree referenced by the href attribute. Note that this copy is structurally equal, but not identical to the element referenced. The values of the share will often be relative URI references, in which case they are resolved using the base URI of the document containing the share element.

Name values default
href URI

For instance, the mathematical object f(f(f(a,a),f(a,a)),f(a,a),f(a,a)) can be encoded as either one of the following representations (and some intermediate versions as well).

$[itex] <apply> <apply> <ci>f</ci> <ci>f</ci> <apply> <apply id="t1"> <ci>f</ci> <ci>f</ci> <apply> <apply id="t11"> <ci>f</ci> <ci>f</ci> <ci>a</ci> <ci>a</ci> <ci>a</ci> <ci>a</ci> </apply> </apply> <apply> <share href="#t11"/> <ci>f</ci> <ci>a</ci> <ci>a</ci> </apply> </apply> </apply> <apply> <share href="#t1"/> <ci>f</ci> <apply> <ci>f</ci> <ci>a</ci> <ci>a</ci> </apply> <apply> <ci>f</ci> <ci>a</ci> <ci>a</ci> </apply> </apply> </apply>$                     [/itex]

#### 4.2.7.2 An Acyclicity Constraint

We say that an element dominates all its children and all elements they dominate. An share element dominates its target, i.e. the element that carries the id attribute pointed to by the href attribute. For instance in the representation above the apply element with id="t1" and also the second share dominate the apply element with id="t11".

The occurrences of the share element must obey the following global acyclicity constraint: An element may not dominate itself. For instance the following representation violates this constraint:

<apply id="foo">
<csymbol cd="arith1">plus</csymbol>
<cn>1</cn>
<apply>
<csymbol cd="arith1">plus</csymbol>
<cn>1</cn>
<share href="#foo"/>
</apply>
</apply>

Here, the apply element with id="foo" dominates its third child, which dominates the share element, which dominates its target: the element with id="foo". So by transitivity, this element dominates itself, and by the acyclicity constraint, it is not an MathML expression tree. Even though it could be given the interpretation of the continued fraction this would correspond to an infinite tree of applications, which is not admitted by Content MathML

Note that the acyclicity constraints is not restricted to such simple cases, as the following example shows:

<apply id="bar">              <apply id="baz">
<csymbol cd="arith1">plus</csymbol>  <csymbol cd="arith1">plus</csymbol>
<cn>1</cn>                      <cn>1</cn>
<share href="#baz"/>             <share href="#bar"/>
</apply>                        </apply>

Here, the apply with id="bar" dominates its third child, the share with href="#baz", which dominates its target apply with id="baz", which in turn dominates its third child, the share with href="#bar", this finally dominates its target, the original apply element with id="bar". So this pair of representations violates the acyclicity constraint.

#### 4.2.7.3 Structure Sharing and Binding

Note that the share element is a syntactic referencing mechanism: an share element stands for the exact element it points to. In particular, referencing does not interact with binding in a semantically intuitive way, since it allows for variable capture. Consider for instance

  lambda x f lambda x gX  $\mathrm{lambda}xf(\mathrm{lambda}x, g(X))$

it represents the term which has two sub-terms of the form , one with id="orig" (the one explicitly represented) and one with id="copy", represented by the share element. In the original, the variable x is bound by the outer bind element, and in the copy, the variable x is bound by the inner bind element. We say that the inner bind has captured the variable X.

It is well-known that variable capture does not conserve semantics. For instance, we could use α-conversion to rename the inner occurrence of x into, say, y arriving at the (same) object Using references that capture variables in this way can easily lead to representation errors, and is not recommended.

#### 4.2.7.4 Structure Sharing and cdbase

 Editorial note: MiKo say something about cdbase here.

### 4.2.8 Attribution via semantics

Content elements can be adorned with additional information via the semantics element. An attribution decorates a content MathML expression with a sequence of one or more semantic annotations. MathML uses the semantics element to wrap the annotated element and the annotation-xml and annotation elements for representing the annotations themselves. Each annotation has cdbase, cd, and name attribute to specify the key, i.e. a symbol that specifies the relation between the annotated object and the annotation; See Section 5.1 Semantic Annotations for details.

An annotation acts as either adornment annotation or as semantic annotation. When the key has role "attribution", then dropping the attribution is not harmful and preserves the semantics. When the key has role "semantic-attribution" then the attributed object is modified by the attribution and dropping changes semantics. If the attribute lacks the role specification then attribution is acting as adornment annotation.

An example of the use of an adornment attribution would be to indicate the color in which an content representation object A should be displayed, for example

<semantics>
A
<annotation-xml cd="display" name="color" encoding="MathML Presentation">
red
</annotation>
</semantics>

Note red are arbitrary representations whereas the key is a symbol.

An example of the use of a semantic attribution would be to indicate the type of an object. For example the following expression associates with an identifier F the information that it represents an operator that takes real numbers as input and returns natural numbers as values (the absolute value function is an example of such a function).

<semantics>
<ci>F</ci>
<annotation-xml cd="types" name="typeof" encoding="MathML Content">
<apply>
<csymbol cd="types">funtype</csymbol>
<csymbol cd="setname1">integers</csymbol>
<csymbol cd="setname1">naturalnumbers</csymbol>
</apply>
<annotation-xml>
</semantics>

Here we have assumed the existence of a content dictionary types that provides a key symbol typeof that specifies that the attributed expression is of the type specified by the content MathML expression in the annotation-xml element. The key is specified by the cd and name attributes in the attribution-xml element. The encoding attribute on the annotation-xml element specifies the format of the XML data.

As such, the semantics element should be considered part of both presentation MathML and content MathML. MathML considers a semantics element (strict) content MathML, if and only if its first child is (strict) content MathML. All MathML processors should process the semantics element, even if they only process one of those subsets.

### 4.2.9 In Situ Error Markup

A content error expression is made up of a symbol and a sequence of zero or more MathML expression trees. This object has no direct mathematical meaning. Errors occur as the result of some treatment on an expression tree and are thus of real interest only when some sort of communication is taking place. Errors may occur inside other objects and also inside other errors.

Name values default
cdbase URI inherited

To encode an error caused by a division by zero, we would employ a aritherror Content Dictionary with a DivisionByZero symbol with role error we would use the following expression tree:

  DivisionByZero dividex0  $\mathrm{DivisionByZero}\mathrm{divide}(x, 0)$

Note that the error should cover the smallest erroneous sub-expression so cerror can be a sub-expression of a bigger one, e.g.

 eq DivisionByZero dividex0 0  $\mathrm{eq}(\mathrm{DivisionByZero}\mathrm{divide}(x, 0), 0)$

If an application wishes to signal that the content MathML expressions it has received is invalid or is not well-formed then the offending data must be encoded as a string. For example:

  invalid_XML <apply><cos> <ci>v</ci> </apply>  $\mathrm{invalid_XML}\text{ v }$

Note that the < and > characters have been escaped as is usual in an XML document.

## 4.3 Pragmatic Content MathML

Strict MathML3 content markup differs from earlier versions of MathML in that it has been regularized and based on the content dictionary model introduced by OpenMath [OpenMath2004]. MathML3 also supports MathML2-like markup as a pragmatic representation that is easier to read and more intuitive for humans. "Content MathML" without qualification consists of both types of markup together.

In the following we will discuss the general aspects of pragmatic Content MathML3 and indicate the equivalent strict Content MathML3 expressions. Thus the "pragmatic content MathML" representations inherit the meaning from their strict counterparts. As pragmatic Content MathML is not as regular as strict Content MathML and the mapping from the former to the latter is not regular either, the particulars will be covered in this section.

 Editorial note: MiKo This part of the specification is still under development and should not be considered as final. In particular, the description of the pragmatic-vs-strict correspondence is still somewhat under-defined and should only be considered as an indication of the intended relation. We anticipate that we may have to give normative specification of the relation as a XSLT style sheet that converts pragmatic content MathML expressions to strict content MathML expressions. Such a style sheet is under development at http://svn.openmath.org/OpenMath3/xsl/cmml2om.xsl (actually it transforms pragmatic content MathML to OpenMath, but this is equivalent, and can be transformed to strict content MathML via http://svn.openmath.org/OpenMath3/xsl/om2mml.xsl.

### 4.3.1 Pragmatic Numbers (cn)

 Editorial note: MiKo This section has been extracted from the section as pragmatic MathML, it is rather new and might change at any moment as the discussion in the Math WG progresses.

In pragmatic content MathML the cn allows additional values for the type attribute element for supporting e-notations for real numbers, rational numbers and complex numbers. Where it makes sense, the base in which the number is written can be specified. For most numeric values, the content of a cn element should be either PCDATA or other cn elements.

The permissible attributes on the cn are:

Name Values Default
type "e-notation," | "rational" | "complex-cartesian" | "complex-polar" real
base number 10

Each data type implies that the content be of a certain form, as detailed below.

e-notation

A real number may be presented in scientific notation using this type. Such numbers have two parts (a significand and an exponent) separated by a <sep/> element. The first part is a real number, while the second part is an integer exponent indicating a power of the base. For example, 12.3<sep/>5 represents 12.3 times 105. The default presentation of this example is 12.3e5. In strict content MathML, we can just use the cn with "double" if it is in the range of IEEE floats:

 12.35 $12.3E5$

Strict MathML equivlalent

 12.3e5 $12.3e5$

and we use a construction with bigfloat symbol from the bigfloat1 content dictionary.

 12.35 $12.3E5$

Strict MathML equivlalent

  bigfloat 12.3 10 5  $\mathrm{bigfloat}(12.3, 10, 5)$
rational

A rational number is given as two integers giving the numerator and denominator of a quotient. These themselves can either be given as nested cn elements or as PCDATA separated by <sep/>. In strict content MathML we use a construction with the rational symbol from the nums1 content dictionary.

 35 $3/5$

Strict MathML equivlalent

  rational 3 5  $\mathrm{rational}(3, 5)$

If a base is present, it specifies the base used for the digit encoding of both integers.

 35 $3/5$

Strict MathML equivlalent

  rational 3 5  $\mathrm{rational}(3_{16}, 5_{16})$
complex-cartesian

A complex cartesian number is given as two numbers giving the real and imaginary parts. These should themselves be given as nested cn elements or as PCDATA separated by a <sep/> element. In strict content MathML we represent this using the complex_cartesian element from the complex1 content dictionary.

 3.51.2 $3.5+1.2i$

Strict MathML equivlalent

  complex-cartesian 3.5 1.2  $\mathrm{complex-cartesian}(3.5, 1.2)$
complex-polar

A complex polar number is given as two numbers giving the magnitude and angle. These should themselves be given as nested cn elements or as PCDATA separated by a <sep/> element. In strict content MathML we represent this using the complex_polar element from the complex1 content dictionary.

 3.51.2 $3.5e^{i 1.2}$

Strict MathML equivlalent

  complex-polar 3.5 1.2  $\mathrm{complex-polar}(3.5, 1.2)$
constant

If the value type is "constant", then the content can be various Unicode representations of number constants. Several important constants such as π have been included explicitly in MathML 2 as empty elements. This use of the cn is discouraged in favor of the defined constants, or the use of csymbol element with appropriate values for the cd and cdbaseattributes. For example, instead of using the pi element, an instance of <cn type="constant">&pi;</cn> could be used. This should be interpreted as having the semantics of the mathematical constant Pi. The data for a constant cn tag may be one of the following common constants:

content intuition Symbol strict content MathML
&pi; The usual π of trigonometry: approximately 3.141592653... pi <csymbol cd="nums1" name="pi"/>
&ExponentialE; (or &ee;) The base for natural logarithms: approximately 2.718281828... exponentiale <csymbol cd="nums1" name="e"/>
&ImaginaryI; (or &ii;) Square root of -1 imaginaryi <csymbol cd="nums1" name="i"/>
&gamma; Euler's constant: approximately 0.5772156649... eulergamma <csymbol cd="nums1" name="eulergamma"/>
&infin; (or &infty;) Infinity. Proper interpretation varies with context infinity <csymbol cd="nums1" name="infinity"/>
&true; the logical constant true true <csymbol cd="logic1" name="true"/>
&false; the logical constant false false <csymbol cd="logic1" name="false"/>
&NotANumber; (or &NaN;) represents the result of an ill-defined floating point division notanumber <csymbol cd="nums1" name="notanumber"/>

### 4.3.2 Operator Elements

Pragmatic content MathML provides empty elements for the operators and functions of the K-14 fragment of mathematics. For instance, the empty MathML element <plus/> is equivalent to the element

 plus $\mathrm{plus}$

The set of elements is the same as the ones for MathML2 with few additions. In most cases, the names of the empty operator elements are the same as the symbol names defined in the MathML 3 content dictionaries. Note that the concepts of "MathML symbols" (defined in Section 4.2.4 Symbols and Identifiers) and "operator elements" are different. In particular not all symbols defined by the MathML 3 Content Dictionaries have corresponding operator elements in pragmatic Content MathML.

### 4.3.3 Pragmatic Elements with Attributes

Following MathML2, pragmatic content MathML allows to specialize the meaning of some elements via attributes, usually the type attribute. Strict Content MathML does not have this possibility, therefore these attributes are either passed to the symbols as extra arguments in the apply or bind elements, or MathML 3 adds new symbols for the non-default case to the respective content dictionaries. These will normally not have corresponding operator elements (see above).

For instance the closure interval element can be given by the closure attribute. Thus the pragmatic content MathML expression

 01 $\left\{\right\}(0, 1)$

is equivalent to the strict content MathML expression

 interval-oc01 $\mathrm{interval-oc}(0, 1)$

In MathML2, the definitionURL attribute could be used to modify the meaning of an element to allow essentially the same notation to be re-used for a discussion taking place in a different mathematical domain. This use of the attribute is deprecated in MathML 3, in favor of using a csymbol with cdbase and cd attributes that combine to the same definitionURL attribute (see Section 4.2.4.2 Content Symbols (csymbol)).

### 4.3.4 Bindings with apply

Pragmatic content MathML allows to use the apply element instead of the bind element to conserve backwards compatibility with MathML2. The mapping to strict Content MathML applies two general principles here depending on the operator. Where there is a binding operator in the content dictionaries, we use that and only replace the apply tag with a bind tag. This is the case for instance for the quantifiers: the pragmatic expression

  x xx  $\forall x\colon x\ge x$

is equivalent to the strict expression

  forall x geqxx  $\mathrm{forall}x\mathrm{geq}(x, x)$

This situation also obtains for the exists and lambda symbols.

Where binding operators are not available, we just convert the expression with the bound variable into a λ-expression. Usually we have to move any qualifiers into an argument. For instance for sums:

  i 0 100 xi  $\sum_{i=0}^{100} x^{i}$

is equivalent to the strict expression.

  integer_interval 0 100 lambda i xi  $\sum \mathrm{lambda}ix^{i}$
 Editorial note: MiKo we should probably say here that we cannot expect alpha-conversion for apply-with-bvar in contrast to the bind. An example for this is the diff element where the bvar is not bound at all.

### 4.3.5 Container Markup

#### 4.3.5.1 Container Markup for Constructor Symbols

Pragmatic content MathML provides an alternative representation for applications of "constructor" symbols called "container markup". Constructor symbols represent operators that construct mathematical operators that construct a mathematical structure from a list of objects. This list can be given by an explicit sequence of arguments or as an expression with a bound variable. In pragmatic content MathML, we allow to write the argument list as children to the element instead of having to append them as to the empty operator element as children of an apply element.

For instance for the set constructor allow to write:

 abc $\{a, b, c\}$

This is considered equivalent to the following strict content MathML expression.

 setabc $\mathrm{set}(a, b, c)$

But the set constructor can also take a list that is given as an expression with a bound variable in pragmatic Content MathML. Consider for instance the collection of all intervals from 0 to x. Here we do not have a systematic correspondence, since a symbol can only have one role. For the constructor symbols this is the role application. Thus the pragmatic Content MathML expression

  x 0x  $\{x, \left[0 , x\right]\}$

has to be modeled by a

  suchthat lambda x interval 0 x  $\mathrm{suchthat}(\mathrm{lambda}x\mathrm{interval}(0, x))$

Note that even though we have not made use of this here, the bound variable can be qualified by any of the qualifier elements condition, uplimit, lowlimit, domainofapplication, and degree.

Note furthermore that container markup is restricted to the MathML2 elements set, interval, list, matrix, matrixrow, and vector.

#### 4.3.5.2 Container Markup for Binding Constructors

The lambda element allows a kind of container markup for the lambda symbol from the fns1 content dictionary. e.g.

 xx $\mathrm{lambda}\: x.\: x$

but unlike the set element, which corresponds to a symbol with role application, the role of the lambda symbol is binding. Therefore the lambda element has to have at least one bvar child followed by qualifiers (see below), followed by a content MathML element. The strict Content MathML equivalent of the expression above is

 lambdaxx $\mathrm{lambda}xx$

#### 4.3.5.3 Container Markup for Applicative Constructors

The piecewise, piece, and otherwise allow container markup for the constructor symbols of the content dictionary piece1. Unlike the cases described above, these do not allow their arguments to be represented as expressions with bound variables, so the strict-pragmatic correspondence is very simple in this case. For instance the pragmatic Content MathML representation of the absolute value function

  x x0 0 x0 x x0  $\begin{cases}-x & \text{if x< 0}\\ 0 & \text{if x=0}\\ x & \text{if x> 0}\end{cases}$

has the strict equivalent

  piecewise piece minusx ltx0 piece 0 eqx0 piece x gtx0  $\mathrm{piecewise}(\mathrm{piece}(\mathrm{minus}(x), \mathrm{lt}(x, 0)), \mathrm{piece}(0, \mathrm{eq}(x, 0)), \mathrm{piece}(x, \mathrm{gt}(x, 0)))$

### 4.3.6 Symbols and Identifiers With Presentation MathML

In Pragmatic Content MathML, the ci and csymbol elements can contain a general presentation construct (see Section 3.1.7 Summary of Presentation Elements), which is used for rendering (see Section 4.5 Rendering of Content Elements). For example,

  C2  ${C}^{2}$

encodes an atomic symbol that displays visually as C2 and that, for purposes of content, is treated as a single symbol representing the space of twice-differentiable continuous functions.

Issue csymbol_pmathml_strict wiki (member only) What is the strict equivalent for the case of a csymbol with pMathML content, we do not have a good way of determining that either from the pMathML (we could take the element content stripped of elements; I am assuming this in the example below for now) or from the definitionURL. But as David convinced me, this does not work, so we still need to discuss this. In the We also need to keep the use of symbol names as fragment identifiers in mind. None recorded

A ci or csymbol element with Presentation MathML content is equivalent to a semantics construction where the first child is a ci whose content is the symbol or identifier name and whose second child is an annotation-xml element with the MathML Presentation. For example the Strict Content MathML equivalent to the example above would be

  C2 C2 

In this situation, the name of the symbol name (which has to be a text string) can be determined from the presentation MathML representation above by stripped off elements. But this is not possible in general . Therefore pragmatic Content MathML allows an additional name attribute on csymbol and ci which allows to specify the name. It is highly advisable to supply name attributes for symbols and identifiers that have presentation MathML content.

Alternatively, the definitionURL attribute can be used to associate a name with with a ci element. See the discussion of bound variables (Section 4.2.6 Bindings and Bound Variables (bind)) for a discussion of an important instance of this. For example,

 c1 ${c}_{1}$

encodes an atomic symbol that displays visually as c1 which, for purposes of content, is treated as a atomic concept representing a real number.

### 4.3.7 Elementary MathML Types on Operator and Container Elements

The ci element uses the type attribute to specify the basic type of object that it represents. While any CDATA string is a valid type, the predefined types include "integer", "rational", "real", "complex", "complex-polar", "complex-cartesian", "constant", "function" and more generally, any of the names of the MathML container elements (e.g. vector) or their type values. For a more advanced treatment of types, the type attribute is inappropriate. Advanced types require significant structure of their own (for example, vector(complex)) and are probably best constructed as mathematical objects and then associated with a MathML expression through use of the semantics element.

 Editorial note: MiKo Give the Strict equivalent here by techniques from the Types Note, but be careful what we eventually do with types.

### 4.3.8 Qualifiers for Bound Variables

In many situations, we want to specify range of bound variables, e.g. in definitive integrals. A number of common mathematical constructions involve such restrictions, either implicit in conventional notation, such as a bound variable, or thought of as part of the operator rather than an argument, as is the case with the limits of a definite integral. MathML 3 provides the optional qualifier elements uplimit, lowlimit, domainofapplication, condition, and degree as a pragmatic restriction mechanism.

#### 4.3.8.1 Domain of Application

In pragmatic Content MathML the domainofapplication element may be used in an apply element without bvar children to mark up the domain over which a given function is being applied. In contrast to its use as a qualifier in the bind element, the usage in the apply element only marks the argument position. For instance, the integral of a function f over an arbitrary domain C can be represented as

  C f  $\int f\,d$

in Pragmatic Content MathML to mark the domain for the range argument of the definite integral. This expression is considered equivalent to

 intCf $\mathrm{int}(C, f)$

#### 4.3.8.2 Domain of Application in Bindings

The range of bound variables can be restricted by a domainofapplication in pragmatic Content MathML. In strict Content MathML we usually represent such restricted quantifiers with complex binding operators. For instance the expression

  x D px  $\forall x\colon p(x)$

is equivalent to the Strict Content MathML representation

  every D x px  $\mathrm{every}(D)xp(x)$

Note that the binding operator (the first child of the bind element) is not just a symbol, but a complex expression constructed by applying the every symbol to the set D.

#### 4.3.8.3 degree

The degree element is a qualifier used by some MathML container elements to specify that, for example, a bound variable is repeated several times, i.e. for the for the "degree" or "order" of an operation. There are a number of basic mathematical constructs that come in families, such as derivatives and moments. Rather than introduce special elements for each of these families, pragmatic MathML allows uses a single general construct, the degree element for this concept of "order". This element is placed in the bvar element before or after the variable itself.

For instance, in a derivative, the degree element indicates the order of the derivative with respect to that variable.

  x 2 x4  $\frac{d^{2}x^{4}}{dx^{2}}$

Strict MathML equivlalent

  diff2 x powerx4  $\mathrm{diff}(2)x\mathrm{power}(x, 4)$
 Editorial note: MiKo make sure that this is consistent with revised calculus3

Note that the degree element is only allowed in the container representation. The strict representation takes the degree as a regular argument as the second child of the apply or bind element.

#### 4.3.8.4 Upper and Lower Limits (uplimit and lowlimit)

The uplimit and lowlimit elements are pragmatic Content MathML qualifiers that can be used to restrict the range of a bound variable to an interval, e.g. in some integrals and sums. In strict content MathML, the uplimit/lowlimit pairs can be expressed via the interval. For instance, we consider the Pragmatic Content MathML representation

  x a b fx  $\int_{a}^{b} f(x)\,d x$

Strict MathML equivlalent

  defint intervalab lambda x fx  $\mathrm{defint}(\mathrm{interval}(a, b), \mathrm{lambda}xf(x))$
 Editorial note: MiKo rework for calculus3

If the lowlimit qualifier is missing, it is interpreted as negative infinity, similarly, if uplimit is then it is interpreted as positive infinity.

#### 4.3.8.5 Conditions (condition)

A condition element contains a single child that represents a truth condition. Compound conditions are indicated by applying operators such as and in the condition. Consider for instance the following representation of a definite integral.

Name values default
cdbase URI inherited

For example

  x xS x  $xx\in S\sin x$

Here the condition element restricts the bound variables to range over a set S. In this special case, the strict counterpart is given by a construction using the defint symbol:

  defint S lambda x x  $\mathrm{defint}(S, \mathrm{lambda}x\sin x)$

We will specify the special cases of the strict-to-pragmatic mapping with the binding operators below. For the general case note that the binding operator can be a csymbol element or even an identifier (ci). We treat these cases differently. For the first case consider

  bar x Px x  $\mathrm{bar}xP(x)\sin x$

Restrictions via the condition element cannot be treated by complex binding operators as the domainofapplication, uplimit, lowlimit, and degree qualifiers in the strict-to-pragmatic mapping since it contains the bound variable, which would be placed outside the scope of alpha-renaming. Therefore we need to place the content of the condition element in the body of the binding expression. We assume that the content dictionary foo that defines the bar symbol also supplies a symbol foo_condition to use for the restriction and translate the example above to:

  bar x fooCondition Px x  $\mathrm{bar}x\mathrm{fooCondition}(P(x), \sin x)$

In the case where the binding operator is an identifier given by a ci element, the treatment is analogous only that we use the general condition symbol instead of a CD-defined one.

### 4.3.9 Lifted Associative Commutative Operators

Pragmatic Content MathML allows to use a associative operators to be "lifted" to "big operators", for instance the n-ary minimum operator to the minimum operator over sets, as the minimum of squares in this expression:

  x x-44 x2  $\min\{x^{2}, x\in \left[-4 , 4\right]\}$

While the relation between the nary and the set-based operators is deterministic, i.e. the induced big operators are fully determined by them, the concepts are quite different in nature (different notational conventions, different types, different occurrence schemata). Therefore the MathML 3 content dictionaries provide explicit symbols for the "big operators", much like MathML2 did with sum as the big operator for for the n-ary plus symbol, and prod for times. Concretely, these are big_union, big_intersect, big_max, big_min, big_gcd, big_lcm, big_or, big_and, big_xor.

 Editorial note: MiKo actually, there are more, e.g. cartesianproduct; make a complete list

With these, we can express all pragmatic Content MathML expressions. For instance, the minimum above can be represented in strict Content MathML as

  suchthat lambda S inSF setdiffUS  $\mathrm{suchthat}(\mathrm{lambda}S\mathrm{in}(S, F)\mathrm{setdiff}(U, S))$

For the exact meaning of the new symbols, consult the content dictionaries.

### 4.3.10 basic elements

#### 4.3.10.1 Interval (interval)

The interval element is used to represent simple mathematical intervals of the real number line. It takes an optional attribute closure, with a default value of "closed". Depending on its presence and value, the interval element corresponds to one of five symbols from the interval1 content dictionary. If this has the value "open" then interval corresponds to the interval_oo. With the value "closed" interval corresponds to the symbol interval_cc, with value "open-closed" to interval_oc, and with "closed-open" to interval_co. The interval1 CD also provides the symbol interval which cannot be represented in pragmatic content MathML, since the "closed" is the default value of the closure attribute.

Content MathML

  x 1  $\left(x , 1\right)$

Default Rendering: Presentation MathML

  x1  $\left(x,1\right)$

Default Rendering: Image

Content MathML

  0 1  $\left[0 , 1\right]$

Default Rendering: Presentation MathML

  01  $\left[0,1\right]$

Default Rendering: Image

Content MathML

  0 1  $\left(0 , 1\right]$

Default Rendering: Presentation MathML

  01  $\left(0,1\right]$

Default Rendering: Image

Content MathML

  0 1  $\left[0 , 1\right)$

Default Rendering: Presentation MathML

  01  $\left[0,1\right)$

Default Rendering: Image

The interval element can be used as a container element in pragmatic Content MathML.

If the optional type attribute of the interval element has the value "integers", then it corresponds to the symbol integer_interval

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

Finally pragmatic content MathML allows the interval element to be used with a bvar element and condition defining the interval. Then we translate this to a set construction:

  x 0x  $\left[x , 0< x\right]$

Strict MathML equivlalent

 suchthat R lambda x lt0x  $\mathrm{suchthat}(R, \mathrm{lambda}x\mathrm{lt}(0, x))$

#### 4.3.10.2 Inverse (inverse)

The inverse element is applied to a function in order to construct a generic expression for the functional inverse of that function. (See also the discussion of inverse in ???). As with other MathML functions, inverse may either be applied to arguments, or it may appear alone, in which case it represents an abstract inversion operator acting on other functions.

A typical use of the inverse element is in an HTML document discussing a number of alternative definitions for a particular function so that there is a need to write and define f(-1)(x). To associate a particular definition with f(-1), use the definitionURL and encoding attributes.

  f  $f^{(-1)}$
  f  $f^{(-1)}$
  a A  $a^{(-1)}(A)$

The default rendering for a functional inverse makes use of a parenthesized exponent as in f(-1)(x).

#### 4.3.10.3 Lambda (lambda)

The lambda element is used to construct a user-defined function from an expression, bound variables, and qualifiers. In a lambda construct with n (possibly 0) bound variables, the first n children are bvar elements that identify the variables that are used as placeholders in the last child for actual parameter values. The bound variables can be restricted by an optional domainofapplication qualifier or one of its shorthand notations. The meaning of the lambda construct is an n-ary function that returns the expression in the last child where the bound variables are replaced with the respective arguments. See ??? for further details.

The domainofapplication child restricts the possible values of the arguments of the constructed function. For instance, the following two lambda constructs are representations of a function on the integers.

  x x  $\mathrm{lambda}\: x.\: \sin x$

If a lambda construct does not contain bound variables, then the arity of the constructed function is unchanged, and the lambda construct is redundant, unless it also contains a domainofapplication construct that restricts existing functional arguments, as in this example, which is a variant representation for the function above.

   $\mathrm{lambda}\: .\: \sin$

In particular, if the last child of a lambda construct is not a function, say a number, then the lambda construct will not be a function, but the same number. Of course, in this case a domainofapplication does not make sense

Content MathML

  x x  $\mathrm{lambda}\: x.\: \sin x$

Default Rendering: Presentation MathML

  λx. sinx  $\lambda x.\left(\mathrm{sin}x\right)$

Default Rendering: Image

Content MathML

  x x 1  $\mathrm{lambda}\: .\: x\sin (x+1)$

Default Rendering: Presentation MathML

  λ. . sin (x+1)  $\lambda .\left(\right).\mathrm{sin}\left(x+1\right)$

Default Rendering: Image

#### 4.3.10.4 Function composition (compose)

The compose element represents the function composition operator. Note that MathML makes no assumption about the domain and codomain of the constituent functions in a composition; the domain of the resulting composition may be empty.

To override the default semantics for the compose element, or to associate a more specific definition for function composition, use the definitionURL and encoding attributes.

The compose element is an n-ary operator (see ???). As an n-ary operator, its operands may also be generated as described in Section 4.3.9 Lifted Associative Commutative Operators Therefore it may take qualifiers.

  f g  $f\circ g$
  f g h  $f\circ g\circ h$
  f g x  $(f\circ g)(x)$
  f g x  $f(g(x))$

#### 4.3.10.5 Identity function (ident)

This is the identity function on a set.

Content MathML

  f f  $f\circ f^{(-1)}=\mathrm{id}$

Default Rendering: Presentation MathML

  f f (-1) =id  $f\circ {f}^{\left(-1\right)}=id$

Default Rendering: Image

#### 4.3.10.6 Domain (domain)

This is the domain of a function. It is a unary operation.

Content MathML

  f  $\mathop{\mathrm{domain}}(f)=\mathbb{R}$

Default Rendering: Presentation MathML

  domainf =R  $domain\left(f\right)=\mathbb{R}$

Default Rendering: Image

#### 4.3.10.7 codomain (codomain)

This is the codomain, or range, of a function. It is a unary function.

This symbol denotes the range of a function, that is a set that the function will map to. The single argument should be the function whos range is being queried. It should be noted that this is not necessarily equal to the image, it is merely required to contain the image.

Content MathML

  f  $\mathop{\mathrm{codomain}}(f)=\mathbb{Q}$

Default Rendering: Presentation MathML

  codomainf =Q  $codomain\left(f\right)=\mathbb{Q}$

Default Rendering: Image

#### 4.3.10.8 Image (image)

This is the image of a function. It is a unary operator.

The image element denotes the image of a given function, which is the set of values taken by the function. Every point in the image is generated by the function applied to some point of the domain.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

#### 4.3.10.9 Piecewise declaration (piecewise, piece, otherwise)

The piecewise, piece, and otherwise elements are used to support "piecewise" declarations of the form " H(x) = 0 if x less than 0, H(x) = 1 otherwise".

The declaration is constructed using the piecewise element. This contains zero or more piece elements, and optionally one otherwise element. Each piece element contains exactly two children. The first child defines the value taken by the piecewise expression when the condition specified in the associated second child of the piece is true. The degenerate case of no piece elements and no otherwise element is treated as undefined for all values of the domain.

otherwise allows the specification of a value to be taken by the piecewise function when none of the conditions (second child elements of the piece elements) is true, i.e. a default value.

It should be noted that no "order of execution" is implied by the ordering of the piece child elements within piecewise. It is the responsibility of the author to ensure that the subsets of the function domain defined by the second children of the piece elements are disjoint, or that, where they overlap, the values of the corresponding first children of the piece elements coincide. If this is not the case, the meaning of the expression is undefined.

Content MathML

  x x 0 0 x 0 x x 0  $\begin{cases}-x & \text{if x< 0}\\ 0 & \text{if x=0}\\ x & \text{if x> 0}\end{cases}$

Default Rendering: Presentation MathML

  { x   if   x<0 0  if   x=0 x  if   x>0 

Default Rendering: Image

### 4.3.11 Arithmetic, Algebra and Logic

#### 4.3.11.1 Quotient (quotient)

The symbol to represent the integer (binary) division operator. That is, for integers a and b, quotient(a,b) denotes q such that a=b*q+r, with |r| less than |b| and a*r positive.

The quotient element is the operator used for division modulo a particular base. When the quotient operator is applied to integer arguments a and b, the result is the "quotient of a divided by b ". That is, quotient returns the unique integer q such that a = q b + r. (In common usage, q is called the quotient and r is the remainder.)

Content MathML

  a b  $\left\lfloor\frac{a}{b}\right\rfloor$

Default Rendering: Presentation MathML

  a/b  $⌊a/b⌋$

Default Rendering: Image

#### 4.3.11.2 Factorial (factorial)

The symbol to represent a unary factorial function on non-negative integers.

Factorials are defined by n! = n*(n-1)* ... * 1

Content MathML

  n  $n!$

Default Rendering: Presentation MathML

  n!  $n!$

Default Rendering: Image

#### 4.3.11.3 Division (divide)

This symbol represents a (binary) division function denoting the first argument right-divided by the second, i.e. divide(a,b)=a*inverse(b). It is the inverse of the multiplication function defined by the symbol times in this CD.

Content MathML

  a b  $\frac{a}{b}$

Default Rendering: Presentation MathML

  a/b  $a/b$

Default Rendering: Image

#### 4.3.11.4 Maximum (max)

This symbol denotes the unary maximum function which takes a set as its argument and returns the maximum element in that set.

Content MathML

  2 3 5  $\max\{2 , 3 , 5\}$

Default Rendering: Presentation MathML

  max {2,3,5}  $max\left\{2,3,5\right\}$

Default Rendering: Image

The max operator element can be used as a binding operator in pragmatic Content MathML. This role is taken over by the big_max symbol in strict Content MathML. We translate:

  x x  $\max\{x , x^{}\}$

Strict MathML equivlalent

  big_max lambda x powerx  $\mathrm{big_max}(\mathrm{lambda}x\mathrm{power}(x))$

Content MathML

  y y 0 1 y 3  $\max\{y^{3}, y\in \left[0 , 1\right]\}$

Default Rendering: Presentation MathML

  max {y| y 01 }  $max\left\{y|y\in \left[0,1\right]\right\}$

Default Rendering: Image

Content MathML

  a b  $\max\{a , b\}$

Default Rendering: Presentation MathML

  max {a,b}  $max\left\{a,b\right\}$

Default Rendering: Image

#### 4.3.11.5 Minimum (min)

This symbol denotes the unary minimum function which takes a set as its argument and returns the minimum element in that set.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

The min operator element can be used as a binding operator in pragmatic Content MathML. This role is taken over by the big_min symbol in strict Content MathML. We translate:

  x x  $\min\{x , x^{}\}$

Strict MathML equivlalent

  big_min lambda x powerx  $\mathrm{big_min}(\mathrm{lambda}x\mathrm{power}(x))$

Content MathML

  y y 0 1 y 2  $\min\{y^{2}, y\in \left[0 , 1\right]\}$

Default Rendering: Presentation MathML

  min {y| y 01 }  $min\left\{y|y\in \left[0,1\right]\right\}$

Default Rendering: Image

Content MathML

  x x B x 2  $\min\{x^{2}, x\notin B\}$

Default Rendering: Presentation MathML

  min {x| x B }  $min\left\{x|x\notin B\right\}$

Default Rendering: Image

#### 4.3.11.6 Subtraction (minus)

The minus element can be used as a unary arithmetic operator (e.g. to represent - x), or as a binary arithmetic operator (e.g. to represent x- y).

If it is used with one argument, minus corresponds to the unary_minus symbol

Content MathML

  3  $-3$

Default Rendering: Presentation MathML

  3  $-3$

Default Rendering: Image

If it is used with two arguments, minus corresponds to the minus symbol

Content MathML

  x y  $x-y$

Default Rendering: Presentation MathML

  xy  $x-y$

Default Rendering: Image

#### 4.3.11.7 Addition (plus)

The symbol representing an n-ary commutative function plus. If no operands are provided, the expression represents the additive identity. If one operand, a, is provided the expression evaluates to "a". If two or more operands are provided, the expression represents the (semi) group element corresponding to a left associative binary pairing of the operands. The meaning of mixed operand types not covered by the signatures shown here are left up to the target system.

Content MathML

  x y z  $x+y+z$

Default Rendering: Presentation MathML

  x+y+z  $x+y+z$

Default Rendering: Image

The lcm symbol can be used as a binding operator in pragmatic Content MathML. This role is taken over by the big_lcm symbol in strict Content MathML.

  x x  $\mathop{\mathrm{lcm}}(x, x)$

Strict MathML equivlalent

  lambda x x  $\mathrm{lambda}xx()$

#### 4.3.11.8 Exponentiation (power)

This symbol represents a power function. The first argument is raised to the power of the second argument. When the second argument is not an integer, powering is defined in terms of exponentials and logarithms for the complex and real numbers. This operator can represent general powering.

Content MathML

  x 3  $x^{3}$

Default Rendering: Presentation MathML

  x3  ${x}^{3}$

Default Rendering: Image

#### 4.3.11.9 Remainder (rem)

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

#### 4.3.11.10 Multiplication (times)

The symbol representing an n-ary multiplication function.

Content MathML

  a b  $ab$

Default Rendering: Presentation MathML

  ab  $ab$

Default Rendering: Image

#### 4.3.11.11 Root (root)

The kind of root to be taken is specified by a "degree" child, which should be given as the second child of the apply element enclosing the root element. Thus, square roots correspond to the case where degree contains the value 2, cube roots correspond to 3, and so on.

Note that pragmatic MathML supports a degree element in the container representation. If no degree is present, a default value of 2 is used.

Content MathML

  n a  $\sqrt[n]{a}$

Default Rendering: Presentation MathML

  an  $\sqrt[n]{a}$

Default Rendering: Image

#### 4.3.11.12 Greatest common divisor (gcd)

This is the n-ary operator used to construct an expression which represents the greatest common divisor of its arguments. If no argument is provided, the gcd is 0. If one argument is provided, the gcd is that argument.

Content MathML

  a b c  $\gcd (a, b, c)$

Default Rendering: Presentation MathML

  gcd abc  $gcd\left(a,b,c\right)$

Default Rendering: Image

This default rendering is English-language locale specific: other locales may have different default renderings.

The gcd symbol can be used as a binding operator in pragmatic Content MathML. This role is taken over by the big_gcd symbol in strict Content MathML. We translate:

  x x  $\gcd (x, x)$

Strict MathML equivlalent

  big_gcd lambda x x  $\mathrm{big_gcd}(\mathrm{lambda}xx)$

#### 4.3.11.13 And (and)

This symbol represents the logical and function which is an n-ary function taking boolean arguments and returning a boolean value. It is true if all arguments are true or false otherwise.

Content MathML

  a b  $a\land b$

Default Rendering: Presentation MathML

  ab  $a\wedge b$

Default Rendering: Image

The and operator element can be used as a binding operator in pragmatic Content MathML. This role is taken over by the big_and symbol in strict Content MathML.

  x xx  $x\land (x=x)$

Strict MathML equivlalent

  big_and lambda x eqxx  $\mathrm{big_and}(\mathrm{lambda}x\mathrm{eq}(x, x))$

#### 4.3.11.14 Or (or)

This symbol represents the logical or function which is an n-ary function taking boolean arguments and returning a boolean value. It is true if any of the arguments are true or false otherwise.

Content MathML

  a b  $a\lor b$

Default Rendering: Presentation MathML

  ab  $a\vee b$

Default Rendering: Image

The or operator element can be used as a binding operator in pragmatic Content MathML. This role is taken over by the big_or symbol in strict Content MathML.

  x xx  $x\lor (x=x)$

Strict MathML equivlalent

  big_or lambda x eqxx  $\mathrm{big_or}(\mathrm{lambda}x\mathrm{eq}(x, x))$

#### 4.3.11.15 Exclusive Or (xor)

This symbol represents the logical xor function which is an n-ary function taking boolean arguments and returning a boolean value. It is true if there are an odd number of true arguments or false otherwise.

Content MathML

  a b  $a\mathop{\mathrm{xor}}b$

Default Rendering: Presentation MathML

  axorb  $axorb$

Default Rendering: Image

The xor operator element can be used as a binding operator in pragmatic Content MathML. This role is taken over by the big_xor symbol in strict Content MathML.

  x xx  $x\mathop{\mathrm{xor}}(x=x)$

Strict MathML equivlalent

  big_xor lambda x eqxx  $\mathrm{big_xor}(\mathrm{lambda}x\mathrm{eq}(x, x))$

#### 4.3.11.16 Not (not)

This symbol represents the logical not function which takes one boolean argument, and returns the opposite boolean value.

Content MathML

  a  $\neg a$

Default Rendering: Presentation MathML

  ¬a  $¬a$

Default Rendering: Image

#### 4.3.11.17 Implies (implies)

This symbol represents the logical implies function which takes two boolean expressions as arguments. It evaluates to false if the first argument is true and the second argument is false, otherwise it evaluates to true.

Content MathML

  A B  $A\implies B$

Default Rendering: Presentation MathML

  AB  $A⇒B$

Default Rendering: Image

#### 4.3.11.18 Universal quantifier (forall)

This symbol represents the universal ("for all") quantifier which takes two arguments. It is usually used in conjunction with one or more bound variables and an assertion.

Content MathML

  x x x 0  $xx-x=0$

Default Rendering: Presentation MathML

  forall. xx =0  $\mathrm{forall}.x-x=0$

Default Rendering: Image

When the forall element is used with a condition qualifier the strict equivalent is constructed with the help of logical implication.

Content MathML

  p q p q p q p q 2  $p, qp\in \mathbb{Q}\land q\in \mathbb{Q}\land (p< q)p< q^{2}$

Default Rendering: Presentation MathML

  forall. pQ qQ (p<q) p< q2  $\mathrm{forall}.p\in \mathbb{Q}\wedge q\in \mathbb{Q}\wedge \left(p

Default Rendering: Image

The universal quantifier can also be used with the domainofapplication qualifier to restrict the range of the bound variable. In this case, we use the every symbol from the quant2 content dictionary.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

Note:

The second and third examples in this section are correct MathML expressions of False mathematical statements.

#### 4.3.11.19 Existential quantifier (exists)

This symbol represents the existential ("there exists") quantifier which takes two arguments. It is used in conjunction with one or more bound variables and an assertion.

Content MathML

  x f x 0  $xf(x)=0$

Default Rendering: Presentation MathML

  exists. fx =0  $\mathrm{exists}.f\left(x\right)=0$

Default Rendering: Image

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

When the exists element is used with a condition qualifier the strict equivalent is constructed with the help of logical conjunction.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

The existential quantifier can also be used with the domainofapplication qualifier to restrict the range of the bound variable. In this case, we use the some symbol from the quant2 content dictionary.

#### 4.3.11.20 Absolute Value (abs)

A unary operator which represents the absolute value of its argument. The argument should be numerically valued. In the complex case this is often referred to as the modulus.

Content MathML

  x  $\left|x\right|$

Default Rendering: Presentation MathML

  |x|  $|x|$

Default Rendering: Image

#### 4.3.11.21 Complex conjugate (conjugate)

The unary "conjugate" arithmetic operator is used to represent the complex conjugate of its argument.

Content MathML

  x y  $\overline{x+␘y}$

Default Rendering: Presentation MathML

  x+ y ¯  $\overline{x+␘y}$

Default Rendering: Image

#### 4.3.11.22 Argument (arg)

This symbol represents the unary function which returns the argument of a complex number, viz. the angle which a straight line drawn from the number to zero makes with the Real line (measured anti-clockwise). The argument to the symbol is the complex number whos argument is being taken.

Content MathML

  x y  $\mathop{\mathrm{arg}}(x+iy)$

Default Rendering: Presentation MathML

  arg x + iy  $arg\left(x+iy\right)$

Default Rendering: Image

#### 4.3.11.23 Real part (real)

This symbol is a unary operator used to construct an expression representing the "real" part of a complex number, that is the x component in x + iy.

Content MathML

  x y  $\Re (x+iy)$

Default Rendering: Presentation MathML

  x+ iy  $ℛ\left(x+iy\right)$

Default Rendering: Image

#### 4.3.11.24 Imaginary part (imaginary)

This symbol represents unary function used to construct the imaginary part of a complex number, i.e. the y component in x+iy.

Content MathML

  x y  $\Im (x+iy)$

Default Rendering: Presentation MathML

  x+ iy  $\Im \left(x+iy\right)$

Default Rendering: Image

#### 4.3.11.25 Lowest common multiple (lcm)

This n-ary operator is used to construct an expression which represents the least common multiple of its arguments. If no argument is provided, the lcm is 1. If one argument is provided, the lcm is that argument. The least common multiple of x and 1 is x.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

This default rendering is English-language locale specific: other locales may have different default renderings.

The lcm symbol can be used as a binding operator in pragmatic Content MathML. This role is taken over by the big_lcm symbol in strict Content MathML. We translate:

  x x  $\mathop{\mathrm{lcm}}(x, x)$

Strict MathML equivlalent

  big_lcm lambda x x  $\mathrm{big_lcm}(\mathrm{lambda}xx)$

#### 4.3.11.26 Floor (floor)

The round down (towards negative infinity) operation. This function takes one real number as an argument and retunrns an integer.

Content MathML

  a  $\lfloor a\rfloor$

Default Rendering: Presentation MathML

  a  $⌊a⌋$

Default Rendering: Image

#### 4.3.11.27 Ceiling (ceiling)

The ceiling function is used to round-up (towards positive infinity). This function takes one real number as an argument and retunrns an integer.

Content MathML

  a  $\lceil a\rceil$

Default Rendering: Presentation MathML

  a  $⌈a⌉$

Default Rendering: Image

### 4.3.12 Relations

#### 4.3.12.1 Equals (eq)

This symbol represents the binary equality function.

Content MathML

  24 12  $2/4=1/2$

Default Rendering: Presentation MathML

  2/4 = 1/2  $2/4=1/2$

Default Rendering: Image

In pragmatic content MathML, the eq element can be used as an n-ary operator. We interpret the n-ary application as a conjunction of binary ones and translate:

 xyzw $x=y=z=w$

Strict MathML equivlalent

  and eqxy eqz eqw  $\mathrm{and}(\mathrm{eq}(x, y), \mathrm{eq}(, z), \mathrm{eq}(, w))$
 Editorial note: MiKo maybe we should deprecate the following usage?

In pragmatic content MathML, the eq element can be used as a binding operator taking qualifiers. For strict content MathML we translate this using a universally quantified expression:

  i C Ai  $i=C=\mathrm{Ai}()$

Strict MathML equivlalent

  forall i j implies C eqAiAj  $\mathrm{forall}i, j\mathrm{implies}(C, \mathrm{eq}(\mathrm{Ai}, \mathrm{Aj}))$

#### 4.3.12.2 Not Equals (neq)

This symbol represents the binary inequality relation, i.e. the relation "not equal to" which returns true unless the two arguments are equal.

Content MathML

  3 4  $3\neq 4$

Default Rendering: Presentation MathML

  34  $3\ne 4$

Default Rendering: Image

#### 4.3.12.3 Greater than (gt)

This symbol represents the binary greater than function which returns true if the first argument is greater than the second, it returns false otherwise.

Content MathML

  3 2  $3> 2$

Default Rendering: Presentation MathML

  3>2  $3>2$

Default Rendering: Image

In pragmatic content MathML, the gt element can be used as an n-ary operator. We interpret the n-ary application as a conjunction of binary ones and translate:

 xyzw $x> y> z> w$

Strict MathML equivlalent

  and gtxy gtz gtw  $\mathrm{and}(\mathrm{gt}(x, y), \mathrm{gt}(, z), \mathrm{gt}(, w))$
 Editorial note: MiKo maybe we should deprecate the following usage?

In pragmatic content MathML, the gt element can also be used as a binding operator taking qualifiers. For strict content MathML we translate this using a universally quantified expression:

  i C Ai  $i> > \mathrm{Ai}()$

Strict MathML equivlalent

  forall i implies iniS forall j iniS implies ltij gtAiAj  $\mathrm{forall}i\mathrm{implies}(\mathrm{in}(i, S), \mathrm{forall}j\mathrm{in}(i, S)(\mathrm{implies}(\mathrm{lt}(i, j), \mathrm{gt}(\mathrm{Ai}, \mathrm{Aj}))))$

Note that this only makes sense, if the domain C of application is ordered, we have used the ordering relation lt on C. Furthermore, we have used the fact that gt is transitive.

#### 4.3.12.4 Less Than (lt)

This symbol represents the binary less than function which returns true if the first argument is less than the second, it returns false otherwise.

Content MathML

  2 3 4  $2< 3< 4$

Default Rendering: Presentation MathML

  2<3<4  $2<3<4$

Default Rendering: Image

In pragmatic content MathML, the lt element can be used as an n-ary operator. We interpret the n-ary application as a conjunction of binary ones and translate:

 xyzw $x< y< z< w$

Strict MathML equivlalent

  and ltxy ltz ltw  $\mathrm{and}(\mathrm{lt}(x, y), \mathrm{lt}(, z), \mathrm{lt}(, w))$
 Editorial note: MiKo maybe we should deprecate the following usage?

In pragmatic content MathML, the lt element can also be used as a binding operator taking qualifiers. For strict content MathML we translate this using a universally quantified expression:

  i C Ai  $i< < \mathrm{Ai}()$

Strict MathML equivlalent

  forall i implies iniS forall j iniS implies ltij ltAiAj  $\mathrm{forall}i\mathrm{implies}(\mathrm{in}(i, S), \mathrm{forall}j\mathrm{in}(i, S)(\mathrm{implies}(\mathrm{lt}(i, j), \mathrm{lt}(\mathrm{Ai}, \mathrm{Aj}))))$

Note that this only makes sense, if the domain C of application is ordered, we have used the ordering relation lt on C. Furthermore, we have used the fact that lt is transitive.

#### 4.3.12.5 Greater Than or Equal (geq)

This symbol represents the binary greater than or equal to function which returns true if the first argument is greater than or equal to the second, it returns false otherwise.

Content MathML

  4 3 3  $4\ge 3\ge 3$

Default Rendering: Presentation MathML

  433  $4\ge 3\ge 3$

Default Rendering: Image

In pragmatic content MathML, the geq element can be used as an n-ary operator. We interpret the n-ary application as a conjunction of binary ones and translate:

 xyzw $x\ge y\ge z\ge w$

Strict MathML equivlalent

  and geqxy geqz geqw  $\mathrm{and}(\mathrm{geq}(x, y), \mathrm{geq}(, z), \mathrm{geq}(, w))$
 Editorial note: MiKo maybe we should deprecate the following usage?

In pragmatic content MathML, the geq element can also be used as a binding operator taking qualifiers. For strict content MathML we translate this using a universally quantified expression:

  i C Ai  $i\ge \ge \mathrm{Ai}()$

Strict MathML equivlalent

  forall i implies iniS forall j iniS implies ltij geqAiAj  $\mathrm{forall}i\mathrm{implies}(\mathrm{in}(i, S), \mathrm{forall}j\mathrm{in}(i, S)(\mathrm{implies}(\mathrm{lt}(i, j), \mathrm{geq}(\mathrm{Ai}, \mathrm{Aj}))))$

Note that this only makes sense, if the domain C of application is ordered, we have used the ordering relation lt on C. Furthermore, we have used the fact that geq is transitive.

#### 4.3.12.6 Less Than or Equal (leq)

This symbol represents the binary less than or equal to function which returns true if the first argument is less than or equal to the second, it returns false otherwise.

Content MathML

  3 3 4  $3\le 3\le 4$

Default Rendering: Presentation MathML

  334  $3\le 3\le 4$

Default Rendering: Image

In pragmatic content MathML, the leq element can be used as an n-ary operator. We interpret the n-ary application as a conjunction of binary ones and translate:

 xyzw $x\le y\le z\le w$

Strict MathML equivlalent

  and leqxy leqz leqw  $\mathrm{and}(\mathrm{leq}(x, y), \mathrm{leq}(, z), \mathrm{leq}(, w))$
 Editorial note: MiKo maybe we should deprecate the following usage?

In pragmatic content MathML, the leq element can also be used as a binding operator taking qualifiers. For strict content MathML we translate this using a universally quantified expression:

  i C Ai  $i\le \le \mathrm{Ai}()$

Strict MathML equivlalent

  forall i implies iniS forall j iniS implies geqij leqAiAj  $\mathrm{forall}i\mathrm{implies}(\mathrm{in}(i, S), \mathrm{forall}j\mathrm{in}(i, S)(\mathrm{implies}(\mathrm{geq}(i, j), \mathrm{leq}(\mathrm{Ai}, \mathrm{Aj}))))$

Note that this only makes sense, if the domain C of application is ordered, we have used the ordering relation lt on C. Furthermore, we have used the fact that leq is transitive.

#### 4.3.12.7 Equivalent (equivalent)

This symbol is used to show that two boolean expressions are logically equivalent, that is have the same boolean value for any inputs.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

In pragmatic content MathML, the equivalent element can be used as an n-ary operator. We interpret the n-ary application as a conjunction of binary ones and translate:

 xyzw $x\equiv y\equiv z\equiv w$

Strict MathML equivlalent

  and equivalentxy equivalentz equivalentw  $\mathrm{and}(\mathrm{equivalent}(x, y), \mathrm{equivalent}(, z), \mathrm{equivalent}(, w))$
 Editorial note: MiKo maybe we should deprecate the following usage?

In pragmatic content MathML, the equivalent element can also be used as a binding operator taking qualifiers. For strict content MathML we translate this using a universally quantified expression:

  i C Ai  $i\equiv C\equiv \mathrm{Ai}()$

Strict MathML equivlalent

  forall i j implies C equivalentAiAj  $\mathrm{forall}i, j\mathrm{implies}(C, \mathrm{equivalent}(\mathrm{Ai}, \mathrm{Aj}))$

#### 4.3.12.8 Approximately (approx)

This symbol is used to denote the approximate equality of its two arguments.

Content MathML

  227  $\pi \approx 22/7$

Default Rendering: Presentation MathML

  π 22/7  $\pi \simeq 22/7$

Default Rendering: Image

#### 4.3.12.9 Factor Of (factorof)

This is the binary operator that is used to indicate the mathematical relationship a "is a factor of" b, where a is the first argument and b is the second. This relationship is true if and only if b mod a = 0.

Content MathML

  a b  $a | b$

Default Rendering: Presentation MathML

  a|b  $a|b$

Default Rendering: Image

### 4.3.13 Calculus and Vector Calculus

 Editorial note: MiKo The material in this section needs to be reworked for the new calculus3 CD

#### 4.3.13.1 Integral (int)

The int element is the operator element for a definite or indefinite integral. It can be applied directly to a function or to an expression with a bound variable.

As an indefinite integral applied to a function the int element corresponds to the int symbol from the calculus1 content dictionary.

This symbol is used to represent indefinite integration of unary functions. The argument is the unary function.

Content MathML

   $\int \sin \,d =\cos$

Default Rendering: Presentation MathML

  sin =cos  ${\int }_{}^{}\mathrm{sin}=\mathrm{cos}$

Default Rendering: Image

As an definite integral applied to a function the int element corresponds to the defint symbol from the calculus1 content dictionary.

This symbol is used to represent definite integration of unary functions. It takes two arguments; the first being the range (e.g. a set) of integration, and the second the function.

Content MathML

  ab  $\int \cos \,d$

Default Rendering: Presentation MathML

  cos  ${\int }_{}^{}\mathrm{cos}$

Default Rendering: Image

The int element can also be used with bound variables serving as the integration variables. Here, definite integrals are indicated by providing a qualifier element specifying a domain of integration.

As a definite integral applied to an expression the int element corresponds to the defintbounds symbol from the calculus1 content dictionary.

This symbol is used to construct binding operator for definite integration of unary functions. It takes two arguments: the lower and upper bounds of the the range of integration.

This example specifies an interval of the real line as the domain of integration with an interval element. In this form the integrand is provided as a function and no mention is made of a bound variable. We translate:

  x ab x  $\int \cos x\,d x$

Strict MathML equivlalent

  defint intervalab cosx  $\mathrm{defint}(\mathrm{interval}, a, b)\mathrm{cos}(x)$

The next example specifies the integrand using an expression involving a bound variable and makes it a definite integral by using the qualifiers lowlimit, uplimit to place restrictions on the bound variable. We translate

  x 0 a fx  $\int_{0}^{a} f(x)\,d x$

Strict MathML equivlalent

  defintbounds0a x fx  $\mathrm{defintbounds}(0, a)xf(x)$

The final example specifies the domain of integration with a bound variable and a condition element We translate.

  x xD fx  $\int_{x\in D} f(x)\,d x$

Strict MathML equivlalent

  defintcond inxD x fx  $\mathrm{defintcond}(\mathrm{in}(x, D))xf(x)$

Note that the pragmatic use of the condition element extends to multivariate domains by using extra bound variables and a domain corresponding to a cartesian product as in

  x y 0x x1 0y y1 x2 y3  $x, y(0\le x)\land (x\le 1)\land (0\le y)\land (y\le 1)x^{2}y^{3}$

Strict MathML equivlalent

  defint x y suchthat cartesianproduct R R and leq0x leqx1 leq0y leqy1 times powerx2 powery3  $\mathrm{defint}x, y\mathrm{suchthat}(\mathrm{cartesianproduct}(R, R), \mathrm{and}(\mathrm{leq}(0, x), \mathrm{leq}(x, 1), \mathrm{leq}(0, y), \mathrm{leq}(y, 1)), \mathrm{times}(\mathrm{power}(x, 2), \mathrm{power}(y, 3)))$

#### 4.3.13.2 Differentiation (diff)

The diff element is the differentiation operator element for functions or expressions of a single variable. It may be applied directly to an actual function thereby denoting a function which is the derivative of the original function, or it can be applied to an expression involving a single variable.

When applied to a function, the diff element corresponds to the diff symbol from the calculus1 content dictionary.

This symbol is used to express ordinary differentiation of a function with a single variable. The only argument is the function.

Content MathML

   $\frac{d \sin }{d }}=\cos$

Default Rendering: Presentation MathML

  dsin d =cos  $\frac{d\mathrm{sin}}{d}=\mathrm{cos}$

Default Rendering: Image

Content MathML

 f $f^\prime$

Default Rendering: Presentation MathML

  f  ${f}^{\prime }$

Default Rendering: Image

For the expression case the actual variable is designated by a bvar element that is a child of the containing apply element. The bvar element may also contain a degree element, which specifies the order of the derivative to be taken.

 Editorial note: MiKo The following text is left over from an earlier discussion, it should probably be rewritten to calculus3

The derivative with respect to x of an expression in x such as f (x) can be written as:

  x fx  $\frac{d f(x)}{d x}}$

In pragmatic Content MathML the diff operator can be applied to an expression involving a single variable such as sin(x), or cos(x). or a polynomial in x. For the expression case the actual variable is designated by a bvar element that is a child of the containing apply element. To translate this usage to strict Content MathML, we add a lambda construction.

  x x  $\frac{d \sin x}{d x}}$

Strict MathML equivlalent

  diff lambda x sinx  $\mathrm{diff}(\mathrm{lambda}x\mathrm{sin}(x))$

The bvar element may also contain a degree element, which specifies the order of the derivative to be taken. To achieve this effect in strict Content MathML, we use the nthdiff symbol.

  2 x x  $\frac{d^{2}\sin x}{dx^{2}}$

Strict MathML equivlalent

  nthdiff 2 lambda x sinx  $\mathrm{nthdiff}(2, \mathrm{lambda}x\mathrm{sin}(x))$

#### 4.3.13.3 Partial Differentiation (partialdiff)

The partialdiff element is the partial differentiation operator element for functions or expressions in several variables. It may be applied directly to an actual function thereby denoting a function which is the derivative of the original function, or it can be applied to an expression involving a single variable.

 Editorial note: MiKo talk about the type attribute here, which can have the values "function" or "algebraic".

For the case of partial differentiation of a function, the containing apply takes two child elements: firstly a list of indices indicating by position which coordinates are involved in constructing the partial derivatives, and secondly the actual function to be partially differentiated. The coordinates may be repeated.

When applied to a function, the diff element corresponds to the partialdiff symbol from the calculus1 content dictionary.

This symbol is used to express ordinary differentiation of a function with a single variable. The only argument is the function.

Content MathML

  x m y n k f x y  $\frac{\partial^{k}f(x, y)}{\partial x^{m}\partial y^{n}}$

Default Rendering: Presentation MathML

  k f xy xm yn  $\frac{{\partial }^{k}f\left(x,y\right)}{\partial {x}^{m}\partial {y}^{n}}$

Default Rendering: Image

Content MathML

  x y f x y  $\frac{\partial^{2}f(x, y)}{\partial x\partial y}$

Default Rendering: Presentation MathML

  2 f xy x y  $\frac{{\partial }^{2}f\left(x,y\right)}{\partial {x}^{}\partial {y}^{}}$

Default Rendering: Image

Content MathML

  1 1 3 f  $D_{1, 1, 3}f$

Default Rendering: Presentation MathML

  D 1,1,3 f  ${D}_{1,1,3}f$

Default Rendering: Image

In the case of algebraic expressions, the bound variables are given by bvar elements, which are children of the containing apply element. The bvar elements may also contain degree element, which specify the order of the partial derivative to be taken in that variable.

For the expression case the actual variable is designated by a bvar element that is a child of the containing apply element. The bvar elements may also contain a degree element, which specifies the order of the derivative to be taken.

Where a total degree of differentiation must be specified, this is indicated by use of a degree element at the top level, i.e. without any associated bvar, as a child of the containing apply element.

 Editorial note: MiKo The following text was left over from the CD

In pragmatic Content MathML, the partialdiff operator can be applied to an expression with bound variables given by bvar elements, which are children of the containing apply element. The bvar elements may also contain degree element, which specify the order of the partial derivative to be taken in that variable. In strict Content MathML, the degrees are given as a list in the first argument of the partialdiff symbol.

  x n y m x y  $\frac{\partial^{n+m}\sin (xy)}{\partial x^{n}\partial y^{m}}$

Strict MathML equivlalent

  partialdiff list n m lambda x y sin times x y  $\mathrm{partialdiff}(\mathrm{list}(n, m), \mathrm{lambda}x, y\mathrm{sin}(\mathrm{times}(x, y)))$

Where a total degree of differentiation must be specified, this is indicated by use of a degree element at the top level, i.e. without any associated bvar, as a child of the containing apply element. Each degree schema used with partialdiff is expected to contain a single child schema. For example,

  2 x y x 4 f  $\frac{\partial^{4}f}{\partial x^{2}\partial y\partial x}$

denotes the mixed partial derivative ( d4 / d2 x dy dx ) f. In strict Content MathML, the overall degree cannot be given.

#### 4.3.13.4 Divergence (divergence)

The divergence element is the vector calculus divergence operator, often called div.

This symbol is used to represent the divergence function. It takes one argument which should be a vector of scalar valued functions, intended to represent a vector valued function and returns a scalar value. It should satisfy the defining relation: divergence(F) = \partial(F_(x_1))/\partial(x_1) + ... + \partial(F_(x_n))/\partial(x_n)

Content MathML

  a  $\mathop{\mathrm{div}}(a)$

Default Rendering: Presentation MathML

  diva  $div\left(a\right)$

Default Rendering: Image

The functions defining the coordinates may be defined implicitly as expressions defined in terms of the coordinate names, in which case the coordinate names must be provided as bound variables.

Content MathML

  E  $\mathop{\mathrm{div}}(E)$

Default Rendering: Presentation MathML

  divE  $div\left(E\right)$

Default Rendering: Image

Content MathML

  x y z x y x z z y  $\mathop{\mathrm{div}}(x, , y, , z, \left(\begin{array}{c}x+y\\ x+z\\ z+y\end{array}\right))$

Default Rendering: Presentation MathML

  div x,y,z ( x+y x+z z+y )  $div\left(x,,,y,,,z,\left(\begin{array}{c}x+y\\ x+z\\ z+y\end{array}\right)\right)$

Default Rendering: Image

Content MathML

  a V V 0 S a V  $\mathop{\mathrm{div}}(a)=\lim_{V\to 0}\frac{\int a\,d S}{V}$

Default Rendering: Presentation MathML

  diva = lim V0 adS /V  $div\left(a\right)=\underset{V\to 0}{\mathrm{lim}}{\int }_{}^{}adS/V$

Default Rendering: Image

#### 4.3.13.5 Gradient (grad)

The grad element is the vector calculus gradient operator, often called grad.

This symbol is used to represent the grad function. It takes one argument which should be a scalar valued function and returns a vector of functions. It should satisfy the defining relation: grad(F) = (\partial(F)/\partial(x_1), ... ,\partial(F)/partial(x_n))

The functions defining the coordinates may be defined implicitly as expressions defined in terms of the coordinate names, in which case the coordinate names must be provided as bound variables.

Content MathML

  f  $\mathop{\mathrm{grad}}(f)$

Default Rendering: Presentation MathML

  grad f  $grad\left(f\right)$

Default Rendering: Image

Content MathML

  x y z x y z  $\mathop{\mathrm{grad}}(x, , y, , z, xyz)$

Default Rendering: Presentation MathML

  grad x,y,z xyz  $grad\left(x,,,y,,,z,xyz\right)$

Default Rendering: Image

#### 4.3.13.6 Curl (curl)

This symbol is used to represent the curl function. It takes one argument which should be a vector of scalar valued functions, intended to represent a vector valued function and returns a vector of functions. It should satisfy the defining relation: curl(F) = i X \partial(F)/\partial(x) + j X \partial(F)/\partial(y) + j X \partial(F)/\partial(Z) where i,j,k are the unit vectors corresponding to the x,y,z axes respectively and the multiplication X is cross multiplication.

Content MathML

  a  $\mathop{\mathrm{curl}}(a)$

Default Rendering: Presentation MathML

  curla  $curl\left(a\right)$

Default Rendering: Image

Content MathML

  f  $\mathop{\mathrm{curl}}(f)$

Default Rendering: Presentation MathML

  curlf  $curl\left(f\right)$

Default Rendering: Image

The functions defining the coordinates may be defined implicitly as expressions defined in terms of the coordinate names, in which case the coordinate names must be provided as bound variables.

 Editorial note: MiKo We do not seem to have a binding curl example, maybe we should come up with one

#### 4.3.13.7 Laplacian (laplacian)

Content MathML

  E  $\nabla^2 (E)$

Default Rendering: Presentation MathML

  2 E  ${\nabla }^{2}\left(E\right)$

Default Rendering: Image

The functions defining the coordinates may be defined implicitly as expressions defined in terms of the coordinate names, in which case the coordinate names must be provided as bound variables.

Content MathML

  x y z f x y  $\nabla^2 (x, , y, , z, f(x, y))$

Default Rendering: Presentation MathML

  2 x,y,z f xy  ${\nabla }^{2}\left(x,,,y,,,z,f\left(x,y\right)\right)$

Default Rendering: Image

Content MathML

  f f  $\nabla^2 (f)=\mathop{\mathrm{div}}(\mathop{\mathrm{grad}}(f))$

Default Rendering: Presentation MathML

  2 f = div gradf  ${\nabla }^{2}\left(f\right)=div\left(grad\left(f\right)\right)$

Default Rendering: Image

### 4.3.14 Theory of Sets

#### 4.3.14.1 Set (set)

This symbol represents the set construct. It is an n-ary function. The set entries are given explicitly. There is no implied ordering to the elements of a set.

Content MathML

  a b c  $\{a, b, c\}$

Default Rendering: Presentation MathML

  {a,b,c}  $\left\{a,b,c\right\}$

Default Rendering: Image

In general a set can be constructed by providing a function and a domain of application. The elements of the set correspond to the values obtained by evaluating the function at the points of the domain.

Content MathML

  x x 5  $\{x\colon x< 5\}$

Default Rendering: Presentation MathML

  {x| x<5 }  $\left\{x|x<5\right\}$

Default Rendering: Image

Content MathML

  S S T S  $\{S\colon S\in T\}$

Default Rendering: Presentation MathML

  {S| ST }  $\left\{S|S\in T\right\}$

Default Rendering: Image

Content MathML

  x x 5 x x  $\{x\colon (x< 5)\land x\in \mathbb{N}\}$

Default Rendering: Presentation MathML

  { x | ( x < 5 ) x N }  $\left\{x|\left(x<5\right)\wedge x\in \mathbb{N}\right\}$

Default Rendering: Image

In strict MathML, this usage represented with the suchthat symbol from the set1 content dictionary.

If the type has value "multiset", then the set and suchthat from the multiset1 should be used instead.

#### 4.3.14.2 List (list)

This symbol denotes the list construct which is an n-ary function. The list entries must be given explicitly.

Content MathML

  a b c  $\left[a, b, c\right]$

Default Rendering: Presentation MathML

  (a,b,c)  $\left(a,b,c\right)$

Default Rendering: Image

In general a list can be constructed by providing a function and a domain of application. The elements of the list correspond to the values obtained by evaluating the function at the points of the domain.

This symbol represents the suchthat function which may be used to construct lists, it takes two arguments. The first argument should be the set which contains the elements of the list, the second argument should be a predicate, that is a function from the set to the booleans which describes if an element is to be in the list returned.

Content MathML

  x x 5  $\left[x\colon x< 5\right]$

Default Rendering: Presentation MathML

  (x| x<5 )  $\left(x|x<5\right)$

Default Rendering: Image

An order attribute can be used to specify what ordering is to be used. When the nature of the child elements permits, the ordering defaults to a numeric or lexicographic ordering.

Lists differ from sets in that there is an explicit order to the elements. Two orders are supported: lexicographic and numeric. The kind of ordering that should be used is specified by the order attribute.

#### 4.3.14.3 Union (union)

This symbol is used to denote the n-ary union of sets. It takes sets as arguments, and denotes the set that contains all the elements that occur in any of them.

Content MathML

  A B  $A\cup B$

Default Rendering: Presentation MathML

  AB  $A\cup B$

Default Rendering: Image

The union operator element can be used as a binding operator in pragmatic Content MathML. This role is taken over by the big_union symbol in strict Content MathML.

  x 0x  $x\cup \left\{\right\}(0, x)$

Strict MathML equivlalent

  big_union lambda x integer_interval0x  $\mathrm{big_union}(\mathrm{lambda}x\mathrm{integer_interval}(0, x))$

This n-ary operator is used to construct the union over a collection of sets.

Content MathML

  S L S  $S\cup \cup S$

Default Rendering: Presentation MathML

  S S  $S\cup \cup S$

Default Rendering: Image

If the type has value "multiset", then the union and big_union from the multiset1 should be used instead.

#### 4.3.14.4 Intersect (intersect)

This symbol is used to denote the n-ary intersection of sets. It takes sets as arguments, and denotes the set that contains all the elements that occur in all of them.

Content MathML

  A B  $A\cap B$

Default Rendering: Presentation MathML

  A B  $A\cap B$

Default Rendering: Image

The intersect operator element can be used as a binding operator in pragmatic Content MathML. This role is taken over by the big_intersect symbol in strict Content MathML.

  x 0x  $x\cap \left\{\right\}(0, x)$

Strict MathML equivlalent

  big_intersect lambda x integer_interval0x  $\mathrm{big_intersect}(\mathrm{lambda}x\mathrm{integer_interval}(0, x))$

This n-ary operator is used to construct the intersection over a collection of sets.

Content MathML

  L S S  $L\cap \mathrm{lambda}\: .\: SS$

Default Rendering: Presentation MathML

  L λ. . S  $L\cap \lambda .\left(\right).S$

Default Rendering: Image

If the type has value "multiset", then the intersect and big_intersect from the multiset1 should be used instead.

#### 4.3.14.5 Set inclusion (in)

This symbol has two arguments, an element and a set. It is used to denote that the element is in the given set.

Content MathML

  a A  $a\in A$

Default Rendering: Presentation MathML

  aA  $a\in A$

Default Rendering: Image

If the type has value "multiset", then the in from the multiset1 should be used instead.

#### 4.3.14.6 Set exclusion (notin)

This symbol has two arguments, an element and a set. It is used to denote that the element is not in the given set.

Content MathML

  a A  $a\notin A$

Default Rendering: Presentation MathML

  aA  $a\notin A$

Default Rendering: Image

If the type has value "multiset", then the notin from the multiset1 should be used instead.

#### 4.3.14.7 Subset (subset)

This symbol has two (set) arguments. It is used to denote that the first set is a subset of the second.

Content MathML

  A B  $A\subseteq B$

Default Rendering: Presentation MathML

  AB  $A\subseteq B$

Default Rendering: Image

If the type has value "multiset", then the subset from the multiset1 should be used instead.

 Editorial note: MiKo There is a version with bvar here, what to do here?

#### 4.3.14.8 Proper Subset (prsubset)

This symbol has two (set) arguments. It is used to denote that the first set is a proper subset of the second, that is a subset of the second set but not actually equal to it.

Content MathML

  A B  $A\subset B$

Default Rendering: Presentation MathML

  AB  $A\subset B$

Default Rendering: Image

If the type has value "multiset", then the prsubset from the multiset1 should be used instead.

 Editorial note: MiKo There is a version with bvar here, what to do here?

#### 4.3.14.9 Not Subset (notsubset)

This symbol has two (set) arguments. It is used to denote that the first set is not a subset of the second.

Content MathML

  A B  $A\nsubseteq B$

Default Rendering: Presentation MathML

  AB  $A⊈B$

Default Rendering: Image

If the type has value "multiset", then the notsubset from the multiset1 should be used instead.

#### 4.3.14.10 Not Proper Subset (notprsubset)

This symbol has two (set) arguments. It is used to denote that the first set is not a proper subset of the second. A proper subset of a set is a subset of the set but not actually equal to it.

Content MathML

  A B  $A\not\subset B$

Default Rendering: Presentation MathML

  AB  $A\not\subset B$

Default Rendering: Image

If the type has value "multiset", then the notprsubset from the multiset1 should be used instead.

#### 4.3.14.11 Set Difference (setdiff)

This symbol is used to denote the set difference of two sets. It takes two sets as arguments, and denotes the set that contains all the elements that occur in the first set, but not in the second.

Content MathML

  A B  $A\setminus B$

Default Rendering: Presentation MathML

  AB  $A\setminus B$

Default Rendering: Image

If the type has value "multiset", then the setdiff from the multiset1 should be used instead.

#### 4.3.14.12 Cardinality (card)

This symbol is used to denote the number of elements in a set. It is either a non-negative integer, or an infinite cardinal number. The symbol infinity may be used for an unspecified infinite cardinal.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

If the type has value "multiset", then the size from the multiset1 should be used instead.

#### 4.3.14.13 Cartesian product (cartesianproduct)

Content MathML

  A B  $A\times B$

Default Rendering: Presentation MathML

  A×B  $A×B$

Default Rendering: Image

If the type has value "multiset", then the cartesianproduct from the multiset1 should be used instead.

 Editorial note: MiKo There is a version with bvar here, what to do here?

### 4.3.15 Sequences and Series

#### 4.3.15.1 Sum (sum)

An operator taking two arguments, the first being the range of summation, e.g. an integral interval, the second being the function to be summed. Note that the sum may be over an infinite interval.

In pragmatic Content MathML, the sum operator may used as the first child of an apply element, which is qualified by providing a domainofapplication, an uplimit, lowlimit pair, condition element. The index for the summation is specified by a bvar element.

If no bound variables are specified then terms of the sum correspond to those produced by evaluating the function that is provided at the points of the domain, while if bound variables are present they are the index of summation and they take on the values of points in the domain. In this case the terms of the sum correspond to the values of the expression that is provided, evaluated at those points. Depending on the structure of the domain, the domain of summation can be abbreviated by using uplimit and lowlimit to specify upper and lower limits for the sum.

A sum in pragmatic Content MathML is turned into strict Content MathML by supplying a lambda binder for the expression to make it into a function. The range of integration is converted to an interval.

  i 0 100 xi  $\sum_{i=0}^{100} x^{i}$

Strict MathML equivlalent

  sum integer_interval 0 100 lambda i powerxi  $\mathrm{sum}(\mathrm{integer_interval}(0, 100), \mathrm{lambda}i\mathrm{power}(x, i))$

Content MathML

  x a b f x  $\sum \mathrm{lambda}\: .\: xf(x)$

Default Rendering: Presentation MathML

  λ. . fx  ${\sum }_{}^{}\lambda .\left(\right).f\left(x\right)$

Default Rendering: Image

Content MathML

  x x B f x  $\sum \mathrm{lambda}\: .\: xx\in Bf(x)$

Default Rendering: Presentation MathML

  λ. . xB fx  ${\sum }_{}^{}\lambda .\left(\right).x\in Bf\left(x\right)$

Default Rendering: Image

Content MathML

  B f  $\sum f$

Default Rendering: Presentation MathML

  f  ${\sum }_{}^{}f$

Default Rendering: Image

#### 4.3.15.2 Product (product)

An operator taking two arguments, the first being the range of multiplication e.g. an integral interval, the second being the function to be multiplied. Note that the product may be over an infinite interval.

In pragmatic Content MathML, the product Operator may used as the first child of an apply element, which is qualified by providing a domainofapplication, an uplimit, lowlimit pair, condition element. The index is specified by a bvar element.

If no bound variables are specified then terms of the product correspond to those produced by evaluating the function that is provided at the points of the domain, while if bound variables are present they are the index and they take on the values of points in the domain. In this case the terms of the product correspond to the values of the expression that is provided, evaluated at those points. Depending on the structure of the domain, the domain of multiplication can be abbreviated by using uplimit and lowlimit to specify upper and lower limits for the product.

A product in pragmatic Content MathML is turned into strict Content MathML by supplying a lambda binder for the expression to make it into a function. The range of integration is converted to an interval.

  i xi  $\prod x^{i}$

Strict MathML equivlalent

  product integer_interval 0 100 lambda i powerxi  $\mathrm{product}(\mathrm{integer_interval}(0, 100), \mathrm{lambda}i\mathrm{power}(x, i))$

Content MathML

  x a b f x  $\prod \mathrm{lambda}\: .\: xf(x)$

Default Rendering: Presentation MathML

  λ. . fx  ${\prod }_{}^{}\lambda .\left(\right).f\left(x\right)$

Default Rendering: Image

Content MathML

  x x B f x  $\prod \mathrm{lambda}\: .\: xx\in Bf(x)$

Default Rendering: Presentation MathML

  λ. . xB fx  ${\prod }_{}^{}\lambda .\left(\right).x\in Bf\left(x\right)$

Default Rendering: Image

#### 4.3.15.3 Limits (limit)

This symbol is used to denote the limit of a function. It takes 3 arguments: the limiting value of the argument, the method of approach (either null, above, below or both_sides) and the function.

The limit element represents the operation of taking a limit of a sequence. The limit point is expressed by specifying a lowlimit and a bvar, or by specifying a condition on one or more bound variables.

Content MathML

  x 0 x  $\lim_{x\to 0}\sin x$

Default Rendering: Presentation MathML

  lim x 0 sinx  $\underset{x\to 0}{\mathrm{lim}}\mathrm{sin}x$

Default Rendering: Image

Content MathML

  x x 0 x  $\lim_{x\to 0}\sin x$

Default Rendering: Presentation MathML

  lim x0 sinx  $\underset{x\to 0}{\mathrm{lim}}\mathrm{sin}x$

Default Rendering: Image

Content MathML

  x x a x  $\lim_{x\to a}\sin x$

Default Rendering: Presentation MathML

  lim xa sinx  $\underset{x\to a}{\mathrm{lim}}\mathrm{sin}x$

Default Rendering: Image

The direction from which a limiting value is approached is given as an argument limit in strict content MathML, which supplies the direction specifier symbols both_sides, above, and below for this purpose. The first correspond to the values "all", "above", and "below" of the type attribute of the tendsto element below. The null symbol corresponds to the case where no type attribute is present. We translate

  x x0 x  $\lim_{x\to 0}\sin x$

Strict MathML equivlalent

  limit 0 null lambda x sinx  $\mathrm{limit}(0, \mathrm{null}, \mathrm{lambda}x\mathrm{sin}(x))$

#### 4.3.15.4 Tends To (tendsto)

This symbol is also used to express the relation that a quantity is tending to a specified value. While this is used primarily as part of the statement of a mathematical limit, it exists as a construct on its own to allow one to capture mathematical statements such as "As x tends to y," and to provide a building block to construct more general kinds of limits.

The tendsto element takes the attributes type to set the direction from which the limiting value is approached.

Content MathML

  x 2 a 2  $x^{2}\to a^{2}$

Default Rendering: Presentation MathML

  x2 a2  ${x}^{2}\to {a}^{2}$

Default Rendering: Image

Content MathML

  x y f x y g x y  $\left(\begin{array}{c}x\\ y\end{array}\right)\to \left(\begin{array}{c}f(x, y)\\ g(x, y)\end{array}\right)$

Default Rendering: Presentation MathML

  ( xy ) ( f xy g xy )  $\left(\begin{array}{c}x\\ y\end{array}\right)\to \left(\begin{array}{c}f\left(x,y\right)\\ g\left(x,y\right)\end{array}\right)$

Default Rendering: Image

### 4.3.16 Elementary classical functions

#### 4.3.16.1 common trigonometric functions

The names of the common trigonometric functions supported by MathML are listed below. Since their standard interpretations are widely known, they are discussed as a group.

 sin cos tan sec csc cot sinh cosh tanh sech csch coth arcsin arccos arctan arccosh arccot arccoth arccsc arccsch arcsec arcsech arcsinh arctanh

These operator elements denote the standard trigonometric functions.

Content MathML

  x  $\sin x$

Default Rendering: Presentation MathML

  sinx  $\mathrm{sin}x$

Default Rendering: Image

Content MathML

  x x 3  $\sin (\cos x+x^{3})$

Default Rendering: Presentation MathML

  sin ( cosx + x3 )  $\mathrm{sin}\left(\mathrm{cos}x+{x}^{3}\right)$

Default Rendering: Image

#### 4.3.16.2 Exponential (exp)

This symbol represents the exponentiation function associated with the inverse of the ln function as described in Abramowitz and Stegun, section 4.2. It takes one argument.

Content MathML

  x  $e^{x}$

Default Rendering: Presentation MathML

  ex  ${e}^{x}$

Default Rendering: Image

#### 4.3.16.3 Natural Logarithm (ln)

This symbol represents the ln function (natural logarithm) as described in Abramowitz and Stegun, section 4.1. It takes one argument. Note the description in the CMP/FMP of the branch cut. If signed zeros are in use, the inequality needs to be non-strict.

Content MathML

  a  $\ln a$

Default Rendering: Presentation MathML

  lna  $\mathrm{ln}a$

Default Rendering: Image

#### 4.3.16.4 Logarithm (log)

This symbol represents a binary log function; the first argument is the base, to which the second argument is log'ed. It is defined in Abramowitz and Stegun, Handbook of Mathematical Functions, section 4.1

Content MathML

  3 x  $\log_{3}x$

Default Rendering: Presentation MathML

  log3 x  ${\mathrm{log}}_{3}x$

Default Rendering: Image

Content MathML

  x  $\lg x$

Default Rendering: Presentation MathML

  logx  $\mathrm{log}x$

Default Rendering: Image

### 4.3.17 Statistics

#### 4.3.17.1 Mean (mean)

mean is the operator element representing a mean or average of a data set or random variable. If it is used on a data set, then the mean element corresponds to the mean from the s_data1 content dictionary, if it is used on a random variable, then it corresponds to the mean from the s_dist1 CD.

Content MathML

  3 4 3 7 4  $\langle 3, 4, 3, 7, 4\rangle$

Default Rendering: Presentation MathML

  3,4,3,7,4  $〈3,4,3,7,4〉$

Default Rendering: Image

Content MathML

  X  $\langle X\rangle$

Default Rendering: Presentation MathML

  X  $〈X〉$

Default Rendering: Image

#### 4.3.17.2 Standard Deviation (sdev)

mean is the operator element representing the standard deviation of a data set or random variable. If it is used on a data set, then the sdev element corresponds to the sdev from the s_data1 content dictionary, if it is used on a random variable, then it corresponds to the sdev from the s_dist1 CD.

Content MathML

  3 4 2 2  $\sigma (3, 4, 2, 2)$

Default Rendering: Presentation MathML

  σ 3422  $\sigma \left(3,4,2,2\right)$

Default Rendering: Image

Content MathML

  X  $\sigma (X)$

Default Rendering: Presentation MathML

  σX  $\sigma \left(X\right)$

Default Rendering: Image

#### 4.3.17.3 Variance (variance)

variance is the operator element representing the standard deviation of a data set or random variable. If it is used on a data set, then the variance element corresponds to the variance from the s_data1 content dictionary, if it is used on a random variable, then it corresponds to the variance from the s_dist1 CD.

Content MathML

  3 4 2 2  $\sigma(3)^2$

Default Rendering: Presentation MathML

  σ(3) 2  ${\sigma \left(3\right)}^{2}$

Default Rendering: Image

Content MathML

  X  $\sigma(X)^2$

Default Rendering: Presentation MathML

  σ( X) 2  ${\sigma \left(X\right)}^{2}$

Default Rendering: Image

#### 4.3.17.4 Median (median)

This symbol represents an n-ary function denoting the median of its arguments. That is, if the data were placed in ascending order then it denotes the middle one (in the case of an odd amount of data) or the average of the middle two (in the case of an even amount of data). See CRC Standard Mathematical Tables and Formulae, editor: Dan Zwillinger, CRC Press Inc., 1996, section 7.7.1

Content MathML

  3 4 2 2  $\mathop{\mathrm{median}}(3, 4, 2, 2)$

Default Rendering: Presentation MathML

  median 3422  $median\left(3,4,2,2\right)$

Default Rendering: Image

#### 4.3.17.5 Mode (mode)

This symbol represents an n-ary function denoting the mode of its arguments. That is the value which occurs with the greatest frequency. See CRC Standard Mathematical Tables and Formulae, editor: Dan Zwillinger, CRC Press Inc., 1996, section 7.7.1

Content MathML

  3 4 2 2  $\mathop{\mathrm{mode}}(3, 4, 2, 2)$

Default Rendering: Presentation MathML

  mode 3422  $mode\left(3,4,2,2\right)$

Default Rendering: Image

#### 4.3.17.6 Moment (moment, momentabout)

moment s used to denote the i'th moment of a set of data set or random variable. If it is used on a data set, then the moment element corresponds to the moment from the s_data1 content dictionary

This symbol is used to denote the i'th moment of a set of data. The first argument should be the degree of the moment (that is, for the i'th moment the first argument should be i), the second argument should be the point about which the moment is being taken and the rest of the arguments are treated as the data. For n data values x_1, x_2, ..., x_n the i'th moment about c is (1/n) ((x_1-c)^i + (x_2-c)^i + ... + (x_n-c)^i). See CRC Standard Mathematical Tables and Formulae, editor: Dan Zwillinger, CRC Press Inc., 1996, section 7.7.1.

if it is used on a random variable, then it corresponds to the moment from the s_dist1 CD.

This symbol represents a ternary function to denote the i'th moment of a distribution. The first argument should be the degree of the moment (that is, for the i'th moment the first argument should be i), the second argument is the value about which the moment is to be taken and the third argument is a univariate function to describe the distribution. That is, if f is the function which describe the distribution. The i'th moment of f about a is the integral of (x-a)^i*f(x) with respect to x, over the interval (-infinity,infinity). See CRC Standard Mathematical Tables and Formulae, editor: Dan Zwillinger, CRC Press Inc., 1996, section 7.7.1

In pragmatic content MathML we use the qualifier degree for the n in " n-th moment" and the qualifier momentabout for the p in "moment about p". We translate:

  3 p X  $\langle X^{3}\rangle_{p}$

Strict MathML equivlalent

  moment 3 p X  $\mathrm{moment}(3, p, X)$

The moment function accepts the degree and momentabout schema. If present, the degree schema denotes the order of the moment. Otherwise, the moment is assumed to be the first order moment. When used with moment, the degree schema is expected to contain a single child schema; otherwise an error is generated. If present, the momentabout schema denotes the point about which the moment is taken. Otherwise, the moment is assumed to be the moment about zero.

Content MathML

  3 6 4 2 2 5  $\langle 5^{3}\rangle_{}$

Default Rendering: Presentation MathML

  53 mean  ${〈{5}^{3}〉}_{\mathrm{mean}}$

Default Rendering: Image

Content MathML

  3 p X  $\langle X^{3}\rangle_{p}$

Default Rendering: Presentation MathML

  X3 p  ${〈{X}^{3}〉}_{p}$

Default Rendering: Image

### 4.3.18 Linear Algebra

#### 4.3.18.1 Vector (vector)

A vector is an ordered n-tuple of values representing an element of an n-dimensional vector space. The "values" are all from the same ring, typically real or complex. Where orientation is important, such as for pre or post multiplication by a matrix a vector is treated as a row vector and its transpose is treated a column vector. See CRC Standard Mathematical Tables and Formulae, editor: Dan Zwillinger, CRC Press Inc., 1996, [2.4]

For purposes of interaction with matrices and matrix multiplication, vectors are regarded as equivalent to a matrix consisting of a single column, and the transpose of a vector behaves the same as a matrix consisting of a single row. Note that vectors may be rendered either as a single column or row.

vector is a constructor element (see ??? ).

Content MathML

  x y 3 7  $\left(\begin{array}{c}x+y\\ 3\\ 7\end{array}\right)$

Default Rendering: Presentation MathML

  ( x+y 37 )  $\left(\begin{array}{c}x+y\\ 3\\ 7\end{array}\right)$

Default Rendering: Image

In general a vector can be constructed by providing a function and a 1-dimensional domain of application. The entries of the vector correspond to the values obtained by evaluating the function at the points of the domain.

The vector element constructs vectors from an n-dimensional vector space so that its n child elements typically represent real or complex valued scalars as in the three-element vector

This symbol allows to construct a vector by providing a function and a 1-dimensional domain of application. The entries of the vector correspond to the values obtained by evaluating the function at the points of the domain.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

#### 4.3.18.2 Matrix (matrix)

A vector is an ordered n-tuple of values representing an element of an n-dimensional vector space. The "values" are all from the same ring, typically real or complex. Where orientation is important, such as for pre or post multiplication by a matrix a vector is treated as a row vector and its transpose is treated a column vector. See CRC Standard Mathematical Tables and Formulae, editor: Dan Zwillinger, CRC Press Inc., 1996, [2.4]

For purposes of interaction with matrices and matrix multiplication, vectors are regarded as equivalent to a matrix consisting of a single column, and the transpose of a vector behaves the same as a matrix consisting of a single row. Note that vectors may be rendered either as a single column or row.

Note that the behavior of the matrix and matrixrow elements is substantially different from the mtable and mtr presentation elements.

matrix is a constructor element (see ??? ).

In general a matrix can be constructed by providing a function and a 2-dimensional domain of application. The entries of the matrix correspond to the values obtained by evaluating the function at the points of the domain. The qualifications defined by a domainofapplication element can also be abbreviated in several ways including a condition element placing constraints directly on bound variables and an expression in those variables.

This symbol allows to construct a matrix by providing a function and a 2-dimensional domain of application. The entries of the matrix correspond to the values obtained by evaluating the function at the points of the domain.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

#### 4.3.18.3 Matrix row (matrixrow)

This symbol is an n-ary constructor used to represent rows of matrices. Its arguments should be members of a ring.

Matrix rows are not directly rendered by themselves outside of the context of a matrix.

#### 4.3.18.4 Determinant (determinant)

This symbol denotes the unary function which returns the determinant of its argument, the argument should be a square matrix.

Content MathML

  A  $\det A$

Default Rendering: Presentation MathML

  detA  $\mathrm{det}A$

Default Rendering: Image

#### 4.3.18.5 Transpose (transpose)

This symbol represents a unary function that denotes the transpose of the given matrix or vector.

Content MathML

  A  $A^T$

Default Rendering: Presentation MathML

  AT  ${A}^{T}$

Default Rendering: Image

#### 4.3.18.6 Selector (selector)

The selector element is the operator for indexing into vectors matrices and lists. It accepts one or more arguments. The first argument identifies the vector, matrix or list from which the selection is taking place, and the second and subsequent arguments, if any, indicate the kind of selection taking place.

When selector is used with a single argument, it should be interpreted as giving the sequence of all elements in the list, vector or matrix given. The ordering of elements in the sequence for a matrix is understood to be first by column, then by row. That is, for a matrix ( ai,j), where the indices denote row and column, the ordering would be a 1,1, a 1,2, ... a 2,1, a2,2 ... etc.

When three arguments are given, the last one is ignored for a list or vector, and in the case of a matrix, the second and third arguments specify the row and column of the selected element.

When two arguments are given, and the first is a vector or list, the second argument specifies an element in the list or vector.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

Content MathML

  V 1  $V_{1}$

Default Rendering: Presentation MathML

  V1  ${V}_{1}$

Default Rendering: Image

Content MathML

  1 2 3 4 1 1 2  $\begin{pmatrix}1 & 2\\ 3 & 4\end{pmatrix}_{1}=1 & 2$

Default Rendering: Presentation MathML

  ( 12 34 ) 1 = 12  ${\left(\begin{array}{cc}1& 2\\ 3& 4\end{array}\right)}_{1}=\begin{array}{cc}1& 2\end{array}$

Default Rendering: Image

#### 4.3.18.7 Vector product (vectorproduct)

This symbol represents the vector product function. It takes two three dimensional vector arguments and returns a three dimensional vector.

Content MathML

  A B a b θ N  $A\times B=ab\sin \theta N$

Default Rendering: Presentation MathML

  A× B = ab sinθ N  $A×B=ab\mathrm{sin}\theta N$

Default Rendering: Image

#### 4.3.18.8 Scalar product (scalarproduct)

This symbol represents the scalar product function. It takes two vector arguments and returns a scalar value.

Content MathML

  A B a b θ  $A\dot B=ab\cos \theta$

Default Rendering: Presentation MathML

  A.B = ab cosθ  $A.B=ab\mathrm{cos}\theta$

Default Rendering: Image

#### 4.3.18.9 Outer product (outerproduct)

This symbol represents the outer product function. It takes two vector arguments and returns a matrix.

Content MathML

  A B  $A\dot B$

Default Rendering: Presentation MathML

  AB  $A\otimes B$

Default Rendering: Image

### 4.3.19 Constant and Symbol Elements

This section explains the use of the Constant and Symbol elements.

#### 4.3.19.1 integers (integers)

This symbol represents the set of integers, positive, negative and zero.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

#### 4.3.19.2 reals (reals)

This symbol represents the set of real numbers.

Content MathML

  44.997  $44.997\in \mathbb{R}$

Default Rendering: Presentation MathML

  44.997R  $44.997\in \mathbb{R}$

Default Rendering: Image

#### 4.3.19.3 Rational Numbers (rationals)

This symbol represents the set of rational numbers.

Content MathML

  22 7  $22/7\in \mathbb{Q}$

Default Rendering: Presentation MathML

  22 /7 Q  $22/7\in \mathbb{Q}$

Default Rendering: Image

#### 4.3.19.4 Natural Numbers (naturalnumbers)

This symbol represents the set of natural numbers (including zero).

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

#### 4.3.19.5 complexes (complexes)

This symbol represents the set of complex numbers.

Content MathML

  1729  $1729\in \mathbb{C}$

Default Rendering: Presentation MathML

  1729C  $1729\in \mathbb{C}$

Default Rendering: Image

#### 4.3.19.6 primes (primes)

This symbol represents the set of positive prime numbers.

Content MathML

  17  $17\in \mathbb{P}$

Default Rendering: Presentation MathML

  17P  $17\in \mathbb{P}$

Default Rendering: Image

#### 4.3.19.7 Exponential e (exponentiale)

This symbol represents the base of the natural logarithm, approximately 2.718. See Abramowitz and Stegun, Handbook of Mathematical Functions, section 4.1.

Content MathML

  1  $\ln e=1$

Default Rendering: Presentation MathML

  lne =1  $\mathrm{ln}e=1$

Default Rendering: Image

#### 4.3.19.8 Imaginary i (imaginaryi)

This symbol represents the mathematical constant which is the square root of -1, commonly written i

Content MathML

  2 -1  $i^{2}=-1$

Default Rendering: Presentation MathML

  i2 =-1  ${i}^{2}=-1$

Default Rendering: Image

#### 4.3.19.9 Not A Number (notanumber)

A symbol to convey the notion of not-a-number. The result of an ill-posed floating computation. See IEEE standard for floating point representations.

Content MathML

 

Default Rendering: Presentation MathML

 

Default Rendering: Image

#### 4.3.19.10 True (true)

This symbol represents the boolean value true, i.e. the logical constant for truth.

Content MathML

  P  $\mbox{true}\lor P=\mbox{true}$

Default Rendering: Presentation MathML

  trueP =true  $\mathrm{true}\vee P=\mathrm{true}$

Default Rendering: Image

#### 4.3.19.11 False (false)

This symbol represents the boolean value false, i.e. the logical constant for falsehood.

Content MathML

  P  $\mbox{false}\land P=\mbox{false}$

Default Rendering: Presentation MathML

  falseP =false  $\mathrm{false}\wedge P=\mathrm{false}$

Default Rendering: Image

#### 4.3.19.12 Empty Set (emptyset)

This symbol is used to represent the empty set, that is the set which contains no members. It takes no parameters.

The emptyset element takes an optional attribute type. If its value is "multiset", then the emptyset corresponds to the emptyset symbol from the multiset1 CD.

Content MathML

   $\mathbb{Z}\neq \emptyset$

Default Rendering: Presentation MathML

  Z  $\mathbb{Z}\ne \varnothing$

Default Rendering: Image

#### 4.3.19.13 pi (pi)

A symbol to convey the notion of pi, approximately 3.142. The ratio of the circumference of a circle to its diameter.

Content MathML

  227  $\pi \approx 22/7$

Default Rendering: Presentation MathML

  π 22/7  $\pi \simeq 22/7$

Default Rendering: Image

#### 4.3.19.14 Euler gamma (eulergamma)

A symbol to convey the notion of the gamma constant as defined in Abramowitz and Stegun, Handbook of Mathematical Functions, section 6.1.3. It is the limit of 1 + 1/2 + 1/3 + ... + 1/m - ln m as m tends to infinity, this is approximately 0.5772 15664.

Content MathML

  0.5772156649  $\gamma \approx 0.5772156649$

Default Rendering: Presentation MathML

  γ0.5772156649  $\gamma \simeq 0.5772156649$

Default Rendering: Image

#### 4.3.19.15 infinity (infinity)

A symbol to represent the notion of infinity.

Content MathML

  $\infty$

Default Rendering: Presentation MathML

  $\infty$

Default Rendering: Image

## 4.4 Deprecated content Elements

### 4.4.1 Declare (declare)

 Editorial note: MiKo This should maybe be moved into a general section about changes or deprecated elements. Also Stan thinks the text should be improved.

MathML2 provided the declare element that allowed to bind properties like types to symbols and variables and to define abbreviations for structure sharing. This element is deprecated in MathML 3. Structure sharing can obtained via the share element (see Section 4.2.7 Structure Sharing (share) for details).

## 4.5 Rendering of Content Elements

 Editorial note: MiKo The material in this section is highly provisional

While the primary role of the MathML content element set is to directly encode the mathematical structure of expressions independent of the notation used to present the objects, rendering issues cannot be ignored. There are different approaches for rendering content MathML formulae, ranging from from native implementations of the K-14 element set over declarative notation definitions

 Editorial note: miko cite note here

to XSLT style sheets. The MathML 3 Recommendation will not make one of these normative, but only specify the default notations of the content MathML elements by way of examples.

 Editorial note: MiKo maybe it is best to distribute these sections into the sections where the elements are defined.

### 4.5.1 Numbers

The default rendering of a simple cn-tagged object is the same as for the presentation element mn with some provision for overriding the presentation of the PCDATA by providing explicit mn tags. This is described in detail in Section 4.2.3 Numbers (cn).

### 4.5.2 Symbols and Identifiers

If the content of a ci or csymbol element is tagged using presentation tags, that presentation is used. If no such tagging is supplied then the PCDATA content is rendered as if it were the content of an mi element. In particular if an application supports bidirectional text rendering, then the rendering follows the Unicode bidirectional rendering.

### 4.5.3 Applications

If F is the rendering of f and Ai those of ai, then the default rendering of an application element of the form

<apply>f a1 ... an</apply>

is

<mrow>
F
<mo fence="true">(</mo>
A1
<mo separator="true">,</mo>
...
<mo separator="true">,</mo>
An
<mo fence="true">)</mo>
</mrow>

### 4.5.4 Binders

If b, c, xi, c, and s render to B, C, Xi, C, and S, then the default rendering of a binding element of the form

<bind>b<bvar>x1 ... xn</bvar>S</bind>

is

<mrow>
B
x1
<mo separator="true">,</mo>
...
<mo separator="true">,</mo>
xn
<mo separator="true">.</mo>
S
</mrow>

The default rendering of a semantics element is the default rendering of its first child: the annotation and annotation-xml are not rendered. When a presentation MathML annotation is provided, a MathML renderer may optionally use this information to render the MathML construct. This would typically be the case when the first child is a MathML content construct and the annotation is provided to give a preferred rendering differing from the default for the content elements.

### 4.5.6 Structure Sharing

The default rendering of a share is that of the MathML element pointed to by the URI in the href attribute.

### 4.5.7 Rest

 Editorial note: MiKo do all the rest
Overview: Mathematical Markup Language (MathML) Version 3.0
Previous: 3 Presentation Markup
Next: 5 Mixing Several Markups